@superclawd-ai/fda 0.1.3 → 0.1.5
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/README.md +2 -1
- package/dist/assets/index-CqPPO_KN.js +311 -0
- package/dist/assets/index-CzhFIZ5v.css +1 -0
- package/dist/index.html +2 -2
- package/dist-server/cli.mjs +123 -118
- package/dist-server/index.mjs +96 -91
- package/package.json +1 -1
- package/scripts/install.sh +13 -4
- package/dist/assets/index-SxySD90C.css +0 -1
- package/dist/assets/index-sm_zmMY2.js +0 -311
|
@@ -1,311 +0,0 @@
|
|
|
1
|
-
var tx=Object.defineProperty;var wp=n=>{throw TypeError(n)};var nx=(n,r,a)=>r in n?tx(n,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):n[r]=a;var $i=(n,r,a)=>nx(n,typeof r!="symbol"?r+"":r,a),Dc=(n,r,a)=>r.has(n)||wp("Cannot "+a);var C=(n,r,a)=>(Dc(n,r,"read from private field"),a?a.call(n):r.get(n)),ke=(n,r,a)=>r.has(n)?wp("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(n):r.set(n,a),ee=(n,r,a,o)=>(Dc(n,r,"write to private field"),o?o.call(n,a):r.set(n,a),a),De=(n,r,a)=>(Dc(n,r,"access private method"),a);var ko=(n,r,a,o)=>({set _(u){ee(n,r,u,a)},get _(){return C(n,r,o)}});(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))o(u);new MutationObserver(u=>{for(const d of u)if(d.type==="childList")for(const h of d.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&o(h)}).observe(document,{childList:!0,subtree:!0});function a(u){const d={};return u.integrity&&(d.integrity=u.integrity),u.referrerPolicy&&(d.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?d.credentials="include":u.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function o(u){if(u.ep)return;u.ep=!0;const d=a(u);fetch(u.href,d)}})();function qm(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Oc={exports:{}},qi={},Fc={exports:{}},$e={};/**
|
|
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 kp;function rx(){if(kp)return $e;kp=1;var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),d=Symbol.for("react.provider"),h=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),w=Symbol.iterator;function x(M){return M===null||typeof M!="object"?null:(M=w&&M[w]||M["@@iterator"],typeof M=="function"?M:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},L=Object.assign,R={};function N(M,q,je){this.props=M,this.context=q,this.refs=R,this.updater=je||b}N.prototype.isReactComponent={},N.prototype.setState=function(M,q){if(typeof M!="object"&&typeof M!="function"&&M!=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,M,q,"setState")},N.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function T(){}T.prototype=N.prototype;function z(M,q,je){this.props=M,this.context=q,this.refs=R,this.updater=je||b}var $=z.prototype=new T;$.constructor=z,L($,N.prototype),$.isPureReactComponent=!0;var Q=Array.isArray,J=Object.prototype.hasOwnProperty,se={current:null},A={key:!0,ref:!0,__self:!0,__source:!0};function B(M,q,je){var ve,xe={},Se=null,Oe=null;if(q!=null)for(ve in q.ref!==void 0&&(Oe=q.ref),q.key!==void 0&&(Se=""+q.key),q)J.call(q,ve)&&!A.hasOwnProperty(ve)&&(xe[ve]=q[ve]);var He=arguments.length-2;if(He===1)xe.children=je;else if(1<He){for(var Me=Array(He),It=0;It<He;It++)Me[It]=arguments[It+2];xe.children=Me}if(M&&M.defaultProps)for(ve in He=M.defaultProps,He)xe[ve]===void 0&&(xe[ve]=He[ve]);return{$$typeof:n,type:M,key:Se,ref:Oe,props:xe,_owner:se.current}}function pe(M,q){return{$$typeof:n,type:M.type,key:q,ref:M.ref,props:M.props,_owner:M._owner}}function Z(M){return typeof M=="object"&&M!==null&&M.$$typeof===n}function ze(M){var q={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(je){return q[je]})}var Xe=/\/+/g;function tt(M,q){return typeof M=="object"&&M!==null&&M.key!=null?ze(""+M.key):q.toString(36)}function pt(M,q,je,ve,xe){var Se=typeof M;(Se==="undefined"||Se==="boolean")&&(M=null);var Oe=!1;if(M===null)Oe=!0;else switch(Se){case"string":case"number":Oe=!0;break;case"object":switch(M.$$typeof){case n:case r:Oe=!0}}if(Oe)return Oe=M,xe=xe(Oe),M=ve===""?"."+tt(Oe,0):ve,Q(xe)?(je="",M!=null&&(je=M.replace(Xe,"$&/")+"/"),pt(xe,q,je,"",function(It){return It})):xe!=null&&(Z(xe)&&(xe=pe(xe,je+(!xe.key||Oe&&Oe.key===xe.key?"":(""+xe.key).replace(Xe,"$&/")+"/")+M)),q.push(xe)),1;if(Oe=0,ve=ve===""?".":ve+":",Q(M))for(var He=0;He<M.length;He++){Se=M[He];var Me=ve+tt(Se,He);Oe+=pt(Se,q,je,Me,xe)}else if(Me=x(M),typeof Me=="function")for(M=Me.call(M),He=0;!(Se=M.next()).done;)Se=Se.value,Me=ve+tt(Se,He++),Oe+=pt(Se,q,je,Me,xe);else if(Se==="object")throw q=String(M),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.");return Oe}function Re(M,q,je){if(M==null)return M;var ve=[],xe=0;return pt(M,ve,"","",function(Se){return q.call(je,Se,xe++)}),ve}function Pe(M){if(M._status===-1){var q=M._result;q=q(),q.then(function(je){(M._status===0||M._status===-1)&&(M._status=1,M._result=je)},function(je){(M._status===0||M._status===-1)&&(M._status=2,M._result=je)}),M._status===-1&&(M._status=0,M._result=q)}if(M._status===1)return M._result.default;throw M._result}var ye={current:null},G={transition:null},ne={ReactCurrentDispatcher:ye,ReactCurrentBatchConfig:G,ReactCurrentOwner:se};function U(){throw Error("act(...) is not supported in production builds of React.")}return $e.Children={map:Re,forEach:function(M,q,je){Re(M,function(){q.apply(this,arguments)},je)},count:function(M){var q=0;return Re(M,function(){q++}),q},toArray:function(M){return Re(M,function(q){return q})||[]},only:function(M){if(!Z(M))throw Error("React.Children.only expected to receive a single React element child.");return M}},$e.Component=N,$e.Fragment=a,$e.Profiler=u,$e.PureComponent=z,$e.StrictMode=o,$e.Suspense=g,$e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ne,$e.act=U,$e.cloneElement=function(M,q,je){if(M==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+M+".");var ve=L({},M.props),xe=M.key,Se=M.ref,Oe=M._owner;if(q!=null){if(q.ref!==void 0&&(Se=q.ref,Oe=se.current),q.key!==void 0&&(xe=""+q.key),M.type&&M.type.defaultProps)var He=M.type.defaultProps;for(Me in q)J.call(q,Me)&&!A.hasOwnProperty(Me)&&(ve[Me]=q[Me]===void 0&&He!==void 0?He[Me]:q[Me])}var Me=arguments.length-2;if(Me===1)ve.children=je;else if(1<Me){He=Array(Me);for(var It=0;It<Me;It++)He[It]=arguments[It+2];ve.children=He}return{$$typeof:n,type:M.type,key:xe,ref:Se,props:ve,_owner:Oe}},$e.createContext=function(M){return M={$$typeof:h,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},M.Provider={$$typeof:d,_context:M},M.Consumer=M},$e.createElement=B,$e.createFactory=function(M){var q=B.bind(null,M);return q.type=M,q},$e.createRef=function(){return{current:null}},$e.forwardRef=function(M){return{$$typeof:p,render:M}},$e.isValidElement=Z,$e.lazy=function(M){return{$$typeof:y,_payload:{_status:-1,_result:M},_init:Pe}},$e.memo=function(M,q){return{$$typeof:m,type:M,compare:q===void 0?null:q}},$e.startTransition=function(M){var q=G.transition;G.transition={};try{M()}finally{G.transition=q}},$e.unstable_act=U,$e.useCallback=function(M,q){return ye.current.useCallback(M,q)},$e.useContext=function(M){return ye.current.useContext(M)},$e.useDebugValue=function(){},$e.useDeferredValue=function(M){return ye.current.useDeferredValue(M)},$e.useEffect=function(M,q){return ye.current.useEffect(M,q)},$e.useId=function(){return ye.current.useId()},$e.useImperativeHandle=function(M,q,je){return ye.current.useImperativeHandle(M,q,je)},$e.useInsertionEffect=function(M,q){return ye.current.useInsertionEffect(M,q)},$e.useLayoutEffect=function(M,q){return ye.current.useLayoutEffect(M,q)},$e.useMemo=function(M,q){return ye.current.useMemo(M,q)},$e.useReducer=function(M,q,je){return ye.current.useReducer(M,q,je)},$e.useRef=function(M){return ye.current.useRef(M)},$e.useState=function(M){return ye.current.useState(M)},$e.useSyncExternalStore=function(M,q,je){return ye.current.useSyncExternalStore(M,q,je)},$e.useTransition=function(){return ye.current.useTransition()},$e.version="18.3.1",$e}var bp;function Nd(){return bp||(bp=1,Fc.exports=rx()),Fc.exports}/**
|
|
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 jp;function sx(){if(jp)return qi;jp=1;var n=Nd(),r=Symbol.for("react.element"),a=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,u=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,d={key:!0,ref:!0,__self:!0,__source:!0};function h(p,g,m){var y,w={},x=null,b=null;m!==void 0&&(x=""+m),g.key!==void 0&&(x=""+g.key),g.ref!==void 0&&(b=g.ref);for(y in g)o.call(g,y)&&!d.hasOwnProperty(y)&&(w[y]=g[y]);if(p&&p.defaultProps)for(y in g=p.defaultProps,g)w[y]===void 0&&(w[y]=g[y]);return{$$typeof:r,type:p,key:x,ref:b,props:w,_owner:u.current}}return qi.Fragment=a,qi.jsx=h,qi.jsxs=h,qi}var Sp;function ax(){return Sp||(Sp=1,Oc.exports=sx()),Oc.exports}var i=ax(),k=Nd();const ix=qm(k);var bo={},Ic={exports:{}},fn={},zc={exports:{}},Uc={};/**
|
|
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
|
-
*/var Cp;function lx(){return Cp||(Cp=1,(function(n){function r(G,ne){var U=G.length;G.push(ne);e:for(;0<U;){var M=U-1>>>1,q=G[M];if(0<u(q,ne))G[M]=ne,G[U]=q,U=M;else break e}}function a(G){return G.length===0?null:G[0]}function o(G){if(G.length===0)return null;var ne=G[0],U=G.pop();if(U!==ne){G[0]=U;e:for(var M=0,q=G.length,je=q>>>1;M<je;){var ve=2*(M+1)-1,xe=G[ve],Se=ve+1,Oe=G[Se];if(0>u(xe,U))Se<q&&0>u(Oe,xe)?(G[M]=Oe,G[Se]=U,M=Se):(G[M]=xe,G[ve]=U,M=ve);else if(Se<q&&0>u(Oe,U))G[M]=Oe,G[Se]=U,M=Se;else break e}}return ne}function u(G,ne){var U=G.sortIndex-ne.sortIndex;return U!==0?U:G.id-ne.id}if(typeof performance=="object"&&typeof performance.now=="function"){var d=performance;n.unstable_now=function(){return d.now()}}else{var h=Date,p=h.now();n.unstable_now=function(){return h.now()-p}}var g=[],m=[],y=1,w=null,x=3,b=!1,L=!1,R=!1,N=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,z=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function $(G){for(var ne=a(m);ne!==null;){if(ne.callback===null)o(m);else if(ne.startTime<=G)o(m),ne.sortIndex=ne.expirationTime,r(g,ne);else break;ne=a(m)}}function Q(G){if(R=!1,$(G),!L)if(a(g)!==null)L=!0,Pe(J);else{var ne=a(m);ne!==null&&ye(Q,ne.startTime-G)}}function J(G,ne){L=!1,R&&(R=!1,T(B),B=-1),b=!0;var U=x;try{for($(ne),w=a(g);w!==null&&(!(w.expirationTime>ne)||G&&!ze());){var M=w.callback;if(typeof M=="function"){w.callback=null,x=w.priorityLevel;var q=M(w.expirationTime<=ne);ne=n.unstable_now(),typeof q=="function"?w.callback=q:w===a(g)&&o(g),$(ne)}else o(g);w=a(g)}if(w!==null)var je=!0;else{var ve=a(m);ve!==null&&ye(Q,ve.startTime-ne),je=!1}return je}finally{w=null,x=U,b=!1}}var se=!1,A=null,B=-1,pe=5,Z=-1;function ze(){return!(n.unstable_now()-Z<pe)}function Xe(){if(A!==null){var G=n.unstable_now();Z=G;var ne=!0;try{ne=A(!0,G)}finally{ne?tt():(se=!1,A=null)}}else se=!1}var tt;if(typeof z=="function")tt=function(){z(Xe)};else if(typeof MessageChannel<"u"){var pt=new MessageChannel,Re=pt.port2;pt.port1.onmessage=Xe,tt=function(){Re.postMessage(null)}}else tt=function(){N(Xe,0)};function Pe(G){A=G,se||(se=!0,tt())}function ye(G,ne){B=N(function(){G(n.unstable_now())},ne)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(G){G.callback=null},n.unstable_continueExecution=function(){L||b||(L=!0,Pe(J))},n.unstable_forceFrameRate=function(G){0>G||125<G?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):pe=0<G?Math.floor(1e3/G):5},n.unstable_getCurrentPriorityLevel=function(){return x},n.unstable_getFirstCallbackNode=function(){return a(g)},n.unstable_next=function(G){switch(x){case 1:case 2:case 3:var ne=3;break;default:ne=x}var U=x;x=ne;try{return G()}finally{x=U}},n.unstable_pauseExecution=function(){},n.unstable_requestPaint=function(){},n.unstable_runWithPriority=function(G,ne){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var U=x;x=G;try{return ne()}finally{x=U}},n.unstable_scheduleCallback=function(G,ne,U){var M=n.unstable_now();switch(typeof U=="object"&&U!==null?(U=U.delay,U=typeof U=="number"&&0<U?M+U:M):U=M,G){case 1:var q=-1;break;case 2:q=250;break;case 5:q=1073741823;break;case 4:q=1e4;break;default:q=5e3}return q=U+q,G={id:y++,callback:ne,priorityLevel:G,startTime:U,expirationTime:q,sortIndex:-1},U>M?(G.sortIndex=U,r(m,G),a(g)===null&&G===a(m)&&(R?(T(B),B=-1):R=!0,ye(Q,U-M))):(G.sortIndex=q,r(g,G),L||b||(L=!0,Pe(J))),G},n.unstable_shouldYield=ze,n.unstable_wrapCallback=function(G){var ne=x;return function(){var U=x;x=ne;try{return G.apply(this,arguments)}finally{x=U}}}})(Uc)),Uc}var Np;function ox(){return Np||(Np=1,zc.exports=lx()),zc.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 Ep;function ux(){if(Ep)return fn;Ep=1;var n=Nd(),r=ox();function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,s=1;s<arguments.length;s++)t+="&args[]="+encodeURIComponent(arguments[s]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var o=new Set,u={};function d(e,t){h(e,t),h(e+"Capture",t)}function h(e,t){for(u[e]=t,e=0;e<t.length;e++)o.add(t[e])}var p=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),g=Object.prototype.hasOwnProperty,m=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,y={},w={};function x(e){return g.call(w,e)?!0:g.call(y,e)?!1:m.test(e)?w[e]=!0:(y[e]=!0,!1)}function b(e,t,s,l){if(s!==null&&s.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return l?!1:s!==null?!s.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function L(e,t,s,l){if(t===null||typeof t>"u"||b(e,t,s,l))return!0;if(l)return!1;if(s!==null)switch(s.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function R(e,t,s,l,c,f,v){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=l,this.attributeNamespace=c,this.mustUseProperty=s,this.propertyName=e,this.type=t,this.sanitizeURL=f,this.removeEmptyString=v}var N={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){N[e]=new R(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];N[t]=new R(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){N[e]=new R(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){N[e]=new R(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){N[e]=new R(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){N[e]=new R(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){N[e]=new R(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){N[e]=new R(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){N[e]=new R(e,5,!1,e.toLowerCase(),null,!1,!1)});var T=/[\-:]([a-z])/g;function z(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(T,z);N[t]=new R(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(T,z);N[t]=new R(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(T,z);N[t]=new R(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){N[e]=new R(e,1,!1,e.toLowerCase(),null,!1,!1)}),N.xlinkHref=new R("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){N[e]=new R(e,1,!1,e.toLowerCase(),null,!0,!0)});function $(e,t,s,l){var c=N.hasOwnProperty(t)?N[t]:null;(c!==null?c.type!==0:l||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(L(t,s,c,l)&&(s=null),l||c===null?x(t)&&(s===null?e.removeAttribute(t):e.setAttribute(t,""+s)):c.mustUseProperty?e[c.propertyName]=s===null?c.type===3?!1:"":s:(t=c.attributeName,l=c.attributeNamespace,s===null?e.removeAttribute(t):(c=c.type,s=c===3||c===4&&s===!0?"":""+s,l?e.setAttributeNS(l,t,s):e.setAttribute(t,s))))}var Q=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,J=Symbol.for("react.element"),se=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),B=Symbol.for("react.strict_mode"),pe=Symbol.for("react.profiler"),Z=Symbol.for("react.provider"),ze=Symbol.for("react.context"),Xe=Symbol.for("react.forward_ref"),tt=Symbol.for("react.suspense"),pt=Symbol.for("react.suspense_list"),Re=Symbol.for("react.memo"),Pe=Symbol.for("react.lazy"),ye=Symbol.for("react.offscreen"),G=Symbol.iterator;function ne(e){return e===null||typeof e!="object"?null:(e=G&&e[G]||e["@@iterator"],typeof e=="function"?e:null)}var U=Object.assign,M;function q(e){if(M===void 0)try{throw Error()}catch(s){var t=s.stack.trim().match(/\n( *(at )?)/);M=t&&t[1]||""}return`
|
|
34
|
-
`+M+e}var je=!1;function ve(e,t){if(!e||je)return"";je=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(F){var l=F}Reflect.construct(e,[],t)}else{try{t.call()}catch(F){l=F}e.call(t.prototype)}else{try{throw Error()}catch(F){l=F}e()}}catch(F){if(F&&l&&typeof F.stack=="string"){for(var c=F.stack.split(`
|
|
35
|
-
`),f=l.stack.split(`
|
|
36
|
-
`),v=c.length-1,j=f.length-1;1<=v&&0<=j&&c[v]!==f[j];)j--;for(;1<=v&&0<=j;v--,j--)if(c[v]!==f[j]){if(v!==1||j!==1)do if(v--,j--,0>j||c[v]!==f[j]){var E=`
|
|
37
|
-
`+c[v].replace(" at new "," at ");return e.displayName&&E.includes("<anonymous>")&&(E=E.replace("<anonymous>",e.displayName)),E}while(1<=v&&0<=j);break}}}finally{je=!1,Error.prepareStackTrace=s}return(e=e?e.displayName||e.name:"")?q(e):""}function xe(e){switch(e.tag){case 5:return q(e.type);case 16:return q("Lazy");case 13:return q("Suspense");case 19:return q("SuspenseList");case 0:case 2:case 15:return e=ve(e.type,!1),e;case 11:return e=ve(e.type.render,!1),e;case 1:return e=ve(e.type,!0),e;default:return""}}function Se(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 A:return"Fragment";case se:return"Portal";case pe:return"Profiler";case B:return"StrictMode";case tt:return"Suspense";case pt:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ze:return(e.displayName||"Context")+".Consumer";case Z:return(e._context.displayName||"Context")+".Provider";case Xe:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Re:return t=e.displayName||null,t!==null?t:Se(e.type)||"Memo";case Pe:t=e._payload,e=e._init;try{return Se(e(t))}catch{}}return null}function Oe(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 Se(t);case 8:return t===B?"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 He(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Me(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function It(e){var t=Me(e)?"checked":"value",s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),l=""+e[t];if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var c=s.get,f=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(v){l=""+v,f.call(this,v)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return l},setValue:function(v){l=""+v},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ot(e){e._valueTracker||(e._valueTracker=It(e))}function sn(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var s=t.getValue(),l="";return e&&(l=Me(e)?e.checked?"true":"false":e.value),e=l,e!==s?(t.setValue(e),!0):!1}function Fn(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 Kn(e,t){var s=t.checked;return U({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:s??e._wrapperState.initialChecked})}function Gn(e,t){var s=t.defaultValue==null?"":t.defaultValue,l=t.checked!=null?t.checked:t.defaultChecked;s=He(t.value!=null?t.value:s),e._wrapperState={initialChecked:l,initialValue:s,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function hl(e,t){t=t.checked,t!=null&&$(e,"checked",t,!1)}function Ja(e,t){hl(e,t);var s=He(t.value),l=t.type;if(s!=null)l==="number"?(s===0&&e.value===""||e.value!=s)&&(e.value=""+s):e.value!==""+s&&(e.value=""+s);else if(l==="submit"||l==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ei(e,t.type,s):t.hasOwnProperty("defaultValue")&&ei(e,t.type,He(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Za(e,t,s){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var l=t.type;if(!(l!=="submit"&&l!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,s||t===e.value||(e.value=t),e.defaultValue=t}s=e.name,s!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,s!==""&&(e.name=s)}function ei(e,t,s){(t!=="number"||Fn(e.ownerDocument)!==e)&&(s==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+s&&(e.defaultValue=""+s))}var vs=Array.isArray;function Nr(e,t,s,l){if(e=e.options,t){t={};for(var c=0;c<s.length;c++)t["$"+s[c]]=!0;for(s=0;s<e.length;s++)c=t.hasOwnProperty("$"+e[s].value),e[s].selected!==c&&(e[s].selected=c),c&&l&&(e[s].defaultSelected=!0)}else{for(s=""+He(s),t=null,c=0;c<e.length;c++){if(e[c].value===s){e[c].selected=!0,l&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function ti(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(a(91));return U({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Yn(e,t){var s=t.value;if(s==null){if(s=t.children,t=t.defaultValue,s!=null){if(t!=null)throw Error(a(92));if(vs(s)){if(1<s.length)throw Error(a(93));s=s[0]}t=s}t==null&&(t=""),s=t}e._wrapperState={initialValue:He(s)}}function Er(e,t){var s=He(t.value),l=He(t.defaultValue);s!=null&&(s=""+s,s!==e.value&&(e.value=s),t.defaultValue==null&&e.defaultValue!==s&&(e.defaultValue=s)),l!=null&&(e.defaultValue=""+l)}function ni(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function na(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 gn(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?na(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var an,ri=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,s,l,c){MSApp.execUnsafeLocalFunction(function(){return e(t,s,l,c)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(an=an||document.createElement("div"),an.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=an.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function xs(e,t){if(t){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=t;return}}e.textContent=t}var or={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},tu=["Webkit","ms","Moz","O"];Object.keys(or).forEach(function(e){tu.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),or[t]=or[e]})});function bn(e,t,s){return t==null||typeof t=="boolean"||t===""?"":s||typeof t!="number"||t===0||or.hasOwnProperty(e)&&or[e]?(""+t).trim():t+"px"}function si(e,t){e=e.style;for(var s in t)if(t.hasOwnProperty(s)){var l=s.indexOf("--")===0,c=bn(s,t[s],l);s==="float"&&(s="cssFloat"),l?e.setProperty(s,c):e[s]=c}}var pl=U({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 ra(e,t){if(t){if(pl[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(a(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(a(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(t.style!=null&&typeof t.style!="object")throw Error(a(62))}}function ai(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 sa=null;function Rr(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var aa=null,Xn=null,Pr=null;function ii(e){if(e=Ni(e)){if(typeof aa!="function")throw Error(a(280));var t=e.stateNode;t&&(t=Dl(t),aa(e.stateNode,e.type,t))}}function ml(e){Xn?Pr?Pr.push(e):Pr=[e]:Xn=e}function li(){if(Xn){var e=Xn,t=Pr;if(Pr=Xn=null,ii(e),t)for(e=0;e<t.length;e++)ii(t[e])}}function ws(e,t){return e(t)}function ks(){}var ia=!1;function gl(e,t,s){if(ia)return e(t,s);ia=!0;try{return ws(e,t,s)}finally{ia=!1,(Xn!==null||Pr!==null)&&(ks(),li())}}function bs(e,t){var s=e.stateNode;if(s===null)return null;var l=Dl(s);if(l===null)return null;s=l[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":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(s&&typeof s!="function")throw Error(a(231,t,typeof s));return s}var S=!1;if(p)try{var _={};Object.defineProperty(_,"passive",{get:function(){S=!0}}),window.addEventListener("test",_,_),window.removeEventListener("test",_,_)}catch{S=!1}function I(e,t,s,l,c,f,v,j,E){var F=Array.prototype.slice.call(arguments,3);try{t.apply(s,F)}catch(W){this.onError(W)}}var V=!1,X=null,ue=!1,de=null,ce={onError:function(e){V=!0,X=e}};function me(e,t,s,l,c,f,v,j,E){V=!1,X=null,I.apply(ce,arguments)}function be(e,t,s,l,c,f,v,j,E){if(me.apply(this,arguments),V){if(V){var F=X;V=!1,X=null}else throw Error(a(198));ue||(ue=!0,de=F)}}function we(e){var t=e,s=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(s=t.return),e=t.return;while(e)}return t.tag===3?s:null}function ge(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 _e(e){if(we(e)!==e)throw Error(a(188))}function rt(e){var t=e.alternate;if(!t){if(t=we(e),t===null)throw Error(a(188));return t!==e?null:e}for(var s=e,l=t;;){var c=s.return;if(c===null)break;var f=c.alternate;if(f===null){if(l=c.return,l!==null){s=l;continue}break}if(c.child===f.child){for(f=c.child;f;){if(f===s)return _e(c),e;if(f===l)return _e(c),t;f=f.sibling}throw Error(a(188))}if(s.return!==l.return)s=c,l=f;else{for(var v=!1,j=c.child;j;){if(j===s){v=!0,s=c,l=f;break}if(j===l){v=!0,l=c,s=f;break}j=j.sibling}if(!v){for(j=f.child;j;){if(j===s){v=!0,s=f,l=c;break}if(j===l){v=!0,l=f,s=c;break}j=j.sibling}if(!v)throw Error(a(189))}}if(s.alternate!==l)throw Error(a(190))}if(s.tag!==3)throw Error(a(188));return s.stateNode.current===s?e:t}function kt(e){return e=rt(e),e!==null?Nt(e):null}function Nt(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Nt(e);if(t!==null)return t;e=e.sibling}return null}var st=r.unstable_scheduleCallback,at=r.unstable_cancelCallback,ur=r.unstable_shouldYield,js=r.unstable_requestPaint,Ze=r.unstable_now,jn=r.unstable_getCurrentPriorityLevel,Ss=r.unstable_ImmediatePriority,Tr=r.unstable_UserBlockingPriority,Sn=r.unstable_NormalPriority,la=r.unstable_LowPriority,Cs=r.unstable_IdlePriority,Ue=null,lt=null;function Lr(e){if(lt&&typeof lt.onCommitFiberRoot=="function")try{lt.onCommitFiberRoot(Ue,e,void 0,(e.current.flags&128)===128)}catch{}}var Tt=Math.clz32?Math.clz32:yl,mt=Math.log,oa=Math.LN2;function yl(e){return e>>>=0,e===0?32:31-(mt(e)/oa|0)|0}var ua=64,vl=4194304;function oi(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 xl(e,t){var s=e.pendingLanes;if(s===0)return 0;var l=0,c=e.suspendedLanes,f=e.pingedLanes,v=s&268435455;if(v!==0){var j=v&~c;j!==0?l=oi(j):(f&=v,f!==0&&(l=oi(f)))}else v=s&~c,v!==0?l=oi(v):f!==0&&(l=oi(f));if(l===0)return 0;if(t!==0&&t!==l&&(t&c)===0&&(c=l&-l,f=t&-t,c>=f||c===16&&(f&4194240)!==0))return t;if((l&4)!==0&&(l|=s&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=l;0<t;)s=31-Tt(t),c=1<<s,l|=e[s],t&=~c;return l}function wy(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 ky(e,t){for(var s=e.suspendedLanes,l=e.pingedLanes,c=e.expirationTimes,f=e.pendingLanes;0<f;){var v=31-Tt(f),j=1<<v,E=c[v];E===-1?((j&s)===0||(j&l)!==0)&&(c[v]=wy(j,t)):E<=t&&(e.expiredLanes|=j),f&=~j}}function nu(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Yd(){var e=ua;return ua<<=1,(ua&4194240)===0&&(ua=64),e}function ru(e){for(var t=[],s=0;31>s;s++)t.push(e);return t}function ui(e,t,s){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Tt(t),e[t]=s}function by(e,t){var s=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var l=e.eventTimes;for(e=e.expirationTimes;0<s;){var c=31-Tt(s),f=1<<c;t[c]=0,l[c]=-1,e[c]=-1,s&=~f}}function su(e,t){var s=e.entangledLanes|=t;for(e=e.entanglements;s;){var l=31-Tt(s),c=1<<l;c&t|e[l]&t&&(e[l]|=t),s&=~c}}var nt=0;function Xd(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var Jd,au,Zd,ef,tf,iu=!1,wl=[],Mr=null,_r=null,Ar=null,ci=new Map,di=new Map,Dr=[],jy="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 nf(e,t){switch(e){case"focusin":case"focusout":Mr=null;break;case"dragenter":case"dragleave":_r=null;break;case"mouseover":case"mouseout":Ar=null;break;case"pointerover":case"pointerout":ci.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":di.delete(t.pointerId)}}function fi(e,t,s,l,c,f){return e===null||e.nativeEvent!==f?(e={blockedOn:t,domEventName:s,eventSystemFlags:l,nativeEvent:f,targetContainers:[c]},t!==null&&(t=Ni(t),t!==null&&au(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function Sy(e,t,s,l,c){switch(t){case"focusin":return Mr=fi(Mr,e,t,s,l,c),!0;case"dragenter":return _r=fi(_r,e,t,s,l,c),!0;case"mouseover":return Ar=fi(Ar,e,t,s,l,c),!0;case"pointerover":var f=c.pointerId;return ci.set(f,fi(ci.get(f)||null,e,t,s,l,c)),!0;case"gotpointercapture":return f=c.pointerId,di.set(f,fi(di.get(f)||null,e,t,s,l,c)),!0}return!1}function rf(e){var t=Ns(e.target);if(t!==null){var s=we(t);if(s!==null){if(t=s.tag,t===13){if(t=ge(s),t!==null){e.blockedOn=t,tf(e.priority,function(){Zd(s)});return}}else if(t===3&&s.stateNode.current.memoizedState.isDehydrated){e.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}e.blockedOn=null}function kl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var s=ou(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(s===null){s=e.nativeEvent;var l=new s.constructor(s.type,s);sa=l,s.target.dispatchEvent(l),sa=null}else return t=Ni(s),t!==null&&au(t),e.blockedOn=s,!1;t.shift()}return!0}function sf(e,t,s){kl(e)&&s.delete(t)}function Cy(){iu=!1,Mr!==null&&kl(Mr)&&(Mr=null),_r!==null&&kl(_r)&&(_r=null),Ar!==null&&kl(Ar)&&(Ar=null),ci.forEach(sf),di.forEach(sf)}function hi(e,t){e.blockedOn===t&&(e.blockedOn=null,iu||(iu=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,Cy)))}function pi(e){function t(c){return hi(c,e)}if(0<wl.length){hi(wl[0],e);for(var s=1;s<wl.length;s++){var l=wl[s];l.blockedOn===e&&(l.blockedOn=null)}}for(Mr!==null&&hi(Mr,e),_r!==null&&hi(_r,e),Ar!==null&&hi(Ar,e),ci.forEach(t),di.forEach(t),s=0;s<Dr.length;s++)l=Dr[s],l.blockedOn===e&&(l.blockedOn=null);for(;0<Dr.length&&(s=Dr[0],s.blockedOn===null);)rf(s),s.blockedOn===null&&Dr.shift()}var ca=Q.ReactCurrentBatchConfig,bl=!0;function Ny(e,t,s,l){var c=nt,f=ca.transition;ca.transition=null;try{nt=1,lu(e,t,s,l)}finally{nt=c,ca.transition=f}}function Ey(e,t,s,l){var c=nt,f=ca.transition;ca.transition=null;try{nt=4,lu(e,t,s,l)}finally{nt=c,ca.transition=f}}function lu(e,t,s,l){if(bl){var c=ou(e,t,s,l);if(c===null)Cu(e,t,l,jl,s),nf(e,l);else if(Sy(c,e,t,s,l))l.stopPropagation();else if(nf(e,l),t&4&&-1<jy.indexOf(e)){for(;c!==null;){var f=Ni(c);if(f!==null&&Jd(f),f=ou(e,t,s,l),f===null&&Cu(e,t,l,jl,s),f===c)break;c=f}c!==null&&l.stopPropagation()}else Cu(e,t,l,null,s)}}var jl=null;function ou(e,t,s,l){if(jl=null,e=Rr(l),e=Ns(e),e!==null)if(t=we(e),t===null)e=null;else if(s=t.tag,s===13){if(e=ge(t),e!==null)return e;e=null}else if(s===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return jl=e,null}function af(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(jn()){case Ss:return 1;case Tr:return 4;case Sn:case la:return 16;case Cs:return 536870912;default:return 16}default:return 16}}var Or=null,uu=null,Sl=null;function lf(){if(Sl)return Sl;var e,t=uu,s=t.length,l,c="value"in Or?Or.value:Or.textContent,f=c.length;for(e=0;e<s&&t[e]===c[e];e++);var v=s-e;for(l=1;l<=v&&t[s-l]===c[f-l];l++);return Sl=c.slice(e,1<l?1-l:void 0)}function Cl(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 Nl(){return!0}function of(){return!1}function yn(e){function t(s,l,c,f,v){this._reactName=s,this._targetInst=c,this.type=l,this.nativeEvent=f,this.target=v,this.currentTarget=null;for(var j in e)e.hasOwnProperty(j)&&(s=e[j],this[j]=s?s(f):f[j]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?Nl:of,this.isPropagationStopped=of,this}return U(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=Nl)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=Nl)},persist:function(){},isPersistent:Nl}),t}var da={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cu=yn(da),mi=U({},da,{view:0,detail:0}),Ry=yn(mi),du,fu,gi,El=U({},mi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:pu,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!==gi&&(gi&&e.type==="mousemove"?(du=e.screenX-gi.screenX,fu=e.screenY-gi.screenY):fu=du=0,gi=e),du)},movementY:function(e){return"movementY"in e?e.movementY:fu}}),uf=yn(El),Py=U({},El,{dataTransfer:0}),Ty=yn(Py),Ly=U({},mi,{relatedTarget:0}),hu=yn(Ly),My=U({},da,{animationName:0,elapsedTime:0,pseudoElement:0}),_y=yn(My),Ay=U({},da,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Dy=yn(Ay),Oy=U({},da,{data:0}),cf=yn(Oy),Fy={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Iy={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"},zy={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Uy(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=zy[e])?!!t[e]:!1}function pu(){return Uy}var $y=U({},mi,{key:function(e){if(e.key){var t=Fy[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Cl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Iy[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:pu,charCode:function(e){return e.type==="keypress"?Cl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Cl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),qy=yn($y),By=U({},El,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),df=yn(By),Hy=U({},mi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:pu}),Qy=yn(Hy),Vy=U({},da,{propertyName:0,elapsedTime:0,pseudoElement:0}),Wy=yn(Vy),Ky=U({},El,{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}),Gy=yn(Ky),Yy=[9,13,27,32],mu=p&&"CompositionEvent"in window,yi=null;p&&"documentMode"in document&&(yi=document.documentMode);var Xy=p&&"TextEvent"in window&&!yi,ff=p&&(!mu||yi&&8<yi&&11>=yi),hf=" ",pf=!1;function mf(e,t){switch(e){case"keyup":return Yy.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function gf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var fa=!1;function Jy(e,t){switch(e){case"compositionend":return gf(t);case"keypress":return t.which!==32?null:(pf=!0,hf);case"textInput":return e=t.data,e===hf&&pf?null:e;default:return null}}function Zy(e,t){if(fa)return e==="compositionend"||!mu&&mf(e,t)?(e=lf(),Sl=uu=Or=null,fa=!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 ff&&t.locale!=="ko"?null:t.data;default:return null}}var ev={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 yf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!ev[e.type]:t==="textarea"}function vf(e,t,s,l){ml(l),t=Ml(t,"onChange"),0<t.length&&(s=new cu("onChange","change",null,s,l),e.push({event:s,listeners:t}))}var vi=null,xi=null;function tv(e){Of(e,0)}function Rl(e){var t=ya(e);if(sn(t))return e}function nv(e,t){if(e==="change")return t}var xf=!1;if(p){var gu;if(p){var yu="oninput"in document;if(!yu){var wf=document.createElement("div");wf.setAttribute("oninput","return;"),yu=typeof wf.oninput=="function"}gu=yu}else gu=!1;xf=gu&&(!document.documentMode||9<document.documentMode)}function kf(){vi&&(vi.detachEvent("onpropertychange",bf),xi=vi=null)}function bf(e){if(e.propertyName==="value"&&Rl(xi)){var t=[];vf(t,xi,e,Rr(e)),gl(tv,t)}}function rv(e,t,s){e==="focusin"?(kf(),vi=t,xi=s,vi.attachEvent("onpropertychange",bf)):e==="focusout"&&kf()}function sv(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Rl(xi)}function av(e,t){if(e==="click")return Rl(t)}function iv(e,t){if(e==="input"||e==="change")return Rl(t)}function lv(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var In=typeof Object.is=="function"?Object.is:lv;function wi(e,t){if(In(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var s=Object.keys(e),l=Object.keys(t);if(s.length!==l.length)return!1;for(l=0;l<s.length;l++){var c=s[l];if(!g.call(t,c)||!In(e[c],t[c]))return!1}return!0}function jf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Sf(e,t){var s=jf(e);e=0;for(var l;s;){if(s.nodeType===3){if(l=e+s.textContent.length,e<=t&&l>=t)return{node:s,offset:t-e};e=l}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=jf(s)}}function Cf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Cf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Nf(){for(var e=window,t=Fn();t instanceof e.HTMLIFrameElement;){try{var s=typeof t.contentWindow.location.href=="string"}catch{s=!1}if(s)e=t.contentWindow;else break;t=Fn(e.document)}return t}function vu(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 ov(e){var t=Nf(),s=e.focusedElem,l=e.selectionRange;if(t!==s&&s&&s.ownerDocument&&Cf(s.ownerDocument.documentElement,s)){if(l!==null&&vu(s)){if(t=l.start,e=l.end,e===void 0&&(e=t),"selectionStart"in s)s.selectionStart=t,s.selectionEnd=Math.min(e,s.value.length);else if(e=(t=s.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var c=s.textContent.length,f=Math.min(l.start,c);l=l.end===void 0?f:Math.min(l.end,c),!e.extend&&f>l&&(c=l,l=f,f=c),c=Sf(s,f);var v=Sf(s,l);c&&v&&(e.rangeCount!==1||e.anchorNode!==c.node||e.anchorOffset!==c.offset||e.focusNode!==v.node||e.focusOffset!==v.offset)&&(t=t.createRange(),t.setStart(c.node,c.offset),e.removeAllRanges(),f>l?(e.addRange(t),e.extend(v.node,v.offset)):(t.setEnd(v.node,v.offset),e.addRange(t)))}}for(t=[],e=s;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s<t.length;s++)e=t[s],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var uv=p&&"documentMode"in document&&11>=document.documentMode,ha=null,xu=null,ki=null,wu=!1;function Ef(e,t,s){var l=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;wu||ha==null||ha!==Fn(l)||(l=ha,"selectionStart"in l&&vu(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),ki&&wi(ki,l)||(ki=l,l=Ml(xu,"onSelect"),0<l.length&&(t=new cu("onSelect","select",null,t,s),e.push({event:t,listeners:l}),t.target=ha)))}function Pl(e,t){var s={};return s[e.toLowerCase()]=t.toLowerCase(),s["Webkit"+e]="webkit"+t,s["Moz"+e]="moz"+t,s}var pa={animationend:Pl("Animation","AnimationEnd"),animationiteration:Pl("Animation","AnimationIteration"),animationstart:Pl("Animation","AnimationStart"),transitionend:Pl("Transition","TransitionEnd")},ku={},Rf={};p&&(Rf=document.createElement("div").style,"AnimationEvent"in window||(delete pa.animationend.animation,delete pa.animationiteration.animation,delete pa.animationstart.animation),"TransitionEvent"in window||delete pa.transitionend.transition);function Tl(e){if(ku[e])return ku[e];if(!pa[e])return e;var t=pa[e],s;for(s in t)if(t.hasOwnProperty(s)&&s in Rf)return ku[e]=t[s];return e}var Pf=Tl("animationend"),Tf=Tl("animationiteration"),Lf=Tl("animationstart"),Mf=Tl("transitionend"),_f=new Map,Af="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 Fr(e,t){_f.set(e,t),d(t,[e])}for(var bu=0;bu<Af.length;bu++){var ju=Af[bu],cv=ju.toLowerCase(),dv=ju[0].toUpperCase()+ju.slice(1);Fr(cv,"on"+dv)}Fr(Pf,"onAnimationEnd"),Fr(Tf,"onAnimationIteration"),Fr(Lf,"onAnimationStart"),Fr("dblclick","onDoubleClick"),Fr("focusin","onFocus"),Fr("focusout","onBlur"),Fr(Mf,"onTransitionEnd"),h("onMouseEnter",["mouseout","mouseover"]),h("onMouseLeave",["mouseout","mouseover"]),h("onPointerEnter",["pointerout","pointerover"]),h("onPointerLeave",["pointerout","pointerover"]),d("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),d("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),d("onBeforeInput",["compositionend","keypress","textInput","paste"]),d("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),d("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),d("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var bi="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(" "),fv=new Set("cancel close invalid load scroll toggle".split(" ").concat(bi));function Df(e,t,s){var l=e.type||"unknown-event";e.currentTarget=s,be(l,t,void 0,e),e.currentTarget=null}function Of(e,t){t=(t&4)!==0;for(var s=0;s<e.length;s++){var l=e[s],c=l.event;l=l.listeners;e:{var f=void 0;if(t)for(var v=l.length-1;0<=v;v--){var j=l[v],E=j.instance,F=j.currentTarget;if(j=j.listener,E!==f&&c.isPropagationStopped())break e;Df(c,j,F),f=E}else for(v=0;v<l.length;v++){if(j=l[v],E=j.instance,F=j.currentTarget,j=j.listener,E!==f&&c.isPropagationStopped())break e;Df(c,j,F),f=E}}}if(ue)throw e=de,ue=!1,de=null,e}function ft(e,t){var s=t[Lu];s===void 0&&(s=t[Lu]=new Set);var l=e+"__bubble";s.has(l)||(Ff(t,e,2,!1),s.add(l))}function Su(e,t,s){var l=0;t&&(l|=4),Ff(s,e,l,t)}var Ll="_reactListening"+Math.random().toString(36).slice(2);function ji(e){if(!e[Ll]){e[Ll]=!0,o.forEach(function(s){s!=="selectionchange"&&(fv.has(s)||Su(s,!1,e),Su(s,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ll]||(t[Ll]=!0,Su("selectionchange",!1,t))}}function Ff(e,t,s,l){switch(af(t)){case 1:var c=Ny;break;case 4:c=Ey;break;default:c=lu}s=c.bind(null,t,s,e),c=void 0,!S||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),l?c!==void 0?e.addEventListener(t,s,{capture:!0,passive:c}):e.addEventListener(t,s,!0):c!==void 0?e.addEventListener(t,s,{passive:c}):e.addEventListener(t,s,!1)}function Cu(e,t,s,l,c){var f=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var v=l.tag;if(v===3||v===4){var j=l.stateNode.containerInfo;if(j===c||j.nodeType===8&&j.parentNode===c)break;if(v===4)for(v=l.return;v!==null;){var E=v.tag;if((E===3||E===4)&&(E=v.stateNode.containerInfo,E===c||E.nodeType===8&&E.parentNode===c))return;v=v.return}for(;j!==null;){if(v=Ns(j),v===null)return;if(E=v.tag,E===5||E===6){l=f=v;continue e}j=j.parentNode}}l=l.return}gl(function(){var F=f,W=Rr(s),K=[];e:{var H=_f.get(e);if(H!==void 0){var te=cu,ae=e;switch(e){case"keypress":if(Cl(s)===0)break e;case"keydown":case"keyup":te=qy;break;case"focusin":ae="focus",te=hu;break;case"focusout":ae="blur",te=hu;break;case"beforeblur":case"afterblur":te=hu;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":te=uf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":te=Ty;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":te=Qy;break;case Pf:case Tf:case Lf:te=_y;break;case Mf:te=Wy;break;case"scroll":te=Ry;break;case"wheel":te=Gy;break;case"copy":case"cut":case"paste":te=Dy;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":te=df}var oe=(t&4)!==0,Et=!oe&&e==="scroll",D=oe?H!==null?H+"Capture":null:H;oe=[];for(var P=F,O;P!==null;){O=P;var Y=O.stateNode;if(O.tag===5&&Y!==null&&(O=Y,D!==null&&(Y=bs(P,D),Y!=null&&oe.push(Si(P,Y,O)))),Et)break;P=P.return}0<oe.length&&(H=new te(H,ae,null,s,W),K.push({event:H,listeners:oe}))}}if((t&7)===0){e:{if(H=e==="mouseover"||e==="pointerover",te=e==="mouseout"||e==="pointerout",H&&s!==sa&&(ae=s.relatedTarget||s.fromElement)&&(Ns(ae)||ae[cr]))break e;if((te||H)&&(H=W.window===W?W:(H=W.ownerDocument)?H.defaultView||H.parentWindow:window,te?(ae=s.relatedTarget||s.toElement,te=F,ae=ae?Ns(ae):null,ae!==null&&(Et=we(ae),ae!==Et||ae.tag!==5&&ae.tag!==6)&&(ae=null)):(te=null,ae=F),te!==ae)){if(oe=uf,Y="onMouseLeave",D="onMouseEnter",P="mouse",(e==="pointerout"||e==="pointerover")&&(oe=df,Y="onPointerLeave",D="onPointerEnter",P="pointer"),Et=te==null?H:ya(te),O=ae==null?H:ya(ae),H=new oe(Y,P+"leave",te,s,W),H.target=Et,H.relatedTarget=O,Y=null,Ns(W)===F&&(oe=new oe(D,P+"enter",ae,s,W),oe.target=O,oe.relatedTarget=Et,Y=oe),Et=Y,te&&ae)t:{for(oe=te,D=ae,P=0,O=oe;O;O=ma(O))P++;for(O=0,Y=D;Y;Y=ma(Y))O++;for(;0<P-O;)oe=ma(oe),P--;for(;0<O-P;)D=ma(D),O--;for(;P--;){if(oe===D||D!==null&&oe===D.alternate)break t;oe=ma(oe),D=ma(D)}oe=null}else oe=null;te!==null&&If(K,H,te,oe,!1),ae!==null&&Et!==null&&If(K,Et,ae,oe,!0)}}e:{if(H=F?ya(F):window,te=H.nodeName&&H.nodeName.toLowerCase(),te==="select"||te==="input"&&H.type==="file")var fe=nv;else if(yf(H))if(xf)fe=iv;else{fe=sv;var Ce=rv}else(te=H.nodeName)&&te.toLowerCase()==="input"&&(H.type==="checkbox"||H.type==="radio")&&(fe=av);if(fe&&(fe=fe(e,F))){vf(K,fe,s,W);break e}Ce&&Ce(e,H,F),e==="focusout"&&(Ce=H._wrapperState)&&Ce.controlled&&H.type==="number"&&ei(H,"number",H.value)}switch(Ce=F?ya(F):window,e){case"focusin":(yf(Ce)||Ce.contentEditable==="true")&&(ha=Ce,xu=F,ki=null);break;case"focusout":ki=xu=ha=null;break;case"mousedown":wu=!0;break;case"contextmenu":case"mouseup":case"dragend":wu=!1,Ef(K,s,W);break;case"selectionchange":if(uv)break;case"keydown":case"keyup":Ef(K,s,W)}var Ne;if(mu)e:{switch(e){case"compositionstart":var Te="onCompositionStart";break e;case"compositionend":Te="onCompositionEnd";break e;case"compositionupdate":Te="onCompositionUpdate";break e}Te=void 0}else fa?mf(e,s)&&(Te="onCompositionEnd"):e==="keydown"&&s.keyCode===229&&(Te="onCompositionStart");Te&&(ff&&s.locale!=="ko"&&(fa||Te!=="onCompositionStart"?Te==="onCompositionEnd"&&fa&&(Ne=lf()):(Or=W,uu="value"in Or?Or.value:Or.textContent,fa=!0)),Ce=Ml(F,Te),0<Ce.length&&(Te=new cf(Te,e,null,s,W),K.push({event:Te,listeners:Ce}),Ne?Te.data=Ne:(Ne=gf(s),Ne!==null&&(Te.data=Ne)))),(Ne=Xy?Jy(e,s):Zy(e,s))&&(F=Ml(F,"onBeforeInput"),0<F.length&&(W=new cf("onBeforeInput","beforeinput",null,s,W),K.push({event:W,listeners:F}),W.data=Ne))}Of(K,t)})}function Si(e,t,s){return{instance:e,listener:t,currentTarget:s}}function Ml(e,t){for(var s=t+"Capture",l=[];e!==null;){var c=e,f=c.stateNode;c.tag===5&&f!==null&&(c=f,f=bs(e,s),f!=null&&l.unshift(Si(e,f,c)),f=bs(e,t),f!=null&&l.push(Si(e,f,c))),e=e.return}return l}function ma(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function If(e,t,s,l,c){for(var f=t._reactName,v=[];s!==null&&s!==l;){var j=s,E=j.alternate,F=j.stateNode;if(E!==null&&E===l)break;j.tag===5&&F!==null&&(j=F,c?(E=bs(s,f),E!=null&&v.unshift(Si(s,E,j))):c||(E=bs(s,f),E!=null&&v.push(Si(s,E,j)))),s=s.return}v.length!==0&&e.push({event:t,listeners:v})}var hv=/\r\n?/g,pv=/\u0000|\uFFFD/g;function zf(e){return(typeof e=="string"?e:""+e).replace(hv,`
|
|
38
|
-
`).replace(pv,"")}function _l(e,t,s){if(t=zf(t),zf(e)!==t&&s)throw Error(a(425))}function Al(){}var Nu=null,Eu=null;function Ru(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 Pu=typeof setTimeout=="function"?setTimeout:void 0,mv=typeof clearTimeout=="function"?clearTimeout:void 0,Uf=typeof Promise=="function"?Promise:void 0,gv=typeof queueMicrotask=="function"?queueMicrotask:typeof Uf<"u"?function(e){return Uf.resolve(null).then(e).catch(yv)}:Pu;function yv(e){setTimeout(function(){throw e})}function Tu(e,t){var s=t,l=0;do{var c=s.nextSibling;if(e.removeChild(s),c&&c.nodeType===8)if(s=c.data,s==="/$"){if(l===0){e.removeChild(c),pi(t);return}l--}else s!=="$"&&s!=="$?"&&s!=="$!"||l++;s=c}while(s);pi(t)}function Ir(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 $f(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var s=e.data;if(s==="$"||s==="$!"||s==="$?"){if(t===0)return e;t--}else s==="/$"&&t++}e=e.previousSibling}return null}var ga=Math.random().toString(36).slice(2),Jn="__reactFiber$"+ga,Ci="__reactProps$"+ga,cr="__reactContainer$"+ga,Lu="__reactEvents$"+ga,vv="__reactListeners$"+ga,xv="__reactHandles$"+ga;function Ns(e){var t=e[Jn];if(t)return t;for(var s=e.parentNode;s;){if(t=s[cr]||s[Jn]){if(s=t.alternate,t.child!==null||s!==null&&s.child!==null)for(e=$f(e);e!==null;){if(s=e[Jn])return s;e=$f(e)}return t}e=s,s=e.parentNode}return null}function Ni(e){return e=e[Jn]||e[cr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ya(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(a(33))}function Dl(e){return e[Ci]||null}var Mu=[],va=-1;function zr(e){return{current:e}}function ht(e){0>va||(e.current=Mu[va],Mu[va]=null,va--)}function ut(e,t){va++,Mu[va]=e.current,e.current=t}var Ur={},Vt=zr(Ur),ln=zr(!1),Es=Ur;function xa(e,t){var s=e.type.contextTypes;if(!s)return Ur;var l=e.stateNode;if(l&&l.__reactInternalMemoizedUnmaskedChildContext===t)return l.__reactInternalMemoizedMaskedChildContext;var c={},f;for(f in s)c[f]=t[f];return l&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=c),c}function on(e){return e=e.childContextTypes,e!=null}function Ol(){ht(ln),ht(Vt)}function qf(e,t,s){if(Vt.current!==Ur)throw Error(a(168));ut(Vt,t),ut(ln,s)}function Bf(e,t,s){var l=e.stateNode;if(t=t.childContextTypes,typeof l.getChildContext!="function")return s;l=l.getChildContext();for(var c in l)if(!(c in t))throw Error(a(108,Oe(e)||"Unknown",c));return U({},s,l)}function Fl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ur,Es=Vt.current,ut(Vt,e),ut(ln,ln.current),!0}function Hf(e,t,s){var l=e.stateNode;if(!l)throw Error(a(169));s?(e=Bf(e,t,Es),l.__reactInternalMemoizedMergedChildContext=e,ht(ln),ht(Vt),ut(Vt,e)):ht(ln),ut(ln,s)}var dr=null,Il=!1,_u=!1;function Qf(e){dr===null?dr=[e]:dr.push(e)}function wv(e){Il=!0,Qf(e)}function $r(){if(!_u&&dr!==null){_u=!0;var e=0,t=nt;try{var s=dr;for(nt=1;e<s.length;e++){var l=s[e];do l=l(!0);while(l!==null)}dr=null,Il=!1}catch(c){throw dr!==null&&(dr=dr.slice(e+1)),st(Ss,$r),c}finally{nt=t,_u=!1}}return null}var wa=[],ka=0,zl=null,Ul=0,Cn=[],Nn=0,Rs=null,fr=1,hr="";function Ps(e,t){wa[ka++]=Ul,wa[ka++]=zl,zl=e,Ul=t}function Vf(e,t,s){Cn[Nn++]=fr,Cn[Nn++]=hr,Cn[Nn++]=Rs,Rs=e;var l=fr;e=hr;var c=32-Tt(l)-1;l&=~(1<<c),s+=1;var f=32-Tt(t)+c;if(30<f){var v=c-c%5;f=(l&(1<<v)-1).toString(32),l>>=v,c-=v,fr=1<<32-Tt(t)+c|s<<c|l,hr=f+e}else fr=1<<f|s<<c|l,hr=e}function Au(e){e.return!==null&&(Ps(e,1),Vf(e,1,0))}function Du(e){for(;e===zl;)zl=wa[--ka],wa[ka]=null,Ul=wa[--ka],wa[ka]=null;for(;e===Rs;)Rs=Cn[--Nn],Cn[Nn]=null,hr=Cn[--Nn],Cn[Nn]=null,fr=Cn[--Nn],Cn[Nn]=null}var vn=null,xn=null,gt=!1,zn=null;function Wf(e,t){var s=Tn(5,null,null,0);s.elementType="DELETED",s.stateNode=t,s.return=e,t=e.deletions,t===null?(e.deletions=[s],e.flags|=16):t.push(s)}function Kf(e,t){switch(e.tag){case 5:var s=e.type;return t=t.nodeType!==1||s.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,vn=e,xn=Ir(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,vn=e,xn=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(s=Rs!==null?{id:fr,overflow:hr}:null,e.memoizedState={dehydrated:t,treeContext:s,retryLane:1073741824},s=Tn(18,null,null,0),s.stateNode=t,s.return=e,e.child=s,vn=e,xn=null,!0):!1;default:return!1}}function Ou(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Fu(e){if(gt){var t=xn;if(t){var s=t;if(!Kf(e,t)){if(Ou(e))throw Error(a(418));t=Ir(s.nextSibling);var l=vn;t&&Kf(e,t)?Wf(l,s):(e.flags=e.flags&-4097|2,gt=!1,vn=e)}}else{if(Ou(e))throw Error(a(418));e.flags=e.flags&-4097|2,gt=!1,vn=e}}}function Gf(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;vn=e}function $l(e){if(e!==vn)return!1;if(!gt)return Gf(e),gt=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Ru(e.type,e.memoizedProps)),t&&(t=xn)){if(Ou(e))throw Yf(),Error(a(418));for(;t;)Wf(e,t),t=Ir(t.nextSibling)}if(Gf(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var s=e.data;if(s==="/$"){if(t===0){xn=Ir(e.nextSibling);break e}t--}else s!=="$"&&s!=="$!"&&s!=="$?"||t++}e=e.nextSibling}xn=null}}else xn=vn?Ir(e.stateNode.nextSibling):null;return!0}function Yf(){for(var e=xn;e;)e=Ir(e.nextSibling)}function ba(){xn=vn=null,gt=!1}function Iu(e){zn===null?zn=[e]:zn.push(e)}var kv=Q.ReactCurrentBatchConfig;function Ei(e,t,s){if(e=s.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(s._owner){if(s=s._owner,s){if(s.tag!==1)throw Error(a(309));var l=s.stateNode}if(!l)throw Error(a(147,e));var c=l,f=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===f?t.ref:(t=function(v){var j=c.refs;v===null?delete j[f]:j[f]=v},t._stringRef=f,t)}if(typeof e!="string")throw Error(a(284));if(!s._owner)throw Error(a(290,e))}return e}function ql(e,t){throw e=Object.prototype.toString.call(t),Error(a(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Xf(e){var t=e._init;return t(e._payload)}function Jf(e){function t(D,P){if(e){var O=D.deletions;O===null?(D.deletions=[P],D.flags|=16):O.push(P)}}function s(D,P){if(!e)return null;for(;P!==null;)t(D,P),P=P.sibling;return null}function l(D,P){for(D=new Map;P!==null;)P.key!==null?D.set(P.key,P):D.set(P.index,P),P=P.sibling;return D}function c(D,P){return D=Gr(D,P),D.index=0,D.sibling=null,D}function f(D,P,O){return D.index=O,e?(O=D.alternate,O!==null?(O=O.index,O<P?(D.flags|=2,P):O):(D.flags|=2,P)):(D.flags|=1048576,P)}function v(D){return e&&D.alternate===null&&(D.flags|=2),D}function j(D,P,O,Y){return P===null||P.tag!==6?(P=Pc(O,D.mode,Y),P.return=D,P):(P=c(P,O),P.return=D,P)}function E(D,P,O,Y){var fe=O.type;return fe===A?W(D,P,O.props.children,Y,O.key):P!==null&&(P.elementType===fe||typeof fe=="object"&&fe!==null&&fe.$$typeof===Pe&&Xf(fe)===P.type)?(Y=c(P,O.props),Y.ref=Ei(D,P,O),Y.return=D,Y):(Y=ho(O.type,O.key,O.props,null,D.mode,Y),Y.ref=Ei(D,P,O),Y.return=D,Y)}function F(D,P,O,Y){return P===null||P.tag!==4||P.stateNode.containerInfo!==O.containerInfo||P.stateNode.implementation!==O.implementation?(P=Tc(O,D.mode,Y),P.return=D,P):(P=c(P,O.children||[]),P.return=D,P)}function W(D,P,O,Y,fe){return P===null||P.tag!==7?(P=Fs(O,D.mode,Y,fe),P.return=D,P):(P=c(P,O),P.return=D,P)}function K(D,P,O){if(typeof P=="string"&&P!==""||typeof P=="number")return P=Pc(""+P,D.mode,O),P.return=D,P;if(typeof P=="object"&&P!==null){switch(P.$$typeof){case J:return O=ho(P.type,P.key,P.props,null,D.mode,O),O.ref=Ei(D,null,P),O.return=D,O;case se:return P=Tc(P,D.mode,O),P.return=D,P;case Pe:var Y=P._init;return K(D,Y(P._payload),O)}if(vs(P)||ne(P))return P=Fs(P,D.mode,O,null),P.return=D,P;ql(D,P)}return null}function H(D,P,O,Y){var fe=P!==null?P.key:null;if(typeof O=="string"&&O!==""||typeof O=="number")return fe!==null?null:j(D,P,""+O,Y);if(typeof O=="object"&&O!==null){switch(O.$$typeof){case J:return O.key===fe?E(D,P,O,Y):null;case se:return O.key===fe?F(D,P,O,Y):null;case Pe:return fe=O._init,H(D,P,fe(O._payload),Y)}if(vs(O)||ne(O))return fe!==null?null:W(D,P,O,Y,null);ql(D,O)}return null}function te(D,P,O,Y,fe){if(typeof Y=="string"&&Y!==""||typeof Y=="number")return D=D.get(O)||null,j(P,D,""+Y,fe);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case J:return D=D.get(Y.key===null?O:Y.key)||null,E(P,D,Y,fe);case se:return D=D.get(Y.key===null?O:Y.key)||null,F(P,D,Y,fe);case Pe:var Ce=Y._init;return te(D,P,O,Ce(Y._payload),fe)}if(vs(Y)||ne(Y))return D=D.get(O)||null,W(P,D,Y,fe,null);ql(P,Y)}return null}function ae(D,P,O,Y){for(var fe=null,Ce=null,Ne=P,Te=P=0,$t=null;Ne!==null&&Te<O.length;Te++){Ne.index>Te?($t=Ne,Ne=null):$t=Ne.sibling;var Ge=H(D,Ne,O[Te],Y);if(Ge===null){Ne===null&&(Ne=$t);break}e&&Ne&&Ge.alternate===null&&t(D,Ne),P=f(Ge,P,Te),Ce===null?fe=Ge:Ce.sibling=Ge,Ce=Ge,Ne=$t}if(Te===O.length)return s(D,Ne),gt&&Ps(D,Te),fe;if(Ne===null){for(;Te<O.length;Te++)Ne=K(D,O[Te],Y),Ne!==null&&(P=f(Ne,P,Te),Ce===null?fe=Ne:Ce.sibling=Ne,Ce=Ne);return gt&&Ps(D,Te),fe}for(Ne=l(D,Ne);Te<O.length;Te++)$t=te(Ne,D,Te,O[Te],Y),$t!==null&&(e&&$t.alternate!==null&&Ne.delete($t.key===null?Te:$t.key),P=f($t,P,Te),Ce===null?fe=$t:Ce.sibling=$t,Ce=$t);return e&&Ne.forEach(function(Yr){return t(D,Yr)}),gt&&Ps(D,Te),fe}function oe(D,P,O,Y){var fe=ne(O);if(typeof fe!="function")throw Error(a(150));if(O=fe.call(O),O==null)throw Error(a(151));for(var Ce=fe=null,Ne=P,Te=P=0,$t=null,Ge=O.next();Ne!==null&&!Ge.done;Te++,Ge=O.next()){Ne.index>Te?($t=Ne,Ne=null):$t=Ne.sibling;var Yr=H(D,Ne,Ge.value,Y);if(Yr===null){Ne===null&&(Ne=$t);break}e&&Ne&&Yr.alternate===null&&t(D,Ne),P=f(Yr,P,Te),Ce===null?fe=Yr:Ce.sibling=Yr,Ce=Yr,Ne=$t}if(Ge.done)return s(D,Ne),gt&&Ps(D,Te),fe;if(Ne===null){for(;!Ge.done;Te++,Ge=O.next())Ge=K(D,Ge.value,Y),Ge!==null&&(P=f(Ge,P,Te),Ce===null?fe=Ge:Ce.sibling=Ge,Ce=Ge);return gt&&Ps(D,Te),fe}for(Ne=l(D,Ne);!Ge.done;Te++,Ge=O.next())Ge=te(Ne,D,Te,Ge.value,Y),Ge!==null&&(e&&Ge.alternate!==null&&Ne.delete(Ge.key===null?Te:Ge.key),P=f(Ge,P,Te),Ce===null?fe=Ge:Ce.sibling=Ge,Ce=Ge);return e&&Ne.forEach(function(ex){return t(D,ex)}),gt&&Ps(D,Te),fe}function Et(D,P,O,Y){if(typeof O=="object"&&O!==null&&O.type===A&&O.key===null&&(O=O.props.children),typeof O=="object"&&O!==null){switch(O.$$typeof){case J:e:{for(var fe=O.key,Ce=P;Ce!==null;){if(Ce.key===fe){if(fe=O.type,fe===A){if(Ce.tag===7){s(D,Ce.sibling),P=c(Ce,O.props.children),P.return=D,D=P;break e}}else if(Ce.elementType===fe||typeof fe=="object"&&fe!==null&&fe.$$typeof===Pe&&Xf(fe)===Ce.type){s(D,Ce.sibling),P=c(Ce,O.props),P.ref=Ei(D,Ce,O),P.return=D,D=P;break e}s(D,Ce);break}else t(D,Ce);Ce=Ce.sibling}O.type===A?(P=Fs(O.props.children,D.mode,Y,O.key),P.return=D,D=P):(Y=ho(O.type,O.key,O.props,null,D.mode,Y),Y.ref=Ei(D,P,O),Y.return=D,D=Y)}return v(D);case se:e:{for(Ce=O.key;P!==null;){if(P.key===Ce)if(P.tag===4&&P.stateNode.containerInfo===O.containerInfo&&P.stateNode.implementation===O.implementation){s(D,P.sibling),P=c(P,O.children||[]),P.return=D,D=P;break e}else{s(D,P);break}else t(D,P);P=P.sibling}P=Tc(O,D.mode,Y),P.return=D,D=P}return v(D);case Pe:return Ce=O._init,Et(D,P,Ce(O._payload),Y)}if(vs(O))return ae(D,P,O,Y);if(ne(O))return oe(D,P,O,Y);ql(D,O)}return typeof O=="string"&&O!==""||typeof O=="number"?(O=""+O,P!==null&&P.tag===6?(s(D,P.sibling),P=c(P,O),P.return=D,D=P):(s(D,P),P=Pc(O,D.mode,Y),P.return=D,D=P),v(D)):s(D,P)}return Et}var ja=Jf(!0),Zf=Jf(!1),Bl=zr(null),Hl=null,Sa=null,zu=null;function Uu(){zu=Sa=Hl=null}function $u(e){var t=Bl.current;ht(Bl),e._currentValue=t}function qu(e,t,s){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===s)break;e=e.return}}function Ca(e,t){Hl=e,zu=Sa=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(un=!0),e.firstContext=null)}function En(e){var t=e._currentValue;if(zu!==e)if(e={context:e,memoizedValue:t,next:null},Sa===null){if(Hl===null)throw Error(a(308));Sa=e,Hl.dependencies={lanes:0,firstContext:e}}else Sa=Sa.next=e;return t}var Ts=null;function Bu(e){Ts===null?Ts=[e]:Ts.push(e)}function eh(e,t,s,l){var c=t.interleaved;return c===null?(s.next=s,Bu(t)):(s.next=c.next,c.next=s),t.interleaved=s,pr(e,l)}function pr(e,t){e.lanes|=t;var s=e.alternate;for(s!==null&&(s.lanes|=t),s=e,e=e.return;e!==null;)e.childLanes|=t,s=e.alternate,s!==null&&(s.childLanes|=t),s=e,e=e.return;return s.tag===3?s.stateNode:null}var qr=!1;function Hu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function th(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 mr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Br(e,t,s){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Ke&2)!==0){var c=l.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),l.pending=t,pr(e,s)}return c=l.interleaved,c===null?(t.next=t,Bu(l)):(t.next=c.next,c.next=t),l.interleaved=t,pr(e,s)}function Ql(e,t,s){if(t=t.updateQueue,t!==null&&(t=t.shared,(s&4194240)!==0)){var l=t.lanes;l&=e.pendingLanes,s|=l,t.lanes=s,su(e,s)}}function nh(e,t){var s=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,s===l)){var c=null,f=null;if(s=s.firstBaseUpdate,s!==null){do{var v={eventTime:s.eventTime,lane:s.lane,tag:s.tag,payload:s.payload,callback:s.callback,next:null};f===null?c=f=v:f=f.next=v,s=s.next}while(s!==null);f===null?c=f=t:f=f.next=t}else c=f=t;s={baseState:l.baseState,firstBaseUpdate:c,lastBaseUpdate:f,shared:l.shared,effects:l.effects},e.updateQueue=s;return}e=s.lastBaseUpdate,e===null?s.firstBaseUpdate=t:e.next=t,s.lastBaseUpdate=t}function Vl(e,t,s,l){var c=e.updateQueue;qr=!1;var f=c.firstBaseUpdate,v=c.lastBaseUpdate,j=c.shared.pending;if(j!==null){c.shared.pending=null;var E=j,F=E.next;E.next=null,v===null?f=F:v.next=F,v=E;var W=e.alternate;W!==null&&(W=W.updateQueue,j=W.lastBaseUpdate,j!==v&&(j===null?W.firstBaseUpdate=F:j.next=F,W.lastBaseUpdate=E))}if(f!==null){var K=c.baseState;v=0,W=F=E=null,j=f;do{var H=j.lane,te=j.eventTime;if((l&H)===H){W!==null&&(W=W.next={eventTime:te,lane:0,tag:j.tag,payload:j.payload,callback:j.callback,next:null});e:{var ae=e,oe=j;switch(H=t,te=s,oe.tag){case 1:if(ae=oe.payload,typeof ae=="function"){K=ae.call(te,K,H);break e}K=ae;break e;case 3:ae.flags=ae.flags&-65537|128;case 0:if(ae=oe.payload,H=typeof ae=="function"?ae.call(te,K,H):ae,H==null)break e;K=U({},K,H);break e;case 2:qr=!0}}j.callback!==null&&j.lane!==0&&(e.flags|=64,H=c.effects,H===null?c.effects=[j]:H.push(j))}else te={eventTime:te,lane:H,tag:j.tag,payload:j.payload,callback:j.callback,next:null},W===null?(F=W=te,E=K):W=W.next=te,v|=H;if(j=j.next,j===null){if(j=c.shared.pending,j===null)break;H=j,j=H.next,H.next=null,c.lastBaseUpdate=H,c.shared.pending=null}}while(!0);if(W===null&&(E=K),c.baseState=E,c.firstBaseUpdate=F,c.lastBaseUpdate=W,t=c.shared.interleaved,t!==null){c=t;do v|=c.lane,c=c.next;while(c!==t)}else f===null&&(c.shared.lanes=0);_s|=v,e.lanes=v,e.memoizedState=K}}function rh(e,t,s){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var l=e[t],c=l.callback;if(c!==null){if(l.callback=null,l=s,typeof c!="function")throw Error(a(191,c));c.call(l)}}}var Ri={},Zn=zr(Ri),Pi=zr(Ri),Ti=zr(Ri);function Ls(e){if(e===Ri)throw Error(a(174));return e}function Qu(e,t){switch(ut(Ti,t),ut(Pi,e),ut(Zn,Ri),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:gn(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=gn(t,e)}ht(Zn),ut(Zn,t)}function Na(){ht(Zn),ht(Pi),ht(Ti)}function sh(e){Ls(Ti.current);var t=Ls(Zn.current),s=gn(t,e.type);t!==s&&(ut(Pi,e),ut(Zn,s))}function Vu(e){Pi.current===e&&(ht(Zn),ht(Pi))}var yt=zr(0);function Wl(e){for(var t=e;t!==null;){if(t.tag===13){var s=t.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||s.data==="$?"||s.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Wu=[];function Ku(){for(var e=0;e<Wu.length;e++)Wu[e]._workInProgressVersionPrimary=null;Wu.length=0}var Kl=Q.ReactCurrentDispatcher,Gu=Q.ReactCurrentBatchConfig,Ms=0,vt=null,Lt=null,zt=null,Gl=!1,Li=!1,Mi=0,bv=0;function Wt(){throw Error(a(321))}function Yu(e,t){if(t===null)return!1;for(var s=0;s<t.length&&s<e.length;s++)if(!In(e[s],t[s]))return!1;return!0}function Xu(e,t,s,l,c,f){if(Ms=f,vt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Kl.current=e===null||e.memoizedState===null?Nv:Ev,e=s(l,c),Li){f=0;do{if(Li=!1,Mi=0,25<=f)throw Error(a(301));f+=1,zt=Lt=null,t.updateQueue=null,Kl.current=Rv,e=s(l,c)}while(Li)}if(Kl.current=Jl,t=Lt!==null&&Lt.next!==null,Ms=0,zt=Lt=vt=null,Gl=!1,t)throw Error(a(300));return e}function Ju(){var e=Mi!==0;return Mi=0,e}function er(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return zt===null?vt.memoizedState=zt=e:zt=zt.next=e,zt}function Rn(){if(Lt===null){var e=vt.alternate;e=e!==null?e.memoizedState:null}else e=Lt.next;var t=zt===null?vt.memoizedState:zt.next;if(t!==null)zt=t,Lt=e;else{if(e===null)throw Error(a(310));Lt=e,e={memoizedState:Lt.memoizedState,baseState:Lt.baseState,baseQueue:Lt.baseQueue,queue:Lt.queue,next:null},zt===null?vt.memoizedState=zt=e:zt=zt.next=e}return zt}function _i(e,t){return typeof t=="function"?t(e):t}function Zu(e){var t=Rn(),s=t.queue;if(s===null)throw Error(a(311));s.lastRenderedReducer=e;var l=Lt,c=l.baseQueue,f=s.pending;if(f!==null){if(c!==null){var v=c.next;c.next=f.next,f.next=v}l.baseQueue=c=f,s.pending=null}if(c!==null){f=c.next,l=l.baseState;var j=v=null,E=null,F=f;do{var W=F.lane;if((Ms&W)===W)E!==null&&(E=E.next={lane:0,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null}),l=F.hasEagerState?F.eagerState:e(l,F.action);else{var K={lane:W,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null};E===null?(j=E=K,v=l):E=E.next=K,vt.lanes|=W,_s|=W}F=F.next}while(F!==null&&F!==f);E===null?v=l:E.next=j,In(l,t.memoizedState)||(un=!0),t.memoizedState=l,t.baseState=v,t.baseQueue=E,s.lastRenderedState=l}if(e=s.interleaved,e!==null){c=e;do f=c.lane,vt.lanes|=f,_s|=f,c=c.next;while(c!==e)}else c===null&&(s.lanes=0);return[t.memoizedState,s.dispatch]}function ec(e){var t=Rn(),s=t.queue;if(s===null)throw Error(a(311));s.lastRenderedReducer=e;var l=s.dispatch,c=s.pending,f=t.memoizedState;if(c!==null){s.pending=null;var v=c=c.next;do f=e(f,v.action),v=v.next;while(v!==c);In(f,t.memoizedState)||(un=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),s.lastRenderedState=f}return[f,l]}function ah(){}function ih(e,t){var s=vt,l=Rn(),c=t(),f=!In(l.memoizedState,c);if(f&&(l.memoizedState=c,un=!0),l=l.queue,tc(uh.bind(null,s,l,e),[e]),l.getSnapshot!==t||f||zt!==null&&zt.memoizedState.tag&1){if(s.flags|=2048,Ai(9,oh.bind(null,s,l,c,t),void 0,null),Ut===null)throw Error(a(349));(Ms&30)!==0||lh(s,t,c)}return c}function lh(e,t,s){e.flags|=16384,e={getSnapshot:t,value:s},t=vt.updateQueue,t===null?(t={lastEffect:null,stores:null},vt.updateQueue=t,t.stores=[e]):(s=t.stores,s===null?t.stores=[e]:s.push(e))}function oh(e,t,s,l){t.value=s,t.getSnapshot=l,ch(t)&&dh(e)}function uh(e,t,s){return s(function(){ch(t)&&dh(e)})}function ch(e){var t=e.getSnapshot;e=e.value;try{var s=t();return!In(e,s)}catch{return!0}}function dh(e){var t=pr(e,1);t!==null&&Bn(t,e,1,-1)}function fh(e){var t=er();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:_i,lastRenderedState:e},t.queue=e,e=e.dispatch=Cv.bind(null,vt,e),[t.memoizedState,e]}function Ai(e,t,s,l){return e={tag:e,create:t,destroy:s,deps:l,next:null},t=vt.updateQueue,t===null?(t={lastEffect:null,stores:null},vt.updateQueue=t,t.lastEffect=e.next=e):(s=t.lastEffect,s===null?t.lastEffect=e.next=e:(l=s.next,s.next=e,e.next=l,t.lastEffect=e)),e}function hh(){return Rn().memoizedState}function Yl(e,t,s,l){var c=er();vt.flags|=e,c.memoizedState=Ai(1|t,s,void 0,l===void 0?null:l)}function Xl(e,t,s,l){var c=Rn();l=l===void 0?null:l;var f=void 0;if(Lt!==null){var v=Lt.memoizedState;if(f=v.destroy,l!==null&&Yu(l,v.deps)){c.memoizedState=Ai(t,s,f,l);return}}vt.flags|=e,c.memoizedState=Ai(1|t,s,f,l)}function ph(e,t){return Yl(8390656,8,e,t)}function tc(e,t){return Xl(2048,8,e,t)}function mh(e,t){return Xl(4,2,e,t)}function gh(e,t){return Xl(4,4,e,t)}function yh(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 vh(e,t,s){return s=s!=null?s.concat([e]):null,Xl(4,4,yh.bind(null,t,e),s)}function nc(){}function xh(e,t){var s=Rn();t=t===void 0?null:t;var l=s.memoizedState;return l!==null&&t!==null&&Yu(t,l[1])?l[0]:(s.memoizedState=[e,t],e)}function wh(e,t){var s=Rn();t=t===void 0?null:t;var l=s.memoizedState;return l!==null&&t!==null&&Yu(t,l[1])?l[0]:(e=e(),s.memoizedState=[e,t],e)}function kh(e,t,s){return(Ms&21)===0?(e.baseState&&(e.baseState=!1,un=!0),e.memoizedState=s):(In(s,t)||(s=Yd(),vt.lanes|=s,_s|=s,e.baseState=!0),t)}function jv(e,t){var s=nt;nt=s!==0&&4>s?s:4,e(!0);var l=Gu.transition;Gu.transition={};try{e(!1),t()}finally{nt=s,Gu.transition=l}}function bh(){return Rn().memoizedState}function Sv(e,t,s){var l=Wr(e);if(s={lane:l,action:s,hasEagerState:!1,eagerState:null,next:null},jh(e))Sh(t,s);else if(s=eh(e,t,s,l),s!==null){var c=Jt();Bn(s,e,l,c),Ch(s,t,l)}}function Cv(e,t,s){var l=Wr(e),c={lane:l,action:s,hasEagerState:!1,eagerState:null,next:null};if(jh(e))Sh(t,c);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=t.lastRenderedReducer,f!==null))try{var v=t.lastRenderedState,j=f(v,s);if(c.hasEagerState=!0,c.eagerState=j,In(j,v)){var E=t.interleaved;E===null?(c.next=c,Bu(t)):(c.next=E.next,E.next=c),t.interleaved=c;return}}catch{}finally{}s=eh(e,t,c,l),s!==null&&(c=Jt(),Bn(s,e,l,c),Ch(s,t,l))}}function jh(e){var t=e.alternate;return e===vt||t!==null&&t===vt}function Sh(e,t){Li=Gl=!0;var s=e.pending;s===null?t.next=t:(t.next=s.next,s.next=t),e.pending=t}function Ch(e,t,s){if((s&4194240)!==0){var l=t.lanes;l&=e.pendingLanes,s|=l,t.lanes=s,su(e,s)}}var Jl={readContext:En,useCallback:Wt,useContext:Wt,useEffect:Wt,useImperativeHandle:Wt,useInsertionEffect:Wt,useLayoutEffect:Wt,useMemo:Wt,useReducer:Wt,useRef:Wt,useState:Wt,useDebugValue:Wt,useDeferredValue:Wt,useTransition:Wt,useMutableSource:Wt,useSyncExternalStore:Wt,useId:Wt,unstable_isNewReconciler:!1},Nv={readContext:En,useCallback:function(e,t){return er().memoizedState=[e,t===void 0?null:t],e},useContext:En,useEffect:ph,useImperativeHandle:function(e,t,s){return s=s!=null?s.concat([e]):null,Yl(4194308,4,yh.bind(null,t,e),s)},useLayoutEffect:function(e,t){return Yl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Yl(4,2,e,t)},useMemo:function(e,t){var s=er();return t=t===void 0?null:t,e=e(),s.memoizedState=[e,t],e},useReducer:function(e,t,s){var l=er();return t=s!==void 0?s(t):t,l.memoizedState=l.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},l.queue=e,e=e.dispatch=Sv.bind(null,vt,e),[l.memoizedState,e]},useRef:function(e){var t=er();return e={current:e},t.memoizedState=e},useState:fh,useDebugValue:nc,useDeferredValue:function(e){return er().memoizedState=e},useTransition:function(){var e=fh(!1),t=e[0];return e=jv.bind(null,e[1]),er().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,s){var l=vt,c=er();if(gt){if(s===void 0)throw Error(a(407));s=s()}else{if(s=t(),Ut===null)throw Error(a(349));(Ms&30)!==0||lh(l,t,s)}c.memoizedState=s;var f={value:s,getSnapshot:t};return c.queue=f,ph(uh.bind(null,l,f,e),[e]),l.flags|=2048,Ai(9,oh.bind(null,l,f,s,t),void 0,null),s},useId:function(){var e=er(),t=Ut.identifierPrefix;if(gt){var s=hr,l=fr;s=(l&~(1<<32-Tt(l)-1)).toString(32)+s,t=":"+t+"R"+s,s=Mi++,0<s&&(t+="H"+s.toString(32)),t+=":"}else s=bv++,t=":"+t+"r"+s.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Ev={readContext:En,useCallback:xh,useContext:En,useEffect:tc,useImperativeHandle:vh,useInsertionEffect:mh,useLayoutEffect:gh,useMemo:wh,useReducer:Zu,useRef:hh,useState:function(){return Zu(_i)},useDebugValue:nc,useDeferredValue:function(e){var t=Rn();return kh(t,Lt.memoizedState,e)},useTransition:function(){var e=Zu(_i)[0],t=Rn().memoizedState;return[e,t]},useMutableSource:ah,useSyncExternalStore:ih,useId:bh,unstable_isNewReconciler:!1},Rv={readContext:En,useCallback:xh,useContext:En,useEffect:tc,useImperativeHandle:vh,useInsertionEffect:mh,useLayoutEffect:gh,useMemo:wh,useReducer:ec,useRef:hh,useState:function(){return ec(_i)},useDebugValue:nc,useDeferredValue:function(e){var t=Rn();return Lt===null?t.memoizedState=e:kh(t,Lt.memoizedState,e)},useTransition:function(){var e=ec(_i)[0],t=Rn().memoizedState;return[e,t]},useMutableSource:ah,useSyncExternalStore:ih,useId:bh,unstable_isNewReconciler:!1};function Un(e,t){if(e&&e.defaultProps){t=U({},t),e=e.defaultProps;for(var s in e)t[s]===void 0&&(t[s]=e[s]);return t}return t}function rc(e,t,s,l){t=e.memoizedState,s=s(l,t),s=s==null?t:U({},t,s),e.memoizedState=s,e.lanes===0&&(e.updateQueue.baseState=s)}var Zl={isMounted:function(e){return(e=e._reactInternals)?we(e)===e:!1},enqueueSetState:function(e,t,s){e=e._reactInternals;var l=Jt(),c=Wr(e),f=mr(l,c);f.payload=t,s!=null&&(f.callback=s),t=Br(e,f,c),t!==null&&(Bn(t,e,c,l),Ql(t,e,c))},enqueueReplaceState:function(e,t,s){e=e._reactInternals;var l=Jt(),c=Wr(e),f=mr(l,c);f.tag=1,f.payload=t,s!=null&&(f.callback=s),t=Br(e,f,c),t!==null&&(Bn(t,e,c,l),Ql(t,e,c))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var s=Jt(),l=Wr(e),c=mr(s,l);c.tag=2,t!=null&&(c.callback=t),t=Br(e,c,l),t!==null&&(Bn(t,e,l,s),Ql(t,e,l))}};function Nh(e,t,s,l,c,f,v){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,f,v):t.prototype&&t.prototype.isPureReactComponent?!wi(s,l)||!wi(c,f):!0}function Eh(e,t,s){var l=!1,c=Ur,f=t.contextType;return typeof f=="object"&&f!==null?f=En(f):(c=on(t)?Es:Vt.current,l=t.contextTypes,f=(l=l!=null)?xa(e,c):Ur),t=new t(s,f),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Zl,e.stateNode=t,t._reactInternals=e,l&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=c,e.__reactInternalMemoizedMaskedChildContext=f),t}function Rh(e,t,s,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(s,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(s,l),t.state!==e&&Zl.enqueueReplaceState(t,t.state,null)}function sc(e,t,s,l){var c=e.stateNode;c.props=s,c.state=e.memoizedState,c.refs={},Hu(e);var f=t.contextType;typeof f=="object"&&f!==null?c.context=En(f):(f=on(t)?Es:Vt.current,c.context=xa(e,f)),c.state=e.memoizedState,f=t.getDerivedStateFromProps,typeof f=="function"&&(rc(e,t,f,s),c.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(t=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),t!==c.state&&Zl.enqueueReplaceState(c,c.state,null),Vl(e,s,c,l),c.state=e.memoizedState),typeof c.componentDidMount=="function"&&(e.flags|=4194308)}function Ea(e,t){try{var s="",l=t;do s+=xe(l),l=l.return;while(l);var c=s}catch(f){c=`
|
|
39
|
-
Error generating stack: `+f.message+`
|
|
40
|
-
`+f.stack}return{value:e,source:t,stack:c,digest:null}}function ac(e,t,s){return{value:e,source:null,stack:s??null,digest:t??null}}function ic(e,t){try{console.error(t.value)}catch(s){setTimeout(function(){throw s})}}var Pv=typeof WeakMap=="function"?WeakMap:Map;function Ph(e,t,s){s=mr(-1,s),s.tag=3,s.payload={element:null};var l=t.value;return s.callback=function(){io||(io=!0,kc=l),ic(e,t)},s}function Th(e,t,s){s=mr(-1,s),s.tag=3;var l=e.type.getDerivedStateFromError;if(typeof l=="function"){var c=t.value;s.payload=function(){return l(c)},s.callback=function(){ic(e,t)}}var f=e.stateNode;return f!==null&&typeof f.componentDidCatch=="function"&&(s.callback=function(){ic(e,t),typeof l!="function"&&(Qr===null?Qr=new Set([this]):Qr.add(this));var v=t.stack;this.componentDidCatch(t.value,{componentStack:v!==null?v:""})}),s}function Lh(e,t,s){var l=e.pingCache;if(l===null){l=e.pingCache=new Pv;var c=new Set;l.set(t,c)}else c=l.get(t),c===void 0&&(c=new Set,l.set(t,c));c.has(s)||(c.add(s),e=Bv.bind(null,e,t,s),t.then(e,e))}function Mh(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 _h(e,t,s,l,c){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,s.flags|=131072,s.flags&=-52805,s.tag===1&&(s.alternate===null?s.tag=17:(t=mr(-1,1),t.tag=2,Br(s,t,1))),s.lanes|=1),e):(e.flags|=65536,e.lanes=c,e)}var Tv=Q.ReactCurrentOwner,un=!1;function Xt(e,t,s,l){t.child=e===null?Zf(t,null,s,l):ja(t,e.child,s,l)}function Ah(e,t,s,l,c){s=s.render;var f=t.ref;return Ca(t,c),l=Xu(e,t,s,l,f,c),s=Ju(),e!==null&&!un?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~c,gr(e,t,c)):(gt&&s&&Au(t),t.flags|=1,Xt(e,t,l,c),t.child)}function Dh(e,t,s,l,c){if(e===null){var f=s.type;return typeof f=="function"&&!Rc(f)&&f.defaultProps===void 0&&s.compare===null&&s.defaultProps===void 0?(t.tag=15,t.type=f,Oh(e,t,f,l,c)):(e=ho(s.type,null,l,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,(e.lanes&c)===0){var v=f.memoizedProps;if(s=s.compare,s=s!==null?s:wi,s(v,l)&&e.ref===t.ref)return gr(e,t,c)}return t.flags|=1,e=Gr(f,l),e.ref=t.ref,e.return=t,t.child=e}function Oh(e,t,s,l,c){if(e!==null){var f=e.memoizedProps;if(wi(f,l)&&e.ref===t.ref)if(un=!1,t.pendingProps=l=f,(e.lanes&c)!==0)(e.flags&131072)!==0&&(un=!0);else return t.lanes=e.lanes,gr(e,t,c)}return lc(e,t,s,l,c)}function Fh(e,t,s){var l=t.pendingProps,c=l.children,f=e!==null?e.memoizedState:null;if(l.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ut(Pa,wn),wn|=s;else{if((s&1073741824)===0)return e=f!==null?f.baseLanes|s:s,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ut(Pa,wn),wn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},l=f!==null?f.baseLanes:s,ut(Pa,wn),wn|=l}else f!==null?(l=f.baseLanes|s,t.memoizedState=null):l=s,ut(Pa,wn),wn|=l;return Xt(e,t,c,s),t.child}function Ih(e,t){var s=t.ref;(e===null&&s!==null||e!==null&&e.ref!==s)&&(t.flags|=512,t.flags|=2097152)}function lc(e,t,s,l,c){var f=on(s)?Es:Vt.current;return f=xa(t,f),Ca(t,c),s=Xu(e,t,s,l,f,c),l=Ju(),e!==null&&!un?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~c,gr(e,t,c)):(gt&&l&&Au(t),t.flags|=1,Xt(e,t,s,c),t.child)}function zh(e,t,s,l,c){if(on(s)){var f=!0;Fl(t)}else f=!1;if(Ca(t,c),t.stateNode===null)to(e,t),Eh(t,s,l),sc(t,s,l,c),l=!0;else if(e===null){var v=t.stateNode,j=t.memoizedProps;v.props=j;var E=v.context,F=s.contextType;typeof F=="object"&&F!==null?F=En(F):(F=on(s)?Es:Vt.current,F=xa(t,F));var W=s.getDerivedStateFromProps,K=typeof W=="function"||typeof v.getSnapshotBeforeUpdate=="function";K||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(j!==l||E!==F)&&Rh(t,v,l,F),qr=!1;var H=t.memoizedState;v.state=H,Vl(t,l,v,c),E=t.memoizedState,j!==l||H!==E||ln.current||qr?(typeof W=="function"&&(rc(t,s,W,l),E=t.memoizedState),(j=qr||Nh(t,s,j,l,H,E,F))?(K||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount()),typeof v.componentDidMount=="function"&&(t.flags|=4194308)):(typeof v.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=E),v.props=l,v.state=E,v.context=F,l=j):(typeof v.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{v=t.stateNode,th(e,t),j=t.memoizedProps,F=t.type===t.elementType?j:Un(t.type,j),v.props=F,K=t.pendingProps,H=v.context,E=s.contextType,typeof E=="object"&&E!==null?E=En(E):(E=on(s)?Es:Vt.current,E=xa(t,E));var te=s.getDerivedStateFromProps;(W=typeof te=="function"||typeof v.getSnapshotBeforeUpdate=="function")||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(j!==K||H!==E)&&Rh(t,v,l,E),qr=!1,H=t.memoizedState,v.state=H,Vl(t,l,v,c);var ae=t.memoizedState;j!==K||H!==ae||ln.current||qr?(typeof te=="function"&&(rc(t,s,te,l),ae=t.memoizedState),(F=qr||Nh(t,s,F,l,H,ae,E)||!1)?(W||typeof v.UNSAFE_componentWillUpdate!="function"&&typeof v.componentWillUpdate!="function"||(typeof v.componentWillUpdate=="function"&&v.componentWillUpdate(l,ae,E),typeof v.UNSAFE_componentWillUpdate=="function"&&v.UNSAFE_componentWillUpdate(l,ae,E)),typeof v.componentDidUpdate=="function"&&(t.flags|=4),typeof v.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof v.componentDidUpdate!="function"||j===e.memoizedProps&&H===e.memoizedState||(t.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||j===e.memoizedProps&&H===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=ae),v.props=l,v.state=ae,v.context=E,l=F):(typeof v.componentDidUpdate!="function"||j===e.memoizedProps&&H===e.memoizedState||(t.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||j===e.memoizedProps&&H===e.memoizedState||(t.flags|=1024),l=!1)}return oc(e,t,s,l,f,c)}function oc(e,t,s,l,c,f){Ih(e,t);var v=(t.flags&128)!==0;if(!l&&!v)return c&&Hf(t,s,!1),gr(e,t,f);l=t.stateNode,Tv.current=t;var j=v&&typeof s.getDerivedStateFromError!="function"?null:l.render();return t.flags|=1,e!==null&&v?(t.child=ja(t,e.child,null,f),t.child=ja(t,null,j,f)):Xt(e,t,j,f),t.memoizedState=l.state,c&&Hf(t,s,!0),t.child}function Uh(e){var t=e.stateNode;t.pendingContext?qf(e,t.pendingContext,t.pendingContext!==t.context):t.context&&qf(e,t.context,!1),Qu(e,t.containerInfo)}function $h(e,t,s,l,c){return ba(),Iu(c),t.flags|=256,Xt(e,t,s,l),t.child}var uc={dehydrated:null,treeContext:null,retryLane:0};function cc(e){return{baseLanes:e,cachePool:null,transitions:null}}function qh(e,t,s){var l=t.pendingProps,c=yt.current,f=!1,v=(t.flags&128)!==0,j;if((j=v)||(j=e!==null&&e.memoizedState===null?!1:(c&2)!==0),j?(f=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(c|=1),ut(yt,c&1),e===null)return Fu(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(v=l.children,e=l.fallback,f?(l=t.mode,f=t.child,v={mode:"hidden",children:v},(l&1)===0&&f!==null?(f.childLanes=0,f.pendingProps=v):f=po(v,l,0,null),e=Fs(e,l,s,null),f.return=t,e.return=t,f.sibling=e,t.child=f,t.child.memoizedState=cc(s),t.memoizedState=uc,e):dc(t,v));if(c=e.memoizedState,c!==null&&(j=c.dehydrated,j!==null))return Lv(e,t,v,l,j,c,s);if(f){f=l.fallback,v=t.mode,c=e.child,j=c.sibling;var E={mode:"hidden",children:l.children};return(v&1)===0&&t.child!==c?(l=t.child,l.childLanes=0,l.pendingProps=E,t.deletions=null):(l=Gr(c,E),l.subtreeFlags=c.subtreeFlags&14680064),j!==null?f=Gr(j,f):(f=Fs(f,v,s,null),f.flags|=2),f.return=t,l.return=t,l.sibling=f,t.child=l,l=f,f=t.child,v=e.child.memoizedState,v=v===null?cc(s):{baseLanes:v.baseLanes|s,cachePool:null,transitions:v.transitions},f.memoizedState=v,f.childLanes=e.childLanes&~s,t.memoizedState=uc,l}return f=e.child,e=f.sibling,l=Gr(f,{mode:"visible",children:l.children}),(t.mode&1)===0&&(l.lanes=s),l.return=t,l.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=l,t.memoizedState=null,l}function dc(e,t){return t=po({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function eo(e,t,s,l){return l!==null&&Iu(l),ja(t,e.child,null,s),e=dc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Lv(e,t,s,l,c,f,v){if(s)return t.flags&256?(t.flags&=-257,l=ac(Error(a(422))),eo(e,t,v,l)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(f=l.fallback,c=t.mode,l=po({mode:"visible",children:l.children},c,0,null),f=Fs(f,c,v,null),f.flags|=2,l.return=t,f.return=t,l.sibling=f,t.child=l,(t.mode&1)!==0&&ja(t,e.child,null,v),t.child.memoizedState=cc(v),t.memoizedState=uc,f);if((t.mode&1)===0)return eo(e,t,v,null);if(c.data==="$!"){if(l=c.nextSibling&&c.nextSibling.dataset,l)var j=l.dgst;return l=j,f=Error(a(419)),l=ac(f,l,void 0),eo(e,t,v,l)}if(j=(v&e.childLanes)!==0,un||j){if(l=Ut,l!==null){switch(v&-v){case 4:c=2;break;case 16:c=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:c=32;break;case 536870912:c=268435456;break;default:c=0}c=(c&(l.suspendedLanes|v))!==0?0:c,c!==0&&c!==f.retryLane&&(f.retryLane=c,pr(e,c),Bn(l,e,c,-1))}return Ec(),l=ac(Error(a(421))),eo(e,t,v,l)}return c.data==="$?"?(t.flags|=128,t.child=e.child,t=Hv.bind(null,e),c._reactRetry=t,null):(e=f.treeContext,xn=Ir(c.nextSibling),vn=t,gt=!0,zn=null,e!==null&&(Cn[Nn++]=fr,Cn[Nn++]=hr,Cn[Nn++]=Rs,fr=e.id,hr=e.overflow,Rs=t),t=dc(t,l.children),t.flags|=4096,t)}function Bh(e,t,s){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),qu(e.return,t,s)}function fc(e,t,s,l,c){var f=e.memoizedState;f===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:s,tailMode:c}:(f.isBackwards=t,f.rendering=null,f.renderingStartTime=0,f.last=l,f.tail=s,f.tailMode=c)}function Hh(e,t,s){var l=t.pendingProps,c=l.revealOrder,f=l.tail;if(Xt(e,t,l.children,s),l=yt.current,(l&2)!==0)l=l&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Bh(e,s,t);else if(e.tag===19)Bh(e,s,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}l&=1}if(ut(yt,l),(t.mode&1)===0)t.memoizedState=null;else switch(c){case"forwards":for(s=t.child,c=null;s!==null;)e=s.alternate,e!==null&&Wl(e)===null&&(c=s),s=s.sibling;s=c,s===null?(c=t.child,t.child=null):(c=s.sibling,s.sibling=null),fc(t,!1,c,s,f);break;case"backwards":for(s=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&Wl(e)===null){t.child=c;break}e=c.sibling,c.sibling=s,s=c,c=e}fc(t,!0,s,null,f);break;case"together":fc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function to(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function gr(e,t,s){if(e!==null&&(t.dependencies=e.dependencies),_s|=t.lanes,(s&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(a(153));if(t.child!==null){for(e=t.child,s=Gr(e,e.pendingProps),t.child=s,s.return=t;e.sibling!==null;)e=e.sibling,s=s.sibling=Gr(e,e.pendingProps),s.return=t;s.sibling=null}return t.child}function Mv(e,t,s){switch(t.tag){case 3:Uh(t),ba();break;case 5:sh(t);break;case 1:on(t.type)&&Fl(t);break;case 4:Qu(t,t.stateNode.containerInfo);break;case 10:var l=t.type._context,c=t.memoizedProps.value;ut(Bl,l._currentValue),l._currentValue=c;break;case 13:if(l=t.memoizedState,l!==null)return l.dehydrated!==null?(ut(yt,yt.current&1),t.flags|=128,null):(s&t.child.childLanes)!==0?qh(e,t,s):(ut(yt,yt.current&1),e=gr(e,t,s),e!==null?e.sibling:null);ut(yt,yt.current&1);break;case 19:if(l=(s&t.childLanes)!==0,(e.flags&128)!==0){if(l)return Hh(e,t,s);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),ut(yt,yt.current),l)break;return null;case 22:case 23:return t.lanes=0,Fh(e,t,s)}return gr(e,t,s)}var Qh,hc,Vh,Wh;Qh=function(e,t){for(var s=t.child;s!==null;){if(s.tag===5||s.tag===6)e.appendChild(s.stateNode);else if(s.tag!==4&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break;for(;s.sibling===null;){if(s.return===null||s.return===t)return;s=s.return}s.sibling.return=s.return,s=s.sibling}},hc=function(){},Vh=function(e,t,s,l){var c=e.memoizedProps;if(c!==l){e=t.stateNode,Ls(Zn.current);var f=null;switch(s){case"input":c=Kn(e,c),l=Kn(e,l),f=[];break;case"select":c=U({},c,{value:void 0}),l=U({},l,{value:void 0}),f=[];break;case"textarea":c=ti(e,c),l=ti(e,l),f=[];break;default:typeof c.onClick!="function"&&typeof l.onClick=="function"&&(e.onclick=Al)}ra(s,l);var v;s=null;for(F in c)if(!l.hasOwnProperty(F)&&c.hasOwnProperty(F)&&c[F]!=null)if(F==="style"){var j=c[F];for(v in j)j.hasOwnProperty(v)&&(s||(s={}),s[v]="")}else F!=="dangerouslySetInnerHTML"&&F!=="children"&&F!=="suppressContentEditableWarning"&&F!=="suppressHydrationWarning"&&F!=="autoFocus"&&(u.hasOwnProperty(F)?f||(f=[]):(f=f||[]).push(F,null));for(F in l){var E=l[F];if(j=c!=null?c[F]:void 0,l.hasOwnProperty(F)&&E!==j&&(E!=null||j!=null))if(F==="style")if(j){for(v in j)!j.hasOwnProperty(v)||E&&E.hasOwnProperty(v)||(s||(s={}),s[v]="");for(v in E)E.hasOwnProperty(v)&&j[v]!==E[v]&&(s||(s={}),s[v]=E[v])}else s||(f||(f=[]),f.push(F,s)),s=E;else F==="dangerouslySetInnerHTML"?(E=E?E.__html:void 0,j=j?j.__html:void 0,E!=null&&j!==E&&(f=f||[]).push(F,E)):F==="children"?typeof E!="string"&&typeof E!="number"||(f=f||[]).push(F,""+E):F!=="suppressContentEditableWarning"&&F!=="suppressHydrationWarning"&&(u.hasOwnProperty(F)?(E!=null&&F==="onScroll"&&ft("scroll",e),f||j===E||(f=[])):(f=f||[]).push(F,E))}s&&(f=f||[]).push("style",s);var F=f;(t.updateQueue=F)&&(t.flags|=4)}},Wh=function(e,t,s,l){s!==l&&(t.flags|=4)};function Di(e,t){if(!gt)switch(e.tailMode){case"hidden":t=e.tail;for(var s=null;t!==null;)t.alternate!==null&&(s=t),t=t.sibling;s===null?e.tail=null:s.sibling=null;break;case"collapsed":s=e.tail;for(var l=null;s!==null;)s.alternate!==null&&(l=s),s=s.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function Kt(e){var t=e.alternate!==null&&e.alternate.child===e.child,s=0,l=0;if(t)for(var c=e.child;c!==null;)s|=c.lanes|c.childLanes,l|=c.subtreeFlags&14680064,l|=c.flags&14680064,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)s|=c.lanes|c.childLanes,l|=c.subtreeFlags,l|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=l,e.childLanes=s,t}function _v(e,t,s){var l=t.pendingProps;switch(Du(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Kt(t),null;case 1:return on(t.type)&&Ol(),Kt(t),null;case 3:return l=t.stateNode,Na(),ht(ln),ht(Vt),Ku(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&($l(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,zn!==null&&(Sc(zn),zn=null))),hc(e,t),Kt(t),null;case 5:Vu(t);var c=Ls(Ti.current);if(s=t.type,e!==null&&t.stateNode!=null)Vh(e,t,s,l,c),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!l){if(t.stateNode===null)throw Error(a(166));return Kt(t),null}if(e=Ls(Zn.current),$l(t)){l=t.stateNode,s=t.type;var f=t.memoizedProps;switch(l[Jn]=t,l[Ci]=f,e=(t.mode&1)!==0,s){case"dialog":ft("cancel",l),ft("close",l);break;case"iframe":case"object":case"embed":ft("load",l);break;case"video":case"audio":for(c=0;c<bi.length;c++)ft(bi[c],l);break;case"source":ft("error",l);break;case"img":case"image":case"link":ft("error",l),ft("load",l);break;case"details":ft("toggle",l);break;case"input":Gn(l,f),ft("invalid",l);break;case"select":l._wrapperState={wasMultiple:!!f.multiple},ft("invalid",l);break;case"textarea":Yn(l,f),ft("invalid",l)}ra(s,f),c=null;for(var v in f)if(f.hasOwnProperty(v)){var j=f[v];v==="children"?typeof j=="string"?l.textContent!==j&&(f.suppressHydrationWarning!==!0&&_l(l.textContent,j,e),c=["children",j]):typeof j=="number"&&l.textContent!==""+j&&(f.suppressHydrationWarning!==!0&&_l(l.textContent,j,e),c=["children",""+j]):u.hasOwnProperty(v)&&j!=null&&v==="onScroll"&&ft("scroll",l)}switch(s){case"input":ot(l),Za(l,f,!0);break;case"textarea":ot(l),ni(l);break;case"select":case"option":break;default:typeof f.onClick=="function"&&(l.onclick=Al)}l=c,t.updateQueue=l,l!==null&&(t.flags|=4)}else{v=c.nodeType===9?c:c.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=na(s)),e==="http://www.w3.org/1999/xhtml"?s==="script"?(e=v.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof l.is=="string"?e=v.createElement(s,{is:l.is}):(e=v.createElement(s),s==="select"&&(v=e,l.multiple?v.multiple=!0:l.size&&(v.size=l.size))):e=v.createElementNS(e,s),e[Jn]=t,e[Ci]=l,Qh(e,t,!1,!1),t.stateNode=e;e:{switch(v=ai(s,l),s){case"dialog":ft("cancel",e),ft("close",e),c=l;break;case"iframe":case"object":case"embed":ft("load",e),c=l;break;case"video":case"audio":for(c=0;c<bi.length;c++)ft(bi[c],e);c=l;break;case"source":ft("error",e),c=l;break;case"img":case"image":case"link":ft("error",e),ft("load",e),c=l;break;case"details":ft("toggle",e),c=l;break;case"input":Gn(e,l),c=Kn(e,l),ft("invalid",e);break;case"option":c=l;break;case"select":e._wrapperState={wasMultiple:!!l.multiple},c=U({},l,{value:void 0}),ft("invalid",e);break;case"textarea":Yn(e,l),c=ti(e,l),ft("invalid",e);break;default:c=l}ra(s,c),j=c;for(f in j)if(j.hasOwnProperty(f)){var E=j[f];f==="style"?si(e,E):f==="dangerouslySetInnerHTML"?(E=E?E.__html:void 0,E!=null&&ri(e,E)):f==="children"?typeof E=="string"?(s!=="textarea"||E!=="")&&xs(e,E):typeof E=="number"&&xs(e,""+E):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(u.hasOwnProperty(f)?E!=null&&f==="onScroll"&&ft("scroll",e):E!=null&&$(e,f,E,v))}switch(s){case"input":ot(e),Za(e,l,!1);break;case"textarea":ot(e),ni(e);break;case"option":l.value!=null&&e.setAttribute("value",""+He(l.value));break;case"select":e.multiple=!!l.multiple,f=l.value,f!=null?Nr(e,!!l.multiple,f,!1):l.defaultValue!=null&&Nr(e,!!l.multiple,l.defaultValue,!0);break;default:typeof c.onClick=="function"&&(e.onclick=Al)}switch(s){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}}l&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Kt(t),null;case 6:if(e&&t.stateNode!=null)Wh(e,t,e.memoizedProps,l);else{if(typeof l!="string"&&t.stateNode===null)throw Error(a(166));if(s=Ls(Ti.current),Ls(Zn.current),$l(t)){if(l=t.stateNode,s=t.memoizedProps,l[Jn]=t,(f=l.nodeValue!==s)&&(e=vn,e!==null))switch(e.tag){case 3:_l(l.nodeValue,s,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&_l(l.nodeValue,s,(e.mode&1)!==0)}f&&(t.flags|=4)}else l=(s.nodeType===9?s:s.ownerDocument).createTextNode(l),l[Jn]=t,t.stateNode=l}return Kt(t),null;case 13:if(ht(yt),l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(gt&&xn!==null&&(t.mode&1)!==0&&(t.flags&128)===0)Yf(),ba(),t.flags|=98560,f=!1;else if(f=$l(t),l!==null&&l.dehydrated!==null){if(e===null){if(!f)throw Error(a(318));if(f=t.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(a(317));f[Jn]=t}else ba(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Kt(t),f=!1}else zn!==null&&(Sc(zn),zn=null),f=!0;if(!f)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=s,t):(l=l!==null,l!==(e!==null&&e.memoizedState!==null)&&l&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(yt.current&1)!==0?Mt===0&&(Mt=3):Ec())),t.updateQueue!==null&&(t.flags|=4),Kt(t),null);case 4:return Na(),hc(e,t),e===null&&ji(t.stateNode.containerInfo),Kt(t),null;case 10:return $u(t.type._context),Kt(t),null;case 17:return on(t.type)&&Ol(),Kt(t),null;case 19:if(ht(yt),f=t.memoizedState,f===null)return Kt(t),null;if(l=(t.flags&128)!==0,v=f.rendering,v===null)if(l)Di(f,!1);else{if(Mt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(v=Wl(e),v!==null){for(t.flags|=128,Di(f,!1),l=v.updateQueue,l!==null&&(t.updateQueue=l,t.flags|=4),t.subtreeFlags=0,l=s,s=t.child;s!==null;)f=s,e=l,f.flags&=14680066,v=f.alternate,v===null?(f.childLanes=0,f.lanes=e,f.child=null,f.subtreeFlags=0,f.memoizedProps=null,f.memoizedState=null,f.updateQueue=null,f.dependencies=null,f.stateNode=null):(f.childLanes=v.childLanes,f.lanes=v.lanes,f.child=v.child,f.subtreeFlags=0,f.deletions=null,f.memoizedProps=v.memoizedProps,f.memoizedState=v.memoizedState,f.updateQueue=v.updateQueue,f.type=v.type,e=v.dependencies,f.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),s=s.sibling;return ut(yt,yt.current&1|2),t.child}e=e.sibling}f.tail!==null&&Ze()>Ta&&(t.flags|=128,l=!0,Di(f,!1),t.lanes=4194304)}else{if(!l)if(e=Wl(v),e!==null){if(t.flags|=128,l=!0,s=e.updateQueue,s!==null&&(t.updateQueue=s,t.flags|=4),Di(f,!0),f.tail===null&&f.tailMode==="hidden"&&!v.alternate&&!gt)return Kt(t),null}else 2*Ze()-f.renderingStartTime>Ta&&s!==1073741824&&(t.flags|=128,l=!0,Di(f,!1),t.lanes=4194304);f.isBackwards?(v.sibling=t.child,t.child=v):(s=f.last,s!==null?s.sibling=v:t.child=v,f.last=v)}return f.tail!==null?(t=f.tail,f.rendering=t,f.tail=t.sibling,f.renderingStartTime=Ze(),t.sibling=null,s=yt.current,ut(yt,l?s&1|2:s&1),t):(Kt(t),null);case 22:case 23:return Nc(),l=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==l&&(t.flags|=8192),l&&(t.mode&1)!==0?(wn&1073741824)!==0&&(Kt(t),t.subtreeFlags&6&&(t.flags|=8192)):Kt(t),null;case 24:return null;case 25:return null}throw Error(a(156,t.tag))}function Av(e,t){switch(Du(t),t.tag){case 1:return on(t.type)&&Ol(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Na(),ht(ln),ht(Vt),Ku(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Vu(t),null;case 13:if(ht(yt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(a(340));ba()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ht(yt),null;case 4:return Na(),null;case 10:return $u(t.type._context),null;case 22:case 23:return Nc(),null;case 24:return null;default:return null}}var no=!1,Gt=!1,Dv=typeof WeakSet=="function"?WeakSet:Set,re=null;function Ra(e,t){var s=e.ref;if(s!==null)if(typeof s=="function")try{s(null)}catch(l){bt(e,t,l)}else s.current=null}function pc(e,t,s){try{s()}catch(l){bt(e,t,l)}}var Kh=!1;function Ov(e,t){if(Nu=bl,e=Nf(),vu(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var l=s.getSelection&&s.getSelection();if(l&&l.rangeCount!==0){s=l.anchorNode;var c=l.anchorOffset,f=l.focusNode;l=l.focusOffset;try{s.nodeType,f.nodeType}catch{s=null;break e}var v=0,j=-1,E=-1,F=0,W=0,K=e,H=null;t:for(;;){for(var te;K!==s||c!==0&&K.nodeType!==3||(j=v+c),K!==f||l!==0&&K.nodeType!==3||(E=v+l),K.nodeType===3&&(v+=K.nodeValue.length),(te=K.firstChild)!==null;)H=K,K=te;for(;;){if(K===e)break t;if(H===s&&++F===c&&(j=v),H===f&&++W===l&&(E=v),(te=K.nextSibling)!==null)break;K=H,H=K.parentNode}K=te}s=j===-1||E===-1?null:{start:j,end:E}}else s=null}s=s||{start:0,end:0}}else s=null;for(Eu={focusedElem:e,selectionRange:s},bl=!1,re=t;re!==null;)if(t=re,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,re=e;else for(;re!==null;){t=re;try{var ae=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(ae!==null){var oe=ae.memoizedProps,Et=ae.memoizedState,D=t.stateNode,P=D.getSnapshotBeforeUpdate(t.elementType===t.type?oe:Un(t.type,oe),Et);D.__reactInternalSnapshotBeforeUpdate=P}break;case 3:var O=t.stateNode.containerInfo;O.nodeType===1?O.textContent="":O.nodeType===9&&O.documentElement&&O.removeChild(O.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(Y){bt(t,t.return,Y)}if(e=t.sibling,e!==null){e.return=t.return,re=e;break}re=t.return}return ae=Kh,Kh=!1,ae}function Oi(e,t,s){var l=t.updateQueue;if(l=l!==null?l.lastEffect:null,l!==null){var c=l=l.next;do{if((c.tag&e)===e){var f=c.destroy;c.destroy=void 0,f!==void 0&&pc(t,s,f)}c=c.next}while(c!==l)}}function ro(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var s=t=t.next;do{if((s.tag&e)===e){var l=s.create;s.destroy=l()}s=s.next}while(s!==t)}}function mc(e){var t=e.ref;if(t!==null){var s=e.stateNode;switch(e.tag){case 5:e=s;break;default:e=s}typeof t=="function"?t(e):t.current=e}}function Gh(e){var t=e.alternate;t!==null&&(e.alternate=null,Gh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Jn],delete t[Ci],delete t[Lu],delete t[vv],delete t[xv])),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 Yh(e){return e.tag===5||e.tag===3||e.tag===4}function Xh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Yh(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 gc(e,t,s){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?s.nodeType===8?s.parentNode.insertBefore(e,t):s.insertBefore(e,t):(s.nodeType===8?(t=s.parentNode,t.insertBefore(e,s)):(t=s,t.appendChild(e)),s=s._reactRootContainer,s!=null||t.onclick!==null||(t.onclick=Al));else if(l!==4&&(e=e.child,e!==null))for(gc(e,t,s),e=e.sibling;e!==null;)gc(e,t,s),e=e.sibling}function yc(e,t,s){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?s.insertBefore(e,t):s.appendChild(e);else if(l!==4&&(e=e.child,e!==null))for(yc(e,t,s),e=e.sibling;e!==null;)yc(e,t,s),e=e.sibling}var Bt=null,$n=!1;function Hr(e,t,s){for(s=s.child;s!==null;)Jh(e,t,s),s=s.sibling}function Jh(e,t,s){if(lt&&typeof lt.onCommitFiberUnmount=="function")try{lt.onCommitFiberUnmount(Ue,s)}catch{}switch(s.tag){case 5:Gt||Ra(s,t);case 6:var l=Bt,c=$n;Bt=null,Hr(e,t,s),Bt=l,$n=c,Bt!==null&&($n?(e=Bt,s=s.stateNode,e.nodeType===8?e.parentNode.removeChild(s):e.removeChild(s)):Bt.removeChild(s.stateNode));break;case 18:Bt!==null&&($n?(e=Bt,s=s.stateNode,e.nodeType===8?Tu(e.parentNode,s):e.nodeType===1&&Tu(e,s),pi(e)):Tu(Bt,s.stateNode));break;case 4:l=Bt,c=$n,Bt=s.stateNode.containerInfo,$n=!0,Hr(e,t,s),Bt=l,$n=c;break;case 0:case 11:case 14:case 15:if(!Gt&&(l=s.updateQueue,l!==null&&(l=l.lastEffect,l!==null))){c=l=l.next;do{var f=c,v=f.destroy;f=f.tag,v!==void 0&&((f&2)!==0||(f&4)!==0)&&pc(s,t,v),c=c.next}while(c!==l)}Hr(e,t,s);break;case 1:if(!Gt&&(Ra(s,t),l=s.stateNode,typeof l.componentWillUnmount=="function"))try{l.props=s.memoizedProps,l.state=s.memoizedState,l.componentWillUnmount()}catch(j){bt(s,t,j)}Hr(e,t,s);break;case 21:Hr(e,t,s);break;case 22:s.mode&1?(Gt=(l=Gt)||s.memoizedState!==null,Hr(e,t,s),Gt=l):Hr(e,t,s);break;default:Hr(e,t,s)}}function Zh(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var s=e.stateNode;s===null&&(s=e.stateNode=new Dv),t.forEach(function(l){var c=Qv.bind(null,e,l);s.has(l)||(s.add(l),l.then(c,c))})}}function qn(e,t){var s=t.deletions;if(s!==null)for(var l=0;l<s.length;l++){var c=s[l];try{var f=e,v=t,j=v;e:for(;j!==null;){switch(j.tag){case 5:Bt=j.stateNode,$n=!1;break e;case 3:Bt=j.stateNode.containerInfo,$n=!0;break e;case 4:Bt=j.stateNode.containerInfo,$n=!0;break e}j=j.return}if(Bt===null)throw Error(a(160));Jh(f,v,c),Bt=null,$n=!1;var E=c.alternate;E!==null&&(E.return=null),c.return=null}catch(F){bt(c,t,F)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)ep(t,e),t=t.sibling}function ep(e,t){var s=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(qn(t,e),tr(e),l&4){try{Oi(3,e,e.return),ro(3,e)}catch(oe){bt(e,e.return,oe)}try{Oi(5,e,e.return)}catch(oe){bt(e,e.return,oe)}}break;case 1:qn(t,e),tr(e),l&512&&s!==null&&Ra(s,s.return);break;case 5:if(qn(t,e),tr(e),l&512&&s!==null&&Ra(s,s.return),e.flags&32){var c=e.stateNode;try{xs(c,"")}catch(oe){bt(e,e.return,oe)}}if(l&4&&(c=e.stateNode,c!=null)){var f=e.memoizedProps,v=s!==null?s.memoizedProps:f,j=e.type,E=e.updateQueue;if(e.updateQueue=null,E!==null)try{j==="input"&&f.type==="radio"&&f.name!=null&&hl(c,f),ai(j,v);var F=ai(j,f);for(v=0;v<E.length;v+=2){var W=E[v],K=E[v+1];W==="style"?si(c,K):W==="dangerouslySetInnerHTML"?ri(c,K):W==="children"?xs(c,K):$(c,W,K,F)}switch(j){case"input":Ja(c,f);break;case"textarea":Er(c,f);break;case"select":var H=c._wrapperState.wasMultiple;c._wrapperState.wasMultiple=!!f.multiple;var te=f.value;te!=null?Nr(c,!!f.multiple,te,!1):H!==!!f.multiple&&(f.defaultValue!=null?Nr(c,!!f.multiple,f.defaultValue,!0):Nr(c,!!f.multiple,f.multiple?[]:"",!1))}c[Ci]=f}catch(oe){bt(e,e.return,oe)}}break;case 6:if(qn(t,e),tr(e),l&4){if(e.stateNode===null)throw Error(a(162));c=e.stateNode,f=e.memoizedProps;try{c.nodeValue=f}catch(oe){bt(e,e.return,oe)}}break;case 3:if(qn(t,e),tr(e),l&4&&s!==null&&s.memoizedState.isDehydrated)try{pi(t.containerInfo)}catch(oe){bt(e,e.return,oe)}break;case 4:qn(t,e),tr(e);break;case 13:qn(t,e),tr(e),c=e.child,c.flags&8192&&(f=c.memoizedState!==null,c.stateNode.isHidden=f,!f||c.alternate!==null&&c.alternate.memoizedState!==null||(wc=Ze())),l&4&&Zh(e);break;case 22:if(W=s!==null&&s.memoizedState!==null,e.mode&1?(Gt=(F=Gt)||W,qn(t,e),Gt=F):qn(t,e),tr(e),l&8192){if(F=e.memoizedState!==null,(e.stateNode.isHidden=F)&&!W&&(e.mode&1)!==0)for(re=e,W=e.child;W!==null;){for(K=re=W;re!==null;){switch(H=re,te=H.child,H.tag){case 0:case 11:case 14:case 15:Oi(4,H,H.return);break;case 1:Ra(H,H.return);var ae=H.stateNode;if(typeof ae.componentWillUnmount=="function"){l=H,s=H.return;try{t=l,ae.props=t.memoizedProps,ae.state=t.memoizedState,ae.componentWillUnmount()}catch(oe){bt(l,s,oe)}}break;case 5:Ra(H,H.return);break;case 22:if(H.memoizedState!==null){rp(K);continue}}te!==null?(te.return=H,re=te):rp(K)}W=W.sibling}e:for(W=null,K=e;;){if(K.tag===5){if(W===null){W=K;try{c=K.stateNode,F?(f=c.style,typeof f.setProperty=="function"?f.setProperty("display","none","important"):f.display="none"):(j=K.stateNode,E=K.memoizedProps.style,v=E!=null&&E.hasOwnProperty("display")?E.display:null,j.style.display=bn("display",v))}catch(oe){bt(e,e.return,oe)}}}else if(K.tag===6){if(W===null)try{K.stateNode.nodeValue=F?"":K.memoizedProps}catch(oe){bt(e,e.return,oe)}}else if((K.tag!==22&&K.tag!==23||K.memoizedState===null||K===e)&&K.child!==null){K.child.return=K,K=K.child;continue}if(K===e)break e;for(;K.sibling===null;){if(K.return===null||K.return===e)break e;W===K&&(W=null),K=K.return}W===K&&(W=null),K.sibling.return=K.return,K=K.sibling}}break;case 19:qn(t,e),tr(e),l&4&&Zh(e);break;case 21:break;default:qn(t,e),tr(e)}}function tr(e){var t=e.flags;if(t&2){try{e:{for(var s=e.return;s!==null;){if(Yh(s)){var l=s;break e}s=s.return}throw Error(a(160))}switch(l.tag){case 5:var c=l.stateNode;l.flags&32&&(xs(c,""),l.flags&=-33);var f=Xh(e);yc(e,f,c);break;case 3:case 4:var v=l.stateNode.containerInfo,j=Xh(e);gc(e,j,v);break;default:throw Error(a(161))}}catch(E){bt(e,e.return,E)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Fv(e,t,s){re=e,tp(e)}function tp(e,t,s){for(var l=(e.mode&1)!==0;re!==null;){var c=re,f=c.child;if(c.tag===22&&l){var v=c.memoizedState!==null||no;if(!v){var j=c.alternate,E=j!==null&&j.memoizedState!==null||Gt;j=no;var F=Gt;if(no=v,(Gt=E)&&!F)for(re=c;re!==null;)v=re,E=v.child,v.tag===22&&v.memoizedState!==null?sp(c):E!==null?(E.return=v,re=E):sp(c);for(;f!==null;)re=f,tp(f),f=f.sibling;re=c,no=j,Gt=F}np(e)}else(c.subtreeFlags&8772)!==0&&f!==null?(f.return=c,re=f):np(e)}}function np(e){for(;re!==null;){var t=re;if((t.flags&8772)!==0){var s=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:Gt||ro(5,t);break;case 1:var l=t.stateNode;if(t.flags&4&&!Gt)if(s===null)l.componentDidMount();else{var c=t.elementType===t.type?s.memoizedProps:Un(t.type,s.memoizedProps);l.componentDidUpdate(c,s.memoizedState,l.__reactInternalSnapshotBeforeUpdate)}var f=t.updateQueue;f!==null&&rh(t,f,l);break;case 3:var v=t.updateQueue;if(v!==null){if(s=null,t.child!==null)switch(t.child.tag){case 5:s=t.child.stateNode;break;case 1:s=t.child.stateNode}rh(t,v,s)}break;case 5:var j=t.stateNode;if(s===null&&t.flags&4){s=j;var E=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":E.autoFocus&&s.focus();break;case"img":E.src&&(s.src=E.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var F=t.alternate;if(F!==null){var W=F.memoizedState;if(W!==null){var K=W.dehydrated;K!==null&&pi(K)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(a(163))}Gt||t.flags&512&&mc(t)}catch(H){bt(t,t.return,H)}}if(t===e){re=null;break}if(s=t.sibling,s!==null){s.return=t.return,re=s;break}re=t.return}}function rp(e){for(;re!==null;){var t=re;if(t===e){re=null;break}var s=t.sibling;if(s!==null){s.return=t.return,re=s;break}re=t.return}}function sp(e){for(;re!==null;){var t=re;try{switch(t.tag){case 0:case 11:case 15:var s=t.return;try{ro(4,t)}catch(E){bt(t,s,E)}break;case 1:var l=t.stateNode;if(typeof l.componentDidMount=="function"){var c=t.return;try{l.componentDidMount()}catch(E){bt(t,c,E)}}var f=t.return;try{mc(t)}catch(E){bt(t,f,E)}break;case 5:var v=t.return;try{mc(t)}catch(E){bt(t,v,E)}}}catch(E){bt(t,t.return,E)}if(t===e){re=null;break}var j=t.sibling;if(j!==null){j.return=t.return,re=j;break}re=t.return}}var Iv=Math.ceil,so=Q.ReactCurrentDispatcher,vc=Q.ReactCurrentOwner,Pn=Q.ReactCurrentBatchConfig,Ke=0,Ut=null,Pt=null,Ht=0,wn=0,Pa=zr(0),Mt=0,Fi=null,_s=0,ao=0,xc=0,Ii=null,cn=null,wc=0,Ta=1/0,yr=null,io=!1,kc=null,Qr=null,lo=!1,Vr=null,oo=0,zi=0,bc=null,uo=-1,co=0;function Jt(){return(Ke&6)!==0?Ze():uo!==-1?uo:uo=Ze()}function Wr(e){return(e.mode&1)===0?1:(Ke&2)!==0&&Ht!==0?Ht&-Ht:kv.transition!==null?(co===0&&(co=Yd()),co):(e=nt,e!==0||(e=window.event,e=e===void 0?16:af(e.type)),e)}function Bn(e,t,s,l){if(50<zi)throw zi=0,bc=null,Error(a(185));ui(e,s,l),((Ke&2)===0||e!==Ut)&&(e===Ut&&((Ke&2)===0&&(ao|=s),Mt===4&&Kr(e,Ht)),dn(e,l),s===1&&Ke===0&&(t.mode&1)===0&&(Ta=Ze()+500,Il&&$r()))}function dn(e,t){var s=e.callbackNode;ky(e,t);var l=xl(e,e===Ut?Ht:0);if(l===0)s!==null&&at(s),e.callbackNode=null,e.callbackPriority=0;else if(t=l&-l,e.callbackPriority!==t){if(s!=null&&at(s),t===1)e.tag===0?wv(ip.bind(null,e)):Qf(ip.bind(null,e)),gv(function(){(Ke&6)===0&&$r()}),s=null;else{switch(Xd(l)){case 1:s=Ss;break;case 4:s=Tr;break;case 16:s=Sn;break;case 536870912:s=Cs;break;default:s=Sn}s=pp(s,ap.bind(null,e))}e.callbackPriority=t,e.callbackNode=s}}function ap(e,t){if(uo=-1,co=0,(Ke&6)!==0)throw Error(a(327));var s=e.callbackNode;if(La()&&e.callbackNode!==s)return null;var l=xl(e,e===Ut?Ht:0);if(l===0)return null;if((l&30)!==0||(l&e.expiredLanes)!==0||t)t=fo(e,l);else{t=l;var c=Ke;Ke|=2;var f=op();(Ut!==e||Ht!==t)&&(yr=null,Ta=Ze()+500,Ds(e,t));do try{$v();break}catch(j){lp(e,j)}while(!0);Uu(),so.current=f,Ke=c,Pt!==null?t=0:(Ut=null,Ht=0,t=Mt)}if(t!==0){if(t===2&&(c=nu(e),c!==0&&(l=c,t=jc(e,c))),t===1)throw s=Fi,Ds(e,0),Kr(e,l),dn(e,Ze()),s;if(t===6)Kr(e,l);else{if(c=e.current.alternate,(l&30)===0&&!zv(c)&&(t=fo(e,l),t===2&&(f=nu(e),f!==0&&(l=f,t=jc(e,f))),t===1))throw s=Fi,Ds(e,0),Kr(e,l),dn(e,Ze()),s;switch(e.finishedWork=c,e.finishedLanes=l,t){case 0:case 1:throw Error(a(345));case 2:Os(e,cn,yr);break;case 3:if(Kr(e,l),(l&130023424)===l&&(t=wc+500-Ze(),10<t)){if(xl(e,0)!==0)break;if(c=e.suspendedLanes,(c&l)!==l){Jt(),e.pingedLanes|=e.suspendedLanes&c;break}e.timeoutHandle=Pu(Os.bind(null,e,cn,yr),t);break}Os(e,cn,yr);break;case 4:if(Kr(e,l),(l&4194240)===l)break;for(t=e.eventTimes,c=-1;0<l;){var v=31-Tt(l);f=1<<v,v=t[v],v>c&&(c=v),l&=~f}if(l=c,l=Ze()-l,l=(120>l?120:480>l?480:1080>l?1080:1920>l?1920:3e3>l?3e3:4320>l?4320:1960*Iv(l/1960))-l,10<l){e.timeoutHandle=Pu(Os.bind(null,e,cn,yr),l);break}Os(e,cn,yr);break;case 5:Os(e,cn,yr);break;default:throw Error(a(329))}}}return dn(e,Ze()),e.callbackNode===s?ap.bind(null,e):null}function jc(e,t){var s=Ii;return e.current.memoizedState.isDehydrated&&(Ds(e,t).flags|=256),e=fo(e,t),e!==2&&(t=cn,cn=s,t!==null&&Sc(t)),e}function Sc(e){cn===null?cn=e:cn.push.apply(cn,e)}function zv(e){for(var t=e;;){if(t.flags&16384){var s=t.updateQueue;if(s!==null&&(s=s.stores,s!==null))for(var l=0;l<s.length;l++){var c=s[l],f=c.getSnapshot;c=c.value;try{if(!In(f(),c))return!1}catch{return!1}}}if(s=t.child,t.subtreeFlags&16384&&s!==null)s.return=t,t=s;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Kr(e,t){for(t&=~xc,t&=~ao,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var s=31-Tt(t),l=1<<s;e[s]=-1,t&=~l}}function ip(e){if((Ke&6)!==0)throw Error(a(327));La();var t=xl(e,0);if((t&1)===0)return dn(e,Ze()),null;var s=fo(e,t);if(e.tag!==0&&s===2){var l=nu(e);l!==0&&(t=l,s=jc(e,l))}if(s===1)throw s=Fi,Ds(e,0),Kr(e,t),dn(e,Ze()),s;if(s===6)throw Error(a(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Os(e,cn,yr),dn(e,Ze()),null}function Cc(e,t){var s=Ke;Ke|=1;try{return e(t)}finally{Ke=s,Ke===0&&(Ta=Ze()+500,Il&&$r())}}function As(e){Vr!==null&&Vr.tag===0&&(Ke&6)===0&&La();var t=Ke;Ke|=1;var s=Pn.transition,l=nt;try{if(Pn.transition=null,nt=1,e)return e()}finally{nt=l,Pn.transition=s,Ke=t,(Ke&6)===0&&$r()}}function Nc(){wn=Pa.current,ht(Pa)}function Ds(e,t){e.finishedWork=null,e.finishedLanes=0;var s=e.timeoutHandle;if(s!==-1&&(e.timeoutHandle=-1,mv(s)),Pt!==null)for(s=Pt.return;s!==null;){var l=s;switch(Du(l),l.tag){case 1:l=l.type.childContextTypes,l!=null&&Ol();break;case 3:Na(),ht(ln),ht(Vt),Ku();break;case 5:Vu(l);break;case 4:Na();break;case 13:ht(yt);break;case 19:ht(yt);break;case 10:$u(l.type._context);break;case 22:case 23:Nc()}s=s.return}if(Ut=e,Pt=e=Gr(e.current,null),Ht=wn=t,Mt=0,Fi=null,xc=ao=_s=0,cn=Ii=null,Ts!==null){for(t=0;t<Ts.length;t++)if(s=Ts[t],l=s.interleaved,l!==null){s.interleaved=null;var c=l.next,f=s.pending;if(f!==null){var v=f.next;f.next=c,l.next=v}s.pending=l}Ts=null}return e}function lp(e,t){do{var s=Pt;try{if(Uu(),Kl.current=Jl,Gl){for(var l=vt.memoizedState;l!==null;){var c=l.queue;c!==null&&(c.pending=null),l=l.next}Gl=!1}if(Ms=0,zt=Lt=vt=null,Li=!1,Mi=0,vc.current=null,s===null||s.return===null){Mt=1,Fi=t,Pt=null;break}e:{var f=e,v=s.return,j=s,E=t;if(t=Ht,j.flags|=32768,E!==null&&typeof E=="object"&&typeof E.then=="function"){var F=E,W=j,K=W.tag;if((W.mode&1)===0&&(K===0||K===11||K===15)){var H=W.alternate;H?(W.updateQueue=H.updateQueue,W.memoizedState=H.memoizedState,W.lanes=H.lanes):(W.updateQueue=null,W.memoizedState=null)}var te=Mh(v);if(te!==null){te.flags&=-257,_h(te,v,j,f,t),te.mode&1&&Lh(f,F,t),t=te,E=F;var ae=t.updateQueue;if(ae===null){var oe=new Set;oe.add(E),t.updateQueue=oe}else ae.add(E);break e}else{if((t&1)===0){Lh(f,F,t),Ec();break e}E=Error(a(426))}}else if(gt&&j.mode&1){var Et=Mh(v);if(Et!==null){(Et.flags&65536)===0&&(Et.flags|=256),_h(Et,v,j,f,t),Iu(Ea(E,j));break e}}f=E=Ea(E,j),Mt!==4&&(Mt=2),Ii===null?Ii=[f]:Ii.push(f),f=v;do{switch(f.tag){case 3:f.flags|=65536,t&=-t,f.lanes|=t;var D=Ph(f,E,t);nh(f,D);break e;case 1:j=E;var P=f.type,O=f.stateNode;if((f.flags&128)===0&&(typeof P.getDerivedStateFromError=="function"||O!==null&&typeof O.componentDidCatch=="function"&&(Qr===null||!Qr.has(O)))){f.flags|=65536,t&=-t,f.lanes|=t;var Y=Th(f,j,t);nh(f,Y);break e}}f=f.return}while(f!==null)}cp(s)}catch(fe){t=fe,Pt===s&&s!==null&&(Pt=s=s.return);continue}break}while(!0)}function op(){var e=so.current;return so.current=Jl,e===null?Jl:e}function Ec(){(Mt===0||Mt===3||Mt===2)&&(Mt=4),Ut===null||(_s&268435455)===0&&(ao&268435455)===0||Kr(Ut,Ht)}function fo(e,t){var s=Ke;Ke|=2;var l=op();(Ut!==e||Ht!==t)&&(yr=null,Ds(e,t));do try{Uv();break}catch(c){lp(e,c)}while(!0);if(Uu(),Ke=s,so.current=l,Pt!==null)throw Error(a(261));return Ut=null,Ht=0,Mt}function Uv(){for(;Pt!==null;)up(Pt)}function $v(){for(;Pt!==null&&!ur();)up(Pt)}function up(e){var t=hp(e.alternate,e,wn);e.memoizedProps=e.pendingProps,t===null?cp(e):Pt=t,vc.current=null}function cp(e){var t=e;do{var s=t.alternate;if(e=t.return,(t.flags&32768)===0){if(s=_v(s,t,wn),s!==null){Pt=s;return}}else{if(s=Av(s,t),s!==null){s.flags&=32767,Pt=s;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Mt=6,Pt=null;return}}if(t=t.sibling,t!==null){Pt=t;return}Pt=t=e}while(t!==null);Mt===0&&(Mt=5)}function Os(e,t,s){var l=nt,c=Pn.transition;try{Pn.transition=null,nt=1,qv(e,t,s,l)}finally{Pn.transition=c,nt=l}return null}function qv(e,t,s,l){do La();while(Vr!==null);if((Ke&6)!==0)throw Error(a(327));s=e.finishedWork;var c=e.finishedLanes;if(s===null)return null;if(e.finishedWork=null,e.finishedLanes=0,s===e.current)throw Error(a(177));e.callbackNode=null,e.callbackPriority=0;var f=s.lanes|s.childLanes;if(by(e,f),e===Ut&&(Pt=Ut=null,Ht=0),(s.subtreeFlags&2064)===0&&(s.flags&2064)===0||lo||(lo=!0,pp(Sn,function(){return La(),null})),f=(s.flags&15990)!==0,(s.subtreeFlags&15990)!==0||f){f=Pn.transition,Pn.transition=null;var v=nt;nt=1;var j=Ke;Ke|=4,vc.current=null,Ov(e,s),ep(s,e),ov(Eu),bl=!!Nu,Eu=Nu=null,e.current=s,Fv(s),js(),Ke=j,nt=v,Pn.transition=f}else e.current=s;if(lo&&(lo=!1,Vr=e,oo=c),f=e.pendingLanes,f===0&&(Qr=null),Lr(s.stateNode),dn(e,Ze()),t!==null)for(l=e.onRecoverableError,s=0;s<t.length;s++)c=t[s],l(c.value,{componentStack:c.stack,digest:c.digest});if(io)throw io=!1,e=kc,kc=null,e;return(oo&1)!==0&&e.tag!==0&&La(),f=e.pendingLanes,(f&1)!==0?e===bc?zi++:(zi=0,bc=e):zi=0,$r(),null}function La(){if(Vr!==null){var e=Xd(oo),t=Pn.transition,s=nt;try{if(Pn.transition=null,nt=16>e?16:e,Vr===null)var l=!1;else{if(e=Vr,Vr=null,oo=0,(Ke&6)!==0)throw Error(a(331));var c=Ke;for(Ke|=4,re=e.current;re!==null;){var f=re,v=f.child;if((re.flags&16)!==0){var j=f.deletions;if(j!==null){for(var E=0;E<j.length;E++){var F=j[E];for(re=F;re!==null;){var W=re;switch(W.tag){case 0:case 11:case 15:Oi(8,W,f)}var K=W.child;if(K!==null)K.return=W,re=K;else for(;re!==null;){W=re;var H=W.sibling,te=W.return;if(Gh(W),W===F){re=null;break}if(H!==null){H.return=te,re=H;break}re=te}}}var ae=f.alternate;if(ae!==null){var oe=ae.child;if(oe!==null){ae.child=null;do{var Et=oe.sibling;oe.sibling=null,oe=Et}while(oe!==null)}}re=f}}if((f.subtreeFlags&2064)!==0&&v!==null)v.return=f,re=v;else e:for(;re!==null;){if(f=re,(f.flags&2048)!==0)switch(f.tag){case 0:case 11:case 15:Oi(9,f,f.return)}var D=f.sibling;if(D!==null){D.return=f.return,re=D;break e}re=f.return}}var P=e.current;for(re=P;re!==null;){v=re;var O=v.child;if((v.subtreeFlags&2064)!==0&&O!==null)O.return=v,re=O;else e:for(v=P;re!==null;){if(j=re,(j.flags&2048)!==0)try{switch(j.tag){case 0:case 11:case 15:ro(9,j)}}catch(fe){bt(j,j.return,fe)}if(j===v){re=null;break e}var Y=j.sibling;if(Y!==null){Y.return=j.return,re=Y;break e}re=j.return}}if(Ke=c,$r(),lt&&typeof lt.onPostCommitFiberRoot=="function")try{lt.onPostCommitFiberRoot(Ue,e)}catch{}l=!0}return l}finally{nt=s,Pn.transition=t}}return!1}function dp(e,t,s){t=Ea(s,t),t=Ph(e,t,1),e=Br(e,t,1),t=Jt(),e!==null&&(ui(e,1,t),dn(e,t))}function bt(e,t,s){if(e.tag===3)dp(e,e,s);else for(;t!==null;){if(t.tag===3){dp(t,e,s);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Qr===null||!Qr.has(l))){e=Ea(s,e),e=Th(t,e,1),t=Br(t,e,1),e=Jt(),t!==null&&(ui(t,1,e),dn(t,e));break}}t=t.return}}function Bv(e,t,s){var l=e.pingCache;l!==null&&l.delete(t),t=Jt(),e.pingedLanes|=e.suspendedLanes&s,Ut===e&&(Ht&s)===s&&(Mt===4||Mt===3&&(Ht&130023424)===Ht&&500>Ze()-wc?Ds(e,0):xc|=s),dn(e,t)}function fp(e,t){t===0&&((e.mode&1)===0?t=1:(t=vl,vl<<=1,(vl&130023424)===0&&(vl=4194304)));var s=Jt();e=pr(e,t),e!==null&&(ui(e,t,s),dn(e,s))}function Hv(e){var t=e.memoizedState,s=0;t!==null&&(s=t.retryLane),fp(e,s)}function Qv(e,t){var s=0;switch(e.tag){case 13:var l=e.stateNode,c=e.memoizedState;c!==null&&(s=c.retryLane);break;case 19:l=e.stateNode;break;default:throw Error(a(314))}l!==null&&l.delete(t),fp(e,s)}var hp;hp=function(e,t,s){if(e!==null)if(e.memoizedProps!==t.pendingProps||ln.current)un=!0;else{if((e.lanes&s)===0&&(t.flags&128)===0)return un=!1,Mv(e,t,s);un=(e.flags&131072)!==0}else un=!1,gt&&(t.flags&1048576)!==0&&Vf(t,Ul,t.index);switch(t.lanes=0,t.tag){case 2:var l=t.type;to(e,t),e=t.pendingProps;var c=xa(t,Vt.current);Ca(t,s),c=Xu(null,t,l,e,c,s);var f=Ju();return t.flags|=1,typeof c=="object"&&c!==null&&typeof c.render=="function"&&c.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,on(l)?(f=!0,Fl(t)):f=!1,t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,Hu(t),c.updater=Zl,t.stateNode=c,c._reactInternals=t,sc(t,l,e,s),t=oc(null,t,l,!0,f,s)):(t.tag=0,gt&&f&&Au(t),Xt(null,t,c,s),t=t.child),t;case 16:l=t.elementType;e:{switch(to(e,t),e=t.pendingProps,c=l._init,l=c(l._payload),t.type=l,c=t.tag=Wv(l),e=Un(l,e),c){case 0:t=lc(null,t,l,e,s);break e;case 1:t=zh(null,t,l,e,s);break e;case 11:t=Ah(null,t,l,e,s);break e;case 14:t=Dh(null,t,l,Un(l.type,e),s);break e}throw Error(a(306,l,""))}return t;case 0:return l=t.type,c=t.pendingProps,c=t.elementType===l?c:Un(l,c),lc(e,t,l,c,s);case 1:return l=t.type,c=t.pendingProps,c=t.elementType===l?c:Un(l,c),zh(e,t,l,c,s);case 3:e:{if(Uh(t),e===null)throw Error(a(387));l=t.pendingProps,f=t.memoizedState,c=f.element,th(e,t),Vl(t,l,null,s);var v=t.memoizedState;if(l=v.element,f.isDehydrated)if(f={element:l,isDehydrated:!1,cache:v.cache,pendingSuspenseBoundaries:v.pendingSuspenseBoundaries,transitions:v.transitions},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){c=Ea(Error(a(423)),t),t=$h(e,t,l,s,c);break e}else if(l!==c){c=Ea(Error(a(424)),t),t=$h(e,t,l,s,c);break e}else for(xn=Ir(t.stateNode.containerInfo.firstChild),vn=t,gt=!0,zn=null,s=Zf(t,null,l,s),t.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(ba(),l===c){t=gr(e,t,s);break e}Xt(e,t,l,s)}t=t.child}return t;case 5:return sh(t),e===null&&Fu(t),l=t.type,c=t.pendingProps,f=e!==null?e.memoizedProps:null,v=c.children,Ru(l,c)?v=null:f!==null&&Ru(l,f)&&(t.flags|=32),Ih(e,t),Xt(e,t,v,s),t.child;case 6:return e===null&&Fu(t),null;case 13:return qh(e,t,s);case 4:return Qu(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=ja(t,null,l,s):Xt(e,t,l,s),t.child;case 11:return l=t.type,c=t.pendingProps,c=t.elementType===l?c:Un(l,c),Ah(e,t,l,c,s);case 7:return Xt(e,t,t.pendingProps,s),t.child;case 8:return Xt(e,t,t.pendingProps.children,s),t.child;case 12:return Xt(e,t,t.pendingProps.children,s),t.child;case 10:e:{if(l=t.type._context,c=t.pendingProps,f=t.memoizedProps,v=c.value,ut(Bl,l._currentValue),l._currentValue=v,f!==null)if(In(f.value,v)){if(f.children===c.children&&!ln.current){t=gr(e,t,s);break e}}else for(f=t.child,f!==null&&(f.return=t);f!==null;){var j=f.dependencies;if(j!==null){v=f.child;for(var E=j.firstContext;E!==null;){if(E.context===l){if(f.tag===1){E=mr(-1,s&-s),E.tag=2;var F=f.updateQueue;if(F!==null){F=F.shared;var W=F.pending;W===null?E.next=E:(E.next=W.next,W.next=E),F.pending=E}}f.lanes|=s,E=f.alternate,E!==null&&(E.lanes|=s),qu(f.return,s,t),j.lanes|=s;break}E=E.next}}else if(f.tag===10)v=f.type===t.type?null:f.child;else if(f.tag===18){if(v=f.return,v===null)throw Error(a(341));v.lanes|=s,j=v.alternate,j!==null&&(j.lanes|=s),qu(v,s,t),v=f.sibling}else v=f.child;if(v!==null)v.return=f;else for(v=f;v!==null;){if(v===t){v=null;break}if(f=v.sibling,f!==null){f.return=v.return,v=f;break}v=v.return}f=v}Xt(e,t,c.children,s),t=t.child}return t;case 9:return c=t.type,l=t.pendingProps.children,Ca(t,s),c=En(c),l=l(c),t.flags|=1,Xt(e,t,l,s),t.child;case 14:return l=t.type,c=Un(l,t.pendingProps),c=Un(l.type,c),Dh(e,t,l,c,s);case 15:return Oh(e,t,t.type,t.pendingProps,s);case 17:return l=t.type,c=t.pendingProps,c=t.elementType===l?c:Un(l,c),to(e,t),t.tag=1,on(l)?(e=!0,Fl(t)):e=!1,Ca(t,s),Eh(t,l,c),sc(t,l,c,s),oc(null,t,l,!0,e,s);case 19:return Hh(e,t,s);case 22:return Fh(e,t,s)}throw Error(a(156,t.tag))};function pp(e,t){return st(e,t)}function Vv(e,t,s,l){this.tag=e,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Tn(e,t,s,l){return new Vv(e,t,s,l)}function Rc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Wv(e){if(typeof e=="function")return Rc(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Xe)return 11;if(e===Re)return 14}return 2}function Gr(e,t){var s=e.alternate;return s===null?(s=Tn(e.tag,t,e.key,e.mode),s.elementType=e.elementType,s.type=e.type,s.stateNode=e.stateNode,s.alternate=e,e.alternate=s):(s.pendingProps=t,s.type=e.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=e.flags&14680064,s.childLanes=e.childLanes,s.lanes=e.lanes,s.child=e.child,s.memoizedProps=e.memoizedProps,s.memoizedState=e.memoizedState,s.updateQueue=e.updateQueue,t=e.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},s.sibling=e.sibling,s.index=e.index,s.ref=e.ref,s}function ho(e,t,s,l,c,f){var v=2;if(l=e,typeof e=="function")Rc(e)&&(v=1);else if(typeof e=="string")v=5;else e:switch(e){case A:return Fs(s.children,c,f,t);case B:v=8,c|=8;break;case pe:return e=Tn(12,s,t,c|2),e.elementType=pe,e.lanes=f,e;case tt:return e=Tn(13,s,t,c),e.elementType=tt,e.lanes=f,e;case pt:return e=Tn(19,s,t,c),e.elementType=pt,e.lanes=f,e;case ye:return po(s,c,f,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Z:v=10;break e;case ze:v=9;break e;case Xe:v=11;break e;case Re:v=14;break e;case Pe:v=16,l=null;break e}throw Error(a(130,e==null?e:typeof e,""))}return t=Tn(v,s,t,c),t.elementType=e,t.type=l,t.lanes=f,t}function Fs(e,t,s,l){return e=Tn(7,e,l,t),e.lanes=s,e}function po(e,t,s,l){return e=Tn(22,e,l,t),e.elementType=ye,e.lanes=s,e.stateNode={isHidden:!1},e}function Pc(e,t,s){return e=Tn(6,e,null,t),e.lanes=s,e}function Tc(e,t,s){return t=Tn(4,e.children!==null?e.children:[],e.key,t),t.lanes=s,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Kv(e,t,s,l,c){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=ru(0),this.expirationTimes=ru(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ru(0),this.identifierPrefix=l,this.onRecoverableError=c,this.mutableSourceEagerHydrationData=null}function Lc(e,t,s,l,c,f,v,j,E){return e=new Kv(e,t,s,j,E),t===1?(t=1,f===!0&&(t|=8)):t=0,f=Tn(3,null,null,t),e.current=f,f.stateNode=e,f.memoizedState={element:l,isDehydrated:s,cache:null,transitions:null,pendingSuspenseBoundaries:null},Hu(f),e}function Gv(e,t,s){var l=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:se,key:l==null?null:""+l,children:e,containerInfo:t,implementation:s}}function mp(e){if(!e)return Ur;e=e._reactInternals;e:{if(we(e)!==e||e.tag!==1)throw Error(a(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(on(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(a(171))}if(e.tag===1){var s=e.type;if(on(s))return Bf(e,s,t)}return t}function gp(e,t,s,l,c,f,v,j,E){return e=Lc(s,l,!0,e,c,f,v,j,E),e.context=mp(null),s=e.current,l=Jt(),c=Wr(s),f=mr(l,c),f.callback=t??null,Br(s,f,c),e.current.lanes=c,ui(e,c,l),dn(e,l),e}function mo(e,t,s,l){var c=t.current,f=Jt(),v=Wr(c);return s=mp(s),t.context===null?t.context=s:t.pendingContext=s,t=mr(f,v),t.payload={element:e},l=l===void 0?null:l,l!==null&&(t.callback=l),e=Br(c,t,v),e!==null&&(Bn(e,c,v,f),Ql(e,c,v)),v}function go(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 yp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var s=e.retryLane;e.retryLane=s!==0&&s<t?s:t}}function Mc(e,t){yp(e,t),(e=e.alternate)&&yp(e,t)}function Yv(){return null}var vp=typeof reportError=="function"?reportError:function(e){console.error(e)};function _c(e){this._internalRoot=e}yo.prototype.render=_c.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(a(409));mo(e,t,null,null)},yo.prototype.unmount=_c.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;As(function(){mo(null,e,null,null)}),t[cr]=null}};function yo(e){this._internalRoot=e}yo.prototype.unstable_scheduleHydration=function(e){if(e){var t=ef();e={blockedOn:null,target:e,priority:t};for(var s=0;s<Dr.length&&t!==0&&t<Dr[s].priority;s++);Dr.splice(s,0,e),s===0&&rf(e)}};function Ac(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function vo(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function xp(){}function Xv(e,t,s,l,c){if(c){if(typeof l=="function"){var f=l;l=function(){var F=go(v);f.call(F)}}var v=gp(t,l,e,0,null,!1,!1,"",xp);return e._reactRootContainer=v,e[cr]=v.current,ji(e.nodeType===8?e.parentNode:e),As(),v}for(;c=e.lastChild;)e.removeChild(c);if(typeof l=="function"){var j=l;l=function(){var F=go(E);j.call(F)}}var E=Lc(e,0,!1,null,null,!1,!1,"",xp);return e._reactRootContainer=E,e[cr]=E.current,ji(e.nodeType===8?e.parentNode:e),As(function(){mo(t,E,s,l)}),E}function xo(e,t,s,l,c){var f=s._reactRootContainer;if(f){var v=f;if(typeof c=="function"){var j=c;c=function(){var E=go(v);j.call(E)}}mo(t,v,e,c)}else v=Xv(s,t,e,c,l);return go(v)}Jd=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var s=oi(t.pendingLanes);s!==0&&(su(t,s|1),dn(t,Ze()),(Ke&6)===0&&(Ta=Ze()+500,$r()))}break;case 13:As(function(){var l=pr(e,1);if(l!==null){var c=Jt();Bn(l,e,1,c)}}),Mc(e,1)}},au=function(e){if(e.tag===13){var t=pr(e,134217728);if(t!==null){var s=Jt();Bn(t,e,134217728,s)}Mc(e,134217728)}},Zd=function(e){if(e.tag===13){var t=Wr(e),s=pr(e,t);if(s!==null){var l=Jt();Bn(s,e,t,l)}Mc(e,t)}},ef=function(){return nt},tf=function(e,t){var s=nt;try{return nt=e,t()}finally{nt=s}},aa=function(e,t,s){switch(t){case"input":if(Ja(e,s),t=s.name,s.type==="radio"&&t!=null){for(s=e;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<s.length;t++){var l=s[t];if(l!==e&&l.form===e.form){var c=Dl(l);if(!c)throw Error(a(90));sn(l),Ja(l,c)}}}break;case"textarea":Er(e,s);break;case"select":t=s.value,t!=null&&Nr(e,!!s.multiple,t,!1)}},ws=Cc,ks=As;var Jv={usingClientEntryPoint:!1,Events:[Ni,ya,Dl,ml,li,Cc]},Ui={findFiberByHostInstance:Ns,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Zv={bundleType:Ui.bundleType,version:Ui.version,rendererPackageName:Ui.rendererPackageName,rendererConfig:Ui.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Q.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=kt(e),e===null?null:e.stateNode},findFiberByHostInstance:Ui.findFiberByHostInstance||Yv,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 wo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!wo.isDisabled&&wo.supportsFiber)try{Ue=wo.inject(Zv),lt=wo}catch{}}return fn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Jv,fn.createPortal=function(e,t){var s=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Ac(t))throw Error(a(200));return Gv(e,t,null,s)},fn.createRoot=function(e,t){if(!Ac(e))throw Error(a(299));var s=!1,l="",c=vp;return t!=null&&(t.unstable_strictMode===!0&&(s=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=Lc(e,1,!1,null,null,s,!1,l,c),e[cr]=t.current,ji(e.nodeType===8?e.parentNode:e),new _c(t)},fn.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(a(188)):(e=Object.keys(e).join(","),Error(a(268,e)));return e=kt(t),e=e===null?null:e.stateNode,e},fn.flushSync=function(e){return As(e)},fn.hydrate=function(e,t,s){if(!vo(t))throw Error(a(200));return xo(null,e,t,!0,s)},fn.hydrateRoot=function(e,t,s){if(!Ac(e))throw Error(a(405));var l=s!=null&&s.hydratedSources||null,c=!1,f="",v=vp;if(s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(f=s.identifierPrefix),s.onRecoverableError!==void 0&&(v=s.onRecoverableError)),t=gp(t,null,e,1,s??null,c,!1,f,v),e[cr]=t.current,ji(e),l)for(e=0;e<l.length;e++)s=l[e],c=s._getVersion,c=c(s._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[s,c]:t.mutableSourceEagerHydrationData.push(s,c);return new yo(t)},fn.render=function(e,t,s){if(!vo(t))throw Error(a(200));return xo(null,e,t,!1,s)},fn.unmountComponentAtNode=function(e){if(!vo(e))throw Error(a(40));return e._reactRootContainer?(As(function(){xo(null,null,e,!1,function(){e._reactRootContainer=null,e[cr]=null})}),!0):!1},fn.unstable_batchedUpdates=Cc,fn.unstable_renderSubtreeIntoContainer=function(e,t,s,l){if(!vo(s))throw Error(a(200));if(e==null||e._reactInternals===void 0)throw Error(a(38));return xo(e,t,s,!1,l)},fn.version="18.3.1-next-f1338f8080-20240426",fn}var Rp;function Bm(){if(Rp)return Ic.exports;Rp=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),Ic.exports=ux(),Ic.exports}var Pp;function cx(){if(Pp)return bo;Pp=1;var n=Bm();return bo.createRoot=n.createRoot,bo.hydrateRoot=n.hydrateRoot,bo}var dx=cx();const fx=qm(dx);var Ka=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},hx={setTimeout:(n,r)=>setTimeout(n,r),clearTimeout:n=>clearTimeout(n),setInterval:(n,r)=>setInterval(n,r),clearInterval:n=>clearInterval(n)},ns,Cd,Lm,px=(Lm=class{constructor(){ke(this,ns,hx);ke(this,Cd,!1)}setTimeoutProvider(n){ee(this,ns,n)}setTimeout(n,r){return C(this,ns).setTimeout(n,r)}clearTimeout(n){C(this,ns).clearTimeout(n)}setInterval(n,r){return C(this,ns).setInterval(n,r)}clearInterval(n){C(this,ns).clearInterval(n)}},ns=new WeakMap,Cd=new WeakMap,Lm),zs=new px;function mx(n){setTimeout(n,0)}var Xs=typeof window>"u"||"Deno"in globalThis;function tn(){}function gx(n,r){return typeof n=="function"?n(r):n}function Gc(n){return typeof n=="number"&&n>=0&&n!==1/0}function Hm(n,r){return Math.max(n+(r||0)-Date.now(),0)}function fs(n,r){return typeof n=="function"?n(r):n}function _n(n,r){return typeof n=="function"?n(r):n}function Tp(n,r){const{type:a="all",exact:o,fetchStatus:u,predicate:d,queryKey:h,stale:p}=n;if(h){if(o){if(r.queryHash!==Ed(h,r.options))return!1}else if(!Xi(r.queryKey,h))return!1}if(a!=="all"){const g=r.isActive();if(a==="active"&&!g||a==="inactive"&&g)return!1}return!(typeof p=="boolean"&&r.isStale()!==p||u&&u!==r.state.fetchStatus||d&&!d(r))}function Lp(n,r){const{exact:a,status:o,predicate:u,mutationKey:d}=n;if(d){if(!r.options.mutationKey)return!1;if(a){if(Js(r.options.mutationKey)!==Js(d))return!1}else if(!Xi(r.options.mutationKey,d))return!1}return!(o&&r.state.status!==o||u&&!u(r))}function Ed(n,r){return((r==null?void 0:r.queryKeyHashFn)||Js)(n)}function Js(n){return JSON.stringify(n,(r,a)=>Yc(a)?Object.keys(a).sort().reduce((o,u)=>(o[u]=a[u],o),{}):a)}function Xi(n,r){return n===r?!0:typeof n!=typeof r?!1:n&&r&&typeof n=="object"&&typeof r=="object"?Object.keys(r).every(a=>Xi(n[a],r[a])):!1}var yx=Object.prototype.hasOwnProperty;function Qm(n,r){if(n===r)return n;const a=Mp(n)&&Mp(r);if(!a&&!(Yc(n)&&Yc(r)))return r;const u=(a?n:Object.keys(n)).length,d=a?r:Object.keys(r),h=d.length,p=a?new Array(h):{};let g=0;for(let m=0;m<h;m++){const y=a?m:d[m],w=n[y],x=r[y];if(w===x){p[y]=w,(a?m<u:yx.call(n,y))&&g++;continue}if(w===null||x===null||typeof w!="object"||typeof x!="object"){p[y]=x;continue}const b=Qm(w,x);p[y]=b,b===w&&g++}return u===h&&g===u?n:p}function Fo(n,r){if(!r||Object.keys(n).length!==Object.keys(r).length)return!1;for(const a in n)if(n[a]!==r[a])return!1;return!0}function Mp(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function Yc(n){if(!_p(n))return!1;const r=n.constructor;if(r===void 0)return!0;const a=r.prototype;return!(!_p(a)||!a.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function _p(n){return Object.prototype.toString.call(n)==="[object Object]"}function vx(n){return new Promise(r=>{zs.setTimeout(r,n)})}function Xc(n,r,a){return typeof a.structuralSharing=="function"?a.structuralSharing(n,r):a.structuralSharing!==!1?Qm(n,r):r}function Ga(n){return n}function xx(n,r,a=0){const o=[...n,r];return a&&o.length>a?o.slice(1):o}function wx(n,r,a=0){const o=[r,...n];return a&&o.length>a?o.slice(0,-1):o}var Rd=Symbol();function Vm(n,r){return!n.queryFn&&(r!=null&&r.initialPromise)?()=>r.initialPromise:!n.queryFn||n.queryFn===Rd?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function Wm(n,r){return typeof n=="function"?n(...r):!!n}var $s,rs,Oa,Mm,kx=(Mm=class extends Ka{constructor(){super();ke(this,$s);ke(this,rs);ke(this,Oa);ee(this,Oa,r=>{if(!Xs&&window.addEventListener){const a=()=>r();return window.addEventListener("visibilitychange",a,!1),()=>{window.removeEventListener("visibilitychange",a)}}})}onSubscribe(){C(this,rs)||this.setEventListener(C(this,Oa))}onUnsubscribe(){var r;this.hasListeners()||((r=C(this,rs))==null||r.call(this),ee(this,rs,void 0))}setEventListener(r){var a;ee(this,Oa,r),(a=C(this,rs))==null||a.call(this),ee(this,rs,r(o=>{typeof o=="boolean"?this.setFocused(o):this.onFocus()}))}setFocused(r){C(this,$s)!==r&&(ee(this,$s,r),this.onFocus())}onFocus(){const r=this.isFocused();this.listeners.forEach(a=>{a(r)})}isFocused(){var r;return typeof C(this,$s)=="boolean"?C(this,$s):((r=globalThis.document)==null?void 0:r.visibilityState)!=="hidden"}},$s=new WeakMap,rs=new WeakMap,Oa=new WeakMap,Mm),Pd=new kx;function Jc(){let n,r;const a=new Promise((u,d)=>{n=u,r=d});a.status="pending",a.catch(()=>{});function o(u){Object.assign(a,u),delete a.resolve,delete a.reject}return a.resolve=u=>{o({status:"fulfilled",value:u}),n(u)},a.reject=u=>{o({status:"rejected",reason:u}),r(u)},a}var bx=mx;function jx(){let n=[],r=0,a=p=>{p()},o=p=>{p()},u=bx;const d=p=>{r?n.push(p):u(()=>{a(p)})},h=()=>{const p=n;n=[],p.length&&u(()=>{o(()=>{p.forEach(g=>{a(g)})})})};return{batch:p=>{let g;r++;try{g=p()}finally{r--,r||h()}return g},batchCalls:p=>(...g)=>{d(()=>{p(...g)})},schedule:d,setNotifyFunction:p=>{a=p},setBatchNotifyFunction:p=>{o=p},setScheduler:p=>{u=p}}}var At=jx(),Fa,ss,Ia,_m,Sx=(_m=class extends Ka{constructor(){super();ke(this,Fa,!0);ke(this,ss);ke(this,Ia);ee(this,Ia,r=>{if(!Xs&&window.addEventListener){const a=()=>r(!0),o=()=>r(!1);return window.addEventListener("online",a,!1),window.addEventListener("offline",o,!1),()=>{window.removeEventListener("online",a),window.removeEventListener("offline",o)}}})}onSubscribe(){C(this,ss)||this.setEventListener(C(this,Ia))}onUnsubscribe(){var r;this.hasListeners()||((r=C(this,ss))==null||r.call(this),ee(this,ss,void 0))}setEventListener(r){var a;ee(this,Ia,r),(a=C(this,ss))==null||a.call(this),ee(this,ss,r(this.setOnline.bind(this)))}setOnline(r){C(this,Fa)!==r&&(ee(this,Fa,r),this.listeners.forEach(o=>{o(r)}))}isOnline(){return C(this,Fa)}},Fa=new WeakMap,ss=new WeakMap,Ia=new WeakMap,_m),Io=new Sx;function Cx(n){return Math.min(1e3*2**n,3e4)}function Km(n){return(n??"online")==="online"?Io.isOnline():!0}var Zc=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function Gm(n){let r=!1,a=0,o;const u=Jc(),d=()=>u.status!=="pending",h=R=>{var N;if(!d()){const T=new Zc(R);x(T),(N=n.onCancel)==null||N.call(n,T)}},p=()=>{r=!0},g=()=>{r=!1},m=()=>Pd.isFocused()&&(n.networkMode==="always"||Io.isOnline())&&n.canRun(),y=()=>Km(n.networkMode)&&n.canRun(),w=R=>{d()||(o==null||o(),u.resolve(R))},x=R=>{d()||(o==null||o(),u.reject(R))},b=()=>new Promise(R=>{var N;o=T=>{(d()||m())&&R(T)},(N=n.onPause)==null||N.call(n)}).then(()=>{var R;o=void 0,d()||(R=n.onContinue)==null||R.call(n)}),L=()=>{if(d())return;let R;const N=a===0?n.initialPromise:void 0;try{R=N??n.fn()}catch(T){R=Promise.reject(T)}Promise.resolve(R).then(w).catch(T=>{var se;if(d())return;const z=n.retry??(Xs?0:3),$=n.retryDelay??Cx,Q=typeof $=="function"?$(a,T):$,J=z===!0||typeof z=="number"&&a<z||typeof z=="function"&&z(a,T);if(r||!J){x(T);return}a++,(se=n.onFail)==null||se.call(n,a,T),vx(Q).then(()=>m()?void 0:b()).then(()=>{r?x(T):L()})})};return{promise:u,status:()=>u.status,cancel:h,continue:()=>(o==null||o(),u),cancelRetry:p,continueRetry:g,canStart:y,start:()=>(y()?L():b().then(L),u)}}var qs,Am,Ym=(Am=class{constructor(){ke(this,qs)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Gc(this.gcTime)&&ee(this,qs,zs.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(Xs?1/0:300*1e3))}clearGcTimeout(){C(this,qs)&&(zs.clearTimeout(C(this,qs)),ee(this,qs,void 0))}},qs=new WeakMap,Am),Bs,za,Ln,Hs,qt,rl,Qs,Hn,xr,Dm,Nx=(Dm=class extends Ym{constructor(r){super();ke(this,Hn);ke(this,Bs);ke(this,za);ke(this,Ln);ke(this,Hs);ke(this,qt);ke(this,rl);ke(this,Qs);ee(this,Qs,!1),ee(this,rl,r.defaultOptions),this.setOptions(r.options),this.observers=[],ee(this,Hs,r.client),ee(this,Ln,C(this,Hs).getQueryCache()),this.queryKey=r.queryKey,this.queryHash=r.queryHash,ee(this,Bs,Dp(this.options)),this.state=r.state??C(this,Bs),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var r;return(r=C(this,qt))==null?void 0:r.promise}setOptions(r){if(this.options={...C(this,rl),...r},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const a=Dp(this.options);a.data!==void 0&&(this.setState(Ap(a.data,a.dataUpdatedAt)),ee(this,Bs,a))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&C(this,Ln).remove(this)}setData(r,a){const o=Xc(this.state.data,r,this.options);return De(this,Hn,xr).call(this,{data:o,type:"success",dataUpdatedAt:a==null?void 0:a.updatedAt,manual:a==null?void 0:a.manual}),o}setState(r,a){De(this,Hn,xr).call(this,{type:"setState",state:r,setStateOptions:a})}cancel(r){var o,u;const a=(o=C(this,qt))==null?void 0:o.promise;return(u=C(this,qt))==null||u.cancel(r),a?a.then(tn).catch(tn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(C(this,Bs))}isActive(){return this.observers.some(r=>_n(r.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Rd||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(r=>fs(r.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(r=>r.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(r=0){return this.state.data===void 0?!0:r==="static"?!1:this.state.isInvalidated?!0:!Hm(this.state.dataUpdatedAt,r)}onFocus(){var a;const r=this.observers.find(o=>o.shouldFetchOnWindowFocus());r==null||r.refetch({cancelRefetch:!1}),(a=C(this,qt))==null||a.continue()}onOnline(){var a;const r=this.observers.find(o=>o.shouldFetchOnReconnect());r==null||r.refetch({cancelRefetch:!1}),(a=C(this,qt))==null||a.continue()}addObserver(r){this.observers.includes(r)||(this.observers.push(r),this.clearGcTimeout(),C(this,Ln).notify({type:"observerAdded",query:this,observer:r}))}removeObserver(r){this.observers.includes(r)&&(this.observers=this.observers.filter(a=>a!==r),this.observers.length||(C(this,qt)&&(C(this,Qs)?C(this,qt).cancel({revert:!0}):C(this,qt).cancelRetry()),this.scheduleGc()),C(this,Ln).notify({type:"observerRemoved",query:this,observer:r}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||De(this,Hn,xr).call(this,{type:"invalidate"})}async fetch(r,a){var g,m,y,w,x,b,L,R,N,T,z,$;if(this.state.fetchStatus!=="idle"&&((g=C(this,qt))==null?void 0:g.status())!=="rejected"){if(this.state.data!==void 0&&(a!=null&&a.cancelRefetch))this.cancel({silent:!0});else if(C(this,qt))return C(this,qt).continueRetry(),C(this,qt).promise}if(r&&this.setOptions(r),!this.options.queryFn){const Q=this.observers.find(J=>J.options.queryFn);Q&&this.setOptions(Q.options)}const o=new AbortController,u=Q=>{Object.defineProperty(Q,"signal",{enumerable:!0,get:()=>(ee(this,Qs,!0),o.signal)})},d=()=>{const Q=Vm(this.options,a),se=(()=>{const A={client:C(this,Hs),queryKey:this.queryKey,meta:this.meta};return u(A),A})();return ee(this,Qs,!1),this.options.persister?this.options.persister(Q,se,this):Q(se)},p=(()=>{const Q={fetchOptions:a,options:this.options,queryKey:this.queryKey,client:C(this,Hs),state:this.state,fetchFn:d};return u(Q),Q})();(m=this.options.behavior)==null||m.onFetch(p,this),ee(this,za,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((y=p.fetchOptions)==null?void 0:y.meta))&&De(this,Hn,xr).call(this,{type:"fetch",meta:(w=p.fetchOptions)==null?void 0:w.meta}),ee(this,qt,Gm({initialPromise:a==null?void 0:a.initialPromise,fn:p.fetchFn,onCancel:Q=>{Q instanceof Zc&&Q.revert&&this.setState({...C(this,za),fetchStatus:"idle"}),o.abort()},onFail:(Q,J)=>{De(this,Hn,xr).call(this,{type:"failed",failureCount:Q,error:J})},onPause:()=>{De(this,Hn,xr).call(this,{type:"pause"})},onContinue:()=>{De(this,Hn,xr).call(this,{type:"continue"})},retry:p.options.retry,retryDelay:p.options.retryDelay,networkMode:p.options.networkMode,canRun:()=>!0}));try{const Q=await C(this,qt).start();if(Q===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(Q),(b=(x=C(this,Ln).config).onSuccess)==null||b.call(x,Q,this),(R=(L=C(this,Ln).config).onSettled)==null||R.call(L,Q,this.state.error,this),Q}catch(Q){if(Q instanceof Zc){if(Q.silent)return C(this,qt).promise;if(Q.revert){if(this.state.data===void 0)throw Q;return this.state.data}}throw De(this,Hn,xr).call(this,{type:"error",error:Q}),(T=(N=C(this,Ln).config).onError)==null||T.call(N,Q,this),($=(z=C(this,Ln).config).onSettled)==null||$.call(z,this.state.data,Q,this),Q}finally{this.scheduleGc()}}},Bs=new WeakMap,za=new WeakMap,Ln=new WeakMap,Hs=new WeakMap,qt=new WeakMap,rl=new WeakMap,Qs=new WeakMap,Hn=new WeakSet,xr=function(r){const a=o=>{switch(r.type){case"failed":return{...o,fetchFailureCount:r.failureCount,fetchFailureReason:r.error};case"pause":return{...o,fetchStatus:"paused"};case"continue":return{...o,fetchStatus:"fetching"};case"fetch":return{...o,...Xm(o.data,this.options),fetchMeta:r.meta??null};case"success":const u={...o,...Ap(r.data,r.dataUpdatedAt),dataUpdateCount:o.dataUpdateCount+1,...!r.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ee(this,za,r.manual?u:void 0),u;case"error":const d=r.error;return{...o,error:d,errorUpdateCount:o.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:o.fetchFailureCount+1,fetchFailureReason:d,fetchStatus:"idle",status:"error"};case"invalidate":return{...o,isInvalidated:!0};case"setState":return{...o,...r.state}}};this.state=a(this.state),At.batch(()=>{this.observers.forEach(o=>{o.onQueryUpdate()}),C(this,Ln).notify({query:this,type:"updated",action:r})})},Dm);function Xm(n,r){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Km(r.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function Ap(n,r){return{data:n,dataUpdatedAt:r??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Dp(n){const r=typeof n.initialData=="function"?n.initialData():n.initialData,a=r!==void 0,o=a?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:r,dataUpdateCount:0,dataUpdatedAt:a?o??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:a?"success":"pending",fetchStatus:"idle"}}var hn,Be,sl,Zt,Vs,Ua,kr,as,al,$a,qa,Ws,Ks,is,Ba,et,Ki,ed,td,nd,rd,sd,ad,id,Jm,Om,Ex=(Om=class extends Ka{constructor(r,a){super();ke(this,et);ke(this,hn);ke(this,Be);ke(this,sl);ke(this,Zt);ke(this,Vs);ke(this,Ua);ke(this,kr);ke(this,as);ke(this,al);ke(this,$a);ke(this,qa);ke(this,Ws);ke(this,Ks);ke(this,is);ke(this,Ba,new Set);this.options=a,ee(this,hn,r),ee(this,as,null),ee(this,kr,Jc()),this.bindMethods(),this.setOptions(a)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(C(this,Be).addObserver(this),Op(C(this,Be),this.options)?De(this,et,Ki).call(this):this.updateResult(),De(this,et,rd).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ld(C(this,Be),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ld(C(this,Be),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,De(this,et,sd).call(this),De(this,et,ad).call(this),C(this,Be).removeObserver(this)}setOptions(r){const a=this.options,o=C(this,Be);if(this.options=C(this,hn).defaultQueryOptions(r),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof _n(this.options.enabled,C(this,Be))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");De(this,et,id).call(this),C(this,Be).setOptions(this.options),a._defaulted&&!Fo(this.options,a)&&C(this,hn).getQueryCache().notify({type:"observerOptionsUpdated",query:C(this,Be),observer:this});const u=this.hasListeners();u&&Fp(C(this,Be),o,this.options,a)&&De(this,et,Ki).call(this),this.updateResult(),u&&(C(this,Be)!==o||_n(this.options.enabled,C(this,Be))!==_n(a.enabled,C(this,Be))||fs(this.options.staleTime,C(this,Be))!==fs(a.staleTime,C(this,Be)))&&De(this,et,ed).call(this);const d=De(this,et,td).call(this);u&&(C(this,Be)!==o||_n(this.options.enabled,C(this,Be))!==_n(a.enabled,C(this,Be))||d!==C(this,is))&&De(this,et,nd).call(this,d)}getOptimisticResult(r){const a=C(this,hn).getQueryCache().build(C(this,hn),r),o=this.createResult(a,r);return Px(this,o)&&(ee(this,Zt,o),ee(this,Ua,this.options),ee(this,Vs,C(this,Be).state)),o}getCurrentResult(){return C(this,Zt)}trackResult(r,a){return new Proxy(r,{get:(o,u)=>(this.trackProp(u),a==null||a(u),u==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&C(this,kr).status==="pending"&&C(this,kr).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(o,u))})}trackProp(r){C(this,Ba).add(r)}getCurrentQuery(){return C(this,Be)}refetch({...r}={}){return this.fetch({...r})}fetchOptimistic(r){const a=C(this,hn).defaultQueryOptions(r),o=C(this,hn).getQueryCache().build(C(this,hn),a);return o.fetch().then(()=>this.createResult(o,a))}fetch(r){return De(this,et,Ki).call(this,{...r,cancelRefetch:r.cancelRefetch??!0}).then(()=>(this.updateResult(),C(this,Zt)))}createResult(r,a){var pe;const o=C(this,Be),u=this.options,d=C(this,Zt),h=C(this,Vs),p=C(this,Ua),m=r!==o?r.state:C(this,sl),{state:y}=r;let w={...y},x=!1,b;if(a._optimisticResults){const Z=this.hasListeners(),ze=!Z&&Op(r,a),Xe=Z&&Fp(r,o,a,u);(ze||Xe)&&(w={...w,...Xm(y.data,r.options)}),a._optimisticResults==="isRestoring"&&(w.fetchStatus="idle")}let{error:L,errorUpdatedAt:R,status:N}=w;b=w.data;let T=!1;if(a.placeholderData!==void 0&&b===void 0&&N==="pending"){let Z;d!=null&&d.isPlaceholderData&&a.placeholderData===(p==null?void 0:p.placeholderData)?(Z=d.data,T=!0):Z=typeof a.placeholderData=="function"?a.placeholderData((pe=C(this,qa))==null?void 0:pe.state.data,C(this,qa)):a.placeholderData,Z!==void 0&&(N="success",b=Xc(d==null?void 0:d.data,Z,a),x=!0)}if(a.select&&b!==void 0&&!T)if(d&&b===(h==null?void 0:h.data)&&a.select===C(this,al))b=C(this,$a);else try{ee(this,al,a.select),b=a.select(b),b=Xc(d==null?void 0:d.data,b,a),ee(this,$a,b),ee(this,as,null)}catch(Z){ee(this,as,Z)}C(this,as)&&(L=C(this,as),b=C(this,$a),R=Date.now(),N="error");const z=w.fetchStatus==="fetching",$=N==="pending",Q=N==="error",J=$&&z,se=b!==void 0,B={status:N,fetchStatus:w.fetchStatus,isPending:$,isSuccess:N==="success",isError:Q,isInitialLoading:J,isLoading:J,data:b,dataUpdatedAt:w.dataUpdatedAt,error:L,errorUpdatedAt:R,failureCount:w.fetchFailureCount,failureReason:w.fetchFailureReason,errorUpdateCount:w.errorUpdateCount,isFetched:w.dataUpdateCount>0||w.errorUpdateCount>0,isFetchedAfterMount:w.dataUpdateCount>m.dataUpdateCount||w.errorUpdateCount>m.errorUpdateCount,isFetching:z,isRefetching:z&&!$,isLoadingError:Q&&!se,isPaused:w.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:Q&&se,isStale:Td(r,a),refetch:this.refetch,promise:C(this,kr),isEnabled:_n(a.enabled,r)!==!1};if(this.options.experimental_prefetchInRender){const Z=tt=>{B.status==="error"?tt.reject(B.error):B.data!==void 0&&tt.resolve(B.data)},ze=()=>{const tt=ee(this,kr,B.promise=Jc());Z(tt)},Xe=C(this,kr);switch(Xe.status){case"pending":r.queryHash===o.queryHash&&Z(Xe);break;case"fulfilled":(B.status==="error"||B.data!==Xe.value)&&ze();break;case"rejected":(B.status!=="error"||B.error!==Xe.reason)&&ze();break}}return B}updateResult(){const r=C(this,Zt),a=this.createResult(C(this,Be),this.options);if(ee(this,Vs,C(this,Be).state),ee(this,Ua,this.options),C(this,Vs).data!==void 0&&ee(this,qa,C(this,Be)),Fo(a,r))return;ee(this,Zt,a);const o=()=>{if(!r)return!0;const{notifyOnChangeProps:u}=this.options,d=typeof u=="function"?u():u;if(d==="all"||!d&&!C(this,Ba).size)return!0;const h=new Set(d??C(this,Ba));return this.options.throwOnError&&h.add("error"),Object.keys(C(this,Zt)).some(p=>{const g=p;return C(this,Zt)[g]!==r[g]&&h.has(g)})};De(this,et,Jm).call(this,{listeners:o()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&De(this,et,rd).call(this)}},hn=new WeakMap,Be=new WeakMap,sl=new WeakMap,Zt=new WeakMap,Vs=new WeakMap,Ua=new WeakMap,kr=new WeakMap,as=new WeakMap,al=new WeakMap,$a=new WeakMap,qa=new WeakMap,Ws=new WeakMap,Ks=new WeakMap,is=new WeakMap,Ba=new WeakMap,et=new WeakSet,Ki=function(r){De(this,et,id).call(this);let a=C(this,Be).fetch(this.options,r);return r!=null&&r.throwOnError||(a=a.catch(tn)),a},ed=function(){De(this,et,sd).call(this);const r=fs(this.options.staleTime,C(this,Be));if(Xs||C(this,Zt).isStale||!Gc(r))return;const o=Hm(C(this,Zt).dataUpdatedAt,r)+1;ee(this,Ws,zs.setTimeout(()=>{C(this,Zt).isStale||this.updateResult()},o))},td=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(C(this,Be)):this.options.refetchInterval)??!1},nd=function(r){De(this,et,ad).call(this),ee(this,is,r),!(Xs||_n(this.options.enabled,C(this,Be))===!1||!Gc(C(this,is))||C(this,is)===0)&&ee(this,Ks,zs.setInterval(()=>{(this.options.refetchIntervalInBackground||Pd.isFocused())&&De(this,et,Ki).call(this)},C(this,is)))},rd=function(){De(this,et,ed).call(this),De(this,et,nd).call(this,De(this,et,td).call(this))},sd=function(){C(this,Ws)&&(zs.clearTimeout(C(this,Ws)),ee(this,Ws,void 0))},ad=function(){C(this,Ks)&&(zs.clearInterval(C(this,Ks)),ee(this,Ks,void 0))},id=function(){const r=C(this,hn).getQueryCache().build(C(this,hn),this.options);if(r===C(this,Be))return;const a=C(this,Be);ee(this,Be,r),ee(this,sl,r.state),this.hasListeners()&&(a==null||a.removeObserver(this),r.addObserver(this))},Jm=function(r){At.batch(()=>{r.listeners&&this.listeners.forEach(a=>{a(C(this,Zt))}),C(this,hn).getQueryCache().notify({query:C(this,Be),type:"observerResultsUpdated"})})},Om);function Rx(n,r){return _n(r.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&r.retryOnMount===!1)}function Op(n,r){return Rx(n,r)||n.state.data!==void 0&&ld(n,r,r.refetchOnMount)}function ld(n,r,a){if(_n(r.enabled,n)!==!1&&fs(r.staleTime,n)!=="static"){const o=typeof a=="function"?a(n):a;return o==="always"||o!==!1&&Td(n,r)}return!1}function Fp(n,r,a,o){return(n!==r||_n(o.enabled,n)===!1)&&(!a.suspense||n.state.status!=="error")&&Td(n,a)}function Td(n,r){return _n(r.enabled,n)!==!1&&n.isStaleByTime(fs(r.staleTime,n))}function Px(n,r){return!Fo(n.getCurrentResult(),r)}function Ip(n){return{onFetch:(r,a)=>{var y,w,x,b,L;const o=r.options,u=(x=(w=(y=r.fetchOptions)==null?void 0:y.meta)==null?void 0:w.fetchMore)==null?void 0:x.direction,d=((b=r.state.data)==null?void 0:b.pages)||[],h=((L=r.state.data)==null?void 0:L.pageParams)||[];let p={pages:[],pageParams:[]},g=0;const m=async()=>{let R=!1;const N=$=>{Object.defineProperty($,"signal",{enumerable:!0,get:()=>(r.signal.aborted?R=!0:r.signal.addEventListener("abort",()=>{R=!0}),r.signal)})},T=Vm(r.options,r.fetchOptions),z=async($,Q,J)=>{if(R)return Promise.reject();if(Q==null&&$.pages.length)return Promise.resolve($);const A=(()=>{const ze={client:r.client,queryKey:r.queryKey,pageParam:Q,direction:J?"backward":"forward",meta:r.options.meta};return N(ze),ze})(),B=await T(A),{maxPages:pe}=r.options,Z=J?wx:xx;return{pages:Z($.pages,B,pe),pageParams:Z($.pageParams,Q,pe)}};if(u&&d.length){const $=u==="backward",Q=$?Tx:zp,J={pages:d,pageParams:h},se=Q(o,J);p=await z(J,se,$)}else{const $=n??d.length;do{const Q=g===0?h[0]??o.initialPageParam:zp(o,p);if(g>0&&Q==null)break;p=await z(p,Q),g++}while(g<$)}return p};r.options.persister?r.fetchFn=()=>{var R,N;return(N=(R=r.options).persister)==null?void 0:N.call(R,m,{client:r.client,queryKey:r.queryKey,meta:r.options.meta,signal:r.signal},a)}:r.fetchFn=m}}}function zp(n,{pages:r,pageParams:a}){const o=r.length-1;return r.length>0?n.getNextPageParam(r[o],r,a[o],a):void 0}function Tx(n,{pages:r,pageParams:a}){var o;return r.length>0?(o=n.getPreviousPageParam)==null?void 0:o.call(n,r[0],r,a[0],a):void 0}var il,rr,en,Gs,sr,Zr,Fm,Lx=(Fm=class extends Ym{constructor(r){super();ke(this,sr);ke(this,il);ke(this,rr);ke(this,en);ke(this,Gs);ee(this,il,r.client),this.mutationId=r.mutationId,ee(this,en,r.mutationCache),ee(this,rr,[]),this.state=r.state||Zm(),this.setOptions(r.options),this.scheduleGc()}setOptions(r){this.options=r,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(r){C(this,rr).includes(r)||(C(this,rr).push(r),this.clearGcTimeout(),C(this,en).notify({type:"observerAdded",mutation:this,observer:r}))}removeObserver(r){ee(this,rr,C(this,rr).filter(a=>a!==r)),this.scheduleGc(),C(this,en).notify({type:"observerRemoved",mutation:this,observer:r})}optionalRemove(){C(this,rr).length||(this.state.status==="pending"?this.scheduleGc():C(this,en).remove(this))}continue(){var r;return((r=C(this,Gs))==null?void 0:r.continue())??this.execute(this.state.variables)}async execute(r){var h,p,g,m,y,w,x,b,L,R,N,T,z,$,Q,J,se,A,B,pe;const a=()=>{De(this,sr,Zr).call(this,{type:"continue"})},o={client:C(this,il),meta:this.options.meta,mutationKey:this.options.mutationKey};ee(this,Gs,Gm({fn:()=>this.options.mutationFn?this.options.mutationFn(r,o):Promise.reject(new Error("No mutationFn found")),onFail:(Z,ze)=>{De(this,sr,Zr).call(this,{type:"failed",failureCount:Z,error:ze})},onPause:()=>{De(this,sr,Zr).call(this,{type:"pause"})},onContinue:a,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>C(this,en).canRun(this)}));const u=this.state.status==="pending",d=!C(this,Gs).canStart();try{if(u)a();else{De(this,sr,Zr).call(this,{type:"pending",variables:r,isPaused:d}),await((p=(h=C(this,en).config).onMutate)==null?void 0:p.call(h,r,this,o));const ze=await((m=(g=this.options).onMutate)==null?void 0:m.call(g,r,o));ze!==this.state.context&&De(this,sr,Zr).call(this,{type:"pending",context:ze,variables:r,isPaused:d})}const Z=await C(this,Gs).start();return await((w=(y=C(this,en).config).onSuccess)==null?void 0:w.call(y,Z,r,this.state.context,this,o)),await((b=(x=this.options).onSuccess)==null?void 0:b.call(x,Z,r,this.state.context,o)),await((R=(L=C(this,en).config).onSettled)==null?void 0:R.call(L,Z,null,this.state.variables,this.state.context,this,o)),await((T=(N=this.options).onSettled)==null?void 0:T.call(N,Z,null,r,this.state.context,o)),De(this,sr,Zr).call(this,{type:"success",data:Z}),Z}catch(Z){try{throw await(($=(z=C(this,en).config).onError)==null?void 0:$.call(z,Z,r,this.state.context,this,o)),await((J=(Q=this.options).onError)==null?void 0:J.call(Q,Z,r,this.state.context,o)),await((A=(se=C(this,en).config).onSettled)==null?void 0:A.call(se,void 0,Z,this.state.variables,this.state.context,this,o)),await((pe=(B=this.options).onSettled)==null?void 0:pe.call(B,void 0,Z,r,this.state.context,o)),Z}finally{De(this,sr,Zr).call(this,{type:"error",error:Z})}}finally{C(this,en).runNext(this)}}},il=new WeakMap,rr=new WeakMap,en=new WeakMap,Gs=new WeakMap,sr=new WeakSet,Zr=function(r){const a=o=>{switch(r.type){case"failed":return{...o,failureCount:r.failureCount,failureReason:r.error};case"pause":return{...o,isPaused:!0};case"continue":return{...o,isPaused:!1};case"pending":return{...o,context:r.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:r.isPaused,status:"pending",variables:r.variables,submittedAt:Date.now()};case"success":return{...o,data:r.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...o,data:void 0,error:r.error,failureCount:o.failureCount+1,failureReason:r.error,isPaused:!1,status:"error"}}};this.state=a(this.state),At.batch(()=>{C(this,rr).forEach(o=>{o.onMutationUpdate(r)}),C(this,en).notify({mutation:this,type:"updated",action:r})})},Fm);function Zm(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var br,Qn,ll,Im,eg=(Im=class extends Ka{constructor(r={}){super();ke(this,br);ke(this,Qn);ke(this,ll);this.config=r,ee(this,br,new Set),ee(this,Qn,new Map),ee(this,ll,0)}build(r,a,o){const u=new Lx({client:r,mutationCache:this,mutationId:++ko(this,ll)._,options:r.defaultMutationOptions(a),state:o});return this.add(u),u}add(r){C(this,br).add(r);const a=jo(r);if(typeof a=="string"){const o=C(this,Qn).get(a);o?o.push(r):C(this,Qn).set(a,[r])}this.notify({type:"added",mutation:r})}remove(r){if(C(this,br).delete(r)){const a=jo(r);if(typeof a=="string"){const o=C(this,Qn).get(a);if(o)if(o.length>1){const u=o.indexOf(r);u!==-1&&o.splice(u,1)}else o[0]===r&&C(this,Qn).delete(a)}}this.notify({type:"removed",mutation:r})}canRun(r){const a=jo(r);if(typeof a=="string"){const o=C(this,Qn).get(a),u=o==null?void 0:o.find(d=>d.state.status==="pending");return!u||u===r}else return!0}runNext(r){var o;const a=jo(r);if(typeof a=="string"){const u=(o=C(this,Qn).get(a))==null?void 0:o.find(d=>d!==r&&d.state.isPaused);return(u==null?void 0:u.continue())??Promise.resolve()}else return Promise.resolve()}clear(){At.batch(()=>{C(this,br).forEach(r=>{this.notify({type:"removed",mutation:r})}),C(this,br).clear(),C(this,Qn).clear()})}getAll(){return Array.from(C(this,br))}find(r){const a={exact:!0,...r};return this.getAll().find(o=>Lp(a,o))}findAll(r={}){return this.getAll().filter(a=>Lp(r,a))}notify(r){At.batch(()=>{this.listeners.forEach(a=>{a(r)})})}resumePausedMutations(){const r=this.getAll().filter(a=>a.state.isPaused);return At.batch(()=>Promise.all(r.map(a=>a.continue().catch(tn))))}},br=new WeakMap,Qn=new WeakMap,ll=new WeakMap,Im);function jo(n){var r;return(r=n.options.scope)==null?void 0:r.id}var jr,ls,pn,Sr,Cr,Lo,od,zm,Mx=(zm=class extends Ka{constructor(a,o){super();ke(this,Cr);ke(this,jr);ke(this,ls);ke(this,pn);ke(this,Sr);ee(this,jr,a),this.setOptions(o),this.bindMethods(),De(this,Cr,Lo).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(a){var u;const o=this.options;this.options=C(this,jr).defaultMutationOptions(a),Fo(this.options,o)||C(this,jr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:C(this,pn),observer:this}),o!=null&&o.mutationKey&&this.options.mutationKey&&Js(o.mutationKey)!==Js(this.options.mutationKey)?this.reset():((u=C(this,pn))==null?void 0:u.state.status)==="pending"&&C(this,pn).setOptions(this.options)}onUnsubscribe(){var a;this.hasListeners()||(a=C(this,pn))==null||a.removeObserver(this)}onMutationUpdate(a){De(this,Cr,Lo).call(this),De(this,Cr,od).call(this,a)}getCurrentResult(){return C(this,ls)}reset(){var a;(a=C(this,pn))==null||a.removeObserver(this),ee(this,pn,void 0),De(this,Cr,Lo).call(this),De(this,Cr,od).call(this)}mutate(a,o){var u;return ee(this,Sr,o),(u=C(this,pn))==null||u.removeObserver(this),ee(this,pn,C(this,jr).getMutationCache().build(C(this,jr),this.options)),C(this,pn).addObserver(this),C(this,pn).execute(a)}},jr=new WeakMap,ls=new WeakMap,pn=new WeakMap,Sr=new WeakMap,Cr=new WeakSet,Lo=function(){var o;const a=((o=C(this,pn))==null?void 0:o.state)??Zm();ee(this,ls,{...a,isPending:a.status==="pending",isSuccess:a.status==="success",isError:a.status==="error",isIdle:a.status==="idle",mutate:this.mutate,reset:this.reset})},od=function(a){At.batch(()=>{var o,u,d,h,p,g,m,y;if(C(this,Sr)&&this.hasListeners()){const w=C(this,ls).variables,x=C(this,ls).context,b={client:C(this,jr),meta:this.options.meta,mutationKey:this.options.mutationKey};(a==null?void 0:a.type)==="success"?((u=(o=C(this,Sr)).onSuccess)==null||u.call(o,a.data,w,x,b),(h=(d=C(this,Sr)).onSettled)==null||h.call(d,a.data,null,w,x,b)):(a==null?void 0:a.type)==="error"&&((g=(p=C(this,Sr)).onError)==null||g.call(p,a.error,w,x,b),(y=(m=C(this,Sr)).onSettled)==null||y.call(m,void 0,a.error,w,x,b))}this.listeners.forEach(w=>{w(C(this,ls))})})},zm),ar,Um,_x=(Um=class extends Ka{constructor(r={}){super();ke(this,ar);this.config=r,ee(this,ar,new Map)}build(r,a,o){const u=a.queryKey,d=a.queryHash??Ed(u,a);let h=this.get(d);return h||(h=new Nx({client:r,queryKey:u,queryHash:d,options:r.defaultQueryOptions(a),state:o,defaultOptions:r.getQueryDefaults(u)}),this.add(h)),h}add(r){C(this,ar).has(r.queryHash)||(C(this,ar).set(r.queryHash,r),this.notify({type:"added",query:r}))}remove(r){const a=C(this,ar).get(r.queryHash);a&&(r.destroy(),a===r&&C(this,ar).delete(r.queryHash),this.notify({type:"removed",query:r}))}clear(){At.batch(()=>{this.getAll().forEach(r=>{this.remove(r)})})}get(r){return C(this,ar).get(r)}getAll(){return[...C(this,ar).values()]}find(r){const a={exact:!0,...r};return this.getAll().find(o=>Tp(a,o))}findAll(r={}){const a=this.getAll();return Object.keys(r).length>0?a.filter(o=>Tp(r,o)):a}notify(r){At.batch(()=>{this.listeners.forEach(a=>{a(r)})})}onFocus(){At.batch(()=>{this.getAll().forEach(r=>{r.onFocus()})})}onOnline(){At.batch(()=>{this.getAll().forEach(r=>{r.onOnline()})})}},ar=new WeakMap,Um),jt,os,us,Ha,Qa,cs,Va,Wa,$m,Ax=($m=class{constructor(n={}){ke(this,jt);ke(this,os);ke(this,us);ke(this,Ha);ke(this,Qa);ke(this,cs);ke(this,Va);ke(this,Wa);ee(this,jt,n.queryCache||new _x),ee(this,os,n.mutationCache||new eg),ee(this,us,n.defaultOptions||{}),ee(this,Ha,new Map),ee(this,Qa,new Map),ee(this,cs,0)}mount(){ko(this,cs)._++,C(this,cs)===1&&(ee(this,Va,Pd.subscribe(async n=>{n&&(await this.resumePausedMutations(),C(this,jt).onFocus())})),ee(this,Wa,Io.subscribe(async n=>{n&&(await this.resumePausedMutations(),C(this,jt).onOnline())})))}unmount(){var n,r;ko(this,cs)._--,C(this,cs)===0&&((n=C(this,Va))==null||n.call(this),ee(this,Va,void 0),(r=C(this,Wa))==null||r.call(this),ee(this,Wa,void 0))}isFetching(n){return C(this,jt).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return C(this,os).findAll({...n,status:"pending"}).length}getQueryData(n){var a;const r=this.defaultQueryOptions({queryKey:n});return(a=C(this,jt).get(r.queryHash))==null?void 0:a.state.data}ensureQueryData(n){const r=this.defaultQueryOptions(n),a=C(this,jt).build(this,r),o=a.state.data;return o===void 0?this.fetchQuery(n):(n.revalidateIfStale&&a.isStaleByTime(fs(r.staleTime,a))&&this.prefetchQuery(r),Promise.resolve(o))}getQueriesData(n){return C(this,jt).findAll(n).map(({queryKey:r,state:a})=>{const o=a.data;return[r,o]})}setQueryData(n,r,a){const o=this.defaultQueryOptions({queryKey:n}),u=C(this,jt).get(o.queryHash),d=u==null?void 0:u.state.data,h=gx(r,d);if(h!==void 0)return C(this,jt).build(this,o).setData(h,{...a,manual:!0})}setQueriesData(n,r,a){return At.batch(()=>C(this,jt).findAll(n).map(({queryKey:o})=>[o,this.setQueryData(o,r,a)]))}getQueryState(n){var a;const r=this.defaultQueryOptions({queryKey:n});return(a=C(this,jt).get(r.queryHash))==null?void 0:a.state}removeQueries(n){const r=C(this,jt);At.batch(()=>{r.findAll(n).forEach(a=>{r.remove(a)})})}resetQueries(n,r){const a=C(this,jt);return At.batch(()=>(a.findAll(n).forEach(o=>{o.reset()}),this.refetchQueries({type:"active",...n},r)))}cancelQueries(n,r={}){const a={revert:!0,...r},o=At.batch(()=>C(this,jt).findAll(n).map(u=>u.cancel(a)));return Promise.all(o).then(tn).catch(tn)}invalidateQueries(n,r={}){return At.batch(()=>(C(this,jt).findAll(n).forEach(a=>{a.invalidate()}),(n==null?void 0:n.refetchType)==="none"?Promise.resolve():this.refetchQueries({...n,type:(n==null?void 0:n.refetchType)??(n==null?void 0:n.type)??"active"},r)))}refetchQueries(n,r={}){const a={...r,cancelRefetch:r.cancelRefetch??!0},o=At.batch(()=>C(this,jt).findAll(n).filter(u=>!u.isDisabled()&&!u.isStatic()).map(u=>{let d=u.fetch(void 0,a);return a.throwOnError||(d=d.catch(tn)),u.state.fetchStatus==="paused"?Promise.resolve():d}));return Promise.all(o).then(tn)}fetchQuery(n){const r=this.defaultQueryOptions(n);r.retry===void 0&&(r.retry=!1);const a=C(this,jt).build(this,r);return a.isStaleByTime(fs(r.staleTime,a))?a.fetch(r):Promise.resolve(a.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(tn).catch(tn)}fetchInfiniteQuery(n){return n.behavior=Ip(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(tn).catch(tn)}ensureInfiniteQueryData(n){return n.behavior=Ip(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return Io.isOnline()?C(this,os).resumePausedMutations():Promise.resolve()}getQueryCache(){return C(this,jt)}getMutationCache(){return C(this,os)}getDefaultOptions(){return C(this,us)}setDefaultOptions(n){ee(this,us,n)}setQueryDefaults(n,r){C(this,Ha).set(Js(n),{queryKey:n,defaultOptions:r})}getQueryDefaults(n){const r=[...C(this,Ha).values()],a={};return r.forEach(o=>{Xi(n,o.queryKey)&&Object.assign(a,o.defaultOptions)}),a}setMutationDefaults(n,r){C(this,Qa).set(Js(n),{mutationKey:n,defaultOptions:r})}getMutationDefaults(n){const r=[...C(this,Qa).values()],a={};return r.forEach(o=>{Xi(n,o.mutationKey)&&Object.assign(a,o.defaultOptions)}),a}defaultQueryOptions(n){if(n._defaulted)return n;const r={...C(this,us).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return r.queryHash||(r.queryHash=Ed(r.queryKey,r)),r.refetchOnReconnect===void 0&&(r.refetchOnReconnect=r.networkMode!=="always"),r.throwOnError===void 0&&(r.throwOnError=!!r.suspense),!r.networkMode&&r.persister&&(r.networkMode="offlineFirst"),r.queryFn===Rd&&(r.enabled=!1),r}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...C(this,us).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){C(this,jt).clear(),C(this,os).clear()}},jt=new WeakMap,os=new WeakMap,us=new WeakMap,Ha=new WeakMap,Qa=new WeakMap,cs=new WeakMap,Va=new WeakMap,Wa=new WeakMap,$m),tg=k.createContext(void 0),St=n=>{const r=k.useContext(tg);if(!r)throw new Error("No QueryClient set, use QueryClientProvider to set one");return r},Dx=({client:n,children:r})=>(k.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),i.jsx(tg.Provider,{value:n,children:r})),ng=k.createContext(!1),Ox=()=>k.useContext(ng);ng.Provider;function Fx(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var Ix=k.createContext(Fx()),zx=()=>k.useContext(Ix),Ux=(n,r)=>{(n.suspense||n.throwOnError||n.experimental_prefetchInRender)&&(r.isReset()||(n.retryOnMount=!1))},$x=n=>{k.useEffect(()=>{n.clearReset()},[n])},qx=({result:n,errorResetBoundary:r,throwOnError:a,query:o,suspense:u})=>n.isError&&!r.isReset()&&!n.isFetching&&o&&(u&&n.data===void 0||Wm(a,[n.error,o])),Bx=n=>{if(n.suspense){const a=u=>u==="static"?u:Math.max(u??1e3,1e3),o=n.staleTime;n.staleTime=typeof o=="function"?(...u)=>a(o(...u)):a(o),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},Hx=(n,r)=>n.isLoading&&n.isFetching&&!r,Qx=(n,r)=>(n==null?void 0:n.suspense)&&r.isPending,Up=(n,r,a)=>r.fetchOptimistic(n).catch(()=>{a.clearReset()});function Vx(n,r,a){var w,x,b,L,R;const o=Ox(),u=zx(),d=St(),h=d.defaultQueryOptions(n);(x=(w=d.getDefaultOptions().queries)==null?void 0:w._experimental_beforeQuery)==null||x.call(w,h),h._optimisticResults=o?"isRestoring":"optimistic",Bx(h),Ux(h,u),$x(u);const p=!d.getQueryCache().get(h.queryHash),[g]=k.useState(()=>new r(d,h)),m=g.getOptimisticResult(h),y=!o&&n.subscribed!==!1;if(k.useSyncExternalStore(k.useCallback(N=>{const T=y?g.subscribe(At.batchCalls(N)):tn;return g.updateResult(),T},[g,y]),()=>g.getCurrentResult(),()=>g.getCurrentResult()),k.useEffect(()=>{g.setOptions(h)},[h,g]),Qx(h,m))throw Up(h,g,u);if(qx({result:m,errorResetBoundary:u,throwOnError:h.throwOnError,query:d.getQueryCache().get(h.queryHash),suspense:h.suspense}))throw m.error;if((L=(b=d.getDefaultOptions().queries)==null?void 0:b._experimental_afterQuery)==null||L.call(b,h,m),h.experimental_prefetchInRender&&!Xs&&Hx(m,o)){const N=p?Up(h,g,u):(R=d.getQueryCache().get(h.queryHash))==null?void 0:R.promise;N==null||N.catch(tn).finally(()=>{g.updateResult()})}return h.notifyOnChangeProps?m:g.trackResult(m)}function Rt(n,r){return Vx(n,Ex)}function Ft(n,r){const a=St(),[o]=k.useState(()=>new Mx(a,n));k.useEffect(()=>{o.setOptions(n)},[o,n]);const u=k.useSyncExternalStore(k.useCallback(h=>o.subscribe(At.batchCalls(h)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),d=k.useCallback((h,p)=>{o.mutate(h,p).catch(tn)},[o]);if(u.error&&Wm(o.options.throwOnError,[u.error]))throw u.error;return{...u,mutate:d,mutateAsync:u.mutate}}/**
|
|
41
|
-
* react-router v7.9.6
|
|
42
|
-
*
|
|
43
|
-
* Copyright (c) Remix Software Inc.
|
|
44
|
-
*
|
|
45
|
-
* This source code is licensed under the MIT license found in the
|
|
46
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
47
|
-
*
|
|
48
|
-
* @license MIT
|
|
49
|
-
*/var rg=n=>{throw TypeError(n)},Wx=(n,r,a)=>r.has(n)||rg("Cannot "+a),$c=(n,r,a)=>(Wx(n,r,"read from private field"),a?a.call(n):r.get(n)),Kx=(n,r,a)=>r.has(n)?rg("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(n):r.set(n,a),$p="popstate";function Gx(n={}){function r(o,u){let{pathname:d,search:h,hash:p}=o.location;return Ji("",{pathname:d,search:h,hash:p},u.state&&u.state.usr||null,u.state&&u.state.key||"default")}function a(o,u){return typeof u=="string"?u:lr(u)}return Xx(r,a,null,n)}function Ie(n,r){if(n===!1||n===null||typeof n>"u")throw new Error(r)}function xt(n,r){if(!n){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function Yx(){return Math.random().toString(36).substring(2,10)}function qp(n,r){return{usr:n.state,key:n.key,idx:r}}function Ji(n,r,a=null,o){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof r=="string"?ms(r):r,state:a,key:r&&r.key||o||Yx()}}function lr({pathname:n="/",search:r="",hash:a=""}){return r&&r!=="?"&&(n+=r.charAt(0)==="?"?r:"?"+r),a&&a!=="#"&&(n+=a.charAt(0)==="#"?a:"#"+a),n}function ms(n){let r={};if(n){let a=n.indexOf("#");a>=0&&(r.hash=n.substring(a),n=n.substring(0,a));let o=n.indexOf("?");o>=0&&(r.search=n.substring(o),n=n.substring(0,o)),n&&(r.pathname=n)}return r}function Xx(n,r,a,o={}){let{window:u=document.defaultView,v5Compat:d=!1}=o,h=u.history,p="POP",g=null,m=y();m==null&&(m=0,h.replaceState({...h.state,idx:m},""));function y(){return(h.state||{idx:null}).idx}function w(){p="POP";let N=y(),T=N==null?null:N-m;m=N,g&&g({action:p,location:R.location,delta:T})}function x(N,T){p="PUSH";let z=Ji(R.location,N,T);m=y()+1;let $=qp(z,m),Q=R.createHref(z);try{h.pushState($,"",Q)}catch(J){if(J instanceof DOMException&&J.name==="DataCloneError")throw J;u.location.assign(Q)}d&&g&&g({action:p,location:R.location,delta:1})}function b(N,T){p="REPLACE";let z=Ji(R.location,N,T);m=y();let $=qp(z,m),Q=R.createHref(z);h.replaceState($,"",Q),d&&g&&g({action:p,location:R.location,delta:0})}function L(N){return sg(N)}let R={get action(){return p},get location(){return n(u,h)},listen(N){if(g)throw new Error("A history only accepts one active listener");return u.addEventListener($p,w),g=N,()=>{u.removeEventListener($p,w),g=null}},createHref(N){return r(u,N)},createURL:L,encodeLocation(N){let T=L(N);return{pathname:T.pathname,search:T.search,hash:T.hash}},push:x,replace:b,go(N){return h.go(N)}};return R}function sg(n,r=!1){let a="http://localhost";typeof window<"u"&&(a=window.location.origin!=="null"?window.location.origin:window.location.href),Ie(a,"No window.location.(origin|href) available to create URL");let o=typeof n=="string"?n:lr(n);return o=o.replace(/ $/,"%20"),!r&&o.startsWith("//")&&(o=a+o),new URL(o,a)}var Gi,Bp=class{constructor(n){if(Kx(this,Gi,new Map),n)for(let[r,a]of n)this.set(r,a)}get(n){if($c(this,Gi).has(n))return $c(this,Gi).get(n);if(n.defaultValue!==void 0)return n.defaultValue;throw new Error("No value found for context")}set(n,r){$c(this,Gi).set(n,r)}};Gi=new WeakMap;var Jx=new Set(["lazy","caseSensitive","path","id","index","children"]);function Zx(n){return Jx.has(n)}var e0=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function t0(n){return e0.has(n)}function n0(n){return n.index===!0}function Zi(n,r,a=[],o={},u=!1){return n.map((d,h)=>{let p=[...a,String(h)],g=typeof d.id=="string"?d.id:p.join("-");if(Ie(d.index!==!0||!d.children,"Cannot specify children on an index route"),Ie(u||!o[g],`Found a route id collision on id "${g}". Route id's must be globally unique within Data Router usages`),n0(d)){let m={...d,id:g};return o[g]=Hp(m,r(m)),m}else{let m={...d,id:g,children:void 0};return o[g]=Hp(m,r(m)),d.children&&(m.children=Zi(d.children,r,p,o,u)),m}})}function Hp(n,r){return Object.assign(n,{...r,...typeof r.lazy=="object"&&r.lazy!=null?{lazy:{...n.lazy,...r.lazy}}:{}})}function es(n,r,a="/"){return Yi(n,r,a,!1)}function Yi(n,r,a,o){let u=typeof r=="string"?ms(r):r,d=An(u.pathname||"/",a);if(d==null)return null;let h=ag(n);s0(h);let p=null;for(let g=0;p==null&&g<h.length;++g){let m=m0(d);p=h0(h[g],m,o)}return p}function r0(n,r){let{route:a,pathname:o,params:u}=n;return{id:a.id,pathname:o,params:u,data:r[a.id],loaderData:r[a.id],handle:a.handle}}function ag(n,r=[],a=[],o="",u=!1){let d=(h,p,g=u,m)=>{let y={relativePath:m===void 0?h.path||"":m,caseSensitive:h.caseSensitive===!0,childrenIndex:p,route:h};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(o)&&g)return;Ie(y.relativePath.startsWith(o),`Absolute route path "${y.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(o.length)}let w=ir([o,y.relativePath]),x=a.concat(y);h.children&&h.children.length>0&&(Ie(h.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${w}".`),ag(h.children,r,x,w,g)),!(h.path==null&&!h.index)&&r.push({path:w,score:d0(w,h.index),routesMeta:x})};return n.forEach((h,p)=>{var g;if(h.path===""||!((g=h.path)!=null&&g.includes("?")))d(h,p);else for(let m of ig(h.path))d(h,p,!0,m)}),r}function ig(n){let r=n.split("/");if(r.length===0)return[];let[a,...o]=r,u=a.endsWith("?"),d=a.replace(/\?$/,"");if(o.length===0)return u?[d,""]:[d];let h=ig(o.join("/")),p=[];return p.push(...h.map(g=>g===""?d:[d,g].join("/"))),u&&p.push(...h),p.map(g=>n.startsWith("/")&&g===""?"/":g)}function s0(n){n.sort((r,a)=>r.score!==a.score?a.score-r.score:f0(r.routesMeta.map(o=>o.childrenIndex),a.routesMeta.map(o=>o.childrenIndex)))}var a0=/^:[\w-]+$/,i0=3,l0=2,o0=1,u0=10,c0=-2,Qp=n=>n==="*";function d0(n,r){let a=n.split("/"),o=a.length;return a.some(Qp)&&(o+=c0),r&&(o+=l0),a.filter(u=>!Qp(u)).reduce((u,d)=>u+(a0.test(d)?i0:d===""?o0:u0),o)}function f0(n,r){return n.length===r.length&&n.slice(0,-1).every((o,u)=>o===r[u])?n[n.length-1]-r[r.length-1]:0}function h0(n,r,a=!1){let{routesMeta:o}=n,u={},d="/",h=[];for(let p=0;p<o.length;++p){let g=o[p],m=p===o.length-1,y=d==="/"?r:r.slice(d.length)||"/",w=zo({path:g.relativePath,caseSensitive:g.caseSensitive,end:m},y),x=g.route;if(!w&&m&&a&&!o[o.length-1].route.index&&(w=zo({path:g.relativePath,caseSensitive:g.caseSensitive,end:!1},y)),!w)return null;Object.assign(u,w.params),h.push({params:u,pathname:ir([d,w.pathname]),pathnameBase:x0(ir([d,w.pathnameBase])),route:x}),w.pathnameBase!=="/"&&(d=ir([d,w.pathnameBase]))}return h}function zo(n,r){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[a,o]=p0(n.path,n.caseSensitive,n.end),u=r.match(a);if(!u)return null;let d=u[0],h=d.replace(/(.)\/+$/,"$1"),p=u.slice(1);return{params:o.reduce((m,{paramName:y,isOptional:w},x)=>{if(y==="*"){let L=p[x]||"";h=d.slice(0,d.length-L.length).replace(/(.)\/+$/,"$1")}const b=p[x];return w&&!b?m[y]=void 0:m[y]=(b||"").replace(/%2F/g,"/"),m},{}),pathname:d,pathnameBase:h,pattern:n}}function p0(n,r=!1,a=!0){xt(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let o=[],u="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(h,p,g)=>(o.push({paramName:p,isOptional:g!=null}),g?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(o.push({paramName:"*"}),u+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?u+="\\/*$":n!==""&&n!=="/"&&(u+="(?:(?=\\/|$))"),[new RegExp(u,r?void 0:"i"),o]}function m0(n){try{return n.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return xt(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${r}).`),n}}function An(n,r){if(r==="/")return n;if(!n.toLowerCase().startsWith(r.toLowerCase()))return null;let a=r.endsWith("/")?r.length-1:r.length,o=n.charAt(a);return o&&o!=="/"?null:n.slice(a)||"/"}function g0({basename:n,pathname:r}){return r==="/"?n:ir([n,r])}var y0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ho=n=>y0.test(n);function v0(n,r="/"){let{pathname:a,search:o="",hash:u=""}=typeof n=="string"?ms(n):n,d;if(a)if(Ho(a))d=a;else{if(a.includes("//")){let h=a;a=a.replace(/\/\/+/g,"/"),xt(!1,`Pathnames cannot have embedded double slashes - normalizing ${h} -> ${a}`)}a.startsWith("/")?d=Vp(a.substring(1),"/"):d=Vp(a,r)}else d=r;return{pathname:d,search:w0(o),hash:k0(u)}}function Vp(n,r){let a=r.replace(/\/+$/,"").split("/");return n.split("/").forEach(u=>{u===".."?a.length>1&&a.pop():u!=="."&&a.push(u)}),a.length>1?a.join("/"):"/"}function qc(n,r,a,o){return`Cannot include a '${n}' character in a manually specified \`to.${r}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${a}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function lg(n){return n.filter((r,a)=>a===0||r.route.path&&r.route.path.length>0)}function Qo(n){let r=lg(n);return r.map((a,o)=>o===r.length-1?a.pathname:a.pathnameBase)}function Vo(n,r,a,o=!1){let u;typeof n=="string"?u=ms(n):(u={...n},Ie(!u.pathname||!u.pathname.includes("?"),qc("?","pathname","search",u)),Ie(!u.pathname||!u.pathname.includes("#"),qc("#","pathname","hash",u)),Ie(!u.search||!u.search.includes("#"),qc("#","search","hash",u)));let d=n===""||u.pathname==="",h=d?"/":u.pathname,p;if(h==null)p=a;else{let w=r.length-1;if(!o&&h.startsWith("..")){let x=h.split("/");for(;x[0]==="..";)x.shift(),w-=1;u.pathname=x.join("/")}p=w>=0?r[w]:"/"}let g=v0(u,p),m=h&&h!=="/"&&h.endsWith("/"),y=(d||h===".")&&a.endsWith("/");return!g.pathname.endsWith("/")&&(m||y)&&(g.pathname+="/"),g}var ir=n=>n.join("/").replace(/\/\/+/g,"/"),x0=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),w0=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,k0=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,Uo=class{constructor(n,r,a,o=!1){this.status=n,this.statusText=r||"",this.internal=o,a instanceof Error?(this.data=a.toString(),this.error=a):this.data=a}};function el(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function Ld(n){return n.filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var ds=Symbol("Uninstrumented");function b0(n,r){let a={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};n.forEach(u=>u({id:r.id,index:r.index,path:r.path,instrument(d){let h=Object.keys(a);for(let p of h)d[p]&&a[p].push(d[p])}}));let o={};if(typeof r.lazy=="function"&&a.lazy.length>0){let u=_a(a.lazy,r.lazy,()=>{});u&&(o.lazy=u)}if(typeof r.lazy=="object"){let u=r.lazy;["middleware","loader","action"].forEach(d=>{let h=u[d],p=a[`lazy.${d}`];if(typeof h=="function"&&p.length>0){let g=_a(p,h,()=>{});g&&(o.lazy=Object.assign(o.lazy||{},{[d]:g}))}})}return["loader","action"].forEach(u=>{let d=r[u];if(typeof d=="function"&&a[u].length>0){let h=d[ds]??d,p=_a(a[u],h,(...g)=>Wp(g[0]));p&&(p[ds]=h,o[u]=p)}}),r.middleware&&r.middleware.length>0&&a.middleware.length>0&&(o.middleware=r.middleware.map(u=>{let d=u[ds]??u,h=_a(a.middleware,d,(...p)=>Wp(p[0]));return h?(h[ds]=d,h):u})),o}function j0(n,r){let a={navigate:[],fetch:[]};if(r.forEach(o=>o({instrument(u){let d=Object.keys(u);for(let h of d)u[h]&&a[h].push(u[h])}})),a.navigate.length>0){let o=n.navigate[ds]??n.navigate,u=_a(a.navigate,o,(...d)=>{let[h,p]=d;return{to:typeof h=="number"||typeof h=="string"?h:h?lr(h):".",...Kp(n,p??{})}});u&&(u[ds]=o,n.navigate=u)}if(a.fetch.length>0){let o=n.fetch[ds]??n.fetch,u=_a(a.fetch,o,(...d)=>{let[h,,p,g]=d;return{href:p??".",fetcherKey:h,...Kp(n,g??{})}});u&&(u[ds]=o,n.fetch=u)}return n}function _a(n,r,a){return n.length===0?null:async(...o)=>{let u=await og(n,a(...o),()=>r(...o),n.length-1);if(u.type==="error")throw u.value;return u.value}}async function og(n,r,a,o){let u=n[o],d;if(u){let h,p=async()=>(h?console.error("You cannot call instrumented handlers more than once"):h=og(n,r,a,o-1),d=await h,Ie(d,"Expected a result"),d.type==="error"&&d.value instanceof Error?{status:"error",error:d.value}:{status:"success",error:void 0});try{await u(p,r)}catch(g){console.error("An instrumentation function threw an error:",g)}h||await p(),await h}else try{d={type:"success",value:await a()}}catch(h){d={type:"error",value:h}}return d||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function Wp(n){let{request:r,context:a,params:o,unstable_pattern:u}=n;return{request:S0(r),params:{...o},unstable_pattern:u,context:C0(a)}}function Kp(n,r){return{currentUrl:lr(n.state.location),..."formMethod"in r?{formMethod:r.formMethod}:{},..."formEncType"in r?{formEncType:r.formEncType}:{},..."formData"in r?{formData:r.formData}:{},..."body"in r?{body:r.body}:{}}}function S0(n){return{method:n.method,url:n.url,headers:{get:(...r)=>n.headers.get(...r)}}}function C0(n){if(E0(n)){let r={...n};return Object.freeze(r),r}else return{get:r=>n.get(r)}}var N0=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function E0(n){if(n===null||typeof n!="object")return!1;const r=Object.getPrototypeOf(n);return r===Object.prototype||r===null||Object.getOwnPropertyNames(r).sort().join("\0")===N0}var ug=["POST","PUT","PATCH","DELETE"],R0=new Set(ug),P0=["GET",...ug],T0=new Set(P0),L0=new Set([301,302,303,307,308]),M0=new Set([307,308]),Bc={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},_0={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Bi={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},A0=n=>({hasErrorBoundary:!!n.hasErrorBoundary}),cg="remix-router-transitions",dg=Symbol("ResetLoaderData");function D0(n){const r=n.window?n.window:typeof window<"u"?window:void 0,a=typeof r<"u"&&typeof r.document<"u"&&typeof r.document.createElement<"u";Ie(n.routes.length>0,"You must provide a non-empty routes array to createRouter");let o=n.hydrationRouteProperties||[],u=n.mapRouteProperties||A0,d=u;if(n.unstable_instrumentations){let S=n.unstable_instrumentations;d=_=>({...u(_),...b0(S.map(I=>I.route).filter(Boolean),_)})}let h={},p=Zi(n.routes,d,void 0,h),g,m=n.basename||"/";m.startsWith("/")||(m=`/${m}`);let y=n.dataStrategy||U0,w={...n.future},x=null,b=new Set,L=null,R=null,N=null,T=n.hydrationData!=null,z=es(p,n.history.location,m),$=!1,Q=null,J;if(z==null&&!n.patchRoutesOnNavigation){let S=Mn(404,{pathname:n.history.location.pathname}),{matches:_,route:I}=So(p);J=!0,z=_,Q={[I.id]:S}}else if(z&&!n.hydrationData&&ws(z,p,n.history.location.pathname).active&&(z=null),z)if(z.some(S=>S.route.lazy))J=!1;else if(!z.some(S=>Md(S.route)))J=!0;else{let S=n.hydrationData?n.hydrationData.loaderData:null,_=n.hydrationData?n.hydrationData.errors:null;if(_){let I=z.findIndex(V=>_[V.route.id]!==void 0);J=z.slice(0,I+1).every(V=>!cd(V.route,S,_))}else J=z.every(I=>!cd(I.route,S,_))}else{J=!1,z=[];let S=ws(null,p,n.history.location.pathname);S.active&&S.matches&&($=!0,z=S.matches)}let se,A={historyAction:n.history.action,location:n.history.location,matches:z,initialized:J,navigation:Bc,restoreScrollPosition:n.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:n.hydrationData&&n.hydrationData.loaderData||{},actionData:n.hydrationData&&n.hydrationData.actionData||null,errors:n.hydrationData&&n.hydrationData.errors||Q,fetchers:new Map,blockers:new Map},B="POP",pe=!1,Z,ze=!1,Xe=new Map,tt=null,pt=!1,Re=!1,Pe=new Set,ye=new Map,G=0,ne=-1,U=new Map,M=new Set,q=new Map,je=new Map,ve=new Set,xe=new Map,Se,Oe=null;function He(){if(x=n.history.listen(({action:S,location:_,delta:I})=>{if(Se){Se(),Se=void 0;return}xt(xe.size===0||I!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let V=aa({currentLocation:A.location,nextLocation:_,historyAction:S});if(V&&I!=null){let X=new Promise(ue=>{Se=ue});n.history.go(I*-1),Rr(V,{state:"blocked",location:_,proceed(){Rr(V,{state:"proceeding",proceed:void 0,reset:void 0,location:_}),X.then(()=>n.history.go(I))},reset(){let ue=new Map(A.blockers);ue.set(V,Bi),ot({blockers:ue})}});return}return Gn(S,_)}),a){tw(r,Xe);let S=()=>nw(r,Xe);r.addEventListener("pagehide",S),tt=()=>r.removeEventListener("pagehide",S)}return A.initialized||Gn("POP",A.location,{initialHydration:!0}),se}function Me(){x&&x(),tt&&tt(),b.clear(),Z&&Z.abort(),A.fetchers.forEach((S,_)=>or(_)),A.blockers.forEach((S,_)=>sa(_))}function It(S){return b.add(S),()=>b.delete(S)}function ot(S,_={}){S.matches&&(S.matches=S.matches.map(X=>{let ue=h[X.route.id],de=X.route;return de.element!==ue.element||de.errorElement!==ue.errorElement||de.hydrateFallbackElement!==ue.hydrateFallbackElement?{...X,route:ue}:X})),A={...A,...S};let I=[],V=[];A.fetchers.forEach((X,ue)=>{X.state==="idle"&&(ve.has(ue)?I.push(ue):V.push(ue))}),ve.forEach(X=>{!A.fetchers.has(X)&&!ye.has(X)&&I.push(X)}),[...b].forEach(X=>X(A,{deletedFetchers:I,viewTransitionOpts:_.viewTransitionOpts,flushSync:_.flushSync===!0})),I.forEach(X=>or(X)),V.forEach(X=>A.fetchers.delete(X))}function sn(S,_,{flushSync:I}={}){var we,ge;let V=A.actionData!=null&&A.navigation.formMethod!=null&&nn(A.navigation.formMethod)&&A.navigation.state==="loading"&&((we=S.state)==null?void 0:we._isRedirect)!==!0,X;_.actionData?Object.keys(_.actionData).length>0?X=_.actionData:X=null:V?X=A.actionData:X=null;let ue=_.loaderData?sm(A.loaderData,_.loaderData,_.matches||[],_.errors):A.loaderData,de=A.blockers;de.size>0&&(de=new Map(de),de.forEach((_e,rt)=>de.set(rt,Bi)));let ce=pt?!1:li(S,_.matches||A.matches),me=pe===!0||A.navigation.formMethod!=null&&nn(A.navigation.formMethod)&&((ge=S.state)==null?void 0:ge._isRedirect)!==!0;g&&(p=g,g=void 0),pt||B==="POP"||(B==="PUSH"?n.history.push(S,S.state):B==="REPLACE"&&n.history.replace(S,S.state));let be;if(B==="POP"){let _e=Xe.get(A.location.pathname);_e&&_e.has(S.pathname)?be={currentLocation:A.location,nextLocation:S}:Xe.has(S.pathname)&&(be={currentLocation:S,nextLocation:A.location})}else if(ze){let _e=Xe.get(A.location.pathname);_e?_e.add(S.pathname):(_e=new Set([S.pathname]),Xe.set(A.location.pathname,_e)),be={currentLocation:A.location,nextLocation:S}}ot({..._,actionData:X,loaderData:ue,historyAction:B,location:S,initialized:!0,navigation:Bc,revalidation:"idle",restoreScrollPosition:ce,preventScrollReset:me,blockers:de},{viewTransitionOpts:be,flushSync:I===!0}),B="POP",pe=!1,ze=!1,pt=!1,Re=!1,Oe==null||Oe.resolve(),Oe=null}async function Fn(S,_){if(typeof S=="number"){n.history.go(S);return}let I=ud(A.location,A.matches,m,S,_==null?void 0:_.fromRouteId,_==null?void 0:_.relative),{path:V,submission:X,error:ue}=Gp(!1,I,_),de=A.location,ce=Ji(A.location,V,_&&_.state);ce={...ce,...n.history.encodeLocation(ce)};let me=_&&_.replace!=null?_.replace:void 0,be="PUSH";me===!0?be="REPLACE":me===!1||X!=null&&nn(X.formMethod)&&X.formAction===A.location.pathname+A.location.search&&(be="REPLACE");let we=_&&"preventScrollReset"in _?_.preventScrollReset===!0:void 0,ge=(_&&_.flushSync)===!0,_e=aa({currentLocation:de,nextLocation:ce,historyAction:be});if(_e){Rr(_e,{state:"blocked",location:ce,proceed(){Rr(_e,{state:"proceeding",proceed:void 0,reset:void 0,location:ce}),Fn(S,_)},reset(){let rt=new Map(A.blockers);rt.set(_e,Bi),ot({blockers:rt})}});return}await Gn(be,ce,{submission:X,pendingError:ue,preventScrollReset:we,replace:_&&_.replace,enableViewTransition:_&&_.viewTransition,flushSync:ge})}function Kn(){Oe||(Oe=rw()),na(),ot({revalidation:"loading"});let S=Oe.promise;return A.navigation.state==="submitting"?S:A.navigation.state==="idle"?(Gn(A.historyAction,A.location,{startUninterruptedRevalidation:!0}),S):(Gn(B||A.historyAction,A.navigation.location,{overrideNavigation:A.navigation,enableViewTransition:ze===!0}),S)}async function Gn(S,_,I){Z&&Z.abort(),Z=null,B=S,pt=(I&&I.startUninterruptedRevalidation)===!0,ml(A.location,A.matches),pe=(I&&I.preventScrollReset)===!0,ze=(I&&I.enableViewTransition)===!0;let V=g||p,X=I&&I.overrideNavigation,ue=I!=null&&I.initialHydration&&A.matches&&A.matches.length>0&&!$?A.matches:es(V,_,m),de=(I&&I.flushSync)===!0;if(ue&&A.initialized&&!Re&&K0(A.location,_)&&!(I&&I.submission&&nn(I.submission.formMethod))){sn(_,{matches:ue},{flushSync:de});return}let ce=ws(ue,V,_.pathname);if(ce.active&&ce.matches&&(ue=ce.matches),!ue){let{error:Nt,notFoundMatches:st,route:at}=Xn(_.pathname);sn(_,{matches:st,loaderData:{},errors:{[at.id]:Nt}},{flushSync:de});return}Z=new AbortController;let me=Ma(n.history,_,Z.signal,I&&I.submission),be=n.getContext?await n.getContext():new Bp,we;if(I&&I.pendingError)we=[ts(ue).route.id,{type:"error",error:I.pendingError}];else if(I&&I.submission&&nn(I.submission.formMethod)){let Nt=await hl(me,_,I.submission,ue,be,ce.active,I&&I.initialHydration===!0,{replace:I.replace,flushSync:de});if(Nt.shortCircuited)return;if(Nt.pendingActionResult){let[st,at]=Nt.pendingActionResult;if(kn(at)&&el(at.error)&&at.error.status===404){Z=null,sn(_,{matches:Nt.matches,loaderData:{},errors:{[st]:at.error}});return}}ue=Nt.matches||ue,we=Nt.pendingActionResult,X=Hc(_,I.submission),de=!1,ce.active=!1,me=Ma(n.history,me.url,me.signal)}let{shortCircuited:ge,matches:_e,loaderData:rt,errors:kt}=await Ja(me,_,ue,be,ce.active,X,I&&I.submission,I&&I.fetcherSubmission,I&&I.replace,I&&I.initialHydration===!0,de,we);ge||(Z=null,sn(_,{matches:_e||ue,...am(we),loaderData:rt,errors:kt}))}async function hl(S,_,I,V,X,ue,de,ce={}){na();let me=Z0(_,I);if(ot({navigation:me},{flushSync:ce.flushSync===!0}),ue){let ge=await ks(V,_.pathname,S.signal);if(ge.type==="aborted")return{shortCircuited:!0};if(ge.type==="error"){if(ge.partialMatches.length===0){let{matches:rt,route:kt}=So(p);return{matches:rt,pendingActionResult:[kt.id,{type:"error",error:ge.error}]}}let _e=ts(ge.partialMatches).route.id;return{matches:ge.partialMatches,pendingActionResult:[_e,{type:"error",error:ge.error}]}}else if(ge.matches)V=ge.matches;else{let{notFoundMatches:_e,error:rt,route:kt}=Xn(_.pathname);return{matches:_e,pendingActionResult:[kt.id,{type:"error",error:rt}]}}}let be,we=Mo(V,_);if(!we.route.action&&!we.route.lazy)be={type:"error",error:Mn(405,{method:S.method,pathname:_.pathname,routeId:we.route.id})};else{let ge=Aa(d,h,S,V,we,de?[]:o,X),_e=await Er(S,ge,X,null);if(be=_e[we.route.id],!be){for(let rt of V)if(_e[rt.route.id]){be=_e[rt.route.id];break}}if(S.signal.aborted)return{shortCircuited:!0}}if(Us(be)){let ge;return ce&&ce.replace!=null?ge=ce.replace:ge=tm(be.response.headers.get("Location"),new URL(S.url),m)===A.location.pathname+A.location.search,await Yn(S,be,!0,{submission:I,replace:ge}),{shortCircuited:!0}}if(kn(be)){let ge=ts(V,we.route.id);return(ce&&ce.replace)!==!0&&(B="PUSH"),{matches:V,pendingActionResult:[ge.route.id,be,we.route.id]}}return{matches:V,pendingActionResult:[we.route.id,be]}}async function Ja(S,_,I,V,X,ue,de,ce,me,be,we,ge){let _e=ue||Hc(_,de),rt=de||ce||lm(_e),kt=!pt&&!be;if(X){if(kt){let lt=Za(ge);ot({navigation:_e,...lt!==void 0?{actionData:lt}:{}},{flushSync:we})}let Ue=await ks(I,_.pathname,S.signal);if(Ue.type==="aborted")return{shortCircuited:!0};if(Ue.type==="error"){if(Ue.partialMatches.length===0){let{matches:Lr,route:Tt}=So(p);return{matches:Lr,loaderData:{},errors:{[Tt.id]:Ue.error}}}let lt=ts(Ue.partialMatches).route.id;return{matches:Ue.partialMatches,loaderData:{},errors:{[lt]:Ue.error}}}else if(Ue.matches)I=Ue.matches;else{let{error:lt,notFoundMatches:Lr,route:Tt}=Xn(_.pathname);return{matches:Lr,loaderData:{},errors:{[Tt.id]:lt}}}}let Nt=g||p,{dsMatches:st,revalidatingFetchers:at}=Yp(S,V,d,h,n.history,A,I,rt,_,be?[]:o,be===!0,Re,Pe,ve,q,M,Nt,m,n.patchRoutesOnNavigation!=null,ge);if(ne=++G,!n.dataStrategy&&!st.some(Ue=>Ue.shouldLoad)&&!st.some(Ue=>Ue.route.middleware&&Ue.route.middleware.length>0)&&at.length===0){let Ue=pl();return sn(_,{matches:I,loaderData:{},errors:ge&&kn(ge[1])?{[ge[0]]:ge[1].error}:null,...am(ge),...Ue?{fetchers:new Map(A.fetchers)}:{}},{flushSync:we}),{shortCircuited:!0}}if(kt){let Ue={};if(!X){Ue.navigation=_e;let lt=Za(ge);lt!==void 0&&(Ue.actionData=lt)}at.length>0&&(Ue.fetchers=ei(at)),ot(Ue,{flushSync:we})}at.forEach(Ue=>{bn(Ue.key),Ue.controller&&ye.set(Ue.key,Ue.controller)});let ur=()=>at.forEach(Ue=>bn(Ue.key));Z&&Z.signal.addEventListener("abort",ur);let{loaderResults:js,fetcherResults:Ze}=await ni(st,at,S,V);if(S.signal.aborted)return{shortCircuited:!0};Z&&Z.signal.removeEventListener("abort",ur),at.forEach(Ue=>ye.delete(Ue.key));let jn=Co(js);if(jn)return await Yn(S,jn.result,!0,{replace:me}),{shortCircuited:!0};if(jn=Co(Ze),jn)return M.add(jn.key),await Yn(S,jn.result,!0,{replace:me}),{shortCircuited:!0};let{loaderData:Ss,errors:Tr}=rm(A,I,js,ge,at,Ze);be&&A.errors&&(Tr={...A.errors,...Tr});let Sn=pl(),la=ra(ne),Cs=Sn||la||at.length>0;return{matches:I,loaderData:Ss,errors:Tr,...Cs?{fetchers:new Map(A.fetchers)}:{}}}function Za(S){if(S&&!kn(S[1]))return{[S[0]]:S[1].data};if(A.actionData)return Object.keys(A.actionData).length===0?null:A.actionData}function ei(S){return S.forEach(_=>{let I=A.fetchers.get(_.key),V=Hi(void 0,I?I.data:void 0);A.fetchers.set(_.key,V)}),new Map(A.fetchers)}async function vs(S,_,I,V){bn(S);let X=(V&&V.flushSync)===!0,ue=g||p,de=ud(A.location,A.matches,m,I,_,V==null?void 0:V.relative),ce=es(ue,de,m),me=ws(ce,ue,de);if(me.active&&me.matches&&(ce=me.matches),!ce){an(S,_,Mn(404,{pathname:de}),{flushSync:X});return}let{path:be,submission:we,error:ge}=Gp(!0,de,V);if(ge){an(S,_,ge,{flushSync:X});return}let _e=n.getContext?await n.getContext():new Bp,rt=(V&&V.preventScrollReset)===!0;if(we&&nn(we.formMethod)){await Nr(S,_,be,ce,_e,me.active,X,rt,we);return}q.set(S,{routeId:_,path:be}),await ti(S,_,be,ce,_e,me.active,X,rt,we)}async function Nr(S,_,I,V,X,ue,de,ce,me){na(),q.delete(S);let be=A.fetchers.get(S);gn(S,ew(me,be),{flushSync:de});let we=new AbortController,ge=Ma(n.history,I,we.signal,me);if(ue){let mt=await ks(V,new URL(ge.url).pathname,ge.signal,S);if(mt.type==="aborted")return;if(mt.type==="error"){an(S,_,mt.error,{flushSync:de});return}else if(mt.matches)V=mt.matches;else{an(S,_,Mn(404,{pathname:I}),{flushSync:de});return}}let _e=Mo(V,I);if(!_e.route.action&&!_e.route.lazy){let mt=Mn(405,{method:me.formMethod,pathname:I,routeId:_});an(S,_,mt,{flushSync:de});return}ye.set(S,we);let rt=G,kt=Aa(d,h,ge,V,_e,o,X),Nt=await Er(ge,kt,X,S),st=Nt[_e.route.id];if(!st){for(let mt of kt)if(Nt[mt.route.id]){st=Nt[mt.route.id];break}}if(ge.signal.aborted){ye.get(S)===we&&ye.delete(S);return}if(ve.has(S)){if(Us(st)||kn(st)){gn(S,wr(void 0));return}}else{if(Us(st))if(ye.delete(S),ne>rt){gn(S,wr(void 0));return}else return M.add(S),gn(S,Hi(me)),Yn(ge,st,!1,{fetcherSubmission:me,preventScrollReset:ce});if(kn(st)){an(S,_,st.error);return}}let at=A.navigation.location||A.location,ur=Ma(n.history,at,we.signal),js=g||p,Ze=A.navigation.state!=="idle"?es(js,A.navigation.location,m):A.matches;Ie(Ze,"Didn't find any matches after fetcher action");let jn=++G;U.set(S,jn);let Ss=Hi(me,st.data);A.fetchers.set(S,Ss);let{dsMatches:Tr,revalidatingFetchers:Sn}=Yp(ur,X,d,h,n.history,A,Ze,me,at,o,!1,Re,Pe,ve,q,M,js,m,n.patchRoutesOnNavigation!=null,[_e.route.id,st]);Sn.filter(mt=>mt.key!==S).forEach(mt=>{let oa=mt.key,yl=A.fetchers.get(oa),ua=Hi(void 0,yl?yl.data:void 0);A.fetchers.set(oa,ua),bn(oa),mt.controller&&ye.set(oa,mt.controller)}),ot({fetchers:new Map(A.fetchers)});let la=()=>Sn.forEach(mt=>bn(mt.key));we.signal.addEventListener("abort",la);let{loaderResults:Cs,fetcherResults:Ue}=await ni(Tr,Sn,ur,X);if(we.signal.aborted)return;if(we.signal.removeEventListener("abort",la),U.delete(S),ye.delete(S),Sn.forEach(mt=>ye.delete(mt.key)),A.fetchers.has(S)){let mt=wr(st.data);A.fetchers.set(S,mt)}let lt=Co(Cs);if(lt)return Yn(ur,lt.result,!1,{preventScrollReset:ce});if(lt=Co(Ue),lt)return M.add(lt.key),Yn(ur,lt.result,!1,{preventScrollReset:ce});let{loaderData:Lr,errors:Tt}=rm(A,Ze,Cs,void 0,Sn,Ue);ra(jn),A.navigation.state==="loading"&&jn>ne?(Ie(B,"Expected pending action"),Z&&Z.abort(),sn(A.navigation.location,{matches:Ze,loaderData:Lr,errors:Tt,fetchers:new Map(A.fetchers)})):(ot({errors:Tt,loaderData:sm(A.loaderData,Lr,Ze,Tt),fetchers:new Map(A.fetchers)}),Re=!1)}async function ti(S,_,I,V,X,ue,de,ce,me){let be=A.fetchers.get(S);gn(S,Hi(me,be?be.data:void 0),{flushSync:de});let we=new AbortController,ge=Ma(n.history,I,we.signal);if(ue){let at=await ks(V,new URL(ge.url).pathname,ge.signal,S);if(at.type==="aborted")return;if(at.type==="error"){an(S,_,at.error,{flushSync:de});return}else if(at.matches)V=at.matches;else{an(S,_,Mn(404,{pathname:I}),{flushSync:de});return}}let _e=Mo(V,I);ye.set(S,we);let rt=G,kt=Aa(d,h,ge,V,_e,o,X),st=(await Er(ge,kt,X,S))[_e.route.id];if(ye.get(S)===we&&ye.delete(S),!ge.signal.aborted){if(ve.has(S)){gn(S,wr(void 0));return}if(Us(st))if(ne>rt){gn(S,wr(void 0));return}else{M.add(S),await Yn(ge,st,!1,{preventScrollReset:ce});return}if(kn(st)){an(S,_,st.error);return}gn(S,wr(st.data))}}async function Yn(S,_,I,{submission:V,fetcherSubmission:X,preventScrollReset:ue,replace:de}={}){_.response.headers.has("X-Remix-Revalidate")&&(Re=!0);let ce=_.response.headers.get("Location");Ie(ce,"Expected a Location header on the redirect Response"),ce=tm(ce,new URL(S.url),m);let me=Ji(A.location,ce,{_isRedirect:!0});if(a){let kt=!1;if(_.response.headers.has("X-Remix-Reload-Document"))kt=!0;else if(Ho(ce)){const Nt=sg(ce,!0);kt=Nt.origin!==r.location.origin||An(Nt.pathname,m)==null}if(kt){de?r.location.replace(ce):r.location.assign(ce);return}}Z=null;let be=de===!0||_.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:we,formAction:ge,formEncType:_e}=A.navigation;!V&&!X&&we&&ge&&_e&&(V=lm(A.navigation));let rt=V||X;if(M0.has(_.response.status)&&rt&&nn(rt.formMethod))await Gn(be,me,{submission:{...rt,formAction:ce},preventScrollReset:ue||pe,enableViewTransition:I?ze:void 0});else{let kt=Hc(me,V);await Gn(be,me,{overrideNavigation:kt,fetcherSubmission:X,preventScrollReset:ue||pe,enableViewTransition:I?ze:void 0})}}async function Er(S,_,I,V){let X,ue={};try{X=await q0(y,S,_,V,I,!1)}catch(de){return _.filter(ce=>ce.shouldLoad).forEach(ce=>{ue[ce.route.id]={type:"error",error:de}}),ue}if(S.signal.aborted)return ue;for(let[de,ce]of Object.entries(X))if(X0(ce)){let me=ce.result;ue[de]={type:"redirect",response:V0(me,S,de,_,m)}}else ue[de]=await Q0(ce);return ue}async function ni(S,_,I,V){let X=Er(I,S,V,null),ue=Promise.all(_.map(async me=>{if(me.matches&&me.match&&me.request&&me.controller){let we=(await Er(me.request,me.matches,V,me.key))[me.match.route.id];return{[me.key]:we}}else return Promise.resolve({[me.key]:{type:"error",error:Mn(404,{pathname:me.path})}})})),de=await X,ce=(await ue).reduce((me,be)=>Object.assign(me,be),{});return{loaderResults:de,fetcherResults:ce}}function na(){Re=!0,q.forEach((S,_)=>{ye.has(_)&&Pe.add(_),bn(_)})}function gn(S,_,I={}){A.fetchers.set(S,_),ot({fetchers:new Map(A.fetchers)},{flushSync:(I&&I.flushSync)===!0})}function an(S,_,I,V={}){let X=ts(A.matches,_);or(S),ot({errors:{[X.route.id]:I},fetchers:new Map(A.fetchers)},{flushSync:(V&&V.flushSync)===!0})}function ri(S){return je.set(S,(je.get(S)||0)+1),ve.has(S)&&ve.delete(S),A.fetchers.get(S)||_0}function xs(S,_){bn(S,_==null?void 0:_.reason),gn(S,wr(null))}function or(S){let _=A.fetchers.get(S);ye.has(S)&&!(_&&_.state==="loading"&&U.has(S))&&bn(S),q.delete(S),U.delete(S),M.delete(S),ve.delete(S),Pe.delete(S),A.fetchers.delete(S)}function tu(S){let _=(je.get(S)||0)-1;_<=0?(je.delete(S),ve.add(S)):je.set(S,_),ot({fetchers:new Map(A.fetchers)})}function bn(S,_){let I=ye.get(S);I&&(I.abort(_),ye.delete(S))}function si(S){for(let _ of S){let I=ri(_),V=wr(I.data);A.fetchers.set(_,V)}}function pl(){let S=[],_=!1;for(let I of M){let V=A.fetchers.get(I);Ie(V,`Expected fetcher: ${I}`),V.state==="loading"&&(M.delete(I),S.push(I),_=!0)}return si(S),_}function ra(S){let _=[];for(let[I,V]of U)if(V<S){let X=A.fetchers.get(I);Ie(X,`Expected fetcher: ${I}`),X.state==="loading"&&(bn(I),U.delete(I),_.push(I))}return si(_),_.length>0}function ai(S,_){let I=A.blockers.get(S)||Bi;return xe.get(S)!==_&&xe.set(S,_),I}function sa(S){A.blockers.delete(S),xe.delete(S)}function Rr(S,_){let I=A.blockers.get(S)||Bi;Ie(I.state==="unblocked"&&_.state==="blocked"||I.state==="blocked"&&_.state==="blocked"||I.state==="blocked"&&_.state==="proceeding"||I.state==="blocked"&&_.state==="unblocked"||I.state==="proceeding"&&_.state==="unblocked",`Invalid blocker state transition: ${I.state} -> ${_.state}`);let V=new Map(A.blockers);V.set(S,_),ot({blockers:V})}function aa({currentLocation:S,nextLocation:_,historyAction:I}){if(xe.size===0)return;xe.size>1&&xt(!1,"A router only supports one blocker at a time");let V=Array.from(xe.entries()),[X,ue]=V[V.length-1],de=A.blockers.get(X);if(!(de&&de.state==="proceeding")&&ue({currentLocation:S,nextLocation:_,historyAction:I}))return X}function Xn(S){let _=Mn(404,{pathname:S}),I=g||p,{matches:V,route:X}=So(I);return{notFoundMatches:V,route:X,error:_}}function Pr(S,_,I){if(L=S,N=_,R=I||null,!T&&A.navigation===Bc){T=!0;let V=li(A.location,A.matches);V!=null&&ot({restoreScrollPosition:V})}return()=>{L=null,N=null,R=null}}function ii(S,_){return R&&R(S,_.map(V=>r0(V,A.loaderData)))||S.key}function ml(S,_){if(L&&N){let I=ii(S,_);L[I]=N()}}function li(S,_){if(L){let I=ii(S,_),V=L[I];if(typeof V=="number")return V}return null}function ws(S,_,I){if(n.patchRoutesOnNavigation)if(S){if(Object.keys(S[0].params).length>0)return{active:!0,matches:Yi(_,I,m,!0)}}else return{active:!0,matches:Yi(_,I,m,!0)||[]};return{active:!1,matches:null}}async function ks(S,_,I,V){if(!n.patchRoutesOnNavigation)return{type:"success",matches:S};let X=S;for(;;){let ue=g==null,de=g||p,ce=h;try{await n.patchRoutesOnNavigation({signal:I,path:_,matches:X,fetcherKey:V,patch:(we,ge)=>{I.aborted||Xp(we,ge,de,ce,d,!1)}})}catch(we){return{type:"error",error:we,partialMatches:X}}finally{ue&&!I.aborted&&(p=[...p])}if(I.aborted)return{type:"aborted"};let me=es(de,_,m),be=null;if(me){if(Object.keys(me[0].params).length===0)return{type:"success",matches:me};if(be=Yi(de,_,m,!0),!(be&&X.length<be.length&&ia(X,be.slice(0,X.length))))return{type:"success",matches:me}}if(be||(be=Yi(de,_,m,!0)),!be||ia(X,be))return{type:"success",matches:null};X=be}}function ia(S,_){return S.length===_.length&&S.every((I,V)=>I.route.id===_[V].route.id)}function gl(S){h={},g=Zi(S,d,void 0,h)}function bs(S,_,I=!1){let V=g==null;Xp(S,_,g||p,h,d,I),V&&(p=[...p],ot({}))}return se={get basename(){return m},get future(){return w},get state(){return A},get routes(){return p},get window(){return r},initialize:He,subscribe:It,enableScrollRestoration:Pr,navigate:Fn,fetch:vs,revalidate:Kn,createHref:S=>n.history.createHref(S),encodeLocation:S=>n.history.encodeLocation(S),getFetcher:ri,resetFetcher:xs,deleteFetcher:tu,dispose:Me,getBlocker:ai,deleteBlocker:sa,patchRoutes:bs,_internalFetchControllers:ye,_internalSetRoutes:gl,_internalSetStateDoNotUseOrYouWillBreakYourApp(S){ot(S)}},n.unstable_instrumentations&&(se=j0(se,n.unstable_instrumentations.map(S=>S.router).filter(Boolean))),se}function O0(n){return n!=null&&("formData"in n&&n.formData!=null||"body"in n&&n.body!==void 0)}function ud(n,r,a,o,u,d){let h,p;if(u){h=[];for(let m of r)if(h.push(m),m.route.id===u){p=m;break}}else h=r,p=r[r.length-1];let g=Vo(o||".",Qo(h),An(n.pathname,a)||n.pathname,d==="path");if(o==null&&(g.search=n.search,g.hash=n.hash),(o==null||o===""||o===".")&&p){let m=_d(g.search);if(p.route.index&&!m)g.search=g.search?g.search.replace(/^\?/,"?index&"):"?index";else if(!p.route.index&&m){let y=new URLSearchParams(g.search),w=y.getAll("index");y.delete("index"),w.filter(b=>b).forEach(b=>y.append("index",b));let x=y.toString();g.search=x?`?${x}`:""}}return a!=="/"&&(g.pathname=g0({basename:a,pathname:g.pathname})),lr(g)}function Gp(n,r,a){if(!a||!O0(a))return{path:r};if(a.formMethod&&!J0(a.formMethod))return{path:r,error:Mn(405,{method:a.formMethod})};let o=()=>({path:r,error:Mn(400,{type:"invalid-body"})}),d=(a.formMethod||"get").toUpperCase(),h=yg(r);if(a.body!==void 0){if(a.formEncType==="text/plain"){if(!nn(d))return o();let w=typeof a.body=="string"?a.body:a.body instanceof FormData||a.body instanceof URLSearchParams?Array.from(a.body.entries()).reduce((x,[b,L])=>`${x}${b}=${L}
|
|
50
|
-
`,""):String(a.body);return{path:r,submission:{formMethod:d,formAction:h,formEncType:a.formEncType,formData:void 0,json:void 0,text:w}}}else if(a.formEncType==="application/json"){if(!nn(d))return o();try{let w=typeof a.body=="string"?JSON.parse(a.body):a.body;return{path:r,submission:{formMethod:d,formAction:h,formEncType:a.formEncType,formData:void 0,json:w,text:void 0}}}catch{return o()}}}Ie(typeof FormData=="function","FormData is not available in this environment");let p,g;if(a.formData)p=fd(a.formData),g=a.formData;else if(a.body instanceof FormData)p=fd(a.body),g=a.body;else if(a.body instanceof URLSearchParams)p=a.body,g=nm(p);else if(a.body==null)p=new URLSearchParams,g=new FormData;else try{p=new URLSearchParams(a.body),g=nm(p)}catch{return o()}let m={formMethod:d,formAction:h,formEncType:a&&a.formEncType||"application/x-www-form-urlencoded",formData:g,json:void 0,text:void 0};if(nn(m.formMethod))return{path:r,submission:m};let y=ms(r);return n&&y.search&&_d(y.search)&&p.append("index",""),y.search=`?${p}`,{path:lr(y),submission:m}}function Yp(n,r,a,o,u,d,h,p,g,m,y,w,x,b,L,R,N,T,z,$){var pt;let Q=$?kn($[1])?$[1].error:$[1].data:void 0,J=u.createURL(d.location),se=u.createURL(g),A;if(y&&d.errors){let Re=Object.keys(d.errors)[0];A=h.findIndex(Pe=>Pe.route.id===Re)}else if($&&kn($[1])){let Re=$[0];A=h.findIndex(Pe=>Pe.route.id===Re)-1}let B=$?$[1].statusCode:void 0,pe=B&&B>=400,Z={currentUrl:J,currentParams:((pt=d.matches[0])==null?void 0:pt.params)||{},nextUrl:se,nextParams:h[0].params,...p,actionResult:Q,actionStatus:B},ze=Ld(h.map(Re=>Re.route.path)),Xe=h.map((Re,Pe)=>{let{route:ye}=Re,G=null;if(A!=null&&Pe>A?G=!1:ye.lazy?G=!0:Md(ye)?y?G=cd(ye,d.loaderData,d.errors):F0(d.loaderData,d.matches[Pe],Re)&&(G=!0):G=!1,G!==null)return dd(a,o,n,ze,Re,m,r,G);let ne=pe?!1:w||J.pathname+J.search===se.pathname+se.search||J.search!==se.search||I0(d.matches[Pe],Re),U={...Z,defaultShouldRevalidate:ne},M=$o(Re,U);return dd(a,o,n,ze,Re,m,r,M,U)}),tt=[];return L.forEach((Re,Pe)=>{if(y||!h.some(ve=>ve.route.id===Re.routeId)||b.has(Pe))return;let ye=d.fetchers.get(Pe),G=ye&&ye.state!=="idle"&&ye.data===void 0,ne=es(N,Re.path,T);if(!ne){if(z&&G)return;tt.push({key:Pe,routeId:Re.routeId,path:Re.path,matches:null,match:null,request:null,controller:null});return}if(R.has(Pe))return;let U=Mo(ne,Re.path),M=new AbortController,q=Ma(u,Re.path,M.signal),je=null;if(x.has(Pe))x.delete(Pe),je=Aa(a,o,q,ne,U,m,r);else if(G)w&&(je=Aa(a,o,q,ne,U,m,r));else{let ve={...Z,defaultShouldRevalidate:pe?!1:w};$o(U,ve)&&(je=Aa(a,o,q,ne,U,m,r,ve))}je&&tt.push({key:Pe,routeId:Re.routeId,path:Re.path,matches:je,match:U,request:q,controller:M})}),{dsMatches:Xe,revalidatingFetchers:tt}}function Md(n){return n.loader!=null||n.middleware!=null&&n.middleware.length>0}function cd(n,r,a){if(n.lazy)return!0;if(!Md(n))return!1;let o=r!=null&&n.id in r,u=a!=null&&a[n.id]!==void 0;return!o&&u?!1:typeof n.loader=="function"&&n.loader.hydrate===!0?!0:!o&&!u}function F0(n,r,a){let o=!r||a.route.id!==r.route.id,u=!n.hasOwnProperty(a.route.id);return o||u}function I0(n,r){let a=n.route.path;return n.pathname!==r.pathname||a!=null&&a.endsWith("*")&&n.params["*"]!==r.params["*"]}function $o(n,r){if(n.route.shouldRevalidate){let a=n.route.shouldRevalidate(r);if(typeof a=="boolean")return a}return r.defaultShouldRevalidate}function Xp(n,r,a,o,u,d){let h;if(n){let m=o[n];Ie(m,`No route found to patch children into: routeId = ${n}`),m.children||(m.children=[]),h=m.children}else h=a;let p=[],g=[];if(r.forEach(m=>{let y=h.find(w=>fg(m,w));y?g.push({existingRoute:y,newRoute:m}):p.push(m)}),p.length>0){let m=Zi(p,u,[n||"_","patch",String((h==null?void 0:h.length)||"0")],o);h.push(...m)}if(d&&g.length>0)for(let m=0;m<g.length;m++){let{existingRoute:y,newRoute:w}=g[m],x=y,[b]=Zi([w],u,[],{},!0);Object.assign(x,{element:b.element?b.element:x.element,errorElement:b.errorElement?b.errorElement:x.errorElement,hydrateFallbackElement:b.hydrateFallbackElement?b.hydrateFallbackElement:x.hydrateFallbackElement})}}function fg(n,r){return"id"in n&&"id"in r&&n.id===r.id?!0:n.index===r.index&&n.path===r.path&&n.caseSensitive===r.caseSensitive?(!n.children||n.children.length===0)&&(!r.children||r.children.length===0)?!0:n.children.every((a,o)=>{var u;return(u=r.children)==null?void 0:u.some(d=>fg(a,d))}):!1}var Jp=new WeakMap,hg=({key:n,route:r,manifest:a,mapRouteProperties:o})=>{let u=a[r.id];if(Ie(u,"No route found in manifest"),!u.lazy||typeof u.lazy!="object")return;let d=u.lazy[n];if(!d)return;let h=Jp.get(u);h||(h={},Jp.set(u,h));let p=h[n];if(p)return p;let g=(async()=>{let m=Zx(n),w=u[n]!==void 0&&n!=="hasErrorBoundary";if(m)xt(!m,"Route property "+n+" is not a supported lazy route property. This property will be ignored."),h[n]=Promise.resolve();else if(w)xt(!1,`Route "${u.id}" has a static property "${n}" defined. The lazy property will be ignored.`);else{let x=await d();x!=null&&(Object.assign(u,{[n]:x}),Object.assign(u,o(u)))}typeof u.lazy=="object"&&(u.lazy[n]=void 0,Object.values(u.lazy).every(x=>x===void 0)&&(u.lazy=void 0))})();return h[n]=g,g},Zp=new WeakMap;function z0(n,r,a,o,u){let d=a[n.id];if(Ie(d,"No route found in manifest"),!n.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof n.lazy=="function"){let y=Zp.get(d);if(y)return{lazyRoutePromise:y,lazyHandlerPromise:y};let w=(async()=>{Ie(typeof n.lazy=="function","No lazy route function found");let x=await n.lazy(),b={};for(let L in x){let R=x[L];if(R===void 0)continue;let N=t0(L),z=d[L]!==void 0&&L!=="hasErrorBoundary";N?xt(!N,"Route property "+L+" is not a supported property to be returned from a lazy route function. This property will be ignored."):z?xt(!z,`Route "${d.id}" has a static property "${L}" defined but its lazy function is also returning a value for this property. The lazy route property "${L}" will be ignored.`):b[L]=R}Object.assign(d,b),Object.assign(d,{...o(d),lazy:void 0})})();return Zp.set(d,w),w.catch(()=>{}),{lazyRoutePromise:w,lazyHandlerPromise:w}}let h=Object.keys(n.lazy),p=[],g;for(let y of h){if(u&&u.includes(y))continue;let w=hg({key:y,route:n,manifest:a,mapRouteProperties:o});w&&(p.push(w),y===r&&(g=w))}let m=p.length>0?Promise.all(p).then(()=>{}):void 0;return m==null||m.catch(()=>{}),g==null||g.catch(()=>{}),{lazyRoutePromise:m,lazyHandlerPromise:g}}async function em(n){let r=n.matches.filter(u=>u.shouldLoad),a={};return(await Promise.all(r.map(u=>u.resolve()))).forEach((u,d)=>{a[r[d].route.id]=u}),a}async function U0(n){return n.matches.some(r=>r.route.middleware)?pg(n,()=>em(n)):em(n)}function pg(n,r){return $0(n,r,o=>o,G0,a);function a(o,u,d){if(d)return Promise.resolve(Object.assign(d.value,{[u]:{type:"error",result:o}}));{let{matches:h}=n,p=Math.min(Math.max(h.findIndex(m=>m.route.id===u),0),Math.max(h.findIndex(m=>m.unstable_shouldCallHandler()),0)),g=ts(h,h[p].route.id).route.id;return Promise.resolve({[g]:{type:"error",result:o}})}}}async function $0(n,r,a,o,u){let{matches:d,request:h,params:p,context:g,unstable_pattern:m}=n,y=d.flatMap(x=>x.route.middleware?x.route.middleware.map(b=>[x.route.id,b]):[]);return await mg({request:h,params:p,context:g,unstable_pattern:m},y,r,a,o,u)}async function mg(n,r,a,o,u,d,h=0){let{request:p}=n;if(p.signal.aborted)throw p.signal.reason??new Error(`Request aborted: ${p.method} ${p.url}`);let g=r[h];if(!g)return await a();let[m,y]=g,w,x=async()=>{if(w)throw new Error("You may only call `next()` once per middleware");try{return w={value:await mg(n,r,a,o,u,d,h+1)},w.value}catch(b){return w={value:await d(b,m,w)},w.value}};try{let b=await y(n,x),L=b!=null?o(b):void 0;return u(L)?L:w?L??w.value:(w={value:await x()},w.value)}catch(b){return await d(b,m,w)}}function gg(n,r,a,o,u){let d=hg({key:"middleware",route:o.route,manifest:r,mapRouteProperties:n}),h=z0(o.route,nn(a.method)?"action":"loader",r,n,u);return{middleware:d,route:h.lazyRoutePromise,handler:h.lazyHandlerPromise}}function dd(n,r,a,o,u,d,h,p,g=null){let m=!1,y=gg(n,r,a,u,d);return{...u,_lazyPromises:y,shouldLoad:p,unstable_shouldRevalidateArgs:g,unstable_shouldCallHandler(w){return m=!0,g?typeof w=="boolean"?$o(u,{...g,defaultShouldRevalidate:w}):$o(u,g):p},resolve(w){let{lazy:x,loader:b,middleware:L}=u.route,R=m||p||w&&!nn(a.method)&&(x||b),N=L&&L.length>0&&!b&&!x;return R&&(nn(a.method)||!N)?B0({request:a,unstable_pattern:o,match:u,lazyHandlerPromise:y==null?void 0:y.handler,lazyRoutePromise:y==null?void 0:y.route,handlerOverride:w,scopedContext:h}):Promise.resolve({type:"data",result:void 0})}}}function Aa(n,r,a,o,u,d,h,p=null){return o.map(g=>g.route.id!==u.route.id?{...g,shouldLoad:!1,unstable_shouldRevalidateArgs:p,unstable_shouldCallHandler:()=>!1,_lazyPromises:gg(n,r,a,g,d),resolve:()=>Promise.resolve({type:"data",result:void 0})}:dd(n,r,a,Ld(o.map(m=>m.route.path)),g,d,h,!0,p))}async function q0(n,r,a,o,u,d){a.some(m=>{var y;return(y=m._lazyPromises)==null?void 0:y.middleware})&&await Promise.all(a.map(m=>{var y;return(y=m._lazyPromises)==null?void 0:y.middleware}));let h={request:r,unstable_pattern:Ld(a.map(m=>m.route.path)),params:a[0].params,context:u,matches:a},g=await n({...h,fetcherKey:o,runClientMiddleware:m=>{let y=h;return pg(y,()=>m({...y,fetcherKey:o,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(a.flatMap(m=>{var y,w;return[(y=m._lazyPromises)==null?void 0:y.handler,(w=m._lazyPromises)==null?void 0:w.route]}))}catch{}return g}async function B0({request:n,unstable_pattern:r,match:a,lazyHandlerPromise:o,lazyRoutePromise:u,handlerOverride:d,scopedContext:h}){let p,g,m=nn(n.method),y=m?"action":"loader",w=x=>{let b,L=new Promise((T,z)=>b=z);g=()=>b(),n.signal.addEventListener("abort",g);let R=T=>typeof x!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${y}" [routeId: ${a.route.id}]`)):x({request:n,unstable_pattern:r,params:a.params,context:h},...T!==void 0?[T]:[]),N=(async()=>{try{return{type:"data",result:await(d?d(z=>R(z)):R())}}catch(T){return{type:"error",result:T}}})();return Promise.race([N,L])};try{let x=m?a.route.action:a.route.loader;if(o||u)if(x){let b,[L]=await Promise.all([w(x).catch(R=>{b=R}),o,u]);if(b!==void 0)throw b;p=L}else{await o;let b=m?a.route.action:a.route.loader;if(b)[p]=await Promise.all([w(b),u]);else if(y==="action"){let L=new URL(n.url),R=L.pathname+L.search;throw Mn(405,{method:n.method,pathname:R,routeId:a.route.id})}else return{type:"data",result:void 0}}else if(x)p=await w(x);else{let b=new URL(n.url),L=b.pathname+b.search;throw Mn(404,{pathname:L})}}catch(x){return{type:"error",result:x}}finally{g&&n.signal.removeEventListener("abort",g)}return p}async function H0(n){let r=n.headers.get("Content-Type");return r&&/\bapplication\/json\b/.test(r)?n.body==null?null:n.json():n.text()}async function Q0(n){var o,u,d,h,p,g;let{result:r,type:a}=n;if(vg(r)){let m;try{m=await H0(r)}catch(y){return{type:"error",error:y}}return a==="error"?{type:"error",error:new Uo(r.status,r.statusText,m),statusCode:r.status,headers:r.headers}:{type:"data",data:m,statusCode:r.status,headers:r.headers}}return a==="error"?im(r)?r.data instanceof Error?{type:"error",error:r.data,statusCode:(o=r.init)==null?void 0:o.status,headers:(u=r.init)!=null&&u.headers?new Headers(r.init.headers):void 0}:{type:"error",error:new Uo(((d=r.init)==null?void 0:d.status)||500,void 0,r.data),statusCode:el(r)?r.status:void 0,headers:(h=r.init)!=null&&h.headers?new Headers(r.init.headers):void 0}:{type:"error",error:r,statusCode:el(r)?r.status:void 0}:im(r)?{type:"data",data:r.data,statusCode:(p=r.init)==null?void 0:p.status,headers:(g=r.init)!=null&&g.headers?new Headers(r.init.headers):void 0}:{type:"data",data:r}}function V0(n,r,a,o,u){let d=n.headers.get("Location");if(Ie(d,"Redirects returned/thrown from loaders/actions must have a Location header"),!Ho(d)){let h=o.slice(0,o.findIndex(p=>p.route.id===a)+1);d=ud(new URL(r.url),h,u,d),n.headers.set("Location",d)}return n}function tm(n,r,a){if(Ho(n)){let o=n,u=o.startsWith("//")?new URL(r.protocol+o):new URL(o),d=An(u.pathname,a)!=null;if(u.origin===r.origin&&d)return u.pathname+u.search+u.hash}return n}function Ma(n,r,a,o){let u=n.createURL(yg(r)).toString(),d={signal:a};if(o&&nn(o.formMethod)){let{formMethod:h,formEncType:p}=o;d.method=h.toUpperCase(),p==="application/json"?(d.headers=new Headers({"Content-Type":p}),d.body=JSON.stringify(o.json)):p==="text/plain"?d.body=o.text:p==="application/x-www-form-urlencoded"&&o.formData?d.body=fd(o.formData):d.body=o.formData}return new Request(u,d)}function fd(n){let r=new URLSearchParams;for(let[a,o]of n.entries())r.append(a,typeof o=="string"?o:o.name);return r}function nm(n){let r=new FormData;for(let[a,o]of n.entries())r.append(a,o);return r}function W0(n,r,a,o=!1,u=!1){let d={},h=null,p,g=!1,m={},y=a&&kn(a[1])?a[1].error:void 0;return n.forEach(w=>{if(!(w.route.id in r))return;let x=w.route.id,b=r[x];if(Ie(!Us(b),"Cannot handle redirect results in processLoaderData"),kn(b)){let L=b.error;if(y!==void 0&&(L=y,y=void 0),h=h||{},u)h[x]=L;else{let R=ts(n,x);h[R.route.id]==null&&(h[R.route.id]=L)}o||(d[x]=dg),g||(g=!0,p=el(b.error)?b.error.status:500),b.headers&&(m[x]=b.headers)}else d[x]=b.data,b.statusCode&&b.statusCode!==200&&!g&&(p=b.statusCode),b.headers&&(m[x]=b.headers)}),y!==void 0&&a&&(h={[a[0]]:y},a[2]&&(d[a[2]]=void 0)),{loaderData:d,errors:h,statusCode:p||200,loaderHeaders:m}}function rm(n,r,a,o,u,d){let{loaderData:h,errors:p}=W0(r,a,o);return u.filter(g=>!g.matches||g.matches.some(m=>m.shouldLoad)).forEach(g=>{let{key:m,match:y,controller:w}=g;if(w&&w.signal.aborted)return;let x=d[m];if(Ie(x,"Did not find corresponding fetcher result"),kn(x)){let b=ts(n.matches,y==null?void 0:y.route.id);p&&p[b.route.id]||(p={...p,[b.route.id]:x.error}),n.fetchers.delete(m)}else if(Us(x))Ie(!1,"Unhandled fetcher revalidation redirect");else{let b=wr(x.data);n.fetchers.set(m,b)}}),{loaderData:h,errors:p}}function sm(n,r,a,o){let u=Object.entries(r).filter(([,d])=>d!==dg).reduce((d,[h,p])=>(d[h]=p,d),{});for(let d of a){let h=d.route.id;if(!r.hasOwnProperty(h)&&n.hasOwnProperty(h)&&d.route.loader&&(u[h]=n[h]),o&&o.hasOwnProperty(h))break}return u}function am(n){return n?kn(n[1])?{actionData:{}}:{actionData:{[n[0]]:n[1].data}}:{}}function ts(n,r){return(r?n.slice(0,n.findIndex(o=>o.route.id===r)+1):[...n]).reverse().find(o=>o.route.hasErrorBoundary===!0)||n[0]}function So(n){let r=n.length===1?n[0]:n.find(a=>a.index||!a.path||a.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:r}],route:r}}function Mn(n,{pathname:r,routeId:a,method:o,type:u,message:d}={}){let h="Unknown Server Error",p="Unknown @remix-run/router error";return n===400?(h="Bad Request",o&&r&&a?p=`You made a ${o} request to "${r}" but did not provide a \`loader\` for route "${a}", so there is no way to handle the request.`:u==="invalid-body"&&(p="Unable to encode submission body")):n===403?(h="Forbidden",p=`Route "${a}" does not match URL "${r}"`):n===404?(h="Not Found",p=`No route matches URL "${r}"`):n===405&&(h="Method Not Allowed",o&&r&&a?p=`You made a ${o.toUpperCase()} request to "${r}" but did not provide an \`action\` for route "${a}", so there is no way to handle the request.`:o&&(p=`Invalid request method "${o.toUpperCase()}"`)),new Uo(n||500,h,new Error(p),!0)}function Co(n){let r=Object.entries(n);for(let a=r.length-1;a>=0;a--){let[o,u]=r[a];if(Us(u))return{key:o,result:u}}}function yg(n){let r=typeof n=="string"?ms(n):n;return lr({...r,hash:""})}function K0(n,r){return n.pathname!==r.pathname||n.search!==r.search?!1:n.hash===""?r.hash!=="":n.hash===r.hash?!0:r.hash!==""}function G0(n){return n!=null&&typeof n=="object"&&Object.entries(n).every(([r,a])=>typeof r=="string"&&Y0(a))}function Y0(n){return n!=null&&typeof n=="object"&&"type"in n&&"result"in n&&(n.type==="data"||n.type==="error")}function X0(n){return vg(n.result)&&L0.has(n.result.status)}function kn(n){return n.type==="error"}function Us(n){return(n&&n.type)==="redirect"}function im(n){return typeof n=="object"&&n!=null&&"type"in n&&"data"in n&&"init"in n&&n.type==="DataWithResponseInit"}function vg(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.headers=="object"&&typeof n.body<"u"}function J0(n){return T0.has(n.toUpperCase())}function nn(n){return R0.has(n.toUpperCase())}function _d(n){return new URLSearchParams(n).getAll("index").some(r=>r==="")}function Mo(n,r){let a=typeof r=="string"?ms(r).search:r.search;if(n[n.length-1].route.index&&_d(a||""))return n[n.length-1];let o=lg(n);return o[o.length-1]}function lm(n){let{formMethod:r,formAction:a,formEncType:o,text:u,formData:d,json:h}=n;if(!(!r||!a||!o)){if(u!=null)return{formMethod:r,formAction:a,formEncType:o,formData:void 0,json:void 0,text:u};if(d!=null)return{formMethod:r,formAction:a,formEncType:o,formData:d,json:void 0,text:void 0};if(h!==void 0)return{formMethod:r,formAction:a,formEncType:o,formData:void 0,json:h,text:void 0}}}function Hc(n,r){return r?{state:"loading",location:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}:{state:"loading",location:n,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Z0(n,r){return{state:"submitting",location:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}}function Hi(n,r){return n?{state:"loading",formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text,data:r}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:r}}function ew(n,r){return{state:"submitting",formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text,data:r?r.data:void 0}}function wr(n){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:n}}function tw(n,r){try{let a=n.sessionStorage.getItem(cg);if(a){let o=JSON.parse(a);for(let[u,d]of Object.entries(o||{}))d&&Array.isArray(d)&&r.set(u,new Set(d||[]))}}catch{}}function nw(n,r){if(r.size>0){let a={};for(let[o,u]of r)a[o]=[...u];try{n.sessionStorage.setItem(cg,JSON.stringify(a))}catch(o){xt(!1,`Failed to save applied view transitions in sessionStorage (${o}).`)}}}function rw(){let n,r,a=new Promise((o,u)=>{n=async d=>{o(d);try{await a}catch{}},r=async d=>{u(d);try{await a}catch{}}});return{promise:a,resolve:n,reject:r}}var Zs=k.createContext(null);Zs.displayName="DataRouter";var ol=k.createContext(null);ol.displayName="DataRouterState";k.createContext(!1);var Ad=k.createContext({isTransitioning:!1});Ad.displayName="ViewTransition";var xg=k.createContext(new Map);xg.displayName="Fetchers";var sw=k.createContext(null);sw.displayName="Await";var Wn=k.createContext(null);Wn.displayName="Navigation";var Wo=k.createContext(null);Wo.displayName="Location";var Dn=k.createContext({outlet:null,matches:[],isDataRoute:!1});Dn.displayName="Route";var Dd=k.createContext(null);Dd.displayName="RouteError";function aw(n,{relative:r}={}){Ie(Ya(),"useHref() may be used only in the context of a <Router> component.");let{basename:a,navigator:o}=k.useContext(Wn),{hash:u,pathname:d,search:h}=ul(n,{relative:r}),p=d;return a!=="/"&&(p=d==="/"?a:ir([a,d])),o.createHref({pathname:p,search:h,hash:u})}function Ya(){return k.useContext(Wo)!=null}function On(){return Ie(Ya(),"useLocation() may be used only in the context of a <Router> component."),k.useContext(Wo).location}var wg="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function kg(n){k.useContext(Wn).static||k.useLayoutEffect(n)}function ea(){let{isDataRoute:n}=k.useContext(Dn);return n?kw():iw()}function iw(){Ie(Ya(),"useNavigate() may be used only in the context of a <Router> component.");let n=k.useContext(Zs),{basename:r,navigator:a}=k.useContext(Wn),{matches:o}=k.useContext(Dn),{pathname:u}=On(),d=JSON.stringify(Qo(o)),h=k.useRef(!1);return kg(()=>{h.current=!0}),k.useCallback((g,m={})=>{if(xt(h.current,wg),!h.current)return;if(typeof g=="number"){a.go(g);return}let y=Vo(g,JSON.parse(d),u,m.relative==="path");n==null&&r!=="/"&&(y.pathname=y.pathname==="/"?r:ir([r,y.pathname])),(m.replace?a.replace:a.push)(y,m.state,m)},[r,a,d,u,n])}var lw=k.createContext(null);function ow(n){let r=k.useContext(Dn).outlet;return k.useMemo(()=>r&&k.createElement(lw.Provider,{value:n},r),[r,n])}function uw(){let{matches:n}=k.useContext(Dn),r=n[n.length-1];return r?r.params:{}}function ul(n,{relative:r}={}){let{matches:a}=k.useContext(Dn),{pathname:o}=On(),u=JSON.stringify(Qo(a));return k.useMemo(()=>Vo(n,JSON.parse(u),o,r==="path"),[n,u,o,r])}function cw(n,r,a,o,u){Ie(Ya(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:d}=k.useContext(Wn),{matches:h}=k.useContext(Dn),p=h[h.length-1],g=p?p.params:{},m=p?p.pathname:"/",y=p?p.pathnameBase:"/",w=p&&p.route;{let z=w&&w.path||"";bg(m,!w||z.endsWith("*")||z.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${m}" (under <Route path="${z}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
51
|
-
|
|
52
|
-
Please change the parent <Route path="${z}"> to <Route path="${z==="/"?"*":`${z}/*`}">.`)}let x=On(),b;b=x;let L=b.pathname||"/",R=L;if(y!=="/"){let z=y.replace(/^\//,"").split("/");R="/"+L.replace(/^\//,"").split("/").slice(z.length).join("/")}let N=es(n,{pathname:R});return xt(w||N!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),xt(N==null||N[N.length-1].route.element!==void 0||N[N.length-1].route.Component!==void 0||N[N.length-1].route.lazy!==void 0,`Matched leaf route at location "${b.pathname}${b.search}${b.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),mw(N&&N.map(z=>Object.assign({},z,{params:Object.assign({},g,z.params),pathname:ir([y,d.encodeLocation?d.encodeLocation(z.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:z.pathname]),pathnameBase:z.pathnameBase==="/"?y:ir([y,d.encodeLocation?d.encodeLocation(z.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:z.pathnameBase])})),h,a,o,u)}function dw(){let n=ww(),r=el(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),a=n instanceof Error?n.stack:null,o="rgba(200,200,200, 0.5)",u={padding:"0.5rem",backgroundColor:o},d={padding:"2px 4px",backgroundColor:o},h=null;return console.error("Error handled by React Router default ErrorBoundary:",n),h=k.createElement(k.Fragment,null,k.createElement("p",null,"💿 Hey developer 👋"),k.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",k.createElement("code",{style:d},"ErrorBoundary")," or"," ",k.createElement("code",{style:d},"errorElement")," prop on your route.")),k.createElement(k.Fragment,null,k.createElement("h2",null,"Unexpected Application Error!"),k.createElement("h3",{style:{fontStyle:"italic"}},r),a?k.createElement("pre",{style:u},a):null,h)}var fw=k.createElement(dw,null),hw=class extends k.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,r){return r.location!==n.location||r.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:r.error,location:r.location,revalidation:n.revalidation||r.revalidation}}componentDidCatch(n,r){this.props.onError?this.props.onError(n,r):console.error("React Router caught the following error during render",n)}render(){return this.state.error!==void 0?k.createElement(Dn.Provider,{value:this.props.routeContext},k.createElement(Dd.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function pw({routeContext:n,match:r,children:a}){let o=k.useContext(Zs);return o&&o.static&&o.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=r.route.id),k.createElement(Dn.Provider,{value:n},a)}function mw(n,r=[],a=null,o=null,u=null){if(n==null){if(!a)return null;if(a.errors)n=a.matches;else if(r.length===0&&!a.initialized&&a.matches.length>0)n=a.matches;else return null}let d=n,h=a==null?void 0:a.errors;if(h!=null){let y=d.findIndex(w=>w.route.id&&(h==null?void 0:h[w.route.id])!==void 0);Ie(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(h).join(",")}`),d=d.slice(0,Math.min(d.length,y+1))}let p=!1,g=-1;if(a)for(let y=0;y<d.length;y++){let w=d[y];if((w.route.HydrateFallback||w.route.hydrateFallbackElement)&&(g=y),w.route.id){let{loaderData:x,errors:b}=a,L=w.route.loader&&!x.hasOwnProperty(w.route.id)&&(!b||b[w.route.id]===void 0);if(w.route.lazy||L){p=!0,g>=0?d=d.slice(0,g+1):d=[d[0]];break}}}let m=a&&o?(y,w)=>{var x,b;o(y,{location:a.location,params:((b=(x=a.matches)==null?void 0:x[0])==null?void 0:b.params)??{},errorInfo:w})}:void 0;return d.reduceRight((y,w,x)=>{let b,L=!1,R=null,N=null;a&&(b=h&&w.route.id?h[w.route.id]:void 0,R=w.route.errorElement||fw,p&&(g<0&&x===0?(bg("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),L=!0,N=null):g===x&&(L=!0,N=w.route.hydrateFallbackElement||null)));let T=r.concat(d.slice(0,x+1)),z=()=>{let $;return b?$=R:L?$=N:w.route.Component?$=k.createElement(w.route.Component,null):w.route.element?$=w.route.element:$=y,k.createElement(pw,{match:w,routeContext:{outlet:y,matches:T,isDataRoute:a!=null},children:$})};return a&&(w.route.ErrorBoundary||w.route.errorElement||x===0)?k.createElement(hw,{location:a.location,revalidation:a.revalidation,component:R,error:b,children:z(),routeContext:{outlet:null,matches:T,isDataRoute:!0},onError:m}):z()},null)}function Od(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function gw(n){let r=k.useContext(Zs);return Ie(r,Od(n)),r}function yw(n){let r=k.useContext(ol);return Ie(r,Od(n)),r}function vw(n){let r=k.useContext(Dn);return Ie(r,Od(n)),r}function Fd(n){let r=vw(n),a=r.matches[r.matches.length-1];return Ie(a.route.id,`${n} can only be used on routes that contain a unique "id"`),a.route.id}function xw(){return Fd("useRouteId")}function ww(){var o;let n=k.useContext(Dd),r=yw("useRouteError"),a=Fd("useRouteError");return n!==void 0?n:(o=r.errors)==null?void 0:o[a]}function kw(){let{router:n}=gw("useNavigate"),r=Fd("useNavigate"),a=k.useRef(!1);return kg(()=>{a.current=!0}),k.useCallback(async(u,d={})=>{xt(a.current,wg),a.current&&(typeof u=="number"?n.navigate(u):await n.navigate(u,{fromRouteId:r,...d}))},[n,r])}var om={};function bg(n,r,a){!r&&!om[n]&&(om[n]=!0,xt(!1,a))}var um={};function cm(n,r){!n&&!um[r]&&(um[r]=!0,console.warn(r))}function bw(n){let r={hasErrorBoundary:n.hasErrorBoundary||n.ErrorBoundary!=null||n.errorElement!=null};return n.Component&&(n.element&&xt(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(r,{element:k.createElement(n.Component),Component:void 0})),n.HydrateFallback&&(n.hydrateFallbackElement&&xt(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(r,{hydrateFallbackElement:k.createElement(n.HydrateFallback),HydrateFallback:void 0})),n.ErrorBoundary&&(n.errorElement&&xt(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(r,{errorElement:k.createElement(n.ErrorBoundary),ErrorBoundary:void 0})),r}var jw=["HydrateFallback","hydrateFallbackElement"],Sw=class{constructor(){this.status="pending",this.promise=new Promise((n,r)=>{this.resolve=a=>{this.status==="pending"&&(this.status="resolved",n(a))},this.reject=a=>{this.status==="pending"&&(this.status="rejected",r(a))}})}};function Cw({router:n,flushSync:r,unstable_onError:a}){let[o,u]=k.useState(n.state),[d,h]=k.useState(),[p,g]=k.useState({isTransitioning:!1}),[m,y]=k.useState(),[w,x]=k.useState(),[b,L]=k.useState(),R=k.useRef(new Map),N=k.useCallback(J=>{u(se=>(J.errors&&a&&Object.entries(J.errors).forEach(([A,B])=>{var pe,Z;((pe=se.errors)==null?void 0:pe[A])!==B&&a(B,{location:J.location,params:((Z=J.matches[0])==null?void 0:Z.params)??{}})}),J))},[a]),T=k.useCallback((J,{deletedFetchers:se,flushSync:A,viewTransitionOpts:B})=>{J.fetchers.forEach((Z,ze)=>{Z.data!==void 0&&R.current.set(ze,Z.data)}),se.forEach(Z=>R.current.delete(Z)),cm(A===!1||r!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let pe=n.window!=null&&n.window.document!=null&&typeof n.window.document.startViewTransition=="function";if(cm(B==null||pe,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!B||!pe){r&&A?r(()=>N(J)):k.startTransition(()=>N(J));return}if(r&&A){r(()=>{w&&(m&&m.resolve(),w.skipTransition()),g({isTransitioning:!0,flushSync:!0,currentLocation:B.currentLocation,nextLocation:B.nextLocation})});let Z=n.window.document.startViewTransition(()=>{r(()=>N(J))});Z.finished.finally(()=>{r(()=>{y(void 0),x(void 0),h(void 0),g({isTransitioning:!1})})}),r(()=>x(Z));return}w?(m&&m.resolve(),w.skipTransition(),L({state:J,currentLocation:B.currentLocation,nextLocation:B.nextLocation})):(h(J),g({isTransitioning:!0,flushSync:!1,currentLocation:B.currentLocation,nextLocation:B.nextLocation}))},[n.window,r,w,m,N]);k.useLayoutEffect(()=>n.subscribe(T),[n,T]),k.useEffect(()=>{p.isTransitioning&&!p.flushSync&&y(new Sw)},[p]),k.useEffect(()=>{if(m&&d&&n.window){let J=d,se=m.promise,A=n.window.document.startViewTransition(async()=>{k.startTransition(()=>N(J)),await se});A.finished.finally(()=>{y(void 0),x(void 0),h(void 0),g({isTransitioning:!1})}),x(A)}},[d,m,n.window,N]),k.useEffect(()=>{m&&d&&o.location.key===d.location.key&&m.resolve()},[m,w,o.location,d]),k.useEffect(()=>{!p.isTransitioning&&b&&(h(b.state),g({isTransitioning:!0,flushSync:!1,currentLocation:b.currentLocation,nextLocation:b.nextLocation}),L(void 0))},[p.isTransitioning,b]);let z=k.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:J=>n.navigate(J),push:(J,se,A)=>n.navigate(J,{state:se,preventScrollReset:A==null?void 0:A.preventScrollReset}),replace:(J,se,A)=>n.navigate(J,{replace:!0,state:se,preventScrollReset:A==null?void 0:A.preventScrollReset})}),[n]),$=n.basename||"/",Q=k.useMemo(()=>({router:n,navigator:z,static:!1,basename:$,unstable_onError:a}),[n,z,$,a]);return k.createElement(k.Fragment,null,k.createElement(Zs.Provider,{value:Q},k.createElement(ol.Provider,{value:o},k.createElement(xg.Provider,{value:R.current},k.createElement(Ad.Provider,{value:p},k.createElement(Rw,{basename:$,location:o.location,navigationType:o.historyAction,navigator:z},k.createElement(Nw,{routes:n.routes,future:n.future,state:o,unstable_onError:a})))))),null)}var Nw=k.memo(Ew);function Ew({routes:n,future:r,state:a,unstable_onError:o}){return cw(n,void 0,a,o,r)}function hd({to:n,replace:r,state:a,relative:o}){Ie(Ya(),"<Navigate> may be used only in the context of a <Router> component.");let{static:u}=k.useContext(Wn);xt(!u,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:d}=k.useContext(Dn),{pathname:h}=On(),p=ea(),g=Vo(n,Qo(d),h,o==="path"),m=JSON.stringify(g);return k.useEffect(()=>{p(JSON.parse(m),{replace:r,state:a,relative:o})},[p,m,o,r,a]),null}function Id(n){return ow(n.context)}function Rw({basename:n="/",children:r=null,location:a,navigationType:o="POP",navigator:u,static:d=!1}){Ie(!Ya(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let h=n.replace(/^\/*/,"/"),p=k.useMemo(()=>({basename:h,navigator:u,static:d,future:{}}),[h,u,d]);typeof a=="string"&&(a=ms(a));let{pathname:g="/",search:m="",hash:y="",state:w=null,key:x="default"}=a,b=k.useMemo(()=>{let L=An(g,h);return L==null?null:{location:{pathname:L,search:m,hash:y,state:w,key:x},navigationType:o}},[h,g,m,y,w,x,o]);return xt(b!=null,`<Router basename="${h}"> is not able to match the URL "${g}${m}${y}" because it does not start with the basename, so the <Router> won't render anything.`),b==null?null:k.createElement(Wn.Provider,{value:p},k.createElement(Wo.Provider,{children:r,value:b}))}var _o="get",Ao="application/x-www-form-urlencoded";function Ko(n){return n!=null&&typeof n.tagName=="string"}function Pw(n){return Ko(n)&&n.tagName.toLowerCase()==="button"}function Tw(n){return Ko(n)&&n.tagName.toLowerCase()==="form"}function Lw(n){return Ko(n)&&n.tagName.toLowerCase()==="input"}function Mw(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function _w(n,r){return n.button===0&&(!r||r==="_self")&&!Mw(n)}function pd(n=""){return new URLSearchParams(typeof n=="string"||Array.isArray(n)||n instanceof URLSearchParams?n:Object.keys(n).reduce((r,a)=>{let o=n[a];return r.concat(Array.isArray(o)?o.map(u=>[a,u]):[[a,o]])},[]))}function Aw(n,r){let a=pd(n);return r&&r.forEach((o,u)=>{a.has(u)||r.getAll(u).forEach(d=>{a.append(u,d)})}),a}var No=null;function Dw(){if(No===null)try{new FormData(document.createElement("form"),0),No=!1}catch{No=!0}return No}var Ow=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Qc(n){return n!=null&&!Ow.has(n)?(xt(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ao}"`),null):n}function Fw(n,r){let a,o,u,d,h;if(Tw(n)){let p=n.getAttribute("action");o=p?An(p,r):null,a=n.getAttribute("method")||_o,u=Qc(n.getAttribute("enctype"))||Ao,d=new FormData(n)}else if(Pw(n)||Lw(n)&&(n.type==="submit"||n.type==="image")){let p=n.form;if(p==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let g=n.getAttribute("formaction")||p.getAttribute("action");if(o=g?An(g,r):null,a=n.getAttribute("formmethod")||p.getAttribute("method")||_o,u=Qc(n.getAttribute("formenctype"))||Qc(p.getAttribute("enctype"))||Ao,d=new FormData(p,n),!Dw()){let{name:m,type:y,value:w}=n;if(y==="image"){let x=m?`${m}.`:"";d.append(`${x}x`,"0"),d.append(`${x}y`,"0")}else m&&d.append(m,w)}}else{if(Ko(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');a=_o,o=null,u=Ao,h=n}return d&&u==="text/plain"&&(h=d,d=void 0),{action:o,method:a.toLowerCase(),encType:u,formData:d,body:h}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function zd(n,r){if(n===!1||n===null||typeof n>"u")throw new Error(r)}function Iw(n,r,a){let o=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return o.pathname==="/"?o.pathname=`_root.${a}`:r&&An(o.pathname,r)==="/"?o.pathname=`${r.replace(/\/$/,"")}/_root.${a}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${a}`,o}async function zw(n,r){if(n.id in r)return r[n.id];try{let a=await import(n.module);return r[n.id]=a,a}catch(a){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(a),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Uw(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function $w(n,r,a){let o=await Promise.all(n.map(async u=>{let d=r.routes[u.route.id];if(d){let h=await zw(d,a);return h.links?h.links():[]}return[]}));return Qw(o.flat(1).filter(Uw).filter(u=>u.rel==="stylesheet"||u.rel==="preload").map(u=>u.rel==="stylesheet"?{...u,rel:"prefetch",as:"style"}:{...u,rel:"prefetch"}))}function dm(n,r,a,o,u,d){let h=(g,m)=>a[m]?g.route.id!==a[m].route.id:!0,p=(g,m)=>{var y;return a[m].pathname!==g.pathname||((y=a[m].route.path)==null?void 0:y.endsWith("*"))&&a[m].params["*"]!==g.params["*"]};return d==="assets"?r.filter((g,m)=>h(g,m)||p(g,m)):d==="data"?r.filter((g,m)=>{var w;let y=o.routes[g.route.id];if(!y||!y.hasLoader)return!1;if(h(g,m)||p(g,m))return!0;if(g.route.shouldRevalidate){let x=g.route.shouldRevalidate({currentUrl:new URL(u.pathname+u.search+u.hash,window.origin),currentParams:((w=a[0])==null?void 0:w.params)||{},nextUrl:new URL(n,window.origin),nextParams:g.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function qw(n,r,{includeHydrateFallback:a}={}){return Bw(n.map(o=>{let u=r.routes[o.route.id];if(!u)return[];let d=[u.module];return u.clientActionModule&&(d=d.concat(u.clientActionModule)),u.clientLoaderModule&&(d=d.concat(u.clientLoaderModule)),a&&u.hydrateFallbackModule&&(d=d.concat(u.hydrateFallbackModule)),u.imports&&(d=d.concat(u.imports)),d}).flat(1))}function Bw(n){return[...new Set(n)]}function Hw(n){let r={},a=Object.keys(n).sort();for(let o of a)r[o]=n[o];return r}function Qw(n,r){let a=new Set;return new Set(r),n.reduce((o,u)=>{let d=JSON.stringify(Hw(u));return a.has(d)||(a.add(d),o.push({key:d,link:u})),o},[])}function jg(){let n=k.useContext(Zs);return zd(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function Vw(){let n=k.useContext(ol);return zd(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var Ud=k.createContext(void 0);Ud.displayName="FrameworkContext";function Sg(){let n=k.useContext(Ud);return zd(n,"You must render this element inside a <HydratedRouter> element"),n}function Ww(n,r){let a=k.useContext(Ud),[o,u]=k.useState(!1),[d,h]=k.useState(!1),{onFocus:p,onBlur:g,onMouseEnter:m,onMouseLeave:y,onTouchStart:w}=r,x=k.useRef(null);k.useEffect(()=>{if(n==="render"&&h(!0),n==="viewport"){let R=T=>{T.forEach(z=>{h(z.isIntersecting)})},N=new IntersectionObserver(R,{threshold:.5});return x.current&&N.observe(x.current),()=>{N.disconnect()}}},[n]),k.useEffect(()=>{if(o){let R=setTimeout(()=>{h(!0)},100);return()=>{clearTimeout(R)}}},[o]);let b=()=>{u(!0)},L=()=>{u(!1),h(!1)};return a?n!=="intent"?[d,x,{}]:[d,x,{onFocus:Qi(p,b),onBlur:Qi(g,L),onMouseEnter:Qi(m,b),onMouseLeave:Qi(y,L),onTouchStart:Qi(w,b)}]:[!1,x,{}]}function Qi(n,r){return a=>{n&&n(a),a.defaultPrevented||r(a)}}function Kw({page:n,...r}){let{router:a}=jg(),o=k.useMemo(()=>es(a.routes,n,a.basename),[a.routes,n,a.basename]);return o?k.createElement(Yw,{page:n,matches:o,...r}):null}function Gw(n){let{manifest:r,routeModules:a}=Sg(),[o,u]=k.useState([]);return k.useEffect(()=>{let d=!1;return $w(n,r,a).then(h=>{d||u(h)}),()=>{d=!0}},[n,r,a]),o}function Yw({page:n,matches:r,...a}){let o=On(),{manifest:u,routeModules:d}=Sg(),{basename:h}=jg(),{loaderData:p,matches:g}=Vw(),m=k.useMemo(()=>dm(n,r,g,u,o,"data"),[n,r,g,u,o]),y=k.useMemo(()=>dm(n,r,g,u,o,"assets"),[n,r,g,u,o]),w=k.useMemo(()=>{if(n===o.pathname+o.search+o.hash)return[];let L=new Set,R=!1;if(r.forEach(T=>{var $;let z=u.routes[T.route.id];!z||!z.hasLoader||(!m.some(Q=>Q.route.id===T.route.id)&&T.route.id in p&&(($=d[T.route.id])!=null&&$.shouldRevalidate)||z.hasClientLoader?R=!0:L.add(T.route.id))}),L.size===0)return[];let N=Iw(n,h,"data");return R&&L.size>0&&N.searchParams.set("_routes",r.filter(T=>L.has(T.route.id)).map(T=>T.route.id).join(",")),[N.pathname+N.search]},[h,p,o,u,m,r,n,d]),x=k.useMemo(()=>qw(y,u),[y,u]),b=Gw(y);return k.createElement(k.Fragment,null,w.map(L=>k.createElement("link",{key:L,rel:"prefetch",as:"fetch",href:L,...a})),x.map(L=>k.createElement("link",{key:L,rel:"modulepreload",href:L,...a})),b.map(({key:L,link:R})=>k.createElement("link",{key:L,nonce:a.nonce,...R})))}function Xw(...n){return r=>{n.forEach(a=>{typeof a=="function"?a(r):a!=null&&(a.current=r)})}}var Cg=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Cg&&(window.__reactRouterVersion="7.9.6")}catch{}function Jw(n,r){return D0({basename:r==null?void 0:r.basename,getContext:r==null?void 0:r.getContext,future:r==null?void 0:r.future,history:Gx({window:r==null?void 0:r.window}),hydrationData:Zw(),routes:n,mapRouteProperties:bw,hydrationRouteProperties:jw,dataStrategy:r==null?void 0:r.dataStrategy,patchRoutesOnNavigation:r==null?void 0:r.patchRoutesOnNavigation,window:r==null?void 0:r.window,unstable_instrumentations:r==null?void 0:r.unstable_instrumentations}).initialize()}function Zw(){let n=window==null?void 0:window.__staticRouterHydrationData;return n&&n.errors&&(n={...n,errors:ek(n.errors)}),n}function ek(n){if(!n)return null;let r=Object.entries(n),a={};for(let[o,u]of r)if(u&&u.__type==="RouteErrorResponse")a[o]=new Uo(u.status,u.statusText,u.data,u.internal===!0);else if(u&&u.__type==="Error"){if(u.__subType){let d=window[u.__subType];if(typeof d=="function")try{let h=new d(u.message);h.stack="",a[o]=h}catch{}}if(a[o]==null){let d=new Error(u.message);d.stack="",a[o]=d}}else a[o]=u;return a}var Ng=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Qt=k.forwardRef(function({onClick:r,discover:a="render",prefetch:o="none",relative:u,reloadDocument:d,replace:h,state:p,target:g,to:m,preventScrollReset:y,viewTransition:w,...x},b){let{basename:L}=k.useContext(Wn),R=typeof m=="string"&&Ng.test(m),N,T=!1;if(typeof m=="string"&&R&&(N=m,Cg))try{let pe=new URL(window.location.href),Z=m.startsWith("//")?new URL(pe.protocol+m):new URL(m),ze=An(Z.pathname,L);Z.origin===pe.origin&&ze!=null?m=ze+Z.search+Z.hash:T=!0}catch{xt(!1,`<Link to="${m}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let z=aw(m,{relative:u}),[$,Q,J]=Ww(o,x),se=rk(m,{replace:h,state:p,target:g,preventScrollReset:y,relative:u,viewTransition:w});function A(pe){r&&r(pe),pe.defaultPrevented||se(pe)}let B=k.createElement("a",{...x,...J,href:N||z,onClick:T||d?r:A,ref:Xw(b,Q),target:g,"data-discover":!R&&a==="render"?"true":void 0});return $&&!R?k.createElement(k.Fragment,null,B,k.createElement(Kw,{page:z})):B});Qt.displayName="Link";var $d=k.forwardRef(function({"aria-current":r="page",caseSensitive:a=!1,className:o="",end:u=!1,style:d,to:h,viewTransition:p,children:g,...m},y){let w=ul(h,{relative:m.relative}),x=On(),b=k.useContext(ol),{navigator:L,basename:R}=k.useContext(Wn),N=b!=null&&ok(w)&&p===!0,T=L.encodeLocation?L.encodeLocation(w).pathname:w.pathname,z=x.pathname,$=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;a||(z=z.toLowerCase(),$=$?$.toLowerCase():null,T=T.toLowerCase()),$&&R&&($=An($,R)||$);const Q=T!=="/"&&T.endsWith("/")?T.length-1:T.length;let J=z===T||!u&&z.startsWith(T)&&z.charAt(Q)==="/",se=$!=null&&($===T||!u&&$.startsWith(T)&&$.charAt(T.length)==="/"),A={isActive:J,isPending:se,isTransitioning:N},B=J?r:void 0,pe;typeof o=="function"?pe=o(A):pe=[o,J?"active":null,se?"pending":null,N?"transitioning":null].filter(Boolean).join(" ");let Z=typeof d=="function"?d(A):d;return k.createElement(Qt,{...m,"aria-current":B,className:pe,ref:y,style:Z,to:h,viewTransition:p},typeof g=="function"?g(A):g)});$d.displayName="NavLink";var tk=k.forwardRef(({discover:n="render",fetcherKey:r,navigate:a,reloadDocument:o,replace:u,state:d,method:h=_o,action:p,onSubmit:g,relative:m,preventScrollReset:y,viewTransition:w,...x},b)=>{let L=ik(),R=lk(p,{relative:m}),N=h.toLowerCase()==="get"?"get":"post",T=typeof p=="string"&&Ng.test(p),z=$=>{if(g&&g($),$.defaultPrevented)return;$.preventDefault();let Q=$.nativeEvent.submitter,J=(Q==null?void 0:Q.getAttribute("formmethod"))||h;L(Q||$.currentTarget,{fetcherKey:r,method:J,navigate:a,replace:u,state:d,relative:m,preventScrollReset:y,viewTransition:w})};return k.createElement("form",{ref:b,method:N,action:R,onSubmit:o?g:z,...x,"data-discover":!T&&n==="render"?"true":void 0})});tk.displayName="Form";function nk(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Eg(n){let r=k.useContext(Zs);return Ie(r,nk(n)),r}function rk(n,{target:r,replace:a,state:o,preventScrollReset:u,relative:d,viewTransition:h}={}){let p=ea(),g=On(),m=ul(n,{relative:d});return k.useCallback(y=>{if(_w(y,r)){y.preventDefault();let w=a!==void 0?a:lr(g)===lr(m);p(n,{replace:w,state:o,preventScrollReset:u,relative:d,viewTransition:h})}},[g,p,m,a,o,r,n,u,d,h])}function qd(n){xt(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let r=k.useRef(pd(n)),a=k.useRef(!1),o=On(),u=k.useMemo(()=>Aw(o.search,a.current?null:r.current),[o.search]),d=ea(),h=k.useCallback((p,g)=>{const m=pd(typeof p=="function"?p(new URLSearchParams(u)):p);a.current=!0,d("?"+m,g)},[d,u]);return[u,h]}var sk=0,ak=()=>`__${String(++sk)}__`;function ik(){let{router:n}=Eg("useSubmit"),{basename:r}=k.useContext(Wn),a=xw();return k.useCallback(async(o,u={})=>{let{action:d,method:h,encType:p,formData:g,body:m}=Fw(o,r);if(u.navigate===!1){let y=u.fetcherKey||ak();await n.fetch(y,a,u.action||d,{preventScrollReset:u.preventScrollReset,formData:g,body:m,formMethod:u.method||h,formEncType:u.encType||p,flushSync:u.flushSync})}else await n.navigate(u.action||d,{preventScrollReset:u.preventScrollReset,formData:g,body:m,formMethod:u.method||h,formEncType:u.encType||p,replace:u.replace,state:u.state,fromRouteId:a,flushSync:u.flushSync,viewTransition:u.viewTransition})},[n,r,a])}function lk(n,{relative:r}={}){let{basename:a}=k.useContext(Wn),o=k.useContext(Dn);Ie(o,"useFormAction must be used inside a RouteContext");let[u]=o.matches.slice(-1),d={...ul(n||".",{relative:r})},h=On();if(n==null){d.search=h.search;let p=new URLSearchParams(d.search),g=p.getAll("index");if(g.some(y=>y==="")){p.delete("index"),g.filter(w=>w).forEach(w=>p.append("index",w));let y=p.toString();d.search=y?`?${y}`:""}}return(!n||n===".")&&u.route.index&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),a!=="/"&&(d.pathname=d.pathname==="/"?a:ir([a,d.pathname])),lr(d)}function ok(n,{relative:r}={}){let a=k.useContext(Ad);Ie(a!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=Eg("useViewTransitionState"),u=ul(n,{relative:r});if(!a.isTransitioning)return!1;let d=An(a.currentLocation.pathname,o)||a.currentLocation.pathname,h=An(a.nextLocation.pathname,o)||a.nextLocation.pathname;return zo(u.pathname,h)!=null||zo(u.pathname,d)!=null}var uk=Bm();function ck(n){return k.createElement(Cw,{flushSync:uk.flushSync,...n})}/**
|
|
53
|
-
* @license lucide-react v0.555.0 - ISC
|
|
54
|
-
*
|
|
55
|
-
* This source code is licensed under the ISC license.
|
|
56
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
57
|
-
*/const dk=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),fk=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,a,o)=>o?o.toUpperCase():a.toLowerCase()),fm=n=>{const r=fk(n);return r.charAt(0).toUpperCase()+r.slice(1)},Rg=(...n)=>n.filter((r,a,o)=>!!r&&r.trim()!==""&&o.indexOf(r)===a).join(" ").trim(),hk=n=>{for(const r in n)if(r.startsWith("aria-")||r==="role"||r==="title")return!0};/**
|
|
58
|
-
* @license lucide-react v0.555.0 - ISC
|
|
59
|
-
*
|
|
60
|
-
* This source code is licensed under the ISC license.
|
|
61
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
62
|
-
*/var pk={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"};/**
|
|
63
|
-
* @license lucide-react v0.555.0 - ISC
|
|
64
|
-
*
|
|
65
|
-
* This source code is licensed under the ISC license.
|
|
66
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
67
|
-
*/const mk=k.forwardRef(({color:n="currentColor",size:r=24,strokeWidth:a=2,absoluteStrokeWidth:o,className:u="",children:d,iconNode:h,...p},g)=>k.createElement("svg",{ref:g,...pk,width:r,height:r,stroke:n,strokeWidth:o?Number(a)*24/Number(r):a,className:Rg("lucide",u),...!d&&!hk(p)&&{"aria-hidden":"true"},...p},[...h.map(([m,y])=>k.createElement(m,y)),...Array.isArray(d)?d:[d]]));/**
|
|
68
|
-
* @license lucide-react v0.555.0 - ISC
|
|
69
|
-
*
|
|
70
|
-
* This source code is licensed under the ISC license.
|
|
71
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
72
|
-
*/const Le=(n,r)=>{const a=k.forwardRef(({className:o,...u},d)=>k.createElement(mk,{ref:d,iconNode:r,className:Rg(`lucide-${dk(fm(n))}`,`lucide-${n}`,o),...u}));return a.displayName=fm(n),a};/**
|
|
73
|
-
* @license lucide-react v0.555.0 - ISC
|
|
74
|
-
*
|
|
75
|
-
* This source code is licensed under the ISC license.
|
|
76
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
77
|
-
*/const gk=[["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"}]],Pg=Le("activity",gk);/**
|
|
78
|
-
* @license lucide-react v0.555.0 - ISC
|
|
79
|
-
*
|
|
80
|
-
* This source code is licensed under the ISC license.
|
|
81
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
82
|
-
*/const yk=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Tg=Le("arrow-left",yk);/**
|
|
83
|
-
* @license lucide-react v0.555.0 - ISC
|
|
84
|
-
*
|
|
85
|
-
* This source code is licensed under the ISC license.
|
|
86
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
87
|
-
*/const vk=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Lg=Le("arrow-right",vk);/**
|
|
88
|
-
* @license lucide-react v0.555.0 - ISC
|
|
89
|
-
*
|
|
90
|
-
* This source code is licensed under the ISC license.
|
|
91
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
92
|
-
*/const xk=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],wk=Le("arrow-up",xk);/**
|
|
93
|
-
* @license lucide-react v0.555.0 - ISC
|
|
94
|
-
*
|
|
95
|
-
* This source code is licensed under the ISC license.
|
|
96
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
97
|
-
*/const kk=[["path",{d:"M16 14v2.2l1.6 1",key:"fo4ql5"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]],bk=Le("calendar-clock",kk);/**
|
|
98
|
-
* @license lucide-react v0.555.0 - ISC
|
|
99
|
-
*
|
|
100
|
-
* This source code is licensed under the ISC license.
|
|
101
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
102
|
-
*/const jk=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Mg=Le("check",jk);/**
|
|
103
|
-
* @license lucide-react v0.555.0 - ISC
|
|
104
|
-
*
|
|
105
|
-
* This source code is licensed under the ISC license.
|
|
106
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
107
|
-
*/const Sk=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],_g=Le("chevron-right",Sk);/**
|
|
108
|
-
* @license lucide-react v0.555.0 - ISC
|
|
109
|
-
*
|
|
110
|
-
* This source code is licensed under the ISC license.
|
|
111
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
112
|
-
*/const Ck=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Nk=Le("chevron-left",Ck);/**
|
|
113
|
-
* @license lucide-react v0.555.0 - ISC
|
|
114
|
-
*
|
|
115
|
-
* This source code is licensed under the ISC license.
|
|
116
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
117
|
-
*/const Ek=[["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"}]],Rk=Le("circle-alert",Ek);/**
|
|
118
|
-
* @license lucide-react v0.555.0 - ISC
|
|
119
|
-
*
|
|
120
|
-
* This source code is licensed under the ISC license.
|
|
121
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
122
|
-
*/const Pk=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Tk=Le("circle-check",Pk);/**
|
|
123
|
-
* @license lucide-react v0.555.0 - ISC
|
|
124
|
-
*
|
|
125
|
-
* This source code is licensed under the ISC license.
|
|
126
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
127
|
-
*/const Lk=[["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"}]],md=Le("circle-x",Lk);/**
|
|
128
|
-
* @license lucide-react v0.555.0 - ISC
|
|
129
|
-
*
|
|
130
|
-
* This source code is licensed under the ISC license.
|
|
131
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
132
|
-
*/const Mk=[["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"}]],_k=Le("copy",Mk);/**
|
|
133
|
-
* @license lucide-react v0.555.0 - ISC
|
|
134
|
-
*
|
|
135
|
-
* This source code is licensed under the ISC license.
|
|
136
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
137
|
-
*/const Ak=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Dk=Le("external-link",Ak);/**
|
|
138
|
-
* @license lucide-react v0.555.0 - ISC
|
|
139
|
-
*
|
|
140
|
-
* This source code is licensed under the ISC license.
|
|
141
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
142
|
-
*/const Ok=[["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"}]],Fk=Le("eye",Ok);/**
|
|
143
|
-
* @license lucide-react v0.555.0 - ISC
|
|
144
|
-
*
|
|
145
|
-
* This source code is licensed under the ISC license.
|
|
146
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
147
|
-
*/const Ik=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],zk=Le("file-text",Ik);/**
|
|
148
|
-
* @license lucide-react v0.555.0 - ISC
|
|
149
|
-
*
|
|
150
|
-
* This source code is licensed under the ISC license.
|
|
151
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
152
|
-
*/const Uk=[["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"}]],$k=Le("folder-open",Uk);/**
|
|
153
|
-
* @license lucide-react v0.555.0 - ISC
|
|
154
|
-
*
|
|
155
|
-
* This source code is licensed under the ISC license.
|
|
156
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
157
|
-
*/const qk=[["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"}]],Bk=Le("folder",qk);/**
|
|
158
|
-
* @license lucide-react v0.555.0 - ISC
|
|
159
|
-
*
|
|
160
|
-
* This source code is licensed under the ISC license.
|
|
161
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
162
|
-
*/const Hk=[["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"}]],Qk=Le("git-branch",Hk);/**
|
|
163
|
-
* @license lucide-react v0.555.0 - ISC
|
|
164
|
-
*
|
|
165
|
-
* This source code is licensed under the ISC license.
|
|
166
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
167
|
-
*/const Vk=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]],Wk=Le("git-pull-request",Vk);/**
|
|
168
|
-
* @license lucide-react v0.555.0 - ISC
|
|
169
|
-
*
|
|
170
|
-
* This source code is licensed under the ISC license.
|
|
171
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
172
|
-
*/const Kk=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],Ag=Le("globe",Kk);/**
|
|
173
|
-
* @license lucide-react v0.555.0 - ISC
|
|
174
|
-
*
|
|
175
|
-
* This source code is licensed under the ISC license.
|
|
176
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
177
|
-
*/const Gk=[["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"}]],Yk=Le("hash",Gk);/**
|
|
178
|
-
* @license lucide-react v0.555.0 - ISC
|
|
179
|
-
*
|
|
180
|
-
* This source code is licensed under the ISC license.
|
|
181
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
182
|
-
*/const Xk=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],Jk=Le("image",Xk);/**
|
|
183
|
-
* @license lucide-react v0.555.0 - ISC
|
|
184
|
-
*
|
|
185
|
-
* This source code is licensed under the ISC license.
|
|
186
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
187
|
-
*/const Zk=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],e1=Le("info",Zk);/**
|
|
188
|
-
* @license lucide-react v0.555.0 - ISC
|
|
189
|
-
*
|
|
190
|
-
* This source code is licensed under the ISC license.
|
|
191
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
192
|
-
*/const t1=[["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"}]],n1=Le("layout-dashboard",t1);/**
|
|
193
|
-
* @license lucide-react v0.555.0 - ISC
|
|
194
|
-
*
|
|
195
|
-
* This source code is licensed under the ISC license.
|
|
196
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
197
|
-
*/const r1=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]],s1=Le("list-checks",r1);/**
|
|
198
|
-
* @license lucide-react v0.555.0 - ISC
|
|
199
|
-
*
|
|
200
|
-
* This source code is licensed under the ISC license.
|
|
201
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
202
|
-
*/const a1=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],i1=Le("loader-circle",a1);/**
|
|
203
|
-
* @license lucide-react v0.555.0 - ISC
|
|
204
|
-
*
|
|
205
|
-
* This source code is licensed under the ISC license.
|
|
206
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
207
|
-
*/const l1=[["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"}]],o1=Le("lock",l1);/**
|
|
208
|
-
* @license lucide-react v0.555.0 - ISC
|
|
209
|
-
*
|
|
210
|
-
* This source code is licensed under the ISC license.
|
|
211
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
212
|
-
*/const u1=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],Dg=Le("log-out",u1);/**
|
|
213
|
-
* @license lucide-react v0.555.0 - ISC
|
|
214
|
-
*
|
|
215
|
-
* This source code is licensed under the ISC license.
|
|
216
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
217
|
-
*/const c1=[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]],Og=Le("octagon-alert",c1);/**
|
|
218
|
-
* @license lucide-react v0.555.0 - ISC
|
|
219
|
-
*
|
|
220
|
-
* This source code is licensed under the ISC license.
|
|
221
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
222
|
-
*/const d1=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],f1=Le("pencil",d1);/**
|
|
223
|
-
* @license lucide-react v0.555.0 - ISC
|
|
224
|
-
*
|
|
225
|
-
* This source code is licensed under the ISC license.
|
|
226
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
227
|
-
*/const h1=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],p1=Le("play",h1);/**
|
|
228
|
-
* @license lucide-react v0.555.0 - ISC
|
|
229
|
-
*
|
|
230
|
-
* This source code is licensed under the ISC license.
|
|
231
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
232
|
-
*/const m1=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],gd=Le("plus",m1);/**
|
|
233
|
-
* @license lucide-react v0.555.0 - ISC
|
|
234
|
-
*
|
|
235
|
-
* This source code is licensed under the ISC license.
|
|
236
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
237
|
-
*/const g1=[["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"}]],y1=Le("refresh-cw",g1);/**
|
|
238
|
-
* @license lucide-react v0.555.0 - ISC
|
|
239
|
-
*
|
|
240
|
-
* This source code is licensed under the ISC license.
|
|
241
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
242
|
-
*/const v1=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],x1=Le("rotate-ccw",v1);/**
|
|
243
|
-
* @license lucide-react v0.555.0 - ISC
|
|
244
|
-
*
|
|
245
|
-
* This source code is licensed under the ISC license.
|
|
246
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
247
|
-
*/const w1=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],k1=Le("rotate-cw",w1);/**
|
|
248
|
-
* @license lucide-react v0.555.0 - ISC
|
|
249
|
-
*
|
|
250
|
-
* This source code is licensed under the ISC license.
|
|
251
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
252
|
-
*/const b1=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],j1=Le("save",b1);/**
|
|
253
|
-
* @license lucide-react v0.555.0 - ISC
|
|
254
|
-
*
|
|
255
|
-
* This source code is licensed under the ISC license.
|
|
256
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
257
|
-
*/const S1=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],C1=Le("scroll-text",S1);/**
|
|
258
|
-
* @license lucide-react v0.555.0 - ISC
|
|
259
|
-
*
|
|
260
|
-
* This source code is licensed under the ISC license.
|
|
261
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
262
|
-
*/const N1=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],E1=Le("search",N1);/**
|
|
263
|
-
* @license lucide-react v0.555.0 - ISC
|
|
264
|
-
*
|
|
265
|
-
* This source code is licensed under the ISC license.
|
|
266
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
267
|
-
*/const R1=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],P1=Le("settings",R1);/**
|
|
268
|
-
* @license lucide-react v0.555.0 - ISC
|
|
269
|
-
*
|
|
270
|
-
* This source code is licensed under the ISC license.
|
|
271
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
272
|
-
*/const T1=[["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:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],L1=Le("shield-alert",T1);/**
|
|
273
|
-
* @license lucide-react v0.555.0 - ISC
|
|
274
|
-
*
|
|
275
|
-
* This source code is licensed under the ISC license.
|
|
276
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
277
|
-
*/const M1=[["path",{d:"M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z",key:"qn84l0"}],["path",{d:"M13 5v2",key:"dyzc3o"}],["path",{d:"M13 17v2",key:"1ont0d"}],["path",{d:"M13 11v2",key:"1wjjxi"}]],_1=Le("ticket",M1);/**
|
|
278
|
-
* @license lucide-react v0.555.0 - ISC
|
|
279
|
-
*
|
|
280
|
-
* This source code is licensed under the ISC license.
|
|
281
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
282
|
-
*/const A1=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],qo=Le("trash-2",A1);/**
|
|
283
|
-
* @license lucide-react v0.555.0 - ISC
|
|
284
|
-
*
|
|
285
|
-
* This source code is licensed under the ISC license.
|
|
286
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
287
|
-
*/const D1=[["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"}]],O1=Le("triangle-alert",D1);/**
|
|
288
|
-
* @license lucide-react v0.555.0 - ISC
|
|
289
|
-
*
|
|
290
|
-
* This source code is licensed under the ISC license.
|
|
291
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
292
|
-
*/const F1=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],I1=Le("user",F1);/**
|
|
293
|
-
* @license lucide-react v0.555.0 - ISC
|
|
294
|
-
*
|
|
295
|
-
* This source code is licensed under the ISC license.
|
|
296
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
297
|
-
*/const z1=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],U1=Le("users",z1);/**
|
|
298
|
-
* @license lucide-react v0.555.0 - ISC
|
|
299
|
-
*
|
|
300
|
-
* This source code is licensed under the ISC license.
|
|
301
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
302
|
-
*/const $1=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],q1=Le("wrench",$1);/**
|
|
303
|
-
* @license lucide-react v0.555.0 - ISC
|
|
304
|
-
*
|
|
305
|
-
* This source code is licensed under the ISC license.
|
|
306
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
307
|
-
*/const B1=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Bd=Le("x",B1);function Fg(n){var r,a,o="";if(typeof n=="string"||typeof n=="number")o+=n;else if(typeof n=="object")if(Array.isArray(n)){var u=n.length;for(r=0;r<u;r++)n[r]&&(a=Fg(n[r]))&&(o&&(o+=" "),o+=a)}else for(a in n)n[a]&&(o&&(o+=" "),o+=a);return o}function Ig(){for(var n,r,a=0,o="",u=arguments.length;a<u;a++)(n=arguments[a])&&(r=Fg(n))&&(o&&(o+=" "),o+=r);return o}const hm=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,pm=Ig,zg=(n,r)=>a=>{var o;if((r==null?void 0:r.variants)==null)return pm(n,a==null?void 0:a.class,a==null?void 0:a.className);const{variants:u,defaultVariants:d}=r,h=Object.keys(u).map(m=>{const y=a==null?void 0:a[m],w=d==null?void 0:d[m];if(y===null)return null;const x=hm(y)||hm(w);return u[m][x]}),p=a&&Object.entries(a).reduce((m,y)=>{let[w,x]=y;return x===void 0||(m[w]=x),m},{}),g=r==null||(o=r.compoundVariants)===null||o===void 0?void 0:o.reduce((m,y)=>{let{class:w,className:x,...b}=y;return Object.entries(b).every(L=>{let[R,N]=L;return Array.isArray(N)?N.includes({...d,...p}[R]):{...d,...p}[R]===N})?[...m,w,x]:m},[]);return pm(n,h,g,a==null?void 0:a.class,a==null?void 0:a.className)},H1=(n,r)=>{const a=new Array(n.length+r.length);for(let o=0;o<n.length;o++)a[o]=n[o];for(let o=0;o<r.length;o++)a[n.length+o]=r[o];return a},Q1=(n,r)=>({classGroupId:n,validator:r}),Ug=(n=new Map,r=null,a)=>({nextPart:n,validators:r,classGroupId:a}),Bo="-",mm=[],V1="arbitrary..",W1=n=>{const r=G1(n),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=n;return{getClassGroupId:h=>{if(h.startsWith("[")&&h.endsWith("]"))return K1(h);const p=h.split(Bo),g=p[0]===""&&p.length>1?1:0;return $g(p,g,r)},getConflictingClassGroupIds:(h,p)=>{if(p){const g=o[h],m=a[h];return g?m?H1(m,g):g:m||mm}return a[h]||mm}}},$g=(n,r,a)=>{if(n.length-r===0)return a.classGroupId;const u=n[r],d=a.nextPart.get(u);if(d){const m=$g(n,r+1,d);if(m)return m}const h=a.validators;if(h===null)return;const p=r===0?n.join(Bo):n.slice(r).join(Bo),g=h.length;for(let m=0;m<g;m++){const y=h[m];if(y.validator(p))return y.classGroupId}},K1=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const r=n.slice(1,-1),a=r.indexOf(":"),o=r.slice(0,a);return o?V1+o:void 0})(),G1=n=>{const{theme:r,classGroups:a}=n;return Y1(a,r)},Y1=(n,r)=>{const a=Ug();for(const o in n){const u=n[o];Hd(u,a,o,r)}return a},Hd=(n,r,a,o)=>{const u=n.length;for(let d=0;d<u;d++){const h=n[d];X1(h,r,a,o)}},X1=(n,r,a,o)=>{if(typeof n=="string"){J1(n,r,a);return}if(typeof n=="function"){Z1(n,r,a,o);return}eb(n,r,a,o)},J1=(n,r,a)=>{const o=n===""?r:qg(r,n);o.classGroupId=a},Z1=(n,r,a,o)=>{if(tb(n)){Hd(n(o),r,a,o);return}r.validators===null&&(r.validators=[]),r.validators.push(Q1(a,n))},eb=(n,r,a,o)=>{const u=Object.entries(n),d=u.length;for(let h=0;h<d;h++){const[p,g]=u[h];Hd(g,qg(r,p),a,o)}},qg=(n,r)=>{let a=n;const o=r.split(Bo),u=o.length;for(let d=0;d<u;d++){const h=o[d];let p=a.nextPart.get(h);p||(p=Ug(),a.nextPart.set(h,p)),a=p}return a},tb=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,nb=n=>{if(n<1)return{get:()=>{},set:()=>{}};let r=0,a=Object.create(null),o=Object.create(null);const u=(d,h)=>{a[d]=h,r++,r>n&&(r=0,o=a,a=Object.create(null))};return{get(d){let h=a[d];if(h!==void 0)return h;if((h=o[d])!==void 0)return u(d,h),h},set(d,h){d in a?a[d]=h:u(d,h)}}},yd="!",gm=":",rb=[],ym=(n,r,a,o,u)=>({modifiers:n,hasImportantModifier:r,baseClassName:a,maybePostfixModifierPosition:o,isExternal:u}),sb=n=>{const{prefix:r,experimentalParseClassName:a}=n;let o=u=>{const d=[];let h=0,p=0,g=0,m;const y=u.length;for(let R=0;R<y;R++){const N=u[R];if(h===0&&p===0){if(N===gm){d.push(u.slice(g,R)),g=R+1;continue}if(N==="/"){m=R;continue}}N==="["?h++:N==="]"?h--:N==="("?p++:N===")"&&p--}const w=d.length===0?u:u.slice(g);let x=w,b=!1;w.endsWith(yd)?(x=w.slice(0,-1),b=!0):w.startsWith(yd)&&(x=w.slice(1),b=!0);const L=m&&m>g?m-g:void 0;return ym(d,b,x,L)};if(r){const u=r+gm,d=o;o=h=>h.startsWith(u)?d(h.slice(u.length)):ym(rb,!1,h,void 0,!0)}if(a){const u=o;o=d=>a({className:d,parseClassName:u})}return o},ab=n=>{const r=new Map;return n.orderSensitiveModifiers.forEach((a,o)=>{r.set(a,1e6+o)}),a=>{const o=[];let u=[];for(let d=0;d<a.length;d++){const h=a[d],p=h[0]==="[",g=r.has(h);p||g?(u.length>0&&(u.sort(),o.push(...u),u=[]),o.push(h)):u.push(h)}return u.length>0&&(u.sort(),o.push(...u)),o}},ib=n=>({cache:nb(n.cacheSize),parseClassName:sb(n),sortModifiers:ab(n),...W1(n)}),lb=/\s+/,ob=(n,r)=>{const{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:u,sortModifiers:d}=r,h=[],p=n.trim().split(lb);let g="";for(let m=p.length-1;m>=0;m-=1){const y=p[m],{isExternal:w,modifiers:x,hasImportantModifier:b,baseClassName:L,maybePostfixModifierPosition:R}=a(y);if(w){g=y+(g.length>0?" "+g:g);continue}let N=!!R,T=o(N?L.substring(0,R):L);if(!T){if(!N){g=y+(g.length>0?" "+g:g);continue}if(T=o(L),!T){g=y+(g.length>0?" "+g:g);continue}N=!1}const z=x.length===0?"":x.length===1?x[0]:d(x).join(":"),$=b?z+yd:z,Q=$+T;if(h.indexOf(Q)>-1)continue;h.push(Q);const J=u(T,N);for(let se=0;se<J.length;++se){const A=J[se];h.push($+A)}g=y+(g.length>0?" "+g:g)}return g},ub=(...n)=>{let r=0,a,o,u="";for(;r<n.length;)(a=n[r++])&&(o=Bg(a))&&(u&&(u+=" "),u+=o);return u},Bg=n=>{if(typeof n=="string")return n;let r,a="";for(let o=0;o<n.length;o++)n[o]&&(r=Bg(n[o]))&&(a&&(a+=" "),a+=r);return a},cb=(n,...r)=>{let a,o,u,d;const h=g=>{const m=r.reduce((y,w)=>w(y),n());return a=ib(m),o=a.cache.get,u=a.cache.set,d=p,p(g)},p=g=>{const m=o(g);if(m)return m;const y=ob(g,a);return u(g,y),y};return d=h,(...g)=>d(ub(...g))},db=[],_t=n=>{const r=a=>a[n]||db;return r.isThemeGetter=!0,r},Hg=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Qg=/^\((?:(\w[\w-]*):)?(.+)\)$/i,fb=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,hb=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,pb=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,mb=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,gb=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,yb=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Xr=n=>fb.test(n),Fe=n=>!!n&&!Number.isNaN(Number(n)),Jr=n=>!!n&&Number.isInteger(Number(n)),Vc=n=>n.endsWith("%")&&Fe(n.slice(0,-1)),vr=n=>hb.test(n),Vg=()=>!0,vb=n=>pb.test(n)&&!mb.test(n),Qd=()=>!1,xb=n=>gb.test(n),wb=n=>yb.test(n),kb=n=>!ie(n)&&!le(n),bb=n=>gs(n,Gg,Qd),ie=n=>Hg.test(n),Is=n=>gs(n,Yg,vb),vm=n=>gs(n,Tb,Fe),jb=n=>gs(n,Jg,Vg),Sb=n=>gs(n,Xg,Qd),xm=n=>gs(n,Wg,Qd),Cb=n=>gs(n,Kg,wb),Eo=n=>gs(n,Zg,xb),le=n=>Qg.test(n),Vi=n=>ta(n,Yg),Nb=n=>ta(n,Xg),wm=n=>ta(n,Wg),Eb=n=>ta(n,Gg),Rb=n=>ta(n,Kg),Ro=n=>ta(n,Zg,!0),Pb=n=>ta(n,Jg,!0),gs=(n,r,a)=>{const o=Hg.exec(n);return o?o[1]?r(o[1]):a(o[2]):!1},ta=(n,r,a=!1)=>{const o=Qg.exec(n);return o?o[1]?r(o[1]):a:!1},Wg=n=>n==="position"||n==="percentage",Kg=n=>n==="image"||n==="url",Gg=n=>n==="length"||n==="size"||n==="bg-size",Yg=n=>n==="length",Tb=n=>n==="number",Xg=n=>n==="family-name",Jg=n=>n==="number"||n==="weight",Zg=n=>n==="shadow",Lb=()=>{const n=_t("color"),r=_t("font"),a=_t("text"),o=_t("font-weight"),u=_t("tracking"),d=_t("leading"),h=_t("breakpoint"),p=_t("container"),g=_t("spacing"),m=_t("radius"),y=_t("shadow"),w=_t("inset-shadow"),x=_t("text-shadow"),b=_t("drop-shadow"),L=_t("blur"),R=_t("perspective"),N=_t("aspect"),T=_t("ease"),z=_t("animate"),$=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Q=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],J=()=>[...Q(),le,ie],se=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto","contain","none"],B=()=>[le,ie,g],pe=()=>[Xr,"full","auto",...B()],Z=()=>[Jr,"none","subgrid",le,ie],ze=()=>["auto",{span:["full",Jr,le,ie]},Jr,le,ie],Xe=()=>[Jr,"auto",le,ie],tt=()=>["auto","min","max","fr",le,ie],pt=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Re=()=>["start","end","center","stretch","center-safe","end-safe"],Pe=()=>["auto",...B()],ye=()=>[Xr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...B()],G=()=>[Xr,"screen","full","dvw","lvw","svw","min","max","fit",...B()],ne=()=>[Xr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...B()],U=()=>[n,le,ie],M=()=>[...Q(),wm,xm,{position:[le,ie]}],q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],je=()=>["auto","cover","contain",Eb,bb,{size:[le,ie]}],ve=()=>[Vc,Vi,Is],xe=()=>["","none","full",m,le,ie],Se=()=>["",Fe,Vi,Is],Oe=()=>["solid","dashed","dotted","double"],He=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Me=()=>[Fe,Vc,wm,xm],It=()=>["","none",L,le,ie],ot=()=>["none",Fe,le,ie],sn=()=>["none",Fe,le,ie],Fn=()=>[Fe,le,ie],Kn=()=>[Xr,"full",...B()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[vr],breakpoint:[vr],color:[Vg],container:[vr],"drop-shadow":[vr],ease:["in","out","in-out"],font:[kb],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[vr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[vr],shadow:[vr],spacing:["px",Fe],text:[vr],"text-shadow":[vr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Xr,ie,le,N]}],container:["container"],columns:[{columns:[Fe,ie,le,p]}],"break-after":[{"break-after":$()}],"break-before":[{"break-before":$()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:J()}],overflow:[{overflow:se()}],"overflow-x":[{"overflow-x":se()}],"overflow-y":[{"overflow-y":se()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:pe()}],"inset-x":[{"inset-x":pe()}],"inset-y":[{"inset-y":pe()}],start:[{"inset-s":pe(),start:pe()}],end:[{"inset-e":pe(),end:pe()}],"inset-bs":[{"inset-bs":pe()}],"inset-be":[{"inset-be":pe()}],top:[{top:pe()}],right:[{right:pe()}],bottom:[{bottom:pe()}],left:[{left:pe()}],visibility:["visible","invisible","collapse"],z:[{z:[Jr,"auto",le,ie]}],basis:[{basis:[Xr,"full","auto",p,...B()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Fe,Xr,"auto","initial","none",ie]}],grow:[{grow:["",Fe,le,ie]}],shrink:[{shrink:["",Fe,le,ie]}],order:[{order:[Jr,"first","last","none",le,ie]}],"grid-cols":[{"grid-cols":Z()}],"col-start-end":[{col:ze()}],"col-start":[{"col-start":Xe()}],"col-end":[{"col-end":Xe()}],"grid-rows":[{"grid-rows":Z()}],"row-start-end":[{row:ze()}],"row-start":[{"row-start":Xe()}],"row-end":[{"row-end":Xe()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":tt()}],"auto-rows":[{"auto-rows":tt()}],gap:[{gap:B()}],"gap-x":[{"gap-x":B()}],"gap-y":[{"gap-y":B()}],"justify-content":[{justify:[...pt(),"normal"]}],"justify-items":[{"justify-items":[...Re(),"normal"]}],"justify-self":[{"justify-self":["auto",...Re()]}],"align-content":[{content:["normal",...pt()]}],"align-items":[{items:[...Re(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Re(),{baseline:["","last"]}]}],"place-content":[{"place-content":pt()}],"place-items":[{"place-items":[...Re(),"baseline"]}],"place-self":[{"place-self":["auto",...Re()]}],p:[{p:B()}],px:[{px:B()}],py:[{py:B()}],ps:[{ps:B()}],pe:[{pe:B()}],pbs:[{pbs:B()}],pbe:[{pbe:B()}],pt:[{pt:B()}],pr:[{pr:B()}],pb:[{pb:B()}],pl:[{pl:B()}],m:[{m:Pe()}],mx:[{mx:Pe()}],my:[{my:Pe()}],ms:[{ms:Pe()}],me:[{me:Pe()}],mbs:[{mbs:Pe()}],mbe:[{mbe:Pe()}],mt:[{mt:Pe()}],mr:[{mr:Pe()}],mb:[{mb:Pe()}],ml:[{ml:Pe()}],"space-x":[{"space-x":B()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":B()}],"space-y-reverse":["space-y-reverse"],size:[{size:ye()}],"inline-size":[{inline:["auto",...G()]}],"min-inline-size":[{"min-inline":["auto",...G()]}],"max-inline-size":[{"max-inline":["none",...G()]}],"block-size":[{block:["auto",...ne()]}],"min-block-size":[{"min-block":["auto",...ne()]}],"max-block-size":[{"max-block":["none",...ne()]}],w:[{w:[p,"screen",...ye()]}],"min-w":[{"min-w":[p,"screen","none",...ye()]}],"max-w":[{"max-w":[p,"screen","none","prose",{screen:[h]},...ye()]}],h:[{h:["screen","lh",...ye()]}],"min-h":[{"min-h":["screen","lh","none",...ye()]}],"max-h":[{"max-h":["screen","lh",...ye()]}],"font-size":[{text:["base",a,Vi,Is]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,Pb,jb]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Vc,ie]}],"font-family":[{font:[Nb,Sb,r]}],"font-features":[{"font-features":[ie]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[u,le,ie]}],"line-clamp":[{"line-clamp":[Fe,"none",le,vm]}],leading:[{leading:[d,...B()]}],"list-image":[{"list-image":["none",le,ie]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",le,ie]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:U()}],"text-color":[{text:U()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Oe(),"wavy"]}],"text-decoration-thickness":[{decoration:[Fe,"from-font","auto",le,Is]}],"text-decoration-color":[{decoration:U()}],"underline-offset":[{"underline-offset":[Fe,"auto",le,ie]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:B()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",le,ie]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",le,ie]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:M()}],"bg-repeat":[{bg:q()}],"bg-size":[{bg:je()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Jr,le,ie],radial:["",le,ie],conic:[Jr,le,ie]},Rb,Cb]}],"bg-color":[{bg:U()}],"gradient-from-pos":[{from:ve()}],"gradient-via-pos":[{via:ve()}],"gradient-to-pos":[{to:ve()}],"gradient-from":[{from:U()}],"gradient-via":[{via:U()}],"gradient-to":[{to:U()}],rounded:[{rounded:xe()}],"rounded-s":[{"rounded-s":xe()}],"rounded-e":[{"rounded-e":xe()}],"rounded-t":[{"rounded-t":xe()}],"rounded-r":[{"rounded-r":xe()}],"rounded-b":[{"rounded-b":xe()}],"rounded-l":[{"rounded-l":xe()}],"rounded-ss":[{"rounded-ss":xe()}],"rounded-se":[{"rounded-se":xe()}],"rounded-ee":[{"rounded-ee":xe()}],"rounded-es":[{"rounded-es":xe()}],"rounded-tl":[{"rounded-tl":xe()}],"rounded-tr":[{"rounded-tr":xe()}],"rounded-br":[{"rounded-br":xe()}],"rounded-bl":[{"rounded-bl":xe()}],"border-w":[{border:Se()}],"border-w-x":[{"border-x":Se()}],"border-w-y":[{"border-y":Se()}],"border-w-s":[{"border-s":Se()}],"border-w-e":[{"border-e":Se()}],"border-w-bs":[{"border-bs":Se()}],"border-w-be":[{"border-be":Se()}],"border-w-t":[{"border-t":Se()}],"border-w-r":[{"border-r":Se()}],"border-w-b":[{"border-b":Se()}],"border-w-l":[{"border-l":Se()}],"divide-x":[{"divide-x":Se()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Se()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Oe(),"hidden","none"]}],"divide-style":[{divide:[...Oe(),"hidden","none"]}],"border-color":[{border:U()}],"border-color-x":[{"border-x":U()}],"border-color-y":[{"border-y":U()}],"border-color-s":[{"border-s":U()}],"border-color-e":[{"border-e":U()}],"border-color-bs":[{"border-bs":U()}],"border-color-be":[{"border-be":U()}],"border-color-t":[{"border-t":U()}],"border-color-r":[{"border-r":U()}],"border-color-b":[{"border-b":U()}],"border-color-l":[{"border-l":U()}],"divide-color":[{divide:U()}],"outline-style":[{outline:[...Oe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Fe,le,ie]}],"outline-w":[{outline:["",Fe,Vi,Is]}],"outline-color":[{outline:U()}],shadow:[{shadow:["","none",y,Ro,Eo]}],"shadow-color":[{shadow:U()}],"inset-shadow":[{"inset-shadow":["none",w,Ro,Eo]}],"inset-shadow-color":[{"inset-shadow":U()}],"ring-w":[{ring:Se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:U()}],"ring-offset-w":[{"ring-offset":[Fe,Is]}],"ring-offset-color":[{"ring-offset":U()}],"inset-ring-w":[{"inset-ring":Se()}],"inset-ring-color":[{"inset-ring":U()}],"text-shadow":[{"text-shadow":["none",x,Ro,Eo]}],"text-shadow-color":[{"text-shadow":U()}],opacity:[{opacity:[Fe,le,ie]}],"mix-blend":[{"mix-blend":[...He(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":He()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Fe]}],"mask-image-linear-from-pos":[{"mask-linear-from":Me()}],"mask-image-linear-to-pos":[{"mask-linear-to":Me()}],"mask-image-linear-from-color":[{"mask-linear-from":U()}],"mask-image-linear-to-color":[{"mask-linear-to":U()}],"mask-image-t-from-pos":[{"mask-t-from":Me()}],"mask-image-t-to-pos":[{"mask-t-to":Me()}],"mask-image-t-from-color":[{"mask-t-from":U()}],"mask-image-t-to-color":[{"mask-t-to":U()}],"mask-image-r-from-pos":[{"mask-r-from":Me()}],"mask-image-r-to-pos":[{"mask-r-to":Me()}],"mask-image-r-from-color":[{"mask-r-from":U()}],"mask-image-r-to-color":[{"mask-r-to":U()}],"mask-image-b-from-pos":[{"mask-b-from":Me()}],"mask-image-b-to-pos":[{"mask-b-to":Me()}],"mask-image-b-from-color":[{"mask-b-from":U()}],"mask-image-b-to-color":[{"mask-b-to":U()}],"mask-image-l-from-pos":[{"mask-l-from":Me()}],"mask-image-l-to-pos":[{"mask-l-to":Me()}],"mask-image-l-from-color":[{"mask-l-from":U()}],"mask-image-l-to-color":[{"mask-l-to":U()}],"mask-image-x-from-pos":[{"mask-x-from":Me()}],"mask-image-x-to-pos":[{"mask-x-to":Me()}],"mask-image-x-from-color":[{"mask-x-from":U()}],"mask-image-x-to-color":[{"mask-x-to":U()}],"mask-image-y-from-pos":[{"mask-y-from":Me()}],"mask-image-y-to-pos":[{"mask-y-to":Me()}],"mask-image-y-from-color":[{"mask-y-from":U()}],"mask-image-y-to-color":[{"mask-y-to":U()}],"mask-image-radial":[{"mask-radial":[le,ie]}],"mask-image-radial-from-pos":[{"mask-radial-from":Me()}],"mask-image-radial-to-pos":[{"mask-radial-to":Me()}],"mask-image-radial-from-color":[{"mask-radial-from":U()}],"mask-image-radial-to-color":[{"mask-radial-to":U()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":Q()}],"mask-image-conic-pos":[{"mask-conic":[Fe]}],"mask-image-conic-from-pos":[{"mask-conic-from":Me()}],"mask-image-conic-to-pos":[{"mask-conic-to":Me()}],"mask-image-conic-from-color":[{"mask-conic-from":U()}],"mask-image-conic-to-color":[{"mask-conic-to":U()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:M()}],"mask-repeat":[{mask:q()}],"mask-size":[{mask:je()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",le,ie]}],filter:[{filter:["","none",le,ie]}],blur:[{blur:It()}],brightness:[{brightness:[Fe,le,ie]}],contrast:[{contrast:[Fe,le,ie]}],"drop-shadow":[{"drop-shadow":["","none",b,Ro,Eo]}],"drop-shadow-color":[{"drop-shadow":U()}],grayscale:[{grayscale:["",Fe,le,ie]}],"hue-rotate":[{"hue-rotate":[Fe,le,ie]}],invert:[{invert:["",Fe,le,ie]}],saturate:[{saturate:[Fe,le,ie]}],sepia:[{sepia:["",Fe,le,ie]}],"backdrop-filter":[{"backdrop-filter":["","none",le,ie]}],"backdrop-blur":[{"backdrop-blur":It()}],"backdrop-brightness":[{"backdrop-brightness":[Fe,le,ie]}],"backdrop-contrast":[{"backdrop-contrast":[Fe,le,ie]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Fe,le,ie]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Fe,le,ie]}],"backdrop-invert":[{"backdrop-invert":["",Fe,le,ie]}],"backdrop-opacity":[{"backdrop-opacity":[Fe,le,ie]}],"backdrop-saturate":[{"backdrop-saturate":[Fe,le,ie]}],"backdrop-sepia":[{"backdrop-sepia":["",Fe,le,ie]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":B()}],"border-spacing-x":[{"border-spacing-x":B()}],"border-spacing-y":[{"border-spacing-y":B()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",le,ie]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Fe,"initial",le,ie]}],ease:[{ease:["linear","initial",T,le,ie]}],delay:[{delay:[Fe,le,ie]}],animate:[{animate:["none",z,le,ie]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[R,le,ie]}],"perspective-origin":[{"perspective-origin":J()}],rotate:[{rotate:ot()}],"rotate-x":[{"rotate-x":ot()}],"rotate-y":[{"rotate-y":ot()}],"rotate-z":[{"rotate-z":ot()}],scale:[{scale:sn()}],"scale-x":[{"scale-x":sn()}],"scale-y":[{"scale-y":sn()}],"scale-z":[{"scale-z":sn()}],"scale-3d":["scale-3d"],skew:[{skew:Fn()}],"skew-x":[{"skew-x":Fn()}],"skew-y":[{"skew-y":Fn()}],transform:[{transform:[le,ie,"","none","gpu","cpu"]}],"transform-origin":[{origin:J()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Kn()}],"translate-x":[{"translate-x":Kn()}],"translate-y":[{"translate-y":Kn()}],"translate-z":[{"translate-z":Kn()}],"translate-none":["translate-none"],accent:[{accent:U()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:U()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",le,ie]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":B()}],"scroll-mx":[{"scroll-mx":B()}],"scroll-my":[{"scroll-my":B()}],"scroll-ms":[{"scroll-ms":B()}],"scroll-me":[{"scroll-me":B()}],"scroll-mbs":[{"scroll-mbs":B()}],"scroll-mbe":[{"scroll-mbe":B()}],"scroll-mt":[{"scroll-mt":B()}],"scroll-mr":[{"scroll-mr":B()}],"scroll-mb":[{"scroll-mb":B()}],"scroll-ml":[{"scroll-ml":B()}],"scroll-p":[{"scroll-p":B()}],"scroll-px":[{"scroll-px":B()}],"scroll-py":[{"scroll-py":B()}],"scroll-ps":[{"scroll-ps":B()}],"scroll-pe":[{"scroll-pe":B()}],"scroll-pbs":[{"scroll-pbs":B()}],"scroll-pbe":[{"scroll-pbe":B()}],"scroll-pt":[{"scroll-pt":B()}],"scroll-pr":[{"scroll-pr":B()}],"scroll-pb":[{"scroll-pb":B()}],"scroll-pl":[{"scroll-pl":B()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",le,ie]}],fill:[{fill:["none",...U()]}],"stroke-w":[{stroke:[Fe,Vi,Is,vm]}],stroke:[{stroke:["none",...U()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Mb=cb(Lb);function Je(...n){return Mb(Ig(n))}function tl(n){if(!n)return null;try{const r=new URL(n);return r.protocol==="https:"||r.protocol==="http:"?r.toString():null}catch{return null}}const _b=zg("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",xs:"h-7 rounded-md px-2 text-xs",lg:"h-11 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),he=k.forwardRef(({className:n,variant:r,size:a,type:o="button",...u},d)=>i.jsx("button",{type:o,className:Je(_b({variant:r,size:a,className:n})),ref:d,...u}));he.displayName="Button";let nl=[],Ab=1;const vd=new Set;function ey(){for(const n of vd)n()}function We(n){const r={id:Ab++,variant:"default",...n};nl=[...nl.slice(-3),r],ey(),setTimeout(()=>ty(r.id),r.variant==="error"?8e3:4e3)}function ty(n){nl=nl.filter(r=>r.id!==n),ey()}function Db(n){return vd.add(n),()=>{vd.delete(n)}}function Ob(){return nl}class Vn extends Error{constructor(a,o){var d,h,p;const u=((d=o.error)==null?void 0:d.code)??(a>=500?"server_error":"request_failed");super(((h=o.error)==null?void 0:h.message)??Ib(u,a));$i(this,"status");$i(this,"code");$i(this,"field");$i(this,"body");this.status=a,this.code=u,this.field=(p=o.error)==null?void 0:p.field,this.body=o}}const Fb={unauthorized:"Your session has ended. Sign in again.",invalid_credentials:"Wrong username or password.",rate_limited:"Too many attempts. Wait a moment and try again.",must_change_password:"Change your password to continue.",csrf:"The request was blocked by a security check. Reload the page and try again.",weak_password:"Use at least 12 characters for the new password.",invalid_username:"That username is not allowed.",not_found:"Not found.",not_cancellable:"This request can no longer be cancelled.",not_retryable:"This request cannot be retried.",invalid_key:"That API key was rejected.",invalid_setting:"One of the values is not valid.",network_error:"Could not reach the FDA daemon.",server_error:"The daemon hit an error."};function Ib(n,r){return Fb[n]??(r?`Request failed (${r}).`:"Request failed.")}function wt(n){return n instanceof Vn||n instanceof Error?n.message:"Something went wrong."}let xd={onUnauthorized:()=>window.location.assign("/login"),onMustChange:()=>window.location.assign("/change-password")};function zb(n){xd=n}async function Ee(n,r={}){const a={Accept:"application/json","X-FDA-Request":"1"};r.body!==void 0&&(a["Content-Type"]="application/json");let o;try{o=await fetch(n,{method:r.method??"GET",credentials:"same-origin",headers:a,body:r.body!==void 0?JSON.stringify(r.body):void 0,signal:r.signal})}catch(h){throw h instanceof DOMException&&h.name==="AbortError"?h:new Vn(0,{error:{code:"network_error"}})}const u=await o.text();let d=null;if(u)try{d=JSON.parse(u)}catch{d=null}if(!o.ok){const h=new Vn(o.status,d??{});throw o.status===401&&!r.noAuthRedirect&&h.code!=="invalid_credentials"?xd.onUnauthorized():o.status===403&&h.code==="must_change_password"?xd.onMustChange():o.status===403&&h.code==="csrf"&&We({title:"Blocked",description:h.message,variant:"error"}),h}return d}function Xa(n){const r=new URLSearchParams;for(const[o,u]of Object.entries(n))u!=null&&u!==""&&r.set(o,String(u));const a=r.toString();return a?`?${a}`:""}function Ct({label:n="Loading"}){return i.jsxs("div",{className:"flex items-center gap-2 p-6 text-sm text-muted-foreground",role:"status",children:[i.jsx(i1,{className:"h-4 w-4 animate-spin","aria-hidden":!0}),n]})}function Dt({error:n,onRetry:r}){return i.jsxs("div",{role:"alert",className:"flex items-start gap-3 rounded-md border border-destructive/50 bg-destructive-muted p-4 text-sm",children:[i.jsx(Rk,{className:"mt-0.5 h-4 w-4 shrink-0 text-destructive","aria-hidden":!0}),i.jsxs("div",{className:"flex-1",children:[i.jsx("p",{children:wt(n)}),r&&i.jsx(he,{variant:"outline",size:"xs",className:"mt-2",onClick:r,children:"Try again"})]})]})}function rn({children:n}){return i.jsx("div",{className:"rounded-md border border-dashed p-6 text-center text-sm text-muted-foreground",children:n})}function Go({id:n,message:r}){return r?i.jsx("p",{id:n,role:"alert",className:"text-sm text-red-300",children:r}):null}function ys({title:n,description:r,actions:a}){return i.jsxs("div",{className:"mb-6 flex flex-wrap items-start justify-between gap-4",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-xl font-semibold",children:n}),r&&i.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:r})]}),a&&i.jsx("div",{className:"flex items-center gap-2",children:a})]})}const qe={me:["me"],health:["health"],dashboard:["dashboard"],requests:["requests"],requestList:n=>["requests","list",n],request:n=>["requests","detail",n],settings:["settings"],agents:["agents"],manifest:n=>["slack-manifest",n],access:["access"],slackChannels:n=>["slack","channels",n],slackUsers:n=>["slack","users",n],slackUsergroups:["slack","usergroups"],fs:n=>["fs",n],audit:(n,r)=>["audit",n,r],schedules:["schedules"],setup:["setup"],schedule:n=>["schedules",n]};function Yo(){return Rt({queryKey:qe.me,queryFn:()=>Ee("/api/auth/me").then(n=>n.user),staleTime:6e4})}function Ub(){const n=St();return Ft({mutationFn:r=>Ee("/api/auth/login",{method:"POST",body:r,noAuthRedirect:!0}),meta:{inlineError:!0},onSuccess:({user:r})=>{n.removeQueries(),n.setQueryData(qe.me,r)}})}function $b(){const n=St();return Ft({mutationFn:()=>Ee("/api/auth/logout",{method:"POST",noAuthRedirect:!0}),onSettled:()=>n.removeQueries()})}function qb(){const n=St();return Ft({mutationFn:r=>Ee("/api/auth/password",{method:"POST",body:r,noAuthRedirect:!0}),meta:{inlineError:!0},onSuccess:({user:r})=>{n.setQueryData(qe.me,r),n.invalidateQueries({predicate:a=>a.queryKey[0]!=="me"})}})}function Bb(){return Rt({queryKey:qe.health,queryFn:()=>Ee("/api/health"),refetchInterval:1e4})}function Hb(){return Rt({queryKey:qe.dashboard,queryFn:()=>Ee("/api/dashboard"),refetchInterval:5e3})}function Qb(n){return Rt({queryKey:qe.requestList(n),queryFn:()=>Ee(`/api/requests${Xa({status:n.status.join(","),q:n.q,page:n.page,pageSize:n.pageSize,sort:n.sort})}`),placeholderData:Ga,refetchInterval:1e4})}function Vb(n){return Rt({queryKey:qe.request(n),queryFn:()=>Ee(`/api/requests/${encodeURIComponent(n)}`),refetchInterval:15e3})}function ny(n){const r=St();return Ft({mutationFn:a=>Ee(`/api/requests/${encodeURIComponent(a)}/${n}`,{method:"POST"}),onSettled:()=>{r.invalidateQueries({queryKey:qe.requests}),r.invalidateQueries({queryKey:qe.dashboard})}})}const Wb=()=>ny("cancel"),Kb=()=>ny("retry");function Xo(){return Rt({queryKey:qe.settings,queryFn:()=>Ee("/api/settings")})}function Jo(){const n=St();return()=>{n.invalidateQueries({queryKey:qe.health}),n.invalidateQueries({queryKey:qe.dashboard})}}function Zo(n,r){n.setQueryData(qe.settings,a=>a&&{...a,...r}),n.invalidateQueries({queryKey:qe.settings})}function Vd(){const n=St(),r=Jo();return Ft({mutationFn:a=>Ee("/api/settings/general",{method:"PUT",body:a}),meta:{inlineError:!0},onSuccess:({settings:a})=>{Zo(n,{settings:a}),r()}})}function Gb(){return Rt({queryKey:qe.agents,queryFn:()=>Ee("/api/agents")})}function Yb(){const n=St(),r=Jo();return Ft({mutationFn:a=>Ee("/api/settings/agent",{method:"PUT",body:{agentId:a}}),onSuccess:({settings:a})=>{Zo(n,{settings:a}),n.invalidateQueries({queryKey:qe.agents}),r()}})}function Xb(){const n=St(),r=Jo();return Ft({mutationFn:a=>Ee("/api/settings/anthropic",{method:"PUT",body:{apiKey:a}}),meta:{inlineError:!0},onSuccess:({secrets:a})=>{Zo(n,{secrets:a}),r()}})}function Jb(){return Ft({mutationFn:()=>Ee("/api/settings/anthropic/test",{method:"POST"}),meta:{inlineError:!0}})}function Zb(){const n=St(),r=Jo();return Ft({mutationFn:a=>Ee("/api/settings/slack",{method:"PUT",body:a}),meta:{inlineError:!0},onSuccess:({secrets:a})=>{Zo(n,{secrets:a}),r()}})}function ej(){const n=St();return Ft({mutationFn:()=>Ee("/api/settings/slack/test",{method:"POST"}),meta:{inlineError:!0},onSuccess:()=>{n.invalidateQueries({queryKey:qe.settings}),n.invalidateQueries({queryKey:qe.dashboard})}})}function tj(n){return Rt({queryKey:qe.manifest(n),queryFn:()=>Ee(`/api/settings/slack/manifest${Xa({name:n})}`),placeholderData:Ga})}function nj(){return Rt({queryKey:qe.access,queryFn:()=>Ee("/api/settings/access").then(n=>n.entries)})}function rj(){const n=St();return Ft({mutationFn:r=>Ee("/api/settings/access",{method:"PUT",body:{entries:r}}),onSuccess:({entries:r})=>{n.setQueryData(qe.access,r),n.invalidateQueries({queryKey:qe.health})}})}function sj(n,r=!0){return Rt({queryKey:qe.slackChannels(n),queryFn:()=>Ee(`/api/slack/channels${Xa({q:n})}`).then(a=>a.items),enabled:r,staleTime:3e4,placeholderData:Ga})}function aj(n,r=!0){return Rt({queryKey:qe.slackUsers(n),queryFn:()=>Ee(`/api/slack/users${Xa({q:n})}`).then(a=>a.items),enabled:r,staleTime:3e4,placeholderData:Ga})}function ij(n=!0){return Rt({queryKey:qe.slackUsergroups,queryFn:()=>Ee("/api/slack/usergroups").then(r=>r.items),enabled:n,staleTime:6e4})}function lj(n,r=!0){return Rt({queryKey:qe.fs(n),queryFn:()=>Ee(`/api/fs/list${Xa({path:n})}`),enabled:r,placeholderData:Ga})}function oj(n,r){return Rt({queryKey:qe.audit(n,r),queryFn:()=>Ee(`/api/audit${Xa({page:n,pageSize:r})}`),placeholderData:Ga})}function uj(){return Rt({queryKey:qe.schedules,queryFn:()=>Ee("/api/schedules").then(n=>n.items),refetchInterval:3e4})}function cj(n){return Rt({queryKey:qe.schedule(n??""),queryFn:()=>Ee(`/api/schedules/${encodeURIComponent(n)}`),enabled:!!n})}function ry(){const n=St();return Ft({mutationFn:({id:r,patch:a})=>Ee(`/api/schedules/${encodeURIComponent(r)}`,{method:"PATCH",body:a}),onSettled:()=>void n.invalidateQueries({queryKey:qe.schedules})})}function dj(){const n=St();return Ft({mutationFn:r=>Ee(`/api/schedules/${encodeURIComponent(r)}`,{method:"DELETE"}),onSettled:()=>void n.invalidateQueries({queryKey:qe.schedules})})}function fj(){const n=St();return Ft({mutationFn:r=>Ee(`/api/schedules/${encodeURIComponent(r)}/run`,{method:"POST"}),onSettled:()=>{n.invalidateQueries({queryKey:qe.schedules}),n.invalidateQueries({queryKey:qe.requests})}})}function hj(){return Rt({queryKey:qe.setup,queryFn:()=>Ee("/api/setup"),refetchInterval:3e4})}function pj(){const n=St();return Ft({mutationFn:r=>Ee("/api/setup",{method:"PUT",body:r}),onSettled:()=>void n.invalidateQueries({queryKey:qe.setup})})}function mj(){const n=St();return Ft({mutationFn:r=>Ee("/api/setup/proposal",{method:"POST",body:r}),onSettled:()=>void n.invalidateQueries({queryKey:qe.setup})})}function km({children:n}){var o;const r=Yo(),a=On();return r.isLoading?i.jsx("div",{className:"flex h-full items-center justify-center",children:i.jsx(Ct,{})}):r.error?r.error instanceof Vn&&r.error.status===401?i.jsx(hd,{to:"/login",replace:!0,state:{from:a.pathname+a.search}}):i.jsx("div",{className:"mx-auto max-w-md p-8",children:i.jsx(Dt,{error:r.error,onRetry:()=>void r.refetch()})}):(o=r.data)!=null&&o.mustChange&&a.pathname!=="/change-password"?i.jsx(hd,{to:"/change-password",replace:!0}):i.jsx(i.Fragment,{children:n})}const gj=zg("inline-flex items-center gap-1 whitespace-nowrap rounded-full border px-2 py-0.5 text-xs font-medium",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",outline:"text-foreground",destructive:"border-destructive/40 bg-destructive-muted text-red-300",warning:"border-warning/40 bg-warning-muted text-amber-300",success:"border-success/40 bg-success-muted text-green-300",info:"border-info/40 bg-info-muted text-blue-300",muted:"border-transparent bg-muted text-muted-foreground"}},defaultVariants:{variant:"default"}});function it({className:n,variant:r,...a}){return i.jsx("span",{className:Je(gj({variant:r}),n),...a})}const Wc=new Intl.RelativeTimeFormat(void 0,{numeric:"auto",style:"short"});function Yt(n,r=Date.now()){if(!n)return"never";const a=(n-r)/1e3,o=Math.abs(a);return o<45?"just now":o<3600?Wc.format(Math.round(a/60),"minute"):o<86400?Wc.format(Math.round(a/3600),"hour"):o<86400*30?Wc.format(Math.round(a/86400),"day"):new Date(n).toLocaleDateString()}function mn(n){return n?new Date(n).toLocaleString():""}function cl(n){return n==null?"n/a":n>0&&n<.01?"<$0.01":`$${n.toFixed(2)}`}function yj(n){if(n==null)return"n/a";const r=Math.round(n/1e3);if(r<60)return`${r}s`;const a=Math.floor(r/60);return a<60?`${a}m ${r%60}s`:`${Math.floor(a/60)}h ${a%60}m`}function vj(n){const r=Math.floor(n/86400),a=Math.floor(n%86400/3600),o=Math.floor(n%3600/60);return r>0?`${r}d ${a}h`:a>0?`${a}h ${o}m`:`${o}m`}function bm(n){return n==null?"n/a":n.toLocaleString()}const sy={queued:"Queued",running:"Running",awaiting_input:"Awaiting input",awaiting_approval:"Awaiting approval",completed:"Completed",failed:"Failed",cancelled:"Cancelled"},jm={blocked:0,degraded:1,warn:2};function ay(n){return[...n].sort((r,a)=>jm[r.level]-jm[a.level]||r.since-a.since)}function iy({state:n}){return n==="blocked"?i.jsx(it,{variant:"destructive",children:"Blocked"}):n==="degraded"?i.jsx(it,{variant:"warning",children:"Degraded"}):i.jsx(it,{variant:"success",children:"Healthy"})}function xj({conditions:n}){return n.length?i.jsx("ul",{className:"space-y-2",children:ay(n).map(r=>{const a=r.level==="blocked"?Og:r.level==="degraded"?O1:e1;return i.jsxs("li",{className:Je("flex items-start gap-3 rounded-md border p-3 text-sm",r.level==="blocked"&&"border-destructive/50 bg-destructive-muted",r.level==="degraded"&&"border-warning/50 bg-warning-muted",r.level==="warn"&&"bg-muted/40"),children:[i.jsx(a,{className:Je("mt-0.5 h-4 w-4 shrink-0",r.level==="blocked"&&"text-destructive",r.level==="degraded"&&"text-warning",r.level==="warn"&&"text-muted-foreground"),"aria-hidden":!0}),i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsx("p",{className:"break-words",children:r.message}),i.jsxs("p",{className:"mt-1 text-xs text-muted-foreground",children:[i.jsx("span",{className:"capitalize",children:r.level})," since"," ",Yt(r.since)]})]})]},r.id)})}):i.jsx("p",{className:"text-sm text-muted-foreground",children:"No problems reported."})}function wj({conditions:n}){const r=ay(n).filter(a=>a.level==="blocked");return i.jsx("div",{role:"alert",className:"border-b border-destructive/50 bg-destructive-muted px-6 py-3 text-sm",children:i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx(Og,{className:"mt-0.5 h-4 w-4 shrink-0 text-destructive","aria-hidden":!0}),i.jsxs("div",{className:"min-w-0 space-y-1",children:[i.jsx("p",{className:"font-medium",children:"FDA is blocked. New requests are refused until this is fixed."}),i.jsx("ul",{className:"list-disc space-y-0.5 pl-4 text-red-200",children:r.map(a=>i.jsx("li",{className:"break-words",children:a.message},a.id))})]})]})})}const kj=[{to:"/",label:"Dashboard",icon:n1,end:!0},{to:"/requests",label:"Requests",icon:s1,end:!1},{to:"/tickets",label:"Tickets",icon:_1,end:!1},{to:"/schedules",label:"Schedules",icon:bk,end:!1},{to:"/setup",label:"Setup",icon:q1,end:!1},{to:"/browser",label:"Browser",icon:Ag,end:!1},{to:"/settings",label:"Settings",icon:P1,end:!1},{to:"/audit",label:"Audit log",icon:C1,end:!1}];function bj(){var u,d,h;const n=Bb(),r=Yo(),a=$b(),o=ea();return i.jsxs("div",{className:"flex h-full",children:[i.jsxs("aside",{className:"flex w-56 shrink-0 flex-col border-r bg-card/40",children:[i.jsxs("div",{className:"flex items-center gap-2 border-b px-4 py-4",children:[i.jsx(Pg,{className:"h-5 w-5","aria-hidden":!0}),i.jsx("span",{className:"font-semibold",children:"SuperClawd FDA"})]}),i.jsx("nav",{"aria-label":"Main",className:"flex-1 space-y-1 p-2",children:kj.map(({to:p,label:g,icon:m,end:y})=>i.jsxs($d,{to:p,end:y,className:({isActive:w})=>Je("flex items-center gap-2 rounded-md px-3 py-2 text-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",w?"bg-accent font-medium text-foreground":"text-muted-foreground hover:bg-accent/60 hover:text-foreground"),children:[i.jsx(m,{className:"h-4 w-4","aria-hidden":!0}),g]},p))}),i.jsxs("div",{className:"space-y-3 border-t p-3 text-sm",children:[n.data&&i.jsxs("div",{className:"flex items-center justify-between text-muted-foreground",children:[i.jsx(iy,{state:n.data.state}),i.jsxs("span",{className:"text-xs",children:["v",n.data.version]})]}),i.jsxs("div",{className:"flex items-center justify-between gap-2",children:[i.jsx("span",{className:"truncate text-muted-foreground",title:(u=r.data)==null?void 0:u.username,children:(d=r.data)==null?void 0:d.username}),i.jsx(he,{variant:"ghost",size:"icon",className:"h-8 w-8","aria-label":"Sign out",title:"Sign out",onClick:()=>a.mutate(void 0,{onSettled:()=>o("/login",{replace:!0})}),children:i.jsx(Dg,{})})]})]})]}),i.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[((h=n.data)==null?void 0:h.state)==="blocked"&&i.jsx(wj,{conditions:n.data.conditions}),i.jsx("main",{className:"min-h-0 flex-1 overflow-y-auto",children:i.jsx("div",{className:"mx-auto max-w-6xl p-6",children:i.jsx(Id,{})})})]})]})}function jj(){const n=ea(),r=On(),a=r.pathname,o=r.pathname+r.search;return k.useEffect(()=>{zb({onUnauthorized:()=>{a!=="/login"&&n("/login",{replace:!0,state:{from:o}})},onMustChange:()=>{a!=="/change-password"&&n("/change-password",{replace:!0})}})},[n,a,o]),i.jsx(Id,{})}const Qe=k.forwardRef(({className:n,...r},a)=>i.jsx("div",{ref:a,className:Je("rounded-lg border bg-card text-card-foreground shadow-sm",n),...r}));Qe.displayName="Card";const ct=k.forwardRef(({className:n,...r},a)=>i.jsx("div",{ref:a,className:Je("flex flex-col space-y-1.5 p-5",n),...r}));ct.displayName="CardHeader";const dt=k.forwardRef(({className:n,...r},a)=>i.jsx("h2",{ref:a,className:Je("text-base font-semibold leading-none tracking-tight",n),...r}));dt.displayName="CardTitle";const Ot=k.forwardRef(({className:n,...r},a)=>i.jsx("p",{ref:a,className:Je("text-sm text-muted-foreground",n),...r}));Ot.displayName="CardDescription";const Ve=k.forwardRef(({className:n,...r},a)=>i.jsx("div",{ref:a,className:Je("p-5 pt-0",n),...r}));Ve.displayName="CardContent";const Sj=k.forwardRef(({className:n,...r},a)=>i.jsx("div",{ref:a,className:Je("flex items-center p-5 pt-0",n),...r}));Sj.displayName="CardFooter";const Ae=k.forwardRef(({className:n,type:r,...a},o)=>i.jsx("input",{type:r,className:Je("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 aria-[invalid=true]:border-destructive",n),ref:o,...a}));Ae.displayName="Input";const ly=k.forwardRef(({className:n,...r},a)=>i.jsx("label",{ref:a,className:Je("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",n),...r}));ly.displayName="Label";function Ye({label:n,help:r,error:a,children:o}){const u=k.useId(),d=`${u}-help`,h=`${u}-err`,p=[r?d:null,a?h:null].filter(Boolean).join(" ")||void 0;return i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(ly,{htmlFor:u,children:n}),o({id:u,"aria-describedby":p,"aria-invalid":a?!0:void 0}),r&&i.jsx("p",{id:d,className:"text-xs text-muted-foreground",children:r}),a&&i.jsx("p",{id:h,role:"alert",className:"text-xs text-red-300",children:a})]})}function Cj(){var y;const[n,r]=k.useState(""),[a,o]=k.useState(""),u=Ub(),d=ea(),p=(y=On().state)==null?void 0:y.from,g=w=>{w.preventDefault(),u.mutate({username:n.trim(),password:a},{onSuccess:({user:x})=>{o(""),d(x.mustChange?"/change-password":p&&p!=="/login"?p:"/",{replace:!0})}})};let m=null;if(u.error){const w=u.error;m=w instanceof Vn&&w.code==="rate_limited"&&w.body.retryAfterSec?`Too many attempts. Try again in ${w.body.retryAfterSec} seconds.`:wt(w)}return i.jsx("div",{className:"flex min-h-full items-center justify-center p-6",children:i.jsxs(Qe,{className:"w-full max-w-sm",children:[i.jsxs(ct,{children:[i.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[i.jsx(Pg,{className:"h-5 w-5","aria-hidden":!0}),i.jsx("span",{className:"font-semibold",children:"SuperClawd FDA"})]}),i.jsx(dt,{children:"Sign in"}),i.jsx(Ot,{children:"Admin access for this machine."})]}),i.jsx(Ve,{children:i.jsxs("form",{onSubmit:g,className:"space-y-4",children:[i.jsx(Ye,{label:"Username",children:w=>i.jsx(Ae,{...w,value:n,onChange:x=>r(x.target.value),autoComplete:"username",autoFocus:!0,required:!0})}),i.jsx(Ye,{label:"Password",children:w=>i.jsx(Ae,{...w,type:"password",value:a,onChange:x=>o(x.target.value),autoComplete:"current-password",required:!0})}),i.jsx(Go,{message:m}),i.jsx(he,{type:"submit",className:"w-full",disabled:u.isPending||!n||!a,children:u.isPending?"Signing in":"Sign in"})]})})]})})}const Po=12;function oy({currentUsername:n,onDone:r,submitLabel:a="Save"}){const[o,u]=k.useState(""),[d,h]=k.useState(""),[p,g]=k.useState(""),[m,y]=k.useState(n),[w,x]=k.useState(null),b=qb(),L=b.error instanceof Vn?b.error:null,R=N=>{if(N.preventDefault(),x(null),d.length<Po)return x(`Use at least ${Po} characters for the new password.`);if(d!==p)return x("The new passwords do not match.");const T=m.trim();b.mutate({currentPassword:o,newPassword:d,...T&&T!==n?{newUsername:T}:{}},{onSuccess:({user:z})=>{u(""),h(""),g(""),r==null||r(z)}})};return i.jsxs("form",{onSubmit:R,className:"max-w-md space-y-4",noValidate:!0,children:[i.jsx(Ye,{label:"Username",help:"Optional. Leave as is to keep it.",error:(L==null?void 0:L.code)==="invalid_username"?wt(L):null,children:N=>i.jsx(Ae,{...N,value:m,onChange:T=>y(T.target.value),autoComplete:"username"})}),i.jsx(Ye,{label:"Current password",error:(L==null?void 0:L.code)==="invalid_credentials"?"The current password is wrong.":null,children:N=>i.jsx(Ae,{...N,type:"password",value:o,onChange:T=>u(T.target.value),autoComplete:"current-password",required:!0})}),i.jsx(Ye,{label:"New password",help:`At least ${Po} characters.`,error:(L==null?void 0:L.code)==="weak_password"?wt(L):null,children:N=>i.jsx(Ae,{...N,type:"password",value:d,onChange:T=>h(T.target.value),autoComplete:"new-password",required:!0,minLength:Po})}),i.jsx(Ye,{label:"Confirm new password",children:N=>i.jsx(Ae,{...N,type:"password",value:p,onChange:T=>g(T.target.value),autoComplete:"new-password",required:!0})}),i.jsx(Go,{message:w??(b.error&&!["invalid_username","invalid_credentials","weak_password"].includes((L==null?void 0:L.code)??"")?wt(b.error):null)}),i.jsx(he,{type:"submit",disabled:b.isPending||!o||!d,children:b.isPending?"Saving":a})]})}function Nj(){var o;const n=Yo(),r=ea(),a=((o=n.data)==null?void 0:o.mustChange)??!1;return i.jsx("div",{className:"flex min-h-full items-center justify-center p-6",children:i.jsxs(Qe,{className:"w-full max-w-md",children:[i.jsxs(ct,{children:[i.jsx(dt,{children:a?"Set a new password":"Change password"}),i.jsx(Ot,{children:a?"Replace the temporary password before using the panel. You can also rename the admin account.":"Update your password or username. Other sessions will be signed out."})]}),i.jsx(Ve,{children:n.data&&i.jsx(oy,{currentUsername:n.data.username,submitLabel:"Save and continue",onDone:()=>{We({title:"Password updated",variant:"success"}),r("/",{replace:!0})}})})]})})}const Ej={queued:"secondary",running:"info",awaiting_input:"warning",awaiting_approval:"warning",completed:"success",failed:"destructive",cancelled:"muted"};function dl({status:n}){return i.jsxs(it,{variant:Ej[n],children:[n==="running"&&i.jsx("span",{className:"h-1.5 w-1.5 animate-pulse rounded-full bg-current","aria-hidden":!0}),sy[n]]})}function Wd(n=3e4){const[r,a]=k.useState(()=>Date.now());return k.useEffect(()=>{const o=setInterval(()=>a(Date.now()),n);return()=>clearInterval(o)},[n]),r}function nr({label:n,value:r,hint:a}){return i.jsxs("div",{children:[i.jsx("dt",{className:"text-xs text-muted-foreground",children:n}),i.jsx("dd",{className:"mt-1 text-lg font-semibold",children:r}),a&&i.jsx("dd",{className:"text-xs text-muted-foreground",children:a})]})}function Wi({label:n,children:r}){return i.jsxs("div",{className:"flex items-baseline justify-between gap-4 py-1.5 text-sm",children:[i.jsx("dt",{className:"text-muted-foreground",children:n}),i.jsx("dd",{className:"min-w-0 truncate text-right",children:r})]})}function Rj(){const n=Hb();if(Wd(5e3),n.isLoading)return i.jsx(Ct,{});if(n.isError||!n.data)return i.jsx(Dt,{error:n.error,onRetry:()=>void n.refetch()});const r=n.data,a=i.jsx("span",{className:"text-muted-foreground",children:"Not set"});return i.jsxs("div",{className:"space-y-6",children:[i.jsx(ys,{title:"Dashboard",description:`${r.hostname}, updated every 5 seconds.`}),i.jsxs(Qe,{children:[i.jsxs(ct,{className:"flex-row items-center justify-between space-y-0",children:[i.jsx(dt,{children:"Health"}),i.jsx(iy,{state:r.health.state})]}),i.jsx(Ve,{children:i.jsx(xj,{conditions:r.health.conditions})})]}),r.current&&i.jsx(Qt,{to:`/requests/${encodeURIComponent(r.current.id)}`,className:"block rounded-lg border bg-card p-5 transition-colors hover:bg-accent/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:i.jsxs("div",{className:"flex items-center justify-between gap-4",children:[i.jsxs("div",{className:"min-w-0",children:[i.jsx("p",{className:"text-xs text-muted-foreground",children:"Working on"}),i.jsx("p",{className:"mt-1 truncate font-medium",children:r.current.title}),i.jsxs("div",{className:"mt-2 flex items-center gap-2 text-xs text-muted-foreground",children:[i.jsx(dl,{status:r.current.status}),r.current.startedAt&&i.jsxs("span",{children:["started ",Yt(r.current.startedAt)]})]})]}),i.jsx(Lg,{className:"h-4 w-4 shrink-0 text-muted-foreground","aria-hidden":!0})]})}),i.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[i.jsxs(Qe,{children:[i.jsx(ct,{children:i.jsx(dt,{children:"Queue"})}),i.jsxs(Ve,{children:[i.jsxs("dl",{className:"grid grid-cols-3 gap-4",children:[i.jsx(nr,{label:"Running",value:r.queue.running}),i.jsx(nr,{label:"Queued",value:r.queue.queued}),i.jsx(nr,{label:"Awaiting",value:r.queue.awaiting,hint:"input or approval"})]}),i.jsx(Qt,{to:"/requests",className:"mt-4 inline-block text-sm text-info underline-offset-4 hover:underline",children:"View requests"})]})]}),i.jsxs(Qe,{children:[i.jsx(ct,{children:i.jsx(dt,{children:"Today"})}),i.jsx(Ve,{children:i.jsxs("dl",{className:"grid grid-cols-3 gap-4",children:[i.jsx(nr,{label:"Requests",value:r.today.requests}),i.jsx(nr,{label:"Turns",value:r.today.turns}),i.jsx(nr,{label:"Cost",value:cl(r.today.costUsd)})]})})]}),i.jsxs(Qe,{children:[i.jsx(ct,{children:i.jsx(dt,{children:"Agent and workspace"})}),i.jsx(Ve,{children:i.jsxs("dl",{className:"divide-y",children:[i.jsx(Wi,{label:"Primary agent",children:r.agent.name??i.jsx(Qt,{to:"/settings/agent",className:"text-info underline",children:"Choose an agent"})}),i.jsx(Wi,{label:"Workspace",children:r.workspace.slug??a}),i.jsx(Wi,{label:"Machine ID",children:r.machineId?i.jsx("code",{className:"text-xs",children:r.machineId}):a})]})})]}),i.jsxs(Qe,{children:[i.jsxs(ct,{className:"flex-row items-center justify-between space-y-0",children:[i.jsx(dt,{children:"Slack"}),r.slack.connected?i.jsx(it,{variant:"success",children:"Connected"}):i.jsx(it,{variant:"destructive",children:"Disconnected"})]}),i.jsxs(Ve,{children:[i.jsxs("dl",{className:"divide-y",children:[i.jsx(Wi,{label:"Bot name",children:r.slack.botName??a}),i.jsx(Wi,{label:"Team ID",children:r.slack.teamId?i.jsx("code",{className:"text-xs",children:r.slack.teamId}):a})]}),!r.slack.connected&&i.jsx(Qt,{to:"/settings/slack",className:"mt-3 inline-block text-sm text-info underline-offset-4 hover:underline",children:"Check Slack settings"})]})]}),i.jsxs(Qe,{className:"md:col-span-2",children:[i.jsx(ct,{children:i.jsx(dt,{children:"Machine"})}),i.jsx(Ve,{children:i.jsxs("dl",{className:"grid grid-cols-2 gap-4 sm:grid-cols-4",children:[i.jsx(nr,{label:"Version",value:r.version}),i.jsx(nr,{label:"Uptime",value:vj(r.uptimeSec)}),i.jsx(nr,{label:"Free disk",value:r.disk.freeGb===null?"n/a":`${r.disk.freeGb.toFixed(1)} GB`}),i.jsx(nr,{label:"Host",value:i.jsx("span",{className:"break-all text-sm",children:r.hostname})})]})})]})]})]})}const eu=k.forwardRef(({className:n,...r},a)=>i.jsx("select",{className:Je("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",n),ref:a,...r}));eu.displayName="Select";function uy({page:n,pageSize:r,total:a,onPage:o,pageSizes:u,onPageSize:d}){const h=Math.max(1,Math.ceil(a/r)),p=a===0?0:(n-1)*r+1,g=Math.min(a,n*r);return i.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 text-sm text-muted-foreground",children:[i.jsxs("span",{children:[p," to ",g," of ",a]}),i.jsxs("div",{className:"flex items-center gap-2",children:[u&&d&&i.jsxs("label",{className:"flex items-center gap-2",children:[i.jsx("span",{children:"Rows"}),i.jsx(eu,{className:"h-8 w-20",value:r,onChange:m=>d(Number(m.target.value)),children:u.map(m=>i.jsx("option",{value:m,children:m},m))})]}),i.jsx(he,{variant:"outline",size:"icon",className:"h-8 w-8",disabled:n<=1,onClick:()=>o(n-1),"aria-label":"Previous page",children:i.jsx(Nk,{})}),i.jsxs("span",{children:["Page ",n," of ",h]}),i.jsx(he,{variant:"outline",size:"icon",className:"h-8 w-8",disabled:n>=h,onClick:()=>o(n+1),"aria-label":"Next page",children:i.jsx(_g,{})})]})]})}function Kd({open:n,onClose:r,title:a,description:o,children:u,footer:d,className:h}){const p=k.useRef(null),g=k.useId(),m=k.useId();return k.useEffect(()=>{const y=p.current;y&&(n&&!y.open&&y.showModal(),!n&&y.open&&y.close())},[n]),i.jsx("dialog",{ref:p,"aria-labelledby":g,"aria-describedby":o?m:void 0,onCancel:y=>{y.preventDefault(),r()},onClick:y=>{y.target===p.current&&r()},className:Je("w-full max-w-lg rounded-lg border bg-card p-0 text-card-foreground shadow-xl backdrop:bg-black/60",h),children:n&&i.jsxs("div",{className:"flex max-h-[85vh] flex-col",children:[i.jsxs("div",{className:"flex items-start justify-between gap-4 border-b p-5",children:[i.jsxs("div",{className:"space-y-1",children:[i.jsx("h2",{id:g,className:"text-base font-semibold",children:a}),o&&i.jsx("p",{id:m,className:"text-sm text-muted-foreground",children:o})]}),i.jsx("button",{type:"button",onClick:r,"aria-label":"Close",className:"rounded-sm opacity-70 hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:i.jsx(Bd,{className:"h-4 w-4"})})]}),i.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto p-5",children:u}),d&&i.jsx("div",{className:"flex justify-end gap-2 border-t p-4",children:d})]})})}function Gd({open:n,title:r,description:a,confirmLabel:o,destructive:u,pending:d,onConfirm:h,onClose:p}){return i.jsx(Kd,{open:n,onClose:p,title:r,footer:i.jsxs(i.Fragment,{children:[i.jsx(he,{variant:"outline",onClick:p,children:"Keep it"}),i.jsx(he,{variant:u?"destructive":"default",onClick:h,disabled:d,children:o})]}),children:i.jsx("p",{className:"text-sm text-muted-foreground",children:a})})}const cy=["queued","running","awaiting_input","awaiting_approval","completed","failed","cancelled"],Pj=["queued","running","awaiting_input","awaiting_approval"],Tj=["failed","cancelled"],Lj=["completed","failed","cancelled"];function dy({request:n,compact:r,showView:a}){const[o,u]=k.useState(!1),d=Wb(),h=Kb(),p=tl(n.permalink),g=r?"icon":"sm",m=r?"ghost":"outline",y=r?"h-8 w-8":void 0;return i.jsxs("div",{className:"flex items-center justify-end gap-1",children:[p&&i.jsxs("a",{href:p,target:"_blank",rel:"noreferrer noopener",title:"Open in Slack","aria-label":r?`Open "${n.title}" in Slack`:void 0,className:`inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring ${r?"h-8 w-8":"h-9 border border-input px-3"}`,children:[i.jsx(Dk,{className:"h-4 w-4","aria-hidden":!0}),!r&&"Open in Slack"]}),a&&i.jsx(Qt,{to:`/requests/${encodeURIComponent(n.id)}`,title:"View","aria-label":`View "${n.title}"`,className:"inline-flex h-8 w-8 items-center justify-center rounded-md hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:i.jsx(Fk,{className:"h-4 w-4","aria-hidden":!0})}),Pj.includes(n.status)&&i.jsxs(he,{variant:m,size:g,className:y,title:"Cancel","aria-label":r?`Cancel "${n.title}"`:void 0,onClick:()=>u(!0),children:[i.jsx(md,{}),!r&&"Cancel"]}),Tj.includes(n.status)&&i.jsxs(he,{variant:m,size:g,className:y,title:"Retry","aria-label":r?`Retry "${n.title}"`:void 0,disabled:h.isPending,onClick:()=>h.mutate(n.id,{onSuccess:()=>We({title:"Request queued again",variant:"success"})}),children:[i.jsx(x1,{}),!r&&"Retry"]}),i.jsx(Gd,{open:o,title:"Cancel this request?",description:`"${n.title}" will stop. Any running turn is interrupted.`,confirmLabel:"Cancel request",destructive:!0,pending:d.isPending,onClose:()=>u(!1),onConfirm:()=>d.mutate(n.id,{onSuccess:()=>We({title:"Request cancelled",variant:"success"}),onSettled:()=>u(!1)})})]})}const fy=[25,50,100];function Mj(n){const r=(n.get("status")??"").split(",").filter(o=>cy.includes(o)),a=Number(n.get("pageSize"));return{status:r,q:n.get("q")??"",page:Math.max(1,Number(n.get("page"))||1),pageSize:fy.includes(a)?a:25,sort:n.get("sort")==="recent"?"recent":"active"}}function _j(){const[n,r]=qd(),a=Mj(n),o=Qb(a),u=Wd(),[d,h]=k.useState(a.q),p=(y,w=!0)=>{r(x=>{const b=new URLSearchParams(x);for(const[L,R]of Object.entries(y))R===null||R===""?b.delete(L):b.set(L,R);return w&&!("page"in y)&&b.delete("page"),b},{replace:!0})};k.useEffect(()=>{if(d===a.q)return;const y=setTimeout(()=>p({q:d.trim()||null}),300);return()=>clearTimeout(y)},[d]);const g=y=>{const w=new Set(a.status);w.has(y)?w.delete(y):w.add(y),p({status:[...w].join(",")||null})},m=y=>Je("rounded-full border px-3 py-1 text-xs transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",y?"border-primary bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground");return i.jsxs("div",{className:"space-y-4",children:[i.jsx(ys,{title:"Requests",description:"Everything FDA has been asked to do."}),i.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[i.jsxs("div",{className:"relative w-full max-w-xs",children:[i.jsx(E1,{className:"pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground","aria-hidden":!0}),i.jsx(Ae,{type:"search","aria-label":"Search requests",placeholder:"Search title and messages",className:"pl-9",value:d,onChange:y=>h(y.target.value)})]}),i.jsx("div",{role:"group","aria-label":"Sort",className:"inline-flex rounded-md border p-0.5",children:["active","recent"].map(y=>i.jsx(he,{size:"xs",variant:a.sort===y?"secondary":"ghost","aria-pressed":a.sort===y,onClick:()=>p({sort:y==="active"?null:y}),children:y==="active"?"Active first":"Most recent"},y))})]}),i.jsxs("div",{role:"group","aria-label":"Filter by status",className:"flex flex-wrap gap-2",children:[i.jsx("button",{type:"button",className:m(a.status.length===0),"aria-pressed":a.status.length===0,onClick:()=>p({status:null}),children:"All"}),cy.map(y=>i.jsx("button",{type:"button",className:m(a.status.includes(y)),"aria-pressed":a.status.includes(y),onClick:()=>g(y),children:sy[y]},y))]}),o.isLoading?i.jsx(Ct,{}):o.isError?i.jsx(Dt,{error:o.error,onRetry:()=>void o.refetch()}):!o.data||o.data.items.length===0?i.jsx(rn,{children:a.status.length||a.q?"No requests match these filters.":"No requests yet. Mention the bot in an allowed Slack channel to start one."}):i.jsxs(i.Fragment,{children:[i.jsx("div",{className:Je("overflow-x-auto rounded-lg border",o.isPlaceholderData&&"opacity-60"),children:i.jsxs("table",{className:"w-full text-sm",children:[i.jsx("thead",{className:"bg-muted/40 text-left text-xs text-muted-foreground",children:i.jsxs("tr",{children:[i.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Request"}),i.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Status"}),i.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Requester"}),i.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Channel"}),i.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Activity"}),i.jsx("th",{scope:"col",className:"px-3 py-2 text-right font-medium",children:"Cost"}),i.jsx("th",{scope:"col",className:"px-3 py-2 text-right font-medium",children:i.jsx("span",{className:"sr-only",children:"Actions"})})]})}),i.jsx("tbody",{className:"divide-y",children:o.data.items.map(y=>i.jsxs("tr",{className:"hover:bg-accent/30",children:[i.jsxs("td",{className:"max-w-xs px-3 py-2",children:[i.jsx(Qt,{to:`/requests/${encodeURIComponent(y.id)}`,className:"block truncate font-medium hover:underline",title:y.title,children:y.title}),y.prs.length>0&&i.jsx("span",{className:"text-xs text-muted-foreground",children:y.prs.length===1?"1 PR":`${y.prs.length} PRs`})]}),i.jsx("td",{className:"px-3 py-2",children:i.jsx(dl,{status:y.status})}),i.jsx("td",{className:"px-3 py-2 text-muted-foreground",children:y.requesterName??y.requesterId}),i.jsx("td",{className:"px-3 py-2 text-muted-foreground",children:y.channelName?`#${y.channelName}`:y.channelId}),i.jsx("td",{className:"whitespace-nowrap px-3 py-2 text-muted-foreground",title:mn(y.lastActivityAt),children:Yt(y.lastActivityAt,u)}),i.jsx("td",{className:"px-3 py-2 text-right tabular-nums text-muted-foreground",children:cl(y.costUsd)}),i.jsx("td",{className:"px-3 py-2",children:i.jsx(dy,{request:y,compact:!0,showView:!0})})]},y.id))})]})}),i.jsx(uy,{page:a.page,pageSize:a.pageSize,total:o.data.total,onPage:y=>p({page:y===1?null:String(y)},!1),pageSizes:fy,onPageSize:y=>p({pageSize:y===25?null:String(y)})})]})]})}function hy({items:n,value:r,onChange:a,label:o,idPrefix:u}){const d=k.useRef([]),h=(p,g)=>{var y;let m=-1;p.key==="ArrowRight"&&(m=(g+1)%n.length),p.key==="ArrowLeft"&&(m=(g-1+n.length)%n.length),p.key==="Home"&&(m=0),p.key==="End"&&(m=n.length-1),m>=0&&(p.preventDefault(),a(n[m].value),(y=d.current[m])==null||y.focus())};return i.jsx("div",{role:"tablist","aria-label":o,className:"flex flex-wrap gap-1 border-b",children:n.map((p,g)=>{const m=p.value===r;return i.jsx("button",{ref:y=>{d.current[g]=y},type:"button",role:"tab",id:`${u}-tab-${p.value}`,"aria-selected":m,"aria-controls":`${u}-panel-${p.value}`,tabIndex:m?0:-1,onClick:()=>a(p.value),onKeyDown:y=>h(y,g),className:Je("-mb-px inline-flex items-center gap-1.5 border-b-2 px-3 py-2 text-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",m?"border-primary font-medium text-foreground":"border-transparent text-muted-foreground hover:text-foreground"),children:p.label},p.value)})})}function py({idPrefix:n,value:r,children:a,className:o}){return i.jsx("div",{role:"tabpanel",id:`${n}-panel-${r}`,"aria-labelledby":`${n}-tab-${r}`,tabIndex:0,className:Je("pt-4 focus-visible:outline-none",o),children:a})}const Kc=/^\s*([-*+]|\d+[.)])\s+(.*)$/;function Aj(n){const r=n.replace(/\r\n?/g,`
|
|
308
|
-
`).split(`
|
|
309
|
-
`),a=[];let o=0;for(;o<r.length;){const u=r[o];if(!u.trim()){o++;continue}const d=u.match(/^\s*(```|~~~)\s*([\w+-]*)/);if(d){const m=[];for(o++;o<r.length&&!r[o].trim().startsWith(d[1]);)m.push(r[o++]);o++,a.push({type:"code",lang:d[2],text:m.join(`
|
|
310
|
-
`)});continue}const h=u.match(/^(#{1,6})\s+(.*)$/);if(h){a.push({type:"heading",level:h[1].length,text:h[2].replace(/\s#+\s*$/,"")}),o++;continue}if(/^\s*([-*_])(\s*\1){2,}\s*$/.test(u)){a.push({type:"hr"}),o++;continue}if(/^\s*>/.test(u)){const m=[];for(;o<r.length&&/^\s*>/.test(r[o]);)m.push(r[o++].replace(/^\s*>\s?/,""));a.push({type:"quote",text:m.join(`
|
|
311
|
-
`)});continue}const p=u.match(Kc);if(p){const m=/\d/.test(p[1]),y=[];for(;o<r.length;){const w=r[o].match(Kc);if(w&&/\d/.test(w[1])===m)y.push(w[2]),o++;else if(r[o].trim()&&/^\s{2,}/.test(r[o])&&y.length)y[y.length-1]+=" "+r[o].trim(),o++;else break}a.push({type:"list",ordered:m,items:y});continue}const g=[];for(;o<r.length&&r[o].trim()&&!/^(#{1,6})\s/.test(r[o])&&!/^\s*(```|~~~|>)/.test(r[o])&&!Kc.test(r[o]);)g.push(r[o++].trim());a.push({type:"para",text:g.join(" ")})}return a}const Dj=/(`[^`]{1,500}`)|(\*\*[^*]{1,500}\*\*|__[^_]{1,500}__)|(\*[^*\s][^*]{0,500}\*|_[^_\s][^_]{0,500}_)|(\[[^\]]{1,300}\]\([^)\s]{1,2000}\))|(https?:\/\/[^\s<)]{1,2000})/,Sm=2e4;function Ys(n,r="i"){const a=[];let o=n.length>Sm?`${n.slice(0,Sm)}…`:n,u=0;for(;o;){const d=o.match(Dj);if(!d||d.index===void 0){a.push(o);break}d.index>0&&a.push(o.slice(0,d.index));const h=d[0],p=`${r}-${u++}`;if(d[1])a.push(i.jsx("code",{className:"rounded bg-muted px-1 py-0.5 font-mono text-[0.85em]",children:h.slice(1,-1)},p));else if(d[2])a.push(i.jsx("strong",{children:Ys(h.slice(2,-2),p)},p));else if(d[3])a.push(i.jsx("em",{children:Ys(h.slice(1,-1),p)},p));else if(d[4]){const g=h.match(/^\[([^\]]{1,300})\]\(([^)\s]{1,2000})\)$/),m=tl(g==null?void 0:g[2]);a.push(m?i.jsx("a",{href:m,target:"_blank",rel:"noreferrer noopener",className:"text-info underline",children:g==null?void 0:g[1]},p):i.jsx("span",{children:g==null?void 0:g[1]},p))}else if(d[5]){const g=tl(h);a.push(g?i.jsx("a",{href:g,target:"_blank",rel:"noreferrer noopener",className:"break-all text-info underline",children:h},p):h)}o=o.slice(d.index+h.length)}return a}function Oj(n,r){const a=n.match(/^\[([ xX])\]\s+(.*)$/);return a?i.jsxs("li",{className:"list-none",children:[i.jsx("span",{"aria-hidden":!0,className:"mr-1.5 font-mono text-muted-foreground",children:a[1]===" "?"[ ]":"[x]"}),Ys(a[2],r)]},r):i.jsx("li",{children:Ys(n,r)},r)}const Fj=["text-lg","text-base","text-sm","text-sm","text-sm","text-sm"];function Cm({source:n}){const r=Aj(n);return i.jsx("div",{className:"space-y-3 text-sm leading-relaxed",children:r.map((a,o)=>{const u=`b${o}`;switch(a.type){case"heading":{const d=`h${Math.min(a.level+2,6)}`;return i.jsx(d,{className:`${Fj[a.level-1]} mt-4 font-semibold first:mt-0`,children:Ys(a.text,u)},u)}case"para":return i.jsx("p",{children:Ys(a.text,u)},u);case"code":return i.jsx("pre",{className:"overflow-x-auto rounded-md bg-muted p-3 font-mono text-xs",children:i.jsx("code",{children:a.text})},u);case"quote":return i.jsx("blockquote",{className:"border-l-2 pl-3 text-muted-foreground",children:Ys(a.text,u)},u);case"list":{const d=a.ordered?"ol":"ul";return i.jsx(d,{className:`${a.ordered?"list-decimal":"list-disc"} space-y-1 pl-5`,children:a.items.map((h,p)=>Oj(h,`${u}-${p}`))},u)}case"hr":return i.jsx("hr",{},u)}return null})})}const Nm=300;function Ij(n,r){const a=St(),[o,u]=k.useState([]),[d,h]=k.useState(null),[p,g]=k.useState("closed"),m=k.useRef(null);return k.useEffect(()=>{if(!r)return;g("connecting");const y=new EventSource(`/api/requests/${encodeURIComponent(n)}/stream`);return y.onopen=()=>g("open"),y.onerror=()=>g(y.readyState===EventSource.CLOSED?"closed":"connecting"),y.addEventListener("snapshot",w=>{let x;try{x=JSON.parse(w.data)}catch{return}const b=m.current;m.current=x,h(x),b&&(b.status!==x.status||b.planStatus!==x.planStatus||b.lastActivityAt!==x.lastActivityAt)&&(a.invalidateQueries({queryKey:qe.request(n)}),b.status!==x.status&&(a.invalidateQueries({queryKey:["requests","list"]}),a.invalidateQueries({queryKey:qe.dashboard})))}),y.addEventListener("activity",w=>{try{const x=JSON.parse(w.data);u(b=>b.length>=Nm?[...b.slice(-Nm+1),x]:[...b,x])}catch{}}),()=>{y.close(),g("closed")}},[n,r,a]),{activity:o,snapshot:d,state:p}}const zj=["live","conversation","turns","plans","artifacts","events"];function Uj(){var b;const{id:n=""}=uw(),r=Vb(n),[a,o]=qd();Wd();const u=(b=r.data)==null?void 0:b.request.status,d=u?!Lj.includes(u):!1,h=Ij(n,d),p=a.get("tab"),g=p&&zj.includes(p)&&(p!=="live"||d)?p:d?"live":"conversation",m=L=>o(R=>{const N=new URLSearchParams(R);return N.set("tab",L),N},{replace:!0});if(r.isLoading)return i.jsx(Ct,{});if(r.isError||!r.data)return r.error instanceof Vn&&r.error.code==="not_found"?i.jsxs("div",{className:"space-y-4",children:[i.jsx(Em,{}),i.jsx(rn,{children:"This request does not exist."})]}):i.jsx(Dt,{error:r.error,onRetry:()=>void r.refetch()});const y=r.data,w=y.request,x=[...d?[{value:"live",label:i.jsx($j,{state:h.state})}]:[],{value:"conversation",label:`Conversation (${y.messages.length})`},{value:"turns",label:`Turns (${y.turns.length})`},{value:"plans",label:`Plans (${y.plans.length})`},{value:"artifacts",label:`Artifacts (${y.artifacts.length})`},{value:"events",label:"Events"}];return i.jsxs("div",{className:"space-y-6",children:[i.jsx(Em,{}),i.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[i.jsxs("div",{className:"min-w-0 space-y-2",children:[i.jsx("h1",{className:"break-words text-xl font-semibold",children:w.title}),i.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-sm text-muted-foreground",children:[i.jsx(dl,{status:w.status}),w.planStatus!=="none"&&i.jsxs(it,{variant:"outline",children:["Plan ",w.planStatus]}),i.jsxs("span",{children:["by ",w.requesterName??w.requesterId]}),i.jsxs("span",{children:["in ",w.channelName?`#${w.channelName}`:w.channelId]}),i.jsxs("span",{title:mn(w.createdAt),children:["opened ",Yt(w.createdAt)]}),i.jsxs("span",{children:["cost ",cl(w.costUsd)]})]})]}),i.jsx(dy,{request:w})]}),i.jsx(Qe,{children:i.jsxs(Ve,{className:"grid gap-x-8 gap-y-2 p-5 text-sm sm:grid-cols-2",children:[i.jsx(To,{label:"Branch",children:w.branch?i.jsx("code",{className:"text-xs",children:w.branch}):"None"}),i.jsx(To,{label:"Working directory",children:i.jsx("code",{className:"break-all text-xs",children:w.cwd||w.workdir})}),i.jsx(To,{label:"Last activity",children:i.jsx("span",{title:mn(w.lastActivityAt),children:Yt(w.lastActivityAt)})}),i.jsx(To,{label:"Pull requests",children:w.prs.length===0?"None":w.prs.map(L=>{const R=tl(L),N=y.prFollows.find(T=>T.url===L);return i.jsxs("span",{className:"mr-3 inline-block",children:[R?i.jsx("a",{href:R,target:"_blank",rel:"noreferrer noopener",className:"break-all text-info underline",children:my(L)}):L,N&&i.jsxs("span",{className:"ml-1 text-xs text-muted-foreground",title:N.statusReason??N.lastError??void 0,children:["(",Zj(N),")"]})]},L)})}),w.pendingQuestion&&i.jsxs("div",{className:"rounded-md border border-warning/40 bg-warning-muted p-3 sm:col-span-2",children:[i.jsx("p",{className:"text-xs font-medium text-amber-300",children:"Waiting for an answer in Slack"}),i.jsx("p",{className:"mt-1 whitespace-pre-wrap break-words",children:w.pendingQuestion})]})]})}),i.jsxs("div",{children:[i.jsx(hy,{idPrefix:"req",label:"Request details",items:x,value:g,onChange:m}),i.jsxs(py,{idPrefix:"req",value:g,children:[g==="live"&&i.jsx(qj,{activity:h.activity,state:h.state}),g==="conversation"&&i.jsx(Qj,{messages:y.messages}),g==="turns"&&i.jsx(Wj,{turns:y.turns}),g==="plans"&&i.jsx(Kj,{plans:y.plans}),g==="artifacts"&&i.jsx(Yj,{artifacts:y.artifacts,requestId:w.id}),g==="events"&&i.jsx(Jj,{events:y.events})]})]})]})}function Em(){return i.jsxs(Qt,{to:"/requests",className:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground",children:[i.jsx(Tg,{className:"h-4 w-4","aria-hidden":!0}),"Requests"]})}function To({label:n,children:r}){return i.jsxs("div",{className:"flex gap-3",children:[i.jsx("span",{className:"w-36 shrink-0 text-muted-foreground",children:n}),i.jsx("span",{className:"min-w-0",children:r})]})}function my(n){const r=n.match(/github\.com\/([^/]+\/[^/]+)\/pull\/(\d+)/);return r?`${r[1]}#${r[2]}`:n}function $j({state:n}){return i.jsxs(i.Fragment,{children:[i.jsx("span",{"aria-hidden":!0,className:Je("h-2 w-2 rounded-full",n==="open"?"animate-pulse bg-success":n==="connecting"?"bg-warning":"bg-muted-foreground")}),"Live"]})}function qj({activity:n,state:r}){const a=k.useRef(null),[o,u]=k.useState(!0);return k.useEffect(()=>{o&&a.current&&(a.current.scrollTop=a.current.scrollHeight)},[n,o]),i.jsxs("div",{className:"space-y-2",children:[i.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[i.jsx("span",{children:r==="open"?"Connected. Showing live agent activity.":r==="connecting"?"Connecting":"Disconnected"}),i.jsxs("label",{className:"flex items-center gap-2",children:[i.jsx("input",{type:"checkbox",checked:o,onChange:d=>u(d.target.checked),className:"accent-current"}),"Follow"]})]}),i.jsx("div",{ref:a,className:"h-96 overflow-y-auto rounded-md border bg-black/40 p-3 font-mono text-xs","aria-live":"off",children:n.length===0?i.jsx("p",{className:"text-muted-foreground",children:"No activity yet. It appears here while a turn runs."}):n.map((d,h)=>i.jsxs("div",{className:"flex gap-3 py-0.5",children:[i.jsx("span",{className:"shrink-0 text-muted-foreground",children:new Date(d.ts).toLocaleTimeString()}),i.jsx("span",{className:Je("shrink-0 w-10",d.kind==="tool"?"text-info":"text-success"),children:d.kind}),i.jsx("span",{className:"min-w-0 whitespace-pre-wrap break-words",children:d.text})]},h))})]})}const Bj={mention:"Mention",follow_up:"Follow-up",prior_context:"Prior context",unlisted:"Unlisted user",synthetic:"System",command:"Command"},Hj=["prior_context","unlisted"];function Qj({messages:n}){return n.length?i.jsx("ol",{className:"space-y-3",children:n.map(r=>{const a=Hj.includes(r.source);return i.jsxs("li",{className:Je("rounded-md border p-3",a&&"border-dashed border-warning/50 bg-warning-muted/40"),children:[i.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs text-muted-foreground",children:[i.jsx("span",{className:"font-medium text-foreground",children:r.authorName??r.authorId??"System"}),i.jsxs(it,{variant:a?"warning":"outline",children:[a&&i.jsx(L1,{className:"h-3 w-3","aria-hidden":!0}),Bj[r.source]]}),i.jsx(it,{variant:r.state==="delivered"?"secondary":r.state==="pending"?"info":"muted",children:r.state}),i.jsx("span",{className:"ml-auto",title:mn(r.receivedAt),children:Yt(r.receivedAt)})]}),a&&i.jsx("p",{className:"mt-1 text-xs text-amber-300",children:"Untrusted: shown to the agent as context only, not as instructions."}),i.jsx("p",{className:"mt-2 whitespace-pre-wrap break-words text-sm",children:r.text})]},r.id)})}):i.jsx(rn,{children:"No messages."})}const Vj={answered:"success",asked:"warning",planned:"info",error:"destructive",cancelled:"muted",timeout:"destructive"};function wd({label:n,children:r,defaultOpen:a}){return i.jsxs("details",{className:"group mt-2",open:a,children:[i.jsxs("summary",{className:"flex cursor-pointer list-none items-center gap-1 text-xs text-muted-foreground hover:text-foreground",children:[i.jsx(_g,{className:"h-3 w-3 transition-transform group-open:rotate-90","aria-hidden":!0}),n]}),i.jsx("div",{className:"mt-2",children:r})]})}function Wj({turns:n}){return n.length?i.jsx("ol",{className:"space-y-3",children:n.map(r=>i.jsxs("li",{className:"rounded-md border p-3 text-sm",children:[i.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[i.jsxs("span",{className:"font-medium",children:["Turn ",r.seq]}),r.mode==="plan"&&i.jsx(it,{variant:"outline",children:"Plan mode"}),r.outcome?i.jsx(it,{variant:Vj[r.outcome],children:r.outcome}):i.jsx(it,{variant:"secondary",children:r.status}),i.jsxs("span",{className:"text-xs text-muted-foreground",children:["trigger: ",r.trigger]}),i.jsx("span",{className:"ml-auto text-xs text-muted-foreground",title:mn(r.startedAt),children:r.startedAt?Yt(r.startedAt):"not started"})]}),i.jsxs("dl",{className:"mt-2 flex flex-wrap gap-x-6 gap-y-1 text-xs text-muted-foreground",children:[i.jsxs("div",{children:[i.jsx("dt",{className:"inline",children:"Duration "}),i.jsx("dd",{className:"inline text-foreground",children:yj(r.durationMs)})]}),i.jsxs("div",{children:[i.jsx("dt",{className:"inline",children:"Tokens "}),i.jsxs("dd",{className:"inline text-foreground",children:[bm(r.inputTokens)," in, ",bm(r.outputTokens)," out"]})]}),i.jsxs("div",{children:[i.jsx("dt",{className:"inline",children:"Cost "}),i.jsx("dd",{className:"inline text-foreground",children:cl(r.costUsd)})]}),r.stopReason&&i.jsxs("div",{children:[i.jsx("dt",{className:"inline",children:"Stop reason "}),i.jsx("dd",{className:"inline text-foreground",children:r.stopReason})]})]}),r.errorText&&i.jsx(wd,{label:"Error",defaultOpen:!0,children:i.jsx("pre",{className:"overflow-x-auto whitespace-pre-wrap break-words rounded bg-destructive-muted p-2 text-xs text-red-200",children:r.errorText})}),r.resultText&&i.jsx(wd,{label:"Result",children:i.jsx("pre",{className:"max-h-96 overflow-auto whitespace-pre-wrap break-words rounded bg-muted p-2 text-xs",children:r.resultText})})]},r.id))}):i.jsx(rn,{children:"No turns yet."})}function Kj({plans:n}){if(!n.length)return i.jsx(rn,{children:"No plans for this request."});const r=[...n].sort((a,o)=>o.version-a.version);return i.jsx("div",{className:"space-y-4",children:r.map((a,o)=>i.jsx(Qe,{children:i.jsxs(Ve,{className:"p-5",children:[i.jsxs("div",{className:"mb-3 flex flex-wrap items-center gap-2 text-xs text-muted-foreground",children:[i.jsxs("span",{className:"text-sm font-medium text-foreground",children:["Version ",a.version]}),i.jsx(it,{variant:a.status==="approved"?"success":a.status==="rejected"?"destructive":"warning",children:a.status}),a.decidedBy&&i.jsxs("span",{children:["by ",a.decidedBy," ",a.decidedAt?Yt(a.decidedAt):""]}),i.jsx("span",{className:"ml-auto",children:mn(a.createdAt)})]}),a.feedback&&i.jsxs("div",{className:"mb-3 rounded-md border bg-muted/40 p-3 text-sm",children:[i.jsx("p",{className:"text-xs text-muted-foreground",children:"Feedback"}),i.jsx("p",{className:"mt-1 whitespace-pre-wrap break-words",children:a.feedback})]}),o===0?i.jsx(Cm,{source:a.markdown}):i.jsx(wd,{label:"Show plan",children:i.jsx(Cm,{source:a.markdown})})]})},a.version))})}function Gj({requestId:n}){var u;const a=((u=Rt({queryKey:["screenshots",n],queryFn:()=>Ee(`/api/requests/${encodeURIComponent(n)}/screenshots`),refetchInterval:15e3}).data)==null?void 0:u.items)??[];if(!a.length)return null;const o=d=>`/api/requests/${encodeURIComponent(n)}/screenshots/${d.split("/").map(encodeURIComponent).join("/")}`;return i.jsxs("div",{className:"space-y-2",children:[i.jsxs("h3",{className:"text-sm font-medium",children:["Screenshots (",a.length,")"]}),i.jsx("div",{className:"grid grid-cols-2 gap-3 md:grid-cols-3",children:a.map(d=>i.jsxs("a",{href:o(d.name),target:"_blank",rel:"noreferrer noopener",className:"group overflow-hidden rounded-md border",children:[i.jsx("img",{src:o(d.name),alt:d.name,loading:"lazy",className:"aspect-video w-full bg-muted object-cover object-top"}),i.jsxs("div",{className:"flex justify-between gap-2 px-2 py-1 text-xs text-muted-foreground",children:[i.jsx("span",{className:"truncate",children:d.name}),i.jsx("span",{className:"shrink-0",children:Yt(d.mtime)})]})]},d.name))})]})}function Yj({artifacts:n,requestId:r}){return i.jsxs("div",{className:"space-y-4",children:[i.jsx(Gj,{requestId:r}),i.jsx(Xj,{artifacts:n})]})}function Xj({artifacts:n}){return n.length?i.jsx("ul",{className:"divide-y rounded-md border",children:n.map(r=>{const a=r.kind==="pr"?Wk:r.kind==="screenshot"?Jk:zk,o=tl(r.urlOrPath);return i.jsxs("li",{className:"flex items-center gap-3 p-3 text-sm",children:[i.jsx(a,{className:"h-4 w-4 shrink-0 text-muted-foreground","aria-hidden":!0}),i.jsxs("div",{className:"min-w-0 flex-1",children:[r.title&&i.jsx("p",{className:"truncate font-medium",children:r.title}),o?i.jsx("a",{href:o,target:"_blank",rel:"noreferrer noopener",className:"break-all text-xs text-info underline",children:r.kind==="pr"?my(r.urlOrPath):r.urlOrPath}):i.jsx("code",{className:"break-all text-xs text-muted-foreground",children:r.urlOrPath})]}),i.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:Yt(r.createdAt)})]},r.id)})}):i.jsx(rn,{children:"No artifacts yet."})}function Jj({events:n}){return n.length?i.jsx("div",{className:"overflow-x-auto rounded-md border",children:i.jsxs("table",{className:"w-full text-sm",children:[i.jsx("thead",{className:"bg-muted/40 text-left text-xs text-muted-foreground",children:i.jsxs("tr",{children:[i.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Time"}),i.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Type"}),i.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Summary"})]})}),i.jsx("tbody",{className:"divide-y",children:n.map(r=>i.jsxs("tr",{children:[i.jsx("td",{className:"whitespace-nowrap px-3 py-1.5 text-xs text-muted-foreground",children:mn(r.ts)}),i.jsx("td",{className:"whitespace-nowrap px-3 py-1.5",children:i.jsx("code",{className:"text-xs",children:r.type})}),i.jsx("td",{className:"px-3 py-1.5 break-words",children:r.summary})]},r.id))})]})}):i.jsx(rn,{children:"No events."})}function Zj(n){const r=n.status==="active"?"following":n.status==="gave_up"?"left for a human":n.status==="paused"?"not following":n.status,a=n.status==="active"&&n.ci&&n.ci!=="none"?`, CI ${n.ci}`:"",o=n.status==="active"&&n.mergeable==="CONFLICTING"?", conflicts":"";return r+a+o}const Rm=50;function eS(){const[n,r]=qd(),a=Math.max(1,Number(n.get("page"))||1),o=oj(a,Rm);return i.jsxs("div",{className:"space-y-4",children:[i.jsx(ys,{title:"Audit log",description:"Admin sign-ins and configuration changes on this machine."}),o.isLoading?i.jsx(Ct,{}):o.isError||!o.data?i.jsx(Dt,{error:o.error,onRetry:()=>void o.refetch()}):o.data.items.length===0?i.jsx(rn,{children:"No audit entries yet."}):i.jsxs(i.Fragment,{children:[i.jsx("div",{className:Je("overflow-x-auto rounded-lg border",o.isPlaceholderData&&"opacity-60"),children:i.jsxs("table",{className:"w-full text-sm",children:[i.jsx("thead",{className:"bg-muted/40 text-left text-xs text-muted-foreground",children:i.jsxs("tr",{children:[i.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Time"}),i.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Actor"}),i.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Action"}),i.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Detail"}),i.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"IP"})]})}),i.jsx("tbody",{className:"divide-y",children:o.data.items.map(u=>i.jsxs("tr",{children:[i.jsx("td",{className:"whitespace-nowrap px-3 py-2 text-muted-foreground",children:mn(u.ts)}),i.jsx("td",{className:"px-3 py-2",children:u.actor}),i.jsx("td",{className:"px-3 py-2",children:i.jsx("code",{className:"text-xs",children:u.action})}),i.jsx("td",{className:"max-w-md break-words px-3 py-2 text-muted-foreground",children:u.detail??""}),i.jsx("td",{className:"whitespace-nowrap px-3 py-2 text-xs text-muted-foreground",children:u.ip??""})]},u.id))})]})}),i.jsx(uy,{page:a,pageSize:Rm,total:o.data.total,onPage:u=>r(u===1?{}:{page:String(u)},{replace:!0})})]})]})}const ps=k.forwardRef(({checked:n,onCheckedChange:r,className:a,...o},u)=>i.jsx("button",{ref:u,type:"button",role:"switch","aria-checked":n,onClick:()=>r(!n),className:Je("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",n?"bg-primary":"bg-input",a),...o,children:i.jsx("span",{className:Je("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform",n?"translate-x-5":"translate-x-0")})}));ps.displayName="Switch";const Pm={pending:{label:"Waiting for confirmation",variant:"warning"},active:{label:"Active",variant:"success"},paused:{label:"Paused",variant:"muted"}};function tS(){const n=uj(),r=ry(),a=fj(),o=dj(),[u,d]=k.useState(null),[h,p]=k.useState(null),g=(m,y)=>r.mutate({id:m.id,patch:{status:y?"active":"paused"}},{onError:w=>We({title:"Couldn't change the schedule",description:wt(w),variant:"error"})});return i.jsxs("div",{className:"space-y-4",children:[i.jsx(ys,{title:"Schedules",description:"Recurring tasks people set up in Slack (for example daily insights in a channel). Each run posts its result in the channel; replies in its thread continue the conversation."}),n.isLoading?i.jsx(Ct,{}):n.isError||!n.data?i.jsx(Dt,{error:n.error,onRetry:()=>void n.refetch()}):n.data.length===0?i.jsx(rn,{children:`No schedules yet. Ask the agent in Slack, e.g. "send a summary of yesterday's sales every weekday at 9:00 in this channel".`}):i.jsx("div",{className:"overflow-x-auto rounded-lg border",children:i.jsxs("table",{className:"w-full text-sm",children:[i.jsx("thead",{className:"bg-muted/40 text-left text-xs text-muted-foreground",children:i.jsxs("tr",{children:[i.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Schedule"}),i.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"When"}),i.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Channel"}),i.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Next run"}),i.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Last run"}),i.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"On"}),i.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:i.jsx("span",{className:"sr-only",children:"Actions"})})]})}),i.jsx("tbody",{className:"divide-y",children:n.data.map(m=>i.jsxs("tr",{className:"align-top",children:[i.jsxs("td",{className:"px-3 py-2",children:[i.jsx("button",{type:"button",className:"text-left font-medium hover:underline",onClick:()=>d(m),children:m.title}),i.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-2 text-xs text-muted-foreground",children:[i.jsx(it,{variant:Pm[m.status].variant,children:Pm[m.status].label}),i.jsxs("span",{children:["by ",m.createdByName??m.createdBy]})]}),m.statusReason&&i.jsx("div",{className:"mt-1 text-xs text-amber-300",children:m.statusReason})]}),i.jsxs("td",{className:"whitespace-nowrap px-3 py-2",children:[m.when,i.jsx("div",{className:"text-xs text-muted-foreground",children:m.timezone})]}),i.jsxs("td",{className:"whitespace-nowrap px-3 py-2",children:["#",m.channelName??m.channelId]}),i.jsx("td",{className:"whitespace-nowrap px-3 py-2 text-muted-foreground",children:m.nextRunAt?i.jsx("span",{title:mn(m.nextRunAt),children:Yt(m.nextRunAt)}):"—"}),i.jsx("td",{className:"whitespace-nowrap px-3 py-2",children:m.lastRunAt?i.jsxs("div",{className:"flex items-center gap-2",children:[m.lastRunStatus==="missed"?i.jsx(it,{variant:"muted",children:"Missed"}):m.lastRunStatus?i.jsx(dl,{status:m.lastRunStatus}):null,m.lastRequestId?i.jsx(Qt,{to:`/requests/${m.lastRequestId}`,className:"text-xs text-muted-foreground hover:underline",children:Yt(m.lastRunAt)}):i.jsx("span",{className:"text-xs text-muted-foreground",children:Yt(m.lastRunAt)})]}):i.jsx("span",{className:"text-muted-foreground",children:"Never"})}),i.jsx("td",{className:"px-3 py-2",children:i.jsx(ps,{checked:m.status==="active",disabled:m.status==="pending"||r.isPending,"aria-label":m.status==="active"?`Pause ${m.title}`:`Resume ${m.title}`,onCheckedChange:y=>g(m,y)})}),i.jsxs("td",{className:"whitespace-nowrap px-3 py-2 text-right",children:[i.jsxs(he,{variant:"ghost",size:"sm",disabled:m.status==="pending"||a.isPending,onClick:()=>a.mutate(m.id,{onSuccess:()=>We({title:"Run started",description:`#${m.channelName??m.channelId}`,variant:"success"}),onError:y=>We({title:"Couldn't start the run",description:wt(y),variant:"error"})}),children:[i.jsx(p1,{className:"h-4 w-4","aria-hidden":!0})," Run now"]}),i.jsx(he,{variant:"ghost",size:"sm",onClick:()=>d(m),"aria-label":`Edit ${m.title}`,children:i.jsx(f1,{className:"h-4 w-4","aria-hidden":!0})}),i.jsx(he,{variant:"ghost",size:"sm",onClick:()=>p(m),"aria-label":`Delete ${m.title}`,children:i.jsx(qo,{className:"h-4 w-4","aria-hidden":!0})})]})]},m.id))})]})}),u&&i.jsx(nS,{schedule:u,onClose:()=>d(null)}),i.jsx(Gd,{open:!!h,title:"Delete this schedule?",description:h?`"${h.title}" stops running. Past runs stay in Requests.`:"",confirmLabel:"Delete",destructive:!0,pending:o.isPending,onClose:()=>p(null),onConfirm:()=>h&&o.mutate(h.id,{onSuccess:()=>p(null),onError:m=>We({title:"Couldn't delete",description:wt(m),variant:"error"})})})]})}function nS({schedule:n,onClose:r}){var R;const a=cj(n.id),o=ry(),[u,d]=k.useState(n.title),[h,p]=k.useState(n.prompt),[g,m]=k.useState(n.cron),[y,w]=k.useState(n.timezone),[x,b]=k.useState(null),L=()=>{b(null);const N={...u!==n.title&&{title:u},...h!==n.prompt&&{prompt:h},...g!==n.cron&&{cron:g},...y!==n.timezone&&{timezone:y}};if(!Object.keys(N).length)return r();o.mutate({id:n.id,patch:N},{onSuccess:()=>{We({title:"Schedule saved",variant:"success"}),r()},onError:T=>{var $,Q;const z=(Q=($=T.body)==null?void 0:$.error)==null?void 0:Q.field;b({field:z,message:wt(T)})}})};return i.jsx(Kd,{open:!0,onClose:r,title:"Edit schedule",description:`${n.when} (${n.timezone}) · #${n.channelName??n.channelId}`,className:"max-w-2xl",footer:i.jsxs(i.Fragment,{children:[i.jsx(he,{variant:"outline",onClick:r,children:"Cancel"}),i.jsx(he,{onClick:L,disabled:o.isPending,children:"Save"})]}),children:i.jsxs("div",{className:"space-y-4",children:[i.jsx(Ye,{label:"Title",error:(x==null?void 0:x.field)==="title"?x.message:null,children:N=>i.jsx(Ae,{...N,value:u,maxLength:80,onChange:T=>d(T.target.value)})}),i.jsx(Ye,{label:"What to do on each run",help:"Runs start without the original conversation, so keep this self-contained.",children:N=>i.jsx("textarea",{...N,value:h,maxLength:4e3,rows:6,onChange:T=>p(T.target.value),className:"flex w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"})}),i.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[i.jsx(Ye,{label:"When (cron)",help:"minute hour day month weekday, e.g. 0 9 * * 1-5 for weekdays at 9:00",error:(x==null?void 0:x.field)==="cron"?x.message:null,children:N=>i.jsx(Ae,{...N,value:g,onChange:T=>m(T.target.value),className:"font-mono"})}),i.jsx(Ye,{label:"Timezone",help:"e.g. America/Sao_Paulo",error:(x==null?void 0:x.field)==="timezone"?x.message:null,children:N=>i.jsx(Ae,{...N,value:y,onChange:T=>w(T.target.value)})})]}),x&&!["title","cron","timezone"].includes(x.field??"")&&i.jsx("p",{className:"text-sm text-red-300",children:x.message}),i.jsxs("div",{children:[i.jsx("h3",{className:"mb-2 text-sm font-medium",children:"Recent runs"}),a.isLoading?i.jsx(Ct,{}):(R=a.data)!=null&&R.runs.length?i.jsx("ul",{className:"divide-y rounded-md border text-sm",children:a.data.runs.map(N=>i.jsxs("li",{className:"flex items-center justify-between gap-2 px-3 py-2",children:[i.jsx(Qt,{to:`/requests/${N.requestId}`,className:"hover:underline",onClick:r,children:mn(N.createdAt)}),i.jsx(dl,{status:N.status})]},N.requestId))}):i.jsx("p",{className:"text-sm text-muted-foreground",children:"No runs yet."})]})]})})}const rS=/[\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u2069\uFEFF]/,sS="flex w-full rounded-md border border-input bg-background px-3 py-2 font-mono text-xs focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring";function aS(){const n=hj();return i.jsxs("div",{className:"space-y-4",children:[i.jsx(ys,{title:"Setup",description:"Commands a fresh worktree needs before the agent starts: install dependencies, copy an example env file, build. They run in the same sandbox as the agent, once per worktree, without FDA's tokens or the Anthropic key. The agent can propose a script; it only runs after you approve it here."}),n.isLoading?i.jsx(Ct,{}):n.isError||!n.data?i.jsx(Dt,{error:n.error,onRetry:()=>void n.refetch()}):!n.data.workdir||!n.data.isRepo?i.jsxs(rn,{children:["Setup scripts run in per-request worktrees, so the working directory must be a git repository. The current one"," ",n.data.workdir?i.jsx("code",{children:n.data.workdir}):"isn't set",n.data.workdir?" isn't a repository":"","."]}):i.jsx(iS,{repoPath:n.data.workdir,row:n.data.scripts.find(r=>r.repoPath===n.data.workdir)??null})]})}function iS({repoPath:n,row:r}){const a=pj(),o=mj(),[u,d]=k.useState((r==null?void 0:r.script)??""),[h,p]=k.useState((r==null?void 0:r.onFailure)??"continue"),[g,m]=k.useState(String((r==null?void 0:r.timeoutSec)??600)),[y,w]=k.useState((r==null?void 0:r.enabled)??!0);k.useEffect(()=>{d((r==null?void 0:r.script)??""),p((r==null?void 0:r.onFailure)??"continue"),m(String((r==null?void 0:r.timeoutSec)??600)),w((r==null?void 0:r.enabled)??!0)},[r==null?void 0:r.updatedAt]);const x=R=>N=>We({title:R,description:wt(N),variant:"error"}),b=()=>a.mutate({repoPath:n,script:u.trim()||null,onFailure:h,timeoutSec:Number(g),enabled:y},{onSuccess:()=>We({title:"Setup script saved"}),onError:x("Couldn't save the setup script")}),L=R=>{var N;return o.mutate({repoPath:n,action:R,proposedAt:((N=r==null?void 0:r.proposal)==null?void 0:N.at)??null},{onSuccess:()=>We(R==="approve"?{title:"Proposal approved",description:"It's saved and runs in every new worktree (no need to press Save)."}:{title:"Proposal dismissed"}),onError:x("Couldn't update the proposal")})};return i.jsxs("div",{className:"space-y-4",children:[(r==null?void 0:r.proposal)&&i.jsx(Qe,{className:"border-warning/40",children:i.jsxs(Ve,{className:"space-y-3 p-5 text-sm",children:[i.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[i.jsx(it,{variant:"warning",children:"Proposed by the agent"}),r.proposal.at&&i.jsx("span",{className:"text-muted-foreground",title:mn(r.proposal.at),children:Yt(r.proposal.at)}),r.proposal.requestId&&i.jsx(Qt,{to:`/requests/${r.proposal.requestId}`,className:"text-info underline",children:"from this request"})]}),r.proposal.reason&&i.jsx("p",{children:r.proposal.reason}),rS.test(r.proposal.script)&&i.jsx("p",{className:"text-xs font-medium text-destructive",children:"This script contains invisible or direction-changing characters. Don't approve it unless you know why."}),i.jsx("pre",{className:"max-h-72 overflow-auto rounded-md bg-muted/40 p-3 font-mono text-xs",children:r.proposal.script}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"Read it before approving: it will run in every new worktree."}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx(he,{size:"sm",onClick:()=>L("approve"),disabled:o.isPending,children:"Approve and use"}),i.jsx(he,{size:"sm",variant:"outline",onClick:()=>L("reject"),disabled:o.isPending,children:"Dismiss"})]})]})}),i.jsx(Qe,{children:i.jsxs(Ve,{className:"space-y-4 p-5",children:[i.jsxs("p",{className:"text-sm",children:["Repository ",i.jsx("code",{className:"text-xs",children:n})]}),i.jsx(Ye,{label:"Script",help:"Runs with bash in the new worktree. Example: npm ci && cp -n .env.example .env",children:R=>i.jsx("textarea",{...R,value:u,rows:8,maxLength:2e4,spellCheck:!1,placeholder:"npm ci",onChange:N=>d(N.target.value),className:sS})}),i.jsxs("div",{className:"grid gap-4 sm:grid-cols-3",children:[i.jsx(Ye,{label:"If it fails",help:"Continue tells the agent what failed; Stop fails the request.",children:R=>i.jsxs(eu,{...R,value:h,onChange:N=>p(N.target.value),children:[i.jsx("option",{value:"continue",children:"Continue"}),i.jsx("option",{value:"fail",children:"Stop"})]})}),i.jsx(Ye,{label:"Timeout (seconds)",help:"10 to 3600.",children:R=>i.jsx(Ae,{...R,type:"number",min:10,max:3600,value:g,onChange:N=>m(N.target.value)})}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsx("p",{className:"text-sm font-medium",children:"Enabled"}),i.jsx(ps,{checked:y,onCheckedChange:w,"aria-label":"Run the setup script"})]})]}),i.jsx(he,{onClick:b,disabled:a.isPending,children:"Save"})]})}),i.jsxs("div",{children:[i.jsx("h2",{className:"mb-2 text-sm font-medium",children:"Recent runs"}),r!=null&&r.runs.length?i.jsx("ul",{className:"divide-y rounded-md border",children:r.runs.map(R=>i.jsxs("li",{className:"space-y-2 p-3 text-sm",children:[i.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[i.jsx(it,{variant:R.status==="ok"?"success":R.status==="timeout"?"warning":"destructive",children:R.status==="ok"?"OK":R.status==="timeout"?"Timed out":`Failed (exit ${R.exitCode??"?"})`}),i.jsx("span",{className:"text-muted-foreground",title:mn(R.startedAt),children:Yt(R.startedAt)}),R.durationMs!==null&&i.jsxs("span",{className:"text-muted-foreground",children:[Math.round(R.durationMs/1e3),"s"]}),i.jsx(Qt,{to:`/requests/${R.requestId}`,className:"text-info underline",children:"request"})]}),R.log&&i.jsxs("details",{children:[i.jsx("summary",{className:"cursor-pointer text-xs text-muted-foreground",children:"Output"}),i.jsx("pre",{className:"mt-2 max-h-72 overflow-auto rounded-md bg-muted/40 p-3 font-mono text-xs",children:R.log})]})]},R.id))}):i.jsx(rn,{children:"No runs yet."})]})]})}const kd=["browser"],lS=new Set(["Enter","Tab","Backspace","Delete","Escape","Home","End","PageUp","PageDown","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"]);function oS(){return Rt({queryKey:kd,queryFn:()=>Ee("/api/browser"),refetchInterval:2e4})}function gy(){const n=St();return Ft({mutationFn:r=>Ee(r.path,{method:r.method??"POST",body:r.body}),onSuccess:r=>{r&&"sites"in r&&n.setQueryData(kd,r)},onSettled:()=>void n.invalidateQueries({queryKey:kd})})}function uS(){const n=oS();return i.jsxs("div",{className:"space-y-4",children:[i.jsx(ys,{title:"Browser",description:"Sign the agent in to the sites it needs (a staging app, a dashboard). You drive a browser on this machine from here; Save and close keeps its cookies (encrypted), and every browser task starts signed in. Use test accounts: the agent can read what its browser holds."}),n.isLoading?i.jsx(Ct,{}):n.isError||!n.data?i.jsx(Dt,{error:n.error,onRetry:()=>void n.refetch()}):n.data.installed?i.jsxs(i.Fragment,{children:[!n.data.enabled&&i.jsx("p",{className:"rounded-md border border-warning/50 bg-warning-muted p-3 text-sm",children:"The browser is off for tasks (Settings → General → Browser). You can still save sign-ins now; tasks use them once it's on."}),i.jsx(cS,{data:n.data}),i.jsx(dS,{data:n.data})]}):i.jsxs(rn,{children:["The browser isn't installed on this machine. Install it there with"," ",i.jsx("code",{children:"superclawd fda browser install"}),", then enable it in Settings → General."]})]})}function cS({data:n}){const r=gy(),[a,o]=k.useState(""),[u,d]=k.useState(null),h=k.useRef(null),p=k.useRef(null),g=n.session.open,{width:m,height:y}=n.session.viewport;k.useEffect(()=>{if(!g){d(null);return}const T=new EventSource("/api/browser/session/stream");return T.addEventListener("frame",z=>{const $=JSON.parse(z.data);d({src:`data:image/jpeg;base64,${$.data}`,url:$.url,title:$.title,tabs:$.tabs})}),T.addEventListener("closed",()=>T.close()),T.addEventListener("expired",()=>T.close()),()=>T.close()},[g]),k.useEffect(()=>{var T;u!=null&&u.url&&((T=document.activeElement)==null?void 0:T.id)!=="browser-address"&&o(u.url)},[u==null?void 0:u.url]);const w=T=>z=>We({title:T,description:wt(z),variant:"error"}),x=T=>Ee("/api/browser/session/input",{method:"POST",body:T}).catch(w("Couldn't send that to the browser")),b=T=>{const z=h.current.getBoundingClientRect();return{x:Math.round((T.clientX-z.left)/z.width*m),y:Math.round((T.clientY-z.top)/z.height*y)}},L=T=>r.mutateAsync({path:"/api/browser/session",body:{url:T}}).catch(w("Couldn't open the page")),R=T=>{if(!g)return;const z=[T.ctrlKey&&"Control",T.altKey&&"Alt",T.metaKey&&"Meta"].filter(Boolean);lS.has(T.key)?(T.preventDefault(),x({type:"key",key:[...z,...T.shiftKey?["Shift"]:[],T.key].join("+")})):T.key.length===1&&z.length?(T.preventDefault(),x({type:"key",key:[...z,T.key].join("+")})):T.key.length===1&&(T.preventDefault(),x({type:"text",text:T.key}))},N=T=>{const z=T.clipboardData.getData("text/plain");!z||!g||(T.preventDefault(),x({type:"text",text:z.slice(0,2e3)}))};return i.jsx(Qe,{children:i.jsxs(Ve,{className:"space-y-3 pt-6",children:[i.jsxs("form",{className:"flex items-center gap-2",onSubmit:T=>{T.preventDefault(),a.trim()&&L(a.trim())},children:[i.jsx(he,{type:"button",variant:"outline",size:"icon","aria-label":"Back",disabled:!g,onClick:()=>void Ee("/api/browser/session/go",{method:"POST",body:{action:"back"}}).catch(w("Couldn't go back")),children:i.jsx(Tg,{className:"h-4 w-4"})}),i.jsx(he,{type:"button",variant:"outline",size:"icon","aria-label":"Forward",disabled:!g,onClick:()=>void Ee("/api/browser/session/go",{method:"POST",body:{action:"forward"}}).catch(w("Couldn't go forward")),children:i.jsx(Lg,{className:"h-4 w-4"})}),i.jsx(he,{type:"button",variant:"outline",size:"icon","aria-label":"Reload",disabled:!g,onClick:()=>void Ee("/api/browser/session/go",{method:"POST",body:{action:"reload"}}).catch(w("Couldn't reload")),children:i.jsx(k1,{className:"h-4 w-4"})}),i.jsx(Ae,{id:"browser-address",value:a,onChange:T=>o(T.target.value),placeholder:"https://staging.example.com/login","aria-label":"Address",className:"flex-1"}),i.jsxs(he,{type:"submit",disabled:r.isPending||!a.trim(),children:[i.jsx(Ag,{className:"mr-1 h-4 w-4"}),g?"Go":"Open browser"]})]}),g?i.jsxs(i.Fragment,{children:[i.jsx("div",{ref:p,tabIndex:0,role:"application","aria-label":"Remote browser: click to focus, then type",className:"relative overflow-hidden rounded-md border bg-muted outline-none focus:ring-2 focus:ring-ring",onKeyDown:R,onPaste:N,children:u?i.jsx("img",{ref:h,src:u.src,alt:u.title||"Remote browser",draggable:!1,className:"block w-full cursor-pointer select-none",style:{aspectRatio:`${m} / ${y}`},onClick:T=>{var z;(z=p.current)==null||z.focus(),x({type:"click",...b(T)})},onDoubleClick:T=>void x({type:"click",double:!0,...b(T)}),onContextMenu:T=>{T.preventDefault(),x({type:"click",button:"right",...b(T)})},onWheel:T=>void x({type:"wheel",...b(T),dx:Math.round(T.deltaX),dy:Math.round(T.deltaY)})}):i.jsx("div",{className:"flex items-center justify-center text-sm text-muted-foreground",style:{aspectRatio:`${m} / ${y}`},children:"Loading the page…"})}),i.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs text-muted-foreground",children:[i.jsx("span",{children:"Click the page, then type. Paste works too. Passwords you type go straight to the site; they aren't stored by FDA."}),u&&u.tabs>1&&i.jsxs(it,{variant:"secondary",children:[u.tabs," tabs (showing the newest)"]}),!n.session.sandboxed&&i.jsx(it,{variant:"secondary",children:"Chrome sandbox unavailable on this host"}),n.session.idleClosesAt&&i.jsxs("span",{children:["Closes when idle, latest ",mn(n.session.idleClosesAt),"."]})]}),i.jsxs("div",{className:"flex gap-2",children:[i.jsxs(he,{disabled:r.isPending,onClick:()=>void r.mutateAsync({path:"/api/browser/session/save",body:{close:!0}}).then(()=>We({title:"Sign-ins saved",description:"New browser tasks start signed in. Open the browser again to add another site."})).catch(w("Couldn't save the sign-ins")),children:[i.jsx(j1,{className:"mr-1 h-4 w-4"}),"Save and close"]}),i.jsxs(he,{variant:"outline",disabled:r.isPending,onClick:()=>void r.mutateAsync({path:"/api/browser/session",method:"DELETE"}).catch(w("Couldn't close the browser")),children:[i.jsx(Bd,{className:"mr-1 h-4 w-4"}),"Close without saving"]})]})]}):i.jsx("p",{className:"text-sm text-muted-foreground",children:"Enter the sign-in page of a site and open the browser. Sign in as you normally would (including two-factor), then Save and close."})]})})}function dS({data:n}){const r=gy(),[a,o]=k.useState(null),u=d=>h=>We({title:d,description:wt(h),variant:"error"});return i.jsxs(Qe,{children:[i.jsxs(Ve,{className:"space-y-3 pt-6",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("h2",{className:"font-medium",children:"Signed-in sites"}),n.sites.length>1&&i.jsx(he,{variant:"outline",size:"sm",onClick:()=>o("all"),children:"Sign out of all"})]}),n.sites.length?i.jsx("ul",{className:"divide-y rounded-md border",children:n.sites.map(d=>i.jsxs("li",{className:"flex items-center gap-3 px-3 py-2 text-sm",children:[i.jsx("span",{className:"font-medium",children:d.site}),i.jsxs("span",{className:"text-muted-foreground",children:[d.cookies," cookie",d.cookies===1?"":"s",d.origins?`, local storage on ${d.origins}`:"",d.expiresAt?`, until ${mn(d.expiresAt)}`:", session only"]}),i.jsxs(he,{variant:"ghost",size:"sm",className:"ml-auto",onClick:()=>o(d.site),children:[i.jsx(Dg,{className:"mr-1 h-4 w-4"}),"Sign out"]})]},d.site))}):i.jsx("p",{className:"text-sm text-muted-foreground",children:"None yet. Browser tasks start with a clean browser."}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"Signing out here removes the saved cookies from this machine. It doesn't end the session on the site itself; to be sure, sign out there or change the password."})]}),i.jsx(Gd,{open:a!==null,onClose:()=>o(null),title:a==="all"?"Sign out of all sites?":`Sign out of ${a}?`,description:"New browser tasks will start without these sign-ins.",confirmLabel:"Sign out",destructive:!0,onConfirm:()=>{const d=a;o(null),r.mutateAsync({path:d==="all"?"/api/browser/sites":`/api/browser/sites/${encodeURIComponent(d)}`,method:"DELETE"}).catch(u("Couldn't sign out"))}})]})}function Da({text:n,label:r="Copy"}){const[a,o]=k.useState(!1),u=async()=>{try{await navigator.clipboard.writeText(n),o(!0),setTimeout(()=>o(!1),1500)}catch{We({title:"Could not copy",description:"Select the text and copy it manually.",variant:"error"})}};return i.jsxs(he,{variant:"outline",size:"sm",onClick:u,children:[a?i.jsx(Mg,{}):i.jsx(_k,{}),a?"Copied":r]})}const yy=["tickets"],fS={queued:{label:"Queued",variant:"muted"},working:{label:"Working",variant:"info"},waiting:{label:"Waiting for a reply",variant:"warning"},in_review:{label:"PR in review",variant:"info"},done:{label:"Done",variant:"success"},released:{label:"Taken off",variant:"muted"},refused:{label:"Refused",variant:"destructive"}};function hS(){return Rt({queryKey:yy,queryFn:()=>Ee("/api/tickets"),refetchInterval:15e3})}function fl(){const n=St();return Ft({mutationFn:r=>Ee(r.path,{method:r.method??"POST",body:r.body}),onSuccess:r=>{r&&"items"in r&&n.setQueryData(yy,r)}})}const hs=n=>r=>We({title:n,description:wt(r),variant:"error"});function pS(){const n=hS(),r=fl();if(n.isLoading)return i.jsx(Ct,{});if(n.isError||!n.data)return i.jsx(Dt,{error:n.error,onRetry:()=>void n.refetch()});const a=n.data;return i.jsxs("div",{className:"space-y-4",children:[i.jsx(ys,{title:"Tickets",description:"People hand tickets to the agent in Linear (assign or @mention it) or GitHub (a label). It works them one at a time in its own worktree, opens a pull request, follows CI and reviews, and replies on the ticket. Only people on the access list can hand tickets over; the ticket's text is treated as data, not instructions.",actions:i.jsxs(he,{variant:"outline",size:"sm",disabled:r.isPending||!a.settings.enabled,onClick:()=>void r.mutateAsync({path:"/api/tickets/poll"}).then(o=>We({title:"Checked",description:`${o.handled} new event(s).`})).catch(hs("Couldn't check the trackers")),children:[i.jsx(y1,{className:"mr-1 h-4 w-4"}),"Check now"]})}),i.jsx(mS,{d:a}),i.jsx(gS,{d:a}),i.jsx(yS,{d:a}),i.jsx(vS,{d:a}),i.jsx(xS,{d:a})]})}function Do({label:n,help:r,checked:a,onChange:o}){return i.jsxs("div",{className:"flex items-center justify-between gap-4",children:[i.jsxs("div",{children:[i.jsx("p",{className:"font-medium",children:n}),i.jsx("p",{className:"text-sm text-muted-foreground",children:r})]}),i.jsx(ps,{checked:a,onCheckedChange:o,"aria-label":n})]})}function mS({d:n}){const r=fl(),a=n.settings,[o,u]=k.useState(String(a.atATime)),[d,h]=k.useState(a.budgetUsd===null?"":String(a.budgetUsd)),[p,g]=k.useState(a.dailyBudgetUsd===null?"":String(a.dailyBudgetUsd)),[m,y]=k.useState(a.statusOnPr??""),[w,x]=k.useState(a.slackChannel??""),b=(L,R)=>r.mutateAsync({path:"/api/tickets",method:"PUT",body:L}).then(()=>R&&We({title:R,variant:"success"})).catch(hs("Couldn't save"));return i.jsxs(Qe,{children:[i.jsxs(ct,{children:[i.jsx(dt,{children:"How it works on tickets"}),i.jsx(Ot,{children:"Off by default. Turn it on once a tracker is connected."})]}),i.jsxs(Ve,{className:"space-y-5",children:[i.jsx(Do,{label:"Work on handed-over tickets",help:"Off: tickets are ignored (nothing is read or posted).",checked:a.enabled,onChange:L=>void b({enabled:L})}),i.jsx(Do,{label:"Auto-merge pull requests",help:"Turns on GitHub auto-merge for a ticket's PR: it merges only when required checks and approvals pass. Off: people merge.",checked:a.autoMerge,onChange:L=>void b({autoMerge:L})}),i.jsx(Do,{label:"Move tickets to In Progress",help:"When work starts (Linear: the team's first started state).",checked:a.statusOnStart,onChange:L=>void b({statusOnStart:L})}),i.jsxs("div",{className:"grid gap-4 md:grid-cols-3",children:[i.jsx(Ye,{label:"Tickets at a time",help:"Pull requests in review don't count.",children:L=>i.jsx(Ae,{...L,type:"number",min:1,max:8,value:o,onChange:R=>u(R.target.value)})}),i.jsx(Ye,{label:"Budget per ticket (USD)",help:"All its turns together. Empty: unlimited.",children:L=>i.jsx(Ae,{...L,type:"number",min:.5,step:.5,value:d,placeholder:"Unlimited",onChange:R=>h(R.target.value)})}),i.jsx(Ye,{label:"Daily budget for tickets (USD)",help:"Tickets wait once it's spent. Empty: unlimited.",children:L=>i.jsx(Ae,{...L,type:"number",min:1,value:p,placeholder:"Unlimited",onChange:R=>g(R.target.value)})}),i.jsx(Ye,{label:"State when the PR opens",help:"By name, e.g. In Review (empty: don't move).",children:L=>i.jsx(Ae,{...L,value:m,onChange:R=>y(R.target.value),placeholder:"In Review"})}),i.jsx(Ye,{label:"Slack channel for ticket news",help:"Channel id (C…): pick-ups, PRs, merges. Empty: none.",children:L=>i.jsx(Ae,{...L,value:w,onChange:R=>x(R.target.value),placeholder:"C0123456789"})})]}),i.jsx(he,{disabled:r.isPending,onClick:()=>void b({atATime:Number(o),budgetUsd:d.trim()?Number(d):null,dailyBudgetUsd:p.trim()?Number(p):null,statusOnPr:m.trim(),slackChannel:w.trim()},"Saved"),children:"Save"})]})]})}function gS({d:n}){const r=fl(),a=n.linear,[o,u]=k.useState(a.clientId??""),[d,h]=k.useState(""),[p,g]=k.useState(a.teams.join(", "));return k.useEffect(()=>u(a.clientId??""),[a.clientId]),i.jsxs(Qe,{children:[i.jsxs(ct,{children:[i.jsx(dt,{children:"Linear"}),i.jsx(Ot,{children:"The agent is a Linear app (agents don't take a paid seat). People delegate an issue to it or @mention it; it reports in the issue's agent session. Create an OAuth app in Linear (Settings → API → OAuth applications), with this redirect URI, then connect it as an app."})]}),i.jsxs(Ve,{className:"space-y-4",children:[i.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-sm",children:[i.jsx("span",{className:"font-medium",children:"Workspace:"}),a.connected?i.jsxs(i.Fragment,{children:[i.jsx(it,{variant:"success",children:"Connected"}),i.jsx("code",{children:a.workspace}),i.jsx(he,{size:"sm",variant:"outline",onClick:()=>void r.mutateAsync({path:"/api/tickets/linear/connection",method:"DELETE"}).catch(hs("Couldn't disconnect")),children:"Disconnect"})]}):i.jsxs(i.Fragment,{children:[i.jsx(it,{variant:"muted",children:"Not connected"}),i.jsx(he,{size:"sm",disabled:!a.configured,onClick:()=>void Ee("/api/tickets/linear/connect",{method:"POST"}).then(m=>window.location.assign(m.url)).catch(hs("Couldn't start the Linear install")),children:"Connect Linear"}),!a.configured&&i.jsx("span",{className:"text-muted-foreground",children:"Save the client below first."})]})]}),i.jsxs("div",{className:"space-y-1.5 text-sm",children:[i.jsx("p",{className:"font-medium",children:"Callback URL (add it to the Linear OAuth app)"}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("code",{className:"break-all rounded bg-muted px-2 py-1",children:a.redirectUri}),i.jsx(Da,{text:a.redirectUri})]})]}),i.jsxs("div",{className:"grid gap-4 md:grid-cols-3",children:[i.jsx(Ye,{label:"Client ID",children:m=>i.jsx(Ae,{...m,value:o,onChange:y=>u(y.target.value)})}),i.jsx(Ye,{label:"Client secret",help:a.hasSecret?"Saved. Enter a new one only to replace it.":void 0,children:m=>i.jsx(Ae,{...m,type:"password",autoComplete:"off",value:d,onChange:y=>h(y.target.value),placeholder:a.hasSecret?"••••••••":""})}),i.jsx(Ye,{label:"Teams",help:"Team keys, comma separated (empty: every team it can see).",children:m=>i.jsx(Ae,{...m,value:p,onChange:y=>g(y.target.value),placeholder:"ENG, OPS"})})]}),i.jsx(he,{disabled:r.isPending,onClick:()=>void r.mutateAsync({path:"/api/tickets",method:"PUT",body:{linearClientId:o.trim(),...d.trim()?{linearClientSecret:d.trim()}:{},linearTeams:p.split(",").map(m=>m.trim()).filter(Boolean)}}).then(()=>{h(""),We({title:"Linear saved",variant:"success"})}).catch(hs("Couldn't save Linear")),children:"Save"})]})]})}function yS({d:n}){const r=fl(),[a,o]=k.useState(n.github.repos.join(", ")),[u,d]=k.useState(n.github.label),[h,p]=k.useState(n.github.people.join(", "));return i.jsxs(Qe,{children:[i.jsxs(ct,{children:[i.jsx(dt,{children:"GitHub Issues"}),i.jsx(Ot,{children:"GitHub doesn't let apps be assignees, so an issue is handed over with a label. Whoever adds it must be listed under People and have write access. Uses this machine's GitHub login (the same as pull requests); replies are comments."})]}),i.jsxs(Ve,{className:"space-y-4",children:[i.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[i.jsx(Ye,{label:"Repositories",help:"owner/name, comma separated.",children:g=>i.jsx(Ae,{...g,value:a,onChange:m=>o(m.target.value),placeholder:"acme/web, acme/api"})}),i.jsx(Ye,{label:"Label",children:g=>i.jsx(Ae,{...g,value:u,onChange:m=>d(m.target.value)})}),i.jsx(Ye,{label:"People",help:"GitHub logins allowed to hand issues over and talk to the agent (they also need write access). Comma separated.",children:g=>i.jsx(Ae,{...g,value:h,onChange:m=>p(m.target.value),placeholder:"ana, bo"})})]}),i.jsx(he,{disabled:r.isPending,onClick:()=>void r.mutateAsync({path:"/api/tickets",method:"PUT",body:{githubPeople:h.split(",").map(g=>g.trim()).filter(Boolean),githubRepos:a.split(",").map(g=>g.trim()).filter(Boolean),githubLabel:u.trim()}}).then(()=>We({title:"GitHub saved",variant:"success"})).catch(hs("Couldn't save GitHub")),children:"Save"})]})]})}function vS({d:n}){const r=fl(),[a,o]=k.useState(""),[u,d]=k.useState(null),h=n.bridge,p=(g,m=!1)=>Ee(`/api/tickets/bridge/${g}`,{method:"POST",body:{rotate:m}}).then(y=>{y.secret&&d(y.secret),r.mutateAsync({path:"/api/tickets",method:"PUT",body:{}}),We({title:"Webhook URL ready",variant:"success"})}).catch(hs("Couldn't set up the webhook"));return i.jsxs(Qe,{children:[i.jsxs(ct,{children:[i.jsx(dt,{children:"Instant updates (optional)"}),i.jsx(Ot,{children:"Without this, the agent checks Linear every 15 seconds and GitHub every minute. With it, the tracker's webhook goes to SuperClawd's bridge (this machine stays unreachable from the internet), which wakes the agent right away. No ticket data is stored there."})]}),i.jsxs(Ve,{className:"space-y-5",children:[i.jsx(Do,{label:"Use the webhook bridge",help:"Polling keeps running either way (a missed webhook only delays).",checked:h.enabled,onChange:g=>void r.mutateAsync({path:"/api/tickets",method:"PUT",body:{bridge:g}}).catch(hs("Couldn't change it"))}),i.jsxs("div",{className:"space-y-2 text-sm",children:[i.jsx("p",{className:"font-medium",children:"Linear"}),i.jsx("p",{className:"text-muted-foreground",children:"In the Linear OAuth app: enable Webhooks, select Agent session events and Inbox notifications, paste the URL below, and copy Linear's signing secret here."}),i.jsxs("div",{className:"flex flex-wrap items-end gap-2",children:[i.jsx("div",{className:"min-w-64 flex-1",children:i.jsx(Ye,{label:"Linear webhook signing secret",help:h.linear.hasSecret?"Saved.":void 0,children:g=>i.jsx(Ae,{...g,type:"password",autoComplete:"off",value:a,onChange:m=>o(m.target.value),placeholder:h.linear.hasSecret?"••••••••":"lin_wh_…"})})}),i.jsx(he,{variant:"outline",disabled:!a.trim()&&!h.linear.hasSecret,onClick:()=>void(a.trim()?r.mutateAsync({path:"/api/tickets",method:"PUT",body:{linearWebhookSecret:a.trim()}}):Promise.resolve()).then(()=>(o(""),p("linear"))),children:"Get the webhook URL"})]}),h.linear.url&&i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("code",{className:"break-all rounded bg-muted px-2 py-1",children:h.linear.url}),i.jsx(Da,{text:h.linear.url})]})]}),i.jsxs("div",{className:"space-y-2 text-sm",children:[i.jsx("p",{className:"font-medium",children:"GitHub"}),i.jsx("p",{className:"text-muted-foreground",children:"In each repository: Settings → Webhooks → Add webhook. Payload URL and secret below, content type application/json, events: Issues and Issue comments."}),i.jsx(he,{variant:"outline",onClick:()=>void p("github",h.github.hasSecret),children:h.github.url?"New secret + URL":"Get the webhook URL and secret"}),h.github.url&&i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("code",{className:"break-all rounded bg-muted px-2 py-1",children:h.github.url}),i.jsx(Da,{text:h.github.url})]}),u&&i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{children:"Secret (shown once):"}),i.jsx("code",{className:"break-all rounded bg-muted px-2 py-1",children:u}),i.jsx(Da,{text:u})]})]})]})]})}function xS({d:n}){return i.jsxs(Qe,{children:[i.jsx(ct,{children:i.jsx(dt,{children:"Recent tickets"})}),i.jsx(Ve,{children:n.items.length?i.jsx("ul",{className:"divide-y rounded-md border",children:n.items.map(r=>{const a=fS[r.state]??{label:r.state,variant:"muted"};return i.jsxs("li",{className:"flex flex-wrap items-center gap-3 px-3 py-2 text-sm",children:[r.url?i.jsx("a",{href:r.url,target:"_blank",rel:"noreferrer noopener",className:"font-medium text-info underline",children:r.key}):i.jsx("span",{className:"font-medium",children:r.key}),i.jsx("span",{className:"min-w-0 flex-1 truncate",children:r.title}),i.jsx(it,{variant:a.variant,children:a.label}),r.statusNote&&i.jsx("span",{className:"text-xs text-muted-foreground",children:r.statusNote}),r.prUrl&&i.jsx("a",{href:r.prUrl,target:"_blank",rel:"noreferrer noopener",className:"text-xs text-info underline",children:"PR"}),i.jsx("span",{className:"text-xs text-muted-foreground",children:cl(r.costUsd)}),r.requestId&&i.jsx(Qt,{to:`/requests/${r.requestId}`,className:"text-xs text-info underline",children:"Request"}),i.jsxs("span",{className:"text-xs text-muted-foreground",children:[r.delegator?`${r.delegator} · `:"",Yt(r.updatedAt)]})]},r.id)})}):i.jsx(rn,{children:"No tickets yet."})})]})}function wS(){const[n,r]=k.useState(null),a=k.useRef(!1);return k.useEffect(()=>{if(a.current)return;a.current=!0;const o=new URLSearchParams(window.location.search),u=o.get("code"),d=o.get("state");if(window.history.replaceState(null,"","/trackers/linear/callback"),o.get("error")||!u||!d){r({ok:!1,message:o.get("error")==="access_denied"?"The install was cancelled.":"Linear didn't complete the install."});return}Ee("/api/tickets/linear/exchange",{method:"POST",body:{code:u,state:d}}).then(h=>r({ok:!0,workspace:h.linear.workspace})).catch(h=>r({ok:!1,message:wt(h)}))},[]),i.jsx("div",{className:"mx-auto max-w-lg p-6",children:i.jsx(Qe,{children:i.jsxs(Ve,{className:"space-y-3 pt-6 text-sm",children:[n?n.ok?i.jsxs("p",{children:["Linear is connected",n.workspace?i.jsxs(i.Fragment,{children:[" ","to ",i.jsx("code",{children:n.workspace})]}):null,"."]}):i.jsx("p",{className:"text-destructive",children:n.message}):i.jsx(Ct,{label:"Connecting Linear"}),i.jsx(Qt,{to:"/tickets",className:"text-info underline",children:"Back to Tickets"})]})})})}const kS=[{to:"agent",label:"Agent"},{to:"anthropic",label:"Anthropic"},{to:"general",label:"General"},{to:"slack",label:"Slack"},{to:"access",label:"Access"},{to:"calendar",label:"Calendar"},{to:"account",label:"Account"}];function bS(){return i.jsxs("div",{children:[i.jsx(ys,{title:"Settings",description:"Configure this FDA machine."}),i.jsxs("div",{className:"flex flex-col gap-6 md:flex-row",children:[i.jsx("nav",{"aria-label":"Settings",className:"flex shrink-0 gap-1 overflow-x-auto md:w-44 md:flex-col",children:kS.map(n=>i.jsx($d,{to:n.to,className:({isActive:r})=>Je("rounded-md px-3 py-2 text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",r?"bg-accent font-medium":"text-muted-foreground hover:bg-accent/60 hover:text-foreground"),children:n.label},n.to))}),i.jsx("div",{className:"min-w-0 flex-1",children:i.jsx(Id,{})})]})]})}function jS(){var h,p,g;const n=Gb(),r=Yb(),[a,o]=k.useState(null),u=((p=(h=n.data)==null?void 0:h.selected)==null?void 0:p.id)??null,d=a??u;return i.jsxs(Qe,{children:[i.jsxs(ct,{children:[i.jsx(dt,{children:"Primary agent"}),i.jsx(Ot,{children:"The SuperClawd agent FDA runs as. It brings its skills, guardrails and memories from your workspace."})]}),i.jsxs(Ve,{className:"space-y-4",children:[((g=n.data)==null?void 0:g.selected)&&i.jsxs("p",{className:"text-sm",children:["Current:"," ",i.jsx("span",{className:"font-medium",children:n.data.selected.name})]}),n.isLoading?i.jsx(Ct,{}):n.isError||!n.data?i.jsx(Dt,{error:n.error,onRetry:()=>void n.refetch()}):i.jsxs(i.Fragment,{children:[n.data.error&&i.jsx(Dt,{error:new Error(`Could not load agents from SuperClawd: ${n.data.error}`),onRetry:()=>void n.refetch()}),n.data.items.length===0&&!n.data.error?i.jsx(rn,{children:"No enabled Primary agents in this workspace. Create one in the SuperClawd app, then come back."}):i.jsx("div",{role:"radiogroup","aria-label":"Primary agent",className:"space-y-2",children:n.data.items.map(m=>{const y=d===m.id;return i.jsxs("button",{type:"button",role:"radio","aria-checked":y,onClick:()=>o(m.id),className:Je("flex w-full items-start gap-3 rounded-md border p-3 text-left transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",y?"border-primary bg-accent":"hover:bg-accent/50"),children:[i.jsx("span",{className:Je("mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded-full border",y&&"border-primary bg-primary text-primary-foreground"),children:y&&i.jsx(Mg,{className:"h-3 w-3","aria-hidden":!0})}),i.jsxs("span",{className:"min-w-0 flex-1",children:[i.jsxs("span",{className:"flex flex-wrap items-center gap-2",children:[i.jsx("span",{className:"font-medium",children:m.name}),i.jsx("code",{className:"text-xs text-muted-foreground",children:m.slug}),m.model&&i.jsx(it,{variant:"outline",children:SS(m.model)}),m.id===u&&i.jsx(it,{variant:"success",children:"Current"})]}),m.description&&i.jsx("span",{className:"mt-1 block text-sm text-muted-foreground",children:m.description})]})]},m.id)})}),i.jsx(he,{disabled:!d||d===u||r.isPending,onClick:()=>d&&r.mutate(d,{onSuccess:()=>{o(null),We({title:"Agent saved",variant:"success"})}}),children:r.isPending?"Saving":"Save"})]})]})]})}function SS(n){if(n==="default")return"Session model";const r=/^claude-(opus|fable|sonnet|haiku)-latest$/.exec(n);return r?`Claude ${r[1][0].toUpperCase()}${r[1].slice(1)} (latest)`:n}function bd({label:n,value:r}){return i.jsxs("div",{className:"flex items-center justify-between gap-4 rounded-md border px-3 py-2 text-sm",children:[i.jsx("span",{className:"text-muted-foreground",children:n}),r?i.jsx("code",{className:"text-xs",children:r}):i.jsx(it,{variant:"warning",children:"Not set"})]})}function vy({result:n,error:r}){if(r)return i.jsxs("span",{role:"status",className:"flex items-center gap-1.5 text-sm text-red-300",children:[i.jsx(md,{className:"h-4 w-4","aria-hidden":!0}),wt(r)]});if(!n)return null;const a=[n.botName&&`bot ${n.botName}`,n.teamId&&`team ${n.teamId}`].filter(Boolean).join(", "),o=n.message??(n.ok?"Works.":"Failed.");return i.jsxs("span",{role:"status",className:`flex items-center gap-1.5 text-sm ${n.ok?"text-green-300":"text-red-300"}`,children:[n.ok?i.jsx(Tk,{className:"h-4 w-4","aria-hidden":!0}):i.jsx(md,{className:"h-4 w-4","aria-hidden":!0}),o,a&&i.jsxs("span",{className:"text-muted-foreground",children:["(",a,")"]})]})}function CS(){const n=Xo(),r=Xb(),a=Jb(),[o,u]=k.useState("");if(n.isLoading)return i.jsx(Ct,{});if(n.isError||!n.data)return i.jsx(Dt,{error:n.error,onRetry:()=>void n.refetch()});const d=h=>{h.preventDefault(),r.mutate(o.trim(),{onSuccess:()=>{u(""),a.reset(),We({title:"API key saved",variant:"success"})}})};return i.jsxs(Qe,{children:[i.jsxs(ct,{children:[i.jsx(dt,{children:"Anthropic API key"}),i.jsx(Ot,{children:"FDA runs Claude Code with this key. It is stored encrypted on this machine and never shown again."})]}),i.jsxs(Ve,{className:"space-y-5",children:[i.jsx(bd,{label:"Current key",value:n.data.secrets.anthropicApiKey}),i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx(he,{variant:"outline",disabled:a.isPending||!n.data.secrets.anthropicApiKey,onClick:()=>a.mutate(),children:a.isPending?"Testing":"Test key"}),i.jsx(vy,{result:a.data,error:a.error})]}),i.jsxs("form",{onSubmit:d,className:"max-w-md space-y-3",autoComplete:"off",children:[i.jsx(Ye,{label:n.data.secrets.anthropicApiKey?"Replace key":"Set key",help:"Starts with sk-ant-.",error:r.error?wt(r.error):null,children:h=>i.jsx(Ae,{...h,type:"password",autoComplete:"off",spellCheck:!1,value:o,onChange:p=>u(p.target.value),placeholder:"sk-ant-..."})}),i.jsx(he,{type:"submit",disabled:!o.trim()||r.isPending,children:r.isPending?"Saving":"Save key"})]})]})]})}function NS({open:n,initialPath:r,onClose:a,onSelect:o}){return i.jsx(Kd,{open:n,onClose:a,title:"Choose a folder",description:"Folders under your home directory. Repositories are marked.",className:"max-w-xl",children:n&&i.jsx(ES,{initialPath:r??"",onSelect:o,onCancel:a})})}function ES({initialPath:n,onSelect:r,onCancel:a}){var p,g,m,y;const[o,u]=k.useState(n),d=lj(o),h=((p=d.data)==null?void 0:p.path)??o;return i.jsxs("div",{className:"space-y-3",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(he,{variant:"outline",size:"icon","aria-label":"Parent folder",disabled:!((g=d.data)!=null&&g.parent),onClick:()=>{var w;return((w=d.data)==null?void 0:w.parent)&&u(d.data.parent)},children:i.jsx(wk,{})}),i.jsx("code",{className:"min-w-0 flex-1 truncate rounded bg-muted px-2 py-1.5 text-xs",title:h,children:h||"Home"})]}),d.isLoading?i.jsx(Ct,{}):d.isError?i.jsx(Dt,{error:d.error,onRetry:()=>u(n===o?"":n)}):i.jsxs("ul",{className:Je("max-h-72 overflow-y-auto rounded-md border",d.isFetching&&"opacity-60"),"aria-label":"Folders",children:[((m=d.data)==null?void 0:m.dirs.length)===0&&i.jsx("li",{className:"p-3 text-sm text-muted-foreground",children:"No folders here."}),(y=d.data)==null?void 0:y.dirs.map(w=>i.jsx("li",{children:i.jsxs("button",{type:"button",onClick:()=>u(w.path),className:"flex w-full items-center gap-2 border-b px-3 py-2 text-left text-sm last:border-b-0 hover:bg-accent focus-visible:bg-accent focus-visible:outline-none",children:[w.isRepo?i.jsx(Qk,{className:"h-4 w-4 text-success","aria-hidden":!0}):i.jsx(Bk,{className:"h-4 w-4 text-muted-foreground","aria-hidden":!0}),i.jsx("span",{className:"truncate",children:w.name}),w.isRepo&&i.jsx("span",{className:"ml-auto text-xs text-muted-foreground",children:"repository"})]})},w.path))]}),i.jsxs("div",{className:"flex justify-end gap-2 pt-1",children:[i.jsx(he,{variant:"outline",onClick:a,children:"Cancel"}),i.jsx(he,{disabled:!d.data,onClick:()=>d.data&&r(d.data.path),children:"Use this folder"})]})]})}const jd=[{title:"Workspace",description:"Where FDA works on this machine and who people should contact.",fields:[{key:"workdir",label:"Work directory",help:"Repositories FDA works on live here. Must be inside your home directory.",kind:"folder"},{key:"operatorContact",label:"Operator contact",help:"Shown to Slack users when FDA cannot help, for example a Slack handle or email.",kind:"text",nullable:!0,placeholder:"@alex"}]},{title:"Agent behavior",description:"How the coding agent runs each turn.",fields:[{key:"effort",label:"Reasoning effort",help:"Higher effort is slower and costs more.",kind:"select",nullable:!0,options:[{value:"",label:"Default"},{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"},{value:"xhigh",label:"Extra high"},{value:"max",label:"Max"}]},{key:"permissionMode",label:"Permission mode",help:"Bypass lets the agent run any tool without asking. Auto applies Claude Code's automatic permission checks.",kind:"select",options:[{value:"bypass",label:"Bypass"},{value:"auto",label:"Auto"}]},{key:"planPolicy",label:"Plan first",help:"Whether the agent proposes a plan for approval in Slack before making changes.",kind:"select",options:[{value:"auto",label:"When the task needs it"},{value:"always",label:"Always"},{value:"never",label:"Never"}]},{key:"browserEnabled",label:"Browser",help:"Let the agent use a headless browser for checks and screenshots.",kind:"bool"},{key:"superclawdMemory",label:"SuperClawd memory",help:"Team, repo, agent and private memories from SuperClawd. Off: none is loaded or captured, and the agent uses Claude Code's own memory instead (kept per repository on this machine).",kind:"bool"},{key:"captureMemories",label:"Capture memories",help:"Save learnings to your SuperClawd workspace memories after turns.",kind:"bool"},{key:"allowClaudeaiConnectors",label:"Claude.ai connectors",help:"Allow MCP connectors configured in the Claude.ai account.",kind:"bool"}]},{title:"Turn limits",description:"Guards against runaway turns.",fields:[{key:"debounceMs",label:"Message debounce (ms)",help:"Wait this long after the last Slack message before starting a turn, so quick follow-ups are batched.",kind:"number",min:0,step:100,integer:!0},{key:"turnTimeoutMin",label:"Turn timeout (minutes)",help:"Stop a turn that runs longer than this.",kind:"number",min:1,integer:!0},{key:"turnMaxBudgetUsd",label:"Max cost per turn (USD)",help:"Leave empty for no limit.",kind:"number",nullable:!0,min:0,step:.5},{key:"turnMaxTurns",label:"Max agent steps per turn",help:"Leave empty for no limit.",kind:"number",nullable:!0,min:1,integer:!0}]},{title:"Pull requests",description:"After FDA opens a pull request it keeps an eye on it (through the machine's gh login) and works on it again in the same thread.",fields:[{key:"prMonitorEnabled",label:"Follow pull requests",help:"Check the pull requests FDA opened. Say `stop following` in a thread to stop for that request.",kind:"bool"},{key:"prMonitorFixCi",label:"Fix failing CI",help:"Once per failing commit, up to the attempt limit below.",kind:"bool"},{key:"prMonitorReviews",label:"Address review feedback",help:"Only from people with write access to the repository; other comments are ignored.",kind:"bool"},{key:"prMonitorConflicts",label:"Resolve merge conflicts",help:"Merges the base branch into the pull request branch.",kind:"bool"},{key:"prMonitorIntervalSec",label:"Check every (seconds)",help:"Checks slow down when nothing is happening.",kind:"number",min:30,integer:!0},{key:"prMonitorQuietSec",label:"Wait after the last comment (seconds)",help:"Lets a reviewer finish before FDA starts.",kind:"number",min:0,integer:!0},{key:"prMonitorMaxCiAttempts",label:"CI fix attempts",help:"Then FDA leaves it for a human and says so in the thread.",kind:"number",min:1,integer:!0},{key:"prMonitorMaxPerDay",label:"Follow-ups per pull request per day",help:"A safety cap on automatic work.",kind:"number",min:1,integer:!0},{key:"prMonitorMaxAgeDays",label:"Stop after idle (days)",help:"Stop following a pull request with no activity for this long.",kind:"number",min:1,integer:!0}]},{title:"Slack context",description:"What FDA reads from the thread.",fields:[{key:"threadContextMessages",label:"Earlier thread messages",help:"How many earlier messages in the thread to include as context.",kind:"number",min:0,integer:!0},{key:"includeUnlistedContext",label:"Include messages from people not on the allowlist",help:"They are passed as untrusted context only, never as instructions.",kind:"bool"},{key:"stopButton",label:"Stop button",help:"Show a Stop button on the agent's live line while it works (same as typing `stop`; only the requester or allowed people can use it).",kind:"bool"},{key:"allowDirectMessages",label:"Direct messages",help:"People on the allowlist can DM the agent; each DM is a private request (the team doesn't see it). Turn off to accept requests only in channels.",kind:"bool"}]},{title:"Sessions and cleanup",description:"Housekeeping on this machine.",fields:[{key:"sessionMaxAgeH",label:"Session max age (hours)",help:"Start a fresh agent session for a thread after this long.",kind:"number",min:1,integer:!0},{key:"worktreeRetentionDays",label:"Keep worktrees (days)",help:"Delete finished request worktrees after this many days.",kind:"number",min:0,integer:!0},{key:"diskMinFreeGb",label:"Minimum free disk (GB)",help:"Pause new work when free disk drops below this.",kind:"number",min:0,step:.5},{key:"autoRequeueOnRestart",label:"Requeue after restart",help:"Requeue requests that were running when the daemon stopped.",kind:"bool"}]},{title:"Admin panel",description:"How this panel is reached.",fields:[{key:"adminPublicUrl",label:"Admin URL",help:"The address you use to open this panel. Used in Slack links.",kind:"text",nullable:!0,placeholder:"https://fda.example.ts.net"},{key:"publicHostname",label:"Public hostname",help:"Extra hostname this panel accepts, for example a Tailscale name.",kind:"text",nullable:!0,placeholder:"fda.example.ts.net"}]},{title:"Privacy",description:"What is shared with SuperClawd.",fields:[{key:"shareTitleWithCloud",label:"Share request titles",help:"Send request titles to SuperClawd for usage reporting. Off sends counts only.",kind:"bool"}]}];function Tm(n){const r={};for(const a of jd)for(const o of a.fields){const u=n[o.key];r[o.key]=typeof u=="boolean"?u:u===null?"":String(u)}return r}function RS(n,r){if(n.kind==="bool")return{value:r};const a=String(r).trim();if(n.kind==="number"){if(a==="")return n.nullable?{value:null}:{error:"Required."};const o=Number(a);return Number.isFinite(o)?n.integer&&!Number.isInteger(o)?{error:"Enter a whole number."}:n.min!==void 0&&o<n.min?{error:`Must be at least ${n.min}.`}:{value:o}:{error:"Enter a number."}}return a===""?"nullable"in n&&n.nullable?{value:null}:n.kind==="folder"?{value:null}:{error:"Required."}:{value:a}}function PS(){const n=Xo();return n.isLoading?i.jsx(Ct,{}):n.isError||!n.data?i.jsx(Dt,{error:n.error,onRetry:()=>void n.refetch()}):i.jsx(TS,{settings:n.data.settings})}function TS({settings:n}){const[r]=k.useState(()=>Tm(n)),[a,o]=k.useState(r),[u,d]=k.useState(r),[h,p]=k.useState({}),[g,m]=k.useState(!1),y=Vd(),w=Object.keys(a).filter(R=>a[R]!==u[R]),x=(R,N)=>{o(T=>({...T,[R]:N})),p(T=>({...T,[R]:void 0}))},b=R=>{R.preventDefault();const N={},T={};for(const z of jd)for(const $ of z.fields){if(!w.includes($.key))continue;const Q=RS($,a[$.key]);Q.error?T[$.key]=Q.error:N[$.key]=Q.value}p(T),!Object.keys(T).length&&y.mutate(N,{onSuccess:({settings:z})=>{const $=Tm(z);o($),d($),We({title:"Settings saved",variant:"success"})},onError:z=>{z instanceof Vn&&z.field&&p({[z.field]:z.message})}})},L=y.error instanceof Vn&&y.error.field?null:y.error?wt(y.error):null;return i.jsxs("form",{onSubmit:b,className:"space-y-6",noValidate:!0,children:[jd.map(R=>i.jsxs(Qe,{children:[i.jsxs(ct,{children:[i.jsx(dt,{children:R.title}),i.jsx(Ot,{children:R.description})]}),i.jsx(Ve,{className:"grid gap-5 sm:grid-cols-2",children:R.fields.map(N=>i.jsx("div",{className:N.kind==="folder"||N.kind==="bool"?"sm:col-span-2":void 0,children:i.jsx(Ye,{label:N.label,help:N.help,error:h[N.key],children:T=>{const z=a[N.key];switch(N.kind){case"bool":return i.jsx(ps,{...T,checked:z,onCheckedChange:$=>x(N.key,$)});case"select":return i.jsx(eu,{...T,value:z,onChange:$=>x(N.key,$.target.value),children:N.options.map($=>i.jsx("option",{value:$.value,children:$.label},$.value))});case"number":return i.jsx(Ae,{...T,type:"number",inputMode:"decimal",min:N.min,step:N.step??1,value:z,onChange:$=>x(N.key,$.target.value)});case"folder":return i.jsxs("div",{className:"flex gap-2",children:[i.jsx(Ae,{...T,value:z,onChange:$=>x(N.key,$.target.value),placeholder:"/home/you/work",spellCheck:!1}),i.jsxs(he,{variant:"outline",onClick:()=>m(!0),children:[i.jsx($k,{}),"Browse"]})]});default:return i.jsx(Ae,{...T,value:z,onChange:$=>x(N.key,$.target.value),placeholder:N.placeholder,spellCheck:!1})}}})},N.key))})]},R.title)),i.jsxs("div",{className:"sticky bottom-0 flex items-center gap-3 border-t bg-background/95 py-4 backdrop-blur",children:[i.jsx(he,{type:"submit",disabled:w.length===0||y.isPending,children:y.isPending?"Saving":"Save changes"}),i.jsx(he,{variant:"ghost",disabled:w.length===0,onClick:()=>{o(u),p({})},children:"Discard"}),w.length>0&&i.jsx("span",{className:"text-sm text-muted-foreground",children:w.length===1?"1 unsaved change":`${w.length} unsaved changes`}),i.jsx(Go,{message:L})]}),i.jsx(NS,{open:g,initialPath:a.workdir||null,onClose:()=>m(!1),onSelect:R=>{x("workdir",R),m(!1)}})]})}function LS(){const n=Xo();if(n.isLoading)return i.jsx(Ct,{});if(n.isError||!n.data)return i.jsx(Dt,{error:n.error,onRetry:()=>void n.refetch()});const{secrets:r,settings:a}=n.data;return i.jsxs("div",{className:"space-y-6",children:[i.jsx(MS,{botToken:r.slackBotToken,appToken:r.slackAppToken,botUserId:a.slackBotUserId,teamId:a.slackTeamId}),i.jsx(_S,{defaultName:a.slackBotName??"FDA"})]})}function MS({botToken:n,appToken:r,botUserId:a,teamId:o}){const u=Zb(),d=ej(),[h,p]=k.useState(""),[g,m]=k.useState(""),y=w=>{w.preventDefault();const x={};h.trim()&&(x.botToken=h.trim()),g.trim()&&(x.appToken=g.trim()),u.mutate(x,{onSuccess:()=>{p(""),m(""),d.reset(),We({title:"Slack tokens saved. Reconnecting.",variant:"success"})}})};return i.jsxs(Qe,{children:[i.jsxs(ct,{children:[i.jsx(dt,{children:"Slack connection"}),i.jsx(Ot,{children:"FDA connects to Slack over Socket Mode with a bot token and an app-level token."})]}),i.jsxs(Ve,{className:"space-y-5",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(bd,{label:"Bot token",value:n}),i.jsx(bd,{label:"App token",value:r}),(a||o)&&i.jsxs("p",{className:"text-xs text-muted-foreground",children:[a&&i.jsxs(i.Fragment,{children:["Bot user ",a,". "]}),o&&i.jsxs(i.Fragment,{children:["Team ",o,"."]})]})]}),i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx(he,{variant:"outline",disabled:d.isPending||!n,onClick:()=>d.mutate(),children:d.isPending?"Testing":"Test connection"}),i.jsx(vy,{result:d.data,error:d.error})]}),i.jsxs("form",{onSubmit:y,className:"max-w-md space-y-4",autoComplete:"off",children:[i.jsx(Ye,{label:"New bot token",help:"Starts with xoxb-. Leave empty to keep the current one.",children:w=>i.jsx(Ae,{...w,type:"password",autoComplete:"off",spellCheck:!1,value:h,onChange:x=>p(x.target.value),placeholder:"xoxb-..."})}),i.jsx(Ye,{label:"New app token",help:"Starts with xapp-. Needs the connections:write scope.",children:w=>i.jsx(Ae,{...w,type:"password",autoComplete:"off",spellCheck:!1,value:g,onChange:x=>m(x.target.value),placeholder:"xapp-..."})}),i.jsx(Go,{message:u.error?wt(u.error):null}),i.jsx(he,{type:"submit",disabled:!h.trim()&&!g.trim()||u.isPending,children:u.isPending?"Saving":"Save tokens"})]})]})]})}function _S({defaultName:n}){const[r,a]=k.useState(n),[o,u]=k.useState(n);k.useEffect(()=>{const p=setTimeout(()=>u(r.trim()||n),300);return()=>clearTimeout(p)},[r,n]);const d=tj(o),h=d.data?JSON.stringify(d.data.manifest,null,2):"";return i.jsxs(Qe,{children:[i.jsxs(ct,{children:[i.jsx(dt,{children:"Slack app manifest"}),i.jsx(Ot,{children:"Create the Slack app from this manifest at api.slack.com/apps, then install it and paste the tokens above."})]}),i.jsxs(Ve,{className:"space-y-4",children:[i.jsx("div",{className:"max-w-xs",children:i.jsx(Ye,{label:"Bot name",help:"The name people mention in Slack.",children:p=>i.jsx(Ae,{...p,value:r,onChange:g=>a(g.target.value),maxLength:35})})}),d.isLoading?i.jsx(Ct,{}):d.isError?i.jsx(Dt,{error:d.error,onRetry:()=>void d.refetch()}):i.jsxs("div",{className:"space-y-2",children:[i.jsx("div",{className:"flex justify-end",children:i.jsx(Da,{text:h,label:"Copy manifest"})}),i.jsx("pre",{className:"max-h-96 overflow-auto rounded-md border bg-muted/40 p-3 font-mono text-xs","aria-label":"Manifest JSON",tabIndex:0,children:h})]})]})]})}const Sd={channel:"Channel",user:"User",usergroup:"User group"},AS={channel:Yk,user:I1,usergroup:U1},Oo=(n,r)=>n.kind===r.kind&&n.slackId===r.slackId;function DS(){var u,d,h,p,g;const n=nj(),r=Xo();if(n.isLoading||r.isLoading)return i.jsx(Ct,{});if(n.isError||!n.data)return i.jsx(Dt,{error:n.error,onRetry:()=>void n.refetch()});const a=!!((u=r.data)!=null&&u.settings.allowAnyChannel),o=!!((d=r.data)!=null&&d.settings.allowAnyone);return i.jsxs("div",{className:"space-y-6",children:[i.jsx(FS,{anyChannel:a,anyone:o}),i.jsx(OS,{targets:((h=r.data)==null?void 0:h.settings.handoffTargets)??[],sources:((p=r.data)==null?void 0:p.settings.handoffSources)??[],budget:((g=r.data)==null?void 0:g.settings.handoffMaxBudgetUsd)??5}),i.jsx(IS,{initial:n.data,anyChannel:a,anyone:o})]})}function OS({targets:n,sources:r,budget:a}){const o=Vd(),[u,d]=k.useState({botUserId:"",name:"",role:""}),[h,p]=k.useState(""),[g,m]=k.useState(String(a));k.useEffect(()=>m(String(a)),[a]);const y=(x,b)=>o.mutate(x,{onSuccess:()=>We({title:b,variant:"success"}),onError:L=>We({title:"Couldn't save",description:wt(L),variant:"error"})}),w=x=>/^[UW][A-Z0-9]{5,}$/.test(x.trim());return i.jsxs(Qe,{children:[i.jsxs(ct,{children:[i.jsx(dt,{children:"Agent hand-offs"}),i.jsx(Ot,{children:"Optional. Let this agent hand part of a request to another agent (for example a product manager agent tasking a developer agent). The person who asked approves each hand-off with ✅ in the thread, and the receiving agent must list this one below too. A hand-off can't be passed on again."})]}),i.jsxs(Ve,{className:"space-y-6",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx("p",{className:"text-sm font-medium",children:"Agents this agent can hand work to"}),n.length===0?i.jsx("p",{className:"text-xs text-muted-foreground",children:"None (hand-offs off)."}):i.jsx("ul",{className:"divide-y rounded-md border",children:n.map(x=>i.jsxs("li",{className:"flex items-center gap-3 p-3 text-sm",children:[i.jsx("span",{className:"font-medium",children:x.name}),i.jsx("code",{className:"text-xs text-muted-foreground",children:x.botUserId}),i.jsx("span",{className:"flex-1 truncate text-muted-foreground",children:x.role}),i.jsx(he,{variant:"ghost",size:"icon",className:"h-8 w-8","aria-label":`Remove ${x.name}`,onClick:()=>y({handoffTargets:n.filter(b=>b.botUserId!==x.botUserId)},"Removed"),children:i.jsx(qo,{})})]},x.botUserId))}),i.jsxs("div",{className:"grid gap-2 sm:grid-cols-[1fr_1fr_2fr_auto]",children:[i.jsx(Ae,{placeholder:"Slack bot user id (U…)","aria-label":"Bot user id",value:u.botUserId,onChange:x=>d({...u,botUserId:x.target.value.trim()})}),i.jsx(Ae,{placeholder:"Name (e.g. John)","aria-label":"Name",value:u.name,onChange:x=>d({...u,name:x.target.value})}),i.jsx(Ae,{placeholder:"Role (e.g. backend developer)","aria-label":"Role",value:u.role,onChange:x=>d({...u,role:x.target.value})}),i.jsxs(he,{disabled:!w(u.botUserId)||!u.name.trim()||o.isPending,onClick:()=>{y({handoffTargets:[...n.filter(x=>x.botUserId!==u.botUserId),{botUserId:u.botUserId,name:u.name.trim(),role:u.role.trim()}]},"Added"),d({botUserId:"",name:"",role:""})},children:[i.jsx(gd,{})," Add"]})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx("p",{className:"text-sm font-medium",children:"Agents allowed to hand work to this agent"}),r.length===0?i.jsx("p",{className:"text-xs text-muted-foreground",children:"None (no hand-offs accepted)."}):i.jsx("ul",{className:"divide-y rounded-md border",children:r.map(x=>i.jsxs("li",{className:"flex items-center gap-3 p-3 text-sm",children:[i.jsx("code",{className:"flex-1 text-xs",children:x}),i.jsx(he,{variant:"ghost",size:"icon",className:"h-8 w-8","aria-label":`Remove ${x}`,onClick:()=>y({handoffSources:r.filter(b=>b!==x)},"Removed"),children:i.jsx(qo,{})})]},x))}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx(Ae,{placeholder:"Slack bot user id (U…)","aria-label":"Allowed agent's bot user id",value:h,onChange:x=>p(x.target.value.trim())}),i.jsxs(he,{disabled:!w(h)||o.isPending,onClick:()=>{y({handoffSources:[...new Set([...r,h])]},"Added"),p("")},children:[i.jsx(gd,{})," Add"]})]})]}),i.jsxs("div",{className:"flex items-end gap-2",children:[i.jsxs("div",{className:"space-y-1",children:[i.jsx("p",{className:"text-sm font-medium",children:"Cost cap per turn for handed-off work (USD)"}),i.jsx(Ae,{type:"number",min:.5,step:.5,"aria-label":"Cost cap per turn for handed-off work",value:g,onChange:x=>m(x.target.value)})]}),i.jsx(he,{variant:"outline",disabled:o.isPending||Number(g)===a,onClick:()=>y({handoffMaxBudgetUsd:Number(g)},"Saved"),children:"Save"})]})]})]})}function FS({anyChannel:n,anyone:r}){const a=Vd(),o=(d,h)=>a.mutate({[d]:h},{onError:p=>We({title:"Couldn't change access",description:wt(p),variant:"error"})}),u=(d,h,p,g)=>i.jsxs("div",{className:"flex items-start justify-between gap-4",children:[i.jsxs("div",{children:[i.jsx("p",{className:"text-sm font-medium",children:p}),i.jsx("p",{className:"text-xs text-muted-foreground",children:g})]}),i.jsx(ps,{checked:h,disabled:a.isPending,"aria-label":p,onCheckedChange:m=>o(d,m)})]});return i.jsxs(Qe,{children:[i.jsxs(ct,{children:[i.jsx(dt,{children:"Open access"}),i.jsx(Ot,{children:"Optional. Anyone who can reach the agent can make it run code and spend money on this machine, so these are off by default."})]}),i.jsxs(Ve,{className:"space-y-4",children:[u("allowAnyChannel",n,"Any channel the agent is in","Inviting the agent to a channel is enough; the channel list below isn't used. Shared (Slack Connect) channels are still refused."),u("allowAnyone",r,"Anyone in this workspace","Every member can use the agent; the people list below isn't used. External users, guest accounts and deactivated accounts are still refused (unless listed below).")]})]})}function IS({initial:n,anyChannel:r,anyone:a}){const[o,u]=k.useState(n),[d,h]=k.useState(n),p=rj(),g=JSON.stringify(o)!==JSON.stringify(d),m=x=>u(b=>b.some(L=>Oo(L,x))?b:[...b,x]),y=x=>u(b=>b.filter(L=>!Oo(L,x))),w=(x,b)=>u(L=>L.map(R=>Oo(R,x)?{...R,label:b||null}:R));return i.jsxs("div",{className:"space-y-6",children:[i.jsxs(Qe,{children:[i.jsxs(ct,{children:[i.jsx(dt,{children:"Who can use FDA"}),i.jsxs(Ot,{children:["FDA only acts on mentions in allowed channels from allowed people. A user is allowed when they are listed directly or belong to a listed user group.",r&&" Any channel is on: channels listed here aren't needed.",a&&" Anyone in the workspace is on: people and groups listed here are only needed for guests."]})]}),i.jsxs(Ve,{className:"space-y-4",children:[o.length===0?i.jsx(rn,{children:r&&a?"Not needed while both open-access switches are on.":r?"Add at least one user or group (or turn on Anyone in this workspace).":a?"Add at least one channel (or turn on Any channel the agent is in).":"Nobody is allowed yet. Add at least one channel and one user or group."}):i.jsx("ul",{className:"divide-y rounded-md border",children:o.map(x=>{const b=AS[x.kind];return i.jsxs("li",{className:"flex items-center gap-3 p-3",children:[i.jsx(b,{className:"h-4 w-4 shrink-0 text-muted-foreground","aria-hidden":!0}),i.jsx(it,{variant:"outline",className:"shrink-0",children:Sd[x.kind]}),i.jsx("code",{className:"shrink-0 text-xs text-muted-foreground",children:x.slackId}),i.jsx(Ae,{"aria-label":`Label for ${Sd[x.kind].toLowerCase()} ${x.slackId}`,placeholder:"Label",className:"h-8",value:x.label??"",onChange:L=>w(x,L.target.value)}),i.jsx(he,{variant:"ghost",size:"icon",className:"h-8 w-8 shrink-0","aria-label":`Remove ${x.label??x.slackId}`,onClick:()=>y(x),children:i.jsx(qo,{})})]},`${x.kind}:${x.slackId}`)})}),i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx(he,{disabled:!g||p.isPending,onClick:()=>p.mutate(o,{onSuccess:({entries:x})=>{u(x),h(x),We({title:"Access list saved",variant:"success"})}}),children:p.isPending?"Saving":"Save access list"}),i.jsx(he,{variant:"ghost",disabled:!g,onClick:()=>u(d),children:"Discard"}),g&&i.jsx("span",{className:"text-sm text-muted-foreground",children:"Unsaved changes"})]})]})]}),i.jsx(US,{entries:o,onAdd:m})]})}function zS(n,r=300){const[a,o]=k.useState(n);return k.useEffect(()=>{const u=setTimeout(()=>o(n),r);return()=>clearTimeout(u)},[n,r]),a}function US({entries:n,onAdd:r}){const[a,o]=k.useState("channel"),[u,d]=k.useState(""),h=zS(u.trim()),p=sj(h,a==="channel"),g=aj(h,a==="user"),m=ij(a==="usergroup"),y=a==="channel"?p:a==="user"?g:m;let w=[];if(a==="channel"&&p.data)w=p.data.map(x=>({id:x.id,primary:`#${x.name}`,secondary:x.isMember?void 0:"Bot is not a member yet",label:`#${x.name}`,icon:x.isPrivate?i.jsx(o1,{className:"h-3 w-3","aria-label":"Private"}):void 0}));else if(a==="user"&&g.data)w=g.data.map(x=>({id:x.id,primary:x.realName||x.name,secondary:`@${x.name}`,label:x.realName||x.name}));else if(a==="usergroup"&&m.data){const x=h.toLowerCase();w=m.data.filter(b=>!x||b.handle.toLowerCase().includes(x)||b.name.toLowerCase().includes(x)).map(b=>({id:b.id,primary:b.name,secondary:`@${b.handle}`,label:`@${b.handle}`}))}return i.jsxs(Qe,{children:[i.jsxs(ct,{children:[i.jsx(dt,{children:"Add to the list"}),i.jsx(Ot,{children:"Search what the bot can see in your Slack workspace. Remember to save."})]}),i.jsxs(Ve,{children:[i.jsx(hy,{idPrefix:"access",label:"Entry type",value:a,onChange:x=>{o(x),d("")},items:[{value:"channel",label:"Channels"},{value:"user",label:"Users"},{value:"usergroup",label:"User groups"}]}),i.jsxs(py,{idPrefix:"access",value:a,className:"space-y-3",children:[i.jsx(Ae,{type:"search","aria-label":`Search ${Sd[a].toLowerCase()}s`,placeholder:"Search",value:u,onChange:x=>d(x.target.value)}),y.isLoading?i.jsx(Ct,{}):y.isError?i.jsx(Dt,{error:y.error,onRetry:()=>void y.refetch()}):w.length===0?i.jsx("p",{className:"p-2 text-sm text-muted-foreground",children:"No matches."}):i.jsx("ul",{className:Je("max-h-72 overflow-y-auto rounded-md border",y.isFetching&&"opacity-60"),children:w.map(x=>{const b=n.some(L=>Oo(L,{kind:a,slackId:x.id}));return i.jsxs("li",{className:"flex items-center gap-3 border-b px-3 py-2 text-sm last:border-b-0",children:[i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsxs("p",{className:"flex items-center gap-1.5 truncate",children:[x.primary,x.icon]}),x.secondary&&i.jsx("p",{className:"truncate text-xs text-muted-foreground",children:x.secondary})]}),i.jsx(he,{size:"xs",variant:"outline",disabled:b,"aria-label":b?`${x.primary} already added`:`Add ${x.primary}`,onClick:()=>r({kind:a,slackId:x.id,label:x.label}),children:b?"Added":i.jsxs(i.Fragment,{children:[i.jsx(gd,{}),"Add"]})})]},x.id)})})]})]})]})}function $S(){const n=Yo();return n.data?i.jsxs(Qe,{children:[i.jsxs(ct,{children:[i.jsx(dt,{children:"Account"}),i.jsx(Ot,{children:"Change your password or username. Your other sessions will be signed out."})]}),i.jsx(Ve,{children:i.jsx(oy,{currentUsername:n.data.username,onDone:()=>We({title:"Account updated",variant:"success"})})})]}):i.jsx(Ct,{})}const xy=["calendar"];function qS(){return Rt({queryKey:xy,queryFn:()=>Ee("/api/calendar")})}function BS(){const n=St();return Ft({mutationFn:r=>Ee(r.path,{method:r.method??"POST",body:r.body}),onSuccess:r=>{r&&"redirectUri"in r&&n.setQueryData(xy,r)}})}function HS(){var y,w;const n=qS(),r=BS(),[a,o]=k.useState(""),[u,d]=k.useState("");if(k.useEffect(()=>{n.data&&o(n.data.clientId??"")},[(y=n.data)==null?void 0:y.clientId]),n.isLoading)return i.jsx(Ct,{});if(n.isError||!n.data)return i.jsx(Dt,{error:n.error,onRetry:()=>void n.refetch()});const h=n.data,p=x=>b=>We({title:x,description:wt(b),variant:"error"}),g=()=>r.mutateAsync({path:"/api/calendar",method:"PUT",body:{clientId:a.trim(),...u.trim()?{clientSecret:u.trim()}:{}}}).then(()=>{d(""),We({title:"Google client saved",variant:"success"})}).catch(p("Couldn't save the Google client")),m=()=>Ee("/api/calendar/connect",{method:"POST"}).then(x=>window.location.assign(x.url)).catch(p("Couldn't start the Google sign-in"));return i.jsxs("div",{className:"space-y-4",children:[i.jsxs(Qe,{children:[i.jsxs(ct,{children:[i.jsx(dt,{children:"Calendar"}),i.jsx(Ot,{children:"The agent books meetings on its own Google calendar, around the attendees' availability (Google Calendar). Connect the Google account the agent should use (ideally its own account, e.g. jane@yourcompany.com). The sign-in stays encrypted on this machine; tasks never see Google's tokens."})]}),i.jsxs(Ve,{className:"space-y-5",children:[i.jsxs("div",{className:"flex items-center justify-between gap-4",children:[i.jsxs("div",{children:[i.jsx("p",{className:"font-medium",children:"Calendar for tasks"}),i.jsx("p",{className:"text-sm text-muted-foreground",children:"Off: tasks don't get the calendar tools."})]}),i.jsx(ps,{checked:h.enabled,onCheckedChange:x=>void r.mutateAsync({path:"/api/calendar",method:"PUT",body:{enabled:x}}).catch(p("Couldn't change it")),"aria-label":"Calendar for tasks"})]}),i.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-sm",children:[i.jsx("span",{className:"font-medium",children:"Google account:"}),h.connected?i.jsxs(i.Fragment,{children:[i.jsx(it,{variant:"success",children:"Connected"}),i.jsx("code",{children:h.account}),i.jsx(he,{size:"sm",variant:"outline",onClick:()=>void r.mutateAsync({path:"/api/calendar/connection",method:"DELETE"}).catch(p("Couldn't disconnect")),children:"Disconnect"})]}):i.jsxs(i.Fragment,{children:[i.jsx(it,{variant:"muted",children:"Not connected"}),i.jsx(he,{size:"sm",disabled:!h.configured,onClick:()=>void m(),children:"Connect Google"}),!h.configured&&i.jsx("span",{className:"text-muted-foreground",children:"Save the Google client below first."})]})]}),i.jsxs("div",{className:"flex items-center justify-between gap-4",children:[i.jsxs("div",{children:[i.jsxs("p",{className:"font-medium",children:["Invite people outside"," ",((w=h.account)==null?void 0:w.split("@")[1])??"the account's domain"]}),i.jsx("p",{className:"text-sm text-muted-foreground",children:"Off: the agent can only invite people from its own Google Workspace domain."})]}),i.jsx(ps,{checked:h.allowExternal,onCheckedChange:x=>void r.mutateAsync({path:"/api/calendar",method:"PUT",body:{allowExternal:x}}).catch(p("Couldn't change it")),"aria-label":"Allow external guests"})]})]})]}),i.jsxs(Qe,{children:[i.jsxs(ct,{children:[i.jsx(dt,{children:"Google client"}),i.jsx(Ot,{children:"From your Google Cloud project (Google Auth Platform → Clients): a Web application client, with the Google Calendar API enabled. See the setup guide for the steps."})]}),i.jsxs(Ve,{className:"space-y-4",children:[i.jsxs("div",{className:"space-y-1.5 text-sm",children:[i.jsx("p",{className:"font-medium",children:"Authorized redirect URI (add it to the client exactly)"}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("code",{className:"break-all rounded bg-muted px-2 py-1",children:h.redirectUri}),i.jsx(Da,{text:h.redirectUri})]})]}),i.jsx(Ye,{label:"Client ID",children:x=>i.jsx(Ae,{...x,value:a,onChange:b=>o(b.target.value),placeholder:"1234…apps.googleusercontent.com"})}),i.jsx(Ye,{label:"Client secret",help:h.hasSecret?"Saved. Enter a new one only to replace it.":void 0,children:x=>i.jsx(Ae,{...x,type:"password",autoComplete:"off",value:u,onChange:b=>d(b.target.value),placeholder:h.hasSecret?"••••••••":"GOCSPX-…"})}),i.jsx(he,{onClick:()=>void g(),disabled:r.isPending||!a.trim(),children:"Save"})]})]})]})}function QS(){const[n,r]=k.useState(null),a=k.useRef(!1);return k.useEffect(()=>{if(a.current)return;a.current=!0;const o=new URLSearchParams(window.location.search),u=o.get("code"),d=o.get("state");if(window.history.replaceState(null,"","/calendar/callback"),o.get("error")||!u||!d){r({ok:!1,message:o.get("error")==="access_denied"?"The sign-in was cancelled.":"Google didn't complete the sign-in."});return}Ee("/api/calendar/exchange",{method:"POST",body:{code:u,state:d}}).then(h=>r({ok:!0,account:h.account})).catch(h=>r({ok:!1,message:wt(h)}))},[]),i.jsx("div",{className:"mx-auto max-w-lg p-6",children:i.jsx(Qe,{children:i.jsxs(Ve,{className:"space-y-3 pt-6 text-sm",children:[n?n.ok?i.jsxs("p",{children:["Google Calendar is connected",n.account?i.jsxs(i.Fragment,{children:[" ","as ",i.jsx("code",{children:n.account})]}):null,"."]}):i.jsx("p",{className:"text-destructive",children:n.message}):i.jsx(Ct,{label:"Connecting Google"}),i.jsx(Qt,{to:"/settings/calendar",className:"text-info underline",children:"Back to Calendar settings"})]})})})}function VS(){return i.jsxs("div",{className:"py-16 text-center",children:[i.jsx("h1",{className:"text-xl font-semibold",children:"Page not found"}),i.jsx(Qt,{to:"/",className:"mt-3 inline-block text-sm text-info underline",children:"Back to the dashboard"})]})}const WS=Jw([{element:i.jsx(jj,{}),children:[{path:"/login",element:i.jsx(Cj,{})},{path:"/change-password",element:i.jsx(km,{children:i.jsx(Nj,{})})},{element:i.jsx(km,{children:i.jsx(bj,{})}),children:[{index:!0,element:i.jsx(Rj,{})},{path:"requests",element:i.jsx(_j,{})},{path:"requests/:id",element:i.jsx(Uj,{})},{path:"schedules",element:i.jsx(tS,{})},{path:"setup",element:i.jsx(aS,{})},{path:"browser",element:i.jsx(uS,{})},{path:"tickets",element:i.jsx(pS,{})},{path:"trackers/linear/callback",element:i.jsx(wS,{})},{path:"calendar/callback",element:i.jsx(QS,{})},{path:"settings",element:i.jsx(bS,{}),children:[{index:!0,element:i.jsx(hd,{to:"agent",replace:!0})},{path:"agent",element:i.jsx(jS,{})},{path:"anthropic",element:i.jsx(CS,{})},{path:"general",element:i.jsx(PS,{})},{path:"slack",element:i.jsx(LS,{})},{path:"access",element:i.jsx(DS,{})},{path:"calendar",element:i.jsx(HS,{})},{path:"account",element:i.jsx($S,{})}]},{path:"audit",element:i.jsx(eS,{})},{path:"*",element:i.jsx(VS,{})}]}]}]);function KS(){const n=k.useSyncExternalStore(Db,Ob);return i.jsx("div",{"aria-live":"polite",role:"status",className:"pointer-events-none fixed bottom-4 right-4 z-50 flex w-full max-w-sm flex-col gap-2",children:n.map(r=>i.jsxs("div",{className:Je("pointer-events-auto flex items-start gap-3 rounded-md border bg-card p-4 text-sm shadow-lg animate-in fade-in slide-in-from-bottom-2",r.variant==="error"&&"border-destructive/50",r.variant==="success"&&"border-success/50"),children:[i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsx("p",{className:"font-medium",children:r.title}),r.description&&i.jsx("p",{className:"mt-1 break-words text-muted-foreground",children:r.description})]}),i.jsx("button",{type:"button",onClick:()=>ty(r.id),"aria-label":"Dismiss",className:"rounded-sm opacity-70 hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:i.jsx(Bd,{className:"h-4 w-4"})})]},r.id))})}const GS=new Set(["unauthorized","must_change_password","csrf"]),YS=new Ax({defaultOptions:{queries:{retry:(n,r)=>!(r instanceof Vn&&r.status>=400&&r.status<500)&&n<2,refetchOnWindowFocus:!0}},mutationCache:new eg({onError:(n,r,a,o)=>{var u;(u=o.meta)!=null&&u.inlineError||n instanceof Vn&&GS.has(n.code)||We({title:"Action failed",description:wt(n),variant:"error"})}})});fx.createRoot(document.getElementById("root")).render(i.jsx(ix.StrictMode,{children:i.jsxs(Dx,{client:YS,children:[i.jsx(ck,{router:WS}),i.jsx(KS,{})]})}));
|