@must-b/must-b 1.6.0 → 1.6.1
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.
- package/dist/BUILD.json +3 -3
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/public/assets/index-BNER70f1.js +353 -0
- package/dist/public/assets/index-CvaV4G0E.css +1 -0
- package/dist/public/index.html +2 -2
- package/package.json +1 -1
- package/dist/public/assets/index-C-aFNlUS.js +0 -445
- package/dist/public/assets/index-CpBX4Opd.css +0 -1
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
function tv(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const i=Object.getOwnPropertyDescriptor(r,s);i&&Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();function Sp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Np={exports:{}},Yo={},jp={exports:{}},W={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var li=Symbol.for("react.element"),nv=Symbol.for("react.portal"),rv=Symbol.for("react.fragment"),sv=Symbol.for("react.strict_mode"),iv=Symbol.for("react.profiler"),ov=Symbol.for("react.provider"),av=Symbol.for("react.context"),lv=Symbol.for("react.forward_ref"),uv=Symbol.for("react.suspense"),cv=Symbol.for("react.memo"),dv=Symbol.for("react.lazy"),Ed=Symbol.iterator;function fv(e){return e===null||typeof e!="object"?null:(e=Ed&&e[Ed]||e["@@iterator"],typeof e=="function"?e:null)}var Cp={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ep=Object.assign,Tp={};function Wr(e,t,n){this.props=e,this.context=t,this.refs=Tp,this.updater=n||Cp}Wr.prototype.isReactComponent={};Wr.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Wr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Pp(){}Pp.prototype=Wr.prototype;function Ou(e,t,n){this.props=e,this.context=t,this.refs=Tp,this.updater=n||Cp}var zu=Ou.prototype=new Pp;zu.constructor=Ou;Ep(zu,Wr.prototype);zu.isPureReactComponent=!0;var Td=Array.isArray,Rp=Object.prototype.hasOwnProperty,Vu={current:null},_p={key:!0,ref:!0,__self:!0,__source:!0};function Ap(e,t,n){var r,s={},i=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)Rp.call(t,r)&&!_p.hasOwnProperty(r)&&(s[r]=t[r]);var a=arguments.length-2;if(a===1)s.children=n;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];s.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)s[r]===void 0&&(s[r]=a[r]);return{$$typeof:li,type:e,key:i,ref:o,props:s,_owner:Vu.current}}function hv(e,t){return{$$typeof:li,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Bu(e){return typeof e=="object"&&e!==null&&e.$$typeof===li}function pv(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Pd=/\/+/g;function ja(e,t){return typeof e=="object"&&e!==null&&e.key!=null?pv(""+e.key):t.toString(36)}function Wi(e,t,n,r,s){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case li:case nv:o=!0}}if(o)return o=e,s=s(o),e=r===""?"."+ja(o,0):r,Td(s)?(n="",e!=null&&(n=e.replace(Pd,"$&/")+"/"),Wi(s,t,n,"",function(c){return c})):s!=null&&(Bu(s)&&(s=hv(s,n+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(Pd,"$&/")+"/")+e)),t.push(s)),1;if(o=0,r=r===""?".":r+":",Td(e))for(var a=0;a<e.length;a++){i=e[a];var l=r+ja(i,a);o+=Wi(i,t,n,l,s)}else if(l=fv(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+ja(i,a++),o+=Wi(i,t,n,l,s);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function xi(e,t,n){if(e==null)return e;var r=[],s=0;return Wi(e,r,"","",function(i){return t.call(n,i,s++)}),r}function mv(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var ze={current:null},Hi={transition:null},gv={ReactCurrentDispatcher:ze,ReactCurrentBatchConfig:Hi,ReactCurrentOwner:Vu};function Mp(){throw Error("act(...) is not supported in production builds of React.")}W.Children={map:xi,forEach:function(e,t,n){xi(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return xi(e,function(){t++}),t},toArray:function(e){return xi(e,function(t){return t})||[]},only:function(e){if(!Bu(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};W.Component=Wr;W.Fragment=rv;W.Profiler=iv;W.PureComponent=Ou;W.StrictMode=sv;W.Suspense=uv;W.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=gv;W.act=Mp;W.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Ep({},e.props),s=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=Vu.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Rp.call(t,l)&&!_p.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:li,type:e.type,key:s,ref:i,props:r,_owner:o}};W.createContext=function(e){return e={$$typeof:av,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:ov,_context:e},e.Consumer=e};W.createElement=Ap;W.createFactory=function(e){var t=Ap.bind(null,e);return t.type=e,t};W.createRef=function(){return{current:null}};W.forwardRef=function(e){return{$$typeof:lv,render:e}};W.isValidElement=Bu;W.lazy=function(e){return{$$typeof:dv,_payload:{_status:-1,_result:e},_init:mv}};W.memo=function(e,t){return{$$typeof:cv,type:e,compare:t===void 0?null:t}};W.startTransition=function(e){var t=Hi.transition;Hi.transition={};try{e()}finally{Hi.transition=t}};W.unstable_act=Mp;W.useCallback=function(e,t){return ze.current.useCallback(e,t)};W.useContext=function(e){return ze.current.useContext(e)};W.useDebugValue=function(){};W.useDeferredValue=function(e){return ze.current.useDeferredValue(e)};W.useEffect=function(e,t){return ze.current.useEffect(e,t)};W.useId=function(){return ze.current.useId()};W.useImperativeHandle=function(e,t,n){return ze.current.useImperativeHandle(e,t,n)};W.useInsertionEffect=function(e,t){return ze.current.useInsertionEffect(e,t)};W.useLayoutEffect=function(e,t){return ze.current.useLayoutEffect(e,t)};W.useMemo=function(e,t){return ze.current.useMemo(e,t)};W.useReducer=function(e,t,n){return ze.current.useReducer(e,t,n)};W.useRef=function(e){return ze.current.useRef(e)};W.useState=function(e){return ze.current.useState(e)};W.useSyncExternalStore=function(e,t,n){return ze.current.useSyncExternalStore(e,t,n)};W.useTransition=function(){return ze.current.useTransition()};W.version="18.3.1";jp.exports=W;var y=jp.exports;const _=Sp(y),yv=tv({__proto__:null,default:_},[y]);/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.production.min.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var vv=y,xv=Symbol.for("react.element"),wv=Symbol.for("react.fragment"),kv=Object.prototype.hasOwnProperty,bv=vv.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Sv={key:!0,ref:!0,__self:!0,__source:!0};function Lp(e,t,n){var r,s={},i=null,o=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)kv.call(t,r)&&!Sv.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:xv,type:e,key:i,ref:o,props:s,_owner:bv.current}}Yo.Fragment=wv;Yo.jsx=Lp;Yo.jsxs=Lp;Np.exports=Yo;var u=Np.exports,Dp={exports:{}},nt={},Op={exports:{}},zp={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.min.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/(function(e){function t(P,R){var D=P.length;P.push(R);e:for(;0<D;){var J=D-1>>>1,B=P[J];if(0<s(B,R))P[J]=R,P[D]=B,D=J;else break e}}function n(P){return P.length===0?null:P[0]}function r(P){if(P.length===0)return null;var R=P[0],D=P.pop();if(D!==R){P[0]=D;e:for(var J=0,B=P.length,H=B>>>1;J<H;){var I=2*(J+1)-1,ce=P[I],Te=I+1,q=P[Te];if(0>s(ce,D))Te<B&&0>s(q,ce)?(P[J]=q,P[Te]=D,J=Te):(P[J]=ce,P[I]=D,J=I);else if(Te<B&&0>s(q,D))P[J]=q,P[Te]=D,J=Te;else break e}}return R}function s(P,R){var D=P.sortIndex-R.sortIndex;return D!==0?D:P.id-R.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],c=[],d=1,f=null,h=3,p=!1,w=!1,x=!1,b=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(P){for(var R=n(c);R!==null;){if(R.callback===null)r(c);else if(R.startTime<=P)r(c),R.sortIndex=R.expirationTime,t(l,R);else break;R=n(c)}}function S(P){if(x=!1,v(P),!w)if(n(l)!==null)w=!0,Ie(k);else{var R=n(c);R!==null&&$(S,R.startTime-P)}}function k(P,R){w=!1,x&&(x=!1,m(N),N=-1),p=!0;var D=h;try{for(v(R),f=n(l);f!==null&&(!(f.expirationTime>R)||P&&!z());){var J=f.callback;if(typeof J=="function"){f.callback=null,h=f.priorityLevel;var B=J(f.expirationTime<=R);R=e.unstable_now(),typeof B=="function"?f.callback=B:f===n(l)&&r(l),v(R)}else r(l);f=n(l)}if(f!==null)var H=!0;else{var I=n(c);I!==null&&$(S,I.startTime-R),H=!1}return H}finally{f=null,h=D,p=!1}}var C=!1,j=null,N=-1,M=5,A=-1;function z(){return!(e.unstable_now()-A<M)}function U(){if(j!==null){var P=e.unstable_now();A=P;var R=!0;try{R=j(!0,P)}finally{R?we():(C=!1,j=null)}}else C=!1}var we;if(typeof g=="function")we=function(){g(U)};else if(typeof MessageChannel<"u"){var Be=new MessageChannel,Tt=Be.port2;Be.port1.onmessage=U,we=function(){Tt.postMessage(null)}}else we=function(){b(U,0)};function Ie(P){j=P,C||(C=!0,we())}function $(P,R){N=b(function(){P(e.unstable_now())},R)}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(P){P.callback=null},e.unstable_continueExecution=function(){w||p||(w=!0,Ie(k))},e.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<P?Math.floor(1e3/P):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(P){switch(h){case 1:case 2:case 3:var R=3;break;default:R=h}var D=h;h=R;try{return P()}finally{h=D}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(P,R){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var D=h;h=P;try{return R()}finally{h=D}},e.unstable_scheduleCallback=function(P,R,D){var J=e.unstable_now();switch(typeof D=="object"&&D!==null?(D=D.delay,D=typeof D=="number"&&0<D?J+D:J):D=J,P){case 1:var B=-1;break;case 2:B=250;break;case 5:B=1073741823;break;case 4:B=1e4;break;default:B=5e3}return B=D+B,P={id:d++,callback:R,priorityLevel:P,startTime:D,expirationTime:B,sortIndex:-1},D>J?(P.sortIndex=D,t(c,P),n(l)===null&&P===n(c)&&(x?(m(N),N=-1):x=!0,$(S,D-J))):(P.sortIndex=B,t(l,P),w||p||(w=!0,Ie(k))),P},e.unstable_shouldYield=z,e.unstable_wrapCallback=function(P){var R=h;return function(){var D=h;h=R;try{return P.apply(this,arguments)}finally{h=D}}}})(zp);Op.exports=zp;var Nv=Op.exports;/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.min.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var jv=y,et=Nv;function T(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;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."}var Vp=new Set,Os={};function er(e,t){Lr(e,t),Lr(e+"Capture",t)}function Lr(e,t){for(Os[e]=t,e=0;e<t.length;e++)Vp.add(t[e])}var Kt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),gl=Object.prototype.hasOwnProperty,Cv=/^[: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]*$/,Rd={},_d={};function Ev(e){return gl.call(_d,e)?!0:gl.call(Rd,e)?!1:Cv.test(e)?_d[e]=!0:(Rd[e]=!0,!1)}function Tv(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Pv(e,t,n,r){if(t===null||typeof t>"u"||Tv(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ve(e,t,n,r,s,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var Ee={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ee[e]=new Ve(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ee[t]=new Ve(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ee[e]=new Ve(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ee[e]=new Ve(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ee[e]=new Ve(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ee[e]=new Ve(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ee[e]=new Ve(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ee[e]=new Ve(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ee[e]=new Ve(e,5,!1,e.toLowerCase(),null,!1,!1)});var Iu=/[\-:]([a-z])/g;function Fu(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Iu,Fu);Ee[t]=new Ve(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Iu,Fu);Ee[t]=new Ve(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Iu,Fu);Ee[t]=new Ve(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ee[e]=new Ve(e,1,!1,e.toLowerCase(),null,!1,!1)});Ee.xlinkHref=new Ve("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ee[e]=new Ve(e,1,!1,e.toLowerCase(),null,!0,!0)});function Uu(e,t,n,r){var s=Ee.hasOwnProperty(t)?Ee[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Pv(t,n,s,r)&&(n=null),r||s===null?Ev(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Xt=jv.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,wi=Symbol.for("react.element"),dr=Symbol.for("react.portal"),fr=Symbol.for("react.fragment"),$u=Symbol.for("react.strict_mode"),yl=Symbol.for("react.profiler"),Bp=Symbol.for("react.provider"),Ip=Symbol.for("react.context"),Wu=Symbol.for("react.forward_ref"),vl=Symbol.for("react.suspense"),xl=Symbol.for("react.suspense_list"),Hu=Symbol.for("react.memo"),on=Symbol.for("react.lazy"),Fp=Symbol.for("react.offscreen"),Ad=Symbol.iterator;function ns(e){return e===null||typeof e!="object"?null:(e=Ad&&e[Ad]||e["@@iterator"],typeof e=="function"?e:null)}var ue=Object.assign,Ca;function fs(e){if(Ca===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Ca=t&&t[1]||""}return`
|
|
34
|
+
`+Ca+e}var Ea=!1;function Ta(e,t){if(!e||Ea)return"";Ea=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var s=c.stack.split(`
|
|
35
|
+
`),i=r.stack.split(`
|
|
36
|
+
`),o=s.length-1,a=i.length-1;1<=o&&0<=a&&s[o]!==i[a];)a--;for(;1<=o&&0<=a;o--,a--)if(s[o]!==i[a]){if(o!==1||a!==1)do if(o--,a--,0>a||s[o]!==i[a]){var l=`
|
|
37
|
+
`+s[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{Ea=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?fs(e):""}function Rv(e){switch(e.tag){case 5:return fs(e.type);case 16:return fs("Lazy");case 13:return fs("Suspense");case 19:return fs("SuspenseList");case 0:case 2:case 15:return e=Ta(e.type,!1),e;case 11:return e=Ta(e.type.render,!1),e;case 1:return e=Ta(e.type,!0),e;default:return""}}function wl(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case fr:return"Fragment";case dr:return"Portal";case yl:return"Profiler";case $u:return"StrictMode";case vl:return"Suspense";case xl:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Ip:return(e.displayName||"Context")+".Consumer";case Bp:return(e._context.displayName||"Context")+".Provider";case Wu:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Hu:return t=e.displayName||null,t!==null?t:wl(e.type)||"Memo";case on:t=e._payload,e=e._init;try{return wl(e(t))}catch{}}return null}function _v(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return wl(t);case 8:return t===$u?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Sn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Up(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Av(e){var t=Up(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ki(e){e._valueTracker||(e._valueTracker=Av(e))}function $p(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Up(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function uo(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function kl(e,t){var n=t.checked;return ue({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Md(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Sn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Wp(e,t){t=t.checked,t!=null&&Uu(e,"checked",t,!1)}function bl(e,t){Wp(e,t);var n=Sn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Sl(e,t.type,n):t.hasOwnProperty("defaultValue")&&Sl(e,t.type,Sn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ld(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Sl(e,t,n){(t!=="number"||uo(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var hs=Array.isArray;function Tr(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Sn(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Nl(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(T(91));return ue({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Dd(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(T(92));if(hs(n)){if(1<n.length)throw Error(T(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Sn(n)}}function Hp(e,t){var n=Sn(t.value),r=Sn(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Od(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Kp(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function jl(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Kp(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var bi,Gp=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(bi=bi||document.createElement("div"),bi.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=bi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function zs(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ks={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Mv=["Webkit","ms","Moz","O"];Object.keys(ks).forEach(function(e){Mv.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ks[t]=ks[e]})});function Yp(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ks.hasOwnProperty(e)&&ks[e]?(""+t).trim():t+"px"}function qp(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=Yp(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var Lv=ue({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Cl(e,t){if(t){if(Lv[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(T(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(T(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(T(61))}if(t.style!=null&&typeof t.style!="object")throw Error(T(62))}}function El(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Tl=null;function Ku(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Pl=null,Pr=null,Rr=null;function zd(e){if(e=di(e)){if(typeof Pl!="function")throw Error(T(280));var t=e.stateNode;t&&(t=Zo(t),Pl(e.stateNode,e.type,t))}}function Qp(e){Pr?Rr?Rr.push(e):Rr=[e]:Pr=e}function Xp(){if(Pr){var e=Pr,t=Rr;if(Rr=Pr=null,zd(e),t)for(e=0;e<t.length;e++)zd(t[e])}}function Jp(e,t){return e(t)}function Zp(){}var Pa=!1;function em(e,t,n){if(Pa)return e(t,n);Pa=!0;try{return Jp(e,t,n)}finally{Pa=!1,(Pr!==null||Rr!==null)&&(Zp(),Xp())}}function Vs(e,t){var n=e.stateNode;if(n===null)return null;var r=Zo(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(T(231,t,typeof n));return n}var Rl=!1;if(Kt)try{var rs={};Object.defineProperty(rs,"passive",{get:function(){Rl=!0}}),window.addEventListener("test",rs,rs),window.removeEventListener("test",rs,rs)}catch{Rl=!1}function Dv(e,t,n,r,s,i,o,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(d){this.onError(d)}}var bs=!1,co=null,fo=!1,_l=null,Ov={onError:function(e){bs=!0,co=e}};function zv(e,t,n,r,s,i,o,a,l){bs=!1,co=null,Dv.apply(Ov,arguments)}function Vv(e,t,n,r,s,i,o,a,l){if(zv.apply(this,arguments),bs){if(bs){var c=co;bs=!1,co=null}else throw Error(T(198));fo||(fo=!0,_l=c)}}function tr(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 tm(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 Vd(e){if(tr(e)!==e)throw Error(T(188))}function Bv(e){var t=e.alternate;if(!t){if(t=tr(e),t===null)throw Error(T(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var i=s.alternate;if(i===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===n)return Vd(s),e;if(i===r)return Vd(s),t;i=i.sibling}throw Error(T(188))}if(n.return!==r.return)n=s,r=i;else{for(var o=!1,a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o){for(a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o)throw Error(T(189))}}if(n.alternate!==r)throw Error(T(190))}if(n.tag!==3)throw Error(T(188));return n.stateNode.current===n?e:t}function nm(e){return e=Bv(e),e!==null?rm(e):null}function rm(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=rm(e);if(t!==null)return t;e=e.sibling}return null}var sm=et.unstable_scheduleCallback,Bd=et.unstable_cancelCallback,Iv=et.unstable_shouldYield,Fv=et.unstable_requestPaint,pe=et.unstable_now,Uv=et.unstable_getCurrentPriorityLevel,Gu=et.unstable_ImmediatePriority,im=et.unstable_UserBlockingPriority,ho=et.unstable_NormalPriority,$v=et.unstable_LowPriority,om=et.unstable_IdlePriority,qo=null,Mt=null;function Wv(e){if(Mt&&typeof Mt.onCommitFiberRoot=="function")try{Mt.onCommitFiberRoot(qo,e,void 0,(e.current.flags&128)===128)}catch{}}var jt=Math.clz32?Math.clz32:Gv,Hv=Math.log,Kv=Math.LN2;function Gv(e){return e>>>=0,e===0?32:31-(Hv(e)/Kv|0)|0}var Si=64,Ni=4194304;function ps(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function po(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~s;a!==0?r=ps(a):(i&=o,i!==0&&(r=ps(i)))}else o=n&~s,o!==0?r=ps(o):i!==0&&(r=ps(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,i=t&-t,s>=i||s===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-jt(t),s=1<<n,r|=e[n],t&=~s;return r}function Yv(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function qv(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-jt(i),a=1<<o,l=s[o];l===-1?(!(a&n)||a&r)&&(s[o]=Yv(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}function Al(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function am(){var e=Si;return Si<<=1,!(Si&4194240)&&(Si=64),e}function Ra(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ui(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-jt(t),e[t]=n}function Qv(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-jt(n),i=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~i}}function Yu(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-jt(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var X=0;function lm(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var um,qu,cm,dm,fm,Ml=!1,ji=[],hn=null,pn=null,mn=null,Bs=new Map,Is=new Map,ln=[],Xv="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Id(e,t){switch(e){case"focusin":case"focusout":hn=null;break;case"dragenter":case"dragleave":pn=null;break;case"mouseover":case"mouseout":mn=null;break;case"pointerover":case"pointerout":Bs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Is.delete(t.pointerId)}}function ss(e,t,n,r,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[s]},t!==null&&(t=di(t),t!==null&&qu(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function Jv(e,t,n,r,s){switch(t){case"focusin":return hn=ss(hn,e,t,n,r,s),!0;case"dragenter":return pn=ss(pn,e,t,n,r,s),!0;case"mouseover":return mn=ss(mn,e,t,n,r,s),!0;case"pointerover":var i=s.pointerId;return Bs.set(i,ss(Bs.get(i)||null,e,t,n,r,s)),!0;case"gotpointercapture":return i=s.pointerId,Is.set(i,ss(Is.get(i)||null,e,t,n,r,s)),!0}return!1}function hm(e){var t=Un(e.target);if(t!==null){var n=tr(t);if(n!==null){if(t=n.tag,t===13){if(t=tm(n),t!==null){e.blockedOn=t,fm(e.priority,function(){cm(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 Ki(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ll(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Tl=r,n.target.dispatchEvent(r),Tl=null}else return t=di(n),t!==null&&qu(t),e.blockedOn=n,!1;t.shift()}return!0}function Fd(e,t,n){Ki(e)&&n.delete(t)}function Zv(){Ml=!1,hn!==null&&Ki(hn)&&(hn=null),pn!==null&&Ki(pn)&&(pn=null),mn!==null&&Ki(mn)&&(mn=null),Bs.forEach(Fd),Is.forEach(Fd)}function is(e,t){e.blockedOn===t&&(e.blockedOn=null,Ml||(Ml=!0,et.unstable_scheduleCallback(et.unstable_NormalPriority,Zv)))}function Fs(e){function t(s){return is(s,e)}if(0<ji.length){is(ji[0],e);for(var n=1;n<ji.length;n++){var r=ji[n];r.blockedOn===e&&(r.blockedOn=null)}}for(hn!==null&&is(hn,e),pn!==null&&is(pn,e),mn!==null&&is(mn,e),Bs.forEach(t),Is.forEach(t),n=0;n<ln.length;n++)r=ln[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<ln.length&&(n=ln[0],n.blockedOn===null);)hm(n),n.blockedOn===null&&ln.shift()}var _r=Xt.ReactCurrentBatchConfig,mo=!0;function ex(e,t,n,r){var s=X,i=_r.transition;_r.transition=null;try{X=1,Qu(e,t,n,r)}finally{X=s,_r.transition=i}}function tx(e,t,n,r){var s=X,i=_r.transition;_r.transition=null;try{X=4,Qu(e,t,n,r)}finally{X=s,_r.transition=i}}function Qu(e,t,n,r){if(mo){var s=Ll(e,t,n,r);if(s===null)Ia(e,t,r,go,n),Id(e,r);else if(Jv(s,e,t,n,r))r.stopPropagation();else if(Id(e,r),t&4&&-1<Xv.indexOf(e)){for(;s!==null;){var i=di(s);if(i!==null&&um(i),i=Ll(e,t,n,r),i===null&&Ia(e,t,r,go,n),i===s)break;s=i}s!==null&&r.stopPropagation()}else Ia(e,t,r,null,n)}}var go=null;function Ll(e,t,n,r){if(go=null,e=Ku(r),e=Un(e),e!==null)if(t=tr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=tm(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 go=e,null}function pm(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Uv()){case Gu:return 1;case im:return 4;case ho:case $v:return 16;case om:return 536870912;default:return 16}default:return 16}}var cn=null,Xu=null,Gi=null;function mm(){if(Gi)return Gi;var e,t=Xu,n=t.length,r,s="value"in cn?cn.value:cn.textContent,i=s.length;for(e=0;e<n&&t[e]===s[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===s[i-r];r++);return Gi=s.slice(e,1<r?1-r:void 0)}function Yi(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 Ci(){return!0}function Ud(){return!1}function rt(e){function t(n,r,s,i,o){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Ci:Ud,this.isPropagationStopped=Ud,this}return ue(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Ci)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ci)},persist:function(){},isPersistent:Ci}),t}var Hr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ju=rt(Hr),ci=ue({},Hr,{view:0,detail:0}),nx=rt(ci),_a,Aa,os,Qo=ue({},ci,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Zu,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!==os&&(os&&e.type==="mousemove"?(_a=e.screenX-os.screenX,Aa=e.screenY-os.screenY):Aa=_a=0,os=e),_a)},movementY:function(e){return"movementY"in e?e.movementY:Aa}}),$d=rt(Qo),rx=ue({},Qo,{dataTransfer:0}),sx=rt(rx),ix=ue({},ci,{relatedTarget:0}),Ma=rt(ix),ox=ue({},Hr,{animationName:0,elapsedTime:0,pseudoElement:0}),ax=rt(ox),lx=ue({},Hr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ux=rt(lx),cx=ue({},Hr,{data:0}),Wd=rt(cx),dx={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},fx={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"},hx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function px(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=hx[e])?!!t[e]:!1}function Zu(){return px}var mx=ue({},ci,{key:function(e){if(e.key){var t=dx[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Yi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?fx[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Zu,charCode:function(e){return e.type==="keypress"?Yi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Yi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),gx=rt(mx),yx=ue({},Qo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Hd=rt(yx),vx=ue({},ci,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Zu}),xx=rt(vx),wx=ue({},Hr,{propertyName:0,elapsedTime:0,pseudoElement:0}),kx=rt(wx),bx=ue({},Qo,{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}),Sx=rt(bx),Nx=[9,13,27,32],ec=Kt&&"CompositionEvent"in window,Ss=null;Kt&&"documentMode"in document&&(Ss=document.documentMode);var jx=Kt&&"TextEvent"in window&&!Ss,gm=Kt&&(!ec||Ss&&8<Ss&&11>=Ss),Kd=" ",Gd=!1;function ym(e,t){switch(e){case"keyup":return Nx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var hr=!1;function Cx(e,t){switch(e){case"compositionend":return vm(t);case"keypress":return t.which!==32?null:(Gd=!0,Kd);case"textInput":return e=t.data,e===Kd&&Gd?null:e;default:return null}}function Ex(e,t){if(hr)return e==="compositionend"||!ec&&ym(e,t)?(e=mm(),Gi=Xu=cn=null,hr=!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 gm&&t.locale!=="ko"?null:t.data;default:return null}}var Tx={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 Yd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Tx[e.type]:t==="textarea"}function xm(e,t,n,r){Qp(r),t=yo(t,"onChange"),0<t.length&&(n=new Ju("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Ns=null,Us=null;function Px(e){Rm(e,0)}function Xo(e){var t=gr(e);if($p(t))return e}function Rx(e,t){if(e==="change")return t}var wm=!1;if(Kt){var La;if(Kt){var Da="oninput"in document;if(!Da){var qd=document.createElement("div");qd.setAttribute("oninput","return;"),Da=typeof qd.oninput=="function"}La=Da}else La=!1;wm=La&&(!document.documentMode||9<document.documentMode)}function Qd(){Ns&&(Ns.detachEvent("onpropertychange",km),Us=Ns=null)}function km(e){if(e.propertyName==="value"&&Xo(Us)){var t=[];xm(t,Us,e,Ku(e)),em(Px,t)}}function _x(e,t,n){e==="focusin"?(Qd(),Ns=t,Us=n,Ns.attachEvent("onpropertychange",km)):e==="focusout"&&Qd()}function Ax(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Xo(Us)}function Mx(e,t){if(e==="click")return Xo(t)}function Lx(e,t){if(e==="input"||e==="change")return Xo(t)}function Dx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Et=typeof Object.is=="function"?Object.is:Dx;function $s(e,t){if(Et(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)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 s=n[r];if(!gl.call(t,s)||!Et(e[s],t[s]))return!1}return!0}function Xd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Jd(e,t){var n=Xd(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}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Xd(n)}}function bm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?bm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Sm(){for(var e=window,t=uo();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=uo(e.document)}return t}function tc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Ox(e){var t=Sm(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&bm(n.ownerDocument.documentElement,n)){if(r!==null&&tc(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!e.extend&&i>r&&(s=r,r=i,i=s),s=Jd(n,i);var o=Jd(n,r);s&&o&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var zx=Kt&&"documentMode"in document&&11>=document.documentMode,pr=null,Dl=null,js=null,Ol=!1;function Zd(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ol||pr==null||pr!==uo(r)||(r=pr,"selectionStart"in r&&tc(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}),js&&$s(js,r)||(js=r,r=yo(Dl,"onSelect"),0<r.length&&(t=new Ju("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=pr)))}function Ei(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var mr={animationend:Ei("Animation","AnimationEnd"),animationiteration:Ei("Animation","AnimationIteration"),animationstart:Ei("Animation","AnimationStart"),transitionend:Ei("Transition","TransitionEnd")},Oa={},Nm={};Kt&&(Nm=document.createElement("div").style,"AnimationEvent"in window||(delete mr.animationend.animation,delete mr.animationiteration.animation,delete mr.animationstart.animation),"TransitionEvent"in window||delete mr.transitionend.transition);function Jo(e){if(Oa[e])return Oa[e];if(!mr[e])return e;var t=mr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Nm)return Oa[e]=t[n];return e}var jm=Jo("animationend"),Cm=Jo("animationiteration"),Em=Jo("animationstart"),Tm=Jo("transitionend"),Pm=new Map,ef="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function En(e,t){Pm.set(e,t),er(t,[e])}for(var za=0;za<ef.length;za++){var Va=ef[za],Vx=Va.toLowerCase(),Bx=Va[0].toUpperCase()+Va.slice(1);En(Vx,"on"+Bx)}En(jm,"onAnimationEnd");En(Cm,"onAnimationIteration");En(Em,"onAnimationStart");En("dblclick","onDoubleClick");En("focusin","onFocus");En("focusout","onBlur");En(Tm,"onTransitionEnd");Lr("onMouseEnter",["mouseout","mouseover"]);Lr("onMouseLeave",["mouseout","mouseover"]);Lr("onPointerEnter",["pointerout","pointerover"]);Lr("onPointerLeave",["pointerout","pointerover"]);er("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));er("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));er("onBeforeInput",["compositionend","keypress","textInput","paste"]);er("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));er("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));er("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ms="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(" "),Ix=new Set("cancel close invalid load scroll toggle".split(" ").concat(ms));function tf(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Vv(r,t,void 0,e),e.currentTarget=null}function Rm(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==i&&s.isPropagationStopped())break e;tf(s,a,c),i=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,c=a.currentTarget,a=a.listener,l!==i&&s.isPropagationStopped())break e;tf(s,a,c),i=l}}}if(fo)throw e=_l,fo=!1,_l=null,e}function te(e,t){var n=t[Fl];n===void 0&&(n=t[Fl]=new Set);var r=e+"__bubble";n.has(r)||(_m(t,e,2,!1),n.add(r))}function Ba(e,t,n){var r=0;t&&(r|=4),_m(n,e,r,t)}var Ti="_reactListening"+Math.random().toString(36).slice(2);function Ws(e){if(!e[Ti]){e[Ti]=!0,Vp.forEach(function(n){n!=="selectionchange"&&(Ix.has(n)||Ba(n,!1,e),Ba(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ti]||(t[Ti]=!0,Ba("selectionchange",!1,t))}}function _m(e,t,n,r){switch(pm(t)){case 1:var s=ex;break;case 4:s=tx;break;default:s=Qu}n=s.bind(null,t,n,e),s=void 0,!Rl||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function Ia(e,t,n,r,s){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===s||a.nodeType===8&&a.parentNode===s)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===s||l.nodeType===8&&l.parentNode===s))return;o=o.return}for(;a!==null;){if(o=Un(a),o===null)return;if(l=o.tag,l===5||l===6){r=i=o;continue e}a=a.parentNode}}r=r.return}em(function(){var c=i,d=Ku(n),f=[];e:{var h=Pm.get(e);if(h!==void 0){var p=Ju,w=e;switch(e){case"keypress":if(Yi(n)===0)break e;case"keydown":case"keyup":p=gx;break;case"focusin":w="focus",p=Ma;break;case"focusout":w="blur",p=Ma;break;case"beforeblur":case"afterblur":p=Ma;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=$d;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=sx;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=xx;break;case jm:case Cm:case Em:p=ax;break;case Tm:p=kx;break;case"scroll":p=nx;break;case"wheel":p=Sx;break;case"copy":case"cut":case"paste":p=ux;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=Hd}var x=(t&4)!==0,b=!x&&e==="scroll",m=x?h!==null?h+"Capture":null:h;x=[];for(var g=c,v;g!==null;){v=g;var S=v.stateNode;if(v.tag===5&&S!==null&&(v=S,m!==null&&(S=Vs(g,m),S!=null&&x.push(Hs(g,S,v)))),b)break;g=g.return}0<x.length&&(h=new p(h,w,null,n,d),f.push({event:h,listeners:x}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",h&&n!==Tl&&(w=n.relatedTarget||n.fromElement)&&(Un(w)||w[Gt]))break e;if((p||h)&&(h=d.window===d?d:(h=d.ownerDocument)?h.defaultView||h.parentWindow:window,p?(w=n.relatedTarget||n.toElement,p=c,w=w?Un(w):null,w!==null&&(b=tr(w),w!==b||w.tag!==5&&w.tag!==6)&&(w=null)):(p=null,w=c),p!==w)){if(x=$d,S="onMouseLeave",m="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(x=Hd,S="onPointerLeave",m="onPointerEnter",g="pointer"),b=p==null?h:gr(p),v=w==null?h:gr(w),h=new x(S,g+"leave",p,n,d),h.target=b,h.relatedTarget=v,S=null,Un(d)===c&&(x=new x(m,g+"enter",w,n,d),x.target=v,x.relatedTarget=b,S=x),b=S,p&&w)t:{for(x=p,m=w,g=0,v=x;v;v=lr(v))g++;for(v=0,S=m;S;S=lr(S))v++;for(;0<g-v;)x=lr(x),g--;for(;0<v-g;)m=lr(m),v--;for(;g--;){if(x===m||m!==null&&x===m.alternate)break t;x=lr(x),m=lr(m)}x=null}else x=null;p!==null&&nf(f,h,p,x,!1),w!==null&&b!==null&&nf(f,b,w,x,!0)}}e:{if(h=c?gr(c):window,p=h.nodeName&&h.nodeName.toLowerCase(),p==="select"||p==="input"&&h.type==="file")var k=Rx;else if(Yd(h))if(wm)k=Lx;else{k=Ax;var C=_x}else(p=h.nodeName)&&p.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(k=Mx);if(k&&(k=k(e,c))){xm(f,k,n,d);break e}C&&C(e,h,c),e==="focusout"&&(C=h._wrapperState)&&C.controlled&&h.type==="number"&&Sl(h,"number",h.value)}switch(C=c?gr(c):window,e){case"focusin":(Yd(C)||C.contentEditable==="true")&&(pr=C,Dl=c,js=null);break;case"focusout":js=Dl=pr=null;break;case"mousedown":Ol=!0;break;case"contextmenu":case"mouseup":case"dragend":Ol=!1,Zd(f,n,d);break;case"selectionchange":if(zx)break;case"keydown":case"keyup":Zd(f,n,d)}var j;if(ec)e:{switch(e){case"compositionstart":var N="onCompositionStart";break e;case"compositionend":N="onCompositionEnd";break e;case"compositionupdate":N="onCompositionUpdate";break e}N=void 0}else hr?ym(e,n)&&(N="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(N="onCompositionStart");N&&(gm&&n.locale!=="ko"&&(hr||N!=="onCompositionStart"?N==="onCompositionEnd"&&hr&&(j=mm()):(cn=d,Xu="value"in cn?cn.value:cn.textContent,hr=!0)),C=yo(c,N),0<C.length&&(N=new Wd(N,e,null,n,d),f.push({event:N,listeners:C}),j?N.data=j:(j=vm(n),j!==null&&(N.data=j)))),(j=jx?Cx(e,n):Ex(e,n))&&(c=yo(c,"onBeforeInput"),0<c.length&&(d=new Wd("onBeforeInput","beforeinput",null,n,d),f.push({event:d,listeners:c}),d.data=j))}Rm(f,t)})}function Hs(e,t,n){return{instance:e,listener:t,currentTarget:n}}function yo(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=Vs(e,n),i!=null&&r.unshift(Hs(e,i,s)),i=Vs(e,t),i!=null&&r.push(Hs(e,i,s))),e=e.return}return r}function lr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function nf(e,t,n,r,s){for(var i=t._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&c!==null&&(a=c,s?(l=Vs(n,i),l!=null&&o.unshift(Hs(n,l,a))):s||(l=Vs(n,i),l!=null&&o.push(Hs(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Fx=/\r\n?/g,Ux=/\u0000|\uFFFD/g;function rf(e){return(typeof e=="string"?e:""+e).replace(Fx,`
|
|
38
|
+
`).replace(Ux,"")}function Pi(e,t,n){if(t=rf(t),rf(e)!==t&&n)throw Error(T(425))}function vo(){}var zl=null,Vl=null;function Bl(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Il=typeof setTimeout=="function"?setTimeout:void 0,$x=typeof clearTimeout=="function"?clearTimeout:void 0,sf=typeof Promise=="function"?Promise:void 0,Wx=typeof queueMicrotask=="function"?queueMicrotask:typeof sf<"u"?function(e){return sf.resolve(null).then(e).catch(Hx)}:Il;function Hx(e){setTimeout(function(){throw e})}function Fa(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),Fs(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);Fs(t)}function gn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function of(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Kr=Math.random().toString(36).slice(2),At="__reactFiber$"+Kr,Ks="__reactProps$"+Kr,Gt="__reactContainer$"+Kr,Fl="__reactEvents$"+Kr,Kx="__reactListeners$"+Kr,Gx="__reactHandles$"+Kr;function Un(e){var t=e[At];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Gt]||n[At]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=of(e);e!==null;){if(n=e[At])return n;e=of(e)}return t}e=n,n=e.parentNode}return null}function di(e){return e=e[At]||e[Gt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function gr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(T(33))}function Zo(e){return e[Ks]||null}var Ul=[],yr=-1;function Tn(e){return{current:e}}function ne(e){0>yr||(e.current=Ul[yr],Ul[yr]=null,yr--)}function ee(e,t){yr++,Ul[yr]=e.current,e.current=t}var Nn={},Le=Tn(Nn),He=Tn(!1),qn=Nn;function Dr(e,t){var n=e.type.contextTypes;if(!n)return Nn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Ke(e){return e=e.childContextTypes,e!=null}function xo(){ne(He),ne(Le)}function af(e,t,n){if(Le.current!==Nn)throw Error(T(168));ee(Le,t),ee(He,n)}function Am(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(T(108,_v(e)||"Unknown",s));return ue({},n,r)}function wo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Nn,qn=Le.current,ee(Le,e),ee(He,He.current),!0}function lf(e,t,n){var r=e.stateNode;if(!r)throw Error(T(169));n?(e=Am(e,t,qn),r.__reactInternalMemoizedMergedChildContext=e,ne(He),ne(Le),ee(Le,e)):ne(He),ee(He,n)}var It=null,ea=!1,Ua=!1;function Mm(e){It===null?It=[e]:It.push(e)}function Yx(e){ea=!0,Mm(e)}function Pn(){if(!Ua&&It!==null){Ua=!0;var e=0,t=X;try{var n=It;for(X=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}It=null,ea=!1}catch(s){throw It!==null&&(It=It.slice(e+1)),sm(Gu,Pn),s}finally{X=t,Ua=!1}}return null}var vr=[],xr=0,ko=null,bo=0,at=[],lt=0,Qn=null,Ft=1,Ut="";function zn(e,t){vr[xr++]=bo,vr[xr++]=ko,ko=e,bo=t}function Lm(e,t,n){at[lt++]=Ft,at[lt++]=Ut,at[lt++]=Qn,Qn=e;var r=Ft;e=Ut;var s=32-jt(r)-1;r&=~(1<<s),n+=1;var i=32-jt(t)+s;if(30<i){var o=s-s%5;i=(r&(1<<o)-1).toString(32),r>>=o,s-=o,Ft=1<<32-jt(t)+s|n<<s|r,Ut=i+e}else Ft=1<<i|n<<s|r,Ut=e}function nc(e){e.return!==null&&(zn(e,1),Lm(e,1,0))}function rc(e){for(;e===ko;)ko=vr[--xr],vr[xr]=null,bo=vr[--xr],vr[xr]=null;for(;e===Qn;)Qn=at[--lt],at[lt]=null,Ut=at[--lt],at[lt]=null,Ft=at[--lt],at[lt]=null}var Je=null,Xe=null,ie=!1,St=null;function Dm(e,t){var n=ct(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function uf(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Je=e,Xe=gn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Je=e,Xe=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Qn!==null?{id:Ft,overflow:Ut}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=ct(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Je=e,Xe=null,!0):!1;default:return!1}}function $l(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Wl(e){if(ie){var t=Xe;if(t){var n=t;if(!uf(e,t)){if($l(e))throw Error(T(418));t=gn(n.nextSibling);var r=Je;t&&uf(e,t)?Dm(r,n):(e.flags=e.flags&-4097|2,ie=!1,Je=e)}}else{if($l(e))throw Error(T(418));e.flags=e.flags&-4097|2,ie=!1,Je=e}}}function cf(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Je=e}function Ri(e){if(e!==Je)return!1;if(!ie)return cf(e),ie=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Bl(e.type,e.memoizedProps)),t&&(t=Xe)){if($l(e))throw Om(),Error(T(418));for(;t;)Dm(e,t),t=gn(t.nextSibling)}if(cf(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(T(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Xe=gn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Xe=null}}else Xe=Je?gn(e.stateNode.nextSibling):null;return!0}function Om(){for(var e=Xe;e;)e=gn(e.nextSibling)}function Or(){Xe=Je=null,ie=!1}function sc(e){St===null?St=[e]:St.push(e)}var qx=Xt.ReactCurrentBatchConfig;function as(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(T(309));var r=n.stateNode}if(!r)throw Error(T(147,e));var s=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(o){var a=s.refs;o===null?delete a[i]:a[i]=o},t._stringRef=i,t)}if(typeof e!="string")throw Error(T(284));if(!n._owner)throw Error(T(290,e))}return e}function _i(e,t){throw e=Object.prototype.toString.call(t),Error(T(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function df(e){var t=e._init;return t(e._payload)}function zm(e){function t(m,g){if(e){var v=m.deletions;v===null?(m.deletions=[g],m.flags|=16):v.push(g)}}function n(m,g){if(!e)return null;for(;g!==null;)t(m,g),g=g.sibling;return null}function r(m,g){for(m=new Map;g!==null;)g.key!==null?m.set(g.key,g):m.set(g.index,g),g=g.sibling;return m}function s(m,g){return m=wn(m,g),m.index=0,m.sibling=null,m}function i(m,g,v){return m.index=v,e?(v=m.alternate,v!==null?(v=v.index,v<g?(m.flags|=2,g):v):(m.flags|=2,g)):(m.flags|=1048576,g)}function o(m){return e&&m.alternate===null&&(m.flags|=2),m}function a(m,g,v,S){return g===null||g.tag!==6?(g=qa(v,m.mode,S),g.return=m,g):(g=s(g,v),g.return=m,g)}function l(m,g,v,S){var k=v.type;return k===fr?d(m,g,v.props.children,S,v.key):g!==null&&(g.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===on&&df(k)===g.type)?(S=s(g,v.props),S.ref=as(m,g,v),S.return=m,S):(S=to(v.type,v.key,v.props,null,m.mode,S),S.ref=as(m,g,v),S.return=m,S)}function c(m,g,v,S){return g===null||g.tag!==4||g.stateNode.containerInfo!==v.containerInfo||g.stateNode.implementation!==v.implementation?(g=Qa(v,m.mode,S),g.return=m,g):(g=s(g,v.children||[]),g.return=m,g)}function d(m,g,v,S,k){return g===null||g.tag!==7?(g=Gn(v,m.mode,S,k),g.return=m,g):(g=s(g,v),g.return=m,g)}function f(m,g,v){if(typeof g=="string"&&g!==""||typeof g=="number")return g=qa(""+g,m.mode,v),g.return=m,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case wi:return v=to(g.type,g.key,g.props,null,m.mode,v),v.ref=as(m,null,g),v.return=m,v;case dr:return g=Qa(g,m.mode,v),g.return=m,g;case on:var S=g._init;return f(m,S(g._payload),v)}if(hs(g)||ns(g))return g=Gn(g,m.mode,v,null),g.return=m,g;_i(m,g)}return null}function h(m,g,v,S){var k=g!==null?g.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return k!==null?null:a(m,g,""+v,S);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case wi:return v.key===k?l(m,g,v,S):null;case dr:return v.key===k?c(m,g,v,S):null;case on:return k=v._init,h(m,g,k(v._payload),S)}if(hs(v)||ns(v))return k!==null?null:d(m,g,v,S,null);_i(m,v)}return null}function p(m,g,v,S,k){if(typeof S=="string"&&S!==""||typeof S=="number")return m=m.get(v)||null,a(g,m,""+S,k);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case wi:return m=m.get(S.key===null?v:S.key)||null,l(g,m,S,k);case dr:return m=m.get(S.key===null?v:S.key)||null,c(g,m,S,k);case on:var C=S._init;return p(m,g,v,C(S._payload),k)}if(hs(S)||ns(S))return m=m.get(v)||null,d(g,m,S,k,null);_i(g,S)}return null}function w(m,g,v,S){for(var k=null,C=null,j=g,N=g=0,M=null;j!==null&&N<v.length;N++){j.index>N?(M=j,j=null):M=j.sibling;var A=h(m,j,v[N],S);if(A===null){j===null&&(j=M);break}e&&j&&A.alternate===null&&t(m,j),g=i(A,g,N),C===null?k=A:C.sibling=A,C=A,j=M}if(N===v.length)return n(m,j),ie&&zn(m,N),k;if(j===null){for(;N<v.length;N++)j=f(m,v[N],S),j!==null&&(g=i(j,g,N),C===null?k=j:C.sibling=j,C=j);return ie&&zn(m,N),k}for(j=r(m,j);N<v.length;N++)M=p(j,m,N,v[N],S),M!==null&&(e&&M.alternate!==null&&j.delete(M.key===null?N:M.key),g=i(M,g,N),C===null?k=M:C.sibling=M,C=M);return e&&j.forEach(function(z){return t(m,z)}),ie&&zn(m,N),k}function x(m,g,v,S){var k=ns(v);if(typeof k!="function")throw Error(T(150));if(v=k.call(v),v==null)throw Error(T(151));for(var C=k=null,j=g,N=g=0,M=null,A=v.next();j!==null&&!A.done;N++,A=v.next()){j.index>N?(M=j,j=null):M=j.sibling;var z=h(m,j,A.value,S);if(z===null){j===null&&(j=M);break}e&&j&&z.alternate===null&&t(m,j),g=i(z,g,N),C===null?k=z:C.sibling=z,C=z,j=M}if(A.done)return n(m,j),ie&&zn(m,N),k;if(j===null){for(;!A.done;N++,A=v.next())A=f(m,A.value,S),A!==null&&(g=i(A,g,N),C===null?k=A:C.sibling=A,C=A);return ie&&zn(m,N),k}for(j=r(m,j);!A.done;N++,A=v.next())A=p(j,m,N,A.value,S),A!==null&&(e&&A.alternate!==null&&j.delete(A.key===null?N:A.key),g=i(A,g,N),C===null?k=A:C.sibling=A,C=A);return e&&j.forEach(function(U){return t(m,U)}),ie&&zn(m,N),k}function b(m,g,v,S){if(typeof v=="object"&&v!==null&&v.type===fr&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case wi:e:{for(var k=v.key,C=g;C!==null;){if(C.key===k){if(k=v.type,k===fr){if(C.tag===7){n(m,C.sibling),g=s(C,v.props.children),g.return=m,m=g;break e}}else if(C.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===on&&df(k)===C.type){n(m,C.sibling),g=s(C,v.props),g.ref=as(m,C,v),g.return=m,m=g;break e}n(m,C);break}else t(m,C);C=C.sibling}v.type===fr?(g=Gn(v.props.children,m.mode,S,v.key),g.return=m,m=g):(S=to(v.type,v.key,v.props,null,m.mode,S),S.ref=as(m,g,v),S.return=m,m=S)}return o(m);case dr:e:{for(C=v.key;g!==null;){if(g.key===C)if(g.tag===4&&g.stateNode.containerInfo===v.containerInfo&&g.stateNode.implementation===v.implementation){n(m,g.sibling),g=s(g,v.children||[]),g.return=m,m=g;break e}else{n(m,g);break}else t(m,g);g=g.sibling}g=Qa(v,m.mode,S),g.return=m,m=g}return o(m);case on:return C=v._init,b(m,g,C(v._payload),S)}if(hs(v))return w(m,g,v,S);if(ns(v))return x(m,g,v,S);_i(m,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,g!==null&&g.tag===6?(n(m,g.sibling),g=s(g,v),g.return=m,m=g):(n(m,g),g=qa(v,m.mode,S),g.return=m,m=g),o(m)):n(m,g)}return b}var zr=zm(!0),Vm=zm(!1),So=Tn(null),No=null,wr=null,ic=null;function oc(){ic=wr=No=null}function ac(e){var t=So.current;ne(So),e._currentValue=t}function Hl(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Ar(e,t){No=e,ic=wr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&($e=!0),e.firstContext=null)}function ft(e){var t=e._currentValue;if(ic!==e)if(e={context:e,memoizedValue:t,next:null},wr===null){if(No===null)throw Error(T(308));wr=e,No.dependencies={lanes:0,firstContext:e}}else wr=wr.next=e;return t}var $n=null;function lc(e){$n===null?$n=[e]:$n.push(e)}function Bm(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,lc(t)):(n.next=s.next,s.next=n),t.interleaved=n,Yt(e,r)}function Yt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var an=!1;function uc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Im(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function $t(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function yn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,G&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,Yt(e,n)}return s=r.interleaved,s===null?(t.next=t,lc(r)):(t.next=s.next,s.next=t),r.interleaved=t,Yt(e,n)}function qi(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Yu(e,n)}}function ff(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?s=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?s=i=t:i=i.next=t}else s=i=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function jo(e,t,n,r){var s=e.updateQueue;an=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?i=c:o.next=c,o=l;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==o&&(a===null?d.firstBaseUpdate=c:a.next=c,d.lastBaseUpdate=l))}if(i!==null){var f=s.baseState;o=0,d=c=l=null,a=i;do{var h=a.lane,p=a.eventTime;if((r&h)===h){d!==null&&(d=d.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var w=e,x=a;switch(h=t,p=n,x.tag){case 1:if(w=x.payload,typeof w=="function"){f=w.call(p,f,h);break e}f=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=x.payload,h=typeof w=="function"?w.call(p,f,h):w,h==null)break e;f=ue({},f,h);break e;case 2:an=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,h=s.effects,h===null?s.effects=[a]:h.push(a))}else p={eventTime:p,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(c=d=p,l=f):d=d.next=p,o|=h;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;h=a,a=h.next,h.next=null,s.lastBaseUpdate=h,s.shared.pending=null}}while(!0);if(d===null&&(l=f),s.baseState=l,s.firstBaseUpdate=c,s.lastBaseUpdate=d,t=s.shared.interleaved,t!==null){s=t;do o|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);Jn|=o,e.lanes=o,e.memoizedState=f}}function hf(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(T(191,s));s.call(r)}}}var fi={},Lt=Tn(fi),Gs=Tn(fi),Ys=Tn(fi);function Wn(e){if(e===fi)throw Error(T(174));return e}function cc(e,t){switch(ee(Ys,t),ee(Gs,e),ee(Lt,fi),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:jl(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=jl(t,e)}ne(Lt),ee(Lt,t)}function Vr(){ne(Lt),ne(Gs),ne(Ys)}function Fm(e){Wn(Ys.current);var t=Wn(Lt.current),n=jl(t,e.type);t!==n&&(ee(Gs,e),ee(Lt,n))}function dc(e){Gs.current===e&&(ne(Lt),ne(Gs))}var oe=Tn(0);function Co(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){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 $a=[];function fc(){for(var e=0;e<$a.length;e++)$a[e]._workInProgressVersionPrimary=null;$a.length=0}var Qi=Xt.ReactCurrentDispatcher,Wa=Xt.ReactCurrentBatchConfig,Xn=0,le=null,ve=null,ke=null,Eo=!1,Cs=!1,qs=0,Qx=0;function Pe(){throw Error(T(321))}function hc(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Et(e[n],t[n]))return!1;return!0}function pc(e,t,n,r,s,i){if(Xn=i,le=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Qi.current=e===null||e.memoizedState===null?e1:t1,e=n(r,s),Cs){i=0;do{if(Cs=!1,qs=0,25<=i)throw Error(T(301));i+=1,ke=ve=null,t.updateQueue=null,Qi.current=n1,e=n(r,s)}while(Cs)}if(Qi.current=To,t=ve!==null&&ve.next!==null,Xn=0,ke=ve=le=null,Eo=!1,t)throw Error(T(300));return e}function mc(){var e=qs!==0;return qs=0,e}function _t(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ke===null?le.memoizedState=ke=e:ke=ke.next=e,ke}function ht(){if(ve===null){var e=le.alternate;e=e!==null?e.memoizedState:null}else e=ve.next;var t=ke===null?le.memoizedState:ke.next;if(t!==null)ke=t,ve=e;else{if(e===null)throw Error(T(310));ve=e,e={memoizedState:ve.memoizedState,baseState:ve.baseState,baseQueue:ve.baseQueue,queue:ve.queue,next:null},ke===null?le.memoizedState=ke=e:ke=ke.next=e}return ke}function Qs(e,t){return typeof t=="function"?t(e):t}function Ha(e){var t=ht(),n=t.queue;if(n===null)throw Error(T(311));n.lastRenderedReducer=e;var r=ve,s=r.baseQueue,i=n.pending;if(i!==null){if(s!==null){var o=s.next;s.next=i.next,i.next=o}r.baseQueue=s=i,n.pending=null}if(s!==null){i=s.next,r=r.baseState;var a=o=null,l=null,c=i;do{var d=c.lane;if((Xn&d)===d)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var f={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=f,o=r):l=l.next=f,le.lanes|=d,Jn|=d}c=c.next}while(c!==null&&c!==i);l===null?o=r:l.next=a,Et(r,t.memoizedState)||($e=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do i=s.lane,le.lanes|=i,Jn|=i,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ka(e){var t=ht(),n=t.queue;if(n===null)throw Error(T(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,i=t.memoizedState;if(s!==null){n.pending=null;var o=s=s.next;do i=e(i,o.action),o=o.next;while(o!==s);Et(i,t.memoizedState)||($e=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function Um(){}function $m(e,t){var n=le,r=ht(),s=t(),i=!Et(r.memoizedState,s);if(i&&(r.memoizedState=s,$e=!0),r=r.queue,gc(Km.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||ke!==null&&ke.memoizedState.tag&1){if(n.flags|=2048,Xs(9,Hm.bind(null,n,r,s,t),void 0,null),Se===null)throw Error(T(349));Xn&30||Wm(n,t,s)}return s}function Wm(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=le.updateQueue,t===null?(t={lastEffect:null,stores:null},le.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Hm(e,t,n,r){t.value=n,t.getSnapshot=r,Gm(t)&&Ym(e)}function Km(e,t,n){return n(function(){Gm(t)&&Ym(e)})}function Gm(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Et(e,n)}catch{return!0}}function Ym(e){var t=Yt(e,1);t!==null&&Ct(t,e,1,-1)}function pf(e){var t=_t();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Qs,lastRenderedState:e},t.queue=e,e=e.dispatch=Zx.bind(null,le,e),[t.memoizedState,e]}function Xs(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=le.updateQueue,t===null?(t={lastEffect:null,stores:null},le.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function qm(){return ht().memoizedState}function Xi(e,t,n,r){var s=_t();le.flags|=e,s.memoizedState=Xs(1|t,n,void 0,r===void 0?null:r)}function ta(e,t,n,r){var s=ht();r=r===void 0?null:r;var i=void 0;if(ve!==null){var o=ve.memoizedState;if(i=o.destroy,r!==null&&hc(r,o.deps)){s.memoizedState=Xs(t,n,i,r);return}}le.flags|=e,s.memoizedState=Xs(1|t,n,i,r)}function mf(e,t){return Xi(8390656,8,e,t)}function gc(e,t){return ta(2048,8,e,t)}function Qm(e,t){return ta(4,2,e,t)}function Xm(e,t){return ta(4,4,e,t)}function Jm(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Zm(e,t,n){return n=n!=null?n.concat([e]):null,ta(4,4,Jm.bind(null,t,e),n)}function yc(){}function e0(e,t){var n=ht();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&hc(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function t0(e,t){var n=ht();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&hc(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function n0(e,t,n){return Xn&21?(Et(n,t)||(n=am(),le.lanes|=n,Jn|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,$e=!0),e.memoizedState=n)}function Xx(e,t){var n=X;X=n!==0&&4>n?n:4,e(!0);var r=Wa.transition;Wa.transition={};try{e(!1),t()}finally{X=n,Wa.transition=r}}function r0(){return ht().memoizedState}function Jx(e,t,n){var r=xn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},s0(e))i0(t,n);else if(n=Bm(e,t,n,r),n!==null){var s=Oe();Ct(n,e,r,s),o0(n,t,r)}}function Zx(e,t,n){var r=xn(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(s0(e))i0(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,a=i(o,n);if(s.hasEagerState=!0,s.eagerState=a,Et(a,o)){var l=t.interleaved;l===null?(s.next=s,lc(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}n=Bm(e,t,s,r),n!==null&&(s=Oe(),Ct(n,e,r,s),o0(n,t,r))}}function s0(e){var t=e.alternate;return e===le||t!==null&&t===le}function i0(e,t){Cs=Eo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function o0(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Yu(e,n)}}var To={readContext:ft,useCallback:Pe,useContext:Pe,useEffect:Pe,useImperativeHandle:Pe,useInsertionEffect:Pe,useLayoutEffect:Pe,useMemo:Pe,useReducer:Pe,useRef:Pe,useState:Pe,useDebugValue:Pe,useDeferredValue:Pe,useTransition:Pe,useMutableSource:Pe,useSyncExternalStore:Pe,useId:Pe,unstable_isNewReconciler:!1},e1={readContext:ft,useCallback:function(e,t){return _t().memoizedState=[e,t===void 0?null:t],e},useContext:ft,useEffect:mf,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Xi(4194308,4,Jm.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Xi(4194308,4,e,t)},useInsertionEffect:function(e,t){return Xi(4,2,e,t)},useMemo:function(e,t){var n=_t();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=_t();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Jx.bind(null,le,e),[r.memoizedState,e]},useRef:function(e){var t=_t();return e={current:e},t.memoizedState=e},useState:pf,useDebugValue:yc,useDeferredValue:function(e){return _t().memoizedState=e},useTransition:function(){var e=pf(!1),t=e[0];return e=Xx.bind(null,e[1]),_t().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=le,s=_t();if(ie){if(n===void 0)throw Error(T(407));n=n()}else{if(n=t(),Se===null)throw Error(T(349));Xn&30||Wm(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,mf(Km.bind(null,r,i,e),[e]),r.flags|=2048,Xs(9,Hm.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=_t(),t=Se.identifierPrefix;if(ie){var n=Ut,r=Ft;n=(r&~(1<<32-jt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=qs++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Qx++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},t1={readContext:ft,useCallback:e0,useContext:ft,useEffect:gc,useImperativeHandle:Zm,useInsertionEffect:Qm,useLayoutEffect:Xm,useMemo:t0,useReducer:Ha,useRef:qm,useState:function(){return Ha(Qs)},useDebugValue:yc,useDeferredValue:function(e){var t=ht();return n0(t,ve.memoizedState,e)},useTransition:function(){var e=Ha(Qs)[0],t=ht().memoizedState;return[e,t]},useMutableSource:Um,useSyncExternalStore:$m,useId:r0,unstable_isNewReconciler:!1},n1={readContext:ft,useCallback:e0,useContext:ft,useEffect:gc,useImperativeHandle:Zm,useInsertionEffect:Qm,useLayoutEffect:Xm,useMemo:t0,useReducer:Ka,useRef:qm,useState:function(){return Ka(Qs)},useDebugValue:yc,useDeferredValue:function(e){var t=ht();return ve===null?t.memoizedState=e:n0(t,ve.memoizedState,e)},useTransition:function(){var e=Ka(Qs)[0],t=ht().memoizedState;return[e,t]},useMutableSource:Um,useSyncExternalStore:$m,useId:r0,unstable_isNewReconciler:!1};function wt(e,t){if(e&&e.defaultProps){t=ue({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Kl(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ue({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var na={isMounted:function(e){return(e=e._reactInternals)?tr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Oe(),s=xn(e),i=$t(r,s);i.payload=t,n!=null&&(i.callback=n),t=yn(e,i,s),t!==null&&(Ct(t,e,s,r),qi(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Oe(),s=xn(e),i=$t(r,s);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=yn(e,i,s),t!==null&&(Ct(t,e,s,r),qi(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Oe(),r=xn(e),s=$t(n,r);s.tag=2,t!=null&&(s.callback=t),t=yn(e,s,r),t!==null&&(Ct(t,e,r,n),qi(t,e,r))}};function gf(e,t,n,r,s,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,o):t.prototype&&t.prototype.isPureReactComponent?!$s(n,r)||!$s(s,i):!0}function a0(e,t,n){var r=!1,s=Nn,i=t.contextType;return typeof i=="object"&&i!==null?i=ft(i):(s=Ke(t)?qn:Le.current,r=t.contextTypes,i=(r=r!=null)?Dr(e,s):Nn),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=na,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function yf(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&&na.enqueueReplaceState(t,t.state,null)}function Gl(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},uc(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=ft(i):(i=Ke(t)?qn:Le.current,s.context=Dr(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Kl(e,t,i,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&na.enqueueReplaceState(s,s.state,null),jo(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Br(e,t){try{var n="",r=t;do n+=Rv(r),r=r.return;while(r);var s=n}catch(i){s=`
|
|
39
|
+
Error generating stack: `+i.message+`
|
|
40
|
+
`+i.stack}return{value:e,source:t,stack:s,digest:null}}function Ga(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Yl(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var r1=typeof WeakMap=="function"?WeakMap:Map;function l0(e,t,n){n=$t(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ro||(Ro=!0,su=r),Yl(e,t)},n}function u0(e,t,n){n=$t(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){Yl(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){Yl(e,t),typeof r!="function"&&(vn===null?vn=new Set([this]):vn.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function vf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new r1;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=y1.bind(null,e,t,n),t.then(e,e))}function xf(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function wf(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=$t(-1,1),t.tag=2,yn(n,t,1))),n.lanes|=1),e)}var s1=Xt.ReactCurrentOwner,$e=!1;function De(e,t,n,r){t.child=e===null?Vm(t,null,n,r):zr(t,e.child,n,r)}function kf(e,t,n,r,s){n=n.render;var i=t.ref;return Ar(t,s),r=pc(e,t,n,r,i,s),n=mc(),e!==null&&!$e?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,qt(e,t,s)):(ie&&n&&nc(t),t.flags|=1,De(e,t,r,s),t.child)}function bf(e,t,n,r,s){if(e===null){var i=n.type;return typeof i=="function"&&!jc(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,c0(e,t,i,r,s)):(e=to(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&s)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:$s,n(o,r)&&e.ref===t.ref)return qt(e,t,s)}return t.flags|=1,e=wn(i,r),e.ref=t.ref,e.return=t,t.child=e}function c0(e,t,n,r,s){if(e!==null){var i=e.memoizedProps;if($s(i,r)&&e.ref===t.ref)if($e=!1,t.pendingProps=r=i,(e.lanes&s)!==0)e.flags&131072&&($e=!0);else return t.lanes=e.lanes,qt(e,t,s)}return ql(e,t,n,r,s)}function d0(e,t,n){var r=t.pendingProps,s=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ee(br,qe),qe|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ee(br,qe),qe|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,ee(br,qe),qe|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,ee(br,qe),qe|=r;return De(e,t,s,n),t.child}function f0(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function ql(e,t,n,r,s){var i=Ke(n)?qn:Le.current;return i=Dr(t,i),Ar(t,s),n=pc(e,t,n,r,i,s),r=mc(),e!==null&&!$e?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,qt(e,t,s)):(ie&&r&&nc(t),t.flags|=1,De(e,t,n,s),t.child)}function Sf(e,t,n,r,s){if(Ke(n)){var i=!0;wo(t)}else i=!1;if(Ar(t,s),t.stateNode===null)Ji(e,t),a0(t,n,r),Gl(t,n,r,s),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,c=n.contextType;typeof c=="object"&&c!==null?c=ft(c):(c=Ke(n)?qn:Le.current,c=Dr(t,c));var d=n.getDerivedStateFromProps,f=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==c)&&yf(t,o,r,c),an=!1;var h=t.memoizedState;o.state=h,jo(t,r,o,s),l=t.memoizedState,a!==r||h!==l||He.current||an?(typeof d=="function"&&(Kl(t,n,d,r),l=t.memoizedState),(a=an||gf(t,n,a,r,h,l,c))?(f||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=c,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,Im(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:wt(t.type,a),o.props=c,f=t.pendingProps,h=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=ft(l):(l=Ke(n)?qn:Le.current,l=Dr(t,l));var p=n.getDerivedStateFromProps;(d=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==f||h!==l)&&yf(t,o,r,l),an=!1,h=t.memoizedState,o.state=h,jo(t,r,o,s);var w=t.memoizedState;a!==f||h!==w||He.current||an?(typeof p=="function"&&(Kl(t,n,p,r),w=t.memoizedState),(c=an||gf(t,n,c,r,h,w,l)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,w,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,w,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=w),o.props=r,o.state=w,o.context=l,r=c):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Ql(e,t,n,r,i,s)}function Ql(e,t,n,r,s,i){f0(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return s&&lf(t,n,!1),qt(e,t,i);r=t.stateNode,s1.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=zr(t,e.child,null,i),t.child=zr(t,null,a,i)):De(e,t,a,i),t.memoizedState=r.state,s&&lf(t,n,!0),t.child}function h0(e){var t=e.stateNode;t.pendingContext?af(e,t.pendingContext,t.pendingContext!==t.context):t.context&&af(e,t.context,!1),cc(e,t.containerInfo)}function Nf(e,t,n,r,s){return Or(),sc(s),t.flags|=256,De(e,t,n,r),t.child}var Xl={dehydrated:null,treeContext:null,retryLane:0};function Jl(e){return{baseLanes:e,cachePool:null,transitions:null}}function p0(e,t,n){var r=t.pendingProps,s=oe.current,i=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(s&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),ee(oe,s&1),e===null)return Wl(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,i?(r=t.mode,i=t.child,o={mode:"hidden",children:o},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=ia(o,r,0,null),e=Gn(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Jl(n),t.memoizedState=Xl,e):vc(t,o));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return i1(e,t,o,r,a,s,n);if(i){i=r.fallback,o=t.mode,s=e.child,a=s.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=wn(s,l),r.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=wn(a,i):(i=Gn(i,o,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,o=e.child.memoizedState,o=o===null?Jl(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~n,t.memoizedState=Xl,r}return i=e.child,e=i.sibling,r=wn(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function vc(e,t){return t=ia({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ai(e,t,n,r){return r!==null&&sc(r),zr(t,e.child,null,n),e=vc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function i1(e,t,n,r,s,i,o){if(n)return t.flags&256?(t.flags&=-257,r=Ga(Error(T(422))),Ai(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,s=t.mode,r=ia({mode:"visible",children:r.children},s,0,null),i=Gn(i,s,o,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&zr(t,e.child,null,o),t.child.memoizedState=Jl(o),t.memoizedState=Xl,i);if(!(t.mode&1))return Ai(e,t,o,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(T(419)),r=Ga(i,r,void 0),Ai(e,t,o,r)}if(a=(o&e.childLanes)!==0,$e||a){if(r=Se,r!==null){switch(o&-o){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|o)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,Yt(e,s),Ct(r,e,s,-1))}return Nc(),r=Ga(Error(T(421))),Ai(e,t,o,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=v1.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,Xe=gn(s.nextSibling),Je=t,ie=!0,St=null,e!==null&&(at[lt++]=Ft,at[lt++]=Ut,at[lt++]=Qn,Ft=e.id,Ut=e.overflow,Qn=t),t=vc(t,r.children),t.flags|=4096,t)}function jf(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Hl(e.return,t,n)}function Ya(e,t,n,r,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=s)}function m0(e,t,n){var r=t.pendingProps,s=r.revealOrder,i=r.tail;if(De(e,t,r.children,n),r=oe.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&jf(e,n,t);else if(e.tag===19)jf(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ee(oe,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&Co(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),Ya(t,!1,s,n,i);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Co(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}Ya(t,!0,n,null,i);break;case"together":Ya(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ji(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function qt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Jn|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(T(153));if(t.child!==null){for(e=t.child,n=wn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=wn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function o1(e,t,n){switch(t.tag){case 3:h0(t),Or();break;case 5:Fm(t);break;case 1:Ke(t.type)&&wo(t);break;case 4:cc(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;ee(So,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ee(oe,oe.current&1),t.flags|=128,null):n&t.child.childLanes?p0(e,t,n):(ee(oe,oe.current&1),e=qt(e,t,n),e!==null?e.sibling:null);ee(oe,oe.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return m0(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),ee(oe,oe.current),r)break;return null;case 22:case 23:return t.lanes=0,d0(e,t,n)}return qt(e,t,n)}var g0,Zl,y0,v0;g0=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Zl=function(){};y0=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,Wn(Lt.current);var i=null;switch(n){case"input":s=kl(e,s),r=kl(e,r),i=[];break;case"select":s=ue({},s,{value:void 0}),r=ue({},r,{value:void 0}),i=[];break;case"textarea":s=Nl(e,s),r=Nl(e,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=vo)}Cl(n,r);var o;n=null;for(c in s)if(!r.hasOwnProperty(c)&&s.hasOwnProperty(c)&&s[c]!=null)if(c==="style"){var a=s[c];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Os.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in r){var l=r[c];if(a=s!=null?s[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(i||(i=[]),i.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Os.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&te("scroll",e),i||a===l||(i=[])):(i=i||[]).push(c,l))}n&&(i=i||[]).push("style",n);var c=i;(t.updateQueue=c)&&(t.flags|=4)}};v0=function(e,t,n,r){n!==r&&(t.flags|=4)};function ls(e,t){if(!ie)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 Re(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function a1(e,t,n){var r=t.pendingProps;switch(rc(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Re(t),null;case 1:return Ke(t.type)&&xo(),Re(t),null;case 3:return r=t.stateNode,Vr(),ne(He),ne(Le),fc(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ri(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,St!==null&&(au(St),St=null))),Zl(e,t),Re(t),null;case 5:dc(t);var s=Wn(Ys.current);if(n=t.type,e!==null&&t.stateNode!=null)y0(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(T(166));return Re(t),null}if(e=Wn(Lt.current),Ri(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[At]=t,r[Ks]=i,e=(t.mode&1)!==0,n){case"dialog":te("cancel",r),te("close",r);break;case"iframe":case"object":case"embed":te("load",r);break;case"video":case"audio":for(s=0;s<ms.length;s++)te(ms[s],r);break;case"source":te("error",r);break;case"img":case"image":case"link":te("error",r),te("load",r);break;case"details":te("toggle",r);break;case"input":Md(r,i),te("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},te("invalid",r);break;case"textarea":Dd(r,i),te("invalid",r)}Cl(n,i),s=null;for(var o in i)if(i.hasOwnProperty(o)){var a=i[o];o==="children"?typeof a=="string"?r.textContent!==a&&(i.suppressHydrationWarning!==!0&&Pi(r.textContent,a,e),s=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&Pi(r.textContent,a,e),s=["children",""+a]):Os.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&te("scroll",r)}switch(n){case"input":ki(r),Ld(r,i,!0);break;case"textarea":ki(r),Od(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=vo)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Kp(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[At]=t,e[Ks]=r,g0(e,t,!1,!1),t.stateNode=e;e:{switch(o=El(n,r),n){case"dialog":te("cancel",e),te("close",e),s=r;break;case"iframe":case"object":case"embed":te("load",e),s=r;break;case"video":case"audio":for(s=0;s<ms.length;s++)te(ms[s],e);s=r;break;case"source":te("error",e),s=r;break;case"img":case"image":case"link":te("error",e),te("load",e),s=r;break;case"details":te("toggle",e),s=r;break;case"input":Md(e,r),s=kl(e,r),te("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=ue({},r,{value:void 0}),te("invalid",e);break;case"textarea":Dd(e,r),s=Nl(e,r),te("invalid",e);break;default:s=r}Cl(n,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?qp(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Gp(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&zs(e,l):typeof l=="number"&&zs(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Os.hasOwnProperty(i)?l!=null&&i==="onScroll"&&te("scroll",e):l!=null&&Uu(e,i,l,o))}switch(n){case"input":ki(e),Ld(e,r,!1);break;case"textarea":ki(e),Od(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Sn(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?Tr(e,!!r.multiple,i,!1):r.defaultValue!=null&&Tr(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=vo)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Re(t),null;case 6:if(e&&t.stateNode!=null)v0(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(T(166));if(n=Wn(Ys.current),Wn(Lt.current),Ri(t)){if(r=t.stateNode,n=t.memoizedProps,r[At]=t,(i=r.nodeValue!==n)&&(e=Je,e!==null))switch(e.tag){case 3:Pi(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Pi(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[At]=t,t.stateNode=r}return Re(t),null;case 13:if(ne(oe),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ie&&Xe!==null&&t.mode&1&&!(t.flags&128))Om(),Or(),t.flags|=98560,i=!1;else if(i=Ri(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(T(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(T(317));i[At]=t}else Or(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Re(t),i=!1}else St!==null&&(au(St),St=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||oe.current&1?xe===0&&(xe=3):Nc())),t.updateQueue!==null&&(t.flags|=4),Re(t),null);case 4:return Vr(),Zl(e,t),e===null&&Ws(t.stateNode.containerInfo),Re(t),null;case 10:return ac(t.type._context),Re(t),null;case 17:return Ke(t.type)&&xo(),Re(t),null;case 19:if(ne(oe),i=t.memoizedState,i===null)return Re(t),null;if(r=(t.flags&128)!==0,o=i.rendering,o===null)if(r)ls(i,!1);else{if(xe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Co(e),o!==null){for(t.flags|=128,ls(i,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,e=o.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ee(oe,oe.current&1|2),t.child}e=e.sibling}i.tail!==null&&pe()>Ir&&(t.flags|=128,r=!0,ls(i,!1),t.lanes=4194304)}else{if(!r)if(e=Co(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ls(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!ie)return Re(t),null}else 2*pe()-i.renderingStartTime>Ir&&n!==1073741824&&(t.flags|=128,r=!0,ls(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=pe(),t.sibling=null,n=oe.current,ee(oe,r?n&1|2:n&1),t):(Re(t),null);case 22:case 23:return Sc(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?qe&1073741824&&(Re(t),t.subtreeFlags&6&&(t.flags|=8192)):Re(t),null;case 24:return null;case 25:return null}throw Error(T(156,t.tag))}function l1(e,t){switch(rc(t),t.tag){case 1:return Ke(t.type)&&xo(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Vr(),ne(He),ne(Le),fc(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return dc(t),null;case 13:if(ne(oe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(T(340));Or()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ne(oe),null;case 4:return Vr(),null;case 10:return ac(t.type._context),null;case 22:case 23:return Sc(),null;case 24:return null;default:return null}}var Mi=!1,Ae=!1,u1=typeof WeakSet=="function"?WeakSet:Set,L=null;function kr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){fe(e,t,r)}else n.current=null}function eu(e,t,n){try{n()}catch(r){fe(e,t,r)}}var Cf=!1;function c1(e,t){if(zl=mo,e=Sm(),tc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,c=0,d=0,f=e,h=null;t:for(;;){for(var p;f!==n||s!==0&&f.nodeType!==3||(a=o+s),f!==i||r!==0&&f.nodeType!==3||(l=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(p=f.firstChild)!==null;)h=f,f=p;for(;;){if(f===e)break t;if(h===n&&++c===s&&(a=o),h===i&&++d===r&&(l=o),(p=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=p}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Vl={focusedElem:e,selectionRange:n},mo=!1,L=t;L!==null;)if(t=L,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,L=e;else for(;L!==null;){t=L;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var x=w.memoizedProps,b=w.memoizedState,m=t.stateNode,g=m.getSnapshotBeforeUpdate(t.elementType===t.type?x:wt(t.type,x),b);m.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(T(163))}}catch(S){fe(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,L=e;break}L=t.return}return w=Cf,Cf=!1,w}function Es(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&eu(t,n,i)}s=s.next}while(s!==r)}}function ra(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function tu(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function x0(e){var t=e.alternate;t!==null&&(e.alternate=null,x0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[At],delete t[Ks],delete t[Fl],delete t[Kx],delete t[Gx])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function w0(e){return e.tag===5||e.tag===3||e.tag===4}function Ef(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||w0(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function nu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=vo));else if(r!==4&&(e=e.child,e!==null))for(nu(e,t,n),e=e.sibling;e!==null;)nu(e,t,n),e=e.sibling}function ru(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(ru(e,t,n),e=e.sibling;e!==null;)ru(e,t,n),e=e.sibling}var Ne=null,kt=!1;function rn(e,t,n){for(n=n.child;n!==null;)k0(e,t,n),n=n.sibling}function k0(e,t,n){if(Mt&&typeof Mt.onCommitFiberUnmount=="function")try{Mt.onCommitFiberUnmount(qo,n)}catch{}switch(n.tag){case 5:Ae||kr(n,t);case 6:var r=Ne,s=kt;Ne=null,rn(e,t,n),Ne=r,kt=s,Ne!==null&&(kt?(e=Ne,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ne.removeChild(n.stateNode));break;case 18:Ne!==null&&(kt?(e=Ne,n=n.stateNode,e.nodeType===8?Fa(e.parentNode,n):e.nodeType===1&&Fa(e,n),Fs(e)):Fa(Ne,n.stateNode));break;case 4:r=Ne,s=kt,Ne=n.stateNode.containerInfo,kt=!0,rn(e,t,n),Ne=r,kt=s;break;case 0:case 11:case 14:case 15:if(!Ae&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&eu(n,t,o),s=s.next}while(s!==r)}rn(e,t,n);break;case 1:if(!Ae&&(kr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){fe(n,t,a)}rn(e,t,n);break;case 21:rn(e,t,n);break;case 22:n.mode&1?(Ae=(r=Ae)||n.memoizedState!==null,rn(e,t,n),Ae=r):rn(e,t,n);break;default:rn(e,t,n)}}function Tf(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new u1),t.forEach(function(r){var s=x1.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function yt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var i=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:Ne=a.stateNode,kt=!1;break e;case 3:Ne=a.stateNode.containerInfo,kt=!0;break e;case 4:Ne=a.stateNode.containerInfo,kt=!0;break e}a=a.return}if(Ne===null)throw Error(T(160));k0(i,o,s),Ne=null,kt=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(c){fe(s,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)b0(t,e),t=t.sibling}function b0(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(yt(t,e),Pt(e),r&4){try{Es(3,e,e.return),ra(3,e)}catch(x){fe(e,e.return,x)}try{Es(5,e,e.return)}catch(x){fe(e,e.return,x)}}break;case 1:yt(t,e),Pt(e),r&512&&n!==null&&kr(n,n.return);break;case 5:if(yt(t,e),Pt(e),r&512&&n!==null&&kr(n,n.return),e.flags&32){var s=e.stateNode;try{zs(s,"")}catch(x){fe(e,e.return,x)}}if(r&4&&(s=e.stateNode,s!=null)){var i=e.memoizedProps,o=n!==null?n.memoizedProps:i,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&Wp(s,i),El(a,o);var c=El(a,i);for(o=0;o<l.length;o+=2){var d=l[o],f=l[o+1];d==="style"?qp(s,f):d==="dangerouslySetInnerHTML"?Gp(s,f):d==="children"?zs(s,f):Uu(s,d,f,c)}switch(a){case"input":bl(s,i);break;case"textarea":Hp(s,i);break;case"select":var h=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var p=i.value;p!=null?Tr(s,!!i.multiple,p,!1):h!==!!i.multiple&&(i.defaultValue!=null?Tr(s,!!i.multiple,i.defaultValue,!0):Tr(s,!!i.multiple,i.multiple?[]:"",!1))}s[Ks]=i}catch(x){fe(e,e.return,x)}}break;case 6:if(yt(t,e),Pt(e),r&4){if(e.stateNode===null)throw Error(T(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(x){fe(e,e.return,x)}}break;case 3:if(yt(t,e),Pt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Fs(t.containerInfo)}catch(x){fe(e,e.return,x)}break;case 4:yt(t,e),Pt(e);break;case 13:yt(t,e),Pt(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(kc=pe())),r&4&&Tf(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(Ae=(c=Ae)||d,yt(t,e),Ae=c):yt(t,e),Pt(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!d&&e.mode&1)for(L=e,d=e.child;d!==null;){for(f=L=d;L!==null;){switch(h=L,p=h.child,h.tag){case 0:case 11:case 14:case 15:Es(4,h,h.return);break;case 1:kr(h,h.return);var w=h.stateNode;if(typeof w.componentWillUnmount=="function"){r=h,n=h.return;try{t=r,w.props=t.memoizedProps,w.state=t.memoizedState,w.componentWillUnmount()}catch(x){fe(r,n,x)}}break;case 5:kr(h,h.return);break;case 22:if(h.memoizedState!==null){Rf(f);continue}}p!==null?(p.return=h,L=p):Rf(f)}d=d.sibling}e:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{s=f.stateNode,c?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=f.stateNode,l=f.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=Yp("display",o))}catch(x){fe(e,e.return,x)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=c?"":f.memoizedProps}catch(x){fe(e,e.return,x)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:yt(t,e),Pt(e),r&4&&Tf(e);break;case 21:break;default:yt(t,e),Pt(e)}}function Pt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(w0(n)){var r=n;break e}n=n.return}throw Error(T(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(zs(s,""),r.flags&=-33);var i=Ef(e);ru(e,i,s);break;case 3:case 4:var o=r.stateNode.containerInfo,a=Ef(e);nu(e,a,o);break;default:throw Error(T(161))}}catch(l){fe(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function d1(e,t,n){L=e,S0(e)}function S0(e,t,n){for(var r=(e.mode&1)!==0;L!==null;){var s=L,i=s.child;if(s.tag===22&&r){var o=s.memoizedState!==null||Mi;if(!o){var a=s.alternate,l=a!==null&&a.memoizedState!==null||Ae;a=Mi;var c=Ae;if(Mi=o,(Ae=l)&&!c)for(L=s;L!==null;)o=L,l=o.child,o.tag===22&&o.memoizedState!==null?_f(s):l!==null?(l.return=o,L=l):_f(s);for(;i!==null;)L=i,S0(i),i=i.sibling;L=s,Mi=a,Ae=c}Pf(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,L=i):Pf(e)}}function Pf(e){for(;L!==null;){var t=L;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Ae||ra(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Ae)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:wt(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&hf(t,i,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}hf(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var d=c.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&Fs(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(T(163))}Ae||t.flags&512&&tu(t)}catch(h){fe(t,t.return,h)}}if(t===e){L=null;break}if(n=t.sibling,n!==null){n.return=t.return,L=n;break}L=t.return}}function Rf(e){for(;L!==null;){var t=L;if(t===e){L=null;break}var n=t.sibling;if(n!==null){n.return=t.return,L=n;break}L=t.return}}function _f(e){for(;L!==null;){var t=L;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{ra(4,t)}catch(l){fe(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(l){fe(t,s,l)}}var i=t.return;try{tu(t)}catch(l){fe(t,i,l)}break;case 5:var o=t.return;try{tu(t)}catch(l){fe(t,o,l)}}}catch(l){fe(t,t.return,l)}if(t===e){L=null;break}var a=t.sibling;if(a!==null){a.return=t.return,L=a;break}L=t.return}}var f1=Math.ceil,Po=Xt.ReactCurrentDispatcher,xc=Xt.ReactCurrentOwner,dt=Xt.ReactCurrentBatchConfig,G=0,Se=null,ge=null,Ce=0,qe=0,br=Tn(0),xe=0,Js=null,Jn=0,sa=0,wc=0,Ts=null,Ue=null,kc=0,Ir=1/0,Bt=null,Ro=!1,su=null,vn=null,Li=!1,dn=null,_o=0,Ps=0,iu=null,Zi=-1,eo=0;function Oe(){return G&6?pe():Zi!==-1?Zi:Zi=pe()}function xn(e){return e.mode&1?G&2&&Ce!==0?Ce&-Ce:qx.transition!==null?(eo===0&&(eo=am()),eo):(e=X,e!==0||(e=window.event,e=e===void 0?16:pm(e.type)),e):1}function Ct(e,t,n,r){if(50<Ps)throw Ps=0,iu=null,Error(T(185));ui(e,n,r),(!(G&2)||e!==Se)&&(e===Se&&(!(G&2)&&(sa|=n),xe===4&&un(e,Ce)),Ge(e,r),n===1&&G===0&&!(t.mode&1)&&(Ir=pe()+500,ea&&Pn()))}function Ge(e,t){var n=e.callbackNode;qv(e,t);var r=po(e,e===Se?Ce:0);if(r===0)n!==null&&Bd(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Bd(n),t===1)e.tag===0?Yx(Af.bind(null,e)):Mm(Af.bind(null,e)),Wx(function(){!(G&6)&&Pn()}),n=null;else{switch(lm(r)){case 1:n=Gu;break;case 4:n=im;break;case 16:n=ho;break;case 536870912:n=om;break;default:n=ho}n=_0(n,N0.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function N0(e,t){if(Zi=-1,eo=0,G&6)throw Error(T(327));var n=e.callbackNode;if(Mr()&&e.callbackNode!==n)return null;var r=po(e,e===Se?Ce:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Ao(e,r);else{t=r;var s=G;G|=2;var i=C0();(Se!==e||Ce!==t)&&(Bt=null,Ir=pe()+500,Kn(e,t));do try{m1();break}catch(a){j0(e,a)}while(!0);oc(),Po.current=i,G=s,ge!==null?t=0:(Se=null,Ce=0,t=xe)}if(t!==0){if(t===2&&(s=Al(e),s!==0&&(r=s,t=ou(e,s))),t===1)throw n=Js,Kn(e,0),un(e,r),Ge(e,pe()),n;if(t===6)un(e,r);else{if(s=e.current.alternate,!(r&30)&&!h1(s)&&(t=Ao(e,r),t===2&&(i=Al(e),i!==0&&(r=i,t=ou(e,i))),t===1))throw n=Js,Kn(e,0),un(e,r),Ge(e,pe()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(T(345));case 2:Vn(e,Ue,Bt);break;case 3:if(un(e,r),(r&130023424)===r&&(t=kc+500-pe(),10<t)){if(po(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){Oe(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Il(Vn.bind(null,e,Ue,Bt),t);break}Vn(e,Ue,Bt);break;case 4:if(un(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var o=31-jt(r);i=1<<o,o=t[o],o>s&&(s=o),r&=~i}if(r=s,r=pe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*f1(r/1960))-r,10<r){e.timeoutHandle=Il(Vn.bind(null,e,Ue,Bt),r);break}Vn(e,Ue,Bt);break;case 5:Vn(e,Ue,Bt);break;default:throw Error(T(329))}}}return Ge(e,pe()),e.callbackNode===n?N0.bind(null,e):null}function ou(e,t){var n=Ts;return e.current.memoizedState.isDehydrated&&(Kn(e,t).flags|=256),e=Ao(e,t),e!==2&&(t=Ue,Ue=n,t!==null&&au(t)),e}function au(e){Ue===null?Ue=e:Ue.push.apply(Ue,e)}function h1(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],i=s.getSnapshot;s=s.value;try{if(!Et(i(),s))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 un(e,t){for(t&=~wc,t&=~sa,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-jt(t),r=1<<n;e[n]=-1,t&=~r}}function Af(e){if(G&6)throw Error(T(327));Mr();var t=po(e,0);if(!(t&1))return Ge(e,pe()),null;var n=Ao(e,t);if(e.tag!==0&&n===2){var r=Al(e);r!==0&&(t=r,n=ou(e,r))}if(n===1)throw n=Js,Kn(e,0),un(e,t),Ge(e,pe()),n;if(n===6)throw Error(T(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Vn(e,Ue,Bt),Ge(e,pe()),null}function bc(e,t){var n=G;G|=1;try{return e(t)}finally{G=n,G===0&&(Ir=pe()+500,ea&&Pn())}}function Zn(e){dn!==null&&dn.tag===0&&!(G&6)&&Mr();var t=G;G|=1;var n=dt.transition,r=X;try{if(dt.transition=null,X=1,e)return e()}finally{X=r,dt.transition=n,G=t,!(G&6)&&Pn()}}function Sc(){qe=br.current,ne(br)}function Kn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,$x(n)),ge!==null)for(n=ge.return;n!==null;){var r=n;switch(rc(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&xo();break;case 3:Vr(),ne(He),ne(Le),fc();break;case 5:dc(r);break;case 4:Vr();break;case 13:ne(oe);break;case 19:ne(oe);break;case 10:ac(r.type._context);break;case 22:case 23:Sc()}n=n.return}if(Se=e,ge=e=wn(e.current,null),Ce=qe=t,xe=0,Js=null,wc=sa=Jn=0,Ue=Ts=null,$n!==null){for(t=0;t<$n.length;t++)if(n=$n[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,i=n.pending;if(i!==null){var o=i.next;i.next=s,r.next=o}n.pending=r}$n=null}return e}function j0(e,t){do{var n=ge;try{if(oc(),Qi.current=To,Eo){for(var r=le.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Eo=!1}if(Xn=0,ke=ve=le=null,Cs=!1,qs=0,xc.current=null,n===null||n.return===null){xe=1,Js=t,ge=null;break}e:{var i=e,o=n.return,a=n,l=t;if(t=Ce,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,d=a,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var h=d.alternate;h?(d.updateQueue=h.updateQueue,d.memoizedState=h.memoizedState,d.lanes=h.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=xf(o);if(p!==null){p.flags&=-257,wf(p,o,a,i,t),p.mode&1&&vf(i,c,t),t=p,l=c;var w=t.updateQueue;if(w===null){var x=new Set;x.add(l),t.updateQueue=x}else w.add(l);break e}else{if(!(t&1)){vf(i,c,t),Nc();break e}l=Error(T(426))}}else if(ie&&a.mode&1){var b=xf(o);if(b!==null){!(b.flags&65536)&&(b.flags|=256),wf(b,o,a,i,t),sc(Br(l,a));break e}}i=l=Br(l,a),xe!==4&&(xe=2),Ts===null?Ts=[i]:Ts.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var m=l0(i,l,t);ff(i,m);break e;case 1:a=l;var g=i.type,v=i.stateNode;if(!(i.flags&128)&&(typeof g.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(vn===null||!vn.has(v)))){i.flags|=65536,t&=-t,i.lanes|=t;var S=u0(i,a,t);ff(i,S);break e}}i=i.return}while(i!==null)}T0(n)}catch(k){t=k,ge===n&&n!==null&&(ge=n=n.return);continue}break}while(!0)}function C0(){var e=Po.current;return Po.current=To,e===null?To:e}function Nc(){(xe===0||xe===3||xe===2)&&(xe=4),Se===null||!(Jn&268435455)&&!(sa&268435455)||un(Se,Ce)}function Ao(e,t){var n=G;G|=2;var r=C0();(Se!==e||Ce!==t)&&(Bt=null,Kn(e,t));do try{p1();break}catch(s){j0(e,s)}while(!0);if(oc(),G=n,Po.current=r,ge!==null)throw Error(T(261));return Se=null,Ce=0,xe}function p1(){for(;ge!==null;)E0(ge)}function m1(){for(;ge!==null&&!Iv();)E0(ge)}function E0(e){var t=R0(e.alternate,e,qe);e.memoizedProps=e.pendingProps,t===null?T0(e):ge=t,xc.current=null}function T0(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=l1(n,t),n!==null){n.flags&=32767,ge=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{xe=6,ge=null;return}}else if(n=a1(n,t,qe),n!==null){ge=n;return}if(t=t.sibling,t!==null){ge=t;return}ge=t=e}while(t!==null);xe===0&&(xe=5)}function Vn(e,t,n){var r=X,s=dt.transition;try{dt.transition=null,X=1,g1(e,t,n,r)}finally{dt.transition=s,X=r}return null}function g1(e,t,n,r){do Mr();while(dn!==null);if(G&6)throw Error(T(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(T(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(Qv(e,i),e===Se&&(ge=Se=null,Ce=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Li||(Li=!0,_0(ho,function(){return Mr(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=dt.transition,dt.transition=null;var o=X;X=1;var a=G;G|=4,xc.current=null,c1(e,n),b0(n,e),Ox(Vl),mo=!!zl,Vl=zl=null,e.current=n,d1(n),Fv(),G=a,X=o,dt.transition=i}else e.current=n;if(Li&&(Li=!1,dn=e,_o=s),i=e.pendingLanes,i===0&&(vn=null),Wv(n.stateNode),Ge(e,pe()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(Ro)throw Ro=!1,e=su,su=null,e;return _o&1&&e.tag!==0&&Mr(),i=e.pendingLanes,i&1?e===iu?Ps++:(Ps=0,iu=e):Ps=0,Pn(),null}function Mr(){if(dn!==null){var e=lm(_o),t=dt.transition,n=X;try{if(dt.transition=null,X=16>e?16:e,dn===null)var r=!1;else{if(e=dn,dn=null,_o=0,G&6)throw Error(T(331));var s=G;for(G|=4,L=e.current;L!==null;){var i=L,o=i.child;if(L.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(L=c;L!==null;){var d=L;switch(d.tag){case 0:case 11:case 15:Es(8,d,i)}var f=d.child;if(f!==null)f.return=d,L=f;else for(;L!==null;){d=L;var h=d.sibling,p=d.return;if(x0(d),d===c){L=null;break}if(h!==null){h.return=p,L=h;break}L=p}}}var w=i.alternate;if(w!==null){var x=w.child;if(x!==null){w.child=null;do{var b=x.sibling;x.sibling=null,x=b}while(x!==null)}}L=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,L=o;else e:for(;L!==null;){if(i=L,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Es(9,i,i.return)}var m=i.sibling;if(m!==null){m.return=i.return,L=m;break e}L=i.return}}var g=e.current;for(L=g;L!==null;){o=L;var v=o.child;if(o.subtreeFlags&2064&&v!==null)v.return=o,L=v;else e:for(o=g;L!==null;){if(a=L,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:ra(9,a)}}catch(k){fe(a,a.return,k)}if(a===o){L=null;break e}var S=a.sibling;if(S!==null){S.return=a.return,L=S;break e}L=a.return}}if(G=s,Pn(),Mt&&typeof Mt.onPostCommitFiberRoot=="function")try{Mt.onPostCommitFiberRoot(qo,e)}catch{}r=!0}return r}finally{X=n,dt.transition=t}}return!1}function Mf(e,t,n){t=Br(n,t),t=l0(e,t,1),e=yn(e,t,1),t=Oe(),e!==null&&(ui(e,1,t),Ge(e,t))}function fe(e,t,n){if(e.tag===3)Mf(e,e,n);else for(;t!==null;){if(t.tag===3){Mf(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(vn===null||!vn.has(r))){e=Br(n,e),e=u0(t,e,1),t=yn(t,e,1),e=Oe(),t!==null&&(ui(t,1,e),Ge(t,e));break}}t=t.return}}function y1(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Oe(),e.pingedLanes|=e.suspendedLanes&n,Se===e&&(Ce&n)===n&&(xe===4||xe===3&&(Ce&130023424)===Ce&&500>pe()-kc?Kn(e,0):wc|=n),Ge(e,t)}function P0(e,t){t===0&&(e.mode&1?(t=Ni,Ni<<=1,!(Ni&130023424)&&(Ni=4194304)):t=1);var n=Oe();e=Yt(e,t),e!==null&&(ui(e,t,n),Ge(e,n))}function v1(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),P0(e,n)}function x1(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(T(314))}r!==null&&r.delete(t),P0(e,n)}var R0;R0=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||He.current)$e=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return $e=!1,o1(e,t,n);$e=!!(e.flags&131072)}else $e=!1,ie&&t.flags&1048576&&Lm(t,bo,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ji(e,t),e=t.pendingProps;var s=Dr(t,Le.current);Ar(t,n),s=pc(null,t,r,e,s,n);var i=mc();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ke(r)?(i=!0,wo(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,uc(t),s.updater=na,t.stateNode=s,s._reactInternals=t,Gl(t,r,e,n),t=Ql(null,t,r,!0,i,n)):(t.tag=0,ie&&i&&nc(t),De(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ji(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=k1(r),e=wt(r,e),s){case 0:t=ql(null,t,r,e,n);break e;case 1:t=Sf(null,t,r,e,n);break e;case 11:t=kf(null,t,r,e,n);break e;case 14:t=bf(null,t,r,wt(r.type,e),n);break e}throw Error(T(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:wt(r,s),ql(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:wt(r,s),Sf(e,t,r,s,n);case 3:e:{if(h0(t),e===null)throw Error(T(387));r=t.pendingProps,i=t.memoizedState,s=i.element,Im(e,t),jo(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=Br(Error(T(423)),t),t=Nf(e,t,r,n,s);break e}else if(r!==s){s=Br(Error(T(424)),t),t=Nf(e,t,r,n,s);break e}else for(Xe=gn(t.stateNode.containerInfo.firstChild),Je=t,ie=!0,St=null,n=Vm(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Or(),r===s){t=qt(e,t,n);break e}De(e,t,r,n)}t=t.child}return t;case 5:return Fm(t),e===null&&Wl(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,Bl(r,s)?o=null:i!==null&&Bl(r,i)&&(t.flags|=32),f0(e,t),De(e,t,o,n),t.child;case 6:return e===null&&Wl(t),null;case 13:return p0(e,t,n);case 4:return cc(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=zr(t,null,r,n):De(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:wt(r,s),kf(e,t,r,s,n);case 7:return De(e,t,t.pendingProps,n),t.child;case 8:return De(e,t,t.pendingProps.children,n),t.child;case 12:return De(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,i=t.memoizedProps,o=s.value,ee(So,r._currentValue),r._currentValue=o,i!==null)if(Et(i.value,o)){if(i.children===s.children&&!He.current){t=qt(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=$t(-1,n&-n),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?l.next=l:(l.next=d.next,d.next=l),c.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),Hl(i.return,n,t),a.lanes|=n;break}l=l.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(T(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Hl(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}De(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,Ar(t,n),s=ft(s),r=r(s),t.flags|=1,De(e,t,r,n),t.child;case 14:return r=t.type,s=wt(r,t.pendingProps),s=wt(r.type,s),bf(e,t,r,s,n);case 15:return c0(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:wt(r,s),Ji(e,t),t.tag=1,Ke(r)?(e=!0,wo(t)):e=!1,Ar(t,n),a0(t,r,s),Gl(t,r,s,n),Ql(null,t,r,!0,e,n);case 19:return m0(e,t,n);case 22:return d0(e,t,n)}throw Error(T(156,t.tag))};function _0(e,t){return sm(e,t)}function w1(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ct(e,t,n,r){return new w1(e,t,n,r)}function jc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function k1(e){if(typeof e=="function")return jc(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Wu)return 11;if(e===Hu)return 14}return 2}function wn(e,t){var n=e.alternate;return n===null?(n=ct(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function to(e,t,n,r,s,i){var o=2;if(r=e,typeof e=="function")jc(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case fr:return Gn(n.children,s,i,t);case $u:o=8,s|=8;break;case yl:return e=ct(12,n,t,s|2),e.elementType=yl,e.lanes=i,e;case vl:return e=ct(13,n,t,s),e.elementType=vl,e.lanes=i,e;case xl:return e=ct(19,n,t,s),e.elementType=xl,e.lanes=i,e;case Fp:return ia(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Bp:o=10;break e;case Ip:o=9;break e;case Wu:o=11;break e;case Hu:o=14;break e;case on:o=16,r=null;break e}throw Error(T(130,e==null?e:typeof e,""))}return t=ct(o,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function Gn(e,t,n,r){return e=ct(7,e,r,t),e.lanes=n,e}function ia(e,t,n,r){return e=ct(22,e,r,t),e.elementType=Fp,e.lanes=n,e.stateNode={isHidden:!1},e}function qa(e,t,n){return e=ct(6,e,null,t),e.lanes=n,e}function Qa(e,t,n){return t=ct(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function b1(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ra(0),this.expirationTimes=Ra(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ra(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Cc(e,t,n,r,s,i,o,a,l){return e=new b1(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=ct(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},uc(i),e}function S1(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:dr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function A0(e){if(!e)return Nn;e=e._reactInternals;e:{if(tr(e)!==e||e.tag!==1)throw Error(T(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ke(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(T(171))}if(e.tag===1){var n=e.type;if(Ke(n))return Am(e,n,t)}return t}function M0(e,t,n,r,s,i,o,a,l){return e=Cc(n,r,!0,e,s,i,o,a,l),e.context=A0(null),n=e.current,r=Oe(),s=xn(n),i=$t(r,s),i.callback=t??null,yn(n,i,s),e.current.lanes=s,ui(e,s,r),Ge(e,r),e}function oa(e,t,n,r){var s=t.current,i=Oe(),o=xn(s);return n=A0(n),t.context===null?t.context=n:t.pendingContext=n,t=$t(i,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=yn(s,t,o),e!==null&&(Ct(e,s,o,i),qi(e,s,o)),o}function Mo(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Lf(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Ec(e,t){Lf(e,t),(e=e.alternate)&&Lf(e,t)}function N1(){return null}var L0=typeof reportError=="function"?reportError:function(e){console.error(e)};function Tc(e){this._internalRoot=e}aa.prototype.render=Tc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(T(409));oa(e,t,null,null)};aa.prototype.unmount=Tc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Zn(function(){oa(null,e,null,null)}),t[Gt]=null}};function aa(e){this._internalRoot=e}aa.prototype.unstable_scheduleHydration=function(e){if(e){var t=dm();e={blockedOn:null,target:e,priority:t};for(var n=0;n<ln.length&&t!==0&&t<ln[n].priority;n++);ln.splice(n,0,e),n===0&&hm(e)}};function Pc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function la(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Df(){}function j1(e,t,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var c=Mo(o);i.call(c)}}var o=M0(t,r,e,0,null,!1,!1,"",Df);return e._reactRootContainer=o,e[Gt]=o.current,Ws(e.nodeType===8?e.parentNode:e),Zn(),o}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var a=r;r=function(){var c=Mo(l);a.call(c)}}var l=Cc(e,0,!1,null,null,!1,!1,"",Df);return e._reactRootContainer=l,e[Gt]=l.current,Ws(e.nodeType===8?e.parentNode:e),Zn(function(){oa(t,l,n,r)}),l}function ua(e,t,n,r,s){var i=n._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var a=s;s=function(){var l=Mo(o);a.call(l)}}oa(t,o,e,s)}else o=j1(n,t,e,s,r);return Mo(o)}um=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ps(t.pendingLanes);n!==0&&(Yu(t,n|1),Ge(t,pe()),!(G&6)&&(Ir=pe()+500,Pn()))}break;case 13:Zn(function(){var r=Yt(e,1);if(r!==null){var s=Oe();Ct(r,e,1,s)}}),Ec(e,1)}};qu=function(e){if(e.tag===13){var t=Yt(e,134217728);if(t!==null){var n=Oe();Ct(t,e,134217728,n)}Ec(e,134217728)}};cm=function(e){if(e.tag===13){var t=xn(e),n=Yt(e,t);if(n!==null){var r=Oe();Ct(n,e,t,r)}Ec(e,t)}};dm=function(){return X};fm=function(e,t){var n=X;try{return X=e,t()}finally{X=n}};Pl=function(e,t,n){switch(t){case"input":if(bl(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=Zo(r);if(!s)throw Error(T(90));$p(r),bl(r,s)}}}break;case"textarea":Hp(e,n);break;case"select":t=n.value,t!=null&&Tr(e,!!n.multiple,t,!1)}};Jp=bc;Zp=Zn;var C1={usingClientEntryPoint:!1,Events:[di,gr,Zo,Qp,Xp,bc]},us={findFiberByHostInstance:Un,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},E1={bundleType:us.bundleType,version:us.version,rendererPackageName:us.rendererPackageName,rendererConfig:us.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Xt.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=nm(e),e===null?null:e.stateNode},findFiberByHostInstance:us.findFiberByHostInstance||N1,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Di=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Di.isDisabled&&Di.supportsFiber)try{qo=Di.inject(E1),Mt=Di}catch{}}nt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=C1;nt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Pc(t))throw Error(T(200));return S1(e,t,null,n)};nt.createRoot=function(e,t){if(!Pc(e))throw Error(T(299));var n=!1,r="",s=L0;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Cc(e,1,!1,null,null,n,!1,r,s),e[Gt]=t.current,Ws(e.nodeType===8?e.parentNode:e),new Tc(t)};nt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(T(188)):(e=Object.keys(e).join(","),Error(T(268,e)));return e=nm(t),e=e===null?null:e.stateNode,e};nt.flushSync=function(e){return Zn(e)};nt.hydrate=function(e,t,n){if(!la(t))throw Error(T(200));return ua(null,e,t,!0,n)};nt.hydrateRoot=function(e,t,n){if(!Pc(e))throw Error(T(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",o=L0;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=M0(t,null,e,1,n??null,s,!1,i,o),e[Gt]=t.current,Ws(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new aa(t)};nt.render=function(e,t,n){if(!la(t))throw Error(T(200));return ua(null,e,t,!1,n)};nt.unmountComponentAtNode=function(e){if(!la(e))throw Error(T(40));return e._reactRootContainer?(Zn(function(){ua(null,null,e,!1,function(){e._reactRootContainer=null,e[Gt]=null})}),!0):!1};nt.unstable_batchedUpdates=bc;nt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!la(n))throw Error(T(200));if(e==null||e._reactInternals===void 0)throw Error(T(38));return ua(e,t,n,!1,r)};nt.version="18.3.1-next-f1338f8080-20240426";function D0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(D0)}catch(e){console.error(e)}}D0(),Dp.exports=nt;var O0=Dp.exports;const T1=Sp(O0);var z0,Of=O0;z0=Of.createRoot,Of.hydrateRoot;/**
|
|
41
|
+
* @remix-run/router v1.23.2
|
|
42
|
+
*
|
|
43
|
+
* Copyright (c) Remix Software Inc.
|
|
44
|
+
*
|
|
45
|
+
* This source code is licensed under the MIT license found in the
|
|
46
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
47
|
+
*
|
|
48
|
+
* @license MIT
|
|
49
|
+
*/function Zs(){return Zs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zs.apply(this,arguments)}var fn;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(fn||(fn={}));const zf="popstate";function P1(e){e===void 0&&(e={});function t(r,s){let{pathname:i,search:o,hash:a}=r.location;return lu("",{pathname:i,search:o,hash:a},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(r,s){return typeof s=="string"?s:Lo(s)}return _1(t,n,null,e)}function me(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Rc(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function R1(){return Math.random().toString(36).substr(2,8)}function Vf(e,t){return{usr:e.state,key:e.key,idx:t}}function lu(e,t,n,r){return n===void 0&&(n=null),Zs({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Gr(t):t,{state:n,key:t&&t.key||r||R1()})}function Lo(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Gr(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function _1(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,o=s.history,a=fn.Pop,l=null,c=d();c==null&&(c=0,o.replaceState(Zs({},o.state,{idx:c}),""));function d(){return(o.state||{idx:null}).idx}function f(){a=fn.Pop;let b=d(),m=b==null?null:b-c;c=b,l&&l({action:a,location:x.location,delta:m})}function h(b,m){a=fn.Push;let g=lu(x.location,b,m);c=d()+1;let v=Vf(g,c),S=x.createHref(g);try{o.pushState(v,"",S)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;s.location.assign(S)}i&&l&&l({action:a,location:x.location,delta:1})}function p(b,m){a=fn.Replace;let g=lu(x.location,b,m);c=d();let v=Vf(g,c),S=x.createHref(g);o.replaceState(v,"",S),i&&l&&l({action:a,location:x.location,delta:0})}function w(b){let m=s.location.origin!=="null"?s.location.origin:s.location.href,g=typeof b=="string"?b:Lo(b);return g=g.replace(/ $/,"%20"),me(m,"No window.location.(origin|href) available to create URL for href: "+g),new URL(g,m)}let x={get action(){return a},get location(){return e(s,o)},listen(b){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(zf,f),l=b,()=>{s.removeEventListener(zf,f),l=null}},createHref(b){return t(s,b)},createURL:w,encodeLocation(b){let m=w(b);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:h,replace:p,go(b){return o.go(b)}};return x}var Bf;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Bf||(Bf={}));function A1(e,t,n){return n===void 0&&(n="/"),M1(e,t,n)}function M1(e,t,n,r){let s=typeof t=="string"?Gr(t):t,i=_c(s.pathname||"/",n);if(i==null)return null;let o=V0(e);L1(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let c=K1(i);a=$1(o[l],c)}return a}function V0(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(i,o,a)=>{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};l.relativePath.startsWith("/")&&(me(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=kn([r,l.relativePath]),d=n.concat(l);i.children&&i.children.length>0&&(me(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),V0(i.children,t,d,c)),!(i.path==null&&!i.index)&&t.push({path:c,score:F1(c,i.index),routesMeta:d})};return e.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let l of B0(i.path))s(i,o,l)}),t}function B0(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let o=B0(r.join("/")),a=[];return a.push(...o.map(l=>l===""?i:[i,l].join("/"))),s&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function L1(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:U1(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const D1=/^:[\w-]+$/,O1=3,z1=2,V1=1,B1=10,I1=-2,If=e=>e==="*";function F1(e,t){let n=e.split("/"),r=n.length;return n.some(If)&&(r+=I1),t&&(r+=z1),n.filter(s=>!If(s)).reduce((s,i)=>s+(D1.test(i)?O1:i===""?V1:B1),r)}function U1(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function $1(e,t,n){let{routesMeta:r}=e,s={},i="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],c=a===r.length-1,d=i==="/"?t:t.slice(i.length)||"/",f=W1({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},d),h=l.route;if(!f)return null;Object.assign(s,f.params),o.push({params:s,pathname:kn([i,f.pathname]),pathnameBase:X1(kn([i,f.pathnameBase])),route:h}),f.pathnameBase!=="/"&&(i=kn([i,f.pathnameBase]))}return o}function W1(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=H1(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let i=s[0],o=i.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:r.reduce((c,d,f)=>{let{paramName:h,isOptional:p}=d;if(h==="*"){let x=a[f]||"";o=i.slice(0,i.length-x.length).replace(/(.)\/+$/,"$1")}const w=a[f];return p&&!w?c[h]=void 0:c[h]=(w||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:o,pattern:e}}function H1(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Rc(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=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function K1(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Rc(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function _c(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const G1=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Y1=e=>G1.test(e);function q1(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?Gr(e):e,i;if(n)if(Y1(n))i=n;else{if(n.includes("//")){let o=n;n=n.replace(/\/\/+/g,"/"),Rc(!1,"Pathnames cannot have embedded double slashes - normalizing "+(o+" -> "+n))}n.startsWith("/")?i=Ff(n.substring(1),"/"):i=Ff(n,t)}else i=t;return{pathname:i,search:J1(r),hash:Z1(s)}}function Ff(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function Xa(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 Q1(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Ac(e,t){let n=Q1(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Mc(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=Gr(e):(s=Zs({},e),me(!s.pathname||!s.pathname.includes("?"),Xa("?","pathname","search",s)),me(!s.pathname||!s.pathname.includes("#"),Xa("#","pathname","hash",s)),me(!s.search||!s.search.includes("#"),Xa("#","search","hash",s)));let i=e===""||s.pathname==="",o=i?"/":s.pathname,a;if(o==null)a=n;else{let f=t.length-1;if(!r&&o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),f-=1;s.pathname=h.join("/")}a=f>=0?t[f]:"/"}let l=q1(s,a),c=o&&o!=="/"&&o.endsWith("/"),d=(i||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||d)&&(l.pathname+="/"),l}const kn=e=>e.join("/").replace(/\/\/+/g,"/"),X1=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),J1=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Z1=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function ew(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const I0=["post","put","patch","delete"];new Set(I0);const tw=["get",...I0];new Set(tw);/**
|
|
50
|
+
* React Router v6.30.3
|
|
51
|
+
*
|
|
52
|
+
* Copyright (c) Remix Software Inc.
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the MIT license found in the
|
|
55
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
56
|
+
*
|
|
57
|
+
* @license MIT
|
|
58
|
+
*/function ei(){return ei=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ei.apply(this,arguments)}const Lc=y.createContext(null),nw=y.createContext(null),Rn=y.createContext(null),ca=y.createContext(null),Jt=y.createContext({outlet:null,matches:[],isDataRoute:!1}),F0=y.createContext(null);function rw(e,t){let{relative:n}=t===void 0?{}:t;Yr()||me(!1);let{basename:r,navigator:s}=y.useContext(Rn),{hash:i,pathname:o,search:a}=$0(e,{relative:n}),l=o;return r!=="/"&&(l=o==="/"?r:kn([r,o])),s.createHref({pathname:l,search:a,hash:i})}function Yr(){return y.useContext(ca)!=null}function nr(){return Yr()||me(!1),y.useContext(ca).location}function U0(e){y.useContext(Rn).static||y.useLayoutEffect(e)}function qr(){let{isDataRoute:e}=y.useContext(Jt);return e?vw():sw()}function sw(){Yr()||me(!1);let e=y.useContext(Lc),{basename:t,future:n,navigator:r}=y.useContext(Rn),{matches:s}=y.useContext(Jt),{pathname:i}=nr(),o=JSON.stringify(Ac(s,n.v7_relativeSplatPath)),a=y.useRef(!1);return U0(()=>{a.current=!0}),y.useCallback(function(c,d){if(d===void 0&&(d={}),!a.current)return;if(typeof c=="number"){r.go(c);return}let f=Mc(c,JSON.parse(o),i,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:kn([t,f.pathname])),(d.replace?r.replace:r.push)(f,d.state,d)},[t,r,o,i,e])}const iw=y.createContext(null);function ow(e){let t=y.useContext(Jt).outlet;return t&&y.createElement(iw.Provider,{value:e},t)}function $0(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=y.useContext(Rn),{matches:s}=y.useContext(Jt),{pathname:i}=nr(),o=JSON.stringify(Ac(s,r.v7_relativeSplatPath));return y.useMemo(()=>Mc(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function aw(e,t){return lw(e,t)}function lw(e,t,n,r){Yr()||me(!1);let{navigator:s}=y.useContext(Rn),{matches:i}=y.useContext(Jt),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let c=nr(),d;if(t){var f;let b=typeof t=="string"?Gr(t):t;l==="/"||(f=b.pathname)!=null&&f.startsWith(l)||me(!1),d=b}else d=c;let h=d.pathname||"/",p=h;if(l!=="/"){let b=l.replace(/^\//,"").split("/");p="/"+h.replace(/^\//,"").split("/").slice(b.length).join("/")}let w=A1(e,{pathname:p}),x=hw(w&&w.map(b=>Object.assign({},b,{params:Object.assign({},a,b.params),pathname:kn([l,s.encodeLocation?s.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?l:kn([l,s.encodeLocation?s.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),i,n,r);return t&&x?y.createElement(ca.Provider,{value:{location:ei({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:fn.Pop}},x):x}function uw(){let e=yw(),t=ew(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},t),n?y.createElement("pre",{style:s},n):null,null)}const cw=y.createElement(uw,null);class dw extends y.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?y.createElement(Jt.Provider,{value:this.props.routeContext},y.createElement(F0.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function fw(e){let{routeContext:t,match:n,children:r}=e,s=y.useContext(Lc);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),y.createElement(Jt.Provider,{value:t},r)}function hw(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,a=(s=n)==null?void 0:s.errors;if(a!=null){let d=o.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);d>=0||me(!1),o=o.slice(0,Math.min(o.length,d+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<o.length;d++){let f=o[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(c=d),f.route.id){let{loaderData:h,errors:p}=n,w=f.route.loader&&h[f.route.id]===void 0&&(!p||p[f.route.id]===void 0);if(f.route.lazy||w){l=!0,c>=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((d,f,h)=>{let p,w=!1,x=null,b=null;n&&(p=a&&f.route.id?a[f.route.id]:void 0,x=f.route.errorElement||cw,l&&(c<0&&h===0?(xw("route-fallback"),w=!0,b=null):c===h&&(w=!0,b=f.route.hydrateFallbackElement||null)));let m=t.concat(o.slice(0,h+1)),g=()=>{let v;return p?v=x:w?v=b:f.route.Component?v=y.createElement(f.route.Component,null):f.route.element?v=f.route.element:v=d,y.createElement(fw,{match:f,routeContext:{outlet:d,matches:m,isDataRoute:n!=null},children:v})};return n&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?y.createElement(dw,{location:n.location,revalidation:n.revalidation,component:x,error:p,children:g(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):g()},null)}var W0=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(W0||{}),H0=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(H0||{});function pw(e){let t=y.useContext(Lc);return t||me(!1),t}function mw(e){let t=y.useContext(nw);return t||me(!1),t}function gw(e){let t=y.useContext(Jt);return t||me(!1),t}function K0(e){let t=gw(),n=t.matches[t.matches.length-1];return n.route.id||me(!1),n.route.id}function yw(){var e;let t=y.useContext(F0),n=mw(),r=K0();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function vw(){let{router:e}=pw(W0.UseNavigateStable),t=K0(H0.UseNavigateStable),n=y.useRef(!1);return U0(()=>{n.current=!0}),y.useCallback(function(s,i){i===void 0&&(i={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,ei({fromRouteId:t},i)))},[e,t])}const Uf={};function xw(e,t,n){Uf[e]||(Uf[e]=!0)}function ww(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function $f(e){let{to:t,replace:n,state:r,relative:s}=e;Yr()||me(!1);let{future:i,static:o}=y.useContext(Rn),{matches:a}=y.useContext(Jt),{pathname:l}=nr(),c=qr(),d=Mc(t,Ac(a,i.v7_relativeSplatPath),l,s==="path"),f=JSON.stringify(d);return y.useEffect(()=>c(JSON.parse(f),{replace:n,state:r,relative:s}),[c,f,s,n,r]),null}function kw(e){return ow(e.context)}function Rt(e){me(!1)}function bw(e){let{basename:t="/",children:n=null,location:r,navigationType:s=fn.Pop,navigator:i,static:o=!1,future:a}=e;Yr()&&me(!1);let l=t.replace(/^\/*/,"/"),c=y.useMemo(()=>({basename:l,navigator:i,static:o,future:ei({v7_relativeSplatPath:!1},a)}),[l,a,i,o]);typeof r=="string"&&(r=Gr(r));let{pathname:d="/",search:f="",hash:h="",state:p=null,key:w="default"}=r,x=y.useMemo(()=>{let b=_c(d,l);return b==null?null:{location:{pathname:b,search:f,hash:h,state:p,key:w},navigationType:s}},[l,d,f,h,p,w,s]);return x==null?null:y.createElement(Rn.Provider,{value:c},y.createElement(ca.Provider,{children:n,value:x}))}function Sw(e){let{children:t,location:n}=e;return aw(uu(t),n)}new Promise(()=>{});function uu(e,t){t===void 0&&(t=[]);let n=[];return y.Children.forEach(e,(r,s)=>{if(!y.isValidElement(r))return;let i=[...t,s];if(r.type===y.Fragment){n.push.apply(n,uu(r.props.children,i));return}r.type!==Rt&&me(!1),!r.props.index||!r.props.children||me(!1);let o={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=uu(r.props.children,i)),n.push(o)}),n}/**
|
|
59
|
+
* React Router DOM v6.30.3
|
|
60
|
+
*
|
|
61
|
+
* Copyright (c) Remix Software Inc.
|
|
62
|
+
*
|
|
63
|
+
* This source code is licensed under the MIT license found in the
|
|
64
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
65
|
+
*
|
|
66
|
+
* @license MIT
|
|
67
|
+
*/function cu(){return cu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cu.apply(this,arguments)}function Nw(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,i;for(i=0;i<r.length;i++)s=r[i],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}function jw(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Cw(e,t){return e.button===0&&(!t||t==="_self")&&!jw(e)}const Ew=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Tw="6";try{window.__reactRouterVersion=Tw}catch{}const Pw="startTransition",Wf=yv[Pw];function Rw(e){let{basename:t,children:n,future:r,window:s}=e,i=y.useRef();i.current==null&&(i.current=P1({window:s,v5Compat:!0}));let o=i.current,[a,l]=y.useState({action:o.action,location:o.location}),{v7_startTransition:c}=r||{},d=y.useCallback(f=>{c&&Wf?Wf(()=>l(f)):l(f)},[l,c]);return y.useLayoutEffect(()=>o.listen(d),[o,d]),y.useEffect(()=>ww(r),[r]),y.createElement(bw,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}const _w=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Aw=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Do=y.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:i,replace:o,state:a,target:l,to:c,preventScrollReset:d,viewTransition:f}=t,h=Nw(t,Ew),{basename:p}=y.useContext(Rn),w,x=!1;if(typeof c=="string"&&Aw.test(c)&&(w=c,_w))try{let v=new URL(window.location.href),S=c.startsWith("//")?new URL(v.protocol+c):new URL(c),k=_c(S.pathname,p);S.origin===v.origin&&k!=null?c=k+S.search+S.hash:x=!0}catch{}let b=rw(c,{relative:s}),m=Mw(c,{replace:o,state:a,target:l,preventScrollReset:d,relative:s,viewTransition:f});function g(v){r&&r(v),v.defaultPrevented||m(v)}return y.createElement("a",cu({},h,{href:w||b,onClick:x||i?r:g,ref:n,target:l}))});var Hf;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Hf||(Hf={}));var Kf;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Kf||(Kf={}));function Mw(e,t){let{target:n,replace:r,state:s,preventScrollReset:i,relative:o,viewTransition:a}=t===void 0?{}:t,l=qr(),c=nr(),d=$0(e,{relative:o});return y.useCallback(f=>{if(Cw(f,n)){f.preventDefault();let h=r!==void 0?r:Lo(c)===Lo(d);l(e,{replace:h,state:s,preventScrollReset:i,relative:o,viewTransition:a})}},[c,l,d,r,s,n,e,i,o,a])}var Lw=e=>{switch(e){case"success":return zw;case"info":return Bw;case"warning":return Vw;case"error":return Iw;default:return null}},Dw=Array(12).fill(0),Ow=({visible:e,className:t})=>_.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},_.createElement("div",{className:"sonner-spinner"},Dw.map((n,r)=>_.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),zw=_.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},_.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Vw=_.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},_.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Bw=_.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},_.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Iw=_.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},_.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Fw=_.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},_.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),_.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Uw=()=>{let[e,t]=_.useState(document.hidden);return _.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},du=1,$w=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,s=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:du++,i=this.toasts.find(a=>a.id===s),o=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),i?this.toasts=this.toasts.map(a=>a.id===s?(this.publish({...a,...e,id:s,title:n}),{...a,...e,id:s,dismissible:o,title:n}):a):this.addToast({title:n,...r,dismissible:o,id:s}),s},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),s=n!==void 0,i,o=r.then(async l=>{if(i=["resolve",l],_.isValidElement(l))s=!1,this.create({id:n,type:"default",message:l});else if(Hw(l)&&!l.ok){s=!1;let c=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description;this.create({id:n,type:"error",message:c,description:d})}else if(t.success!==void 0){s=!1;let c=typeof t.success=="function"?await t.success(l):t.success,d=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"success",message:c,description:d})}}).catch(async l=>{if(i=["reject",l],t.error!==void 0){s=!1;let c=typeof t.error=="function"?await t.error(l):t.error,d=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"error",message:c,description:d})}}).finally(()=>{var l;s&&(this.dismiss(n),n=void 0),(l=t.finally)==null||l.call(t)}),a=()=>new Promise((l,c)=>o.then(()=>i[0]==="reject"?c(i[1]):l(i[1])).catch(c));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||du++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Fe=new $w,Ww=(e,t)=>{let n=(t==null?void 0:t.id)||du++;return Fe.addToast({title:e,...t,id:n}),n},Hw=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Kw=Ww,Gw=()=>Fe.toasts,Yw=()=>Fe.getActiveToasts(),ur=Object.assign(Kw,{success:Fe.success,info:Fe.info,warning:Fe.warning,error:Fe.error,custom:Fe.custom,message:Fe.message,promise:Fe.promise,dismiss:Fe.dismiss,loading:Fe.loading},{getHistory:Gw,getToasts:Yw});function qw(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}qw(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
|
|
68
|
+
`);function Oi(e){return e.label!==void 0}var Qw=3,Xw="32px",Jw="16px",Gf=4e3,Zw=356,e2=14,t2=20,n2=200;function vt(...e){return e.filter(Boolean).join(" ")}function r2(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var s2=e=>{var t,n,r,s,i,o,a,l,c,d,f;let{invert:h,toast:p,unstyled:w,interacting:x,setHeights:b,visibleToasts:m,heights:g,index:v,toasts:S,expanded:k,removeToast:C,defaultRichColors:j,closeButton:N,style:M,cancelButtonStyle:A,actionButtonStyle:z,className:U="",descriptionClassName:we="",duration:Be,position:Tt,gap:Ie,loadingIcon:$,expandByDefault:P,classNames:R,icons:D,closeButtonAriaLabel:J="Close toast",pauseWhenPageIsHidden:B}=e,[H,I]=_.useState(null),[ce,Te]=_.useState(null),[q,es]=_.useState(!1),[An,Mn]=_.useState(!1),[Zt,E]=_.useState(!1),[Y,Ye]=_.useState(!1),[yi,wd]=_.useState(!1),[Wy,ba]=_.useState(0),[Hy,kd]=_.useState(0),ts=_.useRef(p.duration||Be||Gf),bd=_.useRef(null),Ln=_.useRef(null),Ky=v===0,Gy=v+1<=m,st=p.type,ir=p.dismissible!==!1,Yy=p.className||"",qy=p.descriptionClassName||"",vi=_.useMemo(()=>g.findIndex(F=>F.toastId===p.id)||0,[g,p.id]),Qy=_.useMemo(()=>{var F;return(F=p.closeButton)!=null?F:N},[p.closeButton,N]),Sd=_.useMemo(()=>p.duration||Be||Gf,[p.duration,Be]),Sa=_.useRef(0),or=_.useRef(0),Nd=_.useRef(0),ar=_.useRef(null),[Xy,Jy]=Tt.split("-"),jd=_.useMemo(()=>g.reduce((F,Z,se)=>se>=vi?F:F+Z.height,0),[g,vi]),Cd=Uw(),Zy=p.invert||h,Na=st==="loading";or.current=_.useMemo(()=>vi*Ie+jd,[vi,jd]),_.useEffect(()=>{ts.current=Sd},[Sd]),_.useEffect(()=>{es(!0)},[]),_.useEffect(()=>{let F=Ln.current;if(F){let Z=F.getBoundingClientRect().height;return kd(Z),b(se=>[{toastId:p.id,height:Z,position:p.position},...se]),()=>b(se=>se.filter(pt=>pt.toastId!==p.id))}},[b,p.id]),_.useLayoutEffect(()=>{if(!q)return;let F=Ln.current,Z=F.style.height;F.style.height="auto";let se=F.getBoundingClientRect().height;F.style.height=Z,kd(se),b(pt=>pt.find(mt=>mt.toastId===p.id)?pt.map(mt=>mt.toastId===p.id?{...mt,height:se}:mt):[{toastId:p.id,height:se,position:p.position},...pt])},[q,p.title,p.description,b,p.id]);let en=_.useCallback(()=>{Mn(!0),ba(or.current),b(F=>F.filter(Z=>Z.toastId!==p.id)),setTimeout(()=>{C(p)},n2)},[p,C,b,or]);_.useEffect(()=>{if(p.promise&&st==="loading"||p.duration===1/0||p.type==="loading")return;let F;return k||x||B&&Cd?(()=>{if(Nd.current<Sa.current){let Z=new Date().getTime()-Sa.current;ts.current=ts.current-Z}Nd.current=new Date().getTime()})():ts.current!==1/0&&(Sa.current=new Date().getTime(),F=setTimeout(()=>{var Z;(Z=p.onAutoClose)==null||Z.call(p,p),en()},ts.current)),()=>clearTimeout(F)},[k,x,p,st,B,Cd,en]),_.useEffect(()=>{p.delete&&en()},[en,p.delete]);function ev(){var F,Z,se;return D!=null&&D.loading?_.createElement("div",{className:vt(R==null?void 0:R.loader,(F=p==null?void 0:p.classNames)==null?void 0:F.loader,"sonner-loader"),"data-visible":st==="loading"},D.loading):$?_.createElement("div",{className:vt(R==null?void 0:R.loader,(Z=p==null?void 0:p.classNames)==null?void 0:Z.loader,"sonner-loader"),"data-visible":st==="loading"},$):_.createElement(Ow,{className:vt(R==null?void 0:R.loader,(se=p==null?void 0:p.classNames)==null?void 0:se.loader),visible:st==="loading"})}return _.createElement("li",{tabIndex:0,ref:Ln,className:vt(U,Yy,R==null?void 0:R.toast,(t=p==null?void 0:p.classNames)==null?void 0:t.toast,R==null?void 0:R.default,R==null?void 0:R[st],(n=p==null?void 0:p.classNames)==null?void 0:n[st]),"data-sonner-toast":"","data-rich-colors":(r=p.richColors)!=null?r:j,"data-styled":!(p.jsx||p.unstyled||w),"data-mounted":q,"data-promise":!!p.promise,"data-swiped":yi,"data-removed":An,"data-visible":Gy,"data-y-position":Xy,"data-x-position":Jy,"data-index":v,"data-front":Ky,"data-swiping":Zt,"data-dismissible":ir,"data-type":st,"data-invert":Zy,"data-swipe-out":Y,"data-swipe-direction":ce,"data-expanded":!!(k||P&&q),style:{"--index":v,"--toasts-before":v,"--z-index":S.length-v,"--offset":`${An?Wy:or.current}px`,"--initial-height":P?"auto":`${Hy}px`,...M,...p.style},onDragEnd:()=>{E(!1),I(null),ar.current=null},onPointerDown:F=>{Na||!ir||(bd.current=new Date,ba(or.current),F.target.setPointerCapture(F.pointerId),F.target.tagName!=="BUTTON"&&(E(!0),ar.current={x:F.clientX,y:F.clientY}))},onPointerUp:()=>{var F,Z,se,pt;if(Y||!ir)return;ar.current=null;let mt=Number(((F=Ln.current)==null?void 0:F.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),tn=Number(((Z=Ln.current)==null?void 0:Z.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Dn=new Date().getTime()-((se=bd.current)==null?void 0:se.getTime()),gt=H==="x"?mt:tn,nn=Math.abs(gt)/Dn;if(Math.abs(gt)>=t2||nn>.11){ba(or.current),(pt=p.onDismiss)==null||pt.call(p,p),Te(H==="x"?mt>0?"right":"left":tn>0?"down":"up"),en(),Ye(!0),wd(!1);return}E(!1),I(null)},onPointerMove:F=>{var Z,se,pt,mt;if(!ar.current||!ir||((Z=window.getSelection())==null?void 0:Z.toString().length)>0)return;let tn=F.clientY-ar.current.y,Dn=F.clientX-ar.current.x,gt=(se=e.swipeDirections)!=null?se:r2(Tt);!H&&(Math.abs(Dn)>1||Math.abs(tn)>1)&&I(Math.abs(Dn)>Math.abs(tn)?"x":"y");let nn={x:0,y:0};H==="y"?(gt.includes("top")||gt.includes("bottom"))&&(gt.includes("top")&&tn<0||gt.includes("bottom")&&tn>0)&&(nn.y=tn):H==="x"&&(gt.includes("left")||gt.includes("right"))&&(gt.includes("left")&&Dn<0||gt.includes("right")&&Dn>0)&&(nn.x=Dn),(Math.abs(nn.x)>0||Math.abs(nn.y)>0)&&wd(!0),(pt=Ln.current)==null||pt.style.setProperty("--swipe-amount-x",`${nn.x}px`),(mt=Ln.current)==null||mt.style.setProperty("--swipe-amount-y",`${nn.y}px`)}},Qy&&!p.jsx?_.createElement("button",{"aria-label":J,"data-disabled":Na,"data-close-button":!0,onClick:Na||!ir?()=>{}:()=>{var F;en(),(F=p.onDismiss)==null||F.call(p,p)},className:vt(R==null?void 0:R.closeButton,(s=p==null?void 0:p.classNames)==null?void 0:s.closeButton)},(i=D==null?void 0:D.close)!=null?i:Fw):null,p.jsx||y.isValidElement(p.title)?p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title:_.createElement(_.Fragment,null,st||p.icon||p.promise?_.createElement("div",{"data-icon":"",className:vt(R==null?void 0:R.icon,(o=p==null?void 0:p.classNames)==null?void 0:o.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||ev():null,p.type!=="loading"?p.icon||(D==null?void 0:D[st])||Lw(st):null):null,_.createElement("div",{"data-content":"",className:vt(R==null?void 0:R.content,(a=p==null?void 0:p.classNames)==null?void 0:a.content)},_.createElement("div",{"data-title":"",className:vt(R==null?void 0:R.title,(l=p==null?void 0:p.classNames)==null?void 0:l.title)},typeof p.title=="function"?p.title():p.title),p.description?_.createElement("div",{"data-description":"",className:vt(we,qy,R==null?void 0:R.description,(c=p==null?void 0:p.classNames)==null?void 0:c.description)},typeof p.description=="function"?p.description():p.description):null),y.isValidElement(p.cancel)?p.cancel:p.cancel&&Oi(p.cancel)?_.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||A,onClick:F=>{var Z,se;Oi(p.cancel)&&ir&&((se=(Z=p.cancel).onClick)==null||se.call(Z,F),en())},className:vt(R==null?void 0:R.cancelButton,(d=p==null?void 0:p.classNames)==null?void 0:d.cancelButton)},p.cancel.label):null,y.isValidElement(p.action)?p.action:p.action&&Oi(p.action)?_.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||z,onClick:F=>{var Z,se;Oi(p.action)&&((se=(Z=p.action).onClick)==null||se.call(Z,F),!F.defaultPrevented&&en())},className:vt(R==null?void 0:R.actionButton,(f=p==null?void 0:p.classNames)==null?void 0:f.actionButton)},p.action.label):null))};function Yf(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function i2(e,t){let n={};return[e,t].forEach((r,s)=>{let i=s===1,o=i?"--mobile-offset":"--offset",a=i?Jw:Xw;function l(c){["top","right","bottom","left"].forEach(d=>{n[`${o}-${d}`]=typeof c=="number"?`${c}px`:c})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(c=>{r[c]===void 0?n[`${o}-${c}`]=a:n[`${o}-${c}`]=typeof r[c]=="number"?`${r[c]}px`:r[c]}):l(a)}),n}var o2=y.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:o,className:a,offset:l,mobileOffset:c,theme:d="light",richColors:f,duration:h,style:p,visibleToasts:w=Qw,toastOptions:x,dir:b=Yf(),gap:m=e2,loadingIcon:g,icons:v,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:k}=e,[C,j]=_.useState([]),N=_.useMemo(()=>Array.from(new Set([r].concat(C.filter(B=>B.position).map(B=>B.position)))),[C,r]),[M,A]=_.useState([]),[z,U]=_.useState(!1),[we,Be]=_.useState(!1),[Tt,Ie]=_.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),$=_.useRef(null),P=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),R=_.useRef(null),D=_.useRef(!1),J=_.useCallback(B=>{j(H=>{var I;return(I=H.find(ce=>ce.id===B.id))!=null&&I.delete||Fe.dismiss(B.id),H.filter(({id:ce})=>ce!==B.id)})},[]);return _.useEffect(()=>Fe.subscribe(B=>{if(B.dismiss){j(H=>H.map(I=>I.id===B.id?{...I,delete:!0}:I));return}setTimeout(()=>{T1.flushSync(()=>{j(H=>{let I=H.findIndex(ce=>ce.id===B.id);return I!==-1?[...H.slice(0,I),{...H[I],...B},...H.slice(I+1)]:[B,...H]})})})}),[]),_.useEffect(()=>{if(d!=="system"){Ie(d);return}if(d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Ie("dark"):Ie("light")),typeof window>"u")return;let B=window.matchMedia("(prefers-color-scheme: dark)");try{B.addEventListener("change",({matches:H})=>{Ie(H?"dark":"light")})}catch{B.addListener(({matches:I})=>{try{Ie(I?"dark":"light")}catch(ce){console.error(ce)}})}},[d]),_.useEffect(()=>{C.length<=1&&U(!1)},[C]),_.useEffect(()=>{let B=H=>{var I,ce;s.every(Te=>H[Te]||H.code===Te)&&(U(!0),(I=$.current)==null||I.focus()),H.code==="Escape"&&(document.activeElement===$.current||(ce=$.current)!=null&&ce.contains(document.activeElement))&&U(!1)};return document.addEventListener("keydown",B),()=>document.removeEventListener("keydown",B)},[s]),_.useEffect(()=>{if($.current)return()=>{R.current&&(R.current.focus({preventScroll:!0}),R.current=null,D.current=!1)}},[$.current]),_.createElement("section",{ref:t,"aria-label":`${S} ${P}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},N.map((B,H)=>{var I;let[ce,Te]=B.split("-");return C.length?_.createElement("ol",{key:B,dir:b==="auto"?Yf():b,tabIndex:-1,ref:$,className:a,"data-sonner-toaster":!0,"data-theme":Tt,"data-y-position":ce,"data-lifted":z&&C.length>1&&!i,"data-x-position":Te,style:{"--front-toast-height":`${((I=M[0])==null?void 0:I.height)||0}px`,"--width":`${Zw}px`,"--gap":`${m}px`,...p,...i2(l,c)},onBlur:q=>{D.current&&!q.currentTarget.contains(q.relatedTarget)&&(D.current=!1,R.current&&(R.current.focus({preventScroll:!0}),R.current=null))},onFocus:q=>{q.target instanceof HTMLElement&&q.target.dataset.dismissible==="false"||D.current||(D.current=!0,R.current=q.relatedTarget)},onMouseEnter:()=>U(!0),onMouseMove:()=>U(!0),onMouseLeave:()=>{we||U(!1)},onDragEnd:()=>U(!1),onPointerDown:q=>{q.target instanceof HTMLElement&&q.target.dataset.dismissible==="false"||Be(!0)},onPointerUp:()=>Be(!1)},C.filter(q=>!q.position&&H===0||q.position===B).map((q,es)=>{var An,Mn;return _.createElement(s2,{key:q.id,icons:v,index:es,toast:q,defaultRichColors:f,duration:(An=x==null?void 0:x.duration)!=null?An:h,className:x==null?void 0:x.className,descriptionClassName:x==null?void 0:x.descriptionClassName,invert:n,visibleToasts:w,closeButton:(Mn=x==null?void 0:x.closeButton)!=null?Mn:o,interacting:we,position:B,style:x==null?void 0:x.style,unstyled:x==null?void 0:x.unstyled,classNames:x==null?void 0:x.classNames,cancelButtonStyle:x==null?void 0:x.cancelButtonStyle,actionButtonStyle:x==null?void 0:x.actionButtonStyle,removeToast:J,toasts:C.filter(Zt=>Zt.position==q.position),heights:M.filter(Zt=>Zt.position==q.position),setHeights:A,expandByDefault:i,gap:m,loadingIcon:g,expanded:z,pauseWhenPageIsHidden:k,swipeDirections:e.swipeDirections})})):null}))});const Dc=y.createContext({});function Oc(e){const t=y.useRef(null);return t.current===null&&(t.current=e()),t.current}const da=y.createContext(null),zc=y.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class a2 extends y.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function l2({children:e,isPresent:t}){const n=y.useId(),r=y.useRef(null),s=y.useRef({width:0,height:0,top:0,left:0}),{nonce:i}=y.useContext(zc);return y.useInsertionEffect(()=>{const{width:o,height:a,top:l,left:c}=s.current;if(t||!r.current||!o||!a)return;r.current.dataset.motionPopId=n;const d=document.createElement("style");return i&&(d.nonce=i),document.head.appendChild(d),d.sheet&&d.sheet.insertRule(`
|
|
69
|
+
[data-motion-pop-id="${n}"] {
|
|
70
|
+
position: absolute !important;
|
|
71
|
+
width: ${o}px !important;
|
|
72
|
+
height: ${a}px !important;
|
|
73
|
+
top: ${l}px !important;
|
|
74
|
+
left: ${c}px !important;
|
|
75
|
+
}
|
|
76
|
+
`),()=>{document.head.removeChild(d)}},[t]),u.jsx(a2,{isPresent:t,childRef:r,sizeRef:s,children:y.cloneElement(e,{ref:r})})}const u2=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:i,mode:o})=>{const a=Oc(c2),l=y.useId(),c=y.useCallback(f=>{a.set(f,!0);for(const h of a.values())if(!h)return;r&&r()},[a,r]),d=y.useMemo(()=>({id:l,initial:t,isPresent:n,custom:s,onExitComplete:c,register:f=>(a.set(f,!1),()=>a.delete(f))}),i?[Math.random(),c]:[n,c]);return y.useMemo(()=>{a.forEach((f,h)=>a.set(h,!1))},[n]),y.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),o==="popLayout"&&(e=u.jsx(l2,{isPresent:n,children:e})),u.jsx(da.Provider,{value:d,children:e})};function c2(){return new Map}function G0(e=!0){const t=y.useContext(da);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,i=y.useId();y.useEffect(()=>{e&&s(i)},[e]);const o=y.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,o]:[!0]}const zi=e=>e.key||"";function qf(e){const t=[];return y.Children.forEach(e,n=>{y.isValidElement(n)&&t.push(n)}),t}const Vc=typeof window<"u",Y0=Vc?y.useLayoutEffect:y.useEffect,We=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:i="sync",propagate:o=!1})=>{const[a,l]=G0(o),c=y.useMemo(()=>qf(e),[e]),d=o&&!a?[]:c.map(zi),f=y.useRef(!0),h=y.useRef(c),p=Oc(()=>new Map),[w,x]=y.useState(c),[b,m]=y.useState(c);Y0(()=>{f.current=!1,h.current=c;for(let S=0;S<b.length;S++){const k=zi(b[S]);d.includes(k)?p.delete(k):p.get(k)!==!0&&p.set(k,!1)}},[b,d.length,d.join("-")]);const g=[];if(c!==w){let S=[...c];for(let k=0;k<b.length;k++){const C=b[k],j=zi(C);d.includes(j)||(S.splice(k,0,C),g.push(C))}i==="wait"&&g.length&&(S=g),m(qf(S)),x(c);return}const{forceRender:v}=y.useContext(Dc);return u.jsx(u.Fragment,{children:b.map(S=>{const k=zi(S),C=o&&!a?!1:c===b||d.includes(k),j=()=>{if(p.has(k))p.set(k,!0);else return;let N=!0;p.forEach(M=>{M||(N=!1)}),N&&(v==null||v(),m(h.current),o&&(l==null||l()),r&&r())};return u.jsx(u2,{isPresent:C,initial:!f.current||n?void 0:!1,custom:C?void 0:t,presenceAffectsLayout:s,mode:i,onExitComplete:C?void 0:j,children:S},k)})})},Ze=e=>e;let q0=Ze;function Bc(e){let t;return()=>(t===void 0&&(t=e()),t)}const Fr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Wt=e=>e*1e3,Ht=e=>e/1e3,d2={useManualTiming:!1};function f2(e){let t=new Set,n=new Set,r=!1,s=!1;const i=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(c){i.has(c)&&(l.schedule(c),e()),c(o)}const l={schedule:(c,d=!1,f=!1)=>{const p=f&&r?t:n;return d&&i.add(c),p.has(c)||p.add(c),c},cancel:c=>{n.delete(c),i.delete(c)},process:c=>{if(o=c,r){s=!0;return}r=!0,[t,n]=[n,t],t.forEach(a),t.clear(),r=!1,s&&(s=!1,l.process(c))}};return l}const Vi=["read","resolveKeyframes","update","preRender","render","postRender"],h2=40;function Q0(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=Vi.reduce((m,g)=>(m[g]=f2(i),m),{}),{read:a,resolveKeyframes:l,update:c,preRender:d,render:f,postRender:h}=o,p=()=>{const m=performance.now();n=!1,s.delta=r?1e3/60:Math.max(Math.min(m-s.timestamp,h2),1),s.timestamp=m,s.isProcessing=!0,a.process(s),l.process(s),c.process(s),d.process(s),f.process(s),h.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(p))},w=()=>{n=!0,r=!0,s.isProcessing||e(p)};return{schedule:Vi.reduce((m,g)=>{const v=o[g];return m[g]=(S,k=!1,C=!1)=>(n||w(),v.schedule(S,k,C)),m},{}),cancel:m=>{for(let g=0;g<Vi.length;g++)o[Vi[g]].cancel(m)},state:s,steps:o}}const{schedule:re,cancel:jn,state:je,steps:Ja}=Q0(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ze,!0),X0=y.createContext({strict:!1}),Qf={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Ur={};for(const e in Qf)Ur[e]={isEnabled:t=>Qf[e].some(n=>!!t[n])};function p2(e){for(const t in e)Ur[t]={...Ur[t],...e[t]}}const m2=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Oo(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||m2.has(e)}let J0=e=>!Oo(e);function g2(e){e&&(J0=t=>t.startsWith("on")?!Oo(t):e(t))}try{g2(require("@emotion/is-prop-valid").default)}catch{}function y2(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||(J0(s)||n===!0&&Oo(s)||!t&&!Oo(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}function v2(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,s)=>s==="create"?e:(t.has(s)||t.set(s,e(s)),t.get(s))})}const fa=y.createContext({});function ti(e){return typeof e=="string"||Array.isArray(e)}function ha(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Ic=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Fc=["initial",...Ic];function pa(e){return ha(e.animate)||Fc.some(t=>ti(e[t]))}function Z0(e){return!!(pa(e)||e.variants)}function x2(e,t){if(pa(e)){const{initial:n,animate:r}=e;return{initial:n===!1||ti(n)?n:void 0,animate:ti(r)?r:void 0}}return e.inherit!==!1?t:{}}function w2(e){const{initial:t,animate:n}=x2(e,y.useContext(fa));return y.useMemo(()=>({initial:t,animate:n}),[Xf(t),Xf(n)])}function Xf(e){return Array.isArray(e)?e.join(" "):e}const k2=Symbol.for("motionComponentSymbol");function Sr(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function b2(e,t,n){return y.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Sr(n)&&(n.current=r))},[t])}const Uc=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),S2="framerAppearId",eg="data-"+Uc(S2),{schedule:$c}=Q0(queueMicrotask,!1),tg=y.createContext({});function N2(e,t,n,r,s){var i,o;const{visualElement:a}=y.useContext(fa),l=y.useContext(X0),c=y.useContext(da),d=y.useContext(zc).reducedMotion,f=y.useRef(null);r=r||l.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:a,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:d}));const h=f.current,p=y.useContext(tg);h&&!h.projection&&s&&(h.type==="html"||h.type==="svg")&&j2(f.current,n,s,p);const w=y.useRef(!1);y.useInsertionEffect(()=>{h&&w.current&&h.update(n,c)});const x=n[eg],b=y.useRef(!!x&&!(!((i=window.MotionHandoffIsComplete)===null||i===void 0)&&i.call(window,x))&&((o=window.MotionHasOptimisedAnimation)===null||o===void 0?void 0:o.call(window,x)));return Y0(()=>{h&&(w.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),$c.render(h.render),b.current&&h.animationState&&h.animationState.animateChanges())}),y.useEffect(()=>{h&&(!b.current&&h.animationState&&h.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{var m;(m=window.MotionHandoffMarkAsComplete)===null||m===void 0||m.call(window,x)}),b.current=!1))}),h}function j2(e,t,n,r){const{layoutId:s,layout:i,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:ng(e.parent)),e.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:!!o||a&&Sr(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function ng(e){if(e)return e.options.allowProjection!==!1?e.projection:ng(e.parent)}function C2({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:s}){var i,o;e&&p2(e);function a(c,d){let f;const h={...y.useContext(zc),...c,layoutId:E2(c)},{isStatic:p}=h,w=w2(c),x=r(c,p);if(!p&&Vc){T2();const b=P2(h);f=b.MeasureLayout,w.visualElement=N2(s,x,h,t,b.ProjectionNode)}return u.jsxs(fa.Provider,{value:w,children:[f&&w.visualElement?u.jsx(f,{visualElement:w.visualElement,...h}):null,n(s,c,b2(x,w.visualElement,d),x,p,w.visualElement)]})}a.displayName=`motion.${typeof s=="string"?s:`create(${(o=(i=s.displayName)!==null&&i!==void 0?i:s.name)!==null&&o!==void 0?o:""})`}`;const l=y.forwardRef(a);return l[k2]=s,l}function E2({layoutId:e}){const t=y.useContext(Dc).id;return t&&e!==void 0?t+"-"+e:e}function T2(e,t){y.useContext(X0).strict}function P2(e){const{drag:t,layout:n}=Ur;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const R2=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Wc(e){return typeof e!="string"||e.includes("-")?!1:!!(R2.indexOf(e)>-1||/[A-Z]/u.test(e))}function Jf(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Hc(e,t,n,r){if(typeof t=="function"){const[s,i]=Jf(r);t=t(n!==void 0?n:e.custom,s,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,i]=Jf(r);t=t(n!==void 0?n:e.custom,s,i)}return t}const fu=e=>Array.isArray(e),_2=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),A2=e=>fu(e)?e[e.length-1]||0:e,Me=e=>!!(e&&e.getVelocity);function no(e){const t=Me(e)?e.get():e;return _2(t)?t.toValue():t}function M2({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,s,i){const o={latestValues:L2(r,s,i,e),renderState:t()};return n&&(o.onMount=a=>n({props:r,current:a,...o}),o.onUpdate=a=>n(a)),o}const rg=e=>(t,n)=>{const r=y.useContext(fa),s=y.useContext(da),i=()=>M2(e,t,r,s);return n?i():Oc(i)};function L2(e,t,n,r){const s={},i=r(e,{});for(const h in i)s[h]=no(i[h]);let{initial:o,animate:a}=e;const l=pa(e),c=Z0(e);t&&c&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let d=n?n.initial===!1:!1;d=d||o===!1;const f=d?a:o;if(f&&typeof f!="boolean"&&!ha(f)){const h=Array.isArray(f)?f:[f];for(let p=0;p<h.length;p++){const w=Hc(e,h[p]);if(w){const{transitionEnd:x,transition:b,...m}=w;for(const g in m){let v=m[g];if(Array.isArray(v)){const S=d?v.length-1:0;v=v[S]}v!==null&&(s[g]=v)}for(const g in x)s[g]=x[g]}}}return s}const Qr=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],rr=new Set(Qr),sg=e=>t=>typeof t=="string"&&t.startsWith(e),ig=sg("--"),D2=sg("var(--"),Kc=e=>D2(e)?O2.test(e.split("/*")[0].trim()):!1,O2=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,og=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Qt=(e,t,n)=>n>t?t:n<e?e:n,Xr={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ni={...Xr,transform:e=>Qt(0,1,e)},Bi={...Xr,default:1},hi=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),sn=hi("deg"),Dt=hi("%"),V=hi("px"),z2=hi("vh"),V2=hi("vw"),Zf={...Dt,parse:e=>Dt.parse(e)/100,transform:e=>Dt.transform(e*100)},B2={borderWidth:V,borderTopWidth:V,borderRightWidth:V,borderBottomWidth:V,borderLeftWidth:V,borderRadius:V,radius:V,borderTopLeftRadius:V,borderTopRightRadius:V,borderBottomRightRadius:V,borderBottomLeftRadius:V,width:V,maxWidth:V,height:V,maxHeight:V,top:V,right:V,bottom:V,left:V,padding:V,paddingTop:V,paddingRight:V,paddingBottom:V,paddingLeft:V,margin:V,marginTop:V,marginRight:V,marginBottom:V,marginLeft:V,backgroundPositionX:V,backgroundPositionY:V},I2={rotate:sn,rotateX:sn,rotateY:sn,rotateZ:sn,scale:Bi,scaleX:Bi,scaleY:Bi,scaleZ:Bi,skew:sn,skewX:sn,skewY:sn,distance:V,translateX:V,translateY:V,translateZ:V,x:V,y:V,z:V,perspective:V,transformPerspective:V,opacity:ni,originX:Zf,originY:Zf,originZ:V},eh={...Xr,transform:Math.round},Gc={...B2,...I2,zIndex:eh,size:V,fillOpacity:ni,strokeOpacity:ni,numOctaves:eh},F2={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},U2=Qr.length;function $2(e,t,n){let r="",s=!0;for(let i=0;i<U2;i++){const o=Qr[i],a=e[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=og(a,Gc[o]);if(!l){s=!1;const d=F2[o]||o;r+=`${d}(${c}) `}n&&(t[o]=c)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function Yc(e,t,n){const{style:r,vars:s,transformOrigin:i}=e;let o=!1,a=!1;for(const l in t){const c=t[l];if(rr.has(l)){o=!0;continue}else if(ig(l)){s[l]=c;continue}else{const d=og(c,Gc[l]);l.startsWith("origin")?(a=!0,i[l]=d):r[l]=d}}if(t.transform||(o||n?r.transform=$2(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:d=0}=i;r.transformOrigin=`${l} ${c} ${d}`}}const W2={offset:"stroke-dashoffset",array:"stroke-dasharray"},H2={offset:"strokeDashoffset",array:"strokeDasharray"};function K2(e,t,n=1,r=0,s=!0){e.pathLength=1;const i=s?W2:H2;e[i.offset]=V.transform(-r);const o=V.transform(t),a=V.transform(n);e[i.array]=`${o} ${a}`}function th(e,t,n){return typeof e=="string"?e:V.transform(t+n*e)}function G2(e,t,n){const r=th(t,e.x,e.width),s=th(n,e.y,e.height);return`${r} ${s}`}function qc(e,{attrX:t,attrY:n,attrScale:r,originX:s,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...c},d,f){if(Yc(e,c,f),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:p,dimensions:w}=e;h.transform&&(w&&(p.transform=h.transform),delete h.transform),w&&(s!==void 0||i!==void 0||p.transform)&&(p.transformOrigin=G2(w,s!==void 0?s:.5,i!==void 0?i:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),o!==void 0&&K2(h,o,a,l,!1)}const Qc=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),ag=()=>({...Qc(),attrs:{}}),Xc=e=>typeof e=="string"&&e.toLowerCase()==="svg";function lg(e,{style:t,vars:n},r,s){Object.assign(e.style,t,s&&s.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const ug=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function cg(e,t,n,r){lg(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(ug.has(s)?s:Uc(s),t.attrs[s])}const zo={};function Y2(e){Object.assign(zo,e)}function dg(e,{layout:t,layoutId:n}){return rr.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!zo[e]||e==="opacity")}function Jc(e,t,n){var r;const{style:s}=e,i={};for(const o in s)(Me(s[o])||t.style&&Me(t.style[o])||dg(o,e)||((r=n==null?void 0:n.getValue(o))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(i[o]=s[o]);return i}function fg(e,t,n){const r=Jc(e,t,n);for(const s in e)if(Me(e[s])||Me(t[s])){const i=Qr.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[i]=e[s]}return r}function q2(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}const nh=["x","y","width","height","cx","cy","r"],Q2={useVisualState:rg({scrapeMotionValuesFromProps:fg,createRenderState:ag,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:s})=>{if(!n)return;let i=!!e.drag;if(!i){for(const a in s)if(rr.has(a)){i=!0;break}}if(!i)return;let o=!t;if(t)for(let a=0;a<nh.length;a++){const l=nh[a];e[l]!==t[l]&&(o=!0)}o&&re.read(()=>{q2(n,r),re.render(()=>{qc(r,s,Xc(n.tagName),e.transformTemplate),cg(n,r)})})}})},X2={useVisualState:rg({scrapeMotionValuesFromProps:Jc,createRenderState:Qc})};function hg(e,t,n){for(const r in t)!Me(t[r])&&!dg(r,n)&&(e[r]=t[r])}function J2({transformTemplate:e},t){return y.useMemo(()=>{const n=Qc();return Yc(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Z2(e,t){const n=e.style||{},r={};return hg(r,n,e),Object.assign(r,J2(e,t)),r}function ek(e,t){const n={},r=Z2(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}function tk(e,t,n,r){const s=y.useMemo(()=>{const i=ag();return qc(i,t,Xc(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};hg(i,e.style,e),s.style={...i,...s.style}}return s}function nk(e=!1){return(n,r,s,{latestValues:i},o)=>{const l=(Wc(n)?tk:ek)(r,i,o,n),c=y2(r,typeof n=="string",e),d=n!==y.Fragment?{...c,...l,ref:s}:{},{children:f}=r,h=y.useMemo(()=>Me(f)?f.get():f,[f]);return y.createElement(n,{...d,children:h})}}function rk(e,t){return function(r,{forwardMotionProps:s}={forwardMotionProps:!1}){const o={...Wc(r)?Q2:X2,preloadedFeatures:e,useRender:nk(s),createVisualElement:t,Component:r};return C2(o)}}function pg(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function ma(e,t,n){const r=e.getProps();return Hc(r,t,n!==void 0?n:r.custom,e)}const sk=Bc(()=>window.ScrollTimeline!==void 0);class ik{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(s=>{if(sk()&&s.attachTimeline)return s.attachTimeline(t);if(typeof n=="function")return n(s)});return()=>{r.forEach((s,i)=>{s&&s(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class ok extends ik{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function Zc(e,t){return e?e[t]||e.default||e:void 0}const hu=2e4;function mg(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<hu;)t+=n,r=e.next(t);return t>=hu?1/0:t}function ed(e){return typeof e=="function"}function rh(e,t){e.timeline=t,e.onfinish=null}const td=e=>Array.isArray(e)&&typeof e[0]=="number",ak={linearEasing:void 0};function lk(e,t){const n=Bc(e);return()=>{var r;return(r=ak[t])!==null&&r!==void 0?r:n()}}const Vo=lk(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),gg=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let i=0;i<s;i++)r+=e(Fr(0,s-1,i))+", ";return`linear(${r.substring(0,r.length-2)})`};function yg(e){return!!(typeof e=="function"&&Vo()||!e||typeof e=="string"&&(e in pu||Vo())||td(e)||Array.isArray(e)&&e.every(yg))}const gs=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,pu={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:gs([0,.65,.55,1]),circOut:gs([.55,0,1,.45]),backIn:gs([.31,.01,.66,-.59]),backOut:gs([.33,1.53,.69,.99])};function vg(e,t){if(e)return typeof e=="function"&&Vo()?gg(e,t):td(e)?gs(e):Array.isArray(e)?e.map(n=>vg(n,t)||pu.easeOut):pu[e]}const xt={x:!1,y:!1};function xg(){return xt.x||xt.y}function uk(e,t,n){var r;if(e instanceof Element)return[e];if(typeof e=="string"){let s=document;const i=(r=void 0)!==null&&r!==void 0?r:s.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}function wg(e,t){const n=uk(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function sh(e){return t=>{t.pointerType==="touch"||xg()||e(t)}}function ck(e,t,n={}){const[r,s,i]=wg(e,n),o=sh(a=>{const{target:l}=a,c=t(a);if(typeof c!="function"||!l)return;const d=sh(f=>{c(f),l.removeEventListener("pointerleave",d)});l.addEventListener("pointerleave",d,s)});return r.forEach(a=>{a.addEventListener("pointerenter",o,s)}),i}const kg=(e,t)=>t?e===t?!0:kg(e,t.parentElement):!1,nd=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,dk=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function fk(e){return dk.has(e.tagName)||e.tabIndex!==-1}const ys=new WeakSet;function ih(e){return t=>{t.key==="Enter"&&e(t)}}function Za(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const hk=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=ih(()=>{if(ys.has(n))return;Za(n,"down");const s=ih(()=>{Za(n,"up")}),i=()=>Za(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function oh(e){return nd(e)&&!xg()}function pk(e,t,n={}){const[r,s,i]=wg(e,n),o=a=>{const l=a.currentTarget;if(!oh(a)||ys.has(l))return;ys.add(l);const c=t(a),d=(p,w)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",h),!(!oh(p)||!ys.has(l))&&(ys.delete(l),typeof c=="function"&&c(p,{success:w}))},f=p=>{d(p,n.useGlobalTarget||kg(l,p.target))},h=p=>{d(p,!1)};window.addEventListener("pointerup",f,s),window.addEventListener("pointercancel",h,s)};return r.forEach(a=>{!fk(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0),(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,s),a.addEventListener("focus",c=>hk(c,s),s)}),i}function mk(e){return e==="x"||e==="y"?xt[e]?null:(xt[e]=!0,()=>{xt[e]=!1}):xt.x||xt.y?null:(xt.x=xt.y=!0,()=>{xt.x=xt.y=!1})}const bg=new Set(["width","height","top","left","right","bottom",...Qr]);let ro;function gk(){ro=void 0}const Ot={now:()=>(ro===void 0&&Ot.set(je.isProcessing||d2.useManualTiming?je.timestamp:performance.now()),ro),set:e=>{ro=e,queueMicrotask(gk)}};function rd(e,t){e.indexOf(t)===-1&&e.push(t)}function sd(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class id{constructor(){this.subscriptions=[]}add(t){return rd(this.subscriptions,t),()=>sd(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let i=0;i<s;i++){const o=this.subscriptions[i];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function Sg(e,t){return t?e*(1e3/t):0}const ah=30,yk=e=>!isNaN(parseFloat(e));class vk{constructor(t,n={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,s=!0)=>{const i=Ot.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),s&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Ot.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=yk(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new id);const r=this.events[t].add(n);return t==="change"?()=>{r(),re.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Ot.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>ah)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,ah);return Sg(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ri(e,t){return new vk(e,t)}function xk(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,ri(n))}function wk(e,t){const n=ma(e,t);let{transitionEnd:r={},transition:s={},...i}=n||{};i={...i,...r};for(const o in i){const a=A2(i[o]);xk(e,o,a)}}function kk(e){return!!(Me(e)&&e.add)}function mu(e,t){const n=e.getValue("willChange");if(kk(n))return n.add(t)}function Ng(e){return e.props[eg]}const jg=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,bk=1e-7,Sk=12;function Nk(e,t,n,r,s){let i,o,a=0;do o=t+(n-t)/2,i=jg(o,r,s)-e,i>0?n=o:t=o;while(Math.abs(i)>bk&&++a<Sk);return o}function pi(e,t,n,r){if(e===t&&n===r)return Ze;const s=i=>Nk(i,0,1,e,n);return i=>i===0||i===1?i:jg(s(i),t,r)}const Cg=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Eg=e=>t=>1-e(1-t),Tg=pi(.33,1.53,.69,.99),od=Eg(Tg),Pg=Cg(od),Rg=e=>(e*=2)<1?.5*od(e):.5*(2-Math.pow(2,-10*(e-1))),ad=e=>1-Math.sin(Math.acos(e)),_g=Eg(ad),Ag=Cg(ad),Mg=e=>/^0[^.\s]+$/u.test(e);function jk(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Mg(e):!0}const Rs=e=>Math.round(e*1e5)/1e5,ld=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ck(e){return e==null}const Ek=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ud=(e,t)=>n=>!!(typeof n=="string"&&Ek.test(n)&&n.startsWith(e)||t&&!Ck(n)&&Object.prototype.hasOwnProperty.call(n,t)),Lg=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,i,o,a]=r.match(ld);return{[e]:parseFloat(s),[t]:parseFloat(i),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Tk=e=>Qt(0,255,e),el={...Xr,transform:e=>Math.round(Tk(e))},Hn={test:ud("rgb","red"),parse:Lg("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+el.transform(e)+", "+el.transform(t)+", "+el.transform(n)+", "+Rs(ni.transform(r))+")"};function Pk(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const gu={test:ud("#"),parse:Pk,transform:Hn.transform},Nr={test:ud("hsl","hue"),parse:Lg("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Dt.transform(Rs(t))+", "+Dt.transform(Rs(n))+", "+Rs(ni.transform(r))+")"},_e={test:e=>Hn.test(e)||gu.test(e)||Nr.test(e),parse:e=>Hn.test(e)?Hn.parse(e):Nr.test(e)?Nr.parse(e):gu.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Hn.transform(e):Nr.transform(e)},Rk=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function _k(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(ld))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(Rk))===null||n===void 0?void 0:n.length)||0)>0}const Dg="number",Og="color",Ak="var",Mk="var(",lh="${}",Lk=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function si(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let i=0;const a=t.replace(Lk,l=>(_e.test(l)?(r.color.push(i),s.push(Og),n.push(_e.parse(l))):l.startsWith(Mk)?(r.var.push(i),s.push(Ak),n.push(l)):(r.number.push(i),s.push(Dg),n.push(parseFloat(l))),++i,lh)).split(lh);return{values:n,split:a,indexes:r,types:s}}function zg(e){return si(e).values}function Vg(e){const{split:t,types:n}=si(e),r=t.length;return s=>{let i="";for(let o=0;o<r;o++)if(i+=t[o],s[o]!==void 0){const a=n[o];a===Dg?i+=Rs(s[o]):a===Og?i+=_e.transform(s[o]):i+=s[o]}return i}}const Dk=e=>typeof e=="number"?0:e;function Ok(e){const t=zg(e);return Vg(e)(t.map(Dk))}const Cn={test:_k,parse:zg,createTransformer:Vg,getAnimatableNone:Ok},zk=new Set(["brightness","contrast","saturate","opacity"]);function Vk(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(ld)||[];if(!r)return e;const s=n.replace(r,"");let i=zk.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+s+")"}const Bk=/\b([a-z-]*)\(.*?\)/gu,yu={...Cn,getAnimatableNone:e=>{const t=e.match(Bk);return t?t.map(Vk).join(" "):e}},Ik={...Gc,color:_e,backgroundColor:_e,outlineColor:_e,fill:_e,stroke:_e,borderColor:_e,borderTopColor:_e,borderRightColor:_e,borderBottomColor:_e,borderLeftColor:_e,filter:yu,WebkitFilter:yu},cd=e=>Ik[e];function Bg(e,t){let n=cd(e);return n!==yu&&(n=Cn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Fk=new Set(["auto","none","0"]);function Uk(e,t,n){let r=0,s;for(;r<e.length&&!s;){const i=e[r];typeof i=="string"&&!Fk.has(i)&&si(i).values.length&&(s=e[r]),r++}if(s&&n)for(const i of t)e[i]=Bg(n,s)}const uh=e=>e===Xr||e===V,ch=(e,t)=>parseFloat(e.split(", ")[t]),dh=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const s=r.match(/^matrix3d\((.+)\)$/u);if(s)return ch(s[1],t);{const i=r.match(/^matrix\((.+)\)$/u);return i?ch(i[1],e):0}},$k=new Set(["x","y","z"]),Wk=Qr.filter(e=>!$k.has(e));function Hk(e){const t=[];return Wk.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const $r={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:dh(4,13),y:dh(5,14)};$r.translateX=$r.x;$r.translateY=$r.y;const Yn=new Set;let vu=!1,xu=!1;function Ig(){if(xu){const e=Array.from(Yn).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=Hk(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([i,o])=>{var a;(a=r.getValue(i))===null||a===void 0||a.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}xu=!1,vu=!1,Yn.forEach(e=>e.complete()),Yn.clear()}function Fg(){Yn.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(xu=!0)})}function Kk(){Fg(),Ig()}class dd{constructor(t,n,r,s,i,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=i,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Yn.add(this),vu||(vu=!0,re.read(Fg),re.resolveKeyframes(Ig))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;for(let i=0;i<t.length;i++)if(t[i]===null)if(i===0){const o=s==null?void 0:s.get(),a=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),s&&o===void 0&&s.set(t[0])}else t[i]=t[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Yn.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Yn.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Ug=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Gk=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Yk(e){const t=Gk.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}function $g(e,t,n=1){const[r,s]=Yk(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const o=i.trim();return Ug(o)?parseFloat(o):o}return Kc(s)?$g(s,t,n+1):s}const Wg=e=>t=>t.test(e),qk={test:e=>e==="auto",parse:e=>e},Hg=[Xr,V,Dt,sn,V2,z2,qk],fh=e=>Hg.find(Wg(e));class Kg extends dd{constructor(t,n,r,s,i){super(t,n,r,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),Kc(c))){const d=$g(c,n.current);d!==void 0&&(t[l]=d),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!bg.has(r)||t.length!==2)return;const[s,i]=t,o=fh(s),a=fh(i);if(o!==a)if(uh(o)&&uh(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)jk(t[s])&&r.push(s);r.length&&Uk(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=$r[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:s}=this;if(!n||!n.current)return;const i=n.getValue(r);i&&i.jump(this.measuredOrigin,!1);const o=s.length-1,a=s[o];s[o]=$r[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const hh=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Cn.test(e)||e==="0")&&!e.startsWith("url("));function Qk(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Xk(e,t,n,r){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],o=hh(s,t),a=hh(i,t);return!o||!a?!1:Qk(e)||(n==="spring"||ed(n))&&r}const Jk=e=>e!==null;function ga(e,{repeat:t,repeatType:n="loop"},r){const s=e.filter(Jk),i=t&&n!=="loop"&&t%2===1?0:s.length-1;return!i||r===void 0?s[i]:r}const Zk=40;class Gg{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:o="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Ot.now(),this.options={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:i,repeatType:o,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>Zk?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&Kk(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Ot.now(),this.hasAttemptedResolve=!0;const{name:r,type:s,velocity:i,delay:o,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!Xk(t,r,s,i))if(o)this.options.duration=0;else{l&&l(ga(t,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const d=this.initPlayback(t,n);d!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...d},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const ae=(e,t,n)=>e+(t-e)*n;function tl(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function eb({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,i=0,o=0;if(!t)s=i=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;s=tl(l,a,e+1/3),i=tl(l,a,e),o=tl(l,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:r}}function Bo(e,t){return n=>n>0?t:e}const nl=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},tb=[gu,Hn,Nr],nb=e=>tb.find(t=>t.test(e));function ph(e){const t=nb(e);if(!t)return!1;let n=t.parse(e);return t===Nr&&(n=eb(n)),n}const mh=(e,t)=>{const n=ph(e),r=ph(t);if(!n||!r)return Bo(e,t);const s={...n};return i=>(s.red=nl(n.red,r.red,i),s.green=nl(n.green,r.green,i),s.blue=nl(n.blue,r.blue,i),s.alpha=ae(n.alpha,r.alpha,i),Hn.transform(s))},rb=(e,t)=>n=>t(e(n)),mi=(...e)=>e.reduce(rb),wu=new Set(["none","hidden"]);function sb(e,t){return wu.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function ib(e,t){return n=>ae(e,t,n)}function fd(e){return typeof e=="number"?ib:typeof e=="string"?Kc(e)?Bo:_e.test(e)?mh:lb:Array.isArray(e)?Yg:typeof e=="object"?_e.test(e)?mh:ob:Bo}function Yg(e,t){const n=[...e],r=n.length,s=e.map((i,o)=>fd(i)(i,t[o]));return i=>{for(let o=0;o<r;o++)n[o]=s[o](i);return n}}function ob(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=fd(e[s])(e[s],t[s]));return s=>{for(const i in r)n[i]=r[i](s);return n}}function ab(e,t){var n;const r=[],s={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const o=t.types[i],a=e.indexes[o][s[o]],l=(n=e.values[a])!==null&&n!==void 0?n:0;r[i]=l,s[o]++}return r}const lb=(e,t)=>{const n=Cn.createTransformer(t),r=si(e),s=si(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?wu.has(e)&&!s.values.length||wu.has(t)&&!r.values.length?sb(e,t):mi(Yg(ab(r,s),s.values),n):Bo(e,t)};function qg(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ae(e,t,n):fd(e)(e,t)}const ub=5;function Qg(e,t,n){const r=Math.max(t-ub,0);return Sg(n-e(r),t-r)}const de={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},rl=.001;function cb({duration:e=de.duration,bounce:t=de.bounce,velocity:n=de.velocity,mass:r=de.mass}){let s,i,o=1-t;o=Qt(de.minDamping,de.maxDamping,o),e=Qt(de.minDuration,de.maxDuration,Ht(e)),o<1?(s=c=>{const d=c*o,f=d*e,h=d-n,p=ku(c,o),w=Math.exp(-f);return rl-h/p*w},i=c=>{const f=c*o*e,h=f*n+n,p=Math.pow(o,2)*Math.pow(c,2)*e,w=Math.exp(-f),x=ku(Math.pow(c,2),o);return(-s(c)+rl>0?-1:1)*((h-p)*w)/x}):(s=c=>{const d=Math.exp(-c*e),f=(c-n)*e+1;return-rl+d*f},i=c=>{const d=Math.exp(-c*e),f=(n-c)*(e*e);return d*f});const a=5/e,l=fb(s,i,a);if(e=Wt(e),isNaN(l))return{stiffness:de.stiffness,damping:de.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:o*2*Math.sqrt(r*c),duration:e}}}const db=12;function fb(e,t,n){let r=n;for(let s=1;s<db;s++)r=r-e(r)/t(r);return r}function ku(e,t){return e*Math.sqrt(1-t*t)}const hb=["duration","bounce"],pb=["stiffness","damping","mass"];function gh(e,t){return t.some(n=>e[n]!==void 0)}function mb(e){let t={velocity:de.velocity,stiffness:de.stiffness,damping:de.damping,mass:de.mass,isResolvedFromDuration:!1,...e};if(!gh(e,pb)&&gh(e,hb))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,i=2*Qt(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:de.mass,stiffness:s,damping:i}}else{const n=cb(e);t={...t,...n,mass:de.mass},t.isResolvedFromDuration=!0}return t}function Xg(e=de.visualDuration,t=de.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const i=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:l,damping:c,mass:d,duration:f,velocity:h,isResolvedFromDuration:p}=mb({...n,velocity:-Ht(n.velocity||0)}),w=h||0,x=c/(2*Math.sqrt(l*d)),b=o-i,m=Ht(Math.sqrt(l/d)),g=Math.abs(b)<5;r||(r=g?de.restSpeed.granular:de.restSpeed.default),s||(s=g?de.restDelta.granular:de.restDelta.default);let v;if(x<1){const k=ku(m,x);v=C=>{const j=Math.exp(-x*m*C);return o-j*((w+x*m*b)/k*Math.sin(k*C)+b*Math.cos(k*C))}}else if(x===1)v=k=>o-Math.exp(-m*k)*(b+(w+m*b)*k);else{const k=m*Math.sqrt(x*x-1);v=C=>{const j=Math.exp(-x*m*C),N=Math.min(k*C,300);return o-j*((w+x*m*b)*Math.sinh(N)+k*b*Math.cosh(N))/k}}const S={calculatedDuration:p&&f||null,next:k=>{const C=v(k);if(p)a.done=k>=f;else{let j=0;x<1&&(j=k===0?Wt(w):Qg(v,k,C));const N=Math.abs(j)<=r,M=Math.abs(o-C)<=s;a.done=N&&M}return a.value=a.done?o:C,a},toString:()=>{const k=Math.min(mg(S),hu),C=gg(j=>S.next(k*j).value,k,30);return k+"ms "+C}};return S}function yh({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:d}){const f=e[0],h={done:!1,value:f},p=N=>a!==void 0&&N<a||l!==void 0&&N>l,w=N=>a===void 0?l:l===void 0||Math.abs(a-N)<Math.abs(l-N)?a:l;let x=n*t;const b=f+x,m=o===void 0?b:o(b);m!==b&&(x=m-f);const g=N=>-x*Math.exp(-N/r),v=N=>m+g(N),S=N=>{const M=g(N),A=v(N);h.done=Math.abs(M)<=c,h.value=h.done?m:A};let k,C;const j=N=>{p(h.value)&&(k=N,C=Xg({keyframes:[h.value,w(h.value)],velocity:Qg(v,N,h.value),damping:s,stiffness:i,restDelta:c,restSpeed:d}))};return j(0),{calculatedDuration:null,next:N=>{let M=!1;return!C&&k===void 0&&(M=!0,S(N),j(N)),k!==void 0&&N>=k?C.next(N-k):(!M&&S(N),h)}}}const gb=pi(.42,0,1,1),yb=pi(0,0,.58,1),Jg=pi(.42,0,.58,1),vb=e=>Array.isArray(e)&&typeof e[0]!="number",xb={linear:Ze,easeIn:gb,easeInOut:Jg,easeOut:yb,circIn:ad,circInOut:Ag,circOut:_g,backIn:od,backInOut:Pg,backOut:Tg,anticipate:Rg},vh=e=>{if(td(e)){q0(e.length===4);const[t,n,r,s]=e;return pi(t,n,r,s)}else if(typeof e=="string")return xb[e];return e};function wb(e,t,n){const r=[],s=n||qg,i=e.length-1;for(let o=0;o<i;o++){let a=s(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||Ze:t;a=mi(l,a)}r.push(a)}return r}function kb(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const i=e.length;if(q0(i===t.length),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=wb(t,r,s),l=a.length,c=d=>{if(o&&d<e[0])return t[0];let f=0;if(l>1)for(;f<e.length-2&&!(d<e[f+1]);f++);const h=Fr(e[f],e[f+1],d);return a[f](h)};return n?d=>c(Qt(e[0],e[i-1],d)):c}function bb(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=Fr(0,t,r);e.push(ae(n,1,s))}}function Sb(e){const t=[0];return bb(t,e.length-1),t}function Nb(e,t){return e.map(n=>n*t)}function jb(e,t){return e.map(()=>t||Jg).splice(0,e.length-1)}function Io({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=vb(r)?r.map(vh):vh(r),i={done:!1,value:t[0]},o=Nb(n&&n.length===t.length?n:Sb(t),e),a=kb(o,t,{ease:Array.isArray(s)?s:jb(t,s)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}const Cb=e=>{const t=({timestamp:n})=>e(n);return{start:()=>re.update(t,!0),stop:()=>jn(t),now:()=>je.isProcessing?je.timestamp:Ot.now()}},Eb={decay:yh,inertia:yh,tween:Io,keyframes:Io,spring:Xg},Tb=e=>e/100;class hd extends Gg{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:s,keyframes:i}=this.options,o=(s==null?void 0:s.KeyframeResolver)||dd,a=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new o(i,a,n,r,s),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:s=0,repeatType:i,velocity:o=0}=this.options,a=ed(n)?n:Eb[n]||Io;let l,c;a!==Io&&typeof t[0]!="number"&&(l=mi(Tb,qg(t[0],t[1])),t=[0,100]);const d=a({...this.options,keyframes:t});i==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-o})),d.calculatedDuration===null&&(d.calculatedDuration=mg(d));const{calculatedDuration:f}=d,h=f+s,p=h*(r+1)-s;return{generator:d,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:f,resolvedDuration:h,totalDuration:p}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:N}=this.options;return{done:!0,value:N[N.length-1]}}const{finalKeyframe:s,generator:i,mirroredGenerator:o,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:d,resolvedDuration:f}=r;if(this.startTime===null)return i.next(0);const{delay:h,repeat:p,repeatType:w,repeatDelay:x,onUpdate:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-d/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const m=this.currentTime-h*(this.speed>=0?1:-1),g=this.speed>=0?m<0:m>d;this.currentTime=Math.max(m,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=d);let v=this.currentTime,S=i;if(p){const N=Math.min(this.currentTime,d)/f;let M=Math.floor(N),A=N%1;!A&&N>=1&&(A=1),A===1&&M--,M=Math.min(M,p+1),!!(M%2)&&(w==="reverse"?(A=1-A,x&&(A-=x/f)):w==="mirror"&&(S=o)),v=Qt(0,1,A)*f}const k=g?{done:!1,value:l[0]}:S.next(v);a&&(k.value=a(k.value));let{done:C}=k;!g&&c!==null&&(C=this.speed>=0?this.currentTime>=d:this.currentTime<=0);const j=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return j&&s!==void 0&&(k.value=ga(l,this.options,s)),b&&b(k.value),j&&this.finish(),k}get duration(){const{resolved:t}=this;return t?Ht(t.calculatedDuration):0}get time(){return Ht(this.currentTime)}set time(t){t=Wt(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Ht(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=Cb,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),n&&n();const s=this.driver.now();this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=s):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const Pb=new Set(["opacity","clipPath","filter","transform"]);function Rb(e,t,n,{delay:r=0,duration:s=300,repeat:i=0,repeatType:o="loop",ease:a="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const d=vg(a,s);return Array.isArray(d)&&(c.easing=d),e.animate(c,{delay:r,duration:s,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"})}const _b=Bc(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Fo=10,Ab=2e4;function Mb(e){return ed(e.type)||e.type==="spring"||!yg(e.ease)}function Lb(e,t){const n=new hd({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const s=[];let i=0;for(;!r.done&&i<Ab;)r=n.sample(i),s.push(r.value),i+=Fo;return{times:void 0,keyframes:s,duration:i-Fo,ease:"linear"}}const Zg={anticipate:Rg,backInOut:Pg,circInOut:Ag};function Db(e){return e in Zg}class xh extends Gg{constructor(t){super(t);const{name:n,motionValue:r,element:s,keyframes:i}=this.options;this.resolver=new Kg(i,(o,a)=>this.onKeyframesResolved(o,a),n,r,s),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:s,ease:i,type:o,motionValue:a,name:l,startTime:c}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof i=="string"&&Vo()&&Db(i)&&(i=Zg[i]),Mb(this.options)){const{onComplete:f,onUpdate:h,motionValue:p,element:w,...x}=this.options,b=Lb(t,x);t=b.keyframes,t.length===1&&(t[1]=t[0]),r=b.duration,s=b.times,i=b.ease,o="keyframes"}const d=Rb(a.owner.current,l,t,{...this.options,duration:r,times:s,ease:i});return d.startTime=c??this.calcStartTime(),this.pendingTimeline?(rh(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:f}=this.options;a.set(ga(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:r,times:s,type:o,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Ht(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Ht(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=Wt(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Ze;const{animation:r}=n;rh(r,t)}return Ze}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:s,type:i,ease:o,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:d,onComplete:f,element:h,...p}=this.options,w=new hd({...p,keyframes:r,duration:s,type:i,ease:o,times:a,isGenerator:!0}),x=Wt(this.time);c.setWithVelocity(w.sample(x-Fo).value,w.sample(x).value,Fo)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:s,repeatType:i,damping:o,type:a}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=n.owner.getProps();return _b()&&r&&Pb.has(r)&&!l&&!c&&!s&&i!=="mirror"&&o!==0&&a!=="inertia"}}const Ob={type:"spring",stiffness:500,damping:25,restSpeed:10},zb=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Vb={type:"keyframes",duration:.8},Bb={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ib=(e,{keyframes:t})=>t.length>2?Vb:rr.has(e)?e.startsWith("scale")?zb(t[1]):Ob:Bb;function Fb({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:s,repeat:i,repeatType:o,repeatDelay:a,from:l,elapsed:c,...d}){return!!Object.keys(d).length}const pd=(e,t,n,r={},s,i)=>o=>{const a=Zc(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-Wt(l);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:h=>{t.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:s};Fb(a)||(d={...d,...Ib(e,d)}),d.duration&&(d.duration=Wt(d.duration)),d.repeatDelay&&(d.repeatDelay=Wt(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(f=!0)),f&&!i&&t.get()!==void 0){const h=ga(d.keyframes,a);if(h!==void 0)return re.update(()=>{d.onUpdate(h),d.onComplete()}),new ok([])}return!i&&xh.supports(d)?new xh(d):new hd(d)};function Ub({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function ey(e,t,{delay:n=0,transitionOverride:r,type:s}={}){var i;let{transition:o=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(o=r);const c=[],d=s&&e.animationState&&e.animationState.getState()[s];for(const f in l){const h=e.getValue(f,(i=e.latestValues[f])!==null&&i!==void 0?i:null),p=l[f];if(p===void 0||d&&Ub(d,f))continue;const w={delay:n,...Zc(o||{},f)};let x=!1;if(window.MotionHandoffAnimation){const m=Ng(e);if(m){const g=window.MotionHandoffAnimation(m,f,re);g!==null&&(w.startTime=g,x=!0)}}mu(e,f),h.start(pd(f,h,p,e.shouldReduceMotion&&bg.has(f)?{type:!1}:w,e,x));const b=h.animation;b&&c.push(b)}return a&&Promise.all(c).then(()=>{re.update(()=>{a&&wk(e,a)})}),c}function bu(e,t,n={}){var r;const s=ma(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(ey(e,s,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:d=0,staggerChildren:f,staggerDirection:h}=i;return $b(e,t,d+c,f,h,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[c,d]=l==="beforeChildren"?[o,a]:[a,o];return c().then(()=>d())}else return Promise.all([o(),a(n.delay)])}function $b(e,t,n=0,r=0,s=1,i){const o=[],a=(e.variantChildren.size-1)*r,l=s===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(Wb).forEach((c,d)=>{c.notify("AnimationStart",t),o.push(bu(c,t,{...i,delay:n+l(d)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(o)}function Wb(e,t){return e.sortNodePosition(t)}function Hb(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(i=>bu(e,i,n));r=Promise.all(s)}else if(typeof t=="string")r=bu(e,t,n);else{const s=typeof t=="function"?ma(e,t,n.custom):t;r=Promise.all(ey(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const Kb=Fc.length;function ty(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?ty(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Kb;n++){const r=Fc[n],s=e.props[r];(ti(s)||s===!1)&&(t[r]=s)}return t}const Gb=[...Ic].reverse(),Yb=Ic.length;function qb(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Hb(e,n,r)))}function Qb(e){let t=qb(e),n=wh(),r=!0;const s=l=>(c,d)=>{var f;const h=ma(e,d,l==="exit"?(f=e.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(h){const{transition:p,transitionEnd:w,...x}=h;c={...c,...x,...w}}return c};function i(l){t=l(e)}function o(l){const{props:c}=e,d=ty(e.parent)||{},f=[],h=new Set;let p={},w=1/0;for(let b=0;b<Yb;b++){const m=Gb[b],g=n[m],v=c[m]!==void 0?c[m]:d[m],S=ti(v),k=m===l?g.isActive:null;k===!1&&(w=b);let C=v===d[m]&&v!==c[m]&&S;if(C&&r&&e.manuallyAnimateOnMount&&(C=!1),g.protectedKeys={...p},!g.isActive&&k===null||!v&&!g.prevProp||ha(v)||typeof v=="boolean")continue;const j=Xb(g.prevProp,v);let N=j||m===l&&g.isActive&&!C&&S||b>w&&S,M=!1;const A=Array.isArray(v)?v:[v];let z=A.reduce(s(m),{});k===!1&&(z={});const{prevResolvedValues:U={}}=g,we={...U,...z},Be=$=>{N=!0,h.has($)&&(M=!0,h.delete($)),g.needsAnimating[$]=!0;const P=e.getValue($);P&&(P.liveStyle=!1)};for(const $ in we){const P=z[$],R=U[$];if(p.hasOwnProperty($))continue;let D=!1;fu(P)&&fu(R)?D=!pg(P,R):D=P!==R,D?P!=null?Be($):h.add($):P!==void 0&&h.has($)?Be($):g.protectedKeys[$]=!0}g.prevProp=v,g.prevResolvedValues=z,g.isActive&&(p={...p,...z}),r&&e.blockInitialAnimation&&(N=!1),N&&(!(C&&j)||M)&&f.push(...A.map($=>({animation:$,options:{type:m}})))}if(h.size){const b={};h.forEach(m=>{const g=e.getBaseTarget(m),v=e.getValue(m);v&&(v.liveStyle=!0),b[m]=g??null}),f.push({animation:b})}let x=!!f.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(x=!1),r=!1,x?t(f):Promise.resolve()}function a(l,c){var d;if(n[l].isActive===c)return Promise.resolve();(d=e.variantChildren)===null||d===void 0||d.forEach(h=>{var p;return(p=h.animationState)===null||p===void 0?void 0:p.setActive(l,c)}),n[l].isActive=c;const f=o(l);for(const h in n)n[h].protectedKeys={};return f}return{animateChanges:o,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=wh(),r=!0}}}function Xb(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!pg(t,e):!1}function On(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function wh(){return{animate:On(!0),whileInView:On(),whileHover:On(),whileTap:On(),whileDrag:On(),whileFocus:On(),exit:On()}}class _n{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Jb extends _n{constructor(t){super(t),t.animationState||(t.animationState=Qb(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ha(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let Zb=0;class eS extends _n{constructor(){super(...arguments),this.id=Zb++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const tS={animation:{Feature:Jb},exit:{Feature:eS}};function ii(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function gi(e){return{point:{x:e.pageX,y:e.pageY}}}const nS=e=>t=>nd(t)&&e(t,gi(t));function _s(e,t,n,r){return ii(e,t,nS(n),r)}const kh=(e,t)=>Math.abs(e-t);function rS(e,t){const n=kh(e.x,t.x),r=kh(e.y,t.y);return Math.sqrt(n**2+r**2)}class ny{constructor(t,n,{transformPagePoint:r,contextWindow:s,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=il(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,p=rS(f.offset,{x:0,y:0})>=3;if(!h&&!p)return;const{point:w}=f,{timestamp:x}=je;this.history.push({...w,timestamp:x});const{onStart:b,onMove:m}=this.handlers;h||(b&&b(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),m&&m(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=sl(h,this.transformPagePoint),re.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:p,onSessionEnd:w,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=il(f.type==="pointercancel"?this.lastMoveEventInfo:sl(h,this.transformPagePoint),this.history);this.startEvent&&p&&p(f,b),w&&w(f,b)},!nd(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=s||window;const o=gi(t),a=sl(o,this.transformPagePoint),{point:l}=a,{timestamp:c}=je;this.history=[{...l,timestamp:c}];const{onSessionStart:d}=n;d&&d(t,il(a,this.history)),this.removeListeners=mi(_s(this.contextWindow,"pointermove",this.handlePointerMove),_s(this.contextWindow,"pointerup",this.handlePointerUp),_s(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),jn(this.updatePoint)}}function sl(e,t){return t?{point:t(e.point)}:e}function bh(e,t){return{x:e.x-t.x,y:e.y-t.y}}function il({point:e},t){return{point:e,delta:bh(e,ry(t)),offset:bh(e,sS(t)),velocity:iS(t,.1)}}function sS(e){return e[0]}function ry(e){return e[e.length-1]}function iS(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=ry(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>Wt(t)));)n--;if(!r)return{x:0,y:0};const i=Ht(s.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const o={x:(s.x-r.x)/i,y:(s.y-r.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}const sy=1e-4,oS=1-sy,aS=1+sy,iy=.01,lS=0-iy,uS=0+iy;function tt(e){return e.max-e.min}function cS(e,t,n){return Math.abs(e-t)<=n}function Sh(e,t,n,r=.5){e.origin=r,e.originPoint=ae(t.min,t.max,e.origin),e.scale=tt(n)/tt(t),e.translate=ae(n.min,n.max,e.origin)-e.originPoint,(e.scale>=oS&&e.scale<=aS||isNaN(e.scale))&&(e.scale=1),(e.translate>=lS&&e.translate<=uS||isNaN(e.translate))&&(e.translate=0)}function As(e,t,n,r){Sh(e.x,t.x,n.x,r?r.originX:void 0),Sh(e.y,t.y,n.y,r?r.originY:void 0)}function Nh(e,t,n){e.min=n.min+t.min,e.max=e.min+tt(t)}function dS(e,t,n){Nh(e.x,t.x,n.x),Nh(e.y,t.y,n.y)}function jh(e,t,n){e.min=t.min-n.min,e.max=e.min+tt(t)}function Ms(e,t,n){jh(e.x,t.x,n.x),jh(e.y,t.y,n.y)}function fS(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ae(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ae(n,e,r.max):Math.min(e,n)),e}function Ch(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function hS(e,{top:t,left:n,bottom:r,right:s}){return{x:Ch(e.x,n,s),y:Ch(e.y,t,r)}}function Eh(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function pS(e,t){return{x:Eh(e.x,t.x),y:Eh(e.y,t.y)}}function mS(e,t){let n=.5;const r=tt(e),s=tt(t);return s>r?n=Fr(t.min,t.max-r,e.min):r>s&&(n=Fr(e.min,e.max-s,t.min)),Qt(0,1,n)}function gS(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Su=.35;function yS(e=Su){return e===!1?e=0:e===!0&&(e=Su),{x:Th(e,"left","right"),y:Th(e,"top","bottom")}}function Th(e,t,n){return{min:Ph(e,t),max:Ph(e,n)}}function Ph(e,t){return typeof e=="number"?e:e[t]||0}const Rh=()=>({translate:0,scale:1,origin:0,originPoint:0}),jr=()=>({x:Rh(),y:Rh()}),_h=()=>({min:0,max:0}),he=()=>({x:_h(),y:_h()});function ot(e){return[e("x"),e("y")]}function oy({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function vS({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function xS(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function ol(e){return e===void 0||e===1}function Nu({scale:e,scaleX:t,scaleY:n}){return!ol(e)||!ol(t)||!ol(n)}function Bn(e){return Nu(e)||ay(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function ay(e){return Ah(e.x)||Ah(e.y)}function Ah(e){return e&&e!=="0%"}function Uo(e,t,n){const r=e-n,s=t*r;return n+s}function Mh(e,t,n,r,s){return s!==void 0&&(e=Uo(e,s,r)),Uo(e,n,r)+t}function ju(e,t=0,n=1,r,s){e.min=Mh(e.min,t,n,r,s),e.max=Mh(e.max,t,n,r,s)}function ly(e,{x:t,y:n}){ju(e.x,t.translate,t.scale,t.originPoint),ju(e.y,n.translate,n.scale,n.originPoint)}const Lh=.999999999999,Dh=1.0000000000001;function wS(e,t,n,r=!1){const s=n.length;if(!s)return;t.x=t.y=1;let i,o;for(let a=0;a<s;a++){i=n[a],o=i.projectionDelta;const{visualElement:l}=i.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Er(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,ly(e,o)),r&&Bn(i.latestValues)&&Er(e,i.latestValues))}t.x<Dh&&t.x>Lh&&(t.x=1),t.y<Dh&&t.y>Lh&&(t.y=1)}function Cr(e,t){e.min=e.min+t,e.max=e.max+t}function Oh(e,t,n,r,s=.5){const i=ae(e.min,e.max,s);ju(e,t,n,i,r)}function Er(e,t){Oh(e.x,t.x,t.scaleX,t.scale,t.originX),Oh(e.y,t.y,t.scaleY,t.scale,t.originY)}function uy(e,t){return oy(xS(e.getBoundingClientRect(),t))}function kS(e,t,n){const r=uy(e,n),{scroll:s}=t;return s&&(Cr(r.x,s.offset.x),Cr(r.y,s.offset.y)),r}const cy=({current:e})=>e?e.ownerDocument.defaultView:null,bS=new WeakMap;class SS{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=he(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const s=d=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(gi(d).point)},i=(d,f)=>{const{drag:h,dragPropagation:p,onDragStart:w}=this.getProps();if(h&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=mk(h),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ot(b=>{let m=this.getAxisMotionValue(b).get()||0;if(Dt.test(m)){const{projection:g}=this.visualElement;if(g&&g.layout){const v=g.layout.layoutBox[b];v&&(m=tt(v)*(parseFloat(m)/100))}}this.originPoint[b]=m}),w&&re.postRender(()=>w(d,f)),mu(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},o=(d,f)=>{const{dragPropagation:h,dragDirectionLock:p,onDirectionLock:w,onDrag:x}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:b}=f;if(p&&this.currentDirection===null){this.currentDirection=NS(b),this.currentDirection!==null&&w&&w(this.currentDirection);return}this.updateAxis("x",f.point,b),this.updateAxis("y",f.point,b),this.visualElement.render(),x&&x(d,f)},a=(d,f)=>this.stop(d,f),l=()=>ot(d=>{var f;return this.getAnimationState(d)==="paused"&&((f=this.getAxisMotionValue(d).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new ny(t,{onSessionStart:s,onStart:i,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:cy(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:s}=n;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i&&re.postRender(()=>i(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:s}=this.getProps();if(!r||!Ii(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=fS(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;n&&Sr(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&s?this.constraints=hS(s.layoutBox,n):this.constraints=!1,this.elastic=yS(r),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&ot(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=gS(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Sr(t))return!1;const r=t.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=kS(r,s.root,this.visualElement.getTransformPagePoint());let o=pS(s.layout.layoutBox,i);if(n){const a=n(vS(o));this.hasMutatedConstraints=!!a,a&&(o=oy(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=ot(d=>{if(!Ii(d,n,this.currentDirection))return;let f=l&&l[d]||{};o&&(f={min:0,max:0});const h=s?200:1e6,p=s?40:1e7,w={type:"inertia",velocity:r?t[d]:0,bounceStiffness:h,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...i,...f};return this.startAxisValueAnimation(d,w)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return mu(this.visualElement,t),r.start(pd(t,r,0,n,this.visualElement,!1))}stopAnimation(){ot(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){ot(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),s=r[n];return s||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){ot(n=>{const{drag:r}=this.getProps();if(!Ii(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(n);if(s&&s.layout){const{min:o,max:a}=s.layout.layoutBox[n];i.set(t[n]-ae(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Sr(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};ot(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();s[o]=mS({min:l,max:l},this.constraints[o])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),ot(o=>{if(!Ii(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set(ae(l,c,s[o]))})}addListeners(){if(!this.visualElement.current)return;bS.set(this.visualElement,this);const t=this.visualElement.current,n=_s(t,"pointerdown",l=>{const{drag:c,dragListener:d=!0}=this.getProps();c&&d&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Sr(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,i=s.addEventListener("measure",r);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),re.read(r);const o=ii(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(ot(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=l[d].translate,f.set(f.get()+l[d].translate))}),this.visualElement.render())});return()=>{o(),n(),i(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=Su,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function Ii(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function NS(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class jS extends _n{constructor(t){super(t),this.removeGroupControls=Ze,this.removeListeners=Ze,this.controls=new SS(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ze}unmount(){this.removeGroupControls(),this.removeListeners()}}const zh=e=>(t,n)=>{e&&re.postRender(()=>e(t,n))};class CS extends _n{constructor(){super(...arguments),this.removePointerDownListener=Ze}onPointerDown(t){this.session=new ny(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:cy(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:zh(t),onStart:zh(n),onMove:r,onEnd:(i,o)=>{delete this.session,s&&re.postRender(()=>s(i,o))}}}mount(){this.removePointerDownListener=_s(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const so={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Vh(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const cs={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(V.test(e))e=parseFloat(e);else return e;const n=Vh(e,t.target.x),r=Vh(e,t.target.y);return`${n}% ${r}%`}},ES={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=Cn.parse(e);if(s.length>5)return r;const i=Cn.createTransformer(e),o=typeof s[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;s[0+o]/=a,s[1+o]/=l;const c=ae(a,l,.5);return typeof s[2+o]=="number"&&(s[2+o]/=c),typeof s[3+o]=="number"&&(s[3+o]/=c),i(s)}};class TS extends y.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:i}=t;Y2(PS),i&&(n.group&&n.group.add(i),r&&r.register&&s&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),so.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:i}=this.props,o=r.projection;return o&&(o.isPresent=i,s||t.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||re.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),$c.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function dy(e){const[t,n]=G0(),r=y.useContext(Dc);return u.jsx(TS,{...e,layoutGroup:r,switchLayoutGroup:y.useContext(tg),isPresent:t,safeToRemove:n})}const PS={borderRadius:{...cs,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:cs,borderTopRightRadius:cs,borderBottomLeftRadius:cs,borderBottomRightRadius:cs,boxShadow:ES};function RS(e,t,n){const r=Me(e)?e:ri(e);return r.start(pd("",r,t,n)),r.animation}function _S(e){return e instanceof SVGElement&&e.tagName!=="svg"}const AS=(e,t)=>e.depth-t.depth;class MS{constructor(){this.children=[],this.isDirty=!1}add(t){rd(this.children,t),this.isDirty=!0}remove(t){sd(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(AS),this.isDirty=!1,this.children.forEach(t)}}function LS(e,t){const n=Ot.now(),r=({timestamp:s})=>{const i=s-n;i>=t&&(jn(r),e(i-t))};return re.read(r,!0),()=>jn(r)}const fy=["TopLeft","TopRight","BottomLeft","BottomRight"],DS=fy.length,Bh=e=>typeof e=="string"?parseFloat(e):e,Ih=e=>typeof e=="number"||V.test(e);function OS(e,t,n,r,s,i){s?(e.opacity=ae(0,n.opacity!==void 0?n.opacity:1,zS(r)),e.opacityExit=ae(t.opacity!==void 0?t.opacity:1,0,VS(r))):i&&(e.opacity=ae(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let o=0;o<DS;o++){const a=`border${fy[o]}Radius`;let l=Fh(t,a),c=Fh(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Ih(l)===Ih(c)?(e[a]=Math.max(ae(Bh(l),Bh(c),r),0),(Dt.test(c)||Dt.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=ae(t.rotate||0,n.rotate||0,r))}function Fh(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const zS=hy(0,.5,_g),VS=hy(.5,.95,Ze);function hy(e,t,n){return r=>r<e?0:r>t?1:n(Fr(e,t,r))}function Uh(e,t){e.min=t.min,e.max=t.max}function it(e,t){Uh(e.x,t.x),Uh(e.y,t.y)}function $h(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Wh(e,t,n,r,s){return e-=t,e=Uo(e,1/n,r),s!==void 0&&(e=Uo(e,1/s,r)),e}function BS(e,t=0,n=1,r=.5,s,i=e,o=e){if(Dt.test(t)&&(t=parseFloat(t),t=ae(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=ae(i.min,i.max,r);e===i&&(a-=t),e.min=Wh(e.min,t,n,a,s),e.max=Wh(e.max,t,n,a,s)}function Hh(e,t,[n,r,s],i,o){BS(e,t[n],t[r],t[s],t.scale,i,o)}const IS=["x","scaleX","originX"],FS=["y","scaleY","originY"];function Kh(e,t,n,r){Hh(e.x,t,IS,n?n.x:void 0,r?r.x:void 0),Hh(e.y,t,FS,n?n.y:void 0,r?r.y:void 0)}function Gh(e){return e.translate===0&&e.scale===1}function py(e){return Gh(e.x)&&Gh(e.y)}function Yh(e,t){return e.min===t.min&&e.max===t.max}function US(e,t){return Yh(e.x,t.x)&&Yh(e.y,t.y)}function qh(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function my(e,t){return qh(e.x,t.x)&&qh(e.y,t.y)}function Qh(e){return tt(e.x)/tt(e.y)}function Xh(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class $S{constructor(){this.members=[]}add(t){rd(this.members,t),t.scheduleRender()}remove(t){if(sd(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(s=>t===s);if(n===0)return!1;let r;for(let s=n;s>=0;s--){const i=this.members[s];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:s}=t.options;s===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function WS(e,t,n){let r="";const s=e.x.translate/t.x,i=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((s||i||o)&&(r=`translate3d(${s}px, ${i}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:d,rotateX:f,rotateY:h,skewX:p,skewY:w}=n;c&&(r=`perspective(${c}px) ${r}`),d&&(r+=`rotate(${d}deg) `),f&&(r+=`rotateX(${f}deg) `),h&&(r+=`rotateY(${h}deg) `),p&&(r+=`skewX(${p}deg) `),w&&(r+=`skewY(${w}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const In={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},vs=typeof window<"u"&&window.MotionDebug!==void 0,al=["","X","Y","Z"],HS={visibility:"hidden"},Jh=1e3;let KS=0;function ll(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function gy(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Ng(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",re,!(s||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&gy(r)}function yy({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(o={},a=t==null?void 0:t()){this.id=KS++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,vs&&(In.totalNodes=In.resolvedTargetDeltas=In.recalculatedProjection=0),this.nodes.forEach(qS),this.nodes.forEach(e5),this.nodes.forEach(t5),this.nodes.forEach(QS),vs&&window.MotionDebug.record(In)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new MS)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new id),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=_S(o),this.instance=o;const{layoutId:l,layout:c,visualElement:d}=this.options;if(d&&!d.current&&d.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),e){let f;const h=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=LS(h,250),so.hasAnimatedSinceResize&&(so.hasAnimatedSinceResize=!1,this.nodes.forEach(ep))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&d&&(l||c)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:h,hasRelativeTargetChanged:p,layout:w})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const x=this.options.transition||d.getDefaultTransition()||o5,{onLayoutAnimationStart:b,onLayoutAnimationComplete:m}=d.getProps(),g=!this.targetLayout||!my(this.targetLayout,w)||p,v=!h&&p;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||v||h&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,v);const S={...Zc(x,"layout"),onPlay:b,onComplete:m};(d.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else h||ep(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=w})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,jn(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(n5),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&gy(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const f=this.path[d];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Zh);return}this.isUpdating||this.nodes.forEach(JS),this.isUpdating=!1,this.nodes.forEach(ZS),this.nodes.forEach(GS),this.nodes.forEach(YS),this.clearAllSnapshots();const a=Ot.now();je.delta=Qt(0,1e3/60,a-je.timestamp),je.timestamp=a,je.isProcessing=!0,Ja.update.process(je),Ja.preRender.process(je),Ja.render.process(je),je.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,$c.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(XS),this.sharedNodes.forEach(r5)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,re.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){re.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=he(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!s)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!py(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,d=c!==this.prevTransformTemplateValue;o&&(a||Bn(this.latestValues)||d)&&(s(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),a5(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var o;const{visualElement:a}=this.options;if(!a)return he();const l=a.measureViewportBox();if(!(((o=this.scroll)===null||o===void 0?void 0:o.wasRoot)||this.path.some(l5))){const{scroll:d}=this.root;d&&(Cr(l.x,d.offset.x),Cr(l.y,d.offset.y))}return l}removeElementScroll(o){var a;const l=he();if(it(l,o),!((a=this.scroll)===null||a===void 0)&&a.wasRoot)return l;for(let c=0;c<this.path.length;c++){const d=this.path[c],{scroll:f,options:h}=d;d!==this.root&&f&&h.layoutScroll&&(f.wasRoot&&it(l,o),Cr(l.x,f.offset.x),Cr(l.y,f.offset.y))}return l}applyTransform(o,a=!1){const l=he();it(l,o);for(let c=0;c<this.path.length;c++){const d=this.path[c];!a&&d.options.layoutScroll&&d.scroll&&d!==d.root&&Er(l,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),Bn(d.latestValues)&&Er(l,d.latestValues)}return Bn(this.latestValues)&&Er(l,this.latestValues),l}removeTransform(o){const a=he();it(a,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Bn(c.latestValues))continue;Nu(c.latestValues)&&c.updateSnapshot();const d=he(),f=c.measurePageBox();it(d,f),Kh(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,d)}return Bn(this.latestValues)&&Kh(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==je.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:f,layoutId:h}=this.options;if(!(!this.layout||!(f||h))){if(this.resolvedRelativeTargetAt=je.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=he(),this.relativeTargetOrigin=he(),Ms(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),it(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=he(),this.targetWithTransforms=he()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),dS(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):it(this.target,this.layout.layoutBox),ly(this.target,this.targetDelta)):it(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=he(),this.relativeTargetOrigin=he(),Ms(this.relativeTargetOrigin,this.target,p.target),it(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}vs&&In.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Nu(this.parent.latestValues)||ay(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var o;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===je.timestamp&&(c=!1),c)return;const{layout:d,layoutId:f}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||f))return;it(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,p=this.treeScale.y;wS(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=he());const{target:w}=a;if(!w){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():($h(this.prevProjectionDelta.x,this.projectionDelta.x),$h(this.prevProjectionDelta.y,this.projectionDelta.y)),As(this.projectionDelta,this.layoutCorrected,w,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==p||!Xh(this.projectionDelta.x,this.prevProjectionDelta.x)||!Xh(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",w)),vs&&In.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)===null||a===void 0||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=jr(),this.projectionDelta=jr(),this.projectionDeltaWithTransform=jr()}setAnimationOrigin(o,a=!1){const l=this.snapshot,c=l?l.latestValues:{},d={...this.latestValues},f=jr();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=he(),p=l?l.source:void 0,w=this.layout?this.layout.source:void 0,x=p!==w,b=this.getStack(),m=!b||b.members.length<=1,g=!!(x&&!m&&this.options.crossfade===!0&&!this.path.some(i5));this.animationProgress=0;let v;this.mixTargetDelta=S=>{const k=S/1e3;tp(f.x,o.x,k),tp(f.y,o.y,k),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ms(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),s5(this.relativeTarget,this.relativeTargetOrigin,h,k),v&&US(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=he()),it(v,this.relativeTarget)),x&&(this.animationValues=d,OS(d,c,this.latestValues,k,g,m)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=k},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(jn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=re.update(()=>{so.hasAnimatedSinceResize=!0,this.currentAnimation=RS(0,Jh,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Jh),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:d}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&vy(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||he();const f=tt(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+f;const h=tt(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+h}it(a,l),Er(a,d),As(this.projectionDeltaWithTransform,this.layoutCorrected,a,d)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new $S),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&ll("z",o,c,this.animationValues);for(let d=0;d<al.length;d++)ll(`rotate${al[d]}`,o,c,this.animationValues),ll(`skew${al[d]}`,o,c,this.animationValues);o.render();for(const d in c)o.setStaticValue(d,c[d]),this.animationValues&&(this.animationValues[d]=c[d]);o.scheduleRender()}getProjectionStyles(o){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return HS;const c={visibility:""},d=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=no(o==null?void 0:o.pointerEvents)||"",c.transform=d?d(this.latestValues,""):"none",c;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const x={};return this.options.layoutId&&(x.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,x.pointerEvents=no(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!Bn(this.latestValues)&&(x.transform=d?d({},""):"none",this.hasProjected=!1),x}const h=f.animationValues||f.latestValues;this.applyTransformsToTarget(),c.transform=WS(this.projectionDeltaWithTransform,this.treeScale,h),d&&(c.transform=d(h,c.transform));const{x:p,y:w}=this.projectionDelta;c.transformOrigin=`${p.origin*100}% ${w.origin*100}% 0`,f.animationValues?c.opacity=f===this?(l=(a=h.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:c.opacity=f===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const x in zo){if(h[x]===void 0)continue;const{correct:b,applyTo:m}=zo[x],g=c.transform==="none"?h[x]:b(h[x],f);if(m){const v=m.length;for(let S=0;S<v;S++)c[m[S]]=g}else c[x]=g}return this.options.layoutId&&(c.pointerEvents=f===this?no(o==null?void 0:o.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Zh),this.root.sharedNodes.clear()}}}function GS(e){e.updateLayout()}function YS(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=e.layout,{animationType:i}=e.options,o=n.source!==e.layout.source;i==="size"?ot(f=>{const h=o?n.measuredBox[f]:n.layoutBox[f],p=tt(h);h.min=r[f].min,h.max=h.min+p}):vy(i,n.layoutBox,r)&&ot(f=>{const h=o?n.measuredBox[f]:n.layoutBox[f],p=tt(r[f]);h.max=h.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+p)});const a=jr();As(a,r,n.layoutBox);const l=jr();o?As(l,e.applyTransform(s,!0),n.measuredBox):As(l,r,n.layoutBox);const c=!py(a);let d=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:p}=f;if(h&&p){const w=he();Ms(w,n.layoutBox,h.layoutBox);const x=he();Ms(x,r,p.layoutBox),my(w,x)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=x,e.relativeTargetOrigin=w,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeTargetChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function qS(e){vs&&In.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function QS(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function XS(e){e.clearSnapshot()}function Zh(e){e.clearMeasurements()}function JS(e){e.isLayoutDirty=!1}function ZS(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function ep(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function e5(e){e.resolveTargetDelta()}function t5(e){e.calcProjection()}function n5(e){e.resetSkewAndRotation()}function r5(e){e.removeLeadSnapshot()}function tp(e,t,n){e.translate=ae(t.translate,0,n),e.scale=ae(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function np(e,t,n,r){e.min=ae(t.min,n.min,r),e.max=ae(t.max,n.max,r)}function s5(e,t,n,r){np(e.x,t.x,n.x,r),np(e.y,t.y,n.y,r)}function i5(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const o5={duration:.45,ease:[.4,0,.1,1]},rp=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),sp=rp("applewebkit/")&&!rp("chrome/")?Math.round:Ze;function ip(e){e.min=sp(e.min),e.max=sp(e.max)}function a5(e){ip(e.x),ip(e.y)}function vy(e,t,n){return e==="position"||e==="preserve-aspect"&&!cS(Qh(t),Qh(n),.2)}function l5(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const u5=yy({attachResizeListener:(e,t)=>ii(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ul={current:void 0},xy=yy({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ul.current){const e=new u5({});e.mount(window),e.setOptions({layoutScroll:!0}),ul.current=e}return ul.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),c5={pan:{Feature:CS},drag:{Feature:jS,ProjectionNode:xy,MeasureLayout:dy}};function op(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,i=r[s];i&&re.postRender(()=>i(t,gi(t)))}class d5 extends _n{mount(){const{current:t}=this.node;t&&(this.unmount=ck(t,n=>(op(this.node,n,"Start"),r=>op(this.node,r,"End"))))}unmount(){}}class f5 extends _n{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=mi(ii(this.node.current,"focus",()=>this.onFocus()),ii(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function ap(e,t,n){const{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),i=r[s];i&&re.postRender(()=>i(t,gi(t)))}class h5 extends _n{mount(){const{current:t}=this.node;t&&(this.unmount=pk(t,n=>(ap(this.node,n,"Start"),(r,{success:s})=>ap(this.node,r,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Cu=new WeakMap,cl=new WeakMap,p5=e=>{const t=Cu.get(e.target);t&&t(e)},m5=e=>{e.forEach(p5)};function g5({root:e,...t}){const n=e||document;cl.has(n)||cl.set(n,{});const r=cl.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(m5,{root:e,...t})),r[s]}function y5(e,t,n){const r=g5(t);return Cu.set(e,n),r.observe(e),()=>{Cu.delete(e),r.unobserve(e)}}const v5={some:0,all:1};class x5 extends _n{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:i}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:v5[s]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:d,onViewportLeave:f}=this.node.getProps(),h=c?d:f;h&&h(l)};return y5(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(w5(t,n))&&this.startObserver()}unmount(){}}function w5({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const k5={inView:{Feature:x5},tap:{Feature:h5},focus:{Feature:f5},hover:{Feature:d5}},b5={layout:{ProjectionNode:xy,MeasureLayout:dy}},Eu={current:null},wy={current:!1};function S5(){if(wy.current=!0,!!Vc)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Eu.current=e.matches;e.addListener(t),t()}else Eu.current=!1}const N5=[...Hg,_e,Cn],j5=e=>N5.find(Wg(e)),lp=new WeakMap;function C5(e,t,n){for(const r in t){const s=t[r],i=n[r];if(Me(s))e.addValue(r,s);else if(Me(i))e.addValue(r,ri(s,{owner:e}));else if(i!==s)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=e.getStaticValue(r);e.addValue(r,ri(o!==void 0?o:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const up=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class E5{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,blockInitialAnimation:i,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=dd,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=Ot.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,re.render(this.render,!1,!0))};const{latestValues:l,renderState:c,onUpdate:d}=o;this.onUpdate=d,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=a,this.blockInitialAnimation=!!i,this.isControllingVariants=pa(n),this.isVariantNode=Z0(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:f,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in h){const w=h[p];l[p]!==void 0&&Me(w)&&w.set(l[p],!1)}}mount(t){this.current=t,lp.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),wy.current||S5(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Eu.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){lp.delete(this.current),this.projection&&this.projection.unmount(),jn(this.notifyUpdate),jn(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=rr.has(t),s=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&re.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),i(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Ur){const n=Ur[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):he()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<up.length;r++){const s=up[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i="on"+s,o=t[i];o&&(this.propEventSubscriptions[s]=this.on(s,o))}this.prevMotionValues=C5(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=ri(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(Ug(s)||Mg(s))?s=parseFloat(s):!j5(s)&&Cn.test(n)&&(s=Bg(t,n)),this.setBaseTarget(t,Me(s)?s.get():s)),Me(s)?s.get():s}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let s;if(typeof r=="string"||typeof r=="object"){const o=Hc(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);o&&(s=o[t])}if(r&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!Me(i)?i:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new id),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class ky extends E5{constructor(){super(...arguments),this.KeyframeResolver=Kg}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Me(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function T5(e){return window.getComputedStyle(e)}class P5 extends ky{constructor(){super(...arguments),this.type="html",this.renderInstance=lg}readValueFromInstance(t,n){if(rr.has(n)){const r=cd(n);return r&&r.default||0}else{const r=T5(t),s=(ig(n)?r.getPropertyValue(n):r[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return uy(t,n)}build(t,n,r){Yc(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Jc(t,n,r)}}class R5 extends ky{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=he}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(rr.has(n)){const r=cd(n);return r&&r.default||0}return n=ug.has(n)?n:Uc(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return fg(t,n,r)}build(t,n,r){qc(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,s){cg(t,n,r,s)}mount(t){this.isSVGTag=Xc(t.tagName),super.mount(t)}}const _5=(e,t)=>Wc(e)?new R5(t):new P5(t,{allowProjection:e!==y.Fragment}),A5=rk({...tS,...k5,...c5,...b5},_5),Q=v2(A5);/**
|
|
77
|
+
* @license lucide-react v0.462.0 - ISC
|
|
78
|
+
*
|
|
79
|
+
* This source code is licensed under the ISC license.
|
|
80
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
+
*/const M5=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),by=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
|
|
82
|
+
* @license lucide-react v0.462.0 - ISC
|
|
83
|
+
*
|
|
84
|
+
* This source code is licensed under the ISC license.
|
|
85
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
+
*/var L5={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
87
|
+
* @license lucide-react v0.462.0 - ISC
|
|
88
|
+
*
|
|
89
|
+
* This source code is licensed under the ISC license.
|
|
90
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
+
*/const D5=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:i,iconNode:o,...a},l)=>y.createElement("svg",{ref:l,...L5,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:by("lucide",s),...a},[...o.map(([c,d])=>y.createElement(c,d)),...Array.isArray(i)?i:[i]]));/**
|
|
92
|
+
* @license lucide-react v0.462.0 - ISC
|
|
93
|
+
*
|
|
94
|
+
* This source code is licensed under the ISC license.
|
|
95
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
+
*/const O=(e,t)=>{const n=y.forwardRef(({className:r,...s},i)=>y.createElement(D5,{ref:i,iconNode:t,className:by(`lucide-${M5(e)}`,r),...s}));return n.displayName=`${e}`,n};/**
|
|
97
|
+
* @license lucide-react v0.462.0 - ISC
|
|
98
|
+
*
|
|
99
|
+
* This source code is licensed under the ISC license.
|
|
100
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
+
*/const O5=O("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
|
|
102
|
+
* @license lucide-react v0.462.0 - ISC
|
|
103
|
+
*
|
|
104
|
+
* This source code is licensed under the ISC license.
|
|
105
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
+
*/const $o=O("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
107
|
+
* @license lucide-react v0.462.0 - ISC
|
|
108
|
+
*
|
|
109
|
+
* This source code is licensed under the ISC license.
|
|
110
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
+
*/const z5=O("BookmarkPlus",[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}],["line",{x1:"12",x2:"12",y1:"7",y2:"13",key:"1cppfj"}],["line",{x1:"15",x2:"9",y1:"10",y2:"10",key:"1gty7f"}]]);/**
|
|
112
|
+
* @license lucide-react v0.462.0 - ISC
|
|
113
|
+
*
|
|
114
|
+
* This source code is licensed under the ISC license.
|
|
115
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
+
*/const V5=O("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/**
|
|
117
|
+
* @license lucide-react v0.462.0 - ISC
|
|
118
|
+
*
|
|
119
|
+
* This source code is licensed under the ISC license.
|
|
120
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
+
*/const B5=O("ChartNoAxesColumn",[["line",{x1:"18",x2:"18",y1:"20",y2:"10",key:"1xfpm4"}],["line",{x1:"12",x2:"12",y1:"20",y2:"4",key:"be30l9"}],["line",{x1:"6",x2:"6",y1:"20",y2:"14",key:"1r4le6"}]]);/**
|
|
122
|
+
* @license lucide-react v0.462.0 - ISC
|
|
123
|
+
*
|
|
124
|
+
* This source code is licensed under the ISC license.
|
|
125
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
+
*/const Jr=O("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
127
|
+
* @license lucide-react v0.462.0 - ISC
|
|
128
|
+
*
|
|
129
|
+
* This source code is licensed under the ISC license.
|
|
130
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
+
*/const Tu=O("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
|
132
|
+
* @license lucide-react v0.462.0 - ISC
|
|
133
|
+
*
|
|
134
|
+
* This source code is licensed under the ISC license.
|
|
135
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
+
*/const Wo=O("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
137
|
+
* @license lucide-react v0.462.0 - ISC
|
|
138
|
+
*
|
|
139
|
+
* This source code is licensed under the ISC license.
|
|
140
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
+
*/const Pu=O("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
|
142
|
+
* @license lucide-react v0.462.0 - ISC
|
|
143
|
+
*
|
|
144
|
+
* This source code is licensed under the ISC license.
|
|
145
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
+
*/const oi=O("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
147
|
+
* @license lucide-react v0.462.0 - ISC
|
|
148
|
+
*
|
|
149
|
+
* This source code is licensed under the ISC license.
|
|
150
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
+
*/const I5=O("CloudDownload",[["path",{d:"M12 13v8l-4-4",key:"1f5nwf"}],["path",{d:"m12 21 4-4",key:"1lfcce"}],["path",{d:"M4.393 15.269A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.436 8.284",key:"ui1hmy"}]]);/**
|
|
152
|
+
* @license lucide-react v0.462.0 - ISC
|
|
153
|
+
*
|
|
154
|
+
* This source code is licensed under the ISC license.
|
|
155
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
+
*/const F5=O("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
|
157
|
+
* @license lucide-react v0.462.0 - ISC
|
|
158
|
+
*
|
|
159
|
+
* This source code is licensed under the ISC license.
|
|
160
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
+
*/const Ho=O("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/**
|
|
162
|
+
* @license lucide-react v0.462.0 - ISC
|
|
163
|
+
*
|
|
164
|
+
* This source code is licensed under the ISC license.
|
|
165
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
+
*/const U5=O("Crown",[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]]);/**
|
|
167
|
+
* @license lucide-react v0.462.0 - ISC
|
|
168
|
+
*
|
|
169
|
+
* This source code is licensed under the ISC license.
|
|
170
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
171
|
+
*/const $5=O("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
|
|
172
|
+
* @license lucide-react v0.462.0 - ISC
|
|
173
|
+
*
|
|
174
|
+
* This source code is licensed under the ISC license.
|
|
175
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
+
*/const W5=O("EarOff",[["path",{d:"M6 18.5a3.5 3.5 0 1 0 7 0c0-1.57.92-2.52 2.04-3.46",key:"1qngmn"}],["path",{d:"M6 8.5c0-.75.13-1.47.36-2.14",key:"b06bma"}],["path",{d:"M8.8 3.15A6.5 6.5 0 0 1 19 8.5c0 1.63-.44 2.81-1.09 3.76",key:"g10hsz"}],["path",{d:"M12.5 6A2.5 2.5 0 0 1 15 8.5M10 13a2 2 0 0 0 1.82-1.18",key:"ygzou7"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/**
|
|
177
|
+
* @license lucide-react v0.462.0 - ISC
|
|
178
|
+
*
|
|
179
|
+
* This source code is licensed under the ISC license.
|
|
180
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
181
|
+
*/const H5=O("Ear",[["path",{d:"M6 8.5a6.5 6.5 0 1 1 13 0c0 6-6 6-6 10a3.5 3.5 0 1 1-7 0",key:"1dfaln"}],["path",{d:"M15 8.5a2.5 2.5 0 0 0-5 0v1a2 2 0 1 1 0 4",key:"1qnva7"}]]);/**
|
|
182
|
+
* @license lucide-react v0.462.0 - ISC
|
|
183
|
+
*
|
|
184
|
+
* This source code is licensed under the ISC license.
|
|
185
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
186
|
+
*/const K5=O("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
|
|
187
|
+
* @license lucide-react v0.462.0 - ISC
|
|
188
|
+
*
|
|
189
|
+
* This source code is licensed under the ISC license.
|
|
190
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
+
*/const G5=O("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
192
|
+
* @license lucide-react v0.462.0 - ISC
|
|
193
|
+
*
|
|
194
|
+
* This source code is licensed under the ISC license.
|
|
195
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
196
|
+
*/const Y5=O("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
|
|
197
|
+
* @license lucide-react v0.462.0 - ISC
|
|
198
|
+
*
|
|
199
|
+
* This source code is licensed under the ISC license.
|
|
200
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
201
|
+
*/const cp=O("Ghost",[["path",{d:"M9 10h.01",key:"qbtxuw"}],["path",{d:"M15 10h.01",key:"1qmjsl"}],["path",{d:"M12 2a8 8 0 0 0-8 8v12l3-3 2.5 2.5L12 19l2.5 2.5L17 19l3 3V10a8 8 0 0 0-8-8z",key:"uwwb07"}]]);/**
|
|
202
|
+
* @license lucide-react v0.462.0 - ISC
|
|
203
|
+
*
|
|
204
|
+
* This source code is licensed under the ISC license.
|
|
205
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
206
|
+
*/const q5=O("GitMerge",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]]);/**
|
|
207
|
+
* @license lucide-react v0.462.0 - ISC
|
|
208
|
+
*
|
|
209
|
+
* This source code is licensed under the ISC license.
|
|
210
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
211
|
+
*/const Q5=O("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
|
|
212
|
+
* @license lucide-react v0.462.0 - ISC
|
|
213
|
+
*
|
|
214
|
+
* This source code is licensed under the ISC license.
|
|
215
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
216
|
+
*/const X5=O("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/**
|
|
217
|
+
* @license lucide-react v0.462.0 - ISC
|
|
218
|
+
*
|
|
219
|
+
* This source code is licensed under the ISC license.
|
|
220
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
221
|
+
*/const J5=O("Languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]);/**
|
|
222
|
+
* @license lucide-react v0.462.0 - ISC
|
|
223
|
+
*
|
|
224
|
+
* This source code is licensed under the ISC license.
|
|
225
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
226
|
+
*/const Z5=O("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/**
|
|
227
|
+
* @license lucide-react v0.462.0 - ISC
|
|
228
|
+
*
|
|
229
|
+
* This source code is licensed under the ISC license.
|
|
230
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
231
|
+
*/const Nt=O("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
232
|
+
* @license lucide-react v0.462.0 - ISC
|
|
233
|
+
*
|
|
234
|
+
* This source code is licensed under the ISC license.
|
|
235
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
236
|
+
*/const eN=O("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
|
|
237
|
+
* @license lucide-react v0.462.0 - ISC
|
|
238
|
+
*
|
|
239
|
+
* This source code is licensed under the ISC license.
|
|
240
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
241
|
+
*/const tN=O("MemoryStick",[["path",{d:"M6 19v-3",key:"1nvgqn"}],["path",{d:"M10 19v-3",key:"iu8nkm"}],["path",{d:"M14 19v-3",key:"kcehxu"}],["path",{d:"M18 19v-3",key:"1vh91z"}],["path",{d:"M8 11V9",key:"63erz4"}],["path",{d:"M16 11V9",key:"fru6f3"}],["path",{d:"M12 11V9",key:"ha00sb"}],["path",{d:"M2 15h20",key:"16ne18"}],["path",{d:"M2 7a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v1.1a2 2 0 0 0 0 3.837V17a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-5.1a2 2 0 0 0 0-3.837Z",key:"lhddv3"}]]);/**
|
|
242
|
+
* @license lucide-react v0.462.0 - ISC
|
|
243
|
+
*
|
|
244
|
+
* This source code is licensed under the ISC license.
|
|
245
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
246
|
+
*/const Sy=O("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
|
|
247
|
+
* @license lucide-react v0.462.0 - ISC
|
|
248
|
+
*
|
|
249
|
+
* This source code is licensed under the ISC license.
|
|
250
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
251
|
+
*/const ya=O("MicOff",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M18.89 13.23A7.12 7.12 0 0 0 19 12v-2",key:"80xlxr"}],["path",{d:"M5 10v2a7 7 0 0 0 12 5",key:"p2k8kg"}],["path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33",key:"1gzdoj"}],["path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12",key:"r2i35w"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/**
|
|
252
|
+
* @license lucide-react v0.462.0 - ISC
|
|
253
|
+
*
|
|
254
|
+
* This source code is licensed under the ISC license.
|
|
255
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
256
|
+
*/const va=O("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/**
|
|
257
|
+
* @license lucide-react v0.462.0 - ISC
|
|
258
|
+
*
|
|
259
|
+
* This source code is licensed under the ISC license.
|
|
260
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
261
|
+
*/const nN=O("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);/**
|
|
262
|
+
* @license lucide-react v0.462.0 - ISC
|
|
263
|
+
*
|
|
264
|
+
* This source code is licensed under the ISC license.
|
|
265
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
266
|
+
*/const rN=O("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
|
|
267
|
+
* @license lucide-react v0.462.0 - ISC
|
|
268
|
+
*
|
|
269
|
+
* This source code is licensed under the ISC license.
|
|
270
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
271
|
+
*/const sN=O("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
272
|
+
* @license lucide-react v0.462.0 - ISC
|
|
273
|
+
*
|
|
274
|
+
* This source code is licensed under the ISC license.
|
|
275
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
276
|
+
*/const Ko=O("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
|
|
277
|
+
* @license lucide-react v0.462.0 - ISC
|
|
278
|
+
*
|
|
279
|
+
* This source code is licensed under the ISC license.
|
|
280
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
281
|
+
*/const iN=O("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
|
|
282
|
+
* @license lucide-react v0.462.0 - ISC
|
|
283
|
+
*
|
|
284
|
+
* This source code is licensed under the ISC license.
|
|
285
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
286
|
+
*/const oN=O("Scan",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}]]);/**
|
|
287
|
+
* @license lucide-react v0.462.0 - ISC
|
|
288
|
+
*
|
|
289
|
+
* This source code is licensed under the ISC license.
|
|
290
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
291
|
+
*/const aN=O("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
292
|
+
* @license lucide-react v0.462.0 - ISC
|
|
293
|
+
*
|
|
294
|
+
* This source code is licensed under the ISC license.
|
|
295
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
296
|
+
*/const lN=O("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
|
|
297
|
+
* @license lucide-react v0.462.0 - ISC
|
|
298
|
+
*
|
|
299
|
+
* This source code is licensed under the ISC license.
|
|
300
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
301
|
+
*/const Go=O("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
302
|
+
* @license lucide-react v0.462.0 - ISC
|
|
303
|
+
*
|
|
304
|
+
* This source code is licensed under the ISC license.
|
|
305
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
306
|
+
*/const uN=O("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
307
|
+
* @license lucide-react v0.462.0 - ISC
|
|
308
|
+
*
|
|
309
|
+
* This source code is licensed under the ISC license.
|
|
310
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
311
|
+
*/const cN=O("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/**
|
|
312
|
+
* @license lucide-react v0.462.0 - ISC
|
|
313
|
+
*
|
|
314
|
+
* This source code is licensed under the ISC license.
|
|
315
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
316
|
+
*/const Ny=O("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);/**
|
|
317
|
+
* @license lucide-react v0.462.0 - ISC
|
|
318
|
+
*
|
|
319
|
+
* This source code is licensed under the ISC license.
|
|
320
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
321
|
+
*/const dN=O("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
322
|
+
* @license lucide-react v0.462.0 - ISC
|
|
323
|
+
*
|
|
324
|
+
* This source code is licensed under the ISC license.
|
|
325
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
326
|
+
*/const Ls=O("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
327
|
+
* @license lucide-react v0.462.0 - ISC
|
|
328
|
+
*
|
|
329
|
+
* This source code is licensed under the ISC license.
|
|
330
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
331
|
+
*/const fN=O("WifiOff",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
|
|
332
|
+
* @license lucide-react v0.462.0 - ISC
|
|
333
|
+
*
|
|
334
|
+
* This source code is licensed under the ISC license.
|
|
335
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
336
|
+
*/const hN=O("Wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);/**
|
|
337
|
+
* @license lucide-react v0.462.0 - ISC
|
|
338
|
+
*
|
|
339
|
+
* This source code is licensed under the ISC license.
|
|
340
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
341
|
+
*/const jy=O("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/**
|
|
342
|
+
* @license lucide-react v0.462.0 - ISC
|
|
343
|
+
*
|
|
344
|
+
* This source code is licensed under the ISC license.
|
|
345
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
346
|
+
*/const Cy=O("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
|
347
|
+
* @license lucide-react v0.462.0 - ISC
|
|
348
|
+
*
|
|
349
|
+
* This source code is licensed under the ISC license.
|
|
350
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
351
|
+
*/const ai=O("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),Ey={welcome:{tagline:"Your AI Brain",title:"Must-b",sleeping:"Sleeping...",waking:"Waking up...",awake:"Awakening...",wakeBtn:"Wake Must-b",reconfigure:"Reconfigure",footer:"© 2026 Must-b — Auto Step Platform"},sidebar:{newChat:"New Chat",recentChats:"Recent Chats",platform:"Platform",system:"System",automations:"My Automations",activeWorkflows:"Active Workflows",products:"Products & Services",clients:"Client Management",integrations:"Integrations",logs:"Logs & Activity",settings:"Settings",logout:"Logout",poweredBy:"Powered by",deleteChat:"Delete Chat?",deleteConfirm:"This action cannot be undone.",cancel:"Cancel",delete:"Delete"},rightPanel:{agentRole:"Agent Role",hardware:"Hardware Score",model:"Active Model",connected:"Gateway Connected",rank:{master:"Master",planner:"Planner",worker:"Worker"}},workflow:{title:"Active Workflow",idle:"Idle — awaiting task",goal:"Goal",steps:{browse:"Opening browser",write:"Writing file",think:"Thinking",exec:"Executing command"}},dashboard:{placeholder:"Send a message to Must-b...",thinking:"Must-b is thinking..."},layout:{chats:"Chats",system:"System",openChats:"Open chat history",openSystem:"Open system panel",closePanel:"Close panel"},chat:{inputPlaceholder:"Ask Must-b anything…",listening:"Listening…",thoughtProcess:"Thought Process",saveAsSkill:"Save as Skill",skillSaved:"Skill saved to your library!",saving:"Saving…",retry:"Retry",save:"Save",guidance:"Guidance",errorBoundary:"Chat rendering error — reloading…"}},pN={welcome:{tagline:"Yapay Zeka Beyniniz",title:"Must-b",sleeping:"Uyuyor...",waking:"Uyandırılıyor...",awake:"Uyanıyor...",wakeBtn:"Must-b'yi Uyandır",reconfigure:"Yeniden Yapılandır",footer:"© 2026 Must-b — Auto Step Platform"},sidebar:{newChat:"Yeni Sohbet",recentChats:"Son Sohbetler",platform:"Platform",system:"Sistem",automations:"Otomasyonlarım",activeWorkflows:"Aktif İş Akışları",products:"Ürünler & Hizmetler",clients:"Müşteri Yönetimi",integrations:"Entegrasyonlar",logs:"Kayıtlar & Aktivite",settings:"Ayarlar",logout:"Çıkış",poweredBy:"Altyapısı:",deleteChat:"Sohbet Silinsin mi?",deleteConfirm:"Bu işlem geri alınamaz.",cancel:"İptal",delete:"Sil"},rightPanel:{agentRole:"Ajan Rolü",hardware:"Donanım Puanı",model:"Aktif Model",connected:"Gateway Bağlı",rank:{master:"Usta",planner:"Planlayıcı",worker:"İşçi"}},workflow:{title:"Aktif İş Akışı",idle:"Boşta — görev bekleniyor",goal:"Hedef",steps:{browse:"Tarayıcı açılıyor",write:"Dosya yazılıyor",think:"Düşünülüyor",exec:"Komut çalıştırılıyor"}},dashboard:{placeholder:"Must-b'ye bir mesaj gönderin...",thinking:"Must-b düşünüyor..."},layout:{chats:"Sohbetler",system:"Sistem",openChats:"Sohbet geçmişini aç",openSystem:"Sistem panelini aç",closePanel:"Paneli kapat"},chat:{inputPlaceholder:"Must-b'ye her şeyi sorun…",listening:"Dinleniyor…",thoughtProcess:"Düşünce Süreci",saveAsSkill:"Beceri Olarak Kaydet",skillSaved:"Beceri kütüphanenize kaydedildi!",saving:"Kaydediliyor…",retry:"Tekrar Dene",save:"Kaydet",guidance:"Rehberlik",errorBoundary:"Sohbet render hatası — yeniden yükleniyor…"}},mN={welcome:{tagline:"Ihr KI-Gehirn",title:"Must-b",sleeping:"Schläft...",waking:"Wird geweckt...",awake:"Erwacht...",wakeBtn:"Must-b wecken",reconfigure:"Neu konfigurieren",footer:"© 2026 Must-b — Auto Step Platform"},sidebar:{newChat:"Neuer Chat",recentChats:"Letzte Chats",platform:"Plattform",system:"System",automations:"Meine Automatisierungen",activeWorkflows:"Aktive Workflows",products:"Produkte & Dienste",clients:"Kundenverwaltung",integrations:"Integrationen",logs:"Protokolle & Aktivität",settings:"Einstellungen",logout:"Abmelden",poweredBy:"Betrieben von",deleteChat:"Chat löschen?",deleteConfirm:"Diese Aktion kann nicht rückgängig gemacht werden.",cancel:"Abbrechen",delete:"Löschen"},rightPanel:{agentRole:"Agentenrolle",hardware:"Hardware-Score",model:"Aktives Modell",connected:"Gateway verbunden",rank:{master:"Meister",planner:"Planer",worker:"Arbeiter"}},workflow:{title:"Aktiver Workflow",idle:"Leerlauf — wartet auf Aufgabe",goal:"Ziel",steps:{browse:"Browser wird geöffnet",write:"Datei wird geschrieben",think:"Wird nachgedacht",exec:"Befehl wird ausgeführt"}},dashboard:{placeholder:"Nachricht an Must-b senden...",thinking:"Must-b denkt nach..."},layout:{chats:"Chats",system:"System",openChats:"Chatverlauf öffnen",openSystem:"Systembereich öffnen",closePanel:"Bereich schließen"},chat:{inputPlaceholder:"Fragen Sie Must-b alles…",listening:"Höre zu…",thoughtProcess:"Denkprozess",saveAsSkill:"Als Fähigkeit speichern",skillSaved:"Fähigkeit in Ihrer Bibliothek gespeichert!",saving:"Speichere…",retry:"Erneut versuchen",save:"Speichern",guidance:"Hinweis",errorBoundary:"Chat-Fehler — wird neu geladen…"}},dp={en:Ey,tr:pN,de:mN},Ty=y.createContext({locale:"en",t:Ey,setLocale:()=>{}});function gN({children:e}){const t=typeof localStorage<"u"?localStorage.getItem("mustb-lang"):null,[n,r]=y.useState(t&&t in dp?t:"en"),s=i=>{r(i);try{localStorage.setItem("mustb-lang",i)}catch{}};return u.jsx(Ty.Provider,{value:{locale:n,t:dp[n],setLocale:s},children:e})}const sr=()=>y.useContext(Ty);function fp(){const e=qr(),{t}=sr(),[n,r]=y.useState(!1),[s,i]=y.useState(!1);y.useEffect(()=>{let a=!1;const c=setTimeout(async()=>{try{const d=await fetch("/api/setup/status");if(!d.ok||a)return;const f=await d.json();!a&&!f.configured&&e("/setup")}catch{}},800);return()=>{a=!0,clearTimeout(c)}},[e]);const o=async()=>{if(!n){r(!0);try{const a=await fetch("/api/setup/status");if(a.ok&&!(await a.json()).configured){e("/setup");return}await fetch("/api/auth/local")}catch{}setTimeout(()=>{i(!0),setTimeout(()=>e("/app"),500)},600)}};return u.jsxs("div",{className:"relative min-h-screen overflow-hidden flex flex-col",children:[u.jsx(We,{children:s&&u.jsx(Q.div,{className:"fixed inset-0 z-50 pointer-events-none",style:{background:"linear-gradient(180deg, #f4f6e6 0%, #c8d815 25%, #0b1f04 100%)"},initial:{opacity:0},animate:{opacity:1},transition:{duration:.45}})}),u.jsxs("header",{className:"fixed top-4 left-0 right-0 z-30 px-6 flex items-center justify-between",children:[u.jsx("span",{className:"text-[22px] font-black text-[#0c1a07] tracking-tighter drop-shadow-sm select-none",children:"Must-b"}),u.jsx("nav",{className:"nav-pill px-3 py-2 flex items-center gap-0.5",children:["Home","AI Models","API","Skills","Labs"].map((a,l)=>u.jsx("span",{className:`px-4 py-1.5 rounded-full text-[13px] font-semibold cursor-default select-none transition-colors ${l===0?"bg-black text-white":"text-black/60 hover:text-black"}`,children:a},a))}),u.jsxs(Do,{to:"/setup",className:"flex items-center gap-2 bg-[#0c1a07] hover:bg-[#1a3010] text-white/90 rounded-full px-4 py-2 text-[13px] font-semibold shadow-lg transition-all",children:[u.jsx(Go,{size:13}),t.welcome.reconfigure,u.jsx($o,{size:12,className:"opacity-60"})]})]}),u.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center px-6 pb-20 pt-28 select-none",children:[u.jsx(Q.h1,{initial:{opacity:0,y:-30},animate:{opacity:1,y:0},transition:{duration:.7,ease:"easeOut"},className:"font-black leading-none tracking-tighter text-[#0c1a07] mb-12 text-center",style:{fontSize:"clamp(5rem, 18vw, 13rem)"},children:"Must-b"}),u.jsx(Q.div,{initial:{opacity:0,y:24},animate:{opacity:1,y:0},transition:{delay:.3,duration:.6},className:"w-full max-w-2xl",children:u.jsxs("button",{onClick:o,disabled:n,className:"glass-input w-full rounded-2xl flex items-center justify-between px-5 py-4 group cursor-pointer disabled:opacity-70",children:[u.jsx("span",{className:"text-white/45 text-[16px] leading-relaxed font-normal",children:n?t.welcome.waking:"What do you want to know?"}),u.jsx("div",{className:`w-10 h-10 rounded-full flex items-center justify-center transition-all flex-shrink-0 ${n?"bg-white/10":"bg-[#0c1a07] group-hover:bg-[#1a3a0a] shadow-lg"}`,children:n?u.jsx("div",{className:"w-4 h-4 border-2 border-white/30 border-t-white/70 rounded-full animate-spin"}):u.jsx($o,{size:18,className:"text-white"})})]})}),u.jsx(Q.div,{initial:{opacity:0},animate:{opacity:.5},transition:{delay:1.4},className:"mt-12 flex flex-col items-center gap-1",children:u.jsx("div",{className:"w-6 h-9 rounded-full border-2 border-[#0c1a07]/30 flex items-start justify-center pt-1.5",children:u.jsx("div",{className:"w-1 h-2 rounded-full bg-[#0c1a07]/40 animate-bounce"})})})]}),u.jsx(Q.p,{initial:{opacity:0},animate:{opacity:.45},transition:{delay:1.6},className:"text-center pb-6 text-[11px] text-[#0c1a07]/50 font-medium tracking-widest uppercase select-none",children:t.welcome.footer})]})}function Py(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=Py(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Qe(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=Py(e))&&(r&&(r+=" "),r+=t);return r}const yN={frontier:"⚡ Frontier",gateway:"🌐 Gateway",fast:"🚀 Fast Inference",local:"💻 Local / Offline",open:"🔓 Open Source Cloud",specialist:"🎯 Specialist",regional:"🌏 Regional",enterprise:"🏢 Enterprise",custom:"⚙️ Custom"},vN=["frontier","gateway","fast","local","open","specialist","regional","enterprise","custom"],hp=[{value:"en-US",label:"English (US)"},{value:"tr-TR",label:"Türkçe"},{value:"de-DE",label:"Deutsch"},{value:"es-ES",label:"Español"},{value:"fr-FR",label:"Français"},{value:"zh-CN",label:"中文 (简体)"},{value:"ja-JP",label:"日本語"},{value:"ar-SA",label:"العربية"}],io=["Identity","AI Engine","Workspace","Voice","Finalize"];function xN({index:e,current:t}){const n=e<t,r=e===t;return u.jsxs("div",{className:"flex items-center",children:[u.jsx("div",{className:Qe("w-8 h-8 rounded-full flex items-center justify-center text-xs font-bold transition-all duration-300",n?"bg-orange-500 text-white":r?"bg-orange-500/20 border-2 border-orange-500 text-orange-400":"bg-white/5 border border-white/10 text-gray-600"),children:n?u.jsx(Jr,{size:13}):e+1}),e<io.length-1&&u.jsx("div",{className:Qe("w-8 h-px transition-colors duration-300",n?"bg-orange-500/50":"bg-white/10")})]})}function wN({label:e}){return u.jsx("span",{className:"px-1.5 py-0.5 rounded text-[10px] font-bold bg-white/5 text-gray-500 border border-white/8",children:e})}function kN({fit:e}){return e==="recommended"?u.jsxs("span",{className:"flex items-center gap-1 text-[10px] font-bold text-green-400 bg-green-500/10 border border-green-500/20 px-1.5 py-0.5 rounded",children:[u.jsx(Jr,{size:9})," Recommended"]}):e==="marginal"?u.jsxs("span",{className:"flex items-center gap-1 text-[10px] font-bold text-orange-400 bg-orange-500/10 border border-orange-500/20 px-1.5 py-0.5 rounded",children:[u.jsx(ai,{size:9})," Marginal"]}):u.jsxs("span",{className:"flex items-center gap-1 text-[10px] font-bold text-red-400 bg-red-500/10 border border-red-500/20 px-1.5 py-0.5 rounded",children:[u.jsx(Ls,{size:9})," Heavy"]})}function pp({checked:e,onChange:t,label:n,description:r}){return u.jsxs("button",{type:"button",onClick:()=>t(!e),className:Qe("w-full flex items-center gap-4 px-4 py-4 rounded-xl border transition-all text-left",e?"bg-orange-500/10 border-orange-500/30 text-white":"bg-white/3 border-white/8 text-gray-400 hover:border-white/20 hover:text-white"),children:[u.jsx("div",{className:Qe("relative flex-shrink-0 w-11 h-6 rounded-full transition-colors duration-200",e?"bg-orange-500":"bg-white/15"),children:u.jsx("div",{className:Qe("absolute top-1 w-4 h-4 rounded-full bg-white shadow transition-all duration-200",e?"left-6":"left-1")})}),u.jsxs("div",{children:[u.jsx("p",{className:"font-semibold text-sm",children:n}),r&&u.jsx("p",{className:"text-xs text-gray-500 mt-0.5",children:r})]})]})}function bN(){var Mn,Zt;const e=qr(),[t,n]=y.useState([]),[r,s]=y.useState([]),[i,o]=y.useState(null),[a,l]=y.useState(!0),[c,d]=y.useState("~/Mustb-Projects"),[f,h]=y.useState(0),[p,w]=y.useState(""),[x,b]=y.useState("en-US"),[m,g]=y.useState("openrouter"),[v,S]=y.useState(""),[k,C]=y.useState(""),[j,N]=y.useState("http://localhost:11434"),[M,A]=y.useState(""),[z,U]=y.useState(""),[we,Be]=y.useState(!1),[Tt,Ie]=y.useState(!1),[$,P]=y.useState("idle"),[R,D]=y.useState(!1),[J,B]=y.useState(null);y.useEffect(()=>{fetch("/api/setup/providers").then(E=>E.ok?E.json():{providers:[]}).then(E=>{var Y;(Y=E.providers)!=null&&Y.length&&n(E.providers)}).catch(()=>{}).finally(()=>l(!1)),fetch("/api/setup/workspace-default").then(E=>E.ok?E.json():null).then(E=>{E!=null&&E.suggested&&(d(E.suggested),U(E.suggested))}).catch(()=>{})},[]),y.useEffect(()=>{m==="ollama"&&fetch("/api/setup/ollama-models").then(E=>E.ok?E.json():null).then(E=>{E!=null&&E.models&&s(E.models),E!=null&&E.hardware&&o(E.hardware)}).catch(()=>{})},[m]);const H=m==="ollama",I=t.find(E=>E.id===m),ce=y.useMemo(()=>{const E=v.toLowerCase().trim();return E?t.filter(Y=>Y.label.toLowerCase().includes(E)||Y.description.toLowerCase().includes(E)||Y.tags.some(Ye=>Ye.toLowerCase().includes(E))):t},[t,v]),Te=y.useMemo(()=>{const E={};for(const Y of ce)E[Y.category]||(E[Y.category]=[]),E[Y.category].push(Y);return E},[ce]),q=()=>{switch(f){case 0:return p.trim().length>0;case 1:return H?j.trim().length>0:I!=null&&I.envKeyIsUrl?!0:k.trim().length>0;case 2:return z.trim().length>0;default:return!0}},es=async()=>{P("testing");try{(await navigator.mediaDevices.getUserMedia({audio:!0})).getTracks().forEach(Y=>Y.stop()),P("granted")}catch{P("denied")}},An=async()=>{D(!0),B(null);try{const E={name:p.trim()||"User",language:x,provider:m,apiKey:H?j:k,model:H?M:I==null?void 0:I.defaultModel,skills:["browser","terminal","memory","web_search","filesystem","git","vision","input","telegram","analyzer"],mode:"local",workspacePath:z.trim()||c,wakeWord:we,telemetry:Tt};let Y=await fetch("/api/setup/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(E)});if(!Y.ok&&Y.status===404&&(Y=await fetch("/api/setup",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(E)})),!Y.ok){const Ye=await Y.json().catch(()=>({}));throw new Error(Ye.error??"Setup failed")}e("/app")}catch(E){B(E instanceof Error?E.message:"Unknown error"),D(!1)}};return u.jsxs("div",{className:"min-h-screen bg-[#02040a] flex flex-col items-center justify-center px-4 py-12 relative overflow-hidden",children:[u.jsx("div",{className:"absolute inset-0 pointer-events-none",children:u.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[600px] h-[600px] bg-orange-900/12 rounded-full blur-[120px]"})}),u.jsxs("div",{className:"relative z-10 w-full max-w-xl",children:[u.jsxs("div",{className:"text-center mb-8",children:[u.jsx("div",{className:"flex justify-center mb-4",children:u.jsxs("div",{className:"relative w-14 h-14",children:[u.jsx("div",{className:"absolute inset-0 bg-orange-500 rounded-full blur-lg opacity-40 animate-pulse"}),u.jsx("img",{src:"/logo.png",alt:"Must-b",className:"w-full h-full object-contain relative z-10"})]})}),u.jsx("h1",{className:"text-3xl font-extrabold text-white tracking-tight",children:"Setup Must-b"}),u.jsx("p",{className:"text-gray-500 mt-1.5 text-sm",children:"First-time configuration · 5 steps"})]}),u.jsx("div",{className:"flex justify-center items-center mb-6",children:io.map((E,Y)=>u.jsxs("div",{className:"flex flex-col items-center gap-1",children:[u.jsx(xN,{index:Y,current:f}),u.jsx("span",{className:Qe("text-[9px] font-bold uppercase tracking-widest transition-colors",Y===f?"text-orange-400":Y<f?"text-orange-500/50":"text-gray-700"),children:E})]},Y))}),u.jsx(We,{mode:"wait",children:u.jsxs(Q.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.18},className:"glass rounded-2xl p-6 border border-white/8",children:[u.jsxs("p",{className:"text-[10px] font-bold text-orange-500/60 uppercase tracking-widest mb-1",children:["Step ",f+1," of ",io.length]}),u.jsx("h2",{className:"text-xl font-bold text-white mb-5",children:io[f]}),f===0&&u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx("label",{className:"text-xs text-gray-400 uppercase tracking-widest font-bold",children:"Your name"}),u.jsx("input",{autoFocus:!0,type:"text",value:p,onChange:E=>w(E.target.value),onKeyDown:E=>E.key==="Enter"&&q()&&h(1),placeholder:"e.g. Burak",className:"w-full bg-white/5 border border-white/10 rounded-xl px-4 py-3 text-white placeholder-gray-600 focus:outline-none focus:ring-1 focus:ring-orange-500/50 transition-all text-base"}),u.jsx("p",{className:"text-gray-600 text-xs",children:"Used in greetings and memory. Editable anytime in Settings."})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx("label",{className:"text-xs text-gray-400 uppercase tracking-widest font-bold",children:"Language"}),u.jsxs("div",{className:"relative",children:[u.jsx(Q5,{size:14,className:"absolute left-3.5 top-1/2 -translate-y-1/2 text-gray-500 pointer-events-none"}),u.jsx("select",{value:x,onChange:E=>b(E.target.value),className:"w-full bg-white/5 border border-white/10 rounded-xl pl-9 pr-4 py-3 text-white focus:outline-none focus:ring-1 focus:ring-orange-500/50 transition-all text-sm appearance-none cursor-pointer",children:hp.map(E=>u.jsx("option",{value:E.value,className:"bg-[#0d1117] text-white",children:E.label},E.value))}),u.jsx(Wo,{size:13,className:"absolute right-3.5 top-1/2 -translate-y-1/2 text-gray-500 pointer-events-none rotate-90"})]})]})]}),f===1&&u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"relative",children:[u.jsx(aN,{size:13,className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-500"}),u.jsx("input",{type:"text",value:v,onChange:E=>S(E.target.value),placeholder:"Search providers…",className:"w-full bg-white/5 border border-white/10 rounded-xl pl-9 pr-4 py-2.5 text-white placeholder-gray-600 focus:outline-none focus:ring-1 focus:ring-orange-500/50 text-sm"})]}),u.jsxs("div",{className:"max-h-[260px] overflow-y-auto space-y-4 pr-1 scrollbar-thin scrollbar-thumb-white/10 scrollbar-track-transparent",children:[a?u.jsx("p",{className:"text-center py-6 text-gray-600 text-sm",children:"Loading providers…"}):vN.map(E=>{const Y=Te[E];return Y!=null&&Y.length?u.jsxs("div",{children:[u.jsx("p",{className:"text-[10px] font-bold text-gray-600 uppercase tracking-widest mb-1.5 px-1",children:yN[E]}),u.jsx("div",{className:"space-y-1",children:Y.map(Ye=>u.jsxs("button",{onClick:()=>{g(Ye.id),C("")},className:Qe("w-full flex items-center gap-3 px-3 py-2.5 rounded-xl border transition-all text-left",m===Ye.id?"bg-orange-500/10 border-orange-500/40 text-white":"bg-white/3 border-white/8 text-gray-400 hover:border-white/20 hover:text-white"),children:[u.jsx("div",{className:Qe("w-3 h-3 rounded-full border-2 flex-shrink-0 transition-all",m===Ye.id?"border-orange-500 bg-orange-500":"border-gray-600")}),u.jsxs("div",{className:"flex-1 min-w-0",children:[u.jsx("p",{className:"font-semibold text-sm leading-tight",children:Ye.label}),u.jsx("p",{className:"text-xs text-gray-500 truncate",children:Ye.description})]}),u.jsx("div",{className:"flex flex-wrap gap-1 justify-end flex-shrink-0 max-w-[120px]",children:Ye.tags.slice(0,2).map(yi=>u.jsx(wN,{label:yi},yi))})]},Ye.id))})]},E):null}),!a&&ce.length===0&&u.jsxs("p",{className:"text-center py-6 text-gray-600 text-sm",children:['No providers match "',v,'"']})]}),H?u.jsxs("div",{className:"space-y-3 pt-1 border-t border-white/6",children:[u.jsxs("div",{className:"space-y-1.5",children:[u.jsx("label",{className:"text-xs text-gray-400 uppercase tracking-widest font-bold",children:"Ollama Base URL"}),u.jsx("input",{type:"url",value:j,onChange:E=>N(E.target.value),placeholder:"http://localhost:11434",className:"w-full bg-white/5 border border-white/10 rounded-xl px-4 py-2.5 text-white placeholder-gray-600 focus:outline-none focus:ring-1 focus:ring-orange-500/50 font-mono text-sm"})]}),i&&u.jsxs("div",{className:"flex items-center gap-4 rounded-xl bg-white/3 border border-white/8 px-3 py-2 text-xs text-gray-500",children:[u.jsxs("span",{className:"flex items-center gap-1.5",children:[u.jsx(tN,{size:11,className:"text-orange-400"}),i.ramGb.toFixed(1)," GB RAM"]}),u.jsxs("span",{className:"flex items-center gap-1.5",children:[u.jsx(Ho,{size:11,className:"text-orange-400"}),i.cpuCount," CPUs"]}),u.jsxs("span",{className:"flex items-center gap-1.5",children:[u.jsx(ai,{size:11,className:"text-orange-400"}),"Score ",i.score," · ",i.tier]})]}),r.length>0&&u.jsx("div",{className:"max-h-[180px] overflow-y-auto space-y-1.5 pr-1",children:r.map(E=>u.jsxs("button",{onClick:()=>A(E.modelId),className:Qe("w-full flex items-center gap-3 px-3 py-2.5 rounded-xl border transition-all text-left",M===E.modelId?"bg-orange-500/10 border-orange-500/40 text-white":"bg-white/3 border-white/8 text-gray-400 hover:border-white/20 hover:text-white"),children:[u.jsx("div",{className:Qe("w-3 h-3 rounded-full border-2 flex-shrink-0",M===E.modelId?"border-orange-500 bg-orange-500":"border-gray-600")}),u.jsxs("div",{className:"flex-1 min-w-0",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("p",{className:"font-semibold text-sm",children:E.name}),u.jsx("span",{className:"text-[10px] text-gray-600 font-mono",children:E.params})]}),u.jsx("p",{className:"text-xs text-gray-500 truncate",children:E.description})]}),u.jsxs("div",{className:"flex flex-col items-end gap-1 flex-shrink-0",children:[u.jsx(kN,{fit:E.fit}),u.jsxs("span",{className:"text-[10px] text-gray-600",children:[E.ramGb," GB"]})]})]},E.id))})]}):I?u.jsxs("div",{className:"space-y-2 pt-1 border-t border-white/6",children:[u.jsx("label",{className:"text-xs text-gray-400 uppercase tracking-widest font-bold",children:I.envKeyIsUrl?"Base URL":`${I.label} API Key`}),u.jsx("input",{type:I.envKeyIsUrl?"url":"password",value:k,onChange:E=>C(E.target.value),placeholder:I.placeholder,className:"w-full bg-white/5 border border-white/10 rounded-xl px-4 py-2.5 text-white placeholder-gray-600 focus:outline-none focus:ring-1 focus:ring-orange-500/50 font-mono text-sm"}),I.latestModels.length>0&&u.jsx("div",{className:"flex flex-wrap gap-1.5 pt-1",children:I.latestModels.slice(0,4).map(E=>u.jsx("span",{className:"text-[11px] font-mono text-orange-400/60 bg-orange-500/5 border border-orange-500/10 px-2 py-0.5 rounded-lg",children:E},E))}),u.jsxs("p",{className:"text-gray-600 text-xs",children:["Stored locally in ",u.jsx("code",{className:"text-orange-500/60",children:".env"})," — never sent to external servers."]})]}):null]}),f===2&&u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx("label",{className:"text-xs text-gray-400 uppercase tracking-widest font-bold",children:"Workspace Directory"}),u.jsxs("div",{className:"relative",children:[u.jsx(Y5,{size:13,className:"absolute left-3.5 top-1/2 -translate-y-1/2 text-gray-500 pointer-events-none"}),u.jsx("input",{autoFocus:!0,type:"text",value:z,onChange:E=>U(E.target.value),placeholder:c,className:"w-full bg-white/5 border border-white/10 rounded-xl pl-9 pr-4 py-3 text-white placeholder-gray-600 focus:outline-none focus:ring-1 focus:ring-orange-500/50 font-mono text-sm"})]}),u.jsxs("p",{className:"text-gray-600 text-xs",children:["Must-b will read and write files ",u.jsx("span",{className:"text-orange-500/70 font-medium",children:"only within this directory"}),". The folder will be created if it doesn't exist."]})]}),u.jsxs("div",{className:"flex items-start gap-3 rounded-xl bg-white/3 border border-white/8 px-4 py-3",children:[u.jsx(uN,{size:15,className:"text-green-400 flex-shrink-0 mt-0.5"}),u.jsx("p",{className:"text-xs text-gray-500 leading-relaxed",children:"Must-b operates in a sandboxed workspace. It cannot access files outside this directory unless you explicitly provide a path in a prompt."})]})]}),f===3&&u.jsxs("div",{className:"space-y-4",children:[u.jsx(pp,{checked:we,onChange:Be,label:'Enable "Hey Must-b" Wake Word',description:"Always-on voice activation — must-b-ui listens passively via your microphone."}),u.jsx("div",{className:"rounded-xl bg-white/3 border border-white/8 px-4 py-4",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx("p",{className:"text-sm font-semibold text-white",children:"Test Microphone Permission"}),u.jsxs("p",{className:"text-xs text-gray-500 mt-0.5",children:[$==="idle"&&"Click to verify your browser can access the microphone.",$==="testing"&&"Requesting permission…",$==="granted"&&"Microphone access granted ✓",$==="denied"&&"Permission denied — check browser settings."]})]}),u.jsx("button",{onClick:es,disabled:$==="testing",className:Qe("flex items-center gap-2 px-4 py-2 rounded-xl text-xs font-bold transition-all shrink-0",$==="granted"?"bg-green-500/10 border border-green-500/20 text-green-400 cursor-default":$==="denied"?"bg-red-500/10 border border-red-500/20 text-red-400":"bg-white/5 border border-white/10 text-gray-300 hover:border-white/25 hover:text-white"),children:$==="granted"?u.jsxs(u.Fragment,{children:[u.jsx(Jr,{size:12})," Granted"]}):$==="denied"?u.jsxs(u.Fragment,{children:[u.jsx(ya,{size:12})," Denied"]}):u.jsxs(u.Fragment,{children:[u.jsx(va,{size:12})," Test"]})})]})}),u.jsx("p",{className:"text-gray-700 text-xs px-1",children:"Wake word and microphone can be reconfigured at any time in Settings → Voice."})]}),f===4&&u.jsxs("div",{className:"space-y-5",children:[u.jsx(pp,{checked:Tt,onChange:Ie,label:"Send anonymous crash reports",description:"Helps improve Must-b. No personal data, no conversation content — only error traces."}),u.jsxs("div",{className:"rounded-xl bg-white/3 border border-white/6 px-4 py-4 space-y-2",children:[u.jsx("p",{className:"text-[11px] font-bold text-gray-500 uppercase tracking-widest mb-2",children:"Configuration Summary"}),[{label:"Name",value:p||"—"},{label:"Language",value:((Mn=hp.find(E=>E.value===x))==null?void 0:Mn.label)??x},{label:"Provider",value:((Zt=t.find(E=>E.id===m))==null?void 0:Zt.label)??m},{label:"Workspace",value:(z||c).replace(/^.*\/([^/]+\/[^/]+)$/,"…/$1")},{label:"Wake Word",value:we?"Enabled":"Disabled"}].map(E=>u.jsxs("div",{className:"flex items-center justify-between text-xs",children:[u.jsx("span",{className:"text-gray-600",children:E.label}),u.jsx("span",{className:"text-gray-300 font-mono truncate max-w-[200px]",children:E.value})]},E.label))]}),J&&u.jsx("div",{className:"rounded-xl bg-red-500/10 border border-red-500/20 px-4 py-3 text-red-400 text-sm",children:J}),u.jsx("button",{onClick:An,disabled:R,className:"w-full flex items-center justify-center gap-3 px-8 py-4 rounded-2xl bg-gradient-to-r from-orange-600 to-amber-600 hover:from-orange-500 hover:to-amber-500 text-white font-bold text-base transition-all shadow-lg shadow-orange-500/25 active:scale-[0.98] disabled:opacity-50 disabled:cursor-not-allowed",children:R?u.jsxs(u.Fragment,{children:[u.jsx("span",{className:"w-5 h-5 border-2 border-white/40 border-t-white rounded-full animate-spin"})," Initializing…"]}):u.jsxs(u.Fragment,{children:[u.jsx("span",{className:"text-lg",children:"🚀"})," Initialize Must-b"]})})]})]},f)}),f<4&&u.jsxs("div",{className:"flex items-center justify-between mt-5",children:[u.jsxs("button",{onClick:()=>h(E=>E-1),disabled:f===0,className:"flex items-center gap-2 px-5 py-2.5 rounded-xl text-gray-400 hover:text-white hover:bg-white/5 transition-all disabled:opacity-25 disabled:cursor-not-allowed text-sm font-medium",children:[u.jsx(Tu,{size:16})," Back"]}),u.jsxs("button",{onClick:()=>h(E=>E+1),disabled:!q(),className:"flex items-center gap-2 px-6 py-2.5 rounded-xl bg-orange-600 hover:bg-orange-500 text-white font-semibold text-sm transition-all shadow-lg shadow-orange-500/20 active:scale-[0.97] disabled:opacity-40 disabled:cursor-not-allowed",children:["Continue ",u.jsx(Wo,{size:16})]})]}),f===4&&u.jsx("div",{className:"flex justify-start mt-5",children:u.jsxs("button",{onClick:()=>h(3),className:"flex items-center gap-2 px-5 py-2.5 rounded-xl text-gray-400 hover:text-white hover:bg-white/5 transition-all text-sm font-medium",children:[u.jsx(Tu,{size:16})," Back"]})}),u.jsxs("p",{className:"text-center text-xs text-gray-700 mt-5",children:["All settings saved locally · Run ",u.jsx("code",{className:"text-orange-500/60",children:"must-b doctor"})," to verify"]})]})]})}const Vt=Object.create(null);Vt.open="0";Vt.close="1";Vt.ping="2";Vt.pong="3";Vt.message="4";Vt.upgrade="5";Vt.noop="6";const oo=Object.create(null);Object.keys(Vt).forEach(e=>{oo[Vt[e]]=e});const Ru={type:"error",data:"parser error"},Ry=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",_y=typeof ArrayBuffer=="function",Ay=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,md=({type:e,data:t},n,r)=>Ry&&t instanceof Blob?n?r(t):mp(t,r):_y&&(t instanceof ArrayBuffer||Ay(t))?n?r(t):mp(new Blob([t]),r):r(Vt[e]+(t||"")),mp=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function gp(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let dl;function SN(e,t){if(Ry&&e.data instanceof Blob)return e.data.arrayBuffer().then(gp).then(t);if(_y&&(e.data instanceof ArrayBuffer||Ay(e.data)))return t(gp(e.data));md(e,!1,n=>{dl||(dl=new TextEncoder),t(dl.encode(n))})}const yp="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xs=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<yp.length;e++)xs[yp.charCodeAt(e)]=e;const NN=e=>{let t=e.length*.75,n=e.length,r,s=0,i,o,a,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const c=new ArrayBuffer(t),d=new Uint8Array(c);for(r=0;r<n;r+=4)i=xs[e.charCodeAt(r)],o=xs[e.charCodeAt(r+1)],a=xs[e.charCodeAt(r+2)],l=xs[e.charCodeAt(r+3)],d[s++]=i<<2|o>>4,d[s++]=(o&15)<<4|a>>2,d[s++]=(a&3)<<6|l&63;return c},jN=typeof ArrayBuffer=="function",gd=(e,t)=>{if(typeof e!="string")return{type:"message",data:My(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:CN(e.substring(1),t)}:oo[n]?e.length>1?{type:oo[n],data:e.substring(1)}:{type:oo[n]}:Ru},CN=(e,t)=>{if(jN){const n=NN(e);return My(n,t)}else return{base64:!0,data:e}},My=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},Ly="",EN=(e,t)=>{const n=e.length,r=new Array(n);let s=0;e.forEach((i,o)=>{md(i,!1,a=>{r[o]=a,++s===n&&t(r.join(Ly))})})},TN=(e,t)=>{const n=e.split(Ly),r=[];for(let s=0;s<n.length;s++){const i=gd(n[s],t);if(r.push(i),i.type==="error")break}return r};function PN(){return new TransformStream({transform(e,t){SN(e,n=>{const r=n.length;let s;if(r<126)s=new Uint8Array(1),new DataView(s.buffer).setUint8(0,r);else if(r<65536){s=new Uint8Array(3);const i=new DataView(s.buffer);i.setUint8(0,126),i.setUint16(1,r)}else{s=new Uint8Array(9);const i=new DataView(s.buffer);i.setUint8(0,127),i.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(s[0]|=128),t.enqueue(s),t.enqueue(n)})}})}let fl;function Fi(e){return e.reduce((t,n)=>t+n.length,0)}function Ui(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let s=0;s<t;s++)n[s]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function RN(e,t){fl||(fl=new TextDecoder);const n=[];let r=0,s=-1,i=!1;return new TransformStream({transform(o,a){for(n.push(o);;){if(r===0){if(Fi(n)<1)break;const l=Ui(n,1);i=(l[0]&128)===128,s=l[0]&127,s<126?r=3:s===126?r=1:r=2}else if(r===1){if(Fi(n)<2)break;const l=Ui(n,2);s=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(Fi(n)<8)break;const l=Ui(n,8),c=new DataView(l.buffer,l.byteOffset,l.length),d=c.getUint32(0);if(d>Math.pow(2,21)-1){a.enqueue(Ru);break}s=d*Math.pow(2,32)+c.getUint32(4),r=3}else{if(Fi(n)<s)break;const l=Ui(n,s);a.enqueue(gd(i?l:fl.decode(l),t)),r=0}if(s===0||s>e){a.enqueue(Ru);break}}}})}const Dy=4;function ye(e){if(e)return _N(e)}function _N(e){for(var t in ye.prototype)e[t]=ye.prototype[t];return e}ye.prototype.on=ye.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};ye.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};ye.prototype.off=ye.prototype.removeListener=ye.prototype.removeAllListeners=ye.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,s=0;s<n.length;s++)if(r=n[s],r===t||r.fn===t){n.splice(s,1);break}return n.length===0&&delete this._callbacks["$"+e],this};ye.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,s=n.length;r<s;++r)n[r].apply(this,t)}return this};ye.prototype.emitReserved=ye.prototype.emit;ye.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};ye.prototype.hasListeners=function(e){return!!this.listeners(e).length};const xa=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),ut=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),AN="arraybuffer";function Oy(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const MN=ut.setTimeout,LN=ut.clearTimeout;function wa(e,t){t.useNativeTimers?(e.setTimeoutFn=MN.bind(ut),e.clearTimeoutFn=LN.bind(ut)):(e.setTimeoutFn=ut.setTimeout.bind(ut),e.clearTimeoutFn=ut.clearTimeout.bind(ut))}const DN=1.33;function ON(e){return typeof e=="string"?zN(e):Math.ceil((e.byteLength||e.size)*DN)}function zN(e){let t=0,n=0;for(let r=0,s=e.length;r<s;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function zy(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function VN(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function BN(e){let t={},n=e.split("&");for(let r=0,s=n.length;r<s;r++){let i=n[r].split("=");t[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return t}class IN extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class yd extends ye{constructor(t){super(),this.writable=!1,wa(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new IN(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=gd(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=VN(t);return n.length?"?"+n:""}}class FN extends yd{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};TN(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,EN(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=zy()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let Vy=!1;try{Vy=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const UN=Vy;function $N(){}class WN extends FN{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(s,i)=>{this.onError("xhr post error",s,i)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class zt extends ye{constructor(t,n,r){super(),this.createRequest=t,wa(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=Oy(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let s in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(s)&&r.setRequestHeader(s,this._opts.extraHeaders[s])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var s;r.readyState===3&&((s=this._opts.cookieJar)===null||s===void 0||s.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(s){this.setTimeoutFn(()=>{this._onError(s)},0);return}typeof document<"u"&&(this._index=zt.requestsCount++,zt.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=$N,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete zt.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}zt.requestsCount=0;zt.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",vp);else if(typeof addEventListener=="function"){const e="onpagehide"in ut?"pagehide":"unload";addEventListener(e,vp,!1)}}function vp(){for(let e in zt.requests)zt.requests.hasOwnProperty(e)&&zt.requests[e].abort()}const HN=function(){const e=By({xdomain:!1});return e&&e.responseType!==null}();class KN extends WN{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=HN&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new zt(By,this.uri(),t)}}function By(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||UN))return new XMLHttpRequest}catch{}if(!t)try{return new ut[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Iy=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class GN extends yd{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=Iy?{}:Oy(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(s){return this.emitReserved("error",s)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],s=n===t.length-1;md(r,this.supportsBinary,i=>{try{this.doWrite(r,i)}catch{}s&&xa(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=zy()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const hl=ut.WebSocket||ut.MozWebSocket;class YN extends GN{createSocket(t,n,r){return Iy?new hl(t,n,r):n?new hl(t,n):new hl(t)}doWrite(t,n){this.ws.send(n)}}class qN extends yd{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=RN(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),s=PN();s.readable.pipeTo(t.writable),this._writer=s.writable.getWriter();const i=()=>{r.read().then(({done:a,value:l})=>{a||(this.onPacket(l),i())}).catch(a=>{})};i();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],s=n===t.length-1;this._writer.write(r).then(()=>{s&&xa(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const QN={websocket:YN,webtransport:qN,polling:KN},XN=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,JN=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function _u(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let s=XN.exec(e||""),i={},o=14;for(;o--;)i[JN[o]]=s[o]||"";return n!=-1&&r!=-1&&(i.source=t,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=ZN(i,i.path),i.queryKey=ej(i,i.query),i}function ZN(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function ej(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,s,i){s&&(n[s]=i)}),n}const Au=typeof addEventListener=="function"&&typeof removeEventListener=="function",ao=[];Au&&addEventListener("offline",()=>{ao.forEach(e=>e())},!1);class bn extends ye{constructor(t,n){if(super(),this.binaryType=AN,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=_u(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=_u(n.host).host);wa(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const s=r.prototype.name;this.transports.push(s),this._transportsByName[s]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=BN(this.opts.query)),Au&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},ao.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=Dy,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&bn.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",bn.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const s=this.writeBuffer[r].data;if(s&&(n+=ON(s)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,xa(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,s){if(typeof n=="function"&&(s=n,n=void 0),typeof r=="function"&&(s=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const i={type:t,data:n,options:r};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),s&&this.once("flush",s),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(bn.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Au&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=ao.indexOf(this._offlineEventListener);r!==-1&&ao.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}bn.protocol=Dy;class tj extends bn{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;bn.priorWebsocketSuccess=!1;const s=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",f=>{if(!r)if(f.type==="pong"&&f.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;bn.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(d(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const h=new Error("probe error");h.transport=n.name,this.emitReserved("upgradeError",h)}}))};function i(){r||(r=!0,d(),n.close(),n=null)}const o=f=>{const h=new Error("probe error: "+f);h.transport=n.name,i(),this.emitReserved("upgradeError",h)};function a(){o("transport closed")}function l(){o("socket closed")}function c(f){n&&f.name!==n.name&&i()}const d=()=>{n.removeListener("open",s),n.removeListener("error",o),n.removeListener("close",a),this.off("close",l),this.off("upgrading",c)};n.once("open",s),n.once("error",o),n.once("close",a),this.once("close",l),this.once("upgrading",c),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let nj=class extends tj{constructor(t,n={}){const r=typeof t=="object"?t:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(s=>QN[s]).filter(s=>!!s)),super(t,r)}};function rj(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=_u(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const i=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+i+":"+r.port+t,r.href=r.protocol+"://"+i+(n&&n.port===r.port?"":":"+r.port),r}const sj=typeof ArrayBuffer=="function",ij=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Fy=Object.prototype.toString,oj=typeof Blob=="function"||typeof Blob<"u"&&Fy.call(Blob)==="[object BlobConstructor]",aj=typeof File=="function"||typeof File<"u"&&Fy.call(File)==="[object FileConstructor]";function vd(e){return sj&&(e instanceof ArrayBuffer||ij(e))||oj&&e instanceof Blob||aj&&e instanceof File}function lo(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(lo(e[n]))return!0;return!1}if(vd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return lo(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&lo(e[n]))return!0;return!1}function lj(e){const t=[],n=e.data,r=e;return r.data=Mu(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Mu(e,t){if(!e)return e;if(vd(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=Mu(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=Mu(e[r],t));return n}return e}function uj(e,t){return e.data=Lu(e.data,t),delete e.attachments,e}function Lu(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Lu(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Lu(e[n],t));return e}const cj=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var K;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(K||(K={}));class dj{constructor(t){this.replacer=t}encode(t){return(t.type===K.EVENT||t.type===K.ACK)&&lo(t)?this.encodeAsBinary({type:t.type===K.EVENT?K.BINARY_EVENT:K.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===K.BINARY_EVENT||t.type===K.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=lj(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}class xd extends ye{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===K.BINARY_EVENT;r||n.type===K.BINARY_ACK?(n.type=r?K.EVENT:K.ACK,this.reconstructor=new fj(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(vd(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(K[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===K.BINARY_EVENT||r.type===K.BINARY_ACK){const i=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const o=t.substring(i,n);if(o!=Number(o)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(o)}if(t.charAt(n+1)==="/"){const i=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(i,n)}else r.nsp="/";const s=t.charAt(n+1);if(s!==""&&Number(s)==s){const i=n+1;for(;++n;){const o=t.charAt(n);if(o==null||Number(o)!=o){--n;break}if(n===t.length)break}r.id=Number(t.substring(i,n+1))}if(t.charAt(++n)){const i=this.tryParse(t.substr(n));if(xd.isPayloadValid(r.type,i))r.data=i;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case K.CONNECT:return xp(n);case K.DISCONNECT:return n===void 0;case K.CONNECT_ERROR:return typeof n=="string"||xp(n);case K.EVENT:case K.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&cj.indexOf(n[0])===-1);case K.ACK:case K.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class fj{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=uj(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function xp(e){return Object.prototype.toString.call(e)==="[object Object]"}const hj=Object.freeze(Object.defineProperty({__proto__:null,Decoder:xd,Encoder:dj,get PacketType(){return K}},Symbol.toStringTag,{value:"Module"}));function bt(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const pj=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Uy extends ye{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[bt(t,"open",this.onopen.bind(this)),bt(t,"packet",this.onpacket.bind(this)),bt(t,"error",this.onerror.bind(this)),bt(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,s,i;if(pj.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const o={type:K.EVENT,data:n};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const d=this.ids++,f=n.pop();this._registerAckCallback(d,f),o.id=d}const a=(s=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||s===void 0?void 0:s.writable,l=this.connected&&!(!((i=this.io.engine)===null||i===void 0)&&i._hasPingExpired());return this.flags.volatile&&!a||(l?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(t,n){var r;const s=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(s===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===t&&this.sendBuffer.splice(a,1);n.call(this,new Error("operation has timed out"))},s),o=(...a)=>{this.io.clearTimeoutFn(i),n.apply(this,a)};o.withError=!0,this.acks[t]=o}emitWithAck(t,...n){return new Promise((r,s)=>{const i=(o,a)=>o?s(o):r(a);i.withError=!0,n.push(i),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((s,...i)=>(this._queue[0],s!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(s)):(this._queue.shift(),n&&n(null,...i)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:K.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case K.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case K.EVENT:case K.BINARY_EVENT:this.onevent(t);break;case K.ACK:case K.BINARY_ACK:this.onack(t);break;case K.DISCONNECT:this.ondisconnect();break;case K.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...s){r||(r=!0,n.packet({type:K.ACK,id:t,data:s}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:K.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function Zr(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Zr.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};Zr.prototype.reset=function(){this.attempts=0};Zr.prototype.setMin=function(e){this.ms=e};Zr.prototype.setMax=function(e){this.max=e};Zr.prototype.setJitter=function(e){this.jitter=e};class Du extends ye{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,wa(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Zr({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const s=n.parser||hj;this.encoder=new s.Encoder,this.decoder=new s.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new nj(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const s=bt(n,"open",function(){r.onopen(),t&&t()}),i=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},o=bt(n,"error",i);if(this._timeout!==!1){const a=this._timeout,l=this.setTimeoutFn(()=>{s(),i(new Error("timeout")),n.close()},a);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(s),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(bt(t,"ping",this.onping.bind(this)),bt(t,"data",this.ondata.bind(this)),bt(t,"error",this.onerror.bind(this)),bt(t,"close",this.onclose.bind(this)),bt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){xa(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new Uy(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(s=>{s?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",s)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const ds={};function Ds(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=rj(e,t.path||"/socket.io"),r=n.source,s=n.id,i=n.path,o=ds[s]&&i in ds[s].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let l;return a?l=new Du(r,t):(ds[s]||(ds[s]=new Du(r,t)),l=ds[s]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(Ds,{Manager:Du,Socket:Uy,io:Ds,connect:Ds});let $i=null;function ka(){return $i||($i=Ds(window.location.origin,{transports:["websocket","polling"]}),$i.on("agentUpdate",e=>{try{e!=null&&window.dispatchEvent(new CustomEvent("mustb:agentUpdate",{detail:e}))}catch{}})),$i}let ws=null;async function mj(){if(ws)return ws;try{const e=await fetch("/api/auth/local");if(e.ok)return ws=(await e.json()).token??null,ws}catch{}return null}async function be(e,t={}){const n=await mj(),r={"Content-Type":"application/json",...t.headers};n&&(r.Authorization=`Bearer ${n}`);const s=await fetch(e,{...t,headers:r});return s.status===401&&(ws=null,window.dispatchEvent(new CustomEvent("mustb:401",{detail:{url:e}}))),s}function Fn(e){if(typeof e=="string")return e;if(e==null)return"";if(typeof e=="object"){const t=e,n=t.message??t.error??t.text??t.content??t.result;return n!==void 0?Fn(n):JSON.stringify(e)}return String(e)}function gj(e,t){switch(e){case"planGenerated":{const n=t.steps;return`Plan ready — ${(n==null?void 0:n.length)??0} step(s)`}case"stepStart":{const n=t.step;return`▶ ${(n==null?void 0:n.description)??Fn(t.step)}`}case"stepFinish":{if(t.status==="error")return`✗ ${Fn(t.error)}`;const n=t.step,r=t.result!==void 0?Fn(t.result):void 0,s=(n==null?void 0:n.description)??"Step complete";return r&&r.length<180?`✓ ${s} → ${r}`:`✓ ${s}`}case"agentRepair":{const n=Fn(t.action),r=t.reason?` — ${Fn(t.reason).slice(0,120)}`:"";return`⟳ Repair: ${n}${r}`}default:return null}}function yj({lang:e,code:t}){const[n,r]=y.useState(!1);return u.jsxs("div",{className:"my-3 rounded-xl overflow-hidden border border-white/8 bg-[#0a1a06]/90",children:[u.jsxs("div",{className:"flex items-center justify-between px-4 py-1.5 border-b border-white/6 select-none",children:[u.jsx("span",{className:"text-[11px] font-mono text-green-300/50",children:e||"code"}),u.jsx("button",{onClick:()=>{navigator.clipboard.writeText(t).catch(()=>{}),r(!0),setTimeout(()=>r(!1),2e3)},className:"flex items-center gap-1.5 text-[11px] text-green-300/50 hover:text-green-200 transition-colors",children:n?u.jsxs(u.Fragment,{children:[u.jsx(Jr,{size:10,className:"text-green-400"}),u.jsx("span",{className:"text-green-400",children:"Copied"})]}):u.jsxs(u.Fragment,{children:[u.jsx(F5,{size:10}),"Copy"]})})]}),u.jsx("pre",{className:"overflow-x-auto px-4 py-3 text-[13px] text-green-100 font-mono leading-relaxed whitespace-pre",children:u.jsx("code",{children:t})})]})}function cr(e,t){return e.split(/(`[^`\n]+`)/).map((r,s)=>{if(r.startsWith("`")&&r.endsWith("`")&&r.length>2)return u.jsx("code",{className:"px-1.5 py-0.5 rounded bg-black/15 text-green-800 font-mono text-[12px]",children:r.slice(1,-1)},`${t}-ic${s}`);const i=r.split(/(\*\*[^*\n]+\*\*|\*[^*\n]+\*)/);return u.jsx(y.Fragment,{children:i.map((o,a)=>o.startsWith("**")&&o.endsWith("**")&&o.length>4?u.jsx("strong",{className:"font-bold text-[#0c1a07]",children:o.slice(2,-2)},`${t}-b${s}-${a}`):o.startsWith("*")&&o.endsWith("*")&&o.length>2?u.jsx("em",{className:"italic",children:o.slice(1,-1)},`${t}-em${s}-${a}`):u.jsx("span",{children:o},`${t}-s${s}-${a}`))},`${t}-bi${s}`)})}function vj({text:e,dark:t=!1}){const n=t?"text-green-100":"text-[#1a3810]",r=[],s=e.split(`
|
|
352
|
+
`);let i=0,o=0;const a=()=>`md-${o++}`;for(;i<s.length;){const l=s[i],c=l.match(/^```(\w*)/);if(c){const w=c[1]??"",x=[];for(i++;i<s.length&&!s[i].startsWith("```");)x.push(s[i]),i++;i<s.length&&i++,r.push(u.jsx(yj,{lang:w,code:x.join(`
|
|
353
|
+
`)},a()));continue}const d=l.match(/^### (.+)/);if(d){r.push(u.jsx("h3",{className:`text-sm font-bold mt-4 mb-1 ${n}`,children:cr(d[1],a())},a())),i++;continue}const f=l.match(/^## (.+)/);if(f){r.push(u.jsx("h2",{className:`text-base font-bold mt-5 mb-1.5 ${n}`,children:cr(f[1],a())},a())),i++;continue}const h=l.match(/^# (.+)/);if(h){r.push(u.jsx("h1",{className:`text-lg font-bold mt-6 mb-2 ${n}`,children:cr(h[1],a())},a())),i++;continue}if(l.match(/^[-*]{3,}$/)){r.push(u.jsx("hr",{className:"border-black/10 my-4"},a())),i++;continue}if(l.match(/^[-*•] /)){const w=[];for(;i<s.length&&s[i].match(/^[-*•] /);)w.push(s[i].replace(/^[-*•] /,"")),i++;r.push(u.jsx("ul",{className:"my-2 space-y-1.5 pl-1",children:w.map((x,b)=>u.jsxs("li",{className:`flex items-start gap-2.5 text-[14px] leading-relaxed ${n}`,children:[u.jsx("span",{className:"mt-[7px] w-1.5 h-1.5 rounded-full bg-green-600/50 flex-shrink-0"}),u.jsx("span",{children:cr(x,`ul-${b}`)})]},b))},a()));continue}if(l.match(/^\d+\. /)){const w=[];for(;i<s.length&&s[i].match(/^\d+\. /);)w.push(s[i].replace(/^\d+\. /,"")),i++;r.push(u.jsx("ol",{className:"my-2 space-y-1.5 pl-1",children:w.map((x,b)=>u.jsxs("li",{className:`flex items-start gap-2.5 text-[14px] leading-relaxed ${n}`,children:[u.jsxs("span",{className:"flex-shrink-0 mt-px font-mono text-[12px] w-5 text-right text-green-700/60",children:[b+1,"."]}),u.jsx("span",{children:cr(x,`ol-${b}`)})]},b))},a()));continue}if(l.trim()===""){i++;continue}const p=[];for(;i<s.length&&s[i].trim()!==""&&!s[i].match(/^(```|#{1,3} |[-*•] |\d+\. |[-*]{3,}$)/);)p.push(s[i]),i++;p.length&&r.push(u.jsx("p",{className:`text-[14px] leading-[1.75] my-1.5 ${n}`,children:cr(p.join(" "),`p-${o}`)},a()))}return u.jsx("div",{children:r})}function xj({workflow:e,onDismiss:t}){const[n,r]=y.useState("idle"),[s,i]=y.useState(e.goal.slice(0,52)+(e.goal.length>52?"…":"")),o=async()=>{r("saving");try{const a=await be("/api/skills/save",{method:"POST",body:JSON.stringify({goal:e.goal,answer:e.answer,steps:e.steps,name:s.trim()||void 0})});if(!a.ok)throw new Error(`HTTP ${a.status}`);r("saved"),setTimeout(t,1800)}catch{r("error"),setTimeout(()=>r("idle"),3e3)}};return u.jsx(Q.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},exit:{opacity:0,y:4},transition:{duration:.2},className:"mt-3",children:u.jsx("div",{className:"flex items-center gap-3 px-4 py-2.5 rounded-xl bg-green-900/20 border border-green-600/30",children:n==="saved"?u.jsxs(u.Fragment,{children:[u.jsx(oi,{size:13,className:"text-green-400 shrink-0"}),u.jsx("span",{className:"text-xs font-medium text-green-400",children:"Skill saved!"})]}):u.jsxs(u.Fragment,{children:[u.jsx(z5,{size:13,className:"text-green-700 shrink-0"}),u.jsx("span",{className:"text-[11px] text-green-900 shrink-0 font-medium",children:"Save as Skill:"}),u.jsx("input",{value:s,onChange:a=>i(a.target.value),onKeyDown:a=>a.key==="Enter"&&n==="idle"&&o(),placeholder:"Skill name…",className:"flex-1 bg-transparent text-[12px] text-green-900 outline-none placeholder-green-700/50 min-w-0"}),u.jsx("button",{onClick:o,disabled:n!=="idle",className:"flex items-center gap-1 px-3 py-1 rounded-lg bg-green-900/30 hover:bg-green-900/50 border border-green-800/40 text-green-200 text-[11px] font-semibold transition-all shrink-0 disabled:opacity-50",children:n==="saving"?u.jsxs(u.Fragment,{children:[u.jsx(Nt,{size:10,className:"animate-spin"})," Saving…"]}):n==="error"?"Retry":"Save"}),u.jsx("button",{onClick:t,className:"text-green-800 hover:text-green-600 transition-colors text-[11px] shrink-0",children:"✕"})]})})})}class wj extends y.Component{constructor(t){super(t),this.state={error:null}}static getDerivedStateFromError(t){return{error:t.message??"Unknown error"}}componentDidCatch(t,n){console.error("[ChatErrorBoundary]",t,n.componentStack)}render(){return this.state.error?u.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 p-8 text-center",children:[u.jsx("span",{className:"text-2xl",children:"⚠️"}),u.jsx("p",{className:"text-red-500 font-bold text-sm",children:"Chat render error"}),u.jsx("p",{className:"text-green-900 text-xs font-mono max-w-sm break-all",children:this.state.error}),u.jsx("button",{onClick:()=>this.setState({error:null}),className:"mt-1 px-4 py-2 rounded-xl bg-green-900/20 border border-green-800/30 text-green-200 text-xs font-bold hover:bg-green-900/40 transition-all",children:"Retry"})]}):this.props.children}}function kj({onSend:e,disabled:t}){const{t:n}=sr(),[r,s]=y.useState(""),[i,o]=y.useState(!1),a=y.useRef(null),l=y.useRef(null);y.useEffect(()=>{var h;(h=l.current)==null||h.focus()},[]);const c=typeof window<"u"&&!!(window.SpeechRecognition||window.webkitSpeechRecognition),d=()=>{var w;if(i){(w=a.current)==null||w.stop();return}const h=window.SpeechRecognition||window.webkitSpeechRecognition;if(!h)return;const p=new h;p.continuous=!1,p.interimResults=!0,p.onresult=x=>{let b="";for(let m=x.resultIndex;m<x.results.length;m++)b+=x.results[m][0].transcript;s(b)},p.onend=()=>{o(!1),a.current=null},p.onerror=()=>{o(!1),a.current=null},a.current=p,p.start(),o(!0)},f=()=>{var p;const h=r.trim();!h||t||(i&&((p=a.current)==null||p.stop()),s(""),e(h))};return u.jsx("div",{className:"w-full max-w-2xl mx-auto",children:u.jsxs("div",{className:"glass-input rounded-2xl flex items-center gap-3 px-5 py-4",children:[u.jsx("input",{ref:l,value:r,onChange:h=>s(h.target.value),onKeyDown:h=>{h.key==="Enter"&&f()},placeholder:i?n.chat.listening:"What do you want to know?",disabled:t,className:"flex-1 bg-transparent text-white/90 placeholder-white/35 text-[16px] outline-none min-w-0 leading-relaxed"}),u.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[c&&u.jsx("button",{type:"button",onClick:d,className:`p-2 rounded-full transition-all ${i?"text-green-300 bg-green-800/40 animate-pulse":"text-white/40 hover:text-white/70 hover:bg-white/8"}`,children:i?u.jsx(ya,{size:18}):u.jsx(va,{size:18})}),u.jsx("button",{onClick:f,disabled:!r.trim()||t,className:`w-10 h-10 rounded-full flex items-center justify-center transition-all ${r.trim()&&!t?"bg-[#0c1a07] hover:bg-[#1a3a0a] text-white shadow-lg active:scale-95":"bg-white/10 text-white/25 cursor-not-allowed"}`,children:t?u.jsx(Nt,{size:16,className:"animate-spin text-white/50"}):u.jsx($o,{size:18})})]})]})})}function bj({onSend:e,disabled:t}){const{t:n}=sr(),[r,s]=y.useState(""),[i,o]=y.useState(!1),a=y.useRef(null),l=y.useRef(null),c=typeof window<"u"&&!!(window.SpeechRecognition||window.webkitSpeechRecognition),d=()=>{var w;if(i){(w=a.current)==null||w.stop();return}const h=window.SpeechRecognition||window.webkitSpeechRecognition;if(!h)return;const p=new h;p.continuous=!1,p.interimResults=!0,p.onresult=x=>{let b="";for(let m=x.resultIndex;m<x.results.length;m++)b+=x.results[m][0].transcript;s(b)},p.onend=()=>{o(!1),a.current=null},p.onerror=()=>{o(!1),a.current=null},a.current=p,p.start(),o(!0)},f=()=>{var p;const h=r.trim();!h||t||(i&&((p=a.current)==null||p.stop()),s(""),e(h))};return y.useEffect(()=>{l.current&&(l.current.style.height="auto",l.current.style.height=`${Math.min(l.current.scrollHeight,160)}px`)},[r]),u.jsx("div",{className:"px-4 pb-4 pt-3",children:u.jsx("div",{className:"max-w-3xl mx-auto",children:u.jsxs("div",{className:"glass-input rounded-2xl flex items-end gap-3 px-5 py-3",children:[u.jsx("textarea",{ref:l,value:r,onChange:h=>s(h.target.value),onKeyDown:h=>{h.key==="Enter"&&!h.shiftKey&&(h.preventDefault(),f())},placeholder:i?n.chat.listening:"What do you want to know?",disabled:t,rows:1,className:"flex-1 bg-transparent text-white/90 placeholder-white/35 text-[15px] outline-none resize-none min-h-[28px] max-h-[160px] scrollbar-hide leading-relaxed"}),u.jsxs("div",{className:"flex items-center gap-1.5 mb-0.5 shrink-0",children:[c&&u.jsx("button",{onClick:d,className:`p-2 rounded-full transition-all ${i?"text-green-300 bg-green-800/40 animate-pulse":"text-white/40 hover:text-white/70 hover:bg-white/8"}`,children:i?u.jsx(ya,{size:17}):u.jsx(va,{size:17})}),u.jsx("button",{onClick:f,disabled:!r.trim()||t,className:`w-9 h-9 rounded-full flex items-center justify-center transition-all ${r.trim()&&!t?"bg-[#0c1a07] hover:bg-[#1a3a0a] text-white shadow-lg active:scale-95":"bg-white/10 text-white/25 cursor-not-allowed"}`,children:t?u.jsx(Nt,{size:14,className:"animate-spin text-white/50"}):u.jsx(lN,{size:16})})]})]})})})}function Sj(){const[e,t]=y.useState([]),n=y.useRef(null),r=y.useRef(null),s=e.some(a=>a.kind==="assistant"&&a.status==="pending");y.useEffect(()=>{const a=ka();return a.on("agentUpdate",l=>{const{type:c,...d}=l;if(c==="planStart"){const p=`asst-${Date.now()}-${Math.random().toString(36).slice(2)}`;n.current=p,t(w=>[...w,{id:p,kind:"assistant",content:"",thoughts:[],status:"pending"}]);return}if(c==="finalAnswer"){const p=n.current;if(!p)return;t(w=>w.map(x=>x.id===p?{...x,content:Fn(d.answer??"Done.")}:x));return}if(c==="planFinish"){const p=n.current;if(!p)return;const w=d.status==="failed"?"error":"done",x=d.status==="completed"?{goal:String(d.goal??""),answer:String(d.answer??""),steps:d.steps??[]}:void 0;t(b=>b.map(m=>m.id===p?{...m,status:w,...x?{workflow:x}:{}}:m)),n.current=null;return}const f=gj(c,d);if(!f)return;const h=n.current;h&&t(p=>p.map(w=>w.id===h?{...w,thoughts:[...w.thoughts,f]}:w))}),()=>{a.off("agentUpdate")}},[]),y.useEffect(()=>{var a;(a=r.current)==null||a.scrollIntoView({behavior:"smooth"})},[e]);const i=async a=>{if(a.startsWith("__GUIDANCE__")){const l=a.slice(12);t(c=>[...c,{id:`guidance-${Date.now()}`,kind:"assistant",content:`ℹ ${l}`,thoughts:[],status:"done"}]);return}t(l=>l.map(c=>({...c,workflow:void 0}))),t(l=>[...l,{id:`user-${Date.now()}`,kind:"user",content:a,thoughts:[],status:"done"}]);try{await be("/api/goal",{method:"POST",body:JSON.stringify({goal:a})})}catch{}},o=e.length>0;return u.jsx(wj,{children:u.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[!o&&u.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center px-6 pb-16 select-none",children:[u.jsx(Q.h1,{initial:{opacity:0,y:-24},animate:{opacity:1,y:0},transition:{duration:.7,ease:"easeOut"},className:"font-black leading-none tracking-tighter text-[#0c1a07] mb-10 text-center",style:{fontSize:"clamp(5rem, 18vw, 12rem)"},children:"Must-b"}),u.jsx(Q.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.25,duration:.6,ease:"easeOut"},className:"w-full max-w-2xl",children:u.jsx(kj,{onSend:i,disabled:s})}),u.jsx(Q.div,{initial:{opacity:0},animate:{opacity:.5},transition:{delay:1.2},className:"mt-10 flex flex-col items-center gap-1",children:u.jsx("div",{className:"w-6 h-9 rounded-full border-2 border-[#0c1a07]/30 flex items-start justify-center pt-1.5",children:u.jsx("div",{className:"w-1 h-2 rounded-full bg-[#0c1a07]/40 animate-bounce"})})})]}),o&&u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"flex-1 overflow-y-auto scrollbar-hide",children:u.jsxs("div",{className:"max-w-3xl mx-auto w-full px-5 pt-6 pb-4",children:[e.map(a=>{if(a.kind==="user")return u.jsx("div",{className:"flex justify-end mb-5",children:u.jsx("div",{className:"max-w-[78%]",children:u.jsx("div",{className:"rounded-2xl rounded-br-sm px-5 py-3 text-white text-[14px] leading-relaxed whitespace-pre-wrap",style:{background:"rgba(10,25,8,0.62)",border:"1px solid rgba(160,220,80,0.18)",backdropFilter:"blur(12px)"},children:a.content})})},a.id);const l=a.thoughts.length>0,c=a.content.length>0,d=a.status==="pending",f=a.status==="error"&&!c;return u.jsxs("div",{className:"mb-8",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-2.5",children:[u.jsxs("div",{className:"relative w-5 h-5 shrink-0",children:[u.jsx("div",{className:"absolute inset-0 bg-green-700/30 rounded-full blur-sm"}),u.jsx("img",{src:"/logo.png",alt:"Must-b",className:"w-full h-full object-contain relative z-10"})]}),u.jsx("span",{className:"text-[12px] font-semibold text-[#0c1a07]/70 tracking-wide",children:"Must-b"}),l&&u.jsxs("span",{className:"text-[10px] text-[#0c1a07]/40 font-mono",children:[a.thoughts.length," step",a.thoughts.length!==1?"s":""]})]}),l&&u.jsxs("details",{className:"mb-3 group",...c?{}:{open:!0},children:[u.jsxs("summary",{className:"flex items-center gap-1.5 cursor-pointer list-none select-none w-fit",children:[u.jsx(Wo,{size:11,className:"text-[#0c1a07]/40 group-open:rotate-90 transition-transform duration-150 flex-shrink-0"}),u.jsx("span",{className:"text-[11px] font-medium text-[#0c1a07]/50 hover:text-[#0c1a07]/70 transition-colors",children:"Thought Process"})]}),u.jsx("div",{className:"mt-2 ml-3.5 pl-3.5 border-l border-[#0c1a07]/10 space-y-1",children:a.thoughts.map((h,p)=>u.jsx("p",{className:"text-[11px] font-mono text-[#0c1a07]/50 leading-relaxed break-all",children:h},p))})]}),c?u.jsx("div",{className:"rounded-2xl px-5 py-4",style:{background:"rgba(255,255,255,0.82)",border:"1px solid rgba(0,0,0,0.06)",backdropFilter:"blur(16px)"},children:u.jsx(vj,{text:a.content,dark:!1})}):d?u.jsx("div",{className:"flex items-center gap-1.5 py-2 px-1",children:[0,150,300].map(h=>u.jsx("div",{className:"w-2 h-2 bg-green-700/60 rounded-full animate-bounce",style:{animationDelay:`-${h}ms`}},h))}):f?u.jsx("p",{className:"text-sm text-red-600/80",children:"Something went wrong. Please try again."}):null,u.jsx(We,{children:a.workflow&&!d&&u.jsx(xj,{workflow:a.workflow,onDismiss:()=>t(h=>h.map(p=>p.id===a.id?{...p,workflow:void 0}:p))})})]},a.id)}),u.jsx("div",{ref:r,className:"h-2"})]})}),u.jsx(bj,{onSend:i,disabled:s})]})]})})}function Nj(){const[e,t]=y.useState(!1);return y.useEffect(()=>{const n=ka();return n.on("agentUpdate",r=>{r.type==="SCREEN_CAPTURE_START"&&t(!0),(r.type==="SCREEN_CAPTURED"||r.type==="SCREEN_CAPTURE_END")&&setTimeout(()=>t(!1),700)}),()=>{n.off("agentUpdate")}},[]),u.jsx(We,{children:e&&u.jsxs(Q.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.25},className:"fixed inset-0 z-[9999] pointer-events-none",children:[u.jsxs("div",{className:"absolute inset-0",children:[u.jsx("div",{className:"absolute top-0 left-0 w-12 h-12 border-t-2 border-l-2 border-orange-500/70"}),u.jsx("div",{className:"absolute top-0 right-0 w-12 h-12 border-t-2 border-r-2 border-orange-500/70"}),u.jsx("div",{className:"absolute bottom-0 left-0 w-12 h-12 border-b-2 border-l-2 border-orange-500/70"}),u.jsx("div",{className:"absolute bottom-0 right-0 w-12 h-12 border-b-2 border-r-2 border-orange-500/70"})]}),u.jsx(Q.div,{className:"absolute left-0 right-0 h-[2px] bg-gradient-to-r from-transparent via-orange-500/60 to-transparent",animate:{top:["0%","100%"]},transition:{duration:1.4,repeat:1/0,ease:"linear"}}),u.jsx("div",{className:"absolute top-4 left-1/2 -translate-x-1/2",children:u.jsxs(Q.div,{initial:{y:-10,opacity:0},animate:{y:0,opacity:1},className:"flex items-center gap-2 px-4 py-2 bg-black/80 border border-orange-500/30 rounded-full shadow-[0_0_20px_rgba(234,88,12,0.3)] backdrop-blur-xl",children:[u.jsxs("span",{className:"relative flex h-2 w-2",children:[u.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-orange-400 opacity-75"}),u.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-orange-500"})]}),u.jsx(oN,{size:12,className:"text-orange-400 animate-spin"}),u.jsx("span",{className:"text-orange-300 text-xs font-semibold tracking-wide",children:"Scanning screen…"})]})})]},"scan-overlay")})}function jj(){return y.useEffect(()=>{ka()},[]),u.jsxs("div",{className:"flex flex-col h-[calc(100vh-72px)] overflow-hidden",children:[u.jsx(Nj,{}),u.jsx(Sj,{})]})}const pl=[{id:"openrouter",label:"OpenRouter",placeholder:"sk-or-v1-..."},{id:"openai",label:"OpenAI",placeholder:"sk-..."},{id:"anthropic",label:"Anthropic",placeholder:"sk-ant-..."},{id:"ollama",label:"Ollama (local)",placeholder:"ollama (no key needed)"}];function Cj(){const[e,t]=y.useState(null),[n,r]=y.useState("openrouter"),[s,i]=y.useState(""),[o,a]=y.useState(!1),[l,c]=y.useState(!1),[d,f]=y.useState(!1),[h,p]=y.useState(null),[w,x]=y.useState(null),[b,m]=y.useState(!!window.__MUSTB_NEED_API_KEY);y.useEffect(()=>{be("/api/setup/status").then(j=>j.ok?j.json():null).then(j=>{j&&(t(j),j.provider&&r(j.provider))}).catch(()=>{});const C=()=>{m(!0),window.__MUSTB_NEED_API_KEY=!0};return window.addEventListener("mustb:401",C),()=>window.removeEventListener("mustb:401",C)},[]);const g=async()=>{c(!0),p(null);try{const j=await(await be("/api/setup/test-key",{method:"POST",body:JSON.stringify({provider:n,apiKey:s||void 0})})).json();p({ok:j.ok,msg:j.message??(j.ok?"Connection successful":"Connection failed")})}catch{p({ok:!1,msg:"Gateway unreachable"})}c(!1)},v=async()=>{if(!(!s.trim()&&n!=="ollama")){f(!0),x(null);try{const C=await be("/api/setup/update-key",{method:"POST",body:JSON.stringify({provider:n,apiKey:s})});if(C.ok){x("API key saved."),i(""),window.__MUSTB_NEED_API_KEY=!1,m(!1);const j=await be("/api/setup/status");j.ok&&t(await j.json())}else{const j=await C.json();x(j.error??"Failed to save.")}}catch{x("Gateway unreachable.")}f(!1),setTimeout(()=>x(null),5e3)}},S=pl.find(C=>C.id===n)??pl[0],k=n==="ollama";return u.jsx("div",{className:"h-full overflow-y-auto p-6 font-sans",children:u.jsxs("div",{className:"max-w-xl mx-auto space-y-5",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("div",{className:"w-10 h-10 rounded-2xl bg-orange-500/10 border border-orange-500/20 flex items-center justify-center shrink-0",children:u.jsx(Go,{size:18,className:"text-orange-400"})}),u.jsxs("div",{children:[u.jsx("h1",{className:"text-lg font-bold text-white",children:"Settings"}),u.jsxs("p",{className:"text-[12px] text-gray-500",children:[e!=null&&e.name?`Signed in as ${e.name}`:"Configure Must-b",e!=null&&e.mode?` · ${e.mode} mode`:""]})]})]}),b&&u.jsxs("div",{className:"flex items-start gap-3 px-4 py-3 rounded-xl bg-red-500/10 border border-red-500/25 text-red-300",children:[u.jsx(Ls,{size:15,className:"shrink-0 mt-0.5"}),u.jsxs("div",{children:[u.jsx("p",{className:"text-[13px] font-semibold",children:"API key missing or invalid"}),u.jsx("p",{className:"text-[11px] text-red-400/70 mt-0.5",children:"A request returned 401 Unauthorized. Update your API key below."})]})]}),e&&u.jsxs("div",{className:"px-4 py-3 rounded-xl bg-white/3 border border-white/8",children:[u.jsx("p",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest mb-2",children:"Current Configuration"}),u.jsxs("div",{className:"flex items-center gap-2",children:[e.configured?u.jsx(oi,{size:13,className:"text-green-400"}):u.jsx(Ls,{size:13,className:"text-amber-400"}),u.jsx("span",{className:"text-[13px] text-gray-300",children:e.configured?`Active · Provider: ${e.provider??"unknown"}`:"Not configured — use the setup wizard below"})]})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx("p",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest px-1",children:"LLM Provider"}),u.jsx("div",{className:"grid grid-cols-2 gap-2",children:pl.map(C=>u.jsx("button",{onClick:()=>{r(C.id),p(null)},className:`px-3 py-2.5 rounded-xl border text-[13px] font-medium text-left transition-all ${n===C.id?"bg-orange-500/10 border-orange-500/30 text-orange-300":"bg-white/3 border-white/8 text-gray-400 hover:text-white hover:bg-white/6"}`,children:C.label},C.id))})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsxs("p",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest px-1 flex items-center gap-1.5",children:[u.jsx(X5,{size:9})," API Key"]}),k?u.jsx("div",{className:"px-4 py-3 rounded-xl bg-green-500/5 border border-green-500/15 text-green-400 text-[13px]",children:"Ollama runs locally — no API key required."}):u.jsxs("div",{className:"relative",children:[u.jsx("input",{type:o?"text":"password",value:s,onChange:C=>{i(C.target.value),p(null)},placeholder:S.placeholder,className:"w-full bg-white/4 border border-white/10 rounded-xl px-4 py-3 pr-10 text-[13px] text-white placeholder:text-gray-600 outline-none focus:border-orange-500/40 transition-colors"}),u.jsx("button",{onClick:()=>a(C=>!C),className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-500 hover:text-gray-300 transition-colors",children:o?u.jsx(K5,{size:13}):u.jsx(G5,{size:13})})]}),u.jsx("p",{className:"text-[11px] text-gray-600 px-1",children:"Stored locally in .env — never sent to external servers."})]}),u.jsxs("div",{className:"flex items-center gap-3",children:[!k&&u.jsxs("button",{onClick:g,disabled:l||!s&&!(e!=null&&e.configured),className:"flex items-center gap-2 px-4 py-2.5 rounded-xl bg-white/5 border border-white/10 text-[13px] text-gray-300 font-medium hover:bg-white/8 hover:text-white transition-all disabled:opacity-40",children:[u.jsx(Ko,{size:13,className:l?"animate-spin":""}),"Test Connection"]}),u.jsxs("button",{onClick:v,disabled:d||!s.trim()&&!k,className:"flex items-center gap-2 px-4 py-2.5 rounded-xl bg-orange-600 hover:bg-orange-500 text-white text-[13px] font-semibold transition-all disabled:opacity-40 shadow-lg shadow-orange-500/20",children:[u.jsx(iN,{size:13,className:d?"animate-spin":""}),"Save Key"]})]}),h&&u.jsxs("div",{className:`flex items-start gap-2.5 px-4 py-3 rounded-xl border text-[13px] ${h.ok?"bg-green-500/8 border-green-500/20 text-green-300":"bg-red-500/8 border-red-500/20 text-red-300"}`,children:[h.ok?u.jsx(oi,{size:14,className:"shrink-0 mt-0.5"}):u.jsx(Ls,{size:14,className:"shrink-0 mt-0.5"}),h.msg]}),w&&u.jsx("div",{className:"px-4 py-3 rounded-xl bg-orange-500/8 border border-orange-500/20 text-orange-300 text-[13px]",children:w}),u.jsxs("div",{className:"pt-2 border-t border-white/5",children:[u.jsx("p",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest mb-3",children:"Advanced"}),u.jsxs("a",{href:"/setup",className:"inline-flex items-center gap-2 px-4 py-2.5 rounded-xl bg-white/4 border border-white/8 text-[13px] text-gray-400 hover:text-white hover:bg-white/7 transition-all font-medium",children:[u.jsx(Go,{size:13}),"Re-run Setup Wizard"]})]})]})})}function Ej(){return new URLSearchParams(window.location.search).get("token")??""}function Tj(){const[e,t]=y.useState("connecting"),[n,r]=y.useState([]),[s,i]=y.useState([]),[o,a]=y.useState("idle"),[l,c]=y.useState(null),[d,f]=y.useState(""),h=y.useRef(null),p=y.useRef(null),w=y.useRef([]),x=Ej();y.useEffect(()=>{if(!x){t("denied");return}const k=Ds(`${window.location.origin}/mobile`,{query:{token:x},transports:["websocket","polling"]});return h.current=k,k.on("connect",()=>t("connected")),k.on("disconnect",()=>t("disconnected")),k.on("authError",()=>{t("denied"),k.disconnect()}),k.on("agentUpdate",C=>{const{type:j}=C;if(j==="planStart"&&r([]),j==="stepStart"){const N=C.step;r(M=>[...M,{id:`${Date.now()}-${Math.random()}`,description:(N==null?void 0:N.description)??"Working…",status:"running"}])}j==="stepFinish"&&r(N=>{const M=[...N],A=M.findLastIndex(z=>z.status==="running");return A>=0&&(M[A]={...M[A],status:C.status==="error"?"error":"done"}),M}),j==="skillRunStart"&&C.skillId&&c(C.skillId),j==="planFinish"&&c(null)}),()=>{k.disconnect()}},[x]);const b=y.useCallback(async()=>{try{const k=await fetch("/api/skills/list",{headers:{Authorization:`Bearer ${x}`}});if(k.ok){const C=await k.json();i(C.skills??[])}}catch{}},[x]);y.useEffect(()=>{b()},[b]);const m=async()=>{try{const k=await navigator.mediaDevices.getUserMedia({audio:!0}),C=new MediaRecorder(k,{mimeType:"audio/webm"});w.current=[],C.ondataavailable=j=>{j.data.size>0&&w.current.push(j.data)},C.onstop=()=>{k.getTracks().forEach(j=>j.stop()),v()},C.start(),p.current=C,a("recording")}catch{a("idle")}},g=()=>{var k;(k=p.current)==null||k.stop(),a("sending")},v=async()=>{const k=new Blob(w.current,{type:"audio/webm"}),C=new FormData;C.append("audio",k,"voice.webm");try{const j=await fetch("/api/voice/transcribe",{method:"POST",headers:{Authorization:`Bearer ${x}`},body:C});if(j.ok){const{text:N}=await j.json();f(N),await fetch("/api/goal",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${x}`},body:JSON.stringify({goal:N})})}}catch{}a("idle")},S=async k=>{if(!l){c(k.id);try{await fetch("/api/skills/run",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${x}`},body:JSON.stringify({id:k.id})})}catch{c(null)}}};return!x||e==="denied"?u.jsxs("div",{className:"min-h-screen bg-[#02040a] flex flex-col items-center justify-center gap-4 text-center px-8",children:[u.jsx(Pu,{size:40,className:"text-red-400"}),u.jsx("p",{className:"text-white font-bold text-xl",children:"Access Denied"}),u.jsxs("p",{className:"text-gray-500 text-sm",children:["This link is invalid or has expired.",u.jsx("br",{}),"Generate a new QR code from your desktop."]})]}):u.jsxs("div",{className:"min-h-screen bg-[#02040a] text-white flex flex-col pb-8",children:[u.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-white/5",children:[u.jsxs("div",{className:"flex items-center gap-2.5",children:[u.jsx("img",{src:"/logo.png",alt:"Must-b",className:"w-8 h-8 object-contain"}),u.jsx("span",{className:"font-bold text-base",children:"Must-b"}),u.jsx("span",{className:"text-[10px] text-orange-400 font-medium bg-orange-400/10 border border-orange-400/20 px-2 py-0.5 rounded-full",children:"Companion"})]}),u.jsx("div",{className:"flex items-center gap-1.5 text-xs",children:e==="connected"?u.jsxs(u.Fragment,{children:[u.jsx(hN,{size:13,className:"text-green-400"}),u.jsx("span",{className:"text-green-400",children:"Connected"})]}):e==="connecting"?u.jsxs(u.Fragment,{children:[u.jsx(Nt,{size:13,className:"animate-spin text-orange-400"}),u.jsx("span",{className:"text-orange-400",children:"Connecting…"})]}):u.jsxs(u.Fragment,{children:[u.jsx(fN,{size:13,className:"text-gray-600"}),u.jsx("span",{className:"text-gray-500",children:"Offline"})]})})]}),u.jsxs("div",{className:"flex flex-col items-center justify-center py-10 px-6 border-b border-white/5",children:[u.jsx("p",{className:"text-[11px] text-gray-500 font-medium uppercase tracking-widest mb-6",children:"Voice Command"}),u.jsxs(Q.button,{onPointerDown:m,onPointerUp:g,onPointerLeave:o==="recording"?g:void 0,disabled:o==="sending"||e!=="connected",whileTap:{scale:.93},className:`relative w-28 h-28 rounded-full flex items-center justify-center transition-all select-none ${o==="recording"?"bg-red-500/20 border-2 border-red-500 shadow-[0_0_40px_rgba(239,68,68,0.4)]":o==="sending"?"bg-orange-500/10 border-2 border-orange-500/30":"bg-orange-500/10 border-2 border-orange-500/40 hover:bg-orange-500/20 active:scale-95"} disabled:opacity-40`,children:[o==="sending"?u.jsx(Nt,{size:36,className:"text-orange-400 animate-spin"}):o==="recording"?u.jsx(ya,{size:36,className:"text-red-400"}):u.jsx(va,{size:36,className:"text-orange-400"}),o==="recording"&&u.jsx(Q.span,{className:"absolute inset-0 rounded-full border-2 border-red-500",animate:{scale:[1,1.3,1],opacity:[.8,0,.8]},transition:{duration:1.4,repeat:1/0}})]}),u.jsx("p",{className:"text-[12px] text-gray-600 mt-4",children:o==="recording"?"Listening… release to send":"Hold to speak"}),d&&u.jsxs("p",{className:"text-[11px] text-orange-300 mt-3 text-center max-w-xs",children:['"',d,'"']})]}),u.jsxs("div",{className:"px-5 pt-6 pb-4 border-b border-white/5",children:[u.jsx("p",{className:"text-[10px] text-gray-500 font-bold uppercase tracking-widest mb-3",children:"Live Workflow"}),u.jsx(We,{children:n.length===0?u.jsx("p",{className:"text-[12px] text-gray-700 text-center py-4",children:"No active workflow"}):u.jsx("div",{className:"space-y-2",children:n.slice(-6).map(k=>u.jsxs(Q.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},className:`flex items-start gap-2.5 p-3 rounded-xl border text-[12px] ${k.status==="running"?"bg-orange-500/8 border-orange-500/20":k.status==="error"?"bg-red-500/8 border-red-500/15":"bg-white/3 border-white/5"}`,children:[k.status==="running"&&u.jsx(Nt,{size:12,className:"animate-spin text-orange-400 mt-0.5 shrink-0"}),k.status==="done"&&u.jsx(oi,{size:12,className:"text-green-400 mt-0.5 shrink-0"}),k.status==="error"&&u.jsx(Pu,{size:12,className:"text-red-400 mt-0.5 shrink-0"}),u.jsx("span",{className:k.status==="running"?"text-orange-300":k.status==="error"?"text-red-300":"text-gray-400",children:k.description})]},k.id))})})]}),u.jsxs("div",{className:"px-5 pt-6",children:[u.jsxs("div",{className:"flex items-center justify-between mb-4",children:[u.jsx("p",{className:"text-[10px] text-gray-500 font-bold uppercase tracking-widest",children:"My Skills"}),u.jsx("button",{onClick:b,className:"text-gray-600 hover:text-gray-400 transition-colors",children:u.jsx(Ko,{size:12})})]}),s.length===0?u.jsx("p",{className:"text-[12px] text-gray-700 text-center py-6",children:"No skills saved yet"}):u.jsx("div",{className:"space-y-2.5",children:s.map(k=>{const C=l===k.id;return u.jsxs(Q.div,{layout:!0,className:`flex items-center gap-3 p-3.5 rounded-2xl border transition-all ${C?"bg-orange-500/10 border-orange-500/25":"bg-[#0c0f18] border-white/6"}`,children:[u.jsx(ai,{size:14,className:"text-orange-400 shrink-0"}),u.jsxs("div",{className:"flex-1 min-w-0",children:[u.jsx("p",{className:"font-semibold text-[13px] text-white truncate",children:k.name}),u.jsxs("p",{className:"text-[10px] text-gray-600 mt-0.5",children:[k.runCount,"× run"]})]}),u.jsxs("button",{onClick:()=>S(k),disabled:!!l,className:`flex items-center gap-1.5 px-3 py-1.5 rounded-xl text-[11px] font-semibold transition-all ${C?"bg-orange-500/15 text-orange-400 border border-orange-500/25 cursor-not-allowed":"bg-orange-500/10 border border-orange-500/20 text-orange-400 hover:bg-orange-500/20 disabled:opacity-40 disabled:cursor-not-allowed"}`,children:[C?u.jsx(Nt,{size:11,className:"animate-spin"}):u.jsx(rN,{size:11}),C?"Running":"Run"]})]},k.id)})})]})]})}const ml=[{code:"en",label:"English",flag:"🇬🇧",native:"English"},{code:"tr",label:"Turkish",flag:"🇹🇷",native:"Türkçe"},{code:"de",label:"German",flag:"🇩🇪",native:"Deutsch"}];function $y(){const{locale:e,setLocale:t}=sr(),[n,r]=y.useState(!1),s=y.useRef(null),i=ml.find(o=>o.code===e)??ml[0];return y.useEffect(()=>{if(!n)return;const o=a=>{a.key==="Escape"&&r(!1)};return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)},[n]),u.jsxs("div",{ref:s,className:"relative",children:[u.jsxs("button",{onClick:()=>r(o=>!o),"aria-label":"Switch language",className:`flex items-center gap-1.5 px-2.5 py-1.5 rounded-lg border text-[12px] font-medium transition-all select-none ${n?"bg-white/10 border-white/15 text-white":"bg-white/5 border-white/8 text-gray-300 hover:bg-white/8 hover:text-white"}`,children:[u.jsx(J5,{size:12,className:"text-orange-400 shrink-0"}),u.jsx("span",{children:i.flag}),u.jsx("span",{className:"tracking-wide",children:i.code.toUpperCase()})]}),u.jsx(We,{children:n&&u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>r(!1)}),u.jsxs(Q.div,{initial:{opacity:0,y:-6,scale:.96},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-6,scale:.96},transition:{duration:.13,ease:"easeOut"},className:"absolute right-0 top-full mt-2 z-20 w-44 bg-[#081206]/95 backdrop-blur-2xl border border-white/10 rounded-xl shadow-2xl shadow-black/60 overflow-hidden",children:[u.jsx("div",{className:"px-3 py-2 border-b border-white/6",children:u.jsx("p",{className:"text-[9px] font-bold text-gray-600 uppercase tracking-widest",children:"Language"})}),ml.map(o=>{const a=e===o.code;return u.jsxs("button",{onClick:()=>{t(o.code),r(!1)},className:`w-full flex items-center gap-3 px-3 py-2.5 text-[12px] font-medium transition-colors ${a?"bg-orange-500/12 text-orange-400":"text-gray-300 hover:bg-white/5 hover:text-white"}`,children:[u.jsx("span",{className:"text-base leading-none",children:o.flag}),u.jsxs("div",{className:"text-left flex-1",children:[u.jsx("p",{className:"leading-none",children:o.native}),!a&&u.jsx("p",{className:"text-[10px] text-gray-600 mt-0.5",children:o.label})]}),a&&u.jsx(Jr,{size:12,className:"text-orange-400 shrink-0"})]},o.code)})]})]})})]})}function Pj({onClose:e}){const{t}=sr(),n=nr(),r=qr(),s=n.pathname,[i,o]=y.useState([]),[a,l]=y.useState(null),[c,d]=y.useState(""),[f,h]=y.useState(null),[p,w]=y.useState(""),[x,b]=y.useState(""),m=y.useCallback(async()=>{try{const j=await be("/api/chats");j.ok&&o(await j.json())}catch{}},[]);y.useEffect(()=>{m();const j=setInterval(m,1e4);return()=>clearInterval(j)},[m]),y.useEffect(()=>{be("/api/setup/status").then(j=>j.ok?j.json():null).then(j=>{j&&(w(j.activeProvider??""),b(j.activeModel??""))}).catch(()=>{})},[]);const g=async()=>{try{const j=await be("/api/chats",{method:"POST",body:JSON.stringify({title:"New Chat"})});if(!j.ok){ur.error("Failed to create chat.");return}const N=await j.json();o(M=>[N,...M]),r(`/app?chat=${N.id}`),e()}catch{ur.error("Gateway unreachable.")}},v=async()=>{if(f){try{await be(`/api/chats/${f}`,{method:"DELETE"}),o(j=>j.filter(N=>N.id!==f)),ur.success("Chat deleted."),s.includes(f)&&r("/app")}catch{ur.error("Failed to delete chat.")}h(null)}},S=j=>{l(j.id),d(j.title)},k=async()=>{if(!a||!c.trim()){l(null);return}try{await be(`/api/chats/${a}`,{method:"PATCH",body:JSON.stringify({title:c})}),o(j=>j.map(N=>N.id===a?{...N,title:c}:N)),ur.success("Chat renamed.")}catch{ur.error("Failed to rename chat.")}l(null)},C=s==="/app/settings";return u.jsxs("aside",{className:"w-[280px] h-screen glass-panel flex flex-col overflow-hidden font-sans",children:[u.jsxs("div",{className:"flex items-center justify-between p-4 shrink-0 border-b border-white/[0.06]",children:[u.jsxs("div",{className:"flex items-center gap-2.5",children:[u.jsxs("div",{className:"relative w-7 h-7 shrink-0",children:[u.jsx("div",{className:"absolute inset-0 bg-orange-500 rounded-full blur-md opacity-40"}),u.jsx("img",{src:"/logo.png",alt:"Must-b",className:"w-full h-full object-contain relative z-10"})]}),u.jsx("span",{className:"text-base font-bold tracking-tight text-white",children:"Must-b"})]}),u.jsx("button",{onClick:e,title:t.layout.closePanel,className:"p-1.5 rounded-lg text-gray-500 hover:text-white hover:bg-white/8 transition-all",children:u.jsx(Tu,{size:16})})]}),u.jsx("div",{className:"px-3 pt-3 pb-2 shrink-0",children:u.jsxs("button",{onClick:g,className:"w-full h-10 bg-orange-600 hover:bg-orange-500 text-white rounded-xl flex items-center justify-center gap-2 text-sm font-semibold transition-all shadow-lg shadow-orange-500/20 active:scale-[0.98]",children:[u.jsx(sN,{size:16,strokeWidth:2.5}),t.sidebar.newChat]})}),u.jsxs("div",{className:"flex-1 overflow-y-auto scrollbar-hide px-2 pb-4",children:[u.jsx("h3",{className:"px-2 mt-3 mb-2 text-[10px] font-bold text-gray-500 uppercase tracking-widest",children:t.sidebar.recentChats}),u.jsx("div",{className:"space-y-0.5",children:i.map(j=>u.jsx("div",{className:"group relative",children:a===j.id?u.jsxs("div",{className:"flex items-center gap-1 px-2 py-1.5 bg-white/5 rounded-lg border border-orange-500/40",children:[u.jsx("input",{type:"text",value:c,onChange:N=>d(N.target.value),className:"flex-1 bg-transparent text-[13px] text-white outline-none min-w-0",autoFocus:!0,onKeyDown:N=>{N.key==="Enter"&&k(),N.key==="Escape"&&l(null)}}),u.jsx("button",{onClick:k,className:"p-1 hover:bg-green-500/20 text-green-500 rounded",children:u.jsx(Jr,{size:12})}),u.jsx("button",{onClick:()=>l(null),className:"p-1 hover:bg-red-500/20 text-red-500 rounded",children:u.jsx(Cy,{size:12})})]}):u.jsxs(u.Fragment,{children:[u.jsxs(Do,{to:`/app?chat=${j.id}`,onClick:e,className:Qe("flex items-center gap-2.5 px-2.5 py-2 rounded-lg transition-all text-[13px] font-medium pr-10",s.includes(j.id)?"bg-orange-500/10 text-white border border-orange-500/15":"text-gray-400 hover:text-white hover:bg-white/5"),children:[u.jsx(Sy,{size:13,className:s.includes(j.id)?"text-orange-400 shrink-0":"text-gray-600 shrink-0"}),u.jsx("span",{className:"flex-1 truncate",children:j.title})]}),u.jsxs("div",{className:"absolute right-1 top-1/2 -translate-y-1/2 opacity-0 group-hover:opacity-100 transition-opacity flex items-center gap-0.5 bg-[#0f0f14] px-1 rounded-md shadow-lg border border-white/5",children:[u.jsx("button",{onClick:N=>{N.preventDefault(),N.stopPropagation(),S(j)},className:"p-1 hover:bg-white/10 rounded text-gray-500 hover:text-orange-400",title:"Rename",children:u.jsx(nN,{size:12})}),u.jsx("button",{onClick:N=>{N.preventDefault(),N.stopPropagation(),h(j.id)},className:"p-1 hover:bg-white/10 rounded text-gray-500 hover:text-red-400",title:"Delete",children:u.jsx(dN,{size:12})})]})]})},j.id))}),u.jsx("h3",{className:"px-2 mt-5 mb-2 text-[10px] font-bold text-gray-500 uppercase tracking-widest",children:t.sidebar.system}),u.jsxs(Do,{to:"/app/settings",onClick:e,className:Qe("flex items-center gap-2.5 px-2.5 py-2 rounded-lg transition-all text-[13px] font-medium",C?"bg-orange-500/10 text-white border border-orange-500/15":"text-gray-400 hover:text-white hover:bg-white/5"),children:[u.jsx(Go,{size:14,className:C?"text-orange-400":"text-gray-600"}),t.sidebar.settings]})]}),u.jsxs("div",{className:"border-t border-white/[0.06] bg-black/20 p-3 shrink-0",children:[x&&u.jsxs("div",{className:"mb-3 px-1",children:[u.jsx("p",{className:"text-[9px] text-gray-600 font-bold uppercase tracking-[0.2em] mb-0.5",children:"Active Model"}),u.jsx("p",{className:"text-orange-400 text-[11px] font-bold truncate",children:x}),p&&u.jsx("p",{className:"text-gray-600 text-[10px] capitalize",children:p})]}),u.jsxs("div",{className:"flex items-center gap-1",children:[u.jsxs("button",{onClick:()=>{r("/"),e()},className:"flex-1 flex items-center gap-2 px-2.5 py-2 rounded-lg text-gray-500 hover:text-red-400 hover:bg-red-500/5 transition-all text-xs font-medium",children:[u.jsx(eN,{size:13}),t.sidebar.logout]}),u.jsx($y,{})]}),u.jsxs("p",{className:"mt-2 text-[10px] text-gray-700 px-1",children:[t.sidebar.poweredBy," ",u.jsx("span",{className:"text-orange-600 font-semibold",children:"Auto Step"})]})]}),f&&u.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/60 backdrop-blur-sm p-4",children:u.jsxs("div",{className:"glass-panel rounded-2xl p-6 w-full max-w-sm shadow-2xl",children:[u.jsx("h3",{className:"text-lg font-bold text-white mb-2",children:t.sidebar.deleteChat}),u.jsx("p",{className:"text-gray-400 text-sm mb-6",children:t.sidebar.deleteConfirm}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("button",{onClick:()=>h(null),className:"flex-1 px-4 py-2 rounded-xl bg-white/5 hover:bg-white/10 text-white text-sm font-medium transition-colors",children:t.sidebar.cancel}),u.jsx("button",{onClick:v,className:"flex-1 px-4 py-2 rounded-xl bg-red-600 hover:bg-red-500 text-white text-sm font-medium transition-colors shadow-lg shadow-red-500/20",children:t.sidebar.delete})]})]})})]})}function Rj({url:e,size:t=220}){const n=`https://chart.googleapis.com/chart?chs=${t}x${t}&cht=qr&chl=${encodeURIComponent(e)}&choe=UTF-8`;return u.jsx("div",{style:{width:t,height:t},className:"bg-white p-3 rounded-2xl shadow-[0_0_40px_rgba(234,88,12,0.15)] mx-auto",children:u.jsx("img",{src:n,alt:"QR code",width:t-24,height:t-24,className:"rounded-lg"})})}function _j(e){const[t,n]=y.useState("");return y.useEffect(()=>{if(!e){n("");return}const r=()=>{const i=Math.max(0,e-Date.now()),o=Math.floor(i/6e4),a=Math.floor(i%6e4/1e3);n(`${o}:${a.toString().padStart(2,"0")}`)};r();const s=setInterval(r,1e3);return()=>clearInterval(s)},[e]),t}function Aj({onClose:e}){const[t,n]=y.useState("idle"),[r,s]=y.useState(null),i=_j((r==null?void 0:r.expiresAt)??null),o=y.useCallback(async()=>{n("loading");try{const a=await be("/api/companion/pair");if(!a.ok)throw new Error(`HTTP ${a.status}`);const l=await a.json();s(l),n("ready")}catch{n("error")}},[]);return y.useEffect(()=>{o()},[o]),y.useEffect(()=>{const a=l=>{l.key==="Escape"&&e()};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[e]),u.jsx(We,{children:u.jsx(Q.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-50 bg-black/70 backdrop-blur-sm flex items-center justify-center p-6",onClick:e,children:u.jsxs(Q.div,{initial:{opacity:0,scale:.94,y:12},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.94,y:12},transition:{duration:.22},className:"relative w-full max-w-sm bg-[#0c0f18] border border-white/8 rounded-3xl overflow-hidden shadow-2xl",onClick:a=>a.stopPropagation(),children:[u.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-white/5",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Ny,{size:15,className:"text-orange-400"}),u.jsx("span",{className:"font-bold text-sm text-white",children:"Connect Mobile"})]}),u.jsx("button",{onClick:e,className:"text-gray-600 hover:text-gray-400 transition-colors",children:u.jsx(Cy,{size:16})})]}),u.jsxs("div",{className:"p-6 flex flex-col items-center gap-4",children:[t==="loading"&&u.jsxs("div",{className:"flex flex-col items-center gap-3 py-10",children:[u.jsx(Nt,{size:24,className:"text-orange-400 animate-spin"}),u.jsx("p",{className:"text-xs text-gray-500",children:"Generating secure link…"})]}),t==="error"&&u.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[u.jsx(Pu,{size:24,className:"text-red-400"}),u.jsx("p",{className:"text-sm text-gray-400 text-center",children:"Failed to generate pairing link."}),u.jsxs("button",{onClick:o,className:"flex items-center gap-1.5 px-4 py-2 rounded-xl bg-orange-500/12 border border-orange-500/20 text-orange-400 text-xs font-medium hover:bg-orange-500/22 transition-all",children:[u.jsx(Ko,{size:12})," Retry"]})]}),t==="ready"&&r&&u.jsxs(u.Fragment,{children:[u.jsx(Rj,{url:r.url,size:224}),u.jsxs("p",{className:"text-[11px] text-gray-500 text-center leading-relaxed",children:["Scan with your phone's camera to open the",u.jsx("br",{}),u.jsx("span",{className:"text-orange-400 font-medium",children:"Must-b Companion"})," in your browser."]}),u.jsxs("div",{className:"w-full bg-[#080b12] rounded-2xl p-4 border border-white/5",children:[u.jsx("p",{className:"text-[10px] text-gray-600 mb-1 font-medium uppercase tracking-widest",children:"Access URL"}),u.jsx("p",{className:"text-[11px] text-orange-300 font-mono break-all leading-relaxed",children:r.url})]}),u.jsxs("div",{className:"flex items-center justify-between w-full text-[11px]",children:[u.jsx("span",{className:"text-gray-600",children:"Expires in"}),u.jsx("span",{className:`font-mono font-bold ${i<"1:00"?"text-red-400":"text-orange-400"}`,children:i})]}),u.jsxs("button",{onClick:o,className:"flex items-center gap-1.5 text-[11px] text-gray-600 hover:text-gray-400 transition-colors",children:[u.jsx(Ko,{size:10})," Generate new code"]})]})]})]},"panel")},"backdrop")})}const wp={master:"text-amber-400 bg-amber-400/10 border-amber-400/25",planner:"text-blue-400 bg-blue-400/10 border-blue-400/25",worker:"text-green-400 bg-green-400/10 border-green-400/25"},Mj={master:U5,planner:V5,worker:jy},Lj={master:"Full autonomy",planner:"Plan & delegate",worker:"Execute tasks"};function Dj(e){const t=e/1073741824;return t>=1?`${t.toFixed(1)} GB`:`${(e/1048576).toFixed(0)} MB`}function kp(e){return e.replace(/^[^/]+\//,"").replace(/[-_]/g," ").replace(/\b(\w)/g,t=>t.toUpperCase()).replace(/:(\w+)$/," $1").trim()}function Oj({onClose:e}){var C,j;const{t}=sr(),[n,r]=y.useState(null),[s,i]=y.useState([]),[o,a]=y.useState(!1),[l,c]=y.useState(!1),[d,f]=y.useState(!1),[h,p]=y.useState(()=>[!1,!1,!1]),[w,x]=y.useState(()=>[!1,!1,!1]),[b,m]=y.useState(null);y.useEffect(()=>{const N=async()=>{try{const z=await be("/api/status");z.ok&&r(await z.json())}catch{}},M=async()=>{try{const z=await be("/api/models");if(z.ok){const U=await z.json();i((U.models??[]).slice(0,5))}}catch{}};N(),M(),be("/api/ghost/status").then(async z=>{if(z.ok){const U=await z.json();p(U.pool.map(we=>we.enabled))}}).catch(()=>{});const A=setInterval(()=>{N(),M()},2e4);return()=>clearInterval(A)},[]),y.useEffect(()=>{const N=M=>{var A,z;try{const U=M.detail;(U==null?void 0:U.type)==="toneChange"&&typeof U.tone=="string"&&U.tone!=="normal"&&(m({tone:String(U.tone),score:typeof U.score=="number"?U.score:0,badgeClass:typeof((A=U.theme)==null?void 0:A.badgeClass)=="string"?U.theme.badgeClass:"",badgeLabel:typeof((z=U.theme)==null?void 0:z.badgeLabel)=="string"?U.theme.badgeLabel:String(U.tone)}),setTimeout(()=>m(null),8e3))}catch{}};return window.addEventListener("mustb:agentUpdate",N),()=>window.removeEventListener("mustb:agentUpdate",N)},[]);const g=((C=n==null?void 0:n.tier)==null?void 0:C.toLowerCase())??"worker",v=wp[g]??wp.worker,S=Mj[g]??jy,k=Math.min(100,Math.round(((n==null?void 0:n.score)??0)*10));return u.jsxs("aside",{className:"w-[240px] h-screen glass-panel flex flex-col overflow-hidden font-sans",children:[u.jsxs("div",{className:"flex items-center justify-between px-3 pt-3 pb-2 shrink-0 border-b border-white/[0.06]",children:[u.jsx("span",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest",children:t.layout.system}),u.jsx("button",{onClick:e,title:t.layout.closePanel,className:"p-1.5 rounded-lg text-gray-600 hover:text-white hover:bg-white/8 transition-all",children:u.jsx(Wo,{size:14})})]}),u.jsxs("div",{className:"px-3 py-3 border-b border-white/[0.05]",children:[u.jsx("p",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest mb-2",children:t.rightPanel.agentRole}),n?u.jsxs(Q.div,{initial:{opacity:0,y:5},animate:{opacity:1,y:0},className:`flex items-center gap-2 px-3 py-2 rounded-xl border text-sm font-bold ${v}`,children:[u.jsx(S,{size:13}),u.jsxs("div",{className:"min-w-0",children:[u.jsx("p",{className:"leading-none text-xs",children:n.role}),u.jsx("p",{className:"text-[9px] font-normal opacity-60 mt-0.5 leading-none",children:Lj[g]??""})]})]}):u.jsx("div",{className:"h-10 bg-white/4 rounded-xl animate-pulse"})]}),u.jsxs("div",{className:"px-3 py-3 border-b border-white/[0.05]",children:[u.jsx("p",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest mb-2",children:t.rightPanel.hardware}),u.jsxs("div",{className:"flex items-center justify-between mb-1",children:[u.jsxs("div",{className:"flex items-center gap-1 text-gray-400 text-[11px]",children:[u.jsx(Ho,{size:10,className:"text-orange-400"})," Score"]}),u.jsx("span",{className:"text-orange-400 font-bold text-[11px] tabular-nums",children:((j=n==null?void 0:n.score)==null?void 0:j.toFixed(2))??"—"})]}),u.jsx("div",{className:"h-1 bg-white/5 rounded-full overflow-hidden mb-2",children:u.jsx(Q.div,{className:"h-full bg-gradient-to-r from-orange-600 to-amber-400 rounded-full",initial:{width:0},animate:{width:`${k}%`},transition:{duration:1.2,ease:"easeOut"}})}),u.jsxs("div",{className:"space-y-0.5",children:[(n==null?void 0:n.cpuPct)!=null&&u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-1 text-[10px] text-gray-600",children:[u.jsx(Ho,{size:8})," CPU"]}),u.jsxs("span",{className:"text-[10px] text-gray-500 tabular-nums",children:[n.cpuPct,"%"]})]}),(n==null?void 0:n.ramGb)!=null&&u.jsxs("p",{className:"text-[10px] text-gray-600 flex items-center gap-1",children:[u.jsx(B5,{size:8})," ",n.ramGb," GB RAM"]}),(n==null?void 0:n.gpu)&&u.jsxs("p",{className:"text-[10px] text-gray-600 flex items-center gap-1 truncate",title:n.gpu,children:[u.jsx(ai,{size:8})," ",u.jsx("span",{className:"truncate",children:n.gpu})]})]})]}),u.jsxs("div",{className:"px-3 py-3 border-b border-white/[0.05]",children:[u.jsx("p",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest mb-2",children:t.rightPanel.model}),u.jsxs("div",{className:"flex items-start gap-1.5",children:[u.jsx(ai,{size:12,className:"text-orange-400 mt-0.5 shrink-0"}),u.jsx("p",{className:"text-[11px] font-medium text-gray-300 break-all leading-relaxed",children:n!=null&&n.model?kp(n.model):u.jsx("span",{className:"text-gray-600 italic text-[10px]",children:"No model active"})})]})]}),u.jsxs("div",{className:"px-3 py-3 flex-1 overflow-hidden",children:[u.jsxs("p",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest mb-2 flex items-center gap-1",children:[u.jsx($5,{size:9,className:"text-gray-600"})," Available Models"]}),u.jsx(We,{children:s.length===0?u.jsx("p",{className:"text-[10px] text-gray-700 italic",children:"Ollama not detected"}):u.jsx("div",{className:"space-y-1 overflow-y-auto scrollbar-hide max-h-[140px]",children:s.map((N,M)=>{const A=(n==null?void 0:n.model)&&N.name.startsWith(n.model.split(":")[0]);return u.jsxs(Q.div,{initial:{opacity:0,x:6},animate:{opacity:1,x:0},transition:{delay:M*.04},className:`flex items-center gap-2 px-2 py-1.5 rounded-xl text-[11px] transition-colors ${A?"bg-orange-500/10 border border-orange-500/20":"bg-white/2 border border-white/4"}`,children:[A?u.jsx(oi,{size:9,className:"text-orange-400 shrink-0"}):u.jsx("span",{className:"w-2 h-2 rounded-full bg-white/10 shrink-0"}),u.jsxs("div",{className:"min-w-0 flex-1",children:[u.jsx("p",{className:`font-medium leading-none truncate text-[10px] ${A?"text-orange-300":"text-gray-400"}`,children:kp(N.name)}),u.jsx("p",{className:"text-[9px] text-gray-700 mt-0.5",children:Dj(N.size)})]})]},N.name)})})})]}),u.jsx("div",{className:"px-3 pb-2 border-b border-white/[0.05]",children:u.jsxs("button",{onClick:async()=>{f(!0);try{const N=!l;(await be("/api/shadow/toggle",{method:"POST",body:JSON.stringify({enabled:N})})).ok&&c(N)}catch{}f(!1)},disabled:d,className:`w-full flex items-center justify-between gap-2 py-1.5 px-2.5 rounded-xl border text-[11px] font-semibold transition-all ${l?"bg-purple-500/12 border-purple-500/30 text-purple-300":"bg-white/4 border-white/8 text-gray-500 hover:text-gray-300 hover:bg-white/8"} disabled:opacity-50`,children:[u.jsxs("div",{className:"flex items-center gap-1.5",children:[d?u.jsx(Nt,{size:11,className:"animate-spin"}):u.jsx(cp,{size:11,className:l?"animate-pulse":""}),"Shadow Mode"]}),u.jsx("div",{className:`w-7 h-3.5 rounded-full border transition-all relative ${l?"bg-purple-500/40 border-purple-500/50":"bg-white/8 border-white/10"}`,children:u.jsx("div",{className:`absolute top-0.5 w-2.5 h-2.5 rounded-full transition-all ${l?"left-[14px] bg-purple-400":"left-0.5 bg-gray-600"}`})})]})}),u.jsxs("div",{className:"px-3 pb-2 border-b border-white/[0.05]",children:[u.jsxs("p",{className:"text-[9px] font-bold text-gray-600 uppercase tracking-widest mb-1.5 flex items-center gap-1",children:[u.jsx(Z5,{size:8})," Ghost Slots"]}),u.jsx("div",{className:"flex gap-1.5",children:[0,1,2].map(N=>u.jsxs("button",{disabled:w[N],onClick:async()=>{const M=!h[N];x(A=>{const z=[...A];return z[N]=!0,z});try{(await be("/api/ghost/toggle",{method:"POST",body:JSON.stringify({slot:N,enabled:M})})).ok&&p(z=>{const U=[...z];return U[N]=M,U})}catch{}x(A=>{const z=[...A];return z[N]=!1,z})},className:`flex-1 flex flex-col items-center py-1 rounded-lg border text-[9px] font-bold transition-all ${h[N]?"bg-purple-500/15 border-purple-500/30 text-purple-300":"bg-white/4 border-white/8 text-gray-600 hover:text-gray-400"} disabled:opacity-40`,children:[w[N]?u.jsx(Nt,{size:8,className:"animate-spin"}):u.jsx(cp,{size:8,className:h[N]?"animate-pulse":""}),"G",N+1]},N))})]}),u.jsx(We,{children:b&&u.jsx(Q.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"px-3 pb-1",children:u.jsxs("div",{className:`flex items-center gap-1.5 px-2 py-1 rounded-lg border text-[10px] font-semibold ${b.badgeClass}`,children:[u.jsx(O5,{size:8,className:"animate-pulse"}),b.badgeLabel,u.jsxs("span",{className:"ml-auto text-[9px] opacity-60",children:[Math.round(b.score*100),"%"]})]})})}),u.jsx("div",{className:"px-3 pb-2",children:u.jsxs("button",{onClick:()=>a(!0),className:"w-full flex items-center justify-center gap-1.5 py-1.5 rounded-xl bg-orange-500/8 border border-orange-500/18 text-orange-400 text-[11px] font-semibold hover:bg-orange-500/15 hover:border-orange-500/30 transition-all",children:[u.jsx(Ny,{size:11}),"Connect Mobile"]})}),u.jsx("div",{className:"px-3 pb-3 pt-2 border-t border-white/[0.05]",children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsxs("span",{className:"relative flex h-2 w-2",children:[u.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-green-400 opacity-60"}),u.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-green-400 glow-green"})]}),u.jsx("span",{className:"text-[10px] text-gray-600 font-medium",children:t.rightPanel.connected})]})}),o&&u.jsx(Aj,{onClose:()=>a(!1)})]})}function zj({onWake:e}){const[t,n]=y.useState(!1),[r,s]=y.useState("Must-b"),[i,o]=y.useState(!1),a=y.useRef(null),l=y.useRef(!1);y.useEffect(()=>{l.current=t},[t]),y.useEffect(()=>{const f=window.SpeechRecognition||window.webkitSpeechRecognition;o(!!f),be("/api/identity").then(h=>h.json()).then(h=>{h.name&&s(h.name)}).catch(()=>{})},[]);const c=`hey ${r}`.toLowerCase(),d=y.useCallback(()=>{const f=window.SpeechRecognition||window.webkitSpeechRecognition;if(!f||!l.current)return;const h=new f;h.continuous=!0,h.interimResults=!0,h.lang="en-US",h.maxAlternatives=1,h.onresult=p=>{for(let w=p.resultIndex;w<p.results.length;w++)p.results[w][0].transcript.toLowerCase().trim().includes(c)&&e()},h.onend=()=>{l.current&&setTimeout(d,300)},h.onerror=p=>{p.error!=="no-speech"&&console.warn("[WakeWord] SpeechRecognition error:",p.error),l.current&&setTimeout(d,1e3)},a.current=h;try{h.start()}catch{}},[c,e]);return y.useEffect(()=>{var f;return t?d():((f=a.current)==null||f.stop(),a.current=null),()=>{var h;(h=a.current)==null||h.stop()}},[t,d]),i?u.jsx("button",{type:"button",onClick:()=>n(f=>!f),title:t?`Listening for "Hey ${r}" — click to disable`:`Enable wake word "Hey ${r}"`,className:`flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium transition-all duration-200 ${t?"text-orange-400 bg-orange-500/10 border border-orange-500/20 shadow-[0_0_8px_rgba(234,88,12,0.2)]":"text-gray-600 hover:text-gray-400 hover:bg-white/5 border border-transparent"}`,children:t?u.jsxs(u.Fragment,{children:[u.jsxs("span",{className:"relative flex h-2 w-2",children:[u.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-orange-400 opacity-75"}),u.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-orange-500"})]}),u.jsx(H5,{size:13}),u.jsxs("span",{children:["Hey ",r]})]}):u.jsxs(u.Fragment,{children:[u.jsx(W5,{size:13}),u.jsx("span",{children:"Wake word off"})]})}):null}function bp({to:e,label:t,active:n}){return u.jsx(Do,{to:e,className:`px-4 py-1.5 rounded-full text-[13px] font-semibold transition-all select-none ${n?"bg-black text-white shadow-sm":"text-black/70 hover:text-black hover:bg-black/6"}`,children:t})}function Vj(){const{t:e}=sr(),t=nr(),[n,r]=y.useState(!1),[s,i]=y.useState(!1),o=t.pathname==="/app/settings",a=()=>{var l;(l=document.querySelector("textarea"))==null||l.focus()};return u.jsxs("div",{className:"relative min-h-screen overflow-x-hidden font-sans",children:[u.jsx(We,{children:n&&u.jsx(Q.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.18},className:"fixed inset-0 z-40 bg-black/30 backdrop-blur-[2px]",onClick:()=>r(!1)},"left-backdrop")}),u.jsx(We,{children:n&&u.jsx(Q.div,{initial:{x:"-100%",opacity:.6},animate:{x:0,opacity:1},exit:{x:"-100%",opacity:0},transition:{type:"spring",stiffness:340,damping:32},className:"fixed left-0 top-0 z-50 h-screen",children:u.jsx(Pj,{onClose:()=>r(!1)})},"left-panel")}),u.jsx(We,{children:s&&u.jsx(Q.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.18},className:"fixed inset-0 z-40 bg-black/30 backdrop-blur-[2px]",onClick:()=>i(!1)},"right-backdrop")}),u.jsx(We,{children:s&&u.jsx(Q.div,{initial:{x:"100%",opacity:.6},animate:{x:0,opacity:1},exit:{x:"100%",opacity:0},transition:{type:"spring",stiffness:340,damping:32},className:"fixed right-0 top-0 z-50 h-screen",children:u.jsx(Oj,{onClose:()=>i(!1)})},"right-panel")}),u.jsxs("header",{className:"fixed top-4 left-0 right-0 z-30 px-6 flex items-center justify-between pointer-events-none",children:[u.jsxs("div",{className:"pointer-events-auto flex items-center gap-3",children:[u.jsx("button",{onClick:()=>r(!0),className:"flex items-center gap-2 select-none",title:e.layout.openChats,children:u.jsx("span",{className:"text-[22px] font-black text-[#0c1a07] tracking-tighter drop-shadow-sm",children:"Must-b"})}),u.jsx("button",{onClick:()=>r(!0),className:"p-2 rounded-full bg-white/70 hover:bg-white shadow-sm border border-white/50 text-[#0c1a07] transition-all",title:e.layout.openChats,children:u.jsx(Sy,{size:15})})]}),u.jsxs("nav",{className:"pointer-events-auto nav-pill px-2 py-1.5 flex items-center gap-0.5",children:[u.jsx(bp,{to:"/app",label:"Chat",active:!o}),u.jsx(bp,{to:"/app/settings",label:"Settings",active:o}),u.jsx("div",{className:"w-px h-4 bg-black/10 mx-1"}),u.jsx(zj,{onWake:a}),u.jsx($y,{})]}),u.jsx("div",{className:"pointer-events-auto flex items-center gap-2",children:u.jsxs("button",{onClick:()=>i(!0),title:e.layout.openSystem,className:"flex items-center gap-2 bg-[#0c1a07] hover:bg-[#1a3010] text-white/90 rounded-full px-4 py-2 text-[13px] font-semibold shadow-lg transition-all",children:[u.jsx(Ho,{size:13}),e.layout.system,u.jsx($o,{size:12,className:"opacity-60"})]})})]}),u.jsx("main",{className:"relative min-h-screen pt-[72px]",children:u.jsx(kw,{})})]})}const Bj=[{decision:"duplicate",label:"Create New Agent",sublabel:"Keep both — cloud data is copied to a separate folder",icon:q5,accent:"border-blue-500/30 bg-blue-500/8 hover:border-blue-500/50 text-blue-400"},{decision:"restore",label:"Use Cloud (Overwrite)",sublabel:"Cloud wins — local memory is replaced with cloud version",icon:I5,accent:"border-orange-500/30 bg-orange-500/8 hover:border-orange-500/50 text-orange-400"},{decision:"upload",label:"Keep Mine",sublabel:"Local wins — cloud memory is overwritten with local data",icon:cN,accent:"border-green-500/30 bg-green-500/8 hover:border-green-500/50 text-green-400"}];function Ij(){const[e,t]=y.useState(null),[n,r]=y.useState(!1),[s,i]=y.useState(!1);y.useEffect(()=>{const l=ka(),c=d=>{d.type==="CONFLICT_DETECTED"&&(t({localAgentName:d.localAgentName??null,cloudAgentName:d.cloudAgentName??null,localMtime:d.localMtime??null,cloudTimestamp:d.cloudTimestamp??null}),i(!1)),d.type==="syncResolveFinish"&&(i(!0),setTimeout(()=>{t(null),i(!1)},1800))};return l.on("agentUpdate",c),()=>{l.off("agentUpdate",c)}},[]);const o=async l=>{if(!n){r(!0);try{await fetch("/api/setup/sync-resolve",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({decision:l})})}catch{}r(!1)}},a=l=>{if(!l)return"—";try{return new Date(l).toLocaleString("en-US",{dateStyle:"medium",timeStyle:"short"})}catch{return l}};return u.jsx(We,{children:e&&u.jsx(Q.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-[200] flex items-center justify-center bg-black/70 backdrop-blur-sm px-4",children:u.jsxs(Q.div,{initial:{opacity:0,y:24,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:24,scale:.95},transition:{duration:.25},className:"w-full max-w-md bg-[#0c0f18] border border-white/10 rounded-2xl shadow-2xl overflow-hidden",children:[u.jsxs("div",{className:"flex items-center gap-3 px-6 py-5 border-b border-white/8 bg-amber-500/5",children:[u.jsx("div",{className:"w-9 h-9 rounded-full bg-amber-500/15 flex items-center justify-center flex-shrink-0",children:u.jsx(Ls,{size:18,className:"text-amber-400"})}),u.jsxs("div",{children:[u.jsx("h2",{className:"text-white font-bold text-base",children:"Memory Conflict Detected"}),u.jsx("p",{className:"text-gray-500 text-xs mt-0.5",children:"Two agent identities found — action required"})]})]}),u.jsxs("div",{className:"grid grid-cols-2 gap-3 px-6 pt-5 pb-2",children:[u.jsxs("div",{className:"rounded-xl border border-white/8 bg-white/3 px-4 py-3",children:[u.jsx("p",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest mb-1",children:"Local Agent"}),u.jsx("p",{className:"text-white font-bold text-sm",children:e.localAgentName??"—"}),u.jsx("p",{className:"text-gray-600 text-[10px] mt-1",children:a(e.localMtime)})]}),u.jsxs("div",{className:"rounded-xl border border-orange-500/20 bg-orange-500/5 px-4 py-3",children:[u.jsx("p",{className:"text-[10px] font-bold text-orange-400/60 uppercase tracking-widest mb-1",children:"Cloud Agent"}),u.jsx("p",{className:"text-orange-300 font-bold text-sm",children:e.cloudAgentName??"—"}),u.jsx("p",{className:"text-orange-400/40 text-[10px] mt-1",children:a(e.cloudTimestamp)})]})]}),u.jsx("div",{className:"px-6 py-4 space-y-2",children:s?u.jsxs("div",{className:"flex items-center justify-center gap-2 py-6 text-green-400 text-sm font-semibold",children:[u.jsx("span",{className:"w-4 h-4 rounded-full border-2 border-green-400 flex items-center justify-center text-[10px]",children:"✓"}),"Conflict resolved"]}):Bj.map(l=>{const c=l.icon;return u.jsxs("button",{onClick:()=>o(l.decision),disabled:n,className:`w-full flex items-center gap-3 px-4 py-3 rounded-xl border transition-all text-left disabled:opacity-50 disabled:cursor-not-allowed ${l.accent}`,children:[n?u.jsx(Nt,{size:16,className:"animate-spin flex-shrink-0"}):u.jsx(c,{size:16,className:"flex-shrink-0"}),u.jsxs("div",{children:[u.jsx("p",{className:"font-semibold text-sm text-white",children:l.label}),u.jsx("p",{className:"text-[11px] text-gray-500 mt-0.5",children:l.sublabel})]})]},l.decision)})}),u.jsx("div",{className:"px-6 pb-5 pt-1",children:u.jsx("p",{className:"text-[10px] text-gray-700 text-center",children:'This action cannot be undone · If unsure, choose "Create New Agent" first'})})]})})})}class Fj extends y.Component{constructor(t){super(t),this.state={error:null}}static getDerivedStateFromError(t){return{error:t}}componentDidCatch(t,n){console.error("[ErrorBoundary]",t,n.componentStack)}render(){return this.state.error?u.jsxs("div",{className:"min-h-screen bg-[#02040a] flex flex-col items-center justify-center gap-4 text-center px-6",children:[u.jsx("span",{className:"text-3xl",children:"⚠️"}),u.jsx("p",{className:"text-orange-400 font-bold text-sm",children:"Something went wrong"}),u.jsx("p",{className:"text-gray-600 text-xs font-mono max-w-sm break-all",children:this.state.error.message}),u.jsx("button",{onClick:()=>this.setState({error:null}),className:"mt-2 px-4 py-2 rounded-xl bg-orange-500/10 border border-orange-500/20 text-orange-400 text-xs font-bold hover:bg-orange-500/20 transition-all",children:"Retry"})]}):this.props.children}}function Uj({children:e}){const t=qr(),[n,r]=y.useState(!1);return y.useEffect(()=>{let s=!1;return fetch("/api/setup/status").then(i=>i.ok?i.json():{configured:!0}).then(i=>{s||(i.configured?r(!0):t("/setup",{replace:!0}))}).catch(()=>{s||r(!0)}),()=>{s=!0}},[t]),n?u.jsx(u.Fragment,{children:e}):null}function $j(){return u.jsx(Fj,{children:u.jsx(gN,{children:u.jsxs(Rw,{children:[u.jsx(o2,{position:"top-right",theme:"dark",closeButton:!0,richColors:!0}),u.jsx(Ij,{}),u.jsxs(Sw,{children:[u.jsx(Rt,{path:"/",element:u.jsx(fp,{})}),u.jsx(Rt,{path:"/welcome",element:u.jsx(fp,{})}),u.jsx(Rt,{path:"/setup",element:u.jsx(bN,{})}),u.jsxs(Rt,{path:"/app",element:u.jsx(Uj,{children:u.jsx(Vj,{})}),children:[u.jsx(Rt,{index:!0,element:u.jsx(jj,{})}),u.jsx(Rt,{path:"settings",element:u.jsx(Cj,{})}),u.jsx(Rt,{path:"*",element:u.jsx($f,{to:"/app",replace:!0})})]}),u.jsx(Rt,{path:"/mobile",element:u.jsx(Tj,{})}),u.jsx(Rt,{path:"*",element:u.jsx($f,{to:"/",replace:!0})})]})]})})})}z0(document.getElementById("root")).render(u.jsx(y.StrictMode,{children:u.jsx($j,{})}));
|