oh-my-pr 3.2.0 → 3.2.1

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.
@@ -1,11 +1,11 @@
1
- function Kx(t,r){for(var s=0;s<r.length;s++){const a=r[s];if(typeof a!="string"&&!Array.isArray(a)){for(const l in a)if(l!=="default"&&!(l in t)){const d=Object.getOwnPropertyDescriptor(a,l);d&&Object.defineProperty(t,l,d.get?d:{enumerable:!0,get:()=>a[l]})}}}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 l of document.querySelectorAll('link[rel="modulepreload"]'))a(l);new MutationObserver(l=>{for(const d of l)if(d.type==="childList")for(const p of d.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&a(p)}).observe(document,{childList:!0,subtree:!0});function s(l){const d={};return l.integrity&&(d.integrity=l.integrity),l.referrerPolicy&&(d.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?d.credentials="include":l.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function a(l){if(l.ep)return;l.ep=!0;const d=s(l);fetch(l.href,d)}})();function Th(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ul={exports:{}},_o={},Hl={exports:{}},ye={};var fp;function Vx(){if(fp)return ye;fp=1;var t=Symbol.for("react.element"),r=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),d=Symbol.for("react.provider"),p=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),w=Symbol.iterator;function b(T){return T===null||typeof T!="object"?null:(T=w&&T[w]||T["@@iterator"],typeof T=="function"?T:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,S={};function C(T,H,de){this.props=T,this.context=H,this.refs=S,this.updater=de||k}C.prototype.isReactComponent={},C.prototype.setState=function(T,H){if(typeof T!="object"&&typeof T!="function"&&T!=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,T,H,"setState")},C.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function _(){}_.prototype=C.prototype;function A(T,H,de){this.props=T,this.context=H,this.refs=S,this.updater=de||k}var O=A.prototype=new _;O.constructor=A,N(O,C.prototype),O.isPureReactComponent=!0;var I=Array.isArray,F=Object.prototype.hasOwnProperty,L={current:null},U={key:!0,ref:!0,__self:!0,__source:!0};function q(T,H,de){var pe,xe={},ve=null,he=null;if(H!=null)for(pe in H.ref!==void 0&&(he=H.ref),H.key!==void 0&&(ve=""+H.key),H)F.call(H,pe)&&!U.hasOwnProperty(pe)&&(xe[pe]=H[pe]);var be=arguments.length-2;if(be===1)xe.children=de;else if(1<be){for(var ke=Array(be),Ze=0;Ze<be;Ze++)ke[Ze]=arguments[Ze+2];xe.children=ke}if(T&&T.defaultProps)for(pe in be=T.defaultProps,be)xe[pe]===void 0&&(xe[pe]=be[pe]);return{$$typeof:t,type:T,key:ve,ref:he,props:xe,_owner:L.current}}function te(T,H){return{$$typeof:t,type:T.type,key:H,ref:T.ref,props:T.props,_owner:T._owner}}function ne(T){return typeof T=="object"&&T!==null&&T.$$typeof===t}function se(T){var H={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(de){return H[de]})}var Y=/\/+/g;function ae(T,H){return typeof T=="object"&&T!==null&&T.key!=null?se(""+T.key):H.toString(36)}function G(T,H,de,pe,xe){var ve=typeof T;(ve==="undefined"||ve==="boolean")&&(T=null);var he=!1;if(T===null)he=!0;else switch(ve){case"string":case"number":he=!0;break;case"object":switch(T.$$typeof){case t:case r:he=!0}}if(he)return he=T,xe=xe(he),T=pe===""?"."+ae(he,0):pe,I(xe)?(de="",T!=null&&(de=T.replace(Y,"$&/")+"/"),G(xe,H,de,"",function(Ze){return Ze})):xe!=null&&(ne(xe)&&(xe=te(xe,de+(!xe.key||he&&he.key===xe.key?"":(""+xe.key).replace(Y,"$&/")+"/")+T)),H.push(xe)),1;if(he=0,pe=pe===""?".":pe+":",I(T))for(var be=0;be<T.length;be++){ve=T[be];var ke=pe+ae(ve,be);he+=G(ve,H,de,ke,xe)}else if(ke=b(T),typeof ke=="function")for(T=ke.call(T),be=0;!(ve=T.next()).done;)ve=ve.value,ke=pe+ae(ve,be++),he+=G(ve,H,de,ke,xe);else if(ve==="object")throw H=String(T),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.");return he}function me(T,H,de){if(T==null)return T;var pe=[],xe=0;return G(T,pe,"","",function(ve){return H.call(de,ve,xe++)}),pe}function ee(T){if(T._status===-1){var H=T._result;H=H(),H.then(function(de){(T._status===0||T._status===-1)&&(T._status=1,T._result=de)},function(de){(T._status===0||T._status===-1)&&(T._status=2,T._result=de)}),T._status===-1&&(T._status=0,T._result=H)}if(T._status===1)return T._result.default;throw T._result}var ie={current:null},P={transition:null},z={ReactCurrentDispatcher:ie,ReactCurrentBatchConfig:P,ReactCurrentOwner:L};function V(){throw Error("act(...) is not supported in production builds of React.")}return ye.Children={map:me,forEach:function(T,H,de){me(T,function(){H.apply(this,arguments)},de)},count:function(T){var H=0;return me(T,function(){H++}),H},toArray:function(T){return me(T,function(H){return H})||[]},only:function(T){if(!ne(T))throw Error("React.Children.only expected to receive a single React element child.");return T}},ye.Component=C,ye.Fragment=s,ye.Profiler=l,ye.PureComponent=A,ye.StrictMode=a,ye.Suspense=y,ye.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=z,ye.act=V,ye.cloneElement=function(T,H,de){if(T==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+T+".");var pe=N({},T.props),xe=T.key,ve=T.ref,he=T._owner;if(H!=null){if(H.ref!==void 0&&(ve=H.ref,he=L.current),H.key!==void 0&&(xe=""+H.key),T.type&&T.type.defaultProps)var be=T.type.defaultProps;for(ke in H)F.call(H,ke)&&!U.hasOwnProperty(ke)&&(pe[ke]=H[ke]===void 0&&be!==void 0?be[ke]:H[ke])}var ke=arguments.length-2;if(ke===1)pe.children=de;else if(1<ke){be=Array(ke);for(var Ze=0;Ze<ke;Ze++)be[Ze]=arguments[Ze+2];pe.children=be}return{$$typeof:t,type:T.type,key:xe,ref:ve,props:pe,_owner:he}},ye.createContext=function(T){return T={$$typeof:p,_currentValue:T,_currentValue2:T,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},T.Provider={$$typeof:d,_context:T},T.Consumer=T},ye.createElement=q,ye.createFactory=function(T){var H=q.bind(null,T);return H.type=T,H},ye.createRef=function(){return{current:null}},ye.forwardRef=function(T){return{$$typeof:h,render:T}},ye.isValidElement=ne,ye.lazy=function(T){return{$$typeof:g,_payload:{_status:-1,_result:T},_init:ee}},ye.memo=function(T,H){return{$$typeof:v,type:T,compare:H===void 0?null:H}},ye.startTransition=function(T){var H=P.transition;P.transition={};try{T()}finally{P.transition=H}},ye.unstable_act=V,ye.useCallback=function(T,H){return ie.current.useCallback(T,H)},ye.useContext=function(T){return ie.current.useContext(T)},ye.useDebugValue=function(){},ye.useDeferredValue=function(T){return ie.current.useDeferredValue(T)},ye.useEffect=function(T,H){return ie.current.useEffect(T,H)},ye.useId=function(){return ie.current.useId()},ye.useImperativeHandle=function(T,H,de){return ie.current.useImperativeHandle(T,H,de)},ye.useInsertionEffect=function(T,H){return ie.current.useInsertionEffect(T,H)},ye.useLayoutEffect=function(T,H){return ie.current.useLayoutEffect(T,H)},ye.useMemo=function(T,H){return ie.current.useMemo(T,H)},ye.useReducer=function(T,H,de){return ie.current.useReducer(T,H,de)},ye.useRef=function(T){return ie.current.useRef(T)},ye.useState=function(T){return ie.current.useState(T)},ye.useSyncExternalStore=function(T,H,de){return ie.current.useSyncExternalStore(T,H,de)},ye.useTransition=function(){return ie.current.useTransition()},ye.version="18.3.1",ye}var pp;function Pi(){return pp||(pp=1,Hl.exports=Vx()),Hl.exports}var hp;function Qx(){if(hp)return _o;hp=1;var t=Pi(),r=Symbol.for("react.element"),s=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,l=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,d={key:!0,ref:!0,__self:!0,__source:!0};function p(h,y,v){var g,w={},b=null,k=null;v!==void 0&&(b=""+v),y.key!==void 0&&(b=""+y.key),y.ref!==void 0&&(k=y.ref);for(g in y)a.call(y,g)&&!d.hasOwnProperty(g)&&(w[g]=y[g]);if(h&&h.defaultProps)for(g in y=h.defaultProps,y)w[g]===void 0&&(w[g]=y[g]);return{$$typeof:r,type:h,key:b,ref:k,props:w,_owner:l.current}}return _o.Fragment=s,_o.jsx=p,_o.jsxs=p,_o}var mp;function Gx(){return mp||(mp=1,Ul.exports=Qx()),Ul.exports}var c=Gx(),ii={},Bl={exports:{}},ut={},Wl={exports:{}},Kl={};var gp;function qx(){return gp||(gp=1,(function(t){function r(P,z){var V=P.length;P.push(z);e:for(;0<V;){var T=V-1>>>1,H=P[T];if(0<l(H,z))P[T]=z,P[V]=H,V=T;else break e}}function s(P){return P.length===0?null:P[0]}function a(P){if(P.length===0)return null;var z=P[0],V=P.pop();if(V!==z){P[0]=V;e:for(var T=0,H=P.length,de=H>>>1;T<de;){var pe=2*(T+1)-1,xe=P[pe],ve=pe+1,he=P[ve];if(0>l(xe,V))ve<H&&0>l(he,xe)?(P[T]=he,P[ve]=V,T=ve):(P[T]=xe,P[pe]=V,T=pe);else if(ve<H&&0>l(he,V))P[T]=he,P[ve]=V,T=ve;else break e}}return z}function l(P,z){var V=P.sortIndex-z.sortIndex;return V!==0?V:P.id-z.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 y=[],v=[],g=1,w=null,b=3,k=!1,N=!1,S=!1,C=typeof setTimeout=="function"?setTimeout:null,_=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 O(P){for(var z=s(v);z!==null;){if(z.callback===null)a(v);else if(z.startTime<=P)a(v),z.sortIndex=z.expirationTime,r(y,z);else break;z=s(v)}}function I(P){if(S=!1,O(P),!N)if(s(y)!==null)N=!0,ee(F);else{var z=s(v);z!==null&&ie(I,z.startTime-P)}}function F(P,z){N=!1,S&&(S=!1,_(q),q=-1),k=!0;var V=b;try{for(O(z),w=s(y);w!==null&&(!(w.expirationTime>z)||P&&!se());){var T=w.callback;if(typeof T=="function"){w.callback=null,b=w.priorityLevel;var H=T(w.expirationTime<=z);z=t.unstable_now(),typeof H=="function"?w.callback=H:w===s(y)&&a(y),O(z)}else a(y);w=s(y)}if(w!==null)var de=!0;else{var pe=s(v);pe!==null&&ie(I,pe.startTime-z),de=!1}return de}finally{w=null,b=V,k=!1}}var L=!1,U=null,q=-1,te=5,ne=-1;function se(){return!(t.unstable_now()-ne<te)}function Y(){if(U!==null){var P=t.unstable_now();ne=P;var z=!0;try{z=U(!0,P)}finally{z?ae():(L=!1,U=null)}}else L=!1}var ae;if(typeof A=="function")ae=function(){A(Y)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,me=G.port2;G.port1.onmessage=Y,ae=function(){me.postMessage(null)}}else ae=function(){C(Y,0)};function ee(P){U=P,L||(L=!0,ae())}function ie(P,z){q=C(function(){P(t.unstable_now())},z)}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(P){P.callback=null},t.unstable_continueExecution=function(){N||k||(N=!0,ee(F))},t.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):te=0<P?Math.floor(1e3/P):5},t.unstable_getCurrentPriorityLevel=function(){return b},t.unstable_getFirstCallbackNode=function(){return s(y)},t.unstable_next=function(P){switch(b){case 1:case 2:case 3:var z=3;break;default:z=b}var V=b;b=z;try{return P()}finally{b=V}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(P,z){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var V=b;b=P;try{return z()}finally{b=V}},t.unstable_scheduleCallback=function(P,z,V){var T=t.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?T+V:T):V=T,P){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=V+H,P={id:g++,callback:z,priorityLevel:P,startTime:V,expirationTime:H,sortIndex:-1},V>T?(P.sortIndex=V,r(v,P),s(y)===null&&P===s(v)&&(S?(_(q),q=-1):S=!0,ie(I,V-T))):(P.sortIndex=H,r(y,P),N||k||(N=!0,ee(F))),P},t.unstable_shouldYield=se,t.unstable_wrapCallback=function(P){var z=b;return function(){var V=b;b=z;try{return P.apply(this,arguments)}finally{b=V}}}})(Kl)),Kl}var vp;function Yx(){return vp||(vp=1,Wl.exports=qx()),Wl.exports}var yp;function Xx(){if(yp)return ut;yp=1;var t=Pi(),r=Yx();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 a=new Set,l={};function d(e,n){p(e,n),p(e+"Capture",n)}function p(e,n){for(l[e]=n,e=0;e<n.length;e++)a.add(n[e])}var h=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),y=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]*$/,g={},w={};function b(e){return y.call(w,e)?!0:y.call(g,e)?!1:v.test(e)?w[e]=!0:(g[e]=!0,!1)}function k(e,n,o,i){if(o!==null&&o.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return i?!1:o!==null?!o.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function N(e,n,o,i){if(n===null||typeof n>"u"||k(e,n,o,i))return!0;if(i)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,i,u,f,x){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=i,this.attributeNamespace=u,this.mustUseProperty=o,this.propertyName=e,this.type=n,this.sanitizeURL=f,this.removeEmptyString=x}var C={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){C[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];C[n]=new S(n,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){C[e]=new S(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){C[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){C[e]=new S(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){C[e]=new S(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){C[e]=new S(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){C[e]=new S(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){C[e]=new S(e,5,!1,e.toLowerCase(),null,!1,!1)});var _=/[\-:]([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(_,A);C[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(_,A);C[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(_,A);C[n]=new S(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){C[e]=new S(e,1,!1,e.toLowerCase(),null,!1,!1)}),C.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){C[e]=new S(e,1,!1,e.toLowerCase(),null,!0,!0)});function O(e,n,o,i){var u=C.hasOwnProperty(n)?C[n]:null;(u!==null?u.type!==0:i||!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(N(n,o,u,i)&&(o=null),i||u===null?b(n)&&(o===null?e.removeAttribute(n):e.setAttribute(n,""+o)):u.mustUseProperty?e[u.propertyName]=o===null?u.type===3?!1:"":o:(n=u.attributeName,i=u.attributeNamespace,o===null?e.removeAttribute(n):(u=u.type,o=u===3||u===4&&o===!0?"":""+o,i?e.setAttributeNS(i,n,o):e.setAttribute(n,o))))}var I=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,F=Symbol.for("react.element"),L=Symbol.for("react.portal"),U=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),te=Symbol.for("react.profiler"),ne=Symbol.for("react.provider"),se=Symbol.for("react.context"),Y=Symbol.for("react.forward_ref"),ae=Symbol.for("react.suspense"),G=Symbol.for("react.suspense_list"),me=Symbol.for("react.memo"),ee=Symbol.for("react.lazy"),ie=Symbol.for("react.offscreen"),P=Symbol.iterator;function z(e){return e===null||typeof e!="object"?null:(e=P&&e[P]||e["@@iterator"],typeof e=="function"?e:null)}var V=Object.assign,T;function H(e){if(T===void 0)try{throw Error()}catch(o){var n=o.stack.trim().match(/\n( *(at )?)/);T=n&&n[1]||""}return`
1
+ function Kx(t,r){for(var s=0;s<r.length;s++){const a=r[s];if(typeof a!="string"&&!Array.isArray(a)){for(const l in a)if(l!=="default"&&!(l in t)){const d=Object.getOwnPropertyDescriptor(a,l);d&&Object.defineProperty(t,l,d.get?d:{enumerable:!0,get:()=>a[l]})}}}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 l of document.querySelectorAll('link[rel="modulepreload"]'))a(l);new MutationObserver(l=>{for(const d of l)if(d.type==="childList")for(const p of d.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&a(p)}).observe(document,{childList:!0,subtree:!0});function s(l){const d={};return l.integrity&&(d.integrity=l.integrity),l.referrerPolicy&&(d.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?d.credentials="include":l.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function a(l){if(l.ep)return;l.ep=!0;const d=s(l);fetch(l.href,d)}})();function Th(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ul={exports:{}},_o={},Hl={exports:{}},ye={};var pp;function Vx(){if(pp)return ye;pp=1;var t=Symbol.for("react.element"),r=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),d=Symbol.for("react.provider"),p=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),w=Symbol.iterator;function b(T){return T===null||typeof T!="object"?null:(T=w&&T[w]||T["@@iterator"],typeof T=="function"?T:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,S={};function C(T,H,de){this.props=T,this.context=H,this.refs=S,this.updater=de||k}C.prototype.isReactComponent={},C.prototype.setState=function(T,H){if(typeof T!="object"&&typeof T!="function"&&T!=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,T,H,"setState")},C.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function _(){}_.prototype=C.prototype;function A(T,H,de){this.props=T,this.context=H,this.refs=S,this.updater=de||k}var O=A.prototype=new _;O.constructor=A,N(O,C.prototype),O.isPureReactComponent=!0;var I=Array.isArray,F=Object.prototype.hasOwnProperty,L={current:null},U={key:!0,ref:!0,__self:!0,__source:!0};function q(T,H,de){var pe,xe={},ve=null,he=null;if(H!=null)for(pe in H.ref!==void 0&&(he=H.ref),H.key!==void 0&&(ve=""+H.key),H)F.call(H,pe)&&!U.hasOwnProperty(pe)&&(xe[pe]=H[pe]);var be=arguments.length-2;if(be===1)xe.children=de;else if(1<be){for(var ke=Array(be),Ze=0;Ze<be;Ze++)ke[Ze]=arguments[Ze+2];xe.children=ke}if(T&&T.defaultProps)for(pe in be=T.defaultProps,be)xe[pe]===void 0&&(xe[pe]=be[pe]);return{$$typeof:t,type:T,key:ve,ref:he,props:xe,_owner:L.current}}function te(T,H){return{$$typeof:t,type:T.type,key:H,ref:T.ref,props:T.props,_owner:T._owner}}function ne(T){return typeof T=="object"&&T!==null&&T.$$typeof===t}function se(T){var H={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(de){return H[de]})}var Y=/\/+/g;function ae(T,H){return typeof T=="object"&&T!==null&&T.key!=null?se(""+T.key):H.toString(36)}function G(T,H,de,pe,xe){var ve=typeof T;(ve==="undefined"||ve==="boolean")&&(T=null);var he=!1;if(T===null)he=!0;else switch(ve){case"string":case"number":he=!0;break;case"object":switch(T.$$typeof){case t:case r:he=!0}}if(he)return he=T,xe=xe(he),T=pe===""?"."+ae(he,0):pe,I(xe)?(de="",T!=null&&(de=T.replace(Y,"$&/")+"/"),G(xe,H,de,"",function(Ze){return Ze})):xe!=null&&(ne(xe)&&(xe=te(xe,de+(!xe.key||he&&he.key===xe.key?"":(""+xe.key).replace(Y,"$&/")+"/")+T)),H.push(xe)),1;if(he=0,pe=pe===""?".":pe+":",I(T))for(var be=0;be<T.length;be++){ve=T[be];var ke=pe+ae(ve,be);he+=G(ve,H,de,ke,xe)}else if(ke=b(T),typeof ke=="function")for(T=ke.call(T),be=0;!(ve=T.next()).done;)ve=ve.value,ke=pe+ae(ve,be++),he+=G(ve,H,de,ke,xe);else if(ve==="object")throw H=String(T),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.");return he}function me(T,H,de){if(T==null)return T;var pe=[],xe=0;return G(T,pe,"","",function(ve){return H.call(de,ve,xe++)}),pe}function ee(T){if(T._status===-1){var H=T._result;H=H(),H.then(function(de){(T._status===0||T._status===-1)&&(T._status=1,T._result=de)},function(de){(T._status===0||T._status===-1)&&(T._status=2,T._result=de)}),T._status===-1&&(T._status=0,T._result=H)}if(T._status===1)return T._result.default;throw T._result}var ie={current:null},P={transition:null},z={ReactCurrentDispatcher:ie,ReactCurrentBatchConfig:P,ReactCurrentOwner:L};function V(){throw Error("act(...) is not supported in production builds of React.")}return ye.Children={map:me,forEach:function(T,H,de){me(T,function(){H.apply(this,arguments)},de)},count:function(T){var H=0;return me(T,function(){H++}),H},toArray:function(T){return me(T,function(H){return H})||[]},only:function(T){if(!ne(T))throw Error("React.Children.only expected to receive a single React element child.");return T}},ye.Component=C,ye.Fragment=s,ye.Profiler=l,ye.PureComponent=A,ye.StrictMode=a,ye.Suspense=y,ye.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=z,ye.act=V,ye.cloneElement=function(T,H,de){if(T==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+T+".");var pe=N({},T.props),xe=T.key,ve=T.ref,he=T._owner;if(H!=null){if(H.ref!==void 0&&(ve=H.ref,he=L.current),H.key!==void 0&&(xe=""+H.key),T.type&&T.type.defaultProps)var be=T.type.defaultProps;for(ke in H)F.call(H,ke)&&!U.hasOwnProperty(ke)&&(pe[ke]=H[ke]===void 0&&be!==void 0?be[ke]:H[ke])}var ke=arguments.length-2;if(ke===1)pe.children=de;else if(1<ke){be=Array(ke);for(var Ze=0;Ze<ke;Ze++)be[Ze]=arguments[Ze+2];pe.children=be}return{$$typeof:t,type:T.type,key:xe,ref:ve,props:pe,_owner:he}},ye.createContext=function(T){return T={$$typeof:p,_currentValue:T,_currentValue2:T,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},T.Provider={$$typeof:d,_context:T},T.Consumer=T},ye.createElement=q,ye.createFactory=function(T){var H=q.bind(null,T);return H.type=T,H},ye.createRef=function(){return{current:null}},ye.forwardRef=function(T){return{$$typeof:h,render:T}},ye.isValidElement=ne,ye.lazy=function(T){return{$$typeof:g,_payload:{_status:-1,_result:T},_init:ee}},ye.memo=function(T,H){return{$$typeof:v,type:T,compare:H===void 0?null:H}},ye.startTransition=function(T){var H=P.transition;P.transition={};try{T()}finally{P.transition=H}},ye.unstable_act=V,ye.useCallback=function(T,H){return ie.current.useCallback(T,H)},ye.useContext=function(T){return ie.current.useContext(T)},ye.useDebugValue=function(){},ye.useDeferredValue=function(T){return ie.current.useDeferredValue(T)},ye.useEffect=function(T,H){return ie.current.useEffect(T,H)},ye.useId=function(){return ie.current.useId()},ye.useImperativeHandle=function(T,H,de){return ie.current.useImperativeHandle(T,H,de)},ye.useInsertionEffect=function(T,H){return ie.current.useInsertionEffect(T,H)},ye.useLayoutEffect=function(T,H){return ie.current.useLayoutEffect(T,H)},ye.useMemo=function(T,H){return ie.current.useMemo(T,H)},ye.useReducer=function(T,H,de){return ie.current.useReducer(T,H,de)},ye.useRef=function(T){return ie.current.useRef(T)},ye.useState=function(T){return ie.current.useState(T)},ye.useSyncExternalStore=function(T,H,de){return ie.current.useSyncExternalStore(T,H,de)},ye.useTransition=function(){return ie.current.useTransition()},ye.version="18.3.1",ye}var hp;function Pi(){return hp||(hp=1,Hl.exports=Vx()),Hl.exports}var mp;function Qx(){if(mp)return _o;mp=1;var t=Pi(),r=Symbol.for("react.element"),s=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,l=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,d={key:!0,ref:!0,__self:!0,__source:!0};function p(h,y,v){var g,w={},b=null,k=null;v!==void 0&&(b=""+v),y.key!==void 0&&(b=""+y.key),y.ref!==void 0&&(k=y.ref);for(g in y)a.call(y,g)&&!d.hasOwnProperty(g)&&(w[g]=y[g]);if(h&&h.defaultProps)for(g in y=h.defaultProps,y)w[g]===void 0&&(w[g]=y[g]);return{$$typeof:r,type:h,key:b,ref:k,props:w,_owner:l.current}}return _o.Fragment=s,_o.jsx=p,_o.jsxs=p,_o}var gp;function Gx(){return gp||(gp=1,Ul.exports=Qx()),Ul.exports}var c=Gx(),ii={},Bl={exports:{}},ut={},Wl={exports:{}},Kl={};var vp;function qx(){return vp||(vp=1,(function(t){function r(P,z){var V=P.length;P.push(z);e:for(;0<V;){var T=V-1>>>1,H=P[T];if(0<l(H,z))P[T]=z,P[V]=H,V=T;else break e}}function s(P){return P.length===0?null:P[0]}function a(P){if(P.length===0)return null;var z=P[0],V=P.pop();if(V!==z){P[0]=V;e:for(var T=0,H=P.length,de=H>>>1;T<de;){var pe=2*(T+1)-1,xe=P[pe],ve=pe+1,he=P[ve];if(0>l(xe,V))ve<H&&0>l(he,xe)?(P[T]=he,P[ve]=V,T=ve):(P[T]=xe,P[pe]=V,T=pe);else if(ve<H&&0>l(he,V))P[T]=he,P[ve]=V,T=ve;else break e}}return z}function l(P,z){var V=P.sortIndex-z.sortIndex;return V!==0?V:P.id-z.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 y=[],v=[],g=1,w=null,b=3,k=!1,N=!1,S=!1,C=typeof setTimeout=="function"?setTimeout:null,_=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 O(P){for(var z=s(v);z!==null;){if(z.callback===null)a(v);else if(z.startTime<=P)a(v),z.sortIndex=z.expirationTime,r(y,z);else break;z=s(v)}}function I(P){if(S=!1,O(P),!N)if(s(y)!==null)N=!0,ee(F);else{var z=s(v);z!==null&&ie(I,z.startTime-P)}}function F(P,z){N=!1,S&&(S=!1,_(q),q=-1),k=!0;var V=b;try{for(O(z),w=s(y);w!==null&&(!(w.expirationTime>z)||P&&!se());){var T=w.callback;if(typeof T=="function"){w.callback=null,b=w.priorityLevel;var H=T(w.expirationTime<=z);z=t.unstable_now(),typeof H=="function"?w.callback=H:w===s(y)&&a(y),O(z)}else a(y);w=s(y)}if(w!==null)var de=!0;else{var pe=s(v);pe!==null&&ie(I,pe.startTime-z),de=!1}return de}finally{w=null,b=V,k=!1}}var L=!1,U=null,q=-1,te=5,ne=-1;function se(){return!(t.unstable_now()-ne<te)}function Y(){if(U!==null){var P=t.unstable_now();ne=P;var z=!0;try{z=U(!0,P)}finally{z?ae():(L=!1,U=null)}}else L=!1}var ae;if(typeof A=="function")ae=function(){A(Y)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,me=G.port2;G.port1.onmessage=Y,ae=function(){me.postMessage(null)}}else ae=function(){C(Y,0)};function ee(P){U=P,L||(L=!0,ae())}function ie(P,z){q=C(function(){P(t.unstable_now())},z)}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(P){P.callback=null},t.unstable_continueExecution=function(){N||k||(N=!0,ee(F))},t.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):te=0<P?Math.floor(1e3/P):5},t.unstable_getCurrentPriorityLevel=function(){return b},t.unstable_getFirstCallbackNode=function(){return s(y)},t.unstable_next=function(P){switch(b){case 1:case 2:case 3:var z=3;break;default:z=b}var V=b;b=z;try{return P()}finally{b=V}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(P,z){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var V=b;b=P;try{return z()}finally{b=V}},t.unstable_scheduleCallback=function(P,z,V){var T=t.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?T+V:T):V=T,P){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=V+H,P={id:g++,callback:z,priorityLevel:P,startTime:V,expirationTime:H,sortIndex:-1},V>T?(P.sortIndex=V,r(v,P),s(y)===null&&P===s(v)&&(S?(_(q),q=-1):S=!0,ie(I,V-T))):(P.sortIndex=H,r(y,P),N||k||(N=!0,ee(F))),P},t.unstable_shouldYield=se,t.unstable_wrapCallback=function(P){var z=b;return function(){var V=b;b=z;try{return P.apply(this,arguments)}finally{b=V}}}})(Kl)),Kl}var yp;function Yx(){return yp||(yp=1,Wl.exports=qx()),Wl.exports}var xp;function Xx(){if(xp)return ut;xp=1;var t=Pi(),r=Yx();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 a=new Set,l={};function d(e,n){p(e,n),p(e+"Capture",n)}function p(e,n){for(l[e]=n,e=0;e<n.length;e++)a.add(n[e])}var h=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),y=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]*$/,g={},w={};function b(e){return y.call(w,e)?!0:y.call(g,e)?!1:v.test(e)?w[e]=!0:(g[e]=!0,!1)}function k(e,n,o,i){if(o!==null&&o.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return i?!1:o!==null?!o.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function N(e,n,o,i){if(n===null||typeof n>"u"||k(e,n,o,i))return!0;if(i)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,i,u,f,x){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=i,this.attributeNamespace=u,this.mustUseProperty=o,this.propertyName=e,this.type=n,this.sanitizeURL=f,this.removeEmptyString=x}var C={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){C[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];C[n]=new S(n,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){C[e]=new S(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){C[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){C[e]=new S(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){C[e]=new S(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){C[e]=new S(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){C[e]=new S(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){C[e]=new S(e,5,!1,e.toLowerCase(),null,!1,!1)});var _=/[\-:]([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(_,A);C[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(_,A);C[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(_,A);C[n]=new S(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){C[e]=new S(e,1,!1,e.toLowerCase(),null,!1,!1)}),C.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){C[e]=new S(e,1,!1,e.toLowerCase(),null,!0,!0)});function O(e,n,o,i){var u=C.hasOwnProperty(n)?C[n]:null;(u!==null?u.type!==0:i||!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(N(n,o,u,i)&&(o=null),i||u===null?b(n)&&(o===null?e.removeAttribute(n):e.setAttribute(n,""+o)):u.mustUseProperty?e[u.propertyName]=o===null?u.type===3?!1:"":o:(n=u.attributeName,i=u.attributeNamespace,o===null?e.removeAttribute(n):(u=u.type,o=u===3||u===4&&o===!0?"":""+o,i?e.setAttributeNS(i,n,o):e.setAttribute(n,o))))}var I=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,F=Symbol.for("react.element"),L=Symbol.for("react.portal"),U=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),te=Symbol.for("react.profiler"),ne=Symbol.for("react.provider"),se=Symbol.for("react.context"),Y=Symbol.for("react.forward_ref"),ae=Symbol.for("react.suspense"),G=Symbol.for("react.suspense_list"),me=Symbol.for("react.memo"),ee=Symbol.for("react.lazy"),ie=Symbol.for("react.offscreen"),P=Symbol.iterator;function z(e){return e===null||typeof e!="object"?null:(e=P&&e[P]||e["@@iterator"],typeof e=="function"?e:null)}var V=Object.assign,T;function H(e){if(T===void 0)try{throw Error()}catch(o){var n=o.stack.trim().match(/\n( *(at )?)/);T=n&&n[1]||""}return`
2
2
  `+T+e}var de=!1;function pe(e,n){if(!e||de)return"";de=!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($){var i=$}Reflect.construct(e,[],n)}else{try{n.call()}catch($){i=$}e.call(n.prototype)}else{try{throw Error()}catch($){i=$}e()}}catch($){if($&&i&&typeof $.stack=="string"){for(var u=$.stack.split(`
3
3
  `),f=i.stack.split(`
4
4
  `),x=u.length-1,E=f.length-1;1<=x&&0<=E&&u[x]!==f[E];)E--;for(;1<=x&&0<=E;x--,E--)if(u[x]!==f[E]){if(x!==1||E!==1)do if(x--,E--,0>E||u[x]!==f[E]){var R=`
5
- `+u[x].replace(" at new "," at ");return e.displayName&&R.includes("<anonymous>")&&(R=R.replace("<anonymous>",e.displayName)),R}while(1<=x&&0<=E);break}}}finally{de=!1,Error.prepareStackTrace=o}return(e=e?e.displayName||e.name:"")?H(e):""}function xe(e){switch(e.tag){case 5:return H(e.type);case 16:return H("Lazy");case 13:return H("Suspense");case 19:return H("SuspenseList");case 0:case 2:case 15:return e=pe(e.type,!1),e;case 11:return e=pe(e.type.render,!1),e;case 1:return e=pe(e.type,!0),e;default:return""}}function ve(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 U:return"Fragment";case L:return"Portal";case te:return"Profiler";case q:return"StrictMode";case ae:return"Suspense";case G:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case se:return(e.displayName||"Context")+".Consumer";case ne:return(e._context.displayName||"Context")+".Provider";case Y:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case me:return n=e.displayName||null,n!==null?n:ve(e.type)||"Memo";case ee:n=e._payload,e=e._init;try{return ve(e(n))}catch{}}return null}function he(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 ve(n);case 8:return n===q?"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 ke(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Ze(e){var n=ke(e)?"checked":"value",o=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),i=""+e[n];if(!e.hasOwnProperty(n)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var u=o.get,f=o.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return u.call(this)},set:function(x){i=""+x,f.call(this,x)}}),Object.defineProperty(e,n,{enumerable:o.enumerable}),{getValue:function(){return i},setValue:function(x){i=""+x},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function sr(e){e._valueTracker||(e._valueTracker=Ze(e))}function Xo(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var o=n.getValue(),i="";return e&&(i=ke(e)?e.checked?"true":"false":e.value),e=i,e!==o?(n.setValue(e),!0):!1}function qt(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 Gi(e,n){var o=n.checked;return V({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:o??e._wrapperState.initialChecked})}function yc(e,n){var o=n.defaultValue==null?"":n.defaultValue,i=n.checked!=null?n.checked:n.defaultChecked;o=be(n.value!=null?n.value:o),e._wrapperState={initialChecked:i,initialValue:o,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function xc(e,n){n=n.checked,n!=null&&O(e,"checked",n,!1)}function qi(e,n){xc(e,n);var o=be(n.value),i=n.type;if(o!=null)i==="number"?(o===0&&e.value===""||e.value!=o)&&(e.value=""+o):e.value!==""+o&&(e.value=""+o);else if(i==="submit"||i==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?Yi(e,n.type,o):n.hasOwnProperty("defaultValue")&&Yi(e,n.type,be(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function wc(e,n,o){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var i=n.type;if(!(i!=="submit"&&i!=="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 Yi(e,n,o){(n!=="number"||qt(e.ownerDocument)!==e)&&(o==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+o&&(e.defaultValue=""+o))}var Kr=Array.isArray;function ir(e,n,o,i){if(e=e.options,n){n={};for(var u=0;u<o.length;u++)n["$"+o[u]]=!0;for(o=0;o<e.length;o++)u=n.hasOwnProperty("$"+e[o].value),e[o].selected!==u&&(e[o].selected=u),u&&i&&(e[o].defaultSelected=!0)}else{for(o=""+be(o),n=null,u=0;u<e.length;u++){if(e[u].value===o){e[u].selected=!0,i&&(e[u].defaultSelected=!0);return}n!==null||e[u].disabled||(n=e[u])}n!==null&&(n.selected=!0)}}function Xi(e,n){if(n.dangerouslySetInnerHTML!=null)throw Error(s(91));return V({},n,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function bc(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(Kr(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 Sc(e,n){var o=be(n.value),i=be(n.defaultValue);o!=null&&(o=""+o,o!==e.value&&(e.value=o),n.defaultValue==null&&e.defaultValue!==o&&(e.defaultValue=o)),i!=null&&(e.defaultValue=""+i)}function Cc(e){var n=e.textContent;n===e._wrapperState.initialValue&&n!==""&&n!==null&&(e.value=n)}function Ec(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 Zi(e,n){return e==null||e==="http://www.w3.org/1999/xhtml"?Ec(n):e==="http://www.w3.org/2000/svg"&&n==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Zo,kc=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(n,o,i,u){MSApp.execUnsafeLocalFunction(function(){return e(n,o,i,u)})}:e})(function(e,n){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=n;else{for(Zo=Zo||document.createElement("div"),Zo.innerHTML="<svg>"+n.valueOf().toString()+"</svg>",n=Zo.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function Vr(e,n){if(n){var o=e.firstChild;if(o&&o===e.lastChild&&o.nodeType===3){o.nodeValue=n;return}}e.textContent=n}var Qr={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},qv=["Webkit","ms","Moz","O"];Object.keys(Qr).forEach(function(e){qv.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),Qr[n]=Qr[e]})});function Nc(e,n,o){return n==null||typeof n=="boolean"||n===""?"":o||typeof n!="number"||n===0||Qr.hasOwnProperty(e)&&Qr[e]?(""+n).trim():n+"px"}function Rc(e,n){e=e.style;for(var o in n)if(n.hasOwnProperty(o)){var i=o.indexOf("--")===0,u=Nc(o,n[o],i);o==="float"&&(o="cssFloat"),i?e.setProperty(o,u):e[o]=u}}var Yv=V({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 Ji(e,n){if(n){if(Yv[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 ea(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 ta=null;function na(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ra=null,ar=null,lr=null;function Pc(e){if(e=go(e)){if(typeof ra!="function")throw Error(s(280));var n=e.stateNode;n&&(n=bs(n),ra(e.stateNode,e.type,n))}}function jc(e){ar?lr?lr.push(e):lr=[e]:ar=e}function Tc(){if(ar){var e=ar,n=lr;if(lr=ar=null,Pc(e),n)for(e=0;e<n.length;e++)Pc(n[e])}}function _c(e,n){return e(n)}function Oc(){}var oa=!1;function Ac(e,n,o){if(oa)return e(n,o);oa=!0;try{return _c(e,n,o)}finally{oa=!1,(ar!==null||lr!==null)&&(Oc(),Tc())}}function Gr(e,n){var o=e.stateNode;if(o===null)return null;var i=bs(o);if(i===null)return null;o=i[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":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(o&&typeof o!="function")throw Error(s(231,n,typeof o));return o}var sa=!1;if(h)try{var qr={};Object.defineProperty(qr,"passive",{get:function(){sa=!0}}),window.addEventListener("test",qr,qr),window.removeEventListener("test",qr,qr)}catch{sa=!1}function Xv(e,n,o,i,u,f,x,E,R){var $=Array.prototype.slice.call(arguments,3);try{n.apply(o,$)}catch(W){this.onError(W)}}var Yr=!1,Jo=null,es=!1,ia=null,Zv={onError:function(e){Yr=!0,Jo=e}};function Jv(e,n,o,i,u,f,x,E,R){Yr=!1,Jo=null,Xv.apply(Zv,arguments)}function ey(e,n,o,i,u,f,x,E,R){if(Jv.apply(this,arguments),Yr){if(Yr){var $=Jo;Yr=!1,Jo=null}else throw Error(s(198));es||(es=!0,ia=$)}}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 Mc(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 Ic(e){if($n(e)!==e)throw Error(s(188))}function ty(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,i=n;;){var u=o.return;if(u===null)break;var f=u.alternate;if(f===null){if(i=u.return,i!==null){o=i;continue}break}if(u.child===f.child){for(f=u.child;f;){if(f===o)return Ic(u),e;if(f===i)return Ic(u),n;f=f.sibling}throw Error(s(188))}if(o.return!==i.return)o=u,i=f;else{for(var x=!1,E=u.child;E;){if(E===o){x=!0,o=u,i=f;break}if(E===i){x=!0,i=u,o=f;break}E=E.sibling}if(!x){for(E=f.child;E;){if(E===o){x=!0,o=f,i=u;break}if(E===i){x=!0,i=f,o=u;break}E=E.sibling}if(!x)throw Error(s(189))}}if(o.alternate!==i)throw Error(s(190))}if(o.tag!==3)throw Error(s(188));return o.stateNode.current===o?e:n}function Dc(e){return e=ty(e),e!==null?Lc(e):null}function Lc(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var n=Lc(e);if(n!==null)return n;e=e.sibling}return null}var Fc=r.unstable_scheduleCallback,$c=r.unstable_cancelCallback,ny=r.unstable_shouldYield,ry=r.unstable_requestPaint,Ie=r.unstable_now,oy=r.unstable_getCurrentPriorityLevel,aa=r.unstable_ImmediatePriority,zc=r.unstable_UserBlockingPriority,ts=r.unstable_NormalPriority,sy=r.unstable_LowPriority,Uc=r.unstable_IdlePriority,ns=null,Dt=null;function iy(e){if(Dt&&typeof Dt.onCommitFiberRoot=="function")try{Dt.onCommitFiberRoot(ns,e,void 0,(e.current.flags&128)===128)}catch{}}var Rt=Math.clz32?Math.clz32:uy,ay=Math.log,ly=Math.LN2;function uy(e){return e>>>=0,e===0?32:31-(ay(e)/ly|0)|0}var rs=64,os=4194304;function Xr(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 ss(e,n){var o=e.pendingLanes;if(o===0)return 0;var i=0,u=e.suspendedLanes,f=e.pingedLanes,x=o&268435455;if(x!==0){var E=x&~u;E!==0?i=Xr(E):(f&=x,f!==0&&(i=Xr(f)))}else x=o&~u,x!==0?i=Xr(x):f!==0&&(i=Xr(f));if(i===0)return 0;if(n!==0&&n!==i&&(n&u)===0&&(u=i&-i,f=n&-n,u>=f||u===16&&(f&4194240)!==0))return n;if((i&4)!==0&&(i|=o&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=i;0<n;)o=31-Rt(n),u=1<<o,i|=e[o],n&=~u;return i}function cy(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 dy(e,n){for(var o=e.suspendedLanes,i=e.pingedLanes,u=e.expirationTimes,f=e.pendingLanes;0<f;){var x=31-Rt(f),E=1<<x,R=u[x];R===-1?((E&o)===0||(E&i)!==0)&&(u[x]=cy(E,n)):R<=n&&(e.expiredLanes|=E),f&=~E}}function la(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Hc(){var e=rs;return rs<<=1,(rs&4194240)===0&&(rs=64),e}function ua(e){for(var n=[],o=0;31>o;o++)n.push(e);return n}function Zr(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 fy(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 i=e.eventTimes;for(e=e.expirationTimes;0<o;){var u=31-Rt(o),f=1<<u;n[u]=0,i[u]=-1,e[u]=-1,o&=~f}}function ca(e,n){var o=e.entangledLanes|=n;for(e=e.entanglements;o;){var i=31-Rt(o),u=1<<i;u&n|e[i]&n&&(e[i]|=n),o&=~u}}var Ee=0;function Bc(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var Wc,da,Kc,Vc,Qc,fa=!1,is=[],un=null,cn=null,dn=null,Jr=new Map,eo=new Map,fn=[],py="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 Gc(e,n){switch(e){case"focusin":case"focusout":un=null;break;case"dragenter":case"dragleave":cn=null;break;case"mouseover":case"mouseout":dn=null;break;case"pointerover":case"pointerout":Jr.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":eo.delete(n.pointerId)}}function to(e,n,o,i,u,f){return e===null||e.nativeEvent!==f?(e={blockedOn:n,domEventName:o,eventSystemFlags:i,nativeEvent:f,targetContainers:[u]},n!==null&&(n=go(n),n!==null&&da(n)),e):(e.eventSystemFlags|=i,n=e.targetContainers,u!==null&&n.indexOf(u)===-1&&n.push(u),e)}function hy(e,n,o,i,u){switch(n){case"focusin":return un=to(un,e,n,o,i,u),!0;case"dragenter":return cn=to(cn,e,n,o,i,u),!0;case"mouseover":return dn=to(dn,e,n,o,i,u),!0;case"pointerover":var f=u.pointerId;return Jr.set(f,to(Jr.get(f)||null,e,n,o,i,u)),!0;case"gotpointercapture":return f=u.pointerId,eo.set(f,to(eo.get(f)||null,e,n,o,i,u)),!0}return!1}function qc(e){var n=zn(e.target);if(n!==null){var o=$n(n);if(o!==null){if(n=o.tag,n===13){if(n=Mc(o),n!==null){e.blockedOn=n,Qc(e.priority,function(){Kc(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 as(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var o=ha(e.domEventName,e.eventSystemFlags,n[0],e.nativeEvent);if(o===null){o=e.nativeEvent;var i=new o.constructor(o.type,o);ta=i,o.target.dispatchEvent(i),ta=null}else return n=go(o),n!==null&&da(n),e.blockedOn=o,!1;n.shift()}return!0}function Yc(e,n,o){as(e)&&o.delete(n)}function my(){fa=!1,un!==null&&as(un)&&(un=null),cn!==null&&as(cn)&&(cn=null),dn!==null&&as(dn)&&(dn=null),Jr.forEach(Yc),eo.forEach(Yc)}function no(e,n){e.blockedOn===n&&(e.blockedOn=null,fa||(fa=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,my)))}function ro(e){function n(u){return no(u,e)}if(0<is.length){no(is[0],e);for(var o=1;o<is.length;o++){var i=is[o];i.blockedOn===e&&(i.blockedOn=null)}}for(un!==null&&no(un,e),cn!==null&&no(cn,e),dn!==null&&no(dn,e),Jr.forEach(n),eo.forEach(n),o=0;o<fn.length;o++)i=fn[o],i.blockedOn===e&&(i.blockedOn=null);for(;0<fn.length&&(o=fn[0],o.blockedOn===null);)qc(o),o.blockedOn===null&&fn.shift()}var ur=I.ReactCurrentBatchConfig,ls=!0;function gy(e,n,o,i){var u=Ee,f=ur.transition;ur.transition=null;try{Ee=1,pa(e,n,o,i)}finally{Ee=u,ur.transition=f}}function vy(e,n,o,i){var u=Ee,f=ur.transition;ur.transition=null;try{Ee=4,pa(e,n,o,i)}finally{Ee=u,ur.transition=f}}function pa(e,n,o,i){if(ls){var u=ha(e,n,o,i);if(u===null)_a(e,n,i,us,o),Gc(e,i);else if(hy(u,e,n,o,i))i.stopPropagation();else if(Gc(e,i),n&4&&-1<py.indexOf(e)){for(;u!==null;){var f=go(u);if(f!==null&&Wc(f),f=ha(e,n,o,i),f===null&&_a(e,n,i,us,o),f===u)break;u=f}u!==null&&i.stopPropagation()}else _a(e,n,i,null,o)}}var us=null;function ha(e,n,o,i){if(us=null,e=na(i),e=zn(e),e!==null)if(n=$n(e),n===null)e=null;else if(o=n.tag,o===13){if(e=Mc(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 us=e,null}function Xc(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(oy()){case aa:return 1;case zc:return 4;case ts:case sy:return 16;case Uc:return 536870912;default:return 16}default:return 16}}var pn=null,ma=null,cs=null;function Zc(){if(cs)return cs;var e,n=ma,o=n.length,i,u="value"in pn?pn.value:pn.textContent,f=u.length;for(e=0;e<o&&n[e]===u[e];e++);var x=o-e;for(i=1;i<=x&&n[o-i]===u[f-i];i++);return cs=u.slice(e,1<i?1-i:void 0)}function ds(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 fs(){return!0}function Jc(){return!1}function ft(e){function n(o,i,u,f,x){this._reactName=o,this._targetInst=u,this.type=i,this.nativeEvent=f,this.target=x,this.currentTarget=null;for(var E in e)e.hasOwnProperty(E)&&(o=e[E],this[E]=o?o(f):f[E]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?fs:Jc,this.isPropagationStopped=Jc,this}return V(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=fs)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=fs)},persist:function(){},isPersistent:fs}),n}var cr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ga=ft(cr),oo=V({},cr,{view:0,detail:0}),yy=ft(oo),va,ya,so,ps=V({},oo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:wa,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!==so&&(so&&e.type==="mousemove"?(va=e.screenX-so.screenX,ya=e.screenY-so.screenY):ya=va=0,so=e),va)},movementY:function(e){return"movementY"in e?e.movementY:ya}}),ed=ft(ps),xy=V({},ps,{dataTransfer:0}),wy=ft(xy),by=V({},oo,{relatedTarget:0}),xa=ft(by),Sy=V({},cr,{animationName:0,elapsedTime:0,pseudoElement:0}),Cy=ft(Sy),Ey=V({},cr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ky=ft(Ey),Ny=V({},cr,{data:0}),td=ft(Ny),Ry={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Py={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"},jy={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ty(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=jy[e])?!!n[e]:!1}function wa(){return Ty}var _y=V({},oo,{key:function(e){if(e.key){var n=Ry[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=ds(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Py[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:wa,charCode:function(e){return e.type==="keypress"?ds(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ds(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Oy=ft(_y),Ay=V({},ps,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),nd=ft(Ay),My=V({},oo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:wa}),Iy=ft(My),Dy=V({},cr,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ly=ft(Dy),Fy=V({},ps,{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}),$y=ft(Fy),zy=[9,13,27,32],ba=h&&"CompositionEvent"in window,io=null;h&&"documentMode"in document&&(io=document.documentMode);var Uy=h&&"TextEvent"in window&&!io,rd=h&&(!ba||io&&8<io&&11>=io),od=" ",sd=!1;function id(e,n){switch(e){case"keyup":return zy.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ad(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var dr=!1;function Hy(e,n){switch(e){case"compositionend":return ad(n);case"keypress":return n.which!==32?null:(sd=!0,od);case"textInput":return e=n.data,e===od&&sd?null:e;default:return null}}function By(e,n){if(dr)return e==="compositionend"||!ba&&id(e,n)?(e=Zc(),cs=ma=pn=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 rd&&n.locale!=="ko"?null:n.data;default:return null}}var Wy={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 ld(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!Wy[e.type]:n==="textarea"}function ud(e,n,o,i){jc(i),n=ys(n,"onChange"),0<n.length&&(o=new ga("onChange","change",null,o,i),e.push({event:o,listeners:n}))}var ao=null,lo=null;function Ky(e){Rd(e,0)}function hs(e){var n=gr(e);if(Xo(n))return e}function Vy(e,n){if(e==="change")return n}var cd=!1;if(h){var Sa;if(h){var Ca="oninput"in document;if(!Ca){var dd=document.createElement("div");dd.setAttribute("oninput","return;"),Ca=typeof dd.oninput=="function"}Sa=Ca}else Sa=!1;cd=Sa&&(!document.documentMode||9<document.documentMode)}function fd(){ao&&(ao.detachEvent("onpropertychange",pd),lo=ao=null)}function pd(e){if(e.propertyName==="value"&&hs(lo)){var n=[];ud(n,lo,e,na(e)),Ac(Ky,n)}}function Qy(e,n,o){e==="focusin"?(fd(),ao=n,lo=o,ao.attachEvent("onpropertychange",pd)):e==="focusout"&&fd()}function Gy(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return hs(lo)}function qy(e,n){if(e==="click")return hs(n)}function Yy(e,n){if(e==="input"||e==="change")return hs(n)}function Xy(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var Pt=typeof Object.is=="function"?Object.is:Xy;function uo(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),i=Object.keys(n);if(o.length!==i.length)return!1;for(i=0;i<o.length;i++){var u=o[i];if(!y.call(n,u)||!Pt(e[u],n[u]))return!1}return!0}function hd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function md(e,n){var o=hd(e);e=0;for(var i;o;){if(o.nodeType===3){if(i=e+o.textContent.length,e<=n&&i>=n)return{node:o,offset:n-e};e=i}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=hd(o)}}function gd(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?gd(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function vd(){for(var e=window,n=qt();n instanceof e.HTMLIFrameElement;){try{var o=typeof n.contentWindow.location.href=="string"}catch{o=!1}if(o)e=n.contentWindow;else break;n=qt(e.document)}return n}function Ea(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 Zy(e){var n=vd(),o=e.focusedElem,i=e.selectionRange;if(n!==o&&o&&o.ownerDocument&&gd(o.ownerDocument.documentElement,o)){if(i!==null&&Ea(o)){if(n=i.start,e=i.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 u=o.textContent.length,f=Math.min(i.start,u);i=i.end===void 0?f:Math.min(i.end,u),!e.extend&&f>i&&(u=i,i=f,f=u),u=md(o,f);var x=md(o,i);u&&x&&(e.rangeCount!==1||e.anchorNode!==u.node||e.anchorOffset!==u.offset||e.focusNode!==x.node||e.focusOffset!==x.offset)&&(n=n.createRange(),n.setStart(u.node,u.offset),e.removeAllRanges(),f>i?(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 Jy=h&&"documentMode"in document&&11>=document.documentMode,fr=null,ka=null,co=null,Na=!1;function yd(e,n,o){var i=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Na||fr==null||fr!==qt(i)||(i=fr,"selectionStart"in i&&Ea(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),co&&uo(co,i)||(co=i,i=ys(ka,"onSelect"),0<i.length&&(n=new ga("onSelect","select",null,n,o),e.push({event:n,listeners:i}),n.target=fr)))}function ms(e,n){var o={};return o[e.toLowerCase()]=n.toLowerCase(),o["Webkit"+e]="webkit"+n,o["Moz"+e]="moz"+n,o}var pr={animationend:ms("Animation","AnimationEnd"),animationiteration:ms("Animation","AnimationIteration"),animationstart:ms("Animation","AnimationStart"),transitionend:ms("Transition","TransitionEnd")},Ra={},xd={};h&&(xd=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 gs(e){if(Ra[e])return Ra[e];if(!pr[e])return e;var n=pr[e],o;for(o in n)if(n.hasOwnProperty(o)&&o in xd)return Ra[e]=n[o];return e}var wd=gs("animationend"),bd=gs("animationiteration"),Sd=gs("animationstart"),Cd=gs("transitionend"),Ed=new Map,kd="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function hn(e,n){Ed.set(e,n),d(n,[e])}for(var Pa=0;Pa<kd.length;Pa++){var ja=kd[Pa],ex=ja.toLowerCase(),tx=ja[0].toUpperCase()+ja.slice(1);hn(ex,"on"+tx)}hn(wd,"onAnimationEnd"),hn(bd,"onAnimationIteration"),hn(Sd,"onAnimationStart"),hn("dblclick","onDoubleClick"),hn("focusin","onFocus"),hn("focusout","onBlur"),hn(Cd,"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 fo="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(" "),nx=new Set("cancel close invalid load scroll toggle".split(" ").concat(fo));function Nd(e,n,o){var i=e.type||"unknown-event";e.currentTarget=o,ey(i,n,void 0,e),e.currentTarget=null}function Rd(e,n){n=(n&4)!==0;for(var o=0;o<e.length;o++){var i=e[o],u=i.event;i=i.listeners;e:{var f=void 0;if(n)for(var x=i.length-1;0<=x;x--){var E=i[x],R=E.instance,$=E.currentTarget;if(E=E.listener,R!==f&&u.isPropagationStopped())break e;Nd(u,E,$),f=R}else for(x=0;x<i.length;x++){if(E=i[x],R=E.instance,$=E.currentTarget,E=E.listener,R!==f&&u.isPropagationStopped())break e;Nd(u,E,$),f=R}}}if(es)throw e=ia,es=!1,ia=null,e}function Pe(e,n){var o=n[La];o===void 0&&(o=n[La]=new Set);var i=e+"__bubble";o.has(i)||(Pd(n,e,2,!1),o.add(i))}function Ta(e,n,o){var i=0;n&&(i|=4),Pd(o,e,i,n)}var vs="_reactListening"+Math.random().toString(36).slice(2);function po(e){if(!e[vs]){e[vs]=!0,a.forEach(function(o){o!=="selectionchange"&&(nx.has(o)||Ta(o,!1,e),Ta(o,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[vs]||(n[vs]=!0,Ta("selectionchange",!1,n))}}function Pd(e,n,o,i){switch(Xc(n)){case 1:var u=gy;break;case 4:u=vy;break;default:u=pa}o=u.bind(null,n,o,e),u=void 0,!sa||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(u=!0),i?u!==void 0?e.addEventListener(n,o,{capture:!0,passive:u}):e.addEventListener(n,o,!0):u!==void 0?e.addEventListener(n,o,{passive:u}):e.addEventListener(n,o,!1)}function _a(e,n,o,i,u){var f=i;if((n&1)===0&&(n&2)===0&&i!==null)e:for(;;){if(i===null)return;var x=i.tag;if(x===3||x===4){var E=i.stateNode.containerInfo;if(E===u||E.nodeType===8&&E.parentNode===u)break;if(x===4)for(x=i.return;x!==null;){var R=x.tag;if((R===3||R===4)&&(R=x.stateNode.containerInfo,R===u||R.nodeType===8&&R.parentNode===u))return;x=x.return}for(;E!==null;){if(x=zn(E),x===null)return;if(R=x.tag,R===5||R===6){i=f=x;continue e}E=E.parentNode}}i=i.return}Ac(function(){var $=f,W=na(o),K=[];e:{var B=Ed.get(e);if(B!==void 0){var X=ga,J=e;switch(e){case"keypress":if(ds(o)===0)break e;case"keydown":case"keyup":X=Oy;break;case"focusin":J="focus",X=xa;break;case"focusout":J="blur",X=xa;break;case"beforeblur":case"afterblur":X=xa;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":X=ed;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":X=wy;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":X=Iy;break;case wd:case bd:case Sd:X=Cy;break;case Cd:X=Ly;break;case"scroll":X=yy;break;case"wheel":X=$y;break;case"copy":case"cut":case"paste":X=ky;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":X=nd}var re=(n&4)!==0,De=!re&&e==="scroll",M=re?B!==null?B+"Capture":null:B;re=[];for(var j=$,D;j!==null;){D=j;var Q=D.stateNode;if(D.tag===5&&Q!==null&&(D=Q,M!==null&&(Q=Gr(j,M),Q!=null&&re.push(ho(j,Q,D)))),De)break;j=j.return}0<re.length&&(B=new X(B,J,null,o,W),K.push({event:B,listeners:re}))}}if((n&7)===0){e:{if(B=e==="mouseover"||e==="pointerover",X=e==="mouseout"||e==="pointerout",B&&o!==ta&&(J=o.relatedTarget||o.fromElement)&&(zn(J)||J[Yt]))break e;if((X||B)&&(B=W.window===W?W:(B=W.ownerDocument)?B.defaultView||B.parentWindow:window,X?(J=o.relatedTarget||o.toElement,X=$,J=J?zn(J):null,J!==null&&(De=$n(J),J!==De||J.tag!==5&&J.tag!==6)&&(J=null)):(X=null,J=$),X!==J)){if(re=ed,Q="onMouseLeave",M="onMouseEnter",j="mouse",(e==="pointerout"||e==="pointerover")&&(re=nd,Q="onPointerLeave",M="onPointerEnter",j="pointer"),De=X==null?B:gr(X),D=J==null?B:gr(J),B=new re(Q,j+"leave",X,o,W),B.target=De,B.relatedTarget=D,Q=null,zn(W)===$&&(re=new re(M,j+"enter",J,o,W),re.target=D,re.relatedTarget=De,Q=re),De=Q,X&&J)t:{for(re=X,M=J,j=0,D=re;D;D=hr(D))j++;for(D=0,Q=M;Q;Q=hr(Q))D++;for(;0<j-D;)re=hr(re),j--;for(;0<D-j;)M=hr(M),D--;for(;j--;){if(re===M||M!==null&&re===M.alternate)break t;re=hr(re),M=hr(M)}re=null}else re=null;X!==null&&jd(K,B,X,re,!1),J!==null&&De!==null&&jd(K,De,J,re,!0)}}e:{if(B=$?gr($):window,X=B.nodeName&&B.nodeName.toLowerCase(),X==="select"||X==="input"&&B.type==="file")var oe=Vy;else if(ld(B))if(cd)oe=Yy;else{oe=Gy;var le=Qy}else(X=B.nodeName)&&X.toLowerCase()==="input"&&(B.type==="checkbox"||B.type==="radio")&&(oe=qy);if(oe&&(oe=oe(e,$))){ud(K,oe,o,W);break e}le&&le(e,B,$),e==="focusout"&&(le=B._wrapperState)&&le.controlled&&B.type==="number"&&Yi(B,"number",B.value)}switch(le=$?gr($):window,e){case"focusin":(ld(le)||le.contentEditable==="true")&&(fr=le,ka=$,co=null);break;case"focusout":co=ka=fr=null;break;case"mousedown":Na=!0;break;case"contextmenu":case"mouseup":case"dragend":Na=!1,yd(K,o,W);break;case"selectionchange":if(Jy)break;case"keydown":case"keyup":yd(K,o,W)}var ue;if(ba)e:{switch(e){case"compositionstart":var fe="onCompositionStart";break e;case"compositionend":fe="onCompositionEnd";break e;case"compositionupdate":fe="onCompositionUpdate";break e}fe=void 0}else dr?id(e,o)&&(fe="onCompositionEnd"):e==="keydown"&&o.keyCode===229&&(fe="onCompositionStart");fe&&(rd&&o.locale!=="ko"&&(dr||fe!=="onCompositionStart"?fe==="onCompositionEnd"&&dr&&(ue=Zc()):(pn=W,ma="value"in pn?pn.value:pn.textContent,dr=!0)),le=ys($,fe),0<le.length&&(fe=new td(fe,e,null,o,W),K.push({event:fe,listeners:le}),ue?fe.data=ue:(ue=ad(o),ue!==null&&(fe.data=ue)))),(ue=Uy?Hy(e,o):By(e,o))&&($=ys($,"onBeforeInput"),0<$.length&&(W=new td("onBeforeInput","beforeinput",null,o,W),K.push({event:W,listeners:$}),W.data=ue))}Rd(K,n)})}function ho(e,n,o){return{instance:e,listener:n,currentTarget:o}}function ys(e,n){for(var o=n+"Capture",i=[];e!==null;){var u=e,f=u.stateNode;u.tag===5&&f!==null&&(u=f,f=Gr(e,o),f!=null&&i.unshift(ho(e,f,u)),f=Gr(e,n),f!=null&&i.push(ho(e,f,u))),e=e.return}return i}function hr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function jd(e,n,o,i,u){for(var f=n._reactName,x=[];o!==null&&o!==i;){var E=o,R=E.alternate,$=E.stateNode;if(R!==null&&R===i)break;E.tag===5&&$!==null&&(E=$,u?(R=Gr(o,f),R!=null&&x.unshift(ho(o,R,E))):u||(R=Gr(o,f),R!=null&&x.push(ho(o,R,E)))),o=o.return}x.length!==0&&e.push({event:n,listeners:x})}var rx=/\r\n?/g,ox=/\u0000|\uFFFD/g;function Td(e){return(typeof e=="string"?e:""+e).replace(rx,`
6
- `).replace(ox,"")}function xs(e,n,o){if(n=Td(n),Td(e)!==n&&o)throw Error(s(425))}function ws(){}var Oa=null,Aa=null;function Ma(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 Ia=typeof setTimeout=="function"?setTimeout:void 0,sx=typeof clearTimeout=="function"?clearTimeout:void 0,_d=typeof Promise=="function"?Promise:void 0,ix=typeof queueMicrotask=="function"?queueMicrotask:typeof _d<"u"?function(e){return _d.resolve(null).then(e).catch(ax)}:Ia;function ax(e){setTimeout(function(){throw e})}function Da(e,n){var o=n,i=0;do{var u=o.nextSibling;if(e.removeChild(o),u&&u.nodeType===8)if(o=u.data,o==="/$"){if(i===0){e.removeChild(u),ro(n);return}i--}else o!=="$"&&o!=="$?"&&o!=="$!"||i++;o=u}while(o);ro(n)}function mn(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 Od(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),Lt="__reactFiber$"+mr,mo="__reactProps$"+mr,Yt="__reactContainer$"+mr,La="__reactEvents$"+mr,lx="__reactListeners$"+mr,ux="__reactHandles$"+mr;function zn(e){var n=e[Lt];if(n)return n;for(var o=e.parentNode;o;){if(n=o[Yt]||o[Lt]){if(o=n.alternate,n.child!==null||o!==null&&o.child!==null)for(e=Od(e);e!==null;){if(o=e[Lt])return o;e=Od(e)}return n}e=o,o=e.parentNode}return null}function go(e){return e=e[Lt]||e[Yt],!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 bs(e){return e[mo]||null}var Fa=[],vr=-1;function gn(e){return{current:e}}function je(e){0>vr||(e.current=Fa[vr],Fa[vr]=null,vr--)}function Ne(e,n){vr++,Fa[vr]=e.current,e.current=n}var vn={},Ge=gn(vn),ot=gn(!1),Un=vn;function yr(e,n){var o=e.type.contextTypes;if(!o)return vn;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===n)return i.__reactInternalMemoizedMaskedChildContext;var u={},f;for(f in o)u[f]=n[f];return i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=u),u}function st(e){return e=e.childContextTypes,e!=null}function Ss(){je(ot),je(Ge)}function Ad(e,n,o){if(Ge.current!==vn)throw Error(s(168));Ne(Ge,n),Ne(ot,o)}function Md(e,n,o){var i=e.stateNode;if(n=n.childContextTypes,typeof i.getChildContext!="function")return o;i=i.getChildContext();for(var u in i)if(!(u in n))throw Error(s(108,he(e)||"Unknown",u));return V({},o,i)}function Cs(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||vn,Un=Ge.current,Ne(Ge,e),Ne(ot,ot.current),!0}function Id(e,n,o){var i=e.stateNode;if(!i)throw Error(s(169));o?(e=Md(e,n,Un),i.__reactInternalMemoizedMergedChildContext=e,je(ot),je(Ge),Ne(Ge,e)):je(ot),Ne(ot,o)}var Xt=null,Es=!1,$a=!1;function Dd(e){Xt===null?Xt=[e]:Xt.push(e)}function cx(e){Es=!0,Dd(e)}function yn(){if(!$a&&Xt!==null){$a=!0;var e=0,n=Ee;try{var o=Xt;for(Ee=1;e<o.length;e++){var i=o[e];do i=i(!0);while(i!==null)}Xt=null,Es=!1}catch(u){throw Xt!==null&&(Xt=Xt.slice(e+1)),Fc(aa,yn),u}finally{Ee=n,$a=!1}}return null}var xr=[],wr=0,ks=null,Ns=0,xt=[],wt=0,Hn=null,Zt=1,Jt="";function Bn(e,n){xr[wr++]=Ns,xr[wr++]=ks,ks=e,Ns=n}function Ld(e,n,o){xt[wt++]=Zt,xt[wt++]=Jt,xt[wt++]=Hn,Hn=e;var i=Zt;e=Jt;var u=32-Rt(i)-1;i&=~(1<<u),o+=1;var f=32-Rt(n)+u;if(30<f){var x=u-u%5;f=(i&(1<<x)-1).toString(32),i>>=x,u-=x,Zt=1<<32-Rt(n)+u|o<<u|i,Jt=f+e}else Zt=1<<f|o<<u|i,Jt=e}function za(e){e.return!==null&&(Bn(e,1),Ld(e,1,0))}function Ua(e){for(;e===ks;)ks=xr[--wr],xr[wr]=null,Ns=xr[--wr],xr[wr]=null;for(;e===Hn;)Hn=xt[--wt],xt[wt]=null,Jt=xt[--wt],xt[wt]=null,Zt=xt[--wt],xt[wt]=null}var pt=null,ht=null,_e=!1,jt=null;function Fd(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 $d(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=mn(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:Zt,overflow:Jt}: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 Ha(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Ba(e){if(_e){var n=ht;if(n){var o=n;if(!$d(e,n)){if(Ha(e))throw Error(s(418));n=mn(o.nextSibling);var i=pt;n&&$d(e,n)?Fd(i,o):(e.flags=e.flags&-4097|2,_e=!1,pt=e)}}else{if(Ha(e))throw Error(s(418));e.flags=e.flags&-4097|2,_e=!1,pt=e}}}function zd(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;pt=e}function Rs(e){if(e!==pt)return!1;if(!_e)return zd(e),_e=!0,!1;var n;if((n=e.tag!==3)&&!(n=e.tag!==5)&&(n=e.type,n=n!=="head"&&n!=="body"&&!Ma(e.type,e.memoizedProps)),n&&(n=ht)){if(Ha(e))throw Ud(),Error(s(418));for(;n;)Fd(e,n),n=mn(n.nextSibling)}if(zd(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=mn(e.nextSibling);break e}n--}else o!=="$"&&o!=="$!"&&o!=="$?"||n++}e=e.nextSibling}ht=null}}else ht=pt?mn(e.stateNode.nextSibling):null;return!0}function Ud(){for(var e=ht;e;)e=mn(e.nextSibling)}function br(){ht=pt=null,_e=!1}function Wa(e){jt===null?jt=[e]:jt.push(e)}var dx=I.ReactCurrentBatchConfig;function vo(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 i=o.stateNode}if(!i)throw Error(s(147,e));var u=i,f=""+e;return n!==null&&n.ref!==null&&typeof n.ref=="function"&&n.ref._stringRef===f?n.ref:(n=function(x){var E=u.refs;x===null?delete E[f]:E[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 Ps(e,n){throw e=Object.prototype.toString.call(n),Error(s(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e))}function Hd(e){var n=e._init;return n(e._payload)}function Bd(e){function n(M,j){if(e){var D=M.deletions;D===null?(M.deletions=[j],M.flags|=16):D.push(j)}}function o(M,j){if(!e)return null;for(;j!==null;)n(M,j),j=j.sibling;return null}function i(M,j){for(M=new Map;j!==null;)j.key!==null?M.set(j.key,j):M.set(j.index,j),j=j.sibling;return M}function u(M,j){return M=Nn(M,j),M.index=0,M.sibling=null,M}function f(M,j,D){return M.index=D,e?(D=M.alternate,D!==null?(D=D.index,D<j?(M.flags|=2,j):D):(M.flags|=2,j)):(M.flags|=1048576,j)}function x(M){return e&&M.alternate===null&&(M.flags|=2),M}function E(M,j,D,Q){return j===null||j.tag!==6?(j=Il(D,M.mode,Q),j.return=M,j):(j=u(j,D),j.return=M,j)}function R(M,j,D,Q){var oe=D.type;return oe===U?W(M,j,D.props.children,Q,D.key):j!==null&&(j.elementType===oe||typeof oe=="object"&&oe!==null&&oe.$$typeof===ee&&Hd(oe)===j.type)?(Q=u(j,D.props),Q.ref=vo(M,j,D),Q.return=M,Q):(Q=Zs(D.type,D.key,D.props,null,M.mode,Q),Q.ref=vo(M,j,D),Q.return=M,Q)}function $(M,j,D,Q){return j===null||j.tag!==4||j.stateNode.containerInfo!==D.containerInfo||j.stateNode.implementation!==D.implementation?(j=Dl(D,M.mode,Q),j.return=M,j):(j=u(j,D.children||[]),j.return=M,j)}function W(M,j,D,Q,oe){return j===null||j.tag!==7?(j=Xn(D,M.mode,Q,oe),j.return=M,j):(j=u(j,D),j.return=M,j)}function K(M,j,D){if(typeof j=="string"&&j!==""||typeof j=="number")return j=Il(""+j,M.mode,D),j.return=M,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case F:return D=Zs(j.type,j.key,j.props,null,M.mode,D),D.ref=vo(M,null,j),D.return=M,D;case L:return j=Dl(j,M.mode,D),j.return=M,j;case ee:var Q=j._init;return K(M,Q(j._payload),D)}if(Kr(j)||z(j))return j=Xn(j,M.mode,D,null),j.return=M,j;Ps(M,j)}return null}function B(M,j,D,Q){var oe=j!==null?j.key:null;if(typeof D=="string"&&D!==""||typeof D=="number")return oe!==null?null:E(M,j,""+D,Q);if(typeof D=="object"&&D!==null){switch(D.$$typeof){case F:return D.key===oe?R(M,j,D,Q):null;case L:return D.key===oe?$(M,j,D,Q):null;case ee:return oe=D._init,B(M,j,oe(D._payload),Q)}if(Kr(D)||z(D))return oe!==null?null:W(M,j,D,Q,null);Ps(M,D)}return null}function X(M,j,D,Q,oe){if(typeof Q=="string"&&Q!==""||typeof Q=="number")return M=M.get(D)||null,E(j,M,""+Q,oe);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case F:return M=M.get(Q.key===null?D:Q.key)||null,R(j,M,Q,oe);case L:return M=M.get(Q.key===null?D:Q.key)||null,$(j,M,Q,oe);case ee:var le=Q._init;return X(M,j,D,le(Q._payload),oe)}if(Kr(Q)||z(Q))return M=M.get(D)||null,W(j,M,Q,oe,null);Ps(j,Q)}return null}function J(M,j,D,Q){for(var oe=null,le=null,ue=j,fe=j=0,Ke=null;ue!==null&&fe<D.length;fe++){ue.index>fe?(Ke=ue,ue=null):Ke=ue.sibling;var Ce=B(M,ue,D[fe],Q);if(Ce===null){ue===null&&(ue=Ke);break}e&&ue&&Ce.alternate===null&&n(M,ue),j=f(Ce,j,fe),le===null?oe=Ce:le.sibling=Ce,le=Ce,ue=Ke}if(fe===D.length)return o(M,ue),_e&&Bn(M,fe),oe;if(ue===null){for(;fe<D.length;fe++)ue=K(M,D[fe],Q),ue!==null&&(j=f(ue,j,fe),le===null?oe=ue:le.sibling=ue,le=ue);return _e&&Bn(M,fe),oe}for(ue=i(M,ue);fe<D.length;fe++)Ke=X(ue,M,fe,D[fe],Q),Ke!==null&&(e&&Ke.alternate!==null&&ue.delete(Ke.key===null?fe:Ke.key),j=f(Ke,j,fe),le===null?oe=Ke:le.sibling=Ke,le=Ke);return e&&ue.forEach(function(Rn){return n(M,Rn)}),_e&&Bn(M,fe),oe}function re(M,j,D,Q){var oe=z(D);if(typeof oe!="function")throw Error(s(150));if(D=oe.call(D),D==null)throw Error(s(151));for(var le=oe=null,ue=j,fe=j=0,Ke=null,Ce=D.next();ue!==null&&!Ce.done;fe++,Ce=D.next()){ue.index>fe?(Ke=ue,ue=null):Ke=ue.sibling;var Rn=B(M,ue,Ce.value,Q);if(Rn===null){ue===null&&(ue=Ke);break}e&&ue&&Rn.alternate===null&&n(M,ue),j=f(Rn,j,fe),le===null?oe=Rn:le.sibling=Rn,le=Rn,ue=Ke}if(Ce.done)return o(M,ue),_e&&Bn(M,fe),oe;if(ue===null){for(;!Ce.done;fe++,Ce=D.next())Ce=K(M,Ce.value,Q),Ce!==null&&(j=f(Ce,j,fe),le===null?oe=Ce:le.sibling=Ce,le=Ce);return _e&&Bn(M,fe),oe}for(ue=i(M,ue);!Ce.done;fe++,Ce=D.next())Ce=X(ue,M,fe,Ce.value,Q),Ce!==null&&(e&&Ce.alternate!==null&&ue.delete(Ce.key===null?fe:Ce.key),j=f(Ce,j,fe),le===null?oe=Ce:le.sibling=Ce,le=Ce);return e&&ue.forEach(function(Wx){return n(M,Wx)}),_e&&Bn(M,fe),oe}function De(M,j,D,Q){if(typeof D=="object"&&D!==null&&D.type===U&&D.key===null&&(D=D.props.children),typeof D=="object"&&D!==null){switch(D.$$typeof){case F:e:{for(var oe=D.key,le=j;le!==null;){if(le.key===oe){if(oe=D.type,oe===U){if(le.tag===7){o(M,le.sibling),j=u(le,D.props.children),j.return=M,M=j;break e}}else if(le.elementType===oe||typeof oe=="object"&&oe!==null&&oe.$$typeof===ee&&Hd(oe)===le.type){o(M,le.sibling),j=u(le,D.props),j.ref=vo(M,le,D),j.return=M,M=j;break e}o(M,le);break}else n(M,le);le=le.sibling}D.type===U?(j=Xn(D.props.children,M.mode,Q,D.key),j.return=M,M=j):(Q=Zs(D.type,D.key,D.props,null,M.mode,Q),Q.ref=vo(M,j,D),Q.return=M,M=Q)}return x(M);case L:e:{for(le=D.key;j!==null;){if(j.key===le)if(j.tag===4&&j.stateNode.containerInfo===D.containerInfo&&j.stateNode.implementation===D.implementation){o(M,j.sibling),j=u(j,D.children||[]),j.return=M,M=j;break e}else{o(M,j);break}else n(M,j);j=j.sibling}j=Dl(D,M.mode,Q),j.return=M,M=j}return x(M);case ee:return le=D._init,De(M,j,le(D._payload),Q)}if(Kr(D))return J(M,j,D,Q);if(z(D))return re(M,j,D,Q);Ps(M,D)}return typeof D=="string"&&D!==""||typeof D=="number"?(D=""+D,j!==null&&j.tag===6?(o(M,j.sibling),j=u(j,D),j.return=M,M=j):(o(M,j),j=Il(D,M.mode,Q),j.return=M,M=j),x(M)):o(M,j)}return De}var Sr=Bd(!0),Wd=Bd(!1),js=gn(null),Ts=null,Cr=null,Ka=null;function Va(){Ka=Cr=Ts=null}function Qa(e){var n=js.current;je(js),e._currentValue=n}function Ga(e,n,o){for(;e!==null;){var i=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,i!==null&&(i.childLanes|=n)):i!==null&&(i.childLanes&n)!==n&&(i.childLanes|=n),e===o)break;e=e.return}}function Er(e,n){Ts=e,Ka=Cr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&n)!==0&&(it=!0),e.firstContext=null)}function bt(e){var n=e._currentValue;if(Ka!==e)if(e={context:e,memoizedValue:n,next:null},Cr===null){if(Ts===null)throw Error(s(308));Cr=e,Ts.dependencies={lanes:0,firstContext:e}}else Cr=Cr.next=e;return n}var Wn=null;function qa(e){Wn===null?Wn=[e]:Wn.push(e)}function Kd(e,n,o,i){var u=n.interleaved;return u===null?(o.next=o,qa(n)):(o.next=u.next,u.next=o),n.interleaved=o,en(e,i)}function en(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 xn=!1;function Ya(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Vd(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 tn(e,n){return{eventTime:e,lane:n,tag:0,payload:null,callback:null,next:null}}function wn(e,n,o){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(Se&2)!==0){var u=i.pending;return u===null?n.next=n:(n.next=u.next,u.next=n),i.pending=n,en(e,o)}return u=i.interleaved,u===null?(n.next=n,qa(i)):(n.next=u.next,u.next=n),i.interleaved=n,en(e,o)}function _s(e,n,o){if(n=n.updateQueue,n!==null&&(n=n.shared,(o&4194240)!==0)){var i=n.lanes;i&=e.pendingLanes,o|=i,n.lanes=o,ca(e,o)}}function Qd(e,n){var o=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,o===i)){var u=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?u=f=x:f=f.next=x,o=o.next}while(o!==null);f===null?u=f=n:f=f.next=n}else u=f=n;o={baseState:i.baseState,firstBaseUpdate:u,lastBaseUpdate:f,shared:i.shared,effects:i.effects},e.updateQueue=o;return}e=o.lastBaseUpdate,e===null?o.firstBaseUpdate=n:e.next=n,o.lastBaseUpdate=n}function Os(e,n,o,i){var u=e.updateQueue;xn=!1;var f=u.firstBaseUpdate,x=u.lastBaseUpdate,E=u.shared.pending;if(E!==null){u.shared.pending=null;var R=E,$=R.next;R.next=null,x===null?f=$:x.next=$,x=R;var W=e.alternate;W!==null&&(W=W.updateQueue,E=W.lastBaseUpdate,E!==x&&(E===null?W.firstBaseUpdate=$:E.next=$,W.lastBaseUpdate=R))}if(f!==null){var K=u.baseState;x=0,W=$=R=null,E=f;do{var B=E.lane,X=E.eventTime;if((i&B)===B){W!==null&&(W=W.next={eventTime:X,lane:0,tag:E.tag,payload:E.payload,callback:E.callback,next:null});e:{var J=e,re=E;switch(B=n,X=o,re.tag){case 1:if(J=re.payload,typeof J=="function"){K=J.call(X,K,B);break e}K=J;break e;case 3:J.flags=J.flags&-65537|128;case 0:if(J=re.payload,B=typeof J=="function"?J.call(X,K,B):J,B==null)break e;K=V({},K,B);break e;case 2:xn=!0}}E.callback!==null&&E.lane!==0&&(e.flags|=64,B=u.effects,B===null?u.effects=[E]:B.push(E))}else X={eventTime:X,lane:B,tag:E.tag,payload:E.payload,callback:E.callback,next:null},W===null?($=W=X,R=K):W=W.next=X,x|=B;if(E=E.next,E===null){if(E=u.shared.pending,E===null)break;B=E,E=B.next,B.next=null,u.lastBaseUpdate=B,u.shared.pending=null}}while(!0);if(W===null&&(R=K),u.baseState=R,u.firstBaseUpdate=$,u.lastBaseUpdate=W,n=u.shared.interleaved,n!==null){u=n;do x|=u.lane,u=u.next;while(u!==n)}else f===null&&(u.shared.lanes=0);Qn|=x,e.lanes=x,e.memoizedState=K}}function Gd(e,n,o){if(e=n.effects,n.effects=null,e!==null)for(n=0;n<e.length;n++){var i=e[n],u=i.callback;if(u!==null){if(i.callback=null,i=o,typeof u!="function")throw Error(s(191,u));u.call(i)}}}var yo={},Ft=gn(yo),xo=gn(yo),wo=gn(yo);function Kn(e){if(e===yo)throw Error(s(174));return e}function Xa(e,n){switch(Ne(wo,n),Ne(xo,e),Ne(Ft,yo),e=n.nodeType,e){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:Zi(null,"");break;default:e=e===8?n.parentNode:n,n=e.namespaceURI||null,e=e.tagName,n=Zi(n,e)}je(Ft),Ne(Ft,n)}function kr(){je(Ft),je(xo),je(wo)}function qd(e){Kn(wo.current);var n=Kn(Ft.current),o=Zi(n,e.type);n!==o&&(Ne(xo,e),Ne(Ft,o))}function Za(e){xo.current===e&&(je(Ft),je(xo))}var Oe=gn(0);function As(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 Ja=[];function el(){for(var e=0;e<Ja.length;e++)Ja[e]._workInProgressVersionPrimary=null;Ja.length=0}var Ms=I.ReactCurrentDispatcher,tl=I.ReactCurrentBatchConfig,Vn=0,Ae=null,$e=null,Be=null,Is=!1,bo=!1,So=0,fx=0;function qe(){throw Error(s(321))}function nl(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 rl(e,n,o,i,u,f){if(Vn=f,Ae=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,Ms.current=e===null||e.memoizedState===null?gx:vx,e=o(i,u),bo){f=0;do{if(bo=!1,So=0,25<=f)throw Error(s(301));f+=1,Be=$e=null,n.updateQueue=null,Ms.current=yx,e=o(i,u)}while(bo)}if(Ms.current=Fs,n=$e!==null&&$e.next!==null,Vn=0,Be=$e=Ae=null,Is=!1,n)throw Error(s(300));return e}function ol(){var e=So!==0;return So=0,e}function $t(){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 St(){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 Co(e,n){return typeof n=="function"?n(e):n}function sl(e){var n=St(),o=n.queue;if(o===null)throw Error(s(311));o.lastRenderedReducer=e;var i=$e,u=i.baseQueue,f=o.pending;if(f!==null){if(u!==null){var x=u.next;u.next=f.next,f.next=x}i.baseQueue=u=f,o.pending=null}if(u!==null){f=u.next,i=i.baseState;var E=x=null,R=null,$=f;do{var W=$.lane;if((Vn&W)===W)R!==null&&(R=R.next={lane:0,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null}),i=$.hasEagerState?$.eagerState:e(i,$.action);else{var K={lane:W,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null};R===null?(E=R=K,x=i):R=R.next=K,Ae.lanes|=W,Qn|=W}$=$.next}while($!==null&&$!==f);R===null?x=i:R.next=E,Pt(i,n.memoizedState)||(it=!0),n.memoizedState=i,n.baseState=x,n.baseQueue=R,o.lastRenderedState=i}if(e=o.interleaved,e!==null){u=e;do f=u.lane,Ae.lanes|=f,Qn|=f,u=u.next;while(u!==e)}else u===null&&(o.lanes=0);return[n.memoizedState,o.dispatch]}function il(e){var n=St(),o=n.queue;if(o===null)throw Error(s(311));o.lastRenderedReducer=e;var i=o.dispatch,u=o.pending,f=n.memoizedState;if(u!==null){o.pending=null;var x=u=u.next;do f=e(f,x.action),x=x.next;while(x!==u);Pt(f,n.memoizedState)||(it=!0),n.memoizedState=f,n.baseQueue===null&&(n.baseState=f),o.lastRenderedState=f}return[f,i]}function Yd(){}function Xd(e,n){var o=Ae,i=St(),u=n(),f=!Pt(i.memoizedState,u);if(f&&(i.memoizedState=u,it=!0),i=i.queue,al(ef.bind(null,o,i,e),[e]),i.getSnapshot!==n||f||Be!==null&&Be.memoizedState.tag&1){if(o.flags|=2048,Eo(9,Jd.bind(null,o,i,u,n),void 0,null),We===null)throw Error(s(349));(Vn&30)!==0||Zd(o,n,u)}return u}function Zd(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 Jd(e,n,o,i){n.value=o,n.getSnapshot=i,tf(n)&&nf(e)}function ef(e,n,o){return o(function(){tf(n)&&nf(e)})}function tf(e){var n=e.getSnapshot;e=e.value;try{var o=n();return!Pt(e,o)}catch{return!0}}function nf(e){var n=en(e,1);n!==null&&At(n,e,1,-1)}function rf(e){var n=$t();return typeof e=="function"&&(e=e()),n.memoizedState=n.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Co,lastRenderedState:e},n.queue=e,e=e.dispatch=mx.bind(null,Ae,e),[n.memoizedState,e]}function Eo(e,n,o,i){return e={tag:e,create:n,destroy:o,deps:i,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:(i=o.next,o.next=e,e.next=i,n.lastEffect=e)),e}function of(){return St().memoizedState}function Ds(e,n,o,i){var u=$t();Ae.flags|=e,u.memoizedState=Eo(1|n,o,void 0,i===void 0?null:i)}function Ls(e,n,o,i){var u=St();i=i===void 0?null:i;var f=void 0;if($e!==null){var x=$e.memoizedState;if(f=x.destroy,i!==null&&nl(i,x.deps)){u.memoizedState=Eo(n,o,f,i);return}}Ae.flags|=e,u.memoizedState=Eo(1|n,o,f,i)}function sf(e,n){return Ds(8390656,8,e,n)}function al(e,n){return Ls(2048,8,e,n)}function af(e,n){return Ls(4,2,e,n)}function lf(e,n){return Ls(4,4,e,n)}function uf(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 cf(e,n,o){return o=o!=null?o.concat([e]):null,Ls(4,4,uf.bind(null,n,e),o)}function ll(){}function df(e,n){var o=St();n=n===void 0?null:n;var i=o.memoizedState;return i!==null&&n!==null&&nl(n,i[1])?i[0]:(o.memoizedState=[e,n],e)}function ff(e,n){var o=St();n=n===void 0?null:n;var i=o.memoizedState;return i!==null&&n!==null&&nl(n,i[1])?i[0]:(e=e(),o.memoizedState=[e,n],e)}function pf(e,n,o){return(Vn&21)===0?(e.baseState&&(e.baseState=!1,it=!0),e.memoizedState=o):(Pt(o,n)||(o=Hc(),Ae.lanes|=o,Qn|=o,e.baseState=!0),n)}function px(e,n){var o=Ee;Ee=o!==0&&4>o?o:4,e(!0);var i=tl.transition;tl.transition={};try{e(!1),n()}finally{Ee=o,tl.transition=i}}function hf(){return St().memoizedState}function hx(e,n,o){var i=En(e);if(o={lane:i,action:o,hasEagerState:!1,eagerState:null,next:null},mf(e))gf(n,o);else if(o=Kd(e,n,o,i),o!==null){var u=et();At(o,e,i,u),vf(o,n,i)}}function mx(e,n,o){var i=En(e),u={lane:i,action:o,hasEagerState:!1,eagerState:null,next:null};if(mf(e))gf(n,u);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=n.lastRenderedReducer,f!==null))try{var x=n.lastRenderedState,E=f(x,o);if(u.hasEagerState=!0,u.eagerState=E,Pt(E,x)){var R=n.interleaved;R===null?(u.next=u,qa(n)):(u.next=R.next,R.next=u),n.interleaved=u;return}}catch{}o=Kd(e,n,u,i),o!==null&&(u=et(),At(o,e,i,u),vf(o,n,i))}}function mf(e){var n=e.alternate;return e===Ae||n!==null&&n===Ae}function gf(e,n){bo=Is=!0;var o=e.pending;o===null?n.next=n:(n.next=o.next,o.next=n),e.pending=n}function vf(e,n,o){if((o&4194240)!==0){var i=n.lanes;i&=e.pendingLanes,o|=i,n.lanes=o,ca(e,o)}}var Fs={readContext:bt,useCallback:qe,useContext:qe,useEffect:qe,useImperativeHandle:qe,useInsertionEffect:qe,useLayoutEffect:qe,useMemo:qe,useReducer:qe,useRef:qe,useState:qe,useDebugValue:qe,useDeferredValue:qe,useTransition:qe,useMutableSource:qe,useSyncExternalStore:qe,useId:qe,unstable_isNewReconciler:!1},gx={readContext:bt,useCallback:function(e,n){return $t().memoizedState=[e,n===void 0?null:n],e},useContext:bt,useEffect:sf,useImperativeHandle:function(e,n,o){return o=o!=null?o.concat([e]):null,Ds(4194308,4,uf.bind(null,n,e),o)},useLayoutEffect:function(e,n){return Ds(4194308,4,e,n)},useInsertionEffect:function(e,n){return Ds(4,2,e,n)},useMemo:function(e,n){var o=$t();return n=n===void 0?null:n,e=e(),o.memoizedState=[e,n],e},useReducer:function(e,n,o){var i=$t();return n=o!==void 0?o(n):n,i.memoizedState=i.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},i.queue=e,e=e.dispatch=hx.bind(null,Ae,e),[i.memoizedState,e]},useRef:function(e){var n=$t();return e={current:e},n.memoizedState=e},useState:rf,useDebugValue:ll,useDeferredValue:function(e){return $t().memoizedState=e},useTransition:function(){var e=rf(!1),n=e[0];return e=px.bind(null,e[1]),$t().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,o){var i=Ae,u=$t();if(_e){if(o===void 0)throw Error(s(407));o=o()}else{if(o=n(),We===null)throw Error(s(349));(Vn&30)!==0||Zd(i,n,o)}u.memoizedState=o;var f={value:o,getSnapshot:n};return u.queue=f,sf(ef.bind(null,i,f,e),[e]),i.flags|=2048,Eo(9,Jd.bind(null,i,f,o,n),void 0,null),o},useId:function(){var e=$t(),n=We.identifierPrefix;if(_e){var o=Jt,i=Zt;o=(i&~(1<<32-Rt(i)-1)).toString(32)+o,n=":"+n+"R"+o,o=So++,0<o&&(n+="H"+o.toString(32)),n+=":"}else o=fx++,n=":"+n+"r"+o.toString(32)+":";return e.memoizedState=n},unstable_isNewReconciler:!1},vx={readContext:bt,useCallback:df,useContext:bt,useEffect:al,useImperativeHandle:cf,useInsertionEffect:af,useLayoutEffect:lf,useMemo:ff,useReducer:sl,useRef:of,useState:function(){return sl(Co)},useDebugValue:ll,useDeferredValue:function(e){var n=St();return pf(n,$e.memoizedState,e)},useTransition:function(){var e=sl(Co)[0],n=St().memoizedState;return[e,n]},useMutableSource:Yd,useSyncExternalStore:Xd,useId:hf,unstable_isNewReconciler:!1},yx={readContext:bt,useCallback:df,useContext:bt,useEffect:al,useImperativeHandle:cf,useInsertionEffect:af,useLayoutEffect:lf,useMemo:ff,useReducer:il,useRef:of,useState:function(){return il(Co)},useDebugValue:ll,useDeferredValue:function(e){var n=St();return $e===null?n.memoizedState=e:pf(n,$e.memoizedState,e)},useTransition:function(){var e=il(Co)[0],n=St().memoizedState;return[e,n]},useMutableSource:Yd,useSyncExternalStore:Xd,useId:hf,unstable_isNewReconciler:!1};function Tt(e,n){if(e&&e.defaultProps){n=V({},n),e=e.defaultProps;for(var o in e)n[o]===void 0&&(n[o]=e[o]);return n}return n}function ul(e,n,o,i){n=e.memoizedState,o=o(i,n),o=o==null?n:V({},n,o),e.memoizedState=o,e.lanes===0&&(e.updateQueue.baseState=o)}var $s={isMounted:function(e){return(e=e._reactInternals)?$n(e)===e:!1},enqueueSetState:function(e,n,o){e=e._reactInternals;var i=et(),u=En(e),f=tn(i,u);f.payload=n,o!=null&&(f.callback=o),n=wn(e,f,u),n!==null&&(At(n,e,u,i),_s(n,e,u))},enqueueReplaceState:function(e,n,o){e=e._reactInternals;var i=et(),u=En(e),f=tn(i,u);f.tag=1,f.payload=n,o!=null&&(f.callback=o),n=wn(e,f,u),n!==null&&(At(n,e,u,i),_s(n,e,u))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var o=et(),i=En(e),u=tn(o,i);u.tag=2,n!=null&&(u.callback=n),n=wn(e,u,i),n!==null&&(At(n,e,i,o),_s(n,e,i))}};function yf(e,n,o,i,u,f,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,f,x):n.prototype&&n.prototype.isPureReactComponent?!uo(o,i)||!uo(u,f):!0}function xf(e,n,o){var i=!1,u=vn,f=n.contextType;return typeof f=="object"&&f!==null?f=bt(f):(u=st(n)?Un:Ge.current,i=n.contextTypes,f=(i=i!=null)?yr(e,u):vn),n=new n(o,f),e.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=$s,e.stateNode=n,n._reactInternals=e,i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=u,e.__reactInternalMemoizedMaskedChildContext=f),n}function wf(e,n,o,i){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(o,i),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(o,i),n.state!==e&&$s.enqueueReplaceState(n,n.state,null)}function cl(e,n,o,i){var u=e.stateNode;u.props=o,u.state=e.memoizedState,u.refs={},Ya(e);var f=n.contextType;typeof f=="object"&&f!==null?u.context=bt(f):(f=st(n)?Un:Ge.current,u.context=yr(e,f)),u.state=e.memoizedState,f=n.getDerivedStateFromProps,typeof f=="function"&&(ul(e,n,f,o),u.state=e.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(n=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),n!==u.state&&$s.enqueueReplaceState(u,u.state,null),Os(e,o,u,i),u.state=e.memoizedState),typeof u.componentDidMount=="function"&&(e.flags|=4194308)}function Nr(e,n){try{var o="",i=n;do o+=xe(i),i=i.return;while(i);var u=o}catch(f){u=`
5
+ `+u[x].replace(" at new "," at ");return e.displayName&&R.includes("<anonymous>")&&(R=R.replace("<anonymous>",e.displayName)),R}while(1<=x&&0<=E);break}}}finally{de=!1,Error.prepareStackTrace=o}return(e=e?e.displayName||e.name:"")?H(e):""}function xe(e){switch(e.tag){case 5:return H(e.type);case 16:return H("Lazy");case 13:return H("Suspense");case 19:return H("SuspenseList");case 0:case 2:case 15:return e=pe(e.type,!1),e;case 11:return e=pe(e.type.render,!1),e;case 1:return e=pe(e.type,!0),e;default:return""}}function ve(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 U:return"Fragment";case L:return"Portal";case te:return"Profiler";case q:return"StrictMode";case ae:return"Suspense";case G:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case se:return(e.displayName||"Context")+".Consumer";case ne:return(e._context.displayName||"Context")+".Provider";case Y:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case me:return n=e.displayName||null,n!==null?n:ve(e.type)||"Memo";case ee:n=e._payload,e=e._init;try{return ve(e(n))}catch{}}return null}function he(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 ve(n);case 8:return n===q?"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 ke(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Ze(e){var n=ke(e)?"checked":"value",o=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),i=""+e[n];if(!e.hasOwnProperty(n)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var u=o.get,f=o.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return u.call(this)},set:function(x){i=""+x,f.call(this,x)}}),Object.defineProperty(e,n,{enumerable:o.enumerable}),{getValue:function(){return i},setValue:function(x){i=""+x},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function sr(e){e._valueTracker||(e._valueTracker=Ze(e))}function Xo(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var o=n.getValue(),i="";return e&&(i=ke(e)?e.checked?"true":"false":e.value),e=i,e!==o?(n.setValue(e),!0):!1}function qt(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 Gi(e,n){var o=n.checked;return V({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:o??e._wrapperState.initialChecked})}function xc(e,n){var o=n.defaultValue==null?"":n.defaultValue,i=n.checked!=null?n.checked:n.defaultChecked;o=be(n.value!=null?n.value:o),e._wrapperState={initialChecked:i,initialValue:o,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function wc(e,n){n=n.checked,n!=null&&O(e,"checked",n,!1)}function qi(e,n){wc(e,n);var o=be(n.value),i=n.type;if(o!=null)i==="number"?(o===0&&e.value===""||e.value!=o)&&(e.value=""+o):e.value!==""+o&&(e.value=""+o);else if(i==="submit"||i==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?Yi(e,n.type,o):n.hasOwnProperty("defaultValue")&&Yi(e,n.type,be(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function bc(e,n,o){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var i=n.type;if(!(i!=="submit"&&i!=="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 Yi(e,n,o){(n!=="number"||qt(e.ownerDocument)!==e)&&(o==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+o&&(e.defaultValue=""+o))}var Kr=Array.isArray;function ir(e,n,o,i){if(e=e.options,n){n={};for(var u=0;u<o.length;u++)n["$"+o[u]]=!0;for(o=0;o<e.length;o++)u=n.hasOwnProperty("$"+e[o].value),e[o].selected!==u&&(e[o].selected=u),u&&i&&(e[o].defaultSelected=!0)}else{for(o=""+be(o),n=null,u=0;u<e.length;u++){if(e[u].value===o){e[u].selected=!0,i&&(e[u].defaultSelected=!0);return}n!==null||e[u].disabled||(n=e[u])}n!==null&&(n.selected=!0)}}function Xi(e,n){if(n.dangerouslySetInnerHTML!=null)throw Error(s(91));return V({},n,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Sc(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(Kr(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 Cc(e,n){var o=be(n.value),i=be(n.defaultValue);o!=null&&(o=""+o,o!==e.value&&(e.value=o),n.defaultValue==null&&e.defaultValue!==o&&(e.defaultValue=o)),i!=null&&(e.defaultValue=""+i)}function Ec(e){var n=e.textContent;n===e._wrapperState.initialValue&&n!==""&&n!==null&&(e.value=n)}function kc(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 Zi(e,n){return e==null||e==="http://www.w3.org/1999/xhtml"?kc(n):e==="http://www.w3.org/2000/svg"&&n==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Zo,Nc=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(n,o,i,u){MSApp.execUnsafeLocalFunction(function(){return e(n,o,i,u)})}:e})(function(e,n){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=n;else{for(Zo=Zo||document.createElement("div"),Zo.innerHTML="<svg>"+n.valueOf().toString()+"</svg>",n=Zo.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function Vr(e,n){if(n){var o=e.firstChild;if(o&&o===e.lastChild&&o.nodeType===3){o.nodeValue=n;return}}e.textContent=n}var Qr={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},qv=["Webkit","ms","Moz","O"];Object.keys(Qr).forEach(function(e){qv.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),Qr[n]=Qr[e]})});function Rc(e,n,o){return n==null||typeof n=="boolean"||n===""?"":o||typeof n!="number"||n===0||Qr.hasOwnProperty(e)&&Qr[e]?(""+n).trim():n+"px"}function Pc(e,n){e=e.style;for(var o in n)if(n.hasOwnProperty(o)){var i=o.indexOf("--")===0,u=Rc(o,n[o],i);o==="float"&&(o="cssFloat"),i?e.setProperty(o,u):e[o]=u}}var Yv=V({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 Ji(e,n){if(n){if(Yv[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 ea(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 ta=null;function na(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ra=null,ar=null,lr=null;function jc(e){if(e=go(e)){if(typeof ra!="function")throw Error(s(280));var n=e.stateNode;n&&(n=bs(n),ra(e.stateNode,e.type,n))}}function Tc(e){ar?lr?lr.push(e):lr=[e]:ar=e}function _c(){if(ar){var e=ar,n=lr;if(lr=ar=null,jc(e),n)for(e=0;e<n.length;e++)jc(n[e])}}function Oc(e,n){return e(n)}function Ac(){}var oa=!1;function Mc(e,n,o){if(oa)return e(n,o);oa=!0;try{return Oc(e,n,o)}finally{oa=!1,(ar!==null||lr!==null)&&(Ac(),_c())}}function Gr(e,n){var o=e.stateNode;if(o===null)return null;var i=bs(o);if(i===null)return null;o=i[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":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(o&&typeof o!="function")throw Error(s(231,n,typeof o));return o}var sa=!1;if(h)try{var qr={};Object.defineProperty(qr,"passive",{get:function(){sa=!0}}),window.addEventListener("test",qr,qr),window.removeEventListener("test",qr,qr)}catch{sa=!1}function Xv(e,n,o,i,u,f,x,E,R){var $=Array.prototype.slice.call(arguments,3);try{n.apply(o,$)}catch(W){this.onError(W)}}var Yr=!1,Jo=null,es=!1,ia=null,Zv={onError:function(e){Yr=!0,Jo=e}};function Jv(e,n,o,i,u,f,x,E,R){Yr=!1,Jo=null,Xv.apply(Zv,arguments)}function ey(e,n,o,i,u,f,x,E,R){if(Jv.apply(this,arguments),Yr){if(Yr){var $=Jo;Yr=!1,Jo=null}else throw Error(s(198));es||(es=!0,ia=$)}}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 Ic(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 Dc(e){if($n(e)!==e)throw Error(s(188))}function ty(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,i=n;;){var u=o.return;if(u===null)break;var f=u.alternate;if(f===null){if(i=u.return,i!==null){o=i;continue}break}if(u.child===f.child){for(f=u.child;f;){if(f===o)return Dc(u),e;if(f===i)return Dc(u),n;f=f.sibling}throw Error(s(188))}if(o.return!==i.return)o=u,i=f;else{for(var x=!1,E=u.child;E;){if(E===o){x=!0,o=u,i=f;break}if(E===i){x=!0,i=u,o=f;break}E=E.sibling}if(!x){for(E=f.child;E;){if(E===o){x=!0,o=f,i=u;break}if(E===i){x=!0,i=f,o=u;break}E=E.sibling}if(!x)throw Error(s(189))}}if(o.alternate!==i)throw Error(s(190))}if(o.tag!==3)throw Error(s(188));return o.stateNode.current===o?e:n}function Lc(e){return e=ty(e),e!==null?Fc(e):null}function Fc(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var n=Fc(e);if(n!==null)return n;e=e.sibling}return null}var $c=r.unstable_scheduleCallback,zc=r.unstable_cancelCallback,ny=r.unstable_shouldYield,ry=r.unstable_requestPaint,Ie=r.unstable_now,oy=r.unstable_getCurrentPriorityLevel,aa=r.unstable_ImmediatePriority,Uc=r.unstable_UserBlockingPriority,ts=r.unstable_NormalPriority,sy=r.unstable_LowPriority,Hc=r.unstable_IdlePriority,ns=null,Lt=null;function iy(e){if(Lt&&typeof Lt.onCommitFiberRoot=="function")try{Lt.onCommitFiberRoot(ns,e,void 0,(e.current.flags&128)===128)}catch{}}var Rt=Math.clz32?Math.clz32:uy,ay=Math.log,ly=Math.LN2;function uy(e){return e>>>=0,e===0?32:31-(ay(e)/ly|0)|0}var rs=64,os=4194304;function Xr(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 ss(e,n){var o=e.pendingLanes;if(o===0)return 0;var i=0,u=e.suspendedLanes,f=e.pingedLanes,x=o&268435455;if(x!==0){var E=x&~u;E!==0?i=Xr(E):(f&=x,f!==0&&(i=Xr(f)))}else x=o&~u,x!==0?i=Xr(x):f!==0&&(i=Xr(f));if(i===0)return 0;if(n!==0&&n!==i&&(n&u)===0&&(u=i&-i,f=n&-n,u>=f||u===16&&(f&4194240)!==0))return n;if((i&4)!==0&&(i|=o&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=i;0<n;)o=31-Rt(n),u=1<<o,i|=e[o],n&=~u;return i}function cy(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 dy(e,n){for(var o=e.suspendedLanes,i=e.pingedLanes,u=e.expirationTimes,f=e.pendingLanes;0<f;){var x=31-Rt(f),E=1<<x,R=u[x];R===-1?((E&o)===0||(E&i)!==0)&&(u[x]=cy(E,n)):R<=n&&(e.expiredLanes|=E),f&=~E}}function la(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Bc(){var e=rs;return rs<<=1,(rs&4194240)===0&&(rs=64),e}function ua(e){for(var n=[],o=0;31>o;o++)n.push(e);return n}function Zr(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 fy(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 i=e.eventTimes;for(e=e.expirationTimes;0<o;){var u=31-Rt(o),f=1<<u;n[u]=0,i[u]=-1,e[u]=-1,o&=~f}}function ca(e,n){var o=e.entangledLanes|=n;for(e=e.entanglements;o;){var i=31-Rt(o),u=1<<i;u&n|e[i]&n&&(e[i]|=n),o&=~u}}var Ee=0;function Wc(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var Kc,da,Vc,Qc,Gc,fa=!1,is=[],un=null,cn=null,dn=null,Jr=new Map,eo=new Map,fn=[],py="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 qc(e,n){switch(e){case"focusin":case"focusout":un=null;break;case"dragenter":case"dragleave":cn=null;break;case"mouseover":case"mouseout":dn=null;break;case"pointerover":case"pointerout":Jr.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":eo.delete(n.pointerId)}}function to(e,n,o,i,u,f){return e===null||e.nativeEvent!==f?(e={blockedOn:n,domEventName:o,eventSystemFlags:i,nativeEvent:f,targetContainers:[u]},n!==null&&(n=go(n),n!==null&&da(n)),e):(e.eventSystemFlags|=i,n=e.targetContainers,u!==null&&n.indexOf(u)===-1&&n.push(u),e)}function hy(e,n,o,i,u){switch(n){case"focusin":return un=to(un,e,n,o,i,u),!0;case"dragenter":return cn=to(cn,e,n,o,i,u),!0;case"mouseover":return dn=to(dn,e,n,o,i,u),!0;case"pointerover":var f=u.pointerId;return Jr.set(f,to(Jr.get(f)||null,e,n,o,i,u)),!0;case"gotpointercapture":return f=u.pointerId,eo.set(f,to(eo.get(f)||null,e,n,o,i,u)),!0}return!1}function Yc(e){var n=zn(e.target);if(n!==null){var o=$n(n);if(o!==null){if(n=o.tag,n===13){if(n=Ic(o),n!==null){e.blockedOn=n,Gc(e.priority,function(){Vc(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 as(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var o=ha(e.domEventName,e.eventSystemFlags,n[0],e.nativeEvent);if(o===null){o=e.nativeEvent;var i=new o.constructor(o.type,o);ta=i,o.target.dispatchEvent(i),ta=null}else return n=go(o),n!==null&&da(n),e.blockedOn=o,!1;n.shift()}return!0}function Xc(e,n,o){as(e)&&o.delete(n)}function my(){fa=!1,un!==null&&as(un)&&(un=null),cn!==null&&as(cn)&&(cn=null),dn!==null&&as(dn)&&(dn=null),Jr.forEach(Xc),eo.forEach(Xc)}function no(e,n){e.blockedOn===n&&(e.blockedOn=null,fa||(fa=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,my)))}function ro(e){function n(u){return no(u,e)}if(0<is.length){no(is[0],e);for(var o=1;o<is.length;o++){var i=is[o];i.blockedOn===e&&(i.blockedOn=null)}}for(un!==null&&no(un,e),cn!==null&&no(cn,e),dn!==null&&no(dn,e),Jr.forEach(n),eo.forEach(n),o=0;o<fn.length;o++)i=fn[o],i.blockedOn===e&&(i.blockedOn=null);for(;0<fn.length&&(o=fn[0],o.blockedOn===null);)Yc(o),o.blockedOn===null&&fn.shift()}var ur=I.ReactCurrentBatchConfig,ls=!0;function gy(e,n,o,i){var u=Ee,f=ur.transition;ur.transition=null;try{Ee=1,pa(e,n,o,i)}finally{Ee=u,ur.transition=f}}function vy(e,n,o,i){var u=Ee,f=ur.transition;ur.transition=null;try{Ee=4,pa(e,n,o,i)}finally{Ee=u,ur.transition=f}}function pa(e,n,o,i){if(ls){var u=ha(e,n,o,i);if(u===null)_a(e,n,i,us,o),qc(e,i);else if(hy(u,e,n,o,i))i.stopPropagation();else if(qc(e,i),n&4&&-1<py.indexOf(e)){for(;u!==null;){var f=go(u);if(f!==null&&Kc(f),f=ha(e,n,o,i),f===null&&_a(e,n,i,us,o),f===u)break;u=f}u!==null&&i.stopPropagation()}else _a(e,n,i,null,o)}}var us=null;function ha(e,n,o,i){if(us=null,e=na(i),e=zn(e),e!==null)if(n=$n(e),n===null)e=null;else if(o=n.tag,o===13){if(e=Ic(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 us=e,null}function Zc(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(oy()){case aa:return 1;case Uc:return 4;case ts:case sy:return 16;case Hc:return 536870912;default:return 16}default:return 16}}var pn=null,ma=null,cs=null;function Jc(){if(cs)return cs;var e,n=ma,o=n.length,i,u="value"in pn?pn.value:pn.textContent,f=u.length;for(e=0;e<o&&n[e]===u[e];e++);var x=o-e;for(i=1;i<=x&&n[o-i]===u[f-i];i++);return cs=u.slice(e,1<i?1-i:void 0)}function ds(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 fs(){return!0}function ed(){return!1}function ft(e){function n(o,i,u,f,x){this._reactName=o,this._targetInst=u,this.type=i,this.nativeEvent=f,this.target=x,this.currentTarget=null;for(var E in e)e.hasOwnProperty(E)&&(o=e[E],this[E]=o?o(f):f[E]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?fs:ed,this.isPropagationStopped=ed,this}return V(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=fs)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=fs)},persist:function(){},isPersistent:fs}),n}var cr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ga=ft(cr),oo=V({},cr,{view:0,detail:0}),yy=ft(oo),va,ya,so,ps=V({},oo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:wa,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!==so&&(so&&e.type==="mousemove"?(va=e.screenX-so.screenX,ya=e.screenY-so.screenY):ya=va=0,so=e),va)},movementY:function(e){return"movementY"in e?e.movementY:ya}}),td=ft(ps),xy=V({},ps,{dataTransfer:0}),wy=ft(xy),by=V({},oo,{relatedTarget:0}),xa=ft(by),Sy=V({},cr,{animationName:0,elapsedTime:0,pseudoElement:0}),Cy=ft(Sy),Ey=V({},cr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ky=ft(Ey),Ny=V({},cr,{data:0}),nd=ft(Ny),Ry={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Py={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"},jy={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ty(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=jy[e])?!!n[e]:!1}function wa(){return Ty}var _y=V({},oo,{key:function(e){if(e.key){var n=Ry[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=ds(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Py[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:wa,charCode:function(e){return e.type==="keypress"?ds(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ds(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Oy=ft(_y),Ay=V({},ps,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),rd=ft(Ay),My=V({},oo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:wa}),Iy=ft(My),Dy=V({},cr,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ly=ft(Dy),Fy=V({},ps,{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}),$y=ft(Fy),zy=[9,13,27,32],ba=h&&"CompositionEvent"in window,io=null;h&&"documentMode"in document&&(io=document.documentMode);var Uy=h&&"TextEvent"in window&&!io,od=h&&(!ba||io&&8<io&&11>=io),sd=" ",id=!1;function ad(e,n){switch(e){case"keyup":return zy.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ld(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var dr=!1;function Hy(e,n){switch(e){case"compositionend":return ld(n);case"keypress":return n.which!==32?null:(id=!0,sd);case"textInput":return e=n.data,e===sd&&id?null:e;default:return null}}function By(e,n){if(dr)return e==="compositionend"||!ba&&ad(e,n)?(e=Jc(),cs=ma=pn=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 od&&n.locale!=="ko"?null:n.data;default:return null}}var Wy={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 ud(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!Wy[e.type]:n==="textarea"}function cd(e,n,o,i){Tc(i),n=ys(n,"onChange"),0<n.length&&(o=new ga("onChange","change",null,o,i),e.push({event:o,listeners:n}))}var ao=null,lo=null;function Ky(e){Pd(e,0)}function hs(e){var n=gr(e);if(Xo(n))return e}function Vy(e,n){if(e==="change")return n}var dd=!1;if(h){var Sa;if(h){var Ca="oninput"in document;if(!Ca){var fd=document.createElement("div");fd.setAttribute("oninput","return;"),Ca=typeof fd.oninput=="function"}Sa=Ca}else Sa=!1;dd=Sa&&(!document.documentMode||9<document.documentMode)}function pd(){ao&&(ao.detachEvent("onpropertychange",hd),lo=ao=null)}function hd(e){if(e.propertyName==="value"&&hs(lo)){var n=[];cd(n,lo,e,na(e)),Mc(Ky,n)}}function Qy(e,n,o){e==="focusin"?(pd(),ao=n,lo=o,ao.attachEvent("onpropertychange",hd)):e==="focusout"&&pd()}function Gy(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return hs(lo)}function qy(e,n){if(e==="click")return hs(n)}function Yy(e,n){if(e==="input"||e==="change")return hs(n)}function Xy(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var Pt=typeof Object.is=="function"?Object.is:Xy;function uo(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),i=Object.keys(n);if(o.length!==i.length)return!1;for(i=0;i<o.length;i++){var u=o[i];if(!y.call(n,u)||!Pt(e[u],n[u]))return!1}return!0}function md(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function gd(e,n){var o=md(e);e=0;for(var i;o;){if(o.nodeType===3){if(i=e+o.textContent.length,e<=n&&i>=n)return{node:o,offset:n-e};e=i}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=md(o)}}function vd(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?vd(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function yd(){for(var e=window,n=qt();n instanceof e.HTMLIFrameElement;){try{var o=typeof n.contentWindow.location.href=="string"}catch{o=!1}if(o)e=n.contentWindow;else break;n=qt(e.document)}return n}function Ea(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 Zy(e){var n=yd(),o=e.focusedElem,i=e.selectionRange;if(n!==o&&o&&o.ownerDocument&&vd(o.ownerDocument.documentElement,o)){if(i!==null&&Ea(o)){if(n=i.start,e=i.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 u=o.textContent.length,f=Math.min(i.start,u);i=i.end===void 0?f:Math.min(i.end,u),!e.extend&&f>i&&(u=i,i=f,f=u),u=gd(o,f);var x=gd(o,i);u&&x&&(e.rangeCount!==1||e.anchorNode!==u.node||e.anchorOffset!==u.offset||e.focusNode!==x.node||e.focusOffset!==x.offset)&&(n=n.createRange(),n.setStart(u.node,u.offset),e.removeAllRanges(),f>i?(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 Jy=h&&"documentMode"in document&&11>=document.documentMode,fr=null,ka=null,co=null,Na=!1;function xd(e,n,o){var i=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Na||fr==null||fr!==qt(i)||(i=fr,"selectionStart"in i&&Ea(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),co&&uo(co,i)||(co=i,i=ys(ka,"onSelect"),0<i.length&&(n=new ga("onSelect","select",null,n,o),e.push({event:n,listeners:i}),n.target=fr)))}function ms(e,n){var o={};return o[e.toLowerCase()]=n.toLowerCase(),o["Webkit"+e]="webkit"+n,o["Moz"+e]="moz"+n,o}var pr={animationend:ms("Animation","AnimationEnd"),animationiteration:ms("Animation","AnimationIteration"),animationstart:ms("Animation","AnimationStart"),transitionend:ms("Transition","TransitionEnd")},Ra={},wd={};h&&(wd=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 gs(e){if(Ra[e])return Ra[e];if(!pr[e])return e;var n=pr[e],o;for(o in n)if(n.hasOwnProperty(o)&&o in wd)return Ra[e]=n[o];return e}var bd=gs("animationend"),Sd=gs("animationiteration"),Cd=gs("animationstart"),Ed=gs("transitionend"),kd=new Map,Nd="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function hn(e,n){kd.set(e,n),d(n,[e])}for(var Pa=0;Pa<Nd.length;Pa++){var ja=Nd[Pa],ex=ja.toLowerCase(),tx=ja[0].toUpperCase()+ja.slice(1);hn(ex,"on"+tx)}hn(bd,"onAnimationEnd"),hn(Sd,"onAnimationIteration"),hn(Cd,"onAnimationStart"),hn("dblclick","onDoubleClick"),hn("focusin","onFocus"),hn("focusout","onBlur"),hn(Ed,"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 fo="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(" "),nx=new Set("cancel close invalid load scroll toggle".split(" ").concat(fo));function Rd(e,n,o){var i=e.type||"unknown-event";e.currentTarget=o,ey(i,n,void 0,e),e.currentTarget=null}function Pd(e,n){n=(n&4)!==0;for(var o=0;o<e.length;o++){var i=e[o],u=i.event;i=i.listeners;e:{var f=void 0;if(n)for(var x=i.length-1;0<=x;x--){var E=i[x],R=E.instance,$=E.currentTarget;if(E=E.listener,R!==f&&u.isPropagationStopped())break e;Rd(u,E,$),f=R}else for(x=0;x<i.length;x++){if(E=i[x],R=E.instance,$=E.currentTarget,E=E.listener,R!==f&&u.isPropagationStopped())break e;Rd(u,E,$),f=R}}}if(es)throw e=ia,es=!1,ia=null,e}function Pe(e,n){var o=n[La];o===void 0&&(o=n[La]=new Set);var i=e+"__bubble";o.has(i)||(jd(n,e,2,!1),o.add(i))}function Ta(e,n,o){var i=0;n&&(i|=4),jd(o,e,i,n)}var vs="_reactListening"+Math.random().toString(36).slice(2);function po(e){if(!e[vs]){e[vs]=!0,a.forEach(function(o){o!=="selectionchange"&&(nx.has(o)||Ta(o,!1,e),Ta(o,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[vs]||(n[vs]=!0,Ta("selectionchange",!1,n))}}function jd(e,n,o,i){switch(Zc(n)){case 1:var u=gy;break;case 4:u=vy;break;default:u=pa}o=u.bind(null,n,o,e),u=void 0,!sa||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(u=!0),i?u!==void 0?e.addEventListener(n,o,{capture:!0,passive:u}):e.addEventListener(n,o,!0):u!==void 0?e.addEventListener(n,o,{passive:u}):e.addEventListener(n,o,!1)}function _a(e,n,o,i,u){var f=i;if((n&1)===0&&(n&2)===0&&i!==null)e:for(;;){if(i===null)return;var x=i.tag;if(x===3||x===4){var E=i.stateNode.containerInfo;if(E===u||E.nodeType===8&&E.parentNode===u)break;if(x===4)for(x=i.return;x!==null;){var R=x.tag;if((R===3||R===4)&&(R=x.stateNode.containerInfo,R===u||R.nodeType===8&&R.parentNode===u))return;x=x.return}for(;E!==null;){if(x=zn(E),x===null)return;if(R=x.tag,R===5||R===6){i=f=x;continue e}E=E.parentNode}}i=i.return}Mc(function(){var $=f,W=na(o),K=[];e:{var B=kd.get(e);if(B!==void 0){var X=ga,J=e;switch(e){case"keypress":if(ds(o)===0)break e;case"keydown":case"keyup":X=Oy;break;case"focusin":J="focus",X=xa;break;case"focusout":J="blur",X=xa;break;case"beforeblur":case"afterblur":X=xa;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":X=td;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":X=wy;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":X=Iy;break;case bd:case Sd:case Cd:X=Cy;break;case Ed:X=Ly;break;case"scroll":X=yy;break;case"wheel":X=$y;break;case"copy":case"cut":case"paste":X=ky;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":X=rd}var re=(n&4)!==0,De=!re&&e==="scroll",M=re?B!==null?B+"Capture":null:B;re=[];for(var j=$,D;j!==null;){D=j;var Q=D.stateNode;if(D.tag===5&&Q!==null&&(D=Q,M!==null&&(Q=Gr(j,M),Q!=null&&re.push(ho(j,Q,D)))),De)break;j=j.return}0<re.length&&(B=new X(B,J,null,o,W),K.push({event:B,listeners:re}))}}if((n&7)===0){e:{if(B=e==="mouseover"||e==="pointerover",X=e==="mouseout"||e==="pointerout",B&&o!==ta&&(J=o.relatedTarget||o.fromElement)&&(zn(J)||J[Yt]))break e;if((X||B)&&(B=W.window===W?W:(B=W.ownerDocument)?B.defaultView||B.parentWindow:window,X?(J=o.relatedTarget||o.toElement,X=$,J=J?zn(J):null,J!==null&&(De=$n(J),J!==De||J.tag!==5&&J.tag!==6)&&(J=null)):(X=null,J=$),X!==J)){if(re=td,Q="onMouseLeave",M="onMouseEnter",j="mouse",(e==="pointerout"||e==="pointerover")&&(re=rd,Q="onPointerLeave",M="onPointerEnter",j="pointer"),De=X==null?B:gr(X),D=J==null?B:gr(J),B=new re(Q,j+"leave",X,o,W),B.target=De,B.relatedTarget=D,Q=null,zn(W)===$&&(re=new re(M,j+"enter",J,o,W),re.target=D,re.relatedTarget=De,Q=re),De=Q,X&&J)t:{for(re=X,M=J,j=0,D=re;D;D=hr(D))j++;for(D=0,Q=M;Q;Q=hr(Q))D++;for(;0<j-D;)re=hr(re),j--;for(;0<D-j;)M=hr(M),D--;for(;j--;){if(re===M||M!==null&&re===M.alternate)break t;re=hr(re),M=hr(M)}re=null}else re=null;X!==null&&Td(K,B,X,re,!1),J!==null&&De!==null&&Td(K,De,J,re,!0)}}e:{if(B=$?gr($):window,X=B.nodeName&&B.nodeName.toLowerCase(),X==="select"||X==="input"&&B.type==="file")var oe=Vy;else if(ud(B))if(dd)oe=Yy;else{oe=Gy;var le=Qy}else(X=B.nodeName)&&X.toLowerCase()==="input"&&(B.type==="checkbox"||B.type==="radio")&&(oe=qy);if(oe&&(oe=oe(e,$))){cd(K,oe,o,W);break e}le&&le(e,B,$),e==="focusout"&&(le=B._wrapperState)&&le.controlled&&B.type==="number"&&Yi(B,"number",B.value)}switch(le=$?gr($):window,e){case"focusin":(ud(le)||le.contentEditable==="true")&&(fr=le,ka=$,co=null);break;case"focusout":co=ka=fr=null;break;case"mousedown":Na=!0;break;case"contextmenu":case"mouseup":case"dragend":Na=!1,xd(K,o,W);break;case"selectionchange":if(Jy)break;case"keydown":case"keyup":xd(K,o,W)}var ue;if(ba)e:{switch(e){case"compositionstart":var fe="onCompositionStart";break e;case"compositionend":fe="onCompositionEnd";break e;case"compositionupdate":fe="onCompositionUpdate";break e}fe=void 0}else dr?ad(e,o)&&(fe="onCompositionEnd"):e==="keydown"&&o.keyCode===229&&(fe="onCompositionStart");fe&&(od&&o.locale!=="ko"&&(dr||fe!=="onCompositionStart"?fe==="onCompositionEnd"&&dr&&(ue=Jc()):(pn=W,ma="value"in pn?pn.value:pn.textContent,dr=!0)),le=ys($,fe),0<le.length&&(fe=new nd(fe,e,null,o,W),K.push({event:fe,listeners:le}),ue?fe.data=ue:(ue=ld(o),ue!==null&&(fe.data=ue)))),(ue=Uy?Hy(e,o):By(e,o))&&($=ys($,"onBeforeInput"),0<$.length&&(W=new nd("onBeforeInput","beforeinput",null,o,W),K.push({event:W,listeners:$}),W.data=ue))}Pd(K,n)})}function ho(e,n,o){return{instance:e,listener:n,currentTarget:o}}function ys(e,n){for(var o=n+"Capture",i=[];e!==null;){var u=e,f=u.stateNode;u.tag===5&&f!==null&&(u=f,f=Gr(e,o),f!=null&&i.unshift(ho(e,f,u)),f=Gr(e,n),f!=null&&i.push(ho(e,f,u))),e=e.return}return i}function hr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Td(e,n,o,i,u){for(var f=n._reactName,x=[];o!==null&&o!==i;){var E=o,R=E.alternate,$=E.stateNode;if(R!==null&&R===i)break;E.tag===5&&$!==null&&(E=$,u?(R=Gr(o,f),R!=null&&x.unshift(ho(o,R,E))):u||(R=Gr(o,f),R!=null&&x.push(ho(o,R,E)))),o=o.return}x.length!==0&&e.push({event:n,listeners:x})}var rx=/\r\n?/g,ox=/\u0000|\uFFFD/g;function _d(e){return(typeof e=="string"?e:""+e).replace(rx,`
6
+ `).replace(ox,"")}function xs(e,n,o){if(n=_d(n),_d(e)!==n&&o)throw Error(s(425))}function ws(){}var Oa=null,Aa=null;function Ma(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 Ia=typeof setTimeout=="function"?setTimeout:void 0,sx=typeof clearTimeout=="function"?clearTimeout:void 0,Od=typeof Promise=="function"?Promise:void 0,ix=typeof queueMicrotask=="function"?queueMicrotask:typeof Od<"u"?function(e){return Od.resolve(null).then(e).catch(ax)}:Ia;function ax(e){setTimeout(function(){throw e})}function Da(e,n){var o=n,i=0;do{var u=o.nextSibling;if(e.removeChild(o),u&&u.nodeType===8)if(o=u.data,o==="/$"){if(i===0){e.removeChild(u),ro(n);return}i--}else o!=="$"&&o!=="$?"&&o!=="$!"||i++;o=u}while(o);ro(n)}function mn(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 Ad(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),Ft="__reactFiber$"+mr,mo="__reactProps$"+mr,Yt="__reactContainer$"+mr,La="__reactEvents$"+mr,lx="__reactListeners$"+mr,ux="__reactHandles$"+mr;function zn(e){var n=e[Ft];if(n)return n;for(var o=e.parentNode;o;){if(n=o[Yt]||o[Ft]){if(o=n.alternate,n.child!==null||o!==null&&o.child!==null)for(e=Ad(e);e!==null;){if(o=e[Ft])return o;e=Ad(e)}return n}e=o,o=e.parentNode}return null}function go(e){return e=e[Ft]||e[Yt],!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 bs(e){return e[mo]||null}var Fa=[],vr=-1;function gn(e){return{current:e}}function je(e){0>vr||(e.current=Fa[vr],Fa[vr]=null,vr--)}function Ne(e,n){vr++,Fa[vr]=e.current,e.current=n}var vn={},Ge=gn(vn),ot=gn(!1),Un=vn;function yr(e,n){var o=e.type.contextTypes;if(!o)return vn;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===n)return i.__reactInternalMemoizedMaskedChildContext;var u={},f;for(f in o)u[f]=n[f];return i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=u),u}function st(e){return e=e.childContextTypes,e!=null}function Ss(){je(ot),je(Ge)}function Md(e,n,o){if(Ge.current!==vn)throw Error(s(168));Ne(Ge,n),Ne(ot,o)}function Id(e,n,o){var i=e.stateNode;if(n=n.childContextTypes,typeof i.getChildContext!="function")return o;i=i.getChildContext();for(var u in i)if(!(u in n))throw Error(s(108,he(e)||"Unknown",u));return V({},o,i)}function Cs(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||vn,Un=Ge.current,Ne(Ge,e),Ne(ot,ot.current),!0}function Dd(e,n,o){var i=e.stateNode;if(!i)throw Error(s(169));o?(e=Id(e,n,Un),i.__reactInternalMemoizedMergedChildContext=e,je(ot),je(Ge),Ne(Ge,e)):je(ot),Ne(ot,o)}var Xt=null,Es=!1,$a=!1;function Ld(e){Xt===null?Xt=[e]:Xt.push(e)}function cx(e){Es=!0,Ld(e)}function yn(){if(!$a&&Xt!==null){$a=!0;var e=0,n=Ee;try{var o=Xt;for(Ee=1;e<o.length;e++){var i=o[e];do i=i(!0);while(i!==null)}Xt=null,Es=!1}catch(u){throw Xt!==null&&(Xt=Xt.slice(e+1)),$c(aa,yn),u}finally{Ee=n,$a=!1}}return null}var xr=[],wr=0,ks=null,Ns=0,xt=[],wt=0,Hn=null,Zt=1,Jt="";function Bn(e,n){xr[wr++]=Ns,xr[wr++]=ks,ks=e,Ns=n}function Fd(e,n,o){xt[wt++]=Zt,xt[wt++]=Jt,xt[wt++]=Hn,Hn=e;var i=Zt;e=Jt;var u=32-Rt(i)-1;i&=~(1<<u),o+=1;var f=32-Rt(n)+u;if(30<f){var x=u-u%5;f=(i&(1<<x)-1).toString(32),i>>=x,u-=x,Zt=1<<32-Rt(n)+u|o<<u|i,Jt=f+e}else Zt=1<<f|o<<u|i,Jt=e}function za(e){e.return!==null&&(Bn(e,1),Fd(e,1,0))}function Ua(e){for(;e===ks;)ks=xr[--wr],xr[wr]=null,Ns=xr[--wr],xr[wr]=null;for(;e===Hn;)Hn=xt[--wt],xt[wt]=null,Jt=xt[--wt],xt[wt]=null,Zt=xt[--wt],xt[wt]=null}var pt=null,ht=null,_e=!1,jt=null;function $d(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 zd(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=mn(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:Zt,overflow:Jt}: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 Ha(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Ba(e){if(_e){var n=ht;if(n){var o=n;if(!zd(e,n)){if(Ha(e))throw Error(s(418));n=mn(o.nextSibling);var i=pt;n&&zd(e,n)?$d(i,o):(e.flags=e.flags&-4097|2,_e=!1,pt=e)}}else{if(Ha(e))throw Error(s(418));e.flags=e.flags&-4097|2,_e=!1,pt=e}}}function Ud(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;pt=e}function Rs(e){if(e!==pt)return!1;if(!_e)return Ud(e),_e=!0,!1;var n;if((n=e.tag!==3)&&!(n=e.tag!==5)&&(n=e.type,n=n!=="head"&&n!=="body"&&!Ma(e.type,e.memoizedProps)),n&&(n=ht)){if(Ha(e))throw Hd(),Error(s(418));for(;n;)$d(e,n),n=mn(n.nextSibling)}if(Ud(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=mn(e.nextSibling);break e}n--}else o!=="$"&&o!=="$!"&&o!=="$?"||n++}e=e.nextSibling}ht=null}}else ht=pt?mn(e.stateNode.nextSibling):null;return!0}function Hd(){for(var e=ht;e;)e=mn(e.nextSibling)}function br(){ht=pt=null,_e=!1}function Wa(e){jt===null?jt=[e]:jt.push(e)}var dx=I.ReactCurrentBatchConfig;function vo(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 i=o.stateNode}if(!i)throw Error(s(147,e));var u=i,f=""+e;return n!==null&&n.ref!==null&&typeof n.ref=="function"&&n.ref._stringRef===f?n.ref:(n=function(x){var E=u.refs;x===null?delete E[f]:E[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 Ps(e,n){throw e=Object.prototype.toString.call(n),Error(s(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e))}function Bd(e){var n=e._init;return n(e._payload)}function Wd(e){function n(M,j){if(e){var D=M.deletions;D===null?(M.deletions=[j],M.flags|=16):D.push(j)}}function o(M,j){if(!e)return null;for(;j!==null;)n(M,j),j=j.sibling;return null}function i(M,j){for(M=new Map;j!==null;)j.key!==null?M.set(j.key,j):M.set(j.index,j),j=j.sibling;return M}function u(M,j){return M=Nn(M,j),M.index=0,M.sibling=null,M}function f(M,j,D){return M.index=D,e?(D=M.alternate,D!==null?(D=D.index,D<j?(M.flags|=2,j):D):(M.flags|=2,j)):(M.flags|=1048576,j)}function x(M){return e&&M.alternate===null&&(M.flags|=2),M}function E(M,j,D,Q){return j===null||j.tag!==6?(j=Il(D,M.mode,Q),j.return=M,j):(j=u(j,D),j.return=M,j)}function R(M,j,D,Q){var oe=D.type;return oe===U?W(M,j,D.props.children,Q,D.key):j!==null&&(j.elementType===oe||typeof oe=="object"&&oe!==null&&oe.$$typeof===ee&&Bd(oe)===j.type)?(Q=u(j,D.props),Q.ref=vo(M,j,D),Q.return=M,Q):(Q=Zs(D.type,D.key,D.props,null,M.mode,Q),Q.ref=vo(M,j,D),Q.return=M,Q)}function $(M,j,D,Q){return j===null||j.tag!==4||j.stateNode.containerInfo!==D.containerInfo||j.stateNode.implementation!==D.implementation?(j=Dl(D,M.mode,Q),j.return=M,j):(j=u(j,D.children||[]),j.return=M,j)}function W(M,j,D,Q,oe){return j===null||j.tag!==7?(j=Xn(D,M.mode,Q,oe),j.return=M,j):(j=u(j,D),j.return=M,j)}function K(M,j,D){if(typeof j=="string"&&j!==""||typeof j=="number")return j=Il(""+j,M.mode,D),j.return=M,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case F:return D=Zs(j.type,j.key,j.props,null,M.mode,D),D.ref=vo(M,null,j),D.return=M,D;case L:return j=Dl(j,M.mode,D),j.return=M,j;case ee:var Q=j._init;return K(M,Q(j._payload),D)}if(Kr(j)||z(j))return j=Xn(j,M.mode,D,null),j.return=M,j;Ps(M,j)}return null}function B(M,j,D,Q){var oe=j!==null?j.key:null;if(typeof D=="string"&&D!==""||typeof D=="number")return oe!==null?null:E(M,j,""+D,Q);if(typeof D=="object"&&D!==null){switch(D.$$typeof){case F:return D.key===oe?R(M,j,D,Q):null;case L:return D.key===oe?$(M,j,D,Q):null;case ee:return oe=D._init,B(M,j,oe(D._payload),Q)}if(Kr(D)||z(D))return oe!==null?null:W(M,j,D,Q,null);Ps(M,D)}return null}function X(M,j,D,Q,oe){if(typeof Q=="string"&&Q!==""||typeof Q=="number")return M=M.get(D)||null,E(j,M,""+Q,oe);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case F:return M=M.get(Q.key===null?D:Q.key)||null,R(j,M,Q,oe);case L:return M=M.get(Q.key===null?D:Q.key)||null,$(j,M,Q,oe);case ee:var le=Q._init;return X(M,j,D,le(Q._payload),oe)}if(Kr(Q)||z(Q))return M=M.get(D)||null,W(j,M,Q,oe,null);Ps(j,Q)}return null}function J(M,j,D,Q){for(var oe=null,le=null,ue=j,fe=j=0,Ke=null;ue!==null&&fe<D.length;fe++){ue.index>fe?(Ke=ue,ue=null):Ke=ue.sibling;var Ce=B(M,ue,D[fe],Q);if(Ce===null){ue===null&&(ue=Ke);break}e&&ue&&Ce.alternate===null&&n(M,ue),j=f(Ce,j,fe),le===null?oe=Ce:le.sibling=Ce,le=Ce,ue=Ke}if(fe===D.length)return o(M,ue),_e&&Bn(M,fe),oe;if(ue===null){for(;fe<D.length;fe++)ue=K(M,D[fe],Q),ue!==null&&(j=f(ue,j,fe),le===null?oe=ue:le.sibling=ue,le=ue);return _e&&Bn(M,fe),oe}for(ue=i(M,ue);fe<D.length;fe++)Ke=X(ue,M,fe,D[fe],Q),Ke!==null&&(e&&Ke.alternate!==null&&ue.delete(Ke.key===null?fe:Ke.key),j=f(Ke,j,fe),le===null?oe=Ke:le.sibling=Ke,le=Ke);return e&&ue.forEach(function(Rn){return n(M,Rn)}),_e&&Bn(M,fe),oe}function re(M,j,D,Q){var oe=z(D);if(typeof oe!="function")throw Error(s(150));if(D=oe.call(D),D==null)throw Error(s(151));for(var le=oe=null,ue=j,fe=j=0,Ke=null,Ce=D.next();ue!==null&&!Ce.done;fe++,Ce=D.next()){ue.index>fe?(Ke=ue,ue=null):Ke=ue.sibling;var Rn=B(M,ue,Ce.value,Q);if(Rn===null){ue===null&&(ue=Ke);break}e&&ue&&Rn.alternate===null&&n(M,ue),j=f(Rn,j,fe),le===null?oe=Rn:le.sibling=Rn,le=Rn,ue=Ke}if(Ce.done)return o(M,ue),_e&&Bn(M,fe),oe;if(ue===null){for(;!Ce.done;fe++,Ce=D.next())Ce=K(M,Ce.value,Q),Ce!==null&&(j=f(Ce,j,fe),le===null?oe=Ce:le.sibling=Ce,le=Ce);return _e&&Bn(M,fe),oe}for(ue=i(M,ue);!Ce.done;fe++,Ce=D.next())Ce=X(ue,M,fe,Ce.value,Q),Ce!==null&&(e&&Ce.alternate!==null&&ue.delete(Ce.key===null?fe:Ce.key),j=f(Ce,j,fe),le===null?oe=Ce:le.sibling=Ce,le=Ce);return e&&ue.forEach(function(Wx){return n(M,Wx)}),_e&&Bn(M,fe),oe}function De(M,j,D,Q){if(typeof D=="object"&&D!==null&&D.type===U&&D.key===null&&(D=D.props.children),typeof D=="object"&&D!==null){switch(D.$$typeof){case F:e:{for(var oe=D.key,le=j;le!==null;){if(le.key===oe){if(oe=D.type,oe===U){if(le.tag===7){o(M,le.sibling),j=u(le,D.props.children),j.return=M,M=j;break e}}else if(le.elementType===oe||typeof oe=="object"&&oe!==null&&oe.$$typeof===ee&&Bd(oe)===le.type){o(M,le.sibling),j=u(le,D.props),j.ref=vo(M,le,D),j.return=M,M=j;break e}o(M,le);break}else n(M,le);le=le.sibling}D.type===U?(j=Xn(D.props.children,M.mode,Q,D.key),j.return=M,M=j):(Q=Zs(D.type,D.key,D.props,null,M.mode,Q),Q.ref=vo(M,j,D),Q.return=M,M=Q)}return x(M);case L:e:{for(le=D.key;j!==null;){if(j.key===le)if(j.tag===4&&j.stateNode.containerInfo===D.containerInfo&&j.stateNode.implementation===D.implementation){o(M,j.sibling),j=u(j,D.children||[]),j.return=M,M=j;break e}else{o(M,j);break}else n(M,j);j=j.sibling}j=Dl(D,M.mode,Q),j.return=M,M=j}return x(M);case ee:return le=D._init,De(M,j,le(D._payload),Q)}if(Kr(D))return J(M,j,D,Q);if(z(D))return re(M,j,D,Q);Ps(M,D)}return typeof D=="string"&&D!==""||typeof D=="number"?(D=""+D,j!==null&&j.tag===6?(o(M,j.sibling),j=u(j,D),j.return=M,M=j):(o(M,j),j=Il(D,M.mode,Q),j.return=M,M=j),x(M)):o(M,j)}return De}var Sr=Wd(!0),Kd=Wd(!1),js=gn(null),Ts=null,Cr=null,Ka=null;function Va(){Ka=Cr=Ts=null}function Qa(e){var n=js.current;je(js),e._currentValue=n}function Ga(e,n,o){for(;e!==null;){var i=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,i!==null&&(i.childLanes|=n)):i!==null&&(i.childLanes&n)!==n&&(i.childLanes|=n),e===o)break;e=e.return}}function Er(e,n){Ts=e,Ka=Cr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&n)!==0&&(it=!0),e.firstContext=null)}function bt(e){var n=e._currentValue;if(Ka!==e)if(e={context:e,memoizedValue:n,next:null},Cr===null){if(Ts===null)throw Error(s(308));Cr=e,Ts.dependencies={lanes:0,firstContext:e}}else Cr=Cr.next=e;return n}var Wn=null;function qa(e){Wn===null?Wn=[e]:Wn.push(e)}function Vd(e,n,o,i){var u=n.interleaved;return u===null?(o.next=o,qa(n)):(o.next=u.next,u.next=o),n.interleaved=o,en(e,i)}function en(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 xn=!1;function Ya(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Qd(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 tn(e,n){return{eventTime:e,lane:n,tag:0,payload:null,callback:null,next:null}}function wn(e,n,o){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(Se&2)!==0){var u=i.pending;return u===null?n.next=n:(n.next=u.next,u.next=n),i.pending=n,en(e,o)}return u=i.interleaved,u===null?(n.next=n,qa(i)):(n.next=u.next,u.next=n),i.interleaved=n,en(e,o)}function _s(e,n,o){if(n=n.updateQueue,n!==null&&(n=n.shared,(o&4194240)!==0)){var i=n.lanes;i&=e.pendingLanes,o|=i,n.lanes=o,ca(e,o)}}function Gd(e,n){var o=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,o===i)){var u=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?u=f=x:f=f.next=x,o=o.next}while(o!==null);f===null?u=f=n:f=f.next=n}else u=f=n;o={baseState:i.baseState,firstBaseUpdate:u,lastBaseUpdate:f,shared:i.shared,effects:i.effects},e.updateQueue=o;return}e=o.lastBaseUpdate,e===null?o.firstBaseUpdate=n:e.next=n,o.lastBaseUpdate=n}function Os(e,n,o,i){var u=e.updateQueue;xn=!1;var f=u.firstBaseUpdate,x=u.lastBaseUpdate,E=u.shared.pending;if(E!==null){u.shared.pending=null;var R=E,$=R.next;R.next=null,x===null?f=$:x.next=$,x=R;var W=e.alternate;W!==null&&(W=W.updateQueue,E=W.lastBaseUpdate,E!==x&&(E===null?W.firstBaseUpdate=$:E.next=$,W.lastBaseUpdate=R))}if(f!==null){var K=u.baseState;x=0,W=$=R=null,E=f;do{var B=E.lane,X=E.eventTime;if((i&B)===B){W!==null&&(W=W.next={eventTime:X,lane:0,tag:E.tag,payload:E.payload,callback:E.callback,next:null});e:{var J=e,re=E;switch(B=n,X=o,re.tag){case 1:if(J=re.payload,typeof J=="function"){K=J.call(X,K,B);break e}K=J;break e;case 3:J.flags=J.flags&-65537|128;case 0:if(J=re.payload,B=typeof J=="function"?J.call(X,K,B):J,B==null)break e;K=V({},K,B);break e;case 2:xn=!0}}E.callback!==null&&E.lane!==0&&(e.flags|=64,B=u.effects,B===null?u.effects=[E]:B.push(E))}else X={eventTime:X,lane:B,tag:E.tag,payload:E.payload,callback:E.callback,next:null},W===null?($=W=X,R=K):W=W.next=X,x|=B;if(E=E.next,E===null){if(E=u.shared.pending,E===null)break;B=E,E=B.next,B.next=null,u.lastBaseUpdate=B,u.shared.pending=null}}while(!0);if(W===null&&(R=K),u.baseState=R,u.firstBaseUpdate=$,u.lastBaseUpdate=W,n=u.shared.interleaved,n!==null){u=n;do x|=u.lane,u=u.next;while(u!==n)}else f===null&&(u.shared.lanes=0);Qn|=x,e.lanes=x,e.memoizedState=K}}function qd(e,n,o){if(e=n.effects,n.effects=null,e!==null)for(n=0;n<e.length;n++){var i=e[n],u=i.callback;if(u!==null){if(i.callback=null,i=o,typeof u!="function")throw Error(s(191,u));u.call(i)}}}var yo={},$t=gn(yo),xo=gn(yo),wo=gn(yo);function Kn(e){if(e===yo)throw Error(s(174));return e}function Xa(e,n){switch(Ne(wo,n),Ne(xo,e),Ne($t,yo),e=n.nodeType,e){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:Zi(null,"");break;default:e=e===8?n.parentNode:n,n=e.namespaceURI||null,e=e.tagName,n=Zi(n,e)}je($t),Ne($t,n)}function kr(){je($t),je(xo),je(wo)}function Yd(e){Kn(wo.current);var n=Kn($t.current),o=Zi(n,e.type);n!==o&&(Ne(xo,e),Ne($t,o))}function Za(e){xo.current===e&&(je($t),je(xo))}var Oe=gn(0);function As(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 Ja=[];function el(){for(var e=0;e<Ja.length;e++)Ja[e]._workInProgressVersionPrimary=null;Ja.length=0}var Ms=I.ReactCurrentDispatcher,tl=I.ReactCurrentBatchConfig,Vn=0,Ae=null,$e=null,Be=null,Is=!1,bo=!1,So=0,fx=0;function qe(){throw Error(s(321))}function nl(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 rl(e,n,o,i,u,f){if(Vn=f,Ae=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,Ms.current=e===null||e.memoizedState===null?gx:vx,e=o(i,u),bo){f=0;do{if(bo=!1,So=0,25<=f)throw Error(s(301));f+=1,Be=$e=null,n.updateQueue=null,Ms.current=yx,e=o(i,u)}while(bo)}if(Ms.current=Fs,n=$e!==null&&$e.next!==null,Vn=0,Be=$e=Ae=null,Is=!1,n)throw Error(s(300));return e}function ol(){var e=So!==0;return So=0,e}function zt(){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 St(){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 Co(e,n){return typeof n=="function"?n(e):n}function sl(e){var n=St(),o=n.queue;if(o===null)throw Error(s(311));o.lastRenderedReducer=e;var i=$e,u=i.baseQueue,f=o.pending;if(f!==null){if(u!==null){var x=u.next;u.next=f.next,f.next=x}i.baseQueue=u=f,o.pending=null}if(u!==null){f=u.next,i=i.baseState;var E=x=null,R=null,$=f;do{var W=$.lane;if((Vn&W)===W)R!==null&&(R=R.next={lane:0,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null}),i=$.hasEagerState?$.eagerState:e(i,$.action);else{var K={lane:W,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null};R===null?(E=R=K,x=i):R=R.next=K,Ae.lanes|=W,Qn|=W}$=$.next}while($!==null&&$!==f);R===null?x=i:R.next=E,Pt(i,n.memoizedState)||(it=!0),n.memoizedState=i,n.baseState=x,n.baseQueue=R,o.lastRenderedState=i}if(e=o.interleaved,e!==null){u=e;do f=u.lane,Ae.lanes|=f,Qn|=f,u=u.next;while(u!==e)}else u===null&&(o.lanes=0);return[n.memoizedState,o.dispatch]}function il(e){var n=St(),o=n.queue;if(o===null)throw Error(s(311));o.lastRenderedReducer=e;var i=o.dispatch,u=o.pending,f=n.memoizedState;if(u!==null){o.pending=null;var x=u=u.next;do f=e(f,x.action),x=x.next;while(x!==u);Pt(f,n.memoizedState)||(it=!0),n.memoizedState=f,n.baseQueue===null&&(n.baseState=f),o.lastRenderedState=f}return[f,i]}function Xd(){}function Zd(e,n){var o=Ae,i=St(),u=n(),f=!Pt(i.memoizedState,u);if(f&&(i.memoizedState=u,it=!0),i=i.queue,al(tf.bind(null,o,i,e),[e]),i.getSnapshot!==n||f||Be!==null&&Be.memoizedState.tag&1){if(o.flags|=2048,Eo(9,ef.bind(null,o,i,u,n),void 0,null),We===null)throw Error(s(349));(Vn&30)!==0||Jd(o,n,u)}return u}function Jd(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 ef(e,n,o,i){n.value=o,n.getSnapshot=i,nf(n)&&rf(e)}function tf(e,n,o){return o(function(){nf(n)&&rf(e)})}function nf(e){var n=e.getSnapshot;e=e.value;try{var o=n();return!Pt(e,o)}catch{return!0}}function rf(e){var n=en(e,1);n!==null&&At(n,e,1,-1)}function of(e){var n=zt();return typeof e=="function"&&(e=e()),n.memoizedState=n.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Co,lastRenderedState:e},n.queue=e,e=e.dispatch=mx.bind(null,Ae,e),[n.memoizedState,e]}function Eo(e,n,o,i){return e={tag:e,create:n,destroy:o,deps:i,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:(i=o.next,o.next=e,e.next=i,n.lastEffect=e)),e}function sf(){return St().memoizedState}function Ds(e,n,o,i){var u=zt();Ae.flags|=e,u.memoizedState=Eo(1|n,o,void 0,i===void 0?null:i)}function Ls(e,n,o,i){var u=St();i=i===void 0?null:i;var f=void 0;if($e!==null){var x=$e.memoizedState;if(f=x.destroy,i!==null&&nl(i,x.deps)){u.memoizedState=Eo(n,o,f,i);return}}Ae.flags|=e,u.memoizedState=Eo(1|n,o,f,i)}function af(e,n){return Ds(8390656,8,e,n)}function al(e,n){return Ls(2048,8,e,n)}function lf(e,n){return Ls(4,2,e,n)}function uf(e,n){return Ls(4,4,e,n)}function cf(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 df(e,n,o){return o=o!=null?o.concat([e]):null,Ls(4,4,cf.bind(null,n,e),o)}function ll(){}function ff(e,n){var o=St();n=n===void 0?null:n;var i=o.memoizedState;return i!==null&&n!==null&&nl(n,i[1])?i[0]:(o.memoizedState=[e,n],e)}function pf(e,n){var o=St();n=n===void 0?null:n;var i=o.memoizedState;return i!==null&&n!==null&&nl(n,i[1])?i[0]:(e=e(),o.memoizedState=[e,n],e)}function hf(e,n,o){return(Vn&21)===0?(e.baseState&&(e.baseState=!1,it=!0),e.memoizedState=o):(Pt(o,n)||(o=Bc(),Ae.lanes|=o,Qn|=o,e.baseState=!0),n)}function px(e,n){var o=Ee;Ee=o!==0&&4>o?o:4,e(!0);var i=tl.transition;tl.transition={};try{e(!1),n()}finally{Ee=o,tl.transition=i}}function mf(){return St().memoizedState}function hx(e,n,o){var i=En(e);if(o={lane:i,action:o,hasEagerState:!1,eagerState:null,next:null},gf(e))vf(n,o);else if(o=Vd(e,n,o,i),o!==null){var u=et();At(o,e,i,u),yf(o,n,i)}}function mx(e,n,o){var i=En(e),u={lane:i,action:o,hasEagerState:!1,eagerState:null,next:null};if(gf(e))vf(n,u);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=n.lastRenderedReducer,f!==null))try{var x=n.lastRenderedState,E=f(x,o);if(u.hasEagerState=!0,u.eagerState=E,Pt(E,x)){var R=n.interleaved;R===null?(u.next=u,qa(n)):(u.next=R.next,R.next=u),n.interleaved=u;return}}catch{}o=Vd(e,n,u,i),o!==null&&(u=et(),At(o,e,i,u),yf(o,n,i))}}function gf(e){var n=e.alternate;return e===Ae||n!==null&&n===Ae}function vf(e,n){bo=Is=!0;var o=e.pending;o===null?n.next=n:(n.next=o.next,o.next=n),e.pending=n}function yf(e,n,o){if((o&4194240)!==0){var i=n.lanes;i&=e.pendingLanes,o|=i,n.lanes=o,ca(e,o)}}var Fs={readContext:bt,useCallback:qe,useContext:qe,useEffect:qe,useImperativeHandle:qe,useInsertionEffect:qe,useLayoutEffect:qe,useMemo:qe,useReducer:qe,useRef:qe,useState:qe,useDebugValue:qe,useDeferredValue:qe,useTransition:qe,useMutableSource:qe,useSyncExternalStore:qe,useId:qe,unstable_isNewReconciler:!1},gx={readContext:bt,useCallback:function(e,n){return zt().memoizedState=[e,n===void 0?null:n],e},useContext:bt,useEffect:af,useImperativeHandle:function(e,n,o){return o=o!=null?o.concat([e]):null,Ds(4194308,4,cf.bind(null,n,e),o)},useLayoutEffect:function(e,n){return Ds(4194308,4,e,n)},useInsertionEffect:function(e,n){return Ds(4,2,e,n)},useMemo:function(e,n){var o=zt();return n=n===void 0?null:n,e=e(),o.memoizedState=[e,n],e},useReducer:function(e,n,o){var i=zt();return n=o!==void 0?o(n):n,i.memoizedState=i.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},i.queue=e,e=e.dispatch=hx.bind(null,Ae,e),[i.memoizedState,e]},useRef:function(e){var n=zt();return e={current:e},n.memoizedState=e},useState:of,useDebugValue:ll,useDeferredValue:function(e){return zt().memoizedState=e},useTransition:function(){var e=of(!1),n=e[0];return e=px.bind(null,e[1]),zt().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,o){var i=Ae,u=zt();if(_e){if(o===void 0)throw Error(s(407));o=o()}else{if(o=n(),We===null)throw Error(s(349));(Vn&30)!==0||Jd(i,n,o)}u.memoizedState=o;var f={value:o,getSnapshot:n};return u.queue=f,af(tf.bind(null,i,f,e),[e]),i.flags|=2048,Eo(9,ef.bind(null,i,f,o,n),void 0,null),o},useId:function(){var e=zt(),n=We.identifierPrefix;if(_e){var o=Jt,i=Zt;o=(i&~(1<<32-Rt(i)-1)).toString(32)+o,n=":"+n+"R"+o,o=So++,0<o&&(n+="H"+o.toString(32)),n+=":"}else o=fx++,n=":"+n+"r"+o.toString(32)+":";return e.memoizedState=n},unstable_isNewReconciler:!1},vx={readContext:bt,useCallback:ff,useContext:bt,useEffect:al,useImperativeHandle:df,useInsertionEffect:lf,useLayoutEffect:uf,useMemo:pf,useReducer:sl,useRef:sf,useState:function(){return sl(Co)},useDebugValue:ll,useDeferredValue:function(e){var n=St();return hf(n,$e.memoizedState,e)},useTransition:function(){var e=sl(Co)[0],n=St().memoizedState;return[e,n]},useMutableSource:Xd,useSyncExternalStore:Zd,useId:mf,unstable_isNewReconciler:!1},yx={readContext:bt,useCallback:ff,useContext:bt,useEffect:al,useImperativeHandle:df,useInsertionEffect:lf,useLayoutEffect:uf,useMemo:pf,useReducer:il,useRef:sf,useState:function(){return il(Co)},useDebugValue:ll,useDeferredValue:function(e){var n=St();return $e===null?n.memoizedState=e:hf(n,$e.memoizedState,e)},useTransition:function(){var e=il(Co)[0],n=St().memoizedState;return[e,n]},useMutableSource:Xd,useSyncExternalStore:Zd,useId:mf,unstable_isNewReconciler:!1};function Tt(e,n){if(e&&e.defaultProps){n=V({},n),e=e.defaultProps;for(var o in e)n[o]===void 0&&(n[o]=e[o]);return n}return n}function ul(e,n,o,i){n=e.memoizedState,o=o(i,n),o=o==null?n:V({},n,o),e.memoizedState=o,e.lanes===0&&(e.updateQueue.baseState=o)}var $s={isMounted:function(e){return(e=e._reactInternals)?$n(e)===e:!1},enqueueSetState:function(e,n,o){e=e._reactInternals;var i=et(),u=En(e),f=tn(i,u);f.payload=n,o!=null&&(f.callback=o),n=wn(e,f,u),n!==null&&(At(n,e,u,i),_s(n,e,u))},enqueueReplaceState:function(e,n,o){e=e._reactInternals;var i=et(),u=En(e),f=tn(i,u);f.tag=1,f.payload=n,o!=null&&(f.callback=o),n=wn(e,f,u),n!==null&&(At(n,e,u,i),_s(n,e,u))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var o=et(),i=En(e),u=tn(o,i);u.tag=2,n!=null&&(u.callback=n),n=wn(e,u,i),n!==null&&(At(n,e,i,o),_s(n,e,i))}};function xf(e,n,o,i,u,f,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,f,x):n.prototype&&n.prototype.isPureReactComponent?!uo(o,i)||!uo(u,f):!0}function wf(e,n,o){var i=!1,u=vn,f=n.contextType;return typeof f=="object"&&f!==null?f=bt(f):(u=st(n)?Un:Ge.current,i=n.contextTypes,f=(i=i!=null)?yr(e,u):vn),n=new n(o,f),e.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=$s,e.stateNode=n,n._reactInternals=e,i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=u,e.__reactInternalMemoizedMaskedChildContext=f),n}function bf(e,n,o,i){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(o,i),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(o,i),n.state!==e&&$s.enqueueReplaceState(n,n.state,null)}function cl(e,n,o,i){var u=e.stateNode;u.props=o,u.state=e.memoizedState,u.refs={},Ya(e);var f=n.contextType;typeof f=="object"&&f!==null?u.context=bt(f):(f=st(n)?Un:Ge.current,u.context=yr(e,f)),u.state=e.memoizedState,f=n.getDerivedStateFromProps,typeof f=="function"&&(ul(e,n,f,o),u.state=e.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(n=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),n!==u.state&&$s.enqueueReplaceState(u,u.state,null),Os(e,o,u,i),u.state=e.memoizedState),typeof u.componentDidMount=="function"&&(e.flags|=4194308)}function Nr(e,n){try{var o="",i=n;do o+=xe(i),i=i.return;while(i);var u=o}catch(f){u=`
7
7
  Error generating stack: `+f.message+`
8
- `+f.stack}return{value:e,source:n,stack:u,digest:null}}function dl(e,n,o){return{value:e,source:null,stack:o??null,digest:n??null}}function fl(e,n){try{console.error(n.value)}catch(o){setTimeout(function(){throw o})}}var xx=typeof WeakMap=="function"?WeakMap:Map;function bf(e,n,o){o=tn(-1,o),o.tag=3,o.payload={element:null};var i=n.value;return o.callback=function(){Vs||(Vs=!0,Rl=i),fl(e,n)},o}function Sf(e,n,o){o=tn(-1,o),o.tag=3;var i=e.type.getDerivedStateFromError;if(typeof i=="function"){var u=n.value;o.payload=function(){return i(u)},o.callback=function(){fl(e,n)}}var f=e.stateNode;return f!==null&&typeof f.componentDidCatch=="function"&&(o.callback=function(){fl(e,n),typeof i!="function"&&(Sn===null?Sn=new Set([this]):Sn.add(this));var x=n.stack;this.componentDidCatch(n.value,{componentStack:x!==null?x:""})}),o}function Cf(e,n,o){var i=e.pingCache;if(i===null){i=e.pingCache=new xx;var u=new Set;i.set(n,u)}else u=i.get(n),u===void 0&&(u=new Set,i.set(n,u));u.has(o)||(u.add(o),e=Ax.bind(null,e,n,o),n.then(e,e))}function Ef(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 kf(e,n,o,i,u){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=tn(-1,1),n.tag=2,wn(o,n,1))),o.lanes|=1),e):(e.flags|=65536,e.lanes=u,e)}var wx=I.ReactCurrentOwner,it=!1;function Je(e,n,o,i){n.child=e===null?Wd(n,null,o,i):Sr(n,e.child,o,i)}function Nf(e,n,o,i,u){o=o.render;var f=n.ref;return Er(n,u),i=rl(e,n,o,i,f,u),o=ol(),e!==null&&!it?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~u,nn(e,n,u)):(_e&&o&&za(n),n.flags|=1,Je(e,n,i,u),n.child)}function Rf(e,n,o,i,u){if(e===null){var f=o.type;return typeof f=="function"&&!Ml(f)&&f.defaultProps===void 0&&o.compare===null&&o.defaultProps===void 0?(n.tag=15,n.type=f,Pf(e,n,f,i,u)):(e=Zs(o.type,null,i,n,n.mode,u),e.ref=n.ref,e.return=n,n.child=e)}if(f=e.child,(e.lanes&u)===0){var x=f.memoizedProps;if(o=o.compare,o=o!==null?o:uo,o(x,i)&&e.ref===n.ref)return nn(e,n,u)}return n.flags|=1,e=Nn(f,i),e.ref=n.ref,e.return=n,n.child=e}function Pf(e,n,o,i,u){if(e!==null){var f=e.memoizedProps;if(uo(f,i)&&e.ref===n.ref)if(it=!1,n.pendingProps=i=f,(e.lanes&u)!==0)(e.flags&131072)!==0&&(it=!0);else return n.lanes=e.lanes,nn(e,n,u)}return pl(e,n,o,i,u)}function jf(e,n,o){var i=n.pendingProps,u=i.children,f=e!==null?e.memoizedState:null;if(i.mode==="hidden")if((n.mode&1)===0)n.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ne(Pr,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(Pr,mt),mt|=e,null;n.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=f!==null?f.baseLanes:o,Ne(Pr,mt),mt|=i}else f!==null?(i=f.baseLanes|o,n.memoizedState=null):i=o,Ne(Pr,mt),mt|=i;return Je(e,n,u,o),n.child}function Tf(e,n){var o=n.ref;(e===null&&o!==null||e!==null&&e.ref!==o)&&(n.flags|=512,n.flags|=2097152)}function pl(e,n,o,i,u){var f=st(o)?Un:Ge.current;return f=yr(n,f),Er(n,u),o=rl(e,n,o,i,f,u),i=ol(),e!==null&&!it?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~u,nn(e,n,u)):(_e&&i&&za(n),n.flags|=1,Je(e,n,o,u),n.child)}function _f(e,n,o,i,u){if(st(o)){var f=!0;Cs(n)}else f=!1;if(Er(n,u),n.stateNode===null)Us(e,n),xf(n,o,i),cl(n,o,i,u),i=!0;else if(e===null){var x=n.stateNode,E=n.memoizedProps;x.props=E;var R=x.context,$=o.contextType;typeof $=="object"&&$!==null?$=bt($):($=st(o)?Un:Ge.current,$=yr(n,$));var W=o.getDerivedStateFromProps,K=typeof W=="function"||typeof x.getSnapshotBeforeUpdate=="function";K||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(E!==i||R!==$)&&wf(n,x,i,$),xn=!1;var B=n.memoizedState;x.state=B,Os(n,i,x,u),R=n.memoizedState,E!==i||B!==R||ot.current||xn?(typeof W=="function"&&(ul(n,o,W,i),R=n.memoizedState),(E=xn||yf(n,o,E,i,B,R,$))?(K||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=i,n.memoizedState=R),x.props=i,x.state=R,x.context=$,i=E):(typeof x.componentDidMount=="function"&&(n.flags|=4194308),i=!1)}else{x=n.stateNode,Vd(e,n),E=n.memoizedProps,$=n.type===n.elementType?E:Tt(n.type,E),x.props=$,K=n.pendingProps,B=x.context,R=o.contextType,typeof R=="object"&&R!==null?R=bt(R):(R=st(o)?Un:Ge.current,R=yr(n,R));var X=o.getDerivedStateFromProps;(W=typeof X=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(E!==K||B!==R)&&wf(n,x,i,R),xn=!1,B=n.memoizedState,x.state=B,Os(n,i,x,u);var J=n.memoizedState;E!==K||B!==J||ot.current||xn?(typeof X=="function"&&(ul(n,o,X,i),J=n.memoizedState),($=xn||yf(n,o,$,i,B,J,R)||!1)?(W||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(i,J,R),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(i,J,R)),typeof x.componentDidUpdate=="function"&&(n.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof x.componentDidUpdate!="function"||E===e.memoizedProps&&B===e.memoizedState||(n.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||E===e.memoizedProps&&B===e.memoizedState||(n.flags|=1024),n.memoizedProps=i,n.memoizedState=J),x.props=i,x.state=J,x.context=R,i=$):(typeof x.componentDidUpdate!="function"||E===e.memoizedProps&&B===e.memoizedState||(n.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||E===e.memoizedProps&&B===e.memoizedState||(n.flags|=1024),i=!1)}return hl(e,n,o,i,f,u)}function hl(e,n,o,i,u,f){Tf(e,n);var x=(n.flags&128)!==0;if(!i&&!x)return u&&Id(n,o,!1),nn(e,n,f);i=n.stateNode,wx.current=n;var E=x&&typeof o.getDerivedStateFromError!="function"?null:i.render();return n.flags|=1,e!==null&&x?(n.child=Sr(n,e.child,null,f),n.child=Sr(n,null,E,f)):Je(e,n,E,f),n.memoizedState=i.state,u&&Id(n,o,!0),n.child}function Of(e){var n=e.stateNode;n.pendingContext?Ad(e,n.pendingContext,n.pendingContext!==n.context):n.context&&Ad(e,n.context,!1),Xa(e,n.containerInfo)}function Af(e,n,o,i,u){return br(),Wa(u),n.flags|=256,Je(e,n,o,i),n.child}var ml={dehydrated:null,treeContext:null,retryLane:0};function gl(e){return{baseLanes:e,cachePool:null,transitions:null}}function Mf(e,n,o){var i=n.pendingProps,u=Oe.current,f=!1,x=(n.flags&128)!==0,E;if((E=x)||(E=e!==null&&e.memoizedState===null?!1:(u&2)!==0),E?(f=!0,n.flags&=-129):(e===null||e.memoizedState!==null)&&(u|=1),Ne(Oe,u&1),e===null)return Ba(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=i.children,e=i.fallback,f?(i=n.mode,f=n.child,x={mode:"hidden",children:x},(i&1)===0&&f!==null?(f.childLanes=0,f.pendingProps=x):f=Js(x,i,0,null),e=Xn(e,i,o,null),f.return=n,e.return=n,f.sibling=e,n.child=f,n.child.memoizedState=gl(o),n.memoizedState=ml,e):vl(n,x));if(u=e.memoizedState,u!==null&&(E=u.dehydrated,E!==null))return bx(e,n,x,i,E,u,o);if(f){f=i.fallback,x=n.mode,u=e.child,E=u.sibling;var R={mode:"hidden",children:i.children};return(x&1)===0&&n.child!==u?(i=n.child,i.childLanes=0,i.pendingProps=R,n.deletions=null):(i=Nn(u,R),i.subtreeFlags=u.subtreeFlags&14680064),E!==null?f=Nn(E,f):(f=Xn(f,x,o,null),f.flags|=2),f.return=n,i.return=n,i.sibling=f,n.child=i,i=f,f=n.child,x=e.child.memoizedState,x=x===null?gl(o):{baseLanes:x.baseLanes|o,cachePool:null,transitions:x.transitions},f.memoizedState=x,f.childLanes=e.childLanes&~o,n.memoizedState=ml,i}return f=e.child,e=f.sibling,i=Nn(f,{mode:"visible",children:i.children}),(n.mode&1)===0&&(i.lanes=o),i.return=n,i.sibling=null,e!==null&&(o=n.deletions,o===null?(n.deletions=[e],n.flags|=16):o.push(e)),n.child=i,n.memoizedState=null,i}function vl(e,n){return n=Js({mode:"visible",children:n},e.mode,0,null),n.return=e,e.child=n}function zs(e,n,o,i){return i!==null&&Wa(i),Sr(n,e.child,null,o),e=vl(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function bx(e,n,o,i,u,f,x){if(o)return n.flags&256?(n.flags&=-257,i=dl(Error(s(422))),zs(e,n,x,i)):n.memoizedState!==null?(n.child=e.child,n.flags|=128,null):(f=i.fallback,u=n.mode,i=Js({mode:"visible",children:i.children},u,0,null),f=Xn(f,u,x,null),f.flags|=2,i.return=n,f.return=n,i.sibling=f,n.child=i,(n.mode&1)!==0&&Sr(n,e.child,null,x),n.child.memoizedState=gl(x),n.memoizedState=ml,f);if((n.mode&1)===0)return zs(e,n,x,null);if(u.data==="$!"){if(i=u.nextSibling&&u.nextSibling.dataset,i)var E=i.dgst;return i=E,f=Error(s(419)),i=dl(f,i,void 0),zs(e,n,x,i)}if(E=(x&e.childLanes)!==0,it||E){if(i=We,i!==null){switch(x&-x){case 4:u=2;break;case 16:u=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:u=32;break;case 536870912:u=268435456;break;default:u=0}u=(u&(i.suspendedLanes|x))!==0?0:u,u!==0&&u!==f.retryLane&&(f.retryLane=u,en(e,u),At(i,e,u,-1))}return Al(),i=dl(Error(s(421))),zs(e,n,x,i)}return u.data==="$?"?(n.flags|=128,n.child=e.child,n=Mx.bind(null,e),u._reactRetry=n,null):(e=f.treeContext,ht=mn(u.nextSibling),pt=n,_e=!0,jt=null,e!==null&&(xt[wt++]=Zt,xt[wt++]=Jt,xt[wt++]=Hn,Zt=e.id,Jt=e.overflow,Hn=n),n=vl(n,i.children),n.flags|=4096,n)}function If(e,n,o){e.lanes|=n;var i=e.alternate;i!==null&&(i.lanes|=n),Ga(e.return,n,o)}function yl(e,n,o,i,u){var f=e.memoizedState;f===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:i,tail:o,tailMode:u}:(f.isBackwards=n,f.rendering=null,f.renderingStartTime=0,f.last=i,f.tail=o,f.tailMode=u)}function Df(e,n,o){var i=n.pendingProps,u=i.revealOrder,f=i.tail;if(Je(e,n,i.children,o),i=Oe.current,(i&2)!==0)i=i&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&&If(e,o,n);else if(e.tag===19)If(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}i&=1}if(Ne(Oe,i),(n.mode&1)===0)n.memoizedState=null;else switch(u){case"forwards":for(o=n.child,u=null;o!==null;)e=o.alternate,e!==null&&As(e)===null&&(u=o),o=o.sibling;o=u,o===null?(u=n.child,n.child=null):(u=o.sibling,o.sibling=null),yl(n,!1,u,o,f);break;case"backwards":for(o=null,u=n.child,n.child=null;u!==null;){if(e=u.alternate,e!==null&&As(e)===null){n.child=u;break}e=u.sibling,u.sibling=o,o=u,u=e}yl(n,!0,o,null,f);break;case"together":yl(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function Us(e,n){(n.mode&1)===0&&e!==null&&(e.alternate=null,n.alternate=null,n.flags|=2)}function nn(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=Nn(e,e.pendingProps),n.child=o,o.return=n;e.sibling!==null;)e=e.sibling,o=o.sibling=Nn(e,e.pendingProps),o.return=n;o.sibling=null}return n.child}function Sx(e,n,o){switch(n.tag){case 3:Of(n),br();break;case 5:qd(n);break;case 1:st(n.type)&&Cs(n);break;case 4:Xa(n,n.stateNode.containerInfo);break;case 10:var i=n.type._context,u=n.memoizedProps.value;Ne(js,i._currentValue),i._currentValue=u;break;case 13:if(i=n.memoizedState,i!==null)return i.dehydrated!==null?(Ne(Oe,Oe.current&1),n.flags|=128,null):(o&n.child.childLanes)!==0?Mf(e,n,o):(Ne(Oe,Oe.current&1),e=nn(e,n,o),e!==null?e.sibling:null);Ne(Oe,Oe.current&1);break;case 19:if(i=(o&n.childLanes)!==0,(e.flags&128)!==0){if(i)return Df(e,n,o);n.flags|=128}if(u=n.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),Ne(Oe,Oe.current),i)break;return null;case 22:case 23:return n.lanes=0,jf(e,n,o)}return nn(e,n,o)}var Lf,xl,Ff,$f;Lf=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}},xl=function(){},Ff=function(e,n,o,i){var u=e.memoizedProps;if(u!==i){e=n.stateNode,Kn(Ft.current);var f=null;switch(o){case"input":u=Gi(e,u),i=Gi(e,i),f=[];break;case"select":u=V({},u,{value:void 0}),i=V({},i,{value:void 0}),f=[];break;case"textarea":u=Xi(e,u),i=Xi(e,i),f=[];break;default:typeof u.onClick!="function"&&typeof i.onClick=="function"&&(e.onclick=ws)}Ji(o,i);var x;o=null;for($ in u)if(!i.hasOwnProperty($)&&u.hasOwnProperty($)&&u[$]!=null)if($==="style"){var E=u[$];for(x in E)E.hasOwnProperty(x)&&(o||(o={}),o[x]="")}else $!=="dangerouslySetInnerHTML"&&$!=="children"&&$!=="suppressContentEditableWarning"&&$!=="suppressHydrationWarning"&&$!=="autoFocus"&&(l.hasOwnProperty($)?f||(f=[]):(f=f||[]).push($,null));for($ in i){var R=i[$];if(E=u?.[$],i.hasOwnProperty($)&&R!==E&&(R!=null||E!=null))if($==="style")if(E){for(x in E)!E.hasOwnProperty(x)||R&&R.hasOwnProperty(x)||(o||(o={}),o[x]="");for(x in R)R.hasOwnProperty(x)&&E[x]!==R[x]&&(o||(o={}),o[x]=R[x])}else o||(f||(f=[]),f.push($,o)),o=R;else $==="dangerouslySetInnerHTML"?(R=R?R.__html:void 0,E=E?E.__html:void 0,R!=null&&E!==R&&(f=f||[]).push($,R)):$==="children"?typeof R!="string"&&typeof R!="number"||(f=f||[]).push($,""+R):$!=="suppressContentEditableWarning"&&$!=="suppressHydrationWarning"&&(l.hasOwnProperty($)?(R!=null&&$==="onScroll"&&Pe("scroll",e),f||E===R||(f=[])):(f=f||[]).push($,R))}o&&(f=f||[]).push("style",o);var $=f;(n.updateQueue=$)&&(n.flags|=4)}},$f=function(e,n,o,i){o!==i&&(n.flags|=4)};function ko(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 i=null;o!==null;)o.alternate!==null&&(i=o),o=o.sibling;i===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function Ye(e){var n=e.alternate!==null&&e.alternate.child===e.child,o=0,i=0;if(n)for(var u=e.child;u!==null;)o|=u.lanes|u.childLanes,i|=u.subtreeFlags&14680064,i|=u.flags&14680064,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)o|=u.lanes|u.childLanes,i|=u.subtreeFlags,i|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=i,e.childLanes=o,n}function Cx(e,n,o){var i=n.pendingProps;switch(Ua(n),n.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ye(n),null;case 1:return st(n.type)&&Ss(),Ye(n),null;case 3:return i=n.stateNode,kr(),je(ot),je(Ge),el(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Rs(n)?n.flags|=4:e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,jt!==null&&(Tl(jt),jt=null))),xl(e,n),Ye(n),null;case 5:Za(n);var u=Kn(wo.current);if(o=n.type,e!==null&&n.stateNode!=null)Ff(e,n,o,i,u),e.ref!==n.ref&&(n.flags|=512,n.flags|=2097152);else{if(!i){if(n.stateNode===null)throw Error(s(166));return Ye(n),null}if(e=Kn(Ft.current),Rs(n)){i=n.stateNode,o=n.type;var f=n.memoizedProps;switch(i[Lt]=n,i[mo]=f,e=(n.mode&1)!==0,o){case"dialog":Pe("cancel",i),Pe("close",i);break;case"iframe":case"object":case"embed":Pe("load",i);break;case"video":case"audio":for(u=0;u<fo.length;u++)Pe(fo[u],i);break;case"source":Pe("error",i);break;case"img":case"image":case"link":Pe("error",i),Pe("load",i);break;case"details":Pe("toggle",i);break;case"input":yc(i,f),Pe("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!f.multiple},Pe("invalid",i);break;case"textarea":bc(i,f),Pe("invalid",i)}Ji(o,f),u=null;for(var x in f)if(f.hasOwnProperty(x)){var E=f[x];x==="children"?typeof E=="string"?i.textContent!==E&&(f.suppressHydrationWarning!==!0&&xs(i.textContent,E,e),u=["children",E]):typeof E=="number"&&i.textContent!==""+E&&(f.suppressHydrationWarning!==!0&&xs(i.textContent,E,e),u=["children",""+E]):l.hasOwnProperty(x)&&E!=null&&x==="onScroll"&&Pe("scroll",i)}switch(o){case"input":sr(i),wc(i,f,!0);break;case"textarea":sr(i),Cc(i);break;case"select":case"option":break;default:typeof f.onClick=="function"&&(i.onclick=ws)}i=u,n.updateQueue=i,i!==null&&(n.flags|=4)}else{x=u.nodeType===9?u:u.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Ec(o)),e==="http://www.w3.org/1999/xhtml"?o==="script"?(e=x.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof i.is=="string"?e=x.createElement(o,{is:i.is}):(e=x.createElement(o),o==="select"&&(x=e,i.multiple?x.multiple=!0:i.size&&(x.size=i.size))):e=x.createElementNS(e,o),e[Lt]=n,e[mo]=i,Lf(e,n,!1,!1),n.stateNode=e;e:{switch(x=ea(o,i),o){case"dialog":Pe("cancel",e),Pe("close",e),u=i;break;case"iframe":case"object":case"embed":Pe("load",e),u=i;break;case"video":case"audio":for(u=0;u<fo.length;u++)Pe(fo[u],e);u=i;break;case"source":Pe("error",e),u=i;break;case"img":case"image":case"link":Pe("error",e),Pe("load",e),u=i;break;case"details":Pe("toggle",e),u=i;break;case"input":yc(e,i),u=Gi(e,i),Pe("invalid",e);break;case"option":u=i;break;case"select":e._wrapperState={wasMultiple:!!i.multiple},u=V({},i,{value:void 0}),Pe("invalid",e);break;case"textarea":bc(e,i),u=Xi(e,i),Pe("invalid",e);break;default:u=i}Ji(o,u),E=u;for(f in E)if(E.hasOwnProperty(f)){var R=E[f];f==="style"?Rc(e,R):f==="dangerouslySetInnerHTML"?(R=R?R.__html:void 0,R!=null&&kc(e,R)):f==="children"?typeof R=="string"?(o!=="textarea"||R!=="")&&Vr(e,R):typeof R=="number"&&Vr(e,""+R):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(l.hasOwnProperty(f)?R!=null&&f==="onScroll"&&Pe("scroll",e):R!=null&&O(e,f,R,x))}switch(o){case"input":sr(e),wc(e,i,!1);break;case"textarea":sr(e),Cc(e);break;case"option":i.value!=null&&e.setAttribute("value",""+be(i.value));break;case"select":e.multiple=!!i.multiple,f=i.value,f!=null?ir(e,!!i.multiple,f,!1):i.defaultValue!=null&&ir(e,!!i.multiple,i.defaultValue,!0);break;default:typeof u.onClick=="function"&&(e.onclick=ws)}switch(o){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}}i&&(n.flags|=4)}n.ref!==null&&(n.flags|=512,n.flags|=2097152)}return Ye(n),null;case 6:if(e&&n.stateNode!=null)$f(e,n,e.memoizedProps,i);else{if(typeof i!="string"&&n.stateNode===null)throw Error(s(166));if(o=Kn(wo.current),Kn(Ft.current),Rs(n)){if(i=n.stateNode,o=n.memoizedProps,i[Lt]=n,(f=i.nodeValue!==o)&&(e=pt,e!==null))switch(e.tag){case 3:xs(i.nodeValue,o,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&xs(i.nodeValue,o,(e.mode&1)!==0)}f&&(n.flags|=4)}else i=(o.nodeType===9?o:o.ownerDocument).createTextNode(i),i[Lt]=n,n.stateNode=i}return Ye(n),null;case 13:if(je(Oe),i=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(_e&&ht!==null&&(n.mode&1)!==0&&(n.flags&128)===0)Ud(),br(),n.flags|=98560,f=!1;else if(f=Rs(n),i!==null&&i.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[Lt]=n}else br(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Ye(n),f=!1}else jt!==null&&(Tl(jt),jt=null),f=!0;if(!f)return n.flags&65536?n:null}return(n.flags&128)!==0?(n.lanes=o,n):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(n.child.flags|=8192,(n.mode&1)!==0&&(e===null||(Oe.current&1)!==0?ze===0&&(ze=3):Al())),n.updateQueue!==null&&(n.flags|=4),Ye(n),null);case 4:return kr(),xl(e,n),e===null&&po(n.stateNode.containerInfo),Ye(n),null;case 10:return Qa(n.type._context),Ye(n),null;case 17:return st(n.type)&&Ss(),Ye(n),null;case 19:if(je(Oe),f=n.memoizedState,f===null)return Ye(n),null;if(i=(n.flags&128)!==0,x=f.rendering,x===null)if(i)ko(f,!1);else{if(ze!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(x=As(e),x!==null){for(n.flags|=128,ko(f,!1),i=x.updateQueue,i!==null&&(n.updateQueue=i,n.flags|=4),n.subtreeFlags=0,i=o,o=n.child;o!==null;)f=o,e=i,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()>jr&&(n.flags|=128,i=!0,ko(f,!1),n.lanes=4194304)}else{if(!i)if(e=As(x),e!==null){if(n.flags|=128,i=!0,o=e.updateQueue,o!==null&&(n.updateQueue=o,n.flags|=4),ko(f,!0),f.tail===null&&f.tailMode==="hidden"&&!x.alternate&&!_e)return Ye(n),null}else 2*Ie()-f.renderingStartTime>jr&&o!==1073741824&&(n.flags|=128,i=!0,ko(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,i?o&1|2:o&1),n):(Ye(n),null);case 22:case 23:return Ol(),i=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(n.flags|=8192),i&&(n.mode&1)!==0?(mt&1073741824)!==0&&(Ye(n),n.subtreeFlags&6&&(n.flags|=8192)):Ye(n),null;case 24:return null;case 25:return null}throw Error(s(156,n.tag))}function Ex(e,n){switch(Ua(n),n.tag){case 1:return st(n.type)&&Ss(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return kr(),je(ot),je(Ge),el(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 5:return Za(n),null;case 13:if(je(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 je(Oe),null;case 4:return kr(),null;case 10:return Qa(n.type._context),null;case 22:case 23:return Ol(),null;case 24:return null;default:return null}}var Hs=!1,Xe=!1,kx=typeof WeakSet=="function"?WeakSet:Set,Z=null;function Rr(e,n){var o=e.ref;if(o!==null)if(typeof o=="function")try{o(null)}catch(i){Me(e,n,i)}else o.current=null}function wl(e,n,o){try{o()}catch(i){Me(e,n,i)}}var zf=!1;function Nx(e,n){if(Oa=ls,e=vd(),Ea(e)){if("selectionStart"in e)var o={start:e.selectionStart,end:e.selectionEnd};else e:{o=(o=e.ownerDocument)&&o.defaultView||window;var i=o.getSelection&&o.getSelection();if(i&&i.rangeCount!==0){o=i.anchorNode;var u=i.anchorOffset,f=i.focusNode;i=i.focusOffset;try{o.nodeType,f.nodeType}catch{o=null;break e}var x=0,E=-1,R=-1,$=0,W=0,K=e,B=null;t:for(;;){for(var X;K!==o||u!==0&&K.nodeType!==3||(E=x+u),K!==f||i!==0&&K.nodeType!==3||(R=x+i),K.nodeType===3&&(x+=K.nodeValue.length),(X=K.firstChild)!==null;)B=K,K=X;for(;;){if(K===e)break t;if(B===o&&++$===u&&(E=x),B===f&&++W===i&&(R=x),(X=K.nextSibling)!==null)break;K=B,B=K.parentNode}K=X}o=E===-1||R===-1?null:{start:E,end:R}}else o=null}o=o||{start:0,end:0}}else o=null;for(Aa={focusedElem:e,selectionRange:o},ls=!1,Z=n;Z!==null;)if(n=Z,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,Z=e;else for(;Z!==null;){n=Z;try{var J=n.alternate;if((n.flags&1024)!==0)switch(n.tag){case 0:case 11:case 15:break;case 1:if(J!==null){var re=J.memoizedProps,De=J.memoizedState,M=n.stateNode,j=M.getSnapshotBeforeUpdate(n.elementType===n.type?re:Tt(n.type,re),De);M.__reactInternalSnapshotBeforeUpdate=j}break;case 3:var D=n.stateNode.containerInfo;D.nodeType===1?D.textContent="":D.nodeType===9&&D.documentElement&&D.removeChild(D.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(Q){Me(n,n.return,Q)}if(e=n.sibling,e!==null){e.return=n.return,Z=e;break}Z=n.return}return J=zf,zf=!1,J}function No(e,n,o){var i=n.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var u=i=i.next;do{if((u.tag&e)===e){var f=u.destroy;u.destroy=void 0,f!==void 0&&wl(n,o,f)}u=u.next}while(u!==i)}}function Bs(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 i=o.create;o.destroy=i()}o=o.next}while(o!==n)}}function bl(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 Uf(e){var n=e.alternate;n!==null&&(e.alternate=null,Uf(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[Lt],delete n[mo],delete n[La],delete n[lx],delete n[ux])),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 Hf(e){return e.tag===5||e.tag===3||e.tag===4}function Bf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Hf(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 Sl(e,n,o){var i=e.tag;if(i===5||i===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=ws));else if(i!==4&&(e=e.child,e!==null))for(Sl(e,n,o),e=e.sibling;e!==null;)Sl(e,n,o),e=e.sibling}function Cl(e,n,o){var i=e.tag;if(i===5||i===6)e=e.stateNode,n?o.insertBefore(e,n):o.appendChild(e);else if(i!==4&&(e=e.child,e!==null))for(Cl(e,n,o),e=e.sibling;e!==null;)Cl(e,n,o),e=e.sibling}var Ve=null,_t=!1;function bn(e,n,o){for(o=o.child;o!==null;)Wf(e,n,o),o=o.sibling}function Wf(e,n,o){if(Dt&&typeof Dt.onCommitFiberUnmount=="function")try{Dt.onCommitFiberUnmount(ns,o)}catch{}switch(o.tag){case 5:Xe||Rr(o,n);case 6:var i=Ve,u=_t;Ve=null,bn(e,n,o),Ve=i,_t=u,Ve!==null&&(_t?(e=Ve,o=o.stateNode,e.nodeType===8?e.parentNode.removeChild(o):e.removeChild(o)):Ve.removeChild(o.stateNode));break;case 18:Ve!==null&&(_t?(e=Ve,o=o.stateNode,e.nodeType===8?Da(e.parentNode,o):e.nodeType===1&&Da(e,o),ro(e)):Da(Ve,o.stateNode));break;case 4:i=Ve,u=_t,Ve=o.stateNode.containerInfo,_t=!0,bn(e,n,o),Ve=i,_t=u;break;case 0:case 11:case 14:case 15:if(!Xe&&(i=o.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){u=i=i.next;do{var f=u,x=f.destroy;f=f.tag,x!==void 0&&((f&2)!==0||(f&4)!==0)&&wl(o,n,x),u=u.next}while(u!==i)}bn(e,n,o);break;case 1:if(!Xe&&(Rr(o,n),i=o.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=o.memoizedProps,i.state=o.memoizedState,i.componentWillUnmount()}catch(E){Me(o,n,E)}bn(e,n,o);break;case 21:bn(e,n,o);break;case 22:o.mode&1?(Xe=(i=Xe)||o.memoizedState!==null,bn(e,n,o),Xe=i):bn(e,n,o);break;default:bn(e,n,o)}}function Kf(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var o=e.stateNode;o===null&&(o=e.stateNode=new kx),n.forEach(function(i){var u=Ix.bind(null,e,i);o.has(i)||(o.add(i),i.then(u,u))})}}function Ot(e,n){var o=n.deletions;if(o!==null)for(var i=0;i<o.length;i++){var u=o[i];try{var f=e,x=n,E=x;e:for(;E!==null;){switch(E.tag){case 5:Ve=E.stateNode,_t=!1;break e;case 3:Ve=E.stateNode.containerInfo,_t=!0;break e;case 4:Ve=E.stateNode.containerInfo,_t=!0;break e}E=E.return}if(Ve===null)throw Error(s(160));Wf(f,x,u),Ve=null,_t=!1;var R=u.alternate;R!==null&&(R.return=null),u.return=null}catch($){Me(u,n,$)}}if(n.subtreeFlags&12854)for(n=n.child;n!==null;)Vf(n,e),n=n.sibling}function Vf(e,n){var o=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ot(n,e),zt(e),i&4){try{No(3,e,e.return),Bs(3,e)}catch(re){Me(e,e.return,re)}try{No(5,e,e.return)}catch(re){Me(e,e.return,re)}}break;case 1:Ot(n,e),zt(e),i&512&&o!==null&&Rr(o,o.return);break;case 5:if(Ot(n,e),zt(e),i&512&&o!==null&&Rr(o,o.return),e.flags&32){var u=e.stateNode;try{Vr(u,"")}catch(re){Me(e,e.return,re)}}if(i&4&&(u=e.stateNode,u!=null)){var f=e.memoizedProps,x=o!==null?o.memoizedProps:f,E=e.type,R=e.updateQueue;if(e.updateQueue=null,R!==null)try{E==="input"&&f.type==="radio"&&f.name!=null&&xc(u,f),ea(E,x);var $=ea(E,f);for(x=0;x<R.length;x+=2){var W=R[x],K=R[x+1];W==="style"?Rc(u,K):W==="dangerouslySetInnerHTML"?kc(u,K):W==="children"?Vr(u,K):O(u,W,K,$)}switch(E){case"input":qi(u,f);break;case"textarea":Sc(u,f);break;case"select":var B=u._wrapperState.wasMultiple;u._wrapperState.wasMultiple=!!f.multiple;var X=f.value;X!=null?ir(u,!!f.multiple,X,!1):B!==!!f.multiple&&(f.defaultValue!=null?ir(u,!!f.multiple,f.defaultValue,!0):ir(u,!!f.multiple,f.multiple?[]:"",!1))}u[mo]=f}catch(re){Me(e,e.return,re)}}break;case 6:if(Ot(n,e),zt(e),i&4){if(e.stateNode===null)throw Error(s(162));u=e.stateNode,f=e.memoizedProps;try{u.nodeValue=f}catch(re){Me(e,e.return,re)}}break;case 3:if(Ot(n,e),zt(e),i&4&&o!==null&&o.memoizedState.isDehydrated)try{ro(n.containerInfo)}catch(re){Me(e,e.return,re)}break;case 4:Ot(n,e),zt(e);break;case 13:Ot(n,e),zt(e),u=e.child,u.flags&8192&&(f=u.memoizedState!==null,u.stateNode.isHidden=f,!f||u.alternate!==null&&u.alternate.memoizedState!==null||(Nl=Ie())),i&4&&Kf(e);break;case 22:if(W=o!==null&&o.memoizedState!==null,e.mode&1?(Xe=($=Xe)||W,Ot(n,e),Xe=$):Ot(n,e),zt(e),i&8192){if($=e.memoizedState!==null,(e.stateNode.isHidden=$)&&!W&&(e.mode&1)!==0)for(Z=e,W=e.child;W!==null;){for(K=Z=W;Z!==null;){switch(B=Z,X=B.child,B.tag){case 0:case 11:case 14:case 15:No(4,B,B.return);break;case 1:Rr(B,B.return);var J=B.stateNode;if(typeof J.componentWillUnmount=="function"){i=B,o=B.return;try{n=i,J.props=n.memoizedProps,J.state=n.memoizedState,J.componentWillUnmount()}catch(re){Me(i,o,re)}}break;case 5:Rr(B,B.return);break;case 22:if(B.memoizedState!==null){qf(K);continue}}X!==null?(X.return=B,Z=X):qf(K)}W=W.sibling}e:for(W=null,K=e;;){if(K.tag===5){if(W===null){W=K;try{u=K.stateNode,$?(f=u.style,typeof f.setProperty=="function"?f.setProperty("display","none","important"):f.display="none"):(E=K.stateNode,R=K.memoizedProps.style,x=R!=null&&R.hasOwnProperty("display")?R.display:null,E.style.display=Nc("display",x))}catch(re){Me(e,e.return,re)}}}else if(K.tag===6){if(W===null)try{K.stateNode.nodeValue=$?"":K.memoizedProps}catch(re){Me(e,e.return,re)}}else if((K.tag!==22&&K.tag!==23||K.memoizedState===null||K===e)&&K.child!==null){K.child.return=K,K=K.child;continue}if(K===e)break e;for(;K.sibling===null;){if(K.return===null||K.return===e)break e;W===K&&(W=null),K=K.return}W===K&&(W=null),K.sibling.return=K.return,K=K.sibling}}break;case 19:Ot(n,e),zt(e),i&4&&Kf(e);break;case 21:break;default:Ot(n,e),zt(e)}}function zt(e){var n=e.flags;if(n&2){try{e:{for(var o=e.return;o!==null;){if(Hf(o)){var i=o;break e}o=o.return}throw Error(s(160))}switch(i.tag){case 5:var u=i.stateNode;i.flags&32&&(Vr(u,""),i.flags&=-33);var f=Bf(e);Cl(e,f,u);break;case 3:case 4:var x=i.stateNode.containerInfo,E=Bf(e);Sl(e,E,x);break;default:throw Error(s(161))}}catch(R){Me(e,e.return,R)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function Rx(e,n,o){Z=e,Qf(e)}function Qf(e,n,o){for(var i=(e.mode&1)!==0;Z!==null;){var u=Z,f=u.child;if(u.tag===22&&i){var x=u.memoizedState!==null||Hs;if(!x){var E=u.alternate,R=E!==null&&E.memoizedState!==null||Xe;E=Hs;var $=Xe;if(Hs=x,(Xe=R)&&!$)for(Z=u;Z!==null;)x=Z,R=x.child,x.tag===22&&x.memoizedState!==null?Yf(u):R!==null?(R.return=x,Z=R):Yf(u);for(;f!==null;)Z=f,Qf(f),f=f.sibling;Z=u,Hs=E,Xe=$}Gf(e)}else(u.subtreeFlags&8772)!==0&&f!==null?(f.return=u,Z=f):Gf(e)}}function Gf(e){for(;Z!==null;){var n=Z;if((n.flags&8772)!==0){var o=n.alternate;try{if((n.flags&8772)!==0)switch(n.tag){case 0:case 11:case 15:Xe||Bs(5,n);break;case 1:var i=n.stateNode;if(n.flags&4&&!Xe)if(o===null)i.componentDidMount();else{var u=n.elementType===n.type?o.memoizedProps:Tt(n.type,o.memoizedProps);i.componentDidUpdate(u,o.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var f=n.updateQueue;f!==null&&Gd(n,f,i);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}Gd(n,x,o)}break;case 5:var E=n.stateNode;if(o===null&&n.flags&4){o=E;var R=n.memoizedProps;switch(n.type){case"button":case"input":case"select":case"textarea":R.autoFocus&&o.focus();break;case"img":R.src&&(o.src=R.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(n.memoizedState===null){var $=n.alternate;if($!==null){var W=$.memoizedState;if(W!==null){var K=W.dehydrated;K!==null&&ro(K)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(s(163))}Xe||n.flags&512&&bl(n)}catch(B){Me(n,n.return,B)}}if(n===e){Z=null;break}if(o=n.sibling,o!==null){o.return=n.return,Z=o;break}Z=n.return}}function qf(e){for(;Z!==null;){var n=Z;if(n===e){Z=null;break}var o=n.sibling;if(o!==null){o.return=n.return,Z=o;break}Z=n.return}}function Yf(e){for(;Z!==null;){var n=Z;try{switch(n.tag){case 0:case 11:case 15:var o=n.return;try{Bs(4,n)}catch(R){Me(n,o,R)}break;case 1:var i=n.stateNode;if(typeof i.componentDidMount=="function"){var u=n.return;try{i.componentDidMount()}catch(R){Me(n,u,R)}}var f=n.return;try{bl(n)}catch(R){Me(n,f,R)}break;case 5:var x=n.return;try{bl(n)}catch(R){Me(n,x,R)}}}catch(R){Me(n,n.return,R)}if(n===e){Z=null;break}var E=n.sibling;if(E!==null){E.return=n.return,Z=E;break}Z=n.return}}var Px=Math.ceil,Ws=I.ReactCurrentDispatcher,El=I.ReactCurrentOwner,Ct=I.ReactCurrentBatchConfig,Se=0,We=null,Fe=null,Qe=0,mt=0,Pr=gn(0),ze=0,Ro=null,Qn=0,Ks=0,kl=0,Po=null,at=null,Nl=0,jr=1/0,rn=null,Vs=!1,Rl=null,Sn=null,Qs=!1,Cn=null,Gs=0,jo=0,Pl=null,qs=-1,Ys=0;function et(){return(Se&6)!==0?Ie():qs!==-1?qs:qs=Ie()}function En(e){return(e.mode&1)===0?1:(Se&2)!==0&&Qe!==0?Qe&-Qe:dx.transition!==null?(Ys===0&&(Ys=Hc()),Ys):(e=Ee,e!==0||(e=window.event,e=e===void 0?16:Xc(e.type)),e)}function At(e,n,o,i){if(50<jo)throw jo=0,Pl=null,Error(s(185));Zr(e,o,i),((Se&2)===0||e!==We)&&(e===We&&((Se&2)===0&&(Ks|=o),ze===4&&kn(e,Qe)),lt(e,i),o===1&&Se===0&&(n.mode&1)===0&&(jr=Ie()+500,Es&&yn()))}function lt(e,n){var o=e.callbackNode;dy(e,n);var i=ss(e,e===We?Qe:0);if(i===0)o!==null&&$c(o),e.callbackNode=null,e.callbackPriority=0;else if(n=i&-i,e.callbackPriority!==n){if(o!=null&&$c(o),n===1)e.tag===0?cx(Zf.bind(null,e)):Dd(Zf.bind(null,e)),ix(function(){(Se&6)===0&&yn()}),o=null;else{switch(Bc(i)){case 1:o=aa;break;case 4:o=zc;break;case 16:o=ts;break;case 536870912:o=Uc;break;default:o=ts}o=ip(o,Xf.bind(null,e))}e.callbackPriority=n,e.callbackNode=o}}function Xf(e,n){if(qs=-1,Ys=0,(Se&6)!==0)throw Error(s(327));var o=e.callbackNode;if(Tr()&&e.callbackNode!==o)return null;var i=ss(e,e===We?Qe:0);if(i===0)return null;if((i&30)!==0||(i&e.expiredLanes)!==0||n)n=Xs(e,i);else{n=i;var u=Se;Se|=2;var f=ep();(We!==e||Qe!==n)&&(rn=null,jr=Ie()+500,qn(e,n));do try{_x();break}catch(E){Jf(e,E)}while(!0);Va(),Ws.current=f,Se=u,Fe!==null?n=0:(We=null,Qe=0,n=ze)}if(n!==0){if(n===2&&(u=la(e),u!==0&&(i=u,n=jl(e,u))),n===1)throw o=Ro,qn(e,0),kn(e,i),lt(e,Ie()),o;if(n===6)kn(e,i);else{if(u=e.current.alternate,(i&30)===0&&!jx(u)&&(n=Xs(e,i),n===2&&(f=la(e),f!==0&&(i=f,n=jl(e,f))),n===1))throw o=Ro,qn(e,0),kn(e,i),lt(e,Ie()),o;switch(e.finishedWork=u,e.finishedLanes=i,n){case 0:case 1:throw Error(s(345));case 2:Yn(e,at,rn);break;case 3:if(kn(e,i),(i&130023424)===i&&(n=Nl+500-Ie(),10<n)){if(ss(e,0)!==0)break;if(u=e.suspendedLanes,(u&i)!==i){et(),e.pingedLanes|=e.suspendedLanes&u;break}e.timeoutHandle=Ia(Yn.bind(null,e,at,rn),n);break}Yn(e,at,rn);break;case 4:if(kn(e,i),(i&4194240)===i)break;for(n=e.eventTimes,u=-1;0<i;){var x=31-Rt(i);f=1<<x,x=n[x],x>u&&(u=x),i&=~f}if(i=u,i=Ie()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Px(i/1960))-i,10<i){e.timeoutHandle=Ia(Yn.bind(null,e,at,rn),i);break}Yn(e,at,rn);break;case 5:Yn(e,at,rn);break;default:throw Error(s(329))}}}return lt(e,Ie()),e.callbackNode===o?Xf.bind(null,e):null}function jl(e,n){var o=Po;return e.current.memoizedState.isDehydrated&&(qn(e,n).flags|=256),e=Xs(e,n),e!==2&&(n=at,at=o,n!==null&&Tl(n)),e}function Tl(e){at===null?at=e:at.push.apply(at,e)}function jx(e){for(var n=e;;){if(n.flags&16384){var o=n.updateQueue;if(o!==null&&(o=o.stores,o!==null))for(var i=0;i<o.length;i++){var u=o[i],f=u.getSnapshot;u=u.value;try{if(!Pt(f(),u))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 kn(e,n){for(n&=~kl,n&=~Ks,e.suspendedLanes|=n,e.pingedLanes&=~n,e=e.expirationTimes;0<n;){var o=31-Rt(n),i=1<<o;e[o]=-1,n&=~i}}function Zf(e){if((Se&6)!==0)throw Error(s(327));Tr();var n=ss(e,0);if((n&1)===0)return lt(e,Ie()),null;var o=Xs(e,n);if(e.tag!==0&&o===2){var i=la(e);i!==0&&(n=i,o=jl(e,i))}if(o===1)throw o=Ro,qn(e,0),kn(e,n),lt(e,Ie()),o;if(o===6)throw Error(s(345));return e.finishedWork=e.current.alternate,e.finishedLanes=n,Yn(e,at,rn),lt(e,Ie()),null}function _l(e,n){var o=Se;Se|=1;try{return e(n)}finally{Se=o,Se===0&&(jr=Ie()+500,Es&&yn())}}function Gn(e){Cn!==null&&Cn.tag===0&&(Se&6)===0&&Tr();var n=Se;Se|=1;var o=Ct.transition,i=Ee;try{if(Ct.transition=null,Ee=1,e)return e()}finally{Ee=i,Ct.transition=o,Se=n,(Se&6)===0&&yn()}}function Ol(){mt=Pr.current,je(Pr)}function qn(e,n){e.finishedWork=null,e.finishedLanes=0;var o=e.timeoutHandle;if(o!==-1&&(e.timeoutHandle=-1,sx(o)),Fe!==null)for(o=Fe.return;o!==null;){var i=o;switch(Ua(i),i.tag){case 1:i=i.type.childContextTypes,i!=null&&Ss();break;case 3:kr(),je(ot),je(Ge),el();break;case 5:Za(i);break;case 4:kr();break;case 13:je(Oe);break;case 19:je(Oe);break;case 10:Qa(i.type._context);break;case 22:case 23:Ol()}o=o.return}if(We=e,Fe=e=Nn(e.current,null),Qe=mt=n,ze=0,Ro=null,kl=Ks=Qn=0,at=Po=null,Wn!==null){for(n=0;n<Wn.length;n++)if(o=Wn[n],i=o.interleaved,i!==null){o.interleaved=null;var u=i.next,f=o.pending;if(f!==null){var x=f.next;f.next=u,i.next=x}o.pending=i}Wn=null}return e}function Jf(e,n){do{var o=Fe;try{if(Va(),Ms.current=Fs,Is){for(var i=Ae.memoizedState;i!==null;){var u=i.queue;u!==null&&(u.pending=null),i=i.next}Is=!1}if(Vn=0,Be=$e=Ae=null,bo=!1,So=0,El.current=null,o===null||o.return===null){ze=1,Ro=n,Fe=null;break}e:{var f=e,x=o.return,E=o,R=n;if(n=Qe,E.flags|=32768,R!==null&&typeof R=="object"&&typeof R.then=="function"){var $=R,W=E,K=W.tag;if((W.mode&1)===0&&(K===0||K===11||K===15)){var B=W.alternate;B?(W.updateQueue=B.updateQueue,W.memoizedState=B.memoizedState,W.lanes=B.lanes):(W.updateQueue=null,W.memoizedState=null)}var X=Ef(x);if(X!==null){X.flags&=-257,kf(X,x,E,f,n),X.mode&1&&Cf(f,$,n),n=X,R=$;var J=n.updateQueue;if(J===null){var re=new Set;re.add(R),n.updateQueue=re}else J.add(R);break e}else{if((n&1)===0){Cf(f,$,n),Al();break e}R=Error(s(426))}}else if(_e&&E.mode&1){var De=Ef(x);if(De!==null){(De.flags&65536)===0&&(De.flags|=256),kf(De,x,E,f,n),Wa(Nr(R,E));break e}}f=R=Nr(R,E),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=bf(f,R,n);Qd(f,M);break e;case 1:E=R;var j=f.type,D=f.stateNode;if((f.flags&128)===0&&(typeof j.getDerivedStateFromError=="function"||D!==null&&typeof D.componentDidCatch=="function"&&(Sn===null||!Sn.has(D)))){f.flags|=65536,n&=-n,f.lanes|=n;var Q=Sf(f,E,n);Qd(f,Q);break e}}f=f.return}while(f!==null)}np(o)}catch(oe){n=oe,Fe===o&&o!==null&&(Fe=o=o.return);continue}break}while(!0)}function ep(){var e=Ws.current;return Ws.current=Fs,e===null?Fs:e}function Al(){(ze===0||ze===3||ze===2)&&(ze=4),We===null||(Qn&268435455)===0&&(Ks&268435455)===0||kn(We,Qe)}function Xs(e,n){var o=Se;Se|=2;var i=ep();(We!==e||Qe!==n)&&(rn=null,qn(e,n));do try{Tx();break}catch(u){Jf(e,u)}while(!0);if(Va(),Se=o,Ws.current=i,Fe!==null)throw Error(s(261));return We=null,Qe=0,ze}function Tx(){for(;Fe!==null;)tp(Fe)}function _x(){for(;Fe!==null&&!ny();)tp(Fe)}function tp(e){var n=sp(e.alternate,e,mt);e.memoizedProps=e.pendingProps,n===null?np(e):Fe=n,El.current=null}function np(e){var n=e;do{var o=n.alternate;if(e=n.return,(n.flags&32768)===0){if(o=Cx(o,n,mt),o!==null){Fe=o;return}}else{if(o=Ex(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 i=Ee,u=Ct.transition;try{Ct.transition=null,Ee=1,Ox(e,n,o,i)}finally{Ct.transition=u,Ee=i}return null}function Ox(e,n,o,i){do Tr();while(Cn!==null);if((Se&6)!==0)throw Error(s(327));o=e.finishedWork;var u=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(fy(e,f),e===We&&(Fe=We=null,Qe=0),(o.subtreeFlags&2064)===0&&(o.flags&2064)===0||Qs||(Qs=!0,ip(ts,function(){return Tr(),null})),f=(o.flags&15990)!==0,(o.subtreeFlags&15990)!==0||f){f=Ct.transition,Ct.transition=null;var x=Ee;Ee=1;var E=Se;Se|=4,El.current=null,Nx(e,o),Vf(o,e),Zy(Aa),ls=!!Oa,Aa=Oa=null,e.current=o,Rx(o),ry(),Se=E,Ee=x,Ct.transition=f}else e.current=o;if(Qs&&(Qs=!1,Cn=e,Gs=u),f=e.pendingLanes,f===0&&(Sn=null),iy(o.stateNode),lt(e,Ie()),n!==null)for(i=e.onRecoverableError,o=0;o<n.length;o++)u=n[o],i(u.value,{componentStack:u.stack,digest:u.digest});if(Vs)throw Vs=!1,e=Rl,Rl=null,e;return(Gs&1)!==0&&e.tag!==0&&Tr(),f=e.pendingLanes,(f&1)!==0?e===Pl?jo++:(jo=0,Pl=e):jo=0,yn(),null}function Tr(){if(Cn!==null){var e=Bc(Gs),n=Ct.transition,o=Ee;try{if(Ct.transition=null,Ee=16>e?16:e,Cn===null)var i=!1;else{if(e=Cn,Cn=null,Gs=0,(Se&6)!==0)throw Error(s(331));var u=Se;for(Se|=4,Z=e.current;Z!==null;){var f=Z,x=f.child;if((Z.flags&16)!==0){var E=f.deletions;if(E!==null){for(var R=0;R<E.length;R++){var $=E[R];for(Z=$;Z!==null;){var W=Z;switch(W.tag){case 0:case 11:case 15:No(8,W,f)}var K=W.child;if(K!==null)K.return=W,Z=K;else for(;Z!==null;){W=Z;var B=W.sibling,X=W.return;if(Uf(W),W===$){Z=null;break}if(B!==null){B.return=X,Z=B;break}Z=X}}}var J=f.alternate;if(J!==null){var re=J.child;if(re!==null){J.child=null;do{var De=re.sibling;re.sibling=null,re=De}while(re!==null)}}Z=f}}if((f.subtreeFlags&2064)!==0&&x!==null)x.return=f,Z=x;else e:for(;Z!==null;){if(f=Z,(f.flags&2048)!==0)switch(f.tag){case 0:case 11:case 15:No(9,f,f.return)}var M=f.sibling;if(M!==null){M.return=f.return,Z=M;break e}Z=f.return}}var j=e.current;for(Z=j;Z!==null;){x=Z;var D=x.child;if((x.subtreeFlags&2064)!==0&&D!==null)D.return=x,Z=D;else e:for(x=j;Z!==null;){if(E=Z,(E.flags&2048)!==0)try{switch(E.tag){case 0:case 11:case 15:Bs(9,E)}}catch(oe){Me(E,E.return,oe)}if(E===x){Z=null;break e}var Q=E.sibling;if(Q!==null){Q.return=E.return,Z=Q;break e}Z=E.return}}if(Se=u,yn(),Dt&&typeof Dt.onPostCommitFiberRoot=="function")try{Dt.onPostCommitFiberRoot(ns,e)}catch{}i=!0}return i}finally{Ee=o,Ct.transition=n}}return!1}function rp(e,n,o){n=Nr(o,n),n=bf(e,n,1),e=wn(e,n,1),n=et(),e!==null&&(Zr(e,1,n),lt(e,n))}function Me(e,n,o){if(e.tag===3)rp(e,e,o);else for(;n!==null;){if(n.tag===3){rp(n,e,o);break}else if(n.tag===1){var i=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(Sn===null||!Sn.has(i))){e=Nr(o,e),e=Sf(n,e,1),n=wn(n,e,1),e=et(),n!==null&&(Zr(n,1,e),lt(n,e));break}}n=n.return}}function Ax(e,n,o){var i=e.pingCache;i!==null&&i.delete(n),n=et(),e.pingedLanes|=e.suspendedLanes&o,We===e&&(Qe&o)===o&&(ze===4||ze===3&&(Qe&130023424)===Qe&&500>Ie()-Nl?qn(e,0):kl|=o),lt(e,n)}function op(e,n){n===0&&((e.mode&1)===0?n=1:(n=os,os<<=1,(os&130023424)===0&&(os=4194304)));var o=et();e=en(e,n),e!==null&&(Zr(e,n,o),lt(e,o))}function Mx(e){var n=e.memoizedState,o=0;n!==null&&(o=n.retryLane),op(e,o)}function Ix(e,n){var o=0;switch(e.tag){case 13:var i=e.stateNode,u=e.memoizedState;u!==null&&(o=u.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(s(314))}i!==null&&i.delete(n),op(e,o)}var sp;sp=function(e,n,o){if(e!==null)if(e.memoizedProps!==n.pendingProps||ot.current)it=!0;else{if((e.lanes&o)===0&&(n.flags&128)===0)return it=!1,Sx(e,n,o);it=(e.flags&131072)!==0}else it=!1,_e&&(n.flags&1048576)!==0&&Ld(n,Ns,n.index);switch(n.lanes=0,n.tag){case 2:var i=n.type;Us(e,n),e=n.pendingProps;var u=yr(n,Ge.current);Er(n,o),u=rl(null,n,i,e,u,o);var f=ol();return n.flags|=1,typeof u=="object"&&u!==null&&typeof u.render=="function"&&u.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,st(i)?(f=!0,Cs(n)):f=!1,n.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,Ya(n),u.updater=$s,n.stateNode=u,u._reactInternals=n,cl(n,i,e,o),n=hl(null,n,i,!0,f,o)):(n.tag=0,_e&&f&&za(n),Je(null,n,u,o),n=n.child),n;case 16:i=n.elementType;e:{switch(Us(e,n),e=n.pendingProps,u=i._init,i=u(i._payload),n.type=i,u=n.tag=Lx(i),e=Tt(i,e),u){case 0:n=pl(null,n,i,e,o);break e;case 1:n=_f(null,n,i,e,o);break e;case 11:n=Nf(null,n,i,e,o);break e;case 14:n=Rf(null,n,i,Tt(i.type,e),o);break e}throw Error(s(306,i,""))}return n;case 0:return i=n.type,u=n.pendingProps,u=n.elementType===i?u:Tt(i,u),pl(e,n,i,u,o);case 1:return i=n.type,u=n.pendingProps,u=n.elementType===i?u:Tt(i,u),_f(e,n,i,u,o);case 3:e:{if(Of(n),e===null)throw Error(s(387));i=n.pendingProps,f=n.memoizedState,u=f.element,Vd(e,n),Os(n,i,null,o);var x=n.memoizedState;if(i=x.element,f.isDehydrated)if(f={element:i,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},n.updateQueue.baseState=f,n.memoizedState=f,n.flags&256){u=Nr(Error(s(423)),n),n=Af(e,n,i,o,u);break e}else if(i!==u){u=Nr(Error(s(424)),n),n=Af(e,n,i,o,u);break e}else for(ht=mn(n.stateNode.containerInfo.firstChild),pt=n,_e=!0,jt=null,o=Wd(n,null,i,o),n.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(br(),i===u){n=nn(e,n,o);break e}Je(e,n,i,o)}n=n.child}return n;case 5:return qd(n),e===null&&Ba(n),i=n.type,u=n.pendingProps,f=e!==null?e.memoizedProps:null,x=u.children,Ma(i,u)?x=null:f!==null&&Ma(i,f)&&(n.flags|=32),Tf(e,n),Je(e,n,x,o),n.child;case 6:return e===null&&Ba(n),null;case 13:return Mf(e,n,o);case 4:return Xa(n,n.stateNode.containerInfo),i=n.pendingProps,e===null?n.child=Sr(n,null,i,o):Je(e,n,i,o),n.child;case 11:return i=n.type,u=n.pendingProps,u=n.elementType===i?u:Tt(i,u),Nf(e,n,i,u,o);case 7:return Je(e,n,n.pendingProps,o),n.child;case 8:return Je(e,n,n.pendingProps.children,o),n.child;case 12:return Je(e,n,n.pendingProps.children,o),n.child;case 10:e:{if(i=n.type._context,u=n.pendingProps,f=n.memoizedProps,x=u.value,Ne(js,i._currentValue),i._currentValue=x,f!==null)if(Pt(f.value,x)){if(f.children===u.children&&!ot.current){n=nn(e,n,o);break e}}else for(f=n.child,f!==null&&(f.return=n);f!==null;){var E=f.dependencies;if(E!==null){x=f.child;for(var R=E.firstContext;R!==null;){if(R.context===i){if(f.tag===1){R=tn(-1,o&-o),R.tag=2;var $=f.updateQueue;if($!==null){$=$.shared;var W=$.pending;W===null?R.next=R:(R.next=W.next,W.next=R),$.pending=R}}f.lanes|=o,R=f.alternate,R!==null&&(R.lanes|=o),Ga(f.return,o,n),E.lanes|=o;break}R=R.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,E=x.alternate,E!==null&&(E.lanes|=o),Ga(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}Je(e,n,u.children,o),n=n.child}return n;case 9:return u=n.type,i=n.pendingProps.children,Er(n,o),u=bt(u),i=i(u),n.flags|=1,Je(e,n,i,o),n.child;case 14:return i=n.type,u=Tt(i,n.pendingProps),u=Tt(i.type,u),Rf(e,n,i,u,o);case 15:return Pf(e,n,n.type,n.pendingProps,o);case 17:return i=n.type,u=n.pendingProps,u=n.elementType===i?u:Tt(i,u),Us(e,n),n.tag=1,st(i)?(e=!0,Cs(n)):e=!1,Er(n,o),xf(n,i,u),cl(n,i,u,o),hl(null,n,i,!0,e,o);case 19:return Df(e,n,o);case 22:return jf(e,n,o)}throw Error(s(156,n.tag))};function ip(e,n){return Fc(e,n)}function Dx(e,n,o,i){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=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Et(e,n,o,i){return new Dx(e,n,o,i)}function Ml(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Lx(e){if(typeof e=="function")return Ml(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Y)return 11;if(e===me)return 14}return 2}function Nn(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 Zs(e,n,o,i,u,f){var x=2;if(i=e,typeof e=="function")Ml(e)&&(x=1);else if(typeof e=="string")x=5;else e:switch(e){case U:return Xn(o.children,u,f,n);case q:x=8,u|=8;break;case te:return e=Et(12,o,n,u|2),e.elementType=te,e.lanes=f,e;case ae:return e=Et(13,o,n,u),e.elementType=ae,e.lanes=f,e;case G:return e=Et(19,o,n,u),e.elementType=G,e.lanes=f,e;case ie:return Js(o,u,f,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ne:x=10;break e;case se:x=9;break e;case Y:x=11;break e;case me:x=14;break e;case ee:x=16,i=null;break e}throw Error(s(130,e==null?e:typeof e,""))}return n=Et(x,o,n,u),n.elementType=e,n.type=i,n.lanes=f,n}function Xn(e,n,o,i){return e=Et(7,e,i,n),e.lanes=o,e}function Js(e,n,o,i){return e=Et(22,e,i,n),e.elementType=ie,e.lanes=o,e.stateNode={isHidden:!1},e}function Il(e,n,o){return e=Et(6,e,null,n),e.lanes=o,e}function Dl(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 Fx(e,n,o,i,u){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=ua(0),this.expirationTimes=ua(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ua(0),this.identifierPrefix=i,this.onRecoverableError=u,this.mutableSourceEagerHydrationData=null}function Ll(e,n,o,i,u,f,x,E,R){return e=new Fx(e,n,o,E,R),n===1?(n=1,f===!0&&(n|=8)):n=0,f=Et(3,null,null,n),e.current=f,f.stateNode=e,f.memoizedState={element:i,isDehydrated:o,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ya(f),e}function $x(e,n,o){var i=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:L,key:i==null?null:""+i,children:e,containerInfo:n,implementation:o}}function ap(e){if(!e)return vn;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(st(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(st(o))return Md(e,o,n)}return n}function lp(e,n,o,i,u,f,x,E,R){return e=Ll(o,i,!0,e,u,f,x,E,R),e.context=ap(null),o=e.current,i=et(),u=En(o),f=tn(i,u),f.callback=n??null,wn(o,f,u),e.current.lanes=u,Zr(e,u,i),lt(e,i),e}function ei(e,n,o,i){var u=n.current,f=et(),x=En(u);return o=ap(o),n.context===null?n.context=o:n.pendingContext=o,n=tn(f,x),n.payload={element:e},i=i===void 0?null:i,i!==null&&(n.callback=i),e=wn(u,n,x),e!==null&&(At(e,u,x,f),_s(e,u,x)),x}function ti(e){return e=e.current,e.child?(e.child.tag===5,e.child.stateNode):null}function up(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var o=e.retryLane;e.retryLane=o!==0&&o<n?o:n}}function Fl(e,n){up(e,n),(e=e.alternate)&&up(e,n)}function zx(){return null}var cp=typeof reportError=="function"?reportError:function(e){console.error(e)};function $l(e){this._internalRoot=e}ni.prototype.render=$l.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(s(409));ei(e,n,null,null)},ni.prototype.unmount=$l.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;Gn(function(){ei(null,e,null,null)}),n[Yt]=null}};function ni(e){this._internalRoot=e}ni.prototype.unstable_scheduleHydration=function(e){if(e){var n=Vc();e={blockedOn:null,target:e,priority:n};for(var o=0;o<fn.length&&n!==0&&n<fn[o].priority;o++);fn.splice(o,0,e),o===0&&qc(e)}};function zl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ri(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function dp(){}function Ux(e,n,o,i,u){if(u){if(typeof i=="function"){var f=i;i=function(){var $=ti(x);f.call($)}}var x=lp(n,i,e,0,null,!1,!1,"",dp);return e._reactRootContainer=x,e[Yt]=x.current,po(e.nodeType===8?e.parentNode:e),Gn(),x}for(;u=e.lastChild;)e.removeChild(u);if(typeof i=="function"){var E=i;i=function(){var $=ti(R);E.call($)}}var R=Ll(e,0,!1,null,null,!1,!1,"",dp);return e._reactRootContainer=R,e[Yt]=R.current,po(e.nodeType===8?e.parentNode:e),Gn(function(){ei(n,R,o,i)}),R}function oi(e,n,o,i,u){var f=o._reactRootContainer;if(f){var x=f;if(typeof u=="function"){var E=u;u=function(){var R=ti(x);E.call(R)}}ei(n,x,e,u)}else x=Ux(o,n,e,u,i);return ti(x)}Wc=function(e){switch(e.tag){case 3:var n=e.stateNode;if(n.current.memoizedState.isDehydrated){var o=Xr(n.pendingLanes);o!==0&&(ca(n,o|1),lt(n,Ie()),(Se&6)===0&&(jr=Ie()+500,yn()))}break;case 13:Gn(function(){var i=en(e,1);if(i!==null){var u=et();At(i,e,1,u)}}),Fl(e,1)}},da=function(e){if(e.tag===13){var n=en(e,134217728);if(n!==null){var o=et();At(n,e,134217728,o)}Fl(e,134217728)}},Kc=function(e){if(e.tag===13){var n=En(e),o=en(e,n);if(o!==null){var i=et();At(o,e,n,i)}Fl(e,n)}},Vc=function(){return Ee},Qc=function(e,n){var o=Ee;try{return Ee=e,n()}finally{Ee=o}},ra=function(e,n,o){switch(n){case"input":if(qi(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 i=o[n];if(i!==e&&i.form===e.form){var u=bs(i);if(!u)throw Error(s(90));Xo(i),qi(i,u)}}}break;case"textarea":Sc(e,o);break;case"select":n=o.value,n!=null&&ir(e,!!o.multiple,n,!1)}},_c=_l,Oc=Gn;var Hx={usingClientEntryPoint:!1,Events:[go,gr,bs,jc,Tc,_l]},To={findFiberByHostInstance:zn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Bx={bundleType:To.bundleType,version:To.version,rendererPackageName:To.rendererPackageName,rendererConfig:To.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:I.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Dc(e),e===null?null:e.stateNode},findFiberByHostInstance:To.findFiberByHostInstance||zx,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 si=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!si.isDisabled&&si.supportsFiber)try{ns=si.inject(Bx),Dt=si}catch{}}return ut.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Hx,ut.createPortal=function(e,n){var o=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!zl(n))throw Error(s(200));return $x(e,n,null,o)},ut.createRoot=function(e,n){if(!zl(e))throw Error(s(299));var o=!1,i="",u=cp;return n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(u=n.onRecoverableError)),n=Ll(e,1,!1,null,null,o,!1,i,u),e[Yt]=n.current,po(e.nodeType===8?e.parentNode:e),new $l(n)},ut.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=Dc(n),e=e===null?null:e.stateNode,e},ut.flushSync=function(e){return Gn(e)},ut.hydrate=function(e,n,o){if(!ri(n))throw Error(s(200));return oi(null,e,n,!0,o)},ut.hydrateRoot=function(e,n,o){if(!zl(e))throw Error(s(405));var i=o!=null&&o.hydratedSources||null,u=!1,f="",x=cp;if(o!=null&&(o.unstable_strictMode===!0&&(u=!0),o.identifierPrefix!==void 0&&(f=o.identifierPrefix),o.onRecoverableError!==void 0&&(x=o.onRecoverableError)),n=lp(n,null,e,1,o??null,u,!1,f,x),e[Yt]=n.current,po(e),i)for(e=0;e<i.length;e++)o=i[e],u=o._getVersion,u=u(o._source),n.mutableSourceEagerHydrationData==null?n.mutableSourceEagerHydrationData=[o,u]:n.mutableSourceEagerHydrationData.push(o,u);return new ni(n)},ut.render=function(e,n,o){if(!ri(n))throw Error(s(200));return oi(null,e,n,!1,o)},ut.unmountComponentAtNode=function(e){if(!ri(e))throw Error(s(40));return e._reactRootContainer?(Gn(function(){oi(null,null,e,!1,function(){e._reactRootContainer=null,e[Yt]=null})}),!0):!1},ut.unstable_batchedUpdates=_l,ut.unstable_renderSubtreeIntoContainer=function(e,n,o,i){if(!ri(o))throw Error(s(200));if(e==null||e._reactInternals===void 0)throw Error(s(38));return oi(e,n,o,!1,i)},ut.version="18.3.1-next-f1338f8080-20240426",ut}var xp;function _h(){if(xp)return Bl.exports;xp=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(),Bl.exports=Xx(),Bl.exports}var wp;function Zx(){if(wp)return ii;wp=1;var t=_h();return ii.createRoot=t.createRoot,ii.hydrateRoot=t.hydrateRoot,ii}var Jx=Zx();function ew(t,r){if(t instanceof RegExp)return{keys:!1,pattern:t};var s,a,l,d,p=[],h="",y=t.split("/");for(y[0]||y.shift();l=y.shift();)s=l[0],s==="*"?(p.push(s),h+=l[1]==="?"?"(?:/(.*))?":"/(.*)"):s===":"?(a=l.indexOf("?",1),d=l.indexOf(".",1),p.push(l.substring(1,~a?a:~d?d:l.length)),h+=~a&&!~d?"(?:/([^/]+?))?":"/([^/]+?)",~d&&(h+=(~a?"?":"")+"\\"+l.substring(d))):h+="/"+l;return{keys:p,pattern:new RegExp("^"+h+(r?"(?=$|/)":"/?$"),"i")}}var m=Pi();const _n=Th(m),Iu=Kx({__proto__:null,default:_n},[m]);var Vl={exports:{}},Ql={};var bp;function tw(){if(bp)return Ql;bp=1;var t=Pi();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,a=t.useState,l=t.useEffect,d=t.useLayoutEffect,p=t.useDebugValue;function h(w,b){var k=b(),N=a({inst:{value:k,getSnapshot:b}}),S=N[0].inst,C=N[1];return d(function(){S.value=k,S.getSnapshot=b,y(S)&&C({inst:S})},[w,k,b]),l(function(){return y(S)&&C({inst:S}),w(function(){y(S)&&C({inst:S})})},[w]),p(k),k}function y(w){var b=w.getSnapshot;w=w.value;try{var k=b();return!s(w,k)}catch{return!0}}function v(w,b){return b()}var g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?v:h;return Ql.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:g,Ql}var Sp;function nw(){return Sp||(Sp=1,Vl.exports=tw()),Vl.exports}var Oh=nw();const rw=Iu.useInsertionEffect,ow=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",sw=ow?m.useLayoutEffect:m.useEffect,iw=rw||sw,Ah=t=>{const r=m.useRef([t,(...s)=>r[0](...s)]).current;return iw(()=>{r[0]=t}),r[1]},aw="popstate",Du="pushState",Lu="replaceState",lw="hashchange",Cp=[aw,Du,Lu,lw],uw=t=>{for(const r of Cp)addEventListener(r,t);return()=>{for(const r of Cp)removeEventListener(r,t)}},Mh=(t,r)=>Oh.useSyncExternalStore(uw,t,r),Ep=()=>location.search,cw=({ssrSearch:t}={})=>Mh(Ep,t!=null?()=>t:Ep),kp=()=>location.pathname,dw=({ssrPath:t}={})=>Mh(kp,t!=null?()=>t:kp),fw=(t,{replace:r=!1,state:s=null}={})=>history[r?Lu:Du](s,"",t),pw=(t={})=>[dw(t),fw],Np=Symbol.for("wouter_v3");if(typeof history<"u"&&typeof window[Np]>"u"){for(const t of[Du,Lu]){const r=history[t];history[t]=function(){const s=r.apply(this,arguments),a=new Event(t);return a.arguments=arguments,dispatchEvent(a),s}}Object.defineProperty(window,Np,{value:!0})}const hw=(t,r)=>r.toLowerCase().indexOf(t.toLowerCase())?"~"+r:r.slice(t.length)||"/",Ih=(t="")=>t==="/"?"":t,mw=(t,r)=>t[0]==="~"?t.slice(1):Ih(r)+t,gw=(t="",r)=>hw(Rp(Ih(t)),Rp(r)),Rp=t=>{try{return decodeURI(t)}catch{return t}},Dh={hook:pw,searchHook:cw,parser:ew,base:"",ssrPath:void 0,ssrSearch:void 0,ssrContext:void 0,hrefs:t=>t,aroundNav:(t,r,s)=>t(r,s)},Lh=m.createContext(Dh),ji=()=>m.useContext(Lh),Fh={},$h=m.createContext(Fh),vw=()=>m.useContext($h),Fu=t=>{const[r,s]=t.hook(t);return[gw(t.base,r),Ah((a,l)=>t.aroundNav(s,mw(a,t.base),l))]},zh=(t,r,s,a)=>{const{pattern:l,keys:d}=r instanceof RegExp?{keys:!1,pattern:r}:t(r||"*",a),p=l.exec(s)||[],[h,...y]=p;return h!==void 0?[!0,(()=>{const v=d!==!1?Object.fromEntries(d.map((w,b)=>[w,y[b]])):p.groups;let g={...y};return v&&Object.assign(g,v),g})(),...a?[h]:[]]:[!1,null]},Uh=({children:t,...r})=>{const s=ji(),a=r.hook?Dh:s;let l=a;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({}),y=h.current,v=y;for(let g in a){const w=g==="base"?a[g]+(r[g]??""):r[g]??a[g];y===v&&w!==v[g]&&(h.current=v={...v}),v[g]=w,(w!==a[g]||w!==l[g])&&(l=v)}return m.createElement(Lh.Provider,{value:l,children:t})},Pp=({children:t,component:r},s)=>r?m.createElement(r,{params:s}):typeof t=="function"?t(s):t,yw=t=>{let r=m.useRef(Fh);const s=r.current;return r.current=Object.keys(t).length!==Object.keys(s).length||Object.entries(t).some(([a,l])=>l!==s[a])?t:s},Oo=({path:t,nest:r,match:s,...a})=>{const l=ji(),[d]=Fu(l),[p,h,y]=s??zh(l.parser,t,d,r),v=yw({...vw(),...h});if(!p)return null;const g=y?m.createElement(Uh,{base:y},Pp(a,v)):Pp(a,v);return m.createElement($h.Provider,{value:v,children:g})},An=m.forwardRef((t,r)=>{const s=ji(),[a,l]=Fu(s),{to:d="",href:p=d,onClick:h,asChild:y,children:v,className:g,replace:w,state:b,transition:k,...N}=t,S=Ah(_=>{_.ctrlKey||_.metaKey||_.altKey||_.shiftKey||_.button!==0||(h?.(_),_.defaultPrevented||(_.preventDefault(),l(p,t)))}),C=s.hrefs(p[0]==="~"?p.slice(1):s.base+p,s);return y&&m.isValidElement(v)?m.cloneElement(v,{onClick:S,href:C}):m.createElement("a",{...N,onClick:S,href:C,className:g?.call?g(a===p):g,children:v,ref:r})}),Hh=t=>Array.isArray(t)?t.flatMap(r=>Hh(r&&r.type===m.Fragment?r.props.children:r)):[t],xw=({children:t,location:r})=>{const s=ji(),[a]=Fu(s);for(const l of Hh(t)){let d=0;if(m.isValidElement(l)&&(d=zh(s.parser,l.props.path,r||a,l.props.nest))[0])return m.cloneElement(l,{match:d})}return null},Io={v:[]},jp=()=>Io.v.forEach(t=>t()),ww=t=>(Io.v.push(t)===1&&addEventListener("hashchange",jp),()=>{Io.v=Io.v.filter(r=>r!==t),Io.v.length||removeEventListener("hashchange",jp)}),bw=()=>"/"+location.hash.replace(/^#?\/?/,""),Sw=(t,{state:r=null,replace:s=!1}={})=>{const a=location.href,[l,d]=t.replace(/^#?\/?/,"").split("?"),p=new URL(location.href);p.hash=`/${l}`,d&&(p.search=d);const h=p.href;s?history.replaceState(r,"",h):history.pushState(r,"",h);const y=typeof HashChangeEvent<"u"?new HashChangeEvent("hashchange",{oldURL:a,newURL:h}):new Event("hashchange",{detail:{oldURL:a,newURL:h}});dispatchEvent(y)},Bh=({ssrPath:t="/"}={})=>[Oh.useSyncExternalStore(ww,bw,()=>t),Sw];Bh.hrefs=t=>"#"+t;var $r=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(){}},Cw={setTimeout:(t,r)=>setTimeout(t,r),clearTimeout:t=>clearTimeout(t),setInterval:(t,r)=>setInterval(t,r),clearInterval:t=>clearInterval(t)},Ew=class{#e=Cw;#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 Ew;function kw(t){setTimeout(t,0)}var er=typeof window>"u"||"Deno"in globalThis;function tt(){}function Nw(t,r){return typeof t=="function"?t(r):t}function mu(t){return typeof t=="number"&&t>=0&&t!==1/0}function Wh(t,r){return Math.max(t+(r||0)-Date.now(),0)}function Mn(t,r){return typeof t=="function"?t(r):t}function kt(t,r){return typeof t=="function"?t(r):t}function Tp(t,r){const{type:s="all",exact:a,fetchStatus:l,predicate:d,queryKey:p,stale:h}=t;if(p){if(a){if(r.queryHash!==$u(p,r.options))return!1}else if(!Fo(r.queryKey,p))return!1}if(s!=="all"){const y=r.isActive();if(s==="active"&&!y||s==="inactive"&&y)return!1}return!(typeof h=="boolean"&&r.isStale()!==h||l&&l!==r.state.fetchStatus||d&&!d(r))}function _p(t,r){const{exact:s,status:a,predicate:l,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!(a&&r.state.status!==a||l&&!l(r))}function $u(t,r){return(r?.queryKeyHashFn||tr)(t)}function tr(t){return JSON.stringify(t,(r,s)=>gu(s)?Object.keys(s).sort().reduce((a,l)=>(a[l]=s[l],a),{}):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 Rw=Object.prototype.hasOwnProperty;function Kh(t,r,s=0){if(t===r)return t;if(s>500)return r;const a=Op(t)&&Op(r);if(!a&&!(gu(t)&&gu(r)))return r;const d=(a?t:Object.keys(t)).length,p=a?r:Object.keys(r),h=p.length,y=a?new Array(h):{};let v=0;for(let g=0;g<h;g++){const w=a?g:p[g],b=t[w],k=r[w];if(b===k){y[w]=b,(a?g<d:Rw.call(t,w))&&v++;continue}if(b===null||k===null||typeof b!="object"||typeof k!="object"){y[w]=k;continue}const N=Kh(b,k,s+1);y[w]=N,N===b&&v++}return d===h&&v===d?t:y}function wi(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 Op(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function gu(t){if(!Ap(t))return!1;const r=t.constructor;if(r===void 0)return!0;const s=r.prototype;return!(!Ap(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function Ap(t){return Object.prototype.toString.call(t)==="[object Object]"}function Pw(t){return new Promise(r=>{Jn.setTimeout(r,t)})}function vu(t,r,s){return typeof s.structuralSharing=="function"?s.structuralSharing(t,r):s.structuralSharing!==!1?Kh(t,r):r}function jw(t,r,s=0){const a=[...t,r];return s&&a.length>s?a.slice(1):a}function Tw(t,r,s=0){const a=[r,...t];return s&&a.length>s?a.slice(0,-1):a}var zu=Symbol();function Vh(t,r){return!t.queryFn&&r?.initialPromise?()=>r.initialPromise:!t.queryFn||t.queryFn===zu?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function Uu(t,r){return typeof t=="function"?t(...r):!!t}function _w(t,r,s){let a=!1,l;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(l??=r(),a||(a=!0,l.aborted?s():l.addEventListener("abort",s,{once:!0})),l)}),t}var Ow=class extends $r{#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"}},Hu=new Ow;function yu(){let t,r;const s=new Promise((l,d)=>{t=l,r=d});s.status="pending",s.catch(()=>{});function a(l){Object.assign(s,l),delete s.resolve,delete s.reject}return s.resolve=l=>{a({status:"fulfilled",value:l}),t(l)},s.reject=l=>{a({status:"rejected",reason:l}),r(l)},s}var Aw=kw;function Mw(){let t=[],r=0,s=h=>{h()},a=h=>{h()},l=Aw;const d=h=>{r?t.push(h):l(()=>{s(h)})},p=()=>{const h=t;t=[],h.length&&l(()=>{a(()=>{h.forEach(y=>{s(y)})})})};return{batch:h=>{let y;r++;try{y=h()}finally{r--,r||p()}return y},batchCalls:h=>(...y)=>{d(()=>{h(...y)})},schedule:d,setNotifyFunction:h=>{s=h},setBatchNotifyFunction:h=>{a=h},setScheduler:h=>{l=h}}}var Ue=Mw(),Iw=class extends $r{#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}},bi=new Iw;function Dw(t){return Math.min(1e3*2**t,3e4)}function Qh(t){return(t??"online")==="online"?bi.isOnline():!0}var xu=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function Gh(t){let r=!1,s=0,a;const l=yu(),d=()=>l.status!=="pending",p=S=>{if(!d()){const C=new xu(S);b(C),t.onCancel?.(C)}},h=()=>{r=!0},y=()=>{r=!1},v=()=>Hu.isFocused()&&(t.networkMode==="always"||bi.isOnline())&&t.canRun(),g=()=>Qh(t.networkMode)&&t.canRun(),w=S=>{d()||(a?.(),l.resolve(S))},b=S=>{d()||(a?.(),l.reject(S))},k=()=>new Promise(S=>{a=C=>{(d()||v())&&S(C)},t.onPause?.()}).then(()=>{a=void 0,d()||t.onContinue?.()}),N=()=>{if(d())return;let S;const C=s===0?t.initialPromise:void 0;try{S=C??t.fn()}catch(_){S=Promise.reject(_)}Promise.resolve(S).then(w).catch(_=>{if(d())return;const A=t.retry??(er?0:3),O=t.retryDelay??Dw,I=typeof O=="function"?O(s,_):O,F=A===!0||typeof A=="number"&&s<A||typeof A=="function"&&A(s,_);if(r||!F){b(_);return}s++,t.onFail?.(s,_),Pw(I).then(()=>v()?void 0:k()).then(()=>{r?b(_):N()})})};return{promise:l,status:()=>l.status,cancel:p,continue:()=>(a?.(),l),cancelRetry:h,continueRetry:y,canStart:g,start:()=>(g()?N():k().then(N),l)}}var qh=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),mu(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)}},Lw=class extends qh{#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=Ip(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=Ip(this.options);r.data!==void 0&&(this.setState(Mp(r.data,r.dataUpdatedAt)),this.#e=r)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(t,r){const s=vu(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(tt).catch(tt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(t=>kt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===zu||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Mn(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Wh(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(y=>y.options.queryFn);h&&this.setOptions(h.options)}const s=new AbortController,a=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(this.#a=!0,s.signal)})},l=()=>{const h=Vh(this.options,r),v=(()=>{const g={client:this.#o,queryKey:this.queryKey,meta:this.meta};return a(g),g})();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:l};return a(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=Gh({initialPromise:r?.initialPromise,fn:p.fetchFn,onCancel:h=>{h instanceof xu&&h.revert&&this.setState({...this.#t,fetchStatus:"idle"}),s.abort()},onFail:(h,y)=>{this.#s({type:"failed",failureCount:h,error:y})},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 xu){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,...Yh(s.data,this.options),fetchMeta:t.meta??null};case"success":const a={...s,...Mp(t.data,t.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=t.manual?a:void 0,a;case"error":const l=t.error;return{...s,error:l,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:l,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 Yh(t,r){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Qh(r.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function Mp(t,r){return{data:t,dataUpdatedAt:r??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Ip(t){const r=typeof t.initialData=="function"?t.initialData():t.initialData,s=r!==void 0,a=s?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:r,dataUpdateCount:0,dataUpdatedAt:s?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var Fw=class extends $r{constructor(t,r){super(),this.options=r,this.#e=t,this.#s=null,this.#a=yu(),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),Dp(this.#t,this.options)?this.#d():this.updateResult(),this.#x())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return wu(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return wu(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 kt(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&&!wi(this.options,r)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const a=this.hasListeners();a&&Lp(this.#t,s,this.options,r)&&this.#d(),this.updateResult(),a&&(this.#t!==s||kt(this.options.enabled,this.#t)!==kt(r.enabled,this.#t)||Mn(this.options.staleTime,this.#t)!==Mn(r.staleTime,this.#t))&&this.#g();const l=this.#v();a&&(this.#t!==s||kt(this.options.enabled,this.#t)!==kt(r.enabled,this.#t)||l!==this.#l)&&this.#y(l)}getOptimisticResult(t){const r=this.#e.getQueryCache().build(this.#e,t),s=this.createResult(r,t);return zw(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,a)=>(this.trackProp(a),r?.(a),a==="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,a))})}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(tt)),r}#g(){this.#w();const t=Mn(this.options.staleTime,this.#t);if(er||this.#o.isStale||!mu(t))return;const s=Wh(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}#y(t){this.#b(),this.#l=t,!(er||kt(this.options.enabled,this.#t)===!1||!mu(this.#l)||this.#l===0)&&(this.#c=Jn.setInterval(()=>{(this.options.refetchIntervalInBackground||Hu.isFocused())&&this.#d()},this.#l))}#x(){this.#g(),this.#y(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,a=this.options,l=this.#o,d=this.#r,p=this.#i,y=t!==s?t.state:this.#n,{state:v}=t;let g={...v},w=!1,b;if(r._optimisticResults){const q=this.hasListeners(),te=!q&&Dp(t,r),ne=q&&Lp(t,s,r,a);(te||ne)&&(g={...g,...Yh(v.data,t.options)}),r._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:k,errorUpdatedAt:N,status:S}=g;b=g.data;let C=!1;if(r.placeholderData!==void 0&&b===void 0&&S==="pending"){let q;l?.isPlaceholderData&&r.placeholderData===p?.placeholderData?(q=l.data,C=!0):q=typeof r.placeholderData=="function"?r.placeholderData(this.#p?.state.data,this.#p):r.placeholderData,q!==void 0&&(S="success",b=vu(l?.data,q,r),w=!0)}if(r.select&&b!==void 0&&!C)if(l&&b===d?.data&&r.select===this.#m)b=this.#f;else try{this.#m=r.select,b=r.select(b),b=vu(l?.data,b,r),this.#f=b,this.#s=null}catch(q){this.#s=q}this.#s&&(k=this.#s,b=this.#f,N=Date.now(),S="error");const _=g.fetchStatus==="fetching",A=S==="pending",O=S==="error",I=A&&_,F=b!==void 0,U={status:S,fetchStatus:g.fetchStatus,isPending:A,isSuccess:S==="success",isError:O,isInitialLoading:I,isLoading:I,data:b,dataUpdatedAt:g.dataUpdatedAt,error:k,errorUpdatedAt:N,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>y.dataUpdateCount||g.errorUpdateCount>y.errorUpdateCount,isFetching:_,isRefetching:_&&!A,isLoadingError:O&&!F,isPaused:g.fetchStatus==="paused",isPlaceholderData:w,isRefetchError:O&&F,isStale:Bu(t,r),refetch:this.refetch,promise:this.#a,isEnabled:kt(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const q=U.data!==void 0,te=U.status==="error"&&!q,ne=ae=>{te?ae.reject(U.error):q&&ae.resolve(U.data)},se=()=>{const ae=this.#a=U.promise=yu();ne(ae)},Y=this.#a;switch(Y.status){case"pending":t.queryHash===s.queryHash&&ne(Y);break;case"fulfilled":(te||U.data!==Y.value)&&se();break;case"rejected":(!te||U.error!==Y.reason)&&se();break}}return U}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),wi(r,t))return;this.#o=r;const s=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,l=typeof a=="function"?a():a;if(l==="all"||!l&&!this.#h.size)return!0;const d=new Set(l??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.#x()}#C(t){Ue.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(this.#o)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function $w(t,r){return kt(r.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&r.retryOnMount===!1)}function Dp(t,r){return $w(t,r)||t.state.data!==void 0&&wu(t,r,r.refetchOnMount)}function wu(t,r,s){if(kt(r.enabled,t)!==!1&&Mn(r.staleTime,t)!=="static"){const a=typeof s=="function"?s(t):s;return a==="always"||a!==!1&&Bu(t,r)}return!1}function Lp(t,r,s,a){return(t!==r||kt(a.enabled,t)===!1)&&(!s.suspense||t.state.status!=="error")&&Bu(t,s)}function Bu(t,r){return kt(r.enabled,t)!==!1&&t.isStaleByTime(Mn(r.staleTime,t))}function zw(t,r){return!wi(t.getCurrentResult(),r)}function Fp(t){return{onFetch:(r,s)=>{const a=r.options,l=r.fetchOptions?.meta?.fetchMore?.direction,d=r.state.data?.pages||[],p=r.state.data?.pageParams||[];let h={pages:[],pageParams:[]},y=0;const v=async()=>{let g=!1;const w=N=>{_w(N,()=>r.signal,()=>g=!0)},b=Vh(r.options,r.fetchOptions),k=async(N,S,C)=>{if(g)return Promise.reject();if(S==null&&N.pages.length)return Promise.resolve(N);const A=(()=>{const L={client:r.client,queryKey:r.queryKey,pageParam:S,direction:C?"backward":"forward",meta:r.options.meta};return w(L),L})(),O=await b(A),{maxPages:I}=r.options,F=C?Tw:jw;return{pages:F(N.pages,O,I),pageParams:F(N.pageParams,S,I)}};if(l&&d.length){const N=l==="backward",S=N?Uw:$p,C={pages:d,pageParams:p},_=S(a,C);h=await k(C,_,N)}else{const N=t??d.length;do{const S=y===0?p[0]??a.initialPageParam:$p(a,h);if(y>0&&S==null)break;h=await k(h,S),y++}while(y<N)}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 $p(t,{pages:r,pageParams:s}){const a=r.length-1;return r.length>0?t.getNextPageParam(r[a],r,s[a],s):void 0}function Uw(t,{pages:r,pageParams:s}){return r.length>0?t.getPreviousPageParam?.(r[0],r,s[0],s):void 0}var Hw=class extends qh{#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||Xh(),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=Gh({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 a=this.state.status==="pending",l=!this.#o.canStart();try{if(a)r();else{this.#r({type:"pending",variables:t,isPaused:l}),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:l})}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 Xh(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Bw=class extends $r{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 a=new Hw({client:t,mutationCache:this,mutationId:++this.#n,options:t.defaultMutationOptions(r),state:s});return this.add(a),a}add(t){this.#e.add(t);const r=ai(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=ai(t);if(typeof r=="string"){const s=this.#t.get(r);if(s)if(s.length>1){const a=s.indexOf(t);a!==-1&&s.splice(a,1)}else s[0]===t&&this.#t.delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=ai(t);if(typeof r=="string"){const a=this.#t.get(r)?.find(l=>l.state.status==="pending");return!a||a===t}else return!0}runNext(t){const r=ai(t);return typeof r=="string"?this.#t.get(r)?.find(a=>a!==t&&a.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=>_p(r,s))}findAll(t={}){return this.getAll().filter(r=>_p(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(tt))))}};function ai(t){return t.options.scope?.id}var Ww=class extends $r{#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),wi(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??Xh();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,a=this.#t.context,l={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(r?.type==="success"){try{this.#o.onSuccess?.(r.data,s,a,l)}catch(d){Promise.reject(d)}try{this.#o.onSettled?.(r.data,null,s,a,l)}catch(d){Promise.reject(d)}}else if(r?.type==="error"){try{this.#o.onError?.(r.error,s,a,l)}catch(d){Promise.reject(d)}try{this.#o.onSettled?.(void 0,r.error,s,a,l)}catch(d){Promise.reject(d)}}}this.listeners.forEach(s=>{s(this.#t)})})}},Kw=class extends $r{constructor(t={}){super(),this.config=t,this.#e=new Map}#e;build(t,r,s){const a=r.queryKey,l=r.queryHash??$u(a,r);let d=this.get(l);return d||(d=new Lw({client:t,queryKey:a,queryHash:l,options:t.defaultQueryOptions(r),state:s,defaultOptions:t.getQueryDefaults(a)}),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=>Tp(r,s))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(s=>Tp(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()})})}},Vw=class{#e;#t;#n;#o;#r;#i;#a;#s;constructor(t={}){this.#e=t.queryCache||new Kw,this.#t=t.mutationCache||new Bw,this.#n=t.defaultOptions||{},this.#o=new Map,this.#r=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#a=Hu.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=bi.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),a=s.state.data;return a===void 0?this.fetchQuery(t):(t.revalidateIfStale&&s.isStaleByTime(Mn(r.staleTime,s))&&this.prefetchQuery(r),Promise.resolve(a))}getQueriesData(t){return this.#e.findAll(t).map(({queryKey:r,state:s})=>{const a=s.data;return[r,a]})}setQueryData(t,r,s){const a=this.defaultQueryOptions({queryKey:t}),d=this.#e.get(a.queryHash)?.state.data,p=Nw(r,d);if(p!==void 0)return this.#e.build(this,a).setData(p,{...s,manual:!0})}setQueriesData(t,r,s){return Ue.batch(()=>this.#e.findAll(t).map(({queryKey:a})=>[a,this.setQueryData(a,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(a=>{a.reset()}),this.refetchQueries({type:"active",...t},r)))}cancelQueries(t,r={}){const s={revert:!0,...r},a=Ue.batch(()=>this.#e.findAll(t).map(l=>l.cancel(s)));return Promise.all(a).then(tt).catch(tt)}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},a=Ue.batch(()=>this.#e.findAll(t).filter(l=>!l.isDisabled()&&!l.isStatic()).map(l=>{let d=l.fetch(void 0,s);return s.throwOnError||(d=d.catch(tt)),l.state.fetchStatus==="paused"?Promise.resolve():d}));return Promise.all(a).then(tt)}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(tt).catch(tt)}fetchInfiniteQuery(t){return t.behavior=Fp(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(tt).catch(tt)}ensureInfiniteQueryData(t){return t.behavior=Fp(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return bi.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(a=>{Fo(t,a.queryKey)&&Object.assign(s,a.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(a=>{Fo(t,a.mutationKey)&&Object.assign(s,a.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=$u(r.queryKey,r)),r.refetchOnReconnect===void 0&&(r.refetchOnReconnect=r.networkMode!=="always"),r.throwOnError===void 0&&(r.throwOnError=!!r.suspense),!r.networkMode&&r.persister&&(r.networkMode="offlineFirst"),r.queryFn===zu&&(r.enabled=!1),r}defaultMutationOptions(t){return t?._defaulted?t:{...this.#n.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Zh=m.createContext(void 0),Jh=t=>{const r=m.useContext(Zh);if(!r)throw new Error("No QueryClient set, use QueryClientProvider to set one");return r},Qw=({client:t,children:r})=>(m.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),c.jsx(Zh.Provider,{value:t,children:r})),em=m.createContext(!1),Gw=()=>m.useContext(em);em.Provider;function qw(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var Yw=m.createContext(qw()),Xw=()=>m.useContext(Yw),Zw=(t,r,s)=>{const a=s?.state.error&&typeof t.throwOnError=="function"?Uu(t.throwOnError,[s.state.error,s]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||a)&&(r.isReset()||(t.retryOnMount=!1))},Jw=t=>{m.useEffect(()=>{t.clearReset()},[t])},eb=({result:t,errorResetBoundary:r,throwOnError:s,query:a,suspense:l})=>t.isError&&!r.isReset()&&!t.isFetching&&a&&(l&&t.data===void 0||Uu(s,[t.error,a])),tb=t=>{if(t.suspense){const s=l=>l==="static"?l:Math.max(l??1e3,1e3),a=t.staleTime;t.staleTime=typeof a=="function"?(...l)=>s(a(...l)):s(a),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},nb=(t,r)=>t.isLoading&&t.isFetching&&!r,rb=(t,r)=>t?.suspense&&r.isPending,zp=(t,r,s)=>r.fetchOptimistic(t).catch(()=>{s.clearReset()});function ob(t,r,s){const a=Gw(),l=Xw(),d=Jh(),p=d.defaultQueryOptions(t);d.getDefaultOptions().queries?._experimental_beforeQuery?.(p);const h=d.getQueryCache().get(p.queryHash);p._optimisticResults=a?"isRestoring":"optimistic",tb(p),Zw(p,l,h),Jw(l);const y=!d.getQueryCache().get(p.queryHash),[v]=m.useState(()=>new r(d,p)),g=v.getOptimisticResult(p),w=!a&&t.subscribed!==!1;if(m.useSyncExternalStore(m.useCallback(b=>{const k=w?v.subscribe(Ue.batchCalls(b)):tt;return v.updateResult(),k},[v,w]),()=>v.getCurrentResult(),()=>v.getCurrentResult()),m.useEffect(()=>{v.setOptions(p)},[p,v]),rb(p,g))throw zp(p,v,l);if(eb({result:g,errorResetBoundary:l,throwOnError:p.throwOnError,query:h,suspense:p.suspense}))throw g.error;return d.getDefaultOptions().queries?._experimental_afterQuery?.(p,g),p.experimental_prefetchInRender&&!er&&nb(g,a)&&(y?zp(p,v,l):h?.promise)?.catch(tt).finally(()=>{v.updateResult()}),p.notifyOnChangeProps?g:v.trackResult(g)}function dt(t,r){return ob(t,Fw)}function ct(t,r){const s=Jh(),[a]=m.useState(()=>new Ww(s,t));m.useEffect(()=>{a.setOptions(t)},[a,t]);const l=m.useSyncExternalStore(m.useCallback(p=>a.subscribe(Ue.batchCalls(p)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),d=m.useCallback((p,h)=>{a.mutate(p,h).catch(tt)},[a]);if(l.error&&Uu(a.options.throwOnError,[l.error]))throw l.error;return{...l,mutate:d,mutateAsync:l.mutate}}const Wu="__PORT_5000__".startsWith("__")?"":"__PORT_5000__";async function Ku(t){if(!t.ok){const r=await t.text()||t.statusText;throw new Error(`${t.status}: ${r}`)}}async function sb(t,r){const s=await fetch(`${Wu}${t}`,r);return await Ku(s),await s.json()}async function nt(t,r,s){const a=await fetch(`${Wu}${r}`,{method:t,headers:s?{"Content-Type":"application/json"}:{},body:s?JSON.stringify(s):void 0});return await Ku(a),a}const ib=({on401:t})=>async({queryKey:r})=>{const s=await fetch(`${Wu}${r.join("/")}`);return await Ku(s),await s.json()},we=new Vw({defaultOptions:{queries:{queryFn:ib({on401:"throw"}),refetchInterval:!1,refetchOnWindowFocus:!1,staleTime:1/0,retry:!1},mutations:{retry:!1}}});var ab=(t,r,s,a,l,d,p,h)=>{let y=document.documentElement,v=["light","dark"];function g(k){(Array.isArray(t)?t:[t]).forEach(N=>{let S=N==="class",C=S&&d?l.map(_=>d[_]||_):l;S?(y.classList.remove(...C),y.classList.add(d&&d[k]?d[k]:k)):y.setAttribute(N,k)}),w(k)}function w(k){h&&v.includes(k)&&(y.style.colorScheme=k)}function b(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(a)g(a);else try{let k=localStorage.getItem(r)||s,N=p&&k==="system"?b():k;g(N)}catch{}},Up=["light","dark"],tm="(prefers-color-scheme: dark)",lb=typeof window>"u",nm=m.createContext(void 0),ub=t=>m.useContext(nm)?m.createElement(m.Fragment,null,t.children):m.createElement(db,{...t}),cb=["light","dark"],db=({forcedTheme:t,disableTransitionOnChange:r=!1,enableSystem:s=!0,enableColorScheme:a=!0,storageKey:l="theme",themes:d=cb,defaultTheme:p=s?"system":"light",attribute:h="data-theme",value:y,children:v,nonce:g,scriptProps:w})=>{let[b,k]=m.useState(()=>pb(l,p)),[N,S]=m.useState(()=>b==="system"?Gl():b),C=y?Object.values(y):d,_=m.useCallback(F=>{let L=F;if(!L)return;F==="system"&&s&&(L=Gl());let U=y?y[L]:L,q=r?hb(g):null,te=document.documentElement,ne=se=>{se==="class"?(te.classList.remove(...C),U&&te.classList.add(U)):se.startsWith("data-")&&(U?te.setAttribute(se,U):te.removeAttribute(se))};if(Array.isArray(h)?h.forEach(ne):ne(h),a){let se=Up.includes(p)?p:null,Y=Up.includes(L)?L:se;te.style.colorScheme=Y}q?.()},[g]),A=m.useCallback(F=>{let L=typeof F=="function"?F(b):F;k(L);try{localStorage.setItem(l,L)}catch{}},[b]),O=m.useCallback(F=>{let L=Gl(F);S(L),b==="system"&&s&&!t&&_("system")},[b,t]);m.useEffect(()=>{let F=window.matchMedia(tm);return F.addListener(O),O(F),()=>F.removeListener(O)},[O]),m.useEffect(()=>{let F=L=>{L.key===l&&(L.newValue?k(L.newValue):A(p))};return window.addEventListener("storage",F),()=>window.removeEventListener("storage",F)},[A]),m.useEffect(()=>{_(t??b)},[t,b]);let I=m.useMemo(()=>({theme:b,setTheme:A,forcedTheme:t,resolvedTheme:b==="system"?N:b,themes:s?[...d,"system"]:d,systemTheme:s?N:void 0}),[b,A,t,N,s,d]);return m.createElement(nm.Provider,{value:I},m.createElement(fb,{forcedTheme:t,storageKey:l,attribute:h,enableSystem:s,enableColorScheme:a,defaultTheme:p,value:y,themes:d,nonce:g,scriptProps:w}),v)},fb=m.memo(({forcedTheme:t,storageKey:r,attribute:s,enableSystem:a,enableColorScheme:l,defaultTheme:d,value:p,themes:h,nonce:y,scriptProps:v})=>{let g=JSON.stringify([s,r,d,t,h,p,a,l]).slice(1,-1);return m.createElement("script",{...v,suppressHydrationWarning:!0,nonce:typeof window>"u"?y:"",dangerouslySetInnerHTML:{__html:`(${ab.toString()})(${g})`}})}),pb=(t,r)=>{if(lb)return;let s;try{s=localStorage.getItem(t)||void 0}catch{}return s||r},hb=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)}},Gl=t=>(t||(t=window.matchMedia(tm)),t.matches?"dark":"light");const mb=1,gb=1e6;let ql=0;function vb(){return ql=(ql+1)%Number.MAX_SAFE_INTEGER,ql.toString()}const Yl=new Map,Hp=t=>{if(Yl.has(t))return;const r=setTimeout(()=>{Yl.delete(t),Lo({type:"REMOVE_TOAST",toastId:t})},gb);Yl.set(t,r)},yb=(t,r)=>{switch(r.type){case"ADD_TOAST":return{...t,toasts:[r.toast,...t.toasts].slice(0,mb)};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?Hp(s):t.toasts.forEach(a=>{Hp(a.id)}),{...t,toasts:t.toasts.map(a=>a.id===s||s===void 0?{...a,open:!1}:a)}}case"REMOVE_TOAST":return r.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(s=>s.id!==r.toastId)}}},mi=[];let gi={toasts:[]};function Lo(t){gi=yb(gi,t),mi.forEach(r=>{r(gi)})}function Vt({...t}){const r=vb(),s=l=>Lo({type:"UPDATE_TOAST",toast:{...l,id:r}}),a=()=>Lo({type:"DISMISS_TOAST",toastId:r});return Lo({type:"ADD_TOAST",toast:{...t,id:r,open:!0,onOpenChange:l=>{l||a()}}}),{id:r,dismiss:a,update:s}}function xb(){const[t,r]=m.useState(gi);return m.useEffect(()=>(mi.push(r),()=>{const s=mi.indexOf(r);s>-1&&mi.splice(s,1)}),[t]),{...t,toast:Vt,dismiss:s=>Lo({type:"DISMISS_TOAST",toastId:s})}}var Ti=_h();const wb=Th(Ti);function ce(t,r,{checkForDefaultPrevented:s=!0}={}){return function(l){if(t?.(l),s===!1||!l.defaultPrevented)return r?.(l)}}function Bp(t,r){if(typeof t=="function")return t(r);t!=null&&(t.current=r)}function zr(...t){return r=>{let s=!1;const a=t.map(l=>{const d=Bp(l,r);return!s&&typeof d=="function"&&(s=!0),d});if(s)return()=>{for(let l=0;l<a.length;l++){const d=a[l];typeof d=="function"?d():Bp(t[l],null)}}}}function He(...t){return m.useCallback(zr(...t),t)}function Ln(t,r=[]){let s=[];function a(d,p){const h=m.createContext(p),y=s.length;s=[...s,p];const v=w=>{const{scope:b,children:k,...N}=w,S=b?.[t]?.[y]||h,C=m.useMemo(()=>N,Object.values(N));return c.jsx(S.Provider,{value:C,children:k})};v.displayName=d+"Provider";function g(w,b){const k=b?.[t]?.[y]||h,N=m.useContext(k);if(N)return N;if(p!==void 0)return p;throw new Error(`\`${w}\` must be used within \`${d}\``)}return[v,g]}const l=()=>{const d=s.map(p=>m.createContext(p));return function(h){const y=h?.[t]||d;return m.useMemo(()=>({[`__scope${t}`]:{...h,[t]:y}}),[h,y])}};return l.scopeName=t,[a,bb(l,...r)]}function bb(...t){const r=t[0];if(t.length===1)return r;const s=()=>{const a=t.map(l=>({useScope:l(),scopeName:l.scopeName}));return function(d){const p=a.reduce((h,{useScope:y,scopeName:v})=>{const w=y(d)[`__scope${v}`];return{...h,...w}},{});return m.useMemo(()=>({[`__scope${r.scopeName}`]:p}),[p])}};return s.scopeName=r.scopeName,s}function Wp(t){const r=Sb(t),s=m.forwardRef((a,l)=>{const{children:d,...p}=a,h=m.Children.toArray(d),y=h.find(Eb);if(y){const v=y.props.children,g=h.map(w=>w===y?m.Children.count(v)>1?m.Children.only(null):m.isValidElement(v)?v.props.children:null:w);return c.jsx(r,{...p,ref:l,children:m.isValidElement(v)?m.cloneElement(v,void 0,g):null})}return c.jsx(r,{...p,ref:l,children:d})});return s.displayName=`${t}.Slot`,s}function Sb(t){const r=m.forwardRef((s,a)=>{const{children:l,...d}=s;if(m.isValidElement(l)){const p=Nb(l),h=kb(d,l.props);return l.type!==m.Fragment&&(h.ref=a?zr(a,p):p),m.cloneElement(l,h)}return m.Children.count(l)>1?m.Children.only(null):null});return r.displayName=`${t}.SlotClone`,r}var Cb=Symbol("radix.slottable");function Eb(t){return m.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Cb}function kb(t,r){const s={...r};for(const a in r){const l=t[a],d=r[a];/^on[A-Z]/.test(a)?l&&d?s[a]=(...h)=>{const y=d(...h);return l(...h),y}:l&&(s[a]=l):a==="style"?s[a]={...l,...d}:a==="className"&&(s[a]=[l,d].filter(Boolean).join(" "))}return{...t,...s}}function Nb(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 Vu(t){const r=t+"CollectionProvider",[s,a]=Ln(r),[l,d]=s(r,{collectionRef:{current:null},itemMap:new Map}),p=S=>{const{scope:C,children:_}=S,A=_n.useRef(null),O=_n.useRef(new Map).current;return c.jsx(l,{scope:C,itemMap:O,collectionRef:A,children:_})};p.displayName=r;const h=t+"CollectionSlot",y=Wp(h),v=_n.forwardRef((S,C)=>{const{scope:_,children:A}=S,O=d(h,_),I=He(C,O.collectionRef);return c.jsx(y,{ref:I,children:A})});v.displayName=h;const g=t+"CollectionItemSlot",w="data-radix-collection-item",b=Wp(g),k=_n.forwardRef((S,C)=>{const{scope:_,children:A,...O}=S,I=_n.useRef(null),F=He(C,I),L=d(g,_);return _n.useEffect(()=>(L.itemMap.set(I,{ref:I,...O}),()=>{L.itemMap.delete(I)})),c.jsx(b,{[w]:"",ref:F,children:A})});k.displayName=g;function N(S){const C=d(t+"CollectionConsumer",S);return _n.useCallback(()=>{const A=C.collectionRef.current;if(!A)return[];const O=Array.from(A.querySelectorAll(`[${w}]`));return Array.from(C.itemMap.values()).sort((L,U)=>O.indexOf(L.ref.current)-O.indexOf(U.ref.current))},[C.collectionRef,C.itemMap])}return[{Provider:p,Slot:v,ItemSlot:k},N,a]}function Rb(t){const r=Pb(t),s=m.forwardRef((a,l)=>{const{children:d,...p}=a,h=m.Children.toArray(d),y=h.find(Tb);if(y){const v=y.props.children,g=h.map(w=>w===y?m.Children.count(v)>1?m.Children.only(null):m.isValidElement(v)?v.props.children:null:w);return c.jsx(r,{...p,ref:l,children:m.isValidElement(v)?m.cloneElement(v,void 0,g):null})}return c.jsx(r,{...p,ref:l,children:d})});return s.displayName=`${t}.Slot`,s}function Pb(t){const r=m.forwardRef((s,a)=>{const{children:l,...d}=s;if(m.isValidElement(l)){const p=Ob(l),h=_b(d,l.props);return l.type!==m.Fragment&&(h.ref=a?zr(a,p):p),m.cloneElement(l,h)}return m.Children.count(l)>1?m.Children.only(null):null});return r.displayName=`${t}.SlotClone`,r}var jb=Symbol("radix.slottable");function Tb(t){return m.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===jb}function _b(t,r){const s={...r};for(const a in r){const l=t[a],d=r[a];/^on[A-Z]/.test(a)?l&&d?s[a]=(...h)=>{const y=d(...h);return l(...h),y}:l&&(s[a]=l):a==="style"?s[a]={...l,...d}:a==="className"&&(s[a]=[l,d].filter(Boolean).join(" "))}return{...t,...s}}function Ob(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 Ab=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Re=Ab.reduce((t,r)=>{const s=Rb(`Primitive.${r}`),a=m.forwardRef((l,d)=>{const{asChild:p,...h}=l,y=p?s:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(y,{...h,ref:d})});return a.displayName=`Primitive.${r}`,{...t,[r]:a}},{});function Qu(t,r){t&&Ti.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 Mb(t,r=globalThis?.document){const s=yt(t);m.useEffect(()=>{const a=l=>{l.key==="Escape"&&s(l)};return r.addEventListener("keydown",a,{capture:!0}),()=>r.removeEventListener("keydown",a,{capture:!0})},[s,r])}var Ib="DismissableLayer",bu="dismissableLayer.update",Db="dismissableLayer.pointerDownOutside",Lb="dismissableLayer.focusOutside",Kp,rm=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),_i=m.forwardRef((t,r)=>{const{disableOutsidePointerEvents:s=!1,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:p,onDismiss:h,...y}=t,v=m.useContext(rm),[g,w]=m.useState(null),b=g?.ownerDocument??globalThis?.document,[,k]=m.useState({}),N=He(r,U=>w(U)),S=Array.from(v.layers),[C]=[...v.layersWithOutsidePointerEventsDisabled].slice(-1),_=S.indexOf(C),A=g?S.indexOf(g):-1,O=v.layersWithOutsidePointerEventsDisabled.size>0,I=A>=_,F=$b(U=>{const q=U.target,te=[...v.branches].some(ne=>ne.contains(q));!I||te||(l?.(U),p?.(U),U.defaultPrevented||h?.())},b),L=zb(U=>{const q=U.target;[...v.branches].some(ne=>ne.contains(q))||(d?.(U),p?.(U),U.defaultPrevented||h?.())},b);return Mb(U=>{A===v.layers.size-1&&(a?.(U),!U.defaultPrevented&&h&&(U.preventDefault(),h()))},b),m.useEffect(()=>{if(g)return s&&(v.layersWithOutsidePointerEventsDisabled.size===0&&(Kp=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),v.layersWithOutsidePointerEventsDisabled.add(g)),v.layers.add(g),Vp(),()=>{s&&v.layersWithOutsidePointerEventsDisabled.size===1&&(b.body.style.pointerEvents=Kp)}},[g,b,s,v]),m.useEffect(()=>()=>{g&&(v.layers.delete(g),v.layersWithOutsidePointerEventsDisabled.delete(g),Vp())},[g,v]),m.useEffect(()=>{const U=()=>k({});return document.addEventListener(bu,U),()=>document.removeEventListener(bu,U)},[]),c.jsx(Re.div,{...y,ref:N,style:{pointerEvents:O?I?"auto":"none":void 0,...t.style},onFocusCapture:ce(t.onFocusCapture,L.onFocusCapture),onBlurCapture:ce(t.onBlurCapture,L.onBlurCapture),onPointerDownCapture:ce(t.onPointerDownCapture,F.onPointerDownCapture)})});_i.displayName=Ib;var Fb="DismissableLayerBranch",om=m.forwardRef((t,r)=>{const s=m.useContext(rm),a=m.useRef(null),l=He(r,a);return m.useEffect(()=>{const d=a.current;if(d)return s.branches.add(d),()=>{s.branches.delete(d)}},[s.branches]),c.jsx(Re.div,{...t,ref:l})});om.displayName=Fb;function $b(t,r=globalThis?.document){const s=yt(t),a=m.useRef(!1),l=m.useRef(()=>{});return m.useEffect(()=>{const d=h=>{if(h.target&&!a.current){let y=function(){sm(Db,s,v,{discrete:!0})};const v={originalEvent:h};h.pointerType==="touch"?(r.removeEventListener("click",l.current),l.current=y,r.addEventListener("click",l.current,{once:!0})):y()}else r.removeEventListener("click",l.current);a.current=!1},p=window.setTimeout(()=>{r.addEventListener("pointerdown",d)},0);return()=>{window.clearTimeout(p),r.removeEventListener("pointerdown",d),r.removeEventListener("click",l.current)}},[r,s]),{onPointerDownCapture:()=>a.current=!0}}function zb(t,r=globalThis?.document){const s=yt(t),a=m.useRef(!1);return m.useEffect(()=>{const l=d=>{d.target&&!a.current&&sm(Lb,s,{originalEvent:d},{discrete:!1})};return r.addEventListener("focusin",l),()=>r.removeEventListener("focusin",l)},[r,s]),{onFocusCapture:()=>a.current=!0,onBlurCapture:()=>a.current=!1}}function Vp(){const t=new CustomEvent(bu);document.dispatchEvent(t)}function sm(t,r,s,{discrete:a}){const l=s.originalEvent.target,d=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:s});r&&l.addEventListener(t,r,{once:!0}),a?Qu(l,d):l.dispatchEvent(d)}var Ub=_i,Hb=om,Qt=globalThis?.document?m.useLayoutEffect:()=>{},Bb="Portal",Gu=m.forwardRef((t,r)=>{const{container:s,...a}=t,[l,d]=m.useState(!1);Qt(()=>d(!0),[]);const p=s||l&&globalThis?.document?.body;return p?wb.createPortal(c.jsx(Re.div,{...a,ref:r}),p):null});Gu.displayName=Bb;function Wb(t,r){return m.useReducer((s,a)=>r[s][a]??s,t)}var Fn=t=>{const{present:r,children:s}=t,a=Kb(r),l=typeof s=="function"?s({present:a.isPresent}):m.Children.only(s),d=He(a.ref,Vb(l));return typeof s=="function"||a.isPresent?m.cloneElement(l,{ref:d}):null};Fn.displayName="Presence";function Kb(t){const[r,s]=m.useState(),a=m.useRef(null),l=m.useRef(t),d=m.useRef("none"),p=t?"mounted":"unmounted",[h,y]=Wb(p,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{const v=li(a.current);d.current=h==="mounted"?v:"none"},[h]),Qt(()=>{const v=a.current,g=l.current;if(g!==t){const b=d.current,k=li(v);t?y("MOUNT"):k==="none"||v?.display==="none"?y("UNMOUNT"):y(g&&b!==k?"ANIMATION_OUT":"UNMOUNT"),l.current=t}},[t,y]),Qt(()=>{if(r){let v;const g=r.ownerDocument.defaultView??window,w=k=>{const S=li(a.current).includes(CSS.escape(k.animationName));if(k.target===r&&S&&(y("ANIMATION_END"),!l.current)){const C=r.style.animationFillMode;r.style.animationFillMode="forwards",v=g.setTimeout(()=>{r.style.animationFillMode==="forwards"&&(r.style.animationFillMode=C)})}},b=k=>{k.target===r&&(d.current=li(a.current))};return r.addEventListener("animationstart",b),r.addEventListener("animationcancel",w),r.addEventListener("animationend",w),()=>{g.clearTimeout(v),r.removeEventListener("animationstart",b),r.removeEventListener("animationcancel",w),r.removeEventListener("animationend",w)}}else y("ANIMATION_END")},[r,y]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:m.useCallback(v=>{a.current=v?getComputedStyle(v):null,s(v)},[])}}function li(t){return t?.animationName||"none"}function Vb(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 Qb=Iu[" useInsertionEffect ".trim().toString()]||Qt;function Ko({prop:t,defaultProp:r,onChange:s=()=>{},caller:a}){const[l,d,p]=Gb({defaultProp:r,onChange:s}),h=t!==void 0,y=h?t:l;{const g=m.useRef(t!==void 0);m.useEffect(()=>{const w=g.current;w!==h&&console.warn(`${a} 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.`),g.current=h},[h,a])}const v=m.useCallback(g=>{if(h){const w=qb(g)?g(t):g;w!==t&&p.current?.(w)}else d(g)},[h,t,d,p]);return[y,v]}function Gb({defaultProp:t,onChange:r}){const[s,a]=m.useState(t),l=m.useRef(s),d=m.useRef(r);return Qb(()=>{d.current=r},[r]),m.useEffect(()=>{l.current!==s&&(d.current?.(s),l.current=s)},[s,l]),[s,a,d]}function qb(t){return typeof t=="function"}var Yb=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"}),Xb="VisuallyHidden",Oi=m.forwardRef((t,r)=>c.jsx(Re.span,{...t,ref:r,style:{...Yb,...t.style}}));Oi.displayName=Xb;var Zb=Oi,qu="ToastProvider",[Yu,Jb,e0]=Vu("Toast"),[im]=Ln("Toast",[e0]),[t0,Ai]=im(qu),am=t=>{const{__scopeToast:r,label:s="Notification",duration:a=5e3,swipeDirection:l="right",swipeThreshold:d=50,children:p}=t,[h,y]=m.useState(null),[v,g]=m.useState(0),w=m.useRef(!1),b=m.useRef(!1);return s.trim()||console.error(`Invalid prop \`label\` supplied to \`${qu}\`. Expected non-empty \`string\`.`),c.jsx(Yu.Provider,{scope:r,children:c.jsx(t0,{scope:r,label:s,duration:a,swipeDirection:l,swipeThreshold:d,toastCount:v,viewport:h,onViewportChange:y,onToastAdd:m.useCallback(()=>g(k=>k+1),[]),onToastRemove:m.useCallback(()=>g(k=>k-1),[]),isFocusedToastEscapeKeyDownRef:w,isClosePausedRef:b,children:p})})};am.displayName=qu;var lm="ToastViewport",n0=["F8"],Su="toast.viewportPause",Cu="toast.viewportResume",um=m.forwardRef((t,r)=>{const{__scopeToast:s,hotkey:a=n0,label:l="Notifications ({hotkey})",...d}=t,p=Ai(lm,s),h=Jb(s),y=m.useRef(null),v=m.useRef(null),g=m.useRef(null),w=m.useRef(null),b=He(r,w,p.onViewportChange),k=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),N=p.toastCount>0;m.useEffect(()=>{const C=_=>{a.length!==0&&a.every(O=>_[O]||_.code===O)&&w.current?.focus()};return document.addEventListener("keydown",C),()=>document.removeEventListener("keydown",C)},[a]),m.useEffect(()=>{const C=y.current,_=w.current;if(N&&C&&_){const A=()=>{if(!p.isClosePausedRef.current){const L=new CustomEvent(Su);_.dispatchEvent(L),p.isClosePausedRef.current=!0}},O=()=>{if(p.isClosePausedRef.current){const L=new CustomEvent(Cu);_.dispatchEvent(L),p.isClosePausedRef.current=!1}},I=L=>{!C.contains(L.relatedTarget)&&O()},F=()=>{C.contains(document.activeElement)||O()};return C.addEventListener("focusin",A),C.addEventListener("focusout",I),C.addEventListener("pointermove",A),C.addEventListener("pointerleave",F),window.addEventListener("blur",A),window.addEventListener("focus",O),()=>{C.removeEventListener("focusin",A),C.removeEventListener("focusout",I),C.removeEventListener("pointermove",A),C.removeEventListener("pointerleave",F),window.removeEventListener("blur",A),window.removeEventListener("focus",O)}}},[N,p.isClosePausedRef]);const S=m.useCallback(({tabbingDirection:C})=>{const A=h().map(O=>{const I=O.ref.current,F=[I,...m0(I)];return C==="forwards"?F:F.reverse()});return(C==="forwards"?A.reverse():A).flat()},[h]);return m.useEffect(()=>{const C=w.current;if(C){const _=A=>{const O=A.altKey||A.ctrlKey||A.metaKey;if(A.key==="Tab"&&!O){const F=document.activeElement,L=A.shiftKey;if(A.target===C&&L){v.current?.focus();return}const te=S({tabbingDirection:L?"backwards":"forwards"}),ne=te.findIndex(se=>se===F);Xl(te.slice(ne+1))?A.preventDefault():L?v.current?.focus():g.current?.focus()}};return C.addEventListener("keydown",_),()=>C.removeEventListener("keydown",_)}},[h,S]),c.jsxs(Hb,{ref:y,role:"region","aria-label":l.replace("{hotkey}",k),tabIndex:-1,style:{pointerEvents:N?void 0:"none"},children:[N&&c.jsx(Eu,{ref:v,onFocusFromOutsideViewport:()=>{const C=S({tabbingDirection:"forwards"});Xl(C)}}),c.jsx(Yu.Slot,{scope:s,children:c.jsx(Re.ol,{tabIndex:-1,...d,ref:b})}),N&&c.jsx(Eu,{ref:g,onFocusFromOutsideViewport:()=>{const C=S({tabbingDirection:"backwards"});Xl(C)}})]})});um.displayName=lm;var cm="ToastFocusProxy",Eu=m.forwardRef((t,r)=>{const{__scopeToast:s,onFocusFromOutsideViewport:a,...l}=t,d=Ai(cm,s);return c.jsx(Oi,{tabIndex:0,...l,ref:r,style:{position:"fixed"},onFocus:p=>{const h=p.relatedTarget;!d.viewport?.contains(h)&&a()}})});Eu.displayName=cm;var Vo="Toast",r0="toast.swipeStart",o0="toast.swipeMove",s0="toast.swipeCancel",i0="toast.swipeEnd",dm=m.forwardRef((t,r)=>{const{forceMount:s,open:a,defaultOpen:l,onOpenChange:d,...p}=t,[h,y]=Ko({prop:a,defaultProp:l??!0,onChange:d,caller:Vo});return c.jsx(Fn,{present:s||h,children:c.jsx(u0,{open:h,...p,ref:r,onClose:()=>y(!1),onPause:yt(t.onPause),onResume:yt(t.onResume),onSwipeStart:ce(t.onSwipeStart,v=>{v.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ce(t.onSwipeMove,v=>{const{x:g,y:w}=v.detail.delta;v.currentTarget.setAttribute("data-swipe","move"),v.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${g}px`),v.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${w}px`)}),onSwipeCancel:ce(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:ce(t.onSwipeEnd,v=>{const{x:g,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",`${g}px`),v.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${w}px`),y(!1)})})})});dm.displayName=Vo;var[a0,l0]=im(Vo,{onClose(){}}),u0=m.forwardRef((t,r)=>{const{__scopeToast:s,type:a="foreground",duration:l,open:d,onClose:p,onEscapeKeyDown:h,onPause:y,onResume:v,onSwipeStart:g,onSwipeMove:w,onSwipeCancel:b,onSwipeEnd:k,...N}=t,S=Ai(Vo,s),[C,_]=m.useState(null),A=He(r,G=>_(G)),O=m.useRef(null),I=m.useRef(null),F=l||S.duration,L=m.useRef(0),U=m.useRef(F),q=m.useRef(0),{onToastAdd:te,onToastRemove:ne}=S,se=yt(()=>{C?.contains(document.activeElement)&&S.viewport?.focus(),p()}),Y=m.useCallback(G=>{!G||G===1/0||(window.clearTimeout(q.current),L.current=new Date().getTime(),q.current=window.setTimeout(se,G))},[se]);m.useEffect(()=>{const G=S.viewport;if(G){const me=()=>{Y(U.current),v?.()},ee=()=>{const ie=new Date().getTime()-L.current;U.current=U.current-ie,window.clearTimeout(q.current),y?.()};return G.addEventListener(Su,ee),G.addEventListener(Cu,me),()=>{G.removeEventListener(Su,ee),G.removeEventListener(Cu,me)}}},[S.viewport,F,y,v,Y]),m.useEffect(()=>{d&&!S.isClosePausedRef.current&&Y(F)},[d,F,S.isClosePausedRef,Y]),m.useEffect(()=>(te(),()=>ne()),[te,ne]);const ae=m.useMemo(()=>C?ym(C):null,[C]);return S.viewport?c.jsxs(c.Fragment,{children:[ae&&c.jsx(c0,{__scopeToast:s,role:"status","aria-live":a==="foreground"?"assertive":"polite",children:ae}),c.jsx(a0,{scope:s,onClose:se,children:Ti.createPortal(c.jsx(Yu.ItemSlot,{scope:s,children:c.jsx(Ub,{asChild:!0,onEscapeKeyDown:ce(h,()=>{S.isFocusedToastEscapeKeyDownRef.current||se(),S.isFocusedToastEscapeKeyDownRef.current=!1}),children:c.jsx(Re.li,{tabIndex:0,"data-state":d?"open":"closed","data-swipe-direction":S.swipeDirection,...N,ref:A,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:ce(t.onKeyDown,G=>{G.key==="Escape"&&(h?.(G.nativeEvent),G.nativeEvent.defaultPrevented||(S.isFocusedToastEscapeKeyDownRef.current=!0,se()))}),onPointerDown:ce(t.onPointerDown,G=>{G.button===0&&(O.current={x:G.clientX,y:G.clientY})}),onPointerMove:ce(t.onPointerMove,G=>{if(!O.current)return;const me=G.clientX-O.current.x,ee=G.clientY-O.current.y,ie=!!I.current,P=["left","right"].includes(S.swipeDirection),z=["left","up"].includes(S.swipeDirection)?Math.min:Math.max,V=P?z(0,me):0,T=P?0:z(0,ee),H=G.pointerType==="touch"?10:2,de={x:V,y:T},pe={originalEvent:G,delta:de};ie?(I.current=de,ui(o0,w,pe,{discrete:!1})):Qp(de,S.swipeDirection,H)?(I.current=de,ui(r0,g,pe,{discrete:!1}),G.target.setPointerCapture(G.pointerId)):(Math.abs(me)>H||Math.abs(ee)>H)&&(O.current=null)}),onPointerUp:ce(t.onPointerUp,G=>{const me=I.current,ee=G.target;if(ee.hasPointerCapture(G.pointerId)&&ee.releasePointerCapture(G.pointerId),I.current=null,O.current=null,me){const ie=G.currentTarget,P={originalEvent:G,delta:me};Qp(me,S.swipeDirection,S.swipeThreshold)?ui(i0,k,P,{discrete:!0}):ui(s0,b,P,{discrete:!0}),ie.addEventListener("click",z=>z.preventDefault(),{once:!0})}})})})}),S.viewport)})]}):null}),c0=t=>{const{__scopeToast:r,children:s,...a}=t,l=Ai(Vo,r),[d,p]=m.useState(!1),[h,y]=m.useState(!1);return p0(()=>p(!0)),m.useEffect(()=>{const v=window.setTimeout(()=>y(!0),1e3);return()=>window.clearTimeout(v)},[]),h?null:c.jsx(Gu,{asChild:!0,children:c.jsx(Oi,{...a,children:d&&c.jsxs(c.Fragment,{children:[l.label," ",s]})})})},d0="ToastTitle",fm=m.forwardRef((t,r)=>{const{__scopeToast:s,...a}=t;return c.jsx(Re.div,{...a,ref:r})});fm.displayName=d0;var f0="ToastDescription",pm=m.forwardRef((t,r)=>{const{__scopeToast:s,...a}=t;return c.jsx(Re.div,{...a,ref:r})});pm.displayName=f0;var hm="ToastAction",mm=m.forwardRef((t,r)=>{const{altText:s,...a}=t;return s.trim()?c.jsx(vm,{altText:s,asChild:!0,children:c.jsx(Xu,{...a,ref:r})}):(console.error(`Invalid prop \`altText\` supplied to \`${hm}\`. Expected non-empty \`string\`.`),null)});mm.displayName=hm;var gm="ToastClose",Xu=m.forwardRef((t,r)=>{const{__scopeToast:s,...a}=t,l=l0(gm,s);return c.jsx(vm,{asChild:!0,children:c.jsx(Re.button,{type:"button",...a,ref:r,onClick:ce(t.onClick,l.onClose)})})});Xu.displayName=gm;var vm=m.forwardRef((t,r)=>{const{__scopeToast:s,altText:a,...l}=t;return c.jsx(Re.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":a||void 0,...l,ref:r})});function ym(t){const r=[];return Array.from(t.childNodes).forEach(a=>{if(a.nodeType===a.TEXT_NODE&&a.textContent&&r.push(a.textContent),h0(a)){const l=a.ariaHidden||a.hidden||a.style.display==="none",d=a.dataset.radixToastAnnounceExclude==="";if(!l)if(d){const p=a.dataset.radixToastAnnounceAlt;p&&r.push(p)}else r.push(...ym(a))}}),r}function ui(t,r,s,{discrete:a}){const l=s.originalEvent.currentTarget,d=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:s});r&&l.addEventListener(t,r,{once:!0}),a?Qu(l,d):l.dispatchEvent(d)}var Qp=(t,r,s=0)=>{const a=Math.abs(t.x),l=Math.abs(t.y),d=a>l;return r==="left"||r==="right"?d&&a>s:!d&&l>s};function p0(t=()=>{}){const r=yt(t);Qt(()=>{let s=0,a=0;return s=window.requestAnimationFrame(()=>a=window.requestAnimationFrame(r)),()=>{window.cancelAnimationFrame(s),window.cancelAnimationFrame(a)}},[r])}function h0(t){return t.nodeType===t.ELEMENT_NODE}function m0(t){const r=[],s=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{const l=a.tagName==="INPUT"&&a.type==="hidden";return a.disabled||a.hidden||l?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;s.nextNode();)r.push(s.currentNode);return r}function Xl(t){const r=document.activeElement;return t.some(s=>s===r?!0:(s.focus(),document.activeElement!==r))}var g0=am,xm=um,wm=dm,bm=fm,Sm=pm,Cm=mm,Em=Xu;function km(t){var r,s,a="";if(typeof t=="string"||typeof t=="number")a+=t;else if(typeof t=="object")if(Array.isArray(t)){var l=t.length;for(r=0;r<l;r++)t[r]&&(s=km(t[r]))&&(a&&(a+=" "),a+=s)}else for(s in t)t[s]&&(a&&(a+=" "),a+=s);return a}function Nm(){for(var t,r,s=0,a="",l=arguments.length;s<l;s++)(t=arguments[s])&&(r=km(t))&&(a&&(a+=" "),a+=r);return a}const Gp=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,qp=Nm,v0=(t,r)=>s=>{var a;if(r?.variants==null)return qp(t,s?.class,s?.className);const{variants:l,defaultVariants:d}=r,p=Object.keys(l).map(v=>{const g=s?.[v],w=d?.[v];if(g===null)return null;const b=Gp(g)||Gp(w);return l[v][b]}),h=s&&Object.entries(s).reduce((v,g)=>{let[w,b]=g;return b===void 0||(v[w]=b),v},{}),y=r==null||(a=r.compoundVariants)===null||a===void 0?void 0:a.reduce((v,g)=>{let{class:w,className:b,...k}=g;return Object.entries(k).every(N=>{let[S,C]=N;return Array.isArray(C)?C.includes({...d,...h}[S]):{...d,...h}[S]===C})?[...v,w,b]:v},[]);return qp(t,p,y,s?.class,s?.className)};const y0=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Rm=(...t)=>t.filter((r,s,a)=>!!r&&a.indexOf(r)===s).join(" ");var x0={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 w0=m.forwardRef(({color:t="currentColor",size:r=24,strokeWidth:s=2,absoluteStrokeWidth:a,className:l="",children:d,iconNode:p,...h},y)=>m.createElement("svg",{ref:y,...x0,width:r,height:r,stroke:t,strokeWidth:a?Number(s)*24/Number(r):s,className:Rm("lucide",l),...h},[...p.map(([v,g])=>m.createElement(v,g)),...Array.isArray(d)?d:[d]]));const Ur=(t,r)=>{const s=m.forwardRef(({className:a,...l},d)=>m.createElement(w0,{ref:d,iconNode:r,className:Rm(`lucide-${y0(t)}`,a),...l}));return s.displayName=`${t}`,s};const b0=Ur("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 S0=Ur("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const C0=Ur("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const E0=Ur("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 k0=Ur("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);const N0=Ur("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Zu="-",R0=t=>{const r=j0(t),{conflictingClassGroups:s,conflictingClassGroupModifiers:a}=t;return{getClassGroupId:p=>{const h=p.split(Zu);return h[0]===""&&h.length!==1&&h.shift(),Pm(h,r)||P0(p)},getConflictingClassGroupIds:(p,h)=>{const y=s[p]||[];return h&&a[p]?[...y,...a[p]]:y}}},Pm=(t,r)=>{if(t.length===0)return r.classGroupId;const s=t[0],a=r.nextPart.get(s),l=a?Pm(t.slice(1),a):void 0;if(l)return l;if(r.validators.length===0)return;const d=t.join(Zu);return r.validators.find(({validator:p})=>p(d))?.classGroupId},Yp=/^\[(.+)\]$/,P0=t=>{if(Yp.test(t)){const r=Yp.exec(t)[1],s=r?.substring(0,r.indexOf(":"));if(s)return"arbitrary.."+s}},j0=t=>{const{theme:r,prefix:s}=t,a={nextPart:new Map,validators:[]};return _0(Object.entries(t.classGroups),s).forEach(([d,p])=>{ku(p,a,d,r)}),a},ku=(t,r,s,a)=>{t.forEach(l=>{if(typeof l=="string"){const d=l===""?r:Xp(r,l);d.classGroupId=s;return}if(typeof l=="function"){if(T0(l)){ku(l(a),r,s,a);return}r.validators.push({validator:l,classGroupId:s});return}Object.entries(l).forEach(([d,p])=>{ku(p,Xp(r,d),s,a)})})},Xp=(t,r)=>{let s=t;return r.split(Zu).forEach(a=>{s.nextPart.has(a)||s.nextPart.set(a,{nextPart:new Map,validators:[]}),s=s.nextPart.get(a)}),s},T0=t=>t.isThemeGetter,_0=(t,r)=>r?t.map(([s,a])=>{const l=a.map(d=>typeof d=="string"?r+d:typeof d=="object"?Object.fromEntries(Object.entries(d).map(([p,h])=>[r+p,h])):d);return[s,l]}):t,O0=t=>{if(t<1)return{get:()=>{},set:()=>{}};let r=0,s=new Map,a=new Map;const l=(d,p)=>{s.set(d,p),r++,r>t&&(r=0,a=s,s=new Map)};return{get(d){let p=s.get(d);if(p!==void 0)return p;if((p=a.get(d))!==void 0)return l(d,p),p},set(d,p){s.has(d)?s.set(d,p):l(d,p)}}},jm="!",A0=t=>{const{separator:r,experimentalParseClassName:s}=t,a=r.length===1,l=r[0],d=r.length,p=h=>{const y=[];let v=0,g=0,w;for(let C=0;C<h.length;C++){let _=h[C];if(v===0){if(_===l&&(a||h.slice(C,C+d)===r)){y.push(h.slice(g,C)),g=C+d;continue}if(_==="/"){w=C;continue}}_==="["?v++:_==="]"&&v--}const b=y.length===0?h:h.substring(g),k=b.startsWith(jm),N=k?b.substring(1):b,S=w&&w>g?w-g:void 0;return{modifiers:y,hasImportantModifier:k,baseClassName:N,maybePostfixModifierPosition:S}};return s?h=>s({className:h,parseClassName:p}):p},M0=t=>{if(t.length<=1)return t;const r=[];let s=[];return t.forEach(a=>{a[0]==="["?(r.push(...s.sort(),a),s=[]):s.push(a)}),r.push(...s.sort()),r},I0=t=>({cache:O0(t.cacheSize),parseClassName:A0(t),...R0(t)}),D0=/\s+/,L0=(t,r)=>{const{parseClassName:s,getClassGroupId:a,getConflictingClassGroupIds:l}=r,d=[],p=t.trim().split(D0);let h="";for(let y=p.length-1;y>=0;y-=1){const v=p[y],{modifiers:g,hasImportantModifier:w,baseClassName:b,maybePostfixModifierPosition:k}=s(v);let N=!!k,S=a(N?b.substring(0,k):b);if(!S){if(!N){h=v+(h.length>0?" "+h:h);continue}if(S=a(b),!S){h=v+(h.length>0?" "+h:h);continue}N=!1}const C=M0(g).join(":"),_=w?C+jm:C,A=_+S;if(d.includes(A))continue;d.push(A);const O=l(S,N);for(let I=0;I<O.length;++I){const F=O[I];d.push(_+F)}h=v+(h.length>0?" "+h:h)}return h};function F0(){let t=0,r,s,a="";for(;t<arguments.length;)(r=arguments[t++])&&(s=Tm(r))&&(a&&(a+=" "),a+=s);return a}const Tm=t=>{if(typeof t=="string")return t;let r,s="";for(let a=0;a<t.length;a++)t[a]&&(r=Tm(t[a]))&&(s&&(s+=" "),s+=r);return s};function $0(t,...r){let s,a,l,d=p;function p(y){const v=r.reduce((g,w)=>w(g),t());return s=I0(v),a=s.cache.get,l=s.cache.set,d=h,h(y)}function h(y){const v=a(y);if(v)return v;const g=L0(y,s);return l(y,g),g}return function(){return d(F0.apply(null,arguments))}}const Te=t=>{const r=s=>s[t]||[];return r.isThemeGetter=!0,r},_m=/^\[(?:([a-z-]+):)?(.+)\]$/i,z0=/^\d+\/\d+$/,U0=new Set(["px","full","screen"]),H0=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,B0=/\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$/,W0=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,K0=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,V0=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,on=t=>Mr(t)||U0.has(t)||z0.test(t),Pn=t=>Hr(t,"length",e1),Mr=t=>!!t&&!Number.isNaN(Number(t)),Zl=t=>Hr(t,"number",Mr),Ao=t=>!!t&&Number.isInteger(Number(t)),Q0=t=>t.endsWith("%")&&Mr(t.slice(0,-1)),ge=t=>_m.test(t),jn=t=>H0.test(t),G0=new Set(["length","size","percentage"]),q0=t=>Hr(t,G0,Om),Y0=t=>Hr(t,"position",Om),X0=new Set(["image","url"]),Z0=t=>Hr(t,X0,n1),J0=t=>Hr(t,"",t1),Mo=()=>!0,Hr=(t,r,s)=>{const a=_m.exec(t);return a?a[1]?typeof r=="string"?a[1]===r:r.has(a[1]):s(a[2]):!1},e1=t=>B0.test(t)&&!W0.test(t),Om=()=>!1,t1=t=>K0.test(t),n1=t=>V0.test(t),r1=()=>{const t=Te("colors"),r=Te("spacing"),s=Te("blur"),a=Te("brightness"),l=Te("borderColor"),d=Te("borderRadius"),p=Te("borderSpacing"),h=Te("borderWidth"),y=Te("contrast"),v=Te("grayscale"),g=Te("hueRotate"),w=Te("invert"),b=Te("gap"),k=Te("gradientColorStops"),N=Te("gradientColorStopPositions"),S=Te("inset"),C=Te("margin"),_=Te("opacity"),A=Te("padding"),O=Te("saturate"),I=Te("scale"),F=Te("sepia"),L=Te("skew"),U=Te("space"),q=Te("translate"),te=()=>["auto","contain","none"],ne=()=>["auto","hidden","clip","visible","scroll"],se=()=>["auto",ge,r],Y=()=>[ge,r],ae=()=>["",on,Pn],G=()=>["auto",Mr,ge],me=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ee=()=>["solid","dashed","dotted","double","none"],ie=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],P=()=>["start","end","center","between","around","evenly","stretch"],z=()=>["","0",ge],V=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>[Mr,ge];return{cacheSize:500,separator:":",theme:{colors:[Mo],spacing:[on,Pn],blur:["none","",jn,ge],brightness:T(),borderColor:[t],borderRadius:["none","","full",jn,ge],borderSpacing:Y(),borderWidth:ae(),contrast:T(),grayscale:z(),hueRotate:T(),invert:z(),gap:Y(),gradientColorStops:[t],gradientColorStopPositions:[Q0,Pn],inset:se(),margin:se(),opacity:T(),padding:Y(),saturate:T(),scale:T(),sepia:z(),skew:T(),space:Y(),translate:Y()},classGroups:{aspect:[{aspect:["auto","square","video",ge]}],container:["container"],columns:[{columns:[jn]}],"break-after":[{"break-after":V()}],"break-before":[{"break-before":V()}],"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:[...me(),ge]}],overflow:[{overflow:ne()}],"overflow-x":[{"overflow-x":ne()}],"overflow-y":[{"overflow-y":ne()}],overscroll:[{overscroll:te()}],"overscroll-x":[{"overscroll-x":te()}],"overscroll-y":[{"overscroll-y":te()}],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,ge]}],basis:[{basis:se()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ge]}],grow:[{grow:z()}],shrink:[{shrink:z()}],order:[{order:["first","last","none",Ao,ge]}],"grid-cols":[{"grid-cols":[Mo]}],"col-start-end":[{col:["auto",{span:["full",Ao,ge]},ge]}],"col-start":[{"col-start":G()}],"col-end":[{"col-end":G()}],"grid-rows":[{"grid-rows":[Mo]}],"row-start-end":[{row:["auto",{span:[Ao,ge]},ge]}],"row-start":[{"row-start":G()}],"row-end":[{"row-end":G()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ge]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ge]}],gap:[{gap:[b]}],"gap-x":[{"gap-x":[b]}],"gap-y":[{"gap-y":[b]}],"justify-content":[{justify:["normal",...P()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...P(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...P(),"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:[C]}],mx:[{mx:[C]}],my:[{my:[C]}],ms:[{ms:[C]}],me:[{me:[C]}],mt:[{mt:[C]}],mr:[{mr:[C]}],mb:[{mb:[C]}],ml:[{ml:[C]}],"space-x":[{"space-x":[U]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[U]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ge,r]}],"min-w":[{"min-w":[ge,r,"min","max","fit"]}],"max-w":[{"max-w":[ge,r,"none","full","min","max","fit","prose",{screen:[jn]},jn]}],h:[{h:[ge,r,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ge,r,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ge,r,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ge,r,"auto","min","max","fit"]}],"font-size":[{text:["base",jn,Pn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Zl]}],"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",ge]}],"line-clamp":[{"line-clamp":["none",Mr,Zl]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",on,ge]}],"list-image":[{"list-image":["none",ge]}],"list-style-type":[{list:["none","disc","decimal",ge]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[_]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[_]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ee(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",on,Pn]}],"underline-offset":[{"underline-offset":["auto",on,ge]}],"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:Y()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ge]}],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",ge]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[_]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...me(),Y0]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",q0]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Z0]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[N]}],"gradient-via-pos":[{via:[N]}],"gradient-to-pos":[{to:[N]}],"gradient-from":[{from:[k]}],"gradient-via":[{via:[k]}],"gradient-to":[{to:[k]}],rounded:[{rounded:[d]}],"rounded-s":[{"rounded-s":[d]}],"rounded-e":[{"rounded-e":[d]}],"rounded-t":[{"rounded-t":[d]}],"rounded-r":[{"rounded-r":[d]}],"rounded-b":[{"rounded-b":[d]}],"rounded-l":[{"rounded-l":[d]}],"rounded-ss":[{"rounded-ss":[d]}],"rounded-se":[{"rounded-se":[d]}],"rounded-ee":[{"rounded-ee":[d]}],"rounded-es":[{"rounded-es":[d]}],"rounded-tl":[{"rounded-tl":[d]}],"rounded-tr":[{"rounded-tr":[d]}],"rounded-br":[{"rounded-br":[d]}],"rounded-bl":[{"rounded-bl":[d]}],"border-w":[{border:[h]}],"border-w-x":[{"border-x":[h]}],"border-w-y":[{"border-y":[h]}],"border-w-s":[{"border-s":[h]}],"border-w-e":[{"border-e":[h]}],"border-w-t":[{"border-t":[h]}],"border-w-r":[{"border-r":[h]}],"border-w-b":[{"border-b":[h]}],"border-w-l":[{"border-l":[h]}],"border-opacity":[{"border-opacity":[_]}],"border-style":[{border:[...ee(),"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":[_]}],"divide-style":[{divide:ee()}],"border-color":[{border:[l]}],"border-color-x":[{"border-x":[l]}],"border-color-y":[{"border-y":[l]}],"border-color-s":[{"border-s":[l]}],"border-color-e":[{"border-e":[l]}],"border-color-t":[{"border-t":[l]}],"border-color-r":[{"border-r":[l]}],"border-color-b":[{"border-b":[l]}],"border-color-l":[{"border-l":[l]}],"divide-color":[{divide:[l]}],"outline-style":[{outline:["",...ee()]}],"outline-offset":[{"outline-offset":[on,ge]}],"outline-w":[{outline:[on,Pn]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:ae()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[_]}],"ring-offset-w":[{"ring-offset":[on,Pn]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",jn,J0]}],"shadow-color":[{shadow:[Mo]}],opacity:[{opacity:[_]}],"mix-blend":[{"mix-blend":[...ie(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ie()}],filter:[{filter:["","none"]}],blur:[{blur:[s]}],brightness:[{brightness:[a]}],contrast:[{contrast:[y]}],"drop-shadow":[{"drop-shadow":["","none",jn,ge]}],grayscale:[{grayscale:[v]}],"hue-rotate":[{"hue-rotate":[g]}],invert:[{invert:[w]}],saturate:[{saturate:[O]}],sepia:[{sepia:[F]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[s]}],"backdrop-brightness":[{"backdrop-brightness":[a]}],"backdrop-contrast":[{"backdrop-contrast":[y]}],"backdrop-grayscale":[{"backdrop-grayscale":[v]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[g]}],"backdrop-invert":[{"backdrop-invert":[w]}],"backdrop-opacity":[{"backdrop-opacity":[_]}],"backdrop-saturate":[{"backdrop-saturate":[O]}],"backdrop-sepia":[{"backdrop-sepia":[F]}],"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",ge]}],duration:[{duration:T()}],ease:[{ease:["linear","in","out","in-out",ge]}],delay:[{delay:T()}],animate:[{animate:["none","spin","ping","pulse","bounce",ge]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[I]}],"scale-x":[{"scale-x":[I]}],"scale-y":[{"scale-y":[I]}],rotate:[{rotate:[Ao,ge]}],"translate-x":[{"translate-x":[q]}],"translate-y":[{"translate-y":[q]}],"skew-x":[{"skew-x":[L]}],"skew-y":[{"skew-y":[L]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ge]}],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",ge]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":Y()}],"scroll-mx":[{"scroll-mx":Y()}],"scroll-my":[{"scroll-my":Y()}],"scroll-ms":[{"scroll-ms":Y()}],"scroll-me":[{"scroll-me":Y()}],"scroll-mt":[{"scroll-mt":Y()}],"scroll-mr":[{"scroll-mr":Y()}],"scroll-mb":[{"scroll-mb":Y()}],"scroll-ml":[{"scroll-ml":Y()}],"scroll-p":[{"scroll-p":Y()}],"scroll-px":[{"scroll-px":Y()}],"scroll-py":[{"scroll-py":Y()}],"scroll-ps":[{"scroll-ps":Y()}],"scroll-pe":[{"scroll-pe":Y()}],"scroll-pt":[{"scroll-pt":Y()}],"scroll-pr":[{"scroll-pr":Y()}],"scroll-pb":[{"scroll-pb":Y()}],"scroll-pl":[{"scroll-pl":Y()}],"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",ge]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[on,Pn,Zl]}],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"]}}},o1=$0(r1);function Le(...t){return o1(Nm(t))}const s1=g0,Am=m.forwardRef(({className:t,...r},s)=>c.jsx(xm,{ref:s,className:Le("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}));Am.displayName=xm.displayName;const i1=v0("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"}}),Mm=m.forwardRef(({className:t,variant:r,...s},a)=>c.jsx(wm,{ref:a,className:Le(i1({variant:r}),t),...s}));Mm.displayName=wm.displayName;const a1=m.forwardRef(({className:t,...r},s)=>c.jsx(Cm,{ref:s,className:Le("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}));a1.displayName=Cm.displayName;const Im=m.forwardRef(({className:t,...r},s)=>c.jsx(Em,{ref:s,className:Le("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:c.jsx(N0,{className:"h-4 w-4"})}));Im.displayName=Em.displayName;const Dm=m.forwardRef(({className:t,...r},s)=>c.jsx(bm,{ref:s,className:Le("text-sm font-semibold",t),...r}));Dm.displayName=bm.displayName;const Lm=m.forwardRef(({className:t,...r},s)=>c.jsx(Sm,{ref:s,className:Le("text-sm opacity-90",t),...r}));Lm.displayName=Sm.displayName;function l1(){const{toasts:t}=xb();return c.jsxs(s1,{children:[t.map(function({id:r,title:s,description:a,action:l,...d}){return c.jsxs(Mm,{...d,children:[c.jsxs("div",{className:"grid gap-1",children:[s&&c.jsx(Dm,{children:s}),a&&c.jsx(Lm,{children:a})]}),l,c.jsx(Im,{})]},r)}),c.jsx(Am,{})]})}var u1=Iu[" useId ".trim().toString()]||(()=>{}),c1=0;function $o(t){const[r,s]=m.useState(u1());return Qt(()=>{s(a=>a??String(c1++))},[t]),r?`radix-${r}`:""}const d1=["top","right","bottom","left"],In=Math.min,gt=Math.max,Si=Math.round,ci=Math.floor,Kt=t=>({x:t,y:t}),f1={left:"right",right:"left",bottom:"top",top:"bottom"};function Nu(t,r,s){return gt(t,In(r,s))}function sn(t,r){return typeof t=="function"?t(r):t}function an(t){return t.split("-")[0]}function Br(t){return t.split("-")[1]}function Ju(t){return t==="x"?"y":"x"}function ec(t){return t==="y"?"height":"width"}function Bt(t){const r=t[0];return r==="t"||r==="b"?"y":"x"}function tc(t){return Ju(Bt(t))}function p1(t,r,s){s===void 0&&(s=!1);const a=Br(t),l=tc(t),d=ec(l);let p=l==="x"?a===(s?"end":"start")?"right":"left":a==="start"?"bottom":"top";return r.reference[d]>r.floating[d]&&(p=Ci(p)),[p,Ci(p)]}function h1(t){const r=Ci(t);return[Ru(t),r,Ru(r)]}function Ru(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const Zp=["left","right"],Jp=["right","left"],m1=["top","bottom"],g1=["bottom","top"];function v1(t,r,s){switch(t){case"top":case"bottom":return s?r?Jp:Zp:r?Zp:Jp;case"left":case"right":return r?m1:g1;default:return[]}}function y1(t,r,s,a){const l=Br(t);let d=v1(an(t),s==="start",a);return l&&(d=d.map(p=>p+"-"+l),r&&(d=d.concat(d.map(Ru)))),d}function Ci(t){const r=an(t);return f1[r]+t.slice(r.length)}function x1(t){return{top:0,right:0,bottom:0,left:0,...t}}function Fm(t){return typeof t!="number"?x1(t):{top:t,right:t,bottom:t,left:t}}function Ei(t){const{x:r,y:s,width:a,height:l}=t;return{width:a,height:l,top:s,left:r,right:r+a,bottom:s+l,x:r,y:s}}function eh(t,r,s){let{reference:a,floating:l}=t;const d=Bt(r),p=tc(r),h=ec(p),y=an(r),v=d==="y",g=a.x+a.width/2-l.width/2,w=a.y+a.height/2-l.height/2,b=a[h]/2-l[h]/2;let k;switch(y){case"top":k={x:g,y:a.y-l.height};break;case"bottom":k={x:g,y:a.y+a.height};break;case"right":k={x:a.x+a.width,y:w};break;case"left":k={x:a.x-l.width,y:w};break;default:k={x:a.x,y:a.y}}switch(Br(r)){case"start":k[p]-=b*(s&&v?-1:1);break;case"end":k[p]+=b*(s&&v?-1:1);break}return k}async function w1(t,r){var s;r===void 0&&(r={});const{x:a,y:l,platform:d,rects:p,elements:h,strategy:y}=t,{boundary:v="clippingAncestors",rootBoundary:g="viewport",elementContext:w="floating",altBoundary:b=!1,padding:k=0}=sn(r,t),N=Fm(k),C=h[b?w==="floating"?"reference":"floating":w],_=Ei(await d.getClippingRect({element:(s=await(d.isElement==null?void 0:d.isElement(C)))==null||s?C:C.contextElement||await(d.getDocumentElement==null?void 0:d.getDocumentElement(h.floating)),boundary:v,rootBoundary:g,strategy:y})),A=w==="floating"?{x:a,y:l,width:p.floating.width,height:p.floating.height}:p.reference,O=await(d.getOffsetParent==null?void 0:d.getOffsetParent(h.floating)),I=await(d.isElement==null?void 0:d.isElement(O))?await(d.getScale==null?void 0:d.getScale(O))||{x:1,y:1}:{x:1,y:1},F=Ei(d.convertOffsetParentRelativeRectToViewportRelativeRect?await d.convertOffsetParentRelativeRectToViewportRelativeRect({elements:h,rect:A,offsetParent:O,strategy:y}):A);return{top:(_.top-F.top+N.top)/I.y,bottom:(F.bottom-_.bottom+N.bottom)/I.y,left:(_.left-F.left+N.left)/I.x,right:(F.right-_.right+N.right)/I.x}}const b1=50,S1=async(t,r,s)=>{const{placement:a="bottom",strategy:l="absolute",middleware:d=[],platform:p}=s,h=p.detectOverflow?p:{...p,detectOverflow:w1},y=await(p.isRTL==null?void 0:p.isRTL(r));let v=await p.getElementRects({reference:t,floating:r,strategy:l}),{x:g,y:w}=eh(v,a,y),b=a,k=0;const N={};for(let S=0;S<d.length;S++){const C=d[S];if(!C)continue;const{name:_,fn:A}=C,{x:O,y:I,data:F,reset:L}=await A({x:g,y:w,initialPlacement:a,placement:b,strategy:l,middlewareData:N,rects:v,platform:h,elements:{reference:t,floating:r}});g=O??g,w=I??w,N[_]={...N[_],...F},L&&k<b1&&(k++,typeof L=="object"&&(L.placement&&(b=L.placement),L.rects&&(v=L.rects===!0?await p.getElementRects({reference:t,floating:r,strategy:l}):L.rects),{x:g,y:w}=eh(v,b,y)),S=-1)}return{x:g,y:w,placement:b,strategy:l,middlewareData:N}},C1=t=>({name:"arrow",options:t,async fn(r){const{x:s,y:a,placement:l,rects:d,platform:p,elements:h,middlewareData:y}=r,{element:v,padding:g=0}=sn(t,r)||{};if(v==null)return{};const w=Fm(g),b={x:s,y:a},k=tc(l),N=ec(k),S=await p.getDimensions(v),C=k==="y",_=C?"top":"left",A=C?"bottom":"right",O=C?"clientHeight":"clientWidth",I=d.reference[N]+d.reference[k]-b[k]-d.floating[N],F=b[k]-d.reference[k],L=await(p.getOffsetParent==null?void 0:p.getOffsetParent(v));let U=L?L[O]:0;(!U||!await(p.isElement==null?void 0:p.isElement(L)))&&(U=h.floating[O]||d.floating[N]);const q=I/2-F/2,te=U/2-S[N]/2-1,ne=In(w[_],te),se=In(w[A],te),Y=ne,ae=U-S[N]-se,G=U/2-S[N]/2+q,me=Nu(Y,G,ae),ee=!y.arrow&&Br(l)!=null&&G!==me&&d.reference[N]/2-(G<Y?ne:se)-S[N]/2<0,ie=ee?G<Y?G-Y:G-ae:0;return{[k]:b[k]+ie,data:{[k]:me,centerOffset:G-me-ie,...ee&&{alignmentOffset:ie}},reset:ee}}}),E1=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(r){var s,a;const{placement:l,middlewareData:d,rects:p,initialPlacement:h,platform:y,elements:v}=r,{mainAxis:g=!0,crossAxis:w=!0,fallbackPlacements:b,fallbackStrategy:k="bestFit",fallbackAxisSideDirection:N="none",flipAlignment:S=!0,...C}=sn(t,r);if((s=d.arrow)!=null&&s.alignmentOffset)return{};const _=an(l),A=Bt(h),O=an(h)===h,I=await(y.isRTL==null?void 0:y.isRTL(v.floating)),F=b||(O||!S?[Ci(h)]:h1(h)),L=N!=="none";!b&&L&&F.push(...y1(h,S,N,I));const U=[h,...F],q=await y.detectOverflow(r,C),te=[];let ne=((a=d.flip)==null?void 0:a.overflows)||[];if(g&&te.push(q[_]),w){const G=p1(l,p,I);te.push(q[G[0]],q[G[1]])}if(ne=[...ne,{placement:l,overflows:te}],!te.every(G=>G<=0)){var se,Y;const G=(((se=d.flip)==null?void 0:se.index)||0)+1,me=U[G];if(me&&(!(w==="alignment"?A!==Bt(me):!1)||ne.every(P=>Bt(P.placement)===A?P.overflows[0]>0:!0)))return{data:{index:G,overflows:ne},reset:{placement:me}};let ee=(Y=ne.filter(ie=>ie.overflows[0]<=0).sort((ie,P)=>ie.overflows[1]-P.overflows[1])[0])==null?void 0:Y.placement;if(!ee)switch(k){case"bestFit":{var ae;const ie=(ae=ne.filter(P=>{if(L){const z=Bt(P.placement);return z===A||z==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(z=>z>0).reduce((z,V)=>z+V,0)]).sort((P,z)=>P[1]-z[1])[0])==null?void 0:ae[0];ie&&(ee=ie);break}case"initialPlacement":ee=h;break}if(l!==ee)return{reset:{placement:ee}}}return{}}}};function th(t,r){return{top:t.top-r.height,right:t.right-r.width,bottom:t.bottom-r.height,left:t.left-r.width}}function nh(t){return d1.some(r=>t[r]>=0)}const k1=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(r){const{rects:s,platform:a}=r,{strategy:l="referenceHidden",...d}=sn(t,r);switch(l){case"referenceHidden":{const p=await a.detectOverflow(r,{...d,elementContext:"reference"}),h=th(p,s.reference);return{data:{referenceHiddenOffsets:h,referenceHidden:nh(h)}}}case"escaped":{const p=await a.detectOverflow(r,{...d,altBoundary:!0}),h=th(p,s.floating);return{data:{escapedOffsets:h,escaped:nh(h)}}}default:return{}}}}},$m=new Set(["left","top"]);async function N1(t,r){const{placement:s,platform:a,elements:l}=t,d=await(a.isRTL==null?void 0:a.isRTL(l.floating)),p=an(s),h=Br(s),y=Bt(s)==="y",v=$m.has(p)?-1:1,g=d&&y?-1:1,w=sn(r,t);let{mainAxis:b,crossAxis:k,alignmentAxis:N}=typeof w=="number"?{mainAxis:w,crossAxis:0,alignmentAxis:null}:{mainAxis:w.mainAxis||0,crossAxis:w.crossAxis||0,alignmentAxis:w.alignmentAxis};return h&&typeof N=="number"&&(k=h==="end"?N*-1:N),y?{x:k*g,y:b*v}:{x:b*v,y:k*g}}const R1=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(r){var s,a;const{x:l,y:d,placement:p,middlewareData:h}=r,y=await N1(r,t);return p===((s=h.offset)==null?void 0:s.placement)&&(a=h.arrow)!=null&&a.alignmentOffset?{}:{x:l+y.x,y:d+y.y,data:{...y,placement:p}}}}},P1=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(r){const{x:s,y:a,placement:l,platform:d}=r,{mainAxis:p=!0,crossAxis:h=!1,limiter:y={fn:_=>{let{x:A,y:O}=_;return{x:A,y:O}}},...v}=sn(t,r),g={x:s,y:a},w=await d.detectOverflow(r,v),b=Bt(an(l)),k=Ju(b);let N=g[k],S=g[b];if(p){const _=k==="y"?"top":"left",A=k==="y"?"bottom":"right",O=N+w[_],I=N-w[A];N=Nu(O,N,I)}if(h){const _=b==="y"?"top":"left",A=b==="y"?"bottom":"right",O=S+w[_],I=S-w[A];S=Nu(O,S,I)}const C=y.fn({...r,[k]:N,[b]:S});return{...C,data:{x:C.x-s,y:C.y-a,enabled:{[k]:p,[b]:h}}}}}},j1=function(t){return t===void 0&&(t={}),{options:t,fn(r){const{x:s,y:a,placement:l,rects:d,middlewareData:p}=r,{offset:h=0,mainAxis:y=!0,crossAxis:v=!0}=sn(t,r),g={x:s,y:a},w=Bt(l),b=Ju(w);let k=g[b],N=g[w];const S=sn(h,r),C=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(y){const O=b==="y"?"height":"width",I=d.reference[b]-d.floating[O]+C.mainAxis,F=d.reference[b]+d.reference[O]-C.mainAxis;k<I?k=I:k>F&&(k=F)}if(v){var _,A;const O=b==="y"?"width":"height",I=$m.has(an(l)),F=d.reference[w]-d.floating[O]+(I&&((_=p.offset)==null?void 0:_[w])||0)+(I?0:C.crossAxis),L=d.reference[w]+d.reference[O]+(I?0:((A=p.offset)==null?void 0:A[w])||0)-(I?C.crossAxis:0);N<F?N=F:N>L&&(N=L)}return{[b]:k,[w]:N}}}},T1=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(r){var s,a;const{placement:l,rects:d,platform:p,elements:h}=r,{apply:y=()=>{},...v}=sn(t,r),g=await p.detectOverflow(r,v),w=an(l),b=Br(l),k=Bt(l)==="y",{width:N,height:S}=d.floating;let C,_;w==="top"||w==="bottom"?(C=w,_=b===(await(p.isRTL==null?void 0:p.isRTL(h.floating))?"start":"end")?"left":"right"):(_=w,C=b==="end"?"top":"bottom");const A=S-g.top-g.bottom,O=N-g.left-g.right,I=In(S-g[C],A),F=In(N-g[_],O),L=!r.middlewareData.shift;let U=I,q=F;if((s=r.middlewareData.shift)!=null&&s.enabled.x&&(q=O),(a=r.middlewareData.shift)!=null&&a.enabled.y&&(U=A),L&&!b){const ne=gt(g.left,0),se=gt(g.right,0),Y=gt(g.top,0),ae=gt(g.bottom,0);k?q=N-2*(ne!==0||se!==0?ne+se:gt(g.left,g.right)):U=S-2*(Y!==0||ae!==0?Y+ae:gt(g.top,g.bottom))}await y({...r,availableWidth:q,availableHeight:U});const te=await p.getDimensions(h.floating);return N!==te.width||S!==te.height?{reset:{rects:!0}}:{}}}};function Mi(){return typeof window<"u"}function Wr(t){return zm(t)?(t.nodeName||"").toLowerCase():"#document"}function vt(t){var r;return(t==null||(r=t.ownerDocument)==null?void 0:r.defaultView)||window}function Gt(t){var r;return(r=(zm(t)?t.ownerDocument:t.document)||window.document)==null?void 0:r.documentElement}function zm(t){return Mi()?t instanceof Node||t instanceof vt(t).Node:!1}function Mt(t){return Mi()?t instanceof Element||t instanceof vt(t).Element:!1}function ln(t){return Mi()?t instanceof HTMLElement||t instanceof vt(t).HTMLElement:!1}function rh(t){return!Mi()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof vt(t).ShadowRoot}function Qo(t){const{overflow:r,overflowX:s,overflowY:a,display:l}=It(t);return/auto|scroll|overlay|hidden|clip/.test(r+a+s)&&l!=="inline"&&l!=="contents"}function _1(t){return/^(table|td|th)$/.test(Wr(t))}function Ii(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const O1=/transform|translate|scale|rotate|perspective|filter/,A1=/paint|layout|strict|content/,Zn=t=>!!t&&t!=="none";let Jl;function nc(t){const r=Mt(t)?It(t):t;return Zn(r.transform)||Zn(r.translate)||Zn(r.scale)||Zn(r.rotate)||Zn(r.perspective)||!rc()&&(Zn(r.backdropFilter)||Zn(r.filter))||O1.test(r.willChange||"")||A1.test(r.contain||"")}function M1(t){let r=Dn(t);for(;ln(r)&&!Lr(r);){if(nc(r))return r;if(Ii(r))return null;r=Dn(r)}return null}function rc(){return Jl==null&&(Jl=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Jl}function Lr(t){return/^(html|body|#document)$/.test(Wr(t))}function It(t){return vt(t).getComputedStyle(t)}function Di(t){return Mt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Dn(t){if(Wr(t)==="html")return t;const r=t.assignedSlot||t.parentNode||rh(t)&&t.host||Gt(t);return rh(r)?r.host:r}function Um(t){const r=Dn(t);return Lr(r)?t.ownerDocument?t.ownerDocument.body:t.body:ln(r)&&Qo(r)?r:Um(r)}function zo(t,r,s){var a;r===void 0&&(r=[]),s===void 0&&(s=!0);const l=Um(t),d=l===((a=t.ownerDocument)==null?void 0:a.body),p=vt(l);if(d){const h=Pu(p);return r.concat(p,p.visualViewport||[],Qo(l)?l:[],h&&s?zo(h):[])}else return r.concat(l,zo(l,[],s))}function Pu(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Hm(t){const r=It(t);let s=parseFloat(r.width)||0,a=parseFloat(r.height)||0;const l=ln(t),d=l?t.offsetWidth:s,p=l?t.offsetHeight:a,h=Si(s)!==d||Si(a)!==p;return h&&(s=d,a=p),{width:s,height:a,$:h}}function oc(t){return Mt(t)?t:t.contextElement}function Ir(t){const r=oc(t);if(!ln(r))return Kt(1);const s=r.getBoundingClientRect(),{width:a,height:l,$:d}=Hm(r);let p=(d?Si(s.width):s.width)/a,h=(d?Si(s.height):s.height)/l;return(!p||!Number.isFinite(p))&&(p=1),(!h||!Number.isFinite(h))&&(h=1),{x:p,y:h}}const I1=Kt(0);function Bm(t){const r=vt(t);return!rc()||!r.visualViewport?I1:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function D1(t,r,s){return r===void 0&&(r=!1),!s||r&&s!==vt(t)?!1:r}function nr(t,r,s,a){r===void 0&&(r=!1),s===void 0&&(s=!1);const l=t.getBoundingClientRect(),d=oc(t);let p=Kt(1);r&&(a?Mt(a)&&(p=Ir(a)):p=Ir(t));const h=D1(d,s,a)?Bm(d):Kt(0);let y=(l.left+h.x)/p.x,v=(l.top+h.y)/p.y,g=l.width/p.x,w=l.height/p.y;if(d){const b=vt(d),k=a&&Mt(a)?vt(a):a;let N=b,S=Pu(N);for(;S&&a&&k!==N;){const C=Ir(S),_=S.getBoundingClientRect(),A=It(S),O=_.left+(S.clientLeft+parseFloat(A.paddingLeft))*C.x,I=_.top+(S.clientTop+parseFloat(A.paddingTop))*C.y;y*=C.x,v*=C.y,g*=C.x,w*=C.y,y+=O,v+=I,N=vt(S),S=Pu(N)}}return Ei({width:g,height:w,x:y,y:v})}function Li(t,r){const s=Di(t).scrollLeft;return r?r.left+s:nr(Gt(t)).left+s}function Wm(t,r){const s=t.getBoundingClientRect(),a=s.left+r.scrollLeft-Li(t,s),l=s.top+r.scrollTop;return{x:a,y:l}}function L1(t){let{elements:r,rect:s,offsetParent:a,strategy:l}=t;const d=l==="fixed",p=Gt(a),h=r?Ii(r.floating):!1;if(a===p||h&&d)return s;let y={scrollLeft:0,scrollTop:0},v=Kt(1);const g=Kt(0),w=ln(a);if((w||!w&&!d)&&((Wr(a)!=="body"||Qo(p))&&(y=Di(a)),w)){const k=nr(a);v=Ir(a),g.x=k.x+a.clientLeft,g.y=k.y+a.clientTop}const b=p&&!w&&!d?Wm(p,y):Kt(0);return{width:s.width*v.x,height:s.height*v.y,x:s.x*v.x-y.scrollLeft*v.x+g.x+b.x,y:s.y*v.y-y.scrollTop*v.y+g.y+b.y}}function F1(t){return Array.from(t.getClientRects())}function $1(t){const r=Gt(t),s=Di(t),a=t.ownerDocument.body,l=gt(r.scrollWidth,r.clientWidth,a.scrollWidth,a.clientWidth),d=gt(r.scrollHeight,r.clientHeight,a.scrollHeight,a.clientHeight);let p=-s.scrollLeft+Li(t);const h=-s.scrollTop;return It(a).direction==="rtl"&&(p+=gt(r.clientWidth,a.clientWidth)-l),{width:l,height:d,x:p,y:h}}const oh=25;function z1(t,r){const s=vt(t),a=Gt(t),l=s.visualViewport;let d=a.clientWidth,p=a.clientHeight,h=0,y=0;if(l){d=l.width,p=l.height;const g=rc();(!g||g&&r==="fixed")&&(h=l.offsetLeft,y=l.offsetTop)}const v=Li(a);if(v<=0){const g=a.ownerDocument,w=g.body,b=getComputedStyle(w),k=g.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,N=Math.abs(a.clientWidth-w.clientWidth-k);N<=oh&&(d-=N)}else v<=oh&&(d+=v);return{width:d,height:p,x:h,y}}function U1(t,r){const s=nr(t,!0,r==="fixed"),a=s.top+t.clientTop,l=s.left+t.clientLeft,d=ln(t)?Ir(t):Kt(1),p=t.clientWidth*d.x,h=t.clientHeight*d.y,y=l*d.x,v=a*d.y;return{width:p,height:h,x:y,y:v}}function sh(t,r,s){let a;if(r==="viewport")a=z1(t,s);else if(r==="document")a=$1(Gt(t));else if(Mt(r))a=U1(r,s);else{const l=Bm(t);a={x:r.x-l.x,y:r.y-l.y,width:r.width,height:r.height}}return Ei(a)}function Km(t,r){const s=Dn(t);return s===r||!Mt(s)||Lr(s)?!1:It(s).position==="fixed"||Km(s,r)}function H1(t,r){const s=r.get(t);if(s)return s;let a=zo(t,[],!1).filter(h=>Mt(h)&&Wr(h)!=="body"),l=null;const d=It(t).position==="fixed";let p=d?Dn(t):t;for(;Mt(p)&&!Lr(p);){const h=It(p),y=nc(p);!y&&h.position==="fixed"&&(l=null),(d?!y&&!l:!y&&h.position==="static"&&!!l&&(l.position==="absolute"||l.position==="fixed")||Qo(p)&&!y&&Km(t,p))?a=a.filter(g=>g!==p):l=h,p=Dn(p)}return r.set(t,a),a}function B1(t){let{element:r,boundary:s,rootBoundary:a,strategy:l}=t;const p=[...s==="clippingAncestors"?Ii(r)?[]:H1(r,this._c):[].concat(s),a],h=sh(r,p[0],l);let y=h.top,v=h.right,g=h.bottom,w=h.left;for(let b=1;b<p.length;b++){const k=sh(r,p[b],l);y=gt(k.top,y),v=In(k.right,v),g=In(k.bottom,g),w=gt(k.left,w)}return{width:v-w,height:g-y,x:w,y}}function W1(t){const{width:r,height:s}=Hm(t);return{width:r,height:s}}function K1(t,r,s){const a=ln(r),l=Gt(r),d=s==="fixed",p=nr(t,!0,d,r);let h={scrollLeft:0,scrollTop:0};const y=Kt(0);function v(){y.x=Li(l)}if(a||!a&&!d)if((Wr(r)!=="body"||Qo(l))&&(h=Di(r)),a){const k=nr(r,!0,d,r);y.x=k.x+r.clientLeft,y.y=k.y+r.clientTop}else l&&v();d&&!a&&l&&v();const g=l&&!a&&!d?Wm(l,h):Kt(0),w=p.left+h.scrollLeft-y.x-g.x,b=p.top+h.scrollTop-y.y-g.y;return{x:w,y:b,width:p.width,height:p.height}}function eu(t){return It(t).position==="static"}function ih(t,r){if(!ln(t)||It(t).position==="fixed")return null;if(r)return r(t);let s=t.offsetParent;return Gt(t)===s&&(s=s.ownerDocument.body),s}function Vm(t,r){const s=vt(t);if(Ii(t))return s;if(!ln(t)){let l=Dn(t);for(;l&&!Lr(l);){if(Mt(l)&&!eu(l))return l;l=Dn(l)}return s}let a=ih(t,r);for(;a&&_1(a)&&eu(a);)a=ih(a,r);return a&&Lr(a)&&eu(a)&&!nc(a)?s:a||M1(t)||s}const V1=async function(t){const r=this.getOffsetParent||Vm,s=this.getDimensions,a=await s(t.floating);return{reference:K1(t.reference,await r(t.floating),t.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}};function Q1(t){return It(t).direction==="rtl"}const G1={convertOffsetParentRelativeRectToViewportRelativeRect:L1,getDocumentElement:Gt,getClippingRect:B1,getOffsetParent:Vm,getElementRects:V1,getClientRects:F1,getDimensions:W1,getScale:Ir,isElement:Mt,isRTL:Q1};function Qm(t,r){return t.x===r.x&&t.y===r.y&&t.width===r.width&&t.height===r.height}function q1(t,r){let s=null,a;const l=Gt(t);function d(){var h;clearTimeout(a),(h=s)==null||h.disconnect(),s=null}function p(h,y){h===void 0&&(h=!1),y===void 0&&(y=1),d();const v=t.getBoundingClientRect(),{left:g,top:w,width:b,height:k}=v;if(h||r(),!b||!k)return;const N=ci(w),S=ci(l.clientWidth-(g+b)),C=ci(l.clientHeight-(w+k)),_=ci(g),O={rootMargin:-N+"px "+-S+"px "+-C+"px "+-_+"px",threshold:gt(0,In(1,y))||1};let I=!0;function F(L){const U=L[0].intersectionRatio;if(U!==y){if(!I)return p();U?p(!1,U):a=setTimeout(()=>{p(!1,1e-7)},1e3)}U===1&&!Qm(v,t.getBoundingClientRect())&&p(),I=!1}try{s=new IntersectionObserver(F,{...O,root:l.ownerDocument})}catch{s=new IntersectionObserver(F,O)}s.observe(t)}return p(!0),d}function Y1(t,r,s,a){a===void 0&&(a={});const{ancestorScroll:l=!0,ancestorResize:d=!0,elementResize:p=typeof ResizeObserver=="function",layoutShift:h=typeof IntersectionObserver=="function",animationFrame:y=!1}=a,v=oc(t),g=l||d?[...v?zo(v):[],...r?zo(r):[]]:[];g.forEach(_=>{l&&_.addEventListener("scroll",s,{passive:!0}),d&&_.addEventListener("resize",s)});const w=v&&h?q1(v,s):null;let b=-1,k=null;p&&(k=new ResizeObserver(_=>{let[A]=_;A&&A.target===v&&k&&r&&(k.unobserve(r),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var O;(O=k)==null||O.observe(r)})),s()}),v&&!y&&k.observe(v),r&&k.observe(r));let N,S=y?nr(t):null;y&&C();function C(){const _=nr(t);S&&!Qm(S,_)&&s(),S=_,N=requestAnimationFrame(C)}return s(),()=>{var _;g.forEach(A=>{l&&A.removeEventListener("scroll",s),d&&A.removeEventListener("resize",s)}),w?.(),(_=k)==null||_.disconnect(),k=null,y&&cancelAnimationFrame(N)}}const X1=R1,Z1=P1,J1=E1,eS=T1,tS=k1,ah=C1,nS=j1,rS=(t,r,s)=>{const a=new Map,l={platform:G1,...s},d={...l.platform,_c:a};return S1(t,r,{...l,platform:d})};var oS=typeof document<"u",sS=function(){},vi=oS?m.useLayoutEffect:sS;function ki(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,a,l;if(t&&r&&typeof t=="object"){if(Array.isArray(t)){if(s=t.length,s!==r.length)return!1;for(a=s;a--!==0;)if(!ki(t[a],r[a]))return!1;return!0}if(l=Object.keys(t),s=l.length,s!==Object.keys(r).length)return!1;for(a=s;a--!==0;)if(!{}.hasOwnProperty.call(r,l[a]))return!1;for(a=s;a--!==0;){const d=l[a];if(!(d==="_owner"&&t.$$typeof)&&!ki(t[d],r[d]))return!1}return!0}return t!==t&&r!==r}function Gm(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function lh(t,r){const s=Gm(t);return Math.round(r*s)/s}function tu(t){const r=m.useRef(t);return vi(()=>{r.current=t}),r}function iS(t){t===void 0&&(t={});const{placement:r="bottom",strategy:s="absolute",middleware:a=[],platform:l,elements:{reference:d,floating:p}={},transform:h=!0,whileElementsMounted:y,open:v}=t,[g,w]=m.useState({x:0,y:0,strategy:s,placement:r,middlewareData:{},isPositioned:!1}),[b,k]=m.useState(a);ki(b,a)||k(a);const[N,S]=m.useState(null),[C,_]=m.useState(null),A=m.useCallback(P=>{P!==L.current&&(L.current=P,S(P))},[]),O=m.useCallback(P=>{P!==U.current&&(U.current=P,_(P))},[]),I=d||N,F=p||C,L=m.useRef(null),U=m.useRef(null),q=m.useRef(g),te=y!=null,ne=tu(y),se=tu(l),Y=tu(v),ae=m.useCallback(()=>{if(!L.current||!U.current)return;const P={placement:r,strategy:s,middleware:b};se.current&&(P.platform=se.current),rS(L.current,U.current,P).then(z=>{const V={...z,isPositioned:Y.current!==!1};G.current&&!ki(q.current,V)&&(q.current=V,Ti.flushSync(()=>{w(V)}))})},[b,r,s,se,Y]);vi(()=>{v===!1&&q.current.isPositioned&&(q.current.isPositioned=!1,w(P=>({...P,isPositioned:!1})))},[v]);const G=m.useRef(!1);vi(()=>(G.current=!0,()=>{G.current=!1}),[]),vi(()=>{if(I&&(L.current=I),F&&(U.current=F),I&&F){if(ne.current)return ne.current(I,F,ae);ae()}},[I,F,ae,ne,te]);const me=m.useMemo(()=>({reference:L,floating:U,setReference:A,setFloating:O}),[A,O]),ee=m.useMemo(()=>({reference:I,floating:F}),[I,F]),ie=m.useMemo(()=>{const P={position:s,left:0,top:0};if(!ee.floating)return P;const z=lh(ee.floating,g.x),V=lh(ee.floating,g.y);return h?{...P,transform:"translate("+z+"px, "+V+"px)",...Gm(ee.floating)>=1.5&&{willChange:"transform"}}:{position:s,left:z,top:V}},[s,h,ee.floating,g.x,g.y]);return m.useMemo(()=>({...g,update:ae,refs:me,elements:ee,floatingStyles:ie}),[g,ae,me,ee,ie])}const aS=t=>{function r(s){return{}.hasOwnProperty.call(s,"current")}return{name:"arrow",options:t,fn(s){const{element:a,padding:l}=typeof t=="function"?t(s):t;return a&&r(a)?a.current!=null?ah({element:a.current,padding:l}).fn(s):{}:a?ah({element:a,padding:l}).fn(s):{}}}},lS=(t,r)=>{const s=X1(t);return{name:s.name,fn:s.fn,options:[t,r]}},uS=(t,r)=>{const s=Z1(t);return{name:s.name,fn:s.fn,options:[t,r]}},cS=(t,r)=>({fn:nS(t).fn,options:[t,r]}),dS=(t,r)=>{const s=J1(t);return{name:s.name,fn:s.fn,options:[t,r]}},fS=(t,r)=>{const s=eS(t);return{name:s.name,fn:s.fn,options:[t,r]}},pS=(t,r)=>{const s=tS(t);return{name:s.name,fn:s.fn,options:[t,r]}},hS=(t,r)=>{const s=aS(t);return{name:s.name,fn:s.fn,options:[t,r]}};var mS="Arrow",qm=m.forwardRef((t,r)=>{const{children:s,width:a=10,height:l=5,...d}=t;return c.jsx(Re.svg,{...d,ref:r,width:a,height:l,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?s:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});qm.displayName=mS;var gS=qm;function vS(t){const[r,s]=m.useState(void 0);return Qt(()=>{if(t){s({width:t.offsetWidth,height:t.offsetHeight});const a=new ResizeObserver(l=>{if(!Array.isArray(l)||!l.length)return;const d=l[0];let p,h;if("borderBoxSize"in d){const y=d.borderBoxSize,v=Array.isArray(y)?y[0]:y;p=v.inlineSize,h=v.blockSize}else p=t.offsetWidth,h=t.offsetHeight;s({width:p,height:h})});return a.observe(t,{box:"border-box"}),()=>a.unobserve(t)}else s(void 0)},[t]),r}var sc="Popper",[Ym,Fi]=Ln(sc),[yS,Xm]=Ym(sc),Zm=t=>{const{__scopePopper:r,children:s}=t,[a,l]=m.useState(null);return c.jsx(yS,{scope:r,anchor:a,onAnchorChange:l,children:s})};Zm.displayName=sc;var Jm="PopperAnchor",eg=m.forwardRef((t,r)=>{const{__scopePopper:s,virtualRef:a,...l}=t,d=Xm(Jm,s),p=m.useRef(null),h=He(r,p),y=m.useRef(null);return m.useEffect(()=>{const v=y.current;y.current=a?.current||p.current,v!==y.current&&d.onAnchorChange(y.current)}),a?null:c.jsx(Re.div,{...l,ref:h})});eg.displayName=Jm;var ic="PopperContent",[xS,wS]=Ym(ic),tg=m.forwardRef((t,r)=>{const{__scopePopper:s,side:a="bottom",sideOffset:l=0,align:d="center",alignOffset:p=0,arrowPadding:h=0,avoidCollisions:y=!0,collisionBoundary:v=[],collisionPadding:g=0,sticky:w="partial",hideWhenDetached:b=!1,updatePositionStrategy:k="optimized",onPlaced:N,...S}=t,C=Xm(ic,s),[_,A]=m.useState(null),O=He(r,he=>A(he)),[I,F]=m.useState(null),L=vS(I),U=L?.width??0,q=L?.height??0,te=a+(d!=="center"?"-"+d:""),ne=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},se=Array.isArray(v)?v:[v],Y=se.length>0,ae={padding:ne,boundary:se.filter(SS),altBoundary:Y},{refs:G,floatingStyles:me,placement:ee,isPositioned:ie,middlewareData:P}=iS({strategy:"fixed",placement:te,whileElementsMounted:(...he)=>Y1(...he,{animationFrame:k==="always"}),elements:{reference:C.anchor},middleware:[lS({mainAxis:l+q,alignmentAxis:p}),y&&uS({mainAxis:!0,crossAxis:!1,limiter:w==="partial"?cS():void 0,...ae}),y&&dS({...ae}),fS({...ae,apply:({elements:he,rects:be,availableWidth:ke,availableHeight:Ze})=>{const{width:sr,height:Xo}=be.reference,qt=he.floating.style;qt.setProperty("--radix-popper-available-width",`${ke}px`),qt.setProperty("--radix-popper-available-height",`${Ze}px`),qt.setProperty("--radix-popper-anchor-width",`${sr}px`),qt.setProperty("--radix-popper-anchor-height",`${Xo}px`)}}),I&&hS({element:I,padding:h}),CS({arrowWidth:U,arrowHeight:q}),b&&pS({strategy:"referenceHidden",...ae})]}),[z,V]=og(ee),T=yt(N);Qt(()=>{ie&&T?.()},[ie,T]);const H=P.arrow?.x,de=P.arrow?.y,pe=P.arrow?.centerOffset!==0,[xe,ve]=m.useState();return Qt(()=>{_&&ve(window.getComputedStyle(_).zIndex)},[_]),c.jsx("div",{ref:G.setFloating,"data-radix-popper-content-wrapper":"",style:{...me,transform:ie?me.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:xe,"--radix-popper-transform-origin":[P.transformOrigin?.x,P.transformOrigin?.y].join(" "),...P.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:c.jsx(xS,{scope:s,placedSide:z,onArrowChange:F,arrowX:H,arrowY:de,shouldHideArrow:pe,children:c.jsx(Re.div,{"data-side":z,"data-align":V,...S,ref:O,style:{...S.style,animation:ie?void 0:"none"}})})})});tg.displayName=ic;var ng="PopperArrow",bS={top:"bottom",right:"left",bottom:"top",left:"right"},rg=m.forwardRef(function(r,s){const{__scopePopper:a,...l}=r,d=wS(ng,a),p=bS[d.placedSide];return c.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:c.jsx(gS,{...l,ref:s,style:{...l.style,display:"block"}})})});rg.displayName=ng;function SS(t){return t!==null}var CS=t=>({name:"transformOrigin",options:t,fn(r){const{placement:s,rects:a,middlewareData:l}=r,p=l.arrow?.centerOffset!==0,h=p?0:t.arrowWidth,y=p?0:t.arrowHeight,[v,g]=og(s),w={start:"0%",center:"50%",end:"100%"}[g],b=(l.arrow?.x??0)+h/2,k=(l.arrow?.y??0)+y/2;let N="",S="";return v==="bottom"?(N=p?w:`${b}px`,S=`${-y}px`):v==="top"?(N=p?w:`${b}px`,S=`${a.floating.height+y}px`):v==="right"?(N=`${-y}px`,S=p?w:`${k}px`):v==="left"&&(N=`${a.floating.width+y}px`,S=p?w:`${k}px`),{data:{x:N,y:S}}}});function og(t){const[r,s="center"]=t.split("-");return[r,s]}var sg=Zm,ig=eg,ag=tg,lg=rg,ES=Symbol("radix.slottable");function kS(t){const r=({children:s})=>c.jsx(c.Fragment,{children:s});return r.displayName=`${t}.Slottable`,r.__radixId=ES,r}var[$i]=Ln("Tooltip",[Fi]),zi=Fi(),ug="TooltipProvider",NS=700,ju="tooltip.open",[RS,ac]=$i(ug),cg=t=>{const{__scopeTooltip:r,delayDuration:s=NS,skipDelayDuration:a=300,disableHoverableContent:l=!1,children:d}=t,p=m.useRef(!0),h=m.useRef(!1),y=m.useRef(0);return m.useEffect(()=>{const v=y.current;return()=>window.clearTimeout(v)},[]),c.jsx(RS,{scope:r,isOpenDelayedRef:p,delayDuration:s,onOpen:m.useCallback(()=>{window.clearTimeout(y.current),p.current=!1},[]),onClose:m.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>p.current=!0,a)},[a]),isPointerInTransitRef:h,onPointerInTransitChange:m.useCallback(v=>{h.current=v},[]),disableHoverableContent:l,children:d})};cg.displayName=ug;var Uo="Tooltip",[PS,Ui]=$i(Uo),dg=t=>{const{__scopeTooltip:r,children:s,open:a,defaultOpen:l,onOpenChange:d,disableHoverableContent:p,delayDuration:h}=t,y=ac(Uo,t.__scopeTooltip),v=zi(r),[g,w]=m.useState(null),b=$o(),k=m.useRef(0),N=p??y.disableHoverableContent,S=h??y.delayDuration,C=m.useRef(!1),[_,A]=Ko({prop:a,defaultProp:l??!1,onChange:U=>{U?(y.onOpen(),document.dispatchEvent(new CustomEvent(ju))):y.onClose(),d?.(U)},caller:Uo}),O=m.useMemo(()=>_?C.current?"delayed-open":"instant-open":"closed",[_]),I=m.useCallback(()=>{window.clearTimeout(k.current),k.current=0,C.current=!1,A(!0)},[A]),F=m.useCallback(()=>{window.clearTimeout(k.current),k.current=0,A(!1)},[A]),L=m.useCallback(()=>{window.clearTimeout(k.current),k.current=window.setTimeout(()=>{C.current=!0,A(!0),k.current=0},S)},[S,A]);return m.useEffect(()=>()=>{k.current&&(window.clearTimeout(k.current),k.current=0)},[]),c.jsx(sg,{...v,children:c.jsx(PS,{scope:r,contentId:b,open:_,stateAttribute:O,trigger:g,onTriggerChange:w,onTriggerEnter:m.useCallback(()=>{y.isOpenDelayedRef.current?L():I()},[y.isOpenDelayedRef,L,I]),onTriggerLeave:m.useCallback(()=>{N?F():(window.clearTimeout(k.current),k.current=0)},[F,N]),onOpen:I,onClose:F,disableHoverableContent:N,children:s})})};dg.displayName=Uo;var Tu="TooltipTrigger",fg=m.forwardRef((t,r)=>{const{__scopeTooltip:s,...a}=t,l=Ui(Tu,s),d=ac(Tu,s),p=zi(s),h=m.useRef(null),y=He(r,h,l.onTriggerChange),v=m.useRef(!1),g=m.useRef(!1),w=m.useCallback(()=>v.current=!1,[]);return m.useEffect(()=>()=>document.removeEventListener("pointerup",w),[w]),c.jsx(ig,{asChild:!0,...p,children:c.jsx(Re.button,{"aria-describedby":l.open?l.contentId:void 0,"data-state":l.stateAttribute,...a,ref:y,onPointerMove:ce(t.onPointerMove,b=>{b.pointerType!=="touch"&&!g.current&&!d.isPointerInTransitRef.current&&(l.onTriggerEnter(),g.current=!0)}),onPointerLeave:ce(t.onPointerLeave,()=>{l.onTriggerLeave(),g.current=!1}),onPointerDown:ce(t.onPointerDown,()=>{l.open&&l.onClose(),v.current=!0,document.addEventListener("pointerup",w,{once:!0})}),onFocus:ce(t.onFocus,()=>{v.current||l.onOpen()}),onBlur:ce(t.onBlur,l.onClose),onClick:ce(t.onClick,l.onClose)})})});fg.displayName=Tu;var jS="TooltipPortal",[MN,TS]=$i(jS,{forceMount:void 0}),Fr="TooltipContent",pg=m.forwardRef((t,r)=>{const s=TS(Fr,t.__scopeTooltip),{forceMount:a=s.forceMount,side:l="top",...d}=t,p=Ui(Fr,t.__scopeTooltip);return c.jsx(Fn,{present:a||p.open,children:p.disableHoverableContent?c.jsx(hg,{side:l,...d,ref:r}):c.jsx(_S,{side:l,...d,ref:r})})}),_S=m.forwardRef((t,r)=>{const s=Ui(Fr,t.__scopeTooltip),a=ac(Fr,t.__scopeTooltip),l=m.useRef(null),d=He(r,l),[p,h]=m.useState(null),{trigger:y,onClose:v}=s,g=l.current,{onPointerInTransitChange:w}=a,b=m.useCallback(()=>{h(null),w(!1)},[w]),k=m.useCallback((N,S)=>{const C=N.currentTarget,_={x:N.clientX,y:N.clientY},A=DS(_,C.getBoundingClientRect()),O=LS(_,A),I=FS(S.getBoundingClientRect()),F=zS([...O,...I]);h(F),w(!0)},[w]);return m.useEffect(()=>()=>b(),[b]),m.useEffect(()=>{if(y&&g){const N=C=>k(C,g),S=C=>k(C,y);return y.addEventListener("pointerleave",N),g.addEventListener("pointerleave",S),()=>{y.removeEventListener("pointerleave",N),g.removeEventListener("pointerleave",S)}}},[y,g,k,b]),m.useEffect(()=>{if(p){const N=S=>{const C=S.target,_={x:S.clientX,y:S.clientY},A=y?.contains(C)||g?.contains(C),O=!$S(_,p);A?b():O&&(b(),v())};return document.addEventListener("pointermove",N),()=>document.removeEventListener("pointermove",N)}},[y,g,p,v,b]),c.jsx(hg,{...t,ref:d})}),[OS,AS]=$i(Uo,{isInside:!1}),MS=kS("TooltipContent"),hg=m.forwardRef((t,r)=>{const{__scopeTooltip:s,children:a,"aria-label":l,onEscapeKeyDown:d,onPointerDownOutside:p,...h}=t,y=Ui(Fr,s),v=zi(s),{onClose:g}=y;return m.useEffect(()=>(document.addEventListener(ju,g),()=>document.removeEventListener(ju,g)),[g]),m.useEffect(()=>{if(y.trigger){const w=b=>{b.target?.contains(y.trigger)&&g()};return window.addEventListener("scroll",w,{capture:!0}),()=>window.removeEventListener("scroll",w,{capture:!0})}},[y.trigger,g]),c.jsx(_i,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:d,onPointerDownOutside:p,onFocusOutside:w=>w.preventDefault(),onDismiss:g,children:c.jsxs(ag,{"data-state":y.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:[c.jsx(MS,{children:a}),c.jsx(OS,{scope:s,isInside:!0,children:c.jsx(Zb,{id:y.contentId,role:"tooltip",children:l||a})})]})})});pg.displayName=Fr;var mg="TooltipArrow",IS=m.forwardRef((t,r)=>{const{__scopeTooltip:s,...a}=t,l=zi(s);return AS(mg,s).isInside?null:c.jsx(lg,{...l,...a,ref:r})});IS.displayName=mg;function DS(t,r){const s=Math.abs(r.top-t.y),a=Math.abs(r.bottom-t.y),l=Math.abs(r.right-t.x),d=Math.abs(r.left-t.x);switch(Math.min(s,a,l,d)){case d:return"left";case l:return"right";case s:return"top";case a:return"bottom";default:throw new Error("unreachable")}}function LS(t,r,s=5){const a=[];switch(r){case"top":a.push({x:t.x-s,y:t.y+s},{x:t.x+s,y:t.y+s});break;case"bottom":a.push({x:t.x-s,y:t.y-s},{x:t.x+s,y:t.y-s});break;case"left":a.push({x:t.x+s,y:t.y-s},{x:t.x+s,y:t.y+s});break;case"right":a.push({x:t.x-s,y:t.y-s},{x:t.x-s,y:t.y+s});break}return a}function FS(t){const{top:r,right:s,bottom:a,left:l}=t;return[{x:l,y:r},{x:s,y:r},{x:s,y:a},{x:l,y:a}]}function $S(t,r){const{x:s,y:a}=t;let l=!1;for(let d=0,p=r.length-1;d<r.length;p=d++){const h=r[d],y=r[p],v=h.x,g=h.y,w=y.x,b=y.y;g>a!=b>a&&s<(w-v)*(a-g)/(b-g)+v&&(l=!l)}return l}function zS(t){const r=t.slice();return r.sort((s,a)=>s.x<a.x?-1:s.x>a.x?1:s.y<a.y?-1:s.y>a.y?1:0),US(r)}function US(t){if(t.length<=1)return t.slice();const r=[];for(let a=0;a<t.length;a++){const l=t[a];for(;r.length>=2;){const d=r[r.length-1],p=r[r.length-2];if((d.x-p.x)*(l.y-p.y)>=(d.y-p.y)*(l.x-p.x))r.pop();else break}r.push(l)}r.pop();const s=[];for(let a=t.length-1;a>=0;a--){const l=t[a];for(;s.length>=2;){const d=s[s.length-1],p=s[s.length-2];if((d.x-p.x)*(l.y-p.y)>=(d.y-p.y)*(l.x-p.x))s.pop();else break}s.push(l)}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 HS=cg,BS=dg,WS=fg,gg=pg;const KS=HS,VS=BS,QS=WS,vg=m.forwardRef(({className:t,sideOffset:r=4,...s},a)=>c.jsx(gg,{ref:a,sideOffset:r,className:Le("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}));vg.displayName=gg.displayName;var Hi="Collapsible",[GS]=Ln(Hi),[qS,lc]=GS(Hi),yg=m.forwardRef((t,r)=>{const{__scopeCollapsible:s,open:a,defaultOpen:l,disabled:d,onOpenChange:p,...h}=t,[y,v]=Ko({prop:a,defaultProp:l??!1,onChange:p,caller:Hi});return c.jsx(qS,{scope:s,disabled:d,contentId:$o(),open:y,onOpenToggle:m.useCallback(()=>v(g=>!g),[v]),children:c.jsx(Re.div,{"data-state":cc(y),"data-disabled":d?"":void 0,...h,ref:r})})});yg.displayName=Hi;var xg="CollapsibleTrigger",wg=m.forwardRef((t,r)=>{const{__scopeCollapsible:s,...a}=t,l=lc(xg,s);return c.jsx(Re.button,{type:"button","aria-controls":l.contentId,"aria-expanded":l.open||!1,"data-state":cc(l.open),"data-disabled":l.disabled?"":void 0,disabled:l.disabled,...a,ref:r,onClick:ce(t.onClick,l.onOpenToggle)})});wg.displayName=xg;var uc="CollapsibleContent",bg=m.forwardRef((t,r)=>{const{forceMount:s,...a}=t,l=lc(uc,t.__scopeCollapsible);return c.jsx(Fn,{present:s||l.open,children:({present:d})=>c.jsx(YS,{...a,ref:r,present:d})})});bg.displayName=uc;var YS=m.forwardRef((t,r)=>{const{__scopeCollapsible:s,present:a,children:l,...d}=t,p=lc(uc,s),[h,y]=m.useState(a),v=m.useRef(null),g=He(r,v),w=m.useRef(0),b=w.current,k=m.useRef(0),N=k.current,S=p.open||h,C=m.useRef(S),_=m.useRef(void 0);return m.useEffect(()=>{const A=requestAnimationFrame(()=>C.current=!1);return()=>cancelAnimationFrame(A)},[]),Qt(()=>{const A=v.current;if(A){_.current=_.current||{transitionDuration:A.style.transitionDuration,animationName:A.style.animationName},A.style.transitionDuration="0s",A.style.animationName="none";const O=A.getBoundingClientRect();w.current=O.height,k.current=O.width,C.current||(A.style.transitionDuration=_.current.transitionDuration,A.style.animationName=_.current.animationName),y(a)}},[p.open,a]),c.jsx(Re.div,{"data-state":cc(p.open),"data-disabled":p.disabled?"":void 0,id:p.contentId,hidden:!S,...d,ref:g,style:{"--radix-collapsible-content-height":b?`${b}px`:void 0,"--radix-collapsible-content-width":N?`${N}px`:void 0,...t.style},children:S&&l})});function cc(t){return t?"open":"closed"}var Sg=yg,Cg=wg,Eg=bg;function XS(t){const r=t.split("/");if(r.length!==2||!r[0]||!r[1])return`https://github.com/${t}`;const[s,a]=r;return`https://github.com/${encodeURIComponent(s)}/${encodeURIComponent(a)}`}function ZS(t,r){return t!==null?t:r===0}const uh="onboarding-panel-dismissed-v2",nu={claude:"Claude",codex:"Codex",gemini:"Gemini"},ch=[{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 dh(t){return t.claude||t.codex||t.gemini}function JS(t){return Object.entries(t).filter(([,r])=>r).map(([r])=>r)}function eC(t){const r=t.repos.filter(w=>w.accessible),s=t.repos.filter(w=>!w.accessible),a=r.filter(w=>dh(w.codeReviews)),l=r.filter(w=>!dh(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:a.length>0?`Detected an AI review workflow in ${a.length} repo${a.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:a.length>0}],p=d.filter(w=>w.complete).length,h=d.filter(w=>!w.complete),y=[...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,g=h.length>0?`${p} of ${d.length} complete`:`${s.length} access issue${s.length===1?"":"s"}`;return{accessibleRepos:r,hasIssues:v,inaccessibleRepos:s,reposMissingReview:l,reposWithReview:a,steps:d,pendingSteps:h,completedCount:p,dismissalKey:y,summary:g}}function ru({children:t}){return c.jsx("code",{className:"rounded border border-border bg-muted/30 px-1 py-0.5 text-[11px] font-mono",children:t})}function fh({number:t,children:r}){return c.jsxs("div",{className:"flex gap-2.5",children:[c.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}),c.jsx("div",{className:"flex-1 text-[12px] leading-relaxed",children:r})]})}function tC({step:t,index:r,children:s}){return c.jsx("div",{className:`border px-3 py-3 ${t.complete?"border-border bg-background/60":"border-warning-border bg-warning-muted"}`,children:c.jsxs("div",{className:"flex gap-3",children:[c.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}),c.jsxs("div",{className:"min-w-0 flex-1 space-y-1.5",children:[c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c.jsx("span",{className:"text-[11px] font-medium uppercase tracking-wider",children:t.title}),c.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"})]}),c.jsx("p",{className:"text-[12px] text-muted-foreground",children:t.description}),s]})]})})}function nC(){const[t,r]=m.useState(()=>typeof window>"u"?null:window.localStorage.getItem(uh)),[s,a]=m.useState(!0),{data:l,isLoading:d}=dt({queryKey:["/api/onboarding/status"],refetchInterval:3e4}),{data:p}=dt({queryKey:["/api/config"]}),h=ct({mutationFn:async({repo:O,tool:I})=>(await nt("POST","/api/onboarding/install-review",{repo:O,tool:I})).json(),onSuccess:(O,I)=>{we.invalidateQueries({queryKey:["/api/onboarding/status"]}),Vt({description:`${nu[I.tool]} review workflow installed for ${I.repo}.`})},onError:O=>{Vt({variant:"destructive",description:`Could not install review workflow: ${O.message}`})}});if(d||!l)return null;const{accessibleRepos:y,completedCount:v,dismissalKey:g,hasIssues:w,inaccessibleRepos:b,reposMissingReview:k,reposWithReview:N,steps:S,summary:C}=eC(l),A=(p?.codingAgent??"claude")==="codex"?["codex","claude"]:["claude","codex"];return!w||t===g?null:c.jsxs("div",{className:"shrink-0 border-b border-border bg-muted/35",children:[c.jsxs("div",{className:"flex items-center justify-between px-4 py-2",children:[c.jsxs("button",{onClick:()=>a(!s),className:"flex items-center gap-2 text-left",children:[c.jsx("span",{className:"h-1.5 w-1.5 shrink-0 rounded-full bg-foreground"}),c.jsx("span",{className:"text-[11px] font-medium uppercase tracking-wider",children:"Getting started"}),c.jsx("span",{className:"text-[11px] text-muted-foreground",children:C}),c.jsx("span",{className:"text-[10px] text-muted-foreground",children:s?"▲":"▼"})]}),c.jsx("button",{onClick:()=>{typeof window<"u"&&window.localStorage.setItem(uh,g),r(g)},className:"text-[10px] uppercase tracking-wider text-muted-foreground transition-colors hover:text-foreground",children:"dismiss"})]}),s&&c.jsxs("div",{className:"border-t border-border px-4 py-4 space-y-4",children:[c.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[c.jsx("div",{className:"text-[11px] uppercase tracking-wider text-muted-foreground",children:"Setup checklist"}),c.jsxs("div",{className:"text-[11px] text-muted-foreground",children:[v," of ",S.length," complete"]})]}),c.jsx("div",{className:"space-y-3",children:S.map((O,I)=>c.jsxs(tC,{step:O,index:I+1,children:[O.id==="github"&&!O.complete&&c.jsxs("div",{className:"space-y-2 pt-1",children:[l.githubError&&c.jsx("p",{className:"text-[12px] text-destructive",children:l.githubError}),c.jsxs("div",{className:"space-y-1.5 text-[12px] text-muted-foreground",children:[c.jsxs(fh,{number:1,children:["Run ",c.jsx(ru,{children:"gh auth login"})," on this machine, or set ",c.jsx(ru,{children:"GITHUB_TOKEN"})," before starting the app."]}),c.jsxs(fh,{number:2,children:["Prefer the built-in token list if you want the app to remember it. Open ",c.jsx(An,{href:"/settings",className:"underline underline-offset-2",children:"settings"})," to paste a Personal Access Token."]})]})]}),O.id==="repo"&&!O.complete&&c.jsxs("div",{className:"pt-1 text-[12px] text-muted-foreground",children:["The left sidebar is the real entry point. Use ",c.jsx("span",{className:"text-foreground",children:"Add"})," for a PR URL or ",c.jsx("span",{className:"text-foreground",children:"Watch"})," for an ",c.jsx(ru,{children:"owner/repo"})," slug, then choose whether that watched repo should track only your PRs or your whole team."]}),O.id==="workflow"&&!O.complete&&y.length>0&&c.jsxs("div",{className:"space-y-2 pt-1",children:[c.jsxs("div",{className:"space-y-2 border border-border bg-muted/40 px-3 py-2",children:[c.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."}),c.jsx("div",{className:"flex flex-wrap gap-x-3 gap-y-1 text-[11px]",children:ch.map(F=>c.jsx("a",{href:F.href,target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2 text-foreground/80 hover:text-foreground",children:F.label},F.href))})]}),k.map(F=>c.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:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("a",{href:`https://github.com/${F.repo}`,target:"_blank",rel:"noopener noreferrer",className:"block truncate text-[11px] font-medium underline underline-offset-2",children:F.repo}),c.jsx("p",{className:"text-[11px] text-muted-foreground",children:"No AI review workflow detected yet."})]}),c.jsx("div",{className:"flex flex-wrap gap-2",children:A.map(L=>{const U=h.isPending&&h.variables?.repo===F.repo&&h.variables?.tool===L;return c.jsx("button",{type:"button",onClick:()=>h.mutate({repo:F.repo,tool:L}),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:U?"Installing…":`Install ${nu[L]}`},`${F.repo}-${L}`)})})]},F.repo))]}),O.id==="workflow"&&O.complete&&N.length>0&&c.jsxs("div",{className:"space-y-2 pt-1",children:[c.jsxs("div",{className:"space-y-2 border border-border bg-muted/40 px-3 py-2",children:[c.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."}),c.jsx("div",{className:"flex flex-wrap gap-x-3 gap-y-1 text-[11px]",children:ch.map(F=>c.jsx("a",{href:F.href,target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2 text-foreground/80 hover:text-foreground",children:F.label},F.href))})]}),c.jsx("div",{className:"flex flex-wrap gap-2",children:N.map(F=>{const L=JS(F.codeReviews).map(U=>nu[U]).join(" + ");return c.jsxs("span",{className:"border border-border px-2 py-0.5 text-[10px] uppercase tracking-wider text-muted-foreground",children:[F.repo," · ",L]},F.repo)})})]})]},O.id))}),b.length>0&&c.jsxs("div",{className:"space-y-3 border border-destructive/30 bg-destructive/5 px-3 py-3",children:[c.jsx("div",{className:"text-[11px] font-medium uppercase tracking-wider text-destructive",children:"Repository access issues"}),c.jsx("div",{className:"space-y-2",children:b.map(O=>c.jsxs("div",{className:"space-y-1",children:[c.jsx("div",{className:"text-[11px] font-medium",children:c.jsx("a",{href:`https://github.com/${O.repo}`,target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2",children:O.repo})}),c.jsxs("p",{className:"text-[12px] text-destructive",children:["Cannot access this repository: ",O.error??"unknown error"]})]},O.repo))})]})]})]})}const ph="app-update-dismissed";function hh(t){return t.startsWith("v")?t:`v${t}`}function kg(t){return t.latestVersion?`app-update:${t.latestVersion}`:null}function rC(t,r){if(!t?.updateAvailable)return!1;const s=kg(t);return s!==null&&s!==r}function Bi(){const[t,r]=m.useState(()=>typeof window>"u"?null:window.sessionStorage.getItem(ph)),{data:s}=dt({queryKey:["/api/app-update"]});if(!s||!rC(s,t))return null;const a=kg(s);return!a||!s.latestVersion?null:c.jsx("div",{className:"shrink-0 border-b border-warning-border bg-warning-muted",children:c.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 px-4 py-2",children:[c.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-3 text-[12px]",children:[c.jsx("span",{className:"inline-block h-1.5 w-1.5 shrink-0 rounded-full bg-warning"}),c.jsx("span",{className:"font-medium uppercase tracking-wider text-warning-foreground",children:"Update available"}),c.jsx("span",{className:"text-foreground/75",children:`oh-my-pr ${hh(s.latestVersion)} is available. You're on ${hh(s.currentVersion)}.`})]}),c.jsxs("div",{className:"flex items-center gap-3 text-[11px]",children:[c.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"}),c.jsx("button",{onClick:()=>{typeof window<"u"&&window.sessionStorage.setItem(ph,a),r(a)},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 oC=m.createContext(void 0);function Ng(t){const r=m.useContext(oC);return t||r||"ltr"}var ou=0;function sC(){m.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??mh()),document.body.insertAdjacentElement("beforeend",t[1]??mh()),ou++,()=>{ou===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),ou--}},[])}function mh(){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 su="focusScope.autoFocusOnMount",iu="focusScope.autoFocusOnUnmount",gh={bubbles:!1,cancelable:!0},iC="FocusScope",Rg=m.forwardRef((t,r)=>{const{loop:s=!1,trapped:a=!1,onMountAutoFocus:l,onUnmountAutoFocus:d,...p}=t,[h,y]=m.useState(null),v=yt(l),g=yt(d),w=m.useRef(null),b=He(r,S=>y(S)),k=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(a){let S=function(O){if(k.paused||!h)return;const I=O.target;h.contains(I)?w.current=I:On(w.current,{select:!0})},C=function(O){if(k.paused||!h)return;const I=O.relatedTarget;I!==null&&(h.contains(I)||On(w.current,{select:!0}))},_=function(O){if(document.activeElement===document.body)for(const F of O)F.removedNodes.length>0&&On(h)};document.addEventListener("focusin",S),document.addEventListener("focusout",C);const A=new MutationObserver(_);return h&&A.observe(h,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",C),A.disconnect()}}},[a,h,k.paused]),m.useEffect(()=>{if(h){yh.add(k);const S=document.activeElement;if(!h.contains(S)){const _=new CustomEvent(su,gh);h.addEventListener(su,v),h.dispatchEvent(_),_.defaultPrevented||(aC(fC(Pg(h)),{select:!0}),document.activeElement===S&&On(h))}return()=>{h.removeEventListener(su,v),setTimeout(()=>{const _=new CustomEvent(iu,gh);h.addEventListener(iu,g),h.dispatchEvent(_),_.defaultPrevented||On(S??document.body,{select:!0}),h.removeEventListener(iu,g),yh.remove(k)},0)}}},[h,v,g,k]);const N=m.useCallback(S=>{if(!s&&!a||k.paused)return;const C=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,_=document.activeElement;if(C&&_){const A=S.currentTarget,[O,I]=lC(A);O&&I?!S.shiftKey&&_===I?(S.preventDefault(),s&&On(O,{select:!0})):S.shiftKey&&_===O&&(S.preventDefault(),s&&On(I,{select:!0})):_===A&&S.preventDefault()}},[s,a,k.paused]);return c.jsx(Re.div,{tabIndex:-1,...p,ref:b,onKeyDown:N})});Rg.displayName=iC;function aC(t,{select:r=!1}={}){const s=document.activeElement;for(const a of t)if(On(a,{select:r}),document.activeElement!==s)return}function lC(t){const r=Pg(t),s=vh(r,t),a=vh(r.reverse(),t);return[s,a]}function Pg(t){const r=[],s=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{const l=a.tagName==="INPUT"&&a.type==="hidden";return a.disabled||a.hidden||l?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;s.nextNode();)r.push(s.currentNode);return r}function vh(t,r){for(const s of t)if(!uC(s,{upTo:r}))return s}function uC(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 On(t,{select:r=!1}={}){if(t&&t.focus){const s=document.activeElement;t.focus({preventScroll:!0}),t!==s&&cC(t)&&r&&t.select()}}var yh=dC();function dC(){let t=[];return{add(r){const s=t[0];r!==s&&s?.pause(),t=xh(t,r),t.unshift(r)},remove(r){t=xh(t,r),t[0]?.resume()}}}function xh(t,r){const s=[...t],a=s.indexOf(r);return a!==-1&&s.splice(a,1),s}function fC(t){return t.filter(r=>r.tagName!=="A")}var au="rovingFocusGroup.onEntryFocus",pC={bubbles:!1,cancelable:!0},Go="RovingFocusGroup",[_u,jg,hC]=Vu(Go),[mC,Tg]=Ln(Go,[hC]),[gC,vC]=mC(Go),_g=m.forwardRef((t,r)=>c.jsx(_u.Provider,{scope:t.__scopeRovingFocusGroup,children:c.jsx(_u.Slot,{scope:t.__scopeRovingFocusGroup,children:c.jsx(yC,{...t,ref:r})})}));_g.displayName=Go;var yC=m.forwardRef((t,r)=>{const{__scopeRovingFocusGroup:s,orientation:a,loop:l=!1,dir:d,currentTabStopId:p,defaultCurrentTabStopId:h,onCurrentTabStopIdChange:y,onEntryFocus:v,preventScrollOnEntryFocus:g=!1,...w}=t,b=m.useRef(null),k=He(r,b),N=Ng(d),[S,C]=Ko({prop:p,defaultProp:h??null,onChange:y,caller:Go}),[_,A]=m.useState(!1),O=yt(v),I=jg(s),F=m.useRef(!1),[L,U]=m.useState(0);return m.useEffect(()=>{const q=b.current;if(q)return q.addEventListener(au,O),()=>q.removeEventListener(au,O)},[O]),c.jsx(gC,{scope:s,orientation:a,dir:N,loop:l,currentTabStopId:S,onItemFocus:m.useCallback(q=>C(q),[C]),onItemShiftTab:m.useCallback(()=>A(!0),[]),onFocusableItemAdd:m.useCallback(()=>U(q=>q+1),[]),onFocusableItemRemove:m.useCallback(()=>U(q=>q-1),[]),children:c.jsx(Re.div,{tabIndex:_||L===0?-1:0,"data-orientation":a,...w,ref:k,style:{outline:"none",...t.style},onMouseDown:ce(t.onMouseDown,()=>{F.current=!0}),onFocus:ce(t.onFocus,q=>{const te=!F.current;if(q.target===q.currentTarget&&te&&!_){const ne=new CustomEvent(au,pC);if(q.currentTarget.dispatchEvent(ne),!ne.defaultPrevented){const se=I().filter(ee=>ee.focusable),Y=se.find(ee=>ee.active),ae=se.find(ee=>ee.id===S),me=[Y,ae,...se].filter(Boolean).map(ee=>ee.ref.current);Mg(me,g)}}F.current=!1}),onBlur:ce(t.onBlur,()=>A(!1))})})}),Og="RovingFocusGroupItem",Ag=m.forwardRef((t,r)=>{const{__scopeRovingFocusGroup:s,focusable:a=!0,active:l=!1,tabStopId:d,children:p,...h}=t,y=$o(),v=d||y,g=vC(Og,s),w=g.currentTabStopId===v,b=jg(s),{onFocusableItemAdd:k,onFocusableItemRemove:N,currentTabStopId:S}=g;return m.useEffect(()=>{if(a)return k(),()=>N()},[a,k,N]),c.jsx(_u.ItemSlot,{scope:s,id:v,focusable:a,active:l,children:c.jsx(Re.span,{tabIndex:w?0:-1,"data-orientation":g.orientation,...h,ref:r,onMouseDown:ce(t.onMouseDown,C=>{a?g.onItemFocus(v):C.preventDefault()}),onFocus:ce(t.onFocus,()=>g.onItemFocus(v)),onKeyDown:ce(t.onKeyDown,C=>{if(C.key==="Tab"&&C.shiftKey){g.onItemShiftTab();return}if(C.target!==C.currentTarget)return;const _=bC(C,g.orientation,g.dir);if(_!==void 0){if(C.metaKey||C.ctrlKey||C.altKey||C.shiftKey)return;C.preventDefault();let O=b().filter(I=>I.focusable).map(I=>I.ref.current);if(_==="last")O.reverse();else if(_==="prev"||_==="next"){_==="prev"&&O.reverse();const I=O.indexOf(C.currentTarget);O=g.loop?SC(O,I+1):O.slice(I+1)}setTimeout(()=>Mg(O))}}),children:typeof p=="function"?p({isCurrentTabStop:w,hasTabStop:S!=null}):p})})});Ag.displayName=Og;var xC={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function wC(t,r){return r!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function bC(t,r,s){const a=wC(t.key,s);if(!(r==="vertical"&&["ArrowLeft","ArrowRight"].includes(a))&&!(r==="horizontal"&&["ArrowUp","ArrowDown"].includes(a)))return xC[a]}function Mg(t,r=!1){const s=document.activeElement;for(const a of t)if(a===s||(a.focus({preventScroll:r}),document.activeElement!==s))return}function SC(t,r){return t.map((s,a)=>t[(r+a)%t.length])}var CC=_g,EC=Ag;function kC(t){const r=NC(t),s=m.forwardRef((a,l)=>{const{children:d,...p}=a,h=m.Children.toArray(d),y=h.find(PC);if(y){const v=y.props.children,g=h.map(w=>w===y?m.Children.count(v)>1?m.Children.only(null):m.isValidElement(v)?v.props.children:null:w);return c.jsx(r,{...p,ref:l,children:m.isValidElement(v)?m.cloneElement(v,void 0,g):null})}return c.jsx(r,{...p,ref:l,children:d})});return s.displayName=`${t}.Slot`,s}function NC(t){const r=m.forwardRef((s,a)=>{const{children:l,...d}=s;if(m.isValidElement(l)){const p=TC(l),h=jC(d,l.props);return l.type!==m.Fragment&&(h.ref=a?zr(a,p):p),m.cloneElement(l,h)}return m.Children.count(l)>1?m.Children.only(null):null});return r.displayName=`${t}.SlotClone`,r}var RC=Symbol("radix.slottable");function PC(t){return m.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===RC}function jC(t,r){const s={...r};for(const a in r){const l=t[a],d=r[a];/^on[A-Z]/.test(a)?l&&d?s[a]=(...h)=>{const y=d(...h);return l(...h),y}:l&&(s[a]=l):a==="style"?s[a]={...l,...d}:a==="className"&&(s[a]=[l,d].filter(Boolean).join(" "))}return{...t,...s}}function TC(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 _C=function(t){if(typeof document>"u")return null;var r=Array.isArray(t)?t[0]:t;return r.ownerDocument.body},_r=new WeakMap,di=new WeakMap,fi={},lu=0,Ig=function(t){return t&&(t.host||Ig(t.parentNode))},OC=function(t,r){return r.map(function(s){if(t.contains(s))return s;var a=Ig(s);return a&&t.contains(a)?a:(console.error("aria-hidden",s,"in not contained inside",t,". Doing nothing"),null)}).filter(function(s){return!!s})},AC=function(t,r,s,a){var l=OC(r,Array.isArray(t)?t:[t]);fi[s]||(fi[s]=new WeakMap);var d=fi[s],p=[],h=new Set,y=new Set(l),v=function(w){!w||h.has(w)||(h.add(w),v(w.parentNode))};l.forEach(v);var g=function(w){!w||y.has(w)||Array.prototype.forEach.call(w.children,function(b){if(h.has(b))g(b);else try{var k=b.getAttribute(a),N=k!==null&&k!=="false",S=(_r.get(b)||0)+1,C=(d.get(b)||0)+1;_r.set(b,S),d.set(b,C),p.push(b),S===1&&N&&di.set(b,!0),C===1&&b.setAttribute(s,"true"),N||b.setAttribute(a,"true")}catch(_){console.error("aria-hidden: cannot operate on ",b,_)}})};return g(r),h.clear(),lu++,function(){p.forEach(function(w){var b=_r.get(w)-1,k=d.get(w)-1;_r.set(w,b),d.set(w,k),b||(di.has(w)||w.removeAttribute(a),di.delete(w)),k||w.removeAttribute(s)}),lu--,lu||(_r=new WeakMap,_r=new WeakMap,di=new WeakMap,fi={})}},MC=function(t,r,s){s===void 0&&(s="data-aria-hidden");var a=Array.from(Array.isArray(t)?t:[t]),l=_C(t);return l?(a.push.apply(a,Array.from(l.querySelectorAll("[aria-live], script"))),AC(a,l,s,"aria-hidden")):function(){return null}},Ht=function(){return Ht=Object.assign||function(r){for(var s,a=1,l=arguments.length;a<l;a++){s=arguments[a];for(var d in s)Object.prototype.hasOwnProperty.call(s,d)&&(r[d]=s[d])}return r},Ht.apply(this,arguments)};function Dg(t,r){var s={};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&r.indexOf(a)<0&&(s[a]=t[a]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,a=Object.getOwnPropertySymbols(t);l<a.length;l++)r.indexOf(a[l])<0&&Object.prototype.propertyIsEnumerable.call(t,a[l])&&(s[a[l]]=t[a[l]]);return s}function IC(t,r,s){if(s||arguments.length===2)for(var a=0,l=r.length,d;a<l;a++)(d||!(a in r))&&(d||(d=Array.prototype.slice.call(r,0,a)),d[a]=r[a]);return t.concat(d||Array.prototype.slice.call(r))}var yi="right-scroll-bar-position",xi="width-before-scroll-bar",DC="with-scroll-bars-hidden",LC="--removed-body-scroll-bar-size";function uu(t,r){return typeof t=="function"?t(r):t&&(t.current=r),t}function FC(t,r){var s=m.useState(function(){return{value:t,callback:r,facade:{get current(){return s.value},set current(a){var l=s.value;l!==a&&(s.value=a,s.callback(a,l))}}}})[0];return s.callback=r,s.facade}var $C=typeof window<"u"?m.useLayoutEffect:m.useEffect,wh=new WeakMap;function zC(t,r){var s=FC(null,function(a){return t.forEach(function(l){return uu(l,a)})});return $C(function(){var a=wh.get(s);if(a){var l=new Set(a),d=new Set(t),p=s.current;l.forEach(function(h){d.has(h)||uu(h,null)}),d.forEach(function(h){l.has(h)||uu(h,p)})}wh.set(s,t)},[t]),s}function UC(t){return t}function HC(t,r){r===void 0&&(r=UC);var s=[],a=!1,l={read:function(){if(a)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,a);return s.push(p),function(){s=s.filter(function(h){return h!==p})}},assignSyncMedium:function(d){for(a=!0;s.length;){var p=s;s=[],p.forEach(d)}s={push:function(h){return d(h)},filter:function(){return s}}},assignMedium:function(d){a=!0;var p=[];if(s.length){var h=s;s=[],h.forEach(d),p=s}var y=function(){var g=p;p=[],g.forEach(d)},v=function(){return Promise.resolve().then(y)};v(),s={push:function(g){p.push(g),v()},filter:function(g){return p=p.filter(g),s}}}};return l}function BC(t){t===void 0&&(t={});var r=HC(null);return r.options=Ht({async:!0,ssr:!1},t),r}var Lg=function(t){var r=t.sideCar,s=Dg(t,["sideCar"]);if(!r)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var a=r.read();if(!a)throw new Error("Sidecar medium not found");return m.createElement(a,Ht({},s))};Lg.isSideCarExport=!0;function WC(t,r){return t.useMedium(r),Lg}var Fg=BC(),cu=function(){},Wi=m.forwardRef(function(t,r){var s=m.useRef(null),a=m.useState({onScrollCapture:cu,onWheelCapture:cu,onTouchMoveCapture:cu}),l=a[0],d=a[1],p=t.forwardProps,h=t.children,y=t.className,v=t.removeScrollBar,g=t.enabled,w=t.shards,b=t.sideCar,k=t.noRelative,N=t.noIsolation,S=t.inert,C=t.allowPinchZoom,_=t.as,A=_===void 0?"div":_,O=t.gapMode,I=Dg(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),F=b,L=zC([s,r]),U=Ht(Ht({},I),l);return m.createElement(m.Fragment,null,g&&m.createElement(F,{sideCar:Fg,removeScrollBar:v,shards:w,noRelative:k,noIsolation:N,inert:S,setCallbacks:d,allowPinchZoom:!!C,lockRef:s,gapMode:O}),p?m.cloneElement(m.Children.only(h),Ht(Ht({},U),{ref:L})):m.createElement(A,Ht({},U,{className:y,ref:L}),h))});Wi.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Wi.classNames={fullWidth:xi,zeroRight:yi};var KC=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function VC(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var r=KC();return r&&t.setAttribute("nonce",r),t}function QC(t,r){t.styleSheet?t.styleSheet.cssText=r:t.appendChild(document.createTextNode(r))}function GC(t){var r=document.head||document.getElementsByTagName("head")[0];r.appendChild(t)}var qC=function(){var t=0,r=null;return{add:function(s){t==0&&(r=VC())&&(QC(r,s),GC(r)),t++},remove:function(){t--,!t&&r&&(r.parentNode&&r.parentNode.removeChild(r),r=null)}}},YC=function(){var t=qC();return function(r,s){m.useEffect(function(){return t.add(r),function(){t.remove()}},[r&&s])}},$g=function(){var t=YC(),r=function(s){var a=s.styles,l=s.dynamic;return t(a,l),null};return r},XC={left:0,top:0,right:0,gap:0},du=function(t){return parseInt(t||"",10)||0},ZC=function(t){var r=window.getComputedStyle(document.body),s=r[t==="padding"?"paddingLeft":"marginLeft"],a=r[t==="padding"?"paddingTop":"marginTop"],l=r[t==="padding"?"paddingRight":"marginRight"];return[du(s),du(a),du(l)]},JC=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return XC;var r=ZC(t),s=document.documentElement.clientWidth,a=window.innerWidth;return{left:r[0],top:r[1],right:r[2],gap:Math.max(0,a-s+r[2]-r[0])}},eE=$g(),Dr="data-scroll-locked",tE=function(t,r,s,a){var l=t.left,d=t.top,p=t.right,h=t.gap;return s===void 0&&(s="margin"),`
8
+ `+f.stack}return{value:e,source:n,stack:u,digest:null}}function dl(e,n,o){return{value:e,source:null,stack:o??null,digest:n??null}}function fl(e,n){try{console.error(n.value)}catch(o){setTimeout(function(){throw o})}}var xx=typeof WeakMap=="function"?WeakMap:Map;function Sf(e,n,o){o=tn(-1,o),o.tag=3,o.payload={element:null};var i=n.value;return o.callback=function(){Vs||(Vs=!0,Rl=i),fl(e,n)},o}function Cf(e,n,o){o=tn(-1,o),o.tag=3;var i=e.type.getDerivedStateFromError;if(typeof i=="function"){var u=n.value;o.payload=function(){return i(u)},o.callback=function(){fl(e,n)}}var f=e.stateNode;return f!==null&&typeof f.componentDidCatch=="function"&&(o.callback=function(){fl(e,n),typeof i!="function"&&(Sn===null?Sn=new Set([this]):Sn.add(this));var x=n.stack;this.componentDidCatch(n.value,{componentStack:x!==null?x:""})}),o}function Ef(e,n,o){var i=e.pingCache;if(i===null){i=e.pingCache=new xx;var u=new Set;i.set(n,u)}else u=i.get(n),u===void 0&&(u=new Set,i.set(n,u));u.has(o)||(u.add(o),e=Ax.bind(null,e,n,o),n.then(e,e))}function kf(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 Nf(e,n,o,i,u){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=tn(-1,1),n.tag=2,wn(o,n,1))),o.lanes|=1),e):(e.flags|=65536,e.lanes=u,e)}var wx=I.ReactCurrentOwner,it=!1;function Je(e,n,o,i){n.child=e===null?Kd(n,null,o,i):Sr(n,e.child,o,i)}function Rf(e,n,o,i,u){o=o.render;var f=n.ref;return Er(n,u),i=rl(e,n,o,i,f,u),o=ol(),e!==null&&!it?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~u,nn(e,n,u)):(_e&&o&&za(n),n.flags|=1,Je(e,n,i,u),n.child)}function Pf(e,n,o,i,u){if(e===null){var f=o.type;return typeof f=="function"&&!Ml(f)&&f.defaultProps===void 0&&o.compare===null&&o.defaultProps===void 0?(n.tag=15,n.type=f,jf(e,n,f,i,u)):(e=Zs(o.type,null,i,n,n.mode,u),e.ref=n.ref,e.return=n,n.child=e)}if(f=e.child,(e.lanes&u)===0){var x=f.memoizedProps;if(o=o.compare,o=o!==null?o:uo,o(x,i)&&e.ref===n.ref)return nn(e,n,u)}return n.flags|=1,e=Nn(f,i),e.ref=n.ref,e.return=n,n.child=e}function jf(e,n,o,i,u){if(e!==null){var f=e.memoizedProps;if(uo(f,i)&&e.ref===n.ref)if(it=!1,n.pendingProps=i=f,(e.lanes&u)!==0)(e.flags&131072)!==0&&(it=!0);else return n.lanes=e.lanes,nn(e,n,u)}return pl(e,n,o,i,u)}function Tf(e,n,o){var i=n.pendingProps,u=i.children,f=e!==null?e.memoizedState:null;if(i.mode==="hidden")if((n.mode&1)===0)n.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ne(Pr,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(Pr,mt),mt|=e,null;n.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=f!==null?f.baseLanes:o,Ne(Pr,mt),mt|=i}else f!==null?(i=f.baseLanes|o,n.memoizedState=null):i=o,Ne(Pr,mt),mt|=i;return Je(e,n,u,o),n.child}function _f(e,n){var o=n.ref;(e===null&&o!==null||e!==null&&e.ref!==o)&&(n.flags|=512,n.flags|=2097152)}function pl(e,n,o,i,u){var f=st(o)?Un:Ge.current;return f=yr(n,f),Er(n,u),o=rl(e,n,o,i,f,u),i=ol(),e!==null&&!it?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~u,nn(e,n,u)):(_e&&i&&za(n),n.flags|=1,Je(e,n,o,u),n.child)}function Of(e,n,o,i,u){if(st(o)){var f=!0;Cs(n)}else f=!1;if(Er(n,u),n.stateNode===null)Us(e,n),wf(n,o,i),cl(n,o,i,u),i=!0;else if(e===null){var x=n.stateNode,E=n.memoizedProps;x.props=E;var R=x.context,$=o.contextType;typeof $=="object"&&$!==null?$=bt($):($=st(o)?Un:Ge.current,$=yr(n,$));var W=o.getDerivedStateFromProps,K=typeof W=="function"||typeof x.getSnapshotBeforeUpdate=="function";K||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(E!==i||R!==$)&&bf(n,x,i,$),xn=!1;var B=n.memoizedState;x.state=B,Os(n,i,x,u),R=n.memoizedState,E!==i||B!==R||ot.current||xn?(typeof W=="function"&&(ul(n,o,W,i),R=n.memoizedState),(E=xn||xf(n,o,E,i,B,R,$))?(K||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=i,n.memoizedState=R),x.props=i,x.state=R,x.context=$,i=E):(typeof x.componentDidMount=="function"&&(n.flags|=4194308),i=!1)}else{x=n.stateNode,Qd(e,n),E=n.memoizedProps,$=n.type===n.elementType?E:Tt(n.type,E),x.props=$,K=n.pendingProps,B=x.context,R=o.contextType,typeof R=="object"&&R!==null?R=bt(R):(R=st(o)?Un:Ge.current,R=yr(n,R));var X=o.getDerivedStateFromProps;(W=typeof X=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(E!==K||B!==R)&&bf(n,x,i,R),xn=!1,B=n.memoizedState,x.state=B,Os(n,i,x,u);var J=n.memoizedState;E!==K||B!==J||ot.current||xn?(typeof X=="function"&&(ul(n,o,X,i),J=n.memoizedState),($=xn||xf(n,o,$,i,B,J,R)||!1)?(W||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(i,J,R),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(i,J,R)),typeof x.componentDidUpdate=="function"&&(n.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof x.componentDidUpdate!="function"||E===e.memoizedProps&&B===e.memoizedState||(n.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||E===e.memoizedProps&&B===e.memoizedState||(n.flags|=1024),n.memoizedProps=i,n.memoizedState=J),x.props=i,x.state=J,x.context=R,i=$):(typeof x.componentDidUpdate!="function"||E===e.memoizedProps&&B===e.memoizedState||(n.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||E===e.memoizedProps&&B===e.memoizedState||(n.flags|=1024),i=!1)}return hl(e,n,o,i,f,u)}function hl(e,n,o,i,u,f){_f(e,n);var x=(n.flags&128)!==0;if(!i&&!x)return u&&Dd(n,o,!1),nn(e,n,f);i=n.stateNode,wx.current=n;var E=x&&typeof o.getDerivedStateFromError!="function"?null:i.render();return n.flags|=1,e!==null&&x?(n.child=Sr(n,e.child,null,f),n.child=Sr(n,null,E,f)):Je(e,n,E,f),n.memoizedState=i.state,u&&Dd(n,o,!0),n.child}function Af(e){var n=e.stateNode;n.pendingContext?Md(e,n.pendingContext,n.pendingContext!==n.context):n.context&&Md(e,n.context,!1),Xa(e,n.containerInfo)}function Mf(e,n,o,i,u){return br(),Wa(u),n.flags|=256,Je(e,n,o,i),n.child}var ml={dehydrated:null,treeContext:null,retryLane:0};function gl(e){return{baseLanes:e,cachePool:null,transitions:null}}function If(e,n,o){var i=n.pendingProps,u=Oe.current,f=!1,x=(n.flags&128)!==0,E;if((E=x)||(E=e!==null&&e.memoizedState===null?!1:(u&2)!==0),E?(f=!0,n.flags&=-129):(e===null||e.memoizedState!==null)&&(u|=1),Ne(Oe,u&1),e===null)return Ba(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=i.children,e=i.fallback,f?(i=n.mode,f=n.child,x={mode:"hidden",children:x},(i&1)===0&&f!==null?(f.childLanes=0,f.pendingProps=x):f=Js(x,i,0,null),e=Xn(e,i,o,null),f.return=n,e.return=n,f.sibling=e,n.child=f,n.child.memoizedState=gl(o),n.memoizedState=ml,e):vl(n,x));if(u=e.memoizedState,u!==null&&(E=u.dehydrated,E!==null))return bx(e,n,x,i,E,u,o);if(f){f=i.fallback,x=n.mode,u=e.child,E=u.sibling;var R={mode:"hidden",children:i.children};return(x&1)===0&&n.child!==u?(i=n.child,i.childLanes=0,i.pendingProps=R,n.deletions=null):(i=Nn(u,R),i.subtreeFlags=u.subtreeFlags&14680064),E!==null?f=Nn(E,f):(f=Xn(f,x,o,null),f.flags|=2),f.return=n,i.return=n,i.sibling=f,n.child=i,i=f,f=n.child,x=e.child.memoizedState,x=x===null?gl(o):{baseLanes:x.baseLanes|o,cachePool:null,transitions:x.transitions},f.memoizedState=x,f.childLanes=e.childLanes&~o,n.memoizedState=ml,i}return f=e.child,e=f.sibling,i=Nn(f,{mode:"visible",children:i.children}),(n.mode&1)===0&&(i.lanes=o),i.return=n,i.sibling=null,e!==null&&(o=n.deletions,o===null?(n.deletions=[e],n.flags|=16):o.push(e)),n.child=i,n.memoizedState=null,i}function vl(e,n){return n=Js({mode:"visible",children:n},e.mode,0,null),n.return=e,e.child=n}function zs(e,n,o,i){return i!==null&&Wa(i),Sr(n,e.child,null,o),e=vl(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function bx(e,n,o,i,u,f,x){if(o)return n.flags&256?(n.flags&=-257,i=dl(Error(s(422))),zs(e,n,x,i)):n.memoizedState!==null?(n.child=e.child,n.flags|=128,null):(f=i.fallback,u=n.mode,i=Js({mode:"visible",children:i.children},u,0,null),f=Xn(f,u,x,null),f.flags|=2,i.return=n,f.return=n,i.sibling=f,n.child=i,(n.mode&1)!==0&&Sr(n,e.child,null,x),n.child.memoizedState=gl(x),n.memoizedState=ml,f);if((n.mode&1)===0)return zs(e,n,x,null);if(u.data==="$!"){if(i=u.nextSibling&&u.nextSibling.dataset,i)var E=i.dgst;return i=E,f=Error(s(419)),i=dl(f,i,void 0),zs(e,n,x,i)}if(E=(x&e.childLanes)!==0,it||E){if(i=We,i!==null){switch(x&-x){case 4:u=2;break;case 16:u=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:u=32;break;case 536870912:u=268435456;break;default:u=0}u=(u&(i.suspendedLanes|x))!==0?0:u,u!==0&&u!==f.retryLane&&(f.retryLane=u,en(e,u),At(i,e,u,-1))}return Al(),i=dl(Error(s(421))),zs(e,n,x,i)}return u.data==="$?"?(n.flags|=128,n.child=e.child,n=Mx.bind(null,e),u._reactRetry=n,null):(e=f.treeContext,ht=mn(u.nextSibling),pt=n,_e=!0,jt=null,e!==null&&(xt[wt++]=Zt,xt[wt++]=Jt,xt[wt++]=Hn,Zt=e.id,Jt=e.overflow,Hn=n),n=vl(n,i.children),n.flags|=4096,n)}function Df(e,n,o){e.lanes|=n;var i=e.alternate;i!==null&&(i.lanes|=n),Ga(e.return,n,o)}function yl(e,n,o,i,u){var f=e.memoizedState;f===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:i,tail:o,tailMode:u}:(f.isBackwards=n,f.rendering=null,f.renderingStartTime=0,f.last=i,f.tail=o,f.tailMode=u)}function Lf(e,n,o){var i=n.pendingProps,u=i.revealOrder,f=i.tail;if(Je(e,n,i.children,o),i=Oe.current,(i&2)!==0)i=i&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&&Df(e,o,n);else if(e.tag===19)Df(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}i&=1}if(Ne(Oe,i),(n.mode&1)===0)n.memoizedState=null;else switch(u){case"forwards":for(o=n.child,u=null;o!==null;)e=o.alternate,e!==null&&As(e)===null&&(u=o),o=o.sibling;o=u,o===null?(u=n.child,n.child=null):(u=o.sibling,o.sibling=null),yl(n,!1,u,o,f);break;case"backwards":for(o=null,u=n.child,n.child=null;u!==null;){if(e=u.alternate,e!==null&&As(e)===null){n.child=u;break}e=u.sibling,u.sibling=o,o=u,u=e}yl(n,!0,o,null,f);break;case"together":yl(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function Us(e,n){(n.mode&1)===0&&e!==null&&(e.alternate=null,n.alternate=null,n.flags|=2)}function nn(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=Nn(e,e.pendingProps),n.child=o,o.return=n;e.sibling!==null;)e=e.sibling,o=o.sibling=Nn(e,e.pendingProps),o.return=n;o.sibling=null}return n.child}function Sx(e,n,o){switch(n.tag){case 3:Af(n),br();break;case 5:Yd(n);break;case 1:st(n.type)&&Cs(n);break;case 4:Xa(n,n.stateNode.containerInfo);break;case 10:var i=n.type._context,u=n.memoizedProps.value;Ne(js,i._currentValue),i._currentValue=u;break;case 13:if(i=n.memoizedState,i!==null)return i.dehydrated!==null?(Ne(Oe,Oe.current&1),n.flags|=128,null):(o&n.child.childLanes)!==0?If(e,n,o):(Ne(Oe,Oe.current&1),e=nn(e,n,o),e!==null?e.sibling:null);Ne(Oe,Oe.current&1);break;case 19:if(i=(o&n.childLanes)!==0,(e.flags&128)!==0){if(i)return Lf(e,n,o);n.flags|=128}if(u=n.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),Ne(Oe,Oe.current),i)break;return null;case 22:case 23:return n.lanes=0,Tf(e,n,o)}return nn(e,n,o)}var Ff,xl,$f,zf;Ff=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}},xl=function(){},$f=function(e,n,o,i){var u=e.memoizedProps;if(u!==i){e=n.stateNode,Kn($t.current);var f=null;switch(o){case"input":u=Gi(e,u),i=Gi(e,i),f=[];break;case"select":u=V({},u,{value:void 0}),i=V({},i,{value:void 0}),f=[];break;case"textarea":u=Xi(e,u),i=Xi(e,i),f=[];break;default:typeof u.onClick!="function"&&typeof i.onClick=="function"&&(e.onclick=ws)}Ji(o,i);var x;o=null;for($ in u)if(!i.hasOwnProperty($)&&u.hasOwnProperty($)&&u[$]!=null)if($==="style"){var E=u[$];for(x in E)E.hasOwnProperty(x)&&(o||(o={}),o[x]="")}else $!=="dangerouslySetInnerHTML"&&$!=="children"&&$!=="suppressContentEditableWarning"&&$!=="suppressHydrationWarning"&&$!=="autoFocus"&&(l.hasOwnProperty($)?f||(f=[]):(f=f||[]).push($,null));for($ in i){var R=i[$];if(E=u?.[$],i.hasOwnProperty($)&&R!==E&&(R!=null||E!=null))if($==="style")if(E){for(x in E)!E.hasOwnProperty(x)||R&&R.hasOwnProperty(x)||(o||(o={}),o[x]="");for(x in R)R.hasOwnProperty(x)&&E[x]!==R[x]&&(o||(o={}),o[x]=R[x])}else o||(f||(f=[]),f.push($,o)),o=R;else $==="dangerouslySetInnerHTML"?(R=R?R.__html:void 0,E=E?E.__html:void 0,R!=null&&E!==R&&(f=f||[]).push($,R)):$==="children"?typeof R!="string"&&typeof R!="number"||(f=f||[]).push($,""+R):$!=="suppressContentEditableWarning"&&$!=="suppressHydrationWarning"&&(l.hasOwnProperty($)?(R!=null&&$==="onScroll"&&Pe("scroll",e),f||E===R||(f=[])):(f=f||[]).push($,R))}o&&(f=f||[]).push("style",o);var $=f;(n.updateQueue=$)&&(n.flags|=4)}},zf=function(e,n,o,i){o!==i&&(n.flags|=4)};function ko(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 i=null;o!==null;)o.alternate!==null&&(i=o),o=o.sibling;i===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function Ye(e){var n=e.alternate!==null&&e.alternate.child===e.child,o=0,i=0;if(n)for(var u=e.child;u!==null;)o|=u.lanes|u.childLanes,i|=u.subtreeFlags&14680064,i|=u.flags&14680064,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)o|=u.lanes|u.childLanes,i|=u.subtreeFlags,i|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=i,e.childLanes=o,n}function Cx(e,n,o){var i=n.pendingProps;switch(Ua(n),n.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ye(n),null;case 1:return st(n.type)&&Ss(),Ye(n),null;case 3:return i=n.stateNode,kr(),je(ot),je(Ge),el(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Rs(n)?n.flags|=4:e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,jt!==null&&(Tl(jt),jt=null))),xl(e,n),Ye(n),null;case 5:Za(n);var u=Kn(wo.current);if(o=n.type,e!==null&&n.stateNode!=null)$f(e,n,o,i,u),e.ref!==n.ref&&(n.flags|=512,n.flags|=2097152);else{if(!i){if(n.stateNode===null)throw Error(s(166));return Ye(n),null}if(e=Kn($t.current),Rs(n)){i=n.stateNode,o=n.type;var f=n.memoizedProps;switch(i[Ft]=n,i[mo]=f,e=(n.mode&1)!==0,o){case"dialog":Pe("cancel",i),Pe("close",i);break;case"iframe":case"object":case"embed":Pe("load",i);break;case"video":case"audio":for(u=0;u<fo.length;u++)Pe(fo[u],i);break;case"source":Pe("error",i);break;case"img":case"image":case"link":Pe("error",i),Pe("load",i);break;case"details":Pe("toggle",i);break;case"input":xc(i,f),Pe("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!f.multiple},Pe("invalid",i);break;case"textarea":Sc(i,f),Pe("invalid",i)}Ji(o,f),u=null;for(var x in f)if(f.hasOwnProperty(x)){var E=f[x];x==="children"?typeof E=="string"?i.textContent!==E&&(f.suppressHydrationWarning!==!0&&xs(i.textContent,E,e),u=["children",E]):typeof E=="number"&&i.textContent!==""+E&&(f.suppressHydrationWarning!==!0&&xs(i.textContent,E,e),u=["children",""+E]):l.hasOwnProperty(x)&&E!=null&&x==="onScroll"&&Pe("scroll",i)}switch(o){case"input":sr(i),bc(i,f,!0);break;case"textarea":sr(i),Ec(i);break;case"select":case"option":break;default:typeof f.onClick=="function"&&(i.onclick=ws)}i=u,n.updateQueue=i,i!==null&&(n.flags|=4)}else{x=u.nodeType===9?u:u.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=kc(o)),e==="http://www.w3.org/1999/xhtml"?o==="script"?(e=x.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof i.is=="string"?e=x.createElement(o,{is:i.is}):(e=x.createElement(o),o==="select"&&(x=e,i.multiple?x.multiple=!0:i.size&&(x.size=i.size))):e=x.createElementNS(e,o),e[Ft]=n,e[mo]=i,Ff(e,n,!1,!1),n.stateNode=e;e:{switch(x=ea(o,i),o){case"dialog":Pe("cancel",e),Pe("close",e),u=i;break;case"iframe":case"object":case"embed":Pe("load",e),u=i;break;case"video":case"audio":for(u=0;u<fo.length;u++)Pe(fo[u],e);u=i;break;case"source":Pe("error",e),u=i;break;case"img":case"image":case"link":Pe("error",e),Pe("load",e),u=i;break;case"details":Pe("toggle",e),u=i;break;case"input":xc(e,i),u=Gi(e,i),Pe("invalid",e);break;case"option":u=i;break;case"select":e._wrapperState={wasMultiple:!!i.multiple},u=V({},i,{value:void 0}),Pe("invalid",e);break;case"textarea":Sc(e,i),u=Xi(e,i),Pe("invalid",e);break;default:u=i}Ji(o,u),E=u;for(f in E)if(E.hasOwnProperty(f)){var R=E[f];f==="style"?Pc(e,R):f==="dangerouslySetInnerHTML"?(R=R?R.__html:void 0,R!=null&&Nc(e,R)):f==="children"?typeof R=="string"?(o!=="textarea"||R!=="")&&Vr(e,R):typeof R=="number"&&Vr(e,""+R):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(l.hasOwnProperty(f)?R!=null&&f==="onScroll"&&Pe("scroll",e):R!=null&&O(e,f,R,x))}switch(o){case"input":sr(e),bc(e,i,!1);break;case"textarea":sr(e),Ec(e);break;case"option":i.value!=null&&e.setAttribute("value",""+be(i.value));break;case"select":e.multiple=!!i.multiple,f=i.value,f!=null?ir(e,!!i.multiple,f,!1):i.defaultValue!=null&&ir(e,!!i.multiple,i.defaultValue,!0);break;default:typeof u.onClick=="function"&&(e.onclick=ws)}switch(o){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}}i&&(n.flags|=4)}n.ref!==null&&(n.flags|=512,n.flags|=2097152)}return Ye(n),null;case 6:if(e&&n.stateNode!=null)zf(e,n,e.memoizedProps,i);else{if(typeof i!="string"&&n.stateNode===null)throw Error(s(166));if(o=Kn(wo.current),Kn($t.current),Rs(n)){if(i=n.stateNode,o=n.memoizedProps,i[Ft]=n,(f=i.nodeValue!==o)&&(e=pt,e!==null))switch(e.tag){case 3:xs(i.nodeValue,o,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&xs(i.nodeValue,o,(e.mode&1)!==0)}f&&(n.flags|=4)}else i=(o.nodeType===9?o:o.ownerDocument).createTextNode(i),i[Ft]=n,n.stateNode=i}return Ye(n),null;case 13:if(je(Oe),i=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(_e&&ht!==null&&(n.mode&1)!==0&&(n.flags&128)===0)Hd(),br(),n.flags|=98560,f=!1;else if(f=Rs(n),i!==null&&i.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[Ft]=n}else br(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Ye(n),f=!1}else jt!==null&&(Tl(jt),jt=null),f=!0;if(!f)return n.flags&65536?n:null}return(n.flags&128)!==0?(n.lanes=o,n):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(n.child.flags|=8192,(n.mode&1)!==0&&(e===null||(Oe.current&1)!==0?ze===0&&(ze=3):Al())),n.updateQueue!==null&&(n.flags|=4),Ye(n),null);case 4:return kr(),xl(e,n),e===null&&po(n.stateNode.containerInfo),Ye(n),null;case 10:return Qa(n.type._context),Ye(n),null;case 17:return st(n.type)&&Ss(),Ye(n),null;case 19:if(je(Oe),f=n.memoizedState,f===null)return Ye(n),null;if(i=(n.flags&128)!==0,x=f.rendering,x===null)if(i)ko(f,!1);else{if(ze!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(x=As(e),x!==null){for(n.flags|=128,ko(f,!1),i=x.updateQueue,i!==null&&(n.updateQueue=i,n.flags|=4),n.subtreeFlags=0,i=o,o=n.child;o!==null;)f=o,e=i,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()>jr&&(n.flags|=128,i=!0,ko(f,!1),n.lanes=4194304)}else{if(!i)if(e=As(x),e!==null){if(n.flags|=128,i=!0,o=e.updateQueue,o!==null&&(n.updateQueue=o,n.flags|=4),ko(f,!0),f.tail===null&&f.tailMode==="hidden"&&!x.alternate&&!_e)return Ye(n),null}else 2*Ie()-f.renderingStartTime>jr&&o!==1073741824&&(n.flags|=128,i=!0,ko(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,i?o&1|2:o&1),n):(Ye(n),null);case 22:case 23:return Ol(),i=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(n.flags|=8192),i&&(n.mode&1)!==0?(mt&1073741824)!==0&&(Ye(n),n.subtreeFlags&6&&(n.flags|=8192)):Ye(n),null;case 24:return null;case 25:return null}throw Error(s(156,n.tag))}function Ex(e,n){switch(Ua(n),n.tag){case 1:return st(n.type)&&Ss(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return kr(),je(ot),je(Ge),el(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 5:return Za(n),null;case 13:if(je(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 je(Oe),null;case 4:return kr(),null;case 10:return Qa(n.type._context),null;case 22:case 23:return Ol(),null;case 24:return null;default:return null}}var Hs=!1,Xe=!1,kx=typeof WeakSet=="function"?WeakSet:Set,Z=null;function Rr(e,n){var o=e.ref;if(o!==null)if(typeof o=="function")try{o(null)}catch(i){Me(e,n,i)}else o.current=null}function wl(e,n,o){try{o()}catch(i){Me(e,n,i)}}var Uf=!1;function Nx(e,n){if(Oa=ls,e=yd(),Ea(e)){if("selectionStart"in e)var o={start:e.selectionStart,end:e.selectionEnd};else e:{o=(o=e.ownerDocument)&&o.defaultView||window;var i=o.getSelection&&o.getSelection();if(i&&i.rangeCount!==0){o=i.anchorNode;var u=i.anchorOffset,f=i.focusNode;i=i.focusOffset;try{o.nodeType,f.nodeType}catch{o=null;break e}var x=0,E=-1,R=-1,$=0,W=0,K=e,B=null;t:for(;;){for(var X;K!==o||u!==0&&K.nodeType!==3||(E=x+u),K!==f||i!==0&&K.nodeType!==3||(R=x+i),K.nodeType===3&&(x+=K.nodeValue.length),(X=K.firstChild)!==null;)B=K,K=X;for(;;){if(K===e)break t;if(B===o&&++$===u&&(E=x),B===f&&++W===i&&(R=x),(X=K.nextSibling)!==null)break;K=B,B=K.parentNode}K=X}o=E===-1||R===-1?null:{start:E,end:R}}else o=null}o=o||{start:0,end:0}}else o=null;for(Aa={focusedElem:e,selectionRange:o},ls=!1,Z=n;Z!==null;)if(n=Z,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,Z=e;else for(;Z!==null;){n=Z;try{var J=n.alternate;if((n.flags&1024)!==0)switch(n.tag){case 0:case 11:case 15:break;case 1:if(J!==null){var re=J.memoizedProps,De=J.memoizedState,M=n.stateNode,j=M.getSnapshotBeforeUpdate(n.elementType===n.type?re:Tt(n.type,re),De);M.__reactInternalSnapshotBeforeUpdate=j}break;case 3:var D=n.stateNode.containerInfo;D.nodeType===1?D.textContent="":D.nodeType===9&&D.documentElement&&D.removeChild(D.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(Q){Me(n,n.return,Q)}if(e=n.sibling,e!==null){e.return=n.return,Z=e;break}Z=n.return}return J=Uf,Uf=!1,J}function No(e,n,o){var i=n.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var u=i=i.next;do{if((u.tag&e)===e){var f=u.destroy;u.destroy=void 0,f!==void 0&&wl(n,o,f)}u=u.next}while(u!==i)}}function Bs(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 i=o.create;o.destroy=i()}o=o.next}while(o!==n)}}function bl(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 Hf(e){var n=e.alternate;n!==null&&(e.alternate=null,Hf(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[Ft],delete n[mo],delete n[La],delete n[lx],delete n[ux])),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 Bf(e){return e.tag===5||e.tag===3||e.tag===4}function Wf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Bf(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 Sl(e,n,o){var i=e.tag;if(i===5||i===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=ws));else if(i!==4&&(e=e.child,e!==null))for(Sl(e,n,o),e=e.sibling;e!==null;)Sl(e,n,o),e=e.sibling}function Cl(e,n,o){var i=e.tag;if(i===5||i===6)e=e.stateNode,n?o.insertBefore(e,n):o.appendChild(e);else if(i!==4&&(e=e.child,e!==null))for(Cl(e,n,o),e=e.sibling;e!==null;)Cl(e,n,o),e=e.sibling}var Ve=null,_t=!1;function bn(e,n,o){for(o=o.child;o!==null;)Kf(e,n,o),o=o.sibling}function Kf(e,n,o){if(Lt&&typeof Lt.onCommitFiberUnmount=="function")try{Lt.onCommitFiberUnmount(ns,o)}catch{}switch(o.tag){case 5:Xe||Rr(o,n);case 6:var i=Ve,u=_t;Ve=null,bn(e,n,o),Ve=i,_t=u,Ve!==null&&(_t?(e=Ve,o=o.stateNode,e.nodeType===8?e.parentNode.removeChild(o):e.removeChild(o)):Ve.removeChild(o.stateNode));break;case 18:Ve!==null&&(_t?(e=Ve,o=o.stateNode,e.nodeType===8?Da(e.parentNode,o):e.nodeType===1&&Da(e,o),ro(e)):Da(Ve,o.stateNode));break;case 4:i=Ve,u=_t,Ve=o.stateNode.containerInfo,_t=!0,bn(e,n,o),Ve=i,_t=u;break;case 0:case 11:case 14:case 15:if(!Xe&&(i=o.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){u=i=i.next;do{var f=u,x=f.destroy;f=f.tag,x!==void 0&&((f&2)!==0||(f&4)!==0)&&wl(o,n,x),u=u.next}while(u!==i)}bn(e,n,o);break;case 1:if(!Xe&&(Rr(o,n),i=o.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=o.memoizedProps,i.state=o.memoizedState,i.componentWillUnmount()}catch(E){Me(o,n,E)}bn(e,n,o);break;case 21:bn(e,n,o);break;case 22:o.mode&1?(Xe=(i=Xe)||o.memoizedState!==null,bn(e,n,o),Xe=i):bn(e,n,o);break;default:bn(e,n,o)}}function Vf(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var o=e.stateNode;o===null&&(o=e.stateNode=new kx),n.forEach(function(i){var u=Ix.bind(null,e,i);o.has(i)||(o.add(i),i.then(u,u))})}}function Ot(e,n){var o=n.deletions;if(o!==null)for(var i=0;i<o.length;i++){var u=o[i];try{var f=e,x=n,E=x;e:for(;E!==null;){switch(E.tag){case 5:Ve=E.stateNode,_t=!1;break e;case 3:Ve=E.stateNode.containerInfo,_t=!0;break e;case 4:Ve=E.stateNode.containerInfo,_t=!0;break e}E=E.return}if(Ve===null)throw Error(s(160));Kf(f,x,u),Ve=null,_t=!1;var R=u.alternate;R!==null&&(R.return=null),u.return=null}catch($){Me(u,n,$)}}if(n.subtreeFlags&12854)for(n=n.child;n!==null;)Qf(n,e),n=n.sibling}function Qf(e,n){var o=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ot(n,e),Ut(e),i&4){try{No(3,e,e.return),Bs(3,e)}catch(re){Me(e,e.return,re)}try{No(5,e,e.return)}catch(re){Me(e,e.return,re)}}break;case 1:Ot(n,e),Ut(e),i&512&&o!==null&&Rr(o,o.return);break;case 5:if(Ot(n,e),Ut(e),i&512&&o!==null&&Rr(o,o.return),e.flags&32){var u=e.stateNode;try{Vr(u,"")}catch(re){Me(e,e.return,re)}}if(i&4&&(u=e.stateNode,u!=null)){var f=e.memoizedProps,x=o!==null?o.memoizedProps:f,E=e.type,R=e.updateQueue;if(e.updateQueue=null,R!==null)try{E==="input"&&f.type==="radio"&&f.name!=null&&wc(u,f),ea(E,x);var $=ea(E,f);for(x=0;x<R.length;x+=2){var W=R[x],K=R[x+1];W==="style"?Pc(u,K):W==="dangerouslySetInnerHTML"?Nc(u,K):W==="children"?Vr(u,K):O(u,W,K,$)}switch(E){case"input":qi(u,f);break;case"textarea":Cc(u,f);break;case"select":var B=u._wrapperState.wasMultiple;u._wrapperState.wasMultiple=!!f.multiple;var X=f.value;X!=null?ir(u,!!f.multiple,X,!1):B!==!!f.multiple&&(f.defaultValue!=null?ir(u,!!f.multiple,f.defaultValue,!0):ir(u,!!f.multiple,f.multiple?[]:"",!1))}u[mo]=f}catch(re){Me(e,e.return,re)}}break;case 6:if(Ot(n,e),Ut(e),i&4){if(e.stateNode===null)throw Error(s(162));u=e.stateNode,f=e.memoizedProps;try{u.nodeValue=f}catch(re){Me(e,e.return,re)}}break;case 3:if(Ot(n,e),Ut(e),i&4&&o!==null&&o.memoizedState.isDehydrated)try{ro(n.containerInfo)}catch(re){Me(e,e.return,re)}break;case 4:Ot(n,e),Ut(e);break;case 13:Ot(n,e),Ut(e),u=e.child,u.flags&8192&&(f=u.memoizedState!==null,u.stateNode.isHidden=f,!f||u.alternate!==null&&u.alternate.memoizedState!==null||(Nl=Ie())),i&4&&Vf(e);break;case 22:if(W=o!==null&&o.memoizedState!==null,e.mode&1?(Xe=($=Xe)||W,Ot(n,e),Xe=$):Ot(n,e),Ut(e),i&8192){if($=e.memoizedState!==null,(e.stateNode.isHidden=$)&&!W&&(e.mode&1)!==0)for(Z=e,W=e.child;W!==null;){for(K=Z=W;Z!==null;){switch(B=Z,X=B.child,B.tag){case 0:case 11:case 14:case 15:No(4,B,B.return);break;case 1:Rr(B,B.return);var J=B.stateNode;if(typeof J.componentWillUnmount=="function"){i=B,o=B.return;try{n=i,J.props=n.memoizedProps,J.state=n.memoizedState,J.componentWillUnmount()}catch(re){Me(i,o,re)}}break;case 5:Rr(B,B.return);break;case 22:if(B.memoizedState!==null){Yf(K);continue}}X!==null?(X.return=B,Z=X):Yf(K)}W=W.sibling}e:for(W=null,K=e;;){if(K.tag===5){if(W===null){W=K;try{u=K.stateNode,$?(f=u.style,typeof f.setProperty=="function"?f.setProperty("display","none","important"):f.display="none"):(E=K.stateNode,R=K.memoizedProps.style,x=R!=null&&R.hasOwnProperty("display")?R.display:null,E.style.display=Rc("display",x))}catch(re){Me(e,e.return,re)}}}else if(K.tag===6){if(W===null)try{K.stateNode.nodeValue=$?"":K.memoizedProps}catch(re){Me(e,e.return,re)}}else if((K.tag!==22&&K.tag!==23||K.memoizedState===null||K===e)&&K.child!==null){K.child.return=K,K=K.child;continue}if(K===e)break e;for(;K.sibling===null;){if(K.return===null||K.return===e)break e;W===K&&(W=null),K=K.return}W===K&&(W=null),K.sibling.return=K.return,K=K.sibling}}break;case 19:Ot(n,e),Ut(e),i&4&&Vf(e);break;case 21:break;default:Ot(n,e),Ut(e)}}function Ut(e){var n=e.flags;if(n&2){try{e:{for(var o=e.return;o!==null;){if(Bf(o)){var i=o;break e}o=o.return}throw Error(s(160))}switch(i.tag){case 5:var u=i.stateNode;i.flags&32&&(Vr(u,""),i.flags&=-33);var f=Wf(e);Cl(e,f,u);break;case 3:case 4:var x=i.stateNode.containerInfo,E=Wf(e);Sl(e,E,x);break;default:throw Error(s(161))}}catch(R){Me(e,e.return,R)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function Rx(e,n,o){Z=e,Gf(e)}function Gf(e,n,o){for(var i=(e.mode&1)!==0;Z!==null;){var u=Z,f=u.child;if(u.tag===22&&i){var x=u.memoizedState!==null||Hs;if(!x){var E=u.alternate,R=E!==null&&E.memoizedState!==null||Xe;E=Hs;var $=Xe;if(Hs=x,(Xe=R)&&!$)for(Z=u;Z!==null;)x=Z,R=x.child,x.tag===22&&x.memoizedState!==null?Xf(u):R!==null?(R.return=x,Z=R):Xf(u);for(;f!==null;)Z=f,Gf(f),f=f.sibling;Z=u,Hs=E,Xe=$}qf(e)}else(u.subtreeFlags&8772)!==0&&f!==null?(f.return=u,Z=f):qf(e)}}function qf(e){for(;Z!==null;){var n=Z;if((n.flags&8772)!==0){var o=n.alternate;try{if((n.flags&8772)!==0)switch(n.tag){case 0:case 11:case 15:Xe||Bs(5,n);break;case 1:var i=n.stateNode;if(n.flags&4&&!Xe)if(o===null)i.componentDidMount();else{var u=n.elementType===n.type?o.memoizedProps:Tt(n.type,o.memoizedProps);i.componentDidUpdate(u,o.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var f=n.updateQueue;f!==null&&qd(n,f,i);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}qd(n,x,o)}break;case 5:var E=n.stateNode;if(o===null&&n.flags&4){o=E;var R=n.memoizedProps;switch(n.type){case"button":case"input":case"select":case"textarea":R.autoFocus&&o.focus();break;case"img":R.src&&(o.src=R.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(n.memoizedState===null){var $=n.alternate;if($!==null){var W=$.memoizedState;if(W!==null){var K=W.dehydrated;K!==null&&ro(K)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(s(163))}Xe||n.flags&512&&bl(n)}catch(B){Me(n,n.return,B)}}if(n===e){Z=null;break}if(o=n.sibling,o!==null){o.return=n.return,Z=o;break}Z=n.return}}function Yf(e){for(;Z!==null;){var n=Z;if(n===e){Z=null;break}var o=n.sibling;if(o!==null){o.return=n.return,Z=o;break}Z=n.return}}function Xf(e){for(;Z!==null;){var n=Z;try{switch(n.tag){case 0:case 11:case 15:var o=n.return;try{Bs(4,n)}catch(R){Me(n,o,R)}break;case 1:var i=n.stateNode;if(typeof i.componentDidMount=="function"){var u=n.return;try{i.componentDidMount()}catch(R){Me(n,u,R)}}var f=n.return;try{bl(n)}catch(R){Me(n,f,R)}break;case 5:var x=n.return;try{bl(n)}catch(R){Me(n,x,R)}}}catch(R){Me(n,n.return,R)}if(n===e){Z=null;break}var E=n.sibling;if(E!==null){E.return=n.return,Z=E;break}Z=n.return}}var Px=Math.ceil,Ws=I.ReactCurrentDispatcher,El=I.ReactCurrentOwner,Ct=I.ReactCurrentBatchConfig,Se=0,We=null,Fe=null,Qe=0,mt=0,Pr=gn(0),ze=0,Ro=null,Qn=0,Ks=0,kl=0,Po=null,at=null,Nl=0,jr=1/0,rn=null,Vs=!1,Rl=null,Sn=null,Qs=!1,Cn=null,Gs=0,jo=0,Pl=null,qs=-1,Ys=0;function et(){return(Se&6)!==0?Ie():qs!==-1?qs:qs=Ie()}function En(e){return(e.mode&1)===0?1:(Se&2)!==0&&Qe!==0?Qe&-Qe:dx.transition!==null?(Ys===0&&(Ys=Bc()),Ys):(e=Ee,e!==0||(e=window.event,e=e===void 0?16:Zc(e.type)),e)}function At(e,n,o,i){if(50<jo)throw jo=0,Pl=null,Error(s(185));Zr(e,o,i),((Se&2)===0||e!==We)&&(e===We&&((Se&2)===0&&(Ks|=o),ze===4&&kn(e,Qe)),lt(e,i),o===1&&Se===0&&(n.mode&1)===0&&(jr=Ie()+500,Es&&yn()))}function lt(e,n){var o=e.callbackNode;dy(e,n);var i=ss(e,e===We?Qe:0);if(i===0)o!==null&&zc(o),e.callbackNode=null,e.callbackPriority=0;else if(n=i&-i,e.callbackPriority!==n){if(o!=null&&zc(o),n===1)e.tag===0?cx(Jf.bind(null,e)):Ld(Jf.bind(null,e)),ix(function(){(Se&6)===0&&yn()}),o=null;else{switch(Wc(i)){case 1:o=aa;break;case 4:o=Uc;break;case 16:o=ts;break;case 536870912:o=Hc;break;default:o=ts}o=ap(o,Zf.bind(null,e))}e.callbackPriority=n,e.callbackNode=o}}function Zf(e,n){if(qs=-1,Ys=0,(Se&6)!==0)throw Error(s(327));var o=e.callbackNode;if(Tr()&&e.callbackNode!==o)return null;var i=ss(e,e===We?Qe:0);if(i===0)return null;if((i&30)!==0||(i&e.expiredLanes)!==0||n)n=Xs(e,i);else{n=i;var u=Se;Se|=2;var f=tp();(We!==e||Qe!==n)&&(rn=null,jr=Ie()+500,qn(e,n));do try{_x();break}catch(E){ep(e,E)}while(!0);Va(),Ws.current=f,Se=u,Fe!==null?n=0:(We=null,Qe=0,n=ze)}if(n!==0){if(n===2&&(u=la(e),u!==0&&(i=u,n=jl(e,u))),n===1)throw o=Ro,qn(e,0),kn(e,i),lt(e,Ie()),o;if(n===6)kn(e,i);else{if(u=e.current.alternate,(i&30)===0&&!jx(u)&&(n=Xs(e,i),n===2&&(f=la(e),f!==0&&(i=f,n=jl(e,f))),n===1))throw o=Ro,qn(e,0),kn(e,i),lt(e,Ie()),o;switch(e.finishedWork=u,e.finishedLanes=i,n){case 0:case 1:throw Error(s(345));case 2:Yn(e,at,rn);break;case 3:if(kn(e,i),(i&130023424)===i&&(n=Nl+500-Ie(),10<n)){if(ss(e,0)!==0)break;if(u=e.suspendedLanes,(u&i)!==i){et(),e.pingedLanes|=e.suspendedLanes&u;break}e.timeoutHandle=Ia(Yn.bind(null,e,at,rn),n);break}Yn(e,at,rn);break;case 4:if(kn(e,i),(i&4194240)===i)break;for(n=e.eventTimes,u=-1;0<i;){var x=31-Rt(i);f=1<<x,x=n[x],x>u&&(u=x),i&=~f}if(i=u,i=Ie()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Px(i/1960))-i,10<i){e.timeoutHandle=Ia(Yn.bind(null,e,at,rn),i);break}Yn(e,at,rn);break;case 5:Yn(e,at,rn);break;default:throw Error(s(329))}}}return lt(e,Ie()),e.callbackNode===o?Zf.bind(null,e):null}function jl(e,n){var o=Po;return e.current.memoizedState.isDehydrated&&(qn(e,n).flags|=256),e=Xs(e,n),e!==2&&(n=at,at=o,n!==null&&Tl(n)),e}function Tl(e){at===null?at=e:at.push.apply(at,e)}function jx(e){for(var n=e;;){if(n.flags&16384){var o=n.updateQueue;if(o!==null&&(o=o.stores,o!==null))for(var i=0;i<o.length;i++){var u=o[i],f=u.getSnapshot;u=u.value;try{if(!Pt(f(),u))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 kn(e,n){for(n&=~kl,n&=~Ks,e.suspendedLanes|=n,e.pingedLanes&=~n,e=e.expirationTimes;0<n;){var o=31-Rt(n),i=1<<o;e[o]=-1,n&=~i}}function Jf(e){if((Se&6)!==0)throw Error(s(327));Tr();var n=ss(e,0);if((n&1)===0)return lt(e,Ie()),null;var o=Xs(e,n);if(e.tag!==0&&o===2){var i=la(e);i!==0&&(n=i,o=jl(e,i))}if(o===1)throw o=Ro,qn(e,0),kn(e,n),lt(e,Ie()),o;if(o===6)throw Error(s(345));return e.finishedWork=e.current.alternate,e.finishedLanes=n,Yn(e,at,rn),lt(e,Ie()),null}function _l(e,n){var o=Se;Se|=1;try{return e(n)}finally{Se=o,Se===0&&(jr=Ie()+500,Es&&yn())}}function Gn(e){Cn!==null&&Cn.tag===0&&(Se&6)===0&&Tr();var n=Se;Se|=1;var o=Ct.transition,i=Ee;try{if(Ct.transition=null,Ee=1,e)return e()}finally{Ee=i,Ct.transition=o,Se=n,(Se&6)===0&&yn()}}function Ol(){mt=Pr.current,je(Pr)}function qn(e,n){e.finishedWork=null,e.finishedLanes=0;var o=e.timeoutHandle;if(o!==-1&&(e.timeoutHandle=-1,sx(o)),Fe!==null)for(o=Fe.return;o!==null;){var i=o;switch(Ua(i),i.tag){case 1:i=i.type.childContextTypes,i!=null&&Ss();break;case 3:kr(),je(ot),je(Ge),el();break;case 5:Za(i);break;case 4:kr();break;case 13:je(Oe);break;case 19:je(Oe);break;case 10:Qa(i.type._context);break;case 22:case 23:Ol()}o=o.return}if(We=e,Fe=e=Nn(e.current,null),Qe=mt=n,ze=0,Ro=null,kl=Ks=Qn=0,at=Po=null,Wn!==null){for(n=0;n<Wn.length;n++)if(o=Wn[n],i=o.interleaved,i!==null){o.interleaved=null;var u=i.next,f=o.pending;if(f!==null){var x=f.next;f.next=u,i.next=x}o.pending=i}Wn=null}return e}function ep(e,n){do{var o=Fe;try{if(Va(),Ms.current=Fs,Is){for(var i=Ae.memoizedState;i!==null;){var u=i.queue;u!==null&&(u.pending=null),i=i.next}Is=!1}if(Vn=0,Be=$e=Ae=null,bo=!1,So=0,El.current=null,o===null||o.return===null){ze=1,Ro=n,Fe=null;break}e:{var f=e,x=o.return,E=o,R=n;if(n=Qe,E.flags|=32768,R!==null&&typeof R=="object"&&typeof R.then=="function"){var $=R,W=E,K=W.tag;if((W.mode&1)===0&&(K===0||K===11||K===15)){var B=W.alternate;B?(W.updateQueue=B.updateQueue,W.memoizedState=B.memoizedState,W.lanes=B.lanes):(W.updateQueue=null,W.memoizedState=null)}var X=kf(x);if(X!==null){X.flags&=-257,Nf(X,x,E,f,n),X.mode&1&&Ef(f,$,n),n=X,R=$;var J=n.updateQueue;if(J===null){var re=new Set;re.add(R),n.updateQueue=re}else J.add(R);break e}else{if((n&1)===0){Ef(f,$,n),Al();break e}R=Error(s(426))}}else if(_e&&E.mode&1){var De=kf(x);if(De!==null){(De.flags&65536)===0&&(De.flags|=256),Nf(De,x,E,f,n),Wa(Nr(R,E));break e}}f=R=Nr(R,E),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=Sf(f,R,n);Gd(f,M);break e;case 1:E=R;var j=f.type,D=f.stateNode;if((f.flags&128)===0&&(typeof j.getDerivedStateFromError=="function"||D!==null&&typeof D.componentDidCatch=="function"&&(Sn===null||!Sn.has(D)))){f.flags|=65536,n&=-n,f.lanes|=n;var Q=Cf(f,E,n);Gd(f,Q);break e}}f=f.return}while(f!==null)}rp(o)}catch(oe){n=oe,Fe===o&&o!==null&&(Fe=o=o.return);continue}break}while(!0)}function tp(){var e=Ws.current;return Ws.current=Fs,e===null?Fs:e}function Al(){(ze===0||ze===3||ze===2)&&(ze=4),We===null||(Qn&268435455)===0&&(Ks&268435455)===0||kn(We,Qe)}function Xs(e,n){var o=Se;Se|=2;var i=tp();(We!==e||Qe!==n)&&(rn=null,qn(e,n));do try{Tx();break}catch(u){ep(e,u)}while(!0);if(Va(),Se=o,Ws.current=i,Fe!==null)throw Error(s(261));return We=null,Qe=0,ze}function Tx(){for(;Fe!==null;)np(Fe)}function _x(){for(;Fe!==null&&!ny();)np(Fe)}function np(e){var n=ip(e.alternate,e,mt);e.memoizedProps=e.pendingProps,n===null?rp(e):Fe=n,El.current=null}function rp(e){var n=e;do{var o=n.alternate;if(e=n.return,(n.flags&32768)===0){if(o=Cx(o,n,mt),o!==null){Fe=o;return}}else{if(o=Ex(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 i=Ee,u=Ct.transition;try{Ct.transition=null,Ee=1,Ox(e,n,o,i)}finally{Ct.transition=u,Ee=i}return null}function Ox(e,n,o,i){do Tr();while(Cn!==null);if((Se&6)!==0)throw Error(s(327));o=e.finishedWork;var u=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(fy(e,f),e===We&&(Fe=We=null,Qe=0),(o.subtreeFlags&2064)===0&&(o.flags&2064)===0||Qs||(Qs=!0,ap(ts,function(){return Tr(),null})),f=(o.flags&15990)!==0,(o.subtreeFlags&15990)!==0||f){f=Ct.transition,Ct.transition=null;var x=Ee;Ee=1;var E=Se;Se|=4,El.current=null,Nx(e,o),Qf(o,e),Zy(Aa),ls=!!Oa,Aa=Oa=null,e.current=o,Rx(o),ry(),Se=E,Ee=x,Ct.transition=f}else e.current=o;if(Qs&&(Qs=!1,Cn=e,Gs=u),f=e.pendingLanes,f===0&&(Sn=null),iy(o.stateNode),lt(e,Ie()),n!==null)for(i=e.onRecoverableError,o=0;o<n.length;o++)u=n[o],i(u.value,{componentStack:u.stack,digest:u.digest});if(Vs)throw Vs=!1,e=Rl,Rl=null,e;return(Gs&1)!==0&&e.tag!==0&&Tr(),f=e.pendingLanes,(f&1)!==0?e===Pl?jo++:(jo=0,Pl=e):jo=0,yn(),null}function Tr(){if(Cn!==null){var e=Wc(Gs),n=Ct.transition,o=Ee;try{if(Ct.transition=null,Ee=16>e?16:e,Cn===null)var i=!1;else{if(e=Cn,Cn=null,Gs=0,(Se&6)!==0)throw Error(s(331));var u=Se;for(Se|=4,Z=e.current;Z!==null;){var f=Z,x=f.child;if((Z.flags&16)!==0){var E=f.deletions;if(E!==null){for(var R=0;R<E.length;R++){var $=E[R];for(Z=$;Z!==null;){var W=Z;switch(W.tag){case 0:case 11:case 15:No(8,W,f)}var K=W.child;if(K!==null)K.return=W,Z=K;else for(;Z!==null;){W=Z;var B=W.sibling,X=W.return;if(Hf(W),W===$){Z=null;break}if(B!==null){B.return=X,Z=B;break}Z=X}}}var J=f.alternate;if(J!==null){var re=J.child;if(re!==null){J.child=null;do{var De=re.sibling;re.sibling=null,re=De}while(re!==null)}}Z=f}}if((f.subtreeFlags&2064)!==0&&x!==null)x.return=f,Z=x;else e:for(;Z!==null;){if(f=Z,(f.flags&2048)!==0)switch(f.tag){case 0:case 11:case 15:No(9,f,f.return)}var M=f.sibling;if(M!==null){M.return=f.return,Z=M;break e}Z=f.return}}var j=e.current;for(Z=j;Z!==null;){x=Z;var D=x.child;if((x.subtreeFlags&2064)!==0&&D!==null)D.return=x,Z=D;else e:for(x=j;Z!==null;){if(E=Z,(E.flags&2048)!==0)try{switch(E.tag){case 0:case 11:case 15:Bs(9,E)}}catch(oe){Me(E,E.return,oe)}if(E===x){Z=null;break e}var Q=E.sibling;if(Q!==null){Q.return=E.return,Z=Q;break e}Z=E.return}}if(Se=u,yn(),Lt&&typeof Lt.onPostCommitFiberRoot=="function")try{Lt.onPostCommitFiberRoot(ns,e)}catch{}i=!0}return i}finally{Ee=o,Ct.transition=n}}return!1}function op(e,n,o){n=Nr(o,n),n=Sf(e,n,1),e=wn(e,n,1),n=et(),e!==null&&(Zr(e,1,n),lt(e,n))}function Me(e,n,o){if(e.tag===3)op(e,e,o);else for(;n!==null;){if(n.tag===3){op(n,e,o);break}else if(n.tag===1){var i=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(Sn===null||!Sn.has(i))){e=Nr(o,e),e=Cf(n,e,1),n=wn(n,e,1),e=et(),n!==null&&(Zr(n,1,e),lt(n,e));break}}n=n.return}}function Ax(e,n,o){var i=e.pingCache;i!==null&&i.delete(n),n=et(),e.pingedLanes|=e.suspendedLanes&o,We===e&&(Qe&o)===o&&(ze===4||ze===3&&(Qe&130023424)===Qe&&500>Ie()-Nl?qn(e,0):kl|=o),lt(e,n)}function sp(e,n){n===0&&((e.mode&1)===0?n=1:(n=os,os<<=1,(os&130023424)===0&&(os=4194304)));var o=et();e=en(e,n),e!==null&&(Zr(e,n,o),lt(e,o))}function Mx(e){var n=e.memoizedState,o=0;n!==null&&(o=n.retryLane),sp(e,o)}function Ix(e,n){var o=0;switch(e.tag){case 13:var i=e.stateNode,u=e.memoizedState;u!==null&&(o=u.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(s(314))}i!==null&&i.delete(n),sp(e,o)}var ip;ip=function(e,n,o){if(e!==null)if(e.memoizedProps!==n.pendingProps||ot.current)it=!0;else{if((e.lanes&o)===0&&(n.flags&128)===0)return it=!1,Sx(e,n,o);it=(e.flags&131072)!==0}else it=!1,_e&&(n.flags&1048576)!==0&&Fd(n,Ns,n.index);switch(n.lanes=0,n.tag){case 2:var i=n.type;Us(e,n),e=n.pendingProps;var u=yr(n,Ge.current);Er(n,o),u=rl(null,n,i,e,u,o);var f=ol();return n.flags|=1,typeof u=="object"&&u!==null&&typeof u.render=="function"&&u.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,st(i)?(f=!0,Cs(n)):f=!1,n.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,Ya(n),u.updater=$s,n.stateNode=u,u._reactInternals=n,cl(n,i,e,o),n=hl(null,n,i,!0,f,o)):(n.tag=0,_e&&f&&za(n),Je(null,n,u,o),n=n.child),n;case 16:i=n.elementType;e:{switch(Us(e,n),e=n.pendingProps,u=i._init,i=u(i._payload),n.type=i,u=n.tag=Lx(i),e=Tt(i,e),u){case 0:n=pl(null,n,i,e,o);break e;case 1:n=Of(null,n,i,e,o);break e;case 11:n=Rf(null,n,i,e,o);break e;case 14:n=Pf(null,n,i,Tt(i.type,e),o);break e}throw Error(s(306,i,""))}return n;case 0:return i=n.type,u=n.pendingProps,u=n.elementType===i?u:Tt(i,u),pl(e,n,i,u,o);case 1:return i=n.type,u=n.pendingProps,u=n.elementType===i?u:Tt(i,u),Of(e,n,i,u,o);case 3:e:{if(Af(n),e===null)throw Error(s(387));i=n.pendingProps,f=n.memoizedState,u=f.element,Qd(e,n),Os(n,i,null,o);var x=n.memoizedState;if(i=x.element,f.isDehydrated)if(f={element:i,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},n.updateQueue.baseState=f,n.memoizedState=f,n.flags&256){u=Nr(Error(s(423)),n),n=Mf(e,n,i,o,u);break e}else if(i!==u){u=Nr(Error(s(424)),n),n=Mf(e,n,i,o,u);break e}else for(ht=mn(n.stateNode.containerInfo.firstChild),pt=n,_e=!0,jt=null,o=Kd(n,null,i,o),n.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(br(),i===u){n=nn(e,n,o);break e}Je(e,n,i,o)}n=n.child}return n;case 5:return Yd(n),e===null&&Ba(n),i=n.type,u=n.pendingProps,f=e!==null?e.memoizedProps:null,x=u.children,Ma(i,u)?x=null:f!==null&&Ma(i,f)&&(n.flags|=32),_f(e,n),Je(e,n,x,o),n.child;case 6:return e===null&&Ba(n),null;case 13:return If(e,n,o);case 4:return Xa(n,n.stateNode.containerInfo),i=n.pendingProps,e===null?n.child=Sr(n,null,i,o):Je(e,n,i,o),n.child;case 11:return i=n.type,u=n.pendingProps,u=n.elementType===i?u:Tt(i,u),Rf(e,n,i,u,o);case 7:return Je(e,n,n.pendingProps,o),n.child;case 8:return Je(e,n,n.pendingProps.children,o),n.child;case 12:return Je(e,n,n.pendingProps.children,o),n.child;case 10:e:{if(i=n.type._context,u=n.pendingProps,f=n.memoizedProps,x=u.value,Ne(js,i._currentValue),i._currentValue=x,f!==null)if(Pt(f.value,x)){if(f.children===u.children&&!ot.current){n=nn(e,n,o);break e}}else for(f=n.child,f!==null&&(f.return=n);f!==null;){var E=f.dependencies;if(E!==null){x=f.child;for(var R=E.firstContext;R!==null;){if(R.context===i){if(f.tag===1){R=tn(-1,o&-o),R.tag=2;var $=f.updateQueue;if($!==null){$=$.shared;var W=$.pending;W===null?R.next=R:(R.next=W.next,W.next=R),$.pending=R}}f.lanes|=o,R=f.alternate,R!==null&&(R.lanes|=o),Ga(f.return,o,n),E.lanes|=o;break}R=R.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,E=x.alternate,E!==null&&(E.lanes|=o),Ga(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}Je(e,n,u.children,o),n=n.child}return n;case 9:return u=n.type,i=n.pendingProps.children,Er(n,o),u=bt(u),i=i(u),n.flags|=1,Je(e,n,i,o),n.child;case 14:return i=n.type,u=Tt(i,n.pendingProps),u=Tt(i.type,u),Pf(e,n,i,u,o);case 15:return jf(e,n,n.type,n.pendingProps,o);case 17:return i=n.type,u=n.pendingProps,u=n.elementType===i?u:Tt(i,u),Us(e,n),n.tag=1,st(i)?(e=!0,Cs(n)):e=!1,Er(n,o),wf(n,i,u),cl(n,i,u,o),hl(null,n,i,!0,e,o);case 19:return Lf(e,n,o);case 22:return Tf(e,n,o)}throw Error(s(156,n.tag))};function ap(e,n){return $c(e,n)}function Dx(e,n,o,i){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=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Et(e,n,o,i){return new Dx(e,n,o,i)}function Ml(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Lx(e){if(typeof e=="function")return Ml(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Y)return 11;if(e===me)return 14}return 2}function Nn(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 Zs(e,n,o,i,u,f){var x=2;if(i=e,typeof e=="function")Ml(e)&&(x=1);else if(typeof e=="string")x=5;else e:switch(e){case U:return Xn(o.children,u,f,n);case q:x=8,u|=8;break;case te:return e=Et(12,o,n,u|2),e.elementType=te,e.lanes=f,e;case ae:return e=Et(13,o,n,u),e.elementType=ae,e.lanes=f,e;case G:return e=Et(19,o,n,u),e.elementType=G,e.lanes=f,e;case ie:return Js(o,u,f,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ne:x=10;break e;case se:x=9;break e;case Y:x=11;break e;case me:x=14;break e;case ee:x=16,i=null;break e}throw Error(s(130,e==null?e:typeof e,""))}return n=Et(x,o,n,u),n.elementType=e,n.type=i,n.lanes=f,n}function Xn(e,n,o,i){return e=Et(7,e,i,n),e.lanes=o,e}function Js(e,n,o,i){return e=Et(22,e,i,n),e.elementType=ie,e.lanes=o,e.stateNode={isHidden:!1},e}function Il(e,n,o){return e=Et(6,e,null,n),e.lanes=o,e}function Dl(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 Fx(e,n,o,i,u){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=ua(0),this.expirationTimes=ua(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ua(0),this.identifierPrefix=i,this.onRecoverableError=u,this.mutableSourceEagerHydrationData=null}function Ll(e,n,o,i,u,f,x,E,R){return e=new Fx(e,n,o,E,R),n===1?(n=1,f===!0&&(n|=8)):n=0,f=Et(3,null,null,n),e.current=f,f.stateNode=e,f.memoizedState={element:i,isDehydrated:o,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ya(f),e}function $x(e,n,o){var i=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:L,key:i==null?null:""+i,children:e,containerInfo:n,implementation:o}}function lp(e){if(!e)return vn;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(st(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(st(o))return Id(e,o,n)}return n}function up(e,n,o,i,u,f,x,E,R){return e=Ll(o,i,!0,e,u,f,x,E,R),e.context=lp(null),o=e.current,i=et(),u=En(o),f=tn(i,u),f.callback=n??null,wn(o,f,u),e.current.lanes=u,Zr(e,u,i),lt(e,i),e}function ei(e,n,o,i){var u=n.current,f=et(),x=En(u);return o=lp(o),n.context===null?n.context=o:n.pendingContext=o,n=tn(f,x),n.payload={element:e},i=i===void 0?null:i,i!==null&&(n.callback=i),e=wn(u,n,x),e!==null&&(At(e,u,x,f),_s(e,u,x)),x}function ti(e){return e=e.current,e.child?(e.child.tag===5,e.child.stateNode):null}function cp(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var o=e.retryLane;e.retryLane=o!==0&&o<n?o:n}}function Fl(e,n){cp(e,n),(e=e.alternate)&&cp(e,n)}function zx(){return null}var dp=typeof reportError=="function"?reportError:function(e){console.error(e)};function $l(e){this._internalRoot=e}ni.prototype.render=$l.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(s(409));ei(e,n,null,null)},ni.prototype.unmount=$l.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;Gn(function(){ei(null,e,null,null)}),n[Yt]=null}};function ni(e){this._internalRoot=e}ni.prototype.unstable_scheduleHydration=function(e){if(e){var n=Qc();e={blockedOn:null,target:e,priority:n};for(var o=0;o<fn.length&&n!==0&&n<fn[o].priority;o++);fn.splice(o,0,e),o===0&&Yc(e)}};function zl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ri(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function fp(){}function Ux(e,n,o,i,u){if(u){if(typeof i=="function"){var f=i;i=function(){var $=ti(x);f.call($)}}var x=up(n,i,e,0,null,!1,!1,"",fp);return e._reactRootContainer=x,e[Yt]=x.current,po(e.nodeType===8?e.parentNode:e),Gn(),x}for(;u=e.lastChild;)e.removeChild(u);if(typeof i=="function"){var E=i;i=function(){var $=ti(R);E.call($)}}var R=Ll(e,0,!1,null,null,!1,!1,"",fp);return e._reactRootContainer=R,e[Yt]=R.current,po(e.nodeType===8?e.parentNode:e),Gn(function(){ei(n,R,o,i)}),R}function oi(e,n,o,i,u){var f=o._reactRootContainer;if(f){var x=f;if(typeof u=="function"){var E=u;u=function(){var R=ti(x);E.call(R)}}ei(n,x,e,u)}else x=Ux(o,n,e,u,i);return ti(x)}Kc=function(e){switch(e.tag){case 3:var n=e.stateNode;if(n.current.memoizedState.isDehydrated){var o=Xr(n.pendingLanes);o!==0&&(ca(n,o|1),lt(n,Ie()),(Se&6)===0&&(jr=Ie()+500,yn()))}break;case 13:Gn(function(){var i=en(e,1);if(i!==null){var u=et();At(i,e,1,u)}}),Fl(e,1)}},da=function(e){if(e.tag===13){var n=en(e,134217728);if(n!==null){var o=et();At(n,e,134217728,o)}Fl(e,134217728)}},Vc=function(e){if(e.tag===13){var n=En(e),o=en(e,n);if(o!==null){var i=et();At(o,e,n,i)}Fl(e,n)}},Qc=function(){return Ee},Gc=function(e,n){var o=Ee;try{return Ee=e,n()}finally{Ee=o}},ra=function(e,n,o){switch(n){case"input":if(qi(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 i=o[n];if(i!==e&&i.form===e.form){var u=bs(i);if(!u)throw Error(s(90));Xo(i),qi(i,u)}}}break;case"textarea":Cc(e,o);break;case"select":n=o.value,n!=null&&ir(e,!!o.multiple,n,!1)}},Oc=_l,Ac=Gn;var Hx={usingClientEntryPoint:!1,Events:[go,gr,bs,Tc,_c,_l]},To={findFiberByHostInstance:zn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Bx={bundleType:To.bundleType,version:To.version,rendererPackageName:To.rendererPackageName,rendererConfig:To.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:I.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Lc(e),e===null?null:e.stateNode},findFiberByHostInstance:To.findFiberByHostInstance||zx,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 si=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!si.isDisabled&&si.supportsFiber)try{ns=si.inject(Bx),Lt=si}catch{}}return ut.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Hx,ut.createPortal=function(e,n){var o=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!zl(n))throw Error(s(200));return $x(e,n,null,o)},ut.createRoot=function(e,n){if(!zl(e))throw Error(s(299));var o=!1,i="",u=dp;return n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(u=n.onRecoverableError)),n=Ll(e,1,!1,null,null,o,!1,i,u),e[Yt]=n.current,po(e.nodeType===8?e.parentNode:e),new $l(n)},ut.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=Lc(n),e=e===null?null:e.stateNode,e},ut.flushSync=function(e){return Gn(e)},ut.hydrate=function(e,n,o){if(!ri(n))throw Error(s(200));return oi(null,e,n,!0,o)},ut.hydrateRoot=function(e,n,o){if(!zl(e))throw Error(s(405));var i=o!=null&&o.hydratedSources||null,u=!1,f="",x=dp;if(o!=null&&(o.unstable_strictMode===!0&&(u=!0),o.identifierPrefix!==void 0&&(f=o.identifierPrefix),o.onRecoverableError!==void 0&&(x=o.onRecoverableError)),n=up(n,null,e,1,o??null,u,!1,f,x),e[Yt]=n.current,po(e),i)for(e=0;e<i.length;e++)o=i[e],u=o._getVersion,u=u(o._source),n.mutableSourceEagerHydrationData==null?n.mutableSourceEagerHydrationData=[o,u]:n.mutableSourceEagerHydrationData.push(o,u);return new ni(n)},ut.render=function(e,n,o){if(!ri(n))throw Error(s(200));return oi(null,e,n,!1,o)},ut.unmountComponentAtNode=function(e){if(!ri(e))throw Error(s(40));return e._reactRootContainer?(Gn(function(){oi(null,null,e,!1,function(){e._reactRootContainer=null,e[Yt]=null})}),!0):!1},ut.unstable_batchedUpdates=_l,ut.unstable_renderSubtreeIntoContainer=function(e,n,o,i){if(!ri(o))throw Error(s(200));if(e==null||e._reactInternals===void 0)throw Error(s(38));return oi(e,n,o,!1,i)},ut.version="18.3.1-next-f1338f8080-20240426",ut}var wp;function _h(){if(wp)return Bl.exports;wp=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(),Bl.exports=Xx(),Bl.exports}var bp;function Zx(){if(bp)return ii;bp=1;var t=_h();return ii.createRoot=t.createRoot,ii.hydrateRoot=t.hydrateRoot,ii}var Jx=Zx();function ew(t,r){if(t instanceof RegExp)return{keys:!1,pattern:t};var s,a,l,d,p=[],h="",y=t.split("/");for(y[0]||y.shift();l=y.shift();)s=l[0],s==="*"?(p.push(s),h+=l[1]==="?"?"(?:/(.*))?":"/(.*)"):s===":"?(a=l.indexOf("?",1),d=l.indexOf(".",1),p.push(l.substring(1,~a?a:~d?d:l.length)),h+=~a&&!~d?"(?:/([^/]+?))?":"/([^/]+?)",~d&&(h+=(~a?"?":"")+"\\"+l.substring(d))):h+="/"+l;return{keys:p,pattern:new RegExp("^"+h+(r?"(?=$|/)":"/?$"),"i")}}var m=Pi();const _n=Th(m),Du=Kx({__proto__:null,default:_n},[m]);var Vl={exports:{}},Ql={};var Sp;function tw(){if(Sp)return Ql;Sp=1;var t=Pi();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,a=t.useState,l=t.useEffect,d=t.useLayoutEffect,p=t.useDebugValue;function h(w,b){var k=b(),N=a({inst:{value:k,getSnapshot:b}}),S=N[0].inst,C=N[1];return d(function(){S.value=k,S.getSnapshot=b,y(S)&&C({inst:S})},[w,k,b]),l(function(){return y(S)&&C({inst:S}),w(function(){y(S)&&C({inst:S})})},[w]),p(k),k}function y(w){var b=w.getSnapshot;w=w.value;try{var k=b();return!s(w,k)}catch{return!0}}function v(w,b){return b()}var g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?v:h;return Ql.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:g,Ql}var Cp;function nw(){return Cp||(Cp=1,Vl.exports=tw()),Vl.exports}var Oh=nw();const rw=Du.useInsertionEffect,ow=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",sw=ow?m.useLayoutEffect:m.useEffect,iw=rw||sw,Ah=t=>{const r=m.useRef([t,(...s)=>r[0](...s)]).current;return iw(()=>{r[0]=t}),r[1]},aw="popstate",Lu="pushState",Fu="replaceState",lw="hashchange",Ep=[aw,Lu,Fu,lw],uw=t=>{for(const r of Ep)addEventListener(r,t);return()=>{for(const r of Ep)removeEventListener(r,t)}},Mh=(t,r)=>Oh.useSyncExternalStore(uw,t,r),kp=()=>location.search,cw=({ssrSearch:t}={})=>Mh(kp,t!=null?()=>t:kp),Np=()=>location.pathname,dw=({ssrPath:t}={})=>Mh(Np,t!=null?()=>t:Np),fw=(t,{replace:r=!1,state:s=null}={})=>history[r?Fu:Lu](s,"",t),pw=(t={})=>[dw(t),fw],Rp=Symbol.for("wouter_v3");if(typeof history<"u"&&typeof window[Rp]>"u"){for(const t of[Lu,Fu]){const r=history[t];history[t]=function(){const s=r.apply(this,arguments),a=new Event(t);return a.arguments=arguments,dispatchEvent(a),s}}Object.defineProperty(window,Rp,{value:!0})}const hw=(t,r)=>r.toLowerCase().indexOf(t.toLowerCase())?"~"+r:r.slice(t.length)||"/",Ih=(t="")=>t==="/"?"":t,mw=(t,r)=>t[0]==="~"?t.slice(1):Ih(r)+t,gw=(t="",r)=>hw(Pp(Ih(t)),Pp(r)),Pp=t=>{try{return decodeURI(t)}catch{return t}},Dh={hook:pw,searchHook:cw,parser:ew,base:"",ssrPath:void 0,ssrSearch:void 0,ssrContext:void 0,hrefs:t=>t,aroundNav:(t,r,s)=>t(r,s)},Lh=m.createContext(Dh),ji=()=>m.useContext(Lh),Fh={},$h=m.createContext(Fh),vw=()=>m.useContext($h),$u=t=>{const[r,s]=t.hook(t);return[gw(t.base,r),Ah((a,l)=>t.aroundNav(s,mw(a,t.base),l))]},zh=(t,r,s,a)=>{const{pattern:l,keys:d}=r instanceof RegExp?{keys:!1,pattern:r}:t(r||"*",a),p=l.exec(s)||[],[h,...y]=p;return h!==void 0?[!0,(()=>{const v=d!==!1?Object.fromEntries(d.map((w,b)=>[w,y[b]])):p.groups;let g={...y};return v&&Object.assign(g,v),g})(),...a?[h]:[]]:[!1,null]},Uh=({children:t,...r})=>{const s=ji(),a=r.hook?Dh:s;let l=a;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({}),y=h.current,v=y;for(let g in a){const w=g==="base"?a[g]+(r[g]??""):r[g]??a[g];y===v&&w!==v[g]&&(h.current=v={...v}),v[g]=w,(w!==a[g]||w!==l[g])&&(l=v)}return m.createElement(Lh.Provider,{value:l,children:t})},jp=({children:t,component:r},s)=>r?m.createElement(r,{params:s}):typeof t=="function"?t(s):t,yw=t=>{let r=m.useRef(Fh);const s=r.current;return r.current=Object.keys(t).length!==Object.keys(s).length||Object.entries(t).some(([a,l])=>l!==s[a])?t:s},Oo=({path:t,nest:r,match:s,...a})=>{const l=ji(),[d]=$u(l),[p,h,y]=s??zh(l.parser,t,d,r),v=yw({...vw(),...h});if(!p)return null;const g=y?m.createElement(Uh,{base:y},jp(a,v)):jp(a,v);return m.createElement($h.Provider,{value:v,children:g})},An=m.forwardRef((t,r)=>{const s=ji(),[a,l]=$u(s),{to:d="",href:p=d,onClick:h,asChild:y,children:v,className:g,replace:w,state:b,transition:k,...N}=t,S=Ah(_=>{_.ctrlKey||_.metaKey||_.altKey||_.shiftKey||_.button!==0||(h?.(_),_.defaultPrevented||(_.preventDefault(),l(p,t)))}),C=s.hrefs(p[0]==="~"?p.slice(1):s.base+p,s);return y&&m.isValidElement(v)?m.cloneElement(v,{onClick:S,href:C}):m.createElement("a",{...N,onClick:S,href:C,className:g?.call?g(a===p):g,children:v,ref:r})}),Hh=t=>Array.isArray(t)?t.flatMap(r=>Hh(r&&r.type===m.Fragment?r.props.children:r)):[t],xw=({children:t,location:r})=>{const s=ji(),[a]=$u(s);for(const l of Hh(t)){let d=0;if(m.isValidElement(l)&&(d=zh(s.parser,l.props.path,r||a,l.props.nest))[0])return m.cloneElement(l,{match:d})}return null},Io={v:[]},Tp=()=>Io.v.forEach(t=>t()),ww=t=>(Io.v.push(t)===1&&addEventListener("hashchange",Tp),()=>{Io.v=Io.v.filter(r=>r!==t),Io.v.length||removeEventListener("hashchange",Tp)}),bw=()=>"/"+location.hash.replace(/^#?\/?/,""),Sw=(t,{state:r=null,replace:s=!1}={})=>{const a=location.href,[l,d]=t.replace(/^#?\/?/,"").split("?"),p=new URL(location.href);p.hash=`/${l}`,d&&(p.search=d);const h=p.href;s?history.replaceState(r,"",h):history.pushState(r,"",h);const y=typeof HashChangeEvent<"u"?new HashChangeEvent("hashchange",{oldURL:a,newURL:h}):new Event("hashchange",{detail:{oldURL:a,newURL:h}});dispatchEvent(y)},Bh=({ssrPath:t="/"}={})=>[Oh.useSyncExternalStore(ww,bw,()=>t),Sw];Bh.hrefs=t=>"#"+t;var $r=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(){}},Cw={setTimeout:(t,r)=>setTimeout(t,r),clearTimeout:t=>clearTimeout(t),setInterval:(t,r)=>setInterval(t,r),clearInterval:t=>clearInterval(t)},Ew=class{#e=Cw;#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 Ew;function kw(t){setTimeout(t,0)}var er=typeof window>"u"||"Deno"in globalThis;function tt(){}function Nw(t,r){return typeof t=="function"?t(r):t}function gu(t){return typeof t=="number"&&t>=0&&t!==1/0}function Wh(t,r){return Math.max(t+(r||0)-Date.now(),0)}function Mn(t,r){return typeof t=="function"?t(r):t}function kt(t,r){return typeof t=="function"?t(r):t}function _p(t,r){const{type:s="all",exact:a,fetchStatus:l,predicate:d,queryKey:p,stale:h}=t;if(p){if(a){if(r.queryHash!==zu(p,r.options))return!1}else if(!Fo(r.queryKey,p))return!1}if(s!=="all"){const y=r.isActive();if(s==="active"&&!y||s==="inactive"&&y)return!1}return!(typeof h=="boolean"&&r.isStale()!==h||l&&l!==r.state.fetchStatus||d&&!d(r))}function Op(t,r){const{exact:s,status:a,predicate:l,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!(a&&r.state.status!==a||l&&!l(r))}function zu(t,r){return(r?.queryKeyHashFn||tr)(t)}function tr(t){return JSON.stringify(t,(r,s)=>vu(s)?Object.keys(s).sort().reduce((a,l)=>(a[l]=s[l],a),{}):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 Rw=Object.prototype.hasOwnProperty;function Kh(t,r,s=0){if(t===r)return t;if(s>500)return r;const a=Ap(t)&&Ap(r);if(!a&&!(vu(t)&&vu(r)))return r;const d=(a?t:Object.keys(t)).length,p=a?r:Object.keys(r),h=p.length,y=a?new Array(h):{};let v=0;for(let g=0;g<h;g++){const w=a?g:p[g],b=t[w],k=r[w];if(b===k){y[w]=b,(a?g<d:Rw.call(t,w))&&v++;continue}if(b===null||k===null||typeof b!="object"||typeof k!="object"){y[w]=k;continue}const N=Kh(b,k,s+1);y[w]=N,N===b&&v++}return d===h&&v===d?t:y}function wi(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 Ap(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function vu(t){if(!Mp(t))return!1;const r=t.constructor;if(r===void 0)return!0;const s=r.prototype;return!(!Mp(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function Mp(t){return Object.prototype.toString.call(t)==="[object Object]"}function Pw(t){return new Promise(r=>{Jn.setTimeout(r,t)})}function yu(t,r,s){return typeof s.structuralSharing=="function"?s.structuralSharing(t,r):s.structuralSharing!==!1?Kh(t,r):r}function jw(t,r,s=0){const a=[...t,r];return s&&a.length>s?a.slice(1):a}function Tw(t,r,s=0){const a=[r,...t];return s&&a.length>s?a.slice(0,-1):a}var Uu=Symbol();function Vh(t,r){return!t.queryFn&&r?.initialPromise?()=>r.initialPromise:!t.queryFn||t.queryFn===Uu?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function Hu(t,r){return typeof t=="function"?t(...r):!!t}function _w(t,r,s){let a=!1,l;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(l??=r(),a||(a=!0,l.aborted?s():l.addEventListener("abort",s,{once:!0})),l)}),t}var Ow=class extends $r{#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"}},Bu=new Ow;function xu(){let t,r;const s=new Promise((l,d)=>{t=l,r=d});s.status="pending",s.catch(()=>{});function a(l){Object.assign(s,l),delete s.resolve,delete s.reject}return s.resolve=l=>{a({status:"fulfilled",value:l}),t(l)},s.reject=l=>{a({status:"rejected",reason:l}),r(l)},s}var Aw=kw;function Mw(){let t=[],r=0,s=h=>{h()},a=h=>{h()},l=Aw;const d=h=>{r?t.push(h):l(()=>{s(h)})},p=()=>{const h=t;t=[],h.length&&l(()=>{a(()=>{h.forEach(y=>{s(y)})})})};return{batch:h=>{let y;r++;try{y=h()}finally{r--,r||p()}return y},batchCalls:h=>(...y)=>{d(()=>{h(...y)})},schedule:d,setNotifyFunction:h=>{s=h},setBatchNotifyFunction:h=>{a=h},setScheduler:h=>{l=h}}}var Ue=Mw(),Iw=class extends $r{#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}},bi=new Iw;function Dw(t){return Math.min(1e3*2**t,3e4)}function Qh(t){return(t??"online")==="online"?bi.isOnline():!0}var wu=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function Gh(t){let r=!1,s=0,a;const l=xu(),d=()=>l.status!=="pending",p=S=>{if(!d()){const C=new wu(S);b(C),t.onCancel?.(C)}},h=()=>{r=!0},y=()=>{r=!1},v=()=>Bu.isFocused()&&(t.networkMode==="always"||bi.isOnline())&&t.canRun(),g=()=>Qh(t.networkMode)&&t.canRun(),w=S=>{d()||(a?.(),l.resolve(S))},b=S=>{d()||(a?.(),l.reject(S))},k=()=>new Promise(S=>{a=C=>{(d()||v())&&S(C)},t.onPause?.()}).then(()=>{a=void 0,d()||t.onContinue?.()}),N=()=>{if(d())return;let S;const C=s===0?t.initialPromise:void 0;try{S=C??t.fn()}catch(_){S=Promise.reject(_)}Promise.resolve(S).then(w).catch(_=>{if(d())return;const A=t.retry??(er?0:3),O=t.retryDelay??Dw,I=typeof O=="function"?O(s,_):O,F=A===!0||typeof A=="number"&&s<A||typeof A=="function"&&A(s,_);if(r||!F){b(_);return}s++,t.onFail?.(s,_),Pw(I).then(()=>v()?void 0:k()).then(()=>{r?b(_):N()})})};return{promise:l,status:()=>l.status,cancel:p,continue:()=>(a?.(),l),cancelRetry:h,continueRetry:y,canStart:g,start:()=>(g()?N():k().then(N),l)}}var qh=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),gu(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)}},Lw=class extends qh{#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=Dp(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=Dp(this.options);r.data!==void 0&&(this.setState(Ip(r.data,r.dataUpdatedAt)),this.#e=r)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(t,r){const s=yu(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(tt).catch(tt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(t=>kt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Uu||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:!Wh(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(y=>y.options.queryFn);h&&this.setOptions(h.options)}const s=new AbortController,a=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(this.#a=!0,s.signal)})},l=()=>{const h=Vh(this.options,r),v=(()=>{const g={client:this.#o,queryKey:this.queryKey,meta:this.meta};return a(g),g})();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:l};return a(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=Gh({initialPromise:r?.initialPromise,fn:p.fetchFn,onCancel:h=>{h instanceof wu&&h.revert&&this.setState({...this.#t,fetchStatus:"idle"}),s.abort()},onFail:(h,y)=>{this.#s({type:"failed",failureCount:h,error:y})},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 wu){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,...Yh(s.data,this.options),fetchMeta:t.meta??null};case"success":const a={...s,...Ip(t.data,t.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=t.manual?a:void 0,a;case"error":const l=t.error;return{...s,error:l,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:l,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 Yh(t,r){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Qh(r.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function Ip(t,r){return{data:t,dataUpdatedAt:r??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Dp(t){const r=typeof t.initialData=="function"?t.initialData():t.initialData,s=r!==void 0,a=s?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:r,dataUpdateCount:0,dataUpdatedAt:s?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var Fw=class extends $r{constructor(t,r){super(),this.options=r,this.#e=t,this.#s=null,this.#a=xu(),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),Lp(this.#t,this.options)?this.#d():this.updateResult(),this.#x())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return bu(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return bu(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 kt(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&&!wi(this.options,r)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const a=this.hasListeners();a&&Fp(this.#t,s,this.options,r)&&this.#d(),this.updateResult(),a&&(this.#t!==s||kt(this.options.enabled,this.#t)!==kt(r.enabled,this.#t)||Mn(this.options.staleTime,this.#t)!==Mn(r.staleTime,this.#t))&&this.#g();const l=this.#v();a&&(this.#t!==s||kt(this.options.enabled,this.#t)!==kt(r.enabled,this.#t)||l!==this.#l)&&this.#y(l)}getOptimisticResult(t){const r=this.#e.getQueryCache().build(this.#e,t),s=this.createResult(r,t);return zw(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,a)=>(this.trackProp(a),r?.(a),a==="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,a))})}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(tt)),r}#g(){this.#w();const t=Mn(this.options.staleTime,this.#t);if(er||this.#o.isStale||!gu(t))return;const s=Wh(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}#y(t){this.#b(),this.#l=t,!(er||kt(this.options.enabled,this.#t)===!1||!gu(this.#l)||this.#l===0)&&(this.#c=Jn.setInterval(()=>{(this.options.refetchIntervalInBackground||Bu.isFocused())&&this.#d()},this.#l))}#x(){this.#g(),this.#y(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,a=this.options,l=this.#o,d=this.#r,p=this.#i,y=t!==s?t.state:this.#n,{state:v}=t;let g={...v},w=!1,b;if(r._optimisticResults){const q=this.hasListeners(),te=!q&&Lp(t,r),ne=q&&Fp(t,s,r,a);(te||ne)&&(g={...g,...Yh(v.data,t.options)}),r._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:k,errorUpdatedAt:N,status:S}=g;b=g.data;let C=!1;if(r.placeholderData!==void 0&&b===void 0&&S==="pending"){let q;l?.isPlaceholderData&&r.placeholderData===p?.placeholderData?(q=l.data,C=!0):q=typeof r.placeholderData=="function"?r.placeholderData(this.#p?.state.data,this.#p):r.placeholderData,q!==void 0&&(S="success",b=yu(l?.data,q,r),w=!0)}if(r.select&&b!==void 0&&!C)if(l&&b===d?.data&&r.select===this.#m)b=this.#f;else try{this.#m=r.select,b=r.select(b),b=yu(l?.data,b,r),this.#f=b,this.#s=null}catch(q){this.#s=q}this.#s&&(k=this.#s,b=this.#f,N=Date.now(),S="error");const _=g.fetchStatus==="fetching",A=S==="pending",O=S==="error",I=A&&_,F=b!==void 0,U={status:S,fetchStatus:g.fetchStatus,isPending:A,isSuccess:S==="success",isError:O,isInitialLoading:I,isLoading:I,data:b,dataUpdatedAt:g.dataUpdatedAt,error:k,errorUpdatedAt:N,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>y.dataUpdateCount||g.errorUpdateCount>y.errorUpdateCount,isFetching:_,isRefetching:_&&!A,isLoadingError:O&&!F,isPaused:g.fetchStatus==="paused",isPlaceholderData:w,isRefetchError:O&&F,isStale:Wu(t,r),refetch:this.refetch,promise:this.#a,isEnabled:kt(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const q=U.data!==void 0,te=U.status==="error"&&!q,ne=ae=>{te?ae.reject(U.error):q&&ae.resolve(U.data)},se=()=>{const ae=this.#a=U.promise=xu();ne(ae)},Y=this.#a;switch(Y.status){case"pending":t.queryHash===s.queryHash&&ne(Y);break;case"fulfilled":(te||U.data!==Y.value)&&se();break;case"rejected":(!te||U.error!==Y.reason)&&se();break}}return U}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),wi(r,t))return;this.#o=r;const s=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,l=typeof a=="function"?a():a;if(l==="all"||!l&&!this.#h.size)return!0;const d=new Set(l??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.#x()}#C(t){Ue.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(this.#o)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function $w(t,r){return kt(r.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&r.retryOnMount===!1)}function Lp(t,r){return $w(t,r)||t.state.data!==void 0&&bu(t,r,r.refetchOnMount)}function bu(t,r,s){if(kt(r.enabled,t)!==!1&&Mn(r.staleTime,t)!=="static"){const a=typeof s=="function"?s(t):s;return a==="always"||a!==!1&&Wu(t,r)}return!1}function Fp(t,r,s,a){return(t!==r||kt(a.enabled,t)===!1)&&(!s.suspense||t.state.status!=="error")&&Wu(t,s)}function Wu(t,r){return kt(r.enabled,t)!==!1&&t.isStaleByTime(Mn(r.staleTime,t))}function zw(t,r){return!wi(t.getCurrentResult(),r)}function $p(t){return{onFetch:(r,s)=>{const a=r.options,l=r.fetchOptions?.meta?.fetchMore?.direction,d=r.state.data?.pages||[],p=r.state.data?.pageParams||[];let h={pages:[],pageParams:[]},y=0;const v=async()=>{let g=!1;const w=N=>{_w(N,()=>r.signal,()=>g=!0)},b=Vh(r.options,r.fetchOptions),k=async(N,S,C)=>{if(g)return Promise.reject();if(S==null&&N.pages.length)return Promise.resolve(N);const A=(()=>{const L={client:r.client,queryKey:r.queryKey,pageParam:S,direction:C?"backward":"forward",meta:r.options.meta};return w(L),L})(),O=await b(A),{maxPages:I}=r.options,F=C?Tw:jw;return{pages:F(N.pages,O,I),pageParams:F(N.pageParams,S,I)}};if(l&&d.length){const N=l==="backward",S=N?Uw:zp,C={pages:d,pageParams:p},_=S(a,C);h=await k(C,_,N)}else{const N=t??d.length;do{const S=y===0?p[0]??a.initialPageParam:zp(a,h);if(y>0&&S==null)break;h=await k(h,S),y++}while(y<N)}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 zp(t,{pages:r,pageParams:s}){const a=r.length-1;return r.length>0?t.getNextPageParam(r[a],r,s[a],s):void 0}function Uw(t,{pages:r,pageParams:s}){return r.length>0?t.getPreviousPageParam?.(r[0],r,s[0],s):void 0}var Hw=class extends qh{#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||Xh(),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=Gh({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 a=this.state.status==="pending",l=!this.#o.canStart();try{if(a)r();else{this.#r({type:"pending",variables:t,isPaused:l}),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:l})}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 Xh(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Bw=class extends $r{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 a=new Hw({client:t,mutationCache:this,mutationId:++this.#n,options:t.defaultMutationOptions(r),state:s});return this.add(a),a}add(t){this.#e.add(t);const r=ai(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=ai(t);if(typeof r=="string"){const s=this.#t.get(r);if(s)if(s.length>1){const a=s.indexOf(t);a!==-1&&s.splice(a,1)}else s[0]===t&&this.#t.delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=ai(t);if(typeof r=="string"){const a=this.#t.get(r)?.find(l=>l.state.status==="pending");return!a||a===t}else return!0}runNext(t){const r=ai(t);return typeof r=="string"?this.#t.get(r)?.find(a=>a!==t&&a.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=>Op(r,s))}findAll(t={}){return this.getAll().filter(r=>Op(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(tt))))}};function ai(t){return t.options.scope?.id}var Ww=class extends $r{#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),wi(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??Xh();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,a=this.#t.context,l={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(r?.type==="success"){try{this.#o.onSuccess?.(r.data,s,a,l)}catch(d){Promise.reject(d)}try{this.#o.onSettled?.(r.data,null,s,a,l)}catch(d){Promise.reject(d)}}else if(r?.type==="error"){try{this.#o.onError?.(r.error,s,a,l)}catch(d){Promise.reject(d)}try{this.#o.onSettled?.(void 0,r.error,s,a,l)}catch(d){Promise.reject(d)}}}this.listeners.forEach(s=>{s(this.#t)})})}},Kw=class extends $r{constructor(t={}){super(),this.config=t,this.#e=new Map}#e;build(t,r,s){const a=r.queryKey,l=r.queryHash??zu(a,r);let d=this.get(l);return d||(d=new Lw({client:t,queryKey:a,queryHash:l,options:t.defaultQueryOptions(r),state:s,defaultOptions:t.getQueryDefaults(a)}),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=>_p(r,s))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(s=>_p(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()})})}},Vw=class{#e;#t;#n;#o;#r;#i;#a;#s;constructor(t={}){this.#e=t.queryCache||new Kw,this.#t=t.mutationCache||new Bw,this.#n=t.defaultOptions||{},this.#o=new Map,this.#r=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#a=Bu.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=bi.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),a=s.state.data;return a===void 0?this.fetchQuery(t):(t.revalidateIfStale&&s.isStaleByTime(Mn(r.staleTime,s))&&this.prefetchQuery(r),Promise.resolve(a))}getQueriesData(t){return this.#e.findAll(t).map(({queryKey:r,state:s})=>{const a=s.data;return[r,a]})}setQueryData(t,r,s){const a=this.defaultQueryOptions({queryKey:t}),d=this.#e.get(a.queryHash)?.state.data,p=Nw(r,d);if(p!==void 0)return this.#e.build(this,a).setData(p,{...s,manual:!0})}setQueriesData(t,r,s){return Ue.batch(()=>this.#e.findAll(t).map(({queryKey:a})=>[a,this.setQueryData(a,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(a=>{a.reset()}),this.refetchQueries({type:"active",...t},r)))}cancelQueries(t,r={}){const s={revert:!0,...r},a=Ue.batch(()=>this.#e.findAll(t).map(l=>l.cancel(s)));return Promise.all(a).then(tt).catch(tt)}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},a=Ue.batch(()=>this.#e.findAll(t).filter(l=>!l.isDisabled()&&!l.isStatic()).map(l=>{let d=l.fetch(void 0,s);return s.throwOnError||(d=d.catch(tt)),l.state.fetchStatus==="paused"?Promise.resolve():d}));return Promise.all(a).then(tt)}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(tt).catch(tt)}fetchInfiniteQuery(t){return t.behavior=$p(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(tt).catch(tt)}ensureInfiniteQueryData(t){return t.behavior=$p(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return bi.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(a=>{Fo(t,a.queryKey)&&Object.assign(s,a.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(a=>{Fo(t,a.mutationKey)&&Object.assign(s,a.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=zu(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===Uu&&(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()}},Zh=m.createContext(void 0),Jh=t=>{const r=m.useContext(Zh);if(!r)throw new Error("No QueryClient set, use QueryClientProvider to set one");return r},Qw=({client:t,children:r})=>(m.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),c.jsx(Zh.Provider,{value:t,children:r})),em=m.createContext(!1),Gw=()=>m.useContext(em);em.Provider;function qw(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var Yw=m.createContext(qw()),Xw=()=>m.useContext(Yw),Zw=(t,r,s)=>{const a=s?.state.error&&typeof t.throwOnError=="function"?Hu(t.throwOnError,[s.state.error,s]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||a)&&(r.isReset()||(t.retryOnMount=!1))},Jw=t=>{m.useEffect(()=>{t.clearReset()},[t])},eb=({result:t,errorResetBoundary:r,throwOnError:s,query:a,suspense:l})=>t.isError&&!r.isReset()&&!t.isFetching&&a&&(l&&t.data===void 0||Hu(s,[t.error,a])),tb=t=>{if(t.suspense){const s=l=>l==="static"?l:Math.max(l??1e3,1e3),a=t.staleTime;t.staleTime=typeof a=="function"?(...l)=>s(a(...l)):s(a),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},nb=(t,r)=>t.isLoading&&t.isFetching&&!r,rb=(t,r)=>t?.suspense&&r.isPending,Up=(t,r,s)=>r.fetchOptimistic(t).catch(()=>{s.clearReset()});function ob(t,r,s){const a=Gw(),l=Xw(),d=Jh(),p=d.defaultQueryOptions(t);d.getDefaultOptions().queries?._experimental_beforeQuery?.(p);const h=d.getQueryCache().get(p.queryHash);p._optimisticResults=a?"isRestoring":"optimistic",tb(p),Zw(p,l,h),Jw(l);const y=!d.getQueryCache().get(p.queryHash),[v]=m.useState(()=>new r(d,p)),g=v.getOptimisticResult(p),w=!a&&t.subscribed!==!1;if(m.useSyncExternalStore(m.useCallback(b=>{const k=w?v.subscribe(Ue.batchCalls(b)):tt;return v.updateResult(),k},[v,w]),()=>v.getCurrentResult(),()=>v.getCurrentResult()),m.useEffect(()=>{v.setOptions(p)},[p,v]),rb(p,g))throw Up(p,v,l);if(eb({result:g,errorResetBoundary:l,throwOnError:p.throwOnError,query:h,suspense:p.suspense}))throw g.error;return d.getDefaultOptions().queries?._experimental_afterQuery?.(p,g),p.experimental_prefetchInRender&&!er&&nb(g,a)&&(y?Up(p,v,l):h?.promise)?.catch(tt).finally(()=>{v.updateResult()}),p.notifyOnChangeProps?g:v.trackResult(g)}function dt(t,r){return ob(t,Fw)}function ct(t,r){const s=Jh(),[a]=m.useState(()=>new Ww(s,t));m.useEffect(()=>{a.setOptions(t)},[a,t]);const l=m.useSyncExternalStore(m.useCallback(p=>a.subscribe(Ue.batchCalls(p)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),d=m.useCallback((p,h)=>{a.mutate(p,h).catch(tt)},[a]);if(l.error&&Hu(a.options.throwOnError,[l.error]))throw l.error;return{...l,mutate:d,mutateAsync:l.mutate}}const Ku="__PORT_5000__".startsWith("__")?"":"__PORT_5000__";async function Vu(t){if(!t.ok){const r=await t.text()||t.statusText;throw new Error(`${t.status}: ${r}`)}}async function sb(t,r){const s=await fetch(`${Ku}${t}`,r);return await Vu(s),await s.json()}async function nt(t,r,s){const a=await fetch(`${Ku}${r}`,{method:t,headers:s?{"Content-Type":"application/json"}:{},body:s?JSON.stringify(s):void 0});return await Vu(a),a}const ib=({on401:t})=>async({queryKey:r})=>{const s=await fetch(`${Ku}${r.join("/")}`);return await Vu(s),await s.json()},we=new Vw({defaultOptions:{queries:{queryFn:ib({on401:"throw"}),refetchInterval:!1,refetchOnWindowFocus:!1,staleTime:1/0,retry:!1},mutations:{retry:!1}}});var ab=(t,r,s,a,l,d,p,h)=>{let y=document.documentElement,v=["light","dark"];function g(k){(Array.isArray(t)?t:[t]).forEach(N=>{let S=N==="class",C=S&&d?l.map(_=>d[_]||_):l;S?(y.classList.remove(...C),y.classList.add(d&&d[k]?d[k]:k)):y.setAttribute(N,k)}),w(k)}function w(k){h&&v.includes(k)&&(y.style.colorScheme=k)}function b(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(a)g(a);else try{let k=localStorage.getItem(r)||s,N=p&&k==="system"?b():k;g(N)}catch{}},Hp=["light","dark"],tm="(prefers-color-scheme: dark)",lb=typeof window>"u",nm=m.createContext(void 0),ub=t=>m.useContext(nm)?m.createElement(m.Fragment,null,t.children):m.createElement(db,{...t}),cb=["light","dark"],db=({forcedTheme:t,disableTransitionOnChange:r=!1,enableSystem:s=!0,enableColorScheme:a=!0,storageKey:l="theme",themes:d=cb,defaultTheme:p=s?"system":"light",attribute:h="data-theme",value:y,children:v,nonce:g,scriptProps:w})=>{let[b,k]=m.useState(()=>pb(l,p)),[N,S]=m.useState(()=>b==="system"?Gl():b),C=y?Object.values(y):d,_=m.useCallback(F=>{let L=F;if(!L)return;F==="system"&&s&&(L=Gl());let U=y?y[L]:L,q=r?hb(g):null,te=document.documentElement,ne=se=>{se==="class"?(te.classList.remove(...C),U&&te.classList.add(U)):se.startsWith("data-")&&(U?te.setAttribute(se,U):te.removeAttribute(se))};if(Array.isArray(h)?h.forEach(ne):ne(h),a){let se=Hp.includes(p)?p:null,Y=Hp.includes(L)?L:se;te.style.colorScheme=Y}q?.()},[g]),A=m.useCallback(F=>{let L=typeof F=="function"?F(b):F;k(L);try{localStorage.setItem(l,L)}catch{}},[b]),O=m.useCallback(F=>{let L=Gl(F);S(L),b==="system"&&s&&!t&&_("system")},[b,t]);m.useEffect(()=>{let F=window.matchMedia(tm);return F.addListener(O),O(F),()=>F.removeListener(O)},[O]),m.useEffect(()=>{let F=L=>{L.key===l&&(L.newValue?k(L.newValue):A(p))};return window.addEventListener("storage",F),()=>window.removeEventListener("storage",F)},[A]),m.useEffect(()=>{_(t??b)},[t,b]);let I=m.useMemo(()=>({theme:b,setTheme:A,forcedTheme:t,resolvedTheme:b==="system"?N:b,themes:s?[...d,"system"]:d,systemTheme:s?N:void 0}),[b,A,t,N,s,d]);return m.createElement(nm.Provider,{value:I},m.createElement(fb,{forcedTheme:t,storageKey:l,attribute:h,enableSystem:s,enableColorScheme:a,defaultTheme:p,value:y,themes:d,nonce:g,scriptProps:w}),v)},fb=m.memo(({forcedTheme:t,storageKey:r,attribute:s,enableSystem:a,enableColorScheme:l,defaultTheme:d,value:p,themes:h,nonce:y,scriptProps:v})=>{let g=JSON.stringify([s,r,d,t,h,p,a,l]).slice(1,-1);return m.createElement("script",{...v,suppressHydrationWarning:!0,nonce:typeof window>"u"?y:"",dangerouslySetInnerHTML:{__html:`(${ab.toString()})(${g})`}})}),pb=(t,r)=>{if(lb)return;let s;try{s=localStorage.getItem(t)||void 0}catch{}return s||r},hb=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)}},Gl=t=>(t||(t=window.matchMedia(tm)),t.matches?"dark":"light");const mb=1,gb=1e6;let ql=0;function vb(){return ql=(ql+1)%Number.MAX_SAFE_INTEGER,ql.toString()}const Yl=new Map,Bp=t=>{if(Yl.has(t))return;const r=setTimeout(()=>{Yl.delete(t),Lo({type:"REMOVE_TOAST",toastId:t})},gb);Yl.set(t,r)},yb=(t,r)=>{switch(r.type){case"ADD_TOAST":return{...t,toasts:[r.toast,...t.toasts].slice(0,mb)};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?Bp(s):t.toasts.forEach(a=>{Bp(a.id)}),{...t,toasts:t.toasts.map(a=>a.id===s||s===void 0?{...a,open:!1}:a)}}case"REMOVE_TOAST":return r.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(s=>s.id!==r.toastId)}}},mi=[];let gi={toasts:[]};function Lo(t){gi=yb(gi,t),mi.forEach(r=>{r(gi)})}function Vt({...t}){const r=vb(),s=l=>Lo({type:"UPDATE_TOAST",toast:{...l,id:r}}),a=()=>Lo({type:"DISMISS_TOAST",toastId:r});return Lo({type:"ADD_TOAST",toast:{...t,id:r,open:!0,onOpenChange:l=>{l||a()}}}),{id:r,dismiss:a,update:s}}function xb(){const[t,r]=m.useState(gi);return m.useEffect(()=>(mi.push(r),()=>{const s=mi.indexOf(r);s>-1&&mi.splice(s,1)}),[t]),{...t,toast:Vt,dismiss:s=>Lo({type:"DISMISS_TOAST",toastId:s})}}var Ti=_h();const wb=Th(Ti);function ce(t,r,{checkForDefaultPrevented:s=!0}={}){return function(l){if(t?.(l),s===!1||!l.defaultPrevented)return r?.(l)}}function Wp(t,r){if(typeof t=="function")return t(r);t!=null&&(t.current=r)}function zr(...t){return r=>{let s=!1;const a=t.map(l=>{const d=Wp(l,r);return!s&&typeof d=="function"&&(s=!0),d});if(s)return()=>{for(let l=0;l<a.length;l++){const d=a[l];typeof d=="function"?d():Wp(t[l],null)}}}}function He(...t){return m.useCallback(zr(...t),t)}function Ln(t,r=[]){let s=[];function a(d,p){const h=m.createContext(p),y=s.length;s=[...s,p];const v=w=>{const{scope:b,children:k,...N}=w,S=b?.[t]?.[y]||h,C=m.useMemo(()=>N,Object.values(N));return c.jsx(S.Provider,{value:C,children:k})};v.displayName=d+"Provider";function g(w,b){const k=b?.[t]?.[y]||h,N=m.useContext(k);if(N)return N;if(p!==void 0)return p;throw new Error(`\`${w}\` must be used within \`${d}\``)}return[v,g]}const l=()=>{const d=s.map(p=>m.createContext(p));return function(h){const y=h?.[t]||d;return m.useMemo(()=>({[`__scope${t}`]:{...h,[t]:y}}),[h,y])}};return l.scopeName=t,[a,bb(l,...r)]}function bb(...t){const r=t[0];if(t.length===1)return r;const s=()=>{const a=t.map(l=>({useScope:l(),scopeName:l.scopeName}));return function(d){const p=a.reduce((h,{useScope:y,scopeName:v})=>{const w=y(d)[`__scope${v}`];return{...h,...w}},{});return m.useMemo(()=>({[`__scope${r.scopeName}`]:p}),[p])}};return s.scopeName=r.scopeName,s}function Kp(t){const r=Sb(t),s=m.forwardRef((a,l)=>{const{children:d,...p}=a,h=m.Children.toArray(d),y=h.find(Eb);if(y){const v=y.props.children,g=h.map(w=>w===y?m.Children.count(v)>1?m.Children.only(null):m.isValidElement(v)?v.props.children:null:w);return c.jsx(r,{...p,ref:l,children:m.isValidElement(v)?m.cloneElement(v,void 0,g):null})}return c.jsx(r,{...p,ref:l,children:d})});return s.displayName=`${t}.Slot`,s}function Sb(t){const r=m.forwardRef((s,a)=>{const{children:l,...d}=s;if(m.isValidElement(l)){const p=Nb(l),h=kb(d,l.props);return l.type!==m.Fragment&&(h.ref=a?zr(a,p):p),m.cloneElement(l,h)}return m.Children.count(l)>1?m.Children.only(null):null});return r.displayName=`${t}.SlotClone`,r}var Cb=Symbol("radix.slottable");function Eb(t){return m.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Cb}function kb(t,r){const s={...r};for(const a in r){const l=t[a],d=r[a];/^on[A-Z]/.test(a)?l&&d?s[a]=(...h)=>{const y=d(...h);return l(...h),y}:l&&(s[a]=l):a==="style"?s[a]={...l,...d}:a==="className"&&(s[a]=[l,d].filter(Boolean).join(" "))}return{...t,...s}}function Nb(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 Qu(t){const r=t+"CollectionProvider",[s,a]=Ln(r),[l,d]=s(r,{collectionRef:{current:null},itemMap:new Map}),p=S=>{const{scope:C,children:_}=S,A=_n.useRef(null),O=_n.useRef(new Map).current;return c.jsx(l,{scope:C,itemMap:O,collectionRef:A,children:_})};p.displayName=r;const h=t+"CollectionSlot",y=Kp(h),v=_n.forwardRef((S,C)=>{const{scope:_,children:A}=S,O=d(h,_),I=He(C,O.collectionRef);return c.jsx(y,{ref:I,children:A})});v.displayName=h;const g=t+"CollectionItemSlot",w="data-radix-collection-item",b=Kp(g),k=_n.forwardRef((S,C)=>{const{scope:_,children:A,...O}=S,I=_n.useRef(null),F=He(C,I),L=d(g,_);return _n.useEffect(()=>(L.itemMap.set(I,{ref:I,...O}),()=>{L.itemMap.delete(I)})),c.jsx(b,{[w]:"",ref:F,children:A})});k.displayName=g;function N(S){const C=d(t+"CollectionConsumer",S);return _n.useCallback(()=>{const A=C.collectionRef.current;if(!A)return[];const O=Array.from(A.querySelectorAll(`[${w}]`));return Array.from(C.itemMap.values()).sort((L,U)=>O.indexOf(L.ref.current)-O.indexOf(U.ref.current))},[C.collectionRef,C.itemMap])}return[{Provider:p,Slot:v,ItemSlot:k},N,a]}function Rb(t){const r=Pb(t),s=m.forwardRef((a,l)=>{const{children:d,...p}=a,h=m.Children.toArray(d),y=h.find(Tb);if(y){const v=y.props.children,g=h.map(w=>w===y?m.Children.count(v)>1?m.Children.only(null):m.isValidElement(v)?v.props.children:null:w);return c.jsx(r,{...p,ref:l,children:m.isValidElement(v)?m.cloneElement(v,void 0,g):null})}return c.jsx(r,{...p,ref:l,children:d})});return s.displayName=`${t}.Slot`,s}function Pb(t){const r=m.forwardRef((s,a)=>{const{children:l,...d}=s;if(m.isValidElement(l)){const p=Ob(l),h=_b(d,l.props);return l.type!==m.Fragment&&(h.ref=a?zr(a,p):p),m.cloneElement(l,h)}return m.Children.count(l)>1?m.Children.only(null):null});return r.displayName=`${t}.SlotClone`,r}var jb=Symbol("radix.slottable");function Tb(t){return m.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===jb}function _b(t,r){const s={...r};for(const a in r){const l=t[a],d=r[a];/^on[A-Z]/.test(a)?l&&d?s[a]=(...h)=>{const y=d(...h);return l(...h),y}:l&&(s[a]=l):a==="style"?s[a]={...l,...d}:a==="className"&&(s[a]=[l,d].filter(Boolean).join(" "))}return{...t,...s}}function Ob(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 Ab=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Re=Ab.reduce((t,r)=>{const s=Rb(`Primitive.${r}`),a=m.forwardRef((l,d)=>{const{asChild:p,...h}=l,y=p?s:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(y,{...h,ref:d})});return a.displayName=`Primitive.${r}`,{...t,[r]:a}},{});function Gu(t,r){t&&Ti.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 Mb(t,r=globalThis?.document){const s=yt(t);m.useEffect(()=>{const a=l=>{l.key==="Escape"&&s(l)};return r.addEventListener("keydown",a,{capture:!0}),()=>r.removeEventListener("keydown",a,{capture:!0})},[s,r])}var Ib="DismissableLayer",Su="dismissableLayer.update",Db="dismissableLayer.pointerDownOutside",Lb="dismissableLayer.focusOutside",Vp,rm=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),_i=m.forwardRef((t,r)=>{const{disableOutsidePointerEvents:s=!1,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:p,onDismiss:h,...y}=t,v=m.useContext(rm),[g,w]=m.useState(null),b=g?.ownerDocument??globalThis?.document,[,k]=m.useState({}),N=He(r,U=>w(U)),S=Array.from(v.layers),[C]=[...v.layersWithOutsidePointerEventsDisabled].slice(-1),_=S.indexOf(C),A=g?S.indexOf(g):-1,O=v.layersWithOutsidePointerEventsDisabled.size>0,I=A>=_,F=$b(U=>{const q=U.target,te=[...v.branches].some(ne=>ne.contains(q));!I||te||(l?.(U),p?.(U),U.defaultPrevented||h?.())},b),L=zb(U=>{const q=U.target;[...v.branches].some(ne=>ne.contains(q))||(d?.(U),p?.(U),U.defaultPrevented||h?.())},b);return Mb(U=>{A===v.layers.size-1&&(a?.(U),!U.defaultPrevented&&h&&(U.preventDefault(),h()))},b),m.useEffect(()=>{if(g)return s&&(v.layersWithOutsidePointerEventsDisabled.size===0&&(Vp=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),v.layersWithOutsidePointerEventsDisabled.add(g)),v.layers.add(g),Qp(),()=>{s&&v.layersWithOutsidePointerEventsDisabled.size===1&&(b.body.style.pointerEvents=Vp)}},[g,b,s,v]),m.useEffect(()=>()=>{g&&(v.layers.delete(g),v.layersWithOutsidePointerEventsDisabled.delete(g),Qp())},[g,v]),m.useEffect(()=>{const U=()=>k({});return document.addEventListener(Su,U),()=>document.removeEventListener(Su,U)},[]),c.jsx(Re.div,{...y,ref:N,style:{pointerEvents:O?I?"auto":"none":void 0,...t.style},onFocusCapture:ce(t.onFocusCapture,L.onFocusCapture),onBlurCapture:ce(t.onBlurCapture,L.onBlurCapture),onPointerDownCapture:ce(t.onPointerDownCapture,F.onPointerDownCapture)})});_i.displayName=Ib;var Fb="DismissableLayerBranch",om=m.forwardRef((t,r)=>{const s=m.useContext(rm),a=m.useRef(null),l=He(r,a);return m.useEffect(()=>{const d=a.current;if(d)return s.branches.add(d),()=>{s.branches.delete(d)}},[s.branches]),c.jsx(Re.div,{...t,ref:l})});om.displayName=Fb;function $b(t,r=globalThis?.document){const s=yt(t),a=m.useRef(!1),l=m.useRef(()=>{});return m.useEffect(()=>{const d=h=>{if(h.target&&!a.current){let y=function(){sm(Db,s,v,{discrete:!0})};const v={originalEvent:h};h.pointerType==="touch"?(r.removeEventListener("click",l.current),l.current=y,r.addEventListener("click",l.current,{once:!0})):y()}else r.removeEventListener("click",l.current);a.current=!1},p=window.setTimeout(()=>{r.addEventListener("pointerdown",d)},0);return()=>{window.clearTimeout(p),r.removeEventListener("pointerdown",d),r.removeEventListener("click",l.current)}},[r,s]),{onPointerDownCapture:()=>a.current=!0}}function zb(t,r=globalThis?.document){const s=yt(t),a=m.useRef(!1);return m.useEffect(()=>{const l=d=>{d.target&&!a.current&&sm(Lb,s,{originalEvent:d},{discrete:!1})};return r.addEventListener("focusin",l),()=>r.removeEventListener("focusin",l)},[r,s]),{onFocusCapture:()=>a.current=!0,onBlurCapture:()=>a.current=!1}}function Qp(){const t=new CustomEvent(Su);document.dispatchEvent(t)}function sm(t,r,s,{discrete:a}){const l=s.originalEvent.target,d=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:s});r&&l.addEventListener(t,r,{once:!0}),a?Gu(l,d):l.dispatchEvent(d)}var Ub=_i,Hb=om,Qt=globalThis?.document?m.useLayoutEffect:()=>{},Bb="Portal",qu=m.forwardRef((t,r)=>{const{container:s,...a}=t,[l,d]=m.useState(!1);Qt(()=>d(!0),[]);const p=s||l&&globalThis?.document?.body;return p?wb.createPortal(c.jsx(Re.div,{...a,ref:r}),p):null});qu.displayName=Bb;function Wb(t,r){return m.useReducer((s,a)=>r[s][a]??s,t)}var Fn=t=>{const{present:r,children:s}=t,a=Kb(r),l=typeof s=="function"?s({present:a.isPresent}):m.Children.only(s),d=He(a.ref,Vb(l));return typeof s=="function"||a.isPresent?m.cloneElement(l,{ref:d}):null};Fn.displayName="Presence";function Kb(t){const[r,s]=m.useState(),a=m.useRef(null),l=m.useRef(t),d=m.useRef("none"),p=t?"mounted":"unmounted",[h,y]=Wb(p,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{const v=li(a.current);d.current=h==="mounted"?v:"none"},[h]),Qt(()=>{const v=a.current,g=l.current;if(g!==t){const b=d.current,k=li(v);t?y("MOUNT"):k==="none"||v?.display==="none"?y("UNMOUNT"):y(g&&b!==k?"ANIMATION_OUT":"UNMOUNT"),l.current=t}},[t,y]),Qt(()=>{if(r){let v;const g=r.ownerDocument.defaultView??window,w=k=>{const S=li(a.current).includes(CSS.escape(k.animationName));if(k.target===r&&S&&(y("ANIMATION_END"),!l.current)){const C=r.style.animationFillMode;r.style.animationFillMode="forwards",v=g.setTimeout(()=>{r.style.animationFillMode==="forwards"&&(r.style.animationFillMode=C)})}},b=k=>{k.target===r&&(d.current=li(a.current))};return r.addEventListener("animationstart",b),r.addEventListener("animationcancel",w),r.addEventListener("animationend",w),()=>{g.clearTimeout(v),r.removeEventListener("animationstart",b),r.removeEventListener("animationcancel",w),r.removeEventListener("animationend",w)}}else y("ANIMATION_END")},[r,y]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:m.useCallback(v=>{a.current=v?getComputedStyle(v):null,s(v)},[])}}function li(t){return t?.animationName||"none"}function Vb(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 Qb=Du[" useInsertionEffect ".trim().toString()]||Qt;function Ko({prop:t,defaultProp:r,onChange:s=()=>{},caller:a}){const[l,d,p]=Gb({defaultProp:r,onChange:s}),h=t!==void 0,y=h?t:l;{const g=m.useRef(t!==void 0);m.useEffect(()=>{const w=g.current;w!==h&&console.warn(`${a} 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.`),g.current=h},[h,a])}const v=m.useCallback(g=>{if(h){const w=qb(g)?g(t):g;w!==t&&p.current?.(w)}else d(g)},[h,t,d,p]);return[y,v]}function Gb({defaultProp:t,onChange:r}){const[s,a]=m.useState(t),l=m.useRef(s),d=m.useRef(r);return Qb(()=>{d.current=r},[r]),m.useEffect(()=>{l.current!==s&&(d.current?.(s),l.current=s)},[s,l]),[s,a,d]}function qb(t){return typeof t=="function"}var Yb=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"}),Xb="VisuallyHidden",Oi=m.forwardRef((t,r)=>c.jsx(Re.span,{...t,ref:r,style:{...Yb,...t.style}}));Oi.displayName=Xb;var Zb=Oi,Yu="ToastProvider",[Xu,Jb,e0]=Qu("Toast"),[im]=Ln("Toast",[e0]),[t0,Ai]=im(Yu),am=t=>{const{__scopeToast:r,label:s="Notification",duration:a=5e3,swipeDirection:l="right",swipeThreshold:d=50,children:p}=t,[h,y]=m.useState(null),[v,g]=m.useState(0),w=m.useRef(!1),b=m.useRef(!1);return s.trim()||console.error(`Invalid prop \`label\` supplied to \`${Yu}\`. Expected non-empty \`string\`.`),c.jsx(Xu.Provider,{scope:r,children:c.jsx(t0,{scope:r,label:s,duration:a,swipeDirection:l,swipeThreshold:d,toastCount:v,viewport:h,onViewportChange:y,onToastAdd:m.useCallback(()=>g(k=>k+1),[]),onToastRemove:m.useCallback(()=>g(k=>k-1),[]),isFocusedToastEscapeKeyDownRef:w,isClosePausedRef:b,children:p})})};am.displayName=Yu;var lm="ToastViewport",n0=["F8"],Cu="toast.viewportPause",Eu="toast.viewportResume",um=m.forwardRef((t,r)=>{const{__scopeToast:s,hotkey:a=n0,label:l="Notifications ({hotkey})",...d}=t,p=Ai(lm,s),h=Jb(s),y=m.useRef(null),v=m.useRef(null),g=m.useRef(null),w=m.useRef(null),b=He(r,w,p.onViewportChange),k=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),N=p.toastCount>0;m.useEffect(()=>{const C=_=>{a.length!==0&&a.every(O=>_[O]||_.code===O)&&w.current?.focus()};return document.addEventListener("keydown",C),()=>document.removeEventListener("keydown",C)},[a]),m.useEffect(()=>{const C=y.current,_=w.current;if(N&&C&&_){const A=()=>{if(!p.isClosePausedRef.current){const L=new CustomEvent(Cu);_.dispatchEvent(L),p.isClosePausedRef.current=!0}},O=()=>{if(p.isClosePausedRef.current){const L=new CustomEvent(Eu);_.dispatchEvent(L),p.isClosePausedRef.current=!1}},I=L=>{!C.contains(L.relatedTarget)&&O()},F=()=>{C.contains(document.activeElement)||O()};return C.addEventListener("focusin",A),C.addEventListener("focusout",I),C.addEventListener("pointermove",A),C.addEventListener("pointerleave",F),window.addEventListener("blur",A),window.addEventListener("focus",O),()=>{C.removeEventListener("focusin",A),C.removeEventListener("focusout",I),C.removeEventListener("pointermove",A),C.removeEventListener("pointerleave",F),window.removeEventListener("blur",A),window.removeEventListener("focus",O)}}},[N,p.isClosePausedRef]);const S=m.useCallback(({tabbingDirection:C})=>{const A=h().map(O=>{const I=O.ref.current,F=[I,...m0(I)];return C==="forwards"?F:F.reverse()});return(C==="forwards"?A.reverse():A).flat()},[h]);return m.useEffect(()=>{const C=w.current;if(C){const _=A=>{const O=A.altKey||A.ctrlKey||A.metaKey;if(A.key==="Tab"&&!O){const F=document.activeElement,L=A.shiftKey;if(A.target===C&&L){v.current?.focus();return}const te=S({tabbingDirection:L?"backwards":"forwards"}),ne=te.findIndex(se=>se===F);Xl(te.slice(ne+1))?A.preventDefault():L?v.current?.focus():g.current?.focus()}};return C.addEventListener("keydown",_),()=>C.removeEventListener("keydown",_)}},[h,S]),c.jsxs(Hb,{ref:y,role:"region","aria-label":l.replace("{hotkey}",k),tabIndex:-1,style:{pointerEvents:N?void 0:"none"},children:[N&&c.jsx(ku,{ref:v,onFocusFromOutsideViewport:()=>{const C=S({tabbingDirection:"forwards"});Xl(C)}}),c.jsx(Xu.Slot,{scope:s,children:c.jsx(Re.ol,{tabIndex:-1,...d,ref:b})}),N&&c.jsx(ku,{ref:g,onFocusFromOutsideViewport:()=>{const C=S({tabbingDirection:"backwards"});Xl(C)}})]})});um.displayName=lm;var cm="ToastFocusProxy",ku=m.forwardRef((t,r)=>{const{__scopeToast:s,onFocusFromOutsideViewport:a,...l}=t,d=Ai(cm,s);return c.jsx(Oi,{tabIndex:0,...l,ref:r,style:{position:"fixed"},onFocus:p=>{const h=p.relatedTarget;!d.viewport?.contains(h)&&a()}})});ku.displayName=cm;var Vo="Toast",r0="toast.swipeStart",o0="toast.swipeMove",s0="toast.swipeCancel",i0="toast.swipeEnd",dm=m.forwardRef((t,r)=>{const{forceMount:s,open:a,defaultOpen:l,onOpenChange:d,...p}=t,[h,y]=Ko({prop:a,defaultProp:l??!0,onChange:d,caller:Vo});return c.jsx(Fn,{present:s||h,children:c.jsx(u0,{open:h,...p,ref:r,onClose:()=>y(!1),onPause:yt(t.onPause),onResume:yt(t.onResume),onSwipeStart:ce(t.onSwipeStart,v=>{v.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ce(t.onSwipeMove,v=>{const{x:g,y:w}=v.detail.delta;v.currentTarget.setAttribute("data-swipe","move"),v.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${g}px`),v.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${w}px`)}),onSwipeCancel:ce(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:ce(t.onSwipeEnd,v=>{const{x:g,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",`${g}px`),v.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${w}px`),y(!1)})})})});dm.displayName=Vo;var[a0,l0]=im(Vo,{onClose(){}}),u0=m.forwardRef((t,r)=>{const{__scopeToast:s,type:a="foreground",duration:l,open:d,onClose:p,onEscapeKeyDown:h,onPause:y,onResume:v,onSwipeStart:g,onSwipeMove:w,onSwipeCancel:b,onSwipeEnd:k,...N}=t,S=Ai(Vo,s),[C,_]=m.useState(null),A=He(r,G=>_(G)),O=m.useRef(null),I=m.useRef(null),F=l||S.duration,L=m.useRef(0),U=m.useRef(F),q=m.useRef(0),{onToastAdd:te,onToastRemove:ne}=S,se=yt(()=>{C?.contains(document.activeElement)&&S.viewport?.focus(),p()}),Y=m.useCallback(G=>{!G||G===1/0||(window.clearTimeout(q.current),L.current=new Date().getTime(),q.current=window.setTimeout(se,G))},[se]);m.useEffect(()=>{const G=S.viewport;if(G){const me=()=>{Y(U.current),v?.()},ee=()=>{const ie=new Date().getTime()-L.current;U.current=U.current-ie,window.clearTimeout(q.current),y?.()};return G.addEventListener(Cu,ee),G.addEventListener(Eu,me),()=>{G.removeEventListener(Cu,ee),G.removeEventListener(Eu,me)}}},[S.viewport,F,y,v,Y]),m.useEffect(()=>{d&&!S.isClosePausedRef.current&&Y(F)},[d,F,S.isClosePausedRef,Y]),m.useEffect(()=>(te(),()=>ne()),[te,ne]);const ae=m.useMemo(()=>C?ym(C):null,[C]);return S.viewport?c.jsxs(c.Fragment,{children:[ae&&c.jsx(c0,{__scopeToast:s,role:"status","aria-live":a==="foreground"?"assertive":"polite",children:ae}),c.jsx(a0,{scope:s,onClose:se,children:Ti.createPortal(c.jsx(Xu.ItemSlot,{scope:s,children:c.jsx(Ub,{asChild:!0,onEscapeKeyDown:ce(h,()=>{S.isFocusedToastEscapeKeyDownRef.current||se(),S.isFocusedToastEscapeKeyDownRef.current=!1}),children:c.jsx(Re.li,{tabIndex:0,"data-state":d?"open":"closed","data-swipe-direction":S.swipeDirection,...N,ref:A,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:ce(t.onKeyDown,G=>{G.key==="Escape"&&(h?.(G.nativeEvent),G.nativeEvent.defaultPrevented||(S.isFocusedToastEscapeKeyDownRef.current=!0,se()))}),onPointerDown:ce(t.onPointerDown,G=>{G.button===0&&(O.current={x:G.clientX,y:G.clientY})}),onPointerMove:ce(t.onPointerMove,G=>{if(!O.current)return;const me=G.clientX-O.current.x,ee=G.clientY-O.current.y,ie=!!I.current,P=["left","right"].includes(S.swipeDirection),z=["left","up"].includes(S.swipeDirection)?Math.min:Math.max,V=P?z(0,me):0,T=P?0:z(0,ee),H=G.pointerType==="touch"?10:2,de={x:V,y:T},pe={originalEvent:G,delta:de};ie?(I.current=de,ui(o0,w,pe,{discrete:!1})):Gp(de,S.swipeDirection,H)?(I.current=de,ui(r0,g,pe,{discrete:!1}),G.target.setPointerCapture(G.pointerId)):(Math.abs(me)>H||Math.abs(ee)>H)&&(O.current=null)}),onPointerUp:ce(t.onPointerUp,G=>{const me=I.current,ee=G.target;if(ee.hasPointerCapture(G.pointerId)&&ee.releasePointerCapture(G.pointerId),I.current=null,O.current=null,me){const ie=G.currentTarget,P={originalEvent:G,delta:me};Gp(me,S.swipeDirection,S.swipeThreshold)?ui(i0,k,P,{discrete:!0}):ui(s0,b,P,{discrete:!0}),ie.addEventListener("click",z=>z.preventDefault(),{once:!0})}})})})}),S.viewport)})]}):null}),c0=t=>{const{__scopeToast:r,children:s,...a}=t,l=Ai(Vo,r),[d,p]=m.useState(!1),[h,y]=m.useState(!1);return p0(()=>p(!0)),m.useEffect(()=>{const v=window.setTimeout(()=>y(!0),1e3);return()=>window.clearTimeout(v)},[]),h?null:c.jsx(qu,{asChild:!0,children:c.jsx(Oi,{...a,children:d&&c.jsxs(c.Fragment,{children:[l.label," ",s]})})})},d0="ToastTitle",fm=m.forwardRef((t,r)=>{const{__scopeToast:s,...a}=t;return c.jsx(Re.div,{...a,ref:r})});fm.displayName=d0;var f0="ToastDescription",pm=m.forwardRef((t,r)=>{const{__scopeToast:s,...a}=t;return c.jsx(Re.div,{...a,ref:r})});pm.displayName=f0;var hm="ToastAction",mm=m.forwardRef((t,r)=>{const{altText:s,...a}=t;return s.trim()?c.jsx(vm,{altText:s,asChild:!0,children:c.jsx(Zu,{...a,ref:r})}):(console.error(`Invalid prop \`altText\` supplied to \`${hm}\`. Expected non-empty \`string\`.`),null)});mm.displayName=hm;var gm="ToastClose",Zu=m.forwardRef((t,r)=>{const{__scopeToast:s,...a}=t,l=l0(gm,s);return c.jsx(vm,{asChild:!0,children:c.jsx(Re.button,{type:"button",...a,ref:r,onClick:ce(t.onClick,l.onClose)})})});Zu.displayName=gm;var vm=m.forwardRef((t,r)=>{const{__scopeToast:s,altText:a,...l}=t;return c.jsx(Re.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":a||void 0,...l,ref:r})});function ym(t){const r=[];return Array.from(t.childNodes).forEach(a=>{if(a.nodeType===a.TEXT_NODE&&a.textContent&&r.push(a.textContent),h0(a)){const l=a.ariaHidden||a.hidden||a.style.display==="none",d=a.dataset.radixToastAnnounceExclude==="";if(!l)if(d){const p=a.dataset.radixToastAnnounceAlt;p&&r.push(p)}else r.push(...ym(a))}}),r}function ui(t,r,s,{discrete:a}){const l=s.originalEvent.currentTarget,d=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:s});r&&l.addEventListener(t,r,{once:!0}),a?Gu(l,d):l.dispatchEvent(d)}var Gp=(t,r,s=0)=>{const a=Math.abs(t.x),l=Math.abs(t.y),d=a>l;return r==="left"||r==="right"?d&&a>s:!d&&l>s};function p0(t=()=>{}){const r=yt(t);Qt(()=>{let s=0,a=0;return s=window.requestAnimationFrame(()=>a=window.requestAnimationFrame(r)),()=>{window.cancelAnimationFrame(s),window.cancelAnimationFrame(a)}},[r])}function h0(t){return t.nodeType===t.ELEMENT_NODE}function m0(t){const r=[],s=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{const l=a.tagName==="INPUT"&&a.type==="hidden";return a.disabled||a.hidden||l?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;s.nextNode();)r.push(s.currentNode);return r}function Xl(t){const r=document.activeElement;return t.some(s=>s===r?!0:(s.focus(),document.activeElement!==r))}var g0=am,xm=um,wm=dm,bm=fm,Sm=pm,Cm=mm,Em=Zu;function km(t){var r,s,a="";if(typeof t=="string"||typeof t=="number")a+=t;else if(typeof t=="object")if(Array.isArray(t)){var l=t.length;for(r=0;r<l;r++)t[r]&&(s=km(t[r]))&&(a&&(a+=" "),a+=s)}else for(s in t)t[s]&&(a&&(a+=" "),a+=s);return a}function Nm(){for(var t,r,s=0,a="",l=arguments.length;s<l;s++)(t=arguments[s])&&(r=km(t))&&(a&&(a+=" "),a+=r);return a}const qp=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Yp=Nm,v0=(t,r)=>s=>{var a;if(r?.variants==null)return Yp(t,s?.class,s?.className);const{variants:l,defaultVariants:d}=r,p=Object.keys(l).map(v=>{const g=s?.[v],w=d?.[v];if(g===null)return null;const b=qp(g)||qp(w);return l[v][b]}),h=s&&Object.entries(s).reduce((v,g)=>{let[w,b]=g;return b===void 0||(v[w]=b),v},{}),y=r==null||(a=r.compoundVariants)===null||a===void 0?void 0:a.reduce((v,g)=>{let{class:w,className:b,...k}=g;return Object.entries(k).every(N=>{let[S,C]=N;return Array.isArray(C)?C.includes({...d,...h}[S]):{...d,...h}[S]===C})?[...v,w,b]:v},[]);return Yp(t,p,y,s?.class,s?.className)};const y0=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Rm=(...t)=>t.filter((r,s,a)=>!!r&&a.indexOf(r)===s).join(" ");var x0={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 w0=m.forwardRef(({color:t="currentColor",size:r=24,strokeWidth:s=2,absoluteStrokeWidth:a,className:l="",children:d,iconNode:p,...h},y)=>m.createElement("svg",{ref:y,...x0,width:r,height:r,stroke:t,strokeWidth:a?Number(s)*24/Number(r):s,className:Rm("lucide",l),...h},[...p.map(([v,g])=>m.createElement(v,g)),...Array.isArray(d)?d:[d]]));const Ur=(t,r)=>{const s=m.forwardRef(({className:a,...l},d)=>m.createElement(w0,{ref:d,iconNode:r,className:Rm(`lucide-${y0(t)}`,a),...l}));return s.displayName=`${t}`,s};const b0=Ur("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 S0=Ur("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const C0=Ur("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const E0=Ur("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 k0=Ur("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);const N0=Ur("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Ju="-",R0=t=>{const r=j0(t),{conflictingClassGroups:s,conflictingClassGroupModifiers:a}=t;return{getClassGroupId:p=>{const h=p.split(Ju);return h[0]===""&&h.length!==1&&h.shift(),Pm(h,r)||P0(p)},getConflictingClassGroupIds:(p,h)=>{const y=s[p]||[];return h&&a[p]?[...y,...a[p]]:y}}},Pm=(t,r)=>{if(t.length===0)return r.classGroupId;const s=t[0],a=r.nextPart.get(s),l=a?Pm(t.slice(1),a):void 0;if(l)return l;if(r.validators.length===0)return;const d=t.join(Ju);return r.validators.find(({validator:p})=>p(d))?.classGroupId},Xp=/^\[(.+)\]$/,P0=t=>{if(Xp.test(t)){const r=Xp.exec(t)[1],s=r?.substring(0,r.indexOf(":"));if(s)return"arbitrary.."+s}},j0=t=>{const{theme:r,prefix:s}=t,a={nextPart:new Map,validators:[]};return _0(Object.entries(t.classGroups),s).forEach(([d,p])=>{Nu(p,a,d,r)}),a},Nu=(t,r,s,a)=>{t.forEach(l=>{if(typeof l=="string"){const d=l===""?r:Zp(r,l);d.classGroupId=s;return}if(typeof l=="function"){if(T0(l)){Nu(l(a),r,s,a);return}r.validators.push({validator:l,classGroupId:s});return}Object.entries(l).forEach(([d,p])=>{Nu(p,Zp(r,d),s,a)})})},Zp=(t,r)=>{let s=t;return r.split(Ju).forEach(a=>{s.nextPart.has(a)||s.nextPart.set(a,{nextPart:new Map,validators:[]}),s=s.nextPart.get(a)}),s},T0=t=>t.isThemeGetter,_0=(t,r)=>r?t.map(([s,a])=>{const l=a.map(d=>typeof d=="string"?r+d:typeof d=="object"?Object.fromEntries(Object.entries(d).map(([p,h])=>[r+p,h])):d);return[s,l]}):t,O0=t=>{if(t<1)return{get:()=>{},set:()=>{}};let r=0,s=new Map,a=new Map;const l=(d,p)=>{s.set(d,p),r++,r>t&&(r=0,a=s,s=new Map)};return{get(d){let p=s.get(d);if(p!==void 0)return p;if((p=a.get(d))!==void 0)return l(d,p),p},set(d,p){s.has(d)?s.set(d,p):l(d,p)}}},jm="!",A0=t=>{const{separator:r,experimentalParseClassName:s}=t,a=r.length===1,l=r[0],d=r.length,p=h=>{const y=[];let v=0,g=0,w;for(let C=0;C<h.length;C++){let _=h[C];if(v===0){if(_===l&&(a||h.slice(C,C+d)===r)){y.push(h.slice(g,C)),g=C+d;continue}if(_==="/"){w=C;continue}}_==="["?v++:_==="]"&&v--}const b=y.length===0?h:h.substring(g),k=b.startsWith(jm),N=k?b.substring(1):b,S=w&&w>g?w-g:void 0;return{modifiers:y,hasImportantModifier:k,baseClassName:N,maybePostfixModifierPosition:S}};return s?h=>s({className:h,parseClassName:p}):p},M0=t=>{if(t.length<=1)return t;const r=[];let s=[];return t.forEach(a=>{a[0]==="["?(r.push(...s.sort(),a),s=[]):s.push(a)}),r.push(...s.sort()),r},I0=t=>({cache:O0(t.cacheSize),parseClassName:A0(t),...R0(t)}),D0=/\s+/,L0=(t,r)=>{const{parseClassName:s,getClassGroupId:a,getConflictingClassGroupIds:l}=r,d=[],p=t.trim().split(D0);let h="";for(let y=p.length-1;y>=0;y-=1){const v=p[y],{modifiers:g,hasImportantModifier:w,baseClassName:b,maybePostfixModifierPosition:k}=s(v);let N=!!k,S=a(N?b.substring(0,k):b);if(!S){if(!N){h=v+(h.length>0?" "+h:h);continue}if(S=a(b),!S){h=v+(h.length>0?" "+h:h);continue}N=!1}const C=M0(g).join(":"),_=w?C+jm:C,A=_+S;if(d.includes(A))continue;d.push(A);const O=l(S,N);for(let I=0;I<O.length;++I){const F=O[I];d.push(_+F)}h=v+(h.length>0?" "+h:h)}return h};function F0(){let t=0,r,s,a="";for(;t<arguments.length;)(r=arguments[t++])&&(s=Tm(r))&&(a&&(a+=" "),a+=s);return a}const Tm=t=>{if(typeof t=="string")return t;let r,s="";for(let a=0;a<t.length;a++)t[a]&&(r=Tm(t[a]))&&(s&&(s+=" "),s+=r);return s};function $0(t,...r){let s,a,l,d=p;function p(y){const v=r.reduce((g,w)=>w(g),t());return s=I0(v),a=s.cache.get,l=s.cache.set,d=h,h(y)}function h(y){const v=a(y);if(v)return v;const g=L0(y,s);return l(y,g),g}return function(){return d(F0.apply(null,arguments))}}const Te=t=>{const r=s=>s[t]||[];return r.isThemeGetter=!0,r},_m=/^\[(?:([a-z-]+):)?(.+)\]$/i,z0=/^\d+\/\d+$/,U0=new Set(["px","full","screen"]),H0=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,B0=/\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$/,W0=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,K0=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,V0=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,on=t=>Mr(t)||U0.has(t)||z0.test(t),Pn=t=>Hr(t,"length",e1),Mr=t=>!!t&&!Number.isNaN(Number(t)),Zl=t=>Hr(t,"number",Mr),Ao=t=>!!t&&Number.isInteger(Number(t)),Q0=t=>t.endsWith("%")&&Mr(t.slice(0,-1)),ge=t=>_m.test(t),jn=t=>H0.test(t),G0=new Set(["length","size","percentage"]),q0=t=>Hr(t,G0,Om),Y0=t=>Hr(t,"position",Om),X0=new Set(["image","url"]),Z0=t=>Hr(t,X0,n1),J0=t=>Hr(t,"",t1),Mo=()=>!0,Hr=(t,r,s)=>{const a=_m.exec(t);return a?a[1]?typeof r=="string"?a[1]===r:r.has(a[1]):s(a[2]):!1},e1=t=>B0.test(t)&&!W0.test(t),Om=()=>!1,t1=t=>K0.test(t),n1=t=>V0.test(t),r1=()=>{const t=Te("colors"),r=Te("spacing"),s=Te("blur"),a=Te("brightness"),l=Te("borderColor"),d=Te("borderRadius"),p=Te("borderSpacing"),h=Te("borderWidth"),y=Te("contrast"),v=Te("grayscale"),g=Te("hueRotate"),w=Te("invert"),b=Te("gap"),k=Te("gradientColorStops"),N=Te("gradientColorStopPositions"),S=Te("inset"),C=Te("margin"),_=Te("opacity"),A=Te("padding"),O=Te("saturate"),I=Te("scale"),F=Te("sepia"),L=Te("skew"),U=Te("space"),q=Te("translate"),te=()=>["auto","contain","none"],ne=()=>["auto","hidden","clip","visible","scroll"],se=()=>["auto",ge,r],Y=()=>[ge,r],ae=()=>["",on,Pn],G=()=>["auto",Mr,ge],me=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ee=()=>["solid","dashed","dotted","double","none"],ie=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],P=()=>["start","end","center","between","around","evenly","stretch"],z=()=>["","0",ge],V=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>[Mr,ge];return{cacheSize:500,separator:":",theme:{colors:[Mo],spacing:[on,Pn],blur:["none","",jn,ge],brightness:T(),borderColor:[t],borderRadius:["none","","full",jn,ge],borderSpacing:Y(),borderWidth:ae(),contrast:T(),grayscale:z(),hueRotate:T(),invert:z(),gap:Y(),gradientColorStops:[t],gradientColorStopPositions:[Q0,Pn],inset:se(),margin:se(),opacity:T(),padding:Y(),saturate:T(),scale:T(),sepia:z(),skew:T(),space:Y(),translate:Y()},classGroups:{aspect:[{aspect:["auto","square","video",ge]}],container:["container"],columns:[{columns:[jn]}],"break-after":[{"break-after":V()}],"break-before":[{"break-before":V()}],"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:[...me(),ge]}],overflow:[{overflow:ne()}],"overflow-x":[{"overflow-x":ne()}],"overflow-y":[{"overflow-y":ne()}],overscroll:[{overscroll:te()}],"overscroll-x":[{"overscroll-x":te()}],"overscroll-y":[{"overscroll-y":te()}],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,ge]}],basis:[{basis:se()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ge]}],grow:[{grow:z()}],shrink:[{shrink:z()}],order:[{order:["first","last","none",Ao,ge]}],"grid-cols":[{"grid-cols":[Mo]}],"col-start-end":[{col:["auto",{span:["full",Ao,ge]},ge]}],"col-start":[{"col-start":G()}],"col-end":[{"col-end":G()}],"grid-rows":[{"grid-rows":[Mo]}],"row-start-end":[{row:["auto",{span:[Ao,ge]},ge]}],"row-start":[{"row-start":G()}],"row-end":[{"row-end":G()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ge]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ge]}],gap:[{gap:[b]}],"gap-x":[{"gap-x":[b]}],"gap-y":[{"gap-y":[b]}],"justify-content":[{justify:["normal",...P()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...P(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...P(),"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:[C]}],mx:[{mx:[C]}],my:[{my:[C]}],ms:[{ms:[C]}],me:[{me:[C]}],mt:[{mt:[C]}],mr:[{mr:[C]}],mb:[{mb:[C]}],ml:[{ml:[C]}],"space-x":[{"space-x":[U]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[U]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ge,r]}],"min-w":[{"min-w":[ge,r,"min","max","fit"]}],"max-w":[{"max-w":[ge,r,"none","full","min","max","fit","prose",{screen:[jn]},jn]}],h:[{h:[ge,r,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ge,r,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ge,r,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ge,r,"auto","min","max","fit"]}],"font-size":[{text:["base",jn,Pn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Zl]}],"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",ge]}],"line-clamp":[{"line-clamp":["none",Mr,Zl]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",on,ge]}],"list-image":[{"list-image":["none",ge]}],"list-style-type":[{list:["none","disc","decimal",ge]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[_]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[_]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ee(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",on,Pn]}],"underline-offset":[{"underline-offset":["auto",on,ge]}],"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:Y()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ge]}],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",ge]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[_]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...me(),Y0]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",q0]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Z0]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[N]}],"gradient-via-pos":[{via:[N]}],"gradient-to-pos":[{to:[N]}],"gradient-from":[{from:[k]}],"gradient-via":[{via:[k]}],"gradient-to":[{to:[k]}],rounded:[{rounded:[d]}],"rounded-s":[{"rounded-s":[d]}],"rounded-e":[{"rounded-e":[d]}],"rounded-t":[{"rounded-t":[d]}],"rounded-r":[{"rounded-r":[d]}],"rounded-b":[{"rounded-b":[d]}],"rounded-l":[{"rounded-l":[d]}],"rounded-ss":[{"rounded-ss":[d]}],"rounded-se":[{"rounded-se":[d]}],"rounded-ee":[{"rounded-ee":[d]}],"rounded-es":[{"rounded-es":[d]}],"rounded-tl":[{"rounded-tl":[d]}],"rounded-tr":[{"rounded-tr":[d]}],"rounded-br":[{"rounded-br":[d]}],"rounded-bl":[{"rounded-bl":[d]}],"border-w":[{border:[h]}],"border-w-x":[{"border-x":[h]}],"border-w-y":[{"border-y":[h]}],"border-w-s":[{"border-s":[h]}],"border-w-e":[{"border-e":[h]}],"border-w-t":[{"border-t":[h]}],"border-w-r":[{"border-r":[h]}],"border-w-b":[{"border-b":[h]}],"border-w-l":[{"border-l":[h]}],"border-opacity":[{"border-opacity":[_]}],"border-style":[{border:[...ee(),"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":[_]}],"divide-style":[{divide:ee()}],"border-color":[{border:[l]}],"border-color-x":[{"border-x":[l]}],"border-color-y":[{"border-y":[l]}],"border-color-s":[{"border-s":[l]}],"border-color-e":[{"border-e":[l]}],"border-color-t":[{"border-t":[l]}],"border-color-r":[{"border-r":[l]}],"border-color-b":[{"border-b":[l]}],"border-color-l":[{"border-l":[l]}],"divide-color":[{divide:[l]}],"outline-style":[{outline:["",...ee()]}],"outline-offset":[{"outline-offset":[on,ge]}],"outline-w":[{outline:[on,Pn]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:ae()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[_]}],"ring-offset-w":[{"ring-offset":[on,Pn]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",jn,J0]}],"shadow-color":[{shadow:[Mo]}],opacity:[{opacity:[_]}],"mix-blend":[{"mix-blend":[...ie(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ie()}],filter:[{filter:["","none"]}],blur:[{blur:[s]}],brightness:[{brightness:[a]}],contrast:[{contrast:[y]}],"drop-shadow":[{"drop-shadow":["","none",jn,ge]}],grayscale:[{grayscale:[v]}],"hue-rotate":[{"hue-rotate":[g]}],invert:[{invert:[w]}],saturate:[{saturate:[O]}],sepia:[{sepia:[F]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[s]}],"backdrop-brightness":[{"backdrop-brightness":[a]}],"backdrop-contrast":[{"backdrop-contrast":[y]}],"backdrop-grayscale":[{"backdrop-grayscale":[v]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[g]}],"backdrop-invert":[{"backdrop-invert":[w]}],"backdrop-opacity":[{"backdrop-opacity":[_]}],"backdrop-saturate":[{"backdrop-saturate":[O]}],"backdrop-sepia":[{"backdrop-sepia":[F]}],"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",ge]}],duration:[{duration:T()}],ease:[{ease:["linear","in","out","in-out",ge]}],delay:[{delay:T()}],animate:[{animate:["none","spin","ping","pulse","bounce",ge]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[I]}],"scale-x":[{"scale-x":[I]}],"scale-y":[{"scale-y":[I]}],rotate:[{rotate:[Ao,ge]}],"translate-x":[{"translate-x":[q]}],"translate-y":[{"translate-y":[q]}],"skew-x":[{"skew-x":[L]}],"skew-y":[{"skew-y":[L]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ge]}],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",ge]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":Y()}],"scroll-mx":[{"scroll-mx":Y()}],"scroll-my":[{"scroll-my":Y()}],"scroll-ms":[{"scroll-ms":Y()}],"scroll-me":[{"scroll-me":Y()}],"scroll-mt":[{"scroll-mt":Y()}],"scroll-mr":[{"scroll-mr":Y()}],"scroll-mb":[{"scroll-mb":Y()}],"scroll-ml":[{"scroll-ml":Y()}],"scroll-p":[{"scroll-p":Y()}],"scroll-px":[{"scroll-px":Y()}],"scroll-py":[{"scroll-py":Y()}],"scroll-ps":[{"scroll-ps":Y()}],"scroll-pe":[{"scroll-pe":Y()}],"scroll-pt":[{"scroll-pt":Y()}],"scroll-pr":[{"scroll-pr":Y()}],"scroll-pb":[{"scroll-pb":Y()}],"scroll-pl":[{"scroll-pl":Y()}],"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",ge]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[on,Pn,Zl]}],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"]}}},o1=$0(r1);function Le(...t){return o1(Nm(t))}const s1=g0,Am=m.forwardRef(({className:t,...r},s)=>c.jsx(xm,{ref:s,className:Le("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}));Am.displayName=xm.displayName;const i1=v0("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"}}),Mm=m.forwardRef(({className:t,variant:r,...s},a)=>c.jsx(wm,{ref:a,className:Le(i1({variant:r}),t),...s}));Mm.displayName=wm.displayName;const a1=m.forwardRef(({className:t,...r},s)=>c.jsx(Cm,{ref:s,className:Le("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}));a1.displayName=Cm.displayName;const Im=m.forwardRef(({className:t,...r},s)=>c.jsx(Em,{ref:s,className:Le("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:c.jsx(N0,{className:"h-4 w-4"})}));Im.displayName=Em.displayName;const Dm=m.forwardRef(({className:t,...r},s)=>c.jsx(bm,{ref:s,className:Le("text-sm font-semibold",t),...r}));Dm.displayName=bm.displayName;const Lm=m.forwardRef(({className:t,...r},s)=>c.jsx(Sm,{ref:s,className:Le("text-sm opacity-90",t),...r}));Lm.displayName=Sm.displayName;function l1(){const{toasts:t}=xb();return c.jsxs(s1,{children:[t.map(function({id:r,title:s,description:a,action:l,...d}){return c.jsxs(Mm,{...d,children:[c.jsxs("div",{className:"grid gap-1",children:[s&&c.jsx(Dm,{children:s}),a&&c.jsx(Lm,{children:a})]}),l,c.jsx(Im,{})]},r)}),c.jsx(Am,{})]})}var u1=Du[" useId ".trim().toString()]||(()=>{}),c1=0;function $o(t){const[r,s]=m.useState(u1());return Qt(()=>{s(a=>a??String(c1++))},[t]),r?`radix-${r}`:""}const d1=["top","right","bottom","left"],In=Math.min,gt=Math.max,Si=Math.round,ci=Math.floor,Kt=t=>({x:t,y:t}),f1={left:"right",right:"left",bottom:"top",top:"bottom"};function Ru(t,r,s){return gt(t,In(r,s))}function sn(t,r){return typeof t=="function"?t(r):t}function an(t){return t.split("-")[0]}function Br(t){return t.split("-")[1]}function ec(t){return t==="x"?"y":"x"}function tc(t){return t==="y"?"height":"width"}function Wt(t){const r=t[0];return r==="t"||r==="b"?"y":"x"}function nc(t){return ec(Wt(t))}function p1(t,r,s){s===void 0&&(s=!1);const a=Br(t),l=nc(t),d=tc(l);let p=l==="x"?a===(s?"end":"start")?"right":"left":a==="start"?"bottom":"top";return r.reference[d]>r.floating[d]&&(p=Ci(p)),[p,Ci(p)]}function h1(t){const r=Ci(t);return[Pu(t),r,Pu(r)]}function Pu(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const Jp=["left","right"],eh=["right","left"],m1=["top","bottom"],g1=["bottom","top"];function v1(t,r,s){switch(t){case"top":case"bottom":return s?r?eh:Jp:r?Jp:eh;case"left":case"right":return r?m1:g1;default:return[]}}function y1(t,r,s,a){const l=Br(t);let d=v1(an(t),s==="start",a);return l&&(d=d.map(p=>p+"-"+l),r&&(d=d.concat(d.map(Pu)))),d}function Ci(t){const r=an(t);return f1[r]+t.slice(r.length)}function x1(t){return{top:0,right:0,bottom:0,left:0,...t}}function Fm(t){return typeof t!="number"?x1(t):{top:t,right:t,bottom:t,left:t}}function Ei(t){const{x:r,y:s,width:a,height:l}=t;return{width:a,height:l,top:s,left:r,right:r+a,bottom:s+l,x:r,y:s}}function th(t,r,s){let{reference:a,floating:l}=t;const d=Wt(r),p=nc(r),h=tc(p),y=an(r),v=d==="y",g=a.x+a.width/2-l.width/2,w=a.y+a.height/2-l.height/2,b=a[h]/2-l[h]/2;let k;switch(y){case"top":k={x:g,y:a.y-l.height};break;case"bottom":k={x:g,y:a.y+a.height};break;case"right":k={x:a.x+a.width,y:w};break;case"left":k={x:a.x-l.width,y:w};break;default:k={x:a.x,y:a.y}}switch(Br(r)){case"start":k[p]-=b*(s&&v?-1:1);break;case"end":k[p]+=b*(s&&v?-1:1);break}return k}async function w1(t,r){var s;r===void 0&&(r={});const{x:a,y:l,platform:d,rects:p,elements:h,strategy:y}=t,{boundary:v="clippingAncestors",rootBoundary:g="viewport",elementContext:w="floating",altBoundary:b=!1,padding:k=0}=sn(r,t),N=Fm(k),C=h[b?w==="floating"?"reference":"floating":w],_=Ei(await d.getClippingRect({element:(s=await(d.isElement==null?void 0:d.isElement(C)))==null||s?C:C.contextElement||await(d.getDocumentElement==null?void 0:d.getDocumentElement(h.floating)),boundary:v,rootBoundary:g,strategy:y})),A=w==="floating"?{x:a,y:l,width:p.floating.width,height:p.floating.height}:p.reference,O=await(d.getOffsetParent==null?void 0:d.getOffsetParent(h.floating)),I=await(d.isElement==null?void 0:d.isElement(O))?await(d.getScale==null?void 0:d.getScale(O))||{x:1,y:1}:{x:1,y:1},F=Ei(d.convertOffsetParentRelativeRectToViewportRelativeRect?await d.convertOffsetParentRelativeRectToViewportRelativeRect({elements:h,rect:A,offsetParent:O,strategy:y}):A);return{top:(_.top-F.top+N.top)/I.y,bottom:(F.bottom-_.bottom+N.bottom)/I.y,left:(_.left-F.left+N.left)/I.x,right:(F.right-_.right+N.right)/I.x}}const b1=50,S1=async(t,r,s)=>{const{placement:a="bottom",strategy:l="absolute",middleware:d=[],platform:p}=s,h=p.detectOverflow?p:{...p,detectOverflow:w1},y=await(p.isRTL==null?void 0:p.isRTL(r));let v=await p.getElementRects({reference:t,floating:r,strategy:l}),{x:g,y:w}=th(v,a,y),b=a,k=0;const N={};for(let S=0;S<d.length;S++){const C=d[S];if(!C)continue;const{name:_,fn:A}=C,{x:O,y:I,data:F,reset:L}=await A({x:g,y:w,initialPlacement:a,placement:b,strategy:l,middlewareData:N,rects:v,platform:h,elements:{reference:t,floating:r}});g=O??g,w=I??w,N[_]={...N[_],...F},L&&k<b1&&(k++,typeof L=="object"&&(L.placement&&(b=L.placement),L.rects&&(v=L.rects===!0?await p.getElementRects({reference:t,floating:r,strategy:l}):L.rects),{x:g,y:w}=th(v,b,y)),S=-1)}return{x:g,y:w,placement:b,strategy:l,middlewareData:N}},C1=t=>({name:"arrow",options:t,async fn(r){const{x:s,y:a,placement:l,rects:d,platform:p,elements:h,middlewareData:y}=r,{element:v,padding:g=0}=sn(t,r)||{};if(v==null)return{};const w=Fm(g),b={x:s,y:a},k=nc(l),N=tc(k),S=await p.getDimensions(v),C=k==="y",_=C?"top":"left",A=C?"bottom":"right",O=C?"clientHeight":"clientWidth",I=d.reference[N]+d.reference[k]-b[k]-d.floating[N],F=b[k]-d.reference[k],L=await(p.getOffsetParent==null?void 0:p.getOffsetParent(v));let U=L?L[O]:0;(!U||!await(p.isElement==null?void 0:p.isElement(L)))&&(U=h.floating[O]||d.floating[N]);const q=I/2-F/2,te=U/2-S[N]/2-1,ne=In(w[_],te),se=In(w[A],te),Y=ne,ae=U-S[N]-se,G=U/2-S[N]/2+q,me=Ru(Y,G,ae),ee=!y.arrow&&Br(l)!=null&&G!==me&&d.reference[N]/2-(G<Y?ne:se)-S[N]/2<0,ie=ee?G<Y?G-Y:G-ae:0;return{[k]:b[k]+ie,data:{[k]:me,centerOffset:G-me-ie,...ee&&{alignmentOffset:ie}},reset:ee}}}),E1=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(r){var s,a;const{placement:l,middlewareData:d,rects:p,initialPlacement:h,platform:y,elements:v}=r,{mainAxis:g=!0,crossAxis:w=!0,fallbackPlacements:b,fallbackStrategy:k="bestFit",fallbackAxisSideDirection:N="none",flipAlignment:S=!0,...C}=sn(t,r);if((s=d.arrow)!=null&&s.alignmentOffset)return{};const _=an(l),A=Wt(h),O=an(h)===h,I=await(y.isRTL==null?void 0:y.isRTL(v.floating)),F=b||(O||!S?[Ci(h)]:h1(h)),L=N!=="none";!b&&L&&F.push(...y1(h,S,N,I));const U=[h,...F],q=await y.detectOverflow(r,C),te=[];let ne=((a=d.flip)==null?void 0:a.overflows)||[];if(g&&te.push(q[_]),w){const G=p1(l,p,I);te.push(q[G[0]],q[G[1]])}if(ne=[...ne,{placement:l,overflows:te}],!te.every(G=>G<=0)){var se,Y;const G=(((se=d.flip)==null?void 0:se.index)||0)+1,me=U[G];if(me&&(!(w==="alignment"?A!==Wt(me):!1)||ne.every(P=>Wt(P.placement)===A?P.overflows[0]>0:!0)))return{data:{index:G,overflows:ne},reset:{placement:me}};let ee=(Y=ne.filter(ie=>ie.overflows[0]<=0).sort((ie,P)=>ie.overflows[1]-P.overflows[1])[0])==null?void 0:Y.placement;if(!ee)switch(k){case"bestFit":{var ae;const ie=(ae=ne.filter(P=>{if(L){const z=Wt(P.placement);return z===A||z==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(z=>z>0).reduce((z,V)=>z+V,0)]).sort((P,z)=>P[1]-z[1])[0])==null?void 0:ae[0];ie&&(ee=ie);break}case"initialPlacement":ee=h;break}if(l!==ee)return{reset:{placement:ee}}}return{}}}};function nh(t,r){return{top:t.top-r.height,right:t.right-r.width,bottom:t.bottom-r.height,left:t.left-r.width}}function rh(t){return d1.some(r=>t[r]>=0)}const k1=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(r){const{rects:s,platform:a}=r,{strategy:l="referenceHidden",...d}=sn(t,r);switch(l){case"referenceHidden":{const p=await a.detectOverflow(r,{...d,elementContext:"reference"}),h=nh(p,s.reference);return{data:{referenceHiddenOffsets:h,referenceHidden:rh(h)}}}case"escaped":{const p=await a.detectOverflow(r,{...d,altBoundary:!0}),h=nh(p,s.floating);return{data:{escapedOffsets:h,escaped:rh(h)}}}default:return{}}}}},$m=new Set(["left","top"]);async function N1(t,r){const{placement:s,platform:a,elements:l}=t,d=await(a.isRTL==null?void 0:a.isRTL(l.floating)),p=an(s),h=Br(s),y=Wt(s)==="y",v=$m.has(p)?-1:1,g=d&&y?-1:1,w=sn(r,t);let{mainAxis:b,crossAxis:k,alignmentAxis:N}=typeof w=="number"?{mainAxis:w,crossAxis:0,alignmentAxis:null}:{mainAxis:w.mainAxis||0,crossAxis:w.crossAxis||0,alignmentAxis:w.alignmentAxis};return h&&typeof N=="number"&&(k=h==="end"?N*-1:N),y?{x:k*g,y:b*v}:{x:b*v,y:k*g}}const R1=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(r){var s,a;const{x:l,y:d,placement:p,middlewareData:h}=r,y=await N1(r,t);return p===((s=h.offset)==null?void 0:s.placement)&&(a=h.arrow)!=null&&a.alignmentOffset?{}:{x:l+y.x,y:d+y.y,data:{...y,placement:p}}}}},P1=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(r){const{x:s,y:a,placement:l,platform:d}=r,{mainAxis:p=!0,crossAxis:h=!1,limiter:y={fn:_=>{let{x:A,y:O}=_;return{x:A,y:O}}},...v}=sn(t,r),g={x:s,y:a},w=await d.detectOverflow(r,v),b=Wt(an(l)),k=ec(b);let N=g[k],S=g[b];if(p){const _=k==="y"?"top":"left",A=k==="y"?"bottom":"right",O=N+w[_],I=N-w[A];N=Ru(O,N,I)}if(h){const _=b==="y"?"top":"left",A=b==="y"?"bottom":"right",O=S+w[_],I=S-w[A];S=Ru(O,S,I)}const C=y.fn({...r,[k]:N,[b]:S});return{...C,data:{x:C.x-s,y:C.y-a,enabled:{[k]:p,[b]:h}}}}}},j1=function(t){return t===void 0&&(t={}),{options:t,fn(r){const{x:s,y:a,placement:l,rects:d,middlewareData:p}=r,{offset:h=0,mainAxis:y=!0,crossAxis:v=!0}=sn(t,r),g={x:s,y:a},w=Wt(l),b=ec(w);let k=g[b],N=g[w];const S=sn(h,r),C=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(y){const O=b==="y"?"height":"width",I=d.reference[b]-d.floating[O]+C.mainAxis,F=d.reference[b]+d.reference[O]-C.mainAxis;k<I?k=I:k>F&&(k=F)}if(v){var _,A;const O=b==="y"?"width":"height",I=$m.has(an(l)),F=d.reference[w]-d.floating[O]+(I&&((_=p.offset)==null?void 0:_[w])||0)+(I?0:C.crossAxis),L=d.reference[w]+d.reference[O]+(I?0:((A=p.offset)==null?void 0:A[w])||0)-(I?C.crossAxis:0);N<F?N=F:N>L&&(N=L)}return{[b]:k,[w]:N}}}},T1=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(r){var s,a;const{placement:l,rects:d,platform:p,elements:h}=r,{apply:y=()=>{},...v}=sn(t,r),g=await p.detectOverflow(r,v),w=an(l),b=Br(l),k=Wt(l)==="y",{width:N,height:S}=d.floating;let C,_;w==="top"||w==="bottom"?(C=w,_=b===(await(p.isRTL==null?void 0:p.isRTL(h.floating))?"start":"end")?"left":"right"):(_=w,C=b==="end"?"top":"bottom");const A=S-g.top-g.bottom,O=N-g.left-g.right,I=In(S-g[C],A),F=In(N-g[_],O),L=!r.middlewareData.shift;let U=I,q=F;if((s=r.middlewareData.shift)!=null&&s.enabled.x&&(q=O),(a=r.middlewareData.shift)!=null&&a.enabled.y&&(U=A),L&&!b){const ne=gt(g.left,0),se=gt(g.right,0),Y=gt(g.top,0),ae=gt(g.bottom,0);k?q=N-2*(ne!==0||se!==0?ne+se:gt(g.left,g.right)):U=S-2*(Y!==0||ae!==0?Y+ae:gt(g.top,g.bottom))}await y({...r,availableWidth:q,availableHeight:U});const te=await p.getDimensions(h.floating);return N!==te.width||S!==te.height?{reset:{rects:!0}}:{}}}};function Mi(){return typeof window<"u"}function Wr(t){return zm(t)?(t.nodeName||"").toLowerCase():"#document"}function vt(t){var r;return(t==null||(r=t.ownerDocument)==null?void 0:r.defaultView)||window}function Gt(t){var r;return(r=(zm(t)?t.ownerDocument:t.document)||window.document)==null?void 0:r.documentElement}function zm(t){return Mi()?t instanceof Node||t instanceof vt(t).Node:!1}function It(t){return Mi()?t instanceof Element||t instanceof vt(t).Element:!1}function ln(t){return Mi()?t instanceof HTMLElement||t instanceof vt(t).HTMLElement:!1}function oh(t){return!Mi()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof vt(t).ShadowRoot}function Qo(t){const{overflow:r,overflowX:s,overflowY:a,display:l}=Dt(t);return/auto|scroll|overlay|hidden|clip/.test(r+a+s)&&l!=="inline"&&l!=="contents"}function _1(t){return/^(table|td|th)$/.test(Wr(t))}function Ii(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const O1=/transform|translate|scale|rotate|perspective|filter/,A1=/paint|layout|strict|content/,Zn=t=>!!t&&t!=="none";let Jl;function rc(t){const r=It(t)?Dt(t):t;return Zn(r.transform)||Zn(r.translate)||Zn(r.scale)||Zn(r.rotate)||Zn(r.perspective)||!oc()&&(Zn(r.backdropFilter)||Zn(r.filter))||O1.test(r.willChange||"")||A1.test(r.contain||"")}function M1(t){let r=Dn(t);for(;ln(r)&&!Lr(r);){if(rc(r))return r;if(Ii(r))return null;r=Dn(r)}return null}function oc(){return Jl==null&&(Jl=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Jl}function Lr(t){return/^(html|body|#document)$/.test(Wr(t))}function Dt(t){return vt(t).getComputedStyle(t)}function Di(t){return It(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Dn(t){if(Wr(t)==="html")return t;const r=t.assignedSlot||t.parentNode||oh(t)&&t.host||Gt(t);return oh(r)?r.host:r}function Um(t){const r=Dn(t);return Lr(r)?t.ownerDocument?t.ownerDocument.body:t.body:ln(r)&&Qo(r)?r:Um(r)}function zo(t,r,s){var a;r===void 0&&(r=[]),s===void 0&&(s=!0);const l=Um(t),d=l===((a=t.ownerDocument)==null?void 0:a.body),p=vt(l);if(d){const h=ju(p);return r.concat(p,p.visualViewport||[],Qo(l)?l:[],h&&s?zo(h):[])}else return r.concat(l,zo(l,[],s))}function ju(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Hm(t){const r=Dt(t);let s=parseFloat(r.width)||0,a=parseFloat(r.height)||0;const l=ln(t),d=l?t.offsetWidth:s,p=l?t.offsetHeight:a,h=Si(s)!==d||Si(a)!==p;return h&&(s=d,a=p),{width:s,height:a,$:h}}function sc(t){return It(t)?t:t.contextElement}function Ir(t){const r=sc(t);if(!ln(r))return Kt(1);const s=r.getBoundingClientRect(),{width:a,height:l,$:d}=Hm(r);let p=(d?Si(s.width):s.width)/a,h=(d?Si(s.height):s.height)/l;return(!p||!Number.isFinite(p))&&(p=1),(!h||!Number.isFinite(h))&&(h=1),{x:p,y:h}}const I1=Kt(0);function Bm(t){const r=vt(t);return!oc()||!r.visualViewport?I1:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function D1(t,r,s){return r===void 0&&(r=!1),!s||r&&s!==vt(t)?!1:r}function nr(t,r,s,a){r===void 0&&(r=!1),s===void 0&&(s=!1);const l=t.getBoundingClientRect(),d=sc(t);let p=Kt(1);r&&(a?It(a)&&(p=Ir(a)):p=Ir(t));const h=D1(d,s,a)?Bm(d):Kt(0);let y=(l.left+h.x)/p.x,v=(l.top+h.y)/p.y,g=l.width/p.x,w=l.height/p.y;if(d){const b=vt(d),k=a&&It(a)?vt(a):a;let N=b,S=ju(N);for(;S&&a&&k!==N;){const C=Ir(S),_=S.getBoundingClientRect(),A=Dt(S),O=_.left+(S.clientLeft+parseFloat(A.paddingLeft))*C.x,I=_.top+(S.clientTop+parseFloat(A.paddingTop))*C.y;y*=C.x,v*=C.y,g*=C.x,w*=C.y,y+=O,v+=I,N=vt(S),S=ju(N)}}return Ei({width:g,height:w,x:y,y:v})}function Li(t,r){const s=Di(t).scrollLeft;return r?r.left+s:nr(Gt(t)).left+s}function Wm(t,r){const s=t.getBoundingClientRect(),a=s.left+r.scrollLeft-Li(t,s),l=s.top+r.scrollTop;return{x:a,y:l}}function L1(t){let{elements:r,rect:s,offsetParent:a,strategy:l}=t;const d=l==="fixed",p=Gt(a),h=r?Ii(r.floating):!1;if(a===p||h&&d)return s;let y={scrollLeft:0,scrollTop:0},v=Kt(1);const g=Kt(0),w=ln(a);if((w||!w&&!d)&&((Wr(a)!=="body"||Qo(p))&&(y=Di(a)),w)){const k=nr(a);v=Ir(a),g.x=k.x+a.clientLeft,g.y=k.y+a.clientTop}const b=p&&!w&&!d?Wm(p,y):Kt(0);return{width:s.width*v.x,height:s.height*v.y,x:s.x*v.x-y.scrollLeft*v.x+g.x+b.x,y:s.y*v.y-y.scrollTop*v.y+g.y+b.y}}function F1(t){return Array.from(t.getClientRects())}function $1(t){const r=Gt(t),s=Di(t),a=t.ownerDocument.body,l=gt(r.scrollWidth,r.clientWidth,a.scrollWidth,a.clientWidth),d=gt(r.scrollHeight,r.clientHeight,a.scrollHeight,a.clientHeight);let p=-s.scrollLeft+Li(t);const h=-s.scrollTop;return Dt(a).direction==="rtl"&&(p+=gt(r.clientWidth,a.clientWidth)-l),{width:l,height:d,x:p,y:h}}const sh=25;function z1(t,r){const s=vt(t),a=Gt(t),l=s.visualViewport;let d=a.clientWidth,p=a.clientHeight,h=0,y=0;if(l){d=l.width,p=l.height;const g=oc();(!g||g&&r==="fixed")&&(h=l.offsetLeft,y=l.offsetTop)}const v=Li(a);if(v<=0){const g=a.ownerDocument,w=g.body,b=getComputedStyle(w),k=g.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,N=Math.abs(a.clientWidth-w.clientWidth-k);N<=sh&&(d-=N)}else v<=sh&&(d+=v);return{width:d,height:p,x:h,y}}function U1(t,r){const s=nr(t,!0,r==="fixed"),a=s.top+t.clientTop,l=s.left+t.clientLeft,d=ln(t)?Ir(t):Kt(1),p=t.clientWidth*d.x,h=t.clientHeight*d.y,y=l*d.x,v=a*d.y;return{width:p,height:h,x:y,y:v}}function ih(t,r,s){let a;if(r==="viewport")a=z1(t,s);else if(r==="document")a=$1(Gt(t));else if(It(r))a=U1(r,s);else{const l=Bm(t);a={x:r.x-l.x,y:r.y-l.y,width:r.width,height:r.height}}return Ei(a)}function Km(t,r){const s=Dn(t);return s===r||!It(s)||Lr(s)?!1:Dt(s).position==="fixed"||Km(s,r)}function H1(t,r){const s=r.get(t);if(s)return s;let a=zo(t,[],!1).filter(h=>It(h)&&Wr(h)!=="body"),l=null;const d=Dt(t).position==="fixed";let p=d?Dn(t):t;for(;It(p)&&!Lr(p);){const h=Dt(p),y=rc(p);!y&&h.position==="fixed"&&(l=null),(d?!y&&!l:!y&&h.position==="static"&&!!l&&(l.position==="absolute"||l.position==="fixed")||Qo(p)&&!y&&Km(t,p))?a=a.filter(g=>g!==p):l=h,p=Dn(p)}return r.set(t,a),a}function B1(t){let{element:r,boundary:s,rootBoundary:a,strategy:l}=t;const p=[...s==="clippingAncestors"?Ii(r)?[]:H1(r,this._c):[].concat(s),a],h=ih(r,p[0],l);let y=h.top,v=h.right,g=h.bottom,w=h.left;for(let b=1;b<p.length;b++){const k=ih(r,p[b],l);y=gt(k.top,y),v=In(k.right,v),g=In(k.bottom,g),w=gt(k.left,w)}return{width:v-w,height:g-y,x:w,y}}function W1(t){const{width:r,height:s}=Hm(t);return{width:r,height:s}}function K1(t,r,s){const a=ln(r),l=Gt(r),d=s==="fixed",p=nr(t,!0,d,r);let h={scrollLeft:0,scrollTop:0};const y=Kt(0);function v(){y.x=Li(l)}if(a||!a&&!d)if((Wr(r)!=="body"||Qo(l))&&(h=Di(r)),a){const k=nr(r,!0,d,r);y.x=k.x+r.clientLeft,y.y=k.y+r.clientTop}else l&&v();d&&!a&&l&&v();const g=l&&!a&&!d?Wm(l,h):Kt(0),w=p.left+h.scrollLeft-y.x-g.x,b=p.top+h.scrollTop-y.y-g.y;return{x:w,y:b,width:p.width,height:p.height}}function eu(t){return Dt(t).position==="static"}function ah(t,r){if(!ln(t)||Dt(t).position==="fixed")return null;if(r)return r(t);let s=t.offsetParent;return Gt(t)===s&&(s=s.ownerDocument.body),s}function Vm(t,r){const s=vt(t);if(Ii(t))return s;if(!ln(t)){let l=Dn(t);for(;l&&!Lr(l);){if(It(l)&&!eu(l))return l;l=Dn(l)}return s}let a=ah(t,r);for(;a&&_1(a)&&eu(a);)a=ah(a,r);return a&&Lr(a)&&eu(a)&&!rc(a)?s:a||M1(t)||s}const V1=async function(t){const r=this.getOffsetParent||Vm,s=this.getDimensions,a=await s(t.floating);return{reference:K1(t.reference,await r(t.floating),t.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}};function Q1(t){return Dt(t).direction==="rtl"}const G1={convertOffsetParentRelativeRectToViewportRelativeRect:L1,getDocumentElement:Gt,getClippingRect:B1,getOffsetParent:Vm,getElementRects:V1,getClientRects:F1,getDimensions:W1,getScale:Ir,isElement:It,isRTL:Q1};function Qm(t,r){return t.x===r.x&&t.y===r.y&&t.width===r.width&&t.height===r.height}function q1(t,r){let s=null,a;const l=Gt(t);function d(){var h;clearTimeout(a),(h=s)==null||h.disconnect(),s=null}function p(h,y){h===void 0&&(h=!1),y===void 0&&(y=1),d();const v=t.getBoundingClientRect(),{left:g,top:w,width:b,height:k}=v;if(h||r(),!b||!k)return;const N=ci(w),S=ci(l.clientWidth-(g+b)),C=ci(l.clientHeight-(w+k)),_=ci(g),O={rootMargin:-N+"px "+-S+"px "+-C+"px "+-_+"px",threshold:gt(0,In(1,y))||1};let I=!0;function F(L){const U=L[0].intersectionRatio;if(U!==y){if(!I)return p();U?p(!1,U):a=setTimeout(()=>{p(!1,1e-7)},1e3)}U===1&&!Qm(v,t.getBoundingClientRect())&&p(),I=!1}try{s=new IntersectionObserver(F,{...O,root:l.ownerDocument})}catch{s=new IntersectionObserver(F,O)}s.observe(t)}return p(!0),d}function Y1(t,r,s,a){a===void 0&&(a={});const{ancestorScroll:l=!0,ancestorResize:d=!0,elementResize:p=typeof ResizeObserver=="function",layoutShift:h=typeof IntersectionObserver=="function",animationFrame:y=!1}=a,v=sc(t),g=l||d?[...v?zo(v):[],...r?zo(r):[]]:[];g.forEach(_=>{l&&_.addEventListener("scroll",s,{passive:!0}),d&&_.addEventListener("resize",s)});const w=v&&h?q1(v,s):null;let b=-1,k=null;p&&(k=new ResizeObserver(_=>{let[A]=_;A&&A.target===v&&k&&r&&(k.unobserve(r),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var O;(O=k)==null||O.observe(r)})),s()}),v&&!y&&k.observe(v),r&&k.observe(r));let N,S=y?nr(t):null;y&&C();function C(){const _=nr(t);S&&!Qm(S,_)&&s(),S=_,N=requestAnimationFrame(C)}return s(),()=>{var _;g.forEach(A=>{l&&A.removeEventListener("scroll",s),d&&A.removeEventListener("resize",s)}),w?.(),(_=k)==null||_.disconnect(),k=null,y&&cancelAnimationFrame(N)}}const X1=R1,Z1=P1,J1=E1,eS=T1,tS=k1,lh=C1,nS=j1,rS=(t,r,s)=>{const a=new Map,l={platform:G1,...s},d={...l.platform,_c:a};return S1(t,r,{...l,platform:d})};var oS=typeof document<"u",sS=function(){},vi=oS?m.useLayoutEffect:sS;function ki(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,a,l;if(t&&r&&typeof t=="object"){if(Array.isArray(t)){if(s=t.length,s!==r.length)return!1;for(a=s;a--!==0;)if(!ki(t[a],r[a]))return!1;return!0}if(l=Object.keys(t),s=l.length,s!==Object.keys(r).length)return!1;for(a=s;a--!==0;)if(!{}.hasOwnProperty.call(r,l[a]))return!1;for(a=s;a--!==0;){const d=l[a];if(!(d==="_owner"&&t.$$typeof)&&!ki(t[d],r[d]))return!1}return!0}return t!==t&&r!==r}function Gm(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function uh(t,r){const s=Gm(t);return Math.round(r*s)/s}function tu(t){const r=m.useRef(t);return vi(()=>{r.current=t}),r}function iS(t){t===void 0&&(t={});const{placement:r="bottom",strategy:s="absolute",middleware:a=[],platform:l,elements:{reference:d,floating:p}={},transform:h=!0,whileElementsMounted:y,open:v}=t,[g,w]=m.useState({x:0,y:0,strategy:s,placement:r,middlewareData:{},isPositioned:!1}),[b,k]=m.useState(a);ki(b,a)||k(a);const[N,S]=m.useState(null),[C,_]=m.useState(null),A=m.useCallback(P=>{P!==L.current&&(L.current=P,S(P))},[]),O=m.useCallback(P=>{P!==U.current&&(U.current=P,_(P))},[]),I=d||N,F=p||C,L=m.useRef(null),U=m.useRef(null),q=m.useRef(g),te=y!=null,ne=tu(y),se=tu(l),Y=tu(v),ae=m.useCallback(()=>{if(!L.current||!U.current)return;const P={placement:r,strategy:s,middleware:b};se.current&&(P.platform=se.current),rS(L.current,U.current,P).then(z=>{const V={...z,isPositioned:Y.current!==!1};G.current&&!ki(q.current,V)&&(q.current=V,Ti.flushSync(()=>{w(V)}))})},[b,r,s,se,Y]);vi(()=>{v===!1&&q.current.isPositioned&&(q.current.isPositioned=!1,w(P=>({...P,isPositioned:!1})))},[v]);const G=m.useRef(!1);vi(()=>(G.current=!0,()=>{G.current=!1}),[]),vi(()=>{if(I&&(L.current=I),F&&(U.current=F),I&&F){if(ne.current)return ne.current(I,F,ae);ae()}},[I,F,ae,ne,te]);const me=m.useMemo(()=>({reference:L,floating:U,setReference:A,setFloating:O}),[A,O]),ee=m.useMemo(()=>({reference:I,floating:F}),[I,F]),ie=m.useMemo(()=>{const P={position:s,left:0,top:0};if(!ee.floating)return P;const z=uh(ee.floating,g.x),V=uh(ee.floating,g.y);return h?{...P,transform:"translate("+z+"px, "+V+"px)",...Gm(ee.floating)>=1.5&&{willChange:"transform"}}:{position:s,left:z,top:V}},[s,h,ee.floating,g.x,g.y]);return m.useMemo(()=>({...g,update:ae,refs:me,elements:ee,floatingStyles:ie}),[g,ae,me,ee,ie])}const aS=t=>{function r(s){return{}.hasOwnProperty.call(s,"current")}return{name:"arrow",options:t,fn(s){const{element:a,padding:l}=typeof t=="function"?t(s):t;return a&&r(a)?a.current!=null?lh({element:a.current,padding:l}).fn(s):{}:a?lh({element:a,padding:l}).fn(s):{}}}},lS=(t,r)=>{const s=X1(t);return{name:s.name,fn:s.fn,options:[t,r]}},uS=(t,r)=>{const s=Z1(t);return{name:s.name,fn:s.fn,options:[t,r]}},cS=(t,r)=>({fn:nS(t).fn,options:[t,r]}),dS=(t,r)=>{const s=J1(t);return{name:s.name,fn:s.fn,options:[t,r]}},fS=(t,r)=>{const s=eS(t);return{name:s.name,fn:s.fn,options:[t,r]}},pS=(t,r)=>{const s=tS(t);return{name:s.name,fn:s.fn,options:[t,r]}},hS=(t,r)=>{const s=aS(t);return{name:s.name,fn:s.fn,options:[t,r]}};var mS="Arrow",qm=m.forwardRef((t,r)=>{const{children:s,width:a=10,height:l=5,...d}=t;return c.jsx(Re.svg,{...d,ref:r,width:a,height:l,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?s:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});qm.displayName=mS;var gS=qm;function vS(t){const[r,s]=m.useState(void 0);return Qt(()=>{if(t){s({width:t.offsetWidth,height:t.offsetHeight});const a=new ResizeObserver(l=>{if(!Array.isArray(l)||!l.length)return;const d=l[0];let p,h;if("borderBoxSize"in d){const y=d.borderBoxSize,v=Array.isArray(y)?y[0]:y;p=v.inlineSize,h=v.blockSize}else p=t.offsetWidth,h=t.offsetHeight;s({width:p,height:h})});return a.observe(t,{box:"border-box"}),()=>a.unobserve(t)}else s(void 0)},[t]),r}var ic="Popper",[Ym,Fi]=Ln(ic),[yS,Xm]=Ym(ic),Zm=t=>{const{__scopePopper:r,children:s}=t,[a,l]=m.useState(null);return c.jsx(yS,{scope:r,anchor:a,onAnchorChange:l,children:s})};Zm.displayName=ic;var Jm="PopperAnchor",eg=m.forwardRef((t,r)=>{const{__scopePopper:s,virtualRef:a,...l}=t,d=Xm(Jm,s),p=m.useRef(null),h=He(r,p),y=m.useRef(null);return m.useEffect(()=>{const v=y.current;y.current=a?.current||p.current,v!==y.current&&d.onAnchorChange(y.current)}),a?null:c.jsx(Re.div,{...l,ref:h})});eg.displayName=Jm;var ac="PopperContent",[xS,wS]=Ym(ac),tg=m.forwardRef((t,r)=>{const{__scopePopper:s,side:a="bottom",sideOffset:l=0,align:d="center",alignOffset:p=0,arrowPadding:h=0,avoidCollisions:y=!0,collisionBoundary:v=[],collisionPadding:g=0,sticky:w="partial",hideWhenDetached:b=!1,updatePositionStrategy:k="optimized",onPlaced:N,...S}=t,C=Xm(ac,s),[_,A]=m.useState(null),O=He(r,he=>A(he)),[I,F]=m.useState(null),L=vS(I),U=L?.width??0,q=L?.height??0,te=a+(d!=="center"?"-"+d:""),ne=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},se=Array.isArray(v)?v:[v],Y=se.length>0,ae={padding:ne,boundary:se.filter(SS),altBoundary:Y},{refs:G,floatingStyles:me,placement:ee,isPositioned:ie,middlewareData:P}=iS({strategy:"fixed",placement:te,whileElementsMounted:(...he)=>Y1(...he,{animationFrame:k==="always"}),elements:{reference:C.anchor},middleware:[lS({mainAxis:l+q,alignmentAxis:p}),y&&uS({mainAxis:!0,crossAxis:!1,limiter:w==="partial"?cS():void 0,...ae}),y&&dS({...ae}),fS({...ae,apply:({elements:he,rects:be,availableWidth:ke,availableHeight:Ze})=>{const{width:sr,height:Xo}=be.reference,qt=he.floating.style;qt.setProperty("--radix-popper-available-width",`${ke}px`),qt.setProperty("--radix-popper-available-height",`${Ze}px`),qt.setProperty("--radix-popper-anchor-width",`${sr}px`),qt.setProperty("--radix-popper-anchor-height",`${Xo}px`)}}),I&&hS({element:I,padding:h}),CS({arrowWidth:U,arrowHeight:q}),b&&pS({strategy:"referenceHidden",...ae})]}),[z,V]=og(ee),T=yt(N);Qt(()=>{ie&&T?.()},[ie,T]);const H=P.arrow?.x,de=P.arrow?.y,pe=P.arrow?.centerOffset!==0,[xe,ve]=m.useState();return Qt(()=>{_&&ve(window.getComputedStyle(_).zIndex)},[_]),c.jsx("div",{ref:G.setFloating,"data-radix-popper-content-wrapper":"",style:{...me,transform:ie?me.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:xe,"--radix-popper-transform-origin":[P.transformOrigin?.x,P.transformOrigin?.y].join(" "),...P.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:c.jsx(xS,{scope:s,placedSide:z,onArrowChange:F,arrowX:H,arrowY:de,shouldHideArrow:pe,children:c.jsx(Re.div,{"data-side":z,"data-align":V,...S,ref:O,style:{...S.style,animation:ie?void 0:"none"}})})})});tg.displayName=ac;var ng="PopperArrow",bS={top:"bottom",right:"left",bottom:"top",left:"right"},rg=m.forwardRef(function(r,s){const{__scopePopper:a,...l}=r,d=wS(ng,a),p=bS[d.placedSide];return c.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:c.jsx(gS,{...l,ref:s,style:{...l.style,display:"block"}})})});rg.displayName=ng;function SS(t){return t!==null}var CS=t=>({name:"transformOrigin",options:t,fn(r){const{placement:s,rects:a,middlewareData:l}=r,p=l.arrow?.centerOffset!==0,h=p?0:t.arrowWidth,y=p?0:t.arrowHeight,[v,g]=og(s),w={start:"0%",center:"50%",end:"100%"}[g],b=(l.arrow?.x??0)+h/2,k=(l.arrow?.y??0)+y/2;let N="",S="";return v==="bottom"?(N=p?w:`${b}px`,S=`${-y}px`):v==="top"?(N=p?w:`${b}px`,S=`${a.floating.height+y}px`):v==="right"?(N=`${-y}px`,S=p?w:`${k}px`):v==="left"&&(N=`${a.floating.width+y}px`,S=p?w:`${k}px`),{data:{x:N,y:S}}}});function og(t){const[r,s="center"]=t.split("-");return[r,s]}var sg=Zm,ig=eg,ag=tg,lg=rg,ES=Symbol("radix.slottable");function kS(t){const r=({children:s})=>c.jsx(c.Fragment,{children:s});return r.displayName=`${t}.Slottable`,r.__radixId=ES,r}var[$i]=Ln("Tooltip",[Fi]),zi=Fi(),ug="TooltipProvider",NS=700,Tu="tooltip.open",[RS,lc]=$i(ug),cg=t=>{const{__scopeTooltip:r,delayDuration:s=NS,skipDelayDuration:a=300,disableHoverableContent:l=!1,children:d}=t,p=m.useRef(!0),h=m.useRef(!1),y=m.useRef(0);return m.useEffect(()=>{const v=y.current;return()=>window.clearTimeout(v)},[]),c.jsx(RS,{scope:r,isOpenDelayedRef:p,delayDuration:s,onOpen:m.useCallback(()=>{window.clearTimeout(y.current),p.current=!1},[]),onClose:m.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>p.current=!0,a)},[a]),isPointerInTransitRef:h,onPointerInTransitChange:m.useCallback(v=>{h.current=v},[]),disableHoverableContent:l,children:d})};cg.displayName=ug;var Uo="Tooltip",[PS,Ui]=$i(Uo),dg=t=>{const{__scopeTooltip:r,children:s,open:a,defaultOpen:l,onOpenChange:d,disableHoverableContent:p,delayDuration:h}=t,y=lc(Uo,t.__scopeTooltip),v=zi(r),[g,w]=m.useState(null),b=$o(),k=m.useRef(0),N=p??y.disableHoverableContent,S=h??y.delayDuration,C=m.useRef(!1),[_,A]=Ko({prop:a,defaultProp:l??!1,onChange:U=>{U?(y.onOpen(),document.dispatchEvent(new CustomEvent(Tu))):y.onClose(),d?.(U)},caller:Uo}),O=m.useMemo(()=>_?C.current?"delayed-open":"instant-open":"closed",[_]),I=m.useCallback(()=>{window.clearTimeout(k.current),k.current=0,C.current=!1,A(!0)},[A]),F=m.useCallback(()=>{window.clearTimeout(k.current),k.current=0,A(!1)},[A]),L=m.useCallback(()=>{window.clearTimeout(k.current),k.current=window.setTimeout(()=>{C.current=!0,A(!0),k.current=0},S)},[S,A]);return m.useEffect(()=>()=>{k.current&&(window.clearTimeout(k.current),k.current=0)},[]),c.jsx(sg,{...v,children:c.jsx(PS,{scope:r,contentId:b,open:_,stateAttribute:O,trigger:g,onTriggerChange:w,onTriggerEnter:m.useCallback(()=>{y.isOpenDelayedRef.current?L():I()},[y.isOpenDelayedRef,L,I]),onTriggerLeave:m.useCallback(()=>{N?F():(window.clearTimeout(k.current),k.current=0)},[F,N]),onOpen:I,onClose:F,disableHoverableContent:N,children:s})})};dg.displayName=Uo;var _u="TooltipTrigger",fg=m.forwardRef((t,r)=>{const{__scopeTooltip:s,...a}=t,l=Ui(_u,s),d=lc(_u,s),p=zi(s),h=m.useRef(null),y=He(r,h,l.onTriggerChange),v=m.useRef(!1),g=m.useRef(!1),w=m.useCallback(()=>v.current=!1,[]);return m.useEffect(()=>()=>document.removeEventListener("pointerup",w),[w]),c.jsx(ig,{asChild:!0,...p,children:c.jsx(Re.button,{"aria-describedby":l.open?l.contentId:void 0,"data-state":l.stateAttribute,...a,ref:y,onPointerMove:ce(t.onPointerMove,b=>{b.pointerType!=="touch"&&!g.current&&!d.isPointerInTransitRef.current&&(l.onTriggerEnter(),g.current=!0)}),onPointerLeave:ce(t.onPointerLeave,()=>{l.onTriggerLeave(),g.current=!1}),onPointerDown:ce(t.onPointerDown,()=>{l.open&&l.onClose(),v.current=!0,document.addEventListener("pointerup",w,{once:!0})}),onFocus:ce(t.onFocus,()=>{v.current||l.onOpen()}),onBlur:ce(t.onBlur,l.onClose),onClick:ce(t.onClick,l.onClose)})})});fg.displayName=_u;var jS="TooltipPortal",[MN,TS]=$i(jS,{forceMount:void 0}),Fr="TooltipContent",pg=m.forwardRef((t,r)=>{const s=TS(Fr,t.__scopeTooltip),{forceMount:a=s.forceMount,side:l="top",...d}=t,p=Ui(Fr,t.__scopeTooltip);return c.jsx(Fn,{present:a||p.open,children:p.disableHoverableContent?c.jsx(hg,{side:l,...d,ref:r}):c.jsx(_S,{side:l,...d,ref:r})})}),_S=m.forwardRef((t,r)=>{const s=Ui(Fr,t.__scopeTooltip),a=lc(Fr,t.__scopeTooltip),l=m.useRef(null),d=He(r,l),[p,h]=m.useState(null),{trigger:y,onClose:v}=s,g=l.current,{onPointerInTransitChange:w}=a,b=m.useCallback(()=>{h(null),w(!1)},[w]),k=m.useCallback((N,S)=>{const C=N.currentTarget,_={x:N.clientX,y:N.clientY},A=DS(_,C.getBoundingClientRect()),O=LS(_,A),I=FS(S.getBoundingClientRect()),F=zS([...O,...I]);h(F),w(!0)},[w]);return m.useEffect(()=>()=>b(),[b]),m.useEffect(()=>{if(y&&g){const N=C=>k(C,g),S=C=>k(C,y);return y.addEventListener("pointerleave",N),g.addEventListener("pointerleave",S),()=>{y.removeEventListener("pointerleave",N),g.removeEventListener("pointerleave",S)}}},[y,g,k,b]),m.useEffect(()=>{if(p){const N=S=>{const C=S.target,_={x:S.clientX,y:S.clientY},A=y?.contains(C)||g?.contains(C),O=!$S(_,p);A?b():O&&(b(),v())};return document.addEventListener("pointermove",N),()=>document.removeEventListener("pointermove",N)}},[y,g,p,v,b]),c.jsx(hg,{...t,ref:d})}),[OS,AS]=$i(Uo,{isInside:!1}),MS=kS("TooltipContent"),hg=m.forwardRef((t,r)=>{const{__scopeTooltip:s,children:a,"aria-label":l,onEscapeKeyDown:d,onPointerDownOutside:p,...h}=t,y=Ui(Fr,s),v=zi(s),{onClose:g}=y;return m.useEffect(()=>(document.addEventListener(Tu,g),()=>document.removeEventListener(Tu,g)),[g]),m.useEffect(()=>{if(y.trigger){const w=b=>{b.target?.contains(y.trigger)&&g()};return window.addEventListener("scroll",w,{capture:!0}),()=>window.removeEventListener("scroll",w,{capture:!0})}},[y.trigger,g]),c.jsx(_i,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:d,onPointerDownOutside:p,onFocusOutside:w=>w.preventDefault(),onDismiss:g,children:c.jsxs(ag,{"data-state":y.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:[c.jsx(MS,{children:a}),c.jsx(OS,{scope:s,isInside:!0,children:c.jsx(Zb,{id:y.contentId,role:"tooltip",children:l||a})})]})})});pg.displayName=Fr;var mg="TooltipArrow",IS=m.forwardRef((t,r)=>{const{__scopeTooltip:s,...a}=t,l=zi(s);return AS(mg,s).isInside?null:c.jsx(lg,{...l,...a,ref:r})});IS.displayName=mg;function DS(t,r){const s=Math.abs(r.top-t.y),a=Math.abs(r.bottom-t.y),l=Math.abs(r.right-t.x),d=Math.abs(r.left-t.x);switch(Math.min(s,a,l,d)){case d:return"left";case l:return"right";case s:return"top";case a:return"bottom";default:throw new Error("unreachable")}}function LS(t,r,s=5){const a=[];switch(r){case"top":a.push({x:t.x-s,y:t.y+s},{x:t.x+s,y:t.y+s});break;case"bottom":a.push({x:t.x-s,y:t.y-s},{x:t.x+s,y:t.y-s});break;case"left":a.push({x:t.x+s,y:t.y-s},{x:t.x+s,y:t.y+s});break;case"right":a.push({x:t.x-s,y:t.y-s},{x:t.x-s,y:t.y+s});break}return a}function FS(t){const{top:r,right:s,bottom:a,left:l}=t;return[{x:l,y:r},{x:s,y:r},{x:s,y:a},{x:l,y:a}]}function $S(t,r){const{x:s,y:a}=t;let l=!1;for(let d=0,p=r.length-1;d<r.length;p=d++){const h=r[d],y=r[p],v=h.x,g=h.y,w=y.x,b=y.y;g>a!=b>a&&s<(w-v)*(a-g)/(b-g)+v&&(l=!l)}return l}function zS(t){const r=t.slice();return r.sort((s,a)=>s.x<a.x?-1:s.x>a.x?1:s.y<a.y?-1:s.y>a.y?1:0),US(r)}function US(t){if(t.length<=1)return t.slice();const r=[];for(let a=0;a<t.length;a++){const l=t[a];for(;r.length>=2;){const d=r[r.length-1],p=r[r.length-2];if((d.x-p.x)*(l.y-p.y)>=(d.y-p.y)*(l.x-p.x))r.pop();else break}r.push(l)}r.pop();const s=[];for(let a=t.length-1;a>=0;a--){const l=t[a];for(;s.length>=2;){const d=s[s.length-1],p=s[s.length-2];if((d.x-p.x)*(l.y-p.y)>=(d.y-p.y)*(l.x-p.x))s.pop();else break}s.push(l)}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 HS=cg,BS=dg,WS=fg,gg=pg;const KS=HS,VS=BS,QS=WS,vg=m.forwardRef(({className:t,sideOffset:r=4,...s},a)=>c.jsx(gg,{ref:a,sideOffset:r,className:Le("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}));vg.displayName=gg.displayName;var Hi="Collapsible",[GS]=Ln(Hi),[qS,uc]=GS(Hi),yg=m.forwardRef((t,r)=>{const{__scopeCollapsible:s,open:a,defaultOpen:l,disabled:d,onOpenChange:p,...h}=t,[y,v]=Ko({prop:a,defaultProp:l??!1,onChange:p,caller:Hi});return c.jsx(qS,{scope:s,disabled:d,contentId:$o(),open:y,onOpenToggle:m.useCallback(()=>v(g=>!g),[v]),children:c.jsx(Re.div,{"data-state":dc(y),"data-disabled":d?"":void 0,...h,ref:r})})});yg.displayName=Hi;var xg="CollapsibleTrigger",wg=m.forwardRef((t,r)=>{const{__scopeCollapsible:s,...a}=t,l=uc(xg,s);return c.jsx(Re.button,{type:"button","aria-controls":l.contentId,"aria-expanded":l.open||!1,"data-state":dc(l.open),"data-disabled":l.disabled?"":void 0,disabled:l.disabled,...a,ref:r,onClick:ce(t.onClick,l.onOpenToggle)})});wg.displayName=xg;var cc="CollapsibleContent",bg=m.forwardRef((t,r)=>{const{forceMount:s,...a}=t,l=uc(cc,t.__scopeCollapsible);return c.jsx(Fn,{present:s||l.open,children:({present:d})=>c.jsx(YS,{...a,ref:r,present:d})})});bg.displayName=cc;var YS=m.forwardRef((t,r)=>{const{__scopeCollapsible:s,present:a,children:l,...d}=t,p=uc(cc,s),[h,y]=m.useState(a),v=m.useRef(null),g=He(r,v),w=m.useRef(0),b=w.current,k=m.useRef(0),N=k.current,S=p.open||h,C=m.useRef(S),_=m.useRef(void 0);return m.useEffect(()=>{const A=requestAnimationFrame(()=>C.current=!1);return()=>cancelAnimationFrame(A)},[]),Qt(()=>{const A=v.current;if(A){_.current=_.current||{transitionDuration:A.style.transitionDuration,animationName:A.style.animationName},A.style.transitionDuration="0s",A.style.animationName="none";const O=A.getBoundingClientRect();w.current=O.height,k.current=O.width,C.current||(A.style.transitionDuration=_.current.transitionDuration,A.style.animationName=_.current.animationName),y(a)}},[p.open,a]),c.jsx(Re.div,{"data-state":dc(p.open),"data-disabled":p.disabled?"":void 0,id:p.contentId,hidden:!S,...d,ref:g,style:{"--radix-collapsible-content-height":b?`${b}px`:void 0,"--radix-collapsible-content-width":N?`${N}px`:void 0,...t.style},children:S&&l})});function dc(t){return t?"open":"closed"}var Sg=yg,Cg=wg,Eg=bg;function XS(t){const r=t.split("/");if(r.length!==2||!r[0]||!r[1])return`https://github.com/${t}`;const[s,a]=r;return`https://github.com/${encodeURIComponent(s)}/${encodeURIComponent(a)}`}function ZS(t,r){return t!==null?t:r===0}const ch="onboarding-panel-dismissed-v2",nu={claude:"Claude",codex:"Codex",gemini:"Gemini"},dh=[{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 fh(t){return t.claude||t.codex||t.gemini}function JS(t){return Object.entries(t).filter(([,r])=>r).map(([r])=>r)}function eC(t){const r=t.repos.filter(w=>w.accessible),s=t.repos.filter(w=>!w.accessible),a=r.filter(w=>fh(w.codeReviews)),l=r.filter(w=>!fh(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:a.length>0?`Detected an AI review workflow in ${a.length} repo${a.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:a.length>0}],p=d.filter(w=>w.complete).length,h=d.filter(w=>!w.complete),y=[...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,g=h.length>0?`${p} of ${d.length} complete`:`${s.length} access issue${s.length===1?"":"s"}`;return{accessibleRepos:r,hasIssues:v,inaccessibleRepos:s,reposMissingReview:l,reposWithReview:a,steps:d,pendingSteps:h,completedCount:p,dismissalKey:y,summary:g}}function ru({children:t}){return c.jsx("code",{className:"rounded border border-border bg-muted/30 px-1 py-0.5 text-[11px] font-mono",children:t})}function ph({number:t,children:r}){return c.jsxs("div",{className:"flex gap-2.5",children:[c.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}),c.jsx("div",{className:"flex-1 text-[12px] leading-relaxed",children:r})]})}function tC({step:t,index:r,children:s}){return c.jsx("div",{className:`border px-3 py-3 ${t.complete?"border-border bg-background/60":"border-warning-border bg-warning-muted"}`,children:c.jsxs("div",{className:"flex gap-3",children:[c.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}),c.jsxs("div",{className:"min-w-0 flex-1 space-y-1.5",children:[c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c.jsx("span",{className:"text-[11px] font-medium uppercase tracking-wider",children:t.title}),c.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"})]}),c.jsx("p",{className:"text-[12px] text-muted-foreground",children:t.description}),s]})]})})}function nC(){const[t,r]=m.useState(()=>typeof window>"u"?null:window.localStorage.getItem(ch)),[s,a]=m.useState(!0),{data:l,isLoading:d}=dt({queryKey:["/api/onboarding/status"],refetchInterval:3e4}),{data:p}=dt({queryKey:["/api/config"]}),h=ct({mutationFn:async({repo:O,tool:I})=>(await nt("POST","/api/onboarding/install-review",{repo:O,tool:I})).json(),onSuccess:(O,I)=>{we.invalidateQueries({queryKey:["/api/onboarding/status"]}),Vt({description:`${nu[I.tool]} review workflow installed for ${I.repo}.`})},onError:O=>{Vt({variant:"destructive",description:`Could not install review workflow: ${O.message}`})}});if(d||!l)return null;const{accessibleRepos:y,completedCount:v,dismissalKey:g,hasIssues:w,inaccessibleRepos:b,reposMissingReview:k,reposWithReview:N,steps:S,summary:C}=eC(l),A=(p?.codingAgent??"claude")==="codex"?["codex","claude"]:["claude","codex"];return!w||t===g?null:c.jsxs("div",{className:"shrink-0 border-b border-border bg-muted/35",children:[c.jsxs("div",{className:"flex items-center justify-between px-4 py-2",children:[c.jsxs("button",{onClick:()=>a(!s),className:"flex items-center gap-2 text-left",children:[c.jsx("span",{className:"h-1.5 w-1.5 shrink-0 rounded-full bg-foreground"}),c.jsx("span",{className:"text-[11px] font-medium uppercase tracking-wider",children:"Getting started"}),c.jsx("span",{className:"text-[11px] text-muted-foreground",children:C}),c.jsx("span",{className:"text-[10px] text-muted-foreground",children:s?"▲":"▼"})]}),c.jsx("button",{onClick:()=>{typeof window<"u"&&window.localStorage.setItem(ch,g),r(g)},className:"text-[10px] uppercase tracking-wider text-muted-foreground transition-colors hover:text-foreground",children:"dismiss"})]}),s&&c.jsxs("div",{className:"border-t border-border px-4 py-4 space-y-4",children:[c.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[c.jsx("div",{className:"text-[11px] uppercase tracking-wider text-muted-foreground",children:"Setup checklist"}),c.jsxs("div",{className:"text-[11px] text-muted-foreground",children:[v," of ",S.length," complete"]})]}),c.jsx("div",{className:"space-y-3",children:S.map((O,I)=>c.jsxs(tC,{step:O,index:I+1,children:[O.id==="github"&&!O.complete&&c.jsxs("div",{className:"space-y-2 pt-1",children:[l.githubError&&c.jsx("p",{className:"text-[12px] text-destructive",children:l.githubError}),c.jsxs("div",{className:"space-y-1.5 text-[12px] text-muted-foreground",children:[c.jsxs(ph,{number:1,children:["Run ",c.jsx(ru,{children:"gh auth login"})," on this machine, or set ",c.jsx(ru,{children:"GITHUB_TOKEN"})," before starting the app."]}),c.jsxs(ph,{number:2,children:["Prefer the built-in token list if you want the app to remember it. Open ",c.jsx(An,{href:"/settings",className:"underline underline-offset-2",children:"settings"})," to paste a Personal Access Token."]})]})]}),O.id==="repo"&&!O.complete&&c.jsxs("div",{className:"pt-1 text-[12px] text-muted-foreground",children:["The left sidebar is the real entry point. Use ",c.jsx("span",{className:"text-foreground",children:"Add"})," for a PR URL or ",c.jsx("span",{className:"text-foreground",children:"Watch"})," for an ",c.jsx(ru,{children:"owner/repo"})," slug, then choose whether that watched repo should track only your PRs or your whole team."]}),O.id==="workflow"&&!O.complete&&y.length>0&&c.jsxs("div",{className:"space-y-2 pt-1",children:[c.jsxs("div",{className:"space-y-2 border border-border bg-muted/40 px-3 py-2",children:[c.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."}),c.jsx("div",{className:"flex flex-wrap gap-x-3 gap-y-1 text-[11px]",children:dh.map(F=>c.jsx("a",{href:F.href,target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2 text-foreground/80 hover:text-foreground",children:F.label},F.href))})]}),k.map(F=>c.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:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("a",{href:`https://github.com/${F.repo}`,target:"_blank",rel:"noopener noreferrer",className:"block truncate text-[11px] font-medium underline underline-offset-2",children:F.repo}),c.jsx("p",{className:"text-[11px] text-muted-foreground",children:"No AI review workflow detected yet."})]}),c.jsx("div",{className:"flex flex-wrap gap-2",children:A.map(L=>{const U=h.isPending&&h.variables?.repo===F.repo&&h.variables?.tool===L;return c.jsx("button",{type:"button",onClick:()=>h.mutate({repo:F.repo,tool:L}),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:U?"Installing…":`Install ${nu[L]}`},`${F.repo}-${L}`)})})]},F.repo))]}),O.id==="workflow"&&O.complete&&N.length>0&&c.jsxs("div",{className:"space-y-2 pt-1",children:[c.jsxs("div",{className:"space-y-2 border border-border bg-muted/40 px-3 py-2",children:[c.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."}),c.jsx("div",{className:"flex flex-wrap gap-x-3 gap-y-1 text-[11px]",children:dh.map(F=>c.jsx("a",{href:F.href,target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2 text-foreground/80 hover:text-foreground",children:F.label},F.href))})]}),c.jsx("div",{className:"flex flex-wrap gap-2",children:N.map(F=>{const L=JS(F.codeReviews).map(U=>nu[U]).join(" + ");return c.jsxs("span",{className:"border border-border px-2 py-0.5 text-[10px] uppercase tracking-wider text-muted-foreground",children:[F.repo," · ",L]},F.repo)})})]})]},O.id))}),b.length>0&&c.jsxs("div",{className:"space-y-3 border border-destructive/30 bg-destructive/5 px-3 py-3",children:[c.jsx("div",{className:"text-[11px] font-medium uppercase tracking-wider text-destructive",children:"Repository access issues"}),c.jsx("div",{className:"space-y-2",children:b.map(O=>c.jsxs("div",{className:"space-y-1",children:[c.jsx("div",{className:"text-[11px] font-medium",children:c.jsx("a",{href:`https://github.com/${O.repo}`,target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2",children:O.repo})}),c.jsxs("p",{className:"text-[12px] text-destructive",children:["Cannot access this repository: ",O.error??"unknown error"]})]},O.repo))})]})]})]})}const hh="app-update-dismissed";function mh(t){return t.startsWith("v")?t:`v${t}`}function kg(t){return t.latestVersion?`app-update:${t.latestVersion}`:null}function rC(t,r){if(!t?.updateAvailable)return!1;const s=kg(t);return s!==null&&s!==r}function Bi(){const[t,r]=m.useState(()=>typeof window>"u"?null:window.sessionStorage.getItem(hh)),{data:s}=dt({queryKey:["/api/app-update"]});if(!s||!rC(s,t))return null;const a=kg(s);return!a||!s.latestVersion?null:c.jsx("div",{className:"shrink-0 border-b border-warning-border bg-warning-muted",children:c.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 px-4 py-2",children:[c.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-3 text-[12px]",children:[c.jsx("span",{className:"inline-block h-1.5 w-1.5 shrink-0 rounded-full bg-warning"}),c.jsx("span",{className:"font-medium uppercase tracking-wider text-warning-foreground",children:"Update available"}),c.jsx("span",{className:"text-foreground/75",children:`oh-my-pr ${mh(s.latestVersion)} is available. You're on ${mh(s.currentVersion)}.`})]}),c.jsxs("div",{className:"flex items-center gap-3 text-[11px]",children:[c.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"}),c.jsx("button",{onClick:()=>{typeof window<"u"&&window.sessionStorage.setItem(hh,a),r(a)},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 oC=m.createContext(void 0);function Ng(t){const r=m.useContext(oC);return t||r||"ltr"}var ou=0;function sC(){m.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??gh()),document.body.insertAdjacentElement("beforeend",t[1]??gh()),ou++,()=>{ou===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),ou--}},[])}function gh(){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 su="focusScope.autoFocusOnMount",iu="focusScope.autoFocusOnUnmount",vh={bubbles:!1,cancelable:!0},iC="FocusScope",Rg=m.forwardRef((t,r)=>{const{loop:s=!1,trapped:a=!1,onMountAutoFocus:l,onUnmountAutoFocus:d,...p}=t,[h,y]=m.useState(null),v=yt(l),g=yt(d),w=m.useRef(null),b=He(r,S=>y(S)),k=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(a){let S=function(O){if(k.paused||!h)return;const I=O.target;h.contains(I)?w.current=I:On(w.current,{select:!0})},C=function(O){if(k.paused||!h)return;const I=O.relatedTarget;I!==null&&(h.contains(I)||On(w.current,{select:!0}))},_=function(O){if(document.activeElement===document.body)for(const F of O)F.removedNodes.length>0&&On(h)};document.addEventListener("focusin",S),document.addEventListener("focusout",C);const A=new MutationObserver(_);return h&&A.observe(h,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",C),A.disconnect()}}},[a,h,k.paused]),m.useEffect(()=>{if(h){xh.add(k);const S=document.activeElement;if(!h.contains(S)){const _=new CustomEvent(su,vh);h.addEventListener(su,v),h.dispatchEvent(_),_.defaultPrevented||(aC(fC(Pg(h)),{select:!0}),document.activeElement===S&&On(h))}return()=>{h.removeEventListener(su,v),setTimeout(()=>{const _=new CustomEvent(iu,vh);h.addEventListener(iu,g),h.dispatchEvent(_),_.defaultPrevented||On(S??document.body,{select:!0}),h.removeEventListener(iu,g),xh.remove(k)},0)}}},[h,v,g,k]);const N=m.useCallback(S=>{if(!s&&!a||k.paused)return;const C=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,_=document.activeElement;if(C&&_){const A=S.currentTarget,[O,I]=lC(A);O&&I?!S.shiftKey&&_===I?(S.preventDefault(),s&&On(O,{select:!0})):S.shiftKey&&_===O&&(S.preventDefault(),s&&On(I,{select:!0})):_===A&&S.preventDefault()}},[s,a,k.paused]);return c.jsx(Re.div,{tabIndex:-1,...p,ref:b,onKeyDown:N})});Rg.displayName=iC;function aC(t,{select:r=!1}={}){const s=document.activeElement;for(const a of t)if(On(a,{select:r}),document.activeElement!==s)return}function lC(t){const r=Pg(t),s=yh(r,t),a=yh(r.reverse(),t);return[s,a]}function Pg(t){const r=[],s=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{const l=a.tagName==="INPUT"&&a.type==="hidden";return a.disabled||a.hidden||l?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;s.nextNode();)r.push(s.currentNode);return r}function yh(t,r){for(const s of t)if(!uC(s,{upTo:r}))return s}function uC(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 On(t,{select:r=!1}={}){if(t&&t.focus){const s=document.activeElement;t.focus({preventScroll:!0}),t!==s&&cC(t)&&r&&t.select()}}var xh=dC();function dC(){let t=[];return{add(r){const s=t[0];r!==s&&s?.pause(),t=wh(t,r),t.unshift(r)},remove(r){t=wh(t,r),t[0]?.resume()}}}function wh(t,r){const s=[...t],a=s.indexOf(r);return a!==-1&&s.splice(a,1),s}function fC(t){return t.filter(r=>r.tagName!=="A")}var au="rovingFocusGroup.onEntryFocus",pC={bubbles:!1,cancelable:!0},Go="RovingFocusGroup",[Ou,jg,hC]=Qu(Go),[mC,Tg]=Ln(Go,[hC]),[gC,vC]=mC(Go),_g=m.forwardRef((t,r)=>c.jsx(Ou.Provider,{scope:t.__scopeRovingFocusGroup,children:c.jsx(Ou.Slot,{scope:t.__scopeRovingFocusGroup,children:c.jsx(yC,{...t,ref:r})})}));_g.displayName=Go;var yC=m.forwardRef((t,r)=>{const{__scopeRovingFocusGroup:s,orientation:a,loop:l=!1,dir:d,currentTabStopId:p,defaultCurrentTabStopId:h,onCurrentTabStopIdChange:y,onEntryFocus:v,preventScrollOnEntryFocus:g=!1,...w}=t,b=m.useRef(null),k=He(r,b),N=Ng(d),[S,C]=Ko({prop:p,defaultProp:h??null,onChange:y,caller:Go}),[_,A]=m.useState(!1),O=yt(v),I=jg(s),F=m.useRef(!1),[L,U]=m.useState(0);return m.useEffect(()=>{const q=b.current;if(q)return q.addEventListener(au,O),()=>q.removeEventListener(au,O)},[O]),c.jsx(gC,{scope:s,orientation:a,dir:N,loop:l,currentTabStopId:S,onItemFocus:m.useCallback(q=>C(q),[C]),onItemShiftTab:m.useCallback(()=>A(!0),[]),onFocusableItemAdd:m.useCallback(()=>U(q=>q+1),[]),onFocusableItemRemove:m.useCallback(()=>U(q=>q-1),[]),children:c.jsx(Re.div,{tabIndex:_||L===0?-1:0,"data-orientation":a,...w,ref:k,style:{outline:"none",...t.style},onMouseDown:ce(t.onMouseDown,()=>{F.current=!0}),onFocus:ce(t.onFocus,q=>{const te=!F.current;if(q.target===q.currentTarget&&te&&!_){const ne=new CustomEvent(au,pC);if(q.currentTarget.dispatchEvent(ne),!ne.defaultPrevented){const se=I().filter(ee=>ee.focusable),Y=se.find(ee=>ee.active),ae=se.find(ee=>ee.id===S),me=[Y,ae,...se].filter(Boolean).map(ee=>ee.ref.current);Mg(me,g)}}F.current=!1}),onBlur:ce(t.onBlur,()=>A(!1))})})}),Og="RovingFocusGroupItem",Ag=m.forwardRef((t,r)=>{const{__scopeRovingFocusGroup:s,focusable:a=!0,active:l=!1,tabStopId:d,children:p,...h}=t,y=$o(),v=d||y,g=vC(Og,s),w=g.currentTabStopId===v,b=jg(s),{onFocusableItemAdd:k,onFocusableItemRemove:N,currentTabStopId:S}=g;return m.useEffect(()=>{if(a)return k(),()=>N()},[a,k,N]),c.jsx(Ou.ItemSlot,{scope:s,id:v,focusable:a,active:l,children:c.jsx(Re.span,{tabIndex:w?0:-1,"data-orientation":g.orientation,...h,ref:r,onMouseDown:ce(t.onMouseDown,C=>{a?g.onItemFocus(v):C.preventDefault()}),onFocus:ce(t.onFocus,()=>g.onItemFocus(v)),onKeyDown:ce(t.onKeyDown,C=>{if(C.key==="Tab"&&C.shiftKey){g.onItemShiftTab();return}if(C.target!==C.currentTarget)return;const _=bC(C,g.orientation,g.dir);if(_!==void 0){if(C.metaKey||C.ctrlKey||C.altKey||C.shiftKey)return;C.preventDefault();let O=b().filter(I=>I.focusable).map(I=>I.ref.current);if(_==="last")O.reverse();else if(_==="prev"||_==="next"){_==="prev"&&O.reverse();const I=O.indexOf(C.currentTarget);O=g.loop?SC(O,I+1):O.slice(I+1)}setTimeout(()=>Mg(O))}}),children:typeof p=="function"?p({isCurrentTabStop:w,hasTabStop:S!=null}):p})})});Ag.displayName=Og;var xC={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function wC(t,r){return r!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function bC(t,r,s){const a=wC(t.key,s);if(!(r==="vertical"&&["ArrowLeft","ArrowRight"].includes(a))&&!(r==="horizontal"&&["ArrowUp","ArrowDown"].includes(a)))return xC[a]}function Mg(t,r=!1){const s=document.activeElement;for(const a of t)if(a===s||(a.focus({preventScroll:r}),document.activeElement!==s))return}function SC(t,r){return t.map((s,a)=>t[(r+a)%t.length])}var CC=_g,EC=Ag;function kC(t){const r=NC(t),s=m.forwardRef((a,l)=>{const{children:d,...p}=a,h=m.Children.toArray(d),y=h.find(PC);if(y){const v=y.props.children,g=h.map(w=>w===y?m.Children.count(v)>1?m.Children.only(null):m.isValidElement(v)?v.props.children:null:w);return c.jsx(r,{...p,ref:l,children:m.isValidElement(v)?m.cloneElement(v,void 0,g):null})}return c.jsx(r,{...p,ref:l,children:d})});return s.displayName=`${t}.Slot`,s}function NC(t){const r=m.forwardRef((s,a)=>{const{children:l,...d}=s;if(m.isValidElement(l)){const p=TC(l),h=jC(d,l.props);return l.type!==m.Fragment&&(h.ref=a?zr(a,p):p),m.cloneElement(l,h)}return m.Children.count(l)>1?m.Children.only(null):null});return r.displayName=`${t}.SlotClone`,r}var RC=Symbol("radix.slottable");function PC(t){return m.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===RC}function jC(t,r){const s={...r};for(const a in r){const l=t[a],d=r[a];/^on[A-Z]/.test(a)?l&&d?s[a]=(...h)=>{const y=d(...h);return l(...h),y}:l&&(s[a]=l):a==="style"?s[a]={...l,...d}:a==="className"&&(s[a]=[l,d].filter(Boolean).join(" "))}return{...t,...s}}function TC(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 _C=function(t){if(typeof document>"u")return null;var r=Array.isArray(t)?t[0]:t;return r.ownerDocument.body},_r=new WeakMap,di=new WeakMap,fi={},lu=0,Ig=function(t){return t&&(t.host||Ig(t.parentNode))},OC=function(t,r){return r.map(function(s){if(t.contains(s))return s;var a=Ig(s);return a&&t.contains(a)?a:(console.error("aria-hidden",s,"in not contained inside",t,". Doing nothing"),null)}).filter(function(s){return!!s})},AC=function(t,r,s,a){var l=OC(r,Array.isArray(t)?t:[t]);fi[s]||(fi[s]=new WeakMap);var d=fi[s],p=[],h=new Set,y=new Set(l),v=function(w){!w||h.has(w)||(h.add(w),v(w.parentNode))};l.forEach(v);var g=function(w){!w||y.has(w)||Array.prototype.forEach.call(w.children,function(b){if(h.has(b))g(b);else try{var k=b.getAttribute(a),N=k!==null&&k!=="false",S=(_r.get(b)||0)+1,C=(d.get(b)||0)+1;_r.set(b,S),d.set(b,C),p.push(b),S===1&&N&&di.set(b,!0),C===1&&b.setAttribute(s,"true"),N||b.setAttribute(a,"true")}catch(_){console.error("aria-hidden: cannot operate on ",b,_)}})};return g(r),h.clear(),lu++,function(){p.forEach(function(w){var b=_r.get(w)-1,k=d.get(w)-1;_r.set(w,b),d.set(w,k),b||(di.has(w)||w.removeAttribute(a),di.delete(w)),k||w.removeAttribute(s)}),lu--,lu||(_r=new WeakMap,_r=new WeakMap,di=new WeakMap,fi={})}},MC=function(t,r,s){s===void 0&&(s="data-aria-hidden");var a=Array.from(Array.isArray(t)?t:[t]),l=_C(t);return l?(a.push.apply(a,Array.from(l.querySelectorAll("[aria-live], script"))),AC(a,l,s,"aria-hidden")):function(){return null}},Bt=function(){return Bt=Object.assign||function(r){for(var s,a=1,l=arguments.length;a<l;a++){s=arguments[a];for(var d in s)Object.prototype.hasOwnProperty.call(s,d)&&(r[d]=s[d])}return r},Bt.apply(this,arguments)};function Dg(t,r){var s={};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&r.indexOf(a)<0&&(s[a]=t[a]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,a=Object.getOwnPropertySymbols(t);l<a.length;l++)r.indexOf(a[l])<0&&Object.prototype.propertyIsEnumerable.call(t,a[l])&&(s[a[l]]=t[a[l]]);return s}function IC(t,r,s){if(s||arguments.length===2)for(var a=0,l=r.length,d;a<l;a++)(d||!(a in r))&&(d||(d=Array.prototype.slice.call(r,0,a)),d[a]=r[a]);return t.concat(d||Array.prototype.slice.call(r))}var yi="right-scroll-bar-position",xi="width-before-scroll-bar",DC="with-scroll-bars-hidden",LC="--removed-body-scroll-bar-size";function uu(t,r){return typeof t=="function"?t(r):t&&(t.current=r),t}function FC(t,r){var s=m.useState(function(){return{value:t,callback:r,facade:{get current(){return s.value},set current(a){var l=s.value;l!==a&&(s.value=a,s.callback(a,l))}}}})[0];return s.callback=r,s.facade}var $C=typeof window<"u"?m.useLayoutEffect:m.useEffect,bh=new WeakMap;function zC(t,r){var s=FC(null,function(a){return t.forEach(function(l){return uu(l,a)})});return $C(function(){var a=bh.get(s);if(a){var l=new Set(a),d=new Set(t),p=s.current;l.forEach(function(h){d.has(h)||uu(h,null)}),d.forEach(function(h){l.has(h)||uu(h,p)})}bh.set(s,t)},[t]),s}function UC(t){return t}function HC(t,r){r===void 0&&(r=UC);var s=[],a=!1,l={read:function(){if(a)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,a);return s.push(p),function(){s=s.filter(function(h){return h!==p})}},assignSyncMedium:function(d){for(a=!0;s.length;){var p=s;s=[],p.forEach(d)}s={push:function(h){return d(h)},filter:function(){return s}}},assignMedium:function(d){a=!0;var p=[];if(s.length){var h=s;s=[],h.forEach(d),p=s}var y=function(){var g=p;p=[],g.forEach(d)},v=function(){return Promise.resolve().then(y)};v(),s={push:function(g){p.push(g),v()},filter:function(g){return p=p.filter(g),s}}}};return l}function BC(t){t===void 0&&(t={});var r=HC(null);return r.options=Bt({async:!0,ssr:!1},t),r}var Lg=function(t){var r=t.sideCar,s=Dg(t,["sideCar"]);if(!r)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var a=r.read();if(!a)throw new Error("Sidecar medium not found");return m.createElement(a,Bt({},s))};Lg.isSideCarExport=!0;function WC(t,r){return t.useMedium(r),Lg}var Fg=BC(),cu=function(){},Wi=m.forwardRef(function(t,r){var s=m.useRef(null),a=m.useState({onScrollCapture:cu,onWheelCapture:cu,onTouchMoveCapture:cu}),l=a[0],d=a[1],p=t.forwardProps,h=t.children,y=t.className,v=t.removeScrollBar,g=t.enabled,w=t.shards,b=t.sideCar,k=t.noRelative,N=t.noIsolation,S=t.inert,C=t.allowPinchZoom,_=t.as,A=_===void 0?"div":_,O=t.gapMode,I=Dg(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),F=b,L=zC([s,r]),U=Bt(Bt({},I),l);return m.createElement(m.Fragment,null,g&&m.createElement(F,{sideCar:Fg,removeScrollBar:v,shards:w,noRelative:k,noIsolation:N,inert:S,setCallbacks:d,allowPinchZoom:!!C,lockRef:s,gapMode:O}),p?m.cloneElement(m.Children.only(h),Bt(Bt({},U),{ref:L})):m.createElement(A,Bt({},U,{className:y,ref:L}),h))});Wi.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Wi.classNames={fullWidth:xi,zeroRight:yi};var KC=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function VC(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var r=KC();return r&&t.setAttribute("nonce",r),t}function QC(t,r){t.styleSheet?t.styleSheet.cssText=r:t.appendChild(document.createTextNode(r))}function GC(t){var r=document.head||document.getElementsByTagName("head")[0];r.appendChild(t)}var qC=function(){var t=0,r=null;return{add:function(s){t==0&&(r=VC())&&(QC(r,s),GC(r)),t++},remove:function(){t--,!t&&r&&(r.parentNode&&r.parentNode.removeChild(r),r=null)}}},YC=function(){var t=qC();return function(r,s){m.useEffect(function(){return t.add(r),function(){t.remove()}},[r&&s])}},$g=function(){var t=YC(),r=function(s){var a=s.styles,l=s.dynamic;return t(a,l),null};return r},XC={left:0,top:0,right:0,gap:0},du=function(t){return parseInt(t||"",10)||0},ZC=function(t){var r=window.getComputedStyle(document.body),s=r[t==="padding"?"paddingLeft":"marginLeft"],a=r[t==="padding"?"paddingTop":"marginTop"],l=r[t==="padding"?"paddingRight":"marginRight"];return[du(s),du(a),du(l)]},JC=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return XC;var r=ZC(t),s=document.documentElement.clientWidth,a=window.innerWidth;return{left:r[0],top:r[1],right:r[2],gap:Math.max(0,a-s+r[2]-r[0])}},eE=$g(),Dr="data-scroll-locked",tE=function(t,r,s,a){var l=t.left,d=t.top,p=t.right,h=t.gap;return s===void 0&&(s="margin"),`
9
9
  .`.concat(DC,` {
10
10
  overflow: hidden `).concat(a,`;
11
11
  padding-right: `).concat(h,"px ").concat(a,`;
@@ -42,7 +42,7 @@ Error generating stack: `+f.message+`
42
42
  body[`).concat(Dr,`] {
43
43
  `).concat(LC,": ").concat(h,`px;
44
44
  }
45
- `)},bh=function(){var t=parseInt(document.body.getAttribute(Dr)||"0",10);return isFinite(t)?t:0},nE=function(){m.useEffect(function(){return document.body.setAttribute(Dr,(bh()+1).toString()),function(){var t=bh()-1;t<=0?document.body.removeAttribute(Dr):document.body.setAttribute(Dr,t.toString())}},[])},rE=function(t){var r=t.noRelative,s=t.noImportant,a=t.gapMode,l=a===void 0?"margin":a;nE();var d=m.useMemo(function(){return JC(l)},[l]);return m.createElement(eE,{styles:tE(d,!r,l,s?"":"!important")})},Ou=!1;if(typeof window<"u")try{var pi=Object.defineProperty({},"passive",{get:function(){return Ou=!0,!0}});window.addEventListener("test",pi,pi),window.removeEventListener("test",pi,pi)}catch{Ou=!1}var Or=Ou?{passive:!1}:!1,oE=function(t){return t.tagName==="TEXTAREA"},zg=function(t,r){if(!(t instanceof Element))return!1;var s=window.getComputedStyle(t);return s[r]!=="hidden"&&!(s.overflowY===s.overflowX&&!oE(t)&&s[r]==="visible")},sE=function(t){return zg(t,"overflowY")},iE=function(t){return zg(t,"overflowX")},Sh=function(t,r){var s=r.ownerDocument,a=r;do{typeof ShadowRoot<"u"&&a instanceof ShadowRoot&&(a=a.host);var l=Ug(t,a);if(l){var d=Hg(t,a),p=d[1],h=d[2];if(p>h)return!0}a=a.parentNode}while(a&&a!==s.body);return!1},aE=function(t){var r=t.scrollTop,s=t.scrollHeight,a=t.clientHeight;return[r,s,a]},lE=function(t){var r=t.scrollLeft,s=t.scrollWidth,a=t.clientWidth;return[r,s,a]},Ug=function(t,r){return t==="v"?sE(r):iE(r)},Hg=function(t,r){return t==="v"?aE(r):lE(r)},uE=function(t,r){return t==="h"&&r==="rtl"?-1:1},cE=function(t,r,s,a,l){var d=uE(t,window.getComputedStyle(r).direction),p=d*a,h=s.target,y=r.contains(h),v=!1,g=p>0,w=0,b=0;do{if(!h)break;var k=Hg(t,h),N=k[0],S=k[1],C=k[2],_=S-C-d*N;(N||_)&&Ug(t,h)&&(w+=_,b+=N);var A=h.parentNode;h=A&&A.nodeType===Node.DOCUMENT_FRAGMENT_NODE?A.host:A}while(!y&&h!==document.body||y&&(r.contains(h)||r===h));return(g&&Math.abs(w)<1||!g&&Math.abs(b)<1)&&(v=!0),v},hi=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},Ch=function(t){return[t.deltaX,t.deltaY]},Eh=function(t){return t&&"current"in t?t.current:t},dE=function(t,r){return t[0]===r[0]&&t[1]===r[1]},fE=function(t){return`
45
+ `)},Sh=function(){var t=parseInt(document.body.getAttribute(Dr)||"0",10);return isFinite(t)?t:0},nE=function(){m.useEffect(function(){return document.body.setAttribute(Dr,(Sh()+1).toString()),function(){var t=Sh()-1;t<=0?document.body.removeAttribute(Dr):document.body.setAttribute(Dr,t.toString())}},[])},rE=function(t){var r=t.noRelative,s=t.noImportant,a=t.gapMode,l=a===void 0?"margin":a;nE();var d=m.useMemo(function(){return JC(l)},[l]);return m.createElement(eE,{styles:tE(d,!r,l,s?"":"!important")})},Au=!1;if(typeof window<"u")try{var pi=Object.defineProperty({},"passive",{get:function(){return Au=!0,!0}});window.addEventListener("test",pi,pi),window.removeEventListener("test",pi,pi)}catch{Au=!1}var Or=Au?{passive:!1}:!1,oE=function(t){return t.tagName==="TEXTAREA"},zg=function(t,r){if(!(t instanceof Element))return!1;var s=window.getComputedStyle(t);return s[r]!=="hidden"&&!(s.overflowY===s.overflowX&&!oE(t)&&s[r]==="visible")},sE=function(t){return zg(t,"overflowY")},iE=function(t){return zg(t,"overflowX")},Ch=function(t,r){var s=r.ownerDocument,a=r;do{typeof ShadowRoot<"u"&&a instanceof ShadowRoot&&(a=a.host);var l=Ug(t,a);if(l){var d=Hg(t,a),p=d[1],h=d[2];if(p>h)return!0}a=a.parentNode}while(a&&a!==s.body);return!1},aE=function(t){var r=t.scrollTop,s=t.scrollHeight,a=t.clientHeight;return[r,s,a]},lE=function(t){var r=t.scrollLeft,s=t.scrollWidth,a=t.clientWidth;return[r,s,a]},Ug=function(t,r){return t==="v"?sE(r):iE(r)},Hg=function(t,r){return t==="v"?aE(r):lE(r)},uE=function(t,r){return t==="h"&&r==="rtl"?-1:1},cE=function(t,r,s,a,l){var d=uE(t,window.getComputedStyle(r).direction),p=d*a,h=s.target,y=r.contains(h),v=!1,g=p>0,w=0,b=0;do{if(!h)break;var k=Hg(t,h),N=k[0],S=k[1],C=k[2],_=S-C-d*N;(N||_)&&Ug(t,h)&&(w+=_,b+=N);var A=h.parentNode;h=A&&A.nodeType===Node.DOCUMENT_FRAGMENT_NODE?A.host:A}while(!y&&h!==document.body||y&&(r.contains(h)||r===h));return(g&&Math.abs(w)<1||!g&&Math.abs(b)<1)&&(v=!0),v},hi=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},Eh=function(t){return[t.deltaX,t.deltaY]},kh=function(t){return t&&"current"in t?t.current:t},dE=function(t,r){return t[0]===r[0]&&t[1]===r[1]},fE=function(t){return`
46
46
  .block-interactivity-`.concat(t,` {pointer-events: none;}
47
47
  .allow-interactivity-`).concat(t,` {pointer-events: all;}
48
- `)},pE=0,Ar=[];function hE(t){var r=m.useRef([]),s=m.useRef([0,0]),a=m.useRef(),l=m.useState(pE++)[0],d=m.useState($g)[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(l));var S=IC([t.lockRef.current],(t.shards||[]).map(Eh),!0).filter(Boolean);return S.forEach(function(C){return C.classList.add("allow-interactivity-".concat(l))}),function(){document.body.classList.remove("block-interactivity-".concat(l)),S.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(l))})}}},[t.inert,t.lockRef.current,t.shards]);var h=m.useCallback(function(S,C){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!p.current.allowPinchZoom;var _=hi(S),A=s.current,O="deltaX"in S?S.deltaX:A[0]-_[0],I="deltaY"in S?S.deltaY:A[1]-_[1],F,L=S.target,U=Math.abs(O)>Math.abs(I)?"h":"v";if("touches"in S&&U==="h"&&L.type==="range")return!1;var q=window.getSelection(),te=q&&q.anchorNode,ne=te?te===L||te.contains(L):!1;if(ne)return!1;var se=Sh(U,L);if(!se)return!0;if(se?F=U:(F=U==="v"?"h":"v",se=Sh(U,L)),!se)return!1;if(!a.current&&"changedTouches"in S&&(O||I)&&(a.current=F),!F)return!0;var Y=a.current||F;return cE(Y,C,S,Y==="h"?O:I)},[]),y=m.useCallback(function(S){var C=S;if(!(!Ar.length||Ar[Ar.length-1]!==d)){var _="deltaY"in C?Ch(C):hi(C),A=r.current.filter(function(F){return F.name===C.type&&(F.target===C.target||C.target===F.shadowParent)&&dE(F.delta,_)})[0];if(A&&A.should){C.cancelable&&C.preventDefault();return}if(!A){var O=(p.current.shards||[]).map(Eh).filter(Boolean).filter(function(F){return F.contains(C.target)}),I=O.length>0?h(C,O[0]):!p.current.noIsolation;I&&C.cancelable&&C.preventDefault()}}},[]),v=m.useCallback(function(S,C,_,A){var O={name:S,delta:C,target:_,should:A,shadowParent:mE(_)};r.current.push(O),setTimeout(function(){r.current=r.current.filter(function(I){return I!==O})},1)},[]),g=m.useCallback(function(S){s.current=hi(S),a.current=void 0},[]),w=m.useCallback(function(S){v(S.type,Ch(S),S.target,h(S,t.lockRef.current))},[]),b=m.useCallback(function(S){v(S.type,hi(S),S.target,h(S,t.lockRef.current))},[]);m.useEffect(function(){return Ar.push(d),t.setCallbacks({onScrollCapture:w,onWheelCapture:w,onTouchMoveCapture:b}),document.addEventListener("wheel",y,Or),document.addEventListener("touchmove",y,Or),document.addEventListener("touchstart",g,Or),function(){Ar=Ar.filter(function(S){return S!==d}),document.removeEventListener("wheel",y,Or),document.removeEventListener("touchmove",y,Or),document.removeEventListener("touchstart",g,Or)}},[]);var k=t.removeScrollBar,N=t.inert;return m.createElement(m.Fragment,null,N?m.createElement(d,{styles:fE(l)}):null,k?m.createElement(rE,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function mE(t){for(var r=null;t!==null;)t instanceof ShadowRoot&&(r=t.host,t=t.host),t=t.parentNode;return r}const gE=WC(Fg,hE);var Bg=m.forwardRef(function(t,r){return m.createElement(Wi,Ht({},t,{ref:r,sideCar:gE}))});Bg.classNames=Wi.classNames;var Au=["Enter"," "],vE=["ArrowDown","PageUp","Home"],Wg=["ArrowUp","PageDown","End"],yE=[...vE,...Wg],xE={ltr:[...Au,"ArrowRight"],rtl:[...Au,"ArrowLeft"]},wE={ltr:["ArrowLeft"],rtl:["ArrowRight"]},qo="Menu",[Ho,bE,SE]=Vu(qo),[rr,Kg]=Ln(qo,[SE,Fi,Tg]),Ki=Fi(),Vg=Tg(),[CE,or]=rr(qo),[EE,Yo]=rr(qo),Qg=t=>{const{__scopeMenu:r,open:s=!1,children:a,dir:l,onOpenChange:d,modal:p=!0}=t,h=Ki(r),[y,v]=m.useState(null),g=m.useRef(!1),w=yt(d),b=Ng(l);return m.useEffect(()=>{const k=()=>{g.current=!0,document.addEventListener("pointerdown",N,{capture:!0,once:!0}),document.addEventListener("pointermove",N,{capture:!0,once:!0})},N=()=>g.current=!1;return document.addEventListener("keydown",k,{capture:!0}),()=>{document.removeEventListener("keydown",k,{capture:!0}),document.removeEventListener("pointerdown",N,{capture:!0}),document.removeEventListener("pointermove",N,{capture:!0})}},[]),c.jsx(sg,{...h,children:c.jsx(CE,{scope:r,open:s,onOpenChange:w,content:y,onContentChange:v,children:c.jsx(EE,{scope:r,onClose:m.useCallback(()=>w(!1),[w]),isUsingKeyboardRef:g,dir:b,modal:p,children:a})})})};Qg.displayName=qo;var kE="MenuAnchor",dc=m.forwardRef((t,r)=>{const{__scopeMenu:s,...a}=t,l=Ki(s);return c.jsx(ig,{...l,...a,ref:r})});dc.displayName=kE;var fc="MenuPortal",[NE,Gg]=rr(fc,{forceMount:void 0}),qg=t=>{const{__scopeMenu:r,forceMount:s,children:a,container:l}=t,d=or(fc,r);return c.jsx(NE,{scope:r,forceMount:s,children:c.jsx(Fn,{present:s||d.open,children:c.jsx(Gu,{asChild:!0,container:l,children:a})})})};qg.displayName=fc;var Nt="MenuContent",[RE,pc]=rr(Nt),Yg=m.forwardRef((t,r)=>{const s=Gg(Nt,t.__scopeMenu),{forceMount:a=s.forceMount,...l}=t,d=or(Nt,t.__scopeMenu),p=Yo(Nt,t.__scopeMenu);return c.jsx(Ho.Provider,{scope:t.__scopeMenu,children:c.jsx(Fn,{present:a||d.open,children:c.jsx(Ho.Slot,{scope:t.__scopeMenu,children:p.modal?c.jsx(PE,{...l,ref:r}):c.jsx(jE,{...l,ref:r})})})})}),PE=m.forwardRef((t,r)=>{const s=or(Nt,t.__scopeMenu),a=m.useRef(null),l=He(r,a);return m.useEffect(()=>{const d=a.current;if(d)return MC(d)},[]),c.jsx(hc,{...t,ref:l,trapFocus:s.open,disableOutsidePointerEvents:s.open,disableOutsideScroll:!0,onFocusOutside:ce(t.onFocusOutside,d=>d.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>s.onOpenChange(!1)})}),jE=m.forwardRef((t,r)=>{const s=or(Nt,t.__scopeMenu);return c.jsx(hc,{...t,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>s.onOpenChange(!1)})}),TE=kC("MenuContent.ScrollLock"),hc=m.forwardRef((t,r)=>{const{__scopeMenu:s,loop:a=!1,trapFocus:l,onOpenAutoFocus:d,onCloseAutoFocus:p,disableOutsidePointerEvents:h,onEntryFocus:y,onEscapeKeyDown:v,onPointerDownOutside:g,onFocusOutside:w,onInteractOutside:b,onDismiss:k,disableOutsideScroll:N,...S}=t,C=or(Nt,s),_=Yo(Nt,s),A=Ki(s),O=Vg(s),I=bE(s),[F,L]=m.useState(null),U=m.useRef(null),q=He(r,U,C.onContentChange),te=m.useRef(0),ne=m.useRef(""),se=m.useRef(0),Y=m.useRef(null),ae=m.useRef("right"),G=m.useRef(0),me=N?Bg:m.Fragment,ee=N?{as:TE,allowPinchZoom:!0}:void 0,ie=z=>{const V=ne.current+z,T=I().filter(he=>!he.disabled),H=document.activeElement,de=T.find(he=>he.ref.current===H)?.textValue,pe=T.map(he=>he.textValue),xe=HE(pe,V,de),ve=T.find(he=>he.textValue===xe)?.ref.current;(function he(be){ne.current=be,window.clearTimeout(te.current),be!==""&&(te.current=window.setTimeout(()=>he(""),1e3))})(V),ve&&setTimeout(()=>ve.focus())};m.useEffect(()=>()=>window.clearTimeout(te.current),[]),sC();const P=m.useCallback(z=>ae.current===Y.current?.side&&WE(z,Y.current?.area),[]);return c.jsx(RE,{scope:s,searchRef:ne,onItemEnter:m.useCallback(z=>{P(z)&&z.preventDefault()},[P]),onItemLeave:m.useCallback(z=>{P(z)||(U.current?.focus(),L(null))},[P]),onTriggerLeave:m.useCallback(z=>{P(z)&&z.preventDefault()},[P]),pointerGraceTimerRef:se,onPointerGraceIntentChange:m.useCallback(z=>{Y.current=z},[]),children:c.jsx(me,{...ee,children:c.jsx(Rg,{asChild:!0,trapped:l,onMountAutoFocus:ce(d,z=>{z.preventDefault(),U.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:p,children:c.jsx(_i,{asChild:!0,disableOutsidePointerEvents:h,onEscapeKeyDown:v,onPointerDownOutside:g,onFocusOutside:w,onInteractOutside:b,onDismiss:k,children:c.jsx(CC,{asChild:!0,...O,dir:_.dir,orientation:"vertical",loop:a,currentTabStopId:F,onCurrentTabStopIdChange:L,onEntryFocus:ce(y,z=>{_.isUsingKeyboardRef.current||z.preventDefault()}),preventScrollOnEntryFocus:!0,children:c.jsx(ag,{role:"menu","aria-orientation":"vertical","data-state":fv(C.open),"data-radix-menu-content":"",dir:_.dir,...A,...S,ref:q,style:{outline:"none",...S.style},onKeyDown:ce(S.onKeyDown,z=>{const T=z.target.closest("[data-radix-menu-content]")===z.currentTarget,H=z.ctrlKey||z.altKey||z.metaKey,de=z.key.length===1;T&&(z.key==="Tab"&&z.preventDefault(),!H&&de&&ie(z.key));const pe=U.current;if(z.target!==pe||!yE.includes(z.key))return;z.preventDefault();const ve=I().filter(he=>!he.disabled).map(he=>he.ref.current);Wg.includes(z.key)&&ve.reverse(),zE(ve)}),onBlur:ce(t.onBlur,z=>{z.currentTarget.contains(z.target)||(window.clearTimeout(te.current),ne.current="")}),onPointerMove:ce(t.onPointerMove,Bo(z=>{const V=z.target,T=G.current!==z.clientX;if(z.currentTarget.contains(V)&&T){const H=z.clientX>G.current?"right":"left";ae.current=H,G.current=z.clientX}}))})})})})})})});Yg.displayName=Nt;var _E="MenuGroup",mc=m.forwardRef((t,r)=>{const{__scopeMenu:s,...a}=t;return c.jsx(Re.div,{role:"group",...a,ref:r})});mc.displayName=_E;var OE="MenuLabel",Xg=m.forwardRef((t,r)=>{const{__scopeMenu:s,...a}=t;return c.jsx(Re.div,{...a,ref:r})});Xg.displayName=OE;var Ni="MenuItem",kh="menu.itemSelect",Vi=m.forwardRef((t,r)=>{const{disabled:s=!1,onSelect:a,...l}=t,d=m.useRef(null),p=Yo(Ni,t.__scopeMenu),h=pc(Ni,t.__scopeMenu),y=He(r,d),v=m.useRef(!1),g=()=>{const w=d.current;if(!s&&w){const b=new CustomEvent(kh,{bubbles:!0,cancelable:!0});w.addEventListener(kh,k=>a?.(k),{once:!0}),Qu(w,b),b.defaultPrevented?v.current=!1:p.onClose()}};return c.jsx(Zg,{...l,ref:y,disabled:s,onClick:ce(t.onClick,g),onPointerDown:w=>{t.onPointerDown?.(w),v.current=!0},onPointerUp:ce(t.onPointerUp,w=>{v.current||w.currentTarget?.click()}),onKeyDown:ce(t.onKeyDown,w=>{const b=h.searchRef.current!=="";s||b&&w.key===" "||Au.includes(w.key)&&(w.currentTarget.click(),w.preventDefault())})})});Vi.displayName=Ni;var Zg=m.forwardRef((t,r)=>{const{__scopeMenu:s,disabled:a=!1,textValue:l,...d}=t,p=pc(Ni,s),h=Vg(s),y=m.useRef(null),v=He(r,y),[g,w]=m.useState(!1),[b,k]=m.useState("");return m.useEffect(()=>{const N=y.current;N&&k((N.textContent??"").trim())},[d.children]),c.jsx(Ho.ItemSlot,{scope:s,disabled:a,textValue:l??b,children:c.jsx(EC,{asChild:!0,...h,focusable:!a,children:c.jsx(Re.div,{role:"menuitem","data-highlighted":g?"":void 0,"aria-disabled":a||void 0,"data-disabled":a?"":void 0,...d,ref:v,onPointerMove:ce(t.onPointerMove,Bo(N=>{a?p.onItemLeave(N):(p.onItemEnter(N),N.defaultPrevented||N.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ce(t.onPointerLeave,Bo(N=>p.onItemLeave(N))),onFocus:ce(t.onFocus,()=>w(!0)),onBlur:ce(t.onBlur,()=>w(!1))})})})}),AE="MenuCheckboxItem",Jg=m.forwardRef((t,r)=>{const{checked:s=!1,onCheckedChange:a,...l}=t;return c.jsx(ov,{scope:t.__scopeMenu,checked:s,children:c.jsx(Vi,{role:"menuitemcheckbox","aria-checked":Ri(s)?"mixed":s,...l,ref:r,"data-state":vc(s),onSelect:ce(l.onSelect,()=>a?.(Ri(s)?!0:!s),{checkForDefaultPrevented:!1})})})});Jg.displayName=AE;var ev="MenuRadioGroup",[ME,IE]=rr(ev,{value:void 0,onValueChange:()=>{}}),tv=m.forwardRef((t,r)=>{const{value:s,onValueChange:a,...l}=t,d=yt(a);return c.jsx(ME,{scope:t.__scopeMenu,value:s,onValueChange:d,children:c.jsx(mc,{...l,ref:r})})});tv.displayName=ev;var nv="MenuRadioItem",rv=m.forwardRef((t,r)=>{const{value:s,...a}=t,l=IE(nv,t.__scopeMenu),d=s===l.value;return c.jsx(ov,{scope:t.__scopeMenu,checked:d,children:c.jsx(Vi,{role:"menuitemradio","aria-checked":d,...a,ref:r,"data-state":vc(d),onSelect:ce(a.onSelect,()=>l.onValueChange?.(s),{checkForDefaultPrevented:!1})})})});rv.displayName=nv;var gc="MenuItemIndicator",[ov,DE]=rr(gc,{checked:!1}),sv=m.forwardRef((t,r)=>{const{__scopeMenu:s,forceMount:a,...l}=t,d=DE(gc,s);return c.jsx(Fn,{present:a||Ri(d.checked)||d.checked===!0,children:c.jsx(Re.span,{...l,ref:r,"data-state":vc(d.checked)})})});sv.displayName=gc;var LE="MenuSeparator",iv=m.forwardRef((t,r)=>{const{__scopeMenu:s,...a}=t;return c.jsx(Re.div,{role:"separator","aria-orientation":"horizontal",...a,ref:r})});iv.displayName=LE;var FE="MenuArrow",av=m.forwardRef((t,r)=>{const{__scopeMenu:s,...a}=t,l=Ki(s);return c.jsx(lg,{...l,...a,ref:r})});av.displayName=FE;var $E="MenuSub",[IN,lv]=rr($E),Do="MenuSubTrigger",uv=m.forwardRef((t,r)=>{const s=or(Do,t.__scopeMenu),a=Yo(Do,t.__scopeMenu),l=lv(Do,t.__scopeMenu),d=pc(Do,t.__scopeMenu),p=m.useRef(null),{pointerGraceTimerRef:h,onPointerGraceIntentChange:y}=d,v={__scopeMenu:t.__scopeMenu},g=m.useCallback(()=>{p.current&&window.clearTimeout(p.current),p.current=null},[]);return m.useEffect(()=>g,[g]),m.useEffect(()=>{const w=h.current;return()=>{window.clearTimeout(w),y(null)}},[h,y]),c.jsx(dc,{asChild:!0,...v,children:c.jsx(Zg,{id:l.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":l.contentId,"data-state":fv(s.open),...t,ref:zr(r,l.onTriggerChange),onClick:w=>{t.onClick?.(w),!(t.disabled||w.defaultPrevented)&&(w.currentTarget.focus(),s.open||s.onOpenChange(!0))},onPointerMove:ce(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),g()},100))})),onPointerLeave:ce(t.onPointerLeave,Bo(w=>{g();const b=s.content?.getBoundingClientRect();if(b){const k=s.content?.dataset.side,N=k==="right",S=N?-5:5,C=b[N?"left":"right"],_=b[N?"right":"left"];d.onPointerGraceIntentChange({area:[{x:w.clientX+S,y:w.clientY},{x:C,y:b.top},{x:_,y:b.top},{x:_,y:b.bottom},{x:C,y:b.bottom}],side:k}),window.clearTimeout(h.current),h.current=window.setTimeout(()=>d.onPointerGraceIntentChange(null),300)}else{if(d.onTriggerLeave(w),w.defaultPrevented)return;d.onPointerGraceIntentChange(null)}})),onKeyDown:ce(t.onKeyDown,w=>{const b=d.searchRef.current!=="";t.disabled||b&&w.key===" "||xE[a.dir].includes(w.key)&&(s.onOpenChange(!0),s.content?.focus(),w.preventDefault())})})})});uv.displayName=Do;var cv="MenuSubContent",dv=m.forwardRef((t,r)=>{const s=Gg(Nt,t.__scopeMenu),{forceMount:a=s.forceMount,...l}=t,d=or(Nt,t.__scopeMenu),p=Yo(Nt,t.__scopeMenu),h=lv(cv,t.__scopeMenu),y=m.useRef(null),v=He(r,y);return c.jsx(Ho.Provider,{scope:t.__scopeMenu,children:c.jsx(Fn,{present:a||d.open,children:c.jsx(Ho.Slot,{scope:t.__scopeMenu,children:c.jsx(hc,{id:h.contentId,"aria-labelledby":h.triggerId,...l,ref:v,align:"start",side:p.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:g=>{p.isUsingKeyboardRef.current&&y.current?.focus(),g.preventDefault()},onCloseAutoFocus:g=>g.preventDefault(),onFocusOutside:ce(t.onFocusOutside,g=>{g.target!==h.trigger&&d.onOpenChange(!1)}),onEscapeKeyDown:ce(t.onEscapeKeyDown,g=>{p.onClose(),g.preventDefault()}),onKeyDown:ce(t.onKeyDown,g=>{const w=g.currentTarget.contains(g.target),b=wE[p.dir].includes(g.key);w&&b&&(d.onOpenChange(!1),h.trigger?.focus(),g.preventDefault())})})})})})});dv.displayName=cv;function fv(t){return t?"open":"closed"}function Ri(t){return t==="indeterminate"}function vc(t){return Ri(t)?"indeterminate":t?"checked":"unchecked"}function zE(t){const r=document.activeElement;for(const s of t)if(s===r||(s.focus(),document.activeElement!==r))return}function UE(t,r){return t.map((s,a)=>t[(r+a)%t.length])}function HE(t,r,s){const l=r.length>1&&Array.from(r).every(v=>v===r[0])?r[0]:r,d=s?t.indexOf(s):-1;let p=UE(t,Math.max(d,0));l.length===1&&(p=p.filter(v=>v!==s));const y=p.find(v=>v.toLowerCase().startsWith(l.toLowerCase()));return y!==s?y:void 0}function BE(t,r){const{x:s,y:a}=t;let l=!1;for(let d=0,p=r.length-1;d<r.length;p=d++){const h=r[d],y=r[p],v=h.x,g=h.y,w=y.x,b=y.y;g>a!=b>a&&s<(w-v)*(a-g)/(b-g)+v&&(l=!l)}return l}function WE(t,r){if(!r)return!1;const s={x:t.clientX,y:t.clientY};return BE(s,r)}function Bo(t){return r=>r.pointerType==="mouse"?t(r):void 0}var KE=Qg,VE=dc,QE=qg,GE=Yg,qE=mc,YE=Xg,XE=Vi,ZE=Jg,JE=tv,ek=rv,tk=sv,nk=iv,rk=av,ok=uv,sk=dv,Qi="DropdownMenu",[ik]=Ln(Qi,[Kg]),rt=Kg(),[ak,pv]=ik(Qi),hv=t=>{const{__scopeDropdownMenu:r,children:s,dir:a,open:l,defaultOpen:d,onOpenChange:p,modal:h=!0}=t,y=rt(r),v=m.useRef(null),[g,w]=Ko({prop:l,defaultProp:d??!1,onChange:p,caller:Qi});return c.jsx(ak,{scope:r,triggerId:$o(),triggerRef:v,contentId:$o(),open:g,onOpenChange:w,onOpenToggle:m.useCallback(()=>w(b=>!b),[w]),modal:h,children:c.jsx(KE,{...y,open:g,onOpenChange:w,dir:a,modal:h,children:s})})};hv.displayName=Qi;var mv="DropdownMenuTrigger",gv=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,disabled:a=!1,...l}=t,d=pv(mv,s),p=rt(s);return c.jsx(VE,{asChild:!0,...p,children:c.jsx(Re.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":a?"":void 0,disabled:a,...l,ref:zr(r,d.triggerRef),onPointerDown:ce(t.onPointerDown,h=>{!a&&h.button===0&&h.ctrlKey===!1&&(d.onOpenToggle(),d.open||h.preventDefault())}),onKeyDown:ce(t.onKeyDown,h=>{a||(["Enter"," "].includes(h.key)&&d.onOpenToggle(),h.key==="ArrowDown"&&d.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(h.key)&&h.preventDefault())})})})});gv.displayName=mv;var lk="DropdownMenuPortal",vv=t=>{const{__scopeDropdownMenu:r,...s}=t,a=rt(r);return c.jsx(QE,{...a,...s})};vv.displayName=lk;var yv="DropdownMenuContent",xv=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...a}=t,l=pv(yv,s),d=rt(s),p=m.useRef(!1);return c.jsx(GE,{id:l.contentId,"aria-labelledby":l.triggerId,...d,...a,ref:r,onCloseAutoFocus:ce(t.onCloseAutoFocus,h=>{p.current||l.triggerRef.current?.focus(),p.current=!1,h.preventDefault()}),onInteractOutside:ce(t.onInteractOutside,h=>{const y=h.detail.originalEvent,v=y.button===0&&y.ctrlKey===!0,g=y.button===2||v;(!l.modal||g)&&(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)"}})});xv.displayName=yv;var uk="DropdownMenuGroup",ck=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...a}=t,l=rt(s);return c.jsx(qE,{...l,...a,ref:r})});ck.displayName=uk;var dk="DropdownMenuLabel",wv=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...a}=t,l=rt(s);return c.jsx(YE,{...l,...a,ref:r})});wv.displayName=dk;var fk="DropdownMenuItem",bv=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...a}=t,l=rt(s);return c.jsx(XE,{...l,...a,ref:r})});bv.displayName=fk;var pk="DropdownMenuCheckboxItem",Sv=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...a}=t,l=rt(s);return c.jsx(ZE,{...l,...a,ref:r})});Sv.displayName=pk;var hk="DropdownMenuRadioGroup",mk=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...a}=t,l=rt(s);return c.jsx(JE,{...l,...a,ref:r})});mk.displayName=hk;var gk="DropdownMenuRadioItem",Cv=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...a}=t,l=rt(s);return c.jsx(ek,{...l,...a,ref:r})});Cv.displayName=gk;var vk="DropdownMenuItemIndicator",Ev=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...a}=t,l=rt(s);return c.jsx(tk,{...l,...a,ref:r})});Ev.displayName=vk;var yk="DropdownMenuSeparator",kv=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...a}=t,l=rt(s);return c.jsx(nk,{...l,...a,ref:r})});kv.displayName=yk;var xk="DropdownMenuArrow",wk=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...a}=t,l=rt(s);return c.jsx(rk,{...l,...a,ref:r})});wk.displayName=xk;var bk="DropdownMenuSubTrigger",Nv=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...a}=t,l=rt(s);return c.jsx(ok,{...l,...a,ref:r})});Nv.displayName=bk;var Sk="DropdownMenuSubContent",Rv=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...a}=t,l=rt(s);return c.jsx(sk,{...l,...a,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)"}})});Rv.displayName=Sk;var Ck=hv,Ek=gv,kk=vv,Pv=xv,jv=wv,Tv=bv,_v=Sv,Ov=Cv,Av=Ev,Mv=kv,Iv=Nv,Dv=Rv;const Nk=Ck,Rk=Ek,Pk=m.forwardRef(({className:t,inset:r,children:s,...a},l)=>c.jsxs(Iv,{ref:l,className:Le("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),...a,children:[s,c.jsx(C0,{className:"ml-auto"})]}));Pk.displayName=Iv.displayName;const jk=m.forwardRef(({className:t,...r},s)=>c.jsx(Dv,{ref:s,className:Le("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}));jk.displayName=Dv.displayName;const Lv=m.forwardRef(({className:t,sideOffset:r=4,...s},a)=>c.jsx(kk,{children:c.jsx(Pv,{ref:a,sideOffset:r,className:Le("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})}));Lv.displayName=Pv.displayName;const Tk=m.forwardRef(({className:t,inset:r,...s},a)=>c.jsx(Tv,{ref:a,className:Le("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}));Tk.displayName=Tv.displayName;const _k=m.forwardRef(({className:t,children:r,checked:s,...a},l)=>c.jsxs(_v,{ref:l,className:Le("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,...a,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(Av,{children:c.jsx(S0,{className:"h-4 w-4"})})}),r]}));_k.displayName=_v.displayName;const Ok=m.forwardRef(({className:t,children:r,...s},a)=>c.jsxs(Ov,{ref:a,className:Le("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:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(Av,{children:c.jsx(k0,{className:"h-2 w-2 fill-current"})})}),r]}));Ok.displayName=Ov.displayName;const Ak=m.forwardRef(({className:t,inset:r,...s},a)=>c.jsx(jv,{ref:a,className:Le("px-2 py-1.5 text-sm font-semibold",r&&"pl-8",t),...s}));Ak.displayName=jv.displayName;const Mk=m.forwardRef(({className:t,...r},s)=>c.jsx(Mv,{ref:s,className:Le("-mx-1 my-1 h-px bg-muted",t),...r}));Mk.displayName=Mv.displayName;function Ik(t){return t.replace("_"," ").toUpperCase()}function Dk(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 Fv(t){return t==="resolved"||t==="rejected"}function Lk(t){return Fv(t)||t==="warning"}function $v(t){return t.length===0?!1:t.every(r=>Fv(r.status))}function Wo(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 Fk={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"},$k={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:[]},zk={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"},Uk={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 Hk(t){return Fk[t]}function Bk(t){return $k[t]}function Nh(t){return t==="pause"?"Pause":t==="resume"?"Resume":t==="retry"?"Retry":"Cancel"}function Wk(t){return zk[t]}function Kk(t){return Uk[t]}function Vk(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 Qk(t){return t?t.blockedReason??t.escalationReason??t.latestFingerprint??null:null}function Gk(t,r){const s=t.filter(a=>a.prId===r);return s.length===0?null:s.reduce((a,l)=>l.updatedAt>a.updatedAt?l:a)}function qk(t,r){return Gk(t,r)}function Yk(t,r){return{stateLabel:Hk(t.state),tone:Wk(t.state),attemptSummary:Vk(t),reasonSummary:Qk(t),statusHint:Kk(t.state),actions:Bk(t.state).map(s=>({label:Nh(s),available:!0,hint:`${Nh(s)} controls are planned but not wired to the backend yet.`}))}}function Wt(t){return t?new Date(t).toLocaleTimeString("en-US",{hour12:!1}):null}function zv(t){return t.watchEnabled}function Uv(t){return t==="processing"?"autonomous run active":t==="done"?"completed":t==="error"?"attention needed":t==="archived"?"archived":"watching"}function Xk(t){return`${Math.max(1,Math.round((t??12e4)/1e3))}s`}const Zk=[{value:"mine",label:"My PRs only"},{value:"team",label:"My PRs + teammates"}],Jk={inProgress:[],queued:[],generatedAt:""},fu=200;function eN(t){return t===!1?"team":"mine"}const Rh={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 Hv({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 c.jsx("span",{className:`inline-block h-1.5 w-1.5 shrink-0 ${r}`})}function tN({status:t}){const r=Dk(t);return c.jsx("span",{className:`inline-block border px-1.5 py-0 text-[11px] uppercase tracking-wide ${r}`,children:Ik(t)})}function Mu(){return c.jsx("span",{className:"border border-border px-1.5 py-0 text-[10px] uppercase tracking-wider text-muted-foreground",children:"watch paused"})}function Ph({value:t,onChange:r,disabled:s,name:a,testIdPrefix:l,compact:d=!1}){return c.jsx("div",{role:"radiogroup","aria-label":"Automatic PR tracking scope",className:`flex flex-wrap gap-1 ${d?"":"mt-1"}`,children:Zk.map(p=>{const h=t===p.value;return c.jsxs("label",{"data-testid":`${l}-${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:[c.jsx("input",{type:"radio",name:a,value:p.value,checked:h,onChange:()=>r(p.value),disabled:s,className:"sr-only"}),p.label]},p.value)})})}function nN({activity:t}){const r=t.status==="in_progress"?Wt(t.startedAt)??Wt(t.updatedAt):Wt(t.availableAt)??Wt(t.queuedAt),s=c.jsxs("div",{className:"flex min-w-0 items-start gap-2 px-2 py-1.5 text-left",children:[c.jsx("span",{className:`mt-1.5 h-1.5 w-1.5 shrink-0 ${t.status==="in_progress"?"animate-pulse bg-foreground":"bg-muted-foreground"}`}),c.jsxs("span",{className:"min-w-0 flex-1",children:[c.jsx("span",{className:"block truncate text-[12px] leading-4 text-foreground",children:t.label}),t.detail&&c.jsx("span",{className:"block truncate text-[11px] leading-4 text-muted-foreground",children:t.detail})]}),r&&c.jsx("span",{className:"shrink-0 text-[10px] leading-4 text-muted-foreground",children:r})]});return t.targetUrl?c.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}):c.jsx("div",{children:s})}function jh({title:t,items:r,emptyLabel:s}){return c.jsxs("div",{className:"py-1",children:[c.jsx("div",{className:"px-2 py-1 text-[10px] uppercase tracking-wider text-muted-foreground",children:t}),r.length>0?c.jsx("div",{className:"max-h-52 overflow-y-auto",children:r.map(a=>c.jsx(nN,{activity:a},a.id))}):c.jsx("div",{className:"px-2 pb-2 text-[11px] text-muted-foreground",children:s})]})}function rN({activities:t}){const r=t.inProgress.length,s=t.queued.length,a=r+s;return c.jsxs(Nk,{children:[c.jsxs(Rk,{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:[c.jsx(b0,{className:"h-3 w-3","aria-hidden":"true"}),c.jsx("span",{children:"activity"}),c.jsx("span",{className:"text-foreground",children:a})]}),c.jsxs(Lv,{align:"end",className:"w-80 p-0",children:[c.jsxs("div",{className:"border-b border-border px-2 py-2",children:[c.jsx("div",{className:"text-[12px] font-medium",children:"Activities"}),c.jsxs("div",{className:"text-[11px] text-muted-foreground",children:[r," in progress / ",s," queued"]})]}),c.jsx(jh,{title:"In progress",items:t.inProgress,emptyLabel:"No activities running right now."}),c.jsx("div",{className:"border-t border-border"}),c.jsx(jh,{title:"Queued",items:t.queued,emptyLabel:"Queue is empty."})]})]})}function Bv({href:t,testId:r,label:s,hint:a,className:l,dotClassName:d,hintClassName:p,onClick:h}){return c.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 ${l}`,children:[c.jsx("span",{className:`inline-block rounded-full bg-success ${d}`}),s,a&&c.jsx("span",{className:p,children:a})]})}function Wv({pr:t}){const r=Wo(t.feedbackItems).inProgress;if(!(t.status==="processing")&&r===0)return null;const a=r>0?`${r} agent${r!==1?"s":""} running on this PR`:"Agent run active on this PR";return c.jsxs(VS,{children:[c.jsx(QS,{asChild:!0,children:c.jsxs("span",{className:"inline-flex shrink-0 cursor-default items-center gap-0.5 text-[12px]","data-testid":`agent-indicator-${t.id}`,children:[c.jsx("span",{className:"animate-pulse",children:"🤖"}),r>0&&c.jsx("span",{className:"text-[10px] text-muted-foreground",children:r})]})}),c.jsx(vg,{side:"top",children:c.jsx("p",{className:"text-xs",children:a})})]})}const oN=m.memo(function({pr:r,isSelected:s,onSelect:a}){const l=Wt(r.lastChecked),d=zv(r),h=!(r.status==="processing"||Wo(r.feedbackItems).inProgress>0)&&$v(r.feedbackItems);return c.jsx("div",{onClick:()=>a(r.id),onKeyDown:y=>{y.target===y.currentTarget&&(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),a(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:c.jsxs("div",{className:"flex items-start gap-3",children:[c.jsx(Hv,{status:r.status}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsxs("span",{className:"w-12 shrink-0 text-muted-foreground",children:["#",r.number]}),c.jsx("span",{className:"truncate",children:r.title}),c.jsx(Wv,{pr:r})]}),h&&c.jsx(Bv,{href:r.url,testId:`ready-to-merge-${r.id}`,label:"Ready to merge",hint:"— click to open PR",onClick:y=>y.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"}),c.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:[c.jsx("a",{href:r.url,target:"_blank",rel:"noopener noreferrer",onClick:y=>y.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}),c.jsx("span",{children:Uv(r.status)}),!d&&c.jsx(Mu,{}),r.feedbackItems.length>0&&(()=>{const y=Wo(r.feedbackItems),v=[];return y.queued>0&&v.push(`${y.queued}q`),y.inProgress>0&&v.push(`${y.inProgress} active`),y.failed>0&&v.push(`${y.failed} failed`),y.warning>0&&v.push(`${y.warning} warn`),v.length===0?c.jsxs("span",{children:[r.feedbackItems.length," items"]}):c.jsx("span",{children:v.join(" · ")})})(),l&&c.jsxs("span",{children:["checked ",l]})]})]})]})})});function sN({item:t,prId:r,readOnly:s}){const a=ct({mutationFn:async h=>(await nt("PATCH",`/api/prs/${r}/feedback/${t.id}`,{decision:h})).json(),onSuccess:()=>{we.invalidateQueries({queryKey:["/api/prs"]}),we.invalidateQueries({queryKey:["/api/prs",r]})}}),l=ct({mutationFn:async()=>(await nt("POST",`/api/prs/${r}/feedback/${t.id}/retry`)).json(),onSuccess:()=>{we.invalidateQueries({queryKey:["/api/prs"]}),we.invalidateQueries({queryKey:["/api/prs",r]}),we.invalidateQueries({queryKey:["/api/activities"]}),we.invalidateQueries({queryKey:["/api/logs"]})},onError:h=>{Ut("Could not retry feedback item",h)}}),d=Wt(t.createdAt),p=Lk(t.status);return c.jsxs(Sg,{defaultOpen:!p,className:"border-b border-border",children:[c.jsx("div",{className:"px-4 py-3",children:c.jsxs("div",{className:"flex items-start gap-3",children:[c.jsx("div",{className:"shrink-0 pt-0.5",children:c.jsx(tN,{status:t.status})}),c.jsx("div",{className:"min-w-0 flex-1",children:c.jsxs("div",{className:"mb-1 flex flex-wrap items-center gap-2",children:[c.jsx("span",{className:"font-medium",children:t.author}),t.file&&c.jsxs("span",{className:"text-[11px] text-muted-foreground",children:[t.file,t.line?`:${t.line}`:""]}),c.jsx("span",{className:"text-[11px] text-muted-foreground",children:t.type.replace("_"," ")}),d&&c.jsx("span",{className:"text-[11px] text-muted-foreground",children:d})]})}),c.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[!s&&(t.status==="failed"||t.status==="warning")&&c.jsx("button",{type:"button",onClick:()=>l.mutate(),disabled:l.isPending,"data-testid":`retry-${t.id}`,"aria-label":`Retry feedback from ${t.author}`,title:"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:"Retry"}),c.jsx(Cg,{asChild:!0,children:c.jsx("button",{type:"button","data-testid":`toggle-${t.id}`,"aria-label":`${p?"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(h=>c.jsx("button",{type:"button",onClick:()=>a.mutate(h),"data-testid":`override-${h}-${t.id}`,"aria-label":`${h} 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===h?"bg-foreground text-background":"border border-border text-muted-foreground"}`,children:h},h))]})]})}),c.jsx(Eg,{children:c.jsxs("div",{className:"px-4 pb-3",children:[t.bodyHtml?c.jsx("div",{className:"feedback-markdown text-[12px] leading-relaxed",dangerouslySetInnerHTML:{__html:t.bodyHtml}}):c.jsx("p",{className:"whitespace-pre-wrap text-[12px] leading-relaxed text-foreground/80",children:t.body}),(t.statusReason||t.decisionReason)&&c.jsx("p",{className:"mt-2 text-[11px] text-muted-foreground",children:t.statusReason||t.decisionReason})]})})]})}function iN({prId:t}){const r=m.useRef(null),{data:s=[]}=dt({queryKey:["/api/logs",t??"all"],queryFn:async()=>{const d=t?`/api/logs?prId=${encodeURIComponent(t)}`:"/api/logs";return(await nt("GET",d)).json()},refetchInterval:1500}),a=m.useMemo(()=>s.length>fu?s.slice(-fu):s,[s]),l=s.length-a.length;return m.useEffect(()=>{const d=r.current;d&&(d.scrollTop=d.scrollHeight)},[s.length,t]),c.jsx("div",{className:"flex h-full flex-col",children:c.jsx("div",{ref:r,className:"flex-1 overflow-y-auto p-4 font-mono text-[11px] leading-relaxed",children:s.length===0?c.jsx("span",{className:"text-muted-foreground",children:"No log entries."}):c.jsxs(c.Fragment,{children:[l>0&&c.jsxs("div",{className:"border-b border-border/60 pb-2 text-[10px] uppercase tracking-wider text-muted-foreground",children:["Showing latest ",fu," of ",s.length," entries."]}),a.map(d=>{const p=d.metadata&&Object.keys(d.metadata).length>0?JSON.stringify(d.metadata,null,2):null;return c.jsxs("div",{className:"border-b border-border/60 py-2 last:border-b-0","data-testid":`log-${d.id}`,children:[c.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-[10px] uppercase tracking-wider text-muted-foreground",children:[c.jsx("span",{children:Wt(d.timestamp)}),c.jsx("span",{className:d.level==="error"?"text-destructive":d.level==="warn"?"text-foreground/80":"text-foreground/55",children:d.level}),d.phase&&c.jsx("span",{className:"border border-border px-1 py-0",children:d.phase}),d.runId&&c.jsxs("span",{className:"normal-case text-foreground/45",children:["run ",d.runId.slice(0,8)]})]}),c.jsx("div",{className:"mt-1 break-words text-foreground/75",children:d.message}),p&&c.jsx("pre",{className:"mt-1 whitespace-pre-wrap break-all text-[10px] text-muted-foreground",children:p})]},d.id)})]})})})}function aN({pr:t,config:r,healingSessions:s}){const a=qk(s,t.id),l=a?Yk(a):null,d=l?Rh[l.tone]:Rh.neutral;return c.jsxs("div",{className:"shrink-0 border-b border-border px-4 py-3","data-testid":"panel-ci-healing",children:[c.jsxs("div",{className:"flex items-start justify-between gap-3",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground",children:"CI healing"}),c.jsx("div",{className:"mt-1 flex flex-wrap items-center gap-2",children:l?c.jsxs(c.Fragment,{children:[c.jsx("span",{className:`inline-flex border px-1.5 py-0.5 text-[11px] uppercase tracking-wider ${d}`,children:l.stateLabel}),c.jsx("span",{className:"text-[11px] text-muted-foreground",children:l.attemptSummary})]}):c.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."})})]}),a&&c.jsxs("span",{className:"shrink-0 text-[10px] text-muted-foreground",children:["head ",a.currentHeadSha.slice(0,7)]})]}),l?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"mt-2 grid gap-1 text-[11px] text-muted-foreground",children:[l.reasonSummary&&c.jsxs("div",{children:["Reason: ",l.reasonSummary]}),c.jsx("div",{children:l.statusHint}),c.jsxs("div",{children:["Attempts: ",l.attemptSummary,a?.latestFingerprint?` · fingerprint ${a.latestFingerprint}`:""]})]}),l.actions.length>0&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:l.actions.map(p=>c.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))}),c.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&&c.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 lN({prId:t}){const[r,s]=m.useState("ask");return c.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:[c.jsxs("div",{className:"flex border-b border-border",children:[c.jsx("button",{type:"button",onClick:()=>s("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 ${r==="ask"?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"}`,children:"Ask Agent"}),c.jsx("button",{type:"button",onClick:()=>s("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 ${r==="activity"?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"}`,children:"Activity"})]}),c.jsx("div",{className:"flex-1 overflow-hidden",children:r==="activity"?c.jsx(iN,{prId:t}):t?c.jsx(uN,{prId:t}):c.jsx("div",{className:"flex h-full items-center justify-center text-[12px] text-muted-foreground",children:"Select a PR to ask questions."})})]})}function uN({prId:t}){const[r,s]=m.useState(""),a=m.useRef(null),{data:l=[]}=dt({queryKey:["/api/prs",t,"questions"],refetchInterval:2e3}),d=ct({mutationFn:p=>nt("POST",`/api/prs/${t}/questions`,{question:p}).then(h=>h.json()),onSuccess:()=>{we.invalidateQueries({queryKey:["/api/prs",t,"questions"]}),we.invalidateQueries({queryKey:["/api/activities"]}),s("")}});return m.useEffect(()=>{const p=a.current;p&&(p.scrollTop=p.scrollHeight)},[l.length,l[l.length-1]?.status]),c.jsxs("div",{className:"flex h-full flex-col",children:[c.jsx("div",{className:"border-b border-border px-4 py-2 text-[11px] uppercase tracking-wider text-muted-foreground",children:"Ask Agent"}),c.jsx("div",{ref:a,className:"flex-1 overflow-y-auto p-4 space-y-3",children:l.length===0?c.jsx("span",{className:"text-[12px] text-muted-foreground",children:"Ask questions about this PR — the agent will read activity logs, feedback, and status to answer."}):l.map(p=>c.jsxs("div",{className:"space-y-1.5","data-testid":`question-${p.id}`,children:[c.jsxs("div",{className:"text-[12px]",children:[c.jsx("span",{className:"font-medium text-foreground/90",children:"Q: "}),c.jsx("span",{className:"text-foreground/80",children:p.question})]}),p.status==="pending"||p.status==="answering"?c.jsx("div",{className:"text-[11px] text-muted-foreground animate-pulse",children:"Agent is thinking..."}):p.status==="error"?c.jsxs("div",{className:"text-[11px] text-destructive",children:["Error: ",p.error||"Unknown error"]}):c.jsx("div",{className:"text-[12px] leading-relaxed text-foreground/75 whitespace-pre-wrap border-l-2 border-border pl-3",children:p.answer}),c.jsxs("div",{className:"text-[10px] text-muted-foreground",children:[Wt(p.createdAt),p.answeredAt&&` — answered ${Wt(p.answeredAt)}`]})]},p.id))}),c.jsxs("form",{onSubmit:p=>{p.preventDefault(),r.trim()&&!d.isPending&&d.mutate(r.trim())},className:"border-t border-border p-3",children:[c.jsxs("div",{className:"flex gap-2",children:[c.jsx("input",{type:"text",value:r,onChange:p=>s(p.target.value),placeholder:"Was the review done? Why did this fail?","aria-label":"Question for selected pull request","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"}),c.jsx("button",{type:"submit",disabled:d.isPending||!r.trim(),"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:d.isPending?"...":"Ask"})]}),d.isError&&c.jsx("div",{className:"mt-1 text-[11px] text-destructive",children:Kv(d.error)})]})]})}function Kv(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 Ut(t,r){Vt({variant:"destructive",title:t,description:Kv(r)})}function cN(){const[t,r]=m.useState(null),[s,a]=m.useState(""),[l,d]=m.useState(""),[p,h]=m.useState(null),[y,v]=m.useState("mine"),[g,w]=m.useState("active"),{data:b=[],isLoading:k}=dt({queryKey:["/api/prs"],refetchInterval:3e3}),{data:N=[],isLoading:S}=dt({queryKey:["/api/prs/archived"],refetchInterval:1e4}),{data:C}=dt({queryKey:["/api/config"],refetchInterval:5e3}),{data:_=[]}=dt({queryKey:["/api/healing-sessions"],queryFn:async()=>sb("/api/healing-sessions"),refetchInterval:5e3}),{data:A=Jk}=dt({queryKey:["/api/activities"],refetchInterval:3e3}),{data:O=[]}=dt({queryKey:["/api/repos/settings"],refetchInterval:5e3}),I=g==="active"?b:N,F=g==="archived";m.useEffect(()=>{if(I.length===0){t!==null&&r(null);return}(!t||!I.some(P=>P.id===t))&&r(I[0].id)},[I,t]);const L=I.find(P=>P.id===t)??null,U=L?zv(L):!0,q=ZS(p,O.length),te=ct({mutationFn:async P=>(await nt("POST","/api/prs",{url:P})).json(),onSuccess:P=>{we.invalidateQueries({queryKey:["/api/prs"]}),we.invalidateQueries({queryKey:["/api/activities"]}),we.invalidateQueries({queryKey:["/api/repos/settings"]}),we.invalidateQueries({queryKey:["/api/onboarding/status"]}),a(""),r(P.id)},onError:P=>{Ut("Could not add PR",P)}}),ne=ct({mutationFn:async P=>(await nt("POST",`/api/prs/${P}/apply`)).json(),onSuccess:()=>{we.invalidateQueries({queryKey:["/api/prs"]}),we.invalidateQueries({queryKey:["/api/activities"]}),we.invalidateQueries({queryKey:["/api/logs"]})},onError:P=>{Ut("Could not run babysitter",P)}}),se=ct({mutationFn:async({id:P,enabled:z})=>(await nt("PATCH",`/api/prs/${P}/watch`,{enabled:z})).json(),onSuccess:()=>{we.invalidateQueries({queryKey:["/api/prs"]}),we.invalidateQueries({queryKey:["/api/prs/archived"]}),we.invalidateQueries({queryKey:["/api/logs"]})},onError:P=>{Ut("Could not update PR watch state",P)}}),Y=ct({mutationFn:async P=>(await nt("PATCH","/api/config",P)).json(),onSuccess:()=>{we.invalidateQueries({queryKey:["/api/config"]}),we.invalidateQueries({queryKey:["/api/onboarding/status"]})},onError:P=>{Ut("Could not update settings",P)}}),ae=ct({mutationFn:async()=>(await nt("POST","/api/repos/sync")).json(),onSuccess:()=>{we.invalidateQueries({queryKey:["/api/prs"]}),we.invalidateQueries({queryKey:["/api/activities"]}),we.invalidateQueries({queryKey:["/api/repos/settings"]}),we.invalidateQueries({queryKey:["/api/onboarding/status"]})},onError:P=>{Ut("Could not sync repositories",P)}}),G=ct({mutationFn:async P=>(await nt("POST","/api/repos/release",{repo:P})).json(),onSuccess:()=>{we.invalidateQueries({queryKey:["/api/releases"]}),we.invalidateQueries({queryKey:["/api/activities"]}),Vt({description:"Release queued."})},onError:P=>{Ut("Could not create release",P)}}),me=async P=>(await nt("PATCH","/api/repos/settings",P)).json(),ee=ct({mutationFn:me,onSuccess:()=>{we.invalidateQueries({queryKey:["/api/repos/settings"]}),we.invalidateQueries({queryKey:["/api/onboarding/status"]})},onError:P=>{Ut("Could not update repository settings",P)}}),ie=ct({mutationFn:async({repo:P})=>(await nt("POST","/api/repos",{repo:P})).json(),onSuccess:async(P,z)=>{if(we.invalidateQueries({queryKey:["/api/repos/settings"]}),we.invalidateQueries({queryKey:["/api/prs"]}),we.invalidateQueries({queryKey:["/api/onboarding/status"]}),d(""),v("mine"),z.watchScope==="team")try{await me({repo:P.repo,ownPrsOnly:!1}),we.invalidateQueries({queryKey:["/api/repos/settings"]})}catch(V){Ut("Repository added, but could not update tracking scope",V)}},onError:P=>{Ut("Could not watch repository",P)}});return c.jsxs("div",{className:"flex min-h-screen flex-col lg:h-screen lg:overflow-hidden",children:[c.jsx(Bi,{}),c.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:[c.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[c.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-label":"oh-my-pr",children:[c.jsx("rect",{x:"1",y:"1",width:"14",height:"14",stroke:"currentColor",strokeWidth:"1.5"}),c.jsx("path",{d:"M4 5h8M4 8h5M4 11h6",stroke:"currentColor",strokeWidth:"1"})]}),c.jsx("span",{className:"text-sm font-medium tracking-tight",children:"oh-my-pr"}),c.jsx("span",{className:"border border-border px-1.5 py-0 text-[10px] uppercase tracking-wider text-muted-foreground",children:"autonomous"}),c.jsxs("span",{className:"text-[11px] text-muted-foreground",children:["poll ",Xk(C?.pollIntervalMs)]}),c.jsx(An,{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"}),c.jsx(An,{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"})]}),c.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[c.jsxs("span",{className:"text-[11px] text-muted-foreground",children:[b.length," PR",b.length!==1?"s":""," in ",O.length," repo",O.length!==1?"s":""]}),c.jsx("label",{htmlFor:"dashboard-coding-agent",className:"text-[11px] uppercase tracking-wider text-muted-foreground",children:"Agent"}),c.jsxs("select",{id:"dashboard-coding-agent",value:C?.codingAgent??"codex",onChange:P=>{const z=P.target.value;Y.mutate({codingAgent:z})},disabled:Y.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:[c.jsx("option",{value:"codex",children:"codex"}),c.jsx("option",{value:"claude",children:"claude"})]}),c.jsx(An,{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"}),c.jsx(rN,{activities:A})]})]}),c.jsx(nC,{}),c.jsxs("div",{className:"flex flex-1 flex-col overflow-y-auto lg:flex-row lg:overflow-hidden",children:[c.jsxs("div",{className:"flex max-h-[42vh] w-full shrink-0 flex-col border-b border-border lg:max-h-none lg:w-80 lg:border-b-0 lg:border-r",children:[c.jsxs("div",{className:"flex border-b border-border",children:[c.jsxs("button",{type:"button",onClick:()=>w("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 ${g==="active"?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"}`,children:["Active (",b.length,")"]}),c.jsxs("button",{type:"button",onClick:()=>w("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 ${g==="archived"?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"}`,children:["Archived (",N.length,")"]})]}),!F&&c.jsxs(c.Fragment,{children:[c.jsxs(Sg,{open:q,onOpenChange:h,className:"border-b border-border",children:[c.jsxs("div",{className:"flex items-center justify-between gap-2 px-3 py-2 text-[11px] text-muted-foreground",children:[c.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."}),c.jsx(Cg,{asChild:!0,children:c.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:q?"Hide":"Add"})})]}),c.jsxs(Eg,{children:[c.jsx("form",{onSubmit:P=>{P.preventDefault(),s.trim()&&te.mutate(s.trim())},className:"border-t border-border p-3",children:c.jsxs("div",{className:"flex gap-2",children:[c.jsx("input",{type:"text",value:s,onChange:P=>a(P.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"}),c.jsx("button",{type:"submit",disabled:te.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"})]})}),c.jsxs("form",{onSubmit:P=>{P.preventDefault();const z=l.trim();z&&ie.mutate({repo:z,watchScope:y})},className:"border-t border-border p-3",children:[c.jsxs("div",{className:"flex gap-2",children:[c.jsx("input",{type:"text",value:l,onChange:P=>d(P.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"}),c.jsx("button",{type:"submit",disabled:ie.isPending||!l.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"})]}),c.jsxs("div",{className:"mt-3",children:[c.jsx("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground",children:"Track automatically"}),c.jsx(Ph,{value:y,onChange:v,disabled:ie.isPending,name:"watch-scope",testIdPrefix:"watch-scope"})]})]})]})]}),c.jsxs("div",{className:"border-b border-border p-3",children:[c.jsxs("div",{className:"mb-1 flex items-center justify-between",children:[c.jsx("span",{className:"text-[10px] uppercase tracking-wider text-muted-foreground",children:"Tracked repositories"}),c.jsx("button",{type:"button",onClick:()=>ae.mutate(),disabled:ae.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:ae.isPending?"Fetching...":"Fetch"})]}),O.length===0?c.jsx("div",{className:"text-[11px] text-muted-foreground",children:"No repositories being watched yet."}):c.jsx("div",{className:"space-y-1 text-[12px]",children:O.map(P=>{const z=G.isPending&&G.variables===P.repo;return c.jsxs("div",{className:"space-y-2 border border-border/60 px-2 py-2",children:[c.jsx("a",{href:XS(P.repo),target:"_blank",rel:"noopener noreferrer","data-testid":`tracked-repo-${P.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:P.repo}),c.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-2",children:[c.jsxs("div",{children:[c.jsx("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground",children:"Track automatically"}),c.jsx(Ph,{value:eN(P.ownPrsOnly),onChange:V=>ee.mutate({repo:P.repo,ownPrsOnly:V==="mine"}),disabled:ee.isPending,name:`tracked-repo-scope-${P.repo}`,testIdPrefix:`tracked-repo-scope-${P.repo.replace("/","-")}`,compact:!0})]}),c.jsxs("div",{className:"flex shrink-0 flex-wrap items-center justify-end gap-2 self-end",children:[c.jsxs("label",{className:"flex items-center gap-1.5 text-[10px] uppercase tracking-wider text-muted-foreground",children:[c.jsx("input",{type:"checkbox",checked:P.autoCreateReleases,onChange:V=>ee.mutate({repo:P.repo,autoCreateReleases:V.target.checked}),disabled:ee.isPending,"data-testid":`tracked-repo-auto-release-${P.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"]}),c.jsx("button",{type:"button",onClick:()=>G.mutate(P.repo),disabled:G.isPending,"data-testid":`tracked-repo-manual-release-${P.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:z?"Releasing...":"Release"})]})]})]},P.repo)})})]})]}),c.jsx("div",{className:"flex-1 overflow-y-auto",children:(F?S:k)?c.jsx("div",{className:"p-4 text-[12px] text-muted-foreground",children:"Loading..."}):I.length===0?c.jsx("div",{className:"p-4 text-[12px] text-muted-foreground",children:F?"No archived PRs. Closed PRs are archived automatically.":"No PRs tracked yet. Add a repository to watch or add a PR URL."}):I.map(P=>c.jsx(oN,{pr:P,isSelected:P.id===t,onSelect:r},P.id))})]}),c.jsx("div",{className:"flex min-h-[32rem] flex-1 flex-col overflow-hidden lg:min-h-0",children:L?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"shrink-0 border-b border-border px-4 py-3",children:[c.jsxs("div",{className:"mb-1 flex items-start justify-between gap-4",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c.jsx(Hv,{status:L.status}),c.jsx("span",{className:"truncate font-medium",children:L.title}),c.jsx(Wv,{pr:L}),!U&&c.jsx(Mu,{}),c.jsxs("a",{href:L.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:[L.repo,"#",L.number]})]}),c.jsxs("div",{className:"mt-1 flex flex-wrap gap-x-4 gap-y-1 text-[11px] text-muted-foreground",children:[c.jsxs("span",{children:["status: ",Uv(L.status)]}),!U&&c.jsx(Mu,{}),c.jsxs("span",{children:[L.feedbackItems.length," items"]}),L.feedbackItems.length>0&&(()=>{const P=Wo(L.feedbackItems);return c.jsxs(c.Fragment,{children:[P.queued>0&&c.jsxs("span",{children:[P.queued," queued"]}),P.inProgress>0&&c.jsxs("span",{children:[P.inProgress," in progress"]}),P.failed>0&&c.jsxs("span",{children:[P.failed," failed"]}),P.warning>0&&c.jsxs("span",{children:[P.warning," warnings"]})]})})(),L.testsPassed!==null&&c.jsxs("span",{children:["tests: ",L.testsPassed?"pass":"fail"]}),L.lintPassed!==null&&c.jsxs("span",{children:["lint: ",L.lintPassed?"pass":"fail"]}),L.lastChecked&&c.jsxs("span",{children:["checked ",Wt(L.lastChecked)]})]})]}),!F&&c.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[c.jsx("button",{type:"button",onClick:()=>ne.mutate(L.id),disabled:ne.isPending||L.status==="processing","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:L.status==="processing"?"Running":"Run now"}),c.jsx("button",{type:"button",onClick:()=>se.mutate({id:L.id,enabled:!U}),disabled:se.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:U?"Pause watch":"Resume watch"})]})]}),$v(L.feedbackItems)&&L.status!=="processing"&&Wo(L.feedbackItems).inProgress===0&&c.jsx(Bv,{href:L.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"}),c.jsx("div",{className:"text-[11px] text-muted-foreground",children:U?"Background watcher syncs GitHub feedback and pushes approved fixes automatically.":"Background watch is paused for this PR; manual runs still work."})]}),c.jsx(aN,{pr:L,config:C,healingSessions:_}),c.jsx("div",{className:"flex-1 overflow-y-auto",children:L.feedbackItems.length===0?c.jsx("div",{className:"p-4 text-[12px] text-muted-foreground",children:U?"No feedback yet. The watcher will sync GitHub comments automatically.":"No feedback yet. Background watch is paused for this PR."}):L.feedbackItems.map(P=>c.jsx(sN,{item:P,prId:L.id,readOnly:F},P.id))})]}):c.jsx("div",{className:"flex flex-1 items-center justify-center text-[12px] text-muted-foreground",children:"Select a PR from the left panel."})}),c.jsx(lN,{prId:t})]})]})}function dN(){const{data:t}=dt({queryKey:["/api/config"]}),[r,s]=m.useState(""),[a,l]=m.useState(!1),d=t?.githubTokens??(t?.githubToken?[t.githubToken]:[]),p=g=>{v.mutate({githubTokens:g})},h=(g,w)=>{const b=[...d],[k]=b.splice(g,1);k&&(b.splice(w,0,k),p(b))},y=g=>{p(d.filter((w,b)=>b!==g))},v=ct({mutationFn:async g=>(await nt("PATCH","/api/config",g)).json(),onSuccess:()=>{we.invalidateQueries({queryKey:["/api/config"]}),we.invalidateQueries({queryKey:["/api/onboarding/status"]}),Vt({description:"Settings saved."})},onError:g=>{Vt({variant:"destructive",description:`Failed to save: ${g.message}`})}});return c.jsxs("div",{className:"flex min-h-screen flex-col",children:[c.jsx(Bi,{}),c.jsx("header",{className:"flex shrink-0 items-center justify-between border-b border-border px-4 py-2.5",children:c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx(An,{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"}),c.jsx("span",{className:"text-sm font-medium tracking-tight",children:"settings"})]})}),c.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:c.jsxs("div",{className:"mx-auto flex max-w-2xl flex-col gap-8",children:[c.jsxs("section",{children:[c.jsx("h2",{className:"mb-4 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Agent"}),c.jsx("div",{className:"flex flex-col gap-4 rounded border border-border p-4",children:c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsx("label",{htmlFor:"settings-coding-agent",className:"text-sm",children:"Coding Agent"}),c.jsx("div",{className:"text-[11px] text-muted-foreground",children:"CLI agent used to apply fixes"})]}),c.jsxs("select",{id:"settings-coding-agent",value:t?.codingAgent??"codex",onChange:g=>{const w=g.target.value;v.mutate({codingAgent:w})},disabled:v.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:[c.jsx("option",{value:"codex",children:"codex"}),c.jsx("option",{value:"claude",children:"claude"})]})]})})]}),c.jsxs("section",{children:[c.jsx("h2",{className:"mb-4 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Automation"}),c.jsxs("div",{className:"flex flex-col gap-4 rounded border border-border p-4",children:[c.jsxs("label",{className:"flex items-center justify-between gap-3 cursor-pointer",children:[c.jsxs("div",{children:[c.jsx("div",{className:"text-sm",children:"Auto-resolve conflicts"}),c.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Ask the agent to resolve merge conflicts when tracked PRs are not mergeable."})]}),c.jsx("input",{type:"checkbox",checked:t?.autoResolveMergeConflicts??!0,onChange:g=>v.mutate({autoResolveMergeConflicts:g.target.checked}),disabled:v.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"})]}),c.jsxs("label",{className:"flex items-center justify-between gap-3 cursor-pointer",children:[c.jsxs("div",{children:[c.jsx("div",{className:"text-sm",children:"Auto-update docs"}),c.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Automatically assess whether tracked PRs need documentation updates."})]}),c.jsx("input",{type:"checkbox",checked:t?.autoUpdateDocs??!0,onChange:g=>v.mutate({autoUpdateDocs:g.target.checked}),disabled:v.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"})]})]})]}),c.jsxs("section",{children:[c.jsx("h2",{className:"mb-4 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Tuning"}),c.jsxs("div",{className:"flex flex-col gap-4 rounded border border-border p-4",children:[c.jsx(Tn,{label:"Max turns",description:"Maximum agent turns per feedback item",value:t?.maxTurns??15,onChange:g=>v.mutate({maxTurns:g}),disabled:v.isPending}),c.jsx(Tn,{label:"Poll interval (ms)",description:"How often to check for new feedback",value:t?.pollIntervalMs??12e4,onChange:g=>v.mutate({pollIntervalMs:g}),disabled:v.isPending}),c.jsx(Tn,{label:"Batch window (ms)",description:"Time to batch feedback before processing",value:t?.batchWindowMs??3e5,onChange:g=>v.mutate({batchWindowMs:g}),disabled:v.isPending}),c.jsx(Tn,{label:"Max changes per run",description:"Limit on concurrent changes",value:t?.maxChangesPerRun??20,onChange:g=>v.mutate({maxChangesPerRun:g}),disabled:v.isPending})]})]}),c.jsxs("section",{children:[c.jsx("h2",{className:"mb-4 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"CI Healing"}),c.jsxs("div",{className:"flex flex-col gap-4 rounded border border-border p-4",children:[c.jsxs("div",{className:"flex items-center justify-between gap-3",children:[c.jsxs("div",{children:[c.jsx("div",{className:"text-sm",children:"Automatic CI healing"}),c.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Classify healable CI failures and run bounded repair attempts in isolated worktrees."})]}),c.jsx("input",{type:"checkbox","aria-label":"Automatic CI healing",checked:t?.autoHealCI??!1,onChange:g=>v.mutate({autoHealCI:g.target.checked}),disabled:v.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"})]}),c.jsx(Tn,{label:"Max healing attempts per session",description:"Upper bound on repair attempts for a single healing session",value:t?.maxHealingAttemptsPerSession??3,onChange:g=>v.mutate({maxHealingAttemptsPerSession:g}),disabled:v.isPending}),c.jsx(Tn,{label:"Max healing attempts per fingerprint",description:"Cap retries for the same failure fingerprint",value:t?.maxHealingAttemptsPerFingerprint??2,onChange:g=>v.mutate({maxHealingAttemptsPerFingerprint:g}),disabled:v.isPending}),c.jsx(Tn,{label:"Max concurrent healing runs",description:"How many healing runs can execute at once",value:t?.maxConcurrentHealingRuns??1,onChange:g=>v.mutate({maxConcurrentHealingRuns:g}),disabled:v.isPending}),c.jsx(Tn,{label:"Healing cooldown (ms)",description:"Backoff before a cooldowned session can retry",value:t?.healingCooldownMs??3e5,onChange:g=>v.mutate({healingCooldownMs:g}),disabled:v.isPending})]})]}),c.jsxs("section",{children:[c.jsx("h2",{className:"mb-4 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Releases"}),c.jsx("div",{className:"flex flex-col gap-4 rounded border border-border p-4",children:c.jsxs("label",{className:"flex items-start justify-between gap-3",children:[c.jsxs("div",{children:[c.jsx("div",{className:"text-sm",children:"Automatic release creation"}),c.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."})]}),c.jsx("input",{type:"checkbox",checked:t?.autoCreateReleases??!0,onChange:g=>v.mutate({autoCreateReleases:g.target.checked}),disabled:v.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"})]})})]}),c.jsxs("section",{children:[c.jsx("h2",{className:"mb-4 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"GitHub"}),c.jsxs("div",{className:"flex flex-col gap-4 rounded border border-border p-4",children:[c.jsxs("div",{className:"flex flex-col gap-3",children:[c.jsxs("div",{className:"flex items-center justify-between gap-3",children:[c.jsxs("div",{children:[c.jsx("div",{className:"text-sm",children:"Tokens"}),c.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Tried in order before GITHUB_TOKEN and gh auth."})]}),!a&&c.jsx("button",{type:"button",onClick:()=>l(!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?c.jsx("div",{className:"flex flex-col gap-2",children:d.map((g,w)=>c.jsxs("div",{className:"flex items-center justify-between gap-3 border border-border px-2 py-1.5",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("div",{className:"truncate font-mono text-xs",children:g}),c.jsxs("div",{className:"text-[10px] text-muted-foreground",children:["priority ",w+1]})]}),c.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[c.jsx("button",{type:"button",onClick:()=>h(w,w-1),disabled:w===0||v.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"}),c.jsx("button",{type:"button",onClick:()=>h(w,w+1),disabled:w===d.length-1||v.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"}),c.jsx("button",{type:"button",onClick:()=>y(w),disabled:v.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"})]})]},w))}):c.jsx("div",{className:"text-[11px] text-muted-foreground",children:"none configured"}),a?c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("input",{type:"password",value:r,onChange:g=>s(g.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"}),c.jsx("button",{type:"button",onClick:()=>{const g=r.trim();g&&(p([...d,g]),s(""),l(!1))},disabled:!r.trim()||v.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"}),c.jsx("button",{type:"button",onClick:()=>{l(!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]}),c.jsxs("div",{className:"flex items-center justify-between gap-3",children:[c.jsxs("div",{children:[c.jsx("div",{className:"text-sm",children:"Repository links in PR comments"}),c.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."})]}),c.jsx("input",{type:"checkbox","aria-label":"Repository links in PR comments",checked:t?.includeRepositoryLinksInGitHubComments??!0,onChange:g=>v.mutate({includeRepositoryLinksInGitHubComments:g.target.checked}),disabled:v.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"})]}),c.jsxs("div",{children:[c.jsx("div",{className:"text-sm",children:"Trusted reviewers"}),c.jsx("div",{className:"text-[11px] text-muted-foreground",children:t?.trustedReviewers?.length?t.trustedReviewers.join(", "):"none configured"})]}),c.jsxs("div",{children:[c.jsx("div",{className:"text-sm",children:"Ignored bots"}),c.jsx("div",{className:"text-[11px] text-muted-foreground",children:t?.ignoredBots?.length?t.ignoredBots.join(", "):"none configured"})]})]})]})]})})]})}function Tn({label:t,description:r,value:s,onChange:a,disabled:l}){const d=`setting-${t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")}`,p=`${d}-description`;return c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsx("label",{htmlFor:d,className:"text-sm",children:t}),c.jsx("div",{id:p,className:"text-[11px] text-muted-foreground",children:r})]}),c.jsx("input",{id:d,type:"number",value:s,onChange:h=>{const y=parseInt(h.target.value,10);isNaN(y)||a(y)},disabled:l,"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 fN(t){return new Date(t).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}function pN(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 hN({text:t}){const[r,s]=m.useState(!1),a=async()=>{try{await navigator.clipboard.writeText(t),s(!0),setTimeout(()=>s(!1),2e3)}catch{}};return c.jsx("button",{type:"button",onClick:a,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 pu({title:t,content:r}){return c.jsxs("div",{className:"mt-4",children:[c.jsxs("div",{className:"mb-1.5 flex items-center justify-between",children:[c.jsx("span",{className:"text-[11px] uppercase tracking-wider text-muted-foreground",children:t}),c.jsx(hN,{text:r})]}),c.jsx("pre",{className:"whitespace-pre-wrap border border-border bg-background p-3 text-[12px] leading-relaxed font-mono",children:r})]})}function mN({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 c.jsx("span",{className:`border px-1.5 py-0 text-[10px] uppercase tracking-wider ${r}`,children:t})}function gN({changelog:t}){const[r,s]=m.useState(!1),a=t.content?pN(t.content):null,l=`changelog-${t.id}-content`;return c.jsxs("div",{className:"border border-border",children:[c.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"?l:void 0,children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx(mN,{status:t.status}),c.jsx("span",{className:"text-sm font-medium",children:fN(t.createdAt)}),c.jsxs("span",{className:"text-[11px] text-muted-foreground",children:[t.triggerCount," PR",t.triggerCount!==1?"s":""," merged"]}),c.jsx("span",{className:"text-[11px] text-muted-foreground",children:t.prSummaries.map(d=>`#${d.number}`).join(" · ")})]}),t.status==="done"&&c.jsx("span",{className:"text-[11px] text-muted-foreground",children:r?"Hide":"Show"})]}),r&&t.status==="done"&&c.jsxs("div",{id:l,className:"border-t border-border px-4 pb-4 pt-3",children:[t.error&&c.jsx("p",{className:"mb-3 text-[12px] text-destructive",children:t.error}),a?.twitter&&c.jsx(pu,{title:"Twitter / X Thread",content:a.twitter}),a?.linkedin&&c.jsx(pu,{title:"LinkedIn / General",content:a.linkedin}),!a?.twitter&&!a?.linkedin&&t.content&&c.jsx(pu,{title:"Full output",content:t.content})]}),t.status==="error"&&t.error&&c.jsx("div",{className:"border-t border-border px-4 py-3",children:c.jsx("p",{className:"text-[12px] text-destructive",children:t.error})}),t.status==="generating"&&c.jsx("div",{className:"border-t border-border px-4 py-2.5",children:c.jsx("span",{className:"text-[11px] text-muted-foreground",children:"Generating social media post with AI agent…"})})]})}function vN(){const{data:t=[],isLoading:r}=dt({queryKey:["/api/changelogs"],refetchInterval:s=>s.state.data?.some(l=>l.status==="generating")?5e3:!1});return c.jsxs("div",{className:"flex min-h-screen flex-col",children:[c.jsx(Bi,{}),c.jsxs("header",{className:"flex shrink-0 items-center justify-between border-b border-border px-4 py-2.5",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-label":"oh-my-pr",children:[c.jsx("rect",{x:"1",y:"1",width:"14",height:"14",stroke:"currentColor",strokeWidth:"1.5"}),c.jsx("path",{d:"M4 5h8M4 8h5M4 11h6",stroke:"currentColor",strokeWidth:"1"})]}),c.jsx("span",{className:"text-sm font-medium tracking-tight",children:"oh-my-pr"}),c.jsx("span",{className:"border border-border px-1.5 py-0 text-[10px] uppercase tracking-wider text-muted-foreground",children:"changelogs"})]}),c.jsx(An,{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"})]}),c.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:c.jsxs("div",{className:"mx-auto max-w-3xl",children:[c.jsxs("div",{className:"mb-5",children:[c.jsx("h1",{className:"text-base font-medium",children:"Social Media Changelogs"}),c.jsx("p",{className:"mt-1 text-[12px] text-muted-foreground",children:"Generated automatically every 5 PRs merged to main. Copy and paste into Twitter/X or LinkedIn."})]}),!r&&t.length===0&&c.jsxs("div",{className:"border border-border px-4 py-8 text-center",children:[c.jsx("p",{className:"text-sm text-muted-foreground",children:"No changelogs yet."}),c.jsx("p",{className:"mt-1 text-[12px] text-muted-foreground",children:"A post will be generated automatically after every 5 PRs are merged to main."})]}),r&&c.jsx("div",{className:"border border-border px-4 py-6 text-center",children:c.jsx("p",{className:"text-[12px] text-muted-foreground",children:"Loading…"})}),c.jsx("div",{className:"flex flex-col gap-2",children:t.map(s=>c.jsx(gN,{changelog:s},s.id))})]})})]})}const yN=new Set(["detected","evaluating","proposed","publishing"]);function Vv(t){return yN.has(t)}function xN(t){return t==="published"||t==="skipped"||t==="error"}function wN(t){return typeof t=="object"&&t!==null&&"status"in t&&typeof t.status=="string"}function hu(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 SN({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":Vv(t)?"border-border text-muted-foreground animate-pulse":"border-border text-muted-foreground";return c.jsx("span",{className:`border px-1.5 py-0 text-[10px] uppercase tracking-wider ${r}`,children:t})}function CN({text:t}){const[r,s]=m.useState(!1),a=async()=>{try{await navigator.clipboard.writeText(t),s(!0),setTimeout(()=>s(!1),1500)}catch(l){const d=l instanceof Error?l.message:"Clipboard write failed";Vt({variant:"destructive",description:`Failed to copy: ${d}`})}};return c.jsx("button",{type:"button",onClick:a,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 EN({run:t,onRetry:r,retryPending:s}){const[a,l]=m.useState(!1),p=!(!!t.decisionReason||!!t.releaseTitle||!!t.releaseNotes||!!t.error||!!t.githubReleaseUrl||t.includedPrs.length>0)&&xN(t.status),h=`release-run-${t.id}-details`;return c.jsxs("div",{className:"border border-border",children:[c.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:()=>l(y=>!y),"aria-expanded":a,"aria-controls":h,children:[c.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[c.jsx(SN,{status:t.status}),c.jsx("span",{className:"truncate text-sm font-medium",children:t.repo}),c.jsxs("span",{className:"text-[11px] text-muted-foreground",children:["#",t.triggerPrNumber]}),t.proposedVersion&&c.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&&c.jsxs("span",{className:"text-[11px] text-muted-foreground",children:["bump ",t.recommendedBump]})]}),c.jsxs("div",{className:"flex items-center gap-3 text-[11px] text-muted-foreground",children:[c.jsx("span",{children:hu(t.createdAt)}),c.jsx("span",{children:a?"Hide":"Show"})]})]}),a&&c.jsxs("div",{id:h,className:"border-t border-border px-4 pb-4 pt-3",children:[c.jsxs("div",{className:"mb-3 text-[12px] text-muted-foreground",children:["Trigger PR:"," ",c.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&&c.jsx("p",{className:"mb-3 text-[12px] leading-relaxed",children:t.decisionReason}),t.releaseTitle&&c.jsxs("p",{className:"mb-3 text-[12px]",children:[c.jsx("span",{className:"text-muted-foreground",children:"Release title:"})," ",c.jsx("span",{children:t.releaseTitle})]}),c.jsxs("div",{className:"mb-3 grid grid-cols-1 gap-2 text-[12px] text-muted-foreground md:grid-cols-2",children:[c.jsxs("div",{children:["Base branch: ",t.baseBranch||"n/a"]}),c.jsxs("div",{children:["Trigger SHA: ",bN(t.triggerMergeSha)]}),c.jsxs("div",{children:["Merged at: ",hu(t.triggerMergedAt)]}),c.jsxs("div",{children:["Updated: ",hu(t.updatedAt)]})]}),t.includedPrs.length>0&&c.jsxs("div",{className:"mb-3",children:[c.jsxs("div",{className:"mb-1.5 text-[11px] uppercase tracking-wider text-muted-foreground",children:["Included PRs (",t.includedPrs.length,")"]}),c.jsx("div",{className:"space-y-1 border border-border p-3 text-[12px]",children:t.includedPrs.map(y=>c.jsxs("div",{className:"flex items-center justify-between gap-3",children:[c.jsxs("span",{className:"truncate",children:["#",y.number," ",y.title]}),c.jsx("a",{href:y.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"})]},`${y.mergeSha}-${y.number}`))})]}),t.releaseNotes&&c.jsxs("div",{className:"mb-3",children:[c.jsxs("div",{className:"mb-1.5 flex items-center justify-between",children:[c.jsx("span",{className:"text-[11px] uppercase tracking-wider text-muted-foreground",children:"Release Notes"}),c.jsx(CN,{text:t.releaseNotes})]}),c.jsx("pre",{className:"whitespace-pre-wrap border border-border bg-background p-3 text-[12px] leading-relaxed font-mono",children:t.releaseNotes})]}),t.error&&c.jsx("div",{className:"mb-3 border border-destructive/40 bg-destructive/5 p-3 text-[12px] text-destructive",children:t.error}),c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[t.githubReleaseUrl&&c.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"&&c.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&&c.jsx("p",{className:"mt-2 text-[12px] text-muted-foreground",children:"No details available yet."})]})]})}function kN(){const{data:t=[],isLoading:r}=dt({queryKey:["/api/releases"],refetchInterval:a=>{const l=a.state.data;return Array.isArray(l)&&l.some(d=>wN(d)&&Vv(d.status))?5e3:!1}}),s=ct({mutationFn:async a=>(await nt("POST",`/api/releases/${a}/retry`)).json(),onSuccess:()=>{we.invalidateQueries({queryKey:["/api/releases"]}),Vt({description:"Retry queued."})},onError:a=>{Vt({variant:"destructive",description:`Retry failed: ${a.message}`})}});return c.jsxs("div",{className:"flex min-h-screen flex-col",children:[c.jsx(Bi,{}),c.jsxs("header",{className:"flex shrink-0 items-center justify-between border-b border-border px-4 py-2.5",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-label":"Release Management",children:[c.jsx("rect",{x:"1",y:"1",width:"14",height:"14",stroke:"currentColor",strokeWidth:"1.5"}),c.jsx("path",{d:"M4 6h8M4 9h8M4 12h5",stroke:"currentColor",strokeWidth:"1"})]}),c.jsx("span",{className:"text-sm font-medium tracking-tight",children:"oh-my-pr"}),c.jsx("span",{className:"border border-border px-1.5 py-0 text-[10px] uppercase tracking-wider text-muted-foreground",children:"releases"})]}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx(An,{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"}),c.jsx(An,{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"})]})]}),c.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:c.jsxs("div",{className:"mx-auto max-w-4xl",children:[c.jsxs("div",{className:"mb-5",children:[c.jsx("h1",{className:"text-base font-medium",children:"Release Management"}),c.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&&c.jsx("div",{className:"border border-border px-4 py-6 text-center",children:c.jsx("p",{className:"text-[12px] text-muted-foreground",children:"Loading…"})}),!r&&t.length===0&&c.jsxs("div",{className:"border border-border px-4 py-8 text-center",children:[c.jsx("p",{className:"text-sm text-muted-foreground",children:"No release runs yet."}),c.jsx("p",{className:"mt-1 text-[12px] text-muted-foreground",children:"Runs appear after merged PRs are evaluated for release-worthiness."})]}),c.jsx("div",{className:"flex flex-col gap-2",children:t.map(a=>c.jsx(EN,{run:a,onRetry:l=>s.mutate(l),retryPending:s.isPending},a.id))})]})})]})}const Qv=m.forwardRef(({className:t,...r},s)=>c.jsx("div",{ref:s,className:Le("shadcn-card rounded-xl border bg-card border-card-border text-card-foreground shadow-sm",t),...r}));Qv.displayName="Card";const NN=m.forwardRef(({className:t,...r},s)=>c.jsx("div",{ref:s,className:Le("flex flex-col space-y-1.5 p-6",t),...r}));NN.displayName="CardHeader";const RN=m.forwardRef(({className:t,...r},s)=>c.jsx("div",{ref:s,className:Le("text-2xl font-semibold leading-none tracking-tight",t),...r}));RN.displayName="CardTitle";const PN=m.forwardRef(({className:t,...r},s)=>c.jsx("div",{ref:s,className:Le("text-sm text-muted-foreground",t),...r}));PN.displayName="CardDescription";const Gv=m.forwardRef(({className:t,...r},s)=>c.jsx("div",{ref:s,className:Le("p-6 pt-0",t),...r}));Gv.displayName="CardContent";const jN=m.forwardRef(({className:t,...r},s)=>c.jsx("div",{ref:s,className:Le("flex items-center p-6 pt-0",t),...r}));jN.displayName="CardFooter";function TN(){return c.jsx("div",{className:"min-h-screen w-full flex items-center justify-center bg-gray-50",children:c.jsx(Qv,{className:"w-full max-w-md mx-4",children:c.jsxs(Gv,{className:"pt-6",children:[c.jsxs("div",{className:"flex mb-4 gap-2",children:[c.jsx(E0,{className:"h-8 w-8 text-red-500"}),c.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"404 Page Not Found"})]}),c.jsx("p",{className:"mt-4 text-sm text-gray-600",children:"Did you forget to add the page to the router?"})]})})})}function _N(){return c.jsxs(xw,{children:[c.jsx(Oo,{path:"/",component:cN}),c.jsx(Oo,{path:"/settings",component:dN}),c.jsx(Oo,{path:"/changelogs",component:vN}),c.jsx(Oo,{path:"/releases",component:kN}),c.jsx(Oo,{component:TN})]})}function ON(){return c.jsx(ub,{attribute:"class",defaultTheme:"system",enableSystem:!0,children:c.jsx(Qw,{client:we,children:c.jsxs(KS,{children:[c.jsx(l1,{}),c.jsx(Uh,{hook:Bh,children:c.jsx(_N,{})})]})})})}window.location.hash||(window.location.hash="#/");Jx.createRoot(document.getElementById("root")).render(c.jsx(ON,{}));
48
+ `)},pE=0,Ar=[];function hE(t){var r=m.useRef([]),s=m.useRef([0,0]),a=m.useRef(),l=m.useState(pE++)[0],d=m.useState($g)[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(l));var S=IC([t.lockRef.current],(t.shards||[]).map(kh),!0).filter(Boolean);return S.forEach(function(C){return C.classList.add("allow-interactivity-".concat(l))}),function(){document.body.classList.remove("block-interactivity-".concat(l)),S.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(l))})}}},[t.inert,t.lockRef.current,t.shards]);var h=m.useCallback(function(S,C){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!p.current.allowPinchZoom;var _=hi(S),A=s.current,O="deltaX"in S?S.deltaX:A[0]-_[0],I="deltaY"in S?S.deltaY:A[1]-_[1],F,L=S.target,U=Math.abs(O)>Math.abs(I)?"h":"v";if("touches"in S&&U==="h"&&L.type==="range")return!1;var q=window.getSelection(),te=q&&q.anchorNode,ne=te?te===L||te.contains(L):!1;if(ne)return!1;var se=Ch(U,L);if(!se)return!0;if(se?F=U:(F=U==="v"?"h":"v",se=Ch(U,L)),!se)return!1;if(!a.current&&"changedTouches"in S&&(O||I)&&(a.current=F),!F)return!0;var Y=a.current||F;return cE(Y,C,S,Y==="h"?O:I)},[]),y=m.useCallback(function(S){var C=S;if(!(!Ar.length||Ar[Ar.length-1]!==d)){var _="deltaY"in C?Eh(C):hi(C),A=r.current.filter(function(F){return F.name===C.type&&(F.target===C.target||C.target===F.shadowParent)&&dE(F.delta,_)})[0];if(A&&A.should){C.cancelable&&C.preventDefault();return}if(!A){var O=(p.current.shards||[]).map(kh).filter(Boolean).filter(function(F){return F.contains(C.target)}),I=O.length>0?h(C,O[0]):!p.current.noIsolation;I&&C.cancelable&&C.preventDefault()}}},[]),v=m.useCallback(function(S,C,_,A){var O={name:S,delta:C,target:_,should:A,shadowParent:mE(_)};r.current.push(O),setTimeout(function(){r.current=r.current.filter(function(I){return I!==O})},1)},[]),g=m.useCallback(function(S){s.current=hi(S),a.current=void 0},[]),w=m.useCallback(function(S){v(S.type,Eh(S),S.target,h(S,t.lockRef.current))},[]),b=m.useCallback(function(S){v(S.type,hi(S),S.target,h(S,t.lockRef.current))},[]);m.useEffect(function(){return Ar.push(d),t.setCallbacks({onScrollCapture:w,onWheelCapture:w,onTouchMoveCapture:b}),document.addEventListener("wheel",y,Or),document.addEventListener("touchmove",y,Or),document.addEventListener("touchstart",g,Or),function(){Ar=Ar.filter(function(S){return S!==d}),document.removeEventListener("wheel",y,Or),document.removeEventListener("touchmove",y,Or),document.removeEventListener("touchstart",g,Or)}},[]);var k=t.removeScrollBar,N=t.inert;return m.createElement(m.Fragment,null,N?m.createElement(d,{styles:fE(l)}):null,k?m.createElement(rE,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function mE(t){for(var r=null;t!==null;)t instanceof ShadowRoot&&(r=t.host,t=t.host),t=t.parentNode;return r}const gE=WC(Fg,hE);var Bg=m.forwardRef(function(t,r){return m.createElement(Wi,Bt({},t,{ref:r,sideCar:gE}))});Bg.classNames=Wi.classNames;var Mu=["Enter"," "],vE=["ArrowDown","PageUp","Home"],Wg=["ArrowUp","PageDown","End"],yE=[...vE,...Wg],xE={ltr:[...Mu,"ArrowRight"],rtl:[...Mu,"ArrowLeft"]},wE={ltr:["ArrowLeft"],rtl:["ArrowRight"]},qo="Menu",[Ho,bE,SE]=Qu(qo),[rr,Kg]=Ln(qo,[SE,Fi,Tg]),Ki=Fi(),Vg=Tg(),[CE,or]=rr(qo),[EE,Yo]=rr(qo),Qg=t=>{const{__scopeMenu:r,open:s=!1,children:a,dir:l,onOpenChange:d,modal:p=!0}=t,h=Ki(r),[y,v]=m.useState(null),g=m.useRef(!1),w=yt(d),b=Ng(l);return m.useEffect(()=>{const k=()=>{g.current=!0,document.addEventListener("pointerdown",N,{capture:!0,once:!0}),document.addEventListener("pointermove",N,{capture:!0,once:!0})},N=()=>g.current=!1;return document.addEventListener("keydown",k,{capture:!0}),()=>{document.removeEventListener("keydown",k,{capture:!0}),document.removeEventListener("pointerdown",N,{capture:!0}),document.removeEventListener("pointermove",N,{capture:!0})}},[]),c.jsx(sg,{...h,children:c.jsx(CE,{scope:r,open:s,onOpenChange:w,content:y,onContentChange:v,children:c.jsx(EE,{scope:r,onClose:m.useCallback(()=>w(!1),[w]),isUsingKeyboardRef:g,dir:b,modal:p,children:a})})})};Qg.displayName=qo;var kE="MenuAnchor",fc=m.forwardRef((t,r)=>{const{__scopeMenu:s,...a}=t,l=Ki(s);return c.jsx(ig,{...l,...a,ref:r})});fc.displayName=kE;var pc="MenuPortal",[NE,Gg]=rr(pc,{forceMount:void 0}),qg=t=>{const{__scopeMenu:r,forceMount:s,children:a,container:l}=t,d=or(pc,r);return c.jsx(NE,{scope:r,forceMount:s,children:c.jsx(Fn,{present:s||d.open,children:c.jsx(qu,{asChild:!0,container:l,children:a})})})};qg.displayName=pc;var Nt="MenuContent",[RE,hc]=rr(Nt),Yg=m.forwardRef((t,r)=>{const s=Gg(Nt,t.__scopeMenu),{forceMount:a=s.forceMount,...l}=t,d=or(Nt,t.__scopeMenu),p=Yo(Nt,t.__scopeMenu);return c.jsx(Ho.Provider,{scope:t.__scopeMenu,children:c.jsx(Fn,{present:a||d.open,children:c.jsx(Ho.Slot,{scope:t.__scopeMenu,children:p.modal?c.jsx(PE,{...l,ref:r}):c.jsx(jE,{...l,ref:r})})})})}),PE=m.forwardRef((t,r)=>{const s=or(Nt,t.__scopeMenu),a=m.useRef(null),l=He(r,a);return m.useEffect(()=>{const d=a.current;if(d)return MC(d)},[]),c.jsx(mc,{...t,ref:l,trapFocus:s.open,disableOutsidePointerEvents:s.open,disableOutsideScroll:!0,onFocusOutside:ce(t.onFocusOutside,d=>d.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>s.onOpenChange(!1)})}),jE=m.forwardRef((t,r)=>{const s=or(Nt,t.__scopeMenu);return c.jsx(mc,{...t,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>s.onOpenChange(!1)})}),TE=kC("MenuContent.ScrollLock"),mc=m.forwardRef((t,r)=>{const{__scopeMenu:s,loop:a=!1,trapFocus:l,onOpenAutoFocus:d,onCloseAutoFocus:p,disableOutsidePointerEvents:h,onEntryFocus:y,onEscapeKeyDown:v,onPointerDownOutside:g,onFocusOutside:w,onInteractOutside:b,onDismiss:k,disableOutsideScroll:N,...S}=t,C=or(Nt,s),_=Yo(Nt,s),A=Ki(s),O=Vg(s),I=bE(s),[F,L]=m.useState(null),U=m.useRef(null),q=He(r,U,C.onContentChange),te=m.useRef(0),ne=m.useRef(""),se=m.useRef(0),Y=m.useRef(null),ae=m.useRef("right"),G=m.useRef(0),me=N?Bg:m.Fragment,ee=N?{as:TE,allowPinchZoom:!0}:void 0,ie=z=>{const V=ne.current+z,T=I().filter(he=>!he.disabled),H=document.activeElement,de=T.find(he=>he.ref.current===H)?.textValue,pe=T.map(he=>he.textValue),xe=HE(pe,V,de),ve=T.find(he=>he.textValue===xe)?.ref.current;(function he(be){ne.current=be,window.clearTimeout(te.current),be!==""&&(te.current=window.setTimeout(()=>he(""),1e3))})(V),ve&&setTimeout(()=>ve.focus())};m.useEffect(()=>()=>window.clearTimeout(te.current),[]),sC();const P=m.useCallback(z=>ae.current===Y.current?.side&&WE(z,Y.current?.area),[]);return c.jsx(RE,{scope:s,searchRef:ne,onItemEnter:m.useCallback(z=>{P(z)&&z.preventDefault()},[P]),onItemLeave:m.useCallback(z=>{P(z)||(U.current?.focus(),L(null))},[P]),onTriggerLeave:m.useCallback(z=>{P(z)&&z.preventDefault()},[P]),pointerGraceTimerRef:se,onPointerGraceIntentChange:m.useCallback(z=>{Y.current=z},[]),children:c.jsx(me,{...ee,children:c.jsx(Rg,{asChild:!0,trapped:l,onMountAutoFocus:ce(d,z=>{z.preventDefault(),U.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:p,children:c.jsx(_i,{asChild:!0,disableOutsidePointerEvents:h,onEscapeKeyDown:v,onPointerDownOutside:g,onFocusOutside:w,onInteractOutside:b,onDismiss:k,children:c.jsx(CC,{asChild:!0,...O,dir:_.dir,orientation:"vertical",loop:a,currentTabStopId:F,onCurrentTabStopIdChange:L,onEntryFocus:ce(y,z=>{_.isUsingKeyboardRef.current||z.preventDefault()}),preventScrollOnEntryFocus:!0,children:c.jsx(ag,{role:"menu","aria-orientation":"vertical","data-state":fv(C.open),"data-radix-menu-content":"",dir:_.dir,...A,...S,ref:q,style:{outline:"none",...S.style},onKeyDown:ce(S.onKeyDown,z=>{const T=z.target.closest("[data-radix-menu-content]")===z.currentTarget,H=z.ctrlKey||z.altKey||z.metaKey,de=z.key.length===1;T&&(z.key==="Tab"&&z.preventDefault(),!H&&de&&ie(z.key));const pe=U.current;if(z.target!==pe||!yE.includes(z.key))return;z.preventDefault();const ve=I().filter(he=>!he.disabled).map(he=>he.ref.current);Wg.includes(z.key)&&ve.reverse(),zE(ve)}),onBlur:ce(t.onBlur,z=>{z.currentTarget.contains(z.target)||(window.clearTimeout(te.current),ne.current="")}),onPointerMove:ce(t.onPointerMove,Bo(z=>{const V=z.target,T=G.current!==z.clientX;if(z.currentTarget.contains(V)&&T){const H=z.clientX>G.current?"right":"left";ae.current=H,G.current=z.clientX}}))})})})})})})});Yg.displayName=Nt;var _E="MenuGroup",gc=m.forwardRef((t,r)=>{const{__scopeMenu:s,...a}=t;return c.jsx(Re.div,{role:"group",...a,ref:r})});gc.displayName=_E;var OE="MenuLabel",Xg=m.forwardRef((t,r)=>{const{__scopeMenu:s,...a}=t;return c.jsx(Re.div,{...a,ref:r})});Xg.displayName=OE;var Ni="MenuItem",Nh="menu.itemSelect",Vi=m.forwardRef((t,r)=>{const{disabled:s=!1,onSelect:a,...l}=t,d=m.useRef(null),p=Yo(Ni,t.__scopeMenu),h=hc(Ni,t.__scopeMenu),y=He(r,d),v=m.useRef(!1),g=()=>{const w=d.current;if(!s&&w){const b=new CustomEvent(Nh,{bubbles:!0,cancelable:!0});w.addEventListener(Nh,k=>a?.(k),{once:!0}),Gu(w,b),b.defaultPrevented?v.current=!1:p.onClose()}};return c.jsx(Zg,{...l,ref:y,disabled:s,onClick:ce(t.onClick,g),onPointerDown:w=>{t.onPointerDown?.(w),v.current=!0},onPointerUp:ce(t.onPointerUp,w=>{v.current||w.currentTarget?.click()}),onKeyDown:ce(t.onKeyDown,w=>{const b=h.searchRef.current!=="";s||b&&w.key===" "||Mu.includes(w.key)&&(w.currentTarget.click(),w.preventDefault())})})});Vi.displayName=Ni;var Zg=m.forwardRef((t,r)=>{const{__scopeMenu:s,disabled:a=!1,textValue:l,...d}=t,p=hc(Ni,s),h=Vg(s),y=m.useRef(null),v=He(r,y),[g,w]=m.useState(!1),[b,k]=m.useState("");return m.useEffect(()=>{const N=y.current;N&&k((N.textContent??"").trim())},[d.children]),c.jsx(Ho.ItemSlot,{scope:s,disabled:a,textValue:l??b,children:c.jsx(EC,{asChild:!0,...h,focusable:!a,children:c.jsx(Re.div,{role:"menuitem","data-highlighted":g?"":void 0,"aria-disabled":a||void 0,"data-disabled":a?"":void 0,...d,ref:v,onPointerMove:ce(t.onPointerMove,Bo(N=>{a?p.onItemLeave(N):(p.onItemEnter(N),N.defaultPrevented||N.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ce(t.onPointerLeave,Bo(N=>p.onItemLeave(N))),onFocus:ce(t.onFocus,()=>w(!0)),onBlur:ce(t.onBlur,()=>w(!1))})})})}),AE="MenuCheckboxItem",Jg=m.forwardRef((t,r)=>{const{checked:s=!1,onCheckedChange:a,...l}=t;return c.jsx(ov,{scope:t.__scopeMenu,checked:s,children:c.jsx(Vi,{role:"menuitemcheckbox","aria-checked":Ri(s)?"mixed":s,...l,ref:r,"data-state":yc(s),onSelect:ce(l.onSelect,()=>a?.(Ri(s)?!0:!s),{checkForDefaultPrevented:!1})})})});Jg.displayName=AE;var ev="MenuRadioGroup",[ME,IE]=rr(ev,{value:void 0,onValueChange:()=>{}}),tv=m.forwardRef((t,r)=>{const{value:s,onValueChange:a,...l}=t,d=yt(a);return c.jsx(ME,{scope:t.__scopeMenu,value:s,onValueChange:d,children:c.jsx(gc,{...l,ref:r})})});tv.displayName=ev;var nv="MenuRadioItem",rv=m.forwardRef((t,r)=>{const{value:s,...a}=t,l=IE(nv,t.__scopeMenu),d=s===l.value;return c.jsx(ov,{scope:t.__scopeMenu,checked:d,children:c.jsx(Vi,{role:"menuitemradio","aria-checked":d,...a,ref:r,"data-state":yc(d),onSelect:ce(a.onSelect,()=>l.onValueChange?.(s),{checkForDefaultPrevented:!1})})})});rv.displayName=nv;var vc="MenuItemIndicator",[ov,DE]=rr(vc,{checked:!1}),sv=m.forwardRef((t,r)=>{const{__scopeMenu:s,forceMount:a,...l}=t,d=DE(vc,s);return c.jsx(Fn,{present:a||Ri(d.checked)||d.checked===!0,children:c.jsx(Re.span,{...l,ref:r,"data-state":yc(d.checked)})})});sv.displayName=vc;var LE="MenuSeparator",iv=m.forwardRef((t,r)=>{const{__scopeMenu:s,...a}=t;return c.jsx(Re.div,{role:"separator","aria-orientation":"horizontal",...a,ref:r})});iv.displayName=LE;var FE="MenuArrow",av=m.forwardRef((t,r)=>{const{__scopeMenu:s,...a}=t,l=Ki(s);return c.jsx(lg,{...l,...a,ref:r})});av.displayName=FE;var $E="MenuSub",[IN,lv]=rr($E),Do="MenuSubTrigger",uv=m.forwardRef((t,r)=>{const s=or(Do,t.__scopeMenu),a=Yo(Do,t.__scopeMenu),l=lv(Do,t.__scopeMenu),d=hc(Do,t.__scopeMenu),p=m.useRef(null),{pointerGraceTimerRef:h,onPointerGraceIntentChange:y}=d,v={__scopeMenu:t.__scopeMenu},g=m.useCallback(()=>{p.current&&window.clearTimeout(p.current),p.current=null},[]);return m.useEffect(()=>g,[g]),m.useEffect(()=>{const w=h.current;return()=>{window.clearTimeout(w),y(null)}},[h,y]),c.jsx(fc,{asChild:!0,...v,children:c.jsx(Zg,{id:l.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":l.contentId,"data-state":fv(s.open),...t,ref:zr(r,l.onTriggerChange),onClick:w=>{t.onClick?.(w),!(t.disabled||w.defaultPrevented)&&(w.currentTarget.focus(),s.open||s.onOpenChange(!0))},onPointerMove:ce(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),g()},100))})),onPointerLeave:ce(t.onPointerLeave,Bo(w=>{g();const b=s.content?.getBoundingClientRect();if(b){const k=s.content?.dataset.side,N=k==="right",S=N?-5:5,C=b[N?"left":"right"],_=b[N?"right":"left"];d.onPointerGraceIntentChange({area:[{x:w.clientX+S,y:w.clientY},{x:C,y:b.top},{x:_,y:b.top},{x:_,y:b.bottom},{x:C,y:b.bottom}],side:k}),window.clearTimeout(h.current),h.current=window.setTimeout(()=>d.onPointerGraceIntentChange(null),300)}else{if(d.onTriggerLeave(w),w.defaultPrevented)return;d.onPointerGraceIntentChange(null)}})),onKeyDown:ce(t.onKeyDown,w=>{const b=d.searchRef.current!=="";t.disabled||b&&w.key===" "||xE[a.dir].includes(w.key)&&(s.onOpenChange(!0),s.content?.focus(),w.preventDefault())})})})});uv.displayName=Do;var cv="MenuSubContent",dv=m.forwardRef((t,r)=>{const s=Gg(Nt,t.__scopeMenu),{forceMount:a=s.forceMount,...l}=t,d=or(Nt,t.__scopeMenu),p=Yo(Nt,t.__scopeMenu),h=lv(cv,t.__scopeMenu),y=m.useRef(null),v=He(r,y);return c.jsx(Ho.Provider,{scope:t.__scopeMenu,children:c.jsx(Fn,{present:a||d.open,children:c.jsx(Ho.Slot,{scope:t.__scopeMenu,children:c.jsx(mc,{id:h.contentId,"aria-labelledby":h.triggerId,...l,ref:v,align:"start",side:p.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:g=>{p.isUsingKeyboardRef.current&&y.current?.focus(),g.preventDefault()},onCloseAutoFocus:g=>g.preventDefault(),onFocusOutside:ce(t.onFocusOutside,g=>{g.target!==h.trigger&&d.onOpenChange(!1)}),onEscapeKeyDown:ce(t.onEscapeKeyDown,g=>{p.onClose(),g.preventDefault()}),onKeyDown:ce(t.onKeyDown,g=>{const w=g.currentTarget.contains(g.target),b=wE[p.dir].includes(g.key);w&&b&&(d.onOpenChange(!1),h.trigger?.focus(),g.preventDefault())})})})})})});dv.displayName=cv;function fv(t){return t?"open":"closed"}function Ri(t){return t==="indeterminate"}function yc(t){return Ri(t)?"indeterminate":t?"checked":"unchecked"}function zE(t){const r=document.activeElement;for(const s of t)if(s===r||(s.focus(),document.activeElement!==r))return}function UE(t,r){return t.map((s,a)=>t[(r+a)%t.length])}function HE(t,r,s){const l=r.length>1&&Array.from(r).every(v=>v===r[0])?r[0]:r,d=s?t.indexOf(s):-1;let p=UE(t,Math.max(d,0));l.length===1&&(p=p.filter(v=>v!==s));const y=p.find(v=>v.toLowerCase().startsWith(l.toLowerCase()));return y!==s?y:void 0}function BE(t,r){const{x:s,y:a}=t;let l=!1;for(let d=0,p=r.length-1;d<r.length;p=d++){const h=r[d],y=r[p],v=h.x,g=h.y,w=y.x,b=y.y;g>a!=b>a&&s<(w-v)*(a-g)/(b-g)+v&&(l=!l)}return l}function WE(t,r){if(!r)return!1;const s={x:t.clientX,y:t.clientY};return BE(s,r)}function Bo(t){return r=>r.pointerType==="mouse"?t(r):void 0}var KE=Qg,VE=fc,QE=qg,GE=Yg,qE=gc,YE=Xg,XE=Vi,ZE=Jg,JE=tv,ek=rv,tk=sv,nk=iv,rk=av,ok=uv,sk=dv,Qi="DropdownMenu",[ik]=Ln(Qi,[Kg]),rt=Kg(),[ak,pv]=ik(Qi),hv=t=>{const{__scopeDropdownMenu:r,children:s,dir:a,open:l,defaultOpen:d,onOpenChange:p,modal:h=!0}=t,y=rt(r),v=m.useRef(null),[g,w]=Ko({prop:l,defaultProp:d??!1,onChange:p,caller:Qi});return c.jsx(ak,{scope:r,triggerId:$o(),triggerRef:v,contentId:$o(),open:g,onOpenChange:w,onOpenToggle:m.useCallback(()=>w(b=>!b),[w]),modal:h,children:c.jsx(KE,{...y,open:g,onOpenChange:w,dir:a,modal:h,children:s})})};hv.displayName=Qi;var mv="DropdownMenuTrigger",gv=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,disabled:a=!1,...l}=t,d=pv(mv,s),p=rt(s);return c.jsx(VE,{asChild:!0,...p,children:c.jsx(Re.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":a?"":void 0,disabled:a,...l,ref:zr(r,d.triggerRef),onPointerDown:ce(t.onPointerDown,h=>{!a&&h.button===0&&h.ctrlKey===!1&&(d.onOpenToggle(),d.open||h.preventDefault())}),onKeyDown:ce(t.onKeyDown,h=>{a||(["Enter"," "].includes(h.key)&&d.onOpenToggle(),h.key==="ArrowDown"&&d.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(h.key)&&h.preventDefault())})})})});gv.displayName=mv;var lk="DropdownMenuPortal",vv=t=>{const{__scopeDropdownMenu:r,...s}=t,a=rt(r);return c.jsx(QE,{...a,...s})};vv.displayName=lk;var yv="DropdownMenuContent",xv=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...a}=t,l=pv(yv,s),d=rt(s),p=m.useRef(!1);return c.jsx(GE,{id:l.contentId,"aria-labelledby":l.triggerId,...d,...a,ref:r,onCloseAutoFocus:ce(t.onCloseAutoFocus,h=>{p.current||l.triggerRef.current?.focus(),p.current=!1,h.preventDefault()}),onInteractOutside:ce(t.onInteractOutside,h=>{const y=h.detail.originalEvent,v=y.button===0&&y.ctrlKey===!0,g=y.button===2||v;(!l.modal||g)&&(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)"}})});xv.displayName=yv;var uk="DropdownMenuGroup",ck=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...a}=t,l=rt(s);return c.jsx(qE,{...l,...a,ref:r})});ck.displayName=uk;var dk="DropdownMenuLabel",wv=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...a}=t,l=rt(s);return c.jsx(YE,{...l,...a,ref:r})});wv.displayName=dk;var fk="DropdownMenuItem",bv=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...a}=t,l=rt(s);return c.jsx(XE,{...l,...a,ref:r})});bv.displayName=fk;var pk="DropdownMenuCheckboxItem",Sv=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...a}=t,l=rt(s);return c.jsx(ZE,{...l,...a,ref:r})});Sv.displayName=pk;var hk="DropdownMenuRadioGroup",mk=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...a}=t,l=rt(s);return c.jsx(JE,{...l,...a,ref:r})});mk.displayName=hk;var gk="DropdownMenuRadioItem",Cv=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...a}=t,l=rt(s);return c.jsx(ek,{...l,...a,ref:r})});Cv.displayName=gk;var vk="DropdownMenuItemIndicator",Ev=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...a}=t,l=rt(s);return c.jsx(tk,{...l,...a,ref:r})});Ev.displayName=vk;var yk="DropdownMenuSeparator",kv=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...a}=t,l=rt(s);return c.jsx(nk,{...l,...a,ref:r})});kv.displayName=yk;var xk="DropdownMenuArrow",wk=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...a}=t,l=rt(s);return c.jsx(rk,{...l,...a,ref:r})});wk.displayName=xk;var bk="DropdownMenuSubTrigger",Nv=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...a}=t,l=rt(s);return c.jsx(ok,{...l,...a,ref:r})});Nv.displayName=bk;var Sk="DropdownMenuSubContent",Rv=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...a}=t,l=rt(s);return c.jsx(sk,{...l,...a,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)"}})});Rv.displayName=Sk;var Ck=hv,Ek=gv,kk=vv,Pv=xv,jv=wv,Tv=bv,_v=Sv,Ov=Cv,Av=Ev,Mv=kv,Iv=Nv,Dv=Rv;const Nk=Ck,Rk=Ek,Pk=m.forwardRef(({className:t,inset:r,children:s,...a},l)=>c.jsxs(Iv,{ref:l,className:Le("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),...a,children:[s,c.jsx(C0,{className:"ml-auto"})]}));Pk.displayName=Iv.displayName;const jk=m.forwardRef(({className:t,...r},s)=>c.jsx(Dv,{ref:s,className:Le("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}));jk.displayName=Dv.displayName;const Lv=m.forwardRef(({className:t,sideOffset:r=4,...s},a)=>c.jsx(kk,{children:c.jsx(Pv,{ref:a,sideOffset:r,className:Le("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})}));Lv.displayName=Pv.displayName;const Tk=m.forwardRef(({className:t,inset:r,...s},a)=>c.jsx(Tv,{ref:a,className:Le("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}));Tk.displayName=Tv.displayName;const _k=m.forwardRef(({className:t,children:r,checked:s,...a},l)=>c.jsxs(_v,{ref:l,className:Le("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,...a,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(Av,{children:c.jsx(S0,{className:"h-4 w-4"})})}),r]}));_k.displayName=_v.displayName;const Ok=m.forwardRef(({className:t,children:r,...s},a)=>c.jsxs(Ov,{ref:a,className:Le("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:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(Av,{children:c.jsx(k0,{className:"h-2 w-2 fill-current"})})}),r]}));Ok.displayName=Ov.displayName;const Ak=m.forwardRef(({className:t,inset:r,...s},a)=>c.jsx(jv,{ref:a,className:Le("px-2 py-1.5 text-sm font-semibold",r&&"pl-8",t),...s}));Ak.displayName=jv.displayName;const Mk=m.forwardRef(({className:t,...r},s)=>c.jsx(Mv,{ref:s,className:Le("-mx-1 my-1 h-px bg-muted",t),...r}));Mk.displayName=Mv.displayName;function Ik(t){return t.replace("_"," ").toUpperCase()}function Dk(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 Fv(t){return t==="resolved"||t==="rejected"}function Lk(t){return Fv(t)||t==="warning"}function $v(t){return t.length===0?!1:t.every(r=>Fv(r.status))}function Wo(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 Fk={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"},$k={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:[]},zk={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"},Uk={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 Hk(t){return Fk[t]}function Bk(t){return $k[t]}function Rh(t){return t==="pause"?"Pause":t==="resume"?"Resume":t==="retry"?"Retry":"Cancel"}function Wk(t){return zk[t]}function Kk(t){return Uk[t]}function Vk(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 Qk(t){return t?t.blockedReason??t.escalationReason??t.latestFingerprint??null:null}function Gk(t,r){const s=t.filter(a=>a.prId===r);return s.length===0?null:s.reduce((a,l)=>l.updatedAt>a.updatedAt?l:a)}function qk(t,r){return Gk(t,r)}function Yk(t,r){return{stateLabel:Hk(t.state),tone:Wk(t.state),attemptSummary:Vk(t),reasonSummary:Qk(t),statusHint:Kk(t.state),actions:Bk(t.state).map(s=>({label:Rh(s),available:!0,hint:`${Rh(s)} controls are planned but not wired to the backend yet.`}))}}function Mt(t){return t?new Date(t).toLocaleTimeString("en-US",{hour12:!1}):null}function zv(t){return t.watchEnabled}function Uv(t){return t==="processing"?"autonomous run active":t==="done"?"completed":t==="error"?"attention needed":t==="archived"?"archived":"watching"}function Xk(t){return`${Math.max(1,Math.round((t??12e4)/1e3))}s`}const Zk=[{value:"mine",label:"My PRs only"},{value:"team",label:"My PRs + teammates"}],Jk={failed:[],inProgress:[],queued:[],generatedAt:""},fu=200;function eN(t){return t===!1?"team":"mine"}const Ph={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 Hv({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 c.jsx("span",{className:`inline-block h-1.5 w-1.5 shrink-0 ${r}`})}function tN({status:t}){const r=Dk(t);return c.jsx("span",{className:`inline-block border px-1.5 py-0 text-[11px] uppercase tracking-wide ${r}`,children:Ik(t)})}function Iu(){return c.jsx("span",{className:"border border-border px-1.5 py-0 text-[10px] uppercase tracking-wider text-muted-foreground",children:"watch paused"})}function jh({value:t,onChange:r,disabled:s,name:a,testIdPrefix:l,compact:d=!1}){return c.jsx("div",{role:"radiogroup","aria-label":"Automatic PR tracking scope",className:`flex flex-wrap gap-1 ${d?"":"mt-1"}`,children:Zk.map(p=>{const h=t===p.value;return c.jsxs("label",{"data-testid":`${l}-${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:[c.jsx("input",{type:"radio",name:a,value:p.value,checked:h,onChange:()=>r(p.value),disabled:s,className:"sr-only"}),p.label]},p.value)})})}function nN({activity:t}){const r=t.status==="failed"?Mt(t.updatedAt):t.status==="in_progress"?Mt(t.startedAt)??Mt(t.updatedAt):Mt(t.availableAt)??Mt(t.queuedAt),s=c.jsxs("div",{className:"flex min-w-0 items-start gap-2 px-2 py-1.5 text-left",children:[c.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"}`}),c.jsxs("span",{className:"min-w-0 flex-1",children:[c.jsx("span",{className:"block truncate text-[12px] leading-4 text-foreground",children:t.label}),t.detail&&c.jsx("span",{className:"block truncate text-[11px] leading-4 text-muted-foreground",children:t.detail}),t.status==="failed"&&t.lastError&&c.jsx("span",{className:"block truncate text-[11px] leading-4 text-destructive",children:t.lastError})]}),r&&c.jsx("span",{className:"shrink-0 text-[10px] leading-4 text-muted-foreground",children:r})]});return t.targetUrl?c.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}):c.jsx("div",{children:s})}function pu({title:t,items:r,emptyLabel:s}){return c.jsxs("div",{className:"py-1",children:[c.jsx("div",{className:"px-2 py-1 text-[10px] uppercase tracking-wider text-muted-foreground",children:t}),r.length>0?c.jsx("div",{className:"max-h-52 overflow-y-auto",children:r.map(a=>c.jsx(nN,{activity:a},a.id))}):c.jsx("div",{className:"px-2 pb-2 text-[11px] text-muted-foreground",children:s})]})}function rN({activities:t}){const r=t.failed.length,s=t.inProgress.length,a=t.queued.length,l=r+s+a;return c.jsxs(Nk,{children:[c.jsxs(Rk,{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:[c.jsx(b0,{className:"h-3 w-3","aria-hidden":"true"}),c.jsx("span",{children:"activity"}),c.jsx("span",{className:"text-foreground",children:l})]}),c.jsxs(Lv,{align:"end",className:"w-80 p-0",children:[c.jsxs("div",{className:"border-b border-border px-2 py-2",children:[c.jsx("div",{className:"text-[12px] font-medium",children:"Activities"}),c.jsxs("div",{className:"text-[11px] text-muted-foreground",children:[r," failed / ",s," in progress / ",a," queued"]})]}),c.jsx(pu,{title:"Failed",items:t.failed,emptyLabel:"No failed activities."}),c.jsx("div",{className:"border-t border-border"}),c.jsx(pu,{title:"In progress",items:t.inProgress,emptyLabel:"No activities running right now."}),c.jsx("div",{className:"border-t border-border"}),c.jsx(pu,{title:"Queued",items:t.queued,emptyLabel:"Queue is empty."})]})]})}function Bv({href:t,testId:r,label:s,hint:a,className:l,dotClassName:d,hintClassName:p,onClick:h}){return c.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 ${l}`,children:[c.jsx("span",{className:`inline-block rounded-full bg-success ${d}`}),s,a&&c.jsx("span",{className:p,children:a})]})}function Wv({pr:t}){const r=Wo(t.feedbackItems).inProgress;if(!(t.status==="processing")&&r===0)return null;const a=r>0?`${r} agent${r!==1?"s":""} running on this PR`:"Agent run active on this PR";return c.jsxs(VS,{children:[c.jsx(QS,{asChild:!0,children:c.jsxs("span",{className:"inline-flex shrink-0 cursor-default items-center gap-0.5 text-[12px]","data-testid":`agent-indicator-${t.id}`,children:[c.jsx("span",{className:"animate-pulse",children:"🤖"}),r>0&&c.jsx("span",{className:"text-[10px] text-muted-foreground",children:r})]})}),c.jsx(vg,{side:"top",children:c.jsx("p",{className:"text-xs",children:a})})]})}const oN=m.memo(function({pr:r,isSelected:s,onSelect:a}){const l=Mt(r.lastChecked),d=zv(r),h=!(r.status==="processing"||Wo(r.feedbackItems).inProgress>0)&&$v(r.feedbackItems);return c.jsx("div",{onClick:()=>a(r.id),onKeyDown:y=>{y.target===y.currentTarget&&(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),a(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:c.jsxs("div",{className:"flex items-start gap-3",children:[c.jsx(Hv,{status:r.status}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsxs("span",{className:"w-12 shrink-0 text-muted-foreground",children:["#",r.number]}),c.jsx("span",{className:"truncate",children:r.title}),c.jsx(Wv,{pr:r})]}),h&&c.jsx(Bv,{href:r.url,testId:`ready-to-merge-${r.id}`,label:"Ready to merge",hint:"— click to open PR",onClick:y=>y.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"}),c.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:[c.jsx("a",{href:r.url,target:"_blank",rel:"noopener noreferrer",onClick:y=>y.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}),c.jsx("span",{children:Uv(r.status)}),!d&&c.jsx(Iu,{}),r.feedbackItems.length>0&&(()=>{const y=Wo(r.feedbackItems),v=[];return y.queued>0&&v.push(`${y.queued}q`),y.inProgress>0&&v.push(`${y.inProgress} active`),y.failed>0&&v.push(`${y.failed} failed`),y.warning>0&&v.push(`${y.warning} warn`),v.length===0?c.jsxs("span",{children:[r.feedbackItems.length," items"]}):c.jsx("span",{children:v.join(" · ")})})(),l&&c.jsxs("span",{children:["checked ",l]})]})]})]})})});function sN({item:t,prId:r,readOnly:s}){const a=ct({mutationFn:async h=>(await nt("PATCH",`/api/prs/${r}/feedback/${t.id}`,{decision:h})).json(),onSuccess:()=>{we.invalidateQueries({queryKey:["/api/prs"]}),we.invalidateQueries({queryKey:["/api/prs",r]})}}),l=ct({mutationFn:async()=>(await nt("POST",`/api/prs/${r}/feedback/${t.id}/retry`)).json(),onSuccess:()=>{we.invalidateQueries({queryKey:["/api/prs"]}),we.invalidateQueries({queryKey:["/api/prs",r]}),we.invalidateQueries({queryKey:["/api/activities"]}),we.invalidateQueries({queryKey:["/api/logs"]})},onError:h=>{Ht("Could not retry feedback item",h)}}),d=Mt(t.createdAt),p=Lk(t.status);return c.jsxs(Sg,{defaultOpen:!p,className:"border-b border-border",children:[c.jsx("div",{className:"px-4 py-3",children:c.jsxs("div",{className:"flex items-start gap-3",children:[c.jsx("div",{className:"shrink-0 pt-0.5",children:c.jsx(tN,{status:t.status})}),c.jsx("div",{className:"min-w-0 flex-1",children:c.jsxs("div",{className:"mb-1 flex flex-wrap items-center gap-2",children:[c.jsx("span",{className:"font-medium",children:t.author}),t.file&&c.jsxs("span",{className:"text-[11px] text-muted-foreground",children:[t.file,t.line?`:${t.line}`:""]}),c.jsx("span",{className:"text-[11px] text-muted-foreground",children:t.type.replace("_"," ")}),d&&c.jsx("span",{className:"text-[11px] text-muted-foreground",children:d})]})}),c.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[!s&&(t.status==="failed"||t.status==="warning")&&c.jsx("button",{type:"button",onClick:()=>l.mutate(),disabled:l.isPending,"data-testid":`retry-${t.id}`,"aria-label":`Retry feedback from ${t.author}`,title:"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:"Retry"}),c.jsx(Cg,{asChild:!0,children:c.jsx("button",{type:"button","data-testid":`toggle-${t.id}`,"aria-label":`${p?"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(h=>c.jsx("button",{type:"button",onClick:()=>a.mutate(h),"data-testid":`override-${h}-${t.id}`,"aria-label":`${h} 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===h?"bg-foreground text-background":"border border-border text-muted-foreground"}`,children:h},h))]})]})}),c.jsx(Eg,{children:c.jsxs("div",{className:"px-4 pb-3",children:[t.bodyHtml?c.jsx("div",{className:"feedback-markdown text-[12px] leading-relaxed",dangerouslySetInnerHTML:{__html:t.bodyHtml}}):c.jsx("p",{className:"whitespace-pre-wrap text-[12px] leading-relaxed text-foreground/80",children:t.body}),(t.statusReason||t.decisionReason)&&c.jsx("p",{className:"mt-2 text-[11px] text-muted-foreground",children:t.statusReason||t.decisionReason})]})})]})}function iN({prId:t}){const r=m.useRef(null),{data:s=[]}=dt({queryKey:["/api/logs",t??"all"],queryFn:async()=>{const d=t?`/api/logs?prId=${encodeURIComponent(t)}`:"/api/logs";return(await nt("GET",d)).json()},refetchInterval:1500}),a=m.useMemo(()=>s.length>fu?s.slice(-fu):s,[s]),l=s.length-a.length;return m.useEffect(()=>{const d=r.current;d&&(d.scrollTop=d.scrollHeight)},[s.length,t]),c.jsx("div",{className:"flex h-full flex-col",children:c.jsx("div",{ref:r,className:"flex-1 overflow-y-auto p-4 font-mono text-[11px] leading-relaxed",children:s.length===0?c.jsx("span",{className:"text-muted-foreground",children:"No log entries."}):c.jsxs(c.Fragment,{children:[l>0&&c.jsxs("div",{className:"border-b border-border/60 pb-2 text-[10px] uppercase tracking-wider text-muted-foreground",children:["Showing latest ",fu," of ",s.length," entries."]}),a.map(d=>{const p=d.metadata&&Object.keys(d.metadata).length>0?JSON.stringify(d.metadata,null,2):null;return c.jsxs("div",{className:"border-b border-border/60 py-2 last:border-b-0","data-testid":`log-${d.id}`,children:[c.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-[10px] uppercase tracking-wider text-muted-foreground",children:[c.jsx("span",{children:Mt(d.timestamp)}),c.jsx("span",{className:d.level==="error"?"text-destructive":d.level==="warn"?"text-foreground/80":"text-foreground/55",children:d.level}),d.phase&&c.jsx("span",{className:"border border-border px-1 py-0",children:d.phase}),d.runId&&c.jsxs("span",{className:"normal-case text-foreground/45",children:["run ",d.runId.slice(0,8)]})]}),c.jsx("div",{className:"mt-1 break-words text-foreground/75",children:d.message}),p&&c.jsx("pre",{className:"mt-1 whitespace-pre-wrap break-all text-[10px] text-muted-foreground",children:p})]},d.id)})]})})})}function aN({pr:t,config:r,healingSessions:s}){const a=qk(s,t.id),l=a?Yk(a):null,d=l?Ph[l.tone]:Ph.neutral;return c.jsxs("div",{className:"shrink-0 border-b border-border px-4 py-3","data-testid":"panel-ci-healing",children:[c.jsxs("div",{className:"flex items-start justify-between gap-3",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground",children:"CI healing"}),c.jsx("div",{className:"mt-1 flex flex-wrap items-center gap-2",children:l?c.jsxs(c.Fragment,{children:[c.jsx("span",{className:`inline-flex border px-1.5 py-0.5 text-[11px] uppercase tracking-wider ${d}`,children:l.stateLabel}),c.jsx("span",{className:"text-[11px] text-muted-foreground",children:l.attemptSummary})]}):c.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."})})]}),a&&c.jsxs("span",{className:"shrink-0 text-[10px] text-muted-foreground",children:["head ",a.currentHeadSha.slice(0,7)]})]}),l?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"mt-2 grid gap-1 text-[11px] text-muted-foreground",children:[l.reasonSummary&&c.jsxs("div",{children:["Reason: ",l.reasonSummary]}),c.jsx("div",{children:l.statusHint}),c.jsxs("div",{children:["Attempts: ",l.attemptSummary,a?.latestFingerprint?` · fingerprint ${a.latestFingerprint}`:""]})]}),l.actions.length>0&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:l.actions.map(p=>c.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))}),c.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&&c.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 lN({prId:t}){const[r,s]=m.useState("ask");return c.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:[c.jsxs("div",{className:"flex border-b border-border",children:[c.jsx("button",{type:"button",onClick:()=>s("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 ${r==="ask"?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"}`,children:"Ask Agent"}),c.jsx("button",{type:"button",onClick:()=>s("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 ${r==="activity"?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"}`,children:"Activity"})]}),c.jsx("div",{className:"flex-1 overflow-hidden",children:r==="activity"?c.jsx(iN,{prId:t}):t?c.jsx(uN,{prId:t}):c.jsx("div",{className:"flex h-full items-center justify-center text-[12px] text-muted-foreground",children:"Select a PR to ask questions."})})]})}function uN({prId:t}){const[r,s]=m.useState(""),a=m.useRef(null),{data:l=[]}=dt({queryKey:["/api/prs",t,"questions"],refetchInterval:2e3}),d=ct({mutationFn:p=>nt("POST",`/api/prs/${t}/questions`,{question:p}).then(h=>h.json()),onSuccess:()=>{we.invalidateQueries({queryKey:["/api/prs",t,"questions"]}),we.invalidateQueries({queryKey:["/api/activities"]}),s("")}});return m.useEffect(()=>{const p=a.current;p&&(p.scrollTop=p.scrollHeight)},[l.length,l[l.length-1]?.status]),c.jsxs("div",{className:"flex h-full flex-col",children:[c.jsx("div",{className:"border-b border-border px-4 py-2 text-[11px] uppercase tracking-wider text-muted-foreground",children:"Ask Agent"}),c.jsx("div",{ref:a,className:"flex-1 overflow-y-auto p-4 space-y-3",children:l.length===0?c.jsx("span",{className:"text-[12px] text-muted-foreground",children:"Ask questions about this PR — the agent will read activity logs, feedback, and status to answer."}):l.map(p=>c.jsxs("div",{className:"space-y-1.5","data-testid":`question-${p.id}`,children:[c.jsxs("div",{className:"text-[12px]",children:[c.jsx("span",{className:"font-medium text-foreground/90",children:"Q: "}),c.jsx("span",{className:"text-foreground/80",children:p.question})]}),p.status==="pending"||p.status==="answering"?c.jsx("div",{className:"text-[11px] text-muted-foreground animate-pulse",children:"Agent is thinking..."}):p.status==="error"?c.jsxs("div",{className:"text-[11px] text-destructive",children:["Error: ",p.error||"Unknown error"]}):c.jsx("div",{className:"text-[12px] leading-relaxed text-foreground/75 whitespace-pre-wrap border-l-2 border-border pl-3",children:p.answer}),c.jsxs("div",{className:"text-[10px] text-muted-foreground",children:[Mt(p.createdAt),p.answeredAt&&` — answered ${Mt(p.answeredAt)}`]})]},p.id))}),c.jsxs("form",{onSubmit:p=>{p.preventDefault(),r.trim()&&!d.isPending&&d.mutate(r.trim())},className:"border-t border-border p-3",children:[c.jsxs("div",{className:"flex gap-2",children:[c.jsx("input",{type:"text",value:r,onChange:p=>s(p.target.value),placeholder:"Was the review done? Why did this fail?","aria-label":"Question for selected pull request","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"}),c.jsx("button",{type:"submit",disabled:d.isPending||!r.trim(),"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:d.isPending?"...":"Ask"})]}),d.isError&&c.jsx("div",{className:"mt-1 text-[11px] text-destructive",children:Kv(d.error)})]})]})}function Kv(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 Ht(t,r){Vt({variant:"destructive",title:t,description:Kv(r)})}function cN(){const[t,r]=m.useState(null),[s,a]=m.useState(""),[l,d]=m.useState(""),[p,h]=m.useState(null),[y,v]=m.useState("mine"),[g,w]=m.useState("active"),{data:b=[],isLoading:k}=dt({queryKey:["/api/prs"],refetchInterval:3e3}),{data:N=[],isLoading:S}=dt({queryKey:["/api/prs/archived"],refetchInterval:1e4}),{data:C}=dt({queryKey:["/api/config"],refetchInterval:5e3}),{data:_=[]}=dt({queryKey:["/api/healing-sessions"],queryFn:async()=>sb("/api/healing-sessions"),refetchInterval:5e3}),{data:A=Jk}=dt({queryKey:["/api/activities"],refetchInterval:3e3}),{data:O=[]}=dt({queryKey:["/api/repos/settings"],refetchInterval:5e3}),I=g==="active"?b:N,F=g==="archived";m.useEffect(()=>{if(I.length===0){t!==null&&r(null);return}(!t||!I.some(P=>P.id===t))&&r(I[0].id)},[I,t]);const L=I.find(P=>P.id===t)??null,U=L?zv(L):!0,q=ZS(p,O.length),te=ct({mutationFn:async P=>(await nt("POST","/api/prs",{url:P})).json(),onSuccess:P=>{we.invalidateQueries({queryKey:["/api/prs"]}),we.invalidateQueries({queryKey:["/api/activities"]}),we.invalidateQueries({queryKey:["/api/repos/settings"]}),we.invalidateQueries({queryKey:["/api/onboarding/status"]}),a(""),r(P.id)},onError:P=>{Ht("Could not add PR",P)}}),ne=ct({mutationFn:async P=>(await nt("POST",`/api/prs/${P}/apply`)).json(),onSuccess:()=>{we.invalidateQueries({queryKey:["/api/prs"]}),we.invalidateQueries({queryKey:["/api/activities"]}),we.invalidateQueries({queryKey:["/api/logs"]})},onError:P=>{Ht("Could not run babysitter",P)}}),se=ct({mutationFn:async({id:P,enabled:z})=>(await nt("PATCH",`/api/prs/${P}/watch`,{enabled:z})).json(),onSuccess:()=>{we.invalidateQueries({queryKey:["/api/prs"]}),we.invalidateQueries({queryKey:["/api/prs/archived"]}),we.invalidateQueries({queryKey:["/api/logs"]})},onError:P=>{Ht("Could not update PR watch state",P)}}),Y=ct({mutationFn:async P=>(await nt("PATCH","/api/config",P)).json(),onSuccess:()=>{we.invalidateQueries({queryKey:["/api/config"]}),we.invalidateQueries({queryKey:["/api/onboarding/status"]})},onError:P=>{Ht("Could not update settings",P)}}),ae=ct({mutationFn:async()=>(await nt("POST","/api/repos/sync")).json(),onSuccess:()=>{we.invalidateQueries({queryKey:["/api/prs"]}),we.invalidateQueries({queryKey:["/api/activities"]}),we.invalidateQueries({queryKey:["/api/repos/settings"]}),we.invalidateQueries({queryKey:["/api/onboarding/status"]})},onError:P=>{Ht("Could not sync repositories",P)}}),G=ct({mutationFn:async P=>(await nt("POST","/api/repos/release",{repo:P})).json(),onSuccess:()=>{we.invalidateQueries({queryKey:["/api/releases"]}),we.invalidateQueries({queryKey:["/api/activities"]}),Vt({description:"Release queued."})},onError:P=>{Ht("Could not create release",P)}}),me=async P=>(await nt("PATCH","/api/repos/settings",P)).json(),ee=ct({mutationFn:me,onSuccess:()=>{we.invalidateQueries({queryKey:["/api/repos/settings"]}),we.invalidateQueries({queryKey:["/api/onboarding/status"]})},onError:P=>{Ht("Could not update repository settings",P)}}),ie=ct({mutationFn:async({repo:P})=>(await nt("POST","/api/repos",{repo:P})).json(),onSuccess:async(P,z)=>{if(we.invalidateQueries({queryKey:["/api/repos/settings"]}),we.invalidateQueries({queryKey:["/api/prs"]}),we.invalidateQueries({queryKey:["/api/onboarding/status"]}),d(""),v("mine"),z.watchScope==="team")try{await me({repo:P.repo,ownPrsOnly:!1}),we.invalidateQueries({queryKey:["/api/repos/settings"]})}catch(V){Ht("Repository added, but could not update tracking scope",V)}},onError:P=>{Ht("Could not watch repository",P)}});return c.jsxs("div",{className:"flex min-h-screen flex-col lg:h-screen lg:overflow-hidden",children:[c.jsx(Bi,{}),c.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:[c.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[c.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-label":"oh-my-pr",children:[c.jsx("rect",{x:"1",y:"1",width:"14",height:"14",stroke:"currentColor",strokeWidth:"1.5"}),c.jsx("path",{d:"M4 5h8M4 8h5M4 11h6",stroke:"currentColor",strokeWidth:"1"})]}),c.jsx("span",{className:"text-sm font-medium tracking-tight",children:"oh-my-pr"}),c.jsx("span",{className:"border border-border px-1.5 py-0 text-[10px] uppercase tracking-wider text-muted-foreground",children:"autonomous"}),c.jsxs("span",{className:"text-[11px] text-muted-foreground",children:["poll ",Xk(C?.pollIntervalMs)]}),c.jsx(An,{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"}),c.jsx(An,{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"})]}),c.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[c.jsxs("span",{className:"text-[11px] text-muted-foreground",children:[b.length," PR",b.length!==1?"s":""," in ",O.length," repo",O.length!==1?"s":""]}),c.jsx("label",{htmlFor:"dashboard-coding-agent",className:"text-[11px] uppercase tracking-wider text-muted-foreground",children:"Agent"}),c.jsxs("select",{id:"dashboard-coding-agent",value:C?.codingAgent??"codex",onChange:P=>{const z=P.target.value;Y.mutate({codingAgent:z})},disabled:Y.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:[c.jsx("option",{value:"codex",children:"codex"}),c.jsx("option",{value:"claude",children:"claude"})]}),c.jsx(An,{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"}),c.jsx(rN,{activities:A})]})]}),c.jsx(nC,{}),c.jsxs("div",{className:"flex flex-1 flex-col overflow-y-auto lg:flex-row lg:overflow-hidden",children:[c.jsxs("div",{className:"flex max-h-[42vh] w-full shrink-0 flex-col border-b border-border lg:max-h-none lg:w-80 lg:border-b-0 lg:border-r",children:[c.jsxs("div",{className:"flex border-b border-border",children:[c.jsxs("button",{type:"button",onClick:()=>w("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 ${g==="active"?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"}`,children:["Active (",b.length,")"]}),c.jsxs("button",{type:"button",onClick:()=>w("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 ${g==="archived"?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"}`,children:["Archived (",N.length,")"]})]}),!F&&c.jsxs(c.Fragment,{children:[c.jsxs(Sg,{open:q,onOpenChange:h,className:"border-b border-border",children:[c.jsxs("div",{className:"flex items-center justify-between gap-2 px-3 py-2 text-[11px] text-muted-foreground",children:[c.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."}),c.jsx(Cg,{asChild:!0,children:c.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:q?"Hide":"Add"})})]}),c.jsxs(Eg,{children:[c.jsx("form",{onSubmit:P=>{P.preventDefault(),s.trim()&&te.mutate(s.trim())},className:"border-t border-border p-3",children:c.jsxs("div",{className:"flex gap-2",children:[c.jsx("input",{type:"text",value:s,onChange:P=>a(P.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"}),c.jsx("button",{type:"submit",disabled:te.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"})]})}),c.jsxs("form",{onSubmit:P=>{P.preventDefault();const z=l.trim();z&&ie.mutate({repo:z,watchScope:y})},className:"border-t border-border p-3",children:[c.jsxs("div",{className:"flex gap-2",children:[c.jsx("input",{type:"text",value:l,onChange:P=>d(P.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"}),c.jsx("button",{type:"submit",disabled:ie.isPending||!l.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"})]}),c.jsxs("div",{className:"mt-3",children:[c.jsx("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground",children:"Track automatically"}),c.jsx(jh,{value:y,onChange:v,disabled:ie.isPending,name:"watch-scope",testIdPrefix:"watch-scope"})]})]})]})]}),c.jsxs("div",{className:"border-b border-border p-3",children:[c.jsxs("div",{className:"mb-1 flex items-center justify-between",children:[c.jsx("span",{className:"text-[10px] uppercase tracking-wider text-muted-foreground",children:"Tracked repositories"}),c.jsx("button",{type:"button",onClick:()=>ae.mutate(),disabled:ae.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:ae.isPending?"Fetching...":"Fetch"})]}),O.length===0?c.jsx("div",{className:"text-[11px] text-muted-foreground",children:"No repositories being watched yet."}):c.jsx("div",{className:"space-y-1 text-[12px]",children:O.map(P=>{const z=G.isPending&&G.variables===P.repo;return c.jsxs("div",{className:"space-y-2 border border-border/60 px-2 py-2",children:[c.jsx("a",{href:XS(P.repo),target:"_blank",rel:"noopener noreferrer","data-testid":`tracked-repo-${P.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:P.repo}),c.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-2",children:[c.jsxs("div",{children:[c.jsx("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground",children:"Track automatically"}),c.jsx(jh,{value:eN(P.ownPrsOnly),onChange:V=>ee.mutate({repo:P.repo,ownPrsOnly:V==="mine"}),disabled:ee.isPending,name:`tracked-repo-scope-${P.repo}`,testIdPrefix:`tracked-repo-scope-${P.repo.replace("/","-")}`,compact:!0})]}),c.jsxs("div",{className:"flex shrink-0 flex-wrap items-center justify-end gap-2 self-end",children:[c.jsxs("label",{className:"flex items-center gap-1.5 text-[10px] uppercase tracking-wider text-muted-foreground",children:[c.jsx("input",{type:"checkbox",checked:P.autoCreateReleases,onChange:V=>ee.mutate({repo:P.repo,autoCreateReleases:V.target.checked}),disabled:ee.isPending,"data-testid":`tracked-repo-auto-release-${P.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"]}),c.jsx("button",{type:"button",onClick:()=>G.mutate(P.repo),disabled:G.isPending,"data-testid":`tracked-repo-manual-release-${P.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:z?"Releasing...":"Release"})]})]})]},P.repo)})})]})]}),c.jsx("div",{className:"flex-1 overflow-y-auto",children:(F?S:k)?c.jsx("div",{className:"p-4 text-[12px] text-muted-foreground",children:"Loading..."}):I.length===0?c.jsx("div",{className:"p-4 text-[12px] text-muted-foreground",children:F?"No archived PRs. Closed PRs are archived automatically.":"No PRs tracked yet. Add a repository to watch or add a PR URL."}):I.map(P=>c.jsx(oN,{pr:P,isSelected:P.id===t,onSelect:r},P.id))})]}),c.jsx("div",{className:"flex min-h-[32rem] flex-1 flex-col overflow-hidden lg:min-h-0",children:L?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"shrink-0 border-b border-border px-4 py-3",children:[c.jsxs("div",{className:"mb-1 flex items-start justify-between gap-4",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c.jsx(Hv,{status:L.status}),c.jsx("span",{className:"truncate font-medium",children:L.title}),c.jsx(Wv,{pr:L}),!U&&c.jsx(Iu,{}),c.jsxs("a",{href:L.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:[L.repo,"#",L.number]})]}),c.jsxs("div",{className:"mt-1 flex flex-wrap gap-x-4 gap-y-1 text-[11px] text-muted-foreground",children:[c.jsxs("span",{children:["status: ",Uv(L.status)]}),!U&&c.jsx(Iu,{}),c.jsxs("span",{children:[L.feedbackItems.length," items"]}),L.feedbackItems.length>0&&(()=>{const P=Wo(L.feedbackItems);return c.jsxs(c.Fragment,{children:[P.queued>0&&c.jsxs("span",{children:[P.queued," queued"]}),P.inProgress>0&&c.jsxs("span",{children:[P.inProgress," in progress"]}),P.failed>0&&c.jsxs("span",{children:[P.failed," failed"]}),P.warning>0&&c.jsxs("span",{children:[P.warning," warnings"]})]})})(),L.testsPassed!==null&&c.jsxs("span",{children:["tests: ",L.testsPassed?"pass":"fail"]}),L.lintPassed!==null&&c.jsxs("span",{children:["lint: ",L.lintPassed?"pass":"fail"]}),L.lastChecked&&c.jsxs("span",{children:["checked ",Mt(L.lastChecked)]})]})]}),!F&&c.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[c.jsx("button",{type:"button",onClick:()=>ne.mutate(L.id),disabled:ne.isPending||L.status==="processing","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:L.status==="processing"?"Running":"Run now"}),c.jsx("button",{type:"button",onClick:()=>se.mutate({id:L.id,enabled:!U}),disabled:se.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:U?"Pause watch":"Resume watch"})]})]}),$v(L.feedbackItems)&&L.status!=="processing"&&Wo(L.feedbackItems).inProgress===0&&c.jsx(Bv,{href:L.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"}),c.jsx("div",{className:"text-[11px] text-muted-foreground",children:U?"Background watcher syncs GitHub feedback and pushes approved fixes automatically.":"Background watch is paused for this PR; manual runs still work."})]}),c.jsx(aN,{pr:L,config:C,healingSessions:_}),c.jsx("div",{className:"flex-1 overflow-y-auto",children:L.feedbackItems.length===0?c.jsx("div",{className:"p-4 text-[12px] text-muted-foreground",children:U?"No feedback yet. The watcher will sync GitHub comments automatically.":"No feedback yet. Background watch is paused for this PR."}):L.feedbackItems.map(P=>c.jsx(sN,{item:P,prId:L.id,readOnly:F},P.id))})]}):c.jsx("div",{className:"flex flex-1 items-center justify-center text-[12px] text-muted-foreground",children:"Select a PR from the left panel."})}),c.jsx(lN,{prId:t})]})]})}function dN(){const{data:t}=dt({queryKey:["/api/config"]}),[r,s]=m.useState(""),[a,l]=m.useState(!1),d=t?.githubTokens??(t?.githubToken?[t.githubToken]:[]),p=g=>{v.mutate({githubTokens:g})},h=(g,w)=>{const b=[...d],[k]=b.splice(g,1);k&&(b.splice(w,0,k),p(b))},y=g=>{p(d.filter((w,b)=>b!==g))},v=ct({mutationFn:async g=>(await nt("PATCH","/api/config",g)).json(),onSuccess:()=>{we.invalidateQueries({queryKey:["/api/config"]}),we.invalidateQueries({queryKey:["/api/onboarding/status"]}),Vt({description:"Settings saved."})},onError:g=>{Vt({variant:"destructive",description:`Failed to save: ${g.message}`})}});return c.jsxs("div",{className:"flex min-h-screen flex-col",children:[c.jsx(Bi,{}),c.jsx("header",{className:"flex shrink-0 items-center justify-between border-b border-border px-4 py-2.5",children:c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx(An,{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"}),c.jsx("span",{className:"text-sm font-medium tracking-tight",children:"settings"})]})}),c.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:c.jsxs("div",{className:"mx-auto flex max-w-2xl flex-col gap-8",children:[c.jsxs("section",{children:[c.jsx("h2",{className:"mb-4 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Agent"}),c.jsx("div",{className:"flex flex-col gap-4 rounded border border-border p-4",children:c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsx("label",{htmlFor:"settings-coding-agent",className:"text-sm",children:"Coding Agent"}),c.jsx("div",{className:"text-[11px] text-muted-foreground",children:"CLI agent used to apply fixes"})]}),c.jsxs("select",{id:"settings-coding-agent",value:t?.codingAgent??"codex",onChange:g=>{const w=g.target.value;v.mutate({codingAgent:w})},disabled:v.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:[c.jsx("option",{value:"codex",children:"codex"}),c.jsx("option",{value:"claude",children:"claude"})]})]})})]}),c.jsxs("section",{children:[c.jsx("h2",{className:"mb-4 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Automation"}),c.jsxs("div",{className:"flex flex-col gap-4 rounded border border-border p-4",children:[c.jsxs("label",{className:"flex items-center justify-between gap-3 cursor-pointer",children:[c.jsxs("div",{children:[c.jsx("div",{className:"text-sm",children:"Auto-resolve conflicts"}),c.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Ask the agent to resolve merge conflicts when tracked PRs are not mergeable."})]}),c.jsx("input",{type:"checkbox",checked:t?.autoResolveMergeConflicts??!0,onChange:g=>v.mutate({autoResolveMergeConflicts:g.target.checked}),disabled:v.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"})]}),c.jsxs("label",{className:"flex items-center justify-between gap-3 cursor-pointer",children:[c.jsxs("div",{children:[c.jsx("div",{className:"text-sm",children:"Auto-update docs"}),c.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Automatically assess whether tracked PRs need documentation updates."})]}),c.jsx("input",{type:"checkbox",checked:t?.autoUpdateDocs??!0,onChange:g=>v.mutate({autoUpdateDocs:g.target.checked}),disabled:v.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"})]})]})]}),c.jsxs("section",{children:[c.jsx("h2",{className:"mb-4 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Tuning"}),c.jsxs("div",{className:"flex flex-col gap-4 rounded border border-border p-4",children:[c.jsx(Tn,{label:"Max turns",description:"Maximum agent turns per feedback item",value:t?.maxTurns??15,onChange:g=>v.mutate({maxTurns:g}),disabled:v.isPending}),c.jsx(Tn,{label:"Poll interval (ms)",description:"How often to check for new feedback",value:t?.pollIntervalMs??12e4,onChange:g=>v.mutate({pollIntervalMs:g}),disabled:v.isPending}),c.jsx(Tn,{label:"Batch window (ms)",description:"Time to batch feedback before processing",value:t?.batchWindowMs??3e5,onChange:g=>v.mutate({batchWindowMs:g}),disabled:v.isPending}),c.jsx(Tn,{label:"Max changes per run",description:"Limit on concurrent changes",value:t?.maxChangesPerRun??20,onChange:g=>v.mutate({maxChangesPerRun:g}),disabled:v.isPending})]})]}),c.jsxs("section",{children:[c.jsx("h2",{className:"mb-4 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"CI Healing"}),c.jsxs("div",{className:"flex flex-col gap-4 rounded border border-border p-4",children:[c.jsxs("div",{className:"flex items-center justify-between gap-3",children:[c.jsxs("div",{children:[c.jsx("div",{className:"text-sm",children:"Automatic CI healing"}),c.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Classify healable CI failures and run bounded repair attempts in isolated worktrees."})]}),c.jsx("input",{type:"checkbox","aria-label":"Automatic CI healing",checked:t?.autoHealCI??!1,onChange:g=>v.mutate({autoHealCI:g.target.checked}),disabled:v.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"})]}),c.jsx(Tn,{label:"Max healing attempts per session",description:"Upper bound on repair attempts for a single healing session",value:t?.maxHealingAttemptsPerSession??3,onChange:g=>v.mutate({maxHealingAttemptsPerSession:g}),disabled:v.isPending}),c.jsx(Tn,{label:"Max healing attempts per fingerprint",description:"Cap retries for the same failure fingerprint",value:t?.maxHealingAttemptsPerFingerprint??2,onChange:g=>v.mutate({maxHealingAttemptsPerFingerprint:g}),disabled:v.isPending}),c.jsx(Tn,{label:"Max concurrent healing runs",description:"How many healing runs can execute at once",value:t?.maxConcurrentHealingRuns??1,onChange:g=>v.mutate({maxConcurrentHealingRuns:g}),disabled:v.isPending}),c.jsx(Tn,{label:"Healing cooldown (ms)",description:"Backoff before a cooldowned session can retry",value:t?.healingCooldownMs??3e5,onChange:g=>v.mutate({healingCooldownMs:g}),disabled:v.isPending})]})]}),c.jsxs("section",{children:[c.jsx("h2",{className:"mb-4 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Releases"}),c.jsx("div",{className:"flex flex-col gap-4 rounded border border-border p-4",children:c.jsxs("label",{className:"flex items-start justify-between gap-3",children:[c.jsxs("div",{children:[c.jsx("div",{className:"text-sm",children:"Automatic release creation"}),c.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."})]}),c.jsx("input",{type:"checkbox",checked:t?.autoCreateReleases??!0,onChange:g=>v.mutate({autoCreateReleases:g.target.checked}),disabled:v.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"})]})})]}),c.jsxs("section",{children:[c.jsx("h2",{className:"mb-4 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"GitHub"}),c.jsxs("div",{className:"flex flex-col gap-4 rounded border border-border p-4",children:[c.jsxs("div",{className:"flex flex-col gap-3",children:[c.jsxs("div",{className:"flex items-center justify-between gap-3",children:[c.jsxs("div",{children:[c.jsx("div",{className:"text-sm",children:"Tokens"}),c.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Tried in order before GITHUB_TOKEN and gh auth."})]}),!a&&c.jsx("button",{type:"button",onClick:()=>l(!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?c.jsx("div",{className:"flex flex-col gap-2",children:d.map((g,w)=>c.jsxs("div",{className:"flex items-center justify-between gap-3 border border-border px-2 py-1.5",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("div",{className:"truncate font-mono text-xs",children:g}),c.jsxs("div",{className:"text-[10px] text-muted-foreground",children:["priority ",w+1]})]}),c.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[c.jsx("button",{type:"button",onClick:()=>h(w,w-1),disabled:w===0||v.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"}),c.jsx("button",{type:"button",onClick:()=>h(w,w+1),disabled:w===d.length-1||v.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"}),c.jsx("button",{type:"button",onClick:()=>y(w),disabled:v.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"})]})]},w))}):c.jsx("div",{className:"text-[11px] text-muted-foreground",children:"none configured"}),a?c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("input",{type:"password",value:r,onChange:g=>s(g.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"}),c.jsx("button",{type:"button",onClick:()=>{const g=r.trim();g&&(p([...d,g]),s(""),l(!1))},disabled:!r.trim()||v.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"}),c.jsx("button",{type:"button",onClick:()=>{l(!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]}),c.jsxs("div",{className:"flex items-center justify-between gap-3",children:[c.jsxs("div",{children:[c.jsx("div",{className:"text-sm",children:"Repository links in PR comments"}),c.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."})]}),c.jsx("input",{type:"checkbox","aria-label":"Repository links in PR comments",checked:t?.includeRepositoryLinksInGitHubComments??!0,onChange:g=>v.mutate({includeRepositoryLinksInGitHubComments:g.target.checked}),disabled:v.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"})]}),c.jsxs("div",{children:[c.jsx("div",{className:"text-sm",children:"Trusted reviewers"}),c.jsx("div",{className:"text-[11px] text-muted-foreground",children:t?.trustedReviewers?.length?t.trustedReviewers.join(", "):"none configured"})]}),c.jsxs("div",{children:[c.jsx("div",{className:"text-sm",children:"Ignored bots"}),c.jsx("div",{className:"text-[11px] text-muted-foreground",children:t?.ignoredBots?.length?t.ignoredBots.join(", "):"none configured"})]})]})]})]})})]})}function Tn({label:t,description:r,value:s,onChange:a,disabled:l}){const d=`setting-${t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")}`,p=`${d}-description`;return c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsx("label",{htmlFor:d,className:"text-sm",children:t}),c.jsx("div",{id:p,className:"text-[11px] text-muted-foreground",children:r})]}),c.jsx("input",{id:d,type:"number",value:s,onChange:h=>{const y=parseInt(h.target.value,10);isNaN(y)||a(y)},disabled:l,"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 fN(t){return new Date(t).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}function pN(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 hN({text:t}){const[r,s]=m.useState(!1),a=async()=>{try{await navigator.clipboard.writeText(t),s(!0),setTimeout(()=>s(!1),2e3)}catch{}};return c.jsx("button",{type:"button",onClick:a,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 hu({title:t,content:r}){return c.jsxs("div",{className:"mt-4",children:[c.jsxs("div",{className:"mb-1.5 flex items-center justify-between",children:[c.jsx("span",{className:"text-[11px] uppercase tracking-wider text-muted-foreground",children:t}),c.jsx(hN,{text:r})]}),c.jsx("pre",{className:"whitespace-pre-wrap border border-border bg-background p-3 text-[12px] leading-relaxed font-mono",children:r})]})}function mN({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 c.jsx("span",{className:`border px-1.5 py-0 text-[10px] uppercase tracking-wider ${r}`,children:t})}function gN({changelog:t}){const[r,s]=m.useState(!1),a=t.content?pN(t.content):null,l=`changelog-${t.id}-content`;return c.jsxs("div",{className:"border border-border",children:[c.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"?l:void 0,children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx(mN,{status:t.status}),c.jsx("span",{className:"text-sm font-medium",children:fN(t.createdAt)}),c.jsxs("span",{className:"text-[11px] text-muted-foreground",children:[t.triggerCount," PR",t.triggerCount!==1?"s":""," merged"]}),c.jsx("span",{className:"text-[11px] text-muted-foreground",children:t.prSummaries.map(d=>`#${d.number}`).join(" · ")})]}),t.status==="done"&&c.jsx("span",{className:"text-[11px] text-muted-foreground",children:r?"Hide":"Show"})]}),r&&t.status==="done"&&c.jsxs("div",{id:l,className:"border-t border-border px-4 pb-4 pt-3",children:[t.error&&c.jsx("p",{className:"mb-3 text-[12px] text-destructive",children:t.error}),a?.twitter&&c.jsx(hu,{title:"Twitter / X Thread",content:a.twitter}),a?.linkedin&&c.jsx(hu,{title:"LinkedIn / General",content:a.linkedin}),!a?.twitter&&!a?.linkedin&&t.content&&c.jsx(hu,{title:"Full output",content:t.content})]}),t.status==="error"&&t.error&&c.jsx("div",{className:"border-t border-border px-4 py-3",children:c.jsx("p",{className:"text-[12px] text-destructive",children:t.error})}),t.status==="generating"&&c.jsx("div",{className:"border-t border-border px-4 py-2.5",children:c.jsx("span",{className:"text-[11px] text-muted-foreground",children:"Generating social media post with AI agent…"})})]})}function vN(){const{data:t=[],isLoading:r}=dt({queryKey:["/api/changelogs"],refetchInterval:s=>s.state.data?.some(l=>l.status==="generating")?5e3:!1});return c.jsxs("div",{className:"flex min-h-screen flex-col",children:[c.jsx(Bi,{}),c.jsxs("header",{className:"flex shrink-0 items-center justify-between border-b border-border px-4 py-2.5",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-label":"oh-my-pr",children:[c.jsx("rect",{x:"1",y:"1",width:"14",height:"14",stroke:"currentColor",strokeWidth:"1.5"}),c.jsx("path",{d:"M4 5h8M4 8h5M4 11h6",stroke:"currentColor",strokeWidth:"1"})]}),c.jsx("span",{className:"text-sm font-medium tracking-tight",children:"oh-my-pr"}),c.jsx("span",{className:"border border-border px-1.5 py-0 text-[10px] uppercase tracking-wider text-muted-foreground",children:"changelogs"})]}),c.jsx(An,{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"})]}),c.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:c.jsxs("div",{className:"mx-auto max-w-3xl",children:[c.jsxs("div",{className:"mb-5",children:[c.jsx("h1",{className:"text-base font-medium",children:"Social Media Changelogs"}),c.jsx("p",{className:"mt-1 text-[12px] text-muted-foreground",children:"Generated automatically every 5 PRs merged to main. Copy and paste into Twitter/X or LinkedIn."})]}),!r&&t.length===0&&c.jsxs("div",{className:"border border-border px-4 py-8 text-center",children:[c.jsx("p",{className:"text-sm text-muted-foreground",children:"No changelogs yet."}),c.jsx("p",{className:"mt-1 text-[12px] text-muted-foreground",children:"A post will be generated automatically after every 5 PRs are merged to main."})]}),r&&c.jsx("div",{className:"border border-border px-4 py-6 text-center",children:c.jsx("p",{className:"text-[12px] text-muted-foreground",children:"Loading…"})}),c.jsx("div",{className:"flex flex-col gap-2",children:t.map(s=>c.jsx(gN,{changelog:s},s.id))})]})})]})}const yN=new Set(["detected","evaluating","proposed","publishing"]);function Vv(t){return yN.has(t)}function xN(t){return t==="published"||t==="skipped"||t==="error"}function wN(t){return typeof t=="object"&&t!==null&&"status"in t&&typeof t.status=="string"}function mu(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 SN({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":Vv(t)?"border-border text-muted-foreground animate-pulse":"border-border text-muted-foreground";return c.jsx("span",{className:`border px-1.5 py-0 text-[10px] uppercase tracking-wider ${r}`,children:t})}function CN({text:t}){const[r,s]=m.useState(!1),a=async()=>{try{await navigator.clipboard.writeText(t),s(!0),setTimeout(()=>s(!1),1500)}catch(l){const d=l instanceof Error?l.message:"Clipboard write failed";Vt({variant:"destructive",description:`Failed to copy: ${d}`})}};return c.jsx("button",{type:"button",onClick:a,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 EN({run:t,onRetry:r,retryPending:s}){const[a,l]=m.useState(!1),p=!(!!t.decisionReason||!!t.releaseTitle||!!t.releaseNotes||!!t.error||!!t.githubReleaseUrl||t.includedPrs.length>0)&&xN(t.status),h=`release-run-${t.id}-details`;return c.jsxs("div",{className:"border border-border",children:[c.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:()=>l(y=>!y),"aria-expanded":a,"aria-controls":h,children:[c.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[c.jsx(SN,{status:t.status}),c.jsx("span",{className:"truncate text-sm font-medium",children:t.repo}),c.jsxs("span",{className:"text-[11px] text-muted-foreground",children:["#",t.triggerPrNumber]}),t.proposedVersion&&c.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&&c.jsxs("span",{className:"text-[11px] text-muted-foreground",children:["bump ",t.recommendedBump]})]}),c.jsxs("div",{className:"flex items-center gap-3 text-[11px] text-muted-foreground",children:[c.jsx("span",{children:mu(t.createdAt)}),c.jsx("span",{children:a?"Hide":"Show"})]})]}),a&&c.jsxs("div",{id:h,className:"border-t border-border px-4 pb-4 pt-3",children:[c.jsxs("div",{className:"mb-3 text-[12px] text-muted-foreground",children:["Trigger PR:"," ",c.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&&c.jsx("p",{className:"mb-3 text-[12px] leading-relaxed",children:t.decisionReason}),t.releaseTitle&&c.jsxs("p",{className:"mb-3 text-[12px]",children:[c.jsx("span",{className:"text-muted-foreground",children:"Release title:"})," ",c.jsx("span",{children:t.releaseTitle})]}),c.jsxs("div",{className:"mb-3 grid grid-cols-1 gap-2 text-[12px] text-muted-foreground md:grid-cols-2",children:[c.jsxs("div",{children:["Base branch: ",t.baseBranch||"n/a"]}),c.jsxs("div",{children:["Trigger SHA: ",bN(t.triggerMergeSha)]}),c.jsxs("div",{children:["Merged at: ",mu(t.triggerMergedAt)]}),c.jsxs("div",{children:["Updated: ",mu(t.updatedAt)]})]}),t.includedPrs.length>0&&c.jsxs("div",{className:"mb-3",children:[c.jsxs("div",{className:"mb-1.5 text-[11px] uppercase tracking-wider text-muted-foreground",children:["Included PRs (",t.includedPrs.length,")"]}),c.jsx("div",{className:"space-y-1 border border-border p-3 text-[12px]",children:t.includedPrs.map(y=>c.jsxs("div",{className:"flex items-center justify-between gap-3",children:[c.jsxs("span",{className:"truncate",children:["#",y.number," ",y.title]}),c.jsx("a",{href:y.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"})]},`${y.mergeSha}-${y.number}`))})]}),t.releaseNotes&&c.jsxs("div",{className:"mb-3",children:[c.jsxs("div",{className:"mb-1.5 flex items-center justify-between",children:[c.jsx("span",{className:"text-[11px] uppercase tracking-wider text-muted-foreground",children:"Release Notes"}),c.jsx(CN,{text:t.releaseNotes})]}),c.jsx("pre",{className:"whitespace-pre-wrap border border-border bg-background p-3 text-[12px] leading-relaxed font-mono",children:t.releaseNotes})]}),t.error&&c.jsx("div",{className:"mb-3 border border-destructive/40 bg-destructive/5 p-3 text-[12px] text-destructive",children:t.error}),c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[t.githubReleaseUrl&&c.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"&&c.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&&c.jsx("p",{className:"mt-2 text-[12px] text-muted-foreground",children:"No details available yet."})]})]})}function kN(){const{data:t=[],isLoading:r}=dt({queryKey:["/api/releases"],refetchInterval:a=>{const l=a.state.data;return Array.isArray(l)&&l.some(d=>wN(d)&&Vv(d.status))?5e3:!1}}),s=ct({mutationFn:async a=>(await nt("POST",`/api/releases/${a}/retry`)).json(),onSuccess:()=>{we.invalidateQueries({queryKey:["/api/releases"]}),Vt({description:"Retry queued."})},onError:a=>{Vt({variant:"destructive",description:`Retry failed: ${a.message}`})}});return c.jsxs("div",{className:"flex min-h-screen flex-col",children:[c.jsx(Bi,{}),c.jsxs("header",{className:"flex shrink-0 items-center justify-between border-b border-border px-4 py-2.5",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-label":"Release Management",children:[c.jsx("rect",{x:"1",y:"1",width:"14",height:"14",stroke:"currentColor",strokeWidth:"1.5"}),c.jsx("path",{d:"M4 6h8M4 9h8M4 12h5",stroke:"currentColor",strokeWidth:"1"})]}),c.jsx("span",{className:"text-sm font-medium tracking-tight",children:"oh-my-pr"}),c.jsx("span",{className:"border border-border px-1.5 py-0 text-[10px] uppercase tracking-wider text-muted-foreground",children:"releases"})]}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx(An,{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"}),c.jsx(An,{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"})]})]}),c.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:c.jsxs("div",{className:"mx-auto max-w-4xl",children:[c.jsxs("div",{className:"mb-5",children:[c.jsx("h1",{className:"text-base font-medium",children:"Release Management"}),c.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&&c.jsx("div",{className:"border border-border px-4 py-6 text-center",children:c.jsx("p",{className:"text-[12px] text-muted-foreground",children:"Loading…"})}),!r&&t.length===0&&c.jsxs("div",{className:"border border-border px-4 py-8 text-center",children:[c.jsx("p",{className:"text-sm text-muted-foreground",children:"No release runs yet."}),c.jsx("p",{className:"mt-1 text-[12px] text-muted-foreground",children:"Runs appear after merged PRs are evaluated for release-worthiness."})]}),c.jsx("div",{className:"flex flex-col gap-2",children:t.map(a=>c.jsx(EN,{run:a,onRetry:l=>s.mutate(l),retryPending:s.isPending},a.id))})]})})]})}const Qv=m.forwardRef(({className:t,...r},s)=>c.jsx("div",{ref:s,className:Le("shadcn-card rounded-xl border bg-card border-card-border text-card-foreground shadow-sm",t),...r}));Qv.displayName="Card";const NN=m.forwardRef(({className:t,...r},s)=>c.jsx("div",{ref:s,className:Le("flex flex-col space-y-1.5 p-6",t),...r}));NN.displayName="CardHeader";const RN=m.forwardRef(({className:t,...r},s)=>c.jsx("div",{ref:s,className:Le("text-2xl font-semibold leading-none tracking-tight",t),...r}));RN.displayName="CardTitle";const PN=m.forwardRef(({className:t,...r},s)=>c.jsx("div",{ref:s,className:Le("text-sm text-muted-foreground",t),...r}));PN.displayName="CardDescription";const Gv=m.forwardRef(({className:t,...r},s)=>c.jsx("div",{ref:s,className:Le("p-6 pt-0",t),...r}));Gv.displayName="CardContent";const jN=m.forwardRef(({className:t,...r},s)=>c.jsx("div",{ref:s,className:Le("flex items-center p-6 pt-0",t),...r}));jN.displayName="CardFooter";function TN(){return c.jsx("div",{className:"min-h-screen w-full flex items-center justify-center bg-gray-50",children:c.jsx(Qv,{className:"w-full max-w-md mx-4",children:c.jsxs(Gv,{className:"pt-6",children:[c.jsxs("div",{className:"flex mb-4 gap-2",children:[c.jsx(E0,{className:"h-8 w-8 text-red-500"}),c.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"404 Page Not Found"})]}),c.jsx("p",{className:"mt-4 text-sm text-gray-600",children:"Did you forget to add the page to the router?"})]})})})}function _N(){return c.jsxs(xw,{children:[c.jsx(Oo,{path:"/",component:cN}),c.jsx(Oo,{path:"/settings",component:dN}),c.jsx(Oo,{path:"/changelogs",component:vN}),c.jsx(Oo,{path:"/releases",component:kN}),c.jsx(Oo,{component:TN})]})}function ON(){return c.jsx(ub,{attribute:"class",defaultTheme:"system",enableSystem:!0,children:c.jsx(Qw,{client:we,children:c.jsxs(KS,{children:[c.jsx(l1,{}),c.jsx(Uh,{hook:Bh,children:c.jsx(_N,{})})]})})})}window.location.hash||(window.location.hash="#/");Jx.createRoot(document.getElementById("root")).render(c.jsx(ON,{}));