oh-my-pr 2.2.0 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,58 +0,0 @@
1
- function nv(n,o){for(var s=0;s<o.length;s++){const a=o[s];if(typeof a!="string"&&!Array.isArray(a)){for(const u in a)if(u!=="default"&&!(u in n)){const f=Object.getOwnPropertyDescriptor(a,u);f&&Object.defineProperty(n,u,f.get?f:{enumerable:!0,get:()=>a[u]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))a(u);new MutationObserver(u=>{for(const f of u)if(f.type==="childList")for(const p of f.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&a(p)}).observe(document,{childList:!0,subtree:!0});function s(u){const f={};return u.integrity&&(f.integrity=u.integrity),u.referrerPolicy&&(f.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?f.credentials="include":u.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function a(u){if(u.ep)return;u.ep=!0;const f=s(u);fetch(u.href,f)}})();function op(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var aa={exports:{}},go={},ua={exports:{}},he={};var lf;function rv(){if(lf)return he;lf=1;var n=Symbol.for("react.element"),o=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),f=Symbol.for("react.provider"),p=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),S=Symbol.iterator;function k(N){return N===null||typeof N!="object"?null:(N=S&&N[S]||N["@@iterator"],typeof N=="function"?N:null)}var R={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,E={};function b(N,z,ae){this.props=N,this.context=z,this.refs=E,this.updater=ae||R}b.prototype.isReactComponent={},b.prototype.setState=function(N,z){if(typeof N!="object"&&typeof N!="function"&&N!=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,N,z,"setState")},b.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function I(){}I.prototype=b.prototype;function M(N,z,ae){this.props=N,this.context=z,this.refs=E,this.updater=ae||R}var D=M.prototype=new I;D.constructor=M,j(D,b.prototype),D.isPureReactComponent=!0;var F=Array.isArray,V=Object.prototype.hasOwnProperty,A={current:null},B={key:!0,ref:!0,__self:!0,__source:!0};function te(N,z,ae){var de,ge={},ve=null,xe=null;if(z!=null)for(de in z.ref!==void 0&&(xe=z.ref),z.key!==void 0&&(ve=""+z.key),z)V.call(z,de)&&!B.hasOwnProperty(de)&&(ge[de]=z[de]);var we=arguments.length-2;if(we===1)ge.children=ae;else if(1<we){for(var Ce=Array(we),Ze=0;Ze<we;Ze++)Ce[Ze]=arguments[Ze+2];ge.children=Ce}if(N&&N.defaultProps)for(de in we=N.defaultProps,we)ge[de]===void 0&&(ge[de]=we[de]);return{$$typeof:n,type:N,key:ve,ref:xe,props:ge,_owner:A.current}}function ce(N,z){return{$$typeof:n,type:N.type,key:z,ref:N.ref,props:N.props,_owner:N._owner}}function le(N){return typeof N=="object"&&N!==null&&N.$$typeof===n}function pe(N){var z={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(ae){return z[ae]})}var J=/\/+/g;function ue(N,z){return typeof N=="object"&&N!==null&&N.key!=null?pe(""+N.key):z.toString(36)}function G(N,z,ae,de,ge){var ve=typeof N;(ve==="undefined"||ve==="boolean")&&(N=null);var xe=!1;if(N===null)xe=!0;else switch(ve){case"string":case"number":xe=!0;break;case"object":switch(N.$$typeof){case n:case o:xe=!0}}if(xe)return xe=N,ge=ge(xe),N=de===""?"."+ue(xe,0):de,F(ge)?(ae="",N!=null&&(ae=N.replace(J,"$&/")+"/"),G(ge,z,ae,"",function(Ze){return Ze})):ge!=null&&(le(ge)&&(ge=ce(ge,ae+(!ge.key||xe&&xe.key===ge.key?"":(""+ge.key).replace(J,"$&/")+"/")+N)),z.push(ge)),1;if(xe=0,de=de===""?".":de+":",F(N))for(var we=0;we<N.length;we++){ve=N[we];var Ce=de+ue(ve,we);xe+=G(ve,z,ae,Ce,ge)}else if(Ce=k(N),typeof Ce=="function")for(N=Ce.call(N),we=0;!(ve=N.next()).done;)ve=ve.value,Ce=de+ue(ve,we++),xe+=G(ve,z,ae,Ce,ge);else if(ve==="object")throw z=String(N),Error("Objects are not valid as a React child (found: "+(z==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":z)+"). If you meant to render a collection of children, use an array instead.");return xe}function me(N,z,ae){if(N==null)return N;var de=[],ge=0;return G(N,de,"","",function(ve){return z.call(ae,ve,ge++)}),de}function se(N){if(N._status===-1){var z=N._result;z=z(),z.then(function(ae){(N._status===0||N._status===-1)&&(N._status=1,N._result=ae)},function(ae){(N._status===0||N._status===-1)&&(N._status=2,N._result=ae)}),N._status===-1&&(N._status=0,N._result=z)}if(N._status===1)return N._result.default;throw N._result}var oe={current:null},L={transition:null},K={ReactCurrentDispatcher:oe,ReactCurrentBatchConfig:L,ReactCurrentOwner:A};function Q(){throw Error("act(...) is not supported in production builds of React.")}return he.Children={map:me,forEach:function(N,z,ae){me(N,function(){z.apply(this,arguments)},ae)},count:function(N){var z=0;return me(N,function(){z++}),z},toArray:function(N){return me(N,function(z){return z})||[]},only:function(N){if(!le(N))throw Error("React.Children.only expected to receive a single React element child.");return N}},he.Component=b,he.Fragment=s,he.Profiler=u,he.PureComponent=M,he.StrictMode=a,he.Suspense=g,he.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=K,he.act=Q,he.cloneElement=function(N,z,ae){if(N==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+N+".");var de=j({},N.props),ge=N.key,ve=N.ref,xe=N._owner;if(z!=null){if(z.ref!==void 0&&(ve=z.ref,xe=A.current),z.key!==void 0&&(ge=""+z.key),N.type&&N.type.defaultProps)var we=N.type.defaultProps;for(Ce in z)V.call(z,Ce)&&!B.hasOwnProperty(Ce)&&(de[Ce]=z[Ce]===void 0&&we!==void 0?we[Ce]:z[Ce])}var Ce=arguments.length-2;if(Ce===1)de.children=ae;else if(1<Ce){we=Array(Ce);for(var Ze=0;Ze<Ce;Ze++)we[Ze]=arguments[Ze+2];de.children=we}return{$$typeof:n,type:N.type,key:ge,ref:ve,props:de,_owner:xe}},he.createContext=function(N){return N={$$typeof:p,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},N.Provider={$$typeof:f,_context:N},N.Consumer=N},he.createElement=te,he.createFactory=function(N){var z=te.bind(null,N);return z.type=N,z},he.createRef=function(){return{current:null}},he.forwardRef=function(N){return{$$typeof:h,render:N}},he.isValidElement=le,he.lazy=function(N){return{$$typeof:x,_payload:{_status:-1,_result:N},_init:se}},he.memo=function(N,z){return{$$typeof:v,type:N,compare:z===void 0?null:z}},he.startTransition=function(N){var z=L.transition;L.transition={};try{N()}finally{L.transition=z}},he.unstable_act=Q,he.useCallback=function(N,z){return oe.current.useCallback(N,z)},he.useContext=function(N){return oe.current.useContext(N)},he.useDebugValue=function(){},he.useDeferredValue=function(N){return oe.current.useDeferredValue(N)},he.useEffect=function(N,z){return oe.current.useEffect(N,z)},he.useId=function(){return oe.current.useId()},he.useImperativeHandle=function(N,z,ae){return oe.current.useImperativeHandle(N,z,ae)},he.useInsertionEffect=function(N,z){return oe.current.useInsertionEffect(N,z)},he.useLayoutEffect=function(N,z){return oe.current.useLayoutEffect(N,z)},he.useMemo=function(N,z){return oe.current.useMemo(N,z)},he.useReducer=function(N,z,ae){return oe.current.useReducer(N,z,ae)},he.useRef=function(N){return oe.current.useRef(N)},he.useState=function(N){return oe.current.useState(N)},he.useSyncExternalStore=function(N,z,ae){return oe.current.useSyncExternalStore(N,z,ae)},he.useTransition=function(){return oe.current.useTransition()},he.version="18.3.1",he}var af;function ti(){return af||(af=1,ua.exports=rv()),ua.exports}var uf;function ov(){if(uf)return go;uf=1;var n=ti(),o=Symbol.for("react.element"),s=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,u=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,f={key:!0,ref:!0,__self:!0,__source:!0};function p(h,g,v){var x,S={},k=null,R=null;v!==void 0&&(k=""+v),g.key!==void 0&&(k=""+g.key),g.ref!==void 0&&(R=g.ref);for(x in g)a.call(g,x)&&!f.hasOwnProperty(x)&&(S[x]=g[x]);if(h&&h.defaultProps)for(x in g=h.defaultProps,g)S[x]===void 0&&(S[x]=g[x]);return{$$typeof:o,type:h,key:k,ref:R,props:S,_owner:u.current}}return go.Fragment=s,go.jsx=p,go.jsxs=p,go}var cf;function sv(){return cf||(cf=1,aa.exports=ov()),aa.exports}var d=sv(),Ds={},ca={exports:{}},lt={},da={exports:{}},fa={};var df;function iv(){return df||(df=1,(function(n){function o(L,K){var Q=L.length;L.push(K);e:for(;0<Q;){var N=Q-1>>>1,z=L[N];if(0<u(z,K))L[N]=K,L[Q]=z,Q=N;else break e}}function s(L){return L.length===0?null:L[0]}function a(L){if(L.length===0)return null;var K=L[0],Q=L.pop();if(Q!==K){L[0]=Q;e:for(var N=0,z=L.length,ae=z>>>1;N<ae;){var de=2*(N+1)-1,ge=L[de],ve=de+1,xe=L[ve];if(0>u(ge,Q))ve<z&&0>u(xe,ge)?(L[N]=xe,L[ve]=Q,N=ve):(L[N]=ge,L[de]=Q,N=de);else if(ve<z&&0>u(xe,Q))L[N]=xe,L[ve]=Q,N=ve;else break e}}return K}function u(L,K){var Q=L.sortIndex-K.sortIndex;return Q!==0?Q:L.id-K.id}if(typeof performance=="object"&&typeof performance.now=="function"){var f=performance;n.unstable_now=function(){return f.now()}}else{var p=Date,h=p.now();n.unstable_now=function(){return p.now()-h}}var g=[],v=[],x=1,S=null,k=3,R=!1,j=!1,E=!1,b=typeof setTimeout=="function"?setTimeout:null,I=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function D(L){for(var K=s(v);K!==null;){if(K.callback===null)a(v);else if(K.startTime<=L)a(v),K.sortIndex=K.expirationTime,o(g,K);else break;K=s(v)}}function F(L){if(E=!1,D(L),!j)if(s(g)!==null)j=!0,se(V);else{var K=s(v);K!==null&&oe(F,K.startTime-L)}}function V(L,K){j=!1,E&&(E=!1,I(te),te=-1),R=!0;var Q=k;try{for(D(K),S=s(g);S!==null&&(!(S.expirationTime>K)||L&&!pe());){var N=S.callback;if(typeof N=="function"){S.callback=null,k=S.priorityLevel;var z=N(S.expirationTime<=K);K=n.unstable_now(),typeof z=="function"?S.callback=z:S===s(g)&&a(g),D(K)}else a(g);S=s(g)}if(S!==null)var ae=!0;else{var de=s(v);de!==null&&oe(F,de.startTime-K),ae=!1}return ae}finally{S=null,k=Q,R=!1}}var A=!1,B=null,te=-1,ce=5,le=-1;function pe(){return!(n.unstable_now()-le<ce)}function J(){if(B!==null){var L=n.unstable_now();le=L;var K=!0;try{K=B(!0,L)}finally{K?ue():(A=!1,B=null)}}else A=!1}var ue;if(typeof M=="function")ue=function(){M(J)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,me=G.port2;G.port1.onmessage=J,ue=function(){me.postMessage(null)}}else ue=function(){b(J,0)};function se(L){B=L,A||(A=!0,ue())}function oe(L,K){te=b(function(){L(n.unstable_now())},K)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(L){L.callback=null},n.unstable_continueExecution=function(){j||R||(j=!0,se(V))},n.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ce=0<L?Math.floor(1e3/L):5},n.unstable_getCurrentPriorityLevel=function(){return k},n.unstable_getFirstCallbackNode=function(){return s(g)},n.unstable_next=function(L){switch(k){case 1:case 2:case 3:var K=3;break;default:K=k}var Q=k;k=K;try{return L()}finally{k=Q}},n.unstable_pauseExecution=function(){},n.unstable_requestPaint=function(){},n.unstable_runWithPriority=function(L,K){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var Q=k;k=L;try{return K()}finally{k=Q}},n.unstable_scheduleCallback=function(L,K,Q){var N=n.unstable_now();switch(typeof Q=="object"&&Q!==null?(Q=Q.delay,Q=typeof Q=="number"&&0<Q?N+Q:N):Q=N,L){case 1:var z=-1;break;case 2:z=250;break;case 5:z=1073741823;break;case 4:z=1e4;break;default:z=5e3}return z=Q+z,L={id:x++,callback:K,priorityLevel:L,startTime:Q,expirationTime:z,sortIndex:-1},Q>N?(L.sortIndex=Q,o(v,L),s(g)===null&&L===s(v)&&(E?(I(te),te=-1):E=!0,oe(F,Q-N))):(L.sortIndex=z,o(g,L),j||R||(j=!0,se(V))),L},n.unstable_shouldYield=pe,n.unstable_wrapCallback=function(L){var K=k;return function(){var Q=k;k=K;try{return L.apply(this,arguments)}finally{k=Q}}}})(fa)),fa}var ff;function lv(){return ff||(ff=1,da.exports=iv()),da.exports}var pf;function av(){if(pf)return lt;pf=1;var n=ti(),o=lv();function s(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=new Set,u={};function f(e,t){p(e,t),p(e+"Capture",t)}function p(e,t){for(u[e]=t,e=0;e<t.length;e++)a.add(t[e])}var h=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),g=Object.prototype.hasOwnProperty,v=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,x={},S={};function k(e){return g.call(S,e)?!0:g.call(x,e)?!1:v.test(e)?S[e]=!0:(x[e]=!0,!1)}function R(e,t,r,i){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return i?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function j(e,t,r,i){if(t===null||typeof t>"u"||R(e,t,r,i))return!0;if(i)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function E(e,t,r,i,l,c,m){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=i,this.attributeNamespace=l,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=c,this.removeEmptyString=m}var b={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){b[e]=new E(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];b[t]=new E(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){b[e]=new E(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){b[e]=new E(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){b[e]=new E(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){b[e]=new E(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){b[e]=new E(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){b[e]=new E(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){b[e]=new E(e,5,!1,e.toLowerCase(),null,!1,!1)});var I=/[\-:]([a-z])/g;function M(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(I,M);b[t]=new E(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(I,M);b[t]=new E(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(I,M);b[t]=new E(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){b[e]=new E(e,1,!1,e.toLowerCase(),null,!1,!1)}),b.xlinkHref=new E("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){b[e]=new E(e,1,!1,e.toLowerCase(),null,!0,!0)});function D(e,t,r,i){var l=b.hasOwnProperty(t)?b[t]:null;(l!==null?l.type!==0:i||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(j(t,r,l,i)&&(r=null),i||l===null?k(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):l.mustUseProperty?e[l.propertyName]=r===null?l.type===3?!1:"":r:(t=l.attributeName,i=l.attributeNamespace,r===null?e.removeAttribute(t):(l=l.type,r=l===3||l===4&&r===!0?"":""+r,i?e.setAttributeNS(i,t,r):e.setAttribute(t,r))))}var F=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,V=Symbol.for("react.element"),A=Symbol.for("react.portal"),B=Symbol.for("react.fragment"),te=Symbol.for("react.strict_mode"),ce=Symbol.for("react.profiler"),le=Symbol.for("react.provider"),pe=Symbol.for("react.context"),J=Symbol.for("react.forward_ref"),ue=Symbol.for("react.suspense"),G=Symbol.for("react.suspense_list"),me=Symbol.for("react.memo"),se=Symbol.for("react.lazy"),oe=Symbol.for("react.offscreen"),L=Symbol.iterator;function K(e){return e===null||typeof e!="object"?null:(e=L&&e[L]||e["@@iterator"],typeof e=="function"?e:null)}var Q=Object.assign,N;function z(e){if(N===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);N=t&&t[1]||""}return`
2
- `+N+e}var ae=!1;function de(e,t){if(!e||ae)return"";ae=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(_){var i=_}Reflect.construct(e,[],t)}else{try{t.call()}catch(_){i=_}e.call(t.prototype)}else{try{throw Error()}catch(_){i=_}e()}}catch(_){if(_&&i&&typeof _.stack=="string"){for(var l=_.stack.split(`
3
- `),c=i.stack.split(`
4
- `),m=l.length-1,w=c.length-1;1<=m&&0<=w&&l[m]!==c[w];)w--;for(;1<=m&&0<=w;m--,w--)if(l[m]!==c[w]){if(m!==1||w!==1)do if(m--,w--,0>w||l[m]!==c[w]){var C=`
5
- `+l[m].replace(" at new "," at ");return e.displayName&&C.includes("<anonymous>")&&(C=C.replace("<anonymous>",e.displayName)),C}while(1<=m&&0<=w);break}}}finally{ae=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?z(e):""}function ge(e){switch(e.tag){case 5:return z(e.type);case 16:return z("Lazy");case 13:return z("Suspense");case 19:return z("SuspenseList");case 0:case 2:case 15:return e=de(e.type,!1),e;case 11:return e=de(e.type.render,!1),e;case 1:return e=de(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 B:return"Fragment";case A:return"Portal";case ce:return"Profiler";case te:return"StrictMode";case ue:return"Suspense";case G:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case pe:return(e.displayName||"Context")+".Consumer";case le:return(e._context.displayName||"Context")+".Provider";case J:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case me:return t=e.displayName||null,t!==null?t:ve(e.type)||"Memo";case se:t=e._payload,e=e._init;try{return ve(e(t))}catch{}}return null}function xe(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ve(t);case 8:return t===te?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function we(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ce(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ze(e){var t=Ce(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var l=r.get,c=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(m){i=""+m,c.call(this,m)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return i},setValue:function(m){i=""+m},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Gn(e){e._valueTracker||(e._valueTracker=Ze(e))}function Ro(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),i="";return e&&(i=Ce(e)?e.checked?"true":"false":e.value),e=i,e!==r?(t.setValue(e),!0):!1}function Wt(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 mi(e,t){var r=t.checked;return Q({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function pu(e,t){var r=t.defaultValue==null?"":t.defaultValue,i=t.checked!=null?t.checked:t.defaultChecked;r=we(t.value!=null?t.value:r),e._wrapperState={initialChecked:i,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function hu(e,t){t=t.checked,t!=null&&D(e,"checked",t,!1)}function gi(e,t){hu(e,t);var r=we(t.value),i=t.type;if(r!=null)i==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(i==="submit"||i==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?vi(e,t.type,r):t.hasOwnProperty("defaultValue")&&vi(e,t.type,we(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function mu(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var i=t.type;if(!(i!=="submit"&&i!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function vi(e,t,r){(t!=="number"||Wt(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Tr=Array.isArray;function qn(e,t,r,i){if(e=e.options,t){t={};for(var l=0;l<r.length;l++)t["$"+r[l]]=!0;for(r=0;r<e.length;r++)l=t.hasOwnProperty("$"+e[r].value),e[r].selected!==l&&(e[r].selected=l),l&&i&&(e[r].defaultSelected=!0)}else{for(r=""+we(r),t=null,l=0;l<e.length;l++){if(e[l].value===r){e[l].selected=!0,i&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function yi(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(s(91));return Q({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function gu(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(s(92));if(Tr(r)){if(1<r.length)throw Error(s(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:we(r)}}function vu(e,t){var r=we(t.value),i=we(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),i!=null&&(e.defaultValue=""+i)}function yu(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function xu(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 xi(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?xu(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var jo,wu=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,i,l){MSApp.execUnsafeLocalFunction(function(){return e(t,r,i,l)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(jo=jo||document.createElement("div"),jo.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=jo.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Or(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var _r={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},im=["Webkit","ms","Moz","O"];Object.keys(_r).forEach(function(e){im.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),_r[t]=_r[e]})});function Su(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||_r.hasOwnProperty(e)&&_r[e]?(""+t).trim():t+"px"}function bu(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var i=r.indexOf("--")===0,l=Su(r,t[r],i);r==="float"&&(r="cssFloat"),i?e.setProperty(r,l):e[r]=l}}var lm=Q({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function wi(e,t){if(t){if(lm[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(s(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(s(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(s(61))}if(t.style!=null&&typeof t.style!="object")throw Error(s(62))}}function Si(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var bi=null;function Ci(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ki=null,Yn=null,Xn=null;function Cu(e){if(e=eo(e)){if(typeof ki!="function")throw Error(s(280));var t=e.stateNode;t&&(t=Zo(t),ki(e.stateNode,e.type,t))}}function ku(e){Yn?Xn?Xn.push(e):Xn=[e]:Yn=e}function Eu(){if(Yn){var e=Yn,t=Xn;if(Xn=Yn=null,Cu(e),t)for(e=0;e<t.length;e++)Cu(t[e])}}function Pu(e,t){return e(t)}function Nu(){}var Ei=!1;function Ru(e,t,r){if(Ei)return e(t,r);Ei=!0;try{return Pu(e,t,r)}finally{Ei=!1,(Yn!==null||Xn!==null)&&(Nu(),Eu())}}function Ar(e,t){var r=e.stateNode;if(r===null)return null;var i=Zo(r);if(i===null)return null;r=i[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(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(r&&typeof r!="function")throw Error(s(231,t,typeof r));return r}var Pi=!1;if(h)try{var Ir={};Object.defineProperty(Ir,"passive",{get:function(){Pi=!0}}),window.addEventListener("test",Ir,Ir),window.removeEventListener("test",Ir,Ir)}catch{Pi=!1}function am(e,t,r,i,l,c,m,w,C){var _=Array.prototype.slice.call(arguments,3);try{t.apply(r,_)}catch(U){this.onError(U)}}var Mr=!1,To=null,Oo=!1,Ni=null,um={onError:function(e){Mr=!0,To=e}};function cm(e,t,r,i,l,c,m,w,C){Mr=!1,To=null,am.apply(um,arguments)}function dm(e,t,r,i,l,c,m,w,C){if(cm.apply(this,arguments),Mr){if(Mr){var _=To;Mr=!1,To=null}else throw Error(s(198));Oo||(Oo=!0,Ni=_)}}function Tn(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function ju(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Tu(e){if(Tn(e)!==e)throw Error(s(188))}function fm(e){var t=e.alternate;if(!t){if(t=Tn(e),t===null)throw Error(s(188));return t!==e?null:e}for(var r=e,i=t;;){var l=r.return;if(l===null)break;var c=l.alternate;if(c===null){if(i=l.return,i!==null){r=i;continue}break}if(l.child===c.child){for(c=l.child;c;){if(c===r)return Tu(l),e;if(c===i)return Tu(l),t;c=c.sibling}throw Error(s(188))}if(r.return!==i.return)r=l,i=c;else{for(var m=!1,w=l.child;w;){if(w===r){m=!0,r=l,i=c;break}if(w===i){m=!0,i=l,r=c;break}w=w.sibling}if(!m){for(w=c.child;w;){if(w===r){m=!0,r=c,i=l;break}if(w===i){m=!0,i=c,r=l;break}w=w.sibling}if(!m)throw Error(s(189))}}if(r.alternate!==i)throw Error(s(190))}if(r.tag!==3)throw Error(s(188));return r.stateNode.current===r?e:t}function Ou(e){return e=fm(e),e!==null?_u(e):null}function _u(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=_u(e);if(t!==null)return t;e=e.sibling}return null}var Au=o.unstable_scheduleCallback,Iu=o.unstable_cancelCallback,pm=o.unstable_shouldYield,hm=o.unstable_requestPaint,_e=o.unstable_now,mm=o.unstable_getCurrentPriorityLevel,Ri=o.unstable_ImmediatePriority,Mu=o.unstable_UserBlockingPriority,_o=o.unstable_NormalPriority,gm=o.unstable_LowPriority,Lu=o.unstable_IdlePriority,Ao=null,At=null;function vm(e){if(At&&typeof At.onCommitFiberRoot=="function")try{At.onCommitFiberRoot(Ao,e,void 0,(e.current.flags&128)===128)}catch{}}var Ct=Math.clz32?Math.clz32:wm,ym=Math.log,xm=Math.LN2;function wm(e){return e>>>=0,e===0?32:31-(ym(e)/xm|0)|0}var Io=64,Mo=4194304;function Lr(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 Lo(e,t){var r=e.pendingLanes;if(r===0)return 0;var i=0,l=e.suspendedLanes,c=e.pingedLanes,m=r&268435455;if(m!==0){var w=m&~l;w!==0?i=Lr(w):(c&=m,c!==0&&(i=Lr(c)))}else m=r&~l,m!==0?i=Lr(m):c!==0&&(i=Lr(c));if(i===0)return 0;if(t!==0&&t!==i&&(t&l)===0&&(l=i&-i,c=t&-t,l>=c||l===16&&(c&4194240)!==0))return t;if((i&4)!==0&&(i|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=i;0<t;)r=31-Ct(t),l=1<<r,i|=e[r],t&=~l;return i}function Sm(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function bm(e,t){for(var r=e.suspendedLanes,i=e.pingedLanes,l=e.expirationTimes,c=e.pendingLanes;0<c;){var m=31-Ct(c),w=1<<m,C=l[m];C===-1?((w&r)===0||(w&i)!==0)&&(l[m]=Sm(w,t)):C<=t&&(e.expiredLanes|=w),c&=~w}}function ji(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Du(){var e=Io;return Io<<=1,(Io&4194240)===0&&(Io=64),e}function Ti(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function Dr(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ct(t),e[t]=r}function Cm(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var i=e.eventTimes;for(e=e.expirationTimes;0<r;){var l=31-Ct(r),c=1<<l;t[l]=0,i[l]=-1,e[l]=-1,r&=~c}}function Oi(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var i=31-Ct(r),l=1<<i;l&t|e[i]&t&&(e[i]|=t),r&=~l}}var be=0;function Fu(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var zu,_i,$u,Uu,Hu,Ai=!1,Do=[],rn=null,on=null,sn=null,Fr=new Map,zr=new Map,ln=[],km="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 Wu(e,t){switch(e){case"focusin":case"focusout":rn=null;break;case"dragenter":case"dragleave":on=null;break;case"mouseover":case"mouseout":sn=null;break;case"pointerover":case"pointerout":Fr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":zr.delete(t.pointerId)}}function $r(e,t,r,i,l,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:r,eventSystemFlags:i,nativeEvent:c,targetContainers:[l]},t!==null&&(t=eo(t),t!==null&&_i(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function Em(e,t,r,i,l){switch(t){case"focusin":return rn=$r(rn,e,t,r,i,l),!0;case"dragenter":return on=$r(on,e,t,r,i,l),!0;case"mouseover":return sn=$r(sn,e,t,r,i,l),!0;case"pointerover":var c=l.pointerId;return Fr.set(c,$r(Fr.get(c)||null,e,t,r,i,l)),!0;case"gotpointercapture":return c=l.pointerId,zr.set(c,$r(zr.get(c)||null,e,t,r,i,l)),!0}return!1}function Bu(e){var t=On(e.target);if(t!==null){var r=Tn(t);if(r!==null){if(t=r.tag,t===13){if(t=ju(r),t!==null){e.blockedOn=t,Hu(e.priority,function(){$u(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Fo(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Mi(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var i=new r.constructor(r.type,r);bi=i,r.target.dispatchEvent(i),bi=null}else return t=eo(r),t!==null&&_i(t),e.blockedOn=r,!1;t.shift()}return!0}function Vu(e,t,r){Fo(e)&&r.delete(t)}function Pm(){Ai=!1,rn!==null&&Fo(rn)&&(rn=null),on!==null&&Fo(on)&&(on=null),sn!==null&&Fo(sn)&&(sn=null),Fr.forEach(Vu),zr.forEach(Vu)}function Ur(e,t){e.blockedOn===t&&(e.blockedOn=null,Ai||(Ai=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,Pm)))}function Hr(e){function t(l){return Ur(l,e)}if(0<Do.length){Ur(Do[0],e);for(var r=1;r<Do.length;r++){var i=Do[r];i.blockedOn===e&&(i.blockedOn=null)}}for(rn!==null&&Ur(rn,e),on!==null&&Ur(on,e),sn!==null&&Ur(sn,e),Fr.forEach(t),zr.forEach(t),r=0;r<ln.length;r++)i=ln[r],i.blockedOn===e&&(i.blockedOn=null);for(;0<ln.length&&(r=ln[0],r.blockedOn===null);)Bu(r),r.blockedOn===null&&ln.shift()}var Zn=F.ReactCurrentBatchConfig,zo=!0;function Nm(e,t,r,i){var l=be,c=Zn.transition;Zn.transition=null;try{be=1,Ii(e,t,r,i)}finally{be=l,Zn.transition=c}}function Rm(e,t,r,i){var l=be,c=Zn.transition;Zn.transition=null;try{be=4,Ii(e,t,r,i)}finally{be=l,Zn.transition=c}}function Ii(e,t,r,i){if(zo){var l=Mi(e,t,r,i);if(l===null)Zi(e,t,i,$o,r),Wu(e,i);else if(Em(l,e,t,r,i))i.stopPropagation();else if(Wu(e,i),t&4&&-1<km.indexOf(e)){for(;l!==null;){var c=eo(l);if(c!==null&&zu(c),c=Mi(e,t,r,i),c===null&&Zi(e,t,i,$o,r),c===l)break;l=c}l!==null&&i.stopPropagation()}else Zi(e,t,i,null,r)}}var $o=null;function Mi(e,t,r,i){if($o=null,e=Ci(i),e=On(e),e!==null)if(t=Tn(e),t===null)e=null;else if(r=t.tag,r===13){if(e=ju(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return $o=e,null}function Qu(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(mm()){case Ri:return 1;case Mu:return 4;case _o:case gm:return 16;case Lu:return 536870912;default:return 16}default:return 16}}var an=null,Li=null,Uo=null;function Ku(){if(Uo)return Uo;var e,t=Li,r=t.length,i,l="value"in an?an.value:an.textContent,c=l.length;for(e=0;e<r&&t[e]===l[e];e++);var m=r-e;for(i=1;i<=m&&t[r-i]===l[c-i];i++);return Uo=l.slice(e,1<i?1-i:void 0)}function Ho(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Wo(){return!0}function Gu(){return!1}function at(e){function t(r,i,l,c,m){this._reactName=r,this._targetInst=l,this.type=i,this.nativeEvent=c,this.target=m,this.currentTarget=null;for(var w in e)e.hasOwnProperty(w)&&(r=e[w],this[w]=r?r(c):c[w]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?Wo:Gu,this.isPropagationStopped=Gu,this}return Q(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Wo)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Wo)},persist:function(){},isPersistent:Wo}),t}var Jn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Di=at(Jn),Wr=Q({},Jn,{view:0,detail:0}),jm=at(Wr),Fi,zi,Br,Bo=Q({},Wr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ui,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!==Br&&(Br&&e.type==="mousemove"?(Fi=e.screenX-Br.screenX,zi=e.screenY-Br.screenY):zi=Fi=0,Br=e),Fi)},movementY:function(e){return"movementY"in e?e.movementY:zi}}),qu=at(Bo),Tm=Q({},Bo,{dataTransfer:0}),Om=at(Tm),_m=Q({},Wr,{relatedTarget:0}),$i=at(_m),Am=Q({},Jn,{animationName:0,elapsedTime:0,pseudoElement:0}),Im=at(Am),Mm=Q({},Jn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Lm=at(Mm),Dm=Q({},Jn,{data:0}),Yu=at(Dm),Fm={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},zm={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"},$m={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Um(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=$m[e])?!!t[e]:!1}function Ui(){return Um}var Hm=Q({},Wr,{key:function(e){if(e.key){var t=Fm[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ho(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?zm[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ui,charCode:function(e){return e.type==="keypress"?Ho(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ho(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Wm=at(Hm),Bm=Q({},Bo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Xu=at(Bm),Vm=Q({},Wr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ui}),Qm=at(Vm),Km=Q({},Jn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Gm=at(Km),qm=Q({},Bo,{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}),Ym=at(qm),Xm=[9,13,27,32],Hi=h&&"CompositionEvent"in window,Vr=null;h&&"documentMode"in document&&(Vr=document.documentMode);var Zm=h&&"TextEvent"in window&&!Vr,Zu=h&&(!Hi||Vr&&8<Vr&&11>=Vr),Ju=" ",ec=!1;function tc(e,t){switch(e){case"keyup":return Xm.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function nc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var er=!1;function Jm(e,t){switch(e){case"compositionend":return nc(t);case"keypress":return t.which!==32?null:(ec=!0,Ju);case"textInput":return e=t.data,e===Ju&&ec?null:e;default:return null}}function eg(e,t){if(er)return e==="compositionend"||!Hi&&tc(e,t)?(e=Ku(),Uo=Li=an=null,er=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Zu&&t.locale!=="ko"?null:t.data;default:return null}}var tg={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 rc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!tg[e.type]:t==="textarea"}function oc(e,t,r,i){ku(i),t=qo(t,"onChange"),0<t.length&&(r=new Di("onChange","change",null,r,i),e.push({event:r,listeners:t}))}var Qr=null,Kr=null;function ng(e){bc(e,0)}function Vo(e){var t=sr(e);if(Ro(t))return e}function rg(e,t){if(e==="change")return t}var sc=!1;if(h){var Wi;if(h){var Bi="oninput"in document;if(!Bi){var ic=document.createElement("div");ic.setAttribute("oninput","return;"),Bi=typeof ic.oninput=="function"}Wi=Bi}else Wi=!1;sc=Wi&&(!document.documentMode||9<document.documentMode)}function lc(){Qr&&(Qr.detachEvent("onpropertychange",ac),Kr=Qr=null)}function ac(e){if(e.propertyName==="value"&&Vo(Kr)){var t=[];oc(t,Kr,e,Ci(e)),Ru(ng,t)}}function og(e,t,r){e==="focusin"?(lc(),Qr=t,Kr=r,Qr.attachEvent("onpropertychange",ac)):e==="focusout"&&lc()}function sg(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Vo(Kr)}function ig(e,t){if(e==="click")return Vo(t)}function lg(e,t){if(e==="input"||e==="change")return Vo(t)}function ag(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var kt=typeof Object.is=="function"?Object.is:ag;function Gr(e,t){if(kt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(i=0;i<r.length;i++){var l=r[i];if(!g.call(t,l)||!kt(e[l],t[l]))return!1}return!0}function uc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function cc(e,t){var r=uc(e);e=0;for(var i;r;){if(r.nodeType===3){if(i=e+r.textContent.length,e<=t&&i>=t)return{node:r,offset:t-e};e=i}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=uc(r)}}function dc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?dc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function fc(){for(var e=window,t=Wt();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Wt(e.document)}return t}function Vi(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function ug(e){var t=fc(),r=e.focusedElem,i=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&dc(r.ownerDocument.documentElement,r)){if(i!==null&&Vi(r)){if(t=i.start,e=i.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=r.textContent.length,c=Math.min(i.start,l);i=i.end===void 0?c:Math.min(i.end,l),!e.extend&&c>i&&(l=i,i=c,c=l),l=cc(r,c);var m=cc(r,i);l&&m&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==m.node||e.focusOffset!==m.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),c>i?(e.addRange(t),e.extend(m.node,m.offset)):(t.setEnd(m.node,m.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var cg=h&&"documentMode"in document&&11>=document.documentMode,tr=null,Qi=null,qr=null,Ki=!1;function pc(e,t,r){var i=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Ki||tr==null||tr!==Wt(i)||(i=tr,"selectionStart"in i&&Vi(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}),qr&&Gr(qr,i)||(qr=i,i=qo(Qi,"onSelect"),0<i.length&&(t=new Di("onSelect","select",null,t,r),e.push({event:t,listeners:i}),t.target=tr)))}function Qo(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var nr={animationend:Qo("Animation","AnimationEnd"),animationiteration:Qo("Animation","AnimationIteration"),animationstart:Qo("Animation","AnimationStart"),transitionend:Qo("Transition","TransitionEnd")},Gi={},hc={};h&&(hc=document.createElement("div").style,"AnimationEvent"in window||(delete nr.animationend.animation,delete nr.animationiteration.animation,delete nr.animationstart.animation),"TransitionEvent"in window||delete nr.transitionend.transition);function Ko(e){if(Gi[e])return Gi[e];if(!nr[e])return e;var t=nr[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in hc)return Gi[e]=t[r];return e}var mc=Ko("animationend"),gc=Ko("animationiteration"),vc=Ko("animationstart"),yc=Ko("transitionend"),xc=new Map,wc="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 un(e,t){xc.set(e,t),f(t,[e])}for(var qi=0;qi<wc.length;qi++){var Yi=wc[qi],dg=Yi.toLowerCase(),fg=Yi[0].toUpperCase()+Yi.slice(1);un(dg,"on"+fg)}un(mc,"onAnimationEnd"),un(gc,"onAnimationIteration"),un(vc,"onAnimationStart"),un("dblclick","onDoubleClick"),un("focusin","onFocus"),un("focusout","onBlur"),un(yc,"onTransitionEnd"),p("onMouseEnter",["mouseout","mouseover"]),p("onMouseLeave",["mouseout","mouseover"]),p("onPointerEnter",["pointerout","pointerover"]),p("onPointerLeave",["pointerout","pointerover"]),f("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),f("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),f("onBeforeInput",["compositionend","keypress","textInput","paste"]),f("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),f("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),f("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Yr="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(" "),pg=new Set("cancel close invalid load scroll toggle".split(" ").concat(Yr));function Sc(e,t,r){var i=e.type||"unknown-event";e.currentTarget=r,dm(i,t,void 0,e),e.currentTarget=null}function bc(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var i=e[r],l=i.event;i=i.listeners;e:{var c=void 0;if(t)for(var m=i.length-1;0<=m;m--){var w=i[m],C=w.instance,_=w.currentTarget;if(w=w.listener,C!==c&&l.isPropagationStopped())break e;Sc(l,w,_),c=C}else for(m=0;m<i.length;m++){if(w=i[m],C=w.instance,_=w.currentTarget,w=w.listener,C!==c&&l.isPropagationStopped())break e;Sc(l,w,_),c=C}}}if(Oo)throw e=Ni,Oo=!1,Ni=null,e}function Ee(e,t){var r=t[ol];r===void 0&&(r=t[ol]=new Set);var i=e+"__bubble";r.has(i)||(Cc(t,e,2,!1),r.add(i))}function Xi(e,t,r){var i=0;t&&(i|=4),Cc(r,e,i,t)}var Go="_reactListening"+Math.random().toString(36).slice(2);function Xr(e){if(!e[Go]){e[Go]=!0,a.forEach(function(r){r!=="selectionchange"&&(pg.has(r)||Xi(r,!1,e),Xi(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Go]||(t[Go]=!0,Xi("selectionchange",!1,t))}}function Cc(e,t,r,i){switch(Qu(t)){case 1:var l=Nm;break;case 4:l=Rm;break;default:l=Ii}r=l.bind(null,t,r,e),l=void 0,!Pi||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),i?l!==void 0?e.addEventListener(t,r,{capture:!0,passive:l}):e.addEventListener(t,r,!0):l!==void 0?e.addEventListener(t,r,{passive:l}):e.addEventListener(t,r,!1)}function Zi(e,t,r,i,l){var c=i;if((t&1)===0&&(t&2)===0&&i!==null)e:for(;;){if(i===null)return;var m=i.tag;if(m===3||m===4){var w=i.stateNode.containerInfo;if(w===l||w.nodeType===8&&w.parentNode===l)break;if(m===4)for(m=i.return;m!==null;){var C=m.tag;if((C===3||C===4)&&(C=m.stateNode.containerInfo,C===l||C.nodeType===8&&C.parentNode===l))return;m=m.return}for(;w!==null;){if(m=On(w),m===null)return;if(C=m.tag,C===5||C===6){i=c=m;continue e}w=w.parentNode}}i=i.return}Ru(function(){var _=c,U=Ci(r),H=[];e:{var $=xc.get(e);if($!==void 0){var q=Di,X=e;switch(e){case"keypress":if(Ho(r)===0)break e;case"keydown":case"keyup":q=Wm;break;case"focusin":X="focus",q=$i;break;case"focusout":X="blur",q=$i;break;case"beforeblur":case"afterblur":q=$i;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":q=qu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":q=Om;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":q=Qm;break;case mc:case gc:case vc:q=Im;break;case yc:q=Gm;break;case"scroll":q=jm;break;case"wheel":q=Ym;break;case"copy":case"cut":case"paste":q=Lm;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":q=Xu}var Z=(t&4)!==0,Ae=!Z&&e==="scroll",T=Z?$!==null?$+"Capture":null:$;Z=[];for(var P=_,O;P!==null;){O=P;var W=O.stateNode;if(O.tag===5&&W!==null&&(O=W,T!==null&&(W=Ar(P,T),W!=null&&Z.push(Zr(P,W,O)))),Ae)break;P=P.return}0<Z.length&&($=new q($,X,null,r,U),H.push({event:$,listeners:Z}))}}if((t&7)===0){e:{if($=e==="mouseover"||e==="pointerover",q=e==="mouseout"||e==="pointerout",$&&r!==bi&&(X=r.relatedTarget||r.fromElement)&&(On(X)||X[Bt]))break e;if((q||$)&&($=U.window===U?U:($=U.ownerDocument)?$.defaultView||$.parentWindow:window,q?(X=r.relatedTarget||r.toElement,q=_,X=X?On(X):null,X!==null&&(Ae=Tn(X),X!==Ae||X.tag!==5&&X.tag!==6)&&(X=null)):(q=null,X=_),q!==X)){if(Z=qu,W="onMouseLeave",T="onMouseEnter",P="mouse",(e==="pointerout"||e==="pointerover")&&(Z=Xu,W="onPointerLeave",T="onPointerEnter",P="pointer"),Ae=q==null?$:sr(q),O=X==null?$:sr(X),$=new Z(W,P+"leave",q,r,U),$.target=Ae,$.relatedTarget=O,W=null,On(U)===_&&(Z=new Z(T,P+"enter",X,r,U),Z.target=O,Z.relatedTarget=Ae,W=Z),Ae=W,q&&X)t:{for(Z=q,T=X,P=0,O=Z;O;O=rr(O))P++;for(O=0,W=T;W;W=rr(W))O++;for(;0<P-O;)Z=rr(Z),P--;for(;0<O-P;)T=rr(T),O--;for(;P--;){if(Z===T||T!==null&&Z===T.alternate)break t;Z=rr(Z),T=rr(T)}Z=null}else Z=null;q!==null&&kc(H,$,q,Z,!1),X!==null&&Ae!==null&&kc(H,Ae,X,Z,!0)}}e:{if($=_?sr(_):window,q=$.nodeName&&$.nodeName.toLowerCase(),q==="select"||q==="input"&&$.type==="file")var ee=rg;else if(rc($))if(sc)ee=lg;else{ee=sg;var ne=og}else(q=$.nodeName)&&q.toLowerCase()==="input"&&($.type==="checkbox"||$.type==="radio")&&(ee=ig);if(ee&&(ee=ee(e,_))){oc(H,ee,r,U);break e}ne&&ne(e,$,_),e==="focusout"&&(ne=$._wrapperState)&&ne.controlled&&$.type==="number"&&vi($,"number",$.value)}switch(ne=_?sr(_):window,e){case"focusin":(rc(ne)||ne.contentEditable==="true")&&(tr=ne,Qi=_,qr=null);break;case"focusout":qr=Qi=tr=null;break;case"mousedown":Ki=!0;break;case"contextmenu":case"mouseup":case"dragend":Ki=!1,pc(H,r,U);break;case"selectionchange":if(cg)break;case"keydown":case"keyup":pc(H,r,U)}var re;if(Hi)e:{switch(e){case"compositionstart":var ie="onCompositionStart";break e;case"compositionend":ie="onCompositionEnd";break e;case"compositionupdate":ie="onCompositionUpdate";break e}ie=void 0}else er?tc(e,r)&&(ie="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(ie="onCompositionStart");ie&&(Zu&&r.locale!=="ko"&&(er||ie!=="onCompositionStart"?ie==="onCompositionEnd"&&er&&(re=Ku()):(an=U,Li="value"in an?an.value:an.textContent,er=!0)),ne=qo(_,ie),0<ne.length&&(ie=new Yu(ie,e,null,r,U),H.push({event:ie,listeners:ne}),re?ie.data=re:(re=nc(r),re!==null&&(ie.data=re)))),(re=Zm?Jm(e,r):eg(e,r))&&(_=qo(_,"onBeforeInput"),0<_.length&&(U=new Yu("onBeforeInput","beforeinput",null,r,U),H.push({event:U,listeners:_}),U.data=re))}bc(H,t)})}function Zr(e,t,r){return{instance:e,listener:t,currentTarget:r}}function qo(e,t){for(var r=t+"Capture",i=[];e!==null;){var l=e,c=l.stateNode;l.tag===5&&c!==null&&(l=c,c=Ar(e,r),c!=null&&i.unshift(Zr(e,c,l)),c=Ar(e,t),c!=null&&i.push(Zr(e,c,l))),e=e.return}return i}function rr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function kc(e,t,r,i,l){for(var c=t._reactName,m=[];r!==null&&r!==i;){var w=r,C=w.alternate,_=w.stateNode;if(C!==null&&C===i)break;w.tag===5&&_!==null&&(w=_,l?(C=Ar(r,c),C!=null&&m.unshift(Zr(r,C,w))):l||(C=Ar(r,c),C!=null&&m.push(Zr(r,C,w)))),r=r.return}m.length!==0&&e.push({event:t,listeners:m})}var hg=/\r\n?/g,mg=/\u0000|\uFFFD/g;function Ec(e){return(typeof e=="string"?e:""+e).replace(hg,`
6
- `).replace(mg,"")}function Yo(e,t,r){if(t=Ec(t),Ec(e)!==t&&r)throw Error(s(425))}function Xo(){}var Ji=null,el=null;function tl(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var nl=typeof setTimeout=="function"?setTimeout:void 0,gg=typeof clearTimeout=="function"?clearTimeout:void 0,Pc=typeof Promise=="function"?Promise:void 0,vg=typeof queueMicrotask=="function"?queueMicrotask:typeof Pc<"u"?function(e){return Pc.resolve(null).then(e).catch(yg)}:nl;function yg(e){setTimeout(function(){throw e})}function rl(e,t){var r=t,i=0;do{var l=r.nextSibling;if(e.removeChild(r),l&&l.nodeType===8)if(r=l.data,r==="/$"){if(i===0){e.removeChild(l),Hr(t);return}i--}else r!=="$"&&r!=="$?"&&r!=="$!"||i++;r=l}while(r);Hr(t)}function cn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Nc(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var or=Math.random().toString(36).slice(2),It="__reactFiber$"+or,Jr="__reactProps$"+or,Bt="__reactContainer$"+or,ol="__reactEvents$"+or,xg="__reactListeners$"+or,wg="__reactHandles$"+or;function On(e){var t=e[It];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Bt]||r[It]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Nc(e);e!==null;){if(r=e[It])return r;e=Nc(e)}return t}e=r,r=e.parentNode}return null}function eo(e){return e=e[It]||e[Bt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function sr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(s(33))}function Zo(e){return e[Jr]||null}var sl=[],ir=-1;function dn(e){return{current:e}}function Pe(e){0>ir||(e.current=sl[ir],sl[ir]=null,ir--)}function ke(e,t){ir++,sl[ir]=e.current,e.current=t}var fn={},Ke=dn(fn),nt=dn(!1),_n=fn;function lr(e,t){var r=e.type.contextTypes;if(!r)return fn;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===t)return i.__reactInternalMemoizedMaskedChildContext;var l={},c;for(c in r)l[c]=t[c];return i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function rt(e){return e=e.childContextTypes,e!=null}function Jo(){Pe(nt),Pe(Ke)}function Rc(e,t,r){if(Ke.current!==fn)throw Error(s(168));ke(Ke,t),ke(nt,r)}function jc(e,t,r){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!="function")return r;i=i.getChildContext();for(var l in i)if(!(l in t))throw Error(s(108,xe(e)||"Unknown",l));return Q({},r,i)}function es(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||fn,_n=Ke.current,ke(Ke,e),ke(nt,nt.current),!0}function Tc(e,t,r){var i=e.stateNode;if(!i)throw Error(s(169));r?(e=jc(e,t,_n),i.__reactInternalMemoizedMergedChildContext=e,Pe(nt),Pe(Ke),ke(Ke,e)):Pe(nt),ke(nt,r)}var Vt=null,ts=!1,il=!1;function Oc(e){Vt===null?Vt=[e]:Vt.push(e)}function Sg(e){ts=!0,Oc(e)}function pn(){if(!il&&Vt!==null){il=!0;var e=0,t=be;try{var r=Vt;for(be=1;e<r.length;e++){var i=r[e];do i=i(!0);while(i!==null)}Vt=null,ts=!1}catch(l){throw Vt!==null&&(Vt=Vt.slice(e+1)),Au(Ri,pn),l}finally{be=t,il=!1}}return null}var ar=[],ur=0,ns=null,rs=0,mt=[],gt=0,An=null,Qt=1,Kt="";function In(e,t){ar[ur++]=rs,ar[ur++]=ns,ns=e,rs=t}function _c(e,t,r){mt[gt++]=Qt,mt[gt++]=Kt,mt[gt++]=An,An=e;var i=Qt;e=Kt;var l=32-Ct(i)-1;i&=~(1<<l),r+=1;var c=32-Ct(t)+l;if(30<c){var m=l-l%5;c=(i&(1<<m)-1).toString(32),i>>=m,l-=m,Qt=1<<32-Ct(t)+l|r<<l|i,Kt=c+e}else Qt=1<<c|r<<l|i,Kt=e}function ll(e){e.return!==null&&(In(e,1),_c(e,1,0))}function al(e){for(;e===ns;)ns=ar[--ur],ar[ur]=null,rs=ar[--ur],ar[ur]=null;for(;e===An;)An=mt[--gt],mt[gt]=null,Kt=mt[--gt],mt[gt]=null,Qt=mt[--gt],mt[gt]=null}var ut=null,ct=null,Re=!1,Et=null;function Ac(e,t){var r=wt(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function Ic(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,ut=e,ct=cn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,ut=e,ct=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=An!==null?{id:Qt,overflow:Kt}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=wt(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,ut=e,ct=null,!0):!1;default:return!1}}function ul(e){return(e.mode&1)!==0&&(e.flags&128)===0}function cl(e){if(Re){var t=ct;if(t){var r=t;if(!Ic(e,t)){if(ul(e))throw Error(s(418));t=cn(r.nextSibling);var i=ut;t&&Ic(e,t)?Ac(i,r):(e.flags=e.flags&-4097|2,Re=!1,ut=e)}}else{if(ul(e))throw Error(s(418));e.flags=e.flags&-4097|2,Re=!1,ut=e}}}function Mc(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;ut=e}function os(e){if(e!==ut)return!1;if(!Re)return Mc(e),Re=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!tl(e.type,e.memoizedProps)),t&&(t=ct)){if(ul(e))throw Lc(),Error(s(418));for(;t;)Ac(e,t),t=cn(t.nextSibling)}if(Mc(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){ct=cn(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}ct=null}}else ct=ut?cn(e.stateNode.nextSibling):null;return!0}function Lc(){for(var e=ct;e;)e=cn(e.nextSibling)}function cr(){ct=ut=null,Re=!1}function dl(e){Et===null?Et=[e]:Et.push(e)}var bg=F.ReactCurrentBatchConfig;function to(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(s(309));var i=r.stateNode}if(!i)throw Error(s(147,e));var l=i,c=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===c?t.ref:(t=function(m){var w=l.refs;m===null?delete w[c]:w[c]=m},t._stringRef=c,t)}if(typeof e!="string")throw Error(s(284));if(!r._owner)throw Error(s(290,e))}return e}function ss(e,t){throw e=Object.prototype.toString.call(t),Error(s(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Dc(e){var t=e._init;return t(e._payload)}function Fc(e){function t(T,P){if(e){var O=T.deletions;O===null?(T.deletions=[P],T.flags|=16):O.push(P)}}function r(T,P){if(!e)return null;for(;P!==null;)t(T,P),P=P.sibling;return null}function i(T,P){for(T=new Map;P!==null;)P.key!==null?T.set(P.key,P):T.set(P.index,P),P=P.sibling;return T}function l(T,P){return T=Sn(T,P),T.index=0,T.sibling=null,T}function c(T,P,O){return T.index=O,e?(O=T.alternate,O!==null?(O=O.index,O<P?(T.flags|=2,P):O):(T.flags|=2,P)):(T.flags|=1048576,P)}function m(T){return e&&T.alternate===null&&(T.flags|=2),T}function w(T,P,O,W){return P===null||P.tag!==6?(P=na(O,T.mode,W),P.return=T,P):(P=l(P,O),P.return=T,P)}function C(T,P,O,W){var ee=O.type;return ee===B?U(T,P,O.props.children,W,O.key):P!==null&&(P.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===se&&Dc(ee)===P.type)?(W=l(P,O.props),W.ref=to(T,P,O),W.return=T,W):(W=js(O.type,O.key,O.props,null,T.mode,W),W.ref=to(T,P,O),W.return=T,W)}function _(T,P,O,W){return P===null||P.tag!==4||P.stateNode.containerInfo!==O.containerInfo||P.stateNode.implementation!==O.implementation?(P=ra(O,T.mode,W),P.return=T,P):(P=l(P,O.children||[]),P.return=T,P)}function U(T,P,O,W,ee){return P===null||P.tag!==7?(P=Hn(O,T.mode,W,ee),P.return=T,P):(P=l(P,O),P.return=T,P)}function H(T,P,O){if(typeof P=="string"&&P!==""||typeof P=="number")return P=na(""+P,T.mode,O),P.return=T,P;if(typeof P=="object"&&P!==null){switch(P.$$typeof){case V:return O=js(P.type,P.key,P.props,null,T.mode,O),O.ref=to(T,null,P),O.return=T,O;case A:return P=ra(P,T.mode,O),P.return=T,P;case se:var W=P._init;return H(T,W(P._payload),O)}if(Tr(P)||K(P))return P=Hn(P,T.mode,O,null),P.return=T,P;ss(T,P)}return null}function $(T,P,O,W){var ee=P!==null?P.key:null;if(typeof O=="string"&&O!==""||typeof O=="number")return ee!==null?null:w(T,P,""+O,W);if(typeof O=="object"&&O!==null){switch(O.$$typeof){case V:return O.key===ee?C(T,P,O,W):null;case A:return O.key===ee?_(T,P,O,W):null;case se:return ee=O._init,$(T,P,ee(O._payload),W)}if(Tr(O)||K(O))return ee!==null?null:U(T,P,O,W,null);ss(T,O)}return null}function q(T,P,O,W,ee){if(typeof W=="string"&&W!==""||typeof W=="number")return T=T.get(O)||null,w(P,T,""+W,ee);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case V:return T=T.get(W.key===null?O:W.key)||null,C(P,T,W,ee);case A:return T=T.get(W.key===null?O:W.key)||null,_(P,T,W,ee);case se:var ne=W._init;return q(T,P,O,ne(W._payload),ee)}if(Tr(W)||K(W))return T=T.get(O)||null,U(P,T,W,ee,null);ss(P,W)}return null}function X(T,P,O,W){for(var ee=null,ne=null,re=P,ie=P=0,Ue=null;re!==null&&ie<O.length;ie++){re.index>ie?(Ue=re,re=null):Ue=re.sibling;var Se=$(T,re,O[ie],W);if(Se===null){re===null&&(re=Ue);break}e&&re&&Se.alternate===null&&t(T,re),P=c(Se,P,ie),ne===null?ee=Se:ne.sibling=Se,ne=Se,re=Ue}if(ie===O.length)return r(T,re),Re&&In(T,ie),ee;if(re===null){for(;ie<O.length;ie++)re=H(T,O[ie],W),re!==null&&(P=c(re,P,ie),ne===null?ee=re:ne.sibling=re,ne=re);return Re&&In(T,ie),ee}for(re=i(T,re);ie<O.length;ie++)Ue=q(re,T,ie,O[ie],W),Ue!==null&&(e&&Ue.alternate!==null&&re.delete(Ue.key===null?ie:Ue.key),P=c(Ue,P,ie),ne===null?ee=Ue:ne.sibling=Ue,ne=Ue);return e&&re.forEach(function(bn){return t(T,bn)}),Re&&In(T,ie),ee}function Z(T,P,O,W){var ee=K(O);if(typeof ee!="function")throw Error(s(150));if(O=ee.call(O),O==null)throw Error(s(151));for(var ne=ee=null,re=P,ie=P=0,Ue=null,Se=O.next();re!==null&&!Se.done;ie++,Se=O.next()){re.index>ie?(Ue=re,re=null):Ue=re.sibling;var bn=$(T,re,Se.value,W);if(bn===null){re===null&&(re=Ue);break}e&&re&&bn.alternate===null&&t(T,re),P=c(bn,P,ie),ne===null?ee=bn:ne.sibling=bn,ne=bn,re=Ue}if(Se.done)return r(T,re),Re&&In(T,ie),ee;if(re===null){for(;!Se.done;ie++,Se=O.next())Se=H(T,Se.value,W),Se!==null&&(P=c(Se,P,ie),ne===null?ee=Se:ne.sibling=Se,ne=Se);return Re&&In(T,ie),ee}for(re=i(T,re);!Se.done;ie++,Se=O.next())Se=q(re,T,ie,Se.value,W),Se!==null&&(e&&Se.alternate!==null&&re.delete(Se.key===null?ie:Se.key),P=c(Se,P,ie),ne===null?ee=Se:ne.sibling=Se,ne=Se);return e&&re.forEach(function(tv){return t(T,tv)}),Re&&In(T,ie),ee}function Ae(T,P,O,W){if(typeof O=="object"&&O!==null&&O.type===B&&O.key===null&&(O=O.props.children),typeof O=="object"&&O!==null){switch(O.$$typeof){case V:e:{for(var ee=O.key,ne=P;ne!==null;){if(ne.key===ee){if(ee=O.type,ee===B){if(ne.tag===7){r(T,ne.sibling),P=l(ne,O.props.children),P.return=T,T=P;break e}}else if(ne.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===se&&Dc(ee)===ne.type){r(T,ne.sibling),P=l(ne,O.props),P.ref=to(T,ne,O),P.return=T,T=P;break e}r(T,ne);break}else t(T,ne);ne=ne.sibling}O.type===B?(P=Hn(O.props.children,T.mode,W,O.key),P.return=T,T=P):(W=js(O.type,O.key,O.props,null,T.mode,W),W.ref=to(T,P,O),W.return=T,T=W)}return m(T);case A:e:{for(ne=O.key;P!==null;){if(P.key===ne)if(P.tag===4&&P.stateNode.containerInfo===O.containerInfo&&P.stateNode.implementation===O.implementation){r(T,P.sibling),P=l(P,O.children||[]),P.return=T,T=P;break e}else{r(T,P);break}else t(T,P);P=P.sibling}P=ra(O,T.mode,W),P.return=T,T=P}return m(T);case se:return ne=O._init,Ae(T,P,ne(O._payload),W)}if(Tr(O))return X(T,P,O,W);if(K(O))return Z(T,P,O,W);ss(T,O)}return typeof O=="string"&&O!==""||typeof O=="number"?(O=""+O,P!==null&&P.tag===6?(r(T,P.sibling),P=l(P,O),P.return=T,T=P):(r(T,P),P=na(O,T.mode,W),P.return=T,T=P),m(T)):r(T,P)}return Ae}var dr=Fc(!0),zc=Fc(!1),is=dn(null),ls=null,fr=null,fl=null;function pl(){fl=fr=ls=null}function hl(e){var t=is.current;Pe(is),e._currentValue=t}function ml(e,t,r){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===r)break;e=e.return}}function pr(e,t){ls=e,fl=fr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(ot=!0),e.firstContext=null)}function vt(e){var t=e._currentValue;if(fl!==e)if(e={context:e,memoizedValue:t,next:null},fr===null){if(ls===null)throw Error(s(308));fr=e,ls.dependencies={lanes:0,firstContext:e}}else fr=fr.next=e;return t}var Mn=null;function gl(e){Mn===null?Mn=[e]:Mn.push(e)}function $c(e,t,r,i){var l=t.interleaved;return l===null?(r.next=r,gl(t)):(r.next=l.next,l.next=r),t.interleaved=r,Gt(e,i)}function Gt(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var hn=!1;function vl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Uc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function qt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function mn(e,t,r){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(ye&2)!==0){var l=i.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),i.pending=t,Gt(e,r)}return l=i.interleaved,l===null?(t.next=t,gl(i)):(t.next=l.next,l.next=t),i.interleaved=t,Gt(e,r)}function as(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var i=t.lanes;i&=e.pendingLanes,r|=i,t.lanes=r,Oi(e,r)}}function Hc(e,t){var r=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,r===i)){var l=null,c=null;if(r=r.firstBaseUpdate,r!==null){do{var m={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};c===null?l=c=m:c=c.next=m,r=r.next}while(r!==null);c===null?l=c=t:c=c.next=t}else l=c=t;r={baseState:i.baseState,firstBaseUpdate:l,lastBaseUpdate:c,shared:i.shared,effects:i.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function us(e,t,r,i){var l=e.updateQueue;hn=!1;var c=l.firstBaseUpdate,m=l.lastBaseUpdate,w=l.shared.pending;if(w!==null){l.shared.pending=null;var C=w,_=C.next;C.next=null,m===null?c=_:m.next=_,m=C;var U=e.alternate;U!==null&&(U=U.updateQueue,w=U.lastBaseUpdate,w!==m&&(w===null?U.firstBaseUpdate=_:w.next=_,U.lastBaseUpdate=C))}if(c!==null){var H=l.baseState;m=0,U=_=C=null,w=c;do{var $=w.lane,q=w.eventTime;if((i&$)===$){U!==null&&(U=U.next={eventTime:q,lane:0,tag:w.tag,payload:w.payload,callback:w.callback,next:null});e:{var X=e,Z=w;switch($=t,q=r,Z.tag){case 1:if(X=Z.payload,typeof X=="function"){H=X.call(q,H,$);break e}H=X;break e;case 3:X.flags=X.flags&-65537|128;case 0:if(X=Z.payload,$=typeof X=="function"?X.call(q,H,$):X,$==null)break e;H=Q({},H,$);break e;case 2:hn=!0}}w.callback!==null&&w.lane!==0&&(e.flags|=64,$=l.effects,$===null?l.effects=[w]:$.push(w))}else q={eventTime:q,lane:$,tag:w.tag,payload:w.payload,callback:w.callback,next:null},U===null?(_=U=q,C=H):U=U.next=q,m|=$;if(w=w.next,w===null){if(w=l.shared.pending,w===null)break;$=w,w=$.next,$.next=null,l.lastBaseUpdate=$,l.shared.pending=null}}while(!0);if(U===null&&(C=H),l.baseState=C,l.firstBaseUpdate=_,l.lastBaseUpdate=U,t=l.shared.interleaved,t!==null){l=t;do m|=l.lane,l=l.next;while(l!==t)}else c===null&&(l.shared.lanes=0);Fn|=m,e.lanes=m,e.memoizedState=H}}function Wc(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var i=e[t],l=i.callback;if(l!==null){if(i.callback=null,i=r,typeof l!="function")throw Error(s(191,l));l.call(i)}}}var no={},Mt=dn(no),ro=dn(no),oo=dn(no);function Ln(e){if(e===no)throw Error(s(174));return e}function yl(e,t){switch(ke(oo,t),ke(ro,e),ke(Mt,no),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:xi(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=xi(t,e)}Pe(Mt),ke(Mt,t)}function hr(){Pe(Mt),Pe(ro),Pe(oo)}function Bc(e){Ln(oo.current);var t=Ln(Mt.current),r=xi(t,e.type);t!==r&&(ke(ro,e),ke(Mt,r))}function xl(e){ro.current===e&&(Pe(Mt),Pe(ro))}var je=dn(0);function cs(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var wl=[];function Sl(){for(var e=0;e<wl.length;e++)wl[e]._workInProgressVersionPrimary=null;wl.length=0}var ds=F.ReactCurrentDispatcher,bl=F.ReactCurrentBatchConfig,Dn=0,Te=null,Le=null,ze=null,fs=!1,so=!1,io=0,Cg=0;function Ge(){throw Error(s(321))}function Cl(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!kt(e[r],t[r]))return!1;return!0}function kl(e,t,r,i,l,c){if(Dn=c,Te=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ds.current=e===null||e.memoizedState===null?Ng:Rg,e=r(i,l),so){c=0;do{if(so=!1,io=0,25<=c)throw Error(s(301));c+=1,ze=Le=null,t.updateQueue=null,ds.current=jg,e=r(i,l)}while(so)}if(ds.current=ms,t=Le!==null&&Le.next!==null,Dn=0,ze=Le=Te=null,fs=!1,t)throw Error(s(300));return e}function El(){var e=io!==0;return io=0,e}function Lt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ze===null?Te.memoizedState=ze=e:ze=ze.next=e,ze}function yt(){if(Le===null){var e=Te.alternate;e=e!==null?e.memoizedState:null}else e=Le.next;var t=ze===null?Te.memoizedState:ze.next;if(t!==null)ze=t,Le=e;else{if(e===null)throw Error(s(310));Le=e,e={memoizedState:Le.memoizedState,baseState:Le.baseState,baseQueue:Le.baseQueue,queue:Le.queue,next:null},ze===null?Te.memoizedState=ze=e:ze=ze.next=e}return ze}function lo(e,t){return typeof t=="function"?t(e):t}function Pl(e){var t=yt(),r=t.queue;if(r===null)throw Error(s(311));r.lastRenderedReducer=e;var i=Le,l=i.baseQueue,c=r.pending;if(c!==null){if(l!==null){var m=l.next;l.next=c.next,c.next=m}i.baseQueue=l=c,r.pending=null}if(l!==null){c=l.next,i=i.baseState;var w=m=null,C=null,_=c;do{var U=_.lane;if((Dn&U)===U)C!==null&&(C=C.next={lane:0,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null}),i=_.hasEagerState?_.eagerState:e(i,_.action);else{var H={lane:U,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null};C===null?(w=C=H,m=i):C=C.next=H,Te.lanes|=U,Fn|=U}_=_.next}while(_!==null&&_!==c);C===null?m=i:C.next=w,kt(i,t.memoizedState)||(ot=!0),t.memoizedState=i,t.baseState=m,t.baseQueue=C,r.lastRenderedState=i}if(e=r.interleaved,e!==null){l=e;do c=l.lane,Te.lanes|=c,Fn|=c,l=l.next;while(l!==e)}else l===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Nl(e){var t=yt(),r=t.queue;if(r===null)throw Error(s(311));r.lastRenderedReducer=e;var i=r.dispatch,l=r.pending,c=t.memoizedState;if(l!==null){r.pending=null;var m=l=l.next;do c=e(c,m.action),m=m.next;while(m!==l);kt(c,t.memoizedState)||(ot=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),r.lastRenderedState=c}return[c,i]}function Vc(){}function Qc(e,t){var r=Te,i=yt(),l=t(),c=!kt(i.memoizedState,l);if(c&&(i.memoizedState=l,ot=!0),i=i.queue,Rl(qc.bind(null,r,i,e),[e]),i.getSnapshot!==t||c||ze!==null&&ze.memoizedState.tag&1){if(r.flags|=2048,ao(9,Gc.bind(null,r,i,l,t),void 0,null),$e===null)throw Error(s(349));(Dn&30)!==0||Kc(r,t,l)}return l}function Kc(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=Te.updateQueue,t===null?(t={lastEffect:null,stores:null},Te.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function Gc(e,t,r,i){t.value=r,t.getSnapshot=i,Yc(t)&&Xc(e)}function qc(e,t,r){return r(function(){Yc(t)&&Xc(e)})}function Yc(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!kt(e,r)}catch{return!0}}function Xc(e){var t=Gt(e,1);t!==null&&jt(t,e,1,-1)}function Zc(e){var t=Lt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:lo,lastRenderedState:e},t.queue=e,e=e.dispatch=Pg.bind(null,Te,e),[t.memoizedState,e]}function ao(e,t,r,i){return e={tag:e,create:t,destroy:r,deps:i,next:null},t=Te.updateQueue,t===null?(t={lastEffect:null,stores:null},Te.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(i=r.next,r.next=e,e.next=i,t.lastEffect=e)),e}function Jc(){return yt().memoizedState}function ps(e,t,r,i){var l=Lt();Te.flags|=e,l.memoizedState=ao(1|t,r,void 0,i===void 0?null:i)}function hs(e,t,r,i){var l=yt();i=i===void 0?null:i;var c=void 0;if(Le!==null){var m=Le.memoizedState;if(c=m.destroy,i!==null&&Cl(i,m.deps)){l.memoizedState=ao(t,r,c,i);return}}Te.flags|=e,l.memoizedState=ao(1|t,r,c,i)}function ed(e,t){return ps(8390656,8,e,t)}function Rl(e,t){return hs(2048,8,e,t)}function td(e,t){return hs(4,2,e,t)}function nd(e,t){return hs(4,4,e,t)}function rd(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function od(e,t,r){return r=r!=null?r.concat([e]):null,hs(4,4,rd.bind(null,t,e),r)}function jl(){}function sd(e,t){var r=yt();t=t===void 0?null:t;var i=r.memoizedState;return i!==null&&t!==null&&Cl(t,i[1])?i[0]:(r.memoizedState=[e,t],e)}function id(e,t){var r=yt();t=t===void 0?null:t;var i=r.memoizedState;return i!==null&&t!==null&&Cl(t,i[1])?i[0]:(e=e(),r.memoizedState=[e,t],e)}function ld(e,t,r){return(Dn&21)===0?(e.baseState&&(e.baseState=!1,ot=!0),e.memoizedState=r):(kt(r,t)||(r=Du(),Te.lanes|=r,Fn|=r,e.baseState=!0),t)}function kg(e,t){var r=be;be=r!==0&&4>r?r:4,e(!0);var i=bl.transition;bl.transition={};try{e(!1),t()}finally{be=r,bl.transition=i}}function ad(){return yt().memoizedState}function Eg(e,t,r){var i=xn(e);if(r={lane:i,action:r,hasEagerState:!1,eagerState:null,next:null},ud(e))cd(t,r);else if(r=$c(e,t,r,i),r!==null){var l=et();jt(r,e,i,l),dd(r,t,i)}}function Pg(e,t,r){var i=xn(e),l={lane:i,action:r,hasEagerState:!1,eagerState:null,next:null};if(ud(e))cd(t,l);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var m=t.lastRenderedState,w=c(m,r);if(l.hasEagerState=!0,l.eagerState=w,kt(w,m)){var C=t.interleaved;C===null?(l.next=l,gl(t)):(l.next=C.next,C.next=l),t.interleaved=l;return}}catch{}r=$c(e,t,l,i),r!==null&&(l=et(),jt(r,e,i,l),dd(r,t,i))}}function ud(e){var t=e.alternate;return e===Te||t!==null&&t===Te}function cd(e,t){so=fs=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function dd(e,t,r){if((r&4194240)!==0){var i=t.lanes;i&=e.pendingLanes,r|=i,t.lanes=r,Oi(e,r)}}var ms={readContext:vt,useCallback:Ge,useContext:Ge,useEffect:Ge,useImperativeHandle:Ge,useInsertionEffect:Ge,useLayoutEffect:Ge,useMemo:Ge,useReducer:Ge,useRef:Ge,useState:Ge,useDebugValue:Ge,useDeferredValue:Ge,useTransition:Ge,useMutableSource:Ge,useSyncExternalStore:Ge,useId:Ge,unstable_isNewReconciler:!1},Ng={readContext:vt,useCallback:function(e,t){return Lt().memoizedState=[e,t===void 0?null:t],e},useContext:vt,useEffect:ed,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,ps(4194308,4,rd.bind(null,t,e),r)},useLayoutEffect:function(e,t){return ps(4194308,4,e,t)},useInsertionEffect:function(e,t){return ps(4,2,e,t)},useMemo:function(e,t){var r=Lt();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var i=Lt();return t=r!==void 0?r(t):t,i.memoizedState=i.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},i.queue=e,e=e.dispatch=Eg.bind(null,Te,e),[i.memoizedState,e]},useRef:function(e){var t=Lt();return e={current:e},t.memoizedState=e},useState:Zc,useDebugValue:jl,useDeferredValue:function(e){return Lt().memoizedState=e},useTransition:function(){var e=Zc(!1),t=e[0];return e=kg.bind(null,e[1]),Lt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var i=Te,l=Lt();if(Re){if(r===void 0)throw Error(s(407));r=r()}else{if(r=t(),$e===null)throw Error(s(349));(Dn&30)!==0||Kc(i,t,r)}l.memoizedState=r;var c={value:r,getSnapshot:t};return l.queue=c,ed(qc.bind(null,i,c,e),[e]),i.flags|=2048,ao(9,Gc.bind(null,i,c,r,t),void 0,null),r},useId:function(){var e=Lt(),t=$e.identifierPrefix;if(Re){var r=Kt,i=Qt;r=(i&~(1<<32-Ct(i)-1)).toString(32)+r,t=":"+t+"R"+r,r=io++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=Cg++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Rg={readContext:vt,useCallback:sd,useContext:vt,useEffect:Rl,useImperativeHandle:od,useInsertionEffect:td,useLayoutEffect:nd,useMemo:id,useReducer:Pl,useRef:Jc,useState:function(){return Pl(lo)},useDebugValue:jl,useDeferredValue:function(e){var t=yt();return ld(t,Le.memoizedState,e)},useTransition:function(){var e=Pl(lo)[0],t=yt().memoizedState;return[e,t]},useMutableSource:Vc,useSyncExternalStore:Qc,useId:ad,unstable_isNewReconciler:!1},jg={readContext:vt,useCallback:sd,useContext:vt,useEffect:Rl,useImperativeHandle:od,useInsertionEffect:td,useLayoutEffect:nd,useMemo:id,useReducer:Nl,useRef:Jc,useState:function(){return Nl(lo)},useDebugValue:jl,useDeferredValue:function(e){var t=yt();return Le===null?t.memoizedState=e:ld(t,Le.memoizedState,e)},useTransition:function(){var e=Nl(lo)[0],t=yt().memoizedState;return[e,t]},useMutableSource:Vc,useSyncExternalStore:Qc,useId:ad,unstable_isNewReconciler:!1};function Pt(e,t){if(e&&e.defaultProps){t=Q({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function Tl(e,t,r,i){t=e.memoizedState,r=r(i,t),r=r==null?t:Q({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var gs={isMounted:function(e){return(e=e._reactInternals)?Tn(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var i=et(),l=xn(e),c=qt(i,l);c.payload=t,r!=null&&(c.callback=r),t=mn(e,c,l),t!==null&&(jt(t,e,l,i),as(t,e,l))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var i=et(),l=xn(e),c=qt(i,l);c.tag=1,c.payload=t,r!=null&&(c.callback=r),t=mn(e,c,l),t!==null&&(jt(t,e,l,i),as(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=et(),i=xn(e),l=qt(r,i);l.tag=2,t!=null&&(l.callback=t),t=mn(e,l,i),t!==null&&(jt(t,e,i,r),as(t,e,i))}};function fd(e,t,r,i,l,c,m){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,c,m):t.prototype&&t.prototype.isPureReactComponent?!Gr(r,i)||!Gr(l,c):!0}function pd(e,t,r){var i=!1,l=fn,c=t.contextType;return typeof c=="object"&&c!==null?c=vt(c):(l=rt(t)?_n:Ke.current,i=t.contextTypes,c=(i=i!=null)?lr(e,l):fn),t=new t(r,c),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=gs,e.stateNode=t,t._reactInternals=e,i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=l,e.__reactInternalMemoizedMaskedChildContext=c),t}function hd(e,t,r,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,i),t.state!==e&&gs.enqueueReplaceState(t,t.state,null)}function Ol(e,t,r,i){var l=e.stateNode;l.props=r,l.state=e.memoizedState,l.refs={},vl(e);var c=t.contextType;typeof c=="object"&&c!==null?l.context=vt(c):(c=rt(t)?_n:Ke.current,l.context=lr(e,c)),l.state=e.memoizedState,c=t.getDerivedStateFromProps,typeof c=="function"&&(Tl(e,t,c,r),l.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof l.getSnapshotBeforeUpdate=="function"||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(t=l.state,typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount(),t!==l.state&&gs.enqueueReplaceState(l,l.state,null),us(e,r,l,i),l.state=e.memoizedState),typeof l.componentDidMount=="function"&&(e.flags|=4194308)}function mr(e,t){try{var r="",i=t;do r+=ge(i),i=i.return;while(i);var l=r}catch(c){l=`
7
- Error generating stack: `+c.message+`
8
- `+c.stack}return{value:e,source:t,stack:l,digest:null}}function _l(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Al(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var Tg=typeof WeakMap=="function"?WeakMap:Map;function md(e,t,r){r=qt(-1,r),r.tag=3,r.payload={element:null};var i=t.value;return r.callback=function(){Cs||(Cs=!0,Gl=i),Al(e,t)},r}function gd(e,t,r){r=qt(-1,r),r.tag=3;var i=e.type.getDerivedStateFromError;if(typeof i=="function"){var l=t.value;r.payload=function(){return i(l)},r.callback=function(){Al(e,t)}}var c=e.stateNode;return c!==null&&typeof c.componentDidCatch=="function"&&(r.callback=function(){Al(e,t),typeof i!="function"&&(vn===null?vn=new Set([this]):vn.add(this));var m=t.stack;this.componentDidCatch(t.value,{componentStack:m!==null?m:""})}),r}function vd(e,t,r){var i=e.pingCache;if(i===null){i=e.pingCache=new Tg;var l=new Set;i.set(t,l)}else l=i.get(t),l===void 0&&(l=new Set,i.set(t,l));l.has(r)||(l.add(r),e=Bg.bind(null,e,t,r),t.then(e,e))}function yd(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function xd(e,t,r,i,l){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=qt(-1,1),t.tag=2,mn(r,t,1))),r.lanes|=1),e):(e.flags|=65536,e.lanes=l,e)}var Og=F.ReactCurrentOwner,ot=!1;function Je(e,t,r,i){t.child=e===null?zc(t,null,r,i):dr(t,e.child,r,i)}function wd(e,t,r,i,l){r=r.render;var c=t.ref;return pr(t,l),i=kl(e,t,r,i,c,l),r=El(),e!==null&&!ot?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Yt(e,t,l)):(Re&&r&&ll(t),t.flags|=1,Je(e,t,i,l),t.child)}function Sd(e,t,r,i,l){if(e===null){var c=r.type;return typeof c=="function"&&!ta(c)&&c.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=c,bd(e,t,c,i,l)):(e=js(r.type,null,i,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,(e.lanes&l)===0){var m=c.memoizedProps;if(r=r.compare,r=r!==null?r:Gr,r(m,i)&&e.ref===t.ref)return Yt(e,t,l)}return t.flags|=1,e=Sn(c,i),e.ref=t.ref,e.return=t,t.child=e}function bd(e,t,r,i,l){if(e!==null){var c=e.memoizedProps;if(Gr(c,i)&&e.ref===t.ref)if(ot=!1,t.pendingProps=i=c,(e.lanes&l)!==0)(e.flags&131072)!==0&&(ot=!0);else return t.lanes=e.lanes,Yt(e,t,l)}return Il(e,t,r,i,l)}function Cd(e,t,r){var i=t.pendingProps,l=i.children,c=e!==null?e.memoizedState:null;if(i.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ke(vr,dt),dt|=r;else{if((r&1073741824)===0)return e=c!==null?c.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ke(vr,dt),dt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=c!==null?c.baseLanes:r,ke(vr,dt),dt|=i}else c!==null?(i=c.baseLanes|r,t.memoizedState=null):i=r,ke(vr,dt),dt|=i;return Je(e,t,l,r),t.child}function kd(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Il(e,t,r,i,l){var c=rt(r)?_n:Ke.current;return c=lr(t,c),pr(t,l),r=kl(e,t,r,i,c,l),i=El(),e!==null&&!ot?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Yt(e,t,l)):(Re&&i&&ll(t),t.flags|=1,Je(e,t,r,l),t.child)}function Ed(e,t,r,i,l){if(rt(r)){var c=!0;es(t)}else c=!1;if(pr(t,l),t.stateNode===null)ys(e,t),pd(t,r,i),Ol(t,r,i,l),i=!0;else if(e===null){var m=t.stateNode,w=t.memoizedProps;m.props=w;var C=m.context,_=r.contextType;typeof _=="object"&&_!==null?_=vt(_):(_=rt(r)?_n:Ke.current,_=lr(t,_));var U=r.getDerivedStateFromProps,H=typeof U=="function"||typeof m.getSnapshotBeforeUpdate=="function";H||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(w!==i||C!==_)&&hd(t,m,i,_),hn=!1;var $=t.memoizedState;m.state=$,us(t,i,m,l),C=t.memoizedState,w!==i||$!==C||nt.current||hn?(typeof U=="function"&&(Tl(t,r,U,i),C=t.memoizedState),(w=hn||fd(t,r,w,i,$,C,_))?(H||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(t.flags|=4194308)):(typeof m.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=C),m.props=i,m.state=C,m.context=_,i=w):(typeof m.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{m=t.stateNode,Uc(e,t),w=t.memoizedProps,_=t.type===t.elementType?w:Pt(t.type,w),m.props=_,H=t.pendingProps,$=m.context,C=r.contextType,typeof C=="object"&&C!==null?C=vt(C):(C=rt(r)?_n:Ke.current,C=lr(t,C));var q=r.getDerivedStateFromProps;(U=typeof q=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(w!==H||$!==C)&&hd(t,m,i,C),hn=!1,$=t.memoizedState,m.state=$,us(t,i,m,l);var X=t.memoizedState;w!==H||$!==X||nt.current||hn?(typeof q=="function"&&(Tl(t,r,q,i),X=t.memoizedState),(_=hn||fd(t,r,_,i,$,X,C)||!1)?(U||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(i,X,C),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(i,X,C)),typeof m.componentDidUpdate=="function"&&(t.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof m.componentDidUpdate!="function"||w===e.memoizedProps&&$===e.memoizedState||(t.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||w===e.memoizedProps&&$===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=X),m.props=i,m.state=X,m.context=C,i=_):(typeof m.componentDidUpdate!="function"||w===e.memoizedProps&&$===e.memoizedState||(t.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||w===e.memoizedProps&&$===e.memoizedState||(t.flags|=1024),i=!1)}return Ml(e,t,r,i,c,l)}function Ml(e,t,r,i,l,c){kd(e,t);var m=(t.flags&128)!==0;if(!i&&!m)return l&&Tc(t,r,!1),Yt(e,t,c);i=t.stateNode,Og.current=t;var w=m&&typeof r.getDerivedStateFromError!="function"?null:i.render();return t.flags|=1,e!==null&&m?(t.child=dr(t,e.child,null,c),t.child=dr(t,null,w,c)):Je(e,t,w,c),t.memoizedState=i.state,l&&Tc(t,r,!0),t.child}function Pd(e){var t=e.stateNode;t.pendingContext?Rc(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Rc(e,t.context,!1),yl(e,t.containerInfo)}function Nd(e,t,r,i,l){return cr(),dl(l),t.flags|=256,Je(e,t,r,i),t.child}var Ll={dehydrated:null,treeContext:null,retryLane:0};function Dl(e){return{baseLanes:e,cachePool:null,transitions:null}}function Rd(e,t,r){var i=t.pendingProps,l=je.current,c=!1,m=(t.flags&128)!==0,w;if((w=m)||(w=e!==null&&e.memoizedState===null?!1:(l&2)!==0),w?(c=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(l|=1),ke(je,l&1),e===null)return cl(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(m=i.children,e=i.fallback,c?(i=t.mode,c=t.child,m={mode:"hidden",children:m},(i&1)===0&&c!==null?(c.childLanes=0,c.pendingProps=m):c=Ts(m,i,0,null),e=Hn(e,i,r,null),c.return=t,e.return=t,c.sibling=e,t.child=c,t.child.memoizedState=Dl(r),t.memoizedState=Ll,e):Fl(t,m));if(l=e.memoizedState,l!==null&&(w=l.dehydrated,w!==null))return _g(e,t,m,i,w,l,r);if(c){c=i.fallback,m=t.mode,l=e.child,w=l.sibling;var C={mode:"hidden",children:i.children};return(m&1)===0&&t.child!==l?(i=t.child,i.childLanes=0,i.pendingProps=C,t.deletions=null):(i=Sn(l,C),i.subtreeFlags=l.subtreeFlags&14680064),w!==null?c=Sn(w,c):(c=Hn(c,m,r,null),c.flags|=2),c.return=t,i.return=t,i.sibling=c,t.child=i,i=c,c=t.child,m=e.child.memoizedState,m=m===null?Dl(r):{baseLanes:m.baseLanes|r,cachePool:null,transitions:m.transitions},c.memoizedState=m,c.childLanes=e.childLanes&~r,t.memoizedState=Ll,i}return c=e.child,e=c.sibling,i=Sn(c,{mode:"visible",children:i.children}),(t.mode&1)===0&&(i.lanes=r),i.return=t,i.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=i,t.memoizedState=null,i}function Fl(e,t){return t=Ts({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function vs(e,t,r,i){return i!==null&&dl(i),dr(t,e.child,null,r),e=Fl(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function _g(e,t,r,i,l,c,m){if(r)return t.flags&256?(t.flags&=-257,i=_l(Error(s(422))),vs(e,t,m,i)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(c=i.fallback,l=t.mode,i=Ts({mode:"visible",children:i.children},l,0,null),c=Hn(c,l,m,null),c.flags|=2,i.return=t,c.return=t,i.sibling=c,t.child=i,(t.mode&1)!==0&&dr(t,e.child,null,m),t.child.memoizedState=Dl(m),t.memoizedState=Ll,c);if((t.mode&1)===0)return vs(e,t,m,null);if(l.data==="$!"){if(i=l.nextSibling&&l.nextSibling.dataset,i)var w=i.dgst;return i=w,c=Error(s(419)),i=_l(c,i,void 0),vs(e,t,m,i)}if(w=(m&e.childLanes)!==0,ot||w){if(i=$e,i!==null){switch(m&-m){case 4:l=2;break;case 16:l=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:l=32;break;case 536870912:l=268435456;break;default:l=0}l=(l&(i.suspendedLanes|m))!==0?0:l,l!==0&&l!==c.retryLane&&(c.retryLane=l,Gt(e,l),jt(i,e,l,-1))}return ea(),i=_l(Error(s(421))),vs(e,t,m,i)}return l.data==="$?"?(t.flags|=128,t.child=e.child,t=Vg.bind(null,e),l._reactRetry=t,null):(e=c.treeContext,ct=cn(l.nextSibling),ut=t,Re=!0,Et=null,e!==null&&(mt[gt++]=Qt,mt[gt++]=Kt,mt[gt++]=An,Qt=e.id,Kt=e.overflow,An=t),t=Fl(t,i.children),t.flags|=4096,t)}function jd(e,t,r){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),ml(e.return,t,r)}function zl(e,t,r,i,l){var c=e.memoizedState;c===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:r,tailMode:l}:(c.isBackwards=t,c.rendering=null,c.renderingStartTime=0,c.last=i,c.tail=r,c.tailMode=l)}function Td(e,t,r){var i=t.pendingProps,l=i.revealOrder,c=i.tail;if(Je(e,t,i.children,r),i=je.current,(i&2)!==0)i=i&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&jd(e,r,t);else if(e.tag===19)jd(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}i&=1}if(ke(je,i),(t.mode&1)===0)t.memoizedState=null;else switch(l){case"forwards":for(r=t.child,l=null;r!==null;)e=r.alternate,e!==null&&cs(e)===null&&(l=r),r=r.sibling;r=l,r===null?(l=t.child,t.child=null):(l=r.sibling,r.sibling=null),zl(t,!1,l,r,c);break;case"backwards":for(r=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&cs(e)===null){t.child=l;break}e=l.sibling,l.sibling=r,r=l,l=e}zl(t,!0,r,null,c);break;case"together":zl(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ys(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Yt(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Fn|=t.lanes,(r&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(s(153));if(t.child!==null){for(e=t.child,r=Sn(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Sn(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function Ag(e,t,r){switch(t.tag){case 3:Pd(t),cr();break;case 5:Bc(t);break;case 1:rt(t.type)&&es(t);break;case 4:yl(t,t.stateNode.containerInfo);break;case 10:var i=t.type._context,l=t.memoizedProps.value;ke(is,i._currentValue),i._currentValue=l;break;case 13:if(i=t.memoizedState,i!==null)return i.dehydrated!==null?(ke(je,je.current&1),t.flags|=128,null):(r&t.child.childLanes)!==0?Rd(e,t,r):(ke(je,je.current&1),e=Yt(e,t,r),e!==null?e.sibling:null);ke(je,je.current&1);break;case 19:if(i=(r&t.childLanes)!==0,(e.flags&128)!==0){if(i)return Td(e,t,r);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),ke(je,je.current),i)break;return null;case 22:case 23:return t.lanes=0,Cd(e,t,r)}return Yt(e,t,r)}var Od,$l,_d,Ad;Od=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}},$l=function(){},_d=function(e,t,r,i){var l=e.memoizedProps;if(l!==i){e=t.stateNode,Ln(Mt.current);var c=null;switch(r){case"input":l=mi(e,l),i=mi(e,i),c=[];break;case"select":l=Q({},l,{value:void 0}),i=Q({},i,{value:void 0}),c=[];break;case"textarea":l=yi(e,l),i=yi(e,i),c=[];break;default:typeof l.onClick!="function"&&typeof i.onClick=="function"&&(e.onclick=Xo)}wi(r,i);var m;r=null;for(_ in l)if(!i.hasOwnProperty(_)&&l.hasOwnProperty(_)&&l[_]!=null)if(_==="style"){var w=l[_];for(m in w)w.hasOwnProperty(m)&&(r||(r={}),r[m]="")}else _!=="dangerouslySetInnerHTML"&&_!=="children"&&_!=="suppressContentEditableWarning"&&_!=="suppressHydrationWarning"&&_!=="autoFocus"&&(u.hasOwnProperty(_)?c||(c=[]):(c=c||[]).push(_,null));for(_ in i){var C=i[_];if(w=l?.[_],i.hasOwnProperty(_)&&C!==w&&(C!=null||w!=null))if(_==="style")if(w){for(m in w)!w.hasOwnProperty(m)||C&&C.hasOwnProperty(m)||(r||(r={}),r[m]="");for(m in C)C.hasOwnProperty(m)&&w[m]!==C[m]&&(r||(r={}),r[m]=C[m])}else r||(c||(c=[]),c.push(_,r)),r=C;else _==="dangerouslySetInnerHTML"?(C=C?C.__html:void 0,w=w?w.__html:void 0,C!=null&&w!==C&&(c=c||[]).push(_,C)):_==="children"?typeof C!="string"&&typeof C!="number"||(c=c||[]).push(_,""+C):_!=="suppressContentEditableWarning"&&_!=="suppressHydrationWarning"&&(u.hasOwnProperty(_)?(C!=null&&_==="onScroll"&&Ee("scroll",e),c||w===C||(c=[])):(c=c||[]).push(_,C))}r&&(c=c||[]).push("style",r);var _=c;(t.updateQueue=_)&&(t.flags|=4)}},Ad=function(e,t,r,i){r!==i&&(t.flags|=4)};function uo(e,t){if(!Re)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var i=null;r!==null;)r.alternate!==null&&(i=r),r=r.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function qe(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,i=0;if(t)for(var l=e.child;l!==null;)r|=l.lanes|l.childLanes,i|=l.subtreeFlags&14680064,i|=l.flags&14680064,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)r|=l.lanes|l.childLanes,i|=l.subtreeFlags,i|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=i,e.childLanes=r,t}function Ig(e,t,r){var i=t.pendingProps;switch(al(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qe(t),null;case 1:return rt(t.type)&&Jo(),qe(t),null;case 3:return i=t.stateNode,hr(),Pe(nt),Pe(Ke),Sl(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(os(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Et!==null&&(Xl(Et),Et=null))),$l(e,t),qe(t),null;case 5:xl(t);var l=Ln(oo.current);if(r=t.type,e!==null&&t.stateNode!=null)_d(e,t,r,i,l),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(s(166));return qe(t),null}if(e=Ln(Mt.current),os(t)){i=t.stateNode,r=t.type;var c=t.memoizedProps;switch(i[It]=t,i[Jr]=c,e=(t.mode&1)!==0,r){case"dialog":Ee("cancel",i),Ee("close",i);break;case"iframe":case"object":case"embed":Ee("load",i);break;case"video":case"audio":for(l=0;l<Yr.length;l++)Ee(Yr[l],i);break;case"source":Ee("error",i);break;case"img":case"image":case"link":Ee("error",i),Ee("load",i);break;case"details":Ee("toggle",i);break;case"input":pu(i,c),Ee("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!c.multiple},Ee("invalid",i);break;case"textarea":gu(i,c),Ee("invalid",i)}wi(r,c),l=null;for(var m in c)if(c.hasOwnProperty(m)){var w=c[m];m==="children"?typeof w=="string"?i.textContent!==w&&(c.suppressHydrationWarning!==!0&&Yo(i.textContent,w,e),l=["children",w]):typeof w=="number"&&i.textContent!==""+w&&(c.suppressHydrationWarning!==!0&&Yo(i.textContent,w,e),l=["children",""+w]):u.hasOwnProperty(m)&&w!=null&&m==="onScroll"&&Ee("scroll",i)}switch(r){case"input":Gn(i),mu(i,c,!0);break;case"textarea":Gn(i),yu(i);break;case"select":case"option":break;default:typeof c.onClick=="function"&&(i.onclick=Xo)}i=l,t.updateQueue=i,i!==null&&(t.flags|=4)}else{m=l.nodeType===9?l:l.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=xu(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=m.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof i.is=="string"?e=m.createElement(r,{is:i.is}):(e=m.createElement(r),r==="select"&&(m=e,i.multiple?m.multiple=!0:i.size&&(m.size=i.size))):e=m.createElementNS(e,r),e[It]=t,e[Jr]=i,Od(e,t,!1,!1),t.stateNode=e;e:{switch(m=Si(r,i),r){case"dialog":Ee("cancel",e),Ee("close",e),l=i;break;case"iframe":case"object":case"embed":Ee("load",e),l=i;break;case"video":case"audio":for(l=0;l<Yr.length;l++)Ee(Yr[l],e);l=i;break;case"source":Ee("error",e),l=i;break;case"img":case"image":case"link":Ee("error",e),Ee("load",e),l=i;break;case"details":Ee("toggle",e),l=i;break;case"input":pu(e,i),l=mi(e,i),Ee("invalid",e);break;case"option":l=i;break;case"select":e._wrapperState={wasMultiple:!!i.multiple},l=Q({},i,{value:void 0}),Ee("invalid",e);break;case"textarea":gu(e,i),l=yi(e,i),Ee("invalid",e);break;default:l=i}wi(r,l),w=l;for(c in w)if(w.hasOwnProperty(c)){var C=w[c];c==="style"?bu(e,C):c==="dangerouslySetInnerHTML"?(C=C?C.__html:void 0,C!=null&&wu(e,C)):c==="children"?typeof C=="string"?(r!=="textarea"||C!=="")&&Or(e,C):typeof C=="number"&&Or(e,""+C):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(u.hasOwnProperty(c)?C!=null&&c==="onScroll"&&Ee("scroll",e):C!=null&&D(e,c,C,m))}switch(r){case"input":Gn(e),mu(e,i,!1);break;case"textarea":Gn(e),yu(e);break;case"option":i.value!=null&&e.setAttribute("value",""+we(i.value));break;case"select":e.multiple=!!i.multiple,c=i.value,c!=null?qn(e,!!i.multiple,c,!1):i.defaultValue!=null&&qn(e,!!i.multiple,i.defaultValue,!0);break;default:typeof l.onClick=="function"&&(e.onclick=Xo)}switch(r){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}}i&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return qe(t),null;case 6:if(e&&t.stateNode!=null)Ad(e,t,e.memoizedProps,i);else{if(typeof i!="string"&&t.stateNode===null)throw Error(s(166));if(r=Ln(oo.current),Ln(Mt.current),os(t)){if(i=t.stateNode,r=t.memoizedProps,i[It]=t,(c=i.nodeValue!==r)&&(e=ut,e!==null))switch(e.tag){case 3:Yo(i.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Yo(i.nodeValue,r,(e.mode&1)!==0)}c&&(t.flags|=4)}else i=(r.nodeType===9?r:r.ownerDocument).createTextNode(i),i[It]=t,t.stateNode=i}return qe(t),null;case 13:if(Pe(je),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Re&&ct!==null&&(t.mode&1)!==0&&(t.flags&128)===0)Lc(),cr(),t.flags|=98560,c=!1;else if(c=os(t),i!==null&&i.dehydrated!==null){if(e===null){if(!c)throw Error(s(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(s(317));c[It]=t}else cr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;qe(t),c=!1}else Et!==null&&(Xl(Et),Et=null),c=!0;if(!c)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=r,t):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(je.current&1)!==0?De===0&&(De=3):ea())),t.updateQueue!==null&&(t.flags|=4),qe(t),null);case 4:return hr(),$l(e,t),e===null&&Xr(t.stateNode.containerInfo),qe(t),null;case 10:return hl(t.type._context),qe(t),null;case 17:return rt(t.type)&&Jo(),qe(t),null;case 19:if(Pe(je),c=t.memoizedState,c===null)return qe(t),null;if(i=(t.flags&128)!==0,m=c.rendering,m===null)if(i)uo(c,!1);else{if(De!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(m=cs(e),m!==null){for(t.flags|=128,uo(c,!1),i=m.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=r,r=t.child;r!==null;)c=r,e=i,c.flags&=14680066,m=c.alternate,m===null?(c.childLanes=0,c.lanes=e,c.child=null,c.subtreeFlags=0,c.memoizedProps=null,c.memoizedState=null,c.updateQueue=null,c.dependencies=null,c.stateNode=null):(c.childLanes=m.childLanes,c.lanes=m.lanes,c.child=m.child,c.subtreeFlags=0,c.deletions=null,c.memoizedProps=m.memoizedProps,c.memoizedState=m.memoizedState,c.updateQueue=m.updateQueue,c.type=m.type,e=m.dependencies,c.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return ke(je,je.current&1|2),t.child}e=e.sibling}c.tail!==null&&_e()>yr&&(t.flags|=128,i=!0,uo(c,!1),t.lanes=4194304)}else{if(!i)if(e=cs(m),e!==null){if(t.flags|=128,i=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),uo(c,!0),c.tail===null&&c.tailMode==="hidden"&&!m.alternate&&!Re)return qe(t),null}else 2*_e()-c.renderingStartTime>yr&&r!==1073741824&&(t.flags|=128,i=!0,uo(c,!1),t.lanes=4194304);c.isBackwards?(m.sibling=t.child,t.child=m):(r=c.last,r!==null?r.sibling=m:t.child=m,c.last=m)}return c.tail!==null?(t=c.tail,c.rendering=t,c.tail=t.sibling,c.renderingStartTime=_e(),t.sibling=null,r=je.current,ke(je,i?r&1|2:r&1),t):(qe(t),null);case 22:case 23:return Jl(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&(t.mode&1)!==0?(dt&1073741824)!==0&&(qe(t),t.subtreeFlags&6&&(t.flags|=8192)):qe(t),null;case 24:return null;case 25:return null}throw Error(s(156,t.tag))}function Mg(e,t){switch(al(t),t.tag){case 1:return rt(t.type)&&Jo(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return hr(),Pe(nt),Pe(Ke),Sl(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return xl(t),null;case 13:if(Pe(je),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));cr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Pe(je),null;case 4:return hr(),null;case 10:return hl(t.type._context),null;case 22:case 23:return Jl(),null;case 24:return null;default:return null}}var xs=!1,Ye=!1,Lg=typeof WeakSet=="function"?WeakSet:Set,Y=null;function gr(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(i){Oe(e,t,i)}else r.current=null}function Ul(e,t,r){try{r()}catch(i){Oe(e,t,i)}}var Id=!1;function Dg(e,t){if(Ji=zo,e=fc(),Vi(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var l=i.anchorOffset,c=i.focusNode;i=i.focusOffset;try{r.nodeType,c.nodeType}catch{r=null;break e}var m=0,w=-1,C=-1,_=0,U=0,H=e,$=null;t:for(;;){for(var q;H!==r||l!==0&&H.nodeType!==3||(w=m+l),H!==c||i!==0&&H.nodeType!==3||(C=m+i),H.nodeType===3&&(m+=H.nodeValue.length),(q=H.firstChild)!==null;)$=H,H=q;for(;;){if(H===e)break t;if($===r&&++_===l&&(w=m),$===c&&++U===i&&(C=m),(q=H.nextSibling)!==null)break;H=$,$=H.parentNode}H=q}r=w===-1||C===-1?null:{start:w,end:C}}else r=null}r=r||{start:0,end:0}}else r=null;for(el={focusedElem:e,selectionRange:r},zo=!1,Y=t;Y!==null;)if(t=Y,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Y=e;else for(;Y!==null;){t=Y;try{var X=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(X!==null){var Z=X.memoizedProps,Ae=X.memoizedState,T=t.stateNode,P=T.getSnapshotBeforeUpdate(t.elementType===t.type?Z:Pt(t.type,Z),Ae);T.__reactInternalSnapshotBeforeUpdate=P}break;case 3:var O=t.stateNode.containerInfo;O.nodeType===1?O.textContent="":O.nodeType===9&&O.documentElement&&O.removeChild(O.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(W){Oe(t,t.return,W)}if(e=t.sibling,e!==null){e.return=t.return,Y=e;break}Y=t.return}return X=Id,Id=!1,X}function co(e,t,r){var i=t.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var l=i=i.next;do{if((l.tag&e)===e){var c=l.destroy;l.destroy=void 0,c!==void 0&&Ul(t,r,c)}l=l.next}while(l!==i)}}function ws(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var i=r.create;r.destroy=i()}r=r.next}while(r!==t)}}function Hl(e){var t=e.ref;if(t!==null){var r=e.stateNode;e.tag,e=r,typeof t=="function"?t(e):t.current=e}}function Md(e){var t=e.alternate;t!==null&&(e.alternate=null,Md(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[It],delete t[Jr],delete t[ol],delete t[xg],delete t[wg])),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 Ld(e){return e.tag===5||e.tag===3||e.tag===4}function Dd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ld(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 Wl(e,t,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Xo));else if(i!==4&&(e=e.child,e!==null))for(Wl(e,t,r),e=e.sibling;e!==null;)Wl(e,t,r),e=e.sibling}function Bl(e,t,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(i!==4&&(e=e.child,e!==null))for(Bl(e,t,r),e=e.sibling;e!==null;)Bl(e,t,r),e=e.sibling}var He=null,Nt=!1;function gn(e,t,r){for(r=r.child;r!==null;)Fd(e,t,r),r=r.sibling}function Fd(e,t,r){if(At&&typeof At.onCommitFiberUnmount=="function")try{At.onCommitFiberUnmount(Ao,r)}catch{}switch(r.tag){case 5:Ye||gr(r,t);case 6:var i=He,l=Nt;He=null,gn(e,t,r),He=i,Nt=l,He!==null&&(Nt?(e=He,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):He.removeChild(r.stateNode));break;case 18:He!==null&&(Nt?(e=He,r=r.stateNode,e.nodeType===8?rl(e.parentNode,r):e.nodeType===1&&rl(e,r),Hr(e)):rl(He,r.stateNode));break;case 4:i=He,l=Nt,He=r.stateNode.containerInfo,Nt=!0,gn(e,t,r),He=i,Nt=l;break;case 0:case 11:case 14:case 15:if(!Ye&&(i=r.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){l=i=i.next;do{var c=l,m=c.destroy;c=c.tag,m!==void 0&&((c&2)!==0||(c&4)!==0)&&Ul(r,t,m),l=l.next}while(l!==i)}gn(e,t,r);break;case 1:if(!Ye&&(gr(r,t),i=r.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=r.memoizedProps,i.state=r.memoizedState,i.componentWillUnmount()}catch(w){Oe(r,t,w)}gn(e,t,r);break;case 21:gn(e,t,r);break;case 22:r.mode&1?(Ye=(i=Ye)||r.memoizedState!==null,gn(e,t,r),Ye=i):gn(e,t,r);break;default:gn(e,t,r)}}function zd(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new Lg),t.forEach(function(i){var l=Qg.bind(null,e,i);r.has(i)||(r.add(i),i.then(l,l))})}}function Rt(e,t){var r=t.deletions;if(r!==null)for(var i=0;i<r.length;i++){var l=r[i];try{var c=e,m=t,w=m;e:for(;w!==null;){switch(w.tag){case 5:He=w.stateNode,Nt=!1;break e;case 3:He=w.stateNode.containerInfo,Nt=!0;break e;case 4:He=w.stateNode.containerInfo,Nt=!0;break e}w=w.return}if(He===null)throw Error(s(160));Fd(c,m,l),He=null,Nt=!1;var C=l.alternate;C!==null&&(C.return=null),l.return=null}catch(_){Oe(l,t,_)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)$d(t,e),t=t.sibling}function $d(e,t){var r=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Rt(t,e),Dt(e),i&4){try{co(3,e,e.return),ws(3,e)}catch(Z){Oe(e,e.return,Z)}try{co(5,e,e.return)}catch(Z){Oe(e,e.return,Z)}}break;case 1:Rt(t,e),Dt(e),i&512&&r!==null&&gr(r,r.return);break;case 5:if(Rt(t,e),Dt(e),i&512&&r!==null&&gr(r,r.return),e.flags&32){var l=e.stateNode;try{Or(l,"")}catch(Z){Oe(e,e.return,Z)}}if(i&4&&(l=e.stateNode,l!=null)){var c=e.memoizedProps,m=r!==null?r.memoizedProps:c,w=e.type,C=e.updateQueue;if(e.updateQueue=null,C!==null)try{w==="input"&&c.type==="radio"&&c.name!=null&&hu(l,c),Si(w,m);var _=Si(w,c);for(m=0;m<C.length;m+=2){var U=C[m],H=C[m+1];U==="style"?bu(l,H):U==="dangerouslySetInnerHTML"?wu(l,H):U==="children"?Or(l,H):D(l,U,H,_)}switch(w){case"input":gi(l,c);break;case"textarea":vu(l,c);break;case"select":var $=l._wrapperState.wasMultiple;l._wrapperState.wasMultiple=!!c.multiple;var q=c.value;q!=null?qn(l,!!c.multiple,q,!1):$!==!!c.multiple&&(c.defaultValue!=null?qn(l,!!c.multiple,c.defaultValue,!0):qn(l,!!c.multiple,c.multiple?[]:"",!1))}l[Jr]=c}catch(Z){Oe(e,e.return,Z)}}break;case 6:if(Rt(t,e),Dt(e),i&4){if(e.stateNode===null)throw Error(s(162));l=e.stateNode,c=e.memoizedProps;try{l.nodeValue=c}catch(Z){Oe(e,e.return,Z)}}break;case 3:if(Rt(t,e),Dt(e),i&4&&r!==null&&r.memoizedState.isDehydrated)try{Hr(t.containerInfo)}catch(Z){Oe(e,e.return,Z)}break;case 4:Rt(t,e),Dt(e);break;case 13:Rt(t,e),Dt(e),l=e.child,l.flags&8192&&(c=l.memoizedState!==null,l.stateNode.isHidden=c,!c||l.alternate!==null&&l.alternate.memoizedState!==null||(Kl=_e())),i&4&&zd(e);break;case 22:if(U=r!==null&&r.memoizedState!==null,e.mode&1?(Ye=(_=Ye)||U,Rt(t,e),Ye=_):Rt(t,e),Dt(e),i&8192){if(_=e.memoizedState!==null,(e.stateNode.isHidden=_)&&!U&&(e.mode&1)!==0)for(Y=e,U=e.child;U!==null;){for(H=Y=U;Y!==null;){switch($=Y,q=$.child,$.tag){case 0:case 11:case 14:case 15:co(4,$,$.return);break;case 1:gr($,$.return);var X=$.stateNode;if(typeof X.componentWillUnmount=="function"){i=$,r=$.return;try{t=i,X.props=t.memoizedProps,X.state=t.memoizedState,X.componentWillUnmount()}catch(Z){Oe(i,r,Z)}}break;case 5:gr($,$.return);break;case 22:if($.memoizedState!==null){Wd(H);continue}}q!==null?(q.return=$,Y=q):Wd(H)}U=U.sibling}e:for(U=null,H=e;;){if(H.tag===5){if(U===null){U=H;try{l=H.stateNode,_?(c=l.style,typeof c.setProperty=="function"?c.setProperty("display","none","important"):c.display="none"):(w=H.stateNode,C=H.memoizedProps.style,m=C!=null&&C.hasOwnProperty("display")?C.display:null,w.style.display=Su("display",m))}catch(Z){Oe(e,e.return,Z)}}}else if(H.tag===6){if(U===null)try{H.stateNode.nodeValue=_?"":H.memoizedProps}catch(Z){Oe(e,e.return,Z)}}else if((H.tag!==22&&H.tag!==23||H.memoizedState===null||H===e)&&H.child!==null){H.child.return=H,H=H.child;continue}if(H===e)break e;for(;H.sibling===null;){if(H.return===null||H.return===e)break e;U===H&&(U=null),H=H.return}U===H&&(U=null),H.sibling.return=H.return,H=H.sibling}}break;case 19:Rt(t,e),Dt(e),i&4&&zd(e);break;case 21:break;default:Rt(t,e),Dt(e)}}function Dt(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(Ld(r)){var i=r;break e}r=r.return}throw Error(s(160))}switch(i.tag){case 5:var l=i.stateNode;i.flags&32&&(Or(l,""),i.flags&=-33);var c=Dd(e);Bl(e,c,l);break;case 3:case 4:var m=i.stateNode.containerInfo,w=Dd(e);Wl(e,w,m);break;default:throw Error(s(161))}}catch(C){Oe(e,e.return,C)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Fg(e,t,r){Y=e,Ud(e)}function Ud(e,t,r){for(var i=(e.mode&1)!==0;Y!==null;){var l=Y,c=l.child;if(l.tag===22&&i){var m=l.memoizedState!==null||xs;if(!m){var w=l.alternate,C=w!==null&&w.memoizedState!==null||Ye;w=xs;var _=Ye;if(xs=m,(Ye=C)&&!_)for(Y=l;Y!==null;)m=Y,C=m.child,m.tag===22&&m.memoizedState!==null?Bd(l):C!==null?(C.return=m,Y=C):Bd(l);for(;c!==null;)Y=c,Ud(c),c=c.sibling;Y=l,xs=w,Ye=_}Hd(e)}else(l.subtreeFlags&8772)!==0&&c!==null?(c.return=l,Y=c):Hd(e)}}function Hd(e){for(;Y!==null;){var t=Y;if((t.flags&8772)!==0){var r=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:Ye||ws(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!Ye)if(r===null)i.componentDidMount();else{var l=t.elementType===t.type?r.memoizedProps:Pt(t.type,r.memoizedProps);i.componentDidUpdate(l,r.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var c=t.updateQueue;c!==null&&Wc(t,c,i);break;case 3:var m=t.updateQueue;if(m!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}Wc(t,m,r)}break;case 5:var w=t.stateNode;if(r===null&&t.flags&4){r=w;var C=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":C.autoFocus&&r.focus();break;case"img":C.src&&(r.src=C.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var _=t.alternate;if(_!==null){var U=_.memoizedState;if(U!==null){var H=U.dehydrated;H!==null&&Hr(H)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(s(163))}Ye||t.flags&512&&Hl(t)}catch($){Oe(t,t.return,$)}}if(t===e){Y=null;break}if(r=t.sibling,r!==null){r.return=t.return,Y=r;break}Y=t.return}}function Wd(e){for(;Y!==null;){var t=Y;if(t===e){Y=null;break}var r=t.sibling;if(r!==null){r.return=t.return,Y=r;break}Y=t.return}}function Bd(e){for(;Y!==null;){var t=Y;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{ws(4,t)}catch(C){Oe(t,r,C)}break;case 1:var i=t.stateNode;if(typeof i.componentDidMount=="function"){var l=t.return;try{i.componentDidMount()}catch(C){Oe(t,l,C)}}var c=t.return;try{Hl(t)}catch(C){Oe(t,c,C)}break;case 5:var m=t.return;try{Hl(t)}catch(C){Oe(t,m,C)}}}catch(C){Oe(t,t.return,C)}if(t===e){Y=null;break}var w=t.sibling;if(w!==null){w.return=t.return,Y=w;break}Y=t.return}}var zg=Math.ceil,Ss=F.ReactCurrentDispatcher,Vl=F.ReactCurrentOwner,xt=F.ReactCurrentBatchConfig,ye=0,$e=null,Ie=null,We=0,dt=0,vr=dn(0),De=0,fo=null,Fn=0,bs=0,Ql=0,po=null,st=null,Kl=0,yr=1/0,Xt=null,Cs=!1,Gl=null,vn=null,ks=!1,yn=null,Es=0,ho=0,ql=null,Ps=-1,Ns=0;function et(){return(ye&6)!==0?_e():Ps!==-1?Ps:Ps=_e()}function xn(e){return(e.mode&1)===0?1:(ye&2)!==0&&We!==0?We&-We:bg.transition!==null?(Ns===0&&(Ns=Du()),Ns):(e=be,e!==0||(e=window.event,e=e===void 0?16:Qu(e.type)),e)}function jt(e,t,r,i){if(50<ho)throw ho=0,ql=null,Error(s(185));Dr(e,r,i),((ye&2)===0||e!==$e)&&(e===$e&&((ye&2)===0&&(bs|=r),De===4&&wn(e,We)),it(e,i),r===1&&ye===0&&(t.mode&1)===0&&(yr=_e()+500,ts&&pn()))}function it(e,t){var r=e.callbackNode;bm(e,t);var i=Lo(e,e===$e?We:0);if(i===0)r!==null&&Iu(r),e.callbackNode=null,e.callbackPriority=0;else if(t=i&-i,e.callbackPriority!==t){if(r!=null&&Iu(r),t===1)e.tag===0?Sg(Qd.bind(null,e)):Oc(Qd.bind(null,e)),vg(function(){(ye&6)===0&&pn()}),r=null;else{switch(Fu(i)){case 1:r=Ri;break;case 4:r=Mu;break;case 16:r=_o;break;case 536870912:r=Lu;break;default:r=_o}r=ef(r,Vd.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function Vd(e,t){if(Ps=-1,Ns=0,(ye&6)!==0)throw Error(s(327));var r=e.callbackNode;if(xr()&&e.callbackNode!==r)return null;var i=Lo(e,e===$e?We:0);if(i===0)return null;if((i&30)!==0||(i&e.expiredLanes)!==0||t)t=Rs(e,i);else{t=i;var l=ye;ye|=2;var c=Gd();($e!==e||We!==t)&&(Xt=null,yr=_e()+500,$n(e,t));do try{Hg();break}catch(w){Kd(e,w)}while(!0);pl(),Ss.current=c,ye=l,Ie!==null?t=0:($e=null,We=0,t=De)}if(t!==0){if(t===2&&(l=ji(e),l!==0&&(i=l,t=Yl(e,l))),t===1)throw r=fo,$n(e,0),wn(e,i),it(e,_e()),r;if(t===6)wn(e,i);else{if(l=e.current.alternate,(i&30)===0&&!$g(l)&&(t=Rs(e,i),t===2&&(c=ji(e),c!==0&&(i=c,t=Yl(e,c))),t===1))throw r=fo,$n(e,0),wn(e,i),it(e,_e()),r;switch(e.finishedWork=l,e.finishedLanes=i,t){case 0:case 1:throw Error(s(345));case 2:Un(e,st,Xt);break;case 3:if(wn(e,i),(i&130023424)===i&&(t=Kl+500-_e(),10<t)){if(Lo(e,0)!==0)break;if(l=e.suspendedLanes,(l&i)!==i){et(),e.pingedLanes|=e.suspendedLanes&l;break}e.timeoutHandle=nl(Un.bind(null,e,st,Xt),t);break}Un(e,st,Xt);break;case 4:if(wn(e,i),(i&4194240)===i)break;for(t=e.eventTimes,l=-1;0<i;){var m=31-Ct(i);c=1<<m,m=t[m],m>l&&(l=m),i&=~c}if(i=l,i=_e()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*zg(i/1960))-i,10<i){e.timeoutHandle=nl(Un.bind(null,e,st,Xt),i);break}Un(e,st,Xt);break;case 5:Un(e,st,Xt);break;default:throw Error(s(329))}}}return it(e,_e()),e.callbackNode===r?Vd.bind(null,e):null}function Yl(e,t){var r=po;return e.current.memoizedState.isDehydrated&&($n(e,t).flags|=256),e=Rs(e,t),e!==2&&(t=st,st=r,t!==null&&Xl(t)),e}function Xl(e){st===null?st=e:st.push.apply(st,e)}function $g(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var i=0;i<r.length;i++){var l=r[i],c=l.getSnapshot;l=l.value;try{if(!kt(c(),l))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function wn(e,t){for(t&=~Ql,t&=~bs,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Ct(t),i=1<<r;e[r]=-1,t&=~i}}function Qd(e){if((ye&6)!==0)throw Error(s(327));xr();var t=Lo(e,0);if((t&1)===0)return it(e,_e()),null;var r=Rs(e,t);if(e.tag!==0&&r===2){var i=ji(e);i!==0&&(t=i,r=Yl(e,i))}if(r===1)throw r=fo,$n(e,0),wn(e,t),it(e,_e()),r;if(r===6)throw Error(s(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Un(e,st,Xt),it(e,_e()),null}function Zl(e,t){var r=ye;ye|=1;try{return e(t)}finally{ye=r,ye===0&&(yr=_e()+500,ts&&pn())}}function zn(e){yn!==null&&yn.tag===0&&(ye&6)===0&&xr();var t=ye;ye|=1;var r=xt.transition,i=be;try{if(xt.transition=null,be=1,e)return e()}finally{be=i,xt.transition=r,ye=t,(ye&6)===0&&pn()}}function Jl(){dt=vr.current,Pe(vr)}function $n(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,gg(r)),Ie!==null)for(r=Ie.return;r!==null;){var i=r;switch(al(i),i.tag){case 1:i=i.type.childContextTypes,i!=null&&Jo();break;case 3:hr(),Pe(nt),Pe(Ke),Sl();break;case 5:xl(i);break;case 4:hr();break;case 13:Pe(je);break;case 19:Pe(je);break;case 10:hl(i.type._context);break;case 22:case 23:Jl()}r=r.return}if($e=e,Ie=e=Sn(e.current,null),We=dt=t,De=0,fo=null,Ql=bs=Fn=0,st=po=null,Mn!==null){for(t=0;t<Mn.length;t++)if(r=Mn[t],i=r.interleaved,i!==null){r.interleaved=null;var l=i.next,c=r.pending;if(c!==null){var m=c.next;c.next=l,i.next=m}r.pending=i}Mn=null}return e}function Kd(e,t){do{var r=Ie;try{if(pl(),ds.current=ms,fs){for(var i=Te.memoizedState;i!==null;){var l=i.queue;l!==null&&(l.pending=null),i=i.next}fs=!1}if(Dn=0,ze=Le=Te=null,so=!1,io=0,Vl.current=null,r===null||r.return===null){De=1,fo=t,Ie=null;break}e:{var c=e,m=r.return,w=r,C=t;if(t=We,w.flags|=32768,C!==null&&typeof C=="object"&&typeof C.then=="function"){var _=C,U=w,H=U.tag;if((U.mode&1)===0&&(H===0||H===11||H===15)){var $=U.alternate;$?(U.updateQueue=$.updateQueue,U.memoizedState=$.memoizedState,U.lanes=$.lanes):(U.updateQueue=null,U.memoizedState=null)}var q=yd(m);if(q!==null){q.flags&=-257,xd(q,m,w,c,t),q.mode&1&&vd(c,_,t),t=q,C=_;var X=t.updateQueue;if(X===null){var Z=new Set;Z.add(C),t.updateQueue=Z}else X.add(C);break e}else{if((t&1)===0){vd(c,_,t),ea();break e}C=Error(s(426))}}else if(Re&&w.mode&1){var Ae=yd(m);if(Ae!==null){(Ae.flags&65536)===0&&(Ae.flags|=256),xd(Ae,m,w,c,t),dl(mr(C,w));break e}}c=C=mr(C,w),De!==4&&(De=2),po===null?po=[c]:po.push(c),c=m;do{switch(c.tag){case 3:c.flags|=65536,t&=-t,c.lanes|=t;var T=md(c,C,t);Hc(c,T);break e;case 1:w=C;var P=c.type,O=c.stateNode;if((c.flags&128)===0&&(typeof P.getDerivedStateFromError=="function"||O!==null&&typeof O.componentDidCatch=="function"&&(vn===null||!vn.has(O)))){c.flags|=65536,t&=-t,c.lanes|=t;var W=gd(c,w,t);Hc(c,W);break e}}c=c.return}while(c!==null)}Yd(r)}catch(ee){t=ee,Ie===r&&r!==null&&(Ie=r=r.return);continue}break}while(!0)}function Gd(){var e=Ss.current;return Ss.current=ms,e===null?ms:e}function ea(){(De===0||De===3||De===2)&&(De=4),$e===null||(Fn&268435455)===0&&(bs&268435455)===0||wn($e,We)}function Rs(e,t){var r=ye;ye|=2;var i=Gd();($e!==e||We!==t)&&(Xt=null,$n(e,t));do try{Ug();break}catch(l){Kd(e,l)}while(!0);if(pl(),ye=r,Ss.current=i,Ie!==null)throw Error(s(261));return $e=null,We=0,De}function Ug(){for(;Ie!==null;)qd(Ie)}function Hg(){for(;Ie!==null&&!pm();)qd(Ie)}function qd(e){var t=Jd(e.alternate,e,dt);e.memoizedProps=e.pendingProps,t===null?Yd(e):Ie=t,Vl.current=null}function Yd(e){var t=e;do{var r=t.alternate;if(e=t.return,(t.flags&32768)===0){if(r=Ig(r,t,dt),r!==null){Ie=r;return}}else{if(r=Mg(r,t),r!==null){r.flags&=32767,Ie=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{De=6,Ie=null;return}}if(t=t.sibling,t!==null){Ie=t;return}Ie=t=e}while(t!==null);De===0&&(De=5)}function Un(e,t,r){var i=be,l=xt.transition;try{xt.transition=null,be=1,Wg(e,t,r,i)}finally{xt.transition=l,be=i}return null}function Wg(e,t,r,i){do xr();while(yn!==null);if((ye&6)!==0)throw Error(s(327));r=e.finishedWork;var l=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(s(177));e.callbackNode=null,e.callbackPriority=0;var c=r.lanes|r.childLanes;if(Cm(e,c),e===$e&&(Ie=$e=null,We=0),(r.subtreeFlags&2064)===0&&(r.flags&2064)===0||ks||(ks=!0,ef(_o,function(){return xr(),null})),c=(r.flags&15990)!==0,(r.subtreeFlags&15990)!==0||c){c=xt.transition,xt.transition=null;var m=be;be=1;var w=ye;ye|=4,Vl.current=null,Dg(e,r),$d(r,e),ug(el),zo=!!Ji,el=Ji=null,e.current=r,Fg(r),hm(),ye=w,be=m,xt.transition=c}else e.current=r;if(ks&&(ks=!1,yn=e,Es=l),c=e.pendingLanes,c===0&&(vn=null),vm(r.stateNode),it(e,_e()),t!==null)for(i=e.onRecoverableError,r=0;r<t.length;r++)l=t[r],i(l.value,{componentStack:l.stack,digest:l.digest});if(Cs)throw Cs=!1,e=Gl,Gl=null,e;return(Es&1)!==0&&e.tag!==0&&xr(),c=e.pendingLanes,(c&1)!==0?e===ql?ho++:(ho=0,ql=e):ho=0,pn(),null}function xr(){if(yn!==null){var e=Fu(Es),t=xt.transition,r=be;try{if(xt.transition=null,be=16>e?16:e,yn===null)var i=!1;else{if(e=yn,yn=null,Es=0,(ye&6)!==0)throw Error(s(331));var l=ye;for(ye|=4,Y=e.current;Y!==null;){var c=Y,m=c.child;if((Y.flags&16)!==0){var w=c.deletions;if(w!==null){for(var C=0;C<w.length;C++){var _=w[C];for(Y=_;Y!==null;){var U=Y;switch(U.tag){case 0:case 11:case 15:co(8,U,c)}var H=U.child;if(H!==null)H.return=U,Y=H;else for(;Y!==null;){U=Y;var $=U.sibling,q=U.return;if(Md(U),U===_){Y=null;break}if($!==null){$.return=q,Y=$;break}Y=q}}}var X=c.alternate;if(X!==null){var Z=X.child;if(Z!==null){X.child=null;do{var Ae=Z.sibling;Z.sibling=null,Z=Ae}while(Z!==null)}}Y=c}}if((c.subtreeFlags&2064)!==0&&m!==null)m.return=c,Y=m;else e:for(;Y!==null;){if(c=Y,(c.flags&2048)!==0)switch(c.tag){case 0:case 11:case 15:co(9,c,c.return)}var T=c.sibling;if(T!==null){T.return=c.return,Y=T;break e}Y=c.return}}var P=e.current;for(Y=P;Y!==null;){m=Y;var O=m.child;if((m.subtreeFlags&2064)!==0&&O!==null)O.return=m,Y=O;else e:for(m=P;Y!==null;){if(w=Y,(w.flags&2048)!==0)try{switch(w.tag){case 0:case 11:case 15:ws(9,w)}}catch(ee){Oe(w,w.return,ee)}if(w===m){Y=null;break e}var W=w.sibling;if(W!==null){W.return=w.return,Y=W;break e}Y=w.return}}if(ye=l,pn(),At&&typeof At.onPostCommitFiberRoot=="function")try{At.onPostCommitFiberRoot(Ao,e)}catch{}i=!0}return i}finally{be=r,xt.transition=t}}return!1}function Xd(e,t,r){t=mr(r,t),t=md(e,t,1),e=mn(e,t,1),t=et(),e!==null&&(Dr(e,1,t),it(e,t))}function Oe(e,t,r){if(e.tag===3)Xd(e,e,r);else for(;t!==null;){if(t.tag===3){Xd(t,e,r);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(vn===null||!vn.has(i))){e=mr(r,e),e=gd(t,e,1),t=mn(t,e,1),e=et(),t!==null&&(Dr(t,1,e),it(t,e));break}}t=t.return}}function Bg(e,t,r){var i=e.pingCache;i!==null&&i.delete(t),t=et(),e.pingedLanes|=e.suspendedLanes&r,$e===e&&(We&r)===r&&(De===4||De===3&&(We&130023424)===We&&500>_e()-Kl?$n(e,0):Ql|=r),it(e,t)}function Zd(e,t){t===0&&((e.mode&1)===0?t=1:(t=Mo,Mo<<=1,(Mo&130023424)===0&&(Mo=4194304)));var r=et();e=Gt(e,t),e!==null&&(Dr(e,t,r),it(e,r))}function Vg(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Zd(e,r)}function Qg(e,t){var r=0;switch(e.tag){case 13:var i=e.stateNode,l=e.memoizedState;l!==null&&(r=l.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(s(314))}i!==null&&i.delete(t),Zd(e,r)}var Jd;Jd=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||nt.current)ot=!0;else{if((e.lanes&r)===0&&(t.flags&128)===0)return ot=!1,Ag(e,t,r);ot=(e.flags&131072)!==0}else ot=!1,Re&&(t.flags&1048576)!==0&&_c(t,rs,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;ys(e,t),e=t.pendingProps;var l=lr(t,Ke.current);pr(t,r),l=kl(null,t,i,e,l,r);var c=El();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,rt(i)?(c=!0,es(t)):c=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,vl(t),l.updater=gs,t.stateNode=l,l._reactInternals=t,Ol(t,i,e,r),t=Ml(null,t,i,!0,c,r)):(t.tag=0,Re&&c&&ll(t),Je(null,t,l,r),t=t.child),t;case 16:i=t.elementType;e:{switch(ys(e,t),e=t.pendingProps,l=i._init,i=l(i._payload),t.type=i,l=t.tag=Gg(i),e=Pt(i,e),l){case 0:t=Il(null,t,i,e,r);break e;case 1:t=Ed(null,t,i,e,r);break e;case 11:t=wd(null,t,i,e,r);break e;case 14:t=Sd(null,t,i,Pt(i.type,e),r);break e}throw Error(s(306,i,""))}return t;case 0:return i=t.type,l=t.pendingProps,l=t.elementType===i?l:Pt(i,l),Il(e,t,i,l,r);case 1:return i=t.type,l=t.pendingProps,l=t.elementType===i?l:Pt(i,l),Ed(e,t,i,l,r);case 3:e:{if(Pd(t),e===null)throw Error(s(387));i=t.pendingProps,c=t.memoizedState,l=c.element,Uc(e,t),us(t,i,null,r);var m=t.memoizedState;if(i=m.element,c.isDehydrated)if(c={element:i,isDehydrated:!1,cache:m.cache,pendingSuspenseBoundaries:m.pendingSuspenseBoundaries,transitions:m.transitions},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){l=mr(Error(s(423)),t),t=Nd(e,t,i,r,l);break e}else if(i!==l){l=mr(Error(s(424)),t),t=Nd(e,t,i,r,l);break e}else for(ct=cn(t.stateNode.containerInfo.firstChild),ut=t,Re=!0,Et=null,r=zc(t,null,i,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(cr(),i===l){t=Yt(e,t,r);break e}Je(e,t,i,r)}t=t.child}return t;case 5:return Bc(t),e===null&&cl(t),i=t.type,l=t.pendingProps,c=e!==null?e.memoizedProps:null,m=l.children,tl(i,l)?m=null:c!==null&&tl(i,c)&&(t.flags|=32),kd(e,t),Je(e,t,m,r),t.child;case 6:return e===null&&cl(t),null;case 13:return Rd(e,t,r);case 4:return yl(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=dr(t,null,i,r):Je(e,t,i,r),t.child;case 11:return i=t.type,l=t.pendingProps,l=t.elementType===i?l:Pt(i,l),wd(e,t,i,l,r);case 7:return Je(e,t,t.pendingProps,r),t.child;case 8:return Je(e,t,t.pendingProps.children,r),t.child;case 12:return Je(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(i=t.type._context,l=t.pendingProps,c=t.memoizedProps,m=l.value,ke(is,i._currentValue),i._currentValue=m,c!==null)if(kt(c.value,m)){if(c.children===l.children&&!nt.current){t=Yt(e,t,r);break e}}else for(c=t.child,c!==null&&(c.return=t);c!==null;){var w=c.dependencies;if(w!==null){m=c.child;for(var C=w.firstContext;C!==null;){if(C.context===i){if(c.tag===1){C=qt(-1,r&-r),C.tag=2;var _=c.updateQueue;if(_!==null){_=_.shared;var U=_.pending;U===null?C.next=C:(C.next=U.next,U.next=C),_.pending=C}}c.lanes|=r,C=c.alternate,C!==null&&(C.lanes|=r),ml(c.return,r,t),w.lanes|=r;break}C=C.next}}else if(c.tag===10)m=c.type===t.type?null:c.child;else if(c.tag===18){if(m=c.return,m===null)throw Error(s(341));m.lanes|=r,w=m.alternate,w!==null&&(w.lanes|=r),ml(m,r,t),m=c.sibling}else m=c.child;if(m!==null)m.return=c;else for(m=c;m!==null;){if(m===t){m=null;break}if(c=m.sibling,c!==null){c.return=m.return,m=c;break}m=m.return}c=m}Je(e,t,l.children,r),t=t.child}return t;case 9:return l=t.type,i=t.pendingProps.children,pr(t,r),l=vt(l),i=i(l),t.flags|=1,Je(e,t,i,r),t.child;case 14:return i=t.type,l=Pt(i,t.pendingProps),l=Pt(i.type,l),Sd(e,t,i,l,r);case 15:return bd(e,t,t.type,t.pendingProps,r);case 17:return i=t.type,l=t.pendingProps,l=t.elementType===i?l:Pt(i,l),ys(e,t),t.tag=1,rt(i)?(e=!0,es(t)):e=!1,pr(t,r),pd(t,i,l),Ol(t,i,l,r),Ml(null,t,i,!0,e,r);case 19:return Td(e,t,r);case 22:return Cd(e,t,r)}throw Error(s(156,t.tag))};function ef(e,t){return Au(e,t)}function Kg(e,t,r,i){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function wt(e,t,r,i){return new Kg(e,t,r,i)}function ta(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Gg(e){if(typeof e=="function")return ta(e)?1:0;if(e!=null){if(e=e.$$typeof,e===J)return 11;if(e===me)return 14}return 2}function Sn(e,t){var r=e.alternate;return r===null?(r=wt(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function js(e,t,r,i,l,c){var m=2;if(i=e,typeof e=="function")ta(e)&&(m=1);else if(typeof e=="string")m=5;else e:switch(e){case B:return Hn(r.children,l,c,t);case te:m=8,l|=8;break;case ce:return e=wt(12,r,t,l|2),e.elementType=ce,e.lanes=c,e;case ue:return e=wt(13,r,t,l),e.elementType=ue,e.lanes=c,e;case G:return e=wt(19,r,t,l),e.elementType=G,e.lanes=c,e;case oe:return Ts(r,l,c,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case le:m=10;break e;case pe:m=9;break e;case J:m=11;break e;case me:m=14;break e;case se:m=16,i=null;break e}throw Error(s(130,e==null?e:typeof e,""))}return t=wt(m,r,t,l),t.elementType=e,t.type=i,t.lanes=c,t}function Hn(e,t,r,i){return e=wt(7,e,i,t),e.lanes=r,e}function Ts(e,t,r,i){return e=wt(22,e,i,t),e.elementType=oe,e.lanes=r,e.stateNode={isHidden:!1},e}function na(e,t,r){return e=wt(6,e,null,t),e.lanes=r,e}function ra(e,t,r){return t=wt(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function qg(e,t,r,i,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ti(0),this.expirationTimes=Ti(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ti(0),this.identifierPrefix=i,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function oa(e,t,r,i,l,c,m,w,C){return e=new qg(e,t,r,w,C),t===1?(t=1,c===!0&&(t|=8)):t=0,c=wt(3,null,null,t),e.current=c,c.stateNode=e,c.memoizedState={element:i,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},vl(c),e}function Yg(e,t,r){var i=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:A,key:i==null?null:""+i,children:e,containerInfo:t,implementation:r}}function tf(e){if(!e)return fn;e=e._reactInternals;e:{if(Tn(e)!==e||e.tag!==1)throw Error(s(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(rt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(s(171))}if(e.tag===1){var r=e.type;if(rt(r))return jc(e,r,t)}return t}function nf(e,t,r,i,l,c,m,w,C){return e=oa(r,i,!0,e,l,c,m,w,C),e.context=tf(null),r=e.current,i=et(),l=xn(r),c=qt(i,l),c.callback=t??null,mn(r,c,l),e.current.lanes=l,Dr(e,l,i),it(e,i),e}function Os(e,t,r,i){var l=t.current,c=et(),m=xn(l);return r=tf(r),t.context===null?t.context=r:t.pendingContext=r,t=qt(c,m),t.payload={element:e},i=i===void 0?null:i,i!==null&&(t.callback=i),e=mn(l,t,m),e!==null&&(jt(e,l,m,c),as(e,l,m)),m}function _s(e){return e=e.current,e.child?(e.child.tag===5,e.child.stateNode):null}function rf(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function sa(e,t){rf(e,t),(e=e.alternate)&&rf(e,t)}function Xg(){return null}var of=typeof reportError=="function"?reportError:function(e){console.error(e)};function ia(e){this._internalRoot=e}As.prototype.render=ia.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(s(409));Os(e,t,null,null)},As.prototype.unmount=ia.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;zn(function(){Os(null,e,null,null)}),t[Bt]=null}};function As(e){this._internalRoot=e}As.prototype.unstable_scheduleHydration=function(e){if(e){var t=Uu();e={blockedOn:null,target:e,priority:t};for(var r=0;r<ln.length&&t!==0&&t<ln[r].priority;r++);ln.splice(r,0,e),r===0&&Bu(e)}};function la(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Is(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function sf(){}function Zg(e,t,r,i,l){if(l){if(typeof i=="function"){var c=i;i=function(){var _=_s(m);c.call(_)}}var m=nf(t,i,e,0,null,!1,!1,"",sf);return e._reactRootContainer=m,e[Bt]=m.current,Xr(e.nodeType===8?e.parentNode:e),zn(),m}for(;l=e.lastChild;)e.removeChild(l);if(typeof i=="function"){var w=i;i=function(){var _=_s(C);w.call(_)}}var C=oa(e,0,!1,null,null,!1,!1,"",sf);return e._reactRootContainer=C,e[Bt]=C.current,Xr(e.nodeType===8?e.parentNode:e),zn(function(){Os(t,C,r,i)}),C}function Ms(e,t,r,i,l){var c=r._reactRootContainer;if(c){var m=c;if(typeof l=="function"){var w=l;l=function(){var C=_s(m);w.call(C)}}Os(t,m,e,l)}else m=Zg(r,t,e,l,i);return _s(m)}zu=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=Lr(t.pendingLanes);r!==0&&(Oi(t,r|1),it(t,_e()),(ye&6)===0&&(yr=_e()+500,pn()))}break;case 13:zn(function(){var i=Gt(e,1);if(i!==null){var l=et();jt(i,e,1,l)}}),sa(e,1)}},_i=function(e){if(e.tag===13){var t=Gt(e,134217728);if(t!==null){var r=et();jt(t,e,134217728,r)}sa(e,134217728)}},$u=function(e){if(e.tag===13){var t=xn(e),r=Gt(e,t);if(r!==null){var i=et();jt(r,e,t,i)}sa(e,t)}},Uu=function(){return be},Hu=function(e,t){var r=be;try{return be=e,t()}finally{be=r}},ki=function(e,t,r){switch(t){case"input":if(gi(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var i=r[t];if(i!==e&&i.form===e.form){var l=Zo(i);if(!l)throw Error(s(90));Ro(i),gi(i,l)}}}break;case"textarea":vu(e,r);break;case"select":t=r.value,t!=null&&qn(e,!!r.multiple,t,!1)}},Pu=Zl,Nu=zn;var Jg={usingClientEntryPoint:!1,Events:[eo,sr,Zo,ku,Eu,Zl]},mo={findFiberByHostInstance:On,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},ev={bundleType:mo.bundleType,version:mo.version,rendererPackageName:mo.rendererPackageName,rendererConfig:mo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:F.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Ou(e),e===null?null:e.stateNode},findFiberByHostInstance:mo.findFiberByHostInstance||Xg,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 Ls=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ls.isDisabled&&Ls.supportsFiber)try{Ao=Ls.inject(ev),At=Ls}catch{}}return lt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Jg,lt.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!la(t))throw Error(s(200));return Yg(e,t,null,r)},lt.createRoot=function(e,t){if(!la(e))throw Error(s(299));var r=!1,i="",l=of;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(l=t.onRecoverableError)),t=oa(e,1,!1,null,null,r,!1,i,l),e[Bt]=t.current,Xr(e.nodeType===8?e.parentNode:e),new ia(t)},lt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(s(188)):(e=Object.keys(e).join(","),Error(s(268,e)));return e=Ou(t),e=e===null?null:e.stateNode,e},lt.flushSync=function(e){return zn(e)},lt.hydrate=function(e,t,r){if(!Is(t))throw Error(s(200));return Ms(null,e,t,!0,r)},lt.hydrateRoot=function(e,t,r){if(!la(e))throw Error(s(405));var i=r!=null&&r.hydratedSources||null,l=!1,c="",m=of;if(r!=null&&(r.unstable_strictMode===!0&&(l=!0),r.identifierPrefix!==void 0&&(c=r.identifierPrefix),r.onRecoverableError!==void 0&&(m=r.onRecoverableError)),t=nf(t,null,e,1,r??null,l,!1,c,m),e[Bt]=t.current,Xr(e),i)for(e=0;e<i.length;e++)r=i[e],l=r._getVersion,l=l(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,l]:t.mutableSourceEagerHydrationData.push(r,l);return new As(t)},lt.render=function(e,t,r){if(!Is(t))throw Error(s(200));return Ms(null,e,t,!1,r)},lt.unmountComponentAtNode=function(e){if(!Is(e))throw Error(s(40));return e._reactRootContainer?(zn(function(){Ms(null,null,e,!1,function(){e._reactRootContainer=null,e[Bt]=null})}),!0):!1},lt.unstable_batchedUpdates=Zl,lt.unstable_renderSubtreeIntoContainer=function(e,t,r,i){if(!Is(r))throw Error(s(200));if(e==null||e._reactInternals===void 0)throw Error(s(38));return Ms(e,t,r,!1,i)},lt.version="18.3.1-next-f1338f8080-20240426",lt}var hf;function sp(){if(hf)return ca.exports;hf=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(o){console.error(o)}}return n(),ca.exports=av(),ca.exports}var mf;function uv(){if(mf)return Ds;mf=1;var n=sp();return Ds.createRoot=n.createRoot,Ds.hydrateRoot=n.hydrateRoot,Ds}var cv=uv();function dv(n,o){if(n instanceof RegExp)return{keys:!1,pattern:n};var s,a,u,f,p=[],h="",g=n.split("/");for(g[0]||g.shift();u=g.shift();)s=u[0],s==="*"?(p.push(s),h+=u[1]==="?"?"(?:/(.*))?":"/(.*)"):s===":"?(a=u.indexOf("?",1),f=u.indexOf(".",1),p.push(u.substring(1,~a?a:~f?f:u.length)),h+=~a&&!~f?"(?:/([^/]+?))?":"/([^/]+?)",~f&&(h+=(~a?"?":"")+"\\"+u.substring(f))):h+="/"+u;return{keys:p,pattern:new RegExp("^"+h+(o?"(?=$|/)":"/?$"),"i")}}var y=ti();const En=op(y),za=nv({__proto__:null,default:En},[y]);var pa={exports:{}},ha={};var gf;function fv(){if(gf)return ha;gf=1;var n=ti();function o(S,k){return S===k&&(S!==0||1/S===1/k)||S!==S&&k!==k}var s=typeof Object.is=="function"?Object.is:o,a=n.useState,u=n.useEffect,f=n.useLayoutEffect,p=n.useDebugValue;function h(S,k){var R=k(),j=a({inst:{value:R,getSnapshot:k}}),E=j[0].inst,b=j[1];return f(function(){E.value=R,E.getSnapshot=k,g(E)&&b({inst:E})},[S,R,k]),u(function(){return g(E)&&b({inst:E}),S(function(){g(E)&&b({inst:E})})},[S]),p(R),R}function g(S){var k=S.getSnapshot;S=S.value;try{var R=k();return!s(S,R)}catch{return!0}}function v(S,k){return k()}var x=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?v:h;return ha.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:x,ha}var vf;function pv(){return vf||(vf=1,pa.exports=fv()),pa.exports}var ip=pv();const hv=za.useInsertionEffect,mv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",gv=mv?y.useLayoutEffect:y.useEffect,vv=hv||gv,lp=n=>{const o=y.useRef([n,(...s)=>o[0](...s)]).current;return vv(()=>{o[0]=n}),o[1]},yv="popstate",$a="pushState",Ua="replaceState",xv="hashchange",yf=[yv,$a,Ua,xv],wv=n=>{for(const o of yf)addEventListener(o,n);return()=>{for(const o of yf)removeEventListener(o,n)}},ap=(n,o)=>ip.useSyncExternalStore(wv,n,o),xf=()=>location.search,Sv=({ssrSearch:n}={})=>ap(xf,n!=null?()=>n:xf),wf=()=>location.pathname,bv=({ssrPath:n}={})=>ap(wf,n!=null?()=>n:wf),Cv=(n,{replace:o=!1,state:s=null}={})=>history[o?Ua:$a](s,"",n),kv=(n={})=>[bv(n),Cv],Sf=Symbol.for("wouter_v3");if(typeof history<"u"&&typeof window[Sf]>"u"){for(const n of[$a,Ua]){const o=history[n];history[n]=function(){const s=o.apply(this,arguments),a=new Event(n);return a.arguments=arguments,dispatchEvent(a),s}}Object.defineProperty(window,Sf,{value:!0})}const Ev=(n,o)=>o.toLowerCase().indexOf(n.toLowerCase())?"~"+o:o.slice(n.length)||"/",up=(n="")=>n==="/"?"":n,Pv=(n,o)=>n[0]==="~"?n.slice(1):up(o)+n,Nv=(n="",o)=>Ev(bf(up(n)),bf(o)),bf=n=>{try{return decodeURI(n)}catch{return n}},cp={hook:kv,searchHook:Sv,parser:dv,base:"",ssrPath:void 0,ssrSearch:void 0,ssrContext:void 0,hrefs:n=>n,aroundNav:(n,o,s)=>n(o,s)},dp=y.createContext(cp),ni=()=>y.useContext(dp),fp={},pp=y.createContext(fp),Rv=()=>y.useContext(pp),Ha=n=>{const[o,s]=n.hook(n);return[Nv(n.base,o),lp((a,u)=>n.aroundNav(s,Pv(a,n.base),u))]},hp=(n,o,s,a)=>{const{pattern:u,keys:f}=o instanceof RegExp?{keys:!1,pattern:o}:n(o||"*",a),p=u.exec(s)||[],[h,...g]=p;return h!==void 0?[!0,(()=>{const v=f!==!1?Object.fromEntries(f.map((S,k)=>[S,g[k]])):p.groups;let x={...g};return v&&Object.assign(x,v),x})(),...a?[h]:[]]:[!1,null]},mp=({children:n,...o})=>{const s=ni(),a=o.hook?cp:s;let u=a;const[f,p=o.ssrSearch??""]=o.ssrPath?.split("?")??[];f&&(o.ssrSearch=p,o.ssrPath=f),o.hrefs=o.hrefs??o.hook?.hrefs,o.searchHook=o.searchHook??o.hook?.searchHook;let h=y.useRef({}),g=h.current,v=g;for(let x in a){const S=x==="base"?a[x]+(o[x]??""):o[x]??a[x];g===v&&S!==v[x]&&(h.current=v={...v}),v[x]=S,(S!==a[x]||S!==u[x])&&(u=v)}return y.createElement(dp.Provider,{value:u,children:n})},Cf=({children:n,component:o},s)=>o?y.createElement(o,{params:s}):typeof n=="function"?n(s):n,jv=n=>{let o=y.useRef(fp);const s=o.current;return o.current=Object.keys(n).length!==Object.keys(s).length||Object.entries(n).some(([a,u])=>u!==s[a])?n:s},Fs=({path:n,nest:o,match:s,...a})=>{const u=ni(),[f]=Ha(u),[p,h,g]=s??hp(u.parser,n,f,o),v=jv({...Rv(),...h});if(!p)return null;const x=g?y.createElement(mp,{base:g},Cf(a,v)):Cf(a,v);return y.createElement(pp.Provider,{value:v,children:x})},Ks=y.forwardRef((n,o)=>{const s=ni(),[a,u]=Ha(s),{to:f="",href:p=f,onClick:h,asChild:g,children:v,className:x,replace:S,state:k,transition:R,...j}=n,E=lp(I=>{I.ctrlKey||I.metaKey||I.altKey||I.shiftKey||I.button!==0||(h?.(I),I.defaultPrevented||(I.preventDefault(),u(p,n)))}),b=s.hrefs(p[0]==="~"?p.slice(1):s.base+p,s);return g&&y.isValidElement(v)?y.cloneElement(v,{onClick:E,href:b}):y.createElement("a",{...j,onClick:E,href:b,className:x?.call?x(a===p):x,children:v,ref:o})}),gp=n=>Array.isArray(n)?n.flatMap(o=>gp(o&&o.type===y.Fragment?o.props.children:o)):[n],Tv=({children:n,location:o})=>{const s=ni(),[a]=Ha(s);for(const u of gp(n)){let f=0;if(y.isValidElement(u)&&(f=hp(s.parser,u.props.path,o||a,u.props.nest))[0])return y.cloneElement(u,{match:f})}return null},xo={v:[]},kf=()=>xo.v.forEach(n=>n()),Ov=n=>(xo.v.push(n)===1&&addEventListener("hashchange",kf),()=>{xo.v=xo.v.filter(o=>o!==n),xo.v.length||removeEventListener("hashchange",kf)}),_v=()=>"/"+location.hash.replace(/^#?\/?/,""),Av=(n,{state:o=null,replace:s=!1}={})=>{const a=location.href,[u,f]=n.replace(/^#?\/?/,"").split("?"),p=new URL(location.href);p.hash=`/${u}`,f&&(p.search=f);const h=p.href;s?history.replaceState(o,"",h):history.pushState(o,"",h);const g=typeof HashChangeEvent<"u"?new HashChangeEvent("hashchange",{oldURL:a,newURL:h}):new Event("hashchange",{detail:{oldURL:a,newURL:h}});dispatchEvent(g)},vp=({ssrPath:n="/"}={})=>[ip.useSyncExternalStore(Ov,_v,()=>n),Av];vp.hrefs=n=>"#"+n;var Pr=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Iv={setTimeout:(n,o)=>setTimeout(n,o),clearTimeout:n=>clearTimeout(n),setInterval:(n,o)=>setInterval(n,o),clearInterval:n=>clearInterval(n)},Mv=class{#e=Iv;#t=!1;setTimeoutProvider(n){this.#e=n}setTimeout(n,o){return this.#e.setTimeout(n,o)}clearTimeout(n){this.#e.clearTimeout(n)}setInterval(n,o){return this.#e.setInterval(n,o)}clearInterval(n){this.#e.clearInterval(n)}},Bn=new Mv;function Lv(n){setTimeout(n,0)}var Vn=typeof window>"u"||"Deno"in globalThis;function tt(){}function Dv(n,o){return typeof n=="function"?n(o):n}function Ca(n){return typeof n=="number"&&n>=0&&n!==1/0}function yp(n,o){return Math.max(n+(o||0)-Date.now(),0)}function Pn(n,o){return typeof n=="function"?n(o):n}function St(n,o){return typeof n=="function"?n(o):n}function Ef(n,o){const{type:s="all",exact:a,fetchStatus:u,predicate:f,queryKey:p,stale:h}=n;if(p){if(a){if(o.queryHash!==Wa(p,o.options))return!1}else if(!So(o.queryKey,p))return!1}if(s!=="all"){const g=o.isActive();if(s==="active"&&!g||s==="inactive"&&g)return!1}return!(typeof h=="boolean"&&o.isStale()!==h||u&&u!==o.state.fetchStatus||f&&!f(o))}function Pf(n,o){const{exact:s,status:a,predicate:u,mutationKey:f}=n;if(f){if(!o.options.mutationKey)return!1;if(s){if(Qn(o.options.mutationKey)!==Qn(f))return!1}else if(!So(o.options.mutationKey,f))return!1}return!(a&&o.state.status!==a||u&&!u(o))}function Wa(n,o){return(o?.queryKeyHashFn||Qn)(n)}function Qn(n){return JSON.stringify(n,(o,s)=>ka(s)?Object.keys(s).sort().reduce((a,u)=>(a[u]=s[u],a),{}):s)}function So(n,o){return n===o?!0:typeof n!=typeof o?!1:n&&o&&typeof n=="object"&&typeof o=="object"?Object.keys(o).every(s=>So(n[s],o[s])):!1}var Fv=Object.prototype.hasOwnProperty;function xp(n,o,s=0){if(n===o)return n;if(s>500)return o;const a=Nf(n)&&Nf(o);if(!a&&!(ka(n)&&ka(o)))return o;const f=(a?n:Object.keys(n)).length,p=a?o:Object.keys(o),h=p.length,g=a?new Array(h):{};let v=0;for(let x=0;x<h;x++){const S=a?x:p[x],k=n[S],R=o[S];if(k===R){g[S]=k,(a?x<f:Fv.call(n,S))&&v++;continue}if(k===null||R===null||typeof k!="object"||typeof R!="object"){g[S]=R;continue}const j=xp(k,R,s+1);g[S]=j,j===k&&v++}return f===h&&v===f?n:g}function Gs(n,o){if(!o||Object.keys(n).length!==Object.keys(o).length)return!1;for(const s in n)if(n[s]!==o[s])return!1;return!0}function Nf(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function ka(n){if(!Rf(n))return!1;const o=n.constructor;if(o===void 0)return!0;const s=o.prototype;return!(!Rf(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function Rf(n){return Object.prototype.toString.call(n)==="[object Object]"}function zv(n){return new Promise(o=>{Bn.setTimeout(o,n)})}function Ea(n,o,s){return typeof s.structuralSharing=="function"?s.structuralSharing(n,o):s.structuralSharing!==!1?xp(n,o):o}function $v(n,o,s=0){const a=[...n,o];return s&&a.length>s?a.slice(1):a}function Uv(n,o,s=0){const a=[o,...n];return s&&a.length>s?a.slice(0,-1):a}var Ba=Symbol();function wp(n,o){return!n.queryFn&&o?.initialPromise?()=>o.initialPromise:!n.queryFn||n.queryFn===Ba?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function Va(n,o){return typeof n=="function"?n(...o):!!n}function Hv(n,o,s){let a=!1,u;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(u??=o(),a||(a=!0,u.aborted?s():u.addEventListener("abort",s,{once:!0})),u)}),n}var Wv=class extends Pr{#e;#t;#n;constructor(){super(),this.#n=n=>{if(!Vn&&window.addEventListener){const o=()=>n();return window.addEventListener("visibilitychange",o,!1),()=>{window.removeEventListener("visibilitychange",o)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(n){this.#n=n,this.#t?.(),this.#t=n(o=>{typeof o=="boolean"?this.setFocused(o):this.onFocus()})}setFocused(n){this.#e!==n&&(this.#e=n,this.onFocus())}onFocus(){const n=this.isFocused();this.listeners.forEach(o=>{o(n)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},Qa=new Wv;function Pa(){let n,o;const s=new Promise((u,f)=>{n=u,o=f});s.status="pending",s.catch(()=>{});function a(u){Object.assign(s,u),delete s.resolve,delete s.reject}return s.resolve=u=>{a({status:"fulfilled",value:u}),n(u)},s.reject=u=>{a({status:"rejected",reason:u}),o(u)},s}var Bv=Lv;function Vv(){let n=[],o=0,s=h=>{h()},a=h=>{h()},u=Bv;const f=h=>{o?n.push(h):u(()=>{s(h)})},p=()=>{const h=n;n=[],h.length&&u(()=>{a(()=>{h.forEach(g=>{s(g)})})})};return{batch:h=>{let g;o++;try{g=h()}finally{o--,o||p()}return g},batchCalls:h=>(...g)=>{f(()=>{h(...g)})},schedule:f,setNotifyFunction:h=>{s=h},setBatchNotifyFunction:h=>{a=h},setScheduler:h=>{u=h}}}var Fe=Vv(),Qv=class extends Pr{#e=!0;#t;#n;constructor(){super(),this.#n=n=>{if(!Vn&&window.addEventListener){const o=()=>n(!0),s=()=>n(!1);return window.addEventListener("online",o,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",o),window.removeEventListener("offline",s)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(n){this.#n=n,this.#t?.(),this.#t=n(this.setOnline.bind(this))}setOnline(n){this.#e!==n&&(this.#e=n,this.listeners.forEach(s=>{s(n)}))}isOnline(){return this.#e}},qs=new Qv;function Kv(n){return Math.min(1e3*2**n,3e4)}function Sp(n){return(n??"online")==="online"?qs.isOnline():!0}var Na=class extends Error{constructor(n){super("CancelledError"),this.revert=n?.revert,this.silent=n?.silent}};function bp(n){let o=!1,s=0,a;const u=Pa(),f=()=>u.status!=="pending",p=E=>{if(!f()){const b=new Na(E);k(b),n.onCancel?.(b)}},h=()=>{o=!0},g=()=>{o=!1},v=()=>Qa.isFocused()&&(n.networkMode==="always"||qs.isOnline())&&n.canRun(),x=()=>Sp(n.networkMode)&&n.canRun(),S=E=>{f()||(a?.(),u.resolve(E))},k=E=>{f()||(a?.(),u.reject(E))},R=()=>new Promise(E=>{a=b=>{(f()||v())&&E(b)},n.onPause?.()}).then(()=>{a=void 0,f()||n.onContinue?.()}),j=()=>{if(f())return;let E;const b=s===0?n.initialPromise:void 0;try{E=b??n.fn()}catch(I){E=Promise.reject(I)}Promise.resolve(E).then(S).catch(I=>{if(f())return;const M=n.retry??(Vn?0:3),D=n.retryDelay??Kv,F=typeof D=="function"?D(s,I):D,V=M===!0||typeof M=="number"&&s<M||typeof M=="function"&&M(s,I);if(o||!V){k(I);return}s++,n.onFail?.(s,I),zv(F).then(()=>v()?void 0:R()).then(()=>{o?k(I):j()})})};return{promise:u,status:()=>u.status,cancel:p,continue:()=>(a?.(),u),cancelRetry:h,continueRetry:g,canStart:x,start:()=>(x()?j():R().then(j),u)}}var Cp=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ca(this.gcTime)&&(this.#e=Bn.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(Vn?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Bn.clearTimeout(this.#e),this.#e=void 0)}},Gv=class extends Cp{#e;#t;#n;#o;#r;#i;#l;constructor(n){super(),this.#l=!1,this.#i=n.defaultOptions,this.setOptions(n.options),this.observers=[],this.#o=n.client,this.#n=this.#o.getQueryCache(),this.queryKey=n.queryKey,this.queryHash=n.queryHash,this.#e=Tf(this.options),this.state=n.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(n){if(this.options={...this.#i,...n},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const o=Tf(this.options);o.data!==void 0&&(this.setState(jf(o.data,o.dataUpdatedAt)),this.#e=o)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(n,o){const s=Ea(this.state.data,n,this.options);return this.#s({data:s,type:"success",dataUpdatedAt:o?.updatedAt,manual:o?.manual}),s}setState(n,o){this.#s({type:"setState",state:n,setStateOptions:o})}cancel(n){const o=this.#r?.promise;return this.#r?.cancel(n),o?o.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(n=>St(n.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ba||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(n=>Pn(n.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(n=>n.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(n=0){return this.state.data===void 0?!0:n==="static"?!1:this.state.isInvalidated?!0:!yp(this.state.dataUpdatedAt,n)}onFocus(){this.observers.find(o=>o.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(o=>o.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(n){this.observers.includes(n)||(this.observers.push(n),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:n}))}removeObserver(n){this.observers.includes(n)&&(this.observers=this.observers.filter(o=>o!==n),this.observers.length||(this.#r&&(this.#l?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:n}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#s({type:"invalidate"})}async fetch(n,o){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&o?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(n&&this.setOptions(n),!this.options.queryFn){const h=this.observers.find(g=>g.options.queryFn);h&&this.setOptions(h.options)}const s=new AbortController,a=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(this.#l=!0,s.signal)})},u=()=>{const h=wp(this.options,o),v=(()=>{const x={client:this.#o,queryKey:this.queryKey,meta:this.meta};return a(x),x})();return this.#l=!1,this.options.persister?this.options.persister(h,v,this):h(v)},p=(()=>{const h={fetchOptions:o,options:this.options,queryKey:this.queryKey,client:this.#o,state:this.state,fetchFn:u};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=bp({initialPromise:o?.initialPromise,fn:p.fetchFn,onCancel:h=>{h instanceof Na&&h.revert&&this.setState({...this.#t,fetchStatus:"idle"}),s.abort()},onFail:(h,g)=>{this.#s({type:"failed",failureCount:h,error:g})},onPause:()=>{this.#s({type:"pause"})},onContinue:()=>{this.#s({type:"continue"})},retry:p.options.retry,retryDelay:p.options.retryDelay,networkMode:p.options.networkMode,canRun:()=>!0});try{const h=await this.#r.start();if(h===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(h),this.#n.config.onSuccess?.(h,this),this.#n.config.onSettled?.(h,this.state.error,this),h}catch(h){if(h instanceof Na){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(n){const o=s=>{switch(n.type){case"failed":return{...s,fetchFailureCount:n.failureCount,fetchFailureReason:n.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...kp(s.data,this.options),fetchMeta:n.meta??null};case"success":const a={...s,...jf(n.data,n.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!n.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=n.manual?a:void 0,a;case"error":const u=n.error;return{...s,error:u,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:u,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...n.state}}};this.state=o(this.state),Fe.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:n})})}};function kp(n,o){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Sp(o.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function jf(n,o){return{data:n,dataUpdatedAt:o??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Tf(n){const o=typeof n.initialData=="function"?n.initialData():n.initialData,s=o!==void 0,a=s?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:o,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 qv=class extends Pr{constructor(n,o){super(),this.options=o,this.#e=n,this.#s=null,this.#l=Pa(),this.bindMethods(),this.setOptions(o)}#e;#t=void 0;#n=void 0;#o=void 0;#r;#i;#l;#s;#m;#f;#p;#u;#c;#a;#h=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Of(this.#t,this.options)?this.#d():this.updateResult(),this.#x())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ra(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ra(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#w(),this.#S(),this.#t.removeObserver(this)}setOptions(n){const o=this.options,s=this.#t;if(this.options=this.#e.defaultQueryOptions(n),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof St(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#b(),this.#t.setOptions(this.options),o._defaulted&&!Gs(this.options,o)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const a=this.hasListeners();a&&_f(this.#t,s,this.options,o)&&this.#d(),this.updateResult(),a&&(this.#t!==s||St(this.options.enabled,this.#t)!==St(o.enabled,this.#t)||Pn(this.options.staleTime,this.#t)!==Pn(o.staleTime,this.#t))&&this.#g();const u=this.#v();a&&(this.#t!==s||St(this.options.enabled,this.#t)!==St(o.enabled,this.#t)||u!==this.#a)&&this.#y(u)}getOptimisticResult(n){const o=this.#e.getQueryCache().build(this.#e,n),s=this.createResult(o,n);return Xv(this,s)&&(this.#o=s,this.#i=this.options,this.#r=this.#t.state),s}getCurrentResult(){return this.#o}trackResult(n,o){return new Proxy(n,{get:(s,a)=>(this.trackProp(a),o?.(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#l.status==="pending"&&this.#l.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(s,a))})}trackProp(n){this.#h.add(n)}getCurrentQuery(){return this.#t}refetch({...n}={}){return this.fetch({...n})}fetchOptimistic(n){const o=this.#e.defaultQueryOptions(n),s=this.#e.getQueryCache().build(this.#e,o);return s.fetch().then(()=>this.createResult(s,o))}fetch(n){return this.#d({...n,cancelRefetch:n.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#o))}#d(n){this.#b();let o=this.#t.fetch(this.options,n);return n?.throwOnError||(o=o.catch(tt)),o}#g(){this.#w();const n=Pn(this.options.staleTime,this.#t);if(Vn||this.#o.isStale||!Ca(n))return;const s=yp(this.#o.dataUpdatedAt,n)+1;this.#u=Bn.setTimeout(()=>{this.#o.isStale||this.updateResult()},s)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(n){this.#S(),this.#a=n,!(Vn||St(this.options.enabled,this.#t)===!1||!Ca(this.#a)||this.#a===0)&&(this.#c=Bn.setInterval(()=>{(this.options.refetchIntervalInBackground||Qa.isFocused())&&this.#d()},this.#a))}#x(){this.#g(),this.#y(this.#v())}#w(){this.#u&&(Bn.clearTimeout(this.#u),this.#u=void 0)}#S(){this.#c&&(Bn.clearInterval(this.#c),this.#c=void 0)}createResult(n,o){const s=this.#t,a=this.options,u=this.#o,f=this.#r,p=this.#i,g=n!==s?n.state:this.#n,{state:v}=n;let x={...v},S=!1,k;if(o._optimisticResults){const te=this.hasListeners(),ce=!te&&Of(n,o),le=te&&_f(n,s,o,a);(ce||le)&&(x={...x,...kp(v.data,n.options)}),o._optimisticResults==="isRestoring"&&(x.fetchStatus="idle")}let{error:R,errorUpdatedAt:j,status:E}=x;k=x.data;let b=!1;if(o.placeholderData!==void 0&&k===void 0&&E==="pending"){let te;u?.isPlaceholderData&&o.placeholderData===p?.placeholderData?(te=u.data,b=!0):te=typeof o.placeholderData=="function"?o.placeholderData(this.#p?.state.data,this.#p):o.placeholderData,te!==void 0&&(E="success",k=Ea(u?.data,te,o),S=!0)}if(o.select&&k!==void 0&&!b)if(u&&k===f?.data&&o.select===this.#m)k=this.#f;else try{this.#m=o.select,k=o.select(k),k=Ea(u?.data,k,o),this.#f=k,this.#s=null}catch(te){this.#s=te}this.#s&&(R=this.#s,k=this.#f,j=Date.now(),E="error");const I=x.fetchStatus==="fetching",M=E==="pending",D=E==="error",F=M&&I,V=k!==void 0,B={status:E,fetchStatus:x.fetchStatus,isPending:M,isSuccess:E==="success",isError:D,isInitialLoading:F,isLoading:F,data:k,dataUpdatedAt:x.dataUpdatedAt,error:R,errorUpdatedAt:j,failureCount:x.fetchFailureCount,failureReason:x.fetchFailureReason,errorUpdateCount:x.errorUpdateCount,isFetched:x.dataUpdateCount>0||x.errorUpdateCount>0,isFetchedAfterMount:x.dataUpdateCount>g.dataUpdateCount||x.errorUpdateCount>g.errorUpdateCount,isFetching:I,isRefetching:I&&!M,isLoadingError:D&&!V,isPaused:x.fetchStatus==="paused",isPlaceholderData:S,isRefetchError:D&&V,isStale:Ka(n,o),refetch:this.refetch,promise:this.#l,isEnabled:St(o.enabled,n)!==!1};if(this.options.experimental_prefetchInRender){const te=B.data!==void 0,ce=B.status==="error"&&!te,le=ue=>{ce?ue.reject(B.error):te&&ue.resolve(B.data)},pe=()=>{const ue=this.#l=B.promise=Pa();le(ue)},J=this.#l;switch(J.status){case"pending":n.queryHash===s.queryHash&&le(J);break;case"fulfilled":(ce||B.data!==J.value)&&pe();break;case"rejected":(!ce||B.error!==J.reason)&&pe();break}}return B}updateResult(){const n=this.#o,o=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),Gs(o,n))return;this.#o=o;const s=()=>{if(!n)return!0;const{notifyOnChangeProps:a}=this.options,u=typeof a=="function"?a():a;if(u==="all"||!u&&!this.#h.size)return!0;const f=new Set(u??this.#h);return this.options.throwOnError&&f.add("error"),Object.keys(this.#o).some(p=>{const h=p;return this.#o[h]!==n[h]&&f.has(h)})};this.#C({listeners:s()})}#b(){const n=this.#e.getQueryCache().build(this.#e,this.options);if(n===this.#t)return;const o=this.#t;this.#t=n,this.#n=n.state,this.hasListeners()&&(o?.removeObserver(this),n.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#x()}#C(n){Fe.batch(()=>{n.listeners&&this.listeners.forEach(o=>{o(this.#o)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function Yv(n,o){return St(o.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&o.retryOnMount===!1)}function Of(n,o){return Yv(n,o)||n.state.data!==void 0&&Ra(n,o,o.refetchOnMount)}function Ra(n,o,s){if(St(o.enabled,n)!==!1&&Pn(o.staleTime,n)!=="static"){const a=typeof s=="function"?s(n):s;return a==="always"||a!==!1&&Ka(n,o)}return!1}function _f(n,o,s,a){return(n!==o||St(a.enabled,n)===!1)&&(!s.suspense||n.state.status!=="error")&&Ka(n,s)}function Ka(n,o){return St(o.enabled,n)!==!1&&n.isStaleByTime(Pn(o.staleTime,n))}function Xv(n,o){return!Gs(n.getCurrentResult(),o)}function Af(n){return{onFetch:(o,s)=>{const a=o.options,u=o.fetchOptions?.meta?.fetchMore?.direction,f=o.state.data?.pages||[],p=o.state.data?.pageParams||[];let h={pages:[],pageParams:[]},g=0;const v=async()=>{let x=!1;const S=j=>{Hv(j,()=>o.signal,()=>x=!0)},k=wp(o.options,o.fetchOptions),R=async(j,E,b)=>{if(x)return Promise.reject();if(E==null&&j.pages.length)return Promise.resolve(j);const M=(()=>{const A={client:o.client,queryKey:o.queryKey,pageParam:E,direction:b?"backward":"forward",meta:o.options.meta};return S(A),A})(),D=await k(M),{maxPages:F}=o.options,V=b?Uv:$v;return{pages:V(j.pages,D,F),pageParams:V(j.pageParams,E,F)}};if(u&&f.length){const j=u==="backward",E=j?Zv:If,b={pages:f,pageParams:p},I=E(a,b);h=await R(b,I,j)}else{const j=n??f.length;do{const E=g===0?p[0]??a.initialPageParam:If(a,h);if(g>0&&E==null)break;h=await R(h,E),g++}while(g<j)}return h};o.options.persister?o.fetchFn=()=>o.options.persister?.(v,{client:o.client,queryKey:o.queryKey,meta:o.options.meta,signal:o.signal},s):o.fetchFn=v}}}function If(n,{pages:o,pageParams:s}){const a=o.length-1;return o.length>0?n.getNextPageParam(o[a],o,s[a],s):void 0}function Zv(n,{pages:o,pageParams:s}){return o.length>0?n.getPreviousPageParam?.(o[0],o,s[0],s):void 0}var Jv=class extends Cp{#e;#t;#n;#o;constructor(n){super(),this.#e=n.client,this.mutationId=n.mutationId,this.#n=n.mutationCache,this.#t=[],this.state=n.state||Ep(),this.setOptions(n.options),this.scheduleGc()}setOptions(n){this.options=n,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(n){this.#t.includes(n)||(this.#t.push(n),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:n}))}removeObserver(n){this.#t=this.#t.filter(o=>o!==n),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:n})}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(n){const o=()=>{this.#r({type:"continue"})},s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#o=bp({fn:()=>this.options.mutationFn?this.options.mutationFn(n,s):Promise.reject(new Error("No mutationFn found")),onFail:(f,p)=>{this.#r({type:"failed",failureCount:f,error:p})},onPause:()=>{this.#r({type:"pause"})},onContinue:o,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const a=this.state.status==="pending",u=!this.#o.canStart();try{if(a)o();else{this.#r({type:"pending",variables:n,isPaused:u}),this.#n.config.onMutate&&await this.#n.config.onMutate(n,this,s);const p=await this.options.onMutate?.(n,s);p!==this.state.context&&this.#r({type:"pending",context:p,variables:n,isPaused:u})}const f=await this.#o.start();return await this.#n.config.onSuccess?.(f,n,this.state.context,this,s),await this.options.onSuccess?.(f,n,this.state.context,s),await this.#n.config.onSettled?.(f,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(f,null,n,this.state.context,s),this.#r({type:"success",data:f}),f}catch(f){try{await this.#n.config.onError?.(f,n,this.state.context,this,s)}catch(p){Promise.reject(p)}try{await this.options.onError?.(f,n,this.state.context,s)}catch(p){Promise.reject(p)}try{await this.#n.config.onSettled?.(void 0,f,this.state.variables,this.state.context,this,s)}catch(p){Promise.reject(p)}try{await this.options.onSettled?.(void 0,f,n,this.state.context,s)}catch(p){Promise.reject(p)}throw this.#r({type:"error",error:f}),f}finally{this.#n.runNext(this)}}#r(n){const o=s=>{switch(n.type){case"failed":return{...s,failureCount:n.failureCount,failureReason:n.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:n.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:n.isPaused,status:"pending",variables:n.variables,submittedAt:Date.now()};case"success":return{...s,data:n.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:n.error,failureCount:s.failureCount+1,failureReason:n.error,isPaused:!1,status:"error"}}};this.state=o(this.state),Fe.batch(()=>{this.#t.forEach(s=>{s.onMutationUpdate(n)}),this.#n.notify({mutation:this,type:"updated",action:n})})}};function Ep(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ey=class extends Pr{constructor(n={}){super(),this.config=n,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(n,o,s){const a=new Jv({client:n,mutationCache:this,mutationId:++this.#n,options:n.defaultMutationOptions(o),state:s});return this.add(a),a}add(n){this.#e.add(n);const o=zs(n);if(typeof o=="string"){const s=this.#t.get(o);s?s.push(n):this.#t.set(o,[n])}this.notify({type:"added",mutation:n})}remove(n){if(this.#e.delete(n)){const o=zs(n);if(typeof o=="string"){const s=this.#t.get(o);if(s)if(s.length>1){const a=s.indexOf(n);a!==-1&&s.splice(a,1)}else s[0]===n&&this.#t.delete(o)}}this.notify({type:"removed",mutation:n})}canRun(n){const o=zs(n);if(typeof o=="string"){const a=this.#t.get(o)?.find(u=>u.state.status==="pending");return!a||a===n}else return!0}runNext(n){const o=zs(n);return typeof o=="string"?this.#t.get(o)?.find(a=>a!==n&&a.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Fe.batch(()=>{this.#e.forEach(n=>{this.notify({type:"removed",mutation:n})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(n){const o={exact:!0,...n};return this.getAll().find(s=>Pf(o,s))}findAll(n={}){return this.getAll().filter(o=>Pf(n,o))}notify(n){Fe.batch(()=>{this.listeners.forEach(o=>{o(n)})})}resumePausedMutations(){const n=this.getAll().filter(o=>o.state.isPaused);return Fe.batch(()=>Promise.all(n.map(o=>o.continue().catch(tt))))}};function zs(n){return n.options.scope?.id}var ty=class extends Pr{#e;#t=void 0;#n;#o;constructor(o,s){super(),this.#e=o,this.setOptions(s),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(o){const s=this.options;this.options=this.#e.defaultMutationOptions(o),Gs(this.options,s)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),s?.mutationKey&&this.options.mutationKey&&Qn(s.mutationKey)!==Qn(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(o){this.#r(),this.#i(o)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#i()}mutate(o,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(o)}#r(){const o=this.#n?.state??Ep();this.#t={...o,isPending:o.status==="pending",isSuccess:o.status==="success",isError:o.status==="error",isIdle:o.status==="idle",mutate:this.mutate,reset:this.reset}}#i(o){Fe.batch(()=>{if(this.#o&&this.hasListeners()){const s=this.#t.variables,a=this.#t.context,u={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(o?.type==="success"){try{this.#o.onSuccess?.(o.data,s,a,u)}catch(f){Promise.reject(f)}try{this.#o.onSettled?.(o.data,null,s,a,u)}catch(f){Promise.reject(f)}}else if(o?.type==="error"){try{this.#o.onError?.(o.error,s,a,u)}catch(f){Promise.reject(f)}try{this.#o.onSettled?.(void 0,o.error,s,a,u)}catch(f){Promise.reject(f)}}}this.listeners.forEach(s=>{s(this.#t)})})}},ny=class extends Pr{constructor(n={}){super(),this.config=n,this.#e=new Map}#e;build(n,o,s){const a=o.queryKey,u=o.queryHash??Wa(a,o);let f=this.get(u);return f||(f=new Gv({client:n,queryKey:a,queryHash:u,options:n.defaultQueryOptions(o),state:s,defaultOptions:n.getQueryDefaults(a)}),this.add(f)),f}add(n){this.#e.has(n.queryHash)||(this.#e.set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){const o=this.#e.get(n.queryHash);o&&(n.destroy(),o===n&&this.#e.delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){Fe.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return this.#e.get(n)}getAll(){return[...this.#e.values()]}find(n){const o={exact:!0,...n};return this.getAll().find(s=>Ef(o,s))}findAll(n={}){const o=this.getAll();return Object.keys(n).length>0?o.filter(s=>Ef(n,s)):o}notify(n){Fe.batch(()=>{this.listeners.forEach(o=>{o(n)})})}onFocus(){Fe.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){Fe.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},ry=class{#e;#t;#n;#o;#r;#i;#l;#s;constructor(n={}){this.#e=n.queryCache||new ny,this.#t=n.mutationCache||new ey,this.#n=n.defaultOptions||{},this.#o=new Map,this.#r=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#l=Qa.subscribe(async n=>{n&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=qs.subscribe(async n=>{n&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#l?.(),this.#l=void 0,this.#s?.(),this.#s=void 0)}isFetching(n){return this.#e.findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return this.#t.findAll({...n,status:"pending"}).length}getQueryData(n){const o=this.defaultQueryOptions({queryKey:n});return this.#e.get(o.queryHash)?.state.data}ensureQueryData(n){const o=this.defaultQueryOptions(n),s=this.#e.build(this,o),a=s.state.data;return a===void 0?this.fetchQuery(n):(n.revalidateIfStale&&s.isStaleByTime(Pn(o.staleTime,s))&&this.prefetchQuery(o),Promise.resolve(a))}getQueriesData(n){return this.#e.findAll(n).map(({queryKey:o,state:s})=>{const a=s.data;return[o,a]})}setQueryData(n,o,s){const a=this.defaultQueryOptions({queryKey:n}),f=this.#e.get(a.queryHash)?.state.data,p=Dv(o,f);if(p!==void 0)return this.#e.build(this,a).setData(p,{...s,manual:!0})}setQueriesData(n,o,s){return Fe.batch(()=>this.#e.findAll(n).map(({queryKey:a})=>[a,this.setQueryData(a,o,s)]))}getQueryState(n){const o=this.defaultQueryOptions({queryKey:n});return this.#e.get(o.queryHash)?.state}removeQueries(n){const o=this.#e;Fe.batch(()=>{o.findAll(n).forEach(s=>{o.remove(s)})})}resetQueries(n,o){const s=this.#e;return Fe.batch(()=>(s.findAll(n).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...n},o)))}cancelQueries(n,o={}){const s={revert:!0,...o},a=Fe.batch(()=>this.#e.findAll(n).map(u=>u.cancel(s)));return Promise.all(a).then(tt).catch(tt)}invalidateQueries(n,o={}){return Fe.batch(()=>(this.#e.findAll(n).forEach(s=>{s.invalidate()}),n?.refetchType==="none"?Promise.resolve():this.refetchQueries({...n,type:n?.refetchType??n?.type??"active"},o)))}refetchQueries(n,o={}){const s={...o,cancelRefetch:o.cancelRefetch??!0},a=Fe.batch(()=>this.#e.findAll(n).filter(u=>!u.isDisabled()&&!u.isStatic()).map(u=>{let f=u.fetch(void 0,s);return s.throwOnError||(f=f.catch(tt)),u.state.fetchStatus==="paused"?Promise.resolve():f}));return Promise.all(a).then(tt)}fetchQuery(n){const o=this.defaultQueryOptions(n);o.retry===void 0&&(o.retry=!1);const s=this.#e.build(this,o);return s.isStaleByTime(Pn(o.staleTime,s))?s.fetch(o):Promise.resolve(s.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(tt).catch(tt)}fetchInfiniteQuery(n){return n.behavior=Af(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(tt).catch(tt)}ensureInfiniteQueryData(n){return n.behavior=Af(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return qs.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(n){this.#n=n}setQueryDefaults(n,o){this.#o.set(Qn(n),{queryKey:n,defaultOptions:o})}getQueryDefaults(n){const o=[...this.#o.values()],s={};return o.forEach(a=>{So(n,a.queryKey)&&Object.assign(s,a.defaultOptions)}),s}setMutationDefaults(n,o){this.#r.set(Qn(n),{mutationKey:n,defaultOptions:o})}getMutationDefaults(n){const o=[...this.#r.values()],s={};return o.forEach(a=>{So(n,a.mutationKey)&&Object.assign(s,a.defaultOptions)}),s}defaultQueryOptions(n){if(n._defaulted)return n;const o={...this.#n.queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return o.queryHash||(o.queryHash=Wa(o.queryKey,o)),o.refetchOnReconnect===void 0&&(o.refetchOnReconnect=o.networkMode!=="always"),o.throwOnError===void 0&&(o.throwOnError=!!o.suspense),!o.networkMode&&o.persister&&(o.networkMode="offlineFirst"),o.queryFn===Ba&&(o.enabled=!1),o}defaultMutationOptions(n){return n?._defaulted?n:{...this.#n.mutations,...n?.mutationKey&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Pp=y.createContext(void 0),Np=n=>{const o=y.useContext(Pp);if(!o)throw new Error("No QueryClient set, use QueryClientProvider to set one");return o},oy=({client:n,children:o})=>(y.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),d.jsx(Pp.Provider,{value:n,children:o})),Rp=y.createContext(!1),sy=()=>y.useContext(Rp);Rp.Provider;function iy(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var ly=y.createContext(iy()),ay=()=>y.useContext(ly),uy=(n,o,s)=>{const a=s?.state.error&&typeof n.throwOnError=="function"?Va(n.throwOnError,[s.state.error,s]):n.throwOnError;(n.suspense||n.experimental_prefetchInRender||a)&&(o.isReset()||(n.retryOnMount=!1))},cy=n=>{y.useEffect(()=>{n.clearReset()},[n])},dy=({result:n,errorResetBoundary:o,throwOnError:s,query:a,suspense:u})=>n.isError&&!o.isReset()&&!n.isFetching&&a&&(u&&n.data===void 0||Va(s,[n.error,a])),fy=n=>{if(n.suspense){const s=u=>u==="static"?u:Math.max(u??1e3,1e3),a=n.staleTime;n.staleTime=typeof a=="function"?(...u)=>s(a(...u)):s(a),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},py=(n,o)=>n.isLoading&&n.isFetching&&!o,hy=(n,o)=>n?.suspense&&o.isPending,Mf=(n,o,s)=>o.fetchOptimistic(n).catch(()=>{s.clearReset()});function my(n,o,s){const a=sy(),u=ay(),f=Np(),p=f.defaultQueryOptions(n);f.getDefaultOptions().queries?._experimental_beforeQuery?.(p);const h=f.getQueryCache().get(p.queryHash);p._optimisticResults=a?"isRestoring":"optimistic",fy(p),uy(p,u,h),cy(u);const g=!f.getQueryCache().get(p.queryHash),[v]=y.useState(()=>new o(f,p)),x=v.getOptimisticResult(p),S=!a&&n.subscribed!==!1;if(y.useSyncExternalStore(y.useCallback(k=>{const R=S?v.subscribe(Fe.batchCalls(k)):tt;return v.updateResult(),R},[v,S]),()=>v.getCurrentResult(),()=>v.getCurrentResult()),y.useEffect(()=>{v.setOptions(p)},[p,v]),hy(p,x))throw Mf(p,v,u);if(dy({result:x,errorResetBoundary:u,throwOnError:p.throwOnError,query:h,suspense:p.suspense}))throw x.error;return f.getDefaultOptions().queries?._experimental_afterQuery?.(p,x),p.experimental_prefetchInRender&&!Vn&&py(x,a)&&(g?Mf(p,v,u):h?.promise)?.catch(tt).finally(()=>{v.updateResult()}),p.notifyOnChangeProps?x:v.trackResult(x)}function Jt(n,o){return my(n,qv)}function Ft(n,o){const s=Np(),[a]=y.useState(()=>new ty(s,n));y.useEffect(()=>{a.setOptions(n)},[a,n]);const u=y.useSyncExternalStore(y.useCallback(p=>a.subscribe(Fe.batchCalls(p)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),f=y.useCallback((p,h)=>{a.mutate(p,h).catch(tt)},[a]);if(u.error&&Va(a.options.throwOnError,[u.error]))throw u.error;return{...u,mutate:f,mutateAsync:u.mutate}}const jp="__PORT_5000__".startsWith("__")?"":"__PORT_5000__";async function Tp(n){if(!n.ok){const o=await n.text()||n.statusText;throw new Error(`${n.status}: ${o}`)}}async function Tt(n,o,s){const a=await fetch(`${jp}${o}`,{method:n,headers:s?{"Content-Type":"application/json"}:{},body:s?JSON.stringify(s):void 0});return await Tp(a),a}const gy=({on401:n})=>async({queryKey:o})=>{const s=await fetch(`${jp}${o.join("/")}`);return await Tp(s),await s.json()},Ve=new ry({defaultOptions:{queries:{queryFn:gy({on401:"throw"}),refetchInterval:!1,refetchOnWindowFocus:!1,staleTime:1/0,retry:!1},mutations:{retry:!1}}}),vy=1,yy=1e6;let ma=0;function xy(){return ma=(ma+1)%Number.MAX_SAFE_INTEGER,ma.toString()}const ga=new Map,Lf=n=>{if(ga.has(n))return;const o=setTimeout(()=>{ga.delete(n),wo({type:"REMOVE_TOAST",toastId:n})},yy);ga.set(n,o)},wy=(n,o)=>{switch(o.type){case"ADD_TOAST":return{...n,toasts:[o.toast,...n.toasts].slice(0,vy)};case"UPDATE_TOAST":return{...n,toasts:n.toasts.map(s=>s.id===o.toast.id?{...s,...o.toast}:s)};case"DISMISS_TOAST":{const{toastId:s}=o;return s?Lf(s):n.toasts.forEach(a=>{Lf(a.id)}),{...n,toasts:n.toasts.map(a=>a.id===s||s===void 0?{...a,open:!1}:a)}}case"REMOVE_TOAST":return o.toastId===void 0?{...n,toasts:[]}:{...n,toasts:n.toasts.filter(s=>s.id!==o.toastId)}}},Bs=[];let Vs={toasts:[]};function wo(n){Vs=wy(Vs,n),Bs.forEach(o=>{o(Vs)})}function Ys({...n}){const o=xy(),s=u=>wo({type:"UPDATE_TOAST",toast:{...u,id:o}}),a=()=>wo({type:"DISMISS_TOAST",toastId:o});return wo({type:"ADD_TOAST",toast:{...n,id:o,open:!0,onOpenChange:u=>{u||a()}}}),{id:o,dismiss:a,update:s}}function Sy(){const[n,o]=y.useState(Vs);return y.useEffect(()=>(Bs.push(o),()=>{const s=Bs.indexOf(o);s>-1&&Bs.splice(s,1)}),[n]),{...n,toast:Ys,dismiss:s=>wo({type:"DISMISS_TOAST",toastId:s})}}var ri=sp();const by=op(ri);function Me(n,o,{checkForDefaultPrevented:s=!0}={}){return function(u){if(n?.(u),s===!1||!u.defaultPrevented)return o?.(u)}}function Df(n,o){if(typeof n=="function")return n(o);n!=null&&(n.current=o)}function Ga(...n){return o=>{let s=!1;const a=n.map(u=>{const f=Df(u,o);return!s&&typeof f=="function"&&(s=!0),f});if(s)return()=>{for(let u=0;u<a.length;u++){const f=a[u];typeof f=="function"?f():Df(n[u],null)}}}}function bt(...n){return y.useCallback(Ga(...n),n)}function Eo(n,o=[]){let s=[];function a(f,p){const h=y.createContext(p),g=s.length;s=[...s,p];const v=S=>{const{scope:k,children:R,...j}=S,E=k?.[n]?.[g]||h,b=y.useMemo(()=>j,Object.values(j));return d.jsx(E.Provider,{value:b,children:R})};v.displayName=f+"Provider";function x(S,k){const R=k?.[n]?.[g]||h,j=y.useContext(R);if(j)return j;if(p!==void 0)return p;throw new Error(`\`${S}\` must be used within \`${f}\``)}return[v,x]}const u=()=>{const f=s.map(p=>y.createContext(p));return function(h){const g=h?.[n]||f;return y.useMemo(()=>({[`__scope${n}`]:{...h,[n]:g}}),[h,g])}};return u.scopeName=n,[a,Cy(u,...o)]}function Cy(...n){const o=n[0];if(n.length===1)return o;const s=()=>{const a=n.map(u=>({useScope:u(),scopeName:u.scopeName}));return function(f){const p=a.reduce((h,{useScope:g,scopeName:v})=>{const S=g(f)[`__scope${v}`];return{...h,...S}},{});return y.useMemo(()=>({[`__scope${o.scopeName}`]:p}),[p])}};return s.scopeName=o.scopeName,s}function Ff(n){const o=ky(n),s=y.forwardRef((a,u)=>{const{children:f,...p}=a,h=y.Children.toArray(f),g=h.find(Py);if(g){const v=g.props.children,x=h.map(S=>S===g?y.Children.count(v)>1?y.Children.only(null):y.isValidElement(v)?v.props.children:null:S);return d.jsx(o,{...p,ref:u,children:y.isValidElement(v)?y.cloneElement(v,void 0,x):null})}return d.jsx(o,{...p,ref:u,children:f})});return s.displayName=`${n}.Slot`,s}function ky(n){const o=y.forwardRef((s,a)=>{const{children:u,...f}=s;if(y.isValidElement(u)){const p=Ry(u),h=Ny(f,u.props);return u.type!==y.Fragment&&(h.ref=a?Ga(a,p):p),y.cloneElement(u,h)}return y.Children.count(u)>1?y.Children.only(null):null});return o.displayName=`${n}.SlotClone`,o}var Ey=Symbol("radix.slottable");function Py(n){return y.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===Ey}function Ny(n,o){const s={...o};for(const a in o){const u=n[a],f=o[a];/^on[A-Z]/.test(a)?u&&f?s[a]=(...h)=>{const g=f(...h);return u(...h),g}:u&&(s[a]=u):a==="style"?s[a]={...u,...f}:a==="className"&&(s[a]=[u,f].filter(Boolean).join(" "))}return{...n,...s}}function Ry(n){let o=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,s=o&&"isReactWarning"in o&&o.isReactWarning;return s?n.ref:(o=Object.getOwnPropertyDescriptor(n,"ref")?.get,s=o&&"isReactWarning"in o&&o.isReactWarning,s?n.props.ref:n.props.ref||n.ref)}function jy(n){const o=n+"CollectionProvider",[s,a]=Eo(o),[u,f]=s(o,{collectionRef:{current:null},itemMap:new Map}),p=E=>{const{scope:b,children:I}=E,M=En.useRef(null),D=En.useRef(new Map).current;return d.jsx(u,{scope:b,itemMap:D,collectionRef:M,children:I})};p.displayName=o;const h=n+"CollectionSlot",g=Ff(h),v=En.forwardRef((E,b)=>{const{scope:I,children:M}=E,D=f(h,I),F=bt(b,D.collectionRef);return d.jsx(g,{ref:F,children:M})});v.displayName=h;const x=n+"CollectionItemSlot",S="data-radix-collection-item",k=Ff(x),R=En.forwardRef((E,b)=>{const{scope:I,children:M,...D}=E,F=En.useRef(null),V=bt(b,F),A=f(x,I);return En.useEffect(()=>(A.itemMap.set(F,{ref:F,...D}),()=>{A.itemMap.delete(F)})),d.jsx(k,{[S]:"",ref:V,children:M})});R.displayName=x;function j(E){const b=f(n+"CollectionConsumer",E);return En.useCallback(()=>{const M=b.collectionRef.current;if(!M)return[];const D=Array.from(M.querySelectorAll(`[${S}]`));return Array.from(b.itemMap.values()).sort((A,B)=>D.indexOf(A.ref.current)-D.indexOf(B.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:p,Slot:v,ItemSlot:R},j,a]}function Ty(n){const o=Oy(n),s=y.forwardRef((a,u)=>{const{children:f,...p}=a,h=y.Children.toArray(f),g=h.find(Ay);if(g){const v=g.props.children,x=h.map(S=>S===g?y.Children.count(v)>1?y.Children.only(null):y.isValidElement(v)?v.props.children:null:S);return d.jsx(o,{...p,ref:u,children:y.isValidElement(v)?y.cloneElement(v,void 0,x):null})}return d.jsx(o,{...p,ref:u,children:f})});return s.displayName=`${n}.Slot`,s}function Oy(n){const o=y.forwardRef((s,a)=>{const{children:u,...f}=s;if(y.isValidElement(u)){const p=My(u),h=Iy(f,u.props);return u.type!==y.Fragment&&(h.ref=a?Ga(a,p):p),y.cloneElement(u,h)}return y.Children.count(u)>1?y.Children.only(null):null});return o.displayName=`${n}.SlotClone`,o}var _y=Symbol("radix.slottable");function Ay(n){return y.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===_y}function Iy(n,o){const s={...o};for(const a in o){const u=n[a],f=o[a];/^on[A-Z]/.test(a)?u&&f?s[a]=(...h)=>{const g=f(...h);return u(...h),g}:u&&(s[a]=u):a==="style"?s[a]={...u,...f}:a==="className"&&(s[a]=[u,f].filter(Boolean).join(" "))}return{...n,...s}}function My(n){let o=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,s=o&&"isReactWarning"in o&&o.isReactWarning;return s?n.ref:(o=Object.getOwnPropertyDescriptor(n,"ref")?.get,s=o&&"isReactWarning"in o&&o.isReactWarning,s?n.props.ref:n.props.ref||n.ref)}var Ly=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Qe=Ly.reduce((n,o)=>{const s=Ty(`Primitive.${o}`),a=y.forwardRef((u,f)=>{const{asChild:p,...h}=u,g=p?s:o;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(g,{...h,ref:f})});return a.displayName=`Primitive.${o}`,{...n,[o]:a}},{});function Op(n,o){n&&ri.flushSync(()=>n.dispatchEvent(o))}function Nn(n){const o=y.useRef(n);return y.useEffect(()=>{o.current=n}),y.useMemo(()=>(...s)=>o.current?.(...s),[])}function Dy(n,o=globalThis?.document){const s=Nn(n);y.useEffect(()=>{const a=u=>{u.key==="Escape"&&s(u)};return o.addEventListener("keydown",a,{capture:!0}),()=>o.removeEventListener("keydown",a,{capture:!0})},[s,o])}var Fy="DismissableLayer",ja="dismissableLayer.update",zy="dismissableLayer.pointerDownOutside",$y="dismissableLayer.focusOutside",zf,_p=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),qa=y.forwardRef((n,o)=>{const{disableOutsidePointerEvents:s=!1,onEscapeKeyDown:a,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:p,onDismiss:h,...g}=n,v=y.useContext(_p),[x,S]=y.useState(null),k=x?.ownerDocument??globalThis?.document,[,R]=y.useState({}),j=bt(o,B=>S(B)),E=Array.from(v.layers),[b]=[...v.layersWithOutsidePointerEventsDisabled].slice(-1),I=E.indexOf(b),M=x?E.indexOf(x):-1,D=v.layersWithOutsidePointerEventsDisabled.size>0,F=M>=I,V=Hy(B=>{const te=B.target,ce=[...v.branches].some(le=>le.contains(te));!F||ce||(u?.(B),p?.(B),B.defaultPrevented||h?.())},k),A=Wy(B=>{const te=B.target;[...v.branches].some(le=>le.contains(te))||(f?.(B),p?.(B),B.defaultPrevented||h?.())},k);return Dy(B=>{M===v.layers.size-1&&(a?.(B),!B.defaultPrevented&&h&&(B.preventDefault(),h()))},k),y.useEffect(()=>{if(x)return s&&(v.layersWithOutsidePointerEventsDisabled.size===0&&(zf=k.body.style.pointerEvents,k.body.style.pointerEvents="none"),v.layersWithOutsidePointerEventsDisabled.add(x)),v.layers.add(x),$f(),()=>{s&&v.layersWithOutsidePointerEventsDisabled.size===1&&(k.body.style.pointerEvents=zf)}},[x,k,s,v]),y.useEffect(()=>()=>{x&&(v.layers.delete(x),v.layersWithOutsidePointerEventsDisabled.delete(x),$f())},[x,v]),y.useEffect(()=>{const B=()=>R({});return document.addEventListener(ja,B),()=>document.removeEventListener(ja,B)},[]),d.jsx(Qe.div,{...g,ref:j,style:{pointerEvents:D?F?"auto":"none":void 0,...n.style},onFocusCapture:Me(n.onFocusCapture,A.onFocusCapture),onBlurCapture:Me(n.onBlurCapture,A.onBlurCapture),onPointerDownCapture:Me(n.onPointerDownCapture,V.onPointerDownCapture)})});qa.displayName=Fy;var Uy="DismissableLayerBranch",Ap=y.forwardRef((n,o)=>{const s=y.useContext(_p),a=y.useRef(null),u=bt(o,a);return y.useEffect(()=>{const f=a.current;if(f)return s.branches.add(f),()=>{s.branches.delete(f)}},[s.branches]),d.jsx(Qe.div,{...n,ref:u})});Ap.displayName=Uy;function Hy(n,o=globalThis?.document){const s=Nn(n),a=y.useRef(!1),u=y.useRef(()=>{});return y.useEffect(()=>{const f=h=>{if(h.target&&!a.current){let g=function(){Ip(zy,s,v,{discrete:!0})};const v={originalEvent:h};h.pointerType==="touch"?(o.removeEventListener("click",u.current),u.current=g,o.addEventListener("click",u.current,{once:!0})):g()}else o.removeEventListener("click",u.current);a.current=!1},p=window.setTimeout(()=>{o.addEventListener("pointerdown",f)},0);return()=>{window.clearTimeout(p),o.removeEventListener("pointerdown",f),o.removeEventListener("click",u.current)}},[o,s]),{onPointerDownCapture:()=>a.current=!0}}function Wy(n,o=globalThis?.document){const s=Nn(n),a=y.useRef(!1);return y.useEffect(()=>{const u=f=>{f.target&&!a.current&&Ip($y,s,{originalEvent:f},{discrete:!1})};return o.addEventListener("focusin",u),()=>o.removeEventListener("focusin",u)},[o,s]),{onFocusCapture:()=>a.current=!0,onBlurCapture:()=>a.current=!1}}function $f(){const n=new CustomEvent(ja);document.dispatchEvent(n)}function Ip(n,o,s,{discrete:a}){const u=s.originalEvent.target,f=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:s});o&&u.addEventListener(n,o,{once:!0}),a?Op(u,f):u.dispatchEvent(f)}var By=qa,Vy=Ap,Ut=globalThis?.document?y.useLayoutEffect:()=>{},Qy="Portal",Mp=y.forwardRef((n,o)=>{const{container:s,...a}=n,[u,f]=y.useState(!1);Ut(()=>f(!0),[]);const p=s||u&&globalThis?.document?.body;return p?by.createPortal(d.jsx(Qe.div,{...a,ref:o}),p):null});Mp.displayName=Qy;function Ky(n,o){return y.useReducer((s,a)=>o[s][a]??s,n)}var oi=n=>{const{present:o,children:s}=n,a=Gy(o),u=typeof s=="function"?s({present:a.isPresent}):y.Children.only(s),f=bt(a.ref,qy(u));return typeof s=="function"||a.isPresent?y.cloneElement(u,{ref:f}):null};oi.displayName="Presence";function Gy(n){const[o,s]=y.useState(),a=y.useRef(null),u=y.useRef(n),f=y.useRef("none"),p=n?"mounted":"unmounted",[h,g]=Ky(p,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const v=$s(a.current);f.current=h==="mounted"?v:"none"},[h]),Ut(()=>{const v=a.current,x=u.current;if(x!==n){const k=f.current,R=$s(v);n?g("MOUNT"):R==="none"||v?.display==="none"?g("UNMOUNT"):g(x&&k!==R?"ANIMATION_OUT":"UNMOUNT"),u.current=n}},[n,g]),Ut(()=>{if(o){let v;const x=o.ownerDocument.defaultView??window,S=R=>{const E=$s(a.current).includes(CSS.escape(R.animationName));if(R.target===o&&E&&(g("ANIMATION_END"),!u.current)){const b=o.style.animationFillMode;o.style.animationFillMode="forwards",v=x.setTimeout(()=>{o.style.animationFillMode==="forwards"&&(o.style.animationFillMode=b)})}},k=R=>{R.target===o&&(f.current=$s(a.current))};return o.addEventListener("animationstart",k),o.addEventListener("animationcancel",S),o.addEventListener("animationend",S),()=>{x.clearTimeout(v),o.removeEventListener("animationstart",k),o.removeEventListener("animationcancel",S),o.removeEventListener("animationend",S)}}else g("ANIMATION_END")},[o,g]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:y.useCallback(v=>{a.current=v?getComputedStyle(v):null,s(v)},[])}}function $s(n){return n?.animationName||"none"}function qy(n){let o=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,s=o&&"isReactWarning"in o&&o.isReactWarning;return s?n.ref:(o=Object.getOwnPropertyDescriptor(n,"ref")?.get,s=o&&"isReactWarning"in o&&o.isReactWarning,s?n.props.ref:n.props.ref||n.ref)}var Yy=za[" useInsertionEffect ".trim().toString()]||Ut;function Ya({prop:n,defaultProp:o,onChange:s=()=>{},caller:a}){const[u,f,p]=Xy({defaultProp:o,onChange:s}),h=n!==void 0,g=h?n:u;{const x=y.useRef(n!==void 0);y.useEffect(()=>{const S=x.current;S!==h&&console.warn(`${a} is changing from ${S?"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.`),x.current=h},[h,a])}const v=y.useCallback(x=>{if(h){const S=Zy(x)?x(n):x;S!==n&&p.current?.(S)}else f(x)},[h,n,f,p]);return[g,v]}function Xy({defaultProp:n,onChange:o}){const[s,a]=y.useState(n),u=y.useRef(s),f=y.useRef(o);return Yy(()=>{f.current=o},[o]),y.useEffect(()=>{u.current!==s&&(f.current?.(s),u.current=s)},[s,u]),[s,a,f]}function Zy(n){return typeof n=="function"}var Jy=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"}),ex="VisuallyHidden",si=y.forwardRef((n,o)=>d.jsx(Qe.span,{...n,ref:o,style:{...Jy,...n.style}}));si.displayName=ex;var tx=si,Xa="ToastProvider",[Za,nx,rx]=jy("Toast"),[Lp]=Eo("Toast",[rx]),[ox,ii]=Lp(Xa),Dp=n=>{const{__scopeToast:o,label:s="Notification",duration:a=5e3,swipeDirection:u="right",swipeThreshold:f=50,children:p}=n,[h,g]=y.useState(null),[v,x]=y.useState(0),S=y.useRef(!1),k=y.useRef(!1);return s.trim()||console.error(`Invalid prop \`label\` supplied to \`${Xa}\`. Expected non-empty \`string\`.`),d.jsx(Za.Provider,{scope:o,children:d.jsx(ox,{scope:o,label:s,duration:a,swipeDirection:u,swipeThreshold:f,toastCount:v,viewport:h,onViewportChange:g,onToastAdd:y.useCallback(()=>x(R=>R+1),[]),onToastRemove:y.useCallback(()=>x(R=>R-1),[]),isFocusedToastEscapeKeyDownRef:S,isClosePausedRef:k,children:p})})};Dp.displayName=Xa;var Fp="ToastViewport",sx=["F8"],Ta="toast.viewportPause",Oa="toast.viewportResume",zp=y.forwardRef((n,o)=>{const{__scopeToast:s,hotkey:a=sx,label:u="Notifications ({hotkey})",...f}=n,p=ii(Fp,s),h=nx(s),g=y.useRef(null),v=y.useRef(null),x=y.useRef(null),S=y.useRef(null),k=bt(o,S,p.onViewportChange),R=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),j=p.toastCount>0;y.useEffect(()=>{const b=I=>{a.length!==0&&a.every(D=>I[D]||I.code===D)&&S.current?.focus()};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[a]),y.useEffect(()=>{const b=g.current,I=S.current;if(j&&b&&I){const M=()=>{if(!p.isClosePausedRef.current){const A=new CustomEvent(Ta);I.dispatchEvent(A),p.isClosePausedRef.current=!0}},D=()=>{if(p.isClosePausedRef.current){const A=new CustomEvent(Oa);I.dispatchEvent(A),p.isClosePausedRef.current=!1}},F=A=>{!b.contains(A.relatedTarget)&&D()},V=()=>{b.contains(document.activeElement)||D()};return b.addEventListener("focusin",M),b.addEventListener("focusout",F),b.addEventListener("pointermove",M),b.addEventListener("pointerleave",V),window.addEventListener("blur",M),window.addEventListener("focus",D),()=>{b.removeEventListener("focusin",M),b.removeEventListener("focusout",F),b.removeEventListener("pointermove",M),b.removeEventListener("pointerleave",V),window.removeEventListener("blur",M),window.removeEventListener("focus",D)}}},[j,p.isClosePausedRef]);const E=y.useCallback(({tabbingDirection:b})=>{const M=h().map(D=>{const F=D.ref.current,V=[F,...yx(F)];return b==="forwards"?V:V.reverse()});return(b==="forwards"?M.reverse():M).flat()},[h]);return y.useEffect(()=>{const b=S.current;if(b){const I=M=>{const D=M.altKey||M.ctrlKey||M.metaKey;if(M.key==="Tab"&&!D){const V=document.activeElement,A=M.shiftKey;if(M.target===b&&A){v.current?.focus();return}const ce=E({tabbingDirection:A?"backwards":"forwards"}),le=ce.findIndex(pe=>pe===V);va(ce.slice(le+1))?M.preventDefault():A?v.current?.focus():x.current?.focus()}};return b.addEventListener("keydown",I),()=>b.removeEventListener("keydown",I)}},[h,E]),d.jsxs(Vy,{ref:g,role:"region","aria-label":u.replace("{hotkey}",R),tabIndex:-1,style:{pointerEvents:j?void 0:"none"},children:[j&&d.jsx(_a,{ref:v,onFocusFromOutsideViewport:()=>{const b=E({tabbingDirection:"forwards"});va(b)}}),d.jsx(Za.Slot,{scope:s,children:d.jsx(Qe.ol,{tabIndex:-1,...f,ref:k})}),j&&d.jsx(_a,{ref:x,onFocusFromOutsideViewport:()=>{const b=E({tabbingDirection:"backwards"});va(b)}})]})});zp.displayName=Fp;var $p="ToastFocusProxy",_a=y.forwardRef((n,o)=>{const{__scopeToast:s,onFocusFromOutsideViewport:a,...u}=n,f=ii($p,s);return d.jsx(si,{tabIndex:0,...u,ref:o,style:{position:"fixed"},onFocus:p=>{const h=p.relatedTarget;!f.viewport?.contains(h)&&a()}})});_a.displayName=$p;var Po="Toast",ix="toast.swipeStart",lx="toast.swipeMove",ax="toast.swipeCancel",ux="toast.swipeEnd",Up=y.forwardRef((n,o)=>{const{forceMount:s,open:a,defaultOpen:u,onOpenChange:f,...p}=n,[h,g]=Ya({prop:a,defaultProp:u??!0,onChange:f,caller:Po});return d.jsx(oi,{present:s||h,children:d.jsx(fx,{open:h,...p,ref:o,onClose:()=>g(!1),onPause:Nn(n.onPause),onResume:Nn(n.onResume),onSwipeStart:Me(n.onSwipeStart,v=>{v.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Me(n.onSwipeMove,v=>{const{x,y:S}=v.detail.delta;v.currentTarget.setAttribute("data-swipe","move"),v.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${x}px`),v.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${S}px`)}),onSwipeCancel:Me(n.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:Me(n.onSwipeEnd,v=>{const{x,y:S}=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",`${x}px`),v.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${S}px`),g(!1)})})})});Up.displayName=Po;var[cx,dx]=Lp(Po,{onClose(){}}),fx=y.forwardRef((n,o)=>{const{__scopeToast:s,type:a="foreground",duration:u,open:f,onClose:p,onEscapeKeyDown:h,onPause:g,onResume:v,onSwipeStart:x,onSwipeMove:S,onSwipeCancel:k,onSwipeEnd:R,...j}=n,E=ii(Po,s),[b,I]=y.useState(null),M=bt(o,G=>I(G)),D=y.useRef(null),F=y.useRef(null),V=u||E.duration,A=y.useRef(0),B=y.useRef(V),te=y.useRef(0),{onToastAdd:ce,onToastRemove:le}=E,pe=Nn(()=>{b?.contains(document.activeElement)&&E.viewport?.focus(),p()}),J=y.useCallback(G=>{!G||G===1/0||(window.clearTimeout(te.current),A.current=new Date().getTime(),te.current=window.setTimeout(pe,G))},[pe]);y.useEffect(()=>{const G=E.viewport;if(G){const me=()=>{J(B.current),v?.()},se=()=>{const oe=new Date().getTime()-A.current;B.current=B.current-oe,window.clearTimeout(te.current),g?.()};return G.addEventListener(Ta,se),G.addEventListener(Oa,me),()=>{G.removeEventListener(Ta,se),G.removeEventListener(Oa,me)}}},[E.viewport,V,g,v,J]),y.useEffect(()=>{f&&!E.isClosePausedRef.current&&J(V)},[f,V,E.isClosePausedRef,J]),y.useEffect(()=>(ce(),()=>le()),[ce,le]);const ue=y.useMemo(()=>b?Gp(b):null,[b]);return E.viewport?d.jsxs(d.Fragment,{children:[ue&&d.jsx(px,{__scopeToast:s,role:"status","aria-live":a==="foreground"?"assertive":"polite",children:ue}),d.jsx(cx,{scope:s,onClose:pe,children:ri.createPortal(d.jsx(Za.ItemSlot,{scope:s,children:d.jsx(By,{asChild:!0,onEscapeKeyDown:Me(h,()=>{E.isFocusedToastEscapeKeyDownRef.current||pe(),E.isFocusedToastEscapeKeyDownRef.current=!1}),children:d.jsx(Qe.li,{tabIndex:0,"data-state":f?"open":"closed","data-swipe-direction":E.swipeDirection,...j,ref:M,style:{userSelect:"none",touchAction:"none",...n.style},onKeyDown:Me(n.onKeyDown,G=>{G.key==="Escape"&&(h?.(G.nativeEvent),G.nativeEvent.defaultPrevented||(E.isFocusedToastEscapeKeyDownRef.current=!0,pe()))}),onPointerDown:Me(n.onPointerDown,G=>{G.button===0&&(D.current={x:G.clientX,y:G.clientY})}),onPointerMove:Me(n.onPointerMove,G=>{if(!D.current)return;const me=G.clientX-D.current.x,se=G.clientY-D.current.y,oe=!!F.current,L=["left","right"].includes(E.swipeDirection),K=["left","up"].includes(E.swipeDirection)?Math.min:Math.max,Q=L?K(0,me):0,N=L?0:K(0,se),z=G.pointerType==="touch"?10:2,ae={x:Q,y:N},de={originalEvent:G,delta:ae};oe?(F.current=ae,Us(lx,S,de,{discrete:!1})):Uf(ae,E.swipeDirection,z)?(F.current=ae,Us(ix,x,de,{discrete:!1}),G.target.setPointerCapture(G.pointerId)):(Math.abs(me)>z||Math.abs(se)>z)&&(D.current=null)}),onPointerUp:Me(n.onPointerUp,G=>{const me=F.current,se=G.target;if(se.hasPointerCapture(G.pointerId)&&se.releasePointerCapture(G.pointerId),F.current=null,D.current=null,me){const oe=G.currentTarget,L={originalEvent:G,delta:me};Uf(me,E.swipeDirection,E.swipeThreshold)?Us(ux,R,L,{discrete:!0}):Us(ax,k,L,{discrete:!0}),oe.addEventListener("click",K=>K.preventDefault(),{once:!0})}})})})}),E.viewport)})]}):null}),px=n=>{const{__scopeToast:o,children:s,...a}=n,u=ii(Po,o),[f,p]=y.useState(!1),[h,g]=y.useState(!1);return gx(()=>p(!0)),y.useEffect(()=>{const v=window.setTimeout(()=>g(!0),1e3);return()=>window.clearTimeout(v)},[]),h?null:d.jsx(Mp,{asChild:!0,children:d.jsx(si,{...a,children:f&&d.jsxs(d.Fragment,{children:[u.label," ",s]})})})},hx="ToastTitle",Hp=y.forwardRef((n,o)=>{const{__scopeToast:s,...a}=n;return d.jsx(Qe.div,{...a,ref:o})});Hp.displayName=hx;var mx="ToastDescription",Wp=y.forwardRef((n,o)=>{const{__scopeToast:s,...a}=n;return d.jsx(Qe.div,{...a,ref:o})});Wp.displayName=mx;var Bp="ToastAction",Vp=y.forwardRef((n,o)=>{const{altText:s,...a}=n;return s.trim()?d.jsx(Kp,{altText:s,asChild:!0,children:d.jsx(Ja,{...a,ref:o})}):(console.error(`Invalid prop \`altText\` supplied to \`${Bp}\`. Expected non-empty \`string\`.`),null)});Vp.displayName=Bp;var Qp="ToastClose",Ja=y.forwardRef((n,o)=>{const{__scopeToast:s,...a}=n,u=dx(Qp,s);return d.jsx(Kp,{asChild:!0,children:d.jsx(Qe.button,{type:"button",...a,ref:o,onClick:Me(n.onClick,u.onClose)})})});Ja.displayName=Qp;var Kp=y.forwardRef((n,o)=>{const{__scopeToast:s,altText:a,...u}=n;return d.jsx(Qe.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":a||void 0,...u,ref:o})});function Gp(n){const o=[];return Array.from(n.childNodes).forEach(a=>{if(a.nodeType===a.TEXT_NODE&&a.textContent&&o.push(a.textContent),vx(a)){const u=a.ariaHidden||a.hidden||a.style.display==="none",f=a.dataset.radixToastAnnounceExclude==="";if(!u)if(f){const p=a.dataset.radixToastAnnounceAlt;p&&o.push(p)}else o.push(...Gp(a))}}),o}function Us(n,o,s,{discrete:a}){const u=s.originalEvent.currentTarget,f=new CustomEvent(n,{bubbles:!0,cancelable:!0,detail:s});o&&u.addEventListener(n,o,{once:!0}),a?Op(u,f):u.dispatchEvent(f)}var Uf=(n,o,s=0)=>{const a=Math.abs(n.x),u=Math.abs(n.y),f=a>u;return o==="left"||o==="right"?f&&a>s:!f&&u>s};function gx(n=()=>{}){const o=Nn(n);Ut(()=>{let s=0,a=0;return s=window.requestAnimationFrame(()=>a=window.requestAnimationFrame(o)),()=>{window.cancelAnimationFrame(s),window.cancelAnimationFrame(a)}},[o])}function vx(n){return n.nodeType===n.ELEMENT_NODE}function yx(n){const o=[],s=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{const u=a.tagName==="INPUT"&&a.type==="hidden";return a.disabled||a.hidden||u?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;s.nextNode();)o.push(s.currentNode);return o}function va(n){const o=document.activeElement;return n.some(s=>s===o?!0:(s.focus(),document.activeElement!==o))}var xx=Dp,qp=zp,Yp=Up,Xp=Hp,Zp=Wp,Jp=Vp,eh=Ja;function th(n){var o,s,a="";if(typeof n=="string"||typeof n=="number")a+=n;else if(typeof n=="object")if(Array.isArray(n)){var u=n.length;for(o=0;o<u;o++)n[o]&&(s=th(n[o]))&&(a&&(a+=" "),a+=s)}else for(s in n)n[s]&&(a&&(a+=" "),a+=s);return a}function nh(){for(var n,o,s=0,a="",u=arguments.length;s<u;s++)(n=arguments[s])&&(o=th(n))&&(a&&(a+=" "),a+=o);return a}const Hf=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,Wf=nh,wx=(n,o)=>s=>{var a;if(o?.variants==null)return Wf(n,s?.class,s?.className);const{variants:u,defaultVariants:f}=o,p=Object.keys(u).map(v=>{const x=s?.[v],S=f?.[v];if(x===null)return null;const k=Hf(x)||Hf(S);return u[v][k]}),h=s&&Object.entries(s).reduce((v,x)=>{let[S,k]=x;return k===void 0||(v[S]=k),v},{}),g=o==null||(a=o.compoundVariants)===null||a===void 0?void 0:a.reduce((v,x)=>{let{class:S,className:k,...R}=x;return Object.entries(R).every(j=>{let[E,b]=j;return Array.isArray(b)?b.includes({...f,...h}[E]):{...f,...h}[E]===b})?[...v,S,k]:v},[]);return Wf(n,p,g,s?.class,s?.className)};const Sx=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),rh=(...n)=>n.filter((o,s,a)=>!!o&&a.indexOf(o)===s).join(" ");var bx={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 Cx=y.forwardRef(({color:n="currentColor",size:o=24,strokeWidth:s=2,absoluteStrokeWidth:a,className:u="",children:f,iconNode:p,...h},g)=>y.createElement("svg",{ref:g,...bx,width:o,height:o,stroke:n,strokeWidth:a?Number(s)*24/Number(o):s,className:rh("lucide",u),...h},[...p.map(([v,x])=>y.createElement(v,x)),...Array.isArray(f)?f:[f]]));const oh=(n,o)=>{const s=y.forwardRef(({className:a,...u},f)=>y.createElement(Cx,{ref:f,iconNode:o,className:rh(`lucide-${Sx(n)}`,a),...u}));return s.displayName=`${n}`,s};const kx=oh("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 Ex=oh("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),eu="-",Px=n=>{const o=Rx(n),{conflictingClassGroups:s,conflictingClassGroupModifiers:a}=n;return{getClassGroupId:p=>{const h=p.split(eu);return h[0]===""&&h.length!==1&&h.shift(),sh(h,o)||Nx(p)},getConflictingClassGroupIds:(p,h)=>{const g=s[p]||[];return h&&a[p]?[...g,...a[p]]:g}}},sh=(n,o)=>{if(n.length===0)return o.classGroupId;const s=n[0],a=o.nextPart.get(s),u=a?sh(n.slice(1),a):void 0;if(u)return u;if(o.validators.length===0)return;const f=n.join(eu);return o.validators.find(({validator:p})=>p(f))?.classGroupId},Bf=/^\[(.+)\]$/,Nx=n=>{if(Bf.test(n)){const o=Bf.exec(n)[1],s=o?.substring(0,o.indexOf(":"));if(s)return"arbitrary.."+s}},Rx=n=>{const{theme:o,prefix:s}=n,a={nextPart:new Map,validators:[]};return Tx(Object.entries(n.classGroups),s).forEach(([f,p])=>{Aa(p,a,f,o)}),a},Aa=(n,o,s,a)=>{n.forEach(u=>{if(typeof u=="string"){const f=u===""?o:Vf(o,u);f.classGroupId=s;return}if(typeof u=="function"){if(jx(u)){Aa(u(a),o,s,a);return}o.validators.push({validator:u,classGroupId:s});return}Object.entries(u).forEach(([f,p])=>{Aa(p,Vf(o,f),s,a)})})},Vf=(n,o)=>{let s=n;return o.split(eu).forEach(a=>{s.nextPart.has(a)||s.nextPart.set(a,{nextPart:new Map,validators:[]}),s=s.nextPart.get(a)}),s},jx=n=>n.isThemeGetter,Tx=(n,o)=>o?n.map(([s,a])=>{const u=a.map(f=>typeof f=="string"?o+f:typeof f=="object"?Object.fromEntries(Object.entries(f).map(([p,h])=>[o+p,h])):f);return[s,u]}):n,Ox=n=>{if(n<1)return{get:()=>{},set:()=>{}};let o=0,s=new Map,a=new Map;const u=(f,p)=>{s.set(f,p),o++,o>n&&(o=0,a=s,s=new Map)};return{get(f){let p=s.get(f);if(p!==void 0)return p;if((p=a.get(f))!==void 0)return u(f,p),p},set(f,p){s.has(f)?s.set(f,p):u(f,p)}}},ih="!",_x=n=>{const{separator:o,experimentalParseClassName:s}=n,a=o.length===1,u=o[0],f=o.length,p=h=>{const g=[];let v=0,x=0,S;for(let b=0;b<h.length;b++){let I=h[b];if(v===0){if(I===u&&(a||h.slice(b,b+f)===o)){g.push(h.slice(x,b)),x=b+f;continue}if(I==="/"){S=b;continue}}I==="["?v++:I==="]"&&v--}const k=g.length===0?h:h.substring(x),R=k.startsWith(ih),j=R?k.substring(1):k,E=S&&S>x?S-x:void 0;return{modifiers:g,hasImportantModifier:R,baseClassName:j,maybePostfixModifierPosition:E}};return s?h=>s({className:h,parseClassName:p}):p},Ax=n=>{if(n.length<=1)return n;const o=[];let s=[];return n.forEach(a=>{a[0]==="["?(o.push(...s.sort(),a),s=[]):s.push(a)}),o.push(...s.sort()),o},Ix=n=>({cache:Ox(n.cacheSize),parseClassName:_x(n),...Px(n)}),Mx=/\s+/,Lx=(n,o)=>{const{parseClassName:s,getClassGroupId:a,getConflictingClassGroupIds:u}=o,f=[],p=n.trim().split(Mx);let h="";for(let g=p.length-1;g>=0;g-=1){const v=p[g],{modifiers:x,hasImportantModifier:S,baseClassName:k,maybePostfixModifierPosition:R}=s(v);let j=!!R,E=a(j?k.substring(0,R):k);if(!E){if(!j){h=v+(h.length>0?" "+h:h);continue}if(E=a(k),!E){h=v+(h.length>0?" "+h:h);continue}j=!1}const b=Ax(x).join(":"),I=S?b+ih:b,M=I+E;if(f.includes(M))continue;f.push(M);const D=u(E,j);for(let F=0;F<D.length;++F){const V=D[F];f.push(I+V)}h=v+(h.length>0?" "+h:h)}return h};function Dx(){let n=0,o,s,a="";for(;n<arguments.length;)(o=arguments[n++])&&(s=lh(o))&&(a&&(a+=" "),a+=s);return a}const lh=n=>{if(typeof n=="string")return n;let o,s="";for(let a=0;a<n.length;a++)n[a]&&(o=lh(n[a]))&&(s&&(s+=" "),s+=o);return s};function Fx(n,...o){let s,a,u,f=p;function p(g){const v=o.reduce((x,S)=>S(x),n());return s=Ix(v),a=s.cache.get,u=s.cache.set,f=h,h(g)}function h(g){const v=a(g);if(v)return v;const x=Lx(g,s);return u(g,x),x}return function(){return f(Dx.apply(null,arguments))}}const Ne=n=>{const o=s=>s[n]||[];return o.isThemeGetter=!0,o},ah=/^\[(?:([a-z-]+):)?(.+)\]$/i,zx=/^\d+\/\d+$/,$x=new Set(["px","full","screen"]),Ux=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Hx=/\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$/,Wx=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Bx=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Vx=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Zt=n=>Sr(n)||$x.has(n)||zx.test(n),Cn=n=>Nr(n,"length",Jx),Sr=n=>!!n&&!Number.isNaN(Number(n)),ya=n=>Nr(n,"number",Sr),vo=n=>!!n&&Number.isInteger(Number(n)),Qx=n=>n.endsWith("%")&&Sr(n.slice(0,-1)),fe=n=>ah.test(n),kn=n=>Ux.test(n),Kx=new Set(["length","size","percentage"]),Gx=n=>Nr(n,Kx,uh),qx=n=>Nr(n,"position",uh),Yx=new Set(["image","url"]),Xx=n=>Nr(n,Yx,tw),Zx=n=>Nr(n,"",ew),yo=()=>!0,Nr=(n,o,s)=>{const a=ah.exec(n);return a?a[1]?typeof o=="string"?a[1]===o:o.has(a[1]):s(a[2]):!1},Jx=n=>Hx.test(n)&&!Wx.test(n),uh=()=>!1,ew=n=>Bx.test(n),tw=n=>Vx.test(n),nw=()=>{const n=Ne("colors"),o=Ne("spacing"),s=Ne("blur"),a=Ne("brightness"),u=Ne("borderColor"),f=Ne("borderRadius"),p=Ne("borderSpacing"),h=Ne("borderWidth"),g=Ne("contrast"),v=Ne("grayscale"),x=Ne("hueRotate"),S=Ne("invert"),k=Ne("gap"),R=Ne("gradientColorStops"),j=Ne("gradientColorStopPositions"),E=Ne("inset"),b=Ne("margin"),I=Ne("opacity"),M=Ne("padding"),D=Ne("saturate"),F=Ne("scale"),V=Ne("sepia"),A=Ne("skew"),B=Ne("space"),te=Ne("translate"),ce=()=>["auto","contain","none"],le=()=>["auto","hidden","clip","visible","scroll"],pe=()=>["auto",fe,o],J=()=>[fe,o],ue=()=>["",Zt,Cn],G=()=>["auto",Sr,fe],me=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],se=()=>["solid","dashed","dotted","double","none"],oe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],L=()=>["start","end","center","between","around","evenly","stretch"],K=()=>["","0",fe],Q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],N=()=>[Sr,fe];return{cacheSize:500,separator:":",theme:{colors:[yo],spacing:[Zt,Cn],blur:["none","",kn,fe],brightness:N(),borderColor:[n],borderRadius:["none","","full",kn,fe],borderSpacing:J(),borderWidth:ue(),contrast:N(),grayscale:K(),hueRotate:N(),invert:K(),gap:J(),gradientColorStops:[n],gradientColorStopPositions:[Qx,Cn],inset:pe(),margin:pe(),opacity:N(),padding:J(),saturate:N(),scale:N(),sepia:K(),skew:N(),space:J(),translate:J()},classGroups:{aspect:[{aspect:["auto","square","video",fe]}],container:["container"],columns:[{columns:[kn]}],"break-after":[{"break-after":Q()}],"break-before":[{"break-before":Q()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...me(),fe]}],overflow:[{overflow:le()}],"overflow-x":[{"overflow-x":le()}],"overflow-y":[{"overflow-y":le()}],overscroll:[{overscroll:ce()}],"overscroll-x":[{"overscroll-x":ce()}],"overscroll-y":[{"overscroll-y":ce()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[E]}],"inset-x":[{"inset-x":[E]}],"inset-y":[{"inset-y":[E]}],start:[{start:[E]}],end:[{end:[E]}],top:[{top:[E]}],right:[{right:[E]}],bottom:[{bottom:[E]}],left:[{left:[E]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",vo,fe]}],basis:[{basis:pe()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",fe]}],grow:[{grow:K()}],shrink:[{shrink:K()}],order:[{order:["first","last","none",vo,fe]}],"grid-cols":[{"grid-cols":[yo]}],"col-start-end":[{col:["auto",{span:["full",vo,fe]},fe]}],"col-start":[{"col-start":G()}],"col-end":[{"col-end":G()}],"grid-rows":[{"grid-rows":[yo]}],"row-start-end":[{row:["auto",{span:[vo,fe]},fe]}],"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",fe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",fe]}],gap:[{gap:[k]}],"gap-x":[{"gap-x":[k]}],"gap-y":[{"gap-y":[k]}],"justify-content":[{justify:["normal",...L()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...L(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...L(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[M]}],px:[{px:[M]}],py:[{py:[M]}],ps:[{ps:[M]}],pe:[{pe:[M]}],pt:[{pt:[M]}],pr:[{pr:[M]}],pb:[{pb:[M]}],pl:[{pl:[M]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[B]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[B]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",fe,o]}],"min-w":[{"min-w":[fe,o,"min","max","fit"]}],"max-w":[{"max-w":[fe,o,"none","full","min","max","fit","prose",{screen:[kn]},kn]}],h:[{h:[fe,o,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[fe,o,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[fe,o,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[fe,o,"auto","min","max","fit"]}],"font-size":[{text:["base",kn,Cn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ya]}],"font-family":[{font:[yo]}],"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",fe]}],"line-clamp":[{"line-clamp":["none",Sr,ya]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Zt,fe]}],"list-image":[{"list-image":["none",fe]}],"list-style-type":[{list:["none","disc","decimal",fe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[n]}],"placeholder-opacity":[{"placeholder-opacity":[I]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[n]}],"text-opacity":[{"text-opacity":[I]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...se(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Zt,Cn]}],"underline-offset":[{"underline-offset":["auto",Zt,fe]}],"text-decoration-color":[{decoration:[n]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:J()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",fe]}],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",fe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[I]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...me(),qx]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Gx]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Xx]}],"bg-color":[{bg:[n]}],"gradient-from-pos":[{from:[j]}],"gradient-via-pos":[{via:[j]}],"gradient-to-pos":[{to:[j]}],"gradient-from":[{from:[R]}],"gradient-via":[{via:[R]}],"gradient-to":[{to:[R]}],rounded:[{rounded:[f]}],"rounded-s":[{"rounded-s":[f]}],"rounded-e":[{"rounded-e":[f]}],"rounded-t":[{"rounded-t":[f]}],"rounded-r":[{"rounded-r":[f]}],"rounded-b":[{"rounded-b":[f]}],"rounded-l":[{"rounded-l":[f]}],"rounded-ss":[{"rounded-ss":[f]}],"rounded-se":[{"rounded-se":[f]}],"rounded-ee":[{"rounded-ee":[f]}],"rounded-es":[{"rounded-es":[f]}],"rounded-tl":[{"rounded-tl":[f]}],"rounded-tr":[{"rounded-tr":[f]}],"rounded-br":[{"rounded-br":[f]}],"rounded-bl":[{"rounded-bl":[f]}],"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":[I]}],"border-style":[{border:[...se(),"hidden"]}],"divide-x":[{"divide-x":[h]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[h]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[I]}],"divide-style":[{divide:se()}],"border-color":[{border:[u]}],"border-color-x":[{"border-x":[u]}],"border-color-y":[{"border-y":[u]}],"border-color-s":[{"border-s":[u]}],"border-color-e":[{"border-e":[u]}],"border-color-t":[{"border-t":[u]}],"border-color-r":[{"border-r":[u]}],"border-color-b":[{"border-b":[u]}],"border-color-l":[{"border-l":[u]}],"divide-color":[{divide:[u]}],"outline-style":[{outline:["",...se()]}],"outline-offset":[{"outline-offset":[Zt,fe]}],"outline-w":[{outline:[Zt,Cn]}],"outline-color":[{outline:[n]}],"ring-w":[{ring:ue()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[n]}],"ring-opacity":[{"ring-opacity":[I]}],"ring-offset-w":[{"ring-offset":[Zt,Cn]}],"ring-offset-color":[{"ring-offset":[n]}],shadow:[{shadow:["","inner","none",kn,Zx]}],"shadow-color":[{shadow:[yo]}],opacity:[{opacity:[I]}],"mix-blend":[{"mix-blend":[...oe(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":oe()}],filter:[{filter:["","none"]}],blur:[{blur:[s]}],brightness:[{brightness:[a]}],contrast:[{contrast:[g]}],"drop-shadow":[{"drop-shadow":["","none",kn,fe]}],grayscale:[{grayscale:[v]}],"hue-rotate":[{"hue-rotate":[x]}],invert:[{invert:[S]}],saturate:[{saturate:[D]}],sepia:[{sepia:[V]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[s]}],"backdrop-brightness":[{"backdrop-brightness":[a]}],"backdrop-contrast":[{"backdrop-contrast":[g]}],"backdrop-grayscale":[{"backdrop-grayscale":[v]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[x]}],"backdrop-invert":[{"backdrop-invert":[S]}],"backdrop-opacity":[{"backdrop-opacity":[I]}],"backdrop-saturate":[{"backdrop-saturate":[D]}],"backdrop-sepia":[{"backdrop-sepia":[V]}],"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",fe]}],duration:[{duration:N()}],ease:[{ease:["linear","in","out","in-out",fe]}],delay:[{delay:N()}],animate:[{animate:["none","spin","ping","pulse","bounce",fe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[F]}],"scale-x":[{"scale-x":[F]}],"scale-y":[{"scale-y":[F]}],rotate:[{rotate:[vo,fe]}],"translate-x":[{"translate-x":[te]}],"translate-y":[{"translate-y":[te]}],"skew-x":[{"skew-x":[A]}],"skew-y":[{"skew-y":[A]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",fe]}],accent:[{accent:["auto",n]}],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",fe]}],"caret-color":[{caret:[n]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":J()}],"scroll-mx":[{"scroll-mx":J()}],"scroll-my":[{"scroll-my":J()}],"scroll-ms":[{"scroll-ms":J()}],"scroll-me":[{"scroll-me":J()}],"scroll-mt":[{"scroll-mt":J()}],"scroll-mr":[{"scroll-mr":J()}],"scroll-mb":[{"scroll-mb":J()}],"scroll-ml":[{"scroll-ml":J()}],"scroll-p":[{"scroll-p":J()}],"scroll-px":[{"scroll-px":J()}],"scroll-py":[{"scroll-py":J()}],"scroll-ps":[{"scroll-ps":J()}],"scroll-pe":[{"scroll-pe":J()}],"scroll-pt":[{"scroll-pt":J()}],"scroll-pr":[{"scroll-pr":J()}],"scroll-pb":[{"scroll-pb":J()}],"scroll-pl":[{"scroll-pl":J()}],"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",fe]}],fill:[{fill:[n,"none"]}],"stroke-w":[{stroke:[Zt,Cn,ya]}],stroke:[{stroke:[n,"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"]}}},rw=Fx(nw);function ht(...n){return rw(nh(n))}const ow=xx,ch=y.forwardRef(({className:n,...o},s)=>d.jsx(qp,{ref:s,className:ht("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]",n),...o}));ch.displayName=qp.displayName;const sw=wx("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-all 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"}}),dh=y.forwardRef(({className:n,variant:o,...s},a)=>d.jsx(Yp,{ref:a,className:ht(sw({variant:o}),n),...s}));dh.displayName=Yp.displayName;const iw=y.forwardRef(({className:n,...o},s)=>d.jsx(Jp,{ref:s,className:ht("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",n),...o}));iw.displayName=Jp.displayName;const fh=y.forwardRef(({className:n,...o},s)=>d.jsx(eh,{ref:s,className:ht("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",n),"toast-close":"",...o,children:d.jsx(Ex,{className:"h-4 w-4"})}));fh.displayName=eh.displayName;const ph=y.forwardRef(({className:n,...o},s)=>d.jsx(Xp,{ref:s,className:ht("text-sm font-semibold",n),...o}));ph.displayName=Xp.displayName;const hh=y.forwardRef(({className:n,...o},s)=>d.jsx(Zp,{ref:s,className:ht("text-sm opacity-90",n),...o}));hh.displayName=Zp.displayName;function lw(){const{toasts:n}=Sy();return d.jsxs(ow,{children:[n.map(function({id:o,title:s,description:a,action:u,...f}){return d.jsxs(dh,{...f,children:[d.jsxs("div",{className:"grid gap-1",children:[s&&d.jsx(ph,{children:s}),a&&d.jsx(hh,{children:a})]}),u,d.jsx(fh,{})]},o)}),d.jsx(ch,{})]})}var aw=za[" useId ".trim().toString()]||(()=>{}),uw=0;function mh(n){const[o,s]=y.useState(aw());return Ut(()=>{s(a=>a??String(uw++))},[n]),o?`radix-${o}`:""}const cw=["top","right","bottom","left"],Rn=Math.min,ft=Math.max,Xs=Math.round,Hs=Math.floor,$t=n=>({x:n,y:n}),dw={left:"right",right:"left",bottom:"top",top:"bottom"};function Ia(n,o,s){return ft(n,Rn(o,s))}function en(n,o){return typeof n=="function"?n(o):n}function tn(n){return n.split("-")[0]}function Rr(n){return n.split("-")[1]}function tu(n){return n==="x"?"y":"x"}function nu(n){return n==="y"?"height":"width"}function zt(n){const o=n[0];return o==="t"||o==="b"?"y":"x"}function ru(n){return tu(zt(n))}function fw(n,o,s){s===void 0&&(s=!1);const a=Rr(n),u=ru(n),f=nu(u);let p=u==="x"?a===(s?"end":"start")?"right":"left":a==="start"?"bottom":"top";return o.reference[f]>o.floating[f]&&(p=Zs(p)),[p,Zs(p)]}function pw(n){const o=Zs(n);return[Ma(n),o,Ma(o)]}function Ma(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}const Qf=["left","right"],Kf=["right","left"],hw=["top","bottom"],mw=["bottom","top"];function gw(n,o,s){switch(n){case"top":case"bottom":return s?o?Kf:Qf:o?Qf:Kf;case"left":case"right":return o?hw:mw;default:return[]}}function vw(n,o,s,a){const u=Rr(n);let f=gw(tn(n),s==="start",a);return u&&(f=f.map(p=>p+"-"+u),o&&(f=f.concat(f.map(Ma)))),f}function Zs(n){const o=tn(n);return dw[o]+n.slice(o.length)}function yw(n){return{top:0,right:0,bottom:0,left:0,...n}}function gh(n){return typeof n!="number"?yw(n):{top:n,right:n,bottom:n,left:n}}function Js(n){const{x:o,y:s,width:a,height:u}=n;return{width:a,height:u,top:s,left:o,right:o+a,bottom:s+u,x:o,y:s}}function Gf(n,o,s){let{reference:a,floating:u}=n;const f=zt(o),p=ru(o),h=nu(p),g=tn(o),v=f==="y",x=a.x+a.width/2-u.width/2,S=a.y+a.height/2-u.height/2,k=a[h]/2-u[h]/2;let R;switch(g){case"top":R={x,y:a.y-u.height};break;case"bottom":R={x,y:a.y+a.height};break;case"right":R={x:a.x+a.width,y:S};break;case"left":R={x:a.x-u.width,y:S};break;default:R={x:a.x,y:a.y}}switch(Rr(o)){case"start":R[p]-=k*(s&&v?-1:1);break;case"end":R[p]+=k*(s&&v?-1:1);break}return R}async function xw(n,o){var s;o===void 0&&(o={});const{x:a,y:u,platform:f,rects:p,elements:h,strategy:g}=n,{boundary:v="clippingAncestors",rootBoundary:x="viewport",elementContext:S="floating",altBoundary:k=!1,padding:R=0}=en(o,n),j=gh(R),b=h[k?S==="floating"?"reference":"floating":S],I=Js(await f.getClippingRect({element:(s=await(f.isElement==null?void 0:f.isElement(b)))==null||s?b:b.contextElement||await(f.getDocumentElement==null?void 0:f.getDocumentElement(h.floating)),boundary:v,rootBoundary:x,strategy:g})),M=S==="floating"?{x:a,y:u,width:p.floating.width,height:p.floating.height}:p.reference,D=await(f.getOffsetParent==null?void 0:f.getOffsetParent(h.floating)),F=await(f.isElement==null?void 0:f.isElement(D))?await(f.getScale==null?void 0:f.getScale(D))||{x:1,y:1}:{x:1,y:1},V=Js(f.convertOffsetParentRelativeRectToViewportRelativeRect?await f.convertOffsetParentRelativeRectToViewportRelativeRect({elements:h,rect:M,offsetParent:D,strategy:g}):M);return{top:(I.top-V.top+j.top)/F.y,bottom:(V.bottom-I.bottom+j.bottom)/F.y,left:(I.left-V.left+j.left)/F.x,right:(V.right-I.right+j.right)/F.x}}const ww=50,Sw=async(n,o,s)=>{const{placement:a="bottom",strategy:u="absolute",middleware:f=[],platform:p}=s,h=p.detectOverflow?p:{...p,detectOverflow:xw},g=await(p.isRTL==null?void 0:p.isRTL(o));let v=await p.getElementRects({reference:n,floating:o,strategy:u}),{x,y:S}=Gf(v,a,g),k=a,R=0;const j={};for(let E=0;E<f.length;E++){const b=f[E];if(!b)continue;const{name:I,fn:M}=b,{x:D,y:F,data:V,reset:A}=await M({x,y:S,initialPlacement:a,placement:k,strategy:u,middlewareData:j,rects:v,platform:h,elements:{reference:n,floating:o}});x=D??x,S=F??S,j[I]={...j[I],...V},A&&R<ww&&(R++,typeof A=="object"&&(A.placement&&(k=A.placement),A.rects&&(v=A.rects===!0?await p.getElementRects({reference:n,floating:o,strategy:u}):A.rects),{x,y:S}=Gf(v,k,g)),E=-1)}return{x,y:S,placement:k,strategy:u,middlewareData:j}},bw=n=>({name:"arrow",options:n,async fn(o){const{x:s,y:a,placement:u,rects:f,platform:p,elements:h,middlewareData:g}=o,{element:v,padding:x=0}=en(n,o)||{};if(v==null)return{};const S=gh(x),k={x:s,y:a},R=ru(u),j=nu(R),E=await p.getDimensions(v),b=R==="y",I=b?"top":"left",M=b?"bottom":"right",D=b?"clientHeight":"clientWidth",F=f.reference[j]+f.reference[R]-k[R]-f.floating[j],V=k[R]-f.reference[R],A=await(p.getOffsetParent==null?void 0:p.getOffsetParent(v));let B=A?A[D]:0;(!B||!await(p.isElement==null?void 0:p.isElement(A)))&&(B=h.floating[D]||f.floating[j]);const te=F/2-V/2,ce=B/2-E[j]/2-1,le=Rn(S[I],ce),pe=Rn(S[M],ce),J=le,ue=B-E[j]-pe,G=B/2-E[j]/2+te,me=Ia(J,G,ue),se=!g.arrow&&Rr(u)!=null&&G!==me&&f.reference[j]/2-(G<J?le:pe)-E[j]/2<0,oe=se?G<J?G-J:G-ue:0;return{[R]:k[R]+oe,data:{[R]:me,centerOffset:G-me-oe,...se&&{alignmentOffset:oe}},reset:se}}}),Cw=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(o){var s,a;const{placement:u,middlewareData:f,rects:p,initialPlacement:h,platform:g,elements:v}=o,{mainAxis:x=!0,crossAxis:S=!0,fallbackPlacements:k,fallbackStrategy:R="bestFit",fallbackAxisSideDirection:j="none",flipAlignment:E=!0,...b}=en(n,o);if((s=f.arrow)!=null&&s.alignmentOffset)return{};const I=tn(u),M=zt(h),D=tn(h)===h,F=await(g.isRTL==null?void 0:g.isRTL(v.floating)),V=k||(D||!E?[Zs(h)]:pw(h)),A=j!=="none";!k&&A&&V.push(...vw(h,E,j,F));const B=[h,...V],te=await g.detectOverflow(o,b),ce=[];let le=((a=f.flip)==null?void 0:a.overflows)||[];if(x&&ce.push(te[I]),S){const G=fw(u,p,F);ce.push(te[G[0]],te[G[1]])}if(le=[...le,{placement:u,overflows:ce}],!ce.every(G=>G<=0)){var pe,J;const G=(((pe=f.flip)==null?void 0:pe.index)||0)+1,me=B[G];if(me&&(!(S==="alignment"?M!==zt(me):!1)||le.every(L=>zt(L.placement)===M?L.overflows[0]>0:!0)))return{data:{index:G,overflows:le},reset:{placement:me}};let se=(J=le.filter(oe=>oe.overflows[0]<=0).sort((oe,L)=>oe.overflows[1]-L.overflows[1])[0])==null?void 0:J.placement;if(!se)switch(R){case"bestFit":{var ue;const oe=(ue=le.filter(L=>{if(A){const K=zt(L.placement);return K===M||K==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(K=>K>0).reduce((K,Q)=>K+Q,0)]).sort((L,K)=>L[1]-K[1])[0])==null?void 0:ue[0];oe&&(se=oe);break}case"initialPlacement":se=h;break}if(u!==se)return{reset:{placement:se}}}return{}}}};function qf(n,o){return{top:n.top-o.height,right:n.right-o.width,bottom:n.bottom-o.height,left:n.left-o.width}}function Yf(n){return cw.some(o=>n[o]>=0)}const kw=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(o){const{rects:s,platform:a}=o,{strategy:u="referenceHidden",...f}=en(n,o);switch(u){case"referenceHidden":{const p=await a.detectOverflow(o,{...f,elementContext:"reference"}),h=qf(p,s.reference);return{data:{referenceHiddenOffsets:h,referenceHidden:Yf(h)}}}case"escaped":{const p=await a.detectOverflow(o,{...f,altBoundary:!0}),h=qf(p,s.floating);return{data:{escapedOffsets:h,escaped:Yf(h)}}}default:return{}}}}},vh=new Set(["left","top"]);async function Ew(n,o){const{placement:s,platform:a,elements:u}=n,f=await(a.isRTL==null?void 0:a.isRTL(u.floating)),p=tn(s),h=Rr(s),g=zt(s)==="y",v=vh.has(p)?-1:1,x=f&&g?-1:1,S=en(o,n);let{mainAxis:k,crossAxis:R,alignmentAxis:j}=typeof S=="number"?{mainAxis:S,crossAxis:0,alignmentAxis:null}:{mainAxis:S.mainAxis||0,crossAxis:S.crossAxis||0,alignmentAxis:S.alignmentAxis};return h&&typeof j=="number"&&(R=h==="end"?j*-1:j),g?{x:R*x,y:k*v}:{x:k*v,y:R*x}}const Pw=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(o){var s,a;const{x:u,y:f,placement:p,middlewareData:h}=o,g=await Ew(o,n);return p===((s=h.offset)==null?void 0:s.placement)&&(a=h.arrow)!=null&&a.alignmentOffset?{}:{x:u+g.x,y:f+g.y,data:{...g,placement:p}}}}},Nw=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(o){const{x:s,y:a,placement:u,platform:f}=o,{mainAxis:p=!0,crossAxis:h=!1,limiter:g={fn:I=>{let{x:M,y:D}=I;return{x:M,y:D}}},...v}=en(n,o),x={x:s,y:a},S=await f.detectOverflow(o,v),k=zt(tn(u)),R=tu(k);let j=x[R],E=x[k];if(p){const I=R==="y"?"top":"left",M=R==="y"?"bottom":"right",D=j+S[I],F=j-S[M];j=Ia(D,j,F)}if(h){const I=k==="y"?"top":"left",M=k==="y"?"bottom":"right",D=E+S[I],F=E-S[M];E=Ia(D,E,F)}const b=g.fn({...o,[R]:j,[k]:E});return{...b,data:{x:b.x-s,y:b.y-a,enabled:{[R]:p,[k]:h}}}}}},Rw=function(n){return n===void 0&&(n={}),{options:n,fn(o){const{x:s,y:a,placement:u,rects:f,middlewareData:p}=o,{offset:h=0,mainAxis:g=!0,crossAxis:v=!0}=en(n,o),x={x:s,y:a},S=zt(u),k=tu(S);let R=x[k],j=x[S];const E=en(h,o),b=typeof E=="number"?{mainAxis:E,crossAxis:0}:{mainAxis:0,crossAxis:0,...E};if(g){const D=k==="y"?"height":"width",F=f.reference[k]-f.floating[D]+b.mainAxis,V=f.reference[k]+f.reference[D]-b.mainAxis;R<F?R=F:R>V&&(R=V)}if(v){var I,M;const D=k==="y"?"width":"height",F=vh.has(tn(u)),V=f.reference[S]-f.floating[D]+(F&&((I=p.offset)==null?void 0:I[S])||0)+(F?0:b.crossAxis),A=f.reference[S]+f.reference[D]+(F?0:((M=p.offset)==null?void 0:M[S])||0)-(F?b.crossAxis:0);j<V?j=V:j>A&&(j=A)}return{[k]:R,[S]:j}}}},jw=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(o){var s,a;const{placement:u,rects:f,platform:p,elements:h}=o,{apply:g=()=>{},...v}=en(n,o),x=await p.detectOverflow(o,v),S=tn(u),k=Rr(u),R=zt(u)==="y",{width:j,height:E}=f.floating;let b,I;S==="top"||S==="bottom"?(b=S,I=k===(await(p.isRTL==null?void 0:p.isRTL(h.floating))?"start":"end")?"left":"right"):(I=S,b=k==="end"?"top":"bottom");const M=E-x.top-x.bottom,D=j-x.left-x.right,F=Rn(E-x[b],M),V=Rn(j-x[I],D),A=!o.middlewareData.shift;let B=F,te=V;if((s=o.middlewareData.shift)!=null&&s.enabled.x&&(te=D),(a=o.middlewareData.shift)!=null&&a.enabled.y&&(B=M),A&&!k){const le=ft(x.left,0),pe=ft(x.right,0),J=ft(x.top,0),ue=ft(x.bottom,0);R?te=j-2*(le!==0||pe!==0?le+pe:ft(x.left,x.right)):B=E-2*(J!==0||ue!==0?J+ue:ft(x.top,x.bottom))}await g({...o,availableWidth:te,availableHeight:B});const ce=await p.getDimensions(h.floating);return j!==ce.width||E!==ce.height?{reset:{rects:!0}}:{}}}};function li(){return typeof window<"u"}function jr(n){return yh(n)?(n.nodeName||"").toLowerCase():"#document"}function pt(n){var o;return(n==null||(o=n.ownerDocument)==null?void 0:o.defaultView)||window}function Ht(n){var o;return(o=(yh(n)?n.ownerDocument:n.document)||window.document)==null?void 0:o.documentElement}function yh(n){return li()?n instanceof Node||n instanceof pt(n).Node:!1}function Ot(n){return li()?n instanceof Element||n instanceof pt(n).Element:!1}function nn(n){return li()?n instanceof HTMLElement||n instanceof pt(n).HTMLElement:!1}function Xf(n){return!li()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof pt(n).ShadowRoot}function No(n){const{overflow:o,overflowX:s,overflowY:a,display:u}=_t(n);return/auto|scroll|overlay|hidden|clip/.test(o+a+s)&&u!=="inline"&&u!=="contents"}function Tw(n){return/^(table|td|th)$/.test(jr(n))}function ai(n){try{if(n.matches(":popover-open"))return!0}catch{}try{return n.matches(":modal")}catch{return!1}}const Ow=/transform|translate|scale|rotate|perspective|filter/,_w=/paint|layout|strict|content/,Wn=n=>!!n&&n!=="none";let xa;function ou(n){const o=Ot(n)?_t(n):n;return Wn(o.transform)||Wn(o.translate)||Wn(o.scale)||Wn(o.rotate)||Wn(o.perspective)||!su()&&(Wn(o.backdropFilter)||Wn(o.filter))||Ow.test(o.willChange||"")||_w.test(o.contain||"")}function Aw(n){let o=jn(n);for(;nn(o)&&!Cr(o);){if(ou(o))return o;if(ai(o))return null;o=jn(o)}return null}function su(){return xa==null&&(xa=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),xa}function Cr(n){return/^(html|body|#document)$/.test(jr(n))}function _t(n){return pt(n).getComputedStyle(n)}function ui(n){return Ot(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function jn(n){if(jr(n)==="html")return n;const o=n.assignedSlot||n.parentNode||Xf(n)&&n.host||Ht(n);return Xf(o)?o.host:o}function xh(n){const o=jn(n);return Cr(o)?n.ownerDocument?n.ownerDocument.body:n.body:nn(o)&&No(o)?o:xh(o)}function bo(n,o,s){var a;o===void 0&&(o=[]),s===void 0&&(s=!0);const u=xh(n),f=u===((a=n.ownerDocument)==null?void 0:a.body),p=pt(u);if(f){const h=La(p);return o.concat(p,p.visualViewport||[],No(u)?u:[],h&&s?bo(h):[])}else return o.concat(u,bo(u,[],s))}function La(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function wh(n){const o=_t(n);let s=parseFloat(o.width)||0,a=parseFloat(o.height)||0;const u=nn(n),f=u?n.offsetWidth:s,p=u?n.offsetHeight:a,h=Xs(s)!==f||Xs(a)!==p;return h&&(s=f,a=p),{width:s,height:a,$:h}}function iu(n){return Ot(n)?n:n.contextElement}function br(n){const o=iu(n);if(!nn(o))return $t(1);const s=o.getBoundingClientRect(),{width:a,height:u,$:f}=wh(o);let p=(f?Xs(s.width):s.width)/a,h=(f?Xs(s.height):s.height)/u;return(!p||!Number.isFinite(p))&&(p=1),(!h||!Number.isFinite(h))&&(h=1),{x:p,y:h}}const Iw=$t(0);function Sh(n){const o=pt(n);return!su()||!o.visualViewport?Iw:{x:o.visualViewport.offsetLeft,y:o.visualViewport.offsetTop}}function Mw(n,o,s){return o===void 0&&(o=!1),!s||o&&s!==pt(n)?!1:o}function Kn(n,o,s,a){o===void 0&&(o=!1),s===void 0&&(s=!1);const u=n.getBoundingClientRect(),f=iu(n);let p=$t(1);o&&(a?Ot(a)&&(p=br(a)):p=br(n));const h=Mw(f,s,a)?Sh(f):$t(0);let g=(u.left+h.x)/p.x,v=(u.top+h.y)/p.y,x=u.width/p.x,S=u.height/p.y;if(f){const k=pt(f),R=a&&Ot(a)?pt(a):a;let j=k,E=La(j);for(;E&&a&&R!==j;){const b=br(E),I=E.getBoundingClientRect(),M=_t(E),D=I.left+(E.clientLeft+parseFloat(M.paddingLeft))*b.x,F=I.top+(E.clientTop+parseFloat(M.paddingTop))*b.y;g*=b.x,v*=b.y,x*=b.x,S*=b.y,g+=D,v+=F,j=pt(E),E=La(j)}}return Js({width:x,height:S,x:g,y:v})}function ci(n,o){const s=ui(n).scrollLeft;return o?o.left+s:Kn(Ht(n)).left+s}function bh(n,o){const s=n.getBoundingClientRect(),a=s.left+o.scrollLeft-ci(n,s),u=s.top+o.scrollTop;return{x:a,y:u}}function Lw(n){let{elements:o,rect:s,offsetParent:a,strategy:u}=n;const f=u==="fixed",p=Ht(a),h=o?ai(o.floating):!1;if(a===p||h&&f)return s;let g={scrollLeft:0,scrollTop:0},v=$t(1);const x=$t(0),S=nn(a);if((S||!S&&!f)&&((jr(a)!=="body"||No(p))&&(g=ui(a)),S)){const R=Kn(a);v=br(a),x.x=R.x+a.clientLeft,x.y=R.y+a.clientTop}const k=p&&!S&&!f?bh(p,g):$t(0);return{width:s.width*v.x,height:s.height*v.y,x:s.x*v.x-g.scrollLeft*v.x+x.x+k.x,y:s.y*v.y-g.scrollTop*v.y+x.y+k.y}}function Dw(n){return Array.from(n.getClientRects())}function Fw(n){const o=Ht(n),s=ui(n),a=n.ownerDocument.body,u=ft(o.scrollWidth,o.clientWidth,a.scrollWidth,a.clientWidth),f=ft(o.scrollHeight,o.clientHeight,a.scrollHeight,a.clientHeight);let p=-s.scrollLeft+ci(n);const h=-s.scrollTop;return _t(a).direction==="rtl"&&(p+=ft(o.clientWidth,a.clientWidth)-u),{width:u,height:f,x:p,y:h}}const Zf=25;function zw(n,o){const s=pt(n),a=Ht(n),u=s.visualViewport;let f=a.clientWidth,p=a.clientHeight,h=0,g=0;if(u){f=u.width,p=u.height;const x=su();(!x||x&&o==="fixed")&&(h=u.offsetLeft,g=u.offsetTop)}const v=ci(a);if(v<=0){const x=a.ownerDocument,S=x.body,k=getComputedStyle(S),R=x.compatMode==="CSS1Compat"&&parseFloat(k.marginLeft)+parseFloat(k.marginRight)||0,j=Math.abs(a.clientWidth-S.clientWidth-R);j<=Zf&&(f-=j)}else v<=Zf&&(f+=v);return{width:f,height:p,x:h,y:g}}function $w(n,o){const s=Kn(n,!0,o==="fixed"),a=s.top+n.clientTop,u=s.left+n.clientLeft,f=nn(n)?br(n):$t(1),p=n.clientWidth*f.x,h=n.clientHeight*f.y,g=u*f.x,v=a*f.y;return{width:p,height:h,x:g,y:v}}function Jf(n,o,s){let a;if(o==="viewport")a=zw(n,s);else if(o==="document")a=Fw(Ht(n));else if(Ot(o))a=$w(o,s);else{const u=Sh(n);a={x:o.x-u.x,y:o.y-u.y,width:o.width,height:o.height}}return Js(a)}function Ch(n,o){const s=jn(n);return s===o||!Ot(s)||Cr(s)?!1:_t(s).position==="fixed"||Ch(s,o)}function Uw(n,o){const s=o.get(n);if(s)return s;let a=bo(n,[],!1).filter(h=>Ot(h)&&jr(h)!=="body"),u=null;const f=_t(n).position==="fixed";let p=f?jn(n):n;for(;Ot(p)&&!Cr(p);){const h=_t(p),g=ou(p);!g&&h.position==="fixed"&&(u=null),(f?!g&&!u:!g&&h.position==="static"&&!!u&&(u.position==="absolute"||u.position==="fixed")||No(p)&&!g&&Ch(n,p))?a=a.filter(x=>x!==p):u=h,p=jn(p)}return o.set(n,a),a}function Hw(n){let{element:o,boundary:s,rootBoundary:a,strategy:u}=n;const p=[...s==="clippingAncestors"?ai(o)?[]:Uw(o,this._c):[].concat(s),a],h=Jf(o,p[0],u);let g=h.top,v=h.right,x=h.bottom,S=h.left;for(let k=1;k<p.length;k++){const R=Jf(o,p[k],u);g=ft(R.top,g),v=Rn(R.right,v),x=Rn(R.bottom,x),S=ft(R.left,S)}return{width:v-S,height:x-g,x:S,y:g}}function Ww(n){const{width:o,height:s}=wh(n);return{width:o,height:s}}function Bw(n,o,s){const a=nn(o),u=Ht(o),f=s==="fixed",p=Kn(n,!0,f,o);let h={scrollLeft:0,scrollTop:0};const g=$t(0);function v(){g.x=ci(u)}if(a||!a&&!f)if((jr(o)!=="body"||No(u))&&(h=ui(o)),a){const R=Kn(o,!0,f,o);g.x=R.x+o.clientLeft,g.y=R.y+o.clientTop}else u&&v();f&&!a&&u&&v();const x=u&&!a&&!f?bh(u,h):$t(0),S=p.left+h.scrollLeft-g.x-x.x,k=p.top+h.scrollTop-g.y-x.y;return{x:S,y:k,width:p.width,height:p.height}}function wa(n){return _t(n).position==="static"}function ep(n,o){if(!nn(n)||_t(n).position==="fixed")return null;if(o)return o(n);let s=n.offsetParent;return Ht(n)===s&&(s=s.ownerDocument.body),s}function kh(n,o){const s=pt(n);if(ai(n))return s;if(!nn(n)){let u=jn(n);for(;u&&!Cr(u);){if(Ot(u)&&!wa(u))return u;u=jn(u)}return s}let a=ep(n,o);for(;a&&Tw(a)&&wa(a);)a=ep(a,o);return a&&Cr(a)&&wa(a)&&!ou(a)?s:a||Aw(n)||s}const Vw=async function(n){const o=this.getOffsetParent||kh,s=this.getDimensions,a=await s(n.floating);return{reference:Bw(n.reference,await o(n.floating),n.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}};function Qw(n){return _t(n).direction==="rtl"}const Kw={convertOffsetParentRelativeRectToViewportRelativeRect:Lw,getDocumentElement:Ht,getClippingRect:Hw,getOffsetParent:kh,getElementRects:Vw,getClientRects:Dw,getDimensions:Ww,getScale:br,isElement:Ot,isRTL:Qw};function Eh(n,o){return n.x===o.x&&n.y===o.y&&n.width===o.width&&n.height===o.height}function Gw(n,o){let s=null,a;const u=Ht(n);function f(){var h;clearTimeout(a),(h=s)==null||h.disconnect(),s=null}function p(h,g){h===void 0&&(h=!1),g===void 0&&(g=1),f();const v=n.getBoundingClientRect(),{left:x,top:S,width:k,height:R}=v;if(h||o(),!k||!R)return;const j=Hs(S),E=Hs(u.clientWidth-(x+k)),b=Hs(u.clientHeight-(S+R)),I=Hs(x),D={rootMargin:-j+"px "+-E+"px "+-b+"px "+-I+"px",threshold:ft(0,Rn(1,g))||1};let F=!0;function V(A){const B=A[0].intersectionRatio;if(B!==g){if(!F)return p();B?p(!1,B):a=setTimeout(()=>{p(!1,1e-7)},1e3)}B===1&&!Eh(v,n.getBoundingClientRect())&&p(),F=!1}try{s=new IntersectionObserver(V,{...D,root:u.ownerDocument})}catch{s=new IntersectionObserver(V,D)}s.observe(n)}return p(!0),f}function qw(n,o,s,a){a===void 0&&(a={});const{ancestorScroll:u=!0,ancestorResize:f=!0,elementResize:p=typeof ResizeObserver=="function",layoutShift:h=typeof IntersectionObserver=="function",animationFrame:g=!1}=a,v=iu(n),x=u||f?[...v?bo(v):[],...o?bo(o):[]]:[];x.forEach(I=>{u&&I.addEventListener("scroll",s,{passive:!0}),f&&I.addEventListener("resize",s)});const S=v&&h?Gw(v,s):null;let k=-1,R=null;p&&(R=new ResizeObserver(I=>{let[M]=I;M&&M.target===v&&R&&o&&(R.unobserve(o),cancelAnimationFrame(k),k=requestAnimationFrame(()=>{var D;(D=R)==null||D.observe(o)})),s()}),v&&!g&&R.observe(v),o&&R.observe(o));let j,E=g?Kn(n):null;g&&b();function b(){const I=Kn(n);E&&!Eh(E,I)&&s(),E=I,j=requestAnimationFrame(b)}return s(),()=>{var I;x.forEach(M=>{u&&M.removeEventListener("scroll",s),f&&M.removeEventListener("resize",s)}),S?.(),(I=R)==null||I.disconnect(),R=null,g&&cancelAnimationFrame(j)}}const Yw=Pw,Xw=Nw,Zw=Cw,Jw=jw,e0=kw,tp=bw,t0=Rw,n0=(n,o,s)=>{const a=new Map,u={platform:Kw,...s},f={...u.platform,_c:a};return Sw(n,o,{...u,platform:f})};var r0=typeof document<"u",o0=function(){},Qs=r0?y.useLayoutEffect:o0;function ei(n,o){if(n===o)return!0;if(typeof n!=typeof o)return!1;if(typeof n=="function"&&n.toString()===o.toString())return!0;let s,a,u;if(n&&o&&typeof n=="object"){if(Array.isArray(n)){if(s=n.length,s!==o.length)return!1;for(a=s;a--!==0;)if(!ei(n[a],o[a]))return!1;return!0}if(u=Object.keys(n),s=u.length,s!==Object.keys(o).length)return!1;for(a=s;a--!==0;)if(!{}.hasOwnProperty.call(o,u[a]))return!1;for(a=s;a--!==0;){const f=u[a];if(!(f==="_owner"&&n.$$typeof)&&!ei(n[f],o[f]))return!1}return!0}return n!==n&&o!==o}function Ph(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function np(n,o){const s=Ph(n);return Math.round(o*s)/s}function Sa(n){const o=y.useRef(n);return Qs(()=>{o.current=n}),o}function s0(n){n===void 0&&(n={});const{placement:o="bottom",strategy:s="absolute",middleware:a=[],platform:u,elements:{reference:f,floating:p}={},transform:h=!0,whileElementsMounted:g,open:v}=n,[x,S]=y.useState({x:0,y:0,strategy:s,placement:o,middlewareData:{},isPositioned:!1}),[k,R]=y.useState(a);ei(k,a)||R(a);const[j,E]=y.useState(null),[b,I]=y.useState(null),M=y.useCallback(L=>{L!==A.current&&(A.current=L,E(L))},[]),D=y.useCallback(L=>{L!==B.current&&(B.current=L,I(L))},[]),F=f||j,V=p||b,A=y.useRef(null),B=y.useRef(null),te=y.useRef(x),ce=g!=null,le=Sa(g),pe=Sa(u),J=Sa(v),ue=y.useCallback(()=>{if(!A.current||!B.current)return;const L={placement:o,strategy:s,middleware:k};pe.current&&(L.platform=pe.current),n0(A.current,B.current,L).then(K=>{const Q={...K,isPositioned:J.current!==!1};G.current&&!ei(te.current,Q)&&(te.current=Q,ri.flushSync(()=>{S(Q)}))})},[k,o,s,pe,J]);Qs(()=>{v===!1&&te.current.isPositioned&&(te.current.isPositioned=!1,S(L=>({...L,isPositioned:!1})))},[v]);const G=y.useRef(!1);Qs(()=>(G.current=!0,()=>{G.current=!1}),[]),Qs(()=>{if(F&&(A.current=F),V&&(B.current=V),F&&V){if(le.current)return le.current(F,V,ue);ue()}},[F,V,ue,le,ce]);const me=y.useMemo(()=>({reference:A,floating:B,setReference:M,setFloating:D}),[M,D]),se=y.useMemo(()=>({reference:F,floating:V}),[F,V]),oe=y.useMemo(()=>{const L={position:s,left:0,top:0};if(!se.floating)return L;const K=np(se.floating,x.x),Q=np(se.floating,x.y);return h?{...L,transform:"translate("+K+"px, "+Q+"px)",...Ph(se.floating)>=1.5&&{willChange:"transform"}}:{position:s,left:K,top:Q}},[s,h,se.floating,x.x,x.y]);return y.useMemo(()=>({...x,update:ue,refs:me,elements:se,floatingStyles:oe}),[x,ue,me,se,oe])}const i0=n=>{function o(s){return{}.hasOwnProperty.call(s,"current")}return{name:"arrow",options:n,fn(s){const{element:a,padding:u}=typeof n=="function"?n(s):n;return a&&o(a)?a.current!=null?tp({element:a.current,padding:u}).fn(s):{}:a?tp({element:a,padding:u}).fn(s):{}}}},l0=(n,o)=>{const s=Yw(n);return{name:s.name,fn:s.fn,options:[n,o]}},a0=(n,o)=>{const s=Xw(n);return{name:s.name,fn:s.fn,options:[n,o]}},u0=(n,o)=>({fn:t0(n).fn,options:[n,o]}),c0=(n,o)=>{const s=Zw(n);return{name:s.name,fn:s.fn,options:[n,o]}},d0=(n,o)=>{const s=Jw(n);return{name:s.name,fn:s.fn,options:[n,o]}},f0=(n,o)=>{const s=e0(n);return{name:s.name,fn:s.fn,options:[n,o]}},p0=(n,o)=>{const s=i0(n);return{name:s.name,fn:s.fn,options:[n,o]}};var h0="Arrow",Nh=y.forwardRef((n,o)=>{const{children:s,width:a=10,height:u=5,...f}=n;return d.jsx(Qe.svg,{...f,ref:o,width:a,height:u,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:n.asChild?s:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});Nh.displayName=h0;var m0=Nh;function g0(n){const[o,s]=y.useState(void 0);return Ut(()=>{if(n){s({width:n.offsetWidth,height:n.offsetHeight});const a=new ResizeObserver(u=>{if(!Array.isArray(u)||!u.length)return;const f=u[0];let p,h;if("borderBoxSize"in f){const g=f.borderBoxSize,v=Array.isArray(g)?g[0]:g;p=v.inlineSize,h=v.blockSize}else p=n.offsetWidth,h=n.offsetHeight;s({width:p,height:h})});return a.observe(n,{box:"border-box"}),()=>a.unobserve(n)}else s(void 0)},[n]),o}var lu="Popper",[Rh,jh]=Eo(lu),[v0,Th]=Rh(lu),Oh=n=>{const{__scopePopper:o,children:s}=n,[a,u]=y.useState(null);return d.jsx(v0,{scope:o,anchor:a,onAnchorChange:u,children:s})};Oh.displayName=lu;var _h="PopperAnchor",Ah=y.forwardRef((n,o)=>{const{__scopePopper:s,virtualRef:a,...u}=n,f=Th(_h,s),p=y.useRef(null),h=bt(o,p),g=y.useRef(null);return y.useEffect(()=>{const v=g.current;g.current=a?.current||p.current,v!==g.current&&f.onAnchorChange(g.current)}),a?null:d.jsx(Qe.div,{...u,ref:h})});Ah.displayName=_h;var au="PopperContent",[y0,x0]=Rh(au),Ih=y.forwardRef((n,o)=>{const{__scopePopper:s,side:a="bottom",sideOffset:u=0,align:f="center",alignOffset:p=0,arrowPadding:h=0,avoidCollisions:g=!0,collisionBoundary:v=[],collisionPadding:x=0,sticky:S="partial",hideWhenDetached:k=!1,updatePositionStrategy:R="optimized",onPlaced:j,...E}=n,b=Th(au,s),[I,M]=y.useState(null),D=bt(o,xe=>M(xe)),[F,V]=y.useState(null),A=g0(F),B=A?.width??0,te=A?.height??0,ce=a+(f!=="center"?"-"+f:""),le=typeof x=="number"?x:{top:0,right:0,bottom:0,left:0,...x},pe=Array.isArray(v)?v:[v],J=pe.length>0,ue={padding:le,boundary:pe.filter(S0),altBoundary:J},{refs:G,floatingStyles:me,placement:se,isPositioned:oe,middlewareData:L}=s0({strategy:"fixed",placement:ce,whileElementsMounted:(...xe)=>qw(...xe,{animationFrame:R==="always"}),elements:{reference:b.anchor},middleware:[l0({mainAxis:u+te,alignmentAxis:p}),g&&a0({mainAxis:!0,crossAxis:!1,limiter:S==="partial"?u0():void 0,...ue}),g&&c0({...ue}),d0({...ue,apply:({elements:xe,rects:we,availableWidth:Ce,availableHeight:Ze})=>{const{width:Gn,height:Ro}=we.reference,Wt=xe.floating.style;Wt.setProperty("--radix-popper-available-width",`${Ce}px`),Wt.setProperty("--radix-popper-available-height",`${Ze}px`),Wt.setProperty("--radix-popper-anchor-width",`${Gn}px`),Wt.setProperty("--radix-popper-anchor-height",`${Ro}px`)}}),F&&p0({element:F,padding:h}),b0({arrowWidth:B,arrowHeight:te}),k&&f0({strategy:"referenceHidden",...ue})]}),[K,Q]=Dh(se),N=Nn(j);Ut(()=>{oe&&N?.()},[oe,N]);const z=L.arrow?.x,ae=L.arrow?.y,de=L.arrow?.centerOffset!==0,[ge,ve]=y.useState();return Ut(()=>{I&&ve(window.getComputedStyle(I).zIndex)},[I]),d.jsx("div",{ref:G.setFloating,"data-radix-popper-content-wrapper":"",style:{...me,transform:oe?me.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ge,"--radix-popper-transform-origin":[L.transformOrigin?.x,L.transformOrigin?.y].join(" "),...L.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:n.dir,children:d.jsx(y0,{scope:s,placedSide:K,onArrowChange:V,arrowX:z,arrowY:ae,shouldHideArrow:de,children:d.jsx(Qe.div,{"data-side":K,"data-align":Q,...E,ref:D,style:{...E.style,animation:oe?void 0:"none"}})})})});Ih.displayName=au;var Mh="PopperArrow",w0={top:"bottom",right:"left",bottom:"top",left:"right"},Lh=y.forwardRef(function(o,s){const{__scopePopper:a,...u}=o,f=x0(Mh,a),p=w0[f.placedSide];return d.jsx("span",{ref:f.onArrowChange,style:{position:"absolute",left:f.arrowX,top:f.arrowY,[p]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[f.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[f.placedSide],visibility:f.shouldHideArrow?"hidden":void 0},children:d.jsx(m0,{...u,ref:s,style:{...u.style,display:"block"}})})});Lh.displayName=Mh;function S0(n){return n!==null}var b0=n=>({name:"transformOrigin",options:n,fn(o){const{placement:s,rects:a,middlewareData:u}=o,p=u.arrow?.centerOffset!==0,h=p?0:n.arrowWidth,g=p?0:n.arrowHeight,[v,x]=Dh(s),S={start:"0%",center:"50%",end:"100%"}[x],k=(u.arrow?.x??0)+h/2,R=(u.arrow?.y??0)+g/2;let j="",E="";return v==="bottom"?(j=p?S:`${k}px`,E=`${-g}px`):v==="top"?(j=p?S:`${k}px`,E=`${a.floating.height+g}px`):v==="right"?(j=`${-g}px`,E=p?S:`${R}px`):v==="left"&&(j=`${a.floating.width+g}px`,E=p?S:`${R}px`),{data:{x:j,y:E}}}});function Dh(n){const[o,s="center"]=n.split("-");return[o,s]}var C0=Oh,k0=Ah,E0=Ih,P0=Lh,N0=Symbol("radix.slottable");function R0(n){const o=({children:s})=>d.jsx(d.Fragment,{children:s});return o.displayName=`${n}.Slottable`,o.__radixId=N0,o}var[di]=Eo("Tooltip",[jh]),fi=jh(),Fh="TooltipProvider",j0=700,Da="tooltip.open",[T0,uu]=di(Fh),zh=n=>{const{__scopeTooltip:o,delayDuration:s=j0,skipDelayDuration:a=300,disableHoverableContent:u=!1,children:f}=n,p=y.useRef(!0),h=y.useRef(!1),g=y.useRef(0);return y.useEffect(()=>{const v=g.current;return()=>window.clearTimeout(v)},[]),d.jsx(T0,{scope:o,isOpenDelayedRef:p,delayDuration:s,onOpen:y.useCallback(()=>{window.clearTimeout(g.current),p.current=!1},[]),onClose:y.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>p.current=!0,a)},[a]),isPointerInTransitRef:h,onPointerInTransitChange:y.useCallback(v=>{h.current=v},[]),disableHoverableContent:u,children:f})};zh.displayName=Fh;var Co="Tooltip",[O0,pi]=di(Co),$h=n=>{const{__scopeTooltip:o,children:s,open:a,defaultOpen:u,onOpenChange:f,disableHoverableContent:p,delayDuration:h}=n,g=uu(Co,n.__scopeTooltip),v=fi(o),[x,S]=y.useState(null),k=mh(),R=y.useRef(0),j=p??g.disableHoverableContent,E=h??g.delayDuration,b=y.useRef(!1),[I,M]=Ya({prop:a,defaultProp:u??!1,onChange:B=>{B?(g.onOpen(),document.dispatchEvent(new CustomEvent(Da))):g.onClose(),f?.(B)},caller:Co}),D=y.useMemo(()=>I?b.current?"delayed-open":"instant-open":"closed",[I]),F=y.useCallback(()=>{window.clearTimeout(R.current),R.current=0,b.current=!1,M(!0)},[M]),V=y.useCallback(()=>{window.clearTimeout(R.current),R.current=0,M(!1)},[M]),A=y.useCallback(()=>{window.clearTimeout(R.current),R.current=window.setTimeout(()=>{b.current=!0,M(!0),R.current=0},E)},[E,M]);return y.useEffect(()=>()=>{R.current&&(window.clearTimeout(R.current),R.current=0)},[]),d.jsx(C0,{...v,children:d.jsx(O0,{scope:o,contentId:k,open:I,stateAttribute:D,trigger:x,onTriggerChange:S,onTriggerEnter:y.useCallback(()=>{g.isOpenDelayedRef.current?A():F()},[g.isOpenDelayedRef,A,F]),onTriggerLeave:y.useCallback(()=>{j?V():(window.clearTimeout(R.current),R.current=0)},[V,j]),onOpen:F,onClose:V,disableHoverableContent:j,children:s})})};$h.displayName=Co;var Fa="TooltipTrigger",Uh=y.forwardRef((n,o)=>{const{__scopeTooltip:s,...a}=n,u=pi(Fa,s),f=uu(Fa,s),p=fi(s),h=y.useRef(null),g=bt(o,h,u.onTriggerChange),v=y.useRef(!1),x=y.useRef(!1),S=y.useCallback(()=>v.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",S),[S]),d.jsx(k0,{asChild:!0,...p,children:d.jsx(Qe.button,{"aria-describedby":u.open?u.contentId:void 0,"data-state":u.stateAttribute,...a,ref:g,onPointerMove:Me(n.onPointerMove,k=>{k.pointerType!=="touch"&&!x.current&&!f.isPointerInTransitRef.current&&(u.onTriggerEnter(),x.current=!0)}),onPointerLeave:Me(n.onPointerLeave,()=>{u.onTriggerLeave(),x.current=!1}),onPointerDown:Me(n.onPointerDown,()=>{u.open&&u.onClose(),v.current=!0,document.addEventListener("pointerup",S,{once:!0})}),onFocus:Me(n.onFocus,()=>{v.current||u.onOpen()}),onBlur:Me(n.onBlur,u.onClose),onClick:Me(n.onClick,u.onClose)})})});Uh.displayName=Fa;var _0="TooltipPortal",[F1,A0]=di(_0,{forceMount:void 0}),kr="TooltipContent",Hh=y.forwardRef((n,o)=>{const s=A0(kr,n.__scopeTooltip),{forceMount:a=s.forceMount,side:u="top",...f}=n,p=pi(kr,n.__scopeTooltip);return d.jsx(oi,{present:a||p.open,children:p.disableHoverableContent?d.jsx(Wh,{side:u,...f,ref:o}):d.jsx(I0,{side:u,...f,ref:o})})}),I0=y.forwardRef((n,o)=>{const s=pi(kr,n.__scopeTooltip),a=uu(kr,n.__scopeTooltip),u=y.useRef(null),f=bt(o,u),[p,h]=y.useState(null),{trigger:g,onClose:v}=s,x=u.current,{onPointerInTransitChange:S}=a,k=y.useCallback(()=>{h(null),S(!1)},[S]),R=y.useCallback((j,E)=>{const b=j.currentTarget,I={x:j.clientX,y:j.clientY},M=z0(I,b.getBoundingClientRect()),D=$0(I,M),F=U0(E.getBoundingClientRect()),V=W0([...D,...F]);h(V),S(!0)},[S]);return y.useEffect(()=>()=>k(),[k]),y.useEffect(()=>{if(g&&x){const j=b=>R(b,x),E=b=>R(b,g);return g.addEventListener("pointerleave",j),x.addEventListener("pointerleave",E),()=>{g.removeEventListener("pointerleave",j),x.removeEventListener("pointerleave",E)}}},[g,x,R,k]),y.useEffect(()=>{if(p){const j=E=>{const b=E.target,I={x:E.clientX,y:E.clientY},M=g?.contains(b)||x?.contains(b),D=!H0(I,p);M?k():D&&(k(),v())};return document.addEventListener("pointermove",j),()=>document.removeEventListener("pointermove",j)}},[g,x,p,v,k]),d.jsx(Wh,{...n,ref:f})}),[M0,L0]=di(Co,{isInside:!1}),D0=R0("TooltipContent"),Wh=y.forwardRef((n,o)=>{const{__scopeTooltip:s,children:a,"aria-label":u,onEscapeKeyDown:f,onPointerDownOutside:p,...h}=n,g=pi(kr,s),v=fi(s),{onClose:x}=g;return y.useEffect(()=>(document.addEventListener(Da,x),()=>document.removeEventListener(Da,x)),[x]),y.useEffect(()=>{if(g.trigger){const S=k=>{k.target?.contains(g.trigger)&&x()};return window.addEventListener("scroll",S,{capture:!0}),()=>window.removeEventListener("scroll",S,{capture:!0})}},[g.trigger,x]),d.jsx(qa,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:f,onPointerDownOutside:p,onFocusOutside:S=>S.preventDefault(),onDismiss:x,children:d.jsxs(E0,{"data-state":g.stateAttribute,...v,...h,ref:o,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:[d.jsx(D0,{children:a}),d.jsx(M0,{scope:s,isInside:!0,children:d.jsx(tx,{id:g.contentId,role:"tooltip",children:u||a})})]})})});Hh.displayName=kr;var Bh="TooltipArrow",F0=y.forwardRef((n,o)=>{const{__scopeTooltip:s,...a}=n,u=fi(s);return L0(Bh,s).isInside?null:d.jsx(P0,{...u,...a,ref:o})});F0.displayName=Bh;function z0(n,o){const s=Math.abs(o.top-n.y),a=Math.abs(o.bottom-n.y),u=Math.abs(o.right-n.x),f=Math.abs(o.left-n.x);switch(Math.min(s,a,u,f)){case f:return"left";case u:return"right";case s:return"top";case a:return"bottom";default:throw new Error("unreachable")}}function $0(n,o,s=5){const a=[];switch(o){case"top":a.push({x:n.x-s,y:n.y+s},{x:n.x+s,y:n.y+s});break;case"bottom":a.push({x:n.x-s,y:n.y-s},{x:n.x+s,y:n.y-s});break;case"left":a.push({x:n.x+s,y:n.y-s},{x:n.x+s,y:n.y+s});break;case"right":a.push({x:n.x-s,y:n.y-s},{x:n.x-s,y:n.y+s});break}return a}function U0(n){const{top:o,right:s,bottom:a,left:u}=n;return[{x:u,y:o},{x:s,y:o},{x:s,y:a},{x:u,y:a}]}function H0(n,o){const{x:s,y:a}=n;let u=!1;for(let f=0,p=o.length-1;f<o.length;p=f++){const h=o[f],g=o[p],v=h.x,x=h.y,S=g.x,k=g.y;x>a!=k>a&&s<(S-v)*(a-x)/(k-x)+v&&(u=!u)}return u}function W0(n){const o=n.slice();return o.sort((s,a)=>s.x<a.x?-1:s.x>a.x?1:s.y<a.y?-1:s.y>a.y?1:0),B0(o)}function B0(n){if(n.length<=1)return n.slice();const o=[];for(let a=0;a<n.length;a++){const u=n[a];for(;o.length>=2;){const f=o[o.length-1],p=o[o.length-2];if((f.x-p.x)*(u.y-p.y)>=(f.y-p.y)*(u.x-p.x))o.pop();else break}o.push(u)}o.pop();const s=[];for(let a=n.length-1;a>=0;a--){const u=n[a];for(;s.length>=2;){const f=s[s.length-1],p=s[s.length-2];if((f.x-p.x)*(u.y-p.y)>=(f.y-p.y)*(u.x-p.x))s.pop();else break}s.push(u)}return s.pop(),o.length===1&&s.length===1&&o[0].x===s[0].x&&o[0].y===s[0].y?o:o.concat(s)}var V0=zh,Q0=$h,K0=Uh,Vh=Hh;const G0=V0,q0=Q0,Y0=K0,Qh=y.forwardRef(({className:n,sideOffset:o=4,...s},a)=>d.jsx(Vh,{ref:a,sideOffset:o,className:ht("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]",n),...s}));Qh.displayName=Vh.displayName;var hi="Collapsible",[X0]=Eo(hi),[Z0,cu]=X0(hi),Kh=y.forwardRef((n,o)=>{const{__scopeCollapsible:s,open:a,defaultOpen:u,disabled:f,onOpenChange:p,...h}=n,[g,v]=Ya({prop:a,defaultProp:u??!1,onChange:p,caller:hi});return d.jsx(Z0,{scope:s,disabled:f,contentId:mh(),open:g,onOpenToggle:y.useCallback(()=>v(x=>!x),[v]),children:d.jsx(Qe.div,{"data-state":fu(g),"data-disabled":f?"":void 0,...h,ref:o})})});Kh.displayName=hi;var Gh="CollapsibleTrigger",qh=y.forwardRef((n,o)=>{const{__scopeCollapsible:s,...a}=n,u=cu(Gh,s);return d.jsx(Qe.button,{type:"button","aria-controls":u.contentId,"aria-expanded":u.open||!1,"data-state":fu(u.open),"data-disabled":u.disabled?"":void 0,disabled:u.disabled,...a,ref:o,onClick:Me(n.onClick,u.onOpenToggle)})});qh.displayName=Gh;var du="CollapsibleContent",Yh=y.forwardRef((n,o)=>{const{forceMount:s,...a}=n,u=cu(du,n.__scopeCollapsible);return d.jsx(oi,{present:s||u.open,children:({present:f})=>d.jsx(J0,{...a,ref:o,present:f})})});Yh.displayName=du;var J0=y.forwardRef((n,o)=>{const{__scopeCollapsible:s,present:a,children:u,...f}=n,p=cu(du,s),[h,g]=y.useState(a),v=y.useRef(null),x=bt(o,v),S=y.useRef(0),k=S.current,R=y.useRef(0),j=R.current,E=p.open||h,b=y.useRef(E),I=y.useRef(void 0);return y.useEffect(()=>{const M=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(M)},[]),Ut(()=>{const M=v.current;if(M){I.current=I.current||{transitionDuration:M.style.transitionDuration,animationName:M.style.animationName},M.style.transitionDuration="0s",M.style.animationName="none";const D=M.getBoundingClientRect();S.current=D.height,R.current=D.width,b.current||(M.style.transitionDuration=I.current.transitionDuration,M.style.animationName=I.current.animationName),g(a)}},[p.open,a]),d.jsx(Qe.div,{"data-state":fu(p.open),"data-disabled":p.disabled?"":void 0,id:p.contentId,hidden:!E,...f,ref:x,style:{"--radix-collapsible-content-height":k?`${k}px`:void 0,"--radix-collapsible-content-width":j?`${j}px`:void 0,...n.style},children:E&&u})});function fu(n){return n?"open":"closed"}var e1=Kh,t1=qh,n1=Yh;function r1(n){const o=n.split("/");if(o.length!==2||!o[0]||!o[1])return`https://github.com/${n}`;const[s,a]=o;return`https://github.com/${encodeURIComponent(s)}/${encodeURIComponent(a)}`}const o1=`name: Claude Code Review
9
-
10
- on:
11
- pull_request:
12
- types: [opened, synchronize, reopened]
13
-
14
- jobs:
15
- code-review:
16
- if: github.actor != 'dependabot[bot]'
17
- runs-on: ubuntu-latest
18
- permissions:
19
- contents: read
20
- pull-requests: write
21
- steps:
22
- - uses: actions/checkout@v4
23
- with:
24
- fetch-depth: 0
25
-
26
- - uses: anthropics/claude-code-action@v1
27
- with:
28
- anthropic_api_key: \${{ secrets.ANTHROPIC_API_KEY }}
29
- prompt: "Review this pull request for code quality, correctness, and security. Post your findings as review comments."
30
- `,s1=`name: Codex Code Review
31
-
32
- on:
33
- pull_request:
34
- types: [opened, synchronize, reopened]
35
-
36
- jobs:
37
- code-review:
38
- if: github.actor != 'dependabot[bot]'
39
- runs-on: ubuntu-latest
40
- permissions:
41
- contents: read
42
- pull-requests: write
43
- steps:
44
- - uses: actions/checkout@v4
45
- with:
46
- fetch-depth: 0
47
-
48
- - uses: openai/codex-action@v1
49
- with:
50
- openai-api-key: \${{ secrets.OPENAI_API_KEY }}
51
- prompt: |
52
- Review this pull request. Focus on:
53
- - Code correctness and potential bugs
54
- - Security issues
55
- - Performance concerns
56
- - Code style and readability
57
- Post your review as GitHub PR review comments.
58
- `;function i1({text:n}){const[o,s]=y.useState(!1),a=async()=>{await navigator.clipboard.writeText(n),s(!0),setTimeout(()=>s(!1),2e3)};return d.jsx("button",{onClick:a,className:"shrink-0 border border-border px-2 py-0.5 text-[10px] uppercase tracking-wider transition-colors hover:bg-foreground hover:text-background",children:o?"copied":"copy"})}function rp({code:n}){return d.jsxs("div",{className:"relative mt-1",children:[d.jsxs("div",{className:"flex items-center justify-between border border-border bg-muted/30 px-2 py-1",children:[d.jsx("span",{className:"text-[10px] uppercase tracking-wider text-muted-foreground",children:"yaml"}),d.jsx(i1,{text:n})]}),d.jsx("pre",{className:"overflow-x-auto border border-t-0 border-border bg-muted/10 p-3 text-[11px] leading-relaxed",children:d.jsx("code",{children:n})})]})}function Xe({children:n}){return d.jsx("code",{className:"rounded border border-border bg-muted/30 px-1 py-0.5 text-[11px] font-mono",children:n})}function Be({number:n,children:o}){return d.jsxs("div",{className:"flex gap-2.5",children:[d.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:n}),d.jsx("div",{className:"flex-1 text-[12px] leading-relaxed",children:o})]})}function l1(){const[n,o]=y.useState(!1);return d.jsxs("div",{className:"space-y-3",children:[d.jsx("p",{className:"text-[12px] text-muted-foreground",children:"Code Factory needs a GitHub token to read repositories and sync PR feedback. Choose one of these options:"}),d.jsxs("div",{className:"space-y-2",children:[d.jsxs("div",{className:"border border-border p-3 space-y-2",children:[d.jsx("div",{className:"text-[11px] font-medium uppercase tracking-wider",children:"Option A — GitHub CLI (recommended)"}),d.jsxs(Be,{number:1,children:["Install the GitHub CLI from"," ",d.jsx("a",{href:"https://cli.github.com",target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2",children:"cli.github.com"})]}),d.jsxs(Be,{number:2,children:["Run ",d.jsx(Xe,{children:"gh auth login"})," and follow the prompts to authenticate."]}),d.jsxs(Be,{number:3,children:["Restart Code Factory — it will automatically detect your token via ",d.jsx(Xe,{children:"gh auth token"}),"."]})]}),d.jsxs("div",{className:"border border-border p-3 space-y-2",children:[d.jsx("div",{className:"text-[11px] font-medium uppercase tracking-wider",children:"Option B — Environment variable"}),d.jsxs(Be,{number:1,children:["Create a Personal Access Token at"," ",d.jsx("a",{href:"https://github.com/settings/tokens",target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2",children:"github.com/settings/tokens"})," ","with ",d.jsx(Xe,{children:"repo"})," and ",d.jsx(Xe,{children:"read:user"})," scopes."]}),d.jsxs(Be,{number:2,children:["Set it before starting the app: ",d.jsx(Xe,{children:"export GITHUB_TOKEN=ghp_your_token"})]})]}),d.jsxs("div",{className:"border border-border p-3 space-y-2",children:[d.jsxs("button",{onClick:()=>o(!n),className:"flex w-full items-center justify-between text-[11px] font-medium uppercase tracking-wider",children:[d.jsx("span",{children:"Option C — Enter token in settings"}),d.jsx("span",{className:"text-muted-foreground",children:n?"▲":"▼"})]}),n&&d.jsxs("div",{className:"space-y-2 pt-1",children:[d.jsxs(Be,{number:1,children:["Create a"," ",d.jsx("a",{href:"https://github.com/settings/tokens",target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2",children:"Personal Access Token"})," ","with ",d.jsx(Xe,{children:"repo"})," and ",d.jsx(Xe,{children:"read:user"})," scopes."]}),d.jsxs(Be,{number:2,children:["Paste it via the API: ",d.jsx(Xe,{children:`curl -X PATCH http://localhost:5001/api/config -H 'Content-Type: application/json' -d '{"githubToken":"ghp_your_token"}'`})]})]})]})]})]})}function a1({repo:n,tool:o,onInstalled:s}){const a=Ft({mutationFn:async()=>{const u=await Tt("POST","/api/onboarding/install-review",{repo:n,tool:o});if(!u.ok){const f=await u.json().catch(()=>({}));throw new Error(f.error??"Installation failed")}return u.json()},onSuccess:u=>{s(u.url),Ve.invalidateQueries({queryKey:["/api/onboarding/status"]})}});return d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("button",{onClick:()=>a.mutate(),disabled:a.isPending,className:"border border-foreground bg-foreground px-3 py-1 text-[11px] uppercase tracking-wider text-background transition-colors hover:bg-foreground/80 disabled:opacity-50",children:a.isPending?"Installing…":"Install workflow"}),a.isError&&d.jsx("span",{className:"text-[11px] text-destructive",children:a.error instanceof Error?a.error.message:"Failed"})]})}function u1({tool:n,repo:o}){const[s,a]=y.useState(!1),[u,f]=y.useState(null),p={claude:"Claude Code Review",codex:"Codex Code Review",gemini:"Gemini Code Review"},h={claude:"Anthropic's Claude reviews PRs and posts inline comments via GitHub Actions.",codex:"OpenAI's Codex reviews PRs and posts inline comments via GitHub Actions.",gemini:"Google's Gemini reviews PRs automatically as a GitHub App — no workflow file needed."};return d.jsxs("div",{className:"border border-border",children:[d.jsxs("div",{className:"flex items-center justify-between px-3 py-2",children:[d.jsxs("button",{onClick:()=>a(!s),className:"flex flex-1 items-center gap-2 text-left transition-colors hover:opacity-70",children:[d.jsx("span",{className:"text-[11px] font-medium",children:p[n]}),u?d.jsx("span",{className:"border border-green-600 px-1 py-0 text-[10px] uppercase tracking-wider text-green-500",children:"installed"}):d.jsx("span",{className:"border border-border px-1 py-0 text-[10px] uppercase tracking-wider text-muted-foreground",children:"not installed"}),d.jsx("span",{className:"text-[10px] text-muted-foreground",children:s?"▲":"▼"})]}),(n==="claude"||n==="codex")&&!u&&d.jsx(a1,{repo:o,tool:n,onInstalled:g=>f(g)}),u&&d.jsx("a",{href:u,target:"_blank",rel:"noopener noreferrer",className:"text-[11px] text-green-500 underline underline-offset-2",children:"View →"})]}),s&&d.jsxs("div",{className:"border-t border-border px-3 py-3 space-y-3",children:[d.jsx("p",{className:"text-[12px] text-muted-foreground",children:h[n]}),n==="claude"&&d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{className:"border border-amber-500/30 bg-amber-500/5 p-2 text-[11px] text-muted-foreground",children:["The ",d.jsx("strong",{children:"Install workflow"})," button above creates the file in your repo automatically. You still need to complete steps 1–2 below for the action to authenticate."]}),d.jsxs(Be,{number:1,children:["Install the"," ",d.jsx("a",{href:"https://github.com/apps/claude",target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2",children:"Claude GitHub App"})," ","to your repository. (Or run ",d.jsx(Xe,{children:"/install-github-app"})," inside Claude Code.)"]}),d.jsxs(Be,{number:2,children:["Add your Anthropic API key as a repository secret named ",d.jsx(Xe,{children:"ANTHROPIC_API_KEY"})," in"," ",d.jsxs("a",{href:`https://github.com/${o}/settings/secrets/actions`,target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2",children:[o," › Settings › Secrets"]}),"."]}),d.jsxs(Be,{number:3,children:["The workflow file will be created automatically when you click ",d.jsx("strong",{children:"Install workflow"}),". Or add it manually:",d.jsx(rp,{code:o1})]}),d.jsxs("p",{className:"text-[11px] text-muted-foreground",children:["Docs:"," ",d.jsx("a",{href:"https://github.com/anthropics/claude-code-action",target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2",children:"anthropics/claude-code-action"})," ","·"," ",d.jsx("a",{href:"https://github.com/marketplace/actions/claude-code-action-official",target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2",children:"GitHub Marketplace"})]})]}),n==="codex"&&d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{className:"border border-amber-500/30 bg-amber-500/5 p-2 text-[11px] text-muted-foreground",children:["The ",d.jsx("strong",{children:"Install workflow"})," button above creates the file in your repo automatically. You still need to add the secret in step 1 below."]}),d.jsxs(Be,{number:1,children:["Add your OpenAI API key as a repository secret named ",d.jsx(Xe,{children:"OPENAI_API_KEY"})," in"," ",d.jsxs("a",{href:`https://github.com/${o}/settings/secrets/actions`,target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2",children:[o," › Settings › Secrets"]}),"."]}),d.jsxs(Be,{number:2,children:["The workflow file will be created automatically when you click ",d.jsx("strong",{children:"Install workflow"}),". Or add it manually:",d.jsx(rp,{code:s1})]}),d.jsxs(Be,{number:3,children:[d.jsx("strong",{children:"Optional:"})," For automatic reviews on every PR without a workflow, enable"," ",d.jsx("a",{href:"https://developers.openai.com/codex/cloud/code-review",target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2",children:"Codex Cloud Code Review"})," ","in your Codex settings and turn on Automatic reviews. Then tag ",d.jsx(Xe,{children:"@codex review"})," in any PR comment."]}),d.jsxs("p",{className:"text-[11px] text-muted-foreground",children:["Docs:"," ",d.jsx("a",{href:"https://github.com/openai/codex-action",target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2",children:"openai/codex-action"})," ","·"," ",d.jsx("a",{href:"https://developers.openai.com/codex/github-action",target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2",children:"OpenAI Docs"})]})]}),n==="gemini"&&d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{className:"border border-border p-2 text-[11px] text-muted-foreground",children:[d.jsx("strong",{children:"Note:"})," Gemini Code Assist is a GitHub App installed via the marketplace — it cannot be installed by pushing a workflow file."]}),d.jsxs(Be,{number:1,children:["Go to the"," ",d.jsx("a",{href:"https://github.com/marketplace/gemini-code-assist",target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2",children:"Gemini Code Assist GitHub Marketplace page"})," ","and click ",d.jsx("strong",{children:"Install"}),"."]}),d.jsxs(Be,{number:2,children:["Select your organization and the repositories you want to enable, including ",d.jsx(Xe,{children:o}),"."]}),d.jsx(Be,{number:3,children:"Accept the Google Terms of Service and complete setup. Gemini will automatically review new PRs within minutes."}),d.jsxs(Be,{number:4,children:[d.jsx("strong",{children:"Optional:"})," Customize behavior by adding a ",d.jsx(Xe,{children:".gemini/config.yaml"})," or a code review style guide to your repo."]}),d.jsxs("p",{className:"text-[11px] text-muted-foreground",children:[d.jsx("strong",{children:"Alternative — Gemini CLI GitHub Action (beta, no-cost):"})," Download"," ",d.jsx("a",{href:"https://github.com/google-github-actions/run-gemini-cli",target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2",children:"Gemini CLI ≥0.1.18"}),", run ",d.jsx(Xe,{children:"gemini /setup-github"}),", and copy the generated workflows into ",d.jsx(Xe,{children:".github/workflows/"}),"."]}),d.jsxs("p",{className:"text-[11px] text-muted-foreground",children:["Docs:"," ",d.jsx("a",{href:"https://developers.google.com/gemini-code-assist/docs/set-up-code-assist-github",target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2",children:"Set up Gemini Code Assist on GitHub"})]})]})]})]})}function c1({repoStatus:n}){const o=["claude","codex","gemini"].filter(s=>!n.codeReviews[s]);return n.accessible&&o.length===0?null:d.jsxs("div",{className:"space-y-2",children:[d.jsx("div",{className:"text-[11px] font-medium",children:d.jsx("a",{href:`https://github.com/${n.repo}`,target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2",children:n.repo})}),n.accessible?d.jsxs("div",{className:"space-y-1",children:[d.jsx("p",{className:"text-[11px] text-muted-foreground",children:"No AI code review tools detected. Install one or more to get automated PR feedback:"}),d.jsx("div",{className:"space-y-1",children:o.map(s=>d.jsx(u1,{tool:s,repo:n.repo},s))})]}):d.jsxs("p",{className:"text-[12px] text-destructive",children:["Cannot access this repository: ",n.error??"unknown error"]})]})}function d1(){const[n,o]=y.useState(!1),[s,a]=y.useState(!0),{data:u,isLoading:f}=Jt({queryKey:["/api/onboarding/status"],refetchInterval:3e4});if(f||!u)return null;const p=u.repos.filter(g=>!g.accessible||!g.codeReviews.claude&&!g.codeReviews.codex&&!g.codeReviews.gemini);return!(!u.githubConnected||p.length>0)||n?null:d.jsxs("div",{className:"shrink-0 border-b border-amber-500/30 bg-amber-500/5",children:[d.jsxs("div",{className:"flex items-center justify-between px-4 py-2",children:[d.jsxs("button",{onClick:()=>a(!s),className:"flex items-center gap-2 text-left",children:[d.jsx("span",{className:"h-1.5 w-1.5 shrink-0 rounded-full bg-amber-400"}),d.jsx("span",{className:"text-[11px] font-medium uppercase tracking-wider text-amber-400",children:"Setup needed"}),d.jsx("span",{className:"text-[11px] text-muted-foreground",children:u.githubConnected?`${p.length} repo${p.length!==1?"s":""} missing AI code review`:"GitHub not connected"}),d.jsx("span",{className:"text-[10px] text-muted-foreground",children:s?"▲":"▼"})]}),d.jsx("button",{onClick:()=>o(!0),className:"text-[10px] uppercase tracking-wider text-muted-foreground transition-colors hover:text-foreground",children:"dismiss"})]}),s&&d.jsxs("div",{className:"border-t border-amber-500/20 px-4 py-4 space-y-6",children:[!u.githubConnected&&d.jsxs("div",{className:"space-y-2",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-[11px] font-medium uppercase tracking-wider text-destructive",children:"GitHub not connected"}),u.githubError&&d.jsxs("span",{className:"text-[11px] text-muted-foreground",children:["— ",u.githubError]})]}),d.jsx(l1,{})]}),u.githubConnected&&p.length>0&&d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"text-[11px] font-medium uppercase tracking-wider",children:"AI code review not detected"}),d.jsx("div",{className:"space-y-4",children:p.map(g=>d.jsx(c1,{repoStatus:g},g.repo))})]})]})]})}function f1(n){return n.replace("_"," ").toUpperCase()}function p1(n){return n==="in_progress"?"border-foreground text-foreground animate-pulse":n==="failed"?"border-destructive text-destructive":n==="warning"?"border-yellow-500 text-yellow-500":n==="resolved"?"border-foreground/20 text-muted-foreground":n==="rejected"?"border-foreground/20 text-muted-foreground line-through":n==="flagged"?"border-foreground/40 text-foreground/60":n==="queued"?"border-foreground text-foreground":"border-foreground/30 text-foreground/60"}function Xh(n){return n==="resolved"||n==="rejected"}function h1(n){return Xh(n)||n==="warning"}function Zh(n){return n.length===0?!1:n.every(o=>Xh(o.status))}function ko(n){return n.reduce((o,s)=>(s.status==="queued"?o.queued+=1:s.status==="in_progress"?o.inProgress+=1:s.status==="failed"?o.failed+=1:s.status==="warning"&&(o.warning+=1),o),{queued:0,inProgress:0,failed:0,warning:0})}function Er(n){return n?new Date(n).toLocaleTimeString("en-US",{hour12:!1}):null}function Jh(n){return n==="processing"?"autonomous run active":n==="done"?"completed":n==="error"?"attention needed":n==="archived"?"archived":"watching"}function m1(n){return`${Math.max(1,Math.round((n??12e4)/1e3))}s`}function em({status:n}){const o=n==="watching"?"bg-foreground/30":n==="processing"?"bg-foreground animate-pulse":n==="done"?"bg-foreground":n==="archived"?"bg-foreground/15":"bg-destructive";return d.jsx("span",{className:`inline-block h-1.5 w-1.5 shrink-0 ${o}`})}function g1({status:n}){const o=p1(n);return d.jsx("span",{className:`inline-block border px-1.5 py-0 text-[11px] uppercase tracking-wide ${o}`,children:f1(n)})}function tm({href:n,testId:o,label:s,hint:a,className:u,dotClassName:f,hintClassName:p,onClick:h}){return d.jsxs("a",{href:n,target:"_blank",rel:"noopener noreferrer",onClick:h,"data-testid":o,className:`inline-flex items-center border border-green-600 bg-green-600/10 font-medium uppercase text-green-500 transition-colors hover:bg-green-600/20 ${u}`,children:[d.jsx("span",{className:`inline-block rounded-full bg-green-500 ${f}`}),s,a&&d.jsx("span",{className:p,children:a})]})}function nm({pr:n}){const o=ko(n.feedbackItems).inProgress;if(!(n.status==="processing")&&o===0)return null;const a=o>0?`${o} agent${o!==1?"s":""} running on this PR`:"Agent run active on this PR";return d.jsxs(q0,{children:[d.jsx(Y0,{asChild:!0,children:d.jsxs("span",{className:"inline-flex shrink-0 cursor-default items-center gap-0.5 text-[12px]","data-testid":`agent-indicator-${n.id}`,children:[d.jsx("span",{className:"animate-pulse",children:"🤖"}),o>0&&d.jsx("span",{className:"text-[10px] text-muted-foreground",children:o})]})}),d.jsx(Qh,{side:"top",children:d.jsx("p",{className:"text-xs",children:a})})]})}function v1({pr:n,isSelected:o,onSelect:s}){const a=Er(n.lastChecked),f=!(n.status==="processing"||ko(n.feedbackItems).inProgress>0)&&Zh(n.feedbackItems);return d.jsx("div",{onClick:s,onKeyDown:p=>{p.target===p.currentTarget&&(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),s())},role:"button",tabIndex:0,"data-testid":`pr-row-${n.id}`,className:`w-full border-b border-border px-4 py-3 text-left transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring ${o?"bg-muted":""}`,children:d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsx(em,{status:n.status}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsxs("span",{className:"w-12 shrink-0 text-muted-foreground",children:["#",n.number]}),d.jsx("span",{className:"truncate",children:n.title}),d.jsx(nm,{pr:n})]}),f&&d.jsx(tm,{href:n.url,testId:`ready-to-merge-${n.id}`,label:"Ready to merge",hint:"— click to open PR",onClick:p=>p.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-green-500/70"}),d.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:[d.jsx("a",{href:n.url,target:"_blank",rel:"noopener noreferrer",onClick:p=>p.stopPropagation(),className:"underline decoration-border underline-offset-2 transition-colors hover:text-foreground",children:n.repo}),d.jsx("span",{children:Jh(n.status)}),n.feedbackItems.length>0&&(()=>{const p=ko(n.feedbackItems),h=[];return p.queued>0&&h.push(`${p.queued}q`),p.inProgress>0&&h.push(`${p.inProgress} active`),p.failed>0&&h.push(`${p.failed} failed`),p.warning>0&&h.push(`${p.warning} warn`),h.length===0?d.jsxs("span",{children:[n.feedbackItems.length," items"]}):d.jsx("span",{children:h.join(" · ")})})(),a&&d.jsxs("span",{children:["checked ",a]})]})]})]})})}function y1({item:n,prId:o,readOnly:s}){const a=Ft({mutationFn:async h=>(await Tt("PATCH",`/api/prs/${o}/feedback/${n.id}`,{decision:h})).json(),onSuccess:()=>{Ve.invalidateQueries({queryKey:["/api/prs"]}),Ve.invalidateQueries({queryKey:["/api/prs",o]})}}),u=Ft({mutationFn:async()=>(await Tt("POST",`/api/prs/${o}/feedback/${n.id}/retry`)).json(),onSuccess:()=>{Ve.invalidateQueries({queryKey:["/api/prs"]}),Ve.invalidateQueries({queryKey:["/api/prs",o]}),Ve.invalidateQueries({queryKey:["/api/logs"]})},onError:h=>{wr("Could not retry feedback item",h)}}),f=Er(n.createdAt),p=h1(n.status);return d.jsxs(e1,{defaultOpen:!p,className:"border-b border-border",children:[d.jsx("div",{className:"px-4 py-3",children:d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsx("div",{className:"shrink-0 pt-0.5",children:d.jsx(g1,{status:n.status})}),d.jsx("div",{className:"min-w-0 flex-1",children:d.jsxs("div",{className:"mb-1 flex flex-wrap items-center gap-2",children:[d.jsx("span",{className:"font-medium",children:n.author}),n.file&&d.jsxs("span",{className:"text-[11px] text-muted-foreground",children:[n.file,n.line?`:${n.line}`:""]}),d.jsx("span",{className:"text-[11px] text-muted-foreground",children:n.type.replace("_"," ")}),f&&d.jsx("span",{className:"text-[11px] text-muted-foreground",children:f})]})}),d.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[!s&&(n.status==="failed"||n.status==="warning")&&d.jsx("button",{onClick:()=>u.mutate(),disabled:u.isPending,"data-testid":`retry-${n.id}`,className:"px-1.5 py-0.5 text-[10px] uppercase tracking-wider transition-colors hover:bg-foreground hover:text-background border border-border text-muted-foreground disabled:opacity-30",children:"R"}),d.jsx(t1,{asChild:!0,children:d.jsx("button",{"data-testid":`toggle-${n.id}`,className:"px-1.5 py-0.5 text-[10px] uppercase tracking-wider text-muted-foreground transition-colors hover:bg-foreground hover:text-background border border-border",children:"↕"})}),!s&&["accept","reject","flag"].map(h=>d.jsx("button",{onClick:()=>a.mutate(h),"data-testid":`override-${h}-${n.id}`,className:`px-1.5 py-0.5 text-[10px] uppercase tracking-wider transition-colors hover:bg-foreground hover:text-background ${n.decision===h?"bg-foreground text-background":"border border-border text-muted-foreground"}`,children:h.charAt(0)},h))]})]})}),d.jsx(n1,{children:d.jsxs("div",{className:"px-4 pb-3",children:[n.bodyHtml?d.jsx("div",{className:"feedback-markdown text-[12px] leading-relaxed",dangerouslySetInnerHTML:{__html:n.bodyHtml}}):d.jsx("p",{className:"whitespace-pre-wrap text-[12px] leading-relaxed text-foreground/80",children:n.body}),(n.statusReason||n.decisionReason)&&d.jsx("p",{className:"mt-2 text-[11px] text-muted-foreground",children:n.statusReason||n.decisionReason})]})})]})}function x1({prId:n}){const o=y.useRef(null),{data:s=[]}=Jt({queryKey:["/api/logs",n??"all"],queryFn:async()=>{const a=n?`/api/logs?prId=${encodeURIComponent(n)}`:"/api/logs";return(await Tt("GET",a)).json()},refetchInterval:1500});return y.useEffect(()=>{const a=o.current;a&&(a.scrollTop=a.scrollHeight)},[s.length,n]),d.jsx("div",{className:"flex h-full flex-col",children:d.jsx("div",{ref:o,className:"flex-1 overflow-y-auto p-4 font-mono text-[11px] leading-relaxed",children:s.length===0?d.jsx("span",{className:"text-muted-foreground",children:"No log entries."}):s.map(a=>d.jsxs("div",{className:"border-b border-border/60 py-2 last:border-b-0","data-testid":`log-${a.id}`,children:[d.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-[10px] uppercase tracking-wider text-muted-foreground",children:[d.jsx("span",{children:Er(a.timestamp)}),d.jsx("span",{className:a.level==="error"?"text-destructive":a.level==="warn"?"text-foreground/80":"text-foreground/55",children:a.level}),a.phase&&d.jsx("span",{className:"border border-border px-1 py-0",children:a.phase}),a.runId&&d.jsxs("span",{className:"normal-case text-foreground/45",children:["run ",a.runId.slice(0,8)]})]}),d.jsx("div",{className:"mt-1 break-words text-foreground/75",children:a.message}),a.metadata&&Object.keys(a.metadata).length>0&&d.jsx("pre",{className:"mt-1 whitespace-pre-wrap break-all text-[10px] text-muted-foreground",children:JSON.stringify(a.metadata,null,2)})]},a.id))})})}function w1({prId:n}){const[o,s]=y.useState("ask");return d.jsxs("div",{className:"w-80 shrink-0 border-l border-border flex flex-col",children:[d.jsxs("div",{className:"flex border-b border-border",children:[d.jsx("button",{onClick:()=>s("ask"),"data-testid":"tab-ask",className:`flex-1 px-3 py-2 text-[11px] uppercase tracking-wider transition-colors ${o==="ask"?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"}`,children:"Ask Agent"}),d.jsx("button",{onClick:()=>s("activity"),"data-testid":"tab-activity",className:`flex-1 px-3 py-2 text-[11px] uppercase tracking-wider transition-colors ${o==="activity"?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"}`,children:"Activity"})]}),d.jsx("div",{className:"flex-1 overflow-hidden",children:o==="activity"?d.jsx(x1,{prId:n}):n?d.jsx(S1,{prId:n}):d.jsx("div",{className:"flex h-full items-center justify-center text-[12px] text-muted-foreground",children:"Select a PR to ask questions."})})]})}function S1({prId:n}){const[o,s]=y.useState(""),a=y.useRef(null),{data:u=[]}=Jt({queryKey:["/api/prs",n,"questions"],refetchInterval:2e3}),f=Ft({mutationFn:p=>Tt("POST",`/api/prs/${n}/questions`,{question:p}).then(h=>h.json()),onSuccess:()=>{Ve.invalidateQueries({queryKey:["/api/prs",n,"questions"]}),s("")}});return y.useEffect(()=>{const p=a.current;p&&(p.scrollTop=p.scrollHeight)},[u.length,u[u.length-1]?.status]),d.jsxs("div",{className:"flex h-full flex-col",children:[d.jsx("div",{className:"border-b border-border px-4 py-2 text-[11px] uppercase tracking-wider text-muted-foreground",children:"Ask Agent"}),d.jsx("div",{ref:a,className:"flex-1 overflow-y-auto p-4 space-y-3",children:u.length===0?d.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."}):u.map(p=>d.jsxs("div",{className:"space-y-1.5","data-testid":`question-${p.id}`,children:[d.jsxs("div",{className:"text-[12px]",children:[d.jsx("span",{className:"font-medium text-foreground/90",children:"Q: "}),d.jsx("span",{className:"text-foreground/80",children:p.question})]}),p.status==="pending"||p.status==="answering"?d.jsx("div",{className:"text-[11px] text-muted-foreground animate-pulse",children:"Agent is thinking..."}):p.status==="error"?d.jsxs("div",{className:"text-[11px] text-destructive",children:["Error: ",p.error||"Unknown error"]}):d.jsx("div",{className:"text-[12px] leading-relaxed text-foreground/75 whitespace-pre-wrap border-l-2 border-border pl-3",children:p.answer}),d.jsxs("div",{className:"text-[10px] text-muted-foreground",children:[Er(p.createdAt),p.answeredAt&&` — answered ${Er(p.answeredAt)}`]})]},p.id))}),d.jsxs("form",{onSubmit:p=>{p.preventDefault(),o.trim()&&!f.isPending&&f.mutate(o.trim())},className:"border-t border-border p-3",children:[d.jsxs("div",{className:"flex gap-2",children:[d.jsx("input",{type:"text",value:o,onChange:p=>s(p.target.value),placeholder:"Was the review done? Why did this fail?","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"}),d.jsx("button",{type:"submit",disabled:f.isPending||!o.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 disabled:opacity-30",children:f.isPending?"...":"Ask"})]}),f.isError&&d.jsx("div",{className:"mt-1 text-[11px] text-destructive",children:rm(f.error)})]})]})}function rm(n){if(!(n instanceof Error))return String(n);const o=n.message.replace(/^\d+:\s*/,"").trim();if(!o)return"Request failed";try{const s=JSON.parse(o);if(typeof s.error=="string")return s.error;if(typeof s.message=="string")return s.message}catch{}return o}function wr(n,o){Ys({variant:"destructive",title:n,description:rm(o)})}function b1(){const[n,o]=y.useState(null),[s,a]=y.useState(""),[u,f]=y.useState(""),[p,h]=y.useState("active"),{data:g=[],isLoading:v}=Jt({queryKey:["/api/prs"],refetchInterval:3e3}),{data:x=[],isLoading:S}=Jt({queryKey:["/api/prs/archived"],refetchInterval:1e4}),{data:k}=Jt({queryKey:["/api/config"],refetchInterval:5e3}),{data:R=[]}=Jt({queryKey:["/api/repos"],refetchInterval:5e3}),j=p==="active"?g:x,E=p==="archived";y.useEffect(()=>{if(j.length===0){n!==null&&o(null);return}(!n||!j.some(A=>A.id===n))&&o(j[0].id)},[j,n]);const b=j.find(A=>A.id===n)??null,I=Ft({mutationFn:async A=>(await Tt("POST","/api/prs",{url:A})).json(),onSuccess:A=>{Ve.invalidateQueries({queryKey:["/api/prs"]}),a(""),o(A.id)},onError:A=>{wr("Could not add PR",A)}}),M=Ft({mutationFn:async A=>(await Tt("POST",`/api/prs/${A}/apply`)).json(),onSuccess:()=>{Ve.invalidateQueries({queryKey:["/api/prs"]}),Ve.invalidateQueries({queryKey:["/api/logs"]})},onError:A=>{wr("Could not run babysitter",A)}}),D=Ft({mutationFn:async A=>(await Tt("PATCH","/api/config",A)).json(),onSuccess:()=>{Ve.invalidateQueries({queryKey:["/api/config"]})},onError:A=>{wr("Could not update settings",A)}}),F=Ft({mutationFn:async()=>(await Tt("POST","/api/repos/sync")).json(),onSuccess:()=>{Ve.invalidateQueries({queryKey:["/api/prs"]}),Ve.invalidateQueries({queryKey:["/api/repos"]})},onError:A=>{wr("Could not sync repositories",A)}}),V=Ft({mutationFn:async A=>(await Tt("POST","/api/repos",{repo:A})).json(),onSuccess:()=>{Ve.invalidateQueries({queryKey:["/api/repos"]}),Ve.invalidateQueries({queryKey:["/api/prs"]}),f("")},onError:A=>{wr("Could not watch repository",A)}});return d.jsxs("div",{className:"flex h-screen flex-col overflow-hidden",children:[d.jsxs("header",{className:"flex shrink-0 items-center justify-between border-b border-border px-4 py-2.5",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-label":"PR Feedback Agent",children:[d.jsx("rect",{x:"1",y:"1",width:"14",height:"14",stroke:"currentColor",strokeWidth:"1.5"}),d.jsx("path",{d:"M4 5h8M4 8h5M4 11h6",stroke:"currentColor",strokeWidth:"1"})]}),d.jsx("span",{className:"text-sm font-medium tracking-tight",children:"code factory"}),d.jsx("span",{className:"border border-border px-1.5 py-0 text-[10px] uppercase tracking-wider text-muted-foreground",children:"autonomous"}),d.jsxs("span",{className:"text-[11px] text-muted-foreground",children:["poll ",m1(k?.pollIntervalMs)]}),d.jsx(Ks,{href:"/changelogs",className:"text-[11px] text-muted-foreground hover:text-foreground focus:outline-none",children:"changelogs"})]}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsxs("span",{className:"text-[11px] text-muted-foreground",children:[g.length," PR",g.length!==1?"s":""," in ",R.length," repo",R.length!==1?"s":""]}),d.jsx("label",{className:"text-[11px] uppercase tracking-wider text-muted-foreground",children:"Agent"}),d.jsxs("select",{value:k?.codingAgent??"codex",onChange:A=>{const B=A.target.value;D.mutate({codingAgent:B})},disabled:D.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 disabled:opacity-50",children:[d.jsx("option",{value:"codex",children:"codex"}),d.jsx("option",{value:"claude",children:"claude"})]}),d.jsxs("label",{className:"flex items-center gap-1 text-[11px] text-muted-foreground",children:[d.jsx("input",{type:"checkbox",checked:k?.autoResolveMergeConflicts??!0,onChange:A=>D.mutate({autoResolveMergeConflicts:A.target.checked}),disabled:D.isPending,"data-testid":"checkbox-auto-resolve-conflicts",className:"accent-foreground"}),"Auto-resolve conflicts"]}),d.jsx(Ks,{href:"/settings",className:"border border-border px-2 py-0.5 text-[11px] text-muted-foreground hover:text-foreground",children:"settings"})]})]}),d.jsx(d1,{}),d.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[d.jsxs("div",{className:"flex w-80 shrink-0 flex-col border-r border-border",children:[d.jsxs("div",{className:"flex border-b border-border",children:[d.jsxs("button",{onClick:()=>h("active"),"data-testid":"tab-active",className:`flex-1 px-3 py-2 text-[11px] uppercase tracking-wider transition-colors ${p==="active"?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"}`,children:["Active (",g.length,")"]}),d.jsxs("button",{onClick:()=>h("archived"),"data-testid":"tab-archived",className:`flex-1 px-3 py-2 text-[11px] uppercase tracking-wider transition-colors ${p==="archived"?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"}`,children:["Archived (",x.length,")"]})]}),!E&&d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"border-b border-border px-3 py-2 text-[11px] text-muted-foreground",children:"Add a PR or watch a repo. Sync and babysit start automatically."}),d.jsx("form",{onSubmit:A=>{A.preventDefault(),s.trim()&&I.mutate(s.trim())},className:"border-b border-border p-3",children:d.jsxs("div",{className:"flex gap-2",children:[d.jsx("input",{type:"text",value:s,onChange:A=>a(A.target.value),placeholder:"github.com/owner/repo/pull/123","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"}),d.jsx("button",{type:"submit",disabled:I.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 disabled:opacity-30",children:"Add"})]})}),d.jsxs("form",{onSubmit:A=>{A.preventDefault(),u.trim()&&V.mutate(u.trim())},className:"border-b border-border p-3",children:[d.jsxs("div",{className:"flex gap-2",children:[d.jsx("input",{type:"text",value:u,onChange:A=>f(A.target.value),placeholder:"owner/repo","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"}),d.jsx("button",{type:"submit",disabled:V.isPending||!u.trim(),"data-testid":"button-add-repo",className:"border border-border px-2 py-1 text-[11px] uppercase tracking-wider transition-colors hover:bg-foreground hover:text-background disabled:opacity-30",children:"Watch"})]}),d.jsxs("div",{className:"mt-3",children:[d.jsxs("div",{className:"mb-1 flex items-center justify-between",children:[d.jsx("span",{className:"text-[10px] uppercase tracking-wider text-muted-foreground",children:"Tracked repositories"}),d.jsx("button",{type:"button",onClick:()=>F.mutate(),disabled:F.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 disabled:opacity-30",children:F.isPending?"Fetching…":"Fetch"})]}),R.length===0?d.jsx("div",{className:"text-[11px] text-muted-foreground",children:"No repositories being watched yet."}):d.jsx("div",{className:"space-y-1 text-[12px]",children:R.map(A=>d.jsx("a",{href:r1(A),target:"_blank",rel:"noopener noreferrer","data-testid":`tracked-repo-${A.replace("/","-")}`,className:"block break-all text-foreground/75 underline decoration-border underline-offset-2 transition-colors hover:text-foreground",children:A},A))})]})]})]}),d.jsx("div",{className:"flex-1 overflow-y-auto",children:(E?S:v)?d.jsx("div",{className:"p-4 text-[12px] text-muted-foreground",children:"Loading..."}):j.length===0?d.jsx("div",{className:"p-4 text-[12px] text-muted-foreground",children:E?"No archived PRs. Closed PRs are archived automatically.":"No PRs tracked yet. Add a repository to watch or add a PR URL."}):j.map(A=>d.jsx(v1,{pr:A,isSelected:A.id===n,onSelect:()=>o(A.id)},A.id))})]}),d.jsx("div",{className:"flex flex-1 flex-col overflow-hidden",children:b?d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"shrink-0 border-b border-border px-4 py-3",children:[d.jsxs("div",{className:"mb-1 flex items-start justify-between gap-4",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(em,{status:b.status}),d.jsx("span",{className:"truncate font-medium",children:b.title}),d.jsx(nm,{pr:b}),d.jsxs("a",{href:b.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",children:[b.repo,"#",b.number]})]}),d.jsxs("div",{className:"mt-1 flex flex-wrap gap-x-4 gap-y-1 text-[11px] text-muted-foreground",children:[d.jsxs("span",{children:["status: ",Jh(b.status)]}),d.jsxs("span",{children:[b.feedbackItems.length," items"]}),b.feedbackItems.length>0&&(()=>{const A=ko(b.feedbackItems);return d.jsxs(d.Fragment,{children:[A.queued>0&&d.jsxs("span",{children:[A.queued," queued"]}),A.inProgress>0&&d.jsxs("span",{children:[A.inProgress," in progress"]}),A.failed>0&&d.jsxs("span",{children:[A.failed," failed"]}),A.warning>0&&d.jsxs("span",{children:[A.warning," warnings"]})]})})(),b.testsPassed!==null&&d.jsxs("span",{children:["tests: ",b.testsPassed?"pass":"fail"]}),b.lintPassed!==null&&d.jsxs("span",{children:["lint: ",b.lintPassed?"pass":"fail"]}),b.lastChecked&&d.jsxs("span",{children:["checked ",Er(b.lastChecked)]})]})]}),!E&&d.jsx("button",{onClick:()=>M.mutate(b.id),disabled:M.isPending||b.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 disabled:opacity-30",children:b.status==="processing"?"Running":"Run now"})]}),Zh(b.feedbackItems)&&b.status!=="processing"&&ko(b.feedbackItems).inProgress===0&&d.jsx(tm,{href:b.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-green-500/70"}),d.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Background watcher syncs GitHub feedback and pushes approved fixes automatically."})]}),d.jsx("div",{className:"flex-1 overflow-y-auto",children:b.feedbackItems.length===0?d.jsx("div",{className:"p-4 text-[12px] text-muted-foreground",children:"No feedback yet. The watcher will sync GitHub comments automatically."}):b.feedbackItems.map(A=>d.jsx(y1,{item:A,prId:b.id,readOnly:E},A.id))})]}):d.jsx("div",{className:"flex flex-1 items-center justify-center text-[12px] text-muted-foreground",children:"Select a PR from the left panel."})}),d.jsx(w1,{prId:n})]})]})}function C1(){const{data:n}=Jt({queryKey:["/api/config"]}),[o,s]=y.useState(""),[a,u]=y.useState(!1),f=Ft({mutationFn:async p=>(await Tt("PATCH","/api/config",p)).json(),onSuccess:()=>{Ve.invalidateQueries({queryKey:["/api/config"]}),Ys({description:"Settings saved."})},onError:p=>{Ys({variant:"destructive",description:`Failed to save: ${p.message}`})}});return d.jsxs("div",{className:"flex h-screen flex-col overflow-hidden",children:[d.jsx("header",{className:"flex shrink-0 items-center justify-between border-b border-border px-4 py-2.5",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(Ks,{href:"/",className:"text-[11px] text-muted-foreground hover:text-foreground",children:"← back"}),d.jsx("span",{className:"text-sm font-medium tracking-tight",children:"settings"})]})}),d.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:d.jsxs("div",{className:"mx-auto flex max-w-2xl flex-col gap-8",children:[d.jsxs("section",{children:[d.jsx("h2",{className:"mb-4 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Agent"}),d.jsx("div",{className:"flex flex-col gap-4 rounded border border-border p-4",children:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("div",{className:"text-sm",children:"Coding Agent"}),d.jsx("div",{className:"text-[11px] text-muted-foreground",children:"CLI agent used to apply fixes"})]}),d.jsxs("select",{value:n?.codingAgent??"codex",onChange:p=>{const h=p.target.value;f.mutate({codingAgent:h})},disabled:f.isPending,className:"border border-border bg-transparent px-2 py-1 text-sm focus:border-foreground focus:outline-none disabled:opacity-50",children:[d.jsx("option",{value:"codex",children:"codex"}),d.jsx("option",{value:"claude",children:"claude"})]})]})})]}),d.jsxs("section",{children:[d.jsx("h2",{className:"mb-4 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Tuning"}),d.jsxs("div",{className:"flex flex-col gap-4 rounded border border-border p-4",children:[d.jsx(Ws,{label:"Max turns",description:"Maximum agent turns per feedback item",value:n?.maxTurns??15,onChange:p=>f.mutate({maxTurns:p}),disabled:f.isPending}),d.jsx(Ws,{label:"Poll interval (ms)",description:"How often to check for new feedback",value:n?.pollIntervalMs??12e4,onChange:p=>f.mutate({pollIntervalMs:p}),disabled:f.isPending}),d.jsx(Ws,{label:"Batch window (ms)",description:"Time to batch feedback before processing",value:n?.batchWindowMs??3e5,onChange:p=>f.mutate({batchWindowMs:p}),disabled:f.isPending}),d.jsx(Ws,{label:"Max changes per run",description:"Limit on concurrent changes",value:n?.maxChangesPerRun??20,onChange:p=>f.mutate({maxChangesPerRun:p}),disabled:f.isPending})]})]}),d.jsxs("section",{children:[d.jsx("h2",{className:"mb-4 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"GitHub"}),d.jsxs("div",{className:"flex flex-col gap-4 rounded border border-border p-4",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("div",{className:"text-sm",children:"Token"}),d.jsx("div",{className:"text-[11px] text-muted-foreground",children:n?.githubToken||"not set"})]}),a?d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("input",{type:"password",value:o,onChange:p=>s(p.target.value),placeholder:"ghp_...",className:"border border-border bg-transparent px-2 py-1 text-sm focus:border-foreground focus:outline-none"}),d.jsx("button",{onClick:()=>{o&&(f.mutate({githubToken:o}),s(""),u(!1))},disabled:!o||f.isPending,className:"border border-border px-2 py-1 text-xs hover:bg-muted disabled:opacity-50",children:"save"}),d.jsx("button",{onClick:()=>{u(!1),s("")},className:"px-2 py-1 text-xs text-muted-foreground hover:text-foreground",children:"cancel"})]}):d.jsx("button",{onClick:()=>u(!0),className:"border border-border px-2 py-1 text-xs hover:bg-muted",children:"update"})]}),d.jsxs("div",{children:[d.jsx("div",{className:"text-sm",children:"Trusted reviewers"}),d.jsx("div",{className:"text-[11px] text-muted-foreground",children:n?.trustedReviewers?.length?n.trustedReviewers.join(", "):"none configured"})]}),d.jsxs("div",{children:[d.jsx("div",{className:"text-sm",children:"Ignored bots"}),d.jsx("div",{className:"text-[11px] text-muted-foreground",children:n?.ignoredBots?.length?n.ignoredBots.join(", "):"none configured"})]})]})]})]})})]})}function Ws({label:n,description:o,value:s,onChange:a,disabled:u}){return d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("div",{className:"text-sm",children:n}),d.jsx("div",{className:"text-[11px] text-muted-foreground",children:o})]}),d.jsx("input",{type:"number",value:s,onChange:f=>{const p=parseInt(f.target.value,10);isNaN(p)||a(p)},disabled:u,className:"w-28 border border-border bg-transparent px-2 py-1 text-right text-sm focus:border-foreground focus:outline-none disabled:opacity-50"})]})}function k1(n){return new Date(n).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}function E1(n){const o=n.match(/##\s*Twitter\/X\s*(?:Thread)?\n([\s\S]*?)(?=\n##\s|\s*$)/i),s=n.match(/##\s*LinkedIn\s*(?:\/\s*General)?\n([\s\S]*?)(?=\n##\s|\s*$)/i);return{twitter:o?o[1].trim():null,linkedin:s?s[1].trim():null}}function P1({text:n}){const[o,s]=y.useState(!1),a=async()=>{try{await navigator.clipboard.writeText(n),s(!0),setTimeout(()=>s(!1),2e3)}catch{}};return d.jsx("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:outline-none",children:o?"copied":"copy"})}function ba({title:n,content:o}){return d.jsxs("div",{className:"mt-4",children:[d.jsxs("div",{className:"mb-1.5 flex items-center justify-between",children:[d.jsx("span",{className:"text-[11px] uppercase tracking-wider text-muted-foreground",children:n}),d.jsx(P1,{text:o})]}),d.jsx("pre",{className:"whitespace-pre-wrap border border-border bg-background p-3 text-[12px] leading-relaxed font-mono",children:o})]})}function N1({status:n}){const o=n==="done"?"border-foreground/40 text-foreground":n==="generating"?"border-border text-muted-foreground animate-pulse":"border-destructive/40 text-destructive";return d.jsx("span",{className:`border px-1.5 py-0 text-[10px] uppercase tracking-wider ${o}`,children:n})}function R1({changelog:n}){const[o,s]=y.useState(!1),a=n.content?E1(n.content):null;return d.jsxs("div",{className:"border border-border",children:[d.jsxs("div",{className:"flex cursor-pointer items-center justify-between px-4 py-3 hover:bg-muted/30",onClick:()=>n.status==="done"&&s(u=>!u),children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(N1,{status:n.status}),d.jsx("span",{className:"text-sm font-medium",children:k1(n.createdAt)}),d.jsxs("span",{className:"text-[11px] text-muted-foreground",children:[n.triggerCount," PR",n.triggerCount!==1?"s":""," merged"]}),d.jsx("span",{className:"text-[11px] text-muted-foreground",children:n.prSummaries.map(u=>`#${u.number}`).join(" · ")})]}),n.status==="done"&&d.jsx("span",{className:"text-[11px] text-muted-foreground",children:o?"▲":"▼"})]}),o&&n.status==="done"&&d.jsxs("div",{className:"border-t border-border px-4 pb-4 pt-3",children:[n.error&&d.jsx("p",{className:"mb-3 text-[12px] text-destructive",children:n.error}),a?.twitter&&d.jsx(ba,{title:"Twitter / X Thread",content:a.twitter}),a?.linkedin&&d.jsx(ba,{title:"LinkedIn / General",content:a.linkedin}),!a?.twitter&&!a?.linkedin&&n.content&&d.jsx(ba,{title:"Full output",content:n.content})]}),n.status==="error"&&n.error&&d.jsx("div",{className:"border-t border-border px-4 py-3",children:d.jsx("p",{className:"text-[12px] text-destructive",children:n.error})}),n.status==="generating"&&d.jsx("div",{className:"border-t border-border px-4 py-2.5",children:d.jsx("span",{className:"text-[11px] text-muted-foreground",children:"Generating social media post with AI agent…"})})]})}function j1(){const{data:n=[],isLoading:o}=Jt({queryKey:["/api/changelogs"],refetchInterval:s=>s.state.data?.some(u=>u.status==="generating")?5e3:!1});return d.jsxs("div",{className:"flex h-screen flex-col overflow-hidden",children:[d.jsxs("header",{className:"flex shrink-0 items-center justify-between border-b border-border px-4 py-2.5",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-label":"PR Feedback Agent",children:[d.jsx("rect",{x:"1",y:"1",width:"14",height:"14",stroke:"currentColor",strokeWidth:"1.5"}),d.jsx("path",{d:"M4 5h8M4 8h5M4 11h6",stroke:"currentColor",strokeWidth:"1"})]}),d.jsx("span",{className:"text-sm font-medium tracking-tight",children:"code factory"}),d.jsx("span",{className:"border border-border px-1.5 py-0 text-[10px] uppercase tracking-wider text-muted-foreground",children:"changelogs"})]}),d.jsx(Ks,{href:"/",className:"text-[11px] text-muted-foreground hover:text-foreground focus:outline-none",children:"← back to dashboard"})]}),d.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:d.jsxs("div",{className:"mx-auto max-w-3xl",children:[d.jsxs("div",{className:"mb-5",children:[d.jsx("h1",{className:"text-base font-medium",children:"Social Media Changelogs"}),d.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."})]}),!o&&n.length===0&&d.jsxs("div",{className:"border border-border px-4 py-8 text-center",children:[d.jsx("p",{className:"text-sm text-muted-foreground",children:"No changelogs yet."}),d.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."})]}),o&&d.jsx("div",{className:"border border-border px-4 py-6 text-center",children:d.jsx("p",{className:"text-[12px] text-muted-foreground",children:"Loading…"})}),d.jsx("div",{className:"flex flex-col gap-2",children:n.map(s=>d.jsx(R1,{changelog:s},s.id))})]})})]})}const om=y.forwardRef(({className:n,...o},s)=>d.jsx("div",{ref:s,className:ht("shadcn-card rounded-xl border bg-card border-card-border text-card-foreground shadow-sm",n),...o}));om.displayName="Card";const T1=y.forwardRef(({className:n,...o},s)=>d.jsx("div",{ref:s,className:ht("flex flex-col space-y-1.5 p-6",n),...o}));T1.displayName="CardHeader";const O1=y.forwardRef(({className:n,...o},s)=>d.jsx("div",{ref:s,className:ht("text-2xl font-semibold leading-none tracking-tight",n),...o}));O1.displayName="CardTitle";const _1=y.forwardRef(({className:n,...o},s)=>d.jsx("div",{ref:s,className:ht("text-sm text-muted-foreground",n),...o}));_1.displayName="CardDescription";const sm=y.forwardRef(({className:n,...o},s)=>d.jsx("div",{ref:s,className:ht("p-6 pt-0",n),...o}));sm.displayName="CardContent";const A1=y.forwardRef(({className:n,...o},s)=>d.jsx("div",{ref:s,className:ht("flex items-center p-6 pt-0",n),...o}));A1.displayName="CardFooter";function I1(){return d.jsx("div",{className:"min-h-screen w-full flex items-center justify-center bg-gray-50",children:d.jsx(om,{className:"w-full max-w-md mx-4",children:d.jsxs(sm,{className:"pt-6",children:[d.jsxs("div",{className:"flex mb-4 gap-2",children:[d.jsx(kx,{className:"h-8 w-8 text-red-500"}),d.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"404 Page Not Found"})]}),d.jsx("p",{className:"mt-4 text-sm text-gray-600",children:"Did you forget to add the page to the router?"})]})})})}function M1(){return d.jsxs(Tv,{children:[d.jsx(Fs,{path:"/",component:b1}),d.jsx(Fs,{path:"/settings",component:C1}),d.jsx(Fs,{path:"/changelogs",component:j1}),d.jsx(Fs,{component:I1})]})}function L1(){return d.jsx(oy,{client:Ve,children:d.jsxs(G0,{children:[d.jsx(lw,{}),d.jsx(mp,{hook:vp,children:d.jsx(M1,{})})]})})}window.location.hash||(window.location.hash="#/");cv.createRoot(document.getElementById("root")).render(d.jsx(L1,{}));