agent-state-machine 2.2.0 → 2.2.2

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.
Files changed (36) hide show
  1. package/bin/cli.js +78 -2
  2. package/lib/remote/client.js +37 -8
  3. package/lib/runtime/agent.js +6 -2
  4. package/lib/runtime/interaction.js +2 -1
  5. package/lib/runtime/prompt.js +37 -1
  6. package/lib/runtime/runtime.js +67 -5
  7. package/package.json +1 -1
  8. package/templates/project-builder/README.md +304 -56
  9. package/templates/project-builder/agents/code-fixer.md +50 -0
  10. package/templates/project-builder/agents/code-writer.md +3 -0
  11. package/templates/project-builder/agents/sanity-checker.md +6 -0
  12. package/templates/project-builder/agents/sanity-runner.js +3 -1
  13. package/templates/project-builder/agents/test-planner.md +3 -1
  14. package/templates/project-builder/config.js +4 -4
  15. package/templates/project-builder/scripts/workflow-helpers.js +104 -2
  16. package/templates/project-builder/workflow.js +151 -14
  17. package/templates/starter/README.md +291 -42
  18. package/templates/starter/config.js +1 -1
  19. package/vercel-server/api/submit/[token].js +2 -13
  20. package/vercel-server/api/ws/cli.js +40 -2
  21. package/vercel-server/local-server.js +32 -22
  22. package/vercel-server/public/remote/assets/index-BsJsLDKc.css +1 -0
  23. package/vercel-server/public/remote/assets/index-CmtT6ADh.js +168 -0
  24. package/vercel-server/public/remote/index.html +2 -2
  25. package/vercel-server/ui/src/App.jsx +69 -62
  26. package/vercel-server/ui/src/components/ChoiceInteraction.jsx +69 -18
  27. package/vercel-server/ui/src/components/ConfirmInteraction.jsx +7 -7
  28. package/vercel-server/ui/src/components/ContentCard.jsx +600 -104
  29. package/vercel-server/ui/src/components/EventsLog.jsx +20 -13
  30. package/vercel-server/ui/src/components/Footer.jsx +9 -4
  31. package/vercel-server/ui/src/components/Header.jsx +12 -3
  32. package/vercel-server/ui/src/components/SendingCard.jsx +33 -0
  33. package/vercel-server/ui/src/components/TextInteraction.jsx +8 -8
  34. package/vercel-server/ui/src/index.css +82 -10
  35. package/vercel-server/public/remote/assets/index-BOKpYANC.js +0 -148
  36. package/vercel-server/public/remote/assets/index-DHL_iHQW.css +0 -1
