@rigour-labs/cli 5.5.4 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +23 -0
- package/dist/commands/firewall.d.ts +9 -0
- package/dist/commands/firewall.js +106 -0
- package/dist/commands/studio.js +85 -0
- package/package.json +2 -2
- package/studio-dist/assets/index-DzNTOo-7.js +372 -0
- package/studio-dist/index.html +1 -1
- package/studio-dist/assets/index-GVDvbvMe.js +0 -362
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&s(a)}).observe(document,{childList:!0,subtree:!0});function n(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerPolicy&&(o.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?o.credentials="include":r.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(r){if(r.ep)return;r.ep=!0;const o=n(r);fetch(r.href,o)}})();function jy(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ah={exports:{}},vo={},lh={exports:{}},H={};/**
|
|
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 Lr=Symbol.for("react.element"),wy=Symbol.for("react.portal"),Sy=Symbol.for("react.fragment"),ky=Symbol.for("react.strict_mode"),Ny=Symbol.for("react.profiler"),Cy=Symbol.for("react.provider"),Ty=Symbol.for("react.context"),Py=Symbol.for("react.forward_ref"),Ey=Symbol.for("react.suspense"),My=Symbol.for("react.memo"),Ay=Symbol.for("react.lazy"),Nu=Symbol.iterator;function Dy(e){return e===null||typeof e!="object"?null:(e=Nu&&e[Nu]||e["@@iterator"],typeof e=="function"?e:null)}var ch={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},uh=Object.assign,dh={};function Ps(e,t,n){this.props=e,this.context=t,this.refs=dh,this.updater=n||ch}Ps.prototype.isReactComponent={};Ps.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")};Ps.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function fh(){}fh.prototype=Ps.prototype;function Il(e,t,n){this.props=e,this.context=t,this.refs=dh,this.updater=n||ch}var bl=Il.prototype=new fh;bl.constructor=Il;uh(bl,Ps.prototype);bl.isPureReactComponent=!0;var Cu=Array.isArray,hh=Object.prototype.hasOwnProperty,$l={current:null},ph={key:!0,ref:!0,__self:!0,__source:!0};function mh(e,t,n){var s,r={},o=null,a=null;if(t!=null)for(s in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)hh.call(t,s)&&!ph.hasOwnProperty(s)&&(r[s]=t[s]);var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];r.children=c}if(e&&e.defaultProps)for(s in l=e.defaultProps,l)r[s]===void 0&&(r[s]=l[s]);return{$$typeof:Lr,type:e,key:o,ref:a,props:r,_owner:$l.current}}function Ry(e,t){return{$$typeof:Lr,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Bl(e){return typeof e=="object"&&e!==null&&e.$$typeof===Lr}function _y(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Tu=/\/+/g;function Io(e,t){return typeof e=="object"&&e!==null&&e.key!=null?_y(""+e.key):t.toString(36)}function gi(e,t,n,s,r){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case Lr:case wy:a=!0}}if(a)return a=e,r=r(a),e=s===""?"."+Io(a,0):s,Cu(r)?(n="",e!=null&&(n=e.replace(Tu,"$&/")+"/"),gi(r,t,n,"",function(u){return u})):r!=null&&(Bl(r)&&(r=Ry(r,n+(!r.key||a&&a.key===r.key?"":(""+r.key).replace(Tu,"$&/")+"/")+e)),t.push(r)),1;if(a=0,s=s===""?".":s+":",Cu(e))for(var l=0;l<e.length;l++){o=e[l];var c=s+Io(o,l);a+=gi(o,t,n,c,r)}else if(c=Dy(e),typeof c=="function")for(e=c.call(e),l=0;!(o=e.next()).done;)o=o.value,c=s+Io(o,l++),a+=gi(o,t,n,c,r);else if(o==="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 a}function Gr(e,t,n){if(e==null)return e;var s=[],r=0;return gi(e,s,"","",function(o){return t.call(n,o,r++)}),s}function Ly(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var ze={current:null},xi={transition:null},zy={ReactCurrentDispatcher:ze,ReactCurrentBatchConfig:xi,ReactCurrentOwner:$l};function vh(){throw Error("act(...) is not supported in production builds of React.")}H.Children={map:Gr,forEach:function(e,t,n){Gr(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Gr(e,function(){t++}),t},toArray:function(e){return Gr(e,function(t){return t})||[]},only:function(e){if(!Bl(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};H.Component=Ps;H.Fragment=Sy;H.Profiler=Ny;H.PureComponent=Il;H.StrictMode=ky;H.Suspense=Ey;H.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=zy;H.act=vh;H.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var s=uh({},e.props),r=e.key,o=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,a=$l.current),t.key!==void 0&&(r=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)hh.call(t,c)&&!ph.hasOwnProperty(c)&&(s[c]=t[c]===void 0&&l!==void 0?l[c]:t[c])}var c=arguments.length-2;if(c===1)s.children=n;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];s.children=l}return{$$typeof:Lr,type:e.type,key:r,ref:o,props:s,_owner:a}};H.createContext=function(e){return e={$$typeof:Ty,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Cy,_context:e},e.Consumer=e};H.createElement=mh;H.createFactory=function(e){var t=mh.bind(null,e);return t.type=e,t};H.createRef=function(){return{current:null}};H.forwardRef=function(e){return{$$typeof:Py,render:e}};H.isValidElement=Bl;H.lazy=function(e){return{$$typeof:Ay,_payload:{_status:-1,_result:e},_init:Ly}};H.memo=function(e,t){return{$$typeof:My,type:e,compare:t===void 0?null:t}};H.startTransition=function(e){var t=xi.transition;xi.transition={};try{e()}finally{xi.transition=t}};H.unstable_act=vh;H.useCallback=function(e,t){return ze.current.useCallback(e,t)};H.useContext=function(e){return ze.current.useContext(e)};H.useDebugValue=function(){};H.useDeferredValue=function(e){return ze.current.useDeferredValue(e)};H.useEffect=function(e,t){return ze.current.useEffect(e,t)};H.useId=function(){return ze.current.useId()};H.useImperativeHandle=function(e,t,n){return ze.current.useImperativeHandle(e,t,n)};H.useInsertionEffect=function(e,t){return ze.current.useInsertionEffect(e,t)};H.useLayoutEffect=function(e,t){return ze.current.useLayoutEffect(e,t)};H.useMemo=function(e,t){return ze.current.useMemo(e,t)};H.useReducer=function(e,t,n){return ze.current.useReducer(e,t,n)};H.useRef=function(e){return ze.current.useRef(e)};H.useState=function(e){return ze.current.useState(e)};H.useSyncExternalStore=function(e,t,n){return ze.current.useSyncExternalStore(e,t,n)};H.useTransition=function(){return ze.current.useTransition()};H.version="18.3.1";lh.exports=H;var j=lh.exports;const We=jy(j);/**
|
|
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 Vy=j,Oy=Symbol.for("react.element"),Fy=Symbol.for("react.fragment"),Iy=Object.prototype.hasOwnProperty,by=Vy.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,$y={key:!0,ref:!0,__self:!0,__source:!0};function yh(e,t,n){var s,r={},o=null,a=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(s in t)Iy.call(t,s)&&!$y.hasOwnProperty(s)&&(r[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps,t)r[s]===void 0&&(r[s]=t[s]);return{$$typeof:Oy,type:e,key:o,ref:a,props:r,_owner:by.current}}vo.Fragment=Fy;vo.jsx=yh;vo.jsxs=yh;ah.exports=vo;var i=ah.exports,Ma={},gh={exports:{}},Xe={},xh={exports:{}},jh={};/**
|
|
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(M,z){var O=M.length;M.push(z);e:for(;0<O;){var R=O-1>>>1,F=M[R];if(0<r(F,z))M[R]=z,M[O]=F,O=R;else break e}}function n(M){return M.length===0?null:M[0]}function s(M){if(M.length===0)return null;var z=M[0],O=M.pop();if(O!==z){M[0]=O;e:for(var R=0,F=M.length,re=F>>>1;R<re;){var _=2*(R+1)-1,B=M[_],K=_+1,fe=M[K];if(0>r(B,O))K<F&&0>r(fe,B)?(M[R]=fe,M[K]=O,R=K):(M[R]=B,M[_]=O,R=_);else if(K<F&&0>r(fe,O))M[R]=fe,M[K]=O,R=K;else break e}}return z}function r(M,z){var O=M.sortIndex-z.sortIndex;return O!==0?O:M.id-z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}var c=[],u=[],d=1,f=null,h=3,y=!1,x=!1,S=!1,C=typeof setTimeout=="function"?setTimeout:null,m=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 v(M){for(var z=n(u);z!==null;){if(z.callback===null)s(u);else if(z.startTime<=M)s(u),z.sortIndex=z.expirationTime,t(c,z);else break;z=n(u)}}function w(M){if(S=!1,v(M),!x)if(n(c)!==null)x=!0,U(g);else{var z=n(u);z!==null&&W(w,z.startTime-M)}}function g(M,z){x=!1,S&&(S=!1,m(T),T=-1),y=!0;var O=h;try{for(v(z),f=n(c);f!==null&&(!(f.expirationTime>z)||M&&!$());){var R=f.callback;if(typeof R=="function"){f.callback=null,h=f.priorityLevel;var F=R(f.expirationTime<=z);z=e.unstable_now(),typeof F=="function"?f.callback=F:f===n(c)&&s(c),v(z)}else s(c);f=n(c)}if(f!==null)var re=!0;else{var _=n(u);_!==null&&W(w,_.startTime-z),re=!1}return re}finally{f=null,h=O,y=!1}}var k=!1,N=null,T=-1,A=5,P=-1;function $(){return!(e.unstable_now()-P<A)}function b(){if(N!==null){var M=e.unstable_now();P=M;var z=!0;try{z=N(!0,M)}finally{z?Q():(k=!1,N=null)}}else k=!1}var Q;if(typeof p=="function")Q=function(){p(b)};else if(typeof MessageChannel<"u"){var de=new MessageChannel,L=de.port2;de.port1.onmessage=b,Q=function(){L.postMessage(null)}}else Q=function(){C(b,0)};function U(M){N=M,k||(k=!0,Q())}function W(M,z){T=C(function(){M(e.unstable_now())},z)}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(M){M.callback=null},e.unstable_continueExecution=function(){x||y||(x=!0,U(g))},e.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<M?Math.floor(1e3/M):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(M){switch(h){case 1:case 2:case 3:var z=3;break;default:z=h}var O=h;h=z;try{return M()}finally{h=O}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(M,z){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var O=h;h=M;try{return z()}finally{h=O}},e.unstable_scheduleCallback=function(M,z,O){var R=e.unstable_now();switch(typeof O=="object"&&O!==null?(O=O.delay,O=typeof O=="number"&&0<O?R+O:R):O=R,M){case 1:var F=-1;break;case 2:F=250;break;case 5:F=1073741823;break;case 4:F=1e4;break;default:F=5e3}return F=O+F,M={id:d++,callback:z,priorityLevel:M,startTime:O,expirationTime:F,sortIndex:-1},O>R?(M.sortIndex=O,t(u,M),n(c)===null&&M===n(u)&&(S?(m(T),T=-1):S=!0,W(w,O-R))):(M.sortIndex=F,t(c,M),x||y||(x=!0,U(g))),M},e.unstable_shouldYield=$,e.unstable_wrapCallback=function(M){var z=h;return function(){var O=h;h=z;try{return M.apply(this,arguments)}finally{h=O}}}})(jh);xh.exports=jh;var By=xh.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 Uy=j,Qe=By;function E(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 wh=new Set,ur={};function Vn(e,t){hs(e,t),hs(e+"Capture",t)}function hs(e,t){for(ur[e]=t,e=0;e<t.length;e++)wh.add(t[e])}var Vt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Aa=Object.prototype.hasOwnProperty,Hy=/^[: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]*$/,Pu={},Eu={};function Wy(e){return Aa.call(Eu,e)?!0:Aa.call(Pu,e)?!1:Hy.test(e)?Eu[e]=!0:(Pu[e]=!0,!1)}function Ky(e,t,n,s){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return s?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Gy(e,t,n,s){if(t===null||typeof t>"u"||Ky(e,t,n,s))return!0;if(s)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ve(e,t,n,s,r,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=s,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var ke={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ke[e]=new Ve(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ke[t]=new Ve(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ke[e]=new Ve(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ke[e]=new Ve(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ke[e]=new Ve(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ke[e]=new Ve(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ke[e]=new Ve(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ke[e]=new Ve(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ke[e]=new Ve(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ul=/[\-:]([a-z])/g;function Hl(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(Ul,Hl);ke[t]=new Ve(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Ul,Hl);ke[t]=new Ve(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Ul,Hl);ke[t]=new Ve(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ke[e]=new Ve(e,1,!1,e.toLowerCase(),null,!1,!1)});ke.xlinkHref=new Ve("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ke[e]=new Ve(e,1,!1,e.toLowerCase(),null,!0,!0)});function Wl(e,t,n,s){var r=ke.hasOwnProperty(t)?ke[t]:null;(r!==null?r.type!==0:s||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Gy(t,n,r,s)&&(n=null),s||r===null?Wy(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):r.mustUseProperty?e[r.propertyName]=n===null?r.type===3?!1:"":n:(t=r.attributeName,s=r.attributeNamespace,n===null?e.removeAttribute(t):(r=r.type,n=r===3||r===4&&n===!0?"":""+n,s?e.setAttributeNS(s,t,n):e.setAttribute(t,n))))}var $t=Uy.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,qr=Symbol.for("react.element"),bn=Symbol.for("react.portal"),$n=Symbol.for("react.fragment"),Kl=Symbol.for("react.strict_mode"),Da=Symbol.for("react.profiler"),Sh=Symbol.for("react.provider"),kh=Symbol.for("react.context"),Gl=Symbol.for("react.forward_ref"),Ra=Symbol.for("react.suspense"),_a=Symbol.for("react.suspense_list"),ql=Symbol.for("react.memo"),Ht=Symbol.for("react.lazy"),Nh=Symbol.for("react.offscreen"),Mu=Symbol.iterator;function Rs(e){return e===null||typeof e!="object"?null:(e=Mu&&e[Mu]||e["@@iterator"],typeof e=="function"?e:null)}var le=Object.assign,bo;function Bs(e){if(bo===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);bo=t&&t[1]||""}return`
|
|
34
|
+
`+bo+e}var $o=!1;function Bo(e,t){if(!e||$o)return"";$o=!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 s=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){s=u}e.call(t.prototype)}else{try{throw Error()}catch(u){s=u}e()}}catch(u){if(u&&s&&typeof u.stack=="string"){for(var r=u.stack.split(`
|
|
35
|
+
`),o=s.stack.split(`
|
|
36
|
+
`),a=r.length-1,l=o.length-1;1<=a&&0<=l&&r[a]!==o[l];)l--;for(;1<=a&&0<=l;a--,l--)if(r[a]!==o[l]){if(a!==1||l!==1)do if(a--,l--,0>l||r[a]!==o[l]){var c=`
|
|
37
|
+
`+r[a].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=a&&0<=l);break}}}finally{$o=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Bs(e):""}function qy(e){switch(e.tag){case 5:return Bs(e.type);case 16:return Bs("Lazy");case 13:return Bs("Suspense");case 19:return Bs("SuspenseList");case 0:case 2:case 15:return e=Bo(e.type,!1),e;case 11:return e=Bo(e.type.render,!1),e;case 1:return e=Bo(e.type,!0),e;default:return""}}function La(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 $n:return"Fragment";case bn:return"Portal";case Da:return"Profiler";case Kl:return"StrictMode";case Ra:return"Suspense";case _a:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case kh:return(e.displayName||"Context")+".Consumer";case Sh:return(e._context.displayName||"Context")+".Provider";case Gl: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:La(e.type)||"Memo";case Ht:t=e._payload,e=e._init;try{return La(e(t))}catch{}}return null}function Qy(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 La(t);case 8:return t===Kl?"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 ln(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ch(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Yy(e){var t=Ch(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),s=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var r=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(a){s=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return s},setValue:function(a){s=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Qr(e){e._valueTracker||(e._valueTracker=Yy(e))}function Th(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),s="";return e&&(s=Ch(e)?e.checked?"true":"false":e.value),e=s,e!==n?(t.setValue(e),!0):!1}function Li(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 za(e,t){var n=t.checked;return le({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Au(e,t){var n=t.defaultValue==null?"":t.defaultValue,s=t.checked!=null?t.checked:t.defaultChecked;n=ln(t.value!=null?t.value:n),e._wrapperState={initialChecked:s,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Ph(e,t){t=t.checked,t!=null&&Wl(e,"checked",t,!1)}function Va(e,t){Ph(e,t);var n=ln(t.value),s=t.type;if(n!=null)s==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(s==="submit"||s==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Oa(e,t.type,n):t.hasOwnProperty("defaultValue")&&Oa(e,t.type,ln(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 s=t.type;if(!(s!=="submit"&&s!=="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 Oa(e,t,n){(t!=="number"||Li(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Us=Array.isArray;function is(e,t,n,s){if(e=e.options,t){t={};for(var r=0;r<n.length;r++)t["$"+n[r]]=!0;for(n=0;n<e.length;n++)r=t.hasOwnProperty("$"+e[n].value),e[n].selected!==r&&(e[n].selected=r),r&&s&&(e[n].defaultSelected=!0)}else{for(n=""+ln(n),t=null,r=0;r<e.length;r++){if(e[r].value===n){e[r].selected=!0,s&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function Fa(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(E(91));return le({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ru(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(E(92));if(Us(n)){if(1<n.length)throw Error(E(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:ln(n)}}function Eh(e,t){var n=ln(t.value),s=ln(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),s!=null&&(e.defaultValue=""+s)}function _u(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Mh(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 Ia(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Mh(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Yr,Ah=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,s,r){MSApp.execUnsafeLocalFunction(function(){return e(t,n,s,r)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Yr=Yr||document.createElement("div"),Yr.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Yr.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 Ys={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},Xy=["Webkit","ms","Moz","O"];Object.keys(Ys).forEach(function(e){Xy.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ys[t]=Ys[e]})});function Dh(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ys.hasOwnProperty(e)&&Ys[e]?(""+t).trim():t+"px"}function Rh(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var s=n.indexOf("--")===0,r=Dh(n,t[n],s);n==="float"&&(n="cssFloat"),s?e.setProperty(n,r):e[n]=r}}var Zy=le({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 ba(e,t){if(t){if(Zy[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(E(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(E(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(E(61))}if(t.style!=null&&typeof t.style!="object")throw Error(E(62))}}function $a(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 Ba=null;function Ql(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ua=null,os=null,as=null;function Lu(e){if(e=Or(e)){if(typeof Ua!="function")throw Error(E(280));var t=e.stateNode;t&&(t=wo(t),Ua(e.stateNode,e.type,t))}}function _h(e){os?as?as.push(e):as=[e]:os=e}function Lh(){if(os){var e=os,t=as;if(as=os=null,Lu(e),t)for(e=0;e<t.length;e++)Lu(t[e])}}function zh(e,t){return e(t)}function Vh(){}var Uo=!1;function Oh(e,t,n){if(Uo)return e(t,n);Uo=!0;try{return zh(e,t,n)}finally{Uo=!1,(os!==null||as!==null)&&(Vh(),Lh())}}function fr(e,t){var n=e.stateNode;if(n===null)return null;var s=wo(n);if(s===null)return null;n=s[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":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(E(231,t,typeof n));return n}var Ha=!1;if(Vt)try{var _s={};Object.defineProperty(_s,"passive",{get:function(){Ha=!0}}),window.addEventListener("test",_s,_s),window.removeEventListener("test",_s,_s)}catch{Ha=!1}function Jy(e,t,n,s,r,o,a,l,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var Xs=!1,zi=null,Vi=!1,Wa=null,eg={onError:function(e){Xs=!0,zi=e}};function tg(e,t,n,s,r,o,a,l,c){Xs=!1,zi=null,Jy.apply(eg,arguments)}function ng(e,t,n,s,r,o,a,l,c){if(tg.apply(this,arguments),Xs){if(Xs){var u=zi;Xs=!1,zi=null}else throw Error(E(198));Vi||(Vi=!0,Wa=u)}}function On(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 Fh(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 zu(e){if(On(e)!==e)throw Error(E(188))}function sg(e){var t=e.alternate;if(!t){if(t=On(e),t===null)throw Error(E(188));return t!==e?null:e}for(var n=e,s=t;;){var r=n.return;if(r===null)break;var o=r.alternate;if(o===null){if(s=r.return,s!==null){n=s;continue}break}if(r.child===o.child){for(o=r.child;o;){if(o===n)return zu(r),e;if(o===s)return zu(r),t;o=o.sibling}throw Error(E(188))}if(n.return!==s.return)n=r,s=o;else{for(var a=!1,l=r.child;l;){if(l===n){a=!0,n=r,s=o;break}if(l===s){a=!0,s=r,n=o;break}l=l.sibling}if(!a){for(l=o.child;l;){if(l===n){a=!0,n=o,s=r;break}if(l===s){a=!0,s=o,n=r;break}l=l.sibling}if(!a)throw Error(E(189))}}if(n.alternate!==s)throw Error(E(190))}if(n.tag!==3)throw Error(E(188));return n.stateNode.current===n?e:t}function Ih(e){return e=sg(e),e!==null?bh(e):null}function bh(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=bh(e);if(t!==null)return t;e=e.sibling}return null}var $h=Qe.unstable_scheduleCallback,Vu=Qe.unstable_cancelCallback,rg=Qe.unstable_shouldYield,ig=Qe.unstable_requestPaint,pe=Qe.unstable_now,og=Qe.unstable_getCurrentPriorityLevel,Yl=Qe.unstable_ImmediatePriority,Bh=Qe.unstable_UserBlockingPriority,Oi=Qe.unstable_NormalPriority,ag=Qe.unstable_LowPriority,Uh=Qe.unstable_IdlePriority,yo=null,kt=null;function lg(e){if(kt&&typeof kt.onCommitFiberRoot=="function")try{kt.onCommitFiberRoot(yo,e,void 0,(e.current.flags&128)===128)}catch{}}var mt=Math.clz32?Math.clz32:dg,cg=Math.log,ug=Math.LN2;function dg(e){return e>>>=0,e===0?32:31-(cg(e)/ug|0)|0}var Xr=64,Zr=4194304;function Hs(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 Fi(e,t){var n=e.pendingLanes;if(n===0)return 0;var s=0,r=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var l=a&~r;l!==0?s=Hs(l):(o&=a,o!==0&&(s=Hs(o)))}else a=n&~r,a!==0?s=Hs(a):o!==0&&(s=Hs(o));if(s===0)return 0;if(t!==0&&t!==s&&!(t&r)&&(r=s&-s,o=t&-t,r>=o||r===16&&(o&4194240)!==0))return t;if(s&4&&(s|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=s;0<t;)n=31-mt(t),r=1<<n,s|=e[n],t&=~r;return s}function fg(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 hg(e,t){for(var n=e.suspendedLanes,s=e.pingedLanes,r=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-mt(o),l=1<<a,c=r[a];c===-1?(!(l&n)||l&s)&&(r[a]=fg(l,t)):c<=t&&(e.expiredLanes|=l),o&=~l}}function Ka(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Hh(){var e=Xr;return Xr<<=1,!(Xr&4194240)&&(Xr=64),e}function Ho(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function zr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-mt(t),e[t]=n}function pg(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 s=e.eventTimes;for(e=e.expirationTimes;0<n;){var r=31-mt(n),o=1<<r;t[r]=0,s[r]=-1,e[r]=-1,n&=~o}}function Xl(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var s=31-mt(n),r=1<<s;r&t|e[s]&t&&(e[s]|=t),n&=~r}}var Y=0;function Wh(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Kh,Zl,Gh,qh,Qh,Ga=!1,Jr=[],Xt=null,Zt=null,Jt=null,hr=new Map,pr=new Map,Kt=[],mg="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 Ou(e,t){switch(e){case"focusin":case"focusout":Xt=null;break;case"dragenter":case"dragleave":Zt=null;break;case"mouseover":case"mouseout":Jt=null;break;case"pointerover":case"pointerout":hr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":pr.delete(t.pointerId)}}function Ls(e,t,n,s,r,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:s,nativeEvent:o,targetContainers:[r]},t!==null&&(t=Or(t),t!==null&&Zl(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function vg(e,t,n,s,r){switch(t){case"focusin":return Xt=Ls(Xt,e,t,n,s,r),!0;case"dragenter":return Zt=Ls(Zt,e,t,n,s,r),!0;case"mouseover":return Jt=Ls(Jt,e,t,n,s,r),!0;case"pointerover":var o=r.pointerId;return hr.set(o,Ls(hr.get(o)||null,e,t,n,s,r)),!0;case"gotpointercapture":return o=r.pointerId,pr.set(o,Ls(pr.get(o)||null,e,t,n,s,r)),!0}return!1}function Yh(e){var t=kn(e.target);if(t!==null){var n=On(t);if(n!==null){if(t=n.tag,t===13){if(t=Fh(n),t!==null){e.blockedOn=t,Qh(e.priority,function(){Gh(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 ji(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=qa(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var s=new n.constructor(n.type,n);Ba=s,n.target.dispatchEvent(s),Ba=null}else return t=Or(n),t!==null&&Zl(t),e.blockedOn=n,!1;t.shift()}return!0}function Fu(e,t,n){ji(e)&&n.delete(t)}function yg(){Ga=!1,Xt!==null&&ji(Xt)&&(Xt=null),Zt!==null&&ji(Zt)&&(Zt=null),Jt!==null&&ji(Jt)&&(Jt=null),hr.forEach(Fu),pr.forEach(Fu)}function zs(e,t){e.blockedOn===t&&(e.blockedOn=null,Ga||(Ga=!0,Qe.unstable_scheduleCallback(Qe.unstable_NormalPriority,yg)))}function mr(e){function t(r){return zs(r,e)}if(0<Jr.length){zs(Jr[0],e);for(var n=1;n<Jr.length;n++){var s=Jr[n];s.blockedOn===e&&(s.blockedOn=null)}}for(Xt!==null&&zs(Xt,e),Zt!==null&&zs(Zt,e),Jt!==null&&zs(Jt,e),hr.forEach(t),pr.forEach(t),n=0;n<Kt.length;n++)s=Kt[n],s.blockedOn===e&&(s.blockedOn=null);for(;0<Kt.length&&(n=Kt[0],n.blockedOn===null);)Yh(n),n.blockedOn===null&&Kt.shift()}var ls=$t.ReactCurrentBatchConfig,Ii=!0;function gg(e,t,n,s){var r=Y,o=ls.transition;ls.transition=null;try{Y=1,Jl(e,t,n,s)}finally{Y=r,ls.transition=o}}function xg(e,t,n,s){var r=Y,o=ls.transition;ls.transition=null;try{Y=4,Jl(e,t,n,s)}finally{Y=r,ls.transition=o}}function Jl(e,t,n,s){if(Ii){var r=qa(e,t,n,s);if(r===null)ea(e,t,s,bi,n),Ou(e,s);else if(vg(r,e,t,n,s))s.stopPropagation();else if(Ou(e,s),t&4&&-1<mg.indexOf(e)){for(;r!==null;){var o=Or(r);if(o!==null&&Kh(o),o=qa(e,t,n,s),o===null&&ea(e,t,s,bi,n),o===r)break;r=o}r!==null&&s.stopPropagation()}else ea(e,t,s,null,n)}}var bi=null;function qa(e,t,n,s){if(bi=null,e=Ql(s),e=kn(e),e!==null)if(t=On(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Fh(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 bi=e,null}function Xh(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(og()){case Yl:return 1;case Bh:return 4;case Oi:case ag:return 16;case Uh:return 536870912;default:return 16}default:return 16}}var qt=null,ec=null,wi=null;function Zh(){if(wi)return wi;var e,t=ec,n=t.length,s,r="value"in qt?qt.value:qt.textContent,o=r.length;for(e=0;e<n&&t[e]===r[e];e++);var a=n-e;for(s=1;s<=a&&t[n-s]===r[o-s];s++);return wi=r.slice(e,1<s?1-s:void 0)}function Si(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 ei(){return!0}function Iu(){return!1}function Ze(e){function t(n,s,r,o,a){this._reactName=n,this._targetInst=r,this.type=s,this.nativeEvent=o,this.target=a,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(o):o[l]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?ei:Iu,this.isPropagationStopped=Iu,this}return le(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=ei)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ei)},persist:function(){},isPersistent:ei}),t}var Es={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},tc=Ze(Es),Vr=le({},Es,{view:0,detail:0}),jg=Ze(Vr),Wo,Ko,Vs,go=le({},Vr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:nc,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!==Vs&&(Vs&&e.type==="mousemove"?(Wo=e.screenX-Vs.screenX,Ko=e.screenY-Vs.screenY):Ko=Wo=0,Vs=e),Wo)},movementY:function(e){return"movementY"in e?e.movementY:Ko}}),bu=Ze(go),wg=le({},go,{dataTransfer:0}),Sg=Ze(wg),kg=le({},Vr,{relatedTarget:0}),Go=Ze(kg),Ng=le({},Es,{animationName:0,elapsedTime:0,pseudoElement:0}),Cg=Ze(Ng),Tg=le({},Es,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Pg=Ze(Tg),Eg=le({},Es,{data:0}),$u=Ze(Eg),Mg={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ag={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"},Dg={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Rg(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Dg[e])?!!t[e]:!1}function nc(){return Rg}var _g=le({},Vr,{key:function(e){if(e.key){var t=Mg[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Si(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Ag[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:nc,charCode:function(e){return e.type==="keypress"?Si(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Si(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Lg=Ze(_g),zg=le({},go,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Bu=Ze(zg),Vg=le({},Vr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:nc}),Og=Ze(Vg),Fg=le({},Es,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ig=Ze(Fg),bg=le({},go,{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}),$g=Ze(bg),Bg=[9,13,27,32],sc=Vt&&"CompositionEvent"in window,Zs=null;Vt&&"documentMode"in document&&(Zs=document.documentMode);var Ug=Vt&&"TextEvent"in window&&!Zs,Jh=Vt&&(!sc||Zs&&8<Zs&&11>=Zs),Uu=" ",Hu=!1;function ep(e,t){switch(e){case"keyup":return Bg.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function tp(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Bn=!1;function Hg(e,t){switch(e){case"compositionend":return tp(t);case"keypress":return t.which!==32?null:(Hu=!0,Uu);case"textInput":return e=t.data,e===Uu&&Hu?null:e;default:return null}}function Wg(e,t){if(Bn)return e==="compositionend"||!sc&&ep(e,t)?(e=Zh(),wi=ec=qt=null,Bn=!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 Jh&&t.locale!=="ko"?null:t.data;default:return null}}var Kg={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 Wu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Kg[e.type]:t==="textarea"}function np(e,t,n,s){_h(s),t=$i(t,"onChange"),0<t.length&&(n=new tc("onChange","change",null,n,s),e.push({event:n,listeners:t}))}var Js=null,vr=null;function Gg(e){hp(e,0)}function xo(e){var t=Wn(e);if(Th(t))return e}function qg(e,t){if(e==="change")return t}var sp=!1;if(Vt){var qo;if(Vt){var Qo="oninput"in document;if(!Qo){var Ku=document.createElement("div");Ku.setAttribute("oninput","return;"),Qo=typeof Ku.oninput=="function"}qo=Qo}else qo=!1;sp=qo&&(!document.documentMode||9<document.documentMode)}function Gu(){Js&&(Js.detachEvent("onpropertychange",rp),vr=Js=null)}function rp(e){if(e.propertyName==="value"&&xo(vr)){var t=[];np(t,vr,e,Ql(e)),Oh(Gg,t)}}function Qg(e,t,n){e==="focusin"?(Gu(),Js=t,vr=n,Js.attachEvent("onpropertychange",rp)):e==="focusout"&&Gu()}function Yg(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return xo(vr)}function Xg(e,t){if(e==="click")return xo(t)}function Zg(e,t){if(e==="input"||e==="change")return xo(t)}function Jg(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var gt=typeof Object.is=="function"?Object.is:Jg;function yr(e,t){if(gt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),s=Object.keys(t);if(n.length!==s.length)return!1;for(s=0;s<n.length;s++){var r=n[s];if(!Aa.call(t,r)||!gt(e[r],t[r]))return!1}return!0}function qu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Qu(e,t){var n=qu(e);e=0;for(var s;n;){if(n.nodeType===3){if(s=e+n.textContent.length,e<=t&&s>=t)return{node:n,offset:t-e};e=s}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=qu(n)}}function ip(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ip(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function op(){for(var e=window,t=Li();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Li(e.document)}return t}function rc(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 ex(e){var t=op(),n=e.focusedElem,s=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ip(n.ownerDocument.documentElement,n)){if(s!==null&&rc(n)){if(t=s.start,e=s.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 r=n.textContent.length,o=Math.min(s.start,r);s=s.end===void 0?o:Math.min(s.end,r),!e.extend&&o>s&&(r=s,s=o,o=r),r=Qu(n,o);var a=Qu(n,s);r&&a&&(e.rangeCount!==1||e.anchorNode!==r.node||e.anchorOffset!==r.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(r.node,r.offset),e.removeAllRanges(),o>s?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.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 tx=Vt&&"documentMode"in document&&11>=document.documentMode,Un=null,Qa=null,er=null,Ya=!1;function Yu(e,t,n){var s=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ya||Un==null||Un!==Li(s)||(s=Un,"selectionStart"in s&&rc(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),er&&yr(er,s)||(er=s,s=$i(Qa,"onSelect"),0<s.length&&(t=new tc("onSelect","select",null,t,n),e.push({event:t,listeners:s}),t.target=Un)))}function ti(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Hn={animationend:ti("Animation","AnimationEnd"),animationiteration:ti("Animation","AnimationIteration"),animationstart:ti("Animation","AnimationStart"),transitionend:ti("Transition","TransitionEnd")},Yo={},ap={};Vt&&(ap=document.createElement("div").style,"AnimationEvent"in window||(delete Hn.animationend.animation,delete Hn.animationiteration.animation,delete Hn.animationstart.animation),"TransitionEvent"in window||delete Hn.transitionend.transition);function jo(e){if(Yo[e])return Yo[e];if(!Hn[e])return e;var t=Hn[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in ap)return Yo[e]=t[n];return e}var lp=jo("animationend"),cp=jo("animationiteration"),up=jo("animationstart"),dp=jo("transitionend"),fp=new Map,Xu="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 hn(e,t){fp.set(e,t),Vn(t,[e])}for(var Xo=0;Xo<Xu.length;Xo++){var Zo=Xu[Xo],nx=Zo.toLowerCase(),sx=Zo[0].toUpperCase()+Zo.slice(1);hn(nx,"on"+sx)}hn(lp,"onAnimationEnd");hn(cp,"onAnimationIteration");hn(up,"onAnimationStart");hn("dblclick","onDoubleClick");hn("focusin","onFocus");hn("focusout","onBlur");hn(dp,"onTransitionEnd");hs("onMouseEnter",["mouseout","mouseover"]);hs("onMouseLeave",["mouseout","mouseover"]);hs("onPointerEnter",["pointerout","pointerover"]);hs("onPointerLeave",["pointerout","pointerover"]);Vn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Vn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Vn("onBeforeInput",["compositionend","keypress","textInput","paste"]);Vn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Vn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Vn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ws="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(" "),rx=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ws));function Zu(e,t,n){var s=e.type||"unknown-event";e.currentTarget=n,ng(s,t,void 0,e),e.currentTarget=null}function hp(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var s=e[n],r=s.event;s=s.listeners;e:{var o=void 0;if(t)for(var a=s.length-1;0<=a;a--){var l=s[a],c=l.instance,u=l.currentTarget;if(l=l.listener,c!==o&&r.isPropagationStopped())break e;Zu(r,l,u),o=c}else for(a=0;a<s.length;a++){if(l=s[a],c=l.instance,u=l.currentTarget,l=l.listener,c!==o&&r.isPropagationStopped())break e;Zu(r,l,u),o=c}}}if(Vi)throw e=Wa,Vi=!1,Wa=null,e}function ee(e,t){var n=t[tl];n===void 0&&(n=t[tl]=new Set);var s=e+"__bubble";n.has(s)||(pp(t,e,2,!1),n.add(s))}function Jo(e,t,n){var s=0;t&&(s|=4),pp(n,e,s,t)}var ni="_reactListening"+Math.random().toString(36).slice(2);function gr(e){if(!e[ni]){e[ni]=!0,wh.forEach(function(n){n!=="selectionchange"&&(rx.has(n)||Jo(n,!1,e),Jo(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ni]||(t[ni]=!0,Jo("selectionchange",!1,t))}}function pp(e,t,n,s){switch(Xh(t)){case 1:var r=gg;break;case 4:r=xg;break;default:r=Jl}n=r.bind(null,t,n,e),r=void 0,!Ha||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),s?r!==void 0?e.addEventListener(t,n,{capture:!0,passive:r}):e.addEventListener(t,n,!0):r!==void 0?e.addEventListener(t,n,{passive:r}):e.addEventListener(t,n,!1)}function ea(e,t,n,s,r){var o=s;if(!(t&1)&&!(t&2)&&s!==null)e:for(;;){if(s===null)return;var a=s.tag;if(a===3||a===4){var l=s.stateNode.containerInfo;if(l===r||l.nodeType===8&&l.parentNode===r)break;if(a===4)for(a=s.return;a!==null;){var c=a.tag;if((c===3||c===4)&&(c=a.stateNode.containerInfo,c===r||c.nodeType===8&&c.parentNode===r))return;a=a.return}for(;l!==null;){if(a=kn(l),a===null)return;if(c=a.tag,c===5||c===6){s=o=a;continue e}l=l.parentNode}}s=s.return}Oh(function(){var u=o,d=Ql(n),f=[];e:{var h=fp.get(e);if(h!==void 0){var y=tc,x=e;switch(e){case"keypress":if(Si(n)===0)break e;case"keydown":case"keyup":y=Lg;break;case"focusin":x="focus",y=Go;break;case"focusout":x="blur",y=Go;break;case"beforeblur":case"afterblur":y=Go;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":y=bu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":y=Sg;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":y=Og;break;case lp:case cp:case up:y=Cg;break;case dp:y=Ig;break;case"scroll":y=jg;break;case"wheel":y=$g;break;case"copy":case"cut":case"paste":y=Pg;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":y=Bu}var S=(t&4)!==0,C=!S&&e==="scroll",m=S?h!==null?h+"Capture":null:h;S=[];for(var p=u,v;p!==null;){v=p;var w=v.stateNode;if(v.tag===5&&w!==null&&(v=w,m!==null&&(w=fr(p,m),w!=null&&S.push(xr(p,w,v)))),C)break;p=p.return}0<S.length&&(h=new y(h,x,null,n,d),f.push({event:h,listeners:S}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",y=e==="mouseout"||e==="pointerout",h&&n!==Ba&&(x=n.relatedTarget||n.fromElement)&&(kn(x)||x[Ot]))break e;if((y||h)&&(h=d.window===d?d:(h=d.ownerDocument)?h.defaultView||h.parentWindow:window,y?(x=n.relatedTarget||n.toElement,y=u,x=x?kn(x):null,x!==null&&(C=On(x),x!==C||x.tag!==5&&x.tag!==6)&&(x=null)):(y=null,x=u),y!==x)){if(S=bu,w="onMouseLeave",m="onMouseEnter",p="mouse",(e==="pointerout"||e==="pointerover")&&(S=Bu,w="onPointerLeave",m="onPointerEnter",p="pointer"),C=y==null?h:Wn(y),v=x==null?h:Wn(x),h=new S(w,p+"leave",y,n,d),h.target=C,h.relatedTarget=v,w=null,kn(d)===u&&(S=new S(m,p+"enter",x,n,d),S.target=v,S.relatedTarget=C,w=S),C=w,y&&x)t:{for(S=y,m=x,p=0,v=S;v;v=In(v))p++;for(v=0,w=m;w;w=In(w))v++;for(;0<p-v;)S=In(S),p--;for(;0<v-p;)m=In(m),v--;for(;p--;){if(S===m||m!==null&&S===m.alternate)break t;S=In(S),m=In(m)}S=null}else S=null;y!==null&&Ju(f,h,y,S,!1),x!==null&&C!==null&&Ju(f,C,x,S,!0)}}e:{if(h=u?Wn(u):window,y=h.nodeName&&h.nodeName.toLowerCase(),y==="select"||y==="input"&&h.type==="file")var g=qg;else if(Wu(h))if(sp)g=Zg;else{g=Yg;var k=Qg}else(y=h.nodeName)&&y.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(g=Xg);if(g&&(g=g(e,u))){np(f,g,n,d);break e}k&&k(e,h,u),e==="focusout"&&(k=h._wrapperState)&&k.controlled&&h.type==="number"&&Oa(h,"number",h.value)}switch(k=u?Wn(u):window,e){case"focusin":(Wu(k)||k.contentEditable==="true")&&(Un=k,Qa=u,er=null);break;case"focusout":er=Qa=Un=null;break;case"mousedown":Ya=!0;break;case"contextmenu":case"mouseup":case"dragend":Ya=!1,Yu(f,n,d);break;case"selectionchange":if(tx)break;case"keydown":case"keyup":Yu(f,n,d)}var N;if(sc)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 Bn?ep(e,n)&&(T="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(T="onCompositionStart");T&&(Jh&&n.locale!=="ko"&&(Bn||T!=="onCompositionStart"?T==="onCompositionEnd"&&Bn&&(N=Zh()):(qt=d,ec="value"in qt?qt.value:qt.textContent,Bn=!0)),k=$i(u,T),0<k.length&&(T=new $u(T,e,null,n,d),f.push({event:T,listeners:k}),N?T.data=N:(N=tp(n),N!==null&&(T.data=N)))),(N=Ug?Hg(e,n):Wg(e,n))&&(u=$i(u,"onBeforeInput"),0<u.length&&(d=new $u("onBeforeInput","beforeinput",null,n,d),f.push({event:d,listeners:u}),d.data=N))}hp(f,t)})}function xr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function $i(e,t){for(var n=t+"Capture",s=[];e!==null;){var r=e,o=r.stateNode;r.tag===5&&o!==null&&(r=o,o=fr(e,n),o!=null&&s.unshift(xr(e,o,r)),o=fr(e,t),o!=null&&s.push(xr(e,o,r))),e=e.return}return s}function In(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Ju(e,t,n,s,r){for(var o=t._reactName,a=[];n!==null&&n!==s;){var l=n,c=l.alternate,u=l.stateNode;if(c!==null&&c===s)break;l.tag===5&&u!==null&&(l=u,r?(c=fr(n,o),c!=null&&a.unshift(xr(n,c,l))):r||(c=fr(n,o),c!=null&&a.push(xr(n,c,l)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var ix=/\r\n?/g,ox=/\u0000|\uFFFD/g;function ed(e){return(typeof e=="string"?e:""+e).replace(ix,`
|
|
38
|
+
`).replace(ox,"")}function si(e,t,n){if(t=ed(t),ed(e)!==t&&n)throw Error(E(425))}function Bi(){}var Xa=null,Za=null;function Ja(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 el=typeof setTimeout=="function"?setTimeout:void 0,ax=typeof clearTimeout=="function"?clearTimeout:void 0,td=typeof Promise=="function"?Promise:void 0,lx=typeof queueMicrotask=="function"?queueMicrotask:typeof td<"u"?function(e){return td.resolve(null).then(e).catch(cx)}:el;function cx(e){setTimeout(function(){throw e})}function ta(e,t){var n=t,s=0;do{var r=n.nextSibling;if(e.removeChild(n),r&&r.nodeType===8)if(n=r.data,n==="/$"){if(s===0){e.removeChild(r),mr(t);return}s--}else n!=="$"&&n!=="$?"&&n!=="$!"||s++;n=r}while(n);mr(t)}function en(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 nd(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 Ms=Math.random().toString(36).slice(2),wt="__reactFiber$"+Ms,jr="__reactProps$"+Ms,Ot="__reactContainer$"+Ms,tl="__reactEvents$"+Ms,ux="__reactListeners$"+Ms,dx="__reactHandles$"+Ms;function kn(e){var t=e[wt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ot]||n[wt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=nd(e);e!==null;){if(n=e[wt])return n;e=nd(e)}return t}e=n,n=e.parentNode}return null}function Or(e){return e=e[wt]||e[Ot],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Wn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(E(33))}function wo(e){return e[jr]||null}var nl=[],Kn=-1;function pn(e){return{current:e}}function te(e){0>Kn||(e.current=nl[Kn],nl[Kn]=null,Kn--)}function Z(e,t){Kn++,nl[Kn]=e.current,e.current=t}var cn={},Me=pn(cn),Ie=pn(!1),An=cn;function ps(e,t){var n=e.type.contextTypes;if(!n)return cn;var s=e.stateNode;if(s&&s.__reactInternalMemoizedUnmaskedChildContext===t)return s.__reactInternalMemoizedMaskedChildContext;var r={},o;for(o in n)r[o]=t[o];return s&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=r),r}function be(e){return e=e.childContextTypes,e!=null}function Ui(){te(Ie),te(Me)}function sd(e,t,n){if(Me.current!==cn)throw Error(E(168));Z(Me,t),Z(Ie,n)}function mp(e,t,n){var s=e.stateNode;if(t=t.childContextTypes,typeof s.getChildContext!="function")return n;s=s.getChildContext();for(var r in s)if(!(r in t))throw Error(E(108,Qy(e)||"Unknown",r));return le({},n,s)}function Hi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||cn,An=Me.current,Z(Me,e),Z(Ie,Ie.current),!0}function rd(e,t,n){var s=e.stateNode;if(!s)throw Error(E(169));n?(e=mp(e,t,An),s.__reactInternalMemoizedMergedChildContext=e,te(Ie),te(Me),Z(Me,e)):te(Ie),Z(Ie,n)}var Mt=null,So=!1,na=!1;function vp(e){Mt===null?Mt=[e]:Mt.push(e)}function fx(e){So=!0,vp(e)}function mn(){if(!na&&Mt!==null){na=!0;var e=0,t=Y;try{var n=Mt;for(Y=1;e<n.length;e++){var s=n[e];do s=s(!0);while(s!==null)}Mt=null,So=!1}catch(r){throw Mt!==null&&(Mt=Mt.slice(e+1)),$h(Yl,mn),r}finally{Y=t,na=!1}}return null}var Gn=[],qn=0,Wi=null,Ki=0,nt=[],st=0,Dn=null,At=1,Dt="";function xn(e,t){Gn[qn++]=Ki,Gn[qn++]=Wi,Wi=e,Ki=t}function yp(e,t,n){nt[st++]=At,nt[st++]=Dt,nt[st++]=Dn,Dn=e;var s=At;e=Dt;var r=32-mt(s)-1;s&=~(1<<r),n+=1;var o=32-mt(t)+r;if(30<o){var a=r-r%5;o=(s&(1<<a)-1).toString(32),s>>=a,r-=a,At=1<<32-mt(t)+r|n<<r|s,Dt=o+e}else At=1<<o|n<<r|s,Dt=e}function ic(e){e.return!==null&&(xn(e,1),yp(e,1,0))}function oc(e){for(;e===Wi;)Wi=Gn[--qn],Gn[qn]=null,Ki=Gn[--qn],Gn[qn]=null;for(;e===Dn;)Dn=nt[--st],nt[st]=null,Dt=nt[--st],nt[st]=null,At=nt[--st],nt[st]=null}var Ge=null,Ke=null,se=!1,pt=null;function gp(e,t){var n=rt(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 id(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,Ge=e,Ke=en(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ge=e,Ke=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Dn!==null?{id:At,overflow:Dt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=rt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ge=e,Ke=null,!0):!1;default:return!1}}function sl(e){return(e.mode&1)!==0&&(e.flags&128)===0}function rl(e){if(se){var t=Ke;if(t){var n=t;if(!id(e,t)){if(sl(e))throw Error(E(418));t=en(n.nextSibling);var s=Ge;t&&id(e,t)?gp(s,n):(e.flags=e.flags&-4097|2,se=!1,Ge=e)}}else{if(sl(e))throw Error(E(418));e.flags=e.flags&-4097|2,se=!1,Ge=e}}}function od(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ge=e}function ri(e){if(e!==Ge)return!1;if(!se)return od(e),se=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Ja(e.type,e.memoizedProps)),t&&(t=Ke)){if(sl(e))throw xp(),Error(E(418));for(;t;)gp(e,t),t=en(t.nextSibling)}if(od(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(E(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Ke=en(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Ke=null}}else Ke=Ge?en(e.stateNode.nextSibling):null;return!0}function xp(){for(var e=Ke;e;)e=en(e.nextSibling)}function ms(){Ke=Ge=null,se=!1}function ac(e){pt===null?pt=[e]:pt.push(e)}var hx=$t.ReactCurrentBatchConfig;function Os(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(E(309));var s=n.stateNode}if(!s)throw Error(E(147,e));var r=s,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(a){var l=r.refs;a===null?delete l[o]:l[o]=a},t._stringRef=o,t)}if(typeof e!="string")throw Error(E(284));if(!n._owner)throw Error(E(290,e))}return e}function ii(e,t){throw e=Object.prototype.toString.call(t),Error(E(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ad(e){var t=e._init;return t(e._payload)}function jp(e){function t(m,p){if(e){var v=m.deletions;v===null?(m.deletions=[p],m.flags|=16):v.push(p)}}function n(m,p){if(!e)return null;for(;p!==null;)t(m,p),p=p.sibling;return null}function s(m,p){for(m=new Map;p!==null;)p.key!==null?m.set(p.key,p):m.set(p.index,p),p=p.sibling;return m}function r(m,p){return m=rn(m,p),m.index=0,m.sibling=null,m}function o(m,p,v){return m.index=v,e?(v=m.alternate,v!==null?(v=v.index,v<p?(m.flags|=2,p):v):(m.flags|=2,p)):(m.flags|=1048576,p)}function a(m){return e&&m.alternate===null&&(m.flags|=2),m}function l(m,p,v,w){return p===null||p.tag!==6?(p=ca(v,m.mode,w),p.return=m,p):(p=r(p,v),p.return=m,p)}function c(m,p,v,w){var g=v.type;return g===$n?d(m,p,v.props.children,w,v.key):p!==null&&(p.elementType===g||typeof g=="object"&&g!==null&&g.$$typeof===Ht&&ad(g)===p.type)?(w=r(p,v.props),w.ref=Os(m,p,v),w.return=m,w):(w=Mi(v.type,v.key,v.props,null,m.mode,w),w.ref=Os(m,p,v),w.return=m,w)}function u(m,p,v,w){return p===null||p.tag!==4||p.stateNode.containerInfo!==v.containerInfo||p.stateNode.implementation!==v.implementation?(p=ua(v,m.mode,w),p.return=m,p):(p=r(p,v.children||[]),p.return=m,p)}function d(m,p,v,w,g){return p===null||p.tag!==7?(p=En(v,m.mode,w,g),p.return=m,p):(p=r(p,v),p.return=m,p)}function f(m,p,v){if(typeof p=="string"&&p!==""||typeof p=="number")return p=ca(""+p,m.mode,v),p.return=m,p;if(typeof p=="object"&&p!==null){switch(p.$$typeof){case qr:return v=Mi(p.type,p.key,p.props,null,m.mode,v),v.ref=Os(m,null,p),v.return=m,v;case bn:return p=ua(p,m.mode,v),p.return=m,p;case Ht:var w=p._init;return f(m,w(p._payload),v)}if(Us(p)||Rs(p))return p=En(p,m.mode,v,null),p.return=m,p;ii(m,p)}return null}function h(m,p,v,w){var g=p!==null?p.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return g!==null?null:l(m,p,""+v,w);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case qr:return v.key===g?c(m,p,v,w):null;case bn:return v.key===g?u(m,p,v,w):null;case Ht:return g=v._init,h(m,p,g(v._payload),w)}if(Us(v)||Rs(v))return g!==null?null:d(m,p,v,w,null);ii(m,v)}return null}function y(m,p,v,w,g){if(typeof w=="string"&&w!==""||typeof w=="number")return m=m.get(v)||null,l(p,m,""+w,g);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case qr:return m=m.get(w.key===null?v:w.key)||null,c(p,m,w,g);case bn:return m=m.get(w.key===null?v:w.key)||null,u(p,m,w,g);case Ht:var k=w._init;return y(m,p,v,k(w._payload),g)}if(Us(w)||Rs(w))return m=m.get(v)||null,d(p,m,w,g,null);ii(p,w)}return null}function x(m,p,v,w){for(var g=null,k=null,N=p,T=p=0,A=null;N!==null&&T<v.length;T++){N.index>T?(A=N,N=null):A=N.sibling;var P=h(m,N,v[T],w);if(P===null){N===null&&(N=A);break}e&&N&&P.alternate===null&&t(m,N),p=o(P,p,T),k===null?g=P:k.sibling=P,k=P,N=A}if(T===v.length)return n(m,N),se&&xn(m,T),g;if(N===null){for(;T<v.length;T++)N=f(m,v[T],w),N!==null&&(p=o(N,p,T),k===null?g=N:k.sibling=N,k=N);return se&&xn(m,T),g}for(N=s(m,N);T<v.length;T++)A=y(N,m,T,v[T],w),A!==null&&(e&&A.alternate!==null&&N.delete(A.key===null?T:A.key),p=o(A,p,T),k===null?g=A:k.sibling=A,k=A);return e&&N.forEach(function($){return t(m,$)}),se&&xn(m,T),g}function S(m,p,v,w){var g=Rs(v);if(typeof g!="function")throw Error(E(150));if(v=g.call(v),v==null)throw Error(E(151));for(var k=g=null,N=p,T=p=0,A=null,P=v.next();N!==null&&!P.done;T++,P=v.next()){N.index>T?(A=N,N=null):A=N.sibling;var $=h(m,N,P.value,w);if($===null){N===null&&(N=A);break}e&&N&&$.alternate===null&&t(m,N),p=o($,p,T),k===null?g=$:k.sibling=$,k=$,N=A}if(P.done)return n(m,N),se&&xn(m,T),g;if(N===null){for(;!P.done;T++,P=v.next())P=f(m,P.value,w),P!==null&&(p=o(P,p,T),k===null?g=P:k.sibling=P,k=P);return se&&xn(m,T),g}for(N=s(m,N);!P.done;T++,P=v.next())P=y(N,m,T,P.value,w),P!==null&&(e&&P.alternate!==null&&N.delete(P.key===null?T:P.key),p=o(P,p,T),k===null?g=P:k.sibling=P,k=P);return e&&N.forEach(function(b){return t(m,b)}),se&&xn(m,T),g}function C(m,p,v,w){if(typeof v=="object"&&v!==null&&v.type===$n&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case qr:e:{for(var g=v.key,k=p;k!==null;){if(k.key===g){if(g=v.type,g===$n){if(k.tag===7){n(m,k.sibling),p=r(k,v.props.children),p.return=m,m=p;break e}}else if(k.elementType===g||typeof g=="object"&&g!==null&&g.$$typeof===Ht&&ad(g)===k.type){n(m,k.sibling),p=r(k,v.props),p.ref=Os(m,k,v),p.return=m,m=p;break e}n(m,k);break}else t(m,k);k=k.sibling}v.type===$n?(p=En(v.props.children,m.mode,w,v.key),p.return=m,m=p):(w=Mi(v.type,v.key,v.props,null,m.mode,w),w.ref=Os(m,p,v),w.return=m,m=w)}return a(m);case bn:e:{for(k=v.key;p!==null;){if(p.key===k)if(p.tag===4&&p.stateNode.containerInfo===v.containerInfo&&p.stateNode.implementation===v.implementation){n(m,p.sibling),p=r(p,v.children||[]),p.return=m,m=p;break e}else{n(m,p);break}else t(m,p);p=p.sibling}p=ua(v,m.mode,w),p.return=m,m=p}return a(m);case Ht:return k=v._init,C(m,p,k(v._payload),w)}if(Us(v))return x(m,p,v,w);if(Rs(v))return S(m,p,v,w);ii(m,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,p!==null&&p.tag===6?(n(m,p.sibling),p=r(p,v),p.return=m,m=p):(n(m,p),p=ca(v,m.mode,w),p.return=m,m=p),a(m)):n(m,p)}return C}var vs=jp(!0),wp=jp(!1),Gi=pn(null),qi=null,Qn=null,lc=null;function cc(){lc=Qn=qi=null}function uc(e){var t=Gi.current;te(Gi),e._currentValue=t}function il(e,t,n){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===n)break;e=e.return}}function cs(e,t){qi=e,lc=Qn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Fe=!0),e.firstContext=null)}function ot(e){var t=e._currentValue;if(lc!==e)if(e={context:e,memoizedValue:t,next:null},Qn===null){if(qi===null)throw Error(E(308));Qn=e,qi.dependencies={lanes:0,firstContext:e}}else Qn=Qn.next=e;return t}var Nn=null;function dc(e){Nn===null?Nn=[e]:Nn.push(e)}function Sp(e,t,n,s){var r=t.interleaved;return r===null?(n.next=n,dc(t)):(n.next=r.next,r.next=n),t.interleaved=n,Ft(e,s)}function Ft(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 Wt=!1;function fc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function kp(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 Rt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function tn(e,t,n){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,q&2){var r=s.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),s.pending=t,Ft(e,n)}return r=s.interleaved,r===null?(t.next=t,dc(s)):(t.next=r.next,r.next=t),s.interleaved=t,Ft(e,n)}function ki(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var s=t.lanes;s&=e.pendingLanes,n|=s,t.lanes=n,Xl(e,n)}}function ld(e,t){var n=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,n===s)){var r=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?r=o=a:o=o.next=a,n=n.next}while(n!==null);o===null?r=o=t:o=o.next=t}else r=o=t;n={baseState:s.baseState,firstBaseUpdate:r,lastBaseUpdate:o,shared:s.shared,effects:s.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Qi(e,t,n,s){var r=e.updateQueue;Wt=!1;var o=r.firstBaseUpdate,a=r.lastBaseUpdate,l=r.shared.pending;if(l!==null){r.shared.pending=null;var c=l,u=c.next;c.next=null,a===null?o=u:a.next=u,a=c;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==a&&(l===null?d.firstBaseUpdate=u:l.next=u,d.lastBaseUpdate=c))}if(o!==null){var f=r.baseState;a=0,d=u=c=null,l=o;do{var h=l.lane,y=l.eventTime;if((s&h)===h){d!==null&&(d=d.next={eventTime:y,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var x=e,S=l;switch(h=t,y=n,S.tag){case 1:if(x=S.payload,typeof x=="function"){f=x.call(y,f,h);break e}f=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=S.payload,h=typeof x=="function"?x.call(y,f,h):x,h==null)break e;f=le({},f,h);break e;case 2:Wt=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,h=r.effects,h===null?r.effects=[l]:h.push(l))}else y={eventTime:y,lane:h,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(u=d=y,c=f):d=d.next=y,a|=h;if(l=l.next,l===null){if(l=r.shared.pending,l===null)break;h=l,l=h.next,h.next=null,r.lastBaseUpdate=h,r.shared.pending=null}}while(!0);if(d===null&&(c=f),r.baseState=c,r.firstBaseUpdate=u,r.lastBaseUpdate=d,t=r.shared.interleaved,t!==null){r=t;do a|=r.lane,r=r.next;while(r!==t)}else o===null&&(r.shared.lanes=0);_n|=a,e.lanes=a,e.memoizedState=f}}function cd(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var s=e[t],r=s.callback;if(r!==null){if(s.callback=null,s=n,typeof r!="function")throw Error(E(191,r));r.call(s)}}}var Fr={},Nt=pn(Fr),wr=pn(Fr),Sr=pn(Fr);function Cn(e){if(e===Fr)throw Error(E(174));return e}function hc(e,t){switch(Z(Sr,t),Z(wr,e),Z(Nt,Fr),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ia(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ia(t,e)}te(Nt),Z(Nt,t)}function ys(){te(Nt),te(wr),te(Sr)}function Np(e){Cn(Sr.current);var t=Cn(Nt.current),n=Ia(t,e.type);t!==n&&(Z(wr,e),Z(Nt,n))}function pc(e){wr.current===e&&(te(Nt),te(wr))}var ie=pn(0);function Yi(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 sa=[];function mc(){for(var e=0;e<sa.length;e++)sa[e]._workInProgressVersionPrimary=null;sa.length=0}var Ni=$t.ReactCurrentDispatcher,ra=$t.ReactCurrentBatchConfig,Rn=0,ae=null,ve=null,ge=null,Xi=!1,tr=!1,kr=0,px=0;function Ne(){throw Error(E(321))}function vc(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!gt(e[n],t[n]))return!1;return!0}function yc(e,t,n,s,r,o){if(Rn=o,ae=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ni.current=e===null||e.memoizedState===null?gx:xx,e=n(s,r),tr){o=0;do{if(tr=!1,kr=0,25<=o)throw Error(E(301));o+=1,ge=ve=null,t.updateQueue=null,Ni.current=jx,e=n(s,r)}while(tr)}if(Ni.current=Zi,t=ve!==null&&ve.next!==null,Rn=0,ge=ve=ae=null,Xi=!1,t)throw Error(E(300));return e}function gc(){var e=kr!==0;return kr=0,e}function jt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ge===null?ae.memoizedState=ge=e:ge=ge.next=e,ge}function at(){if(ve===null){var e=ae.alternate;e=e!==null?e.memoizedState:null}else e=ve.next;var t=ge===null?ae.memoizedState:ge.next;if(t!==null)ge=t,ve=e;else{if(e===null)throw Error(E(310));ve=e,e={memoizedState:ve.memoizedState,baseState:ve.baseState,baseQueue:ve.baseQueue,queue:ve.queue,next:null},ge===null?ae.memoizedState=ge=e:ge=ge.next=e}return ge}function Nr(e,t){return typeof t=="function"?t(e):t}function ia(e){var t=at(),n=t.queue;if(n===null)throw Error(E(311));n.lastRenderedReducer=e;var s=ve,r=s.baseQueue,o=n.pending;if(o!==null){if(r!==null){var a=r.next;r.next=o.next,o.next=a}s.baseQueue=r=o,n.pending=null}if(r!==null){o=r.next,s=s.baseState;var l=a=null,c=null,u=o;do{var d=u.lane;if((Rn&d)===d)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),s=u.hasEagerState?u.eagerState:e(s,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(l=c=f,a=s):c=c.next=f,ae.lanes|=d,_n|=d}u=u.next}while(u!==null&&u!==o);c===null?a=s:c.next=l,gt(s,t.memoizedState)||(Fe=!0),t.memoizedState=s,t.baseState=a,t.baseQueue=c,n.lastRenderedState=s}if(e=n.interleaved,e!==null){r=e;do o=r.lane,ae.lanes|=o,_n|=o,r=r.next;while(r!==e)}else r===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function oa(e){var t=at(),n=t.queue;if(n===null)throw Error(E(311));n.lastRenderedReducer=e;var s=n.dispatch,r=n.pending,o=t.memoizedState;if(r!==null){n.pending=null;var a=r=r.next;do o=e(o,a.action),a=a.next;while(a!==r);gt(o,t.memoizedState)||(Fe=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,s]}function Cp(){}function Tp(e,t){var n=ae,s=at(),r=t(),o=!gt(s.memoizedState,r);if(o&&(s.memoizedState=r,Fe=!0),s=s.queue,xc(Mp.bind(null,n,s,e),[e]),s.getSnapshot!==t||o||ge!==null&&ge.memoizedState.tag&1){if(n.flags|=2048,Cr(9,Ep.bind(null,n,s,r,t),void 0,null),xe===null)throw Error(E(349));Rn&30||Pp(n,t,r)}return r}function Pp(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ae.updateQueue,t===null?(t={lastEffect:null,stores:null},ae.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ep(e,t,n,s){t.value=n,t.getSnapshot=s,Ap(t)&&Dp(e)}function Mp(e,t,n){return n(function(){Ap(t)&&Dp(e)})}function Ap(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!gt(e,n)}catch{return!0}}function Dp(e){var t=Ft(e,1);t!==null&&vt(t,e,1,-1)}function ud(e){var t=jt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Nr,lastRenderedState:e},t.queue=e,e=e.dispatch=yx.bind(null,ae,e),[t.memoizedState,e]}function Cr(e,t,n,s){return e={tag:e,create:t,destroy:n,deps:s,next:null},t=ae.updateQueue,t===null?(t={lastEffect:null,stores:null},ae.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(s=n.next,n.next=e,e.next=s,t.lastEffect=e)),e}function Rp(){return at().memoizedState}function Ci(e,t,n,s){var r=jt();ae.flags|=e,r.memoizedState=Cr(1|t,n,void 0,s===void 0?null:s)}function ko(e,t,n,s){var r=at();s=s===void 0?null:s;var o=void 0;if(ve!==null){var a=ve.memoizedState;if(o=a.destroy,s!==null&&vc(s,a.deps)){r.memoizedState=Cr(t,n,o,s);return}}ae.flags|=e,r.memoizedState=Cr(1|t,n,o,s)}function dd(e,t){return Ci(8390656,8,e,t)}function xc(e,t){return ko(2048,8,e,t)}function _p(e,t){return ko(4,2,e,t)}function Lp(e,t){return ko(4,4,e,t)}function zp(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 Vp(e,t,n){return n=n!=null?n.concat([e]):null,ko(4,4,zp.bind(null,t,e),n)}function jc(){}function Op(e,t){var n=at();t=t===void 0?null:t;var s=n.memoizedState;return s!==null&&t!==null&&vc(t,s[1])?s[0]:(n.memoizedState=[e,t],e)}function Fp(e,t){var n=at();t=t===void 0?null:t;var s=n.memoizedState;return s!==null&&t!==null&&vc(t,s[1])?s[0]:(e=e(),n.memoizedState=[e,t],e)}function Ip(e,t,n){return Rn&21?(gt(n,t)||(n=Hh(),ae.lanes|=n,_n|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Fe=!0),e.memoizedState=n)}function mx(e,t){var n=Y;Y=n!==0&&4>n?n:4,e(!0);var s=ra.transition;ra.transition={};try{e(!1),t()}finally{Y=n,ra.transition=s}}function bp(){return at().memoizedState}function vx(e,t,n){var s=sn(e);if(n={lane:s,action:n,hasEagerState:!1,eagerState:null,next:null},$p(e))Bp(t,n);else if(n=Sp(e,t,n,s),n!==null){var r=Re();vt(n,e,s,r),Up(n,t,s)}}function yx(e,t,n){var s=sn(e),r={lane:s,action:n,hasEagerState:!1,eagerState:null,next:null};if($p(e))Bp(t,r);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,l=o(a,n);if(r.hasEagerState=!0,r.eagerState=l,gt(l,a)){var c=t.interleaved;c===null?(r.next=r,dc(t)):(r.next=c.next,c.next=r),t.interleaved=r;return}}catch{}finally{}n=Sp(e,t,r,s),n!==null&&(r=Re(),vt(n,e,s,r),Up(n,t,s))}}function $p(e){var t=e.alternate;return e===ae||t!==null&&t===ae}function Bp(e,t){tr=Xi=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Up(e,t,n){if(n&4194240){var s=t.lanes;s&=e.pendingLanes,n|=s,t.lanes=n,Xl(e,n)}}var Zi={readContext:ot,useCallback:Ne,useContext:Ne,useEffect:Ne,useImperativeHandle:Ne,useInsertionEffect:Ne,useLayoutEffect:Ne,useMemo:Ne,useReducer:Ne,useRef:Ne,useState:Ne,useDebugValue:Ne,useDeferredValue:Ne,useTransition:Ne,useMutableSource:Ne,useSyncExternalStore:Ne,useId:Ne,unstable_isNewReconciler:!1},gx={readContext:ot,useCallback:function(e,t){return jt().memoizedState=[e,t===void 0?null:t],e},useContext:ot,useEffect:dd,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ci(4194308,4,zp.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ci(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ci(4,2,e,t)},useMemo:function(e,t){var n=jt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var s=jt();return t=n!==void 0?n(t):t,s.memoizedState=s.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},s.queue=e,e=e.dispatch=vx.bind(null,ae,e),[s.memoizedState,e]},useRef:function(e){var t=jt();return e={current:e},t.memoizedState=e},useState:ud,useDebugValue:jc,useDeferredValue:function(e){return jt().memoizedState=e},useTransition:function(){var e=ud(!1),t=e[0];return e=mx.bind(null,e[1]),jt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var s=ae,r=jt();if(se){if(n===void 0)throw Error(E(407));n=n()}else{if(n=t(),xe===null)throw Error(E(349));Rn&30||Pp(s,t,n)}r.memoizedState=n;var o={value:n,getSnapshot:t};return r.queue=o,dd(Mp.bind(null,s,o,e),[e]),s.flags|=2048,Cr(9,Ep.bind(null,s,o,n,t),void 0,null),n},useId:function(){var e=jt(),t=xe.identifierPrefix;if(se){var n=Dt,s=At;n=(s&~(1<<32-mt(s)-1)).toString(32)+n,t=":"+t+"R"+n,n=kr++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=px++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},xx={readContext:ot,useCallback:Op,useContext:ot,useEffect:xc,useImperativeHandle:Vp,useInsertionEffect:_p,useLayoutEffect:Lp,useMemo:Fp,useReducer:ia,useRef:Rp,useState:function(){return ia(Nr)},useDebugValue:jc,useDeferredValue:function(e){var t=at();return Ip(t,ve.memoizedState,e)},useTransition:function(){var e=ia(Nr)[0],t=at().memoizedState;return[e,t]},useMutableSource:Cp,useSyncExternalStore:Tp,useId:bp,unstable_isNewReconciler:!1},jx={readContext:ot,useCallback:Op,useContext:ot,useEffect:xc,useImperativeHandle:Vp,useInsertionEffect:_p,useLayoutEffect:Lp,useMemo:Fp,useReducer:oa,useRef:Rp,useState:function(){return oa(Nr)},useDebugValue:jc,useDeferredValue:function(e){var t=at();return ve===null?t.memoizedState=e:Ip(t,ve.memoizedState,e)},useTransition:function(){var e=oa(Nr)[0],t=at().memoizedState;return[e,t]},useMutableSource:Cp,useSyncExternalStore:Tp,useId:bp,unstable_isNewReconciler:!1};function ft(e,t){if(e&&e.defaultProps){t=le({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function ol(e,t,n,s){t=e.memoizedState,n=n(s,t),n=n==null?t:le({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var No={isMounted:function(e){return(e=e._reactInternals)?On(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var s=Re(),r=sn(e),o=Rt(s,r);o.payload=t,n!=null&&(o.callback=n),t=tn(e,o,r),t!==null&&(vt(t,e,r,s),ki(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var s=Re(),r=sn(e),o=Rt(s,r);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=tn(e,o,r),t!==null&&(vt(t,e,r,s),ki(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Re(),s=sn(e),r=Rt(n,s);r.tag=2,t!=null&&(r.callback=t),t=tn(e,r,s),t!==null&&(vt(t,e,s,n),ki(t,e,s))}};function fd(e,t,n,s,r,o,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,o,a):t.prototype&&t.prototype.isPureReactComponent?!yr(n,s)||!yr(r,o):!0}function Hp(e,t,n){var s=!1,r=cn,o=t.contextType;return typeof o=="object"&&o!==null?o=ot(o):(r=be(t)?An:Me.current,s=t.contextTypes,o=(s=s!=null)?ps(e,r):cn),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=No,e.stateNode=t,t._reactInternals=e,s&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=r,e.__reactInternalMemoizedMaskedChildContext=o),t}function hd(e,t,n,s){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,s),t.state!==e&&No.enqueueReplaceState(t,t.state,null)}function al(e,t,n,s){var r=e.stateNode;r.props=n,r.state=e.memoizedState,r.refs={},fc(e);var o=t.contextType;typeof o=="object"&&o!==null?r.context=ot(o):(o=be(t)?An:Me.current,r.context=ps(e,o)),r.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(ol(e,t,o,n),r.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof r.getSnapshotBeforeUpdate=="function"||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(t=r.state,typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount(),t!==r.state&&No.enqueueReplaceState(r,r.state,null),Qi(e,n,r,s),r.state=e.memoizedState),typeof r.componentDidMount=="function"&&(e.flags|=4194308)}function gs(e,t){try{var n="",s=t;do n+=qy(s),s=s.return;while(s);var r=n}catch(o){r=`
|
|
39
|
+
Error generating stack: `+o.message+`
|
|
40
|
+
`+o.stack}return{value:e,source:t,stack:r,digest:null}}function aa(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function ll(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var wx=typeof WeakMap=="function"?WeakMap:Map;function Wp(e,t,n){n=Rt(-1,n),n.tag=3,n.payload={element:null};var s=t.value;return n.callback=function(){eo||(eo=!0,gl=s),ll(e,t)},n}function Kp(e,t,n){n=Rt(-1,n),n.tag=3;var s=e.type.getDerivedStateFromError;if(typeof s=="function"){var r=t.value;n.payload=function(){return s(r)},n.callback=function(){ll(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){ll(e,t),typeof s!="function"&&(nn===null?nn=new Set([this]):nn.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function pd(e,t,n){var s=e.pingCache;if(s===null){s=e.pingCache=new wx;var r=new Set;s.set(t,r)}else r=s.get(t),r===void 0&&(r=new Set,s.set(t,r));r.has(n)||(r.add(n),e=zx.bind(null,e,t,n),t.then(e,e))}function md(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 vd(e,t,n,s,r){return e.mode&1?(e.flags|=65536,e.lanes=r,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=Rt(-1,1),t.tag=2,tn(n,t,1))),n.lanes|=1),e)}var Sx=$t.ReactCurrentOwner,Fe=!1;function De(e,t,n,s){t.child=e===null?wp(t,null,n,s):vs(t,e.child,n,s)}function yd(e,t,n,s,r){n=n.render;var o=t.ref;return cs(t,r),s=yc(e,t,n,s,o,r),n=gc(),e!==null&&!Fe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r,It(e,t,r)):(se&&n&&ic(t),t.flags|=1,De(e,t,s,r),t.child)}function gd(e,t,n,s,r){if(e===null){var o=n.type;return typeof o=="function"&&!Ec(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,Gp(e,t,o,s,r)):(e=Mi(n.type,null,s,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&r)){var a=o.memoizedProps;if(n=n.compare,n=n!==null?n:yr,n(a,s)&&e.ref===t.ref)return It(e,t,r)}return t.flags|=1,e=rn(o,s),e.ref=t.ref,e.return=t,t.child=e}function Gp(e,t,n,s,r){if(e!==null){var o=e.memoizedProps;if(yr(o,s)&&e.ref===t.ref)if(Fe=!1,t.pendingProps=s=o,(e.lanes&r)!==0)e.flags&131072&&(Fe=!0);else return t.lanes=e.lanes,It(e,t,r)}return cl(e,t,n,s,r)}function qp(e,t,n){var s=t.pendingProps,r=s.children,o=e!==null?e.memoizedState:null;if(s.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Z(Xn,Ue),Ue|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Z(Xn,Ue),Ue|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},s=o!==null?o.baseLanes:n,Z(Xn,Ue),Ue|=s}else o!==null?(s=o.baseLanes|n,t.memoizedState=null):s=n,Z(Xn,Ue),Ue|=s;return De(e,t,r,n),t.child}function Qp(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function cl(e,t,n,s,r){var o=be(n)?An:Me.current;return o=ps(t,o),cs(t,r),n=yc(e,t,n,s,o,r),s=gc(),e!==null&&!Fe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r,It(e,t,r)):(se&&s&&ic(t),t.flags|=1,De(e,t,n,r),t.child)}function xd(e,t,n,s,r){if(be(n)){var o=!0;Hi(t)}else o=!1;if(cs(t,r),t.stateNode===null)Ti(e,t),Hp(t,n,s),al(t,n,s,r),s=!0;else if(e===null){var a=t.stateNode,l=t.memoizedProps;a.props=l;var c=a.context,u=n.contextType;typeof u=="object"&&u!==null?u=ot(u):(u=be(n)?An:Me.current,u=ps(t,u));var d=n.getDerivedStateFromProps,f=typeof d=="function"||typeof a.getSnapshotBeforeUpdate=="function";f||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==s||c!==u)&&hd(t,a,s,u),Wt=!1;var h=t.memoizedState;a.state=h,Qi(t,s,a,r),c=t.memoizedState,l!==s||h!==c||Ie.current||Wt?(typeof d=="function"&&(ol(t,n,d,s),c=t.memoizedState),(l=Wt||fd(t,n,l,s,h,c,u))?(f||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=c),a.props=s,a.state=c,a.context=u,s=l):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{a=t.stateNode,kp(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:ft(t.type,l),a.props=u,f=t.pendingProps,h=a.context,c=n.contextType,typeof c=="object"&&c!==null?c=ot(c):(c=be(n)?An:Me.current,c=ps(t,c));var y=n.getDerivedStateFromProps;(d=typeof y=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==f||h!==c)&&hd(t,a,s,c),Wt=!1,h=t.memoizedState,a.state=h,Qi(t,s,a,r);var x=t.memoizedState;l!==f||h!==x||Ie.current||Wt?(typeof y=="function"&&(ol(t,n,y,s),x=t.memoizedState),(u=Wt||fd(t,n,u,s,h,x,c)||!1)?(d||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(s,x,c),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(s,x,c)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=x),a.props=s,a.state=x,a.context=c,s=u):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),s=!1)}return ul(e,t,n,s,o,r)}function ul(e,t,n,s,r,o){Qp(e,t);var a=(t.flags&128)!==0;if(!s&&!a)return r&&rd(t,n,!1),It(e,t,o);s=t.stateNode,Sx.current=t;var l=a&&typeof n.getDerivedStateFromError!="function"?null:s.render();return t.flags|=1,e!==null&&a?(t.child=vs(t,e.child,null,o),t.child=vs(t,null,l,o)):De(e,t,l,o),t.memoizedState=s.state,r&&rd(t,n,!0),t.child}function Yp(e){var t=e.stateNode;t.pendingContext?sd(e,t.pendingContext,t.pendingContext!==t.context):t.context&&sd(e,t.context,!1),hc(e,t.containerInfo)}function jd(e,t,n,s,r){return ms(),ac(r),t.flags|=256,De(e,t,n,s),t.child}var dl={dehydrated:null,treeContext:null,retryLane:0};function fl(e){return{baseLanes:e,cachePool:null,transitions:null}}function Xp(e,t,n){var s=t.pendingProps,r=ie.current,o=!1,a=(t.flags&128)!==0,l;if((l=a)||(l=e!==null&&e.memoizedState===null?!1:(r&2)!==0),l?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(r|=1),Z(ie,r&1),e===null)return rl(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):(a=s.children,e=s.fallback,o?(s=t.mode,o=t.child,a={mode:"hidden",children:a},!(s&1)&&o!==null?(o.childLanes=0,o.pendingProps=a):o=Po(a,s,0,null),e=En(e,s,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=fl(n),t.memoizedState=dl,e):wc(t,a));if(r=e.memoizedState,r!==null&&(l=r.dehydrated,l!==null))return kx(e,t,a,s,l,r,n);if(o){o=s.fallback,a=t.mode,r=e.child,l=r.sibling;var c={mode:"hidden",children:s.children};return!(a&1)&&t.child!==r?(s=t.child,s.childLanes=0,s.pendingProps=c,t.deletions=null):(s=rn(r,c),s.subtreeFlags=r.subtreeFlags&14680064),l!==null?o=rn(l,o):(o=En(o,a,n,null),o.flags|=2),o.return=t,s.return=t,s.sibling=o,t.child=s,s=o,o=t.child,a=e.child.memoizedState,a=a===null?fl(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},o.memoizedState=a,o.childLanes=e.childLanes&~n,t.memoizedState=dl,s}return o=e.child,e=o.sibling,s=rn(o,{mode:"visible",children:s.children}),!(t.mode&1)&&(s.lanes=n),s.return=t,s.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=s,t.memoizedState=null,s}function wc(e,t){return t=Po({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function oi(e,t,n,s){return s!==null&&ac(s),vs(t,e.child,null,n),e=wc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function kx(e,t,n,s,r,o,a){if(n)return t.flags&256?(t.flags&=-257,s=aa(Error(E(422))),oi(e,t,a,s)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=s.fallback,r=t.mode,s=Po({mode:"visible",children:s.children},r,0,null),o=En(o,r,a,null),o.flags|=2,s.return=t,o.return=t,s.sibling=o,t.child=s,t.mode&1&&vs(t,e.child,null,a),t.child.memoizedState=fl(a),t.memoizedState=dl,o);if(!(t.mode&1))return oi(e,t,a,null);if(r.data==="$!"){if(s=r.nextSibling&&r.nextSibling.dataset,s)var l=s.dgst;return s=l,o=Error(E(419)),s=aa(o,s,void 0),oi(e,t,a,s)}if(l=(a&e.childLanes)!==0,Fe||l){if(s=xe,s!==null){switch(a&-a){case 4:r=2;break;case 16:r=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:r=32;break;case 536870912:r=268435456;break;default:r=0}r=r&(s.suspendedLanes|a)?0:r,r!==0&&r!==o.retryLane&&(o.retryLane=r,Ft(e,r),vt(s,e,r,-1))}return Pc(),s=aa(Error(E(421))),oi(e,t,a,s)}return r.data==="$?"?(t.flags|=128,t.child=e.child,t=Vx.bind(null,e),r._reactRetry=t,null):(e=o.treeContext,Ke=en(r.nextSibling),Ge=t,se=!0,pt=null,e!==null&&(nt[st++]=At,nt[st++]=Dt,nt[st++]=Dn,At=e.id,Dt=e.overflow,Dn=t),t=wc(t,s.children),t.flags|=4096,t)}function wd(e,t,n){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),il(e.return,t,n)}function la(e,t,n,s,r){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:n,tailMode:r}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=s,o.tail=n,o.tailMode=r)}function Zp(e,t,n){var s=t.pendingProps,r=s.revealOrder,o=s.tail;if(De(e,t,s.children,n),s=ie.current,s&2)s=s&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&&wd(e,n,t);else if(e.tag===19)wd(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}s&=1}if(Z(ie,s),!(t.mode&1))t.memoizedState=null;else switch(r){case"forwards":for(n=t.child,r=null;n!==null;)e=n.alternate,e!==null&&Yi(e)===null&&(r=n),n=n.sibling;n=r,n===null?(r=t.child,t.child=null):(r=n.sibling,n.sibling=null),la(t,!1,r,n,o);break;case"backwards":for(n=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&Yi(e)===null){t.child=r;break}e=r.sibling,r.sibling=n,n=r,r=e}la(t,!0,n,null,o);break;case"together":la(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ti(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function It(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),_n|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(E(153));if(t.child!==null){for(e=t.child,n=rn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=rn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Nx(e,t,n){switch(t.tag){case 3:Yp(t),ms();break;case 5:Np(t);break;case 1:be(t.type)&&Hi(t);break;case 4:hc(t,t.stateNode.containerInfo);break;case 10:var s=t.type._context,r=t.memoizedProps.value;Z(Gi,s._currentValue),s._currentValue=r;break;case 13:if(s=t.memoizedState,s!==null)return s.dehydrated!==null?(Z(ie,ie.current&1),t.flags|=128,null):n&t.child.childLanes?Xp(e,t,n):(Z(ie,ie.current&1),e=It(e,t,n),e!==null?e.sibling:null);Z(ie,ie.current&1);break;case 19:if(s=(n&t.childLanes)!==0,e.flags&128){if(s)return Zp(e,t,n);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),Z(ie,ie.current),s)break;return null;case 22:case 23:return t.lanes=0,qp(e,t,n)}return It(e,t,n)}var Jp,hl,em,tm;Jp=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}};hl=function(){};em=function(e,t,n,s){var r=e.memoizedProps;if(r!==s){e=t.stateNode,Cn(Nt.current);var o=null;switch(n){case"input":r=za(e,r),s=za(e,s),o=[];break;case"select":r=le({},r,{value:void 0}),s=le({},s,{value:void 0}),o=[];break;case"textarea":r=Fa(e,r),s=Fa(e,s),o=[];break;default:typeof r.onClick!="function"&&typeof s.onClick=="function"&&(e.onclick=Bi)}ba(n,s);var a;n=null;for(u in r)if(!s.hasOwnProperty(u)&&r.hasOwnProperty(u)&&r[u]!=null)if(u==="style"){var l=r[u];for(a in l)l.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(ur.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in s){var c=s[u];if(l=r!=null?r[u]:void 0,s.hasOwnProperty(u)&&c!==l&&(c!=null||l!=null))if(u==="style")if(l){for(a in l)!l.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in c)c.hasOwnProperty(a)&&l[a]!==c[a]&&(n||(n={}),n[a]=c[a])}else n||(o||(o=[]),o.push(u,n)),n=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(o=o||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(o=o||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(ur.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&ee("scroll",e),o||l===c||(o=[])):(o=o||[]).push(u,c))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};tm=function(e,t,n,s){n!==s&&(t.flags|=4)};function Fs(e,t){if(!se)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 s=null;n!==null;)n.alternate!==null&&(s=n),n=n.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function Ce(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,s=0;if(t)for(var r=e.child;r!==null;)n|=r.lanes|r.childLanes,s|=r.subtreeFlags&14680064,s|=r.flags&14680064,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)n|=r.lanes|r.childLanes,s|=r.subtreeFlags,s|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=s,e.childLanes=n,t}function Cx(e,t,n){var s=t.pendingProps;switch(oc(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ce(t),null;case 1:return be(t.type)&&Ui(),Ce(t),null;case 3:return s=t.stateNode,ys(),te(Ie),te(Me),mc(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(ri(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,pt!==null&&(wl(pt),pt=null))),hl(e,t),Ce(t),null;case 5:pc(t);var r=Cn(Sr.current);if(n=t.type,e!==null&&t.stateNode!=null)em(e,t,n,s,r),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!s){if(t.stateNode===null)throw Error(E(166));return Ce(t),null}if(e=Cn(Nt.current),ri(t)){s=t.stateNode,n=t.type;var o=t.memoizedProps;switch(s[wt]=t,s[jr]=o,e=(t.mode&1)!==0,n){case"dialog":ee("cancel",s),ee("close",s);break;case"iframe":case"object":case"embed":ee("load",s);break;case"video":case"audio":for(r=0;r<Ws.length;r++)ee(Ws[r],s);break;case"source":ee("error",s);break;case"img":case"image":case"link":ee("error",s),ee("load",s);break;case"details":ee("toggle",s);break;case"input":Au(s,o),ee("invalid",s);break;case"select":s._wrapperState={wasMultiple:!!o.multiple},ee("invalid",s);break;case"textarea":Ru(s,o),ee("invalid",s)}ba(n,o),r=null;for(var a in o)if(o.hasOwnProperty(a)){var l=o[a];a==="children"?typeof l=="string"?s.textContent!==l&&(o.suppressHydrationWarning!==!0&&si(s.textContent,l,e),r=["children",l]):typeof l=="number"&&s.textContent!==""+l&&(o.suppressHydrationWarning!==!0&&si(s.textContent,l,e),r=["children",""+l]):ur.hasOwnProperty(a)&&l!=null&&a==="onScroll"&&ee("scroll",s)}switch(n){case"input":Qr(s),Du(s,o,!0);break;case"textarea":Qr(s),_u(s);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(s.onclick=Bi)}s=r,t.updateQueue=s,s!==null&&(t.flags|=4)}else{a=r.nodeType===9?r:r.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Mh(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof s.is=="string"?e=a.createElement(n,{is:s.is}):(e=a.createElement(n),n==="select"&&(a=e,s.multiple?a.multiple=!0:s.size&&(a.size=s.size))):e=a.createElementNS(e,n),e[wt]=t,e[jr]=s,Jp(e,t,!1,!1),t.stateNode=e;e:{switch(a=$a(n,s),n){case"dialog":ee("cancel",e),ee("close",e),r=s;break;case"iframe":case"object":case"embed":ee("load",e),r=s;break;case"video":case"audio":for(r=0;r<Ws.length;r++)ee(Ws[r],e);r=s;break;case"source":ee("error",e),r=s;break;case"img":case"image":case"link":ee("error",e),ee("load",e),r=s;break;case"details":ee("toggle",e),r=s;break;case"input":Au(e,s),r=za(e,s),ee("invalid",e);break;case"option":r=s;break;case"select":e._wrapperState={wasMultiple:!!s.multiple},r=le({},s,{value:void 0}),ee("invalid",e);break;case"textarea":Ru(e,s),r=Fa(e,s),ee("invalid",e);break;default:r=s}ba(n,r),l=r;for(o in l)if(l.hasOwnProperty(o)){var c=l[o];o==="style"?Rh(e,c):o==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&Ah(e,c)):o==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&dr(e,c):typeof c=="number"&&dr(e,""+c):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(ur.hasOwnProperty(o)?c!=null&&o==="onScroll"&&ee("scroll",e):c!=null&&Wl(e,o,c,a))}switch(n){case"input":Qr(e),Du(e,s,!1);break;case"textarea":Qr(e),_u(e);break;case"option":s.value!=null&&e.setAttribute("value",""+ln(s.value));break;case"select":e.multiple=!!s.multiple,o=s.value,o!=null?is(e,!!s.multiple,o,!1):s.defaultValue!=null&&is(e,!!s.multiple,s.defaultValue,!0);break;default:typeof r.onClick=="function"&&(e.onclick=Bi)}switch(n){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}}s&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Ce(t),null;case 6:if(e&&t.stateNode!=null)tm(e,t,e.memoizedProps,s);else{if(typeof s!="string"&&t.stateNode===null)throw Error(E(166));if(n=Cn(Sr.current),Cn(Nt.current),ri(t)){if(s=t.stateNode,n=t.memoizedProps,s[wt]=t,(o=s.nodeValue!==n)&&(e=Ge,e!==null))switch(e.tag){case 3:si(s.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&si(s.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else s=(n.nodeType===9?n:n.ownerDocument).createTextNode(s),s[wt]=t,t.stateNode=s}return Ce(t),null;case 13:if(te(ie),s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(se&&Ke!==null&&t.mode&1&&!(t.flags&128))xp(),ms(),t.flags|=98560,o=!1;else if(o=ri(t),s!==null&&s.dehydrated!==null){if(e===null){if(!o)throw Error(E(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(E(317));o[wt]=t}else ms(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ce(t),o=!1}else pt!==null&&(wl(pt),pt=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(s=s!==null,s!==(e!==null&&e.memoizedState!==null)&&s&&(t.child.flags|=8192,t.mode&1&&(e===null||ie.current&1?ye===0&&(ye=3):Pc())),t.updateQueue!==null&&(t.flags|=4),Ce(t),null);case 4:return ys(),hl(e,t),e===null&&gr(t.stateNode.containerInfo),Ce(t),null;case 10:return uc(t.type._context),Ce(t),null;case 17:return be(t.type)&&Ui(),Ce(t),null;case 19:if(te(ie),o=t.memoizedState,o===null)return Ce(t),null;if(s=(t.flags&128)!==0,a=o.rendering,a===null)if(s)Fs(o,!1);else{if(ye!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=Yi(e),a!==null){for(t.flags|=128,Fs(o,!1),s=a.updateQueue,s!==null&&(t.updateQueue=s,t.flags|=4),t.subtreeFlags=0,s=n,n=t.child;n!==null;)o=n,e=s,o.flags&=14680066,a=o.alternate,a===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=a.childLanes,o.lanes=a.lanes,o.child=a.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=a.memoizedProps,o.memoizedState=a.memoizedState,o.updateQueue=a.updateQueue,o.type=a.type,e=a.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Z(ie,ie.current&1|2),t.child}e=e.sibling}o.tail!==null&&pe()>xs&&(t.flags|=128,s=!0,Fs(o,!1),t.lanes=4194304)}else{if(!s)if(e=Yi(a),e!==null){if(t.flags|=128,s=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Fs(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!se)return Ce(t),null}else 2*pe()-o.renderingStartTime>xs&&n!==1073741824&&(t.flags|=128,s=!0,Fs(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=pe(),t.sibling=null,n=ie.current,Z(ie,s?n&1|2:n&1),t):(Ce(t),null);case 22:case 23:return Tc(),s=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==s&&(t.flags|=8192),s&&t.mode&1?Ue&1073741824&&(Ce(t),t.subtreeFlags&6&&(t.flags|=8192)):Ce(t),null;case 24:return null;case 25:return null}throw Error(E(156,t.tag))}function Tx(e,t){switch(oc(t),t.tag){case 1:return be(t.type)&&Ui(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ys(),te(Ie),te(Me),mc(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return pc(t),null;case 13:if(te(ie),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(E(340));ms()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return te(ie),null;case 4:return ys(),null;case 10:return uc(t.type._context),null;case 22:case 23:return Tc(),null;case 24:return null;default:return null}}var ai=!1,Pe=!1,Px=typeof WeakSet=="function"?WeakSet:Set,D=null;function Yn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(s){ue(e,t,s)}else n.current=null}function pl(e,t,n){try{n()}catch(s){ue(e,t,s)}}var Sd=!1;function Ex(e,t){if(Xa=Ii,e=op(),rc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var s=n.getSelection&&n.getSelection();if(s&&s.rangeCount!==0){n=s.anchorNode;var r=s.anchorOffset,o=s.focusNode;s=s.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,l=-1,c=-1,u=0,d=0,f=e,h=null;t:for(;;){for(var y;f!==n||r!==0&&f.nodeType!==3||(l=a+r),f!==o||s!==0&&f.nodeType!==3||(c=a+s),f.nodeType===3&&(a+=f.nodeValue.length),(y=f.firstChild)!==null;)h=f,f=y;for(;;){if(f===e)break t;if(h===n&&++u===r&&(l=a),h===o&&++d===s&&(c=a),(y=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=y}n=l===-1||c===-1?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Za={focusedElem:e,selectionRange:n},Ii=!1,D=t;D!==null;)if(t=D,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,D=e;else for(;D!==null;){t=D;try{var x=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(x!==null){var S=x.memoizedProps,C=x.memoizedState,m=t.stateNode,p=m.getSnapshotBeforeUpdate(t.elementType===t.type?S:ft(t.type,S),C);m.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(E(163))}}catch(w){ue(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,D=e;break}D=t.return}return x=Sd,Sd=!1,x}function nr(e,t,n){var s=t.updateQueue;if(s=s!==null?s.lastEffect:null,s!==null){var r=s=s.next;do{if((r.tag&e)===e){var o=r.destroy;r.destroy=void 0,o!==void 0&&pl(t,n,o)}r=r.next}while(r!==s)}}function Co(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 s=n.create;n.destroy=s()}n=n.next}while(n!==t)}}function ml(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 nm(e){var t=e.alternate;t!==null&&(e.alternate=null,nm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[wt],delete t[jr],delete t[tl],delete t[ux],delete t[dx])),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 sm(e){return e.tag===5||e.tag===3||e.tag===4}function kd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||sm(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 vl(e,t,n){var s=e.tag;if(s===5||s===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=Bi));else if(s!==4&&(e=e.child,e!==null))for(vl(e,t,n),e=e.sibling;e!==null;)vl(e,t,n),e=e.sibling}function yl(e,t,n){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(s!==4&&(e=e.child,e!==null))for(yl(e,t,n),e=e.sibling;e!==null;)yl(e,t,n),e=e.sibling}var je=null,ht=!1;function Bt(e,t,n){for(n=n.child;n!==null;)rm(e,t,n),n=n.sibling}function rm(e,t,n){if(kt&&typeof kt.onCommitFiberUnmount=="function")try{kt.onCommitFiberUnmount(yo,n)}catch{}switch(n.tag){case 5:Pe||Yn(n,t);case 6:var s=je,r=ht;je=null,Bt(e,t,n),je=s,ht=r,je!==null&&(ht?(e=je,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):je.removeChild(n.stateNode));break;case 18:je!==null&&(ht?(e=je,n=n.stateNode,e.nodeType===8?ta(e.parentNode,n):e.nodeType===1&&ta(e,n),mr(e)):ta(je,n.stateNode));break;case 4:s=je,r=ht,je=n.stateNode.containerInfo,ht=!0,Bt(e,t,n),je=s,ht=r;break;case 0:case 11:case 14:case 15:if(!Pe&&(s=n.updateQueue,s!==null&&(s=s.lastEffect,s!==null))){r=s=s.next;do{var o=r,a=o.destroy;o=o.tag,a!==void 0&&(o&2||o&4)&&pl(n,t,a),r=r.next}while(r!==s)}Bt(e,t,n);break;case 1:if(!Pe&&(Yn(n,t),s=n.stateNode,typeof s.componentWillUnmount=="function"))try{s.props=n.memoizedProps,s.state=n.memoizedState,s.componentWillUnmount()}catch(l){ue(n,t,l)}Bt(e,t,n);break;case 21:Bt(e,t,n);break;case 22:n.mode&1?(Pe=(s=Pe)||n.memoizedState!==null,Bt(e,t,n),Pe=s):Bt(e,t,n);break;default:Bt(e,t,n)}}function Nd(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Px),t.forEach(function(s){var r=Ox.bind(null,e,s);n.has(s)||(n.add(s),s.then(r,r))})}}function ut(e,t){var n=t.deletions;if(n!==null)for(var s=0;s<n.length;s++){var r=n[s];try{var o=e,a=t,l=a;e:for(;l!==null;){switch(l.tag){case 5:je=l.stateNode,ht=!1;break e;case 3:je=l.stateNode.containerInfo,ht=!0;break e;case 4:je=l.stateNode.containerInfo,ht=!0;break e}l=l.return}if(je===null)throw Error(E(160));rm(o,a,r),je=null,ht=!1;var c=r.alternate;c!==null&&(c.return=null),r.return=null}catch(u){ue(r,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)im(t,e),t=t.sibling}function im(e,t){var n=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ut(t,e),xt(e),s&4){try{nr(3,e,e.return),Co(3,e)}catch(S){ue(e,e.return,S)}try{nr(5,e,e.return)}catch(S){ue(e,e.return,S)}}break;case 1:ut(t,e),xt(e),s&512&&n!==null&&Yn(n,n.return);break;case 5:if(ut(t,e),xt(e),s&512&&n!==null&&Yn(n,n.return),e.flags&32){var r=e.stateNode;try{dr(r,"")}catch(S){ue(e,e.return,S)}}if(s&4&&(r=e.stateNode,r!=null)){var o=e.memoizedProps,a=n!==null?n.memoizedProps:o,l=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{l==="input"&&o.type==="radio"&&o.name!=null&&Ph(r,o),$a(l,a);var u=$a(l,o);for(a=0;a<c.length;a+=2){var d=c[a],f=c[a+1];d==="style"?Rh(r,f):d==="dangerouslySetInnerHTML"?Ah(r,f):d==="children"?dr(r,f):Wl(r,d,f,u)}switch(l){case"input":Va(r,o);break;case"textarea":Eh(r,o);break;case"select":var h=r._wrapperState.wasMultiple;r._wrapperState.wasMultiple=!!o.multiple;var y=o.value;y!=null?is(r,!!o.multiple,y,!1):h!==!!o.multiple&&(o.defaultValue!=null?is(r,!!o.multiple,o.defaultValue,!0):is(r,!!o.multiple,o.multiple?[]:"",!1))}r[jr]=o}catch(S){ue(e,e.return,S)}}break;case 6:if(ut(t,e),xt(e),s&4){if(e.stateNode===null)throw Error(E(162));r=e.stateNode,o=e.memoizedProps;try{r.nodeValue=o}catch(S){ue(e,e.return,S)}}break;case 3:if(ut(t,e),xt(e),s&4&&n!==null&&n.memoizedState.isDehydrated)try{mr(t.containerInfo)}catch(S){ue(e,e.return,S)}break;case 4:ut(t,e),xt(e);break;case 13:ut(t,e),xt(e),r=e.child,r.flags&8192&&(o=r.memoizedState!==null,r.stateNode.isHidden=o,!o||r.alternate!==null&&r.alternate.memoizedState!==null||(Nc=pe())),s&4&&Nd(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(Pe=(u=Pe)||d,ut(t,e),Pe=u):ut(t,e),xt(e),s&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(D=e,d=e.child;d!==null;){for(f=D=d;D!==null;){switch(h=D,y=h.child,h.tag){case 0:case 11:case 14:case 15:nr(4,h,h.return);break;case 1:Yn(h,h.return);var x=h.stateNode;if(typeof x.componentWillUnmount=="function"){s=h,n=h.return;try{t=s,x.props=t.memoizedProps,x.state=t.memoizedState,x.componentWillUnmount()}catch(S){ue(s,n,S)}}break;case 5:Yn(h,h.return);break;case 22:if(h.memoizedState!==null){Td(f);continue}}y!==null?(y.return=h,D=y):Td(f)}d=d.sibling}e:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{r=f.stateNode,u?(o=r.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(l=f.stateNode,c=f.memoizedProps.style,a=c!=null&&c.hasOwnProperty("display")?c.display:null,l.style.display=Dh("display",a))}catch(S){ue(e,e.return,S)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(S){ue(e,e.return,S)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:ut(t,e),xt(e),s&4&&Nd(e);break;case 21:break;default:ut(t,e),xt(e)}}function xt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(sm(n)){var s=n;break e}n=n.return}throw Error(E(160))}switch(s.tag){case 5:var r=s.stateNode;s.flags&32&&(dr(r,""),s.flags&=-33);var o=kd(e);yl(e,o,r);break;case 3:case 4:var a=s.stateNode.containerInfo,l=kd(e);vl(e,l,a);break;default:throw Error(E(161))}}catch(c){ue(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Mx(e,t,n){D=e,om(e)}function om(e,t,n){for(var s=(e.mode&1)!==0;D!==null;){var r=D,o=r.child;if(r.tag===22&&s){var a=r.memoizedState!==null||ai;if(!a){var l=r.alternate,c=l!==null&&l.memoizedState!==null||Pe;l=ai;var u=Pe;if(ai=a,(Pe=c)&&!u)for(D=r;D!==null;)a=D,c=a.child,a.tag===22&&a.memoizedState!==null?Pd(r):c!==null?(c.return=a,D=c):Pd(r);for(;o!==null;)D=o,om(o),o=o.sibling;D=r,ai=l,Pe=u}Cd(e)}else r.subtreeFlags&8772&&o!==null?(o.return=r,D=o):Cd(e)}}function Cd(e){for(;D!==null;){var t=D;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Pe||Co(5,t);break;case 1:var s=t.stateNode;if(t.flags&4&&!Pe)if(n===null)s.componentDidMount();else{var r=t.elementType===t.type?n.memoizedProps:ft(t.type,n.memoizedProps);s.componentDidUpdate(r,n.memoizedState,s.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&cd(t,o,s);break;case 3:var a=t.updateQueue;if(a!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}cd(t,a,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.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 d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&mr(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(E(163))}Pe||t.flags&512&&ml(t)}catch(h){ue(t,t.return,h)}}if(t===e){D=null;break}if(n=t.sibling,n!==null){n.return=t.return,D=n;break}D=t.return}}function Td(e){for(;D!==null;){var t=D;if(t===e){D=null;break}var n=t.sibling;if(n!==null){n.return=t.return,D=n;break}D=t.return}}function Pd(e){for(;D!==null;){var t=D;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Co(4,t)}catch(c){ue(t,n,c)}break;case 1:var s=t.stateNode;if(typeof s.componentDidMount=="function"){var r=t.return;try{s.componentDidMount()}catch(c){ue(t,r,c)}}var o=t.return;try{ml(t)}catch(c){ue(t,o,c)}break;case 5:var a=t.return;try{ml(t)}catch(c){ue(t,a,c)}}}catch(c){ue(t,t.return,c)}if(t===e){D=null;break}var l=t.sibling;if(l!==null){l.return=t.return,D=l;break}D=t.return}}var Ax=Math.ceil,Ji=$t.ReactCurrentDispatcher,Sc=$t.ReactCurrentOwner,it=$t.ReactCurrentBatchConfig,q=0,xe=null,me=null,Se=0,Ue=0,Xn=pn(0),ye=0,Tr=null,_n=0,To=0,kc=0,sr=null,Oe=null,Nc=0,xs=1/0,Et=null,eo=!1,gl=null,nn=null,li=!1,Qt=null,to=0,rr=0,xl=null,Pi=-1,Ei=0;function Re(){return q&6?pe():Pi!==-1?Pi:Pi=pe()}function sn(e){return e.mode&1?q&2&&Se!==0?Se&-Se:hx.transition!==null?(Ei===0&&(Ei=Hh()),Ei):(e=Y,e!==0||(e=window.event,e=e===void 0?16:Xh(e.type)),e):1}function vt(e,t,n,s){if(50<rr)throw rr=0,xl=null,Error(E(185));zr(e,n,s),(!(q&2)||e!==xe)&&(e===xe&&(!(q&2)&&(To|=n),ye===4&&Gt(e,Se)),$e(e,s),n===1&&q===0&&!(t.mode&1)&&(xs=pe()+500,So&&mn()))}function $e(e,t){var n=e.callbackNode;hg(e,t);var s=Fi(e,e===xe?Se:0);if(s===0)n!==null&&Vu(n),e.callbackNode=null,e.callbackPriority=0;else if(t=s&-s,e.callbackPriority!==t){if(n!=null&&Vu(n),t===1)e.tag===0?fx(Ed.bind(null,e)):vp(Ed.bind(null,e)),lx(function(){!(q&6)&&mn()}),n=null;else{switch(Wh(s)){case 1:n=Yl;break;case 4:n=Bh;break;case 16:n=Oi;break;case 536870912:n=Uh;break;default:n=Oi}n=pm(n,am.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function am(e,t){if(Pi=-1,Ei=0,q&6)throw Error(E(327));var n=e.callbackNode;if(us()&&e.callbackNode!==n)return null;var s=Fi(e,e===xe?Se:0);if(s===0)return null;if(s&30||s&e.expiredLanes||t)t=no(e,s);else{t=s;var r=q;q|=2;var o=cm();(xe!==e||Se!==t)&&(Et=null,xs=pe()+500,Pn(e,t));do try{_x();break}catch(l){lm(e,l)}while(!0);cc(),Ji.current=o,q=r,me!==null?t=0:(xe=null,Se=0,t=ye)}if(t!==0){if(t===2&&(r=Ka(e),r!==0&&(s=r,t=jl(e,r))),t===1)throw n=Tr,Pn(e,0),Gt(e,s),$e(e,pe()),n;if(t===6)Gt(e,s);else{if(r=e.current.alternate,!(s&30)&&!Dx(r)&&(t=no(e,s),t===2&&(o=Ka(e),o!==0&&(s=o,t=jl(e,o))),t===1))throw n=Tr,Pn(e,0),Gt(e,s),$e(e,pe()),n;switch(e.finishedWork=r,e.finishedLanes=s,t){case 0:case 1:throw Error(E(345));case 2:jn(e,Oe,Et);break;case 3:if(Gt(e,s),(s&130023424)===s&&(t=Nc+500-pe(),10<t)){if(Fi(e,0)!==0)break;if(r=e.suspendedLanes,(r&s)!==s){Re(),e.pingedLanes|=e.suspendedLanes&r;break}e.timeoutHandle=el(jn.bind(null,e,Oe,Et),t);break}jn(e,Oe,Et);break;case 4:if(Gt(e,s),(s&4194240)===s)break;for(t=e.eventTimes,r=-1;0<s;){var a=31-mt(s);o=1<<a,a=t[a],a>r&&(r=a),s&=~o}if(s=r,s=pe()-s,s=(120>s?120:480>s?480:1080>s?1080:1920>s?1920:3e3>s?3e3:4320>s?4320:1960*Ax(s/1960))-s,10<s){e.timeoutHandle=el(jn.bind(null,e,Oe,Et),s);break}jn(e,Oe,Et);break;case 5:jn(e,Oe,Et);break;default:throw Error(E(329))}}}return $e(e,pe()),e.callbackNode===n?am.bind(null,e):null}function jl(e,t){var n=sr;return e.current.memoizedState.isDehydrated&&(Pn(e,t).flags|=256),e=no(e,t),e!==2&&(t=Oe,Oe=n,t!==null&&wl(t)),e}function wl(e){Oe===null?Oe=e:Oe.push.apply(Oe,e)}function Dx(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var s=0;s<n.length;s++){var r=n[s],o=r.getSnapshot;r=r.value;try{if(!gt(o(),r))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 Gt(e,t){for(t&=~kc,t&=~To,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-mt(t),s=1<<n;e[n]=-1,t&=~s}}function Ed(e){if(q&6)throw Error(E(327));us();var t=Fi(e,0);if(!(t&1))return $e(e,pe()),null;var n=no(e,t);if(e.tag!==0&&n===2){var s=Ka(e);s!==0&&(t=s,n=jl(e,s))}if(n===1)throw n=Tr,Pn(e,0),Gt(e,t),$e(e,pe()),n;if(n===6)throw Error(E(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,jn(e,Oe,Et),$e(e,pe()),null}function Cc(e,t){var n=q;q|=1;try{return e(t)}finally{q=n,q===0&&(xs=pe()+500,So&&mn())}}function Ln(e){Qt!==null&&Qt.tag===0&&!(q&6)&&us();var t=q;q|=1;var n=it.transition,s=Y;try{if(it.transition=null,Y=1,e)return e()}finally{Y=s,it.transition=n,q=t,!(q&6)&&mn()}}function Tc(){Ue=Xn.current,te(Xn)}function Pn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,ax(n)),me!==null)for(n=me.return;n!==null;){var s=n;switch(oc(s),s.tag){case 1:s=s.type.childContextTypes,s!=null&&Ui();break;case 3:ys(),te(Ie),te(Me),mc();break;case 5:pc(s);break;case 4:ys();break;case 13:te(ie);break;case 19:te(ie);break;case 10:uc(s.type._context);break;case 22:case 23:Tc()}n=n.return}if(xe=e,me=e=rn(e.current,null),Se=Ue=t,ye=0,Tr=null,kc=To=_n=0,Oe=sr=null,Nn!==null){for(t=0;t<Nn.length;t++)if(n=Nn[t],s=n.interleaved,s!==null){n.interleaved=null;var r=s.next,o=n.pending;if(o!==null){var a=o.next;o.next=r,s.next=a}n.pending=s}Nn=null}return e}function lm(e,t){do{var n=me;try{if(cc(),Ni.current=Zi,Xi){for(var s=ae.memoizedState;s!==null;){var r=s.queue;r!==null&&(r.pending=null),s=s.next}Xi=!1}if(Rn=0,ge=ve=ae=null,tr=!1,kr=0,Sc.current=null,n===null||n.return===null){ye=1,Tr=t,me=null;break}e:{var o=e,a=n.return,l=n,c=t;if(t=Se,l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,d=l,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var h=d.alternate;h?(d.updateQueue=h.updateQueue,d.memoizedState=h.memoizedState,d.lanes=h.lanes):(d.updateQueue=null,d.memoizedState=null)}var y=md(a);if(y!==null){y.flags&=-257,vd(y,a,l,o,t),y.mode&1&&pd(o,u,t),t=y,c=u;var x=t.updateQueue;if(x===null){var S=new Set;S.add(c),t.updateQueue=S}else x.add(c);break e}else{if(!(t&1)){pd(o,u,t),Pc();break e}c=Error(E(426))}}else if(se&&l.mode&1){var C=md(a);if(C!==null){!(C.flags&65536)&&(C.flags|=256),vd(C,a,l,o,t),ac(gs(c,l));break e}}o=c=gs(c,l),ye!==4&&(ye=2),sr===null?sr=[o]:sr.push(o),o=a;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var m=Wp(o,c,t);ld(o,m);break e;case 1:l=c;var p=o.type,v=o.stateNode;if(!(o.flags&128)&&(typeof p.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(nn===null||!nn.has(v)))){o.flags|=65536,t&=-t,o.lanes|=t;var w=Kp(o,l,t);ld(o,w);break e}}o=o.return}while(o!==null)}dm(n)}catch(g){t=g,me===n&&n!==null&&(me=n=n.return);continue}break}while(!0)}function cm(){var e=Ji.current;return Ji.current=Zi,e===null?Zi:e}function Pc(){(ye===0||ye===3||ye===2)&&(ye=4),xe===null||!(_n&268435455)&&!(To&268435455)||Gt(xe,Se)}function no(e,t){var n=q;q|=2;var s=cm();(xe!==e||Se!==t)&&(Et=null,Pn(e,t));do try{Rx();break}catch(r){lm(e,r)}while(!0);if(cc(),q=n,Ji.current=s,me!==null)throw Error(E(261));return xe=null,Se=0,ye}function Rx(){for(;me!==null;)um(me)}function _x(){for(;me!==null&&!rg();)um(me)}function um(e){var t=hm(e.alternate,e,Ue);e.memoizedProps=e.pendingProps,t===null?dm(e):me=t,Sc.current=null}function dm(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Tx(n,t),n!==null){n.flags&=32767,me=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ye=6,me=null;return}}else if(n=Cx(n,t,Ue),n!==null){me=n;return}if(t=t.sibling,t!==null){me=t;return}me=t=e}while(t!==null);ye===0&&(ye=5)}function jn(e,t,n){var s=Y,r=it.transition;try{it.transition=null,Y=1,Lx(e,t,n,s)}finally{it.transition=r,Y=s}return null}function Lx(e,t,n,s){do us();while(Qt!==null);if(q&6)throw Error(E(327));n=e.finishedWork;var r=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(E(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(pg(e,o),e===xe&&(me=xe=null,Se=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||li||(li=!0,pm(Oi,function(){return us(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=it.transition,it.transition=null;var a=Y;Y=1;var l=q;q|=4,Sc.current=null,Ex(e,n),im(n,e),ex(Za),Ii=!!Xa,Za=Xa=null,e.current=n,Mx(n),ig(),q=l,Y=a,it.transition=o}else e.current=n;if(li&&(li=!1,Qt=e,to=r),o=e.pendingLanes,o===0&&(nn=null),lg(n.stateNode),$e(e,pe()),t!==null)for(s=e.onRecoverableError,n=0;n<t.length;n++)r=t[n],s(r.value,{componentStack:r.stack,digest:r.digest});if(eo)throw eo=!1,e=gl,gl=null,e;return to&1&&e.tag!==0&&us(),o=e.pendingLanes,o&1?e===xl?rr++:(rr=0,xl=e):rr=0,mn(),null}function us(){if(Qt!==null){var e=Wh(to),t=it.transition,n=Y;try{if(it.transition=null,Y=16>e?16:e,Qt===null)var s=!1;else{if(e=Qt,Qt=null,to=0,q&6)throw Error(E(331));var r=q;for(q|=4,D=e.current;D!==null;){var o=D,a=o.child;if(D.flags&16){var l=o.deletions;if(l!==null){for(var c=0;c<l.length;c++){var u=l[c];for(D=u;D!==null;){var d=D;switch(d.tag){case 0:case 11:case 15:nr(8,d,o)}var f=d.child;if(f!==null)f.return=d,D=f;else for(;D!==null;){d=D;var h=d.sibling,y=d.return;if(nm(d),d===u){D=null;break}if(h!==null){h.return=y,D=h;break}D=y}}}var x=o.alternate;if(x!==null){var S=x.child;if(S!==null){x.child=null;do{var C=S.sibling;S.sibling=null,S=C}while(S!==null)}}D=o}}if(o.subtreeFlags&2064&&a!==null)a.return=o,D=a;else e:for(;D!==null;){if(o=D,o.flags&2048)switch(o.tag){case 0:case 11:case 15:nr(9,o,o.return)}var m=o.sibling;if(m!==null){m.return=o.return,D=m;break e}D=o.return}}var p=e.current;for(D=p;D!==null;){a=D;var v=a.child;if(a.subtreeFlags&2064&&v!==null)v.return=a,D=v;else e:for(a=p;D!==null;){if(l=D,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Co(9,l)}}catch(g){ue(l,l.return,g)}if(l===a){D=null;break e}var w=l.sibling;if(w!==null){w.return=l.return,D=w;break e}D=l.return}}if(q=r,mn(),kt&&typeof kt.onPostCommitFiberRoot=="function")try{kt.onPostCommitFiberRoot(yo,e)}catch{}s=!0}return s}finally{Y=n,it.transition=t}}return!1}function Md(e,t,n){t=gs(n,t),t=Wp(e,t,1),e=tn(e,t,1),t=Re(),e!==null&&(zr(e,1,t),$e(e,t))}function ue(e,t,n){if(e.tag===3)Md(e,e,n);else for(;t!==null;){if(t.tag===3){Md(t,e,n);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(nn===null||!nn.has(s))){e=gs(n,e),e=Kp(t,e,1),t=tn(t,e,1),e=Re(),t!==null&&(zr(t,1,e),$e(t,e));break}}t=t.return}}function zx(e,t,n){var s=e.pingCache;s!==null&&s.delete(t),t=Re(),e.pingedLanes|=e.suspendedLanes&n,xe===e&&(Se&n)===n&&(ye===4||ye===3&&(Se&130023424)===Se&&500>pe()-Nc?Pn(e,0):kc|=n),$e(e,t)}function fm(e,t){t===0&&(e.mode&1?(t=Zr,Zr<<=1,!(Zr&130023424)&&(Zr=4194304)):t=1);var n=Re();e=Ft(e,t),e!==null&&(zr(e,t,n),$e(e,n))}function Vx(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),fm(e,n)}function Ox(e,t){var n=0;switch(e.tag){case 13:var s=e.stateNode,r=e.memoizedState;r!==null&&(n=r.retryLane);break;case 19:s=e.stateNode;break;default:throw Error(E(314))}s!==null&&s.delete(t),fm(e,n)}var hm;hm=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ie.current)Fe=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Fe=!1,Nx(e,t,n);Fe=!!(e.flags&131072)}else Fe=!1,se&&t.flags&1048576&&yp(t,Ki,t.index);switch(t.lanes=0,t.tag){case 2:var s=t.type;Ti(e,t),e=t.pendingProps;var r=ps(t,Me.current);cs(t,n),r=yc(null,t,s,e,r,n);var o=gc();return t.flags|=1,typeof r=="object"&&r!==null&&typeof r.render=="function"&&r.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,be(s)?(o=!0,Hi(t)):o=!1,t.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,fc(t),r.updater=No,t.stateNode=r,r._reactInternals=t,al(t,s,e,n),t=ul(null,t,s,!0,o,n)):(t.tag=0,se&&o&&ic(t),De(null,t,r,n),t=t.child),t;case 16:s=t.elementType;e:{switch(Ti(e,t),e=t.pendingProps,r=s._init,s=r(s._payload),t.type=s,r=t.tag=Ix(s),e=ft(s,e),r){case 0:t=cl(null,t,s,e,n);break e;case 1:t=xd(null,t,s,e,n);break e;case 11:t=yd(null,t,s,e,n);break e;case 14:t=gd(null,t,s,ft(s.type,e),n);break e}throw Error(E(306,s,""))}return t;case 0:return s=t.type,r=t.pendingProps,r=t.elementType===s?r:ft(s,r),cl(e,t,s,r,n);case 1:return s=t.type,r=t.pendingProps,r=t.elementType===s?r:ft(s,r),xd(e,t,s,r,n);case 3:e:{if(Yp(t),e===null)throw Error(E(387));s=t.pendingProps,o=t.memoizedState,r=o.element,kp(e,t),Qi(t,s,null,n);var a=t.memoizedState;if(s=a.element,o.isDehydrated)if(o={element:s,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){r=gs(Error(E(423)),t),t=jd(e,t,s,n,r);break e}else if(s!==r){r=gs(Error(E(424)),t),t=jd(e,t,s,n,r);break e}else for(Ke=en(t.stateNode.containerInfo.firstChild),Ge=t,se=!0,pt=null,n=wp(t,null,s,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ms(),s===r){t=It(e,t,n);break e}De(e,t,s,n)}t=t.child}return t;case 5:return Np(t),e===null&&rl(t),s=t.type,r=t.pendingProps,o=e!==null?e.memoizedProps:null,a=r.children,Ja(s,r)?a=null:o!==null&&Ja(s,o)&&(t.flags|=32),Qp(e,t),De(e,t,a,n),t.child;case 6:return e===null&&rl(t),null;case 13:return Xp(e,t,n);case 4:return hc(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=vs(t,null,s,n):De(e,t,s,n),t.child;case 11:return s=t.type,r=t.pendingProps,r=t.elementType===s?r:ft(s,r),yd(e,t,s,r,n);case 7:return De(e,t,t.pendingProps,n),t.child;case 8:return De(e,t,t.pendingProps.children,n),t.child;case 12:return De(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(s=t.type._context,r=t.pendingProps,o=t.memoizedProps,a=r.value,Z(Gi,s._currentValue),s._currentValue=a,o!==null)if(gt(o.value,a)){if(o.children===r.children&&!Ie.current){t=It(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){a=o.child;for(var c=l.firstContext;c!==null;){if(c.context===s){if(o.tag===1){c=Rt(-1,n&-n),c.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),il(o.return,n,t),l.lanes|=n;break}c=c.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(E(341));a.lanes|=n,l=a.alternate,l!==null&&(l.lanes|=n),il(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}De(e,t,r.children,n),t=t.child}return t;case 9:return r=t.type,s=t.pendingProps.children,cs(t,n),r=ot(r),s=s(r),t.flags|=1,De(e,t,s,n),t.child;case 14:return s=t.type,r=ft(s,t.pendingProps),r=ft(s.type,r),gd(e,t,s,r,n);case 15:return Gp(e,t,t.type,t.pendingProps,n);case 17:return s=t.type,r=t.pendingProps,r=t.elementType===s?r:ft(s,r),Ti(e,t),t.tag=1,be(s)?(e=!0,Hi(t)):e=!1,cs(t,n),Hp(t,s,r),al(t,s,r,n),ul(null,t,s,!0,e,n);case 19:return Zp(e,t,n);case 22:return qp(e,t,n)}throw Error(E(156,t.tag))};function pm(e,t){return $h(e,t)}function Fx(e,t,n,s){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=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function rt(e,t,n,s){return new Fx(e,t,n,s)}function Ec(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ix(e){if(typeof e=="function")return Ec(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Gl)return 11;if(e===ql)return 14}return 2}function rn(e,t){var n=e.alternate;return n===null?(n=rt(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 Mi(e,t,n,s,r,o){var a=2;if(s=e,typeof e=="function")Ec(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case $n:return En(n.children,r,o,t);case Kl:a=8,r|=8;break;case Da:return e=rt(12,n,t,r|2),e.elementType=Da,e.lanes=o,e;case Ra:return e=rt(13,n,t,r),e.elementType=Ra,e.lanes=o,e;case _a:return e=rt(19,n,t,r),e.elementType=_a,e.lanes=o,e;case Nh:return Po(n,r,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Sh:a=10;break e;case kh:a=9;break e;case Gl:a=11;break e;case ql:a=14;break e;case Ht:a=16,s=null;break e}throw Error(E(130,e==null?e:typeof e,""))}return t=rt(a,n,t,r),t.elementType=e,t.type=s,t.lanes=o,t}function En(e,t,n,s){return e=rt(7,e,s,t),e.lanes=n,e}function Po(e,t,n,s){return e=rt(22,e,s,t),e.elementType=Nh,e.lanes=n,e.stateNode={isHidden:!1},e}function ca(e,t,n){return e=rt(6,e,null,t),e.lanes=n,e}function ua(e,t,n){return t=rt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function bx(e,t,n,s,r){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=Ho(0),this.expirationTimes=Ho(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ho(0),this.identifierPrefix=s,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function Mc(e,t,n,s,r,o,a,l,c){return e=new bx(e,t,n,l,c),t===1?(t=1,o===!0&&(t|=8)):t=0,o=rt(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:s,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},fc(o),e}function $x(e,t,n){var s=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:bn,key:s==null?null:""+s,children:e,containerInfo:t,implementation:n}}function mm(e){if(!e)return cn;e=e._reactInternals;e:{if(On(e)!==e||e.tag!==1)throw Error(E(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(be(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(E(171))}if(e.tag===1){var n=e.type;if(be(n))return mp(e,n,t)}return t}function vm(e,t,n,s,r,o,a,l,c){return e=Mc(n,s,!0,e,r,o,a,l,c),e.context=mm(null),n=e.current,s=Re(),r=sn(n),o=Rt(s,r),o.callback=t??null,tn(n,o,r),e.current.lanes=r,zr(e,r,s),$e(e,s),e}function Eo(e,t,n,s){var r=t.current,o=Re(),a=sn(r);return n=mm(n),t.context===null?t.context=n:t.pendingContext=n,t=Rt(o,a),t.payload={element:e},s=s===void 0?null:s,s!==null&&(t.callback=s),e=tn(r,t,a),e!==null&&(vt(e,r,a,o),ki(e,r,a)),a}function so(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 Ad(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Ac(e,t){Ad(e,t),(e=e.alternate)&&Ad(e,t)}function Bx(){return null}var ym=typeof reportError=="function"?reportError:function(e){console.error(e)};function Dc(e){this._internalRoot=e}Mo.prototype.render=Dc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(E(409));Eo(e,t,null,null)};Mo.prototype.unmount=Dc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ln(function(){Eo(null,e,null,null)}),t[Ot]=null}};function Mo(e){this._internalRoot=e}Mo.prototype.unstable_scheduleHydration=function(e){if(e){var t=qh();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Kt.length&&t!==0&&t<Kt[n].priority;n++);Kt.splice(n,0,e),n===0&&Yh(e)}};function Rc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ao(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Dd(){}function Ux(e,t,n,s,r){if(r){if(typeof s=="function"){var o=s;s=function(){var u=so(a);o.call(u)}}var a=vm(t,s,e,0,null,!1,!1,"",Dd);return e._reactRootContainer=a,e[Ot]=a.current,gr(e.nodeType===8?e.parentNode:e),Ln(),a}for(;r=e.lastChild;)e.removeChild(r);if(typeof s=="function"){var l=s;s=function(){var u=so(c);l.call(u)}}var c=Mc(e,0,!1,null,null,!1,!1,"",Dd);return e._reactRootContainer=c,e[Ot]=c.current,gr(e.nodeType===8?e.parentNode:e),Ln(function(){Eo(t,c,n,s)}),c}function Do(e,t,n,s,r){var o=n._reactRootContainer;if(o){var a=o;if(typeof r=="function"){var l=r;r=function(){var c=so(a);l.call(c)}}Eo(t,a,e,r)}else a=Ux(n,t,e,r,s);return so(a)}Kh=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Hs(t.pendingLanes);n!==0&&(Xl(t,n|1),$e(t,pe()),!(q&6)&&(xs=pe()+500,mn()))}break;case 13:Ln(function(){var s=Ft(e,1);if(s!==null){var r=Re();vt(s,e,1,r)}}),Ac(e,1)}};Zl=function(e){if(e.tag===13){var t=Ft(e,134217728);if(t!==null){var n=Re();vt(t,e,134217728,n)}Ac(e,134217728)}};Gh=function(e){if(e.tag===13){var t=sn(e),n=Ft(e,t);if(n!==null){var s=Re();vt(n,e,t,s)}Ac(e,t)}};qh=function(){return Y};Qh=function(e,t){var n=Y;try{return Y=e,t()}finally{Y=n}};Ua=function(e,t,n){switch(t){case"input":if(Va(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 s=n[t];if(s!==e&&s.form===e.form){var r=wo(s);if(!r)throw Error(E(90));Th(s),Va(s,r)}}}break;case"textarea":Eh(e,n);break;case"select":t=n.value,t!=null&&is(e,!!n.multiple,t,!1)}};zh=Cc;Vh=Ln;var Hx={usingClientEntryPoint:!1,Events:[Or,Wn,wo,_h,Lh,Cc]},Is={findFiberByHostInstance:kn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Wx={bundleType:Is.bundleType,version:Is.version,rendererPackageName:Is.rendererPackageName,rendererConfig:Is.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:$t.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Ih(e),e===null?null:e.stateNode},findFiberByHostInstance:Is.findFiberByHostInstance||Bx,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 ci=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ci.isDisabled&&ci.supportsFiber)try{yo=ci.inject(Wx),kt=ci}catch{}}Xe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Hx;Xe.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Rc(t))throw Error(E(200));return $x(e,t,null,n)};Xe.createRoot=function(e,t){if(!Rc(e))throw Error(E(299));var n=!1,s="",r=ym;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onRecoverableError!==void 0&&(r=t.onRecoverableError)),t=Mc(e,1,!1,null,null,n,!1,s,r),e[Ot]=t.current,gr(e.nodeType===8?e.parentNode:e),new Dc(t)};Xe.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(E(188)):(e=Object.keys(e).join(","),Error(E(268,e)));return e=Ih(t),e=e===null?null:e.stateNode,e};Xe.flushSync=function(e){return Ln(e)};Xe.hydrate=function(e,t,n){if(!Ao(t))throw Error(E(200));return Do(null,e,t,!0,n)};Xe.hydrateRoot=function(e,t,n){if(!Rc(e))throw Error(E(405));var s=n!=null&&n.hydratedSources||null,r=!1,o="",a=ym;if(n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=vm(t,null,e,1,n??null,r,!1,o,a),e[Ot]=t.current,gr(e),s)for(e=0;e<s.length;e++)n=s[e],r=n._getVersion,r=r(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,r]:t.mutableSourceEagerHydrationData.push(n,r);return new Mo(t)};Xe.render=function(e,t,n){if(!Ao(t))throw Error(E(200));return Do(null,e,t,!1,n)};Xe.unmountComponentAtNode=function(e){if(!Ao(e))throw Error(E(40));return e._reactRootContainer?(Ln(function(){Do(null,null,e,!1,function(){e._reactRootContainer=null,e[Ot]=null})}),!0):!1};Xe.unstable_batchedUpdates=Cc;Xe.unstable_renderSubtreeIntoContainer=function(e,t,n,s){if(!Ao(n))throw Error(E(200));if(e==null||e._reactInternals===void 0)throw Error(E(38));return Do(e,t,n,!1,s)};Xe.version="18.3.1-next-f1338f8080-20240426";function gm(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(gm)}catch(e){console.error(e)}}gm(),gh.exports=Xe;var Kx=gh.exports,Rd=Kx;Ma.createRoot=Rd.createRoot,Ma.hydrateRoot=Rd.hydrateRoot;/**
|
|
41
|
+
* @license lucide-react v0.441.0 - ISC
|
|
42
|
+
*
|
|
43
|
+
* This source code is licensed under the ISC license.
|
|
44
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
45
|
+
*/const Gx=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),xm=(...e)=>e.filter((t,n,s)=>!!t&&s.indexOf(t)===n).join(" ");/**
|
|
46
|
+
* @license lucide-react v0.441.0 - ISC
|
|
47
|
+
*
|
|
48
|
+
* This source code is licensed under the ISC license.
|
|
49
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
50
|
+
*/var qx={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"};/**
|
|
51
|
+
* @license lucide-react v0.441.0 - ISC
|
|
52
|
+
*
|
|
53
|
+
* This source code is licensed under the ISC license.
|
|
54
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
55
|
+
*/const Qx=j.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:s,className:r="",children:o,iconNode:a,...l},c)=>j.createElement("svg",{ref:c,...qx,width:t,height:t,stroke:e,strokeWidth:s?Number(n)*24/Number(t):n,className:xm("lucide",r),...l},[...a.map(([u,d])=>j.createElement(u,d)),...Array.isArray(o)?o:[o]]));/**
|
|
56
|
+
* @license lucide-react v0.441.0 - ISC
|
|
57
|
+
*
|
|
58
|
+
* This source code is licensed under the ISC license.
|
|
59
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
60
|
+
*/const V=(e,t)=>{const n=j.forwardRef(({className:s,...r},o)=>j.createElement(Qx,{ref:o,iconNode:t,className:xm(`lucide-${Gx(e)}`,s),...r}));return n.displayName=`${e}`,n};/**
|
|
61
|
+
* @license lucide-react v0.441.0 - ISC
|
|
62
|
+
*
|
|
63
|
+
* This source code is licensed under the ISC license.
|
|
64
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
65
|
+
*/const _t=V("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
|
|
66
|
+
* @license lucide-react v0.441.0 - ISC
|
|
67
|
+
*
|
|
68
|
+
* This source code is licensed under the ISC license.
|
|
69
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
70
|
+
*/const ro=V("ArrowRightLeft",[["path",{d:"m16 3 4 4-4 4",key:"1x1c3m"}],["path",{d:"M20 7H4",key:"zbl0bi"}],["path",{d:"m8 21-4-4 4-4",key:"h9nckh"}],["path",{d:"M4 17h16",key:"g4d7ey"}]]);/**
|
|
71
|
+
* @license lucide-react v0.441.0 - ISC
|
|
72
|
+
*
|
|
73
|
+
* This source code is licensed under the ISC license.
|
|
74
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
75
|
+
*/const Zn=V("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
76
|
+
* @license lucide-react v0.441.0 - ISC
|
|
77
|
+
*
|
|
78
|
+
* This source code is licensed under the ISC license.
|
|
79
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
+
*/const jm=V("Ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]]);/**
|
|
81
|
+
* @license lucide-react v0.441.0 - ISC
|
|
82
|
+
*
|
|
83
|
+
* This source code is licensed under the ISC license.
|
|
84
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
+
*/const lt=V("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"}]]);/**
|
|
86
|
+
* @license lucide-react v0.441.0 - ISC
|
|
87
|
+
*
|
|
88
|
+
* This source code is licensed under the ISC license.
|
|
89
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
90
|
+
*/const wm=V("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
|
|
91
|
+
* @license lucide-react v0.441.0 - ISC
|
|
92
|
+
*
|
|
93
|
+
* This source code is licensed under the ISC license.
|
|
94
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
+
*/const Yx=V("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
96
|
+
* @license lucide-react v0.441.0 - ISC
|
|
97
|
+
*
|
|
98
|
+
* This source code is licensed under the ISC license.
|
|
99
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
+
*/const js=V("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
101
|
+
* @license lucide-react v0.441.0 - ISC
|
|
102
|
+
*
|
|
103
|
+
* This source code is licensed under the ISC license.
|
|
104
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
+
*/const un=V("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
106
|
+
* @license lucide-react v0.441.0 - ISC
|
|
107
|
+
*
|
|
108
|
+
* This source code is licensed under the ISC license.
|
|
109
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
110
|
+
*/const Pr=V("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"}]]);/**
|
|
111
|
+
* @license lucide-react v0.441.0 - ISC
|
|
112
|
+
*
|
|
113
|
+
* This source code is licensed under the ISC license.
|
|
114
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
115
|
+
*/const yt=V("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|
116
|
+
* @license lucide-react v0.441.0 - ISC
|
|
117
|
+
*
|
|
118
|
+
* This source code is licensed under the ISC license.
|
|
119
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
120
|
+
*/const Sm=V("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
121
|
+
* @license lucide-react v0.441.0 - ISC
|
|
122
|
+
*
|
|
123
|
+
* This source code is licensed under the ISC license.
|
|
124
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
125
|
+
*/const Xx=V("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
126
|
+
* @license lucide-react v0.441.0 - ISC
|
|
127
|
+
*
|
|
128
|
+
* This source code is licensed under the ISC license.
|
|
129
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
130
|
+
*/const ws=V("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
|
131
|
+
* @license lucide-react v0.441.0 - ISC
|
|
132
|
+
*
|
|
133
|
+
* This source code is licensed under the ISC license.
|
|
134
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
135
|
+
*/const Ai=V("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
136
|
+
* @license lucide-react v0.441.0 - ISC
|
|
137
|
+
*
|
|
138
|
+
* This source code is licensed under the ISC license.
|
|
139
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
140
|
+
*/const zn=V("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
|
141
|
+
* @license lucide-react v0.441.0 - ISC
|
|
142
|
+
*
|
|
143
|
+
* This source code is licensed under the ISC license.
|
|
144
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
145
|
+
*/const _c=V("Coins",[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]]);/**
|
|
146
|
+
* @license lucide-react v0.441.0 - ISC
|
|
147
|
+
*
|
|
148
|
+
* This source code is licensed under the ISC license.
|
|
149
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
150
|
+
*/const Zx=V("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"}]]);/**
|
|
151
|
+
* @license lucide-react v0.441.0 - ISC
|
|
152
|
+
*
|
|
153
|
+
* This source code is licensed under the ISC license.
|
|
154
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
155
|
+
*/const Jx=V("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/**
|
|
156
|
+
* @license lucide-react v0.441.0 - ISC
|
|
157
|
+
*
|
|
158
|
+
* This source code is licensed under the ISC license.
|
|
159
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
160
|
+
*/const e0=V("Crosshair",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"22",x2:"18",y1:"12",y2:"12",key:"l9bcsi"}],["line",{x1:"6",x2:"2",y1:"12",y2:"12",key:"13hhkx"}],["line",{x1:"12",x2:"12",y1:"6",y2:"2",key:"10w3f3"}],["line",{x1:"12",x2:"12",y1:"22",y2:"18",key:"15g9kq"}]]);/**
|
|
161
|
+
* @license lucide-react v0.441.0 - ISC
|
|
162
|
+
*
|
|
163
|
+
* This source code is licensed under the ISC license.
|
|
164
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
165
|
+
*/const Ir=V("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
|
|
166
|
+
* @license lucide-react v0.441.0 - ISC
|
|
167
|
+
*
|
|
168
|
+
* This source code is licensed under the ISC license.
|
|
169
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
170
|
+
*/const t0=V("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
|
|
171
|
+
* @license lucide-react v0.441.0 - ISC
|
|
172
|
+
*
|
|
173
|
+
* This source code is licensed under the ISC license.
|
|
174
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
175
|
+
*/const n0=V("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
176
|
+
* @license lucide-react v0.441.0 - ISC
|
|
177
|
+
*
|
|
178
|
+
* This source code is licensed under the ISC license.
|
|
179
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
180
|
+
*/const St=V("FileCode",[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]]);/**
|
|
181
|
+
* @license lucide-react v0.441.0 - ISC
|
|
182
|
+
*
|
|
183
|
+
* This source code is licensed under the ISC license.
|
|
184
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
185
|
+
*/const s0=V("FileKey",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["circle",{cx:"10",cy:"16",r:"2",key:"4ckbqe"}],["path",{d:"m16 10-4.5 4.5",key:"7p3ebg"}],["path",{d:"m15 11 1 1",key:"1bsyx3"}]]);/**
|
|
186
|
+
* @license lucide-react v0.441.0 - ISC
|
|
187
|
+
*
|
|
188
|
+
* This source code is licensed under the ISC license.
|
|
189
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
190
|
+
*/const io=V("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/**
|
|
191
|
+
* @license lucide-react v0.441.0 - ISC
|
|
192
|
+
*
|
|
193
|
+
* This source code is licensed under the ISC license.
|
|
194
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
195
|
+
*/const Ss=V("Flag",[["path",{d:"M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z",key:"i9b6wo"}],["line",{x1:"4",x2:"4",y1:"22",y2:"15",key:"1cm3nv"}]]);/**
|
|
196
|
+
* @license lucide-react v0.441.0 - ISC
|
|
197
|
+
*
|
|
198
|
+
* This source code is licensed under the ISC license.
|
|
199
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
200
|
+
*/const r0=V("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/**
|
|
201
|
+
* @license lucide-react v0.441.0 - ISC
|
|
202
|
+
*
|
|
203
|
+
* This source code is licensed under the ISC license.
|
|
204
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
205
|
+
*/const br=V("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
|
|
206
|
+
* @license lucide-react v0.441.0 - ISC
|
|
207
|
+
*
|
|
208
|
+
* This source code is licensed under the ISC license.
|
|
209
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
210
|
+
*/const i0=V("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);/**
|
|
211
|
+
* @license lucide-react v0.441.0 - ISC
|
|
212
|
+
*
|
|
213
|
+
* This source code is licensed under the ISC license.
|
|
214
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
215
|
+
*/const _d=V("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);/**
|
|
216
|
+
* @license lucide-react v0.441.0 - ISC
|
|
217
|
+
*
|
|
218
|
+
* This source code is licensed under the ISC license.
|
|
219
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
220
|
+
*/const o0=V("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
|
221
|
+
* @license lucide-react v0.441.0 - ISC
|
|
222
|
+
*
|
|
223
|
+
* This source code is licensed under the ISC license.
|
|
224
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
225
|
+
*/const a0=V("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/**
|
|
226
|
+
* @license lucide-react v0.441.0 - ISC
|
|
227
|
+
*
|
|
228
|
+
* This source code is licensed under the ISC license.
|
|
229
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
230
|
+
*/const Ld=V("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/**
|
|
231
|
+
* @license lucide-react v0.441.0 - ISC
|
|
232
|
+
*
|
|
233
|
+
* This source code is licensed under the ISC license.
|
|
234
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
235
|
+
*/const on=V("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/**
|
|
236
|
+
* @license lucide-react v0.441.0 - ISC
|
|
237
|
+
*
|
|
238
|
+
* This source code is licensed under the ISC license.
|
|
239
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
240
|
+
*/const km=V("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/**
|
|
241
|
+
* @license lucide-react v0.441.0 - ISC
|
|
242
|
+
*
|
|
243
|
+
* This source code is licensed under the ISC license.
|
|
244
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
245
|
+
*/const Sl=V("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
|
|
246
|
+
* @license lucide-react v0.441.0 - ISC
|
|
247
|
+
*
|
|
248
|
+
* This source code is licensed under the ISC license.
|
|
249
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
250
|
+
*/const l0=V("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
|
|
251
|
+
* @license lucide-react v0.441.0 - ISC
|
|
252
|
+
*
|
|
253
|
+
* This source code is licensed under the ISC license.
|
|
254
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
255
|
+
*/const c0=V("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
|
|
256
|
+
* @license lucide-react v0.441.0 - ISC
|
|
257
|
+
*
|
|
258
|
+
* This source code is licensed under the ISC license.
|
|
259
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
260
|
+
*/const u0=V("Package",[["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/**
|
|
261
|
+
* @license lucide-react v0.441.0 - ISC
|
|
262
|
+
*
|
|
263
|
+
* This source code is licensed under the ISC license.
|
|
264
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
265
|
+
*/const Le=V("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
|
|
266
|
+
* @license lucide-react v0.441.0 - ISC
|
|
267
|
+
*
|
|
268
|
+
* This source code is licensed under the ISC license.
|
|
269
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
270
|
+
*/const d0=V("ScanSearch",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"m16 16-1.9-1.9",key:"1dq9hf"}]]);/**
|
|
271
|
+
* @license lucide-react v0.441.0 - ISC
|
|
272
|
+
*
|
|
273
|
+
* This source code is licensed under the ISC license.
|
|
274
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
275
|
+
*/const Lc=V("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
276
|
+
* @license lucide-react v0.441.0 - ISC
|
|
277
|
+
*
|
|
278
|
+
* This source code is licensed under the ISC license.
|
|
279
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
280
|
+
*/const Nm=V("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
281
|
+
* @license lucide-react v0.441.0 - ISC
|
|
282
|
+
*
|
|
283
|
+
* This source code is licensed under the ISC license.
|
|
284
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
285
|
+
*/const ds=V("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
286
|
+
* @license lucide-react v0.441.0 - ISC
|
|
287
|
+
*
|
|
288
|
+
* This source code is licensed under the ISC license.
|
|
289
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
290
|
+
*/const fs=V("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/**
|
|
291
|
+
* @license lucide-react v0.441.0 - ISC
|
|
292
|
+
*
|
|
293
|
+
* This source code is licensed under the ISC license.
|
|
294
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
295
|
+
*/const f0=V("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
|
|
296
|
+
* @license lucide-react v0.441.0 - ISC
|
|
297
|
+
*
|
|
298
|
+
* This source code is licensed under the ISC license.
|
|
299
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
300
|
+
*/const h0=V("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"}]]);/**
|
|
301
|
+
* @license lucide-react v0.441.0 - ISC
|
|
302
|
+
*
|
|
303
|
+
* This source code is licensed under the ISC license.
|
|
304
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
305
|
+
*/const p0=V("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);/**
|
|
306
|
+
* @license lucide-react v0.441.0 - ISC
|
|
307
|
+
*
|
|
308
|
+
* This source code is licensed under the ISC license.
|
|
309
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
310
|
+
*/const oo=V("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
|
|
311
|
+
* @license lucide-react v0.441.0 - ISC
|
|
312
|
+
*
|
|
313
|
+
* This source code is licensed under the ISC license.
|
|
314
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
315
|
+
*/const Cm=V("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
316
|
+
* @license lucide-react v0.441.0 - ISC
|
|
317
|
+
*
|
|
318
|
+
* This source code is licensed under the ISC license.
|
|
319
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
320
|
+
*/const zc=V("TrendingDown",[["polyline",{points:"22 17 13.5 8.5 8.5 13.5 2 7",key:"1r2t7k"}],["polyline",{points:"16 17 22 17 22 11",key:"11uiuu"}]]);/**
|
|
321
|
+
* @license lucide-react v0.441.0 - ISC
|
|
322
|
+
*
|
|
323
|
+
* This source code is licensed under the ISC license.
|
|
324
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
325
|
+
*/const Tm=V("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/**
|
|
326
|
+
* @license lucide-react v0.441.0 - ISC
|
|
327
|
+
*
|
|
328
|
+
* This source code is licensed under the ISC license.
|
|
329
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
330
|
+
*/const _e=V("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
331
|
+
* @license lucide-react v0.441.0 - ISC
|
|
332
|
+
*
|
|
333
|
+
* This source code is licensed under the ISC license.
|
|
334
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
335
|
+
*/const m0=V("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
|
|
336
|
+
* @license lucide-react v0.441.0 - ISC
|
|
337
|
+
*
|
|
338
|
+
* This source code is licensed under the ISC license.
|
|
339
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
340
|
+
*/const ks=V("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
|
|
341
|
+
* @license lucide-react v0.441.0 - ISC
|
|
342
|
+
*
|
|
343
|
+
* This source code is licensed under the ISC license.
|
|
344
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
345
|
+
*/const Vc=V("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
|
346
|
+
* @license lucide-react v0.441.0 - ISC
|
|
347
|
+
*
|
|
348
|
+
* This source code is licensed under the ISC license.
|
|
349
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
350
|
+
*/const Yt=V("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),Oc=j.createContext({});function Fc(e){const t=j.useRef(null);return t.current===null&&(t.current=e()),t.current}const Ro=j.createContext(null),Ic=j.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class v0 extends j.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function y0({children:e,isPresent:t}){const n=j.useId(),s=j.useRef(null),r=j.useRef({width:0,height:0,top:0,left:0}),{nonce:o}=j.useContext(Ic);return j.useInsertionEffect(()=>{const{width:a,height:l,top:c,left:u}=r.current;if(t||!s.current||!a||!l)return;s.current.dataset.motionPopId=n;const d=document.createElement("style");return o&&(d.nonce=o),document.head.appendChild(d),d.sheet&&d.sheet.insertRule(`
|
|
351
|
+
[data-motion-pop-id="${n}"] {
|
|
352
|
+
position: absolute !important;
|
|
353
|
+
width: ${a}px !important;
|
|
354
|
+
height: ${l}px !important;
|
|
355
|
+
top: ${c}px !important;
|
|
356
|
+
left: ${u}px !important;
|
|
357
|
+
}
|
|
358
|
+
`),()=>{document.head.removeChild(d)}},[t]),i.jsx(v0,{isPresent:t,childRef:s,sizeRef:r,children:j.cloneElement(e,{ref:s})})}const g0=({children:e,initial:t,isPresent:n,onExitComplete:s,custom:r,presenceAffectsLayout:o,mode:a})=>{const l=Fc(x0),c=j.useId(),u=j.useCallback(f=>{l.set(f,!0);for(const h of l.values())if(!h)return;s&&s()},[l,s]),d=j.useMemo(()=>({id:c,initial:t,isPresent:n,custom:r,onExitComplete:u,register:f=>(l.set(f,!1),()=>l.delete(f))}),o?[Math.random(),u]:[n,u]);return j.useMemo(()=>{l.forEach((f,h)=>l.set(h,!1))},[n]),j.useEffect(()=>{!n&&!l.size&&s&&s()},[n]),a==="popLayout"&&(e=i.jsx(y0,{isPresent:n,children:e})),i.jsx(Ro.Provider,{value:d,children:e})};function x0(){return new Map}function Pm(e=!0){const t=j.useContext(Ro);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:r}=t,o=j.useId();j.useEffect(()=>{e&&r(o)},[e]);const a=j.useCallback(()=>e&&s&&s(o),[o,s,e]);return!n&&s?[!1,a]:[!0]}const ui=e=>e.key||"";function zd(e){const t=[];return j.Children.forEach(e,n=>{j.isValidElement(n)&&t.push(n)}),t}const bc=typeof window<"u",Em=bc?j.useLayoutEffect:j.useEffect,j0=({children:e,custom:t,initial:n=!0,onExitComplete:s,presenceAffectsLayout:r=!0,mode:o="sync",propagate:a=!1})=>{const[l,c]=Pm(a),u=j.useMemo(()=>zd(e),[e]),d=a&&!l?[]:u.map(ui),f=j.useRef(!0),h=j.useRef(u),y=Fc(()=>new Map),[x,S]=j.useState(u),[C,m]=j.useState(u);Em(()=>{f.current=!1,h.current=u;for(let w=0;w<C.length;w++){const g=ui(C[w]);d.includes(g)?y.delete(g):y.get(g)!==!0&&y.set(g,!1)}},[C,d.length,d.join("-")]);const p=[];if(u!==x){let w=[...u];for(let g=0;g<C.length;g++){const k=C[g],N=ui(k);d.includes(N)||(w.splice(g,0,k),p.push(k))}o==="wait"&&p.length&&(w=p),m(zd(w)),S(u);return}const{forceRender:v}=j.useContext(Oc);return i.jsx(i.Fragment,{children:C.map(w=>{const g=ui(w),k=a&&!l?!1:u===C||d.includes(g),N=()=>{if(y.has(g))y.set(g,!0);else return;let T=!0;y.forEach(A=>{A||(T=!1)}),T&&(v==null||v(),m(h.current),a&&(c==null||c()),s&&s())};return i.jsx(g0,{isPresent:k,initial:!f.current||n?void 0:!1,custom:k?void 0:t,presenceAffectsLayout:r,mode:o,onExitComplete:k?void 0:N,children:w},g)})})},qe=e=>e;let Mm=qe;function $c(e){let t;return()=>(t===void 0&&(t=e()),t)}const Ns=(e,t,n)=>{const s=t-e;return s===0?1:(n-e)/s},Lt=e=>e*1e3,zt=e=>e/1e3,w0={useManualTiming:!1};function S0(e){let t=new Set,n=new Set,s=!1,r=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(u){o.has(u)&&(c.schedule(u),e()),u(a)}const c={schedule:(u,d=!1,f=!1)=>{const y=f&&s?t:n;return d&&o.add(u),y.has(u)||y.add(u),u},cancel:u=>{n.delete(u),o.delete(u)},process:u=>{if(a=u,s){r=!0;return}s=!0,[t,n]=[n,t],t.forEach(l),t.clear(),s=!1,r&&(r=!1,c.process(u))}};return c}const di=["read","resolveKeyframes","update","preRender","render","postRender"],k0=40;function Am(e,t){let n=!1,s=!0;const r={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,a=di.reduce((m,p)=>(m[p]=S0(o),m),{}),{read:l,resolveKeyframes:c,update:u,preRender:d,render:f,postRender:h}=a,y=()=>{const m=performance.now();n=!1,r.delta=s?1e3/60:Math.max(Math.min(m-r.timestamp,k0),1),r.timestamp=m,r.isProcessing=!0,l.process(r),c.process(r),u.process(r),d.process(r),f.process(r),h.process(r),r.isProcessing=!1,n&&t&&(s=!1,e(y))},x=()=>{n=!0,s=!0,r.isProcessing||e(y)};return{schedule:di.reduce((m,p)=>{const v=a[p];return m[p]=(w,g=!1,k=!1)=>(n||x(),v.schedule(w,g,k)),m},{}),cancel:m=>{for(let p=0;p<di.length;p++)a[di[p]].cancel(m)},state:r,steps:a}}const{schedule:ne,cancel:dn,state:we,steps:da}=Am(typeof requestAnimationFrame<"u"?requestAnimationFrame:qe,!0),Dm=j.createContext({strict:!1}),Vd={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"]},Cs={};for(const e in Vd)Cs[e]={isEnabled:t=>Vd[e].some(n=>!!t[n])};function N0(e){for(const t in e)Cs[t]={...Cs[t],...e[t]}}const C0=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function ao(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||C0.has(e)}let Rm=e=>!ao(e);function T0(e){e&&(Rm=t=>t.startsWith("on")?!ao(t):e(t))}try{T0(require("@emotion/is-prop-valid").default)}catch{}function P0(e,t,n){const s={};for(const r in e)r==="values"&&typeof e.values=="object"||(Rm(r)||n===!0&&ao(r)||!t&&!ao(r)||e.draggable&&r.startsWith("onDrag"))&&(s[r]=e[r]);return s}function E0(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...s)=>e(...s);return new Proxy(n,{get:(s,r)=>r==="create"?e:(t.has(r)||t.set(r,e(r)),t.get(r))})}const _o=j.createContext({});function Er(e){return typeof e=="string"||Array.isArray(e)}function Lo(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Bc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Uc=["initial",...Bc];function zo(e){return Lo(e.animate)||Uc.some(t=>Er(e[t]))}function _m(e){return!!(zo(e)||e.variants)}function M0(e,t){if(zo(e)){const{initial:n,animate:s}=e;return{initial:n===!1||Er(n)?n:void 0,animate:Er(s)?s:void 0}}return e.inherit!==!1?t:{}}function A0(e){const{initial:t,animate:n}=M0(e,j.useContext(_o));return j.useMemo(()=>({initial:t,animate:n}),[Od(t),Od(n)])}function Od(e){return Array.isArray(e)?e.join(" "):e}const D0=Symbol.for("motionComponentSymbol");function Jn(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function R0(e,t,n){return j.useCallback(s=>{s&&e.onMount&&e.onMount(s),t&&(s?t.mount(s):t.unmount()),n&&(typeof n=="function"?n(s):Jn(n)&&(n.current=s))},[t])}const Hc=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),_0="framerAppearId",Lm="data-"+Hc(_0),{schedule:Wc}=Am(queueMicrotask,!1),zm=j.createContext({});function L0(e,t,n,s,r){var o,a;const{visualElement:l}=j.useContext(_o),c=j.useContext(Dm),u=j.useContext(Ro),d=j.useContext(Ic).reducedMotion,f=j.useRef(null);s=s||c.renderer,!f.current&&s&&(f.current=s(e,{visualState:t,parent:l,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:d}));const h=f.current,y=j.useContext(zm);h&&!h.projection&&r&&(h.type==="html"||h.type==="svg")&&z0(f.current,n,r,y);const x=j.useRef(!1);j.useInsertionEffect(()=>{h&&x.current&&h.update(n,u)});const S=n[Lm],C=j.useRef(!!S&&!(!((o=window.MotionHandoffIsComplete)===null||o===void 0)&&o.call(window,S))&&((a=window.MotionHasOptimisedAnimation)===null||a===void 0?void 0:a.call(window,S)));return Em(()=>{h&&(x.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),Wc.render(h.render),C.current&&h.animationState&&h.animationState.animateChanges())}),j.useEffect(()=>{h&&(!C.current&&h.animationState&&h.animationState.animateChanges(),C.current&&(queueMicrotask(()=>{var m;(m=window.MotionHandoffMarkAsComplete)===null||m===void 0||m.call(window,S)}),C.current=!1))}),h}function z0(e,t,n,s){const{layoutId:r,layout:o,drag:a,dragConstraints:l,layoutScroll:c,layoutRoot:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Vm(e.parent)),e.projection.setOptions({layoutId:r,layout:o,alwaysMeasureLayout:!!a||l&&Jn(l),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,layoutScroll:c,layoutRoot:u})}function Vm(e){if(e)return e.options.allowProjection!==!1?e.projection:Vm(e.parent)}function V0({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:s,Component:r}){var o,a;e&&N0(e);function l(u,d){let f;const h={...j.useContext(Ic),...u,layoutId:O0(u)},{isStatic:y}=h,x=A0(u),S=s(u,y);if(!y&&bc){F0();const C=I0(h);f=C.MeasureLayout,x.visualElement=L0(r,S,h,t,C.ProjectionNode)}return i.jsxs(_o.Provider,{value:x,children:[f&&x.visualElement?i.jsx(f,{visualElement:x.visualElement,...h}):null,n(r,u,R0(S,x.visualElement,d),S,y,x.visualElement)]})}l.displayName=`motion.${typeof r=="string"?r:`create(${(a=(o=r.displayName)!==null&&o!==void 0?o:r.name)!==null&&a!==void 0?a:""})`}`;const c=j.forwardRef(l);return c[D0]=r,c}function O0({layoutId:e}){const t=j.useContext(Oc).id;return t&&e!==void 0?t+"-"+e:e}function F0(e,t){j.useContext(Dm).strict}function I0(e){const{drag:t,layout:n}=Cs;if(!t&&!n)return{};const s={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}const b0=["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 Kc(e){return typeof e!="string"||e.includes("-")?!1:!!(b0.indexOf(e)>-1||/[A-Z]/u.test(e))}function Fd(e){const t=[{},{}];return e==null||e.values.forEach((n,s)=>{t[0][s]=n.get(),t[1][s]=n.getVelocity()}),t}function Gc(e,t,n,s){if(typeof t=="function"){const[r,o]=Fd(s);t=t(n!==void 0?n:e.custom,r,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[r,o]=Fd(s);t=t(n!==void 0?n:e.custom,r,o)}return t}const kl=e=>Array.isArray(e),$0=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),B0=e=>kl(e)?e[e.length-1]||0:e,Ee=e=>!!(e&&e.getVelocity);function Di(e){const t=Ee(e)?e.get():e;return $0(t)?t.toValue():t}function U0({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},s,r,o){const a={latestValues:H0(s,r,o,e),renderState:t()};return n&&(a.onMount=l=>n({props:s,current:l,...a}),a.onUpdate=l=>n(l)),a}const Om=e=>(t,n)=>{const s=j.useContext(_o),r=j.useContext(Ro),o=()=>U0(e,t,s,r);return n?o():Fc(o)};function H0(e,t,n,s){const r={},o=s(e,{});for(const h in o)r[h]=Di(o[h]);let{initial:a,animate:l}=e;const c=zo(e),u=_m(e);t&&u&&!c&&e.inherit!==!1&&(a===void 0&&(a=t.initial),l===void 0&&(l=t.animate));let d=n?n.initial===!1:!1;d=d||a===!1;const f=d?l:a;if(f&&typeof f!="boolean"&&!Lo(f)){const h=Array.isArray(f)?f:[f];for(let y=0;y<h.length;y++){const x=Gc(e,h[y]);if(x){const{transitionEnd:S,transition:C,...m}=x;for(const p in m){let v=m[p];if(Array.isArray(v)){const w=d?v.length-1:0;v=v[w]}v!==null&&(r[p]=v)}for(const p in S)r[p]=S[p]}}}return r}const As=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Fn=new Set(As),Fm=e=>t=>typeof t=="string"&&t.startsWith(e),Im=Fm("--"),W0=Fm("var(--"),qc=e=>W0(e)?K0.test(e.split("/*")[0].trim()):!1,K0=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,bm=(e,t)=>t&&typeof e=="number"?t.transform(e):e,bt=(e,t,n)=>n>t?t:n<e?e:n,Ds={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Mr={...Ds,transform:e=>bt(0,1,e)},fi={...Ds,default:1},$r=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ut=$r("deg"),Ct=$r("%"),I=$r("px"),G0=$r("vh"),q0=$r("vw"),Id={...Ct,parse:e=>Ct.parse(e)/100,transform:e=>Ct.transform(e*100)},Q0={borderWidth:I,borderTopWidth:I,borderRightWidth:I,borderBottomWidth:I,borderLeftWidth:I,borderRadius:I,radius:I,borderTopLeftRadius:I,borderTopRightRadius:I,borderBottomRightRadius:I,borderBottomLeftRadius:I,width:I,maxWidth:I,height:I,maxHeight:I,top:I,right:I,bottom:I,left:I,padding:I,paddingTop:I,paddingRight:I,paddingBottom:I,paddingLeft:I,margin:I,marginTop:I,marginRight:I,marginBottom:I,marginLeft:I,backgroundPositionX:I,backgroundPositionY:I},Y0={rotate:Ut,rotateX:Ut,rotateY:Ut,rotateZ:Ut,scale:fi,scaleX:fi,scaleY:fi,scaleZ:fi,skew:Ut,skewX:Ut,skewY:Ut,distance:I,translateX:I,translateY:I,translateZ:I,x:I,y:I,z:I,perspective:I,transformPerspective:I,opacity:Mr,originX:Id,originY:Id,originZ:I},bd={...Ds,transform:Math.round},Qc={...Q0,...Y0,zIndex:bd,size:I,fillOpacity:Mr,strokeOpacity:Mr,numOctaves:bd},X0={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Z0=As.length;function J0(e,t,n){let s="",r=!0;for(let o=0;o<Z0;o++){const a=As[o],l=e[a];if(l===void 0)continue;let c=!0;if(typeof l=="number"?c=l===(a.startsWith("scale")?1:0):c=parseFloat(l)===0,!c||n){const u=bm(l,Qc[a]);if(!c){r=!1;const d=X0[a]||a;s+=`${d}(${u}) `}n&&(t[a]=u)}}return s=s.trim(),n?s=n(t,r?"":s):r&&(s="none"),s}function Yc(e,t,n){const{style:s,vars:r,transformOrigin:o}=e;let a=!1,l=!1;for(const c in t){const u=t[c];if(Fn.has(c)){a=!0;continue}else if(Im(c)){r[c]=u;continue}else{const d=bm(u,Qc[c]);c.startsWith("origin")?(l=!0,o[c]=d):s[c]=d}}if(t.transform||(a||n?s.transform=J0(t,e.transform,n):s.transform&&(s.transform="none")),l){const{originX:c="50%",originY:u="50%",originZ:d=0}=o;s.transformOrigin=`${c} ${u} ${d}`}}const e1={offset:"stroke-dashoffset",array:"stroke-dasharray"},t1={offset:"strokeDashoffset",array:"strokeDasharray"};function n1(e,t,n=1,s=0,r=!0){e.pathLength=1;const o=r?e1:t1;e[o.offset]=I.transform(-s);const a=I.transform(t),l=I.transform(n);e[o.array]=`${a} ${l}`}function $d(e,t,n){return typeof e=="string"?e:I.transform(t+n*e)}function s1(e,t,n){const s=$d(t,e.x,e.width),r=$d(n,e.y,e.height);return`${s} ${r}`}function Xc(e,{attrX:t,attrY:n,attrScale:s,originX:r,originY:o,pathLength:a,pathSpacing:l=1,pathOffset:c=0,...u},d,f){if(Yc(e,u,f),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:y,dimensions:x}=e;h.transform&&(x&&(y.transform=h.transform),delete h.transform),x&&(r!==void 0||o!==void 0||y.transform)&&(y.transformOrigin=s1(x,r!==void 0?r:.5,o!==void 0?o:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),s!==void 0&&(h.scale=s),a!==void 0&&n1(h,a,l,c,!1)}const Zc=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),$m=()=>({...Zc(),attrs:{}}),Jc=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Bm(e,{style:t,vars:n},s,r){Object.assign(e.style,t,r&&r.getProjectionStyles(s));for(const o in n)e.style.setProperty(o,n[o])}const Um=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 Hm(e,t,n,s){Bm(e,t,void 0,s);for(const r in t.attrs)e.setAttribute(Um.has(r)?r:Hc(r),t.attrs[r])}const lo={};function r1(e){Object.assign(lo,e)}function Wm(e,{layout:t,layoutId:n}){return Fn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!lo[e]||e==="opacity")}function eu(e,t,n){var s;const{style:r}=e,o={};for(const a in r)(Ee(r[a])||t.style&&Ee(t.style[a])||Wm(a,e)||((s=n==null?void 0:n.getValue(a))===null||s===void 0?void 0:s.liveStyle)!==void 0)&&(o[a]=r[a]);return o}function Km(e,t,n){const s=eu(e,t,n);for(const r in e)if(Ee(e[r])||Ee(t[r])){const o=As.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;s[o]=e[r]}return s}function i1(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}const Bd=["x","y","width","height","cx","cy","r"],o1={useVisualState:Om({scrapeMotionValuesFromProps:Km,createRenderState:$m,onUpdate:({props:e,prevProps:t,current:n,renderState:s,latestValues:r})=>{if(!n)return;let o=!!e.drag;if(!o){for(const l in r)if(Fn.has(l)){o=!0;break}}if(!o)return;let a=!t;if(t)for(let l=0;l<Bd.length;l++){const c=Bd[l];e[c]!==t[c]&&(a=!0)}a&&ne.read(()=>{i1(n,s),ne.render(()=>{Xc(s,r,Jc(n.tagName),e.transformTemplate),Hm(n,s)})})}})},a1={useVisualState:Om({scrapeMotionValuesFromProps:eu,createRenderState:Zc})};function Gm(e,t,n){for(const s in t)!Ee(t[s])&&!Wm(s,n)&&(e[s]=t[s])}function l1({transformTemplate:e},t){return j.useMemo(()=>{const n=Zc();return Yc(n,t,e),Object.assign({},n.vars,n.style)},[t])}function c1(e,t){const n=e.style||{},s={};return Gm(s,n,e),Object.assign(s,l1(e,t)),s}function u1(e,t){const n={},s=c1(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=s,n}function d1(e,t,n,s){const r=j.useMemo(()=>{const o=$m();return Xc(o,t,Jc(s),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};Gm(o,e.style,e),r.style={...o,...r.style}}return r}function f1(e=!1){return(n,s,r,{latestValues:o},a)=>{const c=(Kc(n)?d1:u1)(s,o,a,n),u=P0(s,typeof n=="string",e),d=n!==j.Fragment?{...u,...c,ref:r}:{},{children:f}=s,h=j.useMemo(()=>Ee(f)?f.get():f,[f]);return j.createElement(n,{...d,children:h})}}function h1(e,t){return function(s,{forwardMotionProps:r}={forwardMotionProps:!1}){const a={...Kc(s)?o1:a1,preloadedFeatures:e,useRender:f1(r),createVisualElement:t,Component:s};return V0(a)}}function qm(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let s=0;s<n;s++)if(t[s]!==e[s])return!1;return!0}function Vo(e,t,n){const s=e.getProps();return Gc(s,t,n!==void 0?n:s.custom,e)}const p1=$c(()=>window.ScrollTimeline!==void 0);class m1{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let s=0;s<this.animations.length;s++)this.animations[s][t]=n}attachTimeline(t,n){const s=this.animations.map(r=>{if(p1()&&r.attachTimeline)return r.attachTimeline(t);if(typeof n=="function")return n(r)});return()=>{s.forEach((r,o)=>{r&&r(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class v1 extends m1{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function tu(e,t){return e?e[t]||e.default||e:void 0}const Nl=2e4;function Qm(e){let t=0;const n=50;let s=e.next(t);for(;!s.done&&t<Nl;)t+=n,s=e.next(t);return t>=Nl?1/0:t}function nu(e){return typeof e=="function"}function Ud(e,t){e.timeline=t,e.onfinish=null}const su=e=>Array.isArray(e)&&typeof e[0]=="number",y1={linearEasing:void 0};function g1(e,t){const n=$c(e);return()=>{var s;return(s=y1[t])!==null&&s!==void 0?s:n()}}const co=g1(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Ym=(e,t,n=10)=>{let s="";const r=Math.max(Math.round(t/n),2);for(let o=0;o<r;o++)s+=e(Ns(0,r-1,o))+", ";return`linear(${s.substring(0,s.length-2)})`};function Xm(e){return!!(typeof e=="function"&&co()||!e||typeof e=="string"&&(e in Cl||co())||su(e)||Array.isArray(e)&&e.every(Xm))}const Ks=([e,t,n,s])=>`cubic-bezier(${e}, ${t}, ${n}, ${s})`,Cl={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ks([0,.65,.55,1]),circOut:Ks([.55,0,1,.45]),backIn:Ks([.31,.01,.66,-.59]),backOut:Ks([.33,1.53,.69,.99])};function Zm(e,t){if(e)return typeof e=="function"&&co()?Ym(e,t):su(e)?Ks(e):Array.isArray(e)?e.map(n=>Zm(n,t)||Cl.easeOut):Cl[e]}const dt={x:!1,y:!1};function Jm(){return dt.x||dt.y}function x1(e,t,n){var s;if(e instanceof Element)return[e];if(typeof e=="string"){let r=document;const o=(s=void 0)!==null&&s!==void 0?s:r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}function ev(e,t){const n=x1(e),s=new AbortController,r={passive:!0,...t,signal:s.signal};return[n,r,()=>s.abort()]}function Hd(e){return t=>{t.pointerType==="touch"||Jm()||e(t)}}function j1(e,t,n={}){const[s,r,o]=ev(e,n),a=Hd(l=>{const{target:c}=l,u=t(l);if(typeof u!="function"||!c)return;const d=Hd(f=>{u(f),c.removeEventListener("pointerleave",d)});c.addEventListener("pointerleave",d,r)});return s.forEach(l=>{l.addEventListener("pointerenter",a,r)}),o}const tv=(e,t)=>t?e===t?!0:tv(e,t.parentElement):!1,ru=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,w1=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function S1(e){return w1.has(e.tagName)||e.tabIndex!==-1}const Gs=new WeakSet;function Wd(e){return t=>{t.key==="Enter"&&e(t)}}function fa(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const k1=(e,t)=>{const n=e.currentTarget;if(!n)return;const s=Wd(()=>{if(Gs.has(n))return;fa(n,"down");const r=Wd(()=>{fa(n,"up")}),o=()=>fa(n,"cancel");n.addEventListener("keyup",r,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",s,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),t)};function Kd(e){return ru(e)&&!Jm()}function N1(e,t,n={}){const[s,r,o]=ev(e,n),a=l=>{const c=l.currentTarget;if(!Kd(l)||Gs.has(c))return;Gs.add(c);const u=t(l),d=(y,x)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",h),!(!Kd(y)||!Gs.has(c))&&(Gs.delete(c),typeof u=="function"&&u(y,{success:x}))},f=y=>{d(y,n.useGlobalTarget||tv(c,y.target))},h=y=>{d(y,!1)};window.addEventListener("pointerup",f,r),window.addEventListener("pointercancel",h,r)};return s.forEach(l=>{!S1(l)&&l.getAttribute("tabindex")===null&&(l.tabIndex=0),(n.useGlobalTarget?window:l).addEventListener("pointerdown",a,r),l.addEventListener("focus",u=>k1(u,r),r)}),o}function C1(e){return e==="x"||e==="y"?dt[e]?null:(dt[e]=!0,()=>{dt[e]=!1}):dt.x||dt.y?null:(dt.x=dt.y=!0,()=>{dt.x=dt.y=!1})}const nv=new Set(["width","height","top","left","right","bottom",...As]);let Ri;function T1(){Ri=void 0}const Tt={now:()=>(Ri===void 0&&Tt.set(we.isProcessing||w0.useManualTiming?we.timestamp:performance.now()),Ri),set:e=>{Ri=e,queueMicrotask(T1)}};function iu(e,t){e.indexOf(t)===-1&&e.push(t)}function ou(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class au{constructor(){this.subscriptions=[]}add(t){return iu(this.subscriptions,t),()=>ou(this.subscriptions,t)}notify(t,n,s){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](t,n,s);else for(let o=0;o<r;o++){const a=this.subscriptions[o];a&&a(t,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function sv(e,t){return t?e*(1e3/t):0}const Gd=30,P1=e=>!isNaN(parseFloat(e));class E1{constructor(t,n={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(s,r=!0)=>{const o=Tt.now();this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),r&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Tt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=P1(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new au);const s=this.events[t].add(n);return t==="change"?()=>{s(),ne.read(()=>{this.events.change.getSize()||this.stop()})}:s}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,s){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Tt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Gd)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Gd);return sv(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ar(e,t){return new E1(e,t)}function M1(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ar(n))}function A1(e,t){const n=Vo(e,t);let{transitionEnd:s={},transition:r={},...o}=n||{};o={...o,...s};for(const a in o){const l=B0(o[a]);M1(e,a,l)}}function D1(e){return!!(Ee(e)&&e.add)}function Tl(e,t){const n=e.getValue("willChange");if(D1(n))return n.add(t)}function rv(e){return e.props[Lm]}const iv=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,R1=1e-7,_1=12;function L1(e,t,n,s,r){let o,a,l=0;do a=t+(n-t)/2,o=iv(a,s,r)-e,o>0?n=a:t=a;while(Math.abs(o)>R1&&++l<_1);return a}function Br(e,t,n,s){if(e===t&&n===s)return qe;const r=o=>L1(o,0,1,e,n);return o=>o===0||o===1?o:iv(r(o),t,s)}const ov=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,av=e=>t=>1-e(1-t),lv=Br(.33,1.53,.69,.99),lu=av(lv),cv=ov(lu),uv=e=>(e*=2)<1?.5*lu(e):.5*(2-Math.pow(2,-10*(e-1))),cu=e=>1-Math.sin(Math.acos(e)),dv=av(cu),fv=ov(cu),hv=e=>/^0[^.\s]+$/u.test(e);function z1(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||hv(e):!0}const ir=e=>Math.round(e*1e5)/1e5,uu=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function V1(e){return e==null}const O1=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,du=(e,t)=>n=>!!(typeof n=="string"&&O1.test(n)&&n.startsWith(e)||t&&!V1(n)&&Object.prototype.hasOwnProperty.call(n,t)),pv=(e,t,n)=>s=>{if(typeof s!="string")return s;const[r,o,a,l]=s.match(uu);return{[e]:parseFloat(r),[t]:parseFloat(o),[n]:parseFloat(a),alpha:l!==void 0?parseFloat(l):1}},F1=e=>bt(0,255,e),ha={...Ds,transform:e=>Math.round(F1(e))},Tn={test:du("rgb","red"),parse:pv("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:s=1})=>"rgba("+ha.transform(e)+", "+ha.transform(t)+", "+ha.transform(n)+", "+ir(Mr.transform(s))+")"};function I1(e){let t="",n="",s="",r="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),s=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),s=e.substring(3,4),r=e.substring(4,5),t+=t,n+=n,s+=s,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:r?parseInt(r,16)/255:1}}const Pl={test:du("#"),parse:I1,transform:Tn.transform},es={test:du("hsl","hue"),parse:pv("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:s=1})=>"hsla("+Math.round(e)+", "+Ct.transform(ir(t))+", "+Ct.transform(ir(n))+", "+ir(Mr.transform(s))+")"},Te={test:e=>Tn.test(e)||Pl.test(e)||es.test(e),parse:e=>Tn.test(e)?Tn.parse(e):es.test(e)?es.parse(e):Pl.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Tn.transform(e):es.transform(e)},b1=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function $1(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(uu))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(b1))===null||n===void 0?void 0:n.length)||0)>0}const mv="number",vv="color",B1="var",U1="var(",qd="${}",H1=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Dr(e){const t=e.toString(),n=[],s={color:[],number:[],var:[]},r=[];let o=0;const l=t.replace(H1,c=>(Te.test(c)?(s.color.push(o),r.push(vv),n.push(Te.parse(c))):c.startsWith(U1)?(s.var.push(o),r.push(B1),n.push(c)):(s.number.push(o),r.push(mv),n.push(parseFloat(c))),++o,qd)).split(qd);return{values:n,split:l,indexes:s,types:r}}function yv(e){return Dr(e).values}function gv(e){const{split:t,types:n}=Dr(e),s=t.length;return r=>{let o="";for(let a=0;a<s;a++)if(o+=t[a],r[a]!==void 0){const l=n[a];l===mv?o+=ir(r[a]):l===vv?o+=Te.transform(r[a]):o+=r[a]}return o}}const W1=e=>typeof e=="number"?0:e;function K1(e){const t=yv(e);return gv(e)(t.map(W1))}const fn={test:$1,parse:yv,createTransformer:gv,getAnimatableNone:K1},G1=new Set(["brightness","contrast","saturate","opacity"]);function q1(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[s]=n.match(uu)||[];if(!s)return e;const r=n.replace(s,"");let o=G1.has(t)?1:0;return s!==n&&(o*=100),t+"("+o+r+")"}const Q1=/\b([a-z-]*)\(.*?\)/gu,El={...fn,getAnimatableNone:e=>{const t=e.match(Q1);return t?t.map(q1).join(" "):e}},Y1={...Qc,color:Te,backgroundColor:Te,outlineColor:Te,fill:Te,stroke:Te,borderColor:Te,borderTopColor:Te,borderRightColor:Te,borderBottomColor:Te,borderLeftColor:Te,filter:El,WebkitFilter:El},fu=e=>Y1[e];function xv(e,t){let n=fu(e);return n!==El&&(n=fn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const X1=new Set(["auto","none","0"]);function Z1(e,t,n){let s=0,r;for(;s<e.length&&!r;){const o=e[s];typeof o=="string"&&!X1.has(o)&&Dr(o).values.length&&(r=e[s]),s++}if(r&&n)for(const o of t)e[o]=xv(n,r)}const Qd=e=>e===Ds||e===I,Yd=(e,t)=>parseFloat(e.split(", ")[t]),Xd=(e,t)=>(n,{transform:s})=>{if(s==="none"||!s)return 0;const r=s.match(/^matrix3d\((.+)\)$/u);if(r)return Yd(r[1],t);{const o=s.match(/^matrix\((.+)\)$/u);return o?Yd(o[1],e):0}},J1=new Set(["x","y","z"]),ej=As.filter(e=>!J1.has(e));function tj(e){const t=[];return ej.forEach(n=>{const s=e.getValue(n);s!==void 0&&(t.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),t}const Ts={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:Xd(4,13),y:Xd(5,14)};Ts.translateX=Ts.x;Ts.translateY=Ts.y;const Mn=new Set;let Ml=!1,Al=!1;function jv(){if(Al){const e=Array.from(Mn).filter(s=>s.needsMeasurement),t=new Set(e.map(s=>s.element)),n=new Map;t.forEach(s=>{const r=tj(s);r.length&&(n.set(s,r),s.render())}),e.forEach(s=>s.measureInitialState()),t.forEach(s=>{s.render();const r=n.get(s);r&&r.forEach(([o,a])=>{var l;(l=s.getValue(o))===null||l===void 0||l.set(a)})}),e.forEach(s=>s.measureEndState()),e.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Al=!1,Ml=!1,Mn.forEach(e=>e.complete()),Mn.clear()}function wv(){Mn.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Al=!0)})}function nj(){wv(),jv()}class hu{constructor(t,n,s,r,o,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=s,this.motionValue=r,this.element=o,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Mn.add(this),Ml||(Ml=!0,ne.read(wv),ne.resolveKeyframes(jv))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:s,motionValue:r}=this;for(let o=0;o<t.length;o++)if(t[o]===null)if(o===0){const a=r==null?void 0:r.get(),l=t[t.length-1];if(a!==void 0)t[0]=a;else if(s&&n){const c=s.readValue(n,l);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=l),r&&a===void 0&&r.set(t[0])}else t[o]=t[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Mn.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Mn.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Sv=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),sj=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function rj(e){const t=sj.exec(e);if(!t)return[,];const[,n,s,r]=t;return[`--${n??s}`,r]}function kv(e,t,n=1){const[s,r]=rj(e);if(!s)return;const o=window.getComputedStyle(t).getPropertyValue(s);if(o){const a=o.trim();return Sv(a)?parseFloat(a):a}return qc(r)?kv(r,t,n+1):r}const Nv=e=>t=>t.test(e),ij={test:e=>e==="auto",parse:e=>e},Cv=[Ds,I,Ct,Ut,q0,G0,ij],Zd=e=>Cv.find(Nv(e));class Tv extends hu{constructor(t,n,s,r,o){super(t,n,s,r,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let u=t[c];if(typeof u=="string"&&(u=u.trim(),qc(u))){const d=kv(u,n.current);d!==void 0&&(t[c]=d),c===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!nv.has(s)||t.length!==2)return;const[r,o]=t,a=Zd(r),l=Zd(o);if(a!==l)if(Qd(a)&&Qd(l))for(let c=0;c<t.length;c++){const u=t[c];typeof u=="string"&&(t[c]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,s=[];for(let r=0;r<t.length;r++)z1(t[r])&&s.push(r);s.length&&Z1(t,s,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:s}=this;if(!t||!t.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ts[s](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const r=n[n.length-1];r!==void 0&&t.getValue(s,r).jump(r,!1)}measureEndState(){var t;const{element:n,name:s,unresolvedKeyframes:r}=this;if(!n||!n.current)return;const o=n.getValue(s);o&&o.jump(this.measuredOrigin,!1);const a=r.length-1,l=r[a];r[a]=Ts[s](n.measureViewportBox(),window.getComputedStyle(n.current)),l!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=l),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([c,u])=>{n.getValue(c).set(u)}),this.resolveNoneKeyframes()}}const Jd=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(fn.test(e)||e==="0")&&!e.startsWith("url("));function oj(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function aj(e,t,n,s){const r=e[0];if(r===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],a=Jd(r,t),l=Jd(o,t);return!a||!l?!1:oj(e)||(n==="spring"||nu(n))&&s}const lj=e=>e!==null;function Oo(e,{repeat:t,repeatType:n="loop"},s){const r=e.filter(lj),o=t&&n!=="loop"&&t%2===1?0:r.length-1;return!o||s===void 0?r[o]:s}const cj=40;class Pv{constructor({autoplay:t=!0,delay:n=0,type:s="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:a="loop",...l}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Tt.now(),this.options={autoplay:t,delay:n,type:s,repeat:r,repeatDelay:o,repeatType:a,...l},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>cj?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&nj(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Tt.now(),this.hasAttemptedResolve=!0;const{name:s,type:r,velocity:o,delay:a,onComplete:l,onUpdate:c,isGenerator:u}=this.options;if(!u&&!aj(t,s,r,o))if(a)this.options.duration=0;else{c&&c(Oo(t,this.options,n)),l&&l(),this.resolveFinishedPromise();return}const d=this.initPlayback(t,n);d!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...d},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const oe=(e,t,n)=>e+(t-e)*n;function pa(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 uj({hue:e,saturation:t,lightness:n,alpha:s}){e/=360,t/=100,n/=100;let r=0,o=0,a=0;if(!t)r=o=a=n;else{const l=n<.5?n*(1+t):n+t-n*t,c=2*n-l;r=pa(c,l,e+1/3),o=pa(c,l,e),a=pa(c,l,e-1/3)}return{red:Math.round(r*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:s}}function uo(e,t){return n=>n>0?t:e}const ma=(e,t,n)=>{const s=e*e,r=n*(t*t-s)+s;return r<0?0:Math.sqrt(r)},dj=[Pl,Tn,es],fj=e=>dj.find(t=>t.test(e));function ef(e){const t=fj(e);if(!t)return!1;let n=t.parse(e);return t===es&&(n=uj(n)),n}const tf=(e,t)=>{const n=ef(e),s=ef(t);if(!n||!s)return uo(e,t);const r={...n};return o=>(r.red=ma(n.red,s.red,o),r.green=ma(n.green,s.green,o),r.blue=ma(n.blue,s.blue,o),r.alpha=oe(n.alpha,s.alpha,o),Tn.transform(r))},hj=(e,t)=>n=>t(e(n)),Ur=(...e)=>e.reduce(hj),Dl=new Set(["none","hidden"]);function pj(e,t){return Dl.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function mj(e,t){return n=>oe(e,t,n)}function pu(e){return typeof e=="number"?mj:typeof e=="string"?qc(e)?uo:Te.test(e)?tf:gj:Array.isArray(e)?Ev:typeof e=="object"?Te.test(e)?tf:vj:uo}function Ev(e,t){const n=[...e],s=n.length,r=e.map((o,a)=>pu(o)(o,t[a]));return o=>{for(let a=0;a<s;a++)n[a]=r[a](o);return n}}function vj(e,t){const n={...e,...t},s={};for(const r in n)e[r]!==void 0&&t[r]!==void 0&&(s[r]=pu(e[r])(e[r],t[r]));return r=>{for(const o in s)n[o]=s[o](r);return n}}function yj(e,t){var n;const s=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const a=t.types[o],l=e.indexes[a][r[a]],c=(n=e.values[l])!==null&&n!==void 0?n:0;s[o]=c,r[a]++}return s}const gj=(e,t)=>{const n=fn.createTransformer(t),s=Dr(e),r=Dr(t);return s.indexes.var.length===r.indexes.var.length&&s.indexes.color.length===r.indexes.color.length&&s.indexes.number.length>=r.indexes.number.length?Dl.has(e)&&!r.values.length||Dl.has(t)&&!s.values.length?pj(e,t):Ur(Ev(yj(s,r),r.values),n):uo(e,t)};function Mv(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?oe(e,t,n):pu(e)(e,t)}const xj=5;function Av(e,t,n){const s=Math.max(t-xj,0);return sv(n-e(s),t-s)}const ce={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},va=.001;function jj({duration:e=ce.duration,bounce:t=ce.bounce,velocity:n=ce.velocity,mass:s=ce.mass}){let r,o,a=1-t;a=bt(ce.minDamping,ce.maxDamping,a),e=bt(ce.minDuration,ce.maxDuration,zt(e)),a<1?(r=u=>{const d=u*a,f=d*e,h=d-n,y=Rl(u,a),x=Math.exp(-f);return va-h/y*x},o=u=>{const f=u*a*e,h=f*n+n,y=Math.pow(a,2)*Math.pow(u,2)*e,x=Math.exp(-f),S=Rl(Math.pow(u,2),a);return(-r(u)+va>0?-1:1)*((h-y)*x)/S}):(r=u=>{const d=Math.exp(-u*e),f=(u-n)*e+1;return-va+d*f},o=u=>{const d=Math.exp(-u*e),f=(n-u)*(e*e);return d*f});const l=5/e,c=Sj(r,o,l);if(e=Lt(e),isNaN(c))return{stiffness:ce.stiffness,damping:ce.damping,duration:e};{const u=Math.pow(c,2)*s;return{stiffness:u,damping:a*2*Math.sqrt(s*u),duration:e}}}const wj=12;function Sj(e,t,n){let s=n;for(let r=1;r<wj;r++)s=s-e(s)/t(s);return s}function Rl(e,t){return e*Math.sqrt(1-t*t)}const kj=["duration","bounce"],Nj=["stiffness","damping","mass"];function nf(e,t){return t.some(n=>e[n]!==void 0)}function Cj(e){let t={velocity:ce.velocity,stiffness:ce.stiffness,damping:ce.damping,mass:ce.mass,isResolvedFromDuration:!1,...e};if(!nf(e,Nj)&&nf(e,kj))if(e.visualDuration){const n=e.visualDuration,s=2*Math.PI/(n*1.2),r=s*s,o=2*bt(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:ce.mass,stiffness:r,damping:o}}else{const n=jj(e);t={...t,...n,mass:ce.mass},t.isResolvedFromDuration=!0}return t}function Dv(e=ce.visualDuration,t=ce.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:s,restDelta:r}=n;const o=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],l={done:!1,value:o},{stiffness:c,damping:u,mass:d,duration:f,velocity:h,isResolvedFromDuration:y}=Cj({...n,velocity:-zt(n.velocity||0)}),x=h||0,S=u/(2*Math.sqrt(c*d)),C=a-o,m=zt(Math.sqrt(c/d)),p=Math.abs(C)<5;s||(s=p?ce.restSpeed.granular:ce.restSpeed.default),r||(r=p?ce.restDelta.granular:ce.restDelta.default);let v;if(S<1){const g=Rl(m,S);v=k=>{const N=Math.exp(-S*m*k);return a-N*((x+S*m*C)/g*Math.sin(g*k)+C*Math.cos(g*k))}}else if(S===1)v=g=>a-Math.exp(-m*g)*(C+(x+m*C)*g);else{const g=m*Math.sqrt(S*S-1);v=k=>{const N=Math.exp(-S*m*k),T=Math.min(g*k,300);return a-N*((x+S*m*C)*Math.sinh(T)+g*C*Math.cosh(T))/g}}const w={calculatedDuration:y&&f||null,next:g=>{const k=v(g);if(y)l.done=g>=f;else{let N=0;S<1&&(N=g===0?Lt(x):Av(v,g,k));const T=Math.abs(N)<=s,A=Math.abs(a-k)<=r;l.done=T&&A}return l.value=l.done?a:k,l},toString:()=>{const g=Math.min(Qm(w),Nl),k=Ym(N=>w.next(g*N).value,g,30);return g+"ms "+k}};return w}function sf({keyframes:e,velocity:t=0,power:n=.8,timeConstant:s=325,bounceDamping:r=10,bounceStiffness:o=500,modifyTarget:a,min:l,max:c,restDelta:u=.5,restSpeed:d}){const f=e[0],h={done:!1,value:f},y=T=>l!==void 0&&T<l||c!==void 0&&T>c,x=T=>l===void 0?c:c===void 0||Math.abs(l-T)<Math.abs(c-T)?l:c;let S=n*t;const C=f+S,m=a===void 0?C:a(C);m!==C&&(S=m-f);const p=T=>-S*Math.exp(-T/s),v=T=>m+p(T),w=T=>{const A=p(T),P=v(T);h.done=Math.abs(A)<=u,h.value=h.done?m:P};let g,k;const N=T=>{y(h.value)&&(g=T,k=Dv({keyframes:[h.value,x(h.value)],velocity:Av(v,T,h.value),damping:r,stiffness:o,restDelta:u,restSpeed:d}))};return N(0),{calculatedDuration:null,next:T=>{let A=!1;return!k&&g===void 0&&(A=!0,w(T),N(T)),g!==void 0&&T>=g?k.next(T-g):(!A&&w(T),h)}}}const Tj=Br(.42,0,1,1),Pj=Br(0,0,.58,1),Rv=Br(.42,0,.58,1),Ej=e=>Array.isArray(e)&&typeof e[0]!="number",Mj={linear:qe,easeIn:Tj,easeInOut:Rv,easeOut:Pj,circIn:cu,circInOut:fv,circOut:dv,backIn:lu,backInOut:cv,backOut:lv,anticipate:uv},rf=e=>{if(su(e)){Mm(e.length===4);const[t,n,s,r]=e;return Br(t,n,s,r)}else if(typeof e=="string")return Mj[e];return e};function Aj(e,t,n){const s=[],r=n||Mv,o=e.length-1;for(let a=0;a<o;a++){let l=r(e[a],e[a+1]);if(t){const c=Array.isArray(t)?t[a]||qe:t;l=Ur(c,l)}s.push(l)}return s}function Dj(e,t,{clamp:n=!0,ease:s,mixer:r}={}){const o=e.length;if(Mm(o===t.length),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=Aj(t,s,r),c=l.length,u=d=>{if(a&&d<e[0])return t[0];let f=0;if(c>1)for(;f<e.length-2&&!(d<e[f+1]);f++);const h=Ns(e[f],e[f+1],d);return l[f](h)};return n?d=>u(bt(e[0],e[o-1],d)):u}function Rj(e,t){const n=e[e.length-1];for(let s=1;s<=t;s++){const r=Ns(0,t,s);e.push(oe(n,1,r))}}function _j(e){const t=[0];return Rj(t,e.length-1),t}function Lj(e,t){return e.map(n=>n*t)}function zj(e,t){return e.map(()=>t||Rv).splice(0,e.length-1)}function fo({duration:e=300,keyframes:t,times:n,ease:s="easeInOut"}){const r=Ej(s)?s.map(rf):rf(s),o={done:!1,value:t[0]},a=Lj(n&&n.length===t.length?n:_j(t),e),l=Dj(a,t,{ease:Array.isArray(r)?r:zj(t,r)});return{calculatedDuration:e,next:c=>(o.value=l(c),o.done=c>=e,o)}}const Vj=e=>{const t=({timestamp:n})=>e(n);return{start:()=>ne.update(t,!0),stop:()=>dn(t),now:()=>we.isProcessing?we.timestamp:Tt.now()}},Oj={decay:sf,inertia:sf,tween:fo,keyframes:fo,spring:Dv},Fj=e=>e/100;class mu extends Pv{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:c}=this.options;c&&c()};const{name:n,motionValue:s,element:r,keyframes:o}=this.options,a=(r==null?void 0:r.KeyframeResolver)||hu,l=(c,u)=>this.onKeyframesResolved(c,u);this.resolver=new a(o,l,n,s,r),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:s=0,repeatDelay:r=0,repeatType:o,velocity:a=0}=this.options,l=nu(n)?n:Oj[n]||fo;let c,u;l!==fo&&typeof t[0]!="number"&&(c=Ur(Fj,Mv(t[0],t[1])),t=[0,100]);const d=l({...this.options,keyframes:t});o==="mirror"&&(u=l({...this.options,keyframes:[...t].reverse(),velocity:-a})),d.calculatedDuration===null&&(d.calculatedDuration=Qm(d));const{calculatedDuration:f}=d,h=f+r,y=h*(s+1)-r;return{generator:d,mirroredGenerator:u,mapPercentToKeyframes:c,calculatedDuration:f,resolvedDuration:h,totalDuration:y}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:s}=this;if(!s){const{keyframes:T}=this.options;return{done:!0,value:T[T.length-1]}}const{finalKeyframe:r,generator:o,mirroredGenerator:a,mapPercentToKeyframes:l,keyframes:c,calculatedDuration:u,totalDuration:d,resolvedDuration:f}=s;if(this.startTime===null)return o.next(0);const{delay:h,repeat:y,repeatType:x,repeatDelay:S,onUpdate:C}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-d/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const m=this.currentTime-h*(this.speed>=0?1:-1),p=this.speed>=0?m<0:m>d;this.currentTime=Math.max(m,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=d);let v=this.currentTime,w=o;if(y){const T=Math.min(this.currentTime,d)/f;let A=Math.floor(T),P=T%1;!P&&T>=1&&(P=1),P===1&&A--,A=Math.min(A,y+1),!!(A%2)&&(x==="reverse"?(P=1-P,S&&(P-=S/f)):x==="mirror"&&(w=a)),v=bt(0,1,P)*f}const g=p?{done:!1,value:c[0]}:w.next(v);l&&(g.value=l(g.value));let{done:k}=g;!p&&u!==null&&(k=this.speed>=0?this.currentTime>=d:this.currentTime<=0);const N=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&k);return N&&r!==void 0&&(g.value=Oo(c,this.options,r)),C&&C(g.value),N&&this.finish(),g}get duration(){const{resolved:t}=this;return t?zt(t.calculatedDuration):0}get time(){return zt(this.currentTime)}set time(t){t=Lt(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=zt(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=Vj,onPlay:n,startTime:s}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),n&&n();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=r):this.startTime=s??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const Ij=new Set(["opacity","clipPath","filter","transform"]);function bj(e,t,n,{delay:s=0,duration:r=300,repeat:o=0,repeatType:a="loop",ease:l="easeInOut",times:c}={}){const u={[t]:n};c&&(u.offset=c);const d=Zm(l,r);return Array.isArray(d)&&(u.easing=d),e.animate(u,{delay:s,duration:r,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:a==="reverse"?"alternate":"normal"})}const $j=$c(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),ho=10,Bj=2e4;function Uj(e){return nu(e.type)||e.type==="spring"||!Xm(e.ease)}function Hj(e,t){const n=new mu({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:e[0]};const r=[];let o=0;for(;!s.done&&o<Bj;)s=n.sample(o),r.push(s.value),o+=ho;return{times:void 0,keyframes:r,duration:o-ho,ease:"linear"}}const _v={anticipate:uv,backInOut:cv,circInOut:fv};function Wj(e){return e in _v}class of extends Pv{constructor(t){super(t);const{name:n,motionValue:s,element:r,keyframes:o}=this.options;this.resolver=new Tv(o,(a,l)=>this.onKeyframesResolved(a,l),n,s,r),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:s=300,times:r,ease:o,type:a,motionValue:l,name:c,startTime:u}=this.options;if(!l.owner||!l.owner.current)return!1;if(typeof o=="string"&&co()&&Wj(o)&&(o=_v[o]),Uj(this.options)){const{onComplete:f,onUpdate:h,motionValue:y,element:x,...S}=this.options,C=Hj(t,S);t=C.keyframes,t.length===1&&(t[1]=t[0]),s=C.duration,r=C.times,o=C.ease,a="keyframes"}const d=bj(l.owner.current,c,t,{...this.options,duration:s,times:r,ease:o});return d.startTime=u??this.calcStartTime(),this.pendingTimeline?(Ud(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:f}=this.options;l.set(Oo(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:s,times:r,type:a,ease:o,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return zt(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return zt(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.currentTime=Lt(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return qe;const{animation:s}=n;Ud(s,t)}return qe}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:s,duration:r,type:o,ease:a,times:l}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:d,onComplete:f,element:h,...y}=this.options,x=new mu({...y,keyframes:s,duration:r,type:o,ease:a,times:l,isGenerator:!0}),S=Lt(this.time);u.setWithVelocity(x.sample(S-ho).value,x.sample(S).value,ho)}const{onStop:c}=this.options;c&&c(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:s,repeatDelay:r,repeatType:o,damping:a,type:l}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=n.owner.getProps();return $j()&&s&&Ij.has(s)&&!c&&!u&&!r&&o!=="mirror"&&a!==0&&l!=="inertia"}}const Kj={type:"spring",stiffness:500,damping:25,restSpeed:10},Gj=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),qj={type:"keyframes",duration:.8},Qj={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Yj=(e,{keyframes:t})=>t.length>2?qj:Fn.has(e)?e.startsWith("scale")?Gj(t[1]):Kj:Qj;function Xj({when:e,delay:t,delayChildren:n,staggerChildren:s,staggerDirection:r,repeat:o,repeatType:a,repeatDelay:l,from:c,elapsed:u,...d}){return!!Object.keys(d).length}const vu=(e,t,n,s={},r,o)=>a=>{const l=tu(s,e)||{},c=l.delay||s.delay||0;let{elapsed:u=0}=s;u=u-Lt(c);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:h=>{t.set(h),l.onUpdate&&l.onUpdate(h)},onComplete:()=>{a(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:o?void 0:r};Xj(l)||(d={...d,...Yj(e,d)}),d.duration&&(d.duration=Lt(d.duration)),d.repeatDelay&&(d.repeatDelay=Lt(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(f=!0)),f&&!o&&t.get()!==void 0){const h=Oo(d.keyframes,l);if(h!==void 0)return ne.update(()=>{d.onUpdate(h),d.onComplete()}),new v1([])}return!o&&of.supports(d)?new of(d):new mu(d)};function Zj({protectedKeys:e,needsAnimating:t},n){const s=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,s}function Lv(e,t,{delay:n=0,transitionOverride:s,type:r}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:l,...c}=t;s&&(a=s);const u=[],d=r&&e.animationState&&e.animationState.getState()[r];for(const f in c){const h=e.getValue(f,(o=e.latestValues[f])!==null&&o!==void 0?o:null),y=c[f];if(y===void 0||d&&Zj(d,f))continue;const x={delay:n,...tu(a||{},f)};let S=!1;if(window.MotionHandoffAnimation){const m=rv(e);if(m){const p=window.MotionHandoffAnimation(m,f,ne);p!==null&&(x.startTime=p,S=!0)}}Tl(e,f),h.start(vu(f,h,y,e.shouldReduceMotion&&nv.has(f)?{type:!1}:x,e,S));const C=h.animation;C&&u.push(C)}return l&&Promise.all(u).then(()=>{ne.update(()=>{l&&A1(e,l)})}),u}function _l(e,t,n={}){var s;const r=Vo(e,t,n.type==="exit"?(s=e.presenceContext)===null||s===void 0?void 0:s.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const a=r?()=>Promise.all(Lv(e,r,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:f,staggerDirection:h}=o;return Jj(e,t,d+u,f,h,n)}:()=>Promise.resolve(),{when:c}=o;if(c){const[u,d]=c==="beforeChildren"?[a,l]:[l,a];return u().then(()=>d())}else return Promise.all([a(),l(n.delay)])}function Jj(e,t,n=0,s=0,r=1,o){const a=[],l=(e.variantChildren.size-1)*s,c=r===1?(u=0)=>u*s:(u=0)=>l-u*s;return Array.from(e.variantChildren).sort(ew).forEach((u,d)=>{u.notify("AnimationStart",t),a.push(_l(u,t,{...o,delay:n+c(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function ew(e,t){return e.sortNodePosition(t)}function tw(e,t,n={}){e.notify("AnimationStart",t);let s;if(Array.isArray(t)){const r=t.map(o=>_l(e,o,n));s=Promise.all(r)}else if(typeof t=="string")s=_l(e,t,n);else{const r=typeof t=="function"?Vo(e,t,n.custom):t;s=Promise.all(Lv(e,r,n))}return s.then(()=>{e.notify("AnimationComplete",t)})}const nw=Uc.length;function zv(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?zv(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<nw;n++){const s=Uc[n],r=e.props[s];(Er(r)||r===!1)&&(t[s]=r)}return t}const sw=[...Bc].reverse(),rw=Bc.length;function iw(e){return t=>Promise.all(t.map(({animation:n,options:s})=>tw(e,n,s)))}function ow(e){let t=iw(e),n=af(),s=!0;const r=c=>(u,d)=>{var f;const h=Vo(e,d,c==="exit"?(f=e.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(h){const{transition:y,transitionEnd:x,...S}=h;u={...u,...S,...x}}return u};function o(c){t=c(e)}function a(c){const{props:u}=e,d=zv(e.parent)||{},f=[],h=new Set;let y={},x=1/0;for(let C=0;C<rw;C++){const m=sw[C],p=n[m],v=u[m]!==void 0?u[m]:d[m],w=Er(v),g=m===c?p.isActive:null;g===!1&&(x=C);let k=v===d[m]&&v!==u[m]&&w;if(k&&s&&e.manuallyAnimateOnMount&&(k=!1),p.protectedKeys={...y},!p.isActive&&g===null||!v&&!p.prevProp||Lo(v)||typeof v=="boolean")continue;const N=aw(p.prevProp,v);let T=N||m===c&&p.isActive&&!k&&w||C>x&&w,A=!1;const P=Array.isArray(v)?v:[v];let $=P.reduce(r(m),{});g===!1&&($={});const{prevResolvedValues:b={}}=p,Q={...b,...$},de=W=>{T=!0,h.has(W)&&(A=!0,h.delete(W)),p.needsAnimating[W]=!0;const M=e.getValue(W);M&&(M.liveStyle=!1)};for(const W in Q){const M=$[W],z=b[W];if(y.hasOwnProperty(W))continue;let O=!1;kl(M)&&kl(z)?O=!qm(M,z):O=M!==z,O?M!=null?de(W):h.add(W):M!==void 0&&h.has(W)?de(W):p.protectedKeys[W]=!0}p.prevProp=v,p.prevResolvedValues=$,p.isActive&&(y={...y,...$}),s&&e.blockInitialAnimation&&(T=!1),T&&(!(k&&N)||A)&&f.push(...P.map(W=>({animation:W,options:{type:m}})))}if(h.size){const C={};h.forEach(m=>{const p=e.getBaseTarget(m),v=e.getValue(m);v&&(v.liveStyle=!0),C[m]=p??null}),f.push({animation:C})}let S=!!f.length;return s&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(S=!1),s=!1,S?t(f):Promise.resolve()}function l(c,u){var d;if(n[c].isActive===u)return Promise.resolve();(d=e.variantChildren)===null||d===void 0||d.forEach(h=>{var y;return(y=h.animationState)===null||y===void 0?void 0:y.setActive(c,u)}),n[c].isActive=u;const f=a(c);for(const h in n)n[h].protectedKeys={};return f}return{animateChanges:a,setActive:l,setAnimateFunction:o,getState:()=>n,reset:()=>{n=af(),s=!0}}}function aw(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!qm(t,e):!1}function yn(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function af(){return{animate:yn(!0),whileInView:yn(),whileHover:yn(),whileTap:yn(),whileDrag:yn(),whileFocus:yn(),exit:yn()}}class vn{constructor(t){this.isMounted=!1,this.node=t}update(){}}class lw extends vn{constructor(t){super(t),t.animationState||(t.animationState=ow(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Lo(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let cw=0;class uw extends vn{constructor(){super(...arguments),this.id=cw++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const r=this.node.animationState.setActive("exit",!t);n&&!t&&r.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const dw={animation:{Feature:lw},exit:{Feature:uw}};function Rr(e,t,n,s={passive:!0}){return e.addEventListener(t,n,s),()=>e.removeEventListener(t,n)}function Hr(e){return{point:{x:e.pageX,y:e.pageY}}}const fw=e=>t=>ru(t)&&e(t,Hr(t));function or(e,t,n,s){return Rr(e,t,fw(n),s)}const lf=(e,t)=>Math.abs(e-t);function hw(e,t){const n=lf(e.x,t.x),s=lf(e.y,t.y);return Math.sqrt(n**2+s**2)}class Vv{constructor(t,n,{transformPagePoint:s,contextWindow:r,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=ga(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,y=hw(f.offset,{x:0,y:0})>=3;if(!h&&!y)return;const{point:x}=f,{timestamp:S}=we;this.history.push({...x,timestamp:S});const{onStart:C,onMove:m}=this.handlers;h||(C&&C(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),m&&m(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=ya(h,this.transformPagePoint),ne.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:y,onSessionEnd:x,resumeAnimation:S}=this.handlers;if(this.dragSnapToOrigin&&S&&S(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const C=ga(f.type==="pointercancel"?this.lastMoveEventInfo:ya(h,this.transformPagePoint),this.history);this.startEvent&&y&&y(f,C),x&&x(f,C)},!ru(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.contextWindow=r||window;const a=Hr(t),l=ya(a,this.transformPagePoint),{point:c}=l,{timestamp:u}=we;this.history=[{...c,timestamp:u}];const{onSessionStart:d}=n;d&&d(t,ga(l,this.history)),this.removeListeners=Ur(or(this.contextWindow,"pointermove",this.handlePointerMove),or(this.contextWindow,"pointerup",this.handlePointerUp),or(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),dn(this.updatePoint)}}function ya(e,t){return t?{point:t(e.point)}:e}function cf(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ga({point:e},t){return{point:e,delta:cf(e,Ov(t)),offset:cf(e,pw(t)),velocity:mw(t,.1)}}function pw(e){return e[0]}function Ov(e){return e[e.length-1]}function mw(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,s=null;const r=Ov(e);for(;n>=0&&(s=e[n],!(r.timestamp-s.timestamp>Lt(t)));)n--;if(!s)return{x:0,y:0};const o=zt(r.timestamp-s.timestamp);if(o===0)return{x:0,y:0};const a={x:(r.x-s.x)/o,y:(r.y-s.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}const Fv=1e-4,vw=1-Fv,yw=1+Fv,Iv=.01,gw=0-Iv,xw=0+Iv;function Ye(e){return e.max-e.min}function jw(e,t,n){return Math.abs(e-t)<=n}function uf(e,t,n,s=.5){e.origin=s,e.originPoint=oe(t.min,t.max,e.origin),e.scale=Ye(n)/Ye(t),e.translate=oe(n.min,n.max,e.origin)-e.originPoint,(e.scale>=vw&&e.scale<=yw||isNaN(e.scale))&&(e.scale=1),(e.translate>=gw&&e.translate<=xw||isNaN(e.translate))&&(e.translate=0)}function ar(e,t,n,s){uf(e.x,t.x,n.x,s?s.originX:void 0),uf(e.y,t.y,n.y,s?s.originY:void 0)}function df(e,t,n){e.min=n.min+t.min,e.max=e.min+Ye(t)}function ww(e,t,n){df(e.x,t.x,n.x),df(e.y,t.y,n.y)}function ff(e,t,n){e.min=t.min-n.min,e.max=e.min+Ye(t)}function lr(e,t,n){ff(e.x,t.x,n.x),ff(e.y,t.y,n.y)}function Sw(e,{min:t,max:n},s){return t!==void 0&&e<t?e=s?oe(t,e,s.min):Math.max(e,t):n!==void 0&&e>n&&(e=s?oe(n,e,s.max):Math.min(e,n)),e}function hf(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 kw(e,{top:t,left:n,bottom:s,right:r}){return{x:hf(e.x,n,r),y:hf(e.y,t,s)}}function pf(e,t){let n=t.min-e.min,s=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,s]=[s,n]),{min:n,max:s}}function Nw(e,t){return{x:pf(e.x,t.x),y:pf(e.y,t.y)}}function Cw(e,t){let n=.5;const s=Ye(e),r=Ye(t);return r>s?n=Ns(t.min,t.max-s,e.min):s>r&&(n=Ns(e.min,e.max-r,t.min)),bt(0,1,n)}function Tw(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 Ll=.35;function Pw(e=Ll){return e===!1?e=0:e===!0&&(e=Ll),{x:mf(e,"left","right"),y:mf(e,"top","bottom")}}function mf(e,t,n){return{min:vf(e,t),max:vf(e,n)}}function vf(e,t){return typeof e=="number"?e:e[t]||0}const yf=()=>({translate:0,scale:1,origin:0,originPoint:0}),ts=()=>({x:yf(),y:yf()}),gf=()=>({min:0,max:0}),he=()=>({x:gf(),y:gf()});function tt(e){return[e("x"),e("y")]}function bv({top:e,left:t,right:n,bottom:s}){return{x:{min:t,max:n},y:{min:e,max:s}}}function Ew({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Mw(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),s=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function xa(e){return e===void 0||e===1}function zl({scale:e,scaleX:t,scaleY:n}){return!xa(e)||!xa(t)||!xa(n)}function wn(e){return zl(e)||$v(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function $v(e){return xf(e.x)||xf(e.y)}function xf(e){return e&&e!=="0%"}function po(e,t,n){const s=e-n,r=t*s;return n+r}function jf(e,t,n,s,r){return r!==void 0&&(e=po(e,r,s)),po(e,n,s)+t}function Vl(e,t=0,n=1,s,r){e.min=jf(e.min,t,n,s,r),e.max=jf(e.max,t,n,s,r)}function Bv(e,{x:t,y:n}){Vl(e.x,t.translate,t.scale,t.originPoint),Vl(e.y,n.translate,n.scale,n.originPoint)}const wf=.999999999999,Sf=1.0000000000001;function Aw(e,t,n,s=!1){const r=n.length;if(!r)return;t.x=t.y=1;let o,a;for(let l=0;l<r;l++){o=n[l],a=o.projectionDelta;const{visualElement:c}=o.options;c&&c.props.style&&c.props.style.display==="contents"||(s&&o.options.layoutScroll&&o.scroll&&o!==o.root&&ss(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Bv(e,a)),s&&wn(o.latestValues)&&ss(e,o.latestValues))}t.x<Sf&&t.x>wf&&(t.x=1),t.y<Sf&&t.y>wf&&(t.y=1)}function ns(e,t){e.min=e.min+t,e.max=e.max+t}function kf(e,t,n,s,r=.5){const o=oe(e.min,e.max,r);Vl(e,t,n,o,s)}function ss(e,t){kf(e.x,t.x,t.scaleX,t.scale,t.originX),kf(e.y,t.y,t.scaleY,t.scale,t.originY)}function Uv(e,t){return bv(Mw(e.getBoundingClientRect(),t))}function Dw(e,t,n){const s=Uv(e,n),{scroll:r}=t;return r&&(ns(s.x,r.offset.x),ns(s.y,r.offset.y)),s}const Hv=({current:e})=>e?e.ownerDocument.defaultView:null,Rw=new WeakMap;class _w{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=he(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const r=d=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Hr(d).point)},o=(d,f)=>{const{drag:h,dragPropagation:y,onDragStart:x}=this.getProps();if(h&&!y&&(this.openDragLock&&this.openDragLock(),this.openDragLock=C1(h),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),tt(C=>{let m=this.getAxisMotionValue(C).get()||0;if(Ct.test(m)){const{projection:p}=this.visualElement;if(p&&p.layout){const v=p.layout.layoutBox[C];v&&(m=Ye(v)*(parseFloat(m)/100))}}this.originPoint[C]=m}),x&&ne.postRender(()=>x(d,f)),Tl(this.visualElement,"transform");const{animationState:S}=this.visualElement;S&&S.setActive("whileDrag",!0)},a=(d,f)=>{const{dragPropagation:h,dragDirectionLock:y,onDirectionLock:x,onDrag:S}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:C}=f;if(y&&this.currentDirection===null){this.currentDirection=Lw(C),this.currentDirection!==null&&x&&x(this.currentDirection);return}this.updateAxis("x",f.point,C),this.updateAxis("y",f.point,C),this.visualElement.render(),S&&S(d,f)},l=(d,f)=>this.stop(d,f),c=()=>tt(d=>{var f;return this.getAnimationState(d)==="paused"&&((f=this.getAxisMotionValue(d).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new Vv(t,{onSessionStart:r,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:Hv(this.visualElement)})}stop(t,n){const s=this.isDragging;if(this.cancel(),!s)return;const{velocity:r}=n;this.startAnimation(r);const{onDragEnd:o}=this.getProps();o&&ne.postRender(()=>o(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:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,s){const{drag:r}=this.getProps();if(!s||!hi(t,r,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+s[t];this.constraints&&this.constraints[t]&&(a=Sw(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:s}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,o=this.constraints;n&&Jn(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&r?this.constraints=kw(r.layoutBox,n):this.constraints=!1,this.elastic=Pw(s),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&tt(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=Tw(r.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Jn(t))return!1;const s=t.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const o=Dw(s,r.root,this.visualElement.getTransformPagePoint());let a=Nw(r.layout.layoutBox,o);if(n){const l=n(Ew(a));this.hasMutatedConstraints=!!l,l&&(a=bv(l))}return a}startAnimation(t){const{drag:n,dragMomentum:s,dragElastic:r,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},u=tt(d=>{if(!hi(d,n,this.currentDirection))return;let f=c&&c[d]||{};a&&(f={min:0,max:0});const h=r?200:1e6,y=r?40:1e7,x={type:"inertia",velocity:s?t[d]:0,bounceStiffness:h,bounceDamping:y,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(d,x)});return Promise.all(u).then(l)}startAxisValueAnimation(t,n){const s=this.getAxisMotionValue(t);return Tl(this.visualElement,t),s.start(vu(t,s,0,n,this.visualElement,!1))}stopAnimation(){tt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){tt(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()}`,s=this.visualElement.getProps(),r=s[n];return r||this.visualElement.getValue(t,(s.initial?s.initial[t]:void 0)||0)}snapToCursor(t){tt(n=>{const{drag:s}=this.getProps();if(!hi(n,s,this.currentDirection))return;const{projection:r}=this.visualElement,o=this.getAxisMotionValue(n);if(r&&r.layout){const{min:a,max:l}=r.layout.layoutBox[n];o.set(t[n]-oe(a,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!Jn(n)||!s||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};tt(a=>{const l=this.getAxisMotionValue(a);if(l&&this.constraints!==!1){const c=l.get();r[a]=Cw({min:c,max:c},this.constraints[a])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),tt(a=>{if(!hi(a,t,null))return;const l=this.getAxisMotionValue(a),{min:c,max:u}=this.constraints[a];l.set(oe(c,u,r[a]))})}addListeners(){if(!this.visualElement.current)return;Rw.set(this.visualElement,this);const t=this.visualElement.current,n=or(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(c)}),s=()=>{const{dragConstraints:c}=this.getProps();Jn(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,o=r.addEventListener("measure",s);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),ne.read(s);const a=Rr(window,"resize",()=>this.scalePositionWithinConstraints()),l=r.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(tt(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=c[d].translate,f.set(f.get()+c[d].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:a=Ll,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:s,dragPropagation:r,dragConstraints:o,dragElastic:a,dragMomentum:l}}}function hi(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Lw(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class zw extends vn{constructor(t){super(t),this.removeGroupControls=qe,this.removeListeners=qe,this.controls=new _w(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||qe}unmount(){this.removeGroupControls(),this.removeListeners()}}const Nf=e=>(t,n)=>{e&&ne.postRender(()=>e(t,n))};class Vw extends vn{constructor(){super(...arguments),this.removePointerDownListener=qe}onPointerDown(t){this.session=new Vv(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Hv(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:s,onPanEnd:r}=this.node.getProps();return{onSessionStart:Nf(t),onStart:Nf(n),onMove:s,onEnd:(o,a)=>{delete this.session,r&&ne.postRender(()=>r(o,a))}}}mount(){this.removePointerDownListener=or(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const _i={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Cf(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const bs={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(I.test(e))e=parseFloat(e);else return e;const n=Cf(e,t.target.x),s=Cf(e,t.target.y);return`${n}% ${s}%`}},Ow={correct:(e,{treeScale:t,projectionDelta:n})=>{const s=e,r=fn.parse(e);if(r.length>5)return s;const o=fn.createTransformer(e),a=typeof r[0]!="number"?1:0,l=n.x.scale*t.x,c=n.y.scale*t.y;r[0+a]/=l,r[1+a]/=c;const u=oe(l,c,.5);return typeof r[2+a]=="number"&&(r[2+a]/=u),typeof r[3+a]=="number"&&(r[3+a]/=u),o(r)}};class Fw extends j.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s,layoutId:r}=this.props,{projection:o}=t;r1(Iw),o&&(n.group&&n.group.add(o),s&&s.register&&r&&s.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),_i.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:s,drag:r,isPresent:o}=this.props,a=s.projection;return a&&(a.isPresent=o,r||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||ne.postRender(()=>{const l=a.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Wc.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:r}=t;r&&(r.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(r),s&&s.deregister&&s.deregister(r))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Wv(e){const[t,n]=Pm(),s=j.useContext(Oc);return i.jsx(Fw,{...e,layoutGroup:s,switchLayoutGroup:j.useContext(zm),isPresent:t,safeToRemove:n})}const Iw={borderRadius:{...bs,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:bs,borderTopRightRadius:bs,borderBottomLeftRadius:bs,borderBottomRightRadius:bs,boxShadow:Ow};function bw(e,t,n){const s=Ee(e)?e:Ar(e);return s.start(vu("",s,t,n)),s.animation}function $w(e){return e instanceof SVGElement&&e.tagName!=="svg"}const Bw=(e,t)=>e.depth-t.depth;class Uw{constructor(){this.children=[],this.isDirty=!1}add(t){iu(this.children,t),this.isDirty=!0}remove(t){ou(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Bw),this.isDirty=!1,this.children.forEach(t)}}function Hw(e,t){const n=Tt.now(),s=({timestamp:r})=>{const o=r-n;o>=t&&(dn(s),e(o-t))};return ne.read(s,!0),()=>dn(s)}const Kv=["TopLeft","TopRight","BottomLeft","BottomRight"],Ww=Kv.length,Tf=e=>typeof e=="string"?parseFloat(e):e,Pf=e=>typeof e=="number"||I.test(e);function Kw(e,t,n,s,r,o){r?(e.opacity=oe(0,n.opacity!==void 0?n.opacity:1,Gw(s)),e.opacityExit=oe(t.opacity!==void 0?t.opacity:1,0,qw(s))):o&&(e.opacity=oe(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,s));for(let a=0;a<Ww;a++){const l=`border${Kv[a]}Radius`;let c=Ef(t,l),u=Ef(n,l);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||Pf(c)===Pf(u)?(e[l]=Math.max(oe(Tf(c),Tf(u),s),0),(Ct.test(u)||Ct.test(c))&&(e[l]+="%")):e[l]=u}(t.rotate||n.rotate)&&(e.rotate=oe(t.rotate||0,n.rotate||0,s))}function Ef(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Gw=Gv(0,.5,dv),qw=Gv(.5,.95,qe);function Gv(e,t,n){return s=>s<e?0:s>t?1:n(Ns(e,t,s))}function Mf(e,t){e.min=t.min,e.max=t.max}function et(e,t){Mf(e.x,t.x),Mf(e.y,t.y)}function Af(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Df(e,t,n,s,r){return e-=t,e=po(e,1/n,s),r!==void 0&&(e=po(e,1/r,s)),e}function Qw(e,t=0,n=1,s=.5,r,o=e,a=e){if(Ct.test(t)&&(t=parseFloat(t),t=oe(a.min,a.max,t/100)-a.min),typeof t!="number")return;let l=oe(o.min,o.max,s);e===o&&(l-=t),e.min=Df(e.min,t,n,l,r),e.max=Df(e.max,t,n,l,r)}function Rf(e,t,[n,s,r],o,a){Qw(e,t[n],t[s],t[r],t.scale,o,a)}const Yw=["x","scaleX","originX"],Xw=["y","scaleY","originY"];function _f(e,t,n,s){Rf(e.x,t,Yw,n?n.x:void 0,s?s.x:void 0),Rf(e.y,t,Xw,n?n.y:void 0,s?s.y:void 0)}function Lf(e){return e.translate===0&&e.scale===1}function qv(e){return Lf(e.x)&&Lf(e.y)}function zf(e,t){return e.min===t.min&&e.max===t.max}function Zw(e,t){return zf(e.x,t.x)&&zf(e.y,t.y)}function Vf(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Qv(e,t){return Vf(e.x,t.x)&&Vf(e.y,t.y)}function Of(e){return Ye(e.x)/Ye(e.y)}function Ff(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Jw{constructor(){this.members=[]}add(t){iu(this.members,t),t.scheduleRender()}remove(t){if(ou(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(r=>t===r);if(n===0)return!1;let s;for(let r=n;r>=0;r--){const o=this.members[r];if(o.isPresent!==!1){s=o;break}}return s?(this.promote(s),!0):!1}promote(t,n){const s=this.lead;if(t!==s&&(this.prevLead=s,this.lead=t,t.show(),s)){s.instance&&s.scheduleRender(),t.scheduleRender(),t.resumeFrom=s,n&&(t.resumeFrom.preserveOpacity=!0),s.snapshot&&(t.snapshot=s.snapshot,t.snapshot.latestValues=s.animationValues||s.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:r}=t.options;r===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:s}=t;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function e2(e,t,n){let s="";const r=e.x.translate/t.x,o=e.y.translate/t.y,a=(n==null?void 0:n.z)||0;if((r||o||a)&&(s=`translate3d(${r}px, ${o}px, ${a}px) `),(t.x!==1||t.y!==1)&&(s+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:f,rotateY:h,skewX:y,skewY:x}=n;u&&(s=`perspective(${u}px) ${s}`),d&&(s+=`rotate(${d}deg) `),f&&(s+=`rotateX(${f}deg) `),h&&(s+=`rotateY(${h}deg) `),y&&(s+=`skewX(${y}deg) `),x&&(s+=`skewY(${x}deg) `)}const l=e.x.scale*t.x,c=e.y.scale*t.y;return(l!==1||c!==1)&&(s+=`scale(${l}, ${c})`),s||"none"}const Sn={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},qs=typeof window<"u"&&window.MotionDebug!==void 0,ja=["","X","Y","Z"],t2={visibility:"hidden"},If=1e3;let n2=0;function wa(e,t,n,s){const{latestValues:r}=t;r[e]&&(n[e]=r[e],t.setStaticValue(e,0),s&&(s[e]=0))}function Yv(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=rv(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:r,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ne,!(r||o))}const{parent:s}=e;s&&!s.hasCheckedOptimisedAppear&&Yv(s)}function Xv({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:s,resetTransform:r}){return class{constructor(a={},l=t==null?void 0:t()){this.id=n2++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,qs&&(Sn.totalNodes=Sn.resolvedTargetDeltas=Sn.recalculatedProjection=0),this.nodes.forEach(i2),this.nodes.forEach(u2),this.nodes.forEach(d2),this.nodes.forEach(o2),qs&&window.MotionDebug.record(Sn)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,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 c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new Uw)}addEventListener(a,l){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new au),this.eventHandlers.get(a).add(l)}notifyListeners(a,...l){const c=this.eventHandlers.get(a);c&&c.notify(...l)}hasListeners(a){return this.eventHandlers.has(a)}mount(a,l=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=$w(a),this.instance=a;const{layoutId:c,layout:u,visualElement:d}=this.options;if(d&&!d.current&&d.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),l&&(u||c)&&(this.isLayoutDirty=!0),e){let f;const h=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=Hw(h,250),_i.hasAnimatedSinceResize&&(_i.hasAnimatedSinceResize=!1,this.nodes.forEach($f))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&d&&(c||u)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:h,hasRelativeTargetChanged:y,layout:x})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const S=this.options.transition||d.getDefaultTransition()||v2,{onLayoutAnimationStart:C,onLayoutAnimationComplete:m}=d.getProps(),p=!this.targetLayout||!Qv(this.targetLayout,x)||y,v=!h&&y;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||v||h&&(p||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,v);const w={...tu(S,"layout"),onPlay:C,onComplete:m};(d.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w)}else h||$f(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=x})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,dn(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(f2),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Yv(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const f=this.path[d];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:l,layout:c}=this.options;if(l===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(bf);return}this.isUpdating||this.nodes.forEach(l2),this.isUpdating=!1,this.nodes.forEach(c2),this.nodes.forEach(s2),this.nodes.forEach(r2),this.clearAllSnapshots();const l=Tt.now();we.delta=bt(0,1e3/60,l-we.timestamp),we.timestamp=l,we.isProcessing=!0,da.update.process(we),da.preRender.process(we),da.render.process(we),we.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Wc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(a2),this.sharedNodes.forEach(h2)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ne.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ne.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 c=0;c<this.path.length;c++)this.path[c].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=he(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(l=!1),l){const c=s(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!r)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!qv(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;a&&(l||wn(this.latestValues)||d)&&(r(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return a&&(c=this.removeTransform(c)),y2(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var a;const{visualElement:l}=this.options;if(!l)return he();const c=l.measureViewportBox();if(!(((a=this.scroll)===null||a===void 0?void 0:a.wasRoot)||this.path.some(g2))){const{scroll:d}=this.root;d&&(ns(c.x,d.offset.x),ns(c.y,d.offset.y))}return c}removeElementScroll(a){var l;const c=he();if(et(c,a),!((l=this.scroll)===null||l===void 0)&&l.wasRoot)return c;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:f,options:h}=d;d!==this.root&&f&&h.layoutScroll&&(f.wasRoot&&et(c,a),ns(c.x,f.offset.x),ns(c.y,f.offset.y))}return c}applyTransform(a,l=!1){const c=he();et(c,a);for(let u=0;u<this.path.length;u++){const d=this.path[u];!l&&d.options.layoutScroll&&d.scroll&&d!==d.root&&ss(c,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),wn(d.latestValues)&&ss(c,d.latestValues)}return wn(this.latestValues)&&ss(c,this.latestValues),c}removeTransform(a){const l=he();et(l,a);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!wn(u.latestValues))continue;zl(u.latestValues)&&u.updateSnapshot();const d=he(),f=u.measurePageBox();et(d,f),_f(l,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return wn(this.latestValues)&&_f(l,this.latestValues),l}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.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!==we.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var l;const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==c;if(!(a||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((l=this.parent)===null||l===void 0)&&l.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:f,layoutId:h}=this.options;if(!(!this.layout||!(f||h))){if(this.resolvedRelativeTargetAt=we.timestamp,!this.targetDelta&&!this.relativeTarget){const y=this.getClosestProjectingParent();y&&y.layout&&this.animationProgress!==1?(this.relativeParent=y,this.forceRelativeParentToResolveTarget(),this.relativeTarget=he(),this.relativeTargetOrigin=he(),lr(this.relativeTargetOrigin,this.layout.layoutBox,y.layout.layoutBox),et(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=he(),this.targetWithTransforms=he()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),ww(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):et(this.target,this.layout.layoutBox),Bv(this.target,this.targetDelta)):et(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const y=this.getClosestProjectingParent();y&&!!y.resumingFrom==!!this.resumingFrom&&!y.options.layoutScroll&&y.target&&this.animationProgress!==1?(this.relativeParent=y,this.forceRelativeParentToResolveTarget(),this.relativeTarget=he(),this.relativeTargetOrigin=he(),lr(this.relativeTargetOrigin,this.target,y.target),et(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}qs&&Sn.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||zl(this.parent.latestValues)||$v(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 a;const l=this.getLead(),c=!!this.resumingFrom||this!==l;let u=!0;if((this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty)&&(u=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===we.timestamp&&(u=!1),u)return;const{layout:d,layoutId:f}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||f))return;et(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,y=this.treeScale.y;Aw(this.layoutCorrected,this.treeScale,this.path,c),l.layout&&!l.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(l.target=l.layout.layoutBox,l.targetWithTransforms=he());const{target:x}=l;if(!x){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Af(this.prevProjectionDelta.x,this.projectionDelta.x),Af(this.prevProjectionDelta.y,this.projectionDelta.y)),ar(this.projectionDelta,this.layoutCorrected,x,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==y||!Ff(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ff(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",x)),qs&&Sn.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var l;if((l=this.options.visualElement)===null||l===void 0||l.scheduleRender(),a){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ts(),this.projectionDelta=ts(),this.projectionDeltaWithTransform=ts()}setAnimationOrigin(a,l=!1){const c=this.snapshot,u=c?c.latestValues:{},d={...this.latestValues},f=ts();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const h=he(),y=c?c.source:void 0,x=this.layout?this.layout.source:void 0,S=y!==x,C=this.getStack(),m=!C||C.members.length<=1,p=!!(S&&!m&&this.options.crossfade===!0&&!this.path.some(m2));this.animationProgress=0;let v;this.mixTargetDelta=w=>{const g=w/1e3;Bf(f.x,a.x,g),Bf(f.y,a.y,g),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(lr(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),p2(this.relativeTarget,this.relativeTargetOrigin,h,g),v&&Zw(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=he()),et(v,this.relativeTarget)),S&&(this.animationValues=d,Kw(d,u,this.latestValues,g,p,m)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=g},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(dn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ne.update(()=>{_i.hasAnimatedSinceResize=!0,this.currentAnimation=bw(0,If,{...a,onUpdate:l=>{this.mixTargetDelta(l),a.onUpdate&&a.onUpdate(l)},onComplete:()=>{a.onComplete&&a.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 a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(If),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:l,target:c,layout:u,latestValues:d}=a;if(!(!l||!c||!u)){if(this!==a&&this.layout&&u&&Zv(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||he();const f=Ye(this.layout.layoutBox.x);c.x.min=a.target.x.min,c.x.max=c.x.min+f;const h=Ye(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+h}et(l,c),ss(l,d),ar(this.projectionDeltaWithTransform,this.layoutCorrected,l,d)}}registerSharedNode(a,l){this.sharedNodes.has(a)||this.sharedNodes.set(a,new Jw),this.sharedNodes.get(a).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 a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:l}=this.options;return l?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:l}=this.options;return l?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:l,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),a&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let l=!1;const{latestValues:c}=a;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(l=!0),!l)return;const u={};c.z&&wa("z",a,u,this.animationValues);for(let d=0;d<ja.length;d++)wa(`rotate${ja[d]}`,a,u,this.animationValues),wa(`skew${ja[d]}`,a,u,this.animationValues);a.render();for(const d in u)a.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);a.scheduleRender()}getProjectionStyles(a){var l,c;if(!this.instance||this.isSVG)return;if(!this.isVisible)return t2;const u={visibility:""},d=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=Di(a==null?void 0:a.pointerEvents)||"",u.transform=d?d(this.latestValues,""):"none",u;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const S={};return this.options.layoutId&&(S.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,S.pointerEvents=Di(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!wn(this.latestValues)&&(S.transform=d?d({},""):"none",this.hasProjected=!1),S}const h=f.animationValues||f.latestValues;this.applyTransformsToTarget(),u.transform=e2(this.projectionDeltaWithTransform,this.treeScale,h),d&&(u.transform=d(h,u.transform));const{x:y,y:x}=this.projectionDelta;u.transformOrigin=`${y.origin*100}% ${x.origin*100}% 0`,f.animationValues?u.opacity=f===this?(c=(l=h.opacity)!==null&&l!==void 0?l:this.latestValues.opacity)!==null&&c!==void 0?c:1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:u.opacity=f===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const S in lo){if(h[S]===void 0)continue;const{correct:C,applyTo:m}=lo[S],p=u.transform==="none"?h[S]:C(h[S],f);if(m){const v=m.length;for(let w=0;w<v;w++)u[m[w]]=p}else u[S]=p}return this.options.layoutId&&(u.pointerEvents=f===this?Di(a==null?void 0:a.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var l;return(l=a.currentAnimation)===null||l===void 0?void 0:l.stop()}),this.root.nodes.forEach(bf),this.root.sharedNodes.clear()}}}function s2(e){e.updateLayout()}function r2(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:s,measuredBox:r}=e.layout,{animationType:o}=e.options,a=n.source!==e.layout.source;o==="size"?tt(f=>{const h=a?n.measuredBox[f]:n.layoutBox[f],y=Ye(h);h.min=s[f].min,h.max=h.min+y}):Zv(o,n.layoutBox,s)&&tt(f=>{const h=a?n.measuredBox[f]:n.layoutBox[f],y=Ye(s[f]);h.max=h.min+y,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+y)});const l=ts();ar(l,s,n.layoutBox);const c=ts();a?ar(c,e.applyTransform(r,!0),n.measuredBox):ar(c,s,n.layoutBox);const u=!qv(l);let d=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:y}=f;if(h&&y){const x=he();lr(x,n.layoutBox,h.layoutBox);const S=he();lr(S,s,y.layoutBox),Qv(x,S)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=S,e.relativeTargetOrigin=x,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:s,snapshot:n,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeTargetChanged:d})}else if(e.isLead()){const{onExitComplete:s}=e.options;s&&s()}e.options.transition=void 0}function i2(e){qs&&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 o2(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function a2(e){e.clearSnapshot()}function bf(e){e.clearMeasurements()}function l2(e){e.isLayoutDirty=!1}function c2(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function $f(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function u2(e){e.resolveTargetDelta()}function d2(e){e.calcProjection()}function f2(e){e.resetSkewAndRotation()}function h2(e){e.removeLeadSnapshot()}function Bf(e,t,n){e.translate=oe(t.translate,0,n),e.scale=oe(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Uf(e,t,n,s){e.min=oe(t.min,n.min,s),e.max=oe(t.max,n.max,s)}function p2(e,t,n,s){Uf(e.x,t.x,n.x,s),Uf(e.y,t.y,n.y,s)}function m2(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const v2={duration:.45,ease:[.4,0,.1,1]},Hf=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Wf=Hf("applewebkit/")&&!Hf("chrome/")?Math.round:qe;function Kf(e){e.min=Wf(e.min),e.max=Wf(e.max)}function y2(e){Kf(e.x),Kf(e.y)}function Zv(e,t,n){return e==="position"||e==="preserve-aspect"&&!jw(Of(t),Of(n),.2)}function g2(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const x2=Xv({attachResizeListener:(e,t)=>Rr(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Sa={current:void 0},Jv=Xv({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Sa.current){const e=new x2({});e.mount(window),e.setOptions({layoutScroll:!0}),Sa.current=e}return Sa.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),j2={pan:{Feature:Vw},drag:{Feature:zw,ProjectionNode:Jv,MeasureLayout:Wv}};function Gf(e,t,n){const{props:s}=e;e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",n==="Start");const r="onHover"+n,o=s[r];o&&ne.postRender(()=>o(t,Hr(t)))}class w2 extends vn{mount(){const{current:t}=this.node;t&&(this.unmount=j1(t,n=>(Gf(this.node,n,"Start"),s=>Gf(this.node,s,"End"))))}unmount(){}}class S2 extends vn{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=Ur(Rr(this.node.current,"focus",()=>this.onFocus()),Rr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function qf(e,t,n){const{props:s}=e;e.animationState&&s.whileTap&&e.animationState.setActive("whileTap",n==="Start");const r="onTap"+(n==="End"?"":n),o=s[r];o&&ne.postRender(()=>o(t,Hr(t)))}class k2 extends vn{mount(){const{current:t}=this.node;t&&(this.unmount=N1(t,n=>(qf(this.node,n,"Start"),(s,{success:r})=>qf(this.node,s,r?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Ol=new WeakMap,ka=new WeakMap,N2=e=>{const t=Ol.get(e.target);t&&t(e)},C2=e=>{e.forEach(N2)};function T2({root:e,...t}){const n=e||document;ka.has(n)||ka.set(n,{});const s=ka.get(n),r=JSON.stringify(t);return s[r]||(s[r]=new IntersectionObserver(C2,{root:e,...t})),s[r]}function P2(e,t,n){const s=T2(t);return Ol.set(e,n),s.observe(e),()=>{Ol.delete(e),s.unobserve(e)}}const E2={some:0,all:1};class M2 extends vn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:s,amount:r="some",once:o}=t,a={root:n?n.current:void 0,rootMargin:s,threshold:typeof r=="number"?r:E2[r]},l=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:f}=this.node.getProps(),h=u?d:f;h&&h(c)};return P2(this.node.current,a,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(A2(t,n))&&this.startObserver()}unmount(){}}function A2({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const D2={inView:{Feature:M2},tap:{Feature:k2},focus:{Feature:S2},hover:{Feature:w2}},R2={layout:{ProjectionNode:Jv,MeasureLayout:Wv}},Fl={current:null},ey={current:!1};function _2(){if(ey.current=!0,!!bc)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Fl.current=e.matches;e.addListener(t),t()}else Fl.current=!1}const L2=[...Cv,Te,fn],z2=e=>L2.find(Nv(e)),Qf=new WeakMap;function V2(e,t,n){for(const s in t){const r=t[s],o=n[s];if(Ee(r))e.addValue(s,r);else if(Ee(o))e.addValue(s,Ar(r,{owner:e}));else if(o!==r)if(e.hasValue(s)){const a=e.getValue(s);a.liveStyle===!0?a.jump(r):a.hasAnimated||a.set(r)}else{const a=e.getStaticValue(s);e.addValue(s,Ar(a!==void 0?a:r,{owner:e}))}}for(const s in n)t[s]===void 0&&e.removeValue(s);return t}const Yf=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class O2{scrapeMotionValuesFromProps(t,n,s){return{}}constructor({parent:t,props:n,presenceContext:s,reducedMotionConfig:r,blockInitialAnimation:o,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=hu,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const y=Tt.now();this.renderScheduledAt<y&&(this.renderScheduledAt=y,ne.render(this.render,!1,!0))};const{latestValues:c,renderState:u,onUpdate:d}=a;this.onUpdate=d,this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=s,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=l,this.blockInitialAnimation=!!o,this.isControllingVariants=zo(n),this.isVariantNode=_m(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:f,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const y in h){const x=h[y];c[y]!==void 0&&Ee(x)&&x.set(c[y],!1)}}mount(t){this.current=t,Qf.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,s)=>this.bindToMotionValue(s,n)),ey.current||_2(),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(){Qf.delete(this.current),this.projection&&this.projection.unmount(),dn(this.notifyUpdate),dn(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const s=Fn.has(t),r=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&ne.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{r(),o(),a&&a(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Cs){const n=Cs[t];if(!n)continue;const{isEnabled:s,Feature:r}=n;if(!this.features[t]&&r&&s(this.props)&&(this.features[t]=new r(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):he()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<Yf.length;s++){const r=Yf[s];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const o="on"+r,a=t[o];a&&(this.propEventSubscriptions[r]=this.on(r,a))}this.prevMotionValues=V2(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const s=this.values.get(t);n!==s&&(s&&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 s=this.values.get(t);return s===void 0&&n!==void 0&&(s=Ar(n===null?void 0:n,{owner:this}),this.addValue(t,s)),s}readValue(t,n){var s;let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(s=this.getBaseTargetFromProps(this.props,t))!==null&&s!==void 0?s:this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(Sv(r)||hv(r))?r=parseFloat(r):!z2(r)&&fn.test(n)&&(r=xv(t,n)),this.setBaseTarget(t,Ee(r)?r.get():r)),Ee(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:s}=this.props;let r;if(typeof s=="string"||typeof s=="object"){const a=Gc(this.props,s,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);a&&(r=a[t])}if(s&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Ee(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new au),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class ty extends O2{constructor(){super(...arguments),this.KeyframeResolver=Tv}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:s}){delete n[t],delete s[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Ee(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function F2(e){return window.getComputedStyle(e)}class I2 extends ty{constructor(){super(...arguments),this.type="html",this.renderInstance=Bm}readValueFromInstance(t,n){if(Fn.has(n)){const s=fu(n);return s&&s.default||0}else{const s=F2(t),r=(Im(n)?s.getPropertyValue(n):s[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Uv(t,n)}build(t,n,s){Yc(t,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,n,s){return eu(t,n,s)}}class b2 extends ty{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=he}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Fn.has(n)){const s=fu(n);return s&&s.default||0}return n=Um.has(n)?n:Hc(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,s){return Km(t,n,s)}build(t,n,s){Xc(t,n,this.isSVGTag,s.transformTemplate)}renderInstance(t,n,s,r){Hm(t,n,s,r)}mount(t){this.isSVGTag=Jc(t.tagName),super.mount(t)}}const $2=(e,t)=>Kc(e)?new b2(t):new I2(t,{allowProjection:e!==j.Fragment}),B2=h1({...dw,...D2,...j2,...R2},$2),Ae=E0(B2);function Xf(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,s=Array(t);n<t;n++)s[n]=e[n];return s}function U2(e){if(Array.isArray(e))return e}function H2(e,t,n){return(t=X2(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function W2(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var s,r,o,a,l=[],c=!0,u=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(c=(s=o.call(n)).done)&&(l.push(s.value),l.length!==t);c=!0);}catch(d){u=!0,r=d}finally{try{if(!c&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw r}}return l}}function K2(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
359
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,s)}return n}function Jf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Zf(Object(n),!0).forEach(function(s){H2(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zf(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function G2(e,t){if(e==null)return{};var n,s,r=q2(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)n=o[s],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function q2(e,t){if(e==null)return{};var n={};for(var s in e)if({}.hasOwnProperty.call(e,s)){if(t.indexOf(s)!==-1)continue;n[s]=e[s]}return n}function Q2(e,t){return U2(e)||W2(e,t)||Z2(e,t)||K2()}function Y2(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function X2(e){var t=Y2(e,"string");return typeof t=="symbol"?t:t+""}function Z2(e,t){if(e){if(typeof e=="string")return Xf(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Xf(e,t):void 0}}function J2(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,s)}return n}function th(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?eh(Object(n),!0).forEach(function(s){J2(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eh(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function eS(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(s){return t.reduceRight(function(r,o){return o(r)},s)}}function Qs(e){return function t(){for(var n=this,s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return r.length>=e.length?e.apply(this,r):function(){for(var a=arguments.length,l=new Array(a),c=0;c<a;c++)l[c]=arguments[c];return t.apply(n,[].concat(r,l))}}}function mo(e){return{}.toString.call(e).includes("Object")}function tS(e){return!Object.keys(e).length}function _r(e){return typeof e=="function"}function nS(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function sS(e,t){return mo(t)||an("changeType"),Object.keys(t).some(function(n){return!nS(e,n)})&&an("changeField"),t}function rS(e){_r(e)||an("selectorType")}function iS(e){_r(e)||mo(e)||an("handlerType"),mo(e)&&Object.values(e).some(function(t){return!_r(t)})&&an("handlersType")}function oS(e){e||an("initialIsRequired"),mo(e)||an("initialType"),tS(e)&&an("initialContent")}function aS(e,t){throw new Error(e[t]||e.default)}var lS={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},an=Qs(aS)(lS),pi={changes:sS,selector:rS,handler:iS,initial:oS};function cS(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};pi.initial(e),pi.handler(t);var n={current:e},s=Qs(fS)(n,t),r=Qs(dS)(n),o=Qs(pi.changes)(e),a=Qs(uS)(n);function l(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(d){return d};return pi.selector(u),u(n.current)}function c(u){eS(s,r,o,a)(u)}return[l,c]}function uS(e,t){return _r(t)?t(e.current):t}function dS(e,t){return e.current=th(th({},e.current),t),t}function fS(e,t,n){return _r(t)?t(e.current):Object.keys(n).forEach(function(s){var r;return(r=t[s])===null||r===void 0?void 0:r.call(t,e.current[s])}),n}var hS={create:cS},pS={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}};function mS(e){return function t(){for(var n=this,s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return r.length>=e.length?e.apply(this,r):function(){for(var a=arguments.length,l=new Array(a),c=0;c<a;c++)l[c]=arguments[c];return t.apply(n,[].concat(r,l))}}}function vS(e){return{}.toString.call(e).includes("Object")}function yS(e){return e||nh("configIsRequired"),vS(e)||nh("configType"),e.urls?(gS(),{paths:{vs:e.urls.monacoBase}}):e}function gS(){console.warn(ny.deprecation)}function xS(e,t){throw new Error(e[t]||e.default)}var ny={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
|
|
360
|
+
You are using deprecated way of configuration.
|
|
361
|
+
|
|
362
|
+
Instead of using
|
|
363
|
+
monaco.config({ urls: { monacoBase: '...' } })
|
|
364
|
+
use
|
|
365
|
+
monaco.config({ paths: { vs: '...' } })
|
|
366
|
+
|
|
367
|
+
For more please check the link https://github.com/suren-atoyan/monaco-loader#config
|
|
368
|
+
`},nh=mS(xS)(ny),jS={config:yS},wS=function(){for(var t=arguments.length,n=new Array(t),s=0;s<t;s++)n[s]=arguments[s];return function(r){return n.reduceRight(function(o,a){return a(o)},r)}};function sy(e,t){return Object.keys(t).forEach(function(n){t[n]instanceof Object&&e[n]&&Object.assign(t[n],sy(e[n],t[n]))}),Jf(Jf({},e),t)}var SS={type:"cancelation",msg:"operation is manually canceled"};function Na(e){var t=!1,n=new Promise(function(s,r){e.then(function(o){return t?r(SS):s(o)}),e.catch(r)});return n.cancel=function(){return t=!0},n}var kS=["monaco"],NS=hS.create({config:pS,isInitialized:!1,resolve:null,reject:null,monaco:null}),ry=Q2(NS,2),Wr=ry[0],Fo=ry[1];function CS(e){var t=jS.config(e),n=t.monaco,s=G2(t,kS);Fo(function(r){return{config:sy(r.config,s),monaco:n}})}function TS(){var e=Wr(function(t){var n=t.monaco,s=t.isInitialized,r=t.resolve;return{monaco:n,isInitialized:s,resolve:r}});if(!e.isInitialized){if(Fo({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),Na(Ca);if(window.monaco&&window.monaco.editor)return iy(window.monaco),e.resolve(window.monaco),Na(Ca);wS(PS,MS)(AS)}return Na(Ca)}function PS(e){return document.body.appendChild(e)}function ES(e){var t=document.createElement("script");return e&&(t.src=e),t}function MS(e){var t=Wr(function(s){var r=s.config,o=s.reject;return{config:r,reject:o}}),n=ES("".concat(t.config.paths.vs,"/loader.js"));return n.onload=function(){return e()},n.onerror=t.reject,n}function AS(){var e=Wr(function(n){var s=n.config,r=n.resolve,o=n.reject;return{config:s,resolve:r,reject:o}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(n){var s=n.m||n;iy(s),e.resolve(s)},function(n){e.reject(n)})}function iy(e){Wr().monaco||Fo({monaco:e})}function DS(){return Wr(function(e){var t=e.monaco;return t})}var Ca=new Promise(function(e,t){return Fo({resolve:e,reject:t})}),oy={config:CS,init:TS,__getMonacoInstance:DS},RS={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},Ta=RS,_S={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},LS=_S;function zS({children:e}){return We.createElement("div",{style:LS.container},e)}var VS=zS,OS=VS;function FS({width:e,height:t,isEditorReady:n,loading:s,_ref:r,className:o,wrapperProps:a}){return We.createElement("section",{style:{...Ta.wrapper,width:e,height:t},...a},!n&&We.createElement(OS,null,s),We.createElement("div",{ref:r,style:{...Ta.fullWidth,...!n&&Ta.hide},className:o}))}var IS=FS,ay=j.memo(IS);function bS(e){j.useEffect(e,[])}var ly=bS;function $S(e,t,n=!0){let s=j.useRef(!0);j.useEffect(s.current||!n?()=>{s.current=!1}:e,t)}var He=$S;function cr(){}function rs(e,t,n,s){return BS(e,s)||US(e,t,n,s)}function BS(e,t){return e.editor.getModel(cy(e,t))}function US(e,t,n,s){return e.editor.createModel(t,n,s?cy(e,s):void 0)}function cy(e,t){return e.Uri.parse(t)}function HS({original:e,modified:t,language:n,originalLanguage:s,modifiedLanguage:r,originalModelPath:o,modifiedModelPath:a,keepCurrentOriginalModel:l=!1,keepCurrentModifiedModel:c=!1,theme:u="light",loading:d="Loading...",options:f={},height:h="100%",width:y="100%",className:x,wrapperProps:S={},beforeMount:C=cr,onMount:m=cr}){let[p,v]=j.useState(!1),[w,g]=j.useState(!0),k=j.useRef(null),N=j.useRef(null),T=j.useRef(null),A=j.useRef(m),P=j.useRef(C),$=j.useRef(!1);ly(()=>{let L=oy.init();return L.then(U=>(N.current=U)&&g(!1)).catch(U=>(U==null?void 0:U.type)!=="cancelation"&&console.error("Monaco initialization: error:",U)),()=>k.current?de():L.cancel()}),He(()=>{if(k.current&&N.current){let L=k.current.getOriginalEditor(),U=rs(N.current,e||"",s||n||"text",o||"");U!==L.getModel()&&L.setModel(U)}},[o],p),He(()=>{if(k.current&&N.current){let L=k.current.getModifiedEditor(),U=rs(N.current,t||"",r||n||"text",a||"");U!==L.getModel()&&L.setModel(U)}},[a],p),He(()=>{let L=k.current.getModifiedEditor();L.getOption(N.current.editor.EditorOption.readOnly)?L.setValue(t||""):t!==L.getValue()&&(L.executeEdits("",[{range:L.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),L.pushUndoStop())},[t],p),He(()=>{var L,U;(U=(L=k.current)==null?void 0:L.getModel())==null||U.original.setValue(e||"")},[e],p),He(()=>{let{original:L,modified:U}=k.current.getModel();N.current.editor.setModelLanguage(L,s||n||"text"),N.current.editor.setModelLanguage(U,r||n||"text")},[n,s,r],p),He(()=>{var L;(L=N.current)==null||L.editor.setTheme(u)},[u],p),He(()=>{var L;(L=k.current)==null||L.updateOptions(f)},[f],p);let b=j.useCallback(()=>{var W;if(!N.current)return;P.current(N.current);let L=rs(N.current,e||"",s||n||"text",o||""),U=rs(N.current,t||"",r||n||"text",a||"");(W=k.current)==null||W.setModel({original:L,modified:U})},[n,t,r,e,s,o,a]),Q=j.useCallback(()=>{var L;!$.current&&T.current&&(k.current=N.current.editor.createDiffEditor(T.current,{automaticLayout:!0,...f}),b(),(L=N.current)==null||L.editor.setTheme(u),v(!0),$.current=!0)},[f,u,b]);j.useEffect(()=>{p&&A.current(k.current,N.current)},[p]),j.useEffect(()=>{!w&&!p&&Q()},[w,p,Q]);function de(){var U,W,M,z;let L=(U=k.current)==null?void 0:U.getModel();l||((W=L==null?void 0:L.original)==null||W.dispose()),c||((M=L==null?void 0:L.modified)==null||M.dispose()),(z=k.current)==null||z.dispose()}return We.createElement(ay,{width:y,height:h,isEditorReady:p,loading:d,_ref:T,className:x,wrapperProps:S})}var WS=HS,KS=j.memo(WS);function GS(e){let t=j.useRef();return j.useEffect(()=>{t.current=e},[e]),t.current}var qS=GS,mi=new Map;function QS({defaultValue:e,defaultLanguage:t,defaultPath:n,value:s,language:r,path:o,theme:a="light",line:l,loading:c="Loading...",options:u={},overrideServices:d={},saveViewState:f=!0,keepCurrentModel:h=!1,width:y="100%",height:x="100%",className:S,wrapperProps:C={},beforeMount:m=cr,onMount:p=cr,onChange:v,onValidate:w=cr}){let[g,k]=j.useState(!1),[N,T]=j.useState(!0),A=j.useRef(null),P=j.useRef(null),$=j.useRef(null),b=j.useRef(p),Q=j.useRef(m),de=j.useRef(),L=j.useRef(s),U=qS(o),W=j.useRef(!1),M=j.useRef(!1);ly(()=>{let R=oy.init();return R.then(F=>(A.current=F)&&T(!1)).catch(F=>(F==null?void 0:F.type)!=="cancelation"&&console.error("Monaco initialization: error:",F)),()=>P.current?O():R.cancel()}),He(()=>{var F,re,_,B;let R=rs(A.current,e||s||"",t||r||"",o||n||"");R!==((F=P.current)==null?void 0:F.getModel())&&(f&&mi.set(U,(re=P.current)==null?void 0:re.saveViewState()),(_=P.current)==null||_.setModel(R),f&&((B=P.current)==null||B.restoreViewState(mi.get(o))))},[o],g),He(()=>{var R;(R=P.current)==null||R.updateOptions(u)},[u],g),He(()=>{!P.current||s===void 0||(P.current.getOption(A.current.editor.EditorOption.readOnly)?P.current.setValue(s):s!==P.current.getValue()&&(M.current=!0,P.current.executeEdits("",[{range:P.current.getModel().getFullModelRange(),text:s,forceMoveMarkers:!0}]),P.current.pushUndoStop(),M.current=!1))},[s],g),He(()=>{var F,re;let R=(F=P.current)==null?void 0:F.getModel();R&&r&&((re=A.current)==null||re.editor.setModelLanguage(R,r))},[r],g),He(()=>{var R;l!==void 0&&((R=P.current)==null||R.revealLine(l))},[l],g),He(()=>{var R;(R=A.current)==null||R.editor.setTheme(a)},[a],g);let z=j.useCallback(()=>{var R;if(!(!$.current||!A.current)&&!W.current){Q.current(A.current);let F=o||n,re=rs(A.current,s||e||"",t||r||"",F||"");P.current=(R=A.current)==null?void 0:R.editor.create($.current,{model:re,automaticLayout:!0,...u},d),f&&P.current.restoreViewState(mi.get(F)),A.current.editor.setTheme(a),l!==void 0&&P.current.revealLine(l),k(!0),W.current=!0}},[e,t,n,s,r,o,u,d,f,a,l]);j.useEffect(()=>{g&&b.current(P.current,A.current)},[g]),j.useEffect(()=>{!N&&!g&&z()},[N,g,z]),L.current=s,j.useEffect(()=>{var R,F;g&&v&&((R=de.current)==null||R.dispose(),de.current=(F=P.current)==null?void 0:F.onDidChangeModelContent(re=>{M.current||v(P.current.getValue(),re)}))},[g,v]),j.useEffect(()=>{if(g){let R=A.current.editor.onDidChangeMarkers(F=>{var _;let re=(_=P.current.getModel())==null?void 0:_.uri;if(re&&F.find(B=>B.path===re.path)){let B=A.current.editor.getModelMarkers({resource:re});w==null||w(B)}});return()=>{R==null||R.dispose()}}return()=>{}},[g,w]);function O(){var R,F;(R=de.current)==null||R.dispose(),h?f&&mi.set(o,P.current.saveViewState()):(F=P.current.getModel())==null||F.dispose(),P.current.dispose()}return We.createElement(ay,{width:y,height:x,isEditorReady:g,loading:c,_ref:$,className:S,wrapperProps:C})}var YS=QS,XS=j.memo(YS);const ZS=e=>{var s;const t=(s=e.split(".").pop())==null?void 0:s.toLowerCase();return{ts:"typescript",tsx:"typescript",js:"javascript",jsx:"javascript",py:"python",rb:"ruby",rs:"rust",go:"go",json:"json",yaml:"yaml",yml:"yaml",md:"markdown",css:"css",scss:"scss",html:"html",xml:"xml",sql:"sql",sh:"shell",bash:"shell",zsh:"shell"}[t||""]||"plaintext"},JS=new Set(["txt","log","env"]);function ek(e){var n;const t=((n=e.split(".").pop())==null?void 0:n.toLowerCase())||"";return JS.has(t)}const tk=({filename:e,originalCode:t,modifiedCode:n,onClose:s,theme:r="dark",violations:o=[]})=>{const a=t!==n,l=ZS(e),c=r==="dark"?"vs-dark":"light",u=ek(e)&&!a,d=f=>{if(!o.length||!f)return;const h=window.monaco;if(!h)return;const y=o.filter(x=>x.line).map(x=>({range:new h.Range(x.line,1,x.endLine||x.line,1),options:{isWholeLine:!0,className:"violation-line-highlight",glyphMarginClassName:"violation-glyph",glyphMarginHoverMessage:{value:`**[${x.id}] ${x.title}**
|
|
369
|
+
|
|
370
|
+
${x.details}`},overviewRuler:{color:"#f87171",position:h.editor.OverviewRulerLane.Full}}}));f.deltaDecorations([],y)};return i.jsx("div",{className:"diff-viewer-overlay",children:i.jsxs("div",{className:"diff-viewer-window",children:[i.jsxs("div",{className:"diff-viewer-header",children:[i.jsxs("div",{className:"title",children:[i.jsx(St,{size:18}),i.jsx("span",{children:e}),a&&i.jsx("span",{className:"diff-badge",children:"Modified"}),o.length>0&&i.jsxs("span",{className:"diff-badge",style:{background:"rgba(248, 113, 113, 0.12)",color:"#f87171",borderColor:"rgba(248, 113, 113, 0.3)"},children:[o.length," violation",o.length!==1?"s":""]})]}),i.jsx("button",{onClick:s,className:"close-btn",children:i.jsx(Vc,{size:20})})]}),u?i.jsx("pre",{className:"markdown-viewer",children:n}):i.jsx("div",{className:"diff-editor-container",children:a?i.jsx(KS,{height:"100%",language:l,original:t,modified:n,theme:c,options:{renderSideBySide:!0,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,fontSize:13}}):i.jsx(XS,{height:"100%",language:l,value:n,theme:c,onMount:d,options:{readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,fontSize:13,lineNumbers:"on",glyphMargin:o.length>0}})})]})})},nk=(e,t)=>{const n=[];e.forEach(r=>{const o=r.split("/");let a=n,l="";o.forEach((c,u)=>{l=l?`${l}/${c}`:c;const d=u<o.length-1;let f=a.find(h=>h.name===c);f||(f={name:c,path:l,isDirectory:d,children:[],isViolated:t.some(h=>h===l||h.startsWith(`${l}/`))},a.push(f)),a=f.children})});const s=r=>{r.sort((o,a)=>o.isDirectory&&!a.isDirectory?-1:!o.isDirectory&&a.isDirectory?1:o.name.localeCompare(a.name)),r.forEach(o=>s(o.children))};return s(n),n},uy=({node:e,level:t,onSelect:n,activeFile:s})=>{const[r,o]=j.useState(t===0),a=s===e.path,l=c=>{c.stopPropagation(),e.isDirectory?o(!r):n(e.path)};return i.jsxs("div",{className:"tree-node-container",children:[i.jsxs("div",{className:`tree-item ${a?"active":""} ${e.isViolated?"violated":""}`,style:{paddingLeft:`${t*12+8}px`},onClick:l,children:[e.isDirectory?i.jsxs(i.Fragment,{children:[r?i.jsx(js,{size:14,className:"chevron"}):i.jsx(un,{size:14,className:"chevron"}),r?i.jsx(r0,{size:14,className:"folder-icon"}):i.jsx(br,{size:14,className:"folder-icon"})]}):i.jsx(St,{size:14,className:"file-icon"}),i.jsx("span",{className:"node-name",title:e.path,children:e.name}),e.isViolated&&i.jsx(Pr,{size:12,className:"violation-icon"})]}),e.isDirectory&&r&&i.jsx("div",{className:"tree-children",children:e.children.map(c=>i.jsx(uy,{node:c,level:t+1,onSelect:n,activeFile:s},c.path))})]})},sh=({files:e,onSelect:t,activeFile:n,violatedFiles:s=[]})=>{const r=j.useMemo(()=>nk(e,s),[e,s]);return i.jsxs("div",{className:"file-tree",children:[i.jsxs("div",{className:"tree-header",children:[i.jsx(br,{size:14}),i.jsx("span",{children:"Project Explorer"})]}),i.jsx("div",{className:"tree-list",children:r.length===0?i.jsx("div",{className:"empty-tree-state",children:"No files found"}):r.map(o=>i.jsx(uy,{node:o,level:0,onSelect:t,activeFile:n},o.path))})]})},Pa=e=>typeof e=="string"?e:JSON.stringify(e,null,2),sk=()=>{const[e,t]=j.useState({memories:{}}),[n,s]=j.useState(null),[r,o]=j.useState(""),[a,l]=j.useState(!0),[c,u]=j.useState(!1),d=async()=>{l(!0);try{const v=await(await fetch("/api/memory")).json();v.memories?t(v):t({memories:v})}catch(p){console.error("Failed to fetch memory:",p)}finally{l(!1)}};j.useEffect(()=>{d()},[]);const f=Object.entries(e.memories||{}),h=f.filter(([p])=>p.toLowerCase().includes(r.toLowerCase())),y=n?e.memories[n]:null,x=p=>{try{return new Date(p).toLocaleString()}catch{return p}},S=()=>{y&&(navigator.clipboard.writeText(Pa(y.value)),u(!0),setTimeout(()=>u(!1),2e3))},C=p=>{const v=Pa(p);if(v.includes("1)")&&v.includes("2)")){const w=v.split(/(\d+\))/);return i.jsx("div",{className:"formatted-content",children:w.map((g,k)=>{if(/^\d+\)$/.test(g))return i.jsx("div",{className:"section-marker",children:g},k);if(g.trim().startsWith("Priority:")){const[N,T]=g.split("Priority:");return i.jsxs(We.Fragment,{children:[N.trim()&&i.jsx("div",{className:"section-body",children:N.trim()}),i.jsx("div",{className:"priority-box",children:T.trim()})]},k)}return g.trim()?i.jsx("div",{className:"section-body",children:g.trim()},k):null})})}return i.jsx("pre",{children:v})},m=p=>{const v=p.toLowerCase();return v.includes("own")||v.includes("boundary")?"ownership":v.includes("except")||v.includes("allow")?"exception":v.includes("arch")||v.includes("decision")||v.includes("migrat")?"architecture":"stable"};return i.jsxs("div",{className:"memory-bank",children:[i.jsxs("div",{className:"memory-header",children:[i.jsxs("div",{className:"memory-title",children:[i.jsx(lt,{size:24}),i.jsx("h2",{children:"Memory Bank"}),i.jsxs("span",{className:"memory-count",children:[f.length," entries"]})]}),i.jsxs("div",{className:"memory-actions",children:[i.jsxs("div",{className:"search-box",children:[i.jsx(Lc,{size:16}),i.jsx("input",{type:"text",placeholder:"Search memories...",value:r,onChange:p=>o(p.target.value)})]}),i.jsx("button",{className:"refresh-btn",onClick:d,disabled:a,children:i.jsx(Le,{size:16,className:a?"spinning":""})})]})]}),i.jsxs("div",{className:"memory-content",children:[i.jsx("div",{className:"memory-list",children:a?i.jsx("div",{className:"memory-loading",children:"Loading memories..."}):h.length===0?i.jsxs("div",{className:"memory-empty glass-card",children:[i.jsx(Ir,{size:48}),i.jsx("h3",{children:"No Memories Stored"}),i.jsxs("p",{children:["Persist stable, non-derivable facts with ",i.jsx("code",{children:"rigour_remember"})," — architecture decisions, ownership boundaries, approved exceptions. Studio merges project"," ",i.jsx("code",{children:".rigour/memory.json"})," and global ",i.jsx("code",{children:"~/.rigour/memory.json"}),"."]})]}):h.map(([p,v])=>i.jsxs("div",{className:`memory-item glass-card ${n===p?"active":""}`,onClick:()=>s(p),children:[i.jsxs("div",{className:"memory-item-header",children:[i.jsx(Ld,{size:14}),i.jsx("span",{className:"memory-key",children:p}),i.jsx("span",{className:`memory-cat cat-${m(p)}`,children:m(p)}),i.jsx(un,{size:14,className:"chevron"})]}),i.jsxs("div",{className:"memory-item-meta",children:[i.jsx(zn,{size:12}),i.jsx("span",{children:x(v.timestamp)}),v.source&&i.jsx("span",{className:"meta-chip",children:v.source})]}),i.jsx("div",{className:"memory-item-preview",children:(()=>{const w=Pa(v.value);return w.slice(0,100)+(w.length>100?"...":"")})()})]},p))}),i.jsx("div",{className:"memory-detail",children:y?i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"detail-header",children:[i.jsx(Ld,{size:18}),i.jsx("h3",{children:n})]}),i.jsxs("div",{className:"detail-meta",children:[i.jsxs("div",{className:"meta-left",children:[i.jsx(zn,{size:14}),i.jsxs("span",{children:["Stored: ",x(y.timestamp)]})]}),i.jsxs("button",{className:`copy-btn ${c?"copied":""}`,onClick:S,children:[c?i.jsx(Yx,{size:14}):i.jsx(Zx,{size:14}),i.jsx("span",{children:c?"Copied":"Copy"})]})]}),i.jsx("div",{className:"detail-content",children:C(y.value)})]}):i.jsxs("div",{className:"detail-placeholder",children:[i.jsx(lt,{size:48}),i.jsx("p",{children:"Select a memory to view its contents"})]})})]})]})},rk=()=>{var g;const[e,t]=j.useState({patterns:[],stats:{totalPatterns:0,totalFiles:0,byType:{}}}),[n,s]=j.useState(null),[r,o]=j.useState(""),[a,l]=j.useState("all"),[c,u]=j.useState(!0),[d,f]=j.useState(!1),[h,y]=j.useState([]),[x,S]=j.useState(!1),C=async()=>{u(!0);try{const N=await(await fetch("/api/index-stats")).json();t(N)}catch(k){console.error("Failed to fetch pattern index:",k)}finally{u(!1)}};j.useEffect(()=>{C()},[]),j.useEffect(()=>{if(!d||r.length<3){y([]);return}const k=setTimeout(async()=>{S(!0);try{const T=await(await fetch(`/api/index-search?q=${encodeURIComponent(r)}`)).json();y(T)}catch(N){console.error("Semantic search failed:",N)}finally{S(!1)}},500);return()=>clearTimeout(k)},[r,d]);const m=d&&r.length>=3?h:e.patterns||[],p=e.stats||{totalPatterns:0,totalFiles:0,byType:{}},v=d&&r.length>=3?m:m.filter(k=>{const N=k.name.toLowerCase().includes(r.toLowerCase())||k.file.toLowerCase().includes(r.toLowerCase()),T=a==="all"||k.type===a;return N&&T}),w=Object.keys(p.byType||{});return i.jsxs("div",{className:"pattern-index",children:[i.jsxs("div",{className:"pattern-header",children:[i.jsxs("div",{className:"pattern-title",children:[i.jsx(on,{size:24}),i.jsx("h2",{children:"Pattern Index"}),i.jsxs("span",{className:"pattern-count",children:[p.totalPatterns," patterns"]})]}),i.jsxs("div",{className:"pattern-actions",children:[i.jsxs("div",{className:"search-box",children:[i.jsx(Lc,{size:16}),i.jsx("input",{type:"text",placeholder:"Search patterns...",value:r,onChange:k=>o(k.target.value)})]}),i.jsxs("div",{className:"filter-box",children:[i.jsx(io,{size:16}),i.jsxs("select",{value:a,onChange:k=>l(k.target.value),children:[i.jsx("option",{value:"all",children:"All Types"}),w.map(k=>i.jsxs("option",{value:k,children:[k," (",p.byType[k],")"]},k))]})]}),i.jsxs("button",{className:`semantic-toggle ${d?"active":""}`,onClick:()=>f(!d),title:"Semantic Search (v2)",children:[i.jsx(_d,{size:16}),i.jsx("span",{children:"AI Search"})]}),i.jsx("button",{className:"refresh-btn",onClick:C,disabled:c,children:i.jsx(Le,{size:16,className:c?"spinning":""})})]})]}),i.jsxs("div",{className:"pattern-stats",children:[i.jsxs("div",{className:"stat-card",children:[i.jsx(wm,{size:20}),i.jsxs("div",{className:"stat-info",children:[i.jsx("span",{className:"stat-value",children:p.totalPatterns}),i.jsx("span",{className:"stat-label",children:"Total Patterns"})]})]}),i.jsxs("div",{className:"stat-card",children:[i.jsx(St,{size:20}),i.jsxs("div",{className:"stat-info",children:[i.jsx("span",{className:"stat-value",children:p.totalFiles}),i.jsx("span",{className:"stat-label",children:"Files Indexed"})]})]}),i.jsxs("div",{className:"stat-card",children:[i.jsx(_d,{size:20}),i.jsxs("div",{className:"stat-info",children:[i.jsx("span",{className:"stat-value",children:w.length}),i.jsx("span",{className:"stat-label",children:"Pattern Types"})]})]}),p.indexDurationMs&&i.jsxs("div",{className:"stat-card",children:[i.jsx(zn,{size:20}),i.jsxs("div",{className:"stat-info",children:[i.jsxs("span",{className:"stat-value",children:[p.indexDurationMs,"ms"]}),i.jsx("span",{className:"stat-label",children:"Index Time"})]})]})]}),i.jsxs("div",{className:"pattern-content",children:[i.jsxs("div",{className:"pattern-list",children:[x&&i.jsxs("div",{className:"searching-indicator",children:[i.jsx(Le,{size:14,className:"spinning"}),i.jsx("span",{children:"AI is analyzing your query..."})]}),c?i.jsx("div",{className:"pattern-loading",children:"Loading patterns..."}):v.length===0?i.jsxs("div",{className:"pattern-empty",children:[i.jsx(on,{size:48}),i.jsx("h3",{children:"No Patterns Indexed"}),i.jsxs("p",{children:["Run ",i.jsx("code",{children:"rigour index"})," to scan your codebase."]})]}):v.map(k=>i.jsxs("div",{className:`pattern-item ${(n==null?void 0:n.id)===k.id?"active":""}`,onClick:()=>s(k),children:[k.similarity&&i.jsxs("div",{className:"similarity-badge",children:[(k.similarity*100).toFixed(0),"% Match"]}),i.jsxs("div",{className:"pattern-item-header",children:[i.jsx("span",{className:"pattern-type-badge",children:k.type}),i.jsx("span",{className:"pattern-name",children:k.name}),i.jsx(un,{size:14,className:"chevron"})]}),i.jsxs("div",{className:"pattern-item-file",children:[i.jsx(St,{size:12}),i.jsxs("span",{children:[k.file,":",k.line]})]}),k.exported&&i.jsx("span",{className:"exported-badge",children:"exported"})]},k.id))]}),i.jsx("div",{className:"pattern-detail",children:n?i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"detail-header",children:[i.jsx("span",{className:"pattern-type-badge large",children:n.type}),i.jsx("h3",{children:n.name})]}),i.jsxs("div",{className:"detail-section",children:[i.jsx("h4",{children:"Location"}),i.jsxs("code",{children:[n.file,":",n.line,"-",n.endLine]})]}),n.signature&&i.jsxs("div",{className:"detail-section",children:[i.jsx("h4",{children:"Signature"}),i.jsx("pre",{children:n.signature})]}),n.description&&i.jsxs("div",{className:"detail-section",children:[i.jsx("h4",{children:"Description"}),i.jsx("p",{children:n.description})]}),((g=n.keywords)==null?void 0:g.length)>0&&i.jsxs("div",{className:"detail-section",children:[i.jsx("h4",{children:"Keywords"}),i.jsx("div",{className:"keywords-list",children:n.keywords.map((k,N)=>i.jsx("span",{className:"keyword-tag",children:k},N))})]}),i.jsxs("div",{className:"detail-section",children:[i.jsx("h4",{children:"Usage"}),i.jsxs("p",{children:["Imported in ",i.jsx("strong",{children:n.usageCount})," files"]})]})]}):i.jsxs("div",{className:"detail-placeholder",children:[i.jsx(on,{size:48}),i.jsx("p",{children:"Select a pattern to view details"})]})})]})]})},ik=()=>{var y,x,S,C,m;const[e,t]=j.useState(null),[n,s]=j.useState(""),[r,o]=j.useState(null),[a,l]=j.useState(!0),[c,u]=j.useState("visual"),d=async()=>{l(!0);try{const v=await(await fetch("/api/config")).text();s(v);const w=f(v);t(w)}catch(p){console.error("Failed to fetch config:",p)}try{const p=await fetch("/api/report-stats");if(p.ok){const v=await p.json();o(v)}}catch{}l(!1)},f=p=>{var v;try{const w=p.split(`
|
|
371
|
+
`),g={};let k=null,N=null;for(const T of w){if(T.startsWith("#")||!T.trim())continue;const A=T.search(/\S/),P=T.trim();if(A===0&&P.includes(":")){const[$]=P.split(":");k=$.trim(),N=null;const b=(v=P.split(":")[1])==null?void 0:v.trim();b&&b!=="{}"&&b!=="[]"?g[k]=isNaN(Number(b))?b:Number(b):g[k]={}}else if(A===2&&k&&P.includes(":")){const[$]=P.split(":");N=$.trim();const b=P.split(":").slice(1).join(":").trim();if(b&&b!=="{}"&&b!=="[]"){typeof g[k]!="object"&&(g[k]={});const Q=b==="true"?!0:b==="false"?!1:isNaN(Number(b))?b:Number(b);g[k][N]=Q}else typeof g[k]!="object"&&(g[k]={}),g[k][N]={}}else if(A===4&&k&&N&&P.includes(":")){const[$]=P.split(":"),b=P.split(":").slice(1).join(":").trim();typeof g[k][N]!="object"&&(g[k][N]={});const Q=b==="true"?!0:b==="false"?!1:isNaN(Number(b))?b:Number(b);g[k][N][$.trim()]=Q}}return g}catch{return{}}};j.useEffect(()=>{d()},[]);const h=(e==null?void 0:e.gates)||{};return i.jsxs("div",{className:"quality-gates",children:[i.jsxs("div",{className:"gates-header",children:[i.jsxs("div",{className:"gates-title",children:[i.jsx(fs,{size:24}),i.jsx("h2",{children:"Quality Gates"}),(e==null?void 0:e.preset)&&i.jsx("span",{className:"preset-badge",children:e.preset})]}),i.jsxs("div",{className:"gates-actions",children:[i.jsxs("div",{className:"view-toggle",children:[i.jsxs("button",{className:c==="visual"?"active":"",onClick:()=>u("visual"),children:[i.jsx(on,{size:16})," Visual"]}),i.jsxs("button",{className:c==="raw"?"active":"",onClick:()=>u("raw"),children:[i.jsx(St,{size:16})," YAML"]})]}),i.jsx("button",{className:"refresh-btn",onClick:d,disabled:a,children:i.jsx(Le,{size:16,className:a?"spinning":""})})]})]}),a?i.jsx("div",{className:"gates-loading",children:"Loading configuration..."}):c==="raw"?i.jsx("div",{className:"gates-raw",children:i.jsx("pre",{children:n})}):i.jsxs("div",{className:"gates-content",children:[i.jsxs("div",{className:"gate-section",children:[i.jsxs("div",{className:"section-header",children:[i.jsx(St,{size:18}),i.jsx("h3",{children:"Code Quality"})]}),i.jsxs("div",{className:"gate-grid",children:[i.jsx(J,{label:"Max File Lines",value:h.max_file_lines,icon:i.jsx(St,{size:16})}),i.jsx(J,{label:"Forbid TODOs",value:h.forbid_todos,icon:h.forbid_todos?i.jsx(ws,{size:16}):i.jsx(yt,{size:16})}),i.jsx(J,{label:"Forbid FIXMEs",value:h.forbid_fixme,icon:h.forbid_fixme?i.jsx(ws,{size:16}):i.jsx(yt,{size:16})})]})]}),h.ast&&i.jsxs("div",{className:"gate-section",children:[i.jsxs("div",{className:"section-header",children:[i.jsx(i0,{size:18}),i.jsx("h3",{children:"AST Limits"})]}),i.jsxs("div",{className:"gate-grid",children:[i.jsx(J,{label:"Complexity",value:h.ast.complexity}),i.jsx(J,{label:"Max Methods",value:h.ast.max_methods}),i.jsx(J,{label:"Max Params",value:h.ast.max_params}),i.jsx(J,{label:"Max Nesting",value:h.ast.max_nesting}),i.jsx(J,{label:"Max Function Lines",value:h.ast.max_function_lines}),i.jsx(J,{label:"Max Inheritance",value:h.ast.max_inheritance_depth})]})]}),h.safety&&i.jsxs("div",{className:"gate-section",children:[i.jsxs("div",{className:"section-header",children:[i.jsx(Sl,{size:18}),i.jsx("h3",{children:"File Guard"})]}),i.jsx("div",{className:"gate-grid",children:i.jsx(J,{label:"Max Files/Cycle",value:h.safety.max_files_changed_per_cycle})}),h.safety.protected_paths&&h.safety.protected_paths.length>0&&i.jsxs("div",{className:"protected-paths",children:[i.jsx("h4",{children:"Protected Paths"}),i.jsx("div",{className:"path-list",children:h.safety.protected_paths.map((p,v)=>i.jsx("span",{className:"path-tag",children:p},v))})]})]}),h.required_files&&h.required_files.length>0&&i.jsxs("div",{className:"gate-section",children:[i.jsxs("div",{className:"section-header",children:[i.jsx(_e,{size:18}),i.jsx("h3",{children:"Required Files"})]}),i.jsx("div",{className:"file-list",children:h.required_files.map((p,v)=>i.jsxs("div",{className:"file-item",children:[i.jsx(St,{size:14}),i.jsx("span",{children:p})]},v))})]}),h.context&&i.jsxs("div",{className:"gate-section",children:[i.jsxs("div",{className:"section-header",children:[i.jsx(Yt,{size:18}),i.jsx("h3",{children:"Context Mining"})]}),i.jsxs("div",{className:"gate-grid",children:[i.jsx(J,{label:"Enabled",value:h.context.enabled}),i.jsx(J,{label:"Sensitivity",value:h.context.sensitivity}),i.jsx(J,{label:"Mining Depth",value:h.context.mining_depth})]})]}),h.retry_loop_breaker&&i.jsxs("div",{className:"gate-section",children:[i.jsxs("div",{className:"section-header",children:[i.jsx(Nm,{size:18}),i.jsx("h3",{children:"Retry Loop Breaker"})]}),i.jsxs("div",{className:"gate-grid",children:[i.jsx(J,{label:"Enabled",value:h.retry_loop_breaker.enabled}),i.jsx(J,{label:"Max Retries",value:h.retry_loop_breaker.max_retries})]})]}),i.jsxs("div",{className:"gate-section",children:[i.jsxs("div",{className:"section-header",children:[i.jsx(Yt,{size:18}),i.jsx("h3",{children:"AI-Native Gates"})]}),i.jsxs("div",{className:"gate-grid",children:[i.jsx(J,{label:"Duplication Drift",value:((y=h.duplication_drift)==null?void 0:y.enabled)??!0,icon:i.jsx(yt,{size:16})}),i.jsx(J,{label:"Hallucinated Imports",value:((x=h.hallucinated_imports)==null?void 0:x.enabled)??!0,icon:i.jsx(_e,{size:16})}),i.jsx(J,{label:"Error Handling",value:((S=h.inconsistent_error_handling)==null?void 0:S.enabled)??!0,icon:i.jsx(fs,{size:16})}),i.jsx(J,{label:"Context Artifacts",value:((C=h.context_window_artifacts)==null?void 0:C.enabled)??!0,icon:i.jsx(on,{size:16})}),i.jsx(J,{label:"Async Safety",value:((m=h.promise_safety)==null?void 0:m.enabled)??!0,icon:i.jsx(Yt,{size:16})})]})]}),r&&i.jsxs("div",{className:"gate-section",children:[i.jsxs("div",{className:"section-header",children:[i.jsx(fs,{size:18}),i.jsx("h3",{children:"Latest Scores"})]}),i.jsxs("div",{className:"gate-grid",children:[r.score!==void 0&&i.jsx(J,{label:"Overall Score",value:`${r.score}/100`}),r.ai_health_score!==void 0&&i.jsx(J,{label:"AI Health",value:`${r.ai_health_score}/100`,icon:i.jsx(Yt,{size:16})}),r.structural_score!==void 0&&i.jsx(J,{label:"Structural",value:`${r.structural_score}/100`,icon:i.jsx(on,{size:16})})]}),r.severity_breakdown&&i.jsxs("div",{className:"severity-breakdown",children:[i.jsx("h4",{children:"Severity Breakdown"}),i.jsx("div",{className:"gate-grid",children:Object.entries(r.severity_breakdown).filter(([,p])=>p>0).map(([p,v])=>i.jsx(J,{label:p.charAt(0).toUpperCase()+p.slice(1),value:v},p))})]}),r.provenance_breakdown&&i.jsxs("div",{className:"provenance-breakdown",children:[i.jsx("h4",{children:"Provenance Breakdown"}),i.jsx("div",{className:"gate-grid",children:Object.entries(r.provenance_breakdown).filter(([,p])=>p>0).map(([p,v])=>i.jsx(J,{label:p,value:v},p))})]})]})]})]})},J=({label:e,value:t,icon:n})=>{const s=typeof t=="boolean"?t?"Yes":"No":t??"N/A";return i.jsxs("div",{className:"gate-card",children:[n&&i.jsx("div",{className:"gate-icon",children:n}),i.jsxs("div",{className:"gate-info",children:[i.jsx("span",{className:"gate-value",children:s}),i.jsx("span",{className:"gate-label",children:e})]})]})},ok=({logs:e,onClearLogs:t,onSelectLog:n,selectedLog:s})=>{const[r,o]=j.useState(""),[a,l]=j.useState("all"),[c,u]=j.useState("all"),[d,f]=j.useState("all"),h=We.useMemo(()=>{const m={};return e.forEach(p=>{const v=p.requestId||p.id;m[v]?m[v]={...m[v],...p}:m[v]={...p}}),Object.values(m).sort((p,v)=>new Date(v.timestamp).getTime()-new Date(p.timestamp).getTime())},[e]),y=We.useMemo(()=>{const m=new Set;return h.forEach(p=>p.tool&&m.add(p.tool)),Array.from(m)},[h]),x=We.useMemo(()=>h.filter(m=>{var N;const p=!r||((N=m.tool)==null?void 0:N.toLowerCase().includes(r.toLowerCase()))||JSON.stringify(m.arguments||{}).toLowerCase().includes(r.toLowerCase()),v=a==="all"||m.status===a,w=c==="all"||m.tool===c,g=m.decision||m.firewallDecision||(m.type==="firewall_deny"?"deny":void 0);return p&&v&&w&&(d==="all"||g===d)}),[h,r,a,c,d]),S=We.useMemo(()=>({total:h.length,success:h.filter(m=>m.status==="success").length,error:h.filter(m=>m.status==="error").length,pending:h.filter(m=>!m.status||m.status==="pending").length}),[h]),C=()=>{const m=JSON.stringify(x,null,2),p=new Blob([m],{type:"application/json"}),v=URL.createObjectURL(p),w=document.createElement("a");w.href=v,w.download=`rigour-audit-${new Date().toISOString().split("T")[0]}.json`,w.click()};return i.jsxs("div",{className:"audit-log",children:[i.jsxs("div",{className:"audit-header",children:[i.jsxs("div",{className:"audit-title",children:[i.jsx(_t,{size:24}),i.jsx("h2",{children:"Audit Trail"}),i.jsxs("span",{className:"log-count",children:[x.length," events"]})]}),i.jsxs("div",{className:"audit-actions",children:[i.jsxs("button",{className:"btn-secondary",onClick:t,children:[i.jsx(Cm,{size:16})," Clear"]}),i.jsxs("button",{className:"btn-primary",onClick:C,children:[i.jsx(t0,{size:16})," Export"]})]})]}),i.jsxs("div",{className:"audit-stats",children:[i.jsxs("div",{className:"stat-pill",children:[i.jsx(_t,{size:14}),i.jsxs("span",{children:[S.total," Total"]})]}),i.jsxs("div",{className:"stat-pill success",children:[i.jsx(yt,{size:14}),i.jsxs("span",{children:[S.success," Success"]})]}),i.jsxs("div",{className:"stat-pill error",children:[i.jsx(ws,{size:14}),i.jsxs("span",{children:[S.error," Failed"]})]}),i.jsxs("div",{className:"stat-pill pending",children:[i.jsx(_e,{size:14}),i.jsxs("span",{children:[S.pending," Pending"]})]})]}),i.jsxs("div",{className:"audit-filters",children:[i.jsxs("div",{className:"search-box",children:[i.jsx(Lc,{size:16}),i.jsx("input",{type:"text",placeholder:"Search logs...",value:r,onChange:m=>o(m.target.value)})]}),i.jsxs("div",{className:"filter-box",children:[i.jsx(io,{size:16}),i.jsxs("select",{value:a,onChange:m=>l(m.target.value),children:[i.jsx("option",{value:"all",children:"All Status"}),i.jsx("option",{value:"success",children:"Success"}),i.jsx("option",{value:"error",children:"Error"}),i.jsx("option",{value:"pending",children:"Pending"})]})]}),i.jsxs("div",{className:"filter-box",children:[i.jsx(oo,{size:16}),i.jsxs("select",{value:c,onChange:m=>u(m.target.value),children:[i.jsx("option",{value:"all",children:"All Tools"}),y.map(m=>i.jsx("option",{value:m,children:m},m))]})]}),i.jsxs("div",{className:"filter-box",children:[i.jsx(io,{size:16}),i.jsxs("select",{value:d,onChange:m=>f(m.target.value),children:[i.jsx("option",{value:"all",children:"All Decisions"}),i.jsx("option",{value:"allow",children:"allow"}),i.jsx("option",{value:"deny",children:"deny"}),i.jsx("option",{value:"timeout-deny",children:"timeout-deny"}),i.jsx("option",{value:"scope-violation",children:"scope-violation"}),i.jsx("option",{value:"approve",children:"approve"}),i.jsx("option",{value:"reject",children:"reject"})]})]})]}),i.jsxs("div",{className:"audit-content",children:[i.jsx("div",{className:"log-list",children:x.length===0?i.jsxs("div",{className:"empty-state",children:[i.jsx(oo,{size:48}),i.jsx("h3",{children:"No Interactions Detected"}),i.jsx("p",{children:"Rigour tool calls will appear here in real-time."})]}):x.map(m=>i.jsxs("div",{className:`log-entry ${(s==null?void 0:s.id)===m.id?"active":""} ${m._rigour_report?"has-report":""}`,onClick:()=>n((s==null?void 0:s.id)===m.id?null:m),children:[i.jsxs("div",{className:"log-header",children:[i.jsx("span",{className:`status-dot ${m.status||"pending"}`}),i.jsx("span",{className:"log-tool",children:m.tool}),i.jsxs("span",{className:"log-time",children:[i.jsx(zn,{size:12}),new Date(m.timestamp).toLocaleTimeString()]}),m._rigour_report&&i.jsxs("span",{className:"report-badge",children:[i.jsx(n0,{size:12})," Report"]}),m.arbitrated&&i.jsx("span",{className:`arbitrated-badge ${m.decision}`,children:m.decision==="approve"?"Approved":"Rejected"}),i.jsx(un,{size:14,className:"chevron"})]}),m.requestId&&i.jsxs("div",{className:"log-request-id",children:["ID: ",m.requestId.slice(0,12),"..."]})]},m.id))}),i.jsx("div",{className:"log-detail",children:s?i.jsx(ak,{log:s,onClose:()=>n(null)}):i.jsxs("div",{className:"detail-placeholder",children:[i.jsx(St,{size:48}),i.jsx("p",{children:"Select a log entry to view details"})]})})]})]})},ak=({log:e,onClose:t})=>{var o,a,l,c,u,d,f;const n=!!e._rigour_report||["rigour_checkpoint","rigour_agent_register","rigour_handoff"].includes(e.tool),[s,r]=j.useState(n?"report":"args");return i.jsxs("div",{className:"log-detail-view",children:[i.jsxs("div",{className:"detail-header",children:[i.jsxs("div",{className:"detail-info",children:[i.jsxs("span",{className:`status-badge ${e.status||"pending"}`,children:[e.status==="success"?i.jsx(yt,{size:14}):e.status==="error"?i.jsx(ws,{size:14}):i.jsx(_e,{size:14}),e.status||"pending"]}),i.jsx("h3",{children:e.tool})]}),i.jsx("button",{className:"close-btn",onClick:t,children:i.jsx(Vc,{size:18})})]}),i.jsxs("div",{className:"detail-meta",children:[i.jsxs("div",{className:"meta-item",children:[i.jsx("span",{className:"meta-label",children:"Timestamp"}),i.jsx("span",{className:"meta-value",children:new Date(e.timestamp).toLocaleString()})]}),e.requestId&&i.jsxs("div",{className:"meta-item",children:[i.jsx("span",{className:"meta-label",children:"Request ID"}),i.jsx("span",{className:"meta-value mono",children:e.requestId})]})]}),n&&i.jsxs("div",{className:"detail-tabs",children:[i.jsx("button",{className:s==="report"?"active":"",onClick:()=>r("report"),children:e._rigour_report?"Verification Report":"Visualized Content"}),i.jsx("button",{className:s==="args"?"active":"",onClick:()=>r("args"),children:"Technical Arguments"})]}),i.jsx("div",{className:"detail-body",children:s==="args"?i.jsxs(i.Fragment,{children:[e.arguments&&i.jsxs("div",{className:"code-section",children:[i.jsx("h4",{children:"Arguments"}),i.jsx("pre",{children:JSON.stringify(e.arguments,null,2)})]}),e.error&&i.jsxs("div",{className:"error-section",children:[i.jsx("h4",{children:"Error"}),i.jsx("div",{className:"error-message",children:e.error})]})]}):i.jsx("div",{className:"verification-view",children:e.tool==="rigour_checkpoint"?i.jsxs("div",{className:"checkpoint-viz",children:[i.jsxs("div",{className:"viz-stats",children:[i.jsxs("div",{className:"viz-stat",children:[i.jsx("span",{className:"label",children:"Progress"}),i.jsxs("span",{className:"value",children:[((o=e.arguments)==null?void 0:o.progressPct)??0,"%"]})]}),i.jsxs("div",{className:"viz-stat",children:[i.jsx("span",{className:"label",children:"Quality"}),i.jsxs("span",{className:"value",style:{color:(((a=e.arguments)==null?void 0:a.qualityScore)??0)>=80?"#34d399":"#f87171"},children:[((l=e.arguments)==null?void 0:l.qualityScore)??0,"%"]})]})]}),i.jsxs("div",{className:"viz-summary",children:[i.jsx("h4",{children:"Summary of Work"}),i.jsx("p",{children:((c=e.arguments)==null?void 0:c.summary)||"No summary provided."})]}),((u=e.arguments)==null?void 0:u.filesChanged)&&e.arguments.filesChanged.length>0&&i.jsxs("div",{className:"viz-files",children:[i.jsx("h4",{children:"Files Changed"}),i.jsx("div",{className:"file-badges",children:e.arguments.filesChanged.map(h=>i.jsx("span",{className:"file-badge",children:h},h))})]})]}):e.tool==="rigour_agent_register"?i.jsxs("div",{className:"agent-viz",children:[i.jsx(_t,{size:32,className:"viz-icon"}),i.jsx("h3",{children:"Agent Scope Claims"}),i.jsxs("div",{className:"scope-box",children:[i.jsx("h4",{children:"Claimed Scope:"}),i.jsx("div",{className:"scope-list",children:(f=(d=e.arguments)==null?void 0:d.taskScope)==null?void 0:f.map(h=>i.jsx("code",{children:h},h))})]})]}):i.jsxs("div",{className:"code-section",children:[i.jsx("h4",{children:"Rigour Report"}),i.jsx("pre",{children:JSON.stringify(e._rigour_report,null,2)})]})})})]})};function lk(e,t){return!e||!t?!1:e===t?!0:e.startsWith("task:")||t.startsWith("task:")?e===t:((s,r)=>s===r||s.startsWith(`${r}/`)||r.startsWith(`${s}/`))(e,t)}function ck(e){return e.startsWith("CTP-")?e.replace(/-task$/,""):e.length>28?`${e.slice(0,12)}…${e.slice(-8)}`:e}function uk({session:e}){if(!e||e.agents.length===0)return i.jsxs("div",{className:"empty-state glass-card",children:[i.jsx(ks,{size:48}),i.jsx("h3",{children:"No Active Agent Team"}),i.jsxs("p",{children:["Register agents with ",i.jsx("code",{children:"rigour_agent_register"}),", or Studio will derive recent agents from checkpoint metrics in the Brain DB."]}),i.jsx("div",{className:"hint-box",children:i.jsxs("span",{children:["Register agents with ",i.jsx("code",{children:"rigour_agent_register"}),". Claimed globs are enforced per ",i.jsx("strong",{children:"bound agentId"})," on mediated writes (no union-allow). Broad scopes like ",i.jsx("code",{children:"**/*"})," require operator authority."]})})]});const t=!!e.derived||e.status==="completed",n=r=>{switch(r){case"active":return i.jsx(Ai,{size:10,fill:"#34d399",stroke:"#34d399"});case"idle":return i.jsx(Ai,{size:10,fill:"#fbbf24",stroke:"#fbbf24"});case"completed":return i.jsx(yt,{size:14,color:"#34d399"});default:return i.jsx(Ai,{size:10})}},s=(r,o)=>t||r.status==="completed"?!1:o.filter(l=>l.agentId!==r.agentId&&l.status!=="completed").some(l=>r.taskScope.some(c=>l.taskScope.some(u=>lk(c,u))));return i.jsxs("div",{className:"agent-teams",children:[i.jsxs("div",{className:"panel-header",children:[i.jsxs("div",{className:"title",children:[i.jsx(ks,{size:18}),i.jsx("span",{children:"Agent Team Session"})]}),i.jsx("div",{className:`session-status ${e.status}`,children:e.status.toUpperCase()})]}),i.jsxs("div",{className:"session-info",children:[i.jsx("span",{className:"session-id",children:e.sessionId}),i.jsxs("span",{className:"agent-count",children:[e.agents.length," agents"]}),e.derived&&i.jsx("span",{className:"meta-chip",children:"Historical (derived)"})]}),i.jsx("div",{className:"agents-grid",children:e.agents.map(r=>{const o=s(r,e.agents);return i.jsxs("div",{className:`agent-card glass-card ${r.status} ${o?"has-conflict":""}`,children:[i.jsxs("div",{className:"agent-header",children:[i.jsxs("div",{className:"agent-id",children:[n(r.status),i.jsx("span",{title:r.agentId,children:ck(r.agentId)})]}),o&&i.jsxs("div",{className:"conflict-badge",children:[i.jsx(_e,{size:12}),i.jsx("span",{children:"Scope Conflict"})]})]}),i.jsxs("div",{className:"task-scope",children:[i.jsx("h4",{children:"Enforced scope"}),i.jsx("ul",{children:r.taskScope.map((a,l)=>i.jsxs("li",{children:[i.jsx(br,{size:12}),i.jsx("code",{children:a})]},l))})]}),i.jsxs("div",{className:"agent-meta",children:[i.jsxs("span",{children:["Registered: ",new Date(r.registeredAt).toLocaleTimeString()]}),r.lastCheckpoint&&i.jsxs("span",{children:["Last checkpoint: ",new Date(r.lastCheckpoint).toLocaleTimeString()]})]}),i.jsx("div",{className:"mono dim agent-raw-id",children:r.agentId})]},r.agentId)})})]})}function dk({checkpoints:e}){if(!e||e.length===0)return i.jsxs("div",{className:"empty-state glass-card",children:[i.jsx(Ss,{size:48}),i.jsx("h3",{children:"No Checkpoints Yet"}),i.jsxs("p",{children:["Checkpoints compress agent state for verified handoffs. Call ",i.jsx("code",{children:"rigour_checkpoint"})," before",i.jsx("code",{children:" rigour_handoff"}),". Quality below 80% should pause the loop."]}),i.jsx("div",{className:"hint-box",children:i.jsx("span",{children:"Default interval: 15 minutes"})})]});const t=r=>r>=80?"#34d399":r>=60?"#fbbf24":"#f87171",n=r=>{if(r===0)return null;const o=e[r-1].qualityScore,a=e[r].qualityScore;return a>o+5?i.jsx(Tm,{size:14,color:"#34d399"}):a<o-5?i.jsx(zc,{size:14,color:"#f87171"}):null},s=e.some((r,o)=>{if(o<2)return!1;const a=e.slice(Math.max(0,o-2),o),l=a.reduce((c,u)=>c+u.qualityScore,0)/a.length;return r.qualityScore<l-10});return i.jsxs("div",{className:"checkpoint-timeline",children:[i.jsxs("div",{className:"panel-header",children:[i.jsxs("div",{className:"title",children:[i.jsx(Ss,{size:18}),i.jsx("span",{children:"Checkpoint Timeline"})]}),i.jsxs("div",{className:"drift-visualization",children:[i.jsxs("svg",{width:"120",height:"30",viewBox:"0 0 120 30",className:"drift-sparkline",children:[i.jsx("path",{d:`M ${e.map((r,o)=>`${o/(e.length-1||1)*120} ${30-r.qualityScore/100*30}`).join(" L ")}`,fill:"none",stroke:"var(--accent-primary)",strokeWidth:"2",strokeLinecap:"round"}),e.map((r,o)=>i.jsx("circle",{cx:o/(e.length-1||1)*120,cy:30-r.qualityScore/100*30,r:"2",fill:t(r.qualityScore)},o))]}),i.jsx("span",{className:"drift-label",children:"Session Stability"})]}),s&&i.jsxs("div",{className:"drift-alert",children:[i.jsx(_e,{size:14}),i.jsx("span",{children:"Drift Detected — quality dropped vs recent average"})]})]}),i.jsxs("div",{className:"timeline-container",children:[i.jsx("div",{className:"timeline-line"}),e.map((r,o)=>{var a;return i.jsxs("div",{className:`checkpoint-entry glass-card ${r.warnings.length>0||r.qualityScore<80?"has-warnings":""}`,children:[i.jsxs("div",{className:"checkpoint-marker",children:[i.jsx("div",{className:"marker-dot",style:{backgroundColor:t(r.qualityScore)}}),r.qualityScore<80&&i.jsx("div",{className:"marker-ring warn","aria-hidden":"true"})]}),i.jsxs("div",{className:"checkpoint-content",children:[i.jsxs("div",{className:"checkpoint-header",children:[i.jsx("span",{className:"checkpoint-summary-lead",children:((a=r.summary)==null?void 0:a.slice(0,80))||r.checkpointId}),i.jsx("span",{className:"checkpoint-time",children:new Date(r.timestamp).toLocaleTimeString()})]}),i.jsx("div",{className:"mono dim checkpoint-id",children:r.checkpointId}),r.qualityScore<80&&i.jsxs("div",{className:"warning-item",children:[i.jsx(_e,{size:12}),i.jsx("span",{children:"Below threshold — pause handoffs until quality recovers"})]}),i.jsxs("div",{className:"checkpoint-stats",children:[i.jsxs("div",{className:"stat",children:[i.jsx("span",{className:"label",children:"Progress"}),i.jsx("div",{className:"progress-bar",children:i.jsx("div",{className:"progress-fill",style:{width:`${r.progressPct}%`}})}),i.jsxs("span",{className:"value",children:[r.progressPct,"%"]})]}),i.jsxs("div",{className:"stat",children:[i.jsx("span",{className:"label",children:"Quality"}),i.jsxs("span",{className:"value score",style:{color:t(r.qualityScore)},children:[r.qualityScore,"%",n(o)]})]}),i.jsxs("div",{className:"stat",children:[i.jsx("span",{className:"label",children:"Agent"}),i.jsx("span",{className:"value agent-id",children:r.agentId})]})]}),i.jsx("div",{className:"checkpoint-summary",children:i.jsx("p",{children:r.summary})}),r.filesChanged.length>0&&i.jsx("div",{className:"files-changed",children:i.jsxs("span",{className:"count",children:[r.filesChanged.length," files changed"]})}),r.warnings.length>0&&i.jsx("div",{className:"warnings",children:r.warnings.map((l,c)=>i.jsxs("div",{className:"warning-item",children:[i.jsx(_e,{size:12}),i.jsx("span",{children:l})]},c))})]})]},r.checkpointId)})]})]})}const dy={critical:"var(--status-error)",high:"#f97316",medium:"var(--status-warning)",low:"var(--accent-primary)",info:"var(--text-dim)"},fk={srp_violation:"Single Responsibility",ocp_violation:"Open/Closed Principle",lsp_violation:"Liskov Substitution",isp_violation:"Interface Segregation",dip_violation:"Dependency Inversion",god_class:"God Class",god_function:"God Function",long_params:"Long Parameters",complex_conditional:"Complex Conditional",empty_catch:"Empty Catch Block",error_inconsistency:"Error Inconsistency",race_condition:"Race Condition",goroutine_leak:"Goroutine Leak",channel_misuse:"Channel Misuse",mutex_scope:"Mutex Scope",isp_violation_interface:"Interface Bloat",missing_test:"Missing Tests",long_file:"Long File",magic_number:"Magic Numbers",resource_leak:"Resource Leak",dry_violation:"DRY Violation",feature_envy:"Feature Envy",dead_code:"Dead Code",naming_convention:"Naming Convention",performance:"Performance"},rh={"SOLID Principles":["srp_violation","ocp_violation","lsp_violation","isp_violation","dip_violation"],"Code Smells":["god_class","god_function","long_params","complex_conditional","long_file","magic_number","dead_code","feature_envy"],"Error Handling":["empty_catch","error_inconsistency"],Concurrency:["race_condition","goroutine_leak","channel_misuse","mutex_scope"],Testing:["missing_test"],Architecture:["isp_violation_interface","dry_violation","naming_convention","resource_leak"],Performance:["performance"]},hk=()=>{const[e,t]=j.useState(null),[n,s]=j.useState(!0),[r,o]=j.useState(new Set),[a,l]=j.useState(new Set),[c,u]=j.useState("all"),[d,f]=j.useState(!1),h=async()=>{s(!0);try{const[g,k]=await Promise.all([fetch("/api/report-stats"),fetch("/api/deep-findings")]),N=g.ok?await g.json():{},T=k.ok?await k.json():[];t({...N,findings:T})}catch(g){console.error("Failed to fetch deep analysis data:",g)}s(!1)};j.useEffect(()=>{h()},[]);const y=g=>{o(k=>{const N=new Set(k);return N.has(g)?N.delete(g):N.add(g),N})},x=g=>{l(k=>{const N=new Set(k);return N.has(g)?N.delete(g):N.add(g),N})},S=((e==null?void 0:e.findings)||[]).filter(g=>g.provenance==="deep-analysis"),C=S.filter(g=>!(c!=="all"&&g.severity!==c||d&&!g.verified)),m=Object.entries(rh).map(([g,k])=>{const N=C.filter(T=>k.includes(T.category||""));return{group:g,findings:N}}).filter(g=>g.findings.length>0),p=Object.values(rh).flat(),v=C.filter(g=>!p.includes(g.category||"")),w=e==null?void 0:e.deep;return i.jsxs("div",{className:"deep-analysis",children:[i.jsxs("div",{className:"deep-header",children:[i.jsxs("div",{className:"deep-title",children:[i.jsx(lt,{size:24}),i.jsx("h2",{children:"Deep Analysis"}),(w==null?void 0:w.tier)&&i.jsx("span",{className:"tier-badge",children:w.tier})]}),i.jsx("div",{className:"deep-actions",children:i.jsx("button",{className:"refresh-btn",onClick:h,disabled:n,children:i.jsx(Le,{size:16,className:n?"spinning":""})})})]}),n?i.jsx("div",{className:"deep-loading",children:"Loading deep analysis data..."}):!(w!=null&&w.enabled)&&S.length===0?i.jsxs("div",{className:"deep-empty",children:[i.jsx(lt,{size:48}),i.jsx("h3",{children:"Deep Analysis Not Yet Run"}),i.jsxs("p",{children:["Run ",i.jsx("code",{children:"rigour check --deep"})," to get LLM-powered code quality analysis with 40+ categories."]}),i.jsxs("div",{className:"empty-features",children:[i.jsxs("div",{className:"feature",children:[i.jsx(fs,{size:16})," SOLID Principles"]}),i.jsxs("div",{className:"feature",children:[i.jsx(on,{size:16})," Design Patterns"]}),i.jsxs("div",{className:"feature",children:[i.jsx(Yt,{size:16})," Concurrency Safety"]}),i.jsxs("div",{className:"feature",children:[i.jsx(p0,{size:16})," Architecture Quality"]})]})]}):i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"deep-stats-banner",children:[i.jsxs("div",{className:"stat-card",children:[i.jsx("span",{className:"stat-value",children:(w==null?void 0:w.findings_count)??S.length}),i.jsx("span",{className:"stat-label",children:"Findings"})]}),i.jsxs("div",{className:"stat-card",children:[i.jsx("span",{className:"stat-value",children:(w==null?void 0:w.findings_verified)??S.filter(g=>g.verified).length}),i.jsx("span",{className:"stat-label",children:"Verified"})]}),i.jsxs("div",{className:"stat-card",children:[i.jsx("span",{className:"stat-value",children:(w==null?void 0:w.files_analyzed)??"—"}),i.jsx("span",{className:"stat-label",children:"Files Analyzed"})]}),i.jsxs("div",{className:"stat-card",children:[i.jsx("span",{className:"stat-value",children:(w==null?void 0:w.model)||"—"}),i.jsx("span",{className:"stat-label",children:"Model"})]}),(w==null?void 0:w.total_ms)&&i.jsxs("div",{className:"stat-card",children:[i.jsxs("span",{className:"stat-value",children:[(w.total_ms/1e3).toFixed(1),"s"]}),i.jsx("span",{className:"stat-label",children:"Inference"})]})]}),((e==null?void 0:e.score)!==void 0||(e==null?void 0:e.code_quality_score)!==void 0)&&i.jsxs("div",{className:"deep-scores",children:[(e==null?void 0:e.score)!==void 0&&i.jsx(Ea,{label:"Overall",score:e.score}),(e==null?void 0:e.ai_health_score)!==void 0&&i.jsx(Ea,{label:"AI Health",score:e.ai_health_score}),(e==null?void 0:e.structural_score)!==void 0&&i.jsx(Ea,{label:"Structural",score:e.structural_score})]}),i.jsxs("div",{className:"deep-filters",children:[i.jsxs("div",{className:"filter-group",children:[i.jsx(io,{size:14}),i.jsxs("select",{value:c,onChange:g=>u(g.target.value),className:"filter-select",children:[i.jsx("option",{value:"all",children:"All Severities"}),i.jsx("option",{value:"critical",children:"Critical"}),i.jsx("option",{value:"high",children:"High"}),i.jsx("option",{value:"medium",children:"Medium"}),i.jsx("option",{value:"low",children:"Low"})]})]}),i.jsxs("button",{className:`filter-toggle ${d?"active":""}`,onClick:()=>f(!d),children:[i.jsx(yt,{size:14}),"Verified Only"]}),i.jsxs("span",{className:"filter-count",children:[C.length," finding",C.length!==1?"s":""]})]}),i.jsxs("div",{className:"deep-findings",children:[m.map(({group:g,findings:k})=>i.jsxs("div",{className:"finding-group",children:[i.jsxs("button",{className:"group-header",onClick:()=>y(g),children:[r.has(g)?i.jsx(js,{size:16}):i.jsx(un,{size:16}),i.jsx("span",{className:"group-name",children:g}),i.jsx("span",{className:"group-count",children:k.length}),i.jsx("div",{className:"group-severity-dots",children:["critical","high","medium","low"].map(N=>{const T=k.filter(A=>A.severity===N).length;return T>0?i.jsx("span",{className:"sev-dot",style:{backgroundColor:dy[N]},title:`${T} ${N}`},N):null})})]}),r.has(g)&&i.jsx("div",{className:"group-findings",children:k.map(N=>i.jsx(ih,{finding:N,expanded:a.has(N.id),onToggle:()=>x(N.id)},N.id))})]},g)),v.length>0&&i.jsxs("div",{className:"finding-group",children:[i.jsxs("button",{className:"group-header",onClick:()=>y("_other"),children:[r.has("_other")?i.jsx(js,{size:16}):i.jsx(un,{size:16}),i.jsx("span",{className:"group-name",children:"Other Findings"}),i.jsx("span",{className:"group-count",children:v.length})]}),r.has("_other")&&i.jsx("div",{className:"group-findings",children:v.map(g=>i.jsx(ih,{finding:g,expanded:a.has(g.id),onToggle:()=>x(g.id)},g.id))})]}),C.length===0&&i.jsxs("div",{className:"no-findings",children:[i.jsx(yt,{size:32}),i.jsx("p",{children:"No deep analysis findings match the current filters."})]})]})]})]})},ih=({finding:e,expanded:t,onToggle:n})=>{const s=dy[e.severity||"info"],r=fk[e.category||""]||e.category||"Unknown";return i.jsxs("div",{className:`finding-card severity-${e.severity||"info"}`,children:[i.jsxs("button",{className:"finding-header",onClick:n,children:[i.jsxs("div",{className:"finding-left",children:[i.jsx("span",{className:"severity-indicator",style:{backgroundColor:s}}),i.jsx("span",{className:"finding-title",children:e.title})]}),i.jsxs("div",{className:"finding-right",children:[i.jsx("span",{className:"category-tag",children:r}),e.verified&&i.jsxs("span",{className:"verified-badge",title:"AST-verified",children:[i.jsx(yt,{size:12})," Verified"]}),e.confidence!==void 0&&i.jsxs("span",{className:"confidence-badge",title:`Confidence: ${(e.confidence*100).toFixed(0)}%`,children:[(e.confidence*100).toFixed(0),"%"]}),i.jsx("span",{className:"severity-badge",style:{color:s},children:e.severity||"info"}),t?i.jsx(js,{size:14}):i.jsx(un,{size:14})]})]}),t&&i.jsxs("div",{className:"finding-body",children:[i.jsx("p",{className:"finding-details",children:e.details}),e.hint&&i.jsxs("div",{className:"finding-hint",children:[i.jsx(Yt,{size:14}),i.jsx("span",{children:e.hint})]}),e.files&&e.files.length>0&&i.jsx("div",{className:"finding-files",children:e.files.map((o,a)=>i.jsxs("span",{className:"file-tag",children:[i.jsx(St,{size:12}),o,e.line&&`:${e.line}`,e.endLine&&`-${e.endLine}`]},a))}),i.jsx("div",{className:"finding-meta",children:e.source&&i.jsxs("span",{className:"meta-tag",children:["Source: ",e.source]})})]})]})},Ea=({label:e,score:t})=>{const n=2*Math.PI*36,s=n-t/100*n,r=t>=80?"var(--status-success)":t>=60?"var(--status-warning)":"var(--status-error)";return i.jsxs("div",{className:"score-ring",children:[i.jsxs("svg",{width:"88",height:"88",viewBox:"0 0 88 88",children:[i.jsx("circle",{cx:"44",cy:"44",r:"36",fill:"none",stroke:"var(--border-dim)",strokeWidth:"6"}),i.jsx("circle",{cx:"44",cy:"44",r:"36",fill:"none",stroke:r,strokeWidth:"6",strokeDasharray:n,strokeDashoffset:s,strokeLinecap:"round",transform:"rotate(-90 44 44)",style:{transition:"stroke-dashoffset 0.8s ease"}}),i.jsx("text",{x:"44",y:"42",textAnchor:"middle",fill:"var(--text-main)",fontSize:"18",fontWeight:"700",children:t}),i.jsx("text",{x:"44",y:"56",textAnchor:"middle",fill:"var(--text-dim)",fontSize:"9",children:"/100"})]}),i.jsx("span",{className:"score-label",children:e})]})},fy={improving:{color:"#34d399",icon:Tm,label:"Improving"},stable:{color:"var(--accent-primary)",icon:l0,label:"Stable"},degrading:{color:"#f87171",icon:zc,label:"Degrading"}};function hy({direction:e,zScore:t}){const n=fy[e],s=n.icon;return i.jsxs("span",{className:"direction-badge",style:{color:n.color,borderColor:n.color},children:[i.jsx(s,{size:14}),i.jsx("span",{children:n.label}),t!==void 0&&i.jsxs("span",{className:"z-score",children:["Z=",t.toFixed(1)]})]})}function vi({score:e,label:t,size:n=80}){const s=(n-8)/2,r=2*Math.PI*s,o=e/100*r,a=e>=80?"#34d399":e>=60?"#fbbf24":"#f87171";return i.jsxs("div",{className:"score-ring",style:{width:n,height:n+20},children:[i.jsxs("svg",{width:n,height:n,viewBox:`0 0 ${n} ${n}`,children:[i.jsx("circle",{cx:n/2,cy:n/2,r:s,fill:"none",stroke:"var(--bg-tertiary)",strokeWidth:"6"}),i.jsx("circle",{cx:n/2,cy:n/2,r:s,fill:"none",stroke:a,strokeWidth:"6",strokeDasharray:`${o} ${r-o}`,strokeDashoffset:r/4,strokeLinecap:"round",style:{transition:"stroke-dasharray 0.8s ease"}}),i.jsx("text",{x:n/2,y:n/2,textAnchor:"middle",dominantBaseline:"central",fill:"var(--text-primary)",fontSize:"16",fontWeight:"bold",children:Math.round(e)})]}),i.jsx("span",{className:"ring-label",children:t})]})}function pk({series:e,direction:t}){if(e.length<2)return null;const n=200,s=50,r=4,o=e.map(x=>x.ewma),a=Math.min(...o)-5,c=Math.max(...o)+5-a||1,u=e.map((x,S)=>{const C=r+S/(e.length-1)*(n-2*r),m=s-r-(x.ewma-a)/c*(s-2*r);return`${C},${m}`}),d=fy[t].color,f=r,h=r+(e.length-1)/(e.length-1)*(n-2*r),y=`M ${u[0]} L ${u.join(" L ")} L ${h},${s} L ${f},${s} Z`;return i.jsxs("svg",{width:n,height:s,className:"ewma-sparkline",children:[i.jsx("defs",{children:i.jsxs("linearGradient",{id:`grad-${t}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[i.jsx("stop",{offset:"0%",stopColor:d,stopOpacity:"0.3"}),i.jsx("stop",{offset:"100%",stopColor:d,stopOpacity:"0.02"})]})}),i.jsx("path",{d:y,fill:`url(#grad-${t})`}),i.jsx("polyline",{points:u.join(" "),fill:"none",stroke:d,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),i.jsx("circle",{cx:parseFloat(u[u.length-1].split(",")[0]),cy:parseFloat(u[u.length-1].split(",")[1]),r:"3",fill:d})]})}function yi({name:e,icon:t,stream:n}){return i.jsxs("div",{className:"stream-card",children:[i.jsxs("div",{className:"stream-header",children:[i.jsxs("div",{className:"stream-name",children:[i.jsx(t,{size:16}),i.jsx("span",{children:e})]}),i.jsx(hy,{direction:n.direction,zScore:n.zScore})]}),i.jsxs("div",{className:"stream-body",children:[i.jsx(pk,{series:n.series,direction:n.direction}),i.jsxs("div",{className:"stream-stats",children:[i.jsxs("div",{className:"stat",children:[i.jsx("span",{className:"stat-label",children:"Current EWMA"}),i.jsx("span",{className:"stat-value",children:n.currentEWMA.toFixed(1)})]}),i.jsxs("div",{className:"stat",children:[i.jsx("span",{className:"stat-label",children:"Historical Avg"}),i.jsx("span",{className:"stat-value",children:n.historicalAvg.toFixed(1)})]})]})]})]})}function mk({monthly:e}){const[t,n]=j.useState(!0);return e.length===0?null:i.jsxs("div",{className:"monthly-section",children:[i.jsxs("button",{className:"section-toggle",onClick:()=>n(!t),children:[t?i.jsx(js,{size:16}):i.jsx(un,{size:16}),i.jsx(wm,{size:16}),i.jsx("span",{children:"Monthly Breakdown"})]}),t&&i.jsxs("table",{className:"monthly-table",children:[i.jsx("thead",{children:i.jsxs("tr",{children:[i.jsx("th",{children:"Month"}),i.jsx("th",{children:"Score"}),i.jsx("th",{children:"AI Health"}),i.jsx("th",{children:"Structural"}),i.jsx("th",{children:"Scans"}),i.jsx("th",{children:"AI Drift"}),i.jsx("th",{children:"Security"})]})}),i.jsx("tbody",{children:e.slice().reverse().map(s=>{const r=s.avgScore>=80?"#34d399":s.avgScore>=60?"#fbbf24":"#f87171";return i.jsxs("tr",{children:[i.jsx("td",{className:"month-cell",children:s.month}),i.jsx("td",{style:{color:r,fontWeight:600},children:s.avgScore.toFixed(0)}),i.jsx("td",{children:s.avgAiHealth.toFixed(0)}),i.jsx("td",{children:s.avgStructural.toFixed(0)}),i.jsx("td",{className:"dim",children:s.scanCount}),i.jsx("td",{className:"dim",children:s.provenanceBreakdown.aiDrift}),i.jsx("td",{className:"dim",children:s.provenanceBreakdown.security})]},s.month)})})]})]})}function vk(){const[e,t]=j.useState(null),[n,s]=j.useState(!0),[r,o]=j.useState(null),a=async()=>{s(!0),o(null);try{const l=await fetch("/api/drift");if(!l.ok)throw new Error(`HTTP ${l.status}`);const c=await l.json();c&&c.totalScans>0?t(c):t(null)}catch(l){o(l.message)}finally{s(!1)}};return j.useEffect(()=>{a()},[]),n?i.jsxs("div",{className:"empty-state",children:[i.jsx(Le,{size:48,className:"spin"}),i.jsx("h3",{children:"Analyzing Temporal Drift..."}),i.jsx("p",{children:"Reading scan history from SQLite brain."})]}):r?i.jsxs("div",{className:"empty-state",children:[i.jsx(_e,{size:48}),i.jsx("h3",{children:"Drift Analysis Unavailable"}),i.jsx("p",{children:r}),i.jsx("button",{className:"retry-btn",onClick:a,children:"Retry"})]}):e?i.jsxs("div",{className:"temporal-drift",children:[i.jsxs("div",{className:"panel-header",children:[i.jsxs("div",{className:"title",children:[i.jsx(_t,{size:18}),i.jsx("span",{children:"Temporal Drift Engine"}),i.jsx("span",{className:"badge",children:"v5 EWMA"})]}),i.jsx("button",{className:"refresh-btn",onClick:a,title:"Refresh",children:i.jsx(Le,{size:16})})]}),i.jsxs("div",{className:`drift-banner drift-${e.overallDirection}`,children:[i.jsxs("div",{className:"banner-main",children:[i.jsx(hy,{direction:e.overallDirection,zScore:e.overallZScore}),i.jsx("span",{className:"banner-repo",children:e.repo}),i.jsxs("span",{className:"banner-meta",children:[e.totalScans," scans over ",e.timeSpanDays," days"]})]}),e.latestScanAnomaly.isAnomaly&&i.jsxs("div",{className:"anomaly-alert",children:[i.jsx(_e,{size:14}),i.jsx("span",{children:e.latestScanAnomaly.message})]})]}),i.jsxs("div",{className:"score-rings-row",children:[i.jsx(vi,{score:e.streams.overall.currentEWMA,label:"Overall"}),i.jsx(vi,{score:e.streams.aiDrift.currentEWMA,label:"AI Health"}),i.jsx(vi,{score:e.streams.structural.currentEWMA,label:"Structural"}),i.jsx(vi,{score:e.streams.security.currentEWMA,label:"Security"})]}),i.jsxs("div",{className:"streams-grid",children:[i.jsx(yi,{name:"AI Drift",icon:lt,stream:e.streams.aiDrift}),i.jsx(yi,{name:"Structural",icon:Yt,stream:e.streams.structural}),i.jsx(yi,{name:"Security",icon:fs,stream:e.streams.security}),i.jsx(yi,{name:"Overall",icon:_t,stream:e.streams.overall})]}),i.jsx(mk,{monthly:e.monthly}),i.jsxs("div",{className:"narrative-section",children:[i.jsxs("div",{className:"narrative-header",children:[i.jsx(zn,{size:16}),i.jsx("span",{children:"Analysis Narrative"})]}),i.jsx("pre",{className:"narrative-text",children:e.narrative})]})]}):i.jsxs("div",{className:"empty-state",children:[i.jsx(_t,{size:48}),i.jsx("h3",{children:"Not Enough Data"}),i.jsxs("p",{children:["Run at least 3 scans with ",i.jsx("code",{children:"rigour check"})," to see temporal drift analysis."]}),i.jsx("div",{className:"hint-box",children:i.jsx("span",{children:"Drift detection uses EWMA + Z-score anomaly detection across per-provenance streams."})})]})}function yk(){var ju,wu,Su,ku;const[e,t]=j.useState(null),[n,s]=j.useState(null),[r,o]=j.useState(null),[a,l]=j.useState(null),[c,u]=j.useState(null),[d,f]=j.useState(null),[h,y]=j.useState("services/task"),[x,S]=j.useState(""),[C,m]=j.useState(null),[p,v]=j.useState(""),[w,g]=j.useState(!1),[k,N]=j.useState(),[T,A]=j.useState("none"),[P,$]=j.useState(0),[b,Q]=j.useState(!1),[de,L]=j.useState(null),[U,W]=j.useState(!1),[M,z]=j.useState(!0),O=async()=>{z(!0);try{const[G,X,yy,gy,xy,Je]=await Promise.all([fetch("/api/context-stats").then(ct=>ct.json()),fetch("/api/task-cost").then(ct=>ct.json()),fetch("/api/cache-stats").then(ct=>ct.json()),fetch("/api/context-scope").then(ct=>ct.json()),fetch("/api/checkpoint-metrics").then(ct=>ct.json()),fetch("/api/cursor-api-key/status").then(ct=>ct.json())]);t(G),s(X),o(yy),l(gy),u(xy),g(!!(Je!=null&&Je.configured)),N(Je==null?void 0:Je.hint),A((Je==null?void 0:Je.source)||"none"),$(Number((Je==null?void 0:Je.importedCount)??0))}catch(G){console.error("Failed to fetch cost & context telemetry",G)}finally{z(!1)}};j.useEffect(()=>{O()},[]);const R=async()=>{if(h)try{const G=await fetch(`/api/context-explain?target=${encodeURIComponent(h)}`);f(await G.json())}catch(G){console.error("Failed to get context explanation",G)}},F=async()=>{if(x.trim())try{const X=await(await fetch("/api/import-cursor-usage",{method:"POST",headers:{"Content-Type":"text/plain"},body:x})).json();X.success?(m(`Imported ${X.importedCount} observed usage record(s).`),S(""),O()):m(`Import failed: ${X.error}`)}catch(G){m(`Import failed: ${G.message}`)}},re=async()=>{if(p.trim()){Q(!0),L(null);try{const X=await(await fetch("/api/cursor-api-key",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:p.trim()})})).json();X.success?(g(!0),v(""),N(X.hint),A(X.source||"file"),$(Number(X.importedCount??0)),L(X.syncError?`Key saved locally. Initial sync failed: ${X.syncError}`:`Vendor key saved locally. Imported ${X.importedCount??0} usage event(s).`),O()):L(`Save failed: ${X.error}`)}catch(G){L(`Save failed: ${G.message}`)}finally{Q(!1)}}},_=async()=>{Q(!0),L(null);try{const X=await(await fetch("/api/cursor-api-key",{method:"DELETE"})).json();X.success?(g(!!X.configured),N(X.hint),A(X.source||"none"),L(X.configured?"Removed file key. Env key still active.":"Removed local vendor key.")):L(`Remove failed: ${X.error}`)}catch(G){L(`Remove failed: ${G.message}`)}finally{Q(!1)}},B=async()=>{Q(!0),L(null);try{const X=await(await fetch("/api/cursor-sync",{method:"POST"})).json();X.success?($(Number(X.importedCount??0)),L(`Synced ${X.importedCount??0} new usage event(s).`),O()):L(`Sync failed: ${X.error||"Unknown error"}`)}catch(G){L(`Sync failed: ${G.message}`)}finally{Q(!1)}},K=G=>G?G>=1e6?`${(G/1e6).toFixed(2)}M`:G>=1e3?`${(G/1e3).toFixed(1)}K`:G.toString():"0",fe=(e==null?void 0:e.candidateTokens)??0,Pt=(e==null?void 0:e.returnedTokens)??0,Kr=(e==null?void 0:e.potentialAvoidedTokens)??0,Be=fe>0?((fe-Pt)/fe*100).toFixed(1):"0.0",py=r!=null&&r.hitRate?Math.round(r.hitRate*100):0,yu=((ju=n==null?void 0:n.actual)==null?void 0:ju.costUsd)??0,gu=((wu=n==null?void 0:n.estimated)==null?void 0:wu.estimatedCostAvoidedUsd)??0,xu=((Su=n==null?void 0:n.actual)==null?void 0:Su.inputTokens)??0,my=((ku=n==null?void 0:n.actual)==null?void 0:ku.source)||"No usage data",vy=((e==null?void 0:e.retrievals)??0)>0||xu>0||((r==null?void 0:r.exactCacheHits)??0)+((r==null?void 0:r.semanticCacheHits)??0)+((r==null?void 0:r.partialCacheHits)??0)+((r==null?void 0:r.cacheMisses)??0)>0||((c==null?void 0:c.checkpointCount)??0)>0;return i.jsxs("div",{className:"cost-context-view",children:[i.jsxs("div",{className:"cost-header",children:[i.jsxs("div",{children:[i.jsxs("h2",{children:[i.jsx(Yt,{size:20,className:"text-amber"}),"Token Savings & Context Efficiency"]}),i.jsx("p",{children:"Rigour-measured avoided context vs optional observed model usage (kept separate on purpose)."})]}),i.jsx("div",{className:"cost-toolbar",children:i.jsxs("button",{type:"button",onClick:O,"aria-label":"Refresh cost and context stats",children:[i.jsx(Le,{size:14,className:M?"spinning":""})," Refresh"]})})]}),!vy&&!M&&i.jsxs("div",{className:"cost-banner",children:[i.jsx(Pr,{size:18,className:"text-amber"}),i.jsxs("div",{children:[i.jsx("strong",{children:"No telemetry recorded yet"}),i.jsxs("p",{children:["Use Rigour MCP tools (",i.jsx("code",{children:"rigour_context_scope"}),", ",i.jsx("code",{children:"rigour_checkpoint"}),") or import observed usage below."]})]})]}),i.jsxs("div",{className:"cost-kpi-grid",children:[i.jsxs("div",{className:"cost-kpi-card glass-card",children:[i.jsx("div",{className:"label",children:"Actual model tokens"}),i.jsx("div",{className:"value",children:K(xu)}),i.jsxs("div",{className:"meta text-emerald",children:["Observed via ",my]})]}),i.jsxs("div",{className:"cost-kpi-card glass-card",children:[i.jsx("div",{className:"label",children:"Potential context avoided"}),i.jsx("div",{className:"value text-amber",children:K(Kr)}),i.jsxs("div",{className:"meta",children:["Reduction ratio: ",Be,"%"]})]}),i.jsxs("div",{className:"cost-kpi-card glass-card",children:[i.jsx("div",{className:"label",children:"Cache hit rate"}),i.jsxs("div",{className:"value text-cyan",children:[py,"%"]}),i.jsx("div",{className:"meta",children:"static & semantic layers"})]}),i.jsxs("div",{className:"cost-kpi-card glass-card",children:[i.jsx("div",{className:"label",children:"Actual vs avoided cost"}),i.jsxs("div",{className:"value",children:[i.jsxs("span",{className:"text-emerald",children:["$",yu.toFixed(2)]})," / ",i.jsxs("span",{className:"text-amber",children:["$",gu.toFixed(2)]})]}),i.jsx("div",{className:"meta",children:"Actual spend / est. avoided"})]})]}),i.jsxs("div",{className:"cost-panel-grid",children:[i.jsxs("div",{className:"cost-panel glass-card",children:[i.jsxs("h3",{children:[i.jsx(on,{size:16,className:"text-cyan"})," A. Retrieval efficiency"]}),i.jsxs("div",{className:"cost-row",children:[i.jsx("span",{children:"Candidates scanned"}),i.jsxs("span",{children:[K(fe)," tokens"]})]}),i.jsxs("div",{className:"cost-row",children:[i.jsx("span",{children:"Context returned"}),i.jsxs("span",{className:"text-cyan",children:[K(Pt)," tokens"]})]}),i.jsxs("div",{className:"cost-row",children:[i.jsx("span",{children:"Potential avoided"}),i.jsxs("span",{className:"text-amber",children:[K(Kr)," tokens"]})]}),i.jsxs("div",{className:"cost-row",children:[i.jsx("span",{children:"Reduction ratio"}),i.jsxs("span",{className:"text-emerald",children:[Be,"%"]})]})]}),i.jsxs("div",{className:"cost-panel glass-card",children:[i.jsxs("h3",{children:[i.jsx(Ir,{size:16,className:"text-emerald"})," B. Cache efficiency"]}),i.jsxs("div",{className:"cost-hit-grid",children:[i.jsxs("div",{children:["Exact hits",i.jsx("strong",{className:"text-emerald",children:(r==null?void 0:r.exactCacheHits)??0})]}),i.jsxs("div",{children:["Semantic hits",i.jsx("strong",{className:"text-cyan",children:(r==null?void 0:r.semanticCacheHits)??0})]}),i.jsxs("div",{children:["Partial hits",i.jsx("strong",{className:"text-amber",children:(r==null?void 0:r.partialCacheHits)??0})]}),i.jsxs("div",{children:["Misses",i.jsx("strong",{className:"text-rose",children:(r==null?void 0:r.cacheMisses)??0})]})]}),i.jsxs("div",{className:"cost-row",children:[i.jsx("span",{children:"Tokens served from cache"}),i.jsx("span",{className:"text-emerald",children:K((r==null?void 0:r.tokensServedFromCache)??0)})]})]}),i.jsxs("div",{className:"cost-panel glass-card",children:[i.jsxs("h3",{children:[i.jsx(ds,{size:16,className:"text-purple"})," C. Duplication prevention"]}),i.jsxs("div",{className:"cost-row",children:[i.jsx("span",{children:"Repeated reads prevented"}),i.jsx("span",{className:"text-emerald",children:(e==null?void 0:e.repeatedReadsPrevented)??0})]}),i.jsxs("div",{className:"cost-row",children:[i.jsx("span",{children:"Overlapping scopes resolved"}),i.jsx("span",{className:"text-cyan",children:(a==null?void 0:a.overlappingScopesResolved)??0})]}),i.jsxs("div",{className:"cost-row",children:[i.jsx("span",{children:"Always-on rule tokens"}),i.jsx("span",{children:K((a==null?void 0:a.alwaysOnRuleTokens)??0)})]}),i.jsxs("div",{className:"cost-row",children:[i.jsx("span",{children:"Unused tools filtered"}),i.jsx("span",{className:"text-purple",children:(a==null?void 0:a.unusedToolsFiltered)??0})]})]}),i.jsxs("div",{className:"cost-panel glass-card",children:[i.jsxs("h3",{children:[i.jsx(_c,{size:16,className:"text-amber"})," D. Checkpoint compression"]}),i.jsxs("div",{className:"cost-row",children:[i.jsx("span",{children:"Raw session state"}),i.jsx("span",{children:K((c==null?void 0:c.rawStateTokens)??0)})]}),i.jsxs("div",{className:"cost-row",children:[i.jsx("span",{children:"Checkpoint packet size"}),i.jsxs("span",{className:"text-emerald",children:[K((c==null?void 0:c.checkpointTokens)??0),((c==null?void 0:c.compressionRatio)??0)>0?` (${c==null?void 0:c.compressionRatio}×)`:""]})]}),i.jsxs("div",{className:"cost-row",children:[i.jsx("span",{children:"Observed model cost"}),i.jsxs("span",{className:"text-emerald",children:["$",yu.toFixed(2)]})]}),i.jsxs("div",{className:"cost-row",children:[i.jsx("span",{children:"Estimated avoided spend"}),i.jsxs("span",{className:"text-amber",children:["$",gu.toFixed(2)]})]})]})]}),i.jsxs("div",{className:"cost-panel glass-card",children:[i.jsxs("h3",{children:[i.jsx(Xx,{size:16,className:"text-cyan"})," Context explainability"]}),i.jsxs("div",{className:"cost-explain-row",children:[i.jsx("label",{className:"sr-only",htmlFor:"context-explain-target",children:"File, service, or query"}),i.jsx("input",{id:"context-explain-target",type:"text",value:h,onChange:G=>y(G.target.value),placeholder:"File, service, or query (e.g. services/task)"}),i.jsx("button",{type:"button",className:"cost-primary",onClick:R,children:"Explain"})]}),d&&i.jsxs("div",{className:"cost-row",style:{flexDirection:"column",alignItems:"flex-start",gap:6},children:[i.jsxs("div",{children:["Target: ",i.jsx("strong",{children:d.fileOrService})," [",String(d.status||"").toUpperCase(),"]"]}),i.jsxs("div",{children:["Reason: ",d.reason]}),i.jsxs("div",{children:["Cache: ",i.jsx("span",{className:"text-cyan",children:d.cacheStatus})]})]})]}),i.jsxs("div",{className:"cost-panel glass-card",children:[i.jsxs("h3",{children:[i.jsx(m0,{size:16,className:"text-amber"})," Import observed model usage"]}),i.jsx("p",{className:"cost-panel-help",children:"Vendor-agnostic CSV/JSON import for actual token spend. Does not require any Admin API key."}),i.jsx("label",{className:"sr-only",htmlFor:"observed-usage-import",children:"Observed usage CSV or JSON"}),i.jsx("textarea",{id:"observed-usage-import",rows:4,value:x,onChange:G=>S(G.target.value),placeholder:`Date,Model,Input Tokens,Output Tokens,Cost
|
|
372
|
+
2026-08-05,claude-3-5-sonnet,510000,62000,4.83`,style:{marginBottom:10}}),i.jsxs("div",{className:"cost-actions",children:[i.jsx("button",{type:"button",className:"cost-primary",onClick:F,children:"Import usage data"}),C&&i.jsx("span",{role:"alert",className:C.includes("failed")?"text-rose":"text-emerald",style:{fontSize:"0.78rem"},children:C})]})]}),i.jsxs("div",{className:"cost-panel glass-card vendor-adapters",children:[i.jsxs("button",{type:"button",className:"vendor-adapters-toggle",onClick:()=>W(G=>!G),"aria-expanded":U,children:[i.jsxs("span",{children:[i.jsx(a0,{size:16,className:"text-cyan"})," Vendor adapters"]}),i.jsx(js,{size:16,className:U?"rotated":""})]}),U&&i.jsxs("div",{className:"vendor-adapters-body",children:[i.jsx("h4",{children:"Cursor Admin API (optional)"}),i.jsxs("p",{className:"cost-panel-help",children:["Optional verification for teams that already use Cursor Admin API. Rigour does not require this. Prefer ",i.jsx("code",{children:"RIGOUR_CURSOR_API_KEY"})," or ",i.jsx("code",{children:"CURSOR_ADMIN_API_KEY"})," in the environment. File storage stays on this machine only (",i.jsx("code",{children:"~/.rigour/settings.json"}),", mode 600)."]}),i.jsx("p",{className:"cost-panel-help",children:w?`Configured${k?` (${k})`:""} via ${T}.${P>0?` ${P} event(s) imported.`:""}`:"No vendor key configured."}),i.jsxs("div",{className:"cost-actions",style:{marginBottom:8},children:[i.jsx("label",{className:"sr-only",htmlFor:"cursor-vendor-key",children:"Cursor Admin API key"}),i.jsx("input",{id:"cursor-vendor-key",type:"password",autoComplete:"off",value:p,onChange:G=>v(G.target.value),placeholder:"Paste key only if not using env",disabled:b}),i.jsx("button",{type:"button",className:"cost-primary",onClick:re,disabled:b||!p.trim(),children:b?"Saving…":"Save key"}),i.jsxs("button",{type:"button",onClick:B,disabled:b||!w,"aria-label":"Sync Cursor usage",children:[i.jsx(Le,{size:14,className:b?"spinning":""}),"Sync"]}),i.jsxs("button",{type:"button",onClick:_,disabled:b||T==="env"||!w,"aria-label":"Remove local Cursor API key",title:T==="env"?"Remove env var in your shell":"Remove file key",children:[i.jsx(Cm,{size:14}),"Remove"]})]}),de&&i.jsx("span",{role:"alert",className:de.includes("failed")?"text-rose":"text-emerald",style:{fontSize:"0.78rem"},children:de})]})]})]})}function gn(e){const t=e??0;return t>=1e6?`${(t/1e6).toFixed(2)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:String(t)}function gk({onNavigate:e}){var x,S,C,m,p,v,w,g,k,N,T,A,P,$,b,Q,de,L,U,W,M,z,O;const[t,n]=j.useState(null),[s,r]=j.useState(!0),[o,a]=j.useState(null),l=async()=>{r(!0),a(null);try{const R=await fetch("/api/overview");if(!R.ok)throw new Error(`HTTP ${R.status}`);const F=await R.json();if(F.error)throw new Error(F.error);n(F)}catch(R){a(R.message||"Failed to load overview")}finally{r(!1)}};j.useEffect(()=>{l()},[]);const c=((x=t==null?void 0:t.context)==null?void 0:x.potentialAvoidedTokens)??0,u=((S=t==null?void 0:t.context)==null?void 0:S.checkpointReplayAvoided)??0,d=Math.round((((C=t==null?void 0:t.cache)==null?void 0:C.hitRate)??0)*100),f=((p=(m=t==null?void 0:t.cost)==null?void 0:m.actual)==null?void 0:p.costUsd)??0,h=((w=(v=t==null?void 0:t.cost)==null?void 0:v.estimated)==null?void 0:w.estimatedCostAvoidedUsd)??0,y=(((g=t==null?void 0:t.context)==null?void 0:g.retrievals)??0)>0||((t==null?void 0:t.checkpointCount)??0)>0||((t==null?void 0:t.memoryCount)??0)>0||(((N=(k=t==null?void 0:t.cost)==null?void 0:k.actual)==null?void 0:N.inputTokens)??0)>0;return i.jsxs("div",{className:"overview-view",children:[i.jsxs("div",{className:"overview-header",children:[i.jsxs("div",{children:[i.jsxs("h2",{children:[i.jsx(km,{size:22}),"Governance Overview"]}),i.jsx("p",{className:"overview-dek",children:"Local governance signal — measured context avoided, cache hits, checkpoints. Spend is observed; avoided $ is always an estimate."})]}),i.jsxs("button",{className:"refresh-btn",onClick:l,disabled:s,type:"button",children:[i.jsx(Le,{size:16,className:s?"spinning":""}),"Refresh"]})]}),o&&i.jsxs("div",{className:"overview-banner warn",children:[i.jsx(Pr,{size:18}),i.jsxs("div",{children:[i.jsx("strong",{children:"Could not load telemetry"}),i.jsxs("p",{children:[o,". Confirm Studio is serving ",i.jsx("code",{children:"/api/overview"})," on the same port as the UI."]})]})]}),!o&&!s&&!y&&i.jsxs("div",{className:"overview-banner warn",children:[i.jsx(Pr,{size:18}),i.jsxs("div",{children:[i.jsx("strong",{children:"No agent telemetry yet"}),i.jsxs("p",{children:["Run agents with Rigour MCP (",i.jsx("code",{children:"rigour_recall"}),", ",i.jsx("code",{children:"rigour_context_scope"}),","," ",i.jsx("code",{children:"rigour_checkpoint"}),") or import observed usage under Cost & Context."]})]})]}),i.jsxs("div",{className:"overview-kpi-grid",children:[i.jsxs("button",{type:"button",className:"overview-kpi",onClick:()=>e("cost"),children:[i.jsx("span",{className:"kpi-label",children:"Context avoided"}),i.jsx("span",{className:"kpi-value amber",children:gn(c+u)}),i.jsx("span",{className:"kpi-meta",children:"retrieval + checkpoint replay"})]}),i.jsxs("button",{type:"button",className:"overview-kpi",onClick:()=>e("cost"),children:[i.jsx("span",{className:"kpi-label",children:"Cache hit rate"}),i.jsxs("span",{className:"kpi-value cyan",children:[d,"%"]}),i.jsxs("span",{className:"kpi-meta",children:[((T=t==null?void 0:t.cache)==null?void 0:T.exactCacheHits)??0," exact · ",((A=t==null?void 0:t.cache)==null?void 0:A.semanticCacheHits)??0," semantic"]})]}),i.jsxs("button",{type:"button",className:"overview-kpi",onClick:()=>e("checkpoints"),children:[i.jsx("span",{className:"kpi-label",children:"Checkpoints"}),i.jsx("span",{className:"kpi-value",children:(t==null?void 0:t.checkpointCount)??0}),i.jsx("span",{className:"kpi-meta",children:(P=t==null?void 0:t.checkpointSummary)!=null&&P.compressionRatio?`${t.checkpointSummary.compressionRatio}× avg compression`:"from Brain DB"})]}),i.jsxs("button",{type:"button",className:"overview-kpi",onClick:()=>e("cost"),children:[i.jsx("span",{className:"kpi-label",children:"Observed spend / est. avoided"}),i.jsxs("span",{className:"kpi-value",children:["$",f.toFixed(2),i.jsxs("span",{className:"kpi-split",children:[" / $",h.toFixed(2)]})]}),i.jsx("span",{className:"kpi-meta",children:(((b=($=t==null?void 0:t.cost)==null?void 0:$.actual)==null?void 0:b.source)||"no usage source")+" · avoided $ is estimated"})]})]}),i.jsxs("div",{className:"overview-panels",children:[i.jsxs("section",{className:"overview-card",children:[i.jsxs("header",{children:[i.jsx(_t,{size:16}),i.jsx("h3",{children:"Live signal"})]}),i.jsxs("dl",{className:"overview-dl",children:[i.jsxs("div",{children:[i.jsx("dt",{children:"Context retrievals"}),i.jsx("dd",{children:((Q=t==null?void 0:t.context)==null?void 0:Q.retrievals)??0})]}),i.jsxs("div",{children:[i.jsx("dt",{children:"Candidate → returned"}),i.jsxs("dd",{children:[gn((de=t==null?void 0:t.context)==null?void 0:de.candidateTokens)," →"," ",gn((L=t==null?void 0:t.context)==null?void 0:L.returnedTokens)]})]}),i.jsxs("div",{children:[i.jsx("dt",{children:"Project events"}),i.jsx("dd",{children:((t==null?void 0:t.eventCount)??0).toLocaleString()})]}),i.jsxs("div",{children:[i.jsx("dt",{children:"Tokens from cache"}),i.jsx("dd",{children:gn((U=t==null?void 0:t.cache)==null?void 0:U.tokensServedFromCache)})]})]}),i.jsxs("button",{type:"button",className:"overview-link",onClick:()=>e("audit"),children:["Open audit log ",i.jsx(Zn,{size:14})]})]}),i.jsxs("section",{className:"overview-card",children:[i.jsxs("header",{children:[i.jsx(lt,{size:16}),i.jsx("h3",{children:"How Rigour learns"})]}),i.jsxs("p",{className:"overview-learn-note",children:["Memory = stable facts agents wrote via ",i.jsx("code",{children:"rigour_remember"}),". Patterns = indexed symbols from scans (not a full training log). Enforcement + checkpoints show live governance learning."]}),i.jsxs("dl",{className:"overview-dl",children:[i.jsxs("div",{children:[i.jsx("dt",{children:"Memories"}),i.jsxs("dd",{children:[(t==null?void 0:t.memoryCount)??0,(W=t==null?void 0:t.memorySources)!=null&&W.length?` (${t.memorySources.join(" + ")})`:""]})]}),i.jsxs("div",{children:[i.jsx("dt",{children:"Pattern index"}),i.jsxs("dd",{children:[(t==null?void 0:t.patternCount)??0," patterns / ",(t==null?void 0:t.patternFiles)??0," files"]})]})]}),i.jsxs("div",{className:"overview-actions",children:[i.jsxs("button",{type:"button",className:"overview-link",onClick:()=>e("memory"),children:["Memory bank ",i.jsx(Zn,{size:14})]}),i.jsxs("button",{type:"button",className:"overview-link",onClick:()=>e("patterns"),children:["Patterns ",i.jsx(Zn,{size:14})]})]})]}),i.jsxs("section",{className:"overview-card",children:[i.jsxs("header",{children:[i.jsx(Ss,{size:16}),i.jsx("h3",{children:"Checkpoint compression"})]}),i.jsxs("dl",{className:"overview-dl",children:[i.jsxs("div",{children:[i.jsx("dt",{children:"Raw session state"}),i.jsx("dd",{children:gn((M=t==null?void 0:t.checkpointSummary)==null?void 0:M.rawStateTokens)})]}),i.jsxs("div",{children:[i.jsx("dt",{children:"Checkpoint packets"}),i.jsx("dd",{children:gn((z=t==null?void 0:t.checkpointSummary)==null?void 0:z.checkpointTokens)})]}),i.jsxs("div",{children:[i.jsx("dt",{children:"Replay avoided"}),i.jsx("dd",{className:"amber",children:gn((O=t==null?void 0:t.checkpointSummary)==null?void 0:O.replayTokensAvoided)})]})]}),i.jsxs("button",{type:"button",className:"overview-link",onClick:()=>e("checkpoints"),children:["Timeline ",i.jsx(Zn,{size:14})]})]}),i.jsxs("section",{className:"overview-card",children:[i.jsxs("header",{children:[i.jsx(br,{size:16}),i.jsx("h3",{children:"Where data lives"})]}),i.jsxs("dl",{className:"overview-dl paths",children:[i.jsxs("div",{children:[i.jsx("dt",{children:"Project"}),i.jsx("dd",{title:t==null?void 0:t.projectPath,children:(t==null?void 0:t.projectPath)||"—"})]}),i.jsxs("div",{children:[i.jsx("dt",{children:"Brain DB"}),i.jsx("dd",{title:t==null?void 0:t.brainDb,children:(t==null?void 0:t.brainDb)||"~/.rigour/rigour.db"})]})]}),i.jsxs("p",{className:"overview-hint",children:["Studio reads Brain SQLite for cost/cache/checkpoints and merges project + global"," ",i.jsx("code",{children:"memory.json"}),"."]})]})]}),i.jsxs("div",{className:"overview-quick-nav",children:[i.jsxs("button",{type:"button",onClick:()=>e("cost"),children:[i.jsx(_c,{size:16})," Cost & Context"]}),i.jsxs("button",{type:"button",onClick:()=>e("checkpoints"),children:[i.jsx(Ss,{size:16})," Checkpoints"]}),i.jsxs("button",{type:"button",onClick:()=>e("memory"),children:[i.jsx(lt,{size:16})," Memory"]}),i.jsxs("button",{type:"button",onClick:()=>e("patterns"),children:[i.jsx(Ir,{size:16})," Patterns"]})]})]})}const xk={register:"agents",scope:"cost",gates:"gates",checkpoint:"checkpoints",handoff:"handoffs",memory:"memory"},jk={register:i.jsx(ks,{size:16}),scope:i.jsx(e0,{size:16}),gates:i.jsx(ds,{size:16}),checkpoint:i.jsx(Ss,{size:16}),handoff:i.jsx(ro,{size:16}),memory:i.jsx(lt,{size:16})};function wk(e){switch(e){case"pass":return i.jsx(Sm,{size:14,className:"text-emerald"});case"warn":return i.jsx(_e,{size:14,className:"text-amber"});case"block":return i.jsx(_e,{size:14,className:"text-rose"});default:return i.jsx(Ai,{size:12,className:"text-dim"})}}function Sk({onNavigate:e}){var d;const[t,n]=j.useState(null),[s,r]=j.useState(!0),[o,a]=j.useState(null),l=async()=>{r(!0),a(null);try{const f=await fetch("/api/enforcement");if(!f.ok){let h="";if(f.status===404)try{const y=await fetch("/api/info").then(S=>S.ok?S.json():null);h=` API/UI mismatch — Studio shell is newer than the CLI serving /api (studioVersion=${(y==null?void 0:y.studioVersion)||(y==null?void 0:y.mcpVersion)||"unknown"}). Restart with the local 5.5.0+ CLI: \`node …/rigour-cli/dist/cli.js studio -p <port>\` and open http://127.0.0.1:<port>.`}catch{h=" Restart Studio with a CLI that includes /api/enforcement (5.5.0+)."}throw new Error(`HTTP ${f.status}.${h}`)}n(await f.json())}catch(f){a(f.message||"Failed to load enforcement")}finally{r(!1)}};j.useEffect(()=>{l();const f=setInterval(l,15e3);return()=>clearInterval(f)},[]);const c=(t==null?void 0:t.stages)||[],u=c.map((f,h)=>{if(h===0)return null;const y=c[h-1].count;return y<=0?null:Math.min(100,Math.round(f.count/y*100))});return i.jsxs("div",{className:"enforcement-view",children:[i.jsxs("div",{className:"panel-header enforcement-header",children:[i.jsxs("div",{className:"title",children:[i.jsx(ds,{size:18}),i.jsx("span",{children:"Enforcement Loop"})]}),i.jsxs("div",{className:"enforcement-header-meta",children:[(t==null?void 0:t.derived)&&i.jsx("span",{className:"meta-chip",children:"Derived from checkpoints"}),i.jsxs("span",{className:"meta-chip",children:[(t==null?void 0:t.agentCount)??0," agents"]}),i.jsx("button",{type:"button",className:"icon-btn",onClick:l,"aria-label":"Refresh enforcement",children:i.jsx(Le,{size:14,className:s?"spinning":""})})]})]}),i.jsx("p",{className:"enforcement-lead",children:"How Rigour bounds agents: register scope, constrain context, run gates, compress checkpoints, verify handoffs, and store stable memory — for any MCP client."}),o&&i.jsxs("div",{className:"cost-banner",role:"alert",children:[i.jsx(_e,{size:18,className:"text-rose"}),i.jsxs("div",{children:[i.jsx("strong",{children:"Could not load enforcement"}),i.jsx("p",{children:o})]})]}),s&&!t&&i.jsx("div",{className:"enforcement-skeleton","aria-busy":"true",children:Array.from({length:6}).map((f,h)=>i.jsx("div",{className:"skeleton-card"},h))}),c.length>0&&i.jsxs(i.Fragment,{children:[i.jsx("ol",{className:"enforcement-rail","aria-label":"Enforcement stages",children:c.map((f,h)=>i.jsxs("li",{className:`enforcement-stage status-${f.status}`,children:[h>0&&i.jsx("div",{className:"stage-connector","aria-hidden":"true",children:u[h]!=null&&i.jsxs("span",{className:"conversion",children:[u[h],"%"]})}),i.jsxs("button",{type:"button",className:"stage-card glass-card",onClick:()=>e==null?void 0:e(xk[f.id]||"overview"),children:[i.jsxs("div",{className:"stage-top",children:[i.jsx("span",{className:"stage-icon",children:jk[f.id]}),wk(f.status)]}),i.jsx("div",{className:"stage-label",children:f.label}),i.jsx("div",{className:"stage-count",children:f.count}),i.jsx("div",{className:"stage-detail",children:f.detail})]})]},f.id))}),i.jsx("ul",{className:"enforcement-list-fallback",children:c.map(f=>i.jsxs("li",{children:[i.jsx("strong",{children:f.label}),": ",f.count," — ",f.detail," (",f.status,")"]},`list-${f.id}`))})]}),i.jsxs("div",{className:"enforcement-timeline glass-card",children:[i.jsx("h3",{children:"Recent enforcement events"}),(d=t==null?void 0:t.timeline)!=null&&d.length?i.jsx("ul",{children:t.timeline.slice(0,12).map((f,h)=>i.jsxs("li",{children:[i.jsx("span",{className:`tl-type type-${f.type}`,children:f.type}),i.jsx("span",{className:"tl-summary",children:f.summary}),i.jsxs("span",{className:"tl-meta mono",children:[f.agentId||"—",f.timestamp?` · ${new Date(f.timestamp).toLocaleTimeString()}`:""]})]},`${f.type}-${h}`))}):i.jsx("p",{className:"empty-inline",children:"No gate/checkpoint/handoff events yet. Drive agents through MCP tools."})]})]})}function kk(){const[e,t]=j.useState([]),[n,s]=j.useState(!0),r=async()=>{s(!0);try{const a=await(await fetch("/api/handoffs")).json();t(Array.isArray(a.handoffs)?a.handoffs:[])}catch(o){console.error("Failed to load handoffs",o)}finally{s(!1)}};return j.useEffect(()=>{r()},[]),!n&&e.length===0?i.jsxs("div",{className:"empty-state glass-card",children:[i.jsx(ro,{size:48}),i.jsx("h3",{children:"No Handoffs Yet"}),i.jsxs("p",{children:["Compress state with ",i.jsx("code",{children:"rigour_checkpoint"}),", then transfer with"," ",i.jsx("code",{children:"rigour_handoff"}),". The receiving agent accepts via ",i.jsx("code",{children:"rigour_handoff_accept"}),"."]}),i.jsx("div",{className:"hint-box",children:i.jsx("span",{children:"Verified handoffs carry checkpoint packets — not parent transcripts."})})]}):i.jsxs("div",{className:"handoff-flow",children:[i.jsxs("div",{className:"panel-header",children:[i.jsxs("div",{className:"title",children:[i.jsx(ro,{size:18}),i.jsx("span",{children:"Agent Handoffs"})]}),i.jsx("button",{type:"button",className:"icon-btn",onClick:r,"aria-label":"Refresh handoffs",children:i.jsx(Le,{size:14,className:n?"spinning":""})})]}),i.jsx("div",{className:"handoff-list",children:e.map(o=>{const a=o.status==="accepted"||!!o.acceptedAt;return i.jsxs("article",{className:`handoff-card glass-card ${a?"accepted":"pending"}`,children:[i.jsxs("div",{className:"handoff-status",children:[a?i.jsxs("span",{className:"status-pill pass",children:[i.jsx(Sm,{size:12})," Accepted"]}):i.jsxs("span",{className:"status-pill warn",children:[i.jsx(zn,{size:12})," Pending"]}),i.jsx("span",{className:"mono dim",children:o.handoffId})]}),i.jsxs("div",{className:"handoff-flow-row",children:[i.jsxs("div",{className:"handoff-agent",children:[i.jsx(ks,{size:14}),i.jsx("code",{children:o.fromAgentId})]}),i.jsx(Zn,{size:16,className:"text-cyan"}),i.jsxs("div",{className:"handoff-packet",children:[i.jsx(u0,{size:14}),i.jsx("span",{children:o.contextTokens!=null?`${o.contextTokens} tok`:"packet"})]}),i.jsx(Zn,{size:16,className:"text-cyan"}),i.jsxs("div",{className:"handoff-agent",children:[i.jsx(ks,{size:14}),i.jsx("code",{children:o.toAgentId})]})]}),o.taskDescription&&i.jsx("p",{className:"handoff-task",children:o.taskDescription}),o.filesInScope&&o.filesInScope.length>0&&i.jsxs("div",{className:"handoff-files",children:[o.filesInScope.slice(0,4).map(l=>i.jsx("code",{children:l},l)),o.filesInScope.length>4&&i.jsxs("span",{className:"dim",children:["+",o.filesInScope.length-4," more"]})]})]},o.handoffId)})})]})}function Nk({onNavigate:e}){var h,y;const[t,n]=j.useState(null),[s,r]=j.useState(!0),[o,a]=j.useState(null),l=async()=>{r(!0),a(null);try{const x=await fetch("/api/overview");if(!x.ok)throw new Error(`HTTP ${x.status}`);n(await x.json())}catch(x){a(x.message||"Failed to load learning signals")}finally{r(!1)}};j.useEffect(()=>{l()},[]);const c=t==null?void 0:t.cache,u=((c==null?void 0:c.exactCacheHits)??0)+((c==null?void 0:c.semanticCacheHits)??0)+((c==null?void 0:c.partialCacheHits)??0),d=(c==null?void 0:c.cacheMisses)??0,f=Math.round(((c==null?void 0:c.hitRate)??0)*100);return i.jsxs("div",{className:"learning-brain",children:[i.jsxs("div",{className:"panel-header",children:[i.jsxs("div",{className:"title",children:[i.jsx(lt,{size:18}),i.jsx("span",{children:"How Rigour Learns"})]}),i.jsx("button",{type:"button",className:"icon-btn",onClick:l,"aria-label":"Refresh learning",children:i.jsx(Le,{size:14,className:s?"spinning":""})})]}),i.jsx("p",{className:"enforcement-lead",children:"Scans feed the pattern index; agents write stable memory; context scope + cache reuse cut reread cost; checkpoints compress handoffs. This is governance learning — not model fine-tuning."}),o&&i.jsxs("div",{className:"cost-banner",role:"alert",children:[i.jsx(Pr,{size:18,className:"text-rose"}),i.jsxs("div",{children:[i.jsx("strong",{children:"Could not load learning signals"}),i.jsx("p",{children:o})]})]}),i.jsxs("div",{className:"learning-grid",children:[i.jsxs("article",{className:"glass-card learning-card",children:[i.jsxs("header",{children:[i.jsx(d0,{size:16,className:"text-cyan"}),i.jsx("h3",{children:"Pattern index (from scans)"})]}),i.jsx("div",{className:"learning-kpi",children:(t==null?void 0:t.patternCount)??0}),i.jsxs("p",{className:"dim",children:[(t==null?void 0:t.patternFiles)??0," files indexed. Refresh with ",i.jsx("code",{children:"rigour index"})," after large refactors."]}),i.jsx("button",{type:"button",className:"overview-link",onClick:()=>e==null?void 0:e("patterns"),children:"Open Pattern Index"})]}),i.jsxs("article",{className:"glass-card learning-card",children:[i.jsxs("header",{children:[i.jsx(f0,{size:16,className:"text-amber"}),i.jsx("h3",{children:"Stable memory"})]}),i.jsx("div",{className:"learning-kpi",children:(t==null?void 0:t.memoryCount)??0}),i.jsxs("p",{className:"dim",children:["Deliberate facts via ",i.jsx("code",{children:"rigour_remember"}),(h=t==null?void 0:t.memorySources)!=null&&h.length?` · ${t.memorySources.join(" + ")}`:"",". Not a scan log."]}),i.jsx("button",{type:"button",className:"overview-link",onClick:()=>e==null?void 0:e("memory"),children:"Open Memory Bank"})]}),i.jsxs("article",{className:"glass-card learning-card",children:[i.jsxs("header",{children:[i.jsx(Ir,{size:16,className:"text-emerald"}),i.jsx("h3",{children:"Context cache power"})]}),i.jsxs("div",{className:"learning-kpi text-cyan",children:[f,"%"]}),i.jsxs("p",{className:"dim",children:[u," hits (",(c==null?void 0:c.exactCacheHits)??0," exact · ",(c==null?void 0:c.semanticCacheHits)??0," semantic ·"," ",(c==null?void 0:c.partialCacheHits)??0," partial) / ",d," misses · ",((y=t==null?void 0:t.context)==null?void 0:y.retrievals)??0," ","retrievals"]}),i.jsx("button",{type:"button",className:"overview-link",onClick:()=>e==null?void 0:e("cost"),children:"Open Cost & Context"})]}),i.jsxs("article",{className:"glass-card learning-card",children:[i.jsxs("header",{children:[i.jsx(lt,{size:16,className:"text-purple"}),i.jsx("h3",{children:"Governance trail"})]}),i.jsx("div",{className:"learning-kpi",children:(t==null?void 0:t.checkpointCount)??0}),i.jsxs("p",{className:"dim",children:["Checkpoints compressed · ",((t==null?void 0:t.eventCount)??0).toLocaleString()," project events in"," ",i.jsx("code",{children:".rigour/events.jsonl"})," / Brain DB."]}),i.jsx("button",{type:"button",className:"overview-link",onClick:()=>e==null?void 0:e("enforcement"),children:"Open Enforcement Loop"})]})]})]})}function Ck({data:e}){const t=e.mediation;return i.jsxs("div",{className:"audit-stats",children:[i.jsxs("div",{className:"stat-pill",children:[i.jsx(jm,{size:14})," Fail-closed: ",e.failClosed?"ON":"OFF"]}),i.jsxs("div",{className:"stat-pill",children:["Status: ",(t==null?void 0:t.status)||"unknown"]}),i.jsxs("div",{className:"stat-pill",children:["Typed cmds: ",String((t==null?void 0:t.typedCommands)??"—")]}),i.jsxs("div",{className:"stat-pill",children:["Scope: ",String((t==null?void 0:t.scopeEnforcement)??"—")]}),i.jsxs("div",{className:"stat-pill",children:["Hooks: ",t!=null&&t.hooksInstalled?"installed":"missing"]}),i.jsxs("div",{className:"stat-pill",children:["MCP gateway: ",t!=null&&t.mcpGateway?"ON":"not wired"]}),i.jsxs("div",{className:"stat-pill",children:["Arbitration: ",(t==null?void 0:t.arbitration)||"—"]})]})}function Tk({current:e}){var t,n;return i.jsxs("div",{className:"glass-card",style:{marginTop:16,padding:16},children:[i.jsxs("h3",{children:[i.jsx(zn,{size:16})," Current transaction"]}),!e&&i.jsxs("p",{style:{opacity:.7},children:["No active transaction. Run ",i.jsx("code",{children:"rigour firewall transact"}),"."]}),e&&i.jsxs("div",{children:[i.jsx("code",{children:e.id})," — ",i.jsx("strong",{children:e.status}),i.jsxs("div",{style:{marginTop:8,opacity:.8},children:["Scope: ",((t=e.scope)==null?void 0:t.join(", "))||"—"]}),i.jsxs("div",{style:{opacity:.8},children:["Files: ",((n=e.filesChanged)==null?void 0:n.length)??0,e.budgets?` / max ${e.budgets.maxFiles}`:""]}),e.worktreePath&&i.jsxs("div",{style:{fontSize:12,opacity:.7},children:["Worktree: ",e.worktreePath]})]})]})}function Pk({attestation:e,valid:t}){return i.jsxs("div",{className:"glass-card",style:{marginTop:16,padding:16},children:[i.jsxs("h3",{children:[i.jsx(s0,{size:16})," Attestation"]}),!e&&i.jsx("p",{style:{opacity:.7},children:"No attestation yet."}),e&&i.jsxs("div",{children:[i.jsxs("div",{children:[t?i.jsx(yt,{size:14,color:"#34d399"}):i.jsx(jm,{size:14,color:"#f87171"})," ","Signature ",t?"valid":"invalid"," — gates ",e.gateResults.status]}),i.jsxs("div",{style:{fontSize:12,opacity:.75,marginTop:6},children:["policy=",e.policyHash," digest=",e.artifactDigest.slice(0,16),"…"]})]})]})}function oh({title:e,empty:t,items:n}){return i.jsxs("div",{className:"glass-card",style:{marginTop:16,padding:16},children:[i.jsx("h3",{children:e}),n.length===0&&i.jsx("p",{style:{opacity:.7},children:t}),i.jsx("ul",{style:{listStyle:"none",padding:0,margin:0},children:n.map((s,r)=>i.jsxs("li",{style:{padding:"8px 0",borderBottom:"1px solid rgba(127,127,127,0.2)"},children:[i.jsx("strong",{children:s.primary})," — ",s.secondary]},r))})]})}function Ek(){const[e,t]=j.useState(null),[n,s]=j.useState(null),[r,o]=j.useState(!0),a=async()=>{o(!0),s(null);try{const u=await fetch("/api/firewall");if(!u.ok)throw new Error(`HTTP ${u.status}`);const d=await u.json();if(d.error)throw new Error(d.error);t(d)}catch(u){s(u.message||"Failed to load firewall status")}finally{o(!1)}};if(j.useEffect(()=>{a();const u=setInterval(a,5e3);return()=>clearInterval(u)},[]),r&&!e)return i.jsxs("div",{className:"empty-state glass-card",children:[i.jsx(Le,{className:"spin"})," Loading firewall…"]});if(n)return i.jsxs("div",{className:"empty-state glass-card",children:[i.jsx(_e,{})," ",n]});if(!e)return null;const l=(e.decisions||[]).slice(0,30).map(u=>({primary:`${u.decision}${u.ruleId?` (${u.ruleId})`:""}`,secondary:u.reason})),c=(e.recentDenies||[]).slice(0,20).map(u=>({primary:u.decision||u.type||"deny",secondary:u.reason||u.command||"—"}));return i.jsxs("div",{className:"firewall-console",children:[i.jsxs("div",{className:"audit-header",children:[i.jsxs("div",{className:"audit-title",children:[i.jsx(fs,{size:24}),i.jsx("h2",{children:"Agent Transaction Firewall"})]}),i.jsxs("button",{className:"btn-secondary",onClick:a,children:[i.jsx(Le,{size:16})," Refresh"]})]}),i.jsx(Ck,{data:e}),i.jsx(Tk,{current:e.current}),i.jsx(Pk,{attestation:e.attestation,valid:e.attestationValid}),i.jsxs("div",{className:"glass-card",style:{marginTop:16,padding:16},children:[i.jsx("h3",{children:"Adversarial replay"}),e.adversarial?i.jsxs("div",{children:[i.jsx("strong",{children:e.adversarial.passed})," passed / ",i.jsx("strong",{children:e.adversarial.failed})," failed"]}):i.jsxs("p",{style:{opacity:.7},children:["Run ",i.jsx("code",{children:"rigour firewall adversarial"}),"."]})]}),i.jsx(oh,{title:"Capability / policy decisions",empty:"No broker decisions logged yet.",items:l}),i.jsx(oh,{title:"Recent denies",empty:"No firewall denies in the event stream.",items:c})]})}const $s={initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.28,ease:[.16,1,.3,1]}};function Mk(){var O,R,F,re;const[e,t]=j.useState(()=>localStorage.getItem("rigour-theme")||"dark"),[n,s]=j.useState("enforcement"),[r,o]=j.useState([]),[a,l]=j.useState(null),[c,u]=j.useState(null),[d,f]=j.useState(!1),[h,y]=j.useState(null),[x,S]=j.useState([]),[C,m]=j.useState(null);We.useEffect(()=>{const _=new EventSource("/api/events");return _.onmessage=B=>{try{const K=JSON.parse(B.data);o(fe=>[K,...fe].slice(0,100))}catch(K){console.error("Failed to parse event",K)}},fetch("/api/tree").then(B=>B.json()).then(S).catch(B=>console.error("Failed to fetch tree",B)),fetch("/api/info").then(B=>B.json()).then(m).catch(B=>console.error("Failed to fetch info",B)),()=>_.close()},[]),j.useEffect(()=>{if(!c||c.type!=="interception_requested"||!d){y(null);return}const _=c.timestamp?Date.parse(c.timestamp):Date.now(),B=()=>{const fe=Math.floor((Date.now()-_)/1e3),Pt=Math.max(0,60-fe);y(Pt)};B();const K=setInterval(B,1e3);return()=>clearInterval(K)},[c,d]),j.useEffect(()=>{document.documentElement.setAttribute("data-theme",e),localStorage.setItem("rigour-theme",e)},[e]);const p=()=>t(_=>_==="dark"?"light":"dark"),[v,w]=j.useState(""),[g,k]=j.useState({}),[N,T]=j.useState({}),[A,P]=j.useState(null),[$,b]=j.useState(null);j.useEffect(()=>{(async()=>{try{const[B,K,fe,Pt,Kr]=await Promise.all([fetch("/api/config").then(Be=>Be.ok?Be.text():""),fetch("/api/memory").then(Be=>Be.json()),fetch("/api/index-stats").then(Be=>Be.json()),fetch("/api/agents").then(Be=>Be.json()),fetch("/api/checkpoints").then(Be=>Be.json())]);w(B),k(K),T(fe),P(Pt),b(Kr)}catch(B){console.error("Failed to fetch meta data",B)}})()},[]);const Q=async _=>{try{const B=_.replace(/\s*\(\d+\s*lines\)$/,""),fe=await(await fetch(`/api/file?path=${encodeURIComponent(B)}`)).text();l({filename:B,original:fe,modified:fe})}catch(B){console.error("Failed to fetch file content",B)}},de=async _=>{if(c)try{await fetch("/api/arbitrate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({requestId:c.requestId||c.id,decision:_,token:c.arbitrationToken,timestamp:new Date().toISOString()})}),o(B=>B.map(K=>(K.requestId||K.id)===(c.requestId||c.id)?{...K,status:_==="approve"?"success":"error",arbitrated:!0,decision:_}:K)),f(!1),u(null)}catch(B){console.error("Arbitration failed",B)}},L=[{id:"enforcement",label:"Enforcement",icon:ds},{id:"firewall",label:"Firewall",icon:Sl},{id:"learning",label:"Learning",icon:lt},{id:"overview",label:"Overview",icon:km},{id:"agents",label:"Agent Teams",icon:ks},{id:"handoffs",label:"Handoffs",icon:ro},{id:"checkpoints",label:"Checkpoints",icon:Ss},{id:"memory",label:"Memory Bank",icon:Jx},{id:"cost",label:"Cost & Context",icon:_c},{id:"audit",label:"Audit Log",icon:oo},{id:"gates",label:"Quality Gates",icon:_t},{id:"patterns",label:"Pattern Index",icon:Ir},{id:"deep",label:"Deep Analysis",icon:lt},{id:"drift",label:"Temporal Drift",icon:zc}],U=(C==null?void 0:C.studioVersion)||(C==null?void 0:C.mcpVersion)||"—",W=(C==null?void 0:C.projectVersion)||(C==null?void 0:C.version)||"—",M=(C==null?void 0:C.projectName)||(C==null?void 0:C.name)||"project",z=(C==null?void 0:C.projectPath)||(C==null?void 0:C.path)||"";return i.jsxs("div",{className:"studio",children:[i.jsxs("div",{className:"cinema-ambient","aria-hidden":"true",children:[i.jsx("div",{className:"ambient-blob blob-a"}),i.jsx("div",{className:"ambient-blob blob-b"})]}),i.jsxs("aside",{className:"sidebar glass-shell",children:[i.jsxs("div",{className:"brand",children:[i.jsx("div",{className:"logo-icon",children:i.jsx(ds,{size:18})}),i.jsx("span",{children:"Rigour Studio"}),i.jsxs("div",{className:"version-pill",children:["v",U]})]}),i.jsx("nav",{children:L.map(_=>i.jsxs("button",{className:`nav-item ${n===_.id?"active":""}`,onClick:()=>s(_.id),children:[i.jsx(_.icon,{size:18}),i.jsx("span",{children:_.label}),n===_.id&&i.jsx(Ae.div,{layoutId:"nav-glow",className:"nav-glow"})]},_.id))}),i.jsxs("div",{className:"sidebar-footer",children:[i.jsxs("div",{className:"trust-indicator",children:[i.jsx(Sl,{size:14}),i.jsx("span",{children:"Local Governance"})]}),i.jsx("button",{className:"footer-item",children:i.jsx(Nm,{size:18})}),i.jsx("button",{className:"footer-item",children:i.jsx(o0,{size:18})})]})]}),i.jsxs("main",{className:"main-content",children:[i.jsxs("header",{className:"glass-shell",children:[i.jsx("div",{className:"header-left",children:C&&i.jsxs("div",{className:"project-identity",children:[i.jsx(br,{size:14,className:"folder-icon"}),i.jsx("span",{className:"project-name",children:M}),i.jsxs("span",{className:"project-version-pill",children:["v",W]}),i.jsx("span",{className:"project-path",children:z})]})}),i.jsxs("div",{className:"header-right",children:[i.jsx("div",{className:"connection-status",children:i.jsxs("div",{className:"status-indicator",children:[i.jsx("div",{className:"pulse-emitter"}),i.jsx("span",{children:"LIVE"})]})}),i.jsx("button",{className:"theme-toggle",onClick:p,"aria-label":"Toggle theme",children:e==="dark"?i.jsx(h0,{size:18}):i.jsx(c0,{size:18})})]})]}),i.jsxs("div",{className:"view-container",children:[i.jsxs(j0,{mode:"wait",children:[n==="enforcement"&&i.jsx(Ae.div,{...$s,className:"full-view",children:i.jsx(Sk,{onNavigate:s})},"enforcement"),n==="firewall"&&i.jsx(Ae.div,{...$s,className:"full-view",children:i.jsx(Ek,{})},"firewall"),n==="learning"&&i.jsx(Ae.div,{...$s,className:"full-view",children:i.jsx(Nk,{onNavigate:s})},"learning"),n==="overview"&&i.jsx(Ae.div,{...$s,className:"full-view",children:i.jsx(gk,{onNavigate:s})},"overview"),n==="handoffs"&&i.jsx(Ae.div,{...$s,className:"full-view",children:i.jsx(kk,{})},"handoffs"),n==="audit"&&i.jsx(Ae.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"full-view",children:i.jsx(ok,{logs:r,onClearLogs:()=>o([]),onSelectLog:_=>{var B,K,fe;if(u(_),_!=null&&_._rigour_report||(_==null?void 0:_.type)==="interception_requested"){if(_!=null&&_._rigour_report){const Pt=(fe=(K=(B=_._rigour_report.failures)==null?void 0:B[0])==null?void 0:K.files)==null?void 0:fe[0];Pt?Q(Pt):l(null)}else l(null);f(!0)}else l(null),f(!1)},selectedLog:c})},"audit"),n==="gates"&&i.jsx(Ae.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"full-view",children:i.jsx(ik,{})},"gates"),n==="deep"&&i.jsx(Ae.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"full-view",children:i.jsx(hk,{})},"deep"),n==="drift"&&i.jsx(Ae.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"full-view",children:i.jsx(vk,{})},"drift"),n==="patterns"&&i.jsx(Ae.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"full-view",children:i.jsx(rk,{})},"patterns"),n==="memory"&&i.jsx(Ae.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"full-view",children:i.jsx(sk,{})},"memory"),n==="agents"&&i.jsx(Ae.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"full-view",children:i.jsx(uk,{session:A})},"agents"),n==="checkpoints"&&i.jsx(Ae.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"full-view",children:i.jsx(dk,{checkpoints:($==null?void 0:$.checkpoints)||[]})},"checkpoints"),n==="cost"&&i.jsx(Ae.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"full-view",children:i.jsx(yk,{})},"cost")]}),c&&d&&i.jsx("div",{className:"governance-overlay",children:i.jsxs("div",{className:"governance-window",children:[i.jsxs("div",{className:"governance-header",children:[i.jsxs("div",{className:"title",children:[i.jsx(ds,{size:20}),i.jsxs("span",{children:["Governance Audit: ",c.tool]})]}),i.jsxs("div",{className:"hitl-actions",children:[c.type==="interception_requested"&&i.jsxs(i.Fragment,{children:[i.jsxs("button",{className:"btn-approve",onClick:()=>de("approve"),children:[i.jsx(yt,{size:16})," Approve"]}),i.jsxs("button",{className:"btn-reject",onClick:()=>de("reject"),children:[i.jsx(ws,{size:16})," Reject"]}),i.jsx("div",{className:"divider"})]}),i.jsx("button",{onClick:()=>f(!1),className:"close-btn",children:i.jsx(Vc,{size:20})})]})]}),i.jsx("div",{className:"governance-body",children:c.type==="interception_requested"?i.jsxs("div",{className:"interception-view",children:[i.jsxs("div",{className:"interception-card",children:[i.jsx(oo,{size:48}),i.jsx("h4",{children:"Command Intercepted"}),i.jsx("div",{className:"command-box",children:i.jsx("code",{children:c.command})}),i.jsx("p",{children:"An AI agent is requesting to execute this command. Review the project state below before arbitrating."}),i.jsxs("div",{className:"warning-note",children:[i.jsx(_e,{size:16}),i.jsxs("span",{children:["Fail-closed: auto-DENY in ",h??60,"s if no decision. Silent approve is disabled."]})]}),c.firewallDecision&&c.firewallDecision!=="allow"&&i.jsxs("div",{className:"warning-note",children:[i.jsx(ws,{size:16}),i.jsxs("span",{children:["Pre-check: ",c.firewallDecision," — ",c.firewallReason]})]})]}),i.jsx(sh,{files:x.map(_=>_.replace(/\s*\(\d+\s*lines\)$/,"")),onSelect:_=>Q(_),activeFile:a==null?void 0:a.filename,violatedFiles:[]})]}):i.jsxs(i.Fragment,{children:[i.jsx(sh,{files:(((R=(O=c._rigour_report)==null?void 0:O.failures)==null?void 0:R.flatMap(_=>_.files||[]))||x).map(_=>_.replace(/\s*\(\d+\s*lines\)$/,"")),onSelect:_=>Q(_),activeFile:a==null?void 0:a.filename,violatedFiles:(((re=(F=c._rigour_report)==null?void 0:F.failures)==null?void 0:re.flatMap(_=>_.files||[]))||[]).map(_=>_.replace(/\s*\(\d+\s*lines\)$/,""))}),i.jsx("div",{className:"diff-view-area",children:a?i.jsx(tk,{filename:a.filename,originalCode:a.original,modifiedCode:a.modified,onClose:()=>l(null),theme:e}):i.jsxs("div",{className:"diff-placeholder",children:[i.jsx(_t,{size:48}),i.jsx("p",{children:"Select a file to audit the proposed changes"})]})})]})})]})})]})]})]})}Ma.createRoot(document.getElementById("root")).render(i.jsx(We.StrictMode,{children:i.jsx(Mk,{})}));
|