oh-my-pr 4.3.4 → 4.3.6
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.
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
function nw(t,r){for(var s=0;s<r.length;s++){const i=r[s];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 s(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=s(u);fetch(u.href,d)}})();function Uh(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Kl={exports:{}},Oo={},Wl={exports:{}},we={};var wp;function rw(){if(wp)return we;wp=1;var t=Symbol.for("react.element"),r=Symbol.for("react.portal"),s=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"),v=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),w=Symbol.iterator;function b(R){return R===null||typeof R!="object"?null:(R=w&&R[w]||R["@@iterator"],typeof R=="function"?R:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,S={};function E(R,B,ue){this.props=R,this.context=B,this.refs=S,this.updater=ue||C}E.prototype.isReactComponent={},E.prototype.setState=function(R,B){if(typeof R!="object"&&typeof R!="function"&&R!=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,R,B,"setState")},E.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function P(){}P.prototype=E.prototype;function A(R,B,ue){this.props=R,this.context=B,this.refs=S,this.updater=ue||C}var _=A.prototype=new P;_.constructor=A,k(_,E.prototype),_.isPureReactComponent=!0;var L=Array.isArray,D=Object.prototype.hasOwnProperty,O={current:null},$={key:!0,ref:!0,__self:!0,__source:!0};function W(R,B,ue){var me,z={},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)&&(z[me]=B[me]);var be=arguments.length-2;if(be===1)z.children=ue;else if(1<be){for(var Ee=Array(be),tt=0;tt<be;tt++)Ee[tt]=arguments[tt+2];z.children=Ee}if(R&&R.defaultProps)for(me in be=R.defaultProps,be)z[me]===void 0&&(z[me]=be[me]);return{$$typeof:t,type:R,key:ae,ref:ce,props:z,_owner:O.current}}function Q(R,B){return{$$typeof:t,type:R.type,key:B,ref:R.ref,props:R.props,_owner:R._owner}}function ee(R){return typeof R=="object"&&R!==null&&R.$$typeof===t}function ne(R){var B={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(ue){return B[ue]})}var Z=/\/+/g;function de(R,B){return typeof R=="object"&&R!==null&&R.key!=null?ne(""+R.key):B.toString(36)}function X(R,B,ue,me,z){var ae=typeof R;(ae==="undefined"||ae==="boolean")&&(R=null);var ce=!1;if(R===null)ce=!0;else switch(ae){case"string":case"number":ce=!0;break;case"object":switch(R.$$typeof){case t:case r:ce=!0}}if(ce)return ce=R,z=z(ce),R=me===""?"."+de(ce,0):me,L(z)?(ue="",R!=null&&(ue=R.replace(Z,"$&/")+"/"),X(z,B,ue,"",function(tt){return tt})):z!=null&&(ee(z)&&(z=Q(z,ue+(!z.key||ce&&ce.key===z.key?"":(""+z.key).replace(Z,"$&/")+"/")+R)),B.push(z)),1;if(ce=0,me=me===""?".":me+":",L(R))for(var be=0;be<R.length;be++){ae=R[be];var Ee=me+de(ae,be);ce+=X(ae,B,ue,Ee,z)}else if(Ee=b(R),typeof Ee=="function")for(R=Ee.call(R),be=0;!(ae=R.next()).done;)ae=ae.value,Ee=me+de(ae,be++),ce+=X(ae,B,ue,Ee,z);else if(ae==="object")throw B=String(R),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.");return ce}function ve(R,B,ue){if(R==null)return R;var me=[],z=0;return X(R,me,"","",function(ae){return B.call(ue,ae,z++)}),me}function se(R){if(R._status===-1){var B=R._result;B=B(),B.then(function(ue){(R._status===0||R._status===-1)&&(R._status=1,R._result=ue)},function(ue){(R._status===0||R._status===-1)&&(R._status=2,R._result=ue)}),R._status===-1&&(R._status=0,R._result=B)}if(R._status===1)return R._result.default;throw R._result}var le={current:null},U={transition:null},H={ReactCurrentDispatcher:le,ReactCurrentBatchConfig:U,ReactCurrentOwner:O};function q(){throw Error("act(...) is not supported in production builds of React.")}return we.Children={map:ve,forEach:function(R,B,ue){ve(R,function(){B.apply(this,arguments)},ue)},count:function(R){var B=0;return ve(R,function(){B++}),B},toArray:function(R){return ve(R,function(B){return B})||[]},only:function(R){if(!ee(R))throw Error("React.Children.only expected to receive a single React element child.");return R}},we.Component=E,we.Fragment=s,we.Profiler=u,we.PureComponent=A,we.StrictMode=i,we.Suspense=g,we.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=H,we.act=q,we.cloneElement=function(R,B,ue){if(R==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+R+".");var me=k({},R.props),z=R.key,ae=R.ref,ce=R._owner;if(B!=null){if(B.ref!==void 0&&(ae=B.ref,ce=O.current),B.key!==void 0&&(z=""+B.key),R.type&&R.type.defaultProps)var be=R.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:R.type,key:z,ref:ae,props:me,_owner:ce}},we.createContext=function(R){return R={$$typeof:p,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},R.Provider={$$typeof:d,_context:R},R.Consumer=R},we.createElement=W,we.createFactory=function(R){var B=W.bind(null,R);return B.type=R,B},we.createRef=function(){return{current:null}},we.forwardRef=function(R){return{$$typeof:h,render:R}},we.isValidElement=ee,we.lazy=function(R){return{$$typeof:y,_payload:{_status:-1,_result:R},_init:se}},we.memo=function(R,B){return{$$typeof:v,type:R,compare:B===void 0?null:B}},we.startTransition=function(R){var B=U.transition;U.transition={};try{R()}finally{U.transition=B}},we.unstable_act=q,we.useCallback=function(R,B){return le.current.useCallback(R,B)},we.useContext=function(R){return le.current.useContext(R)},we.useDebugValue=function(){},we.useDeferredValue=function(R){return le.current.useDeferredValue(R)},we.useEffect=function(R,B){return le.current.useEffect(R,B)},we.useId=function(){return le.current.useId()},we.useImperativeHandle=function(R,B,ue){return le.current.useImperativeHandle(R,B,ue)},we.useInsertionEffect=function(R,B){return le.current.useInsertionEffect(R,B)},we.useLayoutEffect=function(R,B){return le.current.useLayoutEffect(R,B)},we.useMemo=function(R,B){return le.current.useMemo(R,B)},we.useReducer=function(R,B,ue){return le.current.useReducer(R,B,ue)},we.useRef=function(R){return le.current.useRef(R)},we.useState=function(R){return le.current.useState(R)},we.useSyncExternalStore=function(R,B,ue){return le.current.useSyncExternalStore(R,B,ue)},we.useTransition=function(){return le.current.useTransition()},we.version="18.3.1",we}var bp;function Ai(){return bp||(bp=1,Wl.exports=rw()),Wl.exports}var Sp;function ow(){if(Sp)return Oo;Sp=1;var t=Ai(),r=Symbol.for("react.element"),s=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,v){var y,w={},b=null,C=null;v!==void 0&&(b=""+v),g.key!==void 0&&(b=""+g.key),g.ref!==void 0&&(C=g.ref);for(y in g)i.call(g,y)&&!d.hasOwnProperty(y)&&(w[y]=g[y]);if(h&&h.defaultProps)for(y in g=h.defaultProps,g)w[y]===void 0&&(w[y]=g[y]);return{$$typeof:r,type:h,key:b,ref:C,props:w,_owner:u.current}}return Oo.Fragment=s,Oo.jsx=p,Oo.jsxs=p,Oo}var Cp;function sw(){return Cp||(Cp=1,Kl.exports=ow()),Kl.exports}var l=sw(),ui={},Vl={exports:{}},dt={},Ql={exports:{}},Gl={};var kp;function iw(){return kp||(kp=1,(function(t){function r(U,H){var q=U.length;U.push(H);e:for(;0<q;){var R=q-1>>>1,B=U[R];if(0<u(B,H))U[R]=H,U[q]=B,q=R;else break e}}function s(U){return U.length===0?null:U[0]}function i(U){if(U.length===0)return null;var H=U[0],q=U.pop();if(q!==H){U[0]=q;e:for(var R=0,B=U.length,ue=B>>>1;R<ue;){var me=2*(R+1)-1,z=U[me],ae=me+1,ce=U[ae];if(0>u(z,q))ae<B&&0>u(ce,z)?(U[R]=ce,U[ae]=q,R=ae):(U[R]=z,U[me]=q,R=me);else if(ae<B&&0>u(ce,q))U[R]=ce,U[ae]=q,R=ae;else break e}}return H}function u(U,H){var q=U.sortIndex-H.sortIndex;return q!==0?q:U.id-H.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=[],v=[],y=1,w=null,b=3,C=!1,k=!1,S=!1,E=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _(U){for(var H=s(v);H!==null;){if(H.callback===null)i(v);else if(H.startTime<=U)i(v),H.sortIndex=H.expirationTime,r(g,H);else break;H=s(v)}}function L(U){if(S=!1,_(U),!k)if(s(g)!==null)k=!0,se(D);else{var H=s(v);H!==null&&le(L,H.startTime-U)}}function D(U,H){k=!1,S&&(S=!1,P(W),W=-1),C=!0;var q=b;try{for(_(H),w=s(g);w!==null&&(!(w.expirationTime>H)||U&&!ne());){var R=w.callback;if(typeof R=="function"){w.callback=null,b=w.priorityLevel;var B=R(w.expirationTime<=H);H=t.unstable_now(),typeof B=="function"?w.callback=B:w===s(g)&&i(g),_(H)}else i(g);w=s(g)}if(w!==null)var ue=!0;else{var me=s(v);me!==null&&le(L,me.startTime-H),ue=!1}return ue}finally{w=null,b=q,C=!1}}var O=!1,$=null,W=-1,Q=5,ee=-1;function ne(){return!(t.unstable_now()-ee<Q)}function Z(){if($!==null){var U=t.unstable_now();ee=U;var H=!0;try{H=$(!0,U)}finally{H?de():(O=!1,$=null)}}else O=!1}var de;if(typeof A=="function")de=function(){A(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(){E(Z,0)};function se(U){$=U,O||(O=!0,de())}function le(U,H){W=E(function(){U(t.unstable_now())},H)}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(U){U.callback=null},t.unstable_continueExecution=function(){k||C||(k=!0,se(D))},t.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Q=0<U?Math.floor(1e3/U):5},t.unstable_getCurrentPriorityLevel=function(){return b},t.unstable_getFirstCallbackNode=function(){return s(g)},t.unstable_next=function(U){switch(b){case 1:case 2:case 3:var H=3;break;default:H=b}var q=b;b=H;try{return U()}finally{b=q}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(U,H){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var q=b;b=U;try{return H()}finally{b=q}},t.unstable_scheduleCallback=function(U,H,q){var R=t.unstable_now();switch(typeof q=="object"&&q!==null?(q=q.delay,q=typeof q=="number"&&0<q?R+q:R):q=R,U){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,U={id:y++,callback:H,priorityLevel:U,startTime:q,expirationTime:B,sortIndex:-1},q>R?(U.sortIndex=q,r(v,U),s(g)===null&&U===s(v)&&(S?(P(W),W=-1):S=!0,le(L,q-R))):(U.sortIndex=B,r(g,U),k||C||(k=!0,se(D))),U},t.unstable_shouldYield=ne,t.unstable_wrapCallback=function(U){var H=b;return function(){var q=b;b=H;try{return U.apply(this,arguments)}finally{b=q}}}})(Gl)),Gl}var Ep;function aw(){return Ep||(Ep=1,Ql.exports=iw()),Ql.exports}var Np;function lw(){if(Np)return dt;Np=1;var t=Ai(),r=aw();function s(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,o=1;o<arguments.length;o++)n+="&args[]="+encodeURIComponent(arguments[o]);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,v=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,y={},w={};function b(e){return g.call(w,e)?!0:g.call(y,e)?!1:v.test(e)?w[e]=!0:(y[e]=!0,!1)}function C(e,n,o,a){if(o!==null&&o.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return a?!1:o!==null?!o.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function k(e,n,o,a){if(n===null||typeof n>"u"||C(e,n,o,a))return!0;if(a)return!1;if(o!==null)switch(o.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 S(e,n,o,a,c,f,x){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=a,this.attributeNamespace=c,this.mustUseProperty=o,this.propertyName=e,this.type=n,this.sanitizeURL=f,this.removeEmptyString=x}var E={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){E[e]=new S(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];E[n]=new S(n,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){E[e]=new S(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){E[e]=new S(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){E[e]=new S(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){E[e]=new S(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){E[e]=new S(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){E[e]=new S(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){E[e]=new S(e,5,!1,e.toLowerCase(),null,!1,!1)});var P=/[\-:]([a-z])/g;function A(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(P,A);E[n]=new S(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(P,A);E[n]=new S(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(P,A);E[n]=new S(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){E[e]=new S(e,1,!1,e.toLowerCase(),null,!1,!1)}),E.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){E[e]=new S(e,1,!1,e.toLowerCase(),null,!0,!0)});function _(e,n,o,a){var c=E.hasOwnProperty(n)?E[n]:null;(c!==null?c.type!==0:a||!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(k(n,o,c,a)&&(o=null),a||c===null?b(n)&&(o===null?e.removeAttribute(n):e.setAttribute(n,""+o)):c.mustUseProperty?e[c.propertyName]=o===null?c.type===3?!1:"":o:(n=c.attributeName,a=c.attributeNamespace,o===null?e.removeAttribute(n):(c=c.type,o=c===3||c===4&&o===!0?"":""+o,a?e.setAttributeNS(a,n,o):e.setAttribute(n,o))))}var L=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,D=Symbol.for("react.element"),O=Symbol.for("react.portal"),$=Symbol.for("react.fragment"),W=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"),U=Symbol.iterator;function H(e){return e===null||typeof e!="object"?null:(e=U&&e[U]||e["@@iterator"],typeof e=="function"?e:null)}var q=Object.assign,R;function B(e){if(R===void 0)try{throw Error()}catch(o){var n=o.stack.trim().match(/\n( *(at )?)/);R=n&&n[1]||""}return`
|
|
2
|
+
`+R+e}var ue=!1;function me(e,n){if(!e||ue)return"";ue=!0;var o=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
|
+
`),x=c.length-1,N=f.length-1;1<=x&&0<=N&&c[x]!==f[N];)N--;for(;1<=x&&0<=N;x--,N--)if(c[x]!==f[N]){if(x!==1||N!==1)do if(x--,N--,0>N||c[x]!==f[N]){var j=`
|
|
5
|
+
`+c[x].replace(" at new "," at ");return e.displayName&&j.includes("<anonymous>")&&(j=j.replace("<anonymous>",e.displayName)),j}while(1<=x&&0<=N);break}}}finally{ue=!1,Error.prepareStackTrace=o}return(e=e?e.displayName||e.name:"")?B(e):""}function z(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 O:return"Portal";case Q:return"Profiler";case W: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===W?"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",o=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),a=""+e[n];if(!e.hasOwnProperty(n)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var c=o.get,f=o.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return c.call(this)},set:function(x){a=""+x,f.call(this,x)}}),Object.defineProperty(e,n,{enumerable:o.enumerable}),{getValue:function(){return a},setValue:function(x){a=""+x},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 o=n.getValue(),a="";return e&&(a=Ee(e)?e.checked?"true":"false":e.value),e=a,e!==o?(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 Xi(e,n){var o=n.checked;return q({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:o??e._wrapperState.initialChecked})}function Nc(e,n){var o=n.defaultValue==null?"":n.defaultValue,a=n.checked!=null?n.checked:n.defaultChecked;o=be(n.value!=null?n.value:o),e._wrapperState={initialChecked:a,initialValue:o,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function jc(e,n){n=n.checked,n!=null&&_(e,"checked",n,!1)}function Zi(e,n){jc(e,n);var o=be(n.value),a=n.type;if(o!=null)a==="number"?(o===0&&e.value===""||e.value!=o)&&(e.value=""+o):e.value!==""+o&&(e.value=""+o);else if(a==="submit"||a==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?Ji(e,n.type,o):n.hasOwnProperty("defaultValue")&&Ji(e,n.type,be(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function Rc(e,n,o){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,o||n===e.value||(e.value=n),e.defaultValue=n}o=e.name,o!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,o!==""&&(e.name=o)}function Ji(e,n,o){(n!=="number"||Yt(e.ownerDocument)!==e)&&(o==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+o&&(e.defaultValue=""+o))}var Vr=Array.isArray;function ir(e,n,o,a){if(e=e.options,n){n={};for(var c=0;c<o.length;c++)n["$"+o[c]]=!0;for(o=0;o<e.length;o++)c=n.hasOwnProperty("$"+e[o].value),e[o].selected!==c&&(e[o].selected=c),c&&a&&(e[o].defaultSelected=!0)}else{for(o=""+be(o),n=null,c=0;c<e.length;c++){if(e[c].value===o){e[c].selected=!0,a&&(e[c].defaultSelected=!0);return}n!==null||e[c].disabled||(n=e[c])}n!==null&&(n.selected=!0)}}function ea(e,n){if(n.dangerouslySetInnerHTML!=null)throw Error(s(91));return q({},n,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Pc(e,n){var o=n.value;if(o==null){if(o=n.children,n=n.defaultValue,o!=null){if(n!=null)throw Error(s(92));if(Vr(o)){if(1<o.length)throw Error(s(93));o=o[0]}n=o}n==null&&(n=""),o=n}e._wrapperState={initialValue:be(o)}}function Tc(e,n){var o=be(n.value),a=be(n.defaultValue);o!=null&&(o=""+o,o!==e.value&&(e.value=o),n.defaultValue==null&&e.defaultValue!==o&&(e.defaultValue=o)),a!=null&&(e.defaultValue=""+a)}function _c(e){var n=e.textContent;n===e._wrapperState.initialValue&&n!==""&&n!==null&&(e.value=n)}function Oc(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 ta(e,n){return e==null||e==="http://www.w3.org/1999/xhtml"?Oc(n):e==="http://www.w3.org/2000/svg"&&n==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var ts,Ac=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(n,o,a,c){MSApp.execUnsafeLocalFunction(function(){return e(n,o,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 o=e.firstChild;if(o&&o===e.lastChild&&o.nodeType===3){o.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},ix=["Webkit","ms","Moz","O"];Object.keys(Gr).forEach(function(e){ix.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),Gr[n]=Gr[e]})});function Mc(e,n,o){return n==null||typeof n=="boolean"||n===""?"":o||typeof n!="number"||n===0||Gr.hasOwnProperty(e)&&Gr[e]?(""+n).trim():n+"px"}function Ic(e,n){e=e.style;for(var o in n)if(n.hasOwnProperty(o)){var a=o.indexOf("--")===0,c=Mc(o,n[o],a);o==="float"&&(o="cssFloat"),a?e.setProperty(o,c):e[o]=c}}var ax=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 na(e,n){if(n){if(ax[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(s(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(s(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(s(61))}if(n.style!=null&&typeof n.style!="object")throw Error(s(62))}}function ra(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 oa=null;function sa(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ia=null,ar=null,lr=null;function Lc(e){if(e=vo(e)){if(typeof ia!="function")throw Error(s(280));var n=e.stateNode;n&&(n=ks(n),ia(e.stateNode,e.type,n))}}function Dc(e){ar?lr?lr.push(e):lr=[e]:ar=e}function Fc(){if(ar){var e=ar,n=lr;if(lr=ar=null,Lc(e),n)for(e=0;e<n.length;e++)Lc(n[e])}}function $c(e,n){return e(n)}function zc(){}var aa=!1;function Uc(e,n,o){if(aa)return e(n,o);aa=!0;try{return $c(e,n,o)}finally{aa=!1,(ar!==null||lr!==null)&&(zc(),Fc())}}function qr(e,n){var o=e.stateNode;if(o===null)return null;var a=ks(o);if(a===null)return null;o=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(o&&typeof o!="function")throw Error(s(231,n,typeof o));return o}var la=!1;if(h)try{var Yr={};Object.defineProperty(Yr,"passive",{get:function(){la=!0}}),window.addEventListener("test",Yr,Yr),window.removeEventListener("test",Yr,Yr)}catch{la=!1}function lx(e,n,o,a,c,f,x,N,j){var F=Array.prototype.slice.call(arguments,3);try{n.apply(o,F)}catch(V){this.onError(V)}}var Xr=!1,ns=null,rs=!1,ua=null,ux={onError:function(e){Xr=!0,ns=e}};function cx(e,n,o,a,c,f,x,N,j){Xr=!1,ns=null,lx.apply(ux,arguments)}function dx(e,n,o,a,c,f,x,N,j){if(cx.apply(this,arguments),Xr){if(Xr){var F=ns;Xr=!1,ns=null}else throw Error(s(198));rs||(rs=!0,ua=F)}}function $n(e){var n=e,o=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(o=n.return),e=n.return;while(e)}return n.tag===3?o:null}function Hc(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 Bc(e){if($n(e)!==e)throw Error(s(188))}function fx(e){var n=e.alternate;if(!n){if(n=$n(e),n===null)throw Error(s(188));return n!==e?null:e}for(var o=e,a=n;;){var c=o.return;if(c===null)break;var f=c.alternate;if(f===null){if(a=c.return,a!==null){o=a;continue}break}if(c.child===f.child){for(f=c.child;f;){if(f===o)return Bc(c),e;if(f===a)return Bc(c),n;f=f.sibling}throw Error(s(188))}if(o.return!==a.return)o=c,a=f;else{for(var x=!1,N=c.child;N;){if(N===o){x=!0,o=c,a=f;break}if(N===a){x=!0,a=c,o=f;break}N=N.sibling}if(!x){for(N=f.child;N;){if(N===o){x=!0,o=f,a=c;break}if(N===a){x=!0,a=f,o=c;break}N=N.sibling}if(!x)throw Error(s(189))}}if(o.alternate!==a)throw Error(s(190))}if(o.tag!==3)throw Error(s(188));return o.stateNode.current===o?e:n}function Kc(e){return e=fx(e),e!==null?Wc(e):null}function Wc(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var n=Wc(e);if(n!==null)return n;e=e.sibling}return null}var Vc=r.unstable_scheduleCallback,Qc=r.unstable_cancelCallback,px=r.unstable_shouldYield,hx=r.unstable_requestPaint,Ie=r.unstable_now,mx=r.unstable_getCurrentPriorityLevel,ca=r.unstable_ImmediatePriority,Gc=r.unstable_UserBlockingPriority,os=r.unstable_NormalPriority,gx=r.unstable_LowPriority,qc=r.unstable_IdlePriority,ss=null,zt=null;function vx(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:wx,xx=Math.log,yx=Math.LN2;function wx(e){return e>>>=0,e===0?32:31-(xx(e)/yx|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 o=e.pendingLanes;if(o===0)return 0;var a=0,c=e.suspendedLanes,f=e.pingedLanes,x=o&268435455;if(x!==0){var N=x&~c;N!==0?a=Zr(N):(f&=x,f!==0&&(a=Zr(f)))}else x=o&~c,x!==0?a=Zr(x):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|=o&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=a;0<n;)o=31-Rt(n),c=1<<o,a|=e[o],n&=~c;return a}function bx(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 Sx(e,n){for(var o=e.suspendedLanes,a=e.pingedLanes,c=e.expirationTimes,f=e.pendingLanes;0<f;){var x=31-Rt(f),N=1<<x,j=c[x];j===-1?((N&o)===0||(N&a)!==0)&&(c[x]=bx(N,n)):j<=n&&(e.expiredLanes|=N),f&=~N}}function da(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Yc(){var e=is;return is<<=1,(is&4194240)===0&&(is=64),e}function fa(e){for(var n=[],o=0;31>o;o++)n.push(e);return n}function Jr(e,n,o){e.pendingLanes|=n,n!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,n=31-Rt(n),e[n]=o}function Cx(e,n){var o=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<o;){var c=31-Rt(o),f=1<<c;n[c]=0,a[c]=-1,e[c]=-1,o&=~f}}function pa(e,n){var o=e.entangledLanes|=n;for(e=e.entanglements;o;){var a=31-Rt(o),c=1<<a;c&n|e[a]&n&&(e[a]|=n),o&=~c}}var ke=0;function Xc(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var Zc,ha,Jc,ed,td,ma=!1,us=[],cn=null,dn=null,fn=null,eo=new Map,to=new Map,pn=[],kx="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 nd(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,o,a,c,f){return e===null||e.nativeEvent!==f?(e={blockedOn:n,domEventName:o,eventSystemFlags:a,nativeEvent:f,targetContainers:[c]},n!==null&&(n=vo(n),n!==null&&ha(n)),e):(e.eventSystemFlags|=a,n=e.targetContainers,c!==null&&n.indexOf(c)===-1&&n.push(c),e)}function Ex(e,n,o,a,c){switch(n){case"focusin":return cn=no(cn,e,n,o,a,c),!0;case"dragenter":return dn=no(dn,e,n,o,a,c),!0;case"mouseover":return fn=no(fn,e,n,o,a,c),!0;case"pointerover":var f=c.pointerId;return eo.set(f,no(eo.get(f)||null,e,n,o,a,c)),!0;case"gotpointercapture":return f=c.pointerId,to.set(f,no(to.get(f)||null,e,n,o,a,c)),!0}return!1}function rd(e){var n=zn(e.target);if(n!==null){var o=$n(n);if(o!==null){if(n=o.tag,n===13){if(n=Hc(o),n!==null){e.blockedOn=n,td(e.priority,function(){Jc(o)});return}}else if(n===3&&o.stateNode.current.memoizedState.isDehydrated){e.blockedOn=o.tag===3?o.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 o=va(e.domEventName,e.eventSystemFlags,n[0],e.nativeEvent);if(o===null){o=e.nativeEvent;var a=new o.constructor(o.type,o);oa=a,o.target.dispatchEvent(a),oa=null}else return n=vo(o),n!==null&&ha(n),e.blockedOn=o,!1;n.shift()}return!0}function od(e,n,o){cs(e)&&o.delete(n)}function Nx(){ma=!1,cn!==null&&cs(cn)&&(cn=null),dn!==null&&cs(dn)&&(dn=null),fn!==null&&cs(fn)&&(fn=null),eo.forEach(od),to.forEach(od)}function ro(e,n){e.blockedOn===n&&(e.blockedOn=null,ma||(ma=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,Nx)))}function oo(e){function n(c){return ro(c,e)}if(0<us.length){ro(us[0],e);for(var o=1;o<us.length;o++){var a=us[o];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),o=0;o<pn.length;o++)a=pn[o],a.blockedOn===e&&(a.blockedOn=null);for(;0<pn.length&&(o=pn[0],o.blockedOn===null);)rd(o),o.blockedOn===null&&pn.shift()}var ur=L.ReactCurrentBatchConfig,ds=!0;function jx(e,n,o,a){var c=ke,f=ur.transition;ur.transition=null;try{ke=1,ga(e,n,o,a)}finally{ke=c,ur.transition=f}}function Rx(e,n,o,a){var c=ke,f=ur.transition;ur.transition=null;try{ke=4,ga(e,n,o,a)}finally{ke=c,ur.transition=f}}function ga(e,n,o,a){if(ds){var c=va(e,n,o,a);if(c===null)Ma(e,n,a,fs,o),nd(e,a);else if(Ex(c,e,n,o,a))a.stopPropagation();else if(nd(e,a),n&4&&-1<kx.indexOf(e)){for(;c!==null;){var f=vo(c);if(f!==null&&Zc(f),f=va(e,n,o,a),f===null&&Ma(e,n,a,fs,o),f===c)break;c=f}c!==null&&a.stopPropagation()}else Ma(e,n,a,null,o)}}var fs=null;function va(e,n,o,a){if(fs=null,e=sa(a),e=zn(e),e!==null)if(n=$n(e),n===null)e=null;else if(o=n.tag,o===13){if(e=Hc(n),e!==null)return e;e=null}else if(o===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 sd(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(mx()){case ca:return 1;case Gc:return 4;case os:case gx:return 16;case qc:return 536870912;default:return 16}default:return 16}}var hn=null,xa=null,ps=null;function id(){if(ps)return ps;var e,n=xa,o=n.length,a,c="value"in hn?hn.value:hn.textContent,f=c.length;for(e=0;e<o&&n[e]===c[e];e++);var x=o-e;for(a=1;a<=x&&n[o-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 ad(){return!1}function ft(e){function n(o,a,c,f,x){this._reactName=o,this._targetInst=c,this.type=a,this.nativeEvent=f,this.target=x,this.currentTarget=null;for(var N in e)e.hasOwnProperty(N)&&(o=e[N],this[N]=o?o(f):f[N]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?ms:ad,this.isPropagationStopped=ad,this}return q(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=ms)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.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},ya=ft(cr),so=q({},cr,{view:0,detail:0}),Px=ft(so),wa,ba,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:Ca,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"?(wa=e.screenX-io.screenX,ba=e.screenY-io.screenY):ba=wa=0,io=e),wa)},movementY:function(e){return"movementY"in e?e.movementY:ba}}),ld=ft(gs),Tx=q({},gs,{dataTransfer:0}),_x=ft(Tx),Ox=q({},so,{relatedTarget:0}),Sa=ft(Ox),Ax=q({},cr,{animationName:0,elapsedTime:0,pseudoElement:0}),Mx=ft(Ax),Ix=q({},cr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Lx=ft(Ix),Dx=q({},cr,{data:0}),ud=ft(Dx),Fx={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},$x={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"},zx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ux(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=zx[e])?!!n[e]:!1}function Ca(){return Ux}var Hx=q({},so,{key:function(e){if(e.key){var n=Fx[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"?$x[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ca,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}}),Bx=ft(Hx),Kx=q({},gs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),cd=ft(Kx),Wx=q({},so,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ca}),Vx=ft(Wx),Qx=q({},cr,{propertyName:0,elapsedTime:0,pseudoElement:0}),Gx=ft(Qx),qx=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}),Yx=ft(qx),Xx=[9,13,27,32],ka=h&&"CompositionEvent"in window,ao=null;h&&"documentMode"in document&&(ao=document.documentMode);var Zx=h&&"TextEvent"in window&&!ao,dd=h&&(!ka||ao&&8<ao&&11>=ao),fd=" ",pd=!1;function hd(e,n){switch(e){case"keyup":return Xx.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function md(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var dr=!1;function Jx(e,n){switch(e){case"compositionend":return md(n);case"keypress":return n.which!==32?null:(pd=!0,fd);case"textInput":return e=n.data,e===fd&&pd?null:e;default:return null}}function ey(e,n){if(dr)return e==="compositionend"||!ka&&hd(e,n)?(e=id(),ps=xa=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 dd&&n.locale!=="ko"?null:n.data;default:return null}}var ty={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 gd(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!ty[e.type]:n==="textarea"}function vd(e,n,o,a){Dc(a),n=bs(n,"onChange"),0<n.length&&(o=new ya("onChange","change",null,o,a),e.push({event:o,listeners:n}))}var lo=null,uo=null;function ny(e){Id(e,0)}function vs(e){var n=gr(e);if(es(n))return e}function ry(e,n){if(e==="change")return n}var xd=!1;if(h){var Ea;if(h){var Na="oninput"in document;if(!Na){var yd=document.createElement("div");yd.setAttribute("oninput","return;"),Na=typeof yd.oninput=="function"}Ea=Na}else Ea=!1;xd=Ea&&(!document.documentMode||9<document.documentMode)}function wd(){lo&&(lo.detachEvent("onpropertychange",bd),uo=lo=null)}function bd(e){if(e.propertyName==="value"&&vs(uo)){var n=[];vd(n,uo,e,sa(e)),Uc(ny,n)}}function oy(e,n,o){e==="focusin"?(wd(),lo=n,uo=o,lo.attachEvent("onpropertychange",bd)):e==="focusout"&&wd()}function sy(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return vs(uo)}function iy(e,n){if(e==="click")return vs(n)}function ay(e,n){if(e==="input"||e==="change")return vs(n)}function ly(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var Pt=typeof Object.is=="function"?Object.is:ly;function co(e,n){if(Pt(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var o=Object.keys(e),a=Object.keys(n);if(o.length!==a.length)return!1;for(a=0;a<o.length;a++){var c=o[a];if(!g.call(n,c)||!Pt(e[c],n[c]))return!1}return!0}function Sd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Cd(e,n){var o=Sd(e);e=0;for(var a;o;){if(o.nodeType===3){if(a=e+o.textContent.length,e<=n&&a>=n)return{node:o,offset:n-e};e=a}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=Sd(o)}}function kd(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?kd(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Ed(){for(var e=window,n=Yt();n instanceof e.HTMLIFrameElement;){try{var o=typeof n.contentWindow.location.href=="string"}catch{o=!1}if(o)e=n.contentWindow;else break;n=Yt(e.document)}return n}function ja(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 uy(e){var n=Ed(),o=e.focusedElem,a=e.selectionRange;if(n!==o&&o&&o.ownerDocument&&kd(o.ownerDocument.documentElement,o)){if(a!==null&&ja(o)){if(n=a.start,e=a.end,e===void 0&&(e=n),"selectionStart"in o)o.selectionStart=n,o.selectionEnd=Math.min(e,o.value.length);else if(e=(n=o.ownerDocument||document)&&n.defaultView||window,e.getSelection){e=e.getSelection();var c=o.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=Cd(o,f);var x=Cd(o,a);c&&x&&(e.rangeCount!==1||e.anchorNode!==c.node||e.anchorOffset!==c.offset||e.focusNode!==x.node||e.focusOffset!==x.offset)&&(n=n.createRange(),n.setStart(c.node,c.offset),e.removeAllRanges(),f>a?(e.addRange(n),e.extend(x.node,x.offset)):(n.setEnd(x.node,x.offset),e.addRange(n)))}}for(n=[],e=o;e=e.parentNode;)e.nodeType===1&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o<n.length;o++)e=n[o],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var cy=h&&"documentMode"in document&&11>=document.documentMode,fr=null,Ra=null,fo=null,Pa=!1;function Nd(e,n,o){var a=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Pa||fr==null||fr!==Yt(a)||(a=fr,"selectionStart"in a&&ja(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(Ra,"onSelect"),0<a.length&&(n=new ya("onSelect","select",null,n,o),e.push({event:n,listeners:a}),n.target=fr)))}function xs(e,n){var o={};return o[e.toLowerCase()]=n.toLowerCase(),o["Webkit"+e]="webkit"+n,o["Moz"+e]="moz"+n,o}var pr={animationend:xs("Animation","AnimationEnd"),animationiteration:xs("Animation","AnimationIteration"),animationstart:xs("Animation","AnimationStart"),transitionend:xs("Transition","TransitionEnd")},Ta={},jd={};h&&(jd=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(Ta[e])return Ta[e];if(!pr[e])return e;var n=pr[e],o;for(o in n)if(n.hasOwnProperty(o)&&o in jd)return Ta[e]=n[o];return e}var Rd=ys("animationend"),Pd=ys("animationiteration"),Td=ys("animationstart"),_d=ys("transitionend"),Od=new Map,Ad="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){Od.set(e,n),d(n,[e])}for(var _a=0;_a<Ad.length;_a++){var Oa=Ad[_a],dy=Oa.toLowerCase(),fy=Oa[0].toUpperCase()+Oa.slice(1);mn(dy,"on"+fy)}mn(Rd,"onAnimationEnd"),mn(Pd,"onAnimationIteration"),mn(Td,"onAnimationStart"),mn("dblclick","onDoubleClick"),mn("focusin","onFocus"),mn("focusout","onBlur"),mn(_d,"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(" "),py=new Set("cancel close invalid load scroll toggle".split(" ").concat(po));function Md(e,n,o){var a=e.type||"unknown-event";e.currentTarget=o,dx(a,n,void 0,e),e.currentTarget=null}function Id(e,n){n=(n&4)!==0;for(var o=0;o<e.length;o++){var a=e[o],c=a.event;a=a.listeners;e:{var f=void 0;if(n)for(var x=a.length-1;0<=x;x--){var N=a[x],j=N.instance,F=N.currentTarget;if(N=N.listener,j!==f&&c.isPropagationStopped())break e;Md(c,N,F),f=j}else for(x=0;x<a.length;x++){if(N=a[x],j=N.instance,F=N.currentTarget,N=N.listener,j!==f&&c.isPropagationStopped())break e;Md(c,N,F),f=j}}}if(rs)throw e=ua,rs=!1,ua=null,e}function Re(e,n){var o=n[za];o===void 0&&(o=n[za]=new Set);var a=e+"__bubble";o.has(a)||(Ld(n,e,2,!1),o.add(a))}function Aa(e,n,o){var a=0;n&&(a|=4),Ld(o,e,a,n)}var ws="_reactListening"+Math.random().toString(36).slice(2);function ho(e){if(!e[ws]){e[ws]=!0,i.forEach(function(o){o!=="selectionchange"&&(py.has(o)||Aa(o,!1,e),Aa(o,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[ws]||(n[ws]=!0,Aa("selectionchange",!1,n))}}function Ld(e,n,o,a){switch(sd(n)){case 1:var c=jx;break;case 4:c=Rx;break;default:c=ga}o=c.bind(null,n,o,e),c=void 0,!la||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(c=!0),a?c!==void 0?e.addEventListener(n,o,{capture:!0,passive:c}):e.addEventListener(n,o,!0):c!==void 0?e.addEventListener(n,o,{passive:c}):e.addEventListener(n,o,!1)}function Ma(e,n,o,a,c){var f=a;if((n&1)===0&&(n&2)===0&&a!==null)e:for(;;){if(a===null)return;var x=a.tag;if(x===3||x===4){var N=a.stateNode.containerInfo;if(N===c||N.nodeType===8&&N.parentNode===c)break;if(x===4)for(x=a.return;x!==null;){var j=x.tag;if((j===3||j===4)&&(j=x.stateNode.containerInfo,j===c||j.nodeType===8&&j.parentNode===c))return;x=x.return}for(;N!==null;){if(x=zn(N),x===null)return;if(j=x.tag,j===5||j===6){a=f=x;continue e}N=N.parentNode}}a=a.return}Uc(function(){var F=f,V=sa(o),G=[];e:{var K=Od.get(e);if(K!==void 0){var J=ya,re=e;switch(e){case"keypress":if(hs(o)===0)break e;case"keydown":case"keyup":J=Bx;break;case"focusin":re="focus",J=Sa;break;case"focusout":re="blur",J=Sa;break;case"beforeblur":case"afterblur":J=Sa;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":J=ld;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":J=_x;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":J=Vx;break;case Rd:case Pd:case Td:J=Mx;break;case _d:J=Gx;break;case"scroll":J=Px;break;case"wheel":J=Yx;break;case"copy":case"cut":case"paste":J=Lx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":J=cd}var oe=(n&4)!==0,Le=!oe&&e==="scroll",M=oe?K!==null?K+"Capture":null:K;oe=[];for(var T=F,I;T!==null;){I=T;var Y=I.stateNode;if(I.tag===5&&Y!==null&&(I=Y,M!==null&&(Y=qr(T,M),Y!=null&&oe.push(mo(T,Y,I)))),Le)break;T=T.return}0<oe.length&&(K=new J(K,re,null,o,V),G.push({event:K,listeners:oe}))}}if((n&7)===0){e:{if(K=e==="mouseover"||e==="pointerover",J=e==="mouseout"||e==="pointerout",K&&o!==oa&&(re=o.relatedTarget||o.fromElement)&&(zn(re)||re[Xt]))break e;if((J||K)&&(K=V.window===V?V:(K=V.ownerDocument)?K.defaultView||K.parentWindow:window,J?(re=o.relatedTarget||o.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=ld,Y="onMouseLeave",M="onMouseEnter",T="mouse",(e==="pointerout"||e==="pointerover")&&(oe=cd,Y="onPointerLeave",M="onPointerEnter",T="pointer"),Le=J==null?K:gr(J),I=re==null?K:gr(re),K=new oe(Y,T+"leave",J,o,V),K.target=Le,K.relatedTarget=I,Y=null,zn(V)===F&&(oe=new oe(M,T+"enter",re,o,V),oe.target=I,oe.relatedTarget=Le,Y=oe),Le=Y,J&&re)t:{for(oe=J,M=re,T=0,I=oe;I;I=hr(I))T++;for(I=0,Y=M;Y;Y=hr(Y))I++;for(;0<T-I;)oe=hr(oe),T--;for(;0<I-T;)M=hr(M),I--;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&&Dd(G,K,J,oe,!1),re!==null&&Le!==null&&Dd(G,Le,re,oe,!0)}}e:{if(K=F?gr(F):window,J=K.nodeName&&K.nodeName.toLowerCase(),J==="select"||J==="input"&&K.type==="file")var ie=ry;else if(gd(K))if(xd)ie=ay;else{ie=sy;var fe=oy}else(J=K.nodeName)&&J.toLowerCase()==="input"&&(K.type==="checkbox"||K.type==="radio")&&(ie=iy);if(ie&&(ie=ie(e,F))){vd(G,ie,o,V);break e}fe&&fe(e,K,F),e==="focusout"&&(fe=K._wrapperState)&&fe.controlled&&K.type==="number"&&Ji(K,"number",K.value)}switch(fe=F?gr(F):window,e){case"focusin":(gd(fe)||fe.contentEditable==="true")&&(fr=fe,Ra=F,fo=null);break;case"focusout":fo=Ra=fr=null;break;case"mousedown":Pa=!0;break;case"contextmenu":case"mouseup":case"dragend":Pa=!1,Nd(G,o,V);break;case"selectionchange":if(cy)break;case"keydown":case"keyup":Nd(G,o,V)}var pe;if(ka)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?hd(e,o)&&(ge="onCompositionEnd"):e==="keydown"&&o.keyCode===229&&(ge="onCompositionStart");ge&&(dd&&o.locale!=="ko"&&(dr||ge!=="onCompositionStart"?ge==="onCompositionEnd"&&dr&&(pe=id()):(hn=V,xa="value"in hn?hn.value:hn.textContent,dr=!0)),fe=bs(F,ge),0<fe.length&&(ge=new ud(ge,e,null,o,V),G.push({event:ge,listeners:fe}),pe?ge.data=pe:(pe=md(o),pe!==null&&(ge.data=pe)))),(pe=Zx?Jx(e,o):ey(e,o))&&(F=bs(F,"onBeforeInput"),0<F.length&&(V=new ud("onBeforeInput","beforeinput",null,o,V),G.push({event:V,listeners:F}),V.data=pe))}Id(G,n)})}function mo(e,n,o){return{instance:e,listener:n,currentTarget:o}}function bs(e,n){for(var o=n+"Capture",a=[];e!==null;){var c=e,f=c.stateNode;c.tag===5&&f!==null&&(c=f,f=qr(e,o),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 Dd(e,n,o,a,c){for(var f=n._reactName,x=[];o!==null&&o!==a;){var N=o,j=N.alternate,F=N.stateNode;if(j!==null&&j===a)break;N.tag===5&&F!==null&&(N=F,c?(j=qr(o,f),j!=null&&x.unshift(mo(o,j,N))):c||(j=qr(o,f),j!=null&&x.push(mo(o,j,N)))),o=o.return}x.length!==0&&e.push({event:n,listeners:x})}var hy=/\r\n?/g,my=/\u0000|\uFFFD/g;function Fd(e){return(typeof e=="string"?e:""+e).replace(hy,`
|
|
6
|
+
`).replace(my,"")}function Ss(e,n,o){if(n=Fd(n),Fd(e)!==n&&o)throw Error(s(425))}function Cs(){}var Ia=null,La=null;function Da(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 Fa=typeof setTimeout=="function"?setTimeout:void 0,gy=typeof clearTimeout=="function"?clearTimeout:void 0,$d=typeof Promise=="function"?Promise:void 0,vy=typeof queueMicrotask=="function"?queueMicrotask:typeof $d<"u"?function(e){return $d.resolve(null).then(e).catch(xy)}:Fa;function xy(e){setTimeout(function(){throw e})}function $a(e,n){var o=n,a=0;do{var c=o.nextSibling;if(e.removeChild(o),c&&c.nodeType===8)if(o=c.data,o==="/$"){if(a===0){e.removeChild(c),oo(n);return}a--}else o!=="$"&&o!=="$?"&&o!=="$!"||a++;o=c}while(o);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 zd(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var o=e.data;if(o==="$"||o==="$!"||o==="$?"){if(n===0)return e;n--}else o==="/$"&&n++}e=e.previousSibling}return null}var mr=Math.random().toString(36).slice(2),Ut="__reactFiber$"+mr,go="__reactProps$"+mr,Xt="__reactContainer$"+mr,za="__reactEvents$"+mr,yy="__reactListeners$"+mr,wy="__reactHandles$"+mr;function zn(e){var n=e[Ut];if(n)return n;for(var o=e.parentNode;o;){if(n=o[Xt]||o[Ut]){if(o=n.alternate,n.child!==null||o!==null&&o.child!==null)for(e=zd(e);e!==null;){if(o=e[Ut])return o;e=zd(e)}return n}e=o,o=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(s(33))}function ks(e){return e[go]||null}var Ua=[],vr=-1;function vn(e){return{current:e}}function Pe(e){0>vr||(e.current=Ua[vr],Ua[vr]=null,vr--)}function Ne(e,n){vr++,Ua[vr]=e.current,e.current=n}var xn={},qe=vn(xn),it=vn(!1),Un=xn;function xr(e,n){var o=e.type.contextTypes;if(!o)return xn;var a=e.stateNode;if(a&&a.__reactInternalMemoizedUnmaskedChildContext===n)return a.__reactInternalMemoizedMaskedChildContext;var c={},f;for(f in o)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 Ud(e,n,o){if(qe.current!==xn)throw Error(s(168));Ne(qe,n),Ne(it,o)}function Hd(e,n,o){var a=e.stateNode;if(n=n.childContextTypes,typeof a.getChildContext!="function")return o;a=a.getChildContext();for(var c in a)if(!(c in n))throw Error(s(108,ce(e)||"Unknown",c));return q({},o,a)}function Ns(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||xn,Un=qe.current,Ne(qe,e),Ne(it,it.current),!0}function Bd(e,n,o){var a=e.stateNode;if(!a)throw Error(s(169));o?(e=Hd(e,n,Un),a.__reactInternalMemoizedMergedChildContext=e,Pe(it),Pe(qe),Ne(qe,e)):Pe(it),Ne(it,o)}var Zt=null,js=!1,Ha=!1;function Kd(e){Zt===null?Zt=[e]:Zt.push(e)}function by(e){js=!0,Kd(e)}function yn(){if(!Ha&&Zt!==null){Ha=!0;var e=0,n=ke;try{var o=Zt;for(ke=1;e<o.length;e++){var a=o[e];do a=a(!0);while(a!==null)}Zt=null,js=!1}catch(c){throw Zt!==null&&(Zt=Zt.slice(e+1)),Vc(ca,yn),c}finally{ke=n,Ha=!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 Wd(e,n,o){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),o+=1;var f=32-Rt(n)+c;if(30<f){var x=c-c%5;f=(a&(1<<x)-1).toString(32),a>>=x,c-=x,Jt=1<<32-Rt(n)+c|o<<c|a,en=f+e}else Jt=1<<f|o<<c|a,en=e}function Ba(e){e.return!==null&&(Bn(e,1),Wd(e,1,0))}function Ka(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 Vd(e,n){var o=Et(5,null,null,0);o.elementType="DELETED",o.stateNode=n,o.return=e,n=e.deletions,n===null?(e.deletions=[o],e.flags|=16):n.push(o)}function Qd(e,n){switch(e.tag){case 5:var o=e.type;return n=n.nodeType!==1||o.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?(o=Hn!==null?{id:Jt,overflow:en}:null,e.memoizedState={dehydrated:n,treeContext:o,retryLane:1073741824},o=Et(18,null,null,0),o.stateNode=n,o.return=e,e.child=o,pt=e,ht=null,!0):!1;default:return!1}}function Wa(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Va(e){if(_e){var n=ht;if(n){var o=n;if(!Qd(e,n)){if(Wa(e))throw Error(s(418));n=gn(o.nextSibling);var a=pt;n&&Qd(e,n)?Vd(a,o):(e.flags=e.flags&-4097|2,_e=!1,pt=e)}}else{if(Wa(e))throw Error(s(418));e.flags=e.flags&-4097|2,_e=!1,pt=e}}}function Gd(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 Gd(e),_e=!0,!1;var n;if((n=e.tag!==3)&&!(n=e.tag!==5)&&(n=e.type,n=n!=="head"&&n!=="body"&&!Da(e.type,e.memoizedProps)),n&&(n=ht)){if(Wa(e))throw qd(),Error(s(418));for(;n;)Vd(e,n),n=gn(n.nextSibling)}if(Gd(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));e:{for(e=e.nextSibling,n=0;e;){if(e.nodeType===8){var o=e.data;if(o==="/$"){if(n===0){ht=gn(e.nextSibling);break e}n--}else o!=="$"&&o!=="$!"&&o!=="$?"||n++}e=e.nextSibling}ht=null}}else ht=pt?gn(e.stateNode.nextSibling):null;return!0}function qd(){for(var e=ht;e;)e=gn(e.nextSibling)}function br(){ht=pt=null,_e=!1}function Qa(e){Tt===null?Tt=[e]:Tt.push(e)}var Sy=L.ReactCurrentBatchConfig;function xo(e,n,o){if(e=o.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(o._owner){if(o=o._owner,o){if(o.tag!==1)throw Error(s(309));var a=o.stateNode}if(!a)throw Error(s(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(x){var N=c.refs;x===null?delete N[f]:N[f]=x},n._stringRef=f,n)}if(typeof e!="string")throw Error(s(284));if(!o._owner)throw Error(s(290,e))}return e}function _s(e,n){throw e=Object.prototype.toString.call(n),Error(s(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e))}function Yd(e){var n=e._init;return n(e._payload)}function Xd(e){function n(M,T){if(e){var I=M.deletions;I===null?(M.deletions=[T],M.flags|=16):I.push(T)}}function o(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,I){return M.index=I,e?(I=M.alternate,I!==null?(I=I.index,I<T?(M.flags|=2,T):I):(M.flags|=2,T)):(M.flags|=1048576,T)}function x(M){return e&&M.alternate===null&&(M.flags|=2),M}function N(M,T,I,Y){return T===null||T.tag!==6?(T=Fl(I,M.mode,Y),T.return=M,T):(T=c(T,I),T.return=M,T)}function j(M,T,I,Y){var ie=I.type;return ie===$?V(M,T,I.props.children,Y,I.key):T!==null&&(T.elementType===ie||typeof ie=="object"&&ie!==null&&ie.$$typeof===se&&Yd(ie)===T.type)?(Y=c(T,I.props),Y.ref=xo(M,T,I),Y.return=M,Y):(Y=ti(I.type,I.key,I.props,null,M.mode,Y),Y.ref=xo(M,T,I),Y.return=M,Y)}function F(M,T,I,Y){return T===null||T.tag!==4||T.stateNode.containerInfo!==I.containerInfo||T.stateNode.implementation!==I.implementation?(T=$l(I,M.mode,Y),T.return=M,T):(T=c(T,I.children||[]),T.return=M,T)}function V(M,T,I,Y,ie){return T===null||T.tag!==7?(T=Xn(I,M.mode,Y,ie),T.return=M,T):(T=c(T,I),T.return=M,T)}function G(M,T,I){if(typeof T=="string"&&T!==""||typeof T=="number")return T=Fl(""+T,M.mode,I),T.return=M,T;if(typeof T=="object"&&T!==null){switch(T.$$typeof){case D:return I=ti(T.type,T.key,T.props,null,M.mode,I),I.ref=xo(M,null,T),I.return=M,I;case O:return T=$l(T,M.mode,I),T.return=M,T;case se:var Y=T._init;return G(M,Y(T._payload),I)}if(Vr(T)||H(T))return T=Xn(T,M.mode,I,null),T.return=M,T;_s(M,T)}return null}function K(M,T,I,Y){var ie=T!==null?T.key:null;if(typeof I=="string"&&I!==""||typeof I=="number")return ie!==null?null:N(M,T,""+I,Y);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case D:return I.key===ie?j(M,T,I,Y):null;case O:return I.key===ie?F(M,T,I,Y):null;case se:return ie=I._init,K(M,T,ie(I._payload),Y)}if(Vr(I)||H(I))return ie!==null?null:V(M,T,I,Y,null);_s(M,I)}return null}function J(M,T,I,Y,ie){if(typeof Y=="string"&&Y!==""||typeof Y=="number")return M=M.get(I)||null,N(T,M,""+Y,ie);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case D:return M=M.get(Y.key===null?I:Y.key)||null,j(T,M,Y,ie);case O:return M=M.get(Y.key===null?I:Y.key)||null,F(T,M,Y,ie);case se:var fe=Y._init;return J(M,T,I,fe(Y._payload),ie)}if(Vr(Y)||H(Y))return M=M.get(I)||null,V(T,M,Y,ie,null);_s(T,Y)}return null}function re(M,T,I,Y){for(var ie=null,fe=null,pe=T,ge=T=0,We=null;pe!==null&&ge<I.length;ge++){pe.index>ge?(We=pe,pe=null):We=pe.sibling;var Ce=K(M,pe,I[ge],Y);if(Ce===null){pe===null&&(pe=We);break}e&&pe&&Ce.alternate===null&&n(M,pe),T=f(Ce,T,ge),fe===null?ie=Ce:fe.sibling=Ce,fe=Ce,pe=We}if(ge===I.length)return o(M,pe),_e&&Bn(M,ge),ie;if(pe===null){for(;ge<I.length;ge++)pe=G(M,I[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<I.length;ge++)We=J(pe,M,ge,I[ge],Y),We!==null&&(e&&We.alternate!==null&&pe.delete(We.key===null?ge:We.key),T=f(We,T,ge),fe===null?ie=We:fe.sibling=We,fe=We);return e&&pe.forEach(function(Rn){return n(M,Rn)}),_e&&Bn(M,ge),ie}function oe(M,T,I,Y){var ie=H(I);if(typeof ie!="function")throw Error(s(150));if(I=ie.call(I),I==null)throw Error(s(151));for(var fe=ie=null,pe=T,ge=T=0,We=null,Ce=I.next();pe!==null&&!Ce.done;ge++,Ce=I.next()){pe.index>ge?(We=pe,pe=null):We=pe.sibling;var Rn=K(M,pe,Ce.value,Y);if(Rn===null){pe===null&&(pe=We);break}e&&pe&&Rn.alternate===null&&n(M,pe),T=f(Rn,T,ge),fe===null?ie=Rn:fe.sibling=Rn,fe=Rn,pe=We}if(Ce.done)return o(M,pe),_e&&Bn(M,ge),ie;if(pe===null){for(;!Ce.done;ge++,Ce=I.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=I.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(tw){return n(M,tw)}),_e&&Bn(M,ge),ie}function Le(M,T,I,Y){if(typeof I=="object"&&I!==null&&I.type===$&&I.key===null&&(I=I.props.children),typeof I=="object"&&I!==null){switch(I.$$typeof){case D:e:{for(var ie=I.key,fe=T;fe!==null;){if(fe.key===ie){if(ie=I.type,ie===$){if(fe.tag===7){o(M,fe.sibling),T=c(fe,I.props.children),T.return=M,M=T;break e}}else if(fe.elementType===ie||typeof ie=="object"&&ie!==null&&ie.$$typeof===se&&Yd(ie)===fe.type){o(M,fe.sibling),T=c(fe,I.props),T.ref=xo(M,fe,I),T.return=M,M=T;break e}o(M,fe);break}else n(M,fe);fe=fe.sibling}I.type===$?(T=Xn(I.props.children,M.mode,Y,I.key),T.return=M,M=T):(Y=ti(I.type,I.key,I.props,null,M.mode,Y),Y.ref=xo(M,T,I),Y.return=M,M=Y)}return x(M);case O:e:{for(fe=I.key;T!==null;){if(T.key===fe)if(T.tag===4&&T.stateNode.containerInfo===I.containerInfo&&T.stateNode.implementation===I.implementation){o(M,T.sibling),T=c(T,I.children||[]),T.return=M,M=T;break e}else{o(M,T);break}else n(M,T);T=T.sibling}T=$l(I,M.mode,Y),T.return=M,M=T}return x(M);case se:return fe=I._init,Le(M,T,fe(I._payload),Y)}if(Vr(I))return re(M,T,I,Y);if(H(I))return oe(M,T,I,Y);_s(M,I)}return typeof I=="string"&&I!==""||typeof I=="number"?(I=""+I,T!==null&&T.tag===6?(o(M,T.sibling),T=c(T,I),T.return=M,M=T):(o(M,T),T=Fl(I,M.mode,Y),T.return=M,M=T),x(M)):o(M,T)}return Le}var Sr=Xd(!0),Zd=Xd(!1),Os=vn(null),As=null,Cr=null,Ga=null;function qa(){Ga=Cr=As=null}function Ya(e){var n=Os.current;Pe(Os),e._currentValue=n}function Xa(e,n,o){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===o)break;e=e.return}}function kr(e,n){As=e,Ga=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(Ga!==e)if(e={context:e,memoizedValue:n,next:null},Cr===null){if(As===null)throw Error(s(308));Cr=e,As.dependencies={lanes:0,firstContext:e}}else Cr=Cr.next=e;return n}var Kn=null;function Za(e){Kn===null?Kn=[e]:Kn.push(e)}function Jd(e,n,o,a){var c=n.interleaved;return c===null?(o.next=o,Za(n)):(o.next=c.next,c.next=o),n.interleaved=o,tn(e,a)}function tn(e,n){e.lanes|=n;var o=e.alternate;for(o!==null&&(o.lanes|=n),o=e,e=e.return;e!==null;)e.childLanes|=n,o=e.alternate,o!==null&&(o.childLanes|=n),o=e,e=e.return;return o.tag===3?o.stateNode:null}var wn=!1;function Ja(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ef(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,o){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,o)}return c=a.interleaved,c===null?(n.next=n,Za(a)):(n.next=c.next,c.next=n),a.interleaved=n,tn(e,o)}function Ms(e,n,o){if(n=n.updateQueue,n!==null&&(n=n.shared,(o&4194240)!==0)){var a=n.lanes;a&=e.pendingLanes,o|=a,n.lanes=o,pa(e,o)}}function tf(e,n){var o=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,o===a)){var c=null,f=null;if(o=o.firstBaseUpdate,o!==null){do{var x={eventTime:o.eventTime,lane:o.lane,tag:o.tag,payload:o.payload,callback:o.callback,next:null};f===null?c=f=x:f=f.next=x,o=o.next}while(o!==null);f===null?c=f=n:f=f.next=n}else c=f=n;o={baseState:a.baseState,firstBaseUpdate:c,lastBaseUpdate:f,shared:a.shared,effects:a.effects},e.updateQueue=o;return}e=o.lastBaseUpdate,e===null?o.firstBaseUpdate=n:e.next=n,o.lastBaseUpdate=n}function Is(e,n,o,a){var c=e.updateQueue;wn=!1;var f=c.firstBaseUpdate,x=c.lastBaseUpdate,N=c.shared.pending;if(N!==null){c.shared.pending=null;var j=N,F=j.next;j.next=null,x===null?f=F:x.next=F,x=j;var V=e.alternate;V!==null&&(V=V.updateQueue,N=V.lastBaseUpdate,N!==x&&(N===null?V.firstBaseUpdate=F:N.next=F,V.lastBaseUpdate=j))}if(f!==null){var G=c.baseState;x=0,V=F=j=null,N=f;do{var K=N.lane,J=N.eventTime;if((a&K)===K){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(K=n,J=o,oe.tag){case 1:if(re=oe.payload,typeof re=="function"){G=re.call(J,G,K);break e}G=re;break e;case 3:re.flags=re.flags&-65537|128;case 0:if(re=oe.payload,K=typeof re=="function"?re.call(J,G,K):re,K==null)break e;G=q({},G,K);break e;case 2:wn=!0}}N.callback!==null&&N.lane!==0&&(e.flags|=64,K=c.effects,K===null?c.effects=[N]:K.push(N))}else J={eventTime:J,lane:K,tag:N.tag,payload:N.payload,callback:N.callback,next:null},V===null?(F=V=J,j=G):V=V.next=J,x|=K;if(N=N.next,N===null){if(N=c.shared.pending,N===null)break;K=N,N=K.next,K.next=null,c.lastBaseUpdate=K,c.shared.pending=null}}while(!0);if(V===null&&(j=G),c.baseState=j,c.firstBaseUpdate=F,c.lastBaseUpdate=V,n=c.shared.interleaved,n!==null){c=n;do x|=c.lane,c=c.next;while(c!==n)}else f===null&&(c.shared.lanes=0);Qn|=x,e.lanes=x,e.memoizedState=G}}function nf(e,n,o){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=o,typeof c!="function")throw Error(s(191,c));c.call(a)}}}var yo={},Ht=vn(yo),wo=vn(yo),bo=vn(yo);function Wn(e){if(e===yo)throw Error(s(174));return e}function el(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:ta(null,"");break;default:e=e===8?n.parentNode:n,n=e.namespaceURI||null,e=e.tagName,n=ta(n,e)}Pe(Ht),Ne(Ht,n)}function Er(){Pe(Ht),Pe(wo),Pe(bo)}function rf(e){Wn(bo.current);var n=Wn(Ht.current),o=ta(n,e.type);n!==o&&(Ne(wo,e),Ne(Ht,o))}function tl(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 o=n.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||o.data==="$?"||o.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 nl=[];function rl(){for(var e=0;e<nl.length;e++)nl[e]._workInProgressVersionPrimary=null;nl.length=0}var Ds=L.ReactCurrentDispatcher,ol=L.ReactCurrentBatchConfig,Vn=0,Ae=null,$e=null,Be=null,Fs=!1,So=!1,Co=0,Cy=0;function Ye(){throw Error(s(321))}function sl(e,n){if(n===null)return!1;for(var o=0;o<n.length&&o<e.length;o++)if(!Pt(e[o],n[o]))return!1;return!0}function il(e,n,o,a,c,f){if(Vn=f,Ae=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,Ds.current=e===null||e.memoizedState===null?jy:Ry,e=o(a,c),So){f=0;do{if(So=!1,Co=0,25<=f)throw Error(s(301));f+=1,Be=$e=null,n.updateQueue=null,Ds.current=Py,e=o(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(s(300));return e}function al(){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(s(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 ll(e){var n=Ct(),o=n.queue;if(o===null)throw Error(s(311));o.lastRenderedReducer=e;var a=$e,c=a.baseQueue,f=o.pending;if(f!==null){if(c!==null){var x=c.next;c.next=f.next,f.next=x}a.baseQueue=c=f,o.pending=null}if(c!==null){f=c.next,a=a.baseState;var N=x=null,j=null,F=f;do{var V=F.lane;if((Vn&V)===V)j!==null&&(j=j.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};j===null?(N=j=G,x=a):j=j.next=G,Ae.lanes|=V,Qn|=V}F=F.next}while(F!==null&&F!==f);j===null?x=a:j.next=N,Pt(a,n.memoizedState)||(lt=!0),n.memoizedState=a,n.baseState=x,n.baseQueue=j,o.lastRenderedState=a}if(e=o.interleaved,e!==null){c=e;do f=c.lane,Ae.lanes|=f,Qn|=f,c=c.next;while(c!==e)}else c===null&&(o.lanes=0);return[n.memoizedState,o.dispatch]}function ul(e){var n=Ct(),o=n.queue;if(o===null)throw Error(s(311));o.lastRenderedReducer=e;var a=o.dispatch,c=o.pending,f=n.memoizedState;if(c!==null){o.pending=null;var x=c=c.next;do f=e(f,x.action),x=x.next;while(x!==c);Pt(f,n.memoizedState)||(lt=!0),n.memoizedState=f,n.baseQueue===null&&(n.baseState=f),o.lastRenderedState=f}return[f,a]}function of(){}function sf(e,n){var o=Ae,a=Ct(),c=n(),f=!Pt(a.memoizedState,c);if(f&&(a.memoizedState=c,lt=!0),a=a.queue,cl(uf.bind(null,o,a,e),[e]),a.getSnapshot!==n||f||Be!==null&&Be.memoizedState.tag&1){if(o.flags|=2048,Eo(9,lf.bind(null,o,a,c,n),void 0,null),Ke===null)throw Error(s(349));(Vn&30)!==0||af(o,n,c)}return c}function af(e,n,o){e.flags|=16384,e={getSnapshot:n,value:o},n=Ae.updateQueue,n===null?(n={lastEffect:null,stores:null},Ae.updateQueue=n,n.stores=[e]):(o=n.stores,o===null?n.stores=[e]:o.push(e))}function lf(e,n,o,a){n.value=o,n.getSnapshot=a,cf(n)&&df(e)}function uf(e,n,o){return o(function(){cf(n)&&df(e)})}function cf(e){var n=e.getSnapshot;e=e.value;try{var o=n();return!Pt(e,o)}catch{return!0}}function df(e){var n=tn(e,1);n!==null&&Mt(n,e,1,-1)}function ff(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=Ny.bind(null,Ae,e),[n.memoizedState,e]}function Eo(e,n,o,a){return e={tag:e,create:n,destroy:o,deps:a,next:null},n=Ae.updateQueue,n===null?(n={lastEffect:null,stores:null},Ae.updateQueue=n,n.lastEffect=e.next=e):(o=n.lastEffect,o===null?n.lastEffect=e.next=e:(a=o.next,o.next=e,e.next=a,n.lastEffect=e)),e}function pf(){return Ct().memoizedState}function $s(e,n,o,a){var c=Bt();Ae.flags|=e,c.memoizedState=Eo(1|n,o,void 0,a===void 0?null:a)}function zs(e,n,o,a){var c=Ct();a=a===void 0?null:a;var f=void 0;if($e!==null){var x=$e.memoizedState;if(f=x.destroy,a!==null&&sl(a,x.deps)){c.memoizedState=Eo(n,o,f,a);return}}Ae.flags|=e,c.memoizedState=Eo(1|n,o,f,a)}function hf(e,n){return $s(8390656,8,e,n)}function cl(e,n){return zs(2048,8,e,n)}function mf(e,n){return zs(4,2,e,n)}function gf(e,n){return zs(4,4,e,n)}function vf(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 xf(e,n,o){return o=o!=null?o.concat([e]):null,zs(4,4,vf.bind(null,n,e),o)}function dl(){}function yf(e,n){var o=Ct();n=n===void 0?null:n;var a=o.memoizedState;return a!==null&&n!==null&&sl(n,a[1])?a[0]:(o.memoizedState=[e,n],e)}function wf(e,n){var o=Ct();n=n===void 0?null:n;var a=o.memoizedState;return a!==null&&n!==null&&sl(n,a[1])?a[0]:(e=e(),o.memoizedState=[e,n],e)}function bf(e,n,o){return(Vn&21)===0?(e.baseState&&(e.baseState=!1,lt=!0),e.memoizedState=o):(Pt(o,n)||(o=Yc(),Ae.lanes|=o,Qn|=o,e.baseState=!0),n)}function ky(e,n){var o=ke;ke=o!==0&&4>o?o:4,e(!0);var a=ol.transition;ol.transition={};try{e(!1),n()}finally{ke=o,ol.transition=a}}function Sf(){return Ct().memoizedState}function Ey(e,n,o){var a=En(e);if(o={lane:a,action:o,hasEagerState:!1,eagerState:null,next:null},Cf(e))kf(n,o);else if(o=Jd(e,n,o,a),o!==null){var c=rt();Mt(o,e,a,c),Ef(o,n,a)}}function Ny(e,n,o){var a=En(e),c={lane:a,action:o,hasEagerState:!1,eagerState:null,next:null};if(Cf(e))kf(n,c);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=n.lastRenderedReducer,f!==null))try{var x=n.lastRenderedState,N=f(x,o);if(c.hasEagerState=!0,c.eagerState=N,Pt(N,x)){var j=n.interleaved;j===null?(c.next=c,Za(n)):(c.next=j.next,j.next=c),n.interleaved=c;return}}catch{}o=Jd(e,n,c,a),o!==null&&(c=rt(),Mt(o,e,a,c),Ef(o,n,a))}}function Cf(e){var n=e.alternate;return e===Ae||n!==null&&n===Ae}function kf(e,n){So=Fs=!0;var o=e.pending;o===null?n.next=n:(n.next=o.next,o.next=n),e.pending=n}function Ef(e,n,o){if((o&4194240)!==0){var a=n.lanes;a&=e.pendingLanes,o|=a,n.lanes=o,pa(e,o)}}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},jy={readContext:St,useCallback:function(e,n){return Bt().memoizedState=[e,n===void 0?null:n],e},useContext:St,useEffect:hf,useImperativeHandle:function(e,n,o){return o=o!=null?o.concat([e]):null,$s(4194308,4,vf.bind(null,n,e),o)},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 o=Bt();return n=n===void 0?null:n,e=e(),o.memoizedState=[e,n],e},useReducer:function(e,n,o){var a=Bt();return n=o!==void 0?o(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=Ey.bind(null,Ae,e),[a.memoizedState,e]},useRef:function(e){var n=Bt();return e={current:e},n.memoizedState=e},useState:ff,useDebugValue:dl,useDeferredValue:function(e){return Bt().memoizedState=e},useTransition:function(){var e=ff(!1),n=e[0];return e=ky.bind(null,e[1]),Bt().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,o){var a=Ae,c=Bt();if(_e){if(o===void 0)throw Error(s(407));o=o()}else{if(o=n(),Ke===null)throw Error(s(349));(Vn&30)!==0||af(a,n,o)}c.memoizedState=o;var f={value:o,getSnapshot:n};return c.queue=f,hf(uf.bind(null,a,f,e),[e]),a.flags|=2048,Eo(9,lf.bind(null,a,f,o,n),void 0,null),o},useId:function(){var e=Bt(),n=Ke.identifierPrefix;if(_e){var o=en,a=Jt;o=(a&~(1<<32-Rt(a)-1)).toString(32)+o,n=":"+n+"R"+o,o=Co++,0<o&&(n+="H"+o.toString(32)),n+=":"}else o=Cy++,n=":"+n+"r"+o.toString(32)+":";return e.memoizedState=n},unstable_isNewReconciler:!1},Ry={readContext:St,useCallback:yf,useContext:St,useEffect:cl,useImperativeHandle:xf,useInsertionEffect:mf,useLayoutEffect:gf,useMemo:wf,useReducer:ll,useRef:pf,useState:function(){return ll(ko)},useDebugValue:dl,useDeferredValue:function(e){var n=Ct();return bf(n,$e.memoizedState,e)},useTransition:function(){var e=ll(ko)[0],n=Ct().memoizedState;return[e,n]},useMutableSource:of,useSyncExternalStore:sf,useId:Sf,unstable_isNewReconciler:!1},Py={readContext:St,useCallback:yf,useContext:St,useEffect:cl,useImperativeHandle:xf,useInsertionEffect:mf,useLayoutEffect:gf,useMemo:wf,useReducer:ul,useRef:pf,useState:function(){return ul(ko)},useDebugValue:dl,useDeferredValue:function(e){var n=Ct();return $e===null?n.memoizedState=e:bf(n,$e.memoizedState,e)},useTransition:function(){var e=ul(ko)[0],n=Ct().memoizedState;return[e,n]},useMutableSource:of,useSyncExternalStore:sf,useId:Sf,unstable_isNewReconciler:!1};function _t(e,n){if(e&&e.defaultProps){n=q({},n),e=e.defaultProps;for(var o in e)n[o]===void 0&&(n[o]=e[o]);return n}return n}function fl(e,n,o,a){n=e.memoizedState,o=o(a,n),o=o==null?n:q({},n,o),e.memoizedState=o,e.lanes===0&&(e.updateQueue.baseState=o)}var Hs={isMounted:function(e){return(e=e._reactInternals)?$n(e)===e:!1},enqueueSetState:function(e,n,o){e=e._reactInternals;var a=rt(),c=En(e),f=nn(a,c);f.payload=n,o!=null&&(f.callback=o),n=bn(e,f,c),n!==null&&(Mt(n,e,c,a),Ms(n,e,c))},enqueueReplaceState:function(e,n,o){e=e._reactInternals;var a=rt(),c=En(e),f=nn(a,c);f.tag=1,f.payload=n,o!=null&&(f.callback=o),n=bn(e,f,c),n!==null&&(Mt(n,e,c,a),Ms(n,e,c))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var o=rt(),a=En(e),c=nn(o,a);c.tag=2,n!=null&&(c.callback=n),n=bn(e,c,a),n!==null&&(Mt(n,e,a,o),Ms(n,e,a))}};function Nf(e,n,o,a,c,f,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,f,x):n.prototype&&n.prototype.isPureReactComponent?!co(o,a)||!co(c,f):!0}function jf(e,n,o){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(o,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 Rf(e,n,o,a){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(o,a),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(o,a),n.state!==e&&Hs.enqueueReplaceState(n,n.state,null)}function pl(e,n,o,a){var c=e.stateNode;c.props=o,c.state=e.memoizedState,c.refs={},Ja(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"&&(fl(e,n,f,o),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,o,c,a),c.state=e.memoizedState),typeof c.componentDidMount=="function"&&(e.flags|=4194308)}function Nr(e,n){try{var o="",a=n;do o+=z(a),a=a.return;while(a);var c=o}catch(f){c=`
|
|
7
|
+
Error generating stack: `+f.message+`
|
|
8
|
+
`+f.stack}return{value:e,source:n,stack:c,digest:null}}function hl(e,n,o){return{value:e,source:null,stack:o??null,digest:n??null}}function ml(e,n){try{console.error(n.value)}catch(o){setTimeout(function(){throw o})}}var Ty=typeof WeakMap=="function"?WeakMap:Map;function Pf(e,n,o){o=nn(-1,o),o.tag=3,o.payload={element:null};var a=n.value;return o.callback=function(){qs||(qs=!0,Tl=a),ml(e,n)},o}function Tf(e,n,o){o=nn(-1,o),o.tag=3;var a=e.type.getDerivedStateFromError;if(typeof a=="function"){var c=n.value;o.payload=function(){return a(c)},o.callback=function(){ml(e,n)}}var f=e.stateNode;return f!==null&&typeof f.componentDidCatch=="function"&&(o.callback=function(){ml(e,n),typeof a!="function"&&(Cn===null?Cn=new Set([this]):Cn.add(this));var x=n.stack;this.componentDidCatch(n.value,{componentStack:x!==null?x:""})}),o}function _f(e,n,o){var a=e.pingCache;if(a===null){a=e.pingCache=new Ty;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(o)||(c.add(o),e=Ky.bind(null,e,n,o),n.then(e,e))}function Of(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 Af(e,n,o,a,c){return(e.mode&1)===0?(e===n?e.flags|=65536:(e.flags|=128,o.flags|=131072,o.flags&=-52805,o.tag===1&&(o.alternate===null?o.tag=17:(n=nn(-1,1),n.tag=2,bn(o,n,1))),o.lanes|=1),e):(e.flags|=65536,e.lanes=c,e)}var _y=L.ReactCurrentOwner,lt=!1;function nt(e,n,o,a){n.child=e===null?Zd(n,null,o,a):Sr(n,e.child,o,a)}function Mf(e,n,o,a,c){o=o.render;var f=n.ref;return kr(n,c),a=il(e,n,o,a,f,c),o=al(),e!==null&&!lt?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~c,rn(e,n,c)):(_e&&o&&Ba(n),n.flags|=1,nt(e,n,a,c),n.child)}function If(e,n,o,a,c){if(e===null){var f=o.type;return typeof f=="function"&&!Dl(f)&&f.defaultProps===void 0&&o.compare===null&&o.defaultProps===void 0?(n.tag=15,n.type=f,Lf(e,n,f,a,c)):(e=ti(o.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 x=f.memoizedProps;if(o=o.compare,o=o!==null?o:co,o(x,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 Lf(e,n,o,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 gl(e,n,o,a,c)}function Df(e,n,o){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|=o;else{if((o&1073741824)===0)return e=f!==null?f.baseLanes|o:o,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:o,Ne(Rr,mt),mt|=a}else f!==null?(a=f.baseLanes|o,n.memoizedState=null):a=o,Ne(Rr,mt),mt|=a;return nt(e,n,c,o),n.child}function Ff(e,n){var o=n.ref;(e===null&&o!==null||e!==null&&e.ref!==o)&&(n.flags|=512,n.flags|=2097152)}function gl(e,n,o,a,c){var f=at(o)?Un:qe.current;return f=xr(n,f),kr(n,c),o=il(e,n,o,a,f,c),a=al(),e!==null&&!lt?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~c,rn(e,n,c)):(_e&&a&&Ba(n),n.flags|=1,nt(e,n,o,c),n.child)}function $f(e,n,o,a,c){if(at(o)){var f=!0;Ns(n)}else f=!1;if(kr(n,c),n.stateNode===null)Ks(e,n),jf(n,o,a),pl(n,o,a,c),a=!0;else if(e===null){var x=n.stateNode,N=n.memoizedProps;x.props=N;var j=x.context,F=o.contextType;typeof F=="object"&&F!==null?F=St(F):(F=at(o)?Un:qe.current,F=xr(n,F));var V=o.getDerivedStateFromProps,G=typeof V=="function"||typeof x.getSnapshotBeforeUpdate=="function";G||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(N!==a||j!==F)&&Rf(n,x,a,F),wn=!1;var K=n.memoizedState;x.state=K,Is(n,a,x,c),j=n.memoizedState,N!==a||K!==j||it.current||wn?(typeof V=="function"&&(fl(n,o,V,a),j=n.memoizedState),(N=wn||Nf(n,o,N,a,K,j,F))?(G||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(n.flags|=4194308)):(typeof x.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=a,n.memoizedState=j),x.props=a,x.state=j,x.context=F,a=N):(typeof x.componentDidMount=="function"&&(n.flags|=4194308),a=!1)}else{x=n.stateNode,ef(e,n),N=n.memoizedProps,F=n.type===n.elementType?N:_t(n.type,N),x.props=F,G=n.pendingProps,K=x.context,j=o.contextType,typeof j=="object"&&j!==null?j=St(j):(j=at(o)?Un:qe.current,j=xr(n,j));var J=o.getDerivedStateFromProps;(V=typeof J=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(N!==G||K!==j)&&Rf(n,x,a,j),wn=!1,K=n.memoizedState,x.state=K,Is(n,a,x,c);var re=n.memoizedState;N!==G||K!==re||it.current||wn?(typeof J=="function"&&(fl(n,o,J,a),re=n.memoizedState),(F=wn||Nf(n,o,F,a,K,re,j)||!1)?(V||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(a,re,j),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(a,re,j)),typeof x.componentDidUpdate=="function"&&(n.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof x.componentDidUpdate!="function"||N===e.memoizedProps&&K===e.memoizedState||(n.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||N===e.memoizedProps&&K===e.memoizedState||(n.flags|=1024),n.memoizedProps=a,n.memoizedState=re),x.props=a,x.state=re,x.context=j,a=F):(typeof x.componentDidUpdate!="function"||N===e.memoizedProps&&K===e.memoizedState||(n.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||N===e.memoizedProps&&K===e.memoizedState||(n.flags|=1024),a=!1)}return vl(e,n,o,a,f,c)}function vl(e,n,o,a,c,f){Ff(e,n);var x=(n.flags&128)!==0;if(!a&&!x)return c&&Bd(n,o,!1),rn(e,n,f);a=n.stateNode,_y.current=n;var N=x&&typeof o.getDerivedStateFromError!="function"?null:a.render();return n.flags|=1,e!==null&&x?(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&&Bd(n,o,!0),n.child}function zf(e){var n=e.stateNode;n.pendingContext?Ud(e,n.pendingContext,n.pendingContext!==n.context):n.context&&Ud(e,n.context,!1),el(e,n.containerInfo)}function Uf(e,n,o,a,c){return br(),Qa(c),n.flags|=256,nt(e,n,o,a),n.child}var xl={dehydrated:null,treeContext:null,retryLane:0};function yl(e){return{baseLanes:e,cachePool:null,transitions:null}}function Hf(e,n,o){var a=n.pendingProps,c=Oe.current,f=!1,x=(n.flags&128)!==0,N;if((N=x)||(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 Va(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):(x=a.children,e=a.fallback,f?(a=n.mode,f=n.child,x={mode:"hidden",children:x},(a&1)===0&&f!==null?(f.childLanes=0,f.pendingProps=x):f=ni(x,a,0,null),e=Xn(e,a,o,null),f.return=n,e.return=n,f.sibling=e,n.child=f,n.child.memoizedState=yl(o),n.memoizedState=xl,e):wl(n,x));if(c=e.memoizedState,c!==null&&(N=c.dehydrated,N!==null))return Oy(e,n,x,a,N,c,o);if(f){f=a.fallback,x=n.mode,c=e.child,N=c.sibling;var j={mode:"hidden",children:a.children};return(x&1)===0&&n.child!==c?(a=n.child,a.childLanes=0,a.pendingProps=j,n.deletions=null):(a=jn(c,j),a.subtreeFlags=c.subtreeFlags&14680064),N!==null?f=jn(N,f):(f=Xn(f,x,o,null),f.flags|=2),f.return=n,a.return=n,a.sibling=f,n.child=a,a=f,f=n.child,x=e.child.memoizedState,x=x===null?yl(o):{baseLanes:x.baseLanes|o,cachePool:null,transitions:x.transitions},f.memoizedState=x,f.childLanes=e.childLanes&~o,n.memoizedState=xl,a}return f=e.child,e=f.sibling,a=jn(f,{mode:"visible",children:a.children}),(n.mode&1)===0&&(a.lanes=o),a.return=n,a.sibling=null,e!==null&&(o=n.deletions,o===null?(n.deletions=[e],n.flags|=16):o.push(e)),n.child=a,n.memoizedState=null,a}function wl(e,n){return n=ni({mode:"visible",children:n},e.mode,0,null),n.return=e,e.child=n}function Bs(e,n,o,a){return a!==null&&Qa(a),Sr(n,e.child,null,o),e=wl(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function Oy(e,n,o,a,c,f,x){if(o)return n.flags&256?(n.flags&=-257,a=hl(Error(s(422))),Bs(e,n,x,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,x,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,x),n.child.memoizedState=yl(x),n.memoizedState=xl,f);if((n.mode&1)===0)return Bs(e,n,x,null);if(c.data==="$!"){if(a=c.nextSibling&&c.nextSibling.dataset,a)var N=a.dgst;return a=N,f=Error(s(419)),a=hl(f,a,void 0),Bs(e,n,x,a)}if(N=(x&e.childLanes)!==0,lt||N){if(a=Ke,a!==null){switch(x&-x){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|x))!==0?0:c,c!==0&&c!==f.retryLane&&(f.retryLane=c,tn(e,c),Mt(a,e,c,-1))}return Ll(),a=hl(Error(s(421))),Bs(e,n,x,a)}return c.data==="$?"?(n.flags|=128,n.child=e.child,n=Wy.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=wl(n,a.children),n.flags|=4096,n)}function Bf(e,n,o){e.lanes|=n;var a=e.alternate;a!==null&&(a.lanes|=n),Xa(e.return,n,o)}function bl(e,n,o,a,c){var f=e.memoizedState;f===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:a,tail:o,tailMode:c}:(f.isBackwards=n,f.rendering=null,f.renderingStartTime=0,f.last=a,f.tail=o,f.tailMode=c)}function Kf(e,n,o){var a=n.pendingProps,c=a.revealOrder,f=a.tail;if(nt(e,n,a.children,o),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&&Bf(e,o,n);else if(e.tag===19)Bf(e,o,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(o=n.child,c=null;o!==null;)e=o.alternate,e!==null&&Ls(e)===null&&(c=o),o=o.sibling;o=c,o===null?(c=n.child,n.child=null):(c=o.sibling,o.sibling=null),bl(n,!1,c,o,f);break;case"backwards":for(o=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=o,o=c,c=e}bl(n,!0,o,null,f);break;case"together":bl(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function Ks(e,n){(n.mode&1)===0&&e!==null&&(e.alternate=null,n.alternate=null,n.flags|=2)}function rn(e,n,o){if(e!==null&&(n.dependencies=e.dependencies),Qn|=n.lanes,(o&n.childLanes)===0)return null;if(e!==null&&n.child!==e.child)throw Error(s(153));if(n.child!==null){for(e=n.child,o=jn(e,e.pendingProps),n.child=o,o.return=n;e.sibling!==null;)e=e.sibling,o=o.sibling=jn(e,e.pendingProps),o.return=n;o.sibling=null}return n.child}function Ay(e,n,o){switch(n.tag){case 3:zf(n),br();break;case 5:rf(n);break;case 1:at(n.type)&&Ns(n);break;case 4:el(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):(o&n.child.childLanes)!==0?Hf(e,n,o):(Ne(Oe,Oe.current&1),e=rn(e,n,o),e!==null?e.sibling:null);Ne(Oe,Oe.current&1);break;case 19:if(a=(o&n.childLanes)!==0,(e.flags&128)!==0){if(a)return Kf(e,n,o);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,Df(e,n,o)}return rn(e,n,o)}var Wf,Sl,Vf,Qf;Wf=function(e,n){for(var o=n.child;o!==null;){if(o.tag===5||o.tag===6)e.appendChild(o.stateNode);else if(o.tag!==4&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===n)break;for(;o.sibling===null;){if(o.return===null||o.return===n)return;o=o.return}o.sibling.return=o.return,o=o.sibling}},Sl=function(){},Vf=function(e,n,o,a){var c=e.memoizedProps;if(c!==a){e=n.stateNode,Wn(Ht.current);var f=null;switch(o){case"input":c=Xi(e,c),a=Xi(e,a),f=[];break;case"select":c=q({},c,{value:void 0}),a=q({},a,{value:void 0}),f=[];break;case"textarea":c=ea(e,c),a=ea(e,a),f=[];break;default:typeof c.onClick!="function"&&typeof a.onClick=="function"&&(e.onclick=Cs)}na(o,a);var x;o=null;for(F in c)if(!a.hasOwnProperty(F)&&c.hasOwnProperty(F)&&c[F]!=null)if(F==="style"){var N=c[F];for(x in N)N.hasOwnProperty(x)&&(o||(o={}),o[x]="")}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 j=a[F];if(N=c?.[F],a.hasOwnProperty(F)&&j!==N&&(j!=null||N!=null))if(F==="style")if(N){for(x in N)!N.hasOwnProperty(x)||j&&j.hasOwnProperty(x)||(o||(o={}),o[x]="");for(x in j)j.hasOwnProperty(x)&&N[x]!==j[x]&&(o||(o={}),o[x]=j[x])}else o||(f||(f=[]),f.push(F,o)),o=j;else F==="dangerouslySetInnerHTML"?(j=j?j.__html:void 0,N=N?N.__html:void 0,j!=null&&N!==j&&(f=f||[]).push(F,j)):F==="children"?typeof j!="string"&&typeof j!="number"||(f=f||[]).push(F,""+j):F!=="suppressContentEditableWarning"&&F!=="suppressHydrationWarning"&&(u.hasOwnProperty(F)?(j!=null&&F==="onScroll"&&Re("scroll",e),f||N===j||(f=[])):(f=f||[]).push(F,j))}o&&(f=f||[]).push("style",o);var F=f;(n.updateQueue=F)&&(n.flags|=4)}},Qf=function(e,n,o,a){o!==a&&(n.flags|=4)};function No(e,n){if(!_e)switch(e.tailMode){case"hidden":n=e.tail;for(var o=null;n!==null;)n.alternate!==null&&(o=n),n=n.sibling;o===null?e.tail=null:o.sibling=null;break;case"collapsed":o=e.tail;for(var a=null;o!==null;)o.alternate!==null&&(a=o),o=o.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,o=0,a=0;if(n)for(var c=e.child;c!==null;)o|=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;)o|=c.lanes|c.childLanes,a|=c.subtreeFlags,a|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=a,e.childLanes=o,n}function My(e,n,o){var a=n.pendingProps;switch(Ka(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),rl(),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&&(Al(Tt),Tt=null))),Sl(e,n),Xe(n),null;case 5:tl(n);var c=Wn(bo.current);if(o=n.type,e!==null&&n.stateNode!=null)Vf(e,n,o,a,c),e.ref!==n.ref&&(n.flags|=512,n.flags|=2097152);else{if(!a){if(n.stateNode===null)throw Error(s(166));return Xe(n),null}if(e=Wn(Ht.current),Ts(n)){a=n.stateNode,o=n.type;var f=n.memoizedProps;switch(a[Ut]=n,a[go]=f,e=(n.mode&1)!==0,o){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":Nc(a,f),Re("invalid",a);break;case"select":a._wrapperState={wasMultiple:!!f.multiple},Re("invalid",a);break;case"textarea":Pc(a,f),Re("invalid",a)}na(o,f),c=null;for(var x in f)if(f.hasOwnProperty(x)){var N=f[x];x==="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(x)&&N!=null&&x==="onScroll"&&Re("scroll",a)}switch(o){case"input":sr(a),Rc(a,f,!0);break;case"textarea":sr(a),_c(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{x=c.nodeType===9?c:c.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Oc(o)),e==="http://www.w3.org/1999/xhtml"?o==="script"?(e=x.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof a.is=="string"?e=x.createElement(o,{is:a.is}):(e=x.createElement(o),o==="select"&&(x=e,a.multiple?x.multiple=!0:a.size&&(x.size=a.size))):e=x.createElementNS(e,o),e[Ut]=n,e[go]=a,Wf(e,n,!1,!1),n.stateNode=e;e:{switch(x=ra(o,a),o){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":Nc(e,a),c=Xi(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":Pc(e,a),c=ea(e,a),Re("invalid",e);break;default:c=a}na(o,c),N=c;for(f in N)if(N.hasOwnProperty(f)){var j=N[f];f==="style"?Ic(e,j):f==="dangerouslySetInnerHTML"?(j=j?j.__html:void 0,j!=null&&Ac(e,j)):f==="children"?typeof j=="string"?(o!=="textarea"||j!=="")&&Qr(e,j):typeof j=="number"&&Qr(e,""+j):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(u.hasOwnProperty(f)?j!=null&&f==="onScroll"&&Re("scroll",e):j!=null&&_(e,f,j,x))}switch(o){case"input":sr(e),Rc(e,a,!1);break;case"textarea":sr(e),_c(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(o){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)Qf(e,n,e.memoizedProps,a);else{if(typeof a!="string"&&n.stateNode===null)throw Error(s(166));if(o=Wn(bo.current),Wn(Ht.current),Ts(n)){if(a=n.stateNode,o=n.memoizedProps,a[Ut]=n,(f=a.nodeValue!==o)&&(e=pt,e!==null))switch(e.tag){case 3:Ss(a.nodeValue,o,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ss(a.nodeValue,o,(e.mode&1)!==0)}f&&(n.flags|=4)}else a=(o.nodeType===9?o:o.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)qd(),br(),n.flags|=98560,f=!1;else if(f=Ts(n),a!==null&&a.dehydrated!==null){if(e===null){if(!f)throw Error(s(318));if(f=n.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(s(317));f[Ut]=n}else br(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Xe(n),f=!1}else Tt!==null&&(Al(Tt),Tt=null),f=!0;if(!f)return n.flags&65536?n:null}return(n.flags&128)!==0?(n.lanes=o,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):Ll())),n.updateQueue!==null&&(n.flags|=4),Xe(n),null);case 4:return Er(),Sl(e,n),e===null&&ho(n.stateNode.containerInfo),Xe(n),null;case 10:return Ya(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,x=f.rendering,x===null)if(a)No(f,!1);else{if(ze!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(x=Ls(e),x!==null){for(n.flags|=128,No(f,!1),a=x.updateQueue,a!==null&&(n.updateQueue=a,n.flags|=4),n.subtreeFlags=0,a=o,o=n.child;o!==null;)f=o,e=a,f.flags&=14680066,x=f.alternate,x===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=x.childLanes,f.lanes=x.lanes,f.child=x.child,f.subtreeFlags=0,f.deletions=null,f.memoizedProps=x.memoizedProps,f.memoizedState=x.memoizedState,f.updateQueue=x.updateQueue,f.type=x.type,e=x.dependencies,f.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),o=o.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(x),e!==null){if(n.flags|=128,a=!0,o=e.updateQueue,o!==null&&(n.updateQueue=o,n.flags|=4),No(f,!0),f.tail===null&&f.tailMode==="hidden"&&!x.alternate&&!_e)return Xe(n),null}else 2*Ie()-f.renderingStartTime>Pr&&o!==1073741824&&(n.flags|=128,a=!0,No(f,!1),n.lanes=4194304);f.isBackwards?(x.sibling=n.child,n.child=x):(o=f.last,o!==null?o.sibling=x:n.child=x,f.last=x)}return f.tail!==null?(n=f.tail,f.rendering=n,f.tail=n.sibling,f.renderingStartTime=Ie(),n.sibling=null,o=Oe.current,Ne(Oe,a?o&1|2:o&1),n):(Xe(n),null);case 22:case 23:return Il(),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(s(156,n.tag))}function Iy(e,n){switch(Ka(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),rl(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 5:return tl(n),null;case 13:if(Pe(Oe),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(s(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 Ya(n.type._context),null;case 22:case 23:return Il(),null;case 24:return null;default:return null}}var Ws=!1,Ze=!1,Ly=typeof WeakSet=="function"?WeakSet:Set,te=null;function jr(e,n){var o=e.ref;if(o!==null)if(typeof o=="function")try{o(null)}catch(a){Me(e,n,a)}else o.current=null}function Cl(e,n,o){try{o()}catch(a){Me(e,n,a)}}var Gf=!1;function Dy(e,n){if(Ia=ds,e=Ed(),ja(e)){if("selectionStart"in e)var o={start:e.selectionStart,end:e.selectionEnd};else e:{o=(o=e.ownerDocument)&&o.defaultView||window;var a=o.getSelection&&o.getSelection();if(a&&a.rangeCount!==0){o=a.anchorNode;var c=a.anchorOffset,f=a.focusNode;a=a.focusOffset;try{o.nodeType,f.nodeType}catch{o=null;break e}var x=0,N=-1,j=-1,F=0,V=0,G=e,K=null;t:for(;;){for(var J;G!==o||c!==0&&G.nodeType!==3||(N=x+c),G!==f||a!==0&&G.nodeType!==3||(j=x+a),G.nodeType===3&&(x+=G.nodeValue.length),(J=G.firstChild)!==null;)K=G,G=J;for(;;){if(G===e)break t;if(K===o&&++F===c&&(N=x),K===f&&++V===a&&(j=x),(J=G.nextSibling)!==null)break;G=K,K=G.parentNode}G=J}o=N===-1||j===-1?null:{start:N,end:j}}else o=null}o=o||{start:0,end:0}}else o=null;for(La={focusedElem:e,selectionRange:o},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 I=n.stateNode.containerInfo;I.nodeType===1?I.textContent="":I.nodeType===9&&I.documentElement&&I.removeChild(I.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(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=Gf,Gf=!1,re}function jo(e,n,o){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&&Cl(n,o,f)}c=c.next}while(c!==a)}}function Vs(e,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var o=n=n.next;do{if((o.tag&e)===e){var a=o.create;o.destroy=a()}o=o.next}while(o!==n)}}function kl(e){var n=e.ref;if(n!==null){var o=e.stateNode;e.tag,e=o,typeof n=="function"?n(e):n.current=e}}function qf(e){var n=e.alternate;n!==null&&(e.alternate=null,qf(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[za],delete n[yy],delete n[wy])),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 Yf(e){return e.tag===5||e.tag===3||e.tag===4}function Xf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Yf(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 El(e,n,o){var a=e.tag;if(a===5||a===6)e=e.stateNode,n?o.nodeType===8?o.parentNode.insertBefore(e,n):o.insertBefore(e,n):(o.nodeType===8?(n=o.parentNode,n.insertBefore(e,o)):(n=o,n.appendChild(e)),o=o._reactRootContainer,o!=null||n.onclick!==null||(n.onclick=Cs));else if(a!==4&&(e=e.child,e!==null))for(El(e,n,o),e=e.sibling;e!==null;)El(e,n,o),e=e.sibling}function Nl(e,n,o){var a=e.tag;if(a===5||a===6)e=e.stateNode,n?o.insertBefore(e,n):o.appendChild(e);else if(a!==4&&(e=e.child,e!==null))for(Nl(e,n,o),e=e.sibling;e!==null;)Nl(e,n,o),e=e.sibling}var Ve=null,Ot=!1;function Sn(e,n,o){for(o=o.child;o!==null;)Zf(e,n,o),o=o.sibling}function Zf(e,n,o){if(zt&&typeof zt.onCommitFiberUnmount=="function")try{zt.onCommitFiberUnmount(ss,o)}catch{}switch(o.tag){case 5:Ze||jr(o,n);case 6:var a=Ve,c=Ot;Ve=null,Sn(e,n,o),Ve=a,Ot=c,Ve!==null&&(Ot?(e=Ve,o=o.stateNode,e.nodeType===8?e.parentNode.removeChild(o):e.removeChild(o)):Ve.removeChild(o.stateNode));break;case 18:Ve!==null&&(Ot?(e=Ve,o=o.stateNode,e.nodeType===8?$a(e.parentNode,o):e.nodeType===1&&$a(e,o),oo(e)):$a(Ve,o.stateNode));break;case 4:a=Ve,c=Ot,Ve=o.stateNode.containerInfo,Ot=!0,Sn(e,n,o),Ve=a,Ot=c;break;case 0:case 11:case 14:case 15:if(!Ze&&(a=o.updateQueue,a!==null&&(a=a.lastEffect,a!==null))){c=a=a.next;do{var f=c,x=f.destroy;f=f.tag,x!==void 0&&((f&2)!==0||(f&4)!==0)&&Cl(o,n,x),c=c.next}while(c!==a)}Sn(e,n,o);break;case 1:if(!Ze&&(jr(o,n),a=o.stateNode,typeof a.componentWillUnmount=="function"))try{a.props=o.memoizedProps,a.state=o.memoizedState,a.componentWillUnmount()}catch(N){Me(o,n,N)}Sn(e,n,o);break;case 21:Sn(e,n,o);break;case 22:o.mode&1?(Ze=(a=Ze)||o.memoizedState!==null,Sn(e,n,o),Ze=a):Sn(e,n,o);break;default:Sn(e,n,o)}}function Jf(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var o=e.stateNode;o===null&&(o=e.stateNode=new Ly),n.forEach(function(a){var c=Vy.bind(null,e,a);o.has(a)||(o.add(a),a.then(c,c))})}}function At(e,n){var o=n.deletions;if(o!==null)for(var a=0;a<o.length;a++){var c=o[a];try{var f=e,x=n,N=x;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(s(160));Zf(f,x,c),Ve=null,Ot=!1;var j=c.alternate;j!==null&&(j.return=null),c.return=null}catch(F){Me(c,n,F)}}if(n.subtreeFlags&12854)for(n=n.child;n!==null;)ep(n,e),n=n.sibling}function ep(e,n){var o=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(At(n,e),Kt(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),Kt(e),a&512&&o!==null&&jr(o,o.return);break;case 5:if(At(n,e),Kt(e),a&512&&o!==null&&jr(o,o.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,x=o!==null?o.memoizedProps:f,N=e.type,j=e.updateQueue;if(e.updateQueue=null,j!==null)try{N==="input"&&f.type==="radio"&&f.name!=null&&jc(c,f),ra(N,x);var F=ra(N,f);for(x=0;x<j.length;x+=2){var V=j[x],G=j[x+1];V==="style"?Ic(c,G):V==="dangerouslySetInnerHTML"?Ac(c,G):V==="children"?Qr(c,G):_(c,V,G,F)}switch(N){case"input":Zi(c,f);break;case"textarea":Tc(c,f);break;case"select":var K=c._wrapperState.wasMultiple;c._wrapperState.wasMultiple=!!f.multiple;var J=f.value;J!=null?ir(c,!!f.multiple,J,!1):K!==!!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),Kt(e),a&4){if(e.stateNode===null)throw Error(s(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),Kt(e),a&4&&o!==null&&o.memoizedState.isDehydrated)try{oo(n.containerInfo)}catch(oe){Me(e,e.return,oe)}break;case 4:At(n,e),Kt(e);break;case 13:At(n,e),Kt(e),c=e.child,c.flags&8192&&(f=c.memoizedState!==null,c.stateNode.isHidden=f,!f||c.alternate!==null&&c.alternate.memoizedState!==null||(Pl=Ie())),a&4&&Jf(e);break;case 22:if(V=o!==null&&o.memoizedState!==null,e.mode&1?(Ze=(F=Ze)||V,At(n,e),Ze=F):At(n,e),Kt(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(K=te,J=K.child,K.tag){case 0:case 11:case 14:case 15:jo(4,K,K.return);break;case 1:jr(K,K.return);var re=K.stateNode;if(typeof re.componentWillUnmount=="function"){a=K,o=K.return;try{n=a,re.props=n.memoizedProps,re.state=n.memoizedState,re.componentWillUnmount()}catch(oe){Me(a,o,oe)}}break;case 5:jr(K,K.return);break;case 22:if(K.memoizedState!==null){rp(G);continue}}J!==null?(J.return=K,te=J):rp(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,j=G.memoizedProps.style,x=j!=null&&j.hasOwnProperty("display")?j.display:null,N.style.display=Mc("display",x))}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),Kt(e),a&4&&Jf(e);break;case 21:break;default:At(n,e),Kt(e)}}function Kt(e){var n=e.flags;if(n&2){try{e:{for(var o=e.return;o!==null;){if(Yf(o)){var a=o;break e}o=o.return}throw Error(s(160))}switch(a.tag){case 5:var c=a.stateNode;a.flags&32&&(Qr(c,""),a.flags&=-33);var f=Xf(e);Nl(e,f,c);break;case 3:case 4:var x=a.stateNode.containerInfo,N=Xf(e);El(e,N,x);break;default:throw Error(s(161))}}catch(j){Me(e,e.return,j)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function Fy(e,n,o){te=e,tp(e)}function tp(e,n,o){for(var a=(e.mode&1)!==0;te!==null;){var c=te,f=c.child;if(c.tag===22&&a){var x=c.memoizedState!==null||Ws;if(!x){var N=c.alternate,j=N!==null&&N.memoizedState!==null||Ze;N=Ws;var F=Ze;if(Ws=x,(Ze=j)&&!F)for(te=c;te!==null;)x=te,j=x.child,x.tag===22&&x.memoizedState!==null?op(c):j!==null?(j.return=x,te=j):op(c);for(;f!==null;)te=f,tp(f),f=f.sibling;te=c,Ws=N,Ze=F}np(e)}else(c.subtreeFlags&8772)!==0&&f!==null?(f.return=c,te=f):np(e)}}function np(e){for(;te!==null;){var n=te;if((n.flags&8772)!==0){var o=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(o===null)a.componentDidMount();else{var c=n.elementType===n.type?o.memoizedProps:_t(n.type,o.memoizedProps);a.componentDidUpdate(c,o.memoizedState,a.__reactInternalSnapshotBeforeUpdate)}var f=n.updateQueue;f!==null&&nf(n,f,a);break;case 3:var x=n.updateQueue;if(x!==null){if(o=null,n.child!==null)switch(n.child.tag){case 5:o=n.child.stateNode;break;case 1:o=n.child.stateNode}nf(n,x,o)}break;case 5:var N=n.stateNode;if(o===null&&n.flags&4){o=N;var j=n.memoizedProps;switch(n.type){case"button":case"input":case"select":case"textarea":j.autoFocus&&o.focus();break;case"img":j.src&&(o.src=j.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(s(163))}Ze||n.flags&512&&kl(n)}catch(K){Me(n,n.return,K)}}if(n===e){te=null;break}if(o=n.sibling,o!==null){o.return=n.return,te=o;break}te=n.return}}function rp(e){for(;te!==null;){var n=te;if(n===e){te=null;break}var o=n.sibling;if(o!==null){o.return=n.return,te=o;break}te=n.return}}function op(e){for(;te!==null;){var n=te;try{switch(n.tag){case 0:case 11:case 15:var o=n.return;try{Vs(4,n)}catch(j){Me(n,o,j)}break;case 1:var a=n.stateNode;if(typeof a.componentDidMount=="function"){var c=n.return;try{a.componentDidMount()}catch(j){Me(n,c,j)}}var f=n.return;try{kl(n)}catch(j){Me(n,f,j)}break;case 5:var x=n.return;try{kl(n)}catch(j){Me(n,x,j)}}}catch(j){Me(n,n.return,j)}if(n===e){te=null;break}var N=n.sibling;if(N!==null){N.return=n.return,te=N;break}te=n.return}}var $y=Math.ceil,Qs=L.ReactCurrentDispatcher,jl=L.ReactCurrentOwner,kt=L.ReactCurrentBatchConfig,Se=0,Ke=null,Fe=null,Qe=0,mt=0,Rr=vn(0),ze=0,Ro=null,Qn=0,Gs=0,Rl=0,Po=null,ut=null,Pl=0,Pr=1/0,on=null,qs=!1,Tl=null,Cn=null,Ys=!1,kn=null,Xs=0,To=0,_l=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:Sy.transition!==null?(Js===0&&(Js=Yc()),Js):(e=ke,e!==0||(e=window.event,e=e===void 0?16:sd(e.type)),e)}function Mt(e,n,o,a){if(50<To)throw To=0,_l=null,Error(s(185));Jr(e,o,a),((Se&2)===0||e!==Ke)&&(e===Ke&&((Se&2)===0&&(Gs|=o),ze===4&&Nn(e,Qe)),ct(e,a),o===1&&Se===0&&(n.mode&1)===0&&(Pr=Ie()+500,js&&yn()))}function ct(e,n){var o=e.callbackNode;Sx(e,n);var a=ls(e,e===Ke?Qe:0);if(a===0)o!==null&&Qc(o),e.callbackNode=null,e.callbackPriority=0;else if(n=a&-a,e.callbackPriority!==n){if(o!=null&&Qc(o),n===1)e.tag===0?by(ip.bind(null,e)):Kd(ip.bind(null,e)),vy(function(){(Se&6)===0&&yn()}),o=null;else{switch(Xc(a)){case 1:o=ca;break;case 4:o=Gc;break;case 16:o=os;break;case 536870912:o=qc;break;default:o=os}o=hp(o,sp.bind(null,e))}e.callbackPriority=n,e.callbackNode=o}}function sp(e,n){if(Zs=-1,Js=0,(Se&6)!==0)throw Error(s(327));var o=e.callbackNode;if(Tr()&&e.callbackNode!==o)return null;var a=ls(e,e===Ke?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=lp();(Ke!==e||Qe!==n)&&(on=null,Pr=Ie()+500,qn(e,n));do try{Hy();break}catch(N){ap(e,N)}while(!0);qa(),Qs.current=f,Se=c,Fe!==null?n=0:(Ke=null,Qe=0,n=ze)}if(n!==0){if(n===2&&(c=da(e),c!==0&&(a=c,n=Ol(e,c))),n===1)throw o=Ro,qn(e,0),Nn(e,a),ct(e,Ie()),o;if(n===6)Nn(e,a);else{if(c=e.current.alternate,(a&30)===0&&!zy(c)&&(n=ei(e,a),n===2&&(f=da(e),f!==0&&(a=f,n=Ol(e,f))),n===1))throw o=Ro,qn(e,0),Nn(e,a),ct(e,Ie()),o;switch(e.finishedWork=c,e.finishedLanes=a,n){case 0:case 1:throw Error(s(345));case 2:Yn(e,ut,on);break;case 3:if(Nn(e,a),(a&130023424)===a&&(n=Pl+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=Fa(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 x=31-Rt(a);f=1<<x,x=n[x],x>c&&(c=x),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*$y(a/1960))-a,10<a){e.timeoutHandle=Fa(Yn.bind(null,e,ut,on),a);break}Yn(e,ut,on);break;case 5:Yn(e,ut,on);break;default:throw Error(s(329))}}}return ct(e,Ie()),e.callbackNode===o?sp.bind(null,e):null}function Ol(e,n){var o=Po;return e.current.memoizedState.isDehydrated&&(qn(e,n).flags|=256),e=ei(e,n),e!==2&&(n=ut,ut=o,n!==null&&Al(n)),e}function Al(e){ut===null?ut=e:ut.push.apply(ut,e)}function zy(e){for(var n=e;;){if(n.flags&16384){var o=n.updateQueue;if(o!==null&&(o=o.stores,o!==null))for(var a=0;a<o.length;a++){var c=o[a],f=c.getSnapshot;c=c.value;try{if(!Pt(f(),c))return!1}catch{return!1}}}if(o=n.child,n.subtreeFlags&16384&&o!==null)o.return=n,n=o;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&=~Rl,n&=~Gs,e.suspendedLanes|=n,e.pingedLanes&=~n,e=e.expirationTimes;0<n;){var o=31-Rt(n),a=1<<o;e[o]=-1,n&=~a}}function ip(e){if((Se&6)!==0)throw Error(s(327));Tr();var n=ls(e,0);if((n&1)===0)return ct(e,Ie()),null;var o=ei(e,n);if(e.tag!==0&&o===2){var a=da(e);a!==0&&(n=a,o=Ol(e,a))}if(o===1)throw o=Ro,qn(e,0),Nn(e,n),ct(e,Ie()),o;if(o===6)throw Error(s(345));return e.finishedWork=e.current.alternate,e.finishedLanes=n,Yn(e,ut,on),ct(e,Ie()),null}function Ml(e,n){var o=Se;Se|=1;try{return e(n)}finally{Se=o,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 o=kt.transition,a=ke;try{if(kt.transition=null,ke=1,e)return e()}finally{ke=a,kt.transition=o,Se=n,(Se&6)===0&&yn()}}function Il(){mt=Rr.current,Pe(Rr)}function qn(e,n){e.finishedWork=null,e.finishedLanes=0;var o=e.timeoutHandle;if(o!==-1&&(e.timeoutHandle=-1,gy(o)),Fe!==null)for(o=Fe.return;o!==null;){var a=o;switch(Ka(a),a.tag){case 1:a=a.type.childContextTypes,a!=null&&Es();break;case 3:Er(),Pe(it),Pe(qe),rl();break;case 5:tl(a);break;case 4:Er();break;case 13:Pe(Oe);break;case 19:Pe(Oe);break;case 10:Ya(a.type._context);break;case 22:case 23:Il()}o=o.return}if(Ke=e,Fe=e=jn(e.current,null),Qe=mt=n,ze=0,Ro=null,Rl=Gs=Qn=0,ut=Po=null,Kn!==null){for(n=0;n<Kn.length;n++)if(o=Kn[n],a=o.interleaved,a!==null){o.interleaved=null;var c=a.next,f=o.pending;if(f!==null){var x=f.next;f.next=c,a.next=x}o.pending=a}Kn=null}return e}function ap(e,n){do{var o=Fe;try{if(qa(),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,jl.current=null,o===null||o.return===null){ze=1,Ro=n,Fe=null;break}e:{var f=e,x=o.return,N=o,j=n;if(n=Qe,N.flags|=32768,j!==null&&typeof j=="object"&&typeof j.then=="function"){var F=j,V=N,G=V.tag;if((V.mode&1)===0&&(G===0||G===11||G===15)){var K=V.alternate;K?(V.updateQueue=K.updateQueue,V.memoizedState=K.memoizedState,V.lanes=K.lanes):(V.updateQueue=null,V.memoizedState=null)}var J=Of(x);if(J!==null){J.flags&=-257,Af(J,x,N,f,n),J.mode&1&&_f(f,F,n),n=J,j=F;var re=n.updateQueue;if(re===null){var oe=new Set;oe.add(j),n.updateQueue=oe}else re.add(j);break e}else{if((n&1)===0){_f(f,F,n),Ll();break e}j=Error(s(426))}}else if(_e&&N.mode&1){var Le=Of(x);if(Le!==null){(Le.flags&65536)===0&&(Le.flags|=256),Af(Le,x,N,f,n),Qa(Nr(j,N));break e}}f=j=Nr(j,N),ze!==4&&(ze=2),Po===null?Po=[f]:Po.push(f),f=x;do{switch(f.tag){case 3:f.flags|=65536,n&=-n,f.lanes|=n;var M=Pf(f,j,n);tf(f,M);break e;case 1:N=j;var T=f.type,I=f.stateNode;if((f.flags&128)===0&&(typeof T.getDerivedStateFromError=="function"||I!==null&&typeof I.componentDidCatch=="function"&&(Cn===null||!Cn.has(I)))){f.flags|=65536,n&=-n,f.lanes|=n;var Y=Tf(f,N,n);tf(f,Y);break e}}f=f.return}while(f!==null)}cp(o)}catch(ie){n=ie,Fe===o&&o!==null&&(Fe=o=o.return);continue}break}while(!0)}function lp(){var e=Qs.current;return Qs.current=Us,e===null?Us:e}function Ll(){(ze===0||ze===3||ze===2)&&(ze=4),Ke===null||(Qn&268435455)===0&&(Gs&268435455)===0||Nn(Ke,Qe)}function ei(e,n){var o=Se;Se|=2;var a=lp();(Ke!==e||Qe!==n)&&(on=null,qn(e,n));do try{Uy();break}catch(c){ap(e,c)}while(!0);if(qa(),Se=o,Qs.current=a,Fe!==null)throw Error(s(261));return Ke=null,Qe=0,ze}function Uy(){for(;Fe!==null;)up(Fe)}function Hy(){for(;Fe!==null&&!px();)up(Fe)}function up(e){var n=pp(e.alternate,e,mt);e.memoizedProps=e.pendingProps,n===null?cp(e):Fe=n,jl.current=null}function cp(e){var n=e;do{var o=n.alternate;if(e=n.return,(n.flags&32768)===0){if(o=My(o,n,mt),o!==null){Fe=o;return}}else{if(o=Iy(o,n),o!==null){o.flags&=32767,Fe=o;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,o){var a=ke,c=kt.transition;try{kt.transition=null,ke=1,By(e,n,o,a)}finally{kt.transition=c,ke=a}return null}function By(e,n,o,a){do Tr();while(kn!==null);if((Se&6)!==0)throw Error(s(327));o=e.finishedWork;var c=e.finishedLanes;if(o===null)return null;if(e.finishedWork=null,e.finishedLanes=0,o===e.current)throw Error(s(177));e.callbackNode=null,e.callbackPriority=0;var f=o.lanes|o.childLanes;if(Cx(e,f),e===Ke&&(Fe=Ke=null,Qe=0),(o.subtreeFlags&2064)===0&&(o.flags&2064)===0||Ys||(Ys=!0,hp(os,function(){return Tr(),null})),f=(o.flags&15990)!==0,(o.subtreeFlags&15990)!==0||f){f=kt.transition,kt.transition=null;var x=ke;ke=1;var N=Se;Se|=4,jl.current=null,Dy(e,o),ep(o,e),uy(La),ds=!!Ia,La=Ia=null,e.current=o,Fy(o),hx(),Se=N,ke=x,kt.transition=f}else e.current=o;if(Ys&&(Ys=!1,kn=e,Xs=c),f=e.pendingLanes,f===0&&(Cn=null),vx(o.stateNode),ct(e,Ie()),n!==null)for(a=e.onRecoverableError,o=0;o<n.length;o++)c=n[o],a(c.value,{componentStack:c.stack,digest:c.digest});if(qs)throw qs=!1,e=Tl,Tl=null,e;return(Xs&1)!==0&&e.tag!==0&&Tr(),f=e.pendingLanes,(f&1)!==0?e===_l?To++:(To=0,_l=e):To=0,yn(),null}function Tr(){if(kn!==null){var e=Xc(Xs),n=kt.transition,o=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(s(331));var c=Se;for(Se|=4,te=e.current;te!==null;){var f=te,x=f.child;if((te.flags&16)!==0){var N=f.deletions;if(N!==null){for(var j=0;j<N.length;j++){var F=N[j];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 K=V.sibling,J=V.return;if(qf(V),V===F){te=null;break}if(K!==null){K.return=J,te=K;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&&x!==null)x.return=f,te=x;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;){x=te;var I=x.child;if((x.subtreeFlags&2064)!==0&&I!==null)I.return=x,te=I;else e:for(x=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===x){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=o,kt.transition=n}}return!1}function dp(e,n,o){n=Nr(o,n),n=Pf(e,n,1),e=bn(e,n,1),n=rt(),e!==null&&(Jr(e,1,n),ct(e,n))}function Me(e,n,o){if(e.tag===3)dp(e,e,o);else for(;n!==null;){if(n.tag===3){dp(n,e,o);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(o,e),e=Tf(n,e,1),n=bn(n,e,1),e=rt(),n!==null&&(Jr(n,1,e),ct(n,e));break}}n=n.return}}function Ky(e,n,o){var a=e.pingCache;a!==null&&a.delete(n),n=rt(),e.pingedLanes|=e.suspendedLanes&o,Ke===e&&(Qe&o)===o&&(ze===4||ze===3&&(Qe&130023424)===Qe&&500>Ie()-Pl?qn(e,0):Rl|=o),ct(e,n)}function fp(e,n){n===0&&((e.mode&1)===0?n=1:(n=as,as<<=1,(as&130023424)===0&&(as=4194304)));var o=rt();e=tn(e,n),e!==null&&(Jr(e,n,o),ct(e,o))}function Wy(e){var n=e.memoizedState,o=0;n!==null&&(o=n.retryLane),fp(e,o)}function Vy(e,n){var o=0;switch(e.tag){case 13:var a=e.stateNode,c=e.memoizedState;c!==null&&(o=c.retryLane);break;case 19:a=e.stateNode;break;default:throw Error(s(314))}a!==null&&a.delete(n),fp(e,o)}var pp;pp=function(e,n,o){if(e!==null)if(e.memoizedProps!==n.pendingProps||it.current)lt=!0;else{if((e.lanes&o)===0&&(n.flags&128)===0)return lt=!1,Ay(e,n,o);lt=(e.flags&131072)!==0}else lt=!1,_e&&(n.flags&1048576)!==0&&Wd(n,Ps,n.index);switch(n.lanes=0,n.tag){case 2:var a=n.type;Ks(e,n),e=n.pendingProps;var c=xr(n,qe.current);kr(n,o),c=il(null,n,a,e,c,o);var f=al();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,Ja(n),c.updater=Hs,n.stateNode=c,c._reactInternals=n,pl(n,a,e,o),n=vl(null,n,a,!0,f,o)):(n.tag=0,_e&&f&&Ba(n),nt(null,n,c,o),n=n.child),n;case 16:a=n.elementType;e:{switch(Ks(e,n),e=n.pendingProps,c=a._init,a=c(a._payload),n.type=a,c=n.tag=Gy(a),e=_t(a,e),c){case 0:n=gl(null,n,a,e,o);break e;case 1:n=$f(null,n,a,e,o);break e;case 11:n=Mf(null,n,a,e,o);break e;case 14:n=If(null,n,a,_t(a.type,e),o);break e}throw Error(s(306,a,""))}return n;case 0:return a=n.type,c=n.pendingProps,c=n.elementType===a?c:_t(a,c),gl(e,n,a,c,o);case 1:return a=n.type,c=n.pendingProps,c=n.elementType===a?c:_t(a,c),$f(e,n,a,c,o);case 3:e:{if(zf(n),e===null)throw Error(s(387));a=n.pendingProps,f=n.memoizedState,c=f.element,ef(e,n),Is(n,a,null,o);var x=n.memoizedState;if(a=x.element,f.isDehydrated)if(f={element:a,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},n.updateQueue.baseState=f,n.memoizedState=f,n.flags&256){c=Nr(Error(s(423)),n),n=Uf(e,n,a,o,c);break e}else if(a!==c){c=Nr(Error(s(424)),n),n=Uf(e,n,a,o,c);break e}else for(ht=gn(n.stateNode.containerInfo.firstChild),pt=n,_e=!0,Tt=null,o=Zd(n,null,a,o),n.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(br(),a===c){n=rn(e,n,o);break e}nt(e,n,a,o)}n=n.child}return n;case 5:return rf(n),e===null&&Va(n),a=n.type,c=n.pendingProps,f=e!==null?e.memoizedProps:null,x=c.children,Da(a,c)?x=null:f!==null&&Da(a,f)&&(n.flags|=32),Ff(e,n),nt(e,n,x,o),n.child;case 6:return e===null&&Va(n),null;case 13:return Hf(e,n,o);case 4:return el(n,n.stateNode.containerInfo),a=n.pendingProps,e===null?n.child=Sr(n,null,a,o):nt(e,n,a,o),n.child;case 11:return a=n.type,c=n.pendingProps,c=n.elementType===a?c:_t(a,c),Mf(e,n,a,c,o);case 7:return nt(e,n,n.pendingProps,o),n.child;case 8:return nt(e,n,n.pendingProps.children,o),n.child;case 12:return nt(e,n,n.pendingProps.children,o),n.child;case 10:e:{if(a=n.type._context,c=n.pendingProps,f=n.memoizedProps,x=c.value,Ne(Os,a._currentValue),a._currentValue=x,f!==null)if(Pt(f.value,x)){if(f.children===c.children&&!it.current){n=rn(e,n,o);break e}}else for(f=n.child,f!==null&&(f.return=n);f!==null;){var N=f.dependencies;if(N!==null){x=f.child;for(var j=N.firstContext;j!==null;){if(j.context===a){if(f.tag===1){j=nn(-1,o&-o),j.tag=2;var F=f.updateQueue;if(F!==null){F=F.shared;var V=F.pending;V===null?j.next=j:(j.next=V.next,V.next=j),F.pending=j}}f.lanes|=o,j=f.alternate,j!==null&&(j.lanes|=o),Xa(f.return,o,n),N.lanes|=o;break}j=j.next}}else if(f.tag===10)x=f.type===n.type?null:f.child;else if(f.tag===18){if(x=f.return,x===null)throw Error(s(341));x.lanes|=o,N=x.alternate,N!==null&&(N.lanes|=o),Xa(x,o,n),x=f.sibling}else x=f.child;if(x!==null)x.return=f;else for(x=f;x!==null;){if(x===n){x=null;break}if(f=x.sibling,f!==null){f.return=x.return,x=f;break}x=x.return}f=x}nt(e,n,c.children,o),n=n.child}return n;case 9:return c=n.type,a=n.pendingProps.children,kr(n,o),c=St(c),a=a(c),n.flags|=1,nt(e,n,a,o),n.child;case 14:return a=n.type,c=_t(a,n.pendingProps),c=_t(a.type,c),If(e,n,a,c,o);case 15:return Lf(e,n,n.type,n.pendingProps,o);case 17:return a=n.type,c=n.pendingProps,c=n.elementType===a?c:_t(a,c),Ks(e,n),n.tag=1,at(a)?(e=!0,Ns(n)):e=!1,kr(n,o),jf(n,a,c),pl(n,a,c,o),vl(null,n,a,!0,e,o);case 19:return Kf(e,n,o);case 22:return Df(e,n,o)}throw Error(s(156,n.tag))};function hp(e,n){return Vc(e,n)}function Qy(e,n,o,a){this.tag=e,this.key=o,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,o,a){return new Qy(e,n,o,a)}function Dl(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Gy(e){if(typeof e=="function")return Dl(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 o=e.alternate;return o===null?(o=Et(e.tag,n,e.key,e.mode),o.elementType=e.elementType,o.type=e.type,o.stateNode=e.stateNode,o.alternate=e,e.alternate=o):(o.pendingProps=n,o.type=e.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=e.flags&14680064,o.childLanes=e.childLanes,o.lanes=e.lanes,o.child=e.child,o.memoizedProps=e.memoizedProps,o.memoizedState=e.memoizedState,o.updateQueue=e.updateQueue,n=e.dependencies,o.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},o.sibling=e.sibling,o.index=e.index,o.ref=e.ref,o}function ti(e,n,o,a,c,f){var x=2;if(a=e,typeof e=="function")Dl(e)&&(x=1);else if(typeof e=="string")x=5;else e:switch(e){case $:return Xn(o.children,c,f,n);case W:x=8,c|=8;break;case Q:return e=Et(12,o,n,c|2),e.elementType=Q,e.lanes=f,e;case de:return e=Et(13,o,n,c),e.elementType=de,e.lanes=f,e;case X:return e=Et(19,o,n,c),e.elementType=X,e.lanes=f,e;case le:return ni(o,c,f,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ee:x=10;break e;case ne:x=9;break e;case Z:x=11;break e;case ve:x=14;break e;case se:x=16,a=null;break e}throw Error(s(130,e==null?e:typeof e,""))}return n=Et(x,o,n,c),n.elementType=e,n.type=a,n.lanes=f,n}function Xn(e,n,o,a){return e=Et(7,e,a,n),e.lanes=o,e}function ni(e,n,o,a){return e=Et(22,e,a,n),e.elementType=le,e.lanes=o,e.stateNode={isHidden:!1},e}function Fl(e,n,o){return e=Et(6,e,null,n),e.lanes=o,e}function $l(e,n,o){return n=Et(4,e.children!==null?e.children:[],e.key,n),n.lanes=o,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function qy(e,n,o,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=fa(0),this.expirationTimes=fa(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=fa(0),this.identifierPrefix=a,this.onRecoverableError=c,this.mutableSourceEagerHydrationData=null}function zl(e,n,o,a,c,f,x,N,j){return e=new qy(e,n,o,N,j),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:o,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ja(f),e}function Yy(e,n,o){var a=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:O,key:a==null?null:""+a,children:e,containerInfo:n,implementation:o}}function mp(e){if(!e)return xn;e=e._reactInternals;e:{if($n(e)!==e||e.tag!==1)throw Error(s(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(s(171))}if(e.tag===1){var o=e.type;if(at(o))return Hd(e,o,n)}return n}function gp(e,n,o,a,c,f,x,N,j){return e=zl(o,a,!0,e,c,f,x,N,j),e.context=mp(null),o=e.current,a=rt(),c=En(o),f=nn(a,c),f.callback=n??null,bn(o,f,c),e.current.lanes=c,Jr(e,c,a),ct(e,a),e}function ri(e,n,o,a){var c=n.current,f=rt(),x=En(c);return o=mp(o),n.context===null?n.context=o:n.pendingContext=o,n=nn(f,x),n.payload={element:e},a=a===void 0?null:a,a!==null&&(n.callback=a),e=bn(c,n,x),e!==null&&(Mt(e,c,x,f),Ms(e,c,x)),x}function oi(e){return e=e.current,e.child?(e.child.tag===5,e.child.stateNode):null}function vp(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var o=e.retryLane;e.retryLane=o!==0&&o<n?o:n}}function Ul(e,n){vp(e,n),(e=e.alternate)&&vp(e,n)}function Xy(){return null}var xp=typeof reportError=="function"?reportError:function(e){console.error(e)};function Hl(e){this._internalRoot=e}si.prototype.render=Hl.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(s(409));ri(e,n,null,null)},si.prototype.unmount=Hl.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=ed();e={blockedOn:null,target:e,priority:n};for(var o=0;o<pn.length&&n!==0&&n<pn[o].priority;o++);pn.splice(o,0,e),o===0&&rd(e)}};function Bl(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 yp(){}function Zy(e,n,o,a,c){if(c){if(typeof a=="function"){var f=a;a=function(){var F=oi(x);f.call(F)}}var x=gp(n,a,e,0,null,!1,!1,"",yp);return e._reactRootContainer=x,e[Xt]=x.current,ho(e.nodeType===8?e.parentNode:e),Gn(),x}for(;c=e.lastChild;)e.removeChild(c);if(typeof a=="function"){var N=a;a=function(){var F=oi(j);N.call(F)}}var j=zl(e,0,!1,null,null,!1,!1,"",yp);return e._reactRootContainer=j,e[Xt]=j.current,ho(e.nodeType===8?e.parentNode:e),Gn(function(){ri(n,j,o,a)}),j}function ai(e,n,o,a,c){var f=o._reactRootContainer;if(f){var x=f;if(typeof c=="function"){var N=c;c=function(){var j=oi(x);N.call(j)}}ri(n,x,e,c)}else x=Zy(o,n,e,c,a);return oi(x)}Zc=function(e){switch(e.tag){case 3:var n=e.stateNode;if(n.current.memoizedState.isDehydrated){var o=Zr(n.pendingLanes);o!==0&&(pa(n,o|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)}}),Ul(e,1)}},ha=function(e){if(e.tag===13){var n=tn(e,134217728);if(n!==null){var o=rt();Mt(n,e,134217728,o)}Ul(e,134217728)}},Jc=function(e){if(e.tag===13){var n=En(e),o=tn(e,n);if(o!==null){var a=rt();Mt(o,e,n,a)}Ul(e,n)}},ed=function(){return ke},td=function(e,n){var o=ke;try{return ke=e,n()}finally{ke=o}},ia=function(e,n,o){switch(n){case"input":if(Zi(e,o),n=o.name,o.type==="radio"&&n!=null){for(o=e;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll("input[name="+JSON.stringify(""+n)+'][type="radio"]'),n=0;n<o.length;n++){var a=o[n];if(a!==e&&a.form===e.form){var c=ks(a);if(!c)throw Error(s(90));es(a),Zi(a,c)}}}break;case"textarea":Tc(e,o);break;case"select":n=o.value,n!=null&&ir(e,!!o.multiple,n,!1)}},$c=Ml,zc=Gn;var Jy={usingClientEntryPoint:!1,Events:[vo,gr,ks,Dc,Fc,Ml]},_o={findFiberByHostInstance:zn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},ew={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:L.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Kc(e),e===null?null:e.stateNode},findFiberByHostInstance:_o.findFiberByHostInstance||Xy,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(ew),zt=li}catch{}}return dt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Jy,dt.createPortal=function(e,n){var o=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Bl(n))throw Error(s(200));return Yy(e,n,null,o)},dt.createRoot=function(e,n){if(!Bl(e))throw Error(s(299));var o=!1,a="",c=xp;return n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onRecoverableError!==void 0&&(c=n.onRecoverableError)),n=zl(e,1,!1,null,null,o,!1,a,c),e[Xt]=n.current,ho(e.nodeType===8?e.parentNode:e),new Hl(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(s(188)):(e=Object.keys(e).join(","),Error(s(268,e)));return e=Kc(n),e=e===null?null:e.stateNode,e},dt.flushSync=function(e){return Gn(e)},dt.hydrate=function(e,n,o){if(!ii(n))throw Error(s(200));return ai(null,e,n,!0,o)},dt.hydrateRoot=function(e,n,o){if(!Bl(e))throw Error(s(405));var a=o!=null&&o.hydratedSources||null,c=!1,f="",x=xp;if(o!=null&&(o.unstable_strictMode===!0&&(c=!0),o.identifierPrefix!==void 0&&(f=o.identifierPrefix),o.onRecoverableError!==void 0&&(x=o.onRecoverableError)),n=gp(n,null,e,1,o??null,c,!1,f,x),e[Xt]=n.current,ho(e),a)for(e=0;e<a.length;e++)o=a[e],c=o._getVersion,c=c(o._source),n.mutableSourceEagerHydrationData==null?n.mutableSourceEagerHydrationData=[o,c]:n.mutableSourceEagerHydrationData.push(o,c);return new si(n)},dt.render=function(e,n,o){if(!ii(n))throw Error(s(200));return ai(null,e,n,!1,o)},dt.unmountComponentAtNode=function(e){if(!ii(e))throw Error(s(40));return e._reactRootContainer?(Gn(function(){ai(null,null,e,!1,function(){e._reactRootContainer=null,e[Xt]=null})}),!0):!1},dt.unstable_batchedUpdates=Ml,dt.unstable_renderSubtreeIntoContainer=function(e,n,o,a){if(!ii(o))throw Error(s(200));if(e==null||e._reactInternals===void 0)throw Error(s(38));return ai(e,n,o,!1,a)},dt.version="18.3.1-next-f1338f8080-20240426",dt}var jp;function Hh(){if(jp)return Vl.exports;jp=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(),Vl.exports=lw(),Vl.exports}var Rp;function uw(){if(Rp)return ui;Rp=1;var t=Hh();return ui.createRoot=t.createRoot,ui.hydrateRoot=t.hydrateRoot,ui}var cw=uw();function dw(t,r){if(t instanceof RegExp)return{keys:!1,pattern:t};var s,i,u,d,p=[],h="",g=t.split("/");for(g[0]||g.shift();u=g.shift();)s=u[0],s==="*"?(p.push(s),h+=u[1]==="?"?"(?:/(.*))?":"/(.*)"):s===":"?(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=Ai();const On=Uh(m),Bu=nw({__proto__:null,default:On},[m]);var ql={exports:{}},Yl={};var Pp;function fw(){if(Pp)return Yl;Pp=1;var t=Ai();function r(w,b){return w===b&&(w!==0||1/w===1/b)||w!==w&&b!==b}var s=typeof Object.is=="function"?Object.is:r,i=t.useState,u=t.useEffect,d=t.useLayoutEffect,p=t.useDebugValue;function h(w,b){var C=b(),k=i({inst:{value:C,getSnapshot:b}}),S=k[0].inst,E=k[1];return d(function(){S.value=C,S.getSnapshot=b,g(S)&&E({inst:S})},[w,C,b]),u(function(){return g(S)&&E({inst:S}),w(function(){g(S)&&E({inst:S})})},[w]),p(C),C}function g(w){var b=w.getSnapshot;w=w.value;try{var C=b();return!s(w,C)}catch{return!0}}function v(w,b){return b()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?v:h;return Yl.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:y,Yl}var Tp;function pw(){return Tp||(Tp=1,ql.exports=fw()),ql.exports}var Bh=pw();const hw=Bu.useInsertionEffect,mw=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",gw=mw?m.useLayoutEffect:m.useEffect,vw=hw||gw,Kh=t=>{const r=m.useRef([t,(...s)=>r[0](...s)]).current;return vw(()=>{r[0]=t}),r[1]},xw="popstate",Ku="pushState",Wu="replaceState",yw="hashchange",_p=[xw,Ku,Wu,yw],ww=t=>{for(const r of _p)addEventListener(r,t);return()=>{for(const r of _p)removeEventListener(r,t)}},Wh=(t,r)=>Bh.useSyncExternalStore(ww,t,r),Op=()=>location.search,bw=({ssrSearch:t}={})=>Wh(Op,t!=null?()=>t:Op),Ap=()=>location.pathname,Sw=({ssrPath:t}={})=>Wh(Ap,t!=null?()=>t:Ap),Cw=(t,{replace:r=!1,state:s=null}={})=>history[r?Wu:Ku](s,"",t),kw=(t={})=>[Sw(t),Cw],Mp=Symbol.for("wouter_v3");if(typeof history<"u"&&typeof window[Mp]>"u"){for(const t of[Ku,Wu]){const r=history[t];history[t]=function(){const s=r.apply(this,arguments),i=new Event(t);return i.arguments=arguments,dispatchEvent(i),s}}Object.defineProperty(window,Mp,{value:!0})}const Ew=(t,r)=>r.toLowerCase().indexOf(t.toLowerCase())?"~"+r:r.slice(t.length)||"/",Vh=(t="")=>t==="/"?"":t,Nw=(t,r)=>t[0]==="~"?t.slice(1):Vh(r)+t,jw=(t="",r)=>Ew(yu(Vh(t)),yu(r)),Rw=t=>t[0]==="?"?t.slice(1):t,yu=t=>{try{return decodeURI(t)}catch{return t}},Pw=t=>yu(Rw(t)),Qh={hook:kw,searchHook:bw,parser:dw,base:"",ssrPath:void 0,ssrSearch:void 0,ssrContext:void 0,hrefs:t=>t,aroundNav:(t,r,s)=>t(r,s)},Gh=m.createContext(Qh),Vo=()=>m.useContext(Gh),qh={},Yh=m.createContext(qh),Tw=()=>m.useContext(Yh),Vu=t=>{const[r,s]=t.hook(t);return[jw(t.base,r),Kh((i,u)=>t.aroundNav(s,Nw(i,t.base),u))]},_w=()=>{const t=Vo();return Pw(t.searchHook(t))},Xh=(t,r,s,i)=>{const{pattern:u,keys:d}=r instanceof RegExp?{keys:!1,pattern:r}:t(r||"*",i),p=u.exec(s)||[],[h,...g]=p;return h!==void 0?[!0,(()=>{const v=d!==!1?Object.fromEntries(d.map((w,b)=>[w,g[b]])):p.groups;let y={...g};return v&&Object.assign(y,v),y})(),...i?[h]:[]]:[!1,null]},Zh=({children:t,...r})=>{const s=Vo(),i=r.hook?Qh:s;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,v=g;for(let y in i){const w=y==="base"?i[y]+(r[y]??""):r[y]??i[y];g===v&&w!==v[y]&&(h.current=v={...v}),v[y]=w,(w!==i[y]||w!==u[y])&&(u=v)}return m.createElement(Gh.Provider,{value:u,children:t})},Ip=({children:t,component:r},s)=>r?m.createElement(r,{params:s}):typeof t=="function"?t(s):t,Ow=t=>{let r=m.useRef(qh);const s=r.current;return r.current=Object.keys(t).length!==Object.keys(s).length||Object.entries(t).some(([i,u])=>u!==s[i])?t:s},_r=({path:t,nest:r,match:s,...i})=>{const u=Vo(),[d]=Vu(u),[p,h,g]=s??Xh(u.parser,t,d,r),v=Ow({...Tw(),...h});if(!p)return null;const y=g?m.createElement(Zh,{base:g},Ip(i,v)):Ip(i,v);return m.createElement(Yh.Provider,{value:v,children:y})},Dt=m.forwardRef((t,r)=>{const s=Vo(),[i,u]=Vu(s),{to:d="",href:p=d,onClick:h,asChild:g,children:v,className:y,replace:w,state:b,transition:C,...k}=t,S=Kh(P=>{P.ctrlKey||P.metaKey||P.altKey||P.shiftKey||P.button!==0||(h?.(P),P.defaultPrevented||(P.preventDefault(),u(p,t)))}),E=s.hrefs(p[0]==="~"?p.slice(1):s.base+p,s);return g&&m.isValidElement(v)?m.cloneElement(v,{onClick:S,href:E}):m.createElement("a",{...k,onClick:S,href:E,className:y?.call?y(i===p):y,children:v,ref:r})}),Jh=t=>Array.isArray(t)?t.flatMap(r=>Jh(r&&r.type===m.Fragment?r.props.children:r)):[t],Aw=({children:t,location:r})=>{const s=Vo(),[i]=Vu(s);for(const u of Jh(t)){let d=0;if(m.isValidElement(u)&&(d=Xh(s.parser,u.props.path,r||i,u.props.nest))[0])return m.cloneElement(u,{match:d})}return null},Io={v:[]},Lp=()=>Io.v.forEach(t=>t()),Mw=t=>(Io.v.push(t)===1&&addEventListener("hashchange",Lp),()=>{Io.v=Io.v.filter(r=>r!==t),Io.v.length||removeEventListener("hashchange",Lp)}),Iw=()=>"/"+location.hash.replace(/^#?\/?/,""),Lw=(t,{state:r=null,replace:s=!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;s?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)},em=({ssrPath:t="/"}={})=>[Bh.useSyncExternalStore(Mw,Iw,()=>t),Lw];em.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(){}},Dw={setTimeout:(t,r)=>setTimeout(t,r),clearTimeout:t=>clearTimeout(t),setInterval:(t,r)=>setInterval(t,r),clearInterval:t=>clearInterval(t)},Fw=class{#e=Dw;#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 Fw;function $w(t){setTimeout(t,0)}var er=typeof window>"u"||"Deno"in globalThis;function ot(){}function zw(t,r){return typeof t=="function"?t(r):t}function wu(t){return typeof t=="number"&&t>=0&&t!==1/0}function tm(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 Dp(t,r){const{type:s="all",exact:i,fetchStatus:u,predicate:d,queryKey:p,stale:h}=t;if(p){if(i){if(r.queryHash!==Qu(p,r.options))return!1}else if(!Fo(r.queryKey,p))return!1}if(s!=="all"){const g=r.isActive();if(s==="active"&&!g||s==="inactive"&&g)return!1}return!(typeof h=="boolean"&&r.isStale()!==h||u&&u!==r.state.fetchStatus||d&&!d(r))}function Fp(t,r){const{exact:s,status:i,predicate:u,mutationKey:d}=t;if(d){if(!r.options.mutationKey)return!1;if(s){if(tr(r.options.mutationKey)!==tr(d))return!1}else if(!Fo(r.options.mutationKey,d))return!1}return!(i&&r.state.status!==i||u&&!u(r))}function Qu(t,r){return(r?.queryKeyHashFn||tr)(t)}function tr(t){return JSON.stringify(t,(r,s)=>bu(s)?Object.keys(s).sort().reduce((i,u)=>(i[u]=s[u],i),{}):s)}function Fo(t,r){return t===r?!0:typeof t!=typeof r?!1:t&&r&&typeof t=="object"&&typeof r=="object"?Object.keys(r).every(s=>Fo(t[s],r[s])):!1}var Uw=Object.prototype.hasOwnProperty;function nm(t,r,s=0){if(t===r)return t;if(s>500)return r;const i=$p(t)&&$p(r);if(!i&&!(bu(t)&&bu(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 v=0;for(let y=0;y<h;y++){const w=i?y:p[y],b=t[w],C=r[w];if(b===C){g[w]=b,(i?y<d:Uw.call(t,w))&&v++;continue}if(b===null||C===null||typeof b!="object"||typeof C!="object"){g[w]=C;continue}const k=nm(b,C,s+1);g[w]=k,k===b&&v++}return d===h&&v===d?t:g}function ki(t,r){if(!r||Object.keys(t).length!==Object.keys(r).length)return!1;for(const s in t)if(t[s]!==r[s])return!1;return!0}function $p(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function bu(t){if(!zp(t))return!1;const r=t.constructor;if(r===void 0)return!0;const s=r.prototype;return!(!zp(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function zp(t){return Object.prototype.toString.call(t)==="[object Object]"}function Hw(t){return new Promise(r=>{Jn.setTimeout(r,t)})}function Su(t,r,s){return typeof s.structuralSharing=="function"?s.structuralSharing(t,r):s.structuralSharing!==!1?nm(t,r):r}function Bw(t,r,s=0){const i=[...t,r];return s&&i.length>s?i.slice(1):i}function Kw(t,r,s=0){const i=[r,...t];return s&&i.length>s?i.slice(0,-1):i}var Gu=Symbol();function rm(t,r){return!t.queryFn&&r?.initialPromise?()=>r.initialPromise:!t.queryFn||t.queryFn===Gu?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function qu(t,r){return typeof t=="function"?t(...r):!!t}function Ww(t,r,s){let i=!1,u;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(u??=r(),i||(i=!0,u.aborted?s():u.addEventListener("abort",s,{once:!0})),u)}),t}var Vw=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"}},Yu=new Vw;function Cu(){let t,r;const s=new Promise((u,d)=>{t=u,r=d});s.status="pending",s.catch(()=>{});function i(u){Object.assign(s,u),delete s.resolve,delete s.reject}return s.resolve=u=>{i({status:"fulfilled",value:u}),t(u)},s.reject=u=>{i({status:"rejected",reason:u}),r(u)},s}var Qw=$w;function Gw(){let t=[],r=0,s=h=>{h()},i=h=>{h()},u=Qw;const d=h=>{r?t.push(h):u(()=>{s(h)})},p=()=>{const h=t;t=[],h.length&&u(()=>{i(()=>{h.forEach(g=>{s(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=>{s=h},setBatchNotifyFunction:h=>{i=h},setScheduler:h=>{u=h}}}var Ue=Gw(),qw=class extends zr{#e=!0;#t;#n;constructor(){super(),this.#n=t=>{if(!er&&window.addEventListener){const r=()=>t(!0),s=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",s)}}}}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(s=>{s(t)}))}isOnline(){return this.#e}},Ei=new qw;function Yw(t){return Math.min(1e3*2**t,3e4)}function om(t){return(t??"online")==="online"?Ei.isOnline():!0}var ku=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function sm(t){let r=!1,s=0,i;const u=Cu(),d=()=>u.status!=="pending",p=S=>{if(!d()){const E=new ku(S);b(E),t.onCancel?.(E)}},h=()=>{r=!0},g=()=>{r=!1},v=()=>Yu.isFocused()&&(t.networkMode==="always"||Ei.isOnline())&&t.canRun(),y=()=>om(t.networkMode)&&t.canRun(),w=S=>{d()||(i?.(),u.resolve(S))},b=S=>{d()||(i?.(),u.reject(S))},C=()=>new Promise(S=>{i=E=>{(d()||v())&&S(E)},t.onPause?.()}).then(()=>{i=void 0,d()||t.onContinue?.()}),k=()=>{if(d())return;let S;const E=s===0?t.initialPromise:void 0;try{S=E??t.fn()}catch(P){S=Promise.reject(P)}Promise.resolve(S).then(w).catch(P=>{if(d())return;const A=t.retry??(er?0:3),_=t.retryDelay??Yw,L=typeof _=="function"?_(s,P):_,D=A===!0||typeof A=="number"&&s<A||typeof A=="function"&&A(s,P);if(r||!D){b(P);return}s++,t.onFail?.(s,P),Hw(L).then(()=>v()?void 0:C()).then(()=>{r?b(P):k()})})};return{promise:u,status:()=>u.status,cancel:p,continue:()=>(i?.(),u),cancelRetry:h,continueRetry:g,canStart:y,start:()=>(y()?k():C().then(k),u)}}var im=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),wu(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)}},Xw=class extends im{#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=Hp(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=Hp(this.options);r.data!==void 0&&(this.setState(Up(r.data,r.dataUpdatedAt)),this.#e=r)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(t,r){const s=Su(this.state.data,t,this.options);return this.#s({data:s,type:"success",dataUpdatedAt:r?.updatedAt,manual:r?.manual}),s}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===Gu||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:!tm(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 s=new AbortController,i=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(this.#a=!0,s.signal)})},u=()=>{const h=rm(this.options,r),v=(()=>{const y={client:this.#o,queryKey:this.queryKey,meta:this.meta};return i(y),y})();return this.#a=!1,this.options.persister?this.options.persister(h,v,this):h(v)},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=sm({initialPromise:r?.initialPromise,fn:p.fetchFn,onCancel:h=>{h instanceof ku&&h.revert&&this.setState({...this.#t,fetchStatus:"idle"}),s.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 ku){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=s=>{switch(t.type){case"failed":return{...s,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...am(s.data,this.options),fetchMeta:t.meta??null};case"success":const i={...s,...Up(t.data,t.dataUpdatedAt),dataUpdateCount:s.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{...s,error:u,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:u,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...t.state}}};this.state=r(this.state),Ue.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:t})})}};function am(t,r){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:om(r.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function Up(t,r){return{data:t,dataUpdatedAt:r??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Hp(t){const r=typeof t.initialData=="function"?t.initialData():t.initialData,s=r!==void 0,i=s?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:r,dataUpdateCount:0,dataUpdatedAt:s?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var Zw=class extends zr{constructor(t,r){super(),this.options=r,this.#e=t,this.#s=null,this.#a=Cu(),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),Bp(this.#t,this.options)?this.#d():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Eu(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Eu(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,s=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&&!ki(this.options,r)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const i=this.hasListeners();i&&Kp(this.#t,s,this.options,r)&&this.#d(),this.updateResult(),i&&(this.#t!==s||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!==s||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),s=this.createResult(r,t);return eb(this,s)&&(this.#o=s,this.#i=this.options,this.#r=this.#t.state),s}getCurrentResult(){return this.#o}trackResult(t,r){return new Proxy(t,{get:(s,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(s,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),s=this.#e.getQueryCache().build(this.#e,r);return s.fetch().then(()=>this.createResult(s,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||!wu(t))return;const s=tm(this.#o.dataUpdatedAt,t)+1;this.#u=Jn.setTimeout(()=>{this.#o.isStale||this.updateResult()},s)}#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||!wu(this.#l)||this.#l===0)&&(this.#c=Jn.setInterval(()=>{(this.options.refetchIntervalInBackground||Yu.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 s=this.#t,i=this.options,u=this.#o,d=this.#r,p=this.#i,g=t!==s?t.state:this.#n,{state:v}=t;let y={...v},w=!1,b;if(r._optimisticResults){const W=this.hasListeners(),Q=!W&&Bp(t,r),ee=W&&Kp(t,s,r,i);(Q||ee)&&(y={...y,...am(v.data,t.options)}),r._optimisticResults==="isRestoring"&&(y.fetchStatus="idle")}let{error:C,errorUpdatedAt:k,status:S}=y;b=y.data;let E=!1;if(r.placeholderData!==void 0&&b===void 0&&S==="pending"){let W;u?.isPlaceholderData&&r.placeholderData===p?.placeholderData?(W=u.data,E=!0):W=typeof r.placeholderData=="function"?r.placeholderData(this.#p?.state.data,this.#p):r.placeholderData,W!==void 0&&(S="success",b=Su(u?.data,W,r),w=!0)}if(r.select&&b!==void 0&&!E)if(u&&b===d?.data&&r.select===this.#m)b=this.#f;else try{this.#m=r.select,b=r.select(b),b=Su(u?.data,b,r),this.#f=b,this.#s=null}catch(W){this.#s=W}this.#s&&(C=this.#s,b=this.#f,k=Date.now(),S="error");const P=y.fetchStatus==="fetching",A=S==="pending",_=S==="error",L=A&&P,D=b!==void 0,$={status:S,fetchStatus:y.fetchStatus,isPending:A,isSuccess:S==="success",isError:_,isInitialLoading:L,isLoading:L,data:b,dataUpdatedAt:y.dataUpdatedAt,error:C,errorUpdatedAt:k,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdateCount:y.errorUpdateCount,isFetched:y.dataUpdateCount>0||y.errorUpdateCount>0,isFetchedAfterMount:y.dataUpdateCount>g.dataUpdateCount||y.errorUpdateCount>g.errorUpdateCount,isFetching:P,isRefetching:P&&!A,isLoadingError:_&&!D,isPaused:y.fetchStatus==="paused",isPlaceholderData:w,isRefetchError:_&&D,isStale:Xu(t,r),refetch:this.refetch,promise:this.#a,isEnabled:Nt(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const W=$.data!==void 0,Q=$.status==="error"&&!W,ee=de=>{Q?de.reject($.error):W&&de.resolve($.data)},ne=()=>{const de=this.#a=$.promise=Cu();ee(de)},Z=this.#a;switch(Z.status){case"pending":t.queryHash===s.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),ki(r,t))return;this.#o=r;const s=()=>{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:s()})}#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 Jw(t,r){return Nt(r.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&r.retryOnMount===!1)}function Bp(t,r){return Jw(t,r)||t.state.data!==void 0&&Eu(t,r,r.refetchOnMount)}function Eu(t,r,s){if(Nt(r.enabled,t)!==!1&&Mn(r.staleTime,t)!=="static"){const i=typeof s=="function"?s(t):s;return i==="always"||i!==!1&&Xu(t,r)}return!1}function Kp(t,r,s,i){return(t!==r||Nt(i.enabled,t)===!1)&&(!s.suspense||t.state.status!=="error")&&Xu(t,s)}function Xu(t,r){return Nt(r.enabled,t)!==!1&&t.isStaleByTime(Mn(r.staleTime,t))}function eb(t,r){return!ki(t.getCurrentResult(),r)}function Wp(t){return{onFetch:(r,s)=>{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 v=async()=>{let y=!1;const w=k=>{Ww(k,()=>r.signal,()=>y=!0)},b=rm(r.options,r.fetchOptions),C=async(k,S,E)=>{if(y)return Promise.reject();if(S==null&&k.pages.length)return Promise.resolve(k);const A=(()=>{const O={client:r.client,queryKey:r.queryKey,pageParam:S,direction:E?"backward":"forward",meta:r.options.meta};return w(O),O})(),_=await b(A),{maxPages:L}=r.options,D=E?Kw:Bw;return{pages:D(k.pages,_,L),pageParams:D(k.pageParams,S,L)}};if(u&&d.length){const k=u==="backward",S=k?tb:Vp,E={pages:d,pageParams:p},P=S(i,E);h=await C(E,P,k)}else{const k=t??d.length;do{const S=g===0?p[0]??i.initialPageParam:Vp(i,h);if(g>0&&S==null)break;h=await C(h,S),g++}while(g<k)}return h};r.options.persister?r.fetchFn=()=>r.options.persister?.(v,{client:r.client,queryKey:r.queryKey,meta:r.options.meta,signal:r.signal},s):r.fetchFn=v}}}function Vp(t,{pages:r,pageParams:s}){const i=r.length-1;return r.length>0?t.getNextPageParam(r[i],r,s[i],s):void 0}function tb(t,{pages:r,pageParams:s}){return r.length>0?t.getPreviousPageParam?.(r[0],r,s[0],s):void 0}var nb=class extends im{#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||lm(),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"})},s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#o=sm({fn:()=>this.options.mutationFn?this.options.mutationFn(t,s):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,s);const p=await this.options.onMutate?.(t,s);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,s),await this.options.onSuccess?.(d,t,this.state.context,s),await this.#n.config.onSettled?.(d,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(d,null,t,this.state.context,s),this.#r({type:"success",data:d}),d}catch(d){try{await this.#n.config.onError?.(d,t,this.state.context,this,s)}catch(p){Promise.reject(p)}try{await this.options.onError?.(d,t,this.state.context,s)}catch(p){Promise.reject(p)}try{await this.#n.config.onSettled?.(void 0,d,this.state.variables,this.state.context,this,s)}catch(p){Promise.reject(p)}try{await this.options.onSettled?.(void 0,d,t,this.state.context,s)}catch(p){Promise.reject(p)}throw this.#r({type:"error",error:d}),d}finally{this.#n.runNext(this)}}#r(t){const r=s=>{switch(t.type){case"failed":return{...s,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,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{...s,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:t.error,failureCount:s.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Ue.batch(()=>{this.#t.forEach(s=>{s.onMutationUpdate(t)}),this.#n.notify({mutation:this,type:"updated",action:t})})}};function lm(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var rb=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,s){const i=new nb({client:t,mutationCache:this,mutationId:++this.#n,options:t.defaultMutationOptions(r),state:s});return this.add(i),i}add(t){this.#e.add(t);const r=ci(t);if(typeof r=="string"){const s=this.#t.get(r);s?s.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 s=this.#t.get(r);if(s)if(s.length>1){const i=s.indexOf(t);i!==-1&&s.splice(i,1)}else s[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(s=>Fp(r,s))}findAll(t={}){return this.getAll().filter(r=>Fp(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 ob=class extends zr{#e;#t=void 0;#n;#o;constructor(r,s){super(),this.#e=r,this.setOptions(s),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(r){const s=this.options;this.options=this.#e.defaultMutationOptions(r),ki(this.options,s)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),s?.mutationKey&&this.options.mutationKey&&tr(s.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,s){return this.#o=s,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??lm();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 s=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,s,i,u)}catch(d){Promise.reject(d)}try{this.#o.onSettled?.(r.data,null,s,i,u)}catch(d){Promise.reject(d)}}else if(r?.type==="error"){try{this.#o.onError?.(r.error,s,i,u)}catch(d){Promise.reject(d)}try{this.#o.onSettled?.(void 0,r.error,s,i,u)}catch(d){Promise.reject(d)}}}this.listeners.forEach(s=>{s(this.#t)})})}},sb=class extends zr{constructor(t={}){super(),this.config=t,this.#e=new Map}#e;build(t,r,s){const i=r.queryKey,u=r.queryHash??Qu(i,r);let d=this.get(u);return d||(d=new Xw({client:t,queryKey:i,queryHash:u,options:t.defaultQueryOptions(r),state:s,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(s=>Dp(r,s))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(s=>Dp(t,s)):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()})})}},ib=class{#e;#t;#n;#o;#r;#i;#a;#s;constructor(t={}){this.#e=t.queryCache||new sb,this.#t=t.mutationCache||new rb,this.#n=t.defaultOptions||{},this.#o=new Map,this.#r=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#a=Yu.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=Ei.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),s=this.#e.build(this,r),i=s.state.data;return i===void 0?this.fetchQuery(t):(t.revalidateIfStale&&s.isStaleByTime(Mn(r.staleTime,s))&&this.prefetchQuery(r),Promise.resolve(i))}getQueriesData(t){return this.#e.findAll(t).map(({queryKey:r,state:s})=>{const i=s.data;return[r,i]})}setQueryData(t,r,s){const i=this.defaultQueryOptions({queryKey:t}),d=this.#e.get(i.queryHash)?.state.data,p=zw(r,d);if(p!==void 0)return this.#e.build(this,i).setData(p,{...s,manual:!0})}setQueriesData(t,r,s){return Ue.batch(()=>this.#e.findAll(t).map(({queryKey:i})=>[i,this.setQueryData(i,r,s)]))}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(s=>{r.remove(s)})})}resetQueries(t,r){const s=this.#e;return Ue.batch(()=>(s.findAll(t).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...t},r)))}cancelQueries(t,r={}){const s={revert:!0,...r},i=Ue.batch(()=>this.#e.findAll(t).map(u=>u.cancel(s)));return Promise.all(i).then(ot).catch(ot)}invalidateQueries(t,r={}){return Ue.batch(()=>(this.#e.findAll(t).forEach(s=>{s.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},r)))}refetchQueries(t,r={}){const s={...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,s);return s.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 s=this.#e.build(this,r);return s.isStaleByTime(Mn(r.staleTime,s))?s.fetch(r):Promise.resolve(s.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(ot).catch(ot)}fetchInfiniteQuery(t){return t.behavior=Wp(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(ot).catch(ot)}ensureInfiniteQueryData(t){return t.behavior=Wp(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return Ei.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()],s={};return r.forEach(i=>{Fo(t,i.queryKey)&&Object.assign(s,i.defaultOptions)}),s}setMutationDefaults(t,r){this.#r.set(tr(t),{mutationKey:t,defaultOptions:r})}getMutationDefaults(t){const r=[...this.#r.values()],s={};return r.forEach(i=>{Fo(t,i.mutationKey)&&Object.assign(s,i.defaultOptions)}),s}defaultQueryOptions(t){if(t._defaulted)return t;const r={...this.#n.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return r.queryHash||(r.queryHash=Qu(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===Gu&&(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()}},um=m.createContext(void 0),cm=t=>{const r=m.useContext(um);if(!r)throw new Error("No QueryClient set, use QueryClientProvider to set one");return r},ab=({client:t,children:r})=>(m.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),l.jsx(um.Provider,{value:t,children:r})),dm=m.createContext(!1),lb=()=>m.useContext(dm);dm.Provider;function ub(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var cb=m.createContext(ub()),db=()=>m.useContext(cb),fb=(t,r,s)=>{const i=s?.state.error&&typeof t.throwOnError=="function"?qu(t.throwOnError,[s.state.error,s]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||i)&&(r.isReset()||(t.retryOnMount=!1))},pb=t=>{m.useEffect(()=>{t.clearReset()},[t])},hb=({result:t,errorResetBoundary:r,throwOnError:s,query:i,suspense:u})=>t.isError&&!r.isReset()&&!t.isFetching&&i&&(u&&t.data===void 0||qu(s,[t.error,i])),mb=t=>{if(t.suspense){const s=u=>u==="static"?u:Math.max(u??1e3,1e3),i=t.staleTime;t.staleTime=typeof i=="function"?(...u)=>s(i(...u)):s(i),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},gb=(t,r)=>t.isLoading&&t.isFetching&&!r,vb=(t,r)=>t?.suspense&&r.isPending,Qp=(t,r,s)=>r.fetchOptimistic(t).catch(()=>{s.clearReset()});function xb(t,r,s){const i=lb(),u=db(),d=cm(),p=d.defaultQueryOptions(t);d.getDefaultOptions().queries?._experimental_beforeQuery?.(p);const h=d.getQueryCache().get(p.queryHash);p._optimisticResults=i?"isRestoring":"optimistic",mb(p),fb(p,u,h),pb(u);const g=!d.getQueryCache().get(p.queryHash),[v]=m.useState(()=>new r(d,p)),y=v.getOptimisticResult(p),w=!i&&t.subscribed!==!1;if(m.useSyncExternalStore(m.useCallback(b=>{const C=w?v.subscribe(Ue.batchCalls(b)):ot;return v.updateResult(),C},[v,w]),()=>v.getCurrentResult(),()=>v.getCurrentResult()),m.useEffect(()=>{v.setOptions(p)},[p,v]),vb(p,y))throw Qp(p,v,u);if(hb({result:y,errorResetBoundary:u,throwOnError:p.throwOnError,query:h,suspense:p.suspense}))throw y.error;return d.getDefaultOptions().queries?._experimental_afterQuery?.(p,y),p.experimental_prefetchInRender&&!er&&gb(y,i)&&(g?Qp(p,v,u):h?.promise)?.catch(ot).finally(()=>{v.updateResult()}),p.notifyOnChangeProps?y:v.trackResult(y)}function et(t,r){return xb(t,Zw)}function Je(t,r){const s=cm(),[i]=m.useState(()=>new ob(s,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&&qu(i.options.throwOnError,[u.error]))throw u.error;return{...u,mutate:d,mutateAsync:u.mutate}}const Zu="__PORT_5000__".startsWith("__")?"":"__PORT_5000__";async function Ju(t){if(!t.ok){const r=await t.text()||t.statusText;throw new Error(`${t.status}: ${r}`)}}async function fm(t,r){const s=await fetch(`${Zu}${t}`,r);return await Ju(s),await s.json()}async function Ge(t,r,s){const i=await fetch(`${Zu}${r}`,{method:t,headers:s?{"Content-Type":"application/json"}:{},body:s?JSON.stringify(s):void 0});return await Ju(i),i}const yb=({on401:t})=>async({queryKey:r})=>{const s=await fetch(`${Zu}${r.join("/")}`);return await Ju(s),await s.json()},ye=new ib({defaultOptions:{queries:{queryFn:yb({on401:"throw"}),refetchInterval:!1,refetchOnWindowFocus:!1,staleTime:1/0,retry:!1},mutations:{retry:!1}}});var wb=(t,r,s,i,u,d,p,h)=>{let g=document.documentElement,v=["light","dark"];function y(C){(Array.isArray(t)?t:[t]).forEach(k=>{let S=k==="class",E=S&&d?u.map(P=>d[P]||P):u;S?(g.classList.remove(...E),g.classList.add(d&&d[C]?d[C]:C)):g.setAttribute(k,C)}),w(C)}function w(C){h&&v.includes(C)&&(g.style.colorScheme=C)}function b(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(i)y(i);else try{let C=localStorage.getItem(r)||s,k=p&&C==="system"?b():C;y(k)}catch{}},Gp=["light","dark"],pm="(prefers-color-scheme: dark)",bb=typeof window>"u",hm=m.createContext(void 0),Sb=t=>m.useContext(hm)?m.createElement(m.Fragment,null,t.children):m.createElement(kb,{...t}),Cb=["light","dark"],kb=({forcedTheme:t,disableTransitionOnChange:r=!1,enableSystem:s=!0,enableColorScheme:i=!0,storageKey:u="theme",themes:d=Cb,defaultTheme:p=s?"system":"light",attribute:h="data-theme",value:g,children:v,nonce:y,scriptProps:w})=>{let[b,C]=m.useState(()=>Nb(u,p)),[k,S]=m.useState(()=>b==="system"?Xl():b),E=g?Object.values(g):d,P=m.useCallback(D=>{let O=D;if(!O)return;D==="system"&&s&&(O=Xl());let $=g?g[O]:O,W=r?jb(y):null,Q=document.documentElement,ee=ne=>{ne==="class"?(Q.classList.remove(...E),$&&Q.classList.add($)):ne.startsWith("data-")&&($?Q.setAttribute(ne,$):Q.removeAttribute(ne))};if(Array.isArray(h)?h.forEach(ee):ee(h),i){let ne=Gp.includes(p)?p:null,Z=Gp.includes(O)?O:ne;Q.style.colorScheme=Z}W?.()},[y]),A=m.useCallback(D=>{let O=typeof D=="function"?D(b):D;C(O);try{localStorage.setItem(u,O)}catch{}},[b]),_=m.useCallback(D=>{let O=Xl(D);S(O),b==="system"&&s&&!t&&P("system")},[b,t]);m.useEffect(()=>{let D=window.matchMedia(pm);return D.addListener(_),_(D),()=>D.removeListener(_)},[_]),m.useEffect(()=>{let D=O=>{O.key===u&&(O.newValue?C(O.newValue):A(p))};return window.addEventListener("storage",D),()=>window.removeEventListener("storage",D)},[A]),m.useEffect(()=>{P(t??b)},[t,b]);let L=m.useMemo(()=>({theme:b,setTheme:A,forcedTheme:t,resolvedTheme:b==="system"?k:b,themes:s?[...d,"system"]:d,systemTheme:s?k:void 0}),[b,A,t,k,s,d]);return m.createElement(hm.Provider,{value:L},m.createElement(Eb,{forcedTheme:t,storageKey:u,attribute:h,enableSystem:s,enableColorScheme:i,defaultTheme:p,value:g,themes:d,nonce:y,scriptProps:w}),v)},Eb=m.memo(({forcedTheme:t,storageKey:r,attribute:s,enableSystem:i,enableColorScheme:u,defaultTheme:d,value:p,themes:h,nonce:g,scriptProps:v})=>{let y=JSON.stringify([s,r,d,t,h,p,i,u]).slice(1,-1);return m.createElement("script",{...v,suppressHydrationWarning:!0,nonce:typeof window>"u"?g:"",dangerouslySetInnerHTML:{__html:`(${wb.toString()})(${y})`}})}),Nb=(t,r)=>{if(bb)return;let s;try{s=localStorage.getItem(t)||void 0}catch{}return s||r},jb=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)}},Xl=t=>(t||(t=window.matchMedia(pm)),t.matches?"dark":"light");const Rb=1,Pb=1e6;let Zl=0;function Tb(){return Zl=(Zl+1)%Number.MAX_SAFE_INTEGER,Zl.toString()}const Jl=new Map,qp=t=>{if(Jl.has(t))return;const r=setTimeout(()=>{Jl.delete(t),Do({type:"REMOVE_TOAST",toastId:t})},Pb);Jl.set(t,r)},_b=(t,r)=>{switch(r.type){case"ADD_TOAST":return{...t,toasts:[r.toast,...t.toasts].slice(0,Rb)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(s=>s.id===r.toast.id?{...s,...r.toast}:s)};case"DISMISS_TOAST":{const{toastId:s}=r;return s?qp(s):t.toasts.forEach(i=>{qp(i.id)}),{...t,toasts:t.toasts.map(i=>i.id===s||s===void 0?{...i,open:!1}:i)}}case"REMOVE_TOAST":return r.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(s=>s.id!==r.toastId)}}},yi=[];let wi={toasts:[]};function Do(t){wi=_b(wi,t),yi.forEach(r=>{r(wi)})}function vt({...t}){const r=Tb(),s=u=>Do({type:"UPDATE_TOAST",toast:{...u,id:r}}),i=()=>Do({type:"DISMISS_TOAST",toastId:r});return Do({type:"ADD_TOAST",toast:{...t,id:r,open:!0,onOpenChange:u=>{u||i()}}}),{id:r,dismiss:i,update:s}}function Ob(){const[t,r]=m.useState(wi);return m.useEffect(()=>(yi.push(r),()=>{const s=yi.indexOf(r);s>-1&&yi.splice(s,1)}),[t]),{...t,toast:vt,dismiss:s=>Do({type:"DISMISS_TOAST",toastId:s})}}var Mi=Hh();const Ab=Uh(Mi);function he(t,r,{checkForDefaultPrevented:s=!0}={}){return function(u){if(t?.(u),s===!1||!u.defaultPrevented)return r?.(u)}}function Yp(t,r){if(typeof t=="function")return t(r);t!=null&&(t.current=r)}function Ur(...t){return r=>{let s=!1;const i=t.map(u=>{const d=Yp(u,r);return!s&&typeof d=="function"&&(s=!0),d});if(s)return()=>{for(let u=0;u<i.length;u++){const d=i[u];typeof d=="function"?d():Yp(t[u],null)}}}}function He(...t){return m.useCallback(Ur(...t),t)}function Dn(t,r=[]){let s=[];function i(d,p){const h=m.createContext(p),g=s.length;s=[...s,p];const v=w=>{const{scope:b,children:C,...k}=w,S=b?.[t]?.[g]||h,E=m.useMemo(()=>k,Object.values(k));return l.jsx(S.Provider,{value:E,children:C})};v.displayName=d+"Provider";function y(w,b){const C=b?.[t]?.[g]||h,k=m.useContext(C);if(k)return k;if(p!==void 0)return p;throw new Error(`\`${w}\` must be used within \`${d}\``)}return[v,y]}const u=()=>{const d=s.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,Mb(u,...r)]}function Mb(...t){const r=t[0];if(t.length===1)return r;const s=()=>{const i=t.map(u=>({useScope:u(),scopeName:u.scopeName}));return function(d){const p=i.reduce((h,{useScope:g,scopeName:v})=>{const w=g(d)[`__scope${v}`];return{...h,...w}},{});return m.useMemo(()=>({[`__scope${r.scopeName}`]:p}),[p])}};return s.scopeName=r.scopeName,s}function Xp(t){const r=Ib(t),s=m.forwardRef((i,u)=>{const{children:d,...p}=i,h=m.Children.toArray(d),g=h.find(Db);if(g){const v=g.props.children,y=h.map(w=>w===g?m.Children.count(v)>1?m.Children.only(null):m.isValidElement(v)?v.props.children:null:w);return l.jsx(r,{...p,ref:u,children:m.isValidElement(v)?m.cloneElement(v,void 0,y):null})}return l.jsx(r,{...p,ref:u,children:d})});return s.displayName=`${t}.Slot`,s}function Ib(t){const r=m.forwardRef((s,i)=>{const{children:u,...d}=s;if(m.isValidElement(u)){const p=$b(u),h=Fb(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 Lb=Symbol("radix.slottable");function Db(t){return m.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Lb}function Fb(t,r){const s={...r};for(const i in r){const u=t[i],d=r[i];/^on[A-Z]/.test(i)?u&&d?s[i]=(...h)=>{const g=d(...h);return u(...h),g}:u&&(s[i]=u):i==="style"?s[i]={...u,...d}:i==="className"&&(s[i]=[u,d].filter(Boolean).join(" "))}return{...t,...s}}function $b(t){let r=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning;return s?t.ref:(r=Object.getOwnPropertyDescriptor(t,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning,s?t.props.ref:t.props.ref||t.ref)}function ec(t){const r=t+"CollectionProvider",[s,i]=Dn(r),[u,d]=s(r,{collectionRef:{current:null},itemMap:new Map}),p=S=>{const{scope:E,children:P}=S,A=On.useRef(null),_=On.useRef(new Map).current;return l.jsx(u,{scope:E,itemMap:_,collectionRef:A,children:P})};p.displayName=r;const h=t+"CollectionSlot",g=Xp(h),v=On.forwardRef((S,E)=>{const{scope:P,children:A}=S,_=d(h,P),L=He(E,_.collectionRef);return l.jsx(g,{ref:L,children:A})});v.displayName=h;const y=t+"CollectionItemSlot",w="data-radix-collection-item",b=Xp(y),C=On.forwardRef((S,E)=>{const{scope:P,children:A,..._}=S,L=On.useRef(null),D=He(E,L),O=d(y,P);return On.useEffect(()=>(O.itemMap.set(L,{ref:L,..._}),()=>{O.itemMap.delete(L)})),l.jsx(b,{[w]:"",ref:D,children:A})});C.displayName=y;function k(S){const E=d(t+"CollectionConsumer",S);return On.useCallback(()=>{const A=E.collectionRef.current;if(!A)return[];const _=Array.from(A.querySelectorAll(`[${w}]`));return Array.from(E.itemMap.values()).sort((O,$)=>_.indexOf(O.ref.current)-_.indexOf($.ref.current))},[E.collectionRef,E.itemMap])}return[{Provider:p,Slot:v,ItemSlot:C},k,i]}function zb(t){const r=Ub(t),s=m.forwardRef((i,u)=>{const{children:d,...p}=i,h=m.Children.toArray(d),g=h.find(Bb);if(g){const v=g.props.children,y=h.map(w=>w===g?m.Children.count(v)>1?m.Children.only(null):m.isValidElement(v)?v.props.children:null:w);return l.jsx(r,{...p,ref:u,children:m.isValidElement(v)?m.cloneElement(v,void 0,y):null})}return l.jsx(r,{...p,ref:u,children:d})});return s.displayName=`${t}.Slot`,s}function Ub(t){const r=m.forwardRef((s,i)=>{const{children:u,...d}=s;if(m.isValidElement(u)){const p=Wb(u),h=Kb(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 Hb=Symbol("radix.slottable");function Bb(t){return m.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Hb}function Kb(t,r){const s={...r};for(const i in r){const u=t[i],d=r[i];/^on[A-Z]/.test(i)?u&&d?s[i]=(...h)=>{const g=d(...h);return u(...h),g}:u&&(s[i]=u):i==="style"?s[i]={...u,...d}:i==="className"&&(s[i]=[u,d].filter(Boolean).join(" "))}return{...t,...s}}function Wb(t){let r=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning;return s?t.ref:(r=Object.getOwnPropertyDescriptor(t,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning,s?t.props.ref:t.props.ref||t.ref)}var Vb=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],je=Vb.reduce((t,r)=>{const s=zb(`Primitive.${r}`),i=m.forwardRef((u,d)=>{const{asChild:p,...h}=u,g=p?s: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 tc(t,r){t&&Mi.flushSync(()=>t.dispatchEvent(r))}function yt(t){const r=m.useRef(t);return m.useEffect(()=>{r.current=t}),m.useMemo(()=>(...s)=>r.current?.(...s),[])}function Qb(t,r=globalThis?.document){const s=yt(t);m.useEffect(()=>{const i=u=>{u.key==="Escape"&&s(u)};return r.addEventListener("keydown",i,{capture:!0}),()=>r.removeEventListener("keydown",i,{capture:!0})},[s,r])}var Gb="DismissableLayer",Nu="dismissableLayer.update",qb="dismissableLayer.pointerDownOutside",Yb="dismissableLayer.focusOutside",Zp,mm=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ii=m.forwardRef((t,r)=>{const{disableOutsidePointerEvents:s=!1,onEscapeKeyDown:i,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:p,onDismiss:h,...g}=t,v=m.useContext(mm),[y,w]=m.useState(null),b=y?.ownerDocument??globalThis?.document,[,C]=m.useState({}),k=He(r,$=>w($)),S=Array.from(v.layers),[E]=[...v.layersWithOutsidePointerEventsDisabled].slice(-1),P=S.indexOf(E),A=y?S.indexOf(y):-1,_=v.layersWithOutsidePointerEventsDisabled.size>0,L=A>=P,D=Zb($=>{const W=$.target,Q=[...v.branches].some(ee=>ee.contains(W));!L||Q||(u?.($),p?.($),$.defaultPrevented||h?.())},b),O=Jb($=>{const W=$.target;[...v.branches].some(ee=>ee.contains(W))||(d?.($),p?.($),$.defaultPrevented||h?.())},b);return Qb($=>{A===v.layers.size-1&&(i?.($),!$.defaultPrevented&&h&&($.preventDefault(),h()))},b),m.useEffect(()=>{if(y)return s&&(v.layersWithOutsidePointerEventsDisabled.size===0&&(Zp=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),v.layersWithOutsidePointerEventsDisabled.add(y)),v.layers.add(y),Jp(),()=>{s&&v.layersWithOutsidePointerEventsDisabled.size===1&&(b.body.style.pointerEvents=Zp)}},[y,b,s,v]),m.useEffect(()=>()=>{y&&(v.layers.delete(y),v.layersWithOutsidePointerEventsDisabled.delete(y),Jp())},[y,v]),m.useEffect(()=>{const $=()=>C({});return document.addEventListener(Nu,$),()=>document.removeEventListener(Nu,$)},[]),l.jsx(je.div,{...g,ref:k,style:{pointerEvents:_?L?"auto":"none":void 0,...t.style},onFocusCapture:he(t.onFocusCapture,O.onFocusCapture),onBlurCapture:he(t.onBlurCapture,O.onBlurCapture),onPointerDownCapture:he(t.onPointerDownCapture,D.onPointerDownCapture)})});Ii.displayName=Gb;var Xb="DismissableLayerBranch",gm=m.forwardRef((t,r)=>{const s=m.useContext(mm),i=m.useRef(null),u=He(r,i);return m.useEffect(()=>{const d=i.current;if(d)return s.branches.add(d),()=>{s.branches.delete(d)}},[s.branches]),l.jsx(je.div,{...t,ref:u})});gm.displayName=Xb;function Zb(t,r=globalThis?.document){const s=yt(t),i=m.useRef(!1),u=m.useRef(()=>{});return m.useEffect(()=>{const d=h=>{if(h.target&&!i.current){let g=function(){vm(qb,s,v,{discrete:!0})};const v={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,s]),{onPointerDownCapture:()=>i.current=!0}}function Jb(t,r=globalThis?.document){const s=yt(t),i=m.useRef(!1);return m.useEffect(()=>{const u=d=>{d.target&&!i.current&&vm(Yb,s,{originalEvent:d},{discrete:!1})};return r.addEventListener("focusin",u),()=>r.removeEventListener("focusin",u)},[r,s]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function Jp(){const t=new CustomEvent(Nu);document.dispatchEvent(t)}function vm(t,r,s,{discrete:i}){const u=s.originalEvent.target,d=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:s});r&&u.addEventListener(t,r,{once:!0}),i?tc(u,d):u.dispatchEvent(d)}var e0=Ii,t0=gm,Gt=globalThis?.document?m.useLayoutEffect:()=>{},n0="Portal",nc=m.forwardRef((t,r)=>{const{container:s,...i}=t,[u,d]=m.useState(!1);Gt(()=>d(!0),[]);const p=s||u&&globalThis?.document?.body;return p?Ab.createPortal(l.jsx(je.div,{...i,ref:r}),p):null});nc.displayName=n0;function r0(t,r){return m.useReducer((s,i)=>r[s][i]??s,t)}var Fn=t=>{const{present:r,children:s}=t,i=o0(r),u=typeof s=="function"?s({present:i.isPresent}):m.Children.only(s),d=He(i.ref,s0(u));return typeof s=="function"||i.isPresent?m.cloneElement(u,{ref:d}):null};Fn.displayName="Presence";function o0(t){const[r,s]=m.useState(),i=m.useRef(null),u=m.useRef(t),d=m.useRef("none"),p=t?"mounted":"unmounted",[h,g]=r0(p,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{const v=di(i.current);d.current=h==="mounted"?v:"none"},[h]),Gt(()=>{const v=i.current,y=u.current;if(y!==t){const b=d.current,C=di(v);t?g("MOUNT"):C==="none"||v?.display==="none"?g("UNMOUNT"):g(y&&b!==C?"ANIMATION_OUT":"UNMOUNT"),u.current=t}},[t,g]),Gt(()=>{if(r){let v;const y=r.ownerDocument.defaultView??window,w=C=>{const S=di(i.current).includes(CSS.escape(C.animationName));if(C.target===r&&S&&(g("ANIMATION_END"),!u.current)){const E=r.style.animationFillMode;r.style.animationFillMode="forwards",v=y.setTimeout(()=>{r.style.animationFillMode==="forwards"&&(r.style.animationFillMode=E)})}},b=C=>{C.target===r&&(d.current=di(i.current))};return r.addEventListener("animationstart",b),r.addEventListener("animationcancel",w),r.addEventListener("animationend",w),()=>{y.clearTimeout(v),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(v=>{i.current=v?getComputedStyle(v):null,s(v)},[])}}function di(t){return t?.animationName||"none"}function s0(t){let r=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning;return s?t.ref:(r=Object.getOwnPropertyDescriptor(t,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning,s?t.props.ref:t.props.ref||t.ref)}var i0=Bu[" useInsertionEffect ".trim().toString()]||Gt;function Qo({prop:t,defaultProp:r,onChange:s=()=>{},caller:i}){const[u,d,p]=a0({defaultProp:r,onChange:s}),h=t!==void 0,g=h?t:u;{const y=m.useRef(t!==void 0);m.useEffect(()=>{const w=y.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.`),y.current=h},[h,i])}const v=m.useCallback(y=>{if(h){const w=l0(y)?y(t):y;w!==t&&p.current?.(w)}else d(y)},[h,t,d,p]);return[g,v]}function a0({defaultProp:t,onChange:r}){const[s,i]=m.useState(t),u=m.useRef(s),d=m.useRef(r);return i0(()=>{d.current=r},[r]),m.useEffect(()=>{u.current!==s&&(d.current?.(s),u.current=s)},[s,u]),[s,i,d]}function l0(t){return typeof t=="function"}var u0=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"}),c0="VisuallyHidden",Li=m.forwardRef((t,r)=>l.jsx(je.span,{...t,ref:r,style:{...u0,...t.style}}));Li.displayName=c0;var d0=Li,rc="ToastProvider",[oc,f0,p0]=ec("Toast"),[xm]=Dn("Toast",[p0]),[h0,Di]=xm(rc),ym=t=>{const{__scopeToast:r,label:s="Notification",duration:i=5e3,swipeDirection:u="right",swipeThreshold:d=50,children:p}=t,[h,g]=m.useState(null),[v,y]=m.useState(0),w=m.useRef(!1),b=m.useRef(!1);return s.trim()||console.error(`Invalid prop \`label\` supplied to \`${rc}\`. Expected non-empty \`string\`.`),l.jsx(oc.Provider,{scope:r,children:l.jsx(h0,{scope:r,label:s,duration:i,swipeDirection:u,swipeThreshold:d,toastCount:v,viewport:h,onViewportChange:g,onToastAdd:m.useCallback(()=>y(C=>C+1),[]),onToastRemove:m.useCallback(()=>y(C=>C-1),[]),isFocusedToastEscapeKeyDownRef:w,isClosePausedRef:b,children:p})})};ym.displayName=rc;var wm="ToastViewport",m0=["F8"],ju="toast.viewportPause",Ru="toast.viewportResume",bm=m.forwardRef((t,r)=>{const{__scopeToast:s,hotkey:i=m0,label:u="Notifications ({hotkey})",...d}=t,p=Di(wm,s),h=f0(s),g=m.useRef(null),v=m.useRef(null),y=m.useRef(null),w=m.useRef(null),b=He(r,w,p.onViewportChange),C=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),k=p.toastCount>0;m.useEffect(()=>{const E=P=>{i.length!==0&&i.every(_=>P[_]||P.code===_)&&w.current?.focus()};return document.addEventListener("keydown",E),()=>document.removeEventListener("keydown",E)},[i]),m.useEffect(()=>{const E=g.current,P=w.current;if(k&&E&&P){const A=()=>{if(!p.isClosePausedRef.current){const O=new CustomEvent(ju);P.dispatchEvent(O),p.isClosePausedRef.current=!0}},_=()=>{if(p.isClosePausedRef.current){const O=new CustomEvent(Ru);P.dispatchEvent(O),p.isClosePausedRef.current=!1}},L=O=>{!E.contains(O.relatedTarget)&&_()},D=()=>{E.contains(document.activeElement)||_()};return E.addEventListener("focusin",A),E.addEventListener("focusout",L),E.addEventListener("pointermove",A),E.addEventListener("pointerleave",D),window.addEventListener("blur",A),window.addEventListener("focus",_),()=>{E.removeEventListener("focusin",A),E.removeEventListener("focusout",L),E.removeEventListener("pointermove",A),E.removeEventListener("pointerleave",D),window.removeEventListener("blur",A),window.removeEventListener("focus",_)}}},[k,p.isClosePausedRef]);const S=m.useCallback(({tabbingDirection:E})=>{const A=h().map(_=>{const L=_.ref.current,D=[L,...R0(L)];return E==="forwards"?D:D.reverse()});return(E==="forwards"?A.reverse():A).flat()},[h]);return m.useEffect(()=>{const E=w.current;if(E){const P=A=>{const _=A.altKey||A.ctrlKey||A.metaKey;if(A.key==="Tab"&&!_){const D=document.activeElement,O=A.shiftKey;if(A.target===E&&O){v.current?.focus();return}const Q=S({tabbingDirection:O?"backwards":"forwards"}),ee=Q.findIndex(ne=>ne===D);eu(Q.slice(ee+1))?A.preventDefault():O?v.current?.focus():y.current?.focus()}};return E.addEventListener("keydown",P),()=>E.removeEventListener("keydown",P)}},[h,S]),l.jsxs(t0,{ref:g,role:"region","aria-label":u.replace("{hotkey}",C),tabIndex:-1,style:{pointerEvents:k?void 0:"none"},children:[k&&l.jsx(Pu,{ref:v,onFocusFromOutsideViewport:()=>{const E=S({tabbingDirection:"forwards"});eu(E)}}),l.jsx(oc.Slot,{scope:s,children:l.jsx(je.ol,{tabIndex:-1,...d,ref:b})}),k&&l.jsx(Pu,{ref:y,onFocusFromOutsideViewport:()=>{const E=S({tabbingDirection:"backwards"});eu(E)}})]})});bm.displayName=wm;var Sm="ToastFocusProxy",Pu=m.forwardRef((t,r)=>{const{__scopeToast:s,onFocusFromOutsideViewport:i,...u}=t,d=Di(Sm,s);return l.jsx(Li,{tabIndex:0,...u,ref:r,style:{position:"fixed"},onFocus:p=>{const h=p.relatedTarget;!d.viewport?.contains(h)&&i()}})});Pu.displayName=Sm;var Go="Toast",g0="toast.swipeStart",v0="toast.swipeMove",x0="toast.swipeCancel",y0="toast.swipeEnd",Cm=m.forwardRef((t,r)=>{const{forceMount:s,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:s||h,children:l.jsx(S0,{open:h,...p,ref:r,onClose:()=>g(!1),onPause:yt(t.onPause),onResume:yt(t.onResume),onSwipeStart:he(t.onSwipeStart,v=>{v.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:he(t.onSwipeMove,v=>{const{x:y,y:w}=v.detail.delta;v.currentTarget.setAttribute("data-swipe","move"),v.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${y}px`),v.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${w}px`)}),onSwipeCancel:he(t.onSwipeCancel,v=>{v.currentTarget.setAttribute("data-swipe","cancel"),v.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),v.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),v.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),v.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:he(t.onSwipeEnd,v=>{const{x:y,y:w}=v.detail.delta;v.currentTarget.setAttribute("data-swipe","end"),v.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),v.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),v.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${y}px`),v.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${w}px`),g(!1)})})})});Cm.displayName=Go;var[w0,b0]=xm(Go,{onClose(){}}),S0=m.forwardRef((t,r)=>{const{__scopeToast:s,type:i="foreground",duration:u,open:d,onClose:p,onEscapeKeyDown:h,onPause:g,onResume:v,onSwipeStart:y,onSwipeMove:w,onSwipeCancel:b,onSwipeEnd:C,...k}=t,S=Di(Go,s),[E,P]=m.useState(null),A=He(r,X=>P(X)),_=m.useRef(null),L=m.useRef(null),D=u||S.duration,O=m.useRef(0),$=m.useRef(D),W=m.useRef(0),{onToastAdd:Q,onToastRemove:ee}=S,ne=yt(()=>{E?.contains(document.activeElement)&&S.viewport?.focus(),p()}),Z=m.useCallback(X=>{!X||X===1/0||(window.clearTimeout(W.current),O.current=new Date().getTime(),W.current=window.setTimeout(ne,X))},[ne]);m.useEffect(()=>{const X=S.viewport;if(X){const ve=()=>{Z($.current),v?.()},se=()=>{const le=new Date().getTime()-O.current;$.current=$.current-le,window.clearTimeout(W.current),g?.()};return X.addEventListener(ju,se),X.addEventListener(Ru,ve),()=>{X.removeEventListener(ju,se),X.removeEventListener(Ru,ve)}}},[S.viewport,D,g,v,Z]),m.useEffect(()=>{d&&!S.isClosePausedRef.current&&Z(D)},[d,D,S.isClosePausedRef,Z]),m.useEffect(()=>(Q(),()=>ee()),[Q,ee]);const de=m.useMemo(()=>E?Tm(E):null,[E]);return S.viewport?l.jsxs(l.Fragment,{children:[de&&l.jsx(C0,{__scopeToast:s,role:"status","aria-live":i==="foreground"?"assertive":"polite",children:de}),l.jsx(w0,{scope:s,onClose:ne,children:Mi.createPortal(l.jsx(oc.ItemSlot,{scope:s,children:l.jsx(e0,{asChild:!0,onEscapeKeyDown:he(h,()=>{S.isFocusedToastEscapeKeyDownRef.current||ne(),S.isFocusedToastEscapeKeyDownRef.current=!1}),children:l.jsx(je.li,{tabIndex:0,"data-state":d?"open":"closed","data-swipe-direction":S.swipeDirection,...k,ref:A,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:he(t.onKeyDown,X=>{X.key==="Escape"&&(h?.(X.nativeEvent),X.nativeEvent.defaultPrevented||(S.isFocusedToastEscapeKeyDownRef.current=!0,ne()))}),onPointerDown:he(t.onPointerDown,X=>{X.button===0&&(_.current={x:X.clientX,y:X.clientY})}),onPointerMove:he(t.onPointerMove,X=>{if(!_.current)return;const ve=X.clientX-_.current.x,se=X.clientY-_.current.y,le=!!L.current,U=["left","right"].includes(S.swipeDirection),H=["left","up"].includes(S.swipeDirection)?Math.min:Math.max,q=U?H(0,ve):0,R=U?0:H(0,se),B=X.pointerType==="touch"?10:2,ue={x:q,y:R},me={originalEvent:X,delta:ue};le?(L.current=ue,fi(v0,w,me,{discrete:!1})):eh(ue,S.swipeDirection,B)?(L.current=ue,fi(g0,y,me,{discrete:!1}),X.target.setPointerCapture(X.pointerId)):(Math.abs(ve)>B||Math.abs(se)>B)&&(_.current=null)}),onPointerUp:he(t.onPointerUp,X=>{const ve=L.current,se=X.target;if(se.hasPointerCapture(X.pointerId)&&se.releasePointerCapture(X.pointerId),L.current=null,_.current=null,ve){const le=X.currentTarget,U={originalEvent:X,delta:ve};eh(ve,S.swipeDirection,S.swipeThreshold)?fi(y0,C,U,{discrete:!0}):fi(x0,b,U,{discrete:!0}),le.addEventListener("click",H=>H.preventDefault(),{once:!0})}})})})}),S.viewport)})]}):null}),C0=t=>{const{__scopeToast:r,children:s,...i}=t,u=Di(Go,r),[d,p]=m.useState(!1),[h,g]=m.useState(!1);return N0(()=>p(!0)),m.useEffect(()=>{const v=window.setTimeout(()=>g(!0),1e3);return()=>window.clearTimeout(v)},[]),h?null:l.jsx(nc,{asChild:!0,children:l.jsx(Li,{...i,children:d&&l.jsxs(l.Fragment,{children:[u.label," ",s]})})})},k0="ToastTitle",km=m.forwardRef((t,r)=>{const{__scopeToast:s,...i}=t;return l.jsx(je.div,{...i,ref:r})});km.displayName=k0;var E0="ToastDescription",Em=m.forwardRef((t,r)=>{const{__scopeToast:s,...i}=t;return l.jsx(je.div,{...i,ref:r})});Em.displayName=E0;var Nm="ToastAction",jm=m.forwardRef((t,r)=>{const{altText:s,...i}=t;return s.trim()?l.jsx(Pm,{altText:s,asChild:!0,children:l.jsx(sc,{...i,ref:r})}):(console.error(`Invalid prop \`altText\` supplied to \`${Nm}\`. Expected non-empty \`string\`.`),null)});jm.displayName=Nm;var Rm="ToastClose",sc=m.forwardRef((t,r)=>{const{__scopeToast:s,...i}=t,u=b0(Rm,s);return l.jsx(Pm,{asChild:!0,children:l.jsx(je.button,{type:"button",...i,ref:r,onClick:he(t.onClick,u.onClose)})})});sc.displayName=Rm;var Pm=m.forwardRef((t,r)=>{const{__scopeToast:s,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 Tm(t){const r=[];return Array.from(t.childNodes).forEach(i=>{if(i.nodeType===i.TEXT_NODE&&i.textContent&&r.push(i.textContent),j0(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(...Tm(i))}}),r}function fi(t,r,s,{discrete:i}){const u=s.originalEvent.currentTarget,d=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:s});r&&u.addEventListener(t,r,{once:!0}),i?tc(u,d):u.dispatchEvent(d)}var eh=(t,r,s=0)=>{const i=Math.abs(t.x),u=Math.abs(t.y),d=i>u;return r==="left"||r==="right"?d&&i>s:!d&&u>s};function N0(t=()=>{}){const r=yt(t);Gt(()=>{let s=0,i=0;return s=window.requestAnimationFrame(()=>i=window.requestAnimationFrame(r)),()=>{window.cancelAnimationFrame(s),window.cancelAnimationFrame(i)}},[r])}function j0(t){return t.nodeType===t.ELEMENT_NODE}function R0(t){const r=[],s=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(;s.nextNode();)r.push(s.currentNode);return r}function eu(t){const r=document.activeElement;return t.some(s=>s===r?!0:(s.focus(),document.activeElement!==r))}var P0=ym,_m=bm,Om=Cm,Am=km,Mm=Em,Im=jm,Lm=sc;function Dm(t){var r,s,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]&&(s=Dm(t[r]))&&(i&&(i+=" "),i+=s)}else for(s in t)t[s]&&(i&&(i+=" "),i+=s);return i}function Fm(){for(var t,r,s=0,i="",u=arguments.length;s<u;s++)(t=arguments[s])&&(r=Dm(t))&&(i&&(i+=" "),i+=r);return i}const th=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,nh=Fm,T0=(t,r)=>s=>{var i;if(r?.variants==null)return nh(t,s?.class,s?.className);const{variants:u,defaultVariants:d}=r,p=Object.keys(u).map(v=>{const y=s?.[v],w=d?.[v];if(y===null)return null;const b=th(y)||th(w);return u[v][b]}),h=s&&Object.entries(s).reduce((v,y)=>{let[w,b]=y;return b===void 0||(v[w]=b),v},{}),g=r==null||(i=r.compoundVariants)===null||i===void 0?void 0:i.reduce((v,y)=>{let{class:w,className:b,...C}=y;return Object.entries(C).every(k=>{let[S,E]=k;return Array.isArray(E)?E.includes({...d,...h}[S]):{...d,...h}[S]===E})?[...v,w,b]:v},[]);return nh(t,p,g,s?.class,s?.className)};const _0=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),$m=(...t)=>t.filter((r,s,i)=>!!r&&i.indexOf(r)===s).join(" ");var O0={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 A0=m.forwardRef(({color:t="currentColor",size:r=24,strokeWidth:s=2,absoluteStrokeWidth:i,className:u="",children:d,iconNode:p,...h},g)=>m.createElement("svg",{ref:g,...O0,width:r,height:r,stroke:t,strokeWidth:i?Number(s)*24/Number(r):s,className:$m("lucide",u),...h},[...p.map(([v,y])=>m.createElement(v,y)),...Array.isArray(d)?d:[d]]));const Hr=(t,r)=>{const s=m.forwardRef(({className:i,...u},d)=>m.createElement(A0,{ref:d,iconNode:r,className:$m(`lucide-${_0(t)}`,i),...u}));return s.displayName=`${t}`,s};const M0=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 I0=Hr("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const L0=Hr("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const D0=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 F0=Hr("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);const $0=Hr("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),ic="-",z0=t=>{const r=H0(t),{conflictingClassGroups:s,conflictingClassGroupModifiers:i}=t;return{getClassGroupId:p=>{const h=p.split(ic);return h[0]===""&&h.length!==1&&h.shift(),zm(h,r)||U0(p)},getConflictingClassGroupIds:(p,h)=>{const g=s[p]||[];return h&&i[p]?[...g,...i[p]]:g}}},zm=(t,r)=>{if(t.length===0)return r.classGroupId;const s=t[0],i=r.nextPart.get(s),u=i?zm(t.slice(1),i):void 0;if(u)return u;if(r.validators.length===0)return;const d=t.join(ic);return r.validators.find(({validator:p})=>p(d))?.classGroupId},rh=/^\[(.+)\]$/,U0=t=>{if(rh.test(t)){const r=rh.exec(t)[1],s=r?.substring(0,r.indexOf(":"));if(s)return"arbitrary.."+s}},H0=t=>{const{theme:r,prefix:s}=t,i={nextPart:new Map,validators:[]};return K0(Object.entries(t.classGroups),s).forEach(([d,p])=>{Tu(p,i,d,r)}),i},Tu=(t,r,s,i)=>{t.forEach(u=>{if(typeof u=="string"){const d=u===""?r:oh(r,u);d.classGroupId=s;return}if(typeof u=="function"){if(B0(u)){Tu(u(i),r,s,i);return}r.validators.push({validator:u,classGroupId:s});return}Object.entries(u).forEach(([d,p])=>{Tu(p,oh(r,d),s,i)})})},oh=(t,r)=>{let s=t;return r.split(ic).forEach(i=>{s.nextPart.has(i)||s.nextPart.set(i,{nextPart:new Map,validators:[]}),s=s.nextPart.get(i)}),s},B0=t=>t.isThemeGetter,K0=(t,r)=>r?t.map(([s,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[s,u]}):t,W0=t=>{if(t<1)return{get:()=>{},set:()=>{}};let r=0,s=new Map,i=new Map;const u=(d,p)=>{s.set(d,p),r++,r>t&&(r=0,i=s,s=new Map)};return{get(d){let p=s.get(d);if(p!==void 0)return p;if((p=i.get(d))!==void 0)return u(d,p),p},set(d,p){s.has(d)?s.set(d,p):u(d,p)}}},Um="!",V0=t=>{const{separator:r,experimentalParseClassName:s}=t,i=r.length===1,u=r[0],d=r.length,p=h=>{const g=[];let v=0,y=0,w;for(let E=0;E<h.length;E++){let P=h[E];if(v===0){if(P===u&&(i||h.slice(E,E+d)===r)){g.push(h.slice(y,E)),y=E+d;continue}if(P==="/"){w=E;continue}}P==="["?v++:P==="]"&&v--}const b=g.length===0?h:h.substring(y),C=b.startsWith(Um),k=C?b.substring(1):b,S=w&&w>y?w-y:void 0;return{modifiers:g,hasImportantModifier:C,baseClassName:k,maybePostfixModifierPosition:S}};return s?h=>s({className:h,parseClassName:p}):p},Q0=t=>{if(t.length<=1)return t;const r=[];let s=[];return t.forEach(i=>{i[0]==="["?(r.push(...s.sort(),i),s=[]):s.push(i)}),r.push(...s.sort()),r},G0=t=>({cache:W0(t.cacheSize),parseClassName:V0(t),...z0(t)}),q0=/\s+/,Y0=(t,r)=>{const{parseClassName:s,getClassGroupId:i,getConflictingClassGroupIds:u}=r,d=[],p=t.trim().split(q0);let h="";for(let g=p.length-1;g>=0;g-=1){const v=p[g],{modifiers:y,hasImportantModifier:w,baseClassName:b,maybePostfixModifierPosition:C}=s(v);let k=!!C,S=i(k?b.substring(0,C):b);if(!S){if(!k){h=v+(h.length>0?" "+h:h);continue}if(S=i(b),!S){h=v+(h.length>0?" "+h:h);continue}k=!1}const E=Q0(y).join(":"),P=w?E+Um:E,A=P+S;if(d.includes(A))continue;d.push(A);const _=u(S,k);for(let L=0;L<_.length;++L){const D=_[L];d.push(P+D)}h=v+(h.length>0?" "+h:h)}return h};function X0(){let t=0,r,s,i="";for(;t<arguments.length;)(r=arguments[t++])&&(s=Hm(r))&&(i&&(i+=" "),i+=s);return i}const Hm=t=>{if(typeof t=="string")return t;let r,s="";for(let i=0;i<t.length;i++)t[i]&&(r=Hm(t[i]))&&(s&&(s+=" "),s+=r);return s};function Z0(t,...r){let s,i,u,d=p;function p(g){const v=r.reduce((y,w)=>w(y),t());return s=G0(v),i=s.cache.get,u=s.cache.set,d=h,h(g)}function h(g){const v=i(g);if(v)return v;const y=Y0(g,s);return u(g,y),y}return function(){return d(X0.apply(null,arguments))}}const Te=t=>{const r=s=>s[t]||[];return r.isThemeGetter=!0,r},Bm=/^\[(?:([a-z-]+):)?(.+)\]$/i,J0=/^\d+\/\d+$/,e1=new Set(["px","full","screen"]),t1=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,n1=/\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$/,r1=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,o1=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,s1=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,sn=t=>Ir(t)||e1.has(t)||J0.test(t),Pn=t=>Br(t,"length",p1),Ir=t=>!!t&&!Number.isNaN(Number(t)),tu=t=>Br(t,"number",Ir),Ao=t=>!!t&&Number.isInteger(Number(t)),i1=t=>t.endsWith("%")&&Ir(t.slice(0,-1)),xe=t=>Bm.test(t),Tn=t=>t1.test(t),a1=new Set(["length","size","percentage"]),l1=t=>Br(t,a1,Km),u1=t=>Br(t,"position",Km),c1=new Set(["image","url"]),d1=t=>Br(t,c1,m1),f1=t=>Br(t,"",h1),Mo=()=>!0,Br=(t,r,s)=>{const i=Bm.exec(t);return i?i[1]?typeof r=="string"?i[1]===r:r.has(i[1]):s(i[2]):!1},p1=t=>n1.test(t)&&!r1.test(t),Km=()=>!1,h1=t=>o1.test(t),m1=t=>s1.test(t),g1=()=>{const t=Te("colors"),r=Te("spacing"),s=Te("blur"),i=Te("brightness"),u=Te("borderColor"),d=Te("borderRadius"),p=Te("borderSpacing"),h=Te("borderWidth"),g=Te("contrast"),v=Te("grayscale"),y=Te("hueRotate"),w=Te("invert"),b=Te("gap"),C=Te("gradientColorStops"),k=Te("gradientColorStopPositions"),S=Te("inset"),E=Te("margin"),P=Te("opacity"),A=Te("padding"),_=Te("saturate"),L=Te("scale"),D=Te("sepia"),O=Te("skew"),$=Te("space"),W=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"],U=()=>["start","end","center","between","around","evenly","stretch"],H=()=>["","0",xe],q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>[Ir,xe];return{cacheSize:500,separator:":",theme:{colors:[Mo],spacing:[sn,Pn],blur:["none","",Tn,xe],brightness:R(),borderColor:[t],borderRadius:["none","","full",Tn,xe],borderSpacing:Z(),borderWidth:de(),contrast:R(),grayscale:H(),hueRotate:R(),invert:H(),gap:Z(),gradientColorStops:[t],gradientColorStopPositions:[i1,Pn],inset:ne(),margin:ne(),opacity:R(),padding:Z(),saturate:R(),scale:R(),sepia:H(),skew:R(),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:[S]}],"inset-x":[{"inset-x":[S]}],"inset-y":[{"inset-y":[S]}],start:[{start:[S]}],end:[{end:[S]}],top:[{top:[S]}],right:[{right:[S]}],bottom:[{bottom:[S]}],left:[{left:[S]}],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:H()}],shrink:[{shrink:H()}],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",...U()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...U(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...U(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[A]}],px:[{px:[A]}],py:[{py:[A]}],ps:[{ps:[A]}],pe:[{pe:[A]}],pt:[{pt:[A]}],pr:[{pr:[A]}],pb:[{pb:[A]}],pl:[{pl:[A]}],m:[{m:[E]}],mx:[{mx:[E]}],my:[{my:[E]}],ms:[{ms:[E]}],me:[{me:[E]}],mt:[{mt:[E]}],mr:[{mr:[E]}],mb:[{mb:[E]}],ml:[{ml:[E]}],"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",tu]}],"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,tu]}],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":[P]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[P]}],"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":[P]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ve(),u1]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",l1]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},d1]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[k]}],"gradient-via-pos":[{via:[k]}],"gradient-to-pos":[{to:[k]}],"gradient-from":[{from:[C]}],"gradient-via":[{via:[C]}],"gradient-to":[{to:[C]}],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":[P]}],"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":[P]}],"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":[P]}],"ring-offset-w":[{"ring-offset":[sn,Pn]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",Tn,f1]}],"shadow-color":[{shadow:[Mo]}],opacity:[{opacity:[P]}],"mix-blend":[{"mix-blend":[...le(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":le()}],filter:[{filter:["","none"]}],blur:[{blur:[s]}],brightness:[{brightness:[i]}],contrast:[{contrast:[g]}],"drop-shadow":[{"drop-shadow":["","none",Tn,xe]}],grayscale:[{grayscale:[v]}],"hue-rotate":[{"hue-rotate":[y]}],invert:[{invert:[w]}],saturate:[{saturate:[_]}],sepia:[{sepia:[D]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[s]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[g]}],"backdrop-grayscale":[{"backdrop-grayscale":[v]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[y]}],"backdrop-invert":[{"backdrop-invert":[w]}],"backdrop-opacity":[{"backdrop-opacity":[P]}],"backdrop-saturate":[{"backdrop-saturate":[_]}],"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:R()}],ease:[{ease:["linear","in","out","in-out",xe]}],delay:[{delay:R()}],animate:[{animate:["none","spin","ping","pulse","bounce",xe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[L]}],"scale-x":[{"scale-x":[L]}],"scale-y":[{"scale-y":[L]}],rotate:[{rotate:[Ao,xe]}],"translate-x":[{"translate-x":[W]}],"translate-y":[{"translate-y":[W]}],"skew-x":[{"skew-x":[O]}],"skew-y":[{"skew-y":[O]}],"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,tu]}],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"]}}},v1=Z0(g1);function De(...t){return v1(Fm(t))}const x1=P0,Wm=m.forwardRef(({className:t,...r},s)=>l.jsx(_m,{ref:s,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}));Wm.displayName=_m.displayName;const y1=T0("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"}}),Vm=m.forwardRef(({className:t,variant:r,...s},i)=>l.jsx(Om,{ref:i,className:De(y1({variant:r}),t),...s}));Vm.displayName=Om.displayName;const w1=m.forwardRef(({className:t,...r},s)=>l.jsx(Im,{ref:s,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}));w1.displayName=Im.displayName;const Qm=m.forwardRef(({className:t,...r},s)=>l.jsx(Lm,{ref:s,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($0,{className:"h-4 w-4"})}));Qm.displayName=Lm.displayName;const Gm=m.forwardRef(({className:t,...r},s)=>l.jsx(Am,{ref:s,className:De("text-sm font-semibold",t),...r}));Gm.displayName=Am.displayName;const qm=m.forwardRef(({className:t,...r},s)=>l.jsx(Mm,{ref:s,className:De("text-sm opacity-90",t),...r}));qm.displayName=Mm.displayName;function b1(){const{toasts:t}=Ob();return l.jsxs(x1,{children:[t.map(function({id:r,title:s,description:i,action:u,...d}){return l.jsxs(Vm,{...d,children:[l.jsxs("div",{className:"grid gap-1",children:[s&&l.jsx(Gm,{children:s}),i&&l.jsx(qm,{children:i})]}),u,l.jsx(Qm,{})]},r)}),l.jsx(Wm,{})]})}var S1=Bu[" useId ".trim().toString()]||(()=>{}),C1=0;function $o(t){const[r,s]=m.useState(S1());return Gt(()=>{s(i=>i??String(C1++))},[t]),r?`radix-${r}`:""}const k1=["top","right","bottom","left"],In=Math.min,gt=Math.max,Ni=Math.round,pi=Math.floor,Qt=t=>({x:t,y:t}),E1={left:"right",right:"left",bottom:"top",top:"bottom"};function _u(t,r,s){return gt(t,In(r,s))}function an(t,r){return typeof t=="function"?t(r):t}function ln(t){return t.split("-")[0]}function Kr(t){return t.split("-")[1]}function ac(t){return t==="x"?"y":"x"}function lc(t){return t==="y"?"height":"width"}function Vt(t){const r=t[0];return r==="t"||r==="b"?"y":"x"}function uc(t){return ac(Vt(t))}function N1(t,r,s){s===void 0&&(s=!1);const i=Kr(t),u=uc(t),d=lc(u);let p=u==="x"?i===(s?"end":"start")?"right":"left":i==="start"?"bottom":"top";return r.reference[d]>r.floating[d]&&(p=ji(p)),[p,ji(p)]}function j1(t){const r=ji(t);return[Ou(t),r,Ou(r)]}function Ou(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const sh=["left","right"],ih=["right","left"],R1=["top","bottom"],P1=["bottom","top"];function T1(t,r,s){switch(t){case"top":case"bottom":return s?r?ih:sh:r?sh:ih;case"left":case"right":return r?R1:P1;default:return[]}}function _1(t,r,s,i){const u=Kr(t);let d=T1(ln(t),s==="start",i);return u&&(d=d.map(p=>p+"-"+u),r&&(d=d.concat(d.map(Ou)))),d}function ji(t){const r=ln(t);return E1[r]+t.slice(r.length)}function O1(t){return{top:0,right:0,bottom:0,left:0,...t}}function Ym(t){return typeof t!="number"?O1(t):{top:t,right:t,bottom:t,left:t}}function Ri(t){const{x:r,y:s,width:i,height:u}=t;return{width:i,height:u,top:s,left:r,right:r+i,bottom:s+u,x:r,y:s}}function ah(t,r,s){let{reference:i,floating:u}=t;const d=Vt(r),p=uc(r),h=lc(p),g=ln(r),v=d==="y",y=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 C;switch(g){case"top":C={x:y,y:i.y-u.height};break;case"bottom":C={x:y,y:i.y+i.height};break;case"right":C={x:i.x+i.width,y:w};break;case"left":C={x:i.x-u.width,y:w};break;default:C={x:i.x,y:i.y}}switch(Kr(r)){case"start":C[p]-=b*(s&&v?-1:1);break;case"end":C[p]+=b*(s&&v?-1:1);break}return C}async function A1(t,r){var s;r===void 0&&(r={});const{x:i,y:u,platform:d,rects:p,elements:h,strategy:g}=t,{boundary:v="clippingAncestors",rootBoundary:y="viewport",elementContext:w="floating",altBoundary:b=!1,padding:C=0}=an(r,t),k=Ym(C),E=h[b?w==="floating"?"reference":"floating":w],P=Ri(await d.getClippingRect({element:(s=await(d.isElement==null?void 0:d.isElement(E)))==null||s?E:E.contextElement||await(d.getDocumentElement==null?void 0:d.getDocumentElement(h.floating)),boundary:v,rootBoundary:y,strategy:g})),A=w==="floating"?{x:i,y:u,width:p.floating.width,height:p.floating.height}:p.reference,_=await(d.getOffsetParent==null?void 0:d.getOffsetParent(h.floating)),L=await(d.isElement==null?void 0:d.isElement(_))?await(d.getScale==null?void 0:d.getScale(_))||{x:1,y:1}:{x:1,y:1},D=Ri(d.convertOffsetParentRelativeRectToViewportRelativeRect?await d.convertOffsetParentRelativeRectToViewportRelativeRect({elements:h,rect:A,offsetParent:_,strategy:g}):A);return{top:(P.top-D.top+k.top)/L.y,bottom:(D.bottom-P.bottom+k.bottom)/L.y,left:(P.left-D.left+k.left)/L.x,right:(D.right-P.right+k.right)/L.x}}const M1=50,I1=async(t,r,s)=>{const{placement:i="bottom",strategy:u="absolute",middleware:d=[],platform:p}=s,h=p.detectOverflow?p:{...p,detectOverflow:A1},g=await(p.isRTL==null?void 0:p.isRTL(r));let v=await p.getElementRects({reference:t,floating:r,strategy:u}),{x:y,y:w}=ah(v,i,g),b=i,C=0;const k={};for(let S=0;S<d.length;S++){const E=d[S];if(!E)continue;const{name:P,fn:A}=E,{x:_,y:L,data:D,reset:O}=await A({x:y,y:w,initialPlacement:i,placement:b,strategy:u,middlewareData:k,rects:v,platform:h,elements:{reference:t,floating:r}});y=_??y,w=L??w,k[P]={...k[P],...D},O&&C<M1&&(C++,typeof O=="object"&&(O.placement&&(b=O.placement),O.rects&&(v=O.rects===!0?await p.getElementRects({reference:t,floating:r,strategy:u}):O.rects),{x:y,y:w}=ah(v,b,g)),S=-1)}return{x:y,y:w,placement:b,strategy:u,middlewareData:k}},L1=t=>({name:"arrow",options:t,async fn(r){const{x:s,y:i,placement:u,rects:d,platform:p,elements:h,middlewareData:g}=r,{element:v,padding:y=0}=an(t,r)||{};if(v==null)return{};const w=Ym(y),b={x:s,y:i},C=uc(u),k=lc(C),S=await p.getDimensions(v),E=C==="y",P=E?"top":"left",A=E?"bottom":"right",_=E?"clientHeight":"clientWidth",L=d.reference[k]+d.reference[C]-b[C]-d.floating[k],D=b[C]-d.reference[C],O=await(p.getOffsetParent==null?void 0:p.getOffsetParent(v));let $=O?O[_]:0;(!$||!await(p.isElement==null?void 0:p.isElement(O)))&&($=h.floating[_]||d.floating[k]);const W=L/2-D/2,Q=$/2-S[k]/2-1,ee=In(w[P],Q),ne=In(w[A],Q),Z=ee,de=$-S[k]-ne,X=$/2-S[k]/2+W,ve=_u(Z,X,de),se=!g.arrow&&Kr(u)!=null&&X!==ve&&d.reference[k]/2-(X<Z?ee:ne)-S[k]/2<0,le=se?X<Z?X-Z:X-de:0;return{[C]:b[C]+le,data:{[C]:ve,centerOffset:X-ve-le,...se&&{alignmentOffset:le}},reset:se}}}),D1=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(r){var s,i;const{placement:u,middlewareData:d,rects:p,initialPlacement:h,platform:g,elements:v}=r,{mainAxis:y=!0,crossAxis:w=!0,fallbackPlacements:b,fallbackStrategy:C="bestFit",fallbackAxisSideDirection:k="none",flipAlignment:S=!0,...E}=an(t,r);if((s=d.arrow)!=null&&s.alignmentOffset)return{};const P=ln(u),A=Vt(h),_=ln(h)===h,L=await(g.isRTL==null?void 0:g.isRTL(v.floating)),D=b||(_||!S?[ji(h)]:j1(h)),O=k!=="none";!b&&O&&D.push(..._1(h,S,k,L));const $=[h,...D],W=await g.detectOverflow(r,E),Q=[];let ee=((i=d.flip)==null?void 0:i.overflows)||[];if(y&&Q.push(W[P]),w){const X=N1(u,p,L);Q.push(W[X[0]],W[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"?A!==Vt(ve):!1)||ee.every(U=>Vt(U.placement)===A?U.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,U)=>le.overflows[1]-U.overflows[1])[0])==null?void 0:Z.placement;if(!se)switch(C){case"bestFit":{var de;const le=(de=ee.filter(U=>{if(O){const H=Vt(U.placement);return H===A||H==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(H=>H>0).reduce((H,q)=>H+q,0)]).sort((U,H)=>U[1]-H[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 lh(t,r){return{top:t.top-r.height,right:t.right-r.width,bottom:t.bottom-r.height,left:t.left-r.width}}function uh(t){return k1.some(r=>t[r]>=0)}const F1=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(r){const{rects:s,platform:i}=r,{strategy:u="referenceHidden",...d}=an(t,r);switch(u){case"referenceHidden":{const p=await i.detectOverflow(r,{...d,elementContext:"reference"}),h=lh(p,s.reference);return{data:{referenceHiddenOffsets:h,referenceHidden:uh(h)}}}case"escaped":{const p=await i.detectOverflow(r,{...d,altBoundary:!0}),h=lh(p,s.floating);return{data:{escapedOffsets:h,escaped:uh(h)}}}default:return{}}}}},Xm=new Set(["left","top"]);async function $1(t,r){const{placement:s,platform:i,elements:u}=t,d=await(i.isRTL==null?void 0:i.isRTL(u.floating)),p=ln(s),h=Kr(s),g=Vt(s)==="y",v=Xm.has(p)?-1:1,y=d&&g?-1:1,w=an(r,t);let{mainAxis:b,crossAxis:C,alignmentAxis:k}=typeof w=="number"?{mainAxis:w,crossAxis:0,alignmentAxis:null}:{mainAxis:w.mainAxis||0,crossAxis:w.crossAxis||0,alignmentAxis:w.alignmentAxis};return h&&typeof k=="number"&&(C=h==="end"?k*-1:k),g?{x:C*y,y:b*v}:{x:b*v,y:C*y}}const z1=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(r){var s,i;const{x:u,y:d,placement:p,middlewareData:h}=r,g=await $1(r,t);return p===((s=h.offset)==null?void 0:s.placement)&&(i=h.arrow)!=null&&i.alignmentOffset?{}:{x:u+g.x,y:d+g.y,data:{...g,placement:p}}}}},U1=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(r){const{x:s,y:i,placement:u,platform:d}=r,{mainAxis:p=!0,crossAxis:h=!1,limiter:g={fn:P=>{let{x:A,y:_}=P;return{x:A,y:_}}},...v}=an(t,r),y={x:s,y:i},w=await d.detectOverflow(r,v),b=Vt(ln(u)),C=ac(b);let k=y[C],S=y[b];if(p){const P=C==="y"?"top":"left",A=C==="y"?"bottom":"right",_=k+w[P],L=k-w[A];k=_u(_,k,L)}if(h){const P=b==="y"?"top":"left",A=b==="y"?"bottom":"right",_=S+w[P],L=S-w[A];S=_u(_,S,L)}const E=g.fn({...r,[C]:k,[b]:S});return{...E,data:{x:E.x-s,y:E.y-i,enabled:{[C]:p,[b]:h}}}}}},H1=function(t){return t===void 0&&(t={}),{options:t,fn(r){const{x:s,y:i,placement:u,rects:d,middlewareData:p}=r,{offset:h=0,mainAxis:g=!0,crossAxis:v=!0}=an(t,r),y={x:s,y:i},w=Vt(u),b=ac(w);let C=y[b],k=y[w];const S=an(h,r),E=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(g){const _=b==="y"?"height":"width",L=d.reference[b]-d.floating[_]+E.mainAxis,D=d.reference[b]+d.reference[_]-E.mainAxis;C<L?C=L:C>D&&(C=D)}if(v){var P,A;const _=b==="y"?"width":"height",L=Xm.has(ln(u)),D=d.reference[w]-d.floating[_]+(L&&((P=p.offset)==null?void 0:P[w])||0)+(L?0:E.crossAxis),O=d.reference[w]+d.reference[_]+(L?0:((A=p.offset)==null?void 0:A[w])||0)-(L?E.crossAxis:0);k<D?k=D:k>O&&(k=O)}return{[b]:C,[w]:k}}}},B1=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(r){var s,i;const{placement:u,rects:d,platform:p,elements:h}=r,{apply:g=()=>{},...v}=an(t,r),y=await p.detectOverflow(r,v),w=ln(u),b=Kr(u),C=Vt(u)==="y",{width:k,height:S}=d.floating;let E,P;w==="top"||w==="bottom"?(E=w,P=b===(await(p.isRTL==null?void 0:p.isRTL(h.floating))?"start":"end")?"left":"right"):(P=w,E=b==="end"?"top":"bottom");const A=S-y.top-y.bottom,_=k-y.left-y.right,L=In(S-y[E],A),D=In(k-y[P],_),O=!r.middlewareData.shift;let $=L,W=D;if((s=r.middlewareData.shift)!=null&&s.enabled.x&&(W=_),(i=r.middlewareData.shift)!=null&&i.enabled.y&&($=A),O&&!b){const ee=gt(y.left,0),ne=gt(y.right,0),Z=gt(y.top,0),de=gt(y.bottom,0);C?W=k-2*(ee!==0||ne!==0?ee+ne:gt(y.left,y.right)):$=S-2*(Z!==0||de!==0?Z+de:gt(y.top,y.bottom))}await g({...r,availableWidth:W,availableHeight:$});const Q=await p.getDimensions(h.floating);return k!==Q.width||S!==Q.height?{reset:{rects:!0}}:{}}}};function Fi(){return typeof window<"u"}function Wr(t){return Zm(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=(Zm(t)?t.ownerDocument:t.document)||window.document)==null?void 0:r.documentElement}function Zm(t){return Fi()?t instanceof Node||t instanceof xt(t).Node:!1}function Ft(t){return Fi()?t instanceof Element||t instanceof xt(t).Element:!1}function un(t){return Fi()?t instanceof HTMLElement||t instanceof xt(t).HTMLElement:!1}function ch(t){return!Fi()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof xt(t).ShadowRoot}function qo(t){const{overflow:r,overflowX:s,overflowY:i,display:u}=$t(t);return/auto|scroll|overlay|hidden|clip/.test(r+i+s)&&u!=="inline"&&u!=="contents"}function K1(t){return/^(table|td|th)$/.test(Wr(t))}function $i(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const W1=/transform|translate|scale|rotate|perspective|filter/,V1=/paint|layout|strict|content/,Zn=t=>!!t&&t!=="none";let nu;function cc(t){const r=Ft(t)?$t(t):t;return Zn(r.transform)||Zn(r.translate)||Zn(r.scale)||Zn(r.rotate)||Zn(r.perspective)||!dc()&&(Zn(r.backdropFilter)||Zn(r.filter))||W1.test(r.willChange||"")||V1.test(r.contain||"")}function Q1(t){let r=Ln(t);for(;un(r)&&!Fr(r);){if(cc(r))return r;if($i(r))return null;r=Ln(r)}return null}function dc(){return nu==null&&(nu=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),nu}function Fr(t){return/^(html|body|#document)$/.test(Wr(t))}function $t(t){return xt(t).getComputedStyle(t)}function zi(t){return Ft(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Ln(t){if(Wr(t)==="html")return t;const r=t.assignedSlot||t.parentNode||ch(t)&&t.host||qt(t);return ch(r)?r.host:r}function Jm(t){const r=Ln(t);return Fr(r)?t.ownerDocument?t.ownerDocument.body:t.body:un(r)&&qo(r)?r:Jm(r)}function zo(t,r,s){var i;r===void 0&&(r=[]),s===void 0&&(s=!0);const u=Jm(t),d=u===((i=t.ownerDocument)==null?void 0:i.body),p=xt(u);if(d){const h=Au(p);return r.concat(p,p.visualViewport||[],qo(u)?u:[],h&&s?zo(h):[])}else return r.concat(u,zo(u,[],s))}function Au(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function eg(t){const r=$t(t);let s=parseFloat(r.width)||0,i=parseFloat(r.height)||0;const u=un(t),d=u?t.offsetWidth:s,p=u?t.offsetHeight:i,h=Ni(s)!==d||Ni(i)!==p;return h&&(s=d,i=p),{width:s,height:i,$:h}}function fc(t){return Ft(t)?t:t.contextElement}function Lr(t){const r=fc(t);if(!un(r))return Qt(1);const s=r.getBoundingClientRect(),{width:i,height:u,$:d}=eg(r);let p=(d?Ni(s.width):s.width)/i,h=(d?Ni(s.height):s.height)/u;return(!p||!Number.isFinite(p))&&(p=1),(!h||!Number.isFinite(h))&&(h=1),{x:p,y:h}}const G1=Qt(0);function tg(t){const r=xt(t);return!dc()||!r.visualViewport?G1:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function q1(t,r,s){return r===void 0&&(r=!1),!s||r&&s!==xt(t)?!1:r}function nr(t,r,s,i){r===void 0&&(r=!1),s===void 0&&(s=!1);const u=t.getBoundingClientRect(),d=fc(t);let p=Qt(1);r&&(i?Ft(i)&&(p=Lr(i)):p=Lr(t));const h=q1(d,s,i)?tg(d):Qt(0);let g=(u.left+h.x)/p.x,v=(u.top+h.y)/p.y,y=u.width/p.x,w=u.height/p.y;if(d){const b=xt(d),C=i&&Ft(i)?xt(i):i;let k=b,S=Au(k);for(;S&&i&&C!==k;){const E=Lr(S),P=S.getBoundingClientRect(),A=$t(S),_=P.left+(S.clientLeft+parseFloat(A.paddingLeft))*E.x,L=P.top+(S.clientTop+parseFloat(A.paddingTop))*E.y;g*=E.x,v*=E.y,y*=E.x,w*=E.y,g+=_,v+=L,k=xt(S),S=Au(k)}}return Ri({width:y,height:w,x:g,y:v})}function Ui(t,r){const s=zi(t).scrollLeft;return r?r.left+s:nr(qt(t)).left+s}function ng(t,r){const s=t.getBoundingClientRect(),i=s.left+r.scrollLeft-Ui(t,s),u=s.top+r.scrollTop;return{x:i,y:u}}function Y1(t){let{elements:r,rect:s,offsetParent:i,strategy:u}=t;const d=u==="fixed",p=qt(i),h=r?$i(r.floating):!1;if(i===p||h&&d)return s;let g={scrollLeft:0,scrollTop:0},v=Qt(1);const y=Qt(0),w=un(i);if((w||!w&&!d)&&((Wr(i)!=="body"||qo(p))&&(g=zi(i)),w)){const C=nr(i);v=Lr(i),y.x=C.x+i.clientLeft,y.y=C.y+i.clientTop}const b=p&&!w&&!d?ng(p,g):Qt(0);return{width:s.width*v.x,height:s.height*v.y,x:s.x*v.x-g.scrollLeft*v.x+y.x+b.x,y:s.y*v.y-g.scrollTop*v.y+y.y+b.y}}function X1(t){return Array.from(t.getClientRects())}function Z1(t){const r=qt(t),s=zi(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=-s.scrollLeft+Ui(t);const h=-s.scrollTop;return $t(i).direction==="rtl"&&(p+=gt(r.clientWidth,i.clientWidth)-u),{width:u,height:d,x:p,y:h}}const dh=25;function J1(t,r){const s=xt(t),i=qt(t),u=s.visualViewport;let d=i.clientWidth,p=i.clientHeight,h=0,g=0;if(u){d=u.width,p=u.height;const y=dc();(!y||y&&r==="fixed")&&(h=u.offsetLeft,g=u.offsetTop)}const v=Ui(i);if(v<=0){const y=i.ownerDocument,w=y.body,b=getComputedStyle(w),C=y.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,k=Math.abs(i.clientWidth-w.clientWidth-C);k<=dh&&(d-=k)}else v<=dh&&(d+=v);return{width:d,height:p,x:h,y:g}}function eS(t,r){const s=nr(t,!0,r==="fixed"),i=s.top+t.clientTop,u=s.left+t.clientLeft,d=un(t)?Lr(t):Qt(1),p=t.clientWidth*d.x,h=t.clientHeight*d.y,g=u*d.x,v=i*d.y;return{width:p,height:h,x:g,y:v}}function fh(t,r,s){let i;if(r==="viewport")i=J1(t,s);else if(r==="document")i=Z1(qt(t));else if(Ft(r))i=eS(r,s);else{const u=tg(t);i={x:r.x-u.x,y:r.y-u.y,width:r.width,height:r.height}}return Ri(i)}function rg(t,r){const s=Ln(t);return s===r||!Ft(s)||Fr(s)?!1:$t(s).position==="fixed"||rg(s,r)}function tS(t,r){const s=r.get(t);if(s)return s;let i=zo(t,[],!1).filter(h=>Ft(h)&&Wr(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=cc(p);!g&&h.position==="fixed"&&(u=null),(d?!g&&!u:!g&&h.position==="static"&&!!u&&(u.position==="absolute"||u.position==="fixed")||qo(p)&&!g&&rg(t,p))?i=i.filter(y=>y!==p):u=h,p=Ln(p)}return r.set(t,i),i}function nS(t){let{element:r,boundary:s,rootBoundary:i,strategy:u}=t;const p=[...s==="clippingAncestors"?$i(r)?[]:tS(r,this._c):[].concat(s),i],h=fh(r,p[0],u);let g=h.top,v=h.right,y=h.bottom,w=h.left;for(let b=1;b<p.length;b++){const C=fh(r,p[b],u);g=gt(C.top,g),v=In(C.right,v),y=In(C.bottom,y),w=gt(C.left,w)}return{width:v-w,height:y-g,x:w,y:g}}function rS(t){const{width:r,height:s}=eg(t);return{width:r,height:s}}function oS(t,r,s){const i=un(r),u=qt(r),d=s==="fixed",p=nr(t,!0,d,r);let h={scrollLeft:0,scrollTop:0};const g=Qt(0);function v(){g.x=Ui(u)}if(i||!i&&!d)if((Wr(r)!=="body"||qo(u))&&(h=zi(r)),i){const C=nr(r,!0,d,r);g.x=C.x+r.clientLeft,g.y=C.y+r.clientTop}else u&&v();d&&!i&&u&&v();const y=u&&!i&&!d?ng(u,h):Qt(0),w=p.left+h.scrollLeft-g.x-y.x,b=p.top+h.scrollTop-g.y-y.y;return{x:w,y:b,width:p.width,height:p.height}}function ru(t){return $t(t).position==="static"}function ph(t,r){if(!un(t)||$t(t).position==="fixed")return null;if(r)return r(t);let s=t.offsetParent;return qt(t)===s&&(s=s.ownerDocument.body),s}function og(t,r){const s=xt(t);if($i(t))return s;if(!un(t)){let u=Ln(t);for(;u&&!Fr(u);){if(Ft(u)&&!ru(u))return u;u=Ln(u)}return s}let i=ph(t,r);for(;i&&K1(i)&&ru(i);)i=ph(i,r);return i&&Fr(i)&&ru(i)&&!cc(i)?s:i||Q1(t)||s}const sS=async function(t){const r=this.getOffsetParent||og,s=this.getDimensions,i=await s(t.floating);return{reference:oS(t.reference,await r(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function iS(t){return $t(t).direction==="rtl"}const aS={convertOffsetParentRelativeRectToViewportRelativeRect:Y1,getDocumentElement:qt,getClippingRect:nS,getOffsetParent:og,getElementRects:sS,getClientRects:X1,getDimensions:rS,getScale:Lr,isElement:Ft,isRTL:iS};function sg(t,r){return t.x===r.x&&t.y===r.y&&t.width===r.width&&t.height===r.height}function lS(t,r){let s=null,i;const u=qt(t);function d(){var h;clearTimeout(i),(h=s)==null||h.disconnect(),s=null}function p(h,g){h===void 0&&(h=!1),g===void 0&&(g=1),d();const v=t.getBoundingClientRect(),{left:y,top:w,width:b,height:C}=v;if(h||r(),!b||!C)return;const k=pi(w),S=pi(u.clientWidth-(y+b)),E=pi(u.clientHeight-(w+C)),P=pi(y),_={rootMargin:-k+"px "+-S+"px "+-E+"px "+-P+"px",threshold:gt(0,In(1,g))||1};let L=!0;function D(O){const $=O[0].intersectionRatio;if($!==g){if(!L)return p();$?p(!1,$):i=setTimeout(()=>{p(!1,1e-7)},1e3)}$===1&&!sg(v,t.getBoundingClientRect())&&p(),L=!1}try{s=new IntersectionObserver(D,{..._,root:u.ownerDocument})}catch{s=new IntersectionObserver(D,_)}s.observe(t)}return p(!0),d}function uS(t,r,s,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,v=fc(t),y=u||d?[...v?zo(v):[],...r?zo(r):[]]:[];y.forEach(P=>{u&&P.addEventListener("scroll",s,{passive:!0}),d&&P.addEventListener("resize",s)});const w=v&&h?lS(v,s):null;let b=-1,C=null;p&&(C=new ResizeObserver(P=>{let[A]=P;A&&A.target===v&&C&&r&&(C.unobserve(r),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var _;(_=C)==null||_.observe(r)})),s()}),v&&!g&&C.observe(v),r&&C.observe(r));let k,S=g?nr(t):null;g&&E();function E(){const P=nr(t);S&&!sg(S,P)&&s(),S=P,k=requestAnimationFrame(E)}return s(),()=>{var P;y.forEach(A=>{u&&A.removeEventListener("scroll",s),d&&A.removeEventListener("resize",s)}),w?.(),(P=C)==null||P.disconnect(),C=null,g&&cancelAnimationFrame(k)}}const cS=z1,dS=U1,fS=D1,pS=B1,hS=F1,hh=L1,mS=H1,gS=(t,r,s)=>{const i=new Map,u={platform:aS,...s},d={...u.platform,_c:i};return I1(t,r,{...u,platform:d})};var vS=typeof document<"u",xS=function(){},bi=vS?m.useLayoutEffect:xS;function Pi(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 s,i,u;if(t&&r&&typeof t=="object"){if(Array.isArray(t)){if(s=t.length,s!==r.length)return!1;for(i=s;i--!==0;)if(!Pi(t[i],r[i]))return!1;return!0}if(u=Object.keys(t),s=u.length,s!==Object.keys(r).length)return!1;for(i=s;i--!==0;)if(!{}.hasOwnProperty.call(r,u[i]))return!1;for(i=s;i--!==0;){const d=u[i];if(!(d==="_owner"&&t.$$typeof)&&!Pi(t[d],r[d]))return!1}return!0}return t!==t&&r!==r}function ig(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function mh(t,r){const s=ig(t);return Math.round(r*s)/s}function ou(t){const r=m.useRef(t);return bi(()=>{r.current=t}),r}function yS(t){t===void 0&&(t={});const{placement:r="bottom",strategy:s="absolute",middleware:i=[],platform:u,elements:{reference:d,floating:p}={},transform:h=!0,whileElementsMounted:g,open:v}=t,[y,w]=m.useState({x:0,y:0,strategy:s,placement:r,middlewareData:{},isPositioned:!1}),[b,C]=m.useState(i);Pi(b,i)||C(i);const[k,S]=m.useState(null),[E,P]=m.useState(null),A=m.useCallback(U=>{U!==O.current&&(O.current=U,S(U))},[]),_=m.useCallback(U=>{U!==$.current&&($.current=U,P(U))},[]),L=d||k,D=p||E,O=m.useRef(null),$=m.useRef(null),W=m.useRef(y),Q=g!=null,ee=ou(g),ne=ou(u),Z=ou(v),de=m.useCallback(()=>{if(!O.current||!$.current)return;const U={placement:r,strategy:s,middleware:b};ne.current&&(U.platform=ne.current),gS(O.current,$.current,U).then(H=>{const q={...H,isPositioned:Z.current!==!1};X.current&&!Pi(W.current,q)&&(W.current=q,Mi.flushSync(()=>{w(q)}))})},[b,r,s,ne,Z]);bi(()=>{v===!1&&W.current.isPositioned&&(W.current.isPositioned=!1,w(U=>({...U,isPositioned:!1})))},[v]);const X=m.useRef(!1);bi(()=>(X.current=!0,()=>{X.current=!1}),[]),bi(()=>{if(L&&(O.current=L),D&&($.current=D),L&&D){if(ee.current)return ee.current(L,D,de);de()}},[L,D,de,ee,Q]);const ve=m.useMemo(()=>({reference:O,floating:$,setReference:A,setFloating:_}),[A,_]),se=m.useMemo(()=>({reference:L,floating:D}),[L,D]),le=m.useMemo(()=>{const U={position:s,left:0,top:0};if(!se.floating)return U;const H=mh(se.floating,y.x),q=mh(se.floating,y.y);return h?{...U,transform:"translate("+H+"px, "+q+"px)",...ig(se.floating)>=1.5&&{willChange:"transform"}}:{position:s,left:H,top:q}},[s,h,se.floating,y.x,y.y]);return m.useMemo(()=>({...y,update:de,refs:ve,elements:se,floatingStyles:le}),[y,de,ve,se,le])}const wS=t=>{function r(s){return{}.hasOwnProperty.call(s,"current")}return{name:"arrow",options:t,fn(s){const{element:i,padding:u}=typeof t=="function"?t(s):t;return i&&r(i)?i.current!=null?hh({element:i.current,padding:u}).fn(s):{}:i?hh({element:i,padding:u}).fn(s):{}}}},bS=(t,r)=>{const s=cS(t);return{name:s.name,fn:s.fn,options:[t,r]}},SS=(t,r)=>{const s=dS(t);return{name:s.name,fn:s.fn,options:[t,r]}},CS=(t,r)=>({fn:mS(t).fn,options:[t,r]}),kS=(t,r)=>{const s=fS(t);return{name:s.name,fn:s.fn,options:[t,r]}},ES=(t,r)=>{const s=pS(t);return{name:s.name,fn:s.fn,options:[t,r]}},NS=(t,r)=>{const s=hS(t);return{name:s.name,fn:s.fn,options:[t,r]}},jS=(t,r)=>{const s=wS(t);return{name:s.name,fn:s.fn,options:[t,r]}};var RS="Arrow",ag=m.forwardRef((t,r)=>{const{children:s,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?s:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});ag.displayName=RS;var PS=ag;function TS(t){const[r,s]=m.useState(void 0);return Gt(()=>{if(t){s({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,v=Array.isArray(g)?g[0]:g;p=v.inlineSize,h=v.blockSize}else p=t.offsetWidth,h=t.offsetHeight;s({width:p,height:h})});return i.observe(t,{box:"border-box"}),()=>i.unobserve(t)}else s(void 0)},[t]),r}var pc="Popper",[lg,Hi]=Dn(pc),[_S,ug]=lg(pc),cg=t=>{const{__scopePopper:r,children:s}=t,[i,u]=m.useState(null);return l.jsx(_S,{scope:r,anchor:i,onAnchorChange:u,children:s})};cg.displayName=pc;var dg="PopperAnchor",fg=m.forwardRef((t,r)=>{const{__scopePopper:s,virtualRef:i,...u}=t,d=ug(dg,s),p=m.useRef(null),h=He(r,p),g=m.useRef(null);return m.useEffect(()=>{const v=g.current;g.current=i?.current||p.current,v!==g.current&&d.onAnchorChange(g.current)}),i?null:l.jsx(je.div,{...u,ref:h})});fg.displayName=dg;var hc="PopperContent",[OS,AS]=lg(hc),pg=m.forwardRef((t,r)=>{const{__scopePopper:s,side:i="bottom",sideOffset:u=0,align:d="center",alignOffset:p=0,arrowPadding:h=0,avoidCollisions:g=!0,collisionBoundary:v=[],collisionPadding:y=0,sticky:w="partial",hideWhenDetached:b=!1,updatePositionStrategy:C="optimized",onPlaced:k,...S}=t,E=ug(hc,s),[P,A]=m.useState(null),_=He(r,ce=>A(ce)),[L,D]=m.useState(null),O=TS(L),$=O?.width??0,W=O?.height??0,Q=i+(d!=="center"?"-"+d:""),ee=typeof y=="number"?y:{top:0,right:0,bottom:0,left:0,...y},ne=Array.isArray(v)?v:[v],Z=ne.length>0,de={padding:ee,boundary:ne.filter(IS),altBoundary:Z},{refs:X,floatingStyles:ve,placement:se,isPositioned:le,middlewareData:U}=yS({strategy:"fixed",placement:Q,whileElementsMounted:(...ce)=>uS(...ce,{animationFrame:C==="always"}),elements:{reference:E.anchor},middleware:[bS({mainAxis:u+W,alignmentAxis:p}),g&&SS({mainAxis:!0,crossAxis:!1,limiter:w==="partial"?CS():void 0,...de}),g&&kS({...de}),ES({...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`)}}),L&&jS({element:L,padding:h}),LS({arrowWidth:$,arrowHeight:W}),b&&NS({strategy:"referenceHidden",...de})]}),[H,q]=gg(se),R=yt(k);Gt(()=>{le&&R?.()},[le,R]);const B=U.arrow?.x,ue=U.arrow?.y,me=U.arrow?.centerOffset!==0,[z,ae]=m.useState();return Gt(()=>{P&&ae(window.getComputedStyle(P).zIndex)},[P]),l.jsx("div",{ref:X.setFloating,"data-radix-popper-content-wrapper":"",style:{...ve,transform:le?ve.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:z,"--radix-popper-transform-origin":[U.transformOrigin?.x,U.transformOrigin?.y].join(" "),...U.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:l.jsx(OS,{scope:s,placedSide:H,onArrowChange:D,arrowX:B,arrowY:ue,shouldHideArrow:me,children:l.jsx(je.div,{"data-side":H,"data-align":q,...S,ref:_,style:{...S.style,animation:le?void 0:"none"}})})})});pg.displayName=hc;var hg="PopperArrow",MS={top:"bottom",right:"left",bottom:"top",left:"right"},mg=m.forwardRef(function(r,s){const{__scopePopper:i,...u}=r,d=AS(hg,i),p=MS[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(PS,{...u,ref:s,style:{...u.style,display:"block"}})})});mg.displayName=hg;function IS(t){return t!==null}var LS=t=>({name:"transformOrigin",options:t,fn(r){const{placement:s,rects:i,middlewareData:u}=r,p=u.arrow?.centerOffset!==0,h=p?0:t.arrowWidth,g=p?0:t.arrowHeight,[v,y]=gg(s),w={start:"0%",center:"50%",end:"100%"}[y],b=(u.arrow?.x??0)+h/2,C=(u.arrow?.y??0)+g/2;let k="",S="";return v==="bottom"?(k=p?w:`${b}px`,S=`${-g}px`):v==="top"?(k=p?w:`${b}px`,S=`${i.floating.height+g}px`):v==="right"?(k=`${-g}px`,S=p?w:`${C}px`):v==="left"&&(k=`${i.floating.width+g}px`,S=p?w:`${C}px`),{data:{x:k,y:S}}}});function gg(t){const[r,s="center"]=t.split("-");return[r,s]}var vg=cg,xg=fg,yg=pg,wg=mg,DS=Symbol("radix.slottable");function FS(t){const r=({children:s})=>l.jsx(l.Fragment,{children:s});return r.displayName=`${t}.Slottable`,r.__radixId=DS,r}var[Bi]=Dn("Tooltip",[Hi]),Ki=Hi(),bg="TooltipProvider",$S=700,Mu="tooltip.open",[zS,mc]=Bi(bg),Sg=t=>{const{__scopeTooltip:r,delayDuration:s=$S,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 v=g.current;return()=>window.clearTimeout(v)},[]),l.jsx(zS,{scope:r,isOpenDelayedRef:p,delayDuration:s,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(v=>{h.current=v},[]),disableHoverableContent:u,children:d})};Sg.displayName=bg;var Uo="Tooltip",[US,Wi]=Bi(Uo),Cg=t=>{const{__scopeTooltip:r,children:s,open:i,defaultOpen:u,onOpenChange:d,disableHoverableContent:p,delayDuration:h}=t,g=mc(Uo,t.__scopeTooltip),v=Ki(r),[y,w]=m.useState(null),b=$o(),C=m.useRef(0),k=p??g.disableHoverableContent,S=h??g.delayDuration,E=m.useRef(!1),[P,A]=Qo({prop:i,defaultProp:u??!1,onChange:$=>{$?(g.onOpen(),document.dispatchEvent(new CustomEvent(Mu))):g.onClose(),d?.($)},caller:Uo}),_=m.useMemo(()=>P?E.current?"delayed-open":"instant-open":"closed",[P]),L=m.useCallback(()=>{window.clearTimeout(C.current),C.current=0,E.current=!1,A(!0)},[A]),D=m.useCallback(()=>{window.clearTimeout(C.current),C.current=0,A(!1)},[A]),O=m.useCallback(()=>{window.clearTimeout(C.current),C.current=window.setTimeout(()=>{E.current=!0,A(!0),C.current=0},S)},[S,A]);return m.useEffect(()=>()=>{C.current&&(window.clearTimeout(C.current),C.current=0)},[]),l.jsx(vg,{...v,children:l.jsx(US,{scope:r,contentId:b,open:P,stateAttribute:_,trigger:y,onTriggerChange:w,onTriggerEnter:m.useCallback(()=>{g.isOpenDelayedRef.current?O():L()},[g.isOpenDelayedRef,O,L]),onTriggerLeave:m.useCallback(()=>{k?D():(window.clearTimeout(C.current),C.current=0)},[D,k]),onOpen:L,onClose:D,disableHoverableContent:k,children:s})})};Cg.displayName=Uo;var Iu="TooltipTrigger",kg=m.forwardRef((t,r)=>{const{__scopeTooltip:s,...i}=t,u=Wi(Iu,s),d=mc(Iu,s),p=Ki(s),h=m.useRef(null),g=He(r,h,u.onTriggerChange),v=m.useRef(!1),y=m.useRef(!1),w=m.useCallback(()=>v.current=!1,[]);return m.useEffect(()=>()=>document.removeEventListener("pointerup",w),[w]),l.jsx(xg,{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"&&!y.current&&!d.isPointerInTransitRef.current&&(u.onTriggerEnter(),y.current=!0)}),onPointerLeave:he(t.onPointerLeave,()=>{u.onTriggerLeave(),y.current=!1}),onPointerDown:he(t.onPointerDown,()=>{u.open&&u.onClose(),v.current=!0,document.addEventListener("pointerup",w,{once:!0})}),onFocus:he(t.onFocus,()=>{v.current||u.onOpen()}),onBlur:he(t.onBlur,u.onClose),onClick:he(t.onClick,u.onClose)})})});kg.displayName=Iu;var HS="TooltipPortal",[aj,BS]=Bi(HS,{forceMount:void 0}),$r="TooltipContent",Eg=m.forwardRef((t,r)=>{const s=BS($r,t.__scopeTooltip),{forceMount:i=s.forceMount,side:u="top",...d}=t,p=Wi($r,t.__scopeTooltip);return l.jsx(Fn,{present:i||p.open,children:p.disableHoverableContent?l.jsx(Ng,{side:u,...d,ref:r}):l.jsx(KS,{side:u,...d,ref:r})})}),KS=m.forwardRef((t,r)=>{const s=Wi($r,t.__scopeTooltip),i=mc($r,t.__scopeTooltip),u=m.useRef(null),d=He(r,u),[p,h]=m.useState(null),{trigger:g,onClose:v}=s,y=u.current,{onPointerInTransitChange:w}=i,b=m.useCallback(()=>{h(null),w(!1)},[w]),C=m.useCallback((k,S)=>{const E=k.currentTarget,P={x:k.clientX,y:k.clientY},A=qS(P,E.getBoundingClientRect()),_=YS(P,A),L=XS(S.getBoundingClientRect()),D=JS([..._,...L]);h(D),w(!0)},[w]);return m.useEffect(()=>()=>b(),[b]),m.useEffect(()=>{if(g&&y){const k=E=>C(E,y),S=E=>C(E,g);return g.addEventListener("pointerleave",k),y.addEventListener("pointerleave",S),()=>{g.removeEventListener("pointerleave",k),y.removeEventListener("pointerleave",S)}}},[g,y,C,b]),m.useEffect(()=>{if(p){const k=S=>{const E=S.target,P={x:S.clientX,y:S.clientY},A=g?.contains(E)||y?.contains(E),_=!ZS(P,p);A?b():_&&(b(),v())};return document.addEventListener("pointermove",k),()=>document.removeEventListener("pointermove",k)}},[g,y,p,v,b]),l.jsx(Ng,{...t,ref:d})}),[WS,VS]=Bi(Uo,{isInside:!1}),QS=FS("TooltipContent"),Ng=m.forwardRef((t,r)=>{const{__scopeTooltip:s,children:i,"aria-label":u,onEscapeKeyDown:d,onPointerDownOutside:p,...h}=t,g=Wi($r,s),v=Ki(s),{onClose:y}=g;return m.useEffect(()=>(document.addEventListener(Mu,y),()=>document.removeEventListener(Mu,y)),[y]),m.useEffect(()=>{if(g.trigger){const w=b=>{b.target?.contains(g.trigger)&&y()};return window.addEventListener("scroll",w,{capture:!0}),()=>window.removeEventListener("scroll",w,{capture:!0})}},[g.trigger,y]),l.jsx(Ii,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:d,onPointerDownOutside:p,onFocusOutside:w=>w.preventDefault(),onDismiss:y,children:l.jsxs(yg,{"data-state":g.stateAttribute,...v,...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(QS,{children:i}),l.jsx(WS,{scope:s,isInside:!0,children:l.jsx(d0,{id:g.contentId,role:"tooltip",children:u||i})})]})})});Eg.displayName=$r;var jg="TooltipArrow",GS=m.forwardRef((t,r)=>{const{__scopeTooltip:s,...i}=t,u=Ki(s);return VS(jg,s).isInside?null:l.jsx(wg,{...u,...i,ref:r})});GS.displayName=jg;function qS(t,r){const s=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(s,i,u,d)){case d:return"left";case u:return"right";case s:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function YS(t,r,s=5){const i=[];switch(r){case"top":i.push({x:t.x-s,y:t.y+s},{x:t.x+s,y:t.y+s});break;case"bottom":i.push({x:t.x-s,y:t.y-s},{x:t.x+s,y:t.y-s});break;case"left":i.push({x:t.x+s,y:t.y-s},{x:t.x+s,y:t.y+s});break;case"right":i.push({x:t.x-s,y:t.y-s},{x:t.x-s,y:t.y+s});break}return i}function XS(t){const{top:r,right:s,bottom:i,left:u}=t;return[{x:u,y:r},{x:s,y:r},{x:s,y:i},{x:u,y:i}]}function ZS(t,r){const{x:s,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],v=h.x,y=h.y,w=g.x,b=g.y;y>i!=b>i&&s<(w-v)*(i-y)/(b-y)+v&&(u=!u)}return u}function JS(t){const r=t.slice();return r.sort((s,i)=>s.x<i.x?-1:s.x>i.x?1:s.y<i.y?-1:s.y>i.y?1:0),eC(r)}function eC(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 s=[];for(let i=t.length-1;i>=0;i--){const u=t[i];for(;s.length>=2;){const d=s[s.length-1],p=s[s.length-2];if((d.x-p.x)*(u.y-p.y)>=(d.y-p.y)*(u.x-p.x))s.pop();else break}s.push(u)}return s.pop(),r.length===1&&s.length===1&&r[0].x===s[0].x&&r[0].y===s[0].y?r:r.concat(s)}var tC=Sg,nC=Cg,rC=kg,Rg=Eg;const oC=tC,sC=nC,iC=rC,Pg=m.forwardRef(({className:t,sideOffset:r=4,...s},i)=>l.jsx(Rg,{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),...s}));Pg.displayName=Rg.displayName;var Vi="Collapsible",[aC]=Dn(Vi),[lC,gc]=aC(Vi),Tg=m.forwardRef((t,r)=>{const{__scopeCollapsible:s,open:i,defaultOpen:u,disabled:d,onOpenChange:p,...h}=t,[g,v]=Qo({prop:i,defaultProp:u??!1,onChange:p,caller:Vi});return l.jsx(lC,{scope:s,disabled:d,contentId:$o(),open:g,onOpenToggle:m.useCallback(()=>v(y=>!y),[v]),children:l.jsx(je.div,{"data-state":xc(g),"data-disabled":d?"":void 0,...h,ref:r})})});Tg.displayName=Vi;var _g="CollapsibleTrigger",Og=m.forwardRef((t,r)=>{const{__scopeCollapsible:s,...i}=t,u=gc(_g,s);return l.jsx(je.button,{type:"button","aria-controls":u.contentId,"aria-expanded":u.open||!1,"data-state":xc(u.open),"data-disabled":u.disabled?"":void 0,disabled:u.disabled,...i,ref:r,onClick:he(t.onClick,u.onOpenToggle)})});Og.displayName=_g;var vc="CollapsibleContent",Ag=m.forwardRef((t,r)=>{const{forceMount:s,...i}=t,u=gc(vc,t.__scopeCollapsible);return l.jsx(Fn,{present:s||u.open,children:({present:d})=>l.jsx(uC,{...i,ref:r,present:d})})});Ag.displayName=vc;var uC=m.forwardRef((t,r)=>{const{__scopeCollapsible:s,present:i,children:u,...d}=t,p=gc(vc,s),[h,g]=m.useState(i),v=m.useRef(null),y=He(r,v),w=m.useRef(0),b=w.current,C=m.useRef(0),k=C.current,S=p.open||h,E=m.useRef(S),P=m.useRef(void 0);return m.useEffect(()=>{const A=requestAnimationFrame(()=>E.current=!1);return()=>cancelAnimationFrame(A)},[]),Gt(()=>{const A=v.current;if(A){P.current=P.current||{transitionDuration:A.style.transitionDuration,animationName:A.style.animationName},A.style.transitionDuration="0s",A.style.animationName="none";const _=A.getBoundingClientRect();w.current=_.height,C.current=_.width,E.current||(A.style.transitionDuration=P.current.transitionDuration,A.style.animationName=P.current.animationName),g(i)}},[p.open,i]),l.jsx(je.div,{"data-state":xc(p.open),"data-disabled":p.disabled?"":void 0,id:p.contentId,hidden:!S,...d,ref:y,style:{"--radix-collapsible-content-height":b?`${b}px`:void 0,"--radix-collapsible-content-width":k?`${k}px`:void 0,...t.style},children:S&&u})});function xc(t){return t?"open":"closed"}var Lu=Tg,Du=Og,Fu=Ag;function cC(t){const r=t.split("/");if(r.length!==2||!r[0]||!r[1])return`https://github.com/${t}`;const[s,i]=r;return`https://github.com/${encodeURIComponent(s)}/${encodeURIComponent(i)}`}function dC(t,r){return t!==null?t:r===0}const gh="onboarding-panel-dismissed-v2",su={claude:"Claude",codex:"Codex",gemini:"Gemini"},vh=[{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 xh(t){return t.claude||t.codex||t.gemini}function fC(t){return Object.entries(t).filter(([,r])=>r).map(([r])=>r)}function pC(t){const r=t.repos.filter(w=>w.accessible),s=t.repos.filter(w=>!w.accessible),i=r.filter(w=>xh(w.codeReviews)),u=r.filter(w=>!xh(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()),...s.map(w=>"access:"+w.repo.toLowerCase()+":"+(w.error?.slice(0,100)??"").toLowerCase())].sort().join("|")||"complete",v=h.length>0||s.length>0,y=h.length>0?`${p} of ${d.length} complete`:`${s.length} access issue${s.length===1?"":"s"}`;return{accessibleRepos:r,hasIssues:v,inaccessibleRepos:s,reposMissingReview:u,reposWithReview:i,steps:d,pendingSteps:h,completedCount:p,dismissalKey:g,summary:y}}function iu({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 yh({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 hC({step:t,index:r,children:s}){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}),s]})]})})}function mC(){const[t,r]=m.useState(()=>typeof window>"u"?null:window.localStorage.getItem(gh)),[s,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:_,tool:L})=>(await Ge("POST","/api/onboarding/install-review",{repo:_,tool:L})).json(),onSuccess:(_,L)=>{ye.invalidateQueries({queryKey:["/api/onboarding/status"]}),vt({description:`${su[L.tool]} review workflow installed for ${L.repo}.`})},onError:_=>{vt({variant:"destructive",description:`Could not install review workflow: ${_.message}`})}});if(d||!u)return null;const{accessibleRepos:g,completedCount:v,dismissalKey:y,hasIssues:w,inaccessibleRepos:b,reposMissingReview:C,reposWithReview:k,steps:S,summary:E}=pC(u),A=(p?.codingAgent??"claude")==="codex"?["codex","claude"]:["claude","codex"];return!w||t===y?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(!s),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:E}),l.jsx("span",{className:"text-[10px] text-muted-foreground",children:s?"▲":"▼"})]}),l.jsx("button",{onClick:()=>{typeof window<"u"&&window.localStorage.setItem(gh,y),r(y)},className:"text-[10px] uppercase tracking-wider text-muted-foreground transition-colors hover:text-foreground",children:"dismiss"})]}),s&&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:[v," of ",S.length," complete"]})]}),l.jsx("div",{className:"space-y-3",children:S.map((_,L)=>l.jsxs(hC,{step:_,index:L+1,children:[_.id==="github"&&!_.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(yh,{number:1,children:["Run ",l.jsx(iu,{children:"gh auth login"})," on this machine, or set ",l.jsx(iu,{children:"GITHUB_TOKEN"})," before starting the app."]}),l.jsxs(yh,{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."]})]})]}),_.id==="repo"&&!_.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(iu,{children:"owner/repo"})," slug, then choose whether that watched repo should track only your PRs or your whole team."]}),_.id==="workflow"&&!_.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:vh.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))})]}),C.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:A.map(O=>{const $=h.isPending&&h.variables?.repo===D.repo&&h.variables?.tool===O;return l.jsx("button",{type:"button",onClick:()=>h.mutate({repo:D.repo,tool:O}),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 ${su[O]}`},`${D.repo}-${O}`)})})]},D.repo))]}),_.id==="workflow"&&_.complete&&k.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:vh.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:k.map(D=>{const O=fC(D.codeReviews).map($=>su[$]).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," · ",O]},D.repo)})})]})]},_.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(_=>l.jsxs("div",{className:"space-y-1",children:[l.jsx("div",{className:"text-[11px] font-medium",children:l.jsx("a",{href:`https://github.com/${_.repo}`,target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2",children:_.repo})}),l.jsxs("p",{className:"text-[12px] text-destructive",children:["Cannot access this repository: ",_.error??"unknown error"]})]},_.repo))})]})]})]})}const wh="app-update-dismissed";function bh(t){return t.startsWith("v")?t:`v${t}`}function Mg(t){return t.latestVersion?`app-update:${t.latestVersion}`:null}function gC(t,r){if(!t?.updateAvailable)return!1;const s=Mg(t);return s!==null&&s!==r}function Yo(){const[t,r]=m.useState(()=>typeof window>"u"?null:window.sessionStorage.getItem(wh)),{data:s}=et({queryKey:["/api/app-update"]});if(!s||!gC(s,t))return null;const i=Mg(s);return!i||!s.latestVersion?null:l.jsx("div",{className:"shrink-0 border-b border-warning-border bg-warning-muted",children:l.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 px-4 py-2",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 ${bh(s.latestVersion)} is available. You're on ${bh(s.currentVersion)}.`})]}),l.jsxs("div",{className:"flex items-center gap-3 text-[11px]",children:[l.jsx("a",{href:s.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(wh,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 vC=m.createContext(void 0);function Ig(t){const r=m.useContext(vC);return t||r||"ltr"}var au=0;function xC(){m.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??Sh()),document.body.insertAdjacentElement("beforeend",t[1]??Sh()),au++,()=>{au===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),au--}},[])}function Sh(){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 lu="focusScope.autoFocusOnMount",uu="focusScope.autoFocusOnUnmount",Ch={bubbles:!1,cancelable:!0},yC="FocusScope",Lg=m.forwardRef((t,r)=>{const{loop:s=!1,trapped:i=!1,onMountAutoFocus:u,onUnmountAutoFocus:d,...p}=t,[h,g]=m.useState(null),v=yt(u),y=yt(d),w=m.useRef(null),b=He(r,S=>g(S)),C=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(i){let S=function(_){if(C.paused||!h)return;const L=_.target;h.contains(L)?w.current=L:An(w.current,{select:!0})},E=function(_){if(C.paused||!h)return;const L=_.relatedTarget;L!==null&&(h.contains(L)||An(w.current,{select:!0}))},P=function(_){if(document.activeElement===document.body)for(const D of _)D.removedNodes.length>0&&An(h)};document.addEventListener("focusin",S),document.addEventListener("focusout",E);const A=new MutationObserver(P);return h&&A.observe(h,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",E),A.disconnect()}}},[i,h,C.paused]),m.useEffect(()=>{if(h){Eh.add(C);const S=document.activeElement;if(!h.contains(S)){const P=new CustomEvent(lu,Ch);h.addEventListener(lu,v),h.dispatchEvent(P),P.defaultPrevented||(wC(EC(Dg(h)),{select:!0}),document.activeElement===S&&An(h))}return()=>{h.removeEventListener(lu,v),setTimeout(()=>{const P=new CustomEvent(uu,Ch);h.addEventListener(uu,y),h.dispatchEvent(P),P.defaultPrevented||An(S??document.body,{select:!0}),h.removeEventListener(uu,y),Eh.remove(C)},0)}}},[h,v,y,C]);const k=m.useCallback(S=>{if(!s&&!i||C.paused)return;const E=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,P=document.activeElement;if(E&&P){const A=S.currentTarget,[_,L]=bC(A);_&&L?!S.shiftKey&&P===L?(S.preventDefault(),s&&An(_,{select:!0})):S.shiftKey&&P===_&&(S.preventDefault(),s&&An(L,{select:!0})):P===A&&S.preventDefault()}},[s,i,C.paused]);return l.jsx(je.div,{tabIndex:-1,...p,ref:b,onKeyDown:k})});Lg.displayName=yC;function wC(t,{select:r=!1}={}){const s=document.activeElement;for(const i of t)if(An(i,{select:r}),document.activeElement!==s)return}function bC(t){const r=Dg(t),s=kh(r,t),i=kh(r.reverse(),t);return[s,i]}function Dg(t){const r=[],s=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(;s.nextNode();)r.push(s.currentNode);return r}function kh(t,r){for(const s of t)if(!SC(s,{upTo:r}))return s}function SC(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 CC(t){return t instanceof HTMLInputElement&&"select"in t}function An(t,{select:r=!1}={}){if(t&&t.focus){const s=document.activeElement;t.focus({preventScroll:!0}),t!==s&&CC(t)&&r&&t.select()}}var Eh=kC();function kC(){let t=[];return{add(r){const s=t[0];r!==s&&s?.pause(),t=Nh(t,r),t.unshift(r)},remove(r){t=Nh(t,r),t[0]?.resume()}}}function Nh(t,r){const s=[...t],i=s.indexOf(r);return i!==-1&&s.splice(i,1),s}function EC(t){return t.filter(r=>r.tagName!=="A")}var cu="rovingFocusGroup.onEntryFocus",NC={bubbles:!1,cancelable:!0},Xo="RovingFocusGroup",[$u,Fg,jC]=ec(Xo),[RC,$g]=Dn(Xo,[jC]),[PC,TC]=RC(Xo),zg=m.forwardRef((t,r)=>l.jsx($u.Provider,{scope:t.__scopeRovingFocusGroup,children:l.jsx($u.Slot,{scope:t.__scopeRovingFocusGroup,children:l.jsx(_C,{...t,ref:r})})}));zg.displayName=Xo;var _C=m.forwardRef((t,r)=>{const{__scopeRovingFocusGroup:s,orientation:i,loop:u=!1,dir:d,currentTabStopId:p,defaultCurrentTabStopId:h,onCurrentTabStopIdChange:g,onEntryFocus:v,preventScrollOnEntryFocus:y=!1,...w}=t,b=m.useRef(null),C=He(r,b),k=Ig(d),[S,E]=Qo({prop:p,defaultProp:h??null,onChange:g,caller:Xo}),[P,A]=m.useState(!1),_=yt(v),L=Fg(s),D=m.useRef(!1),[O,$]=m.useState(0);return m.useEffect(()=>{const W=b.current;if(W)return W.addEventListener(cu,_),()=>W.removeEventListener(cu,_)},[_]),l.jsx(PC,{scope:s,orientation:i,dir:k,loop:u,currentTabStopId:S,onItemFocus:m.useCallback(W=>E(W),[E]),onItemShiftTab:m.useCallback(()=>A(!0),[]),onFocusableItemAdd:m.useCallback(()=>$(W=>W+1),[]),onFocusableItemRemove:m.useCallback(()=>$(W=>W-1),[]),children:l.jsx(je.div,{tabIndex:P||O===0?-1:0,"data-orientation":i,...w,ref:C,style:{outline:"none",...t.style},onMouseDown:he(t.onMouseDown,()=>{D.current=!0}),onFocus:he(t.onFocus,W=>{const Q=!D.current;if(W.target===W.currentTarget&&Q&&!P){const ee=new CustomEvent(cu,NC);if(W.currentTarget.dispatchEvent(ee),!ee.defaultPrevented){const ne=L().filter(se=>se.focusable),Z=ne.find(se=>se.active),de=ne.find(se=>se.id===S),ve=[Z,de,...ne].filter(Boolean).map(se=>se.ref.current);Bg(ve,y)}}D.current=!1}),onBlur:he(t.onBlur,()=>A(!1))})})}),Ug="RovingFocusGroupItem",Hg=m.forwardRef((t,r)=>{const{__scopeRovingFocusGroup:s,focusable:i=!0,active:u=!1,tabStopId:d,children:p,...h}=t,g=$o(),v=d||g,y=TC(Ug,s),w=y.currentTabStopId===v,b=Fg(s),{onFocusableItemAdd:C,onFocusableItemRemove:k,currentTabStopId:S}=y;return m.useEffect(()=>{if(i)return C(),()=>k()},[i,C,k]),l.jsx($u.ItemSlot,{scope:s,id:v,focusable:i,active:u,children:l.jsx(je.span,{tabIndex:w?0:-1,"data-orientation":y.orientation,...h,ref:r,onMouseDown:he(t.onMouseDown,E=>{i?y.onItemFocus(v):E.preventDefault()}),onFocus:he(t.onFocus,()=>y.onItemFocus(v)),onKeyDown:he(t.onKeyDown,E=>{if(E.key==="Tab"&&E.shiftKey){y.onItemShiftTab();return}if(E.target!==E.currentTarget)return;const P=MC(E,y.orientation,y.dir);if(P!==void 0){if(E.metaKey||E.ctrlKey||E.altKey||E.shiftKey)return;E.preventDefault();let _=b().filter(L=>L.focusable).map(L=>L.ref.current);if(P==="last")_.reverse();else if(P==="prev"||P==="next"){P==="prev"&&_.reverse();const L=_.indexOf(E.currentTarget);_=y.loop?IC(_,L+1):_.slice(L+1)}setTimeout(()=>Bg(_))}}),children:typeof p=="function"?p({isCurrentTabStop:w,hasTabStop:S!=null}):p})})});Hg.displayName=Ug;var OC={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function AC(t,r){return r!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function MC(t,r,s){const i=AC(t.key,s);if(!(r==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(r==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return OC[i]}function Bg(t,r=!1){const s=document.activeElement;for(const i of t)if(i===s||(i.focus({preventScroll:r}),document.activeElement!==s))return}function IC(t,r){return t.map((s,i)=>t[(r+i)%t.length])}var LC=zg,DC=Hg;function FC(t){const r=$C(t),s=m.forwardRef((i,u)=>{const{children:d,...p}=i,h=m.Children.toArray(d),g=h.find(UC);if(g){const v=g.props.children,y=h.map(w=>w===g?m.Children.count(v)>1?m.Children.only(null):m.isValidElement(v)?v.props.children:null:w);return l.jsx(r,{...p,ref:u,children:m.isValidElement(v)?m.cloneElement(v,void 0,y):null})}return l.jsx(r,{...p,ref:u,children:d})});return s.displayName=`${t}.Slot`,s}function $C(t){const r=m.forwardRef((s,i)=>{const{children:u,...d}=s;if(m.isValidElement(u)){const p=BC(u),h=HC(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 zC=Symbol("radix.slottable");function UC(t){return m.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===zC}function HC(t,r){const s={...r};for(const i in r){const u=t[i],d=r[i];/^on[A-Z]/.test(i)?u&&d?s[i]=(...h)=>{const g=d(...h);return u(...h),g}:u&&(s[i]=u):i==="style"?s[i]={...u,...d}:i==="className"&&(s[i]=[u,d].filter(Boolean).join(" "))}return{...t,...s}}function BC(t){let r=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning;return s?t.ref:(r=Object.getOwnPropertyDescriptor(t,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning,s?t.props.ref:t.props.ref||t.ref)}var KC=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={},du=0,Kg=function(t){return t&&(t.host||Kg(t.parentNode))},WC=function(t,r){return r.map(function(s){if(t.contains(s))return s;var i=Kg(s);return i&&t.contains(i)?i:(console.error("aria-hidden",s,"in not contained inside",t,". Doing nothing"),null)}).filter(function(s){return!!s})},VC=function(t,r,s,i){var u=WC(r,Array.isArray(t)?t:[t]);mi[s]||(mi[s]=new WeakMap);var d=mi[s],p=[],h=new Set,g=new Set(u),v=function(w){!w||h.has(w)||(h.add(w),v(w.parentNode))};u.forEach(v);var y=function(w){!w||g.has(w)||Array.prototype.forEach.call(w.children,function(b){if(h.has(b))y(b);else try{var C=b.getAttribute(i),k=C!==null&&C!=="false",S=(Or.get(b)||0)+1,E=(d.get(b)||0)+1;Or.set(b,S),d.set(b,E),p.push(b),S===1&&k&&hi.set(b,!0),E===1&&b.setAttribute(s,"true"),k||b.setAttribute(i,"true")}catch(P){console.error("aria-hidden: cannot operate on ",b,P)}})};return y(r),h.clear(),du++,function(){p.forEach(function(w){var b=Or.get(w)-1,C=d.get(w)-1;Or.set(w,b),d.set(w,C),b||(hi.has(w)||w.removeAttribute(i),hi.delete(w)),C||w.removeAttribute(s)}),du--,du||(Or=new WeakMap,Or=new WeakMap,hi=new WeakMap,mi={})}},QC=function(t,r,s){s===void 0&&(s="data-aria-hidden");var i=Array.from(Array.isArray(t)?t:[t]),u=KC(t);return u?(i.push.apply(i,Array.from(u.querySelectorAll("[aria-live], script"))),VC(i,u,s,"aria-hidden")):function(){return null}},Wt=function(){return Wt=Object.assign||function(r){for(var s,i=1,u=arguments.length;i<u;i++){s=arguments[i];for(var d in s)Object.prototype.hasOwnProperty.call(s,d)&&(r[d]=s[d])}return r},Wt.apply(this,arguments)};function Wg(t,r){var s={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&r.indexOf(i)<0&&(s[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])&&(s[i[u]]=t[i[u]]);return s}function GC(t,r,s){if(s||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",qC="with-scroll-bars-hidden",YC="--removed-body-scroll-bar-size";function fu(t,r){return typeof t=="function"?t(r):t&&(t.current=r),t}function XC(t,r){var s=m.useState(function(){return{value:t,callback:r,facade:{get current(){return s.value},set current(i){var u=s.value;u!==i&&(s.value=i,s.callback(i,u))}}}})[0];return s.callback=r,s.facade}var ZC=typeof window<"u"?m.useLayoutEffect:m.useEffect,jh=new WeakMap;function JC(t,r){var s=XC(null,function(i){return t.forEach(function(u){return fu(u,i)})});return ZC(function(){var i=jh.get(s);if(i){var u=new Set(i),d=new Set(t),p=s.current;u.forEach(function(h){d.has(h)||fu(h,null)}),d.forEach(function(h){u.has(h)||fu(h,p)})}jh.set(s,t)},[t]),s}function ek(t){return t}function tk(t,r){r===void 0&&(r=ek);var s=[],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 s.length?s[s.length-1]:t},useMedium:function(d){var p=r(d,i);return s.push(p),function(){s=s.filter(function(h){return h!==p})}},assignSyncMedium:function(d){for(i=!0;s.length;){var p=s;s=[],p.forEach(d)}s={push:function(h){return d(h)},filter:function(){return s}}},assignMedium:function(d){i=!0;var p=[];if(s.length){var h=s;s=[],h.forEach(d),p=s}var g=function(){var y=p;p=[],y.forEach(d)},v=function(){return Promise.resolve().then(g)};v(),s={push:function(y){p.push(y),v()},filter:function(y){return p=p.filter(y),s}}}};return u}function nk(t){t===void 0&&(t={});var r=tk(null);return r.options=Wt({async:!0,ssr:!1},t),r}var Vg=function(t){var r=t.sideCar,s=Wg(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,Wt({},s))};Vg.isSideCarExport=!0;function rk(t,r){return t.useMedium(r),Vg}var Qg=nk(),pu=function(){},Qi=m.forwardRef(function(t,r){var s=m.useRef(null),i=m.useState({onScrollCapture:pu,onWheelCapture:pu,onTouchMoveCapture:pu}),u=i[0],d=i[1],p=t.forwardProps,h=t.children,g=t.className,v=t.removeScrollBar,y=t.enabled,w=t.shards,b=t.sideCar,C=t.noRelative,k=t.noIsolation,S=t.inert,E=t.allowPinchZoom,P=t.as,A=P===void 0?"div":P,_=t.gapMode,L=Wg(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),D=b,O=JC([s,r]),$=Wt(Wt({},L),u);return m.createElement(m.Fragment,null,y&&m.createElement(D,{sideCar:Qg,removeScrollBar:v,shards:w,noRelative:C,noIsolation:k,inert:S,setCallbacks:d,allowPinchZoom:!!E,lockRef:s,gapMode:_}),p?m.cloneElement(m.Children.only(h),Wt(Wt({},$),{ref:O})):m.createElement(A,Wt({},$,{className:g,ref:O}),h))});Qi.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Qi.classNames={fullWidth:Ci,zeroRight:Si};var ok=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function sk(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var r=ok();return r&&t.setAttribute("nonce",r),t}function ik(t,r){t.styleSheet?t.styleSheet.cssText=r:t.appendChild(document.createTextNode(r))}function ak(t){var r=document.head||document.getElementsByTagName("head")[0];r.appendChild(t)}var lk=function(){var t=0,r=null;return{add:function(s){t==0&&(r=sk())&&(ik(r,s),ak(r)),t++},remove:function(){t--,!t&&r&&(r.parentNode&&r.parentNode.removeChild(r),r=null)}}},uk=function(){var t=lk();return function(r,s){m.useEffect(function(){return t.add(r),function(){t.remove()}},[r&&s])}},Gg=function(){var t=uk(),r=function(s){var i=s.styles,u=s.dynamic;return t(i,u),null};return r},ck={left:0,top:0,right:0,gap:0},hu=function(t){return parseInt(t||"",10)||0},dk=function(t){var r=window.getComputedStyle(document.body),s=r[t==="padding"?"paddingLeft":"marginLeft"],i=r[t==="padding"?"paddingTop":"marginTop"],u=r[t==="padding"?"paddingRight":"marginRight"];return[hu(s),hu(i),hu(u)]},fk=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return ck;var r=dk(t),s=document.documentElement.clientWidth,i=window.innerWidth;return{left:r[0],top:r[1],right:r[2],gap:Math.max(0,i-s+r[2]-r[0])}},pk=Gg(),Dr="data-scroll-locked",hk=function(t,r,s,i){var u=t.left,d=t.top,p=t.right,h=t.gap;return s===void 0&&(s="margin"),`
|
|
9
|
+
.`.concat(qC,` {
|
|
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,";"),s==="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
|
+
`),s==="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(YC,": ").concat(h,`px;
|
|
44
|
+
}
|
|
45
|
+
`)},Rh=function(){var t=parseInt(document.body.getAttribute(Dr)||"0",10);return isFinite(t)?t:0},mk=function(){m.useEffect(function(){return document.body.setAttribute(Dr,(Rh()+1).toString()),function(){var t=Rh()-1;t<=0?document.body.removeAttribute(Dr):document.body.setAttribute(Dr,t.toString())}},[])},gk=function(t){var r=t.noRelative,s=t.noImportant,i=t.gapMode,u=i===void 0?"margin":i;mk();var d=m.useMemo(function(){return fk(u)},[u]);return m.createElement(pk,{styles:hk(d,!r,u,s?"":"!important")})},zu=!1;if(typeof window<"u")try{var gi=Object.defineProperty({},"passive",{get:function(){return zu=!0,!0}});window.addEventListener("test",gi,gi),window.removeEventListener("test",gi,gi)}catch{zu=!1}var Ar=zu?{passive:!1}:!1,vk=function(t){return t.tagName==="TEXTAREA"},qg=function(t,r){if(!(t instanceof Element))return!1;var s=window.getComputedStyle(t);return s[r]!=="hidden"&&!(s.overflowY===s.overflowX&&!vk(t)&&s[r]==="visible")},xk=function(t){return qg(t,"overflowY")},yk=function(t){return qg(t,"overflowX")},Ph=function(t,r){var s=r.ownerDocument,i=r;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var u=Yg(t,i);if(u){var d=Xg(t,i),p=d[1],h=d[2];if(p>h)return!0}i=i.parentNode}while(i&&i!==s.body);return!1},wk=function(t){var r=t.scrollTop,s=t.scrollHeight,i=t.clientHeight;return[r,s,i]},bk=function(t){var r=t.scrollLeft,s=t.scrollWidth,i=t.clientWidth;return[r,s,i]},Yg=function(t,r){return t==="v"?xk(r):yk(r)},Xg=function(t,r){return t==="v"?wk(r):bk(r)},Sk=function(t,r){return t==="h"&&r==="rtl"?-1:1},Ck=function(t,r,s,i,u){var d=Sk(t,window.getComputedStyle(r).direction),p=d*i,h=s.target,g=r.contains(h),v=!1,y=p>0,w=0,b=0;do{if(!h)break;var C=Xg(t,h),k=C[0],S=C[1],E=C[2],P=S-E-d*k;(k||P)&&Yg(t,h)&&(w+=P,b+=k);var A=h.parentNode;h=A&&A.nodeType===Node.DOCUMENT_FRAGMENT_NODE?A.host:A}while(!g&&h!==document.body||g&&(r.contains(h)||r===h));return(y&&Math.abs(w)<1||!y&&Math.abs(b)<1)&&(v=!0),v},vi=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},Th=function(t){return[t.deltaX,t.deltaY]},_h=function(t){return t&&"current"in t?t.current:t},kk=function(t,r){return t[0]===r[0]&&t[1]===r[1]},Ek=function(t){return`
|
|
46
|
+
.block-interactivity-`.concat(t,` {pointer-events: none;}
|
|
47
|
+
.allow-interactivity-`).concat(t,` {pointer-events: all;}
|
|
48
|
+
`)},Nk=0,Mr=[];function jk(t){var r=m.useRef([]),s=m.useRef([0,0]),i=m.useRef(),u=m.useState(Nk++)[0],d=m.useState(Gg)[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 S=GC([t.lockRef.current],(t.shards||[]).map(_h),!0).filter(Boolean);return S.forEach(function(E){return E.classList.add("allow-interactivity-".concat(u))}),function(){document.body.classList.remove("block-interactivity-".concat(u)),S.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(u))})}}},[t.inert,t.lockRef.current,t.shards]);var h=m.useCallback(function(S,E){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!p.current.allowPinchZoom;var P=vi(S),A=s.current,_="deltaX"in S?S.deltaX:A[0]-P[0],L="deltaY"in S?S.deltaY:A[1]-P[1],D,O=S.target,$=Math.abs(_)>Math.abs(L)?"h":"v";if("touches"in S&&$==="h"&&O.type==="range")return!1;var W=window.getSelection(),Q=W&&W.anchorNode,ee=Q?Q===O||Q.contains(O):!1;if(ee)return!1;var ne=Ph($,O);if(!ne)return!0;if(ne?D=$:(D=$==="v"?"h":"v",ne=Ph($,O)),!ne)return!1;if(!i.current&&"changedTouches"in S&&(_||L)&&(i.current=D),!D)return!0;var Z=i.current||D;return Ck(Z,E,S,Z==="h"?_:L)},[]),g=m.useCallback(function(S){var E=S;if(!(!Mr.length||Mr[Mr.length-1]!==d)){var P="deltaY"in E?Th(E):vi(E),A=r.current.filter(function(D){return D.name===E.type&&(D.target===E.target||E.target===D.shadowParent)&&kk(D.delta,P)})[0];if(A&&A.should){E.cancelable&&E.preventDefault();return}if(!A){var _=(p.current.shards||[]).map(_h).filter(Boolean).filter(function(D){return D.contains(E.target)}),L=_.length>0?h(E,_[0]):!p.current.noIsolation;L&&E.cancelable&&E.preventDefault()}}},[]),v=m.useCallback(function(S,E,P,A){var _={name:S,delta:E,target:P,should:A,shadowParent:Rk(P)};r.current.push(_),setTimeout(function(){r.current=r.current.filter(function(L){return L!==_})},1)},[]),y=m.useCallback(function(S){s.current=vi(S),i.current=void 0},[]),w=m.useCallback(function(S){v(S.type,Th(S),S.target,h(S,t.lockRef.current))},[]),b=m.useCallback(function(S){v(S.type,vi(S),S.target,h(S,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",y,Ar),function(){Mr=Mr.filter(function(S){return S!==d}),document.removeEventListener("wheel",g,Ar),document.removeEventListener("touchmove",g,Ar),document.removeEventListener("touchstart",y,Ar)}},[]);var C=t.removeScrollBar,k=t.inert;return m.createElement(m.Fragment,null,k?m.createElement(d,{styles:Ek(u)}):null,C?m.createElement(gk,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function Rk(t){for(var r=null;t!==null;)t instanceof ShadowRoot&&(r=t.host,t=t.host),t=t.parentNode;return r}const Pk=rk(Qg,jk);var Zg=m.forwardRef(function(t,r){return m.createElement(Qi,Wt({},t,{ref:r,sideCar:Pk}))});Zg.classNames=Qi.classNames;var Uu=["Enter"," "],Tk=["ArrowDown","PageUp","Home"],Jg=["ArrowUp","PageDown","End"],_k=[...Tk,...Jg],Ok={ltr:[...Uu,"ArrowRight"],rtl:[...Uu,"ArrowLeft"]},Ak={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Zo="Menu",[Ho,Mk,Ik]=ec(Zo),[rr,ev]=Dn(Zo,[Ik,Hi,$g]),Gi=Hi(),tv=$g(),[Lk,or]=rr(Zo),[Dk,Jo]=rr(Zo),nv=t=>{const{__scopeMenu:r,open:s=!1,children:i,dir:u,onOpenChange:d,modal:p=!0}=t,h=Gi(r),[g,v]=m.useState(null),y=m.useRef(!1),w=yt(d),b=Ig(u);return m.useEffect(()=>{const C=()=>{y.current=!0,document.addEventListener("pointerdown",k,{capture:!0,once:!0}),document.addEventListener("pointermove",k,{capture:!0,once:!0})},k=()=>y.current=!1;return document.addEventListener("keydown",C,{capture:!0}),()=>{document.removeEventListener("keydown",C,{capture:!0}),document.removeEventListener("pointerdown",k,{capture:!0}),document.removeEventListener("pointermove",k,{capture:!0})}},[]),l.jsx(vg,{...h,children:l.jsx(Lk,{scope:r,open:s,onOpenChange:w,content:g,onContentChange:v,children:l.jsx(Dk,{scope:r,onClose:m.useCallback(()=>w(!1),[w]),isUsingKeyboardRef:y,dir:b,modal:p,children:i})})})};nv.displayName=Zo;var Fk="MenuAnchor",yc=m.forwardRef((t,r)=>{const{__scopeMenu:s,...i}=t,u=Gi(s);return l.jsx(xg,{...u,...i,ref:r})});yc.displayName=Fk;var wc="MenuPortal",[$k,rv]=rr(wc,{forceMount:void 0}),ov=t=>{const{__scopeMenu:r,forceMount:s,children:i,container:u}=t,d=or(wc,r);return l.jsx($k,{scope:r,forceMount:s,children:l.jsx(Fn,{present:s||d.open,children:l.jsx(nc,{asChild:!0,container:u,children:i})})})};ov.displayName=wc;var jt="MenuContent",[zk,bc]=rr(jt),sv=m.forwardRef((t,r)=>{const s=rv(jt,t.__scopeMenu),{forceMount:i=s.forceMount,...u}=t,d=or(jt,t.__scopeMenu),p=Jo(jt,t.__scopeMenu);return l.jsx(Ho.Provider,{scope:t.__scopeMenu,children:l.jsx(Fn,{present:i||d.open,children:l.jsx(Ho.Slot,{scope:t.__scopeMenu,children:p.modal?l.jsx(Uk,{...u,ref:r}):l.jsx(Hk,{...u,ref:r})})})})}),Uk=m.forwardRef((t,r)=>{const s=or(jt,t.__scopeMenu),i=m.useRef(null),u=He(r,i);return m.useEffect(()=>{const d=i.current;if(d)return QC(d)},[]),l.jsx(Sc,{...t,ref:u,trapFocus:s.open,disableOutsidePointerEvents:s.open,disableOutsideScroll:!0,onFocusOutside:he(t.onFocusOutside,d=>d.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>s.onOpenChange(!1)})}),Hk=m.forwardRef((t,r)=>{const s=or(jt,t.__scopeMenu);return l.jsx(Sc,{...t,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>s.onOpenChange(!1)})}),Bk=FC("MenuContent.ScrollLock"),Sc=m.forwardRef((t,r)=>{const{__scopeMenu:s,loop:i=!1,trapFocus:u,onOpenAutoFocus:d,onCloseAutoFocus:p,disableOutsidePointerEvents:h,onEntryFocus:g,onEscapeKeyDown:v,onPointerDownOutside:y,onFocusOutside:w,onInteractOutside:b,onDismiss:C,disableOutsideScroll:k,...S}=t,E=or(jt,s),P=Jo(jt,s),A=Gi(s),_=tv(s),L=Mk(s),[D,O]=m.useState(null),$=m.useRef(null),W=He(r,$,E.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=k?Zg:m.Fragment,se=k?{as:Bk,allowPinchZoom:!0}:void 0,le=H=>{const q=ee.current+H,R=L().filter(ce=>!ce.disabled),B=document.activeElement,ue=R.find(ce=>ce.ref.current===B)?.textValue,me=R.map(ce=>ce.textValue),z=tE(me,q,ue),ae=R.find(ce=>ce.textValue===z)?.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),[]),xC();const U=m.useCallback(H=>de.current===Z.current?.side&&rE(H,Z.current?.area),[]);return l.jsx(zk,{scope:s,searchRef:ee,onItemEnter:m.useCallback(H=>{U(H)&&H.preventDefault()},[U]),onItemLeave:m.useCallback(H=>{U(H)||($.current?.focus(),O(null))},[U]),onTriggerLeave:m.useCallback(H=>{U(H)&&H.preventDefault()},[U]),pointerGraceTimerRef:ne,onPointerGraceIntentChange:m.useCallback(H=>{Z.current=H},[]),children:l.jsx(ve,{...se,children:l.jsx(Lg,{asChild:!0,trapped:u,onMountAutoFocus:he(d,H=>{H.preventDefault(),$.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:p,children:l.jsx(Ii,{asChild:!0,disableOutsidePointerEvents:h,onEscapeKeyDown:v,onPointerDownOutside:y,onFocusOutside:w,onInteractOutside:b,onDismiss:C,children:l.jsx(LC,{asChild:!0,..._,dir:P.dir,orientation:"vertical",loop:i,currentTabStopId:D,onCurrentTabStopIdChange:O,onEntryFocus:he(g,H=>{P.isUsingKeyboardRef.current||H.preventDefault()}),preventScrollOnEntryFocus:!0,children:l.jsx(yg,{role:"menu","aria-orientation":"vertical","data-state":bv(E.open),"data-radix-menu-content":"",dir:P.dir,...A,...S,ref:W,style:{outline:"none",...S.style},onKeyDown:he(S.onKeyDown,H=>{const R=H.target.closest("[data-radix-menu-content]")===H.currentTarget,B=H.ctrlKey||H.altKey||H.metaKey,ue=H.key.length===1;R&&(H.key==="Tab"&&H.preventDefault(),!B&&ue&&le(H.key));const me=$.current;if(H.target!==me||!_k.includes(H.key))return;H.preventDefault();const ae=L().filter(ce=>!ce.disabled).map(ce=>ce.ref.current);Jg.includes(H.key)&&ae.reverse(),Jk(ae)}),onBlur:he(t.onBlur,H=>{H.currentTarget.contains(H.target)||(window.clearTimeout(Q.current),ee.current="")}),onPointerMove:he(t.onPointerMove,Bo(H=>{const q=H.target,R=X.current!==H.clientX;if(H.currentTarget.contains(q)&&R){const B=H.clientX>X.current?"right":"left";de.current=B,X.current=H.clientX}}))})})})})})})});sv.displayName=jt;var Kk="MenuGroup",Cc=m.forwardRef((t,r)=>{const{__scopeMenu:s,...i}=t;return l.jsx(je.div,{role:"group",...i,ref:r})});Cc.displayName=Kk;var Wk="MenuLabel",iv=m.forwardRef((t,r)=>{const{__scopeMenu:s,...i}=t;return l.jsx(je.div,{...i,ref:r})});iv.displayName=Wk;var Ti="MenuItem",Oh="menu.itemSelect",qi=m.forwardRef((t,r)=>{const{disabled:s=!1,onSelect:i,...u}=t,d=m.useRef(null),p=Jo(Ti,t.__scopeMenu),h=bc(Ti,t.__scopeMenu),g=He(r,d),v=m.useRef(!1),y=()=>{const w=d.current;if(!s&&w){const b=new CustomEvent(Oh,{bubbles:!0,cancelable:!0});w.addEventListener(Oh,C=>i?.(C),{once:!0}),tc(w,b),b.defaultPrevented?v.current=!1:p.onClose()}};return l.jsx(av,{...u,ref:g,disabled:s,onClick:he(t.onClick,y),onPointerDown:w=>{t.onPointerDown?.(w),v.current=!0},onPointerUp:he(t.onPointerUp,w=>{v.current||w.currentTarget?.click()}),onKeyDown:he(t.onKeyDown,w=>{const b=h.searchRef.current!=="";s||b&&w.key===" "||Uu.includes(w.key)&&(w.currentTarget.click(),w.preventDefault())})})});qi.displayName=Ti;var av=m.forwardRef((t,r)=>{const{__scopeMenu:s,disabled:i=!1,textValue:u,...d}=t,p=bc(Ti,s),h=tv(s),g=m.useRef(null),v=He(r,g),[y,w]=m.useState(!1),[b,C]=m.useState("");return m.useEffect(()=>{const k=g.current;k&&C((k.textContent??"").trim())},[d.children]),l.jsx(Ho.ItemSlot,{scope:s,disabled:i,textValue:u??b,children:l.jsx(DC,{asChild:!0,...h,focusable:!i,children:l.jsx(je.div,{role:"menuitem","data-highlighted":y?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...d,ref:v,onPointerMove:he(t.onPointerMove,Bo(k=>{i?p.onItemLeave(k):(p.onItemEnter(k),k.defaultPrevented||k.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:he(t.onPointerLeave,Bo(k=>p.onItemLeave(k))),onFocus:he(t.onFocus,()=>w(!0)),onBlur:he(t.onBlur,()=>w(!1))})})})}),Vk="MenuCheckboxItem",lv=m.forwardRef((t,r)=>{const{checked:s=!1,onCheckedChange:i,...u}=t;return l.jsx(pv,{scope:t.__scopeMenu,checked:s,children:l.jsx(qi,{role:"menuitemcheckbox","aria-checked":_i(s)?"mixed":s,...u,ref:r,"data-state":Ec(s),onSelect:he(u.onSelect,()=>i?.(_i(s)?!0:!s),{checkForDefaultPrevented:!1})})})});lv.displayName=Vk;var uv="MenuRadioGroup",[Qk,Gk]=rr(uv,{value:void 0,onValueChange:()=>{}}),cv=m.forwardRef((t,r)=>{const{value:s,onValueChange:i,...u}=t,d=yt(i);return l.jsx(Qk,{scope:t.__scopeMenu,value:s,onValueChange:d,children:l.jsx(Cc,{...u,ref:r})})});cv.displayName=uv;var dv="MenuRadioItem",fv=m.forwardRef((t,r)=>{const{value:s,...i}=t,u=Gk(dv,t.__scopeMenu),d=s===u.value;return l.jsx(pv,{scope:t.__scopeMenu,checked:d,children:l.jsx(qi,{role:"menuitemradio","aria-checked":d,...i,ref:r,"data-state":Ec(d),onSelect:he(i.onSelect,()=>u.onValueChange?.(s),{checkForDefaultPrevented:!1})})})});fv.displayName=dv;var kc="MenuItemIndicator",[pv,qk]=rr(kc,{checked:!1}),hv=m.forwardRef((t,r)=>{const{__scopeMenu:s,forceMount:i,...u}=t,d=qk(kc,s);return l.jsx(Fn,{present:i||_i(d.checked)||d.checked===!0,children:l.jsx(je.span,{...u,ref:r,"data-state":Ec(d.checked)})})});hv.displayName=kc;var Yk="MenuSeparator",mv=m.forwardRef((t,r)=>{const{__scopeMenu:s,...i}=t;return l.jsx(je.div,{role:"separator","aria-orientation":"horizontal",...i,ref:r})});mv.displayName=Yk;var Xk="MenuArrow",gv=m.forwardRef((t,r)=>{const{__scopeMenu:s,...i}=t,u=Gi(s);return l.jsx(wg,{...u,...i,ref:r})});gv.displayName=Xk;var Zk="MenuSub",[lj,vv]=rr(Zk),Lo="MenuSubTrigger",xv=m.forwardRef((t,r)=>{const s=or(Lo,t.__scopeMenu),i=Jo(Lo,t.__scopeMenu),u=vv(Lo,t.__scopeMenu),d=bc(Lo,t.__scopeMenu),p=m.useRef(null),{pointerGraceTimerRef:h,onPointerGraceIntentChange:g}=d,v={__scopeMenu:t.__scopeMenu},y=m.useCallback(()=>{p.current&&window.clearTimeout(p.current),p.current=null},[]);return m.useEffect(()=>y,[y]),m.useEffect(()=>{const w=h.current;return()=>{window.clearTimeout(w),g(null)}},[h,g]),l.jsx(yc,{asChild:!0,...v,children:l.jsx(av,{id:u.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":u.contentId,"data-state":bv(s.open),...t,ref:Ur(r,u.onTriggerChange),onClick:w=>{t.onClick?.(w),!(t.disabled||w.defaultPrevented)&&(w.currentTarget.focus(),s.open||s.onOpenChange(!0))},onPointerMove:he(t.onPointerMove,Bo(w=>{d.onItemEnter(w),!w.defaultPrevented&&!t.disabled&&!s.open&&!p.current&&(d.onPointerGraceIntentChange(null),p.current=window.setTimeout(()=>{s.onOpenChange(!0),y()},100))})),onPointerLeave:he(t.onPointerLeave,Bo(w=>{y();const b=s.content?.getBoundingClientRect();if(b){const C=s.content?.dataset.side,k=C==="right",S=k?-5:5,E=b[k?"left":"right"],P=b[k?"right":"left"];d.onPointerGraceIntentChange({area:[{x:w.clientX+S,y:w.clientY},{x:E,y:b.top},{x:P,y:b.top},{x:P,y:b.bottom},{x:E,y:b.bottom}],side:C}),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===" "||Ok[i.dir].includes(w.key)&&(s.onOpenChange(!0),s.content?.focus(),w.preventDefault())})})})});xv.displayName=Lo;var yv="MenuSubContent",wv=m.forwardRef((t,r)=>{const s=rv(jt,t.__scopeMenu),{forceMount:i=s.forceMount,...u}=t,d=or(jt,t.__scopeMenu),p=Jo(jt,t.__scopeMenu),h=vv(yv,t.__scopeMenu),g=m.useRef(null),v=He(r,g);return l.jsx(Ho.Provider,{scope:t.__scopeMenu,children:l.jsx(Fn,{present:i||d.open,children:l.jsx(Ho.Slot,{scope:t.__scopeMenu,children:l.jsx(Sc,{id:h.contentId,"aria-labelledby":h.triggerId,...u,ref:v,align:"start",side:p.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:y=>{p.isUsingKeyboardRef.current&&g.current?.focus(),y.preventDefault()},onCloseAutoFocus:y=>y.preventDefault(),onFocusOutside:he(t.onFocusOutside,y=>{y.target!==h.trigger&&d.onOpenChange(!1)}),onEscapeKeyDown:he(t.onEscapeKeyDown,y=>{p.onClose(),y.preventDefault()}),onKeyDown:he(t.onKeyDown,y=>{const w=y.currentTarget.contains(y.target),b=Ak[p.dir].includes(y.key);w&&b&&(d.onOpenChange(!1),h.trigger?.focus(),y.preventDefault())})})})})})});wv.displayName=yv;function bv(t){return t?"open":"closed"}function _i(t){return t==="indeterminate"}function Ec(t){return _i(t)?"indeterminate":t?"checked":"unchecked"}function Jk(t){const r=document.activeElement;for(const s of t)if(s===r||(s.focus(),document.activeElement!==r))return}function eE(t,r){return t.map((s,i)=>t[(r+i)%t.length])}function tE(t,r,s){const u=r.length>1&&Array.from(r).every(v=>v===r[0])?r[0]:r,d=s?t.indexOf(s):-1;let p=eE(t,Math.max(d,0));u.length===1&&(p=p.filter(v=>v!==s));const g=p.find(v=>v.toLowerCase().startsWith(u.toLowerCase()));return g!==s?g:void 0}function nE(t,r){const{x:s,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],v=h.x,y=h.y,w=g.x,b=g.y;y>i!=b>i&&s<(w-v)*(i-y)/(b-y)+v&&(u=!u)}return u}function rE(t,r){if(!r)return!1;const s={x:t.clientX,y:t.clientY};return nE(s,r)}function Bo(t){return r=>r.pointerType==="mouse"?t(r):void 0}var oE=nv,sE=yc,iE=ov,aE=sv,lE=Cc,uE=iv,cE=qi,dE=lv,fE=cv,pE=fv,hE=hv,mE=mv,gE=gv,vE=xv,xE=wv,Yi="DropdownMenu",[yE]=Dn(Yi,[ev]),st=ev(),[wE,Sv]=yE(Yi),Cv=t=>{const{__scopeDropdownMenu:r,children:s,dir:i,open:u,defaultOpen:d,onOpenChange:p,modal:h=!0}=t,g=st(r),v=m.useRef(null),[y,w]=Qo({prop:u,defaultProp:d??!1,onChange:p,caller:Yi});return l.jsx(wE,{scope:r,triggerId:$o(),triggerRef:v,contentId:$o(),open:y,onOpenChange:w,onOpenToggle:m.useCallback(()=>w(b=>!b),[w]),modal:h,children:l.jsx(oE,{...g,open:y,onOpenChange:w,dir:i,modal:h,children:s})})};Cv.displayName=Yi;var kv="DropdownMenuTrigger",Ev=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,disabled:i=!1,...u}=t,d=Sv(kv,s),p=st(s);return l.jsx(sE,{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())})})})});Ev.displayName=kv;var bE="DropdownMenuPortal",Nv=t=>{const{__scopeDropdownMenu:r,...s}=t,i=st(r);return l.jsx(iE,{...i,...s})};Nv.displayName=bE;var jv="DropdownMenuContent",Rv=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...i}=t,u=Sv(jv,s),d=st(s),p=m.useRef(!1);return l.jsx(aE,{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,v=g.button===0&&g.ctrlKey===!0,y=g.button===2||v;(!u.modal||y)&&(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)"}})});Rv.displayName=jv;var SE="DropdownMenuGroup",CE=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...i}=t,u=st(s);return l.jsx(lE,{...u,...i,ref:r})});CE.displayName=SE;var kE="DropdownMenuLabel",Pv=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...i}=t,u=st(s);return l.jsx(uE,{...u,...i,ref:r})});Pv.displayName=kE;var EE="DropdownMenuItem",Tv=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...i}=t,u=st(s);return l.jsx(cE,{...u,...i,ref:r})});Tv.displayName=EE;var NE="DropdownMenuCheckboxItem",_v=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...i}=t,u=st(s);return l.jsx(dE,{...u,...i,ref:r})});_v.displayName=NE;var jE="DropdownMenuRadioGroup",RE=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...i}=t,u=st(s);return l.jsx(fE,{...u,...i,ref:r})});RE.displayName=jE;var PE="DropdownMenuRadioItem",Ov=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...i}=t,u=st(s);return l.jsx(pE,{...u,...i,ref:r})});Ov.displayName=PE;var TE="DropdownMenuItemIndicator",Av=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...i}=t,u=st(s);return l.jsx(hE,{...u,...i,ref:r})});Av.displayName=TE;var _E="DropdownMenuSeparator",Mv=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...i}=t,u=st(s);return l.jsx(mE,{...u,...i,ref:r})});Mv.displayName=_E;var OE="DropdownMenuArrow",AE=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...i}=t,u=st(s);return l.jsx(gE,{...u,...i,ref:r})});AE.displayName=OE;var ME="DropdownMenuSubTrigger",Iv=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...i}=t,u=st(s);return l.jsx(vE,{...u,...i,ref:r})});Iv.displayName=ME;var IE="DropdownMenuSubContent",Lv=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...i}=t,u=st(s);return l.jsx(xE,{...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)"}})});Lv.displayName=IE;var LE=Cv,DE=Ev,FE=Nv,Dv=Rv,Fv=Pv,$v=Tv,zv=_v,Uv=Ov,Hv=Av,Bv=Mv,Kv=Iv,Wv=Lv;const $E=LE,zE=DE,UE=m.forwardRef(({className:t,inset:r,children:s,...i},u)=>l.jsxs(Kv,{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:[s,l.jsx(L0,{className:"ml-auto"})]}));UE.displayName=Kv.displayName;const HE=m.forwardRef(({className:t,...r},s)=>l.jsx(Wv,{ref:s,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}));HE.displayName=Wv.displayName;const Vv=m.forwardRef(({className:t,sideOffset:r=4,...s},i)=>l.jsx(FE,{children:l.jsx(Dv,{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),...s})}));Vv.displayName=Dv.displayName;const BE=m.forwardRef(({className:t,inset:r,...s},i)=>l.jsx($v,{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),...s}));BE.displayName=$v.displayName;const KE=m.forwardRef(({className:t,children:r,checked:s,...i},u)=>l.jsxs(zv,{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:s,...i,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(Hv,{children:l.jsx(I0,{className:"h-4 w-4"})})}),r]}));KE.displayName=zv.displayName;const WE=m.forwardRef(({className:t,children:r,...s},i)=>l.jsxs(Uv,{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),...s,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(Hv,{children:l.jsx(F0,{className:"h-2 w-2 fill-current"})})}),r]}));WE.displayName=Uv.displayName;const VE=m.forwardRef(({className:t,inset:r,...s},i)=>l.jsx(Fv,{ref:i,className:De("px-2 py-1.5 text-sm font-semibold",r&&"pl-8",t),...s}));VE.displayName=Fv.displayName;const QE=m.forwardRef(({className:t,...r},s)=>l.jsx(Bv,{ref:s,className:De("-mx-1 my-1 h-px bg-muted",t),...r}));QE.displayName=Bv.displayName;function GE(t){return t.replace("_"," ").toUpperCase()}function qE(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 Qv(t){return t==="resolved"||t==="rejected"}function YE(t){return Qv(t)||t==="warning"}function Gv(t){return t.length===0?!1:t.every(r=>Qv(r.status))}function Ko(t){return t.reduce((r,s)=>(s.status==="queued"?r.queued+=1:s.status==="in_progress"?r.inProgress+=1:s.status==="failed"?r.failed+=1:s.status==="warning"&&(r.warning+=1),r),{queued:0,inProgress:0,failed:0,warning:0})}const XE={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"},ZE={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:[]},JE={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"},eN={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 tN(t){return XE[t]}function nN(t){return ZE[t]}function Ah(t){return t==="pause"?"Pause":t==="resume"?"Resume":t==="retry"?"Retry":"Cancel"}function rN(t){return JE[t]}function oN(t){return eN[t]}function sN(t){const r=t.attemptCount,s=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${s}`:t.state==="blocked"?`${r} attempt${s} before blocking`:t.state==="escalated"?`${r} attempt${s} before escalation`:t.state==="cooldown"?`${r} attempt${s}, cooling down`:t.state==="superseded"?`${r} attempt${s}, superseded`:`${r} attempt${s} recorded`}function iN(t){return t?t.blockedReason??t.escalationReason??t.latestFingerprint??null:null}function aN(t,r){const s=t.filter(i=>i.prId===r);return s.length===0?null:s.reduce((i,u)=>u.updatedAt>i.updatedAt?u:i)}function lN(t,r){return aN(t,r)}function uN(t,r){return{stateLabel:tN(t.state),tone:rN(t.state),attemptSummary:sN(t),reasonSummary:iN(t),statusHint:oN(t.state),actions:nN(t.state).map(s=>({label:Ah(s),available:!0,hint:`${Ah(s)} 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 qv(t){return t.watchEnabled}function Yv(t){return t==="processing"?"autonomous run active":t==="done"?"completed":t==="error"?"attention needed":t==="archived"?"archived":"watching"}function cN(t){return`${Math.max(1,Math.round((t??12e4)/1e3))}s`}function Mh(t,r){return t.reduce((s,i)=>i.targetId!==r?s:!s||Date.parse(i.updatedAt)>Date.parse(s.updatedAt)?i:s,void 0)}function Ih(t){return t.feedbackItems.find(s=>(s.status==="failed"||s.status==="warning")&&!!s.statusReason)?.statusReason??null}const dN=[{value:"mine",label:"My PRs only"},{value:"team",label:"My PRs + teammates"}],fN={failed:[],inProgress:[],queued:[],warnings:[],generatedAt:""},mu=200,Lh="oh-my-pr:tracked-repos-open",Oi="Paused",Wo="Paused by drain mode",pN="Manual runs are blocked while global automation is paused.",hN="Background and manual runs are paused by drain mode.",mN="Ask Agent is paused by drain mode.",gN="Queued automation is paused until drain mode is disabled.";function vN(t){return t===!1?"team":"mine"}const Dh={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 Xv({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 xN({status:t}){const r=qE(t);return l.jsx("span",{className:`inline-block border px-1.5 py-0 text-[11px] uppercase tracking-wide ${r}`,children:GE(t)})}function Hu(){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 Fh({value:t,onChange:r,disabled:s,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:dN.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"} ${s?"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:s,className:"sr-only"}),p.label]},p.value)})})}function yN({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),s=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:s}):l.jsx("div",{children:s})}function gu({title:t,items:r,emptyLabel:s}){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(yN,{activity:i},i.id))}):l.jsx("div",{className:"px-2 pb-2 text-[11px] text-muted-foreground",children:s})]})}function wN({activities:t,onClearFailed:r,isClearingFailed:s,globalDrainMode:i}){const u=t.failed.length,d=t.inProgress.length,p=t.queued.length,h=u+d+p;return l.jsxs($E,{children:[l.jsxs(zE,{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(M0,{className:"h-3 w-3","aria-hidden":"true"}),l.jsx("span",{children:"activity"}),l.jsx("span",{className:"text-foreground",children:h})]}),l.jsxs(Vv,{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:s,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:s?"clearing":"clear failed"})]}),l.jsxs("div",{className:"text-[11px] text-muted-foreground",children:[u," failed / ",d," in progress / ",p," queued"]})]}),l.jsx(gu,{title:"Failed",items:t.failed,emptyLabel:"No failed activities."}),l.jsx("div",{className:"border-t border-border"}),l.jsx(gu,{title:"In progress",items:t.inProgress,emptyLabel:"No activities running right now."}),l.jsx("div",{className:"border-t border-border"}),l.jsx(gu,{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:gN})]})]})}function bN({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:Wo}),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:pN})]}),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 SN({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(s=>l.jsx("li",{children:s},s))})]},r.id))})})}function Zv({href:t,testId:r,label:s,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}`}),s,i&&l.jsx("span",{className:p,children:i})]})}function Jv({pr:t}){const r=Ko(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(sC,{children:[l.jsx(iC,{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(Pg,{side:"top",children:l.jsx("p",{className:"text-xs",children:i})})]})}const CN=m.memo(function({pr:r,isSelected:s,onSelect:i,failureMessage:u}){const d=Lt(r.lastChecked),p=qv(r),g=!(r.status==="processing"||Ko(r.feedbackItems).inProgress>0)&&Gv(r.feedbackItems);return l.jsx("div",{onClick:()=>i(r.id),onKeyDown:v=>{v.target===v.currentTarget&&(v.key==="Enter"||v.key===" ")&&(v.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 ${s?"bg-muted":""}`,children:l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx(Xv,{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(Jv,{pr:r})]}),g&&l.jsx(Zv,{href:r.url,testId:`ready-to-merge-${r.id}`,label:"Ready to merge",hint:"— click to open PR",onClick:v=>v.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:v=>v.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:Yv(r.status)}),!p&&l.jsx(Hu,{}),r.feedbackItems.length>0&&(()=>{const v=Ko(r.feedbackItems),y=[];return v.queued>0&&y.push(`${v.queued}q`),v.inProgress>0&&y.push(`${v.inProgress} active`),v.failed>0&&y.push(`${v.failed} failed`),v.warning>0&&y.push(`${v.warning} warn`),y.length===0?l.jsxs("span",{children:[r.feedbackItems.length," items"]}):l.jsx("span",{children:y.join(" · ")})})(),d&&l.jsxs("span",{children:["checked ",d]})]})]})]})})});function kN({item:t,prId:r,readOnly:s,globalDrainMode:i=!1}){const u=Je({mutationFn:async v=>(await Ge("PATCH",`/api/prs/${r}/feedback/${t.id}`,{decision:v})).json(),onSuccess:()=>{ye.invalidateQueries({queryKey:["/api/prs"]}),ye.invalidateQueries({queryKey:["/api/prs",r]})}}),d=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:v=>{It("Could not retry feedback item",v)}}),p=Lt(t.createdAt),h=YE(t.status),g=(t.status==="failed"||t.status==="warning")&&t.statusReason?t.statusReason:null;return l.jsxs(Lu,{defaultOpen:!h,className:"border-b border-border",children:[l.jsx("div",{className:"px-4 py-3",children:l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx("div",{className:"shrink-0 pt-0.5",children:l.jsx(xN,{status:t.status})}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsxs("div",{className:"mb-1 flex flex-wrap items-center gap-2",children:[l.jsx("span",{className:"font-medium",children:t.author}),t.file&&l.jsxs("span",{className:"text-[11px] text-muted-foreground",children:[t.file,t.line?`:${t.line}`:""]}),l.jsx("span",{className:"text-[11px] text-muted-foreground",children:t.type.replace("_"," ")}),p&&l.jsx("span",{className:"text-[11px] text-muted-foreground",children:p})]}),g&&l.jsxs("div",{className:"mt-1 whitespace-pre-wrap break-words border border-destructive/30 bg-destructive/10 px-2 py-1 text-[11px] leading-4 text-destructive",children:[l.jsx("span",{className:"font-medium uppercase tracking-wider",children:"Failure reason:"})," ",g]})]}),l.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[!s&&(t.status==="failed"||t.status==="warning")&&l.jsx("button",{type:"button",onClick:()=>d.mutate(),disabled:d.isPending||i,"data-testid":`retry-${t.id}`,"aria-label":`Retry feedback from ${t.author}`,title:i?Wo:"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?Oi:"Retry"}),l.jsx(Du,{asChild:!0,children:l.jsx("button",{type:"button","data-testid":`toggle-${t.id}`,"aria-label":`${h?"Show":"Hide"} 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:"Details"})}),!s&&["accept","reject","flag"].map(v=>l.jsx("button",{type:"button",onClick:()=>u.mutate(v),"data-testid":`override-${v}-${t.id}`,"aria-label":`${v} 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 ${t.decision===v?"bg-foreground text-background":"border border-border text-muted-foreground"}`,children:v},v))]})]})}),l.jsx(Fu,{children:l.jsxs("div",{className:"px-4 pb-3",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&&!g&&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]})]})})]})}function EN({prId:t}){const r=m.useRef(null),{data:s=[]}=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(()=>s.length>mu?s.slice(-mu):s,[s]),u=s.length-i.length;return m.useEffect(()=>{const d=r.current;d&&(d.scrollTop=d.scrollHeight)},[s.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:s.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 ",mu," of ",s.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 NN({pr:t,config:r,healingSessions:s}){const i=lN(s,t.id),u=i?uN(i):null,d=u?Dh[u.tone]:Dh.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 jN({prId:t,prStatus:r,globalDrainMode:s}){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(EN,{prId:t}):t?l.jsx(RN,{prId:t,globalDrainMode:s}):l.jsx("div",{className:"flex h-full items-center justify-center text-[12px] text-muted-foreground",children:"Select a PR to ask questions."})})]})}function RN({prId:t,globalDrainMode:r}){const[s,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(v=>v.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||!s.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?mN:"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(s.trim())},className:"border-t border-border p-3",children:[l.jsxs("div",{className:"flex gap-2",children:[l.jsx("input",{type:"text",value:s,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?Wo:"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?Oi:p.isPending?"...":"Ask"})]}),p.isError&&l.jsx("div",{className:"mt-1 text-[11px] text-destructive",children:ex(p.error)})]})]})}function ex(t){if(!(t instanceof Error))return String(t);const r=t.message.replace(/^\d+:\s*/,"").trim();if(!r)return"Request failed";try{const s=JSON.parse(r);if(typeof s.error=="string")return s.error;if(typeof s.message=="string")return s.message}catch{}return r}function It(t,r){vt({variant:"destructive",title:t,description:ex(r)})}function PN(){const[t,r]=m.useState(null),[s,i]=m.useState(""),[u,d]=m.useState(""),[p,h]=m.useState(null),[g,v]=m.useState(()=>{if(typeof window>"u")return!0;try{const z=window.localStorage.getItem(Lh);return z===null?!0:z==="true"}catch{return!0}}),[y,w]=m.useState("mine"),[b,C]=m.useState("active");m.useEffect(()=>{if(!(typeof window>"u"))try{window.localStorage.setItem(Lh,String(g))}catch{}},[g]);const{data:k=[],isLoading:S}=et({queryKey:["/api/prs"],refetchInterval:3e3}),{data:E=[],isLoading:P}=et({queryKey:["/api/prs/archived"],refetchInterval:1e4}),{data:A}=et({queryKey:["/api/config"],refetchInterval:5e3}),{data:_=[]}=et({queryKey:["/api/healing-sessions"],queryFn:async()=>fm("/api/healing-sessions"),refetchInterval:5e3}),{data:L=fN}=et({queryKey:["/api/activities"],refetchInterval:3e3}),{data:D}=et({queryKey:["/api/runtime"],refetchInterval:3e3}),{data:O=[]}=et({queryKey:["/api/repos/settings"],refetchInterval:5e3}),$=b==="active"?k:E,W=b==="archived";m.useEffect(()=>{if($.length===0){t!==null&&r(null);return}(!t||!$.some(z=>z.id===t))&&r($[0].id)},[$,t]);const Q=$.find(z=>z.id===t)??null,ee=Q?qv(Q):!0,ne=Q?Mh(L.failed,Q.id):void 0,Z=Q?.status==="error"?ne?.lastError??Ih(Q)??"Automation stopped on this PR. Check the activity log for the full failure context.":null,de=dC(p,O.length),X=D?.drainMode===!0,ve=Je({mutationFn:async z=>(await Ge("POST","/api/prs",{url:z})).json(),onSuccess:z=>{ye.invalidateQueries({queryKey:["/api/prs"]}),ye.invalidateQueries({queryKey:["/api/activities"]}),ye.invalidateQueries({queryKey:["/api/repos/settings"]}),ye.invalidateQueries({queryKey:["/api/onboarding/status"]}),i(""),r(z.id)},onError:z=>{It("Could not add PR",z)}}),se=Je({mutationFn:async z=>(await Ge("POST",`/api/prs/${z}/apply`)).json(),onSuccess:()=>{ye.invalidateQueries({queryKey:["/api/prs"]}),ye.invalidateQueries({queryKey:["/api/activities"]}),ye.invalidateQueries({queryKey:["/api/logs"]})},onError:z=>{It("Could not run babysitter",z)}}),le=Je({mutationFn:async({id:z,enabled:ae})=>(await Ge("PATCH",`/api/prs/${z}/watch`,{enabled:ae})).json(),onSuccess:()=>{ye.invalidateQueries({queryKey:["/api/prs"]}),ye.invalidateQueries({queryKey:["/api/prs/archived"]}),ye.invalidateQueries({queryKey:["/api/logs"]})},onError:z=>{It("Could not update PR watch state",z)}}),U=Je({mutationFn:async z=>(await Ge("PATCH","/api/config",z)).json(),onSuccess:()=>{ye.invalidateQueries({queryKey:["/api/config"]}),ye.invalidateQueries({queryKey:["/api/onboarding/status"]})},onError:z=>{It("Could not update settings",z)}}),H=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:z=>{It("Could not sync repositories",z)}}),q=Je({mutationFn:async()=>(await Ge("DELETE","/api/activities/failed")).json(),onSuccess:({cleared:z})=>{ye.invalidateQueries({queryKey:["/api/activities"]}),vt({description:z===1?"Cleared 1 failed activity.":`Cleared ${z} failed activities.`})},onError:z=>{It("Could not clear failed activities",z)}}),R=Je({mutationFn:async z=>(await Ge("POST","/api/repos/release",{repo:z})).json(),onSuccess:()=>{ye.invalidateQueries({queryKey:["/api/releases"]}),ye.invalidateQueries({queryKey:["/api/activities"]}),vt({description:"Release queued."})},onError:z=>{It("Could not create release",z)}}),B=async z=>(await Ge("PATCH","/api/repos/settings",z)).json(),ue=Je({mutationFn:B,onSuccess:()=>{ye.invalidateQueries({queryKey:["/api/repos/settings"]}),ye.invalidateQueries({queryKey:["/api/onboarding/status"]})},onError:z=>{It("Could not update repository settings",z)}}),me=Je({mutationFn:async({repo:z})=>(await Ge("POST","/api/repos",{repo:z})).json(),onSuccess:async(z,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:z.repo,ownPrsOnly:!1}),ye.invalidateQueries({queryKey:["/api/repos/settings"]})}catch(ce){It("Repository added, but could not update tracking scope",ce)}},onError:z=>{It("Could not watch repository",z)}});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 ",cN(A?.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:[k.length," PR",k.length!==1?"s":""," in ",O.length," repo",O.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:A?.codingAgent??"codex",onChange:z=>{const ae=z.target.value;U.mutate({codingAgent:ae})},disabled:U.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(wN,{activities:L,onClearFailed:()=>q.mutate(),isClearingFailed:q.isPending,globalDrainMode:X})]})]}),l.jsx(mC,{}),l.jsx(SN,{warnings:L.warnings}),l.jsx(bN,{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:()=>C("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 (",k.length,")"]}),l.jsxs("button",{type:"button",onClick:()=>C("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 (",E.length,")"]})]}),!W&&l.jsxs(l.Fragment,{children:[l.jsxs(Lu,{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:O.length>0?"Add a PR or watch another repo.":"Add a PR or watch a repo. Sync and babysit start automatically."}),l.jsx(Du,{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(Fu,{children:[l.jsx("form",{onSubmit:z=>{z.preventDefault(),s.trim()&&ve.mutate(s.trim())},className:"border-t border-border p-3",children:l.jsxs("div",{className:"flex gap-2",children:[l.jsx("input",{type:"text",value:s,onChange:z=>i(z.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||!s.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:z=>{z.preventDefault();const ae=u.trim();ae&&me.mutate({repo:ae,watchScope:y})},className:"border-t border-border p-3",children:[l.jsxs("div",{className:"flex gap-2",children:[l.jsx("input",{type:"text",value:u,onChange:z=>d(z.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(Fh,{value:y,onChange:w,disabled:me.isPending,name:"watch-scope",testIdPrefix:"watch-scope"})]})]})]})]}),l.jsxs(Lu,{open:g,onOpenChange:v,className:"border-b border-border",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2 p-3",children:[l.jsx(Du,{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&&O.length>0&&l.jsxs("span",{className:"text-muted-foreground/70",children:["(",O.length,")"]})]})}),l.jsx("button",{type:"button",onClick:()=>H.mutate(),disabled:H.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:H.isPending?"Fetching...":"Fetch"})]}),l.jsx(Fu,{className:"px-3 pb-3",children:O.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:O.map(z=>{const ae=R.isPending&&R.variables===z.repo;return l.jsxs("div",{className:"space-y-2 border border-border/60 px-2 py-2",children:[l.jsx("a",{href:cC(z.repo),target:"_blank",rel:"noopener noreferrer","data-testid":`tracked-repo-${z.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:z.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(Fh,{value:vN(z.ownPrsOnly),onChange:ce=>ue.mutate({repo:z.repo,ownPrsOnly:ce==="mine"}),disabled:ue.isPending,name:`tracked-repo-scope-${z.repo}`,testIdPrefix:`tracked-repo-scope-${z.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:z.autoCreateReleases,onChange:ce=>ue.mutate({repo:z.repo,autoCreateReleases:ce.target.checked}),disabled:ue.isPending,"data-testid":`tracked-repo-auto-release-${z.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:()=>R.mutate(z.repo),disabled:R.isPending||X,title:X?Wo:"Queue manual release","data-testid":`tracked-repo-manual-release-${z.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?Oi:ae?"Releasing...":"Release"})]})]})]},z.repo)})})})]})]}),l.jsx("div",{className:"flex-1",children:(W?P:S)?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:W?"No archived PRs. Closed PRs are archived automatically.":"No PRs tracked yet. Add a repository to watch or add a PR URL."}):$.map(z=>l.jsx(CN,{pr:z,isSelected:z.id===t,onSelect:r,failureMessage:z.status==="error"?Mh(L.failed,z.id)?.lastError??Ih(z):null},z.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(Xv,{status:Q.status}),l.jsx("span",{className:"truncate font-medium",children:Q.title}),l.jsx(Jv,{pr:Q}),!ee&&l.jsx(Hu,{}),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: ",Yv(Q.status)]}),!ee&&l.jsx(Hu,{}),l.jsxs("span",{children:[Q.feedbackItems.length," items"]}),Q.feedbackItems.length>0&&(()=>{const z=Ko(Q.feedbackItems);return l.jsxs(l.Fragment,{children:[z.queued>0&&l.jsxs("span",{children:[z.queued," queued"]}),z.inProgress>0&&l.jsxs("span",{children:[z.inProgress," in progress"]}),z.failed>0&&l.jsxs("span",{children:[z.failed," failed"]}),z.warning>0&&l.jsxs("span",{children:[z.warning," warnings"]})]})})(),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)]})]})]}),!W&&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?Wo:"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?Oi: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"})]})]}),Gv(Q.feedbackItems)&&Q.status!=="processing"&&Ko(Q.feedbackItems).inProgress===0&&l.jsx(Zv,{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?hN:ee?"Background watcher syncs GitHub feedback and pushes approved fixes automatically.":"Background watch is paused for this PR; manual runs still work."})]}),l.jsx(NN,{pr:Q,config:A,healingSessions:_}),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."}):Q.feedbackItems.map(z=>l.jsx(kN,{item:z,prId:Q.id,readOnly:W,globalDrainMode:X},z.id))})]}):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(jN,{prId:t,prStatus:Q?.status??null,globalDrainMode:X})]})]})}function TN(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 _N(t){return t?.drainMode?"Resume":"Pause"}function ON(){const{data:t}=et({queryKey:["/api/config"]}),[r,s]=m.useState(""),[i,u]=m.useState(!1),d=t?.githubTokens??(t?.githubToken?[t.githubToken]:[]),p=k=>{C.mutate({githubTokens:k})},h=(k,S)=>{const E=[...d],[P]=E.splice(k,1);P&&(E.splice(S,0,P),p(E))},g=k=>{p(d.filter((S,E)=>E!==k))},{data:v,isError:y}=et({queryKey:["/api/runtime"],refetchInterval:5e3}),w=TN(v,y),b=Je({mutationFn:async k=>(await Ge("POST","/api/runtime/drain",k)).json(),onSuccess:(k,S)=>{ye.invalidateQueries({queryKey:["/api/runtime"]}),vt({description:S.enabled?"Automation paused. New runs are blocked; in-flight runs will finish.":"Automation resumed."})},onError:k=>{vt({variant:"destructive",description:`Failed to update drain mode: ${k.message}`})}}),C=Je({mutationFn:async k=>(await Ge("PATCH","/api/config",k)).json(),onSuccess:()=>{ye.invalidateQueries({queryKey:["/api/config"]}),ye.invalidateQueries({queryKey:["/api/onboarding/status"]}),vt({description:"Settings saved."})},onError:k=>{vt({variant:"destructive",description:`Failed to save: ${k.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:k=>{const S=k.target.value;C.mutate({codingAgent:S})},disabled:C.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:k=>C.mutate({fallbackToNextCodingAgent:k.target.checked}),disabled:C.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:k=>C.mutate({autoResolveMergeConflicts:k.target.checked}),disabled:C.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:k=>C.mutate({autoUpdateDocs:k.target.checked}),disabled:C.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:k=>C.mutate({maxTurns:k}),disabled:C.isPending}),l.jsx(_n,{label:"Poll interval (ms)",description:"How often to check for new feedback",value:t?.pollIntervalMs??12e4,onChange:k=>C.mutate({pollIntervalMs:k}),disabled:C.isPending}),l.jsx(_n,{label:"Batch window (ms)",description:"Time to batch feedback before processing",value:t?.batchWindowMs??3e5,onChange:k=>C.mutate({batchWindowMs:k}),disabled:C.isPending}),l.jsx(_n,{label:"Max changes per run",description:"Limit on concurrent changes",value:t?.maxChangesPerRun??20,onChange:k=>C.mutate({maxChangesPerRun:k}),disabled:C.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:k=>C.mutate({autoHealCI:k.target.checked}),disabled:C.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:k=>C.mutate({maxHealingAttemptsPerSession:k}),disabled:C.isPending}),l.jsx(_n,{label:"Max healing attempts per fingerprint",description:"Cap retries for the same failure fingerprint",value:t?.maxHealingAttemptsPerFingerprint??2,onChange:k=>C.mutate({maxHealingAttemptsPerFingerprint:k}),disabled:C.isPending}),l.jsx(_n,{label:"Max concurrent healing runs",description:"How many healing runs can execute at once",value:t?.maxConcurrentHealingRuns??1,onChange:k=>C.mutate({maxConcurrentHealingRuns:k}),disabled:C.isPending}),l.jsx(_n,{label:"Healing cooldown (ms)",description:"Backoff before a cooldowned session can retry",value:t?.healingCooldownMs??3e5,onChange:k=>C.mutate({healingCooldownMs:k}),disabled:C.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:k=>C.mutate({autoCreateReleases:k.target.checked}),disabled:C.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:w.className,children:w.label})})]}),l.jsx("button",{type:"button",onClick:()=>b.mutate(v?.drainMode?{enabled:!1}:{enabled:!0,reason:"Manually paused via web settings"}),disabled:!v||b.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:_N(v)})]}),v?.drainMode&&(v.drainReason||v.drainRequestedAt)?l.jsxs("div",{className:"border-l-2 border-destructive bg-muted/30 px-3 py-2 text-[11px]",children:[v.drainReason?l.jsx("div",{className:"text-foreground",children:v.drainReason}):null,v.drainRequestedAt?l.jsxs("div",{className:"mt-1 text-muted-foreground",children:["since ",new Date(v.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"})]}),d.length?l.jsx("div",{className:"flex flex-col gap-2",children:d.map((k,S)=>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:k}),l.jsxs("div",{className:"text-[10px] text-muted-foreground",children:["priority ",S+1]})]}),l.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[l.jsx("button",{type:"button",onClick:()=>h(S,S-1),disabled:S===0||C.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:()=>h(S,S+1),disabled:S===d.length-1||C.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:()=>g(S),disabled:C.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"})]})]},S))}):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:k=>s(k.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 k=r.trim();k&&(p([...d,k]),s(""),u(!1))},disabled:!r.trim()||C.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),s("")},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 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 oh-my-pr back to its 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:k=>C.mutate({includeRepositoryLinksInGitHubComments:k.target.checked}),disabled:C.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:k=>C.mutate({postGitHubProgressReplies:k.target.checked}),disabled:C.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(AN,{label:"Ignored bots",description:"Bot logins whose comments and reviews are ignored.",placeholder:"dependabot[bot]",values:t?.ignoredBots??[],onChange:k=>C.mutate({ignoredBots:k}),disabled:!t||C.isPending})]})]})]})})]})}function AN({label:t,description:r,placeholder:s,values:i,onChange:u,disabled:d}){const[p,h]=m.useState(""),g=`setting-${t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")}`,v=`${g}-description`,y=()=>{const b=p.trim(),C=b.toLowerCase();if(!b||i.some(k=>k.toLowerCase()===C)){h("");return}u([...i,b]),h("")},w=b=>{u(i.filter((C,k)=>k!==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:v,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(),y())},placeholder:s,disabled:d,"aria-describedby":v,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:y,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,C)=>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(C),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:s,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:s,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 MN(t){return new Date(t).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}function IN(t){const r=t.match(/##\s*Twitter\/X\s*(?:Thread)?\n([\s\S]*?)(?=\n##\s|\s*$)/i),s=t.match(/##\s*LinkedIn\s*(?:\/\s*General)?\n([\s\S]*?)(?=\n##\s|\s*$)/i);return{twitter:r?r[1].trim():null,linkedin:s?s[1].trim():null}}function LN({text:t}){const[r,s]=m.useState(!1),i=async()=>{try{await navigator.clipboard.writeText(t),s(!0),setTimeout(()=>s(!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 vu({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(LN,{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 DN({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 FN({changelog:t}){const[r,s]=m.useState(!1),i=t.content?IN(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"&&s(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(DN,{status:t.status}),l.jsx("span",{className:"text-sm font-medium",children:MN(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(vu,{title:"Twitter / X Thread",content:i.twitter}),i?.linkedin&&l.jsx(vu,{title:"LinkedIn / General",content:i.linkedin}),!i?.twitter&&!i?.linkedin&&t.content&&l.jsx(vu,{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 $N(){const{data:t=[],isLoading:r}=et({queryKey:["/api/changelogs"],refetchInterval:s=>s.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(s=>l.jsx(FN,{changelog:s},s.id))})]})})]})}const zN=new Set(["detected","evaluating","proposed","publishing"]);function tx(t){return zN.has(t)}function UN(t){return t==="published"||t==="skipped"||t==="error"}function HN(t){return typeof t=="object"&&t!==null&&"status"in t&&typeof t.status=="string"}function xu(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 BN(t){return t?t.slice(0,7):"n/a"}function KN({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":tx(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 WN({text:t}){const[r,s]=m.useState(!1),i=async()=>{try{await navigator.clipboard.writeText(t),s(!0),setTimeout(()=>s(!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 VN({run:t,onRetry:r,retryPending:s}){const[i,u]=m.useState(!1),p=!(!!t.decisionReason||!!t.releaseTitle||!!t.releaseNotes||!!t.error||!!t.githubReleaseUrl||t.includedPrs.length>0)&&UN(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(KN,{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:xu(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: ",BN(t.triggerMergeSha)]}),l.jsxs("div",{children:["Merged at: ",xu(t.triggerMergedAt)]}),l.jsxs("div",{children:["Updated: ",xu(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(WN,{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:s,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 QN(){const{data:t=[],isLoading:r}=et({queryKey:["/api/releases"],refetchInterval:i=>{const u=i.state.data;return Array.isArray(u)&&u.some(d=>HN(d)&&tx(d.status))?5e3:!1}}),s=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(VN,{run:i,onRetry:u=>s.mutate(u),retryPending:s.isPending},i.id))})]})})]})}const nx=["trace","debug","info","warn","error","fatal"],$h={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},GN={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 qN(t){const r=new URLSearchParams(t),s=r.get("level")??"";return{level:nx.includes(s)?s:"",source:r.get("source")??"",search:r.get("q")??"",follow:r.get("follow")==="1"}}function rx(t){return new Date(t).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}function YN(t){const r=Object.keys(t.fields).length>0?" "+JSON.stringify(t.fields):"",s=t.source?` [${t.source}]`:"";return`${rx(t.time)} ${t.level.toUpperCase().padEnd(5)}${s} ${t.msg}${r}`}function zh(t){return t.map(YN).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 s=r.toString(),i=new URL(window.location.href);i.search=s?`?${s}`:"",history.replaceState(history.state,"",i.href)}function XN(){const t=_w(),r=m.useMemo(()=>qN(t),[t]),[s,i]=m.useState(r.level),[u,d]=m.useState(r.source),[p,h]=m.useState(r.search),[g,v]=m.useState(r.follow),[y,w]=m.useState([]),[b,C]=m.useState([]),[k,S]=m.useState(null),E=m.useRef([]);E.current=y;const P=m.useRef(null),A=m.useRef(g);A.current=g,m.useEffect(()=>{let O=!1;S(null);const $=new URLSearchParams;return s&&$.set("level",s),u&&$.set("source",u),p&&$.set("search",p),$.set("limit","1000"),fm(`/api/server-logs?${$.toString()}`).then(W=>{O||(w(W.records),C(W.sources))}).catch(W=>{O||S(W.message)}),()=>{O=!0}},[s,u,p]),m.useEffect(()=>{if(!g)return;const $=`/api/server-logs/stream?since=${E.current[E.current.length-1]?.seq??0}`,W=new EventSource($);return W.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{}},W.onerror=()=>{S("Lost log stream connection — disable Follow tail and re-enable to retry")},()=>{W.close()}},[g]),m.useEffect(()=>{if(!g)return;const O=P.current;O&&(O.scrollTop=O.scrollHeight)},[y,g]),m.useEffect(()=>{xi({level:s})},[s]),m.useEffect(()=>{xi({source:u})},[u]),m.useEffect(()=>{xi({q:p})},[p]),m.useEffect(()=>{xi({follow:g})},[g]);const _=m.useMemo(()=>{let O=y;if(s){const $=$h[s];O=O.filter(W=>$h[W.level]>=$)}if(u&&(O=O.filter($=>$.source===u)),p){const $=p.toLowerCase();O=O.filter(W=>W.msg.toLowerCase().includes($)||JSON.stringify(W.fields).toLowerCase().includes($))}return O},[y,s,u,p]),L=async()=>{try{await navigator.clipboard.writeText(zh(_))}catch{}},D=()=>{const O=new Blob([zh(_)],{type:"text/plain"}),$=URL.createObjectURL(O),W=document.createElement("a");W.href=$,W.download=`oh-my-pr-logs-${new Date().toISOString().replace(/[:.]/g,"-")}.txt`,W.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:s,onChange:O=>i(O.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"}),nx.map(O=>l.jsx("option",{value:O,children:O},O))]}),l.jsx("label",{htmlFor:"logs-source",className:"uppercase tracking-wider text-muted-foreground",children:"source"}),l.jsxs("select",{id:"logs-source",value:u,onChange:O=>d(O.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(O=>l.jsx("option",{value:O,children:O},O))]}),l.jsx("input",{type:"search",value:p,onChange:O=>h(O.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:O=>v(O.target.checked),className:"cursor-pointer"}),"follow tail"]}),l.jsxs("span",{className:"ml-auto text-muted-foreground",children:[_.length," of ",y.length]}),l.jsx("button",{type:"button",onClick:L,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"})]}),k&&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:k}),l.jsx("div",{ref:P,className:"flex-1 overflow-y-auto p-3 font-mono text-[11px] leading-relaxed",children:_.length===0?l.jsx("div",{className:"text-center text-muted-foreground",children:"No log records match the current filter."}):_.map(O=>l.jsxs("div",{className:"flex gap-2 whitespace-pre-wrap break-all",children:[l.jsx("span",{className:"shrink-0 text-muted-foreground",children:rx(O.time)}),l.jsx("span",{className:`shrink-0 w-12 ${GN[O.level]}`,children:O.level}),O.source&&l.jsxs("span",{className:"shrink-0 text-muted-foreground",children:["[",O.source,"]"]}),l.jsxs("span",{className:`grow ${O.level==="error"||O.level==="fatal"?"text-destructive":""}`,children:[O.msg,Object.keys(O.fields).length>0&&l.jsxs("span",{className:"text-muted-foreground",children:[" ",JSON.stringify(O.fields)]})]})]},O.seq))})]})}const ox=m.forwardRef(({className:t,...r},s)=>l.jsx("div",{ref:s,className:De("shadcn-card rounded-xl border bg-card border-card-border text-card-foreground shadow-sm",t),...r}));ox.displayName="Card";const ZN=m.forwardRef(({className:t,...r},s)=>l.jsx("div",{ref:s,className:De("flex flex-col space-y-1.5 p-6",t),...r}));ZN.displayName="CardHeader";const JN=m.forwardRef(({className:t,...r},s)=>l.jsx("div",{ref:s,className:De("text-2xl font-semibold leading-none tracking-tight",t),...r}));JN.displayName="CardTitle";const ej=m.forwardRef(({className:t,...r},s)=>l.jsx("div",{ref:s,className:De("text-sm text-muted-foreground",t),...r}));ej.displayName="CardDescription";const sx=m.forwardRef(({className:t,...r},s)=>l.jsx("div",{ref:s,className:De("p-6 pt-0",t),...r}));sx.displayName="CardContent";const tj=m.forwardRef(({className:t,...r},s)=>l.jsx("div",{ref:s,className:De("flex items-center p-6 pt-0",t),...r}));tj.displayName="CardFooter";function nj(){return l.jsx("div",{className:"min-h-screen w-full flex items-center justify-center bg-gray-50",children:l.jsx(ox,{className:"w-full max-w-md mx-4",children:l.jsxs(sx,{className:"pt-6",children:[l.jsxs("div",{className:"flex mb-4 gap-2",children:[l.jsx(D0,{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 rj(){return l.jsxs(Aw,{children:[l.jsx(_r,{path:"/",component:PN}),l.jsx(_r,{path:"/settings",component:ON}),l.jsx(_r,{path:"/changelogs",component:$N}),l.jsx(_r,{path:"/releases",component:QN}),l.jsx(_r,{path:"/logs",component:XN}),l.jsx(_r,{component:nj})]})}function oj(){return l.jsx(Sb,{attribute:"class",defaultTheme:"system",enableSystem:!0,children:l.jsx(ab,{client:ye,children:l.jsxs(oC,{children:[l.jsx(b1,{}),l.jsx(Zh,{hook:em,children:l.jsx(rj,{})})]})})})}function sj(t){const r=new URL(t),s=r.hash,i=s.indexOf("?");if(i===-1)return null;const u=new URLSearchParams(r.search);return new URLSearchParams(s.slice(i)).forEach((p,h)=>{u.set(h.toLowerCase(),p)}),r.hash=s.slice(0,i),r.search=u.toString(),r.href}{const t=sj(window.location.href);t&&history.replaceState(history.state,"",t)}window.location.hash||(window.location.hash="#/");cw.createRoot(document.getElementById("root")).render(l.jsx(oj,{}));
|