@@ -0,0 +1,168 @@
1
+ (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();function om(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var xf={exports:{}},Cs={},wf={exports:{}},I={};/**
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 Jr=Symbol.for("react.element"),lm=Symbol.for("react.portal"),am=Symbol.for("react.fragment"),um=Symbol.for("react.strict_mode"),cm=Symbol.for("react.profiler"),fm=Symbol.for("react.provider"),dm=Symbol.for("react.context"),hm=Symbol.for("react.forward_ref"),pm=Symbol.for("react.suspense"),mm=Symbol.for("react.memo"),gm=Symbol.for("react.lazy"),su=Symbol.iterator;function ym(e){return e===null||typeof e!="object"?null:(e=su&&e[su]||e["@@iterator"],typeof e=="function"?e:null)}var kf={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Sf=Object.assign,Cf={};function tr(e,t,n){this.props=e,this.context=t,this.refs=Cf,this.updater=n||kf}tr.prototype.isReactComponent={};tr.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")};tr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Pf(){}Pf.prototype=tr.prototype;function $l(e,t,n){this.props=e,this.context=t,this.refs=Cf,this.updater=n||kf}var Wl=$l.prototype=new Pf;Wl.constructor=$l;Sf(Wl,tr.prototype);Wl.isPureReactComponent=!0;var ou=Array.isArray,Tf=Object.prototype.hasOwnProperty,Hl={current:null},Ef={key:!0,ref:!0,__self:!0,__source:!0};function Nf(e,t,n){var r,i={},s=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(s=""+t.key),t)Tf.call(t,r)&&!Ef.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(l===1)i.children=n;else if(1<l){for(var a=Array(l),u=0;u<l;u++)a[u]=arguments[u+2];i.children=a}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)i[r]===void 0&&(i[r]=l[r]);return{$$typeof:Jr,type:e,key:s,ref:o,props:i,_owner:Hl.current}}function vm(e,t){return{$$typeof:Jr,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Kl(e){return typeof e=="object"&&e!==null&&e.$$typeof===Jr}function xm(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var lu=/\/+/g;function Ys(e,t){return typeof e=="object"&&e!==null&&e.key!=null?xm(""+e.key):t.toString(36)}function Mi(e,t,n,r,i){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case Jr:case lm:o=!0}}if(o)return o=e,i=i(o),e=r===""?"."+Ys(o,0):r,ou(i)?(n="",e!=null&&(n=e.replace(lu,"$&/")+"/"),Mi(i,t,n,"",function(u){return u})):i!=null&&(Kl(i)&&(i=vm(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(lu,"$&/")+"/")+e)),t.push(i)),1;if(o=0,r=r===""?".":r+":",ou(e))for(var l=0;l<e.length;l++){s=e[l];var a=r+Ys(s,l);o+=Mi(s,t,n,a,i)}else if(a=ym(e),typeof a=="function")for(e=a.call(e),l=0;!(s=e.next()).done;)s=s.value,a=r+Ys(s,l++),o+=Mi(s,t,n,a,i);else if(s==="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 ai(e,t,n){if(e==null)return e;var r=[],i=0;return Mi(e,r,"","",function(s){return t.call(n,s,i++)}),r}function wm(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 Ee={current:null},bi={transition:null},km={ReactCurrentDispatcher:Ee,ReactCurrentBatchConfig:bi,ReactCurrentOwner:Hl};function jf(){throw Error("act(...) is not supported in production builds of React.")}I.Children={map:ai,forEach:function(e,t,n){ai(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ai(e,function(){t++}),t},toArray:function(e){return ai(e,function(t){return t})||[]},only:function(e){if(!Kl(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};I.Component=tr;I.Fragment=am;I.Profiler=cm;I.PureComponent=$l;I.StrictMode=um;I.Suspense=pm;I.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=km;I.act=jf;I.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=Sf({},e.props),i=e.key,s=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,o=Hl.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(a in t)Tf.call(t,a)&&!Ef.hasOwnProperty(a)&&(r[a]=t[a]===void 0&&l!==void 0?l[a]:t[a])}var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){l=Array(a);for(var u=0;u<a;u++)l[u]=arguments[u+2];r.children=l}return{$$typeof:Jr,type:e.type,key:i,ref:s,props:r,_owner:o}};I.createContext=function(e){return e={$$typeof:dm,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:fm,_context:e},e.Consumer=e};I.createElement=Nf;I.createFactory=function(e){var t=Nf.bind(null,e);return t.type=e,t};I.createRef=function(){return{current:null}};I.forwardRef=function(e){return{$$typeof:hm,render:e}};I.isValidElement=Kl;I.lazy=function(e){return{$$typeof:gm,_payload:{_status:-1,_result:e},_init:wm}};I.memo=function(e,t){return{$$typeof:mm,type:e,compare:t===void 0?null:t}};I.startTransition=function(e){var t=bi.transition;bi.transition={};try{e()}finally{bi.transition=t}};I.unstable_act=jf;I.useCallback=function(e,t){return Ee.current.useCallback(e,t)};I.useContext=function(e){return Ee.current.useContext(e)};I.useDebugValue=function(){};I.useDeferredValue=function(e){return Ee.current.useDeferredValue(e)};I.useEffect=function(e,t){return Ee.current.useEffect(e,t)};I.useId=function(){return Ee.current.useId()};I.useImperativeHandle=function(e,t,n){return Ee.current.useImperativeHandle(e,t,n)};I.useInsertionEffect=function(e,t){return Ee.current.useInsertionEffect(e,t)};I.useLayoutEffect=function(e,t){return Ee.current.useLayoutEffect(e,t)};I.useMemo=function(e,t){return Ee.current.useMemo(e,t)};I.useReducer=function(e,t,n){return Ee.current.useReducer(e,t,n)};I.useRef=function(e){return Ee.current.useRef(e)};I.useState=function(e){return Ee.current.useState(e)};I.useSyncExternalStore=function(e,t,n){return Ee.current.useSyncExternalStore(e,t,n)};I.useTransition=function(){return Ee.current.useTransition()};I.version="18.3.1";wf.exports=I;var C=wf.exports;const Rf=om(C);/**
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 Sm=C,Cm=Symbol.for("react.element"),Pm=Symbol.for("react.fragment"),Tm=Object.prototype.hasOwnProperty,Em=Sm.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Nm={key:!0,ref:!0,__self:!0,__source:!0};function Lf(e,t,n){var r,i={},s=null,o=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)Tm.call(t,r)&&!Nm.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:Cm,type:e,key:s,ref:o,props:i,_owner:Em.current}}Cs.Fragment=Pm;Cs.jsx=Lf;Cs.jsxs=Lf;xf.exports=Cs;var h=xf.exports,Mf={exports:{}},Be={},bf={exports:{}},Af={};/**
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(k,N){var A=k.length;k.push(N);e:for(;0<A;){var M=A-1>>>1,_=k[M];if(0<i(_,N))k[M]=N,k[A]=_,A=M;else break e}}function n(k){return k.length===0?null:k[0]}function r(k){if(k.length===0)return null;var N=k[0],A=k.pop();if(A!==N){k[0]=A;e:for(var M=0,_=k.length,$=_>>>1;M<$;){var se=2*(M+1)-1,Ve=k[se],Se=se+1,it=k[Se];if(0>i(Ve,A))Se<_&&0>i(it,Ve)?(k[M]=it,k[Se]=A,M=Se):(k[M]=Ve,k[se]=A,M=se);else if(Se<_&&0>i(it,A))k[M]=it,k[Se]=A,M=Se;else break e}}return N}function i(k,N){var A=k.sortIndex-N.sortIndex;return A!==0?A:k.id-N.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var a=[],u=[],f=1,c=null,d=3,g=!1,v=!1,x=!1,E=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,p=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function m(k){for(var N=n(u);N!==null;){if(N.callback===null)r(u);else if(N.startTime<=k)r(u),N.sortIndex=N.expirationTime,t(a,N);else break;N=n(u)}}function w(k){if(x=!1,m(k),!v)if(n(a)!==null)v=!0,F(P);else{var N=n(u);N!==null&&S(w,N.startTime-k)}}function P(k,N){v=!1,x&&(x=!1,y(T),T=-1),g=!0;var A=d;try{for(m(N),c=n(a);c!==null&&(!(c.expirationTime>N)||k&&!B());){var M=c.callback;if(typeof M=="function"){c.callback=null,d=c.priorityLevel;var _=M(c.expirationTime<=N);N=e.unstable_now(),typeof _=="function"?c.callback=_:c===n(a)&&r(a),m(N)}else r(a);c=n(a)}if(c!==null)var $=!0;else{var se=n(u);se!==null&&S(w,se.startTime-N),$=!1}return $}finally{c=null,d=A,g=!1}}var R=!1,L=null,T=-1,b=5,D=-1;function B(){return!(e.unstable_now()-D<b)}function U(){if(L!==null){var k=e.unstable_now();D=k;var N=!0;try{N=L(!0,k)}finally{N?ne():(R=!1,L=null)}}else R=!1}var ne;if(typeof p=="function")ne=function(){p(U)};else if(typeof MessageChannel<"u"){var H=new MessageChannel,De=H.port2;H.port1.onmessage=U,ne=function(){De.postMessage(null)}}else ne=function(){E(U,0)};function F(k){L=k,R||(R=!0,ne())}function S(k,N){T=E(function(){k(e.unstable_now())},N)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(k){k.callback=null},e.unstable_continueExecution=function(){v||g||(v=!0,F(P))},e.unstable_forceFrameRate=function(k){0>k||125<k?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):b=0<k?Math.floor(1e3/k):5},e.unstable_getCurrentPriorityLevel=function(){return d},e.unstable_getFirstCallbackNode=function(){return n(a)},e.unstable_next=function(k){switch(d){case 1:case 2:case 3:var N=3;break;default:N=d}var A=d;d=N;try{return k()}finally{d=A}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(k,N){switch(k){case 1:case 2:case 3:case 4:case 5:break;default:k=3}var A=d;d=k;try{return N()}finally{d=A}},e.unstable_scheduleCallback=function(k,N,A){var M=e.unstable_now();switch(typeof A=="object"&&A!==null?(A=A.delay,A=typeof A=="number"&&0<A?M+A:M):A=M,k){case 1:var _=-1;break;case 2:_=250;break;case 5:_=1073741823;break;case 4:_=1e4;break;default:_=5e3}return _=A+_,k={id:f++,callback:N,priorityLevel:k,startTime:A,expirationTime:_,sortIndex:-1},A>M?(k.sortIndex=A,t(u,k),n(a)===null&&k===n(u)&&(x?(y(T),T=-1):x=!0,S(w,A-M))):(k.sortIndex=_,t(a,k),v||g||(v=!0,F(P))),k},e.unstable_shouldYield=B,e.unstable_wrapCallback=function(k){var N=d;return function(){var A=d;d=N;try{return k.apply(this,arguments)}finally{d=A}}}})(Af);bf.exports=Af;var jm=bf.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 Rm=C,Fe=jm;function j(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 Df=new Set,Ar={};function xn(e,t){Kn(e,t),Kn(e+"Capture",t)}function Kn(e,t){for(Ar[e]=t,e=0;e<t.length;e++)Df.add(t[e])}var kt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Vo=Object.prototype.hasOwnProperty,Lm=/^[: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]*$/,au={},uu={};function Mm(e){return Vo.call(uu,e)?!0:Vo.call(au,e)?!1:Lm.test(e)?uu[e]=!0:(au[e]=!0,!1)}function bm(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 Am(e,t,n,r){if(t===null||typeof t>"u"||bm(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 Ne(e,t,n,r,i,s,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}var ge={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ge[e]=new Ne(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ge[t]=new Ne(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ge[e]=new Ne(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ge[e]=new Ne(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){ge[e]=new Ne(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ge[e]=new Ne(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ge[e]=new Ne(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ge[e]=new Ne(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ge[e]=new Ne(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ql=/[\-:]([a-z])/g;function Gl(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(Ql,Gl);ge[t]=new Ne(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(Ql,Gl);ge[t]=new Ne(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(Ql,Gl);ge[t]=new Ne(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ge[e]=new Ne(e,1,!1,e.toLowerCase(),null,!1,!1)});ge.xlinkHref=new Ne("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ge[e]=new Ne(e,1,!1,e.toLowerCase(),null,!0,!0)});function Yl(e,t,n,r){var i=ge.hasOwnProperty(t)?ge[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Am(t,n,i,r)&&(n=null),r||i===null?Mm(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Et=Rm.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ui=Symbol.for("react.element"),Pn=Symbol.for("react.portal"),Tn=Symbol.for("react.fragment"),Xl=Symbol.for("react.strict_mode"),_o=Symbol.for("react.profiler"),Vf=Symbol.for("react.provider"),_f=Symbol.for("react.context"),Zl=Symbol.for("react.forward_ref"),Oo=Symbol.for("react.suspense"),Io=Symbol.for("react.suspense_list"),ql=Symbol.for("react.memo"),Lt=Symbol.for("react.lazy"),Of=Symbol.for("react.offscreen"),cu=Symbol.iterator;function ir(e){return e===null||typeof e!="object"?null:(e=cu&&e[cu]||e["@@iterator"],typeof e=="function"?e:null)}var ee=Object.assign,Xs;function mr(e){if(Xs===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Xs=t&&t[1]||""}return`
34
+ `+Xs+e}var Zs=!1;function qs(e,t){if(!e||Zs)return"";Zs=!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(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
35
+ `),s=r.stack.split(`
36
+ `),o=i.length-1,l=s.length-1;1<=o&&0<=l&&i[o]!==s[l];)l--;for(;1<=o&&0<=l;o--,l--)if(i[o]!==s[l]){if(o!==1||l!==1)do if(o--,l--,0>l||i[o]!==s[l]){var a=`
37
+ `+i[o].replace(" at new "," at ");return e.displayName&&a.includes("<anonymous>")&&(a=a.replace("<anonymous>",e.displayName)),a}while(1<=o&&0<=l);break}}}finally{Zs=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?mr(e):""}function Dm(e){switch(e.tag){case 5:return mr(e.type);case 16:return mr("Lazy");case 13:return mr("Suspense");case 19:return mr("SuspenseList");case 0:case 2:case 15:return e=qs(e.type,!1),e;case 11:return e=qs(e.type.render,!1),e;case 1:return e=qs(e.type,!0),e;default:return""}}function Fo(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 Tn:return"Fragment";case Pn:return"Portal";case _o:return"Profiler";case Xl:return"StrictMode";case Oo:return"Suspense";case Io:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case _f:return(e.displayName||"Context")+".Consumer";case Vf:return(e._context.displayName||"Context")+".Provider";case Zl:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ql:return t=e.displayName||null,t!==null?t:Fo(e.type)||"Memo";case Lt:t=e._payload,e=e._init;try{return Fo(e(t))}catch{}}return null}function Vm(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 Fo(t);case 8:return t===Xl?"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 Kt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function If(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function _m(e){var t=If(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 i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.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 ci(e){e._valueTracker||(e._valueTracker=_m(e))}function Ff(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=If(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Hi(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 zo(e,t){var n=t.checked;return ee({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function fu(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Kt(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 zf(e,t){t=t.checked,t!=null&&Yl(e,"checked",t,!1)}function Bo(e,t){zf(e,t);var n=Kt(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")?Uo(e,t.type,n):t.hasOwnProperty("defaultValue")&&Uo(e,t.type,Kt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function du(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 Uo(e,t,n){(t!=="number"||Hi(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var gr=Array.isArray;function zn(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Kt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function $o(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(j(91));return ee({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function hu(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(j(92));if(gr(n)){if(1<n.length)throw Error(j(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Kt(n)}}function Bf(e,t){var n=Kt(t.value),r=Kt(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 pu(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Uf(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 Wo(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Uf(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var fi,$f=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(fi=fi||document.createElement("div"),fi.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=fi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Dr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var wr={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},Om=["Webkit","ms","Moz","O"];Object.keys(wr).forEach(function(e){Om.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),wr[t]=wr[e]})});function Wf(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||wr.hasOwnProperty(e)&&wr[e]?(""+t).trim():t+"px"}function Hf(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Wf(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Im=ee({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 Ho(e,t){if(t){if(Im[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(j(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(j(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(j(61))}if(t.style!=null&&typeof t.style!="object")throw Error(j(62))}}function Ko(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 Qo=null;function Jl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Go=null,Bn=null,Un=null;function mu(e){if(e=ni(e)){if(typeof Go!="function")throw Error(j(280));var t=e.stateNode;t&&(t=js(t),Go(e.stateNode,e.type,t))}}function Kf(e){Bn?Un?Un.push(e):Un=[e]:Bn=e}function Qf(){if(Bn){var e=Bn,t=Un;if(Un=Bn=null,mu(e),t)for(e=0;e<t.length;e++)mu(t[e])}}function Gf(e,t){return e(t)}function Yf(){}var Js=!1;function Xf(e,t,n){if(Js)return e(t,n);Js=!0;try{return Gf(e,t,n)}finally{Js=!1,(Bn!==null||Un!==null)&&(Yf(),Qf())}}function Vr(e,t){var n=e.stateNode;if(n===null)return null;var r=js(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(j(231,t,typeof n));return n}var Yo=!1;if(kt)try{var sr={};Object.defineProperty(sr,"passive",{get:function(){Yo=!0}}),window.addEventListener("test",sr,sr),window.removeEventListener("test",sr,sr)}catch{Yo=!1}function Fm(e,t,n,r,i,s,o,l,a){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(f){this.onError(f)}}var kr=!1,Ki=null,Qi=!1,Xo=null,zm={onError:function(e){kr=!0,Ki=e}};function Bm(e,t,n,r,i,s,o,l,a){kr=!1,Ki=null,Fm.apply(zm,arguments)}function Um(e,t,n,r,i,s,o,l,a){if(Bm.apply(this,arguments),kr){if(kr){var u=Ki;kr=!1,Ki=null}else throw Error(j(198));Qi||(Qi=!0,Xo=u)}}function wn(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 Zf(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 gu(e){if(wn(e)!==e)throw Error(j(188))}function $m(e){var t=e.alternate;if(!t){if(t=wn(e),t===null)throw Error(j(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return gu(i),e;if(s===r)return gu(i),t;s=s.sibling}throw Error(j(188))}if(n.return!==r.return)n=i,r=s;else{for(var o=!1,l=i.child;l;){if(l===n){o=!0,n=i,r=s;break}if(l===r){o=!0,r=i,n=s;break}l=l.sibling}if(!o){for(l=s.child;l;){if(l===n){o=!0,n=s,r=i;break}if(l===r){o=!0,r=s,n=i;break}l=l.sibling}if(!o)throw Error(j(189))}}if(n.alternate!==r)throw Error(j(190))}if(n.tag!==3)throw Error(j(188));return n.stateNode.current===n?e:t}function qf(e){return e=$m(e),e!==null?Jf(e):null}function Jf(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Jf(e);if(t!==null)return t;e=e.sibling}return null}var ed=Fe.unstable_scheduleCallback,yu=Fe.unstable_cancelCallback,Wm=Fe.unstable_shouldYield,Hm=Fe.unstable_requestPaint,re=Fe.unstable_now,Km=Fe.unstable_getCurrentPriorityLevel,ea=Fe.unstable_ImmediatePriority,td=Fe.unstable_UserBlockingPriority,Gi=Fe.unstable_NormalPriority,Qm=Fe.unstable_LowPriority,nd=Fe.unstable_IdlePriority,Ps=null,at=null;function Gm(e){if(at&&typeof at.onCommitFiberRoot=="function")try{at.onCommitFiberRoot(Ps,e,void 0,(e.current.flags&128)===128)}catch{}}var tt=Math.clz32?Math.clz32:Zm,Ym=Math.log,Xm=Math.LN2;function Zm(e){return e>>>=0,e===0?32:31-(Ym(e)/Xm|0)|0}var di=64,hi=4194304;function yr(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 Yi(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,o=n&268435455;if(o!==0){var l=o&~i;l!==0?r=yr(l):(s&=o,s!==0&&(r=yr(s)))}else o=n&~i,o!==0?r=yr(o):s!==0&&(r=yr(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===16&&(s&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-tt(t),i=1<<n,r|=e[n],t&=~i;return r}function qm(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 Jm(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var o=31-tt(s),l=1<<o,a=i[o];a===-1?(!(l&n)||l&r)&&(i[o]=qm(l,t)):a<=t&&(e.expiredLanes|=l),s&=~l}}function Zo(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function rd(){var e=di;return di<<=1,!(di&4194240)&&(di=64),e}function eo(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ei(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-tt(t),e[t]=n}function eg(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 i=31-tt(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function ta(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-tt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var W=0;function id(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var sd,na,od,ld,ad,qo=!1,pi=[],Ot=null,It=null,Ft=null,_r=new Map,Or=new Map,At=[],tg="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 vu(e,t){switch(e){case"focusin":case"focusout":Ot=null;break;case"dragenter":case"dragleave":It=null;break;case"mouseover":case"mouseout":Ft=null;break;case"pointerover":case"pointerout":_r.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Or.delete(t.pointerId)}}function or(e,t,n,r,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},t!==null&&(t=ni(t),t!==null&&na(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function ng(e,t,n,r,i){switch(t){case"focusin":return Ot=or(Ot,e,t,n,r,i),!0;case"dragenter":return It=or(It,e,t,n,r,i),!0;case"mouseover":return Ft=or(Ft,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return _r.set(s,or(_r.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,Or.set(s,or(Or.get(s)||null,e,t,n,r,i)),!0}return!1}function ud(e){var t=ln(e.target);if(t!==null){var n=wn(t);if(n!==null){if(t=n.tag,t===13){if(t=Zf(n),t!==null){e.blockedOn=t,ad(e.priority,function(){od(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 Ai(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Jo(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Qo=r,n.target.dispatchEvent(r),Qo=null}else return t=ni(n),t!==null&&na(t),e.blockedOn=n,!1;t.shift()}return!0}function xu(e,t,n){Ai(e)&&n.delete(t)}function rg(){qo=!1,Ot!==null&&Ai(Ot)&&(Ot=null),It!==null&&Ai(It)&&(It=null),Ft!==null&&Ai(Ft)&&(Ft=null),_r.forEach(xu),Or.forEach(xu)}function lr(e,t){e.blockedOn===t&&(e.blockedOn=null,qo||(qo=!0,Fe.unstable_scheduleCallback(Fe.unstable_NormalPriority,rg)))}function Ir(e){function t(i){return lr(i,e)}if(0<pi.length){lr(pi[0],e);for(var n=1;n<pi.length;n++){var r=pi[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Ot!==null&&lr(Ot,e),It!==null&&lr(It,e),Ft!==null&&lr(Ft,e),_r.forEach(t),Or.forEach(t),n=0;n<At.length;n++)r=At[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<At.length&&(n=At[0],n.blockedOn===null);)ud(n),n.blockedOn===null&&At.shift()}var $n=Et.ReactCurrentBatchConfig,Xi=!0;function ig(e,t,n,r){var i=W,s=$n.transition;$n.transition=null;try{W=1,ra(e,t,n,r)}finally{W=i,$n.transition=s}}function sg(e,t,n,r){var i=W,s=$n.transition;$n.transition=null;try{W=4,ra(e,t,n,r)}finally{W=i,$n.transition=s}}function ra(e,t,n,r){if(Xi){var i=Jo(e,t,n,r);if(i===null)co(e,t,r,Zi,n),vu(e,r);else if(ng(i,e,t,n,r))r.stopPropagation();else if(vu(e,r),t&4&&-1<tg.indexOf(e)){for(;i!==null;){var s=ni(i);if(s!==null&&sd(s),s=Jo(e,t,n,r),s===null&&co(e,t,r,Zi,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else co(e,t,r,null,n)}}var Zi=null;function Jo(e,t,n,r){if(Zi=null,e=Jl(r),e=ln(e),e!==null)if(t=wn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Zf(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 Zi=e,null}function cd(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(Km()){case ea:return 1;case td:return 4;case Gi:case Qm:return 16;case nd:return 536870912;default:return 16}default:return 16}}var Vt=null,ia=null,Di=null;function fd(){if(Di)return Di;var e,t=ia,n=t.length,r,i="value"in Vt?Vt.value:Vt.textContent,s=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[s-r];r++);return Di=i.slice(e,1<r?1-r:void 0)}function Vi(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 mi(){return!0}function wu(){return!1}function Ue(e){function t(n,r,i,s,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(s):s[l]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?mi:wu,this.isPropagationStopped=wu,this}return ee(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=mi)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=mi)},persist:function(){},isPersistent:mi}),t}var nr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},sa=Ue(nr),ti=ee({},nr,{view:0,detail:0}),og=Ue(ti),to,no,ar,Ts=ee({},ti,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:oa,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!==ar&&(ar&&e.type==="mousemove"?(to=e.screenX-ar.screenX,no=e.screenY-ar.screenY):no=to=0,ar=e),to)},movementY:function(e){return"movementY"in e?e.movementY:no}}),ku=Ue(Ts),lg=ee({},Ts,{dataTransfer:0}),ag=Ue(lg),ug=ee({},ti,{relatedTarget:0}),ro=Ue(ug),cg=ee({},nr,{animationName:0,elapsedTime:0,pseudoElement:0}),fg=Ue(cg),dg=ee({},nr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),hg=Ue(dg),pg=ee({},nr,{data:0}),Su=Ue(pg),mg={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},gg={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"},yg={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function vg(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=yg[e])?!!t[e]:!1}function oa(){return vg}var xg=ee({},ti,{key:function(e){if(e.key){var t=mg[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Vi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?gg[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:oa,charCode:function(e){return e.type==="keypress"?Vi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Vi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),wg=Ue(xg),kg=ee({},Ts,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Cu=Ue(kg),Sg=ee({},ti,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:oa}),Cg=Ue(Sg),Pg=ee({},nr,{propertyName:0,elapsedTime:0,pseudoElement:0}),Tg=Ue(Pg),Eg=ee({},Ts,{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}),Ng=Ue(Eg),jg=[9,13,27,32],la=kt&&"CompositionEvent"in window,Sr=null;kt&&"documentMode"in document&&(Sr=document.documentMode);var Rg=kt&&"TextEvent"in window&&!Sr,dd=kt&&(!la||Sr&&8<Sr&&11>=Sr),Pu=" ",Tu=!1;function hd(e,t){switch(e){case"keyup":return jg.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function pd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var En=!1;function Lg(e,t){switch(e){case"compositionend":return pd(t);case"keypress":return t.which!==32?null:(Tu=!0,Pu);case"textInput":return e=t.data,e===Pu&&Tu?null:e;default:return null}}function Mg(e,t){if(En)return e==="compositionend"||!la&&hd(e,t)?(e=fd(),Di=ia=Vt=null,En=!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 dd&&t.locale!=="ko"?null:t.data;default:return null}}var bg={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 Eu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!bg[e.type]:t==="textarea"}function md(e,t,n,r){Kf(r),t=qi(t,"onChange"),0<t.length&&(n=new sa("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Cr=null,Fr=null;function Ag(e){Ed(e,0)}function Es(e){var t=Rn(e);if(Ff(t))return e}function Dg(e,t){if(e==="change")return t}var gd=!1;if(kt){var io;if(kt){var so="oninput"in document;if(!so){var Nu=document.createElement("div");Nu.setAttribute("oninput","return;"),so=typeof Nu.oninput=="function"}io=so}else io=!1;gd=io&&(!document.documentMode||9<document.documentMode)}function ju(){Cr&&(Cr.detachEvent("onpropertychange",yd),Fr=Cr=null)}function yd(e){if(e.propertyName==="value"&&Es(Fr)){var t=[];md(t,Fr,e,Jl(e)),Xf(Ag,t)}}function Vg(e,t,n){e==="focusin"?(ju(),Cr=t,Fr=n,Cr.attachEvent("onpropertychange",yd)):e==="focusout"&&ju()}function _g(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Es(Fr)}function Og(e,t){if(e==="click")return Es(t)}function Ig(e,t){if(e==="input"||e==="change")return Es(t)}function Fg(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var rt=typeof Object.is=="function"?Object.is:Fg;function zr(e,t){if(rt(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 i=n[r];if(!Vo.call(t,i)||!rt(e[i],t[i]))return!1}return!0}function Ru(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Lu(e,t){var n=Ru(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=Ru(n)}}function vd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?vd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function xd(){for(var e=window,t=Hi();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Hi(e.document)}return t}function aa(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 zg(e){var t=xd(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&vd(n.ownerDocument.documentElement,n)){if(r!==null&&aa(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 i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!e.extend&&s>r&&(i=r,r=s,s=i),i=Lu(n,s);var o=Lu(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>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 Bg=kt&&"documentMode"in document&&11>=document.documentMode,Nn=null,el=null,Pr=null,tl=!1;function Mu(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;tl||Nn==null||Nn!==Hi(r)||(r=Nn,"selectionStart"in r&&aa(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}),Pr&&zr(Pr,r)||(Pr=r,r=qi(el,"onSelect"),0<r.length&&(t=new sa("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Nn)))}function gi(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var jn={animationend:gi("Animation","AnimationEnd"),animationiteration:gi("Animation","AnimationIteration"),animationstart:gi("Animation","AnimationStart"),transitionend:gi("Transition","TransitionEnd")},oo={},wd={};kt&&(wd=document.createElement("div").style,"AnimationEvent"in window||(delete jn.animationend.animation,delete jn.animationiteration.animation,delete jn.animationstart.animation),"TransitionEvent"in window||delete jn.transitionend.transition);function Ns(e){if(oo[e])return oo[e];if(!jn[e])return e;var t=jn[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in wd)return oo[e]=t[n];return e}var kd=Ns("animationend"),Sd=Ns("animationiteration"),Cd=Ns("animationstart"),Pd=Ns("transitionend"),Td=new Map,bu="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 Xt(e,t){Td.set(e,t),xn(t,[e])}for(var lo=0;lo<bu.length;lo++){var ao=bu[lo],Ug=ao.toLowerCase(),$g=ao[0].toUpperCase()+ao.slice(1);Xt(Ug,"on"+$g)}Xt(kd,"onAnimationEnd");Xt(Sd,"onAnimationIteration");Xt(Cd,"onAnimationStart");Xt("dblclick","onDoubleClick");Xt("focusin","onFocus");Xt("focusout","onBlur");Xt(Pd,"onTransitionEnd");Kn("onMouseEnter",["mouseout","mouseover"]);Kn("onMouseLeave",["mouseout","mouseover"]);Kn("onPointerEnter",["pointerout","pointerover"]);Kn("onPointerLeave",["pointerout","pointerover"]);xn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));xn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));xn("onBeforeInput",["compositionend","keypress","textInput","paste"]);xn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));xn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));xn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var vr="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(" "),Wg=new Set("cancel close invalid load scroll toggle".split(" ").concat(vr));function Au(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Um(r,t,void 0,e),e.currentTarget=null}function Ed(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var o=r.length-1;0<=o;o--){var l=r[o],a=l.instance,u=l.currentTarget;if(l=l.listener,a!==s&&i.isPropagationStopped())break e;Au(i,l,u),s=a}else for(o=0;o<r.length;o++){if(l=r[o],a=l.instance,u=l.currentTarget,l=l.listener,a!==s&&i.isPropagationStopped())break e;Au(i,l,u),s=a}}}if(Qi)throw e=Xo,Qi=!1,Xo=null,e}function G(e,t){var n=t[ol];n===void 0&&(n=t[ol]=new Set);var r=e+"__bubble";n.has(r)||(Nd(t,e,2,!1),n.add(r))}function uo(e,t,n){var r=0;t&&(r|=4),Nd(n,e,r,t)}var yi="_reactListening"+Math.random().toString(36).slice(2);function Br(e){if(!e[yi]){e[yi]=!0,Df.forEach(function(n){n!=="selectionchange"&&(Wg.has(n)||uo(n,!1,e),uo(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[yi]||(t[yi]=!0,uo("selectionchange",!1,t))}}function Nd(e,t,n,r){switch(cd(t)){case 1:var i=ig;break;case 4:i=sg;break;default:i=ra}n=i.bind(null,t,n,e),i=void 0,!Yo||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function co(e,t,n,r,i){var s=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var l=r.stateNode.containerInfo;if(l===i||l.nodeType===8&&l.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var a=o.tag;if((a===3||a===4)&&(a=o.stateNode.containerInfo,a===i||a.nodeType===8&&a.parentNode===i))return;o=o.return}for(;l!==null;){if(o=ln(l),o===null)return;if(a=o.tag,a===5||a===6){r=s=o;continue e}l=l.parentNode}}r=r.return}Xf(function(){var u=s,f=Jl(n),c=[];e:{var d=Td.get(e);if(d!==void 0){var g=sa,v=e;switch(e){case"keypress":if(Vi(n)===0)break e;case"keydown":case"keyup":g=wg;break;case"focusin":v="focus",g=ro;break;case"focusout":v="blur",g=ro;break;case"beforeblur":case"afterblur":g=ro;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":g=ku;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":g=ag;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":g=Cg;break;case kd:case Sd:case Cd:g=fg;break;case Pd:g=Tg;break;case"scroll":g=og;break;case"wheel":g=Ng;break;case"copy":case"cut":case"paste":g=hg;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":g=Cu}var x=(t&4)!==0,E=!x&&e==="scroll",y=x?d!==null?d+"Capture":null:d;x=[];for(var p=u,m;p!==null;){m=p;var w=m.stateNode;if(m.tag===5&&w!==null&&(m=w,y!==null&&(w=Vr(p,y),w!=null&&x.push(Ur(p,w,m)))),E)break;p=p.return}0<x.length&&(d=new g(d,v,null,n,f),c.push({event:d,listeners:x}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",g=e==="mouseout"||e==="pointerout",d&&n!==Qo&&(v=n.relatedTarget||n.fromElement)&&(ln(v)||v[St]))break e;if((g||d)&&(d=f.window===f?f:(d=f.ownerDocument)?d.defaultView||d.parentWindow:window,g?(v=n.relatedTarget||n.toElement,g=u,v=v?ln(v):null,v!==null&&(E=wn(v),v!==E||v.tag!==5&&v.tag!==6)&&(v=null)):(g=null,v=u),g!==v)){if(x=ku,w="onMouseLeave",y="onMouseEnter",p="mouse",(e==="pointerout"||e==="pointerover")&&(x=Cu,w="onPointerLeave",y="onPointerEnter",p="pointer"),E=g==null?d:Rn(g),m=v==null?d:Rn(v),d=new x(w,p+"leave",g,n,f),d.target=E,d.relatedTarget=m,w=null,ln(f)===u&&(x=new x(y,p+"enter",v,n,f),x.target=m,x.relatedTarget=E,w=x),E=w,g&&v)t:{for(x=g,y=v,p=0,m=x;m;m=Cn(m))p++;for(m=0,w=y;w;w=Cn(w))m++;for(;0<p-m;)x=Cn(x),p--;for(;0<m-p;)y=Cn(y),m--;for(;p--;){if(x===y||y!==null&&x===y.alternate)break t;x=Cn(x),y=Cn(y)}x=null}else x=null;g!==null&&Du(c,d,g,x,!1),v!==null&&E!==null&&Du(c,E,v,x,!0)}}e:{if(d=u?Rn(u):window,g=d.nodeName&&d.nodeName.toLowerCase(),g==="select"||g==="input"&&d.type==="file")var P=Dg;else if(Eu(d))if(gd)P=Ig;else{P=_g;var R=Vg}else(g=d.nodeName)&&g.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(P=Og);if(P&&(P=P(e,u))){md(c,P,n,f);break e}R&&R(e,d,u),e==="focusout"&&(R=d._wrapperState)&&R.controlled&&d.type==="number"&&Uo(d,"number",d.value)}switch(R=u?Rn(u):window,e){case"focusin":(Eu(R)||R.contentEditable==="true")&&(Nn=R,el=u,Pr=null);break;case"focusout":Pr=el=Nn=null;break;case"mousedown":tl=!0;break;case"contextmenu":case"mouseup":case"dragend":tl=!1,Mu(c,n,f);break;case"selectionchange":if(Bg)break;case"keydown":case"keyup":Mu(c,n,f)}var L;if(la)e:{switch(e){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else En?hd(e,n)&&(T="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(T="onCompositionStart");T&&(dd&&n.locale!=="ko"&&(En||T!=="onCompositionStart"?T==="onCompositionEnd"&&En&&(L=fd()):(Vt=f,ia="value"in Vt?Vt.value:Vt.textContent,En=!0)),R=qi(u,T),0<R.length&&(T=new Su(T,e,null,n,f),c.push({event:T,listeners:R}),L?T.data=L:(L=pd(n),L!==null&&(T.data=L)))),(L=Rg?Lg(e,n):Mg(e,n))&&(u=qi(u,"onBeforeInput"),0<u.length&&(f=new Su("onBeforeInput","beforeinput",null,n,f),c.push({event:f,listeners:u}),f.data=L))}Ed(c,t)})}function Ur(e,t,n){return{instance:e,listener:t,currentTarget:n}}function qi(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=Vr(e,n),s!=null&&r.unshift(Ur(e,s,i)),s=Vr(e,t),s!=null&&r.push(Ur(e,s,i))),e=e.return}return r}function Cn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Du(e,t,n,r,i){for(var s=t._reactName,o=[];n!==null&&n!==r;){var l=n,a=l.alternate,u=l.stateNode;if(a!==null&&a===r)break;l.tag===5&&u!==null&&(l=u,i?(a=Vr(n,s),a!=null&&o.unshift(Ur(n,a,l))):i||(a=Vr(n,s),a!=null&&o.push(Ur(n,a,l)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Hg=/\r\n?/g,Kg=/\u0000|\uFFFD/g;function Vu(e){return(typeof e=="string"?e:""+e).replace(Hg,`
38
+ `).replace(Kg,"")}function vi(e,t,n){if(t=Vu(t),Vu(e)!==t&&n)throw Error(j(425))}function Ji(){}var nl=null,rl=null;function il(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 sl=typeof setTimeout=="function"?setTimeout:void 0,Qg=typeof clearTimeout=="function"?clearTimeout:void 0,_u=typeof Promise=="function"?Promise:void 0,Gg=typeof queueMicrotask=="function"?queueMicrotask:typeof _u<"u"?function(e){return _u.resolve(null).then(e).catch(Yg)}:sl;function Yg(e){setTimeout(function(){throw e})}function fo(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),Ir(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Ir(t)}function zt(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 Ou(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 rr=Math.random().toString(36).slice(2),lt="__reactFiber$"+rr,$r="__reactProps$"+rr,St="__reactContainer$"+rr,ol="__reactEvents$"+rr,Xg="__reactListeners$"+rr,Zg="__reactHandles$"+rr;function ln(e){var t=e[lt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[St]||n[lt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Ou(e);e!==null;){if(n=e[lt])return n;e=Ou(e)}return t}e=n,n=e.parentNode}return null}function ni(e){return e=e[lt]||e[St],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Rn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(j(33))}function js(e){return e[$r]||null}var ll=[],Ln=-1;function Zt(e){return{current:e}}function Y(e){0>Ln||(e.current=ll[Ln],ll[Ln]=null,Ln--)}function K(e,t){Ln++,ll[Ln]=e.current,e.current=t}var Qt={},ke=Zt(Qt),Le=Zt(!1),pn=Qt;function Qn(e,t){var n=e.type.contextTypes;if(!n)return Qt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Me(e){return e=e.childContextTypes,e!=null}function es(){Y(Le),Y(ke)}function Iu(e,t,n){if(ke.current!==Qt)throw Error(j(168));K(ke,t),K(Le,n)}function jd(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(j(108,Vm(e)||"Unknown",i));return ee({},n,r)}function ts(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Qt,pn=ke.current,K(ke,e),K(Le,Le.current),!0}function Fu(e,t,n){var r=e.stateNode;if(!r)throw Error(j(169));n?(e=jd(e,t,pn),r.__reactInternalMemoizedMergedChildContext=e,Y(Le),Y(ke),K(ke,e)):Y(Le),K(Le,n)}var pt=null,Rs=!1,ho=!1;function Rd(e){pt===null?pt=[e]:pt.push(e)}function qg(e){Rs=!0,Rd(e)}function qt(){if(!ho&&pt!==null){ho=!0;var e=0,t=W;try{var n=pt;for(W=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}pt=null,Rs=!1}catch(i){throw pt!==null&&(pt=pt.slice(e+1)),ed(ea,qt),i}finally{W=t,ho=!1}}return null}var Mn=[],bn=0,ns=null,rs=0,He=[],Ke=0,mn=null,mt=1,gt="";function tn(e,t){Mn[bn++]=rs,Mn[bn++]=ns,ns=e,rs=t}function Ld(e,t,n){He[Ke++]=mt,He[Ke++]=gt,He[Ke++]=mn,mn=e;var r=mt;e=gt;var i=32-tt(r)-1;r&=~(1<<i),n+=1;var s=32-tt(t)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,mt=1<<32-tt(t)+i|n<<i|r,gt=s+e}else mt=1<<s|n<<i|r,gt=e}function ua(e){e.return!==null&&(tn(e,1),Ld(e,1,0))}function ca(e){for(;e===ns;)ns=Mn[--bn],Mn[bn]=null,rs=Mn[--bn],Mn[bn]=null;for(;e===mn;)mn=He[--Ke],He[Ke]=null,gt=He[--Ke],He[Ke]=null,mt=He[--Ke],He[Ke]=null}var Ie=null,Oe=null,X=!1,et=null;function Md(e,t){var n=Qe(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 zu(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,Ie=e,Oe=zt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ie=e,Oe=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=mn!==null?{id:mt,overflow:gt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Qe(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ie=e,Oe=null,!0):!1;default:return!1}}function al(e){return(e.mode&1)!==0&&(e.flags&128)===0}function ul(e){if(X){var t=Oe;if(t){var n=t;if(!zu(e,t)){if(al(e))throw Error(j(418));t=zt(n.nextSibling);var r=Ie;t&&zu(e,t)?Md(r,n):(e.flags=e.flags&-4097|2,X=!1,Ie=e)}}else{if(al(e))throw Error(j(418));e.flags=e.flags&-4097|2,X=!1,Ie=e}}}function Bu(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ie=e}function xi(e){if(e!==Ie)return!1;if(!X)return Bu(e),X=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!il(e.type,e.memoizedProps)),t&&(t=Oe)){if(al(e))throw bd(),Error(j(418));for(;t;)Md(e,t),t=zt(t.nextSibling)}if(Bu(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(j(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Oe=zt(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Oe=null}}else Oe=Ie?zt(e.stateNode.nextSibling):null;return!0}function bd(){for(var e=Oe;e;)e=zt(e.nextSibling)}function Gn(){Oe=Ie=null,X=!1}function fa(e){et===null?et=[e]:et.push(e)}var Jg=Et.ReactCurrentBatchConfig;function ur(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(j(309));var r=n.stateNode}if(!r)throw Error(j(147,e));var i=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(o){var l=i.refs;o===null?delete l[s]:l[s]=o},t._stringRef=s,t)}if(typeof e!="string")throw Error(j(284));if(!n._owner)throw Error(j(290,e))}return e}function wi(e,t){throw e=Object.prototype.toString.call(t),Error(j(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Uu(e){var t=e._init;return t(e._payload)}function Ad(e){function t(y,p){if(e){var m=y.deletions;m===null?(y.deletions=[p],y.flags|=16):m.push(p)}}function n(y,p){if(!e)return null;for(;p!==null;)t(y,p),p=p.sibling;return null}function r(y,p){for(y=new Map;p!==null;)p.key!==null?y.set(p.key,p):y.set(p.index,p),p=p.sibling;return y}function i(y,p){return y=Wt(y,p),y.index=0,y.sibling=null,y}function s(y,p,m){return y.index=m,e?(m=y.alternate,m!==null?(m=m.index,m<p?(y.flags|=2,p):m):(y.flags|=2,p)):(y.flags|=1048576,p)}function o(y){return e&&y.alternate===null&&(y.flags|=2),y}function l(y,p,m,w){return p===null||p.tag!==6?(p=wo(m,y.mode,w),p.return=y,p):(p=i(p,m),p.return=y,p)}function a(y,p,m,w){var P=m.type;return P===Tn?f(y,p,m.props.children,w,m.key):p!==null&&(p.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===Lt&&Uu(P)===p.type)?(w=i(p,m.props),w.ref=ur(y,p,m),w.return=y,w):(w=Ui(m.type,m.key,m.props,null,y.mode,w),w.ref=ur(y,p,m),w.return=y,w)}function u(y,p,m,w){return p===null||p.tag!==4||p.stateNode.containerInfo!==m.containerInfo||p.stateNode.implementation!==m.implementation?(p=ko(m,y.mode,w),p.return=y,p):(p=i(p,m.children||[]),p.return=y,p)}function f(y,p,m,w,P){return p===null||p.tag!==7?(p=dn(m,y.mode,w,P),p.return=y,p):(p=i(p,m),p.return=y,p)}function c(y,p,m){if(typeof p=="string"&&p!==""||typeof p=="number")return p=wo(""+p,y.mode,m),p.return=y,p;if(typeof p=="object"&&p!==null){switch(p.$$typeof){case ui:return m=Ui(p.type,p.key,p.props,null,y.mode,m),m.ref=ur(y,null,p),m.return=y,m;case Pn:return p=ko(p,y.mode,m),p.return=y,p;case Lt:var w=p._init;return c(y,w(p._payload),m)}if(gr(p)||ir(p))return p=dn(p,y.mode,m,null),p.return=y,p;wi(y,p)}return null}function d(y,p,m,w){var P=p!==null?p.key:null;if(typeof m=="string"&&m!==""||typeof m=="number")return P!==null?null:l(y,p,""+m,w);if(typeof m=="object"&&m!==null){switch(m.$$typeof){case ui:return m.key===P?a(y,p,m,w):null;case Pn:return m.key===P?u(y,p,m,w):null;case Lt:return P=m._init,d(y,p,P(m._payload),w)}if(gr(m)||ir(m))return P!==null?null:f(y,p,m,w,null);wi(y,m)}return null}function g(y,p,m,w,P){if(typeof w=="string"&&w!==""||typeof w=="number")return y=y.get(m)||null,l(p,y,""+w,P);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case ui:return y=y.get(w.key===null?m:w.key)||null,a(p,y,w,P);case Pn:return y=y.get(w.key===null?m:w.key)||null,u(p,y,w,P);case Lt:var R=w._init;return g(y,p,m,R(w._payload),P)}if(gr(w)||ir(w))return y=y.get(m)||null,f(p,y,w,P,null);wi(p,w)}return null}function v(y,p,m,w){for(var P=null,R=null,L=p,T=p=0,b=null;L!==null&&T<m.length;T++){L.index>T?(b=L,L=null):b=L.sibling;var D=d(y,L,m[T],w);if(D===null){L===null&&(L=b);break}e&&L&&D.alternate===null&&t(y,L),p=s(D,p,T),R===null?P=D:R.sibling=D,R=D,L=b}if(T===m.length)return n(y,L),X&&tn(y,T),P;if(L===null){for(;T<m.length;T++)L=c(y,m[T],w),L!==null&&(p=s(L,p,T),R===null?P=L:R.sibling=L,R=L);return X&&tn(y,T),P}for(L=r(y,L);T<m.length;T++)b=g(L,y,T,m[T],w),b!==null&&(e&&b.alternate!==null&&L.delete(b.key===null?T:b.key),p=s(b,p,T),R===null?P=b:R.sibling=b,R=b);return e&&L.forEach(function(B){return t(y,B)}),X&&tn(y,T),P}function x(y,p,m,w){var P=ir(m);if(typeof P!="function")throw Error(j(150));if(m=P.call(m),m==null)throw Error(j(151));for(var R=P=null,L=p,T=p=0,b=null,D=m.next();L!==null&&!D.done;T++,D=m.next()){L.index>T?(b=L,L=null):b=L.sibling;var B=d(y,L,D.value,w);if(B===null){L===null&&(L=b);break}e&&L&&B.alternate===null&&t(y,L),p=s(B,p,T),R===null?P=B:R.sibling=B,R=B,L=b}if(D.done)return n(y,L),X&&tn(y,T),P;if(L===null){for(;!D.done;T++,D=m.next())D=c(y,D.value,w),D!==null&&(p=s(D,p,T),R===null?P=D:R.sibling=D,R=D);return X&&tn(y,T),P}for(L=r(y,L);!D.done;T++,D=m.next())D=g(L,y,T,D.value,w),D!==null&&(e&&D.alternate!==null&&L.delete(D.key===null?T:D.key),p=s(D,p,T),R===null?P=D:R.sibling=D,R=D);return e&&L.forEach(function(U){return t(y,U)}),X&&tn(y,T),P}function E(y,p,m,w){if(typeof m=="object"&&m!==null&&m.type===Tn&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case ui:e:{for(var P=m.key,R=p;R!==null;){if(R.key===P){if(P=m.type,P===Tn){if(R.tag===7){n(y,R.sibling),p=i(R,m.props.children),p.return=y,y=p;break e}}else if(R.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===Lt&&Uu(P)===R.type){n(y,R.sibling),p=i(R,m.props),p.ref=ur(y,R,m),p.return=y,y=p;break e}n(y,R);break}else t(y,R);R=R.sibling}m.type===Tn?(p=dn(m.props.children,y.mode,w,m.key),p.return=y,y=p):(w=Ui(m.type,m.key,m.props,null,y.mode,w),w.ref=ur(y,p,m),w.return=y,y=w)}return o(y);case Pn:e:{for(R=m.key;p!==null;){if(p.key===R)if(p.tag===4&&p.stateNode.containerInfo===m.containerInfo&&p.stateNode.implementation===m.implementation){n(y,p.sibling),p=i(p,m.children||[]),p.return=y,y=p;break e}else{n(y,p);break}else t(y,p);p=p.sibling}p=ko(m,y.mode,w),p.return=y,y=p}return o(y);case Lt:return R=m._init,E(y,p,R(m._payload),w)}if(gr(m))return v(y,p,m,w);if(ir(m))return x(y,p,m,w);wi(y,m)}return typeof m=="string"&&m!==""||typeof m=="number"?(m=""+m,p!==null&&p.tag===6?(n(y,p.sibling),p=i(p,m),p.return=y,y=p):(n(y,p),p=wo(m,y.mode,w),p.return=y,y=p),o(y)):n(y,p)}return E}var Yn=Ad(!0),Dd=Ad(!1),is=Zt(null),ss=null,An=null,da=null;function ha(){da=An=ss=null}function pa(e){var t=is.current;Y(is),e._currentValue=t}function cl(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 Wn(e,t){ss=e,da=An=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Re=!0),e.firstContext=null)}function Ye(e){var t=e._currentValue;if(da!==e)if(e={context:e,memoizedValue:t,next:null},An===null){if(ss===null)throw Error(j(308));An=e,ss.dependencies={lanes:0,firstContext:e}}else An=An.next=e;return t}var an=null;function ma(e){an===null?an=[e]:an.push(e)}function Vd(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,ma(t)):(n.next=i.next,i.next=n),t.interleaved=n,Ct(e,r)}function Ct(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 Mt=!1;function ga(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function _d(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 vt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Bt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,z&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Ct(e,n)}return i=r.interleaved,i===null?(t.next=t,ma(r)):(t.next=i.next,i.next=t),r.interleaved=t,Ct(e,n)}function _i(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,ta(e,n)}}function $u(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=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};s===null?i=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?i=s=t:s=s.next=t}else i=s=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,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 os(e,t,n,r){var i=e.updateQueue;Mt=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var a=l,u=a.next;a.next=null,o===null?s=u:o.next=u,o=a;var f=e.alternate;f!==null&&(f=f.updateQueue,l=f.lastBaseUpdate,l!==o&&(l===null?f.firstBaseUpdate=u:l.next=u,f.lastBaseUpdate=a))}if(s!==null){var c=i.baseState;o=0,f=u=a=null,l=s;do{var d=l.lane,g=l.eventTime;if((r&d)===d){f!==null&&(f=f.next={eventTime:g,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var v=e,x=l;switch(d=t,g=n,x.tag){case 1:if(v=x.payload,typeof v=="function"){c=v.call(g,c,d);break e}c=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=x.payload,d=typeof v=="function"?v.call(g,c,d):v,d==null)break e;c=ee({},c,d);break e;case 2:Mt=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,d=i.effects,d===null?i.effects=[l]:d.push(l))}else g={eventTime:g,lane:d,tag:l.tag,payload:l.payload,callback:l.callback,next:null},f===null?(u=f=g,a=c):f=f.next=g,o|=d;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;d=l,l=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(!0);if(f===null&&(a=c),i.baseState=a,i.firstBaseUpdate=u,i.lastBaseUpdate=f,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);yn|=o,e.lanes=o,e.memoizedState=c}}function Wu(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(j(191,i));i.call(r)}}}var ri={},ut=Zt(ri),Wr=Zt(ri),Hr=Zt(ri);function un(e){if(e===ri)throw Error(j(174));return e}function ya(e,t){switch(K(Hr,t),K(Wr,e),K(ut,ri),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Wo(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Wo(t,e)}Y(ut),K(ut,t)}function Xn(){Y(ut),Y(Wr),Y(Hr)}function Od(e){un(Hr.current);var t=un(ut.current),n=Wo(t,e.type);t!==n&&(K(Wr,e),K(ut,n))}function va(e){Wr.current===e&&(Y(ut),Y(Wr))}var Z=Zt(0);function ls(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 po=[];function xa(){for(var e=0;e<po.length;e++)po[e]._workInProgressVersionPrimary=null;po.length=0}var Oi=Et.ReactCurrentDispatcher,mo=Et.ReactCurrentBatchConfig,gn=0,J=null,ue=null,fe=null,as=!1,Tr=!1,Kr=0,ey=0;function ye(){throw Error(j(321))}function wa(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!rt(e[n],t[n]))return!1;return!0}function ka(e,t,n,r,i,s){if(gn=s,J=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Oi.current=e===null||e.memoizedState===null?iy:sy,e=n(r,i),Tr){s=0;do{if(Tr=!1,Kr=0,25<=s)throw Error(j(301));s+=1,fe=ue=null,t.updateQueue=null,Oi.current=oy,e=n(r,i)}while(Tr)}if(Oi.current=us,t=ue!==null&&ue.next!==null,gn=0,fe=ue=J=null,as=!1,t)throw Error(j(300));return e}function Sa(){var e=Kr!==0;return Kr=0,e}function ot(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return fe===null?J.memoizedState=fe=e:fe=fe.next=e,fe}function Xe(){if(ue===null){var e=J.alternate;e=e!==null?e.memoizedState:null}else e=ue.next;var t=fe===null?J.memoizedState:fe.next;if(t!==null)fe=t,ue=e;else{if(e===null)throw Error(j(310));ue=e,e={memoizedState:ue.memoizedState,baseState:ue.baseState,baseQueue:ue.baseQueue,queue:ue.queue,next:null},fe===null?J.memoizedState=fe=e:fe=fe.next=e}return fe}function Qr(e,t){return typeof t=="function"?t(e):t}function go(e){var t=Xe(),n=t.queue;if(n===null)throw Error(j(311));n.lastRenderedReducer=e;var r=ue,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var o=i.next;i.next=s.next,s.next=o}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var l=o=null,a=null,u=s;do{var f=u.lane;if((gn&f)===f)a!==null&&(a=a.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var c={lane:f,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};a===null?(l=a=c,o=r):a=a.next=c,J.lanes|=f,yn|=f}u=u.next}while(u!==null&&u!==s);a===null?o=r:a.next=l,rt(r,t.memoizedState)||(Re=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=a,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do s=i.lane,J.lanes|=s,yn|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function yo(e){var t=Xe(),n=t.queue;if(n===null)throw Error(j(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,s=t.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do s=e(s,o.action),o=o.next;while(o!==i);rt(s,t.memoizedState)||(Re=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function Id(){}function Fd(e,t){var n=J,r=Xe(),i=t(),s=!rt(r.memoizedState,i);if(s&&(r.memoizedState=i,Re=!0),r=r.queue,Ca(Ud.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||fe!==null&&fe.memoizedState.tag&1){if(n.flags|=2048,Gr(9,Bd.bind(null,n,r,i,t),void 0,null),de===null)throw Error(j(349));gn&30||zd(n,t,i)}return i}function zd(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=J.updateQueue,t===null?(t={lastEffect:null,stores:null},J.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Bd(e,t,n,r){t.value=n,t.getSnapshot=r,$d(t)&&Wd(e)}function Ud(e,t,n){return n(function(){$d(t)&&Wd(e)})}function $d(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!rt(e,n)}catch{return!0}}function Wd(e){var t=Ct(e,1);t!==null&&nt(t,e,1,-1)}function Hu(e){var t=ot();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Qr,lastRenderedState:e},t.queue=e,e=e.dispatch=ry.bind(null,J,e),[t.memoizedState,e]}function Gr(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=J.updateQueue,t===null?(t={lastEffect:null,stores:null},J.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 Hd(){return Xe().memoizedState}function Ii(e,t,n,r){var i=ot();J.flags|=e,i.memoizedState=Gr(1|t,n,void 0,r===void 0?null:r)}function Ls(e,t,n,r){var i=Xe();r=r===void 0?null:r;var s=void 0;if(ue!==null){var o=ue.memoizedState;if(s=o.destroy,r!==null&&wa(r,o.deps)){i.memoizedState=Gr(t,n,s,r);return}}J.flags|=e,i.memoizedState=Gr(1|t,n,s,r)}function Ku(e,t){return Ii(8390656,8,e,t)}function Ca(e,t){return Ls(2048,8,e,t)}function Kd(e,t){return Ls(4,2,e,t)}function Qd(e,t){return Ls(4,4,e,t)}function Gd(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 Yd(e,t,n){return n=n!=null?n.concat([e]):null,Ls(4,4,Gd.bind(null,t,e),n)}function Pa(){}function Xd(e,t){var n=Xe();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&wa(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Zd(e,t){var n=Xe();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&wa(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function qd(e,t,n){return gn&21?(rt(n,t)||(n=rd(),J.lanes|=n,yn|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Re=!0),e.memoizedState=n)}function ty(e,t){var n=W;W=n!==0&&4>n?n:4,e(!0);var r=mo.transition;mo.transition={};try{e(!1),t()}finally{W=n,mo.transition=r}}function Jd(){return Xe().memoizedState}function ny(e,t,n){var r=$t(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},eh(e))th(t,n);else if(n=Vd(e,t,n,r),n!==null){var i=Te();nt(n,e,r,i),nh(n,t,r)}}function ry(e,t,n){var r=$t(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(eh(e))th(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var o=t.lastRenderedState,l=s(o,n);if(i.hasEagerState=!0,i.eagerState=l,rt(l,o)){var a=t.interleaved;a===null?(i.next=i,ma(t)):(i.next=a.next,a.next=i),t.interleaved=i;return}}catch{}finally{}n=Vd(e,t,i,r),n!==null&&(i=Te(),nt(n,e,r,i),nh(n,t,r))}}function eh(e){var t=e.alternate;return e===J||t!==null&&t===J}function th(e,t){Tr=as=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function nh(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ta(e,n)}}var us={readContext:Ye,useCallback:ye,useContext:ye,useEffect:ye,useImperativeHandle:ye,useInsertionEffect:ye,useLayoutEffect:ye,useMemo:ye,useReducer:ye,useRef:ye,useState:ye,useDebugValue:ye,useDeferredValue:ye,useTransition:ye,useMutableSource:ye,useSyncExternalStore:ye,useId:ye,unstable_isNewReconciler:!1},iy={readContext:Ye,useCallback:function(e,t){return ot().memoizedState=[e,t===void 0?null:t],e},useContext:Ye,useEffect:Ku,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ii(4194308,4,Gd.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ii(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ii(4,2,e,t)},useMemo:function(e,t){var n=ot();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ot();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=ny.bind(null,J,e),[r.memoizedState,e]},useRef:function(e){var t=ot();return e={current:e},t.memoizedState=e},useState:Hu,useDebugValue:Pa,useDeferredValue:function(e){return ot().memoizedState=e},useTransition:function(){var e=Hu(!1),t=e[0];return e=ty.bind(null,e[1]),ot().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=J,i=ot();if(X){if(n===void 0)throw Error(j(407));n=n()}else{if(n=t(),de===null)throw Error(j(349));gn&30||zd(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,Ku(Ud.bind(null,r,s,e),[e]),r.flags|=2048,Gr(9,Bd.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=ot(),t=de.identifierPrefix;if(X){var n=gt,r=mt;n=(r&~(1<<32-tt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Kr++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=ey++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},sy={readContext:Ye,useCallback:Xd,useContext:Ye,useEffect:Ca,useImperativeHandle:Yd,useInsertionEffect:Kd,useLayoutEffect:Qd,useMemo:Zd,useReducer:go,useRef:Hd,useState:function(){return go(Qr)},useDebugValue:Pa,useDeferredValue:function(e){var t=Xe();return qd(t,ue.memoizedState,e)},useTransition:function(){var e=go(Qr)[0],t=Xe().memoizedState;return[e,t]},useMutableSource:Id,useSyncExternalStore:Fd,useId:Jd,unstable_isNewReconciler:!1},oy={readContext:Ye,useCallback:Xd,useContext:Ye,useEffect:Ca,useImperativeHandle:Yd,useInsertionEffect:Kd,useLayoutEffect:Qd,useMemo:Zd,useReducer:yo,useRef:Hd,useState:function(){return yo(Qr)},useDebugValue:Pa,useDeferredValue:function(e){var t=Xe();return ue===null?t.memoizedState=e:qd(t,ue.memoizedState,e)},useTransition:function(){var e=yo(Qr)[0],t=Xe().memoizedState;return[e,t]},useMutableSource:Id,useSyncExternalStore:Fd,useId:Jd,unstable_isNewReconciler:!1};function qe(e,t){if(e&&e.defaultProps){t=ee({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function fl(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ee({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ms={isMounted:function(e){return(e=e._reactInternals)?wn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Te(),i=$t(e),s=vt(r,i);s.payload=t,n!=null&&(s.callback=n),t=Bt(e,s,i),t!==null&&(nt(t,e,i,r),_i(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Te(),i=$t(e),s=vt(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=Bt(e,s,i),t!==null&&(nt(t,e,i,r),_i(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Te(),r=$t(e),i=vt(n,r);i.tag=2,t!=null&&(i.callback=t),t=Bt(e,i,r),t!==null&&(nt(t,e,r,n),_i(t,e,r))}};function Qu(e,t,n,r,i,s,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,o):t.prototype&&t.prototype.isPureReactComponent?!zr(n,r)||!zr(i,s):!0}function rh(e,t,n){var r=!1,i=Qt,s=t.contextType;return typeof s=="object"&&s!==null?s=Ye(s):(i=Me(t)?pn:ke.current,r=t.contextTypes,s=(r=r!=null)?Qn(e,i):Qt),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Ms,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function Gu(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&&Ms.enqueueReplaceState(t,t.state,null)}function dl(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},ga(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=Ye(s):(s=Me(t)?pn:ke.current,i.context=Qn(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(fl(e,t,s,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&Ms.enqueueReplaceState(i,i.state,null),os(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Zn(e,t){try{var n="",r=t;do n+=Dm(r),r=r.return;while(r);var i=n}catch(s){i=`
39
+ Error generating stack: `+s.message+`
40
+ `+s.stack}return{value:e,source:t,stack:i,digest:null}}function vo(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function hl(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var ly=typeof WeakMap=="function"?WeakMap:Map;function ih(e,t,n){n=vt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){fs||(fs=!0,Cl=r),hl(e,t)},n}function sh(e,t,n){n=vt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){hl(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){hl(e,t),typeof r!="function"&&(Ut===null?Ut=new Set([this]):Ut.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Yu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new ly;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=ky.bind(null,e,t,n),t.then(e,e))}function Xu(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 Zu(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,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=vt(-1,1),t.tag=2,Bt(n,t,1))),n.lanes|=1),e)}var ay=Et.ReactCurrentOwner,Re=!1;function Pe(e,t,n,r){t.child=e===null?Dd(t,null,n,r):Yn(t,e.child,n,r)}function qu(e,t,n,r,i){n=n.render;var s=t.ref;return Wn(t,i),r=ka(e,t,n,r,s,i),n=Sa(),e!==null&&!Re?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Pt(e,t,i)):(X&&n&&ua(t),t.flags|=1,Pe(e,t,r,i),t.child)}function Ju(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!ba(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,oh(e,t,s,r,i)):(e=Ui(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:zr,n(o,r)&&e.ref===t.ref)return Pt(e,t,i)}return t.flags|=1,e=Wt(s,r),e.ref=t.ref,e.return=t,t.child=e}function oh(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(zr(s,r)&&e.ref===t.ref)if(Re=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(Re=!0);else return t.lanes=e.lanes,Pt(e,t,i)}return pl(e,t,n,r,i)}function lh(e,t,n){var r=t.pendingProps,i=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},K(Vn,_e),_e|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,K(Vn,_e),_e|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,K(Vn,_e),_e|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,K(Vn,_e),_e|=r;return Pe(e,t,i,n),t.child}function ah(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function pl(e,t,n,r,i){var s=Me(n)?pn:ke.current;return s=Qn(t,s),Wn(t,i),n=ka(e,t,n,r,s,i),r=Sa(),e!==null&&!Re?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Pt(e,t,i)):(X&&r&&ua(t),t.flags|=1,Pe(e,t,n,i),t.child)}function ec(e,t,n,r,i){if(Me(n)){var s=!0;ts(t)}else s=!1;if(Wn(t,i),t.stateNode===null)Fi(e,t),rh(t,n,r),dl(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,l=t.memoizedProps;o.props=l;var a=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=Ye(u):(u=Me(n)?pn:ke.current,u=Qn(t,u));var f=n.getDerivedStateFromProps,c=typeof f=="function"||typeof o.getSnapshotBeforeUpdate=="function";c||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==r||a!==u)&&Gu(t,o,r,u),Mt=!1;var d=t.memoizedState;o.state=d,os(t,r,o,i),a=t.memoizedState,l!==r||d!==a||Le.current||Mt?(typeof f=="function"&&(fl(t,n,f,r),a=t.memoizedState),(l=Mt||Qu(t,n,l,r,d,a,u))?(c||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=a),o.props=r,o.state=a,o.context=u,r=l):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,_d(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:qe(t.type,l),o.props=u,c=t.pendingProps,d=o.context,a=n.contextType,typeof a=="object"&&a!==null?a=Ye(a):(a=Me(n)?pn:ke.current,a=Qn(t,a));var g=n.getDerivedStateFromProps;(f=typeof g=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==c||d!==a)&&Gu(t,o,r,a),Mt=!1,d=t.memoizedState,o.state=d,os(t,r,o,i);var v=t.memoizedState;l!==c||d!==v||Le.current||Mt?(typeof g=="function"&&(fl(t,n,g,r),v=t.memoizedState),(u=Mt||Qu(t,n,u,r,d,v,a)||!1)?(f||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,v,a),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,v,a)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=v),o.props=r,o.state=v,o.context=a,r=u):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return ml(e,t,n,r,s,i)}function ml(e,t,n,r,i,s){ah(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&Fu(t,n,!1),Pt(e,t,s);r=t.stateNode,ay.current=t;var l=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Yn(t,e.child,null,s),t.child=Yn(t,null,l,s)):Pe(e,t,l,s),t.memoizedState=r.state,i&&Fu(t,n,!0),t.child}function uh(e){var t=e.stateNode;t.pendingContext?Iu(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Iu(e,t.context,!1),ya(e,t.containerInfo)}function tc(e,t,n,r,i){return Gn(),fa(i),t.flags|=256,Pe(e,t,n,r),t.child}var gl={dehydrated:null,treeContext:null,retryLane:0};function yl(e){return{baseLanes:e,cachePool:null,transitions:null}}function ch(e,t,n){var r=t.pendingProps,i=Z.current,s=!1,o=(t.flags&128)!==0,l;if((l=o)||(l=e!==null&&e.memoizedState===null?!1:(i&2)!==0),l?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),K(Z,i&1),e===null)return ul(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,s?(r=t.mode,s=t.child,o={mode:"hidden",children:o},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=Ds(o,r,0,null),e=dn(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=yl(n),t.memoizedState=gl,e):Ta(t,o));if(i=e.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return uy(e,t,o,r,l,i,n);if(s){s=r.fallback,o=t.mode,i=e.child,l=i.sibling;var a={mode:"hidden",children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=a,t.deletions=null):(r=Wt(i,a),r.subtreeFlags=i.subtreeFlags&14680064),l!==null?s=Wt(l,s):(s=dn(s,o,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,o=e.child.memoizedState,o=o===null?yl(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~n,t.memoizedState=gl,r}return s=e.child,e=s.sibling,r=Wt(s,{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 Ta(e,t){return t=Ds({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function ki(e,t,n,r){return r!==null&&fa(r),Yn(t,e.child,null,n),e=Ta(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function uy(e,t,n,r,i,s,o){if(n)return t.flags&256?(t.flags&=-257,r=vo(Error(j(422))),ki(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=Ds({mode:"visible",children:r.children},i,0,null),s=dn(s,i,o,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&Yn(t,e.child,null,o),t.child.memoizedState=yl(o),t.memoizedState=gl,s);if(!(t.mode&1))return ki(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var l=r.dgst;return r=l,s=Error(j(419)),r=vo(s,r,void 0),ki(e,t,o,r)}if(l=(o&e.childLanes)!==0,Re||l){if(r=de,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=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:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,Ct(e,i),nt(r,e,i,-1))}return Ma(),r=vo(Error(j(421))),ki(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=Sy.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,Oe=zt(i.nextSibling),Ie=t,X=!0,et=null,e!==null&&(He[Ke++]=mt,He[Ke++]=gt,He[Ke++]=mn,mt=e.id,gt=e.overflow,mn=t),t=Ta(t,r.children),t.flags|=4096,t)}function nc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),cl(e.return,t,n)}function xo(e,t,n,r,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function fh(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(Pe(e,t,r.children,n),r=Z.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&&nc(e,n,t);else if(e.tag===19)nc(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(K(Z,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&ls(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),xo(t,!1,i,n,s);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ls(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}xo(t,!0,n,null,s);break;case"together":xo(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Fi(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Pt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),yn|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(j(153));if(t.child!==null){for(e=t.child,n=Wt(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Wt(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function cy(e,t,n){switch(t.tag){case 3:uh(t),Gn();break;case 5:Od(t);break;case 1:Me(t.type)&&ts(t);break;case 4:ya(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;K(is,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(K(Z,Z.current&1),t.flags|=128,null):n&t.child.childLanes?ch(e,t,n):(K(Z,Z.current&1),e=Pt(e,t,n),e!==null?e.sibling:null);K(Z,Z.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return fh(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),K(Z,Z.current),r)break;return null;case 22:case 23:return t.lanes=0,lh(e,t,n)}return Pt(e,t,n)}var dh,vl,hh,ph;dh=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}};vl=function(){};hh=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,un(ut.current);var s=null;switch(n){case"input":i=zo(e,i),r=zo(e,r),s=[];break;case"select":i=ee({},i,{value:void 0}),r=ee({},r,{value:void 0}),s=[];break;case"textarea":i=$o(e,i),r=$o(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Ji)}Ho(n,r);var o;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var l=i[u];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Ar.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var a=r[u];if(l=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&a!==l&&(a!=null||l!=null))if(u==="style")if(l){for(o in l)!l.hasOwnProperty(o)||a&&a.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in a)a.hasOwnProperty(o)&&l[o]!==a[o]&&(n||(n={}),n[o]=a[o])}else n||(s||(s=[]),s.push(u,n)),n=a;else u==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,l=l?l.__html:void 0,a!=null&&l!==a&&(s=s||[]).push(u,a)):u==="children"?typeof a!="string"&&typeof a!="number"||(s=s||[]).push(u,""+a):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Ar.hasOwnProperty(u)?(a!=null&&u==="onScroll"&&G("scroll",e),s||l===a||(s=[])):(s=s||[]).push(u,a))}n&&(s=s||[]).push("style",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}};ph=function(e,t,n,r){n!==r&&(t.flags|=4)};function cr(e,t){if(!X)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 ve(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function fy(e,t,n){var r=t.pendingProps;switch(ca(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ve(t),null;case 1:return Me(t.type)&&es(),ve(t),null;case 3:return r=t.stateNode,Xn(),Y(Le),Y(ke),xa(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(xi(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,et!==null&&(El(et),et=null))),vl(e,t),ve(t),null;case 5:va(t);var i=un(Hr.current);if(n=t.type,e!==null&&t.stateNode!=null)hh(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(j(166));return ve(t),null}if(e=un(ut.current),xi(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[lt]=t,r[$r]=s,e=(t.mode&1)!==0,n){case"dialog":G("cancel",r),G("close",r);break;case"iframe":case"object":case"embed":G("load",r);break;case"video":case"audio":for(i=0;i<vr.length;i++)G(vr[i],r);break;case"source":G("error",r);break;case"img":case"image":case"link":G("error",r),G("load",r);break;case"details":G("toggle",r);break;case"input":fu(r,s),G("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},G("invalid",r);break;case"textarea":hu(r,s),G("invalid",r)}Ho(n,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var l=s[o];o==="children"?typeof l=="string"?r.textContent!==l&&(s.suppressHydrationWarning!==!0&&vi(r.textContent,l,e),i=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(s.suppressHydrationWarning!==!0&&vi(r.textContent,l,e),i=["children",""+l]):Ar.hasOwnProperty(o)&&l!=null&&o==="onScroll"&&G("scroll",r)}switch(n){case"input":ci(r),du(r,s,!0);break;case"textarea":ci(r),pu(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=Ji)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Uf(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[lt]=t,e[$r]=r,dh(e,t,!1,!1),t.stateNode=e;e:{switch(o=Ko(n,r),n){case"dialog":G("cancel",e),G("close",e),i=r;break;case"iframe":case"object":case"embed":G("load",e),i=r;break;case"video":case"audio":for(i=0;i<vr.length;i++)G(vr[i],e);i=r;break;case"source":G("error",e),i=r;break;case"img":case"image":case"link":G("error",e),G("load",e),i=r;break;case"details":G("toggle",e),i=r;break;case"input":fu(e,r),i=zo(e,r),G("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=ee({},r,{value:void 0}),G("invalid",e);break;case"textarea":hu(e,r),i=$o(e,r),G("invalid",e);break;default:i=r}Ho(n,i),l=i;for(s in l)if(l.hasOwnProperty(s)){var a=l[s];s==="style"?Hf(e,a):s==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&$f(e,a)):s==="children"?typeof a=="string"?(n!=="textarea"||a!=="")&&Dr(e,a):typeof a=="number"&&Dr(e,""+a):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Ar.hasOwnProperty(s)?a!=null&&s==="onScroll"&&G("scroll",e):a!=null&&Yl(e,s,a,o))}switch(n){case"input":ci(e),du(e,r,!1);break;case"textarea":ci(e),pu(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Kt(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?zn(e,!!r.multiple,s,!1):r.defaultValue!=null&&zn(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Ji)}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 ve(t),null;case 6:if(e&&t.stateNode!=null)ph(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(j(166));if(n=un(Hr.current),un(ut.current),xi(t)){if(r=t.stateNode,n=t.memoizedProps,r[lt]=t,(s=r.nodeValue!==n)&&(e=Ie,e!==null))switch(e.tag){case 3:vi(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&vi(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[lt]=t,t.stateNode=r}return ve(t),null;case 13:if(Y(Z),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(X&&Oe!==null&&t.mode&1&&!(t.flags&128))bd(),Gn(),t.flags|=98560,s=!1;else if(s=xi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(j(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(j(317));s[lt]=t}else Gn(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ve(t),s=!1}else et!==null&&(El(et),et=null),s=!0;if(!s)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||Z.current&1?ce===0&&(ce=3):Ma())),t.updateQueue!==null&&(t.flags|=4),ve(t),null);case 4:return Xn(),vl(e,t),e===null&&Br(t.stateNode.containerInfo),ve(t),null;case 10:return pa(t.type._context),ve(t),null;case 17:return Me(t.type)&&es(),ve(t),null;case 19:if(Y(Z),s=t.memoizedState,s===null)return ve(t),null;if(r=(t.flags&128)!==0,o=s.rendering,o===null)if(r)cr(s,!1);else{if(ce!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=ls(e),o!==null){for(t.flags|=128,cr(s,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,e=o.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return K(Z,Z.current&1|2),t.child}e=e.sibling}s.tail!==null&&re()>qn&&(t.flags|=128,r=!0,cr(s,!1),t.lanes=4194304)}else{if(!r)if(e=ls(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),cr(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!X)return ve(t),null}else 2*re()-s.renderingStartTime>qn&&n!==1073741824&&(t.flags|=128,r=!0,cr(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(n=s.last,n!==null?n.sibling=o:t.child=o,s.last=o)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=re(),t.sibling=null,n=Z.current,K(Z,r?n&1|2:n&1),t):(ve(t),null);case 22:case 23:return La(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?_e&1073741824&&(ve(t),t.subtreeFlags&6&&(t.flags|=8192)):ve(t),null;case 24:return null;case 25:return null}throw Error(j(156,t.tag))}function dy(e,t){switch(ca(t),t.tag){case 1:return Me(t.type)&&es(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Xn(),Y(Le),Y(ke),xa(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return va(t),null;case 13:if(Y(Z),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(j(340));Gn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Y(Z),null;case 4:return Xn(),null;case 10:return pa(t.type._context),null;case 22:case 23:return La(),null;case 24:return null;default:return null}}var Si=!1,we=!1,hy=typeof WeakSet=="function"?WeakSet:Set,V=null;function Dn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){te(e,t,r)}else n.current=null}function xl(e,t,n){try{n()}catch(r){te(e,t,r)}}var rc=!1;function py(e,t){if(nl=Xi,e=xd(),aa(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 i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,l=-1,a=-1,u=0,f=0,c=e,d=null;t:for(;;){for(var g;c!==n||i!==0&&c.nodeType!==3||(l=o+i),c!==s||r!==0&&c.nodeType!==3||(a=o+r),c.nodeType===3&&(o+=c.nodeValue.length),(g=c.firstChild)!==null;)d=c,c=g;for(;;){if(c===e)break t;if(d===n&&++u===i&&(l=o),d===s&&++f===r&&(a=o),(g=c.nextSibling)!==null)break;c=d,d=c.parentNode}c=g}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(rl={focusedElem:e,selectionRange:n},Xi=!1,V=t;V!==null;)if(t=V,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,V=e;else for(;V!==null;){t=V;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var x=v.memoizedProps,E=v.memoizedState,y=t.stateNode,p=y.getSnapshotBeforeUpdate(t.elementType===t.type?x:qe(t.type,x),E);y.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var m=t.stateNode.containerInfo;m.nodeType===1?m.textContent="":m.nodeType===9&&m.documentElement&&m.removeChild(m.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(j(163))}}catch(w){te(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,V=e;break}V=t.return}return v=rc,rc=!1,v}function Er(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&xl(t,n,s)}i=i.next}while(i!==r)}}function bs(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 wl(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 mh(e){var t=e.alternate;t!==null&&(e.alternate=null,mh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[lt],delete t[$r],delete t[ol],delete t[Xg],delete t[Zg])),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 gh(e){return e.tag===5||e.tag===3||e.tag===4}function ic(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||gh(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 kl(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=Ji));else if(r!==4&&(e=e.child,e!==null))for(kl(e,t,n),e=e.sibling;e!==null;)kl(e,t,n),e=e.sibling}function Sl(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(Sl(e,t,n),e=e.sibling;e!==null;)Sl(e,t,n),e=e.sibling}var pe=null,Je=!1;function jt(e,t,n){for(n=n.child;n!==null;)yh(e,t,n),n=n.sibling}function yh(e,t,n){if(at&&typeof at.onCommitFiberUnmount=="function")try{at.onCommitFiberUnmount(Ps,n)}catch{}switch(n.tag){case 5:we||Dn(n,t);case 6:var r=pe,i=Je;pe=null,jt(e,t,n),pe=r,Je=i,pe!==null&&(Je?(e=pe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):pe.removeChild(n.stateNode));break;case 18:pe!==null&&(Je?(e=pe,n=n.stateNode,e.nodeType===8?fo(e.parentNode,n):e.nodeType===1&&fo(e,n),Ir(e)):fo(pe,n.stateNode));break;case 4:r=pe,i=Je,pe=n.stateNode.containerInfo,Je=!0,jt(e,t,n),pe=r,Je=i;break;case 0:case 11:case 14:case 15:if(!we&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&xl(n,t,o),i=i.next}while(i!==r)}jt(e,t,n);break;case 1:if(!we&&(Dn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){te(n,t,l)}jt(e,t,n);break;case 21:jt(e,t,n);break;case 22:n.mode&1?(we=(r=we)||n.memoizedState!==null,jt(e,t,n),we=r):jt(e,t,n);break;default:jt(e,t,n)}}function sc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new hy),t.forEach(function(r){var i=Cy.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Ze(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=e,o=t,l=o;e:for(;l!==null;){switch(l.tag){case 5:pe=l.stateNode,Je=!1;break e;case 3:pe=l.stateNode.containerInfo,Je=!0;break e;case 4:pe=l.stateNode.containerInfo,Je=!0;break e}l=l.return}if(pe===null)throw Error(j(160));yh(s,o,i),pe=null,Je=!1;var a=i.alternate;a!==null&&(a.return=null),i.return=null}catch(u){te(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)vh(t,e),t=t.sibling}function vh(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ze(t,e),st(e),r&4){try{Er(3,e,e.return),bs(3,e)}catch(x){te(e,e.return,x)}try{Er(5,e,e.return)}catch(x){te(e,e.return,x)}}break;case 1:Ze(t,e),st(e),r&512&&n!==null&&Dn(n,n.return);break;case 5:if(Ze(t,e),st(e),r&512&&n!==null&&Dn(n,n.return),e.flags&32){var i=e.stateNode;try{Dr(i,"")}catch(x){te(e,e.return,x)}}if(r&4&&(i=e.stateNode,i!=null)){var s=e.memoizedProps,o=n!==null?n.memoizedProps:s,l=e.type,a=e.updateQueue;if(e.updateQueue=null,a!==null)try{l==="input"&&s.type==="radio"&&s.name!=null&&zf(i,s),Ko(l,o);var u=Ko(l,s);for(o=0;o<a.length;o+=2){var f=a[o],c=a[o+1];f==="style"?Hf(i,c):f==="dangerouslySetInnerHTML"?$f(i,c):f==="children"?Dr(i,c):Yl(i,f,c,u)}switch(l){case"input":Bo(i,s);break;case"textarea":Bf(i,s);break;case"select":var d=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var g=s.value;g!=null?zn(i,!!s.multiple,g,!1):d!==!!s.multiple&&(s.defaultValue!=null?zn(i,!!s.multiple,s.defaultValue,!0):zn(i,!!s.multiple,s.multiple?[]:"",!1))}i[$r]=s}catch(x){te(e,e.return,x)}}break;case 6:if(Ze(t,e),st(e),r&4){if(e.stateNode===null)throw Error(j(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(x){te(e,e.return,x)}}break;case 3:if(Ze(t,e),st(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Ir(t.containerInfo)}catch(x){te(e,e.return,x)}break;case 4:Ze(t,e),st(e);break;case 13:Ze(t,e),st(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(ja=re())),r&4&&sc(e);break;case 22:if(f=n!==null&&n.memoizedState!==null,e.mode&1?(we=(u=we)||f,Ze(t,e),we=u):Ze(t,e),st(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!f&&e.mode&1)for(V=e,f=e.child;f!==null;){for(c=V=f;V!==null;){switch(d=V,g=d.child,d.tag){case 0:case 11:case 14:case 15:Er(4,d,d.return);break;case 1:Dn(d,d.return);var v=d.stateNode;if(typeof v.componentWillUnmount=="function"){r=d,n=d.return;try{t=r,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(x){te(r,n,x)}}break;case 5:Dn(d,d.return);break;case 22:if(d.memoizedState!==null){lc(c);continue}}g!==null?(g.return=d,V=g):lc(c)}f=f.sibling}e:for(f=null,c=e;;){if(c.tag===5){if(f===null){f=c;try{i=c.stateNode,u?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(l=c.stateNode,a=c.memoizedProps.style,o=a!=null&&a.hasOwnProperty("display")?a.display:null,l.style.display=Wf("display",o))}catch(x){te(e,e.return,x)}}}else if(c.tag===6){if(f===null)try{c.stateNode.nodeValue=u?"":c.memoizedProps}catch(x){te(e,e.return,x)}}else if((c.tag!==22&&c.tag!==23||c.memoizedState===null||c===e)&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===e)break e;for(;c.sibling===null;){if(c.return===null||c.return===e)break e;f===c&&(f=null),c=c.return}f===c&&(f=null),c.sibling.return=c.return,c=c.sibling}}break;case 19:Ze(t,e),st(e),r&4&&sc(e);break;case 21:break;default:Ze(t,e),st(e)}}function st(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(gh(n)){var r=n;break e}n=n.return}throw Error(j(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Dr(i,""),r.flags&=-33);var s=ic(e);Sl(e,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,l=ic(e);kl(e,l,o);break;default:throw Error(j(161))}}catch(a){te(e,e.return,a)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function my(e,t,n){V=e,xh(e)}function xh(e,t,n){for(var r=(e.mode&1)!==0;V!==null;){var i=V,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||Si;if(!o){var l=i.alternate,a=l!==null&&l.memoizedState!==null||we;l=Si;var u=we;if(Si=o,(we=a)&&!u)for(V=i;V!==null;)o=V,a=o.child,o.tag===22&&o.memoizedState!==null?ac(i):a!==null?(a.return=o,V=a):ac(i);for(;s!==null;)V=s,xh(s),s=s.sibling;V=i,Si=l,we=u}oc(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,V=s):oc(e)}}function oc(e){for(;V!==null;){var t=V;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:we||bs(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!we)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:qe(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&Wu(t,s,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}Wu(t,o,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var a=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break;case"img":a.src&&(n.src=a.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var f=u.memoizedState;if(f!==null){var c=f.dehydrated;c!==null&&Ir(c)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(j(163))}we||t.flags&512&&wl(t)}catch(d){te(t,t.return,d)}}if(t===e){V=null;break}if(n=t.sibling,n!==null){n.return=t.return,V=n;break}V=t.return}}function lc(e){for(;V!==null;){var t=V;if(t===e){V=null;break}var n=t.sibling;if(n!==null){n.return=t.return,V=n;break}V=t.return}}function ac(e){for(;V!==null;){var t=V;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{bs(4,t)}catch(a){te(t,n,a)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(a){te(t,i,a)}}var s=t.return;try{wl(t)}catch(a){te(t,s,a)}break;case 5:var o=t.return;try{wl(t)}catch(a){te(t,o,a)}}}catch(a){te(t,t.return,a)}if(t===e){V=null;break}var l=t.sibling;if(l!==null){l.return=t.return,V=l;break}V=t.return}}var gy=Math.ceil,cs=Et.ReactCurrentDispatcher,Ea=Et.ReactCurrentOwner,Ge=Et.ReactCurrentBatchConfig,z=0,de=null,le=null,me=0,_e=0,Vn=Zt(0),ce=0,Yr=null,yn=0,As=0,Na=0,Nr=null,je=null,ja=0,qn=1/0,ht=null,fs=!1,Cl=null,Ut=null,Ci=!1,_t=null,ds=0,jr=0,Pl=null,zi=-1,Bi=0;function Te(){return z&6?re():zi!==-1?zi:zi=re()}function $t(e){return e.mode&1?z&2&&me!==0?me&-me:Jg.transition!==null?(Bi===0&&(Bi=rd()),Bi):(e=W,e!==0||(e=window.event,e=e===void 0?16:cd(e.type)),e):1}function nt(e,t,n,r){if(50<jr)throw jr=0,Pl=null,Error(j(185));ei(e,n,r),(!(z&2)||e!==de)&&(e===de&&(!(z&2)&&(As|=n),ce===4&&Dt(e,me)),be(e,r),n===1&&z===0&&!(t.mode&1)&&(qn=re()+500,Rs&&qt()))}function be(e,t){var n=e.callbackNode;Jm(e,t);var r=Yi(e,e===de?me:0);if(r===0)n!==null&&yu(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&yu(n),t===1)e.tag===0?qg(uc.bind(null,e)):Rd(uc.bind(null,e)),Gg(function(){!(z&6)&&qt()}),n=null;else{switch(id(r)){case 1:n=ea;break;case 4:n=td;break;case 16:n=Gi;break;case 536870912:n=nd;break;default:n=Gi}n=Nh(n,wh.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function wh(e,t){if(zi=-1,Bi=0,z&6)throw Error(j(327));var n=e.callbackNode;if(Hn()&&e.callbackNode!==n)return null;var r=Yi(e,e===de?me:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=hs(e,r);else{t=r;var i=z;z|=2;var s=Sh();(de!==e||me!==t)&&(ht=null,qn=re()+500,fn(e,t));do try{xy();break}catch(l){kh(e,l)}while(!0);ha(),cs.current=s,z=i,le!==null?t=0:(de=null,me=0,t=ce)}if(t!==0){if(t===2&&(i=Zo(e),i!==0&&(r=i,t=Tl(e,i))),t===1)throw n=Yr,fn(e,0),Dt(e,r),be(e,re()),n;if(t===6)Dt(e,r);else{if(i=e.current.alternate,!(r&30)&&!yy(i)&&(t=hs(e,r),t===2&&(s=Zo(e),s!==0&&(r=s,t=Tl(e,s))),t===1))throw n=Yr,fn(e,0),Dt(e,r),be(e,re()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(j(345));case 2:nn(e,je,ht);break;case 3:if(Dt(e,r),(r&130023424)===r&&(t=ja+500-re(),10<t)){if(Yi(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){Te(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=sl(nn.bind(null,e,je,ht),t);break}nn(e,je,ht);break;case 4:if(Dt(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-tt(r);s=1<<o,o=t[o],o>i&&(i=o),r&=~s}if(r=i,r=re()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*gy(r/1960))-r,10<r){e.timeoutHandle=sl(nn.bind(null,e,je,ht),r);break}nn(e,je,ht);break;case 5:nn(e,je,ht);break;default:throw Error(j(329))}}}return be(e,re()),e.callbackNode===n?wh.bind(null,e):null}function Tl(e,t){var n=Nr;return e.current.memoizedState.isDehydrated&&(fn(e,t).flags|=256),e=hs(e,t),e!==2&&(t=je,je=n,t!==null&&El(t)),e}function El(e){je===null?je=e:je.push.apply(je,e)}function yy(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 i=n[r],s=i.getSnapshot;i=i.value;try{if(!rt(s(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Dt(e,t){for(t&=~Na,t&=~As,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-tt(t),r=1<<n;e[n]=-1,t&=~r}}function uc(e){if(z&6)throw Error(j(327));Hn();var t=Yi(e,0);if(!(t&1))return be(e,re()),null;var n=hs(e,t);if(e.tag!==0&&n===2){var r=Zo(e);r!==0&&(t=r,n=Tl(e,r))}if(n===1)throw n=Yr,fn(e,0),Dt(e,t),be(e,re()),n;if(n===6)throw Error(j(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,nn(e,je,ht),be(e,re()),null}function Ra(e,t){var n=z;z|=1;try{return e(t)}finally{z=n,z===0&&(qn=re()+500,Rs&&qt())}}function vn(e){_t!==null&&_t.tag===0&&!(z&6)&&Hn();var t=z;z|=1;var n=Ge.transition,r=W;try{if(Ge.transition=null,W=1,e)return e()}finally{W=r,Ge.transition=n,z=t,!(z&6)&&qt()}}function La(){_e=Vn.current,Y(Vn)}function fn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Qg(n)),le!==null)for(n=le.return;n!==null;){var r=n;switch(ca(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&es();break;case 3:Xn(),Y(Le),Y(ke),xa();break;case 5:va(r);break;case 4:Xn();break;case 13:Y(Z);break;case 19:Y(Z);break;case 10:pa(r.type._context);break;case 22:case 23:La()}n=n.return}if(de=e,le=e=Wt(e.current,null),me=_e=t,ce=0,Yr=null,Na=As=yn=0,je=Nr=null,an!==null){for(t=0;t<an.length;t++)if(n=an[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var o=s.next;s.next=i,r.next=o}n.pending=r}an=null}return e}function kh(e,t){do{var n=le;try{if(ha(),Oi.current=us,as){for(var r=J.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}as=!1}if(gn=0,fe=ue=J=null,Tr=!1,Kr=0,Ea.current=null,n===null||n.return===null){ce=1,Yr=t,le=null;break}e:{var s=e,o=n.return,l=n,a=t;if(t=me,l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){var u=a,f=l,c=f.tag;if(!(f.mode&1)&&(c===0||c===11||c===15)){var d=f.alternate;d?(f.updateQueue=d.updateQueue,f.memoizedState=d.memoizedState,f.lanes=d.lanes):(f.updateQueue=null,f.memoizedState=null)}var g=Xu(o);if(g!==null){g.flags&=-257,Zu(g,o,l,s,t),g.mode&1&&Yu(s,u,t),t=g,a=u;var v=t.updateQueue;if(v===null){var x=new Set;x.add(a),t.updateQueue=x}else v.add(a);break e}else{if(!(t&1)){Yu(s,u,t),Ma();break e}a=Error(j(426))}}else if(X&&l.mode&1){var E=Xu(o);if(E!==null){!(E.flags&65536)&&(E.flags|=256),Zu(E,o,l,s,t),fa(Zn(a,l));break e}}s=a=Zn(a,l),ce!==4&&(ce=2),Nr===null?Nr=[s]:Nr.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var y=ih(s,a,t);$u(s,y);break e;case 1:l=a;var p=s.type,m=s.stateNode;if(!(s.flags&128)&&(typeof p.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(Ut===null||!Ut.has(m)))){s.flags|=65536,t&=-t,s.lanes|=t;var w=sh(s,l,t);$u(s,w);break e}}s=s.return}while(s!==null)}Ph(n)}catch(P){t=P,le===n&&n!==null&&(le=n=n.return);continue}break}while(!0)}function Sh(){var e=cs.current;return cs.current=us,e===null?us:e}function Ma(){(ce===0||ce===3||ce===2)&&(ce=4),de===null||!(yn&268435455)&&!(As&268435455)||Dt(de,me)}function hs(e,t){var n=z;z|=2;var r=Sh();(de!==e||me!==t)&&(ht=null,fn(e,t));do try{vy();break}catch(i){kh(e,i)}while(!0);if(ha(),z=n,cs.current=r,le!==null)throw Error(j(261));return de=null,me=0,ce}function vy(){for(;le!==null;)Ch(le)}function xy(){for(;le!==null&&!Wm();)Ch(le)}function Ch(e){var t=Eh(e.alternate,e,_e);e.memoizedProps=e.pendingProps,t===null?Ph(e):le=t,Ea.current=null}function Ph(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=dy(n,t),n!==null){n.flags&=32767,le=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ce=6,le=null;return}}else if(n=fy(n,t,_e),n!==null){le=n;return}if(t=t.sibling,t!==null){le=t;return}le=t=e}while(t!==null);ce===0&&(ce=5)}function nn(e,t,n){var r=W,i=Ge.transition;try{Ge.transition=null,W=1,wy(e,t,n,r)}finally{Ge.transition=i,W=r}return null}function wy(e,t,n,r){do Hn();while(_t!==null);if(z&6)throw Error(j(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(j(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(eg(e,s),e===de&&(le=de=null,me=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Ci||(Ci=!0,Nh(Gi,function(){return Hn(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=Ge.transition,Ge.transition=null;var o=W;W=1;var l=z;z|=4,Ea.current=null,py(e,n),vh(n,e),zg(rl),Xi=!!nl,rl=nl=null,e.current=n,my(n),Hm(),z=l,W=o,Ge.transition=s}else e.current=n;if(Ci&&(Ci=!1,_t=e,ds=i),s=e.pendingLanes,s===0&&(Ut=null),Gm(n.stateNode),be(e,re()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(fs)throw fs=!1,e=Cl,Cl=null,e;return ds&1&&e.tag!==0&&Hn(),s=e.pendingLanes,s&1?e===Pl?jr++:(jr=0,Pl=e):jr=0,qt(),null}function Hn(){if(_t!==null){var e=id(ds),t=Ge.transition,n=W;try{if(Ge.transition=null,W=16>e?16:e,_t===null)var r=!1;else{if(e=_t,_t=null,ds=0,z&6)throw Error(j(331));var i=z;for(z|=4,V=e.current;V!==null;){var s=V,o=s.child;if(V.flags&16){var l=s.deletions;if(l!==null){for(var a=0;a<l.length;a++){var u=l[a];for(V=u;V!==null;){var f=V;switch(f.tag){case 0:case 11:case 15:Er(8,f,s)}var c=f.child;if(c!==null)c.return=f,V=c;else for(;V!==null;){f=V;var d=f.sibling,g=f.return;if(mh(f),f===u){V=null;break}if(d!==null){d.return=g,V=d;break}V=g}}}var v=s.alternate;if(v!==null){var x=v.child;if(x!==null){v.child=null;do{var E=x.sibling;x.sibling=null,x=E}while(x!==null)}}V=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,V=o;else e:for(;V!==null;){if(s=V,s.flags&2048)switch(s.tag){case 0:case 11:case 15:Er(9,s,s.return)}var y=s.sibling;if(y!==null){y.return=s.return,V=y;break e}V=s.return}}var p=e.current;for(V=p;V!==null;){o=V;var m=o.child;if(o.subtreeFlags&2064&&m!==null)m.return=o,V=m;else e:for(o=p;V!==null;){if(l=V,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:bs(9,l)}}catch(P){te(l,l.return,P)}if(l===o){V=null;break e}var w=l.sibling;if(w!==null){w.return=l.return,V=w;break e}V=l.return}}if(z=i,qt(),at&&typeof at.onPostCommitFiberRoot=="function")try{at.onPostCommitFiberRoot(Ps,e)}catch{}r=!0}return r}finally{W=n,Ge.transition=t}}return!1}function cc(e,t,n){t=Zn(n,t),t=ih(e,t,1),e=Bt(e,t,1),t=Te(),e!==null&&(ei(e,1,t),be(e,t))}function te(e,t,n){if(e.tag===3)cc(e,e,n);else for(;t!==null;){if(t.tag===3){cc(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Ut===null||!Ut.has(r))){e=Zn(n,e),e=sh(t,e,1),t=Bt(t,e,1),e=Te(),t!==null&&(ei(t,1,e),be(t,e));break}}t=t.return}}function ky(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Te(),e.pingedLanes|=e.suspendedLanes&n,de===e&&(me&n)===n&&(ce===4||ce===3&&(me&130023424)===me&&500>re()-ja?fn(e,0):Na|=n),be(e,t)}function Th(e,t){t===0&&(e.mode&1?(t=hi,hi<<=1,!(hi&130023424)&&(hi=4194304)):t=1);var n=Te();e=Ct(e,t),e!==null&&(ei(e,t,n),be(e,n))}function Sy(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Th(e,n)}function Cy(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(j(314))}r!==null&&r.delete(t),Th(e,n)}var Eh;Eh=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Le.current)Re=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Re=!1,cy(e,t,n);Re=!!(e.flags&131072)}else Re=!1,X&&t.flags&1048576&&Ld(t,rs,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Fi(e,t),e=t.pendingProps;var i=Qn(t,ke.current);Wn(t,n),i=ka(null,t,r,e,i,n);var s=Sa();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Me(r)?(s=!0,ts(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,ga(t),i.updater=Ms,t.stateNode=i,i._reactInternals=t,dl(t,r,e,n),t=ml(null,t,r,!0,s,n)):(t.tag=0,X&&s&&ua(t),Pe(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Fi(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Ty(r),e=qe(r,e),i){case 0:t=pl(null,t,r,e,n);break e;case 1:t=ec(null,t,r,e,n);break e;case 11:t=qu(null,t,r,e,n);break e;case 14:t=Ju(null,t,r,qe(r.type,e),n);break e}throw Error(j(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:qe(r,i),pl(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:qe(r,i),ec(e,t,r,i,n);case 3:e:{if(uh(t),e===null)throw Error(j(387));r=t.pendingProps,s=t.memoizedState,i=s.element,_d(e,t),os(t,r,null,n);var o=t.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=Zn(Error(j(423)),t),t=tc(e,t,r,n,i);break e}else if(r!==i){i=Zn(Error(j(424)),t),t=tc(e,t,r,n,i);break e}else for(Oe=zt(t.stateNode.containerInfo.firstChild),Ie=t,X=!0,et=null,n=Dd(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Gn(),r===i){t=Pt(e,t,n);break e}Pe(e,t,r,n)}t=t.child}return t;case 5:return Od(t),e===null&&ul(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,il(r,i)?o=null:s!==null&&il(r,s)&&(t.flags|=32),ah(e,t),Pe(e,t,o,n),t.child;case 6:return e===null&&ul(t),null;case 13:return ch(e,t,n);case 4:return ya(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Yn(t,null,r,n):Pe(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:qe(r,i),qu(e,t,r,i,n);case 7:return Pe(e,t,t.pendingProps,n),t.child;case 8:return Pe(e,t,t.pendingProps.children,n),t.child;case 12:return Pe(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value,K(is,r._currentValue),r._currentValue=o,s!==null)if(rt(s.value,o)){if(s.children===i.children&&!Le.current){t=Pt(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var l=s.dependencies;if(l!==null){o=s.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(s.tag===1){a=vt(-1,n&-n),a.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var f=u.pending;f===null?a.next=a:(a.next=f.next,f.next=a),u.pending=a}}s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),cl(s.return,n,t),l.lanes|=n;break}a=a.next}}else if(s.tag===10)o=s.type===t.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(j(341));o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),cl(o,n,t),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===t){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}Pe(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Wn(t,n),i=Ye(i),r=r(i),t.flags|=1,Pe(e,t,r,n),t.child;case 14:return r=t.type,i=qe(r,t.pendingProps),i=qe(r.type,i),Ju(e,t,r,i,n);case 15:return oh(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:qe(r,i),Fi(e,t),t.tag=1,Me(r)?(e=!0,ts(t)):e=!1,Wn(t,n),rh(t,r,i),dl(t,r,i,n),ml(null,t,r,!0,e,n);case 19:return fh(e,t,n);case 22:return lh(e,t,n)}throw Error(j(156,t.tag))};function Nh(e,t){return ed(e,t)}function Py(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 Qe(e,t,n,r){return new Py(e,t,n,r)}function ba(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ty(e){if(typeof e=="function")return ba(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Zl)return 11;if(e===ql)return 14}return 2}function Wt(e,t){var n=e.alternate;return n===null?(n=Qe(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 Ui(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")ba(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Tn:return dn(n.children,i,s,t);case Xl:o=8,i|=8;break;case _o:return e=Qe(12,n,t,i|2),e.elementType=_o,e.lanes=s,e;case Oo:return e=Qe(13,n,t,i),e.elementType=Oo,e.lanes=s,e;case Io:return e=Qe(19,n,t,i),e.elementType=Io,e.lanes=s,e;case Of:return Ds(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Vf:o=10;break e;case _f:o=9;break e;case Zl:o=11;break e;case ql:o=14;break e;case Lt:o=16,r=null;break e}throw Error(j(130,e==null?e:typeof e,""))}return t=Qe(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function dn(e,t,n,r){return e=Qe(7,e,r,t),e.lanes=n,e}function Ds(e,t,n,r){return e=Qe(22,e,r,t),e.elementType=Of,e.lanes=n,e.stateNode={isHidden:!1},e}function wo(e,t,n){return e=Qe(6,e,null,t),e.lanes=n,e}function ko(e,t,n){return t=Qe(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Ey(e,t,n,r,i){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=eo(0),this.expirationTimes=eo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=eo(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Aa(e,t,n,r,i,s,o,l,a){return e=new Ey(e,t,n,l,a),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Qe(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ga(s),e}function Ny(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Pn,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function jh(e){if(!e)return Qt;e=e._reactInternals;e:{if(wn(e)!==e||e.tag!==1)throw Error(j(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Me(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(j(171))}if(e.tag===1){var n=e.type;if(Me(n))return jd(e,n,t)}return t}function Rh(e,t,n,r,i,s,o,l,a){return e=Aa(n,r,!0,e,i,s,o,l,a),e.context=jh(null),n=e.current,r=Te(),i=$t(n),s=vt(r,i),s.callback=t??null,Bt(n,s,i),e.current.lanes=i,ei(e,i,r),be(e,r),e}function Vs(e,t,n,r){var i=t.current,s=Te(),o=$t(i);return n=jh(n),t.context===null?t.context=n:t.pendingContext=n,t=vt(s,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Bt(i,t,o),e!==null&&(nt(e,i,o,s),_i(e,i,o)),o}function ps(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 fc(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Da(e,t){fc(e,t),(e=e.alternate)&&fc(e,t)}function jy(){return null}var Lh=typeof reportError=="function"?reportError:function(e){console.error(e)};function Va(e){this._internalRoot=e}_s.prototype.render=Va.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(j(409));Vs(e,t,null,null)};_s.prototype.unmount=Va.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;vn(function(){Vs(null,e,null,null)}),t[St]=null}};function _s(e){this._internalRoot=e}_s.prototype.unstable_scheduleHydration=function(e){if(e){var t=ld();e={blockedOn:null,target:e,priority:t};for(var n=0;n<At.length&&t!==0&&t<At[n].priority;n++);At.splice(n,0,e),n===0&&ud(e)}};function _a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Os(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function dc(){}function Ry(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var u=ps(o);s.call(u)}}var o=Rh(t,r,e,0,null,!1,!1,"",dc);return e._reactRootContainer=o,e[St]=o.current,Br(e.nodeType===8?e.parentNode:e),vn(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var l=r;r=function(){var u=ps(a);l.call(u)}}var a=Aa(e,0,!1,null,null,!1,!1,"",dc);return e._reactRootContainer=a,e[St]=a.current,Br(e.nodeType===8?e.parentNode:e),vn(function(){Vs(t,a,n,r)}),a}function Is(e,t,n,r,i){var s=n._reactRootContainer;if(s){var o=s;if(typeof i=="function"){var l=i;i=function(){var a=ps(o);l.call(a)}}Vs(t,o,e,i)}else o=Ry(n,t,e,i,r);return ps(o)}sd=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=yr(t.pendingLanes);n!==0&&(ta(t,n|1),be(t,re()),!(z&6)&&(qn=re()+500,qt()))}break;case 13:vn(function(){var r=Ct(e,1);if(r!==null){var i=Te();nt(r,e,1,i)}}),Da(e,1)}};na=function(e){if(e.tag===13){var t=Ct(e,134217728);if(t!==null){var n=Te();nt(t,e,134217728,n)}Da(e,134217728)}};od=function(e){if(e.tag===13){var t=$t(e),n=Ct(e,t);if(n!==null){var r=Te();nt(n,e,t,r)}Da(e,t)}};ld=function(){return W};ad=function(e,t){var n=W;try{return W=e,t()}finally{W=n}};Go=function(e,t,n){switch(t){case"input":if(Bo(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 i=js(r);if(!i)throw Error(j(90));Ff(r),Bo(r,i)}}}break;case"textarea":Bf(e,n);break;case"select":t=n.value,t!=null&&zn(e,!!n.multiple,t,!1)}};Gf=Ra;Yf=vn;var Ly={usingClientEntryPoint:!1,Events:[ni,Rn,js,Kf,Qf,Ra]},fr={findFiberByHostInstance:ln,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},My={bundleType:fr.bundleType,version:fr.version,rendererPackageName:fr.rendererPackageName,rendererConfig:fr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Et.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=qf(e),e===null?null:e.stateNode},findFiberByHostInstance:fr.findFiberByHostInstance||jy,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 Pi=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Pi.isDisabled&&Pi.supportsFiber)try{Ps=Pi.inject(My),at=Pi}catch{}}Be.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ly;Be.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!_a(t))throw Error(j(200));return Ny(e,t,null,n)};Be.createRoot=function(e,t){if(!_a(e))throw Error(j(299));var n=!1,r="",i=Lh;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Aa(e,1,!1,null,null,n,!1,r,i),e[St]=t.current,Br(e.nodeType===8?e.parentNode:e),new Va(t)};Be.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(j(188)):(e=Object.keys(e).join(","),Error(j(268,e)));return e=qf(t),e=e===null?null:e.stateNode,e};Be.flushSync=function(e){return vn(e)};Be.hydrate=function(e,t,n){if(!Os(t))throw Error(j(200));return Is(null,e,t,!0,n)};Be.hydrateRoot=function(e,t,n){if(!_a(e))throw Error(j(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=Lh;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=Rh(t,null,e,1,n??null,i,!1,s,o),e[St]=t.current,Br(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new _s(t)};Be.render=function(e,t,n){if(!Os(t))throw Error(j(200));return Is(null,e,t,!1,n)};Be.unmountComponentAtNode=function(e){if(!Os(e))throw Error(j(40));return e._reactRootContainer?(vn(function(){Is(null,null,e,!1,function(){e._reactRootContainer=null,e[St]=null})}),!0):!1};Be.unstable_batchedUpdates=Ra;Be.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Os(n))throw Error(j(200));if(e==null||e._reactInternals===void 0)throw Error(j(38));return Is(e,t,n,!1,r)};Be.version="18.3.1-next-f1338f8080-20240426";function Mh(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Mh)}catch(e){console.error(e)}}Mh(),Mf.exports=Be;var by=Mf.exports,bh,hc=by;bh=hc.createRoot,hc.hydrateRoot;const Ah=C.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Fs=C.createContext({}),zs=C.createContext(null),Bs=typeof document<"u",Oa=Bs?C.useLayoutEffect:C.useEffect,Dh=C.createContext({strict:!1}),Ia=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),Ay="framerAppearId",Vh="data-"+Ia(Ay);function Dy(e,t,n,r){const{visualElement:i}=C.useContext(Fs),s=C.useContext(Dh),o=C.useContext(zs),l=C.useContext(Ah).reducedMotion,a=C.useRef();r=r||s.renderer,!a.current&&r&&(a.current=r(e,{visualState:t,parent:i,props:n,presenceContext:o,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:l}));const u=a.current;C.useInsertionEffect(()=>{u&&u.update(n,o)});const f=C.useRef(!!(n[Vh]&&!window.HandoffComplete));return Oa(()=>{u&&(u.render(),f.current&&u.animationState&&u.animationState.animateChanges())}),C.useEffect(()=>{u&&(u.updateFeatures(),!f.current&&u.animationState&&u.animationState.animateChanges(),f.current&&(f.current=!1,window.HandoffComplete=!0))}),u}function _n(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Vy(e,t,n){return C.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):_n(n)&&(n.current=r))},[t])}function Xr(e){return typeof e=="string"||Array.isArray(e)}function Us(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Fa=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],za=["initial",...Fa];function $s(e){return Us(e.animate)||za.some(t=>Xr(e[t]))}function _h(e){return!!($s(e)||e.variants)}function _y(e,t){if($s(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Xr(n)?n:void 0,animate:Xr(r)?r:void 0}}return e.inherit!==!1?t:{}}function Oy(e){const{initial:t,animate:n}=_y(e,C.useContext(Fs));return C.useMemo(()=>({initial:t,animate:n}),[pc(t),pc(n)])}function pc(e){return Array.isArray(e)?e.join(" "):e}const mc={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"]},Zr={};for(const e in mc)Zr[e]={isEnabled:t=>mc[e].some(n=>!!t[n])};function Iy(e){for(const t in e)Zr[t]={...Zr[t],...e[t]}}const Ba=C.createContext({}),Oh=C.createContext({}),Fy=Symbol.for("motionComponentSymbol");function zy({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&Iy(e);function s(l,a){let u;const f={...C.useContext(Ah),...l,layoutId:By(l)},{isStatic:c}=f,d=Oy(l),g=r(l,c);if(!c&&Bs){d.visualElement=Dy(i,g,f,t);const v=C.useContext(Oh),x=C.useContext(Dh).strict;d.visualElement&&(u=d.visualElement.loadFeatures(f,x,e,v))}return C.createElement(Fs.Provider,{value:d},u&&d.visualElement?C.createElement(u,{visualElement:d.visualElement,...f}):null,n(i,l,Vy(g,d.visualElement,a),g,c,d.visualElement))}const o=C.forwardRef(s);return o[Fy]=i,o}function By({layoutId:e}){const t=C.useContext(Ba).id;return t&&e!==void 0?t+"-"+e:e}function Uy(e){function t(r,i={}){return zy(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const $y=["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 Ua(e){return typeof e!="string"||e.includes("-")?!1:!!($y.indexOf(e)>-1||/[A-Z]/.test(e))}const ms={};function Wy(e){Object.assign(ms,e)}const ii=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],kn=new Set(ii);function Ih(e,{layout:t,layoutId:n}){return kn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!ms[e]||e==="opacity")}const Ae=e=>!!(e&&e.getVelocity),Hy={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Ky=ii.length;function Qy(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,i){let s="";for(let o=0;o<Ky;o++){const l=ii[o];if(e[l]!==void 0){const a=Hy[l]||l;s+=`${a}(${e[l]}) `}}return t&&!e.z&&(s+="translateZ(0)"),s=s.trim(),i?s=i(e,r?"":s):n&&r&&(s="none"),s}const Fh=e=>t=>typeof t=="string"&&t.startsWith(e),zh=Fh("--"),Nl=Fh("var(--"),Gy=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,Yy=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Gt=(e,t,n)=>Math.min(Math.max(n,e),t),Sn={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Rr={...Sn,transform:e=>Gt(0,1,e)},Ti={...Sn,default:1},Lr=e=>Math.round(e*1e5)/1e5,Ws=/(-)?([\d]*\.?[\d])+/g,Bh=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Xy=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function si(e){return typeof e=="string"}const oi=e=>({test:t=>si(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Rt=oi("deg"),ct=oi("%"),O=oi("px"),Zy=oi("vh"),qy=oi("vw"),gc={...ct,parse:e=>ct.parse(e)/100,transform:e=>ct.transform(e*100)},yc={...Sn,transform:Math.round},Uh={borderWidth:O,borderTopWidth:O,borderRightWidth:O,borderBottomWidth:O,borderLeftWidth:O,borderRadius:O,radius:O,borderTopLeftRadius:O,borderTopRightRadius:O,borderBottomRightRadius:O,borderBottomLeftRadius:O,width:O,maxWidth:O,height:O,maxHeight:O,size:O,top:O,right:O,bottom:O,left:O,padding:O,paddingTop:O,paddingRight:O,paddingBottom:O,paddingLeft:O,margin:O,marginTop:O,marginRight:O,marginBottom:O,marginLeft:O,rotate:Rt,rotateX:Rt,rotateY:Rt,rotateZ:Rt,scale:Ti,scaleX:Ti,scaleY:Ti,scaleZ:Ti,skew:Rt,skewX:Rt,skewY:Rt,distance:O,translateX:O,translateY:O,translateZ:O,x:O,y:O,z:O,perspective:O,transformPerspective:O,opacity:Rr,originX:gc,originY:gc,originZ:O,zIndex:yc,fillOpacity:Rr,strokeOpacity:Rr,numOctaves:yc};function $a(e,t,n,r){const{style:i,vars:s,transform:o,transformOrigin:l}=e;let a=!1,u=!1,f=!0;for(const c in t){const d=t[c];if(zh(c)){s[c]=d;continue}const g=Uh[c],v=Yy(d,g);if(kn.has(c)){if(a=!0,o[c]=v,!f)continue;d!==(g.default||0)&&(f=!1)}else c.startsWith("origin")?(u=!0,l[c]=v):i[c]=v}if(t.transform||(a||r?i.transform=Qy(e.transform,n,f,r):i.transform&&(i.transform="none")),u){const{originX:c="50%",originY:d="50%",originZ:g=0}=l;i.transformOrigin=`${c} ${d} ${g}`}}const Wa=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function $h(e,t,n){for(const r in t)!Ae(t[r])&&!Ih(r,n)&&(e[r]=t[r])}function Jy({transformTemplate:e},t,n){return C.useMemo(()=>{const r=Wa();return $a(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function e0(e,t,n){const r=e.style||{},i={};return $h(i,r,e),Object.assign(i,Jy(e,t,n)),e.transformValues?e.transformValues(i):i}function t0(e,t,n){const r={},i=e0(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=i,r}const n0=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function gs(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||n0.has(e)}let Wh=e=>!gs(e);function r0(e){e&&(Wh=t=>t.startsWith("on")?!gs(t):e(t))}try{r0(require("@emotion/is-prop-valid").default)}catch{}function i0(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Wh(i)||n===!0&&gs(i)||!t&&!gs(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function vc(e,t,n){return typeof e=="string"?e:O.transform(t+n*e)}function s0(e,t,n){const r=vc(t,e.x,e.width),i=vc(n,e.y,e.height);return`${r} ${i}`}const o0={offset:"stroke-dashoffset",array:"stroke-dasharray"},l0={offset:"strokeDashoffset",array:"strokeDasharray"};function a0(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?o0:l0;e[s.offset]=O.transform(-r);const o=O.transform(t),l=O.transform(n);e[s.array]=`${o} ${l}`}function Ha(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:s,pathLength:o,pathSpacing:l=1,pathOffset:a=0,...u},f,c,d){if($a(e,u,f,d),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:g,style:v,dimensions:x}=e;g.transform&&(x&&(v.transform=g.transform),delete g.transform),x&&(i!==void 0||s!==void 0||v.transform)&&(v.transformOrigin=s0(x,i!==void 0?i:.5,s!==void 0?s:.5)),t!==void 0&&(g.x=t),n!==void 0&&(g.y=n),r!==void 0&&(g.scale=r),o!==void 0&&a0(g,o,l,a,!1)}const Hh=()=>({...Wa(),attrs:{}}),Ka=e=>typeof e=="string"&&e.toLowerCase()==="svg";function u0(e,t,n,r){const i=C.useMemo(()=>{const s=Hh();return Ha(s,t,{enableHardwareAcceleration:!1},Ka(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};$h(s,e.style,e),i.style={...s,...i.style}}return i}function c0(e=!1){return(n,r,i,{latestValues:s},o)=>{const a=(Ua(n)?u0:t0)(r,s,o,n),f={...i0(r,typeof n=="string",e),...a,ref:i},{children:c}=r,d=C.useMemo(()=>Ae(c)?c.get():c,[c]);return C.createElement(n,{...f,children:d})}}function Kh(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}const Qh=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 Gh(e,t,n,r){Kh(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(Qh.has(i)?i:Ia(i),t.attrs[i])}function Qa(e,t){const{style:n}=e,r={};for(const i in n)(Ae(n[i])||t.style&&Ae(t.style[i])||Ih(i,e))&&(r[i]=n[i]);return r}function Yh(e,t){const n=Qa(e,t);for(const r in e)if(Ae(e[r])||Ae(t[r])){const i=ii.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[i]=e[r]}return n}function Ga(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}function Xh(e){const t=C.useRef(null);return t.current===null&&(t.current=e()),t.current}const ys=e=>Array.isArray(e),f0=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),d0=e=>ys(e)?e[e.length-1]||0:e;function $i(e){const t=Ae(e)?e.get():e;return f0(t)?t.toValue():t}function h0({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,s){const o={latestValues:p0(r,i,s,e),renderState:t()};return n&&(o.mount=l=>n(r,l,o)),o}const Zh=e=>(t,n)=>{const r=C.useContext(Fs),i=C.useContext(zs),s=()=>h0(e,t,r,i);return n?s():Xh(s)};function p0(e,t,n,r){const i={},s=r(e,{});for(const d in s)i[d]=$i(s[d]);let{initial:o,animate:l}=e;const a=$s(e),u=_h(e);t&&u&&!a&&e.inherit!==!1&&(o===void 0&&(o=t.initial),l===void 0&&(l=t.animate));let f=n?n.initial===!1:!1;f=f||o===!1;const c=f?l:o;return c&&typeof c!="boolean"&&!Us(c)&&(Array.isArray(c)?c:[c]).forEach(g=>{const v=Ga(e,g);if(!v)return;const{transitionEnd:x,transition:E,...y}=v;for(const p in y){let m=y[p];if(Array.isArray(m)){const w=f?m.length-1:0;m=m[w]}m!==null&&(i[p]=m)}for(const p in x)i[p]=x[p]}),i}const ie=e=>e;class xc{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const n=this.order.indexOf(t);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}function m0(e){let t=new xc,n=new xc,r=0,i=!1,s=!1;const o=new WeakSet,l={schedule:(a,u=!1,f=!1)=>{const c=f&&i,d=c?t:n;return u&&o.add(a),d.add(a)&&c&&i&&(r=t.order.length),a},cancel:a=>{n.remove(a),o.delete(a)},process:a=>{if(i){s=!0;return}if(i=!0,[t,n]=[n,t],n.clear(),r=t.order.length,r)for(let u=0;u<r;u++){const f=t.order[u];f(a),o.has(f)&&(l.schedule(f),e())}i=!1,s&&(s=!1,l.process(a))}};return l}const Ei=["prepare","read","update","preRender","render","postRender"],g0=40;function y0(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=Ei.reduce((c,d)=>(c[d]=m0(()=>n=!0),c),{}),o=c=>s[c].process(i),l=()=>{const c=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(c-i.timestamp,g0),1),i.timestamp=c,i.isProcessing=!0,Ei.forEach(o),i.isProcessing=!1,n&&t&&(r=!1,e(l))},a=()=>{n=!0,r=!0,i.isProcessing||e(l)};return{schedule:Ei.reduce((c,d)=>{const g=s[d];return c[d]=(v,x=!1,E=!1)=>(n||a(),g.schedule(v,x,E)),c},{}),cancel:c=>Ei.forEach(d=>s[d].cancel(c)),state:i,steps:s}}const{schedule:Q,cancel:Tt,state:xe,steps:So}=y0(typeof requestAnimationFrame<"u"?requestAnimationFrame:ie,!0),v0={useVisualState:Zh({scrapeMotionValuesFromProps:Yh,createRenderState:Hh,onMount:(e,t,{renderState:n,latestValues:r})=>{Q.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),Q.render(()=>{Ha(n,r,{enableHardwareAcceleration:!1},Ka(t.tagName),e.transformTemplate),Gh(t,n)})}})},x0={useVisualState:Zh({scrapeMotionValuesFromProps:Qa,createRenderState:Wa})};function w0(e,{forwardMotionProps:t=!1},n,r){return{...Ua(e)?v0:x0,preloadedFeatures:n,useRender:c0(t),createVisualElement:r,Component:e}}function yt(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const qh=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Hs(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const k0=e=>t=>qh(t)&&e(t,Hs(t));function xt(e,t,n,r){return yt(e,t,k0(n),r)}const S0=(e,t)=>n=>t(e(n)),Ht=(...e)=>e.reduce(S0);function Jh(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const wc=Jh("dragHorizontal"),kc=Jh("dragVertical");function ep(e){let t=!1;if(e==="y")t=kc();else if(e==="x")t=wc();else{const n=wc(),r=kc();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function tp(){const e=ep(!0);return e?(e(),!1):!0}class Jt{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Sc(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End"),i=(s,o)=>{if(s.pointerType==="touch"||tp())return;const l=e.getProps();e.animationState&&l.whileHover&&e.animationState.setActive("whileHover",t),l[r]&&Q.update(()=>l[r](s,o))};return xt(e.current,n,i,{passive:!e.getProps()[r]})}class C0 extends Jt{mount(){this.unmount=Ht(Sc(this.node,!0),Sc(this.node,!1))}unmount(){}}class P0 extends Jt{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=Ht(yt(this.node.current,"focus",()=>this.onFocus()),yt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const np=(e,t)=>t?e===t?!0:np(e,t.parentElement):!1;function Co(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Hs(n))}class T0 extends Jt{constructor(){super(...arguments),this.removeStartListeners=ie,this.removeEndListeners=ie,this.removeAccessibleListeners=ie,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),s=xt(window,"pointerup",(l,a)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:f,globalTapTarget:c}=this.node.getProps();Q.update(()=>{!c&&!np(this.node.current,l.target)?f&&f(l,a):u&&u(l,a)})},{passive:!(r.onTap||r.onPointerUp)}),o=xt(window,"pointercancel",(l,a)=>this.cancelPress(l,a),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=Ht(s,o),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=s=>{if(s.key!=="Enter"||this.isPressing)return;const o=l=>{l.key!=="Enter"||!this.checkPressEnd()||Co("up",(a,u)=>{const{onTap:f}=this.node.getProps();f&&Q.update(()=>f(a,u))})};this.removeEndListeners(),this.removeEndListeners=yt(this.node.current,"keyup",o),Co("down",(l,a)=>{this.startPress(l,a)})},n=yt(this.node.current,"keydown",t),r=()=>{this.isPressing&&Co("cancel",(s,o)=>this.cancelPress(s,o))},i=yt(this.node.current,"blur",r);this.removeAccessibleListeners=Ht(n,i)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&Q.update(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!tp()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Q.update(()=>r(t,n))}mount(){const t=this.node.getProps(),n=xt(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=yt(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Ht(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const jl=new WeakMap,Po=new WeakMap,E0=e=>{const t=jl.get(e.target);t&&t(e)},N0=e=>{e.forEach(E0)};function j0({root:e,...t}){const n=e||document;Po.has(n)||Po.set(n,{});const r=Po.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(N0,{root:e,...t})),r[i]}function R0(e,t,n){const r=j0(t);return jl.set(e,n),r.observe(e),()=>{jl.delete(e),r.unobserve(e)}}const L0={some:0,all:1};class M0 extends Jt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:s}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:L0[i]},l=a=>{const{isIntersecting:u}=a;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:f,onViewportLeave:c}=this.node.getProps(),d=u?f:c;d&&d(a)};return R0(this.node.current,o,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(b0(t,n))&&this.startObserver()}unmount(){}}function b0({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const A0={inView:{Feature:M0},tap:{Feature:T0},focus:{Feature:P0},hover:{Feature:C0}};function rp(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 D0(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function V0(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function Ks(e,t,n){const r=e.getProps();return Ga(r,t,n!==void 0?n:r.custom,D0(e),V0(e))}let Ya=ie;const hn=e=>e*1e3,wt=e=>e/1e3,_0={current:!1},ip=e=>Array.isArray(e)&&typeof e[0]=="number";function sp(e){return!!(!e||typeof e=="string"&&op[e]||ip(e)||Array.isArray(e)&&e.every(sp))}const xr=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,op={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:xr([0,.65,.55,1]),circOut:xr([.55,0,1,.45]),backIn:xr([.31,.01,.66,-.59]),backOut:xr([.33,1.53,.69,.99])};function lp(e){if(e)return ip(e)?xr(e):Array.isArray(e)?e.map(lp):op[e]}function O0(e,t,n,{delay:r=0,duration:i,repeat:s=0,repeatType:o="loop",ease:l,times:a}={}){const u={[t]:n};a&&(u.offset=a);const f=lp(l);return Array.isArray(f)&&(u.easing=f),e.animate(u,{delay:r,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"})}function I0(e,{repeat:t,repeatType:n="loop"}){const r=t&&n!=="loop"&&t%2===1?0:e.length-1;return e[r]}const ap=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,F0=1e-7,z0=12;function B0(e,t,n,r,i){let s,o,l=0;do o=t+(n-t)/2,s=ap(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>F0&&++l<z0);return o}function li(e,t,n,r){if(e===t&&n===r)return ie;const i=s=>B0(s,0,1,e,n);return s=>s===0||s===1?s:ap(i(s),t,r)}const U0=li(.42,0,1,1),$0=li(0,0,.58,1),up=li(.42,0,.58,1),W0=e=>Array.isArray(e)&&typeof e[0]!="number",cp=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,fp=e=>t=>1-e(1-t),Xa=e=>1-Math.sin(Math.acos(e)),dp=fp(Xa),H0=cp(Xa),hp=li(.33,1.53,.69,.99),Za=fp(hp),K0=cp(Za),Q0=e=>(e*=2)<1?.5*Za(e):.5*(2-Math.pow(2,-10*(e-1))),G0={linear:ie,easeIn:U0,easeInOut:up,easeOut:$0,circIn:Xa,circInOut:H0,circOut:dp,backIn:Za,backInOut:K0,backOut:hp,anticipate:Q0},Cc=e=>{if(Array.isArray(e)){Ya(e.length===4);const[t,n,r,i]=e;return li(t,n,r,i)}else if(typeof e=="string")return G0[e];return e},qa=(e,t)=>n=>!!(si(n)&&Xy.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),pp=(e,t,n)=>r=>{if(!si(r))return r;const[i,s,o,l]=r.match(Ws);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:l!==void 0?parseFloat(l):1}},Y0=e=>Gt(0,255,e),To={...Sn,transform:e=>Math.round(Y0(e))},cn={test:qa("rgb","red"),parse:pp("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+To.transform(e)+", "+To.transform(t)+", "+To.transform(n)+", "+Lr(Rr.transform(r))+")"};function X0(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Rl={test:qa("#"),parse:X0,transform:cn.transform},On={test:qa("hsl","hue"),parse:pp("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+ct.transform(Lr(t))+", "+ct.transform(Lr(n))+", "+Lr(Rr.transform(r))+")"},Ce={test:e=>cn.test(e)||Rl.test(e)||On.test(e),parse:e=>cn.test(e)?cn.parse(e):On.test(e)?On.parse(e):Rl.parse(e),transform:e=>si(e)?e:e.hasOwnProperty("red")?cn.transform(e):On.transform(e)},q=(e,t,n)=>-n*e+n*t+e;function Eo(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 Z0({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,s=0,o=0;if(!t)i=s=o=n;else{const l=n<.5?n*(1+t):n+t-n*t,a=2*n-l;i=Eo(a,l,e+1/3),s=Eo(a,l,e),o=Eo(a,l,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}const No=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},q0=[Rl,cn,On],J0=e=>q0.find(t=>t.test(e));function Pc(e){const t=J0(e);let n=t.parse(e);return t===On&&(n=Z0(n)),n}const mp=(e,t)=>{const n=Pc(e),r=Pc(t),i={...n};return s=>(i.red=No(n.red,r.red,s),i.green=No(n.green,r.green,s),i.blue=No(n.blue,r.blue,s),i.alpha=q(n.alpha,r.alpha,s),cn.transform(i))};function ev(e){var t,n;return isNaN(e)&&si(e)&&(((t=e.match(Ws))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(Bh))===null||n===void 0?void 0:n.length)||0)>0}const gp={regex:Gy,countKey:"Vars",token:"${v}",parse:ie},yp={regex:Bh,countKey:"Colors",token:"${c}",parse:Ce.parse},vp={regex:Ws,countKey:"Numbers",token:"${n}",parse:Sn.parse};function jo(e,{regex:t,countKey:n,token:r,parse:i}){const s=e.tokenised.match(t);s&&(e["num"+n]=s.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...s.map(i)))}function vs(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&jo(n,gp),jo(n,yp),jo(n,vp),n}function xp(e){return vs(e).values}function wp(e){const{values:t,numColors:n,numVars:r,tokenised:i}=vs(e),s=t.length;return o=>{let l=i;for(let a=0;a<s;a++)a<r?l=l.replace(gp.token,o[a]):a<r+n?l=l.replace(yp.token,Ce.transform(o[a])):l=l.replace(vp.token,Lr(o[a]));return l}}const tv=e=>typeof e=="number"?0:e;function nv(e){const t=xp(e);return wp(e)(t.map(tv))}const Yt={test:ev,parse:xp,createTransformer:wp,getAnimatableNone:nv},kp=(e,t)=>n=>`${n>0?t:e}`;function Sp(e,t){return typeof e=="number"?n=>q(e,t,n):Ce.test(e)?mp(e,t):e.startsWith("var(")?kp(e,t):Pp(e,t)}const Cp=(e,t)=>{const n=[...e],r=n.length,i=e.map((s,o)=>Sp(s,t[o]));return s=>{for(let o=0;o<r;o++)n[o]=i[o](s);return n}},rv=(e,t)=>{const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Sp(e[i],t[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}},Pp=(e,t)=>{const n=Yt.createTransformer(t),r=vs(e),i=vs(t);return r.numVars===i.numVars&&r.numColors===i.numColors&&r.numNumbers>=i.numNumbers?Ht(Cp(r.values,i.values),n):kp(e,t)},qr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Tc=(e,t)=>n=>q(e,t,n);function iv(e){return typeof e=="number"?Tc:typeof e=="string"?Ce.test(e)?mp:Pp:Array.isArray(e)?Cp:typeof e=="object"?rv:Tc}function sv(e,t,n){const r=[],i=n||iv(e[0]),s=e.length-1;for(let o=0;o<s;o++){let l=i(e[o],e[o+1]);if(t){const a=Array.isArray(t)?t[o]||ie:t;l=Ht(a,l)}r.push(l)}return r}function Tp(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const s=e.length;if(Ya(s===t.length),s===1)return()=>t[0];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=sv(t,r,i),l=o.length,a=u=>{let f=0;if(l>1)for(;f<e.length-2&&!(u<e[f+1]);f++);const c=qr(e[f],e[f+1],u);return o[f](c)};return n?u=>a(Gt(e[0],e[s-1],u)):a}function ov(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=qr(0,t,r);e.push(q(n,1,i))}}function lv(e){const t=[0];return ov(t,e.length-1),t}function av(e,t){return e.map(n=>n*t)}function uv(e,t){return e.map(()=>t||up).splice(0,e.length-1)}function xs({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=W0(r)?r.map(Cc):Cc(r),s={done:!1,value:t[0]},o=av(n&&n.length===t.length?n:lv(t),e),l=Tp(o,t,{ease:Array.isArray(i)?i:uv(t,i)});return{calculatedDuration:e,next:a=>(s.value=l(a),s.done=a>=e,s)}}function Ep(e,t){return t?e*(1e3/t):0}const cv=5;function Np(e,t,n){const r=Math.max(t-cv,0);return Ep(n-e(r),t-r)}const Ro=.001,fv=.01,dv=10,hv=.05,pv=1;function mv({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,s,o=1-t;o=Gt(hv,pv,o),e=Gt(fv,dv,wt(e)),o<1?(i=u=>{const f=u*o,c=f*e,d=f-n,g=Ll(u,o),v=Math.exp(-c);return Ro-d/g*v},s=u=>{const c=u*o*e,d=c*n+n,g=Math.pow(o,2)*Math.pow(u,2)*e,v=Math.exp(-c),x=Ll(Math.pow(u,2),o);return(-i(u)+Ro>0?-1:1)*((d-g)*v)/x}):(i=u=>{const f=Math.exp(-u*e),c=(u-n)*e+1;return-Ro+f*c},s=u=>{const f=Math.exp(-u*e),c=(n-u)*(e*e);return f*c});const l=5/e,a=yv(i,s,l);if(e=hn(e),isNaN(a))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(a,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const gv=12;function yv(e,t,n){let r=n;for(let i=1;i<gv;i++)r=r-e(r)/t(r);return r}function Ll(e,t){return e*Math.sqrt(1-t*t)}const vv=["duration","bounce"],xv=["stiffness","damping","mass"];function Ec(e,t){return t.some(n=>e[n]!==void 0)}function wv(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!Ec(e,xv)&&Ec(e,vv)){const n=mv(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function jp({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],s=e[e.length-1],o={done:!1,value:i},{stiffness:l,damping:a,mass:u,duration:f,velocity:c,isResolvedFromDuration:d}=wv({...r,velocity:-wt(r.velocity||0)}),g=c||0,v=a/(2*Math.sqrt(l*u)),x=s-i,E=wt(Math.sqrt(l/u)),y=Math.abs(x)<5;n||(n=y?.01:2),t||(t=y?.005:.5);let p;if(v<1){const m=Ll(E,v);p=w=>{const P=Math.exp(-v*E*w);return s-P*((g+v*E*x)/m*Math.sin(m*w)+x*Math.cos(m*w))}}else if(v===1)p=m=>s-Math.exp(-E*m)*(x+(g+E*x)*m);else{const m=E*Math.sqrt(v*v-1);p=w=>{const P=Math.exp(-v*E*w),R=Math.min(m*w,300);return s-P*((g+v*E*x)*Math.sinh(R)+m*x*Math.cosh(R))/m}}return{calculatedDuration:d&&f||null,next:m=>{const w=p(m);if(d)o.done=m>=f;else{let P=g;m!==0&&(v<1?P=Np(p,m,w):P=0);const R=Math.abs(P)<=n,L=Math.abs(s-w)<=t;o.done=R&&L}return o.value=o.done?s:w,o}}}function Nc({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:l,max:a,restDelta:u=.5,restSpeed:f}){const c=e[0],d={done:!1,value:c},g=T=>l!==void 0&&T<l||a!==void 0&&T>a,v=T=>l===void 0?a:a===void 0||Math.abs(l-T)<Math.abs(a-T)?l:a;let x=n*t;const E=c+x,y=o===void 0?E:o(E);y!==E&&(x=y-c);const p=T=>-x*Math.exp(-T/r),m=T=>y+p(T),w=T=>{const b=p(T),D=m(T);d.done=Math.abs(b)<=u,d.value=d.done?y:D};let P,R;const L=T=>{g(d.value)&&(P=T,R=jp({keyframes:[d.value,v(d.value)],velocity:Np(m,T,d.value),damping:i,stiffness:s,restDelta:u,restSpeed:f}))};return L(0),{calculatedDuration:null,next:T=>{let b=!1;return!R&&P===void 0&&(b=!0,w(T),L(T)),P!==void 0&&T>P?R.next(T-P):(!b&&w(T),d)}}}const kv=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Q.update(t,!0),stop:()=>Tt(t),now:()=>xe.isProcessing?xe.timestamp:performance.now()}},jc=2e4;function Rc(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<jc;)t+=n,r=e.next(t);return t>=jc?1/0:t}const Sv={decay:Nc,inertia:Nc,tween:xs,keyframes:xs,spring:jp};function ws({autoplay:e=!0,delay:t=0,driver:n=kv,keyframes:r,type:i="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:l="loop",onPlay:a,onStop:u,onComplete:f,onUpdate:c,...d}){let g=1,v=!1,x,E;const y=()=>{E=new Promise(M=>{x=M})};y();let p;const m=Sv[i]||xs;let w;m!==xs&&typeof r[0]!="number"&&(w=Tp([0,100],r,{clamp:!1}),r=[0,100]);const P=m({...d,keyframes:r});let R;l==="mirror"&&(R=m({...d,keyframes:[...r].reverse(),velocity:-(d.velocity||0)}));let L="idle",T=null,b=null,D=null;P.calculatedDuration===null&&s&&(P.calculatedDuration=Rc(P));const{calculatedDuration:B}=P;let U=1/0,ne=1/0;B!==null&&(U=B+o,ne=U*(s+1)-o);let H=0;const De=M=>{if(b===null)return;g>0&&(b=Math.min(b,M)),g<0&&(b=Math.min(M-ne/g,b)),T!==null?H=T:H=Math.round(M-b)*g;const _=H-t*(g>=0?1:-1),$=g>=0?_<0:_>ne;H=Math.max(_,0),L==="finished"&&T===null&&(H=ne);let se=H,Ve=P;if(s){const Nt=Math.min(H,ne)/U;let ft=Math.floor(Nt),dt=Nt%1;!dt&&Nt>=1&&(dt=1),dt===1&&ft--,ft=Math.min(ft,s+1),!!(ft%2)&&(l==="reverse"?(dt=1-dt,o&&(dt-=o/U)):l==="mirror"&&(Ve=R)),se=Gt(0,1,dt)*U}const Se=$?{done:!1,value:r[0]}:Ve.next(se);w&&(Se.value=w(Se.value));let{done:it}=Se;!$&&B!==null&&(it=g>=0?H>=ne:H<=0);const ae=T===null&&(L==="finished"||L==="running"&&it);return c&&c(Se.value),ae&&k(),Se},F=()=>{p&&p.stop(),p=void 0},S=()=>{L="idle",F(),x(),y(),b=D=null},k=()=>{L="finished",f&&f(),F(),x()},N=()=>{if(v)return;p||(p=n(De));const M=p.now();a&&a(),T!==null?b=M-T:(!b||L==="finished")&&(b=M),L==="finished"&&y(),D=b,T=null,L="running",p.start()};e&&N();const A={then(M,_){return E.then(M,_)},get time(){return wt(H)},set time(M){M=hn(M),H=M,T!==null||!p||g===0?T=M:b=p.now()-M/g},get duration(){const M=P.calculatedDuration===null?Rc(P):P.calculatedDuration;return wt(M)},get speed(){return g},set speed(M){M===g||!p||(g=M,A.time=wt(H))},get state(){return L},play:N,pause:()=>{L="paused",T=H},stop:()=>{v=!0,L!=="idle"&&(L="idle",u&&u(),S())},cancel:()=>{D!==null&&De(D),S()},complete:()=>{L="finished"},sample:M=>(b=0,De(M))};return A}function Cv(e){let t;return()=>(t===void 0&&(t=e()),t)}const Pv=Cv(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Tv=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),Ni=10,Ev=2e4,Nv=(e,t)=>t.type==="spring"||e==="backgroundColor"||!sp(t.ease);function jv(e,t,{onUpdate:n,onComplete:r,...i}){if(!(Pv()&&Tv.has(t)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0&&i.type!=="inertia"))return!1;let o=!1,l,a,u=!1;const f=()=>{a=new Promise(m=>{l=m})};f();let{keyframes:c,duration:d=300,ease:g,times:v}=i;if(Nv(t,i)){const m=ws({...i,repeat:0,delay:0});let w={done:!1,value:c[0]};const P=[];let R=0;for(;!w.done&&R<Ev;)w=m.sample(R),P.push(w.value),R+=Ni;v=void 0,c=P,d=R-Ni,g="linear"}const x=O0(e.owner.current,t,c,{...i,duration:d,ease:g,times:v}),E=()=>{u=!1,x.cancel()},y=()=>{u=!0,Q.update(E),l(),f()};return x.onfinish=()=>{u||(e.set(I0(c,i)),r&&r(),y())},{then(m,w){return a.then(m,w)},attachTimeline(m){return x.timeline=m,x.onfinish=null,ie},get time(){return wt(x.currentTime||0)},set time(m){x.currentTime=hn(m)},get speed(){return x.playbackRate},set speed(m){x.playbackRate=m},get duration(){return wt(d)},play:()=>{o||(x.play(),Tt(E))},pause:()=>x.pause(),stop:()=>{if(o=!0,x.playState==="idle")return;const{currentTime:m}=x;if(m){const w=ws({...i,autoplay:!1});e.setWithVelocity(w.sample(m-Ni).value,w.sample(m).value,Ni)}y()},complete:()=>{u||x.finish()},cancel:y}}function Rv({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const i=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:ie,pause:ie,stop:ie,then:s=>(s(),Promise.resolve()),cancel:ie,complete:ie});return t?ws({keyframes:[0,1],duration:0,delay:t,onComplete:i}):i()}const Lv={type:"spring",stiffness:500,damping:25,restSpeed:10},Mv=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),bv={type:"keyframes",duration:.8},Av={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Dv=(e,{keyframes:t})=>t.length>2?bv:kn.has(e)?e.startsWith("scale")?Mv(t[1]):Lv:Av,Ml=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Yt.test(t)||t==="0")&&!t.startsWith("url(")),Vv=new Set(["brightness","contrast","saturate","opacity"]);function _v(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Ws)||[];if(!r)return e;const i=n.replace(r,"");let s=Vv.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const Ov=/([a-z-]*)\(.*?\)/g,bl={...Yt,getAnimatableNone:e=>{const t=e.match(Ov);return t?t.map(_v).join(" "):e}},Iv={...Uh,color:Ce,backgroundColor:Ce,outlineColor:Ce,fill:Ce,stroke:Ce,borderColor:Ce,borderTopColor:Ce,borderRightColor:Ce,borderBottomColor:Ce,borderLeftColor:Ce,filter:bl,WebkitFilter:bl},Ja=e=>Iv[e];function Rp(e,t){let n=Ja(e);return n!==bl&&(n=Yt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Lp=e=>/^0[^.\s]+$/.test(e);function Fv(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||Lp(e)}function zv(e,t,n,r){const i=Ml(t,n);let s;Array.isArray(n)?s=[...n]:s=[null,n];const o=r.from!==void 0?r.from:e.get();let l;const a=[];for(let u=0;u<s.length;u++)s[u]===null&&(s[u]=u===0?o:s[u-1]),Fv(s[u])&&a.push(u),typeof s[u]=="string"&&s[u]!=="none"&&s[u]!=="0"&&(l=s[u]);if(i&&a.length&&l)for(let u=0;u<a.length;u++){const f=a[u];s[f]=Rp(t,l)}return s}function Bv({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:l,from:a,elapsed:u,...f}){return!!Object.keys(f).length}function eu(e,t){return e[t]||e.default||e}const Uv={skipAnimations:!1},tu=(e,t,n,r={})=>i=>{const s=eu(r,e)||{},o=s.delay||r.delay||0;let{elapsed:l=0}=r;l=l-hn(o);const a=zv(t,e,n,s),u=a[0],f=a[a.length-1],c=Ml(e,u),d=Ml(e,f);let g={keyframes:a,velocity:t.getVelocity(),ease:"easeOut",...s,delay:-l,onUpdate:v=>{t.set(v),s.onUpdate&&s.onUpdate(v)},onComplete:()=>{i(),s.onComplete&&s.onComplete()}};if(Bv(s)||(g={...g,...Dv(e,g)}),g.duration&&(g.duration=hn(g.duration)),g.repeatDelay&&(g.repeatDelay=hn(g.repeatDelay)),!c||!d||_0.current||s.type===!1||Uv.skipAnimations)return Rv(g);if(!r.isHandoff&&t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const v=jv(t,e,g);if(v)return v}return ws(g)};function ks(e){return!!(Ae(e)&&e.add)}const Mp=e=>/^\-?\d*\.?\d+$/.test(e);function nu(e,t){e.indexOf(t)===-1&&e.push(t)}function ru(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class iu{constructor(){this.subscriptions=[]}add(t){return nu(this.subscriptions,t),()=>ru(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let s=0;s<i;s++){const o=this.subscriptions[s];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const $v=e=>!isNaN(parseFloat(e));class Wv{constructor(t,n={}){this.version="10.18.0",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,i=!0)=>{this.prev=this.current,this.current=r;const{delta:s,timestamp:o}=xe;this.lastUpdated!==o&&(this.timeDelta=s,this.lastUpdated=o,Q.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Q.postRender(this.velocityCheck),this.velocityCheck=({timestamp:r})=>{r!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=$v(this.current),this.owner=n.owner}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new iu);const r=this.events[t].add(n);return t==="change"?()=>{r(),Q.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=t,this.timeDelta=r}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?Ep(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}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 Jn(e,t){return new Wv(e,t)}const bp=e=>t=>t.test(e),Hv={test:e=>e==="auto",parse:e=>e},Ap=[Sn,O,ct,Rt,qy,Zy,Hv],dr=e=>Ap.find(bp(e)),Kv=[...Ap,Ce,Yt],Qv=e=>Kv.find(bp(e));function Gv(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Jn(n))}function Yv(e,t){const n=Ks(e,t);let{transitionEnd:r={},transition:i={},...s}=n?e.makeTargetAnimatable(n,!1):{};s={...s,...r};for(const o in s){const l=d0(s[o]);Gv(e,o,l)}}function Xv(e,t,n){var r,i;const s=Object.keys(t).filter(l=>!e.hasValue(l)),o=s.length;if(o)for(let l=0;l<o;l++){const a=s[l],u=t[a];let f=null;Array.isArray(u)&&(f=u[0]),f===null&&(f=(i=(r=n[a])!==null&&r!==void 0?r:e.readValue(a))!==null&&i!==void 0?i:t[a]),f!=null&&(typeof f=="string"&&(Mp(f)||Lp(f))?f=parseFloat(f):!Qv(f)&&Yt.test(u)&&(f=Rp(a,u)),e.addValue(a,Jn(f,{owner:e})),n[a]===void 0&&(n[a]=f),f!==null&&e.setBaseTarget(a,f))}}function Zv(e,t){return t?(t[e]||t.default||t).from:void 0}function qv(e,t,n){const r={};for(const i in e){const s=Zv(i,t);if(s!==void 0)r[i]=s;else{const o=n.getValue(i);o&&(r[i]=o.get())}}return r}function Jv({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function ex(e,t){const n=e.get();if(Array.isArray(t)){for(let r=0;r<t.length;r++)if(t[r]!==n)return!0}else return n!==t}function Dp(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:o,...l}=e.makeTargetAnimatable(t);const a=e.getValue("willChange");r&&(s=r);const u=[],f=i&&e.animationState&&e.animationState.getState()[i];for(const c in l){const d=e.getValue(c),g=l[c];if(!d||g===void 0||f&&Jv(f,c))continue;const v={delay:n,elapsed:0,...eu(s||{},c)};if(window.HandoffAppearAnimations){const y=e.getProps()[Vh];if(y){const p=window.HandoffAppearAnimations(y,c,d,Q);p!==null&&(v.elapsed=p,v.isHandoff=!0)}}let x=!v.isHandoff&&!ex(d,g);if(v.type==="spring"&&(d.getVelocity()||v.velocity)&&(x=!1),d.animation&&(x=!1),x)continue;d.start(tu(c,d,g,e.shouldReduceMotion&&kn.has(c)?{type:!1}:v));const E=d.animation;ks(a)&&(a.add(c),E.then(()=>a.remove(c))),u.push(E)}return o&&Promise.all(u).then(()=>{o&&Yv(e,o)}),u}function Al(e,t,n={}){const r=Ks(e,t,n.custom);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const s=r?()=>Promise.all(Dp(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(a=0)=>{const{delayChildren:u=0,staggerChildren:f,staggerDirection:c}=i;return tx(e,t,u+a,f,c,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[a,u]=l==="beforeChildren"?[s,o]:[o,s];return a().then(()=>u())}else return Promise.all([s(),o(n.delay)])}function tx(e,t,n=0,r=0,i=1,s){const o=[],l=(e.variantChildren.size-1)*r,a=i===1?(u=0)=>u*r:(u=0)=>l-u*r;return Array.from(e.variantChildren).sort(nx).forEach((u,f)=>{u.notify("AnimationStart",t),o.push(Al(u,t,{...s,delay:n+a(f)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(o)}function nx(e,t){return e.sortNodePosition(t)}function rx(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>Al(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=Al(e,t,n);else{const i=typeof t=="function"?Ks(e,t,n.custom):t;r=Promise.all(Dp(e,i,n))}return r.then(()=>e.notify("AnimationComplete",t))}const ix=[...Fa].reverse(),sx=Fa.length;function ox(e){return t=>Promise.all(t.map(({animation:n,options:r})=>rx(e,n,r)))}function lx(e){let t=ox(e);const n=ux();let r=!0;const i=(a,u)=>{const f=Ks(e,u);if(f){const{transition:c,transitionEnd:d,...g}=f;a={...a,...g,...d}}return a};function s(a){t=a(e)}function o(a,u){const f=e.getProps(),c=e.getVariantContext(!0)||{},d=[],g=new Set;let v={},x=1/0;for(let y=0;y<sx;y++){const p=ix[y],m=n[p],w=f[p]!==void 0?f[p]:c[p],P=Xr(w),R=p===u?m.isActive:null;R===!1&&(x=y);let L=w===c[p]&&w!==f[p]&&P;if(L&&r&&e.manuallyAnimateOnMount&&(L=!1),m.protectedKeys={...v},!m.isActive&&R===null||!w&&!m.prevProp||Us(w)||typeof w=="boolean")continue;let b=ax(m.prevProp,w)||p===u&&m.isActive&&!L&&P||y>x&&P,D=!1;const B=Array.isArray(w)?w:[w];let U=B.reduce(i,{});R===!1&&(U={});const{prevResolvedValues:ne={}}=m,H={...ne,...U},De=F=>{b=!0,g.has(F)&&(D=!0,g.delete(F)),m.needsAnimating[F]=!0};for(const F in H){const S=U[F],k=ne[F];if(v.hasOwnProperty(F))continue;let N=!1;ys(S)&&ys(k)?N=!rp(S,k):N=S!==k,N?S!==void 0?De(F):g.add(F):S!==void 0&&g.has(F)?De(F):m.protectedKeys[F]=!0}m.prevProp=w,m.prevResolvedValues=U,m.isActive&&(v={...v,...U}),r&&e.blockInitialAnimation&&(b=!1),b&&(!L||D)&&d.push(...B.map(F=>({animation:F,options:{type:p,...a}})))}if(g.size){const y={};g.forEach(p=>{const m=e.getBaseTarget(p);m!==void 0&&(y[p]=m)}),d.push({animation:y})}let E=!!d.length;return r&&(f.initial===!1||f.initial===f.animate)&&!e.manuallyAnimateOnMount&&(E=!1),r=!1,E?t(d):Promise.resolve()}function l(a,u,f){var c;if(n[a].isActive===u)return Promise.resolve();(c=e.variantChildren)===null||c===void 0||c.forEach(g=>{var v;return(v=g.animationState)===null||v===void 0?void 0:v.setActive(a,u)}),n[a].isActive=u;const d=o(f,a);for(const g in n)n[g].protectedKeys={};return d}return{animateChanges:o,setActive:l,setAnimateFunction:s,getState:()=>n}}function ax(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!rp(t,e):!1}function en(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ux(){return{animate:en(!0),whileInView:en(),whileHover:en(),whileTap:en(),whileDrag:en(),whileFocus:en(),exit:en()}}class cx extends Jt{constructor(t){super(t),t.animationState||(t.animationState=lx(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),Us(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let fx=0;class dx extends Jt{constructor(){super(...arguments),this.id=fx++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n,custom:r}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const s=this.node.animationState.setActive("exit",!t,{custom:r??this.node.getProps().custom});n&&!t&&s.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const hx={animation:{Feature:cx},exit:{Feature:dx}},Lc=(e,t)=>Math.abs(e-t);function px(e,t){const n=Lc(e.x,t.x),r=Lc(e.y,t.y);return Math.sqrt(n**2+r**2)}class Vp{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:s=!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 c=Mo(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,g=px(c.offset,{x:0,y:0})>=3;if(!d&&!g)return;const{point:v}=c,{timestamp:x}=xe;this.history.push({...v,timestamp:x});const{onStart:E,onMove:y}=this.handlers;d||(E&&E(this.lastMoveEvent,c),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,c)},this.handlePointerMove=(c,d)=>{this.lastMoveEvent=c,this.lastMoveEventInfo=Lo(d,this.transformPagePoint),Q.update(this.updatePoint,!0)},this.handlePointerUp=(c,d)=>{this.end();const{onEnd:g,onSessionEnd:v,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const E=Mo(c.type==="pointercancel"?this.lastMoveEventInfo:Lo(d,this.transformPagePoint),this.history);this.startEvent&&g&&g(c,E),v&&v(c,E)},!qh(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=Hs(t),l=Lo(o,this.transformPagePoint),{point:a}=l,{timestamp:u}=xe;this.history=[{...a,timestamp:u}];const{onSessionStart:f}=n;f&&f(t,Mo(l,this.history)),this.removeListeners=Ht(xt(this.contextWindow,"pointermove",this.handlePointerMove),xt(this.contextWindow,"pointerup",this.handlePointerUp),xt(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Tt(this.updatePoint)}}function Lo(e,t){return t?{point:t(e.point)}:e}function Mc(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Mo({point:e},t){return{point:e,delta:Mc(e,_p(t)),offset:Mc(e,mx(t)),velocity:gx(t,.1)}}function mx(e){return e[0]}function _p(e){return e[e.length-1]}function gx(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=_p(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>hn(t)));)n--;if(!r)return{x:0,y:0};const s=wt(i.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const o={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function ze(e){return e.max-e.min}function Dl(e,t=0,n=.01){return Math.abs(e-t)<=n}function bc(e,t,n,r=.5){e.origin=r,e.originPoint=q(t.min,t.max,e.origin),e.scale=ze(n)/ze(t),(Dl(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=q(n.min,n.max,e.origin)-e.originPoint,(Dl(e.translate)||isNaN(e.translate))&&(e.translate=0)}function Mr(e,t,n,r){bc(e.x,t.x,n.x,r?r.originX:void 0),bc(e.y,t.y,n.y,r?r.originY:void 0)}function Ac(e,t,n){e.min=n.min+t.min,e.max=e.min+ze(t)}function yx(e,t,n){Ac(e.x,t.x,n.x),Ac(e.y,t.y,n.y)}function Dc(e,t,n){e.min=t.min-n.min,e.max=e.min+ze(t)}function br(e,t,n){Dc(e.x,t.x,n.x),Dc(e.y,t.y,n.y)}function vx(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?q(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?q(n,e,r.max):Math.min(e,n)),e}function Vc(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 xx(e,{top:t,left:n,bottom:r,right:i}){return{x:Vc(e.x,n,i),y:Vc(e.y,t,r)}}function _c(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 wx(e,t){return{x:_c(e.x,t.x),y:_c(e.y,t.y)}}function kx(e,t){let n=.5;const r=ze(e),i=ze(t);return i>r?n=qr(t.min,t.max-r,e.min):r>i&&(n=qr(e.min,e.max-i,t.min)),Gt(0,1,n)}function Sx(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 Vl=.35;function Cx(e=Vl){return e===!1?e=0:e===!0&&(e=Vl),{x:Oc(e,"left","right"),y:Oc(e,"top","bottom")}}function Oc(e,t,n){return{min:Ic(e,t),max:Ic(e,n)}}function Ic(e,t){return typeof e=="number"?e:e[t]||0}const Fc=()=>({translate:0,scale:1,origin:0,originPoint:0}),In=()=>({x:Fc(),y:Fc()}),zc=()=>({min:0,max:0}),oe=()=>({x:zc(),y:zc()});function We(e){return[e("x"),e("y")]}function Op({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Px({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Tx(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 bo(e){return e===void 0||e===1}function _l({scale:e,scaleX:t,scaleY:n}){return!bo(e)||!bo(t)||!bo(n)}function rn(e){return _l(e)||Ip(e)||e.z||e.rotate||e.rotateX||e.rotateY}function Ip(e){return Bc(e.x)||Bc(e.y)}function Bc(e){return e&&e!=="0%"}function Ss(e,t,n){const r=e-n,i=t*r;return n+i}function Uc(e,t,n,r,i){return i!==void 0&&(e=Ss(e,i,r)),Ss(e,n,r)+t}function Ol(e,t=0,n=1,r,i){e.min=Uc(e.min,t,n,r,i),e.max=Uc(e.max,t,n,r,i)}function Fp(e,{x:t,y:n}){Ol(e.x,t.translate,t.scale,t.originPoint),Ol(e.y,n.translate,n.scale,n.originPoint)}function Ex(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let s,o;for(let l=0;l<i;l++){s=n[l],o=s.projectionDelta;const a=s.instance;a&&a.style&&a.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Fn(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Fp(e,o)),r&&rn(s.latestValues)&&Fn(e,s.latestValues))}t.x=$c(t.x),t.y=$c(t.y)}function $c(e){return Number.isInteger(e)||e>1.0000000000001||e<.999999999999?e:1}function bt(e,t){e.min=e.min+t,e.max=e.max+t}function Wc(e,t,[n,r,i]){const s=t[i]!==void 0?t[i]:.5,o=q(e.min,e.max,s);Ol(e,t[n],t[r],o,t.scale)}const Nx=["x","scaleX","originX"],jx=["y","scaleY","originY"];function Fn(e,t){Wc(e.x,t,Nx),Wc(e.y,t,jx)}function zp(e,t){return Op(Tx(e.getBoundingClientRect(),t))}function Rx(e,t,n){const r=zp(e,n),{scroll:i}=t;return i&&(bt(r.x,i.offset.x),bt(r.y,i.offset.y)),r}const Bp=({current:e})=>e?e.ownerDocument.defaultView:null,Lx=new WeakMap;class Mx{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=oe(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=f=>{const{dragSnapToOrigin:c}=this.getProps();c?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Hs(f,"page").point)},s=(f,c)=>{const{drag:d,dragPropagation:g,onDragStart:v}=this.getProps();if(d&&!g&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=ep(d),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),We(E=>{let y=this.getAxisMotionValue(E).get()||0;if(ct.test(y)){const{projection:p}=this.visualElement;if(p&&p.layout){const m=p.layout.layoutBox[E];m&&(y=ze(m)*(parseFloat(y)/100))}}this.originPoint[E]=y}),v&&Q.update(()=>v(f,c),!1,!0);const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},o=(f,c)=>{const{dragPropagation:d,dragDirectionLock:g,onDirectionLock:v,onDrag:x}=this.getProps();if(!d&&!this.openGlobalLock)return;const{offset:E}=c;if(g&&this.currentDirection===null){this.currentDirection=bx(E),this.currentDirection!==null&&v&&v(this.currentDirection);return}this.updateAxis("x",c.point,E),this.updateAxis("y",c.point,E),this.visualElement.render(),x&&x(f,c)},l=(f,c)=>this.stop(f,c),a=()=>We(f=>{var c;return this.getAnimationState(f)==="paused"&&((c=this.getAxisMotionValue(f).animation)===null||c===void 0?void 0:c.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new Vp(t,{onSessionStart:i,onStart:s,onMove:o,onSessionEnd:l,resumeAnimation:a},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:Bp(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&Q.update(()=>s(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.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!ji(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=vx(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,s=this.constraints;n&&_n(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=xx(i.layoutBox,n):this.constraints=!1,this.elastic=Cx(r),s!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&We(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=Sx(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!_n(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=Rx(r,i.root,this.visualElement.getTransformPagePoint());let o=wx(i.layout.layoutBox,s);if(n){const l=n(Px(o));this.hasMutatedConstraints=!!l,l&&(o=Op(l))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:l}=this.getProps(),a=this.constraints||{},u=We(f=>{if(!ji(f,n,this.currentDirection))return;let c=a&&a[f]||{};o&&(c={min:0,max:0});const d=i?200:1e6,g=i?40:1e7,v={type:"inertia",velocity:r?t[f]:0,bounceStiffness:d,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...s,...c};return this.startAxisValueAnimation(f,v)});return Promise.all(u).then(l)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(tu(t,r,0,n))}stopAnimation(){We(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){We(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(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){We(n=>{const{drag:r}=this.getProps();if(!ji(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:l}=i.layout.layoutBox[n];s.set(t[n]-q(o,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!_n(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};We(o=>{const l=this.getAxisMotionValue(o);if(l){const a=l.get();i[o]=kx({min:a,max:a},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),We(o=>{if(!ji(o,t,null))return;const l=this.getAxisMotionValue(o),{min:a,max:u}=this.constraints[o];l.set(q(a,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;Lx.set(this.visualElement,this);const t=this.visualElement.current,n=xt(t,"pointerdown",a=>{const{drag:u,dragListener:f=!0}=this.getProps();u&&f&&this.start(a)}),r=()=>{const{dragConstraints:a}=this.getProps();_n(a)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),r();const o=yt(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",({delta:a,hasLayoutChanged:u})=>{this.isDragging&&u&&(We(f=>{const c=this.getAxisMotionValue(f);c&&(this.originPoint[f]+=a[f].translate,c.set(c.get()+a[f].translate))}),this.visualElement.render())});return()=>{o(),n(),s(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=Vl,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:l}}}function ji(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function bx(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Ax extends Jt{constructor(t){super(t),this.removeGroupControls=ie,this.removeListeners=ie,this.controls=new Mx(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ie}unmount(){this.removeGroupControls(),this.removeListeners()}}const Hc=e=>(t,n)=>{e&&Q.update(()=>e(t,n))};class Dx extends Jt{constructor(){super(...arguments),this.removePointerDownListener=ie}onPointerDown(t){this.session=new Vp(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Bp(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:Hc(t),onStart:Hc(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&Q.update(()=>i(s,o))}}}mount(){this.removePointerDownListener=xt(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function Vx(){const e=C.useContext(zs);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=C.useId();return C.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}const Wi={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Kc(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const hr={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(O.test(e))e=parseFloat(e);else return e;const n=Kc(e,t.target.x),r=Kc(e,t.target.y);return`${n}% ${r}%`}},_x={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Yt.parse(e);if(i.length>5)return r;const s=Yt.createTransformer(e),o=typeof i[0]!="number"?1:0,l=n.x.scale*t.x,a=n.y.scale*t.y;i[0+o]/=l,i[1+o]/=a;const u=q(l,a,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),s(i)}};class Ox extends Rf.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;Wy(Ix),s&&(n.group&&n.group.add(s),r&&r.register&&i&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Wi.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,o=r.projection;return o&&(o.isPresent=s,i||t.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||Q.postRender(()=>{const l=o.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),queueMicrotask(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Up(e){const[t,n]=Vx(),r=C.useContext(Ba);return Rf.createElement(Ox,{...e,layoutGroup:r,switchLayoutGroup:C.useContext(Oh),isPresent:t,safeToRemove:n})}const Ix={borderRadius:{...hr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:hr,borderTopRightRadius:hr,borderBottomLeftRadius:hr,borderBottomRightRadius:hr,boxShadow:_x},$p=["TopLeft","TopRight","BottomLeft","BottomRight"],Fx=$p.length,Qc=e=>typeof e=="string"?parseFloat(e):e,Gc=e=>typeof e=="number"||O.test(e);function zx(e,t,n,r,i,s){i?(e.opacity=q(0,n.opacity!==void 0?n.opacity:1,Bx(r)),e.opacityExit=q(t.opacity!==void 0?t.opacity:1,0,Ux(r))):s&&(e.opacity=q(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let o=0;o<Fx;o++){const l=`border${$p[o]}Radius`;let a=Yc(t,l),u=Yc(n,l);if(a===void 0&&u===void 0)continue;a||(a=0),u||(u=0),a===0||u===0||Gc(a)===Gc(u)?(e[l]=Math.max(q(Qc(a),Qc(u),r),0),(ct.test(u)||ct.test(a))&&(e[l]+="%")):e[l]=u}(t.rotate||n.rotate)&&(e.rotate=q(t.rotate||0,n.rotate||0,r))}function Yc(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Bx=Wp(0,.5,dp),Ux=Wp(.5,.95,ie);function Wp(e,t,n){return r=>r<e?0:r>t?1:n(qr(e,t,r))}function Xc(e,t){e.min=t.min,e.max=t.max}function $e(e,t){Xc(e.x,t.x),Xc(e.y,t.y)}function Zc(e,t,n,r,i){return e-=t,e=Ss(e,1/n,r),i!==void 0&&(e=Ss(e,1/i,r)),e}function $x(e,t=0,n=1,r=.5,i,s=e,o=e){if(ct.test(t)&&(t=parseFloat(t),t=q(o.min,o.max,t/100)-o.min),typeof t!="number")return;let l=q(s.min,s.max,r);e===s&&(l-=t),e.min=Zc(e.min,t,n,l,i),e.max=Zc(e.max,t,n,l,i)}function qc(e,t,[n,r,i],s,o){$x(e,t[n],t[r],t[i],t.scale,s,o)}const Wx=["x","scaleX","originX"],Hx=["y","scaleY","originY"];function Jc(e,t,n,r){qc(e.x,t,Wx,n?n.x:void 0,r?r.x:void 0),qc(e.y,t,Hx,n?n.y:void 0,r?r.y:void 0)}function ef(e){return e.translate===0&&e.scale===1}function Hp(e){return ef(e.x)&&ef(e.y)}function Kx(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function Kp(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function tf(e){return ze(e.x)/ze(e.y)}class Qx{constructor(){this.members=[]}add(t){nu(this.members,t),t.scheduleRender()}remove(t){if(ru(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(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1){r=s;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:i}=t.options;i===!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 nf(e,t,n){let r="";const i=e.x.translate/t.x,s=e.y.translate/t.y;if((i||s)&&(r=`translate3d(${i}px, ${s}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:a,rotateX:u,rotateY:f}=n;a&&(r+=`rotate(${a}deg) `),u&&(r+=`rotateX(${u}deg) `),f&&(r+=`rotateY(${f}deg) `)}const o=e.x.scale*t.x,l=e.y.scale*t.y;return(o!==1||l!==1)&&(r+=`scale(${o}, ${l})`),r||"none"}const Gx=(e,t)=>e.depth-t.depth;class Yx{constructor(){this.children=[],this.isDirty=!1}add(t){nu(this.children,t),this.isDirty=!0}remove(t){ru(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Gx),this.isDirty=!1,this.children.forEach(t)}}function Xx(e,t){const n=performance.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(Tt(r),e(s-t))};return Q.read(r,!0),()=>Tt(r)}function Zx(e){window.MotionDebug&&window.MotionDebug.record(e)}function qx(e){return e instanceof SVGElement&&e.tagName!=="svg"}function Jx(e,t,n){const r=Ae(e)?e:Jn(e);return r.start(tu("",r,t,n)),r.animation}const rf=["","X","Y","Z"],e1={visibility:"hidden"},sf=1e3;let t1=0;const sn={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function Qp({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},l=t==null?void 0:t()){this.id=t1++,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.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,sn.totalNodes=sn.resolvedTargetDeltas=sn.recalculatedProjection=0,this.nodes.forEach(i1),this.nodes.forEach(u1),this.nodes.forEach(c1),this.nodes.forEach(s1),Zx(sn)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let a=0;a<this.path.length;a++)this.path[a].shouldResetTransform=!0;this.root===this&&(this.nodes=new Yx)}addEventListener(o,l){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new iu),this.eventHandlers.get(o).add(l)}notifyListeners(o,...l){const a=this.eventHandlers.get(o);a&&a.notify(...l)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,l=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=qx(o),this.instance=o;const{layoutId:a,layout:u,visualElement:f}=this.options;if(f&&!f.current&&f.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),l&&(u||a)&&(this.isLayoutDirty=!0),e){let c;const d=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,c&&c(),c=Xx(d,250),Wi.hasAnimatedSinceResize&&(Wi.hasAnimatedSinceResize=!1,this.nodes.forEach(lf))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&f&&(a||u)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d,hasRelativeTargetChanged:g,layout:v})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const x=this.options.transition||f.getDefaultTransition()||m1,{onLayoutAnimationStart:E,onLayoutAnimationComplete:y}=f.getProps(),p=!this.targetLayout||!Kp(this.targetLayout,v)||g,m=!d&&g;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||m||d&&(p||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(c,m);const w={...eu(x,"layout"),onPlay:E,onComplete:y};(f.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w)}else d||lf(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=v})}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,Tt(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(f1),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(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let f=0;f<this.path.length;f++){const c=this.path[f];c.shouldResetTransform=!0,c.updateScroll("snapshot"),c.options.layoutRoot&&c.willUpdate(!1)}const{layoutId:l,layout:a}=this.options;if(l===void 0&&!a)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(of);return}this.isUpdating||this.nodes.forEach(l1),this.isUpdating=!1,this.nodes.forEach(a1),this.nodes.forEach(n1),this.nodes.forEach(r1),this.clearAllSnapshots();const l=performance.now();xe.delta=Gt(0,1e3/60,l-xe.timestamp),xe.timestamp=l,xe.isProcessing=!0,So.update.process(xe),So.preRender.process(xe),So.render.process(xe),xe.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach(o1),this.sharedNodes.forEach(d1)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Q.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Q.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 a=0;a<this.path.length;a++)this.path[a].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=oe(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let l=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(l=!1),l&&(this.scroll={animationId:this.root.animationId,phase:o,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform,l=this.projectionDelta&&!Hp(this.projectionDelta),a=this.getTransformTemplate(),u=a?a(this.latestValues,""):void 0,f=u!==this.prevTransformTemplateValue;o&&(l||rn(this.latestValues)||f)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const l=this.measurePageBox();let a=this.removeElementScroll(l);return o&&(a=this.removeTransform(a)),g1(a),{animationId:this.root.animationId,measuredBox:l,layoutBox:a,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:o}=this.options;if(!o)return oe();const l=o.measureViewportBox(),{scroll:a}=this.root;return a&&(bt(l.x,a.offset.x),bt(l.y,a.offset.y)),l}removeElementScroll(o){const l=oe();$e(l,o);for(let a=0;a<this.path.length;a++){const u=this.path[a],{scroll:f,options:c}=u;if(u!==this.root&&f&&c.layoutScroll){if(f.isRoot){$e(l,o);const{scroll:d}=this.root;d&&(bt(l.x,-d.offset.x),bt(l.y,-d.offset.y))}bt(l.x,f.offset.x),bt(l.y,f.offset.y)}}return l}applyTransform(o,l=!1){const a=oe();$e(a,o);for(let u=0;u<this.path.length;u++){const f=this.path[u];!l&&f.options.layoutScroll&&f.scroll&&f!==f.root&&Fn(a,{x:-f.scroll.offset.x,y:-f.scroll.offset.y}),rn(f.latestValues)&&Fn(a,f.latestValues)}return rn(this.latestValues)&&Fn(a,this.latestValues),a}removeTransform(o){const l=oe();$e(l,o);for(let a=0;a<this.path.length;a++){const u=this.path[a];if(!u.instance||!rn(u.latestValues))continue;_l(u.latestValues)&&u.updateSnapshot();const f=oe(),c=u.measurePageBox();$e(f,c),Jc(l,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,f)}return rn(this.latestValues)&&Jc(l,this.latestValues),l}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!==xe.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var l;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==a;if(!(o||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((l=this.parent)===null||l===void 0)&&l.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:c,layoutId:d}=this.options;if(!(!this.layout||!(c||d))){if(this.resolvedRelativeTargetAt=xe.timestamp,!this.targetDelta&&!this.relativeTarget){const g=this.getClosestProjectingParent();g&&g.layout&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=oe(),this.relativeTargetOrigin=oe(),br(this.relativeTargetOrigin,this.layout.layoutBox,g.layout.layoutBox),$e(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=oe(),this.targetWithTransforms=oe()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),yx(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):$e(this.target,this.layout.layoutBox),Fp(this.target,this.targetDelta)):$e(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const g=this.getClosestProjectingParent();g&&!!g.resumingFrom==!!this.resumingFrom&&!g.options.layoutScroll&&g.target&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=oe(),this.relativeTargetOrigin=oe(),br(this.relativeTargetOrigin,this.target,g.target),$e(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}sn.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||_l(this.parent.latestValues)||Ip(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 l=this.getLead(),a=!!this.resumingFrom||this!==l;let u=!0;if((this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty)&&(u=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===xe.timestamp&&(u=!1),u)return;const{layout:f,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(f||c))return;$e(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,g=this.treeScale.y;Ex(this.layoutCorrected,this.treeScale,this.path,a),l.layout&&!l.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(l.target=l.layout.layoutBox);const{target:v}=l;if(!v){this.projectionTransform&&(this.projectionDelta=In(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=In(),this.projectionDeltaWithTransform=In());const x=this.projectionTransform;Mr(this.projectionDelta,this.layoutCorrected,v,this.latestValues),this.projectionTransform=nf(this.projectionDelta,this.treeScale),(this.projectionTransform!==x||this.treeScale.x!==d||this.treeScale.y!==g)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",v)),sn.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(o,l=!1){const a=this.snapshot,u=a?a.latestValues:{},f={...this.latestValues},c=In();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const d=oe(),g=a?a.source:void 0,v=this.layout?this.layout.source:void 0,x=g!==v,E=this.getStack(),y=!E||E.members.length<=1,p=!!(x&&!y&&this.options.crossfade===!0&&!this.path.some(p1));this.animationProgress=0;let m;this.mixTargetDelta=w=>{const P=w/1e3;af(c.x,o.x,P),af(c.y,o.y,P),this.setTargetDelta(c),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(br(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),h1(this.relativeTarget,this.relativeTargetOrigin,d,P),m&&Kx(this.relativeTarget,m)&&(this.isProjectionDirty=!1),m||(m=oe()),$e(m,this.relativeTarget)),x&&(this.animationValues=f,zx(f,u,this.latestValues,P,p,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=P},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&&(Tt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Q.update(()=>{Wi.hasAnimatedSinceResize=!0,this.currentAnimation=Jx(0,sf,{...o,onUpdate:l=>{this.mixTargetDelta(l),o.onUpdate&&o.onUpdate(l)},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(sf),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:l,target:a,layout:u,latestValues:f}=o;if(!(!l||!a||!u)){if(this!==o&&this.layout&&u&&Gp(this.options.animationType,this.layout.layoutBox,u.layoutBox)){a=this.target||oe();const c=ze(this.layout.layoutBox.x);a.x.min=o.target.x.min,a.x.max=a.x.min+c;const d=ze(this.layout.layoutBox.y);a.y.min=o.target.y.min,a.y.max=a.y.min+d}$e(l,a),Fn(l,f),Mr(this.projectionDeltaWithTransform,this.layoutCorrected,l,f)}}registerSharedNode(o,l){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Qx),this.sharedNodes.get(o).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:l}=this.options;return l?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:l}=this.options;return l?(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:l,preserveFollowOpacity:a}={}){const u=this.getStack();u&&u.promote(this,a),o&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetRotation(){const{visualElement:o}=this.options;if(!o)return;let l=!1;const{latestValues:a}=o;if((a.rotate||a.rotateX||a.rotateY||a.rotateZ)&&(l=!0),!l)return;const u={};for(let f=0;f<rf.length;f++){const c="rotate"+rf[f];a[c]&&(u[c]=a[c],o.setStaticValue(c,0))}o.render();for(const f in u)o.setStaticValue(f,u[f]);o.scheduleRender()}getProjectionStyles(o){var l,a;if(!this.instance||this.isSVG)return;if(!this.isVisible)return e1;const u={visibility:""},f=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=$i(o==null?void 0:o.pointerEvents)||"",u.transform=f?f(this.latestValues,""):"none",u;const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){const x={};return this.options.layoutId&&(x.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,x.pointerEvents=$i(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!rn(this.latestValues)&&(x.transform=f?f({},""):"none",this.hasProjected=!1),x}const d=c.animationValues||c.latestValues;this.applyTransformsToTarget(),u.transform=nf(this.projectionDeltaWithTransform,this.treeScale,d),f&&(u.transform=f(d,u.transform));const{x:g,y:v}=this.projectionDelta;u.transformOrigin=`${g.origin*100}% ${v.origin*100}% 0`,c.animationValues?u.opacity=c===this?(a=(l=d.opacity)!==null&&l!==void 0?l:this.latestValues.opacity)!==null&&a!==void 0?a:1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:u.opacity=c===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const x in ms){if(d[x]===void 0)continue;const{correct:E,applyTo:y}=ms[x],p=u.transform==="none"?d[x]:E(d[x],c);if(y){const m=y.length;for(let w=0;w<m;w++)u[y[w]]=p}else u[x]=p}return this.options.layoutId&&(u.pointerEvents=c===this?$i(o==null?void 0:o.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var l;return(l=o.currentAnimation)===null||l===void 0?void 0:l.stop()}),this.root.nodes.forEach(of),this.root.sharedNodes.clear()}}}function n1(e){e.updateLayout()}function r1(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:i}=e.layout,{animationType:s}=e.options,o=n.source!==e.layout.source;s==="size"?We(c=>{const d=o?n.measuredBox[c]:n.layoutBox[c],g=ze(d);d.min=r[c].min,d.max=d.min+g}):Gp(s,n.layoutBox,r)&&We(c=>{const d=o?n.measuredBox[c]:n.layoutBox[c],g=ze(r[c]);d.max=d.min+g,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[c].max=e.relativeTarget[c].min+g)});const l=In();Mr(l,r,n.layoutBox);const a=In();o?Mr(a,e.applyTransform(i,!0),n.measuredBox):Mr(a,r,n.layoutBox);const u=!Hp(l);let f=!1;if(!e.resumeFrom){const c=e.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:d,layout:g}=c;if(d&&g){const v=oe();br(v,n.layoutBox,d.layoutBox);const x=oe();br(x,r,g.layoutBox),Kp(v,x)||(f=!0),c.options.layoutRoot&&(e.relativeTarget=x,e.relativeTargetOrigin=v,e.relativeParent=c)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:a,layoutDelta:l,hasLayoutChanged:u,hasRelativeTargetChanged:f})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function i1(e){sn.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 s1(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function o1(e){e.clearSnapshot()}function of(e){e.clearMeasurements()}function l1(e){e.isLayoutDirty=!1}function a1(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function lf(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function u1(e){e.resolveTargetDelta()}function c1(e){e.calcProjection()}function f1(e){e.resetRotation()}function d1(e){e.removeLeadSnapshot()}function af(e,t,n){e.translate=q(t.translate,0,n),e.scale=q(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function uf(e,t,n,r){e.min=q(t.min,n.min,r),e.max=q(t.max,n.max,r)}function h1(e,t,n,r){uf(e.x,t.x,n.x,r),uf(e.y,t.y,n.y,r)}function p1(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const m1={duration:.45,ease:[.4,0,.1,1]},cf=e=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(e),ff=cf("applewebkit/")&&!cf("chrome/")?Math.round:ie;function df(e){e.min=ff(e.min),e.max=ff(e.max)}function g1(e){df(e.x),df(e.y)}function Gp(e,t,n){return e==="position"||e==="preserve-aspect"&&!Dl(tf(t),tf(n),.2)}const y1=Qp({attachResizeListener:(e,t)=>yt(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ao={current:void 0},Yp=Qp({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ao.current){const e=new y1({});e.mount(window),e.setOptions({layoutScroll:!0}),Ao.current=e}return Ao.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),v1={pan:{Feature:Dx},drag:{Feature:Ax,ProjectionNode:Yp,MeasureLayout:Up}},x1=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function w1(e){const t=x1.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function Il(e,t,n=1){const[r,i]=w1(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return Mp(o)?parseFloat(o):o}else return Nl(i)?Il(i,t,n+1):i}function k1(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(i=>{const s=i.get();if(!Nl(s))return;const o=Il(s,r);o&&i.set(o)});for(const i in t){const s=t[i];if(!Nl(s))continue;const o=Il(s,r);o&&(t[i]=o,n||(n={}),n[i]===void 0&&(n[i]=s))}return{target:t,transitionEnd:n}}const S1=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Xp=e=>S1.has(e),C1=e=>Object.keys(e).some(Xp),hf=e=>e===Sn||e===O,pf=(e,t)=>parseFloat(e.split(", ")[t]),mf=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return pf(i[1],t);{const s=r.match(/^matrix\((.+)\)$/);return s?pf(s[1],e):0}},P1=new Set(["x","y","z"]),T1=ii.filter(e=>!P1.has(e));function E1(e){const t=[];return T1.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const er={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:mf(4,13),y:mf(5,14)};er.translateX=er.x;er.translateY=er.y;const N1=(e,t,n)=>{const r=t.measureViewportBox(),i=t.current,s=getComputedStyle(i),{display:o}=s,l={};o==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{l[u]=er[u](r,s)}),t.render();const a=t.measureViewportBox();return n.forEach(u=>{const f=t.getValue(u);f&&f.jump(l[u]),e[u]=er[u](a,s)}),e},j1=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(Xp);let s=[],o=!1;const l=[];if(i.forEach(a=>{const u=e.getValue(a);if(!e.hasValue(a))return;let f=n[a],c=dr(f);const d=t[a];let g;if(ys(d)){const v=d.length,x=d[0]===null?1:0;f=d[x],c=dr(f);for(let E=x;E<v&&d[E]!==null;E++)g?Ya(dr(d[E])===g):g=dr(d[E])}else g=dr(d);if(c!==g)if(hf(c)&&hf(g)){const v=u.get();typeof v=="string"&&u.set(parseFloat(v)),typeof d=="string"?t[a]=parseFloat(d):Array.isArray(d)&&g===O&&(t[a]=d.map(parseFloat))}else c!=null&&c.transform&&(g!=null&&g.transform)&&(f===0||d===0)?f===0?u.set(g.transform(f)):t[a]=c.transform(d):(o||(s=E1(e),o=!0),l.push(a),r[a]=r[a]!==void 0?r[a]:t[a],u.jump(d))}),l.length){const a=l.indexOf("height")>=0?window.pageYOffset:null,u=N1(t,e,l);return s.length&&s.forEach(([f,c])=>{e.getValue(f).set(c)}),e.render(),Bs&&a!==null&&window.scrollTo({top:a}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function R1(e,t,n,r){return C1(t)?j1(e,t,n,r):{target:t,transitionEnd:r}}const L1=(e,t,n,r)=>{const i=k1(e,t,r);return t=i.target,r=i.transitionEnd,R1(e,t,n,r)},Fl={current:null},Zp={current:!1};function M1(){if(Zp.current=!0,!!Bs)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Fl.current=e.matches;e.addListener(t),t()}else Fl.current=!1}function b1(e,t,n){const{willChange:r}=t;for(const i in t){const s=t[i],o=n[i];if(Ae(s))e.addValue(i,s),ks(r)&&r.add(i);else if(Ae(o))e.addValue(i,Jn(s,{owner:e})),ks(r)&&r.remove(i);else if(o!==s)if(e.hasValue(i)){const l=e.getValue(i);!l.hasAnimated&&l.set(s)}else{const l=e.getStaticValue(i);e.addValue(i,Jn(l!==void 0?l:s,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const gf=new WeakMap,qp=Object.keys(Zr),A1=qp.length,yf=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],D1=za.length;class V1{constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,visualState:s},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,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.scheduleRender=()=>Q.render(this.render,!1,!0);const{latestValues:l,renderState:a}=s;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=a,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=o,this.isControllingVariants=$s(n),this.isVariantNode=_h(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...f}=this.scrapeMotionValuesFromProps(n,{});for(const c in f){const d=f[c];l[c]!==void 0&&Ae(d)&&(d.set(l[c],!1),ks(u)&&u.add(c))}}scrapeMotionValuesFromProps(t,n){return{}}mount(t){this.current=t,gf.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)),Zp.current||M1(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Fl.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){gf.delete(this.current),this.projection&&this.projection.unmount(),Tt(this.notifyUpdate),Tt(this.render),this.valueSubscriptions.forEach(t=>t()),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)this.features[t].unmount();this.current=null}bindToMotionValue(t,n){const r=kn.has(t),i=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&Q.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),s()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...n},r,i,s){let o,l;for(let a=0;a<A1;a++){const u=qp[a],{isEnabled:f,Feature:c,ProjectionNode:d,MeasureLayout:g}=Zr[u];d&&(o=d),f(n)&&(!this.features[u]&&c&&(this.features[u]=new c(this)),g&&(l=g))}if((this.type==="html"||this.type==="svg")&&!this.projection&&o){this.projection=new o(this.latestValues,this.parent&&this.parent.projection);const{layoutId:a,layout:u,drag:f,dragConstraints:c,layoutScroll:d,layoutRoot:g}=n;this.projection.setOptions({layoutId:a,layout:u,alwaysMeasureLayout:!!f||c&&_n(c),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:s,layoutScroll:d,layoutRoot:g})}return l}updateFeatures(){for(const t in this.features){const n=this.features[t];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):oe()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,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<yf.length;r++){const i=yf[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const s=t["on"+i];s&&(this.propEventSubscriptions[i]=this.on(i,s))}this.prevMotionValues=b1(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}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}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<D1;r++){const i=za[r],s=this.props[i];(Xr(s)||s===!1)&&(n[i]=s)}return n}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){n!==this.values.get(t)&&(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=Jn(n,{owner:this}),this.addValue(t,r)),r}readValue(t){var n;return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(n=this.getBaseTargetFromProps(this.props,t))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,i=typeof r=="string"||typeof r=="object"?(n=Ga(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!Ae(s)?s:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new iu),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Jp extends V1{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]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:i},s){let o=qv(r,t||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),o&&(o=i(o))),s){Xv(this,r,o);const l=L1(this,r,o,n);n=l.transitionEnd,r=l.target}return{transition:t,transitionEnd:n,...r}}}function _1(e){return window.getComputedStyle(e)}class O1 extends Jp{constructor(){super(...arguments),this.type="html"}readValueFromInstance(t,n){if(kn.has(n)){const r=Ja(n);return r&&r.default||0}else{const r=_1(t),i=(zh(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return zp(t,n)}build(t,n,r,i){$a(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t,n){return Qa(t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Ae(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,i){Kh(t,n,r,i)}}class I1 extends Jp{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(kn.has(n)){const r=Ja(n);return r&&r.default||0}return n=Qh.has(n)?n:Ia(n),t.getAttribute(n)}measureInstanceViewportBox(){return oe()}scrapeMotionValuesFromProps(t,n){return Yh(t,n)}build(t,n,r,i){Ha(t,n,r,this.isSVGTag,i.transformTemplate)}renderInstance(t,n,r,i){Gh(t,n,r,i)}mount(t){this.isSVGTag=Ka(t.tagName),super.mount(t)}}const F1=(e,t)=>Ua(e)?new I1(t,{enableHardwareAcceleration:!1}):new O1(t,{enableHardwareAcceleration:!0}),z1={layout:{ProjectionNode:Yp,MeasureLayout:Up}},B1={...hx,...A0,...v1,...z1},U1=Uy((e,t)=>w0(e,t,B1,F1));function em(){const e=C.useRef(!1);return Oa(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function $1(){const e=em(),[t,n]=C.useState(0),r=C.useCallback(()=>{e.current&&n(t+1)},[t]);return[C.useCallback(()=>Q.postRender(r),[r]),t]}class W1 extends C.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 H1({children:e,isPresent:t}){const n=C.useId(),r=C.useRef(null),i=C.useRef({width:0,height:0,top:0,left:0});return C.useInsertionEffect(()=>{const{width:s,height:o,top:l,left:a}=i.current;if(t||!r.current||!s||!o)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
41
+ [data-motion-pop-id="${n}"] {
42
+ position: absolute !important;
43
+ width: ${s}px !important;
44
+ height: ${o}px !important;
45
+ top: ${l}px !important;
46
+ left: ${a}px !important;
47
+ }
48
+ `),()=>{document.head.removeChild(u)}},[t]),C.createElement(W1,{isPresent:t,childRef:r,sizeRef:i},C.cloneElement(e,{ref:r}))}const Do=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o})=>{const l=Xh(K1),a=C.useId(),u=C.useMemo(()=>({id:a,initial:t,isPresent:n,custom:i,onExitComplete:f=>{l.set(f,!0);for(const c of l.values())if(!c)return;r&&r()},register:f=>(l.set(f,!1),()=>l.delete(f))}),s?void 0:[n]);return C.useMemo(()=>{l.forEach((f,c)=>l.set(c,!1))},[n]),C.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),o==="popLayout"&&(e=C.createElement(H1,{isPresent:n},e)),C.createElement(zs.Provider,{value:u},e)};function K1(){return new Map}function Q1(e){return C.useEffect(()=>()=>e(),[])}const on=e=>e.key||"";function G1(e,t){e.forEach(n=>{const r=on(n);t.set(r,n)})}function Y1(e){const t=[];return C.Children.forEach(e,n=>{C.isValidElement(n)&&t.push(n)}),t}const X1=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:s=!0,mode:o="sync"})=>{const l=C.useContext(Ba).forceRender||$1()[0],a=em(),u=Y1(e);let f=u;const c=C.useRef(new Map).current,d=C.useRef(f),g=C.useRef(new Map).current,v=C.useRef(!0);if(Oa(()=>{v.current=!1,G1(u,g),d.current=f}),Q1(()=>{v.current=!0,g.clear(),c.clear()}),v.current)return C.createElement(C.Fragment,null,f.map(p=>C.createElement(Do,{key:on(p),isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:s,mode:o},p)));f=[...f];const x=d.current.map(on),E=u.map(on),y=x.length;for(let p=0;p<y;p++){const m=x[p];E.indexOf(m)===-1&&!c.has(m)&&c.set(m,void 0)}return o==="wait"&&c.size&&(f=[]),c.forEach((p,m)=>{if(E.indexOf(m)!==-1)return;const w=g.get(m);if(!w)return;const P=x.indexOf(m);let R=p;if(!R){const L=()=>{c.delete(m);const T=Array.from(g.keys()).filter(b=>!E.includes(b));if(T.forEach(b=>g.delete(b)),d.current=u.filter(b=>{const D=on(b);return D===m||T.includes(D)}),!c.size){if(a.current===!1)return;l(),r&&r()}};R=C.createElement(Do,{key:on(w),isPresent:!1,onExitComplete:L,custom:t,presenceAffectsLayout:s,mode:o},w),c.set(m,R)}f.splice(P,0,R)}),f=f.map(p=>{const m=p.key;return c.has(m)?p:C.createElement(Do,{key:on(p),isPresent:!0,presenceAffectsLayout:s,mode:o},p)}),C.createElement(C.Fragment,null,c.size?f:f.map(p=>C.cloneElement(p)))};/**
49
+ * @license lucide-react v0.469.0 - ISC
50
+ *
51
+ * This source code is licensed under the ISC license.
52
+ * See the LICENSE file in the root directory of this source tree.
53
+ */const Z1=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),tm=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
54
+ * @license lucide-react v0.469.0 - ISC
55
+ *
56
+ * This source code is licensed under the ISC license.
57
+ * See the LICENSE file in the root directory of this source tree.
58
+ */var q1={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"};/**
59
+ * @license lucide-react v0.469.0 - ISC
60
+ *
61
+ * This source code is licensed under the ISC license.
62
+ * See the LICENSE file in the root directory of this source tree.
63
+ */const J1=C.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:o,...l},a)=>C.createElement("svg",{ref:a,...q1,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:tm("lucide",i),...l},[...o.map(([u,f])=>C.createElement(u,f)),...Array.isArray(s)?s:[s]]));/**
64
+ * @license lucide-react v0.469.0 - ISC
65
+ *
66
+ * This source code is licensed under the ISC license.
67
+ * See the LICENSE file in the root directory of this source tree.
68
+ */const he=(e,t)=>{const n=C.forwardRef(({className:r,...i},s)=>C.createElement(J1,{ref:s,iconNode:t,className:tm(`lucide-${Z1(e)}`,r),...i}));return n.displayName=`${e}`,n};/**
69
+ * @license lucide-react v0.469.0 - ISC
70
+ *
71
+ * This source code is licensed under the ISC license.
72
+ * See the LICENSE file in the root directory of this source tree.
73
+ */const Qs=he("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
74
+ * @license lucide-react v0.469.0 - ISC
75
+ *
76
+ * This source code is licensed under the ISC license.
77
+ * See the LICENSE file in the root directory of this source tree.
78
+ */const ew=he("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"}]]);/**
79
+ * @license lucide-react v0.469.0 - ISC
80
+ *
81
+ * This source code is licensed under the ISC license.
82
+ * See the LICENSE file in the root directory of this source tree.
83
+ */const nm=he("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
84
+ * @license lucide-react v0.469.0 - ISC
85
+ *
86
+ * This source code is licensed under the ISC license.
87
+ * See the LICENSE file in the root directory of this source tree.
88
+ */const tw=he("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
89
+ * @license lucide-react v0.469.0 - ISC
90
+ *
91
+ * This source code is licensed under the ISC license.
92
+ * See the LICENSE file in the root directory of this source tree.
93
+ */const zl=he("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
94
+ * @license lucide-react v0.469.0 - ISC
95
+ *
96
+ * This source code is licensed under the ISC license.
97
+ * See the LICENSE file in the root directory of this source tree.
98
+ */const nw=he("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"}]]);/**
99
+ * @license lucide-react v0.469.0 - ISC
100
+ *
101
+ * This source code is licensed under the ISC license.
102
+ * See the LICENSE file in the root directory of this source tree.
103
+ */const rw=he("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
104
+ * @license lucide-react v0.469.0 - ISC
105
+ *
106
+ * This source code is licensed under the ISC license.
107
+ * See the LICENSE file in the root directory of this source tree.
108
+ */const iw=he("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"}]]);/**
109
+ * @license lucide-react v0.469.0 - ISC
110
+ *
111
+ * This source code is licensed under the ISC license.
112
+ * See the LICENSE file in the root directory of this source tree.
113
+ */const sw=he("LayoutList",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}],["path",{d:"M14 4h7",key:"3xa0d5"}],["path",{d:"M14 9h7",key:"1icrd9"}],["path",{d:"M14 15h7",key:"1mj8o2"}],["path",{d:"M14 20h7",key:"11slyb"}]]);/**
114
+ * @license lucide-react v0.469.0 - ISC
115
+ *
116
+ * This source code is licensed under the ISC license.
117
+ * See the LICENSE file in the root directory of this source tree.
118
+ */const ow=he("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
119
+ * @license lucide-react v0.469.0 - ISC
120
+ *
121
+ * This source code is licensed under the ISC license.
122
+ * See the LICENSE file in the root directory of this source tree.
123
+ */const lw=he("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
124
+ * @license lucide-react v0.469.0 - ISC
125
+ *
126
+ * This source code is licensed under the ISC license.
127
+ * See the LICENSE file in the root directory of this source tree.
128
+ */const aw=he("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
129
+ * @license lucide-react v0.469.0 - ISC
130
+ *
131
+ * This source code is licensed under the ISC license.
132
+ * See the LICENSE file in the root directory of this source tree.
133
+ */const uw=he("Presentation",[["path",{d:"M2 3h20",key:"91anmk"}],["path",{d:"M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3",key:"2k9sn8"}],["path",{d:"m7 21 5-5 5 5",key:"bip4we"}]]);/**
134
+ * @license lucide-react v0.469.0 - ISC
135
+ *
136
+ * This source code is licensed under the ISC license.
137
+ * See the LICENSE file in the root directory of this source tree.
138
+ */const rm=he("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
139
+ * @license lucide-react v0.469.0 - ISC
140
+ *
141
+ * This source code is licensed under the ISC license.
142
+ * See the LICENSE file in the root directory of this source tree.
143
+ */const cw=he("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"}]]);/**
144
+ * @license lucide-react v0.469.0 - ISC
145
+ *
146
+ * This source code is licensed under the ISC license.
147
+ * See the LICENSE file in the root directory of this source tree.
148
+ */const fw=he("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
149
+ * @license lucide-react v0.469.0 - ISC
150
+ *
151
+ * This source code is licensed under the ISC license.
152
+ * See the LICENSE file in the root directory of this source tree.
153
+ */const Bl=he("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
154
+ * @license lucide-react v0.469.0 - ISC
155
+ *
156
+ * This source code is licensed under the ISC license.
157
+ * See the LICENSE file in the root directory of this source tree.
158
+ */const dw=he("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function im({text:e,label:t="Copy",disabled:n=!1}){const[r,i]=C.useState(!1),s=o=>{if(o.stopPropagation(),n)return;const l=typeof e=="string"?e:JSON.stringify(e,null,2);navigator.clipboard.writeText(l),i(!0),setTimeout(()=>i(!1),2e3)};return h.jsx("button",{onClick:s,className:`tooltip p-2 rounded-full text-subtle transition-colors ${n?"opacity-30 cursor-not-allowed":"hover:bg-black/5 dark:hover:bg-white/10"}`,"data-tooltip":t,"aria-label":t,disabled:n,children:r?h.jsx(nm,{className:"w-4 h-4"}):h.jsx(iw,{className:"w-4 h-4"})})}const hw=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Ri=(e,t)=>{const n=String(e??""),r=(t||"").trim();if(!r)return n;const i=new RegExp(hw(r),"gi"),s=n.match(i);if(!s)return n;const o=n.split(i),l=[];return o.forEach((a,u)=>{l.push(a),u<s.length&&l.push(h.jsx("mark",{className:"rounded bg-black/10 dark:bg-white/20 px-1",children:s[u]},`mark-${u}`))}),l};function Li({className:e=""}){return h.jsx("div",{className:`mx-auto w-14 h-14 rounded-full border border-black dark:border-white flex items-center justify-center ${e}`,"aria-hidden":"true",children:h.jsx(Qs,{className:"w-7 h-7"})})}function vf({children:e}){return h.jsx("pre",{className:"text-xs sm:text-sm font-mono leading-relaxed whitespace-pre-wrap break-words overflow-auto max-h-[60vh] p-6 rounded-[24px] border border-black bg-black text-white/90 dark:border-white dark:bg-white dark:text-black/90",children:e})}function Ul({children:e}){return h.jsx("div",{className:"rounded-[24px] border border-black/10 dark:border-white/10 bg-black/[0.02] dark:bg-white/[0.04] p-6 text-base sm:text-lg leading-relaxed whitespace-pre-wrap break-words text-black/80 dark:text-white/80",children:e})}function pr({as:e="div",className:t="",children:n}){return h.jsx(e,{className:`border-t border-black/10 dark:border-white/10 p-6 ${t}`,children:n})}function pw({open:e,onToggle:t}){return h.jsx("button",{type:"button",onClick:t,className:"px-3 py-1 rounded-full text-[10px] font-bold tracking-[0.2em] uppercase border border-black/20 dark:border-white/20 text-black/60 dark:text-white/60 hover:text-black dark:hover:text-white hover:border-black/40 dark:hover:border-white/40 transition-colors","aria-pressed":e,"aria-label":e?"Hide raw event JSON":"Show raw event JSON",children:"Raw"})}const mw=e=>e==null?h.jsx("span",{className:"italic",children:"—"}):typeof e=="string"?e.length>140||e.includes(`
159
+ `)?h.jsx(Ul,{children:e}):h.jsx("span",{className:"text-lg sm:text-xl font-semibold whitespace-pre-wrap break-words",children:e}):typeof e=="object"?h.jsx("pre",{className:"raw-json-block raw-json-block--full",children:sm(e)}):h.jsx("span",{className:"text-lg sm:text-xl font-semibold break-words",children:String(e)});function sm(e){const t=JSON.stringify(e,null,2),n=/("(?:\\u[a-fA-F0-9]{4}|\\[^u]|[^\\"])*"(?:\s*:)?|\btrue\b|\bfalse\b|\bnull\b|-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)/g,r=[];let i=0,s;for(;(s=n.exec(t))!==null;){const{index:o}=s;o>i&&r.push(t.slice(i,o));const l=s[0];let a="json-token-number";l.startsWith('"')?a=l.endsWith(":")?"json-token-key":"json-token-string":l==="true"||l==="false"?a="json-token-boolean":l==="null"&&(a="json-token-null"),r.push(h.jsx("span",{className:a,children:l},`json-${o}`)),i=o+l.length}return i<t.length&&r.push(t.slice(i)),r}function gw({item:e,promptSearchRequestId:t=0}){if(!e)return null;const n=new Date(e.timestamp).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"}),[r,i]=C.useState(""),[s,o]=C.useState(!1),[l,a]=C.useState(!1),f=(e.event==="PROMPT_REQUESTED"||e.event==="INTERACTION_REQUESTED")&&!!e.fullAuto,c=e.type||"text",d=e.options||[],g=e.autoSelectDelay??20,v=f&&c==="choice"&&d.length>0,[x,E]=C.useState(0),y=(()=>{if(!v)return null;const S=new Date(e.timestamp).getTime(),k=Math.floor((Date.now()-S)/1e3);return g-k})();C.useEffect(()=>{if(!v)return;const S=setInterval(()=>{E(k=>k+1)},1e3);return()=>clearInterval(S)},[v,e.timestamp]);const p=S=>S.replace(/_/g," ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/\b\w/g,N=>N.toUpperCase()),m=S=>{try{return JSON.parse(S)}catch{return null}},w=S=>{const k=S.trim(),N=m(k);if(N!==null)return N;const A=/```(?:json)?\s*([\s\S]*?)\s*```/gi;let M=A.exec(k);for(;M;){const _=M[1].trim(),$=m(_);if($!==null)return $;M=A.exec(k)}return null},P=S=>{const k=String(S??"").trim();return k?Math.max(1,Math.round(k.length/4)):0},R=S=>S?S>=1e6?`${(S/1e6).toFixed(1).replace(/\.0$/,"")}M tokens`:S>=1e4?`${Math.round(S/1e3)}k tokens`:S>=1e3?`${(S/1e3).toFixed(1).replace(/\.0$/,"")}k tokens`:`${S} tokens`:"0 tokens",L=S=>{if(typeof S!="string"||!S.trim())return{cleanedPrompt:"",contextTitle:null,contextData:null,contextRaw:""};const N=/(^|\n)(?:#+\s*)?(Current\s+)?Context\s*\n+```json\s*([\s\S]*?)\s*```/i.exec(S);if(!N)return{cleanedPrompt:S,contextTitle:null,contextData:null,contextRaw:""};const A=N[2]?"Current Context":"Context",M=(N[3]||"").trim(),_=m(M),$=S.slice(0,N.index),se=S.slice(N.index+N[0].length);return{cleanedPrompt:`${$}
160
+
161
+ ${se}`.replace(/\n{3,}/g,`
162
+
163
+ `).trim(),contextTitle:A,contextData:_??M,contextRaw:M}},T=S=>{if(typeof S!="string"||!S.trim())return[];const k=S.split(/\r?\n/),N=[];let A=null,M=!1;const _=()=>{if(!A)return;const $=A.content.join(`
164
+ `).replace(/\n{3,}/g,`
165
+
166
+ `).trim();if(!$){A=null;return}N.push({title:A.title||"Prompt",content:$}),A=null};return k.forEach($=>{const se=$.trim();if(/^```/.test(se)&&(M=!M),!se){A&&A.content.push("");return}if(!M&&/^---+$/.test(se)){_();return}const Ve=M?null:/^(#{1,6})\s+(.+)$/.exec(se);if(Ve){_(),A={title:Ve[2].trim(),content:[]};return}A||(A={title:"Prompt",content:[]}),A.content.push($)}),_(),N},b=(S,k)=>S?S.includes("```")?h.jsx(pr,{as:"pre",className:"text-xs sm:text-sm font-mono leading-relaxed whitespace-pre-wrap break-words overflow-auto max-h-[60vh] text-black/90 dark:text-white/90",children:Ri(S,k)}):h.jsx(pr,{className:"text-base sm:text-lg leading-relaxed whitespace-pre-wrap break-words text-black/80 dark:text-white/80",children:Ri(S,k)}):h.jsx(pr,{className:"italic text-black/40 dark:text-white/40",children:"—"}),D=S=>{if(S==null)return h.jsx("span",{className:"italic",children:"—"});if(typeof S=="boolean"){const k="inline-flex items-center rounded-full px-3 py-1 text-[11px] font-semibold tracking-[0.16em] uppercase border";return S?h.jsx("span",{className:`${k} bg-black text-white border-black dark:bg-white dark:text-black dark:border-white`,children:"Yes"}):h.jsx("span",{className:`${k} bg-white text-black border-black dark:bg-black dark:text-white dark:border-white`,children:"No"})}if(typeof S=="string"){const k=w(S);return k!==null?H(k):S.length>140||S.includes(`
167
+ `)?h.jsx(Ul,{children:S}):h.jsx("span",{className:"text-lg sm:text-xl font-semibold whitespace-pre-wrap break-words",children:S})}return typeof S=="object"?h.jsx(vf,{children:JSON.stringify(S,null,2)}):h.jsx("span",{className:"text-lg sm:text-xl font-semibold break-words",children:String(S)})},B=6;function U(S,k){if(!S.length)return h.jsx("span",{className:"italic",children:"—"});const N=S.every(_=>_===null||["string","number","boolean"].includes(typeof _)),M=S.every(_=>_&&typeof _=="object"&&!Array.isArray(_))&&S.every(_=>Object.values(_).every($=>$===null||["string","number","boolean"].includes(typeof $)));return N?h.jsx("div",{className:"space-y-3",children:S.map((_,$)=>h.jsx("div",{className:"text-base sm:text-lg",children:D(_)},`item-${$}`))}):M?h.jsx("div",{className:"space-y-4",children:S.map((_,$)=>h.jsx("div",{className:"rounded-[20px] border border-black/10 dark:border-white/10 bg-black/[0.02] dark:bg-white/[0.04] p-4",children:De(Object.entries(_),k)},`item-${$}`))}):h.jsx("div",{className:"space-y-6",children:S.map((_,$)=>h.jsxs("div",{className:"space-y-4 rounded-[24px] border border-black/10 dark:border-white/10 bg-black/[0.02] dark:bg-white/[0.04] p-5",children:[h.jsxs("div",{className:"text-[11px] font-semibold tracking-[0.24em] uppercase text-black/50 dark:text-white/50",children:["Item ",$+1]}),H(_,k+1)]},`item-${$}`))})}function ne(S,k){const N=Object.entries(S);return N.length?k>=B?D(S):De(N,k):h.jsx("span",{className:"italic",children:"—"})}function H(S,k=0){return S==null||typeof S=="string"||typeof S=="number"||typeof S=="boolean"?D(S):Array.isArray(S)?U(S,k):typeof S=="object"?ne(S,k):D(S)}function De(S,k=0){return h.jsx("div",{className:"space-y-6",children:S.map(([N,A])=>h.jsxs("div",{className:"grid gap-2 sm:grid-cols-[160px_1fr] sm:items-start min-w-0",children:[h.jsx("div",{className:"text-xs font-semibold text-black/50 dark:text-white/50 break-words",children:p(N)}),h.jsx("div",{className:"text-base sm:text-lg leading-relaxed break-words min-w-0",children:H(A,k+1)})]},N))})}let F=null;if(C.useEffect(()=>{t>0&&a(!0)},[t]),e.event==="AGENT_STARTED"){const{cleanedPrompt:S,contextTitle:k,contextData:N,contextRaw:A}=L(e.prompt||""),M=T(S),_=r.trim(),$=_.toLowerCase(),se=_?M.filter(ae=>`${ae.title}
168
+ ${ae.content}`.toLowerCase().includes($)):[],Ve=M.length?`${M.length} sections`:null,Se=P(A||""),it=A?`~${R(Se)}`:"";F=h.jsxs("div",{className:"space-y-10 py-6",children:[h.jsxs("div",{className:"space-y-3 text-center",children:[h.jsx(Li,{}),h.jsxs("div",{className:"space-y-1",children:[h.jsx("div",{className:"text-[11px] font-semibold tracking-[0.28em] uppercase text-black/50 dark:text-white/50",children:"Agent started"}),h.jsx("h2",{className:"text-3xl sm:text-4xl font-black tracking-tight",children:e.agent})]})]}),k&&N!==null&&h.jsxs("details",{className:"group rounded-[24px] border border-black/10 dark:border-white/10 bg-black/[0.02] dark:bg-white/[0.04]",children:[h.jsxs("summary",{className:"cursor-pointer select-none px-6 py-5 flex items-center justify-between gap-6 [&::-webkit-details-marker]:hidden",children:[h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx(zl,{className:"w-4 h-4 transition-transform group-open:rotate-90"}),k==="Current Context"?h.jsx(ew,{className:"w-4 h-4","aria-hidden":"true"}):null,h.jsx("div",{className:"text-[11px] font-semibold tracking-[0.24em] uppercase text-black/60 dark:text-white/60",children:k})]}),it?h.jsx("div",{className:"text-xs font-mono text-black/50 dark:text-white/50",children:it}):null]}),typeof N=="string"?h.jsx(pr,{className:"text-base sm:text-lg leading-relaxed whitespace-pre-wrap break-words text-black/80 dark:text-white/80",children:N}):h.jsx(pr,{children:H(N)})]}),h.jsxs("div",{className:"space-y-4",children:[h.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[h.jsx("div",{className:"text-[11px] font-semibold tracking-[0.24em] uppercase text-black/50 dark:text-white/50",children:"Prompt"}),Ve?h.jsx("div",{className:"text-xs font-mono text-black/40 dark:text-white/40",children:Ve}):null]}),h.jsx("div",{className:"space-y-4",children:M.length>0?M.map((ae,Nt)=>{const ft=/(^| )instructions$/i.test(ae.title.trim()),dt=Nt===0||ft,Gs=ae.content?ae.content.split(/\r?\n/).length:0;return h.jsxs("details",{open:dt,className:"group rounded-[24px] border border-black/10 dark:border-white/10 bg-black/[0.02] dark:bg-white/[0.04]",children:[h.jsxs("summary",{className:"cursor-pointer select-none px-6 py-5 flex items-center justify-between gap-6 [&::-webkit-details-marker]:hidden",children:[h.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[h.jsx(zl,{className:"w-4 h-4 transition-transform group-open:rotate-90"}),h.jsx("div",{className:"text-[11px] font-semibold tracking-[0.24em] uppercase text-black/60 dark:text-white/60 break-words",children:ae.title||"Prompt"})]}),Gs?h.jsxs("div",{className:"text-xs font-mono text-black/40 dark:text-white/40",children:[Gs," lines"]}):null]}),b(ae.content,"")]},`${ae.title}-${Nt}`)}):h.jsx(Ul,{children:S})})]}),l?h.jsx("div",{className:"fixed inset-0 z-40 bg-white text-black dark:bg-black dark:text-white",children:h.jsx("div",{className:"h-full w-full overflow-y-auto custom-scroll px-6 sm:px-10 py-10",children:h.jsxs("div",{className:"max-w-3xl mx-auto space-y-8",children:[h.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-4",children:[h.jsx("div",{className:"text-[11px] font-semibold tracking-[0.32em] uppercase text-black/50 dark:text-white/50",children:"Prompt search"}),h.jsx("button",{type:"button",onClick:()=>a(!1),className:"text-[10px] font-bold tracking-[0.2em] uppercase text-black/60 hover:text-black dark:text-white/60 dark:hover:text-white",children:"Close"})]}),h.jsxs("div",{className:"relative",children:[h.jsx(rm,{className:"w-4 h-4 text-black/50 dark:text-white/60 absolute left-4 top-1/2 -translate-y-1/2"}),h.jsx("input",{value:r,onChange:ae=>i(ae.target.value),placeholder:"Search the prompt...",className:"w-full rounded-full border border-black/20 dark:border-white/20 bg-transparent py-4 pl-11 pr-10 text-base text-black dark:text-white placeholder:text-black/40 dark:placeholder:text-white/40 focus:outline-none focus:ring-1 focus:ring-black/30 dark:focus:ring-white/40",autoFocus:!0}),_?h.jsx("button",{type:"button",onClick:()=>i(""),"aria-label":"Clear prompt search",className:"absolute right-3 top-1/2 -translate-y-1/2 rounded-full p-1 text-black/60 hover:text-black dark:text-white/60 dark:hover:text-white",children:h.jsx(dw,{className:"w-3.5 h-3.5"})}):null]}),_?se.length>0?h.jsx("div",{className:"space-y-4",children:se.map((ae,Nt)=>{const ft=ae.content?ae.content.split(/\r?\n/).length:0;return h.jsxs("div",{className:"rounded-[22px] border border-black/10 dark:border-white/15 bg-black/[0.02] dark:bg-white/5 overflow-hidden",children:[h.jsxs("div",{className:"px-5 py-4 flex items-center justify-between gap-4",children:[h.jsx("div",{className:"text-[11px] font-semibold tracking-[0.24em] uppercase text-black/70 dark:text-white/70 break-words",children:Ri(ae.title||"Prompt",_)}),ft?h.jsxs("div",{className:"text-xs font-mono text-black/50 dark:text-white/50",children:[ft," lines"]}):null]}),h.jsx("div",{className:"border-t border-black/10 dark:border-white/10 p-5",children:h.jsx("pre",{className:"m-0 text-xs sm:text-sm font-mono leading-relaxed whitespace-pre-wrap break-words text-black/85 dark:text-white/85",children:Ri(ae.content||"",_)})})]},`${ae.title}-${Nt}`)})}):h.jsxs("div",{className:"rounded-[20px] border border-black/10 dark:border-white/10 bg-black/[0.02] dark:bg-white/5 p-5 text-sm text-black/60 dark:text-white/60",children:['No prompt sections match "',_,'".']}):h.jsx("div",{className:"text-sm text-black/50 dark:text-white/50",children:"Start typing to filter prompt sections."})]})})}):null]})}else if(e.event&&e.event.startsWith("WORKFLOW_")){const S=e.event.replace("WORKFLOW_","");F=h.jsxs("div",{className:"min-h-[50vh] flex flex-col items-center justify-center text-center space-y-8 py-16",children:[h.jsx("div",{className:"text-[10px] font-semibold tracking-[0.4em] uppercase text-black/50 dark:text-white/50",children:"Lifecycle status"}),h.jsxs("div",{className:"w-full max-w-5xl rounded-[28px] border border-black/10 dark:border-white/10 bg-black/[0.02] dark:bg-white/[0.04] p-10",children:[h.jsx("h2",{className:"text-4xl sm:text-6xl md:text-7xl font-black tracking-tighter leading-none uppercase",children:S}),e.error&&h.jsx("div",{className:"mt-6",children:h.jsx(vf,{children:e.error})})]})]})}else if(e.event==="PROMPT_REQUESTED"||e.event==="INTERACTION_REQUESTED"){const k=e.event==="INTERACTION_REQUESTED"?"Interaction needed":"Question asked",N=e.question||e.prompt||"Prompt",A=e.agent||e.slug||"Agent";F=h.jsxs("div",{className:"py-10 sm:py-14 space-y-8",children:[h.jsxs("div",{className:"text-center space-y-4",children:[h.jsx(Li,{className:"w-12 h-12"}),h.jsx("div",{className:"text-[11px] font-semibold tracking-[0.32em] uppercase text-black/50 dark:text-white/50",children:k}),h.jsxs("div",{className:"text-lg sm:text-xl font-semibold text-black/70 dark:text-white/70",children:[A," needs your input"]})]}),h.jsx("div",{className:"text-3xl sm:text-4xl md:text-5xl font-black tracking-tight leading-tight text-center text-balance",children:N}),v&&y!==null&&h.jsx("div",{className:"text-center",children:h.jsxs("div",{className:`inline-flex items-center gap-2 px-4 py-2 rounded-full ${y>0?"bg-black/5 dark:bg-white/10":"bg-black text-white dark:bg-white dark:text-black"}`,children:[h.jsx("span",{className:"text-xl",children:"⚡"}),h.jsx("span",{className:`text-sm font-semibold ${y>0?"text-black/70 dark:text-white/70":""}`,children:y>0?`Agent deciding in ${y}s...`:"Auto-selected"})]})}),c==="choice"&&d.length>0&&h.jsxs("div",{className:"space-y-3 max-w-2xl mx-auto",children:[h.jsx("div",{className:"text-[11px] font-semibold tracking-[0.24em] uppercase text-black/50 dark:text-white/50 text-center",children:"Options"}),h.jsx("div",{className:"space-y-2",children:d.map((M,_)=>h.jsxs("div",{className:`p-4 rounded-2xl border transition-all ${_===0?"border-black bg-black text-white dark:border-white dark:bg-white dark:text-black":"border-black/10 dark:border-white/10 bg-black/[0.02] dark:bg-white/[0.03]"}`,children:[h.jsx("div",{className:"flex items-center gap-3",children:h.jsxs("div",{className:`font-bold ${_===0?"":"text-black dark:text-white"}`,children:[M.label||M.key,_===0&&h.jsx("span",{className:"ml-2 text-xs font-medium px-2 py-0.5 rounded-full bg-white/20 dark:bg-black/20",children:"Recommended"})]})}),M.description&&h.jsx("div",{className:`text-sm mt-1 ${_===0?"text-white/70 dark:text-black/70":"text-black/50 dark:text-white/50"}`,children:M.description})]},M.key||_))}),e.allowCustom&&h.jsx("div",{className:"text-xs text-center text-black/40 dark:text-white/40 mt-2",children:"Custom response allowed"})]})]})}else if(e.event==="INTERACTION_AUTO_RESOLVED"||e.event==="PROMPT_AUTO_ANSWERED"){const S=e.autoSelected||"Unknown",k=e.agent||e.slug||"Agent";F=h.jsxs("div",{className:"space-y-8 py-6",children:[h.jsxs("div",{className:"space-y-4 text-center",children:[h.jsx("div",{className:"mx-auto w-14 h-14 rounded-full border-2 border-black dark:border-white bg-black dark:bg-white flex items-center justify-center",children:h.jsx("span",{className:"text-2xl",children:"⚡"})}),h.jsx("div",{className:"text-[11px] font-semibold tracking-[0.24em] uppercase text-black/50 dark:text-white/50",children:"Auto-selected"}),h.jsxs("div",{className:"text-lg sm:text-xl font-semibold text-black/70 dark:text-white/70",children:[k," decided automatically"]})]}),h.jsx("div",{className:"rounded-[24px] border-2 border-black bg-black text-white dark:border-white dark:bg-white dark:text-black p-6 text-center max-w-md mx-auto",children:h.jsx("div",{className:"text-2xl sm:text-3xl font-black tracking-tight",children:S})})]})}else if(e.event==="INTERACTION_RESOLVED"){const S=e.source==="remote"?"Remote response received.":"Response captured.",k=e.source==="remote"?"Received from remote":e.source?`Received from ${e.source}`:"Received",N=e.agent||e.slug||"Agent";F=h.jsxs("div",{className:"space-y-8 py-6",children:[h.jsxs("div",{className:"space-y-4 text-center",children:[h.jsx(Li,{className:"w-12 h-12"}),h.jsx("div",{className:"text-[11px] font-semibold tracking-[0.24em] uppercase text-black/50 dark:text-white/50",children:"Interaction resolved"}),h.jsxs("div",{className:"text-lg sm:text-xl font-semibold text-black/70 dark:text-white/70",children:[N," received your response"]})]}),h.jsxs("div",{className:"rounded-[24px] border border-black/10 dark:border-white/10 bg-black/[0.02] dark:bg-white/[0.04] p-6 text-center",children:[h.jsx("div",{className:"text-xl sm:text-2xl font-semibold leading-relaxed text-balance",children:S}),h.jsx("div",{className:"mt-3 text-sm text-black/60 dark:text-white/60",children:k})]})]})}else if(e.event==="PROMPT_ANSWERED"||e.event==="INTERACTION_SUBMITTED"){const S=e.answer!==void 0?e.answer:e.response;F=h.jsx("div",{className:"space-y-8 py-6",children:h.jsxs("div",{className:"space-y-3",children:[h.jsx("div",{className:"text-[11px] font-semibold tracking-[0.24em] uppercase text-black/50 dark:text-white/50",children:"Response sent"}),mw(S)]})})}else if(e.event==="AGENT_COMPLETED")F=h.jsxs("div",{className:"space-y-10 py-6",children:[h.jsxs("div",{className:"rounded-[28px] border border-black/10 dark:border-white/10 bg-black/[0.02] dark:bg-white/[0.04] p-6 sm:p-8 text-center space-y-4",children:[h.jsx(Li,{className:"w-12 h-12"}),h.jsx("div",{className:"text-[11px] font-semibold tracking-[0.24em] uppercase text-black/50 dark:text-white/50",children:"Agent completed"}),h.jsx("div",{className:"text-2xl sm:text-3xl font-black tracking-tight",children:e.agent||"Agent"}),typeof e.attempts=="number"?h.jsxs("div",{className:"text-sm text-black/60 dark:text-white/60",children:[e.attempts," ",e.attempts===1?"attempt":"attempts"]}):null]}),e.output!==void 0?h.jsxs("div",{className:"space-y-4",children:[h.jsx("div",{className:"text-[11px] font-semibold tracking-[0.24em] uppercase text-black/50 dark:text-white/50",children:"Answer"}),h.jsx("div",{className:"rounded-[24px] border border-black/10 dark:border-white/10 bg-black/[0.02] dark:bg-white/[0.04] p-6",children:H(e.output)})]}):null]});else{const S=Object.entries(e).filter(([k])=>k!=="event"&&k!=="timestamp");F=h.jsx("div",{className:"space-y-6 py-6",children:h.jsxs("div",{className:"rounded-[24px] border border-black/10 dark:border-white/10 bg-black/[0.02] dark:bg-white/[0.04] p-6",children:[h.jsx("div",{className:"text-lg sm:text-xl font-semibold leading-relaxed text-balance",children:e.event?e.event.replace(/_/g," "):"Event"}),h.jsx("div",{className:"mt-3 text-sm text-black/60 dark:text-white/60",children:S.length>0?"Open Raw for full details.":"Open Raw for more info."})]})})}return h.jsx("div",{className:"w-full h-full flex flex-col overflow-y-auto custom-scroll px-6 sm:px-10 lg:px-12 bg-white text-black dark:bg-black dark:text-white",children:h.jsxs("div",{className:"content-width flex-1",children:[h.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-4 pt-8 sm:pt-10 pb-6 border-b border-black/10 dark:border-white/10",children:[h.jsx("div",{className:"text-xs font-mono text-black/50 dark:text-white/50",children:n}),h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx(pw,{open:s,onToggle:()=>o(S=>!S)}),h.jsx(im,{text:e})]})]}),s?h.jsx("pre",{className:"raw-json-block",children:sm(e)}):F]})})}const yw=e=>{const t="w-3.5 h-3.5 text-black/70 dark:text-white/70";if(!e)return h.jsx(Bl,{className:`${t} opacity-40`});const n=e.toUpperCase();return n.includes("STARTED")||n.includes("START")?h.jsx(aw,{className:`${t} opacity-70`}):n.includes("SUBMITTED")||n.includes("ANSWERED")||n.includes("SUCCESS")||n.includes("RESOLVED")?h.jsx(rw,{className:`${t} opacity-80`}):n.includes("REQUESTED")||n.includes("REQUEST")?h.jsx(cw,{className:`${t} opacity-60`}):n.includes("ERROR")||n.includes("FAILED")?h.jsx(nw,{className:`${t} opacity-90`}):h.jsx(Bl,{className:`${t} opacity-40`})},vw=e=>{const t=e.question||e.answer||e.prompt||e.error||e.status||e.message,n=e.slug||(e.event&&e.event.startsWith("WORKFLOW_")?e.event.replace("WORKFLOW_",""):null);return!t&&!n?e.event||"Unknown Event":h.jsxs("div",{className:"flex flex-col gap-0.5",children:[n&&h.jsx("span",{className:"text-black/60 dark:text-white/60 font-medium text-[10px] tracking-[0.24em] uppercase",children:n}),t&&h.jsx("span",{className:"opacity-70 truncate max-w-md",children:typeof t=="string"?t:JSON.stringify(t)})]})};function xw({history:e,onJump:t}){return h.jsx("div",{className:"w-full h-full flex flex-col overflow-hidden bg-bg",children:h.jsx("div",{className:"flex-1 overflow-y-auto custom-scroll px-6 sm:px-8 lg:px-10 py-20",children:h.jsx("div",{className:"max-w-4xl mx-auto space-y-1",children:e.length===0?h.jsxs("div",{className:"h-[40vh] flex flex-col items-center justify-center opacity-20 space-y-4",children:[h.jsx(Bl,{className:"w-12 h-12"}),h.jsx("div",{className:"text-xs font-bold tracking-[0.4em] uppercase",children:"No events yet"})]}):e.map((n,r)=>{var s;const i=new Date(n.timestamp).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1});return h.jsxs("button",{onClick:()=>t(r),className:"w-full text-left group flex items-start gap-6 p-5 rounded-2xl transition-all border border-black/10 dark:border-white/10 hover:bg-black/[0.03] dark:hover:bg-white/[0.04]",children:[h.jsx("div",{className:"flex-shrink-0 w-20 pt-1",children:h.jsx("span",{className:"text-[10px] font-mono font-medium opacity-30 group-hover:opacity-60 transition-opacity",children:i})}),h.jsx("div",{className:"flex-shrink-0 pt-0.5",children:yw(n.event)}),h.jsxs("div",{className:"flex-1 min-w-0 flex flex-col gap-1",children:[h.jsx("div",{className:"text-[10px] font-semibold tracking-[0.28em] uppercase opacity-40 group-hover:opacity-70 transition-opacity",children:((s=n.event)==null?void 0:s.replace(/_/g," "))||"EVENT"}),h.jsx("div",{className:"text-sm leading-relaxed truncate group-hover:text-black dark:group-hover:text-white transition-colors",children:vw(n)})]})]},r)})})})})}function ww({page:e,total:t,onNext:n,onPrev:r,onJump:i,hasNew:s,onJumpToLatest:o,className:l="",leftSlot:a=null}){const[u,f]=C.useState(e+1);C.useEffect(()=>f(e+1),[e]);const c=d=>{const{value:g}=d.target;f(g);const v=parseInt(g,10);!Number.isNaN(v)&&v>=1&&v<=t&&i(v-1)};return h.jsxs("footer",{className:`nav-footer transition-opacity duration-300 ${l}`,children:[a?h.jsx("div",{className:"fixed bottom-6 left-2 sm:left-4 z-40",children:a}):null,h.jsxs("div",{className:"footer-control",children:[h.jsx("button",{onClick:r,disabled:e===0,className:"tooltip p-1 hover:text-black dark:hover:text-white disabled:opacity-0 transition-all pointer-events-auto","data-tooltip":"Previous","aria-label":"Previous event",children:h.jsx(tw,{className:"w-5 h-5"})}),h.jsxs("div",{className:"flex items-center gap-2 text-xs font-mono font-bold tracking-widest opacity-60",children:[h.jsx("input",{type:"number",value:u,onChange:c,className:"jumper-input",min:"1",max:t}),h.jsx("span",{className:"opacity-20",children:"/"}),h.jsx("span",{children:t})]}),h.jsx("button",{onClick:n,disabled:e===t-1,className:"tooltip p-1 hover:text-black dark:hover:text-white disabled:opacity-0 transition-all pointer-events-auto","data-tooltip":"Next","aria-label":"Next event",children:h.jsx(zl,{className:"w-5 h-5"})}),s?h.jsx("button",{onClick:o,className:"tooltip px-3 py-1 rounded-full text-[10px] font-bold tracking-[0.2em] uppercase bg-black text-white dark:bg-white dark:text-black shadow-[0_10px_30px_rgba(0,0,0,0.2)] dark:shadow-[0_10px_30px_rgba(255,255,255,0.1)] hover:scale-[1.02] transition-transform","data-tooltip":"Latest","aria-label":"Jump to latest event",children:"New"}):null]})]})}function kw({workflowName:e,status:t,theme:n,toggleTheme:r,viewMode:i,setViewMode:s,history:o}){return h.jsxs("header",{className:"fixed top-0 inset-x-0 h-20 px-6 sm:px-10 lg:px-12 flex items-center justify-between z-50 bg-bg/80 backdrop-blur-3xl",children:[h.jsxs("div",{className:"flex items-center gap-4",children:[h.jsx("div",{className:`w-2.5 h-2.5 rounded-full border ${t==="connected"?"bg-black border-black dark:bg-white dark:border-white":"bg-transparent border-black/30 dark:border-white/30"}`,"aria-hidden":"true"}),h.jsx("span",{className:"font-semibold text-[10px] tracking-[0.32em] uppercase text-black/50 dark:text-white/50 truncate max-w-[300px]",children:e||"Workflow"})]}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(im,{text:o||[],label:"Copy full history",disabled:!o||o.length===0}),h.jsx("button",{onClick:()=>s(i==="present"?"log":"present"),className:"tooltip w-10 h-10 flex items-center justify-center rounded-full hover:bg-black/5 dark:hover:bg-white/10 transition-colors","data-tooltip":i==="present"?"Log view":"Present view","aria-label":i==="present"?"Switch to Log view":"Switch to Presentation view",children:i==="present"?h.jsx(sw,{className:"w-5 h-5 opacity-40 hover:opacity-100"}):h.jsx(uw,{className:"w-5 h-5 opacity-40 hover:opacity-100"})}),h.jsx("button",{onClick:r,className:"tooltip w-10 h-10 flex items-center justify-center rounded-full hover:bg-black/5 dark:hover:bg-white/10 transition-colors","data-tooltip":n==="dark"?"Light theme":"Dark theme","aria-label":n==="dark"?"Switch to Light theme":"Switch to Dark theme",children:n==="dark"?h.jsx(fw,{className:"w-5 h-5 opacity-40 hover:opacity-100"}):h.jsx(lw,{className:"w-5 h-5 opacity-40 hover:opacity-100"})})]})]})}function Sw({interaction:e,onSubmit:t,disabled:n}){const{prompt:r,question:i,options:s=[],multiSelect:o,allowCustom:l,fullAuto:a,autoSelectDelay:u=20,timestamp:f}=e,[c,d]=C.useState(o?[]:null),[g,v]=C.useState(""),[x,E]=C.useState(!1),[y,p]=C.useState(0),m=C.useMemo(()=>s||[],[s]),w=r||i||"Choose an option.",P=C.useMemo(()=>{if(!a||!f)return null;const b=new Date(f).getTime(),D=Math.floor((Date.now()-b)/1e3);return u-D},[a,f,u,y]);C.useEffect(()=>{if(!a)return;const b=setInterval(()=>p(D=>D+1),1e3);return()=>clearInterval(b)},[a]);const R=b=>{o?(d(D=>D.includes(b)?D.filter(B=>B!==b):[...D,b]),E(!1)):(d(b),E(!1))},L=()=>{if(x&&g.trim()){t({isCustom:!0,customText:g.trim(),raw:g.trim()});return}if(o&&c.length>0){t({selectedKeys:c,raw:c.join(", ")});return}c&&t({selectedKey:c,raw:String(c)})},T=x?!!g.trim():o?c.length>0:!!c;return h.jsxs("div",{className:"w-full h-full flex flex-col items-stretch overflow-hidden",children:[h.jsxs("div",{className:"flex-1 overflow-y-auto custom-scroll px-6 py-12 space-y-8 flex flex-col items-center",children:[h.jsxs("div",{className:"space-y-4 shrink-0",children:[h.jsx("div",{className:"w-16 h-16 rounded-3xl bg-black text-white dark:bg-white dark:text-black flex items-center justify-center mx-auto shadow-2xl shadow-black/20 dark:shadow-white/10",children:h.jsx(Qs,{className:"w-8 h-8"})}),h.jsx("h3",{className:"text-3xl sm:text-4xl font-extrabold tracking-tight text-fg pt-4 text-center",children:"Choose an option."})]}),h.jsx("div",{className:"text-lg sm:text-xl font-medium text-fg/70 text-center max-w-2xl whitespace-pre-wrap break-words",children:w}),a&&P!==null&&h.jsx("div",{className:"text-center",children:h.jsxs("div",{className:`inline-flex items-center gap-2 px-4 py-2 rounded-full ${P>0?"bg-yellow-500 text-black animate-pulse":"bg-black text-white dark:bg-white dark:text-black"}`,children:[h.jsx("span",{className:"text-xl",children:"⚡"}),h.jsx("span",{className:"text-sm font-bold",children:P>0?`Agent deciding in ${P}s...`:"Auto-selecting recommended option..."})]})}),h.jsxs("div",{className:"w-full max-w-2xl space-y-3",children:[m.map((b,D)=>{const B=o?c.includes(b.key):c===b.key,U=B?"text-white dark:text-black":"text-black dark:text-white",ne=B?"text-white/70 dark:text-black/70":"text-black/50 dark:text-white/50";return h.jsx("button",{onClick:()=>R(b.key),disabled:n,type:"button",className:`w-full p-6 rounded-2xl border-2 transition-all text-left ${B?"border-black bg-black text-white dark:border-white dark:bg-white dark:text-black":"border-black/10 dark:border-white/10 hover:border-black/30 dark:hover:border-white/30 bg-black/[0.02] dark:bg-white/[0.03]"}`,children:h.jsxs("div",{className:"flex items-center gap-4",children:[h.jsx("div",{className:`w-6 h-6 rounded-full border-2 flex items-center justify-center ${B?"border-black bg-black text-white dark:border-white dark:bg-white dark:text-black":"border-black/30 dark:border-white/30"}`,children:B&&h.jsx(nm,{className:"w-4 h-4"})}),h.jsxs("div",{className:"flex-1",children:[h.jsxs("div",{className:`font-bold text-lg break-words flex flex-wrap items-center gap-2 ${U}`,children:[h.jsx("span",{className:"break-words",children:b.label||b.key}),D===0&&h.jsx("span",{className:`ml-2 text-xs font-medium px-2 py-0.5 rounded-full ${B?"bg-white/20 dark:bg-black/20":"bg-black/10 dark:bg-white/10"}`,children:"Recommended"})]}),b.description&&h.jsx("div",{className:`text-sm mt-1 break-words ${ne}`,children:b.description})]})]})},b.key)}),l&&h.jsxs("button",{onClick:()=>{E(!0),d(o?[]:null)},disabled:n,type:"button",className:`w-full p-6 rounded-2xl border-2 transition-all text-left ${x?"border-black bg-black text-white dark:border-white dark:bg-white dark:text-black":"border-black/10 dark:border-white/10 hover:border-black/30 dark:hover:border-white/30 bg-black/[0.02] dark:bg-white/[0.03]"}`,children:[h.jsx("div",{className:`font-bold text-lg break-words ${x?"text-white dark:text-black":"text-black dark:text-white"}`,children:"Other"}),h.jsx("div",{className:`text-sm mt-1 break-words ${x?"text-white/70 dark:text-black/70":"text-black/50 dark:text-white/50"}`,children:"Provide a custom response"})]}),x&&h.jsx("textarea",{value:g,onChange:b=>v(b.target.value),placeholder:"Type your response...",className:"w-full h-32 p-6 rounded-2xl bg-black/[0.02] dark:bg-white/[0.03] border-2 border-black/20 dark:border-white/20 focus:border-black dark:focus:border-white focus:outline-none text-lg"})]})]}),h.jsx("div",{className:"p-4 flex justify-center bg-gradient-to-t from-bg via-bg to-transparent shrink-0 border-t border-black/10 dark:border-white/10",children:h.jsx("button",{onClick:L,disabled:n||!T,className:"px-12 py-6 bg-fg text-bg rounded-full font-bold text-xl hover:scale-105 active:scale-95 transition-all disabled:opacity-30 shadow-2xl",children:"Continue"})})]})}function Cw({interaction:e,onSubmit:t,disabled:n}){const{prompt:r,question:i,confirmLabel:s="Confirm",cancelLabel:o="Cancel",context:l}=e;return h.jsxs("div",{className:"w-full h-full flex flex-col items-stretch overflow-hidden",children:[h.jsxs("div",{className:"flex-1 overflow-y-auto custom-scroll px-6 py-12 space-y-8 flex flex-col items-center justify-center",children:[h.jsxs("div",{className:"space-y-4",children:[h.jsx("div",{className:"w-16 h-16 rounded-3xl bg-black text-white dark:bg-white dark:text-black flex items-center justify-center mx-auto shadow-2xl shadow-black/20 dark:shadow-white/10",children:h.jsx(Qs,{className:"w-8 h-8"})}),h.jsx("h3",{className:"text-3xl sm:text-4xl font-extrabold tracking-tight text-fg pt-4 text-center",children:"Confirm action."})]}),h.jsx("div",{className:"text-lg sm:text-xl font-medium text-fg/70 text-center max-w-2xl whitespace-pre-wrap break-words",children:r||i||"Please confirm."}),(l==null?void 0:l.documentPath)&&h.jsxs("div",{className:"text-sm text-fg/40 text-center",children:["Review: ",h.jsx("code",{className:"bg-black/10 dark:bg-white/10 px-2 py-1 rounded",children:l.documentPath})]})]}),h.jsxs("div",{className:"p-4 flex justify-center gap-4 bg-gradient-to-t from-bg via-bg to-transparent shrink-0 border-t border-black/10 dark:border-white/10",children:[h.jsx("button",{onClick:()=>t({confirmed:!1,raw:o}),disabled:n,className:"px-12 py-6 border border-black/20 dark:border-white/20 text-fg rounded-full font-bold text-xl hover:bg-black/5 dark:hover:bg-white/10 transition-all disabled:opacity-30",children:o}),h.jsx("button",{onClick:()=>t({confirmed:!0,raw:s}),disabled:n,className:"px-12 py-6 bg-fg text-bg rounded-full font-bold text-xl hover:scale-105 active:scale-95 transition-all disabled:opacity-30 shadow-2xl shadow-black/20 dark:shadow-white/10",children:s})]})]})}function Pw({interaction:e,onSubmit:t,disabled:n}){const{prompt:r,question:i,placeholder:s,validation:o}=e,[l,a]=C.useState(""),[u,f]=C.useState(null),c=C.useMemo(()=>o||{},[o]),d=v=>c.minLength&&v.length<c.minLength?`Minimum ${c.minLength} characters required`:c.maxLength&&v.length>c.maxLength?`Maximum ${c.maxLength} characters allowed`:c.pattern&&!new RegExp(c.pattern).test(v)?"Invalid format":null,g=()=>{const v=l.trim(),x=d(v);if(x){f(x);return}t({text:v,raw:v})};return h.jsxs("div",{className:"w-full h-full flex flex-col items-stretch overflow-hidden",children:[h.jsxs("div",{className:"flex-1 overflow-y-auto custom-scroll px-6 py-12 space-y-8 flex flex-col items-center",children:[h.jsxs("div",{className:"space-y-4 shrink-0",children:[h.jsx("div",{className:"w-16 h-16 rounded-3xl bg-black text-white dark:bg-white dark:text-black flex items-center justify-center mx-auto shadow-2xl shadow-black/20 dark:shadow-white/10",children:h.jsx(Qs,{className:"w-8 h-8"})}),h.jsx("h3",{className:"text-3xl sm:text-4xl font-extrabold tracking-tight text-fg pt-4 text-center",children:"Action required."})]}),h.jsxs("div",{className:"w-full max-w-2xl space-y-4",children:[h.jsx("div",{className:"text-lg sm:text-xl font-medium text-fg/70 text-center whitespace-pre-wrap break-words",children:r||i||"Provide your response."}),h.jsx("textarea",{value:l,onChange:v=>{a(v.target.value),f(null)},disabled:n,placeholder:s||"Your response...",className:`w-full h-64 p-8 rounded-[32px] bg-black/[0.02] dark:bg-white/[0.03] border-2 ${u?"border-black dark:border-white":"border-transparent"} focus:border-black dark:focus:border-white focus:outline-none text-xl sm:text-2xl font-medium transition-all text-center placeholder:opacity-20`}),u&&h.jsx("div",{className:"text-black dark:text-white text-center text-sm font-semibold",children:u})]})]}),h.jsx("div",{className:"p-4 flex justify-center bg-gradient-to-t from-bg via-bg to-transparent shrink-0 border-t border-black/10 dark:border-white/10",children:h.jsx("button",{onClick:g,disabled:n||!l.trim(),className:"px-12 py-6 bg-fg text-bg rounded-full font-bold text-xl hover:scale-105 active:scale-95 transition-all disabled:opacity-30 shadow-2xl",children:"Submit Response"})})]})}function Tw({interaction:e,onSubmit:t,disabled:n}){const r=(e==null?void 0:e.type)||"text",i=s=>{t(e.slug,e.targetKey,s)};switch(r){case"choice":return h.jsx(Sw,{interaction:e,onSubmit:i,disabled:n},e.slug);case"confirm":return h.jsx(Cw,{interaction:e,onSubmit:i,disabled:n},e.slug);case"text":default:return h.jsx(Pw,{interaction:e,onSubmit:i,disabled:n},e.slug)}}function Ew({submission:e}){const t=e!=null&&e.slug?`Waiting for the CLI to receive ${e.slug} and log the next event.`:"Waiting for the CLI to receive the response and log the next event.";return h.jsx("div",{className:"w-full h-full flex items-center justify-center px-6 py-12 bg-white text-black dark:bg-black dark:text-white",children:h.jsxs("div",{className:"content-width w-full flex flex-col items-center text-center gap-6",children:[h.jsxs("div",{className:"relative",children:[h.jsx("div",{className:"absolute -inset-4 rounded-[36px] bg-black/10 dark:bg-white/10 blur-2xl opacity-60","aria-hidden":"true"}),h.jsx("div",{className:"relative w-20 h-20 rounded-[28px] border border-black/10 dark:border-white/10 bg-black/[0.03] dark:bg-white/[0.03] flex items-center justify-center shadow-2xl shadow-black/20 dark:shadow-white/10",children:h.jsx(ow,{className:"w-9 h-9 text-black dark:text-white animate-spin"})})]}),h.jsxs("div",{className:"space-y-3",children:[h.jsx("div",{className:"text-4xl font-black tracking-tight",children:"Sending response"}),h.jsx("div",{className:"text-lg font-medium text-black/60 dark:text-white/60 max-w-xl break-words",children:t}),h.jsx("div",{className:"text-[10px] font-bold tracking-[0.35em] uppercase opacity-30",children:"Keep this tab open"})]})]})})}function Nw(){const[e,t]=C.useState([]),[n,r]=C.useState(0),[i,s]=C.useState("connecting"),[o,l]=C.useState("..."),[a,u]=C.useState("light"),[f,c]=C.useState("present"),[d,g]=C.useState(null),[v,x]=C.useState(!1),[E,y]=C.useState(null),[p,m]=C.useState(0);C.useEffect(()=>{const S=localStorage.getItem("rf_theme")||(window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light");u(S);const k=localStorage.getItem("rf_view")||"present";c(k)},[]),C.useEffect(()=>{document.documentElement.classList.toggle("dark",a==="dark"),localStorage.setItem("rf_theme",a)},[a]),C.useEffect(()=>{localStorage.setItem("rf_view",f)},[f]);const w=window.SESSION_TOKEN==="{{SESSION_TOKEN}}"?null:window.SESSION_TOKEN,P=w?`/api/history/${w}`:"/api/history",R=w?`/api/events/${w}`:"/api/events",L=w?`/api/submit/${w}`:"/api/submit",T=async()=>{try{const k=await(await fetch(P)).json();if(k.entries){const N=[...k.entries].reverse();t(M=>(M.length===0&&N.length>0&&r(N.length-1),N));const A=N[N.length-1];A&&(A.event==="INTERACTION_REQUESTED"||A.event==="PROMPT_REQUESTED")?g(A):g(null)}k.workflowName&&l(k.workflowName),s("connected")}catch{s("disconnected")}},b=C.useRef(0);C.useEffect(()=>{e.length>b.current&&(b.current===0&&e.length>0?(r(e.length-1),x(!1)):n<e.length-1&&x(!0)),b.current=e.length},[e.length,n]),C.useEffect(()=>{if(!E||e.length===0)return;const S=e[e.length-1];if(e.length!==E.historyLength||S!=null&&S.timestamp&&S.timestamp!==E.lastEventTimestamp){if((S==null?void 0:S.event)==="INTERACTION_SUBMITTED"){y(N=>N&&{...N,historyLength:e.length,lastEventTimestamp:(S==null?void 0:S.timestamp)||N.lastEventTimestamp});return}y(null),r(e.length-1)}},[e,E]),C.useEffect(()=>{n===e.length-1&&x(!1)},[n,e.length]),C.useEffect(()=>{T();const S=setInterval(T,3e3),k=new EventSource(R);return k.onmessage=N=>{N.data==="update"&&T()},()=>{clearInterval(S),k.close()}},[]);const D=()=>r(S=>Math.min(e.length-1,S+1)),B=()=>r(S=>Math.max(0,S-1));C.useEffect(()=>{const S=k=>{(k.target.tagName==="TEXTAREA"||k.target.tagName==="INPUT"&&k.target.type==="number")&&k.target.className!=="jumper-input"||(k.key==="ArrowRight"&&D(),k.key==="ArrowLeft"&&B())};return window.addEventListener("keydown",S),()=>window.removeEventListener("keydown",S)},[e.length]);const U=e[n],ne=(U==null?void 0:U.event)==="AGENT_STARTED",H=U&&(U.event==="INTERACTION_REQUESTED"||U.event==="PROMPT_REQUESTED"),De=d&&H&&U.slug===d.slug,F=!!E;return h.jsxs("div",{className:"w-full h-[100dvh] flex flex-col relative overflow-hidden bg-bg",children:[h.jsx(kw,{workflowName:o,status:i,theme:a,toggleTheme:()=>u(S=>S==="dark"?"light":"dark"),viewMode:f,setViewMode:c,history:e}),h.jsx("main",{className:"main-stage overflow-hidden",children:f==="log"?h.jsx(xw,{history:e,onJump:S=>{r(S),c("present")}}):h.jsx(X1,{mode:"wait",children:h.jsx(U1.div,{initial:{opacity:0,scale:.99,filter:"blur(4px)"},animate:{opacity:1,scale:1,filter:"blur(0px)"},exit:{opacity:0,scale:1.01,filter:"blur(4px)"},transition:{duration:.3,ease:[.16,1,.3,1]},className:"w-full h-full",children:F?h.jsx(Ew,{submission:E}):De?h.jsx("div",{className:"content-width h-full",children:h.jsx(Tw,{interaction:d,onSubmit:async(S,k,N)=>{const A=e[e.length-1];y({slug:S,targetKey:k,historyLength:e.length,lastEventTimestamp:(A==null?void 0:A.timestamp)||null});try{const M=await fetch(L,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({slug:S,targetKey:k,response:N})});if(!M.ok)throw new Error(`Submit failed with ${M.status}`)}catch{y(null)}finally{setTimeout(T,1e3)}},disabled:i==="disconnected"||F})}):h.jsx(gw,{item:U,promptSearchRequestId:p})},n)})}),h.jsx(ww,{page:n,total:e.length,onNext:D,onPrev:B,onJump:r,hasNew:v,onJumpToLatest:()=>r(e.length-1),className:f==="log"?"opacity-0 pointer-events-none":"opacity-100",leftSlot:ne?h.jsx("button",{type:"button",onClick:()=>m(S=>S+1),className:"w-12 h-12 rounded-full bg-white text-black dark:bg-black dark:text-white border border-black/10 dark:border-white/10 flex items-center justify-center shadow-2xl shadow-black/20 dark:shadow-white/10 hover:scale-[1.02] transition-transform","aria-label":"Search prompt sections",children:h.jsx(rm,{className:"w-5 h-5"})}):null})]})}const jw=bh(document.getElementById("root"));jw.render(h.jsx(Nw,{}));