oh-my-pr 4.5.2 → 4.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -2
- package/dist/public/assets/core-DV6XEvTN.js +1 -0
- package/dist/public/assets/index-BH31fkzd.css +1 -0
- package/dist/public/assets/index-oXxHB6t2.js +49 -0
- package/dist/public/index.html +2 -2
- package/package.json +1 -1
- package/dist/public/assets/index-Csj7t9N6.js +0 -49
- package/dist/public/assets/index-D3t6JrEm.css +0 -1
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
function aw(t,r){for(var o=0;o<r.length;o++){const i=r[o];if(typeof i!="string"&&!Array.isArray(i)){for(const u in i)if(u!=="default"&&!(u in t)){const d=Object.getOwnPropertyDescriptor(i,u);d&&Object.defineProperty(t,u,d.get?d:{enumerable:!0,get:()=>i[u]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))i(u);new MutationObserver(u=>{for(const d of u)if(d.type==="childList")for(const p of d.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&i(p)}).observe(document,{childList:!0,subtree:!0});function o(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 i(u){if(u.ep)return;u.ep=!0;const d=o(u);fetch(u.href,d)}})();function Vh(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ql={exports:{}},Oo={},Yl={exports:{}},we={};var kp;function lw(){if(kp)return we;kp=1;var t=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),d=Symbol.for("react.provider"),p=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),w=Symbol.iterator;function b(P){return P===null||typeof P!="object"?null:(P=w&&P[w]||P["@@iterator"],typeof P=="function"?P:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,C={};function S(P,B,ue){this.props=P,this.context=B,this.refs=C,this.updater=ue||k}S.prototype.isReactComponent={},S.prototype.setState=function(P,B){if(typeof P!="object"&&typeof P!="function"&&P!=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,P,B,"setState")},S.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function E(){}E.prototype=S.prototype;function _(P,B,ue){this.props=P,this.context=B,this.refs=C,this.updater=ue||k}var O=_.prototype=new E;O.constructor=_,j(O,S.prototype),O.isPureReactComponent=!0;var I=Array.isArray,D=Object.prototype.hasOwnProperty,A={current:null},$={key:!0,ref:!0,__self:!0,__source:!0};function K(P,B,ue){var me,H={},ae=null,ce=null;if(B!=null)for(me in B.ref!==void 0&&(ce=B.ref),B.key!==void 0&&(ae=""+B.key),B)D.call(B,me)&&!$.hasOwnProperty(me)&&(H[me]=B[me]);var be=arguments.length-2;if(be===1)H.children=ue;else if(1<be){for(var Ee=Array(be),tt=0;tt<be;tt++)Ee[tt]=arguments[tt+2];H.children=Ee}if(P&&P.defaultProps)for(me in be=P.defaultProps,be)H[me]===void 0&&(H[me]=be[me]);return{$$typeof:t,type:P,key:ae,ref:ce,props:H,_owner:A.current}}function Q(P,B){return{$$typeof:t,type:P.type,key:B,ref:P.ref,props:P.props,_owner:P._owner}}function ee(P){return typeof P=="object"&&P!==null&&P.$$typeof===t}function ne(P){var B={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(ue){return B[ue]})}var Z=/\/+/g;function de(P,B){return typeof P=="object"&&P!==null&&P.key!=null?ne(""+P.key):B.toString(36)}function X(P,B,ue,me,H){var ae=typeof P;(ae==="undefined"||ae==="boolean")&&(P=null);var ce=!1;if(P===null)ce=!0;else switch(ae){case"string":case"number":ce=!0;break;case"object":switch(P.$$typeof){case t:case r:ce=!0}}if(ce)return ce=P,H=H(ce),P=me===""?"."+de(ce,0):me,I(H)?(ue="",P!=null&&(ue=P.replace(Z,"$&/")+"/"),X(H,B,ue,"",function(tt){return tt})):H!=null&&(ee(H)&&(H=Q(H,ue+(!H.key||ce&&ce.key===H.key?"":(""+H.key).replace(Z,"$&/")+"/")+P)),B.push(H)),1;if(ce=0,me=me===""?".":me+":",I(P))for(var be=0;be<P.length;be++){ae=P[be];var Ee=me+de(ae,be);ce+=X(ae,B,ue,Ee,H)}else if(Ee=b(P),typeof Ee=="function")for(P=Ee.call(P),be=0;!(ae=P.next()).done;)ae=ae.value,Ee=me+de(ae,be++),ce+=X(ae,B,ue,Ee,H);else if(ae==="object")throw B=String(P),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.");return ce}function ve(P,B,ue){if(P==null)return P;var me=[],H=0;return X(P,me,"","",function(ae){return B.call(ue,ae,H++)}),me}function se(P){if(P._status===-1){var B=P._result;B=B(),B.then(function(ue){(P._status===0||P._status===-1)&&(P._status=1,P._result=ue)},function(ue){(P._status===0||P._status===-1)&&(P._status=2,P._result=ue)}),P._status===-1&&(P._status=0,P._result=B)}if(P._status===1)return P._result.default;throw P._result}var le={current:null},z={transition:null},U={ReactCurrentDispatcher:le,ReactCurrentBatchConfig:z,ReactCurrentOwner:A};function q(){throw Error("act(...) is not supported in production builds of React.")}return we.Children={map:ve,forEach:function(P,B,ue){ve(P,function(){B.apply(this,arguments)},ue)},count:function(P){var B=0;return ve(P,function(){B++}),B},toArray:function(P){return ve(P,function(B){return B})||[]},only:function(P){if(!ee(P))throw Error("React.Children.only expected to receive a single React element child.");return P}},we.Component=S,we.Fragment=o,we.Profiler=u,we.PureComponent=_,we.StrictMode=i,we.Suspense=g,we.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=U,we.act=q,we.cloneElement=function(P,B,ue){if(P==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+P+".");var me=j({},P.props),H=P.key,ae=P.ref,ce=P._owner;if(B!=null){if(B.ref!==void 0&&(ae=B.ref,ce=A.current),B.key!==void 0&&(H=""+B.key),P.type&&P.type.defaultProps)var be=P.type.defaultProps;for(Ee in B)D.call(B,Ee)&&!$.hasOwnProperty(Ee)&&(me[Ee]=B[Ee]===void 0&&be!==void 0?be[Ee]:B[Ee])}var Ee=arguments.length-2;if(Ee===1)me.children=ue;else if(1<Ee){be=Array(Ee);for(var tt=0;tt<Ee;tt++)be[tt]=arguments[tt+2];me.children=be}return{$$typeof:t,type:P.type,key:H,ref:ae,props:me,_owner:ce}},we.createContext=function(P){return P={$$typeof:p,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},P.Provider={$$typeof:d,_context:P},P.Consumer=P},we.createElement=K,we.createFactory=function(P){var B=K.bind(null,P);return B.type=P,B},we.createRef=function(){return{current:null}},we.forwardRef=function(P){return{$$typeof:h,render:P}},we.isValidElement=ee,we.lazy=function(P){return{$$typeof:v,_payload:{_status:-1,_result:P},_init:se}},we.memo=function(P,B){return{$$typeof:x,type:P,compare:B===void 0?null:B}},we.startTransition=function(P){var B=z.transition;z.transition={};try{P()}finally{z.transition=B}},we.unstable_act=q,we.useCallback=function(P,B){return le.current.useCallback(P,B)},we.useContext=function(P){return le.current.useContext(P)},we.useDebugValue=function(){},we.useDeferredValue=function(P){return le.current.useDeferredValue(P)},we.useEffect=function(P,B){return le.current.useEffect(P,B)},we.useId=function(){return le.current.useId()},we.useImperativeHandle=function(P,B,ue){return le.current.useImperativeHandle(P,B,ue)},we.useInsertionEffect=function(P,B){return le.current.useInsertionEffect(P,B)},we.useLayoutEffect=function(P,B){return le.current.useLayoutEffect(P,B)},we.useMemo=function(P,B){return le.current.useMemo(P,B)},we.useReducer=function(P,B,ue){return le.current.useReducer(P,B,ue)},we.useRef=function(P){return le.current.useRef(P)},we.useState=function(P){return le.current.useState(P)},we.useSyncExternalStore=function(P,B,ue){return le.current.useSyncExternalStore(P,B,ue)},we.useTransition=function(){return le.current.useTransition()},we.version="18.3.1",we}var Ep;function Fi(){return Ep||(Ep=1,Yl.exports=lw()),Yl.exports}var Np;function uw(){if(Np)return Oo;Np=1;var t=Fi(),r=Symbol.for("react.element"),o=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,u=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,d={key:!0,ref:!0,__self:!0,__source:!0};function p(h,g,x){var v,w={},b=null,k=null;x!==void 0&&(b=""+x),g.key!==void 0&&(b=""+g.key),g.ref!==void 0&&(k=g.ref);for(v in g)i.call(g,v)&&!d.hasOwnProperty(v)&&(w[v]=g[v]);if(h&&h.defaultProps)for(v in g=h.defaultProps,g)w[v]===void 0&&(w[v]=g[v]);return{$$typeof:r,type:h,key:b,ref:k,props:w,_owner:u.current}}return Oo.Fragment=o,Oo.jsx=p,Oo.jsxs=p,Oo}var jp;function cw(){return jp||(jp=1,ql.exports=uw()),ql.exports}var l=cw(),ui={},Xl={exports:{}},dt={},Zl={exports:{}},Jl={};var Rp;function dw(){return Rp||(Rp=1,(function(t){function r(z,U){var q=z.length;z.push(U);e:for(;0<q;){var P=q-1>>>1,B=z[P];if(0<u(B,U))z[P]=U,z[q]=B,q=P;else break e}}function o(z){return z.length===0?null:z[0]}function i(z){if(z.length===0)return null;var U=z[0],q=z.pop();if(q!==U){z[0]=q;e:for(var P=0,B=z.length,ue=B>>>1;P<ue;){var me=2*(P+1)-1,H=z[me],ae=me+1,ce=z[ae];if(0>u(H,q))ae<B&&0>u(ce,H)?(z[P]=ce,z[ae]=q,P=ae):(z[P]=H,z[me]=q,P=me);else if(ae<B&&0>u(ce,q))z[P]=ce,z[ae]=q,P=ae;else break e}}return U}function u(z,U){var q=z.sortIndex-U.sortIndex;return q!==0?q:z.id-U.id}if(typeof performance=="object"&&typeof performance.now=="function"){var d=performance;t.unstable_now=function(){return d.now()}}else{var p=Date,h=p.now();t.unstable_now=function(){return p.now()-h}}var g=[],x=[],v=1,w=null,b=3,k=!1,j=!1,C=!1,S=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function O(z){for(var U=o(x);U!==null;){if(U.callback===null)i(x);else if(U.startTime<=z)i(x),U.sortIndex=U.expirationTime,r(g,U);else break;U=o(x)}}function I(z){if(C=!1,O(z),!j)if(o(g)!==null)j=!0,se(D);else{var U=o(x);U!==null&&le(I,U.startTime-z)}}function D(z,U){j=!1,C&&(C=!1,E(K),K=-1),k=!0;var q=b;try{for(O(U),w=o(g);w!==null&&(!(w.expirationTime>U)||z&&!ne());){var P=w.callback;if(typeof P=="function"){w.callback=null,b=w.priorityLevel;var B=P(w.expirationTime<=U);U=t.unstable_now(),typeof B=="function"?w.callback=B:w===o(g)&&i(g),O(U)}else i(g);w=o(g)}if(w!==null)var ue=!0;else{var me=o(x);me!==null&&le(I,me.startTime-U),ue=!1}return ue}finally{w=null,b=q,k=!1}}var A=!1,$=null,K=-1,Q=5,ee=-1;function ne(){return!(t.unstable_now()-ee<Q)}function Z(){if($!==null){var z=t.unstable_now();ee=z;var U=!0;try{U=$(!0,z)}finally{U?de():(A=!1,$=null)}}else A=!1}var de;if(typeof _=="function")de=function(){_(Z)};else if(typeof MessageChannel<"u"){var X=new MessageChannel,ve=X.port2;X.port1.onmessage=Z,de=function(){ve.postMessage(null)}}else de=function(){S(Z,0)};function se(z){$=z,A||(A=!0,de())}function le(z,U){K=S(function(){z(t.unstable_now())},U)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(z){z.callback=null},t.unstable_continueExecution=function(){j||k||(j=!0,se(D))},t.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Q=0<z?Math.floor(1e3/z):5},t.unstable_getCurrentPriorityLevel=function(){return b},t.unstable_getFirstCallbackNode=function(){return o(g)},t.unstable_next=function(z){switch(b){case 1:case 2:case 3:var U=3;break;default:U=b}var q=b;b=U;try{return z()}finally{b=q}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(z,U){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var q=b;b=z;try{return U()}finally{b=q}},t.unstable_scheduleCallback=function(z,U,q){var P=t.unstable_now();switch(typeof q=="object"&&q!==null?(q=q.delay,q=typeof q=="number"&&0<q?P+q:P):q=P,z){case 1:var B=-1;break;case 2:B=250;break;case 5:B=1073741823;break;case 4:B=1e4;break;default:B=5e3}return B=q+B,z={id:v++,callback:U,priorityLevel:z,startTime:q,expirationTime:B,sortIndex:-1},q>P?(z.sortIndex=q,r(x,z),o(g)===null&&z===o(x)&&(C?(E(K),K=-1):C=!0,le(I,q-P))):(z.sortIndex=B,r(g,z),j||k||(j=!0,se(D))),z},t.unstable_shouldYield=ne,t.unstable_wrapCallback=function(z){var U=b;return function(){var q=b;b=U;try{return z.apply(this,arguments)}finally{b=q}}}})(Jl)),Jl}var Pp;function fw(){return Pp||(Pp=1,Zl.exports=dw()),Zl.exports}var Tp;function pw(){if(Tp)return dt;Tp=1;var t=Fi(),r=fw();function o(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,s=1;s<arguments.length;s++)n+="&args[]="+encodeURIComponent(arguments[s]);return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i=new Set,u={};function d(e,n){p(e,n),p(e+"Capture",n)}function p(e,n){for(u[e]=n,e=0;e<n.length;e++)i.add(n[e])}var h=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),g=Object.prototype.hasOwnProperty,x=/^[: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]*$/,v={},w={};function b(e){return g.call(w,e)?!0:g.call(v,e)?!1:x.test(e)?w[e]=!0:(v[e]=!0,!1)}function k(e,n,s,a){if(s!==null&&s.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return a?!1:s!==null?!s.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function j(e,n,s,a){if(n===null||typeof n>"u"||k(e,n,s,a))return!0;if(a)return!1;if(s!==null)switch(s.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function C(e,n,s,a,c,f,y){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=a,this.attributeNamespace=c,this.mustUseProperty=s,this.propertyName=e,this.type=n,this.sanitizeURL=f,this.removeEmptyString=y}var S={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){S[e]=new C(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];S[n]=new C(n,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){S[e]=new C(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){S[e]=new C(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){S[e]=new C(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){S[e]=new C(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){S[e]=new C(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){S[e]=new C(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){S[e]=new C(e,5,!1,e.toLowerCase(),null,!1,!1)});var E=/[\-:]([a-z])/g;function _(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 n=e.replace(E,_);S[n]=new C(n,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(E,_);S[n]=new C(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(E,_);S[n]=new C(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){S[e]=new C(e,1,!1,e.toLowerCase(),null,!1,!1)}),S.xlinkHref=new C("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){S[e]=new C(e,1,!1,e.toLowerCase(),null,!0,!0)});function O(e,n,s,a){var c=S.hasOwnProperty(n)?S[n]:null;(c!==null?c.type!==0:a||!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(j(n,s,c,a)&&(s=null),a||c===null?b(n)&&(s===null?e.removeAttribute(n):e.setAttribute(n,""+s)):c.mustUseProperty?e[c.propertyName]=s===null?c.type===3?!1:"":s:(n=c.attributeName,a=c.attributeNamespace,s===null?e.removeAttribute(n):(c=c.type,s=c===3||c===4&&s===!0?"":""+s,a?e.setAttributeNS(a,n,s):e.setAttribute(n,s))))}var I=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,D=Symbol.for("react.element"),A=Symbol.for("react.portal"),$=Symbol.for("react.fragment"),K=Symbol.for("react.strict_mode"),Q=Symbol.for("react.profiler"),ee=Symbol.for("react.provider"),ne=Symbol.for("react.context"),Z=Symbol.for("react.forward_ref"),de=Symbol.for("react.suspense"),X=Symbol.for("react.suspense_list"),ve=Symbol.for("react.memo"),se=Symbol.for("react.lazy"),le=Symbol.for("react.offscreen"),z=Symbol.iterator;function U(e){return e===null||typeof e!="object"?null:(e=z&&e[z]||e["@@iterator"],typeof e=="function"?e:null)}var q=Object.assign,P;function B(e){if(P===void 0)try{throw Error()}catch(s){var n=s.stack.trim().match(/\n( *(at )?)/);P=n&&n[1]||""}return`
|
|
2
|
+
`+P+e}var ue=!1;function me(e,n){if(!e||ue)return"";ue=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(n)if(n=function(){throw Error()},Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(n,[])}catch(F){var a=F}Reflect.construct(e,[],n)}else{try{n.call()}catch(F){a=F}e.call(n.prototype)}else{try{throw Error()}catch(F){a=F}e()}}catch(F){if(F&&a&&typeof F.stack=="string"){for(var c=F.stack.split(`
|
|
3
|
+
`),f=a.stack.split(`
|
|
4
|
+
`),y=c.length-1,N=f.length-1;1<=y&&0<=N&&c[y]!==f[N];)N--;for(;1<=y&&0<=N;y--,N--)if(c[y]!==f[N]){if(y!==1||N!==1)do if(y--,N--,0>N||c[y]!==f[N]){var R=`
|
|
5
|
+
`+c[y].replace(" at new "," at ");return e.displayName&&R.includes("<anonymous>")&&(R=R.replace("<anonymous>",e.displayName)),R}while(1<=y&&0<=N);break}}}finally{ue=!1,Error.prepareStackTrace=s}return(e=e?e.displayName||e.name:"")?B(e):""}function H(e){switch(e.tag){case 5:return B(e.type);case 16:return B("Lazy");case 13:return B("Suspense");case 19:return B("SuspenseList");case 0:case 2:case 15:return e=me(e.type,!1),e;case 11:return e=me(e.type.render,!1),e;case 1:return e=me(e.type,!0),e;default:return""}}function ae(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 $:return"Fragment";case A:return"Portal";case Q:return"Profiler";case K:return"StrictMode";case de:return"Suspense";case X:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ne:return(e.displayName||"Context")+".Consumer";case ee:return(e._context.displayName||"Context")+".Provider";case Z:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ve:return n=e.displayName||null,n!==null?n:ae(e.type)||"Memo";case se:n=e._payload,e=e._init;try{return ae(e(n))}catch{}}return null}function ce(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ae(n);case 8:return n===K?"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 n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function be(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ee(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function tt(e){var n=Ee(e)?"checked":"value",s=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),a=""+e[n];if(!e.hasOwnProperty(n)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var c=s.get,f=s.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return c.call(this)},set:function(y){a=""+y,f.call(this,y)}}),Object.defineProperty(e,n,{enumerable:s.enumerable}),{getValue:function(){return a},setValue:function(y){a=""+y},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function sr(e){e._valueTracker||(e._valueTracker=tt(e))}function es(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var s=n.getValue(),a="";return e&&(a=Ee(e)?e.checked?"true":"false":e.value),e=a,e!==s?(n.setValue(e),!0):!1}function Yt(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 na(e,n){var s=n.checked;return q({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:s??e._wrapperState.initialChecked})}function Tc(e,n){var s=n.defaultValue==null?"":n.defaultValue,a=n.checked!=null?n.checked:n.defaultChecked;s=be(n.value!=null?n.value:s),e._wrapperState={initialChecked:a,initialValue:s,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function _c(e,n){n=n.checked,n!=null&&O(e,"checked",n,!1)}function ra(e,n){_c(e,n);var s=be(n.value),a=n.type;if(s!=null)a==="number"?(s===0&&e.value===""||e.value!=s)&&(e.value=""+s):e.value!==""+s&&(e.value=""+s);else if(a==="submit"||a==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?oa(e,n.type,s):n.hasOwnProperty("defaultValue")&&oa(e,n.type,be(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function Oc(e,n,s){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var a=n.type;if(!(a!=="submit"&&a!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,s||n===e.value||(e.value=n),e.defaultValue=n}s=e.name,s!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,s!==""&&(e.name=s)}function oa(e,n,s){(n!=="number"||Yt(e.ownerDocument)!==e)&&(s==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+s&&(e.defaultValue=""+s))}var Vr=Array.isArray;function ir(e,n,s,a){if(e=e.options,n){n={};for(var c=0;c<s.length;c++)n["$"+s[c]]=!0;for(s=0;s<e.length;s++)c=n.hasOwnProperty("$"+e[s].value),e[s].selected!==c&&(e[s].selected=c),c&&a&&(e[s].defaultSelected=!0)}else{for(s=""+be(s),n=null,c=0;c<e.length;c++){if(e[c].value===s){e[c].selected=!0,a&&(e[c].defaultSelected=!0);return}n!==null||e[c].disabled||(n=e[c])}n!==null&&(n.selected=!0)}}function sa(e,n){if(n.dangerouslySetInnerHTML!=null)throw Error(o(91));return q({},n,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ac(e,n){var s=n.value;if(s==null){if(s=n.children,n=n.defaultValue,s!=null){if(n!=null)throw Error(o(92));if(Vr(s)){if(1<s.length)throw Error(o(93));s=s[0]}n=s}n==null&&(n=""),s=n}e._wrapperState={initialValue:be(s)}}function Mc(e,n){var s=be(n.value),a=be(n.defaultValue);s!=null&&(s=""+s,s!==e.value&&(e.value=s),n.defaultValue==null&&e.defaultValue!==s&&(e.defaultValue=s)),a!=null&&(e.defaultValue=""+a)}function Ic(e){var n=e.textContent;n===e._wrapperState.initialValue&&n!==""&&n!==null&&(e.value=n)}function Lc(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ia(e,n){return e==null||e==="http://www.w3.org/1999/xhtml"?Lc(n):e==="http://www.w3.org/2000/svg"&&n==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var ts,Dc=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(n,s,a,c){MSApp.execUnsafeLocalFunction(function(){return e(n,s,a,c)})}:e})(function(e,n){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=n;else{for(ts=ts||document.createElement("div"),ts.innerHTML="<svg>"+n.valueOf().toString()+"</svg>",n=ts.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function Qr(e,n){if(n){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=n;return}}e.textContent=n}var Gr={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},dx=["Webkit","ms","Moz","O"];Object.keys(Gr).forEach(function(e){dx.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),Gr[n]=Gr[e]})});function Fc(e,n,s){return n==null||typeof n=="boolean"||n===""?"":s||typeof n!="number"||n===0||Gr.hasOwnProperty(e)&&Gr[e]?(""+n).trim():n+"px"}function $c(e,n){e=e.style;for(var s in n)if(n.hasOwnProperty(s)){var a=s.indexOf("--")===0,c=Fc(s,n[s],a);s==="float"&&(s="cssFloat"),a?e.setProperty(s,c):e[s]=c}}var fx=q({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 aa(e,n){if(n){if(fx[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(o(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(o(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(o(61))}if(n.style!=null&&typeof n.style!="object")throw Error(o(62))}}function la(e,n){if(e.indexOf("-")===-1)return typeof n.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 ua=null;function ca(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var da=null,ar=null,lr=null;function zc(e){if(e=vo(e)){if(typeof da!="function")throw Error(o(280));var n=e.stateNode;n&&(n=ks(n),da(e.stateNode,e.type,n))}}function Uc(e){ar?lr?lr.push(e):lr=[e]:ar=e}function Hc(){if(ar){var e=ar,n=lr;if(lr=ar=null,zc(e),n)for(e=0;e<n.length;e++)zc(n[e])}}function Bc(e,n){return e(n)}function Wc(){}var fa=!1;function Kc(e,n,s){if(fa)return e(n,s);fa=!0;try{return Bc(e,n,s)}finally{fa=!1,(ar!==null||lr!==null)&&(Wc(),Hc())}}function qr(e,n){var s=e.stateNode;if(s===null)return null;var a=ks(s);if(a===null)return null;s=a[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(s&&typeof s!="function")throw Error(o(231,n,typeof s));return s}var pa=!1;if(h)try{var Yr={};Object.defineProperty(Yr,"passive",{get:function(){pa=!0}}),window.addEventListener("test",Yr,Yr),window.removeEventListener("test",Yr,Yr)}catch{pa=!1}function px(e,n,s,a,c,f,y,N,R){var F=Array.prototype.slice.call(arguments,3);try{n.apply(s,F)}catch(V){this.onError(V)}}var Xr=!1,ns=null,rs=!1,ha=null,hx={onError:function(e){Xr=!0,ns=e}};function mx(e,n,s,a,c,f,y,N,R){Xr=!1,ns=null,px.apply(hx,arguments)}function gx(e,n,s,a,c,f,y,N,R){if(mx.apply(this,arguments),Xr){if(Xr){var F=ns;Xr=!1,ns=null}else throw Error(o(198));rs||(rs=!0,ha=F)}}function $n(e){var n=e,s=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(s=n.return),e=n.return;while(e)}return n.tag===3?s:null}function Vc(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function Qc(e){if($n(e)!==e)throw Error(o(188))}function vx(e){var n=e.alternate;if(!n){if(n=$n(e),n===null)throw Error(o(188));return n!==e?null:e}for(var s=e,a=n;;){var c=s.return;if(c===null)break;var f=c.alternate;if(f===null){if(a=c.return,a!==null){s=a;continue}break}if(c.child===f.child){for(f=c.child;f;){if(f===s)return Qc(c),e;if(f===a)return Qc(c),n;f=f.sibling}throw Error(o(188))}if(s.return!==a.return)s=c,a=f;else{for(var y=!1,N=c.child;N;){if(N===s){y=!0,s=c,a=f;break}if(N===a){y=!0,a=c,s=f;break}N=N.sibling}if(!y){for(N=f.child;N;){if(N===s){y=!0,s=f,a=c;break}if(N===a){y=!0,a=f,s=c;break}N=N.sibling}if(!y)throw Error(o(189))}}if(s.alternate!==a)throw Error(o(190))}if(s.tag!==3)throw Error(o(188));return s.stateNode.current===s?e:n}function Gc(e){return e=vx(e),e!==null?qc(e):null}function qc(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var n=qc(e);if(n!==null)return n;e=e.sibling}return null}var Yc=r.unstable_scheduleCallback,Xc=r.unstable_cancelCallback,xx=r.unstable_shouldYield,yx=r.unstable_requestPaint,Ie=r.unstable_now,wx=r.unstable_getCurrentPriorityLevel,ma=r.unstable_ImmediatePriority,Zc=r.unstable_UserBlockingPriority,os=r.unstable_NormalPriority,bx=r.unstable_LowPriority,Jc=r.unstable_IdlePriority,ss=null,zt=null;function Sx(e){if(zt&&typeof zt.onCommitFiberRoot=="function")try{zt.onCommitFiberRoot(ss,e,void 0,(e.current.flags&128)===128)}catch{}}var Rt=Math.clz32?Math.clz32:Ex,Cx=Math.log,kx=Math.LN2;function Ex(e){return e>>>=0,e===0?32:31-(Cx(e)/kx|0)|0}var is=64,as=4194304;function Zr(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 ls(e,n){var s=e.pendingLanes;if(s===0)return 0;var a=0,c=e.suspendedLanes,f=e.pingedLanes,y=s&268435455;if(y!==0){var N=y&~c;N!==0?a=Zr(N):(f&=y,f!==0&&(a=Zr(f)))}else y=s&~c,y!==0?a=Zr(y):f!==0&&(a=Zr(f));if(a===0)return 0;if(n!==0&&n!==a&&(n&c)===0&&(c=a&-a,f=n&-n,c>=f||c===16&&(f&4194240)!==0))return n;if((a&4)!==0&&(a|=s&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=a;0<n;)s=31-Rt(n),c=1<<s,a|=e[s],n&=~c;return a}function Nx(e,n){switch(e){case 1:case 2:case 4:return n+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 n+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 jx(e,n){for(var s=e.suspendedLanes,a=e.pingedLanes,c=e.expirationTimes,f=e.pendingLanes;0<f;){var y=31-Rt(f),N=1<<y,R=c[y];R===-1?((N&s)===0||(N&a)!==0)&&(c[y]=Nx(N,n)):R<=n&&(e.expiredLanes|=N),f&=~N}}function ga(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function ed(){var e=is;return is<<=1,(is&4194240)===0&&(is=64),e}function va(e){for(var n=[],s=0;31>s;s++)n.push(e);return n}function Jr(e,n,s){e.pendingLanes|=n,n!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,n=31-Rt(n),e[n]=s}function Rx(e,n){var s=e.pendingLanes&~n;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=n,e.mutableReadLanes&=n,e.entangledLanes&=n,n=e.entanglements;var a=e.eventTimes;for(e=e.expirationTimes;0<s;){var c=31-Rt(s),f=1<<c;n[c]=0,a[c]=-1,e[c]=-1,s&=~f}}function xa(e,n){var s=e.entangledLanes|=n;for(e=e.entanglements;s;){var a=31-Rt(s),c=1<<a;c&n|e[a]&n&&(e[a]|=n),s&=~c}}var ke=0;function td(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var nd,ya,rd,od,sd,wa=!1,us=[],cn=null,dn=null,fn=null,eo=new Map,to=new Map,pn=[],Px="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function id(e,n){switch(e){case"focusin":case"focusout":cn=null;break;case"dragenter":case"dragleave":dn=null;break;case"mouseover":case"mouseout":fn=null;break;case"pointerover":case"pointerout":eo.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":to.delete(n.pointerId)}}function no(e,n,s,a,c,f){return e===null||e.nativeEvent!==f?(e={blockedOn:n,domEventName:s,eventSystemFlags:a,nativeEvent:f,targetContainers:[c]},n!==null&&(n=vo(n),n!==null&&ya(n)),e):(e.eventSystemFlags|=a,n=e.targetContainers,c!==null&&n.indexOf(c)===-1&&n.push(c),e)}function Tx(e,n,s,a,c){switch(n){case"focusin":return cn=no(cn,e,n,s,a,c),!0;case"dragenter":return dn=no(dn,e,n,s,a,c),!0;case"mouseover":return fn=no(fn,e,n,s,a,c),!0;case"pointerover":var f=c.pointerId;return eo.set(f,no(eo.get(f)||null,e,n,s,a,c)),!0;case"gotpointercapture":return f=c.pointerId,to.set(f,no(to.get(f)||null,e,n,s,a,c)),!0}return!1}function ad(e){var n=zn(e.target);if(n!==null){var s=$n(n);if(s!==null){if(n=s.tag,n===13){if(n=Vc(s),n!==null){e.blockedOn=n,sd(e.priority,function(){rd(s)});return}}else if(n===3&&s.stateNode.current.memoizedState.isDehydrated){e.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}e.blockedOn=null}function cs(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var s=Sa(e.domEventName,e.eventSystemFlags,n[0],e.nativeEvent);if(s===null){s=e.nativeEvent;var a=new s.constructor(s.type,s);ua=a,s.target.dispatchEvent(a),ua=null}else return n=vo(s),n!==null&&ya(n),e.blockedOn=s,!1;n.shift()}return!0}function ld(e,n,s){cs(e)&&s.delete(n)}function _x(){wa=!1,cn!==null&&cs(cn)&&(cn=null),dn!==null&&cs(dn)&&(dn=null),fn!==null&&cs(fn)&&(fn=null),eo.forEach(ld),to.forEach(ld)}function ro(e,n){e.blockedOn===n&&(e.blockedOn=null,wa||(wa=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,_x)))}function oo(e){function n(c){return ro(c,e)}if(0<us.length){ro(us[0],e);for(var s=1;s<us.length;s++){var a=us[s];a.blockedOn===e&&(a.blockedOn=null)}}for(cn!==null&&ro(cn,e),dn!==null&&ro(dn,e),fn!==null&&ro(fn,e),eo.forEach(n),to.forEach(n),s=0;s<pn.length;s++)a=pn[s],a.blockedOn===e&&(a.blockedOn=null);for(;0<pn.length&&(s=pn[0],s.blockedOn===null);)ad(s),s.blockedOn===null&&pn.shift()}var ur=I.ReactCurrentBatchConfig,ds=!0;function Ox(e,n,s,a){var c=ke,f=ur.transition;ur.transition=null;try{ke=1,ba(e,n,s,a)}finally{ke=c,ur.transition=f}}function Ax(e,n,s,a){var c=ke,f=ur.transition;ur.transition=null;try{ke=4,ba(e,n,s,a)}finally{ke=c,ur.transition=f}}function ba(e,n,s,a){if(ds){var c=Sa(e,n,s,a);if(c===null)$a(e,n,a,fs,s),id(e,a);else if(Tx(c,e,n,s,a))a.stopPropagation();else if(id(e,a),n&4&&-1<Px.indexOf(e)){for(;c!==null;){var f=vo(c);if(f!==null&&nd(f),f=Sa(e,n,s,a),f===null&&$a(e,n,a,fs,s),f===c)break;c=f}c!==null&&a.stopPropagation()}else $a(e,n,a,null,s)}}var fs=null;function Sa(e,n,s,a){if(fs=null,e=ca(a),e=zn(e),e!==null)if(n=$n(e),n===null)e=null;else if(s=n.tag,s===13){if(e=Vc(n),e!==null)return e;e=null}else if(s===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null);return fs=e,null}function ud(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(wx()){case ma:return 1;case Zc:return 4;case os:case bx:return 16;case Jc:return 536870912;default:return 16}default:return 16}}var hn=null,Ca=null,ps=null;function cd(){if(ps)return ps;var e,n=Ca,s=n.length,a,c="value"in hn?hn.value:hn.textContent,f=c.length;for(e=0;e<s&&n[e]===c[e];e++);var y=s-e;for(a=1;a<=y&&n[s-a]===c[f-a];a++);return ps=c.slice(e,1<a?1-a:void 0)}function hs(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function ms(){return!0}function dd(){return!1}function ft(e){function n(s,a,c,f,y){this._reactName=s,this._targetInst=c,this.type=a,this.nativeEvent=f,this.target=y,this.currentTarget=null;for(var N in e)e.hasOwnProperty(N)&&(s=e[N],this[N]=s?s(f):f[N]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?ms:dd,this.isPropagationStopped=dd,this}return q(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=ms)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=ms)},persist:function(){},isPersistent:ms}),n}var cr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ka=ft(cr),so=q({},cr,{view:0,detail:0}),Mx=ft(so),Ea,Na,io,gs=q({},so,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ra,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!==io&&(io&&e.type==="mousemove"?(Ea=e.screenX-io.screenX,Na=e.screenY-io.screenY):Na=Ea=0,io=e),Ea)},movementY:function(e){return"movementY"in e?e.movementY:Na}}),fd=ft(gs),Ix=q({},gs,{dataTransfer:0}),Lx=ft(Ix),Dx=q({},so,{relatedTarget:0}),ja=ft(Dx),Fx=q({},cr,{animationName:0,elapsedTime:0,pseudoElement:0}),$x=ft(Fx),zx=q({},cr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Ux=ft(zx),Hx=q({},cr,{data:0}),pd=ft(Hx),Bx={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Wx={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"},Kx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Vx(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=Kx[e])?!!n[e]:!1}function Ra(){return Vx}var Qx=q({},so,{key:function(e){if(e.key){var n=Bx[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=hs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Wx[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ra,charCode:function(e){return e.type==="keypress"?hs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?hs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Gx=ft(Qx),qx=q({},gs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),hd=ft(qx),Yx=q({},so,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ra}),Xx=ft(Yx),Zx=q({},cr,{propertyName:0,elapsedTime:0,pseudoElement:0}),Jx=ft(Zx),ey=q({},gs,{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}),ty=ft(ey),ny=[9,13,27,32],Pa=h&&"CompositionEvent"in window,ao=null;h&&"documentMode"in document&&(ao=document.documentMode);var ry=h&&"TextEvent"in window&&!ao,md=h&&(!Pa||ao&&8<ao&&11>=ao),gd=" ",vd=!1;function xd(e,n){switch(e){case"keyup":return ny.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function yd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var dr=!1;function oy(e,n){switch(e){case"compositionend":return yd(n);case"keypress":return n.which!==32?null:(vd=!0,gd);case"textInput":return e=n.data,e===gd&&vd?null:e;default:return null}}function sy(e,n){if(dr)return e==="compositionend"||!Pa&&xd(e,n)?(e=cd(),ps=Ca=hn=null,dr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return md&&n.locale!=="ko"?null:n.data;default:return null}}var iy={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 wd(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!iy[e.type]:n==="textarea"}function bd(e,n,s,a){Uc(a),n=bs(n,"onChange"),0<n.length&&(s=new ka("onChange","change",null,s,a),e.push({event:s,listeners:n}))}var lo=null,uo=null;function ay(e){$d(e,0)}function vs(e){var n=gr(e);if(es(n))return e}function ly(e,n){if(e==="change")return n}var Sd=!1;if(h){var Ta;if(h){var _a="oninput"in document;if(!_a){var Cd=document.createElement("div");Cd.setAttribute("oninput","return;"),_a=typeof Cd.oninput=="function"}Ta=_a}else Ta=!1;Sd=Ta&&(!document.documentMode||9<document.documentMode)}function kd(){lo&&(lo.detachEvent("onpropertychange",Ed),uo=lo=null)}function Ed(e){if(e.propertyName==="value"&&vs(uo)){var n=[];bd(n,uo,e,ca(e)),Kc(ay,n)}}function uy(e,n,s){e==="focusin"?(kd(),lo=n,uo=s,lo.attachEvent("onpropertychange",Ed)):e==="focusout"&&kd()}function cy(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return vs(uo)}function dy(e,n){if(e==="click")return vs(n)}function fy(e,n){if(e==="input"||e==="change")return vs(n)}function py(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var Pt=typeof Object.is=="function"?Object.is:py;function co(e,n){if(Pt(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var s=Object.keys(e),a=Object.keys(n);if(s.length!==a.length)return!1;for(a=0;a<s.length;a++){var c=s[a];if(!g.call(n,c)||!Pt(e[c],n[c]))return!1}return!0}function Nd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function jd(e,n){var s=Nd(e);e=0;for(var a;s;){if(s.nodeType===3){if(a=e+s.textContent.length,e<=n&&a>=n)return{node:s,offset:n-e};e=a}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=Nd(s)}}function Rd(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?Rd(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Pd(){for(var e=window,n=Yt();n instanceof e.HTMLIFrameElement;){try{var s=typeof n.contentWindow.location.href=="string"}catch{s=!1}if(s)e=n.contentWindow;else break;n=Yt(e.document)}return n}function Oa(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function hy(e){var n=Pd(),s=e.focusedElem,a=e.selectionRange;if(n!==s&&s&&s.ownerDocument&&Rd(s.ownerDocument.documentElement,s)){if(a!==null&&Oa(s)){if(n=a.start,e=a.end,e===void 0&&(e=n),"selectionStart"in s)s.selectionStart=n,s.selectionEnd=Math.min(e,s.value.length);else if(e=(n=s.ownerDocument||document)&&n.defaultView||window,e.getSelection){e=e.getSelection();var c=s.textContent.length,f=Math.min(a.start,c);a=a.end===void 0?f:Math.min(a.end,c),!e.extend&&f>a&&(c=a,a=f,f=c),c=jd(s,f);var y=jd(s,a);c&&y&&(e.rangeCount!==1||e.anchorNode!==c.node||e.anchorOffset!==c.offset||e.focusNode!==y.node||e.focusOffset!==y.offset)&&(n=n.createRange(),n.setStart(c.node,c.offset),e.removeAllRanges(),f>a?(e.addRange(n),e.extend(y.node,y.offset)):(n.setEnd(y.node,y.offset),e.addRange(n)))}}for(n=[],e=s;e=e.parentNode;)e.nodeType===1&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s<n.length;s++)e=n[s],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var my=h&&"documentMode"in document&&11>=document.documentMode,fr=null,Aa=null,fo=null,Ma=!1;function Td(e,n,s){var a=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Ma||fr==null||fr!==Yt(a)||(a=fr,"selectionStart"in a&&Oa(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),fo&&co(fo,a)||(fo=a,a=bs(Aa,"onSelect"),0<a.length&&(n=new ka("onSelect","select",null,n,s),e.push({event:n,listeners:a}),n.target=fr)))}function xs(e,n){var s={};return s[e.toLowerCase()]=n.toLowerCase(),s["Webkit"+e]="webkit"+n,s["Moz"+e]="moz"+n,s}var pr={animationend:xs("Animation","AnimationEnd"),animationiteration:xs("Animation","AnimationIteration"),animationstart:xs("Animation","AnimationStart"),transitionend:xs("Transition","TransitionEnd")},Ia={},_d={};h&&(_d=document.createElement("div").style,"AnimationEvent"in window||(delete pr.animationend.animation,delete pr.animationiteration.animation,delete pr.animationstart.animation),"TransitionEvent"in window||delete pr.transitionend.transition);function ys(e){if(Ia[e])return Ia[e];if(!pr[e])return e;var n=pr[e],s;for(s in n)if(n.hasOwnProperty(s)&&s in _d)return Ia[e]=n[s];return e}var Od=ys("animationend"),Ad=ys("animationiteration"),Md=ys("animationstart"),Id=ys("transitionend"),Ld=new Map,Dd="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 mn(e,n){Ld.set(e,n),d(n,[e])}for(var La=0;La<Dd.length;La++){var Da=Dd[La],gy=Da.toLowerCase(),vy=Da[0].toUpperCase()+Da.slice(1);mn(gy,"on"+vy)}mn(Od,"onAnimationEnd"),mn(Ad,"onAnimationIteration"),mn(Md,"onAnimationStart"),mn("dblclick","onDoubleClick"),mn("focusin","onFocus"),mn("focusout","onBlur"),mn(Id,"onTransitionEnd"),p("onMouseEnter",["mouseout","mouseover"]),p("onMouseLeave",["mouseout","mouseover"]),p("onPointerEnter",["pointerout","pointerover"]),p("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 po="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(" "),xy=new Set("cancel close invalid load scroll toggle".split(" ").concat(po));function Fd(e,n,s){var a=e.type||"unknown-event";e.currentTarget=s,gx(a,n,void 0,e),e.currentTarget=null}function $d(e,n){n=(n&4)!==0;for(var s=0;s<e.length;s++){var a=e[s],c=a.event;a=a.listeners;e:{var f=void 0;if(n)for(var y=a.length-1;0<=y;y--){var N=a[y],R=N.instance,F=N.currentTarget;if(N=N.listener,R!==f&&c.isPropagationStopped())break e;Fd(c,N,F),f=R}else for(y=0;y<a.length;y++){if(N=a[y],R=N.instance,F=N.currentTarget,N=N.listener,R!==f&&c.isPropagationStopped())break e;Fd(c,N,F),f=R}}}if(rs)throw e=ha,rs=!1,ha=null,e}function Re(e,n){var s=n[Ka];s===void 0&&(s=n[Ka]=new Set);var a=e+"__bubble";s.has(a)||(zd(n,e,2,!1),s.add(a))}function Fa(e,n,s){var a=0;n&&(a|=4),zd(s,e,a,n)}var ws="_reactListening"+Math.random().toString(36).slice(2);function ho(e){if(!e[ws]){e[ws]=!0,i.forEach(function(s){s!=="selectionchange"&&(xy.has(s)||Fa(s,!1,e),Fa(s,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[ws]||(n[ws]=!0,Fa("selectionchange",!1,n))}}function zd(e,n,s,a){switch(ud(n)){case 1:var c=Ox;break;case 4:c=Ax;break;default:c=ba}s=c.bind(null,n,s,e),c=void 0,!pa||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(c=!0),a?c!==void 0?e.addEventListener(n,s,{capture:!0,passive:c}):e.addEventListener(n,s,!0):c!==void 0?e.addEventListener(n,s,{passive:c}):e.addEventListener(n,s,!1)}function $a(e,n,s,a,c){var f=a;if((n&1)===0&&(n&2)===0&&a!==null)e:for(;;){if(a===null)return;var y=a.tag;if(y===3||y===4){var N=a.stateNode.containerInfo;if(N===c||N.nodeType===8&&N.parentNode===c)break;if(y===4)for(y=a.return;y!==null;){var R=y.tag;if((R===3||R===4)&&(R=y.stateNode.containerInfo,R===c||R.nodeType===8&&R.parentNode===c))return;y=y.return}for(;N!==null;){if(y=zn(N),y===null)return;if(R=y.tag,R===5||R===6){a=f=y;continue e}N=N.parentNode}}a=a.return}Kc(function(){var F=f,V=ca(s),G=[];e:{var W=Ld.get(e);if(W!==void 0){var J=ka,re=e;switch(e){case"keypress":if(hs(s)===0)break e;case"keydown":case"keyup":J=Gx;break;case"focusin":re="focus",J=ja;break;case"focusout":re="blur",J=ja;break;case"beforeblur":case"afterblur":J=ja;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":J=fd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":J=Lx;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":J=Xx;break;case Od:case Ad:case Md:J=$x;break;case Id:J=Jx;break;case"scroll":J=Mx;break;case"wheel":J=ty;break;case"copy":case"cut":case"paste":J=Ux;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":J=hd}var oe=(n&4)!==0,Le=!oe&&e==="scroll",M=oe?W!==null?W+"Capture":null:W;oe=[];for(var T=F,L;T!==null;){L=T;var Y=L.stateNode;if(L.tag===5&&Y!==null&&(L=Y,M!==null&&(Y=qr(T,M),Y!=null&&oe.push(mo(T,Y,L)))),Le)break;T=T.return}0<oe.length&&(W=new J(W,re,null,s,V),G.push({event:W,listeners:oe}))}}if((n&7)===0){e:{if(W=e==="mouseover"||e==="pointerover",J=e==="mouseout"||e==="pointerout",W&&s!==ua&&(re=s.relatedTarget||s.fromElement)&&(zn(re)||re[Xt]))break e;if((J||W)&&(W=V.window===V?V:(W=V.ownerDocument)?W.defaultView||W.parentWindow:window,J?(re=s.relatedTarget||s.toElement,J=F,re=re?zn(re):null,re!==null&&(Le=$n(re),re!==Le||re.tag!==5&&re.tag!==6)&&(re=null)):(J=null,re=F),J!==re)){if(oe=fd,Y="onMouseLeave",M="onMouseEnter",T="mouse",(e==="pointerout"||e==="pointerover")&&(oe=hd,Y="onPointerLeave",M="onPointerEnter",T="pointer"),Le=J==null?W:gr(J),L=re==null?W:gr(re),W=new oe(Y,T+"leave",J,s,V),W.target=Le,W.relatedTarget=L,Y=null,zn(V)===F&&(oe=new oe(M,T+"enter",re,s,V),oe.target=L,oe.relatedTarget=Le,Y=oe),Le=Y,J&&re)t:{for(oe=J,M=re,T=0,L=oe;L;L=hr(L))T++;for(L=0,Y=M;Y;Y=hr(Y))L++;for(;0<T-L;)oe=hr(oe),T--;for(;0<L-T;)M=hr(M),L--;for(;T--;){if(oe===M||M!==null&&oe===M.alternate)break t;oe=hr(oe),M=hr(M)}oe=null}else oe=null;J!==null&&Ud(G,W,J,oe,!1),re!==null&&Le!==null&&Ud(G,Le,re,oe,!0)}}e:{if(W=F?gr(F):window,J=W.nodeName&&W.nodeName.toLowerCase(),J==="select"||J==="input"&&W.type==="file")var ie=ly;else if(wd(W))if(Sd)ie=fy;else{ie=cy;var fe=uy}else(J=W.nodeName)&&J.toLowerCase()==="input"&&(W.type==="checkbox"||W.type==="radio")&&(ie=dy);if(ie&&(ie=ie(e,F))){bd(G,ie,s,V);break e}fe&&fe(e,W,F),e==="focusout"&&(fe=W._wrapperState)&&fe.controlled&&W.type==="number"&&oa(W,"number",W.value)}switch(fe=F?gr(F):window,e){case"focusin":(wd(fe)||fe.contentEditable==="true")&&(fr=fe,Aa=F,fo=null);break;case"focusout":fo=Aa=fr=null;break;case"mousedown":Ma=!0;break;case"contextmenu":case"mouseup":case"dragend":Ma=!1,Td(G,s,V);break;case"selectionchange":if(my)break;case"keydown":case"keyup":Td(G,s,V)}var pe;if(Pa)e:{switch(e){case"compositionstart":var ge="onCompositionStart";break e;case"compositionend":ge="onCompositionEnd";break e;case"compositionupdate":ge="onCompositionUpdate";break e}ge=void 0}else dr?xd(e,s)&&(ge="onCompositionEnd"):e==="keydown"&&s.keyCode===229&&(ge="onCompositionStart");ge&&(md&&s.locale!=="ko"&&(dr||ge!=="onCompositionStart"?ge==="onCompositionEnd"&&dr&&(pe=cd()):(hn=V,Ca="value"in hn?hn.value:hn.textContent,dr=!0)),fe=bs(F,ge),0<fe.length&&(ge=new pd(ge,e,null,s,V),G.push({event:ge,listeners:fe}),pe?ge.data=pe:(pe=yd(s),pe!==null&&(ge.data=pe)))),(pe=ry?oy(e,s):sy(e,s))&&(F=bs(F,"onBeforeInput"),0<F.length&&(V=new pd("onBeforeInput","beforeinput",null,s,V),G.push({event:V,listeners:F}),V.data=pe))}$d(G,n)})}function mo(e,n,s){return{instance:e,listener:n,currentTarget:s}}function bs(e,n){for(var s=n+"Capture",a=[];e!==null;){var c=e,f=c.stateNode;c.tag===5&&f!==null&&(c=f,f=qr(e,s),f!=null&&a.unshift(mo(e,f,c)),f=qr(e,n),f!=null&&a.push(mo(e,f,c))),e=e.return}return a}function hr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Ud(e,n,s,a,c){for(var f=n._reactName,y=[];s!==null&&s!==a;){var N=s,R=N.alternate,F=N.stateNode;if(R!==null&&R===a)break;N.tag===5&&F!==null&&(N=F,c?(R=qr(s,f),R!=null&&y.unshift(mo(s,R,N))):c||(R=qr(s,f),R!=null&&y.push(mo(s,R,N)))),s=s.return}y.length!==0&&e.push({event:n,listeners:y})}var yy=/\r\n?/g,wy=/\u0000|\uFFFD/g;function Hd(e){return(typeof e=="string"?e:""+e).replace(yy,`
|
|
6
|
+
`).replace(wy,"")}function Ss(e,n,s){if(n=Hd(n),Hd(e)!==n&&s)throw Error(o(425))}function Cs(){}var za=null,Ua=null;function Ha(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Ba=typeof setTimeout=="function"?setTimeout:void 0,by=typeof clearTimeout=="function"?clearTimeout:void 0,Bd=typeof Promise=="function"?Promise:void 0,Sy=typeof queueMicrotask=="function"?queueMicrotask:typeof Bd<"u"?function(e){return Bd.resolve(null).then(e).catch(Cy)}:Ba;function Cy(e){setTimeout(function(){throw e})}function Wa(e,n){var s=n,a=0;do{var c=s.nextSibling;if(e.removeChild(s),c&&c.nodeType===8)if(s=c.data,s==="/$"){if(a===0){e.removeChild(c),oo(n);return}a--}else s!=="$"&&s!=="$?"&&s!=="$!"||a++;s=c}while(s);oo(n)}function gn(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?")break;if(n==="/$")return null}}return e}function Wd(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var s=e.data;if(s==="$"||s==="$!"||s==="$?"){if(n===0)return e;n--}else s==="/$"&&n++}e=e.previousSibling}return null}var mr=Math.random().toString(36).slice(2),Ut="__reactFiber$"+mr,go="__reactProps$"+mr,Xt="__reactContainer$"+mr,Ka="__reactEvents$"+mr,ky="__reactListeners$"+mr,Ey="__reactHandles$"+mr;function zn(e){var n=e[Ut];if(n)return n;for(var s=e.parentNode;s;){if(n=s[Xt]||s[Ut]){if(s=n.alternate,n.child!==null||s!==null&&s.child!==null)for(e=Wd(e);e!==null;){if(s=e[Ut])return s;e=Wd(e)}return n}e=s,s=e.parentNode}return null}function vo(e){return e=e[Ut]||e[Xt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function gr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(o(33))}function ks(e){return e[go]||null}var Va=[],vr=-1;function vn(e){return{current:e}}function Pe(e){0>vr||(e.current=Va[vr],Va[vr]=null,vr--)}function Ne(e,n){vr++,Va[vr]=e.current,e.current=n}var xn={},qe=vn(xn),it=vn(!1),Un=xn;function xr(e,n){var s=e.type.contextTypes;if(!s)return xn;var a=e.stateNode;if(a&&a.__reactInternalMemoizedUnmaskedChildContext===n)return a.__reactInternalMemoizedMaskedChildContext;var c={},f;for(f in s)c[f]=n[f];return a&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=c),c}function at(e){return e=e.childContextTypes,e!=null}function Es(){Pe(it),Pe(qe)}function Kd(e,n,s){if(qe.current!==xn)throw Error(o(168));Ne(qe,n),Ne(it,s)}function Vd(e,n,s){var a=e.stateNode;if(n=n.childContextTypes,typeof a.getChildContext!="function")return s;a=a.getChildContext();for(var c in a)if(!(c in n))throw Error(o(108,ce(e)||"Unknown",c));return q({},s,a)}function Ns(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||xn,Un=qe.current,Ne(qe,e),Ne(it,it.current),!0}function Qd(e,n,s){var a=e.stateNode;if(!a)throw Error(o(169));s?(e=Vd(e,n,Un),a.__reactInternalMemoizedMergedChildContext=e,Pe(it),Pe(qe),Ne(qe,e)):Pe(it),Ne(it,s)}var Zt=null,js=!1,Qa=!1;function Gd(e){Zt===null?Zt=[e]:Zt.push(e)}function Ny(e){js=!0,Gd(e)}function yn(){if(!Qa&&Zt!==null){Qa=!0;var e=0,n=ke;try{var s=Zt;for(ke=1;e<s.length;e++){var a=s[e];do a=a(!0);while(a!==null)}Zt=null,js=!1}catch(c){throw Zt!==null&&(Zt=Zt.slice(e+1)),Yc(ma,yn),c}finally{ke=n,Qa=!1}}return null}var yr=[],wr=0,Rs=null,Ps=0,wt=[],bt=0,Hn=null,Jt=1,en="";function Bn(e,n){yr[wr++]=Ps,yr[wr++]=Rs,Rs=e,Ps=n}function qd(e,n,s){wt[bt++]=Jt,wt[bt++]=en,wt[bt++]=Hn,Hn=e;var a=Jt;e=en;var c=32-Rt(a)-1;a&=~(1<<c),s+=1;var f=32-Rt(n)+c;if(30<f){var y=c-c%5;f=(a&(1<<y)-1).toString(32),a>>=y,c-=y,Jt=1<<32-Rt(n)+c|s<<c|a,en=f+e}else Jt=1<<f|s<<c|a,en=e}function Ga(e){e.return!==null&&(Bn(e,1),qd(e,1,0))}function qa(e){for(;e===Rs;)Rs=yr[--wr],yr[wr]=null,Ps=yr[--wr],yr[wr]=null;for(;e===Hn;)Hn=wt[--bt],wt[bt]=null,en=wt[--bt],wt[bt]=null,Jt=wt[--bt],wt[bt]=null}var pt=null,ht=null,_e=!1,Tt=null;function Yd(e,n){var s=Et(5,null,null,0);s.elementType="DELETED",s.stateNode=n,s.return=e,n=e.deletions,n===null?(e.deletions=[s],e.flags|=16):n.push(s)}function Xd(e,n){switch(e.tag){case 5:var s=e.type;return n=n.nodeType!==1||s.toLowerCase()!==n.nodeName.toLowerCase()?null:n,n!==null?(e.stateNode=n,pt=e,ht=gn(n.firstChild),!0):!1;case 6:return n=e.pendingProps===""||n.nodeType!==3?null:n,n!==null?(e.stateNode=n,pt=e,ht=null,!0):!1;case 13:return n=n.nodeType!==8?null:n,n!==null?(s=Hn!==null?{id:Jt,overflow:en}:null,e.memoizedState={dehydrated:n,treeContext:s,retryLane:1073741824},s=Et(18,null,null,0),s.stateNode=n,s.return=e,e.child=s,pt=e,ht=null,!0):!1;default:return!1}}function Ya(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Xa(e){if(_e){var n=ht;if(n){var s=n;if(!Xd(e,n)){if(Ya(e))throw Error(o(418));n=gn(s.nextSibling);var a=pt;n&&Xd(e,n)?Yd(a,s):(e.flags=e.flags&-4097|2,_e=!1,pt=e)}}else{if(Ya(e))throw Error(o(418));e.flags=e.flags&-4097|2,_e=!1,pt=e}}}function Zd(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;pt=e}function Ts(e){if(e!==pt)return!1;if(!_e)return Zd(e),_e=!0,!1;var n;if((n=e.tag!==3)&&!(n=e.tag!==5)&&(n=e.type,n=n!=="head"&&n!=="body"&&!Ha(e.type,e.memoizedProps)),n&&(n=ht)){if(Ya(e))throw Jd(),Error(o(418));for(;n;)Yd(e,n),n=gn(n.nextSibling)}if(Zd(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));e:{for(e=e.nextSibling,n=0;e;){if(e.nodeType===8){var s=e.data;if(s==="/$"){if(n===0){ht=gn(e.nextSibling);break e}n--}else s!=="$"&&s!=="$!"&&s!=="$?"||n++}e=e.nextSibling}ht=null}}else ht=pt?gn(e.stateNode.nextSibling):null;return!0}function Jd(){for(var e=ht;e;)e=gn(e.nextSibling)}function br(){ht=pt=null,_e=!1}function Za(e){Tt===null?Tt=[e]:Tt.push(e)}var jy=I.ReactCurrentBatchConfig;function xo(e,n,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(o(309));var a=s.stateNode}if(!a)throw Error(o(147,e));var c=a,f=""+e;return n!==null&&n.ref!==null&&typeof n.ref=="function"&&n.ref._stringRef===f?n.ref:(n=function(y){var N=c.refs;y===null?delete N[f]:N[f]=y},n._stringRef=f,n)}if(typeof e!="string")throw Error(o(284));if(!s._owner)throw Error(o(290,e))}return e}function _s(e,n){throw e=Object.prototype.toString.call(n),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e))}function ef(e){var n=e._init;return n(e._payload)}function tf(e){function n(M,T){if(e){var L=M.deletions;L===null?(M.deletions=[T],M.flags|=16):L.push(T)}}function s(M,T){if(!e)return null;for(;T!==null;)n(M,T),T=T.sibling;return null}function a(M,T){for(M=new Map;T!==null;)T.key!==null?M.set(T.key,T):M.set(T.index,T),T=T.sibling;return M}function c(M,T){return M=jn(M,T),M.index=0,M.sibling=null,M}function f(M,T,L){return M.index=L,e?(L=M.alternate,L!==null?(L=L.index,L<T?(M.flags|=2,T):L):(M.flags|=2,T)):(M.flags|=1048576,T)}function y(M){return e&&M.alternate===null&&(M.flags|=2),M}function N(M,T,L,Y){return T===null||T.tag!==6?(T=Bl(L,M.mode,Y),T.return=M,T):(T=c(T,L),T.return=M,T)}function R(M,T,L,Y){var ie=L.type;return ie===$?V(M,T,L.props.children,Y,L.key):T!==null&&(T.elementType===ie||typeof ie=="object"&&ie!==null&&ie.$$typeof===se&&ef(ie)===T.type)?(Y=c(T,L.props),Y.ref=xo(M,T,L),Y.return=M,Y):(Y=ti(L.type,L.key,L.props,null,M.mode,Y),Y.ref=xo(M,T,L),Y.return=M,Y)}function F(M,T,L,Y){return T===null||T.tag!==4||T.stateNode.containerInfo!==L.containerInfo||T.stateNode.implementation!==L.implementation?(T=Wl(L,M.mode,Y),T.return=M,T):(T=c(T,L.children||[]),T.return=M,T)}function V(M,T,L,Y,ie){return T===null||T.tag!==7?(T=Xn(L,M.mode,Y,ie),T.return=M,T):(T=c(T,L),T.return=M,T)}function G(M,T,L){if(typeof T=="string"&&T!==""||typeof T=="number")return T=Bl(""+T,M.mode,L),T.return=M,T;if(typeof T=="object"&&T!==null){switch(T.$$typeof){case D:return L=ti(T.type,T.key,T.props,null,M.mode,L),L.ref=xo(M,null,T),L.return=M,L;case A:return T=Wl(T,M.mode,L),T.return=M,T;case se:var Y=T._init;return G(M,Y(T._payload),L)}if(Vr(T)||U(T))return T=Xn(T,M.mode,L,null),T.return=M,T;_s(M,T)}return null}function W(M,T,L,Y){var ie=T!==null?T.key:null;if(typeof L=="string"&&L!==""||typeof L=="number")return ie!==null?null:N(M,T,""+L,Y);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case D:return L.key===ie?R(M,T,L,Y):null;case A:return L.key===ie?F(M,T,L,Y):null;case se:return ie=L._init,W(M,T,ie(L._payload),Y)}if(Vr(L)||U(L))return ie!==null?null:V(M,T,L,Y,null);_s(M,L)}return null}function J(M,T,L,Y,ie){if(typeof Y=="string"&&Y!==""||typeof Y=="number")return M=M.get(L)||null,N(T,M,""+Y,ie);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case D:return M=M.get(Y.key===null?L:Y.key)||null,R(T,M,Y,ie);case A:return M=M.get(Y.key===null?L:Y.key)||null,F(T,M,Y,ie);case se:var fe=Y._init;return J(M,T,L,fe(Y._payload),ie)}if(Vr(Y)||U(Y))return M=M.get(L)||null,V(T,M,Y,ie,null);_s(T,Y)}return null}function re(M,T,L,Y){for(var ie=null,fe=null,pe=T,ge=T=0,Ke=null;pe!==null&&ge<L.length;ge++){pe.index>ge?(Ke=pe,pe=null):Ke=pe.sibling;var Ce=W(M,pe,L[ge],Y);if(Ce===null){pe===null&&(pe=Ke);break}e&&pe&&Ce.alternate===null&&n(M,pe),T=f(Ce,T,ge),fe===null?ie=Ce:fe.sibling=Ce,fe=Ce,pe=Ke}if(ge===L.length)return s(M,pe),_e&&Bn(M,ge),ie;if(pe===null){for(;ge<L.length;ge++)pe=G(M,L[ge],Y),pe!==null&&(T=f(pe,T,ge),fe===null?ie=pe:fe.sibling=pe,fe=pe);return _e&&Bn(M,ge),ie}for(pe=a(M,pe);ge<L.length;ge++)Ke=J(pe,M,ge,L[ge],Y),Ke!==null&&(e&&Ke.alternate!==null&&pe.delete(Ke.key===null?ge:Ke.key),T=f(Ke,T,ge),fe===null?ie=Ke:fe.sibling=Ke,fe=Ke);return e&&pe.forEach(function(Rn){return n(M,Rn)}),_e&&Bn(M,ge),ie}function oe(M,T,L,Y){var ie=U(L);if(typeof ie!="function")throw Error(o(150));if(L=ie.call(L),L==null)throw Error(o(151));for(var fe=ie=null,pe=T,ge=T=0,Ke=null,Ce=L.next();pe!==null&&!Ce.done;ge++,Ce=L.next()){pe.index>ge?(Ke=pe,pe=null):Ke=pe.sibling;var Rn=W(M,pe,Ce.value,Y);if(Rn===null){pe===null&&(pe=Ke);break}e&&pe&&Rn.alternate===null&&n(M,pe),T=f(Rn,T,ge),fe===null?ie=Rn:fe.sibling=Rn,fe=Rn,pe=Ke}if(Ce.done)return s(M,pe),_e&&Bn(M,ge),ie;if(pe===null){for(;!Ce.done;ge++,Ce=L.next())Ce=G(M,Ce.value,Y),Ce!==null&&(T=f(Ce,T,ge),fe===null?ie=Ce:fe.sibling=Ce,fe=Ce);return _e&&Bn(M,ge),ie}for(pe=a(M,pe);!Ce.done;ge++,Ce=L.next())Ce=J(pe,M,ge,Ce.value,Y),Ce!==null&&(e&&Ce.alternate!==null&&pe.delete(Ce.key===null?ge:Ce.key),T=f(Ce,T,ge),fe===null?ie=Ce:fe.sibling=Ce,fe=Ce);return e&&pe.forEach(function(iw){return n(M,iw)}),_e&&Bn(M,ge),ie}function Le(M,T,L,Y){if(typeof L=="object"&&L!==null&&L.type===$&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case D:e:{for(var ie=L.key,fe=T;fe!==null;){if(fe.key===ie){if(ie=L.type,ie===$){if(fe.tag===7){s(M,fe.sibling),T=c(fe,L.props.children),T.return=M,M=T;break e}}else if(fe.elementType===ie||typeof ie=="object"&&ie!==null&&ie.$$typeof===se&&ef(ie)===fe.type){s(M,fe.sibling),T=c(fe,L.props),T.ref=xo(M,fe,L),T.return=M,M=T;break e}s(M,fe);break}else n(M,fe);fe=fe.sibling}L.type===$?(T=Xn(L.props.children,M.mode,Y,L.key),T.return=M,M=T):(Y=ti(L.type,L.key,L.props,null,M.mode,Y),Y.ref=xo(M,T,L),Y.return=M,M=Y)}return y(M);case A:e:{for(fe=L.key;T!==null;){if(T.key===fe)if(T.tag===4&&T.stateNode.containerInfo===L.containerInfo&&T.stateNode.implementation===L.implementation){s(M,T.sibling),T=c(T,L.children||[]),T.return=M,M=T;break e}else{s(M,T);break}else n(M,T);T=T.sibling}T=Wl(L,M.mode,Y),T.return=M,M=T}return y(M);case se:return fe=L._init,Le(M,T,fe(L._payload),Y)}if(Vr(L))return re(M,T,L,Y);if(U(L))return oe(M,T,L,Y);_s(M,L)}return typeof L=="string"&&L!==""||typeof L=="number"?(L=""+L,T!==null&&T.tag===6?(s(M,T.sibling),T=c(T,L),T.return=M,M=T):(s(M,T),T=Bl(L,M.mode,Y),T.return=M,M=T),y(M)):s(M,T)}return Le}var Sr=tf(!0),nf=tf(!1),Os=vn(null),As=null,Cr=null,Ja=null;function el(){Ja=Cr=As=null}function tl(e){var n=Os.current;Pe(Os),e._currentValue=n}function nl(e,n,s){for(;e!==null;){var a=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,a!==null&&(a.childLanes|=n)):a!==null&&(a.childLanes&n)!==n&&(a.childLanes|=n),e===s)break;e=e.return}}function kr(e,n){As=e,Ja=Cr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&n)!==0&&(lt=!0),e.firstContext=null)}function St(e){var n=e._currentValue;if(Ja!==e)if(e={context:e,memoizedValue:n,next:null},Cr===null){if(As===null)throw Error(o(308));Cr=e,As.dependencies={lanes:0,firstContext:e}}else Cr=Cr.next=e;return n}var Wn=null;function rl(e){Wn===null?Wn=[e]:Wn.push(e)}function rf(e,n,s,a){var c=n.interleaved;return c===null?(s.next=s,rl(n)):(s.next=c.next,c.next=s),n.interleaved=s,tn(e,a)}function tn(e,n){e.lanes|=n;var s=e.alternate;for(s!==null&&(s.lanes|=n),s=e,e=e.return;e!==null;)e.childLanes|=n,s=e.alternate,s!==null&&(s.childLanes|=n),s=e,e=e.return;return s.tag===3?s.stateNode:null}var wn=!1;function ol(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function of(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function nn(e,n){return{eventTime:e,lane:n,tag:0,payload:null,callback:null,next:null}}function bn(e,n,s){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(Se&2)!==0){var c=a.pending;return c===null?n.next=n:(n.next=c.next,c.next=n),a.pending=n,tn(e,s)}return c=a.interleaved,c===null?(n.next=n,rl(a)):(n.next=c.next,c.next=n),a.interleaved=n,tn(e,s)}function Ms(e,n,s){if(n=n.updateQueue,n!==null&&(n=n.shared,(s&4194240)!==0)){var a=n.lanes;a&=e.pendingLanes,s|=a,n.lanes=s,xa(e,s)}}function sf(e,n){var s=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,s===a)){var c=null,f=null;if(s=s.firstBaseUpdate,s!==null){do{var y={eventTime:s.eventTime,lane:s.lane,tag:s.tag,payload:s.payload,callback:s.callback,next:null};f===null?c=f=y:f=f.next=y,s=s.next}while(s!==null);f===null?c=f=n:f=f.next=n}else c=f=n;s={baseState:a.baseState,firstBaseUpdate:c,lastBaseUpdate:f,shared:a.shared,effects:a.effects},e.updateQueue=s;return}e=s.lastBaseUpdate,e===null?s.firstBaseUpdate=n:e.next=n,s.lastBaseUpdate=n}function Is(e,n,s,a){var c=e.updateQueue;wn=!1;var f=c.firstBaseUpdate,y=c.lastBaseUpdate,N=c.shared.pending;if(N!==null){c.shared.pending=null;var R=N,F=R.next;R.next=null,y===null?f=F:y.next=F,y=R;var V=e.alternate;V!==null&&(V=V.updateQueue,N=V.lastBaseUpdate,N!==y&&(N===null?V.firstBaseUpdate=F:N.next=F,V.lastBaseUpdate=R))}if(f!==null){var G=c.baseState;y=0,V=F=R=null,N=f;do{var W=N.lane,J=N.eventTime;if((a&W)===W){V!==null&&(V=V.next={eventTime:J,lane:0,tag:N.tag,payload:N.payload,callback:N.callback,next:null});e:{var re=e,oe=N;switch(W=n,J=s,oe.tag){case 1:if(re=oe.payload,typeof re=="function"){G=re.call(J,G,W);break e}G=re;break e;case 3:re.flags=re.flags&-65537|128;case 0:if(re=oe.payload,W=typeof re=="function"?re.call(J,G,W):re,W==null)break e;G=q({},G,W);break e;case 2:wn=!0}}N.callback!==null&&N.lane!==0&&(e.flags|=64,W=c.effects,W===null?c.effects=[N]:W.push(N))}else J={eventTime:J,lane:W,tag:N.tag,payload:N.payload,callback:N.callback,next:null},V===null?(F=V=J,R=G):V=V.next=J,y|=W;if(N=N.next,N===null){if(N=c.shared.pending,N===null)break;W=N,N=W.next,W.next=null,c.lastBaseUpdate=W,c.shared.pending=null}}while(!0);if(V===null&&(R=G),c.baseState=R,c.firstBaseUpdate=F,c.lastBaseUpdate=V,n=c.shared.interleaved,n!==null){c=n;do y|=c.lane,c=c.next;while(c!==n)}else f===null&&(c.shared.lanes=0);Qn|=y,e.lanes=y,e.memoizedState=G}}function af(e,n,s){if(e=n.effects,n.effects=null,e!==null)for(n=0;n<e.length;n++){var a=e[n],c=a.callback;if(c!==null){if(a.callback=null,a=s,typeof c!="function")throw Error(o(191,c));c.call(a)}}}var yo={},Ht=vn(yo),wo=vn(yo),bo=vn(yo);function Kn(e){if(e===yo)throw Error(o(174));return e}function sl(e,n){switch(Ne(bo,n),Ne(wo,e),Ne(Ht,yo),e=n.nodeType,e){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:ia(null,"");break;default:e=e===8?n.parentNode:n,n=e.namespaceURI||null,e=e.tagName,n=ia(n,e)}Pe(Ht),Ne(Ht,n)}function Er(){Pe(Ht),Pe(wo),Pe(bo)}function lf(e){Kn(bo.current);var n=Kn(Ht.current),s=ia(n,e.type);n!==s&&(Ne(wo,e),Ne(Ht,s))}function il(e){wo.current===e&&(Pe(Ht),Pe(wo))}var Oe=vn(0);function Ls(e){for(var n=e;n!==null;){if(n.tag===13){var s=n.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||s.data==="$?"||s.data==="$!"))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var al=[];function ll(){for(var e=0;e<al.length;e++)al[e]._workInProgressVersionPrimary=null;al.length=0}var Ds=I.ReactCurrentDispatcher,ul=I.ReactCurrentBatchConfig,Vn=0,Ae=null,$e=null,Be=null,Fs=!1,So=!1,Co=0,Ry=0;function Ye(){throw Error(o(321))}function cl(e,n){if(n===null)return!1;for(var s=0;s<n.length&&s<e.length;s++)if(!Pt(e[s],n[s]))return!1;return!0}function dl(e,n,s,a,c,f){if(Vn=f,Ae=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,Ds.current=e===null||e.memoizedState===null?Oy:Ay,e=s(a,c),So){f=0;do{if(So=!1,Co=0,25<=f)throw Error(o(301));f+=1,Be=$e=null,n.updateQueue=null,Ds.current=My,e=s(a,c)}while(So)}if(Ds.current=Us,n=$e!==null&&$e.next!==null,Vn=0,Be=$e=Ae=null,Fs=!1,n)throw Error(o(300));return e}function fl(){var e=Co!==0;return Co=0,e}function Bt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Be===null?Ae.memoizedState=Be=e:Be=Be.next=e,Be}function Ct(){if($e===null){var e=Ae.alternate;e=e!==null?e.memoizedState:null}else e=$e.next;var n=Be===null?Ae.memoizedState:Be.next;if(n!==null)Be=n,$e=e;else{if(e===null)throw Error(o(310));$e=e,e={memoizedState:$e.memoizedState,baseState:$e.baseState,baseQueue:$e.baseQueue,queue:$e.queue,next:null},Be===null?Ae.memoizedState=Be=e:Be=Be.next=e}return Be}function ko(e,n){return typeof n=="function"?n(e):n}function pl(e){var n=Ct(),s=n.queue;if(s===null)throw Error(o(311));s.lastRenderedReducer=e;var a=$e,c=a.baseQueue,f=s.pending;if(f!==null){if(c!==null){var y=c.next;c.next=f.next,f.next=y}a.baseQueue=c=f,s.pending=null}if(c!==null){f=c.next,a=a.baseState;var N=y=null,R=null,F=f;do{var V=F.lane;if((Vn&V)===V)R!==null&&(R=R.next={lane:0,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null}),a=F.hasEagerState?F.eagerState:e(a,F.action);else{var G={lane:V,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null};R===null?(N=R=G,y=a):R=R.next=G,Ae.lanes|=V,Qn|=V}F=F.next}while(F!==null&&F!==f);R===null?y=a:R.next=N,Pt(a,n.memoizedState)||(lt=!0),n.memoizedState=a,n.baseState=y,n.baseQueue=R,s.lastRenderedState=a}if(e=s.interleaved,e!==null){c=e;do f=c.lane,Ae.lanes|=f,Qn|=f,c=c.next;while(c!==e)}else c===null&&(s.lanes=0);return[n.memoizedState,s.dispatch]}function hl(e){var n=Ct(),s=n.queue;if(s===null)throw Error(o(311));s.lastRenderedReducer=e;var a=s.dispatch,c=s.pending,f=n.memoizedState;if(c!==null){s.pending=null;var y=c=c.next;do f=e(f,y.action),y=y.next;while(y!==c);Pt(f,n.memoizedState)||(lt=!0),n.memoizedState=f,n.baseQueue===null&&(n.baseState=f),s.lastRenderedState=f}return[f,a]}function uf(){}function cf(e,n){var s=Ae,a=Ct(),c=n(),f=!Pt(a.memoizedState,c);if(f&&(a.memoizedState=c,lt=!0),a=a.queue,ml(pf.bind(null,s,a,e),[e]),a.getSnapshot!==n||f||Be!==null&&Be.memoizedState.tag&1){if(s.flags|=2048,Eo(9,ff.bind(null,s,a,c,n),void 0,null),We===null)throw Error(o(349));(Vn&30)!==0||df(s,n,c)}return c}function df(e,n,s){e.flags|=16384,e={getSnapshot:n,value:s},n=Ae.updateQueue,n===null?(n={lastEffect:null,stores:null},Ae.updateQueue=n,n.stores=[e]):(s=n.stores,s===null?n.stores=[e]:s.push(e))}function ff(e,n,s,a){n.value=s,n.getSnapshot=a,hf(n)&&mf(e)}function pf(e,n,s){return s(function(){hf(n)&&mf(e)})}function hf(e){var n=e.getSnapshot;e=e.value;try{var s=n();return!Pt(e,s)}catch{return!0}}function mf(e){var n=tn(e,1);n!==null&&Mt(n,e,1,-1)}function gf(e){var n=Bt();return typeof e=="function"&&(e=e()),n.memoizedState=n.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ko,lastRenderedState:e},n.queue=e,e=e.dispatch=_y.bind(null,Ae,e),[n.memoizedState,e]}function Eo(e,n,s,a){return e={tag:e,create:n,destroy:s,deps:a,next:null},n=Ae.updateQueue,n===null?(n={lastEffect:null,stores:null},Ae.updateQueue=n,n.lastEffect=e.next=e):(s=n.lastEffect,s===null?n.lastEffect=e.next=e:(a=s.next,s.next=e,e.next=a,n.lastEffect=e)),e}function vf(){return Ct().memoizedState}function $s(e,n,s,a){var c=Bt();Ae.flags|=e,c.memoizedState=Eo(1|n,s,void 0,a===void 0?null:a)}function zs(e,n,s,a){var c=Ct();a=a===void 0?null:a;var f=void 0;if($e!==null){var y=$e.memoizedState;if(f=y.destroy,a!==null&&cl(a,y.deps)){c.memoizedState=Eo(n,s,f,a);return}}Ae.flags|=e,c.memoizedState=Eo(1|n,s,f,a)}function xf(e,n){return $s(8390656,8,e,n)}function ml(e,n){return zs(2048,8,e,n)}function yf(e,n){return zs(4,2,e,n)}function wf(e,n){return zs(4,4,e,n)}function bf(e,n){if(typeof n=="function")return e=e(),n(e),function(){n(null)};if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function Sf(e,n,s){return s=s!=null?s.concat([e]):null,zs(4,4,bf.bind(null,n,e),s)}function gl(){}function Cf(e,n){var s=Ct();n=n===void 0?null:n;var a=s.memoizedState;return a!==null&&n!==null&&cl(n,a[1])?a[0]:(s.memoizedState=[e,n],e)}function kf(e,n){var s=Ct();n=n===void 0?null:n;var a=s.memoizedState;return a!==null&&n!==null&&cl(n,a[1])?a[0]:(e=e(),s.memoizedState=[e,n],e)}function Ef(e,n,s){return(Vn&21)===0?(e.baseState&&(e.baseState=!1,lt=!0),e.memoizedState=s):(Pt(s,n)||(s=ed(),Ae.lanes|=s,Qn|=s,e.baseState=!0),n)}function Py(e,n){var s=ke;ke=s!==0&&4>s?s:4,e(!0);var a=ul.transition;ul.transition={};try{e(!1),n()}finally{ke=s,ul.transition=a}}function Nf(){return Ct().memoizedState}function Ty(e,n,s){var a=En(e);if(s={lane:a,action:s,hasEagerState:!1,eagerState:null,next:null},jf(e))Rf(n,s);else if(s=rf(e,n,s,a),s!==null){var c=rt();Mt(s,e,a,c),Pf(s,n,a)}}function _y(e,n,s){var a=En(e),c={lane:a,action:s,hasEagerState:!1,eagerState:null,next:null};if(jf(e))Rf(n,c);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=n.lastRenderedReducer,f!==null))try{var y=n.lastRenderedState,N=f(y,s);if(c.hasEagerState=!0,c.eagerState=N,Pt(N,y)){var R=n.interleaved;R===null?(c.next=c,rl(n)):(c.next=R.next,R.next=c),n.interleaved=c;return}}catch{}s=rf(e,n,c,a),s!==null&&(c=rt(),Mt(s,e,a,c),Pf(s,n,a))}}function jf(e){var n=e.alternate;return e===Ae||n!==null&&n===Ae}function Rf(e,n){So=Fs=!0;var s=e.pending;s===null?n.next=n:(n.next=s.next,s.next=n),e.pending=n}function Pf(e,n,s){if((s&4194240)!==0){var a=n.lanes;a&=e.pendingLanes,s|=a,n.lanes=s,xa(e,s)}}var Us={readContext:St,useCallback:Ye,useContext:Ye,useEffect:Ye,useImperativeHandle:Ye,useInsertionEffect:Ye,useLayoutEffect:Ye,useMemo:Ye,useReducer:Ye,useRef:Ye,useState:Ye,useDebugValue:Ye,useDeferredValue:Ye,useTransition:Ye,useMutableSource:Ye,useSyncExternalStore:Ye,useId:Ye,unstable_isNewReconciler:!1},Oy={readContext:St,useCallback:function(e,n){return Bt().memoizedState=[e,n===void 0?null:n],e},useContext:St,useEffect:xf,useImperativeHandle:function(e,n,s){return s=s!=null?s.concat([e]):null,$s(4194308,4,bf.bind(null,n,e),s)},useLayoutEffect:function(e,n){return $s(4194308,4,e,n)},useInsertionEffect:function(e,n){return $s(4,2,e,n)},useMemo:function(e,n){var s=Bt();return n=n===void 0?null:n,e=e(),s.memoizedState=[e,n],e},useReducer:function(e,n,s){var a=Bt();return n=s!==void 0?s(n):n,a.memoizedState=a.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},a.queue=e,e=e.dispatch=Ty.bind(null,Ae,e),[a.memoizedState,e]},useRef:function(e){var n=Bt();return e={current:e},n.memoizedState=e},useState:gf,useDebugValue:gl,useDeferredValue:function(e){return Bt().memoizedState=e},useTransition:function(){var e=gf(!1),n=e[0];return e=Py.bind(null,e[1]),Bt().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,s){var a=Ae,c=Bt();if(_e){if(s===void 0)throw Error(o(407));s=s()}else{if(s=n(),We===null)throw Error(o(349));(Vn&30)!==0||df(a,n,s)}c.memoizedState=s;var f={value:s,getSnapshot:n};return c.queue=f,xf(pf.bind(null,a,f,e),[e]),a.flags|=2048,Eo(9,ff.bind(null,a,f,s,n),void 0,null),s},useId:function(){var e=Bt(),n=We.identifierPrefix;if(_e){var s=en,a=Jt;s=(a&~(1<<32-Rt(a)-1)).toString(32)+s,n=":"+n+"R"+s,s=Co++,0<s&&(n+="H"+s.toString(32)),n+=":"}else s=Ry++,n=":"+n+"r"+s.toString(32)+":";return e.memoizedState=n},unstable_isNewReconciler:!1},Ay={readContext:St,useCallback:Cf,useContext:St,useEffect:ml,useImperativeHandle:Sf,useInsertionEffect:yf,useLayoutEffect:wf,useMemo:kf,useReducer:pl,useRef:vf,useState:function(){return pl(ko)},useDebugValue:gl,useDeferredValue:function(e){var n=Ct();return Ef(n,$e.memoizedState,e)},useTransition:function(){var e=pl(ko)[0],n=Ct().memoizedState;return[e,n]},useMutableSource:uf,useSyncExternalStore:cf,useId:Nf,unstable_isNewReconciler:!1},My={readContext:St,useCallback:Cf,useContext:St,useEffect:ml,useImperativeHandle:Sf,useInsertionEffect:yf,useLayoutEffect:wf,useMemo:kf,useReducer:hl,useRef:vf,useState:function(){return hl(ko)},useDebugValue:gl,useDeferredValue:function(e){var n=Ct();return $e===null?n.memoizedState=e:Ef(n,$e.memoizedState,e)},useTransition:function(){var e=hl(ko)[0],n=Ct().memoizedState;return[e,n]},useMutableSource:uf,useSyncExternalStore:cf,useId:Nf,unstable_isNewReconciler:!1};function _t(e,n){if(e&&e.defaultProps){n=q({},n),e=e.defaultProps;for(var s in e)n[s]===void 0&&(n[s]=e[s]);return n}return n}function vl(e,n,s,a){n=e.memoizedState,s=s(a,n),s=s==null?n:q({},n,s),e.memoizedState=s,e.lanes===0&&(e.updateQueue.baseState=s)}var Hs={isMounted:function(e){return(e=e._reactInternals)?$n(e)===e:!1},enqueueSetState:function(e,n,s){e=e._reactInternals;var a=rt(),c=En(e),f=nn(a,c);f.payload=n,s!=null&&(f.callback=s),n=bn(e,f,c),n!==null&&(Mt(n,e,c,a),Ms(n,e,c))},enqueueReplaceState:function(e,n,s){e=e._reactInternals;var a=rt(),c=En(e),f=nn(a,c);f.tag=1,f.payload=n,s!=null&&(f.callback=s),n=bn(e,f,c),n!==null&&(Mt(n,e,c,a),Ms(n,e,c))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var s=rt(),a=En(e),c=nn(s,a);c.tag=2,n!=null&&(c.callback=n),n=bn(e,c,a),n!==null&&(Mt(n,e,a,s),Ms(n,e,a))}};function Tf(e,n,s,a,c,f,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,f,y):n.prototype&&n.prototype.isPureReactComponent?!co(s,a)||!co(c,f):!0}function _f(e,n,s){var a=!1,c=xn,f=n.contextType;return typeof f=="object"&&f!==null?f=St(f):(c=at(n)?Un:qe.current,a=n.contextTypes,f=(a=a!=null)?xr(e,c):xn),n=new n(s,f),e.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=Hs,e.stateNode=n,n._reactInternals=e,a&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=c,e.__reactInternalMemoizedMaskedChildContext=f),n}function Of(e,n,s,a){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(s,a),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(s,a),n.state!==e&&Hs.enqueueReplaceState(n,n.state,null)}function xl(e,n,s,a){var c=e.stateNode;c.props=s,c.state=e.memoizedState,c.refs={},ol(e);var f=n.contextType;typeof f=="object"&&f!==null?c.context=St(f):(f=at(n)?Un:qe.current,c.context=xr(e,f)),c.state=e.memoizedState,f=n.getDerivedStateFromProps,typeof f=="function"&&(vl(e,n,f,s),c.state=e.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(n=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),n!==c.state&&Hs.enqueueReplaceState(c,c.state,null),Is(e,s,c,a),c.state=e.memoizedState),typeof c.componentDidMount=="function"&&(e.flags|=4194308)}function Nr(e,n){try{var s="",a=n;do s+=H(a),a=a.return;while(a);var c=s}catch(f){c=`
|
|
7
|
+
Error generating stack: `+f.message+`
|
|
8
|
+
`+f.stack}return{value:e,source:n,stack:c,digest:null}}function yl(e,n,s){return{value:e,source:null,stack:s??null,digest:n??null}}function wl(e,n){try{console.error(n.value)}catch(s){setTimeout(function(){throw s})}}var Iy=typeof WeakMap=="function"?WeakMap:Map;function Af(e,n,s){s=nn(-1,s),s.tag=3,s.payload={element:null};var a=n.value;return s.callback=function(){qs||(qs=!0,Il=a),wl(e,n)},s}function Mf(e,n,s){s=nn(-1,s),s.tag=3;var a=e.type.getDerivedStateFromError;if(typeof a=="function"){var c=n.value;s.payload=function(){return a(c)},s.callback=function(){wl(e,n)}}var f=e.stateNode;return f!==null&&typeof f.componentDidCatch=="function"&&(s.callback=function(){wl(e,n),typeof a!="function"&&(Cn===null?Cn=new Set([this]):Cn.add(this));var y=n.stack;this.componentDidCatch(n.value,{componentStack:y!==null?y:""})}),s}function If(e,n,s){var a=e.pingCache;if(a===null){a=e.pingCache=new Iy;var c=new Set;a.set(n,c)}else c=a.get(n),c===void 0&&(c=new Set,a.set(n,c));c.has(s)||(c.add(s),e=qy.bind(null,e,n,s),n.then(e,e))}function Lf(e){do{var n;if((n=e.tag===13)&&(n=e.memoizedState,n=n!==null?n.dehydrated!==null:!0),n)return e;e=e.return}while(e!==null);return null}function Df(e,n,s,a,c){return(e.mode&1)===0?(e===n?e.flags|=65536:(e.flags|=128,s.flags|=131072,s.flags&=-52805,s.tag===1&&(s.alternate===null?s.tag=17:(n=nn(-1,1),n.tag=2,bn(s,n,1))),s.lanes|=1),e):(e.flags|=65536,e.lanes=c,e)}var Ly=I.ReactCurrentOwner,lt=!1;function nt(e,n,s,a){n.child=e===null?nf(n,null,s,a):Sr(n,e.child,s,a)}function Ff(e,n,s,a,c){s=s.render;var f=n.ref;return kr(n,c),a=dl(e,n,s,a,f,c),s=fl(),e!==null&&!lt?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~c,rn(e,n,c)):(_e&&s&&Ga(n),n.flags|=1,nt(e,n,a,c),n.child)}function $f(e,n,s,a,c){if(e===null){var f=s.type;return typeof f=="function"&&!Hl(f)&&f.defaultProps===void 0&&s.compare===null&&s.defaultProps===void 0?(n.tag=15,n.type=f,zf(e,n,f,a,c)):(e=ti(s.type,null,a,n,n.mode,c),e.ref=n.ref,e.return=n,n.child=e)}if(f=e.child,(e.lanes&c)===0){var y=f.memoizedProps;if(s=s.compare,s=s!==null?s:co,s(y,a)&&e.ref===n.ref)return rn(e,n,c)}return n.flags|=1,e=jn(f,a),e.ref=n.ref,e.return=n,n.child=e}function zf(e,n,s,a,c){if(e!==null){var f=e.memoizedProps;if(co(f,a)&&e.ref===n.ref)if(lt=!1,n.pendingProps=a=f,(e.lanes&c)!==0)(e.flags&131072)!==0&&(lt=!0);else return n.lanes=e.lanes,rn(e,n,c)}return bl(e,n,s,a,c)}function Uf(e,n,s){var a=n.pendingProps,c=a.children,f=e!==null?e.memoizedState:null;if(a.mode==="hidden")if((n.mode&1)===0)n.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ne(Rr,mt),mt|=s;else{if((s&1073741824)===0)return e=f!==null?f.baseLanes|s:s,n.lanes=n.childLanes=1073741824,n.memoizedState={baseLanes:e,cachePool:null,transitions:null},n.updateQueue=null,Ne(Rr,mt),mt|=e,null;n.memoizedState={baseLanes:0,cachePool:null,transitions:null},a=f!==null?f.baseLanes:s,Ne(Rr,mt),mt|=a}else f!==null?(a=f.baseLanes|s,n.memoizedState=null):a=s,Ne(Rr,mt),mt|=a;return nt(e,n,c,s),n.child}function Hf(e,n){var s=n.ref;(e===null&&s!==null||e!==null&&e.ref!==s)&&(n.flags|=512,n.flags|=2097152)}function bl(e,n,s,a,c){var f=at(s)?Un:qe.current;return f=xr(n,f),kr(n,c),s=dl(e,n,s,a,f,c),a=fl(),e!==null&&!lt?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~c,rn(e,n,c)):(_e&&a&&Ga(n),n.flags|=1,nt(e,n,s,c),n.child)}function Bf(e,n,s,a,c){if(at(s)){var f=!0;Ns(n)}else f=!1;if(kr(n,c),n.stateNode===null)Ws(e,n),_f(n,s,a),xl(n,s,a,c),a=!0;else if(e===null){var y=n.stateNode,N=n.memoizedProps;y.props=N;var R=y.context,F=s.contextType;typeof F=="object"&&F!==null?F=St(F):(F=at(s)?Un:qe.current,F=xr(n,F));var V=s.getDerivedStateFromProps,G=typeof V=="function"||typeof y.getSnapshotBeforeUpdate=="function";G||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(N!==a||R!==F)&&Of(n,y,a,F),wn=!1;var W=n.memoizedState;y.state=W,Is(n,a,y,c),R=n.memoizedState,N!==a||W!==R||it.current||wn?(typeof V=="function"&&(vl(n,s,V,a),R=n.memoizedState),(N=wn||Tf(n,s,N,a,W,R,F))?(G||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount()),typeof y.componentDidMount=="function"&&(n.flags|=4194308)):(typeof y.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=a,n.memoizedState=R),y.props=a,y.state=R,y.context=F,a=N):(typeof y.componentDidMount=="function"&&(n.flags|=4194308),a=!1)}else{y=n.stateNode,of(e,n),N=n.memoizedProps,F=n.type===n.elementType?N:_t(n.type,N),y.props=F,G=n.pendingProps,W=y.context,R=s.contextType,typeof R=="object"&&R!==null?R=St(R):(R=at(s)?Un:qe.current,R=xr(n,R));var J=s.getDerivedStateFromProps;(V=typeof J=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(N!==G||W!==R)&&Of(n,y,a,R),wn=!1,W=n.memoizedState,y.state=W,Is(n,a,y,c);var re=n.memoizedState;N!==G||W!==re||it.current||wn?(typeof J=="function"&&(vl(n,s,J,a),re=n.memoizedState),(F=wn||Tf(n,s,F,a,W,re,R)||!1)?(V||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(a,re,R),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(a,re,R)),typeof y.componentDidUpdate=="function"&&(n.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof y.componentDidUpdate!="function"||N===e.memoizedProps&&W===e.memoizedState||(n.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||N===e.memoizedProps&&W===e.memoizedState||(n.flags|=1024),n.memoizedProps=a,n.memoizedState=re),y.props=a,y.state=re,y.context=R,a=F):(typeof y.componentDidUpdate!="function"||N===e.memoizedProps&&W===e.memoizedState||(n.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||N===e.memoizedProps&&W===e.memoizedState||(n.flags|=1024),a=!1)}return Sl(e,n,s,a,f,c)}function Sl(e,n,s,a,c,f){Hf(e,n);var y=(n.flags&128)!==0;if(!a&&!y)return c&&Qd(n,s,!1),rn(e,n,f);a=n.stateNode,Ly.current=n;var N=y&&typeof s.getDerivedStateFromError!="function"?null:a.render();return n.flags|=1,e!==null&&y?(n.child=Sr(n,e.child,null,f),n.child=Sr(n,null,N,f)):nt(e,n,N,f),n.memoizedState=a.state,c&&Qd(n,s,!0),n.child}function Wf(e){var n=e.stateNode;n.pendingContext?Kd(e,n.pendingContext,n.pendingContext!==n.context):n.context&&Kd(e,n.context,!1),sl(e,n.containerInfo)}function Kf(e,n,s,a,c){return br(),Za(c),n.flags|=256,nt(e,n,s,a),n.child}var Cl={dehydrated:null,treeContext:null,retryLane:0};function kl(e){return{baseLanes:e,cachePool:null,transitions:null}}function Vf(e,n,s){var a=n.pendingProps,c=Oe.current,f=!1,y=(n.flags&128)!==0,N;if((N=y)||(N=e!==null&&e.memoizedState===null?!1:(c&2)!==0),N?(f=!0,n.flags&=-129):(e===null||e.memoizedState!==null)&&(c|=1),Ne(Oe,c&1),e===null)return Xa(n),e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((n.mode&1)===0?n.lanes=1:e.data==="$!"?n.lanes=8:n.lanes=1073741824,null):(y=a.children,e=a.fallback,f?(a=n.mode,f=n.child,y={mode:"hidden",children:y},(a&1)===0&&f!==null?(f.childLanes=0,f.pendingProps=y):f=ni(y,a,0,null),e=Xn(e,a,s,null),f.return=n,e.return=n,f.sibling=e,n.child=f,n.child.memoizedState=kl(s),n.memoizedState=Cl,e):El(n,y));if(c=e.memoizedState,c!==null&&(N=c.dehydrated,N!==null))return Dy(e,n,y,a,N,c,s);if(f){f=a.fallback,y=n.mode,c=e.child,N=c.sibling;var R={mode:"hidden",children:a.children};return(y&1)===0&&n.child!==c?(a=n.child,a.childLanes=0,a.pendingProps=R,n.deletions=null):(a=jn(c,R),a.subtreeFlags=c.subtreeFlags&14680064),N!==null?f=jn(N,f):(f=Xn(f,y,s,null),f.flags|=2),f.return=n,a.return=n,a.sibling=f,n.child=a,a=f,f=n.child,y=e.child.memoizedState,y=y===null?kl(s):{baseLanes:y.baseLanes|s,cachePool:null,transitions:y.transitions},f.memoizedState=y,f.childLanes=e.childLanes&~s,n.memoizedState=Cl,a}return f=e.child,e=f.sibling,a=jn(f,{mode:"visible",children:a.children}),(n.mode&1)===0&&(a.lanes=s),a.return=n,a.sibling=null,e!==null&&(s=n.deletions,s===null?(n.deletions=[e],n.flags|=16):s.push(e)),n.child=a,n.memoizedState=null,a}function El(e,n){return n=ni({mode:"visible",children:n},e.mode,0,null),n.return=e,e.child=n}function Bs(e,n,s,a){return a!==null&&Za(a),Sr(n,e.child,null,s),e=El(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function Dy(e,n,s,a,c,f,y){if(s)return n.flags&256?(n.flags&=-257,a=yl(Error(o(422))),Bs(e,n,y,a)):n.memoizedState!==null?(n.child=e.child,n.flags|=128,null):(f=a.fallback,c=n.mode,a=ni({mode:"visible",children:a.children},c,0,null),f=Xn(f,c,y,null),f.flags|=2,a.return=n,f.return=n,a.sibling=f,n.child=a,(n.mode&1)!==0&&Sr(n,e.child,null,y),n.child.memoizedState=kl(y),n.memoizedState=Cl,f);if((n.mode&1)===0)return Bs(e,n,y,null);if(c.data==="$!"){if(a=c.nextSibling&&c.nextSibling.dataset,a)var N=a.dgst;return a=N,f=Error(o(419)),a=yl(f,a,void 0),Bs(e,n,y,a)}if(N=(y&e.childLanes)!==0,lt||N){if(a=We,a!==null){switch(y&-y){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&(a.suspendedLanes|y))!==0?0:c,c!==0&&c!==f.retryLane&&(f.retryLane=c,tn(e,c),Mt(a,e,c,-1))}return Ul(),a=yl(Error(o(421))),Bs(e,n,y,a)}return c.data==="$?"?(n.flags|=128,n.child=e.child,n=Yy.bind(null,e),c._reactRetry=n,null):(e=f.treeContext,ht=gn(c.nextSibling),pt=n,_e=!0,Tt=null,e!==null&&(wt[bt++]=Jt,wt[bt++]=en,wt[bt++]=Hn,Jt=e.id,en=e.overflow,Hn=n),n=El(n,a.children),n.flags|=4096,n)}function Qf(e,n,s){e.lanes|=n;var a=e.alternate;a!==null&&(a.lanes|=n),nl(e.return,n,s)}function Nl(e,n,s,a,c){var f=e.memoizedState;f===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:a,tail:s,tailMode:c}:(f.isBackwards=n,f.rendering=null,f.renderingStartTime=0,f.last=a,f.tail=s,f.tailMode=c)}function Gf(e,n,s){var a=n.pendingProps,c=a.revealOrder,f=a.tail;if(nt(e,n,a.children,s),a=Oe.current,(a&2)!==0)a=a&1|2,n.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Qf(e,s,n);else if(e.tag===19)Qf(e,s,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}a&=1}if(Ne(Oe,a),(n.mode&1)===0)n.memoizedState=null;else switch(c){case"forwards":for(s=n.child,c=null;s!==null;)e=s.alternate,e!==null&&Ls(e)===null&&(c=s),s=s.sibling;s=c,s===null?(c=n.child,n.child=null):(c=s.sibling,s.sibling=null),Nl(n,!1,c,s,f);break;case"backwards":for(s=null,c=n.child,n.child=null;c!==null;){if(e=c.alternate,e!==null&&Ls(e)===null){n.child=c;break}e=c.sibling,c.sibling=s,s=c,c=e}Nl(n,!0,s,null,f);break;case"together":Nl(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function Ws(e,n){(n.mode&1)===0&&e!==null&&(e.alternate=null,n.alternate=null,n.flags|=2)}function rn(e,n,s){if(e!==null&&(n.dependencies=e.dependencies),Qn|=n.lanes,(s&n.childLanes)===0)return null;if(e!==null&&n.child!==e.child)throw Error(o(153));if(n.child!==null){for(e=n.child,s=jn(e,e.pendingProps),n.child=s,s.return=n;e.sibling!==null;)e=e.sibling,s=s.sibling=jn(e,e.pendingProps),s.return=n;s.sibling=null}return n.child}function Fy(e,n,s){switch(n.tag){case 3:Wf(n),br();break;case 5:lf(n);break;case 1:at(n.type)&&Ns(n);break;case 4:sl(n,n.stateNode.containerInfo);break;case 10:var a=n.type._context,c=n.memoizedProps.value;Ne(Os,a._currentValue),a._currentValue=c;break;case 13:if(a=n.memoizedState,a!==null)return a.dehydrated!==null?(Ne(Oe,Oe.current&1),n.flags|=128,null):(s&n.child.childLanes)!==0?Vf(e,n,s):(Ne(Oe,Oe.current&1),e=rn(e,n,s),e!==null?e.sibling:null);Ne(Oe,Oe.current&1);break;case 19:if(a=(s&n.childLanes)!==0,(e.flags&128)!==0){if(a)return Gf(e,n,s);n.flags|=128}if(c=n.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),Ne(Oe,Oe.current),a)break;return null;case 22:case 23:return n.lanes=0,Uf(e,n,s)}return rn(e,n,s)}var qf,jl,Yf,Xf;qf=function(e,n){for(var s=n.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===n)break;for(;s.sibling===null;){if(s.return===null||s.return===n)return;s=s.return}s.sibling.return=s.return,s=s.sibling}},jl=function(){},Yf=function(e,n,s,a){var c=e.memoizedProps;if(c!==a){e=n.stateNode,Kn(Ht.current);var f=null;switch(s){case"input":c=na(e,c),a=na(e,a),f=[];break;case"select":c=q({},c,{value:void 0}),a=q({},a,{value:void 0}),f=[];break;case"textarea":c=sa(e,c),a=sa(e,a),f=[];break;default:typeof c.onClick!="function"&&typeof a.onClick=="function"&&(e.onclick=Cs)}aa(s,a);var y;s=null;for(F in c)if(!a.hasOwnProperty(F)&&c.hasOwnProperty(F)&&c[F]!=null)if(F==="style"){var N=c[F];for(y in N)N.hasOwnProperty(y)&&(s||(s={}),s[y]="")}else F!=="dangerouslySetInnerHTML"&&F!=="children"&&F!=="suppressContentEditableWarning"&&F!=="suppressHydrationWarning"&&F!=="autoFocus"&&(u.hasOwnProperty(F)?f||(f=[]):(f=f||[]).push(F,null));for(F in a){var R=a[F];if(N=c?.[F],a.hasOwnProperty(F)&&R!==N&&(R!=null||N!=null))if(F==="style")if(N){for(y in N)!N.hasOwnProperty(y)||R&&R.hasOwnProperty(y)||(s||(s={}),s[y]="");for(y in R)R.hasOwnProperty(y)&&N[y]!==R[y]&&(s||(s={}),s[y]=R[y])}else s||(f||(f=[]),f.push(F,s)),s=R;else F==="dangerouslySetInnerHTML"?(R=R?R.__html:void 0,N=N?N.__html:void 0,R!=null&&N!==R&&(f=f||[]).push(F,R)):F==="children"?typeof R!="string"&&typeof R!="number"||(f=f||[]).push(F,""+R):F!=="suppressContentEditableWarning"&&F!=="suppressHydrationWarning"&&(u.hasOwnProperty(F)?(R!=null&&F==="onScroll"&&Re("scroll",e),f||N===R||(f=[])):(f=f||[]).push(F,R))}s&&(f=f||[]).push("style",s);var F=f;(n.updateQueue=F)&&(n.flags|=4)}},Xf=function(e,n,s,a){s!==a&&(n.flags|=4)};function No(e,n){if(!_e)switch(e.tailMode){case"hidden":n=e.tail;for(var s=null;n!==null;)n.alternate!==null&&(s=n),n=n.sibling;s===null?e.tail=null:s.sibling=null;break;case"collapsed":s=e.tail;for(var a=null;s!==null;)s.alternate!==null&&(a=s),s=s.sibling;a===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function Xe(e){var n=e.alternate!==null&&e.alternate.child===e.child,s=0,a=0;if(n)for(var c=e.child;c!==null;)s|=c.lanes|c.childLanes,a|=c.subtreeFlags&14680064,a|=c.flags&14680064,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)s|=c.lanes|c.childLanes,a|=c.subtreeFlags,a|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=a,e.childLanes=s,n}function $y(e,n,s){var a=n.pendingProps;switch(qa(n),n.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xe(n),null;case 1:return at(n.type)&&Es(),Xe(n),null;case 3:return a=n.stateNode,Er(),Pe(it),Pe(qe),ll(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Ts(n)?n.flags|=4:e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Tt!==null&&(Fl(Tt),Tt=null))),jl(e,n),Xe(n),null;case 5:il(n);var c=Kn(bo.current);if(s=n.type,e!==null&&n.stateNode!=null)Yf(e,n,s,a,c),e.ref!==n.ref&&(n.flags|=512,n.flags|=2097152);else{if(!a){if(n.stateNode===null)throw Error(o(166));return Xe(n),null}if(e=Kn(Ht.current),Ts(n)){a=n.stateNode,s=n.type;var f=n.memoizedProps;switch(a[Ut]=n,a[go]=f,e=(n.mode&1)!==0,s){case"dialog":Re("cancel",a),Re("close",a);break;case"iframe":case"object":case"embed":Re("load",a);break;case"video":case"audio":for(c=0;c<po.length;c++)Re(po[c],a);break;case"source":Re("error",a);break;case"img":case"image":case"link":Re("error",a),Re("load",a);break;case"details":Re("toggle",a);break;case"input":Tc(a,f),Re("invalid",a);break;case"select":a._wrapperState={wasMultiple:!!f.multiple},Re("invalid",a);break;case"textarea":Ac(a,f),Re("invalid",a)}aa(s,f),c=null;for(var y in f)if(f.hasOwnProperty(y)){var N=f[y];y==="children"?typeof N=="string"?a.textContent!==N&&(f.suppressHydrationWarning!==!0&&Ss(a.textContent,N,e),c=["children",N]):typeof N=="number"&&a.textContent!==""+N&&(f.suppressHydrationWarning!==!0&&Ss(a.textContent,N,e),c=["children",""+N]):u.hasOwnProperty(y)&&N!=null&&y==="onScroll"&&Re("scroll",a)}switch(s){case"input":sr(a),Oc(a,f,!0);break;case"textarea":sr(a),Ic(a);break;case"select":case"option":break;default:typeof f.onClick=="function"&&(a.onclick=Cs)}a=c,n.updateQueue=a,a!==null&&(n.flags|=4)}else{y=c.nodeType===9?c:c.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Lc(s)),e==="http://www.w3.org/1999/xhtml"?s==="script"?(e=y.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof a.is=="string"?e=y.createElement(s,{is:a.is}):(e=y.createElement(s),s==="select"&&(y=e,a.multiple?y.multiple=!0:a.size&&(y.size=a.size))):e=y.createElementNS(e,s),e[Ut]=n,e[go]=a,qf(e,n,!1,!1),n.stateNode=e;e:{switch(y=la(s,a),s){case"dialog":Re("cancel",e),Re("close",e),c=a;break;case"iframe":case"object":case"embed":Re("load",e),c=a;break;case"video":case"audio":for(c=0;c<po.length;c++)Re(po[c],e);c=a;break;case"source":Re("error",e),c=a;break;case"img":case"image":case"link":Re("error",e),Re("load",e),c=a;break;case"details":Re("toggle",e),c=a;break;case"input":Tc(e,a),c=na(e,a),Re("invalid",e);break;case"option":c=a;break;case"select":e._wrapperState={wasMultiple:!!a.multiple},c=q({},a,{value:void 0}),Re("invalid",e);break;case"textarea":Ac(e,a),c=sa(e,a),Re("invalid",e);break;default:c=a}aa(s,c),N=c;for(f in N)if(N.hasOwnProperty(f)){var R=N[f];f==="style"?$c(e,R):f==="dangerouslySetInnerHTML"?(R=R?R.__html:void 0,R!=null&&Dc(e,R)):f==="children"?typeof R=="string"?(s!=="textarea"||R!=="")&&Qr(e,R):typeof R=="number"&&Qr(e,""+R):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(u.hasOwnProperty(f)?R!=null&&f==="onScroll"&&Re("scroll",e):R!=null&&O(e,f,R,y))}switch(s){case"input":sr(e),Oc(e,a,!1);break;case"textarea":sr(e),Ic(e);break;case"option":a.value!=null&&e.setAttribute("value",""+be(a.value));break;case"select":e.multiple=!!a.multiple,f=a.value,f!=null?ir(e,!!a.multiple,f,!1):a.defaultValue!=null&&ir(e,!!a.multiple,a.defaultValue,!0);break;default:typeof c.onClick=="function"&&(e.onclick=Cs)}switch(s){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}}a&&(n.flags|=4)}n.ref!==null&&(n.flags|=512,n.flags|=2097152)}return Xe(n),null;case 6:if(e&&n.stateNode!=null)Xf(e,n,e.memoizedProps,a);else{if(typeof a!="string"&&n.stateNode===null)throw Error(o(166));if(s=Kn(bo.current),Kn(Ht.current),Ts(n)){if(a=n.stateNode,s=n.memoizedProps,a[Ut]=n,(f=a.nodeValue!==s)&&(e=pt,e!==null))switch(e.tag){case 3:Ss(a.nodeValue,s,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ss(a.nodeValue,s,(e.mode&1)!==0)}f&&(n.flags|=4)}else a=(s.nodeType===9?s:s.ownerDocument).createTextNode(a),a[Ut]=n,n.stateNode=a}return Xe(n),null;case 13:if(Pe(Oe),a=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(_e&&ht!==null&&(n.mode&1)!==0&&(n.flags&128)===0)Jd(),br(),n.flags|=98560,f=!1;else if(f=Ts(n),a!==null&&a.dehydrated!==null){if(e===null){if(!f)throw Error(o(318));if(f=n.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(o(317));f[Ut]=n}else br(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Xe(n),f=!1}else Tt!==null&&(Fl(Tt),Tt=null),f=!0;if(!f)return n.flags&65536?n:null}return(n.flags&128)!==0?(n.lanes=s,n):(a=a!==null,a!==(e!==null&&e.memoizedState!==null)&&a&&(n.child.flags|=8192,(n.mode&1)!==0&&(e===null||(Oe.current&1)!==0?ze===0&&(ze=3):Ul())),n.updateQueue!==null&&(n.flags|=4),Xe(n),null);case 4:return Er(),jl(e,n),e===null&&ho(n.stateNode.containerInfo),Xe(n),null;case 10:return tl(n.type._context),Xe(n),null;case 17:return at(n.type)&&Es(),Xe(n),null;case 19:if(Pe(Oe),f=n.memoizedState,f===null)return Xe(n),null;if(a=(n.flags&128)!==0,y=f.rendering,y===null)if(a)No(f,!1);else{if(ze!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(y=Ls(e),y!==null){for(n.flags|=128,No(f,!1),a=y.updateQueue,a!==null&&(n.updateQueue=a,n.flags|=4),n.subtreeFlags=0,a=s,s=n.child;s!==null;)f=s,e=a,f.flags&=14680066,y=f.alternate,y===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=y.childLanes,f.lanes=y.lanes,f.child=y.child,f.subtreeFlags=0,f.deletions=null,f.memoizedProps=y.memoizedProps,f.memoizedState=y.memoizedState,f.updateQueue=y.updateQueue,f.type=y.type,e=y.dependencies,f.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),s=s.sibling;return Ne(Oe,Oe.current&1|2),n.child}e=e.sibling}f.tail!==null&&Ie()>Pr&&(n.flags|=128,a=!0,No(f,!1),n.lanes=4194304)}else{if(!a)if(e=Ls(y),e!==null){if(n.flags|=128,a=!0,s=e.updateQueue,s!==null&&(n.updateQueue=s,n.flags|=4),No(f,!0),f.tail===null&&f.tailMode==="hidden"&&!y.alternate&&!_e)return Xe(n),null}else 2*Ie()-f.renderingStartTime>Pr&&s!==1073741824&&(n.flags|=128,a=!0,No(f,!1),n.lanes=4194304);f.isBackwards?(y.sibling=n.child,n.child=y):(s=f.last,s!==null?s.sibling=y:n.child=y,f.last=y)}return f.tail!==null?(n=f.tail,f.rendering=n,f.tail=n.sibling,f.renderingStartTime=Ie(),n.sibling=null,s=Oe.current,Ne(Oe,a?s&1|2:s&1),n):(Xe(n),null);case 22:case 23:return zl(),a=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==a&&(n.flags|=8192),a&&(n.mode&1)!==0?(mt&1073741824)!==0&&(Xe(n),n.subtreeFlags&6&&(n.flags|=8192)):Xe(n),null;case 24:return null;case 25:return null}throw Error(o(156,n.tag))}function zy(e,n){switch(qa(n),n.tag){case 1:return at(n.type)&&Es(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return Er(),Pe(it),Pe(qe),ll(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 5:return il(n),null;case 13:if(Pe(Oe),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(o(340));br()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return Pe(Oe),null;case 4:return Er(),null;case 10:return tl(n.type._context),null;case 22:case 23:return zl(),null;case 24:return null;default:return null}}var Ks=!1,Ze=!1,Uy=typeof WeakSet=="function"?WeakSet:Set,te=null;function jr(e,n){var s=e.ref;if(s!==null)if(typeof s=="function")try{s(null)}catch(a){Me(e,n,a)}else s.current=null}function Rl(e,n,s){try{s()}catch(a){Me(e,n,a)}}var Zf=!1;function Hy(e,n){if(za=ds,e=Pd(),Oa(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var a=s.getSelection&&s.getSelection();if(a&&a.rangeCount!==0){s=a.anchorNode;var c=a.anchorOffset,f=a.focusNode;a=a.focusOffset;try{s.nodeType,f.nodeType}catch{s=null;break e}var y=0,N=-1,R=-1,F=0,V=0,G=e,W=null;t:for(;;){for(var J;G!==s||c!==0&&G.nodeType!==3||(N=y+c),G!==f||a!==0&&G.nodeType!==3||(R=y+a),G.nodeType===3&&(y+=G.nodeValue.length),(J=G.firstChild)!==null;)W=G,G=J;for(;;){if(G===e)break t;if(W===s&&++F===c&&(N=y),W===f&&++V===a&&(R=y),(J=G.nextSibling)!==null)break;G=W,W=G.parentNode}G=J}s=N===-1||R===-1?null:{start:N,end:R}}else s=null}s=s||{start:0,end:0}}else s=null;for(Ua={focusedElem:e,selectionRange:s},ds=!1,te=n;te!==null;)if(n=te,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,te=e;else for(;te!==null;){n=te;try{var re=n.alternate;if((n.flags&1024)!==0)switch(n.tag){case 0:case 11:case 15:break;case 1:if(re!==null){var oe=re.memoizedProps,Le=re.memoizedState,M=n.stateNode,T=M.getSnapshotBeforeUpdate(n.elementType===n.type?oe:_t(n.type,oe),Le);M.__reactInternalSnapshotBeforeUpdate=T}break;case 3:var L=n.stateNode.containerInfo;L.nodeType===1?L.textContent="":L.nodeType===9&&L.documentElement&&L.removeChild(L.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch(Y){Me(n,n.return,Y)}if(e=n.sibling,e!==null){e.return=n.return,te=e;break}te=n.return}return re=Zf,Zf=!1,re}function jo(e,n,s){var a=n.updateQueue;if(a=a!==null?a.lastEffect:null,a!==null){var c=a=a.next;do{if((c.tag&e)===e){var f=c.destroy;c.destroy=void 0,f!==void 0&&Rl(n,s,f)}c=c.next}while(c!==a)}}function Vs(e,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&e)===e){var a=s.create;s.destroy=a()}s=s.next}while(s!==n)}}function Pl(e){var n=e.ref;if(n!==null){var s=e.stateNode;e.tag,e=s,typeof n=="function"?n(e):n.current=e}}function Jf(e){var n=e.alternate;n!==null&&(e.alternate=null,Jf(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[Ut],delete n[go],delete n[Ka],delete n[ky],delete n[Ey])),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 ep(e){return e.tag===5||e.tag===3||e.tag===4}function tp(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ep(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 Tl(e,n,s){var a=e.tag;if(a===5||a===6)e=e.stateNode,n?s.nodeType===8?s.parentNode.insertBefore(e,n):s.insertBefore(e,n):(s.nodeType===8?(n=s.parentNode,n.insertBefore(e,s)):(n=s,n.appendChild(e)),s=s._reactRootContainer,s!=null||n.onclick!==null||(n.onclick=Cs));else if(a!==4&&(e=e.child,e!==null))for(Tl(e,n,s),e=e.sibling;e!==null;)Tl(e,n,s),e=e.sibling}function _l(e,n,s){var a=e.tag;if(a===5||a===6)e=e.stateNode,n?s.insertBefore(e,n):s.appendChild(e);else if(a!==4&&(e=e.child,e!==null))for(_l(e,n,s),e=e.sibling;e!==null;)_l(e,n,s),e=e.sibling}var Ve=null,Ot=!1;function Sn(e,n,s){for(s=s.child;s!==null;)np(e,n,s),s=s.sibling}function np(e,n,s){if(zt&&typeof zt.onCommitFiberUnmount=="function")try{zt.onCommitFiberUnmount(ss,s)}catch{}switch(s.tag){case 5:Ze||jr(s,n);case 6:var a=Ve,c=Ot;Ve=null,Sn(e,n,s),Ve=a,Ot=c,Ve!==null&&(Ot?(e=Ve,s=s.stateNode,e.nodeType===8?e.parentNode.removeChild(s):e.removeChild(s)):Ve.removeChild(s.stateNode));break;case 18:Ve!==null&&(Ot?(e=Ve,s=s.stateNode,e.nodeType===8?Wa(e.parentNode,s):e.nodeType===1&&Wa(e,s),oo(e)):Wa(Ve,s.stateNode));break;case 4:a=Ve,c=Ot,Ve=s.stateNode.containerInfo,Ot=!0,Sn(e,n,s),Ve=a,Ot=c;break;case 0:case 11:case 14:case 15:if(!Ze&&(a=s.updateQueue,a!==null&&(a=a.lastEffect,a!==null))){c=a=a.next;do{var f=c,y=f.destroy;f=f.tag,y!==void 0&&((f&2)!==0||(f&4)!==0)&&Rl(s,n,y),c=c.next}while(c!==a)}Sn(e,n,s);break;case 1:if(!Ze&&(jr(s,n),a=s.stateNode,typeof a.componentWillUnmount=="function"))try{a.props=s.memoizedProps,a.state=s.memoizedState,a.componentWillUnmount()}catch(N){Me(s,n,N)}Sn(e,n,s);break;case 21:Sn(e,n,s);break;case 22:s.mode&1?(Ze=(a=Ze)||s.memoizedState!==null,Sn(e,n,s),Ze=a):Sn(e,n,s);break;default:Sn(e,n,s)}}function rp(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var s=e.stateNode;s===null&&(s=e.stateNode=new Uy),n.forEach(function(a){var c=Xy.bind(null,e,a);s.has(a)||(s.add(a),a.then(c,c))})}}function At(e,n){var s=n.deletions;if(s!==null)for(var a=0;a<s.length;a++){var c=s[a];try{var f=e,y=n,N=y;e:for(;N!==null;){switch(N.tag){case 5:Ve=N.stateNode,Ot=!1;break e;case 3:Ve=N.stateNode.containerInfo,Ot=!0;break e;case 4:Ve=N.stateNode.containerInfo,Ot=!0;break e}N=N.return}if(Ve===null)throw Error(o(160));np(f,y,c),Ve=null,Ot=!1;var R=c.alternate;R!==null&&(R.return=null),c.return=null}catch(F){Me(c,n,F)}}if(n.subtreeFlags&12854)for(n=n.child;n!==null;)op(n,e),n=n.sibling}function op(e,n){var s=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(At(n,e),Wt(e),a&4){try{jo(3,e,e.return),Vs(3,e)}catch(oe){Me(e,e.return,oe)}try{jo(5,e,e.return)}catch(oe){Me(e,e.return,oe)}}break;case 1:At(n,e),Wt(e),a&512&&s!==null&&jr(s,s.return);break;case 5:if(At(n,e),Wt(e),a&512&&s!==null&&jr(s,s.return),e.flags&32){var c=e.stateNode;try{Qr(c,"")}catch(oe){Me(e,e.return,oe)}}if(a&4&&(c=e.stateNode,c!=null)){var f=e.memoizedProps,y=s!==null?s.memoizedProps:f,N=e.type,R=e.updateQueue;if(e.updateQueue=null,R!==null)try{N==="input"&&f.type==="radio"&&f.name!=null&&_c(c,f),la(N,y);var F=la(N,f);for(y=0;y<R.length;y+=2){var V=R[y],G=R[y+1];V==="style"?$c(c,G):V==="dangerouslySetInnerHTML"?Dc(c,G):V==="children"?Qr(c,G):O(c,V,G,F)}switch(N){case"input":ra(c,f);break;case"textarea":Mc(c,f);break;case"select":var W=c._wrapperState.wasMultiple;c._wrapperState.wasMultiple=!!f.multiple;var J=f.value;J!=null?ir(c,!!f.multiple,J,!1):W!==!!f.multiple&&(f.defaultValue!=null?ir(c,!!f.multiple,f.defaultValue,!0):ir(c,!!f.multiple,f.multiple?[]:"",!1))}c[go]=f}catch(oe){Me(e,e.return,oe)}}break;case 6:if(At(n,e),Wt(e),a&4){if(e.stateNode===null)throw Error(o(162));c=e.stateNode,f=e.memoizedProps;try{c.nodeValue=f}catch(oe){Me(e,e.return,oe)}}break;case 3:if(At(n,e),Wt(e),a&4&&s!==null&&s.memoizedState.isDehydrated)try{oo(n.containerInfo)}catch(oe){Me(e,e.return,oe)}break;case 4:At(n,e),Wt(e);break;case 13:At(n,e),Wt(e),c=e.child,c.flags&8192&&(f=c.memoizedState!==null,c.stateNode.isHidden=f,!f||c.alternate!==null&&c.alternate.memoizedState!==null||(Ml=Ie())),a&4&&rp(e);break;case 22:if(V=s!==null&&s.memoizedState!==null,e.mode&1?(Ze=(F=Ze)||V,At(n,e),Ze=F):At(n,e),Wt(e),a&8192){if(F=e.memoizedState!==null,(e.stateNode.isHidden=F)&&!V&&(e.mode&1)!==0)for(te=e,V=e.child;V!==null;){for(G=te=V;te!==null;){switch(W=te,J=W.child,W.tag){case 0:case 11:case 14:case 15:jo(4,W,W.return);break;case 1:jr(W,W.return);var re=W.stateNode;if(typeof re.componentWillUnmount=="function"){a=W,s=W.return;try{n=a,re.props=n.memoizedProps,re.state=n.memoizedState,re.componentWillUnmount()}catch(oe){Me(a,s,oe)}}break;case 5:jr(W,W.return);break;case 22:if(W.memoizedState!==null){ap(G);continue}}J!==null?(J.return=W,te=J):ap(G)}V=V.sibling}e:for(V=null,G=e;;){if(G.tag===5){if(V===null){V=G;try{c=G.stateNode,F?(f=c.style,typeof f.setProperty=="function"?f.setProperty("display","none","important"):f.display="none"):(N=G.stateNode,R=G.memoizedProps.style,y=R!=null&&R.hasOwnProperty("display")?R.display:null,N.style.display=Fc("display",y))}catch(oe){Me(e,e.return,oe)}}}else if(G.tag===6){if(V===null)try{G.stateNode.nodeValue=F?"":G.memoizedProps}catch(oe){Me(e,e.return,oe)}}else if((G.tag!==22&&G.tag!==23||G.memoizedState===null||G===e)&&G.child!==null){G.child.return=G,G=G.child;continue}if(G===e)break e;for(;G.sibling===null;){if(G.return===null||G.return===e)break e;V===G&&(V=null),G=G.return}V===G&&(V=null),G.sibling.return=G.return,G=G.sibling}}break;case 19:At(n,e),Wt(e),a&4&&rp(e);break;case 21:break;default:At(n,e),Wt(e)}}function Wt(e){var n=e.flags;if(n&2){try{e:{for(var s=e.return;s!==null;){if(ep(s)){var a=s;break e}s=s.return}throw Error(o(160))}switch(a.tag){case 5:var c=a.stateNode;a.flags&32&&(Qr(c,""),a.flags&=-33);var f=tp(e);_l(e,f,c);break;case 3:case 4:var y=a.stateNode.containerInfo,N=tp(e);Tl(e,N,y);break;default:throw Error(o(161))}}catch(R){Me(e,e.return,R)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function By(e,n,s){te=e,sp(e)}function sp(e,n,s){for(var a=(e.mode&1)!==0;te!==null;){var c=te,f=c.child;if(c.tag===22&&a){var y=c.memoizedState!==null||Ks;if(!y){var N=c.alternate,R=N!==null&&N.memoizedState!==null||Ze;N=Ks;var F=Ze;if(Ks=y,(Ze=R)&&!F)for(te=c;te!==null;)y=te,R=y.child,y.tag===22&&y.memoizedState!==null?lp(c):R!==null?(R.return=y,te=R):lp(c);for(;f!==null;)te=f,sp(f),f=f.sibling;te=c,Ks=N,Ze=F}ip(e)}else(c.subtreeFlags&8772)!==0&&f!==null?(f.return=c,te=f):ip(e)}}function ip(e){for(;te!==null;){var n=te;if((n.flags&8772)!==0){var s=n.alternate;try{if((n.flags&8772)!==0)switch(n.tag){case 0:case 11:case 15:Ze||Vs(5,n);break;case 1:var a=n.stateNode;if(n.flags&4&&!Ze)if(s===null)a.componentDidMount();else{var c=n.elementType===n.type?s.memoizedProps:_t(n.type,s.memoizedProps);a.componentDidUpdate(c,s.memoizedState,a.__reactInternalSnapshotBeforeUpdate)}var f=n.updateQueue;f!==null&&af(n,f,a);break;case 3:var y=n.updateQueue;if(y!==null){if(s=null,n.child!==null)switch(n.child.tag){case 5:s=n.child.stateNode;break;case 1:s=n.child.stateNode}af(n,y,s)}break;case 5:var N=n.stateNode;if(s===null&&n.flags&4){s=N;var R=n.memoizedProps;switch(n.type){case"button":case"input":case"select":case"textarea":R.autoFocus&&s.focus();break;case"img":R.src&&(s.src=R.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(n.memoizedState===null){var F=n.alternate;if(F!==null){var V=F.memoizedState;if(V!==null){var G=V.dehydrated;G!==null&&oo(G)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(o(163))}Ze||n.flags&512&&Pl(n)}catch(W){Me(n,n.return,W)}}if(n===e){te=null;break}if(s=n.sibling,s!==null){s.return=n.return,te=s;break}te=n.return}}function ap(e){for(;te!==null;){var n=te;if(n===e){te=null;break}var s=n.sibling;if(s!==null){s.return=n.return,te=s;break}te=n.return}}function lp(e){for(;te!==null;){var n=te;try{switch(n.tag){case 0:case 11:case 15:var s=n.return;try{Vs(4,n)}catch(R){Me(n,s,R)}break;case 1:var a=n.stateNode;if(typeof a.componentDidMount=="function"){var c=n.return;try{a.componentDidMount()}catch(R){Me(n,c,R)}}var f=n.return;try{Pl(n)}catch(R){Me(n,f,R)}break;case 5:var y=n.return;try{Pl(n)}catch(R){Me(n,y,R)}}}catch(R){Me(n,n.return,R)}if(n===e){te=null;break}var N=n.sibling;if(N!==null){N.return=n.return,te=N;break}te=n.return}}var Wy=Math.ceil,Qs=I.ReactCurrentDispatcher,Ol=I.ReactCurrentOwner,kt=I.ReactCurrentBatchConfig,Se=0,We=null,Fe=null,Qe=0,mt=0,Rr=vn(0),ze=0,Ro=null,Qn=0,Gs=0,Al=0,Po=null,ut=null,Ml=0,Pr=1/0,on=null,qs=!1,Il=null,Cn=null,Ys=!1,kn=null,Xs=0,To=0,Ll=null,Zs=-1,Js=0;function rt(){return(Se&6)!==0?Ie():Zs!==-1?Zs:Zs=Ie()}function En(e){return(e.mode&1)===0?1:(Se&2)!==0&&Qe!==0?Qe&-Qe:jy.transition!==null?(Js===0&&(Js=ed()),Js):(e=ke,e!==0||(e=window.event,e=e===void 0?16:ud(e.type)),e)}function Mt(e,n,s,a){if(50<To)throw To=0,Ll=null,Error(o(185));Jr(e,s,a),((Se&2)===0||e!==We)&&(e===We&&((Se&2)===0&&(Gs|=s),ze===4&&Nn(e,Qe)),ct(e,a),s===1&&Se===0&&(n.mode&1)===0&&(Pr=Ie()+500,js&&yn()))}function ct(e,n){var s=e.callbackNode;jx(e,n);var a=ls(e,e===We?Qe:0);if(a===0)s!==null&&Xc(s),e.callbackNode=null,e.callbackPriority=0;else if(n=a&-a,e.callbackPriority!==n){if(s!=null&&Xc(s),n===1)e.tag===0?Ny(cp.bind(null,e)):Gd(cp.bind(null,e)),Sy(function(){(Se&6)===0&&yn()}),s=null;else{switch(td(a)){case 1:s=ma;break;case 4:s=Zc;break;case 16:s=os;break;case 536870912:s=Jc;break;default:s=os}s=xp(s,up.bind(null,e))}e.callbackPriority=n,e.callbackNode=s}}function up(e,n){if(Zs=-1,Js=0,(Se&6)!==0)throw Error(o(327));var s=e.callbackNode;if(Tr()&&e.callbackNode!==s)return null;var a=ls(e,e===We?Qe:0);if(a===0)return null;if((a&30)!==0||(a&e.expiredLanes)!==0||n)n=ei(e,a);else{n=a;var c=Se;Se|=2;var f=fp();(We!==e||Qe!==n)&&(on=null,Pr=Ie()+500,qn(e,n));do try{Qy();break}catch(N){dp(e,N)}while(!0);el(),Qs.current=f,Se=c,Fe!==null?n=0:(We=null,Qe=0,n=ze)}if(n!==0){if(n===2&&(c=ga(e),c!==0&&(a=c,n=Dl(e,c))),n===1)throw s=Ro,qn(e,0),Nn(e,a),ct(e,Ie()),s;if(n===6)Nn(e,a);else{if(c=e.current.alternate,(a&30)===0&&!Ky(c)&&(n=ei(e,a),n===2&&(f=ga(e),f!==0&&(a=f,n=Dl(e,f))),n===1))throw s=Ro,qn(e,0),Nn(e,a),ct(e,Ie()),s;switch(e.finishedWork=c,e.finishedLanes=a,n){case 0:case 1:throw Error(o(345));case 2:Yn(e,ut,on);break;case 3:if(Nn(e,a),(a&130023424)===a&&(n=Ml+500-Ie(),10<n)){if(ls(e,0)!==0)break;if(c=e.suspendedLanes,(c&a)!==a){rt(),e.pingedLanes|=e.suspendedLanes&c;break}e.timeoutHandle=Ba(Yn.bind(null,e,ut,on),n);break}Yn(e,ut,on);break;case 4:if(Nn(e,a),(a&4194240)===a)break;for(n=e.eventTimes,c=-1;0<a;){var y=31-Rt(a);f=1<<y,y=n[y],y>c&&(c=y),a&=~f}if(a=c,a=Ie()-a,a=(120>a?120:480>a?480:1080>a?1080:1920>a?1920:3e3>a?3e3:4320>a?4320:1960*Wy(a/1960))-a,10<a){e.timeoutHandle=Ba(Yn.bind(null,e,ut,on),a);break}Yn(e,ut,on);break;case 5:Yn(e,ut,on);break;default:throw Error(o(329))}}}return ct(e,Ie()),e.callbackNode===s?up.bind(null,e):null}function Dl(e,n){var s=Po;return e.current.memoizedState.isDehydrated&&(qn(e,n).flags|=256),e=ei(e,n),e!==2&&(n=ut,ut=s,n!==null&&Fl(n)),e}function Fl(e){ut===null?ut=e:ut.push.apply(ut,e)}function Ky(e){for(var n=e;;){if(n.flags&16384){var s=n.updateQueue;if(s!==null&&(s=s.stores,s!==null))for(var a=0;a<s.length;a++){var c=s[a],f=c.getSnapshot;c=c.value;try{if(!Pt(f(),c))return!1}catch{return!1}}}if(s=n.child,n.subtreeFlags&16384&&s!==null)s.return=n,n=s;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function Nn(e,n){for(n&=~Al,n&=~Gs,e.suspendedLanes|=n,e.pingedLanes&=~n,e=e.expirationTimes;0<n;){var s=31-Rt(n),a=1<<s;e[s]=-1,n&=~a}}function cp(e){if((Se&6)!==0)throw Error(o(327));Tr();var n=ls(e,0);if((n&1)===0)return ct(e,Ie()),null;var s=ei(e,n);if(e.tag!==0&&s===2){var a=ga(e);a!==0&&(n=a,s=Dl(e,a))}if(s===1)throw s=Ro,qn(e,0),Nn(e,n),ct(e,Ie()),s;if(s===6)throw Error(o(345));return e.finishedWork=e.current.alternate,e.finishedLanes=n,Yn(e,ut,on),ct(e,Ie()),null}function $l(e,n){var s=Se;Se|=1;try{return e(n)}finally{Se=s,Se===0&&(Pr=Ie()+500,js&&yn())}}function Gn(e){kn!==null&&kn.tag===0&&(Se&6)===0&&Tr();var n=Se;Se|=1;var s=kt.transition,a=ke;try{if(kt.transition=null,ke=1,e)return e()}finally{ke=a,kt.transition=s,Se=n,(Se&6)===0&&yn()}}function zl(){mt=Rr.current,Pe(Rr)}function qn(e,n){e.finishedWork=null,e.finishedLanes=0;var s=e.timeoutHandle;if(s!==-1&&(e.timeoutHandle=-1,by(s)),Fe!==null)for(s=Fe.return;s!==null;){var a=s;switch(qa(a),a.tag){case 1:a=a.type.childContextTypes,a!=null&&Es();break;case 3:Er(),Pe(it),Pe(qe),ll();break;case 5:il(a);break;case 4:Er();break;case 13:Pe(Oe);break;case 19:Pe(Oe);break;case 10:tl(a.type._context);break;case 22:case 23:zl()}s=s.return}if(We=e,Fe=e=jn(e.current,null),Qe=mt=n,ze=0,Ro=null,Al=Gs=Qn=0,ut=Po=null,Wn!==null){for(n=0;n<Wn.length;n++)if(s=Wn[n],a=s.interleaved,a!==null){s.interleaved=null;var c=a.next,f=s.pending;if(f!==null){var y=f.next;f.next=c,a.next=y}s.pending=a}Wn=null}return e}function dp(e,n){do{var s=Fe;try{if(el(),Ds.current=Us,Fs){for(var a=Ae.memoizedState;a!==null;){var c=a.queue;c!==null&&(c.pending=null),a=a.next}Fs=!1}if(Vn=0,Be=$e=Ae=null,So=!1,Co=0,Ol.current=null,s===null||s.return===null){ze=1,Ro=n,Fe=null;break}e:{var f=e,y=s.return,N=s,R=n;if(n=Qe,N.flags|=32768,R!==null&&typeof R=="object"&&typeof R.then=="function"){var F=R,V=N,G=V.tag;if((V.mode&1)===0&&(G===0||G===11||G===15)){var W=V.alternate;W?(V.updateQueue=W.updateQueue,V.memoizedState=W.memoizedState,V.lanes=W.lanes):(V.updateQueue=null,V.memoizedState=null)}var J=Lf(y);if(J!==null){J.flags&=-257,Df(J,y,N,f,n),J.mode&1&&If(f,F,n),n=J,R=F;var re=n.updateQueue;if(re===null){var oe=new Set;oe.add(R),n.updateQueue=oe}else re.add(R);break e}else{if((n&1)===0){If(f,F,n),Ul();break e}R=Error(o(426))}}else if(_e&&N.mode&1){var Le=Lf(y);if(Le!==null){(Le.flags&65536)===0&&(Le.flags|=256),Df(Le,y,N,f,n),Za(Nr(R,N));break e}}f=R=Nr(R,N),ze!==4&&(ze=2),Po===null?Po=[f]:Po.push(f),f=y;do{switch(f.tag){case 3:f.flags|=65536,n&=-n,f.lanes|=n;var M=Af(f,R,n);sf(f,M);break e;case 1:N=R;var T=f.type,L=f.stateNode;if((f.flags&128)===0&&(typeof T.getDerivedStateFromError=="function"||L!==null&&typeof L.componentDidCatch=="function"&&(Cn===null||!Cn.has(L)))){f.flags|=65536,n&=-n,f.lanes|=n;var Y=Mf(f,N,n);sf(f,Y);break e}}f=f.return}while(f!==null)}hp(s)}catch(ie){n=ie,Fe===s&&s!==null&&(Fe=s=s.return);continue}break}while(!0)}function fp(){var e=Qs.current;return Qs.current=Us,e===null?Us:e}function Ul(){(ze===0||ze===3||ze===2)&&(ze=4),We===null||(Qn&268435455)===0&&(Gs&268435455)===0||Nn(We,Qe)}function ei(e,n){var s=Se;Se|=2;var a=fp();(We!==e||Qe!==n)&&(on=null,qn(e,n));do try{Vy();break}catch(c){dp(e,c)}while(!0);if(el(),Se=s,Qs.current=a,Fe!==null)throw Error(o(261));return We=null,Qe=0,ze}function Vy(){for(;Fe!==null;)pp(Fe)}function Qy(){for(;Fe!==null&&!xx();)pp(Fe)}function pp(e){var n=vp(e.alternate,e,mt);e.memoizedProps=e.pendingProps,n===null?hp(e):Fe=n,Ol.current=null}function hp(e){var n=e;do{var s=n.alternate;if(e=n.return,(n.flags&32768)===0){if(s=$y(s,n,mt),s!==null){Fe=s;return}}else{if(s=zy(s,n),s!==null){s.flags&=32767,Fe=s;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ze=6,Fe=null;return}}if(n=n.sibling,n!==null){Fe=n;return}Fe=n=e}while(n!==null);ze===0&&(ze=5)}function Yn(e,n,s){var a=ke,c=kt.transition;try{kt.transition=null,ke=1,Gy(e,n,s,a)}finally{kt.transition=c,ke=a}return null}function Gy(e,n,s,a){do Tr();while(kn!==null);if((Se&6)!==0)throw Error(o(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(o(177));e.callbackNode=null,e.callbackPriority=0;var f=s.lanes|s.childLanes;if(Rx(e,f),e===We&&(Fe=We=null,Qe=0),(s.subtreeFlags&2064)===0&&(s.flags&2064)===0||Ys||(Ys=!0,xp(os,function(){return Tr(),null})),f=(s.flags&15990)!==0,(s.subtreeFlags&15990)!==0||f){f=kt.transition,kt.transition=null;var y=ke;ke=1;var N=Se;Se|=4,Ol.current=null,Hy(e,s),op(s,e),hy(Ua),ds=!!za,Ua=za=null,e.current=s,By(s),yx(),Se=N,ke=y,kt.transition=f}else e.current=s;if(Ys&&(Ys=!1,kn=e,Xs=c),f=e.pendingLanes,f===0&&(Cn=null),Sx(s.stateNode),ct(e,Ie()),n!==null)for(a=e.onRecoverableError,s=0;s<n.length;s++)c=n[s],a(c.value,{componentStack:c.stack,digest:c.digest});if(qs)throw qs=!1,e=Il,Il=null,e;return(Xs&1)!==0&&e.tag!==0&&Tr(),f=e.pendingLanes,(f&1)!==0?e===Ll?To++:(To=0,Ll=e):To=0,yn(),null}function Tr(){if(kn!==null){var e=td(Xs),n=kt.transition,s=ke;try{if(kt.transition=null,ke=16>e?16:e,kn===null)var a=!1;else{if(e=kn,kn=null,Xs=0,(Se&6)!==0)throw Error(o(331));var c=Se;for(Se|=4,te=e.current;te!==null;){var f=te,y=f.child;if((te.flags&16)!==0){var N=f.deletions;if(N!==null){for(var R=0;R<N.length;R++){var F=N[R];for(te=F;te!==null;){var V=te;switch(V.tag){case 0:case 11:case 15:jo(8,V,f)}var G=V.child;if(G!==null)G.return=V,te=G;else for(;te!==null;){V=te;var W=V.sibling,J=V.return;if(Jf(V),V===F){te=null;break}if(W!==null){W.return=J,te=W;break}te=J}}}var re=f.alternate;if(re!==null){var oe=re.child;if(oe!==null){re.child=null;do{var Le=oe.sibling;oe.sibling=null,oe=Le}while(oe!==null)}}te=f}}if((f.subtreeFlags&2064)!==0&&y!==null)y.return=f,te=y;else e:for(;te!==null;){if(f=te,(f.flags&2048)!==0)switch(f.tag){case 0:case 11:case 15:jo(9,f,f.return)}var M=f.sibling;if(M!==null){M.return=f.return,te=M;break e}te=f.return}}var T=e.current;for(te=T;te!==null;){y=te;var L=y.child;if((y.subtreeFlags&2064)!==0&&L!==null)L.return=y,te=L;else e:for(y=T;te!==null;){if(N=te,(N.flags&2048)!==0)try{switch(N.tag){case 0:case 11:case 15:Vs(9,N)}}catch(ie){Me(N,N.return,ie)}if(N===y){te=null;break e}var Y=N.sibling;if(Y!==null){Y.return=N.return,te=Y;break e}te=N.return}}if(Se=c,yn(),zt&&typeof zt.onPostCommitFiberRoot=="function")try{zt.onPostCommitFiberRoot(ss,e)}catch{}a=!0}return a}finally{ke=s,kt.transition=n}}return!1}function mp(e,n,s){n=Nr(s,n),n=Af(e,n,1),e=bn(e,n,1),n=rt(),e!==null&&(Jr(e,1,n),ct(e,n))}function Me(e,n,s){if(e.tag===3)mp(e,e,s);else for(;n!==null;){if(n.tag===3){mp(n,e,s);break}else if(n.tag===1){var a=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Cn===null||!Cn.has(a))){e=Nr(s,e),e=Mf(n,e,1),n=bn(n,e,1),e=rt(),n!==null&&(Jr(n,1,e),ct(n,e));break}}n=n.return}}function qy(e,n,s){var a=e.pingCache;a!==null&&a.delete(n),n=rt(),e.pingedLanes|=e.suspendedLanes&s,We===e&&(Qe&s)===s&&(ze===4||ze===3&&(Qe&130023424)===Qe&&500>Ie()-Ml?qn(e,0):Al|=s),ct(e,n)}function gp(e,n){n===0&&((e.mode&1)===0?n=1:(n=as,as<<=1,(as&130023424)===0&&(as=4194304)));var s=rt();e=tn(e,n),e!==null&&(Jr(e,n,s),ct(e,s))}function Yy(e){var n=e.memoizedState,s=0;n!==null&&(s=n.retryLane),gp(e,s)}function Xy(e,n){var s=0;switch(e.tag){case 13:var a=e.stateNode,c=e.memoizedState;c!==null&&(s=c.retryLane);break;case 19:a=e.stateNode;break;default:throw Error(o(314))}a!==null&&a.delete(n),gp(e,s)}var vp;vp=function(e,n,s){if(e!==null)if(e.memoizedProps!==n.pendingProps||it.current)lt=!0;else{if((e.lanes&s)===0&&(n.flags&128)===0)return lt=!1,Fy(e,n,s);lt=(e.flags&131072)!==0}else lt=!1,_e&&(n.flags&1048576)!==0&&qd(n,Ps,n.index);switch(n.lanes=0,n.tag){case 2:var a=n.type;Ws(e,n),e=n.pendingProps;var c=xr(n,qe.current);kr(n,s),c=dl(null,n,a,e,c,s);var f=fl();return n.flags|=1,typeof c=="object"&&c!==null&&typeof c.render=="function"&&c.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,at(a)?(f=!0,Ns(n)):f=!1,n.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,ol(n),c.updater=Hs,n.stateNode=c,c._reactInternals=n,xl(n,a,e,s),n=Sl(null,n,a,!0,f,s)):(n.tag=0,_e&&f&&Ga(n),nt(null,n,c,s),n=n.child),n;case 16:a=n.elementType;e:{switch(Ws(e,n),e=n.pendingProps,c=a._init,a=c(a._payload),n.type=a,c=n.tag=Jy(a),e=_t(a,e),c){case 0:n=bl(null,n,a,e,s);break e;case 1:n=Bf(null,n,a,e,s);break e;case 11:n=Ff(null,n,a,e,s);break e;case 14:n=$f(null,n,a,_t(a.type,e),s);break e}throw Error(o(306,a,""))}return n;case 0:return a=n.type,c=n.pendingProps,c=n.elementType===a?c:_t(a,c),bl(e,n,a,c,s);case 1:return a=n.type,c=n.pendingProps,c=n.elementType===a?c:_t(a,c),Bf(e,n,a,c,s);case 3:e:{if(Wf(n),e===null)throw Error(o(387));a=n.pendingProps,f=n.memoizedState,c=f.element,of(e,n),Is(n,a,null,s);var y=n.memoizedState;if(a=y.element,f.isDehydrated)if(f={element:a,isDehydrated:!1,cache:y.cache,pendingSuspenseBoundaries:y.pendingSuspenseBoundaries,transitions:y.transitions},n.updateQueue.baseState=f,n.memoizedState=f,n.flags&256){c=Nr(Error(o(423)),n),n=Kf(e,n,a,s,c);break e}else if(a!==c){c=Nr(Error(o(424)),n),n=Kf(e,n,a,s,c);break e}else for(ht=gn(n.stateNode.containerInfo.firstChild),pt=n,_e=!0,Tt=null,s=nf(n,null,a,s),n.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(br(),a===c){n=rn(e,n,s);break e}nt(e,n,a,s)}n=n.child}return n;case 5:return lf(n),e===null&&Xa(n),a=n.type,c=n.pendingProps,f=e!==null?e.memoizedProps:null,y=c.children,Ha(a,c)?y=null:f!==null&&Ha(a,f)&&(n.flags|=32),Hf(e,n),nt(e,n,y,s),n.child;case 6:return e===null&&Xa(n),null;case 13:return Vf(e,n,s);case 4:return sl(n,n.stateNode.containerInfo),a=n.pendingProps,e===null?n.child=Sr(n,null,a,s):nt(e,n,a,s),n.child;case 11:return a=n.type,c=n.pendingProps,c=n.elementType===a?c:_t(a,c),Ff(e,n,a,c,s);case 7:return nt(e,n,n.pendingProps,s),n.child;case 8:return nt(e,n,n.pendingProps.children,s),n.child;case 12:return nt(e,n,n.pendingProps.children,s),n.child;case 10:e:{if(a=n.type._context,c=n.pendingProps,f=n.memoizedProps,y=c.value,Ne(Os,a._currentValue),a._currentValue=y,f!==null)if(Pt(f.value,y)){if(f.children===c.children&&!it.current){n=rn(e,n,s);break e}}else for(f=n.child,f!==null&&(f.return=n);f!==null;){var N=f.dependencies;if(N!==null){y=f.child;for(var R=N.firstContext;R!==null;){if(R.context===a){if(f.tag===1){R=nn(-1,s&-s),R.tag=2;var F=f.updateQueue;if(F!==null){F=F.shared;var V=F.pending;V===null?R.next=R:(R.next=V.next,V.next=R),F.pending=R}}f.lanes|=s,R=f.alternate,R!==null&&(R.lanes|=s),nl(f.return,s,n),N.lanes|=s;break}R=R.next}}else if(f.tag===10)y=f.type===n.type?null:f.child;else if(f.tag===18){if(y=f.return,y===null)throw Error(o(341));y.lanes|=s,N=y.alternate,N!==null&&(N.lanes|=s),nl(y,s,n),y=f.sibling}else y=f.child;if(y!==null)y.return=f;else for(y=f;y!==null;){if(y===n){y=null;break}if(f=y.sibling,f!==null){f.return=y.return,y=f;break}y=y.return}f=y}nt(e,n,c.children,s),n=n.child}return n;case 9:return c=n.type,a=n.pendingProps.children,kr(n,s),c=St(c),a=a(c),n.flags|=1,nt(e,n,a,s),n.child;case 14:return a=n.type,c=_t(a,n.pendingProps),c=_t(a.type,c),$f(e,n,a,c,s);case 15:return zf(e,n,n.type,n.pendingProps,s);case 17:return a=n.type,c=n.pendingProps,c=n.elementType===a?c:_t(a,c),Ws(e,n),n.tag=1,at(a)?(e=!0,Ns(n)):e=!1,kr(n,s),_f(n,a,c),xl(n,a,c,s),Sl(null,n,a,!0,e,s);case 19:return Gf(e,n,s);case 22:return Uf(e,n,s)}throw Error(o(156,n.tag))};function xp(e,n){return Yc(e,n)}function Zy(e,n,s,a){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=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Et(e,n,s,a){return new Zy(e,n,s,a)}function Hl(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Jy(e){if(typeof e=="function")return Hl(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Z)return 11;if(e===ve)return 14}return 2}function jn(e,n){var s=e.alternate;return s===null?(s=Et(e.tag,n,e.key,e.mode),s.elementType=e.elementType,s.type=e.type,s.stateNode=e.stateNode,s.alternate=e,e.alternate=s):(s.pendingProps=n,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,n=e.dependencies,s.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},s.sibling=e.sibling,s.index=e.index,s.ref=e.ref,s}function ti(e,n,s,a,c,f){var y=2;if(a=e,typeof e=="function")Hl(e)&&(y=1);else if(typeof e=="string")y=5;else e:switch(e){case $:return Xn(s.children,c,f,n);case K:y=8,c|=8;break;case Q:return e=Et(12,s,n,c|2),e.elementType=Q,e.lanes=f,e;case de:return e=Et(13,s,n,c),e.elementType=de,e.lanes=f,e;case X:return e=Et(19,s,n,c),e.elementType=X,e.lanes=f,e;case le:return ni(s,c,f,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ee:y=10;break e;case ne:y=9;break e;case Z:y=11;break e;case ve:y=14;break e;case se:y=16,a=null;break e}throw Error(o(130,e==null?e:typeof e,""))}return n=Et(y,s,n,c),n.elementType=e,n.type=a,n.lanes=f,n}function Xn(e,n,s,a){return e=Et(7,e,a,n),e.lanes=s,e}function ni(e,n,s,a){return e=Et(22,e,a,n),e.elementType=le,e.lanes=s,e.stateNode={isHidden:!1},e}function Bl(e,n,s){return e=Et(6,e,null,n),e.lanes=s,e}function Wl(e,n,s){return n=Et(4,e.children!==null?e.children:[],e.key,n),n.lanes=s,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function ew(e,n,s,a,c){this.tag=n,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=va(0),this.expirationTimes=va(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=va(0),this.identifierPrefix=a,this.onRecoverableError=c,this.mutableSourceEagerHydrationData=null}function Kl(e,n,s,a,c,f,y,N,R){return e=new ew(e,n,s,N,R),n===1?(n=1,f===!0&&(n|=8)):n=0,f=Et(3,null,null,n),e.current=f,f.stateNode=e,f.memoizedState={element:a,isDehydrated:s,cache:null,transitions:null,pendingSuspenseBoundaries:null},ol(f),e}function tw(e,n,s){var a=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:A,key:a==null?null:""+a,children:e,containerInfo:n,implementation:s}}function yp(e){if(!e)return xn;e=e._reactInternals;e:{if($n(e)!==e||e.tag!==1)throw Error(o(170));var n=e;do{switch(n.tag){case 3:n=n.stateNode.context;break e;case 1:if(at(n.type)){n=n.stateNode.__reactInternalMemoizedMergedChildContext;break e}}n=n.return}while(n!==null);throw Error(o(171))}if(e.tag===1){var s=e.type;if(at(s))return Vd(e,s,n)}return n}function wp(e,n,s,a,c,f,y,N,R){return e=Kl(s,a,!0,e,c,f,y,N,R),e.context=yp(null),s=e.current,a=rt(),c=En(s),f=nn(a,c),f.callback=n??null,bn(s,f,c),e.current.lanes=c,Jr(e,c,a),ct(e,a),e}function ri(e,n,s,a){var c=n.current,f=rt(),y=En(c);return s=yp(s),n.context===null?n.context=s:n.pendingContext=s,n=nn(f,y),n.payload={element:e},a=a===void 0?null:a,a!==null&&(n.callback=a),e=bn(c,n,y),e!==null&&(Mt(e,c,y,f),Ms(e,c,y)),y}function oi(e){return e=e.current,e.child?(e.child.tag===5,e.child.stateNode):null}function bp(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var s=e.retryLane;e.retryLane=s!==0&&s<n?s:n}}function Vl(e,n){bp(e,n),(e=e.alternate)&&bp(e,n)}function nw(){return null}var Sp=typeof reportError=="function"?reportError:function(e){console.error(e)};function Ql(e){this._internalRoot=e}si.prototype.render=Ql.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(o(409));ri(e,n,null,null)},si.prototype.unmount=Ql.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;Gn(function(){ri(null,e,null,null)}),n[Xt]=null}};function si(e){this._internalRoot=e}si.prototype.unstable_scheduleHydration=function(e){if(e){var n=od();e={blockedOn:null,target:e,priority:n};for(var s=0;s<pn.length&&n!==0&&n<pn[s].priority;s++);pn.splice(s,0,e),s===0&&ad(e)}};function Gl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ii(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Cp(){}function rw(e,n,s,a,c){if(c){if(typeof a=="function"){var f=a;a=function(){var F=oi(y);f.call(F)}}var y=wp(n,a,e,0,null,!1,!1,"",Cp);return e._reactRootContainer=y,e[Xt]=y.current,ho(e.nodeType===8?e.parentNode:e),Gn(),y}for(;c=e.lastChild;)e.removeChild(c);if(typeof a=="function"){var N=a;a=function(){var F=oi(R);N.call(F)}}var R=Kl(e,0,!1,null,null,!1,!1,"",Cp);return e._reactRootContainer=R,e[Xt]=R.current,ho(e.nodeType===8?e.parentNode:e),Gn(function(){ri(n,R,s,a)}),R}function ai(e,n,s,a,c){var f=s._reactRootContainer;if(f){var y=f;if(typeof c=="function"){var N=c;c=function(){var R=oi(y);N.call(R)}}ri(n,y,e,c)}else y=rw(s,n,e,c,a);return oi(y)}nd=function(e){switch(e.tag){case 3:var n=e.stateNode;if(n.current.memoizedState.isDehydrated){var s=Zr(n.pendingLanes);s!==0&&(xa(n,s|1),ct(n,Ie()),(Se&6)===0&&(Pr=Ie()+500,yn()))}break;case 13:Gn(function(){var a=tn(e,1);if(a!==null){var c=rt();Mt(a,e,1,c)}}),Vl(e,1)}},ya=function(e){if(e.tag===13){var n=tn(e,134217728);if(n!==null){var s=rt();Mt(n,e,134217728,s)}Vl(e,134217728)}},rd=function(e){if(e.tag===13){var n=En(e),s=tn(e,n);if(s!==null){var a=rt();Mt(s,e,n,a)}Vl(e,n)}},od=function(){return ke},sd=function(e,n){var s=ke;try{return ke=e,n()}finally{ke=s}},da=function(e,n,s){switch(n){case"input":if(ra(e,s),n=s.name,s.type==="radio"&&n!=null){for(s=e;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll("input[name="+JSON.stringify(""+n)+'][type="radio"]'),n=0;n<s.length;n++){var a=s[n];if(a!==e&&a.form===e.form){var c=ks(a);if(!c)throw Error(o(90));es(a),ra(a,c)}}}break;case"textarea":Mc(e,s);break;case"select":n=s.value,n!=null&&ir(e,!!s.multiple,n,!1)}},Bc=$l,Wc=Gn;var ow={usingClientEntryPoint:!1,Events:[vo,gr,ks,Uc,Hc,$l]},_o={findFiberByHostInstance:zn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},sw={bundleType:_o.bundleType,version:_o.version,rendererPackageName:_o.rendererPackageName,rendererConfig:_o.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:I.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Gc(e),e===null?null:e.stateNode},findFiberByHostInstance:_o.findFiberByHostInstance||nw,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 li=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!li.isDisabled&&li.supportsFiber)try{ss=li.inject(sw),zt=li}catch{}}return dt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ow,dt.createPortal=function(e,n){var s=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Gl(n))throw Error(o(200));return tw(e,n,null,s)},dt.createRoot=function(e,n){if(!Gl(e))throw Error(o(299));var s=!1,a="",c=Sp;return n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onRecoverableError!==void 0&&(c=n.onRecoverableError)),n=Kl(e,1,!1,null,null,s,!1,a,c),e[Xt]=n.current,ho(e.nodeType===8?e.parentNode:e),new Ql(n)},dt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=Gc(n),e=e===null?null:e.stateNode,e},dt.flushSync=function(e){return Gn(e)},dt.hydrate=function(e,n,s){if(!ii(n))throw Error(o(200));return ai(null,e,n,!0,s)},dt.hydrateRoot=function(e,n,s){if(!Gl(e))throw Error(o(405));var a=s!=null&&s.hydratedSources||null,c=!1,f="",y=Sp;if(s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(f=s.identifierPrefix),s.onRecoverableError!==void 0&&(y=s.onRecoverableError)),n=wp(n,null,e,1,s??null,c,!1,f,y),e[Xt]=n.current,ho(e),a)for(e=0;e<a.length;e++)s=a[e],c=s._getVersion,c=c(s._source),n.mutableSourceEagerHydrationData==null?n.mutableSourceEagerHydrationData=[s,c]:n.mutableSourceEagerHydrationData.push(s,c);return new si(n)},dt.render=function(e,n,s){if(!ii(n))throw Error(o(200));return ai(null,e,n,!1,s)},dt.unmountComponentAtNode=function(e){if(!ii(e))throw Error(o(40));return e._reactRootContainer?(Gn(function(){ai(null,null,e,!1,function(){e._reactRootContainer=null,e[Xt]=null})}),!0):!1},dt.unstable_batchedUpdates=$l,dt.unstable_renderSubtreeIntoContainer=function(e,n,s,a){if(!ii(s))throw Error(o(200));if(e==null||e._reactInternals===void 0)throw Error(o(38));return ai(e,n,s,!1,a)},dt.version="18.3.1-next-f1338f8080-20240426",dt}var _p;function Qh(){if(_p)return Xl.exports;_p=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(r){console.error(r)}}return t(),Xl.exports=pw(),Xl.exports}var Op;function hw(){if(Op)return ui;Op=1;var t=Qh();return ui.createRoot=t.createRoot,ui.hydrateRoot=t.hydrateRoot,ui}var mw=hw();function gw(t,r){if(t instanceof RegExp)return{keys:!1,pattern:t};var o,i,u,d,p=[],h="",g=t.split("/");for(g[0]||g.shift();u=g.shift();)o=u[0],o==="*"?(p.push(o),h+=u[1]==="?"?"(?:/(.*))?":"/(.*)"):o===":"?(i=u.indexOf("?",1),d=u.indexOf(".",1),p.push(u.substring(1,~i?i:~d?d:u.length)),h+=~i&&!~d?"(?:/([^/]+?))?":"/([^/]+?)",~d&&(h+=(~i?"?":"")+"\\"+u.substring(d))):h+="/"+u;return{keys:p,pattern:new RegExp("^"+h+(r?"(?=$|/)":"/?$"),"i")}}var m=Fi();const On=Vh(m),Qu=aw({__proto__:null,default:On},[m]);var eu={exports:{}},tu={};var Ap;function vw(){if(Ap)return tu;Ap=1;var t=Fi();function r(w,b){return w===b&&(w!==0||1/w===1/b)||w!==w&&b!==b}var o=typeof Object.is=="function"?Object.is:r,i=t.useState,u=t.useEffect,d=t.useLayoutEffect,p=t.useDebugValue;function h(w,b){var k=b(),j=i({inst:{value:k,getSnapshot:b}}),C=j[0].inst,S=j[1];return d(function(){C.value=k,C.getSnapshot=b,g(C)&&S({inst:C})},[w,k,b]),u(function(){return g(C)&&S({inst:C}),w(function(){g(C)&&S({inst:C})})},[w]),p(k),k}function g(w){var b=w.getSnapshot;w=w.value;try{var k=b();return!o(w,k)}catch{return!0}}function x(w,b){return b()}var v=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?x:h;return tu.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:v,tu}var Mp;function xw(){return Mp||(Mp=1,eu.exports=vw()),eu.exports}var Gh=xw();const yw=Qu.useInsertionEffect,ww=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",bw=ww?m.useLayoutEffect:m.useEffect,Sw=yw||bw,qh=t=>{const r=m.useRef([t,(...o)=>r[0](...o)]).current;return Sw(()=>{r[0]=t}),r[1]},Cw="popstate",Gu="pushState",qu="replaceState",kw="hashchange",Ip=[Cw,Gu,qu,kw],Ew=t=>{for(const r of Ip)addEventListener(r,t);return()=>{for(const r of Ip)removeEventListener(r,t)}},Yh=(t,r)=>Gh.useSyncExternalStore(Ew,t,r),Lp=()=>location.search,Nw=({ssrSearch:t}={})=>Yh(Lp,t!=null?()=>t:Lp),Dp=()=>location.pathname,jw=({ssrPath:t}={})=>Yh(Dp,t!=null?()=>t:Dp),Rw=(t,{replace:r=!1,state:o=null}={})=>history[r?qu:Gu](o,"",t),Pw=(t={})=>[jw(t),Rw],Fp=Symbol.for("wouter_v3");if(typeof history<"u"&&typeof window[Fp]>"u"){for(const t of[Gu,qu]){const r=history[t];history[t]=function(){const o=r.apply(this,arguments),i=new Event(t);return i.arguments=arguments,dispatchEvent(i),o}}Object.defineProperty(window,Fp,{value:!0})}const Tw=(t,r)=>r.toLowerCase().indexOf(t.toLowerCase())?"~"+r:r.slice(t.length)||"/",Xh=(t="")=>t==="/"?"":t,_w=(t,r)=>t[0]==="~"?t.slice(1):Xh(r)+t,Ow=(t="",r)=>Tw(Nu(Xh(t)),Nu(r)),Aw=t=>t[0]==="?"?t.slice(1):t,Nu=t=>{try{return decodeURI(t)}catch{return t}},Mw=t=>Nu(Aw(t)),Zh={hook:Pw,searchHook:Nw,parser:gw,base:"",ssrPath:void 0,ssrSearch:void 0,ssrContext:void 0,hrefs:t=>t,aroundNav:(t,r,o)=>t(r,o)},Jh=m.createContext(Zh),Vo=()=>m.useContext(Jh),em={},tm=m.createContext(em),Iw=()=>m.useContext(tm),Yu=t=>{const[r,o]=t.hook(t);return[Ow(t.base,r),qh((i,u)=>t.aroundNav(o,_w(i,t.base),u))]},Lw=()=>{const t=Vo();return Mw(t.searchHook(t))},nm=(t,r,o,i)=>{const{pattern:u,keys:d}=r instanceof RegExp?{keys:!1,pattern:r}:t(r||"*",i),p=u.exec(o)||[],[h,...g]=p;return h!==void 0?[!0,(()=>{const x=d!==!1?Object.fromEntries(d.map((w,b)=>[w,g[b]])):p.groups;let v={...g};return x&&Object.assign(v,x),v})(),...i?[h]:[]]:[!1,null]},rm=({children:t,...r})=>{const o=Vo(),i=r.hook?Zh:o;let u=i;const[d,p=r.ssrSearch??""]=r.ssrPath?.split("?")??[];d&&(r.ssrSearch=p,r.ssrPath=d),r.hrefs=r.hrefs??r.hook?.hrefs,r.searchHook=r.searchHook??r.hook?.searchHook;let h=m.useRef({}),g=h.current,x=g;for(let v in i){const w=v==="base"?i[v]+(r[v]??""):r[v]??i[v];g===x&&w!==x[v]&&(h.current=x={...x}),x[v]=w,(w!==i[v]||w!==u[v])&&(u=x)}return m.createElement(Jh.Provider,{value:u,children:t})},$p=({children:t,component:r},o)=>r?m.createElement(r,{params:o}):typeof t=="function"?t(o):t,Dw=t=>{let r=m.useRef(em);const o=r.current;return r.current=Object.keys(t).length!==Object.keys(o).length||Object.entries(t).some(([i,u])=>u!==o[i])?t:o},_r=({path:t,nest:r,match:o,...i})=>{const u=Vo(),[d]=Yu(u),[p,h,g]=o??nm(u.parser,t,d,r),x=Dw({...Iw(),...h});if(!p)return null;const v=g?m.createElement(rm,{base:g},$p(i,x)):$p(i,x);return m.createElement(tm.Provider,{value:x,children:v})},Dt=m.forwardRef((t,r)=>{const o=Vo(),[i,u]=Yu(o),{to:d="",href:p=d,onClick:h,asChild:g,children:x,className:v,replace:w,state:b,transition:k,...j}=t,C=qh(E=>{E.ctrlKey||E.metaKey||E.altKey||E.shiftKey||E.button!==0||(h?.(E),E.defaultPrevented||(E.preventDefault(),u(p,t)))}),S=o.hrefs(p[0]==="~"?p.slice(1):o.base+p,o);return g&&m.isValidElement(x)?m.cloneElement(x,{onClick:C,href:S}):m.createElement("a",{...j,onClick:C,href:S,className:v?.call?v(i===p):v,children:x,ref:r})}),om=t=>Array.isArray(t)?t.flatMap(r=>om(r&&r.type===m.Fragment?r.props.children:r)):[t],Fw=({children:t,location:r})=>{const o=Vo(),[i]=Yu(o);for(const u of om(t)){let d=0;if(m.isValidElement(u)&&(d=nm(o.parser,u.props.path,r||i,u.props.nest))[0])return m.cloneElement(u,{match:d})}return null},Lo={v:[]},zp=()=>Lo.v.forEach(t=>t()),$w=t=>(Lo.v.push(t)===1&&addEventListener("hashchange",zp),()=>{Lo.v=Lo.v.filter(r=>r!==t),Lo.v.length||removeEventListener("hashchange",zp)}),zw=()=>"/"+location.hash.replace(/^#?\/?/,""),Uw=(t,{state:r=null,replace:o=!1}={})=>{const i=location.href,[u,d]=t.replace(/^#?\/?/,"").split("?"),p=new URL(location.href);p.hash=`/${u}`,d&&(p.search=d);const h=p.href;o?history.replaceState(r,"",h):history.pushState(r,"",h);const g=typeof HashChangeEvent<"u"?new HashChangeEvent("hashchange",{oldURL:i,newURL:h}):new Event("hashchange",{detail:{oldURL:i,newURL:h}});dispatchEvent(g)},sm=({ssrPath:t="/"}={})=>[Gh.useSyncExternalStore($w,zw,()=>t),Uw];sm.hrefs=t=>"#"+t;var zr=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Hw={setTimeout:(t,r)=>setTimeout(t,r),clearTimeout:t=>clearTimeout(t),setInterval:(t,r)=>setInterval(t,r),clearInterval:t=>clearInterval(t)},Bw=class{#e=Hw;#t=!1;setTimeoutProvider(t){this.#e=t}setTimeout(t,r){return this.#e.setTimeout(t,r)}clearTimeout(t){this.#e.clearTimeout(t)}setInterval(t,r){return this.#e.setInterval(t,r)}clearInterval(t){this.#e.clearInterval(t)}},Jn=new Bw;function Ww(t){setTimeout(t,0)}var er=typeof window>"u"||"Deno"in globalThis;function ot(){}function Kw(t,r){return typeof t=="function"?t(r):t}function ju(t){return typeof t=="number"&&t>=0&&t!==1/0}function im(t,r){return Math.max(t+(r||0)-Date.now(),0)}function Mn(t,r){return typeof t=="function"?t(r):t}function Nt(t,r){return typeof t=="function"?t(r):t}function Up(t,r){const{type:o="all",exact:i,fetchStatus:u,predicate:d,queryKey:p,stale:h}=t;if(p){if(i){if(r.queryHash!==Xu(p,r.options))return!1}else if(!$o(r.queryKey,p))return!1}if(o!=="all"){const g=r.isActive();if(o==="active"&&!g||o==="inactive"&&g)return!1}return!(typeof h=="boolean"&&r.isStale()!==h||u&&u!==r.state.fetchStatus||d&&!d(r))}function Hp(t,r){const{exact:o,status:i,predicate:u,mutationKey:d}=t;if(d){if(!r.options.mutationKey)return!1;if(o){if(tr(r.options.mutationKey)!==tr(d))return!1}else if(!$o(r.options.mutationKey,d))return!1}return!(i&&r.state.status!==i||u&&!u(r))}function Xu(t,r){return(r?.queryKeyHashFn||tr)(t)}function tr(t){return JSON.stringify(t,(r,o)=>Ru(o)?Object.keys(o).sort().reduce((i,u)=>(i[u]=o[u],i),{}):o)}function $o(t,r){return t===r?!0:typeof t!=typeof r?!1:t&&r&&typeof t=="object"&&typeof r=="object"?Object.keys(r).every(o=>$o(t[o],r[o])):!1}var Vw=Object.prototype.hasOwnProperty;function am(t,r,o=0){if(t===r)return t;if(o>500)return r;const i=Bp(t)&&Bp(r);if(!i&&!(Ru(t)&&Ru(r)))return r;const d=(i?t:Object.keys(t)).length,p=i?r:Object.keys(r),h=p.length,g=i?new Array(h):{};let x=0;for(let v=0;v<h;v++){const w=i?v:p[v],b=t[w],k=r[w];if(b===k){g[w]=b,(i?v<d:Vw.call(t,w))&&x++;continue}if(b===null||k===null||typeof b!="object"||typeof k!="object"){g[w]=k;continue}const j=am(b,k,o+1);g[w]=j,j===b&&x++}return d===h&&x===d?t:g}function Ei(t,r){if(!r||Object.keys(t).length!==Object.keys(r).length)return!1;for(const o in t)if(t[o]!==r[o])return!1;return!0}function Bp(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Ru(t){if(!Wp(t))return!1;const r=t.constructor;if(r===void 0)return!0;const o=r.prototype;return!(!Wp(o)||!o.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function Wp(t){return Object.prototype.toString.call(t)==="[object Object]"}function Qw(t){return new Promise(r=>{Jn.setTimeout(r,t)})}function Pu(t,r,o){return typeof o.structuralSharing=="function"?o.structuralSharing(t,r):o.structuralSharing!==!1?am(t,r):r}function Gw(t,r,o=0){const i=[...t,r];return o&&i.length>o?i.slice(1):i}function qw(t,r,o=0){const i=[r,...t];return o&&i.length>o?i.slice(0,-1):i}var Zu=Symbol();function lm(t,r){return!t.queryFn&&r?.initialPromise?()=>r.initialPromise:!t.queryFn||t.queryFn===Zu?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function Ju(t,r){return typeof t=="function"?t(...r):!!t}function Yw(t,r,o){let i=!1,u;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(u??=r(),i||(i=!0,u.aborted?o():u.addEventListener("abort",o,{once:!0})),u)}),t}var Xw=class extends zr{#e;#t;#n;constructor(){super(),this.#n=t=>{if(!er&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#n=t,this.#t?.(),this.#t=t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()})}setFocused(t){this.#e!==t&&(this.#e=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},ec=new Xw;function Tu(){let t,r;const o=new Promise((u,d)=>{t=u,r=d});o.status="pending",o.catch(()=>{});function i(u){Object.assign(o,u),delete o.resolve,delete o.reject}return o.resolve=u=>{i({status:"fulfilled",value:u}),t(u)},o.reject=u=>{i({status:"rejected",reason:u}),r(u)},o}var Zw=Ww;function Jw(){let t=[],r=0,o=h=>{h()},i=h=>{h()},u=Zw;const d=h=>{r?t.push(h):u(()=>{o(h)})},p=()=>{const h=t;t=[],h.length&&u(()=>{i(()=>{h.forEach(g=>{o(g)})})})};return{batch:h=>{let g;r++;try{g=h()}finally{r--,r||p()}return g},batchCalls:h=>(...g)=>{d(()=>{h(...g)})},schedule:d,setNotifyFunction:h=>{o=h},setBatchNotifyFunction:h=>{i=h},setScheduler:h=>{u=h}}}var Ue=Jw(),eb=class extends zr{#e=!0;#t;#n;constructor(){super(),this.#n=t=>{if(!er&&window.addEventListener){const r=()=>t(!0),o=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",o,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",o)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#n=t,this.#t?.(),this.#t=t(this.setOnline.bind(this))}setOnline(t){this.#e!==t&&(this.#e=t,this.listeners.forEach(o=>{o(t)}))}isOnline(){return this.#e}},Ni=new eb;function tb(t){return Math.min(1e3*2**t,3e4)}function um(t){return(t??"online")==="online"?Ni.isOnline():!0}var _u=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function cm(t){let r=!1,o=0,i;const u=Tu(),d=()=>u.status!=="pending",p=C=>{if(!d()){const S=new _u(C);b(S),t.onCancel?.(S)}},h=()=>{r=!0},g=()=>{r=!1},x=()=>ec.isFocused()&&(t.networkMode==="always"||Ni.isOnline())&&t.canRun(),v=()=>um(t.networkMode)&&t.canRun(),w=C=>{d()||(i?.(),u.resolve(C))},b=C=>{d()||(i?.(),u.reject(C))},k=()=>new Promise(C=>{i=S=>{(d()||x())&&C(S)},t.onPause?.()}).then(()=>{i=void 0,d()||t.onContinue?.()}),j=()=>{if(d())return;let C;const S=o===0?t.initialPromise:void 0;try{C=S??t.fn()}catch(E){C=Promise.reject(E)}Promise.resolve(C).then(w).catch(E=>{if(d())return;const _=t.retry??(er?0:3),O=t.retryDelay??tb,I=typeof O=="function"?O(o,E):O,D=_===!0||typeof _=="number"&&o<_||typeof _=="function"&&_(o,E);if(r||!D){b(E);return}o++,t.onFail?.(o,E),Qw(I).then(()=>x()?void 0:k()).then(()=>{r?b(E):j()})})};return{promise:u,status:()=>u.status,cancel:p,continue:()=>(i?.(),u),cancelRetry:h,continueRetry:g,canStart:v,start:()=>(v()?j():k().then(j),u)}}var dm=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ju(this.gcTime)&&(this.#e=Jn.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(er?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Jn.clearTimeout(this.#e),this.#e=void 0)}},nb=class extends dm{#e;#t;#n;#o;#r;#i;#a;constructor(t){super(),this.#a=!1,this.#i=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#o=t.client,this.#n=this.#o.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#e=Vp(this.options),this.state=t.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(t){if(this.options={...this.#i,...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=Vp(this.options);r.data!==void 0&&(this.setState(Kp(r.data,r.dataUpdatedAt)),this.#e=r)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(t,r){const o=Pu(this.state.data,t,this.options);return this.#s({data:o,type:"success",dataUpdatedAt:r?.updatedAt,manual:r?.manual}),o}setState(t,r){this.#s({type:"setState",state:t,setStateOptions:r})}cancel(t){const r=this.#r?.promise;return this.#r?.cancel(t),r?r.then(ot).catch(ot):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(t=>Nt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Zu||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Mn(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!im(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(r=>r.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(r=>r.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(this.#r&&(this.#a?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#s({type:"invalidate"})}async fetch(t,r){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&r?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(t&&this.setOptions(t),!this.options.queryFn){const h=this.observers.find(g=>g.options.queryFn);h&&this.setOptions(h.options)}const o=new AbortController,i=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(this.#a=!0,o.signal)})},u=()=>{const h=lm(this.options,r),x=(()=>{const v={client:this.#o,queryKey:this.queryKey,meta:this.meta};return i(v),v})();return this.#a=!1,this.options.persister?this.options.persister(h,x,this):h(x)},p=(()=>{const h={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:this.#o,state:this.state,fetchFn:u};return i(h),h})();this.options.behavior?.onFetch(p,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==p.fetchOptions?.meta)&&this.#s({type:"fetch",meta:p.fetchOptions?.meta}),this.#r=cm({initialPromise:r?.initialPromise,fn:p.fetchFn,onCancel:h=>{h instanceof _u&&h.revert&&this.setState({...this.#t,fetchStatus:"idle"}),o.abort()},onFail:(h,g)=>{this.#s({type:"failed",failureCount:h,error:g})},onPause:()=>{this.#s({type:"pause"})},onContinue:()=>{this.#s({type:"continue"})},retry:p.options.retry,retryDelay:p.options.retryDelay,networkMode:p.options.networkMode,canRun:()=>!0});try{const h=await this.#r.start();if(h===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(h),this.#n.config.onSuccess?.(h,this),this.#n.config.onSettled?.(h,this.state.error,this),h}catch(h){if(h instanceof _u){if(h.silent)return this.#r.promise;if(h.revert){if(this.state.data===void 0)throw h;return this.state.data}}throw this.#s({type:"error",error:h}),this.#n.config.onError?.(h,this),this.#n.config.onSettled?.(this.state.data,h,this),h}finally{this.scheduleGc()}}#s(t){const r=o=>{switch(t.type){case"failed":return{...o,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...o,fetchStatus:"paused"};case"continue":return{...o,fetchStatus:"fetching"};case"fetch":return{...o,...fm(o.data,this.options),fetchMeta:t.meta??null};case"success":const i={...o,...Kp(t.data,t.dataUpdatedAt),dataUpdateCount:o.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=t.manual?i:void 0,i;case"error":const u=t.error;return{...o,error:u,errorUpdateCount:o.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:o.fetchFailureCount+1,fetchFailureReason:u,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...o,isInvalidated:!0};case"setState":return{...o,...t.state}}};this.state=r(this.state),Ue.batch(()=>{this.observers.forEach(o=>{o.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:t})})}};function fm(t,r){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:um(r.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function Kp(t,r){return{data:t,dataUpdatedAt:r??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Vp(t){const r=typeof t.initialData=="function"?t.initialData():t.initialData,o=r!==void 0,i=o?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:r,dataUpdateCount:0,dataUpdatedAt:o?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:o?"success":"pending",fetchStatus:"idle"}}var rb=class extends zr{constructor(t,r){super(),this.options=r,this.#e=t,this.#s=null,this.#a=Tu(),this.bindMethods(),this.setOptions(r)}#e;#t=void 0;#n=void 0;#o=void 0;#r;#i;#a;#s;#m;#f;#p;#u;#c;#l;#h=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Qp(this.#t,this.options)?this.#d():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ou(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ou(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#w(),this.#b(),this.#t.removeObserver(this)}setOptions(t){const r=this.options,o=this.#t;if(this.options=this.#e.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Nt(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#S(),this.#t.setOptions(this.options),r._defaulted&&!Ei(this.options,r)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const i=this.hasListeners();i&&Gp(this.#t,o,this.options,r)&&this.#d(),this.updateResult(),i&&(this.#t!==o||Nt(this.options.enabled,this.#t)!==Nt(r.enabled,this.#t)||Mn(this.options.staleTime,this.#t)!==Mn(r.staleTime,this.#t))&&this.#g();const u=this.#v();i&&(this.#t!==o||Nt(this.options.enabled,this.#t)!==Nt(r.enabled,this.#t)||u!==this.#l)&&this.#x(u)}getOptimisticResult(t){const r=this.#e.getQueryCache().build(this.#e,t),o=this.createResult(r,t);return sb(this,o)&&(this.#o=o,this.#i=this.options,this.#r=this.#t.state),o}getCurrentResult(){return this.#o}trackResult(t,r){return new Proxy(t,{get:(o,i)=>(this.trackProp(i),r?.(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#a.status==="pending"&&this.#a.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(o,i))})}trackProp(t){this.#h.add(t)}getCurrentQuery(){return this.#t}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=this.#e.defaultQueryOptions(t),o=this.#e.getQueryCache().build(this.#e,r);return o.fetch().then(()=>this.createResult(o,r))}fetch(t){return this.#d({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#o))}#d(t){this.#S();let r=this.#t.fetch(this.options,t);return t?.throwOnError||(r=r.catch(ot)),r}#g(){this.#w();const t=Mn(this.options.staleTime,this.#t);if(er||this.#o.isStale||!ju(t))return;const o=im(this.#o.dataUpdatedAt,t)+1;this.#u=Jn.setTimeout(()=>{this.#o.isStale||this.updateResult()},o)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#x(t){this.#b(),this.#l=t,!(er||Nt(this.options.enabled,this.#t)===!1||!ju(this.#l)||this.#l===0)&&(this.#c=Jn.setInterval(()=>{(this.options.refetchIntervalInBackground||ec.isFocused())&&this.#d()},this.#l))}#y(){this.#g(),this.#x(this.#v())}#w(){this.#u&&(Jn.clearTimeout(this.#u),this.#u=void 0)}#b(){this.#c&&(Jn.clearInterval(this.#c),this.#c=void 0)}createResult(t,r){const o=this.#t,i=this.options,u=this.#o,d=this.#r,p=this.#i,g=t!==o?t.state:this.#n,{state:x}=t;let v={...x},w=!1,b;if(r._optimisticResults){const K=this.hasListeners(),Q=!K&&Qp(t,r),ee=K&&Gp(t,o,r,i);(Q||ee)&&(v={...v,...fm(x.data,t.options)}),r._optimisticResults==="isRestoring"&&(v.fetchStatus="idle")}let{error:k,errorUpdatedAt:j,status:C}=v;b=v.data;let S=!1;if(r.placeholderData!==void 0&&b===void 0&&C==="pending"){let K;u?.isPlaceholderData&&r.placeholderData===p?.placeholderData?(K=u.data,S=!0):K=typeof r.placeholderData=="function"?r.placeholderData(this.#p?.state.data,this.#p):r.placeholderData,K!==void 0&&(C="success",b=Pu(u?.data,K,r),w=!0)}if(r.select&&b!==void 0&&!S)if(u&&b===d?.data&&r.select===this.#m)b=this.#f;else try{this.#m=r.select,b=r.select(b),b=Pu(u?.data,b,r),this.#f=b,this.#s=null}catch(K){this.#s=K}this.#s&&(k=this.#s,b=this.#f,j=Date.now(),C="error");const E=v.fetchStatus==="fetching",_=C==="pending",O=C==="error",I=_&&E,D=b!==void 0,$={status:C,fetchStatus:v.fetchStatus,isPending:_,isSuccess:C==="success",isError:O,isInitialLoading:I,isLoading:I,data:b,dataUpdatedAt:v.dataUpdatedAt,error:k,errorUpdatedAt:j,failureCount:v.fetchFailureCount,failureReason:v.fetchFailureReason,errorUpdateCount:v.errorUpdateCount,isFetched:v.dataUpdateCount>0||v.errorUpdateCount>0,isFetchedAfterMount:v.dataUpdateCount>g.dataUpdateCount||v.errorUpdateCount>g.errorUpdateCount,isFetching:E,isRefetching:E&&!_,isLoadingError:O&&!D,isPaused:v.fetchStatus==="paused",isPlaceholderData:w,isRefetchError:O&&D,isStale:tc(t,r),refetch:this.refetch,promise:this.#a,isEnabled:Nt(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const K=$.data!==void 0,Q=$.status==="error"&&!K,ee=de=>{Q?de.reject($.error):K&&de.resolve($.data)},ne=()=>{const de=this.#a=$.promise=Tu();ee(de)},Z=this.#a;switch(Z.status){case"pending":t.queryHash===o.queryHash&&ee(Z);break;case"fulfilled":(Q||$.data!==Z.value)&&ne();break;case"rejected":(!Q||$.error!==Z.reason)&&ne();break}}return $}updateResult(){const t=this.#o,r=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#i=this.options,this.#r.data!==void 0&&(this.#p=this.#t),Ei(r,t))return;this.#o=r;const o=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,u=typeof i=="function"?i():i;if(u==="all"||!u&&!this.#h.size)return!0;const d=new Set(u??this.#h);return this.options.throwOnError&&d.add("error"),Object.keys(this.#o).some(p=>{const h=p;return this.#o[h]!==t[h]&&d.has(h)})};this.#C({listeners:o()})}#S(){const t=this.#e.getQueryCache().build(this.#e,this.options);if(t===this.#t)return;const r=this.#t;this.#t=t,this.#n=t.state,this.hasListeners()&&(r?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(t){Ue.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(this.#o)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function ob(t,r){return Nt(r.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&r.retryOnMount===!1)}function Qp(t,r){return ob(t,r)||t.state.data!==void 0&&Ou(t,r,r.refetchOnMount)}function Ou(t,r,o){if(Nt(r.enabled,t)!==!1&&Mn(r.staleTime,t)!=="static"){const i=typeof o=="function"?o(t):o;return i==="always"||i!==!1&&tc(t,r)}return!1}function Gp(t,r,o,i){return(t!==r||Nt(i.enabled,t)===!1)&&(!o.suspense||t.state.status!=="error")&&tc(t,o)}function tc(t,r){return Nt(r.enabled,t)!==!1&&t.isStaleByTime(Mn(r.staleTime,t))}function sb(t,r){return!Ei(t.getCurrentResult(),r)}function qp(t){return{onFetch:(r,o)=>{const i=r.options,u=r.fetchOptions?.meta?.fetchMore?.direction,d=r.state.data?.pages||[],p=r.state.data?.pageParams||[];let h={pages:[],pageParams:[]},g=0;const x=async()=>{let v=!1;const w=j=>{Yw(j,()=>r.signal,()=>v=!0)},b=lm(r.options,r.fetchOptions),k=async(j,C,S)=>{if(v)return Promise.reject();if(C==null&&j.pages.length)return Promise.resolve(j);const _=(()=>{const A={client:r.client,queryKey:r.queryKey,pageParam:C,direction:S?"backward":"forward",meta:r.options.meta};return w(A),A})(),O=await b(_),{maxPages:I}=r.options,D=S?qw:Gw;return{pages:D(j.pages,O,I),pageParams:D(j.pageParams,C,I)}};if(u&&d.length){const j=u==="backward",C=j?ib:Yp,S={pages:d,pageParams:p},E=C(i,S);h=await k(S,E,j)}else{const j=t??d.length;do{const C=g===0?p[0]??i.initialPageParam:Yp(i,h);if(g>0&&C==null)break;h=await k(h,C),g++}while(g<j)}return h};r.options.persister?r.fetchFn=()=>r.options.persister?.(x,{client:r.client,queryKey:r.queryKey,meta:r.options.meta,signal:r.signal},o):r.fetchFn=x}}}function Yp(t,{pages:r,pageParams:o}){const i=r.length-1;return r.length>0?t.getNextPageParam(r[i],r,o[i],o):void 0}function ib(t,{pages:r,pageParams:o}){return r.length>0?t.getPreviousPageParam?.(r[0],r,o[0],o):void 0}var ab=class extends dm{#e;#t;#n;#o;constructor(t){super(),this.#e=t.client,this.mutationId=t.mutationId,this.#n=t.mutationCache,this.#t=[],this.state=t.state||pm(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#t.includes(t)||(this.#t.push(t),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#t=this.#t.filter(r=>r!==t),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#o?.continue()??this.execute(this.state.variables)}async execute(t){const r=()=>{this.#r({type:"continue"})},o={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#o=cm({fn:()=>this.options.mutationFn?this.options.mutationFn(t,o):Promise.reject(new Error("No mutationFn found")),onFail:(d,p)=>{this.#r({type:"failed",failureCount:d,error:p})},onPause:()=>{this.#r({type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const i=this.state.status==="pending",u=!this.#o.canStart();try{if(i)r();else{this.#r({type:"pending",variables:t,isPaused:u}),this.#n.config.onMutate&&await this.#n.config.onMutate(t,this,o);const p=await this.options.onMutate?.(t,o);p!==this.state.context&&this.#r({type:"pending",context:p,variables:t,isPaused:u})}const d=await this.#o.start();return await this.#n.config.onSuccess?.(d,t,this.state.context,this,o),await this.options.onSuccess?.(d,t,this.state.context,o),await this.#n.config.onSettled?.(d,null,this.state.variables,this.state.context,this,o),await this.options.onSettled?.(d,null,t,this.state.context,o),this.#r({type:"success",data:d}),d}catch(d){try{await this.#n.config.onError?.(d,t,this.state.context,this,o)}catch(p){Promise.reject(p)}try{await this.options.onError?.(d,t,this.state.context,o)}catch(p){Promise.reject(p)}try{await this.#n.config.onSettled?.(void 0,d,this.state.variables,this.state.context,this,o)}catch(p){Promise.reject(p)}try{await this.options.onSettled?.(void 0,d,t,this.state.context,o)}catch(p){Promise.reject(p)}throw this.#r({type:"error",error:d}),d}finally{this.#n.runNext(this)}}#r(t){const r=o=>{switch(t.type){case"failed":return{...o,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...o,isPaused:!0};case"continue":return{...o,isPaused:!1};case"pending":return{...o,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...o,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...o,data:void 0,error:t.error,failureCount:o.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Ue.batch(()=>{this.#t.forEach(o=>{o.onMutationUpdate(t)}),this.#n.notify({mutation:this,type:"updated",action:t})})}};function pm(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var lb=class extends zr{constructor(t={}){super(),this.config=t,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(t,r,o){const i=new ab({client:t,mutationCache:this,mutationId:++this.#n,options:t.defaultMutationOptions(r),state:o});return this.add(i),i}add(t){this.#e.add(t);const r=ci(t);if(typeof r=="string"){const o=this.#t.get(r);o?o.push(t):this.#t.set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#e.delete(t)){const r=ci(t);if(typeof r=="string"){const o=this.#t.get(r);if(o)if(o.length>1){const i=o.indexOf(t);i!==-1&&o.splice(i,1)}else o[0]===t&&this.#t.delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=ci(t);if(typeof r=="string"){const i=this.#t.get(r)?.find(u=>u.state.status==="pending");return!i||i===t}else return!0}runNext(t){const r=ci(t);return typeof r=="string"?this.#t.get(r)?.find(i=>i!==t&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Ue.batch(()=>{this.#e.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(t){const r={exact:!0,...t};return this.getAll().find(o=>Hp(r,o))}findAll(t={}){return this.getAll().filter(r=>Hp(t,r))}notify(t){Ue.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Ue.batch(()=>Promise.all(t.map(r=>r.continue().catch(ot))))}};function ci(t){return t.options.scope?.id}var ub=class extends zr{#e;#t=void 0;#n;#o;constructor(r,o){super(),this.#e=r,this.setOptions(o),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(r){const o=this.options;this.options=this.#e.defaultMutationOptions(r),Ei(this.options,o)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),o?.mutationKey&&this.options.mutationKey&&tr(o.mutationKey)!==tr(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(r){this.#r(),this.#i(r)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#i()}mutate(r,o){return this.#o=o,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(r)}#r(){const r=this.#n?.state??pm();this.#t={...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset}}#i(r){Ue.batch(()=>{if(this.#o&&this.hasListeners()){const o=this.#t.variables,i=this.#t.context,u={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(r?.type==="success"){try{this.#o.onSuccess?.(r.data,o,i,u)}catch(d){Promise.reject(d)}try{this.#o.onSettled?.(r.data,null,o,i,u)}catch(d){Promise.reject(d)}}else if(r?.type==="error"){try{this.#o.onError?.(r.error,o,i,u)}catch(d){Promise.reject(d)}try{this.#o.onSettled?.(void 0,r.error,o,i,u)}catch(d){Promise.reject(d)}}}this.listeners.forEach(o=>{o(this.#t)})})}},cb=class extends zr{constructor(t={}){super(),this.config=t,this.#e=new Map}#e;build(t,r,o){const i=r.queryKey,u=r.queryHash??Xu(i,r);let d=this.get(u);return d||(d=new nb({client:t,queryKey:i,queryHash:u,options:t.defaultQueryOptions(r),state:o,defaultOptions:t.getQueryDefaults(i)}),this.add(d)),d}add(t){this.#e.has(t.queryHash)||(this.#e.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=this.#e.get(t.queryHash);r&&(t.destroy(),r===t&&this.#e.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ue.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#e.get(t)}getAll(){return[...this.#e.values()]}find(t){const r={exact:!0,...t};return this.getAll().find(o=>Up(r,o))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(o=>Up(t,o)):r}notify(t){Ue.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Ue.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ue.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},db=class{#e;#t;#n;#o;#r;#i;#a;#s;constructor(t={}){this.#e=t.queryCache||new cb,this.#t=t.mutationCache||new lb,this.#n=t.defaultOptions||{},this.#o=new Map,this.#r=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#a=ec.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=Ni.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#a?.(),this.#a=void 0,this.#s?.(),this.#s=void 0)}isFetching(t){return this.#e.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#t.findAll({...t,status:"pending"}).length}getQueryData(t){const r=this.defaultQueryOptions({queryKey:t});return this.#e.get(r.queryHash)?.state.data}ensureQueryData(t){const r=this.defaultQueryOptions(t),o=this.#e.build(this,r),i=o.state.data;return i===void 0?this.fetchQuery(t):(t.revalidateIfStale&&o.isStaleByTime(Mn(r.staleTime,o))&&this.prefetchQuery(r),Promise.resolve(i))}getQueriesData(t){return this.#e.findAll(t).map(({queryKey:r,state:o})=>{const i=o.data;return[r,i]})}setQueryData(t,r,o){const i=this.defaultQueryOptions({queryKey:t}),d=this.#e.get(i.queryHash)?.state.data,p=Kw(r,d);if(p!==void 0)return this.#e.build(this,i).setData(p,{...o,manual:!0})}setQueriesData(t,r,o){return Ue.batch(()=>this.#e.findAll(t).map(({queryKey:i})=>[i,this.setQueryData(i,r,o)]))}getQueryState(t){const r=this.defaultQueryOptions({queryKey:t});return this.#e.get(r.queryHash)?.state}removeQueries(t){const r=this.#e;Ue.batch(()=>{r.findAll(t).forEach(o=>{r.remove(o)})})}resetQueries(t,r){const o=this.#e;return Ue.batch(()=>(o.findAll(t).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...t},r)))}cancelQueries(t,r={}){const o={revert:!0,...r},i=Ue.batch(()=>this.#e.findAll(t).map(u=>u.cancel(o)));return Promise.all(i).then(ot).catch(ot)}invalidateQueries(t,r={}){return Ue.batch(()=>(this.#e.findAll(t).forEach(o=>{o.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},r)))}refetchQueries(t,r={}){const o={...r,cancelRefetch:r.cancelRefetch??!0},i=Ue.batch(()=>this.#e.findAll(t).filter(u=>!u.isDisabled()&&!u.isStatic()).map(u=>{let d=u.fetch(void 0,o);return o.throwOnError||(d=d.catch(ot)),u.state.fetchStatus==="paused"?Promise.resolve():d}));return Promise.all(i).then(ot)}fetchQuery(t){const r=this.defaultQueryOptions(t);r.retry===void 0&&(r.retry=!1);const o=this.#e.build(this,r);return o.isStaleByTime(Mn(r.staleTime,o))?o.fetch(r):Promise.resolve(o.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(ot).catch(ot)}fetchInfiniteQuery(t){return t.behavior=qp(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(ot).catch(ot)}ensureInfiniteQueryData(t){return t.behavior=qp(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return Ni.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(t){this.#n=t}setQueryDefaults(t,r){this.#o.set(tr(t),{queryKey:t,defaultOptions:r})}getQueryDefaults(t){const r=[...this.#o.values()],o={};return r.forEach(i=>{$o(t,i.queryKey)&&Object.assign(o,i.defaultOptions)}),o}setMutationDefaults(t,r){this.#r.set(tr(t),{mutationKey:t,defaultOptions:r})}getMutationDefaults(t){const r=[...this.#r.values()],o={};return r.forEach(i=>{$o(t,i.mutationKey)&&Object.assign(o,i.defaultOptions)}),o}defaultQueryOptions(t){if(t._defaulted)return t;const r={...this.#n.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return r.queryHash||(r.queryHash=Xu(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===Zu&&(r.enabled=!1),r}defaultMutationOptions(t){return t?._defaulted?t:{...this.#n.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},hm=m.createContext(void 0),mm=t=>{const r=m.useContext(hm);if(!r)throw new Error("No QueryClient set, use QueryClientProvider to set one");return r},fb=({client:t,children:r})=>(m.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),l.jsx(hm.Provider,{value:t,children:r})),gm=m.createContext(!1),pb=()=>m.useContext(gm);gm.Provider;function hb(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var mb=m.createContext(hb()),gb=()=>m.useContext(mb),vb=(t,r,o)=>{const i=o?.state.error&&typeof t.throwOnError=="function"?Ju(t.throwOnError,[o.state.error,o]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||i)&&(r.isReset()||(t.retryOnMount=!1))},xb=t=>{m.useEffect(()=>{t.clearReset()},[t])},yb=({result:t,errorResetBoundary:r,throwOnError:o,query:i,suspense:u})=>t.isError&&!r.isReset()&&!t.isFetching&&i&&(u&&t.data===void 0||Ju(o,[t.error,i])),wb=t=>{if(t.suspense){const o=u=>u==="static"?u:Math.max(u??1e3,1e3),i=t.staleTime;t.staleTime=typeof i=="function"?(...u)=>o(i(...u)):o(i),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},bb=(t,r)=>t.isLoading&&t.isFetching&&!r,Sb=(t,r)=>t?.suspense&&r.isPending,Xp=(t,r,o)=>r.fetchOptimistic(t).catch(()=>{o.clearReset()});function Cb(t,r,o){const i=pb(),u=gb(),d=mm(),p=d.defaultQueryOptions(t);d.getDefaultOptions().queries?._experimental_beforeQuery?.(p);const h=d.getQueryCache().get(p.queryHash);p._optimisticResults=i?"isRestoring":"optimistic",wb(p),vb(p,u,h),xb(u);const g=!d.getQueryCache().get(p.queryHash),[x]=m.useState(()=>new r(d,p)),v=x.getOptimisticResult(p),w=!i&&t.subscribed!==!1;if(m.useSyncExternalStore(m.useCallback(b=>{const k=w?x.subscribe(Ue.batchCalls(b)):ot;return x.updateResult(),k},[x,w]),()=>x.getCurrentResult(),()=>x.getCurrentResult()),m.useEffect(()=>{x.setOptions(p)},[p,x]),Sb(p,v))throw Xp(p,x,u);if(yb({result:v,errorResetBoundary:u,throwOnError:p.throwOnError,query:h,suspense:p.suspense}))throw v.error;return d.getDefaultOptions().queries?._experimental_afterQuery?.(p,v),p.experimental_prefetchInRender&&!er&&bb(v,i)&&(g?Xp(p,x,u):h?.promise)?.catch(ot).finally(()=>{x.updateResult()}),p.notifyOnChangeProps?v:x.trackResult(v)}function et(t,r){return Cb(t,rb)}function Je(t,r){const o=mm(),[i]=m.useState(()=>new ub(o,t));m.useEffect(()=>{i.setOptions(t)},[i,t]);const u=m.useSyncExternalStore(m.useCallback(p=>i.subscribe(Ue.batchCalls(p)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),d=m.useCallback((p,h)=>{i.mutate(p,h).catch(ot)},[i]);if(u.error&&Ju(i.options.throwOnError,[u.error]))throw u.error;return{...u,mutate:d,mutateAsync:u.mutate}}const nc="__PORT_5000__".startsWith("__")?"":"__PORT_5000__";async function rc(t){if(!t.ok){const r=await t.text()||t.statusText;throw new Error(`${t.status}: ${r}`)}}async function vm(t,r){const o=await fetch(`${nc}${t}`,r);return await rc(o),await o.json()}async function Ge(t,r,o){const i=await fetch(`${nc}${r}`,{method:t,headers:o?{"Content-Type":"application/json"}:{},body:o?JSON.stringify(o):void 0});return await rc(i),i}const kb=({on401:t})=>async({queryKey:r})=>{const o=await fetch(`${nc}${r.join("/")}`);return await rc(o),await o.json()},ye=new db({defaultOptions:{queries:{queryFn:kb({on401:"throw"}),refetchInterval:!1,refetchOnWindowFocus:!1,staleTime:1/0,retry:!1},mutations:{retry:!1}}});var Eb=(t,r,o,i,u,d,p,h)=>{let g=document.documentElement,x=["light","dark"];function v(k){(Array.isArray(t)?t:[t]).forEach(j=>{let C=j==="class",S=C&&d?u.map(E=>d[E]||E):u;C?(g.classList.remove(...S),g.classList.add(d&&d[k]?d[k]:k)):g.setAttribute(j,k)}),w(k)}function w(k){h&&x.includes(k)&&(g.style.colorScheme=k)}function b(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(i)v(i);else try{let k=localStorage.getItem(r)||o,j=p&&k==="system"?b():k;v(j)}catch{}},Zp=["light","dark"],xm="(prefers-color-scheme: dark)",Nb=typeof window>"u",ym=m.createContext(void 0),jb=t=>m.useContext(ym)?m.createElement(m.Fragment,null,t.children):m.createElement(Pb,{...t}),Rb=["light","dark"],Pb=({forcedTheme:t,disableTransitionOnChange:r=!1,enableSystem:o=!0,enableColorScheme:i=!0,storageKey:u="theme",themes:d=Rb,defaultTheme:p=o?"system":"light",attribute:h="data-theme",value:g,children:x,nonce:v,scriptProps:w})=>{let[b,k]=m.useState(()=>_b(u,p)),[j,C]=m.useState(()=>b==="system"?nu():b),S=g?Object.values(g):d,E=m.useCallback(D=>{let A=D;if(!A)return;D==="system"&&o&&(A=nu());let $=g?g[A]:A,K=r?Ob(v):null,Q=document.documentElement,ee=ne=>{ne==="class"?(Q.classList.remove(...S),$&&Q.classList.add($)):ne.startsWith("data-")&&($?Q.setAttribute(ne,$):Q.removeAttribute(ne))};if(Array.isArray(h)?h.forEach(ee):ee(h),i){let ne=Zp.includes(p)?p:null,Z=Zp.includes(A)?A:ne;Q.style.colorScheme=Z}K?.()},[v]),_=m.useCallback(D=>{let A=typeof D=="function"?D(b):D;k(A);try{localStorage.setItem(u,A)}catch{}},[b]),O=m.useCallback(D=>{let A=nu(D);C(A),b==="system"&&o&&!t&&E("system")},[b,t]);m.useEffect(()=>{let D=window.matchMedia(xm);return D.addListener(O),O(D),()=>D.removeListener(O)},[O]),m.useEffect(()=>{let D=A=>{A.key===u&&(A.newValue?k(A.newValue):_(p))};return window.addEventListener("storage",D),()=>window.removeEventListener("storage",D)},[_]),m.useEffect(()=>{E(t??b)},[t,b]);let I=m.useMemo(()=>({theme:b,setTheme:_,forcedTheme:t,resolvedTheme:b==="system"?j:b,themes:o?[...d,"system"]:d,systemTheme:o?j:void 0}),[b,_,t,j,o,d]);return m.createElement(ym.Provider,{value:I},m.createElement(Tb,{forcedTheme:t,storageKey:u,attribute:h,enableSystem:o,enableColorScheme:i,defaultTheme:p,value:g,themes:d,nonce:v,scriptProps:w}),x)},Tb=m.memo(({forcedTheme:t,storageKey:r,attribute:o,enableSystem:i,enableColorScheme:u,defaultTheme:d,value:p,themes:h,nonce:g,scriptProps:x})=>{let v=JSON.stringify([o,r,d,t,h,p,i,u]).slice(1,-1);return m.createElement("script",{...x,suppressHydrationWarning:!0,nonce:typeof window>"u"?g:"",dangerouslySetInnerHTML:{__html:`(${Eb.toString()})(${v})`}})}),_b=(t,r)=>{if(Nb)return;let o;try{o=localStorage.getItem(t)||void 0}catch{}return o||r},Ob=t=>{let r=document.createElement("style");return t&&r.setAttribute("nonce",t),r.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(r)},1)}},nu=t=>(t||(t=window.matchMedia(xm)),t.matches?"dark":"light");const Ab=1,Mb=1e6;let ru=0;function Ib(){return ru=(ru+1)%Number.MAX_SAFE_INTEGER,ru.toString()}const ou=new Map,Jp=t=>{if(ou.has(t))return;const r=setTimeout(()=>{ou.delete(t),Fo({type:"REMOVE_TOAST",toastId:t})},Mb);ou.set(t,r)},Lb=(t,r)=>{switch(r.type){case"ADD_TOAST":return{...t,toasts:[r.toast,...t.toasts].slice(0,Ab)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(o=>o.id===r.toast.id?{...o,...r.toast}:o)};case"DISMISS_TOAST":{const{toastId:o}=r;return o?Jp(o):t.toasts.forEach(i=>{Jp(i.id)}),{...t,toasts:t.toasts.map(i=>i.id===o||o===void 0?{...i,open:!1}:i)}}case"REMOVE_TOAST":return r.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(o=>o.id!==r.toastId)}}},yi=[];let wi={toasts:[]};function Fo(t){wi=Lb(wi,t),yi.forEach(r=>{r(wi)})}function vt({...t}){const r=Ib(),o=u=>Fo({type:"UPDATE_TOAST",toast:{...u,id:r}}),i=()=>Fo({type:"DISMISS_TOAST",toastId:r});return Fo({type:"ADD_TOAST",toast:{...t,id:r,open:!0,onOpenChange:u=>{u||i()}}}),{id:r,dismiss:i,update:o}}function Db(){const[t,r]=m.useState(wi);return m.useEffect(()=>(yi.push(r),()=>{const o=yi.indexOf(r);o>-1&&yi.splice(o,1)}),[t]),{...t,toast:vt,dismiss:o=>Fo({type:"DISMISS_TOAST",toastId:o})}}var $i=Qh();const Fb=Vh($i);function he(t,r,{checkForDefaultPrevented:o=!0}={}){return function(u){if(t?.(u),o===!1||!u.defaultPrevented)return r?.(u)}}function eh(t,r){if(typeof t=="function")return t(r);t!=null&&(t.current=r)}function Ur(...t){return r=>{let o=!1;const i=t.map(u=>{const d=eh(u,r);return!o&&typeof d=="function"&&(o=!0),d});if(o)return()=>{for(let u=0;u<i.length;u++){const d=i[u];typeof d=="function"?d():eh(t[u],null)}}}}function He(...t){return m.useCallback(Ur(...t),t)}function Dn(t,r=[]){let o=[];function i(d,p){const h=m.createContext(p),g=o.length;o=[...o,p];const x=w=>{const{scope:b,children:k,...j}=w,C=b?.[t]?.[g]||h,S=m.useMemo(()=>j,Object.values(j));return l.jsx(C.Provider,{value:S,children:k})};x.displayName=d+"Provider";function v(w,b){const k=b?.[t]?.[g]||h,j=m.useContext(k);if(j)return j;if(p!==void 0)return p;throw new Error(`\`${w}\` must be used within \`${d}\``)}return[x,v]}const u=()=>{const d=o.map(p=>m.createContext(p));return function(h){const g=h?.[t]||d;return m.useMemo(()=>({[`__scope${t}`]:{...h,[t]:g}}),[h,g])}};return u.scopeName=t,[i,$b(u,...r)]}function $b(...t){const r=t[0];if(t.length===1)return r;const o=()=>{const i=t.map(u=>({useScope:u(),scopeName:u.scopeName}));return function(d){const p=i.reduce((h,{useScope:g,scopeName:x})=>{const w=g(d)[`__scope${x}`];return{...h,...w}},{});return m.useMemo(()=>({[`__scope${r.scopeName}`]:p}),[p])}};return o.scopeName=r.scopeName,o}function th(t){const r=zb(t),o=m.forwardRef((i,u)=>{const{children:d,...p}=i,h=m.Children.toArray(d),g=h.find(Hb);if(g){const x=g.props.children,v=h.map(w=>w===g?m.Children.count(x)>1?m.Children.only(null):m.isValidElement(x)?x.props.children:null:w);return l.jsx(r,{...p,ref:u,children:m.isValidElement(x)?m.cloneElement(x,void 0,v):null})}return l.jsx(r,{...p,ref:u,children:d})});return o.displayName=`${t}.Slot`,o}function zb(t){const r=m.forwardRef((o,i)=>{const{children:u,...d}=o;if(m.isValidElement(u)){const p=Wb(u),h=Bb(d,u.props);return u.type!==m.Fragment&&(h.ref=i?Ur(i,p):p),m.cloneElement(u,h)}return m.Children.count(u)>1?m.Children.only(null):null});return r.displayName=`${t}.SlotClone`,r}var Ub=Symbol("radix.slottable");function Hb(t){return m.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Ub}function Bb(t,r){const o={...r};for(const i in r){const u=t[i],d=r[i];/^on[A-Z]/.test(i)?u&&d?o[i]=(...h)=>{const g=d(...h);return u(...h),g}:u&&(o[i]=u):i==="style"?o[i]={...u,...d}:i==="className"&&(o[i]=[u,d].filter(Boolean).join(" "))}return{...t,...o}}function Wb(t){let r=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?t.ref:(r=Object.getOwnPropertyDescriptor(t,"ref")?.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?t.props.ref:t.props.ref||t.ref)}function oc(t){const r=t+"CollectionProvider",[o,i]=Dn(r),[u,d]=o(r,{collectionRef:{current:null},itemMap:new Map}),p=C=>{const{scope:S,children:E}=C,_=On.useRef(null),O=On.useRef(new Map).current;return l.jsx(u,{scope:S,itemMap:O,collectionRef:_,children:E})};p.displayName=r;const h=t+"CollectionSlot",g=th(h),x=On.forwardRef((C,S)=>{const{scope:E,children:_}=C,O=d(h,E),I=He(S,O.collectionRef);return l.jsx(g,{ref:I,children:_})});x.displayName=h;const v=t+"CollectionItemSlot",w="data-radix-collection-item",b=th(v),k=On.forwardRef((C,S)=>{const{scope:E,children:_,...O}=C,I=On.useRef(null),D=He(S,I),A=d(v,E);return On.useEffect(()=>(A.itemMap.set(I,{ref:I,...O}),()=>{A.itemMap.delete(I)})),l.jsx(b,{[w]:"",ref:D,children:_})});k.displayName=v;function j(C){const S=d(t+"CollectionConsumer",C);return On.useCallback(()=>{const _=S.collectionRef.current;if(!_)return[];const O=Array.from(_.querySelectorAll(`[${w}]`));return Array.from(S.itemMap.values()).sort((A,$)=>O.indexOf(A.ref.current)-O.indexOf($.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:p,Slot:x,ItemSlot:k},j,i]}function Kb(t){const r=Vb(t),o=m.forwardRef((i,u)=>{const{children:d,...p}=i,h=m.Children.toArray(d),g=h.find(Gb);if(g){const x=g.props.children,v=h.map(w=>w===g?m.Children.count(x)>1?m.Children.only(null):m.isValidElement(x)?x.props.children:null:w);return l.jsx(r,{...p,ref:u,children:m.isValidElement(x)?m.cloneElement(x,void 0,v):null})}return l.jsx(r,{...p,ref:u,children:d})});return o.displayName=`${t}.Slot`,o}function Vb(t){const r=m.forwardRef((o,i)=>{const{children:u,...d}=o;if(m.isValidElement(u)){const p=Yb(u),h=qb(d,u.props);return u.type!==m.Fragment&&(h.ref=i?Ur(i,p):p),m.cloneElement(u,h)}return m.Children.count(u)>1?m.Children.only(null):null});return r.displayName=`${t}.SlotClone`,r}var Qb=Symbol("radix.slottable");function Gb(t){return m.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Qb}function qb(t,r){const o={...r};for(const i in r){const u=t[i],d=r[i];/^on[A-Z]/.test(i)?u&&d?o[i]=(...h)=>{const g=d(...h);return u(...h),g}:u&&(o[i]=u):i==="style"?o[i]={...u,...d}:i==="className"&&(o[i]=[u,d].filter(Boolean).join(" "))}return{...t,...o}}function Yb(t){let r=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?t.ref:(r=Object.getOwnPropertyDescriptor(t,"ref")?.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?t.props.ref:t.props.ref||t.ref)}var Xb=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],je=Xb.reduce((t,r)=>{const o=Kb(`Primitive.${r}`),i=m.forwardRef((u,d)=>{const{asChild:p,...h}=u,g=p?o:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(g,{...h,ref:d})});return i.displayName=`Primitive.${r}`,{...t,[r]:i}},{});function sc(t,r){t&&$i.flushSync(()=>t.dispatchEvent(r))}function yt(t){const r=m.useRef(t);return m.useEffect(()=>{r.current=t}),m.useMemo(()=>(...o)=>r.current?.(...o),[])}function Zb(t,r=globalThis?.document){const o=yt(t);m.useEffect(()=>{const i=u=>{u.key==="Escape"&&o(u)};return r.addEventListener("keydown",i,{capture:!0}),()=>r.removeEventListener("keydown",i,{capture:!0})},[o,r])}var Jb="DismissableLayer",Au="dismissableLayer.update",e0="dismissableLayer.pointerDownOutside",t0="dismissableLayer.focusOutside",nh,wm=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),zi=m.forwardRef((t,r)=>{const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:i,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:p,onDismiss:h,...g}=t,x=m.useContext(wm),[v,w]=m.useState(null),b=v?.ownerDocument??globalThis?.document,[,k]=m.useState({}),j=He(r,$=>w($)),C=Array.from(x.layers),[S]=[...x.layersWithOutsidePointerEventsDisabled].slice(-1),E=C.indexOf(S),_=v?C.indexOf(v):-1,O=x.layersWithOutsidePointerEventsDisabled.size>0,I=_>=E,D=r0($=>{const K=$.target,Q=[...x.branches].some(ee=>ee.contains(K));!I||Q||(u?.($),p?.($),$.defaultPrevented||h?.())},b),A=o0($=>{const K=$.target;[...x.branches].some(ee=>ee.contains(K))||(d?.($),p?.($),$.defaultPrevented||h?.())},b);return Zb($=>{_===x.layers.size-1&&(i?.($),!$.defaultPrevented&&h&&($.preventDefault(),h()))},b),m.useEffect(()=>{if(v)return o&&(x.layersWithOutsidePointerEventsDisabled.size===0&&(nh=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),x.layersWithOutsidePointerEventsDisabled.add(v)),x.layers.add(v),rh(),()=>{o&&x.layersWithOutsidePointerEventsDisabled.size===1&&(b.body.style.pointerEvents=nh)}},[v,b,o,x]),m.useEffect(()=>()=>{v&&(x.layers.delete(v),x.layersWithOutsidePointerEventsDisabled.delete(v),rh())},[v,x]),m.useEffect(()=>{const $=()=>k({});return document.addEventListener(Au,$),()=>document.removeEventListener(Au,$)},[]),l.jsx(je.div,{...g,ref:j,style:{pointerEvents:O?I?"auto":"none":void 0,...t.style},onFocusCapture:he(t.onFocusCapture,A.onFocusCapture),onBlurCapture:he(t.onBlurCapture,A.onBlurCapture),onPointerDownCapture:he(t.onPointerDownCapture,D.onPointerDownCapture)})});zi.displayName=Jb;var n0="DismissableLayerBranch",bm=m.forwardRef((t,r)=>{const o=m.useContext(wm),i=m.useRef(null),u=He(r,i);return m.useEffect(()=>{const d=i.current;if(d)return o.branches.add(d),()=>{o.branches.delete(d)}},[o.branches]),l.jsx(je.div,{...t,ref:u})});bm.displayName=n0;function r0(t,r=globalThis?.document){const o=yt(t),i=m.useRef(!1),u=m.useRef(()=>{});return m.useEffect(()=>{const d=h=>{if(h.target&&!i.current){let g=function(){Sm(e0,o,x,{discrete:!0})};const x={originalEvent:h};h.pointerType==="touch"?(r.removeEventListener("click",u.current),u.current=g,r.addEventListener("click",u.current,{once:!0})):g()}else r.removeEventListener("click",u.current);i.current=!1},p=window.setTimeout(()=>{r.addEventListener("pointerdown",d)},0);return()=>{window.clearTimeout(p),r.removeEventListener("pointerdown",d),r.removeEventListener("click",u.current)}},[r,o]),{onPointerDownCapture:()=>i.current=!0}}function o0(t,r=globalThis?.document){const o=yt(t),i=m.useRef(!1);return m.useEffect(()=>{const u=d=>{d.target&&!i.current&&Sm(t0,o,{originalEvent:d},{discrete:!1})};return r.addEventListener("focusin",u),()=>r.removeEventListener("focusin",u)},[r,o]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function rh(){const t=new CustomEvent(Au);document.dispatchEvent(t)}function Sm(t,r,o,{discrete:i}){const u=o.originalEvent.target,d=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:o});r&&u.addEventListener(t,r,{once:!0}),i?sc(u,d):u.dispatchEvent(d)}var s0=zi,i0=bm,Gt=globalThis?.document?m.useLayoutEffect:()=>{},a0="Portal",ic=m.forwardRef((t,r)=>{const{container:o,...i}=t,[u,d]=m.useState(!1);Gt(()=>d(!0),[]);const p=o||u&&globalThis?.document?.body;return p?Fb.createPortal(l.jsx(je.div,{...i,ref:r}),p):null});ic.displayName=a0;function l0(t,r){return m.useReducer((o,i)=>r[o][i]??o,t)}var Fn=t=>{const{present:r,children:o}=t,i=u0(r),u=typeof o=="function"?o({present:i.isPresent}):m.Children.only(o),d=He(i.ref,c0(u));return typeof o=="function"||i.isPresent?m.cloneElement(u,{ref:d}):null};Fn.displayName="Presence";function u0(t){const[r,o]=m.useState(),i=m.useRef(null),u=m.useRef(t),d=m.useRef("none"),p=t?"mounted":"unmounted",[h,g]=l0(p,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{const x=di(i.current);d.current=h==="mounted"?x:"none"},[h]),Gt(()=>{const x=i.current,v=u.current;if(v!==t){const b=d.current,k=di(x);t?g("MOUNT"):k==="none"||x?.display==="none"?g("UNMOUNT"):g(v&&b!==k?"ANIMATION_OUT":"UNMOUNT"),u.current=t}},[t,g]),Gt(()=>{if(r){let x;const v=r.ownerDocument.defaultView??window,w=k=>{const C=di(i.current).includes(CSS.escape(k.animationName));if(k.target===r&&C&&(g("ANIMATION_END"),!u.current)){const S=r.style.animationFillMode;r.style.animationFillMode="forwards",x=v.setTimeout(()=>{r.style.animationFillMode==="forwards"&&(r.style.animationFillMode=S)})}},b=k=>{k.target===r&&(d.current=di(i.current))};return r.addEventListener("animationstart",b),r.addEventListener("animationcancel",w),r.addEventListener("animationend",w),()=>{v.clearTimeout(x),r.removeEventListener("animationstart",b),r.removeEventListener("animationcancel",w),r.removeEventListener("animationend",w)}}else g("ANIMATION_END")},[r,g]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:m.useCallback(x=>{i.current=x?getComputedStyle(x):null,o(x)},[])}}function di(t){return t?.animationName||"none"}function c0(t){let r=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?t.ref:(r=Object.getOwnPropertyDescriptor(t,"ref")?.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?t.props.ref:t.props.ref||t.ref)}var d0=Qu[" useInsertionEffect ".trim().toString()]||Gt;function Qo({prop:t,defaultProp:r,onChange:o=()=>{},caller:i}){const[u,d,p]=f0({defaultProp:r,onChange:o}),h=t!==void 0,g=h?t:u;{const v=m.useRef(t!==void 0);m.useEffect(()=>{const w=v.current;w!==h&&console.warn(`${i} is changing from ${w?"controlled":"uncontrolled"} to ${h?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),v.current=h},[h,i])}const x=m.useCallback(v=>{if(h){const w=p0(v)?v(t):v;w!==t&&p.current?.(w)}else d(v)},[h,t,d,p]);return[g,x]}function f0({defaultProp:t,onChange:r}){const[o,i]=m.useState(t),u=m.useRef(o),d=m.useRef(r);return d0(()=>{d.current=r},[r]),m.useEffect(()=>{u.current!==o&&(d.current?.(o),u.current=o)},[o,u]),[o,i,d]}function p0(t){return typeof t=="function"}var h0=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),m0="VisuallyHidden",Ui=m.forwardRef((t,r)=>l.jsx(je.span,{...t,ref:r,style:{...h0,...t.style}}));Ui.displayName=m0;var g0=Ui,ac="ToastProvider",[lc,v0,x0]=oc("Toast"),[Cm]=Dn("Toast",[x0]),[y0,Hi]=Cm(ac),km=t=>{const{__scopeToast:r,label:o="Notification",duration:i=5e3,swipeDirection:u="right",swipeThreshold:d=50,children:p}=t,[h,g]=m.useState(null),[x,v]=m.useState(0),w=m.useRef(!1),b=m.useRef(!1);return o.trim()||console.error(`Invalid prop \`label\` supplied to \`${ac}\`. Expected non-empty \`string\`.`),l.jsx(lc.Provider,{scope:r,children:l.jsx(y0,{scope:r,label:o,duration:i,swipeDirection:u,swipeThreshold:d,toastCount:x,viewport:h,onViewportChange:g,onToastAdd:m.useCallback(()=>v(k=>k+1),[]),onToastRemove:m.useCallback(()=>v(k=>k-1),[]),isFocusedToastEscapeKeyDownRef:w,isClosePausedRef:b,children:p})})};km.displayName=ac;var Em="ToastViewport",w0=["F8"],Mu="toast.viewportPause",Iu="toast.viewportResume",Nm=m.forwardRef((t,r)=>{const{__scopeToast:o,hotkey:i=w0,label:u="Notifications ({hotkey})",...d}=t,p=Hi(Em,o),h=v0(o),g=m.useRef(null),x=m.useRef(null),v=m.useRef(null),w=m.useRef(null),b=He(r,w,p.onViewportChange),k=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),j=p.toastCount>0;m.useEffect(()=>{const S=E=>{i.length!==0&&i.every(O=>E[O]||E.code===O)&&w.current?.focus()};return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[i]),m.useEffect(()=>{const S=g.current,E=w.current;if(j&&S&&E){const _=()=>{if(!p.isClosePausedRef.current){const A=new CustomEvent(Mu);E.dispatchEvent(A),p.isClosePausedRef.current=!0}},O=()=>{if(p.isClosePausedRef.current){const A=new CustomEvent(Iu);E.dispatchEvent(A),p.isClosePausedRef.current=!1}},I=A=>{!S.contains(A.relatedTarget)&&O()},D=()=>{S.contains(document.activeElement)||O()};return S.addEventListener("focusin",_),S.addEventListener("focusout",I),S.addEventListener("pointermove",_),S.addEventListener("pointerleave",D),window.addEventListener("blur",_),window.addEventListener("focus",O),()=>{S.removeEventListener("focusin",_),S.removeEventListener("focusout",I),S.removeEventListener("pointermove",_),S.removeEventListener("pointerleave",D),window.removeEventListener("blur",_),window.removeEventListener("focus",O)}}},[j,p.isClosePausedRef]);const C=m.useCallback(({tabbingDirection:S})=>{const _=h().map(O=>{const I=O.ref.current,D=[I,...A0(I)];return S==="forwards"?D:D.reverse()});return(S==="forwards"?_.reverse():_).flat()},[h]);return m.useEffect(()=>{const S=w.current;if(S){const E=_=>{const O=_.altKey||_.ctrlKey||_.metaKey;if(_.key==="Tab"&&!O){const D=document.activeElement,A=_.shiftKey;if(_.target===S&&A){x.current?.focus();return}const Q=C({tabbingDirection:A?"backwards":"forwards"}),ee=Q.findIndex(ne=>ne===D);su(Q.slice(ee+1))?_.preventDefault():A?x.current?.focus():v.current?.focus()}};return S.addEventListener("keydown",E),()=>S.removeEventListener("keydown",E)}},[h,C]),l.jsxs(i0,{ref:g,role:"region","aria-label":u.replace("{hotkey}",k),tabIndex:-1,style:{pointerEvents:j?void 0:"none"},children:[j&&l.jsx(Lu,{ref:x,onFocusFromOutsideViewport:()=>{const S=C({tabbingDirection:"forwards"});su(S)}}),l.jsx(lc.Slot,{scope:o,children:l.jsx(je.ol,{tabIndex:-1,...d,ref:b})}),j&&l.jsx(Lu,{ref:v,onFocusFromOutsideViewport:()=>{const S=C({tabbingDirection:"backwards"});su(S)}})]})});Nm.displayName=Em;var jm="ToastFocusProxy",Lu=m.forwardRef((t,r)=>{const{__scopeToast:o,onFocusFromOutsideViewport:i,...u}=t,d=Hi(jm,o);return l.jsx(Ui,{tabIndex:0,...u,ref:r,style:{position:"fixed"},onFocus:p=>{const h=p.relatedTarget;!d.viewport?.contains(h)&&i()}})});Lu.displayName=jm;var Go="Toast",b0="toast.swipeStart",S0="toast.swipeMove",C0="toast.swipeCancel",k0="toast.swipeEnd",Rm=m.forwardRef((t,r)=>{const{forceMount:o,open:i,defaultOpen:u,onOpenChange:d,...p}=t,[h,g]=Qo({prop:i,defaultProp:u??!0,onChange:d,caller:Go});return l.jsx(Fn,{present:o||h,children:l.jsx(j0,{open:h,...p,ref:r,onClose:()=>g(!1),onPause:yt(t.onPause),onResume:yt(t.onResume),onSwipeStart:he(t.onSwipeStart,x=>{x.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:he(t.onSwipeMove,x=>{const{x:v,y:w}=x.detail.delta;x.currentTarget.setAttribute("data-swipe","move"),x.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${v}px`),x.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${w}px`)}),onSwipeCancel:he(t.onSwipeCancel,x=>{x.currentTarget.setAttribute("data-swipe","cancel"),x.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),x.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),x.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),x.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:he(t.onSwipeEnd,x=>{const{x:v,y:w}=x.detail.delta;x.currentTarget.setAttribute("data-swipe","end"),x.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),x.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),x.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${v}px`),x.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${w}px`),g(!1)})})})});Rm.displayName=Go;var[E0,N0]=Cm(Go,{onClose(){}}),j0=m.forwardRef((t,r)=>{const{__scopeToast:o,type:i="foreground",duration:u,open:d,onClose:p,onEscapeKeyDown:h,onPause:g,onResume:x,onSwipeStart:v,onSwipeMove:w,onSwipeCancel:b,onSwipeEnd:k,...j}=t,C=Hi(Go,o),[S,E]=m.useState(null),_=He(r,X=>E(X)),O=m.useRef(null),I=m.useRef(null),D=u||C.duration,A=m.useRef(0),$=m.useRef(D),K=m.useRef(0),{onToastAdd:Q,onToastRemove:ee}=C,ne=yt(()=>{S?.contains(document.activeElement)&&C.viewport?.focus(),p()}),Z=m.useCallback(X=>{!X||X===1/0||(window.clearTimeout(K.current),A.current=new Date().getTime(),K.current=window.setTimeout(ne,X))},[ne]);m.useEffect(()=>{const X=C.viewport;if(X){const ve=()=>{Z($.current),x?.()},se=()=>{const le=new Date().getTime()-A.current;$.current=$.current-le,window.clearTimeout(K.current),g?.()};return X.addEventListener(Mu,se),X.addEventListener(Iu,ve),()=>{X.removeEventListener(Mu,se),X.removeEventListener(Iu,ve)}}},[C.viewport,D,g,x,Z]),m.useEffect(()=>{d&&!C.isClosePausedRef.current&&Z(D)},[d,D,C.isClosePausedRef,Z]),m.useEffect(()=>(Q(),()=>ee()),[Q,ee]);const de=m.useMemo(()=>S?Im(S):null,[S]);return C.viewport?l.jsxs(l.Fragment,{children:[de&&l.jsx(R0,{__scopeToast:o,role:"status","aria-live":i==="foreground"?"assertive":"polite",children:de}),l.jsx(E0,{scope:o,onClose:ne,children:$i.createPortal(l.jsx(lc.ItemSlot,{scope:o,children:l.jsx(s0,{asChild:!0,onEscapeKeyDown:he(h,()=>{C.isFocusedToastEscapeKeyDownRef.current||ne(),C.isFocusedToastEscapeKeyDownRef.current=!1}),children:l.jsx(je.li,{tabIndex:0,"data-state":d?"open":"closed","data-swipe-direction":C.swipeDirection,...j,ref:_,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:he(t.onKeyDown,X=>{X.key==="Escape"&&(h?.(X.nativeEvent),X.nativeEvent.defaultPrevented||(C.isFocusedToastEscapeKeyDownRef.current=!0,ne()))}),onPointerDown:he(t.onPointerDown,X=>{X.button===0&&(O.current={x:X.clientX,y:X.clientY})}),onPointerMove:he(t.onPointerMove,X=>{if(!O.current)return;const ve=X.clientX-O.current.x,se=X.clientY-O.current.y,le=!!I.current,z=["left","right"].includes(C.swipeDirection),U=["left","up"].includes(C.swipeDirection)?Math.min:Math.max,q=z?U(0,ve):0,P=z?0:U(0,se),B=X.pointerType==="touch"?10:2,ue={x:q,y:P},me={originalEvent:X,delta:ue};le?(I.current=ue,fi(S0,w,me,{discrete:!1})):oh(ue,C.swipeDirection,B)?(I.current=ue,fi(b0,v,me,{discrete:!1}),X.target.setPointerCapture(X.pointerId)):(Math.abs(ve)>B||Math.abs(se)>B)&&(O.current=null)}),onPointerUp:he(t.onPointerUp,X=>{const ve=I.current,se=X.target;if(se.hasPointerCapture(X.pointerId)&&se.releasePointerCapture(X.pointerId),I.current=null,O.current=null,ve){const le=X.currentTarget,z={originalEvent:X,delta:ve};oh(ve,C.swipeDirection,C.swipeThreshold)?fi(k0,k,z,{discrete:!0}):fi(C0,b,z,{discrete:!0}),le.addEventListener("click",U=>U.preventDefault(),{once:!0})}})})})}),C.viewport)})]}):null}),R0=t=>{const{__scopeToast:r,children:o,...i}=t,u=Hi(Go,r),[d,p]=m.useState(!1),[h,g]=m.useState(!1);return _0(()=>p(!0)),m.useEffect(()=>{const x=window.setTimeout(()=>g(!0),1e3);return()=>window.clearTimeout(x)},[]),h?null:l.jsx(ic,{asChild:!0,children:l.jsx(Ui,{...i,children:d&&l.jsxs(l.Fragment,{children:[u.label," ",o]})})})},P0="ToastTitle",Pm=m.forwardRef((t,r)=>{const{__scopeToast:o,...i}=t;return l.jsx(je.div,{...i,ref:r})});Pm.displayName=P0;var T0="ToastDescription",Tm=m.forwardRef((t,r)=>{const{__scopeToast:o,...i}=t;return l.jsx(je.div,{...i,ref:r})});Tm.displayName=T0;var _m="ToastAction",Om=m.forwardRef((t,r)=>{const{altText:o,...i}=t;return o.trim()?l.jsx(Mm,{altText:o,asChild:!0,children:l.jsx(uc,{...i,ref:r})}):(console.error(`Invalid prop \`altText\` supplied to \`${_m}\`. Expected non-empty \`string\`.`),null)});Om.displayName=_m;var Am="ToastClose",uc=m.forwardRef((t,r)=>{const{__scopeToast:o,...i}=t,u=N0(Am,o);return l.jsx(Mm,{asChild:!0,children:l.jsx(je.button,{type:"button",...i,ref:r,onClick:he(t.onClick,u.onClose)})})});uc.displayName=Am;var Mm=m.forwardRef((t,r)=>{const{__scopeToast:o,altText:i,...u}=t;return l.jsx(je.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":i||void 0,...u,ref:r})});function Im(t){const r=[];return Array.from(t.childNodes).forEach(i=>{if(i.nodeType===i.TEXT_NODE&&i.textContent&&r.push(i.textContent),O0(i)){const u=i.ariaHidden||i.hidden||i.style.display==="none",d=i.dataset.radixToastAnnounceExclude==="";if(!u)if(d){const p=i.dataset.radixToastAnnounceAlt;p&&r.push(p)}else r.push(...Im(i))}}),r}function fi(t,r,o,{discrete:i}){const u=o.originalEvent.currentTarget,d=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:o});r&&u.addEventListener(t,r,{once:!0}),i?sc(u,d):u.dispatchEvent(d)}var oh=(t,r,o=0)=>{const i=Math.abs(t.x),u=Math.abs(t.y),d=i>u;return r==="left"||r==="right"?d&&i>o:!d&&u>o};function _0(t=()=>{}){const r=yt(t);Gt(()=>{let o=0,i=0;return o=window.requestAnimationFrame(()=>i=window.requestAnimationFrame(r)),()=>{window.cancelAnimationFrame(o),window.cancelAnimationFrame(i)}},[r])}function O0(t){return t.nodeType===t.ELEMENT_NODE}function A0(t){const r=[],o=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const u=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||u?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)r.push(o.currentNode);return r}function su(t){const r=document.activeElement;return t.some(o=>o===r?!0:(o.focus(),document.activeElement!==r))}var M0=km,Lm=Nm,Dm=Rm,Fm=Pm,$m=Tm,zm=Om,Um=uc;function Hm(t){var r,o,i="";if(typeof t=="string"||typeof t=="number")i+=t;else if(typeof t=="object")if(Array.isArray(t)){var u=t.length;for(r=0;r<u;r++)t[r]&&(o=Hm(t[r]))&&(i&&(i+=" "),i+=o)}else for(o in t)t[o]&&(i&&(i+=" "),i+=o);return i}function Bm(){for(var t,r,o=0,i="",u=arguments.length;o<u;o++)(t=arguments[o])&&(r=Hm(t))&&(i&&(i+=" "),i+=r);return i}const sh=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,ih=Bm,I0=(t,r)=>o=>{var i;if(r?.variants==null)return ih(t,o?.class,o?.className);const{variants:u,defaultVariants:d}=r,p=Object.keys(u).map(x=>{const v=o?.[x],w=d?.[x];if(v===null)return null;const b=sh(v)||sh(w);return u[x][b]}),h=o&&Object.entries(o).reduce((x,v)=>{let[w,b]=v;return b===void 0||(x[w]=b),x},{}),g=r==null||(i=r.compoundVariants)===null||i===void 0?void 0:i.reduce((x,v)=>{let{class:w,className:b,...k}=v;return Object.entries(k).every(j=>{let[C,S]=j;return Array.isArray(S)?S.includes({...d,...h}[C]):{...d,...h}[C]===S})?[...x,w,b]:x},[]);return ih(t,p,g,o?.class,o?.className)};const L0=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Wm=(...t)=>t.filter((r,o,i)=>!!r&&i.indexOf(r)===o).join(" ");var D0={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"};const F0=m.forwardRef(({color:t="currentColor",size:r=24,strokeWidth:o=2,absoluteStrokeWidth:i,className:u="",children:d,iconNode:p,...h},g)=>m.createElement("svg",{ref:g,...D0,width:r,height:r,stroke:t,strokeWidth:i?Number(o)*24/Number(r):o,className:Wm("lucide",u),...h},[...p.map(([x,v])=>m.createElement(x,v)),...Array.isArray(d)?d:[d]]));const Hr=(t,r)=>{const o=m.forwardRef(({className:i,...u},d)=>m.createElement(F0,{ref:d,iconNode:r,className:Wm(`lucide-${L0(t)}`,i),...u}));return o.displayName=`${t}`,o};const $0=Hr("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);const z0=Hr("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const U0=Hr("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const H0=Hr("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);const B0=Hr("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);const W0=Hr("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),cc="-",K0=t=>{const r=Q0(t),{conflictingClassGroups:o,conflictingClassGroupModifiers:i}=t;return{getClassGroupId:p=>{const h=p.split(cc);return h[0]===""&&h.length!==1&&h.shift(),Km(h,r)||V0(p)},getConflictingClassGroupIds:(p,h)=>{const g=o[p]||[];return h&&i[p]?[...g,...i[p]]:g}}},Km=(t,r)=>{if(t.length===0)return r.classGroupId;const o=t[0],i=r.nextPart.get(o),u=i?Km(t.slice(1),i):void 0;if(u)return u;if(r.validators.length===0)return;const d=t.join(cc);return r.validators.find(({validator:p})=>p(d))?.classGroupId},ah=/^\[(.+)\]$/,V0=t=>{if(ah.test(t)){const r=ah.exec(t)[1],o=r?.substring(0,r.indexOf(":"));if(o)return"arbitrary.."+o}},Q0=t=>{const{theme:r,prefix:o}=t,i={nextPart:new Map,validators:[]};return q0(Object.entries(t.classGroups),o).forEach(([d,p])=>{Du(p,i,d,r)}),i},Du=(t,r,o,i)=>{t.forEach(u=>{if(typeof u=="string"){const d=u===""?r:lh(r,u);d.classGroupId=o;return}if(typeof u=="function"){if(G0(u)){Du(u(i),r,o,i);return}r.validators.push({validator:u,classGroupId:o});return}Object.entries(u).forEach(([d,p])=>{Du(p,lh(r,d),o,i)})})},lh=(t,r)=>{let o=t;return r.split(cc).forEach(i=>{o.nextPart.has(i)||o.nextPart.set(i,{nextPart:new Map,validators:[]}),o=o.nextPart.get(i)}),o},G0=t=>t.isThemeGetter,q0=(t,r)=>r?t.map(([o,i])=>{const u=i.map(d=>typeof d=="string"?r+d:typeof d=="object"?Object.fromEntries(Object.entries(d).map(([p,h])=>[r+p,h])):d);return[o,u]}):t,Y0=t=>{if(t<1)return{get:()=>{},set:()=>{}};let r=0,o=new Map,i=new Map;const u=(d,p)=>{o.set(d,p),r++,r>t&&(r=0,i=o,o=new Map)};return{get(d){let p=o.get(d);if(p!==void 0)return p;if((p=i.get(d))!==void 0)return u(d,p),p},set(d,p){o.has(d)?o.set(d,p):u(d,p)}}},Vm="!",X0=t=>{const{separator:r,experimentalParseClassName:o}=t,i=r.length===1,u=r[0],d=r.length,p=h=>{const g=[];let x=0,v=0,w;for(let S=0;S<h.length;S++){let E=h[S];if(x===0){if(E===u&&(i||h.slice(S,S+d)===r)){g.push(h.slice(v,S)),v=S+d;continue}if(E==="/"){w=S;continue}}E==="["?x++:E==="]"&&x--}const b=g.length===0?h:h.substring(v),k=b.startsWith(Vm),j=k?b.substring(1):b,C=w&&w>v?w-v:void 0;return{modifiers:g,hasImportantModifier:k,baseClassName:j,maybePostfixModifierPosition:C}};return o?h=>o({className:h,parseClassName:p}):p},Z0=t=>{if(t.length<=1)return t;const r=[];let o=[];return t.forEach(i=>{i[0]==="["?(r.push(...o.sort(),i),o=[]):o.push(i)}),r.push(...o.sort()),r},J0=t=>({cache:Y0(t.cacheSize),parseClassName:X0(t),...K0(t)}),e1=/\s+/,t1=(t,r)=>{const{parseClassName:o,getClassGroupId:i,getConflictingClassGroupIds:u}=r,d=[],p=t.trim().split(e1);let h="";for(let g=p.length-1;g>=0;g-=1){const x=p[g],{modifiers:v,hasImportantModifier:w,baseClassName:b,maybePostfixModifierPosition:k}=o(x);let j=!!k,C=i(j?b.substring(0,k):b);if(!C){if(!j){h=x+(h.length>0?" "+h:h);continue}if(C=i(b),!C){h=x+(h.length>0?" "+h:h);continue}j=!1}const S=Z0(v).join(":"),E=w?S+Vm:S,_=E+C;if(d.includes(_))continue;d.push(_);const O=u(C,j);for(let I=0;I<O.length;++I){const D=O[I];d.push(E+D)}h=x+(h.length>0?" "+h:h)}return h};function n1(){let t=0,r,o,i="";for(;t<arguments.length;)(r=arguments[t++])&&(o=Qm(r))&&(i&&(i+=" "),i+=o);return i}const Qm=t=>{if(typeof t=="string")return t;let r,o="";for(let i=0;i<t.length;i++)t[i]&&(r=Qm(t[i]))&&(o&&(o+=" "),o+=r);return o};function r1(t,...r){let o,i,u,d=p;function p(g){const x=r.reduce((v,w)=>w(v),t());return o=J0(x),i=o.cache.get,u=o.cache.set,d=h,h(g)}function h(g){const x=i(g);if(x)return x;const v=t1(g,o);return u(g,v),v}return function(){return d(n1.apply(null,arguments))}}const Te=t=>{const r=o=>o[t]||[];return r.isThemeGetter=!0,r},Gm=/^\[(?:([a-z-]+):)?(.+)\]$/i,o1=/^\d+\/\d+$/,s1=new Set(["px","full","screen"]),i1=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,a1=/\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$/,l1=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,u1=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,c1=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,sn=t=>Ir(t)||s1.has(t)||o1.test(t),Pn=t=>Br(t,"length",x1),Ir=t=>!!t&&!Number.isNaN(Number(t)),iu=t=>Br(t,"number",Ir),Ao=t=>!!t&&Number.isInteger(Number(t)),d1=t=>t.endsWith("%")&&Ir(t.slice(0,-1)),xe=t=>Gm.test(t),Tn=t=>i1.test(t),f1=new Set(["length","size","percentage"]),p1=t=>Br(t,f1,qm),h1=t=>Br(t,"position",qm),m1=new Set(["image","url"]),g1=t=>Br(t,m1,w1),v1=t=>Br(t,"",y1),Mo=()=>!0,Br=(t,r,o)=>{const i=Gm.exec(t);return i?i[1]?typeof r=="string"?i[1]===r:r.has(i[1]):o(i[2]):!1},x1=t=>a1.test(t)&&!l1.test(t),qm=()=>!1,y1=t=>u1.test(t),w1=t=>c1.test(t),b1=()=>{const t=Te("colors"),r=Te("spacing"),o=Te("blur"),i=Te("brightness"),u=Te("borderColor"),d=Te("borderRadius"),p=Te("borderSpacing"),h=Te("borderWidth"),g=Te("contrast"),x=Te("grayscale"),v=Te("hueRotate"),w=Te("invert"),b=Te("gap"),k=Te("gradientColorStops"),j=Te("gradientColorStopPositions"),C=Te("inset"),S=Te("margin"),E=Te("opacity"),_=Te("padding"),O=Te("saturate"),I=Te("scale"),D=Te("sepia"),A=Te("skew"),$=Te("space"),K=Te("translate"),Q=()=>["auto","contain","none"],ee=()=>["auto","hidden","clip","visible","scroll"],ne=()=>["auto",xe,r],Z=()=>[xe,r],de=()=>["",sn,Pn],X=()=>["auto",Ir,xe],ve=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],se=()=>["solid","dashed","dotted","double","none"],le=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],z=()=>["start","end","center","between","around","evenly","stretch"],U=()=>["","0",xe],q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],P=()=>[Ir,xe];return{cacheSize:500,separator:":",theme:{colors:[Mo],spacing:[sn,Pn],blur:["none","",Tn,xe],brightness:P(),borderColor:[t],borderRadius:["none","","full",Tn,xe],borderSpacing:Z(),borderWidth:de(),contrast:P(),grayscale:U(),hueRotate:P(),invert:U(),gap:Z(),gradientColorStops:[t],gradientColorStopPositions:[d1,Pn],inset:ne(),margin:ne(),opacity:P(),padding:Z(),saturate:P(),scale:P(),sepia:U(),skew:P(),space:Z(),translate:Z()},classGroups:{aspect:[{aspect:["auto","square","video",xe]}],container:["container"],columns:[{columns:[Tn]}],"break-after":[{"break-after":q()}],"break-before":[{"break-before":q()}],"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"],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:[...ve(),xe]}],overflow:[{overflow:ee()}],"overflow-x":[{"overflow-x":ee()}],"overflow-y":[{"overflow-y":ee()}],overscroll:[{overscroll:Q()}],"overscroll-x":[{"overscroll-x":Q()}],"overscroll-y":[{"overscroll-y":Q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[C]}],"inset-x":[{"inset-x":[C]}],"inset-y":[{"inset-y":[C]}],start:[{start:[C]}],end:[{end:[C]}],top:[{top:[C]}],right:[{right:[C]}],bottom:[{bottom:[C]}],left:[{left:[C]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ao,xe]}],basis:[{basis:ne()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",xe]}],grow:[{grow:U()}],shrink:[{shrink:U()}],order:[{order:["first","last","none",Ao,xe]}],"grid-cols":[{"grid-cols":[Mo]}],"col-start-end":[{col:["auto",{span:["full",Ao,xe]},xe]}],"col-start":[{"col-start":X()}],"col-end":[{"col-end":X()}],"grid-rows":[{"grid-rows":[Mo]}],"row-start-end":[{row:["auto",{span:[Ao,xe]},xe]}],"row-start":[{"row-start":X()}],"row-end":[{"row-end":X()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",xe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",xe]}],gap:[{gap:[b]}],"gap-x":[{"gap-x":[b]}],"gap-y":[{"gap-y":[b]}],"justify-content":[{justify:["normal",...z()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...z(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...z(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[_]}],px:[{px:[_]}],py:[{py:[_]}],ps:[{ps:[_]}],pe:[{pe:[_]}],pt:[{pt:[_]}],pr:[{pr:[_]}],pb:[{pb:[_]}],pl:[{pl:[_]}],m:[{m:[S]}],mx:[{mx:[S]}],my:[{my:[S]}],ms:[{ms:[S]}],me:[{me:[S]}],mt:[{mt:[S]}],mr:[{mr:[S]}],mb:[{mb:[S]}],ml:[{ml:[S]}],"space-x":[{"space-x":[$]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[$]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",xe,r]}],"min-w":[{"min-w":[xe,r,"min","max","fit"]}],"max-w":[{"max-w":[xe,r,"none","full","min","max","fit","prose",{screen:[Tn]},Tn]}],h:[{h:[xe,r,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[xe,r,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[xe,r,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[xe,r,"auto","min","max","fit"]}],"font-size":[{text:["base",Tn,Pn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",iu]}],"font-family":[{font:[Mo]}],"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:["tighter","tight","normal","wide","wider","widest",xe]}],"line-clamp":[{"line-clamp":["none",Ir,iu]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",sn,xe]}],"list-image":[{"list-image":["none",xe]}],"list-style-type":[{list:["none","disc","decimal",xe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[E]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[E]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...se(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",sn,Pn]}],"underline-offset":[{"underline-offset":["auto",sn,xe]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:Z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",xe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",xe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[E]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ve(),h1]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",p1]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},g1]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[j]}],"gradient-via-pos":[{via:[j]}],"gradient-to-pos":[{to:[j]}],"gradient-from":[{from:[k]}],"gradient-via":[{via:[k]}],"gradient-to":[{to:[k]}],rounded:[{rounded:[d]}],"rounded-s":[{"rounded-s":[d]}],"rounded-e":[{"rounded-e":[d]}],"rounded-t":[{"rounded-t":[d]}],"rounded-r":[{"rounded-r":[d]}],"rounded-b":[{"rounded-b":[d]}],"rounded-l":[{"rounded-l":[d]}],"rounded-ss":[{"rounded-ss":[d]}],"rounded-se":[{"rounded-se":[d]}],"rounded-ee":[{"rounded-ee":[d]}],"rounded-es":[{"rounded-es":[d]}],"rounded-tl":[{"rounded-tl":[d]}],"rounded-tr":[{"rounded-tr":[d]}],"rounded-br":[{"rounded-br":[d]}],"rounded-bl":[{"rounded-bl":[d]}],"border-w":[{border:[h]}],"border-w-x":[{"border-x":[h]}],"border-w-y":[{"border-y":[h]}],"border-w-s":[{"border-s":[h]}],"border-w-e":[{"border-e":[h]}],"border-w-t":[{"border-t":[h]}],"border-w-r":[{"border-r":[h]}],"border-w-b":[{"border-b":[h]}],"border-w-l":[{"border-l":[h]}],"border-opacity":[{"border-opacity":[E]}],"border-style":[{border:[...se(),"hidden"]}],"divide-x":[{"divide-x":[h]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[h]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[E]}],"divide-style":[{divide:se()}],"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-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:["",...se()]}],"outline-offset":[{"outline-offset":[sn,xe]}],"outline-w":[{outline:[sn,Pn]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:de()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[E]}],"ring-offset-w":[{"ring-offset":[sn,Pn]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",Tn,v1]}],"shadow-color":[{shadow:[Mo]}],opacity:[{opacity:[E]}],"mix-blend":[{"mix-blend":[...le(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":le()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[i]}],contrast:[{contrast:[g]}],"drop-shadow":[{"drop-shadow":["","none",Tn,xe]}],grayscale:[{grayscale:[x]}],"hue-rotate":[{"hue-rotate":[v]}],invert:[{invert:[w]}],saturate:[{saturate:[O]}],sepia:[{sepia:[D]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[g]}],"backdrop-grayscale":[{"backdrop-grayscale":[x]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[v]}],"backdrop-invert":[{"backdrop-invert":[w]}],"backdrop-opacity":[{"backdrop-opacity":[E]}],"backdrop-saturate":[{"backdrop-saturate":[O]}],"backdrop-sepia":[{"backdrop-sepia":[D]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[p]}],"border-spacing-x":[{"border-spacing-x":[p]}],"border-spacing-y":[{"border-spacing-y":[p]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",xe]}],duration:[{duration:P()}],ease:[{ease:["linear","in","out","in-out",xe]}],delay:[{delay:P()}],animate:[{animate:["none","spin","ping","pulse","bounce",xe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[I]}],"scale-x":[{"scale-x":[I]}],"scale-y":[{"scale-y":[I]}],rotate:[{rotate:[Ao,xe]}],"translate-x":[{"translate-x":[K]}],"translate-y":[{"translate-y":[K]}],"skew-x":[{"skew-x":[A]}],"skew-y":[{"skew-y":[A]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",xe]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],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",xe]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":Z()}],"scroll-mx":[{"scroll-mx":Z()}],"scroll-my":[{"scroll-my":Z()}],"scroll-ms":[{"scroll-ms":Z()}],"scroll-me":[{"scroll-me":Z()}],"scroll-mt":[{"scroll-mt":Z()}],"scroll-mr":[{"scroll-mr":Z()}],"scroll-mb":[{"scroll-mb":Z()}],"scroll-ml":[{"scroll-ml":Z()}],"scroll-p":[{"scroll-p":Z()}],"scroll-px":[{"scroll-px":Z()}],"scroll-py":[{"scroll-py":Z()}],"scroll-ps":[{"scroll-ps":Z()}],"scroll-pe":[{"scroll-pe":Z()}],"scroll-pt":[{"scroll-pt":Z()}],"scroll-pr":[{"scroll-pr":Z()}],"scroll-pb":[{"scroll-pb":Z()}],"scroll-pl":[{"scroll-pl":Z()}],"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",xe]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[sn,Pn,iu]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-s","border-w-e","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-s","border-color-e","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"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","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-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"]}}},S1=r1(b1);function De(...t){return S1(Bm(t))}const C1=M0,Ym=m.forwardRef(({className:t,...r},o)=>l.jsx(Lm,{ref:o,className:De("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",t),...r}));Ym.displayName=Lm.displayName;const k1=I0("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-transform data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Xm=m.forwardRef(({className:t,variant:r,...o},i)=>l.jsx(Dm,{ref:i,className:De(k1({variant:r}),t),...o}));Xm.displayName=Dm.displayName;const E1=m.forwardRef(({className:t,...r},o)=>l.jsx(zm,{ref:o,className:De("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",t),...r}));E1.displayName=zm.displayName;const Zm=m.forwardRef(({className:t,...r},o)=>l.jsx(Um,{ref:o,className:De("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",t),"toast-close":"",...r,children:l.jsx(W0,{className:"h-4 w-4"})}));Zm.displayName=Um.displayName;const Jm=m.forwardRef(({className:t,...r},o)=>l.jsx(Fm,{ref:o,className:De("text-sm font-semibold",t),...r}));Jm.displayName=Fm.displayName;const eg=m.forwardRef(({className:t,...r},o)=>l.jsx($m,{ref:o,className:De("text-sm opacity-90",t),...r}));eg.displayName=$m.displayName;function N1(){const{toasts:t}=Db();return l.jsxs(C1,{children:[t.map(function({id:r,title:o,description:i,action:u,...d}){return l.jsxs(Xm,{...d,children:[l.jsxs("div",{className:"grid gap-1",children:[o&&l.jsx(Jm,{children:o}),i&&l.jsx(eg,{children:i})]}),u,l.jsx(Zm,{})]},r)}),l.jsx(Ym,{})]})}var j1=Qu[" useId ".trim().toString()]||(()=>{}),R1=0;function zo(t){const[r,o]=m.useState(j1());return Gt(()=>{o(i=>i??String(R1++))},[t]),r?`radix-${r}`:""}const P1=["top","right","bottom","left"],In=Math.min,gt=Math.max,ji=Math.round,pi=Math.floor,Qt=t=>({x:t,y:t}),T1={left:"right",right:"left",bottom:"top",top:"bottom"};function Fu(t,r,o){return gt(t,In(r,o))}function an(t,r){return typeof t=="function"?t(r):t}function ln(t){return t.split("-")[0]}function Wr(t){return t.split("-")[1]}function dc(t){return t==="x"?"y":"x"}function fc(t){return t==="y"?"height":"width"}function Vt(t){const r=t[0];return r==="t"||r==="b"?"y":"x"}function pc(t){return dc(Vt(t))}function _1(t,r,o){o===void 0&&(o=!1);const i=Wr(t),u=pc(t),d=fc(u);let p=u==="x"?i===(o?"end":"start")?"right":"left":i==="start"?"bottom":"top";return r.reference[d]>r.floating[d]&&(p=Ri(p)),[p,Ri(p)]}function O1(t){const r=Ri(t);return[$u(t),r,$u(r)]}function $u(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const uh=["left","right"],ch=["right","left"],A1=["top","bottom"],M1=["bottom","top"];function I1(t,r,o){switch(t){case"top":case"bottom":return o?r?ch:uh:r?uh:ch;case"left":case"right":return r?A1:M1;default:return[]}}function L1(t,r,o,i){const u=Wr(t);let d=I1(ln(t),o==="start",i);return u&&(d=d.map(p=>p+"-"+u),r&&(d=d.concat(d.map($u)))),d}function Ri(t){const r=ln(t);return T1[r]+t.slice(r.length)}function D1(t){return{top:0,right:0,bottom:0,left:0,...t}}function tg(t){return typeof t!="number"?D1(t):{top:t,right:t,bottom:t,left:t}}function Pi(t){const{x:r,y:o,width:i,height:u}=t;return{width:i,height:u,top:o,left:r,right:r+i,bottom:o+u,x:r,y:o}}function dh(t,r,o){let{reference:i,floating:u}=t;const d=Vt(r),p=pc(r),h=fc(p),g=ln(r),x=d==="y",v=i.x+i.width/2-u.width/2,w=i.y+i.height/2-u.height/2,b=i[h]/2-u[h]/2;let k;switch(g){case"top":k={x:v,y:i.y-u.height};break;case"bottom":k={x:v,y:i.y+i.height};break;case"right":k={x:i.x+i.width,y:w};break;case"left":k={x:i.x-u.width,y:w};break;default:k={x:i.x,y:i.y}}switch(Wr(r)){case"start":k[p]-=b*(o&&x?-1:1);break;case"end":k[p]+=b*(o&&x?-1:1);break}return k}async function F1(t,r){var o;r===void 0&&(r={});const{x:i,y:u,platform:d,rects:p,elements:h,strategy:g}=t,{boundary:x="clippingAncestors",rootBoundary:v="viewport",elementContext:w="floating",altBoundary:b=!1,padding:k=0}=an(r,t),j=tg(k),S=h[b?w==="floating"?"reference":"floating":w],E=Pi(await d.getClippingRect({element:(o=await(d.isElement==null?void 0:d.isElement(S)))==null||o?S:S.contextElement||await(d.getDocumentElement==null?void 0:d.getDocumentElement(h.floating)),boundary:x,rootBoundary:v,strategy:g})),_=w==="floating"?{x:i,y:u,width:p.floating.width,height:p.floating.height}:p.reference,O=await(d.getOffsetParent==null?void 0:d.getOffsetParent(h.floating)),I=await(d.isElement==null?void 0:d.isElement(O))?await(d.getScale==null?void 0:d.getScale(O))||{x:1,y:1}:{x:1,y:1},D=Pi(d.convertOffsetParentRelativeRectToViewportRelativeRect?await d.convertOffsetParentRelativeRectToViewportRelativeRect({elements:h,rect:_,offsetParent:O,strategy:g}):_);return{top:(E.top-D.top+j.top)/I.y,bottom:(D.bottom-E.bottom+j.bottom)/I.y,left:(E.left-D.left+j.left)/I.x,right:(D.right-E.right+j.right)/I.x}}const $1=50,z1=async(t,r,o)=>{const{placement:i="bottom",strategy:u="absolute",middleware:d=[],platform:p}=o,h=p.detectOverflow?p:{...p,detectOverflow:F1},g=await(p.isRTL==null?void 0:p.isRTL(r));let x=await p.getElementRects({reference:t,floating:r,strategy:u}),{x:v,y:w}=dh(x,i,g),b=i,k=0;const j={};for(let C=0;C<d.length;C++){const S=d[C];if(!S)continue;const{name:E,fn:_}=S,{x:O,y:I,data:D,reset:A}=await _({x:v,y:w,initialPlacement:i,placement:b,strategy:u,middlewareData:j,rects:x,platform:h,elements:{reference:t,floating:r}});v=O??v,w=I??w,j[E]={...j[E],...D},A&&k<$1&&(k++,typeof A=="object"&&(A.placement&&(b=A.placement),A.rects&&(x=A.rects===!0?await p.getElementRects({reference:t,floating:r,strategy:u}):A.rects),{x:v,y:w}=dh(x,b,g)),C=-1)}return{x:v,y:w,placement:b,strategy:u,middlewareData:j}},U1=t=>({name:"arrow",options:t,async fn(r){const{x:o,y:i,placement:u,rects:d,platform:p,elements:h,middlewareData:g}=r,{element:x,padding:v=0}=an(t,r)||{};if(x==null)return{};const w=tg(v),b={x:o,y:i},k=pc(u),j=fc(k),C=await p.getDimensions(x),S=k==="y",E=S?"top":"left",_=S?"bottom":"right",O=S?"clientHeight":"clientWidth",I=d.reference[j]+d.reference[k]-b[k]-d.floating[j],D=b[k]-d.reference[k],A=await(p.getOffsetParent==null?void 0:p.getOffsetParent(x));let $=A?A[O]:0;(!$||!await(p.isElement==null?void 0:p.isElement(A)))&&($=h.floating[O]||d.floating[j]);const K=I/2-D/2,Q=$/2-C[j]/2-1,ee=In(w[E],Q),ne=In(w[_],Q),Z=ee,de=$-C[j]-ne,X=$/2-C[j]/2+K,ve=Fu(Z,X,de),se=!g.arrow&&Wr(u)!=null&&X!==ve&&d.reference[j]/2-(X<Z?ee:ne)-C[j]/2<0,le=se?X<Z?X-Z:X-de:0;return{[k]:b[k]+le,data:{[k]:ve,centerOffset:X-ve-le,...se&&{alignmentOffset:le}},reset:se}}}),H1=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(r){var o,i;const{placement:u,middlewareData:d,rects:p,initialPlacement:h,platform:g,elements:x}=r,{mainAxis:v=!0,crossAxis:w=!0,fallbackPlacements:b,fallbackStrategy:k="bestFit",fallbackAxisSideDirection:j="none",flipAlignment:C=!0,...S}=an(t,r);if((o=d.arrow)!=null&&o.alignmentOffset)return{};const E=ln(u),_=Vt(h),O=ln(h)===h,I=await(g.isRTL==null?void 0:g.isRTL(x.floating)),D=b||(O||!C?[Ri(h)]:O1(h)),A=j!=="none";!b&&A&&D.push(...L1(h,C,j,I));const $=[h,...D],K=await g.detectOverflow(r,S),Q=[];let ee=((i=d.flip)==null?void 0:i.overflows)||[];if(v&&Q.push(K[E]),w){const X=_1(u,p,I);Q.push(K[X[0]],K[X[1]])}if(ee=[...ee,{placement:u,overflows:Q}],!Q.every(X=>X<=0)){var ne,Z;const X=(((ne=d.flip)==null?void 0:ne.index)||0)+1,ve=$[X];if(ve&&(!(w==="alignment"?_!==Vt(ve):!1)||ee.every(z=>Vt(z.placement)===_?z.overflows[0]>0:!0)))return{data:{index:X,overflows:ee},reset:{placement:ve}};let se=(Z=ee.filter(le=>le.overflows[0]<=0).sort((le,z)=>le.overflows[1]-z.overflows[1])[0])==null?void 0:Z.placement;if(!se)switch(k){case"bestFit":{var de;const le=(de=ee.filter(z=>{if(A){const U=Vt(z.placement);return U===_||U==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(U=>U>0).reduce((U,q)=>U+q,0)]).sort((z,U)=>z[1]-U[1])[0])==null?void 0:de[0];le&&(se=le);break}case"initialPlacement":se=h;break}if(u!==se)return{reset:{placement:se}}}return{}}}};function fh(t,r){return{top:t.top-r.height,right:t.right-r.width,bottom:t.bottom-r.height,left:t.left-r.width}}function ph(t){return P1.some(r=>t[r]>=0)}const B1=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(r){const{rects:o,platform:i}=r,{strategy:u="referenceHidden",...d}=an(t,r);switch(u){case"referenceHidden":{const p=await i.detectOverflow(r,{...d,elementContext:"reference"}),h=fh(p,o.reference);return{data:{referenceHiddenOffsets:h,referenceHidden:ph(h)}}}case"escaped":{const p=await i.detectOverflow(r,{...d,altBoundary:!0}),h=fh(p,o.floating);return{data:{escapedOffsets:h,escaped:ph(h)}}}default:return{}}}}},ng=new Set(["left","top"]);async function W1(t,r){const{placement:o,platform:i,elements:u}=t,d=await(i.isRTL==null?void 0:i.isRTL(u.floating)),p=ln(o),h=Wr(o),g=Vt(o)==="y",x=ng.has(p)?-1:1,v=d&&g?-1:1,w=an(r,t);let{mainAxis:b,crossAxis:k,alignmentAxis:j}=typeof w=="number"?{mainAxis:w,crossAxis:0,alignmentAxis:null}:{mainAxis:w.mainAxis||0,crossAxis:w.crossAxis||0,alignmentAxis:w.alignmentAxis};return h&&typeof j=="number"&&(k=h==="end"?j*-1:j),g?{x:k*v,y:b*x}:{x:b*x,y:k*v}}const K1=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(r){var o,i;const{x:u,y:d,placement:p,middlewareData:h}=r,g=await W1(r,t);return p===((o=h.offset)==null?void 0:o.placement)&&(i=h.arrow)!=null&&i.alignmentOffset?{}:{x:u+g.x,y:d+g.y,data:{...g,placement:p}}}}},V1=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(r){const{x:o,y:i,placement:u,platform:d}=r,{mainAxis:p=!0,crossAxis:h=!1,limiter:g={fn:E=>{let{x:_,y:O}=E;return{x:_,y:O}}},...x}=an(t,r),v={x:o,y:i},w=await d.detectOverflow(r,x),b=Vt(ln(u)),k=dc(b);let j=v[k],C=v[b];if(p){const E=k==="y"?"top":"left",_=k==="y"?"bottom":"right",O=j+w[E],I=j-w[_];j=Fu(O,j,I)}if(h){const E=b==="y"?"top":"left",_=b==="y"?"bottom":"right",O=C+w[E],I=C-w[_];C=Fu(O,C,I)}const S=g.fn({...r,[k]:j,[b]:C});return{...S,data:{x:S.x-o,y:S.y-i,enabled:{[k]:p,[b]:h}}}}}},Q1=function(t){return t===void 0&&(t={}),{options:t,fn(r){const{x:o,y:i,placement:u,rects:d,middlewareData:p}=r,{offset:h=0,mainAxis:g=!0,crossAxis:x=!0}=an(t,r),v={x:o,y:i},w=Vt(u),b=dc(w);let k=v[b],j=v[w];const C=an(h,r),S=typeof C=="number"?{mainAxis:C,crossAxis:0}:{mainAxis:0,crossAxis:0,...C};if(g){const O=b==="y"?"height":"width",I=d.reference[b]-d.floating[O]+S.mainAxis,D=d.reference[b]+d.reference[O]-S.mainAxis;k<I?k=I:k>D&&(k=D)}if(x){var E,_;const O=b==="y"?"width":"height",I=ng.has(ln(u)),D=d.reference[w]-d.floating[O]+(I&&((E=p.offset)==null?void 0:E[w])||0)+(I?0:S.crossAxis),A=d.reference[w]+d.reference[O]+(I?0:((_=p.offset)==null?void 0:_[w])||0)-(I?S.crossAxis:0);j<D?j=D:j>A&&(j=A)}return{[b]:k,[w]:j}}}},G1=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(r){var o,i;const{placement:u,rects:d,platform:p,elements:h}=r,{apply:g=()=>{},...x}=an(t,r),v=await p.detectOverflow(r,x),w=ln(u),b=Wr(u),k=Vt(u)==="y",{width:j,height:C}=d.floating;let S,E;w==="top"||w==="bottom"?(S=w,E=b===(await(p.isRTL==null?void 0:p.isRTL(h.floating))?"start":"end")?"left":"right"):(E=w,S=b==="end"?"top":"bottom");const _=C-v.top-v.bottom,O=j-v.left-v.right,I=In(C-v[S],_),D=In(j-v[E],O),A=!r.middlewareData.shift;let $=I,K=D;if((o=r.middlewareData.shift)!=null&&o.enabled.x&&(K=O),(i=r.middlewareData.shift)!=null&&i.enabled.y&&($=_),A&&!b){const ee=gt(v.left,0),ne=gt(v.right,0),Z=gt(v.top,0),de=gt(v.bottom,0);k?K=j-2*(ee!==0||ne!==0?ee+ne:gt(v.left,v.right)):$=C-2*(Z!==0||de!==0?Z+de:gt(v.top,v.bottom))}await g({...r,availableWidth:K,availableHeight:$});const Q=await p.getDimensions(h.floating);return j!==Q.width||C!==Q.height?{reset:{rects:!0}}:{}}}};function Bi(){return typeof window<"u"}function Kr(t){return rg(t)?(t.nodeName||"").toLowerCase():"#document"}function xt(t){var r;return(t==null||(r=t.ownerDocument)==null?void 0:r.defaultView)||window}function qt(t){var r;return(r=(rg(t)?t.ownerDocument:t.document)||window.document)==null?void 0:r.documentElement}function rg(t){return Bi()?t instanceof Node||t instanceof xt(t).Node:!1}function Ft(t){return Bi()?t instanceof Element||t instanceof xt(t).Element:!1}function un(t){return Bi()?t instanceof HTMLElement||t instanceof xt(t).HTMLElement:!1}function hh(t){return!Bi()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof xt(t).ShadowRoot}function qo(t){const{overflow:r,overflowX:o,overflowY:i,display:u}=$t(t);return/auto|scroll|overlay|hidden|clip/.test(r+i+o)&&u!=="inline"&&u!=="contents"}function q1(t){return/^(table|td|th)$/.test(Kr(t))}function Wi(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const Y1=/transform|translate|scale|rotate|perspective|filter/,X1=/paint|layout|strict|content/,Zn=t=>!!t&&t!=="none";let au;function hc(t){const r=Ft(t)?$t(t):t;return Zn(r.transform)||Zn(r.translate)||Zn(r.scale)||Zn(r.rotate)||Zn(r.perspective)||!mc()&&(Zn(r.backdropFilter)||Zn(r.filter))||Y1.test(r.willChange||"")||X1.test(r.contain||"")}function Z1(t){let r=Ln(t);for(;un(r)&&!Fr(r);){if(hc(r))return r;if(Wi(r))return null;r=Ln(r)}return null}function mc(){return au==null&&(au=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),au}function Fr(t){return/^(html|body|#document)$/.test(Kr(t))}function $t(t){return xt(t).getComputedStyle(t)}function Ki(t){return Ft(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Ln(t){if(Kr(t)==="html")return t;const r=t.assignedSlot||t.parentNode||hh(t)&&t.host||qt(t);return hh(r)?r.host:r}function og(t){const r=Ln(t);return Fr(r)?t.ownerDocument?t.ownerDocument.body:t.body:un(r)&&qo(r)?r:og(r)}function Uo(t,r,o){var i;r===void 0&&(r=[]),o===void 0&&(o=!0);const u=og(t),d=u===((i=t.ownerDocument)==null?void 0:i.body),p=xt(u);if(d){const h=zu(p);return r.concat(p,p.visualViewport||[],qo(u)?u:[],h&&o?Uo(h):[])}else return r.concat(u,Uo(u,[],o))}function zu(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function sg(t){const r=$t(t);let o=parseFloat(r.width)||0,i=parseFloat(r.height)||0;const u=un(t),d=u?t.offsetWidth:o,p=u?t.offsetHeight:i,h=ji(o)!==d||ji(i)!==p;return h&&(o=d,i=p),{width:o,height:i,$:h}}function gc(t){return Ft(t)?t:t.contextElement}function Lr(t){const r=gc(t);if(!un(r))return Qt(1);const o=r.getBoundingClientRect(),{width:i,height:u,$:d}=sg(r);let p=(d?ji(o.width):o.width)/i,h=(d?ji(o.height):o.height)/u;return(!p||!Number.isFinite(p))&&(p=1),(!h||!Number.isFinite(h))&&(h=1),{x:p,y:h}}const J1=Qt(0);function ig(t){const r=xt(t);return!mc()||!r.visualViewport?J1:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function eS(t,r,o){return r===void 0&&(r=!1),!o||r&&o!==xt(t)?!1:r}function nr(t,r,o,i){r===void 0&&(r=!1),o===void 0&&(o=!1);const u=t.getBoundingClientRect(),d=gc(t);let p=Qt(1);r&&(i?Ft(i)&&(p=Lr(i)):p=Lr(t));const h=eS(d,o,i)?ig(d):Qt(0);let g=(u.left+h.x)/p.x,x=(u.top+h.y)/p.y,v=u.width/p.x,w=u.height/p.y;if(d){const b=xt(d),k=i&&Ft(i)?xt(i):i;let j=b,C=zu(j);for(;C&&i&&k!==j;){const S=Lr(C),E=C.getBoundingClientRect(),_=$t(C),O=E.left+(C.clientLeft+parseFloat(_.paddingLeft))*S.x,I=E.top+(C.clientTop+parseFloat(_.paddingTop))*S.y;g*=S.x,x*=S.y,v*=S.x,w*=S.y,g+=O,x+=I,j=xt(C),C=zu(j)}}return Pi({width:v,height:w,x:g,y:x})}function Vi(t,r){const o=Ki(t).scrollLeft;return r?r.left+o:nr(qt(t)).left+o}function ag(t,r){const o=t.getBoundingClientRect(),i=o.left+r.scrollLeft-Vi(t,o),u=o.top+r.scrollTop;return{x:i,y:u}}function tS(t){let{elements:r,rect:o,offsetParent:i,strategy:u}=t;const d=u==="fixed",p=qt(i),h=r?Wi(r.floating):!1;if(i===p||h&&d)return o;let g={scrollLeft:0,scrollTop:0},x=Qt(1);const v=Qt(0),w=un(i);if((w||!w&&!d)&&((Kr(i)!=="body"||qo(p))&&(g=Ki(i)),w)){const k=nr(i);x=Lr(i),v.x=k.x+i.clientLeft,v.y=k.y+i.clientTop}const b=p&&!w&&!d?ag(p,g):Qt(0);return{width:o.width*x.x,height:o.height*x.y,x:o.x*x.x-g.scrollLeft*x.x+v.x+b.x,y:o.y*x.y-g.scrollTop*x.y+v.y+b.y}}function nS(t){return Array.from(t.getClientRects())}function rS(t){const r=qt(t),o=Ki(t),i=t.ownerDocument.body,u=gt(r.scrollWidth,r.clientWidth,i.scrollWidth,i.clientWidth),d=gt(r.scrollHeight,r.clientHeight,i.scrollHeight,i.clientHeight);let p=-o.scrollLeft+Vi(t);const h=-o.scrollTop;return $t(i).direction==="rtl"&&(p+=gt(r.clientWidth,i.clientWidth)-u),{width:u,height:d,x:p,y:h}}const mh=25;function oS(t,r){const o=xt(t),i=qt(t),u=o.visualViewport;let d=i.clientWidth,p=i.clientHeight,h=0,g=0;if(u){d=u.width,p=u.height;const v=mc();(!v||v&&r==="fixed")&&(h=u.offsetLeft,g=u.offsetTop)}const x=Vi(i);if(x<=0){const v=i.ownerDocument,w=v.body,b=getComputedStyle(w),k=v.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,j=Math.abs(i.clientWidth-w.clientWidth-k);j<=mh&&(d-=j)}else x<=mh&&(d+=x);return{width:d,height:p,x:h,y:g}}function sS(t,r){const o=nr(t,!0,r==="fixed"),i=o.top+t.clientTop,u=o.left+t.clientLeft,d=un(t)?Lr(t):Qt(1),p=t.clientWidth*d.x,h=t.clientHeight*d.y,g=u*d.x,x=i*d.y;return{width:p,height:h,x:g,y:x}}function gh(t,r,o){let i;if(r==="viewport")i=oS(t,o);else if(r==="document")i=rS(qt(t));else if(Ft(r))i=sS(r,o);else{const u=ig(t);i={x:r.x-u.x,y:r.y-u.y,width:r.width,height:r.height}}return Pi(i)}function lg(t,r){const o=Ln(t);return o===r||!Ft(o)||Fr(o)?!1:$t(o).position==="fixed"||lg(o,r)}function iS(t,r){const o=r.get(t);if(o)return o;let i=Uo(t,[],!1).filter(h=>Ft(h)&&Kr(h)!=="body"),u=null;const d=$t(t).position==="fixed";let p=d?Ln(t):t;for(;Ft(p)&&!Fr(p);){const h=$t(p),g=hc(p);!g&&h.position==="fixed"&&(u=null),(d?!g&&!u:!g&&h.position==="static"&&!!u&&(u.position==="absolute"||u.position==="fixed")||qo(p)&&!g&&lg(t,p))?i=i.filter(v=>v!==p):u=h,p=Ln(p)}return r.set(t,i),i}function aS(t){let{element:r,boundary:o,rootBoundary:i,strategy:u}=t;const p=[...o==="clippingAncestors"?Wi(r)?[]:iS(r,this._c):[].concat(o),i],h=gh(r,p[0],u);let g=h.top,x=h.right,v=h.bottom,w=h.left;for(let b=1;b<p.length;b++){const k=gh(r,p[b],u);g=gt(k.top,g),x=In(k.right,x),v=In(k.bottom,v),w=gt(k.left,w)}return{width:x-w,height:v-g,x:w,y:g}}function lS(t){const{width:r,height:o}=sg(t);return{width:r,height:o}}function uS(t,r,o){const i=un(r),u=qt(r),d=o==="fixed",p=nr(t,!0,d,r);let h={scrollLeft:0,scrollTop:0};const g=Qt(0);function x(){g.x=Vi(u)}if(i||!i&&!d)if((Kr(r)!=="body"||qo(u))&&(h=Ki(r)),i){const k=nr(r,!0,d,r);g.x=k.x+r.clientLeft,g.y=k.y+r.clientTop}else u&&x();d&&!i&&u&&x();const v=u&&!i&&!d?ag(u,h):Qt(0),w=p.left+h.scrollLeft-g.x-v.x,b=p.top+h.scrollTop-g.y-v.y;return{x:w,y:b,width:p.width,height:p.height}}function lu(t){return $t(t).position==="static"}function vh(t,r){if(!un(t)||$t(t).position==="fixed")return null;if(r)return r(t);let o=t.offsetParent;return qt(t)===o&&(o=o.ownerDocument.body),o}function ug(t,r){const o=xt(t);if(Wi(t))return o;if(!un(t)){let u=Ln(t);for(;u&&!Fr(u);){if(Ft(u)&&!lu(u))return u;u=Ln(u)}return o}let i=vh(t,r);for(;i&&q1(i)&&lu(i);)i=vh(i,r);return i&&Fr(i)&&lu(i)&&!hc(i)?o:i||Z1(t)||o}const cS=async function(t){const r=this.getOffsetParent||ug,o=this.getDimensions,i=await o(t.floating);return{reference:uS(t.reference,await r(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function dS(t){return $t(t).direction==="rtl"}const fS={convertOffsetParentRelativeRectToViewportRelativeRect:tS,getDocumentElement:qt,getClippingRect:aS,getOffsetParent:ug,getElementRects:cS,getClientRects:nS,getDimensions:lS,getScale:Lr,isElement:Ft,isRTL:dS};function cg(t,r){return t.x===r.x&&t.y===r.y&&t.width===r.width&&t.height===r.height}function pS(t,r){let o=null,i;const u=qt(t);function d(){var h;clearTimeout(i),(h=o)==null||h.disconnect(),o=null}function p(h,g){h===void 0&&(h=!1),g===void 0&&(g=1),d();const x=t.getBoundingClientRect(),{left:v,top:w,width:b,height:k}=x;if(h||r(),!b||!k)return;const j=pi(w),C=pi(u.clientWidth-(v+b)),S=pi(u.clientHeight-(w+k)),E=pi(v),O={rootMargin:-j+"px "+-C+"px "+-S+"px "+-E+"px",threshold:gt(0,In(1,g))||1};let I=!0;function D(A){const $=A[0].intersectionRatio;if($!==g){if(!I)return p();$?p(!1,$):i=setTimeout(()=>{p(!1,1e-7)},1e3)}$===1&&!cg(x,t.getBoundingClientRect())&&p(),I=!1}try{o=new IntersectionObserver(D,{...O,root:u.ownerDocument})}catch{o=new IntersectionObserver(D,O)}o.observe(t)}return p(!0),d}function hS(t,r,o,i){i===void 0&&(i={});const{ancestorScroll:u=!0,ancestorResize:d=!0,elementResize:p=typeof ResizeObserver=="function",layoutShift:h=typeof IntersectionObserver=="function",animationFrame:g=!1}=i,x=gc(t),v=u||d?[...x?Uo(x):[],...r?Uo(r):[]]:[];v.forEach(E=>{u&&E.addEventListener("scroll",o,{passive:!0}),d&&E.addEventListener("resize",o)});const w=x&&h?pS(x,o):null;let b=-1,k=null;p&&(k=new ResizeObserver(E=>{let[_]=E;_&&_.target===x&&k&&r&&(k.unobserve(r),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var O;(O=k)==null||O.observe(r)})),o()}),x&&!g&&k.observe(x),r&&k.observe(r));let j,C=g?nr(t):null;g&&S();function S(){const E=nr(t);C&&!cg(C,E)&&o(),C=E,j=requestAnimationFrame(S)}return o(),()=>{var E;v.forEach(_=>{u&&_.removeEventListener("scroll",o),d&&_.removeEventListener("resize",o)}),w?.(),(E=k)==null||E.disconnect(),k=null,g&&cancelAnimationFrame(j)}}const mS=K1,gS=V1,vS=H1,xS=G1,yS=B1,xh=U1,wS=Q1,bS=(t,r,o)=>{const i=new Map,u={platform:fS,...o},d={...u.platform,_c:i};return z1(t,r,{...u,platform:d})};var SS=typeof document<"u",CS=function(){},bi=SS?m.useLayoutEffect:CS;function Ti(t,r){if(t===r)return!0;if(typeof t!=typeof r)return!1;if(typeof t=="function"&&t.toString()===r.toString())return!0;let o,i,u;if(t&&r&&typeof t=="object"){if(Array.isArray(t)){if(o=t.length,o!==r.length)return!1;for(i=o;i--!==0;)if(!Ti(t[i],r[i]))return!1;return!0}if(u=Object.keys(t),o=u.length,o!==Object.keys(r).length)return!1;for(i=o;i--!==0;)if(!{}.hasOwnProperty.call(r,u[i]))return!1;for(i=o;i--!==0;){const d=u[i];if(!(d==="_owner"&&t.$$typeof)&&!Ti(t[d],r[d]))return!1}return!0}return t!==t&&r!==r}function dg(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function yh(t,r){const o=dg(t);return Math.round(r*o)/o}function uu(t){const r=m.useRef(t);return bi(()=>{r.current=t}),r}function kS(t){t===void 0&&(t={});const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:u,elements:{reference:d,floating:p}={},transform:h=!0,whileElementsMounted:g,open:x}=t,[v,w]=m.useState({x:0,y:0,strategy:o,placement:r,middlewareData:{},isPositioned:!1}),[b,k]=m.useState(i);Ti(b,i)||k(i);const[j,C]=m.useState(null),[S,E]=m.useState(null),_=m.useCallback(z=>{z!==A.current&&(A.current=z,C(z))},[]),O=m.useCallback(z=>{z!==$.current&&($.current=z,E(z))},[]),I=d||j,D=p||S,A=m.useRef(null),$=m.useRef(null),K=m.useRef(v),Q=g!=null,ee=uu(g),ne=uu(u),Z=uu(x),de=m.useCallback(()=>{if(!A.current||!$.current)return;const z={placement:r,strategy:o,middleware:b};ne.current&&(z.platform=ne.current),bS(A.current,$.current,z).then(U=>{const q={...U,isPositioned:Z.current!==!1};X.current&&!Ti(K.current,q)&&(K.current=q,$i.flushSync(()=>{w(q)}))})},[b,r,o,ne,Z]);bi(()=>{x===!1&&K.current.isPositioned&&(K.current.isPositioned=!1,w(z=>({...z,isPositioned:!1})))},[x]);const X=m.useRef(!1);bi(()=>(X.current=!0,()=>{X.current=!1}),[]),bi(()=>{if(I&&(A.current=I),D&&($.current=D),I&&D){if(ee.current)return ee.current(I,D,de);de()}},[I,D,de,ee,Q]);const ve=m.useMemo(()=>({reference:A,floating:$,setReference:_,setFloating:O}),[_,O]),se=m.useMemo(()=>({reference:I,floating:D}),[I,D]),le=m.useMemo(()=>{const z={position:o,left:0,top:0};if(!se.floating)return z;const U=yh(se.floating,v.x),q=yh(se.floating,v.y);return h?{...z,transform:"translate("+U+"px, "+q+"px)",...dg(se.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:U,top:q}},[o,h,se.floating,v.x,v.y]);return m.useMemo(()=>({...v,update:de,refs:ve,elements:se,floatingStyles:le}),[v,de,ve,se,le])}const ES=t=>{function r(o){return{}.hasOwnProperty.call(o,"current")}return{name:"arrow",options:t,fn(o){const{element:i,padding:u}=typeof t=="function"?t(o):t;return i&&r(i)?i.current!=null?xh({element:i.current,padding:u}).fn(o):{}:i?xh({element:i,padding:u}).fn(o):{}}}},NS=(t,r)=>{const o=mS(t);return{name:o.name,fn:o.fn,options:[t,r]}},jS=(t,r)=>{const o=gS(t);return{name:o.name,fn:o.fn,options:[t,r]}},RS=(t,r)=>({fn:wS(t).fn,options:[t,r]}),PS=(t,r)=>{const o=vS(t);return{name:o.name,fn:o.fn,options:[t,r]}},TS=(t,r)=>{const o=xS(t);return{name:o.name,fn:o.fn,options:[t,r]}},_S=(t,r)=>{const o=yS(t);return{name:o.name,fn:o.fn,options:[t,r]}},OS=(t,r)=>{const o=ES(t);return{name:o.name,fn:o.fn,options:[t,r]}};var AS="Arrow",fg=m.forwardRef((t,r)=>{const{children:o,width:i=10,height:u=5,...d}=t;return l.jsx(je.svg,{...d,ref:r,width:i,height:u,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?o:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});fg.displayName=AS;var MS=fg;function IS(t){const[r,o]=m.useState(void 0);return Gt(()=>{if(t){o({width:t.offsetWidth,height:t.offsetHeight});const i=new ResizeObserver(u=>{if(!Array.isArray(u)||!u.length)return;const d=u[0];let p,h;if("borderBoxSize"in d){const g=d.borderBoxSize,x=Array.isArray(g)?g[0]:g;p=x.inlineSize,h=x.blockSize}else p=t.offsetWidth,h=t.offsetHeight;o({width:p,height:h})});return i.observe(t,{box:"border-box"}),()=>i.unobserve(t)}else o(void 0)},[t]),r}var vc="Popper",[pg,Qi]=Dn(vc),[LS,hg]=pg(vc),mg=t=>{const{__scopePopper:r,children:o}=t,[i,u]=m.useState(null);return l.jsx(LS,{scope:r,anchor:i,onAnchorChange:u,children:o})};mg.displayName=vc;var gg="PopperAnchor",vg=m.forwardRef((t,r)=>{const{__scopePopper:o,virtualRef:i,...u}=t,d=hg(gg,o),p=m.useRef(null),h=He(r,p),g=m.useRef(null);return m.useEffect(()=>{const x=g.current;g.current=i?.current||p.current,x!==g.current&&d.onAnchorChange(g.current)}),i?null:l.jsx(je.div,{...u,ref:h})});vg.displayName=gg;var xc="PopperContent",[DS,FS]=pg(xc),xg=m.forwardRef((t,r)=>{const{__scopePopper:o,side:i="bottom",sideOffset:u=0,align:d="center",alignOffset:p=0,arrowPadding:h=0,avoidCollisions:g=!0,collisionBoundary:x=[],collisionPadding:v=0,sticky:w="partial",hideWhenDetached:b=!1,updatePositionStrategy:k="optimized",onPlaced:j,...C}=t,S=hg(xc,o),[E,_]=m.useState(null),O=He(r,ce=>_(ce)),[I,D]=m.useState(null),A=IS(I),$=A?.width??0,K=A?.height??0,Q=i+(d!=="center"?"-"+d:""),ee=typeof v=="number"?v:{top:0,right:0,bottom:0,left:0,...v},ne=Array.isArray(x)?x:[x],Z=ne.length>0,de={padding:ee,boundary:ne.filter(zS),altBoundary:Z},{refs:X,floatingStyles:ve,placement:se,isPositioned:le,middlewareData:z}=kS({strategy:"fixed",placement:Q,whileElementsMounted:(...ce)=>hS(...ce,{animationFrame:k==="always"}),elements:{reference:S.anchor},middleware:[NS({mainAxis:u+K,alignmentAxis:p}),g&&jS({mainAxis:!0,crossAxis:!1,limiter:w==="partial"?RS():void 0,...de}),g&&PS({...de}),TS({...de,apply:({elements:ce,rects:be,availableWidth:Ee,availableHeight:tt})=>{const{width:sr,height:es}=be.reference,Yt=ce.floating.style;Yt.setProperty("--radix-popper-available-width",`${Ee}px`),Yt.setProperty("--radix-popper-available-height",`${tt}px`),Yt.setProperty("--radix-popper-anchor-width",`${sr}px`),Yt.setProperty("--radix-popper-anchor-height",`${es}px`)}}),I&&OS({element:I,padding:h}),US({arrowWidth:$,arrowHeight:K}),b&&_S({strategy:"referenceHidden",...de})]}),[U,q]=bg(se),P=yt(j);Gt(()=>{le&&P?.()},[le,P]);const B=z.arrow?.x,ue=z.arrow?.y,me=z.arrow?.centerOffset!==0,[H,ae]=m.useState();return Gt(()=>{E&&ae(window.getComputedStyle(E).zIndex)},[E]),l.jsx("div",{ref:X.setFloating,"data-radix-popper-content-wrapper":"",style:{...ve,transform:le?ve.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:H,"--radix-popper-transform-origin":[z.transformOrigin?.x,z.transformOrigin?.y].join(" "),...z.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:l.jsx(DS,{scope:o,placedSide:U,onArrowChange:D,arrowX:B,arrowY:ue,shouldHideArrow:me,children:l.jsx(je.div,{"data-side":U,"data-align":q,...C,ref:O,style:{...C.style,animation:le?void 0:"none"}})})})});xg.displayName=xc;var yg="PopperArrow",$S={top:"bottom",right:"left",bottom:"top",left:"right"},wg=m.forwardRef(function(r,o){const{__scopePopper:i,...u}=r,d=FS(yg,i),p=$S[d.placedSide];return l.jsx("span",{ref:d.onArrowChange,style:{position:"absolute",left:d.arrowX,top:d.arrowY,[p]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[d.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[d.placedSide],visibility:d.shouldHideArrow?"hidden":void 0},children:l.jsx(MS,{...u,ref:o,style:{...u.style,display:"block"}})})});wg.displayName=yg;function zS(t){return t!==null}var US=t=>({name:"transformOrigin",options:t,fn(r){const{placement:o,rects:i,middlewareData:u}=r,p=u.arrow?.centerOffset!==0,h=p?0:t.arrowWidth,g=p?0:t.arrowHeight,[x,v]=bg(o),w={start:"0%",center:"50%",end:"100%"}[v],b=(u.arrow?.x??0)+h/2,k=(u.arrow?.y??0)+g/2;let j="",C="";return x==="bottom"?(j=p?w:`${b}px`,C=`${-g}px`):x==="top"?(j=p?w:`${b}px`,C=`${i.floating.height+g}px`):x==="right"?(j=`${-g}px`,C=p?w:`${k}px`):x==="left"&&(j=`${i.floating.width+g}px`,C=p?w:`${k}px`),{data:{x:j,y:C}}}});function bg(t){const[r,o="center"]=t.split("-");return[r,o]}var Sg=mg,Cg=vg,kg=xg,Eg=wg,HS=Symbol("radix.slottable");function BS(t){const r=({children:o})=>l.jsx(l.Fragment,{children:o});return r.displayName=`${t}.Slottable`,r.__radixId=HS,r}var[Gi]=Dn("Tooltip",[Qi]),qi=Qi(),Ng="TooltipProvider",WS=700,Uu="tooltip.open",[KS,yc]=Gi(Ng),jg=t=>{const{__scopeTooltip:r,delayDuration:o=WS,skipDelayDuration:i=300,disableHoverableContent:u=!1,children:d}=t,p=m.useRef(!0),h=m.useRef(!1),g=m.useRef(0);return m.useEffect(()=>{const x=g.current;return()=>window.clearTimeout(x)},[]),l.jsx(KS,{scope:r,isOpenDelayedRef:p,delayDuration:o,onOpen:m.useCallback(()=>{window.clearTimeout(g.current),p.current=!1},[]),onClose:m.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>p.current=!0,i)},[i]),isPointerInTransitRef:h,onPointerInTransitChange:m.useCallback(x=>{h.current=x},[]),disableHoverableContent:u,children:d})};jg.displayName=Ng;var Ho="Tooltip",[VS,Yi]=Gi(Ho),Rg=t=>{const{__scopeTooltip:r,children:o,open:i,defaultOpen:u,onOpenChange:d,disableHoverableContent:p,delayDuration:h}=t,g=yc(Ho,t.__scopeTooltip),x=qi(r),[v,w]=m.useState(null),b=zo(),k=m.useRef(0),j=p??g.disableHoverableContent,C=h??g.delayDuration,S=m.useRef(!1),[E,_]=Qo({prop:i,defaultProp:u??!1,onChange:$=>{$?(g.onOpen(),document.dispatchEvent(new CustomEvent(Uu))):g.onClose(),d?.($)},caller:Ho}),O=m.useMemo(()=>E?S.current?"delayed-open":"instant-open":"closed",[E]),I=m.useCallback(()=>{window.clearTimeout(k.current),k.current=0,S.current=!1,_(!0)},[_]),D=m.useCallback(()=>{window.clearTimeout(k.current),k.current=0,_(!1)},[_]),A=m.useCallback(()=>{window.clearTimeout(k.current),k.current=window.setTimeout(()=>{S.current=!0,_(!0),k.current=0},C)},[C,_]);return m.useEffect(()=>()=>{k.current&&(window.clearTimeout(k.current),k.current=0)},[]),l.jsx(Sg,{...x,children:l.jsx(VS,{scope:r,contentId:b,open:E,stateAttribute:O,trigger:v,onTriggerChange:w,onTriggerEnter:m.useCallback(()=>{g.isOpenDelayedRef.current?A():I()},[g.isOpenDelayedRef,A,I]),onTriggerLeave:m.useCallback(()=>{j?D():(window.clearTimeout(k.current),k.current=0)},[D,j]),onOpen:I,onClose:D,disableHoverableContent:j,children:o})})};Rg.displayName=Ho;var Hu="TooltipTrigger",Pg=m.forwardRef((t,r)=>{const{__scopeTooltip:o,...i}=t,u=Yi(Hu,o),d=yc(Hu,o),p=qi(o),h=m.useRef(null),g=He(r,h,u.onTriggerChange),x=m.useRef(!1),v=m.useRef(!1),w=m.useCallback(()=>x.current=!1,[]);return m.useEffect(()=>()=>document.removeEventListener("pointerup",w),[w]),l.jsx(Cg,{asChild:!0,...p,children:l.jsx(je.button,{"aria-describedby":u.open?u.contentId:void 0,"data-state":u.stateAttribute,...i,ref:g,onPointerMove:he(t.onPointerMove,b=>{b.pointerType!=="touch"&&!v.current&&!d.isPointerInTransitRef.current&&(u.onTriggerEnter(),v.current=!0)}),onPointerLeave:he(t.onPointerLeave,()=>{u.onTriggerLeave(),v.current=!1}),onPointerDown:he(t.onPointerDown,()=>{u.open&&u.onClose(),x.current=!0,document.addEventListener("pointerup",w,{once:!0})}),onFocus:he(t.onFocus,()=>{x.current||u.onOpen()}),onBlur:he(t.onBlur,u.onClose),onClick:he(t.onClick,u.onClose)})})});Pg.displayName=Hu;var QS="TooltipPortal",[zj,GS]=Gi(QS,{forceMount:void 0}),$r="TooltipContent",Tg=m.forwardRef((t,r)=>{const o=GS($r,t.__scopeTooltip),{forceMount:i=o.forceMount,side:u="top",...d}=t,p=Yi($r,t.__scopeTooltip);return l.jsx(Fn,{present:i||p.open,children:p.disableHoverableContent?l.jsx(_g,{side:u,...d,ref:r}):l.jsx(qS,{side:u,...d,ref:r})})}),qS=m.forwardRef((t,r)=>{const o=Yi($r,t.__scopeTooltip),i=yc($r,t.__scopeTooltip),u=m.useRef(null),d=He(r,u),[p,h]=m.useState(null),{trigger:g,onClose:x}=o,v=u.current,{onPointerInTransitChange:w}=i,b=m.useCallback(()=>{h(null),w(!1)},[w]),k=m.useCallback((j,C)=>{const S=j.currentTarget,E={x:j.clientX,y:j.clientY},_=eC(E,S.getBoundingClientRect()),O=tC(E,_),I=nC(C.getBoundingClientRect()),D=oC([...O,...I]);h(D),w(!0)},[w]);return m.useEffect(()=>()=>b(),[b]),m.useEffect(()=>{if(g&&v){const j=S=>k(S,v),C=S=>k(S,g);return g.addEventListener("pointerleave",j),v.addEventListener("pointerleave",C),()=>{g.removeEventListener("pointerleave",j),v.removeEventListener("pointerleave",C)}}},[g,v,k,b]),m.useEffect(()=>{if(p){const j=C=>{const S=C.target,E={x:C.clientX,y:C.clientY},_=g?.contains(S)||v?.contains(S),O=!rC(E,p);_?b():O&&(b(),x())};return document.addEventListener("pointermove",j),()=>document.removeEventListener("pointermove",j)}},[g,v,p,x,b]),l.jsx(_g,{...t,ref:d})}),[YS,XS]=Gi(Ho,{isInside:!1}),ZS=BS("TooltipContent"),_g=m.forwardRef((t,r)=>{const{__scopeTooltip:o,children:i,"aria-label":u,onEscapeKeyDown:d,onPointerDownOutside:p,...h}=t,g=Yi($r,o),x=qi(o),{onClose:v}=g;return m.useEffect(()=>(document.addEventListener(Uu,v),()=>document.removeEventListener(Uu,v)),[v]),m.useEffect(()=>{if(g.trigger){const w=b=>{b.target?.contains(g.trigger)&&v()};return window.addEventListener("scroll",w,{capture:!0}),()=>window.removeEventListener("scroll",w,{capture:!0})}},[g.trigger,v]),l.jsx(zi,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:d,onPointerDownOutside:p,onFocusOutside:w=>w.preventDefault(),onDismiss:v,children:l.jsxs(kg,{"data-state":g.stateAttribute,...x,...h,ref:r,style:{...h.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[l.jsx(ZS,{children:i}),l.jsx(YS,{scope:o,isInside:!0,children:l.jsx(g0,{id:g.contentId,role:"tooltip",children:u||i})})]})})});Tg.displayName=$r;var Og="TooltipArrow",JS=m.forwardRef((t,r)=>{const{__scopeTooltip:o,...i}=t,u=qi(o);return XS(Og,o).isInside?null:l.jsx(Eg,{...u,...i,ref:r})});JS.displayName=Og;function eC(t,r){const o=Math.abs(r.top-t.y),i=Math.abs(r.bottom-t.y),u=Math.abs(r.right-t.x),d=Math.abs(r.left-t.x);switch(Math.min(o,i,u,d)){case d:return"left";case u:return"right";case o:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function tC(t,r,o=5){const i=[];switch(r){case"top":i.push({x:t.x-o,y:t.y+o},{x:t.x+o,y:t.y+o});break;case"bottom":i.push({x:t.x-o,y:t.y-o},{x:t.x+o,y:t.y-o});break;case"left":i.push({x:t.x+o,y:t.y-o},{x:t.x+o,y:t.y+o});break;case"right":i.push({x:t.x-o,y:t.y-o},{x:t.x-o,y:t.y+o});break}return i}function nC(t){const{top:r,right:o,bottom:i,left:u}=t;return[{x:u,y:r},{x:o,y:r},{x:o,y:i},{x:u,y:i}]}function rC(t,r){const{x:o,y:i}=t;let u=!1;for(let d=0,p=r.length-1;d<r.length;p=d++){const h=r[d],g=r[p],x=h.x,v=h.y,w=g.x,b=g.y;v>i!=b>i&&o<(w-x)*(i-v)/(b-v)+x&&(u=!u)}return u}function oC(t){const r=t.slice();return r.sort((o,i)=>o.x<i.x?-1:o.x>i.x?1:o.y<i.y?-1:o.y>i.y?1:0),sC(r)}function sC(t){if(t.length<=1)return t.slice();const r=[];for(let i=0;i<t.length;i++){const u=t[i];for(;r.length>=2;){const d=r[r.length-1],p=r[r.length-2];if((d.x-p.x)*(u.y-p.y)>=(d.y-p.y)*(u.x-p.x))r.pop();else break}r.push(u)}r.pop();const o=[];for(let i=t.length-1;i>=0;i--){const u=t[i];for(;o.length>=2;){const d=o[o.length-1],p=o[o.length-2];if((d.x-p.x)*(u.y-p.y)>=(d.y-p.y)*(u.x-p.x))o.pop();else break}o.push(u)}return o.pop(),r.length===1&&o.length===1&&r[0].x===o[0].x&&r[0].y===o[0].y?r:r.concat(o)}var iC=jg,aC=Rg,lC=Pg,Ag=Tg;const uC=iC,cC=aC,dC=lC,Mg=m.forwardRef(({className:t,sideOffset:r=4,...o},i)=>l.jsx(Ag,{ref:i,sideOffset:r,className:De("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",t),...o}));Mg.displayName=Ag.displayName;var Xi="Collapsible",[fC]=Dn(Xi),[pC,wc]=fC(Xi),Ig=m.forwardRef((t,r)=>{const{__scopeCollapsible:o,open:i,defaultOpen:u,disabled:d,onOpenChange:p,...h}=t,[g,x]=Qo({prop:i,defaultProp:u??!1,onChange:p,caller:Xi});return l.jsx(pC,{scope:o,disabled:d,contentId:zo(),open:g,onOpenToggle:m.useCallback(()=>x(v=>!v),[x]),children:l.jsx(je.div,{"data-state":Sc(g),"data-disabled":d?"":void 0,...h,ref:r})})});Ig.displayName=Xi;var Lg="CollapsibleTrigger",Dg=m.forwardRef((t,r)=>{const{__scopeCollapsible:o,...i}=t,u=wc(Lg,o);return l.jsx(je.button,{type:"button","aria-controls":u.contentId,"aria-expanded":u.open||!1,"data-state":Sc(u.open),"data-disabled":u.disabled?"":void 0,disabled:u.disabled,...i,ref:r,onClick:he(t.onClick,u.onOpenToggle)})});Dg.displayName=Lg;var bc="CollapsibleContent",Fg=m.forwardRef((t,r)=>{const{forceMount:o,...i}=t,u=wc(bc,t.__scopeCollapsible);return l.jsx(Fn,{present:o||u.open,children:({present:d})=>l.jsx(hC,{...i,ref:r,present:d})})});Fg.displayName=bc;var hC=m.forwardRef((t,r)=>{const{__scopeCollapsible:o,present:i,children:u,...d}=t,p=wc(bc,o),[h,g]=m.useState(i),x=m.useRef(null),v=He(r,x),w=m.useRef(0),b=w.current,k=m.useRef(0),j=k.current,C=p.open||h,S=m.useRef(C),E=m.useRef(void 0);return m.useEffect(()=>{const _=requestAnimationFrame(()=>S.current=!1);return()=>cancelAnimationFrame(_)},[]),Gt(()=>{const _=x.current;if(_){E.current=E.current||{transitionDuration:_.style.transitionDuration,animationName:_.style.animationName},_.style.transitionDuration="0s",_.style.animationName="none";const O=_.getBoundingClientRect();w.current=O.height,k.current=O.width,S.current||(_.style.transitionDuration=E.current.transitionDuration,_.style.animationName=E.current.animationName),g(i)}},[p.open,i]),l.jsx(je.div,{"data-state":Sc(p.open),"data-disabled":p.disabled?"":void 0,id:p.contentId,hidden:!C,...d,ref:v,style:{"--radix-collapsible-content-height":b?`${b}px`:void 0,"--radix-collapsible-content-width":j?`${j}px`:void 0,...t.style},children:C&&u})});function Sc(t){return t?"open":"closed"}var _i=Ig,Oi=Dg,Ai=Fg;function mC(t){const r=t.split("/");if(r.length!==2||!r[0]||!r[1])return`https://github.com/${t}`;const[o,i]=r;return`https://github.com/${encodeURIComponent(o)}/${encodeURIComponent(i)}`}function gC(t,r){return t!==null?t:r===0}const wh="onboarding-panel-dismissed-v2",cu={claude:"Claude",codex:"Codex",gemini:"Gemini"},bh=[{label:"Gemini Code Assist",href:"https://github.com/apps/gemini-code-assist"},{label:"OpenAI Codex",href:"https://developers.openai.com/codex/integrations/github"},{label:"Claude Code",href:"https://support.claude.com/en/articles/14233555-set-up-code-review-for-claude-code"},{label:"Cursor",href:"https://cursor.com/docs/integrations/github"}];function Sh(t){return t.claude||t.codex||t.gemini}function vC(t){return Object.entries(t).filter(([,r])=>r).map(([r])=>r)}function xC(t){const r=t.repos.filter(w=>w.accessible),o=t.repos.filter(w=>!w.accessible),i=r.filter(w=>Sh(w.codeReviews)),u=r.filter(w=>!Sh(w.codeReviews)),d=[{id:"github",title:"Connect GitHub",description:t.githubConnected?`Connected${t.githubUser?` as @${t.githubUser}`:""}.`:"Connect GitHub so the app can read repositories, sync feedback, and install review workflows.",complete:t.githubConnected},{id:"repo",title:"Track your first repository or PR",description:r.length>0?`Watching ${r.length} accessible repo${r.length===1?"":"s"}. Choose per repo whether to track only your PRs or your whole team.`:"Use the Add PR or Watch form below. Adding a PR also adds its repository to the watch list, and watched repos let you choose whether to track only your PRs or the whole team.",complete:r.length>0},{id:"workflow",title:"Enable first-pass AI review",description:i.length>0?`Detected an AI review workflow in ${i.length} repo${i.length===1?"":"s"}.`:r.length>0?"Install a Claude or Codex review workflow on any tracked repository to seed actionable review comments automatically.":"Track an accessible repository first, then install a review workflow.",complete:i.length>0}],p=d.filter(w=>w.complete).length,h=d.filter(w=>!w.complete),g=[...h.map(w=>w.id.toLowerCase()),...o.map(w=>"access:"+w.repo.toLowerCase()+":"+(w.error?.slice(0,100)??"").toLowerCase())].sort().join("|")||"complete",x=h.length>0||o.length>0,v=h.length>0?`${p} of ${d.length} complete`:`${o.length} access issue${o.length===1?"":"s"}`;return{accessibleRepos:r,hasIssues:x,inaccessibleRepos:o,reposMissingReview:u,reposWithReview:i,steps:d,pendingSteps:h,completedCount:p,dismissalKey:g,summary:v}}function du({children:t}){return l.jsx("code",{className:"rounded border border-border bg-muted/30 px-1 py-0.5 text-[11px] font-mono",children:t})}function Ch({number:t,children:r}){return l.jsxs("div",{className:"flex gap-2.5",children:[l.jsx("span",{className:"mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center border border-border text-[10px] text-muted-foreground",children:t}),l.jsx("div",{className:"flex-1 text-[12px] leading-relaxed",children:r})]})}function yC({step:t,index:r,children:o}){return l.jsx("div",{className:`border px-3 py-3 ${t.complete?"border-border bg-background/60":"border-warning-border bg-warning-muted"}`,children:l.jsxs("div",{className:"flex gap-3",children:[l.jsx("span",{className:`mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center border text-[10px] ${t.complete?"border-border text-foreground":"border-warning-border text-warning-foreground"}`,children:t.complete?"✓":r}),l.jsxs("div",{className:"min-w-0 flex-1 space-y-1.5",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsx("span",{className:"text-[11px] font-medium uppercase tracking-wider",children:t.title}),l.jsx("span",{className:`border px-1.5 py-0 text-[10px] uppercase tracking-wider ${t.complete?"border-border text-muted-foreground":"border-warning-border text-warning-foreground"}`,children:t.complete?"done":"next"})]}),l.jsx("p",{className:"text-[12px] text-muted-foreground",children:t.description}),o]})]})})}function wC(){const[t,r]=m.useState(()=>typeof window>"u"?null:window.localStorage.getItem(wh)),[o,i]=m.useState(!0),{data:u,isLoading:d}=et({queryKey:["/api/onboarding/status"],refetchInterval:3e4}),{data:p}=et({queryKey:["/api/config"]}),h=Je({mutationFn:async({repo:O,tool:I})=>(await Ge("POST","/api/onboarding/install-review",{repo:O,tool:I})).json(),onSuccess:(O,I)=>{ye.invalidateQueries({queryKey:["/api/onboarding/status"]}),vt({description:`${cu[I.tool]} review workflow installed for ${I.repo}.`})},onError:O=>{vt({variant:"destructive",description:`Could not install review workflow: ${O.message}`})}});if(d||!u)return null;const{accessibleRepos:g,completedCount:x,dismissalKey:v,hasIssues:w,inaccessibleRepos:b,reposMissingReview:k,reposWithReview:j,steps:C,summary:S}=xC(u),_=(p?.codingAgent??"claude")==="codex"?["codex","claude"]:["claude","codex"];return!w||t===v?null:l.jsxs("div",{className:"shrink-0 border-b border-border bg-muted/35",children:[l.jsxs("div",{className:"flex items-center justify-between px-4 py-2",children:[l.jsxs("button",{onClick:()=>i(!o),className:"flex items-center gap-2 text-left",children:[l.jsx("span",{className:"h-1.5 w-1.5 shrink-0 rounded-full bg-foreground"}),l.jsx("span",{className:"text-[11px] font-medium uppercase tracking-wider",children:"Getting started"}),l.jsx("span",{className:"text-[11px] text-muted-foreground",children:S}),l.jsx("span",{className:"text-[10px] text-muted-foreground",children:o?"▲":"▼"})]}),l.jsx("button",{onClick:()=>{typeof window<"u"&&window.localStorage.setItem(wh,v),r(v)},className:"text-[10px] uppercase tracking-wider text-muted-foreground transition-colors hover:text-foreground",children:"dismiss"})]}),o&&l.jsxs("div",{className:"border-t border-border px-4 py-4 space-y-4",children:[l.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[l.jsx("div",{className:"text-[11px] uppercase tracking-wider text-muted-foreground",children:"Setup checklist"}),l.jsxs("div",{className:"text-[11px] text-muted-foreground",children:[x," of ",C.length," complete"]})]}),l.jsx("div",{className:"space-y-3",children:C.map((O,I)=>l.jsxs(yC,{step:O,index:I+1,children:[O.id==="github"&&!O.complete&&l.jsxs("div",{className:"space-y-2 pt-1",children:[u.githubError&&l.jsx("p",{className:"text-[12px] text-destructive",children:u.githubError}),l.jsxs("div",{className:"space-y-1.5 text-[12px] text-muted-foreground",children:[l.jsxs(Ch,{number:1,children:["Run ",l.jsx(du,{children:"gh auth login"})," on this machine, or set ",l.jsx(du,{children:"GITHUB_TOKEN"})," before starting the app."]}),l.jsxs(Ch,{number:2,children:["Prefer the built-in token list if you want the app to remember it. Open ",l.jsx(Dt,{href:"/settings",className:"underline underline-offset-2",children:"settings"})," to paste a Personal Access Token."]})]})]}),O.id==="repo"&&!O.complete&&l.jsxs("div",{className:"pt-1 text-[12px] text-muted-foreground",children:["The left sidebar is the real entry point. Use ",l.jsx("span",{className:"text-foreground",children:"Add"})," for a PR URL or ",l.jsx("span",{className:"text-foreground",children:"Watch"})," for an ",l.jsx(du,{children:"owner/repo"})," slug, then choose whether that watched repo should track only your PRs or your whole team."]}),O.id==="workflow"&&!O.complete&&g.length>0&&l.jsxs("div",{className:"space-y-2 pt-1",children:[l.jsxs("div",{className:"space-y-2 border border-border bg-muted/40 px-3 py-2",children:[l.jsx("p",{className:"text-[12px] text-muted-foreground",children:"Oh-my-PR is best used along with a chain of AI code review tools. Different models have different strengths and weaknesses. Below are instructions on how to install code reviews with different providers."}),l.jsx("div",{className:"flex flex-wrap gap-x-3 gap-y-1 text-[11px]",children:bh.map(D=>l.jsx("a",{href:D.href,target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2 text-foreground/80 hover:text-foreground",children:D.label},D.href))})]}),k.map(D=>l.jsxs("div",{className:"flex flex-col gap-2 border border-border bg-background/50 px-3 py-2 md:flex-row md:items-center md:justify-between",children:[l.jsxs("div",{className:"min-w-0",children:[l.jsx("a",{href:`https://github.com/${D.repo}`,target:"_blank",rel:"noopener noreferrer",className:"block truncate text-[11px] font-medium underline underline-offset-2",children:D.repo}),l.jsx("p",{className:"text-[11px] text-muted-foreground",children:"No AI review workflow detected yet."})]}),l.jsx("div",{className:"flex flex-wrap gap-2",children:_.map(A=>{const $=h.isPending&&h.variables?.repo===D.repo&&h.variables?.tool===A;return l.jsx("button",{type:"button",onClick:()=>h.mutate({repo:D.repo,tool:A}),disabled:h.isPending,className:"border border-border px-2 py-1 text-[10px] uppercase tracking-wider transition-colors hover:bg-foreground hover:text-background disabled:opacity-40",children:$?"Installing…":`Install ${cu[A]}`},`${D.repo}-${A}`)})})]},D.repo))]}),O.id==="workflow"&&O.complete&&j.length>0&&l.jsxs("div",{className:"space-y-2 pt-1",children:[l.jsxs("div",{className:"space-y-2 border border-border bg-muted/40 px-3 py-2",children:[l.jsx("p",{className:"text-[12px] text-muted-foreground",children:"Oh-my-PR is best used along with a chain of AI code review tools. Different models have different strengths and weaknesses. Below are instructions on how to install code reviews with different providers."}),l.jsx("div",{className:"flex flex-wrap gap-x-3 gap-y-1 text-[11px]",children:bh.map(D=>l.jsx("a",{href:D.href,target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2 text-foreground/80 hover:text-foreground",children:D.label},D.href))})]}),l.jsx("div",{className:"flex flex-wrap gap-2",children:j.map(D=>{const A=vC(D.codeReviews).map($=>cu[$]).join(" + ");return l.jsxs("span",{className:"border border-border px-2 py-0.5 text-[10px] uppercase tracking-wider text-muted-foreground",children:[D.repo," · ",A]},D.repo)})})]})]},O.id))}),b.length>0&&l.jsxs("div",{className:"space-y-3 border border-destructive/30 bg-destructive/5 px-3 py-3",children:[l.jsx("div",{className:"text-[11px] font-medium uppercase tracking-wider text-destructive",children:"Repository access issues"}),l.jsx("div",{className:"space-y-2",children:b.map(O=>l.jsxs("div",{className:"space-y-1",children:[l.jsx("div",{className:"text-[11px] font-medium",children:l.jsx("a",{href:`https://github.com/${O.repo}`,target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2",children:O.repo})}),l.jsxs("p",{className:"text-[12px] text-destructive",children:["Cannot access this repository: ",O.error??"unknown error"]})]},O.repo))})]})]})]})}const kh="app-update-dismissed",bC="npm install -g oh-my-pr@latest";function SC(){return[{text:"Stop the running oh-my-pr process."},{text:"Run",command:bC},{text:"Start oh-my-pr again."}]}function Eh(t){return t.startsWith("v")?t:`v${t}`}function $g(t){return t.latestVersion?`app-update:${t.latestVersion}`:null}function CC(t,r){if(!t?.updateAvailable)return!1;const o=$g(t);return o!==null&&o!==r}function Yo(){const[t,r]=m.useState(()=>typeof window>"u"?null:window.sessionStorage.getItem(kh)),{data:o}=et({queryKey:["/api/app-update"]});if(!o||!CC(o,t))return null;const i=$g(o);if(!i||!o.latestVersion)return null;const u=SC();return l.jsx("div",{className:"shrink-0 border-b border-warning-border bg-warning-muted",children:l.jsxs("div",{className:"grid gap-2 px-4 py-2 lg:grid-cols-[minmax(0,1fr)_auto] lg:items-start",children:[l.jsxs("div",{className:"min-w-0 space-y-1.5",children:[l.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-3 text-[12px]",children:[l.jsx("span",{className:"inline-block h-1.5 w-1.5 shrink-0 rounded-full bg-warning"}),l.jsx("span",{className:"font-medium uppercase tracking-wider text-warning-foreground",children:"Update available"}),l.jsx("span",{className:"text-foreground/75",children:`oh-my-pr ${Eh(o.latestVersion)} is available. You're on ${Eh(o.currentVersion)}.`})]}),l.jsx("ol",{className:"list-decimal space-y-1 pl-5 text-[11px] text-foreground/70",children:u.map(d=>l.jsx("li",{className:"pl-0.5",children:d.command?l.jsxs(l.Fragment,{children:[d.text," ",l.jsx("code",{className:"font-mono text-foreground",children:d.command}),"."]}):d.text},`${d.text}:${d.command??""}`))})]}),l.jsxs("div",{className:"flex items-center gap-3 text-[11px]",children:[l.jsx("a",{href:o.latestReleaseUrl,target:"_blank",rel:"noreferrer",className:"font-medium uppercase tracking-wider text-warning-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:"Update oh-my-pr"}),l.jsx("button",{onClick:()=>{typeof window<"u"&&window.sessionStorage.setItem(kh,i),r(i)},className:"uppercase tracking-wider text-foreground/70 transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:"dismiss for now"})]})]})})}var kC=m.createContext(void 0);function zg(t){const r=m.useContext(kC);return t||r||"ltr"}var fu=0;function EC(){m.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??Nh()),document.body.insertAdjacentElement("beforeend",t[1]??Nh()),fu++,()=>{fu===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),fu--}},[])}function Nh(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var pu="focusScope.autoFocusOnMount",hu="focusScope.autoFocusOnUnmount",jh={bubbles:!1,cancelable:!0},NC="FocusScope",Ug=m.forwardRef((t,r)=>{const{loop:o=!1,trapped:i=!1,onMountAutoFocus:u,onUnmountAutoFocus:d,...p}=t,[h,g]=m.useState(null),x=yt(u),v=yt(d),w=m.useRef(null),b=He(r,C=>g(C)),k=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(i){let C=function(O){if(k.paused||!h)return;const I=O.target;h.contains(I)?w.current=I:An(w.current,{select:!0})},S=function(O){if(k.paused||!h)return;const I=O.relatedTarget;I!==null&&(h.contains(I)||An(w.current,{select:!0}))},E=function(O){if(document.activeElement===document.body)for(const D of O)D.removedNodes.length>0&&An(h)};document.addEventListener("focusin",C),document.addEventListener("focusout",S);const _=new MutationObserver(E);return h&&_.observe(h,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",C),document.removeEventListener("focusout",S),_.disconnect()}}},[i,h,k.paused]),m.useEffect(()=>{if(h){Ph.add(k);const C=document.activeElement;if(!h.contains(C)){const E=new CustomEvent(pu,jh);h.addEventListener(pu,x),h.dispatchEvent(E),E.defaultPrevented||(jC(OC(Hg(h)),{select:!0}),document.activeElement===C&&An(h))}return()=>{h.removeEventListener(pu,x),setTimeout(()=>{const E=new CustomEvent(hu,jh);h.addEventListener(hu,v),h.dispatchEvent(E),E.defaultPrevented||An(C??document.body,{select:!0}),h.removeEventListener(hu,v),Ph.remove(k)},0)}}},[h,x,v,k]);const j=m.useCallback(C=>{if(!o&&!i||k.paused)return;const S=C.key==="Tab"&&!C.altKey&&!C.ctrlKey&&!C.metaKey,E=document.activeElement;if(S&&E){const _=C.currentTarget,[O,I]=RC(_);O&&I?!C.shiftKey&&E===I?(C.preventDefault(),o&&An(O,{select:!0})):C.shiftKey&&E===O&&(C.preventDefault(),o&&An(I,{select:!0})):E===_&&C.preventDefault()}},[o,i,k.paused]);return l.jsx(je.div,{tabIndex:-1,...p,ref:b,onKeyDown:j})});Ug.displayName=NC;function jC(t,{select:r=!1}={}){const o=document.activeElement;for(const i of t)if(An(i,{select:r}),document.activeElement!==o)return}function RC(t){const r=Hg(t),o=Rh(r,t),i=Rh(r.reverse(),t);return[o,i]}function Hg(t){const r=[],o=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const u=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||u?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)r.push(o.currentNode);return r}function Rh(t,r){for(const o of t)if(!PC(o,{upTo:r}))return o}function PC(t,{upTo:r}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(r!==void 0&&t===r)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function TC(t){return t instanceof HTMLInputElement&&"select"in t}function An(t,{select:r=!1}={}){if(t&&t.focus){const o=document.activeElement;t.focus({preventScroll:!0}),t!==o&&TC(t)&&r&&t.select()}}var Ph=_C();function _C(){let t=[];return{add(r){const o=t[0];r!==o&&o?.pause(),t=Th(t,r),t.unshift(r)},remove(r){t=Th(t,r),t[0]?.resume()}}}function Th(t,r){const o=[...t],i=o.indexOf(r);return i!==-1&&o.splice(i,1),o}function OC(t){return t.filter(r=>r.tagName!=="A")}var mu="rovingFocusGroup.onEntryFocus",AC={bubbles:!1,cancelable:!0},Xo="RovingFocusGroup",[Bu,Bg,MC]=oc(Xo),[IC,Wg]=Dn(Xo,[MC]),[LC,DC]=IC(Xo),Kg=m.forwardRef((t,r)=>l.jsx(Bu.Provider,{scope:t.__scopeRovingFocusGroup,children:l.jsx(Bu.Slot,{scope:t.__scopeRovingFocusGroup,children:l.jsx(FC,{...t,ref:r})})}));Kg.displayName=Xo;var FC=m.forwardRef((t,r)=>{const{__scopeRovingFocusGroup:o,orientation:i,loop:u=!1,dir:d,currentTabStopId:p,defaultCurrentTabStopId:h,onCurrentTabStopIdChange:g,onEntryFocus:x,preventScrollOnEntryFocus:v=!1,...w}=t,b=m.useRef(null),k=He(r,b),j=zg(d),[C,S]=Qo({prop:p,defaultProp:h??null,onChange:g,caller:Xo}),[E,_]=m.useState(!1),O=yt(x),I=Bg(o),D=m.useRef(!1),[A,$]=m.useState(0);return m.useEffect(()=>{const K=b.current;if(K)return K.addEventListener(mu,O),()=>K.removeEventListener(mu,O)},[O]),l.jsx(LC,{scope:o,orientation:i,dir:j,loop:u,currentTabStopId:C,onItemFocus:m.useCallback(K=>S(K),[S]),onItemShiftTab:m.useCallback(()=>_(!0),[]),onFocusableItemAdd:m.useCallback(()=>$(K=>K+1),[]),onFocusableItemRemove:m.useCallback(()=>$(K=>K-1),[]),children:l.jsx(je.div,{tabIndex:E||A===0?-1:0,"data-orientation":i,...w,ref:k,style:{outline:"none",...t.style},onMouseDown:he(t.onMouseDown,()=>{D.current=!0}),onFocus:he(t.onFocus,K=>{const Q=!D.current;if(K.target===K.currentTarget&&Q&&!E){const ee=new CustomEvent(mu,AC);if(K.currentTarget.dispatchEvent(ee),!ee.defaultPrevented){const ne=I().filter(se=>se.focusable),Z=ne.find(se=>se.active),de=ne.find(se=>se.id===C),ve=[Z,de,...ne].filter(Boolean).map(se=>se.ref.current);Gg(ve,v)}}D.current=!1}),onBlur:he(t.onBlur,()=>_(!1))})})}),Vg="RovingFocusGroupItem",Qg=m.forwardRef((t,r)=>{const{__scopeRovingFocusGroup:o,focusable:i=!0,active:u=!1,tabStopId:d,children:p,...h}=t,g=zo(),x=d||g,v=DC(Vg,o),w=v.currentTabStopId===x,b=Bg(o),{onFocusableItemAdd:k,onFocusableItemRemove:j,currentTabStopId:C}=v;return m.useEffect(()=>{if(i)return k(),()=>j()},[i,k,j]),l.jsx(Bu.ItemSlot,{scope:o,id:x,focusable:i,active:u,children:l.jsx(je.span,{tabIndex:w?0:-1,"data-orientation":v.orientation,...h,ref:r,onMouseDown:he(t.onMouseDown,S=>{i?v.onItemFocus(x):S.preventDefault()}),onFocus:he(t.onFocus,()=>v.onItemFocus(x)),onKeyDown:he(t.onKeyDown,S=>{if(S.key==="Tab"&&S.shiftKey){v.onItemShiftTab();return}if(S.target!==S.currentTarget)return;const E=UC(S,v.orientation,v.dir);if(E!==void 0){if(S.metaKey||S.ctrlKey||S.altKey||S.shiftKey)return;S.preventDefault();let O=b().filter(I=>I.focusable).map(I=>I.ref.current);if(E==="last")O.reverse();else if(E==="prev"||E==="next"){E==="prev"&&O.reverse();const I=O.indexOf(S.currentTarget);O=v.loop?HC(O,I+1):O.slice(I+1)}setTimeout(()=>Gg(O))}}),children:typeof p=="function"?p({isCurrentTabStop:w,hasTabStop:C!=null}):p})})});Qg.displayName=Vg;var $C={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function zC(t,r){return r!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function UC(t,r,o){const i=zC(t.key,o);if(!(r==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(r==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return $C[i]}function Gg(t,r=!1){const o=document.activeElement;for(const i of t)if(i===o||(i.focus({preventScroll:r}),document.activeElement!==o))return}function HC(t,r){return t.map((o,i)=>t[(r+i)%t.length])}var BC=Kg,WC=Qg;function KC(t){const r=VC(t),o=m.forwardRef((i,u)=>{const{children:d,...p}=i,h=m.Children.toArray(d),g=h.find(GC);if(g){const x=g.props.children,v=h.map(w=>w===g?m.Children.count(x)>1?m.Children.only(null):m.isValidElement(x)?x.props.children:null:w);return l.jsx(r,{...p,ref:u,children:m.isValidElement(x)?m.cloneElement(x,void 0,v):null})}return l.jsx(r,{...p,ref:u,children:d})});return o.displayName=`${t}.Slot`,o}function VC(t){const r=m.forwardRef((o,i)=>{const{children:u,...d}=o;if(m.isValidElement(u)){const p=YC(u),h=qC(d,u.props);return u.type!==m.Fragment&&(h.ref=i?Ur(i,p):p),m.cloneElement(u,h)}return m.Children.count(u)>1?m.Children.only(null):null});return r.displayName=`${t}.SlotClone`,r}var QC=Symbol("radix.slottable");function GC(t){return m.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===QC}function qC(t,r){const o={...r};for(const i in r){const u=t[i],d=r[i];/^on[A-Z]/.test(i)?u&&d?o[i]=(...h)=>{const g=d(...h);return u(...h),g}:u&&(o[i]=u):i==="style"?o[i]={...u,...d}:i==="className"&&(o[i]=[u,d].filter(Boolean).join(" "))}return{...t,...o}}function YC(t){let r=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?t.ref:(r=Object.getOwnPropertyDescriptor(t,"ref")?.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?t.props.ref:t.props.ref||t.ref)}var XC=function(t){if(typeof document>"u")return null;var r=Array.isArray(t)?t[0]:t;return r.ownerDocument.body},Or=new WeakMap,hi=new WeakMap,mi={},gu=0,qg=function(t){return t&&(t.host||qg(t.parentNode))},ZC=function(t,r){return r.map(function(o){if(t.contains(o))return o;var i=qg(o);return i&&t.contains(i)?i:(console.error("aria-hidden",o,"in not contained inside",t,". Doing nothing"),null)}).filter(function(o){return!!o})},JC=function(t,r,o,i){var u=ZC(r,Array.isArray(t)?t:[t]);mi[o]||(mi[o]=new WeakMap);var d=mi[o],p=[],h=new Set,g=new Set(u),x=function(w){!w||h.has(w)||(h.add(w),x(w.parentNode))};u.forEach(x);var v=function(w){!w||g.has(w)||Array.prototype.forEach.call(w.children,function(b){if(h.has(b))v(b);else try{var k=b.getAttribute(i),j=k!==null&&k!=="false",C=(Or.get(b)||0)+1,S=(d.get(b)||0)+1;Or.set(b,C),d.set(b,S),p.push(b),C===1&&j&&hi.set(b,!0),S===1&&b.setAttribute(o,"true"),j||b.setAttribute(i,"true")}catch(E){console.error("aria-hidden: cannot operate on ",b,E)}})};return v(r),h.clear(),gu++,function(){p.forEach(function(w){var b=Or.get(w)-1,k=d.get(w)-1;Or.set(w,b),d.set(w,k),b||(hi.has(w)||w.removeAttribute(i),hi.delete(w)),k||w.removeAttribute(o)}),gu--,gu||(Or=new WeakMap,Or=new WeakMap,hi=new WeakMap,mi={})}},ek=function(t,r,o){o===void 0&&(o="data-aria-hidden");var i=Array.from(Array.isArray(t)?t:[t]),u=XC(t);return u?(i.push.apply(i,Array.from(u.querySelectorAll("[aria-live], script"))),JC(i,u,o,"aria-hidden")):function(){return null}},Kt=function(){return Kt=Object.assign||function(r){for(var o,i=1,u=arguments.length;i<u;i++){o=arguments[i];for(var d in o)Object.prototype.hasOwnProperty.call(o,d)&&(r[d]=o[d])}return r},Kt.apply(this,arguments)};function Yg(t,r){var o={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&r.indexOf(i)<0&&(o[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var u=0,i=Object.getOwnPropertySymbols(t);u<i.length;u++)r.indexOf(i[u])<0&&Object.prototype.propertyIsEnumerable.call(t,i[u])&&(o[i[u]]=t[i[u]]);return o}function tk(t,r,o){if(o||arguments.length===2)for(var i=0,u=r.length,d;i<u;i++)(d||!(i in r))&&(d||(d=Array.prototype.slice.call(r,0,i)),d[i]=r[i]);return t.concat(d||Array.prototype.slice.call(r))}var Si="right-scroll-bar-position",Ci="width-before-scroll-bar",nk="with-scroll-bars-hidden",rk="--removed-body-scroll-bar-size";function vu(t,r){return typeof t=="function"?t(r):t&&(t.current=r),t}function ok(t,r){var o=m.useState(function(){return{value:t,callback:r,facade:{get current(){return o.value},set current(i){var u=o.value;u!==i&&(o.value=i,o.callback(i,u))}}}})[0];return o.callback=r,o.facade}var sk=typeof window<"u"?m.useLayoutEffect:m.useEffect,_h=new WeakMap;function ik(t,r){var o=ok(null,function(i){return t.forEach(function(u){return vu(u,i)})});return sk(function(){var i=_h.get(o);if(i){var u=new Set(i),d=new Set(t),p=o.current;u.forEach(function(h){d.has(h)||vu(h,null)}),d.forEach(function(h){u.has(h)||vu(h,p)})}_h.set(o,t)},[t]),o}function ak(t){return t}function lk(t,r){r===void 0&&(r=ak);var o=[],i=!1,u={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return o.length?o[o.length-1]:t},useMedium:function(d){var p=r(d,i);return o.push(p),function(){o=o.filter(function(h){return h!==p})}},assignSyncMedium:function(d){for(i=!0;o.length;){var p=o;o=[],p.forEach(d)}o={push:function(h){return d(h)},filter:function(){return o}}},assignMedium:function(d){i=!0;var p=[];if(o.length){var h=o;o=[],h.forEach(d),p=o}var g=function(){var v=p;p=[],v.forEach(d)},x=function(){return Promise.resolve().then(g)};x(),o={push:function(v){p.push(v),x()},filter:function(v){return p=p.filter(v),o}}}};return u}function uk(t){t===void 0&&(t={});var r=lk(null);return r.options=Kt({async:!0,ssr:!1},t),r}var Xg=function(t){var r=t.sideCar,o=Yg(t,["sideCar"]);if(!r)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=r.read();if(!i)throw new Error("Sidecar medium not found");return m.createElement(i,Kt({},o))};Xg.isSideCarExport=!0;function ck(t,r){return t.useMedium(r),Xg}var Zg=uk(),xu=function(){},Zi=m.forwardRef(function(t,r){var o=m.useRef(null),i=m.useState({onScrollCapture:xu,onWheelCapture:xu,onTouchMoveCapture:xu}),u=i[0],d=i[1],p=t.forwardProps,h=t.children,g=t.className,x=t.removeScrollBar,v=t.enabled,w=t.shards,b=t.sideCar,k=t.noRelative,j=t.noIsolation,C=t.inert,S=t.allowPinchZoom,E=t.as,_=E===void 0?"div":E,O=t.gapMode,I=Yg(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),D=b,A=ik([o,r]),$=Kt(Kt({},I),u);return m.createElement(m.Fragment,null,v&&m.createElement(D,{sideCar:Zg,removeScrollBar:x,shards:w,noRelative:k,noIsolation:j,inert:C,setCallbacks:d,allowPinchZoom:!!S,lockRef:o,gapMode:O}),p?m.cloneElement(m.Children.only(h),Kt(Kt({},$),{ref:A})):m.createElement(_,Kt({},$,{className:g,ref:A}),h))});Zi.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Zi.classNames={fullWidth:Ci,zeroRight:Si};var dk=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function fk(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var r=dk();return r&&t.setAttribute("nonce",r),t}function pk(t,r){t.styleSheet?t.styleSheet.cssText=r:t.appendChild(document.createTextNode(r))}function hk(t){var r=document.head||document.getElementsByTagName("head")[0];r.appendChild(t)}var mk=function(){var t=0,r=null;return{add:function(o){t==0&&(r=fk())&&(pk(r,o),hk(r)),t++},remove:function(){t--,!t&&r&&(r.parentNode&&r.parentNode.removeChild(r),r=null)}}},gk=function(){var t=mk();return function(r,o){m.useEffect(function(){return t.add(r),function(){t.remove()}},[r&&o])}},Jg=function(){var t=gk(),r=function(o){var i=o.styles,u=o.dynamic;return t(i,u),null};return r},vk={left:0,top:0,right:0,gap:0},yu=function(t){return parseInt(t||"",10)||0},xk=function(t){var r=window.getComputedStyle(document.body),o=r[t==="padding"?"paddingLeft":"marginLeft"],i=r[t==="padding"?"paddingTop":"marginTop"],u=r[t==="padding"?"paddingRight":"marginRight"];return[yu(o),yu(i),yu(u)]},yk=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return vk;var r=xk(t),o=document.documentElement.clientWidth,i=window.innerWidth;return{left:r[0],top:r[1],right:r[2],gap:Math.max(0,i-o+r[2]-r[0])}},wk=Jg(),Dr="data-scroll-locked",bk=function(t,r,o,i){var u=t.left,d=t.top,p=t.right,h=t.gap;return o===void 0&&(o="margin"),`
|
|
9
|
+
.`.concat(nk,` {
|
|
10
|
+
overflow: hidden `).concat(i,`;
|
|
11
|
+
padding-right: `).concat(h,"px ").concat(i,`;
|
|
12
|
+
}
|
|
13
|
+
body[`).concat(Dr,`] {
|
|
14
|
+
overflow: hidden `).concat(i,`;
|
|
15
|
+
overscroll-behavior: contain;
|
|
16
|
+
`).concat([r&&"position: relative ".concat(i,";"),o==="margin"&&`
|
|
17
|
+
padding-left: `.concat(u,`px;
|
|
18
|
+
padding-top: `).concat(d,`px;
|
|
19
|
+
padding-right: `).concat(p,`px;
|
|
20
|
+
margin-left:0;
|
|
21
|
+
margin-top:0;
|
|
22
|
+
margin-right: `).concat(h,"px ").concat(i,`;
|
|
23
|
+
`),o==="padding"&&"padding-right: ".concat(h,"px ").concat(i,";")].filter(Boolean).join(""),`
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.`).concat(Si,` {
|
|
27
|
+
right: `).concat(h,"px ").concat(i,`;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.`).concat(Ci,` {
|
|
31
|
+
margin-right: `).concat(h,"px ").concat(i,`;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.`).concat(Si," .").concat(Si,` {
|
|
35
|
+
right: 0 `).concat(i,`;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.`).concat(Ci," .").concat(Ci,` {
|
|
39
|
+
margin-right: 0 `).concat(i,`;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
body[`).concat(Dr,`] {
|
|
43
|
+
`).concat(rk,": ").concat(h,`px;
|
|
44
|
+
}
|
|
45
|
+
`)},Oh=function(){var t=parseInt(document.body.getAttribute(Dr)||"0",10);return isFinite(t)?t:0},Sk=function(){m.useEffect(function(){return document.body.setAttribute(Dr,(Oh()+1).toString()),function(){var t=Oh()-1;t<=0?document.body.removeAttribute(Dr):document.body.setAttribute(Dr,t.toString())}},[])},Ck=function(t){var r=t.noRelative,o=t.noImportant,i=t.gapMode,u=i===void 0?"margin":i;Sk();var d=m.useMemo(function(){return yk(u)},[u]);return m.createElement(wk,{styles:bk(d,!r,u,o?"":"!important")})},Wu=!1;if(typeof window<"u")try{var gi=Object.defineProperty({},"passive",{get:function(){return Wu=!0,!0}});window.addEventListener("test",gi,gi),window.removeEventListener("test",gi,gi)}catch{Wu=!1}var Ar=Wu?{passive:!1}:!1,kk=function(t){return t.tagName==="TEXTAREA"},ev=function(t,r){if(!(t instanceof Element))return!1;var o=window.getComputedStyle(t);return o[r]!=="hidden"&&!(o.overflowY===o.overflowX&&!kk(t)&&o[r]==="visible")},Ek=function(t){return ev(t,"overflowY")},Nk=function(t){return ev(t,"overflowX")},Ah=function(t,r){var o=r.ownerDocument,i=r;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var u=tv(t,i);if(u){var d=nv(t,i),p=d[1],h=d[2];if(p>h)return!0}i=i.parentNode}while(i&&i!==o.body);return!1},jk=function(t){var r=t.scrollTop,o=t.scrollHeight,i=t.clientHeight;return[r,o,i]},Rk=function(t){var r=t.scrollLeft,o=t.scrollWidth,i=t.clientWidth;return[r,o,i]},tv=function(t,r){return t==="v"?Ek(r):Nk(r)},nv=function(t,r){return t==="v"?jk(r):Rk(r)},Pk=function(t,r){return t==="h"&&r==="rtl"?-1:1},Tk=function(t,r,o,i,u){var d=Pk(t,window.getComputedStyle(r).direction),p=d*i,h=o.target,g=r.contains(h),x=!1,v=p>0,w=0,b=0;do{if(!h)break;var k=nv(t,h),j=k[0],C=k[1],S=k[2],E=C-S-d*j;(j||E)&&tv(t,h)&&(w+=E,b+=j);var _=h.parentNode;h=_&&_.nodeType===Node.DOCUMENT_FRAGMENT_NODE?_.host:_}while(!g&&h!==document.body||g&&(r.contains(h)||r===h));return(v&&Math.abs(w)<1||!v&&Math.abs(b)<1)&&(x=!0),x},vi=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},Mh=function(t){return[t.deltaX,t.deltaY]},Ih=function(t){return t&&"current"in t?t.current:t},_k=function(t,r){return t[0]===r[0]&&t[1]===r[1]},Ok=function(t){return`
|
|
46
|
+
.block-interactivity-`.concat(t,` {pointer-events: none;}
|
|
47
|
+
.allow-interactivity-`).concat(t,` {pointer-events: all;}
|
|
48
|
+
`)},Ak=0,Mr=[];function Mk(t){var r=m.useRef([]),o=m.useRef([0,0]),i=m.useRef(),u=m.useState(Ak++)[0],d=m.useState(Jg)[0],p=m.useRef(t);m.useEffect(function(){p.current=t},[t]),m.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(u));var C=tk([t.lockRef.current],(t.shards||[]).map(Ih),!0).filter(Boolean);return C.forEach(function(S){return S.classList.add("allow-interactivity-".concat(u))}),function(){document.body.classList.remove("block-interactivity-".concat(u)),C.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(u))})}}},[t.inert,t.lockRef.current,t.shards]);var h=m.useCallback(function(C,S){if("touches"in C&&C.touches.length===2||C.type==="wheel"&&C.ctrlKey)return!p.current.allowPinchZoom;var E=vi(C),_=o.current,O="deltaX"in C?C.deltaX:_[0]-E[0],I="deltaY"in C?C.deltaY:_[1]-E[1],D,A=C.target,$=Math.abs(O)>Math.abs(I)?"h":"v";if("touches"in C&&$==="h"&&A.type==="range")return!1;var K=window.getSelection(),Q=K&&K.anchorNode,ee=Q?Q===A||Q.contains(A):!1;if(ee)return!1;var ne=Ah($,A);if(!ne)return!0;if(ne?D=$:(D=$==="v"?"h":"v",ne=Ah($,A)),!ne)return!1;if(!i.current&&"changedTouches"in C&&(O||I)&&(i.current=D),!D)return!0;var Z=i.current||D;return Tk(Z,S,C,Z==="h"?O:I)},[]),g=m.useCallback(function(C){var S=C;if(!(!Mr.length||Mr[Mr.length-1]!==d)){var E="deltaY"in S?Mh(S):vi(S),_=r.current.filter(function(D){return D.name===S.type&&(D.target===S.target||S.target===D.shadowParent)&&_k(D.delta,E)})[0];if(_&&_.should){S.cancelable&&S.preventDefault();return}if(!_){var O=(p.current.shards||[]).map(Ih).filter(Boolean).filter(function(D){return D.contains(S.target)}),I=O.length>0?h(S,O[0]):!p.current.noIsolation;I&&S.cancelable&&S.preventDefault()}}},[]),x=m.useCallback(function(C,S,E,_){var O={name:C,delta:S,target:E,should:_,shadowParent:Ik(E)};r.current.push(O),setTimeout(function(){r.current=r.current.filter(function(I){return I!==O})},1)},[]),v=m.useCallback(function(C){o.current=vi(C),i.current=void 0},[]),w=m.useCallback(function(C){x(C.type,Mh(C),C.target,h(C,t.lockRef.current))},[]),b=m.useCallback(function(C){x(C.type,vi(C),C.target,h(C,t.lockRef.current))},[]);m.useEffect(function(){return Mr.push(d),t.setCallbacks({onScrollCapture:w,onWheelCapture:w,onTouchMoveCapture:b}),document.addEventListener("wheel",g,Ar),document.addEventListener("touchmove",g,Ar),document.addEventListener("touchstart",v,Ar),function(){Mr=Mr.filter(function(C){return C!==d}),document.removeEventListener("wheel",g,Ar),document.removeEventListener("touchmove",g,Ar),document.removeEventListener("touchstart",v,Ar)}},[]);var k=t.removeScrollBar,j=t.inert;return m.createElement(m.Fragment,null,j?m.createElement(d,{styles:Ok(u)}):null,k?m.createElement(Ck,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function Ik(t){for(var r=null;t!==null;)t instanceof ShadowRoot&&(r=t.host,t=t.host),t=t.parentNode;return r}const Lk=ck(Zg,Mk);var rv=m.forwardRef(function(t,r){return m.createElement(Zi,Kt({},t,{ref:r,sideCar:Lk}))});rv.classNames=Zi.classNames;var Ku=["Enter"," "],Dk=["ArrowDown","PageUp","Home"],ov=["ArrowUp","PageDown","End"],Fk=[...Dk,...ov],$k={ltr:[...Ku,"ArrowRight"],rtl:[...Ku,"ArrowLeft"]},zk={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Zo="Menu",[Bo,Uk,Hk]=oc(Zo),[rr,sv]=Dn(Zo,[Hk,Qi,Wg]),Ji=Qi(),iv=Wg(),[Bk,or]=rr(Zo),[Wk,Jo]=rr(Zo),av=t=>{const{__scopeMenu:r,open:o=!1,children:i,dir:u,onOpenChange:d,modal:p=!0}=t,h=Ji(r),[g,x]=m.useState(null),v=m.useRef(!1),w=yt(d),b=zg(u);return m.useEffect(()=>{const k=()=>{v.current=!0,document.addEventListener("pointerdown",j,{capture:!0,once:!0}),document.addEventListener("pointermove",j,{capture:!0,once:!0})},j=()=>v.current=!1;return document.addEventListener("keydown",k,{capture:!0}),()=>{document.removeEventListener("keydown",k,{capture:!0}),document.removeEventListener("pointerdown",j,{capture:!0}),document.removeEventListener("pointermove",j,{capture:!0})}},[]),l.jsx(Sg,{...h,children:l.jsx(Bk,{scope:r,open:o,onOpenChange:w,content:g,onContentChange:x,children:l.jsx(Wk,{scope:r,onClose:m.useCallback(()=>w(!1),[w]),isUsingKeyboardRef:v,dir:b,modal:p,children:i})})})};av.displayName=Zo;var Kk="MenuAnchor",Cc=m.forwardRef((t,r)=>{const{__scopeMenu:o,...i}=t,u=Ji(o);return l.jsx(Cg,{...u,...i,ref:r})});Cc.displayName=Kk;var kc="MenuPortal",[Vk,lv]=rr(kc,{forceMount:void 0}),uv=t=>{const{__scopeMenu:r,forceMount:o,children:i,container:u}=t,d=or(kc,r);return l.jsx(Vk,{scope:r,forceMount:o,children:l.jsx(Fn,{present:o||d.open,children:l.jsx(ic,{asChild:!0,container:u,children:i})})})};uv.displayName=kc;var jt="MenuContent",[Qk,Ec]=rr(jt),cv=m.forwardRef((t,r)=>{const o=lv(jt,t.__scopeMenu),{forceMount:i=o.forceMount,...u}=t,d=or(jt,t.__scopeMenu),p=Jo(jt,t.__scopeMenu);return l.jsx(Bo.Provider,{scope:t.__scopeMenu,children:l.jsx(Fn,{present:i||d.open,children:l.jsx(Bo.Slot,{scope:t.__scopeMenu,children:p.modal?l.jsx(Gk,{...u,ref:r}):l.jsx(qk,{...u,ref:r})})})})}),Gk=m.forwardRef((t,r)=>{const o=or(jt,t.__scopeMenu),i=m.useRef(null),u=He(r,i);return m.useEffect(()=>{const d=i.current;if(d)return ek(d)},[]),l.jsx(Nc,{...t,ref:u,trapFocus:o.open,disableOutsidePointerEvents:o.open,disableOutsideScroll:!0,onFocusOutside:he(t.onFocusOutside,d=>d.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>o.onOpenChange(!1)})}),qk=m.forwardRef((t,r)=>{const o=or(jt,t.__scopeMenu);return l.jsx(Nc,{...t,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>o.onOpenChange(!1)})}),Yk=KC("MenuContent.ScrollLock"),Nc=m.forwardRef((t,r)=>{const{__scopeMenu:o,loop:i=!1,trapFocus:u,onOpenAutoFocus:d,onCloseAutoFocus:p,disableOutsidePointerEvents:h,onEntryFocus:g,onEscapeKeyDown:x,onPointerDownOutside:v,onFocusOutside:w,onInteractOutside:b,onDismiss:k,disableOutsideScroll:j,...C}=t,S=or(jt,o),E=Jo(jt,o),_=Ji(o),O=iv(o),I=Uk(o),[D,A]=m.useState(null),$=m.useRef(null),K=He(r,$,S.onContentChange),Q=m.useRef(0),ee=m.useRef(""),ne=m.useRef(0),Z=m.useRef(null),de=m.useRef("right"),X=m.useRef(0),ve=j?rv:m.Fragment,se=j?{as:Yk,allowPinchZoom:!0}:void 0,le=U=>{const q=ee.current+U,P=I().filter(ce=>!ce.disabled),B=document.activeElement,ue=P.find(ce=>ce.ref.current===B)?.textValue,me=P.map(ce=>ce.textValue),H=lE(me,q,ue),ae=P.find(ce=>ce.textValue===H)?.ref.current;(function ce(be){ee.current=be,window.clearTimeout(Q.current),be!==""&&(Q.current=window.setTimeout(()=>ce(""),1e3))})(q),ae&&setTimeout(()=>ae.focus())};m.useEffect(()=>()=>window.clearTimeout(Q.current),[]),EC();const z=m.useCallback(U=>de.current===Z.current?.side&&cE(U,Z.current?.area),[]);return l.jsx(Qk,{scope:o,searchRef:ee,onItemEnter:m.useCallback(U=>{z(U)&&U.preventDefault()},[z]),onItemLeave:m.useCallback(U=>{z(U)||($.current?.focus(),A(null))},[z]),onTriggerLeave:m.useCallback(U=>{z(U)&&U.preventDefault()},[z]),pointerGraceTimerRef:ne,onPointerGraceIntentChange:m.useCallback(U=>{Z.current=U},[]),children:l.jsx(ve,{...se,children:l.jsx(Ug,{asChild:!0,trapped:u,onMountAutoFocus:he(d,U=>{U.preventDefault(),$.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:p,children:l.jsx(zi,{asChild:!0,disableOutsidePointerEvents:h,onEscapeKeyDown:x,onPointerDownOutside:v,onFocusOutside:w,onInteractOutside:b,onDismiss:k,children:l.jsx(BC,{asChild:!0,...O,dir:E.dir,orientation:"vertical",loop:i,currentTabStopId:D,onCurrentTabStopIdChange:A,onEntryFocus:he(g,U=>{E.isUsingKeyboardRef.current||U.preventDefault()}),preventScrollOnEntryFocus:!0,children:l.jsx(kg,{role:"menu","aria-orientation":"vertical","data-state":Nv(S.open),"data-radix-menu-content":"",dir:E.dir,..._,...C,ref:K,style:{outline:"none",...C.style},onKeyDown:he(C.onKeyDown,U=>{const P=U.target.closest("[data-radix-menu-content]")===U.currentTarget,B=U.ctrlKey||U.altKey||U.metaKey,ue=U.key.length===1;P&&(U.key==="Tab"&&U.preventDefault(),!B&&ue&&le(U.key));const me=$.current;if(U.target!==me||!Fk.includes(U.key))return;U.preventDefault();const ae=I().filter(ce=>!ce.disabled).map(ce=>ce.ref.current);ov.includes(U.key)&&ae.reverse(),iE(ae)}),onBlur:he(t.onBlur,U=>{U.currentTarget.contains(U.target)||(window.clearTimeout(Q.current),ee.current="")}),onPointerMove:he(t.onPointerMove,Wo(U=>{const q=U.target,P=X.current!==U.clientX;if(U.currentTarget.contains(q)&&P){const B=U.clientX>X.current?"right":"left";de.current=B,X.current=U.clientX}}))})})})})})})});cv.displayName=jt;var Xk="MenuGroup",jc=m.forwardRef((t,r)=>{const{__scopeMenu:o,...i}=t;return l.jsx(je.div,{role:"group",...i,ref:r})});jc.displayName=Xk;var Zk="MenuLabel",dv=m.forwardRef((t,r)=>{const{__scopeMenu:o,...i}=t;return l.jsx(je.div,{...i,ref:r})});dv.displayName=Zk;var Mi="MenuItem",Lh="menu.itemSelect",ea=m.forwardRef((t,r)=>{const{disabled:o=!1,onSelect:i,...u}=t,d=m.useRef(null),p=Jo(Mi,t.__scopeMenu),h=Ec(Mi,t.__scopeMenu),g=He(r,d),x=m.useRef(!1),v=()=>{const w=d.current;if(!o&&w){const b=new CustomEvent(Lh,{bubbles:!0,cancelable:!0});w.addEventListener(Lh,k=>i?.(k),{once:!0}),sc(w,b),b.defaultPrevented?x.current=!1:p.onClose()}};return l.jsx(fv,{...u,ref:g,disabled:o,onClick:he(t.onClick,v),onPointerDown:w=>{t.onPointerDown?.(w),x.current=!0},onPointerUp:he(t.onPointerUp,w=>{x.current||w.currentTarget?.click()}),onKeyDown:he(t.onKeyDown,w=>{const b=h.searchRef.current!=="";o||b&&w.key===" "||Ku.includes(w.key)&&(w.currentTarget.click(),w.preventDefault())})})});ea.displayName=Mi;var fv=m.forwardRef((t,r)=>{const{__scopeMenu:o,disabled:i=!1,textValue:u,...d}=t,p=Ec(Mi,o),h=iv(o),g=m.useRef(null),x=He(r,g),[v,w]=m.useState(!1),[b,k]=m.useState("");return m.useEffect(()=>{const j=g.current;j&&k((j.textContent??"").trim())},[d.children]),l.jsx(Bo.ItemSlot,{scope:o,disabled:i,textValue:u??b,children:l.jsx(WC,{asChild:!0,...h,focusable:!i,children:l.jsx(je.div,{role:"menuitem","data-highlighted":v?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...d,ref:x,onPointerMove:he(t.onPointerMove,Wo(j=>{i?p.onItemLeave(j):(p.onItemEnter(j),j.defaultPrevented||j.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:he(t.onPointerLeave,Wo(j=>p.onItemLeave(j))),onFocus:he(t.onFocus,()=>w(!0)),onBlur:he(t.onBlur,()=>w(!1))})})})}),Jk="MenuCheckboxItem",pv=m.forwardRef((t,r)=>{const{checked:o=!1,onCheckedChange:i,...u}=t;return l.jsx(xv,{scope:t.__scopeMenu,checked:o,children:l.jsx(ea,{role:"menuitemcheckbox","aria-checked":Ii(o)?"mixed":o,...u,ref:r,"data-state":Pc(o),onSelect:he(u.onSelect,()=>i?.(Ii(o)?!0:!o),{checkForDefaultPrevented:!1})})})});pv.displayName=Jk;var hv="MenuRadioGroup",[eE,tE]=rr(hv,{value:void 0,onValueChange:()=>{}}),mv=m.forwardRef((t,r)=>{const{value:o,onValueChange:i,...u}=t,d=yt(i);return l.jsx(eE,{scope:t.__scopeMenu,value:o,onValueChange:d,children:l.jsx(jc,{...u,ref:r})})});mv.displayName=hv;var gv="MenuRadioItem",vv=m.forwardRef((t,r)=>{const{value:o,...i}=t,u=tE(gv,t.__scopeMenu),d=o===u.value;return l.jsx(xv,{scope:t.__scopeMenu,checked:d,children:l.jsx(ea,{role:"menuitemradio","aria-checked":d,...i,ref:r,"data-state":Pc(d),onSelect:he(i.onSelect,()=>u.onValueChange?.(o),{checkForDefaultPrevented:!1})})})});vv.displayName=gv;var Rc="MenuItemIndicator",[xv,nE]=rr(Rc,{checked:!1}),yv=m.forwardRef((t,r)=>{const{__scopeMenu:o,forceMount:i,...u}=t,d=nE(Rc,o);return l.jsx(Fn,{present:i||Ii(d.checked)||d.checked===!0,children:l.jsx(je.span,{...u,ref:r,"data-state":Pc(d.checked)})})});yv.displayName=Rc;var rE="MenuSeparator",wv=m.forwardRef((t,r)=>{const{__scopeMenu:o,...i}=t;return l.jsx(je.div,{role:"separator","aria-orientation":"horizontal",...i,ref:r})});wv.displayName=rE;var oE="MenuArrow",bv=m.forwardRef((t,r)=>{const{__scopeMenu:o,...i}=t,u=Ji(o);return l.jsx(Eg,{...u,...i,ref:r})});bv.displayName=oE;var sE="MenuSub",[Uj,Sv]=rr(sE),Do="MenuSubTrigger",Cv=m.forwardRef((t,r)=>{const o=or(Do,t.__scopeMenu),i=Jo(Do,t.__scopeMenu),u=Sv(Do,t.__scopeMenu),d=Ec(Do,t.__scopeMenu),p=m.useRef(null),{pointerGraceTimerRef:h,onPointerGraceIntentChange:g}=d,x={__scopeMenu:t.__scopeMenu},v=m.useCallback(()=>{p.current&&window.clearTimeout(p.current),p.current=null},[]);return m.useEffect(()=>v,[v]),m.useEffect(()=>{const w=h.current;return()=>{window.clearTimeout(w),g(null)}},[h,g]),l.jsx(Cc,{asChild:!0,...x,children:l.jsx(fv,{id:u.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":u.contentId,"data-state":Nv(o.open),...t,ref:Ur(r,u.onTriggerChange),onClick:w=>{t.onClick?.(w),!(t.disabled||w.defaultPrevented)&&(w.currentTarget.focus(),o.open||o.onOpenChange(!0))},onPointerMove:he(t.onPointerMove,Wo(w=>{d.onItemEnter(w),!w.defaultPrevented&&!t.disabled&&!o.open&&!p.current&&(d.onPointerGraceIntentChange(null),p.current=window.setTimeout(()=>{o.onOpenChange(!0),v()},100))})),onPointerLeave:he(t.onPointerLeave,Wo(w=>{v();const b=o.content?.getBoundingClientRect();if(b){const k=o.content?.dataset.side,j=k==="right",C=j?-5:5,S=b[j?"left":"right"],E=b[j?"right":"left"];d.onPointerGraceIntentChange({area:[{x:w.clientX+C,y:w.clientY},{x:S,y:b.top},{x:E,y:b.top},{x:E,y:b.bottom},{x:S,y:b.bottom}],side:k}),window.clearTimeout(h.current),h.current=window.setTimeout(()=>d.onPointerGraceIntentChange(null),300)}else{if(d.onTriggerLeave(w),w.defaultPrevented)return;d.onPointerGraceIntentChange(null)}})),onKeyDown:he(t.onKeyDown,w=>{const b=d.searchRef.current!=="";t.disabled||b&&w.key===" "||$k[i.dir].includes(w.key)&&(o.onOpenChange(!0),o.content?.focus(),w.preventDefault())})})})});Cv.displayName=Do;var kv="MenuSubContent",Ev=m.forwardRef((t,r)=>{const o=lv(jt,t.__scopeMenu),{forceMount:i=o.forceMount,...u}=t,d=or(jt,t.__scopeMenu),p=Jo(jt,t.__scopeMenu),h=Sv(kv,t.__scopeMenu),g=m.useRef(null),x=He(r,g);return l.jsx(Bo.Provider,{scope:t.__scopeMenu,children:l.jsx(Fn,{present:i||d.open,children:l.jsx(Bo.Slot,{scope:t.__scopeMenu,children:l.jsx(Nc,{id:h.contentId,"aria-labelledby":h.triggerId,...u,ref:x,align:"start",side:p.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:v=>{p.isUsingKeyboardRef.current&&g.current?.focus(),v.preventDefault()},onCloseAutoFocus:v=>v.preventDefault(),onFocusOutside:he(t.onFocusOutside,v=>{v.target!==h.trigger&&d.onOpenChange(!1)}),onEscapeKeyDown:he(t.onEscapeKeyDown,v=>{p.onClose(),v.preventDefault()}),onKeyDown:he(t.onKeyDown,v=>{const w=v.currentTarget.contains(v.target),b=zk[p.dir].includes(v.key);w&&b&&(d.onOpenChange(!1),h.trigger?.focus(),v.preventDefault())})})})})})});Ev.displayName=kv;function Nv(t){return t?"open":"closed"}function Ii(t){return t==="indeterminate"}function Pc(t){return Ii(t)?"indeterminate":t?"checked":"unchecked"}function iE(t){const r=document.activeElement;for(const o of t)if(o===r||(o.focus(),document.activeElement!==r))return}function aE(t,r){return t.map((o,i)=>t[(r+i)%t.length])}function lE(t,r,o){const u=r.length>1&&Array.from(r).every(x=>x===r[0])?r[0]:r,d=o?t.indexOf(o):-1;let p=aE(t,Math.max(d,0));u.length===1&&(p=p.filter(x=>x!==o));const g=p.find(x=>x.toLowerCase().startsWith(u.toLowerCase()));return g!==o?g:void 0}function uE(t,r){const{x:o,y:i}=t;let u=!1;for(let d=0,p=r.length-1;d<r.length;p=d++){const h=r[d],g=r[p],x=h.x,v=h.y,w=g.x,b=g.y;v>i!=b>i&&o<(w-x)*(i-v)/(b-v)+x&&(u=!u)}return u}function cE(t,r){if(!r)return!1;const o={x:t.clientX,y:t.clientY};return uE(o,r)}function Wo(t){return r=>r.pointerType==="mouse"?t(r):void 0}var dE=av,fE=Cc,pE=uv,hE=cv,mE=jc,gE=dv,vE=ea,xE=pv,yE=mv,wE=vv,bE=yv,SE=wv,CE=bv,kE=Cv,EE=Ev,ta="DropdownMenu",[NE]=Dn(ta,[sv]),st=sv(),[jE,jv]=NE(ta),Rv=t=>{const{__scopeDropdownMenu:r,children:o,dir:i,open:u,defaultOpen:d,onOpenChange:p,modal:h=!0}=t,g=st(r),x=m.useRef(null),[v,w]=Qo({prop:u,defaultProp:d??!1,onChange:p,caller:ta});return l.jsx(jE,{scope:r,triggerId:zo(),triggerRef:x,contentId:zo(),open:v,onOpenChange:w,onOpenToggle:m.useCallback(()=>w(b=>!b),[w]),modal:h,children:l.jsx(dE,{...g,open:v,onOpenChange:w,dir:i,modal:h,children:o})})};Rv.displayName=ta;var Pv="DropdownMenuTrigger",Tv=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:o,disabled:i=!1,...u}=t,d=jv(Pv,o),p=st(o);return l.jsx(fE,{asChild:!0,...p,children:l.jsx(je.button,{type:"button",id:d.triggerId,"aria-haspopup":"menu","aria-expanded":d.open,"aria-controls":d.open?d.contentId:void 0,"data-state":d.open?"open":"closed","data-disabled":i?"":void 0,disabled:i,...u,ref:Ur(r,d.triggerRef),onPointerDown:he(t.onPointerDown,h=>{!i&&h.button===0&&h.ctrlKey===!1&&(d.onOpenToggle(),d.open||h.preventDefault())}),onKeyDown:he(t.onKeyDown,h=>{i||(["Enter"," "].includes(h.key)&&d.onOpenToggle(),h.key==="ArrowDown"&&d.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(h.key)&&h.preventDefault())})})})});Tv.displayName=Pv;var RE="DropdownMenuPortal",_v=t=>{const{__scopeDropdownMenu:r,...o}=t,i=st(r);return l.jsx(pE,{...i,...o})};_v.displayName=RE;var Ov="DropdownMenuContent",Av=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:o,...i}=t,u=jv(Ov,o),d=st(o),p=m.useRef(!1);return l.jsx(hE,{id:u.contentId,"aria-labelledby":u.triggerId,...d,...i,ref:r,onCloseAutoFocus:he(t.onCloseAutoFocus,h=>{p.current||u.triggerRef.current?.focus(),p.current=!1,h.preventDefault()}),onInteractOutside:he(t.onInteractOutside,h=>{const g=h.detail.originalEvent,x=g.button===0&&g.ctrlKey===!0,v=g.button===2||x;(!u.modal||v)&&(p.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Av.displayName=Ov;var PE="DropdownMenuGroup",TE=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:o,...i}=t,u=st(o);return l.jsx(mE,{...u,...i,ref:r})});TE.displayName=PE;var _E="DropdownMenuLabel",Mv=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:o,...i}=t,u=st(o);return l.jsx(gE,{...u,...i,ref:r})});Mv.displayName=_E;var OE="DropdownMenuItem",Iv=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:o,...i}=t,u=st(o);return l.jsx(vE,{...u,...i,ref:r})});Iv.displayName=OE;var AE="DropdownMenuCheckboxItem",Lv=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:o,...i}=t,u=st(o);return l.jsx(xE,{...u,...i,ref:r})});Lv.displayName=AE;var ME="DropdownMenuRadioGroup",IE=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:o,...i}=t,u=st(o);return l.jsx(yE,{...u,...i,ref:r})});IE.displayName=ME;var LE="DropdownMenuRadioItem",Dv=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:o,...i}=t,u=st(o);return l.jsx(wE,{...u,...i,ref:r})});Dv.displayName=LE;var DE="DropdownMenuItemIndicator",Fv=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:o,...i}=t,u=st(o);return l.jsx(bE,{...u,...i,ref:r})});Fv.displayName=DE;var FE="DropdownMenuSeparator",$v=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:o,...i}=t,u=st(o);return l.jsx(SE,{...u,...i,ref:r})});$v.displayName=FE;var $E="DropdownMenuArrow",zE=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:o,...i}=t,u=st(o);return l.jsx(CE,{...u,...i,ref:r})});zE.displayName=$E;var UE="DropdownMenuSubTrigger",zv=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:o,...i}=t,u=st(o);return l.jsx(kE,{...u,...i,ref:r})});zv.displayName=UE;var HE="DropdownMenuSubContent",Uv=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:o,...i}=t,u=st(o);return l.jsx(EE,{...u,...i,ref:r,style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Uv.displayName=HE;var BE=Rv,WE=Tv,KE=_v,Hv=Av,Bv=Mv,Wv=Iv,Kv=Lv,Vv=Dv,Qv=Fv,Gv=$v,qv=zv,Yv=Uv;const VE=BE,QE=WE,GE=m.forwardRef(({className:t,inset:r,children:o,...i},u)=>l.jsxs(qv,{ref:u,className:De("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",r&&"pl-8",t),...i,children:[o,l.jsx(U0,{className:"ml-auto"})]}));GE.displayName=qv.displayName;const qE=m.forwardRef(({className:t,...r},o)=>l.jsx(Yv,{ref:o,className:De("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",t),...r}));qE.displayName=Yv.displayName;const Xv=m.forwardRef(({className:t,sideOffset:r=4,...o},i)=>l.jsx(KE,{children:l.jsx(Hv,{ref:i,sideOffset:r,className:De("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",t),...o})}));Xv.displayName=Hv.displayName;const YE=m.forwardRef(({className:t,inset:r,...o},i)=>l.jsx(Wv,{ref:i,className:De("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",r&&"pl-8",t),...o}));YE.displayName=Wv.displayName;const XE=m.forwardRef(({className:t,children:r,checked:o,...i},u)=>l.jsxs(Kv,{ref:u,className:De("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),checked:o,...i,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(Qv,{children:l.jsx(z0,{className:"h-4 w-4"})})}),r]}));XE.displayName=Kv.displayName;const ZE=m.forwardRef(({className:t,children:r,...o},i)=>l.jsxs(Vv,{ref:i,className:De("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...o,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(Qv,{children:l.jsx(B0,{className:"h-2 w-2 fill-current"})})}),r]}));ZE.displayName=Vv.displayName;const JE=m.forwardRef(({className:t,inset:r,...o},i)=>l.jsx(Bv,{ref:i,className:De("px-2 py-1.5 text-sm font-semibold",r&&"pl-8",t),...o}));JE.displayName=Bv.displayName;const eN=m.forwardRef(({className:t,...r},o)=>l.jsx(Gv,{ref:o,className:De("-mx-1 my-1 h-px bg-muted",t),...r}));eN.displayName=Gv.displayName;function tN(t){return t.replace("_"," ").toUpperCase()}function nN(t){return t==="in_progress"?"border-foreground text-foreground animate-pulse":t==="failed"?"border-destructive text-destructive":t==="warning"?"border-warning-border bg-warning-muted text-warning-foreground":t==="resolved"?"border-foreground/20 text-muted-foreground":t==="rejected"?"border-foreground/20 text-muted-foreground line-through":t==="flagged"?"border-foreground/40 text-foreground/60":t==="queued"?"border-foreground text-foreground":"border-foreground/30 text-foreground/60"}function rN(t){return t==="resolved"||t==="rejected"}function Zv(t){return t.length===0?!1:t.every(r=>rN(r.status))}function Li(t){return t.reduce((r,o)=>(o.status==="queued"?r.queued+=1:o.status==="in_progress"?r.inProgress+=1:o.status==="failed"?r.failed+=1:o.status==="warning"&&(r.warning+=1),r),{queued:0,inProgress:0,failed:0,warning:0})}const oN=["failed","warning","pending","flagged","in_progress","queued","resolved","rejected"],sN={pending:{singular:"pending",plural:"pending"},queued:{singular:"queued",plural:"queued"},in_progress:{singular:"running",plural:"running"},resolved:{singular:"resolved",plural:"resolved"},failed:{singular:"failed",plural:"failed"},warning:{singular:"warning"},rejected:{singular:"rejected",plural:"rejected"},flagged:{singular:"flagged",plural:"flagged"}},iN=new Set(["code review","high","medium","low"]),aN=/<\/?(?:a|span|div|p|br|img)\b[^>]*>/gi,lN={quot:'"',"#39":"'",amp:"&",lt:"<",gt:">"};function ki(t,r,o=`${r}s`){return`${t} ${t===1?r:o}`}function uN(t){return t.reduce((r,o)=>(r[o.status]+=1,r),{pending:0,queued:0,in_progress:0,resolved:0,failed:0,warning:0,rejected:0,flagged:0})}function wu(t){const r=uN(t);return oN.filter(i=>r[i]>0).map(i=>{const u=sN[i];return ki(r[i],u.singular,u.plural)}).join(" · ")}function cN(t){return t.replace(/&(quot|#39|amp|lt|gt);/g,(r,o)=>lN[o]??r)}function dN(t){const r=t.replace(/<img\b[^>]*\balt=(["'])(.*?)\1[^>]*>/gi," $2 ").replace(aN," ");return cN(r).replace(/!\[([^\]]*)\]\([^)]+\)/g,"$1").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/`([^`]+)`/g,"$1").replace(/^\s*>+\s?/,"").replace(/[*_~#]/g,"").replace(/^\s*[-+*]\s+/,"").replace(/\s+/g," ").trim()}function fN(t,r=150){const o=t.body.replace(/```[\s\S]*?```/g," ").split(/\n+/).map(dN).find(i=>i.length>0&&!iN.has(i.toLowerCase()));return o?o.length<=r?o:`${o.slice(0,Math.max(0,r-3)).trimEnd()}...`:"No comment body"}function pN(t){return t==="queued"||t==="in_progress"?"running":t==="resolved"||t==="rejected"?"done":"attention"}function Jv(t){const r={attention:[],running:[],done:[]};for(const o of t)r[pN(o.status)].push(o);return[{key:"attention",label:"Needs attention",summary:wu(r.attention),defaultOpen:!0,items:r.attention},{key:"running",label:"Running",summary:wu(r.running),defaultOpen:!0,items:r.running},{key:"done",label:"Done",summary:wu(r.done),defaultOpen:!1,items:r.done}].filter(o=>o.items.length>0)}function hN(t){return t.length===0?"no feedback":Jv(t).map(i=>i.key==="attention"?i.summary||ki(i.items.length,"attention item"):i.key==="running"?ki(i.items.length,"running","running"):ki(i.items.length,"done","done")).join(" · ")}const mN={idle:"IDLE",triaging:"TRIAGING",awaiting_repair_slot:"REPAIR QUEUED",repairing:"REPAIRING",awaiting_ci:"WAITING FOR CI",verifying:"VERIFYING",healed:"HEALED",cooldown:"COOLDOWN",blocked:"BLOCKED",escalated:"ESCALATED",superseded:"SUPERSEDED"},gN={idle:[],triaging:["cancel"],awaiting_repair_slot:["pause","cancel"],repairing:["pause","cancel"],awaiting_ci:["pause","cancel"],verifying:["cancel"],healed:[],cooldown:["resume","cancel"],blocked:["retry"],escalated:["retry"],superseded:[]},vN={idle:"neutral",triaging:"info",awaiting_repair_slot:"warning",repairing:"info",awaiting_ci:"info",verifying:"info",healed:"success",cooldown:"warning",blocked:"danger",escalated:"danger",superseded:"neutral"},xN={idle:"Waiting for a new failing check on the current PR head.",triaging:"Classifying the current failure set before deciding whether it is safe to repair.",awaiting_repair_slot:"Ready for the next bounded repair attempt as soon as a slot is free.",repairing:"A repair agent is actively working in an isolated worktree.",awaiting_ci:"A repair was pushed and the new head SHA is waiting for CI to settle.",verifying:"Comparing the latest check results against the previous failure fingerprint.",healed:"The latest repair cycle converged to green and the session is complete.",cooldown:"Cooling down before another retry is allowed.",blocked:"Stopped because the failure looks external or unsafe to repair in-branch.",escalated:"Stopped because retries were exhausted or the failure did not improve.",superseded:"Replaced after the PR head moved to a newer commit."};function yN(t){return mN[t]}function wN(t){return gN[t]}function Dh(t){return t==="pause"?"Pause":t==="resume"?"Resume":t==="retry"?"Retry":"Cancel"}function bN(t){return vN[t]}function SN(t){return xN[t]}function CN(t){const r=t.attemptCount,o=r===1?"":"s";return r===0?t.state==="triaging"?"Preparing attempt 1":t.state==="awaiting_repair_slot"?"Queued for attempt 1":t.state==="healed"?"Healed without a repair attempt":"No repair attempts yet":t.state==="repairing"?`Attempt ${r} running`:t.state==="awaiting_ci"?`Attempt ${r} pushed, waiting on CI`:t.state==="verifying"?`Attempt ${r} verifying`:t.state==="healed"?`Healed after ${r} attempt${o}`:t.state==="blocked"?`${r} attempt${o} before blocking`:t.state==="escalated"?`${r} attempt${o} before escalation`:t.state==="cooldown"?`${r} attempt${o}, cooling down`:t.state==="superseded"?`${r} attempt${o}, superseded`:`${r} attempt${o} recorded`}function kN(t){return t?t.blockedReason??t.escalationReason??t.latestFingerprint??null:null}function EN(t,r){const o=t.filter(i=>i.prId===r);return o.length===0?null:o.reduce((i,u)=>u.updatedAt>i.updatedAt?u:i)}function NN(t,r){return EN(t,r)}function jN(t,r){return{stateLabel:yN(t.state),tone:bN(t.state),attemptSummary:CN(t),reasonSummary:kN(t),statusHint:SN(t.state),actions:wN(t.state).map(o=>({label:Dh(o),available:!0,hint:`${Dh(o)} controls are planned but not wired to the backend yet.`}))}}function Lt(t){return t?new Date(t).toLocaleTimeString("en-US",{hour12:!1}):null}function ex(t){return t.watchEnabled}function tx(t){return t==="processing"?"autonomous run active":t==="done"?"completed":t==="error"?"attention needed":t==="archived"?"archived":"watching"}function RN(t){return`${Math.max(1,Math.round((t??12e4)/1e3))}s`}function Fh(t,r){return t.reduce((o,i)=>i.targetId!==r?o:!o||Date.parse(i.updatedAt)>Date.parse(o.updatedAt)?i:o,void 0)}function $h(t){return t.feedbackItems.find(o=>(o.status==="failed"||o.status==="warning")&&!!o.statusReason)?.statusReason??null}const PN=[{value:"mine",label:"My PRs only"},{value:"team",label:"My PRs + teammates"}],TN={failed:[],inProgress:[],queued:[],warnings:[],generatedAt:""},bu=200,zh="oh-my-pr:tracked-repos-open",Di="Paused",Ko="Paused by drain mode",_N="Manual runs are blocked while global automation is paused.",ON="Background and manual runs are paused by drain mode.",AN="Ask Agent is paused by drain mode.",MN="Queued automation is paused until drain mode is disabled.";function IN(t){return t===!1?"team":"mine"}const Uh={neutral:"border-border text-muted-foreground",info:"border-foreground text-foreground",warning:"border-warning-border bg-warning-muted text-warning-foreground",success:"border-success-border bg-success-muted text-success-foreground",danger:"border-destructive text-destructive"};function nx({status:t}){const r=t==="watching"?"bg-foreground/30":t==="processing"?"bg-foreground animate-pulse":t==="done"?"bg-foreground":t==="archived"?"bg-foreground/15":"bg-destructive";return l.jsx("span",{className:`inline-block h-1.5 w-1.5 shrink-0 ${r}`})}function LN({status:t}){const r=nN(t);return l.jsx("span",{className:`inline-block border px-1.5 py-0 text-[11px] uppercase tracking-wide ${r}`,children:tN(t)})}const DN=["accept","reject","flag"];function FN(t){return t.file?`${t.file}${t.line?`:${t.line}`:""}`:t.type==="general_comment"?"General comment":t.type==="review"?"Review":"Review comment"}function $N(t,r){const o=[t.author];return r&&o.push(r),t.decision&&o.push(`decision: ${t.decision}`),o.join(" · ")}function Vu(){return l.jsx("span",{className:"border border-border px-1.5 py-0 text-[10px] uppercase tracking-wider text-muted-foreground",children:"watch paused"})}function Hh({value:t,onChange:r,disabled:o,name:i,testIdPrefix:u,compact:d=!1}){return l.jsx("div",{role:"radiogroup","aria-label":"Automatic PR tracking scope",className:`flex flex-wrap gap-1 ${d?"":"mt-1"}`,children:PN.map(p=>{const h=t===p.value;return l.jsxs("label",{"data-testid":`${u}-${p.value}`,className:`cursor-pointer border px-2 text-[10px] transition-colors focus-within:ring-1 focus-within:ring-ring focus-within:ring-offset-1 focus-within:ring-offset-background ${d?"py-0.5":"py-1"} ${h?"border-foreground bg-muted text-foreground":"border-border text-muted-foreground hover:text-foreground"} ${o?"cursor-not-allowed opacity-50":""} whitespace-nowrap`,children:[l.jsx("input",{type:"radio",name:i,value:p.value,checked:h,onChange:()=>r(p.value),disabled:o,className:"sr-only"}),p.label]},p.value)})})}function zN({activity:t}){const r=t.status==="failed"?Lt(t.updatedAt):t.status==="in_progress"?Lt(t.startedAt)??Lt(t.updatedAt):Lt(t.availableAt)??Lt(t.queuedAt),o=l.jsxs("div",{className:"flex min-w-0 items-start gap-2 px-2 py-1.5 text-left",children:[l.jsx("span",{className:`mt-1.5 h-1.5 w-1.5 shrink-0 ${t.status==="failed"?"bg-destructive":t.status==="in_progress"?"animate-pulse bg-foreground":"bg-muted-foreground"}`}),l.jsxs("span",{className:"min-w-0 flex-1",children:[l.jsx("span",{className:"block truncate text-[12px] leading-4 text-foreground",children:t.label}),t.detail&&l.jsx("span",{className:"block truncate text-[11px] leading-4 text-muted-foreground",children:t.detail}),t.status==="failed"&&t.lastError&&l.jsx("span",{className:"block whitespace-pre-wrap break-words text-[11px] leading-4 text-destructive",title:t.lastError,children:t.lastError})]}),r&&l.jsx("span",{className:"shrink-0 text-[10px] leading-4 text-muted-foreground",children:r})]});return t.targetUrl?l.jsx("a",{href:t.targetUrl,target:"_blank",rel:"noopener noreferrer",className:"block outline-none hover:bg-muted focus:bg-muted focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:o}):l.jsx("div",{children:o})}function Su({title:t,items:r,emptyLabel:o}){return l.jsxs("div",{className:"py-1",children:[l.jsx("div",{className:"px-2 py-1 text-[10px] uppercase tracking-wider text-muted-foreground",children:t}),r.length>0?l.jsx("div",{className:"max-h-52 overflow-y-auto",children:r.map(i=>l.jsx(zN,{activity:i},i.id))}):l.jsx("div",{className:"px-2 pb-2 text-[11px] text-muted-foreground",children:o})]})}function UN({activities:t,onClearFailed:r,isClearingFailed:o,globalDrainMode:i}){const u=t.failed.length,d=t.inProgress.length,p=t.queued.length,h=u+d+p;return l.jsxs(VE,{children:[l.jsxs(QE,{className:"inline-flex items-center gap-1 border border-border px-2 py-0.5 text-[11px] text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background","aria-label":"Open activity menu","data-testid":"activity-menu-trigger",children:[l.jsx($0,{className:"h-3 w-3","aria-hidden":"true"}),l.jsx("span",{children:"activity"}),l.jsx("span",{className:"text-foreground",children:h})]}),l.jsxs(Xv,{align:"end",className:"w-80 p-0",children:[l.jsxs("div",{className:"border-b border-border px-2 py-2",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l.jsx("div",{className:"text-[12px] font-medium",children:"Activities"}),u>0&&l.jsx("button",{type:"button",onClick:r,disabled:o,className:"border border-border px-1.5 py-0.5 text-[10px] uppercase tracking-wider text-muted-foreground hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring","data-testid":"clear-failed-activities",children:o?"clearing":"clear failed"})]}),l.jsxs("div",{className:"text-[11px] text-muted-foreground",children:[u," failed / ",d," in progress / ",p," queued"]})]}),l.jsx(Su,{title:"Failed",items:t.failed,emptyLabel:"No failed activities."}),l.jsx("div",{className:"border-t border-border"}),l.jsx(Su,{title:"In progress",items:t.inProgress,emptyLabel:"No activities running right now."}),l.jsx("div",{className:"border-t border-border"}),l.jsx(Su,{title:"Queued",items:t.queued,emptyLabel:"Queue is empty."}),i&&p>0&&l.jsx("div",{className:"border-t border-border px-2 py-2 text-[11px] text-muted-foreground","data-testid":"activity-drain-note",children:MN})]})]})}function HN({runtimeState:t}){return t?.drainMode?l.jsx("div",{className:"shrink-0 border-b border-destructive/40 bg-destructive/10 px-4 py-2 text-[12px]","data-testid":"dashboard-drain-banner",children:l.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[l.jsxs("div",{className:"min-w-0",children:[l.jsx("div",{className:"text-[10px] font-medium uppercase tracking-wider text-destructive",children:Ko}),t.drainReason?l.jsx("div",{className:"mt-1 break-words text-foreground/80","data-testid":"dashboard-drain-reason",children:t.drainReason}):null,l.jsx("div",{className:"mt-1 text-[11px] text-muted-foreground",children:_N})]}),l.jsx(Dt,{href:"/settings",className:"shrink-0 border border-destructive/50 px-2 py-0.5 text-[10px] uppercase tracking-wider text-destructive transition-colors hover:bg-destructive hover:text-background focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:"Settings"})]})}):null}function BN({warnings:t}){return t.length===0?null:l.jsx("div",{className:"shrink-0 border-b border-yellow-600/50 bg-yellow-500/10 px-4 py-3","data-testid":"operator-warnings-banner",children:l.jsx("div",{className:"space-y-3",children:t.map(r=>l.jsxs("div",{"data-testid":`operator-warning-${r.id}`,children:[l.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[l.jsx("div",{className:"text-[12px] font-medium uppercase tracking-wider text-yellow-600",children:r.title}),r.targetUrl&&l.jsx("a",{href:r.targetUrl,target:"_blank",rel:"noopener noreferrer",className:"border border-yellow-600/60 px-2 py-0.5 text-[10px] uppercase tracking-wider text-yellow-600 transition-colors hover:bg-yellow-600 hover:text-background",children:"Open PR"})]}),l.jsx("div",{className:"mt-1 text-[12px] text-foreground/80",children:r.message}),l.jsx("ol",{className:"mt-2 list-decimal space-y-1 pl-4 text-[11px] text-muted-foreground",children:r.fixSteps.map(o=>l.jsx("li",{children:o},o))})]},r.id))})})}function rx({href:t,testId:r,label:o,hint:i,className:u,dotClassName:d,hintClassName:p,onClick:h}){return l.jsxs("a",{href:t,target:"_blank",rel:"noopener noreferrer",onClick:h,"data-testid":r,className:`inline-flex items-center border border-success-border bg-success-muted font-medium uppercase text-success-foreground transition-colors hover:bg-success-muted/80 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background ${u}`,children:[l.jsx("span",{className:`inline-block rounded-full bg-success ${d}`}),o,i&&l.jsx("span",{className:p,children:i})]})}function ox({pr:t}){const r=Li(t.feedbackItems).inProgress;if(!(t.status==="processing")&&r===0)return null;const i=r>0?`${r} agent${r!==1?"s":""} running on this PR`:"Agent run active on this PR";return l.jsxs(cC,{children:[l.jsx(dC,{asChild:!0,children:l.jsxs("span",{className:"inline-flex shrink-0 cursor-default items-center gap-0.5 text-[12px]","data-testid":`agent-indicator-${t.id}`,children:[l.jsx("span",{className:"animate-pulse",children:"🤖"}),r>0&&l.jsx("span",{className:"text-[10px] text-muted-foreground",children:r})]})}),l.jsx(Mg,{side:"top",children:l.jsx("p",{className:"text-xs",children:i})})]})}const WN=m.memo(function({pr:r,isSelected:o,onSelect:i,failureMessage:u}){const d=Lt(r.lastChecked),p=ex(r),g=!(r.status==="processing"||Li(r.feedbackItems).inProgress>0)&&Zv(r.feedbackItems);return l.jsx("div",{onClick:()=>i(r.id),onKeyDown:x=>{x.target===x.currentTarget&&(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),i(r.id))},role:"button",tabIndex:0,"data-testid":`pr-row-${r.id}`,className:`w-full border-b border-border px-4 py-3 text-left transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring ${o?"bg-muted":""}`,children:l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx(nx,{status:r.status}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("span",{className:"w-12 shrink-0 text-muted-foreground",children:["#",r.number]}),l.jsx("span",{className:"truncate",children:r.title}),l.jsx(ox,{pr:r})]}),g&&l.jsx(rx,{href:r.url,testId:`ready-to-merge-${r.id}`,label:"Ready to merge",hint:"— click to open PR",onClick:x=>x.stopPropagation(),className:"mt-1.5 ml-[3.75rem] gap-1.5 px-2 py-0.5 text-[11px] tracking-wider",dotClassName:"h-1.5 w-1.5",hintClassName:"text-[10px] normal-case tracking-normal text-success-foreground/75"}),r.status==="error"&&u&&l.jsxs("div",{className:"mt-2 ml-[3.75rem] border border-destructive/40 bg-destructive/10 px-2 py-1 text-[11px] leading-4 text-destructive",children:[l.jsx("span",{className:"font-medium uppercase tracking-wider",children:"Error:"})," ",l.jsx("span",{className:"break-words",children:u})]}),l.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-x-3 gap-y-1 pl-[3.75rem] text-[11px] text-muted-foreground",children:[l.jsx("a",{href:r.url,target:"_blank",rel:"noopener noreferrer",onClick:x=>x.stopPropagation(),className:"underline decoration-border underline-offset-2 transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:r.repo}),l.jsx("span",{children:tx(r.status)}),!p&&l.jsx(Vu,{}),r.feedbackItems.length>0&&(()=>{const x=Li(r.feedbackItems),v=[];return x.queued>0&&v.push(`${x.queued}q`),x.inProgress>0&&v.push(`${x.inProgress} active`),x.failed>0&&v.push(`${x.failed} failed`),x.warning>0&&v.push(`${x.warning} warn`),v.length===0?l.jsxs("span",{children:[r.feedbackItems.length," items"]}):l.jsx("span",{children:v.join(" · ")})})(),d&&l.jsxs("span",{children:["checked ",d]})]})]})]})})});function KN({item:t,prId:r,readOnly:o,globalDrainMode:i=!1}){const[u,d]=m.useState(!1),p=Je({mutationFn:async j=>(await Ge("PATCH",`/api/prs/${r}/feedback/${t.id}`,{decision:j})).json(),onSuccess:()=>{ye.invalidateQueries({queryKey:["/api/prs"]}),ye.invalidateQueries({queryKey:["/api/prs",r]})}}),h=Je({mutationFn:async()=>(await Ge("POST",`/api/prs/${r}/feedback/${t.id}/retry`)).json(),onSuccess:()=>{ye.invalidateQueries({queryKey:["/api/prs"]}),ye.invalidateQueries({queryKey:["/api/prs",r]}),ye.invalidateQueries({queryKey:["/api/activities"]}),ye.invalidateQueries({queryKey:["/api/logs"]})},onError:j=>{It("Could not retry feedback item",j)}}),g=Lt(t.createdAt),x=FN(t),v=fN(t),w=$N(t,g),b=(t.status==="failed"||t.status==="warning")&&t.statusReason?t.statusReason:null,k=t.status==="warning"?"Warning":"Blocked";return l.jsxs(_i,{open:u,onOpenChange:d,className:"border-b border-border/80",children:[l.jsx("div",{className:"px-4 py-2.5",children:l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx("div",{className:"shrink-0 pt-0.5",children:l.jsx(LN,{status:t.status})}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5 lg:flex-row lg:items-baseline lg:gap-2",children:[l.jsx("span",{className:"min-w-0 truncate text-[12px] font-medium text-foreground/85 lg:max-w-[42%] lg:shrink-0",children:x}),l.jsxs("span",{className:"min-w-0 truncate text-[12px] text-foreground/75",title:v,children:['"',v,'"']})]}),l.jsx("div",{className:"mt-0.5 truncate text-[11px] text-muted-foreground",title:w,children:w}),b&&l.jsxs("div",{className:"mt-1 flex min-w-0 items-center gap-1 border border-destructive/25 bg-destructive/10 px-2 py-1 text-[11px] leading-4 text-destructive",title:b,children:[l.jsxs("span",{className:"shrink-0 font-medium uppercase tracking-wider",children:[k,":"]}),l.jsx("span",{className:"min-w-0 truncate",children:b})]})]}),l.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[!o&&(t.status==="failed"||t.status==="warning")&&l.jsx("button",{type:"button",onClick:()=>h.mutate(),disabled:h.isPending||i,"data-testid":`retry-${t.id}`,"aria-label":`Retry feedback from ${t.author}`,title:i?Ko:"Retry feedback item",className:"border border-border px-2 py-0.5 text-[10px] uppercase tracking-wider text-muted-foreground transition-colors hover:bg-foreground hover:text-background focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-30",children:i?Di:"Retry"}),l.jsx(Oi,{asChild:!0,children:l.jsx("button",{type:"button","data-testid":`toggle-${t.id}`,"aria-label":`${u?"Hide":"Show"} feedback details from ${t.author}`,title:"Toggle feedback details",className:"border border-border px-2 py-0.5 text-[10px] uppercase tracking-wider text-muted-foreground transition-colors hover:bg-foreground hover:text-background focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:u?"Hide":"Open"})})]})]})}),l.jsx(Ai,{children:l.jsxs("div",{className:"px-4 pb-3 pl-[calc(1rem+4.5rem)]",children:[t.bodyHtml?l.jsx("div",{className:"feedback-markdown text-[12px] leading-relaxed",dangerouslySetInnerHTML:{__html:t.bodyHtml}}):l.jsx("p",{className:"whitespace-pre-wrap text-[12px] leading-relaxed text-foreground/80",children:t.body}),t.statusReason&&!b&&l.jsxs("p",{className:"mt-2 whitespace-pre-wrap break-words text-[11px] text-muted-foreground",children:[l.jsx("span",{className:"font-medium uppercase tracking-wider text-foreground/70",children:"Status reason:"})," ",t.statusReason]}),t.decisionReason&&l.jsxs("p",{className:"mt-2 whitespace-pre-wrap break-words text-[11px] text-muted-foreground",children:[l.jsx("span",{className:"font-medium uppercase tracking-wider text-foreground/70",children:"Decision reason:"})," ",t.decisionReason]}),!o&&l.jsxs("div",{className:"mt-3 flex flex-wrap items-center justify-between gap-2 border-t border-border/70 pt-2",children:[l.jsx("span",{className:"text-[10px] uppercase tracking-wider text-muted-foreground",children:"Manual decision"}),l.jsx("div",{className:"flex flex-wrap items-center gap-1",children:DN.map(j=>l.jsx("button",{type:"button",onClick:()=>p.mutate(j),disabled:p.isPending,"data-testid":`override-${j}-${t.id}`,"aria-label":`${j} feedback from ${t.author}`,className:`px-2 py-0.5 text-[10px] uppercase tracking-wider transition-colors hover:bg-foreground hover:text-background focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-30 ${t.decision===j?"bg-foreground text-background":"border border-border text-muted-foreground"}`,children:j},j))})]})]})})]})}function VN({section:t,prId:r,readOnly:o,globalDrainMode:i}){const[u,d]=m.useState(t.defaultOpen);return l.jsxs(_i,{open:u,onOpenChange:d,className:"border-b border-border last:border-b-0",children:[l.jsx("div",{className:"sticky top-0 z-[1] border-b border-border/80 bg-background/95 px-4 py-2",children:l.jsx(Oi,{asChild:!0,children:l.jsxs("button",{type:"button",className:"flex w-full items-center justify-between gap-3 text-left focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background","aria-label":`${u?"Collapse":"Expand"} ${t.label.toLowerCase()} feedback`,children:[l.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[l.jsx("span",{"aria-hidden":"true",className:"w-3 text-[10px] text-muted-foreground",children:u?"▾":"▸"}),l.jsx("span",{className:"text-[10px] uppercase tracking-wider text-foreground/80",children:t.label}),l.jsx("span",{className:"text-[11px] text-muted-foreground",children:t.items.length})]}),t.summary&&l.jsx("span",{className:"truncate text-[11px] text-muted-foreground",children:t.summary})]})})}),l.jsx(Ai,{children:t.items.map(p=>l.jsx(KN,{item:p,prId:r,readOnly:o,globalDrainMode:i},p.id))})]})}function QN({items:t,prId:r,readOnly:o,globalDrainMode:i}){return l.jsx(l.Fragment,{children:Jv(t).map(u=>l.jsx(VN,{section:u,prId:r,readOnly:o,globalDrainMode:i},`${r}-${u.key}`))})}function GN({prId:t}){const r=m.useRef(null),{data:o=[]}=et({queryKey:["/api/logs",t??"all"],queryFn:async()=>{const d=t?`/api/logs?prId=${encodeURIComponent(t)}`:"/api/logs";return(await Ge("GET",d)).json()},refetchInterval:1500}),i=m.useMemo(()=>o.length>bu?o.slice(-bu):o,[o]),u=o.length-i.length;return m.useEffect(()=>{const d=r.current;d&&(d.scrollTop=d.scrollHeight)},[o.length,t]),l.jsx("div",{className:"flex h-full flex-col",children:l.jsx("div",{ref:r,className:"flex-1 overflow-y-auto p-4 font-mono text-[11px] leading-relaxed",children:o.length===0?l.jsx("span",{className:"text-muted-foreground",children:"No log entries."}):l.jsxs(l.Fragment,{children:[u>0&&l.jsxs("div",{className:"border-b border-border/60 pb-2 text-[10px] uppercase tracking-wider text-muted-foreground",children:["Showing latest ",bu," of ",o.length," entries."]}),i.map(d=>{const p=d.metadata&&Object.keys(d.metadata).length>0?JSON.stringify(d.metadata,null,2):null;return l.jsxs("div",{className:"border-b border-border/60 py-2 last:border-b-0","data-testid":`log-${d.id}`,children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-[10px] uppercase tracking-wider text-muted-foreground",children:[l.jsx("span",{children:Lt(d.timestamp)}),l.jsx("span",{className:d.level==="error"?"text-destructive":d.level==="warn"?"text-foreground/80":"text-foreground/55",children:d.level}),d.phase&&l.jsx("span",{className:"border border-border px-1 py-0",children:d.phase}),d.runId&&l.jsxs("span",{className:"normal-case text-foreground/45",children:["run ",d.runId.slice(0,8)]})]}),l.jsx("div",{className:`mt-1 break-words ${d.level==="error"?"text-destructive":"text-foreground/75"}`,children:d.message}),p&&l.jsx("pre",{className:"mt-1 whitespace-pre-wrap break-all text-[10px] text-muted-foreground",children:p})]},d.id)})]})})})}function qN({pr:t,config:r,healingSessions:o}){const i=NN(o,t.id),u=i?jN(i):null,d=u?Uh[u.tone]:Uh.neutral;return l.jsxs("div",{className:"shrink-0 border-b border-border px-4 py-3","data-testid":"panel-ci-healing",children:[l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{className:"min-w-0",children:[l.jsx("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground",children:"CI healing"}),l.jsx("div",{className:"mt-1 flex flex-wrap items-center gap-2",children:u?l.jsxs(l.Fragment,{children:[l.jsx("span",{className:`inline-flex border px-1.5 py-0.5 text-[11px] uppercase tracking-wider ${d}`,children:u.stateLabel}),l.jsx("span",{className:"text-[11px] text-muted-foreground",children:u.attemptSummary})]}):l.jsx("span",{className:"text-[11px] text-muted-foreground",children:r?.autoHealCI===!1?"Automatic CI healing is disabled in settings.":"No healing session yet for this PR."})})]}),i&&l.jsxs("span",{className:"shrink-0 text-[10px] text-muted-foreground",children:["head ",i.currentHeadSha.slice(0,7)]})]}),u?l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"mt-2 grid gap-1 text-[11px] text-muted-foreground",children:[u.reasonSummary&&l.jsxs("div",{children:["Reason: ",u.reasonSummary]}),l.jsx("div",{children:u.statusHint}),l.jsxs("div",{children:["Attempts: ",u.attemptSummary,i?.latestFingerprint?` · fingerprint ${i.latestFingerprint}`:""]})]}),u.actions.length>0&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:u.actions.map(p=>l.jsx("button",{type:"button",disabled:!0,title:p.hint,className:`border px-2 py-0.5 text-[10px] uppercase tracking-wider transition-colors ${p.available?"border-border text-foreground/70 hover:bg-muted":"border-border text-muted-foreground/60"} disabled:opacity-100`,children:p.label},p.label))}),l.jsx("div",{className:"mt-1 text-[10px] text-muted-foreground",children:"Operator controls are read-only until healing action endpoints are added."})]})]}):r?.autoHealCI!==!1&&l.jsx("div",{className:"mt-2 text-[11px] text-muted-foreground",children:"The watcher will create a healing session when a failing check is classified as healable."})]})}function YN({prId:t,prStatus:r,globalDrainMode:o}){const[i,u]=m.useState("ask");return m.useEffect(()=>{r==="error"&&u("activity")},[t,r]),l.jsxs("div",{className:"flex min-h-[24rem] w-full shrink-0 flex-col border-t border-border lg:min-h-0 lg:w-80 lg:border-l lg:border-t-0",children:[l.jsxs("div",{className:"flex border-b border-border",children:[l.jsx("button",{type:"button",onClick:()=>u("ask"),"data-testid":"tab-ask",className:`flex-1 px-3 py-2 text-[11px] uppercase tracking-wider transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-inset ${i==="ask"?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"}`,children:"Ask Agent"}),l.jsx("button",{type:"button",onClick:()=>u("activity"),"data-testid":"tab-activity",className:`flex-1 px-3 py-2 text-[11px] uppercase tracking-wider transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-inset ${i==="activity"?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"}`,children:"Activity"})]}),l.jsx("div",{className:"flex-1 overflow-hidden",children:i==="activity"?l.jsx(GN,{prId:t}):t?l.jsx(XN,{prId:t,globalDrainMode:o}):l.jsx("div",{className:"flex h-full items-center justify-center text-[12px] text-muted-foreground",children:"Select a PR to ask questions."})})]})}function XN({prId:t,globalDrainMode:r}){const[o,i]=m.useState(""),u=m.useRef(null),{data:d=[]}=et({queryKey:["/api/prs",t,"questions"],refetchInterval:2e3}),p=Je({mutationFn:g=>Ge("POST",`/api/prs/${t}/questions`,{question:g}).then(x=>x.json()),onSuccess:()=>{ye.invalidateQueries({queryKey:["/api/prs",t,"questions"]}),ye.invalidateQueries({queryKey:["/api/activities"]}),i("")}});m.useEffect(()=>{const g=u.current;g&&(g.scrollTop=g.scrollHeight)},[d.length,d[d.length-1]?.status]);const h=p.isPending||!o.trim()||r;return l.jsxs("div",{className:"flex h-full flex-col",children:[l.jsx("div",{className:"border-b border-border px-4 py-2 text-[11px] uppercase tracking-wider text-muted-foreground",children:"Ask Agent"}),l.jsx("div",{ref:u,className:"flex-1 overflow-y-auto p-4 space-y-3",children:d.length===0?l.jsx("span",{className:"text-[12px] text-muted-foreground",children:r?AN:"Ask questions about this PR — the agent will read activity logs, feedback, and status to answer."}):d.map(g=>l.jsxs("div",{className:"space-y-1.5","data-testid":`question-${g.id}`,children:[l.jsxs("div",{className:"text-[12px]",children:[l.jsx("span",{className:"font-medium text-foreground/90",children:"Q: "}),l.jsx("span",{className:"text-foreground/80",children:g.question})]}),g.status==="pending"||g.status==="answering"?l.jsx("div",{className:"text-[11px] text-muted-foreground animate-pulse",children:"Agent is thinking..."}):g.status==="error"?l.jsxs("div",{className:"text-[11px] text-destructive",children:["Error: ",g.error||"Unknown error"]}):l.jsx("div",{className:"text-[12px] leading-relaxed text-foreground/75 whitespace-pre-wrap border-l-2 border-border pl-3",children:g.answer}),l.jsxs("div",{className:"text-[10px] text-muted-foreground",children:[Lt(g.createdAt),g.answeredAt&&` — answered ${Lt(g.answeredAt)}`]})]},g.id))}),l.jsxs("form",{onSubmit:g=>{g.preventDefault(),h||p.mutate(o.trim())},className:"border-t border-border p-3",children:[l.jsxs("div",{className:"flex gap-2",children:[l.jsx("input",{type:"text",value:o,onChange:g=>i(g.target.value),placeholder:r?"Drain mode is enabled.":"Was the review done? Why did this fail?","aria-label":"Question for selected pull request",disabled:r,"data-testid":"input-question",className:"flex-1 border border-border bg-transparent px-2 py-1 text-[12px] placeholder:text-muted-foreground/50 focus:border-foreground focus:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background"}),l.jsx("button",{type:"submit",disabled:h,title:r?Ko:"Ask agent","data-testid":"button-ask",className:"border border-border px-2 py-1 text-[11px] uppercase tracking-wider transition-colors hover:bg-foreground hover:text-background focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-30",children:r?Di:p.isPending?"...":"Ask"})]}),p.isError&&l.jsx("div",{className:"mt-1 text-[11px] text-destructive",children:sx(p.error)})]})]})}function sx(t){if(!(t instanceof Error))return String(t);const r=t.message.replace(/^\d+:\s*/,"").trim();if(!r)return"Request failed";try{const o=JSON.parse(r);if(typeof o.error=="string")return o.error;if(typeof o.message=="string")return o.message}catch{}return r}function It(t,r){vt({variant:"destructive",title:t,description:sx(r)})}function ZN(){const[t,r]=m.useState(null),[o,i]=m.useState(""),[u,d]=m.useState(""),[p,h]=m.useState(null),[g,x]=m.useState(()=>{if(typeof window>"u")return!0;try{const H=window.localStorage.getItem(zh);return H===null?!0:H==="true"}catch{return!0}}),[v,w]=m.useState("mine"),[b,k]=m.useState("active");m.useEffect(()=>{if(!(typeof window>"u"))try{window.localStorage.setItem(zh,String(g))}catch{}},[g]);const{data:j=[],isLoading:C}=et({queryKey:["/api/prs"],refetchInterval:3e3}),{data:S=[],isLoading:E}=et({queryKey:["/api/prs/archived"],refetchInterval:1e4}),{data:_}=et({queryKey:["/api/config"],refetchInterval:5e3}),{data:O=[]}=et({queryKey:["/api/healing-sessions"],queryFn:async()=>vm("/api/healing-sessions"),refetchInterval:5e3}),{data:I=TN}=et({queryKey:["/api/activities"],refetchInterval:3e3}),{data:D}=et({queryKey:["/api/runtime"],refetchInterval:3e3}),{data:A=[]}=et({queryKey:["/api/repos/settings"],refetchInterval:5e3}),$=b==="active"?j:S,K=b==="archived";m.useEffect(()=>{if($.length===0){t!==null&&r(null);return}(!t||!$.some(H=>H.id===t))&&r($[0].id)},[$,t]);const Q=$.find(H=>H.id===t)??null,ee=Q?ex(Q):!0,ne=Q?Fh(I.failed,Q.id):void 0,Z=Q?.status==="error"?ne?.lastError??$h(Q)??"Automation stopped on this PR. Check the activity log for the full failure context.":null,de=gC(p,A.length),X=D?.drainMode===!0,ve=Je({mutationFn:async H=>(await Ge("POST","/api/prs",{url:H})).json(),onSuccess:H=>{ye.invalidateQueries({queryKey:["/api/prs"]}),ye.invalidateQueries({queryKey:["/api/activities"]}),ye.invalidateQueries({queryKey:["/api/repos/settings"]}),ye.invalidateQueries({queryKey:["/api/onboarding/status"]}),i(""),r(H.id)},onError:H=>{It("Could not add PR",H)}}),se=Je({mutationFn:async H=>(await Ge("POST",`/api/prs/${H}/apply`)).json(),onSuccess:()=>{ye.invalidateQueries({queryKey:["/api/prs"]}),ye.invalidateQueries({queryKey:["/api/activities"]}),ye.invalidateQueries({queryKey:["/api/logs"]})},onError:H=>{It("Could not run babysitter",H)}}),le=Je({mutationFn:async({id:H,enabled:ae})=>(await Ge("PATCH",`/api/prs/${H}/watch`,{enabled:ae})).json(),onSuccess:()=>{ye.invalidateQueries({queryKey:["/api/prs"]}),ye.invalidateQueries({queryKey:["/api/prs/archived"]}),ye.invalidateQueries({queryKey:["/api/logs"]})},onError:H=>{It("Could not update PR watch state",H)}}),z=Je({mutationFn:async H=>(await Ge("PATCH","/api/config",H)).json(),onSuccess:()=>{ye.invalidateQueries({queryKey:["/api/config"]}),ye.invalidateQueries({queryKey:["/api/onboarding/status"]})},onError:H=>{It("Could not update settings",H)}}),U=Je({mutationFn:async()=>(await Ge("POST","/api/repos/sync")).json(),onSuccess:()=>{ye.invalidateQueries({queryKey:["/api/prs"]}),ye.invalidateQueries({queryKey:["/api/activities"]}),ye.invalidateQueries({queryKey:["/api/repos/settings"]}),ye.invalidateQueries({queryKey:["/api/onboarding/status"]})},onError:H=>{It("Could not sync repositories",H)}}),q=Je({mutationFn:async()=>(await Ge("DELETE","/api/activities/failed")).json(),onSuccess:({cleared:H})=>{ye.invalidateQueries({queryKey:["/api/activities"]}),vt({description:H===1?"Cleared 1 failed activity.":`Cleared ${H} failed activities.`})},onError:H=>{It("Could not clear failed activities",H)}}),P=Je({mutationFn:async H=>(await Ge("POST","/api/repos/release",{repo:H})).json(),onSuccess:()=>{ye.invalidateQueries({queryKey:["/api/releases"]}),ye.invalidateQueries({queryKey:["/api/activities"]}),vt({description:"Release queued."})},onError:H=>{It("Could not create release",H)}}),B=async H=>(await Ge("PATCH","/api/repos/settings",H)).json(),ue=Je({mutationFn:B,onSuccess:()=>{ye.invalidateQueries({queryKey:["/api/repos/settings"]}),ye.invalidateQueries({queryKey:["/api/onboarding/status"]})},onError:H=>{It("Could not update repository settings",H)}}),me=Je({mutationFn:async({repo:H})=>(await Ge("POST","/api/repos",{repo:H})).json(),onSuccess:async(H,ae)=>{if(ye.invalidateQueries({queryKey:["/api/repos/settings"]}),ye.invalidateQueries({queryKey:["/api/prs"]}),ye.invalidateQueries({queryKey:["/api/onboarding/status"]}),d(""),w("mine"),ae.watchScope==="team")try{await B({repo:H.repo,ownPrsOnly:!1}),ye.invalidateQueries({queryKey:["/api/repos/settings"]})}catch(ce){It("Repository added, but could not update tracking scope",ce)}},onError:H=>{It("Could not watch repository",H)}});return l.jsxs("div",{className:"flex min-h-screen flex-col lg:h-screen lg:overflow-hidden",children:[l.jsx(Yo,{}),l.jsxs("header",{className:"flex shrink-0 flex-col gap-2 border-b border-border px-4 py-2.5 lg:flex-row lg:items-center lg:justify-between",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[l.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-label":"oh-my-pr",children:[l.jsx("rect",{x:"1",y:"1",width:"14",height:"14",stroke:"currentColor",strokeWidth:"1.5"}),l.jsx("path",{d:"M4 5h8M4 8h5M4 11h6",stroke:"currentColor",strokeWidth:"1"})]}),l.jsx("span",{className:"text-sm font-medium tracking-tight",children:"oh-my-pr"}),l.jsx("span",{className:"border border-border px-1.5 py-0 text-[10px] uppercase tracking-wider text-muted-foreground",children:"autonomous"}),l.jsxs("span",{className:"text-[11px] text-muted-foreground",children:["poll ",RN(_?.pollIntervalMs)]}),l.jsx(Dt,{href:"/changelogs",className:"text-[11px] text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:"changelogs"}),l.jsx(Dt,{href:"/releases",className:"text-[11px] text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:"releases"}),l.jsx(Dt,{href:"/logs",className:"text-[11px] text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:"logs"})]}),l.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[l.jsxs("span",{className:"text-[11px] text-muted-foreground",children:[j.length," PR",j.length!==1?"s":""," in ",A.length," repo",A.length!==1?"s":""]}),l.jsx("label",{htmlFor:"dashboard-coding-agent",className:"text-[11px] uppercase tracking-wider text-muted-foreground",children:"Agent"}),l.jsxs("select",{id:"dashboard-coding-agent",value:_?.codingAgent??"codex",onChange:H=>{const ae=H.target.value;z.mutate({codingAgent:ae})},disabled:z.isPending,"data-testid":"select-coding-agent",className:"border border-border bg-transparent px-2 py-0.5 text-[11px] focus:border-foreground focus:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-50",children:[l.jsx("option",{value:"codex",children:"codex"}),l.jsx("option",{value:"claude",children:"claude"})]}),l.jsx(Dt,{href:"/settings",className:"border border-border px-2 py-0.5 text-[11px] text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:"settings"}),l.jsx(UN,{activities:I,onClearFailed:()=>q.mutate(),isClearingFailed:q.isPending,globalDrainMode:X})]})]}),l.jsx(wC,{}),l.jsx(BN,{warnings:I.warnings}),l.jsx(HN,{runtimeState:D}),l.jsxs("div",{className:"flex flex-1 flex-col overflow-y-auto lg:flex-row lg:overflow-hidden",children:[l.jsxs("div",{className:"flex max-h-[42vh] w-full shrink-0 flex-col overflow-y-auto border-b border-border lg:max-h-none lg:min-h-0 lg:w-80 lg:border-b-0 lg:border-r",children:[l.jsxs("div",{className:"sticky top-0 z-10 flex shrink-0 border-b border-border bg-background",children:[l.jsxs("button",{type:"button",onClick:()=>k("active"),"data-testid":"tab-active",className:`flex-1 px-3 py-2 text-[11px] uppercase tracking-wider transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-inset ${b==="active"?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"}`,children:["Active (",j.length,")"]}),l.jsxs("button",{type:"button",onClick:()=>k("archived"),"data-testid":"tab-archived",className:`flex-1 px-3 py-2 text-[11px] uppercase tracking-wider transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-inset ${b==="archived"?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"}`,children:["Archived (",S.length,")"]})]}),!K&&l.jsxs(l.Fragment,{children:[l.jsxs(_i,{open:de,onOpenChange:h,className:"border-b border-border",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2 px-3 py-2 text-[11px] text-muted-foreground",children:[l.jsx("span",{children:A.length>0?"Add a PR or watch another repo.":"Add a PR or watch a repo. Sync and babysit start automatically."}),l.jsx(Oi,{asChild:!0,children:l.jsx("button",{type:"button","data-testid":"button-toggle-add-controls",className:"shrink-0 border border-border px-1.5 py-0.5 text-[10px] uppercase tracking-wider text-muted-foreground transition-colors hover:bg-foreground hover:text-background focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:de?"Hide":"Add"})})]}),l.jsxs(Ai,{children:[l.jsx("form",{onSubmit:H=>{H.preventDefault(),o.trim()&&ve.mutate(o.trim())},className:"border-t border-border p-3",children:l.jsxs("div",{className:"flex gap-2",children:[l.jsx("input",{type:"text",value:o,onChange:H=>i(H.target.value),placeholder:"github.com/owner/repo/pull/123","aria-label":"GitHub pull request URL","data-testid":"input-add-pr",className:"flex-1 border border-border bg-transparent px-2 py-1 text-[12px] placeholder:text-muted-foreground/50 focus:border-foreground focus:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background"}),l.jsx("button",{type:"submit",disabled:ve.isPending||!o.trim(),"data-testid":"button-add-pr",className:"border border-border px-2 py-1 text-[11px] uppercase tracking-wider transition-colors hover:bg-foreground hover:text-background focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-30",children:"Add"})]})}),l.jsxs("form",{onSubmit:H=>{H.preventDefault();const ae=u.trim();ae&&me.mutate({repo:ae,watchScope:v})},className:"border-t border-border p-3",children:[l.jsxs("div",{className:"flex gap-2",children:[l.jsx("input",{type:"text",value:u,onChange:H=>d(H.target.value),placeholder:"owner/repo","aria-label":"Repository owner and name","data-testid":"input-add-repo",className:"flex-1 border border-border bg-transparent px-2 py-1 text-[12px] placeholder:text-muted-foreground/50 focus:border-foreground focus:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background"}),l.jsx("button",{type:"submit",disabled:me.isPending||!u.trim(),"data-testid":"button-add-repo",className:"border border-border px-2 py-1 text-[11px] uppercase tracking-wider transition-colors hover:bg-foreground hover:text-background focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-30",children:"Watch"})]}),l.jsxs("div",{className:"mt-3",children:[l.jsx("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground",children:"Track automatically"}),l.jsx(Hh,{value:v,onChange:w,disabled:me.isPending,name:"watch-scope",testIdPrefix:"watch-scope"})]})]})]})]}),l.jsxs(_i,{open:g,onOpenChange:x,className:"border-b border-border",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2 p-3",children:[l.jsx(Oi,{asChild:!0,children:l.jsxs("button",{type:"button","data-testid":"button-toggle-tracked-repos","aria-label":g?"Collapse tracked repositories":"Expand tracked repositories",className:"flex min-w-0 items-center gap-1.5 text-[10px] uppercase tracking-wider text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:[l.jsx("span",{"aria-hidden":"true",children:g?"▾":"▸"}),l.jsx("span",{children:"Tracked repositories"}),!g&&A.length>0&&l.jsxs("span",{className:"text-muted-foreground/70",children:["(",A.length,")"]})]})}),l.jsx("button",{type:"button",onClick:()=>U.mutate(),disabled:U.isPending,"data-testid":"button-sync-repos",className:"border border-border px-1.5 py-0.5 text-[10px] uppercase tracking-wider text-muted-foreground transition-colors hover:bg-foreground hover:text-background focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-30",children:U.isPending?"Fetching...":"Fetch"})]}),l.jsx(Ai,{className:"px-3 pb-3",children:A.length===0?l.jsx("div",{className:"text-[11px] text-muted-foreground",children:"No repositories being watched yet."}):l.jsx("div",{className:"space-y-1 text-[12px]",children:A.map(H=>{const ae=P.isPending&&P.variables===H.repo;return l.jsxs("div",{className:"space-y-2 border border-border/60 px-2 py-2",children:[l.jsx("a",{href:mC(H.repo),target:"_blank",rel:"noopener noreferrer","data-testid":`tracked-repo-${H.repo.replace("/","-")}`,className:"min-w-0 break-all text-foreground/75 underline decoration-border underline-offset-2 transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:H.repo}),l.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-2",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground",children:"Track automatically"}),l.jsx(Hh,{value:IN(H.ownPrsOnly),onChange:ce=>ue.mutate({repo:H.repo,ownPrsOnly:ce==="mine"}),disabled:ue.isPending,name:`tracked-repo-scope-${H.repo}`,testIdPrefix:`tracked-repo-scope-${H.repo.replace("/","-")}`,compact:!0})]}),l.jsxs("div",{className:"flex shrink-0 flex-wrap items-center justify-end gap-2 self-end",children:[l.jsxs("label",{className:"flex items-center gap-1.5 text-[10px] uppercase tracking-wider text-muted-foreground",children:[l.jsx("input",{type:"checkbox",checked:H.autoCreateReleases,onChange:ce=>ue.mutate({repo:H.repo,autoCreateReleases:ce.target.checked}),disabled:ue.isPending,"data-testid":`tracked-repo-auto-release-${H.repo.replace("/","-")}`,className:"accent-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background"}),"Auto-release"]}),l.jsx("button",{type:"button",onClick:()=>P.mutate(H.repo),disabled:P.isPending||X,title:X?Ko:"Queue manual release","data-testid":`tracked-repo-manual-release-${H.repo.replace("/","-")}`,className:"border border-border px-1.5 py-0.5 text-[10px] uppercase tracking-wider text-muted-foreground transition-colors hover:bg-foreground hover:text-background focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-30",children:X?Di:ae?"Releasing...":"Release"})]})]})]},H.repo)})})})]})]}),l.jsx("div",{className:"flex-1",children:(K?E:C)?l.jsx("div",{className:"p-4 text-[12px] text-muted-foreground",children:"Loading..."}):$.length===0?l.jsx("div",{className:"p-4 text-[12px] text-muted-foreground",children:K?"No archived PRs. Closed PRs are archived automatically.":"No PRs tracked yet. Add a repository to watch or add a PR URL."}):$.map(H=>l.jsx(WN,{pr:H,isSelected:H.id===t,onSelect:r,failureMessage:H.status==="error"?Fh(I.failed,H.id)?.lastError??$h(H):null},H.id))})]}),l.jsx("div",{className:"flex min-h-[32rem] flex-1 flex-col overflow-hidden lg:min-h-0",children:Q?l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"shrink-0 border-b border-border px-4 py-3",children:[l.jsxs("div",{className:"mb-1 flex items-start justify-between gap-4",children:[l.jsxs("div",{className:"min-w-0",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsx(nx,{status:Q.status}),l.jsx("span",{className:"truncate font-medium",children:Q.title}),l.jsx(ox,{pr:Q}),!ee&&l.jsx(Vu,{}),l.jsxs("a",{href:Q.url,target:"_blank",rel:"noopener noreferrer",className:"shrink-0 text-[11px] text-muted-foreground underline decoration-border underline-offset-2 transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:[Q.repo,"#",Q.number]})]}),l.jsxs("div",{className:"mt-1 flex flex-wrap gap-x-4 gap-y-1 text-[11px] text-muted-foreground",children:[l.jsxs("span",{children:["status: ",tx(Q.status)]}),!ee&&l.jsx(Vu,{}),l.jsxs("span",{children:["feedback: ",hN(Q.feedbackItems)]}),Q.testsPassed!==null&&l.jsxs("span",{children:["tests: ",Q.testsPassed?"pass":"fail"]}),Q.lintPassed!==null&&l.jsxs("span",{children:["lint: ",Q.lintPassed?"pass":"fail"]}),Q.lastChecked&&l.jsxs("span",{children:["checked ",Lt(Q.lastChecked)]})]})]}),!K&&l.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[l.jsx("button",{type:"button",onClick:()=>se.mutate(Q.id),disabled:se.isPending||Q.status==="processing"||X,title:X?Ko:"Run babysitter now","data-testid":"button-apply",className:"border border-border px-2 py-0.5 text-[10px] uppercase tracking-wider transition-colors hover:bg-foreground hover:text-background focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-30",children:X?Di:Q.status==="processing"?"Running":"Run now"}),l.jsx("button",{type:"button",onClick:()=>le.mutate({id:Q.id,enabled:!ee}),disabled:le.isPending,"data-testid":"button-toggle-watch",className:"border border-border px-2 py-0.5 text-[10px] uppercase tracking-wider text-muted-foreground transition-colors hover:bg-foreground hover:text-background focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-30",children:ee?"Pause watch":"Resume watch"})]})]}),Zv(Q.feedbackItems)&&Q.status!=="processing"&&Li(Q.feedbackItems).inProgress===0&&l.jsx(rx,{href:Q.url,testId:"detail-ready-to-merge",label:"All comments resolved — ready to merge",hint:"Open PR on GitHub →",className:"mt-2 gap-2 px-3 py-1.5 text-[12px] tracking-wider",dotClassName:"h-2 w-2",hintClassName:"text-[11px] normal-case tracking-normal text-success-foreground/75"}),Z&&l.jsxs("div",{className:"mt-2 border border-destructive/40 bg-destructive/10 px-3 py-2 text-[12px] leading-5 text-destructive","data-testid":"selected-pr-error",children:[l.jsx("div",{className:"text-[10px] font-medium uppercase tracking-wider",children:"Automation error"}),l.jsx("div",{className:"mt-1 whitespace-pre-wrap break-words",children:Z})]}),l.jsx("div",{className:"text-[11px] text-muted-foreground",children:X?ON:ee?"Background watcher syncs GitHub feedback and pushes approved fixes automatically.":"Background watch is paused for this PR; manual runs still work."})]}),l.jsx(qN,{pr:Q,config:_,healingSessions:O}),l.jsx("div",{className:"flex-1 overflow-y-auto",children:Q.feedbackItems.length===0?l.jsx("div",{className:"p-4 text-[12px] text-muted-foreground",children:ee?"No feedback yet. The watcher will sync GitHub comments automatically.":"No feedback yet. Background watch is paused for this PR."}):l.jsx(QN,{items:Q.feedbackItems,prId:Q.id,readOnly:K,globalDrainMode:X})})]}):l.jsx("div",{className:"flex flex-1 items-center justify-center text-[12px] text-muted-foreground",children:"Select a PR from the left panel."})}),l.jsx(YN,{prId:t,prStatus:Q?.status??null,globalDrainMode:X})]})]})}function JN(t,r){return t?.drainMode?{label:"paused",className:"text-destructive"}:t?{label:"active",className:"text-muted-foreground"}:r?{label:"unavailable",className:"text-destructive"}:{label:"loading...",className:"text-muted-foreground"}}function ej(t){return t?.drainMode?"Resume":"Pause"}function tj(){const{data:t}=et({queryKey:["/api/config"]}),[r,o]=m.useState(""),[i,u]=m.useState(!1),[d,p]=m.useState("oh-my-pr"),h=t?.githubTokens??(t?.githubToken?[t.githubToken]:[]),g=t?.githubCommentAppName??"oh-my-pr";m.useEffect(()=>{p(g)},[g]);const x=E=>{S.mutate({githubTokens:E})},v=(E,_)=>{const O=[...h],[I]=O.splice(E,1);I&&(O.splice(_,0,I),x(O))},w=E=>{x(h.filter((_,O)=>O!==E))},{data:b,isError:k}=et({queryKey:["/api/runtime"],refetchInterval:5e3}),j=JN(b,k),C=Je({mutationFn:async E=>(await Ge("POST","/api/runtime/drain",E)).json(),onSuccess:(E,_)=>{ye.invalidateQueries({queryKey:["/api/runtime"]}),vt({description:_.enabled?"Automation paused. New runs are blocked; in-flight runs will finish.":"Automation resumed."})},onError:E=>{vt({variant:"destructive",description:`Failed to update drain mode: ${E.message}`})}}),S=Je({mutationFn:async E=>(await Ge("PATCH","/api/config",E)).json(),onSuccess:()=>{ye.invalidateQueries({queryKey:["/api/config"]}),ye.invalidateQueries({queryKey:["/api/onboarding/status"]}),vt({description:"Settings saved."})},onError:E=>{vt({variant:"destructive",description:`Failed to save: ${E.message}`})}});return l.jsxs("div",{className:"flex min-h-screen flex-col",children:[l.jsx(Yo,{}),l.jsx("header",{className:"flex shrink-0 items-center justify-between border-b border-border px-4 py-2.5",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(Dt,{href:"/",className:"text-[11px] text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:"← back"}),l.jsx("span",{className:"text-sm font-medium tracking-tight",children:"settings"})]})}),l.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:l.jsxs("div",{className:"mx-auto flex max-w-2xl flex-col gap-8",children:[l.jsxs("section",{children:[l.jsx("h2",{className:"mb-4 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Agent"}),l.jsxs("div",{className:"flex flex-col gap-4 rounded border border-border p-4",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{children:[l.jsx("label",{htmlFor:"settings-coding-agent",className:"text-sm",children:"Coding Agent"}),l.jsx("div",{className:"text-[11px] text-muted-foreground",children:"CLI agent used to apply fixes"})]}),l.jsxs("select",{id:"settings-coding-agent",value:t?.codingAgent??"codex",onChange:E=>{const _=E.target.value;S.mutate({codingAgent:_})},disabled:S.isPending,className:"border border-border bg-transparent px-2 py-1 text-sm focus:border-foreground focus:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-50",children:[l.jsx("option",{value:"codex",children:"codex"}),l.jsx("option",{value:"claude",children:"claude"})]})]}),l.jsxs("label",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-sm",children:"Fallback to next coding agent"}),l.jsx("div",{className:"text-[11px] text-muted-foreground",children:"If the configured agent cannot start or authenticate, retry the babysitter run with the other local agent."})]}),l.jsx("input",{type:"checkbox",checked:t?.fallbackToNextCodingAgent??!1,onChange:E=>S.mutate({fallbackToNextCodingAgent:E.target.checked}),disabled:S.isPending,className:"mt-1 h-4 w-4 accent-foreground","data-testid":"checkbox-fallback-to-next-coding-agent"})]})]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"mb-4 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Automation"}),l.jsxs("div",{className:"flex flex-col gap-4 rounded border border-border p-4",children:[l.jsxs("label",{className:"flex items-center justify-between gap-3 cursor-pointer",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-sm",children:"Auto-resolve conflicts"}),l.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Ask the agent to resolve merge conflicts when tracked PRs are not mergeable."})]}),l.jsx("input",{type:"checkbox",checked:t?.autoResolveMergeConflicts??!0,onChange:E=>S.mutate({autoResolveMergeConflicts:E.target.checked}),disabled:S.isPending,"data-testid":"checkbox-auto-resolve-conflicts",className:"h-4 w-4 accent-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background"})]}),l.jsxs("label",{className:"flex items-center justify-between gap-3 cursor-pointer",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-sm",children:"Auto-update docs"}),l.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Automatically assess whether tracked PRs need documentation updates."})]}),l.jsx("input",{type:"checkbox",checked:t?.autoUpdateDocs??!0,onChange:E=>S.mutate({autoUpdateDocs:E.target.checked}),disabled:S.isPending,"data-testid":"checkbox-auto-update-docs",className:"h-4 w-4 accent-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background"})]})]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"mb-4 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Tuning"}),l.jsxs("div",{className:"flex flex-col gap-4 rounded border border-border p-4",children:[l.jsx(_n,{label:"Max turns",description:"Maximum agent turns per feedback item",value:t?.maxTurns??15,onChange:E=>S.mutate({maxTurns:E}),disabled:S.isPending}),l.jsx(_n,{label:"Poll interval (ms)",description:"How often to check for new feedback",value:t?.pollIntervalMs??12e4,onChange:E=>S.mutate({pollIntervalMs:E}),disabled:S.isPending}),l.jsx(_n,{label:"Batch window (ms)",description:"Time to batch feedback before processing",value:t?.batchWindowMs??3e5,onChange:E=>S.mutate({batchWindowMs:E}),disabled:S.isPending}),l.jsx(_n,{label:"Max changes per run",description:"Limit on concurrent changes",value:t?.maxChangesPerRun??20,onChange:E=>S.mutate({maxChangesPerRun:E}),disabled:S.isPending})]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"mb-4 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"CI Healing"}),l.jsxs("div",{className:"flex flex-col gap-4 rounded border border-border p-4",children:[l.jsxs("div",{className:"flex items-center justify-between gap-3",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-sm",children:"Automatic CI healing"}),l.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Classify healable CI failures and run bounded repair attempts in isolated worktrees."})]}),l.jsx("input",{type:"checkbox","aria-label":"Automatic CI healing",checked:t?.autoHealCI??!1,onChange:E=>S.mutate({autoHealCI:E.target.checked}),disabled:S.isPending,className:"h-4 w-4 accent-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background"})]}),l.jsx(_n,{label:"Max healing attempts per session",description:"Upper bound on repair attempts for a single healing session",value:t?.maxHealingAttemptsPerSession??3,onChange:E=>S.mutate({maxHealingAttemptsPerSession:E}),disabled:S.isPending}),l.jsx(_n,{label:"Max healing attempts per fingerprint",description:"Cap retries for the same failure fingerprint",value:t?.maxHealingAttemptsPerFingerprint??2,onChange:E=>S.mutate({maxHealingAttemptsPerFingerprint:E}),disabled:S.isPending}),l.jsx(_n,{label:"Max concurrent healing runs",description:"How many healing runs can execute at once",value:t?.maxConcurrentHealingRuns??1,onChange:E=>S.mutate({maxConcurrentHealingRuns:E}),disabled:S.isPending}),l.jsx(_n,{label:"Healing cooldown (ms)",description:"Backoff before a cooldowned session can retry",value:t?.healingCooldownMs??3e5,onChange:E=>S.mutate({healingCooldownMs:E}),disabled:S.isPending})]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"mb-4 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Releases"}),l.jsx("div",{className:"flex flex-col gap-4 rounded border border-border p-4",children:l.jsxs("label",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-sm",children:"Automatic release creation"}),l.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Evaluate merged PRs and publish GitHub releases automatically when the agent decides they are release-worthy."})]}),l.jsx("input",{type:"checkbox",checked:t?.autoCreateReleases??!1,onChange:E=>S.mutate({autoCreateReleases:E.target.checked}),disabled:S.isPending,className:"mt-1 accent-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background","data-testid":"checkbox-auto-create-releases"})]})})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"mb-4 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Runtime"}),l.jsxs("div",{className:"flex flex-col gap-4 rounded border border-border p-4",children:[l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{className:"min-w-0",children:[l.jsx("div",{className:"text-sm",children:"Automation"}),l.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Drain mode blocks new agent runs. In-flight runs continue until they finish."}),l.jsx("div",{className:"mt-2 text-[11px]","aria-live":"polite","data-testid":"text-drain-status",children:l.jsx("span",{className:j.className,children:j.label})})]}),l.jsx("button",{type:"button",onClick:()=>C.mutate(b?.drainMode?{enabled:!1}:{enabled:!0,reason:"Manually paused via web settings"}),disabled:!b||C.isPending,"data-testid":"button-toggle-drain",className:"shrink-0 border border-border px-2 py-1 text-xs hover:bg-muted focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-50",children:ej(b)})]}),b?.drainMode&&(b.drainReason||b.drainRequestedAt)?l.jsxs("div",{className:"border-l-2 border-destructive bg-muted/30 px-3 py-2 text-[11px]",children:[b.drainReason?l.jsx("div",{className:"text-foreground",children:b.drainReason}):null,b.drainRequestedAt?l.jsxs("div",{className:"mt-1 text-muted-foreground",children:["since ",new Date(b.drainRequestedAt).toLocaleString()]}):null]}):null]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"mb-4 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"GitHub"}),l.jsxs("div",{className:"flex flex-col gap-4 rounded border border-border p-4",children:[l.jsxs("div",{className:"flex flex-col gap-3",children:[l.jsxs("div",{className:"flex items-center justify-between gap-3",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-sm",children:"Tokens"}),l.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Tried in order before GITHUB_TOKEN and gh auth."})]}),!i&&l.jsx("button",{type:"button",onClick:()=>u(!0),className:"border border-border px-2 py-1 text-xs hover:bg-muted focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:"add"})]}),h.length?l.jsx("div",{className:"flex flex-col gap-2",children:h.map((E,_)=>l.jsxs("div",{className:"flex items-center justify-between gap-3 border border-border px-2 py-1.5",children:[l.jsxs("div",{className:"min-w-0",children:[l.jsx("div",{className:"truncate font-mono text-xs",children:E}),l.jsxs("div",{className:"text-[10px] text-muted-foreground",children:["priority ",_+1]})]}),l.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[l.jsx("button",{type:"button",onClick:()=>v(_,_-1),disabled:_===0||S.isPending,className:"border border-border px-2 py-1 text-xs hover:bg-muted focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-50",children:"up"}),l.jsx("button",{type:"button",onClick:()=>v(_,_+1),disabled:_===h.length-1||S.isPending,className:"border border-border px-2 py-1 text-xs hover:bg-muted focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-50",children:"down"}),l.jsx("button",{type:"button",onClick:()=>w(_),disabled:S.isPending,className:"border border-border px-2 py-1 text-xs hover:bg-muted focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-50",children:"remove"})]})]},_))}):l.jsx("div",{className:"text-[11px] text-muted-foreground",children:"none configured"}),i?l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("input",{type:"password",value:r,onChange:E=>o(E.target.value),placeholder:"ghp_...","aria-label":"GitHub token",className:"min-w-0 flex-1 border border-border bg-transparent px-2 py-1 text-sm focus:border-foreground focus:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background"}),l.jsx("button",{type:"button",onClick:()=>{const E=r.trim();E&&(x([...h,E]),o(""),u(!1))},disabled:!r.trim()||S.isPending,className:"border border-border px-2 py-1 text-xs hover:bg-muted focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-50",children:"add"}),l.jsx("button",{type:"button",onClick:()=>{u(!1),o("")},className:"px-2 py-1 text-xs text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:"cancel"})]}):null]}),l.jsxs("div",{className:"flex flex-col gap-2",children:[l.jsx("label",{htmlFor:"settings-github-comment-app-name",className:"text-sm",children:"GitHub reply signature"}),l.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Replace the app name shown in public GitHub replies. Leave blank to remove it."}),l.jsx("input",{id:"settings-github-comment-app-name",type:"text",value:d,placeholder:"leave blank to remove",onChange:E=>p(E.target.value),onBlur:E=>{const _=E.target.value;_!==(t?.githubCommentAppName??"oh-my-pr")&&S.mutate({githubCommentAppName:_})},onKeyDown:E=>{E.key==="Enter"&&E.currentTarget.blur()},disabled:S.isPending,className:"w-full border border-border bg-transparent px-2 py-1 text-sm focus:border-foreground focus:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-50"})]}),l.jsxs("div",{className:"flex items-center justify-between gap-3",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-sm",children:"Repository links in PR comments"}),l.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Link the reply signature back to the project repository in agent-authored GitHub PR comments and footers."})]}),l.jsx("input",{type:"checkbox","aria-label":"Repository links in PR comments",checked:t?.includeRepositoryLinksInGitHubComments??!0,onChange:E=>S.mutate({includeRepositoryLinksInGitHubComments:E.target.checked}),disabled:S.isPending,className:"h-4 w-4 accent-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background"})]}),l.jsxs("div",{className:"flex items-center justify-between gap-3",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-sm",children:"GitHub progress replies"}),l.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Post public Accepted/running/completed status replies while the babysitter works on review comments."})]}),l.jsx("input",{type:"checkbox","aria-label":"GitHub progress replies",checked:t?.postGitHubProgressReplies??!1,onChange:E=>S.mutate({postGitHubProgressReplies:E.target.checked}),disabled:S.isPending,className:"h-4 w-4 accent-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background"})]}),l.jsxs("div",{children:[l.jsx("div",{className:"text-sm",children:"Trusted reviewers"}),l.jsx("div",{className:"text-[11px] text-muted-foreground",children:t?.trustedReviewers?.length?t.trustedReviewers.join(", "):"none configured"})]}),l.jsx(nj,{label:"Ignored bots",description:"Bot logins whose comments and reviews are ignored.",placeholder:"dependabot[bot]",values:t?.ignoredBots??[],onChange:E=>S.mutate({ignoredBots:E}),disabled:!t||S.isPending})]})]})]})})]})}function nj({label:t,description:r,placeholder:o,values:i,onChange:u,disabled:d}){const[p,h]=m.useState(""),g=`setting-${t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")}`,x=`${g}-description`,v=()=>{const b=p.trim(),k=b.toLowerCase();if(!b||i.some(j=>j.toLowerCase()===k)){h("");return}u([...i,b]),h("")},w=b=>{u(i.filter((k,j)=>j!==b))};return l.jsxs("div",{className:"flex flex-col gap-2",children:[l.jsxs("div",{className:"flex items-end gap-2",children:[l.jsxs("label",{htmlFor:g,className:"min-w-0 flex-1 cursor-pointer",children:[l.jsx("span",{className:"block text-sm",children:t}),l.jsx("span",{id:x,className:"block text-[11px] text-muted-foreground",children:r}),l.jsx("input",{id:g,type:"text",value:p,onChange:b=>h(b.target.value),onKeyDown:b=>{b.key==="Enter"&&(b.preventDefault(),v())},placeholder:o,disabled:d,"aria-describedby":x,className:"mt-2 w-full min-w-0 border border-border bg-transparent px-2 py-1 text-sm focus:border-foreground focus:outline-none disabled:opacity-50"})]}),l.jsx("button",{type:"button",onClick:v,disabled:!p.trim()||d,className:"border border-border px-2 py-1 text-xs hover:bg-muted disabled:opacity-50",children:"add"})]}),i.length?l.jsx("div",{className:"flex flex-wrap gap-1.5",children:i.map((b,k)=>l.jsxs("span",{className:"inline-flex items-center gap-1.5 border border-border px-2 py-0.5 font-mono text-xs",children:[b,l.jsx("button",{type:"button",onClick:()=>w(k),disabled:d,"aria-label":`Remove ${b}`,className:"text-muted-foreground hover:text-foreground disabled:opacity-50",children:"×"})]},b))}):l.jsx("div",{className:"text-[11px] text-muted-foreground",children:"none configured"})]})}function _n({label:t,description:r,value:o,onChange:i,disabled:u}){const d=`setting-${t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")}`,p=`${d}-description`;return l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{children:[l.jsx("label",{htmlFor:d,className:"text-sm",children:t}),l.jsx("div",{id:p,className:"text-[11px] text-muted-foreground",children:r})]}),l.jsx("input",{id:d,type:"number",value:o,onChange:h=>{const g=parseInt(h.target.value,10);isNaN(g)||i(g)},disabled:u,"aria-describedby":p,className:"w-28 border border-border bg-transparent px-2 py-1 text-right text-sm focus:border-foreground focus:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-50"})]})}function rj(t){return new Date(t).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}function oj(t){const r=t.match(/##\s*Twitter\/X\s*(?:Thread)?\n([\s\S]*?)(?=\n##\s|\s*$)/i),o=t.match(/##\s*LinkedIn\s*(?:\/\s*General)?\n([\s\S]*?)(?=\n##\s|\s*$)/i);return{twitter:r?r[1].trim():null,linkedin:o?o[1].trim():null}}function sj({text:t}){const[r,o]=m.useState(!1),i=async()=>{try{await navigator.clipboard.writeText(t),o(!0),setTimeout(()=>o(!1),2e3)}catch{}};return l.jsx("button",{type:"button",onClick:i,className:"border border-border px-2 py-0.5 text-[11px] uppercase tracking-wider text-muted-foreground hover:border-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:r?"copied":"copy"})}function Cu({title:t,content:r}){return l.jsxs("div",{className:"mt-4",children:[l.jsxs("div",{className:"mb-1.5 flex items-center justify-between",children:[l.jsx("span",{className:"text-[11px] uppercase tracking-wider text-muted-foreground",children:t}),l.jsx(sj,{text:r})]}),l.jsx("pre",{className:"whitespace-pre-wrap border border-border bg-background p-3 text-[12px] leading-relaxed font-mono",children:r})]})}function ij({status:t}){const r=t==="done"?"border-foreground/40 text-foreground":t==="generating"?"border-border text-muted-foreground animate-pulse":"border-destructive/40 text-destructive";return l.jsx("span",{className:`border px-1.5 py-0 text-[10px] uppercase tracking-wider ${r}`,children:t})}function aj({changelog:t}){const[r,o]=m.useState(!1),i=t.content?oj(t.content):null,u=`changelog-${t.id}-content`;return l.jsxs("div",{className:"border border-border",children:[l.jsxs("button",{type:"button",className:"flex w-full items-center justify-between px-4 py-3 text-left hover:bg-muted/30 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-inset disabled:cursor-default disabled:hover:bg-transparent",onClick:()=>t.status==="done"&&o(d=>!d),disabled:t.status!=="done","aria-expanded":t.status==="done"?r:void 0,"aria-controls":t.status==="done"?u:void 0,children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(ij,{status:t.status}),l.jsx("span",{className:"text-sm font-medium",children:rj(t.createdAt)}),l.jsxs("span",{className:"text-[11px] text-muted-foreground",children:[t.triggerCount," PR",t.triggerCount!==1?"s":""," merged"]}),l.jsx("span",{className:"text-[11px] text-muted-foreground",children:t.prSummaries.map(d=>`#${d.number}`).join(" · ")})]}),t.status==="done"&&l.jsx("span",{className:"text-[11px] text-muted-foreground",children:r?"Hide":"Show"})]}),r&&t.status==="done"&&l.jsxs("div",{id:u,className:"border-t border-border px-4 pb-4 pt-3",children:[t.error&&l.jsx("p",{className:"mb-3 text-[12px] text-destructive",children:t.error}),i?.twitter&&l.jsx(Cu,{title:"Twitter / X Thread",content:i.twitter}),i?.linkedin&&l.jsx(Cu,{title:"LinkedIn / General",content:i.linkedin}),!i?.twitter&&!i?.linkedin&&t.content&&l.jsx(Cu,{title:"Full output",content:t.content})]}),t.status==="error"&&t.error&&l.jsx("div",{className:"border-t border-border px-4 py-3",children:l.jsx("p",{className:"text-[12px] text-destructive",children:t.error})}),t.status==="generating"&&l.jsx("div",{className:"border-t border-border px-4 py-2.5",children:l.jsx("span",{className:"text-[11px] text-muted-foreground",children:"Generation was removed before this row completed."})})]})}function lj(){const{data:t=[],isLoading:r}=et({queryKey:["/api/changelogs"],refetchInterval:o=>o.state.data?.some(u=>u.status==="generating")?5e3:!1});return l.jsxs("div",{className:"flex min-h-screen flex-col",children:[l.jsx(Yo,{}),l.jsxs("header",{className:"flex shrink-0 items-center justify-between border-b border-border px-4 py-2.5",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-label":"oh-my-pr",children:[l.jsx("rect",{x:"1",y:"1",width:"14",height:"14",stroke:"currentColor",strokeWidth:"1.5"}),l.jsx("path",{d:"M4 5h8M4 8h5M4 11h6",stroke:"currentColor",strokeWidth:"1"})]}),l.jsx("span",{className:"text-sm font-medium tracking-tight",children:"oh-my-pr"}),l.jsx("span",{className:"border border-border px-1.5 py-0 text-[10px] uppercase tracking-wider text-muted-foreground",children:"changelogs"})]}),l.jsx(Dt,{href:"/",className:"text-[11px] text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:"← back to dashboard"})]}),l.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:l.jsxs("div",{className:"mx-auto max-w-3xl",children:[l.jsxs("div",{className:"mb-5",children:[l.jsx("h1",{className:"text-base font-medium",children:"Social Media Changelogs"}),l.jsx("p",{className:"mt-1 text-[12px] text-muted-foreground",children:"Historical generated posts from earlier versions."})]}),!r&&t.length===0&&l.jsxs("div",{className:"border border-border px-4 py-8 text-center",children:[l.jsx("p",{className:"text-sm text-muted-foreground",children:"No changelogs yet."}),l.jsx("p",{className:"mt-1 text-[12px] text-muted-foreground",children:"Social media changelog generation has been removed."})]}),r&&l.jsx("div",{className:"border border-border px-4 py-6 text-center",children:l.jsx("p",{className:"text-[12px] text-muted-foreground",children:"Loading…"})}),l.jsx("div",{className:"flex flex-col gap-2",children:t.map(o=>l.jsx(aj,{changelog:o},o.id))})]})})]})}const uj=new Set(["detected","evaluating","proposed","publishing"]);function ix(t){return uj.has(t)}function cj(t){return t==="published"||t==="skipped"||t==="error"}function dj(t){return typeof t=="object"&&t!==null&&"status"in t&&typeof t.status=="string"}function ku(t){if(!t)return"n/a";const r=new Date(t);return Number.isNaN(r.getTime())?"n/a":r.toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})}function fj(t){return t?t.slice(0,7):"n/a"}function pj({status:t}){const r=t==="published"?"border-foreground/40 text-foreground":t==="skipped"?"border-border text-muted-foreground":t==="error"?"border-destructive/40 text-destructive":ix(t)?"border-border text-muted-foreground animate-pulse":"border-border text-muted-foreground";return l.jsx("span",{className:`border px-1.5 py-0 text-[10px] uppercase tracking-wider ${r}`,children:t})}function hj({text:t}){const[r,o]=m.useState(!1),i=async()=>{try{await navigator.clipboard.writeText(t),o(!0),setTimeout(()=>o(!1),1500)}catch(u){const d=u instanceof Error?u.message:"Clipboard write failed";vt({variant:"destructive",description:`Failed to copy: ${d}`})}};return l.jsx("button",{type:"button",onClick:i,className:"border border-border px-2 py-0.5 text-[11px] uppercase tracking-wider text-muted-foreground hover:border-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:r?"copied":"copy"})}function mj({run:t,onRetry:r,retryPending:o}){const[i,u]=m.useState(!1),p=!(!!t.decisionReason||!!t.releaseTitle||!!t.releaseNotes||!!t.error||!!t.githubReleaseUrl||t.includedPrs.length>0)&&cj(t.status),h=`release-run-${t.id}-details`;return l.jsxs("div",{className:"border border-border",children:[l.jsxs("button",{type:"button",className:"flex w-full items-center justify-between px-4 py-3 text-left hover:bg-muted/30 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-inset",onClick:()=>u(g=>!g),"aria-expanded":i,"aria-controls":h,children:[l.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[l.jsx(pj,{status:t.status}),l.jsx("span",{className:"truncate text-sm font-medium",children:t.repo}),l.jsxs("span",{className:"text-[11px] text-muted-foreground",children:["#",t.triggerPrNumber]}),t.proposedVersion&&l.jsx("span",{className:"border border-border px-1.5 py-0 text-[10px] uppercase tracking-wider text-muted-foreground",children:t.proposedVersion}),!t.proposedVersion&&t.recommendedBump&&l.jsxs("span",{className:"text-[11px] text-muted-foreground",children:["bump ",t.recommendedBump]})]}),l.jsxs("div",{className:"flex items-center gap-3 text-[11px] text-muted-foreground",children:[l.jsx("span",{children:ku(t.createdAt)}),l.jsx("span",{children:i?"Hide":"Show"})]})]}),i&&l.jsxs("div",{id:h,className:"border-t border-border px-4 pb-4 pt-3",children:[l.jsxs("div",{className:"mb-3 text-[12px] text-muted-foreground",children:["Trigger PR:"," ",l.jsxs("a",{href:t.triggerPrUrl,target:"_blank",rel:"noreferrer noopener",className:"underline underline-offset-2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:["#",t.triggerPrNumber," ",t.triggerPrTitle]})]}),t.decisionReason&&l.jsx("p",{className:"mb-3 text-[12px] leading-relaxed",children:t.decisionReason}),t.releaseTitle&&l.jsxs("p",{className:"mb-3 text-[12px]",children:[l.jsx("span",{className:"text-muted-foreground",children:"Release title:"})," ",l.jsx("span",{children:t.releaseTitle})]}),l.jsxs("div",{className:"mb-3 grid grid-cols-1 gap-2 text-[12px] text-muted-foreground md:grid-cols-2",children:[l.jsxs("div",{children:["Base branch: ",t.baseBranch||"n/a"]}),l.jsxs("div",{children:["Trigger SHA: ",fj(t.triggerMergeSha)]}),l.jsxs("div",{children:["Merged at: ",ku(t.triggerMergedAt)]}),l.jsxs("div",{children:["Updated: ",ku(t.updatedAt)]})]}),t.includedPrs.length>0&&l.jsxs("div",{className:"mb-3",children:[l.jsxs("div",{className:"mb-1.5 text-[11px] uppercase tracking-wider text-muted-foreground",children:["Included PRs (",t.includedPrs.length,")"]}),l.jsx("div",{className:"space-y-1 border border-border p-3 text-[12px]",children:t.includedPrs.map(g=>l.jsxs("div",{className:"flex items-center justify-between gap-3",children:[l.jsxs("span",{className:"truncate",children:["#",g.number," ",g.title]}),l.jsx("a",{href:g.url,target:"_blank",rel:"noreferrer noopener",className:"text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:"open"})]},`${g.mergeSha}-${g.number}`))})]}),t.releaseNotes&&l.jsxs("div",{className:"mb-3",children:[l.jsxs("div",{className:"mb-1.5 flex items-center justify-between",children:[l.jsx("span",{className:"text-[11px] uppercase tracking-wider text-muted-foreground",children:"Release Notes"}),l.jsx(hj,{text:t.releaseNotes})]}),l.jsx("pre",{className:"whitespace-pre-wrap border border-border bg-background p-3 text-[12px] leading-relaxed font-mono",children:t.releaseNotes})]}),t.error&&l.jsx("div",{className:"mb-3 border border-destructive/40 bg-destructive/5 p-3 text-[12px] text-destructive",children:t.error}),l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[t.githubReleaseUrl&&l.jsx("a",{href:t.githubReleaseUrl,target:"_blank",rel:"noreferrer noopener",className:"border border-border px-2 py-1 text-[11px] uppercase tracking-wider text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:"open release"}),t.status==="error"&&l.jsx("button",{type:"button",onClick:()=>r(t.id),disabled:o,className:"border border-border px-2 py-1 text-[11px] uppercase tracking-wider text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-50",children:"retry"})]}),p&&l.jsx("p",{className:"mt-2 text-[12px] text-muted-foreground",children:"No details available yet."})]})]})}function gj(){const{data:t=[],isLoading:r}=et({queryKey:["/api/releases"],refetchInterval:i=>{const u=i.state.data;return Array.isArray(u)&&u.some(d=>dj(d)&&ix(d.status))?5e3:!1}}),o=Je({mutationFn:async i=>(await Ge("POST",`/api/releases/${i}/retry`)).json(),onSuccess:()=>{ye.invalidateQueries({queryKey:["/api/releases"]}),vt({description:"Retry queued."})},onError:i=>{vt({variant:"destructive",description:`Retry failed: ${i.message}`})}});return l.jsxs("div",{className:"flex min-h-screen flex-col",children:[l.jsx(Yo,{}),l.jsxs("header",{className:"flex shrink-0 items-center justify-between border-b border-border px-4 py-2.5",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-label":"Release Management",children:[l.jsx("rect",{x:"1",y:"1",width:"14",height:"14",stroke:"currentColor",strokeWidth:"1.5"}),l.jsx("path",{d:"M4 6h8M4 9h8M4 12h5",stroke:"currentColor",strokeWidth:"1"})]}),l.jsx("span",{className:"text-sm font-medium tracking-tight",children:"oh-my-pr"}),l.jsx("span",{className:"border border-border px-1.5 py-0 text-[10px] uppercase tracking-wider text-muted-foreground",children:"releases"})]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(Dt,{href:"/settings",className:"text-[11px] text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:"settings"}),l.jsx(Dt,{href:"/",className:"text-[11px] text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:"← back to dashboard"})]})]}),l.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:l.jsxs("div",{className:"mx-auto max-w-4xl",children:[l.jsxs("div",{className:"mb-5",children:[l.jsx("h1",{className:"text-base font-medium",children:"Release Management"}),l.jsx("p",{className:"mt-1 text-[12px] text-muted-foreground",children:"Every merged PR can trigger agent evaluation. This page shows release decisions, version bumps, notes, and publishing outcomes."})]}),r&&l.jsx("div",{className:"border border-border px-4 py-6 text-center",children:l.jsx("p",{className:"text-[12px] text-muted-foreground",children:"Loading…"})}),!r&&t.length===0&&l.jsxs("div",{className:"border border-border px-4 py-8 text-center",children:[l.jsx("p",{className:"text-sm text-muted-foreground",children:"No release runs yet."}),l.jsx("p",{className:"mt-1 text-[12px] text-muted-foreground",children:"Runs appear after merged PRs are evaluated for release-worthiness."})]}),l.jsx("div",{className:"flex flex-col gap-2",children:t.map(i=>l.jsx(mj,{run:i,onRetry:u=>o.mutate(u),retryPending:o.isPending},i.id))})]})})]})}const ax=["trace","debug","info","warn","error","fatal"],Bh={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},vj={trace:"text-muted-foreground",debug:"text-muted-foreground",info:"text-foreground",warn:"text-yellow-500",error:"text-red-500",fatal:"text-red-600 font-medium"};function xj(t){const r=new URLSearchParams(t),o=r.get("level")??"";return{level:ax.includes(o)?o:"",source:r.get("source")??"",search:r.get("q")??"",follow:r.get("follow")==="1"}}function lx(t){return new Date(t).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}function yj(t){const r=Object.keys(t.fields).length>0?" "+JSON.stringify(t.fields):"",o=t.source?` [${t.source}]`:"";return`${lx(t.time)} ${t.level.toUpperCase().padEnd(5)}${o} ${t.msg}${r}`}function Wh(t){return t.map(yj).join(`
|
|
49
|
+
`)}function xi(t){const r=new URLSearchParams(window.location.search);for(const[u,d]of Object.entries(t))d===""||d===!1||d===void 0?r.delete(u):d===!0?r.set(u,"1"):r.set(u,String(d));const o=r.toString(),i=new URL(window.location.href);i.search=o?`?${o}`:"",history.replaceState(history.state,"",i.href)}function wj(){const t=Lw(),r=m.useMemo(()=>xj(t),[t]),[o,i]=m.useState(r.level),[u,d]=m.useState(r.source),[p,h]=m.useState(r.search),[g,x]=m.useState(r.follow),[v,w]=m.useState([]),[b,k]=m.useState([]),[j,C]=m.useState(null),S=m.useRef([]);S.current=v;const E=m.useRef(null),_=m.useRef(g);_.current=g,m.useEffect(()=>{let A=!1;C(null);const $=new URLSearchParams;return o&&$.set("level",o),u&&$.set("source",u),p&&$.set("search",p),$.set("limit","1000"),vm(`/api/server-logs?${$.toString()}`).then(K=>{A||(w(K.records),k(K.sources))}).catch(K=>{A||C(K.message)}),()=>{A=!0}},[o,u,p]),m.useEffect(()=>{if(!g)return;const $=`/api/server-logs/stream?since=${S.current[S.current.length-1]?.seq??0}`,K=new EventSource($);return K.onmessage=Q=>{try{const ee=JSON.parse(Q.data);w(ne=>{if(ne.length>0&&ne[ne.length-1].seq>=ee.seq)return ne;const Z=[...ne,ee];return Z.length>5e3?Z.slice(Z.length-5e3):Z})}catch{}},K.onerror=()=>{C("Lost log stream connection — disable Follow tail and re-enable to retry")},()=>{K.close()}},[g]),m.useEffect(()=>{if(!g)return;const A=E.current;A&&(A.scrollTop=A.scrollHeight)},[v,g]),m.useEffect(()=>{xi({level:o})},[o]),m.useEffect(()=>{xi({source:u})},[u]),m.useEffect(()=>{xi({q:p})},[p]),m.useEffect(()=>{xi({follow:g})},[g]);const O=m.useMemo(()=>{let A=v;if(o){const $=Bh[o];A=A.filter(K=>Bh[K.level]>=$)}if(u&&(A=A.filter($=>$.source===u)),p){const $=p.toLowerCase();A=A.filter(K=>K.msg.toLowerCase().includes($)||JSON.stringify(K.fields).toLowerCase().includes($))}return A},[v,o,u,p]),I=async()=>{try{await navigator.clipboard.writeText(Wh(O))}catch{}},D=()=>{const A=new Blob([Wh(O)],{type:"text/plain"}),$=URL.createObjectURL(A),K=document.createElement("a");K.href=$,K.download=`oh-my-pr-logs-${new Date().toISOString().replace(/[:.]/g,"-")}.txt`,K.click(),URL.revokeObjectURL($)};return l.jsxs("div",{className:"flex h-screen flex-col",children:[l.jsx(Yo,{}),l.jsxs("header",{className:"flex shrink-0 items-center justify-between border-b border-border px-4 py-2.5",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-label":"oh-my-pr",children:[l.jsx("rect",{x:"1",y:"1",width:"14",height:"14",stroke:"currentColor",strokeWidth:"1.5"}),l.jsx("path",{d:"M4 5h8M4 8h5M4 11h6",stroke:"currentColor",strokeWidth:"1"})]}),l.jsx("span",{className:"text-sm font-medium tracking-tight",children:"oh-my-pr"}),l.jsx("span",{className:"border border-border px-1.5 py-0 text-[10px] uppercase tracking-wider text-muted-foreground",children:"logs"})]}),l.jsx(Dt,{href:"/",className:"text-[11px] text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:"← back to dashboard"})]}),l.jsxs("div",{className:"flex shrink-0 flex-wrap items-center gap-3 border-b border-border px-4 py-2 text-[11px]",children:[l.jsx("label",{htmlFor:"logs-level",className:"uppercase tracking-wider text-muted-foreground",children:"level"}),l.jsxs("select",{id:"logs-level",value:o,onChange:A=>i(A.target.value),className:"border border-border bg-transparent px-2 py-0.5 focus:border-foreground focus:outline-none focus-visible:ring-1 focus-visible:ring-ring",children:[l.jsx("option",{value:"",children:"all"}),ax.map(A=>l.jsx("option",{value:A,children:A},A))]}),l.jsx("label",{htmlFor:"logs-source",className:"uppercase tracking-wider text-muted-foreground",children:"source"}),l.jsxs("select",{id:"logs-source",value:u,onChange:A=>d(A.target.value),className:"border border-border bg-transparent px-2 py-0.5 focus:border-foreground focus:outline-none focus-visible:ring-1 focus-visible:ring-ring",children:[l.jsx("option",{value:"",children:"all"}),b.map(A=>l.jsx("option",{value:A,children:A},A))]}),l.jsx("input",{type:"search",value:p,onChange:A=>h(A.target.value),placeholder:"search…",className:"min-w-[180px] flex-1 border border-border bg-transparent px-2 py-0.5 focus:border-foreground focus:outline-none focus-visible:ring-1 focus-visible:ring-ring"}),l.jsxs("label",{className:"flex cursor-pointer items-center gap-1.5 uppercase tracking-wider text-muted-foreground",children:[l.jsx("input",{type:"checkbox",checked:g,onChange:A=>x(A.target.checked),className:"cursor-pointer"}),"follow tail"]}),l.jsxs("span",{className:"ml-auto text-muted-foreground",children:[O.length," of ",v.length]}),l.jsx("button",{type:"button",onClick:I,className:"border border-border px-2 py-0.5 uppercase tracking-wider text-muted-foreground hover:border-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",children:"copy"}),l.jsx("button",{type:"button",onClick:D,className:"border border-border px-2 py-0.5 uppercase tracking-wider text-muted-foreground hover:border-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",children:"download"})]}),j&&l.jsx("div",{className:"shrink-0 border-b border-red-500/40 bg-red-500/10 px-4 py-1 text-[11px] text-red-500",children:j}),l.jsx("div",{ref:E,className:"flex-1 overflow-y-auto p-3 font-mono text-[11px] leading-relaxed",children:O.length===0?l.jsx("div",{className:"text-center text-muted-foreground",children:"No log records match the current filter."}):O.map(A=>l.jsxs("div",{className:"flex gap-2 whitespace-pre-wrap break-all",children:[l.jsx("span",{className:"shrink-0 text-muted-foreground",children:lx(A.time)}),l.jsx("span",{className:`shrink-0 w-12 ${vj[A.level]}`,children:A.level}),A.source&&l.jsxs("span",{className:"shrink-0 text-muted-foreground",children:["[",A.source,"]"]}),l.jsxs("span",{className:`grow ${A.level==="error"||A.level==="fatal"?"text-destructive":""}`,children:[A.msg,Object.keys(A.fields).length>0&&l.jsxs("span",{className:"text-muted-foreground",children:[" ",JSON.stringify(A.fields)]})]})]},A.seq))})]})}const ux=m.forwardRef(({className:t,...r},o)=>l.jsx("div",{ref:o,className:De("shadcn-card rounded-xl border bg-card border-card-border text-card-foreground shadow-sm",t),...r}));ux.displayName="Card";const bj=m.forwardRef(({className:t,...r},o)=>l.jsx("div",{ref:o,className:De("flex flex-col space-y-1.5 p-6",t),...r}));bj.displayName="CardHeader";const Sj=m.forwardRef(({className:t,...r},o)=>l.jsx("div",{ref:o,className:De("text-2xl font-semibold leading-none tracking-tight",t),...r}));Sj.displayName="CardTitle";const Cj=m.forwardRef(({className:t,...r},o)=>l.jsx("div",{ref:o,className:De("text-sm text-muted-foreground",t),...r}));Cj.displayName="CardDescription";const cx=m.forwardRef(({className:t,...r},o)=>l.jsx("div",{ref:o,className:De("p-6 pt-0",t),...r}));cx.displayName="CardContent";const kj=m.forwardRef(({className:t,...r},o)=>l.jsx("div",{ref:o,className:De("flex items-center p-6 pt-0",t),...r}));kj.displayName="CardFooter";function Ej(){return l.jsx("div",{className:"min-h-screen w-full flex items-center justify-center bg-gray-50",children:l.jsx(ux,{className:"w-full max-w-md mx-4",children:l.jsxs(cx,{className:"pt-6",children:[l.jsxs("div",{className:"flex mb-4 gap-2",children:[l.jsx(H0,{className:"h-8 w-8 text-red-500"}),l.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"404 Page Not Found"})]}),l.jsx("p",{className:"mt-4 text-sm text-gray-600",children:"Did you forget to add the page to the router?"})]})})})}function Eu(t,r){try{const o=JSON.parse(t);if(typeof o.message=="string")return o.message;if(typeof o.error=="string")return o.error}catch{return t||r}return t||r}function Nj({children:t}){const[r,o]=m.useState(null),[i,u]=m.useState(""),[d,p]=m.useState(""),[h,g]=m.useState(null),[x,v]=m.useState(!1);m.useEffect(()=>{let b=!1;return fetch("/api/auth/status").then(async k=>{if(!k.ok)throw new Error(await k.text());return await k.json()}).then(k=>{b||o(k)}).catch(k=>{if(!b){const j=k instanceof Error?k.message:"";g(Eu(j,"Could not check login state."))}}),()=>{b=!0}},[]);async function w(b){b.preventDefault(),v(!0),g(null);try{const k=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:i,password:d})}),j=await k.text();if(!k.ok){g(Eu(j,"Login failed."));return}p("");try{o(JSON.parse(j))}catch{g(Eu(j,"Login failed."))}}finally{v(!1)}}return r?!r.requiresLogin||r.authenticated?l.jsx(l.Fragment,{children:t}):l.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4 text-foreground",children:l.jsxs("form",{className:"w-full max-w-sm border border-border bg-card p-5",onSubmit:w,children:[l.jsxs("div",{className:"mb-5 space-y-1",children:[l.jsx("p",{className:"text-[10px] uppercase text-muted-foreground",children:"Remote access"}),l.jsx("h1",{className:"text-base font-semibold",children:"Sign in to oh-my-pr"})]}),r.loginConfigured?l.jsxs(l.Fragment,{children:[l.jsxs("label",{className:"mb-3 block text-xs",children:[l.jsx("span",{className:"mb-1 block text-muted-foreground",children:"Username"}),l.jsx("input",{className:"w-full border border-input bg-background px-3 py-2 text-sm text-foreground outline-none focus:border-ring",autoComplete:"username",value:i,onChange:b=>u(b.target.value)})]}),l.jsxs("label",{className:"mb-4 block text-xs",children:[l.jsx("span",{className:"mb-1 block text-muted-foreground",children:"Password"}),l.jsx("input",{className:"w-full border border-input bg-background px-3 py-2 text-sm text-foreground outline-none focus:border-ring",autoComplete:"current-password",type:"password",value:d,onChange:b=>p(b.target.value)})]}),h&&l.jsx("div",{className:"mb-4 border border-destructive bg-background p-3 text-xs text-destructive",children:h}),l.jsx("button",{className:"w-full border border-primary bg-primary px-3 py-2 text-sm font-medium text-primary-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:x,type:"submit",children:x?"Signing in":"Sign in"})]}):l.jsx("div",{className:"border border-warning-border bg-warning-muted p-3 text-xs text-warning-foreground",children:"Remote login is not configured on this server."})]})}):l.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4 text-foreground",children:l.jsx("div",{className:"border border-border px-4 py-3 text-xs uppercase text-muted-foreground",children:h??"Loading oh-my-pr"})})}function jj(){return l.jsxs(Fw,{children:[l.jsx(_r,{path:"/",component:ZN}),l.jsx(_r,{path:"/settings",component:tj}),l.jsx(_r,{path:"/changelogs",component:lj}),l.jsx(_r,{path:"/releases",component:gj}),l.jsx(_r,{path:"/logs",component:wj}),l.jsx(_r,{component:Ej})]})}function Rj(){return l.jsx(jb,{attribute:"class",defaultTheme:"system",enableSystem:!0,children:l.jsx(fb,{client:ye,children:l.jsxs(uC,{children:[l.jsx(N1,{}),l.jsx(Nj,{children:l.jsx(rm,{hook:sm,children:l.jsx(jj,{})})})]})})})}function Pj(t){const r=new URL(t),o=r.hash,i=o.indexOf("?");if(i===-1)return null;const u=new URLSearchParams(r.search);return new URLSearchParams(o.slice(i)).forEach((p,h)=>{u.set(h.toLowerCase(),p)}),r.hash=o.slice(0,i),r.search=u.toString(),r.href}const Tj="modulepreload",_j=function(t,r){return new URL(t,r).href},Kh={},Oj=function(r,o,i){let u=Promise.resolve();if(o&&o.length>0){let x=function(v){return Promise.all(v.map(w=>Promise.resolve(w).then(b=>({status:"fulfilled",value:b}),b=>({status:"rejected",reason:b}))))};const p=document.getElementsByTagName("link"),h=document.querySelector("meta[property=csp-nonce]"),g=h?.nonce||h?.getAttribute("nonce");u=x(o.map(v=>{if(v=_j(v,i),v in Kh)return;Kh[v]=!0;const w=v.endsWith(".css"),b=w?'[rel="stylesheet"]':"";if(i)for(let j=p.length-1;j>=0;j--){const C=p[j];if(C.href===v&&(!w||C.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${v}"]${b}`))return;const k=document.createElement("link");if(k.rel=w?"stylesheet":Tj,w||(k.as="script"),k.crossOrigin="",k.href=v,g&&k.setAttribute("nonce",g),document.head.appendChild(k),w)return new Promise((j,C)=>{k.addEventListener("load",j),k.addEventListener("error",()=>C(new Error(`Unable to preload CSS for ${v}`)))})}))}function d(p){const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=p,window.dispatchEvent(h),!h.defaultPrevented)throw p}return u.then(p=>{for(const h of p||[])h.status==="rejected"&&d(h.reason);return r().catch(d)})};function Aj(){return typeof window<"u"&&"__TAURI_INTERNALS__"in window}let Io=null;function Mj(t,r){try{const o=new URL(t,r);return o.protocol==="mailto:"||o.protocol==="tel:"?o.href:o.protocol!=="http:"&&o.protocol!=="https:"||o.origin===new URL(r).origin?null:o.href}catch{return null}}function Ij(t){return t instanceof Element?t.closest("a[href]"):null}async function Lj(t){const{invoke:r}=await Oj(async()=>{const{invoke:o}=await import("./core-DV6XEvTN.js");return{invoke:o}},[],import.meta.url);await r("plugin:shell|open",{path:t})}function Dj(t,r,o={}){if(t.defaultPrevented||t.button!==0)return!1;const i=(o.findAnchor??Ij)(t.target);if(!i||i.hasAttribute("download"))return!1;const u=o.currentHref??window.location.href,d=Mj(i.href,u);return d?(t.preventDefault(),Promise.resolve(r(d)).catch(p=>{console.warn("Failed to open external link in Tauri",p)}),!0):!1}function Fj(){if(!Aj()||typeof document>"u")return()=>{};if(Io)return Io;const t=r=>{Dj(r,Lj)};return document.addEventListener("click",t,!0),Io=()=>{document.removeEventListener("click",t,!0),Io=null},Io}Fj();{const t=Pj(window.location.href);t&&history.replaceState(history.state,"",t)}window.location.hash||(window.location.hash="#/");mw.createRoot(document.getElementById("root")).render(l.jsx(Rj,{}));
|