wgts-report 0.1.7 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/wgts-report.css +1 -1
- package/dist/assets/wgts-report.js +58 -58
- package/dist/index.html +2 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Wv=n=>{throw TypeError(n)};var Yd=(n,a,i)=>a.has(n)||Wv("Cannot "+i);var U=(n,a,i)=>(Yd(n,a,"read from private field"),i?i.call(n):a.get(n)),ye=(n,a,i)=>a.has(n)?Wv("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(n):a.set(n,i),ce=(n,a,i,o)=>(Yd(n,a,"write to private field"),o?o.call(n,i):a.set(n,i),i),De=(n,a,i)=>(Yd(n,a,"access private method"),i);var ku=(n,a,i,o)=>({set _(u){ce(n,a,u,i)},get _(){return U(n,a,o)}});function T2(n,a){for(var i=0;i<a.length;i++){const o=a[i];if(typeof o!="string"&&!Array.isArray(o)){for(const u in o)if(u!=="default"&&!(u in n)){const d=Object.getOwnPropertyDescriptor(o,u);d&&Object.defineProperty(n,u,d.get?d:{enumerable:!0,get:()=>o[u]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))o(u);new MutationObserver(u=>{for(const d of u)if(d.type==="childList")for(const h of d.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&o(h)}).observe(document,{childList:!0,subtree:!0});function i(u){const d={};return u.integrity&&(d.integrity=u.integrity),u.referrerPolicy&&(d.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?d.credentials="include":u.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function o(u){if(u.ep)return;u.ep=!0;const d=i(u);fetch(u.href,d)}})();function R2(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Id={exports:{}},Uo={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@ var Av=n=>{throw TypeError(n)};var Rd=(n,s,i)=>s.has(n)||Av("Cannot "+i);var L=(
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var ey;function A2(){if(ey)return Uo;ey=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function i(o,u,d){var h=null;if(d!==void 0&&(h=""+d),u.key!==void 0&&(h=""+u.key),"key"in u){d={};for(var m in u)m!=="key"&&(d[m]=u[m])}else d=u;return u=d.ref,{$$typeof:n,type:o,key:h,ref:u!==void 0?u:null,props:d}}return Uo.Fragment=a,Uo.jsx=i,Uo.jsxs=i,Uo}var ty;function O2(){return ty||(ty=1,Id.exports=A2()),Id.exports}var c=O2(),Xd={exports:{}},Ee={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react.production.js
|
|
12
12
|
*
|
|
@@ -14,7 +14,7 @@ var Av=n=>{throw TypeError(n)};var Rd=(n,s,i)=>s.has(n)||Av("Cannot "+i);var L=(
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
17
|
+
*/var ny;function z2(){if(ny)return Ee;ny=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),h=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),S=Symbol.for("react.view_transition"),w=Symbol.iterator;function j(L){return L===null||typeof L!="object"?null:(L=w&&L[w]||L["@@iterator"],typeof L=="function"?L:null)}var N={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},M=Object.assign,A={};function C(L,V,ne){this.props=L,this.context=V,this.refs=A,this.updater=ne||N}C.prototype.isReactComponent={},C.prototype.setState=function(L,V){if(typeof L!="object"&&typeof L!="function"&&L!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,L,V,"setState")},C.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function D(){}D.prototype=C.prototype;function O(L,V,ne){this.props=L,this.context=V,this.refs=A,this.updater=ne||N}var z=O.prototype=new D;z.constructor=O,M(z,C.prototype),z.isPureReactComponent=!0;var _=Array.isArray;function R(){}var Q={H:null,A:null,T:null,S:null},K=Object.prototype.hasOwnProperty;function $(L,V,ne){var re=ne.ref;return{$$typeof:n,type:L,key:V,ref:re!==void 0?re:null,props:ne}}function le(L,V){return $(L.type,V,L.props)}function oe(L){return typeof L=="object"&&L!==null&&L.$$typeof===n}function te(L){var V={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(ne){return V[ne]})}var Y=/\/+/g;function ee(L,V){return typeof L=="object"&&L!==null&&L.key!=null?te(""+L.key):V.toString(36)}function X(L){switch(L.status){case"fulfilled":return L.value;case"rejected":throw L.reason;default:switch(typeof L.status=="string"?L.then(R,R):(L.status="pending",L.then(function(V){L.status==="pending"&&(L.status="fulfilled",L.value=V)},function(V){L.status==="pending"&&(L.status="rejected",L.reason=V)})),L.status){case"fulfilled":return L.value;case"rejected":throw L.reason}}throw L}function W(L,V,ne,re,me){var be=typeof L;(be==="undefined"||be==="boolean")&&(L=null);var Ce=!1;if(L===null)Ce=!0;else switch(be){case"bigint":case"string":case"number":Ce=!0;break;case"object":switch(L.$$typeof){case n:case a:Ce=!0;break;case x:return Ce=L._init,W(Ce(L._payload),V,ne,re,me)}}if(Ce)return me=me(L),Ce=re===""?"."+ee(L,0):re,_(me)?(ne="",Ce!=null&&(ne=Ce.replace(Y,"$&/")+"/"),W(me,V,ne,"",function(rt){return rt})):me!=null&&(oe(me)&&(me=le(me,ne+(me.key==null||L&&L.key===me.key?"":(""+me.key).replace(Y,"$&/")+"/")+Ce)),V.push(me)),1;Ce=0;var ue=re===""?".":re+":";if(_(L))for(var ge=0;ge<L.length;ge++)re=L[ge],be=ue+ee(re,ge),Ce+=W(re,V,ne,be,me);else if(ge=j(L),typeof ge=="function")for(L=ge.call(L),ge=0;!(re=L.next()).done;)re=re.value,be=ue+ee(re,ge++),Ce+=W(re,V,ne,be,me);else if(be==="object"){if(typeof L.then=="function")return W(X(L),V,ne,re,me);throw V=String(L),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return Ce}function ae(L,V,ne){if(L==null)return L;var re=[],me=0;return W(L,re,"","",function(be){return V.call(ne,be,me++)}),re}function ve(L){if(L._status===-1){var V=L._result,ne=V();ne.then(function(re){(L._status===0||L._status===-1)&&(L._status=1,L._result=re,ne.status===void 0&&(ne.status="fulfilled",ne.value=re))},function(re){(L._status===0||L._status===-1)&&(L._status=2,L._result=re,ne.status===void 0&&(ne.status="rejected",ne.reason=re))}),L._status===-1&&(L._status=0,L._result=ne)}if(L._status===1)return L._result.default;throw L._result}var xe=typeof reportError=="function"?reportError:function(L){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof L=="object"&&L!==null&&typeof L.message=="string"?String(L.message):String(L),error:L});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",L);return}console.error(L)};function He(L){var V=Q.T,ne={};ne.types=V!==null?V.types:null,Q.T=ne;try{var re=L(),me=Q.S;me!==null&&me(ne,re),typeof re=="object"&&re!==null&&typeof re.then=="function"&&re.then(R,xe)}catch(be){xe(be)}finally{V!==null&&ne.types!==null&&(V.types=ne.types),Q.T=V}}function Fe(L){var V=Q.T;if(V!==null){var ne=V.types;ne===null?V.types=[L]:ne.indexOf(L)===-1&&ne.push(L)}else He(Fe.bind(null,L))}var Ye={map:ae,forEach:function(L,V,ne){ae(L,function(){V.apply(this,arguments)},ne)},count:function(L){var V=0;return ae(L,function(){V++}),V},toArray:function(L){return ae(L,function(V){return V})||[]},only:function(L){if(!oe(L))throw Error("React.Children.only expected to receive a single React element child.");return L}};return Ee.Activity=v,Ee.Children=Ye,Ee.Component=C,Ee.Fragment=i,Ee.Profiler=u,Ee.PureComponent=O,Ee.StrictMode=o,Ee.Suspense=g,Ee.ViewTransition=S,Ee.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Q,Ee.__COMPILER_RUNTIME={__proto__:null,c:function(L){return Q.H.useMemoCache(L)}},Ee.addTransitionType=Fe,Ee.cache=function(L){return function(){return L.apply(null,arguments)}},Ee.cacheSignal=function(){return null},Ee.cloneElement=function(L,V,ne){if(L==null)throw Error("The argument must be a React element, but you passed "+L+".");var re=M({},L.props),me=L.key;if(V!=null)for(be in V.key!==void 0&&(me=""+V.key),V)!K.call(V,be)||be==="key"||be==="__self"||be==="__source"||be==="ref"&&V.ref===void 0||(re[be]=V[be]);var be=arguments.length-2;if(be===1)re.children=ne;else if(1<be){for(var Ce=Array(be),ue=0;ue<be;ue++)Ce[ue]=arguments[ue+2];re.children=Ce}return $(L.type,me,re)},Ee.createContext=function(L){return L={$$typeof:h,_currentValue:L,_currentValue2:L,_threadCount:0,Provider:null,Consumer:null},L.Provider=L,L.Consumer={$$typeof:d,_context:L},L},Ee.createElement=function(L,V,ne){var re,me={},be=null;if(V!=null)for(re in V.key!==void 0&&(be=""+V.key),V)K.call(V,re)&&re!=="key"&&re!=="__self"&&re!=="__source"&&(me[re]=V[re]);var Ce=arguments.length-2;if(Ce===1)me.children=ne;else if(1<Ce){for(var ue=Array(Ce),ge=0;ge<Ce;ge++)ue[ge]=arguments[ge+2];me.children=ue}if(L&&L.defaultProps)for(re in Ce=L.defaultProps,Ce)me[re]===void 0&&(me[re]=Ce[re]);return $(L,be,me)},Ee.createRef=function(){return{current:null}},Ee.forwardRef=function(L){return{$$typeof:m,render:L}},Ee.isValidElement=oe,Ee.lazy=function(L){return{$$typeof:x,_payload:{_status:-1,_result:L},_init:ve}},Ee.memo=function(L,V){return{$$typeof:y,type:L,compare:V===void 0?null:V}},Ee.startTransition=He,Ee.unstable_useCacheRefresh=function(){return Q.H.useCacheRefresh()},Ee.use=function(L){return Q.H.use(L)},Ee.useActionState=function(L,V,ne){return Q.H.useActionState(L,V,ne)},Ee.useCallback=function(L,V){return Q.H.useCallback(L,V)},Ee.useContext=function(L){return Q.H.useContext(L)},Ee.useDebugValue=function(){},Ee.useDeferredValue=function(L,V){return Q.H.useDeferredValue(L,V)},Ee.useEffect=function(L,V){return Q.H.useEffect(L,V)},Ee.useEffectEvent=function(L){return Q.H.useEffectEvent(L)},Ee.useId=function(){return Q.H.useId()},Ee.useImperativeHandle=function(L,V,ne){return Q.H.useImperativeHandle(L,V,ne)},Ee.useInsertionEffect=function(L,V){return Q.H.useInsertionEffect(L,V)},Ee.useLayoutEffect=function(L,V){return Q.H.useLayoutEffect(L,V)},Ee.useMemo=function(L,V){return Q.H.useMemo(L,V)},Ee.useOptimistic=function(L,V){return Q.H.useOptimistic(L,V)},Ee.useReducer=function(L,V,ne){return Q.H.useReducer(L,V,ne)},Ee.useRef=function(L){return Q.H.useRef(L)},Ee.useState=function(L){return Q.H.useState(L)},Ee.useSyncExternalStore=function(L,V,ne){return Q.H.useSyncExternalStore(L,V,ne)},Ee.useTransition=function(){return Q.H.useTransition()},Ee.version="19.3.1",Ee}var ly;function pm(){return ly||(ly=1,Xd.exports=z2()),Xd.exports}var E=pm();const D2=R2(E),L2=T2({__proto__:null,default:D2},[E]);var Kd={exports:{}},$o={},Pd={exports:{}},Zd={};/**
|
|
18
18
|
* @license React
|
|
19
19
|
* scheduler.production.js
|
|
20
20
|
*
|
|
@@ -22,7 +22,7 @@ var Av=n=>{throw TypeError(n)};var Rd=(n,s,i)=>s.has(n)||Av("Cannot "+i);var L=(
|
|
|
22
22
|
*
|
|
23
23
|
* This source code is licensed under the MIT license found in the
|
|
24
24
|
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var
|
|
25
|
+
*/var ay;function H2(){return ay||(ay=1,(function(n){function a(X,W){var ae=X.length;X.push(W);e:for(;0<ae;){var ve=ae-1>>>1,xe=X[ve];if(0<u(xe,W))X[ve]=W,X[ae]=xe,ae=ve;else break e}}function i(X){return X.length===0?null:X[0]}function o(X){if(X.length===0)return null;var W=X[0],ae=X.pop();if(ae!==W){X[0]=ae;e:for(var ve=0,xe=X.length,He=xe>>>1;ve<He;){var Fe=2*(ve+1)-1,Ye=X[Fe],L=Fe+1,V=X[L];if(0>u(Ye,ae))L<xe&&0>u(V,Ye)?(X[ve]=V,X[L]=ae,ve=L):(X[ve]=Ye,X[Fe]=ae,ve=Fe);else if(L<xe&&0>u(V,ae))X[ve]=V,X[L]=ae,ve=L;else break e}}return W}function u(X,W){var ae=X.sortIndex-W.sortIndex;return ae!==0?ae:X.id-W.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;n.unstable_now=function(){return d.now()}}else{var h=Date,m=h.now();n.unstable_now=function(){return h.now()-m}}var g=[],y=[],x=1,v=null,S=3,w=!1,j=!1,N=!1,M=!1,A=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,D=typeof setImmediate<"u"?setImmediate:null;function O(X){for(var W=i(y);W!==null;){if(W.callback===null)o(y);else if(W.startTime<=X)o(y),W.sortIndex=W.expirationTime,a(g,W);else break;W=i(y)}}function z(X){if(N=!1,O(X),!j)if(i(g)!==null)j=!0,_||(_=!0,oe());else{var W=i(y);W!==null&&ee(z,W.startTime-X)}}var _=!1,R=-1,Q=5,K=-1;function $(){return M?!0:!(n.unstable_now()-K<Q)}function le(){if(M=!1,_){var X=n.unstable_now();K=X;var W=!0;try{e:{j=!1,N&&(N=!1,C(R),R=-1),w=!0;var ae=S;try{t:{for(O(X),v=i(g);v!==null&&!(v.expirationTime>X&&$());){var ve=v.callback;if(typeof ve=="function"){v.callback=null,S=v.priorityLevel;var xe=ve(v.expirationTime<=X);if(X=n.unstable_now(),typeof xe=="function"){v.callback=xe,O(X),W=!0;break t}v===i(g)&&o(g),O(X)}else o(g);v=i(g)}if(v!==null)W=!0;else{var He=i(y);He!==null&&ee(z,He.startTime-X),W=!1}}break e}finally{v=null,S=ae,w=!1}W=void 0}}finally{W?oe():_=!1}}}var oe;if(typeof D=="function")oe=function(){D(le)};else if(typeof MessageChannel<"u"){var te=new MessageChannel,Y=te.port2;te.port1.onmessage=le,oe=function(){Y.postMessage(null)}}else oe=function(){A(le,0)};function ee(X,W){R=A(function(){X(n.unstable_now())},W)}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(X){X.callback=null},n.unstable_forceFrameRate=function(X){0>X||125<X?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Q=0<X?Math.floor(1e3/X):5},n.unstable_getCurrentPriorityLevel=function(){return S},n.unstable_next=function(X){switch(S){case 1:case 2:case 3:var W=3;break;default:W=S}var ae=S;S=W;try{return X()}finally{S=ae}},n.unstable_requestPaint=function(){M=!0},n.unstable_runWithPriority=function(X,W){switch(X){case 1:case 2:case 3:case 4:case 5:break;default:X=3}var ae=S;S=X;try{return W()}finally{S=ae}},n.unstable_scheduleCallback=function(X,W,ae){var ve=n.unstable_now();switch(typeof ae=="object"&&ae!==null?(ae=ae.delay,ae=typeof ae=="number"&&0<ae?ve+ae:ve):ae=ve,X){case 1:var xe=-1;break;case 2:xe=250;break;case 5:xe=1073741823;break;case 4:xe=1e4;break;default:xe=5e3}return xe=ae+xe,X={id:x++,callback:W,priorityLevel:X,startTime:ae,expirationTime:xe,sortIndex:-1},ae>ve?(X.sortIndex=ae,a(y,X),i(g)===null&&X===i(y)&&(N?(C(R),R=-1):N=!0,ee(z,ae-ve))):(X.sortIndex=xe,a(g,X),j||w||(j=!0,_||(_=!0,oe()))),X},n.unstable_shouldYield=$,n.unstable_wrapCallback=function(X){var W=S;return function(){var ae=S;S=W;try{return X.apply(this,arguments)}finally{S=ae}}}})(Zd)),Zd}var sy;function U2(){return sy||(sy=1,Pd.exports=H2()),Pd.exports}var Jd={exports:{}},kt={};/**
|
|
26
26
|
* @license React
|
|
27
27
|
* react-dom.production.js
|
|
28
28
|
*
|
|
@@ -30,7 +30,7 @@ var Av=n=>{throw TypeError(n)};var Rd=(n,s,i)=>s.has(n)||Av("Cannot "+i);var L=(
|
|
|
30
30
|
*
|
|
31
31
|
* This source code is licensed under the MIT license found in the
|
|
32
32
|
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var
|
|
33
|
+
*/var iy;function $2(){if(iy)return kt;iy=1;var n=pm();function a(x){var v="https://react.dev/errors/"+x;if(1<arguments.length){v+="?args[]="+encodeURIComponent(arguments[1]);for(var S=2;S<arguments.length;S++)v+="&args[]="+encodeURIComponent(arguments[S])}return"Minified React error #"+x+"; visit "+v+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var o={d:{f:i,r:function(){throw Error(a(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},u=Symbol.for("react.portal"),d=Symbol.for("react.recoverable"),h=Symbol.for("react.optimistic_key");function m(x,v,S){var w=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:w==null?null:w===h?h:""+w,children:x,containerInfo:v,implementation:S}}var g=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function y(x,v){if(x==="font")return"";if(typeof v=="string")return v==="use-credentials"?v:""}return kt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,kt.browser=function(x){return{$$typeof:d,_reason:x}},kt.createPortal=function(x,v){var S=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!v||v.nodeType!==1&&v.nodeType!==9&&v.nodeType!==11)throw Error(a(299));return m(x,v,null,S)},kt.flushSync=function(x){var v=g.T,S=o.p;try{if(g.T=null,o.p=2,x)return x()}finally{g.T=v,o.p=S,o.d.f()}},kt.preconnect=function(x,v){typeof x=="string"&&(v?(v=v.crossOrigin,v=typeof v=="string"?v==="use-credentials"?v:"":void 0):v=null,o.d.C(x,v))},kt.prefetchDNS=function(x){typeof x=="string"&&o.d.D(x)},kt.preinit=function(x,v){if(typeof x=="string"&&v&&typeof v.as=="string"){var S=v.as,w=y(S,v.crossOrigin),j=typeof v.integrity=="string"?v.integrity:void 0,N=typeof v.fetchPriority=="string"?v.fetchPriority:void 0;S==="style"?o.d.S(x,typeof v.precedence=="string"?v.precedence:void 0,{crossOrigin:w,integrity:j,fetchPriority:N}):S==="script"&&o.d.X(x,{crossOrigin:w,integrity:j,fetchPriority:N,nonce:typeof v.nonce=="string"?v.nonce:void 0})}},kt.preinitModule=function(x,v){if(typeof x=="string")if(typeof v=="object"&&v!==null){if(v.as==null||v.as==="script"){var S=y(v.as,v.crossOrigin);o.d.M(x,{crossOrigin:S,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0,fetchPriority:typeof v.fetchPriority=="string"?v.fetchPriority:void 0})}}else v==null&&o.d.M(x)},kt.preload=function(x,v){if(typeof x=="string"&&typeof v=="object"&&v!==null&&typeof v.as=="string"){var S=v.as,w=y(S,v.crossOrigin);o.d.L(x,S,{crossOrigin:w,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0,type:typeof v.type=="string"?v.type:void 0,fetchPriority:typeof v.fetchPriority=="string"?v.fetchPriority:void 0,referrerPolicy:typeof v.referrerPolicy=="string"?v.referrerPolicy:void 0,imageSrcSet:typeof v.imageSrcSet=="string"?v.imageSrcSet:void 0,imageSizes:typeof v.imageSizes=="string"?v.imageSizes:void 0,media:typeof v.media=="string"?v.media:void 0})}},kt.preloadModule=function(x,v){if(typeof x=="string")if(v){var S=y(v.as,v.crossOrigin);o.d.m(x,{as:typeof v.as=="string"&&v.as!=="script"?v.as:void 0,crossOrigin:S,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0,fetchPriority:typeof v.fetchPriority=="string"?v.fetchPriority:void 0})}else o.d.m(x)},kt.requestFormReset=function(x){o.d.r(x)},kt.unstable_batchedUpdates=function(x,v){return x(v)},kt.useFormState=function(x,v,S){return g.H.useFormState(x,v,S)},kt.useFormStatus=function(){return g.H.useHostTransitionStatus()},kt.version="19.3.1",kt}var oy;function Sx(){if(oy)return Jd.exports;oy=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(a){console.error(a)}}return n(),Jd.exports=$2(),Jd.exports}/**
|
|
34
34
|
* @license React
|
|
35
35
|
* react-dom-client.production.js
|
|
36
36
|
*
|
|
@@ -38,15 +38,15 @@ var Av=n=>{throw TypeError(n)};var Rd=(n,s,i)=>s.has(n)||Av("Cannot "+i);var L=(
|
|
|
38
38
|
*
|
|
39
39
|
* This source code is licensed under the MIT license found in the
|
|
40
40
|
* LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/var
|
|
41
|
+
*/var ry;function V2(){if(ry)return $o;ry=1;var n=U2(),a=pm(),i=Sx();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)t+="&args[]="+encodeURIComponent(arguments[l])}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."}function u(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function d(e){for(var t=e,l=t;l&&!l.alternate;)t=l,(t.flags&4098)!==0&&(e=t.return),l=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function h(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 m(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function g(e){if(d(e)!==e)throw Error(o(188))}function y(e){var t=e.alternate;if(!t){if(t=d(e),t===null)throw Error(o(188));return t!==e?null:e}for(var l=e,s=t;;){var r=l.return;if(r===null)break;var f=r.alternate;if(f===null){if(s=r.return,s!==null){l=s;continue}break}if(r.child===f.child){for(f=r.child;f;){if(f===l)return g(r),e;if(f===s)return g(r),t;f=f.sibling}throw Error(o(188))}if(l.return!==s.return)l=r,s=f;else{for(var p=!1,b=r.child;b;){if(b===l){p=!0,l=r,s=f;break}if(b===s){p=!0,s=r,l=f;break}b=b.sibling}if(!p){for(b=f.child;b;){if(b===l){p=!0,l=f,s=r;break}if(b===s){p=!0,s=f,l=r;break}b=b.sibling}if(!p)throw Error(o(189))}}if(l.alternate!==s)throw Error(o(190))}if(l.tag!==3)throw Error(o(188));return l.stateNode.current===l?e:t}function x(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=x(e),t!==null)return t;e=e.sibling}return null}function v(e,t,l,s,r,f){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&l(e,s,r,f)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&v(e.child,t,l,s,r,f))return!0;e=e.sibling}return!1}function S(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function w(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),!(e.tag===3||e.tag===5||e.tag===27));)e=e.return;return t}function j(e){var t=[null,null],l=S(e);return l===null||N(t,e,l.child,{foundSelf:!1}),t}function N(e,t,l,s){for(;l!==null;){if(l===t)s.foundSelf=!0;else if(l.tag===5||l.tag===27||l.tag===6){if(s.foundSelf)return e[1]=l,!0;e[0]=l}else if((l.tag!==22||l.memoizedState===null)&&N(e,t,l.child,s))return!0;l=l.sibling}return!1}function M(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(o(559))}}var A=null,C=null;function D(e,t,l){return e===l?!0:e===t?(A=e,!0):!1}function O(e,t,l){return e===l?(C=e,!1):e===t?(C!==null&&(A=e),!0):!1}function z(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function _(e,t,l){for(var s=0,r=e;r;r=l(r))s++;r=0;for(var f=t;f;f=l(f))r++;for(;0<s-r;)e=l(e),s--;for(;0<r-s;)t=l(t),r--;for(;s--;){if(e===t||t!==null&&e===t.alternate)return e;e=l(e),t=l(t)}return null}var R=Object.assign,Q=Symbol.for("react.element"),K=Symbol.for("react.transitional.element"),$=Symbol.for("react.portal"),le=Symbol.for("react.fragment"),oe=Symbol.for("react.strict_mode"),te=Symbol.for("react.profiler"),Y=Symbol.for("react.consumer"),ee=Symbol.for("react.context"),X=Symbol.for("react.forward_ref"),W=Symbol.for("react.suspense"),ae=Symbol.for("react.suspense_list"),ve=Symbol.for("react.memo"),xe=Symbol.for("react.lazy"),He=Symbol.for("react.activity"),Fe=Symbol.for("react.legacy_hidden"),Ye=Symbol.for("react.memo_cache_sentinel"),L=Symbol.for("react.view_transition"),V=Symbol.for("react.recoverable"),ne=Symbol.iterator;function re(e){return e===null||typeof e!="object"?null:(e=ne&&e[ne]||e["@@iterator"],typeof e=="function"?e:null)}var me=Symbol.for("react.client.reference");function be(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===me?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case le:return"Fragment";case te:return"Profiler";case oe:return"StrictMode";case W:return"Suspense";case ae:return"SuspenseList";case He:return"Activity";case L:return"ViewTransition"}if(typeof e=="object")switch(e.$$typeof){case $:return"Portal";case ee:return e.displayName||"Context";case Y:return(e._context.displayName||"Context")+".Consumer";case X:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ve:return t=e.displayName||null,t!==null?t:be(e.type)||"Memo";case xe:t=e._payload,e=e._init;try{return be(e(t))}catch{}}return null}var Ce=Array.isArray,ue=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ge=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,rt={pending:!1,data:null,method:null,action:null},jt=[],mn=-1;function Et(e){return{current:e}}function mt(e){0>mn||(e.current=jt[mn],jt[mn]=null,mn--)}function Ie(e,t){mn++,jt[mn]=e.current,e.current=t}var Mt=Et(null),Cn=Et(null),Pt=Et(null),pt=Et(null);function $l(e,t){switch(Ie(Pt,t),Ie(Cn,e),Ie(Mt,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?rv(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=rv(t),e=uv(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}mt(Mt),Ie(Mt,e)}function ut(){mt(Mt),mt(Cn),mt(Pt)}function Zn(e){var t=e.memoizedState;t!==null&&(ui._currentValue=t.memoizedState,Ie(pt,e)),t=Mt.current;var l=uv(t,e.type);t!==l&&(Ie(Cn,e),Ie(Mt,l))}function Ot(e){Cn.current===e&&(mt(Mt),mt(Cn)),pt.current===e&&(mt(pt),ui._currentValue=rt)}var zt,za;function qt(e){if(zt===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);zt=t&&t[1]||"",za=-1<l.stack.indexOf(`
|
|
42
42
|
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+
|
|
44
|
-
`),B=
|
|
45
|
-
`);for(
|
|
46
|
-
`+
|
|
47
|
-
Error generating stack: `+
|
|
48
|
-
`+a.stack}}var Me=Object.prototype.hasOwnProperty,Ve=n.unstable_scheduleCallback,Fe=n.unstable_cancelCallback,Ct=n.unstable_shouldYield,st=n.unstable_requestPaint,et=n.unstable_now,Yn=n.unstable_getCurrentPriorityLevel,Dl=n.unstable_ImmediatePriority,ja=n.unstable_UserBlockingPriority,Ea=n.unstable_NormalPriority,Jr=n.unstable_LowPriority,Mi=n.unstable_IdlePriority,Wr=n.log,fe=n.unstable_setDisableYieldValue,Pe=null,nt=null;function bn(e){if(typeof Wr=="function"&&fe(e),nt&&typeof nt.setStrictMode=="function")try{nt.setStrictMode(Pe,e)}catch{}}var Xt=Math.clz32?Math.clz32:In,ec=Math.log,Ri=Math.LN2;function In(e){return e>>>=0,e===0?32:31-(ec(e)/Ri|0)|0}var Na=256,_a=262144,Ma=4194304;function dl(e){var t=e&42;if(t!==0)return t;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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ra(e,t,l){var a=e.pendingLanes;if(a===0)return 0;var o=0,c=e.suspendedLanes,g=e.pingedLanes;e=e.warmLanes;var S=a&134217727;return S!==0?(a=S&~c,a!==0?o=dl(a):(g&=S,g!==0?o=dl(g):l||(l=S&~e,l!==0&&(o=dl(l))))):(S=a&~c,S!==0?o=dl(S):g!==0?o=dl(g):l||(l=a&~e,l!==0&&(o=dl(l)))),o===0?0:t!==0&&t!==o&&(t&c)===0&&(c=o&-o,l=t&-t,c>=l||c===32&&(l&4194048)!==0)?t:o}function Hl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function dm(e,t){(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var a=31-Xt(l),o=1<<a;t|=e[a],l&=~o}return t}function yx(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32: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:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function hm(){var e=Ma;return Ma<<=1,(Ma&62914560)===0&&(Ma=4194304),e}function tc(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function Ti(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function xx(e,t,l,a,o,c){var g=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var S=e.entanglements,_=e.expirationTimes,B=e.hiddenUpdates;for(l=g&~l;0<l;){var Q=31-Xt(l),K=1<<Q;S[Q]=0,_[Q]=-1;var U=B[Q];if(U!==null)for(B[Q]=null,Q=0;Q<U.length;Q++){var q=U[Q];q!==null&&(q.lane&=-536870913)}l&=~K}a!==0&&mm(e,a,0),c!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=c&~(g&~t))}function mm(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-Xt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|l&261930}function gm(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var a=31-Xt(l),o=1<<a;o&t|e[a]&t&&(e[a]|=t),l&=~o}}function pm(e,t){var l=t&-t;return l=(l&42)!==0?1:nc(l),(l&(e.suspendedLanes|t))!==0?0:l}function nc(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function lc(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function vm(){var e=me.p;return e!==0?e:(e=window.event,e===void 0?32:jv(e.type))}function ym(e,t){var l=me.p;try{return me.p=e,t()}finally{me.p=l}}var hl=Math.random().toString(36).slice(2),Ot="__reactFiber$"+hl,an="__reactProps$"+hl,ms="__reactContainer$"+hl,xm="__reactEvents$"+hl,Sx="__reactListeners$"+hl,bx="__reactHandles$"+hl,Sm="__reactResources$"+hl,Ai="__reactMarker$"+hl,eo="__reactLoad$"+hl;function to(e){delete e[Ot],delete e[an],delete e[Sx],delete e[bx]}function Ta(e){var t;if(t=e[Ot])return t;for(var l=e.parentNode;l;){if(t=l[ms]||l[Ot]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=av(e);e!==null;){if(l=e[Ot])return l;e=av(e)}return t}e=l,l=e.parentNode}return null}function gs(e){if(e=e[Ot]||e[ms]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Oi(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function ps(e){var t=e[Sm];return t||(t=e[Sm]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function _t(e){e[Ai]=!0}function bm(e){e[eo]=void 0}var wm=new Set,Cm={};function Aa(e,t){vs(e,t),vs(e+"Capture",t)}function vs(e,t){for(Cm[e]=t,e=0;e<t.length;e++)wm.add(t[e])}var wx=RegExp("^[: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]*$"),jm={},Em={};function Cx(e){return Me.call(Em,e)?!0:Me.call(jm,e)?!1:wx.test(e)?Em[e]=!0:(jm[e]=!0,!1)}var Be=!1;function Nm(){var e=Be;return Be=!1,e}function no(e,t,l){if(Cx(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,l)}}function lo(e,t,l){if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,l)}}function ml(e,t,l,a){if(a===null)e.removeAttribute(l);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,a)}}function dn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function _m(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function jx(e,t,l){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var o=a.get,c=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(g){l=""+g,c.call(this,g)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(g){l=""+g},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ac(e){if(!e._valueTracker){var t=_m(e)?"checked":"value";e._valueTracker=jx(e,t,""+e[t])}}function Mm(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),a="";return e&&(a=_m(e)?e.checked?"true":"false":e.value),e=a,e!==l?(t.setValue(e),!0):!1}var Ex=/[\n"\\]/g;function wn(e){return e.replace(Ex,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function sc(e,t,l,a,o,c,g,S){e.name="",g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?e.type=g:e.removeAttribute("type"),t!=null?g==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+dn(t)):e.value!==""+dn(t)&&(e.value=""+dn(t)):g!=="submit"&&g!=="reset"||e.removeAttribute("value"),t!=null?g==="number"&&e.value==t?ic(e,dn(e.value)):ic(e,dn(t)):l!=null?ic(e,dn(l)):a!=null&&e.removeAttribute("value"),o==null&&c!=null&&(e.defaultChecked=!!c),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?e.name=""+dn(S):e.removeAttribute("name")}function Rm(e,t,l,a,o,c,g,S){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.type=c),t!=null||l!=null){if(!(c!=="submit"&&c!=="reset"||t!=null)){ac(e);return}l=l!=null?""+dn(l):"",t=t!=null?""+dn(t):l,S||t===e.value||(e.value=t),e.defaultValue=t}a=a??o,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=S?e.checked:!!a,e.defaultChecked=!!a,g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(e.name=g),ac(e)}function ic(e,t){e.defaultValue!==""+t&&(e.defaultValue=""+t)}function ys(e,t,l,a){if(e=e.options,t){t={};for(var o=0;o<l.length;o++)t["$"+l[o]]=!0;for(l=0;l<e.length;l++)o=t.hasOwnProperty("$"+e[l].value),e[l].selected!==o&&(e[l].selected=o),o&&a&&(e[l].defaultSelected=!0)}else{for(l=""+dn(l),t=null,o=0;o<e.length;o++){if(e[o].value===l){e[o].selected=!0,a&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Tm(e,t,l){if(t!=null&&(t=""+dn(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+dn(l):""}function Am(e,t,l,a){if(t==null){if(a!=null){if(l!=null)throw Error(r(92));if(be(a)){if(1<a.length)throw Error(r(93));a=a[0]}l=a}l==null&&(l=""),t=l}l=dn(t),e.defaultValue=l,a=e.textContent,a===l&&a!==""&&a!==null&&(e.value=a),ac(e)}function xs(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var Nx=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Om(e,t,l){var a=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,l):typeof l!="number"||l===0||Nx.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function zm(e,t,l){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,l!=null){for(var a in l)!l.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="",Be=!0);for(var o in t)a=t[o],t.hasOwnProperty(o)&&l[o]!==a&&(Om(e,o,a),Be=!0)}else for(var c in t)t.hasOwnProperty(c)&&Om(e,c,t[c])}function rc(e){if(e.indexOf("-")===-1)return!1;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 _x=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["maskType","mask-type"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Mx=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function ao(e){return Mx.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Xn(){}var oc=null;function uc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ss=null,bs=null;function Dm(e){var t=gs(e);if(t&&(e=t.stateNode)){var l=e[an]||null;e:switch(e=t.stateNode,t.type){case"input":if(sc(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),t=l.name,l.type==="radio"&&t!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+wn(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var a=l[t];if(a!==e&&a.form===e.form){var o=a[an]||null;if(!o)throw Error(r(90));sc(a,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<l.length;t++)a=l[t],a.form===e.form&&Mm(a)}break e;case"textarea":Tm(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&ys(e,!!l.multiple,t,!1)}}}var cc=!1;function Hm(e,t,l){if(cc)return e(t,l);cc=!0;try{var a=e(t);return a}finally{if(cc=!1,(Ss!==null||bs!==null)&&(su(),Ss&&(t=Ss,e=bs,bs=Ss=null,Dm(t),e)))for(t=0;t<e.length;t++)Dm(e[t])}}function zi(e,t){var l=e.stateNode;if(l===null)return null;var a=l[an]||null;if(a===null)return null;l=a[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":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(r(231,t,typeof l));return l}var gl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),fc=!1;if(gl)try{var Di={};Object.defineProperty(Di,"passive",{get:function(){fc=!0}}),window.addEventListener("test",Di,Di),window.removeEventListener("test",Di,Di)}catch{fc=!1}var Ll=null,dc=null,so=null;function Lm(){if(so)return so;var e,t=dc,l=t.length,a,o="value"in Ll?Ll.value:Ll.textContent,c=o.length;for(e=0;e<l&&t[e]===o[e];e++);var g=l-e;for(a=1;a<=g&&t[l-a]===o[c-a];a++);return so=o.slice(e,1<a?1-a:void 0)}function io(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 ro(){return!0}function Um(){return!1}function Kt(e){function t(l,a,o,c,g){this._reactName=l,this._targetInst=o,this.type=a,this.nativeEvent=c,this.target=g,this.currentTarget=null;for(var S in e)e.hasOwnProperty(S)&&(l=e[S],this[S]=l?l(c):c[S]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?ro:Um,this.isPropagationStopped=Um,this}return z(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=ro)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=ro)},persist:function(){},isPersistent:ro}),t}var Ul={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},oo=Kt(Ul),Hi=z({},Ul,{view:0,detail:0}),Rx=Kt(Hi),hc,mc,Li,uo=z({},Hi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:pc,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!==Li&&(Li&&e.type==="mousemove"?(hc=e.screenX-Li.screenX,mc=e.screenY-Li.screenY):mc=hc=0,Li=e),hc)},movementY:function(e){return"movementY"in e?e.movementY:mc}}),Vm=Kt(uo),Tx=z({},uo,{dataTransfer:0}),Ax=Kt(Tx),Ox=z({},Hi,{relatedTarget:0}),gc=Kt(Ox),zx=z({},Ul,{animationName:0,elapsedTime:0,pseudoElement:0}),Dx=Kt(zx),Hx=z({},Ul,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Lx=Kt(Hx),Ux=z({},Ul,{data:0}),$m=Kt(Ux),Vx={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},$x={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Fx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Bx(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Fx[e])?!!t[e]:!1}function pc(){return Bx}var kx=z({},Hi,{key:function(e){if(e.key){var t=Vx[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=io(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?$x[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:pc,charCode:function(e){return e.type==="keypress"?io(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?io(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Gx=Kt(kx),qx=z({},uo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Fm=Kt(qx),Qx=z({},Ul,{submitter:0}),Yx=Kt(Qx),Ix=z({},Hi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:pc}),Xx=Kt(Ix),Kx=z({},Ul,{propertyName:0,elapsedTime:0,pseudoElement:0}),Zx=Kt(Kx),Px=z({},uo,{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}),Jx=Kt(Px),Wx=z({},Ul,{newState:0,oldState:0,source:0}),eS=Kt(Wx),tS=[9,13,27,32],vc=gl&&"CompositionEvent"in window,Ui=null;gl&&"documentMode"in document&&(Ui=document.documentMode);var nS=gl&&"TextEvent"in window&&!Ui,Bm=gl&&(!vc||Ui&&8<Ui&&11>=Ui),km=" ",Gm=!1;function qm(e,t){switch(e){case"keyup":return tS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Qm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ws=!1;function lS(e,t){switch(e){case"compositionend":return Qm(t);case"keypress":return t.which!==32?null:(Gm=!0,km);case"textInput":return e=t.data,e===km&&Gm?null:e;default:return null}}function aS(e,t){if(ws)return e==="compositionend"||!vc&&qm(e,t)?(e=Lm(),so=dc=Ll=null,ws=!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 Bm&&t.locale!=="ko"?null:t.data;default:return null}}var sS={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 Ym(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!sS[e.type]:t==="textarea"}function Im(e,t,l,a){Ss?bs?bs.push(a):bs=[a]:Ss=a,t=fu(t,"onChange"),0<t.length&&(l=new oo("onChange","change",null,l,a),e.push({event:l,listeners:t}))}var Vi=null,$i=null;function iS(e){D0(e,0)}function co(e){var t=Oi(e);if(Mm(t))return e}function Xm(e,t){if(e==="change")return t}var Km=!1;if(gl){var yc;if(gl){var xc="oninput"in document;if(!xc){var Zm=document.createElement("div");Zm.setAttribute("oninput","return;"),xc=typeof Zm.oninput=="function"}yc=xc}else yc=!1;Km=yc&&(!document.documentMode||9<document.documentMode)}function Pm(){Vi&&(Vi.detachEvent("onpropertychange",Jm),$i=Vi=null)}function Jm(e){if(e.propertyName==="value"&&co($i)){var t=[];Im(t,$i,e,uc(e)),Hm(iS,t)}}function rS(e,t,l){e==="focusin"?(Pm(),Vi=t,$i=l,Vi.attachEvent("onpropertychange",Jm)):e==="focusout"&&Pm()}function oS(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return co($i)}function uS(e,t){if(e==="click")return co(t)}function cS(e,t){if(e==="input"||e==="change")return co(t)}function fS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var hn=typeof Object.is=="function"?Object.is:fS;function Fi(e,t){if(hn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),a=Object.keys(t);if(l.length!==a.length)return!1;for(a=0;a<l.length;a++){var o=l[a];if(!Me.call(t,o)||!hn(e[o],t[o]))return!1}return!0}function Sc(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 Wm(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function eg(e,t){var l=Wm(e);e=0;for(var a;l;){if(l.nodeType===3){if(a=e+l.textContent.length,e<=t&&a>=t)return{node:l,offset:t-e};e=a}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Wm(l)}}function tg(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?tg(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ng(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Sc(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=Sc(e.document)}return t}function bc(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")}var dS=gl&&"documentMode"in document&&11>=document.documentMode,Cs=null,wc=null,Bi=null,Cc=!1;function lg(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Cc||Cs==null||Cs!==Sc(a)||(a=Cs,"selectionStart"in a&&bc(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Bi&&Fi(Bi,a)||(Bi=a,a=fu(wc,"onSelect"),0<a.length&&(t=new oo("onSelect","select",null,t,l),e.push({event:t,listeners:a}),t.target=Cs)))}function Oa(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var js={animationend:Oa("Animation","AnimationEnd"),animationiteration:Oa("Animation","AnimationIteration"),animationstart:Oa("Animation","AnimationStart"),transitionrun:Oa("Transition","TransitionRun"),transitionstart:Oa("Transition","TransitionStart"),transitioncancel:Oa("Transition","TransitionCancel"),transitionend:Oa("Transition","TransitionEnd")},jc={},ag={};gl&&(ag=document.createElement("div").style,"AnimationEvent"in window||(delete js.animationend.animation,delete js.animationiteration.animation,delete js.animationstart.animation),"TransitionEvent"in window||delete js.transitionend.transition);function za(e){if(jc[e])return jc[e];if(!js[e])return e;var t=js[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in ag)return jc[e]=t[l];return e}var sg=za("animationend"),ig=za("animationiteration"),rg=za("animationstart"),hS=za("transitionrun"),mS=za("transitionstart"),gS=za("transitioncancel"),og=za("transitionend"),ug=new Map,Ec="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError 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(" ");Ec.push("scrollEnd");function Dn(e,t){ug.set(e,t),Aa(t,[e])}var pS=0;function pl(e,t){if(e.name!=null&&e.name!=="auto")return e.name;if(t.autoName!==null)return t.autoName;e=Vn.identifierPrefix;var l=pS++;return e="_"+e+"t_"+l.toString(32)+"_",t.autoName=e}function cg(e){if(e==null||typeof e=="string")return e;var t=null,l=qs;if(l!==null)for(var a=0;a<l.length;a++){var o=e[l[a]];if(o!=null){if(o==="none")return"none";t=t==null?o:t+(" "+o)}}return t??e.default}function vl(e,t){return e=cg(e),t=cg(t),t==null?e==="auto"?null:e:t==="auto"?null:t}var fo=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Cn=[],Es=0,Nc=0;function ho(){for(var e=Es,t=Nc=Es=0;t<e;){var l=Cn[t];Cn[t++]=null;var a=Cn[t];Cn[t++]=null;var o=Cn[t];Cn[t++]=null;var c=Cn[t];if(Cn[t++]=null,a!==null&&o!==null){var g=a.pending;g===null?o.next=o:(o.next=g.next,g.next=o),a.pending=o}c!==0&&fg(l,o,c)}}function mo(e,t,l,a){Cn[Es++]=e,Cn[Es++]=t,Cn[Es++]=l,Cn[Es++]=a,Nc|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function _c(e,t,l,a){return mo(e,t,l,a),go(e)}function Da(e,t){return mo(e,null,null,t),go(e)}function fg(e,t,l){e.lanes|=l;var a=e.alternate;a!==null&&(a.lanes|=l);for(var o=!1,c=e.return;c!==null;)c.childLanes|=l,a=c.alternate,a!==null&&(a.childLanes|=l),c.tag===22&&(e=c.stateNode,e===null||e._visibility&1||(o=!0)),e=c,c=c.return;return e.tag===3?(c=e.stateNode,o&&t!==null&&(o=31-Xt(l),e=c.hiddenUpdates,a=e[o],a===null?e[o]=[t]:a.push(t),t.lane=l|536870912),c):null}function go(e){if(50<ur)throw ur=0,au=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ns={};function vS(e,t,l,a){this.tag=e,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function sn(e,t,l,a){return new vS(e,t,l,a)}function Mc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function yl(e,t){var l=e.alternate;return l===null?(l=sn(e.tag,t,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=t,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&1206910976,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,t=e.dependencies,l.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function dg(e,t){e.flags&=1206910978;var l=e.alternate;return l===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,t=l.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function po(e,t,l,a,o,c){var g=0;if(a=e,typeof a=="function")Mc(a)&&(g=1);else if(typeof a=="string")g=Qb(e,l,pt.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(a){case $e:return e=sn(31,l,t,o),e.elementType=$e,e.lanes=c,e;case ne:return Ha(l.children,o,c,t);case ie:g=8,o|=24;break;case Ce:return e=sn(12,l,t,o|2),e.elementType=Ce,e.lanes=c,e;case J:return e=sn(13,l,t,o),e.elementType=J,e.lanes=c,e;case ue:return e=sn(19,l,t,o),e.elementType=ue,e.lanes=c,e;case Ie:case A:return e=o|32,e=sn(30,l,t,e),e.elementType=A,e.lanes=c,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case ee:g=10;break e;case X:g=9;break e;case P:g=11;break e;case Ee:g=14;break e;case je:g=16,a=null;break e}g=29,l=Error(r(130,e===null?"null":typeof e,"")),a=null}return t=sn(g,l,t,o),t.elementType=e,t.type=a,t.lanes=c,t}function Ha(e,t,l,a){return e=sn(7,e,a,t),e.lanes=l,e}function Rc(e,t,l){return e=sn(6,e,null,t),e.lanes=l,e}function hg(e){var t=sn(18,null,null,0);return t.stateNode=e,t}function Tc(e,t,l){return t=sn(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var mg=new WeakMap;function jn(e,t){if(typeof e=="object"&&e!==null){var l=mg.get(e);return l!==void 0?l:(t={value:e,source:t,stack:le(t)},mg.set(e,t),t)}return{value:e,source:t,stack:le(t)}}var _s=[],Ms=0,vo=null,ki=0,En=[],Nn=0,Vl=null,Kn=1,Zn="";function xl(e,t){_s[Ms++]=ki,_s[Ms++]=vo,vo=e,ki=t}function gg(e,t,l){En[Nn++]=Kn,En[Nn++]=Zn,En[Nn++]=Vl,Vl=e;var a=Kn;e=Zn;var o=32-Xt(a)-1;a&=~(1<<o),l+=1;var c=32-Xt(t)+o;if(30<c){var g=o-o%5;c=(a&(1<<g)-1).toString(32),a>>=g,o-=g,Kn=1<<32-Xt(t)+o|l<<o|a,Zn=c+e}else Kn=1<<c|l<<o|a,Zn=e}function yo(e){e.return!==null&&(xl(e,1),gg(e,1,0))}function Ac(e){for(;e===vo;)vo=_s[--Ms],_s[Ms]=null,ki=_s[--Ms],_s[Ms]=null;for(;e===Vl;)Vl=En[--Nn],En[Nn]=null,Zn=En[--Nn],En[Nn]=null,Kn=En[--Nn],En[Nn]=null}function pg(e,t){En[Nn++]=Kn,En[Nn++]=Zn,En[Nn++]=Vl,Kn=t.id,Zn=t.overflow,Vl=e}var Mt=null,lt=null,Re=!1,$l=null,_n=!1,Oc=Error(r(519));function Fl(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Gi(jn(t,e)),Oc}function vg(e){var t=e.stateNode,l=e.type,a=e.memoizedProps;switch(t[Ot]=e,t[an]=a,l){case"dialog":Ae("cancel",t),Ae("close",t);break;case"iframe":case"object":case"embed":Ae("load",t);break;case"video":case"audio":for(l=0;l<fr.length;l++)Ae(fr[l],t);break;case"source":Ae("error",t);break;case"img":case"image":case"link":Ae("error",t),Ae("load",t);break;case"details":Ae("toggle",t);break;case"input":Ae("invalid",t),Rm(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":Ae("invalid",t);break;case"textarea":Ae("invalid",t),Am(t,a.value,a.defaultValue,a.children)}l=a.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||a.suppressHydrationWarning===!0||V0(t.textContent,l)?(a.popover!=null&&(Ae("beforetoggle",t),Ae("toggle",t)),a.onScroll!=null&&Ae("scroll",t),a.onScrollEnd!=null&&Ae("scrollend",t),a.onClick!=null&&(t.onclick=Xn),t=!0):t=!1,t||Fl(e,!0)}function xo(e){for(Mt=e.return;Mt;)switch(Mt.tag){case 5:case 31:case 13:_n=!1;return;case 27:case 3:_n=!0;return;default:Mt=Mt.return}}function Rs(e){if(e!==Mt)return!1;if(!Re)return xo(e),Re=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||ud(e.type,e.memoizedProps)),l=!l),l&<&&Fl(e),xo(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));lt=lv(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));lt=lv(e)}else t===27?(t=lt,na(e.type)?(e=yd,yd=null,lt=e):lt=t):lt=Mt?Rn(e.stateNode.nextSibling):null;return!0}function La(){lt=Mt=null,Re=!1}function zc(){var e=$l;return e!==null&&(un===null?un=e:un.push.apply(un,e),$l=null),e}function Gi(e){$l===null?$l=[e]:$l.push(e)}var Dc=Nt(null),Ua=null,Sl=null;function Bl(e,t,l){Ge(Dc,t._currentValue),t._currentValue=l}function bl(e){e._currentValue=Dc.current,ot(Dc)}function So(e,t,l){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===l)break;e=e.return}}function Hc(e,t,l,a){var o=e.child;for(o!==null&&(o.return=e);o!==null;){var c=o.dependencies;if(c!==null){var g=o.child;c=c.firstContext;e:for(;c!==null;){var S=c;c=o;for(var _=0;_<t.length;_++)if(S.context===t[_]){c.lanes|=l,S=c.alternate,S!==null&&(S.lanes|=l),So(c.return,l,e),a||(g=null);break e}c=S.next}}else if(o.tag===18){if(g=o.return,g===null)throw Error(r(341));g.lanes|=l,c=g.alternate,c!==null&&(c.lanes|=l),So(g,l,e),g=null}else o.tag===13&&o.memoizedState!==null&&o.memoizedState.dehydrated===null?(o.lanes|=l,g=o.alternate,g!==null&&(g.lanes|=l),So(o.return,l,e),g=o.child,g=g!==null?g.sibling:null):g=o.child;if(g!==null)g.return=o;else for(g=o;g!==null;){if(g===e){g=null;break}if(o=g.sibling,o!==null){o.return=g.return,g=o;break}g=g.return}o=g}}function Va(e,t,l,a){e=null;for(var o=t,c=!1;o!==null;){if(!c){if((o.flags&524288)!==0)c=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var g=o.alternate;if(g===null)throw Error(r(387));if(g=g.memoizedProps,g!==null){var S=o.type;hn(o.pendingProps.value,g.value)||(e!==null?e.push(S):e=[S])}}else if(o===nn.current){if(g=o.alternate,g===null)throw Error(r(387));g.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(ei):e=[ei])}o=o.return}return e!==null&&Hc(t,e,l,a),t.flags|=262144,e!==null}function bo(e){for(e=e.firstContext;e!==null;){if(!hn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function $a(e){Ua=e,Sl=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function zt(e){return yg(Ua,e)}function wo(e,t){return Ua===null&&$a(e),yg(e,t)}function yg(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},Sl===null){if(e===null)throw Error(r(308));Sl=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Sl=Sl.next=t;return l}var yS=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},xS=n.unstable_scheduleCallback,SS=n.unstable_NormalPriority,yt={$$typeof:ee,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Lc(){return{controller:new yS,data:new Map,refCount:0}}function qi(e){e.refCount--,e.refCount===0&&xS(SS,function(){e.controller.abort()})}function xg(e,t){if((e.pendingLanes&4194048)!==0){var l=e.transitionTypes;for(l===null&&(l=e.transitionTypes=[]),e=0;e<t.length;e++){var a=t[e];l.indexOf(a)===-1&&l.push(a)}}}var Qi=null;function bS(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Yi=null,Uc=0,Fa=0,Ts=null;function wS(e,t){if(Yi===null){var l=Yi=[];Uc=0,Fa=ed(),Ts={status:"pending",value:void 0,then:function(a){l.push(a)}}}return Uc++,t.then(Sg,Sg),t}function Sg(){if(--Uc===0&&(Qi=null,Yi!==null)){Ts!==null&&(Ts.status="fulfilled");var e=Yi;Yi=null,Fa=0,Ts=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function CS(e,t){var l=[],a={status:"pending",value:null,reason:null,then:function(o){l.push(o)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var o=0;o<l.length;o++)(0,l[o])(t)},function(o){for(a.status="rejected",a.reason=o,o=0;o<l.length;o++)(0,l[o])(void 0)}),a}var bg=re.S;re.S=function(e,t){if(h0=et(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&wS(e,t),Qi!==null)for(var l=Xs;l!==null;)xg(l,Qi),l=l.next;if(l=e.types,l!==null){for(var a=Xs;a!==null;)xg(a,l),a=a.next;if(Fa!==0){a=Qi,a===null&&(a=Qi=[]);for(var o=0;o<l.length;o++){var c=l[o];a.indexOf(c)===-1&&a.push(c)}}}bg!==null&&bg(e,t)};var Ba=Nt(null);function Vc(){var e=Ba.current;return e!==null?e:tt.pooledCache}function Co(e,t){t===null?Ge(Ba,Ba.current):Ge(Ba,t.pool)}function wg(){var e=Vc();return e===null?null:{parent:yt._currentValue,pool:e}}var As=Error(r(460)),$c=Error(r(474)),jo=Error(r(542)),Eo={then:function(){}};function Cg(e){return e=e.status,e==="fulfilled"||e==="rejected"}function jg(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(Xn,Xn),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ng(e),e===void 0&&!("reason"in t)?Error(r(600)):e;default:if(typeof t.status=="string")t.then(Xn,Xn);else{if(e=tt,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var o=t;o.status="fulfilled",o.value=a}},function(a){if(t.status==="pending"){var o=t;o.status="rejected",o.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ng(e),e}throw Ga=t,As}}function ka(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Ga=l,As):l}}var Ga=null;function Eg(){if(Ga===null)throw Error(r(459));var e=Ga;return Ga=null,e}function Ng(e){if(e===As||e===jo)throw Error(r(483))}var Os=null,Ii=0;function No(e){var t=Ii;return Ii+=1,Os===null&&(Os=[]),jg(Os,e,t)}function kl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function _o(e,t){throw t.$$typeof===Y?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function _g(e){function t($,O){if(e){var G=$.deletions;G===null?($.deletions=[O],$.flags|=16):G.push(O)}}function l($,O){if(!e)return null;for(;O!==null;)t($,O),O=O.sibling;return null}function a($){for(var O=new Map;$!==null;)$.key===null?O.set($.index,$):O.set($.key,$),$=$.sibling;return O}function o($,O){return $=yl($,O),$.index=0,$.sibling=null,$}function c($,O,G){return $.index=G,e?(G=$.alternate,G!==null?(G=G.index,G<O?($.flags|=2,O):G):($.flags|=134217730,O)):($.flags|=1048576,O)}function g($){return e&&$.alternate===null&&($.flags|=134217730),$}function S($,O,G,I){return O===null||O.tag!==6?(O=Rc(G,$.mode,I),O.return=$,O):(O=o(O,G),O.return=$,O)}function _($,O,G,I){var ce=G.type;return ce===ne?($=Q($,O,G.props.children,I,G.key),kl($,G),$):O!==null&&(O.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===je&&ka(ce)===O.type)?(O=o(O,G.props),kl(O,G),O.return=$,O):(O=po(G.type,G.key,G.props,null,$.mode,I),kl(O,G),O.return=$,O)}function B($,O,G,I){return O===null||O.tag!==4||O.stateNode.containerInfo!==G.containerInfo||O.stateNode.implementation!==G.implementation?(O=Tc(G,$.mode,I),O.return=$,O):(O=o(O,G.children||[]),O.return=$,O)}function Q($,O,G,I,ce){return O===null||O.tag!==7?(O=Ha(G,$.mode,I,ce),O.return=$,O):(O=o(O,G),O.return=$,O)}function K($,O,G){if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return O=Rc(""+O,$.mode,G),O.return=$,O;if(typeof O=="object"&&O!==null){switch(O.$$typeof){case te:return G=po(O.type,O.key,O.props,null,$.mode,G),kl(G,O),G.return=$,G;case k:return O=Tc(O,$.mode,G),O.return=$,O;case je:return O=ka(O),K($,O,G)}if(be(O)||se(O))return O=Ha(O,$.mode,G,null),O.return=$,O;if(typeof O.then=="function")return K($,No(O),G);if(O.$$typeof===ee)return K($,wo($,O),G);_o($,O)}return null}function U($,O,G,I){var ce=O!==null?O.key:null;if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return ce!==null?null:S($,O,""+G,I);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case te:return G.key===ce?_($,O,G,I):null;case k:return G.key===ce?B($,O,G,I):null;case je:return G=ka(G),U($,O,G,I)}if(be(G)||se(G))return ce!==null?null:Q($,O,G,I,null);if(typeof G.then=="function")return U($,O,No(G),I);if(G.$$typeof===ee)return U($,O,wo($,G),I);_o($,G)}return null}function q($,O,G,I,ce){if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return $=$.get(G)||null,S(O,$,""+I,ce);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case te:return $=$.get(I.key===null?G:I.key)||null,_(O,$,I,ce);case k:return $=$.get(I.key===null?G:I.key)||null,B(O,$,I,ce);case je:return I=ka(I),q($,O,G,I,ce)}if(be(I)||se(I))return $=$.get(G)||null,Q(O,$,I,ce,null);if(typeof I.then=="function")return q($,O,G,No(I),ce);if(I.$$typeof===ee)return q($,O,G,wo(O,I),ce);_o(O,I)}return null}function ae($,O,G,I){for(var ce=null,ze=null,ge=O,ve=O=0,bt=null;ge!==null&&ve<G.length;ve++){ge.index>ve?(bt=ge,ge=null):bt=ge.sibling;var Le=U($,ge,G[ve],I);if(Le===null){ge===null&&(ge=bt);break}e&&ge&&Le.alternate===null&&t($,ge),O=c(Le,O,ve),ze===null?ce=Le:ze.sibling=Le,ze=Le,ge=bt}if(ve===G.length)return l($,ge),Re&&xl($,ve),ce;if(ge===null){for(;ve<G.length;ve++)ge=K($,G[ve],I),ge!==null&&(O=c(ge,O,ve),ze===null?ce=ge:ze.sibling=ge,ze=ge);return Re&&xl($,ve),ce}for(ge=a(ge);ve<G.length;ve++)bt=q(ge,$,ve,G[ve],I),bt!==null&&(e&&(Le=bt.alternate,Le!==null&&ge.delete(Le.key===null?ve:Le.key)),O=c(bt,O,ve),ze===null?ce=bt:ze.sibling=bt,ze=bt);return e&&ge.forEach(function(ra){return t($,ra)}),Re&&xl($,ve),ce}function de($,O,G,I){if(G==null)throw Error(r(151));for(var ce=null,ze=null,ge=O,ve=O=0,bt=null,Le=G.next();ge!==null&&!Le.done;ve++,Le=G.next()){ge.index>ve?(bt=ge,ge=null):bt=ge.sibling;var ra=U($,ge,Le.value,I);if(ra===null){ge===null&&(ge=bt);break}e&&ge&&ra.alternate===null&&t($,ge),O=c(ra,O,ve),ze===null?ce=ra:ze.sibling=ra,ze=ra,ge=bt}if(Le.done)return l($,ge),Re&&xl($,ve),ce;if(ge===null){for(;!Le.done;ve++,Le=G.next())Le=K($,Le.value,I),Le!==null&&(O=c(Le,O,ve),ze===null?ce=Le:ze.sibling=Le,ze=Le);return Re&&xl($,ve),ce}for(ge=a(ge);!Le.done;ve++,Le=G.next())Le=q(ge,$,ve,Le.value,I),Le!==null&&(e&&(bt=Le.alternate,bt!==null&&ge.delete(bt.key===null?ve:bt.key)),O=c(Le,O,ve),ze===null?ce=Le:ze.sibling=Le,ze=Le);return e&&ge.forEach(function(l2){return t($,l2)}),Re&&xl($,ve),ce}function _e($,O,G,I){if(typeof G=="object"&&G!==null&&G.type===ne&&G.key===null&&G.props.ref===void 0&&(G=G.props.children),typeof G=="object"&&G!==null){switch(G.$$typeof){case te:e:{for(var ce=G.key;O!==null;){if(O.key===ce){if(ce=G.type,ce===ne){if(O.tag===7){l($,O.sibling),I=o(O,G.props.children),kl(I,G),I.return=$,$=I;break e}}else if(O.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===je&&ka(ce)===O.type){l($,O.sibling),I=o(O,G.props),kl(I,G),I.return=$,$=I;break e}l($,O);break}else t($,O);O=O.sibling}G.type===ne?(I=Ha(G.props.children,$.mode,I,G.key),kl(I,G),I.return=$,$=I):(I=po(G.type,G.key,G.props,null,$.mode,I),kl(I,G),I.return=$,$=I)}return g($);case k:e:{for(ce=G.key;O!==null;){if(O.key===ce)if(O.tag===4&&O.stateNode.containerInfo===G.containerInfo&&O.stateNode.implementation===G.implementation){l($,O.sibling),I=o(O,G.children||[]),I.return=$,$=I;break e}else{l($,O);break}else t($,O);O=O.sibling}I=Tc(G,$.mode,I),I.return=$,$=I}return g($);case je:return G=ka(G),_e($,O,G,I)}if(be(G))return ae($,O,G,I);if(se(G)){if(ce=se(G),typeof ce!="function")throw Error(r(150));return G=ce.call(G),de($,O,G,I)}if(typeof G.then=="function")return _e($,O,No(G),I);if(G.$$typeof===ee)return _e($,O,wo($,G),I);_o($,G)}return typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint"?(G=""+G,O!==null&&O.tag===6?(l($,O.sibling),I=o(O,G),I.return=$,$=I):(l($,O),I=Rc(G,$.mode,I),I.return=$,$=I),g($)):l($,O)}return function($,O,G,I){try{Ii=0;var ce=_e($,O,G,I);return Os=null,ce}catch(ge){if(ge===As||ge===jo)throw ge;var ze=sn(29,ge,null,$.mode);return ze.lanes=I,ze.return=$,ze}finally{}}}var qa=_g(!0),Mg=_g(!1),Gl=!1;function Fc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Bc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ql(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ql(e,t,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(qe&2)!==0){var o=a.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),a.pending=t,t=go(e),fg(e,null,l),t}return mo(e,a,t,l),go(e)}function Xi(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,gm(e,l)}}function kc(e,t){var l=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var o=null,c=null;if(l=l.firstBaseUpdate,l!==null){do{var g={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};c===null?o=c=g:c=c.next=g,l=l.next}while(l!==null);c===null?o=c=t:c=c.next=t}else o=c=t;l={baseState:a.baseState,firstBaseUpdate:o,lastBaseUpdate:c,shared:a.shared,callbacks:a.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var Gc=!1;function Ki(){if(Gc){var e=Ts;if(e!==null)throw e}}function Zi(e,t,l,a){Gc=!1;var o=e.updateQueue;Gl=!1;var c=o.firstBaseUpdate,g=o.lastBaseUpdate,S=o.shared.pending;if(S!==null){o.shared.pending=null;var _=S,B=_.next;_.next=null,g===null?c=B:g.next=B,g=_;var Q=e.alternate;Q!==null&&(Q=Q.updateQueue,S=Q.lastBaseUpdate,S!==g&&(S===null?Q.firstBaseUpdate=B:S.next=B,Q.lastBaseUpdate=_))}if(c!==null){var K=o.baseState;g=0,Q=B=_=null,S=c;do{var U=S.lane&-536870913,q=U!==S.lane;if(q?(Oe&U)===U:(a&U)===U){U!==0&&U===Fa&&(Gc=!0),Q!==null&&(Q=Q.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var ae=e,de=S;U=t;var _e=l;switch(de.tag){case 1:if(ae=de.payload,typeof ae=="function"){K=ae.call(_e,K,U);break e}K=ae;break e;case 3:ae.flags=ae.flags&-65537|128;case 0:if(ae=de.payload,U=typeof ae=="function"?ae.call(_e,K,U):ae,U==null)break e;K=z({},K,U);break e;case 2:Gl=!0}}U=S.callback,U!==null&&(e.flags|=64,q&&(e.flags|=8192),q=o.callbacks,q===null?o.callbacks=[U]:q.push(U))}else q={lane:U,tag:S.tag,payload:S.payload,callback:S.callback,next:null},Q===null?(B=Q=q,_=K):Q=Q.next=q,g|=U;if(S=S.next,S===null){if(S=o.shared.pending,S===null)break;q=S,S=q.next,q.next=null,o.lastBaseUpdate=q,o.shared.pending=null}}while(!0);Q===null&&(_=K),o.baseState=_,o.firstBaseUpdate=B,o.lastBaseUpdate=Q,c===null&&(o.shared.lanes=0),Jl|=g,e.lanes=g,e.memoizedState=K}}function Rg(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function Tg(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)Rg(l[e],t)}var Yl=Nt(null),Mo=Nt(0);function Ag(e,t){e=Nl,Ge(Mo,e),Ge(Yl,t),Nl=e|t.baseLanes}function qc(){Ge(Mo,Nl),Ge(Yl,Yl.current)}function Qc(){Nl=Mo.current,ot(Yl),ot(Mo)}var Dt=Nt(null),qt=null;function Il(e){var t=e.alternate;Ge(Ht,Ht.current&1),Ge(Dt,e),qt===null&&(t===null||Yl.current!==null||t.memoizedState!==null)&&(qt=e)}function Yc(e){Ge(Ht,Ht.current),Ge(Dt,e),qt===null&&(qt=e)}function Og(e){e.tag===22?(Ge(Ht,Ht.current),Ge(Dt,e),qt===null&&(qt=e)):Xl()}function Xl(){Ge(Ht,Ht.current),Ge(Dt,Dt.current)}function mn(e){ot(Dt),qt===e&&(qt=null),ot(Ht)}var Ht=Nt(0);function Pi(e,t){Ge(Dt,Dt.current),Ge(Ht,t)}function Ic(e){ot(Ht),ot(Dt),qt===e&&(qt=null)}function Ro(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||pd(l)||vd(l)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!=="independent"){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=0,Ne=null,Je=null,xt=null,To=!1,zs=!1,Qa=!1,Ao=0,Ji=0,Ds=null,jS=0;function mt(){throw Error(r(321))}function Xc(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!hn(e[l],t[l]))return!1;return!0}function Kc(e,t,l,a,o,c){return wl=c,Ne=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,re.H=e===null||e.memoizedState===null?gp:pp,Qa=!1,c=l(a,o),Qa=!1,zs&&(c=Dg(t,l,a,o)),zg(e),c}function zg(e){re.H=Vo;var t=Je!==null&&Je.next!==null;if(wl=0,xt=Je=Ne=null,To=!1,Ji=0,Ds=null,t)throw Error(r(300));e===null||St||(e=e.dependencies,e!==null&&bo(e)&&(St=!0))}function Dg(e,t,l,a){Ne=e;var o=0;do{if(zs&&(Ds=null),Ji=0,zs=!1,25<=o)throw Error(r(301));if(o+=1,xt=Je=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}re.H=OS,c=t(l,a)}while(zs);return c}function ES(){var e=re.H,t=e.useState()[0];return t=typeof t.then=="function"?Wi(t):t,e=e.useState()[0],(Je!==null?Je.memoizedState:null)!==e&&(Ne.flags|=1024),t}function Zc(){var e=Ao!==0;return Ao=0,e}function Pc(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function Jc(e){if(To){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}To=!1}wl=0,xt=Je=Ne=null,zs=!1,Ji=Ao=0,Ds=null}function Zt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return xt===null?Ne.memoizedState=xt=e:xt=xt.next=e,xt}function vt(){if(Je===null){var e=Ne.alternate;e=e!==null?e.memoizedState:null}else e=Je.next;var t=xt===null?Ne.memoizedState:xt.next;if(t!==null)xt=t,Je=e;else{if(e===null)throw Ne.alternate===null?Error(r(467)):Error(r(310));Je=e,e={memoizedState:Je.memoizedState,baseState:Je.baseState,baseQueue:Je.baseQueue,queue:Je.queue,next:null},xt===null?Ne.memoizedState=xt=e:xt=xt.next=e}return xt}function Oo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Wi(e){var t=Ji;return Ji+=1,Ds===null&&(Ds=[]),e=jg(Ds,e,t),t=Ne,(xt===null?t.memoizedState:xt.next)===null&&(t=t.alternate,re.H=t===null||t.memoizedState===null?gp:pp),e}function zo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Wi(e);if(e.$$typeof===V)return;if(e.$$typeof===ee)return zt(e)}throw Error(r(438,String(e)))}function Wc(e){var t=null,l=Ne.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var a=Ne.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(o){return o.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=Oo(),Ne.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),a=0;a<e;a++)l[a]=We;return t.index++,l}function Cl(e,t){return typeof t=="function"?t(e):t}function Do(e){var t=vt();return ef(t,Je,e)}function ef(e,t,l){var a=e.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=l;var o=e.baseQueue,c=a.pending;if(c!==null){if(o!==null){var g=o.next;o.next=c.next,c.next=g}t.baseQueue=o=c,a.pending=null}if(c=e.baseState,o===null)e.memoizedState=c;else{t=o.next;var S=g=null,_=null,B=t,Q=!1;do{var K=B.lane&-536870913;if(K!==B.lane?(Oe&K)===K:(wl&K)===K){var U=B.revertLane;if(U===0)_!==null&&(_=_.next={lane:0,revertLane:0,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null}),K===Fa&&(Q=!0);else if((wl&U)===U){B=B.next,U===Fa&&(Q=!0);continue}else K={lane:0,revertLane:B.revertLane,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},_===null?(S=_=K,g=c):_=_.next=K,Ne.lanes|=U,Jl|=U;K=B.action,Qa&&l(c,K),c=B.hasEagerState?B.eagerState:l(c,K)}else U={lane:K,revertLane:B.revertLane,gesture:B.gesture,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},_===null?(S=_=U,g=c):_=_.next=U,Ne.lanes|=K,Jl|=K;B=B.next}while(B!==null&&B!==t);if(_===null?g=c:_.next=S,!hn(c,e.memoizedState)&&(St=!0,Q&&(l=Ts,l!==null)))throw l;e.memoizedState=c,e.baseState=g,e.baseQueue=_,a.lastRenderedState=c}return o===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function tf(e){var t=vt(),l=t.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=e;var a=l.dispatch,o=l.pending,c=t.memoizedState;if(o!==null){l.pending=null;var g=o=o.next;do c=e(c,g.action),g=g.next;while(g!==o);hn(c,t.memoizedState)||(St=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),l.lastRenderedState=c}return[c,a]}function Hg(e,t,l){var a=Ne,o=vt(),c=Re;if(c){if(l===void 0)throw Error(r(407));l=l()}else l=t();var g=!hn((Je||o).memoizedState,l);if(g&&(o.memoizedState=l,St=!0),o=o.queue,af(Vg.bind(null,a,o,e),[e]),e=o.getSnapshot!==t||g||xt!==null&&(xt.memoizedState.tag&1)!==0,Hs(e?9:8,{destroy:void 0},Ug.bind(null,a,o,l,t),null),e){if(a.flags|=2048,tt===null)throw Error(r(349));c||(wl&127)!==0||Lg(a,t,l)}return l}function Lg(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=Ne.updateQueue,t===null?(t=Oo(),Ne.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function Ug(e,t,l,a){t.value=l,t.getSnapshot=a,$g(t)&&Fg(e)}function Vg(e,t,l){return l(function(){$g(t)&&Fg(e)})}function $g(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!hn(e,l)}catch{return!0}}function Fg(e){var t=Da(e,2);t!==null&&cn(t,e,2)}function nf(e){var t=Zt();if(typeof e=="function"){var l=e;if(e=l(),Qa){bn(!0);try{l()}finally{bn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Cl,lastRenderedState:e},t}function Bg(e,t,l,a){return e.baseState=l,ef(e,Je,typeof a=="function"?a:Cl)}function NS(e,t,l,a,o){if(Uo(e))throw Error(r(485));if(e=t.action,e!==null){var c={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(g){c.listeners.push(g)}};re.T!==null?l(!0):c.isTransition=!1,a(c),l=t.pending,l===null?(c.next=t.pending=c,kg(t,c)):(c.next=l.next,t.pending=l.next=c)}}function kg(e,t){var l=t.action,a=t.payload,o=e.state;if(t.isTransition){var c=re.T,g={};g.types=c!==null?c.types:null,re.T=g;try{var S=l(o,a),_=re.S;_!==null&&_(g,S),Gg(e,t,S)}catch(B){lf(e,t,B)}finally{c!==null&&g.types!==null&&(c.types=g.types),re.T=c}}else try{c=l(o,a),Gg(e,t,c)}catch(B){lf(e,t,B)}}function Gg(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){qg(e,t,a)},function(a){return lf(e,t,a)}):qg(e,t,l)}function qg(e,t,l){t.status="fulfilled",t.value=l,Qg(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,kg(e,l)))}function lf(e,t,l){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=l,Qg(t),t=t.next;while(t!==a)}e.action=null}function Qg(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Yg(e,t){return t}function Ig(e,t){if(Re){var l=tt.formState;if(l!==null){e:{var a=Ne;if(Re){if(lt){t:{for(var o=lt,c=_n;o.nodeType!==8;){if(!c){o=null;break t}if(o=Rn(o.nextSibling),o===null){o=null;break t}}c=o.data,o=c==="F!"||c==="F"?o:null}if(o){lt=Rn(o.nextSibling),a=o.data==="F!";break e}}Fl(a)}a=!1}a&&(t=l[0])}}return l=Zt(),l.memoizedState=l.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yg,lastRenderedState:t},l.queue=a,l=dp.bind(null,Ne,a),a.dispatch=l,a=nf(!1),c=cf.bind(null,Ne,!1,a.queue),a=Zt(),o={state:t,dispatch:null,action:e,pending:null},a.queue=o,l=NS.bind(null,Ne,o,c,l),o.dispatch=l,a.memoizedState=e,[t,l,!1]}function Xg(e){var t=vt();return Kg(t,Je,e)}function Kg(e,t,l){if(t=ef(e,t,Yg)[0],e=Do(Cl)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=Wi(t)}catch(g){throw g===As?jo:g}else a=t;t=vt();var o=t.queue,c=o.dispatch;return l!==t.memoizedState&&(Ne.flags|=2048,Hs(9,{destroy:void 0},_S.bind(null,o,l),null)),[a,c,e]}function _S(e,t){e.action=t}function Zg(e){var t=vt(),l=Je;if(l!==null)return Kg(t,l,e);vt(),t=t.memoizedState,l=vt();var a=l.queue.dispatch;return l.memoizedState=e,[t,a,!1]}function Hs(e,t,l,a){return e={tag:e,create:l,deps:a,inst:t,next:null},t=Ne.updateQueue,t===null&&(t=Oo(),Ne.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(a=l.next,l.next=e,e.next=a,t.lastEffect=e),e}function Pg(){return vt().memoizedState}function Ho(e,t,l,a){var o=Zt();Ne.flags|=e,o.memoizedState=Hs(1|t,{destroy:void 0},l,a===void 0?null:a)}function Lo(e,t,l,a){var o=vt();a=a===void 0?null:a;var c=o.memoizedState.inst;Je!==null&&a!==null&&Xc(a,Je.memoizedState.deps)?o.memoizedState=Hs(t,c,l,a):(Ne.flags|=e,o.memoizedState=Hs(1|t,c,l,a))}function Jg(e,t){Ho(8390656,8,e,t)}function af(e,t){Lo(2048,8,e,t)}function MS(e){Ne.flags|=4;var t=Ne.updateQueue;if(t===null)t=Oo(),Ne.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function Wg(e){var t=vt().memoizedState;return MS({ref:t,nextImpl:e}),function(){if((qe&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function ep(e,t){return Lo(4,2,e,t)}function tp(e,t){return Lo(4,4,e,t)}function np(e,t){if(typeof t=="function"){e=e();var l=t(e);return function(){typeof l=="function"?l():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function lp(e,t,l){l=l!=null?l.concat([e]):null,Lo(4,4,np.bind(null,t,e),l)}function sf(){}function ap(e,t){var l=vt();t=t===void 0?null:t;var a=l.memoizedState;return t!==null&&Xc(t,a[1])?a[0]:(l.memoizedState=[e,t],e)}function sp(e,t){var l=vt();t=t===void 0?null:t;var a=l.memoizedState;if(t!==null&&Xc(t,a[1]))return a[0];if(a=e(),Qa){bn(!0);try{e()}finally{bn(!1)}}return l.memoizedState=[a,t],a}function rf(e,t,l){return l===void 0||(wl&1073741824)!==0&&(Oe&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=g0(),Ne.lanes|=e,Jl|=e,l)}function ip(e,t,l,a){return hn(l,t)?l:Yl.current!==null?(e=rf(e,l,a),hn(e,t)||(St=!0),e):(wl&106)===0||(wl&1073741824)!==0&&(Oe&261930)===0?(St=!0,e.memoizedState=l):(e=g0(),Ne.lanes|=e,Jl|=e,t)}function rp(e,t,l,a,o){var c=me.p;me.p=c!==0&&8>c?c:8;var g=re.T,S={};S.types=g!==null?g.types:null,re.T=S,cf(e,!1,t,l);try{var _=o(),B=re.S;if(B!==null&&B(S,_),_!==null&&typeof _=="object"&&typeof _.then=="function"){var Q=CS(_,a);er(e,t,Q,yn(e))}else er(e,t,a,yn(e))}catch(K){er(e,t,{then:function(){},status:"rejected",reason:K},yn())}finally{me.p=c,g!==null&&S.types!==null&&(g.types=S.types),re.T=g}}function RS(){}function of(e,t,l,a){if(e.tag!==5)throw Error(r(476));var o=op(e).queue;rp(e,o,t,rt,l===null?RS:function(){return up(e),l(a)})}function op(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:rt,baseState:rt,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Cl,lastRenderedState:rt},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Cl,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function up(e){var t=op(e);t.next===null&&(t=e.alternate.memoizedState),er(e,t.next.queue,{},yn())}function uf(){return zt(ei)}function cp(){return vt().memoizedState}function fp(){return vt().memoizedState}function TS(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=yn();e=ql(l);var a=Ql(t,e,l);a!==null&&(cn(a,t,l),Xi(a,t,l)),t={cache:Lc()},e.payload=t;return}t=t.return}}function AS(e,t,l){var a=yn();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Uo(e)?hp(t,l):(l=_c(e,t,l,a),l!==null&&(cn(l,e,a),mp(l,t,a)))}function dp(e,t,l){var a=yn();er(e,t,l,a)}function er(e,t,l,a){var o={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Uo(e))hp(t,o);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var g=t.lastRenderedState,S=c(g,l);if(o.hasEagerState=!0,o.eagerState=S,hn(S,g))return mo(e,t,o,0),tt===null&&ho(),!1}catch{}finally{}if(l=_c(e,t,o,a),l!==null)return cn(l,e,a),mp(l,t,a),!0}return!1}function cf(e,t,l,a){if(a={lane:2,revertLane:ed(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Uo(e)){if(t)throw Error(r(479))}else t=_c(e,l,a,2),t!==null&&cn(t,e,2)}function Uo(e){var t=e.alternate;return e===Ne||t!==null&&t===Ne}function hp(e,t){zs=To=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function mp(e,t,l){if((l&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,gm(e,l)}}var Vo={readContext:zt,use:zo,useCallback:mt,useContext:mt,useEffect:mt,useImperativeHandle:mt,useLayoutEffect:mt,useInsertionEffect:mt,useMemo:mt,useReducer:mt,useRef:mt,useState:mt,useDebugValue:mt,useDeferredValue:mt,useTransition:mt,useSyncExternalStore:mt,useId:mt,useHostTransitionStatus:mt,useFormState:mt,useActionState:mt,useOptimistic:mt,useMemoCache:mt,useCacheRefresh:mt,useEffectEvent:mt},gp={readContext:zt,use:zo,useCallback:function(e,t){return Zt().memoizedState=[e,t===void 0?null:t],e},useContext:zt,useEffect:Jg,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,Ho(4194308,4,np.bind(null,t,e),l)},useLayoutEffect:function(e,t){return Ho(4194308,4,e,t)},useInsertionEffect:function(e,t){Ho(4,2,e,t)},useMemo:function(e,t){var l=Zt();t=t===void 0?null:t;var a=e();if(Qa){bn(!0);try{e()}finally{bn(!1)}}return l.memoizedState=[a,t],a},useReducer:function(e,t,l){var a=Zt();if(l!==void 0){var o=l(t);if(Qa){bn(!0);try{l(t)}finally{bn(!1)}}}else o=t;return a.memoizedState=a.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},a.queue=e,e=e.dispatch=AS.bind(null,Ne,e),[a.memoizedState,e]},useRef:function(e){var t=Zt();return e={current:e},t.memoizedState=e},useState:function(e){e=nf(e);var t=e.queue,l=dp.bind(null,Ne,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:sf,useDeferredValue:function(e,t){var l=Zt();return rf(l,e,t)},useTransition:function(){var e=nf(!1);return e=rp.bind(null,Ne,e.queue,!0,!1),Zt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=Ne,o=Zt();if(Re){if(l===void 0)throw Error(r(407));l=l()}else{if(l=t(),tt===null)throw Error(r(349));(Oe&127)!==0||Lg(a,t,l)}o.memoizedState=l;var c={value:l,getSnapshot:t};return o.queue=c,Jg(Vg.bind(null,a,c,e),[e]),a.flags|=2048,Hs(9,{destroy:void 0},Ug.bind(null,a,c,l,t),null),l},useId:function(){var e=Zt(),t=tt.identifierPrefix;if(Re){var l=Zn,a=Kn;l=(a&~(1<<32-Xt(a)-1)).toString(32)+l,t="_"+t+"R_"+l,l=Ao++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=jS++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:uf,useFormState:Ig,useActionState:Ig,useOptimistic:function(e){var t=Zt();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=cf.bind(null,Ne,!0,l),l.dispatch=t,[e,t]},useMemoCache:Wc,useCacheRefresh:function(){return Zt().memoizedState=TS.bind(null,Ne)},useEffectEvent:function(e){var t=Zt(),l={impl:e};return t.memoizedState=l,function(){if((qe&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}},pp={readContext:zt,use:zo,useCallback:ap,useContext:zt,useEffect:af,useImperativeHandle:lp,useInsertionEffect:ep,useLayoutEffect:tp,useMemo:sp,useReducer:Do,useRef:Pg,useState:function(){return Do(Cl)},useDebugValue:sf,useDeferredValue:function(e,t){var l=vt();return ip(l,Je.memoizedState,e,t)},useTransition:function(){var e=Do(Cl)[0],t=vt().memoizedState;return[typeof e=="boolean"?e:Wi(e),t]},useSyncExternalStore:Hg,useId:cp,useHostTransitionStatus:uf,useFormState:Xg,useActionState:Xg,useOptimistic:function(e,t){var l=vt();return Bg(l,Je,e,t)},useMemoCache:Wc,useCacheRefresh:fp,useEffectEvent:Wg},OS={readContext:zt,use:zo,useCallback:ap,useContext:zt,useEffect:af,useImperativeHandle:lp,useInsertionEffect:ep,useLayoutEffect:tp,useMemo:sp,useReducer:tf,useRef:Pg,useState:function(){return tf(Cl)},useDebugValue:sf,useDeferredValue:function(e,t){var l=vt();return Je===null?rf(l,e,t):ip(l,Je.memoizedState,e,t)},useTransition:function(){var e=tf(Cl)[0],t=vt().memoizedState;return[typeof e=="boolean"?e:Wi(e),t]},useSyncExternalStore:Hg,useId:cp,useHostTransitionStatus:uf,useFormState:Zg,useActionState:Zg,useOptimistic:function(e,t){var l=vt();return Je!==null?Bg(l,Je,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:Wc,useCacheRefresh:fp,useEffectEvent:Wg};function ff(e,t,l,a){t=e.memoizedState,l=l(a,t),l=l==null?t:z({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var df={enqueueSetState:function(e,t,l){e=e._reactInternals;var a=yn(),o=ql(a);o.payload=t,l!=null&&(o.callback=l),t=Ql(e,o,a),t!==null&&(cn(t,e,a),Xi(t,e,a))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var a=yn(),o=ql(a);o.tag=1,o.payload=t,l!=null&&(o.callback=l),t=Ql(e,o,a),t!==null&&(cn(t,e,a),Xi(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=yn(),a=ql(l);a.tag=2,t!=null&&(a.callback=t),t=Ql(e,a,l),t!==null&&(cn(t,e,l),Xi(t,e,l))}};function vp(e,t,l,a,o,c,g){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,c,g):t.prototype&&t.prototype.isPureReactComponent?!Fi(l,a)||!Fi(o,c):!0}function yp(e,t,l,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,a),t.state!==e&&df.enqueueReplaceState(t,t.state,null)}function Ya(e,t){var l=t;if("ref"in t){l={};for(var a in t)a!=="ref"&&(l[a]=t[a])}if(e=e.defaultProps){l===t&&(l=z({},l));for(var o in e)l[o]===void 0&&(l[o]=e[o])}return l}function xp(e){fo(e)}function Sp(e){console.error(e)}function bp(e){fo(e)}function $o(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function wp(e,t,l){try{var a=e.onCaughtError;a(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function hf(e,t,l){return l=ql(l),l.tag=3,l.payload={element:null},l.callback=function(){$o(e,t)},l}function Cp(e){return e=ql(e),e.tag=3,e}function jp(e,t,l,a){var o=l.type.getDerivedStateFromError;if(typeof o=="function"){var c=a.value;e.payload=function(){return o(c)},e.callback=function(){wp(t,l,a)}}var g=l.stateNode;g!==null&&typeof g.componentDidCatch=="function"&&(e.callback=function(){wp(t,l,a),typeof o!="function"&&(Wl===null?Wl=new Set([this]):Wl.add(this));var S=a.stack;this.componentDidCatch(a.value,{componentStack:S!==null?S:""})})}function zS(e,t,l,a,o){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=l.alternate,t!==null&&Va(t,l,o,!0),l=Dt.current,l!==null){switch(l.tag){case 31:case 13:case 19:return qt===null?iu():l.alternate===null&>===0&&(gt=3),l.flags&=-257,l.flags|=65536,l.lanes=o,a===Eo?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([a]):t.add(a),Pf(e,a,o)),!1;case 22:return l.flags|=65536,a===Eo?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([a]):l.add(a)),Pf(e,a,o)),!1}throw Error(r(435,l.tag))}return Pf(e,a,o),iu(),!1}if(Re)return t=Dt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,a!==Oc&&(e=Error(r(422),{cause:a}),Gi(jn(e,l)))):(a!==Oc&&(t=Error(r(423),{cause:a}),Gi(jn(t,l))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,a=jn(a,l),o=hf(e.stateNode,a,o),kc(e,o),gt!==4&&(gt=2)),!1;var c=Error(r(520),{cause:a});if(c=jn(c,l),or===null?or=[c]:or.push(c),gt!==4&&(gt=2),t===null)return!0;a=jn(a,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=o&-o,l.lanes|=e,e=hf(l.stateNode,a,e),kc(l,e),!1;case 1:if(t=l.type,c=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(Wl===null||!Wl.has(c))))return l.flags|=65536,o&=-o,l.lanes|=o,o=Cp(o),jp(o,e,l,a),kc(l,o),!1;break;case 22:if(l.memoizedState!==null)return l.flags|=65536,!1}l=l.return}while(l!==null);return!1}var mf=Error(r(461)),St=!1;function jt(e,t,l,a){t.child=e===null?Mg(t,null,l,a):qa(t,e.child,l,a)}function Ep(e,t,l,a,o){l=l.render;var c=t.ref;if("ref"in a){var g={};for(var S in a)S!=="ref"&&(g[S]=a[S])}else g=a;return $a(t),a=Kc(e,t,l,g,c,o),S=Zc(),e!==null&&!St?(Pc(e,t,o),jl(e,t,o)):(Re&&S&&yo(t),t.flags|=1,jt(e,t,a,o),t.child)}function Np(e,t,l,a,o){if(e===null){var c=l.type;return typeof c=="function"&&!Mc(c)&&c.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=c,_p(e,t,c,a,o)):(e=po(l.type,null,a,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!wf(e,o)){var g=c.memoizedProps;if(l=l.compare,l=l!==null?l:Fi,l(g,a)&&e.ref===t.ref)return jl(e,t,o)}return t.flags|=1,e=yl(c,a),e.ref=t.ref,e.return=t,t.child=e}function _p(e,t,l,a,o){if(e!==null){var c=e.memoizedProps;if(Fi(c,a)&&e.ref===t.ref)if(St=!1,t.pendingProps=a=c,wf(e,o))(e.flags&131072)!==0&&(St=!0);else return t.lanes=e.lanes,jl(e,t,o)}return gf(e,t,l,a,o)}function Mp(e,t,l,a){var o=a.children,c=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(c=c!==null?c.baseLanes|l:l,e!==null){for(a=t.child=e.child,o=0;a!==null;)o=o|a.lanes|a.childLanes,a=a.sibling;a=o&~c}else a=0,t.child=null;return Rp(e,t,c,l,a)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Co(t,c!==null?c.cachePool:null),c!==null?Ag(t,c):qc(),Og(t);else return a=t.lanes=536870912,Rp(e,t,c!==null?c.baseLanes|l:l,l,a)}else c!==null?(Co(t,c.cachePool),Ag(t,c),Xl(),t.memoizedState=null):(e!==null&&Co(t,null),qc(),Xl());return jt(e,t,o,l),t.child}function tr(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Rp(e,t,l,a,o){var c=Vc();return c=c===null?null:{parent:yt._currentValue,pool:c},t.memoizedState={baseLanes:l,cachePool:c},e!==null&&Co(t,null),qc(),Og(t),e!==null&&Va(e,t,a,!0),t.childLanes=o,null}function Fo(e,t){return t=Bo({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Tp(e,t,l){return qa(t,e.child,null,l),e=Fo(t,t.pendingProps),e.flags|=2,mn(t),t.memoizedState=null,e}function DS(e,t,l){var a=t.pendingProps,o=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Re){if(a.mode==="hidden")return e=Fo(t,a),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},tr(null,e);if(Yc(t),(e=lt)?(e=nv(e,_n),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Vl!==null?{id:Kn,overflow:Zn}:null,retryLane:536870912,hydrationErrors:null},l=hg(e),l.return=t,t.child=l,Mt=t,lt=null)):e=null,e===null)throw Fl(t);return t.lanes=536870912,null}return Fo(t,a)}var c=e.memoizedState;if(c!==null){var g=c.dehydrated;if(Yc(t),o)if(t.flags&256)t.flags&=-257,t=Tp(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(St||Va(e,t,l,!1),o=(l&e.childLanes)!==0,St||o){if(Yl.current===null){if(a=tt,a!==null&&(g=pm(a,l),g!==0&&g!==c.retryLane))throw c.retryLane=g,Da(e,g),cn(a,e,g),mf;iu()}t=Tp(e,t,l)}else e=c.treeContext,lt=Rn(g.nextSibling),Mt=t,Re=!0,$l=null,_n=!1,e!==null&&pg(t,e),t=Fo(t,a),t.flags|=134221824;return t}return e=yl(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ls(e,t){var l=t.ref;if(l===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(r(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function gf(e,t,l,a,o){return $a(t),l=Kc(e,t,l,a,void 0,o),a=Zc(),e!==null&&!St?(Pc(e,t,o),jl(e,t,o)):(Re&&a&&yo(t),t.flags|=1,jt(e,t,l,o),t.child)}function Ap(e,t,l,a,o,c){return $a(t),t.updateQueue=null,l=Dg(t,a,l,o),zg(e),a=Zc(),e!==null&&!St?(Pc(e,t,c),jl(e,t,c)):(Re&&a&&yo(t),t.flags|=1,jt(e,t,l,c),t.child)}function Op(e,t,l,a,o){if($a(t),t.stateNode===null){var c=Ns,g=l.contextType;typeof g=="object"&&g!==null&&(c=zt(g)),c=new l(a,c),t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=df,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=a,c.state=t.memoizedState,c.refs={},Fc(t),g=l.contextType,c.context=typeof g=="object"&&g!==null?zt(g):Ns,c.state=t.memoizedState,g=l.getDerivedStateFromProps,typeof g=="function"&&(ff(t,l,g,a),c.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(g=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),g!==c.state&&df.enqueueReplaceState(c,c.state,null),Zi(t,a,c,o),Ki(),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){c=t.stateNode;var S=t.memoizedProps,_=Ya(l,S);c.props=_;var B=c.context,Q=l.contextType;g=Ns,typeof Q=="object"&&Q!==null&&(g=zt(Q));var K=l.getDerivedStateFromProps;Q=typeof K=="function"||typeof c.getSnapshotBeforeUpdate=="function",S=t.pendingProps!==S,Q||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(S||B!==g)&&yp(t,c,a,g),Gl=!1;var U=t.memoizedState;c.state=U,Zi(t,a,c,o),Ki(),B=t.memoizedState,S||U!==B||Gl?(typeof K=="function"&&(ff(t,l,K,a),B=t.memoizedState),(_=Gl||vp(t,l,_,a,U,B,g))?(Q||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=B),c.props=a,c.state=B,c.context=g,a=_):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{c=t.stateNode,Bc(e,t),g=t.memoizedProps,Q=Ya(l,g),c.props=Q,K=t.pendingProps,U=c.context,B=l.contextType,_=Ns,typeof B=="object"&&B!==null&&(_=zt(B)),S=l.getDerivedStateFromProps,(B=typeof S=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(g!==K||U!==_)&&yp(t,c,a,_),Gl=!1,U=t.memoizedState,c.state=U,Zi(t,a,c,o),Ki();var q=t.memoizedState;g!==K||U!==q||Gl||e!==null&&e.dependencies!==null&&bo(e.dependencies)?(typeof S=="function"&&(ff(t,l,S,a),q=t.memoizedState),(Q=Gl||vp(t,l,Q,a,U,q,_)||e!==null&&e.dependencies!==null&&bo(e.dependencies))?(B||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(a,q,_),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(a,q,_)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||g===e.memoizedProps&&U===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&U===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=q),c.props=a,c.state=q,c.context=_,a=Q):(typeof c.componentDidUpdate!="function"||g===e.memoizedProps&&U===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&U===e.memoizedState||(t.flags|=1024),a=!1)}return c=a,Ls(e,t),a=(t.flags&128)!==0,c||a?(c=t.stateNode,l=a&&typeof l.getDerivedStateFromError!="function"?null:c.render(),t.flags|=1,e!==null&&a?(t.child=qa(t,e.child,null,o),t.child=qa(t,null,l,o)):jt(e,t,l,o),t.memoizedState=c.state,e=t.child):e=jl(e,t,o),e}function zp(e,t,l,a){return La(),t.flags|=256,jt(e,t,l,a),t.child}var pf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function vf(e){return{baseLanes:e,cachePool:wg()}}function yf(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=vn),e}function Dp(e,t,l){var a=t.pendingProps,o=!1,c=(t.flags&128)!==0,g;if((g=c)||(g=e!==null&&e.memoizedState===null?!1:(Ht.current&2)!==0),g&&(o=!0,t.flags&=-129),g=(t.flags&32)!==0,t.flags&=-33,e===null){if(Re){if(o?Il(t):Xl(),(e=lt)?(e=nv(e,_n),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Vl!==null?{id:Kn,overflow:Zn}:null,retryLane:536870912,hydrationErrors:null},l=hg(e),l.return=t,t.child=l,Mt=t,lt=null)):e=null,e===null)throw Fl(t);return vd(e)?t.lanes=32:t.lanes=536870912,null}return c=a.children,a=a.fallback,o?(Xl(),o=t.mode,c=Bo({mode:"hidden",children:c},o),a=Ha(a,o,l,null),c.return=t,a.return=t,c.sibling=a,t.child=c,a=t.child,a.memoizedState=vf(l),a.childLanes=yf(e,g,l),t.memoizedState=pf,tr(null,a)):(Il(t),xf(t,c))}var S=e.memoizedState;if(S!==null){var _=S.dehydrated;if(_!==null)return HS(e,t,c,g,a,_,S,l)}return o?(Xl(),o=a.fallback,c=t.mode,S=e.child,_=S.sibling,a=yl(S,{mode:"hidden",children:a.children}),a.subtreeFlags=S.subtreeFlags&1206910976,_!==null?o=yl(_,o):(o=Ha(o,c,l,null),o.flags|=2),o.return=t,a.return=t,a.sibling=o,t.child=a,tr(null,a),a=t.child,o=e.child.memoizedState,o===null?o=vf(l):(c=o.cachePool,c!==null?(S=yt._currentValue,c=c.parent!==S?{parent:S,pool:S}:c):c=wg(),o={baseLanes:o.baseLanes|l,cachePool:c}),a.memoizedState=o,a.childLanes=yf(e,g,l),t.memoizedState=pf,tr(e.child,a)):(Il(t),l=e.child,e=l.sibling,l=yl(l,{mode:"visible",children:a.children}),l.return=t,l.sibling=null,e!==null&&(g=t.deletions,g===null?(t.deletions=[e],t.flags|=16):g.push(e)),t.child=l,t.memoizedState=null,l)}function xf(e,t){return t=Bo({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Bo(e,t){return e=sn(22,e,null,t),e.lanes=0,e}function ko(e,t,l){return qa(t,e.child,null,l),e=xf(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function HS(e,t,l,a,o,c,g,S){if(l)return t.flags&256?(Il(t),t.flags&=-257,ko(e,t,S)):t.memoizedState!==null?(Xl(),t.child=e.child,t.flags|=128,null):(Xl(),c=o.fallback,g=t.mode,o=Bo({mode:"visible",children:o.children},g),c=Ha(c,g,S,null),c.flags|=2,o.return=t,c.return=t,o.sibling=c,t.child=o,qa(t,e.child,null,S),o=t.child,o.memoizedState=vf(S),o.childLanes=yf(e,a,S),t.memoizedState=pf,tr(null,o));if(Il(t),vd(c)){if(a=c.nextSibling&&c.nextSibling.dataset,a)var _=a.dgst;return a=_,a!==""&&(o=Error(r(419)),o.stack="",o.digest=a,Gi({value:o,source:null,stack:null})),ko(e,t,S)}if(St||Va(e,t,S,!1),a=(S&e.childLanes)!==0,St||a){if(Yl.current!==null)return ko(e,t,S);if(a=tt,a!==null&&(o=pm(a,S),o!==0&&o!==g.retryLane))throw g.retryLane=o,Da(e,o),cn(a,e,o),mf;return pd(c)||iu(),ko(e,t,S)}return pd(c)?(t.flags|=192,t.child=e.child,null):(e=g.treeContext,lt=Rn(c.nextSibling),Mt=t,Re=!0,$l=null,_n=!1,e!==null&&pg(t,e),t=xf(t,o.children),t.flags|=134221824,t)}function Hp(e,t,l){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),So(e.return,t,l)}function Lp(e){for(var t=null;e!==null;){var l=e.alternate;l!==null&&Ro(l)===null&&(t=e),e=e.sibling}return t}function Go(e,t,l,a,o,c){var g=e.memoizedState;g===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:l,tailMode:o,treeForkCount:c}:(g.isBackwards=t,g.rendering=null,g.renderingStartTime=0,g.last=a,g.tail=l,g.tailMode=o,g.treeForkCount=c)}function Sf(e){var t=e.child;for(e.child=null;t!==null;){var l=t.sibling;t.sibling=e.child,e.child=t,t=l}}function bf(e,t,l){var a=t.pendingProps,o=a.revealOrder,c=a.tail;a=a.children;var g=Ht.current;if(t.flags&128)return Pi(t,g),null;var S=(g&2)!==0;if(S?(g=g&1|2,t.flags|=128):g&=1,Pi(t,g),o==="backwards"&&e!==null?(Sf(e),jt(e,t,a,l),Sf(e)):jt(e,t,a,l),a=Re?ki:0,!S&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Hp(e,l,t);else if(e.tag===19)Hp(e,l,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}switch(o){case"backwards":l=Lp(t.child),l===null?(o=t.child,t.child=null):(o=l.sibling,l.sibling=null,Sf(t)),Go(t,!0,o,null,c,a);break;case"unstable_legacy-backwards":for(l=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Ro(e)===null){t.child=o;break}e=o.sibling,o.sibling=l,l=o,o=e}Go(t,!0,l,null,c,a);break;case"together":Go(t,!1,null,null,void 0,a);break;case"independent":t.memoizedState=null;break;default:l=Lp(t.child),l===null?(o=t.child,t.child=null):(o=l.sibling,l.sibling=null),Go(t,!1,o,l,c,a)}return t.child}function Up(e,t,l){var a=t.pendingProps;return Bl(t,t.type,a.value),jt(e,t,a.children,l),t.child}function jl(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),Jl|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(Va(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,l=yl(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=yl(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function wf(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&bo(e)))}function LS(e,t,l){switch(t.tag){case 3:qn(t,t.stateNode.containerInfo),Bl(t,yt,e.memoizedState.cache),La();break;case 27:case 5:fl(t);break;case 4:qn(t,t.stateNode.containerInfo);break;case 10:Bl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Yc(t),null;break;case 13:var a=t.memoizedState;if(a!==null){if(a.dehydrated!==null)return Il(t),t.flags|=128,null;a=Va(e,t,l,!1);var o=t.child.childLanes;return a||(l&o)!==0?Dp(e,t,l):(Il(t),e=jl(e,t,l),e!==null?e.sibling:null)}Il(t);break;case 19:if(t.flags&128)return bf(e,t,l);if(o=(e.flags&128)!==0,a=(l&t.childLanes)!==0,a||(Va(e,t,l,!1),a=(l&t.childLanes)!==0),o){if(a)return bf(e,t,l);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Pi(t,Ht.current),a)break;return null;case 22:return t.lanes=0,Mp(e,t,l,t.pendingProps);case 24:Bl(t,yt,e.memoizedState.cache)}return jl(e,t,l)}function Vp(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)St=!0;else{if(!wf(e,l)&&(t.flags&128)===0)return St=!1,LS(e,t,l);St=(e.flags&131072)!==0}else St=!1,Re&&(t.flags&1048576)!==0&&gg(t,ki,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=ka(t.elementType),t.type=e,typeof e=="function")Mc(e)?(a=Ya(e,a),t.tag=1,t=Op(null,t,e,a,l)):(t.tag=0,t=gf(null,t,e,a,l));else{if(e!=null){var o=e.$$typeof;if(o===P){t.tag=11,t=Ep(null,t,e,a,l);break e}else if(o===Ee){t.tag=14,t=Np(null,t,e,a,l);break e}else if(o===ee){t.tag=10,t.type=e,t=Up(null,t,l);break e}}throw t=ye(e)||e,Error(r(306,t,""))}}return t;case 0:return gf(e,t,t.type,t.pendingProps,l);case 1:return a=t.type,o=Ya(a,t.pendingProps),Op(e,t,a,o,l);case 3:e:{if(qn(t,t.stateNode.containerInfo),e===null)throw Error(r(387));a=t.pendingProps;var c=t.memoizedState;o=c.element,Bc(e,t),Zi(t,a,null,l);var g=t.memoizedState;if(a=g.cache,Bl(t,yt,a),a!==c.cache&&Hc(t,[yt],l,!0),Ki(),a=g.element,c.isDehydrated)if(c={element:a,isDehydrated:!1,cache:g.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=zp(e,t,a,l);break e}else if(a!==o){o=jn(Error(r(424)),t),Gi(o),t=zp(e,t,a,l);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(lt=Rn(e.firstChild),Mt=t,Re=!0,$l=null,_n=!0,l=Mg(t,null,a,l),t.child=l;l;)l.flags=l.flags&-3|134221824,l=l.sibling}else{if(La(),a===o){t=jl(e,t,l);break e}jt(e,t,a,l)}t=t.child}return t;case 26:return Ls(e,t),e===null?(l=uv(t.type,null,t.pendingProps,null))?t.memoizedState=l:Re||(t.stateNode=k0(t.type,t.pendingProps,At.current,t)):t.memoizedState=uv(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return fl(t),e===null&&Re&&(a=t.stateNode=sv(t.type,t.pendingProps,At.current),Mt=t,_n=!0,o=lt,na(t.type)?(yd=o,lt=Rn(a.firstChild)):lt=o),jt(e,t,t.pendingProps.children,l),Ls(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Re&&((o=a=lt)&&(a=Tb(a,t.type,t.pendingProps,_n),a!==null?(t.stateNode=a,Mt=t,lt=Rn(a.firstChild),_n=!1,o=!0):o=!1),o||Fl(t)),fl(t),o=t.type,c=t.pendingProps,g=e!==null?e.memoizedProps:null,a=c.children,ud(o,c)?a=null:g!==null&&ud(o,g)&&(t.flags|=32),t.memoizedState!==null&&(o=Kc(e,t,ES,null,null,l),ei._currentValue=o),Ls(e,t),jt(e,t,a,l),t.child;case 6:return e===null&&Re&&((e=l=lt)&&(l=Ab(l,t.pendingProps,_n),l!==null?(t.stateNode=l,Mt=t,lt=null,e=!0):e=!1),e||Fl(t)),null;case 13:return Dp(e,t,l);case 4:return qn(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=qa(t,null,a,l):jt(e,t,a,l),t.child;case 11:return Ep(e,t,t.type,t.pendingProps,l);case 7:return a=t.pendingProps,Ls(e,t),jt(e,t,a,l),t.child;case 8:return jt(e,t,t.pendingProps.children,l),t.child;case 12:return jt(e,t,t.pendingProps.children,l),t.child;case 10:return Up(e,t,l);case 9:return o=t.type._context,a=t.pendingProps.children,$a(t),o=zt(o),a=a(o),t.flags|=1,jt(e,t,a,l),t.child;case 14:return Np(e,t,t.type,t.pendingProps,l);case 15:return _p(e,t,t.type,t.pendingProps,l);case 19:return bf(e,t,l);case 31:return DS(e,t,l);case 22:return Mp(e,t,l,t.pendingProps);case 24:return $a(t),a=zt(yt),e===null?(o=Vc(),o===null&&(o=tt,c=Lc(),o.pooledCache=c,c.refCount++,c!==null&&(o.pooledCacheLanes|=l),o=c),t.memoizedState={parent:a,cache:o},Fc(t),Bl(t,yt,o)):((e.lanes&l)!==0&&(Bc(e,t),Zi(t,null,null,l),Ki()),o=e.memoizedState,c=t.memoizedState,o.parent!==a?(o={parent:a,cache:a},t.memoizedState=o,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=o),Bl(t,yt,a)):(a=c.cache,Bl(t,yt,a),a!==o.cache&&Hc(t,[yt],l,!0))),jt(e,t,t.pendingProps.children,l),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),a=t.pendingProps,a.name!=null&&a.name!=="auto"?t.flags|=e===null?18882560:18874368:Re&&yo(t),e!==null&&e.memoizedProps.name!==a.name?t.flags|=4194816:Ls(e,t),jt(e,t,a.children,l),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function El(e){e.flags|=4}function Cf(e,t,l,a,o){var c;if((c=(e.mode&32)!==0)&&(c=l===null?hv(t,a):hv(t,a)&&(a.src!==l.src||a.srcSet!==l.srcSet)),c){if(e.flags|=16777216,(o&335544128)===o)if(e.stateNode.complete)e.flags|=8192;else if(x0())e.flags|=8192;else throw Ga=Eo,$c}else e.flags&=-16777217}function $p(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!mv(t))if(x0())e.flags|=8192;else throw Ga=Eo,$c}function qo(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?hm():536870912,e.lanes|=t,Bs|=t)}function nr(e,t){if(!Re)switch(e.tailMode){case"visible":break;case"collapsed":for(var l=e.tail,a=null;l!==null;)l.alternate!==null&&(a=l),l=l.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null;break;default:for(t=e.tail,l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null}}function at(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,a=0;if(t)for(var o=e.child;o!==null;)l|=o.lanes|o.childLanes,a|=o.subtreeFlags&1206910976,a|=o.flags&1206910976,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)l|=o.lanes|o.childLanes,a|=o.subtreeFlags,a|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=a,e.childLanes=l,t}function US(e,t,l){var a=t.pendingProps;switch(Ac(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return at(t),null;case 1:return at(t),null;case 3:return l=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),bl(yt),ut(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(Rs(t)?El(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,zc())),at(t),null;case 26:var o=t.type,c=t.memoizedState;return e===null?(El(t),c!==null?(at(t),$p(t,c)):(at(t),Cf(t,o,null,a,l))):c?c!==e.memoizedState?(El(t),at(t),$p(t,c)):(at(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&El(t),at(t),Cf(t,o,e,a,l)),null;case 27:if(It(t),l=At.current,o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&El(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return at(t),t.subtreeFlags&=-33554433,null}e=pt.current,Rs(t)?vg(t):(e=sv(o,a,l),t.stateNode=e,El(t))}return at(t),t.subtreeFlags&=-33554433,null;case 5:if(It(t),o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&El(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return at(t),t.subtreeFlags&=-33554433,null}if(c=pt.current,Rs(t))vg(t);else{var g=hr(At.current);switch(c){case 1:c=g.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:c=g.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":c=g.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":c=g.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":c=g.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof a.is=="string"?g.createElement("select",{is:a.is}):g.createElement("select"),a.multiple?c.multiple=!0:a.size&&(c.size=a.size);break;default:c=typeof a.is=="string"?g.createElement(o,{is:a.is}):g.createElement(o)}}c[Ot]=t,c[an]=a;e:for(g=t.child;g!==null;){if(g.tag===5||g.tag===6)c.appendChild(g.stateNode);else if(g.tag!==4&&g.tag!==27&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===t)break e;for(;g.sibling===null;){if(g.return===null||g.return===t)break e;g=g.return}g.sibling.return=g.return,g=g.sibling}t.stateNode=c;e:switch(Ut(c,o,a),o){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&El(t)}}return at(t),t.subtreeFlags&=-33554433,Cf(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&El(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(r(166));if(e=At.current,Rs(t)){if(e=t.stateNode,l=t.memoizedProps,a=null,o=Mt,o!==null)switch(o.tag){case 27:case 5:a=o.memoizedProps}e[Ot]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||V0(e.nodeValue,l)),e||Fl(t,!0)}else e=hr(e).createTextNode(a),e[Ot]=t,t.stateNode=e}return at(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(a=Rs(t),l!==null){if(e===null){if(!a)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[Ot]=t}else La(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;at(t),e=!1}else l=zc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(mn(t),t):(mn(t),null);if((t.flags&128)!==0)throw Error(r(558))}return at(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=Rs(t),a!==null&&a.dehydrated!==null){if(e===null){if(!o)throw Error(r(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));o[Ot]=t}else La(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;at(t),o=!1}else o=zc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(mn(t),t):(mn(t),null)}return mn(t),(t.flags&128)!==0?(t.lanes=l,t):(l=a!==null,e=e!==null&&e.memoizedState!==null,l&&(a=t.child,o=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(o=a.alternate.memoizedState.cachePool.pool),c=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(c=a.memoizedState.cachePool.pool),c!==o&&(a.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),qo(t,t.updateQueue),at(t),null);case 4:return ut(),e===null&&ad(t.stateNode.containerInfo),t.flags|=67108864,at(t),null;case 10:return bl(t.type),at(t),null;case 19:if(Ic(t),a=t.memoizedState,a===null)return at(t),null;if(o=(t.flags&128)!==0,c=a.rendering,c===null)if(o)nr(a,!1);else{if(gt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=Ro(e),c!==null){for(t.flags|=128,nr(a,!1),e=c.updateQueue,t.updateQueue=e,qo(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)dg(l,e),l=l.sibling;return Pi(t,Ht.current&1|2),Re&&xl(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&et()>nu&&(t.flags|=128,o=!0,nr(a,!1),t.lanes=4194304)}else{if(!o)if(e=Ro(c),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,qo(t,e),nr(a,!0),a.tail===null&&a.tailMode!=="collapsed"&&a.tailMode!=="visible"&&!c.alternate&&!Re)return at(t),null}else 2*et()-a.renderingStartTime>nu&&l!==536870912&&(t.flags|=128,o=!0,nr(a,!1),t.lanes=4194304);a.isBackwards?(c.sibling=t.child,t.child=c):(e=a.last,e!==null?e.sibling=c:t.child=c,a.last=c)}if(a.tail!==null){e=a.tail;e:{for(l=e;l!==null;){if(l.alternate!==null){l=!1;break e}l=l.sibling}l=!0}return a.rendering=e,a.tail=e.sibling,a.renderingStartTime=et(),e.sibling=null,c=Ht.current,c=o?c&1|2:c&1,a.tailMode==="visible"||a.tailMode==="collapsed"||!l||Re?Pi(t,c):(l=c,Ge(Dt,t),Ge(Ht,l),qt===null&&(qt=t)),Re&&xl(t,a.treeForkCount),e}return at(t),null;case 22:case 23:return mn(t),Qc(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(l&536870912)!==0&&(t.flags&128)===0&&(at(t),t.subtreeFlags&6&&(t.flags|=8192)):at(t),l=t.updateQueue,l!==null&&qo(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==l&&(t.flags|=2048),e!==null&&ot(Ba),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),bl(yt),at(t),null;case 25:return null;case 30:return t.flags|=33554432,at(t),null}throw Error(r(156,t.tag))}function VS(e,t){switch(Ac(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return bl(yt),ut(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return It(t),null;case 31:if(t.memoizedState!==null){if(mn(t),t.alternate===null)throw Error(r(340));La()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(mn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));La()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ic(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return ut(),null;case 10:return bl(t.type),null;case 22:case 23:return mn(t),Qc(),e!==null&&ot(Ba),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return bl(yt),null;case 25:return null;default:return null}}function Fp(e,t){switch(Ac(t),t.tag){case 3:bl(yt),ut();break;case 26:case 27:case 5:It(t);break;case 4:ut();break;case 31:t.memoizedState!==null&&mn(t);break;case 13:mn(t);break;case 19:Ic(t);break;case 10:bl(t.type);break;case 22:case 23:mn(t),Qc(),e!==null&&ot(Ba);break;case 24:bl(yt)}}function lr(e,t){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var o=a.next;l=o;do{if((l.tag&e)===e){a=void 0;var c=l.create,g=l.inst;a=c(),g.destroy=a}l=l.next}while(l!==o)}}catch(S){Ke(t,t.return,S)}}function Kl(e,t,l){try{var a=t.updateQueue,o=a!==null?a.lastEffect:null;if(o!==null){var c=o.next;a=c;do{if((a.tag&e)===e){var g=a.inst,S=g.destroy;if(S!==void 0){g.destroy=void 0,o=t;var _=l,B=S;try{B()}catch(Q){Ke(o,_,Q)}}}a=a.next}while(a!==c)}}catch(Q){Ke(t,t.return,Q)}}function Bp(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{Tg(t,l)}catch(a){Ke(e,e.return,a)}}}function kp(e,t,l){l.props=Ya(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){Ke(e,t,a)}}function Pn(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:var o=e.stateNode,c=pl(e.memoizedProps,o);(o.ref===null||o.ref.name!==c)&&(o.ref=K0(c)),a=o.ref;break;case 7:if(e.stateNode===null){var g=new xn(e);v(e.child,!1,Mb,g,void 0,void 0),e.stateNode=g}a=e.stateNode;break;default:a=e.stateNode}typeof l=="function"?e.refCleanup=l(a):l.current=a}}catch(S){Ke(e,t,S)}}function Lt(e,t){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(o){Ke(e,t,o)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(o){Ke(e,t,o)}else l.current=null}function Qo(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var l=0;l<t.length;l++)tv(e.stateNode,t[l])}function Gp(e){for(var t=e.return;t!==null&&(Ef(t)&&tv(e.stateNode,t.stateNode),!jf(t));)t=t.return}function ar(e){for(var t=e.return;t!==null&&(Ef(t)&&Rb(e.stateNode,t.stateNode),!jf(t));)t=t.return}function jf(e){return e.tag===5||e.tag===3||e.tag===27}function Ef(e){return e&&e.tag===7&&e.stateNode!==null}function Nf(e){var t=e.type,l=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&a.focus();break e;case"img":l.src?a.src=l.src:l.srcSet&&(a.srcset=l.srcSet)}}catch(o){Ke(e,e.return,o)}}function _f(e,t,l){try{var a=e.stateNode;cb(a,e.type,l,t),a[an]=t}catch(o){Ke(e,e.return,o)}}function qp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&na(e.type)||e.tag===4}function Mf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||qp(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.tag===27&&na(e.type)||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 Rf(e,t,l,a){var o=e.tag;if(o===5||o===6)o=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(o,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(o),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=Xn)),Qo(e,a),Be=!0;else if(o!==4&&(o===27&&(Qo(e,a),a=null,na(e.type)&&(l=e.stateNode,t=null)),e=e.child,e!==null))for(Rf(e,t,l,a),e=e.sibling;e!==null;)Rf(e,t,l,a),e=e.sibling}function Yo(e,t,l,a){var o=e.tag;if(o===5||o===6)o=e.stateNode,t?l.insertBefore(o,t):l.appendChild(o),Qo(e,a),Be=!0;else if(o!==4&&(o===27&&(Qo(e,a),a=null,na(e.type)&&(l=e.stateNode)),e=e.child,e!==null))for(Yo(e,t,l,a),e=e.sibling;e!==null;)Yo(e,t,l,a),e=e.sibling}function Qp(e){var t=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);Ut(t,a,l),t[Ot]=e,t[an]=l}catch(c){Ke(e,e.return,c)}}var Io=!1,gn=null;function Yp(e){(e.tag===30||(e.subtreeFlags&33554432)!==0)&&(Io=!0)}var Jn=null;function Ip(){var e=Jn;return Jn=null,e}var rn=0;function Us(e,t,l,a,o){return rn=0,Xp(e.child,t,l,a,o)}function Xp(e,t,l,a,o){for(var c=!1;e!==null;){if(e.tag===5){var g=e.stateNode;if(a!==null){var S=dd(g);a.push(S),S.view&&(c=!0)}else c||dd(g).view&&(c=!0);Io=!0,I0(g,rn===0?t:t+"_"+rn,l),rn++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&o||Xp(e.child,t,l,a,o)&&(c=!0));e=e.sibling}return c}function Wn(e,t){for(;e!==null;)e.tag===5?X0(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||Wn(e.child,t)),e=e.sibling}function Xo(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Xo(e),e.tag===30&&(e.flags&18874368)!==0&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name==="auto")throw Error(r(544));var l=t.name;t=vl(t.default,t.share),t!=="none"&&(Us(e,l,t,null,!1)||Wn(e.child,!1))}e=e.sibling}}function Tf(e,t){if(e.tag===30){var l=e.stateNode,a=e.memoizedProps,o=pl(a,l),c=vl(a.default,l.paired?a.share:a.enter);c!=="none"?Us(e,o,c,null,!1)?(Xo(e),l.paired||t||Qs(e,a.onEnter)):Wn(e.child,!1):Xo(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)Tf(e,t),e=e.sibling;else Xo(e)}function Af(e){if(gn!==null&&gn.size!==0){var t=gn;if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var l=e.memoizedProps,a=l.name;if(a!=null&&a!=="auto"){var o=t.get(a);if(o!==void 0){var c=vl(l.default,l.share);if(c!=="none"&&(Us(e,a,c,null,!1)?(c=e.stateNode,o.paired=c,c.paired=o,Qs(e,l.onShare)):Wn(e.child,!1)),t.delete(a),t.size===0)break}}}Af(e)}e=e.sibling}}}function Of(e){if(e.tag===30){var t=e.memoizedProps,l=pl(t,e.stateNode),a=gn!==null?gn.get(l):void 0,o=vl(t.default,a!==void 0?t.share:t.exit);o!=="none"&&(Us(e,l,o,null,!1)?a!==void 0?(o=e.stateNode,a.paired=o,o.paired=a,gn.delete(l),Qs(e,t.onShare)):Qs(e,t.onExit):Wn(e.child,!1)),gn!==null&&Af(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)Of(e),e=e.sibling;else gn!==null&&Af(e)}function Kp(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,l=pl(t,e.stateNode);t=vl(t.default,t.update),e.flags&=-5,t!=="none"&&Us(e,l,t,e.memoizedState=[],!1)}else(e.subtreeFlags&33554432)!==0&&Kp(e);e=e.sibling}}function zf(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var t=e.stateNode;t.paired!==null&&(t.paired=null,Wn(e.child,!1))}zf(e)}e=e.sibling}}function Ko(e){if(e.tag===30)e.stateNode.paired=null,Wn(e.child,!1),zf(e);else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)Ko(e),e=e.sibling;else zf(e)}function Zp(e){for(e=e.child;e!==null;)e.tag===30?Wn(e.child,!1):(e.subtreeFlags&33554432)!==0&&Zp(e),e=e.sibling}function Df(e,t,l,a,o,c,g){for(var S=!1;t!==null;){if(t.tag===5){var _=t.stateNode;if(c!==null&&rn<c.length){var B=c[rn],Q=dd(_);(B.view||Q.view)&&(S=!0);var K;if(K=(e.flags&4)===0)if(Q.clip)K=!0;else{K=B.rect;var U=Q.rect;K=K.y!==U.y||K.x!==U.x||K.height!==U.height||K.width!==U.width}K&&(e.flags|=4),Q.abs?Q=!B.abs:(B=B.rect,Q=Q.rect,Q=B.height!==Q.height||B.width!==Q.width),Q&&(e.flags|=32)}else e.flags|=32;(e.flags&4)!==0&&I0(_,rn===0?l:l+"_"+rn,o),S&&(e.flags&4)!==0||(Jn===null&&(Jn=[]),Jn.push(_,rn===0?a:a+"_"+rn,t.memoizedProps)),rn++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&g?e.flags|=t.flags&32:Df(e,t.child,l,a,o,c,g)&&(S=!0));t=t.sibling}return S}function Pp(e,t){for(e=e.child;e!==null;){if(e.tag===30){var l=e.memoizedProps,a=e.stateNode,o=pl(l,a),c=vl(l.default,l.update),g;g=e.memoizedState,e.memoizedState=null,a=e;var S=e.child;rn=0,o=Df(a,S,o,o,c,g,!1),(e.flags&4)!==0&&o&&Qs(e,l.onUpdate)}else(e.subtreeFlags&33554432)!==0&&Pp(e);e=e.sibling}}var Rt=!1,Ye=!1,el=!1,Hf=!1,Jp=typeof WeakSet=="function"?WeakSet:Set,Tt=null,tl=!1,sr=!1,Zo=!1,Lf=!1;function $S(e,t,l){if(e=e.containerInfo,rd=ti,e=ng(e),bc(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var o=a.getSelection&&a.getSelection();if(o&&o.rangeCount!==0){a=o.anchorNode;var c=o.anchorOffset,g=o.focusNode;o=o.focusOffset;try{a.nodeType,g.nodeType}catch{a=null;break e}var S=0,_=-1,B=-1,Q=0,K=0,U=e,q=null;t:for(;;){for(var ae;U!==a||c!==0&&U.nodeType!==3||(_=S+c),U!==g||o!==0&&U.nodeType!==3||(B=S+o),U.nodeType===3&&(S+=U.nodeValue.length),(ae=U.firstChild)!==null;)q=U,U=ae;for(;;){if(U===e)break t;if(q===a&&++Q===c&&(_=S),q===g&&++K===o&&(B=S),(ae=U.nextSibling)!==null)break;U=q,q=U.parentNode}U=ae}a=_===-1||B===-1?null:{start:_,end:B}}else a=null}a=a||{start:0,end:0}}else a=null;for(od={focusedElem:e,selectionRange:a},ti=!1,l=(l&335544064)===l,Tt=t,t=l?9270:1024;Tt!==null;){if(e=Tt,l&&(a=e.deletions,a!==null))for(c=0;c<a.length;c++)l&&Of(a[c]);if(e.alternate===null&&(e.flags&2)!==0)l&&Yp(e),Po(l);else{if(e.tag===22){if(a=e.alternate,e.memoizedState!==null){a!==null&&a.memoizedState===null&&l&&Of(a),Po(l);continue}else if(a!==null&&a.memoizedState!==null){l&&Yp(e),Po(l);continue}}a=e.child,(e.subtreeFlags&t)!==0&&a!==null?(a.return=e,Tt=a):(l&&Kp(e),Po(l))}}gn=null}function Po(e){for(;Tt!==null;){var t=Tt,l=e,a=t.alternate,o=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if((o&1024)!==0&&a!==null){l=void 0,o=a.memoizedProps,a=a.memoizedState;var c=t.stateNode;try{var g=Ya(t.type,o);l=c.getSnapshotBeforeUpdate(g,a),c.__reactInternalSnapshotBeforeUpdate=l}catch(S){Ke(t,t.return,S)}}break;case 3:if((o&1024)!==0){if(a=t.stateNode.containerInfo,l=a.nodeType,l===9)gd(a);else if(l===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":gd(a);break;default:a.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:l&&a!==null&&(l=pl(a.memoizedProps,a.stateNode),o=t.memoizedProps,o=vl(o.default,o.update),o!=="none"&&Us(a,l,o,a.memoizedState=[],!0));break;default:if((o&1024)!==0)throw Error(r(163))}if(a=t.sibling,a!==null){a.return=t.return,Tt=a;break}Tt=t.return}}function Wp(e,t,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:nl(e,l),a&4&&lr(5,l);break;case 1:if(nl(e,l),a&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(g){Ke(l,l.return,g)}else{var o=Ya(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(g){Ke(l,l.return,g)}}a&64&&Bp(l),a&512&&Pn(l,l.return);break;case 3:if(nl(e,l),a&64&&(e=l.updateQueue,e!==null)){if(t=null,l.child!==null)switch(l.child.tag){case 27:case 5:t=l.child.stateNode;break;case 1:t=l.child.stateNode}try{Tg(e,t)}catch(g){Ke(l,l.return,g)}}break;case 27:t===null&&a&4&&Qp(l);case 26:case 5:nl(e,l),t===null&&a&4&&Nf(l),a&512&&Pn(l,l.return);break;case 12:nl(e,l);break;case 31:nl(e,l),a&4&&l0(e,l);break;case 13:nl(e,l),a&4&&a0(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=PS.bind(null,l),Ob(e,l))));break;case 22:if(a=l.memoizedState!==null||Rt,!a){var c=t!==null&&t.memoizedState!==null||Ye;t=Rt,o=Ye,Rt=a,(Ye=c)&&!o?(a=2,(l.subtreeFlags&8772)!==0&&(a|=1),Un(e,l,a)):nl(e,l),Rt=t,Ye=o}break;case 30:nl(e,l),a&512&&Pn(l,l.return);break;case 7:a&512&&Pn(l,l.return);default:nl(e,l)}}function Uf(e,t){for(e=e.child;e!==null;)e0(e,t),e=e.sibling}function e0(e,t){switch(e.tag){case 5:case 26:try{var l=e.stateNode;if(t){var a=l.style;typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"}else{var o=e.stateNode,c=e.memoizedProps.style,g=c!=null&&c.hasOwnProperty("display")?c.display:null;o.style.display=g==null||typeof g=="boolean"?"":(""+g).trim()}}catch(_){Ke(e,e.return,_)}Vf(e,t);break;case 6:try{e.stateNode.nodeValue=t?"":e.memoizedProps,Be=!0}catch(_){Ke(e,e.return,_)}break;case 18:try{var S=e.stateNode;t?Y0(S,!0):Y0(e.stateNode,!1)}catch(_){Ke(e,e.return,_)}break;case 22:case 23:e.memoizedState===null&&Uf(e,t);break;default:Uf(e,t)}}function Vf(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){e:{var l=e,a=t;switch(l.tag){case 4:e0(l,a);break e;case 22:l.memoizedState===null&&Vf(l,a);break e;default:Vf(l,a)}}e=e.sibling}}function t0(e){var t=e.alternate;t!==null&&(e.alternate=null,t0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&to(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ct=null,on=!1;function Hn(e,t,l){for(l=l.child;l!==null;)n0(e,t,l),l=l.sibling}function n0(e,t,l){if(nt&&typeof nt.onCommitFiberUnmount=="function")try{nt.onCommitFiberUnmount(Pe,l)}catch{}switch(l.tag){case 26:Ye||Lt(l,t),Hn(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&!Ye&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Ye||Lt(l,t),ar(l);var a=ct,o=on;na(l.type)&&(ct=l.stateNode,on=!1),Hn(e,t,l),iv(l.stateNode,l.type,l.memoizedProps),ct=a,on=o;break;case 5:Ye||Lt(l,t),ar(l);case 6:if(l.tag===6&&ar(l),a=ct,o=on,ct=null,Hn(e,t,l),ct=a,on=o,ct!==null)if(on)try{(ct.nodeType===9?ct.body:ct.nodeName==="HTML"?ct.ownerDocument.body:ct).removeChild(l.stateNode),Be=!0}catch(c){Ke(l,t,c)}else try{ct.removeChild(l.stateNode),Be=!0}catch(c){Ke(l,t,c)}break;case 18:ct!==null&&(on?(e=ct,Q0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),ni(e)):Q0(ct,l.stateNode));break;case 4:a=ct,o=on,ct=l.stateNode.containerInfo,on=!0,Hn(e,t,l),ct=a,on=o;break;case 0:case 11:case 14:case 15:Kl(2,l,t),Ye||Kl(4,l,t),Hn(e,t,l);break;case 1:Ye||(Lt(l,t),a=l.stateNode,typeof a.componentWillUnmount=="function"&&kp(l,t,a)),Hn(e,t,l);break;case 21:Hn(e,t,l);break;case 22:Ye=(a=Ye)||l.memoizedState!==null,Hn(e,t,l),Ye=a;break;case 30:Lt(l,t),Hn(e,t,l);break;case 7:Ye||Lt(l,t),Hn(e,t,l);break;default:Hn(e,t,l)}}function l0(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ni(e)}catch(l){Ke(t,t.return,l)}}}function a0(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ni(e)}catch(l){Ke(t,t.return,l)}}function FS(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Jp),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Jp),t;default:throw Error(r(435,e.tag))}}function Jo(e,t){var l=FS(e);t.forEach(function(a){if(!l.has(a)){l.add(a);var o=JS.bind(null,e,a);a.then(o,o)}})}function Pt(e,t,l){var a=t.deletions;if(a!==null)for(var o=0;o<a.length;o++){var c=a[o],g=e,S=t,_=S;e:for(;_!==null;){switch(_.tag){case 27:if(na(_.type)){ct=_.stateNode,on=!1;break e}break;case 5:ct=_.stateNode,on=!1;break e;case 3:case 4:ct=_.stateNode.containerInfo,on=!0;break e}_=_.return}if(ct===null)throw Error(r(160));n0(g,S,c),ct=null,on=!1,g=c.alternate,g!==null&&(g.return=null),c.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)s0(t,e,l),t=t.sibling}var Ln=null;function s0(e,t,l){var a=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(o&4&&(a=e.updateQueue,a=a!==null?a.events:null,a!==null))for(var c=0;c<a.length;c++){var g=a[c];g.ref.impl=g.nextImpl}Pt(t,e,l),Jt(e),o&4&&(Kl(3,e,e.return),lr(3,e),Kl(5,e,e.return));break;case 1:Pt(t,e,l),Jt(e),o&512&&(Ye||a===null||Lt(a,a.return)),o&64&&Rt&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?t:l.concat(t))));break;case 26:if(c=Ln,Pt(t,e,l),Jt(e),o&512&&(Ye||a===null||Lt(a,a.return)),o&4)if(o=a!==null?a.memoizedState:null,l=e.memoizedState,a===null)if(l===null)if(e.stateNode===null)if(Rt)e.stateNode=k0(e.type,e.memoizedProps,t.containerInfo,e);else{e:{t=e.type,l=e.memoizedProps,o=c.ownerDocument||c;t:switch(t){case"title":a=o.getElementsByTagName("title")[0],(!a||a[Ai]||a[Ot]||a.namespaceURI==="http://www.w3.org/2000/svg"||a.hasAttribute("itemprop"))&&(a=o.createElement(t),o.head.insertBefore(a,o.querySelector("head > title"))),Ut(a,t,l),a[Ot]=e,_t(a),t=a;break e;case"link":if(c=dv("link","href",o).get(t+(l.href||""))){for(g=0;g<c.length;g++)if(a=c[g],a.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&a.getAttribute("rel")===(l.rel==null?null:l.rel)&&a.getAttribute("title")===(l.title==null?null:l.title)&&a.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){c.splice(g,1);break t}}a=o.createElement(t),Ut(a,t,l),o.head.appendChild(a);break;case"meta":if(c=dv("meta","content",o).get(t+(l.content||""))){for(g=0;g<c.length;g++)if(a=c[g],a.getAttribute("content")===(l.content==null?null:""+l.content)&&a.getAttribute("name")===(l.name==null?null:l.name)&&a.getAttribute("property")===(l.property==null?null:l.property)&&a.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&a.getAttribute("charset")===(l.charSet==null?null:l.charSet)){c.splice(g,1);break t}}a=o.createElement(t),Ut(a,t,l),o.head.appendChild(a);break;default:throw Error(r(468,t))}a[Ot]=e,_t(a),t=a}e.stateNode=t}else Rt||wd(c,e.type,e.stateNode);else e.stateNode=fv(c,l,e.memoizedProps);else o!==l?(o===null?(t=a.stateNode,t===null||Ye||t.parentNode.removeChild(t)):o.count--,l===null?Rt||wd(c,e.type,e.stateNode):fv(c,l,e.memoizedProps)):l===null&&e.stateNode!==null&&_f(e,e.memoizedProps,a.memoizedProps);break;case 27:Pt(t,e,l),Jt(e),o&512&&(Ye||a===null||Lt(a,a.return)),a!==null&&o&4&&_f(e,e.memoizedProps,a.memoizedProps);break;case 5:if(c=el,el=!1,Pt(t,e,l),el=c,Jt(e),o&512&&(Ye||a===null||Lt(a,a.return)),e.flags&32){t=e.stateNode;try{xs(t,""),Be=!0}catch(Q){Ke(e,e.return,Q)}}o&4&&e.stateNode!=null&&(t=e.memoizedProps,_f(e,t,a!==null?a.memoizedProps:t)),o&1024&&(Hf=!0);break;case 6:if(Pt(t,e,l),Jt(e),o&4){if(e.stateNode===null)throw Error(r(162));t=e.memoizedProps,l=e.stateNode;try{l.nodeValue=t,Be=!0}catch(Q){Ke(e,e.return,Q)}}break;case 3:if(Be=!1,hu=null,c=Ln,Ln=mr(t.containerInfo),Pt(t,e,l),Ln=c,Jt(e),o&4&&a!==null&&a.memoizedState.isDehydrated)try{ni(t.containerInfo)}catch(Q){Ke(e,e.return,Q)}Hf&&(Hf=!1,i0(e)),Be=!1;break;case 4:o=el,el=Rt,a=Nm(),c=Ln,Ln=mr(e.stateNode.containerInfo),Pt(t,e,l),Jt(e),Ln=c,Be&&sr&&(Zo=!0),Be=a,el=o;break;case 12:Pt(t,e,l),Jt(e);break;case 31:Pt(t,e,l),Jt(e),o&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Jo(e,t)));break;case 13:Pt(t,e,l),Jt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(tu=et()),o&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Jo(e,t)));break;case 22:c=e.memoizedState!==null,g=a!==null&&a.memoizedState!==null;var S=Rt,_=Ye,B=el;Rt=S||c,el=B||c,Ye=_||g,Pt(t,e,l),Ye=_,el=B,Rt=S,Jt(e),o&8192&&(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,!c||a===null||g||Rt||Ye||(t=g||Ye,l=Rt,a=Ye,Rt=c||Rt,Ye=t,Zl(e,2),Rt=l,Ye=a),!c&&el||Uf(e,c)),o&4&&(t=e.updateQueue,t!==null&&(l=t.retryQueue,l!==null&&(t.retryQueue=null,Jo(e,l))));break;case 19:Pt(t,e,l),Jt(e),o&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Jo(e,t)));break;case 30:o&512&&(Ye||a===null||Lt(a,a.return)),o=Nm(),c=sr,g=(l&335544064)===l,S=e.memoizedProps,sr=g&&vl(S.default,S.update)!=="none",Pt(t,e,l),Jt(e),g&&a!==null&&Be&&(e.flags|=4),sr=c,Be=o;break;case 21:break;case 7:o&512&&(Ye||a===null||Lt(a,a.return)),a&&a.stateNode!==null&&(a.stateNode._fragmentFiber=e);default:Pt(t,e,l),Jt(e)}}function Jt(e){var t=e.flags;if(t&2){try{for(var l,a=e.return;a!==null;){if(qp(a)){l=a;break}a=a.return}a=null;for(var o=e.return;o!==null;){if(Ef(o)){var c=o.stateNode;a===null?a=[c]:a.push(c)}if(jf(o))break;o=o.return}var g=a;if(l==null)throw Error(r(160));switch(l.tag){case 27:var S=l.stateNode,_=Mf(e);Yo(e,_,S,g);break;case 5:var B=l.stateNode;l.flags&32&&(xs(B,""),l.flags&=-33);var Q=Mf(e);Yo(e,Q,B,g);break;case 3:case 4:var K=l.stateNode.containerInfo,U=Mf(e);Rf(e,U,K,g);break;default:throw Error(r(161))}}catch(q){Ke(e,e.return,q)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function i0(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;i0(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,ti=!0,t.reset(),ti=!1),e=e.sibling}}function Vs(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)r0(t,e),t=t.sibling;else Pp(t)}function r0(e,t){var l=e.alternate;if(l===null)Tf(e,!1);else switch(e.tag){case 3:if(Lf=tl=!1,Ip(),Vs(t,e),!tl&&!Zo){if(e=Jn,e!==null)for(var a=0;a<e.length;a+=3){l=e[a];var o=e[a+1];X0(l,e[a+2]),l=l.ownerDocument.documentElement,l!==null&&l.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+o+")"})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===""&&(e.style.viewTransitionName="none",e.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),Lf=!0}Jn=null;break;case 5:Vs(t,e);break;case 4:a=tl,tl=!1,Vs(t,e),tl&&(Zo=!0),tl=a;break;case 22:e.memoizedState===null&&(l.memoizedState!==null?Tf(e,!1):Vs(t,e));break;case 30:a=tl,o=Ip(),tl=!1,Vs(t,e),tl&&(e.flags|=4);var c=e.memoizedProps,g=e.stateNode;t=pl(c,g),g=pl(l.memoizedProps,g);var S=vl(c.default,c.update);S==="none"?t=!1:(c=l.memoizedState,l.memoizedState=null,l=e.child,rn=0,t=Df(e,l,t,g,S,c,!0),rn!==(c===null?0:c.length)&&(e.flags|=32)),(e.flags&4)!==0&&t?(Qs(e,e.memoizedProps.onUpdate),Jn=o):o!==null&&(o.push.apply(o,Jn),Jn=o),tl=(e.flags&32)!==0?!0:a;break;default:Vs(t,e)}}function nl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Wp(e,t.alternate,t),t=t.sibling}function Zl(e,t){for(e=e.child;e!==null;){var l=e,a=t;switch(l.tag){case 0:case 11:case 14:case 15:Kl(4,l,l.return),Zl(l,a);break;case 1:Lt(l,l.return);var o=l.stateNode;typeof o.componentWillUnmount=="function"&&kp(l,l.return,o),Zl(l,a);break;case 27:(a&2)!==0&&iv(l.stateNode,l.type,l.memoizedProps);case 5:Lt(l,l.return),l.tag!==5&&l.tag!==27||ar(l),Zl(l,a);break;case 6:ar(l);break;case 26:Lt(l,l.return),o=l.stateNode,l.memoizedState!==null||o===null||Ye||o.parentNode.removeChild(o),Zl(l,a);break;case 22:l.memoizedState===null&&Zl(l,a);break;case 30:Lt(l,l.return),Zl(l,a);break;case 7:Lt(l,l.return);default:Zl(l,a)}e=e.sibling}}function Un(e,t,l){for(l=(t.subtreeFlags&8772)!==0?l:l&-2,t=t.child;t!==null;){var a=t.alternate,o=e,c=t,g=c.flags,S=(l&1)!==0;switch(c.tag){case 0:case 11:case 15:Un(o,c,l),lr(4,c);break;case 1:if(Un(o,c,l),a=c,o=a.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(Q){Ke(a,a.return,Q)}if(a=c,o=a.updateQueue,o!==null){var _=a.stateNode;try{var B=o.shared.hiddenCallbacks;if(B!==null)for(o.shared.hiddenCallbacks=null,o=0;o<B.length;o++)Rg(B[o],_)}catch(Q){Ke(a,a.return,Q)}}S&&g&64&&Bp(c),Pn(c,c.return);break;case 27:(l&2)!==0&&Qp(c);case 5:c.tag!==5&&c.tag!==27||Gp(c),Un(o,c,l),S&&a===null&&g&4&&Nf(c),Pn(c,c.return);break;case 6:Gp(c);break;case 26:_=c.stateNode,c.memoizedState!==null||_===null||Rt||wd(mr(_.ownerDocument),c.type,_),Un(o,c,l),S&&a===null&&g&4&&Nf(c),Pn(c,c.return);break;case 12:Un(o,c,l);break;case 31:Un(o,c,l),S&&g&4&&l0(o,c);break;case 13:Un(o,c,l),S&&g&4&&a0(o,c);break;case 22:c.memoizedState===null&&Un(o,c,l),Pn(c,c.return);break;case 30:Un(o,c,l),Pn(c,c.return);break;case 7:Pn(c,c.return);default:Un(o,c,l)}t=t.sibling}}function $f(e,t){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&qi(l))}function Ff(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&qi(e))}function Mn(e,t,l,a){var o=(l&335544064)===l;if(t.subtreeFlags&(o?10262:10256))for(t=t.child;t!==null;)o0(e,t,l,a),t=t.sibling;else o&&Zp(t)}function o0(e,t,l,a){var o=(l&335544064)===l;o&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&Ko(t);var c=t.flags;switch(t.tag){case 0:case 11:case 15:Mn(e,t,l,a),c&2048&&lr(9,t);break;case 1:Mn(e,t,l,a);break;case 3:Mn(e,t,l,a),o&&Lf&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,e.style.viewTransitionName==="root"&&(e.style.viewTransitionName=""),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName==="none"&&(e.style.viewTransitionName="")),c&2048&&(c=null,t.alternate!==null&&(c=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==c&&(t.refCount++,c!=null&&qi(c)));break;case 12:if(c&2048){Mn(e,t,l,a),c=t.stateNode;try{var g=t.memoizedProps,S=g.id,_=g.onPostCommit;typeof _=="function"&&_(S,t.alternate===null?"mount":"update",c.passiveEffectDuration,-0)}catch(B){Ke(t,t.return,B)}}else Mn(e,t,l,a);break;case 31:Mn(e,t,l,a);break;case 13:Mn(e,t,l,a);break;case 23:break;case 22:g=t.stateNode,S=t.alternate,t.memoizedState!==null?(o&&S!==null&&S.memoizedState===null&&Ko(S),g._visibility&2?Mn(e,t,l,a):ir(e,t)):(o&&S!==null&&S.memoizedState!==null&&Ko(t),g._visibility&2?Mn(e,t,l,a):(g._visibility|=2,$s(e,t,l,a,(t.subtreeFlags&10256)!==0||!1))),c&2048&&$f(S,t);break;case 24:Mn(e,t,l,a),c&2048&&Ff(t.alternate,t);break;case 30:o&&(c=t.alternate,c!==null&&(Wn(c.child,!0),Wn(t.child,!0))),Mn(e,t,l,a);break;default:Mn(e,t,l,a)}}function $s(e,t,l,a,o){for(o=o&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var c=e,g=t,S=l,_=a,B=g.flags;switch(g.tag){case 0:case 11:case 15:$s(c,g,S,_,o),lr(8,g);break;case 23:break;case 22:var Q=g.stateNode;g.memoizedState!==null?Q._visibility&2?$s(c,g,S,_,o):ir(c,g):(Q._visibility|=2,$s(c,g,S,_,o)),o&&B&2048&&$f(g.alternate,g);break;case 24:$s(c,g,S,_,o),o&&B&2048&&Ff(g.alternate,g);break;default:$s(c,g,S,_,o)}t=t.sibling}}function ir(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,a=t,o=a.flags;switch(a.tag){case 22:ir(l,a),o&2048&&$f(a.alternate,a);break;case 24:ir(l,a),o&2048&&Ff(a.alternate,a);break;default:ir(l,a)}t=t.sibling}}var Ia=8192;function Xa(e,t,l){if(e.subtreeFlags&Ia)for(e=e.child;e!==null;)u0(e,t,l),e=e.sibling}function u0(e,t,l){switch(e.tag){case 26:Xa(e,t,l),e.flags&Ia&&(e.memoizedState!==null?Yb(l,Ln,e.memoizedState,e.memoizedProps):(e=e.stateNode,(t&335544128)===t&&pv(l,e)));break;case 5:Xa(e,t,l),e.flags&Ia&&(e=e.stateNode,(t&335544128)===t&&pv(l,e));break;case 3:case 4:var a=Ln;Ln=mr(e.stateNode.containerInfo),Xa(e,t,l),Ln=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=Ia,Ia=16777216,Xa(e,t,l),Ia=a):Xa(e,t,l));break;case 30:if((e.flags&Ia)!==0&&(a=e.memoizedProps.name,a!=null&&a!=="auto")){var o=e.stateNode;o.paired=null,gn===null&&(gn=new Map),gn.set(a,o)}Xa(e,t,l);break;default:Xa(e,t,l)}}function c0(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function rr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];Tt=a,d0(a,e)}c0(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)f0(e),e=e.sibling}function f0(e){switch(e.tag){case 0:case 11:case 15:rr(e),e.flags&2048&&Kl(9,e,e.return);break;case 3:rr(e);break;case 12:rr(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Wo(e)):rr(e);break;default:rr(e)}}function Wo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];Tt=a,d0(a,e)}c0(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Kl(8,t,t.return),Wo(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,Wo(t));break;default:Wo(t)}e=e.sibling}}function d0(e,t){for(;Tt!==null;){var l=Tt;switch(l.tag){case 0:case 11:case 15:Kl(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var a=l.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:qi(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,Tt=a;else e:for(l=e;Tt!==null;){a=Tt;var o=a.sibling,c=a.return;if(t0(a),a===l){Tt=null;break e}if(o!==null){o.return=c,Tt=o;break e}Tt=c}}}var BS={getCacheForType:function(e){var t=zt(yt),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return zt(yt).controller.signal}},kS=typeof WeakMap=="function"?WeakMap:Map,qe=0,tt=null,Te=null,Oe=0,Xe=0,pn=null,Pl=!1,Fs=!1,Bf=!1,Nl=0,gt=0,Jl=0,Ka=0,eu=0,vn=0,Bs=0,or=null,un=null,kf=!1,tu=0,h0=0,nu=1/0,lu=null,Wl=null,dt=0,Vn=null,Za=null,ll=0,Gf=0,qf=null,m0=null,ks=null,Gs=null,qs=null,ur=0,au=null;function yn(){return(qe&2)!==0&&Oe!==0?Oe&-Oe:re.T!==null?ed():vm()}function g0(){if(vn===0)if((Oe&536870912)===0||Re){var e=_a;_a<<=1,(_a&3932160)===0&&(_a=262144),vn=e}else vn=536870912;return e=Dt.current,e!==null&&(e.flags|=32),vn}function Qs(e,t){if(t!=null){var l=e.stateNode,a=l.ref;a===null&&(a=l.ref=K0(pl(e.memoizedProps,l))),Gs===null&&(Gs=[]),Gs.push(t.bind(null,a))}}function cn(e,t,l){(e===tt&&(Xe===2||Xe===9)||e.cancelPendingCommit!==null)&&(Ys(e,0),ea(e,Oe,vn,!1)),Ti(e,l),((qe&2)===0||e!==tt)&&(e===tt&&((qe&2)===0&&(Ka|=l),gt===4&&ea(e,Oe,vn,!1)),al(e))}function p0(e,t,l){if((qe&6)!==0)throw Error(r(327));var a=!l&&(t&127)===0&&(t&e.expiredLanes)===0||Hl(e,t),o=a?QS(e,t):Yf(e,t,!0),c=a;do{if(o===0){Fs&&!a&&ea(e,t,0,!1);break}else{if(l=e.current.alternate,c&&!GS(l)){o=Yf(e,t,!1),c=!1;continue}if(o===2){if(c=t,e.errorRecoveryDisabledLanes&c)var g=0;else g=e.pendingLanes&-536870913,g=g!==0?g:g&536870912?536870912:0;if(g!==0){t=g;e:{var S=e;o=or;var _=S.current.memoizedState.isDehydrated;if(_&&(Ys(S,g).flags|=256),g=Yf(S,g,!1),g!==2&&g!==6){if(Bf&&!_){S.errorRecoveryDisabledLanes|=c,Ka|=c,o=4;break e}c=un,un=o,c!==null&&(un===null?un=c:un.push.apply(un,c))}o=g}if(c=!1,o!==2)continue}}if(o===1){Ys(e,0),ea(e,t,0,!0);break}e:{switch(a=e,c=o,c){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:ea(a,t,vn,!Pl);break e;case 2:un=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(o=tu+300-et(),10<o)){if(ea(a,t,vn,!Pl),Ra(a,0,!0)!==0)break e;ll=t,a.timeoutHandle=fd(v0.bind(null,a,l,un,lu,kf,t,vn,Ka,Bs,Pl,c,"Throttled",-0,0),o);break e}v0(a,l,un,lu,kf,t,vn,Ka,Bs,Pl,c,null,-0,0)}}break}while(!0);al(e)}function v0(e,t,l,a,o,c,g,S,_,B,Q,K,U,q){e.timeoutHandle=-1;var ae=t.subtreeFlags,de=(c&335544064)===c;if(K=null,(de||ae&8192||(ae&16785408)===16785408)&&(K={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Xn},gn=null,u0(t,c,K),de&&(ae=K,de=e.containerInfo,de=(de.nodeType===9?de:de.ownerDocument).__reactViewTransition,de!=null&&(ae.count++,ae.waitingForViewTransition=!0,ae=vr.bind(ae),de.finished.then(ae,ae))),ae=(c&62914560)===c?tu-et():(c&4194048)===c?h0-et():0,ae=Ib(K,ae),ae!==null)){ll=c,e.cancelPendingCommit=ae(E0.bind(null,e,t,c,l,a,o,g,S,_,B,Q,K,null,U,q)),ea(e,c,g,!B);return}E0(e,t,c,l,a,o,g,S,_,B,Q,K)}function GS(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var a=0;a<l.length;a++){var o=l[a],c=o.getSnapshot;o=o.value;try{if(!hn(c(),o))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;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 ea(e,t,l,a){t=dm(e,t),t&=~eu,t&=~Ka,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var o=t;0<o;){var c=31-Xt(o),g=1<<c;a[c]=-1,o&=~g}l!==0&&mm(e,l,t)}function su(){return(qe&6)===0?(cr(0),!1):!0}function Qf(){if(Te!==null){if(Xe===0)var e=Te.return;else e=Te,Sl=Ua=null,Jc(e),Os=null,Ii=0,e=Te;for(;e!==null;)Fp(e.alternate,e),e=e.return;Te=null}}function Ys(e,t){var l=e.timeoutHandle;return l!==-1&&(e.timeoutHandle=-1,hb(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),ll=0,Qf(),tt=e,Te=l=yl(e.current,null),Oe=t,Xe=0,pn=null,Pl=!1,Fs=Hl(e,t),Bf=!1,Bs=vn=eu=Ka=Jl=gt=0,un=or=null,kf=!1,Nl=dm(e,t),ho(),l}function y0(e,t){Ne=null,re.H=Vo,t===As||t===jo?(t=Eg(),Xe=3):t===$c?(t=Eg(),Xe=4):Xe=t===mf?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,pn=t,Te===null&&(gt=1,$o(e,jn(t,e.current)))}function x0(){var e=Dt.current;return e===null?!0:(Oe&4194048)===Oe?qt===null:(Oe&62914560)===Oe||(Oe&536870912)!==0?e===qt:!1}function S0(){var e=re.H;return re.H=Vo,e===null?Vo:e}function b0(){var e=re.A;return re.A=BS,e}function iu(){gt=4,Pl||(Oe&4194048)!==Oe&&Dt.current!==null||(Fs=!0),(Jl&134217727)===0&&(Ka&134217727)===0||tt===null||ea(tt,Oe,vn,!1)}function Yf(e,t,l){var a=qe;qe|=2;var o=S0(),c=b0();(tt!==e||Oe!==t)&&(lu=null,Ys(e,t)),t=!1;var g=gt;e:do try{if(Xe!==0&&Te!==null){var S=Te,_=pn;switch(Xe){case 8:Qf(),g=6;break e;case 3:case 2:case 9:case 6:Dt.current===null&&(t=!0);var B=Xe;if(Xe=0,pn=null,Is(e,S,_,B),l&&Fs){g=0;break e}break;default:B=Xe,Xe=0,pn=null,Is(e,S,_,B)}}qS(),g=gt;break}catch(Q){y0(e,Q)}while(!0);return t&&e.shellSuspendCounter++,Sl=Ua=null,qe=a,re.H=o,re.A=c,Te===null&&(tt=null,Oe=0,ho()),g}function qS(){for(;Te!==null;)w0(Te)}function QS(e,t){var l=qe;qe|=2;var a=S0(),o=b0();tt!==e||Oe!==t?(lu=null,nu=et()+500,Ys(e,t)):Fs=Hl(e,t);e:do try{if(Xe!==0&&Te!==null){t=Te;var c=pn;t:switch(Xe){case 1:Xe=0,pn=null,Is(e,t,c,1);break;case 2:case 9:if(Cg(c)){Xe=0,pn=null,C0(t);break}t=function(){Xe!==2&&Xe!==9||tt!==e||(Xe=7),al(e)},c.then(t,t);break e;case 3:Xe=7;break e;case 4:Xe=5;break e;case 7:Cg(c)?(Xe=0,pn=null,C0(t)):(Xe=0,pn=null,Is(e,t,c,7));break;case 5:var g=null;switch(Te.tag){case 26:g=Te.memoizedState;case 5:case 27:var S=Te;if(g?mv(g):S.stateNode.complete){Xe=0,pn=null;var _=S.sibling;if(_!==null)Te=_;else{var B=S.return;B!==null?(Te=B,ru(B)):Te=null}break t}}Xe=0,pn=null,Is(e,t,c,5);break;case 6:Xe=0,pn=null,Is(e,t,c,6);break;case 8:Qf(),gt=6;break e;default:throw Error(r(462))}}YS();break}catch(Q){y0(e,Q)}while(!0);return Sl=Ua=null,re.H=a,re.A=o,qe=l,Te!==null?0:(tt=null,Oe=0,ho(),gt)}function YS(){for(;Te!==null&&!Ct();)w0(Te)}function w0(e){var t=Vp(e.alternate,e,Nl);e.memoizedProps=e.pendingProps,t===null?ru(e):Te=t}function C0(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=Ap(l,t,t.pendingProps,t.type,void 0,Oe);break;case 11:t=Ap(l,t,t.pendingProps,t.type.render,t.ref,Oe);break;case 5:Jc(t);var a=t;a===Mt&&(Re?(xo(a),a.tag===5&&a.stateNode!=null&&(lt=a.stateNode)):(xo(a),Re=!0));default:Fp(l,t),t=Te=dg(t,Nl),t=Vp(l,t,Nl)}e.memoizedProps=e.pendingProps,t===null?ru(e):Te=t}function Is(e,t,l,a){Sl=Ua=null,Jc(t),Os=null,Ii=0;var o=t.return;try{if(zS(e,o,t,l,Oe)){gt=1,$o(e,jn(l,e.current)),Te=null;return}}catch(c){if(o!==null)throw Te=o,c;gt=1,$o(e,jn(l,e.current)),Te=null;return}t.flags&32768?(Re||a===1?e=!0:Fs||(Oe&536870912)!==0?e=!1:(Pl=e=!0,(a===2||a===9||a===3||a===6)&&(a=Dt.current,a!==null&&a.tag===13&&(a.flags|=16384))),j0(t,e)):ru(t)}function ru(e){var t=e;do{if((t.flags&32768)!==0){j0(t,Pl);return}e=t.return;var l=US(t.alternate,t,Nl);if(l!==null){Te=l;return}if(t=t.sibling,t!==null){Te=t;return}Te=t=e}while(t!==null);gt===0&&(gt=5)}function j0(e,t){do{var l=VS(e.alternate,e);if(l!==null){l.flags&=32767,Te=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){Te=e;return}Te=e=l}while(e!==null);gt=6,Te=null}function E0(e,t,l,a,o,c,g,S,_,B,Q,K){e.cancelPendingCommit=null;do ou();while(dt!==0);if((qe&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));e===tt&&(Te=tt=null,Oe=0),Za=t,Vn=e,ll=l,qf=o,m0=a,IS(e,t,l,g,S,_,K)}}function IS(e,t,l,a,o,c,g){var S=t.lanes|t.childLanes;if(Gf=S,S|=Nc,xx(e,l,S,a,o,c),Gs=null,(l&335544064)===l?(qs=bS(e),a=10262):(qs=null,a=10256),(t.subtreeFlags&a)!==0||(t.flags&a)!==0?(e.callbackNode=null,e.callbackPriority=0,WS(Ea,function(){return Zf(),null})):(e.callbackNode=null,e.callbackPriority=0),Io=!1,a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=re.T,re.T=null,o=me.p,me.p=2,c=qe,qe|=4;try{$S(e,t,l)}finally{qe=c,me.p=o,re.T=a}}dt=1,Io?ks=xb(g,e.containerInfo,qs,If,Xf,KS,Kf,Zf,XS):(If(),Xf(),Kf())}function XS(e){if(dt!==0){var t=Vn.onRecoverableError;t(e,{componentStack:null})}}function KS(){dt===3&&(dt=0,r0(Za,Vn),dt=4)}function If(){if(dt===1){dt=0;var e=Vn,t=Za,l=ll,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=re.T,re.T=null;var o=me.p;me.p=2;var c=qe;qe|=4;try{sr=Zo=!1,s0(t,e,l),l=od;var g=ng(e.containerInfo),S=l.focusedElem,_=l.selectionRange;if(g!==S&&S&&S.ownerDocument&&tg(S.ownerDocument.documentElement,S)){if(_!==null&&bc(S)){var B=_.start,Q=_.end;if(Q===void 0&&(Q=B),"selectionStart"in S)S.selectionStart=B,S.selectionEnd=Math.min(Q,S.value.length);else{var K=S.ownerDocument||document,U=K&&K.defaultView||window;if(U.getSelection){var q=U.getSelection(),ae=S.textContent.length,de=Math.min(_.start,ae),_e=_.end===void 0?de:Math.min(_.end,ae);!q.extend&&de>_e&&(g=_e,_e=de,de=g);var $=eg(S,de),O=eg(S,_e);if($&&O&&(q.rangeCount!==1||q.anchorNode!==$.node||q.anchorOffset!==$.offset||q.focusNode!==O.node||q.focusOffset!==O.offset)){var G=K.createRange();G.setStart($.node,$.offset),q.removeAllRanges(),de>_e?(q.addRange(G),q.extend(O.node,O.offset)):(G.setEnd(O.node,O.offset),q.addRange(G))}}}}for(K=[],q=S;q=q.parentNode;)q.nodeType===1&&K.push({element:q,left:q.scrollLeft,top:q.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<K.length;S++){var I=K[S];I.element.scrollLeft=I.left,I.element.scrollTop=I.top}}ti=!!rd,od=rd=null}finally{qe=c,me.p=o,re.T=a}}e.current=t,dt=2}}function Xf(){if(dt===2){dt=0;var e=Vn,t=Za,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=re.T,re.T=null;var a=me.p;me.p=2;var o=qe;qe|=4;try{Wp(e,t.alternate,t)}finally{qe=o,me.p=a,re.T=l}}dt=3}}function Kf(){if(dt===4||dt===3){dt=0;var e=ks;ks=null,st();var t=Vn,l=Za,a=ll,o=m0,c=(a&335544064)===a?10262:10256;if((l.subtreeFlags&c)!==0||(l.flags&c)!==0?dt=5:(dt=0,Za=Vn=null,N0(t,t.pendingLanes)),c=t.pendingLanes,c===0&&(Wl=null),lc(a),l=l.stateNode,nt&&typeof nt.onCommitFiberRoot=="function")try{nt.onCommitFiberRoot(Pe,l,void 0,(l.current.flags&128)===128)}catch{}if(o!==null){l=re.T,c=me.p,me.p=2,re.T=null;try{for(var g=t.onRecoverableError,S=0;S<o.length;S++){var _=o[S];g(_.value,{componentStack:_.stack})}}finally{re.T=l,me.p=c}}if(o=Gs,g=qs,qs=null,o!==null&&(Gs=null,g===null&&(g=[]),e!==null))for(_=0;_<o.length;_++)l=(0,o[_])(g),l!==void 0&&e.finished.finally(l);(ll&3)!==0&&ou(),al(t),c=t.pendingLanes,(a&261930)!==0&&(c&42)!==0?t===au?ur++:(ur=0,au=t):(ur=0,au=null),cr(0)}}function N0(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,qi(t)))}function ou(){return ks!==null&&(ks.skipTransition(),ks=null),If(),Xf(),Kf(),Zf()}function Zf(){if(dt!==5)return!1;var e=Vn,t=Gf;Gf=0;var l=lc(ll),a=re.T,o=me.p;try{me.p=32>l?32:l,re.T=null,l=qf,qf=null;var c=Vn,g=ll;if(dt=0,Za=Vn=null,ll=0,(qe&6)!==0)throw Error(r(331));var S=qe;if(qe|=4,f0(c.current),o0(c,c.current,g,l),qe=S,cr(0,!1),nt&&typeof nt.onPostCommitFiberRoot=="function")try{nt.onPostCommitFiberRoot(Pe,c)}catch{}return!0}finally{me.p=o,re.T=a,N0(e,t)}}function _0(e,t,l){t=jn(l,t),t=hf(e.stateNode,t,2),e=Ql(e,t,2),e!==null&&(Ti(e,2),al(e))}function Ke(e,t,l){if(e.tag===3)_0(e,e,l);else for(;t!==null;){if(t.tag===3){_0(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Wl===null||!Wl.has(a))){e=jn(l,e),l=Cp(2),a=Ql(t,l,2),a!==null&&(jp(l,a,t,e),Ti(a,2),al(a));break}}t=t.return}}function Pf(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new kS;var o=new Set;a.set(t,o)}else o=a.get(t),o===void 0&&(o=new Set,a.set(t,o));o.has(l)||(Bf=!0,o.add(l),e=ZS.bind(null,e,t,l),t.then(e,e))}function ZS(e,t,l){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,tt===e&&(Oe&l)===l&&((gt===4||gt===3&&(Oe&62914560)===Oe&&300>et()-tu)&&(qe&2)===0?Ys(e,0):eu|=l,Bs===Oe&&(Bs=0)),al(e)}function M0(e,t){t===0&&(t=hm()),e=Da(e,t),e!==null&&(Ti(e,t),al(e))}function PS(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),M0(e,l)}function JS(e,t){var l=0;switch(e.tag){case 31:case 13:var a=e.stateNode,o=e.memoizedState;o!==null&&(l=o.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(r(314))}a!==null&&a.delete(t),M0(e,l)}function WS(e,t){return Ve(e,t)}var Xs=null,Ks=null,Jf=!1,uu=!1,Wf=!1,ta=0;function al(e){e!==Ks&&e.next===null&&(Ks===null?Xs=Ks=e:Ks=Ks.next=e),uu=!0,Jf||(Jf=!0,tb())}function cr(e,t){if(!Wf&&uu){Wf=!0;do for(var l=!1,a=Xs;a!==null;){if(e!==0){var o=a.pendingLanes;if(o===0)var c=0;else{var g=a.suspendedLanes,S=a.pingedLanes;c=(1<<31-Xt(42|e)+1)-1,c&=o&~(g&~S),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(l=!0,O0(a,c))}else c=Oe,c=Ra(a,a===tt?c:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(c&3)===0||Hl(a,c)||(l=!0,O0(a,c));a=a.next}while(l);Wf=!1}}function eb(){R0()}function R0(){uu=Jf=!1;var e=0;ta!==0&&db()&&(e=ta);for(var t=et(),l=null,a=Xs;a!==null;){var o=a.next,c=T0(a,t);c===0?(a.next=null,l===null?Xs=o:l.next=o,o===null&&(Ks=l)):(l=a,(e!==0||(c&3)!==0)&&(uu=!0)),a=o}dt!==0&&dt!==5||cr(e),ta!==0&&(ta=0)}function T0(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,o=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var g=31-Xt(c),S=1<<g,_=o[g];_===-1?((S&l)===0||(S&a)!==0)&&(o[g]=yx(S,t)):_<=t&&(e.expiredLanes|=S),c&=~S}if(t=tt,l=Oe,l=Ra(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,l===0||e===t&&(Xe===2||Xe===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Fe(a),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||Hl(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(a!==null&&Fe(a),lc(l)){case 2:case 8:l=ja;break;case 32:l=Ea;break;case 268435456:l=Mi;break;default:l=Ea}return a=A0.bind(null,e),l=Ve(l,a),e.callbackPriority=t,e.callbackNode=l,t}return a!==null&&a!==null&&Fe(a),e.callbackPriority=2,e.callbackNode=null,2}function A0(e,t){if(dt!==0&&dt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(ou()&&e.callbackNode!==l)return null;var a=Oe;return a=Ra(e,e===tt?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(p0(e,a,t),T0(e,et()),e.callbackNode!=null&&e.callbackNode===l?A0.bind(null,e):null)}function O0(e,t){if(ou())return null;p0(e,t,!0)}function tb(){mb(function(){(qe&6)!==0?Ve(Dl,eb):R0()})}function ed(){if(ta===0){var e=Fa;e===0&&(e=Na,Na<<=1,(Na&261888)===0&&(Na=256)),ta=e}return ta}function z0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ao(e)}function nb(e,t,l,a,o){if(t==="submit"&&l&&l.stateNode===o){var c=z0((o[an]||null).action),g=a.submitter;g&&(t=(t=g[an]||null)?z0(t.formAction):g.getAttribute("formAction"),t!==null&&(c=t,g=null));var S=new oo("action","action",null,a,o);e.push({event:S,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(ta!==0){var _=new FormData(o,g);of(l,{pending:!0,data:_,method:o.method,action:c},null,_)}}else typeof c=="function"&&(S.preventDefault(),_=new FormData(o,g),of(l,{pending:!0,data:_,method:o.method,action:c},c,_))},currentTarget:o}]})}}for(var td=0;td<Ec.length;td++){var nd=Ec[td],lb=nd.toLowerCase(),ab=nd[0].toUpperCase()+nd.slice(1);Dn(lb,"on"+ab)}Dn(sg,"onAnimationEnd"),Dn(ig,"onAnimationIteration"),Dn(rg,"onAnimationStart"),Dn("dblclick","onDoubleClick"),Dn("focusin","onFocus"),Dn("focusout","onBlur"),Dn(hS,"onTransitionRun"),Dn(mS,"onTransitionStart"),Dn(gS,"onTransitionCancel"),Dn(og,"onTransitionEnd"),vs("onMouseEnter",["mouseout","mouseover"]),vs("onMouseLeave",["mouseout","mouseover"]),vs("onPointerEnter",["pointerout","pointerover"]),vs("onPointerLeave",["pointerout","pointerover"]),Aa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Aa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Aa("onBeforeInput",["compositionend","keypress","textInput","paste"]),Aa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Aa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Aa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var fr="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(" "),sb=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(fr));function D0(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var a=e[l],o=a.event;a=a.listeners;e:{var c=void 0;if(t)for(var g=a.length-1;0<=g;g--){var S=a[g],_=S.instance,B=S.currentTarget;if(S=S.listener,_!==c&&o.isPropagationStopped())break e;c=S,o.currentTarget=B;try{c(o)}catch(Q){fo(Q)}o.currentTarget=null,c=_}else for(g=0;g<a.length;g++){if(S=a[g],_=S.instance,B=S.currentTarget,S=S.listener,_!==c&&o.isPropagationStopped())break e;c=S,o.currentTarget=B;try{c(o)}catch(Q){fo(Q)}o.currentTarget=null,c=_}}}}function Ae(e,t){var l=t[xm];l===void 0&&(l=t[xm]=new Set);var a=e+"__bubble";l.has(a)||(H0(t,e,2,!1),l.add(a))}function ld(e,t,l){var a=0;t&&(a|=4),H0(l,e,a,t)}var cu="_reactListening"+Math.random().toString(36).slice(2);function ad(e){if(!e[cu]){e[cu]=!0,wm.forEach(function(l){l!=="selectionchange"&&(sb.has(l)||ld(l,!1,e),ld(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[cu]||(t[cu]=!0,ld("selectionchange",!1,t))}}function H0(e,t,l,a){switch(jv(t)){case 2:var o=Pb;break;case 8:o=Jb;break;default:o=jd}l=o.bind(null,t,l,e),o=void 0,!fc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),a?o!==void 0?e.addEventListener(t,l,{capture:!0,passive:o}):e.addEventListener(t,l,!0):o!==void 0?e.addEventListener(t,l,{passive:o}):e.addEventListener(t,l,!1)}function sd(e,t,l,a,o){var c=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var g=a.tag;if(g===3||g===4){var S=a.stateNode.containerInfo;if(S===o)break;if(g===4)for(g=a.return;g!==null;){var _=g.tag;if((_===3||_===4)&&g.stateNode.containerInfo===o)return;g=g.return}for(;S!==null;){if(g=Ta(S),g===null)return;if(_=g.tag,_===5||_===6||_===26||_===27){a=c=g;continue e}S=S.parentNode}}a=a.return}Hm(function(){var B=c,Q=uc(l),K=[];e:{var U=ug.get(e);if(U!==void 0){var q=oo,ae=e;switch(e){case"keypress":if(io(l)===0)break e;case"keydown":case"keyup":q=Gx;break;case"focusin":ae="focus",q=gc;break;case"focusout":ae="blur",q=gc;break;case"beforeblur":case"afterblur":q=gc;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":q=Vm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":q=Ax;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":q=Xx;break;case sg:case ig:case rg:q=Dx;break;case og:q=Zx;break;case"scroll":case"scrollend":q=Rx;break;case"wheel":q=Jx;break;case"copy":case"cut":case"paste":q=Lx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":q=Fm;break;case"submit":q=Yx;break;case"toggle":case"beforetoggle":q=eS}var de=(t&4)!==0,_e=!de&&(e==="scroll"||e==="scrollend"),$=de?U!==null?U+"Capture":null:U;de=[];for(var O=B,G;O!==null;){var I=O;if(G=I.stateNode,I=I.tag,I!==5&&I!==26&&I!==27||G===null||$===null||(I=zi(O,$),I!=null&&de.push(dr(O,I,G))),_e)break;O=O.return}0<de.length&&(U=new q(U,ae,null,l,Q),K.push({event:U,listeners:de}))}}if((t&7)===0){e:{if(q=e==="mouseover"||e==="pointerover",U=e==="mouseout"||e==="pointerout",q&&l!==oc&&(ae=l.relatedTarget||l.fromElement)&&(Ta(ae)||ae[ms]))break e;(U||q)&&(ae=Q.window===Q?Q:(q=Q.ownerDocument)?q.defaultView||q.parentWindow:window,U?(q=l.relatedTarget||l.toElement,U=B,q=q?Ta(q):null,q!==null&&(_e=d(q),de=q.tag,q!==_e||de!==5&&de!==27&&de!==6)&&(q=null)):(U=null,q=B),U!==q&&(de=Vm,I="onMouseLeave",$="onMouseEnter",O="mouse",(e==="pointerout"||e==="pointerover")&&(de=Fm,I="onPointerLeave",$="onPointerEnter",O="pointer"),_e=U==null?ae:Oi(U),G=q==null?ae:Oi(q),ae=new de(I,O+"leave",U,l,Q),ae.target=_e,ae.relatedTarget=G,I=null,Ta(Q)===B&&(de=new de($,O+"enter",q,l,Q),de.target=G,de.relatedTarget=_e,I=de),_e=I,de=U&&q?D(U,q,ib):null,U!==null&&L0(K,ae,U,de,!1),q!==null&&_e!==null&&L0(K,_e,q,de,!0)))}e:{if(U=B?Oi(B):window,q=U.nodeName&&U.nodeName.toLowerCase(),q==="select"||q==="input"&&U.type==="file")var ce=Xm;else if(Ym(U))if(Km)ce=cS;else{ce=oS;var ze=rS}else q=U.nodeName,!q||q.toLowerCase()!=="input"||U.type!=="checkbox"&&U.type!=="radio"?B&&rc(B.elementType)&&(ce=Xm):ce=uS;if(ce&&(ce=ce(e,B))){Im(K,ce,l,Q);break e}ze&&ze(e,U,B)}switch(ze=B?Oi(B):window,e){case"focusin":(Ym(ze)||ze.contentEditable==="true")&&(Cs=ze,wc=B,Bi=null);break;case"focusout":Bi=wc=Cs=null;break;case"mousedown":Cc=!0;break;case"contextmenu":case"mouseup":case"dragend":Cc=!1,lg(K,l,Q);break;case"selectionchange":if(dS)break;case"keydown":case"keyup":lg(K,l,Q)}var ge;if(vc)e:{switch(e){case"compositionstart":var ve="onCompositionStart";break e;case"compositionend":ve="onCompositionEnd";break e;case"compositionupdate":ve="onCompositionUpdate";break e}ve=void 0}else ws?qm(e,l)&&(ve="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(ve="onCompositionStart");ve&&(Bm&&l.locale!=="ko"&&(ws||ve!=="onCompositionStart"?ve==="onCompositionEnd"&&ws&&(ge=Lm()):(Ll=Q,dc="value"in Ll?Ll.value:Ll.textContent,ws=!0)),ze=fu(B,ve),0<ze.length&&(ve=new $m(ve,e,null,l,Q),K.push({event:ve,listeners:ze}),ge?ve.data=ge:(ge=Qm(l),ge!==null&&(ve.data=ge)))),(ge=nS?lS(e,l):aS(e,l))&&(ve=fu(B,"onBeforeInput"),0<ve.length&&(ze=new $m("onBeforeInput","beforeinput",null,l,Q),K.push({event:ze,listeners:ve}),ze.data=ge)),nb(K,e,B,l,Q)}D0(K,t)})}function dr(e,t,l){return{instance:e,listener:t,currentTarget:l}}function fu(e,t){for(var l=t+"Capture",a=[];e!==null;){var o=e,c=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||c===null||(o=zi(e,l),o!=null&&a.unshift(dr(e,o,c)),o=zi(e,t),o!=null&&a.push(dr(e,o,c))),e.tag===3)return a;e=e.return}return[]}function ib(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function L0(e,t,l,a,o){for(var c=t._reactName,g=[];l!==null&&l!==a;){var S=l,_=S.alternate,B=S.stateNode;if(S=S.tag,_!==null&&_===a)break;S!==5&&S!==26&&S!==27||B===null||(_=B,o?(B=zi(l,c),B!=null&&g.unshift(dr(l,B,_))):o||(B=zi(l,c),B!=null&&g.push(dr(l,B,_)))),l=l.return}g.length!==0&&e.push({event:t,listeners:g})}var rb=/\r\n?/g,ob=/\u0000|\uFFFD/g;function U0(e){return(typeof e=="string"?e:""+e).replace(rb,`
|
|
49
|
-
`).replace(ob,"")}function V0(e,t){return t=U0(t),U0(e)===t}function Ze(e,t,l,a,o,c){switch(l){case"children":if(typeof a=="string")t==="body"||t==="textarea"&&a===""||xs(e,a);else if(typeof a=="number"||typeof a=="bigint")t!=="body"&&xs(e,""+a);else return;break;case"className":lo(e,"class",a);break;case"tabIndex":lo(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":lo(e,l,a);break;case"style":zm(e,a,c);return;case"data":if(t!=="object"){lo(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=ao(a),e.setAttribute(l,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof c=="function"&&(l==="formAction"?(t!=="input"&&Ze(e,t,"name",o.name,o,null),Ze(e,t,"formEncType",o.formEncType,o,null),Ze(e,t,"formMethod",o.formMethod,o,null),Ze(e,t,"formTarget",o.formTarget,o,null)):(Ze(e,t,"encType",o.encType,o,null),Ze(e,t,"method",o.method,o,null),Ze(e,t,"target",o.target,o,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=ao(a),e.setAttribute(l,a);break;case"onClick":a!=null&&(e.onclick=Xn);return;case"onScroll":a!=null&&Ae("scroll",e);return;case"onScrollEnd":a!=null&&Ae("scrollend",e);return;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(r(61));if(l=a.__html,l!=null){if(o.children!=null)throw Error(r(60));(c!=null?c.__html:void 0)!==l&&(e.innerHTML=l)}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}l=ao(a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,a):e.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":a===!0?e.setAttribute(l,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,a):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(l,a):e.removeAttribute(l);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(l):e.setAttribute(l,a);break;case"popover":Ae("beforetoggle",e),Ae("toggle",e),no(e,"popover",a);break;case"xlinkActuate":ml(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":ml(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":ml(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":ml(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":ml(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":ml(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":ml(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":ml(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":ml(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":no(e,"is",a);break;case"innerText":case"textContent":return;default:if(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")l=_x.get(l)||l,no(e,l,a);else return}Be=!0}function id(e,t,l,a,o,c){switch(l){case"style":zm(e,a,c);return;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(r(61));if(l=a.__html,l!=null){if(o.children!=null)throw Error(r(60));(c!=null?c.__html:void 0)!==l&&(e.innerHTML=l)}}break;case"children":if(typeof a=="string")xs(e,a);else if(typeof a=="number"||typeof a=="bigint")xs(e,""+a);else return;break;case"onScroll":a!=null&&Ae("scroll",e);return;case"onScrollEnd":a!=null&&Ae("scrollend",e);return;case"onClick":a!=null&&(e.onclick=Xn);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!Cm.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(o=l.endsWith("Capture"),c=l.slice(2,o?l.length-7:void 0),t=e[an]||null,t=t!=null?t[l]:null,typeof t=="function"&&e.removeEventListener(c,t,o),typeof a=="function")){typeof t!="function"&&t!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(c,a,o);break e}Be=!0,l in e?e[l]=a:a===!0?e.setAttribute(l,""):no(e,l,a)}return}Be=!0}function Ut(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ae("error",e),Ae("load",e);var a=!1,o=!1,c;for(c in l)if(l.hasOwnProperty(c)){var g=l[c];if(g!=null)switch(c){case"src":a=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Ze(e,t,c,g,l,null)}}o&&Ze(e,t,"srcSet",l.srcSet,l,null),a&&Ze(e,t,"src",l.src,l,null);return;case"input":Ae("invalid",e);var S=c=g=o=null,_=null,B=null;for(a in l)if(l.hasOwnProperty(a)){var Q=l[a];if(Q!=null)switch(a){case"name":o=Q;break;case"type":g=Q;break;case"checked":_=Q;break;case"defaultChecked":B=Q;break;case"value":c=Q;break;case"defaultValue":S=Q;break;case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(r(137,t));break;default:Ze(e,t,a,Q,l,null)}}Rm(e,c,S,_,B,g,o,!1);return;case"select":Ae("invalid",e),a=g=c=null;for(o in l)if(l.hasOwnProperty(o)&&(S=l[o],S!=null))switch(o){case"value":c=S;break;case"defaultValue":g=S;break;case"multiple":a=S;default:Ze(e,t,o,S,l,null)}t=c,l=g,e.multiple=!!a,t!=null?ys(e,!!a,t,!1):l!=null&&ys(e,!!a,l,!0);return;case"textarea":Ae("invalid",e),c=o=a=null;for(g in l)if(l.hasOwnProperty(g)&&(S=l[g],S!=null))switch(g){case"value":a=S;break;case"defaultValue":o=S;break;case"children":c=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(r(91));break;default:Ze(e,t,g,S,l,null)}Am(e,a,o,c);return;case"option":for(_ in l)if(l.hasOwnProperty(_)&&(a=l[_],a!=null))switch(_){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:Ze(e,t,_,a,l,null)}return;case"dialog":Ae("beforetoggle",e),Ae("toggle",e),Ae("cancel",e),Ae("close",e);break;case"iframe":case"object":Ae("load",e);break;case"video":case"audio":for(a=0;a<fr.length;a++)Ae(fr[a],e);break;case"image":Ae("error",e),Ae("load",e);break;case"details":Ae("toggle",e);break;case"embed":case"source":case"link":Ae("error",e),Ae("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(B in l)if(l.hasOwnProperty(B)&&(a=l[B],a!=null))switch(B){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Ze(e,t,B,a,l,null)}return;default:if(rc(t)){for(Q in l)l.hasOwnProperty(Q)&&(a=l[Q],a!==void 0&&id(e,t,Q,a,l,void 0));return}}for(S in l)l.hasOwnProperty(S)&&(a=l[S],a!=null&&Ze(e,t,S,a,l,null))}var ub={};function cb(e,t,l,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,c=null,g=null,S=null,_=null,B=null,Q=null;for(q in l){var K=l[q];if(l.hasOwnProperty(q)&&K!=null)switch(q){case"checked":break;case"value":break;case"defaultValue":_=K;default:a.hasOwnProperty(q)||Ze(e,t,q,null,a,K)}}for(var U in a){var q=a[U];if(K=l[U],a.hasOwnProperty(U)&&(q!=null||K!=null))switch(U){case"type":q!==K&&(Be=!0),c=q;break;case"name":q!==K&&(Be=!0),o=q;break;case"checked":q!==K&&(Be=!0),B=q;break;case"defaultChecked":q!==K&&(Be=!0),Q=q;break;case"value":q!==K&&(Be=!0),g=q;break;case"defaultValue":q!==K&&(Be=!0),S=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(r(137,t));break;default:q!==K&&Ze(e,t,U,q,a,K)}}sc(e,g,S,_,B,Q,c,o);return;case"select":q=g=S=U=null;for(c in l)if(_=l[c],l.hasOwnProperty(c)&&_!=null)switch(c){case"value":break;case"multiple":q=_;default:a.hasOwnProperty(c)||Ze(e,t,c,null,a,_)}for(o in a)if(c=a[o],_=l[o],a.hasOwnProperty(o)&&(c!=null||_!=null))switch(o){case"value":c!==_&&(Be=!0),U=c;break;case"defaultValue":c!==_&&(Be=!0),S=c;break;case"multiple":c!==_&&(Be=!0),g=c;default:c!==_&&Ze(e,t,o,c,a,_)}t=S,l=g,a=q,U!=null?ys(e,!!l,U,!1):!!a!=!!l&&(t!=null?ys(e,!!l,t,!0):ys(e,!!l,l?[]:"",!1));return;case"textarea":q=U=null;for(S in l)if(o=l[S],l.hasOwnProperty(S)&&o!=null&&!a.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:Ze(e,t,S,null,a,o)}for(g in a)if(o=a[g],c=l[g],a.hasOwnProperty(g)&&(o!=null||c!=null))switch(g){case"value":o!==c&&(Be=!0),U=o;break;case"defaultValue":o!==c&&(Be=!0),q=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(r(91));break;default:o!==c&&Ze(e,t,g,o,a,c)}Tm(e,U,q);return;case"option":for(var ae in l)if(U=l[ae],l.hasOwnProperty(ae)&&U!=null&&!a.hasOwnProperty(ae))switch(ae){case"selected":e.selected=!1;break;default:Ze(e,t,ae,null,a,U)}for(_ in a)if(U=a[_],q=l[_],a.hasOwnProperty(_)&&U!==q&&(U!=null||q!=null))switch(_){case"selected":U!==q&&(Be=!0),e.selected=U&&typeof U!="function"&&typeof U!="symbol";break;default:Ze(e,t,_,U,a,q)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var de in l)U=l[de],l.hasOwnProperty(de)&&U!=null&&!a.hasOwnProperty(de)&&Ze(e,t,de,null,a,U);for(B in a)if(U=a[B],q=l[B],a.hasOwnProperty(B)&&U!==q&&(U!=null||q!=null))switch(B){case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(r(137,t));break;default:Ze(e,t,B,U,a,q)}return;default:if(rc(t)){for(var _e in l)U=l[_e],l.hasOwnProperty(_e)&&U!==void 0&&!a.hasOwnProperty(_e)&&id(e,t,_e,void 0,a,U);for(Q in a)U=a[Q],q=l[Q],!a.hasOwnProperty(Q)||U===q||U===void 0&&q===void 0||id(e,t,Q,U,a,q);return}}for(var $ in l)U=l[$],l.hasOwnProperty($)&&U!=null&&!a.hasOwnProperty($)&&Ze(e,t,$,null,a,U);for(K in a)U=a[K],q=l[K],!a.hasOwnProperty(K)||U===q||U==null&&q==null||Ze(e,t,K,U,a,q)}function $0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function fb(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),a=0;a<l.length;a++){var o=l[a],c=o.transferSize,g=o.initiatorType,S=o.duration;if(c&&S&&$0(g)){for(g=0,S=o.responseEnd,a+=1;a<l.length;a++){var _=l[a],B=_.startTime;if(B>S)break;var Q=_.transferSize,K=_.initiatorType;Q&&$0(K)&&(_=_.responseEnd,g+=Q*(_<S?1:(S-B)/(_-B)))}if(--a,t+=8*(c+g)/(o.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var rd=null,od=null;function hr(e){return e.nodeType===9?e:e.ownerDocument}function F0(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function B0(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function k0(e,t,l,a){return l=hr(l).createElement(e),l[Ot]=a,l[an]=t,Ut(l,e,t),_t(l),l}function ud(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var cd=null;function db(){var e=window.event;return e&&e.type==="popstate"?e===cd?!1:(cd=e,!0):(cd=null,!1)}var fd=typeof setTimeout=="function"?setTimeout:void 0,hb=typeof clearTimeout=="function"?clearTimeout:void 0,G0=typeof Promise=="function"?Promise:void 0,q0=typeof requestAnimationFrame=="function"?requestAnimationFrame:fd,mb=typeof queueMicrotask=="function"?queueMicrotask:typeof G0<"u"?function(e){return G0.resolve(null).then(e).catch(gb)}:fd;function gb(e){setTimeout(function(){throw e})}function na(e){return e==="head"}function Q0(e,t){var l=t,a=0;do{var o=l.nextSibling;if(e.removeChild(l),o&&o.nodeType===8)if(l=o.data,l==="/$"||l==="/&"){if(a===0){e.removeChild(o),ni(t);return}a--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")a++;else if(l==="html")xd(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,xd(l);for(var c=l.firstChild;c;){var g=c.nextSibling,S=c.nodeName;c[Ai]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&c.rel.toLowerCase()==="stylesheet"||l.removeChild(c),c=g}}else l==="body"&&xd(e.ownerDocument.body);l=o}while(l);ni(t)}function Y0(e,t){var l=e;e=0;do{var a=l.nextSibling;if(l.nodeType===1?t?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(t?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),a&&a.nodeType===8)if(l=a.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=a}while(l)}function I0(e,t,l){if(t=CSS.escape(t)!==t?"r-"+btoa(t).replace(/=/g,""):t,e.style.viewTransitionName=t,l!=null&&(e.style.viewTransitionClass=l),l=getComputedStyle(e),l.display==="inline"){if(t=e.getClientRects(),t.length===1)var a=1;else for(var o=a=0;o<t.length;o++){var c=t[o];0<c.width&&0<c.height&&a++}a===1&&(e=e.style,e.display=t.length===1?"inline-block":"block",e.marginTop="-"+l.paddingTop,e.marginBottom="-"+l.paddingBottom)}}function X0(e,t){e=e.style,t=t.style;var l=t!=null?t.hasOwnProperty("viewTransitionName")?t.viewTransitionName:t.hasOwnProperty("view-transition-name")?t["view-transition-name"]:null:null;e.viewTransitionName=l==null||typeof l=="boolean"?"":(""+l).trim(),l=t!=null?t.hasOwnProperty("viewTransitionClass")?t.viewTransitionClass:t.hasOwnProperty("view-transition-class")?t["view-transition-class"]:null:null,e.viewTransitionClass=l==null||typeof l=="boolean"?"":(""+l).trim(),e.display==="inline-block"&&(t==null?e.display=e.margin="":(l=t.display,e.display=l==null||typeof l=="boolean"?"":l,l=t.margin,l!=null?e.margin=l:(l=t.hasOwnProperty("marginTop")?t.marginTop:t["margin-top"],e.marginTop=l==null||typeof l=="boolean"?"":l,t=t.hasOwnProperty("marginBottom")?t.marginBottom:t["margin-bottom"],e.marginBottom=t==null||typeof t=="boolean"?"":t)))}function pb(e,t,l){return l=l.ownerDocument.defaultView,{rect:e,abs:t.position==="absolute"||t.position==="fixed",clip:t.clipPath!=="none"||t.overflow!=="visible"||t.filter!=="none"||t.mask!=="none"||t.mask!=="none"||t.borderRadius!=="0px",view:0<=e.bottom&&0<=e.right&&e.top<=l.innerHeight&&e.left<=l.innerWidth}}function dd(e){var t=e.getBoundingClientRect(),l=getComputedStyle(e);return pb(t,l,e)}function vb(e){return e.documentElement.clientHeight}function yb(e){this.addEventListener("load",e),this.addEventListener("error",e)}function xb(e,t,l,a,o,c,g,S,_){var B=t.nodeType===9?t:t.ownerDocument;try{var Q=B.startViewTransition({update:function(){var U=B.defaultView,q=U.navigation&&U.navigation.transition,ae=B.fonts.status;a();var de=[];if(ae==="loaded"&&(vb(B),B.fonts.status==="loading"&&de.push(B.fonts.ready)),ae=de.length,e!==null)for(var _e=e.suspenseyImages,$=0,O=0;O<_e.length;O++){var G=_e[O];if(!G.complete){var I=G.getBoundingClientRect();if(0<I.bottom&&0<I.right&&I.top<U.innerHeight&&I.left<U.innerWidth){if($+=gv(G),$>mu){de.length=ae;break}G=new Promise(yb.bind(G)),de.push(G)}}}if(0<de.length)return U=Promise.race([Promise.all(de),new Promise(function(ce){return setTimeout(ce,500)})]).then(o,o),(q?Promise.allSettled([q.finished,U]):U).then(c,c);if(o(),q)return q.finished.then(c,c);c()},types:l});B.__reactViewTransition=Q;var K=[];return Q.ready.then(function(){for(var U=B.documentElement.getAnimations({subtree:!0}),q=0;q<U.length;q++){var ae=U[q],de=ae.effect,_e=de.pseudoElement;if(_e!=null&&_e.startsWith("::view-transition")){K.push(ae),ae=de.getKeyframes();for(var $=_e=void 0,O=!0,G=0;G<ae.length;G++){var I=ae[G],ce=I.width;if(_e===void 0)_e=ce;else if(_e!==ce){O=!1;break}if(ce=I.height,$===void 0)$=ce;else if($!==ce){O=!1;break}delete I.width,delete I.height,I.transform==="none"&&delete I.transform}O&&_e!==void 0&&$!==void 0&&(de.setKeyframes(ae),O=getComputedStyle(de.target,de.pseudoElement),O.width!==_e||O.height!==$)&&(O=ae[0],O.width=_e,O.height=$,O=ae[ae.length-1],O.width=_e,O.height=$,de.setKeyframes(ae))}}g()},function(U){B.__reactViewTransition===Q&&(B.__reactViewTransition=null);try{if(typeof U=="object"&&U!==null)switch(U.name){case"InvalidStateError":(U.message==="View transition was skipped because document visibility state is hidden."||U.message==="Skipping view transition because document visibility state has become hidden."||U.message==="Skipping view transition because viewport size changed."||U.message==="Transition was aborted because of invalid state")&&(U=null)}U!==null&&_(U)}finally{a(),o(),g()}}),Q.finished.finally(function(){for(var U=0;U<K.length;U++)K[U].cancel();B.__reactViewTransition===Q&&(B.__reactViewTransition=null),S()}),Q}catch{return a(),o(),g(),null}}function Pa(e,t){this._scope=document.documentElement,this._selector="::view-transition-"+e+"("+t+")"}Pa.prototype.animate=function(e,t){return t=typeof t=="number"?{duration:t}:z({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Pa.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,l=e.getAnimations({subtree:!0}),a=[],o=0;o<l.length;o++){var c=l[o].effect;c!==null&&c.target===e&&c.pseudoElement===t&&a.push(l[o])}return a},Pa.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function K0(e){return{name:e,group:new Pa("group",e),imagePair:new Pa("image-pair",e),old:new Pa("old",e),new:new Pa("new",e)}}function xn(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}xn.prototype.addEventListener=function(e,t,l){var a=null,o=null;if(!(l!=null&&typeof l!="boolean"&&(a=l.signal||null,a!==null&&a.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var c=this._eventListeners;if(P0(c,e,t,l)===-1){var g=this,S=t;l!=null&&typeof l!="boolean"&&l.once===!0&&(S=function(_){g.removeEventListener(e,t,l),typeof t=="function"?t.call(this,_):t.handleEvent(_)}),a!==null&&(o=g.removeEventListener.bind(g,e,t,l),a.addEventListener("abort",o,{once:!0}),o=a.removeEventListener.bind(a,"abort",o)),a=Zs(l),c.push({type:e,listener:t,optionsOrUseCapture:l,attachedListener:S,cleanup:o}),v(this._fragmentFiber.child,!1,Sb,e,S,a)}this._eventListeners=c}};function Sb(e,t,l,a){return M(e).addEventListener(t,l,a),!1}xn.prototype.removeEventListener=function(e,t,l){var a=this._eventListeners;if(a!==null&&(t=P0(a,e,t,l),t!==-1)){var o=a[t];l=o.attachedListener;var c=o.cleanup;o=Zs(o.optionsOrUseCapture),v(this._fragmentFiber.child,!1,bb,e,l,o),a.splice(t,1),c!==null&&c()}};function bb(e,t,l,a){return M(e).removeEventListener(t,l,a),!1}function Zs(e){return e!=null&&typeof e!="boolean"&&(e.once===!0||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Z0(e){return e==null?"c=0":typeof e=="boolean"?"c="+(e?"1":"0"):"c="+(e.capture?"1":"0")}function P0(e,t,l,a){if(e.length===0)return-1;a=Z0(a);for(var o=0;o<e.length;o++){var c=e[o];if(c.type===t&&c.listener===l&&Z0(c.optionsOrUseCapture)===a)return o}return-1}xn.prototype.dispatchEvent=function(e){var t=b(this._fragmentFiber);if(t===null)return!0;t=M(t);var l=this._eventListeners;if(l!==null&&0<l.length||!e.bubbles){var a=t.nodeType===9?t.createComment(""):document.createTextNode("");if(l)for(var o=0;o<l.length;o++){var c=l[o];a.addEventListener(c.type,c.attachedListener,Zs(c.optionsOrUseCapture))}if(t.appendChild(a),e=a.dispatchEvent(e),l)for(o=0;o<l.length;o++)c=l[o],a.removeEventListener(c.type,c.attachedListener,Zs(c.optionsOrUseCapture));return t.removeChild(a),e}return t.dispatchEvent(e)},xn.prototype.focus=function(e){v(this._fragmentFiber.child,!0,J0,e,void 0,void 0)};function J0(e,t){return e.tag===6?!1:(e=M(e),zb(e,t))}xn.prototype.focusLast=function(e){var t=[];v(this._fragmentFiber.child,!0,hd,t,void 0,void 0);for(var l=t.length-1;0<=l&&!J0(t[l],e);l--);};function hd(e,t){return t.push(e),!1}xn.prototype.blur=function(){var e=b(this._fragmentFiber);e!==null&&(e=M(e),e=hr(e).activeElement,e!==null&&v(this._fragmentFiber.child,!1,wb,e,void 0,void 0))};function wb(e,t){return e.tag===6?!1:(e=M(e),e===t||e.contains(t)?(t.blur(),!0):!1)}xn.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),v(this._fragmentFiber.child,!1,Cb,e,void 0,void 0)};function Cb(e,t){return e.tag===6||(e=M(e),t.observe(e)),!1}xn.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),v(this._fragmentFiber.child,!1,jb,e,void 0,void 0);for(var l=t=0;l<$n.length;l++){var a=$n[l];a.fragmentInstance===this&&a.observer===e?e.unobserve(a.instance):$n[t++]=a}$n.length=t}};function jb(e,t){return e.tag===6||(e=M(e),t.unobserve(e)),!1}var $n=[],md=!1;function Eb(e,t,l){$n.push({fragmentInstance:e,observer:t,instance:l}),md||(md=!0,Db(function(){md=!1;var a=$n;$n=[];for(var o=0;o<a.length;o++){var c=a[o];c.observer.unobserve(c.instance)}}))}xn.prototype.getClientRects=function(){var e=[];return v(this._fragmentFiber.child,!1,Nb,e,void 0,void 0),e};function Nb(e,t){if(e.tag===6){e=e.stateNode;var l=e.ownerDocument.createRange();l.selectNodeContents(e),t.push.apply(t,l.getClientRects())}else e=M(e),t.push.apply(t,e.getClientRects());return!1}xn.prototype.getRootNode=function(e){var t=b(this._fragmentFiber);return t===null?this:M(t).getRootNode(e)},xn.prototype.compareDocumentPosition=function(e){var t=b(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var l=[];v(this._fragmentFiber.child,!1,hd,l,void 0,void 0);var a=M(t);if(l.length===0){if(l=a,w(this._fragmentFiber)){e:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break e}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(l=t)}t=this._fragmentFiber;var o=a=l.compareDocumentPosition(e);return l===e?o=Node.DOCUMENT_POSITION_CONTAINS:a&Node.DOCUMENT_POSITION_CONTAINED_BY&&(l=C(t)[1],l===null?o=Node.DOCUMENT_POSITION_PRECEDING:(e=M(l).compareDocumentPosition(e),o=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),o|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=M(l[0]),o=M(l[l.length-1]);var c=w(this._fragmentFiber)?t.parentElement:a;if(c==null)return Node.DOCUMENT_POSITION_DISCONNECTED;a=c.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,c=c.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_CONTAINED_BY;var g=t.compareDocumentPosition(e),S=o.compareDocumentPosition(e),_=g&Node.DOCUMENT_POSITION_CONTAINED_BY||S&Node.DOCUMENT_POSITION_CONTAINED_BY;return S=a&&c&&g&Node.DOCUMENT_POSITION_FOLLOWING&&S&Node.DOCUMENT_POSITION_PRECEDING,t=a&&t===e||c&&o===e||_||S?Node.DOCUMENT_POSITION_CONTAINED_BY:!a&&t===e||!c&&o===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:g,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||_b(t,this._fragmentFiber,l[0],l[l.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function _b(e,t,l,a,o){var c=Ta(o);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(l=!!c)e:{for(;c!==null;){if(c.tag===7&&(c===t||c.alternate===t)){l=!0;break e}c=c.return}l=!1}return l}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(c===null)return c=o.ownerDocument,o===c||o===c.documentElement||o===c.body;e:{for(c=t,t=b(t);c!==null;){if(!(c.tag!==5&&c.tag!==3&&c.tag!==27||c!==t&&c.alternate!==t)){c=!0;break e}c=c.return}c=!1}return c}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!c)&&!(t=c===l)&&(t=D(l,c,H),t===null?t=!1:(v(t,!0,F,c,l),c=R,R=null,t=c!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!c)&&!(t=c===a)&&(t=D(a,c,H),t===null?t=!1:(v(t,!0,T,c,a),c=R,j=R=null,t=c!==null)),t):!1}function W0(e,t){var l=e.ownerDocument.createRange();l.selectNodeContents(e),e=l.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}xn.prototype.scrollIntoView=function(e){if(typeof e=="object")throw Error(r(566));var t=[];v(this._fragmentFiber.child,!1,hd,t,void 0,void 0);var l=e!==!1;if(t.length===0){var a=C(this._fragmentFiber);if(a=l?a[1]||a[0]||b(this._fragmentFiber):a[0]||a[1],a===null)return;if(a.tag===6){e=M(a),W0(e,l);return}if(a=M(a),a.nodeType!==9){if(a.nodeType===11){l="host"in a?a.host:null,l!==null&&l.scrollIntoView(e);return}a.scrollIntoView(e)}}for(a=l?t.length-1:0;a!==(l?-1:t.length);){var o=t[a];o.tag===6?(o=M(o),W0(o,l)):M(o).scrollIntoView(e),a+=l?-1:1}};function Mb(e,t){return e=M(e),ev(e,t),!1}function ev(e,t){e.reactFragments==null&&(e.reactFragments=new Set),e.reactFragments.add(t)}function tv(e,t){var l=t._eventListeners;if(l!==null)for(var a=0;a<l.length;a++){var o=l[a];e.addEventListener(o.type,o.attachedListener,Zs(o.optionsOrUseCapture))}e.nodeType!==3&&(l=t._observers,l!==null&&l.forEach(function(c){for(var g=0,S=0;S<$n.length;S++){var _=$n[S];(_.fragmentInstance!==t||_.observer!==c||_.instance!==e)&&($n[g++]=_)}$n.length=g,c.observe(e)}),ev(e,t))}function Rb(e,t){var l=t._eventListeners;if(l!==null)for(var a=0;a<l.length;a++){var o=l[a];e.removeEventListener(o.type,o.attachedListener,Zs(o.optionsOrUseCapture))}e.nodeType!==3&&(l=t._observers,l!==null&&l.forEach(function(c){typeof c.rootMargin=="string"?Eb(t,c,e):c.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function gd(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var l=t;switch(t=t.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":gd(l),to(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function Tb(e,t,l,a){for(;e.nodeType===1;){var o=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[Ai])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(c=e.getAttribute("rel"),c==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(c!==o.rel||e.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||e.getAttribute("title")!==(o.title==null?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(c=e.getAttribute("src"),(c!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&c&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var c=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===c)return e}else return e;if(e=Rn(e.nextSibling),e===null)break}return null}function Ab(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=Rn(e.nextSibling),e===null))return null;return e}function nv(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Rn(e.nextSibling),e===null))return null;return e}function pd(e){return e.data==="$?"||e.data==="$~"}function vd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Ob(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var a=function(){t(),l.removeEventListener("DOMContentLoaded",a)};l.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function Rn(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==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var yd=null;function lv(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return Rn(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function av(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(t===0)return e;t--}else l!=="/$"&&l!=="/&"||t++}e=e.previousSibling}return null}function zb(e,t){function l(){a=!0}if(e.ownerDocument.activeElement===e)return!0;var a=!1;try{e.ownerDocument.addEventListener("focus",l,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener("focus",l,!0)}return a}function Db(e){q0(function(){q0(function(t){return e(t)})})}function sv(e,t,l){switch(t=hr(l),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function iv(e,t,l){for(var a in l){var o=l[a];l.hasOwnProperty(a)&&o!=null&&Ze(e,t,a,null,ub,o)}l.dangerouslySetInnerHTML!=null&&(e.textContent=""),e.onclick===Xn&&(e.onclick=null),to(e)}function xd(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);to(e)}var Tn=new Map,rv=new Set;function mr(e){if(typeof e.getRootNode=="function"){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var _l=me.d;me.d={f:Hb,r:Lb,D:Ub,C:Vb,L:$b,m:Fb,X:kb,S:Bb,M:Gb};function Hb(){var e=_l.f(),t=su();return e||t}function Lb(e){var t=gs(e);t!==null&&t.tag===5&&t.type==="form"?up(t):_l.r(e)}var Ps=typeof document>"u"?null:document;function ov(e,t,l){var a=Ps;if(a&&typeof t=="string"&&t){var o=wn(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof l=="string"&&(o+='[crossorigin="'+l+'"]'),rv.has(o)||(rv.add(o),e={rel:e,crossOrigin:l,href:t},a.querySelector(o)===null&&(t=a.createElement("link"),Ut(t,"link",e),_t(t),a.head.appendChild(t)))}}function Ub(e){_l.D(e),ov("dns-prefetch",e,null)}function Vb(e,t){_l.C(e,t),ov("preconnect",e,t)}function $b(e,t,l){_l.L(e,t,l);var a=Ps;if(a&&e&&t){var o='link[rel="preload"][as="'+wn(t)+'"]';t==="image"&&l&&l.imageSrcSet?(o+='[imagesrcset="'+wn(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(o+='[imagesizes="'+wn(l.imageSizes)+'"]')):o+='[href="'+wn(e)+'"]';var c=o;switch(t){case"style":c=Js(e);break;case"script":c=Ws(e)}if(!(Tn.has(c)||(e=z({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),Tn.set(c,e),a.querySelector(o)!==null||t==="style"&&a.querySelector(gr(c))||t==="script"&&a.querySelector(pr(c))))){var g=a.createElement("link");Ut(g,"link",e),t==="style"&&(g[eo]=!0,g.onload=g.onerror=function(){bm(g)}),_t(g),a.head.appendChild(g)}}}function Fb(e,t){_l.m(e,t);var l=Ps;if(l&&e){var a=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+wn(a)+'"][href="'+wn(e)+'"]',c=o;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=Ws(e)}if(!Tn.has(c)&&(e=z({rel:"modulepreload",href:e},t),Tn.set(c,e),l.querySelector(o)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(pr(c)))return}a=l.createElement("link"),Ut(a,"link",e),_t(a),l.head.appendChild(a)}}}function Bb(e,t,l){_l.S(e,t,l);var a=Ps;if(a&&e){var o=ps(a).hoistableStyles,c=Js(e);t=t||"default";var g=o.get(c);if(!g){var S={loading:0,preload:null};if(g=a.querySelector(gr(c)))S.loading=5;else{e=z({rel:"stylesheet",href:e,"data-precedence":t},l),(l=Tn.get(c))&&Sd(e,l);var _=g=a.createElement("link");_t(_),Ut(_,"link",e),_._p=new Promise(function(B,Q){_.onload=B,_.onerror=Q}),_.addEventListener("load",function(){S.loading|=1}),_.addEventListener("error",function(){S.loading|=2}),S.loading|=4,du(g,t,a)}g={type:"stylesheet",instance:g,count:1,state:S},o.set(c,g)}}}function kb(e,t){_l.X(e,t);var l=Ps;if(l&&e){var a=ps(l).hoistableScripts,o=Ws(e),c=a.get(o);c||(c=l.querySelector(pr(o)),c||(e=z({src:e,async:!0},t),(t=Tn.get(o))&&bd(e,t),c=l.createElement("script"),_t(c),Ut(c,"link",e),l.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},a.set(o,c))}}function Gb(e,t){_l.M(e,t);var l=Ps;if(l&&e){var a=ps(l).hoistableScripts,o=Ws(e),c=a.get(o);c||(c=l.querySelector(pr(o)),c||(e=z({src:e,async:!0,type:"module"},t),(t=Tn.get(o))&&bd(e,t),c=l.createElement("script"),_t(c),Ut(c,"link",e),l.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},a.set(o,c))}}function uv(e,t,l,a){var o=(o=At.current)?mr(o):null;if(!o)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(l=Js(l.href),t=ps(o).hoistableStyles,a=t.get(l),a||(a={type:"style",instance:null,count:0,state:null},t.set(l,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=Js(l.href);var c=ps(o).hoistableStyles,g=c.get(e);if(g||(o=o.ownerDocument||o,g={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,g),(c=o.querySelector(gr(e)))?c._p||(g.instance=c,g.state.loading=5):(c=Tn.get(e),c||(c={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Tn.set(e,c)),qb(o,e,c,g.state))),t&&a===null)throw Error(r(528,""));return g}if(t&&a!==null)throw Error(r(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(l=Ws(l),t=ps(o).hoistableScripts,a=t.get(l),a||(a={type:"script",instance:null,count:0,state:null},t.set(l,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Js(e){return'href="'+wn(e)+'"'}function gr(e){return'link[rel="stylesheet"]['+e+"]"}function cv(e){return z({},e,{"data-precedence":e.precedence,precedence:null})}function qb(e,t,l,a){if(t=e.querySelector('link[rel="preload"][as="style"]['+t+"]")){if(t[eo]!==!0){a.loading=1;return}}else t=e.createElement("link"),t[eo]=!0,t.onload=t.onerror=bm.bind(null,t),Ut(t,"link",l),_t(t),e.head.appendChild(t);a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2})}function Ws(e){return'[src="'+wn(e)+'"]'}function pr(e){return"script[async]"+e}function fv(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+wn(l.href)+'"]');if(a)return t.instance=a,_t(a),a;var o=z({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),_t(a),Ut(a,"style",o),du(a,l.precedence,e),t.instance=a;case"stylesheet":o=Js(l.href);var c=e.querySelector(gr(o));if(c)return t.state.loading|=4,t.instance=c,_t(c),c;a=cv(l),(o=Tn.get(o))&&Sd(a,o),c=(e.ownerDocument||e).createElement("link"),_t(c);var g=c;return g._p=new Promise(function(S,_){g.onload=S,g.onerror=_}),Ut(c,"link",a),t.state.loading|=4,du(c,l.precedence,e),t.instance=c;case"script":return c=Ws(l.src),(o=e.querySelector(pr(c)))?(t.instance=o,_t(o),o):(a=l,(o=Tn.get(c))&&(a=z({},l),bd(a,o)),e=e.ownerDocument||e,o=e.createElement("script"),_t(o),Ut(o,"link",a),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,du(a,l.precedence,e));return t.instance}function du(e,t,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=a.length?a[a.length-1]:null,c=o,g=0;g<a.length;g++){var S=a[g];if(S.dataset.precedence===t)c=S;else if(c!==o)break}c?c.parentNode.insertBefore(e,c.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function Sd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function bd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var hu=null;function dv(e,t,l){if(hu===null){var a=new Map,o=hu=new Map;o.set(l,a)}else o=hu,a=o.get(l),a||(a=new Map,o.set(l,a));if(a.has(e))return a;for(a.set(e,null),l=l.getElementsByTagName(e),o=0;o<l.length;o++){var c=l[o];if(!(c[Ai]||c[Ot]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var g=c.getAttribute(t)||"";g=e+g;var S=a.get(g);S?S.push(c):a.set(g,[c])}}return a}function wd(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function Qb(e,t,l){if(l===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function hv(e,t){return e==="img"&&t.src!=null&&t.src!==""&&t.onLoad==null&&t.loading!=="lazy"}function mv(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function gv(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function pv(e,t){typeof t.decode=="function"&&(e.imgCount++,t.complete||(e.imgBytes+=gv(t),e.suspenseyImages.push(t)),e=Xb.bind(e),t.decode().then(e,e))}function Yb(e,t,l,a){if(l.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var o=Js(a.href),c=t.querySelector(gr(o));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=vr.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=c,_t(c);return}c=t.ownerDocument||t,a=cv(a),(o=Tn.get(o))&&Sd(a,o),c=c.createElement("link"),_t(c);var g=c;g._p=new Promise(function(S,_){g.onload=S,g.onerror=_}),Ut(c,"link",a),l.instance=c}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=vr.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var mu=0;function Ib(e,t){return e.stylesheets&&e.count===0&&pu(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var a=setTimeout(function(){if(e.stylesheets&&pu(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},6e4+t);0<e.imgBytes&&mu===0&&(mu=62500*fb());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&pu(e,e.stylesheets),e.unsuspend)){var c=e.unsuspend;e.unsuspend=null,c()}},(e.imgBytes>mu?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(o)}}:null}function vv(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)pu(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function vr(){this.count--,vv(this)}function Xb(){this.imgCount--,vv(this)}var gu=null;function pu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,gu=new Map,t.forEach(Kb,e),gu=null,vr.call(e))}function Kb(e,t){if(!(t.state.loading&4)){var l=gu.get(e);if(l)var a=l.get(null);else{l=new Map,gu.set(e,l);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<o.length;c++){var g=o[c];(g.nodeName==="LINK"||g.getAttribute("media")!=="not all")&&(l.set(g.dataset.precedence,g),a=g)}a&&l.set(null,a)}o=t.instance,g=o.getAttribute("data-precedence"),c=l.get(g)||a,c===a&&l.set(null,o),l.set(g,o),this.count++,a=vr.bind(this),o.addEventListener("load",a),o.addEventListener("error",a),c?c.parentNode.insertBefore(o,c.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),t.state.loading|=4}}var ei={$$typeof:ee,Provider:null,Consumer:null,_currentValue:rt,_currentValue2:rt,_threadCount:0};function Zb(e,t,l,a,o,c,g,S,_){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=tc(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=tc(0),this.hiddenUpdates=tc(null),this.identifierPrefix=a,this.onUncaughtError=o,this.onCaughtError=c,this.onRecoverableError=g,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=_,this.transitionTypes=null,this.incompleteTransitions=new Map}function yv(e,t,l,a,o,c,g,S,_,B,Q,K){return e=new Zb(e,t,l,g,_,B,Q,K,S),t=1,c===!0&&(t|=24),c=sn(3,null,null,t),e.current=c,c.stateNode=e,t=Lc(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:a,isDehydrated:l,cache:t},Fc(c),e}function xv(e){return e?(e=Ns,e):Ns}function Sv(e,t,l,a,o,c){o=xv(o),a.context===null?a.context=o:a.pendingContext=o,a=ql(t),a.payload={element:l},c=c===void 0?null:c,c!==null&&(a.callback=c),l=Ql(e,a,t),l!==null&&(cn(l,e,t),Xi(l,e,t))}function bv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function Cd(e,t){bv(e,t),(e=e.alternate)&&bv(e,t)}function wv(e){if(e.tag===13||e.tag===31){var t=Da(e,67108864);t!==null&&cn(t,e,67108864),Cd(e,67108864)}}function Cv(e){if(e.tag===13||e.tag===31){var t=yn();t=nc(t);var l=Da(e,t);l!==null&&cn(l,e,t),Cd(e,t)}}var ti=!0;function Pb(e,t,l,a){var o=re.T;re.T=null;var c=me.p;try{me.p=2,jd(e,t,l,a)}finally{me.p=c,re.T=o}}function Jb(e,t,l,a){var o=re.T;re.T=null;var c=me.p;try{me.p=8,jd(e,t,l,a)}finally{me.p=c,re.T=o}}function jd(e,t,l,a){if(ti){var o=Ed(a);if(o===null)sd(e,t,a,vu,l),Ev(e,a);else if(e2(o,e,t,l,a))a.stopPropagation();else if(Ev(e,a),t&4&&-1<Wb.indexOf(e)){for(;o!==null;){var c=gs(o);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var g=dl(c.pendingLanes);if(g!==0){var S=c;for(S.pendingLanes|=2,S.entangledLanes|=2;g;){var _=1<<31-Xt(g);S.entanglements[1]|=_,g&=~_}al(c),(qe&6)===0&&(nu=et()+500,cr(0))}}break;case 31:case 13:S=Da(c,2),S!==null&&cn(S,c,2),su(),Cd(c,2)}if(c=Ed(a),c===null&&sd(e,t,a,vu,l),c===o)break;o=c}o!==null&&a.stopPropagation()}else sd(e,t,a,null,l)}}function Ed(e){return e=uc(e),Nd(e)}var vu=null;function Nd(e){if(vu=null,e=Ta(e),e!==null){var t=d(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=h(t),e!==null)return e;e=null}else if(l===31){if(e=m(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return vu=e,null}function jv(e){switch(e){case"beforetoggle":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"seeked":case"submit":case"toggle":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"fullscreenerror":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Yn()){case Dl:return 2;case ja:return 8;case Ea:case Jr:return 32;case Mi:return 268435456;default:return 32}default:return 32}}var _d=!1,la=null,aa=null,sa=null,yr=new Map,xr=new Map,ia=[],Wb="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".split(" ");function Ev(e,t){switch(e){case"focusin":case"focusout":la=null;break;case"dragenter":case"dragleave":aa=null;break;case"mouseover":case"mouseout":sa=null;break;case"pointerover":case"pointerout":yr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":xr.delete(t.pointerId)}}function Sr(e,t,l,a,o,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:l,eventSystemFlags:a,nativeEvent:c,targetContainers:[o]},t!==null&&(t=gs(t),t!==null&&wv(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function e2(e,t,l,a,o){switch(t){case"focusin":return la=Sr(la,e,t,l,a,o),!0;case"dragenter":return aa=Sr(aa,e,t,l,a,o),!0;case"mouseover":return sa=Sr(sa,e,t,l,a,o),!0;case"pointerover":var c=o.pointerId;return yr.set(c,Sr(yr.get(c)||null,e,t,l,a,o)),!0;case"gotpointercapture":return c=o.pointerId,xr.set(c,Sr(xr.get(c)||null,e,t,l,a,o)),!0}return!1}function Nv(e){var t=Ta(e.target);if(t!==null){var l=d(t);if(l!==null){if(t=l.tag,t===13){if(t=h(l),t!==null){e.blockedOn=t,ym(e.priority,function(){Cv(l)});return}}else if(t===31){if(t=m(l),t!==null){e.blockedOn=t,ym(e.priority,function(){Cv(l)});return}}else if(t===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function yu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=Ed(e.nativeEvent);if(l===null){l=e.nativeEvent;var a=new l.constructor(l.type,l);oc=a,l.target.dispatchEvent(a),oc=null}else return t=gs(l),t!==null&&wv(t),e.blockedOn=l,!1;t.shift()}return!0}function _v(e,t,l){yu(e)&&l.delete(t)}function t2(){_d=!1,la!==null&&yu(la)&&(la=null),aa!==null&&yu(aa)&&(aa=null),sa!==null&&yu(sa)&&(sa=null),yr.forEach(_v),xr.forEach(_v)}function xu(e,t){e.blockedOn===t&&(e.blockedOn=null,_d||(_d=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,t2)))}var Su=null;function Mv(e){Su!==e&&(Su=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Su===e&&(Su=null);for(var t=0;t<e.length;t+=3){var l=e[t],a=e[t+1],o=e[t+2];if(typeof a!="function"){if(Nd(a||l)===null)continue;break}var c=gs(l);c!==null&&(e.splice(t,3),t-=3,of(c,{pending:!0,data:o,method:l.method,action:a},a,o))}}))}function ni(e){function t(_){return xu(_,e)}la!==null&&xu(la,e),aa!==null&&xu(aa,e),sa!==null&&xu(sa,e),yr.forEach(t),xr.forEach(t);for(var l=0;l<ia.length;l++){var a=ia[l];a.blockedOn===e&&(a.blockedOn=null)}for(;0<ia.length&&(l=ia[0],l.blockedOn===null);)Nv(l),l.blockedOn===null&&ia.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(a=0;a<l.length;a+=3){var o=l[a],c=l[a+1],g=o[an]||null;if(typeof c=="function")g||Mv(l);else if(g){var S=null;if(c&&c.hasAttribute("formAction")){if(o=c,g=c[an]||null)S=g.formAction;else if(Nd(o)!==null)continue}else S=g.action;typeof S=="function"?l[a+1]=S:(l.splice(a,3),a-=3),Mv(l)}}}function Rv(){function e(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(g){return o=g})},focusReset:"manual",scroll:"manual"})}function t(){o!==null&&(o(),o=null),a||setTimeout(l,20)}function l(){if(!a&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,o=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),o!==null&&(o(),o=null)}}}function Md(e){this._internalRoot=e}bu.prototype.render=Md.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var l=t.current,a=yn();Sv(l,a,e,t,null,null)},bu.prototype.unmount=Md.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Sv(e.current,2,null,e,null,null),su(),t[ms]=null}};function bu(e){this._internalRoot=e}bu.prototype.unstable_scheduleHydration=function(e){if(e){var t=vm();e={blockedOn:null,target:e,priority:t};for(var l=0;l<ia.length&&t!==0&&t<ia[l].priority;l++);ia.splice(l,0,e),l===0&&Nv(e)}};var Tv=s.version;if(Tv!=="19.3.1")throw Error(r(527,Tv,"19.3.1"));me.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=y(t),e=e!==null?x(e):null,e=e===null?null:e.stateNode,e};var n2={bundleType:0,version:"19.3.1",rendererPackageName:"react-dom",currentDispatcherRef:re,reconcilerVersion:"19.3.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var wu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!wu.isDisabled&&wu.supportsFiber)try{Pe=wu.inject(n2),nt=wu}catch{}}return wr.createRoot=function(e,t){if(!u(e))throw Error(r(299));var l=!1,a="",o=xp,c=Sp,g=bp;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(c=t.onCaughtError),t.onRecoverableError!==void 0&&(g=t.onRecoverableError)),t=yv(e,1,!1,null,null,l,a,null,o,c,g,Rv),e[ms]=t.current,ad(e),new Md(t)},wr.hydrateRoot=function(e,t,l){if(!u(e))throw Error(r(299));var a=!1,o="",c=xp,g=Sp,S=bp,_=null;return l!=null&&(l.unstable_strictMode===!0&&(a=!0),l.identifierPrefix!==void 0&&(o=l.identifierPrefix),l.onUncaughtError!==void 0&&(c=l.onUncaughtError),l.onCaughtError!==void 0&&(g=l.onCaughtError),l.onRecoverableError!==void 0&&(S=l.onRecoverableError),l.formState!==void 0&&(_=l.formState)),t=yv(e,1,!0,t,l??null,a,o,_,c,g,S,Rv),t.context=xv(null),l=t.current,a=yn(),a=nc(a),o=ql(a),o.callback=null,Ql(l,o,a),l=a,t.current.lanes=l,Ti(t,l),al(t),e[ms]=t.current,ad(e),new bu(t)},wr.version="19.3.1",wr}var Bv;function g2(){if(Bv)return Od.exports;Bv=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(s){console.error(s)}}return n(),Od.exports=m2(),Od.exports}var p2=g2();const Xy=E.createContext(void 0),Ky=n=>{const s=E.useContext(Xy);if(!s)throw new Error("No QueryClient set, use QueryClientProvider to set one");return s},v2=({client:n,children:s})=>(E.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),f.jsx(Xy.Provider,{value:n,children:s})),y2={setTimeout:(n,s)=>setTimeout(n,s),clearTimeout:n=>clearTimeout(n),setInterval:(n,s)=>setInterval(n,s),clearInterval:n=>clearInterval(n)};var fa,Yh,Uy,x2=(Uy=class{constructor(){pe(this,fa,y2);pe(this,Yh,!1)}setTimeoutProvider(n){oe(this,fa,n)}setTimeout(n,s){return L(this,fa).setTimeout(n,s)}clearTimeout(n){L(this,fa).clearTimeout(n)}setInterval(n,s){return L(this,fa).setInterval(n,s)}clearInterval(n){L(this,fa).clearInterval(n)}},fa=new WeakMap,Yh=new WeakMap,Uy);const ts=new x2;function S2(n){setTimeout(n,0)}const b2=typeof window>"u"||"Deno"in globalThis;function fn(){}function w2(n,s){return typeof n=="function"?n(s):n}function Zy(n){return typeof n=="number"&&n>=0&&n!==1/0}function Py(n,s){return Math.max(n+(s||0)-Date.now(),0)}function ft(n,s){return typeof n=="function"?n(s):n}function kv(n,s){const{type:i="all",exact:r,fetchStatus:u,predicate:d,queryKey:h,stale:m}=n;if(h){if(r){if(s.queryHash!==Xh(h,s.options))return!1}else if(!ji(s.queryKey,h))return!1}if(i!=="all"){const p=s.isActive();if(i==="active"&&!p||i==="inactive"&&p)return!1}return!(typeof m=="boolean"&&s.isStale()!==m||u&&u!==s.state.fetchStatus||d&&!d(s))}function Gv(n,s){const{exact:i,status:r,predicate:u,mutationKey:d}=n;if(d){if(!s.options.mutationKey)return!1;if(i){if(Ur(s.options.mutationKey)!==Ur(d))return!1}else if(!ji(s.options.mutationKey,d))return!1}return!(r&&s.state.status!==r||u&&!u(s))}function Xh(n,s){return((s==null?void 0:s.queryKeyHashFn)||Ur)(n)}function Ur(n){return JSON.stringify(n,(s,i)=>hh(i)?Object.keys(i).sort().reduce((r,u)=>(r[u]=i[u],r),{}):i)}function ji(n,s){if(n===s)return!0;if(typeof n!=typeof s)return!1;if(n&&s&&typeof n=="object"&&typeof s=="object"){if(Array.isArray(n)&&Array.isArray(s)){if(s.length>n.length)return!1;for(let r=0;r<s.length;r++)if(!ji(n[r],s[r]))return!1;return!0}const i=Object.keys(s);for(const r of i)if(!ji(n[r],s[r]))return!1;return!0}return!1}const C2=Object.prototype.hasOwnProperty;function Jy(n,s,i=0){if(n===s)return n;if(i>500)return s;const r=qv(n)&&qv(s);if(!r&&!(hh(n)&&hh(s)))return s;const u=(r?n:Object.keys(n)).length,d=r?s:Object.keys(s),h=d.length,m=r?new Array(h):{};let p=0;for(let y=0;y<h;y++){const x=r?y:d[y],v=n[x],b=s[x];if(v===b){m[x]=v,(r?y<u:C2.call(n,x))&&p++;continue}if(v===null||b===null||typeof v!="object"||typeof b!="object"){m[x]=b;continue}const w=Jy(v,b,i+1);m[x]=w,w===v&&p++}return u===h&&p===u?n:m}function Ld(n,s){if(!s||Object.keys(n).length!==Object.keys(s).length)return!1;for(const i in n)if(n[i]!==s[i])return!1;return!0}function qv(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function hh(n){if(!Qv(n))return!1;const s=Object.getPrototypeOf(n),i=s==null?void 0:s.constructor;if(i===void 0)return!0;if(typeof i!="function")return!1;const r=i.prototype;return!(!Qv(r)||!r.hasOwnProperty("isPrototypeOf")||s!==Object.prototype)}function Qv(n){return Object.prototype.toString.call(n)==="[object Object]"}function j2(n){return new Promise(s=>{ts.setTimeout(s,n)})}function mh(n,s,i){return typeof i.structuralSharing=="function"?i.structuralSharing(n,s):i.structuralSharing!==!1?Jy(n,s):s}function Wy(n){return n}function E2(n,s,i=0){const r=[...n,s];return i&&r.length>i?r.slice(1):r}function N2(n,s,i=0){const r=[s,...n];return i&&r.length>i?r.slice(0,-1):r}const Kh=Symbol();function e1(n,s){return!n.queryFn&&(s!=null&&s.initialPromise)?()=>s.initialPromise:!n.queryFn||n.queryFn===Kh?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function t1(n,s){return typeof n=="function"?n(...s):!!n}function _2(n,s,i){let r=!1,u;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(u??(u=s()),r||(r=!0,u.aborted?i():u.addEventListener("abort",i,{once:!0})),u)}),n}let M2=()=>b2;const Zh=()=>M2();var Ir=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(){}},ns,da,fi,Vy,R2=(Vy=class extends Ir{constructor(){super();pe(this,ns);pe(this,da);pe(this,fi);oe(this,fi,s=>{if(typeof window<"u"&&window.addEventListener){const i=()=>s();return window.addEventListener("visibilitychange",i,!1),()=>{window.removeEventListener("visibilitychange",i)}}})}onSubscribe(){L(this,da)||this.setEventListener(L(this,fi))}onUnsubscribe(){var s;this.hasListeners()||((s=L(this,da))==null||s.call(this),oe(this,da,void 0))}setEventListener(s){var i;oe(this,fi,s),(i=L(this,da))==null||i.call(this),oe(this,da,s(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(s){L(this,ns)!==s&&(oe(this,ns,s),this.onFocus())}onFocus(){const s=this.isFocused();this.listeners.forEach(i=>{i(s)})}isFocused(){var s;return typeof L(this,ns)=="boolean"?L(this,ns):((s=globalThis.document)==null?void 0:s.visibilityState)!=="hidden"}},ns=new WeakMap,da=new WeakMap,fi=new WeakMap,Vy);const Ph=new R2,T2=S2;function A2(){let n=[],s=0,i=m=>{m()},r=m=>{m()},u=T2;const d=m=>{s?n.push(m):u(()=>{i(m)})},h=()=>{const m=n;n=[],m.length&&u(()=>{r(()=>{m.forEach(p=>{i(p)})})})};return{batch:m=>{let p;s++;try{p=m()}finally{s--,s||h()}return p},batchCalls:m=>(...p)=>{d(()=>{m(...p)})},schedule:d,setNotifyFunction:m=>{i=m},setBatchNotifyFunction:m=>{r=m},setScheduler:m=>{u=m}}}const $t=A2();var di,ha,hi,$y,O2=($y=class extends Ir{constructor(){super();pe(this,di,!0);pe(this,ha);pe(this,hi);oe(this,hi,s=>{if(typeof window<"u"&&window.addEventListener){const i=()=>s(!0),r=()=>s(!1);return window.addEventListener("online",i,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",i),window.removeEventListener("offline",r)}}})}onSubscribe(){L(this,ha)||this.setEventListener(L(this,hi))}onUnsubscribe(){var s;this.hasListeners()||((s=L(this,ha))==null||s.call(this),oe(this,ha,void 0))}setEventListener(s){var i;oe(this,hi,s),(i=L(this,ha))==null||i.call(this),oe(this,ha,s(this.setOnline.bind(this)))}setOnline(s){L(this,di)!==s&&(oe(this,di,s),this.listeners.forEach(i=>{i(s)}))}isOnline(){return L(this,di)}},di=new WeakMap,ha=new WeakMap,hi=new WeakMap,$y);const Ou=new O2;function z2(n){return Math.min(1e3*2**n,3e4)}function n1(n){return(n??"online")==="online"?Ou.isOnline():!0}var gh=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function l1(n){let s=!1,i=0,r,u="pending",d,h;const m=new Promise((j,F)=>{d=j,h=F});m.catch(fn);const p=()=>u!=="pending",y=j=>{var F;if(!p()){const T=new gh(j);N(T),(F=n.onCancel)==null||F.call(n,T)}},x=()=>{s=!0},v=()=>{s=!1},b=()=>Ph.isFocused()&&(n.networkMode==="always"||Ou.isOnline())&&n.canRun(),w=()=>n1(n.networkMode)&&n.canRun(),C=j=>{p()||(r==null||r(),u="resolved",d(j))},N=j=>{p()||(r==null||r(),u="rejected",h(j))},M=j=>new Promise(F=>{var T;r=H=>{(p()||j())&&F(H)},(T=n.onPause)==null||T.call(n)}).then(()=>{var F;r=void 0,p()||(F=n.onContinue)==null||F.call(n)}),R=()=>{if(p())return;let j;const F=i===0?n.initialPromise:void 0;try{j=F??n.fn()}catch(T){j=Promise.reject(T)}Promise.resolve(j).then(C).catch(T=>{var te;if(p())return;const H=n.retry??(Zh()?0:3),D=n.retryDelay??z2,z=typeof D=="function"?D(i,T):D,Y=H===!0||typeof H=="number"&&i<H||typeof H=="function"&&H(i,T);if(s||!Y){N(T);return}i++,(te=n.onFail)==null||te.call(n,i,T),j2(z).then(()=>b()?void 0:M(b)).then(()=>{s?N(T):R()})})};return{promise:m,status:()=>u,cancel:y,continue:()=>(r==null||r(),m),cancelRetry:x,continueRetry:v,canStart:w,start:()=>(w()?R():M(w).then(R),m)}}var ls,Fy,a1=(Fy=class{constructor(){pe(this,ls)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Zy(this.gcTime)&&oe(this,ls,ts.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(Zh()?1/0:3e5))}clearGcTimeout(){L(this,ls)!==void 0&&(ts.clearTimeout(L(this,ls)),oe(this,ls,void 0))}},ls=new WeakMap,Fy);function D2(n){return{onFetch:(s,i)=>{var x,v,b,w,C;const r=s.options,u=(b=(v=(x=s.fetchOptions)==null?void 0:x.meta)==null?void 0:v.fetchMore)==null?void 0:b.direction,d=((w=s.state.data)==null?void 0:w.pages)||[],h=((C=s.state.data)==null?void 0:C.pageParams)||[];let m={pages:[],pageParams:[]},p=0;const y=async()=>{let N=!1;const M=F=>{_2(F,()=>s.signal,()=>N=!0)},R=e1(s.options,s.fetchOptions),j=async(F,T,H)=>{if(N)return Promise.reject(s.signal.reason);if(T==null&&F.pages.length)return Promise.resolve(F);const z=(()=>{const ne={client:s.client,queryKey:s.queryKey,pageParam:T,direction:H?"backward":"forward",meta:s.options.meta};return M(ne),ne})(),Y=await R(z),{maxPages:te}=s.options,k=H?N2:E2;return{pages:k(F.pages,Y,te),pageParams:k(F.pageParams,T,te)}};if(u&&d.length){const F=u==="backward",T=F?s1:ph,H={pages:d,pageParams:h};m=await j(H,T(r,H),F)}else{const F=n??d.length;do{const T=p===0?h[0]===void 0?r.initialPageParam:h[0]:ph(r,m);if(p>0&&T==null)break;m=await j(m,T),p++}while(p<F)}return m};s.options.persister?s.fetchFn=()=>{var N,M;return(M=(N=s.options).persister)==null?void 0:M.call(N,y,{client:s.client,queryKey:s.queryKey,meta:s.options.meta,signal:s.signal},i)}:s.fetchFn=y}}}function ph(n,{pages:s,pageParams:i}){const r=s.length-1;return s.length>0?n.getNextPageParam(s[r],s,i[r],i):void 0}function s1(n,{pages:s,pageParams:i}){var r;return s.length>0?(r=n.getPreviousPageParam)==null?void 0:r.call(n,s[0],s,i[0],i):void 0}function H2(n,s){return s?ph(n,s)!=null:!1}function L2(n,s){return!s||!n.getPreviousPageParam?!1:s1(n,s)!=null}var mi,as,gi,An,ss,Et,kr,is,Fn,Rl,By,U2=(By=class extends a1{constructor(s){super();pe(this,Fn);pe(this,mi);pe(this,as);pe(this,gi);pe(this,An);pe(this,ss);pe(this,Et);pe(this,kr);pe(this,is);oe(this,is,!1),oe(this,kr,s.defaultOptions),this.setOptions(s.options),this.observers=[],oe(this,ss,s.client),oe(this,An,L(this,ss).getQueryCache()),this.queryKey=s.queryKey,this.queryHash=s.queryHash,oe(this,as,Iv(this.options)),this.state=s.state??L(this,as),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return L(this,mi)}get promise(){var s;return(s=L(this,Et))==null?void 0:s.promise}setOptions(s){if(this.options={...L(this,kr),...s},s!=null&&s._type&&oe(this,mi,s._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const i=Iv(this.options);i.data!==void 0&&(this.setState(Yv(i.data,i.dataUpdatedAt)),oe(this,as,i))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&L(this,An).remove(this)}setData(s,i){const r=mh(this.state.data,s,this.options);return De(this,Fn,Rl).call(this,{data:r,type:"success",dataUpdatedAt:i==null?void 0:i.updatedAt,manual:i==null?void 0:i.manual}),r}setState(s){De(this,Fn,Rl).call(this,{type:"setState",state:s})}cancel(s){var r,u;const i=(r=L(this,Et))==null?void 0:r.promise;return(u=L(this,Et))==null||u.cancel(s),i?i.then(fn).catch(fn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return L(this,as)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(s=>ft(s.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Kh||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(s=>ft(s.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(s=>s.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(s=0){return this.state.data===void 0?!0:s==="static"?!1:this.state.isInvalidated?!0:!Py(this.state.dataUpdatedAt,s)}onFocus(){var s,i;(s=this.observers.find(r=>r.shouldFetchOnWindowFocus()))==null||s.refetch({cancelRefetch:!1}),(i=L(this,Et))==null||i.continue()}onOnline(){var s,i;(s=this.observers.find(r=>r.shouldFetchOnReconnect()))==null||s.refetch({cancelRefetch:!1}),(i=L(this,Et))==null||i.continue()}addObserver(s){this.observers.includes(s)||(this.observers.push(s),this.clearGcTimeout(),L(this,An).notify({type:"observerAdded",query:this,observer:s}))}removeObserver(s){const i=this.observers.indexOf(s);i!==-1&&(this.observers.splice(i,1),this.observers.length||(L(this,Et)&&(L(this,is)||this.state.fetchStatus==="paused"&&this.state.status==="pending"?L(this,Et).cancel({revert:!0}):L(this,Et).cancelRetry()),this.scheduleGc()),L(this,An).notify({type:"observerRemoved",query:this,observer:s}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||De(this,Fn,Rl).call(this,{type:"invalidate"})}async fetch(s,i){var y,x,v,b,w,C,N,M,R,j,F,T;if(this.state.fetchStatus!=="idle"&&((y=L(this,Et))==null?void 0:y.status())!=="rejected"){if(this.state.data!==void 0&&(i!=null&&i.cancelRefetch))this.cancel({silent:!0});else if(L(this,Et))return L(this,Et).continueRetry(),L(this,Et).promise}if(s&&this.setOptions(s),!this.options.queryFn){const H=this.observers.find(D=>D.options.queryFn);H&&this.setOptions(H.options)}const r=new AbortController,u=H=>{Object.defineProperty(H,"signal",{enumerable:!0,get:()=>(oe(this,is,!0),r.signal)})},d=()=>{const H=e1(this.options,i),z=(()=>{const Y={client:L(this,ss),queryKey:this.queryKey,meta:this.meta};return u(Y),Y})();return oe(this,is,!1),this.options.persister?this.options.persister(H,z,this):H(z)},m=(()=>{const H={fetchOptions:i,options:this.options,queryKey:this.queryKey,client:L(this,ss),state:this.state,fetchFn:d};return u(H),H})();(x=L(this,mi)==="infinite"?D2(this.options.pages):this.options.behavior)==null||x.onFetch(m,this),oe(this,gi,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((v=m.fetchOptions)==null?void 0:v.meta))&&De(this,Fn,Rl).call(this,{type:"fetch",meta:(b=m.fetchOptions)==null?void 0:b.meta});const p=oe(this,Et,l1({initialPromise:i==null?void 0:i.initialPromise,fn:m.fetchFn,onCancel:H=>{H instanceof gh&&H.revert&&this.setState({...L(this,gi),fetchStatus:"idle"}),r.abort()},onFail:(H,D)=>{De(this,Fn,Rl).call(this,{type:"failed",failureCount:H,error:D})},onPause:()=>{De(this,Fn,Rl).call(this,{type:"pause"})},onContinue:()=>{De(this,Fn,Rl).call(this,{type:"continue"})},retry:m.options.retry,retryDelay:m.options.retryDelay,networkMode:m.options.networkMode,canRun:()=>!0}));try{const H=await p.start();if(H===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(H),(C=(w=L(this,An).config).onSuccess)==null||C.call(w,H,this),(M=(N=L(this,An).config).onSettled)==null||M.call(N,H,this.state.error,this),H}catch(H){if(H instanceof gh){if(H.silent)return L(this,Et).promise;if(H.revert){if(this.state.data===void 0)throw H;return this.state.data}}throw De(this,Fn,Rl).call(this,{type:"error",error:H}),(j=(R=L(this,An).config).onError)==null||j.call(R,H,this),(T=(F=L(this,An).config).onSettled)==null||T.call(F,this.state.data,H,this),H}finally{L(this,Et)===p&&oe(this,Et,void 0),this.scheduleGc()}}},mi=new WeakMap,as=new WeakMap,gi=new WeakMap,An=new WeakMap,ss=new WeakMap,Et=new WeakMap,kr=new WeakMap,is=new WeakMap,Fn=new WeakSet,Rl=function(s){const i=r=>{switch(s.type){case"failed":return{...r,fetchFailureCount:s.failureCount,fetchFailureReason:s.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...i1(r.data,this.options),fetchMeta:s.meta??null};case"success":const u={...r,...Yv(s.data,s.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!s.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return oe(this,gi,s.manual?u:void 0),u;case"error":const d=s.error;return{...r,error:d,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:d,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...s.state}}};this.state=i(this.state),$t.batch(()=>{this.observers.slice().forEach(r=>{r.onQueryUpdate()}),L(this,An).notify({query:this,type:"updated",action:s})})},By);function i1(n,s){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:n1(s.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function Yv(n,s){return{data:n,dataUpdatedAt:s??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Iv(n){const s=typeof n.initialData=="function"?n.initialData():n.initialData,i=s!==void 0,r=i?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:s,dataUpdateCount:0,dataUpdatedAt:i?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}var en,He,Gr,tn,rs,pi,Al,qr,vi,yi,os,us,ma,xi,Qe,Ar,vh,yh,xh,Sh,bh,wh,Ch,jh,ky,r1=(ky=class extends Ir{constructor(s,i){super();pe(this,Qe);pe(this,en);pe(this,He);pe(this,Gr);pe(this,tn);pe(this,rs);pe(this,pi);pe(this,Al);pe(this,qr);pe(this,vi);pe(this,yi);pe(this,os);pe(this,us);pe(this,ma);pe(this,xi,new Set);this.options=i,oe(this,en,s),oe(this,Al,null),this.bindMethods(),this.setOptions(i)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(L(this,He).addObserver(this),Xv(L(this,He),this.options)?De(this,Qe,Ar).call(this):this.updateResult(),De(this,Qe,bh).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Eh(L(this,He),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Eh(L(this,He),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,De(this,Qe,wh).call(this),De(this,Qe,Ch).call(this),L(this,He).removeObserver(this)}setOptions(s){const i=this.options,r=L(this,He);if(this.options=L(this,en).defaultQueryOptions(s),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ft(this.options.enabled,L(this,He))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");De(this,Qe,jh).call(this),L(this,He).setOptions(this.options),i._defaulted&&!Ld(this.options,i)&&L(this,en).getQueryCache().notify({type:"observerOptionsUpdated",query:L(this,He),observer:this});const u=this.hasListeners();u&&Kv(L(this,He),r,this.options,i)&&De(this,Qe,Ar).call(this),this.updateResult(),u&&(L(this,He)!==r||ft(this.options.enabled,L(this,He))!==ft(i.enabled,L(this,He))||ft(this.options.staleTime,L(this,He))!==ft(i.staleTime,L(this,He)))&&De(this,Qe,yh).call(this);const d=De(this,Qe,xh).call(this);u&&(L(this,He)!==r||ft(this.options.enabled,L(this,He))!==ft(i.enabled,L(this,He))||d!==L(this,ma))&&De(this,Qe,Sh).call(this,d)}getOptimisticResult(s){const i=L(this,en).getQueryCache().build(L(this,en),s),r=this.createResult(i,s);return Ld(this.getCurrentResult(),r)||(oe(this,tn,r),oe(this,pi,this.options),oe(this,rs,L(this,He).state)),r}getCurrentResult(){return L(this,tn)}trackResult(s,i){return new Proxy(s,{get:(r,u)=>(this.trackProp(u),i==null||i(u),Reflect.get(r,u))})}trackProp(s){L(this,xi).add(s)}getCurrentQuery(){return L(this,He)}refetch({...s}={}){return this.fetch({...s})}fetchOptimistic(s){const i=L(this,en).defaultQueryOptions(s),r=L(this,en).getQueryCache().build(L(this,en),i);let u=()=>{},d;const h=new Promise(m=>{d=m,u=L(this,en).getQueryCache().subscribe(p=>{p.type==="updated"&&p.query.queryHash===r.queryHash&&r.state.data!==void 0&&(u(),m(this.createResult(r,i)))})});return Promise.race([r.fetch(i).then(()=>{const m=this.createResult(r,i);return d==null||d(m),m}).finally(()=>{u()}),h])}fetch(s){return De(this,Qe,Ar).call(this,{...s,cancelRefetch:s.cancelRefetch??!0}).then(()=>(this.updateResult(),L(this,tn)))}createResult(s,i){var D;const r=L(this,He),u=this.options,d=L(this,tn),h=L(this,rs),m=L(this,pi),p=s!==r?s.state:L(this,Gr),{state:y}=s;let x={...y},v=!1,b;if(i._optimisticResults){const z=this.hasListeners(),Y=!z&&Xv(s,i),te=z&&Kv(s,r,i,u);(Y||te)&&(x={...x,...i1(y.data,s.options)}),i._optimisticResults==="isRestoring"&&(x.fetchStatus="idle")}let{error:w,errorUpdatedAt:C,status:N}=x;b=x.data;let M=!1;if(i.placeholderData!==void 0&&b===void 0&&N==="pending"){let z;d!=null&&d.isPlaceholderData&&i.placeholderData===(m==null?void 0:m.placeholderData)?(z=d.data,M=!0):z=typeof i.placeholderData=="function"?i.placeholderData((D=L(this,yi))==null?void 0:D.state.data,L(this,yi)):i.placeholderData,z!==void 0&&(N="success",b=mh(d==null?void 0:d.data,z,i),v=!0)}if(i.select&&b!==void 0&&!M)if(d&&b===(h==null?void 0:h.data)&&i.select===L(this,qr))b=L(this,vi);else try{oe(this,qr,i.select),b=i.select(b),b=mh(d==null?void 0:d.data,b,i),oe(this,vi,b),oe(this,Al,null)}catch(z){oe(this,Al,z)}else b===void 0&&oe(this,Al,null);L(this,Al)&&(w=L(this,Al),b=L(this,vi),C=Date.now(),N="error",v=!1);const R=x.fetchStatus==="fetching",j=N==="pending",F=N==="error",T=j&&R,H=b!==void 0;return{status:N,fetchStatus:x.fetchStatus,isPending:j,isSuccess:N==="success",isError:F,isInitialLoading:T,isLoading:T,data:b,dataUpdatedAt:x.dataUpdatedAt,error:w,errorUpdatedAt:C,failureCount:x.fetchFailureCount,failureReason:x.fetchFailureReason,errorUpdateCount:x.errorUpdateCount,isFetched:s.isFetched(),isFetchedAfterMount:x.dataUpdateCount>p.dataUpdateCount||x.errorUpdateCount>p.errorUpdateCount,isFetching:R,isRefetching:R&&!j,isLoadingError:F&&!H,isPaused:x.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:F&&H,isStale:Jh(s,i),refetch:this.refetch,isEnabled:ft(i.enabled,s)!==!1}}updateResult(){const s=L(this,tn),i=this.createResult(L(this,He),this.options);if(oe(this,rs,L(this,He).state),oe(this,pi,this.options),L(this,rs).data!==void 0&&oe(this,yi,L(this,He)),Ld(i,s))return;oe(this,tn,i);const u=(()=>{if(!s)return!0;const{notifyOnChangeProps:d}=this.options,h=typeof d=="function"?d():d;if(h==="all"||!h&&!L(this,xi).size)return!0;const m=new Set(h??L(this,xi));return this.options.throwOnError&&m.add("error"),Object.keys(L(this,tn)).some(p=>{const y=p;return L(this,tn)[y]!==s[y]&&m.has(y)})})();$t.batch(()=>{u&&this.listeners.forEach(d=>{d(L(this,tn))}),L(this,en).getQueryCache().notify({query:L(this,He),type:"observerResultsUpdated"})})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&De(this,Qe,bh).call(this)}},en=new WeakMap,He=new WeakMap,Gr=new WeakMap,tn=new WeakMap,rs=new WeakMap,pi=new WeakMap,Al=new WeakMap,qr=new WeakMap,vi=new WeakMap,yi=new WeakMap,os=new WeakMap,us=new WeakMap,ma=new WeakMap,xi=new WeakMap,Qe=new WeakSet,Ar=function(s){De(this,Qe,jh).call(this);let i=L(this,He).fetch(this.options,s);return s!=null&&s.throwOnError||(i=i.catch(fn)),i},vh=function(s){return!Zh()&&ft(this.options.enabled,L(this,He))!==!1&&Zy(s)},yh=function(){De(this,Qe,wh).call(this);const s=ft(this.options.staleTime,L(this,He));if(L(this,tn).isStale||!De(this,Qe,vh).call(this,s))return;const i=Py(L(this,tn).dataUpdatedAt,s)+1;oe(this,os,ts.setTimeout(()=>{L(this,tn).isStale||this.updateResult()},i))},xh=function(){return ft(this.options.refetchInterval,L(this,He))??!1},Sh=function(s){De(this,Qe,Ch).call(this),oe(this,ma,s),!(L(this,ma)===0||!De(this,Qe,vh).call(this,L(this,ma)))&&oe(this,us,ts.setInterval(()=>{(this.options.refetchIntervalInBackground||Ph.isFocused())&&De(this,Qe,Ar).call(this)},L(this,ma)))},bh=function(){De(this,Qe,yh).call(this),De(this,Qe,Sh).call(this,De(this,Qe,xh).call(this))},wh=function(){L(this,os)!==void 0&&(ts.clearTimeout(L(this,os)),oe(this,os,void 0))},Ch=function(){L(this,us)!==void 0&&(ts.clearInterval(L(this,us)),oe(this,us,void 0))},jh=function(){const s=L(this,en).getQueryCache().build(L(this,en),this.options);if(s===L(this,He))return;const i=L(this,He);oe(this,He,s),oe(this,Gr,s.state),this.hasListeners()&&(i==null||i.removeObserver(this),s.addObserver(this))},ky);function V2(n,s){return ft(s.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&ft(s.retryOnMount,n)===!1)}function Xv(n,s){return V2(n,s)||n.state.data!==void 0&&Eh(n,s,s.refetchOnMount)}function Eh(n,s,i){if(ft(s.enabled,n)!==!1&&ft(s.staleTime,n)!=="static"){const r=ft(i,n);return r==="always"||r!==!1&&Jh(n,s)}return!1}function Kv(n,s,i,r){return(n!==s||ft(r.enabled,n)===!1)&&(!i.suspense||n.state.status!=="error")&&Jh(n,i)}function Jh(n,s){return ft(s.enabled,n)!==!1&&n.isStaleByTime(ft(s.staleTime,n))}var $2=class extends r1{constructor(n,s){super(n,s)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(n){n._type="infinite",super.setOptions(n)}getOptimisticResult(n){return n._type="infinite",super.getOptimisticResult(n)}fetchNextPage(n){return this.fetch({...n,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(n){return this.fetch({...n,meta:{fetchMore:{direction:"backward"}}})}createResult(n,s){var w,C;const{state:i}=n,r=super.createResult(n,s),{isFetching:u,isRefetching:d,isError:h,isRefetchError:m}=r,p=(C=(w=i.fetchMeta)==null?void 0:w.fetchMore)==null?void 0:C.direction,y=h&&p==="forward",x=u&&p==="forward",v=h&&p==="backward",b=u&&p==="backward";return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:H2(s,i.data),hasPreviousPage:L2(s,i.data),isFetchNextPageError:y,isFetchingNextPage:x,isFetchPreviousPageError:v,isFetchingPreviousPage:b,isRefetchError:m&&!y&&!v,isRefetching:d&&!x&&!b}}},Qr,sl,Yt,cs,il,oa,Gy,F2=(Gy=class extends a1{constructor(s){super();pe(this,il);pe(this,Qr);pe(this,sl);pe(this,Yt);pe(this,cs);oe(this,Qr,s.client),this.mutationId=s.mutationId,oe(this,Yt,s.mutationCache),oe(this,sl,[]),this.state=s.state||B2(),this.setOptions(s.options),this.scheduleGc()}setOptions(s){this.options=s,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(s){L(this,sl).includes(s)||(L(this,sl).push(s),this.clearGcTimeout(),L(this,Yt).notify({type:"observerAdded",mutation:this,observer:s}))}removeObserver(s){oe(this,sl,L(this,sl).filter(i=>i!==s)),this.scheduleGc(),L(this,Yt).notify({type:"observerRemoved",mutation:this,observer:s})}optionalRemove(){L(this,sl).length||(this.state.status==="pending"?this.scheduleGc():L(this,Yt).remove(this))}continue(){var s;return((s=L(this,cs))==null?void 0:s.continue())??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(s){var m,p,y,x,v,b,w,C,N,M,R,j,F,T,H,D,z,Y;const i=()=>{De(this,il,oa).call(this,{type:"continue"})},r={client:L(this,Qr),meta:this.options.meta,mutationKey:this.options.mutationKey},u=oe(this,cs,l1({fn:()=>this.options.mutationFn?this.options.mutationFn(s,r):Promise.reject(new Error("No mutationFn found")),onFail:(te,k)=>{De(this,il,oa).call(this,{type:"failed",failureCount:te,error:k})},onPause:()=>{De(this,il,oa).call(this,{type:"pause"})},onContinue:i,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>L(this,Yt).canRun(this)})),d=this.state.status==="pending",h=!u.canStart();try{if(d)i();else{De(this,il,oa).call(this,{type:"pending",variables:s,isPaused:h}),L(this,Yt).config.onMutate&&await L(this,Yt).config.onMutate(s,this,r);const k=await((p=(m=this.options).onMutate)==null?void 0:p.call(m,s,r));k!==this.state.context&&De(this,il,oa).call(this,{type:"pending",context:k,variables:s,isPaused:h})}const te=await u.start();return await((x=(y=L(this,Yt).config).onSuccess)==null?void 0:x.call(y,te,s,this.state.context,this,r)),await((b=(v=this.options).onSuccess)==null?void 0:b.call(v,te,s,this.state.context,r)),await((C=(w=L(this,Yt).config).onSettled)==null?void 0:C.call(w,te,null,this.state.variables,this.state.context,this,r)),await((M=(N=this.options).onSettled)==null?void 0:M.call(N,te,null,s,this.state.context,r)),De(this,il,oa).call(this,{type:"success",data:te}),te}catch(te){try{await((j=(R=L(this,Yt).config).onError)==null?void 0:j.call(R,te,s,this.state.context,this,r))}catch(k){Promise.reject(k)}try{await((T=(F=this.options).onError)==null?void 0:T.call(F,te,s,this.state.context,r))}catch(k){Promise.reject(k)}try{await((D=(H=L(this,Yt).config).onSettled)==null?void 0:D.call(H,void 0,te,this.state.variables,this.state.context,this,r))}catch(k){Promise.reject(k)}try{await((Y=(z=this.options).onSettled)==null?void 0:Y.call(z,void 0,te,s,this.state.context,r))}catch(k){Promise.reject(k)}throw De(this,il,oa).call(this,{type:"error",error:te}),te}finally{L(this,cs)===u&&oe(this,cs,void 0),L(this,Yt).runNext(this)}}},Qr=new WeakMap,sl=new WeakMap,Yt=new WeakMap,cs=new WeakMap,il=new WeakSet,oa=function(s){const i=r=>{switch(s.type){case"failed":return{...r,failureCount:s.failureCount,failureReason:s.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:s.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:s.isPaused,status:"pending",variables:s.variables,submittedAt:Date.now()};case"success":return{...r,data:s.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:s.error,failureCount:r.failureCount+1,failureReason:s.error,isPaused:!1,status:"error"}}};this.state=i(this.state),$t.batch(()=>{L(this,sl).forEach(r=>{r.onMutationUpdate(s)}),L(this,Yt).notify({mutation:this,type:"updated",action:s})})},Gy);function B2(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ga,Bn,Yr,qy,k2=(qy=class extends Ir{constructor(s={}){super();pe(this,ga);pe(this,Bn);pe(this,Yr);this.config=s,oe(this,ga,new Set),oe(this,Bn,new Map),oe(this,Yr,0)}build(s,i,r){const u=new F2({client:s,mutationCache:this,mutationId:++Cu(this,Yr)._,options:s.defaultMutationOptions(i),state:r});return this.add(u),u}add(s){L(this,ga).add(s);const i=ju(s);if(typeof i=="string"){const r=L(this,Bn).get(i);r?r.push(s):L(this,Bn).set(i,[s])}this.notify({type:"added",mutation:s})}remove(s){if(L(this,ga).delete(s)){const i=ju(s);if(typeof i=="string"){const r=L(this,Bn).get(i);if(r)if(r.length>1){const u=r.indexOf(s);u!==-1&&r.splice(u,1)}else r[0]===s&&L(this,Bn).delete(i)}}this.notify({type:"removed",mutation:s})}canRun(s){var r;const i=ju(s);if(typeof i=="string"){const u=(r=L(this,Bn).get(i))==null?void 0:r.find(d=>d.state.status==="pending");return!u||u===s}else return!0}runNext(s){var r,u;const i=ju(s);return typeof i=="string"?((u=(r=L(this,Bn).get(i))==null?void 0:r.find(d=>d!==s&&d.state.isPaused))==null?void 0:u.continue())??Promise.resolve():Promise.resolve()}clear(){$t.batch(()=>{const s=this.getAll();L(this,ga).clear(),L(this,Bn).clear(),s.forEach(i=>{this.notify({type:"removed",mutation:i})})})}getAll(){return Array.from(L(this,ga))}find(s){const i={exact:!0,...s};return this.getAll().find(r=>Gv(i,r))}findAll(s={}){return this.getAll().filter(i=>Gv(s,i))}notify(s){$t.batch(()=>{this.listeners.forEach(i=>{i(s)})})}resumePausedMutations(){const s=this.getAll().filter(i=>i.state.isPaused);return $t.batch(()=>Promise.all(s.map(i=>i.continue().catch(fn))))}},ga=new WeakMap,Bn=new WeakMap,Yr=new WeakMap,qy);function ju(n){var s;return(s=n.options.scope)==null?void 0:s.id}var rl,Qy,G2=(Qy=class extends Ir{constructor(s={}){super();pe(this,rl);this.config=s,oe(this,rl,new Map)}build(s,i,r){const u=i.queryKey,d=i.queryHash??Xh(u,i);let h=this.get(d);return h||(h=new U2({client:s,queryKey:u,queryHash:d,options:s.defaultQueryOptions(i),state:r,defaultOptions:s.getQueryDefaults(u)}),this.add(h)),h}add(s){L(this,rl).has(s.queryHash)||(L(this,rl).set(s.queryHash,s),this.notify({type:"added",query:s}))}remove(s){L(this,rl).get(s.queryHash)===s&&(s.destroy(),L(this,rl).delete(s.queryHash),this.notify({type:"removed",query:s}))}clear(){$t.batch(()=>{this.getAll().forEach(s=>{this.remove(s)})})}get(s){return L(this,rl).get(s)}getAll(){return[...L(this,rl).values()]}find(s){const i={exact:!0,...s};return this.getAll().find(r=>kv(i,r))}findAll(s={}){const i=this.getAll();return Object.keys(s).length>0?i.filter(r=>kv(s,r)):i}notify(s){$t.batch(()=>{this.listeners.forEach(i=>{i(s)})})}onFocus(){$t.batch(()=>{this.getAll().forEach(s=>{s.onFocus()})})}onOnline(){$t.batch(()=>{this.getAll().forEach(s=>{s.onOnline()})})}},rl=new WeakMap,Qy),ht,pa,va,Si,bi,ya,wi,Ci,Yy,q2=(Yy=class{constructor(n={}){pe(this,ht);pe(this,pa);pe(this,va);pe(this,Si);pe(this,bi);pe(this,ya);pe(this,wi);pe(this,Ci);oe(this,ht,n.queryCache||new G2),oe(this,pa,n.mutationCache||new k2),oe(this,va,n.defaultOptions||{}),oe(this,Si,new Map),oe(this,bi,new Map),oe(this,ya,0)}mount(){Cu(this,ya)._++,L(this,ya)===1&&(oe(this,wi,Ph.subscribe(async n=>{n&&(await this.resumePausedMutations(),L(this,ht).onFocus())})),oe(this,Ci,Ou.subscribe(async n=>{n&&(await this.resumePausedMutations(),L(this,ht).onOnline())})))}unmount(){var n,s;Cu(this,ya)._--,L(this,ya)===0&&((n=L(this,wi))==null||n.call(this),oe(this,wi,void 0),(s=L(this,Ci))==null||s.call(this),oe(this,Ci,void 0))}isFetching(n){return L(this,ht).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return L(this,pa).findAll({...n,status:"pending"}).length}getQueryData(n){var i;const s=this.defaultQueryOptions({queryKey:n});return(i=L(this,ht).get(s.queryHash))==null?void 0:i.state.data}ensureQueryData(n){const s=this.defaultQueryOptions(n),i=L(this,ht).build(this,s),r=i.state.data;return r===void 0?this.fetchQuery(n):(n.revalidateIfStale&&i.isStaleByTime(ft(s.staleTime,i))&&this.prefetchQuery(s),Promise.resolve(r))}getQueriesData(n){return L(this,ht).findAll(n).map(({queryKey:s,state:i})=>[s,i.data])}setQueryData(n,s,i){var h;const r=this.defaultQueryOptions({queryKey:n}),u=(h=L(this,ht).get(r.queryHash))==null?void 0:h.state.data,d=w2(s,u);if(d!==void 0)return L(this,ht).build(this,r).setData(d,{...i,manual:!0})}setQueriesData(n,s,i){return $t.batch(()=>L(this,ht).findAll(n).map(({queryKey:r})=>[r,this.setQueryData(r,s,i)]))}getQueryState(n){var i;const s=this.defaultQueryOptions({queryKey:n});return(i=L(this,ht).get(s.queryHash))==null?void 0:i.state}removeQueries(n){const s=L(this,ht);$t.batch(()=>{s.findAll(n).forEach(i=>{s.remove(i)})})}resetQueries(n,s){const i=L(this,ht);return $t.batch(()=>{const r=i.findAll(n),u=new Set(r);return r.forEach(d=>{d.reset()}),this.refetchQueries({type:"active",predicate:d=>u.has(d)},s)})}cancelQueries(n,s={}){const i={revert:!0,...s},r=$t.batch(()=>L(this,ht).findAll(n).map(u=>u.cancel(i)));return Promise.all(r).then(fn).catch(fn)}invalidateQueries(n,s={}){return $t.batch(()=>(L(this,ht).findAll(n).forEach(i=>{i.invalidate()}),(n==null?void 0:n.refetchType)==="none"?Promise.resolve():this.refetchQueries({...n,type:(n==null?void 0:n.refetchType)??(n==null?void 0:n.type)??"active"},s)))}refetchQueries(n,s={}){const i={...s,cancelRefetch:s.cancelRefetch??!0},r=$t.batch(()=>L(this,ht).findAll(n).filter(u=>!u.isDisabled()&&!u.isStatic()).map(u=>{let d=u.fetch(void 0,i);return i.throwOnError||(d=d.catch(fn)),u.state.fetchStatus==="paused"?Promise.resolve():d}));return Promise.all(r).then(fn)}async query(n){const s=this.defaultQueryOptions(n);s.retry===void 0&&(s.retry=!1);const i=L(this,ht).build(this,s),r=i.isStaleByTime(ft(s.staleTime,i))?await i.fetch(s):i.state.data,u=s.select;return u?u(r):r}fetchQuery(n){const s=this.defaultQueryOptions(n);s.retry===void 0&&(s.retry=!1);const i=L(this,ht).build(this,s);return i.isStaleByTime(ft(s.staleTime,i))?i.fetch(s):Promise.resolve(i.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(fn).catch(fn)}infiniteQuery(n){return n._type="infinite",this.query(n)}fetchInfiniteQuery(n){return n._type="infinite",this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(fn).catch(fn)}ensureInfiniteQueryData(n){return n._type="infinite",this.ensureQueryData(n)}resumePausedMutations(){return Ou.isOnline()?L(this,pa).resumePausedMutations():Promise.resolve()}getQueryCache(){return L(this,ht)}getMutationCache(){return L(this,pa)}getDefaultOptions(){return L(this,va)}setDefaultOptions(n){oe(this,va,n)}setQueryDefaults(n,s){L(this,Si).set(Ur(n),{queryKey:n,defaultOptions:s})}getQueryDefaults(n){const s=[...L(this,Si).values()],i={};return s.forEach(r=>{ji(n,r.queryKey)&&Object.assign(i,r.defaultOptions)}),i}setMutationDefaults(n,s){L(this,bi).set(Ur(n),{mutationKey:n,defaultOptions:s})}getMutationDefaults(n){const s=[...L(this,bi).values()],i={};return s.forEach(r=>{ji(n,r.mutationKey)&&Object.assign(i,r.defaultOptions)}),i}defaultQueryOptions(n){if(n._defaulted)return n;const s={...L(this,va).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return s.queryHash||(s.queryHash=Xh(s.queryKey,s)),s.refetchOnReconnect===void 0&&(s.refetchOnReconnect=s.networkMode!=="always"),s.throwOnError===void 0&&(s.throwOnError=!!s.suspense),!s.networkMode&&s.persister&&(s.networkMode="offlineFirst"),s.queryFn===Kh&&(s.enabled=!1),s}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...L(this,va).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){L(this,ht).clear(),L(this,pa).clear()}},ht=new WeakMap,pa=new WeakMap,va=new WeakMap,Si=new WeakMap,bi=new WeakMap,ya=new WeakMap,wi=new WeakMap,Ci=new WeakMap,Yy);const o1=E.createContext(!1),Q2=()=>E.useContext(o1);o1.Provider;function Y2(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}const I2=E.createContext(Y2()),X2=()=>E.useContext(I2),K2=(n,s,i)=>{const r=(i==null?void 0:i.state.status)==="error"&&typeof n.throwOnError=="function"?t1(n.throwOnError,[i.state.error,i]):n.throwOnError;(n.suspense||r)&&(s.isReset()||(n.retryOnMount=!1))},Z2=n=>{E.useEffect(()=>{n.clearReset()},[n])},P2=({result:n,errorResetBoundary:s,throwOnError:i,query:r,suspense:u})=>n.isError&&!s.isReset()&&!n.isFetching&&r&&(u&&n.data===void 0||t1(i,[n.error,r])),J2=n=>{if(n.suspense){const i=u=>u==="static"?u:Math.max(u??1e3,1e3),r=n.staleTime;n.staleTime=typeof r=="function"?(...u)=>i(r(...u)):i(r),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},W2=(n,s)=>(n==null?void 0:n.suspense)&&s.isPending,ew=(n,s,i)=>s.fetchOptimistic(n).catch(()=>{i.clearReset()});function u1(n,s,i){const r=Q2(),u=X2(),d=Ky(),h=d.defaultQueryOptions(n),m=d.getQueryCache().get(h.queryHash),p=n.subscribed!==!1;h._optimisticResults=r?"isRestoring":p?"optimistic":void 0,J2(h),K2(h,u,m),Z2(u);const[y]=E.useState(()=>new s(d,h)),x=y.getOptimisticResult(h),v=!r&&p;if(E.useSyncExternalStore(E.useCallback(b=>{const w=v?y.subscribe($t.batchCalls(b)):fn;return y.updateResult(),w},[y,v]),()=>y.getCurrentResult(),()=>y.getCurrentResult()),E.useEffect(()=>{y.setOptions(h)},[h,y]),W2(h,x))throw ew(h,y,u);if(P2({result:x,errorResetBoundary:u,throwOnError:h.throwOnError,query:m,suspense:h.suspense}))throw x.error;return h.notifyOnChangeProps?x:y.trackResult(x)}function Ol(n,s){return u1(n,r1)}function tw(n,s){return u1(n,$2)}var Wh=Iy();/**
|
|
43
|
+
`+zt+e+za}var $n=!1;function gl(e,t){if(!e||$n)return"";$n=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var Z=function(){throw Error()};if(Object.defineProperty(Z.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Z,[])}catch(ie){var F=ie}Reflect.construct(e,[],Z)}else{try{Z.call()}catch(ie){F=ie}Z=!1;try{var q=Object.getOwnPropertyDescriptor(e.prototype,"props");Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),Z=!0,new e}finally{Z&&(q!==void 0?Object.defineProperty(e.prototype,"props",q):delete e.prototype.props)}}}else{try{throw Error()}catch(ie){F=ie}(Z=e())&&typeof Z.catch=="function"&&Z.catch(function(){})}}catch(ie){if(ie&&F&&typeof ie.stack=="string")return[ie.stack,F.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=s.DetermineComponentFrameRoot(),p=f[0],b=f[1];if(p&&b){var T=p.split(`
|
|
44
|
+
`),B=b.split(`
|
|
45
|
+
`);for(r=s=0;s<T.length&&!T[s].includes("DetermineComponentFrameRoot");)s++;for(;r<B.length&&!B[r].includes("DetermineComponentFrameRoot");)r++;if(s===T.length||r===B.length)for(s=T.length-1,r=B.length-1;1<=s&&0<=r&&T[s]!==B[r];)r--;for(;1<=s&&0<=r;s--,r--)if(T[s]!==B[r]){if(s!==1||r!==1)do if(s--,r--,0>r||T[s]!==B[r]){var I=`
|
|
46
|
+
`+T[s].replace(" at new "," at ");return e.displayName&&I.includes("<anonymous>")&&(I=I.replace("<anonymous>",e.displayName)),I}while(1<=s&&0<=r);break}}}finally{$n=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?qt(l):""}function J(e,t){switch(e.tag){case 26:case 27:case 5:return qt(e.type);case 16:return qt("Lazy");case 13:return e.child!==t&&t!==null?qt("Suspense Fallback"):qt("Suspense");case 19:return qt("SuspenseList");case 0:case 15:return gl(e.type,!1);case 11:return gl(e.type.render,!1);case 1:return gl(e.type,!0);case 31:return qt("Activity");case 30:return qt("ViewTransition");default:return""}}function se(e){try{var t="",l=null;do t+=J(e,l),l=e,e=e.return;while(e);return t}catch(s){return`
|
|
47
|
+
Error generating stack: `+s.message+`
|
|
48
|
+
`+s.stack}}var je=Object.prototype.hasOwnProperty,Ve=n.unstable_scheduleCallback,ke=n.unstable_cancelCallback,wt=n.unstable_shouldYield,lt=n.unstable_requestPaint,We=n.unstable_now,Jn=n.unstable_getCurrentPriorityLevel,Vl=n.unstable_ImmediatePriority,Da=n.unstable_UserBlockingPriority,La=n.unstable_NormalPriority,hr=n.unstable_LowPriority,Bi=n.unstable_IdlePriority,mr=n.log,gr=n.unstable_setDisableYieldValue,Fl=null,Qt=null;function Vn(e){if(typeof mr=="function"&&gr(e),Qt&&typeof Qt.setStrictMode=="function")try{Qt.setStrictMode(Fl,e)}catch{}}var Yt=Math.clz32?Math.clz32:st,pr=Math.log,de=Math.LN2;function st(e){return e>>>=0,e===0?32:31-(pr(e)/de|0)|0}var Dt=256,kl=262144,js=4194304;function pl(e){var t=e&42;if(t!==0)return t;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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Bl(e,t,l){var s=e.pendingLanes;if(s===0)return 0;var r=0,f=e.suspendedLanes,p=e.pingedLanes;e=e.warmLanes;var b=s&134217727;return b!==0?(s=b&~f,s!==0?r=pl(s):(p&=b,p!==0?r=pl(p):l||(l=b&~e,l!==0&&(r=pl(l))))):(b=s&~f,b!==0?r=pl(b):p!==0?r=pl(p):l||(l=s&~e,l!==0&&(r=pl(l)))),r===0?0:t!==0&&t!==r&&(t&f)===0&&(f=r&-r,l=t&-t,f>=l||f===32&&(l&4194048)!==0)?t:r}function an(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Gi(e,t){(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var s=31-Yt(l),r=1<<s;t|=e[s],l&=~r}return t}function vr(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32: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:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function qi(){var e=js;return js<<=1,(js&62914560)===0&&(js=4194304),e}function Qi(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function Gl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function yr(e,t,l,s,r,f){var p=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var b=e.entanglements,T=e.expirationTimes,B=e.hiddenUpdates;for(l=p&~l;0<l;){var I=31-Yt(l),Z=1<<I;b[I]=0,T[I]=-1;var F=B[I];if(F!==null)for(B[I]=null,I=0;I<F.length;I++){var q=F[I];q!==null&&(q.lane&=-536870913)}l&=~Z}s!==0&&Hm(e,s,0),f!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=f&~(p&~t))}function Hm(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-Yt(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|l&261930}function Um(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var s=31-Yt(l),r=1<<s;r&t|e[s]&t&&(e[s]|=t),l&=~r}}function $m(e,t){var l=t&-t;return l=(l&42)!==0?1:xc(l),(l&(e.suspendedLanes|t))!==0?0:l}function xc(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Sc(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Vm(){var e=ge.p;return e!==0?e:(e=window.event,e===void 0?32:Yv(e.type))}function Fm(e,t){var l=ge.p;try{return ge.p=e,t()}finally{ge.p=l}}var vl=Math.random().toString(36).slice(2),Lt="__reactFiber$"+vl,sn="__reactProps$"+vl,ws="__reactContainer$"+vl,km="__reactEvents$"+vl,Q1="__reactListeners$"+vl,Y1="__reactHandles$"+vl,Bm="__reactResources$"+vl,Yi="__reactMarker$"+vl,xr="__reactLoad$"+vl;function Sr(e){delete e[Lt],delete e[sn],delete e[Q1],delete e[Y1]}function Ha(e){var t;if(t=e[Lt])return t;for(var l=e.parentNode;l;){if(t=l[ws]||l[Lt]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=Ev(e);e!==null;){if(l=e[Lt])return l;e=Ev(e)}return t}e=l,l=e.parentNode}return null}function Ns(e){if(e=e[Lt]||e[ws]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ii(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function Cs(e){var t=e[Bm];return t||(t=e[Bm]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function _t(e){e[Yi]=!0}function Gm(e){e[xr]=void 0}var qm=new Set,Qm={};function Ua(e,t){Es(e,t),Es(e+"Capture",t)}function Es(e,t){for(Qm[e]=t,e=0;e<t.length;e++)qm.add(t[e])}var I1=RegExp("^[: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]*$"),Ym={},Im={};function X1(e){return je.call(Im,e)?!0:je.call(Ym,e)?!1:I1.test(e)?Im[e]=!0:(Ym[e]=!0,!1)}var Be=!1;function Xm(){var e=Be;return Be=!1,e}function br(e,t,l){if(X1(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var s=t.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,l)}}function jr(e,t,l){if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,l)}}function yl(e,t,l,s){if(s===null)e.removeAttribute(l);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,s)}}function gn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Km(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function K1(e,t,l){var s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var r=s.get,f=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(p){l=""+p,f.call(this,p)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return l},setValue:function(p){l=""+p},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function bc(e){if(!e._valueTracker){var t=Km(e)?"checked":"value";e._valueTracker=K1(e,t,""+e[t])}}function Pm(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),s="";return e&&(s=Km(e)?e.checked?"true":"false":e.value),e=s,e!==l?(t.setValue(e),!0):!1}var P1=/[\n"\\]/g;function En(e){return e.replace(P1,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function jc(e,t,l,s,r,f,p,b){e.name="",p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"?e.type=p:e.removeAttribute("type"),t!=null?p==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+gn(t)):e.value!==""+gn(t)&&(e.value=""+gn(t)):p!=="submit"&&p!=="reset"||e.removeAttribute("value"),t!=null?p==="number"&&e.value==t?wc(e,gn(e.value)):wc(e,gn(t)):l!=null?wc(e,gn(l)):s!=null&&e.removeAttribute("value"),r==null&&f!=null&&(e.defaultChecked=!!f),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.name=""+gn(b):e.removeAttribute("name")}function Zm(e,t,l,s,r,f,p,b){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.type=f),t!=null||l!=null){if(!(f!=="submit"&&f!=="reset"||t!=null)){bc(e);return}l=l!=null?""+gn(l):"",t=t!=null?""+gn(t):l,b||t===e.value||(e.value=t),e.defaultValue=t}s=s??r,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=b?e.checked:!!s,e.defaultChecked=!!s,p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(e.name=p),bc(e)}function wc(e,t){e.defaultValue!==""+t&&(e.defaultValue=""+t)}function Ms(e,t,l,s){if(e=e.options,t){t={};for(var r=0;r<l.length;r++)t["$"+l[r]]=!0;for(l=0;l<e.length;l++)r=t.hasOwnProperty("$"+e[l].value),e[l].selected!==r&&(e[l].selected=r),r&&s&&(e[l].defaultSelected=!0)}else{for(l=""+gn(l),t=null,r=0;r<e.length;r++){if(e[r].value===l){e[r].selected=!0,s&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function Jm(e,t,l){if(t!=null&&(t=""+gn(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+gn(l):""}function Wm(e,t,l,s){if(t==null){if(s!=null){if(l!=null)throw Error(o(92));if(Ce(s)){if(1<s.length)throw Error(o(93));s=s[0]}l=s}l==null&&(l=""),t=l}l=gn(t),e.defaultValue=l,s=e.textContent,s===l&&s!==""&&s!==null&&(e.value=s),bc(e)}function _s(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var Z1=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function eg(e,t,l){var s=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?s?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":s?e.setProperty(t,l):typeof l!="number"||l===0||Z1.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function tg(e,t,l){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,l!=null){for(var s in l)!l.hasOwnProperty(s)||t!=null&&t.hasOwnProperty(s)||(s.indexOf("--")===0?e.setProperty(s,""):s==="float"?e.cssFloat="":e[s]="",Be=!0);for(var r in t)s=t[r],t.hasOwnProperty(r)&&l[r]!==s&&(eg(e,r,s),Be=!0)}else for(var f in t)t.hasOwnProperty(f)&&eg(e,f,t[f])}function Nc(e){if(e.indexOf("-")===-1)return!1;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 J1=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["maskType","mask-type"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),W1=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function wr(e){return W1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Wn(){}var Cc=null;function Ec(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ts=null,Rs=null;function ng(e){var t=Ns(e);if(t&&(e=t.stateNode)){var l=e[sn]||null;e:switch(e=t.stateNode,t.type){case"input":if(jc(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),t=l.name,l.type==="radio"&&t!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+En(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var s=l[t];if(s!==e&&s.form===e.form){var r=s[sn]||null;if(!r)throw Error(o(90));jc(s,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<l.length;t++)s=l[t],s.form===e.form&&Pm(s)}break e;case"textarea":Jm(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&Ms(e,!!l.multiple,t,!1)}}}var Mc=!1;function lg(e,t,l){if(Mc)return e(t,l);Mc=!0;try{var s=e(t);return s}finally{if(Mc=!1,(Ts!==null||Rs!==null)&&(wu(),Ts&&(t=Ts,e=Rs,Rs=Ts=null,ng(t),e)))for(t=0;t<e.length;t++)ng(e[t])}}function Xi(e,t){var l=e.stateNode;if(l===null)return null;var s=l[sn]||null;if(s===null)return null;l=s[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":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(o(231,t,typeof l));return l}var xl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),_c=!1;if(xl)try{var Ki={};Object.defineProperty(Ki,"passive",{get:function(){_c=!0}}),window.addEventListener("test",Ki,Ki),window.removeEventListener("test",Ki,Ki)}catch{_c=!1}var ql=null,Tc=null,Nr=null;function ag(){if(Nr)return Nr;var e,t=Tc,l=t.length,s,r="value"in ql?ql.value:ql.textContent,f=r.length;for(e=0;e<l&&t[e]===r[e];e++);var p=l-e;for(s=1;s<=p&&t[l-s]===r[f-s];s++);return Nr=r.slice(e,1<s?1-s:void 0)}function Cr(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 Er(){return!0}function sg(){return!1}function Zt(e){function t(l,s,r,f,p){this._reactName=l,this._targetInst=r,this.type=s,this.nativeEvent=f,this.target=p,this.currentTarget=null;for(var b in e)e.hasOwnProperty(b)&&(l=e[b],this[b]=l?l(f):f[b]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?Er:sg,this.isPropagationStopped=sg,this}return R(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Er)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Er)},persist:function(){},isPersistent:Er}),t}var Ql={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Mr=Zt(Ql),Pi=R({},Ql,{view:0,detail:0}),eS=Zt(Pi),Rc,Ac,Zi,_r=R({},Pi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zc,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!==Zi&&(Zi&&e.type==="mousemove"?(Rc=e.screenX-Zi.screenX,Ac=e.screenY-Zi.screenY):Ac=Rc=0,Zi=e),Rc)},movementY:function(e){return"movementY"in e?e.movementY:Ac}}),ig=Zt(_r),tS=R({},_r,{dataTransfer:0}),nS=Zt(tS),lS=R({},Pi,{relatedTarget:0}),Oc=Zt(lS),aS=R({},Ql,{animationName:0,elapsedTime:0,pseudoElement:0}),sS=Zt(aS),iS=R({},Ql,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),oS=Zt(iS),rS=R({},Ql,{data:0}),og=Zt(rS),uS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},cS={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"},fS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function dS(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=fS[e])?!!t[e]:!1}function zc(){return dS}var hS=R({},Pi,{key:function(e){if(e.key){var t=uS[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Cr(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?cS[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zc,charCode:function(e){return e.type==="keypress"?Cr(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Cr(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),mS=Zt(hS),gS=R({},_r,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),rg=Zt(gS),pS=R({},Ql,{submitter:0}),vS=Zt(pS),yS=R({},Pi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zc}),xS=Zt(yS),SS=R({},Ql,{propertyName:0,elapsedTime:0,pseudoElement:0}),bS=Zt(SS),jS=R({},_r,{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}),wS=Zt(jS),NS=R({},Ql,{newState:0,oldState:0,source:0}),CS=Zt(NS),ES=[9,13,27,32],Dc=xl&&"CompositionEvent"in window,Ji=null;xl&&"documentMode"in document&&(Ji=document.documentMode);var MS=xl&&"TextEvent"in window&&!Ji,ug=xl&&(!Dc||Ji&&8<Ji&&11>=Ji),cg=" ",fg=!1;function dg(e,t){switch(e){case"keyup":return ES.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function hg(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var As=!1;function _S(e,t){switch(e){case"compositionend":return hg(t);case"keypress":return t.which!==32?null:(fg=!0,cg);case"textInput":return e=t.data,e===cg&&fg?null:e;default:return null}}function TS(e,t){if(As)return e==="compositionend"||!Dc&&dg(e,t)?(e=ag(),Nr=Tc=ql=null,As=!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 ug&&t.locale!=="ko"?null:t.data;default:return null}}var RS={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 mg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!RS[e.type]:t==="textarea"}function gg(e,t,l,s){Ts?Rs?Rs.push(s):Rs=[s]:Ts=s,t=Tu(t,"onChange"),0<t.length&&(l=new Mr("onChange","change",null,l,s),e.push({event:l,listeners:t}))}var Wi=null,eo=null;function AS(e){nv(e,0)}function Tr(e){var t=Ii(e);if(Pm(t))return e}function pg(e,t){if(e==="change")return t}var vg=!1;if(xl){var Lc;if(xl){var Hc="oninput"in document;if(!Hc){var yg=document.createElement("div");yg.setAttribute("oninput","return;"),Hc=typeof yg.oninput=="function"}Lc=Hc}else Lc=!1;vg=Lc&&(!document.documentMode||9<document.documentMode)}function xg(){Wi&&(Wi.detachEvent("onpropertychange",Sg),eo=Wi=null)}function Sg(e){if(e.propertyName==="value"&&Tr(eo)){var t=[];gg(t,eo,e,Ec(e)),lg(AS,t)}}function OS(e,t,l){e==="focusin"?(xg(),Wi=t,eo=l,Wi.attachEvent("onpropertychange",Sg)):e==="focusout"&&xg()}function zS(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Tr(eo)}function DS(e,t){if(e==="click")return Tr(t)}function LS(e,t){if(e==="input"||e==="change")return Tr(t)}function HS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var pn=typeof Object.is=="function"?Object.is:HS;function to(e,t){if(pn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),s=Object.keys(t);if(l.length!==s.length)return!1;for(s=0;s<l.length;s++){var r=l[s];if(!je.call(t,r)||!pn(e[r],t[r]))return!1}return!0}function Uc(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 bg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function jg(e,t){var l=bg(e);e=0;for(var s;l;){if(l.nodeType===3){if(s=e+l.textContent.length,e<=t&&s>=t)return{node:l,offset:t-e};e=s}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=bg(l)}}function wg(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?wg(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ng(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Uc(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=Uc(e.document)}return t}function $c(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")}var US=xl&&"documentMode"in document&&11>=document.documentMode,Os=null,Vc=null,no=null,Fc=!1;function Cg(e,t,l){var s=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Fc||Os==null||Os!==Uc(s)||(s=Os,"selectionStart"in s&&$c(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),no&&to(no,s)||(no=s,s=Tu(Vc,"onSelect"),0<s.length&&(t=new Mr("onSelect","select",null,t,l),e.push({event:t,listeners:s}),t.target=Os)))}function $a(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var zs={animationend:$a("Animation","AnimationEnd"),animationiteration:$a("Animation","AnimationIteration"),animationstart:$a("Animation","AnimationStart"),transitionrun:$a("Transition","TransitionRun"),transitionstart:$a("Transition","TransitionStart"),transitioncancel:$a("Transition","TransitionCancel"),transitionend:$a("Transition","TransitionEnd")},kc={},Eg={};xl&&(Eg=document.createElement("div").style,"AnimationEvent"in window||(delete zs.animationend.animation,delete zs.animationiteration.animation,delete zs.animationstart.animation),"TransitionEvent"in window||delete zs.transitionend.transition);function Va(e){if(kc[e])return kc[e];if(!zs[e])return e;var t=zs[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in Eg)return kc[e]=t[l];return e}var Mg=Va("animationend"),_g=Va("animationiteration"),Tg=Va("animationstart"),$S=Va("transitionrun"),VS=Va("transitionstart"),FS=Va("transitioncancel"),Rg=Va("transitionend"),Ag=new Map,Bc="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError 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(" ");Bc.push("scrollEnd");function Fn(e,t){Ag.set(e,t),Ua(t,[e])}var kS=0;function Sl(e,t){if(e.name!=null&&e.name!=="auto")return e.name;if(t.autoName!==null)return t.autoName;e=qn.identifierPrefix;var l=kS++;return e="_"+e+"t_"+l.toString(32)+"_",t.autoName=e}function Og(e){if(e==null||typeof e=="string")return e;var t=null,l=Ws;if(l!==null)for(var s=0;s<l.length;s++){var r=e[l[s]];if(r!=null){if(r==="none")return"none";t=t==null?r:t+(" "+r)}}return t??e.default}function bl(e,t){return e=Og(e),t=Og(t),t==null?e==="auto"?null:e:t==="auto"?null:t}var Rr=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Mn=[],Ds=0,Gc=0;function Ar(){for(var e=Ds,t=Gc=Ds=0;t<e;){var l=Mn[t];Mn[t++]=null;var s=Mn[t];Mn[t++]=null;var r=Mn[t];Mn[t++]=null;var f=Mn[t];if(Mn[t++]=null,s!==null&&r!==null){var p=s.pending;p===null?r.next=r:(r.next=p.next,p.next=r),s.pending=r}f!==0&&zg(l,r,f)}}function Or(e,t,l,s){Mn[Ds++]=e,Mn[Ds++]=t,Mn[Ds++]=l,Mn[Ds++]=s,Gc|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function qc(e,t,l,s){return Or(e,t,l,s),zr(e)}function Fa(e,t){return Or(e,null,null,t),zr(e)}function zg(e,t,l){e.lanes|=l;var s=e.alternate;s!==null&&(s.lanes|=l);for(var r=!1,f=e.return;f!==null;)f.childLanes|=l,s=f.alternate,s!==null&&(s.childLanes|=l),f.tag===22&&(e=f.stateNode,e===null||e._visibility&1||(r=!0)),e=f,f=f.return;return e.tag===3?(f=e.stateNode,r&&t!==null&&(r=31-Yt(l),e=f.hiddenUpdates,s=e[r],s===null?e[r]=[t]:s.push(t),t.lane=l|536870912),f):null}function zr(e){if(50<Co)throw Co=0,ju=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ls={};function BS(e,t,l,s){this.tag=e,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function on(e,t,l,s){return new BS(e,t,l,s)}function Qc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function jl(e,t){var l=e.alternate;return l===null?(l=on(e.tag,t,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=t,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&1206910976,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,t=e.dependencies,l.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function Dg(e,t){e.flags&=1206910978;var l=e.alternate;return l===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,t=l.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Dr(e,t,l,s,r,f){var p=0;if(s=e,typeof s=="function")Qc(s)&&(p=1);else if(typeof s=="string")p=p2(e,l,Mt.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(s){case He:return e=on(31,l,t,r),e.elementType=He,e.lanes=f,e;case le:return ka(l.children,r,f,t);case oe:p=8,r|=24;break;case te:return e=on(12,l,t,r|2),e.elementType=te,e.lanes=f,e;case W:return e=on(13,l,t,r),e.elementType=W,e.lanes=f,e;case ae:return e=on(19,l,t,r),e.elementType=ae,e.lanes=f,e;case Fe:case L:return e=r|32,e=on(30,l,t,e),e.elementType=L,e.lanes=f,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case ee:p=10;break e;case Y:p=9;break e;case X:p=11;break e;case ve:p=14;break e;case xe:p=16,s=null;break e}p=29,l=Error(o(130,e===null?"null":typeof e,"")),s=null}return t=on(p,l,t,r),t.elementType=e,t.type=s,t.lanes=f,t}function ka(e,t,l,s){return e=on(7,e,s,t),e.lanes=l,e}function Yc(e,t,l){return e=on(6,e,null,t),e.lanes=l,e}function Lg(e){var t=on(18,null,null,0);return t.stateNode=e,t}function Ic(e,t,l){return t=on(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Hg=new WeakMap;function _n(e,t){if(typeof e=="object"&&e!==null){var l=Hg.get(e);return l!==void 0?l:(t={value:e,source:t,stack:se(t)},Hg.set(e,t),t)}return{value:e,source:t,stack:se(t)}}var Hs=[],Us=0,Lr=null,lo=0,Tn=[],Rn=0,Yl=null,el=1,tl="";function wl(e,t){Hs[Us++]=lo,Hs[Us++]=Lr,Lr=e,lo=t}function Ug(e,t,l){Tn[Rn++]=el,Tn[Rn++]=tl,Tn[Rn++]=Yl,Yl=e;var s=el;e=tl;var r=32-Yt(s)-1;s&=~(1<<r),l+=1;var f=32-Yt(t)+r;if(30<f){var p=r-r%5;f=(s&(1<<p)-1).toString(32),s>>=p,r-=p,el=1<<32-Yt(t)+r|l<<r|s,tl=f+e}else el=1<<f|l<<r|s,tl=e}function Hr(e){e.return!==null&&(wl(e,1),Ug(e,1,0))}function Xc(e){for(;e===Lr;)Lr=Hs[--Us],Hs[Us]=null,lo=Hs[--Us],Hs[Us]=null;for(;e===Yl;)Yl=Tn[--Rn],Tn[Rn]=null,tl=Tn[--Rn],Tn[Rn]=null,el=Tn[--Rn],Tn[Rn]=null}function $g(e,t){Tn[Rn++]=el,Tn[Rn++]=tl,Tn[Rn++]=Yl,el=t.id,tl=t.overflow,Yl=e}var Tt=null,tt=null,Te=!1,Il=null,An=!1,Kc=Error(o(519));function Xl(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ao(_n(t,e)),Kc}function Vg(e){var t=e.stateNode,l=e.type,s=e.memoizedProps;switch(t[Lt]=e,t[sn]=s,l){case"dialog":Ae("cancel",t),Ae("close",t);break;case"iframe":case"object":case"embed":Ae("load",t);break;case"video":case"audio":for(l=0;l<Mo.length;l++)Ae(Mo[l],t);break;case"source":Ae("error",t);break;case"img":case"image":case"link":Ae("error",t),Ae("load",t);break;case"details":Ae("toggle",t);break;case"input":Ae("invalid",t),Zm(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Ae("invalid",t);break;case"textarea":Ae("invalid",t),Wm(t,s.value,s.defaultValue,s.children)}l=s.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||s.suppressHydrationWarning===!0||iv(t.textContent,l)?(s.popover!=null&&(Ae("beforetoggle",t),Ae("toggle",t)),s.onScroll!=null&&Ae("scroll",t),s.onScrollEnd!=null&&Ae("scrollend",t),s.onClick!=null&&(t.onclick=Wn),t=!0):t=!1,t||Xl(e,!0)}function Ur(e){for(Tt=e.return;Tt;)switch(Tt.tag){case 5:case 31:case 13:An=!1;return;case 27:case 3:An=!0;return;default:Tt=Tt.return}}function $s(e){if(e!==Tt)return!1;if(!Te)return Ur(e),Te=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||Ed(e.type,e.memoizedProps)),l=!l),l&&tt&&Xl(e),Ur(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));tt=Cv(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));tt=Cv(e)}else t===27?(t=tt,ca(e.type)?(e=Ld,Ld=null,tt=e):tt=t):tt=Tt?zn(e.stateNode.nextSibling):null;return!0}function Ba(){tt=Tt=null,Te=!1}function Pc(){var e=Il;return e!==null&&(cn===null?cn=e:cn.push.apply(cn,e),Il=null),e}function ao(e){Il===null?Il=[e]:Il.push(e)}var Zc=Et(null),Ga=null,Nl=null;function Kl(e,t,l){Ie(Zc,t._currentValue),t._currentValue=l}function Cl(e){e._currentValue=Zc.current,mt(Zc)}function $r(e,t,l){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===l)break;e=e.return}}function Jc(e,t,l,s){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var f=r.dependencies;if(f!==null){var p=r.child;f=f.firstContext;e:for(;f!==null;){var b=f;f=r;for(var T=0;T<t.length;T++)if(b.context===t[T]){f.lanes|=l,b=f.alternate,b!==null&&(b.lanes|=l),$r(f.return,l,e),s||(p=null);break e}f=b.next}}else if(r.tag===18){if(p=r.return,p===null)throw Error(o(341));p.lanes|=l,f=p.alternate,f!==null&&(f.lanes|=l),$r(p,l,e),p=null}else r.tag===13&&r.memoizedState!==null&&r.memoizedState.dehydrated===null?(r.lanes|=l,p=r.alternate,p!==null&&(p.lanes|=l),$r(r.return,l,e),p=r.child,p=p!==null?p.sibling:null):p=r.child;if(p!==null)p.return=r;else for(p=r;p!==null;){if(p===e){p=null;break}if(r=p.sibling,r!==null){r.return=p.return,p=r;break}p=p.return}r=p}}function qa(e,t,l,s){e=null;for(var r=t,f=!1;r!==null;){if(!f){if((r.flags&524288)!==0)f=!0;else if((r.flags&262144)!==0)break}if(r.tag===10){var p=r.alternate;if(p===null)throw Error(o(387));if(p=p.memoizedProps,p!==null){var b=r.type;pn(r.pendingProps.value,p.value)||(e!==null?e.push(b):e=[b])}}else if(r===pt.current){if(p=r.alternate,p===null)throw Error(o(387));p.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(ui):e=[ui])}r=r.return}return e!==null&&Jc(t,e,l,s),t.flags|=262144,e!==null}function Vr(e){for(e=e.firstContext;e!==null;){if(!pn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Qa(e){Ga=e,Nl=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ht(e){return Fg(Ga,e)}function Fr(e,t){return Ga===null&&Qa(e),Fg(e,t)}function Fg(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},Nl===null){if(e===null)throw Error(o(308));Nl=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Nl=Nl.next=t;return l}var GS=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,s){e.push(s)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},qS=n.unstable_scheduleCallback,QS=n.unstable_NormalPriority,vt={$$typeof:ee,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Wc(){return{controller:new GS,data:new Map,refCount:0}}function so(e){e.refCount--,e.refCount===0&&qS(QS,function(){e.controller.abort()})}function kg(e,t){if((e.pendingLanes&4194048)!==0){var l=e.transitionTypes;for(l===null&&(l=e.transitionTypes=[]),e=0;e<t.length;e++){var s=t[e];l.indexOf(s)===-1&&l.push(s)}}}var io=null;function YS(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var oo=null,ef=0,Ya=0,Vs=null;function IS(e,t){if(oo===null){var l=oo=[];ef=0,Ya=vd(),Vs={status:"pending",value:void 0,then:function(s){l.push(s)}}}return ef++,t.then(Bg,Bg),t}function Bg(){if(--ef===0&&(io=null,oo!==null)){Vs!==null&&(Vs.status="fulfilled");var e=oo;oo=null,Ya=0,Vs=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function XS(e,t){var l=[],s={status:"pending",value:null,reason:null,then:function(r){l.push(r)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var r=0;r<l.length;r++)(0,l[r])(t)},function(r){for(s.status="rejected",s.reason=r,r=0;r<l.length;r++)(0,l[r])(void 0)}),s}var Gg=ue.S;ue.S=function(e,t){if(L0=We(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&IS(e,t),io!==null)for(var l=li;l!==null;)kg(l,io),l=l.next;if(l=e.types,l!==null){for(var s=li;s!==null;)kg(s,l),s=s.next;if(Ya!==0){s=io,s===null&&(s=io=[]);for(var r=0;r<l.length;r++){var f=l[r];s.indexOf(f)===-1&&s.push(f)}}}Gg!==null&&Gg(e,t)};var Ia=Et(null);function tf(){var e=Ia.current;return e!==null?e:et.pooledCache}function kr(e,t){t===null?Ie(Ia,Ia.current):Ie(Ia,t.pool)}function qg(){var e=tf();return e===null?null:{parent:vt._currentValue,pool:e}}var Fs=Error(o(460)),nf=Error(o(474)),Br=Error(o(542)),Gr={then:function(){}};function Qg(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Yg(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(Wn,Wn),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Xg(e),e===void 0&&!("reason"in t)?Error(o(600)):e;default:if(typeof t.status=="string")t.then(Wn,Wn);else{if(e=et,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var r=t;r.status="fulfilled",r.value=s}},function(s){if(t.status==="pending"){var r=t;r.status="rejected",r.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Xg(e),e}throw Ka=t,Fs}}function Xa(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Ka=l,Fs):l}}var Ka=null;function Ig(){if(Ka===null)throw Error(o(459));var e=Ka;return Ka=null,e}function Xg(e){if(e===Fs||e===Br)throw Error(o(483))}var ks=null,ro=0;function qr(e){var t=ro;return ro+=1,ks===null&&(ks=[]),Yg(ks,e,t)}function Pl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Qr(e,t){throw t.$$typeof===Q?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Kg(e){function t(k,H){if(e){var G=k.deletions;G===null?(k.deletions=[H],k.flags|=16):G.push(H)}}function l(k,H){if(!e)return null;for(;H!==null;)t(k,H),H=H.sibling;return null}function s(k){for(var H=new Map;k!==null;)k.key===null?H.set(k.index,k):H.set(k.key,k),k=k.sibling;return H}function r(k,H){return k=jl(k,H),k.index=0,k.sibling=null,k}function f(k,H,G){return k.index=G,e?(G=k.alternate,G!==null?(G=G.index,G<H?(k.flags|=2,H):G):(k.flags|=134217730,H)):(k.flags|=1048576,H)}function p(k){return e&&k.alternate===null&&(k.flags|=134217730),k}function b(k,H,G,P){return H===null||H.tag!==6?(H=Yc(G,k.mode,P),H.return=k,H):(H=r(H,G),H.return=k,H)}function T(k,H,G,P){var fe=G.type;return fe===le?(k=I(k,H,G.props.children,P,G.key),Pl(k,G),k):H!==null&&(H.elementType===fe||typeof fe=="object"&&fe!==null&&fe.$$typeof===xe&&Xa(fe)===H.type)?(H=r(H,G.props),Pl(H,G),H.return=k,H):(H=Dr(G.type,G.key,G.props,null,k.mode,P),Pl(H,G),H.return=k,H)}function B(k,H,G,P){return H===null||H.tag!==4||H.stateNode.containerInfo!==G.containerInfo||H.stateNode.implementation!==G.implementation?(H=Ic(G,k.mode,P),H.return=k,H):(H=r(H,G.children||[]),H.return=k,H)}function I(k,H,G,P,fe){return H===null||H.tag!==7?(H=ka(G,k.mode,P,fe),H.return=k,H):(H=r(H,G),H.return=k,H)}function Z(k,H,G){if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return H=Yc(""+H,k.mode,G),H.return=k,H;if(typeof H=="object"&&H!==null){switch(H.$$typeof){case K:return G=Dr(H.type,H.key,H.props,null,k.mode,G),Pl(G,H),G.return=k,G;case $:return H=Ic(H,k.mode,G),H.return=k,H;case xe:return H=Xa(H),Z(k,H,G)}if(Ce(H)||re(H))return H=ka(H,k.mode,G,null),H.return=k,H;if(typeof H.then=="function")return Z(k,qr(H),G);if(H.$$typeof===ee)return Z(k,Fr(k,H),G);Qr(k,H)}return null}function F(k,H,G,P){var fe=H!==null?H.key:null;if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return fe!==null?null:b(k,H,""+G,P);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case K:return G.key===fe?T(k,H,G,P):null;case $:return G.key===fe?B(k,H,G,P):null;case xe:return G=Xa(G),F(k,H,G,P)}if(Ce(G)||re(G))return fe!==null?null:I(k,H,G,P,null);if(typeof G.then=="function")return F(k,H,qr(G),P);if(G.$$typeof===ee)return F(k,H,Fr(k,G),P);Qr(k,G)}return null}function q(k,H,G,P,fe){if(typeof P=="string"&&P!==""||typeof P=="number"||typeof P=="bigint")return k=k.get(G)||null,b(H,k,""+P,fe);if(typeof P=="object"&&P!==null){switch(P.$$typeof){case K:return k=k.get(P.key===null?G:P.key)||null,T(H,k,P,fe);case $:return k=k.get(P.key===null?G:P.key)||null,B(H,k,P,fe);case xe:return P=Xa(P),q(k,H,G,P,fe)}if(Ce(P)||re(P))return k=k.get(G)||null,I(H,k,P,fe,null);if(typeof P.then=="function")return q(k,H,G,qr(P),fe);if(P.$$typeof===ee)return q(k,H,G,Fr(H,P),fe);Qr(H,P)}return null}function ie(k,H,G,P){for(var fe=null,ze=null,pe=H,Se=H=0,St=null;pe!==null&&Se<G.length;Se++){pe.index>Se?(St=pe,pe=null):St=pe.sibling;var Ue=F(k,pe,G[Se],P);if(Ue===null){pe===null&&(pe=St);break}e&&pe&&Ue.alternate===null&&t(k,pe),H=f(Ue,H,Se),ze===null?fe=Ue:ze.sibling=Ue,ze=Ue,pe=St}if(Se===G.length)return l(k,pe),Te&&wl(k,Se),fe;if(pe===null){for(;Se<G.length;Se++)pe=Z(k,G[Se],P),pe!==null&&(H=f(pe,H,Se),ze===null?fe=pe:ze.sibling=pe,ze=pe);return Te&&wl(k,Se),fe}for(pe=s(pe);Se<G.length;Se++)St=q(pe,k,Se,G[Se],P),St!==null&&(e&&(Ue=St.alternate,Ue!==null&&pe.delete(Ue.key===null?Se:Ue.key)),H=f(St,H,Se),ze===null?fe=St:ze.sibling=St,ze=St);return e&&pe.forEach(function(ga){return t(k,ga)}),Te&&wl(k,Se),fe}function he(k,H,G,P){if(G==null)throw Error(o(151));for(var fe=null,ze=null,pe=H,Se=H=0,St=null,Ue=G.next();pe!==null&&!Ue.done;Se++,Ue=G.next()){pe.index>Se?(St=pe,pe=null):St=pe.sibling;var ga=F(k,pe,Ue.value,P);if(ga===null){pe===null&&(pe=St);break}e&&pe&&ga.alternate===null&&t(k,pe),H=f(ga,H,Se),ze===null?fe=ga:ze.sibling=ga,ze=ga,pe=St}if(Ue.done)return l(k,pe),Te&&wl(k,Se),fe;if(pe===null){for(;!Ue.done;Se++,Ue=G.next())Ue=Z(k,Ue.value,P),Ue!==null&&(H=f(Ue,H,Se),ze===null?fe=Ue:ze.sibling=Ue,ze=Ue);return Te&&wl(k,Se),fe}for(pe=s(pe);!Ue.done;Se++,Ue=G.next())Ue=q(pe,k,Se,Ue.value,P),Ue!==null&&(e&&(St=Ue.alternate,St!==null&&pe.delete(St.key===null?Se:St.key)),H=f(Ue,H,Se),ze===null?fe=Ue:ze.sibling=Ue,ze=Ue);return e&&pe.forEach(function(_2){return t(k,_2)}),Te&&wl(k,Se),fe}function _e(k,H,G,P){if(typeof G=="object"&&G!==null&&G.type===le&&G.key===null&&G.props.ref===void 0&&(G=G.props.children),typeof G=="object"&&G!==null){switch(G.$$typeof){case K:e:{for(var fe=G.key;H!==null;){if(H.key===fe){if(fe=G.type,fe===le){if(H.tag===7){l(k,H.sibling),P=r(H,G.props.children),Pl(P,G),P.return=k,k=P;break e}}else if(H.elementType===fe||typeof fe=="object"&&fe!==null&&fe.$$typeof===xe&&Xa(fe)===H.type){l(k,H.sibling),P=r(H,G.props),Pl(P,G),P.return=k,k=P;break e}l(k,H);break}else t(k,H);H=H.sibling}G.type===le?(P=ka(G.props.children,k.mode,P,G.key),Pl(P,G),P.return=k,k=P):(P=Dr(G.type,G.key,G.props,null,k.mode,P),Pl(P,G),P.return=k,k=P)}return p(k);case $:e:{for(fe=G.key;H!==null;){if(H.key===fe)if(H.tag===4&&H.stateNode.containerInfo===G.containerInfo&&H.stateNode.implementation===G.implementation){l(k,H.sibling),P=r(H,G.children||[]),P.return=k,k=P;break e}else{l(k,H);break}else t(k,H);H=H.sibling}P=Ic(G,k.mode,P),P.return=k,k=P}return p(k);case xe:return G=Xa(G),_e(k,H,G,P)}if(Ce(G))return ie(k,H,G,P);if(re(G)){if(fe=re(G),typeof fe!="function")throw Error(o(150));return G=fe.call(G),he(k,H,G,P)}if(typeof G.then=="function")return _e(k,H,qr(G),P);if(G.$$typeof===ee)return _e(k,H,Fr(k,G),P);Qr(k,G)}return typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint"?(G=""+G,H!==null&&H.tag===6?(l(k,H.sibling),P=r(H,G),P.return=k,k=P):(l(k,H),P=Yc(G,k.mode,P),P.return=k,k=P),p(k)):l(k,H)}return function(k,H,G,P){try{ro=0;var fe=_e(k,H,G,P);return ks=null,fe}catch(pe){if(pe===Fs||pe===Br)throw pe;var ze=on(29,pe,null,k.mode);return ze.lanes=P,ze.return=k,ze}finally{}}}var Pa=Kg(!0),Pg=Kg(!1),Zl=!1;function lf(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function af(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Jl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Wl(e,t,l){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(qe&2)!==0){var r=s.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),s.pending=t,t=zr(e),zg(e,null,l),t}return Or(e,s,t,l),zr(e)}function uo(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var s=t.lanes;s&=e.pendingLanes,l|=s,t.lanes=l,Um(e,l)}}function sf(e,t){var l=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,l===s)){var r=null,f=null;if(l=l.firstBaseUpdate,l!==null){do{var p={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};f===null?r=f=p:f=f.next=p,l=l.next}while(l!==null);f===null?r=f=t:f=f.next=t}else r=f=t;l={baseState:s.baseState,firstBaseUpdate:r,lastBaseUpdate:f,shared:s.shared,callbacks:s.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var of=!1;function co(){if(of){var e=Vs;if(e!==null)throw e}}function fo(e,t,l,s){of=!1;var r=e.updateQueue;Zl=!1;var f=r.firstBaseUpdate,p=r.lastBaseUpdate,b=r.shared.pending;if(b!==null){r.shared.pending=null;var T=b,B=T.next;T.next=null,p===null?f=B:p.next=B,p=T;var I=e.alternate;I!==null&&(I=I.updateQueue,b=I.lastBaseUpdate,b!==p&&(b===null?I.firstBaseUpdate=B:b.next=B,I.lastBaseUpdate=T))}if(f!==null){var Z=r.baseState;p=0,I=B=T=null,b=f;do{var F=b.lane&-536870913,q=F!==b.lane;if(q?(Oe&F)===F:(s&F)===F){F!==0&&F===Ya&&(of=!0),I!==null&&(I=I.next={lane:0,tag:b.tag,payload:b.payload,callback:null,next:null});e:{var ie=e,he=b;F=t;var _e=l;switch(he.tag){case 1:if(ie=he.payload,typeof ie=="function"){Z=ie.call(_e,Z,F);break e}Z=ie;break e;case 3:ie.flags=ie.flags&-65537|128;case 0:if(ie=he.payload,F=typeof ie=="function"?ie.call(_e,Z,F):ie,F==null)break e;Z=R({},Z,F);break e;case 2:Zl=!0}}F=b.callback,F!==null&&(e.flags|=64,q&&(e.flags|=8192),q=r.callbacks,q===null?r.callbacks=[F]:q.push(F))}else q={lane:F,tag:b.tag,payload:b.payload,callback:b.callback,next:null},I===null?(B=I=q,T=Z):I=I.next=q,p|=F;if(b=b.next,b===null){if(b=r.shared.pending,b===null)break;q=b,b=q.next,q.next=null,r.lastBaseUpdate=q,r.shared.pending=null}}while(!0);I===null&&(T=Z),r.baseState=T,r.firstBaseUpdate=B,r.lastBaseUpdate=I,f===null&&(r.shared.lanes=0),ia|=p,e.lanes=p,e.memoizedState=Z}}function Zg(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Jg(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)Zg(l[e],t)}var ea=Et(null),Yr=Et(0);function Wg(e,t){e=Rl,Ie(Yr,e),Ie(ea,t),Rl=e|t.baseLanes}function rf(){Ie(Yr,Rl),Ie(ea,ea.current)}function uf(){Rl=Yr.current,mt(ea),mt(Yr)}var Ut=Et(null),It=null;function ta(e){var t=e.alternate;Ie($t,$t.current&1),Ie(Ut,e),It===null&&(t===null||ea.current!==null||t.memoizedState!==null)&&(It=e)}function cf(e){Ie($t,$t.current),Ie(Ut,e),It===null&&(It=e)}function ep(e){e.tag===22?(Ie($t,$t.current),Ie(Ut,e),It===null&&(It=e)):na()}function na(){Ie($t,$t.current),Ie(Ut,Ut.current)}function vn(e){mt(Ut),It===e&&(It=null),mt($t)}var $t=Et(0);function ho(e,t){Ie(Ut,Ut.current),Ie($t,t)}function ff(e){mt($t),mt(Ut),It===e&&(It=null)}function Ir(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||zd(l)||Dd(l)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!=="independent"){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 El=0,Me=null,Je=null,yt=null,Xr=!1,Bs=!1,Za=!1,Kr=0,mo=0,Gs=null,KS=0;function dt(){throw Error(o(321))}function df(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!pn(e[l],t[l]))return!1;return!0}function hf(e,t,l,s,r,f){return El=f,Me=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ue.H=e===null||e.memoizedState===null?Up:$p,Za=!1,f=l(s,r),Za=!1,Bs&&(f=np(t,l,s,r)),tp(e),f}function tp(e){ue.H=nu;var t=Je!==null&&Je.next!==null;if(El=0,yt=Je=Me=null,Xr=!1,mo=0,Gs=null,t)throw Error(o(300));e===null||xt||(e=e.dependencies,e!==null&&Vr(e)&&(xt=!0))}function np(e,t,l,s){Me=e;var r=0;do{if(Bs&&(Gs=null),mo=0,Bs=!1,25<=r)throw Error(o(301));if(r+=1,yt=Je=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}ue.H=lb,f=t(l,s)}while(Bs);return f}function PS(){var e=ue.H,t=e.useState()[0];return t=typeof t.then=="function"?go(t):t,e=e.useState()[0],(Je!==null?Je.memoizedState:null)!==e&&(Me.flags|=1024),t}function mf(){var e=Kr!==0;return Kr=0,e}function gf(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function pf(e){if(Xr){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Xr=!1}El=0,yt=Je=Me=null,Bs=!1,mo=Kr=0,Gs=null}function Jt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return yt===null?Me.memoizedState=yt=e:yt=yt.next=e,yt}function gt(){if(Je===null){var e=Me.alternate;e=e!==null?e.memoizedState:null}else e=Je.next;var t=yt===null?Me.memoizedState:yt.next;if(t!==null)yt=t,Je=e;else{if(e===null)throw Me.alternate===null?Error(o(467)):Error(o(310));Je=e,e={memoizedState:Je.memoizedState,baseState:Je.baseState,baseQueue:Je.baseQueue,queue:Je.queue,next:null},yt===null?Me.memoizedState=yt=e:yt=yt.next=e}return yt}function Pr(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function go(e){var t=mo;return mo+=1,Gs===null&&(Gs=[]),e=Yg(Gs,e,t),t=Me,(yt===null?t.memoizedState:yt.next)===null&&(t=t.alternate,ue.H=t===null||t.memoizedState===null?Up:$p),e}function Zr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return go(e);if(e.$$typeof===V)return;if(e.$$typeof===ee)return Ht(e)}throw Error(o(438,String(e)))}function vf(e){var t=null,l=Me.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var s=Me.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=Pr(),Me.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),s=0;s<e;s++)l[s]=Ye;return t.index++,l}function Ml(e,t){return typeof t=="function"?t(e):t}function Jr(e){var t=gt();return yf(t,Je,e)}function yf(e,t,l){var s=e.queue;if(s===null)throw Error(o(311));s.lastRenderedReducer=l;var r=e.baseQueue,f=s.pending;if(f!==null){if(r!==null){var p=r.next;r.next=f.next,f.next=p}t.baseQueue=r=f,s.pending=null}if(f=e.baseState,r===null)e.memoizedState=f;else{t=r.next;var b=p=null,T=null,B=t,I=!1;do{var Z=B.lane&-536870913;if(Z!==B.lane?(Oe&Z)===Z:(El&Z)===Z){var F=B.revertLane;if(F===0)T!==null&&(T=T.next={lane:0,revertLane:0,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null}),Z===Ya&&(I=!0);else if((El&F)===F){B=B.next,F===Ya&&(I=!0);continue}else Z={lane:0,revertLane:B.revertLane,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},T===null?(b=T=Z,p=f):T=T.next=Z,Me.lanes|=F,ia|=F;Z=B.action,Za&&l(f,Z),f=B.hasEagerState?B.eagerState:l(f,Z)}else F={lane:Z,revertLane:B.revertLane,gesture:B.gesture,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},T===null?(b=T=F,p=f):T=T.next=F,Me.lanes|=Z,ia|=Z;B=B.next}while(B!==null&&B!==t);if(T===null?p=f:T.next=b,!pn(f,e.memoizedState)&&(xt=!0,I&&(l=Vs,l!==null)))throw l;e.memoizedState=f,e.baseState=p,e.baseQueue=T,s.lastRenderedState=f}return r===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function xf(e){var t=gt(),l=t.queue;if(l===null)throw Error(o(311));l.lastRenderedReducer=e;var s=l.dispatch,r=l.pending,f=t.memoizedState;if(r!==null){l.pending=null;var p=r=r.next;do f=e(f,p.action),p=p.next;while(p!==r);pn(f,t.memoizedState)||(xt=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),l.lastRenderedState=f}return[f,s]}function lp(e,t,l){var s=Me,r=gt(),f=Te;if(f){if(l===void 0)throw Error(o(407));l=l()}else l=t();var p=!pn((Je||r).memoizedState,l);if(p&&(r.memoizedState=l,xt=!0),r=r.queue,jf(ip.bind(null,s,r,e),[e]),e=r.getSnapshot!==t||p||yt!==null&&(yt.memoizedState.tag&1)!==0,qs(e?9:8,{destroy:void 0},sp.bind(null,s,r,l,t),null),e){if(s.flags|=2048,et===null)throw Error(o(349));f||(El&127)!==0||ap(s,t,l)}return l}function ap(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=Me.updateQueue,t===null?(t=Pr(),Me.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function sp(e,t,l,s){t.value=l,t.getSnapshot=s,op(t)&&rp(e)}function ip(e,t,l){return l(function(){op(t)&&rp(e)})}function op(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!pn(e,l)}catch{return!0}}function rp(e){var t=Fa(e,2);t!==null&&fn(t,e,2)}function Sf(e){var t=Jt();if(typeof e=="function"){var l=e;if(e=l(),Za){Vn(!0);try{l()}finally{Vn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ml,lastRenderedState:e},t}function up(e,t,l,s){return e.baseState=l,yf(e,Je,typeof s=="function"?s:Ml)}function ZS(e,t,l,s,r){if(tu(e))throw Error(o(485));if(e=t.action,e!==null){var f={payload:r,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(p){f.listeners.push(p)}};ue.T!==null?l(!0):f.isTransition=!1,s(f),l=t.pending,l===null?(f.next=t.pending=f,cp(t,f)):(f.next=l.next,t.pending=l.next=f)}}function cp(e,t){var l=t.action,s=t.payload,r=e.state;if(t.isTransition){var f=ue.T,p={};p.types=f!==null?f.types:null,ue.T=p;try{var b=l(r,s),T=ue.S;T!==null&&T(p,b),fp(e,t,b)}catch(B){bf(e,t,B)}finally{f!==null&&p.types!==null&&(f.types=p.types),ue.T=f}}else try{f=l(r,s),fp(e,t,f)}catch(B){bf(e,t,B)}}function fp(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(s){dp(e,t,s)},function(s){return bf(e,t,s)}):dp(e,t,l)}function dp(e,t,l){t.status="fulfilled",t.value=l,hp(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,cp(e,l)))}function bf(e,t,l){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=l,hp(t),t=t.next;while(t!==s)}e.action=null}function hp(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function mp(e,t){return t}function gp(e,t){if(Te){var l=et.formState;if(l!==null){e:{var s=Me;if(Te){if(tt){t:{for(var r=tt,f=An;r.nodeType!==8;){if(!f){r=null;break t}if(r=zn(r.nextSibling),r===null){r=null;break t}}f=r.data,r=f==="F!"||f==="F"?r:null}if(r){tt=zn(r.nextSibling),s=r.data==="F!";break e}}Xl(s)}s=!1}s&&(t=l[0])}}return l=Jt(),l.memoizedState=l.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:mp,lastRenderedState:t},l.queue=s,l=Dp.bind(null,Me,s),s.dispatch=l,s=Sf(!1),f=Mf.bind(null,Me,!1,s.queue),s=Jt(),r={state:t,dispatch:null,action:e,pending:null},s.queue=r,l=ZS.bind(null,Me,r,f,l),r.dispatch=l,s.memoizedState=e,[t,l,!1]}function pp(e){var t=gt();return vp(t,Je,e)}function vp(e,t,l){if(t=yf(e,t,mp)[0],e=Jr(Ml)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=go(t)}catch(p){throw p===Fs?Br:p}else s=t;t=gt();var r=t.queue,f=r.dispatch;return l!==t.memoizedState&&(Me.flags|=2048,qs(9,{destroy:void 0},JS.bind(null,r,l),null)),[s,f,e]}function JS(e,t){e.action=t}function yp(e){var t=gt(),l=Je;if(l!==null)return vp(t,l,e);gt(),t=t.memoizedState,l=gt();var s=l.queue.dispatch;return l.memoizedState=e,[t,s,!1]}function qs(e,t,l,s){return e={tag:e,create:l,deps:s,inst:t,next:null},t=Me.updateQueue,t===null&&(t=Pr(),Me.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(s=l.next,l.next=e,e.next=s,t.lastEffect=e),e}function xp(){return gt().memoizedState}function Wr(e,t,l,s){var r=Jt();Me.flags|=e,r.memoizedState=qs(1|t,{destroy:void 0},l,s===void 0?null:s)}function eu(e,t,l,s){var r=gt();s=s===void 0?null:s;var f=r.memoizedState.inst;Je!==null&&s!==null&&df(s,Je.memoizedState.deps)?r.memoizedState=qs(t,f,l,s):(Me.flags|=e,r.memoizedState=qs(1|t,f,l,s))}function Sp(e,t){Wr(8390656,8,e,t)}function jf(e,t){eu(2048,8,e,t)}function WS(e){Me.flags|=4;var t=Me.updateQueue;if(t===null)t=Pr(),Me.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function bp(e){var t=gt().memoizedState;return WS({ref:t,nextImpl:e}),function(){if((qe&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function jp(e,t){return eu(4,2,e,t)}function wp(e,t){return eu(4,4,e,t)}function Np(e,t){if(typeof t=="function"){e=e();var l=t(e);return function(){typeof l=="function"?l():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Cp(e,t,l){l=l!=null?l.concat([e]):null,eu(4,4,Np.bind(null,t,e),l)}function wf(){}function Ep(e,t){var l=gt();t=t===void 0?null:t;var s=l.memoizedState;return t!==null&&df(t,s[1])?s[0]:(l.memoizedState=[e,t],e)}function Mp(e,t){var l=gt();t=t===void 0?null:t;var s=l.memoizedState;if(t!==null&&df(t,s[1]))return s[0];if(s=e(),Za){Vn(!0);try{e()}finally{Vn(!1)}}return l.memoizedState=[s,t],s}function Nf(e,t,l){return l===void 0||(El&1073741824)!==0&&(Oe&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=U0(),Me.lanes|=e,ia|=e,l)}function _p(e,t,l,s){return pn(l,t)?l:ea.current!==null?(e=Nf(e,l,s),pn(e,t)||(xt=!0),e):(El&106)===0||(El&1073741824)!==0&&(Oe&261930)===0?(xt=!0,e.memoizedState=l):(e=U0(),Me.lanes|=e,ia|=e,t)}function Tp(e,t,l,s,r){var f=ge.p;ge.p=f!==0&&8>f?f:8;var p=ue.T,b={};b.types=p!==null?p.types:null,ue.T=b,Mf(e,!1,t,l);try{var T=r(),B=ue.S;if(B!==null&&B(b,T),T!==null&&typeof T=="object"&&typeof T.then=="function"){var I=XS(T,s);po(e,t,I,bn(e))}else po(e,t,s,bn(e))}catch(Z){po(e,t,{then:function(){},status:"rejected",reason:Z},bn())}finally{ge.p=f,p!==null&&b.types!==null&&(p.types=b.types),ue.T=p}}function eb(){}function Cf(e,t,l,s){if(e.tag!==5)throw Error(o(476));var r=Rp(e).queue;Tp(e,r,t,rt,l===null?eb:function(){return Ap(e),l(s)})}function Rp(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:rt,baseState:rt,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ml,lastRenderedState:rt},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ml,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ap(e){var t=Rp(e);t.next===null&&(t=e.alternate.memoizedState),po(e,t.next.queue,{},bn())}function Ef(){return Ht(ui)}function Op(){return gt().memoizedState}function zp(){return gt().memoizedState}function tb(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=bn();e=Jl(l);var s=Wl(t,e,l);s!==null&&(fn(s,t,l),uo(s,t,l)),t={cache:Wc()},e.payload=t;return}t=t.return}}function nb(e,t,l){var s=bn();l={lane:s,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},tu(e)?Lp(t,l):(l=qc(e,t,l,s),l!==null&&(fn(l,e,s),Hp(l,t,s)))}function Dp(e,t,l){var s=bn();po(e,t,l,s)}function po(e,t,l,s){var r={lane:s,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(tu(e))Lp(t,r);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=t.lastRenderedReducer,f!==null))try{var p=t.lastRenderedState,b=f(p,l);if(r.hasEagerState=!0,r.eagerState=b,pn(b,p))return Or(e,t,r,0),et===null&&Ar(),!1}catch{}finally{}if(l=qc(e,t,r,s),l!==null)return fn(l,e,s),Hp(l,t,s),!0}return!1}function Mf(e,t,l,s){if(s={lane:2,revertLane:vd(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},tu(e)){if(t)throw Error(o(479))}else t=qc(e,l,s,2),t!==null&&fn(t,e,2)}function tu(e){var t=e.alternate;return e===Me||t!==null&&t===Me}function Lp(e,t){Bs=Xr=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function Hp(e,t,l){if((l&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,l|=s,t.lanes=l,Um(e,l)}}var nu={readContext:Ht,use:Zr,useCallback:dt,useContext:dt,useEffect:dt,useImperativeHandle:dt,useLayoutEffect:dt,useInsertionEffect:dt,useMemo:dt,useReducer:dt,useRef:dt,useState:dt,useDebugValue:dt,useDeferredValue:dt,useTransition:dt,useSyncExternalStore:dt,useId:dt,useHostTransitionStatus:dt,useFormState:dt,useActionState:dt,useOptimistic:dt,useMemoCache:dt,useCacheRefresh:dt,useEffectEvent:dt},Up={readContext:Ht,use:Zr,useCallback:function(e,t){return Jt().memoizedState=[e,t===void 0?null:t],e},useContext:Ht,useEffect:Sp,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,Wr(4194308,4,Np.bind(null,t,e),l)},useLayoutEffect:function(e,t){return Wr(4194308,4,e,t)},useInsertionEffect:function(e,t){Wr(4,2,e,t)},useMemo:function(e,t){var l=Jt();t=t===void 0?null:t;var s=e();if(Za){Vn(!0);try{e()}finally{Vn(!1)}}return l.memoizedState=[s,t],s},useReducer:function(e,t,l){var s=Jt();if(l!==void 0){var r=l(t);if(Za){Vn(!0);try{l(t)}finally{Vn(!1)}}}else r=t;return s.memoizedState=s.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},s.queue=e,e=e.dispatch=nb.bind(null,Me,e),[s.memoizedState,e]},useRef:function(e){var t=Jt();return e={current:e},t.memoizedState=e},useState:function(e){e=Sf(e);var t=e.queue,l=Dp.bind(null,Me,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:wf,useDeferredValue:function(e,t){var l=Jt();return Nf(l,e,t)},useTransition:function(){var e=Sf(!1);return e=Tp.bind(null,Me,e.queue,!0,!1),Jt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var s=Me,r=Jt();if(Te){if(l===void 0)throw Error(o(407));l=l()}else{if(l=t(),et===null)throw Error(o(349));(Oe&127)!==0||ap(s,t,l)}r.memoizedState=l;var f={value:l,getSnapshot:t};return r.queue=f,Sp(ip.bind(null,s,f,e),[e]),s.flags|=2048,qs(9,{destroy:void 0},sp.bind(null,s,f,l,t),null),l},useId:function(){var e=Jt(),t=et.identifierPrefix;if(Te){var l=tl,s=el;l=(s&~(1<<32-Yt(s)-1)).toString(32)+l,t="_"+t+"R_"+l,l=Kr++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=KS++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Ef,useFormState:gp,useActionState:gp,useOptimistic:function(e){var t=Jt();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=Mf.bind(null,Me,!0,l),l.dispatch=t,[e,t]},useMemoCache:vf,useCacheRefresh:function(){return Jt().memoizedState=tb.bind(null,Me)},useEffectEvent:function(e){var t=Jt(),l={impl:e};return t.memoizedState=l,function(){if((qe&2)!==0)throw Error(o(440));return l.impl.apply(void 0,arguments)}}},$p={readContext:Ht,use:Zr,useCallback:Ep,useContext:Ht,useEffect:jf,useImperativeHandle:Cp,useInsertionEffect:jp,useLayoutEffect:wp,useMemo:Mp,useReducer:Jr,useRef:xp,useState:function(){return Jr(Ml)},useDebugValue:wf,useDeferredValue:function(e,t){var l=gt();return _p(l,Je.memoizedState,e,t)},useTransition:function(){var e=Jr(Ml)[0],t=gt().memoizedState;return[typeof e=="boolean"?e:go(e),t]},useSyncExternalStore:lp,useId:Op,useHostTransitionStatus:Ef,useFormState:pp,useActionState:pp,useOptimistic:function(e,t){var l=gt();return up(l,Je,e,t)},useMemoCache:vf,useCacheRefresh:zp,useEffectEvent:bp},lb={readContext:Ht,use:Zr,useCallback:Ep,useContext:Ht,useEffect:jf,useImperativeHandle:Cp,useInsertionEffect:jp,useLayoutEffect:wp,useMemo:Mp,useReducer:xf,useRef:xp,useState:function(){return xf(Ml)},useDebugValue:wf,useDeferredValue:function(e,t){var l=gt();return Je===null?Nf(l,e,t):_p(l,Je.memoizedState,e,t)},useTransition:function(){var e=xf(Ml)[0],t=gt().memoizedState;return[typeof e=="boolean"?e:go(e),t]},useSyncExternalStore:lp,useId:Op,useHostTransitionStatus:Ef,useFormState:yp,useActionState:yp,useOptimistic:function(e,t){var l=gt();return Je!==null?up(l,Je,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:vf,useCacheRefresh:zp,useEffectEvent:bp};function _f(e,t,l,s){t=e.memoizedState,l=l(s,t),l=l==null?t:R({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var Tf={enqueueSetState:function(e,t,l){e=e._reactInternals;var s=bn(),r=Jl(s);r.payload=t,l!=null&&(r.callback=l),t=Wl(e,r,s),t!==null&&(fn(t,e,s),uo(t,e,s))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var s=bn(),r=Jl(s);r.tag=1,r.payload=t,l!=null&&(r.callback=l),t=Wl(e,r,s),t!==null&&(fn(t,e,s),uo(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=bn(),s=Jl(l);s.tag=2,t!=null&&(s.callback=t),t=Wl(e,s,l),t!==null&&(fn(t,e,l),uo(t,e,l))}};function Vp(e,t,l,s,r,f,p){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,f,p):t.prototype&&t.prototype.isPureReactComponent?!to(l,s)||!to(r,f):!0}function Fp(e,t,l,s){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,s),t.state!==e&&Tf.enqueueReplaceState(t,t.state,null)}function Ja(e,t){var l=t;if("ref"in t){l={};for(var s in t)s!=="ref"&&(l[s]=t[s])}if(e=e.defaultProps){l===t&&(l=R({},l));for(var r in e)l[r]===void 0&&(l[r]=e[r])}return l}function kp(e){Rr(e)}function Bp(e){console.error(e)}function Gp(e){Rr(e)}function lu(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function qp(e,t,l){try{var s=e.onCaughtError;s(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function Rf(e,t,l){return l=Jl(l),l.tag=3,l.payload={element:null},l.callback=function(){lu(e,t)},l}function Qp(e){return e=Jl(e),e.tag=3,e}function Yp(e,t,l,s){var r=l.type.getDerivedStateFromError;if(typeof r=="function"){var f=s.value;e.payload=function(){return r(f)},e.callback=function(){qp(t,l,s)}}var p=l.stateNode;p!==null&&typeof p.componentDidCatch=="function"&&(e.callback=function(){qp(t,l,s),typeof r!="function"&&(oa===null?oa=new Set([this]):oa.add(this));var b=s.stack;this.componentDidCatch(s.value,{componentStack:b!==null?b:""})})}function ab(e,t,l,s,r){if(l.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=l.alternate,t!==null&&qa(t,l,r,!0),l=Ut.current,l!==null){switch(l.tag){case 31:case 13:case 19:return It===null?Nu():l.alternate===null&&ht===0&&(ht=3),l.flags&=-257,l.flags|=65536,l.lanes=r,s===Gr?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([s]):t.add(s),md(e,s,r)),!1;case 22:return l.flags|=65536,s===Gr?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([s])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([s]):l.add(s)),md(e,s,r)),!1}throw Error(o(435,l.tag))}return md(e,s,r),Nu(),!1}if(Te)return t=Ut.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,s!==Kc&&(e=Error(o(422),{cause:s}),ao(_n(e,l)))):(s!==Kc&&(t=Error(o(423),{cause:s}),ao(_n(t,l))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,s=_n(s,l),r=Rf(e.stateNode,s,r),sf(e,r),ht!==4&&(ht=2)),!1;var f=Error(o(520),{cause:s});if(f=_n(f,l),No===null?No=[f]:No.push(f),ht!==4&&(ht=2),t===null)return!0;s=_n(s,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=r&-r,l.lanes|=e,e=Rf(l.stateNode,s,e),sf(l,e),!1;case 1:if(t=l.type,f=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(oa===null||!oa.has(f))))return l.flags|=65536,r&=-r,l.lanes|=r,r=Qp(r),Yp(r,e,l,s),sf(l,r),!1;break;case 22:if(l.memoizedState!==null)return l.flags|=65536,!1}l=l.return}while(l!==null);return!1}var Af=Error(o(461)),xt=!1;function Nt(e,t,l,s){t.child=e===null?Pg(t,null,l,s):Pa(t,e.child,l,s)}function Ip(e,t,l,s,r){l=l.render;var f=t.ref;if("ref"in s){var p={};for(var b in s)b!=="ref"&&(p[b]=s[b])}else p=s;return Qa(t),s=hf(e,t,l,p,f,r),b=mf(),e!==null&&!xt?(gf(e,t,r),_l(e,t,r)):(Te&&b&&Hr(t),t.flags|=1,Nt(e,t,s,r),t.child)}function Xp(e,t,l,s,r){if(e===null){var f=l.type;return typeof f=="function"&&!Qc(f)&&f.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=f,Kp(e,t,f,s,r)):(e=Dr(l.type,null,s,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,!Vf(e,r)){var p=f.memoizedProps;if(l=l.compare,l=l!==null?l:to,l(p,s)&&e.ref===t.ref)return _l(e,t,r)}return t.flags|=1,e=jl(f,s),e.ref=t.ref,e.return=t,t.child=e}function Kp(e,t,l,s,r){if(e!==null){var f=e.memoizedProps;if(to(f,s)&&e.ref===t.ref)if(xt=!1,t.pendingProps=s=f,Vf(e,r))(e.flags&131072)!==0&&(xt=!0);else return t.lanes=e.lanes,_l(e,t,r)}return Of(e,t,l,s,r)}function Pp(e,t,l,s){var r=s.children,f=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((t.flags&128)!==0){if(f=f!==null?f.baseLanes|l:l,e!==null){for(s=t.child=e.child,r=0;s!==null;)r=r|s.lanes|s.childLanes,s=s.sibling;s=r&~f}else s=0,t.child=null;return Zp(e,t,f,l,s)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&kr(t,f!==null?f.cachePool:null),f!==null?Wg(t,f):rf(),ep(t);else return s=t.lanes=536870912,Zp(e,t,f!==null?f.baseLanes|l:l,l,s)}else f!==null?(kr(t,f.cachePool),Wg(t,f),na(),t.memoizedState=null):(e!==null&&kr(t,null),rf(),na());return Nt(e,t,r,l),t.child}function vo(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Zp(e,t,l,s,r){var f=tf();return f=f===null?null:{parent:vt._currentValue,pool:f},t.memoizedState={baseLanes:l,cachePool:f},e!==null&&kr(t,null),rf(),ep(t),e!==null&&qa(e,t,s,!0),t.childLanes=r,null}function au(e,t){return t=su({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Jp(e,t,l){return Pa(t,e.child,null,l),e=au(t,t.pendingProps),e.flags|=2,vn(t),t.memoizedState=null,e}function sb(e,t,l){var s=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Te){if(s.mode==="hidden")return e=au(t,s),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},vo(null,e);if(cf(t),(e=tt)?(e=Nv(e,An),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Yl!==null?{id:el,overflow:tl}:null,retryLane:536870912,hydrationErrors:null},l=Lg(e),l.return=t,t.child=l,Tt=t,tt=null)):e=null,e===null)throw Xl(t);return t.lanes=536870912,null}return au(t,s)}var f=e.memoizedState;if(f!==null){var p=f.dehydrated;if(cf(t),r)if(t.flags&256)t.flags&=-257,t=Jp(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(xt||qa(e,t,l,!1),r=(l&e.childLanes)!==0,xt||r){if(ea.current===null){if(s=et,s!==null&&(p=$m(s,l),p!==0&&p!==f.retryLane))throw f.retryLane=p,Fa(e,p),fn(s,e,p),Af;Nu()}t=Jp(e,t,l)}else e=f.treeContext,tt=zn(p.nextSibling),Tt=t,Te=!0,Il=null,An=!1,e!==null&&$g(t,e),t=au(t,s),t.flags|=134221824;return t}return e=jl(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Qs(e,t){var l=t.ref;if(l===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(o(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function Of(e,t,l,s,r){return Qa(t),l=hf(e,t,l,s,void 0,r),s=mf(),e!==null&&!xt?(gf(e,t,r),_l(e,t,r)):(Te&&s&&Hr(t),t.flags|=1,Nt(e,t,l,r),t.child)}function Wp(e,t,l,s,r,f){return Qa(t),t.updateQueue=null,l=np(t,s,l,r),tp(e),s=mf(),e!==null&&!xt?(gf(e,t,f),_l(e,t,f)):(Te&&s&&Hr(t),t.flags|=1,Nt(e,t,l,f),t.child)}function e0(e,t,l,s,r){if(Qa(t),t.stateNode===null){var f=Ls,p=l.contextType;typeof p=="object"&&p!==null&&(f=Ht(p)),f=new l(s,f),t.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=Tf,t.stateNode=f,f._reactInternals=t,f=t.stateNode,f.props=s,f.state=t.memoizedState,f.refs={},lf(t),p=l.contextType,f.context=typeof p=="object"&&p!==null?Ht(p):Ls,f.state=t.memoizedState,p=l.getDerivedStateFromProps,typeof p=="function"&&(_f(t,l,p,s),f.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(p=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),p!==f.state&&Tf.enqueueReplaceState(f,f.state,null),fo(t,s,f,r),co(),f.state=t.memoizedState),typeof f.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){f=t.stateNode;var b=t.memoizedProps,T=Ja(l,b);f.props=T;var B=f.context,I=l.contextType;p=Ls,typeof I=="object"&&I!==null&&(p=Ht(I));var Z=l.getDerivedStateFromProps;I=typeof Z=="function"||typeof f.getSnapshotBeforeUpdate=="function",b=t.pendingProps!==b,I||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(b||B!==p)&&Fp(t,f,s,p),Zl=!1;var F=t.memoizedState;f.state=F,fo(t,s,f,r),co(),B=t.memoizedState,b||F!==B||Zl?(typeof Z=="function"&&(_f(t,l,Z,s),B=t.memoizedState),(T=Zl||Vp(t,l,T,s,F,B,p))?(I||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(t.flags|=4194308)):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=B),f.props=s,f.state=B,f.context=p,s=T):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{f=t.stateNode,af(e,t),p=t.memoizedProps,I=Ja(l,p),f.props=I,Z=t.pendingProps,F=f.context,B=l.contextType,T=Ls,typeof B=="object"&&B!==null&&(T=Ht(B)),b=l.getDerivedStateFromProps,(B=typeof b=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(p!==Z||F!==T)&&Fp(t,f,s,T),Zl=!1,F=t.memoizedState,f.state=F,fo(t,s,f,r),co();var q=t.memoizedState;p!==Z||F!==q||Zl||e!==null&&e.dependencies!==null&&Vr(e.dependencies)?(typeof b=="function"&&(_f(t,l,b,s),q=t.memoizedState),(I=Zl||Vp(t,l,I,s,F,q,T)||e!==null&&e.dependencies!==null&&Vr(e.dependencies))?(B||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(s,q,T),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(s,q,T)),typeof f.componentDidUpdate=="function"&&(t.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof f.componentDidUpdate!="function"||p===e.memoizedProps&&F===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&F===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=q),f.props=s,f.state=q,f.context=T,s=I):(typeof f.componentDidUpdate!="function"||p===e.memoizedProps&&F===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&F===e.memoizedState||(t.flags|=1024),s=!1)}return f=s,Qs(e,t),s=(t.flags&128)!==0,f||s?(f=t.stateNode,l=s&&typeof l.getDerivedStateFromError!="function"?null:f.render(),t.flags|=1,e!==null&&s?(t.child=Pa(t,e.child,null,r),t.child=Pa(t,null,l,r)):Nt(e,t,l,r),t.memoizedState=f.state,e=t.child):e=_l(e,t,r),e}function t0(e,t,l,s){return Ba(),t.flags|=256,Nt(e,t,l,s),t.child}var zf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Df(e){return{baseLanes:e,cachePool:qg()}}function Lf(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=Sn),e}function n0(e,t,l){var s=t.pendingProps,r=!1,f=(t.flags&128)!==0,p;if((p=f)||(p=e!==null&&e.memoizedState===null?!1:($t.current&2)!==0),p&&(r=!0,t.flags&=-129),p=(t.flags&32)!==0,t.flags&=-33,e===null){if(Te){if(r?ta(t):na(),(e=tt)?(e=Nv(e,An),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Yl!==null?{id:el,overflow:tl}:null,retryLane:536870912,hydrationErrors:null},l=Lg(e),l.return=t,t.child=l,Tt=t,tt=null)):e=null,e===null)throw Xl(t);return Dd(e)?t.lanes=32:t.lanes=536870912,null}return f=s.children,s=s.fallback,r?(na(),r=t.mode,f=su({mode:"hidden",children:f},r),s=ka(s,r,l,null),f.return=t,s.return=t,f.sibling=s,t.child=f,s=t.child,s.memoizedState=Df(l),s.childLanes=Lf(e,p,l),t.memoizedState=zf,vo(null,s)):(ta(t),Hf(t,f))}var b=e.memoizedState;if(b!==null){var T=b.dehydrated;if(T!==null)return ib(e,t,f,p,s,T,b,l)}return r?(na(),r=s.fallback,f=t.mode,b=e.child,T=b.sibling,s=jl(b,{mode:"hidden",children:s.children}),s.subtreeFlags=b.subtreeFlags&1206910976,T!==null?r=jl(T,r):(r=ka(r,f,l,null),r.flags|=2),r.return=t,s.return=t,s.sibling=r,t.child=s,vo(null,s),s=t.child,r=e.child.memoizedState,r===null?r=Df(l):(f=r.cachePool,f!==null?(b=vt._currentValue,f=f.parent!==b?{parent:b,pool:b}:f):f=qg(),r={baseLanes:r.baseLanes|l,cachePool:f}),s.memoizedState=r,s.childLanes=Lf(e,p,l),t.memoizedState=zf,vo(e.child,s)):(ta(t),l=e.child,e=l.sibling,l=jl(l,{mode:"visible",children:s.children}),l.return=t,l.sibling=null,e!==null&&(p=t.deletions,p===null?(t.deletions=[e],t.flags|=16):p.push(e)),t.child=l,t.memoizedState=null,l)}function Hf(e,t){return t=su({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function su(e,t){return e=on(22,e,null,t),e.lanes=0,e}function iu(e,t,l){return Pa(t,e.child,null,l),e=Hf(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function ib(e,t,l,s,r,f,p,b){if(l)return t.flags&256?(ta(t),t.flags&=-257,iu(e,t,b)):t.memoizedState!==null?(na(),t.child=e.child,t.flags|=128,null):(na(),f=r.fallback,p=t.mode,r=su({mode:"visible",children:r.children},p),f=ka(f,p,b,null),f.flags|=2,r.return=t,f.return=t,r.sibling=f,t.child=r,Pa(t,e.child,null,b),r=t.child,r.memoizedState=Df(b),r.childLanes=Lf(e,s,b),t.memoizedState=zf,vo(null,r));if(ta(t),Dd(f)){if(s=f.nextSibling&&f.nextSibling.dataset,s)var T=s.dgst;return s=T,s!==""&&(r=Error(o(419)),r.stack="",r.digest=s,ao({value:r,source:null,stack:null})),iu(e,t,b)}if(xt||qa(e,t,b,!1),s=(b&e.childLanes)!==0,xt||s){if(ea.current!==null)return iu(e,t,b);if(s=et,s!==null&&(r=$m(s,b),r!==0&&r!==p.retryLane))throw p.retryLane=r,Fa(e,r),fn(s,e,r),Af;return zd(f)||Nu(),iu(e,t,b)}return zd(f)?(t.flags|=192,t.child=e.child,null):(e=p.treeContext,tt=zn(f.nextSibling),Tt=t,Te=!0,Il=null,An=!1,e!==null&&$g(t,e),t=Hf(t,r.children),t.flags|=134221824,t)}function l0(e,t,l){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),$r(e.return,t,l)}function a0(e){for(var t=null;e!==null;){var l=e.alternate;l!==null&&Ir(l)===null&&(t=e),e=e.sibling}return t}function ou(e,t,l,s,r,f){var p=e.memoizedState;p===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:l,tailMode:r,treeForkCount:f}:(p.isBackwards=t,p.rendering=null,p.renderingStartTime=0,p.last=s,p.tail=l,p.tailMode=r,p.treeForkCount=f)}function Uf(e){var t=e.child;for(e.child=null;t!==null;){var l=t.sibling;t.sibling=e.child,e.child=t,t=l}}function $f(e,t,l){var s=t.pendingProps,r=s.revealOrder,f=s.tail;s=s.children;var p=$t.current;if(t.flags&128)return ho(t,p),null;var b=(p&2)!==0;if(b?(p=p&1|2,t.flags|=128):p&=1,ho(t,p),r==="backwards"&&e!==null?(Uf(e),Nt(e,t,s,l),Uf(e)):Nt(e,t,s,l),s=Te?lo:0,!b&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&l0(e,l,t);else if(e.tag===19)l0(e,l,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}switch(r){case"backwards":l=a0(t.child),l===null?(r=t.child,t.child=null):(r=l.sibling,l.sibling=null,Uf(t)),ou(t,!0,r,null,f,s);break;case"unstable_legacy-backwards":for(l=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&Ir(e)===null){t.child=r;break}e=r.sibling,r.sibling=l,l=r,r=e}ou(t,!0,l,null,f,s);break;case"together":ou(t,!1,null,null,void 0,s);break;case"independent":t.memoizedState=null;break;default:l=a0(t.child),l===null?(r=t.child,t.child=null):(r=l.sibling,l.sibling=null),ou(t,!1,r,l,f,s)}return t.child}function s0(e,t,l){var s=t.pendingProps;return Kl(t,t.type,s.value),Nt(e,t,s.children,l),t.child}function _l(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),ia|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(qa(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,l=jl(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=jl(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function Vf(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Vr(e)))}function ob(e,t,l){switch(t.tag){case 3:$l(t,t.stateNode.containerInfo),Kl(t,vt,e.memoizedState.cache),Ba();break;case 27:case 5:Zn(t);break;case 4:$l(t,t.stateNode.containerInfo);break;case 10:Kl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,cf(t),null;break;case 13:var s=t.memoizedState;if(s!==null){if(s.dehydrated!==null)return ta(t),t.flags|=128,null;s=qa(e,t,l,!1);var r=t.child.childLanes;return s||(l&r)!==0?n0(e,t,l):(ta(t),e=_l(e,t,l),e!==null?e.sibling:null)}ta(t);break;case 19:if(t.flags&128)return $f(e,t,l);if(r=(e.flags&128)!==0,s=(l&t.childLanes)!==0,s||(qa(e,t,l,!1),s=(l&t.childLanes)!==0),r){if(s)return $f(e,t,l);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),ho(t,$t.current),s)break;return null;case 22:return t.lanes=0,Pp(e,t,l,t.pendingProps);case 24:Kl(t,vt,e.memoizedState.cache)}return _l(e,t,l)}function i0(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)xt=!0;else{if(!Vf(e,l)&&(t.flags&128)===0)return xt=!1,ob(e,t,l);xt=(e.flags&131072)!==0}else xt=!1,Te&&(t.flags&1048576)!==0&&Ug(t,lo,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=Xa(t.elementType),t.type=e,typeof e=="function")Qc(e)?(s=Ja(e,s),t.tag=1,t=e0(null,t,e,s,l)):(t.tag=0,t=Of(null,t,e,s,l));else{if(e!=null){var r=e.$$typeof;if(r===X){t.tag=11,t=Ip(null,t,e,s,l);break e}else if(r===ve){t.tag=14,t=Xp(null,t,e,s,l);break e}else if(r===ee){t.tag=10,t.type=e,t=s0(null,t,l);break e}}throw t=be(e)||e,Error(o(306,t,""))}}return t;case 0:return Of(e,t,t.type,t.pendingProps,l);case 1:return s=t.type,r=Ja(s,t.pendingProps),e0(e,t,s,r,l);case 3:e:{if($l(t,t.stateNode.containerInfo),e===null)throw Error(o(387));s=t.pendingProps;var f=t.memoizedState;r=f.element,af(e,t),fo(t,s,null,l);var p=t.memoizedState;if(s=p.cache,Kl(t,vt,s),s!==f.cache&&Jc(t,[vt],l,!0),co(),s=p.element,f.isDehydrated)if(f={element:s,isDehydrated:!1,cache:p.cache},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){t=t0(e,t,s,l);break e}else if(s!==r){r=_n(Error(o(424)),t),ao(r),t=t0(e,t,s,l);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(tt=zn(e.firstChild),Tt=t,Te=!0,Il=null,An=!0,l=Pg(t,null,s,l),t.child=l;l;)l.flags=l.flags&-3|134221824,l=l.sibling}else{if(Ba(),s===r){t=_l(e,t,l);break e}Nt(e,t,s,l)}t=t.child}return t;case 26:return Qs(e,t),e===null?(l=Av(t.type,null,t.pendingProps,null))?t.memoizedState=l:Te||(t.stateNode=cv(t.type,t.pendingProps,Pt.current,t)):t.memoizedState=Av(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Zn(t),e===null&&Te&&(s=t.stateNode=Mv(t.type,t.pendingProps,Pt.current),Tt=t,An=!0,r=tt,ca(t.type)?(Ld=r,tt=zn(s.firstChild)):tt=r),Nt(e,t,t.pendingProps.children,l),Qs(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Te&&((r=s=tt)&&(s=t2(s,t.type,t.pendingProps,An),s!==null?(t.stateNode=s,Tt=t,tt=zn(s.firstChild),An=!1,r=!0):r=!1),r||Xl(t)),Zn(t),r=t.type,f=t.pendingProps,p=e!==null?e.memoizedProps:null,s=f.children,Ed(r,f)?s=null:p!==null&&Ed(r,p)&&(t.flags|=32),t.memoizedState!==null&&(r=hf(e,t,PS,null,null,l),ui._currentValue=r),Qs(e,t),Nt(e,t,s,l),t.child;case 6:return e===null&&Te&&((e=l=tt)&&(l=n2(l,t.pendingProps,An),l!==null?(t.stateNode=l,Tt=t,tt=null,e=!0):e=!1),e||Xl(t)),null;case 13:return n0(e,t,l);case 4:return $l(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=Pa(t,null,s,l):Nt(e,t,s,l),t.child;case 11:return Ip(e,t,t.type,t.pendingProps,l);case 7:return s=t.pendingProps,Qs(e,t),Nt(e,t,s,l),t.child;case 8:return Nt(e,t,t.pendingProps.children,l),t.child;case 12:return Nt(e,t,t.pendingProps.children,l),t.child;case 10:return s0(e,t,l);case 9:return r=t.type._context,s=t.pendingProps.children,Qa(t),r=Ht(r),s=s(r),t.flags|=1,Nt(e,t,s,l),t.child;case 14:return Xp(e,t,t.type,t.pendingProps,l);case 15:return Kp(e,t,t.type,t.pendingProps,l);case 19:return $f(e,t,l);case 31:return sb(e,t,l);case 22:return Pp(e,t,l,t.pendingProps);case 24:return Qa(t),s=Ht(vt),e===null?(r=tf(),r===null&&(r=et,f=Wc(),r.pooledCache=f,f.refCount++,f!==null&&(r.pooledCacheLanes|=l),r=f),t.memoizedState={parent:s,cache:r},lf(t),Kl(t,vt,r)):((e.lanes&l)!==0&&(af(e,t),fo(t,null,null,l),co()),r=e.memoizedState,f=t.memoizedState,r.parent!==s?(r={parent:s,cache:s},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),Kl(t,vt,s)):(s=f.cache,Kl(t,vt,s),s!==r.cache&&Jc(t,[vt],l,!0))),Nt(e,t,t.pendingProps.children,l),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),s=t.pendingProps,s.name!=null&&s.name!=="auto"?t.flags|=e===null?18882560:18874368:Te&&Hr(t),e!==null&&e.memoizedProps.name!==s.name?t.flags|=4194816:Qs(e,t),Nt(e,t,s.children,l),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function Tl(e){e.flags|=4}function Ff(e,t,l,s,r){var f;if((f=(e.mode&32)!==0)&&(f=l===null?Lv(t,s):Lv(t,s)&&(s.src!==l.src||s.srcSet!==l.srcSet)),f){if(e.flags|=16777216,(r&335544128)===r)if(e.stateNode.complete)e.flags|=8192;else if(k0())e.flags|=8192;else throw Ka=Gr,nf}else e.flags&=-16777217}function o0(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Hv(t))if(k0())e.flags|=8192;else throw Ka=Gr,nf}function ru(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?qi():536870912,e.lanes|=t,Ps|=t)}function yo(e,t){if(!Te)switch(e.tailMode){case"visible":break;case"collapsed":for(var l=e.tail,s=null;l!==null;)l.alternate!==null&&(s=l),l=l.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null;break;default:for(t=e.tail,l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null}}function nt(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,s=0;if(t)for(var r=e.child;r!==null;)l|=r.lanes|r.childLanes,s|=r.subtreeFlags&1206910976,s|=r.flags&1206910976,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)l|=r.lanes|r.childLanes,s|=r.subtreeFlags,s|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=s,e.childLanes=l,t}function rb(e,t,l){var s=t.pendingProps;switch(Xc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return nt(t),null;case 1:return nt(t),null;case 3:return l=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),Cl(vt),ut(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&($s(t)?Tl(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Pc())),nt(t),null;case 26:var r=t.type,f=t.memoizedState;return e===null?(Tl(t),f!==null?(nt(t),o0(t,f)):(nt(t),Ff(t,r,null,s,l))):f?f!==e.memoizedState?(Tl(t),nt(t),o0(t,f)):(nt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&Tl(t),nt(t),Ff(t,r,e,s,l)),null;case 27:if(Ot(t),l=Pt.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Tl(t);else{if(!s){if(t.stateNode===null)throw Error(o(166));return nt(t),t.subtreeFlags&=-33554433,null}e=Mt.current,$s(t)?Vg(t):(e=Mv(r,s,l),t.stateNode=e,Tl(t))}return nt(t),t.subtreeFlags&=-33554433,null;case 5:if(Ot(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Tl(t);else{if(!s){if(t.stateNode===null)throw Error(o(166));return nt(t),t.subtreeFlags&=-33554433,null}if(f=Mt.current,$s(t))Vg(t);else{var p=To(Pt.current);switch(f){case 1:f=p.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:f=p.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":f=p.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":f=p.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":f=p.createElement("div"),f.innerHTML="<script><\/script>",f=f.removeChild(f.firstChild);break;case"select":f=typeof s.is=="string"?p.createElement("select",{is:s.is}):p.createElement("select"),s.multiple?f.multiple=!0:s.size&&(f.size=s.size);break;default:f=typeof s.is=="string"?p.createElement(r,{is:s.is}):p.createElement(r)}}f[Lt]=t,f[sn]=s;e:for(p=t.child;p!==null;){if(p.tag===5||p.tag===6)f.appendChild(p.stateNode);else if(p.tag!==4&&p.tag!==27&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===t)break e;for(;p.sibling===null;){if(p.return===null||p.return===t)break e;p=p.return}p.sibling.return=p.return,p=p.sibling}t.stateNode=f;e:switch(Ft(f,r,s),r){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&Tl(t)}}return nt(t),t.subtreeFlags&=-33554433,Ff(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&Tl(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(o(166));if(e=Pt.current,$s(t)){if(e=t.stateNode,l=t.memoizedProps,s=null,r=Tt,r!==null)switch(r.tag){case 27:case 5:s=r.memoizedProps}e[Lt]=t,e=!!(e.nodeValue===l||s!==null&&s.suppressHydrationWarning===!0||iv(e.nodeValue,l)),e||Xl(t,!0)}else e=To(e).createTextNode(s),e[Lt]=t,t.stateNode=e}return nt(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(s=$s(t),l!==null){if(e===null){if(!s)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[Lt]=t}else Ba(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;nt(t),e=!1}else l=Pc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(vn(t),t):(vn(t),null);if((t.flags&128)!==0)throw Error(o(558))}return nt(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=$s(t),s!==null&&s.dehydrated!==null){if(e===null){if(!r)throw Error(o(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(o(317));r[Lt]=t}else Ba(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;nt(t),r=!1}else r=Pc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(vn(t),t):(vn(t),null)}return vn(t),(t.flags&128)!==0?(t.lanes=l,t):(l=s!==null,e=e!==null&&e.memoizedState!==null,l&&(s=t.child,r=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(r=s.alternate.memoizedState.cachePool.pool),f=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(f=s.memoizedState.cachePool.pool),f!==r&&(s.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),ru(t,t.updateQueue),nt(t),null);case 4:return ut(),e===null&&bd(t.stateNode.containerInfo),t.flags|=67108864,nt(t),null;case 10:return Cl(t.type),nt(t),null;case 19:if(ff(t),s=t.memoizedState,s===null)return nt(t),null;if(r=(t.flags&128)!==0,f=s.rendering,f===null)if(r)yo(s,!1);else{if(ht!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(f=Ir(e),f!==null){for(t.flags|=128,yo(s,!1),e=f.updateQueue,t.updateQueue=e,ru(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)Dg(l,e),l=l.sibling;return ho(t,$t.current&1|2),Te&&wl(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&We()>Su&&(t.flags|=128,r=!0,yo(s,!1),t.lanes=4194304)}else{if(!r)if(e=Ir(f),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,ru(t,e),yo(s,!0),s.tail===null&&s.tailMode!=="collapsed"&&s.tailMode!=="visible"&&!f.alternate&&!Te)return nt(t),null}else 2*We()-s.renderingStartTime>Su&&l!==536870912&&(t.flags|=128,r=!0,yo(s,!1),t.lanes=4194304);s.isBackwards?(f.sibling=t.child,t.child=f):(e=s.last,e!==null?e.sibling=f:t.child=f,s.last=f)}if(s.tail!==null){e=s.tail;e:{for(l=e;l!==null;){if(l.alternate!==null){l=!1;break e}l=l.sibling}l=!0}return s.rendering=e,s.tail=e.sibling,s.renderingStartTime=We(),e.sibling=null,f=$t.current,f=r?f&1|2:f&1,s.tailMode==="visible"||s.tailMode==="collapsed"||!l||Te?ho(t,f):(l=f,Ie(Ut,t),Ie($t,l),It===null&&(It=t)),Te&&wl(t,s.treeForkCount),e}return nt(t),null;case 22:case 23:return vn(t),uf(),s=t.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(t.flags|=8192):s&&(t.flags|=8192),s?(l&536870912)!==0&&(t.flags&128)===0&&(nt(t),t.subtreeFlags&6&&(t.flags|=8192)):nt(t),l=t.updateQueue,l!==null&&ru(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),s=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),s!==l&&(t.flags|=2048),e!==null&&mt(Ia),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Cl(vt),nt(t),null;case 25:return null;case 30:return t.flags|=33554432,nt(t),null}throw Error(o(156,t.tag))}function ub(e,t){switch(Xc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Cl(vt),ut(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ot(t),null;case 31:if(t.memoizedState!==null){if(vn(t),t.alternate===null)throw Error(o(340));Ba()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(vn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Ba()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ff(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return ut(),null;case 10:return Cl(t.type),null;case 22:case 23:return vn(t),uf(),e!==null&&mt(Ia),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Cl(vt),null;case 25:return null;default:return null}}function r0(e,t){switch(Xc(t),t.tag){case 3:Cl(vt),ut();break;case 26:case 27:case 5:Ot(t);break;case 4:ut();break;case 31:t.memoizedState!==null&&vn(t);break;case 13:vn(t);break;case 19:ff(t);break;case 10:Cl(t.type);break;case 22:case 23:vn(t),uf(),e!==null&&mt(Ia);break;case 24:Cl(vt)}}function xo(e,t){try{var l=t.updateQueue,s=l!==null?l.lastEffect:null;if(s!==null){var r=s.next;l=r;do{if((l.tag&e)===e){s=void 0;var f=l.create,p=l.inst;s=f(),p.destroy=s}l=l.next}while(l!==r)}}catch(b){Pe(t,t.return,b)}}function la(e,t,l){try{var s=t.updateQueue,r=s!==null?s.lastEffect:null;if(r!==null){var f=r.next;s=f;do{if((s.tag&e)===e){var p=s.inst,b=p.destroy;if(b!==void 0){p.destroy=void 0,r=t;var T=l,B=b;try{B()}catch(I){Pe(r,T,I)}}}s=s.next}while(s!==f)}}catch(I){Pe(t,t.return,I)}}function u0(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{Jg(t,l)}catch(s){Pe(e,e.return,s)}}}function c0(e,t,l){l.props=Ja(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(s){Pe(e,t,s)}}function nl(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:var r=e.stateNode,f=Sl(e.memoizedProps,r);(r.ref===null||r.ref.name!==f)&&(r.ref=vv(f)),s=r.ref;break;case 7:if(e.stateNode===null){var p=new jn(e);v(e.child,!1,Wb,p,void 0,void 0),e.stateNode=p}s=e.stateNode;break;default:s=e.stateNode}typeof l=="function"?e.refCleanup=l(s):l.current=s}}catch(b){Pe(e,t,b)}}function Vt(e,t){var l=e.ref,s=e.refCleanup;if(l!==null)if(typeof s=="function")try{s()}catch(r){Pe(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(r){Pe(e,t,r)}else l.current=null}function uu(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var l=0;l<t.length;l++)wv(e.stateNode,t[l])}function f0(e){for(var t=e.return;t!==null&&(Bf(t)&&wv(e.stateNode,t.stateNode),!kf(t));)t=t.return}function So(e){for(var t=e.return;t!==null&&(Bf(t)&&e2(e.stateNode,t.stateNode),!kf(t));)t=t.return}function kf(e){return e.tag===5||e.tag===3||e.tag===27}function Bf(e){return e&&e.tag===7&&e.stateNode!==null}function Gf(e){var t=e.type,l=e.memoizedProps,s=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&s.focus();break e;case"img":l.src?s.src=l.src:l.srcSet&&(s.srcset=l.srcSet)}}catch(r){Pe(e,e.return,r)}}function qf(e,t,l){try{var s=e.stateNode;Lb(s,e.type,l,t),s[sn]=t}catch(r){Pe(e,e.return,r)}}function d0(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ca(e.type)||e.tag===4}function Qf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||d0(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.tag===27&&ca(e.type)||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 Yf(e,t,l,s){var r=e.tag;if(r===5||r===6)r=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(r,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(r),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=Wn)),uu(e,s),Be=!0;else if(r!==4&&(r===27&&(uu(e,s),s=null,ca(e.type)&&(l=e.stateNode,t=null)),e=e.child,e!==null))for(Yf(e,t,l,s),e=e.sibling;e!==null;)Yf(e,t,l,s),e=e.sibling}function cu(e,t,l,s){var r=e.tag;if(r===5||r===6)r=e.stateNode,t?l.insertBefore(r,t):l.appendChild(r),uu(e,s),Be=!0;else if(r!==4&&(r===27&&(uu(e,s),s=null,ca(e.type)&&(l=e.stateNode)),e=e.child,e!==null))for(cu(e,t,l,s),e=e.sibling;e!==null;)cu(e,t,l,s),e=e.sibling}function h0(e){var t=e.stateNode,l=e.memoizedProps;try{for(var s=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);Ft(t,s,l),t[Lt]=e,t[sn]=l}catch(f){Pe(e,e.return,f)}}var fu=!1,yn=null;function m0(e){(e.tag===30||(e.subtreeFlags&33554432)!==0)&&(fu=!0)}var ll=null;function g0(){var e=ll;return ll=null,e}var rn=0;function Ys(e,t,l,s,r){return rn=0,p0(e.child,t,l,s,r)}function p0(e,t,l,s,r){for(var f=!1;e!==null;){if(e.tag===5){var p=e.stateNode;if(s!==null){var b=Td(p);s.push(b),b.view&&(f=!0)}else f||Td(p).view&&(f=!0);fu=!0,gv(p,rn===0?t:t+"_"+rn,l),rn++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&r||p0(e.child,t,l,s,r)&&(f=!0));e=e.sibling}return f}function al(e,t){for(;e!==null;)e.tag===5?pv(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||al(e.child,t)),e=e.sibling}function du(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(du(e),e.tag===30&&(e.flags&18874368)!==0&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name==="auto")throw Error(o(544));var l=t.name;t=bl(t.default,t.share),t!=="none"&&(Ys(e,l,t,null,!1)||al(e.child,!1))}e=e.sibling}}function If(e,t){if(e.tag===30){var l=e.stateNode,s=e.memoizedProps,r=Sl(s,l),f=bl(s.default,l.paired?s.share:s.enter);f!=="none"?Ys(e,r,f,null,!1)?(du(e),l.paired||t||ei(e,s.onEnter)):al(e.child,!1):du(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)If(e,t),e=e.sibling;else du(e)}function Xf(e){if(yn!==null&&yn.size!==0){var t=yn;if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var l=e.memoizedProps,s=l.name;if(s!=null&&s!=="auto"){var r=t.get(s);if(r!==void 0){var f=bl(l.default,l.share);if(f!=="none"&&(Ys(e,s,f,null,!1)?(f=e.stateNode,r.paired=f,f.paired=r,ei(e,l.onShare)):al(e.child,!1)),t.delete(s),t.size===0)break}}}Xf(e)}e=e.sibling}}}function Kf(e){if(e.tag===30){var t=e.memoizedProps,l=Sl(t,e.stateNode),s=yn!==null?yn.get(l):void 0,r=bl(t.default,s!==void 0?t.share:t.exit);r!=="none"&&(Ys(e,l,r,null,!1)?s!==void 0?(r=e.stateNode,s.paired=r,r.paired=s,yn.delete(l),ei(e,t.onShare)):ei(e,t.onExit):al(e.child,!1)),yn!==null&&Xf(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)Kf(e),e=e.sibling;else yn!==null&&Xf(e)}function v0(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,l=Sl(t,e.stateNode);t=bl(t.default,t.update),e.flags&=-5,t!=="none"&&Ys(e,l,t,e.memoizedState=[],!1)}else(e.subtreeFlags&33554432)!==0&&v0(e);e=e.sibling}}function Pf(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var t=e.stateNode;t.paired!==null&&(t.paired=null,al(e.child,!1))}Pf(e)}e=e.sibling}}function hu(e){if(e.tag===30)e.stateNode.paired=null,al(e.child,!1),Pf(e);else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)hu(e),e=e.sibling;else Pf(e)}function y0(e){for(e=e.child;e!==null;)e.tag===30?al(e.child,!1):(e.subtreeFlags&33554432)!==0&&y0(e),e=e.sibling}function Zf(e,t,l,s,r,f,p){for(var b=!1;t!==null;){if(t.tag===5){var T=t.stateNode;if(f!==null&&rn<f.length){var B=f[rn],I=Td(T);(B.view||I.view)&&(b=!0);var Z;if(Z=(e.flags&4)===0)if(I.clip)Z=!0;else{Z=B.rect;var F=I.rect;Z=Z.y!==F.y||Z.x!==F.x||Z.height!==F.height||Z.width!==F.width}Z&&(e.flags|=4),I.abs?I=!B.abs:(B=B.rect,I=I.rect,I=B.height!==I.height||B.width!==I.width),I&&(e.flags|=32)}else e.flags|=32;(e.flags&4)!==0&&gv(T,rn===0?l:l+"_"+rn,r),b&&(e.flags&4)!==0||(ll===null&&(ll=[]),ll.push(T,rn===0?s:s+"_"+rn,t.memoizedProps)),rn++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&p?e.flags|=t.flags&32:Zf(e,t.child,l,s,r,f,p)&&(b=!0));t=t.sibling}return b}function x0(e,t){for(e=e.child;e!==null;){if(e.tag===30){var l=e.memoizedProps,s=e.stateNode,r=Sl(l,s),f=bl(l.default,l.update),p;p=e.memoizedState,e.memoizedState=null,s=e;var b=e.child;rn=0,r=Zf(s,b,r,r,f,p,!1),(e.flags&4)!==0&&r&&ei(e,l.onUpdate)}else(e.subtreeFlags&33554432)!==0&&x0(e);e=e.sibling}}var Rt=!1,Xe=!1,sl=!1,Jf=!1,S0=typeof WeakSet=="function"?WeakSet:Set,At=null,il=!1,bo=!1,mu=!1,Wf=!1;function cb(e,t,l){if(e=e.containerInfo,Nd=ci,e=Ng(e),$c(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var r=s.getSelection&&s.getSelection();if(r&&r.rangeCount!==0){s=r.anchorNode;var f=r.anchorOffset,p=r.focusNode;r=r.focusOffset;try{s.nodeType,p.nodeType}catch{s=null;break e}var b=0,T=-1,B=-1,I=0,Z=0,F=e,q=null;t:for(;;){for(var ie;F!==s||f!==0&&F.nodeType!==3||(T=b+f),F!==p||r!==0&&F.nodeType!==3||(B=b+r),F.nodeType===3&&(b+=F.nodeValue.length),(ie=F.firstChild)!==null;)q=F,F=ie;for(;;){if(F===e)break t;if(q===s&&++I===f&&(T=b),q===p&&++Z===r&&(B=b),(ie=F.nextSibling)!==null)break;F=q,q=F.parentNode}F=ie}s=T===-1||B===-1?null:{start:T,end:B}}else s=null}s=s||{start:0,end:0}}else s=null;for(Cd={focusedElem:e,selectionRange:s},ci=!1,l=(l&335544064)===l,At=t,t=l?9270:1024;At!==null;){if(e=At,l&&(s=e.deletions,s!==null))for(f=0;f<s.length;f++)l&&Kf(s[f]);if(e.alternate===null&&(e.flags&2)!==0)l&&m0(e),gu(l);else{if(e.tag===22){if(s=e.alternate,e.memoizedState!==null){s!==null&&s.memoizedState===null&&l&&Kf(s),gu(l);continue}else if(s!==null&&s.memoizedState!==null){l&&m0(e),gu(l);continue}}s=e.child,(e.subtreeFlags&t)!==0&&s!==null?(s.return=e,At=s):(l&&v0(e),gu(l))}}yn=null}function gu(e){for(;At!==null;){var t=At,l=e,s=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if((r&1024)!==0&&s!==null){l=void 0,r=s.memoizedProps,s=s.memoizedState;var f=t.stateNode;try{var p=Ja(t.type,r);l=f.getSnapshotBeforeUpdate(p,s),f.__reactInternalSnapshotBeforeUpdate=l}catch(b){Pe(t,t.return,b)}}break;case 3:if((r&1024)!==0){if(s=t.stateNode.containerInfo,l=s.nodeType,l===9)Od(s);else if(l===1)switch(s.nodeName){case"HEAD":case"HTML":case"BODY":Od(s);break;default:s.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:l&&s!==null&&(l=Sl(s.memoizedProps,s.stateNode),r=t.memoizedProps,r=bl(r.default,r.update),r!=="none"&&Ys(s,l,r,s.memoizedState=[],!0));break;default:if((r&1024)!==0)throw Error(o(163))}if(s=t.sibling,s!==null){s.return=t.return,At=s;break}At=t.return}}function b0(e,t,l){var s=l.flags;switch(l.tag){case 0:case 11:case 15:ol(e,l),s&4&&xo(5,l);break;case 1:if(ol(e,l),s&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(p){Pe(l,l.return,p)}else{var r=Ja(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(p){Pe(l,l.return,p)}}s&64&&u0(l),s&512&&nl(l,l.return);break;case 3:if(ol(e,l),s&64&&(e=l.updateQueue,e!==null)){if(t=null,l.child!==null)switch(l.child.tag){case 27:case 5:t=l.child.stateNode;break;case 1:t=l.child.stateNode}try{Jg(e,t)}catch(p){Pe(l,l.return,p)}}break;case 27:t===null&&s&4&&h0(l);case 26:case 5:ol(e,l),t===null&&s&4&&Gf(l),s&512&&nl(l,l.return);break;case 12:ol(e,l);break;case 31:ol(e,l),s&4&&C0(e,l);break;case 13:ol(e,l),s&4&&E0(e,l),s&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=jb.bind(null,l),l2(e,l))));break;case 22:if(s=l.memoizedState!==null||Rt,!s){var f=t!==null&&t.memoizedState!==null||Xe;t=Rt,r=Xe,Rt=s,(Xe=f)&&!r?(s=2,(l.subtreeFlags&8772)!==0&&(s|=1),Gn(e,l,s)):ol(e,l),Rt=t,Xe=r}break;case 30:ol(e,l),s&512&&nl(l,l.return);break;case 7:s&512&&nl(l,l.return);default:ol(e,l)}}function ed(e,t){for(e=e.child;e!==null;)j0(e,t),e=e.sibling}function j0(e,t){switch(e.tag){case 5:case 26:try{var l=e.stateNode;if(t){var s=l.style;typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"}else{var r=e.stateNode,f=e.memoizedProps.style,p=f!=null&&f.hasOwnProperty("display")?f.display:null;r.style.display=p==null||typeof p=="boolean"?"":(""+p).trim()}}catch(T){Pe(e,e.return,T)}td(e,t);break;case 6:try{e.stateNode.nodeValue=t?"":e.memoizedProps,Be=!0}catch(T){Pe(e,e.return,T)}break;case 18:try{var b=e.stateNode;t?mv(b,!0):mv(e.stateNode,!1)}catch(T){Pe(e,e.return,T)}break;case 22:case 23:e.memoizedState===null&&ed(e,t);break;default:ed(e,t)}}function td(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){e:{var l=e,s=t;switch(l.tag){case 4:j0(l,s);break e;case 22:l.memoizedState===null&&td(l,s);break e;default:td(l,s)}}e=e.sibling}}function w0(e){var t=e.alternate;t!==null&&(e.alternate=null,w0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Sr(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var it=null,un=!1;function kn(e,t,l){for(l=l.child;l!==null;)N0(e,t,l),l=l.sibling}function N0(e,t,l){if(Qt&&typeof Qt.onCommitFiberUnmount=="function")try{Qt.onCommitFiberUnmount(Fl,l)}catch{}switch(l.tag){case 26:Xe||Vt(l,t),kn(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&!Xe&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Xe||Vt(l,t),So(l);var s=it,r=un;ca(l.type)&&(it=l.stateNode,un=!1),kn(e,t,l),_v(l.stateNode,l.type,l.memoizedProps),it=s,un=r;break;case 5:Xe||Vt(l,t),So(l);case 6:if(l.tag===6&&So(l),s=it,r=un,it=null,kn(e,t,l),it=s,un=r,it!==null)if(un)try{(it.nodeType===9?it.body:it.nodeName==="HTML"?it.ownerDocument.body:it).removeChild(l.stateNode),Be=!0}catch(f){Pe(l,t,f)}else try{it.removeChild(l.stateNode),Be=!0}catch(f){Pe(l,t,f)}break;case 18:it!==null&&(un?(e=it,hv(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),fi(e)):hv(it,l.stateNode));break;case 4:s=it,r=un,it=l.stateNode.containerInfo,un=!0,kn(e,t,l),it=s,un=r;break;case 0:case 11:case 14:case 15:la(2,l,t),Xe||la(4,l,t),kn(e,t,l);break;case 1:Xe||(Vt(l,t),s=l.stateNode,typeof s.componentWillUnmount=="function"&&c0(l,t,s)),kn(e,t,l);break;case 21:kn(e,t,l);break;case 22:Xe=(s=Xe)||l.memoizedState!==null,kn(e,t,l),Xe=s;break;case 30:Vt(l,t),kn(e,t,l);break;case 7:Xe||Vt(l,t),kn(e,t,l);break;default:kn(e,t,l)}}function C0(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{fi(e)}catch(l){Pe(t,t.return,l)}}}function E0(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{fi(e)}catch(l){Pe(t,t.return,l)}}function fb(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new S0),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new S0),t;default:throw Error(o(435,e.tag))}}function pu(e,t){var l=fb(e);t.forEach(function(s){if(!l.has(s)){l.add(s);var r=wb.bind(null,e,s);s.then(r,r)}})}function Wt(e,t,l){var s=t.deletions;if(s!==null)for(var r=0;r<s.length;r++){var f=s[r],p=e,b=t,T=b;e:for(;T!==null;){switch(T.tag){case 27:if(ca(T.type)){it=T.stateNode,un=!1;break e}break;case 5:it=T.stateNode,un=!1;break e;case 3:case 4:it=T.stateNode.containerInfo,un=!0;break e}T=T.return}if(it===null)throw Error(o(160));N0(p,b,f),it=null,un=!1,p=f.alternate,p!==null&&(p.return=null),f.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)M0(t,e,l),t=t.sibling}var Bn=null;function M0(e,t,l){var s=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(r&4&&(s=e.updateQueue,s=s!==null?s.events:null,s!==null))for(var f=0;f<s.length;f++){var p=s[f];p.ref.impl=p.nextImpl}Wt(t,e,l),en(e),r&4&&(la(3,e,e.return),xo(3,e),la(5,e,e.return));break;case 1:Wt(t,e,l),en(e),r&512&&(Xe||s===null||Vt(s,s.return)),r&64&&Rt&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?t:l.concat(t))));break;case 26:if(f=Bn,Wt(t,e,l),en(e),r&512&&(Xe||s===null||Vt(s,s.return)),r&4)if(r=s!==null?s.memoizedState:null,l=e.memoizedState,s===null)if(l===null)if(e.stateNode===null)if(Rt)e.stateNode=cv(e.type,e.memoizedProps,t.containerInfo,e);else{e:{t=e.type,l=e.memoizedProps,r=f.ownerDocument||f;t:switch(t){case"title":s=r.getElementsByTagName("title")[0],(!s||s[Yi]||s[Lt]||s.namespaceURI==="http://www.w3.org/2000/svg"||s.hasAttribute("itemprop"))&&(s=r.createElement(t),r.head.insertBefore(s,r.querySelector("head > title"))),Ft(s,t,l),s[Lt]=e,_t(s),t=s;break e;case"link":if(f=Dv("link","href",r).get(t+(l.href||""))){for(p=0;p<f.length;p++)if(s=f[p],s.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&s.getAttribute("rel")===(l.rel==null?null:l.rel)&&s.getAttribute("title")===(l.title==null?null:l.title)&&s.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){f.splice(p,1);break t}}s=r.createElement(t),Ft(s,t,l),r.head.appendChild(s);break;case"meta":if(f=Dv("meta","content",r).get(t+(l.content||""))){for(p=0;p<f.length;p++)if(s=f[p],s.getAttribute("content")===(l.content==null?null:""+l.content)&&s.getAttribute("name")===(l.name==null?null:l.name)&&s.getAttribute("property")===(l.property==null?null:l.property)&&s.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&s.getAttribute("charset")===(l.charSet==null?null:l.charSet)){f.splice(p,1);break t}}s=r.createElement(t),Ft(s,t,l),r.head.appendChild(s);break;default:throw Error(o(468,t))}s[Lt]=e,_t(s),t=s}e.stateNode=t}else Rt||Vd(f,e.type,e.stateNode);else e.stateNode=zv(f,l,e.memoizedProps);else r!==l?(r===null?(t=s.stateNode,t===null||Xe||t.parentNode.removeChild(t)):r.count--,l===null?Rt||Vd(f,e.type,e.stateNode):zv(f,l,e.memoizedProps)):l===null&&e.stateNode!==null&&qf(e,e.memoizedProps,s.memoizedProps);break;case 27:Wt(t,e,l),en(e),r&512&&(Xe||s===null||Vt(s,s.return)),s!==null&&r&4&&qf(e,e.memoizedProps,s.memoizedProps);break;case 5:if(f=sl,sl=!1,Wt(t,e,l),sl=f,en(e),r&512&&(Xe||s===null||Vt(s,s.return)),e.flags&32){t=e.stateNode;try{_s(t,""),Be=!0}catch(I){Pe(e,e.return,I)}}r&4&&e.stateNode!=null&&(t=e.memoizedProps,qf(e,t,s!==null?s.memoizedProps:t)),r&1024&&(Jf=!0);break;case 6:if(Wt(t,e,l),en(e),r&4){if(e.stateNode===null)throw Error(o(162));t=e.memoizedProps,l=e.stateNode;try{l.nodeValue=t,Be=!0}catch(I){Pe(e,e.return,I)}}break;case 3:if(Be=!1,Au=null,f=Bn,Bn=Ro(t.containerInfo),Wt(t,e,l),Bn=f,en(e),r&4&&s!==null&&s.memoizedState.isDehydrated)try{fi(t.containerInfo)}catch(I){Pe(e,e.return,I)}Jf&&(Jf=!1,_0(e)),Be=!1;break;case 4:r=sl,sl=Rt,s=Xm(),f=Bn,Bn=Ro(e.stateNode.containerInfo),Wt(t,e,l),en(e),Bn=f,Be&&bo&&(mu=!0),Be=s,sl=r;break;case 12:Wt(t,e,l),en(e);break;case 31:Wt(t,e,l),en(e),r&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,pu(e,t)));break;case 13:Wt(t,e,l),en(e),e.child.flags&8192&&e.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(xu=We()),r&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,pu(e,t)));break;case 22:f=e.memoizedState!==null,p=s!==null&&s.memoizedState!==null;var b=Rt,T=Xe,B=sl;Rt=b||f,sl=B||f,Xe=T||p,Wt(t,e,l),Xe=T,sl=B,Rt=b,en(e),r&8192&&(t=e.stateNode,t._visibility=f?t._visibility&-2:t._visibility|1,!f||s===null||p||Rt||Xe||(t=p||Xe,l=Rt,s=Xe,Rt=f||Rt,Xe=t,aa(e,2),Rt=l,Xe=s),!f&&sl||ed(e,f)),r&4&&(t=e.updateQueue,t!==null&&(l=t.retryQueue,l!==null&&(t.retryQueue=null,pu(e,l))));break;case 19:Wt(t,e,l),en(e),r&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,pu(e,t)));break;case 30:r&512&&(Xe||s===null||Vt(s,s.return)),r=Xm(),f=bo,p=(l&335544064)===l,b=e.memoizedProps,bo=p&&bl(b.default,b.update)!=="none",Wt(t,e,l),en(e),p&&s!==null&&Be&&(e.flags|=4),bo=f,Be=r;break;case 21:break;case 7:r&512&&(Xe||s===null||Vt(s,s.return)),s&&s.stateNode!==null&&(s.stateNode._fragmentFiber=e);default:Wt(t,e,l),en(e)}}function en(e){var t=e.flags;if(t&2){try{for(var l,s=e.return;s!==null;){if(d0(s)){l=s;break}s=s.return}s=null;for(var r=e.return;r!==null;){if(Bf(r)){var f=r.stateNode;s===null?s=[f]:s.push(f)}if(kf(r))break;r=r.return}var p=s;if(l==null)throw Error(o(160));switch(l.tag){case 27:var b=l.stateNode,T=Qf(e);cu(e,T,b,p);break;case 5:var B=l.stateNode;l.flags&32&&(_s(B,""),l.flags&=-33);var I=Qf(e);cu(e,I,B,p);break;case 3:case 4:var Z=l.stateNode.containerInfo,F=Qf(e);Yf(e,F,Z,p);break;default:throw Error(o(161))}}catch(q){Pe(e,e.return,q)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function _0(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;_0(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,ci=!0,t.reset(),ci=!1),e=e.sibling}}function Is(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)T0(t,e),t=t.sibling;else x0(t)}function T0(e,t){var l=e.alternate;if(l===null)If(e,!1);else switch(e.tag){case 3:if(Wf=il=!1,g0(),Is(t,e),!il&&!mu){if(e=ll,e!==null)for(var s=0;s<e.length;s+=3){l=e[s];var r=e[s+1];pv(l,e[s+2]),l=l.ownerDocument.documentElement,l!==null&&l.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+r+")"})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===""&&(e.style.viewTransitionName="none",e.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),Wf=!0}ll=null;break;case 5:Is(t,e);break;case 4:s=il,il=!1,Is(t,e),il&&(mu=!0),il=s;break;case 22:e.memoizedState===null&&(l.memoizedState!==null?If(e,!1):Is(t,e));break;case 30:s=il,r=g0(),il=!1,Is(t,e),il&&(e.flags|=4);var f=e.memoizedProps,p=e.stateNode;t=Sl(f,p),p=Sl(l.memoizedProps,p);var b=bl(f.default,f.update);b==="none"?t=!1:(f=l.memoizedState,l.memoizedState=null,l=e.child,rn=0,t=Zf(e,l,t,p,b,f,!0),rn!==(f===null?0:f.length)&&(e.flags|=32)),(e.flags&4)!==0&&t?(ei(e,e.memoizedProps.onUpdate),ll=r):r!==null&&(r.push.apply(r,ll),ll=r),il=(e.flags&32)!==0?!0:s;break;default:Is(t,e)}}function ol(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)b0(e,t.alternate,t),t=t.sibling}function aa(e,t){for(e=e.child;e!==null;){var l=e,s=t;switch(l.tag){case 0:case 11:case 14:case 15:la(4,l,l.return),aa(l,s);break;case 1:Vt(l,l.return);var r=l.stateNode;typeof r.componentWillUnmount=="function"&&c0(l,l.return,r),aa(l,s);break;case 27:(s&2)!==0&&_v(l.stateNode,l.type,l.memoizedProps);case 5:Vt(l,l.return),l.tag!==5&&l.tag!==27||So(l),aa(l,s);break;case 6:So(l);break;case 26:Vt(l,l.return),r=l.stateNode,l.memoizedState!==null||r===null||Xe||r.parentNode.removeChild(r),aa(l,s);break;case 22:l.memoizedState===null&&aa(l,s);break;case 30:Vt(l,l.return),aa(l,s);break;case 7:Vt(l,l.return);default:aa(l,s)}e=e.sibling}}function Gn(e,t,l){for(l=(t.subtreeFlags&8772)!==0?l:l&-2,t=t.child;t!==null;){var s=t.alternate,r=e,f=t,p=f.flags,b=(l&1)!==0;switch(f.tag){case 0:case 11:case 15:Gn(r,f,l),xo(4,f);break;case 1:if(Gn(r,f,l),s=f,r=s.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(I){Pe(s,s.return,I)}if(s=f,r=s.updateQueue,r!==null){var T=s.stateNode;try{var B=r.shared.hiddenCallbacks;if(B!==null)for(r.shared.hiddenCallbacks=null,r=0;r<B.length;r++)Zg(B[r],T)}catch(I){Pe(s,s.return,I)}}b&&p&64&&u0(f),nl(f,f.return);break;case 27:(l&2)!==0&&h0(f);case 5:f.tag!==5&&f.tag!==27||f0(f),Gn(r,f,l),b&&s===null&&p&4&&Gf(f),nl(f,f.return);break;case 6:f0(f);break;case 26:T=f.stateNode,f.memoizedState!==null||T===null||Rt||Vd(Ro(T.ownerDocument),f.type,T),Gn(r,f,l),b&&s===null&&p&4&&Gf(f),nl(f,f.return);break;case 12:Gn(r,f,l);break;case 31:Gn(r,f,l),b&&p&4&&C0(r,f);break;case 13:Gn(r,f,l),b&&p&4&&E0(r,f);break;case 22:f.memoizedState===null&&Gn(r,f,l),nl(f,f.return);break;case 30:Gn(r,f,l),nl(f,f.return);break;case 7:nl(f,f.return);default:Gn(r,f,l)}t=t.sibling}}function nd(e,t){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&so(l))}function ld(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&so(e))}function On(e,t,l,s){var r=(l&335544064)===l;if(t.subtreeFlags&(r?10262:10256))for(t=t.child;t!==null;)R0(e,t,l,s),t=t.sibling;else r&&y0(t)}function R0(e,t,l,s){var r=(l&335544064)===l;r&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&hu(t);var f=t.flags;switch(t.tag){case 0:case 11:case 15:On(e,t,l,s),f&2048&&xo(9,t);break;case 1:On(e,t,l,s);break;case 3:On(e,t,l,s),r&&Wf&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,e.style.viewTransitionName==="root"&&(e.style.viewTransitionName=""),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName==="none"&&(e.style.viewTransitionName="")),f&2048&&(f=null,t.alternate!==null&&(f=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==f&&(t.refCount++,f!=null&&so(f)));break;case 12:if(f&2048){On(e,t,l,s),f=t.stateNode;try{var p=t.memoizedProps,b=p.id,T=p.onPostCommit;typeof T=="function"&&T(b,t.alternate===null?"mount":"update",f.passiveEffectDuration,-0)}catch(B){Pe(t,t.return,B)}}else On(e,t,l,s);break;case 31:On(e,t,l,s);break;case 13:On(e,t,l,s);break;case 23:break;case 22:p=t.stateNode,b=t.alternate,t.memoizedState!==null?(r&&b!==null&&b.memoizedState===null&&hu(b),p._visibility&2?On(e,t,l,s):jo(e,t)):(r&&b!==null&&b.memoizedState!==null&&hu(t),p._visibility&2?On(e,t,l,s):(p._visibility|=2,Xs(e,t,l,s,(t.subtreeFlags&10256)!==0||!1))),f&2048&&nd(b,t);break;case 24:On(e,t,l,s),f&2048&&ld(t.alternate,t);break;case 30:r&&(f=t.alternate,f!==null&&(al(f.child,!0),al(t.child,!0))),On(e,t,l,s);break;default:On(e,t,l,s)}}function Xs(e,t,l,s,r){for(r=r&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var f=e,p=t,b=l,T=s,B=p.flags;switch(p.tag){case 0:case 11:case 15:Xs(f,p,b,T,r),xo(8,p);break;case 23:break;case 22:var I=p.stateNode;p.memoizedState!==null?I._visibility&2?Xs(f,p,b,T,r):jo(f,p):(I._visibility|=2,Xs(f,p,b,T,r)),r&&B&2048&&nd(p.alternate,p);break;case 24:Xs(f,p,b,T,r),r&&B&2048&&ld(p.alternate,p);break;default:Xs(f,p,b,T,r)}t=t.sibling}}function jo(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,s=t,r=s.flags;switch(s.tag){case 22:jo(l,s),r&2048&&nd(s.alternate,s);break;case 24:jo(l,s),r&2048&&ld(s.alternate,s);break;default:jo(l,s)}t=t.sibling}}var Wa=8192;function es(e,t,l){if(e.subtreeFlags&Wa)for(e=e.child;e!==null;)A0(e,t,l),e=e.sibling}function A0(e,t,l){switch(e.tag){case 26:es(e,t,l),e.flags&Wa&&(e.memoizedState!==null?v2(l,Bn,e.memoizedState,e.memoizedProps):(e=e.stateNode,(t&335544128)===t&&$v(l,e)));break;case 5:es(e,t,l),e.flags&Wa&&(e=e.stateNode,(t&335544128)===t&&$v(l,e));break;case 3:case 4:var s=Bn;Bn=Ro(e.stateNode.containerInfo),es(e,t,l),Bn=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=Wa,Wa=16777216,es(e,t,l),Wa=s):es(e,t,l));break;case 30:if((e.flags&Wa)!==0&&(s=e.memoizedProps.name,s!=null&&s!=="auto")){var r=e.stateNode;r.paired=null,yn===null&&(yn=new Map),yn.set(s,r)}es(e,t,l);break;default:es(e,t,l)}}function O0(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function wo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var s=t[l];At=s,D0(s,e)}O0(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)z0(e),e=e.sibling}function z0(e){switch(e.tag){case 0:case 11:case 15:wo(e),e.flags&2048&&la(9,e,e.return);break;case 3:wo(e);break;case 12:wo(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,vu(e)):wo(e);break;default:wo(e)}}function vu(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var s=t[l];At=s,D0(s,e)}O0(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:la(8,t,t.return),vu(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,vu(t));break;default:vu(t)}e=e.sibling}}function D0(e,t){for(;At!==null;){var l=At;switch(l.tag){case 0:case 11:case 15:la(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var s=l.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:so(l.memoizedState.cache)}if(s=l.child,s!==null)s.return=l,At=s;else e:for(l=e;At!==null;){s=At;var r=s.sibling,f=s.return;if(w0(s),s===l){At=null;break e}if(r!==null){r.return=f,At=r;break e}At=f}}}var db={getCacheForType:function(e){var t=Ht(vt),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return Ht(vt).controller.signal}},hb=typeof WeakMap=="function"?WeakMap:Map,qe=0,et=null,Re=null,Oe=0,Ke=0,xn=null,sa=!1,Ks=!1,ad=!1,Rl=0,ht=0,ia=0,ts=0,yu=0,Sn=0,Ps=0,No=null,cn=null,sd=!1,xu=0,L0=0,Su=1/0,bu=null,oa=null,ct=0,qn=null,ns=null,rl=0,id=0,od=null,H0=null,Zs=null,Js=null,Ws=null,Co=0,ju=null;function bn(){return(qe&2)!==0&&Oe!==0?Oe&-Oe:ue.T!==null?vd():Vm()}function U0(){if(Sn===0)if((Oe&536870912)===0||Te){var e=kl;kl<<=1,(kl&3932160)===0&&(kl=262144),Sn=e}else Sn=536870912;return e=Ut.current,e!==null&&(e.flags|=32),Sn}function ei(e,t){if(t!=null){var l=e.stateNode,s=l.ref;s===null&&(s=l.ref=vv(Sl(e.memoizedProps,l))),Js===null&&(Js=[]),Js.push(t.bind(null,s))}}function fn(e,t,l){(e===et&&(Ke===2||Ke===9)||e.cancelPendingCommit!==null)&&(ti(e,0),ra(e,Oe,Sn,!1)),Gl(e,l),((qe&2)===0||e!==et)&&(e===et&&((qe&2)===0&&(ts|=l),ht===4&&ra(e,Oe,Sn,!1)),ul(e))}function $0(e,t,l){if((qe&6)!==0)throw Error(o(327));var s=!l&&(t&127)===0&&(t&e.expiredLanes)===0||an(e,t),r=s?pb(e,t):ud(e,t,!0),f=s;do{if(r===0){Ks&&!s&&ra(e,t,0,!1);break}else{if(l=e.current.alternate,f&&!mb(l)){r=ud(e,t,!1),f=!1;continue}if(r===2){if(f=t,e.errorRecoveryDisabledLanes&f)var p=0;else p=e.pendingLanes&-536870913,p=p!==0?p:p&536870912?536870912:0;if(p!==0){t=p;e:{var b=e;r=No;var T=b.current.memoizedState.isDehydrated;if(T&&(ti(b,p).flags|=256),p=ud(b,p,!1),p!==2&&p!==6){if(ad&&!T){b.errorRecoveryDisabledLanes|=f,ts|=f,r=4;break e}f=cn,cn=r,f!==null&&(cn===null?cn=f:cn.push.apply(cn,f))}r=p}if(f=!1,r!==2)continue}}if(r===1){ti(e,0),ra(e,t,0,!0);break}e:{switch(s=e,f=r,f){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:ra(s,t,Sn,!sa);break e;case 2:cn=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(r=xu+300-We(),10<r)){if(ra(s,t,Sn,!sa),Bl(s,0,!0)!==0)break e;rl=t,s.timeoutHandle=_d(V0.bind(null,s,l,cn,bu,sd,t,Sn,ts,Ps,sa,f,"Throttled",-0,0),r);break e}V0(s,l,cn,bu,sd,t,Sn,ts,Ps,sa,f,null,-0,0)}}break}while(!0);ul(e)}function V0(e,t,l,s,r,f,p,b,T,B,I,Z,F,q){e.timeoutHandle=-1;var ie=t.subtreeFlags,he=(f&335544064)===f;if(Z=null,(he||ie&8192||(ie&16785408)===16785408)&&(Z={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Wn},yn=null,A0(t,f,Z),he&&(ie=Z,he=e.containerInfo,he=(he.nodeType===9?he:he.ownerDocument).__reactViewTransition,he!=null&&(ie.count++,ie.waitingForViewTransition=!0,ie=zo.bind(ie),he.finished.then(ie,ie))),ie=(f&62914560)===f?xu-We():(f&4194048)===f?L0-We():0,ie=y2(Z,ie),ie!==null)){rl=f,e.cancelPendingCommit=ie(I0.bind(null,e,t,f,l,s,r,p,b,T,B,I,Z,null,F,q)),ra(e,f,p,!B);return}I0(e,t,f,l,s,r,p,b,T,B,I,Z)}function mb(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var s=0;s<l.length;s++){var r=l[s],f=r.getSnapshot;r=r.value;try{if(!pn(f(),r))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;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 ra(e,t,l,s){t=Gi(e,t),t&=~yu,t&=~ts,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var r=t;0<r;){var f=31-Yt(r),p=1<<f;s[f]=-1,r&=~p}l!==0&&Hm(e,l,t)}function wu(){return(qe&6)===0?(Eo(0),!1):!0}function rd(){if(Re!==null){if(Ke===0)var e=Re.return;else e=Re,Nl=Ga=null,pf(e),ks=null,ro=0,e=Re;for(;e!==null;)r0(e.alternate,e),e=e.return;Re=null}}function ti(e,t){var l=e.timeoutHandle;return l!==-1&&(e.timeoutHandle=-1,$b(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),rl=0,rd(),et=e,Re=l=jl(e.current,null),Oe=t,Ke=0,xn=null,sa=!1,Ks=an(e,t),ad=!1,Ps=Sn=yu=ts=ia=ht=0,cn=No=null,sd=!1,Rl=Gi(e,t),Ar(),l}function F0(e,t){Me=null,ue.H=nu,t===Fs||t===Br?(t=Ig(),Ke=3):t===nf?(t=Ig(),Ke=4):Ke=t===Af?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,xn=t,Re===null&&(ht=1,lu(e,_n(t,e.current)))}function k0(){var e=Ut.current;return e===null?!0:(Oe&4194048)===Oe?It===null:(Oe&62914560)===Oe||(Oe&536870912)!==0?e===It:!1}function B0(){var e=ue.H;return ue.H=nu,e===null?nu:e}function G0(){var e=ue.A;return ue.A=db,e}function Nu(){ht=4,sa||(Oe&4194048)!==Oe&&Ut.current!==null||(Ks=!0),(ia&134217727)===0&&(ts&134217727)===0||et===null||ra(et,Oe,Sn,!1)}function ud(e,t,l){var s=qe;qe|=2;var r=B0(),f=G0();(et!==e||Oe!==t)&&(bu=null,ti(e,t)),t=!1;var p=ht;e:do try{if(Ke!==0&&Re!==null){var b=Re,T=xn;switch(Ke){case 8:rd(),p=6;break e;case 3:case 2:case 9:case 6:Ut.current===null&&(t=!0);var B=Ke;if(Ke=0,xn=null,ni(e,b,T,B),l&&Ks){p=0;break e}break;default:B=Ke,Ke=0,xn=null,ni(e,b,T,B)}}gb(),p=ht;break}catch(I){F0(e,I)}while(!0);return t&&e.shellSuspendCounter++,Nl=Ga=null,qe=s,ue.H=r,ue.A=f,Re===null&&(et=null,Oe=0,Ar()),p}function gb(){for(;Re!==null;)q0(Re)}function pb(e,t){var l=qe;qe|=2;var s=B0(),r=G0();et!==e||Oe!==t?(bu=null,Su=We()+500,ti(e,t)):Ks=an(e,t);e:do try{if(Ke!==0&&Re!==null){t=Re;var f=xn;t:switch(Ke){case 1:Ke=0,xn=null,ni(e,t,f,1);break;case 2:case 9:if(Qg(f)){Ke=0,xn=null,Q0(t);break}t=function(){Ke!==2&&Ke!==9||et!==e||(Ke=7),ul(e)},f.then(t,t);break e;case 3:Ke=7;break e;case 4:Ke=5;break e;case 7:Qg(f)?(Ke=0,xn=null,Q0(t)):(Ke=0,xn=null,ni(e,t,f,7));break;case 5:var p=null;switch(Re.tag){case 26:p=Re.memoizedState;case 5:case 27:var b=Re;if(p?Hv(p):b.stateNode.complete){Ke=0,xn=null;var T=b.sibling;if(T!==null)Re=T;else{var B=b.return;B!==null?(Re=B,Cu(B)):Re=null}break t}}Ke=0,xn=null,ni(e,t,f,5);break;case 6:Ke=0,xn=null,ni(e,t,f,6);break;case 8:rd(),ht=6;break e;default:throw Error(o(462))}}vb();break}catch(I){F0(e,I)}while(!0);return Nl=Ga=null,ue.H=s,ue.A=r,qe=l,Re!==null?0:(et=null,Oe=0,Ar(),ht)}function vb(){for(;Re!==null&&!wt();)q0(Re)}function q0(e){var t=i0(e.alternate,e,Rl);e.memoizedProps=e.pendingProps,t===null?Cu(e):Re=t}function Q0(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=Wp(l,t,t.pendingProps,t.type,void 0,Oe);break;case 11:t=Wp(l,t,t.pendingProps,t.type.render,t.ref,Oe);break;case 5:pf(t);var s=t;s===Tt&&(Te?(Ur(s),s.tag===5&&s.stateNode!=null&&(tt=s.stateNode)):(Ur(s),Te=!0));default:r0(l,t),t=Re=Dg(t,Rl),t=i0(l,t,Rl)}e.memoizedProps=e.pendingProps,t===null?Cu(e):Re=t}function ni(e,t,l,s){Nl=Ga=null,pf(t),ks=null,ro=0;var r=t.return;try{if(ab(e,r,t,l,Oe)){ht=1,lu(e,_n(l,e.current)),Re=null;return}}catch(f){if(r!==null)throw Re=r,f;ht=1,lu(e,_n(l,e.current)),Re=null;return}t.flags&32768?(Te||s===1?e=!0:Ks||(Oe&536870912)!==0?e=!1:(sa=e=!0,(s===2||s===9||s===3||s===6)&&(s=Ut.current,s!==null&&s.tag===13&&(s.flags|=16384))),Y0(t,e)):Cu(t)}function Cu(e){var t=e;do{if((t.flags&32768)!==0){Y0(t,sa);return}e=t.return;var l=rb(t.alternate,t,Rl);if(l!==null){Re=l;return}if(t=t.sibling,t!==null){Re=t;return}Re=t=e}while(t!==null);ht===0&&(ht=5)}function Y0(e,t){do{var l=ub(e.alternate,e);if(l!==null){l.flags&=32767,Re=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){Re=e;return}Re=e=l}while(e!==null);ht=6,Re=null}function I0(e,t,l,s,r,f,p,b,T,B,I,Z){e.cancelPendingCommit=null;do Eu();while(ct!==0);if((qe&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));e===et&&(Re=et=null,Oe=0),ns=t,qn=e,rl=l,od=r,H0=s,yb(e,t,l,p,b,T,Z)}}function yb(e,t,l,s,r,f,p){var b=t.lanes|t.childLanes;if(id=b,b|=Gc,yr(e,l,b,s,r,f),Js=null,(l&335544064)===l?(Ws=YS(e),s=10262):(Ws=null,s=10256),(t.subtreeFlags&s)!==0||(t.flags&s)!==0?(e.callbackNode=null,e.callbackPriority=0,Nb(La,function(){return hd(),null})):(e.callbackNode=null,e.callbackPriority=0),fu=!1,s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=ue.T,ue.T=null,r=ge.p,ge.p=2,f=qe,qe|=4;try{cb(e,t,l)}finally{qe=f,ge.p=r,ue.T=s}}ct=1,fu?Zs=qb(p,e.containerInfo,Ws,cd,fd,Sb,dd,hd,xb):(cd(),fd(),dd())}function xb(e){if(ct!==0){var t=qn.onRecoverableError;t(e,{componentStack:null})}}function Sb(){ct===3&&(ct=0,T0(ns,qn),ct=4)}function cd(){if(ct===1){ct=0;var e=qn,t=ns,l=rl,s=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||s){s=ue.T,ue.T=null;var r=ge.p;ge.p=2;var f=qe;qe|=4;try{bo=mu=!1,M0(t,e,l),l=Cd;var p=Ng(e.containerInfo),b=l.focusedElem,T=l.selectionRange;if(p!==b&&b&&b.ownerDocument&&wg(b.ownerDocument.documentElement,b)){if(T!==null&&$c(b)){var B=T.start,I=T.end;if(I===void 0&&(I=B),"selectionStart"in b)b.selectionStart=B,b.selectionEnd=Math.min(I,b.value.length);else{var Z=b.ownerDocument||document,F=Z&&Z.defaultView||window;if(F.getSelection){var q=F.getSelection(),ie=b.textContent.length,he=Math.min(T.start,ie),_e=T.end===void 0?he:Math.min(T.end,ie);!q.extend&&he>_e&&(p=_e,_e=he,he=p);var k=jg(b,he),H=jg(b,_e);if(k&&H&&(q.rangeCount!==1||q.anchorNode!==k.node||q.anchorOffset!==k.offset||q.focusNode!==H.node||q.focusOffset!==H.offset)){var G=Z.createRange();G.setStart(k.node,k.offset),q.removeAllRanges(),he>_e?(q.addRange(G),q.extend(H.node,H.offset)):(G.setEnd(H.node,H.offset),q.addRange(G))}}}}for(Z=[],q=b;q=q.parentNode;)q.nodeType===1&&Z.push({element:q,left:q.scrollLeft,top:q.scrollTop});for(typeof b.focus=="function"&&b.focus(),b=0;b<Z.length;b++){var P=Z[b];P.element.scrollLeft=P.left,P.element.scrollTop=P.top}}ci=!!Nd,Cd=Nd=null}finally{qe=f,ge.p=r,ue.T=s}}e.current=t,ct=2}}function fd(){if(ct===2){ct=0;var e=qn,t=ns,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=ue.T,ue.T=null;var s=ge.p;ge.p=2;var r=qe;qe|=4;try{b0(e,t.alternate,t)}finally{qe=r,ge.p=s,ue.T=l}}ct=3}}function dd(){if(ct===4||ct===3){ct=0;var e=Zs;Zs=null,lt();var t=qn,l=ns,s=rl,r=H0,f=(s&335544064)===s?10262:10256;if((l.subtreeFlags&f)!==0||(l.flags&f)!==0?ct=5:(ct=0,ns=qn=null,X0(t,t.pendingLanes)),f=t.pendingLanes,f===0&&(oa=null),Sc(s),l=l.stateNode,Qt&&typeof Qt.onCommitFiberRoot=="function")try{Qt.onCommitFiberRoot(Fl,l,void 0,(l.current.flags&128)===128)}catch{}if(r!==null){l=ue.T,f=ge.p,ge.p=2,ue.T=null;try{for(var p=t.onRecoverableError,b=0;b<r.length;b++){var T=r[b];p(T.value,{componentStack:T.stack})}}finally{ue.T=l,ge.p=f}}if(r=Js,p=Ws,Ws=null,r!==null&&(Js=null,p===null&&(p=[]),e!==null))for(T=0;T<r.length;T++)l=(0,r[T])(p),l!==void 0&&e.finished.finally(l);(rl&3)!==0&&Eu(),ul(t),f=t.pendingLanes,(s&261930)!==0&&(f&42)!==0?t===ju?Co++:(Co=0,ju=t):(Co=0,ju=null),Eo(0)}}function X0(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,so(t)))}function Eu(){return Zs!==null&&(Zs.skipTransition(),Zs=null),cd(),fd(),dd(),hd()}function hd(){if(ct!==5)return!1;var e=qn,t=id;id=0;var l=Sc(rl),s=ue.T,r=ge.p;try{ge.p=32>l?32:l,ue.T=null,l=od,od=null;var f=qn,p=rl;if(ct=0,ns=qn=null,rl=0,(qe&6)!==0)throw Error(o(331));var b=qe;if(qe|=4,z0(f.current),R0(f,f.current,p,l),qe=b,Eo(0,!1),Qt&&typeof Qt.onPostCommitFiberRoot=="function")try{Qt.onPostCommitFiberRoot(Fl,f)}catch{}return!0}finally{ge.p=r,ue.T=s,X0(e,t)}}function K0(e,t,l){t=_n(l,t),t=Rf(e.stateNode,t,2),e=Wl(e,t,2),e!==null&&(Gl(e,2),ul(e))}function Pe(e,t,l){if(e.tag===3)K0(e,e,l);else for(;t!==null;){if(t.tag===3){K0(t,e,l);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(oa===null||!oa.has(s))){e=_n(l,e),l=Qp(2),s=Wl(t,l,2),s!==null&&(Yp(l,s,t,e),Gl(s,2),ul(s));break}}t=t.return}}function md(e,t,l){var s=e.pingCache;if(s===null){s=e.pingCache=new hb;var r=new Set;s.set(t,r)}else r=s.get(t),r===void 0&&(r=new Set,s.set(t,r));r.has(l)||(ad=!0,r.add(l),e=bb.bind(null,e,t,l),t.then(e,e))}function bb(e,t,l){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,et===e&&(Oe&l)===l&&((ht===4||ht===3&&(Oe&62914560)===Oe&&300>We()-xu)&&(qe&2)===0?ti(e,0):yu|=l,Ps===Oe&&(Ps=0)),ul(e)}function P0(e,t){t===0&&(t=qi()),e=Fa(e,t),e!==null&&(Gl(e,t),ul(e))}function jb(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),P0(e,l)}function wb(e,t){var l=0;switch(e.tag){case 31:case 13:var s=e.stateNode,r=e.memoizedState;r!==null&&(l=r.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(o(314))}s!==null&&s.delete(t),P0(e,l)}function Nb(e,t){return Ve(e,t)}var li=null,ai=null,gd=!1,Mu=!1,pd=!1,ua=0;function ul(e){e!==ai&&e.next===null&&(ai===null?li=ai=e:ai=ai.next=e),Mu=!0,gd||(gd=!0,Eb())}function Eo(e,t){if(!pd&&Mu){pd=!0;do for(var l=!1,s=li;s!==null;){if(e!==0){var r=s.pendingLanes;if(r===0)var f=0;else{var p=s.suspendedLanes,b=s.pingedLanes;f=(1<<31-Yt(42|e)+1)-1,f&=r&~(p&~b),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(l=!0,ev(s,f))}else f=Oe,f=Bl(s,s===et?f:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(f&3)===0||an(s,f)||(l=!0,ev(s,f));s=s.next}while(l);pd=!1}}function Cb(){Z0()}function Z0(){Mu=gd=!1;var e=0;ua!==0&&Ub()&&(e=ua);for(var t=We(),l=null,s=li;s!==null;){var r=s.next,f=J0(s,t);f===0?(s.next=null,l===null?li=r:l.next=r,r===null&&(ai=l)):(l=s,(e!==0||(f&3)!==0)&&(Mu=!0)),s=r}ct!==0&&ct!==5||Eo(e),ua!==0&&(ua=0)}function J0(e,t){for(var l=e.suspendedLanes,s=e.pingedLanes,r=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var p=31-Yt(f),b=1<<p,T=r[p];T===-1?((b&l)===0||(b&s)!==0)&&(r[p]=vr(b,t)):T<=t&&(e.expiredLanes|=b),f&=~b}if(t=et,l=Oe,l=Bl(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,l===0||e===t&&(Ke===2||Ke===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&ke(s),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||an(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(s!==null&&ke(s),Sc(l)){case 2:case 8:l=Da;break;case 32:l=La;break;case 268435456:l=Bi;break;default:l=La}return s=W0.bind(null,e),l=Ve(l,s),e.callbackPriority=t,e.callbackNode=l,t}return s!==null&&s!==null&&ke(s),e.callbackPriority=2,e.callbackNode=null,2}function W0(e,t){if(ct!==0&&ct!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(Eu()&&e.callbackNode!==l)return null;var s=Oe;return s=Bl(e,e===et?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:($0(e,s,t),J0(e,We()),e.callbackNode!=null&&e.callbackNode===l?W0.bind(null,e):null)}function ev(e,t){if(Eu())return null;$0(e,t,!0)}function Eb(){Vb(function(){(qe&6)!==0?Ve(Vl,Cb):Z0()})}function vd(){if(ua===0){var e=Ya;e===0&&(e=Dt,Dt<<=1,(Dt&261888)===0&&(Dt=256)),ua=e}return ua}function tv(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:wr(e)}function Mb(e,t,l,s,r){if(t==="submit"&&l&&l.stateNode===r){var f=tv((r[sn]||null).action),p=s.submitter;p&&(t=(t=p[sn]||null)?tv(t.formAction):p.getAttribute("formAction"),t!==null&&(f=t,p=null));var b=new Mr("action","action",null,s,r);e.push({event:b,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(ua!==0){var T=new FormData(r,p);Cf(l,{pending:!0,data:T,method:r.method,action:f},null,T)}}else typeof f=="function"&&(b.preventDefault(),T=new FormData(r,p),Cf(l,{pending:!0,data:T,method:r.method,action:f},f,T))},currentTarget:r}]})}}for(var yd=0;yd<Bc.length;yd++){var xd=Bc[yd],_b=xd.toLowerCase(),Tb=xd[0].toUpperCase()+xd.slice(1);Fn(_b,"on"+Tb)}Fn(Mg,"onAnimationEnd"),Fn(_g,"onAnimationIteration"),Fn(Tg,"onAnimationStart"),Fn("dblclick","onDoubleClick"),Fn("focusin","onFocus"),Fn("focusout","onBlur"),Fn($S,"onTransitionRun"),Fn(VS,"onTransitionStart"),Fn(FS,"onTransitionCancel"),Fn(Rg,"onTransitionEnd"),Es("onMouseEnter",["mouseout","mouseover"]),Es("onMouseLeave",["mouseout","mouseover"]),Es("onPointerEnter",["pointerout","pointerover"]),Es("onPointerLeave",["pointerout","pointerover"]),Ua("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ua("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ua("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ua("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ua("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ua("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Mo="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(" "),Rb=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Mo));function nv(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var s=e[l],r=s.event;s=s.listeners;e:{var f=void 0;if(t)for(var p=s.length-1;0<=p;p--){var b=s[p],T=b.instance,B=b.currentTarget;if(b=b.listener,T!==f&&r.isPropagationStopped())break e;f=b,r.currentTarget=B;try{f(r)}catch(I){Rr(I)}r.currentTarget=null,f=T}else for(p=0;p<s.length;p++){if(b=s[p],T=b.instance,B=b.currentTarget,b=b.listener,T!==f&&r.isPropagationStopped())break e;f=b,r.currentTarget=B;try{f(r)}catch(I){Rr(I)}r.currentTarget=null,f=T}}}}function Ae(e,t){var l=t[km];l===void 0&&(l=t[km]=new Set);var s=e+"__bubble";l.has(s)||(lv(t,e,2,!1),l.add(s))}function Sd(e,t,l){var s=0;t&&(s|=4),lv(l,e,s,t)}var _u="_reactListening"+Math.random().toString(36).slice(2);function bd(e){if(!e[_u]){e[_u]=!0,qm.forEach(function(l){l!=="selectionchange"&&(Rb.has(l)||Sd(l,!1,e),Sd(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[_u]||(t[_u]=!0,Sd("selectionchange",!1,t))}}function lv(e,t,l,s){switch(Yv(t)){case 2:var r=j2;break;case 8:r=w2;break;default:r=kd}l=r.bind(null,t,l,e),r=void 0,!_c||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),s?r!==void 0?e.addEventListener(t,l,{capture:!0,passive:r}):e.addEventListener(t,l,!0):r!==void 0?e.addEventListener(t,l,{passive:r}):e.addEventListener(t,l,!1)}function jd(e,t,l,s,r){var f=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var p=s.tag;if(p===3||p===4){var b=s.stateNode.containerInfo;if(b===r)break;if(p===4)for(p=s.return;p!==null;){var T=p.tag;if((T===3||T===4)&&p.stateNode.containerInfo===r)return;p=p.return}for(;b!==null;){if(p=Ha(b),p===null)return;if(T=p.tag,T===5||T===6||T===26||T===27){s=f=p;continue e}b=b.parentNode}}s=s.return}lg(function(){var B=f,I=Ec(l),Z=[];e:{var F=Ag.get(e);if(F!==void 0){var q=Mr,ie=e;switch(e){case"keypress":if(Cr(l)===0)break e;case"keydown":case"keyup":q=mS;break;case"focusin":ie="focus",q=Oc;break;case"focusout":ie="blur",q=Oc;break;case"beforeblur":case"afterblur":q=Oc;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":q=ig;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":q=nS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":q=xS;break;case Mg:case _g:case Tg:q=sS;break;case Rg:q=bS;break;case"scroll":case"scrollend":q=eS;break;case"wheel":q=wS;break;case"copy":case"cut":case"paste":q=oS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":q=rg;break;case"submit":q=vS;break;case"toggle":case"beforetoggle":q=CS}var he=(t&4)!==0,_e=!he&&(e==="scroll"||e==="scrollend"),k=he?F!==null?F+"Capture":null:F;he=[];for(var H=B,G;H!==null;){var P=H;if(G=P.stateNode,P=P.tag,P!==5&&P!==26&&P!==27||G===null||k===null||(P=Xi(H,k),P!=null&&he.push(_o(H,P,G))),_e)break;H=H.return}0<he.length&&(F=new q(F,ie,null,l,I),Z.push({event:F,listeners:he}))}}if((t&7)===0){e:{if(q=e==="mouseover"||e==="pointerover",F=e==="mouseout"||e==="pointerout",q&&l!==Cc&&(ie=l.relatedTarget||l.fromElement)&&(Ha(ie)||ie[ws]))break e;(F||q)&&(ie=I.window===I?I:(q=I.ownerDocument)?q.defaultView||q.parentWindow:window,F?(q=l.relatedTarget||l.toElement,F=B,q=q?Ha(q):null,q!==null&&(_e=d(q),he=q.tag,q!==_e||he!==5&&he!==27&&he!==6)&&(q=null)):(F=null,q=B),F!==q&&(he=ig,P="onMouseLeave",k="onMouseEnter",H="mouse",(e==="pointerout"||e==="pointerover")&&(he=rg,P="onPointerLeave",k="onPointerEnter",H="pointer"),_e=F==null?ie:Ii(F),G=q==null?ie:Ii(q),ie=new he(P,H+"leave",F,l,I),ie.target=_e,ie.relatedTarget=G,P=null,Ha(I)===B&&(he=new he(k,H+"enter",q,l,I),he.target=G,he.relatedTarget=_e,P=he),_e=P,he=F&&q?_(F,q,Ab):null,F!==null&&av(Z,ie,F,he,!1),q!==null&&_e!==null&&av(Z,_e,q,he,!0)))}e:{if(F=B?Ii(B):window,q=F.nodeName&&F.nodeName.toLowerCase(),q==="select"||q==="input"&&F.type==="file")var fe=pg;else if(mg(F))if(vg)fe=LS;else{fe=zS;var ze=OS}else q=F.nodeName,!q||q.toLowerCase()!=="input"||F.type!=="checkbox"&&F.type!=="radio"?B&&Nc(B.elementType)&&(fe=pg):fe=DS;if(fe&&(fe=fe(e,B))){gg(Z,fe,l,I);break e}ze&&ze(e,F,B)}switch(ze=B?Ii(B):window,e){case"focusin":(mg(ze)||ze.contentEditable==="true")&&(Os=ze,Vc=B,no=null);break;case"focusout":no=Vc=Os=null;break;case"mousedown":Fc=!0;break;case"contextmenu":case"mouseup":case"dragend":Fc=!1,Cg(Z,l,I);break;case"selectionchange":if(US)break;case"keydown":case"keyup":Cg(Z,l,I)}var pe;if(Dc)e:{switch(e){case"compositionstart":var Se="onCompositionStart";break e;case"compositionend":Se="onCompositionEnd";break e;case"compositionupdate":Se="onCompositionUpdate";break e}Se=void 0}else As?dg(e,l)&&(Se="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(Se="onCompositionStart");Se&&(ug&&l.locale!=="ko"&&(As||Se!=="onCompositionStart"?Se==="onCompositionEnd"&&As&&(pe=ag()):(ql=I,Tc="value"in ql?ql.value:ql.textContent,As=!0)),ze=Tu(B,Se),0<ze.length&&(Se=new og(Se,e,null,l,I),Z.push({event:Se,listeners:ze}),pe?Se.data=pe:(pe=hg(l),pe!==null&&(Se.data=pe)))),(pe=MS?_S(e,l):TS(e,l))&&(Se=Tu(B,"onBeforeInput"),0<Se.length&&(ze=new og("onBeforeInput","beforeinput",null,l,I),Z.push({event:ze,listeners:Se}),ze.data=pe)),Mb(Z,e,B,l,I)}nv(Z,t)})}function _o(e,t,l){return{instance:e,listener:t,currentTarget:l}}function Tu(e,t){for(var l=t+"Capture",s=[];e!==null;){var r=e,f=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||f===null||(r=Xi(e,l),r!=null&&s.unshift(_o(e,r,f)),r=Xi(e,t),r!=null&&s.push(_o(e,r,f))),e.tag===3)return s;e=e.return}return[]}function Ab(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function av(e,t,l,s,r){for(var f=t._reactName,p=[];l!==null&&l!==s;){var b=l,T=b.alternate,B=b.stateNode;if(b=b.tag,T!==null&&T===s)break;b!==5&&b!==26&&b!==27||B===null||(T=B,r?(B=Xi(l,f),B!=null&&p.unshift(_o(l,B,T))):r||(B=Xi(l,f),B!=null&&p.push(_o(l,B,T)))),l=l.return}p.length!==0&&e.push({event:t,listeners:p})}var Ob=/\r\n?/g,zb=/\u0000|\uFFFD/g;function sv(e){return(typeof e=="string"?e:""+e).replace(Ob,`
|
|
49
|
+
`).replace(zb,"")}function iv(e,t){return t=sv(t),sv(e)===t}function Ze(e,t,l,s,r,f){switch(l){case"children":if(typeof s=="string")t==="body"||t==="textarea"&&s===""||_s(e,s);else if(typeof s=="number"||typeof s=="bigint")t!=="body"&&_s(e,""+s);else return;break;case"className":jr(e,"class",s);break;case"tabIndex":jr(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":jr(e,l,s);break;case"style":tg(e,s,f);return;case"data":if(t!=="object"){jr(e,"data",s);break}case"src":case"href":if(s===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(l);break}s=wr(s),e.setAttribute(l,s);break;case"action":case"formAction":if(typeof s=="function"){e.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof f=="function"&&(l==="formAction"?(t!=="input"&&Ze(e,t,"name",r.name,r,null),Ze(e,t,"formEncType",r.formEncType,r,null),Ze(e,t,"formMethod",r.formMethod,r,null),Ze(e,t,"formTarget",r.formTarget,r,null)):(Ze(e,t,"encType",r.encType,r,null),Ze(e,t,"method",r.method,r,null),Ze(e,t,"target",r.target,r,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(l);break}s=wr(s),e.setAttribute(l,s);break;case"onClick":s!=null&&(e.onclick=Wn);return;case"onScroll":s!=null&&Ae("scroll",e);return;case"onScrollEnd":s!=null&&Ae("scrollend",e);return;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(o(61));if(l=s.__html,l!=null){if(r.children!=null)throw Error(o(60));(f!=null?f.__html:void 0)!==l&&(e.innerHTML=l)}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}l=wr(s),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(l,s):e.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":s===!0?e.setAttribute(l,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(l,s):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(l,s):e.removeAttribute(l);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(l):e.setAttribute(l,s);break;case"popover":Ae("beforetoggle",e),Ae("toggle",e),br(e,"popover",s);break;case"xlinkActuate":yl(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":yl(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":yl(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":yl(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":yl(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":yl(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":yl(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":yl(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":yl(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":br(e,"is",s);break;case"innerText":case"textContent":return;default:if(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")l=J1.get(l)||l,br(e,l,s);else return}Be=!0}function wd(e,t,l,s,r,f){switch(l){case"style":tg(e,s,f);return;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(o(61));if(l=s.__html,l!=null){if(r.children!=null)throw Error(o(60));(f!=null?f.__html:void 0)!==l&&(e.innerHTML=l)}}break;case"children":if(typeof s=="string")_s(e,s);else if(typeof s=="number"||typeof s=="bigint")_s(e,""+s);else return;break;case"onScroll":s!=null&&Ae("scroll",e);return;case"onScrollEnd":s!=null&&Ae("scrollend",e);return;case"onClick":s!=null&&(e.onclick=Wn);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!Qm.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(r=l.endsWith("Capture"),f=l.slice(2,r?l.length-7:void 0),t=e[sn]||null,t=t!=null?t[l]:null,typeof t=="function"&&e.removeEventListener(f,t,r),typeof s=="function")){typeof t!="function"&&t!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(f,s,r);break e}Be=!0,l in e?e[l]=s:s===!0?e.setAttribute(l,""):br(e,l,s)}return}Be=!0}function Ft(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ae("error",e),Ae("load",e);var s=!1,r=!1,f;for(f in l)if(l.hasOwnProperty(f)){var p=l[f];if(p!=null)switch(f){case"src":s=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Ze(e,t,f,p,l,null)}}r&&Ze(e,t,"srcSet",l.srcSet,l,null),s&&Ze(e,t,"src",l.src,l,null);return;case"input":Ae("invalid",e);var b=f=p=r=null,T=null,B=null;for(s in l)if(l.hasOwnProperty(s)){var I=l[s];if(I!=null)switch(s){case"name":r=I;break;case"type":p=I;break;case"checked":T=I;break;case"defaultChecked":B=I;break;case"value":f=I;break;case"defaultValue":b=I;break;case"children":case"dangerouslySetInnerHTML":if(I!=null)throw Error(o(137,t));break;default:Ze(e,t,s,I,l,null)}}Zm(e,f,b,T,B,p,r,!1);return;case"select":Ae("invalid",e),s=p=f=null;for(r in l)if(l.hasOwnProperty(r)&&(b=l[r],b!=null))switch(r){case"value":f=b;break;case"defaultValue":p=b;break;case"multiple":s=b;default:Ze(e,t,r,b,l,null)}t=f,l=p,e.multiple=!!s,t!=null?Ms(e,!!s,t,!1):l!=null&&Ms(e,!!s,l,!0);return;case"textarea":Ae("invalid",e),f=r=s=null;for(p in l)if(l.hasOwnProperty(p)&&(b=l[p],b!=null))switch(p){case"value":s=b;break;case"defaultValue":r=b;break;case"children":f=b;break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(o(91));break;default:Ze(e,t,p,b,l,null)}Wm(e,s,r,f);return;case"option":for(T in l)if(l.hasOwnProperty(T)&&(s=l[T],s!=null))switch(T){case"selected":e.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:Ze(e,t,T,s,l,null)}return;case"dialog":Ae("beforetoggle",e),Ae("toggle",e),Ae("cancel",e),Ae("close",e);break;case"iframe":case"object":Ae("load",e);break;case"video":case"audio":for(s=0;s<Mo.length;s++)Ae(Mo[s],e);break;case"image":Ae("error",e),Ae("load",e);break;case"details":Ae("toggle",e);break;case"embed":case"source":case"link":Ae("error",e),Ae("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(B in l)if(l.hasOwnProperty(B)&&(s=l[B],s!=null))switch(B){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Ze(e,t,B,s,l,null)}return;default:if(Nc(t)){for(I in l)l.hasOwnProperty(I)&&(s=l[I],s!==void 0&&wd(e,t,I,s,l,void 0));return}}for(b in l)l.hasOwnProperty(b)&&(s=l[b],s!=null&&Ze(e,t,b,s,l,null))}var Db={};function Lb(e,t,l,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var r=null,f=null,p=null,b=null,T=null,B=null,I=null;for(q in l){var Z=l[q];if(l.hasOwnProperty(q)&&Z!=null)switch(q){case"checked":break;case"value":break;case"defaultValue":T=Z;default:s.hasOwnProperty(q)||Ze(e,t,q,null,s,Z)}}for(var F in s){var q=s[F];if(Z=l[F],s.hasOwnProperty(F)&&(q!=null||Z!=null))switch(F){case"type":q!==Z&&(Be=!0),f=q;break;case"name":q!==Z&&(Be=!0),r=q;break;case"checked":q!==Z&&(Be=!0),B=q;break;case"defaultChecked":q!==Z&&(Be=!0),I=q;break;case"value":q!==Z&&(Be=!0),p=q;break;case"defaultValue":q!==Z&&(Be=!0),b=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(o(137,t));break;default:q!==Z&&Ze(e,t,F,q,s,Z)}}jc(e,p,b,T,B,I,f,r);return;case"select":q=p=b=F=null;for(f in l)if(T=l[f],l.hasOwnProperty(f)&&T!=null)switch(f){case"value":break;case"multiple":q=T;default:s.hasOwnProperty(f)||Ze(e,t,f,null,s,T)}for(r in s)if(f=s[r],T=l[r],s.hasOwnProperty(r)&&(f!=null||T!=null))switch(r){case"value":f!==T&&(Be=!0),F=f;break;case"defaultValue":f!==T&&(Be=!0),b=f;break;case"multiple":f!==T&&(Be=!0),p=f;default:f!==T&&Ze(e,t,r,f,s,T)}t=b,l=p,s=q,F!=null?Ms(e,!!l,F,!1):!!s!=!!l&&(t!=null?Ms(e,!!l,t,!0):Ms(e,!!l,l?[]:"",!1));return;case"textarea":q=F=null;for(b in l)if(r=l[b],l.hasOwnProperty(b)&&r!=null&&!s.hasOwnProperty(b))switch(b){case"value":break;case"children":break;default:Ze(e,t,b,null,s,r)}for(p in s)if(r=s[p],f=l[p],s.hasOwnProperty(p)&&(r!=null||f!=null))switch(p){case"value":r!==f&&(Be=!0),F=r;break;case"defaultValue":r!==f&&(Be=!0),q=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(o(91));break;default:r!==f&&Ze(e,t,p,r,s,f)}Jm(e,F,q);return;case"option":for(var ie in l)if(F=l[ie],l.hasOwnProperty(ie)&&F!=null&&!s.hasOwnProperty(ie))switch(ie){case"selected":e.selected=!1;break;default:Ze(e,t,ie,null,s,F)}for(T in s)if(F=s[T],q=l[T],s.hasOwnProperty(T)&&F!==q&&(F!=null||q!=null))switch(T){case"selected":F!==q&&(Be=!0),e.selected=F&&typeof F!="function"&&typeof F!="symbol";break;default:Ze(e,t,T,F,s,q)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var he in l)F=l[he],l.hasOwnProperty(he)&&F!=null&&!s.hasOwnProperty(he)&&Ze(e,t,he,null,s,F);for(B in s)if(F=s[B],q=l[B],s.hasOwnProperty(B)&&F!==q&&(F!=null||q!=null))switch(B){case"children":case"dangerouslySetInnerHTML":if(F!=null)throw Error(o(137,t));break;default:Ze(e,t,B,F,s,q)}return;default:if(Nc(t)){for(var _e in l)F=l[_e],l.hasOwnProperty(_e)&&F!==void 0&&!s.hasOwnProperty(_e)&&wd(e,t,_e,void 0,s,F);for(I in s)F=s[I],q=l[I],!s.hasOwnProperty(I)||F===q||F===void 0&&q===void 0||wd(e,t,I,F,s,q);return}}for(var k in l)F=l[k],l.hasOwnProperty(k)&&F!=null&&!s.hasOwnProperty(k)&&Ze(e,t,k,null,s,F);for(Z in s)F=s[Z],q=l[Z],!s.hasOwnProperty(Z)||F===q||F==null&&q==null||Ze(e,t,Z,F,s,q)}function ov(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Hb(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),s=0;s<l.length;s++){var r=l[s],f=r.transferSize,p=r.initiatorType,b=r.duration;if(f&&b&&ov(p)){for(p=0,b=r.responseEnd,s+=1;s<l.length;s++){var T=l[s],B=T.startTime;if(B>b)break;var I=T.transferSize,Z=T.initiatorType;I&&ov(Z)&&(T=T.responseEnd,p+=I*(T<b?1:(b-B)/(T-B)))}if(--s,t+=8*(f+p)/(r.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Nd=null,Cd=null;function To(e){return e.nodeType===9?e:e.ownerDocument}function rv(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function uv(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function cv(e,t,l,s){return l=To(l).createElement(e),l[Lt]=s,l[sn]=t,Ft(l,e,t),_t(l),l}function Ed(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Md=null;function Ub(){var e=window.event;return e&&e.type==="popstate"?e===Md?!1:(Md=e,!0):(Md=null,!1)}var _d=typeof setTimeout=="function"?setTimeout:void 0,$b=typeof clearTimeout=="function"?clearTimeout:void 0,fv=typeof Promise=="function"?Promise:void 0,dv=typeof requestAnimationFrame=="function"?requestAnimationFrame:_d,Vb=typeof queueMicrotask=="function"?queueMicrotask:typeof fv<"u"?function(e){return fv.resolve(null).then(e).catch(Fb)}:_d;function Fb(e){setTimeout(function(){throw e})}function ca(e){return e==="head"}function hv(e,t){var l=t,s=0;do{var r=l.nextSibling;if(e.removeChild(l),r&&r.nodeType===8)if(l=r.data,l==="/$"||l==="/&"){if(s===0){e.removeChild(r),fi(t);return}s--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")s++;else if(l==="html")Hd(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,Hd(l);for(var f=l.firstChild;f;){var p=f.nextSibling,b=f.nodeName;f[Yi]||b==="SCRIPT"||b==="STYLE"||b==="LINK"&&f.rel.toLowerCase()==="stylesheet"||l.removeChild(f),f=p}}else l==="body"&&Hd(e.ownerDocument.body);l=r}while(l);fi(t)}function mv(e,t){var l=e;e=0;do{var s=l.nextSibling;if(l.nodeType===1?t?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(t?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),s&&s.nodeType===8)if(l=s.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=s}while(l)}function gv(e,t,l){if(t=CSS.escape(t)!==t?"r-"+btoa(t).replace(/=/g,""):t,e.style.viewTransitionName=t,l!=null&&(e.style.viewTransitionClass=l),l=getComputedStyle(e),l.display==="inline"){if(t=e.getClientRects(),t.length===1)var s=1;else for(var r=s=0;r<t.length;r++){var f=t[r];0<f.width&&0<f.height&&s++}s===1&&(e=e.style,e.display=t.length===1?"inline-block":"block",e.marginTop="-"+l.paddingTop,e.marginBottom="-"+l.paddingBottom)}}function pv(e,t){e=e.style,t=t.style;var l=t!=null?t.hasOwnProperty("viewTransitionName")?t.viewTransitionName:t.hasOwnProperty("view-transition-name")?t["view-transition-name"]:null:null;e.viewTransitionName=l==null||typeof l=="boolean"?"":(""+l).trim(),l=t!=null?t.hasOwnProperty("viewTransitionClass")?t.viewTransitionClass:t.hasOwnProperty("view-transition-class")?t["view-transition-class"]:null:null,e.viewTransitionClass=l==null||typeof l=="boolean"?"":(""+l).trim(),e.display==="inline-block"&&(t==null?e.display=e.margin="":(l=t.display,e.display=l==null||typeof l=="boolean"?"":l,l=t.margin,l!=null?e.margin=l:(l=t.hasOwnProperty("marginTop")?t.marginTop:t["margin-top"],e.marginTop=l==null||typeof l=="boolean"?"":l,t=t.hasOwnProperty("marginBottom")?t.marginBottom:t["margin-bottom"],e.marginBottom=t==null||typeof t=="boolean"?"":t)))}function kb(e,t,l){return l=l.ownerDocument.defaultView,{rect:e,abs:t.position==="absolute"||t.position==="fixed",clip:t.clipPath!=="none"||t.overflow!=="visible"||t.filter!=="none"||t.mask!=="none"||t.mask!=="none"||t.borderRadius!=="0px",view:0<=e.bottom&&0<=e.right&&e.top<=l.innerHeight&&e.left<=l.innerWidth}}function Td(e){var t=e.getBoundingClientRect(),l=getComputedStyle(e);return kb(t,l,e)}function Bb(e){return e.documentElement.clientHeight}function Gb(e){this.addEventListener("load",e),this.addEventListener("error",e)}function qb(e,t,l,s,r,f,p,b,T){var B=t.nodeType===9?t:t.ownerDocument;try{var I=B.startViewTransition({update:function(){var F=B.defaultView,q=F.navigation&&F.navigation.transition,ie=B.fonts.status;s();var he=[];if(ie==="loaded"&&(Bb(B),B.fonts.status==="loading"&&he.push(B.fonts.ready)),ie=he.length,e!==null)for(var _e=e.suspenseyImages,k=0,H=0;H<_e.length;H++){var G=_e[H];if(!G.complete){var P=G.getBoundingClientRect();if(0<P.bottom&&0<P.right&&P.top<F.innerHeight&&P.left<F.innerWidth){if(k+=Uv(G),k>Ou){he.length=ie;break}G=new Promise(Gb.bind(G)),he.push(G)}}}if(0<he.length)return F=Promise.race([Promise.all(he),new Promise(function(fe){return setTimeout(fe,500)})]).then(r,r),(q?Promise.allSettled([q.finished,F]):F).then(f,f);if(r(),q)return q.finished.then(f,f);f()},types:l});B.__reactViewTransition=I;var Z=[];return I.ready.then(function(){for(var F=B.documentElement.getAnimations({subtree:!0}),q=0;q<F.length;q++){var ie=F[q],he=ie.effect,_e=he.pseudoElement;if(_e!=null&&_e.startsWith("::view-transition")){Z.push(ie),ie=he.getKeyframes();for(var k=_e=void 0,H=!0,G=0;G<ie.length;G++){var P=ie[G],fe=P.width;if(_e===void 0)_e=fe;else if(_e!==fe){H=!1;break}if(fe=P.height,k===void 0)k=fe;else if(k!==fe){H=!1;break}delete P.width,delete P.height,P.transform==="none"&&delete P.transform}H&&_e!==void 0&&k!==void 0&&(he.setKeyframes(ie),H=getComputedStyle(he.target,he.pseudoElement),H.width!==_e||H.height!==k)&&(H=ie[0],H.width=_e,H.height=k,H=ie[ie.length-1],H.width=_e,H.height=k,he.setKeyframes(ie))}}p()},function(F){B.__reactViewTransition===I&&(B.__reactViewTransition=null);try{if(typeof F=="object"&&F!==null)switch(F.name){case"InvalidStateError":(F.message==="View transition was skipped because document visibility state is hidden."||F.message==="Skipping view transition because document visibility state has become hidden."||F.message==="Skipping view transition because viewport size changed."||F.message==="Transition was aborted because of invalid state")&&(F=null)}F!==null&&T(F)}finally{s(),r(),p()}}),I.finished.finally(function(){for(var F=0;F<Z.length;F++)Z[F].cancel();B.__reactViewTransition===I&&(B.__reactViewTransition=null),b()}),I}catch{return s(),r(),p(),null}}function ls(e,t){this._scope=document.documentElement,this._selector="::view-transition-"+e+"("+t+")"}ls.prototype.animate=function(e,t){return t=typeof t=="number"?{duration:t}:R({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},ls.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,l=e.getAnimations({subtree:!0}),s=[],r=0;r<l.length;r++){var f=l[r].effect;f!==null&&f.target===e&&f.pseudoElement===t&&s.push(l[r])}return s},ls.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function vv(e){return{name:e,group:new ls("group",e),imagePair:new ls("image-pair",e),old:new ls("old",e),new:new ls("new",e)}}function jn(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}jn.prototype.addEventListener=function(e,t,l){var s=null,r=null;if(!(l!=null&&typeof l!="boolean"&&(s=l.signal||null,s!==null&&s.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var f=this._eventListeners;if(xv(f,e,t,l)===-1){var p=this,b=t;l!=null&&typeof l!="boolean"&&l.once===!0&&(b=function(T){p.removeEventListener(e,t,l),typeof t=="function"?t.call(this,T):t.handleEvent(T)}),s!==null&&(r=p.removeEventListener.bind(p,e,t,l),s.addEventListener("abort",r,{once:!0}),r=s.removeEventListener.bind(s,"abort",r)),s=si(l),f.push({type:e,listener:t,optionsOrUseCapture:l,attachedListener:b,cleanup:r}),v(this._fragmentFiber.child,!1,Qb,e,b,s)}this._eventListeners=f}};function Qb(e,t,l,s){return M(e).addEventListener(t,l,s),!1}jn.prototype.removeEventListener=function(e,t,l){var s=this._eventListeners;if(s!==null&&(t=xv(s,e,t,l),t!==-1)){var r=s[t];l=r.attachedListener;var f=r.cleanup;r=si(r.optionsOrUseCapture),v(this._fragmentFiber.child,!1,Yb,e,l,r),s.splice(t,1),f!==null&&f()}};function Yb(e,t,l,s){return M(e).removeEventListener(t,l,s),!1}function si(e){return e!=null&&typeof e!="boolean"&&(e.once===!0||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function yv(e){return e==null?"c=0":typeof e=="boolean"?"c="+(e?"1":"0"):"c="+(e.capture?"1":"0")}function xv(e,t,l,s){if(e.length===0)return-1;s=yv(s);for(var r=0;r<e.length;r++){var f=e[r];if(f.type===t&&f.listener===l&&yv(f.optionsOrUseCapture)===s)return r}return-1}jn.prototype.dispatchEvent=function(e){var t=S(this._fragmentFiber);if(t===null)return!0;t=M(t);var l=this._eventListeners;if(l!==null&&0<l.length||!e.bubbles){var s=t.nodeType===9?t.createComment(""):document.createTextNode("");if(l)for(var r=0;r<l.length;r++){var f=l[r];s.addEventListener(f.type,f.attachedListener,si(f.optionsOrUseCapture))}if(t.appendChild(s),e=s.dispatchEvent(e),l)for(r=0;r<l.length;r++)f=l[r],s.removeEventListener(f.type,f.attachedListener,si(f.optionsOrUseCapture));return t.removeChild(s),e}return t.dispatchEvent(e)},jn.prototype.focus=function(e){v(this._fragmentFiber.child,!0,Sv,e,void 0,void 0)};function Sv(e,t){return e.tag===6?!1:(e=M(e),a2(e,t))}jn.prototype.focusLast=function(e){var t=[];v(this._fragmentFiber.child,!0,Rd,t,void 0,void 0);for(var l=t.length-1;0<=l&&!Sv(t[l],e);l--);};function Rd(e,t){return t.push(e),!1}jn.prototype.blur=function(){var e=S(this._fragmentFiber);e!==null&&(e=M(e),e=To(e).activeElement,e!==null&&v(this._fragmentFiber.child,!1,Ib,e,void 0,void 0))};function Ib(e,t){return e.tag===6?!1:(e=M(e),e===t||e.contains(t)?(t.blur(),!0):!1)}jn.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),v(this._fragmentFiber.child,!1,Xb,e,void 0,void 0)};function Xb(e,t){return e.tag===6||(e=M(e),t.observe(e)),!1}jn.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),v(this._fragmentFiber.child,!1,Kb,e,void 0,void 0);for(var l=t=0;l<Qn.length;l++){var s=Qn[l];s.fragmentInstance===this&&s.observer===e?e.unobserve(s.instance):Qn[t++]=s}Qn.length=t}};function Kb(e,t){return e.tag===6||(e=M(e),t.unobserve(e)),!1}var Qn=[],Ad=!1;function Pb(e,t,l){Qn.push({fragmentInstance:e,observer:t,instance:l}),Ad||(Ad=!0,s2(function(){Ad=!1;var s=Qn;Qn=[];for(var r=0;r<s.length;r++){var f=s[r];f.observer.unobserve(f.instance)}}))}jn.prototype.getClientRects=function(){var e=[];return v(this._fragmentFiber.child,!1,Zb,e,void 0,void 0),e};function Zb(e,t){if(e.tag===6){e=e.stateNode;var l=e.ownerDocument.createRange();l.selectNodeContents(e),t.push.apply(t,l.getClientRects())}else e=M(e),t.push.apply(t,e.getClientRects());return!1}jn.prototype.getRootNode=function(e){var t=S(this._fragmentFiber);return t===null?this:M(t).getRootNode(e)},jn.prototype.compareDocumentPosition=function(e){var t=S(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var l=[];v(this._fragmentFiber.child,!1,Rd,l,void 0,void 0);var s=M(t);if(l.length===0){if(l=s,w(this._fragmentFiber)){e:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break e}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(l=t)}t=this._fragmentFiber;var r=s=l.compareDocumentPosition(e);return l===e?r=Node.DOCUMENT_POSITION_CONTAINS:s&Node.DOCUMENT_POSITION_CONTAINED_BY&&(l=j(t)[1],l===null?r=Node.DOCUMENT_POSITION_PRECEDING:(e=M(l).compareDocumentPosition(e),r=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),r|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=M(l[0]),r=M(l[l.length-1]);var f=w(this._fragmentFiber)?t.parentElement:s;if(f==null)return Node.DOCUMENT_POSITION_DISCONNECTED;s=f.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,f=f.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_CONTAINED_BY;var p=t.compareDocumentPosition(e),b=r.compareDocumentPosition(e),T=p&Node.DOCUMENT_POSITION_CONTAINED_BY||b&Node.DOCUMENT_POSITION_CONTAINED_BY;return b=s&&f&&p&Node.DOCUMENT_POSITION_FOLLOWING&&b&Node.DOCUMENT_POSITION_PRECEDING,t=s&&t===e||f&&r===e||T||b?Node.DOCUMENT_POSITION_CONTAINED_BY:!s&&t===e||!f&&r===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:p,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||Jb(t,this._fragmentFiber,l[0],l[l.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function Jb(e,t,l,s,r){var f=Ha(r);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(l=!!f)e:{for(;f!==null;){if(f.tag===7&&(f===t||f.alternate===t)){l=!0;break e}f=f.return}l=!1}return l}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(f===null)return f=r.ownerDocument,r===f||r===f.documentElement||r===f.body;e:{for(f=t,t=S(t);f!==null;){if(!(f.tag!==5&&f.tag!==3&&f.tag!==27||f!==t&&f.alternate!==t)){f=!0;break e}f=f.return}f=!1}return f}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!f)&&!(t=f===l)&&(t=_(l,f,z),t===null?t=!1:(v(t,!0,D,f,l),f=A,A=null,t=f!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!f)&&!(t=f===s)&&(t=_(s,f,z),t===null?t=!1:(v(t,!0,O,f,s),f=A,C=A=null,t=f!==null)),t):!1}function bv(e,t){var l=e.ownerDocument.createRange();l.selectNodeContents(e),e=l.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}jn.prototype.scrollIntoView=function(e){if(typeof e=="object")throw Error(o(566));var t=[];v(this._fragmentFiber.child,!1,Rd,t,void 0,void 0);var l=e!==!1;if(t.length===0){var s=j(this._fragmentFiber);if(s=l?s[1]||s[0]||S(this._fragmentFiber):s[0]||s[1],s===null)return;if(s.tag===6){e=M(s),bv(e,l);return}if(s=M(s),s.nodeType!==9){if(s.nodeType===11){l="host"in s?s.host:null,l!==null&&l.scrollIntoView(e);return}s.scrollIntoView(e)}}for(s=l?t.length-1:0;s!==(l?-1:t.length);){var r=t[s];r.tag===6?(r=M(r),bv(r,l)):M(r).scrollIntoView(e),s+=l?-1:1}};function Wb(e,t){return e=M(e),jv(e,t),!1}function jv(e,t){e.reactFragments==null&&(e.reactFragments=new Set),e.reactFragments.add(t)}function wv(e,t){var l=t._eventListeners;if(l!==null)for(var s=0;s<l.length;s++){var r=l[s];e.addEventListener(r.type,r.attachedListener,si(r.optionsOrUseCapture))}e.nodeType!==3&&(l=t._observers,l!==null&&l.forEach(function(f){for(var p=0,b=0;b<Qn.length;b++){var T=Qn[b];(T.fragmentInstance!==t||T.observer!==f||T.instance!==e)&&(Qn[p++]=T)}Qn.length=p,f.observe(e)}),jv(e,t))}function e2(e,t){var l=t._eventListeners;if(l!==null)for(var s=0;s<l.length;s++){var r=l[s];e.removeEventListener(r.type,r.attachedListener,si(r.optionsOrUseCapture))}e.nodeType!==3&&(l=t._observers,l!==null&&l.forEach(function(f){typeof f.rootMargin=="string"?Pb(t,f,e):f.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function Od(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var l=t;switch(t=t.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Od(l),Sr(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function t2(e,t,l,s){for(;e.nodeType===1;){var r=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[Yi])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(f=e.getAttribute("rel"),f==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(f!==r.rel||e.getAttribute("href")!==(r.href==null||r.href===""?null:r.href)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||e.getAttribute("title")!==(r.title==null?null:r.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(f=e.getAttribute("src"),(f!==(r.src==null?null:r.src)||e.getAttribute("type")!==(r.type==null?null:r.type)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&f&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var f=r.name==null?null:""+r.name;if(r.type==="hidden"&&e.getAttribute("name")===f)return e}else return e;if(e=zn(e.nextSibling),e===null)break}return null}function n2(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=zn(e.nextSibling),e===null))return null;return e}function Nv(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=zn(e.nextSibling),e===null))return null;return e}function zd(e){return e.data==="$?"||e.data==="$~"}function Dd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function l2(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var s=function(){t(),l.removeEventListener("DOMContentLoaded",s)};l.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function zn(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==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Ld=null;function Cv(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return zn(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function Ev(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(t===0)return e;t--}else l!=="/$"&&l!=="/&"||t++}e=e.previousSibling}return null}function a2(e,t){function l(){s=!0}if(e.ownerDocument.activeElement===e)return!0;var s=!1;try{e.ownerDocument.addEventListener("focus",l,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener("focus",l,!0)}return s}function s2(e){dv(function(){dv(function(t){return e(t)})})}function Mv(e,t,l){switch(t=To(l),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function _v(e,t,l){for(var s in l){var r=l[s];l.hasOwnProperty(s)&&r!=null&&Ze(e,t,s,null,Db,r)}l.dangerouslySetInnerHTML!=null&&(e.textContent=""),e.onclick===Wn&&(e.onclick=null),Sr(e)}function Hd(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Sr(e)}var Dn=new Map,Tv=new Set;function Ro(e){if(typeof e.getRootNode=="function"){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var Al=ge.d;ge.d={f:i2,r:o2,D:r2,C:u2,L:c2,m:f2,X:h2,S:d2,M:m2};function i2(){var e=Al.f(),t=wu();return e||t}function o2(e){var t=Ns(e);t!==null&&t.tag===5&&t.type==="form"?Ap(t):Al.r(e)}var ii=typeof document>"u"?null:document;function Rv(e,t,l){var s=ii;if(s&&typeof t=="string"&&t){var r=En(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof l=="string"&&(r+='[crossorigin="'+l+'"]'),Tv.has(r)||(Tv.add(r),e={rel:e,crossOrigin:l,href:t},s.querySelector(r)===null&&(t=s.createElement("link"),Ft(t,"link",e),_t(t),s.head.appendChild(t)))}}function r2(e){Al.D(e),Rv("dns-prefetch",e,null)}function u2(e,t){Al.C(e,t),Rv("preconnect",e,t)}function c2(e,t,l){Al.L(e,t,l);var s=ii;if(s&&e&&t){var r='link[rel="preload"][as="'+En(t)+'"]';t==="image"&&l&&l.imageSrcSet?(r+='[imagesrcset="'+En(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(r+='[imagesizes="'+En(l.imageSizes)+'"]')):r+='[href="'+En(e)+'"]';var f=r;switch(t){case"style":f=oi(e);break;case"script":f=ri(e)}if(!(Dn.has(f)||(e=R({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),Dn.set(f,e),s.querySelector(r)!==null||t==="style"&&s.querySelector(Ao(f))||t==="script"&&s.querySelector(Oo(f))))){var p=s.createElement("link");Ft(p,"link",e),t==="style"&&(p[xr]=!0,p.onload=p.onerror=function(){Gm(p)}),_t(p),s.head.appendChild(p)}}}function f2(e,t){Al.m(e,t);var l=ii;if(l&&e){var s=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+En(s)+'"][href="'+En(e)+'"]',f=r;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=ri(e)}if(!Dn.has(f)&&(e=R({rel:"modulepreload",href:e},t),Dn.set(f,e),l.querySelector(r)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Oo(f)))return}s=l.createElement("link"),Ft(s,"link",e),_t(s),l.head.appendChild(s)}}}function d2(e,t,l){Al.S(e,t,l);var s=ii;if(s&&e){var r=Cs(s).hoistableStyles,f=oi(e);t=t||"default";var p=r.get(f);if(!p){var b={loading:0,preload:null};if(p=s.querySelector(Ao(f)))b.loading=5;else{e=R({rel:"stylesheet",href:e,"data-precedence":t},l),(l=Dn.get(f))&&Ud(e,l);var T=p=s.createElement("link");_t(T),Ft(T,"link",e),T._p=new Promise(function(B,I){T.onload=B,T.onerror=I}),T.addEventListener("load",function(){b.loading|=1}),T.addEventListener("error",function(){b.loading|=2}),b.loading|=4,Ru(p,t,s)}p={type:"stylesheet",instance:p,count:1,state:b},r.set(f,p)}}}function h2(e,t){Al.X(e,t);var l=ii;if(l&&e){var s=Cs(l).hoistableScripts,r=ri(e),f=s.get(r);f||(f=l.querySelector(Oo(r)),f||(e=R({src:e,async:!0},t),(t=Dn.get(r))&&$d(e,t),f=l.createElement("script"),_t(f),Ft(f,"link",e),l.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},s.set(r,f))}}function m2(e,t){Al.M(e,t);var l=ii;if(l&&e){var s=Cs(l).hoistableScripts,r=ri(e),f=s.get(r);f||(f=l.querySelector(Oo(r)),f||(e=R({src:e,async:!0,type:"module"},t),(t=Dn.get(r))&&$d(e,t),f=l.createElement("script"),_t(f),Ft(f,"link",e),l.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},s.set(r,f))}}function Av(e,t,l,s){var r=(r=Pt.current)?Ro(r):null;if(!r)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(l=oi(l.href),t=Cs(r).hoistableStyles,s=t.get(l),s||(s={type:"style",instance:null,count:0,state:null},t.set(l,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=oi(l.href);var f=Cs(r).hoistableStyles,p=f.get(e);if(p||(r=r.ownerDocument||r,p={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(e,p),(f=r.querySelector(Ao(e)))?f._p||(p.instance=f,p.state.loading=5):(f=Dn.get(e),f||(f={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Dn.set(e,f)),g2(r,e,f,p.state))),t&&s===null)throw Error(o(528,""));return p}if(t&&s!==null)throw Error(o(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(l=ri(l),t=Cs(r).hoistableScripts,s=t.get(l),s||(s={type:"script",instance:null,count:0,state:null},t.set(l,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function oi(e){return'href="'+En(e)+'"'}function Ao(e){return'link[rel="stylesheet"]['+e+"]"}function Ov(e){return R({},e,{"data-precedence":e.precedence,precedence:null})}function g2(e,t,l,s){if(t=e.querySelector('link[rel="preload"][as="style"]['+t+"]")){if(t[xr]!==!0){s.loading=1;return}}else t=e.createElement("link"),t[xr]=!0,t.onload=t.onerror=Gm.bind(null,t),Ft(t,"link",l),_t(t),e.head.appendChild(t);s.preload=t,t.addEventListener("load",function(){return s.loading|=1}),t.addEventListener("error",function(){return s.loading|=2})}function ri(e){return'[src="'+En(e)+'"]'}function Oo(e){return"script[async]"+e}function zv(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+En(l.href)+'"]');if(s)return t.instance=s,_t(s),s;var r=R({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),_t(s),Ft(s,"style",r),Ru(s,l.precedence,e),t.instance=s;case"stylesheet":r=oi(l.href);var f=e.querySelector(Ao(r));if(f)return t.state.loading|=4,t.instance=f,_t(f),f;s=Ov(l),(r=Dn.get(r))&&Ud(s,r),f=(e.ownerDocument||e).createElement("link"),_t(f);var p=f;return p._p=new Promise(function(b,T){p.onload=b,p.onerror=T}),Ft(f,"link",s),t.state.loading|=4,Ru(f,l.precedence,e),t.instance=f;case"script":return f=ri(l.src),(r=e.querySelector(Oo(f)))?(t.instance=r,_t(r),r):(s=l,(r=Dn.get(f))&&(s=R({},l),$d(s,r)),e=e.ownerDocument||e,r=e.createElement("script"),_t(r),Ft(r,"link",s),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,Ru(s,l.precedence,e));return t.instance}function Ru(e,t,l){for(var s=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=s.length?s[s.length-1]:null,f=r,p=0;p<s.length;p++){var b=s[p];if(b.dataset.precedence===t)f=b;else if(f!==r)break}f?f.parentNode.insertBefore(e,f.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function Ud(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function $d(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Au=null;function Dv(e,t,l){if(Au===null){var s=new Map,r=Au=new Map;r.set(l,s)}else r=Au,s=r.get(l),s||(s=new Map,r.set(l,s));if(s.has(e))return s;for(s.set(e,null),l=l.getElementsByTagName(e),r=0;r<l.length;r++){var f=l[r];if(!(f[Yi]||f[Lt]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var p=f.getAttribute(t)||"";p=e+p;var b=s.get(p);b?b.push(f):s.set(p,[f])}}return s}function Vd(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function p2(e,t,l){if(l===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Lv(e,t){return e==="img"&&t.src!=null&&t.src!==""&&t.onLoad==null&&t.loading!=="lazy"}function Hv(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Uv(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function $v(e,t){typeof t.decode=="function"&&(e.imgCount++,t.complete||(e.imgBytes+=Uv(t),e.suspenseyImages.push(t)),e=x2.bind(e),t.decode().then(e,e))}function v2(e,t,l,s){if(l.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var r=oi(s.href),f=t.querySelector(Ao(r));if(f){t=f._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=zo.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=f,_t(f);return}f=t.ownerDocument||t,s=Ov(s),(r=Dn.get(r))&&Ud(s,r),f=f.createElement("link"),_t(f);var p=f;p._p=new Promise(function(b,T){p.onload=b,p.onerror=T}),Ft(f,"link",s),l.instance=f}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=zo.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var Ou=0;function y2(e,t){return e.stylesheets&&e.count===0&&Du(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var s=setTimeout(function(){if(e.stylesheets&&Du(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},6e4+t);0<e.imgBytes&&Ou===0&&(Ou=62500*Hb());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Du(e,e.stylesheets),e.unsuspend)){var f=e.unsuspend;e.unsuspend=null,f()}},(e.imgBytes>Ou?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(r)}}:null}function Vv(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)Du(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function zo(){this.count--,Vv(this)}function x2(){this.imgCount--,Vv(this)}var zu=null;function Du(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,zu=new Map,t.forEach(S2,e),zu=null,zo.call(e))}function S2(e,t){if(!(t.state.loading&4)){var l=zu.get(e);if(l)var s=l.get(null);else{l=new Map,zu.set(e,l);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<r.length;f++){var p=r[f];(p.nodeName==="LINK"||p.getAttribute("media")!=="not all")&&(l.set(p.dataset.precedence,p),s=p)}s&&l.set(null,s)}r=t.instance,p=r.getAttribute("data-precedence"),f=l.get(p)||s,f===s&&l.set(null,r),l.set(p,r),this.count++,s=zo.bind(this),r.addEventListener("load",s),r.addEventListener("error",s),f?f.parentNode.insertBefore(r,f.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(r,e.firstChild)),t.state.loading|=4}}var ui={$$typeof:ee,Provider:null,Consumer:null,_currentValue:rt,_currentValue2:rt,_threadCount:0};function b2(e,t,l,s,r,f,p,b,T){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Qi(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Qi(0),this.hiddenUpdates=Qi(null),this.identifierPrefix=s,this.onUncaughtError=r,this.onCaughtError=f,this.onRecoverableError=p,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=T,this.transitionTypes=null,this.incompleteTransitions=new Map}function Fv(e,t,l,s,r,f,p,b,T,B,I,Z){return e=new b2(e,t,l,p,T,B,I,Z,b),t=1,f===!0&&(t|=24),f=on(3,null,null,t),e.current=f,f.stateNode=e,t=Wc(),t.refCount++,e.pooledCache=t,t.refCount++,f.memoizedState={element:s,isDehydrated:l,cache:t},lf(f),e}function kv(e){return e?(e=Ls,e):Ls}function Bv(e,t,l,s,r,f){r=kv(r),s.context===null?s.context=r:s.pendingContext=r,s=Jl(t),s.payload={element:l},f=f===void 0?null:f,f!==null&&(s.callback=f),l=Wl(e,s,t),l!==null&&(fn(l,e,t),uo(l,e,t))}function Gv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function Fd(e,t){Gv(e,t),(e=e.alternate)&&Gv(e,t)}function qv(e){if(e.tag===13||e.tag===31){var t=Fa(e,67108864);t!==null&&fn(t,e,67108864),Fd(e,67108864)}}function Qv(e){if(e.tag===13||e.tag===31){var t=bn();t=xc(t);var l=Fa(e,t);l!==null&&fn(l,e,t),Fd(e,t)}}var ci=!0;function j2(e,t,l,s){var r=ue.T;ue.T=null;var f=ge.p;try{ge.p=2,kd(e,t,l,s)}finally{ge.p=f,ue.T=r}}function w2(e,t,l,s){var r=ue.T;ue.T=null;var f=ge.p;try{ge.p=8,kd(e,t,l,s)}finally{ge.p=f,ue.T=r}}function kd(e,t,l,s){if(ci){var r=Bd(s);if(r===null)jd(e,t,s,Lu,l),Iv(e,s);else if(C2(r,e,t,l,s))s.stopPropagation();else if(Iv(e,s),t&4&&-1<N2.indexOf(e)){for(;r!==null;){var f=Ns(r);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var p=pl(f.pendingLanes);if(p!==0){var b=f;for(b.pendingLanes|=2,b.entangledLanes|=2;p;){var T=1<<31-Yt(p);b.entanglements[1]|=T,p&=~T}ul(f),(qe&6)===0&&(Su=We()+500,Eo(0))}}break;case 31:case 13:b=Fa(f,2),b!==null&&fn(b,f,2),wu(),Fd(f,2)}if(f=Bd(s),f===null&&jd(e,t,s,Lu,l),f===r)break;r=f}r!==null&&s.stopPropagation()}else jd(e,t,s,null,l)}}function Bd(e){return e=Ec(e),Gd(e)}var Lu=null;function Gd(e){if(Lu=null,e=Ha(e),e!==null){var t=d(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=h(t),e!==null)return e;e=null}else if(l===31){if(e=m(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Lu=e,null}function Yv(e){switch(e){case"beforetoggle":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"seeked":case"submit":case"toggle":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"fullscreenerror":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Jn()){case Vl:return 2;case Da:return 8;case La:case hr:return 32;case Bi:return 268435456;default:return 32}default:return 32}}var qd=!1,fa=null,da=null,ha=null,Do=new Map,Lo=new Map,ma=[],N2="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".split(" ");function Iv(e,t){switch(e){case"focusin":case"focusout":fa=null;break;case"dragenter":case"dragleave":da=null;break;case"mouseover":case"mouseout":ha=null;break;case"pointerover":case"pointerout":Do.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Lo.delete(t.pointerId)}}function Ho(e,t,l,s,r,f){return e===null||e.nativeEvent!==f?(e={blockedOn:t,domEventName:l,eventSystemFlags:s,nativeEvent:f,targetContainers:[r]},t!==null&&(t=Ns(t),t!==null&&qv(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function C2(e,t,l,s,r){switch(t){case"focusin":return fa=Ho(fa,e,t,l,s,r),!0;case"dragenter":return da=Ho(da,e,t,l,s,r),!0;case"mouseover":return ha=Ho(ha,e,t,l,s,r),!0;case"pointerover":var f=r.pointerId;return Do.set(f,Ho(Do.get(f)||null,e,t,l,s,r)),!0;case"gotpointercapture":return f=r.pointerId,Lo.set(f,Ho(Lo.get(f)||null,e,t,l,s,r)),!0}return!1}function Xv(e){var t=Ha(e.target);if(t!==null){var l=d(t);if(l!==null){if(t=l.tag,t===13){if(t=h(l),t!==null){e.blockedOn=t,Fm(e.priority,function(){Qv(l)});return}}else if(t===31){if(t=m(l),t!==null){e.blockedOn=t,Fm(e.priority,function(){Qv(l)});return}}else if(t===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Hu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=Bd(e.nativeEvent);if(l===null){l=e.nativeEvent;var s=new l.constructor(l.type,l);Cc=s,l.target.dispatchEvent(s),Cc=null}else return t=Ns(l),t!==null&&qv(t),e.blockedOn=l,!1;t.shift()}return!0}function Kv(e,t,l){Hu(e)&&l.delete(t)}function E2(){qd=!1,fa!==null&&Hu(fa)&&(fa=null),da!==null&&Hu(da)&&(da=null),ha!==null&&Hu(ha)&&(ha=null),Do.forEach(Kv),Lo.forEach(Kv)}function Uu(e,t){e.blockedOn===t&&(e.blockedOn=null,qd||(qd=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,E2)))}var $u=null;function Pv(e){$u!==e&&($u=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){$u===e&&($u=null);for(var t=0;t<e.length;t+=3){var l=e[t],s=e[t+1],r=e[t+2];if(typeof s!="function"){if(Gd(s||l)===null)continue;break}var f=Ns(l);f!==null&&(e.splice(t,3),t-=3,Cf(f,{pending:!0,data:r,method:l.method,action:s},s,r))}}))}function fi(e){function t(T){return Uu(T,e)}fa!==null&&Uu(fa,e),da!==null&&Uu(da,e),ha!==null&&Uu(ha,e),Do.forEach(t),Lo.forEach(t);for(var l=0;l<ma.length;l++){var s=ma[l];s.blockedOn===e&&(s.blockedOn=null)}for(;0<ma.length&&(l=ma[0],l.blockedOn===null);)Xv(l),l.blockedOn===null&&ma.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(s=0;s<l.length;s+=3){var r=l[s],f=l[s+1],p=r[sn]||null;if(typeof f=="function")p||Pv(l);else if(p){var b=null;if(f&&f.hasAttribute("formAction")){if(r=f,p=f[sn]||null)b=p.formAction;else if(Gd(r)!==null)continue}else b=p.action;typeof b=="function"?l[s+1]=b:(l.splice(s,3),s-=3),Pv(l)}}}function Zv(){function e(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(p){return r=p})},focusReset:"manual",scroll:"manual"})}function t(){r!==null&&(r(),r=null),s||setTimeout(l,20)}function l(){if(!s&&!navigation.transition){var f=navigation.currentEntry;f&&f.url!=null&&navigation.navigate(f.url,{state:f.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,r=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){s=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),r!==null&&(r(),r=null)}}}function Qd(e){this._internalRoot=e}Vu.prototype.render=Qd.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var l=t.current,s=bn();Bv(l,s,e,t,null,null)},Vu.prototype.unmount=Qd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Bv(e.current,2,null,e,null,null),wu(),t[ws]=null}};function Vu(e){this._internalRoot=e}Vu.prototype.unstable_scheduleHydration=function(e){if(e){var t=Vm();e={blockedOn:null,target:e,priority:t};for(var l=0;l<ma.length&&t!==0&&t<ma[l].priority;l++);ma.splice(l,0,e),l===0&&Xv(e)}};var Jv=a.version;if(Jv!=="19.3.1")throw Error(o(527,Jv,"19.3.1"));ge.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=y(t),e=e!==null?x(e):null,e=e===null?null:e.stateNode,e};var M2={bundleType:0,version:"19.3.1",rendererPackageName:"react-dom",currentDispatcherRef:ue,reconcilerVersion:"19.3.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Fu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Fu.isDisabled&&Fu.supportsFiber)try{Fl=Fu.inject(M2),Qt=Fu}catch{}}return $o.createRoot=function(e,t){if(!u(e))throw Error(o(299));var l=!1,s="",r=kp,f=Bp,p=Gp;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(r=t.onUncaughtError),t.onCaughtError!==void 0&&(f=t.onCaughtError),t.onRecoverableError!==void 0&&(p=t.onRecoverableError)),t=Fv(e,1,!1,null,null,l,s,null,r,f,p,Zv),e[ws]=t.current,bd(e),new Qd(t)},$o.hydrateRoot=function(e,t,l){if(!u(e))throw Error(o(299));var s=!1,r="",f=kp,p=Bp,b=Gp,T=null;return l!=null&&(l.unstable_strictMode===!0&&(s=!0),l.identifierPrefix!==void 0&&(r=l.identifierPrefix),l.onUncaughtError!==void 0&&(f=l.onUncaughtError),l.onCaughtError!==void 0&&(p=l.onCaughtError),l.onRecoverableError!==void 0&&(b=l.onRecoverableError),l.formState!==void 0&&(T=l.formState)),t=Fv(e,1,!0,t,l??null,s,r,T,f,p,b,Zv),t.context=kv(null),l=t.current,s=bn(),s=xc(s),r=Jl(s),r.callback=null,Wl(l,r,s),l=s,t.current.lanes=l,Gl(t,l),ul(t),e[ws]=t.current,bd(e),new Vu(t)},$o.version="19.3.1",$o}var uy;function F2(){if(uy)return Kd.exports;uy=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(a){console.error(a)}}return n(),Kd.exports=V2(),Kd.exports}var k2=F2();const bx=E.createContext(void 0),jx=n=>{const a=E.useContext(bx);if(!a)throw new Error("No QueryClient set, use QueryClientProvider to set one");return a},B2=({client:n,children:a})=>(E.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),c.jsx(bx.Provider,{value:n,children:a})),G2={setTimeout:(n,a)=>setTimeout(n,a),clearTimeout:n=>clearTimeout(n),setInterval:(n,a)=>setInterval(n,a),clearInterval:n=>clearInterval(n)};var xa,gm,cx,q2=(cx=class{constructor(){ye(this,xa,G2);ye(this,gm,!1)}setTimeoutProvider(n){ce(this,xa,n)}setTimeout(n,a){return U(this,xa).setTimeout(n,a)}clearTimeout(n){U(this,xa).clearTimeout(n)}setInterval(n,a){return U(this,xa).setInterval(n,a)}clearInterval(n){U(this,xa).clearInterval(n)}},xa=new WeakMap,gm=new WeakMap,cx);const rs=new q2;function Q2(n){setTimeout(n,0)}const Y2=typeof window>"u"||"Deno"in globalThis;function hn(){}function I2(n,a){return typeof n=="function"?n(a):n}function wx(n){return typeof n=="number"&&n>=0&&n!==1/0}function Nx(n,a){return Math.max(n+(a||0)-Date.now(),0)}function ot(n,a){return typeof n=="function"?n(a):n}function cy(n,a){const{type:i="all",exact:o,fetchStatus:u,predicate:d,queryKey:h,stale:m}=n;if(h){if(o){if(a.queryHash!==vm(h,a.options))return!1}else if(!Vi(a.queryKey,h))return!1}if(i!=="all"){const g=a.isActive();if(i==="active"&&!g||i==="inactive"&&g)return!1}return!(typeof m=="boolean"&&a.isStale()!==m||u&&u!==a.state.fetchStatus||d&&!d(a))}function fy(n,a){const{exact:i,status:o,predicate:u,mutationKey:d}=n;if(d){if(!a.options.mutationKey)return!1;if(i){if(er(a.options.mutationKey)!==er(d))return!1}else if(!Vi(a.options.mutationKey,d))return!1}return!(o&&a.state.status!==o||u&&!u(a))}function vm(n,a){return((a==null?void 0:a.queryKeyHashFn)||er)(n)}function er(n){return JSON.stringify(n,(a,i)=>Lh(i)?Object.keys(i).sort().reduce((o,u)=>(o[u]=i[u],o),{}):i)}function Vi(n,a){if(n===a)return!0;if(typeof n!=typeof a)return!1;if(n&&a&&typeof n=="object"&&typeof a=="object"){if(Array.isArray(n)&&Array.isArray(a)){if(a.length>n.length)return!1;for(let o=0;o<a.length;o++)if(!Vi(n[o],a[o]))return!1;return!0}const i=Object.keys(a);for(const o of i)if(!Vi(n[o],a[o]))return!1;return!0}return!1}const X2=Object.prototype.hasOwnProperty;function Cx(n,a,i=0){if(n===a)return n;if(i>500)return a;const o=dy(n)&&dy(a);if(!o&&!(Lh(n)&&Lh(a)))return a;const u=(o?n:Object.keys(n)).length,d=o?a:Object.keys(a),h=d.length,m=o?new Array(h):{};let g=0;for(let y=0;y<h;y++){const x=o?y:d[y],v=n[x],S=a[x];if(v===S){m[x]=v,(o?y<u:X2.call(n,x))&&g++;continue}if(v===null||S===null||typeof v!="object"||typeof S!="object"){m[x]=S;continue}const w=Cx(v,S,i+1);m[x]=w,w===v&&g++}return u===h&&g===u?n:m}function Wd(n,a){if(!a||Object.keys(n).length!==Object.keys(a).length)return!1;for(const i in n)if(n[i]!==a[i])return!1;return!0}function dy(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function Lh(n){if(!hy(n))return!1;const a=Object.getPrototypeOf(n),i=a==null?void 0:a.constructor;if(i===void 0)return!0;if(typeof i!="function")return!1;const o=i.prototype;return!(!hy(o)||!o.hasOwnProperty("isPrototypeOf")||a!==Object.prototype)}function hy(n){return Object.prototype.toString.call(n)==="[object Object]"}function K2(n){return new Promise(a=>{rs.setTimeout(a,n)})}function Hh(n,a,i){return typeof i.structuralSharing=="function"?i.structuralSharing(n,a):i.structuralSharing!==!1?Cx(n,a):a}function Ex(n){return n}function P2(n,a,i=0){const o=[...n,a];return i&&o.length>i?o.slice(1):o}function Z2(n,a,i=0){const o=[a,...n];return i&&o.length>i?o.slice(0,-1):o}const ym=Symbol();function Mx(n,a){return!n.queryFn&&(a!=null&&a.initialPromise)?()=>a.initialPromise:!n.queryFn||n.queryFn===ym?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function _x(n,a){return typeof n=="function"?n(...a):!!n}function J2(n,a,i){let o=!1,u;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(u??(u=a()),o||(o=!0,u.aborted?i():u.addEventListener("abort",i,{once:!0})),u)}),n}let W2=()=>Y2;const xm=()=>W2();var cr=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(){}},us,Sa,Ei,fx,ej=(fx=class extends cr{constructor(){super();ye(this,us);ye(this,Sa);ye(this,Ei);ce(this,Ei,a=>{if(typeof window<"u"&&window.addEventListener){const i=()=>a();return window.addEventListener("visibilitychange",i,!1),()=>{window.removeEventListener("visibilitychange",i)}}})}onSubscribe(){U(this,Sa)||this.setEventListener(U(this,Ei))}onUnsubscribe(){var a;this.hasListeners()||((a=U(this,Sa))==null||a.call(this),ce(this,Sa,void 0))}setEventListener(a){var i;ce(this,Ei,a),(i=U(this,Sa))==null||i.call(this),ce(this,Sa,a(o=>{typeof o=="boolean"?this.setFocused(o):this.onFocus()}))}setFocused(a){U(this,us)!==a&&(ce(this,us,a),this.onFocus())}onFocus(){const a=this.isFocused();this.listeners.forEach(i=>{i(a)})}isFocused(){var a;return typeof U(this,us)=="boolean"?U(this,us):((a=globalThis.document)==null?void 0:a.visibilityState)!=="hidden"}},us=new WeakMap,Sa=new WeakMap,Ei=new WeakMap,fx);const Sm=new ej,tj=Q2;function nj(){let n=[],a=0,i=m=>{m()},o=m=>{m()},u=tj;const d=m=>{a?n.push(m):u(()=>{i(m)})},h=()=>{const m=n;n=[],m.length&&u(()=>{o(()=>{m.forEach(g=>{i(g)})})})};return{batch:m=>{let g;a++;try{g=m()}finally{a--,a||h()}return g},batchCalls:m=>(...g)=>{d(()=>{m(...g)})},schedule:d,setNotifyFunction:m=>{i=m},setBatchNotifyFunction:m=>{o=m},setScheduler:m=>{u=m}}}const Bt=nj();var Mi,ba,_i,dx,lj=(dx=class extends cr{constructor(){super();ye(this,Mi,!0);ye(this,ba);ye(this,_i);ce(this,_i,a=>{if(typeof window<"u"&&window.addEventListener){const i=()=>a(!0),o=()=>a(!1);return window.addEventListener("online",i,!1),window.addEventListener("offline",o,!1),()=>{window.removeEventListener("online",i),window.removeEventListener("offline",o)}}})}onSubscribe(){U(this,ba)||this.setEventListener(U(this,_i))}onUnsubscribe(){var a;this.hasListeners()||((a=U(this,ba))==null||a.call(this),ce(this,ba,void 0))}setEventListener(a){var i;ce(this,_i,a),(i=U(this,ba))==null||i.call(this),ce(this,ba,a(this.setOnline.bind(this)))}setOnline(a){U(this,Mi)!==a&&(ce(this,Mi,a),this.listeners.forEach(i=>{i(a)}))}isOnline(){return U(this,Mi)}},Mi=new WeakMap,ba=new WeakMap,_i=new WeakMap,dx);const Zu=new lj;function aj(n){return Math.min(1e3*2**n,3e4)}function Tx(n){return(n??"online")==="online"?Zu.isOnline():!0}var Uh=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function Rx(n){let a=!1,i=0,o,u="pending",d,h;const m=new Promise((C,D)=>{d=C,h=D});m.catch(hn);const g=()=>u!=="pending",y=C=>{var D;if(!g()){const O=new Uh(C);N(O),(D=n.onCancel)==null||D.call(n,O)}},x=()=>{a=!0},v=()=>{a=!1},S=()=>Sm.isFocused()&&(n.networkMode==="always"||Zu.isOnline())&&n.canRun(),w=()=>Tx(n.networkMode)&&n.canRun(),j=C=>{g()||(o==null||o(),u="resolved",d(C))},N=C=>{g()||(o==null||o(),u="rejected",h(C))},M=C=>new Promise(D=>{var O;o=z=>{(g()||C())&&D(z)},(O=n.onPause)==null||O.call(n)}).then(()=>{var D;o=void 0,g()||(D=n.onContinue)==null||D.call(n)}),A=()=>{if(g())return;let C;const D=i===0?n.initialPromise:void 0;try{C=D??n.fn()}catch(O){C=Promise.reject(O)}Promise.resolve(C).then(j).catch(O=>{var K;if(g())return;const z=n.retry??(xm()?0:3),_=n.retryDelay??aj,R=typeof _=="function"?_(i,O):_,Q=z===!0||typeof z=="number"&&i<z||typeof z=="function"&&z(i,O);if(a||!Q){N(O);return}i++,(K=n.onFail)==null||K.call(n,i,O),K2(R).then(()=>S()?void 0:M(S)).then(()=>{a?N(O):A()})})};return{promise:m,status:()=>u,cancel:y,continue:()=>(o==null||o(),m),cancelRetry:x,continueRetry:v,canStart:w,start:()=>(w()?A():M(w).then(A),m)}}var cs,hx,Ax=(hx=class{constructor(){ye(this,cs)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),wx(this.gcTime)&&ce(this,cs,rs.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(xm()?1/0:3e5))}clearGcTimeout(){U(this,cs)!==void 0&&(rs.clearTimeout(U(this,cs)),ce(this,cs,void 0))}},cs=new WeakMap,hx);function sj(n){return{onFetch:(a,i)=>{var x,v,S,w,j;const o=a.options,u=(S=(v=(x=a.fetchOptions)==null?void 0:x.meta)==null?void 0:v.fetchMore)==null?void 0:S.direction,d=((w=a.state.data)==null?void 0:w.pages)||[],h=((j=a.state.data)==null?void 0:j.pageParams)||[];let m={pages:[],pageParams:[]},g=0;const y=async()=>{let N=!1;const M=D=>{J2(D,()=>a.signal,()=>N=!0)},A=Mx(a.options,a.fetchOptions),C=async(D,O,z)=>{if(N)return Promise.reject(a.signal.reason);if(O==null&&D.pages.length)return Promise.resolve(D);const R=(()=>{const le={client:a.client,queryKey:a.queryKey,pageParam:O,direction:z?"backward":"forward",meta:a.options.meta};return M(le),le})(),Q=await A(R),{maxPages:K}=a.options,$=z?Z2:P2;return{pages:$(D.pages,Q,K),pageParams:$(D.pageParams,O,K)}};if(u&&d.length){const D=u==="backward",O=D?Ox:$h,z={pages:d,pageParams:h};m=await C(z,O(o,z),D)}else{const D=n??d.length;do{const O=g===0?h[0]===void 0?o.initialPageParam:h[0]:$h(o,m);if(g>0&&O==null)break;m=await C(m,O),g++}while(g<D)}return m};a.options.persister?a.fetchFn=()=>{var N,M;return(M=(N=a.options).persister)==null?void 0:M.call(N,y,{client:a.client,queryKey:a.queryKey,meta:a.options.meta,signal:a.signal},i)}:a.fetchFn=y}}}function $h(n,{pages:a,pageParams:i}){const o=a.length-1;return a.length>0?n.getNextPageParam(a[o],a,i[o],i):void 0}function Ox(n,{pages:a,pageParams:i}){var o;return a.length>0?(o=n.getPreviousPageParam)==null?void 0:o.call(n,a[0],a,i[0],i):void 0}function ij(n,a){return a?$h(n,a)!=null:!1}function oj(n,a){return!a||!n.getPreviousPageParam?!1:Ox(n,a)!=null}var Ti,fs,Ri,Ln,ds,Ct,sr,hs,Yn,Dl,mx,rj=(mx=class extends Ax{constructor(a){super();ye(this,Yn);ye(this,Ti);ye(this,fs);ye(this,Ri);ye(this,Ln);ye(this,ds);ye(this,Ct);ye(this,sr);ye(this,hs);ce(this,hs,!1),ce(this,sr,a.defaultOptions),this.setOptions(a.options),this.observers=[],ce(this,ds,a.client),ce(this,Ln,U(this,ds).getQueryCache()),this.queryKey=a.queryKey,this.queryHash=a.queryHash,ce(this,fs,gy(this.options)),this.state=a.state??U(this,fs),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return U(this,Ti)}get promise(){var a;return(a=U(this,Ct))==null?void 0:a.promise}setOptions(a){if(this.options={...U(this,sr),...a},a!=null&&a._type&&ce(this,Ti,a._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const i=gy(this.options);i.data!==void 0&&(this.setState(my(i.data,i.dataUpdatedAt)),ce(this,fs,i))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&U(this,Ln).remove(this)}setData(a,i){const o=Hh(this.state.data,a,this.options);return De(this,Yn,Dl).call(this,{data:o,type:"success",dataUpdatedAt:i==null?void 0:i.updatedAt,manual:i==null?void 0:i.manual}),o}setState(a){De(this,Yn,Dl).call(this,{type:"setState",state:a})}cancel(a){var o,u;const i=(o=U(this,Ct))==null?void 0:o.promise;return(u=U(this,Ct))==null||u.cancel(a),i?i.then(hn).catch(hn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return U(this,fs)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(a=>ot(a.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ym||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(a=>ot(a.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(a=>a.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(a=0){return this.state.data===void 0?!0:a==="static"?!1:this.state.isInvalidated?!0:!Nx(this.state.dataUpdatedAt,a)}onFocus(){var a,i;(a=this.observers.find(o=>o.shouldFetchOnWindowFocus()))==null||a.refetch({cancelRefetch:!1}),(i=U(this,Ct))==null||i.continue()}onOnline(){var a,i;(a=this.observers.find(o=>o.shouldFetchOnReconnect()))==null||a.refetch({cancelRefetch:!1}),(i=U(this,Ct))==null||i.continue()}addObserver(a){this.observers.includes(a)||(this.observers.push(a),this.clearGcTimeout(),U(this,Ln).notify({type:"observerAdded",query:this,observer:a}))}removeObserver(a){const i=this.observers.indexOf(a);i!==-1&&(this.observers.splice(i,1),this.observers.length||(U(this,Ct)&&(U(this,hs)||this.state.fetchStatus==="paused"&&this.state.status==="pending"?U(this,Ct).cancel({revert:!0}):U(this,Ct).cancelRetry()),this.scheduleGc()),U(this,Ln).notify({type:"observerRemoved",query:this,observer:a}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||De(this,Yn,Dl).call(this,{type:"invalidate"})}async fetch(a,i){var y,x,v,S,w,j,N,M,A,C,D,O;if(this.state.fetchStatus!=="idle"&&((y=U(this,Ct))==null?void 0:y.status())!=="rejected"){if(this.state.data!==void 0&&(i!=null&&i.cancelRefetch))this.cancel({silent:!0});else if(U(this,Ct))return U(this,Ct).continueRetry(),U(this,Ct).promise}if(a&&this.setOptions(a),!this.options.queryFn){const z=this.observers.find(_=>_.options.queryFn);z&&this.setOptions(z.options)}const o=new AbortController,u=z=>{Object.defineProperty(z,"signal",{enumerable:!0,get:()=>(ce(this,hs,!0),o.signal)})},d=()=>{const z=Mx(this.options,i),R=(()=>{const Q={client:U(this,ds),queryKey:this.queryKey,meta:this.meta};return u(Q),Q})();return ce(this,hs,!1),this.options.persister?this.options.persister(z,R,this):z(R)},m=(()=>{const z={fetchOptions:i,options:this.options,queryKey:this.queryKey,client:U(this,ds),state:this.state,fetchFn:d};return u(z),z})();(x=U(this,Ti)==="infinite"?sj(this.options.pages):this.options.behavior)==null||x.onFetch(m,this),ce(this,Ri,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((v=m.fetchOptions)==null?void 0:v.meta))&&De(this,Yn,Dl).call(this,{type:"fetch",meta:(S=m.fetchOptions)==null?void 0:S.meta});const g=ce(this,Ct,Rx({initialPromise:i==null?void 0:i.initialPromise,fn:m.fetchFn,onCancel:z=>{z instanceof Uh&&z.revert&&this.setState({...U(this,Ri),fetchStatus:"idle"}),o.abort()},onFail:(z,_)=>{De(this,Yn,Dl).call(this,{type:"failed",failureCount:z,error:_})},onPause:()=>{De(this,Yn,Dl).call(this,{type:"pause"})},onContinue:()=>{De(this,Yn,Dl).call(this,{type:"continue"})},retry:m.options.retry,retryDelay:m.options.retryDelay,networkMode:m.options.networkMode,canRun:()=>!0}));try{const z=await g.start();if(z===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(z),(j=(w=U(this,Ln).config).onSuccess)==null||j.call(w,z,this),(M=(N=U(this,Ln).config).onSettled)==null||M.call(N,z,this.state.error,this),z}catch(z){if(z instanceof Uh){if(z.silent)return U(this,Ct).promise;if(z.revert){if(this.state.data===void 0)throw z;return this.state.data}}throw De(this,Yn,Dl).call(this,{type:"error",error:z}),(C=(A=U(this,Ln).config).onError)==null||C.call(A,z,this),(O=(D=U(this,Ln).config).onSettled)==null||O.call(D,this.state.data,z,this),z}finally{U(this,Ct)===g&&ce(this,Ct,void 0),this.scheduleGc()}}},Ti=new WeakMap,fs=new WeakMap,Ri=new WeakMap,Ln=new WeakMap,ds=new WeakMap,Ct=new WeakMap,sr=new WeakMap,hs=new WeakMap,Yn=new WeakSet,Dl=function(a){const i=o=>{switch(a.type){case"failed":return{...o,fetchFailureCount:a.failureCount,fetchFailureReason:a.error};case"pause":return{...o,fetchStatus:"paused"};case"continue":return{...o,fetchStatus:"fetching"};case"fetch":return{...o,...zx(o.data,this.options),fetchMeta:a.meta??null};case"success":const u={...o,...my(a.data,a.dataUpdatedAt),dataUpdateCount:o.dataUpdateCount+1,...!a.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ce(this,Ri,a.manual?u:void 0),u;case"error":const d=a.error;return{...o,error:d,errorUpdateCount:o.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:o.fetchFailureCount+1,fetchFailureReason:d,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...o,isInvalidated:!0};case"setState":return{...o,...a.state}}};this.state=i(this.state),Bt.batch(()=>{this.observers.slice().forEach(o=>{o.onQueryUpdate()}),U(this,Ln).notify({query:this,type:"updated",action:a})})},mx);function zx(n,a){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Tx(a.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function my(n,a){return{data:n,dataUpdatedAt:a??Date.now(),error:null,isInvalidated:!1,status:"success"}}function gy(n){const a=typeof n.initialData=="function"?n.initialData():n.initialData,i=a!==void 0,o=i?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:a,dataUpdateCount:0,dataUpdatedAt:i?o??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}var nn,Le,ir,ln,ms,Ai,Hl,or,Oi,zi,gs,ps,ja,Di,Qe,Ko,Vh,Fh,kh,Bh,Gh,qh,Qh,Yh,gx,Dx=(gx=class extends cr{constructor(a,i){super();ye(this,Qe);ye(this,nn);ye(this,Le);ye(this,ir);ye(this,ln);ye(this,ms);ye(this,Ai);ye(this,Hl);ye(this,or);ye(this,Oi);ye(this,zi);ye(this,gs);ye(this,ps);ye(this,ja);ye(this,Di,new Set);this.options=i,ce(this,nn,a),ce(this,Hl,null),this.bindMethods(),this.setOptions(i)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(U(this,Le).addObserver(this),py(U(this,Le),this.options)?De(this,Qe,Ko).call(this):this.updateResult(),De(this,Qe,Gh).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ih(U(this,Le),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ih(U(this,Le),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,De(this,Qe,qh).call(this),De(this,Qe,Qh).call(this),U(this,Le).removeObserver(this)}setOptions(a){const i=this.options,o=U(this,Le);if(this.options=U(this,nn).defaultQueryOptions(a),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ot(this.options.enabled,U(this,Le))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");De(this,Qe,Yh).call(this),U(this,Le).setOptions(this.options),i._defaulted&&!Wd(this.options,i)&&U(this,nn).getQueryCache().notify({type:"observerOptionsUpdated",query:U(this,Le),observer:this});const u=this.hasListeners();u&&vy(U(this,Le),o,this.options,i)&&De(this,Qe,Ko).call(this),this.updateResult(),u&&(U(this,Le)!==o||ot(this.options.enabled,U(this,Le))!==ot(i.enabled,U(this,Le))||ot(this.options.staleTime,U(this,Le))!==ot(i.staleTime,U(this,Le)))&&De(this,Qe,Fh).call(this);const d=De(this,Qe,kh).call(this);u&&(U(this,Le)!==o||ot(this.options.enabled,U(this,Le))!==ot(i.enabled,U(this,Le))||d!==U(this,ja))&&De(this,Qe,Bh).call(this,d)}getOptimisticResult(a){const i=U(this,nn).getQueryCache().build(U(this,nn),a),o=this.createResult(i,a);return Wd(this.getCurrentResult(),o)||(ce(this,ln,o),ce(this,Ai,this.options),ce(this,ms,U(this,Le).state)),o}getCurrentResult(){return U(this,ln)}trackResult(a,i){return new Proxy(a,{get:(o,u)=>(this.trackProp(u),i==null||i(u),Reflect.get(o,u))})}trackProp(a){U(this,Di).add(a)}getCurrentQuery(){return U(this,Le)}refetch({...a}={}){return this.fetch({...a})}fetchOptimistic(a){const i=U(this,nn).defaultQueryOptions(a),o=U(this,nn).getQueryCache().build(U(this,nn),i);let u=()=>{},d;const h=new Promise(m=>{d=m,u=U(this,nn).getQueryCache().subscribe(g=>{g.type==="updated"&&g.query.queryHash===o.queryHash&&o.state.data!==void 0&&(u(),m(this.createResult(o,i)))})});return Promise.race([o.fetch(i).then(()=>{const m=this.createResult(o,i);return d==null||d(m),m}).finally(()=>{u()}),h])}fetch(a){return De(this,Qe,Ko).call(this,{...a,cancelRefetch:a.cancelRefetch??!0}).then(()=>(this.updateResult(),U(this,ln)))}createResult(a,i){var _;const o=U(this,Le),u=this.options,d=U(this,ln),h=U(this,ms),m=U(this,Ai),g=a!==o?a.state:U(this,ir),{state:y}=a;let x={...y},v=!1,S;if(i._optimisticResults){const R=this.hasListeners(),Q=!R&&py(a,i),K=R&&vy(a,o,i,u);(Q||K)&&(x={...x,...zx(y.data,a.options)}),i._optimisticResults==="isRestoring"&&(x.fetchStatus="idle")}let{error:w,errorUpdatedAt:j,status:N}=x;S=x.data;let M=!1;if(i.placeholderData!==void 0&&S===void 0&&N==="pending"){let R;d!=null&&d.isPlaceholderData&&i.placeholderData===(m==null?void 0:m.placeholderData)?(R=d.data,M=!0):R=typeof i.placeholderData=="function"?i.placeholderData((_=U(this,zi))==null?void 0:_.state.data,U(this,zi)):i.placeholderData,R!==void 0&&(N="success",S=Hh(d==null?void 0:d.data,R,i),v=!0)}if(i.select&&S!==void 0&&!M)if(d&&S===(h==null?void 0:h.data)&&i.select===U(this,or))S=U(this,Oi);else try{ce(this,or,i.select),S=i.select(S),S=Hh(d==null?void 0:d.data,S,i),ce(this,Oi,S),ce(this,Hl,null)}catch(R){ce(this,Hl,R)}else S===void 0&&ce(this,Hl,null);U(this,Hl)&&(w=U(this,Hl),S=U(this,Oi),j=Date.now(),N="error",v=!1);const A=x.fetchStatus==="fetching",C=N==="pending",D=N==="error",O=C&&A,z=S!==void 0;return{status:N,fetchStatus:x.fetchStatus,isPending:C,isSuccess:N==="success",isError:D,isInitialLoading:O,isLoading:O,data:S,dataUpdatedAt:x.dataUpdatedAt,error:w,errorUpdatedAt:j,failureCount:x.fetchFailureCount,failureReason:x.fetchFailureReason,errorUpdateCount:x.errorUpdateCount,isFetched:a.isFetched(),isFetchedAfterMount:x.dataUpdateCount>g.dataUpdateCount||x.errorUpdateCount>g.errorUpdateCount,isFetching:A,isRefetching:A&&!C,isLoadingError:D&&!z,isPaused:x.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:D&&z,isStale:bm(a,i),refetch:this.refetch,isEnabled:ot(i.enabled,a)!==!1}}updateResult(){const a=U(this,ln),i=this.createResult(U(this,Le),this.options);if(ce(this,ms,U(this,Le).state),ce(this,Ai,this.options),U(this,ms).data!==void 0&&ce(this,zi,U(this,Le)),Wd(i,a))return;ce(this,ln,i);const u=(()=>{if(!a)return!0;const{notifyOnChangeProps:d}=this.options,h=typeof d=="function"?d():d;if(h==="all"||!h&&!U(this,Di).size)return!0;const m=new Set(h??U(this,Di));return this.options.throwOnError&&m.add("error"),Object.keys(U(this,ln)).some(g=>{const y=g;return U(this,ln)[y]!==a[y]&&m.has(y)})})();Bt.batch(()=>{u&&this.listeners.forEach(d=>{d(U(this,ln))}),U(this,nn).getQueryCache().notify({query:U(this,Le),type:"observerResultsUpdated"})})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&De(this,Qe,Gh).call(this)}},nn=new WeakMap,Le=new WeakMap,ir=new WeakMap,ln=new WeakMap,ms=new WeakMap,Ai=new WeakMap,Hl=new WeakMap,or=new WeakMap,Oi=new WeakMap,zi=new WeakMap,gs=new WeakMap,ps=new WeakMap,ja=new WeakMap,Di=new WeakMap,Qe=new WeakSet,Ko=function(a){De(this,Qe,Yh).call(this);let i=U(this,Le).fetch(this.options,a);return a!=null&&a.throwOnError||(i=i.catch(hn)),i},Vh=function(a){return!xm()&&ot(this.options.enabled,U(this,Le))!==!1&&wx(a)},Fh=function(){De(this,Qe,qh).call(this);const a=ot(this.options.staleTime,U(this,Le));if(U(this,ln).isStale||!De(this,Qe,Vh).call(this,a))return;const i=Nx(U(this,ln).dataUpdatedAt,a)+1;ce(this,gs,rs.setTimeout(()=>{U(this,ln).isStale||this.updateResult()},i))},kh=function(){return ot(this.options.refetchInterval,U(this,Le))??!1},Bh=function(a){De(this,Qe,Qh).call(this),ce(this,ja,a),!(U(this,ja)===0||!De(this,Qe,Vh).call(this,U(this,ja)))&&ce(this,ps,rs.setInterval(()=>{(this.options.refetchIntervalInBackground||Sm.isFocused())&&De(this,Qe,Ko).call(this)},U(this,ja)))},Gh=function(){De(this,Qe,Fh).call(this),De(this,Qe,Bh).call(this,De(this,Qe,kh).call(this))},qh=function(){U(this,gs)!==void 0&&(rs.clearTimeout(U(this,gs)),ce(this,gs,void 0))},Qh=function(){U(this,ps)!==void 0&&(rs.clearInterval(U(this,ps)),ce(this,ps,void 0))},Yh=function(){const a=U(this,nn).getQueryCache().build(U(this,nn),this.options);if(a===U(this,Le))return;const i=U(this,Le);ce(this,Le,a),ce(this,ir,a.state),this.hasListeners()&&(i==null||i.removeObserver(this),a.addObserver(this))},gx);function uj(n,a){return ot(a.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&ot(a.retryOnMount,n)===!1)}function py(n,a){return uj(n,a)||n.state.data!==void 0&&Ih(n,a,a.refetchOnMount)}function Ih(n,a,i){if(ot(a.enabled,n)!==!1&&ot(a.staleTime,n)!=="static"){const o=ot(i,n);return o==="always"||o!==!1&&bm(n,a)}return!1}function vy(n,a,i,o){return(n!==a||ot(o.enabled,n)===!1)&&(!i.suspense||n.state.status!=="error")&&bm(n,i)}function bm(n,a){return ot(a.enabled,n)!==!1&&n.isStaleByTime(ot(a.staleTime,n))}var cj=class extends Dx{constructor(n,a){super(n,a)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(n){n._type="infinite",super.setOptions(n)}getOptimisticResult(n){return n._type="infinite",super.getOptimisticResult(n)}fetchNextPage(n){return this.fetch({...n,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(n){return this.fetch({...n,meta:{fetchMore:{direction:"backward"}}})}createResult(n,a){var w,j;const{state:i}=n,o=super.createResult(n,a),{isFetching:u,isRefetching:d,isError:h,isRefetchError:m}=o,g=(j=(w=i.fetchMeta)==null?void 0:w.fetchMore)==null?void 0:j.direction,y=h&&g==="forward",x=u&&g==="forward",v=h&&g==="backward",S=u&&g==="backward";return{...o,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:ij(a,i.data),hasPreviousPage:oj(a,i.data),isFetchNextPageError:y,isFetchingNextPage:x,isFetchPreviousPageError:v,isFetchingPreviousPage:S,isRefetchError:m&&!y&&!v,isRefetching:d&&!x&&!S}}},rr,cl,Kt,vs,fl,pa,px,fj=(px=class extends Ax{constructor(a){super();ye(this,fl);ye(this,rr);ye(this,cl);ye(this,Kt);ye(this,vs);ce(this,rr,a.client),this.mutationId=a.mutationId,ce(this,Kt,a.mutationCache),ce(this,cl,[]),this.state=a.state||dj(),this.setOptions(a.options),this.scheduleGc()}setOptions(a){this.options=a,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(a){U(this,cl).includes(a)||(U(this,cl).push(a),this.clearGcTimeout(),U(this,Kt).notify({type:"observerAdded",mutation:this,observer:a}))}removeObserver(a){ce(this,cl,U(this,cl).filter(i=>i!==a)),this.scheduleGc(),U(this,Kt).notify({type:"observerRemoved",mutation:this,observer:a})}optionalRemove(){U(this,cl).length||(this.state.status==="pending"?this.scheduleGc():U(this,Kt).remove(this))}continue(){var a;return((a=U(this,vs))==null?void 0:a.continue())??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(a){var m,g,y,x,v,S,w,j,N,M,A,C,D,O,z,_,R,Q;const i=()=>{De(this,fl,pa).call(this,{type:"continue"})},o={client:U(this,rr),meta:this.options.meta,mutationKey:this.options.mutationKey},u=ce(this,vs,Rx({fn:()=>this.options.mutationFn?this.options.mutationFn(a,o):Promise.reject(new Error("No mutationFn found")),onFail:(K,$)=>{De(this,fl,pa).call(this,{type:"failed",failureCount:K,error:$})},onPause:()=>{De(this,fl,pa).call(this,{type:"pause"})},onContinue:i,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>U(this,Kt).canRun(this)})),d=this.state.status==="pending",h=!u.canStart();try{if(d)i();else{De(this,fl,pa).call(this,{type:"pending",variables:a,isPaused:h}),U(this,Kt).config.onMutate&&await U(this,Kt).config.onMutate(a,this,o);const $=await((g=(m=this.options).onMutate)==null?void 0:g.call(m,a,o));$!==this.state.context&&De(this,fl,pa).call(this,{type:"pending",context:$,variables:a,isPaused:h})}const K=await u.start();return await((x=(y=U(this,Kt).config).onSuccess)==null?void 0:x.call(y,K,a,this.state.context,this,o)),await((S=(v=this.options).onSuccess)==null?void 0:S.call(v,K,a,this.state.context,o)),await((j=(w=U(this,Kt).config).onSettled)==null?void 0:j.call(w,K,null,this.state.variables,this.state.context,this,o)),await((M=(N=this.options).onSettled)==null?void 0:M.call(N,K,null,a,this.state.context,o)),De(this,fl,pa).call(this,{type:"success",data:K}),K}catch(K){try{await((C=(A=U(this,Kt).config).onError)==null?void 0:C.call(A,K,a,this.state.context,this,o))}catch($){Promise.reject($)}try{await((O=(D=this.options).onError)==null?void 0:O.call(D,K,a,this.state.context,o))}catch($){Promise.reject($)}try{await((_=(z=U(this,Kt).config).onSettled)==null?void 0:_.call(z,void 0,K,this.state.variables,this.state.context,this,o))}catch($){Promise.reject($)}try{await((Q=(R=this.options).onSettled)==null?void 0:Q.call(R,void 0,K,a,this.state.context,o))}catch($){Promise.reject($)}throw De(this,fl,pa).call(this,{type:"error",error:K}),K}finally{U(this,vs)===u&&ce(this,vs,void 0),U(this,Kt).runNext(this)}}},rr=new WeakMap,cl=new WeakMap,Kt=new WeakMap,vs=new WeakMap,fl=new WeakSet,pa=function(a){const i=o=>{switch(a.type){case"failed":return{...o,failureCount:a.failureCount,failureReason:a.error};case"pause":return{...o,isPaused:!0};case"continue":return{...o,isPaused:!1};case"pending":return{...o,context:a.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:a.isPaused,status:"pending",variables:a.variables,submittedAt:Date.now()};case"success":return{...o,data:a.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...o,data:void 0,error:a.error,failureCount:o.failureCount+1,failureReason:a.error,isPaused:!1,status:"error"}}};this.state=i(this.state),Bt.batch(()=>{U(this,cl).forEach(o=>{o.onMutationUpdate(a)}),U(this,Kt).notify({mutation:this,type:"updated",action:a})})},px);function dj(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var wa,In,ur,vx,hj=(vx=class extends cr{constructor(a={}){super();ye(this,wa);ye(this,In);ye(this,ur);this.config=a,ce(this,wa,new Set),ce(this,In,new Map),ce(this,ur,0)}build(a,i,o){const u=new fj({client:a,mutationCache:this,mutationId:++ku(this,ur)._,options:a.defaultMutationOptions(i),state:o});return this.add(u),u}add(a){U(this,wa).add(a);const i=Bu(a);if(typeof i=="string"){const o=U(this,In).get(i);o?o.push(a):U(this,In).set(i,[a])}this.notify({type:"added",mutation:a})}remove(a){if(U(this,wa).delete(a)){const i=Bu(a);if(typeof i=="string"){const o=U(this,In).get(i);if(o)if(o.length>1){const u=o.indexOf(a);u!==-1&&o.splice(u,1)}else o[0]===a&&U(this,In).delete(i)}}this.notify({type:"removed",mutation:a})}canRun(a){var o;const i=Bu(a);if(typeof i=="string"){const u=(o=U(this,In).get(i))==null?void 0:o.find(d=>d.state.status==="pending");return!u||u===a}else return!0}runNext(a){var o,u;const i=Bu(a);return typeof i=="string"?((u=(o=U(this,In).get(i))==null?void 0:o.find(d=>d!==a&&d.state.isPaused))==null?void 0:u.continue())??Promise.resolve():Promise.resolve()}clear(){Bt.batch(()=>{const a=this.getAll();U(this,wa).clear(),U(this,In).clear(),a.forEach(i=>{this.notify({type:"removed",mutation:i})})})}getAll(){return Array.from(U(this,wa))}find(a){const i={exact:!0,...a};return this.getAll().find(o=>fy(i,o))}findAll(a={}){return this.getAll().filter(i=>fy(a,i))}notify(a){Bt.batch(()=>{this.listeners.forEach(i=>{i(a)})})}resumePausedMutations(){const a=this.getAll().filter(i=>i.state.isPaused);return Bt.batch(()=>Promise.all(a.map(i=>i.continue().catch(hn))))}},wa=new WeakMap,In=new WeakMap,ur=new WeakMap,vx);function Bu(n){var a;return(a=n.options.scope)==null?void 0:a.id}var dl,yx,mj=(yx=class extends cr{constructor(a={}){super();ye(this,dl);this.config=a,ce(this,dl,new Map)}build(a,i,o){const u=i.queryKey,d=i.queryHash??vm(u,i);let h=this.get(d);return h||(h=new rj({client:a,queryKey:u,queryHash:d,options:a.defaultQueryOptions(i),state:o,defaultOptions:a.getQueryDefaults(u)}),this.add(h)),h}add(a){U(this,dl).has(a.queryHash)||(U(this,dl).set(a.queryHash,a),this.notify({type:"added",query:a}))}remove(a){U(this,dl).get(a.queryHash)===a&&(a.destroy(),U(this,dl).delete(a.queryHash),this.notify({type:"removed",query:a}))}clear(){Bt.batch(()=>{this.getAll().forEach(a=>{this.remove(a)})})}get(a){return U(this,dl).get(a)}getAll(){return[...U(this,dl).values()]}find(a){const i={exact:!0,...a};return this.getAll().find(o=>cy(i,o))}findAll(a={}){const i=this.getAll();return Object.keys(a).length>0?i.filter(o=>cy(a,o)):i}notify(a){Bt.batch(()=>{this.listeners.forEach(i=>{i(a)})})}onFocus(){Bt.batch(()=>{this.getAll().forEach(a=>{a.onFocus()})})}onOnline(){Bt.batch(()=>{this.getAll().forEach(a=>{a.onOnline()})})}},dl=new WeakMap,yx),ft,Na,Ca,Li,Hi,Ea,Ui,$i,xx,gj=(xx=class{constructor(n={}){ye(this,ft);ye(this,Na);ye(this,Ca);ye(this,Li);ye(this,Hi);ye(this,Ea);ye(this,Ui);ye(this,$i);ce(this,ft,n.queryCache||new mj),ce(this,Na,n.mutationCache||new hj),ce(this,Ca,n.defaultOptions||{}),ce(this,Li,new Map),ce(this,Hi,new Map),ce(this,Ea,0)}mount(){ku(this,Ea)._++,U(this,Ea)===1&&(ce(this,Ui,Sm.subscribe(async n=>{n&&(await this.resumePausedMutations(),U(this,ft).onFocus())})),ce(this,$i,Zu.subscribe(async n=>{n&&(await this.resumePausedMutations(),U(this,ft).onOnline())})))}unmount(){var n,a;ku(this,Ea)._--,U(this,Ea)===0&&((n=U(this,Ui))==null||n.call(this),ce(this,Ui,void 0),(a=U(this,$i))==null||a.call(this),ce(this,$i,void 0))}isFetching(n){return U(this,ft).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return U(this,Na).findAll({...n,status:"pending"}).length}getQueryData(n){var i;const a=this.defaultQueryOptions({queryKey:n});return(i=U(this,ft).get(a.queryHash))==null?void 0:i.state.data}ensureQueryData(n){const a=this.defaultQueryOptions(n),i=U(this,ft).build(this,a),o=i.state.data;return o===void 0?this.fetchQuery(n):(n.revalidateIfStale&&i.isStaleByTime(ot(a.staleTime,i))&&this.prefetchQuery(a),Promise.resolve(o))}getQueriesData(n){return U(this,ft).findAll(n).map(({queryKey:a,state:i})=>[a,i.data])}setQueryData(n,a,i){var h;const o=this.defaultQueryOptions({queryKey:n}),u=(h=U(this,ft).get(o.queryHash))==null?void 0:h.state.data,d=I2(a,u);if(d!==void 0)return U(this,ft).build(this,o).setData(d,{...i,manual:!0})}setQueriesData(n,a,i){return Bt.batch(()=>U(this,ft).findAll(n).map(({queryKey:o})=>[o,this.setQueryData(o,a,i)]))}getQueryState(n){var i;const a=this.defaultQueryOptions({queryKey:n});return(i=U(this,ft).get(a.queryHash))==null?void 0:i.state}removeQueries(n){const a=U(this,ft);Bt.batch(()=>{a.findAll(n).forEach(i=>{a.remove(i)})})}resetQueries(n,a){const i=U(this,ft);return Bt.batch(()=>{const o=i.findAll(n),u=new Set(o);return o.forEach(d=>{d.reset()}),this.refetchQueries({type:"active",predicate:d=>u.has(d)},a)})}cancelQueries(n,a={}){const i={revert:!0,...a},o=Bt.batch(()=>U(this,ft).findAll(n).map(u=>u.cancel(i)));return Promise.all(o).then(hn).catch(hn)}invalidateQueries(n,a={}){return Bt.batch(()=>(U(this,ft).findAll(n).forEach(i=>{i.invalidate()}),(n==null?void 0:n.refetchType)==="none"?Promise.resolve():this.refetchQueries({...n,type:(n==null?void 0:n.refetchType)??(n==null?void 0:n.type)??"active"},a)))}refetchQueries(n,a={}){const i={...a,cancelRefetch:a.cancelRefetch??!0},o=Bt.batch(()=>U(this,ft).findAll(n).filter(u=>!u.isDisabled()&&!u.isStatic()).map(u=>{let d=u.fetch(void 0,i);return i.throwOnError||(d=d.catch(hn)),u.state.fetchStatus==="paused"?Promise.resolve():d}));return Promise.all(o).then(hn)}async query(n){const a=this.defaultQueryOptions(n);a.retry===void 0&&(a.retry=!1);const i=U(this,ft).build(this,a),o=i.isStaleByTime(ot(a.staleTime,i))?await i.fetch(a):i.state.data,u=a.select;return u?u(o):o}fetchQuery(n){const a=this.defaultQueryOptions(n);a.retry===void 0&&(a.retry=!1);const i=U(this,ft).build(this,a);return i.isStaleByTime(ot(a.staleTime,i))?i.fetch(a):Promise.resolve(i.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(hn).catch(hn)}infiniteQuery(n){return n._type="infinite",this.query(n)}fetchInfiniteQuery(n){return n._type="infinite",this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(hn).catch(hn)}ensureInfiniteQueryData(n){return n._type="infinite",this.ensureQueryData(n)}resumePausedMutations(){return Zu.isOnline()?U(this,Na).resumePausedMutations():Promise.resolve()}getQueryCache(){return U(this,ft)}getMutationCache(){return U(this,Na)}getDefaultOptions(){return U(this,Ca)}setDefaultOptions(n){ce(this,Ca,n)}setQueryDefaults(n,a){U(this,Li).set(er(n),{queryKey:n,defaultOptions:a})}getQueryDefaults(n){const a=[...U(this,Li).values()],i={};return a.forEach(o=>{Vi(n,o.queryKey)&&Object.assign(i,o.defaultOptions)}),i}setMutationDefaults(n,a){U(this,Hi).set(er(n),{mutationKey:n,defaultOptions:a})}getMutationDefaults(n){const a=[...U(this,Hi).values()],i={};return a.forEach(o=>{Vi(n,o.mutationKey)&&Object.assign(i,o.defaultOptions)}),i}defaultQueryOptions(n){if(n._defaulted)return n;const a={...U(this,Ca).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return a.queryHash||(a.queryHash=vm(a.queryKey,a)),a.refetchOnReconnect===void 0&&(a.refetchOnReconnect=a.networkMode!=="always"),a.throwOnError===void 0&&(a.throwOnError=!!a.suspense),!a.networkMode&&a.persister&&(a.networkMode="offlineFirst"),a.queryFn===ym&&(a.enabled=!1),a}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...U(this,Ca).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){U(this,ft).clear(),U(this,Na).clear()}},ft=new WeakMap,Na=new WeakMap,Ca=new WeakMap,Li=new WeakMap,Hi=new WeakMap,Ea=new WeakMap,Ui=new WeakMap,$i=new WeakMap,xx);const Lx=E.createContext(!1),pj=()=>E.useContext(Lx);Lx.Provider;function vj(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}const yj=E.createContext(vj()),xj=()=>E.useContext(yj),Sj=(n,a,i)=>{const o=(i==null?void 0:i.state.status)==="error"&&typeof n.throwOnError=="function"?_x(n.throwOnError,[i.state.error,i]):n.throwOnError;(n.suspense||o)&&(a.isReset()||(n.retryOnMount=!1))},bj=n=>{E.useEffect(()=>{n.clearReset()},[n])},jj=({result:n,errorResetBoundary:a,throwOnError:i,query:o,suspense:u})=>n.isError&&!a.isReset()&&!n.isFetching&&o&&(u&&n.data===void 0||_x(i,[n.error,o])),wj=n=>{if(n.suspense){const i=u=>u==="static"?u:Math.max(u??1e3,1e3),o=n.staleTime;n.staleTime=typeof o=="function"?(...u)=>i(o(...u)):i(o),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},Nj=(n,a)=>(n==null?void 0:n.suspense)&&a.isPending,Cj=(n,a,i)=>a.fetchOptimistic(n).catch(()=>{i.clearReset()});function Hx(n,a,i){const o=pj(),u=xj(),d=jx(),h=d.defaultQueryOptions(n),m=d.getQueryCache().get(h.queryHash),g=n.subscribed!==!1;h._optimisticResults=o?"isRestoring":g?"optimistic":void 0,wj(h),Sj(h,u,m),bj(u);const[y]=E.useState(()=>new a(d,h)),x=y.getOptimisticResult(h),v=!o&&g;if(E.useSyncExternalStore(E.useCallback(S=>{const w=v?y.subscribe(Bt.batchCalls(S)):hn;return y.updateResult(),w},[y,v]),()=>y.getCurrentResult(),()=>y.getCurrentResult()),E.useEffect(()=>{y.setOptions(h)},[h,y]),Nj(h,x))throw Cj(h,y,u);if(jj({result:x,errorResetBoundary:u,throwOnError:h.throwOnError,query:m,suspense:h.suspense}))throw x.error;return h.notifyOnChangeProps?x:y.trackResult(x)}function Un(n,a){return Hx(n,Dx)}function Ej(n,a){return Hx(n,cj)}var jm=Sx();/**
|
|
50
50
|
* @remix-run/router v1.23.4
|
|
51
51
|
*
|
|
52
52
|
* Copyright (c) Remix Software Inc.
|
|
@@ -55,7 +55,7 @@ Error generating stack: `+a.message+`
|
|
|
55
55
|
* LICENSE.md file in the root directory of this source tree.
|
|
56
56
|
*
|
|
57
57
|
* @license MIT
|
|
58
|
-
*/function
|
|
58
|
+
*/function tr(){return tr=Object.assign?Object.assign.bind():function(n){for(var a=1;a<arguments.length;a++){var i=arguments[a];for(var o in i)({}).hasOwnProperty.call(i,o)&&(n[o]=i[o])}return n},tr.apply(null,arguments)}var Ma;(function(n){n.Pop="POP",n.Push="PUSH",n.Replace="REPLACE"})(Ma||(Ma={}));const yy="popstate";function Mj(n){n===void 0&&(n={});function a(o,u){let{pathname:d,search:h,hash:m}=o.location;return Xh("",{pathname:d,search:h,hash:m},u.state&&u.state.usr||null,u.state&&u.state.key||"default")}function i(o,u){return typeof u=="string"?u:$x(u)}return Tj(a,i,null,n)}function bt(n,a){if(n===!1||n===null||typeof n>"u")throw new Error(a)}function Ux(n,a){if(!n){typeof console<"u"&&console.warn(a);try{throw new Error(a)}catch{}}}function _j(){return Math.random().toString(36).substr(2,8)}function xy(n,a){return{usr:n.state,key:n.key,idx:a}}function Xh(n,a,i,o){return i===void 0&&(i=null),tr({pathname:typeof n=="string"?n:n.pathname,search:"",hash:""},typeof a=="string"?ki(a):a,{state:i,key:a&&a.key||o||_j()})}function $x(n){let{pathname:a="/",search:i="",hash:o=""}=n;return i&&i!=="?"&&(a+=i.charAt(0)==="?"?i:"?"+i),o&&o!=="#"&&(a+=o.charAt(0)==="#"?o:"#"+o),a}function ki(n){let a={};if(n){let i=n.indexOf("#");i>=0&&(a.hash=n.substr(i),n=n.substr(0,i));let o=n.indexOf("?");o>=0&&(a.search=n.substr(o),n=n.substr(0,o)),n&&(a.pathname=n)}return a}function Tj(n,a,i,o){o===void 0&&(o={});let{window:u=document.defaultView,v5Compat:d=!1}=o,h=u.history,m=Ma.Pop,g=null,y=x();y==null&&(y=0,h.replaceState(tr({},h.state,{idx:y}),""));function x(){return(h.state||{idx:null}).idx}function v(){m=Ma.Pop;let M=x(),A=M==null?null:M-y;y=M,g&&g({action:m,location:N.location,delta:A})}function S(M,A){m=Ma.Push;let C=Xh(N.location,M,A);y=x()+1;let D=xy(C,y),O=N.createHref(C);try{h.pushState(D,"",O)}catch(z){if(z instanceof DOMException&&z.name==="DataCloneError")throw z;u.location.assign(O)}d&&g&&g({action:m,location:N.location,delta:1})}function w(M,A){m=Ma.Replace;let C=Xh(N.location,M,A);y=x();let D=xy(C,y),O=N.createHref(C);h.replaceState(D,"",O),d&&g&&g({action:m,location:N.location,delta:0})}function j(M){let A=u.location.origin!=="null"?u.location.origin:u.location.href,C=typeof M=="string"?M:$x(M);return C=C.replace(/ $/,"%20"),bt(A,"No window.location.(origin|href) available to create URL for href: "+C),new URL(C,A)}let N={get action(){return m},get location(){return n(u,h)},listen(M){if(g)throw new Error("A history only accepts one active listener");return u.addEventListener(yy,v),g=M,()=>{u.removeEventListener(yy,v),g=null}},createHref(M){return a(u,M)},createURL:j,encodeLocation(M){let A=j(M);return{pathname:A.pathname,search:A.search,hash:A.hash}},push:S,replace:w,go(M){return h.go(M)}};return N}var Sy;(function(n){n.data="data",n.deferred="deferred",n.redirect="redirect",n.error="error"})(Sy||(Sy={}));function Rj(n,a,i){return i===void 0&&(i="/"),Aj(n,a,i)}function Aj(n,a,i,o){let u=typeof a=="string"?ki(a):a,d=Gx(u.pathname||"/",i);if(d==null)return null;let h=Vx(n);Oj(h);let m=null,g=Bx(d);for(let y=0;m==null&&y<h.length;++y)m=kj(h[y],g);return m}function Vx(n,a,i,o){a===void 0&&(a=[]),i===void 0&&(i=[]),o===void 0&&(o="");let u=(d,h,m)=>{let g={relativePath:m===void 0?d.path||"":m,caseSensitive:d.caseSensitive===!0,childrenIndex:h,route:d};g.relativePath.startsWith("/")&&(bt(g.relativePath.startsWith(o),'Absolute route path "'+g.relativePath+'" nested under path '+('"'+o+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),g.relativePath=g.relativePath.slice(o.length));let y=ys([o,g.relativePath]),x=i.concat(g);d.children&&d.children.length>0&&(bt(d.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+y+'".')),Vx(d.children,a,x,y)),!(d.path==null&&!d.index)&&a.push({path:y,score:Vj(y,d.index),routesMeta:x})};return n.forEach((d,h)=>{var m;if(d.path===""||!((m=d.path)!=null&&m.includes("?")))u(d,h);else for(let g of Fx(d.path))u(d,h,g)}),a}function Fx(n){let a=n.split("/");if(a.length===0)return[];let[i,...o]=a,u=i.endsWith("?"),d=i.replace(/\?$/,"");if(o.length===0)return u?[d,""]:[d];let h=Fx(o.join("/")),m=[];return m.push(...h.map(g=>g===""?d:[d,g].join("/"))),u&&m.push(...h),m.map(g=>n.startsWith("/")&&g===""?"/":g)}function Oj(n){n.sort((a,i)=>a.score!==i.score?i.score-a.score:Fj(a.routesMeta.map(o=>o.childrenIndex),i.routesMeta.map(o=>o.childrenIndex)))}const zj=/^:[\w-]+$/,Dj=3,Lj=2,Hj=1,Uj=10,$j=-2,by=n=>n==="*";function Vj(n,a){let i=n.split("/"),o=i.length;return i.some(by)&&(o+=$j),a&&(o+=Lj),i.filter(u=>!by(u)).reduce((u,d)=>u+(zj.test(d)?Dj:d===""?Hj:Uj),o)}function Fj(n,a){return n.length===a.length&&n.slice(0,-1).every((o,u)=>o===a[u])?n[n.length-1]-a[a.length-1]:0}function kj(n,a,i){let{routesMeta:o}=n,u={},d="/",h=[];for(let m=0;m<o.length;++m){let g=o[m],y=m===o.length-1,x=d==="/"?a:a.slice(d.length)||"/",v=kx({path:g.relativePath,caseSensitive:g.caseSensitive,end:y},x),S=g.route;if(!v)return null;Object.assign(u,v.params),h.push({params:u,pathname:ys([d,v.pathname]),pathnameBase:Ij(ys([d,v.pathnameBase])),route:S}),v.pathnameBase!=="/"&&(d=ys([d,v.pathnameBase]))}return h}function kx(n,a){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[i,o]=Bj(n.path,n.caseSensitive,n.end),u=a.match(i);if(!u)return null;let d=u[0],h=d.replace(/(.)\/+$/,"$1"),m=u.slice(1);return{params:o.reduce((y,x,v)=>{let{paramName:S,isOptional:w}=x;if(S==="*"){let N=m[v]||"";h=d.slice(0,d.length-N.length).replace(/(.)\/+$/,"$1")}const j=m[v];return w&&!j?y[S]=void 0:y[S]=(j||"").replace(/%2F/g,"/"),y},{}),pathname:d,pathnameBase:h,pattern:n}}function Bj(n,a,i){a===void 0&&(a=!1),i===void 0&&(i=!0),Ux(n==="*"||!n.endsWith("*")||n.endsWith("/*"),'Route path "'+n+'" will be treated as if it were '+('"'+n.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+n.replace(/\*$/,"/*")+'".'));let o=[],u="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(h,m,g)=>(o.push({paramName:m,isOptional:g!=null}),g?"/?([^\\/]+)?":"/([^\\/]+)"));return n.endsWith("*")?(o.push({paramName:"*"}),u+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?u+="\\/*$":n!==""&&n!=="/"&&(u+="(?:(?=\\/|$))"),[new RegExp(u,a?void 0:"i"),o]}function Bx(n){try{return n.split("/").map(a=>decodeURIComponent(a).replace(/\//g,"%2F")).join("/")}catch(a){return Ux(!1,'The URL path "'+n+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+a+").")),n}}function Gx(n,a){if(a==="/")return n;if(!n.toLowerCase().startsWith(a.toLowerCase()))return null;let i=a.endsWith("/")?a.length-1:a.length,o=n.charAt(i);return o&&o!=="/"?null:n.slice(i)||"/"}function Gj(n,a){a===void 0&&(a="/");let{pathname:i,search:o="",hash:u=""}=typeof n=="string"?ki(n):n,d;return i?(i=qx(i),i.startsWith("/")?d=jy(i.substring(1),"/"):d=jy(i,a)):d=a,{pathname:d,search:Xj(o),hash:Kj(u)}}function jy(n,a){let i=a.replace(/\/+$/,"").split("/");return n.split("/").forEach(u=>{u===".."?i.length>1&&i.pop():u!=="."&&i.push(u)}),i.length>1?i.join("/"):"/"}function eh(n,a,i,o){return"Cannot include a '"+n+"' character in a manually specified "+("`to."+a+"` field ["+JSON.stringify(o)+"]. Please separate it out to the ")+("`to."+i+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function qj(n){return n.filter((a,i)=>i===0||a.route.path&&a.route.path.length>0)}function Qj(n,a){let i=qj(n);return a?i.map((o,u)=>u===i.length-1?o.pathname:o.pathnameBase):i.map(o=>o.pathnameBase)}function Yj(n,a,i,o){o===void 0&&(o=!1);let u;typeof n=="string"?u=ki(n):(u=tr({},n),bt(!u.pathname||!u.pathname.includes("?"),eh("?","pathname","search",u)),bt(!u.pathname||!u.pathname.includes("#"),eh("#","pathname","hash",u)),bt(!u.search||!u.search.includes("#"),eh("#","search","hash",u)));let d=n===""||u.pathname==="",h=d?"/":u.pathname,m;if(h==null)m=i;else{let v=a.length-1;if(!o&&h.startsWith("..")){let S=h.split("/");for(;S[0]==="..";)S.shift(),v-=1;u.pathname=S.join("/")}m=v>=0?a[v]:"/"}let g=Gj(u,m),y=h&&h!=="/"&&h.endsWith("/"),x=(d||h===".")&&i.endsWith("/");return!g.pathname.endsWith("/")&&(y||x)&&(g.pathname+="/"),g}const qx=n=>n.replace(/\/\/+/g,"/"),ys=n=>qx(n.join("/")),Ij=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),Xj=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,Kj=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n;function Pj(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}const Qx=["post","put","patch","delete"];new Set(Qx);const Zj=["get",...Qx];new Set(Zj);/**
|
|
59
59
|
* React Router v6.30.6
|
|
60
60
|
*
|
|
61
61
|
* Copyright (c) Remix Software Inc.
|
|
@@ -64,7 +64,7 @@ Error generating stack: `+a.message+`
|
|
|
64
64
|
* LICENSE.md file in the root directory of this source tree.
|
|
65
65
|
*
|
|
66
66
|
* @license MIT
|
|
67
|
-
*/function
|
|
67
|
+
*/function nr(){return nr=Object.assign?Object.assign.bind():function(n){for(var a=1;a<arguments.length;a++){var i=arguments[a];for(var o in i)({}).hasOwnProperty.call(i,o)&&(n[o]=i[o])}return n},nr.apply(null,arguments)}const wm=E.createContext(null),Jj=E.createContext(null),ic=E.createContext(null),oc=E.createContext(null),bs=E.createContext({outlet:null,matches:[],isDataRoute:!1}),Yx=E.createContext(null);function fr(){return E.useContext(oc)!=null}function rc(){return fr()||bt(!1),E.useContext(oc).location}function Wj(n){fr()||bt(!1);let{pathname:a}=rc();return E.useMemo(()=>kx(n,Bx(a)),[a,n])}function Ix(n){E.useContext(ic).static||E.useLayoutEffect(n)}function Nm(){let{isDataRoute:n}=E.useContext(bs);return n?hw():ew()}function ew(){fr()||bt(!1);let n=E.useContext(wm),{basename:a,future:i,navigator:o}=E.useContext(ic),{matches:u}=E.useContext(bs),{pathname:d}=rc(),h=JSON.stringify(Qj(u,i.v7_relativeSplatPath)),m=E.useRef(!1);return Ix(()=>{m.current=!0}),E.useCallback(function(y,x){if(x===void 0&&(x={}),!m.current)return;if(typeof y=="number"){o.go(y);return}let v=Yj(y,JSON.parse(h),d,x.relative==="path");n==null&&a!=="/"&&(v.pathname=v.pathname==="/"?a:ys([a,v.pathname])),(x.replace?o.replace:o.push)(v,x.state,x)},[a,o,h,d,n])}function tw(){let{matches:n}=E.useContext(bs),a=n[n.length-1];return a?a.params:{}}function nw(n,a){return lw(n,a)}function lw(n,a,i,o){fr()||bt(!1);let{navigator:u}=E.useContext(ic),{matches:d}=E.useContext(bs),h=d[d.length-1],m=h?h.params:{};h&&h.pathname;let g=h?h.pathnameBase:"/";h&&h.route;let y=rc(),x;if(a){var v;let M=typeof a=="string"?ki(a):a;g==="/"||(v=M.pathname)!=null&&v.startsWith(g)||bt(!1),x=M}else x=y;let S=x.pathname||"/",w=S;if(g!=="/"){let M=g.replace(/^\//,"").split("/");w="/"+S.replace(/^\//,"").split("/").slice(M.length).join("/")}let j=Rj(n,{pathname:w}),N=rw(j&&j.map(M=>Object.assign({},M,{params:Object.assign({},m,M.params),pathname:ys([g,u.encodeLocation?u.encodeLocation(M.pathname).pathname:M.pathname]),pathnameBase:M.pathnameBase==="/"?g:ys([g,u.encodeLocation?u.encodeLocation(M.pathnameBase).pathname:M.pathnameBase])})),d,i,o);return a&&N?E.createElement(oc.Provider,{value:{location:nr({pathname:"/",search:"",hash:"",state:null,key:"default"},x),navigationType:Ma.Pop}},N):N}function aw(){let n=dw(),a=Pj(n)?n.status+" "+n.statusText:n instanceof Error?n.message:JSON.stringify(n),i=n instanceof Error?n.stack:null,u={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},a),i?E.createElement("pre",{style:u},i):null,null)}const sw=E.createElement(aw,null);class iw extends E.Component{constructor(a){super(a),this.state={location:a.location,revalidation:a.revalidation,error:a.error}}static getDerivedStateFromError(a){return{error:a}}static getDerivedStateFromProps(a,i){return i.location!==a.location||i.revalidation!=="idle"&&a.revalidation==="idle"?{error:a.error,location:a.location,revalidation:a.revalidation}:{error:a.error!==void 0?a.error:i.error,location:i.location,revalidation:a.revalidation||i.revalidation}}componentDidCatch(a,i){console.error("React Router caught the following error during render",a,i)}render(){return this.state.error!==void 0?E.createElement(bs.Provider,{value:this.props.routeContext},E.createElement(Yx.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ow(n){let{routeContext:a,match:i,children:o}=n,u=E.useContext(wm);return u&&u.static&&u.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(u.staticContext._deepestRenderedBoundaryId=i.route.id),E.createElement(bs.Provider,{value:a},o)}function rw(n,a,i,o){var u;if(a===void 0&&(a=[]),i===void 0&&(i=null),o===void 0&&(o=null),n==null){var d;if(!i)return null;if(i.errors)n=i.matches;else if((d=o)!=null&&d.v7_partialHydration&&a.length===0&&!i.initialized&&i.matches.length>0)n=i.matches;else return null}let h=n,m=(u=i)==null?void 0:u.errors;if(m!=null){let x=h.findIndex(v=>v.route.id&&(m==null?void 0:m[v.route.id])!==void 0);x>=0||bt(!1),h=h.slice(0,Math.min(h.length,x+1))}let g=!1,y=-1;if(i&&o&&o.v7_partialHydration)for(let x=0;x<h.length;x++){let v=h[x];if((v.route.HydrateFallback||v.route.hydrateFallbackElement)&&(y=x),v.route.id){let{loaderData:S,errors:w}=i,j=v.route.loader&&S[v.route.id]===void 0&&(!w||w[v.route.id]===void 0);if(v.route.lazy||j){g=!0,y>=0?h=h.slice(0,y+1):h=[h[0]];break}}}return h.reduceRight((x,v,S)=>{let w,j=!1,N=null,M=null;i&&(w=m&&v.route.id?m[v.route.id]:void 0,N=v.route.errorElement||sw,g&&(y<0&&S===0?(mw("route-fallback"),j=!0,M=null):y===S&&(j=!0,M=v.route.hydrateFallbackElement||null)));let A=a.concat(h.slice(0,S+1)),C=()=>{let D;return w?D=N:j?D=M:v.route.Component?D=E.createElement(v.route.Component,null):v.route.element?D=v.route.element:D=x,E.createElement(ow,{match:v,routeContext:{outlet:x,matches:A,isDataRoute:i!=null},children:D})};return i&&(v.route.ErrorBoundary||v.route.errorElement||S===0)?E.createElement(iw,{location:i.location,revalidation:i.revalidation,component:N,error:w,children:C(),routeContext:{outlet:null,matches:A,isDataRoute:!0}}):C()},null)}var Xx=(function(n){return n.UseBlocker="useBlocker",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n})(Xx||{}),Kx=(function(n){return n.UseBlocker="useBlocker",n.UseLoaderData="useLoaderData",n.UseActionData="useActionData",n.UseRouteError="useRouteError",n.UseNavigation="useNavigation",n.UseRouteLoaderData="useRouteLoaderData",n.UseMatches="useMatches",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n.UseRouteId="useRouteId",n})(Kx||{});function uw(n){let a=E.useContext(wm);return a||bt(!1),a}function cw(n){let a=E.useContext(Jj);return a||bt(!1),a}function fw(n){let a=E.useContext(bs);return a||bt(!1),a}function Px(n){let a=fw(),i=a.matches[a.matches.length-1];return i.route.id||bt(!1),i.route.id}function dw(){var n;let a=E.useContext(Yx),i=cw(),o=Px();return a!==void 0?a:(n=i.errors)==null?void 0:n[o]}function hw(){let{router:n}=uw(Xx.UseNavigateStable),a=Px(Kx.UseNavigateStable),i=E.useRef(!1);return Ix(()=>{i.current=!0}),E.useCallback(function(u,d){d===void 0&&(d={}),i.current&&(typeof u=="number"?n.navigate(u):n.navigate(u,nr({fromRouteId:a},d)))},[n,a])}const wy={};function mw(n,a,i){wy[n]||(wy[n]=!0)}function gw(n,a){n==null||n.v7_startTransition,n==null||n.v7_relativeSplatPath}function Kh(n){bt(!1)}function pw(n){let{basename:a="/",children:i=null,location:o,navigationType:u=Ma.Pop,navigator:d,static:h=!1,future:m}=n;fr()&&bt(!1);let g=a.replace(/^\/*/,"/"),y=E.useMemo(()=>({basename:g,navigator:d,static:h,future:nr({v7_relativeSplatPath:!1},m)}),[g,m,d,h]);typeof o=="string"&&(o=ki(o));let{pathname:x="/",search:v="",hash:S="",state:w=null,key:j="default"}=o,N=E.useMemo(()=>{let M=Gx(x,g);return M==null?null:{location:{pathname:M,search:v,hash:S,state:w,key:j},navigationType:u}},[g,x,v,S,w,j,u]);return N==null?null:E.createElement(ic.Provider,{value:y},E.createElement(oc.Provider,{children:i,value:N}))}function vw(n){let{children:a,location:i}=n;return nw(Ph(a),i)}new Promise(()=>{});function Ph(n,a){a===void 0&&(a=[]);let i=[];return E.Children.forEach(n,(o,u)=>{if(!E.isValidElement(o))return;let d=[...a,u];if(o.type===E.Fragment){i.push.apply(i,Ph(o.props.children,d));return}o.type!==Kh&&bt(!1),!o.props.index||!o.props.children||bt(!1);let h={id:o.props.id||d.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,loader:o.props.loader,action:o.props.action,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(h.children=Ph(o.props.children,d)),i.push(h)}),i}/**
|
|
68
68
|
* React Router DOM v6.30.6
|
|
69
69
|
*
|
|
70
70
|
* Copyright (c) Remix Software Inc.
|
|
@@ -73,198 +73,198 @@ Error generating stack: `+a.message+`
|
|
|
73
73
|
* LICENSE.md file in the root directory of this source tree.
|
|
74
74
|
*
|
|
75
75
|
* @license MIT
|
|
76
|
-
*/function
|
|
76
|
+
*/function Zh(n){return n===void 0&&(n=""),new URLSearchParams(typeof n=="string"||Array.isArray(n)||n instanceof URLSearchParams?n:Object.keys(n).reduce((a,i)=>{let o=n[i];return a.concat(Array.isArray(o)?o.map(u=>[i,u]):[[i,o]])},[]))}function yw(n,a){let i=Zh(n);return a&&a.forEach((o,u)=>{i.has(u)||a.getAll(u).forEach(d=>{i.append(u,d)})}),i}const xw="6";try{window.__reactRouterVersion=xw}catch{}const Sw="startTransition",Ny=L2[Sw];function bw(n){let{basename:a,children:i,future:o,window:u}=n,d=E.useRef();d.current==null&&(d.current=Mj({window:u,v5Compat:!0}));let h=d.current,[m,g]=E.useState({action:h.action,location:h.location}),{v7_startTransition:y}=o||{},x=E.useCallback(v=>{y&&Ny?Ny(()=>g(v)):g(v)},[g,y]);return E.useLayoutEffect(()=>h.listen(x),[h,x]),E.useEffect(()=>gw(o),[o]),E.createElement(pw,{basename:a,children:i,location:m.location,navigationType:m.action,navigator:h,future:o})}var Cy;(function(n){n.UseScrollRestoration="useScrollRestoration",n.UseSubmit="useSubmit",n.UseSubmitFetcher="useSubmitFetcher",n.UseFetcher="useFetcher",n.useViewTransitionState="useViewTransitionState"})(Cy||(Cy={}));var Ey;(function(n){n.UseFetcher="useFetcher",n.UseFetchers="useFetchers",n.UseScrollRestoration="useScrollRestoration"})(Ey||(Ey={}));function jw(n){let a=E.useRef(Zh(n)),i=E.useRef(!1),o=rc(),u=E.useMemo(()=>yw(o.search,i.current?null:a.current),[o.search]),d=Nm(),h=E.useCallback((m,g)=>{const y=Zh(typeof m=="function"?m(u):m);i.current=!0,d("?"+y,g)},[d,u]);return[u,h]}function ww(n){const a=n.replace(/^\/+/,"").replace(/\/+$/,"");return a?`/${a}`:""}const tn=typeof window>"u"?void 0:window.$isabl,Kn={apiHost:((tn==null?void 0:tn.apiHost)??"").replace(/\/$/,""),basePath:ww((tn==null?void 0:tn.basePath)??"/wgts"),theme:(tn==null?void 0:tn.theme)==="sand"?"th-sand":(tn==null?void 0:tn.theme)==="msk"?"th-msk":"th-clean",isablUiUrl:((tn==null?void 0:tn.isablUiUrl)??"/beta").replace(/\/+$/,"")};function Zx(n){return`${Kn.isablUiUrl}/explorer?r=analyses:${n}`}const Jh="user-token";/**
|
|
77
77
|
* @license lucide-react v0.468.0 - ISC
|
|
78
78
|
*
|
|
79
79
|
* This source code is licensed under the ISC license.
|
|
80
80
|
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
-
*/const
|
|
81
|
+
*/const Nw=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Jx=(...n)=>n.filter((a,i,o)=>!!a&&a.trim()!==""&&o.indexOf(a)===i).join(" ").trim();/**
|
|
82
82
|
* @license lucide-react v0.468.0 - ISC
|
|
83
83
|
*
|
|
84
84
|
* This source code is licensed under the ISC license.
|
|
85
85
|
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
-
*/var
|
|
86
|
+
*/var Cw={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"};/**
|
|
87
87
|
* @license lucide-react v0.468.0 - ISC
|
|
88
88
|
*
|
|
89
89
|
* This source code is licensed under the ISC license.
|
|
90
90
|
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
-
*/const
|
|
91
|
+
*/const Ew=E.forwardRef(({color:n="currentColor",size:a=24,strokeWidth:i=2,absoluteStrokeWidth:o,className:u="",children:d,iconNode:h,...m},g)=>E.createElement("svg",{ref:g,...Cw,width:a,height:a,stroke:n,strokeWidth:o?Number(i)*24/Number(a):i,className:Jx("lucide",u),...m},[...h.map(([y,x])=>E.createElement(y,x)),...Array.isArray(d)?d:[d]]));/**
|
|
92
92
|
* @license lucide-react v0.468.0 - ISC
|
|
93
93
|
*
|
|
94
94
|
* This source code is licensed under the ISC license.
|
|
95
95
|
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
-
*/const
|
|
96
|
+
*/const $e=(n,a)=>{const i=E.forwardRef(({className:o,...u},d)=>E.createElement(Ew,{ref:d,iconNode:a,className:Jx(`lucide-${Nw(n)}`,o),...u}));return i.displayName=`${n}`,i};/**
|
|
97
97
|
* @license lucide-react v0.468.0 - ISC
|
|
98
98
|
*
|
|
99
99
|
* This source code is licensed under the ISC license.
|
|
100
100
|
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
-
*/const
|
|
101
|
+
*/const Mw=$e("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
|
|
102
102
|
* @license lucide-react v0.468.0 - ISC
|
|
103
103
|
*
|
|
104
104
|
* This source code is licensed under the ISC license.
|
|
105
105
|
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
-
*/const
|
|
106
|
+
*/const Ju=$e("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
|
|
107
107
|
* @license lucide-react v0.468.0 - ISC
|
|
108
108
|
*
|
|
109
109
|
* This source code is licensed under the ISC license.
|
|
110
110
|
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
-
*/const
|
|
111
|
+
*/const _w=$e("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
|
|
112
112
|
* @license lucide-react v0.468.0 - ISC
|
|
113
113
|
*
|
|
114
114
|
* This source code is licensed under the ISC license.
|
|
115
115
|
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
-
*/const
|
|
116
|
+
*/const Wx=$e("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
|
|
117
117
|
* @license lucide-react v0.468.0 - ISC
|
|
118
118
|
*
|
|
119
119
|
* This source code is licensed under the ISC license.
|
|
120
120
|
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
-
*/const
|
|
121
|
+
*/const Tw=$e("AudioWaveform",[["path",{d:"M2 13a2 2 0 0 0 2-2V7a2 2 0 0 1 4 0v13a2 2 0 0 0 4 0V4a2 2 0 0 1 4 0v13a2 2 0 0 0 4 0v-4a2 2 0 0 1 2-2",key:"57tc96"}]]);/**
|
|
122
122
|
* @license lucide-react v0.468.0 - ISC
|
|
123
123
|
*
|
|
124
124
|
* This source code is licensed under the ISC license.
|
|
125
125
|
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
-
*/const
|
|
126
|
+
*/const Rw=$e("ChartPie",[["path",{d:"M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z",key:"pzmjnu"}],["path",{d:"M21.21 15.89A10 10 0 1 1 8 2.83",key:"k2fpak"}]]);/**
|
|
127
127
|
* @license lucide-react v0.468.0 - ISC
|
|
128
128
|
*
|
|
129
129
|
* This source code is licensed under the ISC license.
|
|
130
130
|
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
-
*/const
|
|
131
|
+
*/const e1=$e("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
132
132
|
* @license lucide-react v0.468.0 - ISC
|
|
133
133
|
*
|
|
134
134
|
* This source code is licensed under the ISC license.
|
|
135
135
|
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
-
*/const
|
|
136
|
+
*/const t1=$e("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
137
137
|
* @license lucide-react v0.468.0 - ISC
|
|
138
138
|
*
|
|
139
139
|
* This source code is licensed under the ISC license.
|
|
140
140
|
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
-
*/const
|
|
141
|
+
*/const Cm=$e("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
142
142
|
* @license lucide-react v0.468.0 - ISC
|
|
143
143
|
*
|
|
144
144
|
* This source code is licensed under the ISC license.
|
|
145
145
|
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
-
*/const
|
|
146
|
+
*/const Aw=$e("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"}]]);/**
|
|
147
147
|
* @license lucide-react v0.468.0 - ISC
|
|
148
148
|
*
|
|
149
149
|
* This source code is licensed under the ISC license.
|
|
150
150
|
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
-
*/const
|
|
151
|
+
*/const Ow=$e("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
152
152
|
* @license lucide-react v0.468.0 - ISC
|
|
153
153
|
*
|
|
154
154
|
* This source code is licensed under the ISC license.
|
|
155
155
|
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
-
*/const
|
|
156
|
+
*/const zw=$e("CircleDashed",[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]]);/**
|
|
157
157
|
* @license lucide-react v0.468.0 - ISC
|
|
158
158
|
*
|
|
159
159
|
* This source code is licensed under the ISC license.
|
|
160
160
|
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
-
*/const
|
|
161
|
+
*/const n1=$e("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
|
162
162
|
* @license lucide-react v0.468.0 - ISC
|
|
163
163
|
*
|
|
164
164
|
* This source code is licensed under the ISC license.
|
|
165
165
|
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
-
*/const
|
|
166
|
+
*/const Wh=$e("Crosshair",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"22",x2:"18",y1:"12",y2:"12",key:"l9bcsi"}],["line",{x1:"6",x2:"2",y1:"12",y2:"12",key:"13hhkx"}],["line",{x1:"12",x2:"12",y1:"6",y2:"2",key:"10w3f3"}],["line",{x1:"12",x2:"12",y1:"22",y2:"18",key:"15g9kq"}]]);/**
|
|
167
167
|
* @license lucide-react v0.468.0 - ISC
|
|
168
168
|
*
|
|
169
169
|
* This source code is licensed under the ISC license.
|
|
170
170
|
* See the LICENSE file in the root directory of this source tree.
|
|
171
|
-
*/const
|
|
171
|
+
*/const uc=$e("Dna",[["path",{d:"m10 16 1.5 1.5",key:"11lckj"}],["path",{d:"m14 8-1.5-1.5",key:"1ohn8i"}],["path",{d:"M15 2c-1.798 1.998-2.518 3.995-2.807 5.993",key:"80uv8i"}],["path",{d:"m16.5 10.5 1 1",key:"696xn5"}],["path",{d:"m17 6-2.891-2.891",key:"xu6p2f"}],["path",{d:"M2 15c6.667-6 13.333 0 20-6",key:"1pyr53"}],["path",{d:"m20 9 .891.891",key:"3xwk7g"}],["path",{d:"M3.109 14.109 4 15",key:"q76aoh"}],["path",{d:"m6.5 12.5 1 1",key:"cs35ky"}],["path",{d:"m7 18 2.891 2.891",key:"1sisit"}],["path",{d:"M9 22c1.798-1.998 2.518-3.995 2.807-5.993",key:"q3hbxp"}]]);/**
|
|
172
172
|
* @license lucide-react v0.468.0 - ISC
|
|
173
173
|
*
|
|
174
174
|
* This source code is licensed under the ISC license.
|
|
175
175
|
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
-
*/const
|
|
176
|
+
*/const l1=$e("FlaskConical",[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]]);/**
|
|
177
177
|
* @license lucide-react v0.468.0 - ISC
|
|
178
178
|
*
|
|
179
179
|
* This source code is licensed under the ISC license.
|
|
180
180
|
* See the LICENSE file in the root directory of this source tree.
|
|
181
|
-
*/const
|
|
181
|
+
*/const Dw=$e("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/**
|
|
182
182
|
* @license lucide-react v0.468.0 - ISC
|
|
183
183
|
*
|
|
184
184
|
* This source code is licensed under the ISC license.
|
|
185
185
|
* See the LICENSE file in the root directory of this source tree.
|
|
186
|
-
*/const
|
|
186
|
+
*/const Lw=$e("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
|
187
187
|
* @license lucide-react v0.468.0 - ISC
|
|
188
188
|
*
|
|
189
189
|
* This source code is licensed under the ISC license.
|
|
190
190
|
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
-
*/const
|
|
191
|
+
*/const Hw=$e("LayoutGrid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);/**
|
|
192
192
|
* @license lucide-react v0.468.0 - ISC
|
|
193
193
|
*
|
|
194
194
|
* This source code is licensed under the ISC license.
|
|
195
195
|
* See the LICENSE file in the root directory of this source tree.
|
|
196
|
-
*/const
|
|
196
|
+
*/const Uw=$e("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/**
|
|
197
197
|
* @license lucide-react v0.468.0 - ISC
|
|
198
198
|
*
|
|
199
199
|
* This source code is licensed under the ISC license.
|
|
200
200
|
* See the LICENSE file in the root directory of this source tree.
|
|
201
|
-
*/const
|
|
201
|
+
*/const $w=$e("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
|
|
202
202
|
* @license lucide-react v0.468.0 - ISC
|
|
203
203
|
*
|
|
204
204
|
* This source code is licensed under the ISC license.
|
|
205
205
|
* See the LICENSE file in the root directory of this source tree.
|
|
206
|
-
*/const
|
|
206
|
+
*/const Vw=$e("Microscope",[["path",{d:"M6 18h8",key:"1borvv"}],["path",{d:"M3 22h18",key:"8prr45"}],["path",{d:"M14 22a7 7 0 1 0 0-14h-1",key:"1jwaiy"}],["path",{d:"M9 14h2",key:"197e7h"}],["path",{d:"M9 12a2 2 0 0 1-2-2V6h6v4a2 2 0 0 1-2 2Z",key:"1bmzmy"}],["path",{d:"M12 6V3a1 1 0 0 0-1-1H9a1 1 0 0 0-1 1v3",key:"1drr47"}]]);/**
|
|
207
207
|
* @license lucide-react v0.468.0 - ISC
|
|
208
208
|
*
|
|
209
209
|
* This source code is licensed under the ISC license.
|
|
210
210
|
* See the LICENSE file in the root directory of this source tree.
|
|
211
|
-
*/const
|
|
211
|
+
*/const Fw=$e("Minimize2",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
|
|
212
212
|
* @license lucide-react v0.468.0 - ISC
|
|
213
213
|
*
|
|
214
214
|
* This source code is licensed under the ISC license.
|
|
215
215
|
* See the LICENSE file in the root directory of this source tree.
|
|
216
|
-
*/const
|
|
216
|
+
*/const kw=$e("PanelLeftClose",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]]);/**
|
|
217
217
|
* @license lucide-react v0.468.0 - ISC
|
|
218
218
|
*
|
|
219
219
|
* This source code is licensed under the ISC license.
|
|
220
220
|
* See the LICENSE file in the root directory of this source tree.
|
|
221
|
-
*/const
|
|
221
|
+
*/const Bw=$e("PanelLeftOpen",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]]);/**
|
|
222
222
|
* @license lucide-react v0.468.0 - ISC
|
|
223
223
|
*
|
|
224
224
|
* This source code is licensed under the ISC license.
|
|
225
225
|
* See the LICENSE file in the root directory of this source tree.
|
|
226
|
-
*/const
|
|
226
|
+
*/const Wu=$e("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
227
227
|
* @license lucide-react v0.468.0 - ISC
|
|
228
228
|
*
|
|
229
229
|
* This source code is licensed under the ISC license.
|
|
230
230
|
* See the LICENSE file in the root directory of this source tree.
|
|
231
|
-
*/const
|
|
231
|
+
*/const Gw=$e("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/**
|
|
232
232
|
* @license lucide-react v0.468.0 - ISC
|
|
233
233
|
*
|
|
234
234
|
* This source code is licensed under the ISC license.
|
|
235
235
|
* See the LICENSE file in the root directory of this source tree.
|
|
236
|
-
*/const
|
|
236
|
+
*/const qw=$e("Shuffle",[["path",{d:"m18 14 4 4-4 4",key:"10pe0f"}],["path",{d:"m18 2 4 4-4 4",key:"pucp1d"}],["path",{d:"M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22",key:"1ailkh"}],["path",{d:"M2 6h1.972a4 4 0 0 1 3.6 2.2",key:"km57vx"}],["path",{d:"M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45",key:"os18l9"}]]);/**
|
|
237
237
|
* @license lucide-react v0.468.0 - ISC
|
|
238
238
|
*
|
|
239
239
|
* This source code is licensed under the ISC license.
|
|
240
240
|
* See the LICENSE file in the root directory of this source tree.
|
|
241
|
-
*/const
|
|
241
|
+
*/const a1=$e("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
242
242
|
* @license lucide-react v0.468.0 - ISC
|
|
243
243
|
*
|
|
244
244
|
* This source code is licensed under the ISC license.
|
|
245
245
|
* See the LICENSE file in the root directory of this source tree.
|
|
246
|
-
*/const
|
|
246
|
+
*/const Qw=$e("UserRound",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]]);/**
|
|
247
247
|
* @license lucide-react v0.468.0 - ISC
|
|
248
248
|
*
|
|
249
249
|
* This source code is licensed under the ISC license.
|
|
250
250
|
* See the LICENSE file in the root directory of this source tree.
|
|
251
|
-
*/const
|
|
251
|
+
*/const Yw=$e("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
|
|
252
252
|
* @license lucide-react v0.468.0 - ISC
|
|
253
253
|
*
|
|
254
254
|
* This source code is licensed under the ISC license.
|
|
255
255
|
* See the LICENSE file in the root directory of this source tree.
|
|
256
|
-
*/const
|
|
256
|
+
*/const Iw=$e("Waves",[["path",{d:"M2 6c.6.5 1.2 1 2.5 1C7 7 7 5 9.5 5c2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"knzxuh"}],["path",{d:"M2 12c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"2jd2cc"}],["path",{d:"M2 18c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"rd2r6e"}]]);/**
|
|
257
257
|
* @license lucide-react v0.468.0 - ISC
|
|
258
258
|
*
|
|
259
259
|
* This source code is licensed under the ISC license.
|
|
260
260
|
* See the LICENSE file in the root directory of this source tree.
|
|
261
|
-
*/const
|
|
261
|
+
*/const cc=$e("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
|
262
262
|
* @license lucide-react v0.468.0 - ISC
|
|
263
263
|
*
|
|
264
264
|
* This source code is licensed under the ISC license.
|
|
265
265
|
* See the LICENSE file in the root directory of this source tree.
|
|
266
|
-
*/const CC=Ue("ZoomOut",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]);function jC(n){if(n.value===null)return n.text??"";switch(n.key){case"coverage":return`${Math.round(n.value)}×`;case"tmb":return n.value<.01?n.value.toPrecision(2):n.value.toFixed(2);default:return n.value.toFixed(2)}}function EC(n){return n.status==="failed"?"Failed":n.status==="skipped"?"Not in this mode":"Not run"}const NC=new Intl.DateTimeFormat("en-GB",{day:"numeric",month:"short",year:"numeric"});function O1(n){if(!n)return"";const s=new Date(n);return Number.isNaN(s.getTime())?"":NC.format(s)}function lm(n,s){return n.startsWith(`${s}_`)?n.slice(s.length+1):n}function Oh(n){return n==null?"–":n.toFixed(2)}const sy={missense_variant:"Missense",stop_gained:"Nonsense",stop_lost:"Stop lost",start_lost:"Start lost",frameshift_variant:"Frameshift",inframe_deletion:"In-frame deletion",inframe_insertion:"In-frame insertion",splice_acceptor_variant:"Splice acceptor",splice_donor_variant:"Splice donor",splice_region_variant:"Splice region",synonymous_variant:"Synonymous",intron_variant:"Intronic",upstream_gene_variant:"Upstream",downstream_gene_variant:"Downstream","5_prime_UTR_variant":"5′ UTR","3_prime_UTR_variant":"3′ UTR"};function _C(n,s){const i=(n??s??"").split("&")[0];if(!i)return"–";if(sy[i])return sy[i];const r=i.replace(/_/g," ");return r.charAt(0).toUpperCase()+r.slice(1)}function Fr(n,s){return`chr${n}:${s.toLocaleString("en-US")}`}const On=[["1",249250621],["2",243199373],["3",198022430],["4",191154276],["5",180915260],["6",171115067],["7",159138663],["8",146364022],["9",141213431],["10",135534747],["11",135006516],["12",133851895],["13",115169878],["14",107349540],["15",102531392],["16",90354753],["17",81195210],["18",78077248],["19",59128983],["20",63025520],["21",48129895],["22",51304566],["X",155270560]],zh=.0025,MC=On.reduce((n,[,s])=>n+s,0),RC=1-zh*On.length,Yu=(()=>{const n={};let s=zh/2;for(const[i,r]of On){const u=r/MC*RC;n[i]=[s,s+u],s+=u+zh}return n})(),iy=Object.fromEntries(On);function Hu(n,s){const i=n.replace(/^chr/,""),r=Yu[i];if(!r)return null;const u=Math.min(Math.max(s,0),iy[i]);return r[0]+u/iy[i]*(r[1]-r[0])}function ry(n,s,i,r){const u=r*2*Math.PI-Math.PI/2;return[n+i*Math.cos(u),s+i*Math.sin(u)]}function Vd(n,s,i,r,u){const[d,h]=ry(n,s,i,r),[m,p]=ry(n,s,i,u),y=u-r>.5?1:0;return`M${d.toFixed(2)},${h.toFixed(2)} A${i},${i} 0 ${y} 1 ${m.toFixed(2)},${p.toFixed(2)}`}function Dh(n,s="start"){let i=null;for(const d of On){const[h,m]=d,[p,y]=Yu[h];if(n<p&&s==="end"&&i)return{chrom:i[0],pos:i[1]};if(n<=y)return{chrom:h,pos:Math.round(Math.max(0,(n-p)/(y-p))*m)};i=d}const[r,u]=On[On.length-1];return{chrom:r,pos:u}}function Or(n,s){const i=s>=1e6?0:s>=1e5?1:2;return`${(n/1e6).toFixed(i)} Mb`}const TC={hero:{box:220,ring:78,ringW:10,gain:93,gainW:7,amp:94,ampW:13,loss:63,lossW:7,drv:50,drvW:9},switcher:{box:48,ring:16,ringW:4.5,gain:21,gainW:3,amp:21,ampW:4.5,loss:11,lossW:3,drv:0,drvW:0},mini:{box:20,ring:7,ringW:2.6,gain:7,gainW:2.6,amp:7,ampW:2.6,loss:7,lossW:2.6,drv:0,drvW:0}},oy=.004,uy=.003;function AC(n,s,i){const r=Hu(n,s),u=Hu(n,i);return r===null||u===null?null:u-r<oy?[r,r+oy]:[r,u]}function $d(n){return n.length<=1?n[0]??"":`${n.slice(0,-1).join(", ")} and ${n[n.length-1]}`}function OC(n,s,i){return n===1?`one ${s}`:`${n} ${i}`}function z1(n){const i=[["amp","amplification","amplifications"],["gain","gain","gains"],["loss","loss","losses"]].flatMap(([h,m,p])=>{const y=n.events.filter(C=>C.kind===h);if(y.length===0)return[];const x=[...new Set(y.map(C=>C.chrom))],v=x.length>6?[...x.slice(0,6),`${x.length-6} more`]:x,b=x.length===1?`chromosome ${x[0]}`:`chromosomes ${$d(v)}`,w=h==="amp"&&y.length===1&&y[0].total_cn!==null?` (${Math.round(y[0].total_cn)} copies)`:"";return[`${OC(y.length,m,p)} on ${b}${w}`]}),r=i.length?$d(i):`no copy-number changes against ${n.baseline} copies`,u=[...new Set(n.drivers.map(h=>h.gene).filter(h=>!!h))].sort(),d=u.length?`Drivers in ${$d(u)}.`:"No drivers.";return`${r.charAt(0).toUpperCase()}${r.slice(1)}. ${d}`}function am({fingerprint:n,size:s,title:i,subtitle:r,className:u}){const d=TC[s],h=d.box/2,m=(n==null?void 0:n.events)??[],p=(n==null?void 0:n.drivers)??[],y=n?`Genome fingerprint: ${z1(n)}`:"No copy-number data";return f.jsxs("svg",{viewBox:`0 0 ${d.box} ${d.box}`,role:s==="mini"?void 0:"img","aria-label":s==="mini"?void 0:y,"aria-hidden":s==="mini"?!0:void 0,className:u,children:[f.jsxs("g",{fill:"none",strokeLinecap:"butt",children:[Object.entries(Yu).map(([x,[v,b]])=>f.jsx("path",{className:"r-neu",strokeWidth:d.ringW,d:Vd(h,h,d.ring,v,b)},x)),m.map((x,v)=>{const b=AC(x.chrom,x.start,x.end);if(!b)return null;const w=x.kind==="loss"?d.loss:x.kind==="amp"?d.amp:d.gain,C=x.kind==="loss"?d.lossW:x.kind==="amp"?d.ampW:d.gainW;return f.jsx("path",{className:`r-${x.kind}`,strokeWidth:C,d:Vd(h,h,w,b[0],b[1])},`${x.chrom}-${x.start}-${v}`)}),d.drvW>0&&p.map((x,v)=>{const b=Hu(x.chrom,x.pos);return b===null?null:f.jsx("path",{className:"r-drv",strokeWidth:d.drvW,d:Vd(h,h,d.drv,b-uy/2,b+uy/2)},`${x.gene}-${x.pos}-${v}`)})]}),s==="hero"&&i&&f.jsxs(f.Fragment,{children:[f.jsx("text",{className:"t-ink",x:h,y:h-2,textAnchor:"middle",fontSize:"24",fontWeight:"800",children:i}),r&&f.jsx("text",{className:"t-faint",x:h,y:h+18,textAnchor:"middle",fontSize:"12",fontWeight:"600",children:r})]})]})}const zC={"DNA|WG":{label:"WGS",icon:qu},"RNA|WT":{label:"RNA",icon:aC}};function cy({children:n}){return f.jsx("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:n})}function DC({sex:n}){const s=n==null?void 0:n.toUpperCase();return s==="MALE"?f.jsxs(cy,{children:[f.jsx("circle",{cx:"12",cy:"9",r:"4.5"}),f.jsx("path",{d:"M7.6 8.2c.5-2.9 2.4-4.7 4.6-4.7 2.6 0 4.4 1.7 4.4 4.3-2.2.1-4.2-.6-5.6-2.1"}),f.jsx("path",{d:"M3.5 21a8.5 7.5 0 0 1 17 0"}),f.jsx("path",{d:"m10 15.6 2 2.2 2-2.2"})]}):s==="FEMALE"?f.jsxs(cy,{children:[f.jsx("circle",{cx:"12",cy:"9.2",r:"3.4"}),f.jsx("path",{d:"M6.3 14.2C4.6 9 6.6 2.8 12 2.8s7.4 6.2 5.7 11.4"}),f.jsx("path",{d:"M5 21.2a7 6.3 0 0 1 14 0"})]}):f.jsx(SC,{size:16,"aria-hidden":!0})}const D1="wgts-patient-root";function HC(n,s){const i=n.getBoundingClientRect(),r=n.closest(".topbar"),u=r==null?void 0:r.parentElement,d=r&&u?u.getBoundingClientRect().top-r.getBoundingClientRect().top:0;return{x:i.left-s.left+i.width/2,y:i.top+d-s.top+i.height/2}}const H1=8;function Fd(n,s,i,r){const u=i>=n.x?1:-1,d=Math.min(H1,Math.abs(i-n.x)/2,(s-n.y-14)/2);return[`M${n.x},${n.y+14}`,`V${s-d}`,`Q${n.x},${s} ${n.x+u*d},${s}`,`H${i-u*d}`,`Q${i},${s} ${i},${s+d}`,`V${r}`].join(" ")}function LC(n,s,i){const r=i.x>s.x?1:-1,u=Math.min(H1,Math.abs(i.x-s.x)/2,(s.top-n)/2);return[`M${s.x},${s.top}`,`V${n+u}`,`Q${s.x},${n} ${s.x+r*u},${n}`,`H${i.x-r*u}`,`Q${i.x},${n} ${i.x},${n+u}`,`V${i.top}`].join(" ")}function UC(n,s,i){const r=s.left+s.width/2,u=i.left+i.width/2,d=n-7,m=(n-25-.25*d)/.75;return`M${r},${d} C${r},${m} ${u},${m} ${u},${d}`}function VC(n,s){var r,u;const i=n.samples.find(d=>d.id===s);for(const d of(i==null?void 0:i.experiments)??[]){const h=(r=n.experiments[d])==null?void 0:r.normal,m=h?(u=n.experiments[h])==null?void 0:u.sample:void 0;if(m&&m!==s)return m}return null}function $C({data:n,sampleId:s,fingerprint:i,onSample:r}){const u=E.useRef(null),[d,h]=E.useState(null),[m,p]=E.useState(!1);E.useEffect(()=>{if(!d||m)return;const R=requestAnimationFrame(()=>p(!0));return()=>cancelAnimationFrame(R)},[d,m]);const y=new Set(n.failures.map(R=>R.sample)),x=E.useRef(s),[v,b]=E.useState(null);E.useEffect(()=>{if(x.current===s)return;const R=x.current;x.current=s,b(j=>({from:R,to:s,n:((j==null?void 0:j.n)??0)+1}))},[s]);const w=VC(n,s);E.useLayoutEffect(()=>{const R=u.current;if(!R)return;const j=()=>{const T=R.getBoundingClientRect(),H=document.getElementById(D1);if(!H)return;const D=Array.from(R.querySelectorAll("[data-sample]")).map(te=>{const k=te.getBoundingClientRect();return{id:te.dataset.sample,x:k.left-T.left+22,left:k.left-T.left,width:k.width,top:k.top-T.top,bottom:k.bottom-T.top}}),z=HC(H,T),Y=Math.min(...D.map(te=>te.top));h({root:z,trunk:Y-12,tabs:D})};if(j(),typeof ResizeObserver>"u")return;const F=new ResizeObserver(j);return F.observe(R),()=>F.disconnect()},[n,s]);const C=d==null?void 0:d.tabs.find(R=>R.id===s),N=w?d==null?void 0:d.tabs.find(R=>R.id===w):void 0,M=v?d==null?void 0:d.tabs.find(R=>R.id===v.from):void 0;return f.jsxs("div",{ref:u,className:"ltabs",children:[d&&f.jsxs("svg",{className:"ltabs-links","aria-hidden":!0,children:[d.tabs.map(R=>f.jsx("path",{d:Fd(d.root,d.trunk,R.x,R.top)},R.id)),C&&f.jsxs(f.Fragment,{children:[f.jsx("path",{className:"ltabs-haze","data-moving":m,style:{d:`path("${Fd(d.root,d.trunk,C.x,C.top)}")`}}),f.jsx("path",{className:"ltabs-on","data-moving":m,style:{d:`path("${Fd(d.root,d.trunk,C.x,C.top)}")`}}),M&&v&&v.to===C.id&&f.jsx("path",{className:"ltabs-bead",pathLength:1,d:LC(d.trunk,M,C)},`bead-${v.n}`)]}),C&&N&&f.jsxs("g",{className:"ltabs-match",children:[f.jsx("path",{d:UC(d.trunk,C,N)}),f.jsx("text",{x:(C.left+C.width/2+N.left+N.width/2)/2,y:d.trunk-27,children:"matched normal"})]})]}),C&&f.jsx("span",{className:"ltabs-thumb","data-moving":m,"aria-hidden":!0,style:{width:C.width,height:C.bottom-C.top,transform:`translate(${C.left}px, ${C.top}px)`}}),f.jsx("div",{className:"ltabs-row",role:"tablist","aria-label":"Samples",children:n.samples.map(R=>{const j=R.id===s,F=i==null?void 0:i.samples.find(H=>H.sample===R.id),T=R.experiments.map(H=>({id:H,...n.experiments[H]})).filter(H=>H.technique);return f.jsxs("button",{type:"button",role:"tab","data-sample":R.id,"aria-selected":j,className:"ltab",onClick:()=>r(R.id),children:[f.jsxs("span",{className:"ltab-name",children:[R.category==="TUMOR"?f.jsx(am,{fingerprint:F,size:"mini",className:"h-[18px] w-[18px] flex-none"}):f.jsx(T1,{size:15,"aria-hidden":!0,className:"flex-none"}),lm(R.id,n.individual.id)," ",R.category==="TUMOR"?"tumour":"normal",y.has(R.id)&&f.jsx("span",{className:"ltab-warn",title:"A module failed for this sample","aria-label":"A module failed"})]}),f.jsxs("span",{className:"ltab-exps",children:[T.length===0&&f.jsx("span",{children:"No experiments"}),T.map(H=>{const D=zC[H.technique],z=(D==null?void 0:D.icon)??qu;return f.jsxs("span",{title:H.id,children:[f.jsx(z,{size:12,"aria-hidden":!0}),(D==null?void 0:D.label)??H.technique]},H.id)})]})]},R.id)})})]})}function FC({data:n,sampleId:s,fingerprint:i,onSample:r}){return f.jsx("div",{className:"ctabs",role:"tablist","aria-label":"Samples",children:n.samples.map(u=>{const d=i==null?void 0:i.samples.find(h=>h.sample===u.id);return f.jsxs("button",{type:"button",role:"tab","aria-selected":u.id===s,className:"ctab",onClick:()=>r(u.id),children:[u.category==="TUMOR"?f.jsx(am,{fingerprint:d,size:"mini",className:"h-[16px] w-[16px] flex-none"}):f.jsx(T1,{size:14,"aria-hidden":!0,className:"flex-none"}),lm(u.id,n.individual.id)," ",u.category==="TUMOR"?"tumour":"normal"]},u.id)})})}function Dr(n){let s=n;const i=new Set;return{get:()=>s,set:r=>{Object.is(r,s)||(s=r,i.forEach(u=>u()))},subscribe:r=>(i.add(r),()=>i.delete(r))}}function Iu(n){return E.useSyncExternalStore(n.subscribe,n.get,n.get)}const sm=Dr(!1),Br=()=>sm.set(!0),Eu=()=>sm.set(!1),BC=Dr(!0);function L1({individualId:n,subtitle:s,patientIcon:i,report:r,compact:u,headerInView:d=BC}){const h=!Iu(d),[m,p]=E.useState(!1),[y,x]=E.useState(!1);E.useEffect(()=>{const b=()=>x(window.scrollY>4);return b(),window.addEventListener("scroll",b,{passive:!0}),()=>window.removeEventListener("scroll",b)},[]);async function v(){try{await navigator.clipboard.writeText(window.location.href),p(!0),window.setTimeout(()=>p(!1),1600)}catch{window.prompt("Copy this link",window.location.href)}}return f.jsxs("div",{className:"topbar flex flex-wrap items-center justify-between gap-x-4 gap-y-3 px-8 pt-3 pb-2","data-scrolled":y,children:[f.jsxs("nav",{"aria-label":"Breadcrumb",className:"flex min-w-0 items-center gap-2 text-[13.5px]",children:[f.jsx("button",{type:"button",className:"crumb",onClick:Br,title:"Browse projects and patients",children:"Patients"}),n&&f.jsxs(f.Fragment,{children:[f.jsx(nm,{size:14,"aria-hidden":!0,style:{color:"var(--chev)"}}),i&&f.jsx("span",{id:D1,className:"ltabs-icon",children:i}),f.jsx("h1",{className:"m-0 text-[20px] font-semibold tracking-tight",style:{color:"var(--ink)"},children:n}),s&&f.jsx("span",{className:"ml-1.5 truncate text-[13.5px]",style:{color:"var(--muted)"},children:s})]})]}),f.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[r,f.jsx("button",{type:"button",className:"sc-ib","aria-label":"Copy a link to this view",onClick:v,children:f.jsx(dC,{size:16,"aria-hidden":!0})}),f.jsx("span",{"aria-live":"polite",className:"text-xs",style:{color:"var(--muted)"},children:m?"Link copied":""})]}),u&&f.jsx("div",{className:"topbar-compact","data-open":h,inert:!h,"aria-hidden":!h,children:f.jsx("div",{children:u})})]})}function kC(){const n=tm(),[s,i]=E.useState("");return f.jsxs("div",{className:`wgts ${Gn.theme}`,children:[f.jsx("aside",{className:"side","aria-label":"Navigation",children:f.jsxs("div",{className:"side-brand",children:[f.jsx("span",{className:"side-badge","aria-hidden":!0,children:f.jsx(qu,{size:17,strokeWidth:2})}),f.jsx("span",{className:"side-text side-title",children:"WGTS Reports"}),f.jsx("button",{type:"button",className:"side-search-icon","aria-label":"Browse projects and patients",title:"Browse projects and patients",onClick:Br,children:f.jsx(Du,{size:17,"aria-hidden":!0})})]})}),f.jsxs("div",{className:"page",children:[f.jsx(L1,{}),f.jsxs("main",{className:"flex flex-col gap-4 px-8 pt-8 pb-10",children:[f.jsx("h1",{className:"m-0 text-[28px] font-semibold tracking-tight",children:"Open a patient"}),f.jsx("p",{className:"m-0 max-w-[60ch] text-[14.5px]",style:{color:"var(--ink-2)"},children:"Browse the projects that have a dashboard and pick a patient, or enter an individual's system id to see its WGTS report as live charts and tables."}),f.jsx("div",{children:f.jsxs("button",{type:"button",className:"sc-btn sc-b1 gap-2",onClick:Br,children:[f.jsx(uC,{size:16,"aria-hidden":!0}),"Browse projects and patients"]})}),f.jsxs("form",{className:"flex flex-wrap gap-2",onSubmit:r=>{r.preventDefault(),s.trim()&&n(`/${s.trim()}`)},children:[f.jsxs("div",{className:"field w-[340px] max-w-full",children:[f.jsx(Du,{size:16,"aria-hidden":!0,style:{color:"var(--chev)"}}),f.jsx("label",{className:"sr-only",htmlFor:"open-id",children:"Individual id"}),f.jsx("input",{id:"open-id",placeholder:"IID_H000001",value:s,onChange:r=>i(r.target.value)})]}),f.jsx("button",{type:"submit",className:"sc-btn sc-b1",disabled:!s.trim(),children:"Open"})]})]})]})]})}class Xu extends Error{}class U1 extends Error{}function GC(){try{return localStorage.getItem(Th)}catch{return null}}function V1(n){try{n?localStorage.setItem(Th,n):localStorage.removeItem(Th)}catch{}}function $1(){const n=GC();return{Accept:"application/json",...n?{Authorization:`Token ${n}`}:{}}}async function Ca(n,s={}){const i=new URLSearchParams;for(const[d,h]of Object.entries(s))h&&i.set(d,h);const r=i.toString(),u=await fetch(`${Gn.apiHost}/wgts/api/${n}${r?`?${r}`:""}`,{headers:$1()});if(u.status===401)throw new Xu;if(u.status===403){const d=await u.json().catch(()=>({}));throw new U1(d.detail??"You may not see this patient's results.")}if(!u.ok)throw new Error(`The dashboard API answered ${u.status}.`);return await u.json()}async function qC(n){if(!(await fetch(`${Gn.apiHost}/api/v1/auth/`,{headers:{Accept:"application/json",Authorization:`Token ${n}`}})).ok)throw new Error("Isabl did not accept that token.");V1(n)}async function QC(n,s){const i=await fetch(`${Gn.apiHost}/api/v1/rest-auth/login/`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({username:n,password:s})});if(!i.ok)throw new Error("Isabl did not accept that username and password.");const r=await i.json();V1(r.key)}async function F1(n){const s=await fetch(`${Gn.apiHost}/wgts/api/${n}`,{headers:$1()});if(s.status===401)throw new Xu;if(!s.ok)throw new Error(`The dashboard API answered ${s.status}.`);return await s.json()}const YC=()=>F1("projects/"),IC=n=>F1(`projects/${n}/individuals/`);function Hh(n){const s=n.toUpperCase();return s.startsWith("BATTENBERG")||s.startsWith("CNV_")?"cn":s.startsWith("ANNOT_SNVS")||s.startsWith("ANNOT_INDELS")||s.startsWith("FFPERASE")?"mut":s.startsWith("MSISENSOR")?"msi":"other"}function Ei(n){return`fam-${Hh(n)}`}function B1(n){return n.pk?`${n.app} #${n.pk}`:n.app}function Ft(n){return`${n.app}#${n.pk??""}`}const k1={drivers:"gene",coding:"position",all:"position"},XC=100;function fy(){return{scope:"drivers",sort:k1.drivers,q:"",effects:[],flags:[],range:null,ffpe:!1}}function G1(n){return(n.q.trim()?1:0)+n.effects.length+n.flags.length+(n.range?1:0)}function KC(n){const s={scope:n.scope,sort:n.sort,q:n.q.trim()||void 0,effects:n.effects.join(",")||void 0,flags:n.flags.join(",")||void 0,ffpe:n.ffpe?"all":void 0};return n.range&&(s[`${n.range.measure}_min`]=String(n.range.low),s[`${n.range.measure}_max`]=String(n.range.high)),s}const q1={missense:"Missense",truncating:"Truncating",splice:"Splice",inframe:"In-frame",synonymous:"Synonymous",other:"Other"},Q1={hotspot:"Hotspot",in_dmp:"In DMP",oncogene:"Oncogene",tsg:"Tumour suppressor"};function ZC(n){return`${n.chrom}:${n.pos}:${n.ref}>${n.alt}`}const Y1=/^(?:chr)?([0-9]{1,2}|[XYxy]):([0-9,]+)(?:-([0-9,]+))?$/;function PC(n){return Y1.test(n.trim())}function JC(n,s,i){return`chr${n}:${s.toLocaleString("en-US")}-${i.toLocaleString("en-US")}`}const WC={GENOMIC_EXACT:"exact match",GENOMIC_POS:"same position",CODON:"same codon",GENE:"same gene"};function ej(n){var d;if(!n)return null;const s=n.split(";"),i=(d=n.match(/SOM=(\d+)/))==null?void 0:d[1],r=WC[s[0]];return!i&&!r?n:[i?`${Number(i).toLocaleString("en-US")} somatic ${i==="1"?"sample":"samples"}`:"",r].filter(Boolean).join(", ")}function tj(n){const s=n==null?void 0:n.match(/^(\d+)\/(\d+)$/);return s?`${s[1]} of ${s[2]} ${s[2]==="1"?"copy":"copies"}`:n}function nj(n){return n.oncogene&&n.tsg?"Oncogene and TSG":n.oncogene?"Oncogene":n.tsg?"TSG":null}const ul=(n,s)=>!(s instanceof Xu)&&n<2;function lj(n,s){return Ol({queryKey:["individual",n,s??null],queryFn:()=>Ca(`individuals/${encodeURIComponent(n)}/`,{version:s}),retry:ul})}function aj(n,s,i){return Ol({queryKey:["metrics",n,s,i??null],queryFn:()=>Ca(`individuals/${encodeURIComponent(n)}/metrics/`,{sample:s,version:i}),enabled:!!s,retry:ul})}function sj(n,s){return Ol({queryKey:["fingerprint",n,s??null],queryFn:()=>Ca(`individuals/${encodeURIComponent(n)}/fingerprint/`,{version:s}),retry:ul})}const Kr=(n,s)=>`individuals/${encodeURIComponent(n)}/${s}/`;function ij(n,s,i){return Ol({queryKey:["cn",n,s,i??null],queryFn:()=>Ca(Kr(n,"cn"),{sample:s,version:i}),enabled:!!s,retry:ul})}function rj(n,s,i,r,u){return Ol({queryKey:["ccf",n,s,i,r,u??null],queryFn:()=>Ca(Kr(n,"ccf"),{sample:s,measure:i,version:u,ffpe:r?"all":void 0}),enabled:!!s,retry:ul})}function oj(n,s,i){return Ol({queryKey:["signatures",n,s,i??null],queryFn:()=>Ca(Kr(n,"signatures"),{sample:s,version:i}),enabled:!!s,retry:ul})}function uj(n,s,i){return Ol({queryKey:["svs",n,s,i??null],queryFn:()=>Ca(Kr(n,"svs"),{sample:s,version:i}),enabled:!!s,retry:ul})}function cj(n,s,i,r){return tw({queryKey:["variants",n,s,i,r??null],queryFn:({pageParam:u})=>Ca(Kr(n,"variants"),{sample:s,version:r,...KC(i),page:String(u),page_size:String(XC)}),initialPageParam:1,getNextPageParam:(u,d,h)=>u.status!=="ok"||!u.data?void 0:d.reduce((p,y)=>p+(y.status==="ok"&&y.data?y.data.rows.length:0),0)<u.data.total?h+1:void 0,enabled:!!s,placeholderData:Wy,retry:ul})}function fj(){return Ol({queryKey:["picker","projects"],queryFn:YC,staleTime:6e4,retry:ul})}function dj(n){return Ol({queryKey:["picker","patients",n],queryFn:()=>IC(n),staleTime:6e4,placeholderData:Wy,retry:ul})}const ci=6,hj=16,I1=7,Lu=6;function Bd(n){const s=Math.min(I1,(n-Lu)/2);return`M${ci},${Lu} V${n-s}`}function kd(n){const s=Math.min(I1,(n-Lu)/2);return`M${ci},${n-s} Q${ci},${n} ${ci+s},${n} H${hj}`}function mj(n,s){return`M${ci},${n} V${s}`}function gj(n,s,i,r){const[u,d]=E.useState(null),[h,m]=E.useState([]),[p,y]=E.useState(!1),[x,v]=E.useState(null),[b,w]=E.useState(280),C=n.map(D=>`${D.key}:${D.available}`).join();E.useLayoutEffect(()=>{if(!u)return;const D=()=>{const Y=Array.from(u.querySelectorAll(i));m(n.flatMap((te,k)=>{const ne=Y[k];if(!ne)return[];const ie=ne.offsetTop,Ce=ne.offsetHeight;return[{key:te.key,cy:ie+Ce/2,top:ie,height:Ce,available:te.available}]}))};if(D(),typeof ResizeObserver>"u")return;const z=new ResizeObserver(D);return z.observe(u),()=>z.disconnect()},[u,C,i,r]);const N=h.find(D=>D.key===s&&D.available),M=N?{top:N.top,height:N.height}:null;E.useEffect(()=>{if(!N||p)return;const D=requestAnimationFrame(()=>y(!0));return()=>cancelAnimationFrame(D)},[N,p]);const[R,j]=E.useState(s);E.useEffect(()=>{if(R===s)return;const D=R;j(s),D&&s&&v(z=>({from:D,to:s,n:((z==null?void 0:z.n)??0)+1}))},[s,R]);const F=x?h.find(D=>D.key===x.from):void 0,[T,H]=E.useState(null);return E.useLayoutEffect(()=>{if(N&&T!==null&&T!==N.cy){const D=Math.abs(N.cy-T)/38;w(Math.round(Math.min(620,240+80*D)))}H(N?N.cy:null)},[N==null?void 0:N.key,N==null?void 0:N.cy]),{setBox:d,tree:h,on:N,light:M,glides:p,hop:x,leaving:F,duration:b}}function pj({tree:n,on:s,light:i,glides:r,hop:u,leaving:d}){return f.jsxs(f.Fragment,{children:[n.length>0&&f.jsxs("svg",{className:"ltabs-links side-tree","aria-hidden":!0,children:[f.jsx("circle",{cx:ci,cy:Lu,r:"2.5",className:"side-root"}),f.jsx("path",{d:Bd(n[n.length-1].cy)}),n.map(h=>f.jsx("path",{d:kd(h.cy),"data-off":h.available?void 0:"true"},h.key)),s&&f.jsxs(f.Fragment,{children:[f.jsx("path",{className:"ltabs-haze","data-moving":r,style:{d:`path("${Bd(s.cy)}")`}}),f.jsx("path",{className:"ltabs-on","data-moving":r,style:{d:`path("${Bd(s.cy)}")`}})]}),n.map(h=>f.jsxs("g",{className:"side-stub","data-active":h.key===(s==null?void 0:s.key)||void 0,children:[f.jsx("path",{className:"ltabs-haze",d:kd(h.cy)}),f.jsx("path",{className:"ltabs-on",d:kd(h.cy)})]},h.key)),s&&d&&u&&u.to===s.key&&f.jsx("path",{className:"ltabs-bead",pathLength:1,d:mj(d.cy,s.cy)},`bead-${u.n}`)]}),f.jsx("span",{className:"side-light","aria-hidden":!0,"data-on":i?"true":void 0,"data-glides":r||void 0,style:i?{transform:`translateY(${i.top}px)`,height:i.height}:void 0})]})}const Gd=[{key:"overview",label:"Overview",icon:fC},{key:"copyNumber",label:"Copy number",icon:nC},{key:"mutations",label:"Mutations",icon:mC},{key:"structuralVariants",label:"Structural variants",icon:xC},{key:"signatures",label:"Signatures and HRD",icon:sC},{key:"rna",label:"RNA",icon:wC,soon:!0},{key:"germline",label:"Germline",icon:yC,soon:!0},{key:"quality",label:"Quality",icon:rC,soon:!0}],dy="wgts-side-collapsed";function vj(){const[n,s]=E.useState(()=>{try{return localStorage.getItem(dy)==="1"}catch{return!1}});return[n,r=>{s(r);try{localStorage.setItem(dy,r?"1":"0")}catch{}}]}function yj({analyses:n,onPage:s,sampleLabel:i,picked:r,onPick:u,sections:d,activeStore:h,onSection:m}){const p=Iu(h),[y,x]=vj(),{setBox:v,...b}=gj(Gd.map(({key:z})=>({key:z,available:d.has(z)})),p,".sc-nav",y),[w,C]=E.useState(!1),[N,M]=E.useState(!1),R=["cn","mut","msi","other"],j=(z,Y)=>R.indexOf(Hh(z.app))-R.indexOf(Hh(Y.app))||z.app.localeCompare(Y.app),F=N||r!==null;E.useEffect(()=>{const z=Y=>{Y.key.toLowerCase()==="k"&&(Y.metaKey||Y.ctrlKey)&&(Y.preventDefault(),Br())};return document.addEventListener("keydown",z),()=>document.removeEventListener("keydown",z)},[]);const T=n.filter(z=>z.role==="input"),H=T.filter(z=>s.has(Ft(z))).sort(j),D=[...T.filter(z=>!s.has(Ft(z))).sort(j),...n.filter(z=>z.role==="cohort")];return f.jsxs("aside",{className:"side","aria-label":"Patient navigation","data-collapsed":y||void 0,children:[f.jsxs("div",{className:"side-brand",children:[f.jsx("span",{className:"side-badge","aria-hidden":!0,children:f.jsx(qu,{size:17,strokeWidth:2})}),f.jsx("span",{className:"side-text side-title",children:"WGTS Reports"}),f.jsx("button",{type:"button",className:"side-search-icon","aria-label":"Browse projects and patients",title:"Browse projects and patients (Ctrl or ⌘ K)",onClick:Br,children:f.jsx(Du,{size:17,"aria-hidden":!0})}),f.jsx("button",{type:"button",className:"side-toggle","aria-label":y?"Expand the menu":"Collapse the menu","aria-expanded":!y,title:y?"Expand the menu":"Collapse the menu",onClick:()=>x(!y),children:y?f.jsx(vC,{size:17,"aria-hidden":!0}):f.jsx(pC,{size:17,"aria-hidden":!0})})]}),f.jsxs("nav",{ref:v,"aria-label":"Patient sections",className:"side-nav",style:{"--duration":`${b.duration}ms`},children:[f.jsx(pj,{...b}),Gd.map(({key:z,label:Y,icon:te,soon:k},ne)=>{const ie=d.has(z);return f.jsxs("div",{className:"contents",children:[k&&!Gd[ne-1].soon&&f.jsx("span",{className:"side-group",children:"Coming soon"}),f.jsxs("button",{type:"button",className:"sc-nav","aria-current":ie&&p===z?"location":void 0,"aria-label":Y,disabled:!ie,title:y?Y:ie?void 0:"Not available for this sample yet",onClick:()=>m(z),children:[f.jsx(te,{size:17,strokeWidth:1.7,"aria-hidden":!0}),f.jsx("span",{className:"side-text",children:Y})]})]},z)})]}),f.jsx("div",{className:"flex-auto"}),f.jsxs("section",{"aria-label":"Analyses on this page",className:"side-sources",children:[f.jsxs("button",{type:"button",className:"side-fold","aria-expanded":F,onClick:()=>M(z=>!z),children:["Analyses on this page",f.jsx("span",{className:"side-count",children:H.length}),f.jsx(M1,{size:14,"aria-hidden":!0,"data-open":F})]}),F&&H.length===0&&f.jsxs("span",{className:"px-3 text-xs",style:{color:"var(--menu-muted)"},children:["Nothing on this page reads an analysis for ",i||"this sample","."]}),F&&H.map(z=>{const Y=Ft(z),te=z.state==="failed",k=z.modules.filter(ne=>ne.status==="failed");return f.jsxs("button",{type:"button",className:`tb-src${te?" fail":""}`,"aria-pressed":r===Y,title:te?k.map(ne=>`${ne.label} failed`).join("; "):"Show what it feeds",onClick:()=>u(r===Y?null:Y),children:[te?f.jsx(A1,{size:12,strokeWidth:2.6,"aria-hidden":!0,style:{color:"var(--fail-d)",margin:"0 -2px"}}):f.jsx("span",{className:`tb-dot ${Ei(z.app)}`,"aria-hidden":!0}),f.jsxs("span",{className:"truncate",children:[z.app," ",z.version??""]}),te&&f.jsx("span",{className:"sr-only",children:", failed"}),f.jsx("span",{className:"tb-n",children:z.pk?`#${z.pk}`:""})]},Y)}),F&&D.length>0&&f.jsxs(f.Fragment,{children:[f.jsxs("button",{type:"button",className:"tb-src","aria-expanded":w,onClick:()=>C(z=>!z),children:[f.jsx("span",{className:"tb-dot fam-other","aria-hidden":!0}),w?"Hide":"Show"," ",D.length," more for ",i||"this sample"]}),w&&D.map(z=>f.jsxs("span",{className:"tb-src",style:{cursor:"default"},children:[f.jsx("span",{className:`tb-dot ${Ei(z.app)}`,"aria-hidden":!0}),f.jsx("span",{className:"truncate",children:z.role==="cohort"?`${z.app}${z.project?`, project ${z.project}`:""}`:`${z.app} ${z.version??""}`}),f.jsx("span",{className:"tb-n",children:z.pk?`#${z.pk}`:""})]},Ft(z)))]}),F&&f.jsx("span",{className:"px-3 pt-2 text-xs leading-normal",style:{color:"var(--menu-muted)"},children:"Pick one to see what it feeds."})]})]})}function es({envelope:n}){const s=n.status==="error",i=s?iC:oC;return f.jsxs("div",{className:"flex items-start gap-2.5 text-sm",style:{color:"var(--ink-2)"},children:[f.jsx(i,{size:18,"aria-hidden":!0,style:{color:s?"var(--warn-ink)":"var(--chev)",flex:"none"}}),f.jsxs("div",{className:"flex flex-col gap-1",children:[f.jsx("span",{className:"font-semibold",style:{color:"var(--ink)"},children:s?"This panel could not be read":"Nothing to show here"}),n.warnings.map(r=>f.jsx("span",{children:r},r))]})]})}const Lh={summary:{title:"Genome fingerprint and summary",intro:"A one-glance portrait of the selected tumour: its copy-number changes and driver mutations drawn as a ring, a sentence describing them, and the headline measurements of the sample.",sections:[{heading:"The fingerprint ring",paragraphs:["The ring is the whole genome. Chromosome 1 starts at the top and the ring runs clockwise through chromosome 22 to X, each chromosome's arc in proportion to its length (GRCh37).","Copy-number changes are called against the tumour's baseline, its ploidy rounded to whole copies. Very short changes are drawn at a minimum length so they stay visible."],terms:[["Gains (outer track, orange)","Regions with at least one copy more than the baseline."],["Amplifications (outer track, darker and thicker)","Regions with three or more copies above the baseline."],["Losses (inner track, blue)","Regions with at least one copy fewer than the baseline."],["Drivers (black ticks)","Where the tumour's likely driver mutations sit (see the Mutations card for how they are flagged)."]]},{heading:"The sentence",paragraphs:["Written from the same data as the ring: how many amplifications, gains and losses there are and on which chromosomes, and which genes carry driver mutations."]},{heading:"The measurements",paragraphs:["Each tile shows a value, a small picture of where it sits on its scale when it has a natural one, and the analysis it came from. A tile with no value says why: the analysis was not run, it failed, or it does not apply to this kind of report (tumour-only reports have no matched normal)."],terms:[["Purity","The estimated fraction of cells in the sample that are tumour cells, from 0 to 1. The ring fills to the value."],["Ploidy","The tumour's average number of copies across the genome. The scale runs from 1 to 6 copies; the tall tick marks 2, a diploid genome."],["Coverage","The median sequencing depth of the tumour across the genome, in reads (×)."],["TMB per Mb","Tumour mutational burden: somatic SNVs and indels per megabase of genome. The report computes it from the counts of the SNV and indel calls. The scale is logarithmic, 0.01 to 100."],["MSI score","The MSIsensor score: the percentage of microsatellite sites that look unstable in the tumour."],["FGA","Fraction of the genome altered: the share of the genome whose copy number differs from the baseline, from 0 to 1. It is read from the project-wide Battenberg tables."]]},{heading:"Linking back to the analyses",paragraphs:[`Every value names its analysis, with version and Isabl id. Picking an analysis in the side menu's "Analyses on this page" highlights the tiles and cards it feeds.`]}]},copyNumber:{title:"Copy number",intro:"How many copies of each part of the genome the tumour carries, segment by segment, from chromosome 1 to X.",sections:[{heading:"What is drawn",paragraphs:['Each horizontal stroke is one segment: a stretch of the genome with a constant copy number. Its height is the number of copies, from 0 up to 8; anything higher is drawn at the top and the axis reads "8+". A gain or amplification rises as a column from the baseline to its stroke, and a loss falls to it, so the changes read as a landscape. Alternating grey bands mark the chromosomes, named in a strip along the bottom.',`The line across the plot is the baseline: the tumour's ploidy rounded to whole copies (labelled, for example, "2 copies"). Segments are coloured by how they compare with it.`],terms:[["Grey","Neutral: the same number of copies as the baseline."],["Orange","Gain: at least one copy more than the baseline."],["Dark orange","Amplification: three or more copies above the baseline."],["Blue","Loss: at least one copy fewer than the baseline."]]},{heading:"Total or allele-specific",paragraphs:["Total shows all copies together. Allele-specific, when the analysis provides it, splits each segment into its major allele (the more common parental copy, dark) and minor allele (light). Where the two are equal they are drawn slightly apart so both stay visible. A minor allele of 0 means one parent's copy is lost there (loss of heterozygosity)."]},{heading:"Driver genes",paragraphs:["A label along the top names each gene with likely driver mutations, one per gene, joined by a line to a dot on the segment the gene sits on, so its copy number can be read off at once. Hover one for its protein changes and the copies there."]},{heading:"Reading and moving around",terms:[["Hover a segment","Its call, copies (major + minor), coordinates and, when available, log2 ratio. A readout at the foot of the plot gives the pointer's place on the genome."],["Click a segment","Lists the mutations inside it in the Mutations card."],["Click a driver","Finds that gene in the Mutations card."],["Pinch, or Ctrl and scroll","Zooms around the pointer. Plain scrolling always scrolls the page."],["Drag","Pans a zoomed view."],["Arrow keys, plus and minus, 0","With the plot focused: pan, zoom in and out, and show the whole genome."],["Double-click a chromosome, or click its name","Glides to fill the view with it; the strip then counts megabases."],["The overview","The whole genome in miniature under the strip. Its window shows where the plot is: drag the window to move, its ends to resize, or click elsewhere to centre it there. The button by the title returns to the whole genome."],["Hover a mutation in the table","Marks it here, with a ring on the segment it sits on and its copy number."]]},{heading:"Tumour-only reports",paragraphs:["Without a matched normal there is no ploidy estimate, so segments come from CNVkit and are called against two copies. Allele-specific copy numbers are not available."]}]},mutations:{title:"Mutations",intro:"The tumour's somatic SNVs and indels that passed the callers' filters: how they are distributed across cancer cells, and a searchable, filterable table of every call.",sections:[{heading:"Which mutations",terms:[["Drivers","Likely drivers flagged by the report: coding mutations that match OncoKB or COSMIC driver annotations (the exact protein change, or a damaging consequence in a known cancer gene), plus known hotspots the callers missed and the report recovered from the tumour's reads."],["Coding","Mutations whose effect changes a protein, by the report's list of coding effects."],["All","Every PASS SNV and indel."]],paragraphs:["The counts beside each choice follow the search and filters, so they always say what you would see."]},{heading:"FFPE samples",paragraphs:["Formalin-fixed (FFPE) tissue damages DNA in ways that look like mutations, mostly C>T changes at low allele fractions. For an FFPE sample, FFPERASE scores each SNV and indel for how likely it is to be such an artifact, and the report counts only the calls scored at or below its threshold (quoted beside the table). Its SNV, indel and coding totals and the TMB leave the rest out.",`The report marks each call it leaves out, and the dashboard follows that mark: the Coding and All counts, the table and the curve leave those calls out, and the card's subtitle says so. Drivers are all listed, as in the report, and any the filter would remove carry an "FFPE filtered" tag. "Show filtered calls", under FFPE filter beside the table, brings the removed calls back, tagged the same way.`]},{heading:"Cancer cell fraction and variant allele fraction",paragraphs:["The curve across the top is a smoothed histogram of every PASS mutation; driver mutations sit on it as labelled dots, and the diamond on the axis is the median. Switch between the two measures:"],terms:[["CCF",'Cancer cell fraction: the estimated share of cancer cells carrying the mutation, corrected for purity and copy number. Around 1 (the "clonal" mark) means nearly every cancer cell has it, which suggests it arose early; clearly below 1 means a subclone. Estimates can land somewhat above 1. Shown from 0 to 2.'],["VAF","Variant allele fraction: the share of sequencing reads at the position that carry the mutation, from 0 to 1. Raw, not corrected for purity or copy number. Tumour-only reports open on VAF, since CCF needs a matched normal."]]},{heading:"Filtering by the curve",paragraphs:["Drag across the curve to keep only mutations in that CCF or VAF range: the curve stays lit inside the range and fades outside it, and the range is read out at its foot. Drag the edges to resize it, or its body to move it. The range appears with the other filters and can be removed there, or by clicking the curve."]},{heading:"The table",terms:[["Gene and position","The gene, and the mutation's chromosome and position (GRCh37)."],["Change","The protein change, with the cDNA change beneath."],["Effect","What the mutation does to the gene, from the VEP consequence (or the report's effect). Truncating effects are in bold."],["VAF and CCF bars","The value with a bar for quick comparison; the CCF bar's tick marks 1, clonal."],["Driver","Flagged as a likely driver (shown when the table is not already limited to drivers)."],["Hotspot","The exact protein change is a known recurrent cancer hotspot."],["In DMP","The same mutation was also found by the patient's clinical MSK-IMPACT (DMP) sequencing."],["FFPE filtered","FFPE samples only: the report's FFPE artifact filter leaves this call out of its counts (see FFPE samples)."]]},{heading:"Opening a row",terms:[["Variant","SNV or indel, with the reference and alternate bases."],["Reads","Reads supporting the mutation out of all reads at the position. Only hotspots the report recovered from the tumour's reads have them; the callers' tables give no single count."],["Normal VAF","The mutation's allele fraction in the matched normal; near 0 for a somatic mutation."],["Mutant copies","How many copies of that part of the genome carry the mutation, out of all copies there."],["Consequence","The full VEP consequence."],["COSMIC","How many samples in COSMIC carry it, and how closely they match (exact change, same position, codon or gene)."],["Expression","The gene's expression in the tumour's RNA, in transcripts per million, when RNA was sequenced."],["Gene role","Whether the gene is a known oncogene or tumour suppressor gene (TSG)."],["Show on copy number","Zooms the Copy number card to the mutation's chromosome and marks it."]]},{heading:"Searching and filtering",paragraphs:["Search takes a gene, a protein or cDNA change, a COSMIC term, or a locus such as chr12:25,398,284 or a range such as chr8:1-50,000,000. Press / anywhere on the page to jump to it. Each filter's count is how many rows you would get by ticking it, given everything else."],terms:[["Missense","One amino acid replaced by another."],["Truncating","Stop gained or lost, start lost, or a frameshift."],["Splice","Changes a splice site or splice region."],["In-frame","Inserts or deletes amino acids without shifting the reading frame."],["Synonymous","Changes the DNA but not the amino acid."],["Other","Everything else, such as intronic, UTR or upstream changes."]]}]},structuralVariants:{title:"Structural variants",intro:"The tumour's rearrangements as the report shows them: those with a breakpoint in an oncogene or tumour suppressor, those that take in a whole gene, and how all of them group into rearrangement signatures.",sections:[{heading:"Which rearrangements",paragraphs:["The report works from the high-confidence structural variants of ANNOT_SVS, which keeps calls made by two or more callers (SvABA, BRASS and GRIDSS) and annotates the genes they touch with AnnotSV. The count beside the title is how many of these the report counts, its rearrangements total.",`The tables keep the rearrangements whose genes include an oncogene or tumour suppressor, by the report's gene lists. It also searches the callers' raw calls for known rearrangements the high-confidence set can miss, such as CIC fusions, and adds them; a rescued event that is not a two-caller PASS says so in its callers, as in "gridss (CIC rescued)".`]},{heading:"The two tables",terms:[["Rearranged oncogenes and tumour suppressors",'One row per rearrangement and gene it hits, with the gene and breakpoint on each side. A gene near a breakpoint rather than in it is named as the report names it, such as "TERT +/- 100Kb".'],["Whole-gene rearrangements","Rearrangements that take in a whole oncogene or tumour suppressor, from start to end: a deletion of the whole gene, for example."],["Role","Whether the row's genes include an oncogene, a tumour suppressor or both, as the report colours its rows. Click a role above the tables to show only its rows."],["Left and right","Each breakpoint's gene, position (GRCh37) and where it falls in the gene, as AnnotSV writes it (intron5, exon2-exon5). Breakpoints are ordered by chromosome, then position."],["Callers and support","The callers that made the call, and the most reads any of them gives in support."],["Pileups","Supporting reads over all reads at each breakpoint in the tumour's alignments, left then right."],["Expression","For tumours with RNA: whether each gene's expression is high or low against each expression cohort (p63 is cohort project 63): at or above its 90th percentile, at or below its 10th, or neither (None). N/A means the cohort has no value for the gene."]],paragraphs:["Open a row to see both breakpoints, show them on the copy-number card, or copy their IGV loci."]},{heading:"Rearrangement signatures",paragraphs:["WGSPOST groups the tumour's rearrangements the way rearrangement signatures are described: clustered (rearrangements that sit unusually close together, as in chromothripsis) or dispersed, then by class and, except for translocations, by size from under 1 kb to over 1 Mb. Each bar is how many rearrangements fall in a group, grouped under its class; lighter bars are the clustered ones, in the shaded zone. A group with none shows a short stub on the baseline. Hover a bar for its name and its share of all rearrangements, or a class in the key to light its bars.","WGSPOST counts from its own copy of the calls, so its total can differ slightly from the report's rearrangements count."],terms:[["Deletion","A stretch of the genome lost between two breakpoints."],["Tandem duplication","A stretch copied next to itself."],["Inversion","A stretch turned around in place."],["Translocation","A join between two chromosomes."]]}]},signaturesHrd:{title:"Signatures and HRD",intro:"Which mutational processes left their mark on the tumour, set against tumours of the same disease, and whether it shows homologous recombination deficiency (HRD), as the report shows them.",sections:[{heading:"Mutational signatures",paragraphs:["WGSPOST fits known COSMIC substitution signatures to the tumour's somatic SNVs and estimates how many mutations each one accounts for. The left column is this tumour: each band is a signature's share of its mutations, the largest first.","The right column is the average of tumours of the same disease in the cohort (n is how many), each tumour's shares averaged and scaled to the cohort's average mutation count. A ribbon joins each signature's two bands, widening or narrowing with its share, so a signature can be followed from the tumour to its cohort; a label on the ribbon says how many percentage points the tumour leads or trails the cohort by, where the difference is at least 5. Hover a band, a ribbon or a row of the table for the numbers.","Seven signatures get colours of their own (eight when there are no more than eight); any beyond that are drawn together as Other. A tumour without a cohort to compare shows its own shares as one column."],terms:[["Signature","A pattern of substitutions, by the base change and its neighbours, that a mutational process leaves (SBS1, SBS5)."],["Aetiology","The process the report links a signature to, when it names one."]]},{heading:"HRD scores",paragraphs:["Two classifiers estimate whether the tumour has lost homologous recombination repair, as BRCA1 or BRCA2 loss does: HRDetect, from the substitution, indel and rearrangement patterns below, and CHORD, from its own set of mutation features. The report rates each HIGH at or above its threshold and LOW below it; the line on each gauge is the threshold."]},{heading:"HRDetect features",paragraphs:["The six features HRDetect weighs, for every tumour in the cohort and this one, each scaled from 0 (the cohort's lowest) to 1 (its highest). Each row is one feature: the pin is this tumour, the dots beneath are the cohort's samples, the shaded band is the middle half of the cohort and the line in it the median. With eight or more cohort samples a smoothed outline of how the samples are spread is drawn above the dots; with fewer it is left out, because it would suggest more than the data says. The words at the right say how many of the other cohort samples the tumour is above. Hover a row for the unscaled value. For FFPE samples the tumour's values come from its FFPE-filtered analysis."],terms:[["Del. MH","The share of deletions with microhomology at their ends, a sign of repair by end joining."],["SBS3 and SBS8","Substitution signatures 3 and 8."],["RS3 and RS5","Rearrangement signatures 3 (small tandem duplications) and 5 (deletions)."],["HRD index","Loss of heterozygosity, telomeric allelic imbalance and large-scale state transitions, combined."]]}]}},xj={summary:{BATTENBERG:"Tumour purity and ploidy, and the copy-number segments the ring's gains and losses are called from.","BATTENBERG cohort":"Project-wide Battenberg tables, which hold the FGA value and the cohort it is compared with.",CNV_UNMATCHED:"Copy-number segments of a tumour-only report (CNVkit), which the ring's gains and losses are called from.",MOSDEPTH:"The median sequencing coverage.",MSISENSOR:"The MSI score.",MSISENSOR_UNMATCHED:"The MSI score of a tumour-only report.",ANNOT_SNVS:"Somatic SNV calls: their count goes into TMB, and driver SNVs are marked on the ring.",ANNOT_INDELS:"Somatic indel calls: their count goes into TMB, and driver indels are marked on the ring.",ANNOT_SNVS_UNMATCHED:"Tumour-only SNV calls: their count goes into TMB, and driver SNVs are marked on the ring.",ANNOT_INDELS_UNMATCHED:"Tumour-only indel calls: their count goes into TMB, and driver indels are marked on the ring.",WGSPOST:"Cancer cell fractions of the mutations, read together with the driver calls marked on the ring."},copyNumber:{BATTENBERG:"Every segment drawn: total copies, major and minor allele copies, and the ploidy the baseline is rounded from.","BATTENBERG cohort":"Project-wide Battenberg tables the report reads alongside this run; they hold the FGA, and are not drawn here.",CNV_UNMATCHED:"The segments of a tumour-only report (CNVkit), drawn against two copies."},mutations:{ANNOT_SNVS:"The tumour's PASS somatic SNVs and their annotation: gene, protein and cDNA change, effect, VAF, read counts, normal VAF and COSMIC.",ANNOT_INDELS:"The tumour's PASS somatic indels and their annotation, as for SNVs.",ANNOT_SNVS_UNMATCHED:"Tumour-only SNV calls and their annotation.",ANNOT_INDELS_UNMATCHED:"Tumour-only indel calls and their annotation.",WGSPOST:"Each mutation's cancer cell fraction (CCF) and how many copies carry it.",BATTENBERG:"Ploidy, which fills in the copy count where WGSPOST has none, and purity, which gives a CCF to hotspots recovered from the tumour's reads.",FFPERASE_SNVS:"FFPE samples: each SNV's artifact score. Calls scoring above the report's threshold are left out of the counts.",FFPERASE_INDELS:"FFPE samples: each indel's artifact score. Calls scoring above the report's threshold are left out of the counts."},structuralVariants:{ANNOT_SVS:"The high-confidence structural variants and their AnnotSV gene annotation: the rearrangements the report counts and the rows of its tables.",ANNOT_SVS_UNMATCHED:"Tumour-only structural variants and their annotation, kept when rare in the population.",SVABA:"Raw SvABA calls, searched for known rearrangements the high-confidence set missed (rescued events).",GRIDSS:"Raw GRIDSS calls, searched for rescued events like SvABA's.",SVABA_UNMATCHED:"Raw tumour-only SvABA calls, searched for rescued events.",GRIDSS_UNMATCHED:"Raw tumour-only GRIDSS calls, searched for rescued events.",WGSPOST:"The rearrangement-signature counts.",WGSPOST_UNMATCHED:"The rearrangement-signature counts of a tumour-only report."},signaturesHrd:{WGSPOST:"The tumour's signature contributions, its HRDetect and CHORD scores, and its HRDetect features.",WGSPOST_FFPE:"For an FFPE sample, the same from the FFPE-filtered calls.","WGSPOST cohort":"The cohort's signature contributions and HRDetect features, which the tumour is compared with."}};function Sj(n,s){const i=s.role==="cohort"||s.app.endsWith("Project Application"),r=s.app.replace(/ Project Application$/,""),u=xj[n];return(i?u[`${r} cohort`]:u[r])??(i?"A project-wide run the report reads for comparison with the cohort.":"An analysis the report reads to build this card.")}function bj({topic:n,lineage:s,subject:i,onClose:r}){const u=Lh[n],d=E.useId(),h=E.useRef(null),m=s.filter(T=>T.role!=="cohort"&&!T.app.endsWith("Project Application")),p=s.filter(T=>!m.includes(T)),y=E.useRef(r);y.current=r,E.useEffect(()=>{var Y;const T=document.activeElement;(Y=h.current)==null||Y.focus();const H=document.documentElement,D=H.style.overflow;H.style.overflow="hidden";const z=te=>{te.key==="Escape"&&y.current()};return document.addEventListener("keydown",z),()=>{document.removeEventListener("keydown",z),H.style.overflow=D,T==null||T.focus()}},[]);const x=[...u.sections.map(T=>T.heading),"Sources"],v=x.map((T,H)=>`${d}-s${H}`),[b,w]=E.useState(0),C=E.useRef(null),N=E.useRef(!1),M=E.useRef(null),R=E.useRef(0);E.useEffect(()=>{const T=C.current;if(!T)return;const H=24,D=()=>{const te=T.getBoundingClientRect().top,k=Math.max(0,T.scrollHeight-T.clientHeight),ne=v.map(ee=>{const P=document.getElementById(ee);return P?P.getBoundingClientRect().top-te:1/0}),ie=Math.max(0,...ne.map(ee=>Number.isFinite(ee)?ee+T.scrollTop-k-H:0)),Ce=H+(k>0?ie*Math.min(1,T.scrollTop/k):0);let X=0;ne.forEach((ee,P)=>{ee<=Ce&&(X=P)}),w(X)},z=()=>{if(N.current){M.current===null?(window.clearTimeout(R.current),R.current=window.setTimeout(()=>M.current=T.scrollTop,160)):Math.abs(T.scrollTop-M.current)>4&&(N.current=!1,M.current=null,D());return}D()},Y=()=>{N.current&&M.current===null&&(window.clearTimeout(R.current),N.current=!1,D())};return D(),T.addEventListener("scroll",z,{passive:!0}),T.addEventListener("wheel",Y,{passive:!0}),T.addEventListener("touchstart",Y,{passive:!0}),()=>{window.clearTimeout(R.current),T.removeEventListener("scroll",z),T.removeEventListener("wheel",Y),T.removeEventListener("touchstart",Y)}},[]);const j=T=>{var D;const H=typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches;N.current=!0,M.current=null,w(T),window.clearTimeout(R.current),R.current=window.setTimeout(()=>{var z;return M.current=((z=C.current)==null?void 0:z.scrollTop)??0},160),(D=document.getElementById(v[T]))==null||D.scrollIntoView({behavior:H?"auto":"smooth",block:"start"})},F=T=>f.jsxs("li",{className:"info-source",children:[f.jsx("span",{className:`tb-dot ${Ei(T.app)}`,"aria-hidden":!0}),f.jsxs("span",{className:"info-source-text",children:[T.pk?f.jsxs("a",{className:"info-source-name info-source-link",href:j1(T.pk),target:"_blank",rel:"noopener noreferrer",title:"Open this analysis in Isabl",children:[f.jsxs("span",{className:"mono",children:[T.app,T.version?` ${T.version}`:""]}),f.jsxs("span",{className:"mono info-source-pk",children:["#",T.pk]}),f.jsx(lC,{size:13,"aria-hidden":!0,className:"info-source-arrow"})]}):f.jsxs("span",{className:"info-source-name",children:[f.jsxs("span",{className:"mono",children:[T.app,T.version?` ${T.version}`:""]}),T.project?f.jsxs("span",{className:"info-source-pk",children:["project ",T.project]}):null]}),f.jsx("span",{className:"info-source-role",children:Sj(n,T)})]})]},Ft(T));return Wh.createPortal(f.jsx("div",{className:`info-backdrop ${Gn.theme}`,onMouseDown:T=>T.target===T.currentTarget&&r(),children:f.jsxs("div",{className:"info-dialog",role:"dialog","aria-modal":"true","aria-labelledby":d,children:[f.jsx("button",{ref:h,type:"button",className:"info-close","aria-label":"Close",onClick:r,children:f.jsx(Qu,{size:18,"aria-hidden":!0})}),f.jsxs("nav",{className:"info-rail","aria-label":"Contents",children:[f.jsx("span",{className:"info-kicker",children:i??"About"}),f.jsx("h2",{id:d,children:u.title}),f.jsx("ol",{children:x.map((T,H)=>f.jsx("li",{children:f.jsx("button",{type:"button","aria-current":H===b?"true":void 0,onClick:()=>j(H),children:T})},T))})]}),f.jsxs("div",{ref:C,className:"info-main",children:[f.jsx("p",{className:"info-intro",children:u.intro}),u.sections.map((T,H)=>{var D;return f.jsxs("section",{id:v[H],className:"info-section",children:[f.jsx("h3",{children:T.heading}),(D=T.paragraphs)==null?void 0:D.map(z=>f.jsx("p",{children:z},z)),T.terms&&f.jsx("dl",{children:T.terms.map(([z,Y])=>f.jsxs("div",{children:[f.jsx("dt",{children:z}),f.jsx("dd",{children:Y})]},z))})]},T.heading)}),f.jsxs("section",{id:v[v.length-1],className:"info-section","aria-label":"Sources",children:[f.jsx("h3",{children:"Sources"}),f.jsx("p",{children:"The analyses this card reads, with their version and Isabl id, and what each one is responsible for."}),s.length===0&&f.jsx("p",{children:"No analyses recorded for this card."}),f.jsx("ul",{className:"info-sources",children:m.map(F)}),p.length>0&&f.jsxs(f.Fragment,{children:[f.jsx("h4",{children:"Cohort runs"}),f.jsx("ul",{className:"info-sources",children:p.map(F)})]})]})]})]})}),document.body)}function hy(n){return n.split(" ").map(s=>/^[A-Z0-9]{2,}$/.test(s)?s:s.toLowerCase()).join(" ")}function X1({topic:n,lineage:s,subject:i}){const[r,u]=E.useState(!1);return f.jsxs(f.Fragment,{children:[f.jsx("button",{type:"button",className:"sc-ib sm info-trigger","aria-label":`About ${hy(Lh[n].title)}`,title:`About ${hy(Lh[n].title)}`,"aria-haspopup":"dialog",onClick:()=>u(!0),children:f.jsx(cC,{size:15,"aria-hidden":!0})}),r&&f.jsx(bj,{topic:n,lineage:s,subject:i,onClose:()=>u(!1)})]})}function wj({lineage:n,children:s}){const[i,r]=E.useState(!1),u=n.filter(h=>h.role!=="cohort"),d=n.filter(h=>h.role==="cohort");return f.jsxs("div",{className:"sc-cf",children:[s,s&&f.jsx("span",{className:"flex-auto"}),n.length>0&&f.jsx("span",{className:"text-xs",style:{color:"var(--muted)"},children:"Sources"}),u.map(h=>h.pk?f.jsxs("a",{className:"sc-src sc-src-link",href:j1(h.pk),target:"_blank",rel:"noopener noreferrer",title:"Open this analysis in Isabl",children:[f.jsx("span",{className:`tb-dot ${Ei(h.app)}`,"aria-hidden":!0}),h.app," ",h.version??""," #",h.pk]},Ft(h)):f.jsxs("span",{className:"sc-src",children:[f.jsx("span",{className:`tb-dot ${Ei(h.app)}`,"aria-hidden":!0}),h.app," ",h.version??""]},Ft(h))),d.length>0&&f.jsxs("button",{type:"button",className:"sc-src",style:{border:0,cursor:"pointer"},"aria-expanded":i,onClick:()=>r(h=>!h),children:[i?"Hide":"+"," ",d.length," cohort ",d.length===1?"run":"runs"]}),i&&d.map(h=>f.jsxs("span",{className:"sc-src",children:[f.jsx("span",{className:"tb-dot fam-other","aria-hidden":!0}),h.app,h.project?`, project ${h.project}`:""," ",h.pk?`#${h.pk}`:""]},Ft(h)))]})}function K1(...n){const s=new Map;for(const i of n.flat())i&&!s.has(Ft(i))&&s.set(Ft(i),i);return[...s.values()]}const Ku=E.forwardRef(function({title:s,subtitle:i,controls:r,lineage:u,picked:d,footer:h,className:m="",info:p,expandable:y,children:x},v){const b=!!d&&u.some(N=>Ft(N)===d),[w,C]=Cj();return f.jsxs(f.Fragment,{children:[w&&f.jsx("div",{className:"sc-full-backdrop","aria-hidden":!0,onClick:()=>C(!1)}),f.jsxs("section",{ref:v,className:`sc-card flex flex-col ${m}`,"data-picked":b,"data-full":w||void 0,"aria-label":s,children:[f.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-x-4 gap-y-2.5 px-5 pt-5 pb-4",children:[f.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[f.jsx("h2",{className:"m-0 text-[19px] font-semibold tracking-tight",children:s}),i&&f.jsx("span",{className:"text-[13px]",style:{color:"var(--muted)"},children:i})]}),(r||p||y)&&f.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[r,y&&f.jsx("button",{type:"button",className:"sc-ib","aria-label":w?"Exit full screen":`Expand ${s.toLowerCase()} to full screen`,title:w?"Exit full screen (Esc)":"Expand to full screen","aria-pressed":w,onClick:()=>C(!w),children:w?f.jsx(gC,{size:16,"aria-hidden":!0}):f.jsx(hC,{size:16,"aria-hidden":!0})}),p&&f.jsx(X1,{topic:p,lineage:u,subject:typeof i=="string"?i:void 0})]})]}),f.jsx("div",{className:"min-w-0 flex-auto",children:x}),(u.length>0||h)&&f.jsx(wj,{lineage:u,children:h})]})]})});function Cj(){const[n,s]=E.useState(!1);return E.useEffect(()=>{if(!n)return;const i=document.documentElement,r=i.style.overflow;i.style.overflow="hidden";const u=d=>{var h,m;d.key==="Escape"&&((m=(h=d.target)==null?void 0:h.closest)!=null&&m.call(h,"input, textarea, select")||document.querySelector(".info-backdrop")||s(!1))};return document.addEventListener("keydown",u),()=>{document.removeEventListener("keydown",u),i.style.overflow=r}},[n]),[n,s]}function Zr({label:n,envelope:s,loading:i,skeletonHeight:r=160,children:u}){return f.jsxs(f.Fragment,{children:[i&&!s&&f.jsx("div",{className:"px-5 py-3",children:f.jsx("div",{className:"skeleton",style:{height:r},"aria-label":`Loading ${n}`})}),s&&s.status!=="ok"&&f.jsx("div",{className:"px-5 py-4",children:f.jsx(es,{envelope:s})}),(s==null?void 0:s.status)==="ok"&&s.data!==null&&u(s.data),(s==null?void 0:s.status)==="ok"&&s.warnings.length>0&&f.jsx("div",{className:"px-5 pb-1 text-xs",style:{color:"var(--warn-ink)"},children:s.warnings.join(" ")})]})}function jj({title:n,subtitle:s,controls:i,envelope:r,loading:u,picked:d,skeletonHeight:h=160,footer:m,className:p="",info:y,children:x}){return f.jsx(Ku,{title:n,subtitle:s,controls:i,lineage:(r==null?void 0:r.lineage)??[],picked:d,footer:m,className:p,info:y,children:f.jsx(Zr,{label:n,envelope:r,loading:u,skeletonHeight:h,children:x})})}function Ej(n,s){const[i,r]=E.useState(null),[u,d]=E.useState(!1);return E.useLayoutEffect(()=>{const h=n.current;if(!h)return;const m=()=>{const y=h.querySelector('[aria-pressed="true"]');r(y?{x:y.offsetLeft,y:y.offsetTop,width:y.offsetWidth,height:y.offsetHeight}:null)};if(m(),typeof ResizeObserver>"u")return;const p=new ResizeObserver(m);p.observe(h);for(const y of Array.from(h.children))p.observe(y);return()=>p.disconnect()},[n,s]),E.useEffect(()=>{if(i&&!u){const h=requestAnimationFrame(()=>d(!0));return()=>cancelAnimationFrame(h)}},[i,u]),{thumb:i,moving:u}}function Zu({label:n,options:s,value:i,onChange:r,className:u=""}){const d=E.useRef(null),{thumb:h,moving:m}=Ej(d,i);return f.jsxs("div",{ref:d,className:`sc-track ${u}`,role:"group","aria-label":n,children:[h&&f.jsx("span",{className:"sc-thumb","data-moving":m,"aria-hidden":!0,style:{width:h.width,height:h.height,transform:`translate(${h.x}px, ${h.y}px)`}}),s.map(p=>f.jsx("button",{type:"button",className:"sc-seg","aria-pressed":p.value===i,disabled:p.disabled,title:p.title,onClick:()=>r(p.value),children:p.label},p.value))]})}function Nj(n){var i;const s=[];return n.mode==="unmatched"&&s.push("Tumour only"),n.individual.germline_consent&&s.push("Germline consented"),(i=n.individual.dmp_id)!=null&&i.startsWith("P-")&&s.push("DMP linked"),s}function _j({data:n,onVersion:s}){const i=n.report,[r,u]=E.useState(!1),d=E.useRef(null);E.useEffect(()=>{if(!r)return;const m=y=>{var x;(x=d.current)!=null&&x.contains(y.target)||u(!1)},p=y=>{y.key==="Escape"&&u(!1)};return document.addEventListener("mousedown",m),document.addEventListener("keydown",p),()=>{document.removeEventListener("mousedown",m),document.removeEventListener("keydown",p)}},[r]);const h=Nj(n);return f.jsxs("div",{ref:d,className:"report-menu",children:[f.jsxs("button",{type:"button",className:"sc-btn sc-b2","aria-expanded":r,"aria-haspopup":"dialog",onClick:()=>u(m=>!m),children:["Report ",i.version,f.jsx(M1,{size:14,"aria-hidden":!0})]}),r&&f.jsxs("div",{className:"report-pop",role:"dialog","aria-label":"Report",children:[f.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1.5",children:[f.jsx("span",{className:"text-[13px] font-medium",style:{color:"var(--muted)"},children:"Report version"}),f.jsx(Zu,{label:"Report version",value:i.version,onChange:m=>{s(m),u(!1)},options:n.versions.map(m=>({value:m.version,label:m.version}))})]}),f.jsxs("span",{className:"mono text-[11.5px]",style:{color:"var(--muted)"},children:["WGTS_REPORT ",i.analysis?`run #${i.analysis}`:"run indexed by hand",i.built?`, built ${O1(i.built)}`:""]}),h.length>0&&f.jsx("div",{className:"flex flex-wrap gap-2",children:h.map(m=>f.jsx("span",{className:"sc-chip",children:m},m))})]})]})}const Uh=["purity","ploidy","coverage","tmb","msi","fga"];function Mj({value:n}){const i=2*Math.PI*13,r=Math.min(Math.max(n,0),1);return f.jsxs("svg",{viewBox:"0 0 34 34",className:"kpi-glyph h-[34px] w-[34px]","aria-hidden":!0,children:[f.jsx("circle",{cx:"17",cy:"17",r:13,fill:"none",strokeWidth:"4",className:"kpi-track"}),f.jsx("circle",{cx:"17",cy:"17",r:13,fill:"none",strokeWidth:"4",strokeLinecap:"round",className:"kpi-fill",strokeDasharray:`${r*i} ${i}`,transform:"rotate(-90 17 17)"})]})}function my({value:n,min:s,max:i,ticks:r,reference:u}){const d=h=>4+(Math.min(Math.max(h,s),i)-s)/(i-s)*64;return f.jsxs("svg",{viewBox:"0 0 72 20",className:"kpi-glyph h-[18px] w-[60px]","aria-hidden":!0,children:[f.jsx("line",{x1:"4",x2:"68",y1:"12",y2:"12",className:"kpi-track",strokeWidth:"2",strokeLinecap:"round"}),r.map(h=>f.jsx("line",{x1:d(h),x2:d(h),y1:h===u?5:9,y2:"15",className:"kpi-tick",strokeWidth:h===u?1.5:1},h)),f.jsx("circle",{cx:d(n),cy:"12",r:"4.5",className:"kpi-dot",strokeWidth:"2"})]})}function Rj({metric:n}){const s=n.value;if(s===null)return null;switch(n.key){case"purity":case"fga":return f.jsx(Mj,{value:s});case"ploidy":return f.jsx(my,{value:s,min:1,max:6,ticks:[1,2,3,4,5,6],reference:2});case"tmb":return f.jsx(my,{value:Math.log10(Math.max(s,.01)),min:-2,max:2,ticks:[-2,-1,0,1,2]});default:return null}}const Tj={purity:"Share of tumour cells, 0 to 1",fga:"Share of the genome altered, 0 to 1",ploidy:"On a scale of 1 to 6 copies; the tall tick marks 2",tmb:"On a log scale from 0.01 to 100 mutations per Mb"};function Aj({metric:n,picked:s}){const i=n.value===null&&!n.text,r=!!s&&n.sources.some(u=>Ft(u)===s);return f.jsxs("div",{className:"kpi","data-picked":r,title:Tj[n.key],children:[f.jsxs("span",{className:"kpi-top",children:[f.jsx("span",{className:"kpi-label",children:n.label}),f.jsx(Rj,{metric:n})]}),f.jsx("span",{className:"kpi-value","data-empty":i,children:i?EC(n):jC(n)}),n.sources.length>0?f.jsx("span",{className:"flex flex-col gap-0.5",children:n.sources.map(u=>f.jsxs("span",{className:"kpi-src",children:[f.jsx("span",{className:`tb-dot ${Ei(u.app)}`,"aria-hidden":!0}),f.jsx("span",{className:"min-w-0",children:B1(u)})]},Ft(u)))}):f.jsx("span",{className:"kpi-src",children:n.etl?`from ${n.etl}`:"no source"})]})}function Oj({sampleLabel:n,fingerprint:s,metrics:i,picked:r,lineage:u=[]}){var h;const d=(((h=i==null?void 0:i.data)==null?void 0:h.metrics)??[]).filter(m=>Uh.includes(m.key));return f.jsxs("section",{className:"sc-card relative flex flex-wrap items-center gap-x-8 gap-y-5 px-6 py-5","aria-label":`Genome fingerprint and summary of ${n}`,children:[f.jsx("span",{className:"absolute top-3 right-3",children:f.jsx(X1,{topic:"summary",lineage:u,subject:n})}),f.jsx(am,{fingerprint:s,size:"hero",title:n.split(" ")[0],subtitle:"tumour",className:"h-[210px] w-[210px] max-w-full flex-none"}),f.jsxs("div",{className:"flex min-w-0 flex-[1_1_230px] flex-col gap-3",children:[f.jsxs("h2",{className:"m-0 text-lg font-semibold tracking-tight",children:["Genome fingerprint of ",n]}),f.jsx("p",{className:"m-0 max-w-[46ch] text-[14.5px] leading-relaxed",style:{color:"var(--ink-2)"},children:s?z1(s):"No copy-number data for this sample."}),f.jsxs("div",{className:"flex flex-wrap gap-x-4 gap-y-1.5 text-[12.5px]",style:{color:"var(--ink-2)"},children:[f.jsxs("span",{className:"flex items-center gap-1.5",children:[f.jsx("span",{className:"h-[5px] w-3.5 rounded-[3px]",style:{background:"var(--gain)"}}),"Gains, outer track"]}),f.jsxs("span",{className:"flex items-center gap-1.5",children:[f.jsx("span",{className:"h-[5px] w-3.5 rounded-[3px]",style:{background:"var(--loss)"}}),"Losses, inner track"]}),f.jsxs("span",{className:"flex items-center gap-1.5",children:[f.jsx("span",{className:"h-3 w-[5px] rounded-sm",style:{background:"var(--ink)"}}),"Drivers"]})]}),f.jsx("span",{className:"text-[12.5px]",style:{color:"var(--muted)"},children:"Chromosome 1 starts at the top and the ring runs clockwise to X."})]}),f.jsxs("div",{className:"kpi-grid min-w-0 flex-[1.4_1_420px]",children:[i===void 0&&Uh.map(m=>f.jsx("div",{className:"kpi","aria-hidden":!0,children:f.jsx("div",{className:"skeleton h-[70px]"})},m)),i&&i.status!=="ok"&&f.jsx("div",{className:"col-span-full",children:f.jsx(es,{envelope:i})}),d.map(m=>f.jsx(Aj,{metric:m,picked:r},m.key))]})]})}function zj({sampleLabel:n,failures:s,analyses:i}){return s.length===0?null:f.jsx("div",{className:"flex flex-col gap-2.5",children:s.map(r=>{const u=i.filter(d=>d.modules.some(h=>h.etl===r.etl&&h.status==="failed"));return f.jsxs("div",{className:"sc-card flex flex-wrap items-center gap-x-4 gap-y-3 px-[18px] py-3.5",role:"status",children:[f.jsx("span",{className:"grid h-9 w-9 flex-none place-items-center rounded-[10px]",style:{background:"var(--warn-soft)",color:"var(--warn-ink)"},children:f.jsx(A1,{size:18,"aria-hidden":!0})}),f.jsxs("div",{className:"flex min-w-0 flex-[1_1_360px] flex-col gap-0.5",children:[f.jsxs("span",{className:"text-[14.5px] font-semibold",children:[r.label," failed for ",n]}),f.jsx("span",{className:"text-[13.5px]",style:{color:"var(--ink-2)"},children:r.message.split(`
|
|
267
|
-
`)[0]}),u.length>0&&f.jsxs("span",{className:"mono text-[11.5px]",style:{color:"var(--muted)"},children:["Reading ",u.map(B1).join(", ")]})]})]},`${r.etl}-${r.node}`)})})}function Dj({onSignedIn:n}){const[s,i]=E.useState("password"),[r,u]=E.useState(""),[d,h]=E.useState(""),[m,p]=E.useState(""),[y,x]=E.useState(null),[v,b]=E.useState(!1),w=s==="password"?!!r&&!!d:!!m.trim();return f.jsxs("form",{className:"sc-card mx-auto mt-16 flex w-[380px] max-w-full flex-col gap-3 p-6",onSubmit:async C=>{C.preventDefault(),b(!0),x(null);try{s==="password"?await QC(r,d):await qC(m.trim()),n()}catch(N){x(N.message)}finally{b(!1)}},children:[f.jsx("h1",{className:"m-0 text-lg font-semibold",children:"Sign in to Isabl"}),f.jsx("p",{className:"m-0 text-sm",style:{color:"var(--ink-2)"},children:"The WGTS dashboard uses your Isabl account."}),s==="password"?f.jsxs(f.Fragment,{children:[f.jsxs("label",{className:"flex flex-col gap-1 text-[13px] font-semibold",htmlFor:"username",children:["Username",f.jsx("span",{className:"field",children:f.jsx("input",{id:"username",autoComplete:"username",value:r,onChange:C=>u(C.target.value)})})]}),f.jsxs("label",{className:"flex flex-col gap-1 text-[13px] font-semibold",htmlFor:"password",children:["Password",f.jsx("span",{className:"field",children:f.jsx("input",{id:"password",type:"password",autoComplete:"current-password",value:d,onChange:C=>h(C.target.value)})})]})]}):f.jsxs("label",{className:"flex flex-col gap-1 text-[13px] font-semibold",htmlFor:"token",children:["API token",f.jsx("span",{className:"field",children:f.jsx("input",{id:"token",type:"password",autoComplete:"off",spellCheck:!1,value:m,onChange:C=>p(C.target.value)})}),f.jsx("span",{className:"text-xs font-normal",style:{color:"var(--muted)"},children:"The token the Isabl CLI uses. Admins find it under Auth Token in Django admin."})]}),y&&f.jsx("p",{className:"m-0 text-sm",style:{color:"var(--warn-ink)"},role:"alert",children:y}),f.jsx("button",{type:"submit",className:"sc-btn sc-b1",disabled:v||!w,children:v?"Signing in":"Sign in"}),f.jsx("button",{type:"button",className:"self-start border-0 bg-transparent p-0 text-[13px] font-semibold",style:{color:"var(--link)",cursor:"pointer"},onClick:()=>{i(s==="password"?"token":"password"),x(null)},children:s==="password"?"Use an API token instead":"Use a username and password instead"})]})}const it=1e3,Vh=.35,Hj=8,Uu=.1;function Au(n,s){return(Hu(n,s)??0)*it}function ol(n){const[s,i]=Yu[n.replace(/^chr/,"")];return[s*it,i*it]}function qd(n,s,i){const[r,u]=n,d=Math.min(it,Math.max(Vh,(u-r)*i)),h=Math.min(Math.max(s-(s-r)/(u-r)*d,0),it-d);return[h,h+d]}function Nu(n,s){const i=n[1]-n[0],r=Math.min(Math.max(n[0]+s,0),it-i);return[r,r+i]}function Lj(n,s,i){const r=Math.min(Math.max(i,0),it);return s===0?[Math.min(r,n[1]-Vh),n[1]]:[n[0],Math.max(r,n[0]+Vh)]}function Uj(n,s,i){const r=(n[0]+n[1])/2+((s[0]+s[1])/2-(n[0]+n[1])/2)*i,[u,d]=[n[1]-n[0],s[1]-s[0]],h=Math.exp(Math.log(u)+(Math.log(d)-Math.log(u))*i),m=Math.min(Math.max(r-h/2,0),it-h);return[m,m+h]}function gy(n){return n[1]-n[0]<it-.5}function Vj(n){for(const[s]of On){const[i,r]=ol(s);if(n>=i&&n<=r)return s}return null}function $j(n,s){const i=n.segments.flatMap(u=>s==="total"?[u.total_cn]:[u.major_cn,u.minor_cn]),r=Math.max(...i.map(u=>u??0));return Math.min(Hj,Math.max(n.baseline+2,Math.ceil(r)))}function Fj(n){const s=10**Math.floor(Math.log10(n)),i=n/s;return(i<1.5?1:i<3.5?2:i<7.5?5:10)*s}function Bj(n,s,i=5){const r=On.filter(([b])=>{const[w,C]=ol(b);return C>n&&w<s});if(r.length!==1)return r.map(([b])=>{const[w,C]=ol(b);return{value:(w+C)/2,label:b}});const[u,d]=r[0],[h,m]=ol(u),p=(Math.max(n,h)-h)/(m-h)*d,y=(Math.min(s,m)-h)/(m-h)*d,x=Fj(Math.max(y-p,1)/i),v=[];for(let b=Math.ceil(p/x)*x;b<=y;b+=x)v.push({value:h+b/d*(m-h),label:Or(b,x)});return v}function kj(n,s){if(n<=.5&&s>=it-.5)return null;const i=Dh(n/it,"start"),r=Dh(s/it,"end");if(i.chrom===r.chrom){const u=(r.pos-i.pos)/10;return`chr${i.chrom}: ${Or(i.pos,u).replace(" Mb","")}–${Or(r.pos,u)}`}return`chr${i.chrom}:${Or(i.pos,1e6)} – chr${r.chrom}:${Or(r.pos,1e6)}`}function Gj(n){const{chrom:s,pos:i}=Dh(Math.min(Math.max(n,0),it)/it,"start");return`chr${s} · ${(i/1e6).toFixed(1)} Mb`}const Pu=n=>n.call??"neutral",qj={neutral:"Neutral",gain:"Gain",amp:"Amplification",loss:"Loss"},Z1={neutral:"var(--chev)",gain:"var(--gain)",amp:"var(--gain-strong)",loss:"var(--loss)"};function Qj(n){return{call:qj[Pu(n)],copies:n.total_cn===null?"? copies":`${n.total_cn} ${n.total_cn===1?"copy":"copies"}`,alleles:n.major_cn!==null&&n.minor_cn!==null?`${n.major_cn} + ${n.minor_cn}`:"",span:`chr${n.chrom}:${n.start.toLocaleString("en-US")}–${n.end.toLocaleString("en-US")}`,log2:n.log2!==null?n.log2.toFixed(2):""}}function Yj(n){const s=new Map;for(const i of n){const r=i.gene??"?",u=s.get(r)??{gene:r,x:Au(i.chrom,i.pos),chrom:i.chrom,pos:i.pos,changes:"",list:[]};i.protein_change&&u.list.push(i.protein_change),s.set(r,u)}return[...s.values()].map(({list:i,...r})=>({...r,changes:i.join(", ")})).sort((i,r)=>i.x-r.x)}function Qd(n,s,i){const r=s.replace(/^chr/,"");return n.segments.find(u=>u.chrom===r&&u.start<=i&&i<=u.end)}function Yd(n,s){return n?s==="total"?n.total_cn:n.major_cn:null}function Ij(n){const s=n.length;if(s===0)return"";const i=m=>m.toFixed(2);if(s===1)return`M${i(n[0][0])},${i(n[0][1])}`;const r=n.slice(1).map((m,p)=>m[0]-n[p][0]),u=n.slice(1).map((m,p)=>r[p]===0?0:(m[1]-n[p][1])/r[p]),d=n.map((m,p)=>p===0?u[0]:p===s-1?u[s-2]:u[p-1]*u[p]<=0?0:(u[p-1]+u[p])/2);for(let m=0;m<s-1;m++){if(u[m]===0){d[m]=0,d[m+1]=0;continue}const p=d[m]/u[m],y=d[m+1]/u[m],x=Math.hypot(p,y);x>3&&(d[m]=3*p*u[m]/x,d[m+1]=3*y*u[m]/x)}let h=`M${i(n[0][0])},${i(n[0][1])}`;for(let m=0;m<s-1;m++){const[p,y]=n[m],[x,v]=n[m+1];h+=` C${i(p+r[m]/3)},${i(y+d[m]*r[m]/3)} ${i(x-r[m]/3)},${i(v-d[m+1]*r[m]/3)} ${i(x)},${i(v)}`}return h}function $h(n,s){const i=[],r=new Array(n.length).fill(0);return[...n.keys()].sort((u,d)=>n[u].left-n[d].left).forEach(u=>{let d=i.findIndex(h=>h+s<=n[u].left);d===-1&&(d=i.push(0)-1),i[d]=n[u].left+n[u].width,r[u]=d}),r}function Xj(n,s=4){const i=Math.max(n,1)/s,r=10**Math.floor(Math.log10(i)),u=i/r,d=Math.max(1,(u<=1?1:u<=2?2:u<=5?5:10)*r),h=[];for(let m=0;m<Math.max(n,1)+d&&(h.push(m),!(m>=n&&h.length>1));m+=d);return h}const Kj=n=>1-(1-n)**3;function Sa(n,s,i=500){return n.length*s*(i>=600?.6:.56)}function Ni({x:n,y:s,width:i,above:r=!1,children:u}){const d=n>i-320,h=r?Math.min(Math.max(n,110),i-110):n,m=r?"translate(-50%, calc(-100% - 6px))":`translate(${d?"calc(-100% - 14px)":"14px"}, -50%)`;return f.jsx("div",{className:"ctip",style:{left:h,top:s,transform:m},role:"presentation",children:u})}function Fh(n,s,i){const r=n.clientX;let u=!1;const d=m=>{const p=m.clientX-r;Math.abs(p)>3&&(u=!0),s(p,m)},h=()=>{window.removeEventListener("pointermove",d),window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h),i==null||i(u)};window.addEventListener("pointermove",d),window.addEventListener("pointerup",h),window.addEventListener("pointercancel",h)}function Pr(n=640){const s=E.useRef(null),[i,r]=E.useState(n);return E.useLayoutEffect(()=>{const u=s.current;if(!u)return;const d=()=>r(Math.round(u.clientWidth)||n);if(d(),typeof ResizeObserver>"u")return;const h=new ResizeObserver(d);return h.observe(u),()=>h.disconnect()},[n]),[s,i]}const py=36,Zj=14,zr=232,vy=22,oi=28,yy=19,Pj=480,Jj=E.memo(function({segments:s,spans:i,mode:r,shown:u,geo:d,hover:h,grad:m,onHover:p,onClick:y}){const x=u[1]-u[0],v=C=>d.plotL+(C-u[0])/x*d.plotW,b=C=>d.plotTop+(1-Math.min(Math.max(C,0),d.top)/d.top)*zr,w=b(d.baseline);return f.jsx("g",{children:s.map((C,N)=>{const[M,R]=i[N];if(R<u[0]-1||M>u[1]+1)return null;const j=Pu(C),F=v(M),T=Math.max(v(R)-F,j==="neutral"?2:7),H=h===N;if(r==="total"){if(C.total_cn===null)return null;const Y=b(C.total_cn);return f.jsxs("g",{className:"cn-seg","data-call":j,"data-on":H||void 0,children:[j!=="neutral"&&f.jsx("rect",{x:F,y:Math.min(Y,w),width:T,height:Math.abs(Y-w),fill:`url(#${m[j]})`,className:"cn-col"}),f.jsx("line",{x1:F,x2:F+T,y1:Y,y2:Y,style:{stroke:Z1[j]},className:"cn-line"}),f.jsx("rect",{x:F-2,y:Math.min(Y,w)-9,width:T+4,height:Math.abs(Y-w)+18,fill:"transparent",className:"cn-hit",onMouseEnter:()=>p({index:N,x:F+T/2,y:Y}),onMouseLeave:()=>p(null),onClick:()=>y(C)})]},N)}if(C.major_cn===null||C.minor_cn===null)return null;const D=b(C.major_cn+Uu),z=b(C.minor_cn-Uu);return f.jsxs("g",{className:"cn-seg","data-on":H||void 0,children:[f.jsx("line",{x1:F,x2:F+T,y1:z,y2:z,className:"cn-line cn-minor"}),f.jsx("line",{x1:F,x2:F+T,y1:D,y2:D,className:"cn-line cn-major"}),f.jsx("rect",{x:F-2,y:Math.min(D,z)-9,width:T+4,height:Math.abs(D-z)+18,fill:"transparent",className:"cn-hit",onMouseEnter:()=>p({index:N,x:F+T/2,y:D}),onMouseLeave:()=>p(null),onClick:()=>y(C)})]},N)})})}),Wj=E.memo(function({segments:s,spans:i,mode:r,top:u,baseline:d,plotL:h,plotW:m,y0:p}){const y=x=>p+3+(1-Math.min(x,u)/u)*(oi-6);return f.jsxs("g",{pointerEvents:"none",children:[On.map(([x],v)=>{const[b,w]=ol(x);return v%2===0?f.jsx("rect",{x:h+b/it*m,y:p,width:(w-b)/it*m,height:oi,className:"cn-mini-band"},x):null}),f.jsx("line",{x1:h,x2:h+m,y1:y(d),y2:y(d),className:"cn-mini-base"}),s.map((x,v)=>{const b=r==="total"?x.total_cn:x.major_cn;if(b===null)return null;const w=Pu(x),C=h+i[v][0]/it*m,N=Math.max((i[v][1]-i[v][0])/it*m,w==="neutral"?1:2);return f.jsx("line",{x1:C,x2:C+N,y1:y(b),y2:y(b),className:"cn-mini-line",style:{stroke:r==="total"?Z1[w]:"var(--ink-2)"}},v)})]})});function eE({data:n,mode:s,drivers:i,focus:r,locate:u,view:d,onView:h,onSegment:m,onGene:p}){const[y,x]=Pr(900),v=E.useRef(null),b=E.useId(),w={gain:`${b}-gain`,amp:`${b}-amp`,loss:`${b}-loss`},[C,N]=E.useState(d.window),M=E.useRef(C);M.current=C,E.useLayoutEffect(()=>{const Z=d.window,le=typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches;if(!d.smooth||le){N(Z);return}const Me=M.current,Ve=performance.now();let Fe=0;const Ct=st=>{const et=Math.min(1,(st-Ve)/Pj);N(Uj(Me,Z,Kj(et))),et<1&&(Fe=requestAnimationFrame(Ct))};return Fe=requestAnimationFrame(Ct),()=>cancelAnimationFrame(Fe)},[d]);const[R,j]=E.useState(null),[F,T]=E.useState(null),[H,D]=E.useState(null),[z,Y]=E.useState(!1),te=E.useRef(!1),k=E.useMemo(()=>$j(n,s),[n,s]),ne=E.useMemo(()=>n.segments.some(Z=>Math.max(Z.total_cn??0,Z.major_cn??0)>k),[n,k]),ie=E.useMemo(()=>n.segments.map(Z=>[Au(Z.chrom,Z.start),Au(Z.chrom,Z.end)]),[n]),Ce=E.useMemo(()=>Yj(i),[i]),X=py,ee=Math.max(x-py-Zj,200),P=C[1]-C[0],J=Z=>X+(Z-C[0])/P*ee,ue=Z=>C[0]+(Z-X)/ee*P,Ee=Z=>Sa(Z,11.5,600)+14,je=E.useMemo(()=>{const Z=Ce.map(le=>({left:X+le.x/it*ee-Ee(le.gene)/2,width:Ee(le.gene)}));return Ce.length?Math.max(...$h(Z,4))+1:0},[Ce,X,ee]),Ie=(je?je*yy+8:4)+4,We=Ie+zr,A=We+10,V=A+vy+12,W=V+oi+6,se={plotL:X,plotW:ee,plotTop:Ie,top:k,baseline:n.baseline},he=Z=>Ie+(1-Math.min(Math.max(Z,0),k)/k)*zr,ye=Ce.map((Z,le)=>({m:Z,index:le,x:J(Z.x)})).filter(({x:Z})=>Z>=X-4&&Z<=X+ee+4),be=$h(ye.map(({m:Z,x:le})=>({left:le-Ee(Z.gene)/2,width:Ee(Z.gene)})),4),re=(Z,le)=>Z>=X&&Z<=X+ee&&le>=Ie&&le<=We,me=Z=>{const le=v.current.getBoundingClientRect();return[Z.clientX-le.left,Z.clientY-le.top]},rt=E.useCallback(Z=>h({window:Z,smooth:!1}),[h]),Bt=E.useCallback(Z=>h({window:Z,smooth:!0}),[h]),zn=E.useRef({shown:C,plotL:X,plotW:ee,plotTop:Ie,plotBottom:We,move:rt});zn.current={shown:C,plotL:X,plotW:ee,plotTop:Ie,plotBottom:We,move:rt},E.useEffect(()=>{const Z=y.current;if(!Z)return;const le=Me=>{if(!Me.ctrlKey||!v.current)return;const Ve=v.current.getBoundingClientRect(),Fe=Me.clientX-Ve.left,Ct=Me.clientY-Ve.top,st=zn.current;if(Fe<st.plotL||Fe>st.plotL+st.plotW||Ct<st.plotTop||Ct>st.plotBottom)return;Me.preventDefault();const et=st.shown[0]+(Fe-st.plotL)/st.plotW*(st.shown[1]-st.shown[0]),Yn=Math.max(-50,Math.min(50,Me.deltaY));st.move(qd(st.shown,et,Math.exp(Yn*.01)))};return Z.addEventListener("wheel",le,{passive:!1}),()=>Z.removeEventListener("wheel",le)},[y]),E.useEffect(()=>{u&&/^(\d+|X)$/.test(u.chrom.replace(/^chr/,""))&&Bt(ol(u.chrom))},[u,Bt]);const Nt=Z=>{if(Z.button!==0)return;const[le,Me]=me(Z);if(!re(le,Me)||!gy(C))return;Z.preventDefault();const Ve=C;Y(!0),Fh(Z,Fe=>rt(Nu(Ve,-(Fe/ee)*(Ve[1]-Ve[0]))),Fe=>{Y(!1),Fe&&(te.current=!0,setTimeout(()=>te.current=!1,0))})},ot=Z=>{const[le,Me]=me(Z);D(re(le,Me)?le:null)},Ge=Z=>{const[le,Me]=me(Z);if(!re(le,Me))return;const Ve=Vj(ue(le));Ve&&Bt(ol(Ve))},pt=Z=>{const le=(C[0]+C[1])/2;if(Z.key==="ArrowLeft"||Z.key==="ArrowRight")Z.preventDefault(),rt(Nu(C,(Z.key==="ArrowLeft"?-.15:.15)*P));else if(Z.key==="+"||Z.key==="=")Bt(qd(C,le,.6));else if(Z.key==="-")Bt(qd(C,le,1/.6));else if(Z.key==="0"||Z.key==="Home")Bt([0,it]);else return;Z.key!=="ArrowLeft"&&Z.key!=="ArrowRight"&&Z.preventDefault()},cl=E.useCallback(Z=>{te.current||m(Z)},[m]),At=On.map(([Z],le)=>{const[Me,Ve]=ol(Z);return{chrom:Z,i:le,x0:J(Me),x1:J(Ve)}}).filter(({x0:Z,x1:le})=>le>X&&Z<X+ee),nn=At.length===1?At[0]:null,qn=nn?Bj(C[0],C[1],Math.max(2,Math.round(ee/120))):[],ut=(()=>{if(!r)return null;const Z=Au(r.chrom,r.pos);if(Z<C[0]||Z>C[1])return null;const le=Qd(n,r.chrom,r.pos),Me=Yd(le,s),Ve=s==="allele"&&Me!==null?Uu:0;return{x:J(Z),y:he((Me??n.baseline)+Ve),copies:(le==null?void 0:le.total_cn)??null}})(),fl=R?n.segments[R.index]:null,It=fl?Qj(fl):null,kt=F!==null?Ce[F]:null,zl=Z=>X+Z/it*ee,Gt={x0:zl(C[0]),x1:zl(C[1])},Qn=gy(C),ln=(Z,le)=>{Z.stopPropagation(),Z.preventDefault();const Me=C;Y(!0),Fh(Z,Ve=>{const Fe=Ve/ee*it;rt(le==="move"?Nu(Me,Fe):Lj(Me,le,Me[le]+Fe))},()=>Y(!1))};return f.jsxs("div",{ref:y,className:"cn","data-dragging":z||void 0,"data-zoomed":Qn||void 0,tabIndex:0,role:"group","aria-label":`Copy number of ${n.sample} across the genome, against ${n.baseline} copies.`,"aria-keyshortcuts":"ArrowLeft ArrowRight + - 0",onKeyDown:pt,children:[f.jsxs("svg",{ref:v,width:x,height:W,"aria-hidden":!0,onPointerDown:Nt,onPointerMove:ot,onPointerLeave:()=>D(null),onDoubleClick:Ge,children:[f.jsxs("defs",{children:[f.jsxs("linearGradient",{id:w.gain,x1:"0",y1:"0",x2:"0",y2:"1",children:[f.jsx("stop",{offset:"0",style:{stopColor:"var(--gain)"},stopOpacity:.46}),f.jsx("stop",{offset:"1",style:{stopColor:"var(--gain)"},stopOpacity:.04})]}),f.jsxs("linearGradient",{id:w.amp,x1:"0",y1:"0",x2:"0",y2:"1",children:[f.jsx("stop",{offset:"0",style:{stopColor:"var(--gain-strong)"},stopOpacity:.62}),f.jsx("stop",{offset:"1",style:{stopColor:"var(--gain-strong)"},stopOpacity:.05})]}),f.jsxs("linearGradient",{id:w.loss,x1:"0",y1:"0",x2:"0",y2:"1",children:[f.jsx("stop",{offset:"0",style:{stopColor:"var(--loss)"},stopOpacity:.04}),f.jsx("stop",{offset:"1",style:{stopColor:"var(--loss)"},stopOpacity:.46})]}),f.jsx("clipPath",{id:`${b}-plot`,children:f.jsx("rect",{x:X-4,y:Ie-2,width:ee+8,height:zr+4})})]}),f.jsx("g",{clipPath:`url(#${b}-plot)`,children:On.map(([Z],le)=>{const[Me,Ve]=ol(Z),Fe=J(Me),Ct=J(Ve);return le%2===0&&Ct>X&&Fe<X+ee?f.jsx("rect",{x:Fe,y:Ie,width:Ct-Fe,height:zr,className:"cn-band"},Z):null})}),Array.from({length:k+1},(Z,le)=>f.jsxs("g",{children:[f.jsx("line",{x1:X,x2:X+ee,y1:he(le),y2:he(le),className:"cn-grid"}),f.jsx("text",{x:X-10,y:he(le)+4,textAnchor:"end",className:"cn-tick",children:le===k&&ne?`${le}+`:le})]},le)),f.jsx("line",{x1:X,x2:X+ee,y1:he(n.baseline),y2:he(n.baseline),className:"cn-baseline"}),f.jsxs("text",{x:X+8,y:he(n.baseline)-7,className:"cn-baseline-label",children:[n.baseline," copies"]}),f.jsx("g",{className:"cn-reveal",children:f.jsx("g",{clipPath:`url(#${b}-plot)`,children:f.jsx(Jj,{segments:n.segments,spans:ie,mode:s,shown:C,geo:se,hover:R?R.index:null,grad:w,onHover:j,onClick:cl})})}),H!==null&&!z&&!R&&F===null&&f.jsxs("g",{pointerEvents:"none",children:[f.jsx("line",{x1:H,x2:H,y1:Ie,y2:We,className:"cn-guide"}),f.jsxs("g",{transform:`translate(${Math.min(Math.max(H,X+52),X+ee-52)} ${We-24})`,children:[f.jsx("rect",{x:-50,width:100,height:18,rx:9,className:"cn-readout"}),f.jsx("text",{y:12.5,textAnchor:"middle",className:"cn-readout-text",children:Gj(ue(H))})]})]}),ye.map(({m:Z,x:le,index:Me},Ve)=>{const Fe=Qd(n,Z.chrom,Z.pos),Ct=Yd(Fe,s),st=he((Ct??n.baseline)+(s==="allele"&&Ct!==null?Uu:0)),et=Ee(Z.gene),Yn=4+be[Ve]*yy,Dl=F===Me;return f.jsxs("g",{className:"cn-driver","data-on":Dl||void 0,onPointerDown:ja=>ja.stopPropagation(),onMouseEnter:()=>T(Me),onMouseLeave:()=>T(null),onClick:()=>p(Z.gene),children:[f.jsx("line",{x1:le,x2:le,y1:Yn+16,y2:st,className:"cn-leader"}),f.jsx("rect",{x:le-et/2,y:Yn,width:et,height:16,rx:8,className:"cn-chip"}),f.jsx("text",{x:le,y:Yn+11.5,textAnchor:"middle",className:"cn-gene",children:Z.gene}),f.jsx("circle",{cx:le,cy:st,r:Dl?6.5:5,className:"cn-dot"})]},Z.gene)}),ut&&r&&f.jsxs("g",{pointerEvents:"none",children:[f.jsx("line",{x1:ut.x,x2:ut.x,y1:Ie,y2:We,className:"cn-focus-line"}),f.jsx("circle",{cx:ut.x,cy:ut.y,r:6.5,className:"cn-focus-dot"}),(()=>{const Z=`${r.gene??"?"}${ut.copies!==null?` ${ut.copies} copies`:""}`,le=Sa(Z,11.5,600)+14,Me=ut.x+12+le>X+ee;return f.jsxs("g",{transform:`translate(${Me?ut.x-12-le:ut.x+12} ${ut.y-12})`,children:[f.jsx("rect",{width:le,height:22,rx:7,className:"cn-focus-chip"}),f.jsx("text",{x:7,y:15,className:"cn-focus-text",children:Z})]})})()]}),f.jsxs("g",{className:"cn-strip",children:[At.map(({chrom:Z,i:le,x0:Me,x1:Ve})=>{const Fe=Math.max(Me,X),Ct=Math.min(Ve,X+ee),st=Ct-Fe,et=nn?`chr${Z}`:Z;return f.jsxs("g",{className:"cn-pill",onClick:()=>Bt(ol(Z)),role:"presentation",children:[f.jsx("title",{children:`Zoom to chromosome ${Z}`}),f.jsx("rect",{x:Fe+.5,y:A,width:Math.max(st-1,1),height:vy,rx:7,"data-odd":le%2?"":void 0}),st>=Sa(et,11,600)+3&&f.jsx("text",{x:nn?Fe+10:(Fe+Ct)/2,y:A+15,textAnchor:nn?"start":"middle",children:et})]},Z)}),nn&&qn.map(Z=>{const le=J(Z.value);return le>Math.max(nn.x0,X)+70&&le<X+ee-20?f.jsxs("g",{pointerEvents:"none",children:[f.jsx("line",{x1:le,x2:le,y1:A+3,y2:A+9,className:"cn-mb-tick"}),f.jsx("text",{x:le,y:A+18,textAnchor:"middle",className:"cn-mb",children:Z.label})]},Z.value):null})]}),f.jsx(Wj,{segments:n.segments,spans:ie,mode:s,top:k,baseline:n.baseline,plotL:X,plotW:ee,y0:V}),f.jsx("rect",{x:X,y:V,width:ee,height:oi,fill:"transparent",className:"cn-mini-track",onPointerDown:Z=>{const[le]=me(Z),Me=C[1]-C[0],Ve=(le-X)/ee*it;Bt(Nu([Ve-Me/2,Ve+Me/2],0))}}),Qn&&f.jsxs("g",{className:"cn-mini-window",children:[f.jsx("rect",{x:Gt.x0,y:V-1,width:Math.max(Gt.x1-Gt.x0,4),height:oi+2,rx:6,onPointerDown:Z=>ln(Z,"move"),className:"cn-mini-win"}),[0,1].map(Z=>f.jsx("rect",{x:(Z===0?Gt.x0:Gt.x1)-4,y:V+oi/2-9,width:8,height:18,rx:4,className:"cn-mini-handle",onPointerDown:le=>ln(le,Z)},Z))]})]}),It&&R&&f.jsxs(Ni,{x:R.x+0,y:R.y+0,width:x,children:[f.jsxs("span",{className:"ctip-title",children:[f.jsx("span",{className:"cn-call-dot","data-call":Pu(fl),"aria-hidden":!0}),It.call,f.jsx("span",{className:"ctip-sub",children:It.copies})]}),It.alleles&&f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"Alleles"}),f.jsx("b",{children:It.alleles})]}),f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"Region"}),f.jsx("b",{className:"mono",children:It.span})]}),It.log2&&f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"log2 ratio"}),f.jsx("b",{children:It.log2})]}),f.jsx("span",{className:"ctip-note",children:"Click to list the mutations in this segment"})]}),kt&&F!==null&&f.jsxs(Ni,{x:J(kt.x),y:Ie+10,width:x,children:[f.jsxs("span",{className:"ctip-title",children:[f.jsx("i",{children:kt.gene}),kt.changes&&f.jsx("span",{className:"ctip-sub",children:kt.changes})]}),(()=>{const Z=Yd(Qd(n,kt.chrom,kt.pos),s);return Z!==null?f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"Copy number here"}),f.jsx("b",{children:Z})]}):null})(),f.jsx("span",{className:"ctip-note",children:"Driver. Click to find it in the table"})]})]})}function Cr({color:n,label:s}){return f.jsxs("span",{className:"flex items-center gap-1.5",children:[f.jsx("span",{className:"h-1 w-3.5 rounded-sm",style:{background:n}}),s]})}function tE({envelope:n,loading:s,picked:i,sampleLabel:r,drivers:u,focus:d,locate:h,onSegment:m,onGene:p}){var M;const[y,x]=E.useState("total"),[v,b]=E.useState({window:[0,it],smooth:!1}),w=((M=n==null?void 0:n.data)==null?void 0:M.allele_specific)??!1,C=kj(...v.window),N=E.useCallback(()=>b({window:[0,it],smooth:!0}),[]);return f.jsx(jj,{title:"Copy number",subtitle:`Copy number across the genome, ${r}`,info:"copyNumber",envelope:n,loading:s,picked:i,skeletonHeight:250,controls:f.jsxs(f.Fragment,{children:[C&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"mono text-xs",style:{color:"var(--ink-2)"},"aria-live":"polite",children:C}),f.jsx("button",{type:"button",className:"sc-ib sm","aria-label":"Show the whole genome",title:"Show the whole genome",onClick:N,children:f.jsx(CC,{size:15,"aria-hidden":!0})})]}),f.jsx(Zu,{label:"Copy number view",value:w?y:"total",onChange:x,options:[{value:"total",label:"Total"},{value:"allele",label:"Allele-specific",disabled:!w}]})]}),footer:f.jsxs("span",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-[12.5px]",style:{color:"var(--ink-2)"},children:[y==="total"||!w?f.jsxs(f.Fragment,{children:[f.jsx(Cr,{color:"var(--gain)",label:"Gain"}),f.jsx(Cr,{color:"var(--gain-strong)",label:"Amplification"}),f.jsx(Cr,{color:"var(--loss)",label:"Loss"})]}):f.jsxs(f.Fragment,{children:[f.jsx(Cr,{color:"var(--ink-2)",label:"Major allele"}),f.jsx(Cr,{color:"var(--chev)",label:"Minor allele"})]}),f.jsx("span",{style:{color:"var(--faint)"},children:"Pinch or Ctrl-scroll to zoom, drag to pan, or move the window in the overview. Double-click a chromosome, or click its name, to fill the view."})]}),children:R=>f.jsx(eE,{data:R,mode:w?y:"total",drivers:u,focus:d,locate:h,view:v,onView:b,onSegment:m,onGene:p})})}function nE(n){const[s,i]=n.range;return[[s,0],...n.bins.map(r=>[(r.x0+r.x1)/2,r.n]),[i,0]]}function Id(n,s){for(let i=1;i<n.length;i++){const[r,u]=n[i-1],[d,h]=n[i];if(s<=d)return d===r?h:u+(s-r)/(d-r)*(h-u)}return n[n.length-1][1]}function lE(n){return n==="ccf"?"CCF":"VAF"}function Ml(n,s){return Math.min(Math.max(s,n.range[0]),n.range[1])}function aE(n){const s=n.measure==="ccf"?.25:.1,i=[];for(let r=n.range[0];r<=n.range[1]+1e-9;r+=s)i.push(Math.round(r*100)/100);return i}function sE(n,s){return n.measure==="ccf"?s===1?"1.0":s.toFixed(2).replace(/0$/,""):s.toFixed(1)}const Ja=14,iE=22,jr=118,rE=40,li=19,xy=n=>Math.round(n*100)/100;function oE({data:n,range:s,focus:i,onRange:r,onGene:u}){const[d,h]=Pr(),m=E.useId(),p=E.useRef(null),[y,x]=E.useState(null),[v,b]=E.useState(null),[w,C]=n.range,N=h-iE,M=V=>Ja+(V-w)/(C-w)*(N-Ja),R=V=>w+(V-Ja)/(N-Ja)*(C-w),j=E.useMemo(()=>nE(n),[n]),F=Math.max(1,...j.map(V=>V[1])),T=V=>V*li+8+jr,H=(V,W)=>T(V)-W/(F*1.1)*jr,D=E.useMemo(()=>[...n.drivers].sort((V,W)=>V.value-W.value),[n.drivers]),z=D.map(V=>({left:M(Ml(n,V.value))-Sa(V.gene??"?",11.5,600)/2-6,width:Sa(V.gene??"?",11.5,600)+12})),Y=$h(z,4),te=D.length?Math.max(...Y)+1:0,k=T(te),ne=k+rE,ie=j.map(([V,W])=>[M(V),H(te,W)]),Ce=Ij(ie),X=`${Ce} L${M(C).toFixed(2)},${k} L${M(w).toFixed(2)},${k} Z`,ee=V=>V.kind==="new"?[Math.min(V.from,V.to),Math.max(V.from,V.to)]:V.kind==="edge"?[Math.min(V.fixed,V.to),Math.max(V.fixed,V.to)]:V.range,P=y?ee(y):s,J=V=>{const W=p.current.getBoundingClientRect();return R(Math.min(Math.max(V-W.left,Ja),N))},ue=(V,W,se)=>{V.preventDefault(),V.stopPropagation();let he=W(J(V.clientX));x(he),Fh(V,(ye,be)=>{he=se(he,J(be.clientX)),x(he)},()=>{const[ye,be]=ee(he);if(x(null),M(be)-M(ye)<4)return r(null);r([xy(Ml(n,ye)),xy(Ml(n,be))])})},Ee=(V,W)=>V.kind==="move"?V:{...V,to:W},je=(V,W)=>{if(V.kind!=="move")return V;const se=V.range[1]-V.range[0],he=Math.min(Math.max(V.range[0]+(W-V.grab),w),C-se);return{...V,grab:W,range:[he,he+se]}},$e=P?[M(Ml(n,P[0])),M(Ml(n,P[1]))]:null,Ie=lE(n.measure),We=i?n.measure==="ccf"?i.ccf:i.vaf:null,A=v!==null?D[v]:null;return f.jsxs("div",{ref:d,className:"dens","data-brushing":y?"":void 0,children:[f.jsxs("svg",{ref:p,width:h,height:ne,role:"img","aria-label":`${Ie} of ${n.total} variants in ${n.sample}${n.drivers.length?`, with ${n.drivers.map(V=>`${V.gene} at ${V.value.toFixed(2)}`).join(", ")}`:""}.`,onPointerDown:V=>{V.button===0&&ue(V,W=>({kind:"new",from:W,to:W}),Ee)},children:[f.jsxs("defs",{children:[f.jsxs("linearGradient",{id:`${m}-fill`,x1:"0",y1:"0",x2:"0",y2:"1",children:[f.jsx("stop",{offset:"0",style:{stopColor:"var(--ccf-fill)"},stopOpacity:.42}),f.jsx("stop",{offset:"1",style:{stopColor:"var(--ccf-fill)"},stopOpacity:.03})]}),f.jsx("clipPath",{id:`${m}-spot`,children:$e&&f.jsx("rect",{x:$e[0],y:0,width:Math.max($e[1]-$e[0],0),height:ne})})]}),aE(n).map(V=>f.jsxs("g",{children:[f.jsx("line",{x1:M(V),x2:M(V),y1:te*li+8,y2:k,className:"dens-grid","data-clonal":n.measure==="ccf"&&V===1?"":void 0}),f.jsx("text",{x:M(V),y:k+18,textAnchor:"middle",className:"dens-tick",children:sE(n,V)})]},V)),n.measure==="ccf"&&w<=1&&C>=1&&f.jsx("text",{x:M(1),y:k+31,textAnchor:"middle",className:"dens-clonal",children:"clonal"}),f.jsxs("g",{className:"dens-curve","data-dim":$e?"":void 0,children:[f.jsx("path",{d:X,fill:`url(#${m}-fill)`}),f.jsx("path",{d:Ce,className:"dens-line"})]}),$e&&f.jsx("g",{className:"dens-curve dens-lit",children:f.jsxs("g",{clipPath:`url(#${m}-spot)`,children:[f.jsx("path",{d:X,fill:`url(#${m}-fill)`}),f.jsx("path",{d:Ce,className:"dens-line"})]})}),f.jsx("line",{x1:Ja,x2:N,y1:k,y2:k,className:"dens-axis"}),n.median!==null&&f.jsx("path",{d:`M${M(n.median)},${k+1} l4.5,-6 l-4.5,-6 l-4.5,6 z`,className:"dens-median",children:f.jsx("title",{children:`Median ${n.median.toFixed(2)}`})}),D.map((V,W)=>{const se=Ml(n,V.value),he=M(se),ye=H(te,Id(j,se)),be=V.gene??"?",re=Sa(be,11.5,600)+12,me=8+Y[W]*li,rt=v===W;return f.jsxs("g",{className:"dens-driver","data-on":rt||void 0,onPointerDown:Bt=>Bt.stopPropagation(),onMouseEnter:()=>b(W),onMouseLeave:()=>b(null),onClick:()=>V.gene&&u(V.gene),children:[f.jsx("line",{x1:he,x2:he,y1:me+15,y2:ye,className:"dens-leader"}),f.jsx("rect",{x:he-re/2,y:me,width:re,height:16,rx:8,className:"dens-chip"}),f.jsx("text",{x:he,y:me+11.5,textAnchor:"middle",className:"dens-gene",children:be}),f.jsx("circle",{cx:he,cy:ye,r:rt?7:5.5,className:"dens-dot"})]},`${be}-${W}`)}),We!=null&&f.jsx("g",{className:"dens-focus",pointerEvents:"none",children:(()=>{const V=Ml(n,We),W=M(V),se=H(te,Id(j,V)),he=`${(i==null?void 0:i.gene)??"?"} ${We.toFixed(2)}`,ye=Sa(he,11,600)+14,be=W+12+ye>h;return f.jsxs(f.Fragment,{children:[f.jsx("line",{x1:W,x2:W,y1:se,y2:k,className:"dens-focus-line"}),f.jsx("circle",{cx:W,cy:se,r:6.5,className:"dens-focus-dot"}),f.jsxs("g",{transform:`translate(${be?W-12-ye:W+12} ${se-11})`,children:[f.jsx("rect",{width:ye,height:22,rx:7,className:"dens-focus-chip"}),f.jsx("text",{x:7,y:15,className:"dens-focus-text",children:he})]})]})})()}),P&&$e&&f.jsxs("g",{className:"dens-brush",children:[f.jsx("rect",{x:$e[0],y:te*li+4,width:Math.max($e[1]-$e[0],0),height:jr+8,className:"dens-sel",onPointerDown:V=>ue(V,W=>({kind:"move",grab:W,range:P}),je)}),[0,1].map(V=>f.jsxs("g",{children:[f.jsx("line",{x1:$e[V],x2:$e[V],y1:te*li+4,y2:k,className:"dens-sel-edge"}),f.jsx("rect",{x:$e[V]-5,y:te*li+4,width:10,height:jr+8,className:"dens-edge",onPointerDown:W=>ue(W,()=>({kind:"edge",fixed:P[1-V],to:P[V]}),Ee)}),f.jsx("rect",{x:$e[V]-3,y:k-jr/2-10,width:6,height:20,rx:3,className:"dens-grip",pointerEvents:"none"})]},V)),f.jsxs("g",{transform:`translate(${Math.min(Math.max(($e[0]+$e[1])/2,Ja+48),N-48)} ${k-30})`,pointerEvents:"none",children:[f.jsx("rect",{x:-48,y:0,width:96,height:20,rx:10,className:"dens-readout"}),f.jsxs("text",{y:14,textAnchor:"middle",className:"dens-readout-text",children:[P[0].toFixed(2)," – ",P[1].toFixed(2)]})]})]})]}),A&&v!==null&&f.jsxs(Ni,{x:M(Ml(n,A.value)),y:H(te,Id(j,Ml(n,A.value)))-22,width:h,above:!0,children:[f.jsxs("span",{className:"ctip-title",children:[f.jsx("i",{children:A.gene??"?"}),A.protein_change&&f.jsxs("span",{className:"ctip-sub",children:[" ",A.protein_change]})]}),f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:Ie}),f.jsx("b",{children:A.value.toFixed(2)})]}),f.jsx("span",{className:"ctip-note",children:"Driver. Click to find it in the table"})]})]})}function uE({envelope:n,loading:s,measure:i,onMeasure:r,range:u,focus:d,onRange:h,onGene:m}){const p=i==="ccf"?"Cancer cell fraction":"Variant allele fraction",y=(n==null?void 0:n.status)==="ok"?n.data:null;return f.jsxs("div",{className:"strip",children:[f.jsxs("div",{className:"strip-head",children:[f.jsx("span",{className:"text-[13px] font-semibold",children:p}),y&&f.jsxs("span",{className:"text-[12.5px]",style:{color:"var(--muted)"},children:[y.median!==null?`Median ${y.median.toFixed(2)}. `:"","Drag across the plot to filter the table."]}),f.jsx("span",{className:"flex-auto"}),f.jsx(Zu,{label:"Measure",value:i,onChange:r,options:[{value:"ccf",label:"CCF"},{value:"vaf",label:"VAF"}]})]}),f.jsx(Zr,{label:p,envelope:n,loading:s,skeletonHeight:180,children:x=>f.jsx(oE,{data:x,range:u,focus:d,onRange:h,onGene:m})})]})}const cE=Object.keys(q1),fE=Object.keys(Q1);function Sy(n,s){return n.includes(s)?n.filter(i=>i!==s):[...n,s]}function Xd({label:n,count:s,active:i,onClick:r}){return f.jsxs("button",{type:"button",className:"facet","aria-pressed":i,"data-empty":!i&&s===0,onClick:r,children:[f.jsx("span",{className:"facet-check","aria-hidden":!0,children:i&&f.jsx(_1,{size:11,strokeWidth:3})}),f.jsx("span",{className:"truncate",children:n}),f.jsx("span",{className:"facet-n",children:s===void 0?"":s.toLocaleString("en-US")})]})}function dE({table:n,data:s,onChange:i}){const r=s==null?void 0:s.facets.effects,u=s==null?void 0:s.facets.flags,d=n.range;return f.jsxs("aside",{className:"facets","aria-label":"Filters",children:[f.jsxs("div",{className:"facet-group",role:"group","aria-label":"Effect",children:[f.jsx("span",{className:"facet-title",children:"Effect"}),cE.map(h=>f.jsx(Xd,{label:q1[h],count:r==null?void 0:r[h],active:n.effects.includes(h),onClick:()=>i({effects:Sy(n.effects,h)})},h))]}),f.jsxs("div",{className:"facet-group",role:"group","aria-label":"Flags",children:[f.jsx("span",{className:"facet-title",children:"Flags"}),fE.map(h=>f.jsx(Xd,{label:Q1[h],count:u==null?void 0:u[h],active:n.flags.includes(h),onClick:()=>i({flags:Sy(n.flags,h)})},h))]}),(s==null?void 0:s.ffpe)&&f.jsxs("div",{className:"facet-group",role:"group","aria-label":"FFPE filter",children:[f.jsx("span",{className:"facet-title",children:"FFPE filter"}),f.jsx(Xd,{label:"Show filtered calls",count:s.ffpe.removed,active:n.ffpe,onClick:()=>i({ffpe:!n.ffpe})}),f.jsx("span",{className:"facet-note",children:s.ffpe.threshold!==null?`As in the report, calls FFPERASE scores above ${s.ffpe.threshold} are left out of the counts.`:"As in the report, calls its FFPE filter removes are left out of the counts."})]}),d&&f.jsxs("div",{className:"facet-group",role:"group","aria-label":"Range",children:[f.jsxs("span",{className:"facet-title",children:[d.measure==="ccf"?"CCF":"VAF"," range"]}),f.jsxs("span",{className:"facet-range",children:[f.jsxs("span",{className:"mono",children:[d.low.toFixed(2)," – ",d.high.toFixed(2)]}),f.jsx("button",{type:"button",className:"sc-ib xs","aria-label":"Remove the range",title:"Remove the range",onClick:()=>i({range:null}),children:f.jsx(Qu,{size:13,"aria-hidden":!0})})]})]}),G1(n)>0&&f.jsx("button",{type:"button",className:"facet-clear",onClick:()=>i({q:"",effects:[],flags:[],range:null}),children:"Clear all filters"})]})}/**
|
|
266
|
+
*/const Xw=$e("ZoomOut",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]);function Kw(n){if(n.value===null)return n.text??"";switch(n.key){case"coverage":return`${Math.round(n.value)}×`;case"tmb":return n.value<.01?n.value.toPrecision(2):n.value.toFixed(2);default:return n.value.toFixed(2)}}function Pw(n){return n.status==="failed"?"Failed":n.status==="skipped"?"Not in this mode":"Not run"}const Zw=new Intl.DateTimeFormat("en-GB",{day:"numeric",month:"short",year:"numeric"});function s1(n){if(!n)return"";const a=new Date(n);return Number.isNaN(a.getTime())?"":Zw.format(a)}function Em(n,a){return n.startsWith(`${a}_`)?n.slice(a.length+1):n}function em(n){return n==null?"–":n.toFixed(2)}const My={missense_variant:"Missense",stop_gained:"Nonsense",stop_lost:"Stop lost",start_lost:"Start lost",frameshift_variant:"Frameshift",inframe_deletion:"In-frame deletion",inframe_insertion:"In-frame insertion",splice_acceptor_variant:"Splice acceptor",splice_donor_variant:"Splice donor",splice_region_variant:"Splice region",synonymous_variant:"Synonymous",intron_variant:"Intronic",upstream_gene_variant:"Upstream",downstream_gene_variant:"Downstream","5_prime_UTR_variant":"5′ UTR","3_prime_UTR_variant":"3′ UTR"};function Jw(n,a){const i=(n??a??"").split("&")[0];if(!i)return"–";if(My[i])return My[i];const o=i.replace(/_/g," ");return o.charAt(0).toUpperCase()+o.slice(1)}function lr(n,a){return`chr${n}:${a.toLocaleString("en-US")}`}const Hn=[["1",249250621],["2",243199373],["3",198022430],["4",191154276],["5",180915260],["6",171115067],["7",159138663],["8",146364022],["9",141213431],["10",135534747],["11",135006516],["12",133851895],["13",115169878],["14",107349540],["15",102531392],["16",90354753],["17",81195210],["18",78077248],["19",59128983],["20",63025520],["21",48129895],["22",51304566],["X",155270560]],tm=.0025,Ww=Hn.reduce((n,[,a])=>n+a,0),eN=1-tm*Hn.length,fc=(()=>{const n={};let a=tm/2;for(const[i,o]of Hn){const u=o/Ww*eN;n[i]=[a,a+u],a+=u+tm}return n})(),_y=Object.fromEntries(Hn);function ec(n,a){const i=n.replace(/^chr/,""),o=fc[i];if(!o)return null;const u=Math.min(Math.max(a,0),_y[i]);return o[0]+u/_y[i]*(o[1]-o[0])}function Ty(n,a,i,o){const u=o*2*Math.PI-Math.PI/2;return[n+i*Math.cos(u),a+i*Math.sin(u)]}function th(n,a,i,o,u){const[d,h]=Ty(n,a,i,o),[m,g]=Ty(n,a,i,u),y=u-o>.5?1:0;return`M${d.toFixed(2)},${h.toFixed(2)} A${i},${i} 0 ${y} 1 ${m.toFixed(2)},${g.toFixed(2)}`}function nm(n,a="start"){let i=null;for(const d of Hn){const[h,m]=d,[g,y]=fc[h];if(n<g&&a==="end"&&i)return{chrom:i[0],pos:i[1]};if(n<=y)return{chrom:h,pos:Math.round(Math.max(0,(n-g)/(y-g))*m)};i=d}const[o,u]=Hn[Hn.length-1];return{chrom:o,pos:u}}function Po(n,a){const i=a>=1e6?0:a>=1e5?1:2;return`${(n/1e6).toFixed(i)} Mb`}const tN={hero:{box:220,ring:78,ringW:10,gain:93,gainW:7,amp:94,ampW:13,loss:63,lossW:7,drv:50,drvW:9},switcher:{box:48,ring:16,ringW:4.5,gain:21,gainW:3,amp:21,ampW:4.5,loss:11,lossW:3,drv:0,drvW:0},mini:{box:20,ring:7,ringW:2.6,gain:7,gainW:2.6,amp:7,ampW:2.6,loss:7,lossW:2.6,drv:0,drvW:0}},Ry=.004,Ay=.003;function nN(n,a,i){const o=ec(n,a),u=ec(n,i);return o===null||u===null?null:u-o<Ry?[o,o+Ry]:[o,u]}function nh(n){return n.length<=1?n[0]??"":`${n.slice(0,-1).join(", ")} and ${n[n.length-1]}`}function lN(n,a,i){return n===1?`one ${a}`:`${n} ${i}`}function i1(n){const i=[["amp","amplification","amplifications"],["gain","gain","gains"],["loss","loss","losses"]].flatMap(([h,m,g])=>{const y=n.events.filter(j=>j.kind===h);if(y.length===0)return[];const x=[...new Set(y.map(j=>j.chrom))],v=x.length>6?[...x.slice(0,6),`${x.length-6} more`]:x,S=x.length===1?`chromosome ${x[0]}`:`chromosomes ${nh(v)}`,w=h==="amp"&&y.length===1&&y[0].total_cn!==null?` (${Math.round(y[0].total_cn)} copies)`:"";return[`${lN(y.length,m,g)} on ${S}${w}`]}),o=i.length?nh(i):`no copy-number changes against ${n.baseline} copies`,u=[...new Set(n.drivers.map(h=>h.gene).filter(h=>!!h))].sort(),d=u.length?`Drivers in ${nh(u)}.`:"No drivers.";return`${o.charAt(0).toUpperCase()}${o.slice(1)}. ${d}`}function Mm({fingerprint:n,size:a,title:i,subtitle:o,className:u}){const d=tN[a],h=d.box/2,m=(n==null?void 0:n.events)??[],g=(n==null?void 0:n.drivers)??[],y=n?`Genome fingerprint: ${i1(n)}`:"No copy-number data";return c.jsxs("svg",{viewBox:`0 0 ${d.box} ${d.box}`,role:a==="mini"?void 0:"img","aria-label":a==="mini"?void 0:y,"aria-hidden":a==="mini"?!0:void 0,className:u,children:[c.jsxs("g",{fill:"none",strokeLinecap:"butt",children:[Object.entries(fc).map(([x,[v,S]])=>c.jsx("path",{className:"r-neu",strokeWidth:d.ringW,d:th(h,h,d.ring,v,S)},x)),m.map((x,v)=>{const S=nN(x.chrom,x.start,x.end);if(!S)return null;const w=x.kind==="loss"?d.loss:x.kind==="amp"?d.amp:d.gain,j=x.kind==="loss"?d.lossW:x.kind==="amp"?d.ampW:d.gainW;return c.jsx("path",{className:`r-${x.kind}`,strokeWidth:j,d:th(h,h,w,S[0],S[1])},`${x.chrom}-${x.start}-${v}`)}),d.drvW>0&&g.map((x,v)=>{const S=ec(x.chrom,x.pos);return S===null?null:c.jsx("path",{className:"r-drv",strokeWidth:d.drvW,d:th(h,h,d.drv,S-Ay/2,S+Ay/2)},`${x.gene}-${x.pos}-${v}`)})]}),a==="hero"&&i&&c.jsxs(c.Fragment,{children:[c.jsx("text",{className:"t-ink",x:h,y:h-2,textAnchor:"middle",fontSize:"24",fontWeight:"800",children:i}),o&&c.jsx("text",{className:"t-faint",x:h,y:h+18,textAnchor:"middle",fontSize:"12",fontWeight:"600",children:o})]})]})}const aN={"DNA|WG":{label:"WGS",icon:uc},"RNA|WT":{label:"RNA",icon:Tw}};function Oy({children:n}){return c.jsx("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:n})}function sN({sex:n}){const a=n==null?void 0:n.toUpperCase();return a==="MALE"?c.jsxs(Oy,{children:[c.jsx("circle",{cx:"12",cy:"9",r:"4.5"}),c.jsx("path",{d:"M7.6 8.2c.5-2.9 2.4-4.7 4.6-4.7 2.6 0 4.4 1.7 4.4 4.3-2.2.1-4.2-.6-5.6-2.1"}),c.jsx("path",{d:"M3.5 21a8.5 7.5 0 0 1 17 0"}),c.jsx("path",{d:"m10 15.6 2 2.2 2-2.2"})]}):a==="FEMALE"?c.jsxs(Oy,{children:[c.jsx("circle",{cx:"12",cy:"9.2",r:"3.4"}),c.jsx("path",{d:"M6.3 14.2C4.6 9 6.6 2.8 12 2.8s7.4 6.2 5.7 11.4"}),c.jsx("path",{d:"M5 21.2a7 6.3 0 0 1 14 0"})]}):c.jsx(Qw,{size:16,"aria-hidden":!0})}const o1="wgts-patient-root";function iN(n,a){const i=n.getBoundingClientRect(),o=n.closest(".topbar"),u=o==null?void 0:o.parentElement,d=o&&u?u.getBoundingClientRect().top-o.getBoundingClientRect().top:0;return{x:i.left-a.left+i.width/2,y:i.top+d-a.top+i.height/2}}const r1=8;function lh(n,a,i,o){const u=i>=n.x?1:-1,d=Math.min(r1,Math.abs(i-n.x)/2,(a-n.y-14)/2);return[`M${n.x},${n.y+14}`,`V${a-d}`,`Q${n.x},${a} ${n.x+u*d},${a}`,`H${i-u*d}`,`Q${i},${a} ${i},${a+d}`,`V${o}`].join(" ")}function oN(n,a,i){const o=i.x>a.x?1:-1,u=Math.min(r1,Math.abs(i.x-a.x)/2,(a.top-n)/2);return[`M${a.x},${a.top}`,`V${n+u}`,`Q${a.x},${n} ${a.x+o*u},${n}`,`H${i.x-o*u}`,`Q${i.x},${n} ${i.x},${n+u}`,`V${i.top}`].join(" ")}function rN(n,a,i){const o=a.left+a.width/2,u=i.left+i.width/2,d=n-7,m=(n-25-.25*d)/.75;return`M${o},${d} C${o},${m} ${u},${m} ${u},${d}`}function uN(n,a){var o,u;const i=n.samples.find(d=>d.id===a);for(const d of(i==null?void 0:i.experiments)??[]){const h=(o=n.experiments[d])==null?void 0:o.normal,m=h?(u=n.experiments[h])==null?void 0:u.sample:void 0;if(m&&m!==a)return m}return null}function cN({data:n,sampleId:a,fingerprint:i,onSample:o}){const u=E.useRef(null),[d,h]=E.useState(null),[m,g]=E.useState(!1);E.useEffect(()=>{if(!d||m)return;const A=requestAnimationFrame(()=>g(!0));return()=>cancelAnimationFrame(A)},[d,m]);const y=new Set(n.failures.map(A=>A.sample)),x=E.useRef(a),[v,S]=E.useState(null);E.useEffect(()=>{if(x.current===a)return;const A=x.current;x.current=a,S(C=>({from:A,to:a,n:((C==null?void 0:C.n)??0)+1}))},[a]);const w=uN(n,a);E.useLayoutEffect(()=>{const A=u.current;if(!A)return;const C=()=>{const O=A.getBoundingClientRect(),z=document.getElementById(o1);if(!z)return;const _=Array.from(A.querySelectorAll("[data-sample]")).map(K=>{const $=K.getBoundingClientRect();return{id:K.dataset.sample,x:$.left-O.left+22,left:$.left-O.left,width:$.width,top:$.top-O.top,bottom:$.bottom-O.top}}),R=iN(z,O),Q=Math.min(..._.map(K=>K.top));h({root:R,trunk:Q-12,tabs:_})};if(C(),typeof ResizeObserver>"u")return;const D=new ResizeObserver(C);return D.observe(A),()=>D.disconnect()},[n,a]);const j=d==null?void 0:d.tabs.find(A=>A.id===a),N=w?d==null?void 0:d.tabs.find(A=>A.id===w):void 0,M=v?d==null?void 0:d.tabs.find(A=>A.id===v.from):void 0;return c.jsxs("div",{ref:u,className:"ltabs",children:[d&&c.jsxs("svg",{className:"ltabs-links","aria-hidden":!0,children:[d.tabs.map(A=>c.jsx("path",{d:lh(d.root,d.trunk,A.x,A.top)},A.id)),j&&c.jsxs(c.Fragment,{children:[c.jsx("path",{className:"ltabs-haze","data-moving":m,style:{d:`path("${lh(d.root,d.trunk,j.x,j.top)}")`}}),c.jsx("path",{className:"ltabs-on","data-moving":m,style:{d:`path("${lh(d.root,d.trunk,j.x,j.top)}")`}}),M&&v&&v.to===j.id&&c.jsx("path",{className:"ltabs-bead",pathLength:1,d:oN(d.trunk,M,j)},`bead-${v.n}`)]}),j&&N&&c.jsxs("g",{className:"ltabs-match",children:[c.jsx("path",{d:rN(d.trunk,j,N)}),c.jsx("text",{x:(j.left+j.width/2+N.left+N.width/2)/2,y:d.trunk-27,children:"matched normal"})]})]}),j&&c.jsx("span",{className:"ltabs-thumb","data-moving":m,"aria-hidden":!0,style:{width:j.width,height:j.bottom-j.top,transform:`translate(${j.left}px, ${j.top}px)`}}),c.jsx("div",{className:"ltabs-row",role:"tablist","aria-label":"Samples",children:n.samples.map(A=>{const C=A.id===a,D=i==null?void 0:i.samples.find(z=>z.sample===A.id),O=A.experiments.map(z=>({id:z,...n.experiments[z]})).filter(z=>z.technique);return c.jsxs("button",{type:"button",role:"tab","data-sample":A.id,"aria-selected":C,className:"ltab",onClick:()=>o(A.id),children:[c.jsxs("span",{className:"ltab-name",children:[A.category==="TUMOR"?c.jsx(Mm,{fingerprint:D,size:"mini",className:"h-[18px] w-[18px] flex-none"}):c.jsx(l1,{size:15,"aria-hidden":!0,className:"flex-none"}),Em(A.id,n.individual.id)," ",A.category==="TUMOR"?"tumour":"normal",y.has(A.id)&&c.jsx("span",{className:"ltab-warn",title:"A module failed for this sample","aria-label":"A module failed"})]}),c.jsxs("span",{className:"ltab-exps",children:[O.length===0&&c.jsx("span",{children:"No experiments"}),O.map(z=>{const _=aN[z.technique],R=(_==null?void 0:_.icon)??uc;return c.jsxs("span",{title:z.id,children:[c.jsx(R,{size:12,"aria-hidden":!0}),(_==null?void 0:_.label)??z.technique]},z.id)})]})]},A.id)})})]})}function fN({data:n,sampleId:a,fingerprint:i,onSample:o}){return c.jsx("div",{className:"ctabs",role:"tablist","aria-label":"Samples",children:n.samples.map(u=>{const d=i==null?void 0:i.samples.find(h=>h.sample===u.id);return c.jsxs("button",{type:"button",role:"tab","aria-selected":u.id===a,className:"ctab",onClick:()=>o(u.id),children:[u.category==="TUMOR"?c.jsx(Mm,{fingerprint:d,size:"mini",className:"h-[16px] w-[16px] flex-none"}):c.jsx(l1,{size:14,"aria-hidden":!0,className:"flex-none"}),Em(u.id,n.individual.id)," ",u.category==="TUMOR"?"tumour":"normal"]},u.id)})})}function Jo(n){let a=n;const i=new Set;return{get:()=>a,set:o=>{Object.is(o,a)||(a=o,i.forEach(u=>u()))},subscribe:o=>(i.add(o),()=>i.delete(o))}}function dc(n){return E.useSyncExternalStore(n.subscribe,n.get,n.get)}const _m=Jo(!1),ar=()=>_m.set(!0),Gu=()=>_m.set(!1),dN=Jo(!0);function u1({individualId:n,subtitle:a,patientIcon:i,report:o,compact:u,headerInView:d=dN}){const h=!dc(d),[m,g]=E.useState(!1),[y,x]=E.useState(!1);E.useEffect(()=>{const S=()=>x(window.scrollY>4);return S(),window.addEventListener("scroll",S,{passive:!0}),()=>window.removeEventListener("scroll",S)},[]);async function v(){try{await navigator.clipboard.writeText(window.location.href),g(!0),window.setTimeout(()=>g(!1),1600)}catch{window.prompt("Copy this link",window.location.href)}}return c.jsxs("div",{className:"topbar flex flex-wrap items-center justify-between gap-x-4 gap-y-3 px-8 pt-3 pb-2","data-scrolled":y,children:[c.jsxs("nav",{"aria-label":"Breadcrumb",className:"flex min-w-0 items-center gap-2 text-[13.5px]",children:[c.jsx("button",{type:"button",className:"crumb",onClick:ar,title:"Browse projects and patients",children:"Patients"}),n&&c.jsxs(c.Fragment,{children:[c.jsx(Cm,{size:14,"aria-hidden":!0,style:{color:"var(--chev)"}}),i&&c.jsx("span",{id:o1,className:"ltabs-icon",children:i}),c.jsx("h1",{className:"m-0 text-[20px] font-semibold tracking-tight",style:{color:"var(--ink)"},children:n}),a&&c.jsx("span",{className:"ml-1.5 truncate text-[13.5px]",style:{color:"var(--muted)"},children:a})]})]}),c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[o,c.jsx("button",{type:"button",className:"sc-ib","aria-label":"Copy a link to this view",onClick:v,children:c.jsx(Uw,{size:16,"aria-hidden":!0})}),c.jsx("span",{"aria-live":"polite",className:"text-xs",style:{color:"var(--muted)"},children:m?"Link copied":""})]}),u&&c.jsx("div",{className:"topbar-compact","data-open":h,inert:!h,"aria-hidden":!h,children:c.jsx("div",{children:u})})]})}function hN(){const n=Nm(),[a,i]=E.useState("");return c.jsxs("div",{className:`wgts ${Kn.theme}`,children:[c.jsx("aside",{className:"side","aria-label":"Navigation",children:c.jsxs("div",{className:"side-brand",children:[c.jsx("span",{className:"side-badge","aria-hidden":!0,children:c.jsx(uc,{size:17,strokeWidth:2})}),c.jsx("span",{className:"side-text side-title",children:"WGTS Reports"}),c.jsx("button",{type:"button",className:"side-search-icon","aria-label":"Browse projects and patients",title:"Browse projects and patients",onClick:ar,children:c.jsx(Wu,{size:17,"aria-hidden":!0})})]})}),c.jsxs("div",{className:"page",children:[c.jsx(u1,{}),c.jsxs("main",{className:"flex flex-col gap-4 px-8 pt-8 pb-10",children:[c.jsx("h1",{className:"m-0 text-[28px] font-semibold tracking-tight",children:"Open a patient"}),c.jsx("p",{className:"m-0 max-w-[60ch] text-[14.5px]",style:{color:"var(--ink-2)"},children:"Browse the projects that have a dashboard and pick a patient, or enter an individual's system id to see its WGTS report as live charts and tables."}),c.jsx("div",{children:c.jsxs("button",{type:"button",className:"sc-btn sc-b1 gap-2",onClick:ar,children:[c.jsx(Dw,{size:16,"aria-hidden":!0}),"Browse projects and patients"]})}),c.jsxs("form",{className:"flex flex-wrap gap-2",onSubmit:o=>{o.preventDefault(),a.trim()&&n(`/${a.trim()}`)},children:[c.jsxs("div",{className:"field w-[340px] max-w-full",children:[c.jsx(Wu,{size:16,"aria-hidden":!0,style:{color:"var(--chev)"}}),c.jsx("label",{className:"sr-only",htmlFor:"open-id",children:"Individual id"}),c.jsx("input",{id:"open-id",placeholder:"IID_H000001",value:a,onChange:o=>i(o.target.value)})]}),c.jsx("button",{type:"submit",className:"sc-btn sc-b1",disabled:!a.trim(),children:"Open"})]})]})]})]})}class hc extends Error{}class c1 extends Error{}function mN(){try{return localStorage.getItem(Jh)}catch{return null}}function f1(n){try{n?localStorage.setItem(Jh,n):localStorage.removeItem(Jh)}catch{}}function d1(){const n=mN();return{Accept:"application/json",...n?{Authorization:`Token ${n}`}:{}}}async function Pn(n,a={}){const i=new URLSearchParams;for(const[d,h]of Object.entries(a))h&&i.set(d,h);const o=i.toString(),u=await fetch(`${Kn.apiHost}/wgts/api/${n}${o?`?${o}`:""}`,{headers:d1()});if(u.status===401)throw new hc;if(u.status===403){const d=await u.json().catch(()=>({}));throw new c1(d.detail??"You may not see this patient's results.")}if(!u.ok)throw new Error(`The dashboard API answered ${u.status}.`);return await u.json()}async function gN(n){if(!(await fetch(`${Kn.apiHost}/api/v1/auth/`,{headers:{Accept:"application/json",Authorization:`Token ${n}`}})).ok)throw new Error("Isabl did not accept that token.");f1(n)}async function pN(n,a){const i=await fetch(`${Kn.apiHost}/api/v1/rest-auth/login/`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({username:n,password:a})});if(!i.ok)throw new Error("Isabl did not accept that username and password.");const o=await i.json();f1(o.key)}async function h1(n){const a=await fetch(`${Kn.apiHost}/wgts/api/${n}`,{headers:d1()});if(a.status===401)throw new hc;if(!a.ok)throw new Error(`The dashboard API answered ${a.status}.`);return await a.json()}const vN=()=>h1("projects/"),yN=n=>h1(`projects/${n}/individuals/`);function lm(n){const a=n.toUpperCase();return a.startsWith("BATTENBERG")||a.startsWith("CNV_")?"cn":a.startsWith("ANNOT_SNVS")||a.startsWith("ANNOT_INDELS")||a.startsWith("FFPERASE")?"mut":a.startsWith("MSISENSOR")?"msi":"other"}function Fi(n){return`fam-${lm(n)}`}function m1(n){return n.pk?`${n.app} #${n.pk}`:n.app}function Gt(n){return`${n.app}#${n.pk??""}`}const g1={drivers:"gene",coding:"position",all:"position"},xN=100;function zy(){return{scope:"drivers",sort:g1.drivers,q:"",effects:[],flags:[],range:null,ffpe:!1}}function p1(n){return(n.q.trim()?1:0)+n.effects.length+n.flags.length+(n.range?1:0)}function SN(n){const a={scope:n.scope,sort:n.sort,q:n.q.trim()||void 0,effects:n.effects.join(",")||void 0,flags:n.flags.join(",")||void 0,ffpe:n.ffpe?"all":void 0};return n.range&&(a[`${n.range.measure}_min`]=String(n.range.low),a[`${n.range.measure}_max`]=String(n.range.high)),a}const v1={missense:"Missense",truncating:"Truncating",splice:"Splice",inframe:"In-frame",synonymous:"Synonymous",other:"Other"},y1={hotspot:"Hotspot",in_dmp:"In DMP",oncogene:"Oncogene",tsg:"Tumour suppressor"};function bN(n){return`${n.chrom}:${n.pos}:${n.ref}>${n.alt}`}const x1=/^(?:chr)?([0-9]{1,2}|[XYxy]):([0-9,]+)(?:-([0-9,]+))?$/;function jN(n){return x1.test(n.trim())}function wN(n,a,i){return`chr${n}:${a.toLocaleString("en-US")}-${i.toLocaleString("en-US")}`}const NN={GENOMIC_EXACT:"exact match",GENOMIC_POS:"same position",CODON:"same codon",GENE:"same gene"};function CN(n){var d;if(!n)return null;const a=n.split(";"),i=(d=n.match(/SOM=(\d+)/))==null?void 0:d[1],o=NN[a[0]];return!i&&!o?n:[i?`${Number(i).toLocaleString("en-US")} somatic ${i==="1"?"sample":"samples"}`:"",o].filter(Boolean).join(", ")}function EN(n){const a=n==null?void 0:n.match(/^(\d+)\/(\d+)$/);return a?`${a[1]} of ${a[2]} ${a[2]==="1"?"copy":"copies"}`:n}function MN(n){return n.oncogene&&n.tsg?"Oncogene and TSG":n.oncogene?"Oncogene":n.tsg?"TSG":null}const Nn=(n,a)=>!(a instanceof hc)&&n<2;function _N(n,a){return Un({queryKey:["individual",n,a??null],queryFn:()=>Pn(`individuals/${encodeURIComponent(n)}/`,{version:a}),retry:Nn})}function TN(n,a,i){return Un({queryKey:["metrics",n,a,i??null],queryFn:()=>Pn(`individuals/${encodeURIComponent(n)}/metrics/`,{sample:a,version:i}),enabled:!!a,retry:Nn})}function RN(n,a){return Un({queryKey:["fingerprint",n,a??null],queryFn:()=>Pn(`individuals/${encodeURIComponent(n)}/fingerprint/`,{version:a}),retry:Nn})}const Aa=(n,a)=>`individuals/${encodeURIComponent(n)}/${a}/`;function AN(n,a,i){return Un({queryKey:["cn",n,a,i??null],queryFn:()=>Pn(Aa(n,"cn"),{sample:a,version:i}),enabled:!!a,retry:Nn})}function ON(n,a,i,o,u){return Un({queryKey:["ccf",n,a,i,o,u??null],queryFn:()=>Pn(Aa(n,"ccf"),{sample:a,measure:i,version:u,ffpe:o?"all":void 0}),enabled:!!a,retry:Nn})}function zN(n,a,i){return Un({queryKey:["signatures",n,a,i??null],queryFn:()=>Pn(Aa(n,"signatures"),{sample:a,version:i}),enabled:!!a,retry:Nn})}function DN(n,a,i){return Un({queryKey:["context",n,a,i??null],queryFn:()=>Pn(Aa(n,"context"),{sample:a,version:i}),enabled:!!a,retry:Nn})}function LN(n,a,i){return Un({queryKey:["fga",n,a,i??null],queryFn:()=>Pn(Aa(n,"fga"),{sample:a,version:i}),enabled:!!a,retry:Nn})}function HN(n,a,i){return Un({queryKey:["tmb",n,a,i??null],queryFn:()=>Pn(Aa(n,"tmb"),{sample:a,version:i}),enabled:!!a,retry:Nn})}function UN(n,a,i){return Un({queryKey:["svs",n,a,i??null],queryFn:()=>Pn(Aa(n,"svs"),{sample:a,version:i}),enabled:!!a,retry:Nn})}function $N(n,a,i,o){return Ej({queryKey:["variants",n,a,i,o??null],queryFn:({pageParam:u})=>Pn(Aa(n,"variants"),{sample:a,version:o,...SN(i),page:String(u),page_size:String(xN)}),initialPageParam:1,getNextPageParam:(u,d,h)=>u.status!=="ok"||!u.data?void 0:d.reduce((g,y)=>g+(y.status==="ok"&&y.data?y.data.rows.length:0),0)<u.data.total?h+1:void 0,enabled:!!a,placeholderData:Ex,retry:Nn})}function VN(){return Un({queryKey:["picker","projects"],queryFn:vN,staleTime:6e4,retry:Nn})}function FN(n){return Un({queryKey:["picker","patients",n],queryFn:()=>yN(n),staleTime:6e4,placeholderData:Ex,retry:Nn})}const Ci=6,kN=16,S1=7,tc=6;function ah(n){const a=Math.min(S1,(n-tc)/2);return`M${Ci},${tc} V${n-a}`}function sh(n){const a=Math.min(S1,(n-tc)/2);return`M${Ci},${n-a} Q${Ci},${n} ${Ci+a},${n} H${kN}`}function BN(n,a){return`M${Ci},${n} V${a}`}function GN(n,a,i,o){const[u,d]=E.useState(null),[h,m]=E.useState([]),[g,y]=E.useState(!1),[x,v]=E.useState(null),[S,w]=E.useState(280),j=n.map(_=>`${_.key}:${_.available}`).join();E.useLayoutEffect(()=>{if(!u)return;const _=()=>{const Q=Array.from(u.querySelectorAll(i));m(n.flatMap((K,$)=>{const le=Q[$];if(!le)return[];const oe=le.offsetTop,te=le.offsetHeight;return[{key:K.key,cy:oe+te/2,top:oe,height:te,available:K.available}]}))};if(_(),typeof ResizeObserver>"u")return;const R=new ResizeObserver(_);return R.observe(u),()=>R.disconnect()},[u,j,i,o]);const N=h.find(_=>_.key===a&&_.available),M=N?{top:N.top,height:N.height}:null;E.useEffect(()=>{if(!N||g)return;const _=requestAnimationFrame(()=>y(!0));return()=>cancelAnimationFrame(_)},[N,g]);const[A,C]=E.useState(a);E.useEffect(()=>{if(A===a)return;const _=A;C(a),_&&a&&v(R=>({from:_,to:a,n:((R==null?void 0:R.n)??0)+1}))},[a,A]);const D=x?h.find(_=>_.key===x.from):void 0,[O,z]=E.useState(null);return E.useLayoutEffect(()=>{if(N&&O!==null&&O!==N.cy){const _=Math.abs(N.cy-O)/38;w(Math.round(Math.min(620,240+80*_)))}z(N?N.cy:null)},[N==null?void 0:N.key,N==null?void 0:N.cy]),{setBox:d,tree:h,on:N,light:M,glides:g,hop:x,leaving:D,duration:S}}function qN({tree:n,on:a,light:i,glides:o,hop:u,leaving:d}){return c.jsxs(c.Fragment,{children:[n.length>0&&c.jsxs("svg",{className:"ltabs-links side-tree","aria-hidden":!0,children:[c.jsx("circle",{cx:Ci,cy:tc,r:"2.5",className:"side-root"}),c.jsx("path",{d:ah(n[n.length-1].cy)}),n.map(h=>c.jsx("path",{d:sh(h.cy),"data-off":h.available?void 0:"true"},h.key)),a&&c.jsxs(c.Fragment,{children:[c.jsx("path",{className:"ltabs-haze","data-moving":o,style:{d:`path("${ah(a.cy)}")`}}),c.jsx("path",{className:"ltabs-on","data-moving":o,style:{d:`path("${ah(a.cy)}")`}})]}),n.map(h=>c.jsxs("g",{className:"side-stub","data-active":h.key===(a==null?void 0:a.key)||void 0,children:[c.jsx("path",{className:"ltabs-haze",d:sh(h.cy)}),c.jsx("path",{className:"ltabs-on",d:sh(h.cy)})]},h.key)),a&&d&&u&&u.to===a.key&&c.jsx("path",{className:"ltabs-bead",pathLength:1,d:BN(d.cy,a.cy)},`bead-${u.n}`)]}),c.jsx("span",{className:"side-light","aria-hidden":!0,"data-on":i?"true":void 0,"data-glides":o||void 0,style:i?{transform:`translateY(${i.top}px)`,height:i.height}:void 0})]})}const ih=[{key:"overview",label:"Overview",icon:Hw},{key:"copyNumber",label:"Copy number",icon:Mw},{key:"mutations",label:"Mutations",icon:Vw},{key:"structuralVariants",label:"Structural variants",icon:qw},{key:"signatures",label:"Signatures and HRD",icon:Rw},{key:"rna",label:"RNA",icon:Iw,soon:!0},{key:"germline",label:"Germline",icon:Gw,soon:!0},{key:"quality",label:"Quality",icon:Ow,soon:!0}],Dy="wgts-side-collapsed";function QN(){const[n,a]=E.useState(()=>{try{return localStorage.getItem(Dy)==="1"}catch{return!1}});return[n,o=>{a(o);try{localStorage.setItem(Dy,o?"1":"0")}catch{}}]}function YN({analyses:n,onPage:a,sampleLabel:i,picked:o,onPick:u,sections:d,activeStore:h,onSection:m}){const g=dc(h),[y,x]=QN(),{setBox:v,...S}=GN(ih.map(({key:R})=>({key:R,available:d.has(R)})),g,".sc-nav",y),[w,j]=E.useState(!1),[N,M]=E.useState(!1),A=["cn","mut","msi","other"],C=(R,Q)=>A.indexOf(lm(R.app))-A.indexOf(lm(Q.app))||R.app.localeCompare(Q.app),D=N||o!==null;E.useEffect(()=>{const R=Q=>{Q.key.toLowerCase()==="k"&&(Q.metaKey||Q.ctrlKey)&&(Q.preventDefault(),ar())};return document.addEventListener("keydown",R),()=>document.removeEventListener("keydown",R)},[]);const O=n.filter(R=>R.role==="input"),z=O.filter(R=>a.has(Gt(R))).sort(C),_=[...O.filter(R=>!a.has(Gt(R))).sort(C),...n.filter(R=>R.role==="cohort")];return c.jsxs("aside",{className:"side","aria-label":"Patient navigation","data-collapsed":y||void 0,children:[c.jsxs("div",{className:"side-brand",children:[c.jsx("span",{className:"side-badge","aria-hidden":!0,children:c.jsx(uc,{size:17,strokeWidth:2})}),c.jsx("span",{className:"side-text side-title",children:"WGTS Reports"}),c.jsx("button",{type:"button",className:"side-search-icon","aria-label":"Browse projects and patients",title:"Browse projects and patients (Ctrl or ⌘ K)",onClick:ar,children:c.jsx(Wu,{size:17,"aria-hidden":!0})}),c.jsx("button",{type:"button",className:"side-toggle","aria-label":y?"Expand the menu":"Collapse the menu","aria-expanded":!y,title:y?"Expand the menu":"Collapse the menu",onClick:()=>x(!y),children:y?c.jsx(Bw,{size:17,"aria-hidden":!0}):c.jsx(kw,{size:17,"aria-hidden":!0})})]}),c.jsxs("nav",{ref:v,"aria-label":"Patient sections",className:"side-nav",style:{"--duration":`${S.duration}ms`},children:[c.jsx(qN,{...S}),ih.map(({key:R,label:Q,icon:K,soon:$},le)=>{const oe=d.has(R);return c.jsxs("div",{className:"contents",children:[$&&!ih[le-1].soon&&c.jsx("span",{className:"side-group",children:"Coming soon"}),c.jsxs("button",{type:"button",className:"sc-nav","aria-current":oe&&g===R?"location":void 0,"aria-label":Q,disabled:!oe,title:y?Q:oe?void 0:"Not available for this sample yet",onClick:()=>m(R),children:[c.jsx(K,{size:17,strokeWidth:1.7,"aria-hidden":!0}),c.jsx("span",{className:"side-text",children:Q})]})]},R)})]}),c.jsx("div",{className:"flex-auto"}),c.jsxs("section",{"aria-label":"Analyses on this page",className:"side-sources",children:[c.jsxs("button",{type:"button",className:"side-fold","aria-expanded":D,onClick:()=>M(R=>!R),children:["Analyses on this page",c.jsx("span",{className:"side-count",children:z.length}),c.jsx(t1,{size:14,"aria-hidden":!0,"data-open":D})]}),D&&z.length===0&&c.jsxs("span",{className:"px-3 text-xs",style:{color:"var(--menu-muted)"},children:["Nothing on this page reads an analysis for ",i||"this sample","."]}),D&&z.map(R=>{const Q=Gt(R),K=R.state==="failed",$=R.modules.filter(le=>le.status==="failed");return c.jsxs("button",{type:"button",className:`tb-src${K?" fail":""}`,"aria-pressed":o===Q,title:K?$.map(le=>`${le.label} failed`).join("; "):"Show what it feeds",onClick:()=>u(o===Q?null:Q),children:[K?c.jsx(a1,{size:12,strokeWidth:2.6,"aria-hidden":!0,style:{color:"var(--fail-d)",margin:"0 -2px"}}):c.jsx("span",{className:`tb-dot ${Fi(R.app)}`,"aria-hidden":!0}),c.jsxs("span",{className:"truncate",children:[R.app," ",R.version??""]}),K&&c.jsx("span",{className:"sr-only",children:", failed"}),c.jsx("span",{className:"tb-n",children:R.pk?`#${R.pk}`:""})]},Q)}),D&&_.length>0&&c.jsxs(c.Fragment,{children:[c.jsxs("button",{type:"button",className:"tb-src","aria-expanded":w,onClick:()=>j(R=>!R),children:[c.jsx("span",{className:"tb-dot fam-other","aria-hidden":!0}),w?"Hide":"Show"," ",_.length," more for ",i||"this sample"]}),w&&_.map(R=>c.jsxs("span",{className:"tb-src",style:{cursor:"default"},children:[c.jsx("span",{className:`tb-dot ${Fi(R.app)}`,"aria-hidden":!0}),c.jsx("span",{className:"truncate",children:R.role==="cohort"?`${R.app}${R.project?`, project ${R.project}`:""}`:`${R.app} ${R.version??""}`}),c.jsx("span",{className:"tb-n",children:R.pk?`#${R.pk}`:""})]},Gt(R)))]}),D&&c.jsx("span",{className:"px-3 pt-2 text-xs leading-normal",style:{color:"var(--menu-muted)"},children:"Pick one to see what it feeds."})]})]})}function os({envelope:n}){const a=n.status==="error",i=a?Aw:zw;return c.jsxs("div",{className:"flex items-start gap-2.5 text-sm",style:{color:"var(--ink-2)"},children:[c.jsx(i,{size:18,"aria-hidden":!0,style:{color:a?"var(--warn-ink)":"var(--chev)",flex:"none"}}),c.jsxs("div",{className:"flex flex-col gap-1",children:[c.jsx("span",{className:"font-semibold",style:{color:"var(--ink)"},children:a?"This panel could not be read":"Nothing to show here"}),n.warnings.map(o=>c.jsx("span",{children:o},o))]})]})}const am={summary:{title:"Genome fingerprint and summary",intro:"A one-glance portrait of the selected tumour: its copy-number changes and driver mutations drawn as a ring, a sentence describing them, and the headline measurements of the sample.",sections:[{heading:"The fingerprint ring",paragraphs:["The ring is the whole genome. Chromosome 1 starts at the top and the ring runs clockwise through chromosome 22 to X, each chromosome's arc in proportion to its length (GRCh37).","Copy-number changes are called against the tumour's baseline, its ploidy rounded to whole copies. Very short changes are drawn at a minimum length so they stay visible."],terms:[["Gains (outer track, orange)","Regions with at least one copy more than the baseline."],["Amplifications (outer track, darker and thicker)","Regions with three or more copies above the baseline."],["Losses (inner track, blue)","Regions with at least one copy fewer than the baseline."],["Drivers (black ticks)","Where the tumour's likely driver mutations sit (see the Mutations card for how they are flagged)."]]},{heading:"The sentence",paragraphs:["Written from the same data as the ring: how many amplifications, gains and losses there are and on which chromosomes, and which genes carry driver mutations."]},{heading:"The measurements",paragraphs:["Each tile shows a value, a small picture of where it sits on its scale when it has a natural one, and the analysis it came from. A tile with no value says why: the analysis was not run, it failed, or it does not apply to this kind of report (tumour-only reports have no matched normal)."],terms:[["Purity","The estimated fraction of cells in the sample that are tumour cells, from 0 to 1. The ring fills to the value."],["Ploidy","The tumour's average number of copies across the genome. The scale runs from 1 to 6 copies; the tall tick marks 2, a diploid genome."],["Coverage","The median sequencing depth of the tumour across the genome, in reads (×)."],["TMB per Mb","Tumour mutational burden: somatic SNVs and indels per megabase of genome. The report computes it from the counts of the SNV and indel calls. The scale is logarithmic, 0.01 to 100."],["MSI score","The MSIsensor score: the percentage of microsatellite sites that look unstable in the tumour."],["FGA","Fraction of the genome altered: the share of the genome whose copy number differs from the baseline, from 0 to 1. It is read from the project-wide Battenberg tables."]]},{heading:"Linking back to the analyses",paragraphs:[`Every value names its analysis, with version and Isabl id. Picking an analysis in the side menu's "Analyses on this page" highlights the tiles and cards it feeds.`]}]},copyNumber:{title:"Copy number",intro:"How many copies of each part of the genome the tumour carries, segment by segment, from chromosome 1 to X.",sections:[{heading:"What is drawn",paragraphs:['Each horizontal stroke is one segment: a stretch of the genome with a constant copy number. Its height is the number of copies, from 0 up to 8; anything higher is drawn at the top and the axis reads "8+". A gain or amplification rises as a column from the baseline to its stroke, and a loss falls to it, so the changes read as a landscape. Alternating grey bands mark the chromosomes, named in a strip along the bottom.',`The line across the plot is the baseline: the tumour's ploidy rounded to whole copies (labelled, for example, "2 copies"). Segments are coloured by how they compare with it.`],terms:[["Grey","Neutral: the same number of copies as the baseline."],["Orange","Gain: at least one copy more than the baseline."],["Dark orange","Amplification: three or more copies above the baseline."],["Blue","Loss: at least one copy fewer than the baseline."]]},{heading:"Total or allele-specific",paragraphs:["Total shows all copies together. Allele-specific, when the analysis provides it, splits each segment into its major allele (the more common parental copy, dark) and minor allele (light). Where the two are equal they are drawn slightly apart so both stay visible. A minor allele of 0 means one parent's copy is lost there (loss of heterozygosity)."]},{heading:"Driver genes",paragraphs:["A label along the top names each gene with likely driver mutations, one per gene, joined by a line to a dot on the segment the gene sits on, so its copy number can be read off at once. Hover one for its protein changes and the copies there."]},{heading:"Amplified and lost genes",paragraphs:["The oncogenes the report calls amplified and the tumour suppressors it calls homozygously lost, from the copy number over each gene, in chromosome order. The row of cells shows the copy number (all eight filled means eight copies or more). When the sample has RNA, each gene also shows its expression against each expression cohort: the log2 of this sample's level over the cohort's mean, so +1 is twice the cohort's level. Point at a gene to mark it on the plot; click it to glide to its chromosome."]},{heading:"Fraction of genome altered against the cohort",paragraphs:["The tumour's FGA (the share of the genome whose copy number differs from the baseline) set against every tumour in the project's FGA table, by disease, as the report draws it: only diseases with at least five tumours, plus this tumour's own, highest median first, with some disease labels merged (OSOS and CHOS as OS, MFH as US, LIHB as HBL). Each box spans the middle half of a disease's tumours, the line in it is the median, the whiskers reach the furthest tumours within one and a half box-lengths, and each dot is one tumour. The pin is this tumour; hover a disease for its numbers and, in the tumour's own disease, where it ranks.","The cohort is the one the report compared with when it ran. It does not grow as the project does; rerun the report to compare with the cohort as it is now."]},{heading:"Reading and moving around",terms:[["Hover a segment","Its call, copies (major + minor), coordinates and, when available, log2 ratio. A readout at the foot of the plot gives the pointer's place on the genome."],["Click a segment","Lists the mutations inside it in the Mutations card."],["Click a driver","Finds that gene in the Mutations card."],["Pinch, or Ctrl and scroll","Zooms around the pointer. Plain scrolling always scrolls the page."],["Drag","Pans a zoomed view."],["Arrow keys, plus and minus, 0","With the plot focused: pan, zoom in and out, and show the whole genome."],["Double-click a chromosome, or click its name","Glides to fill the view with it; the strip then counts megabases."],["The overview","The whole genome in miniature under the strip. Its window shows where the plot is: drag the window to move, its ends to resize, or click elsewhere to centre it there. The button by the title returns to the whole genome."],["Hover a mutation in the table","Marks it here, with a ring on the segment it sits on and its copy number."]]},{heading:"Tumour-only reports",paragraphs:["Without a matched normal there is no ploidy estimate, so segments come from CNVkit and are called against two copies. Allele-specific copy numbers are not available."]}]},mutations:{title:"Mutations",intro:"The tumour's somatic SNVs and indels that passed the callers' filters: how they are distributed across cancer cells, and a searchable, filterable table of every call.",sections:[{heading:"Which mutations",terms:[["Drivers","Likely drivers flagged by the report: coding mutations that match OncoKB or COSMIC driver annotations (the exact protein change, or a damaging consequence in a known cancer gene), plus known hotspots the callers missed and the report recovered from the tumour's reads."],["Coding","Mutations whose effect changes a protein, by the report's list of coding effects."],["All","Every PASS SNV and indel."]],paragraphs:["The counts beside each choice follow the search and filters, so they always say what you would see."]},{heading:"FFPE samples",paragraphs:["Formalin-fixed (FFPE) tissue damages DNA in ways that look like mutations, mostly C>T changes at low allele fractions. For an FFPE sample, FFPERASE scores each SNV and indel for how likely it is to be such an artifact, and the report counts only the calls scored at or below its threshold (quoted beside the table). Its SNV, indel and coding totals and the TMB leave the rest out.",`The report marks each call it leaves out, and the dashboard follows that mark: the Coding and All counts, the table and the curve leave those calls out, and the card's subtitle says so. Drivers are all listed, as in the report, and any the filter would remove carry an "FFPE filtered" tag. "Show filtered calls", under FFPE filter beside the table, brings the removed calls back, tagged the same way.`]},{heading:"Cancer cell fraction and variant allele fraction",paragraphs:["The curve across the top is a smoothed histogram of every PASS mutation; driver mutations sit on it as labelled dots, and the diamond on the axis is the median. Switch between the two measures:"],terms:[["CCF",'Cancer cell fraction: the estimated share of cancer cells carrying the mutation, corrected for purity and copy number. Around 1 (the "clonal" mark) means nearly every cancer cell has it, which suggests it arose early; clearly below 1 means a subclone. Estimates can land somewhat above 1. Shown from 0 to 2.'],["VAF","Variant allele fraction: the share of sequencing reads at the position that carry the mutation, from 0 to 1. Raw, not corrected for purity or copy number. Tumour-only reports open on VAF, since CCF needs a matched normal."]]},{heading:"Filtering by the curve",paragraphs:["Drag across the curve to keep only mutations in that CCF or VAF range: the curve stays lit inside the range and fades outside it, and the range is read out at its foot. Drag the edges to resize it, or its body to move it. The range appears with the other filters and can be removed there, or by clicking the curve."]},{heading:"Coding mutations against reference cohorts",paragraphs:["At the foot of the card, the tumour's coding SNVs and indels set against reference tumours of the same disease, as the report's TMB figure draws them: Grobner and colleagues' published pan-cancer cohort, where the disease has a match there, and MSK's TMB reference project. Each cohort is a violin cut at its smallest and largest tumour; two cohorts share one violin, one on each side. The bar inside marks the middle half and the circle the median. The line across is this tumour; hover a cohort for its numbers and where the tumour ranks.","Counts are coding mutations as the report counts them (after the FFPE filter for FFPE samples), the same numbers as the Coding tab. The MSK cohort leaves out tumours far above its 99th percentile, as the report does. The cohorts are the ones the report compared with when it ran; rerun the report to compare with them as they are now."]},{heading:"The table",terms:[["Gene and position","The gene, and the mutation's chromosome and position (GRCh37)."],["Change","The protein change, with the cDNA change beneath."],["Effect","What the mutation does to the gene, from the VEP consequence (or the report's effect). Truncating effects are in bold."],["VAF and CCF bars","The value with a bar for quick comparison; the CCF bar's tick marks 1, clonal."],["Driver","Flagged as a likely driver (shown when the table is not already limited to drivers)."],["Hotspot","The exact protein change is a known recurrent cancer hotspot."],["In DMP","The same mutation was also found by the patient's clinical MSK-IMPACT (DMP) sequencing."],["FFPE filtered","FFPE samples only: the report's FFPE artifact filter leaves this call out of its counts (see FFPE samples)."]]},{heading:"Opening a row",terms:[["Variant","SNV or indel, with the reference and alternate bases."],["Reads","Reads supporting the mutation out of all reads at the position. Only hotspots the report recovered from the tumour's reads have them; the callers' tables give no single count."],["Normal VAF","The mutation's allele fraction in the matched normal; near 0 for a somatic mutation."],["Mutant copies","How many copies of that part of the genome carry the mutation, out of all copies there."],["Consequence","The full VEP consequence."],["COSMIC","How many samples in COSMIC carry it, and how closely they match (exact change, same position, codon or gene)."],["Expression","The gene's expression in the tumour's RNA, in transcripts per million, when RNA was sequenced."],["Gene role","Whether the gene is a known oncogene or tumour suppressor gene (TSG)."],["Show on copy number","Zooms the Copy number card to the mutation's chromosome and marks it."]]},{heading:"Searching and filtering",paragraphs:["Search takes a gene, a protein or cDNA change, a COSMIC term, or a locus such as chr12:25,398,284 or a range such as chr8:1-50,000,000. Press / anywhere on the page to jump to it. Each filter's count is how many rows you would get by ticking it, given everything else."],terms:[["Missense","One amino acid replaced by another."],["Truncating","Stop gained or lost, start lost, or a frameshift."],["Splice","Changes a splice site or splice region."],["In-frame","Inserts or deletes amino acids without shifting the reading frame."],["Synonymous","Changes the DNA but not the amino acid."],["Other","Everything else, such as intronic, UTR or upstream changes."]]}]},structuralVariants:{title:"Structural variants",intro:"The tumour's rearrangements as the report shows them: those with a breakpoint in an oncogene or tumour suppressor, those that take in a whole gene, and how all of them group into rearrangement signatures.",sections:[{heading:"Which rearrangements",paragraphs:["The report works from the high-confidence structural variants of ANNOT_SVS, which keeps calls made by two or more callers (SvABA, BRASS and GRIDSS) and annotates the genes they touch with AnnotSV. The count beside the title is how many of these the report counts, its rearrangements total.",`The tables keep the rearrangements whose genes include an oncogene or tumour suppressor, by the report's gene lists. It also searches the callers' raw calls for known rearrangements the high-confidence set can miss, such as CIC fusions, and adds them; a rescued event that is not a two-caller PASS says so in its callers, as in "gridss (CIC rescued)".`]},{heading:"The two tables",terms:[["Rearranged oncogenes and tumour suppressors",'One row per rearrangement and gene it hits, with the gene and breakpoint on each side. A gene near a breakpoint rather than in it is named as the report names it, such as "TERT +/- 100Kb".'],["Whole-gene rearrangements","Rearrangements that take in a whole oncogene or tumour suppressor, from start to end: a deletion of the whole gene, for example."],["Role","Whether the row's genes include an oncogene, a tumour suppressor or both, as the report colours its rows. Click a role above the tables to show only its rows."],["Left and right","Each breakpoint's gene, position (GRCh37) and where it falls in the gene, as AnnotSV writes it (intron5, exon2-exon5). Breakpoints are ordered by chromosome, then position."],["Callers and support","The callers that made the call, and the most reads any of them gives in support."],["Pileups","Supporting reads over all reads at each breakpoint in the tumour's alignments, left then right."],["Expression","For tumours with RNA: whether each gene's expression is high or low against each expression cohort (p63 is cohort project 63): at or above its 90th percentile, at or below its 10th, or neither (None). N/A means the cohort has no value for the gene."]],paragraphs:["Open a row to see both breakpoints, show them on the copy-number card, or copy their IGV loci."]},{heading:"Rearrangement signatures",paragraphs:["WGSPOST groups the tumour's rearrangements the way rearrangement signatures are described: clustered (rearrangements that sit unusually close together, as in chromothripsis) or dispersed, then by class and, except for translocations, by size from under 1 kb to over 1 Mb. Each bar is how many rearrangements fall in a group, grouped under its class; lighter bars are the clustered ones, in the shaded zone. A group with none shows a short stub on the baseline. Hover a bar for its name and its share of all rearrangements, or a class in the key to light its bars.","WGSPOST counts from its own copy of the calls, so its total can differ slightly from the report's rearrangements count."],terms:[["Deletion","A stretch of the genome lost between two breakpoints."],["Tandem duplication","A stretch copied next to itself."],["Inversion","A stretch turned around in place."],["Translocation","A join between two chromosomes."]]}]},signaturesHrd:{title:"Signatures and HRD",intro:"Which mutational processes left their mark on the tumour, set against tumours of the same disease, and whether it shows homologous recombination deficiency (HRD), as the report shows them.",sections:[{heading:"Mutational signatures",paragraphs:["WGSPOST fits known COSMIC substitution signatures to the tumour's somatic SNVs and estimates how many mutations each one accounts for. The left column is this tumour: each band is a signature's share of its mutations, the largest first.","The right column is the average of tumours of the same disease in the cohort (n is how many), each tumour's shares averaged and scaled to the cohort's average mutation count. A ribbon joins each signature's two bands, widening or narrowing with its share, so a signature can be followed from the tumour to its cohort; a label on the ribbon says how many percentage points the tumour leads or trails the cohort by, where the difference is at least 5. Hover a band, a ribbon or a row of the table for the numbers.","Seven signatures get colours of their own (eight when there are no more than eight); any beyond that are drawn together as Other. A tumour without a cohort to compare shows its own shares as one column."],terms:[["Signature","A pattern of substitutions, by the base change and its neighbours, that a mutational process leaves (SBS1, SBS5)."],["Aetiology","The process the report links a signature to, when it names one."]]},{heading:"96 mutational contexts",paragraphs:["Every substitution is one of six kinds (C>A, C>G, C>T, T>A, T>C, T>G, naming the pyrimidine base of the pair) and sits between two neighbouring bases, which gives 96 contexts. The top panel counts the tumour's SNVs in each, as WGSPOST's MutationalPatterns step does. The middle panel is what the fitted signatures rebuild: each signature's probabilities for the 96 contexts, weighted by its contribution above and added up. The bottom panel is the first minus the second, so a bar above the line is a context with more SNVs than the signatures explain.","Share draws each profile as percentages of its own total, which is how the report's figure compares the two; Count draws SNVs. Both profiles share one scale, and the difference its own. Click a class in the header to open it and name its sixteen contexts, written as the base before, the mutated base in colour, and the base after. Hover a column to read all three panels at once.","Cosine similarity and RSS are the report's own measures of the fit: the closer to 1 (cosine) and to 0 (RSS), the better the signatures explain the tumour. They are computed by the report from the relative profiles, as MutationalPatterns does. For an FFPE sample, switch between the run the report uses (its FFPE-filtered calls) and the unfiltered one. When the report did not include the signature matrix its fit used, only the observed profile is drawn."]},{heading:"HRD scores",paragraphs:["Two classifiers estimate whether the tumour has lost homologous recombination repair, as BRCA1 or BRCA2 loss does: HRDetect, from the substitution, indel and rearrangement patterns below, and CHORD, from its own set of mutation features. The report rates each HIGH at or above its threshold and LOW below it; the line on each gauge is the threshold."]},{heading:"HRDetect features",paragraphs:["The six features HRDetect weighs, for every tumour in the cohort and this one, each scaled from 0 (the cohort's lowest) to 1 (its highest). Each row is one feature: the pin is this tumour, the dots beneath are the cohort's samples, the shaded band is the middle half of the cohort and the line in it the median. With eight or more cohort samples a smoothed outline of how the samples are spread is drawn above the dots; with fewer it is left out, because it would suggest more than the data says. The words at the right say how many of the other cohort samples the tumour is above. Hover a row for the unscaled value. For FFPE samples the tumour's values come from its FFPE-filtered analysis."],terms:[["Del. MH","The share of deletions with microhomology at their ends, a sign of repair by end joining."],["SBS3 and SBS8","Substitution signatures 3 and 8."],["RS3 and RS5","Rearrangement signatures 3 (small tandem duplications) and 5 (deletions)."],["HRD index","Loss of heterozygosity, telomeric allelic imbalance and large-scale state transitions, combined."]]}]}},IN={summary:{BATTENBERG:"Tumour purity and ploidy, and the copy-number segments the ring's gains and losses are called from.","BATTENBERG cohort":"Project-wide Battenberg tables, which hold the FGA value and the cohort it is compared with.",CNV_UNMATCHED:"Copy-number segments of a tumour-only report (CNVkit), which the ring's gains and losses are called from.",MOSDEPTH:"The median sequencing coverage.",MSISENSOR:"The MSI score.",MSISENSOR_UNMATCHED:"The MSI score of a tumour-only report.",ANNOT_SNVS:"Somatic SNV calls: their count goes into TMB, and driver SNVs are marked on the ring.",ANNOT_INDELS:"Somatic indel calls: their count goes into TMB, and driver indels are marked on the ring.",ANNOT_SNVS_UNMATCHED:"Tumour-only SNV calls: their count goes into TMB, and driver SNVs are marked on the ring.",ANNOT_INDELS_UNMATCHED:"Tumour-only indel calls: their count goes into TMB, and driver indels are marked on the ring.",WGSPOST:"Cancer cell fractions of the mutations, read together with the driver calls marked on the ring."},copyNumber:{BATTENBERG:"Every segment drawn: total copies, major and minor allele copies, and the ploidy the baseline is rounded from.","BATTENBERG cohort":"Project-wide Battenberg tables of FGA: the tumour's own FGA, and the cohort the FGA figure compares it with, as it was when the report ran.",CNV_UNMATCHED:"The segments of a tumour-only report (CNVkit), drawn against two copies."},mutations:{ANNOT_SNVS:"The tumour's PASS somatic SNVs and their annotation: gene, protein and cDNA change, effect, VAF, read counts, normal VAF and COSMIC.","ANNOT_SNVS cohort":"The TMB reference project's coding SNVs: MSK's reference tumours for the disease, counted for the TMB figure, as they were when the report ran.","ANNOT_INDELS cohort":"The TMB reference project's coding indels, counted for the TMB figure like its SNVs.",ANNOT_INDELS:"The tumour's PASS somatic indels and their annotation, as for SNVs.",ANNOT_SNVS_UNMATCHED:"Tumour-only SNV calls and their annotation.",ANNOT_INDELS_UNMATCHED:"Tumour-only indel calls and their annotation.",WGSPOST:"Each mutation's cancer cell fraction (CCF) and how many copies carry it.",BATTENBERG:"Ploidy, which fills in the copy count where WGSPOST has none, and purity, which gives a CCF to hotspots recovered from the tumour's reads.",FFPERASE_SNVS:"FFPE samples: each SNV's artifact score. Calls scoring above the report's threshold are left out of the counts.",FFPERASE_INDELS:"FFPE samples: each indel's artifact score. Calls scoring above the report's threshold are left out of the counts."},structuralVariants:{ANNOT_SVS:"The high-confidence structural variants and their AnnotSV gene annotation: the rearrangements the report counts and the rows of its tables.",ANNOT_SVS_UNMATCHED:"Tumour-only structural variants and their annotation, kept when rare in the population.",SVABA:"Raw SvABA calls, searched for known rearrangements the high-confidence set missed (rescued events).",GRIDSS:"Raw GRIDSS calls, searched for rescued events like SvABA's.",SVABA_UNMATCHED:"Raw tumour-only SvABA calls, searched for rescued events.",GRIDSS_UNMATCHED:"Raw tumour-only GRIDSS calls, searched for rescued events.",WGSPOST:"The rearrangement-signature counts.",WGSPOST_UNMATCHED:"The rearrangement-signature counts of a tumour-only report."},signaturesHrd:{WGSPOST:"The tumour's signature contributions, its SNV counts in the 96 mutational contexts, its HRDetect and CHORD scores, and its HRDetect features.",WGSPOST_FFPE:"For an FFPE sample, the same from the FFPE-filtered calls.","WGSPOST cohort":"The cohort's signature contributions and HRDetect features, which the tumour is compared with."}};function XN(n,a){const i=a.role==="cohort"||a.app.endsWith("Project Application"),o=a.app.replace(/ Project Application$/,""),u=IN[n];return(i?u[`${o} cohort`]:u[o])??(i?"A project-wide run the report reads for comparison with the cohort.":"An analysis the report reads to build this card.")}function KN({topic:n,lineage:a,subject:i,onClose:o}){const u=am[n],d=E.useId(),h=E.useRef(null),m=a.filter(O=>O.role!=="cohort"&&!O.app.endsWith("Project Application")),g=a.filter(O=>!m.includes(O)),y=E.useRef(o);y.current=o,E.useEffect(()=>{var Q;const O=document.activeElement;(Q=h.current)==null||Q.focus();const z=document.documentElement,_=z.style.overflow;z.style.overflow="hidden";const R=K=>{K.key==="Escape"&&y.current()};return document.addEventListener("keydown",R),()=>{document.removeEventListener("keydown",R),z.style.overflow=_,O==null||O.focus()}},[]);const x=[...u.sections.map(O=>O.heading),"Sources"],v=x.map((O,z)=>`${d}-s${z}`),[S,w]=E.useState(0),j=E.useRef(null),N=E.useRef(!1),M=E.useRef(null),A=E.useRef(0);E.useEffect(()=>{const O=j.current;if(!O)return;const z=24,_=()=>{const K=O.getBoundingClientRect().top,$=Math.max(0,O.scrollHeight-O.clientHeight),le=v.map(ee=>{const X=document.getElementById(ee);return X?X.getBoundingClientRect().top-K:1/0}),oe=Math.max(0,...le.map(ee=>Number.isFinite(ee)?ee+O.scrollTop-$-z:0)),te=z+($>0?oe*Math.min(1,O.scrollTop/$):0);let Y=0;le.forEach((ee,X)=>{ee<=te&&(Y=X)}),w(Y)},R=()=>{if(N.current){M.current===null?(window.clearTimeout(A.current),A.current=window.setTimeout(()=>M.current=O.scrollTop,160)):Math.abs(O.scrollTop-M.current)>4&&(N.current=!1,M.current=null,_());return}_()},Q=()=>{N.current&&M.current===null&&(window.clearTimeout(A.current),N.current=!1,_())};return _(),O.addEventListener("scroll",R,{passive:!0}),O.addEventListener("wheel",Q,{passive:!0}),O.addEventListener("touchstart",Q,{passive:!0}),()=>{window.clearTimeout(A.current),O.removeEventListener("scroll",R),O.removeEventListener("wheel",Q),O.removeEventListener("touchstart",Q)}},[]);const C=O=>{var _;const z=typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches;N.current=!0,M.current=null,w(O),window.clearTimeout(A.current),A.current=window.setTimeout(()=>{var R;return M.current=((R=j.current)==null?void 0:R.scrollTop)??0},160),(_=document.getElementById(v[O]))==null||_.scrollIntoView({behavior:z?"auto":"smooth",block:"start"})},D=O=>c.jsxs("li",{className:"info-source",children:[c.jsx("span",{className:`tb-dot ${Fi(O.app)}`,"aria-hidden":!0}),c.jsxs("span",{className:"info-source-text",children:[O.pk?c.jsxs("a",{className:"info-source-name info-source-link",href:Zx(O.pk),target:"_blank",rel:"noopener noreferrer",title:"Open this analysis in Isabl",children:[c.jsxs("span",{className:"mono",children:[O.app,O.version?` ${O.version}`:""]}),c.jsxs("span",{className:"mono info-source-pk",children:["#",O.pk]}),c.jsx(_w,{size:13,"aria-hidden":!0,className:"info-source-arrow"})]}):c.jsxs("span",{className:"info-source-name",children:[c.jsxs("span",{className:"mono",children:[O.app,O.version?` ${O.version}`:""]}),O.project?c.jsxs("span",{className:"info-source-pk",children:["project ",O.project]}):null]}),c.jsx("span",{className:"info-source-role",children:XN(n,O)})]})]},Gt(O));return jm.createPortal(c.jsx("div",{className:`info-backdrop ${Kn.theme}`,onMouseDown:O=>O.target===O.currentTarget&&o(),children:c.jsxs("div",{className:"info-dialog",role:"dialog","aria-modal":"true","aria-labelledby":d,children:[c.jsx("button",{ref:h,type:"button",className:"info-close","aria-label":"Close",onClick:o,children:c.jsx(cc,{size:18,"aria-hidden":!0})}),c.jsxs("nav",{className:"info-rail","aria-label":"Contents",children:[c.jsx("span",{className:"info-kicker",children:i??"About"}),c.jsx("h2",{id:d,children:u.title}),c.jsx("ol",{children:x.map((O,z)=>c.jsx("li",{children:c.jsx("button",{type:"button","aria-current":z===S?"true":void 0,onClick:()=>C(z),children:O})},O))})]}),c.jsxs("div",{ref:j,className:"info-main",children:[c.jsx("p",{className:"info-intro",children:u.intro}),u.sections.map((O,z)=>{var _;return c.jsxs("section",{id:v[z],className:"info-section",children:[c.jsx("h3",{children:O.heading}),(_=O.paragraphs)==null?void 0:_.map(R=>c.jsx("p",{children:R},R)),O.terms&&c.jsx("dl",{children:O.terms.map(([R,Q])=>c.jsxs("div",{children:[c.jsx("dt",{children:R}),c.jsx("dd",{children:Q})]},R))})]},O.heading)}),c.jsxs("section",{id:v[v.length-1],className:"info-section","aria-label":"Sources",children:[c.jsx("h3",{children:"Sources"}),c.jsx("p",{children:"The analyses this card reads, with their version and Isabl id, and what each one is responsible for."}),a.length===0&&c.jsx("p",{children:"No analyses recorded for this card."}),c.jsx("ul",{className:"info-sources",children:m.map(D)}),g.length>0&&c.jsxs(c.Fragment,{children:[c.jsx("h4",{children:"Cohort runs"}),c.jsx("ul",{className:"info-sources",children:g.map(D)})]})]})]})]})}),document.body)}function Ly(n){return n.split(" ").map(a=>/^[A-Z0-9]{2,}$/.test(a)?a:a.toLowerCase()).join(" ")}function b1({topic:n,lineage:a,subject:i}){const[o,u]=E.useState(!1);return c.jsxs(c.Fragment,{children:[c.jsx("button",{type:"button",className:"sc-ib sm info-trigger","aria-label":`About ${Ly(am[n].title)}`,title:`About ${Ly(am[n].title)}`,"aria-haspopup":"dialog",onClick:()=>u(!0),children:c.jsx(Lw,{size:15,"aria-hidden":!0})}),o&&c.jsx(KN,{topic:n,lineage:a,subject:i,onClose:()=>u(!1)})]})}function PN({lineage:n,children:a}){const[i,o]=E.useState(!1),u=n.filter(h=>h.role!=="cohort"),d=n.filter(h=>h.role==="cohort");return c.jsxs("div",{className:"sc-cf",children:[a,a&&c.jsx("span",{className:"flex-auto"}),n.length>0&&c.jsx("span",{className:"text-xs",style:{color:"var(--muted)"},children:"Sources"}),u.map(h=>h.pk?c.jsxs("a",{className:"sc-src sc-src-link",href:Zx(h.pk),target:"_blank",rel:"noopener noreferrer",title:"Open this analysis in Isabl",children:[c.jsx("span",{className:`tb-dot ${Fi(h.app)}`,"aria-hidden":!0}),h.app," ",h.version??""," #",h.pk]},Gt(h)):c.jsxs("span",{className:"sc-src",children:[c.jsx("span",{className:`tb-dot ${Fi(h.app)}`,"aria-hidden":!0}),h.app," ",h.version??""]},Gt(h))),d.length>0&&c.jsxs("button",{type:"button",className:"sc-src",style:{border:0,cursor:"pointer"},"aria-expanded":i,onClick:()=>o(h=>!h),children:[i?"Hide":"+"," ",d.length," cohort ",d.length===1?"run":"runs"]}),i&&d.map(h=>c.jsxs("span",{className:"sc-src",children:[c.jsx("span",{className:"tb-dot fam-other","aria-hidden":!0}),h.app,h.project?`, project ${h.project}`:""," ",h.pk?`#${h.pk}`:""]},Gt(h)))]})}function mc(...n){const a=new Map;for(const i of n.flat())i&&!a.has(Gt(i))&&a.set(Gt(i),i);return[...a.values()]}const gc=E.forwardRef(function({title:a,subtitle:i,controls:o,lineage:u,picked:d,footer:h,className:m="",info:g,expandable:y,children:x},v){const S=!!d&&u.some(N=>Gt(N)===d),[w,j]=ZN();return c.jsxs(c.Fragment,{children:[w&&c.jsx("div",{className:"sc-full-backdrop","aria-hidden":!0,onClick:()=>j(!1)}),c.jsxs("section",{ref:v,className:`sc-card flex flex-col ${m}`,"data-picked":S,"data-full":w||void 0,"aria-label":a,children:[c.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-x-4 gap-y-2.5 px-5 pt-5 pb-4",children:[c.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[c.jsx("h2",{className:"m-0 text-[19px] font-semibold tracking-tight",children:a}),i&&c.jsx("span",{className:"text-[13px]",style:{color:"var(--muted)"},children:i})]}),(o||g||y)&&c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[o,y&&c.jsx("button",{type:"button",className:"sc-ib","aria-label":w?"Exit full screen":`Expand ${a.toLowerCase()} to full screen`,title:w?"Exit full screen (Esc)":"Expand to full screen","aria-pressed":w,onClick:()=>j(!w),children:w?c.jsx(Fw,{size:16,"aria-hidden":!0}):c.jsx($w,{size:16,"aria-hidden":!0})}),g&&c.jsx(b1,{topic:g,lineage:u,subject:typeof i=="string"?i:void 0})]})]}),c.jsx("div",{className:"min-w-0 flex-auto",children:x}),(u.length>0||h)&&c.jsx(PN,{lineage:u,children:h})]})]})});function ZN(){const[n,a]=E.useState(!1);return E.useEffect(()=>{if(!n)return;const i=document.documentElement,o=i.style.overflow;i.style.overflow="hidden";const u=d=>{var h,m;d.key==="Escape"&&((m=(h=d.target)==null?void 0:h.closest)!=null&&m.call(h,"input, textarea, select")||document.querySelector(".info-backdrop")||a(!1))};return document.addEventListener("keydown",u),()=>{document.removeEventListener("keydown",u),i.style.overflow=o}},[n]),[n,a]}function dr({label:n,envelope:a,loading:i,skeletonHeight:o=160,children:u}){return c.jsxs(c.Fragment,{children:[i&&!a&&c.jsx("div",{className:"px-5 py-3",children:c.jsx("div",{className:"skeleton",style:{height:o},"aria-label":`Loading ${n}`})}),a&&a.status!=="ok"&&c.jsx("div",{className:"px-5 py-4",children:c.jsx(os,{envelope:a})}),(a==null?void 0:a.status)==="ok"&&a.data!==null&&u(a.data),(a==null?void 0:a.status)==="ok"&&a.warnings.length>0&&c.jsx("div",{className:"px-5 pb-1 text-xs",style:{color:"var(--warn-ink)"},children:a.warnings.join(" ")})]})}function JN({title:n,subtitle:a,controls:i,envelope:o,loading:u,picked:d,skeletonHeight:h=160,footer:m,className:g="",info:y,moreLineage:x,children:v}){return c.jsx(gc,{title:n,subtitle:a,controls:i,lineage:mc(o==null?void 0:o.lineage,x),picked:d,footer:m,className:g,info:y,children:c.jsx(dr,{label:n,envelope:o,loading:u,skeletonHeight:h,children:v})})}function WN(n,a){const[i,o]=E.useState(null),[u,d]=E.useState(!1);return E.useLayoutEffect(()=>{const h=n.current;if(!h)return;const m=()=>{const y=h.querySelector('[aria-pressed="true"]');o(y?{x:y.offsetLeft,y:y.offsetTop,width:y.offsetWidth,height:y.offsetHeight}:null)};if(m(),typeof ResizeObserver>"u")return;const g=new ResizeObserver(m);g.observe(h);for(const y of Array.from(h.children))g.observe(y);return()=>g.disconnect()},[n,a]),E.useEffect(()=>{if(i&&!u){const h=requestAnimationFrame(()=>d(!0));return()=>cancelAnimationFrame(h)}},[i,u]),{thumb:i,moving:u}}function Ss({label:n,options:a,value:i,onChange:o,className:u=""}){const d=E.useRef(null),{thumb:h,moving:m}=WN(d,i);return c.jsxs("div",{ref:d,className:`sc-track ${u}`,role:"group","aria-label":n,children:[h&&c.jsx("span",{className:"sc-thumb","data-moving":m,"aria-hidden":!0,style:{width:h.width,height:h.height,transform:`translate(${h.x}px, ${h.y}px)`}}),a.map(g=>c.jsx("button",{type:"button",className:"sc-seg","aria-pressed":g.value===i,disabled:g.disabled,title:g.title,onClick:()=>o(g.value),children:g.label},g.value))]})}function eC(n){var i;const a=[];return n.mode==="unmatched"&&a.push("Tumour only"),n.individual.germline_consent&&a.push("Germline consented"),(i=n.individual.dmp_id)!=null&&i.startsWith("P-")&&a.push("DMP linked"),a}function tC({data:n,onVersion:a}){const i=n.report,[o,u]=E.useState(!1),d=E.useRef(null);E.useEffect(()=>{if(!o)return;const m=y=>{var x;(x=d.current)!=null&&x.contains(y.target)||u(!1)},g=y=>{y.key==="Escape"&&u(!1)};return document.addEventListener("mousedown",m),document.addEventListener("keydown",g),()=>{document.removeEventListener("mousedown",m),document.removeEventListener("keydown",g)}},[o]);const h=eC(n);return c.jsxs("div",{ref:d,className:"report-menu",children:[c.jsxs("button",{type:"button",className:"sc-btn sc-b2","aria-expanded":o,"aria-haspopup":"dialog",onClick:()=>u(m=>!m),children:["Report ",i.version,c.jsx(t1,{size:14,"aria-hidden":!0})]}),o&&c.jsxs("div",{className:"report-pop",role:"dialog","aria-label":"Report",children:[c.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1.5",children:[c.jsx("span",{className:"text-[13px] font-medium",style:{color:"var(--muted)"},children:"Report version"}),c.jsx(Ss,{label:"Report version",value:i.version,onChange:m=>{a(m),u(!1)},options:n.versions.map(m=>({value:m.version,label:m.version}))})]}),c.jsxs("span",{className:"mono text-[11.5px]",style:{color:"var(--muted)"},children:["WGTS_REPORT ",i.analysis?`run #${i.analysis}`:"run indexed by hand",i.built?`, built ${s1(i.built)}`:""]}),h.length>0&&c.jsx("div",{className:"flex flex-wrap gap-2",children:h.map(m=>c.jsx("span",{className:"sc-chip",children:m},m))})]})]})}const sm=["purity","ploidy","coverage","tmb","msi","fga"];function nC({value:n}){const i=2*Math.PI*13,o=Math.min(Math.max(n,0),1);return c.jsxs("svg",{viewBox:"0 0 34 34",className:"kpi-glyph h-[34px] w-[34px]","aria-hidden":!0,children:[c.jsx("circle",{cx:"17",cy:"17",r:13,fill:"none",strokeWidth:"4",className:"kpi-track"}),c.jsx("circle",{cx:"17",cy:"17",r:13,fill:"none",strokeWidth:"4",strokeLinecap:"round",className:"kpi-fill",strokeDasharray:`${o*i} ${i}`,transform:"rotate(-90 17 17)"})]})}function Hy({value:n,min:a,max:i,ticks:o,reference:u}){const d=h=>4+(Math.min(Math.max(h,a),i)-a)/(i-a)*64;return c.jsxs("svg",{viewBox:"0 0 72 20",className:"kpi-glyph h-[18px] w-[60px]","aria-hidden":!0,children:[c.jsx("line",{x1:"4",x2:"68",y1:"12",y2:"12",className:"kpi-track",strokeWidth:"2",strokeLinecap:"round"}),o.map(h=>c.jsx("line",{x1:d(h),x2:d(h),y1:h===u?5:9,y2:"15",className:"kpi-tick",strokeWidth:h===u?1.5:1},h)),c.jsx("circle",{cx:d(n),cy:"12",r:"4.5",className:"kpi-dot",strokeWidth:"2"})]})}function lC({metric:n}){const a=n.value;if(a===null)return null;switch(n.key){case"purity":case"fga":return c.jsx(nC,{value:a});case"ploidy":return c.jsx(Hy,{value:a,min:1,max:6,ticks:[1,2,3,4,5,6],reference:2});case"tmb":return c.jsx(Hy,{value:Math.log10(Math.max(a,.01)),min:-2,max:2,ticks:[-2,-1,0,1,2]});default:return null}}const aC={purity:"Share of tumour cells, 0 to 1",fga:"Share of the genome altered, 0 to 1",ploidy:"On a scale of 1 to 6 copies; the tall tick marks 2",tmb:"On a log scale from 0.01 to 100 mutations per Mb"};function sC({metric:n,picked:a}){const i=n.value===null&&!n.text,o=!!a&&n.sources.some(u=>Gt(u)===a);return c.jsxs("div",{className:"kpi","data-picked":o,title:aC[n.key],children:[c.jsxs("span",{className:"kpi-top",children:[c.jsx("span",{className:"kpi-label",children:n.label}),c.jsx(lC,{metric:n})]}),c.jsx("span",{className:"kpi-value","data-empty":i,children:i?Pw(n):Kw(n)}),n.sources.length>0?c.jsx("span",{className:"flex flex-col gap-0.5",children:n.sources.map(u=>c.jsxs("span",{className:"kpi-src",children:[c.jsx("span",{className:`tb-dot ${Fi(u.app)}`,"aria-hidden":!0}),c.jsx("span",{className:"min-w-0",children:m1(u)})]},Gt(u)))}):c.jsx("span",{className:"kpi-src",children:n.etl?`from ${n.etl}`:"no source"})]})}function iC({sampleLabel:n,fingerprint:a,metrics:i,picked:o,lineage:u=[]}){var h;const d=(((h=i==null?void 0:i.data)==null?void 0:h.metrics)??[]).filter(m=>sm.includes(m.key));return c.jsxs("section",{className:"sc-card relative flex flex-wrap items-center gap-x-8 gap-y-5 px-6 py-5","aria-label":`Genome fingerprint and summary of ${n}`,children:[c.jsx("span",{className:"absolute top-3 right-3",children:c.jsx(b1,{topic:"summary",lineage:u,subject:n})}),c.jsx(Mm,{fingerprint:a,size:"hero",title:n.split(" ")[0],subtitle:"tumour",className:"h-[210px] w-[210px] max-w-full flex-none"}),c.jsxs("div",{className:"flex min-w-0 flex-[1_1_230px] flex-col gap-3",children:[c.jsxs("h2",{className:"m-0 text-lg font-semibold tracking-tight",children:["Genome fingerprint of ",n]}),c.jsx("p",{className:"m-0 max-w-[46ch] text-[14.5px] leading-relaxed",style:{color:"var(--ink-2)"},children:a?i1(a):"No copy-number data for this sample."}),c.jsxs("div",{className:"flex flex-wrap gap-x-4 gap-y-1.5 text-[12.5px]",style:{color:"var(--ink-2)"},children:[c.jsxs("span",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"h-[5px] w-3.5 rounded-[3px]",style:{background:"var(--gain)"}}),"Gains, outer track"]}),c.jsxs("span",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"h-[5px] w-3.5 rounded-[3px]",style:{background:"var(--loss)"}}),"Losses, inner track"]}),c.jsxs("span",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"h-3 w-[5px] rounded-sm",style:{background:"var(--ink)"}}),"Drivers"]})]}),c.jsx("span",{className:"text-[12.5px]",style:{color:"var(--muted)"},children:"Chromosome 1 starts at the top and the ring runs clockwise to X."})]}),c.jsxs("div",{className:"kpi-grid min-w-0 flex-[1.4_1_420px]",children:[i===void 0&&sm.map(m=>c.jsx("div",{className:"kpi","aria-hidden":!0,children:c.jsx("div",{className:"skeleton h-[70px]"})},m)),i&&i.status!=="ok"&&c.jsx("div",{className:"col-span-full",children:c.jsx(os,{envelope:i})}),d.map(m=>c.jsx(sC,{metric:m,picked:o},m.key))]})]})}function oC({sampleLabel:n,failures:a,analyses:i}){return a.length===0?null:c.jsx("div",{className:"flex flex-col gap-2.5",children:a.map(o=>{const u=i.filter(d=>d.modules.some(h=>h.etl===o.etl&&h.status==="failed"));return c.jsxs("div",{className:"sc-card flex flex-wrap items-center gap-x-4 gap-y-3 px-[18px] py-3.5",role:"status",children:[c.jsx("span",{className:"grid h-9 w-9 flex-none place-items-center rounded-[10px]",style:{background:"var(--warn-soft)",color:"var(--warn-ink)"},children:c.jsx(a1,{size:18,"aria-hidden":!0})}),c.jsxs("div",{className:"flex min-w-0 flex-[1_1_360px] flex-col gap-0.5",children:[c.jsxs("span",{className:"text-[14.5px] font-semibold",children:[o.label," failed for ",n]}),c.jsx("span",{className:"text-[13.5px]",style:{color:"var(--ink-2)"},children:o.message.split(`
|
|
267
|
+
`)[0]}),u.length>0&&c.jsxs("span",{className:"mono text-[11.5px]",style:{color:"var(--muted)"},children:["Reading ",u.map(m1).join(", ")]})]})]},`${o.etl}-${o.node}`)})})}function rC({onSignedIn:n}){const[a,i]=E.useState("password"),[o,u]=E.useState(""),[d,h]=E.useState(""),[m,g]=E.useState(""),[y,x]=E.useState(null),[v,S]=E.useState(!1),w=a==="password"?!!o&&!!d:!!m.trim();return c.jsxs("form",{className:"sc-card mx-auto mt-16 flex w-[380px] max-w-full flex-col gap-3 p-6",onSubmit:async j=>{j.preventDefault(),S(!0),x(null);try{a==="password"?await pN(o,d):await gN(m.trim()),n()}catch(N){x(N.message)}finally{S(!1)}},children:[c.jsx("h1",{className:"m-0 text-lg font-semibold",children:"Sign in to Isabl"}),c.jsx("p",{className:"m-0 text-sm",style:{color:"var(--ink-2)"},children:"The WGTS dashboard uses your Isabl account."}),a==="password"?c.jsxs(c.Fragment,{children:[c.jsxs("label",{className:"flex flex-col gap-1 text-[13px] font-semibold",htmlFor:"username",children:["Username",c.jsx("span",{className:"field",children:c.jsx("input",{id:"username",autoComplete:"username",value:o,onChange:j=>u(j.target.value)})})]}),c.jsxs("label",{className:"flex flex-col gap-1 text-[13px] font-semibold",htmlFor:"password",children:["Password",c.jsx("span",{className:"field",children:c.jsx("input",{id:"password",type:"password",autoComplete:"current-password",value:d,onChange:j=>h(j.target.value)})})]})]}):c.jsxs("label",{className:"flex flex-col gap-1 text-[13px] font-semibold",htmlFor:"token",children:["API token",c.jsx("span",{className:"field",children:c.jsx("input",{id:"token",type:"password",autoComplete:"off",spellCheck:!1,value:m,onChange:j=>g(j.target.value)})}),c.jsx("span",{className:"text-xs font-normal",style:{color:"var(--muted)"},children:"The token the Isabl CLI uses. Admins find it under Auth Token in Django admin."})]}),y&&c.jsx("p",{className:"m-0 text-sm",style:{color:"var(--warn-ink)"},role:"alert",children:y}),c.jsx("button",{type:"submit",className:"sc-btn sc-b1",disabled:v||!w,children:v?"Signing in":"Sign in"}),c.jsx("button",{type:"button",className:"self-start border-0 bg-transparent p-0 text-[13px] font-semibold",style:{color:"var(--link)",cursor:"pointer"},onClick:()=>{i(a==="password"?"token":"password"),x(null)},children:a==="password"?"Use an API token instead":"Use a username and password instead"})]})}const at=1e3,im=.35,uC=8,nc=.1;function Pu(n,a){return(ec(n,a)??0)*at}function hl(n){const[a,i]=fc[n.replace(/^chr/,"")];return[a*at,i*at]}function oh(n,a,i){const[o,u]=n,d=Math.min(at,Math.max(im,(u-o)*i)),h=Math.min(Math.max(a-(a-o)/(u-o)*d,0),at-d);return[h,h+d]}function qu(n,a){const i=n[1]-n[0],o=Math.min(Math.max(n[0]+a,0),at-i);return[o,o+i]}function cC(n,a,i){const o=Math.min(Math.max(i,0),at);return a===0?[Math.min(o,n[1]-im),n[1]]:[n[0],Math.max(o,n[0]+im)]}function fC(n,a,i){const o=(n[0]+n[1])/2+((a[0]+a[1])/2-(n[0]+n[1])/2)*i,[u,d]=[n[1]-n[0],a[1]-a[0]],h=Math.exp(Math.log(u)+(Math.log(d)-Math.log(u))*i),m=Math.min(Math.max(o-h/2,0),at-h);return[m,m+h]}function Uy(n){return n[1]-n[0]<at-.5}function dC(n){for(const[a]of Hn){const[i,o]=hl(a);if(n>=i&&n<=o)return a}return null}function hC(n,a){const i=n.segments.flatMap(u=>a==="total"?[u.total_cn]:[u.major_cn,u.minor_cn]),o=Math.max(...i.map(u=>u??0));return Math.min(uC,Math.max(n.baseline+2,Math.ceil(o)))}function mC(n){const a=10**Math.floor(Math.log10(n)),i=n/a;return(i<1.5?1:i<3.5?2:i<7.5?5:10)*a}function gC(n,a,i=5){const o=Hn.filter(([S])=>{const[w,j]=hl(S);return j>n&&w<a});if(o.length!==1)return o.map(([S])=>{const[w,j]=hl(S);return{value:(w+j)/2,label:S}});const[u,d]=o[0],[h,m]=hl(u),g=(Math.max(n,h)-h)/(m-h)*d,y=(Math.min(a,m)-h)/(m-h)*d,x=mC(Math.max(y-g,1)/i),v=[];for(let S=Math.ceil(g/x)*x;S<=y;S+=x)v.push({value:h+S/d*(m-h),label:Po(S,x)});return v}function pC(n,a){if(n<=.5&&a>=at-.5)return null;const i=nm(n/at,"start"),o=nm(a/at,"end");if(i.chrom===o.chrom){const u=(o.pos-i.pos)/10;return`chr${i.chrom}: ${Po(i.pos,u).replace(" Mb","")}–${Po(o.pos,u)}`}return`chr${i.chrom}:${Po(i.pos,1e6)} – chr${o.chrom}:${Po(o.pos,1e6)}`}function vC(n){const{chrom:a,pos:i}=nm(Math.min(Math.max(n,0),at)/at,"start");return`chr${a} · ${(i/1e6).toFixed(1)} Mb`}const pc=n=>n.call??"neutral",yC={neutral:"Neutral",gain:"Gain",amp:"Amplification",loss:"Loss"},j1={neutral:"var(--chev)",gain:"var(--gain)",amp:"var(--gain-strong)",loss:"var(--loss)"};function xC(n){return{call:yC[pc(n)],copies:n.total_cn===null?"? copies":`${n.total_cn} ${n.total_cn===1?"copy":"copies"}`,alleles:n.major_cn!==null&&n.minor_cn!==null?`${n.major_cn} + ${n.minor_cn}`:"",span:`chr${n.chrom}:${n.start.toLocaleString("en-US")}–${n.end.toLocaleString("en-US")}`,log2:n.log2!==null?n.log2.toFixed(2):""}}function SC(n){const a=new Map;for(const i of n){const o=i.gene??"?",u=a.get(o)??{gene:o,x:Pu(i.chrom,i.pos),chrom:i.chrom,pos:i.pos,changes:"",list:[]};i.protein_change&&u.list.push(i.protein_change),a.set(o,u)}return[...a.values()].map(({list:i,...o})=>({...o,changes:i.join(", ")})).sort((i,o)=>i.x-o.x)}function rh(n,a,i){const o=a.replace(/^chr/,"");return n.segments.find(u=>u.chrom===o&&u.start<=i&&i<=u.end)}function uh(n,a){return n?a==="total"?n.total_cn:n.major_cn:null}function bC(n){const a=n.length;if(a===0)return"";const i=m=>m.toFixed(2);if(a===1)return`M${i(n[0][0])},${i(n[0][1])}`;const o=n.slice(1).map((m,g)=>m[0]-n[g][0]),u=n.slice(1).map((m,g)=>o[g]===0?0:(m[1]-n[g][1])/o[g]),d=n.map((m,g)=>g===0?u[0]:g===a-1?u[a-2]:u[g-1]*u[g]<=0?0:(u[g-1]+u[g])/2);for(let m=0;m<a-1;m++){if(u[m]===0){d[m]=0,d[m+1]=0;continue}const g=d[m]/u[m],y=d[m+1]/u[m],x=Math.hypot(g,y);x>3&&(d[m]=3*g*u[m]/x,d[m+1]=3*y*u[m]/x)}let h=`M${i(n[0][0])},${i(n[0][1])}`;for(let m=0;m<a-1;m++){const[g,y]=n[m],[x,v]=n[m+1];h+=` C${i(g+o[m]/3)},${i(y+d[m]*o[m]/3)} ${i(x-o[m]/3)},${i(v-d[m+1]*o[m]/3)} ${i(x)},${i(v)}`}return h}function om(n,a){const i=[],o=new Array(n.length).fill(0);return[...n.keys()].sort((u,d)=>n[u].left-n[d].left).forEach(u=>{let d=i.findIndex(h=>h+a<=n[u].left);d===-1&&(d=i.push(0)-1),i[d]=n[u].left+n[u].width,o[u]=d}),o}function Tm(n,a=4){const i=Math.max(n,1)/a,o=10**Math.floor(Math.log10(i)),u=i/o,d=Math.max(1,(u<=1?1:u<=2?2:u<=5?5:10)*o),h=[];for(let m=0;m<Math.max(n,1)+d&&(h.push(m),!(m>=n&&h.length>1));m+=d);return h}const jC=n=>1-(1-n)**3;function _a(n,a,i=500){return n.length*a*(i>=600?.6:.56)}function Ul({x:n,y:a,width:i,above:o=!1,children:u}){const d=n>i-320,h=o?Math.min(Math.max(n,110),i-110):n,m=o?"translate(-50%, calc(-100% - 6px))":`translate(${d?"calc(-100% - 14px)":"14px"}, -50%)`;return c.jsx("div",{className:"ctip",style:{left:h,top:a,transform:m},role:"presentation",children:u})}function rm(n,a,i){const o=n.clientX;let u=!1;const d=m=>{const g=m.clientX-o;Math.abs(g)>3&&(u=!0),a(g,m)},h=()=>{window.removeEventListener("pointermove",d),window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h),i==null||i(u)};window.addEventListener("pointermove",d),window.addEventListener("pointerup",h),window.addEventListener("pointercancel",h)}function Oa(n=640){const a=E.useRef(null),[i,o]=E.useState(n);return E.useLayoutEffect(()=>{const u=a.current;if(!u)return;const d=()=>o(Math.round(u.clientWidth)||n);if(d(),typeof ResizeObserver>"u")return;const h=new ResizeObserver(d);return h.observe(u),()=>h.disconnect()},[n]),[a,i]}const $y=36,wC=14,Zo=232,Vy=22,wi=28,Fy=19,NC=480,CC=E.memo(function({segments:a,spans:i,mode:o,shown:u,geo:d,hover:h,grad:m,onHover:g,onClick:y}){const x=u[1]-u[0],v=j=>d.plotL+(j-u[0])/x*d.plotW,S=j=>d.plotTop+(1-Math.min(Math.max(j,0),d.top)/d.top)*Zo,w=S(d.baseline);return c.jsx("g",{children:a.map((j,N)=>{const[M,A]=i[N];if(A<u[0]-1||M>u[1]+1)return null;const C=pc(j),D=v(M),O=Math.max(v(A)-D,C==="neutral"?2:7),z=h===N;if(o==="total"){if(j.total_cn===null)return null;const Q=S(j.total_cn);return c.jsxs("g",{className:"cn-seg","data-call":C,"data-on":z||void 0,children:[C!=="neutral"&&c.jsx("rect",{x:D,y:Math.min(Q,w),width:O,height:Math.abs(Q-w),fill:`url(#${m[C]})`,className:"cn-col"}),c.jsx("line",{x1:D,x2:D+O,y1:Q,y2:Q,style:{stroke:j1[C]},className:"cn-line"}),c.jsx("rect",{x:D-2,y:Math.min(Q,w)-9,width:O+4,height:Math.abs(Q-w)+18,fill:"transparent",className:"cn-hit",onMouseEnter:()=>g({index:N,x:D+O/2,y:Q}),onMouseLeave:()=>g(null),onClick:()=>y(j)})]},N)}if(j.major_cn===null||j.minor_cn===null)return null;const _=S(j.major_cn+nc),R=S(j.minor_cn-nc);return c.jsxs("g",{className:"cn-seg","data-on":z||void 0,children:[c.jsx("line",{x1:D,x2:D+O,y1:R,y2:R,className:"cn-line cn-minor"}),c.jsx("line",{x1:D,x2:D+O,y1:_,y2:_,className:"cn-line cn-major"}),c.jsx("rect",{x:D-2,y:Math.min(_,R)-9,width:O+4,height:Math.abs(_-R)+18,fill:"transparent",className:"cn-hit",onMouseEnter:()=>g({index:N,x:D+O/2,y:_}),onMouseLeave:()=>g(null),onClick:()=>y(j)})]},N)})})}),EC=E.memo(function({segments:a,spans:i,mode:o,top:u,baseline:d,plotL:h,plotW:m,y0:g}){const y=x=>g+3+(1-Math.min(x,u)/u)*(wi-6);return c.jsxs("g",{pointerEvents:"none",children:[Hn.map(([x],v)=>{const[S,w]=hl(x);return v%2===0?c.jsx("rect",{x:h+S/at*m,y:g,width:(w-S)/at*m,height:wi,className:"cn-mini-band"},x):null}),c.jsx("line",{x1:h,x2:h+m,y1:y(d),y2:y(d),className:"cn-mini-base"}),a.map((x,v)=>{const S=o==="total"?x.total_cn:x.major_cn;if(S===null)return null;const w=pc(x),j=h+i[v][0]/at*m,N=Math.max((i[v][1]-i[v][0])/at*m,w==="neutral"?1:2);return c.jsx("line",{x1:j,x2:j+N,y1:y(S),y2:y(S),className:"cn-mini-line",style:{stroke:o==="total"?j1[w]:"var(--ink-2)"}},v)})]})});function MC({data:n,mode:a,drivers:i,focus:o,locate:u,view:d,onView:h,onSegment:m,onGene:g}){const[y,x]=Oa(900),v=E.useRef(null),S=E.useId(),w={gain:`${S}-gain`,amp:`${S}-amp`,loss:`${S}-loss`},[j,N]=E.useState(d.window),M=E.useRef(j);M.current=j,E.useLayoutEffect(()=>{const J=d.window,se=typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches;if(!d.smooth||se){N(J);return}const je=M.current,Ve=performance.now();let ke=0;const wt=lt=>{const We=Math.min(1,(lt-Ve)/NC);N(fC(je,J,jC(We))),We<1&&(ke=requestAnimationFrame(wt))};return ke=requestAnimationFrame(wt),()=>cancelAnimationFrame(ke)},[d]);const[A,C]=E.useState(null),[D,O]=E.useState(null),[z,_]=E.useState(null),[R,Q]=E.useState(!1),K=E.useRef(!1),$=E.useMemo(()=>hC(n,a),[n,a]),le=E.useMemo(()=>n.segments.some(J=>Math.max(J.total_cn??0,J.major_cn??0)>$),[n,$]),oe=E.useMemo(()=>n.segments.map(J=>[Pu(J.chrom,J.start),Pu(J.chrom,J.end)]),[n]),te=E.useMemo(()=>SC(i),[i]),Y=$y,ee=Math.max(x-$y-wC,200),X=j[1]-j[0],W=J=>Y+(J-j[0])/X*ee,ae=J=>j[0]+(J-Y)/ee*X,ve=J=>_a(J,11.5,600)+14,xe=E.useMemo(()=>{const J=te.map(se=>({left:Y+se.x/at*ee-ve(se.gene)/2,width:ve(se.gene)}));return te.length?Math.max(...om(J,4))+1:0},[te,Y,ee]),Fe=(xe?xe*Fy+8:4)+4,Ye=Fe+Zo,L=Ye+10,V=L+Vy+12,ne=V+wi+6,re={plotL:Y,plotW:ee,plotTop:Fe,top:$,baseline:n.baseline},me=J=>Fe+(1-Math.min(Math.max(J,0),$)/$)*Zo,be=te.map((J,se)=>({m:J,index:se,x:W(J.x)})).filter(({x:J})=>J>=Y-4&&J<=Y+ee+4),Ce=om(be.map(({m:J,x:se})=>({left:se-ve(J.gene)/2,width:ve(J.gene)})),4),ue=(J,se)=>J>=Y&&J<=Y+ee&&se>=Fe&&se<=Ye,ge=J=>{const se=v.current.getBoundingClientRect();return[J.clientX-se.left,J.clientY-se.top]},rt=E.useCallback(J=>h({window:J,smooth:!1}),[h]),jt=E.useCallback(J=>h({window:J,smooth:!0}),[h]),mn=E.useRef({shown:j,plotL:Y,plotW:ee,plotTop:Fe,plotBottom:Ye,move:rt});mn.current={shown:j,plotL:Y,plotW:ee,plotTop:Fe,plotBottom:Ye,move:rt},E.useEffect(()=>{const J=y.current;if(!J)return;const se=je=>{if(!je.ctrlKey||!v.current)return;const Ve=v.current.getBoundingClientRect(),ke=je.clientX-Ve.left,wt=je.clientY-Ve.top,lt=mn.current;if(ke<lt.plotL||ke>lt.plotL+lt.plotW||wt<lt.plotTop||wt>lt.plotBottom)return;je.preventDefault();const We=lt.shown[0]+(ke-lt.plotL)/lt.plotW*(lt.shown[1]-lt.shown[0]),Jn=Math.max(-50,Math.min(50,je.deltaY));lt.move(oh(lt.shown,We,Math.exp(Jn*.01)))};return J.addEventListener("wheel",se,{passive:!1}),()=>J.removeEventListener("wheel",se)},[y]),E.useEffect(()=>{u&&/^(\d+|X)$/.test(u.chrom.replace(/^chr/,""))&&jt(hl(u.chrom))},[u,jt]);const Et=J=>{if(J.button!==0)return;const[se,je]=ge(J);if(!ue(se,je)||!Uy(j))return;J.preventDefault();const Ve=j;Q(!0),rm(J,ke=>rt(qu(Ve,-(ke/ee)*(Ve[1]-Ve[0]))),ke=>{Q(!1),ke&&(K.current=!0,setTimeout(()=>K.current=!1,0))})},mt=J=>{const[se,je]=ge(J);_(ue(se,je)?se:null)},Ie=J=>{const[se,je]=ge(J);if(!ue(se,je))return;const Ve=dC(ae(se));Ve&&jt(hl(Ve))},Mt=J=>{const se=(j[0]+j[1])/2;if(J.key==="ArrowLeft"||J.key==="ArrowRight")J.preventDefault(),rt(qu(j,(J.key==="ArrowLeft"?-.15:.15)*X));else if(J.key==="+"||J.key==="=")jt(oh(j,se,.6));else if(J.key==="-")jt(oh(j,se,1/.6));else if(J.key==="0"||J.key==="Home")jt([0,at]);else return;J.key!=="ArrowLeft"&&J.key!=="ArrowRight"&&J.preventDefault()},Cn=E.useCallback(J=>{K.current||m(J)},[m]),Pt=Hn.map(([J],se)=>{const[je,Ve]=hl(J);return{chrom:J,i:se,x0:W(je),x1:W(Ve)}}).filter(({x0:J,x1:se})=>se>Y&&J<Y+ee),pt=Pt.length===1?Pt[0]:null,$l=pt?gC(j[0],j[1],Math.max(2,Math.round(ee/120))):[],ut=(()=>{if(!o)return null;const J=Pu(o.chrom,o.pos);if(J<j[0]||J>j[1])return null;const se=rh(n,o.chrom,o.pos),je=uh(se,a),Ve=a==="allele"&&je!==null?nc:0;return{x:W(J),y:me((je??n.baseline)+Ve),copies:(se==null?void 0:se.total_cn)??null}})(),Zn=A?n.segments[A.index]:null,Ot=Zn?xC(Zn):null,zt=D!==null?te[D]:null,za=J=>Y+J/at*ee,qt={x0:za(j[0]),x1:za(j[1])},$n=Uy(j),gl=(J,se)=>{J.stopPropagation(),J.preventDefault();const je=j;Q(!0),rm(J,Ve=>{const ke=Ve/ee*at;rt(se==="move"?qu(je,ke):cC(je,se,je[se]+ke))},()=>Q(!1))};return c.jsxs("div",{ref:y,className:"cn","data-dragging":R||void 0,"data-zoomed":$n||void 0,tabIndex:0,role:"group","aria-label":`Copy number of ${n.sample} across the genome, against ${n.baseline} copies.`,"aria-keyshortcuts":"ArrowLeft ArrowRight + - 0",onKeyDown:Mt,children:[c.jsxs("svg",{ref:v,width:x,height:ne,"aria-hidden":!0,onPointerDown:Et,onPointerMove:mt,onPointerLeave:()=>_(null),onDoubleClick:Ie,children:[c.jsxs("defs",{children:[c.jsxs("linearGradient",{id:w.gain,x1:"0",y1:"0",x2:"0",y2:"1",children:[c.jsx("stop",{offset:"0",style:{stopColor:"var(--gain)"},stopOpacity:.46}),c.jsx("stop",{offset:"1",style:{stopColor:"var(--gain)"},stopOpacity:.04})]}),c.jsxs("linearGradient",{id:w.amp,x1:"0",y1:"0",x2:"0",y2:"1",children:[c.jsx("stop",{offset:"0",style:{stopColor:"var(--gain-strong)"},stopOpacity:.62}),c.jsx("stop",{offset:"1",style:{stopColor:"var(--gain-strong)"},stopOpacity:.05})]}),c.jsxs("linearGradient",{id:w.loss,x1:"0",y1:"0",x2:"0",y2:"1",children:[c.jsx("stop",{offset:"0",style:{stopColor:"var(--loss)"},stopOpacity:.04}),c.jsx("stop",{offset:"1",style:{stopColor:"var(--loss)"},stopOpacity:.46})]}),c.jsx("clipPath",{id:`${S}-plot`,children:c.jsx("rect",{x:Y-4,y:Fe-2,width:ee+8,height:Zo+4})})]}),c.jsx("g",{clipPath:`url(#${S}-plot)`,children:Hn.map(([J],se)=>{const[je,Ve]=hl(J),ke=W(je),wt=W(Ve);return se%2===0&&wt>Y&&ke<Y+ee?c.jsx("rect",{x:ke,y:Fe,width:wt-ke,height:Zo,className:"cn-band"},J):null})}),Array.from({length:$+1},(J,se)=>c.jsxs("g",{children:[c.jsx("line",{x1:Y,x2:Y+ee,y1:me(se),y2:me(se),className:"cn-grid"}),c.jsx("text",{x:Y-10,y:me(se)+4,textAnchor:"end",className:"cn-tick",children:se===$&&le?`${se}+`:se})]},se)),c.jsx("line",{x1:Y,x2:Y+ee,y1:me(n.baseline),y2:me(n.baseline),className:"cn-baseline"}),c.jsxs("text",{x:Y+8,y:me(n.baseline)-7,className:"cn-baseline-label",children:[n.baseline," copies"]}),c.jsx("g",{className:"cn-reveal",children:c.jsx("g",{clipPath:`url(#${S}-plot)`,children:c.jsx(CC,{segments:n.segments,spans:oe,mode:a,shown:j,geo:re,hover:A?A.index:null,grad:w,onHover:C,onClick:Cn})})}),z!==null&&!R&&!A&&D===null&&c.jsxs("g",{pointerEvents:"none",children:[c.jsx("line",{x1:z,x2:z,y1:Fe,y2:Ye,className:"cn-guide"}),c.jsxs("g",{transform:`translate(${Math.min(Math.max(z,Y+52),Y+ee-52)} ${Ye-24})`,children:[c.jsx("rect",{x:-50,width:100,height:18,rx:9,className:"cn-readout"}),c.jsx("text",{y:12.5,textAnchor:"middle",className:"cn-readout-text",children:vC(ae(z))})]})]}),be.map(({m:J,x:se,index:je},Ve)=>{const ke=rh(n,J.chrom,J.pos),wt=uh(ke,a),lt=me((wt??n.baseline)+(a==="allele"&&wt!==null?nc:0)),We=ve(J.gene),Jn=4+Ce[Ve]*Fy,Vl=D===je;return c.jsxs("g",{className:"cn-driver","data-on":Vl||void 0,onPointerDown:Da=>Da.stopPropagation(),onMouseEnter:()=>O(je),onMouseLeave:()=>O(null),onClick:()=>g(J.gene),children:[c.jsx("line",{x1:se,x2:se,y1:Jn+16,y2:lt,className:"cn-leader"}),c.jsx("rect",{x:se-We/2,y:Jn,width:We,height:16,rx:8,className:"cn-chip"}),c.jsx("text",{x:se,y:Jn+11.5,textAnchor:"middle",className:"cn-gene",children:J.gene}),c.jsx("circle",{cx:se,cy:lt,r:Vl?6.5:5,className:"cn-dot"})]},J.gene)}),ut&&o&&c.jsxs("g",{pointerEvents:"none",children:[c.jsx("line",{x1:ut.x,x2:ut.x,y1:Fe,y2:Ye,className:"cn-focus-line"}),c.jsx("circle",{cx:ut.x,cy:ut.y,r:6.5,className:"cn-focus-dot"}),(()=>{const J=`${o.gene??"?"}${ut.copies!==null?` ${ut.copies} copies`:""}`,se=_a(J,11.5,600)+14,je=ut.x+12+se>Y+ee;return c.jsxs("g",{transform:`translate(${je?ut.x-12-se:ut.x+12} ${ut.y-12})`,children:[c.jsx("rect",{width:se,height:22,rx:7,className:"cn-focus-chip"}),c.jsx("text",{x:7,y:15,className:"cn-focus-text",children:J})]})})()]}),c.jsxs("g",{className:"cn-strip",children:[Pt.map(({chrom:J,i:se,x0:je,x1:Ve})=>{const ke=Math.max(je,Y),wt=Math.min(Ve,Y+ee),lt=wt-ke,We=pt?`chr${J}`:J;return c.jsxs("g",{className:"cn-pill",onClick:()=>jt(hl(J)),role:"presentation",children:[c.jsx("title",{children:`Zoom to chromosome ${J}`}),c.jsx("rect",{x:ke+.5,y:L,width:Math.max(lt-1,1),height:Vy,rx:7,"data-odd":se%2?"":void 0}),lt>=_a(We,11,600)+3&&c.jsx("text",{x:pt?ke+10:(ke+wt)/2,y:L+15,textAnchor:pt?"start":"middle",children:We})]},J)}),pt&&$l.map(J=>{const se=W(J.value);return se>Math.max(pt.x0,Y)+70&&se<Y+ee-20?c.jsxs("g",{pointerEvents:"none",children:[c.jsx("line",{x1:se,x2:se,y1:L+3,y2:L+9,className:"cn-mb-tick"}),c.jsx("text",{x:se,y:L+18,textAnchor:"middle",className:"cn-mb",children:J.label})]},J.value):null})]}),c.jsx(EC,{segments:n.segments,spans:oe,mode:a,top:$,baseline:n.baseline,plotL:Y,plotW:ee,y0:V}),c.jsx("rect",{x:Y,y:V,width:ee,height:wi,fill:"transparent",className:"cn-mini-track",onPointerDown:J=>{const[se]=ge(J),je=j[1]-j[0],Ve=(se-Y)/ee*at;jt(qu([Ve-je/2,Ve+je/2],0))}}),$n&&c.jsxs("g",{className:"cn-mini-window",children:[c.jsx("rect",{x:qt.x0,y:V-1,width:Math.max(qt.x1-qt.x0,4),height:wi+2,rx:6,onPointerDown:J=>gl(J,"move"),className:"cn-mini-win"}),[0,1].map(J=>c.jsx("rect",{x:(J===0?qt.x0:qt.x1)-4,y:V+wi/2-9,width:8,height:18,rx:4,className:"cn-mini-handle",onPointerDown:se=>gl(se,J)},J))]})]}),Ot&&A&&c.jsxs(Ul,{x:A.x+0,y:A.y+0,width:x,children:[c.jsxs("span",{className:"ctip-title",children:[c.jsx("span",{className:"cn-call-dot","data-call":pc(Zn),"aria-hidden":!0}),Ot.call,c.jsx("span",{className:"ctip-sub",children:Ot.copies})]}),Ot.alleles&&c.jsxs("span",{className:"ctip-row",children:[c.jsx("span",{children:"Alleles"}),c.jsx("b",{children:Ot.alleles})]}),c.jsxs("span",{className:"ctip-row",children:[c.jsx("span",{children:"Region"}),c.jsx("b",{className:"mono",children:Ot.span})]}),Ot.log2&&c.jsxs("span",{className:"ctip-row",children:[c.jsx("span",{children:"log2 ratio"}),c.jsx("b",{children:Ot.log2})]}),c.jsx("span",{className:"ctip-note",children:"Click to list the mutations in this segment"})]}),zt&&D!==null&&c.jsxs(Ul,{x:W(zt.x),y:Fe+10,width:x,children:[c.jsxs("span",{className:"ctip-title",children:[c.jsx("i",{children:zt.gene}),zt.changes&&c.jsx("span",{className:"ctip-sub",children:zt.changes})]}),(()=>{const J=uh(rh(n,zt.chrom,zt.pos),a);return J!==null?c.jsxs("span",{className:"ctip-row",children:[c.jsx("span",{children:"Copy number here"}),c.jsx("b",{children:J})]}):null})(),c.jsx("span",{className:"ctip-note",children:"Driver. Click to find it in the table"})]})]})}const _C={"del.mh.prop":{short:"Del. MH",long:"Deletions with microhomology (share of deletions)"},SNV3:{short:"SBS3",long:"Substitution signature 3"},SV3:{short:"RS3",long:"Rearrangement signature 3"},SV5:{short:"RS5",long:"Rearrangement signature 5"},hrd:{short:"HRD index",long:"HRD index (loss of heterozygosity, telomeric imbalance, large-scale transitions)"},SNV8:{short:"SBS8",long:"Substitution signature 8"}};function ky(n,a="short"){var i;return((i=_C[n])==null?void 0:i[a])??n}const ch=8;function TC(n){const a=n.find(u=>u.group==="sample")??n[0],i=[...(a==null?void 0:a.signatures)??[]].sort((u,d)=>(d.proportion??0)-(u.proportion??0)).map(u=>u.signature),o=i.length>ch?ch-1:ch;return{shown:i.slice(0,o),other:i.slice(o)}}function By(n){return n.group==="sample"?"This tumour":`${n.label.replace(/\(\d+\)$/,"")} cohort${n.cohort_n?`, n = ${n.cohort_n}`:""}`}const Gy=["#2a78d6","#eb6834","#1baf7a","#eda100","#e87ba4","#008300","#6250d6","#e34948"],RC="#a3a3ab";function AC(n){const{shown:a,other:i}=TC(n),o=n.find(g=>g.group==="sample")??n[0],u=n.find(g=>g.group==="cohort")??null,d=(g,y,x)=>g?g.signatures.filter(v=>y.includes(v.signature)).reduce((v,S)=>v+(S[x]??0),0):null,h=(g,y,x)=>{var v,S;return{name:g,members:y,colour:x,share:d(o,y,"proportion")??0,cohortShare:d(u,y,"proportion"),count:d(o,y,"count")??0,cohortCount:d(u,y,"count"),aetiology:y.length===1?((v=o==null?void 0:o.signatures.find(w=>w.signature===g))==null?void 0:v.aetiology)??((S=u==null?void 0:u.signatures.find(w=>w.signature===g))==null?void 0:S.aetiology)??null:`${y.length} smaller signatures`}},m=a.map((g,y)=>h(g,[g],Gy[y%Gy.length]));return i.length&&m.push(h("Other",i,RC)),m}function va(n){return n.cohortShare===null?null:(n.share-n.cohortShare)*100}function qy(n,a,i){const o=Math.max(a-i*Math.max(n.length-1,0),0),u=n.reduce((h,m)=>h+m,0)||1;let d=0;return n.map(h=>{const m=h/u*o,g={y0:d,y1:d+m};return d+=m+i,g})}function OC(n,a,i,o){const u=(n+i)/2,d=h=>h.toFixed(2);return`M${d(n)},${d(a.y0)} C${d(u)},${d(a.y0)} ${d(u)},${d(o.y0)} ${d(i)},${d(o.y0)} L${d(i)},${d(o.y1)} C${d(u)},${d(o.y1)} ${d(u)},${d(a.y1)} ${d(n)},${d(a.y1)} Z`}function ml(n,a){const i=(n.length-1)*a,o=Math.floor(i),u=Math.ceil(i);return n[o]+(n[u]-n[o])*(i-o)}function w1(n){var u;const a=n.cohort.filter(d=>d!==null&&Number.isFinite(d)).sort((d,h)=>d-h);if(a.length===0)return null;const i=((u=n.sample)==null?void 0:u.value)??null,o=[...a];if(i!==null){const d=o.indexOf(i);d>=0&&o.splice(d,1)}return{values:a,q1:ml(a,.25),median:ml(a,.5),q3:ml(a,.75),tumour:i,above:i===null?null:o.filter(d=>d<i).length,others:o.length}}function zC(n,a=64){const i=n.length,o=n.reduce((y,x)=>y+x,0)/i,u=Math.sqrt(n.reduce((y,x)=>y+(x-o)**2,0)/Math.max(i-1,1)),d=Math.min(u,(ml(n,.75)-ml(n,.25))/1.34)||u||.1,h=Math.max(.9*d*i**-.2,.02),m=Array.from({length:a+1},(y,x)=>{const v=x/a;return{x:v,y:n.reduce((S,w)=>S+Math.exp(-.5*((v-w)/h)**2),0)}}),g=Math.max(...m.map(y=>y.y))||1;return m.map(y=>({x:y.x,y:y.y/g}))}function DC(n,a){const i=[],o=new Array(n.length).fill(0);return[...n.keys()].sort((u,d)=>n[u]-n[d]).forEach(u=>{let d=0;for(;i.some(h=>h.level===d&&Math.abs(h.x-n[u])<a);)d+=1;i.push({x:n[u],level:d}),o[u]=d}),o}function fh(n){return n.above===null||n.others===0?"":n.above===n.others?n.others===1?"Above the other sample":"Highest in the cohort":n.above===0?"Lowest in the cohort":`Above ${n.above} of ${n.others} others`}function Ni(n,a,i,o){const u=Math.PI*(1-Math.min(Math.max(o,0),1));return{x:n+i*Math.cos(u),y:a-i*Math.sin(u)}}function um(n){const a=n.filter(h=>h!==null&&Number.isFinite(h)).sort((h,m)=>h-m);if(!a.length)return null;const i=ml(a,.25),o=ml(a,.75),u=1.5*(o-i),d=a.filter(h=>h>=i-u&&h<=o+u);return{n:a.length,min:a[0],max:a[a.length-1],q1:i,median:ml(a,.5),q3:o,low:d[0]??i,high:d[d.length-1]??o}}function LC(n,a=48){const i=n.filter(j=>j!==null&&Number.isFinite(j));if(i.length<2)return[];const o=Math.min(...i),u=Math.max(...i);if(u===o)return[];const d=i.length,h=i.reduce((j,N)=>j+N,0)/d,m=Math.sqrt(i.reduce((j,N)=>j+(N-h)**2,0)/(d-1)),g=[...i].sort((j,N)=>j-N),y=ml(g,.75)-ml(g,.25),x=Math.min(m,y/1.34)||m||(u-o)/4,v=Math.max(.9*x*d**-.2,(u-o)/200),S=Array.from({length:a+1},(j,N)=>{const M=o+(u-o)*N/a;return{v:M,d:i.reduce((A,C)=>A+Math.exp(-.5*((M-C)/v)**2),0)}}),w=Math.max(...S.map(j=>j.d))||1;return S.map(j=>({v:j.v,d:j.d/w}))}function N1(n,a,i){if(n===null)return"";const o=a.filter(d=>d!==null&&Number.isFinite(d));if(!o.length)return"";const u=o.filter(d=>d<n).length;return u===o.length?`Higher than every ${i}`:u===0?`Lower than every ${i}`:`Higher than ${u} of ${o.length} ${i}s`}function HC(n,a){const i=[],o=new Array(n.length).fill(0),u=[...n.keys()].sort((d,h)=>n[d]-n[h]);for(const d of u){let h=0;const m=g=>g===0?0:g%2?-Math.ceil(g/2):g/2;for(;i.some(g=>g.slot===m(h)&&Math.abs(g.y-n[d])<a);)h+=1;i.push({y:n[d],slot:m(h)}),o[d]=m(h)}return o}const di=46,hi=30,mi=210,Qy=30,UC=58,$C=132,Yy=6,gi=n=>`${Math.round(n*100)}%`;function VC({data:n}){var O,z;const[a,i]=Oa(760),[o,u]=E.useState(((O=n.projects[0])==null?void 0:O.project)??null),[d,h]=E.useState(null),m=n.projects.find(_=>_.project===o)??n.projects[0],g=m.diseases,y=i-di-8,x=Math.min($C,Math.max(UC,y/Math.max(g.length,1))),v=x*g.length,S=Math.max(i,di+v+8),w=di+Math.max(0,(y-v)/2),j=Math.max(y,v),N=_=>hi+mi*(1-Math.min(Math.max(_,0),1)),M=m.tumour?g.findIndex(_=>{var R;return _.disease===((R=m.tumour)==null?void 0:R.disease)}):-1,A=E.useMemo(()=>g.map(_=>{const R=_.values.filter(K=>K!==null),Q=R.map(K=>N(K));return{disease:_,stats:um(R),values:R,py:Q,slots:HC(Q,Yy)}}),[g]),C=d===null?null:A[d],D=((z=m.tumour)==null?void 0:z.fga)??null;return c.jsxs("section",{className:"fga sig-section","aria-label":"Fraction of genome altered against the cohort",children:[c.jsxs("div",{className:"ctx-head",children:[c.jsxs("h3",{className:"sv-h",children:["Fraction of genome altered against the cohort",c.jsxs("span",{className:"sv-h-n",children:["project ",m.project,", n = ",m.n]})]}),c.jsxs("div",{className:"ctx-controls",children:[c.jsx("span",{className:"snap",title:"Cohorts show the samples the report compared with when it ran. Rerun the report to compare with the cohort as it is now.",children:"Cohort as of the report run"}),n.projects.length>1&&c.jsx(Ss,{label:"Project",value:m.project??"",onChange:_=>u(_),options:n.projects.map(_=>({value:_.project??"",label:`Project ${_.project}`}))})]})]}),c.jsx("div",{className:"fga-wrap",children:c.jsxs("div",{ref:a,className:"fga-plot",onMouseLeave:()=>h(null),children:[c.jsx("div",{className:"fga-scroll",children:c.jsxs("svg",{width:S,height:hi+mi+Qy,role:"img","aria-label":`FGA by disease in project ${m.project}`,children:[[0,.25,.5,.75,1].map(_=>c.jsxs("g",{children:[c.jsx("line",{x1:di,x2:di+j,y1:N(_),y2:N(_),className:_===0?"ctx-base":"ctx-grid"}),c.jsx("text",{x:di-8,y:N(_)+4,textAnchor:"end",className:"ctx-tick",children:gi(_)})]},_)),A.map(({disease:_,stats:R,values:Q,py:K,slots:$},le)=>{const oe=w+x*le+x/2,te=Math.min(30,x*.46),Y=le===M;return c.jsxs("g",{className:"fga-col","data-on":d===le||void 0,"data-mine":Y||void 0,children:[c.jsx("rect",{x:w+x*le+2,y:hi-6,width:x-4,height:mi+12,rx:10,className:"fga-band"}),R&&c.jsxs(c.Fragment,{children:[c.jsx("line",{x1:oe,x2:oe,y1:N(R.high),y2:N(R.low),className:"fga-whisker"}),c.jsx("rect",{x:oe-te/2,y:N(R.q3),width:te,height:Math.max(N(R.q1)-N(R.q3),1.5),rx:5,className:"fga-box"}),c.jsx("line",{x1:oe-te/2,x2:oe+te/2,y1:N(R.median),y2:N(R.median),className:"fga-median"})]}),Q.map((ee,X)=>c.jsx("circle",{cx:oe+$[X]*(Yy+1),cy:K[X],r:2.8,className:"fga-dot"},X)),c.jsx("text",{x:oe,y:hi+mi+20,textAnchor:"middle",className:"fga-label",children:_.disease}),c.jsx("rect",{x:w+x*le,y:hi-8,width:x,height:mi+Qy+8,fill:"transparent",tabIndex:0,"aria-label":`${_.name??_.disease}: ${Q.length} samples`,onMouseEnter:()=>h(le),onFocus:()=>h(le),onBlur:()=>h(null)})]},_.disease)}),M>=0&&D!==null&&c.jsxs("g",{className:"fga-pin",pointerEvents:"none",transform:`translate(${w+x*M+x/2} ${N(D)})`,children:[c.jsx("circle",{r:8,className:"fga-pin-dot"}),c.jsxs("g",{transform:"translate(0 -18)",children:[c.jsx("rect",{x:-44,y:-11,width:88,height:20,rx:10,className:"fga-pin-chip"}),c.jsxs("text",{y:3.5,textAnchor:"middle",className:"fga-pin-text",children:["This tumour ",gi(D)]})]})]})]})}),C&&d!==null&&c.jsxs(Ul,{x:Math.min(w+x*d+x/2,i-10),y:hi+mi/2,width:i,children:[c.jsx("span",{className:"ctip-title",children:C.disease.name??C.disease.disease}),C.stats&&c.jsxs(c.Fragment,{children:[c.jsxs("span",{className:"ctip-row",children:[c.jsx("span",{children:"Samples"}),c.jsx("b",{children:C.stats.n})]}),c.jsxs("span",{className:"ctip-row",children:[c.jsx("span",{children:"Median"}),c.jsx("b",{children:gi(C.stats.median)})]}),c.jsxs("span",{className:"ctip-row",children:[c.jsx("span",{children:"Middle half"}),c.jsxs("b",{children:[gi(C.stats.q1),"–",gi(C.stats.q3)]})]})]}),d===M&&D!==null&&c.jsxs("span",{className:"ctip-note",children:["This tumour ",gi(D),"."," ",N1(D,FC(C.values,D),`${C.disease.disease} sample`)]})]})]})})]})}function FC(n,a){const i=n.indexOf(a);return i<0?n:[...n.slice(0,i),...n.slice(i+1)]}const Iy=8,Xy=n=>`chr${n.chrom} · ${(n.start/1e6).toFixed(1)} Mb`;function kC({gene:n}){const a=n.copy_number??0,i=Math.min(Math.round(a),Iy);return c.jsx("span",{className:"cng-meter","data-alteration":n.alteration,"aria-hidden":!0,children:Array.from({length:Iy},(o,u)=>c.jsx("span",{"data-on":u<i||void 0},u))})}function BC({project:n,value:a}){if(a===null)return null;const i=a>=0;return c.jsxs("span",{className:"cng-expr","data-up":i||void 0,title:`RNA expression against the project ${n} cohort: log2 of this sample's level over the cohort mean`,children:[c.jsx("span",{className:"cng-arrow","aria-hidden":!0,children:i?"▲":"▼"}),i?"+":"−",Math.abs(a).toFixed(1),c.jsxs("i",{children:["p",n]})]})}function GC({genes:n,onHover:a,onLocate:i}){const o=n.filter(d=>d.alteration==="amplification").length,u=n.length-o;return c.jsxs("section",{className:"cng sig-section","aria-label":"Amplified and lost genes",children:[c.jsxs("h3",{className:"sv-h",children:["Amplified and lost genes",c.jsx("span",{className:"sv-h-n",children:n.length?`${o} amplified oncogene${o===1?"":"s"}, ${u} lost tumour suppressor${u===1?"":"s"}`:"none"})]}),n.length===0?c.jsx("p",{className:"sv-empty",children:"The report calls no amplified oncogenes or homozygously lost tumour suppressors."}):c.jsx("ul",{className:"cng-list",onMouseLeave:()=>a(null),children:n.map(d=>c.jsx("li",{children:c.jsxs("button",{type:"button",className:"cng-row","data-alteration":d.alteration,onMouseEnter:()=>a(d),onFocus:()=>a(d),onBlur:()=>a(null),onClick:()=>i(d),"aria-label":`${d.gene}, ${d.alteration}, ${d.copy_number??"unknown"} copies, ${Xy(d)}: show on the plot`,children:[c.jsx("span",{className:"cng-gene",children:d.gene}),c.jsx("span",{className:"cng-where mono",children:Xy(d)}),c.jsxs("span",{className:"cng-copies",children:[c.jsx(kC,{gene:d}),c.jsxs("span",{className:"cng-n",children:[d.copy_number===null?"?":d.copy_number,c.jsx("small",{children:d.copy_number===1?" copy":" copies"})]})]}),c.jsx("span",{className:"cng-call",children:d.alteration==="amplification"?"Amplified":"Lost"}),c.jsx("span",{className:"cng-exprs",children:d.expression.map(h=>c.jsx(BC,{project:h.project,value:h.log2_fold},h.project))})]})},d.gene))})]})}function Vo({color:n,label:a}){return c.jsxs("span",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"h-1 w-3.5 rounded-sm",style:{background:n}}),a]})}function qC({envelope:n,loading:a}){return(n==null?void 0:n.status)==="ok"&&n.data?c.jsx(VC,{data:n.data}):(n==null?void 0:n.status)==="missing"&&n.warnings.some(i=>i.includes("Rerun"))?c.jsxs("section",{className:"sig-section","aria-label":"Fraction of genome altered against the cohort",children:[c.jsx("h3",{className:"sv-h",children:"Fraction of genome altered against the cohort"}),c.jsx("p",{className:"sv-empty",children:n.warnings.join(" ")})]}):a&&!n?c.jsx("div",{className:"px-5 py-3",children:c.jsx("div",{className:"skeleton",style:{height:200},"aria-label":"Loading the FGA cohort figure"})}):null}function QC({envelope:n,loading:a,picked:i,sampleLabel:o,drivers:u,focus:d,locate:h,onSegment:m,onGene:g,fga:y,fgaLoading:x=!1}){var Q;const[v,S]=E.useState("total"),[w,j]=E.useState(null),[N,M]=E.useState(null),A=K=>({chrom:K.chrom,pos:Math.round((K.start+K.end)/2),gene:K.gene}),C=E.useMemo(()=>N&&(!h||N.nonce>h.nonce)?N:h,[h,N]),[D,O]=E.useState({window:[0,at],smooth:!1}),z=((Q=n==null?void 0:n.data)==null?void 0:Q.allele_specific)??!1,_=pC(...D.window),R=E.useCallback(()=>O({window:[0,at],smooth:!0}),[]);return c.jsx(JN,{title:"Copy number",subtitle:`Copy number across the genome, ${o}`,info:"copyNumber",envelope:n,loading:a,picked:i,skeletonHeight:250,moreLineage:y==null?void 0:y.lineage,controls:c.jsxs(c.Fragment,{children:[_&&c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"mono text-xs",style:{color:"var(--ink-2)"},"aria-live":"polite",children:_}),c.jsx("button",{type:"button",className:"sc-ib sm","aria-label":"Show the whole genome",title:"Show the whole genome",onClick:R,children:c.jsx(Xw,{size:15,"aria-hidden":!0})})]}),c.jsx(Ss,{label:"Copy number view",value:z?v:"total",onChange:S,options:[{value:"total",label:"Total"},{value:"allele",label:"Allele-specific",disabled:!z}]})]}),footer:c.jsxs("span",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-[12.5px]",style:{color:"var(--ink-2)"},children:[v==="total"||!z?c.jsxs(c.Fragment,{children:[c.jsx(Vo,{color:"var(--gain)",label:"Gain"}),c.jsx(Vo,{color:"var(--gain-strong)",label:"Amplification"}),c.jsx(Vo,{color:"var(--loss)",label:"Loss"})]}):c.jsxs(c.Fragment,{children:[c.jsx(Vo,{color:"var(--ink-2)",label:"Major allele"}),c.jsx(Vo,{color:"var(--chev)",label:"Minor allele"})]}),c.jsx("span",{style:{color:"var(--faint)"},children:"Pinch or Ctrl-scroll to zoom, drag to pan, or move the window in the overview. Double-click a chromosome, or click its name, to fill the view."})]}),children:K=>c.jsxs(c.Fragment,{children:[c.jsx(MC,{data:K,mode:z?v:"total",drivers:u,focus:w??d,locate:C,view:D,onView:O,onSegment:m,onGene:g}),K.genes&&c.jsx(GC,{genes:K.genes,onHover:$=>j($?A($):null),onLocate:$=>M({...A($),nonce:Date.now()})}),c.jsx(qC,{envelope:y,loading:x})]})})}function YC(n){const[a,i]=n.range;return[[a,0],...n.bins.map(o=>[(o.x0+o.x1)/2,o.n]),[i,0]]}function dh(n,a){for(let i=1;i<n.length;i++){const[o,u]=n[i-1],[d,h]=n[i];if(a<=d)return d===o?h:u+(a-o)/(d-o)*(h-u)}return n[n.length-1][1]}function IC(n){return n==="ccf"?"CCF":"VAF"}function Ol(n,a){return Math.min(Math.max(a,n.range[0]),n.range[1])}function XC(n){const a=n.measure==="ccf"?.25:.1,i=[];for(let o=n.range[0];o<=n.range[1]+1e-9;o+=a)i.push(Math.round(o*100)/100);return i}function KC(n,a){return n.measure==="ccf"?a===1?"1.0":a.toFixed(2).replace(/0$/,""):a.toFixed(1)}const as=14,PC=22,Fo=118,ZC=40,pi=19,Ky=n=>Math.round(n*100)/100;function JC({data:n,range:a,focus:i,onRange:o,onGene:u}){const[d,h]=Oa(),m=E.useId(),g=E.useRef(null),[y,x]=E.useState(null),[v,S]=E.useState(null),[w,j]=n.range,N=h-PC,M=V=>as+(V-w)/(j-w)*(N-as),A=V=>w+(V-as)/(N-as)*(j-w),C=E.useMemo(()=>YC(n),[n]),D=Math.max(1,...C.map(V=>V[1])),O=V=>V*pi+8+Fo,z=(V,ne)=>O(V)-ne/(D*1.1)*Fo,_=E.useMemo(()=>[...n.drivers].sort((V,ne)=>V.value-ne.value),[n.drivers]),R=_.map(V=>({left:M(Ol(n,V.value))-_a(V.gene??"?",11.5,600)/2-6,width:_a(V.gene??"?",11.5,600)+12})),Q=om(R,4),K=_.length?Math.max(...Q)+1:0,$=O(K),le=$+ZC,oe=C.map(([V,ne])=>[M(V),z(K,ne)]),te=bC(oe),Y=`${te} L${M(j).toFixed(2)},${$} L${M(w).toFixed(2)},${$} Z`,ee=V=>V.kind==="new"?[Math.min(V.from,V.to),Math.max(V.from,V.to)]:V.kind==="edge"?[Math.min(V.fixed,V.to),Math.max(V.fixed,V.to)]:V.range,X=y?ee(y):a,W=V=>{const ne=g.current.getBoundingClientRect();return A(Math.min(Math.max(V-ne.left,as),N))},ae=(V,ne,re)=>{V.preventDefault(),V.stopPropagation();let me=ne(W(V.clientX));x(me),rm(V,(be,Ce)=>{me=re(me,W(Ce.clientX)),x(me)},()=>{const[be,Ce]=ee(me);if(x(null),M(Ce)-M(be)<4)return o(null);o([Ky(Ol(n,be)),Ky(Ol(n,Ce))])})},ve=(V,ne)=>V.kind==="move"?V:{...V,to:ne},xe=(V,ne)=>{if(V.kind!=="move")return V;const re=V.range[1]-V.range[0],me=Math.min(Math.max(V.range[0]+(ne-V.grab),w),j-re);return{...V,grab:ne,range:[me,me+re]}},He=X?[M(Ol(n,X[0])),M(Ol(n,X[1]))]:null,Fe=IC(n.measure),Ye=i?n.measure==="ccf"?i.ccf:i.vaf:null,L=v!==null?_[v]:null;return c.jsxs("div",{ref:d,className:"dens","data-brushing":y?"":void 0,children:[c.jsxs("svg",{ref:g,width:h,height:le,role:"img","aria-label":`${Fe} of ${n.total} variants in ${n.sample}${n.drivers.length?`, with ${n.drivers.map(V=>`${V.gene} at ${V.value.toFixed(2)}`).join(", ")}`:""}.`,onPointerDown:V=>{V.button===0&&ae(V,ne=>({kind:"new",from:ne,to:ne}),ve)},children:[c.jsxs("defs",{children:[c.jsxs("linearGradient",{id:`${m}-fill`,x1:"0",y1:"0",x2:"0",y2:"1",children:[c.jsx("stop",{offset:"0",style:{stopColor:"var(--ccf-fill)"},stopOpacity:.42}),c.jsx("stop",{offset:"1",style:{stopColor:"var(--ccf-fill)"},stopOpacity:.03})]}),c.jsx("clipPath",{id:`${m}-spot`,children:He&&c.jsx("rect",{x:He[0],y:0,width:Math.max(He[1]-He[0],0),height:le})})]}),XC(n).map(V=>c.jsxs("g",{children:[c.jsx("line",{x1:M(V),x2:M(V),y1:K*pi+8,y2:$,className:"dens-grid","data-clonal":n.measure==="ccf"&&V===1?"":void 0}),c.jsx("text",{x:M(V),y:$+18,textAnchor:"middle",className:"dens-tick",children:KC(n,V)})]},V)),n.measure==="ccf"&&w<=1&&j>=1&&c.jsx("text",{x:M(1),y:$+31,textAnchor:"middle",className:"dens-clonal",children:"clonal"}),c.jsxs("g",{className:"dens-curve","data-dim":He?"":void 0,children:[c.jsx("path",{d:Y,fill:`url(#${m}-fill)`}),c.jsx("path",{d:te,className:"dens-line"})]}),He&&c.jsx("g",{className:"dens-curve dens-lit",children:c.jsxs("g",{clipPath:`url(#${m}-spot)`,children:[c.jsx("path",{d:Y,fill:`url(#${m}-fill)`}),c.jsx("path",{d:te,className:"dens-line"})]})}),c.jsx("line",{x1:as,x2:N,y1:$,y2:$,className:"dens-axis"}),n.median!==null&&c.jsx("path",{d:`M${M(n.median)},${$+1} l4.5,-6 l-4.5,-6 l-4.5,6 z`,className:"dens-median",children:c.jsx("title",{children:`Median ${n.median.toFixed(2)}`})}),_.map((V,ne)=>{const re=Ol(n,V.value),me=M(re),be=z(K,dh(C,re)),Ce=V.gene??"?",ue=_a(Ce,11.5,600)+12,ge=8+Q[ne]*pi,rt=v===ne;return c.jsxs("g",{className:"dens-driver","data-on":rt||void 0,onPointerDown:jt=>jt.stopPropagation(),onMouseEnter:()=>S(ne),onMouseLeave:()=>S(null),onClick:()=>V.gene&&u(V.gene),children:[c.jsx("line",{x1:me,x2:me,y1:ge+15,y2:be,className:"dens-leader"}),c.jsx("rect",{x:me-ue/2,y:ge,width:ue,height:16,rx:8,className:"dens-chip"}),c.jsx("text",{x:me,y:ge+11.5,textAnchor:"middle",className:"dens-gene",children:Ce}),c.jsx("circle",{cx:me,cy:be,r:rt?7:5.5,className:"dens-dot"})]},`${Ce}-${ne}`)}),Ye!=null&&c.jsx("g",{className:"dens-focus",pointerEvents:"none",children:(()=>{const V=Ol(n,Ye),ne=M(V),re=z(K,dh(C,V)),me=`${(i==null?void 0:i.gene)??"?"} ${Ye.toFixed(2)}`,be=_a(me,11,600)+14,Ce=ne+12+be>h;return c.jsxs(c.Fragment,{children:[c.jsx("line",{x1:ne,x2:ne,y1:re,y2:$,className:"dens-focus-line"}),c.jsx("circle",{cx:ne,cy:re,r:6.5,className:"dens-focus-dot"}),c.jsxs("g",{transform:`translate(${Ce?ne-12-be:ne+12} ${re-11})`,children:[c.jsx("rect",{width:be,height:22,rx:7,className:"dens-focus-chip"}),c.jsx("text",{x:7,y:15,className:"dens-focus-text",children:me})]})]})})()}),X&&He&&c.jsxs("g",{className:"dens-brush",children:[c.jsx("rect",{x:He[0],y:K*pi+4,width:Math.max(He[1]-He[0],0),height:Fo+8,className:"dens-sel",onPointerDown:V=>ae(V,ne=>({kind:"move",grab:ne,range:X}),xe)}),[0,1].map(V=>c.jsxs("g",{children:[c.jsx("line",{x1:He[V],x2:He[V],y1:K*pi+4,y2:$,className:"dens-sel-edge"}),c.jsx("rect",{x:He[V]-5,y:K*pi+4,width:10,height:Fo+8,className:"dens-edge",onPointerDown:ne=>ae(ne,()=>({kind:"edge",fixed:X[1-V],to:X[V]}),ve)}),c.jsx("rect",{x:He[V]-3,y:$-Fo/2-10,width:6,height:20,rx:3,className:"dens-grip",pointerEvents:"none"})]},V)),c.jsxs("g",{transform:`translate(${Math.min(Math.max((He[0]+He[1])/2,as+48),N-48)} ${$-30})`,pointerEvents:"none",children:[c.jsx("rect",{x:-48,y:0,width:96,height:20,rx:10,className:"dens-readout"}),c.jsxs("text",{y:14,textAnchor:"middle",className:"dens-readout-text",children:[X[0].toFixed(2)," – ",X[1].toFixed(2)]})]})]})]}),L&&v!==null&&c.jsxs(Ul,{x:M(Ol(n,L.value)),y:z(K,dh(C,Ol(n,L.value)))-22,width:h,above:!0,children:[c.jsxs("span",{className:"ctip-title",children:[c.jsx("i",{children:L.gene??"?"}),L.protein_change&&c.jsxs("span",{className:"ctip-sub",children:[" ",L.protein_change]})]}),c.jsxs("span",{className:"ctip-row",children:[c.jsx("span",{children:Fe}),c.jsx("b",{children:L.value.toFixed(2)})]}),c.jsx("span",{className:"ctip-note",children:"Driver. Click to find it in the table"})]})]})}function WC({envelope:n,loading:a,measure:i,onMeasure:o,range:u,focus:d,onRange:h,onGene:m}){const g=i==="ccf"?"Cancer cell fraction":"Variant allele fraction",y=(n==null?void 0:n.status)==="ok"?n.data:null;return c.jsxs("div",{className:"strip",children:[c.jsxs("div",{className:"strip-head",children:[c.jsx("span",{className:"text-[13px] font-semibold",children:g}),y&&c.jsxs("span",{className:"text-[12.5px]",style:{color:"var(--muted)"},children:[y.median!==null?`Median ${y.median.toFixed(2)}. `:"","Drag across the plot to filter the table."]}),c.jsx("span",{className:"flex-auto"}),c.jsx(Ss,{label:"Measure",value:i,onChange:o,options:[{value:"ccf",label:"CCF"},{value:"vaf",label:"VAF"}]})]}),c.jsx(dr,{label:g,envelope:n,loading:a,skeletonHeight:180,children:x=>c.jsx(JC,{data:x,range:u,focus:d,onRange:h,onGene:m})})]})}const eE=Object.keys(v1),tE=Object.keys(y1);function Py(n,a){return n.includes(a)?n.filter(i=>i!==a):[...n,a]}function hh({label:n,count:a,active:i,onClick:o}){return c.jsxs("button",{type:"button",className:"facet","aria-pressed":i,"data-empty":!i&&a===0,onClick:o,children:[c.jsx("span",{className:"facet-check","aria-hidden":!0,children:i&&c.jsx(e1,{size:11,strokeWidth:3})}),c.jsx("span",{className:"truncate",children:n}),c.jsx("span",{className:"facet-n",children:a===void 0?"":a.toLocaleString("en-US")})]})}function nE({table:n,data:a,onChange:i}){const o=a==null?void 0:a.facets.effects,u=a==null?void 0:a.facets.flags,d=n.range;return c.jsxs("aside",{className:"facets","aria-label":"Filters",children:[c.jsxs("div",{className:"facet-group",role:"group","aria-label":"Effect",children:[c.jsx("span",{className:"facet-title",children:"Effect"}),eE.map(h=>c.jsx(hh,{label:v1[h],count:o==null?void 0:o[h],active:n.effects.includes(h),onClick:()=>i({effects:Py(n.effects,h)})},h))]}),c.jsxs("div",{className:"facet-group",role:"group","aria-label":"Flags",children:[c.jsx("span",{className:"facet-title",children:"Flags"}),tE.map(h=>c.jsx(hh,{label:y1[h],count:u==null?void 0:u[h],active:n.flags.includes(h),onClick:()=>i({flags:Py(n.flags,h)})},h))]}),(a==null?void 0:a.ffpe)&&c.jsxs("div",{className:"facet-group",role:"group","aria-label":"FFPE filter",children:[c.jsx("span",{className:"facet-title",children:"FFPE filter"}),c.jsx(hh,{label:"Show filtered calls",count:a.ffpe.removed,active:n.ffpe,onClick:()=>i({ffpe:!n.ffpe})}),c.jsx("span",{className:"facet-note",children:a.ffpe.threshold!==null?`As in the report, calls FFPERASE scores above ${a.ffpe.threshold} are left out of the counts.`:"As in the report, calls its FFPE filter removes are left out of the counts."})]}),d&&c.jsxs("div",{className:"facet-group",role:"group","aria-label":"Range",children:[c.jsxs("span",{className:"facet-title",children:[d.measure==="ccf"?"CCF":"VAF"," range"]}),c.jsxs("span",{className:"facet-range",children:[c.jsxs("span",{className:"mono",children:[d.low.toFixed(2)," – ",d.high.toFixed(2)]}),c.jsx("button",{type:"button",className:"sc-ib xs","aria-label":"Remove the range",title:"Remove the range",onClick:()=>i({range:null}),children:c.jsx(cc,{size:13,"aria-hidden":!0})})]})]}),p1(n)>0&&c.jsx("button",{type:"button",className:"facet-clear",onClick:()=>i({q:"",effects:[],flags:[],range:null}),children:"Clear all filters"})]})}const mh=48,ko=16,Bo=200,lE=26,vi=["#1baf7a","#eda100"],gh=[{key:"snvs",label:"SNVs"},{key:"indels",label:"Indels"}];function aE({data:n}){const[a,i]=Oa(760),[o,u]=E.useState(null),d=n.cohorts,h=d.length>1,m=(i-mh-8)/gh.length,g=Math.min(m*.34,90),y=j=>{const N=[...d.flatMap(A=>A[j]),n.tumour[j]].filter(A=>A!==null),M=Tm(Math.max(...N,1),4);return{ticks:M,top:M[M.length-1]}},x=o?d[o.cohort]:null,v=o&&x?x[o.event]:[],S=um(v),w=o?n.tumour[o.event]:null;return c.jsxs("section",{className:"tmbc sig-section","aria-label":"Coding mutations against reference cohorts",children:[c.jsxs("div",{className:"ctx-head",children:[c.jsxs("h3",{className:"sv-h",children:["Coding mutations against reference cohorts",n.disease&&c.jsx("span",{className:"sv-h-n",children:n.disease})]}),c.jsxs("div",{className:"ctx-controls",children:[c.jsxs("ul",{className:"sv-sigs-key","aria-label":"Key",children:[d.map((j,N)=>c.jsxs("li",{children:[c.jsx("span",{className:"sv-swatch",style:{background:vi[N%vi.length]},"aria-hidden":!0}),j.cohort,j.n!==null&&c.jsx("span",{className:"sv-key-n",children:j.n})]},j.cohort??N)),c.jsxs("li",{children:[c.jsx("span",{className:"hrd-key-pin","aria-hidden":!0}),"This tumour"]})]}),c.jsx("span",{className:"snap",title:"Cohorts show the samples the report compared with when it ran. Rerun the report to compare with the cohort as it is now.",children:"Cohort as of the report run"})]})]}),c.jsx("div",{className:"fga-wrap",children:c.jsxs("div",{ref:a,className:"fga-plot",onMouseLeave:()=>u(null),children:[c.jsx("svg",{width:i,height:ko+Bo+lE,role:"img","aria-label":`Coding SNVs and indels against ${d.map(j=>j.cohort).join(" and ")}`,children:gh.map(({key:j,label:N},M)=>{const{ticks:A,top:C}=y(j),D=mh+m*M,O=D+m/2,z=R=>ko+Bo*(1-R/C),_=n.tumour[j];return c.jsxs("g",{children:[A.map(R=>c.jsxs("g",{children:[c.jsx("line",{x1:D+6,x2:D+m-6,y1:z(R),y2:z(R),className:R===0?"ctx-base":"ctx-grid"}),c.jsx("text",{x:D,y:z(R)+4,textAnchor:"end",className:"ctx-tick",children:R.toLocaleString("en-US")})]},R)),d.map((R,Q)=>{const K=LC(R[j]),$=h?Q===0?-1:1:0,le=vi[Q%vi.length],oe=K.length?$===0?[...K.map(X=>`${O+X.d*g},${z(X.v)}`),...[...K].reverse().map(X=>`${O-X.d*g},${z(X.v)}`)]:[`${O},${z(K[0].v)}`,...K.map(X=>`${O+$*X.d*g},${z(X.v)}`),`${O},${z(K[K.length-1].v)}`]:[],te=um(R[j]),Y=(o==null?void 0:o.event)===j&&o.cohort===Q,ee=$===0?O:O+$*6;return c.jsxs("g",{className:"tmb-violin","data-on":Y||void 0,onMouseEnter:()=>u({event:j,cohort:Q}),children:[oe.length>0&&c.jsx("polygon",{points:oe.join(" "),style:{fill:le,stroke:le},className:"tmb-shape"}),te&&c.jsxs(c.Fragment,{children:[c.jsx("line",{x1:ee,x2:ee,y1:z(te.q1),y2:z(te.q3),className:"tmb-iqr"}),c.jsx("circle",{cx:ee,cy:z(te.median),r:3,className:"tmb-median"})]}),!oe.length&&R[j].map((X,W)=>X===null?null:c.jsx("circle",{cx:O+$*10,cy:z(X),r:3,style:{fill:le}},W)),c.jsx("rect",{x:$===1?O:O-g-4,y:ko,width:$===0?g*2+8:g+4,height:Bo,fill:"transparent"})]},R.cohort??Q)}),_!==null&&c.jsxs("g",{pointerEvents:"none",className:"tmb-tumour",children:[c.jsx("line",{x1:O-g-10,x2:O+g+10,y1:z(_),y2:z(_),className:"tmb-tumour-line"}),c.jsx("circle",{cx:O,cy:z(_),r:7,className:"fga-pin-dot"}),c.jsx("text",{x:O+12,y:z(_)-9,className:"tmb-tumour-text",children:_.toLocaleString("en-US")})]}),c.jsx("text",{x:O,y:ko+Bo+19,textAnchor:"middle",className:"fga-label",children:N})]},j)})}),o&&x&&c.jsxs(Ul,{x:mh+m*gh.findIndex(j=>j.key===o.event)+m/2+(h?o.cohort===0?-g/2:g/2:0),y:ko+Bo/2,width:i,children:[c.jsxs("span",{className:"ctip-title",children:[c.jsx("span",{className:"sv-swatch",style:{background:vi[o.cohort%vi.length]},"aria-hidden":!0}),x.cohort,", coding ",o.event==="snvs"?"SNVs":"indels"]}),S&&c.jsxs(c.Fragment,{children:[c.jsxs("span",{className:"ctip-row",children:[c.jsx("span",{children:"Tumours"}),c.jsx("b",{children:S.n})]}),c.jsxs("span",{className:"ctip-row",children:[c.jsx("span",{children:"Median"}),c.jsx("b",{children:Math.round(S.median).toLocaleString("en-US")})]}),c.jsxs("span",{className:"ctip-row",children:[c.jsx("span",{children:"Middle half"}),c.jsxs("b",{children:[Math.round(S.q1).toLocaleString("en-US"),"–",Math.round(S.q3).toLocaleString("en-US")]})]})]}),w!==null&&c.jsxs("span",{className:"ctip-note",children:["This tumour ",w.toLocaleString("en-US"),". ",N1(w,v,`${x.cohort} tumour`)]})]})]})})]})}/**
|
|
268
268
|
* table-core
|
|
269
269
|
*
|
|
270
270
|
* Copyright (c) TanStack
|
|
@@ -273,10 +273,10 @@ Error generating stack: `+a.message+`
|
|
|
273
273
|
* LICENSE.md file in the root directory of this source tree.
|
|
274
274
|
*
|
|
275
275
|
* @license MIT
|
|
276
|
-
*/function
|
|
276
|
+
*/function Ta(n,a){return typeof n=="function"?n(a):n}function wn(n,a){return i=>{a.setState(o=>({...o,[n]:Ta(i,o[n])}))}}function vc(n){return n instanceof Function}function sE(n){return Array.isArray(n)&&n.every(a=>typeof a=="number")}function iE(n,a){const i=[],o=u=>{u.forEach(d=>{i.push(d);const h=a(d);h!=null&&h.length&&o(h)})};return o(n),i}function we(n,a,i){let o=[],u;return d=>{let h;i.key&&i.debug&&(h=Date.now());const m=n(d);if(!(m.length!==o.length||m.some((x,v)=>o[v]!==x)))return u;o=m;let y;if(i.key&&i.debug&&(y=Date.now()),u=a(...m),i==null||i.onChange==null||i.onChange(u),i.key&&i.debug&&i!=null&&i.debug()){const x=Math.round((Date.now()-h)*100)/100,v=Math.round((Date.now()-y)*100)/100,S=v/16,w=(j,N)=>{for(j=String(j);j.length<N;)j=" "+j;return j};console.info(`%c⏱ ${w(v,5)} /${w(x,5)} ms`,`
|
|
277
277
|
font-size: .6rem;
|
|
278
278
|
font-weight: bold;
|
|
279
|
-
color: hsl(${Math.max(0,Math.min(120-120*b,120))}deg 100% 31%);`,i==null?void 0:i.key)}return u}}function Se(n,s,i,r){return{debug:()=>{var u;return(u=n==null?void 0:n.debugAll)!=null?u:n[s]},key:!1,onChange:r}}function gE(n,s,i,r){const u=()=>{var h;return(h=d.getValue())!=null?h:n.options.renderFallbackValue},d={id:`${s.id}_${i.id}`,row:s,column:i,getValue:()=>s.getValue(r),renderValue:u,getContext:xe(()=>[n,i,s,d],(h,m,p,y)=>({table:h,column:m,row:p,cell:y,getValue:y.getValue,renderValue:y.renderValue}),Se(n.options,"debugCells"))};return n._features.forEach(h=>{h.createCell==null||h.createCell(d,i,s,n)},{}),d}function pE(n,s,i,r){var u,d;const m={...n._getDefaultColumnDef(),...s},p=m.accessorKey;let y=(u=(d=m.id)!=null?d:p?typeof String.prototype.replaceAll=="function"?p.replaceAll(".","_"):p.replace(/\./g,"_"):void 0)!=null?u:typeof m.header=="string"?m.header:void 0,x;if(m.accessorFn?x=m.accessorFn:p&&(p.includes(".")?x=b=>{let w=b;for(const N of p.split(".")){var C;w=(C=w)==null?void 0:C[N]}return w}:x=b=>b[m.accessorKey]),!y)throw new Error;let v={id:`${String(y)}`,accessorFn:x,parent:r,depth:i,columnDef:m,columns:[],getFlatColumns:xe(()=>[!0],()=>{var b;return[v,...(b=v.columns)==null?void 0:b.flatMap(w=>w.getFlatColumns())]},Se(n.options,"debugColumns")),getLeafColumns:xe(()=>[n._getOrderColumnsFn()],b=>{var w;if((w=v.columns)!=null&&w.length){let C=v.columns.flatMap(N=>N.getLeafColumns());return b(C)}return[v]},Se(n.options,"debugColumns"))};for(const b of n._features)b.createColumn==null||b.createColumn(v,n);return v}const Qt="debugHeaders";function by(n,s,i){var r;let d={id:(r=i.id)!=null?r:s.id,column:s,index:i.index,isPlaceholder:!!i.isPlaceholder,placeholderId:i.placeholderId,depth:i.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const h=[],m=p=>{p.subHeaders&&p.subHeaders.length&&p.subHeaders.map(m),h.push(p)};return m(d),h},getContext:()=>({table:n,header:d,column:s})};return n._features.forEach(h=>{h.createHeader==null||h.createHeader(d,n)}),d}const vE={createTable:n=>{n.getHeaderGroups=xe(()=>[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.left,n.getState().columnPinning.right],(s,i,r,u)=>{var d,h;const m=(d=r==null?void 0:r.map(v=>i.find(b=>b.id===v)).filter(Boolean))!=null?d:[],p=(h=u==null?void 0:u.map(v=>i.find(b=>b.id===v)).filter(Boolean))!=null?h:[],y=i.filter(v=>!(r!=null&&r.includes(v.id))&&!(u!=null&&u.includes(v.id)));return _u(s,[...m,...y,...p],n)},Se(n.options,Qt)),n.getCenterHeaderGroups=xe(()=>[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.left,n.getState().columnPinning.right],(s,i,r,u)=>(i=i.filter(d=>!(r!=null&&r.includes(d.id))&&!(u!=null&&u.includes(d.id))),_u(s,i,n,"center")),Se(n.options,Qt)),n.getLeftHeaderGroups=xe(()=>[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.left],(s,i,r)=>{var u;const d=(u=r==null?void 0:r.map(h=>i.find(m=>m.id===h)).filter(Boolean))!=null?u:[];return _u(s,d,n,"left")},Se(n.options,Qt)),n.getRightHeaderGroups=xe(()=>[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.right],(s,i,r)=>{var u;const d=(u=r==null?void 0:r.map(h=>i.find(m=>m.id===h)).filter(Boolean))!=null?u:[];return _u(s,d,n,"right")},Se(n.options,Qt)),n.getFooterGroups=xe(()=>[n.getHeaderGroups()],s=>[...s].reverse(),Se(n.options,Qt)),n.getLeftFooterGroups=xe(()=>[n.getLeftHeaderGroups()],s=>[...s].reverse(),Se(n.options,Qt)),n.getCenterFooterGroups=xe(()=>[n.getCenterHeaderGroups()],s=>[...s].reverse(),Se(n.options,Qt)),n.getRightFooterGroups=xe(()=>[n.getRightHeaderGroups()],s=>[...s].reverse(),Se(n.options,Qt)),n.getFlatHeaders=xe(()=>[n.getHeaderGroups()],s=>s.map(i=>i.headers).flat(),Se(n.options,Qt)),n.getLeftFlatHeaders=xe(()=>[n.getLeftHeaderGroups()],s=>s.map(i=>i.headers).flat(),Se(n.options,Qt)),n.getCenterFlatHeaders=xe(()=>[n.getCenterHeaderGroups()],s=>s.map(i=>i.headers).flat(),Se(n.options,Qt)),n.getRightFlatHeaders=xe(()=>[n.getRightHeaderGroups()],s=>s.map(i=>i.headers).flat(),Se(n.options,Qt)),n.getCenterLeafHeaders=xe(()=>[n.getCenterFlatHeaders()],s=>s.filter(i=>{var r;return!((r=i.subHeaders)!=null&&r.length)}),Se(n.options,Qt)),n.getLeftLeafHeaders=xe(()=>[n.getLeftFlatHeaders()],s=>s.filter(i=>{var r;return!((r=i.subHeaders)!=null&&r.length)}),Se(n.options,Qt)),n.getRightLeafHeaders=xe(()=>[n.getRightFlatHeaders()],s=>s.filter(i=>{var r;return!((r=i.subHeaders)!=null&&r.length)}),Se(n.options,Qt)),n.getLeafHeaders=xe(()=>[n.getLeftHeaderGroups(),n.getCenterHeaderGroups(),n.getRightHeaderGroups()],(s,i,r)=>{var u,d,h,m,p,y;return[...(u=(d=s[0])==null?void 0:d.headers)!=null?u:[],...(h=(m=i[0])==null?void 0:m.headers)!=null?h:[],...(p=(y=r[0])==null?void 0:y.headers)!=null?p:[]].map(x=>x.getLeafHeaders()).flat()},Se(n.options,Qt))}};function _u(n,s,i,r){var u,d;let h=0;const m=function(b,w){w===void 0&&(w=1),h=Math.max(h,w),b.filter(C=>C.getIsVisible()).forEach(C=>{var N;(N=C.columns)!=null&&N.length&&m(C.columns,w+1)},0)};m(n);let p=[];const y=(b,w)=>{const C={depth:w,id:[r,`${w}`].filter(Boolean).join("_"),headers:[]},N=[];b.forEach(M=>{const R=[...N].reverse()[0],j=M.column.depth===C.depth;let F,T=!1;if(j&&M.column.parent?F=M.column.parent:(F=M.column,T=!0),R&&(R==null?void 0:R.column)===F)R.subHeaders.push(M);else{const H=by(i,F,{id:[r,w,F.id,M==null?void 0:M.id].filter(Boolean).join("_"),isPlaceholder:T,placeholderId:T?`${N.filter(D=>D.column===F).length}`:void 0,depth:w,index:N.length});H.subHeaders.push(M),N.push(H)}C.headers.push(M),M.headerGroup=C}),p.push(C),w>0&&y(N,w-1)},x=s.map((b,w)=>by(i,b,{depth:h,index:w}));y(x,h-1),p.reverse();const v=b=>b.filter(C=>C.column.getIsVisible()).map(C=>{let N=0,M=0,R=[0];C.subHeaders&&C.subHeaders.length?(R=[],v(C.subHeaders).forEach(F=>{let{colSpan:T,rowSpan:H}=F;N+=T,R.push(H)})):N=1;const j=Math.min(...R);return M=M+j,C.colSpan=N,C.rowSpan=M,{colSpan:N,rowSpan:M}});return v((u=(d=p[0])==null?void 0:d.headers)!=null?u:[]),p}const yE=(n,s,i,r,u,d,h)=>{let m={id:s,index:r,original:i,depth:u,parentId:h,_valuesCache:{},_uniqueValuesCache:{},getValue:p=>{if(m._valuesCache.hasOwnProperty(p))return m._valuesCache[p];const y=n.getColumn(p);if(y!=null&&y.accessorFn)return m._valuesCache[p]=y.accessorFn(m.original,r),m._valuesCache[p]},getUniqueValues:p=>{if(m._uniqueValuesCache.hasOwnProperty(p))return m._uniqueValuesCache[p];const y=n.getColumn(p);if(y!=null&&y.accessorFn)return y.columnDef.getUniqueValues?(m._uniqueValuesCache[p]=y.columnDef.getUniqueValues(m.original,r),m._uniqueValuesCache[p]):(m._uniqueValuesCache[p]=[m.getValue(p)],m._uniqueValuesCache[p])},renderValue:p=>{var y;return(y=m.getValue(p))!=null?y:n.options.renderFallbackValue},subRows:[],getLeafRows:()=>mE(m.subRows,p=>p.subRows),getParentRow:()=>m.parentId?n.getRow(m.parentId,!0):void 0,getParentRows:()=>{let p=[],y=m;for(;;){const x=y.getParentRow();if(!x)break;p.push(x),y=x}return p.reverse()},getAllCells:xe(()=>[n.getAllLeafColumns()],p=>p.map(y=>gE(n,m,y,y.id)),Se(n.options,"debugRows")),_getAllCellsByColumnId:xe(()=>[m.getAllCells()],p=>p.reduce((y,x)=>(y[x.column.id]=x,y),{}),Se(n.options,"debugRows"))};for(let p=0;p<n._features.length;p++){const y=n._features[p];y==null||y.createRow==null||y.createRow(m,n)}return m},xE={createColumn:(n,s)=>{n._getFacetedRowModel=s.options.getFacetedRowModel&&s.options.getFacetedRowModel(s,n.id),n.getFacetedRowModel=()=>n._getFacetedRowModel?n._getFacetedRowModel():s.getPreFilteredRowModel(),n._getFacetedUniqueValues=s.options.getFacetedUniqueValues&&s.options.getFacetedUniqueValues(s,n.id),n.getFacetedUniqueValues=()=>n._getFacetedUniqueValues?n._getFacetedUniqueValues():new Map,n._getFacetedMinMaxValues=s.options.getFacetedMinMaxValues&&s.options.getFacetedMinMaxValues(s,n.id),n.getFacetedMinMaxValues=()=>{if(n._getFacetedMinMaxValues)return n._getFacetedMinMaxValues()}}},P1=(n,s,i)=>{var r,u;const d=i==null||(r=i.toString())==null?void 0:r.toLowerCase();return!!(!((u=n.getValue(s))==null||(u=u.toString())==null||(u=u.toLowerCase())==null)&&u.includes(d))};P1.autoRemove=n=>kn(n);const J1=(n,s,i)=>{var r;return!!(!((r=n.getValue(s))==null||(r=r.toString())==null)&&r.includes(i))};J1.autoRemove=n=>kn(n);const W1=(n,s,i)=>{var r;return((r=n.getValue(s))==null||(r=r.toString())==null?void 0:r.toLowerCase())===(i==null?void 0:i.toLowerCase())};W1.autoRemove=n=>kn(n);const ex=(n,s,i)=>{var r;return(r=n.getValue(s))==null?void 0:r.includes(i)};ex.autoRemove=n=>kn(n);const tx=(n,s,i)=>!i.some(r=>{var u;return!((u=n.getValue(s))!=null&&u.includes(r))});tx.autoRemove=n=>kn(n)||!(n!=null&&n.length);const nx=(n,s,i)=>i.some(r=>{var u;return(u=n.getValue(s))==null?void 0:u.includes(r)});nx.autoRemove=n=>kn(n)||!(n!=null&&n.length);const lx=(n,s,i)=>n.getValue(s)===i;lx.autoRemove=n=>kn(n);const ax=(n,s,i)=>n.getValue(s)==i;ax.autoRemove=n=>kn(n);const im=(n,s,i)=>{let[r,u]=i;const d=n.getValue(s);return d>=r&&d<=u};im.resolveFilterValue=n=>{let[s,i]=n,r=typeof s!="number"?parseFloat(s):s,u=typeof i!="number"?parseFloat(i):i,d=s===null||Number.isNaN(r)?-1/0:r,h=i===null||Number.isNaN(u)?1/0:u;if(d>h){const m=d;d=h,h=m}return[d,h]};im.autoRemove=n=>kn(n)||kn(n[0])&&kn(n[1]);const Tl={includesString:P1,includesStringSensitive:J1,equalsString:W1,arrIncludes:ex,arrIncludesAll:tx,arrIncludesSome:nx,equals:lx,weakEquals:ax,inNumberRange:im};function kn(n){return n==null||n===""}const SE={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:n=>({columnFilters:[],...n}),getDefaultOptions:n=>({onColumnFiltersChange:Sn("columnFilters",n),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(n,s)=>{n.getAutoFilterFn=()=>{const i=s.getCoreRowModel().flatRows[0],r=i==null?void 0:i.getValue(n.id);return typeof r=="string"?Tl.includesString:typeof r=="number"?Tl.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?Tl.equals:Array.isArray(r)?Tl.arrIncludes:Tl.weakEquals},n.getFilterFn=()=>{var i,r;return Ju(n.columnDef.filterFn)?n.columnDef.filterFn:n.columnDef.filterFn==="auto"?n.getAutoFilterFn():(i=(r=s.options.filterFns)==null?void 0:r[n.columnDef.filterFn])!=null?i:Tl[n.columnDef.filterFn]},n.getCanFilter=()=>{var i,r,u;return((i=n.columnDef.enableColumnFilter)!=null?i:!0)&&((r=s.options.enableColumnFilters)!=null?r:!0)&&((u=s.options.enableFilters)!=null?u:!0)&&!!n.accessorFn},n.getIsFiltered=()=>n.getFilterIndex()>-1,n.getFilterValue=()=>{var i;return(i=s.getState().columnFilters)==null||(i=i.find(r=>r.id===n.id))==null?void 0:i.value},n.getFilterIndex=()=>{var i,r;return(i=(r=s.getState().columnFilters)==null?void 0:r.findIndex(u=>u.id===n.id))!=null?i:-1},n.setFilterValue=i=>{s.setColumnFilters(r=>{const u=n.getFilterFn(),d=r==null?void 0:r.find(x=>x.id===n.id),h=ba(i,d?d.value:void 0);if(wy(u,h,n)){var m;return(m=r==null?void 0:r.filter(x=>x.id!==n.id))!=null?m:[]}const p={id:n.id,value:h};if(d){var y;return(y=r==null?void 0:r.map(x=>x.id===n.id?p:x))!=null?y:[]}return r!=null&&r.length?[...r,p]:[p]})}},createRow:(n,s)=>{n.columnFilters={},n.columnFiltersMeta={}},createTable:n=>{n.setColumnFilters=s=>{const i=n.getAllLeafColumns(),r=u=>{var d;return(d=ba(s,u))==null?void 0:d.filter(h=>{const m=i.find(p=>p.id===h.id);if(m){const p=m.getFilterFn();if(wy(p,h.value,m))return!1}return!0})};n.options.onColumnFiltersChange==null||n.options.onColumnFiltersChange(r)},n.resetColumnFilters=s=>{var i,r;n.setColumnFilters(s?[]:(i=(r=n.initialState)==null?void 0:r.columnFilters)!=null?i:[])},n.getPreFilteredRowModel=()=>n.getCoreRowModel(),n.getFilteredRowModel=()=>(!n._getFilteredRowModel&&n.options.getFilteredRowModel&&(n._getFilteredRowModel=n.options.getFilteredRowModel(n)),n.options.manualFiltering||!n._getFilteredRowModel?n.getPreFilteredRowModel():n._getFilteredRowModel())}};function wy(n,s,i){return(n&&n.autoRemove?n.autoRemove(s,i):!1)||typeof s>"u"||typeof s=="string"&&!s}const bE=(n,s,i)=>i.reduce((r,u)=>{const d=u.getValue(n);return r+(typeof d=="number"?d:0)},0),wE=(n,s,i)=>{let r;return i.forEach(u=>{const d=u.getValue(n);d!=null&&(r>d||r===void 0&&d>=d)&&(r=d)}),r},CE=(n,s,i)=>{let r;return i.forEach(u=>{const d=u.getValue(n);d!=null&&(r<d||r===void 0&&d>=d)&&(r=d)}),r},jE=(n,s,i)=>{let r,u;return i.forEach(d=>{const h=d.getValue(n);h!=null&&(r===void 0?h>=h&&(r=u=h):(r>h&&(r=h),u<h&&(u=h)))}),[r,u]},EE=(n,s)=>{let i=0,r=0;if(s.forEach(u=>{let d=u.getValue(n);d!=null&&(d=+d)>=d&&(++i,r+=d)}),i)return r/i},NE=(n,s)=>{if(!s.length)return;const i=s.map(d=>d.getValue(n));if(!hE(i))return;if(i.length===1)return i[0];const r=Math.floor(i.length/2),u=i.sort((d,h)=>d-h);return i.length%2!==0?u[r]:(u[r-1]+u[r])/2},_E=(n,s)=>Array.from(new Set(s.map(i=>i.getValue(n))).values()),ME=(n,s)=>new Set(s.map(i=>i.getValue(n))).size,RE=(n,s)=>s.length,Kd={sum:bE,min:wE,max:CE,extent:jE,mean:EE,median:NE,unique:_E,uniqueCount:ME,count:RE},TE={getDefaultColumnDef:()=>({aggregatedCell:n=>{var s,i;return(s=(i=n.getValue())==null||i.toString==null?void 0:i.toString())!=null?s:null},aggregationFn:"auto"}),getInitialState:n=>({grouping:[],...n}),getDefaultOptions:n=>({onGroupingChange:Sn("grouping",n),groupedColumnMode:"reorder"}),createColumn:(n,s)=>{n.toggleGrouping=()=>{s.setGrouping(i=>i!=null&&i.includes(n.id)?i.filter(r=>r!==n.id):[...i??[],n.id])},n.getCanGroup=()=>{var i,r;return((i=n.columnDef.enableGrouping)!=null?i:!0)&&((r=s.options.enableGrouping)!=null?r:!0)&&(!!n.accessorFn||!!n.columnDef.getGroupingValue)},n.getIsGrouped=()=>{var i;return(i=s.getState().grouping)==null?void 0:i.includes(n.id)},n.getGroupedIndex=()=>{var i;return(i=s.getState().grouping)==null?void 0:i.indexOf(n.id)},n.getToggleGroupingHandler=()=>{const i=n.getCanGroup();return()=>{i&&n.toggleGrouping()}},n.getAutoAggregationFn=()=>{const i=s.getCoreRowModel().flatRows[0],r=i==null?void 0:i.getValue(n.id);if(typeof r=="number")return Kd.sum;if(Object.prototype.toString.call(r)==="[object Date]")return Kd.extent},n.getAggregationFn=()=>{var i,r;if(!n)throw new Error;return Ju(n.columnDef.aggregationFn)?n.columnDef.aggregationFn:n.columnDef.aggregationFn==="auto"?n.getAutoAggregationFn():(i=(r=s.options.aggregationFns)==null?void 0:r[n.columnDef.aggregationFn])!=null?i:Kd[n.columnDef.aggregationFn]}},createTable:n=>{n.setGrouping=s=>n.options.onGroupingChange==null?void 0:n.options.onGroupingChange(s),n.resetGrouping=s=>{var i,r;n.setGrouping(s?[]:(i=(r=n.initialState)==null?void 0:r.grouping)!=null?i:[])},n.getPreGroupedRowModel=()=>n.getFilteredRowModel(),n.getGroupedRowModel=()=>(!n._getGroupedRowModel&&n.options.getGroupedRowModel&&(n._getGroupedRowModel=n.options.getGroupedRowModel(n)),n.options.manualGrouping||!n._getGroupedRowModel?n.getPreGroupedRowModel():n._getGroupedRowModel())},createRow:(n,s)=>{n.getIsGrouped=()=>!!n.groupingColumnId,n.getGroupingValue=i=>{if(n._groupingValuesCache.hasOwnProperty(i))return n._groupingValuesCache[i];const r=s.getColumn(i);return r!=null&&r.columnDef.getGroupingValue?(n._groupingValuesCache[i]=r.columnDef.getGroupingValue(n.original),n._groupingValuesCache[i]):n.getValue(i)},n._groupingValuesCache={}},createCell:(n,s,i,r)=>{n.getIsGrouped=()=>s.getIsGrouped()&&s.id===i.groupingColumnId,n.getIsPlaceholder=()=>!n.getIsGrouped()&&s.getIsGrouped(),n.getIsAggregated=()=>{var u;return!n.getIsGrouped()&&!n.getIsPlaceholder()&&!!((u=i.subRows)!=null&&u.length)}}};function AE(n,s,i){if(!(s!=null&&s.length)||!i)return n;const r=n.filter(d=>!s.includes(d.id));return i==="remove"?r:[...s.map(d=>n.find(h=>h.id===d)).filter(Boolean),...r]}const OE={getInitialState:n=>({columnOrder:[],...n}),getDefaultOptions:n=>({onColumnOrderChange:Sn("columnOrder",n)}),createColumn:(n,s)=>{n.getIndex=xe(i=>[Hr(s,i)],i=>i.findIndex(r=>r.id===n.id),Se(s.options,"debugColumns")),n.getIsFirstColumn=i=>{var r;return((r=Hr(s,i)[0])==null?void 0:r.id)===n.id},n.getIsLastColumn=i=>{var r;const u=Hr(s,i);return((r=u[u.length-1])==null?void 0:r.id)===n.id}},createTable:n=>{n.setColumnOrder=s=>n.options.onColumnOrderChange==null?void 0:n.options.onColumnOrderChange(s),n.resetColumnOrder=s=>{var i;n.setColumnOrder(s?[]:(i=n.initialState.columnOrder)!=null?i:[])},n._getOrderColumnsFn=xe(()=>[n.getState().columnOrder,n.getState().grouping,n.options.groupedColumnMode],(s,i,r)=>u=>{let d=[];if(!(s!=null&&s.length))d=u;else{const h=[...s],m=[...u];for(;m.length&&h.length;){const p=h.shift(),y=m.findIndex(x=>x.id===p);y>-1&&d.push(m.splice(y,1)[0])}d=[...d,...m]}return AE(d,i,r)},Se(n.options,"debugTable"))}},Zd=()=>({left:[],right:[]}),zE={getInitialState:n=>({columnPinning:Zd(),...n}),getDefaultOptions:n=>({onColumnPinningChange:Sn("columnPinning",n)}),createColumn:(n,s)=>{n.pin=i=>{const r=n.getLeafColumns().map(u=>u.id).filter(Boolean);s.setColumnPinning(u=>{var d,h;if(i==="right"){var m,p;return{left:((m=u==null?void 0:u.left)!=null?m:[]).filter(v=>!(r!=null&&r.includes(v))),right:[...((p=u==null?void 0:u.right)!=null?p:[]).filter(v=>!(r!=null&&r.includes(v))),...r]}}if(i==="left"){var y,x;return{left:[...((y=u==null?void 0:u.left)!=null?y:[]).filter(v=>!(r!=null&&r.includes(v))),...r],right:((x=u==null?void 0:u.right)!=null?x:[]).filter(v=>!(r!=null&&r.includes(v)))}}return{left:((d=u==null?void 0:u.left)!=null?d:[]).filter(v=>!(r!=null&&r.includes(v))),right:((h=u==null?void 0:u.right)!=null?h:[]).filter(v=>!(r!=null&&r.includes(v)))}})},n.getCanPin=()=>n.getLeafColumns().some(r=>{var u,d,h;return((u=r.columnDef.enablePinning)!=null?u:!0)&&((d=(h=s.options.enableColumnPinning)!=null?h:s.options.enablePinning)!=null?d:!0)}),n.getIsPinned=()=>{const i=n.getLeafColumns().map(m=>m.id),{left:r,right:u}=s.getState().columnPinning,d=i.some(m=>r==null?void 0:r.includes(m)),h=i.some(m=>u==null?void 0:u.includes(m));return d?"left":h?"right":!1},n.getPinnedIndex=()=>{var i,r;const u=n.getIsPinned();return u?(i=(r=s.getState().columnPinning)==null||(r=r[u])==null?void 0:r.indexOf(n.id))!=null?i:-1:0}},createRow:(n,s)=>{n.getCenterVisibleCells=xe(()=>[n._getAllVisibleCells(),s.getState().columnPinning.left,s.getState().columnPinning.right],(i,r,u)=>{const d=[...r??[],...u??[]];return i.filter(h=>!d.includes(h.column.id))},Se(s.options,"debugRows")),n.getLeftVisibleCells=xe(()=>[n._getAllVisibleCells(),s.getState().columnPinning.left],(i,r)=>(r??[]).map(d=>i.find(h=>h.column.id===d)).filter(Boolean).map(d=>({...d,position:"left"})),Se(s.options,"debugRows")),n.getRightVisibleCells=xe(()=>[n._getAllVisibleCells(),s.getState().columnPinning.right],(i,r)=>(r??[]).map(d=>i.find(h=>h.column.id===d)).filter(Boolean).map(d=>({...d,position:"right"})),Se(s.options,"debugRows"))},createTable:n=>{n.setColumnPinning=s=>n.options.onColumnPinningChange==null?void 0:n.options.onColumnPinningChange(s),n.resetColumnPinning=s=>{var i,r;return n.setColumnPinning(s?Zd():(i=(r=n.initialState)==null?void 0:r.columnPinning)!=null?i:Zd())},n.getIsSomeColumnsPinned=s=>{var i;const r=n.getState().columnPinning;if(!s){var u,d;return!!((u=r.left)!=null&&u.length||(d=r.right)!=null&&d.length)}return!!((i=r[s])!=null&&i.length)},n.getLeftLeafColumns=xe(()=>[n.getAllLeafColumns(),n.getState().columnPinning.left],(s,i)=>(i??[]).map(r=>s.find(u=>u.id===r)).filter(Boolean),Se(n.options,"debugColumns")),n.getRightLeafColumns=xe(()=>[n.getAllLeafColumns(),n.getState().columnPinning.right],(s,i)=>(i??[]).map(r=>s.find(u=>u.id===r)).filter(Boolean),Se(n.options,"debugColumns")),n.getCenterLeafColumns=xe(()=>[n.getAllLeafColumns(),n.getState().columnPinning.left,n.getState().columnPinning.right],(s,i,r)=>{const u=[...i??[],...r??[]];return s.filter(d=>!u.includes(d.id))},Se(n.options,"debugColumns"))}};function DE(n){return n||(typeof document<"u"?document:null)}const Mu={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Pd=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),HE={getDefaultColumnDef:()=>Mu,getInitialState:n=>({columnSizing:{},columnSizingInfo:Pd(),...n}),getDefaultOptions:n=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Sn("columnSizing",n),onColumnSizingInfoChange:Sn("columnSizingInfo",n)}),createColumn:(n,s)=>{n.getSize=()=>{var i,r,u;const d=s.getState().columnSizing[n.id];return Math.min(Math.max((i=n.columnDef.minSize)!=null?i:Mu.minSize,(r=d??n.columnDef.size)!=null?r:Mu.size),(u=n.columnDef.maxSize)!=null?u:Mu.maxSize)},n.getStart=xe(i=>[i,Hr(s,i),s.getState().columnSizing],(i,r)=>r.slice(0,n.getIndex(i)).reduce((u,d)=>u+d.getSize(),0),Se(s.options,"debugColumns")),n.getAfter=xe(i=>[i,Hr(s,i),s.getState().columnSizing],(i,r)=>r.slice(n.getIndex(i)+1).reduce((u,d)=>u+d.getSize(),0),Se(s.options,"debugColumns")),n.resetSize=()=>{s.setColumnSizing(i=>{let{[n.id]:r,...u}=i;return u})},n.getCanResize=()=>{var i,r;return((i=n.columnDef.enableResizing)!=null?i:!0)&&((r=s.options.enableColumnResizing)!=null?r:!0)},n.getIsResizing=()=>s.getState().columnSizingInfo.isResizingColumn===n.id},createHeader:(n,s)=>{n.getSize=()=>{let i=0;const r=u=>{if(u.subHeaders.length)u.subHeaders.forEach(r);else{var d;i+=(d=u.column.getSize())!=null?d:0}};return r(n),i},n.getStart=()=>{if(n.index>0){const i=n.headerGroup.headers[n.index-1];return i.getStart()+i.getSize()}return 0},n.getResizeHandler=i=>{const r=s.getColumn(n.column.id),u=r==null?void 0:r.getCanResize();return d=>{if(!r||!u||(d.persist==null||d.persist(),Jd(d)&&d.touches&&d.touches.length>1))return;const h=n.getSize(),m=n?n.getLeafHeaders().map(R=>[R.column.id,R.column.getSize()]):[[r.id,r.getSize()]],p=Jd(d)?Math.round(d.touches[0].clientX):d.clientX,y={},x=(R,j)=>{typeof j=="number"&&(s.setColumnSizingInfo(F=>{var T,H;const D=s.options.columnResizeDirection==="rtl"?-1:1,z=(j-((T=F==null?void 0:F.startOffset)!=null?T:0))*D,Y=Math.max(z/((H=F==null?void 0:F.startSize)!=null?H:0),-.999999);return F.columnSizingStart.forEach(te=>{let[k,ne]=te;y[k]=Math.round(Math.max(ne+ne*Y,0)*100)/100}),{...F,deltaOffset:z,deltaPercentage:Y}}),(s.options.columnResizeMode==="onChange"||R==="end")&&s.setColumnSizing(F=>({...F,...y})))},v=R=>x("move",R),b=R=>{x("end",R),s.setColumnSizingInfo(j=>({...j,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},w=DE(i),C={moveHandler:R=>v(R.clientX),upHandler:R=>{w==null||w.removeEventListener("mousemove",C.moveHandler),w==null||w.removeEventListener("mouseup",C.upHandler),b(R.clientX)}},N={moveHandler:R=>(R.cancelable&&(R.preventDefault(),R.stopPropagation()),v(R.touches[0].clientX),!1),upHandler:R=>{var j;w==null||w.removeEventListener("touchmove",N.moveHandler),w==null||w.removeEventListener("touchend",N.upHandler),R.cancelable&&(R.preventDefault(),R.stopPropagation()),b((j=R.touches[0])==null?void 0:j.clientX)}},M=LE()?{passive:!1}:!1;Jd(d)?(w==null||w.addEventListener("touchmove",N.moveHandler,M),w==null||w.addEventListener("touchend",N.upHandler,M)):(w==null||w.addEventListener("mousemove",C.moveHandler,M),w==null||w.addEventListener("mouseup",C.upHandler,M)),s.setColumnSizingInfo(R=>({...R,startOffset:p,startSize:h,deltaOffset:0,deltaPercentage:0,columnSizingStart:m,isResizingColumn:r.id}))}}},createTable:n=>{n.setColumnSizing=s=>n.options.onColumnSizingChange==null?void 0:n.options.onColumnSizingChange(s),n.setColumnSizingInfo=s=>n.options.onColumnSizingInfoChange==null?void 0:n.options.onColumnSizingInfoChange(s),n.resetColumnSizing=s=>{var i;n.setColumnSizing(s?{}:(i=n.initialState.columnSizing)!=null?i:{})},n.resetHeaderSizeInfo=s=>{var i;n.setColumnSizingInfo(s?Pd():(i=n.initialState.columnSizingInfo)!=null?i:Pd())},n.getTotalSize=()=>{var s,i;return(s=(i=n.getHeaderGroups()[0])==null?void 0:i.headers.reduce((r,u)=>r+u.getSize(),0))!=null?s:0},n.getLeftTotalSize=()=>{var s,i;return(s=(i=n.getLeftHeaderGroups()[0])==null?void 0:i.headers.reduce((r,u)=>r+u.getSize(),0))!=null?s:0},n.getCenterTotalSize=()=>{var s,i;return(s=(i=n.getCenterHeaderGroups()[0])==null?void 0:i.headers.reduce((r,u)=>r+u.getSize(),0))!=null?s:0},n.getRightTotalSize=()=>{var s,i;return(s=(i=n.getRightHeaderGroups()[0])==null?void 0:i.headers.reduce((r,u)=>r+u.getSize(),0))!=null?s:0}}};let Ru=null;function LE(){if(typeof Ru=="boolean")return Ru;let n=!1;try{const s={get passive(){return n=!0,!1}},i=()=>{};window.addEventListener("test",i,s),window.removeEventListener("test",i)}catch{n=!1}return Ru=n,Ru}function Jd(n){return n.type==="touchstart"}const UE={getInitialState:n=>({columnVisibility:{},...n}),getDefaultOptions:n=>({onColumnVisibilityChange:Sn("columnVisibility",n)}),createColumn:(n,s)=>{n.toggleVisibility=i=>{n.getCanHide()&&s.setColumnVisibility(r=>({...r,[n.id]:i??!n.getIsVisible()}))},n.getIsVisible=()=>{var i,r;const u=n.columns;return(i=u.length?u.some(d=>d.getIsVisible()):(r=s.getState().columnVisibility)==null?void 0:r[n.id])!=null?i:!0},n.getCanHide=()=>{var i,r;return((i=n.columnDef.enableHiding)!=null?i:!0)&&((r=s.options.enableHiding)!=null?r:!0)},n.getToggleVisibilityHandler=()=>i=>{n.toggleVisibility==null||n.toggleVisibility(i.target.checked)}},createRow:(n,s)=>{n._getAllVisibleCells=xe(()=>[n.getAllCells(),s.getState().columnVisibility],i=>i.filter(r=>r.column.getIsVisible()),Se(s.options,"debugRows")),n.getVisibleCells=xe(()=>[n.getLeftVisibleCells(),n.getCenterVisibleCells(),n.getRightVisibleCells()],(i,r,u)=>[...i,...r,...u],Se(s.options,"debugRows"))},createTable:n=>{const s=(i,r)=>xe(()=>[r(),r().filter(u=>u.getIsVisible()).map(u=>u.id).join("_")],u=>u.filter(d=>d.getIsVisible==null?void 0:d.getIsVisible()),Se(n.options,"debugColumns"));n.getVisibleFlatColumns=s("getVisibleFlatColumns",()=>n.getAllFlatColumns()),n.getVisibleLeafColumns=s("getVisibleLeafColumns",()=>n.getAllLeafColumns()),n.getLeftVisibleLeafColumns=s("getLeftVisibleLeafColumns",()=>n.getLeftLeafColumns()),n.getRightVisibleLeafColumns=s("getRightVisibleLeafColumns",()=>n.getRightLeafColumns()),n.getCenterVisibleLeafColumns=s("getCenterVisibleLeafColumns",()=>n.getCenterLeafColumns()),n.setColumnVisibility=i=>n.options.onColumnVisibilityChange==null?void 0:n.options.onColumnVisibilityChange(i),n.resetColumnVisibility=i=>{var r;n.setColumnVisibility(i?{}:(r=n.initialState.columnVisibility)!=null?r:{})},n.toggleAllColumnsVisible=i=>{var r;i=(r=i)!=null?r:!n.getIsAllColumnsVisible(),n.setColumnVisibility(n.getAllLeafColumns().reduce((u,d)=>({...u,[d.id]:i||!(d.getCanHide!=null&&d.getCanHide())}),{}))},n.getIsAllColumnsVisible=()=>!n.getAllLeafColumns().some(i=>!(i.getIsVisible!=null&&i.getIsVisible())),n.getIsSomeColumnsVisible=()=>n.getAllLeafColumns().some(i=>i.getIsVisible==null?void 0:i.getIsVisible()),n.getToggleAllColumnsVisibilityHandler=()=>i=>{var r;n.toggleAllColumnsVisible((r=i.target)==null?void 0:r.checked)}}};function Hr(n,s){return s?s==="center"?n.getCenterVisibleLeafColumns():s==="left"?n.getLeftVisibleLeafColumns():n.getRightVisibleLeafColumns():n.getVisibleLeafColumns()}const VE={createTable:n=>{n._getGlobalFacetedRowModel=n.options.getFacetedRowModel&&n.options.getFacetedRowModel(n,"__global__"),n.getGlobalFacetedRowModel=()=>n.options.manualFiltering||!n._getGlobalFacetedRowModel?n.getPreFilteredRowModel():n._getGlobalFacetedRowModel(),n._getGlobalFacetedUniqueValues=n.options.getFacetedUniqueValues&&n.options.getFacetedUniqueValues(n,"__global__"),n.getGlobalFacetedUniqueValues=()=>n._getGlobalFacetedUniqueValues?n._getGlobalFacetedUniqueValues():new Map,n._getGlobalFacetedMinMaxValues=n.options.getFacetedMinMaxValues&&n.options.getFacetedMinMaxValues(n,"__global__"),n.getGlobalFacetedMinMaxValues=()=>{if(n._getGlobalFacetedMinMaxValues)return n._getGlobalFacetedMinMaxValues()}}},$E={getInitialState:n=>({globalFilter:void 0,...n}),getDefaultOptions:n=>({onGlobalFilterChange:Sn("globalFilter",n),globalFilterFn:"auto",getColumnCanGlobalFilter:s=>{var i;const r=(i=n.getCoreRowModel().flatRows[0])==null||(i=i._getAllCellsByColumnId()[s.id])==null?void 0:i.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(n,s)=>{n.getCanGlobalFilter=()=>{var i,r,u,d;return((i=n.columnDef.enableGlobalFilter)!=null?i:!0)&&((r=s.options.enableGlobalFilter)!=null?r:!0)&&((u=s.options.enableFilters)!=null?u:!0)&&((d=s.options.getColumnCanGlobalFilter==null?void 0:s.options.getColumnCanGlobalFilter(n))!=null?d:!0)&&!!n.accessorFn}},createTable:n=>{n.getGlobalAutoFilterFn=()=>Tl.includesString,n.getGlobalFilterFn=()=>{var s,i;const{globalFilterFn:r}=n.options;return Ju(r)?r:r==="auto"?n.getGlobalAutoFilterFn():(s=(i=n.options.filterFns)==null?void 0:i[r])!=null?s:Tl[r]},n.setGlobalFilter=s=>{n.options.onGlobalFilterChange==null||n.options.onGlobalFilterChange(s)},n.resetGlobalFilter=s=>{n.setGlobalFilter(s?void 0:n.initialState.globalFilter)}}},FE={getInitialState:n=>({expanded:{},...n}),getDefaultOptions:n=>({onExpandedChange:Sn("expanded",n),paginateExpandedRows:!0}),createTable:n=>{let s=!1,i=!1;n._autoResetExpanded=()=>{var r,u;if(!s){n._queue(()=>{s=!0});return}if((r=(u=n.options.autoResetAll)!=null?u:n.options.autoResetExpanded)!=null?r:!n.options.manualExpanding){if(i)return;i=!0,n._queue(()=>{n.resetExpanded(),i=!1})}},n.setExpanded=r=>n.options.onExpandedChange==null?void 0:n.options.onExpandedChange(r),n.toggleAllRowsExpanded=r=>{r??!n.getIsAllRowsExpanded()?n.setExpanded(!0):n.setExpanded({})},n.resetExpanded=r=>{var u,d;n.setExpanded(r?{}:(u=(d=n.initialState)==null?void 0:d.expanded)!=null?u:{})},n.getCanSomeRowsExpand=()=>n.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),n.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),n.toggleAllRowsExpanded()},n.getIsSomeRowsExpanded=()=>{const r=n.getState().expanded;return r===!0||Object.values(r).some(Boolean)},n.getIsAllRowsExpanded=()=>{const r=n.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||n.getRowModel().flatRows.some(u=>!u.getIsExpanded()))},n.getExpandedDepth=()=>{let r=0;return(n.getState().expanded===!0?Object.keys(n.getRowModel().rowsById):Object.keys(n.getState().expanded)).forEach(d=>{const h=d.split(".");r=Math.max(r,h.length)}),r},n.getPreExpandedRowModel=()=>n.getSortedRowModel(),n.getExpandedRowModel=()=>(!n._getExpandedRowModel&&n.options.getExpandedRowModel&&(n._getExpandedRowModel=n.options.getExpandedRowModel(n)),n.options.manualExpanding||!n._getExpandedRowModel?n.getPreExpandedRowModel():n._getExpandedRowModel())},createRow:(n,s)=>{n.toggleExpanded=i=>{s.setExpanded(r=>{var u;const d=r===!0?!0:!!(r!=null&&r[n.id]);let h={};if(r===!0?Object.keys(s.getRowModel().rowsById).forEach(m=>{h[m]=!0}):h=r,i=(u=i)!=null?u:!d,!d&&i)return{...h,[n.id]:!0};if(d&&!i){const{[n.id]:m,...p}=h;return p}return r})},n.getIsExpanded=()=>{var i;const r=s.getState().expanded;return!!((i=s.options.getIsRowExpanded==null?void 0:s.options.getIsRowExpanded(n))!=null?i:r===!0||r!=null&&r[n.id])},n.getCanExpand=()=>{var i,r,u;return(i=s.options.getRowCanExpand==null?void 0:s.options.getRowCanExpand(n))!=null?i:((r=s.options.enableExpanding)!=null?r:!0)&&!!((u=n.subRows)!=null&&u.length)},n.getIsAllParentsExpanded=()=>{let i=!0,r=n;for(;i&&r.parentId;)r=s.getRow(r.parentId,!0),i=r.getIsExpanded();return i},n.getToggleExpandedHandler=()=>{const i=n.getCanExpand();return()=>{i&&n.toggleExpanded()}}}},Bh=0,kh=10,Wd=()=>({pageIndex:Bh,pageSize:kh}),BE={getInitialState:n=>({...n,pagination:{...Wd(),...n==null?void 0:n.pagination}}),getDefaultOptions:n=>({onPaginationChange:Sn("pagination",n)}),createTable:n=>{let s=!1,i=!1;n._autoResetPageIndex=()=>{var r,u;if(!s){n._queue(()=>{s=!0});return}if((r=(u=n.options.autoResetAll)!=null?u:n.options.autoResetPageIndex)!=null?r:!n.options.manualPagination){if(i)return;i=!0,n._queue(()=>{n.resetPageIndex(),i=!1})}},n.setPagination=r=>{const u=d=>ba(r,d);return n.options.onPaginationChange==null?void 0:n.options.onPaginationChange(u)},n.resetPagination=r=>{var u;n.setPagination(r?Wd():(u=n.initialState.pagination)!=null?u:Wd())},n.setPageIndex=r=>{n.setPagination(u=>{let d=ba(r,u.pageIndex);const h=typeof n.options.pageCount>"u"||n.options.pageCount===-1?Number.MAX_SAFE_INTEGER:n.options.pageCount-1;return d=Math.max(0,Math.min(d,h)),{...u,pageIndex:d}})},n.resetPageIndex=r=>{var u,d;n.setPageIndex(r?Bh:(u=(d=n.initialState)==null||(d=d.pagination)==null?void 0:d.pageIndex)!=null?u:Bh)},n.resetPageSize=r=>{var u,d;n.setPageSize(r?kh:(u=(d=n.initialState)==null||(d=d.pagination)==null?void 0:d.pageSize)!=null?u:kh)},n.setPageSize=r=>{n.setPagination(u=>{const d=Math.max(1,ba(r,u.pageSize)),h=u.pageSize*u.pageIndex,m=Math.floor(h/d);return{...u,pageIndex:m,pageSize:d}})},n.setPageCount=r=>n.setPagination(u=>{var d;let h=ba(r,(d=n.options.pageCount)!=null?d:-1);return typeof h=="number"&&(h=Math.max(-1,h)),{...u,pageCount:h}}),n.getPageOptions=xe(()=>[n.getPageCount()],r=>{let u=[];return r&&r>0&&(u=[...new Array(r)].fill(null).map((d,h)=>h)),u},Se(n.options,"debugTable")),n.getCanPreviousPage=()=>n.getState().pagination.pageIndex>0,n.getCanNextPage=()=>{const{pageIndex:r}=n.getState().pagination,u=n.getPageCount();return u===-1?!0:u===0?!1:r<u-1},n.previousPage=()=>n.setPageIndex(r=>r-1),n.nextPage=()=>n.setPageIndex(r=>r+1),n.firstPage=()=>n.setPageIndex(0),n.lastPage=()=>n.setPageIndex(n.getPageCount()-1),n.getPrePaginationRowModel=()=>n.getExpandedRowModel(),n.getPaginationRowModel=()=>(!n._getPaginationRowModel&&n.options.getPaginationRowModel&&(n._getPaginationRowModel=n.options.getPaginationRowModel(n)),n.options.manualPagination||!n._getPaginationRowModel?n.getPrePaginationRowModel():n._getPaginationRowModel()),n.getPageCount=()=>{var r;return(r=n.options.pageCount)!=null?r:Math.ceil(n.getRowCount()/n.getState().pagination.pageSize)},n.getRowCount=()=>{var r;return(r=n.options.rowCount)!=null?r:n.getPrePaginationRowModel().rows.length}}},eh=()=>({top:[],bottom:[]}),kE={getInitialState:n=>({rowPinning:eh(),...n}),getDefaultOptions:n=>({onRowPinningChange:Sn("rowPinning",n)}),createRow:(n,s)=>{n.pin=(i,r,u)=>{const d=r?n.getLeafRows().map(p=>{let{id:y}=p;return y}):[],h=u?n.getParentRows().map(p=>{let{id:y}=p;return y}):[],m=new Set([...h,n.id,...d]);s.setRowPinning(p=>{var y,x;if(i==="bottom"){var v,b;return{top:((v=p==null?void 0:p.top)!=null?v:[]).filter(N=>!(m!=null&&m.has(N))),bottom:[...((b=p==null?void 0:p.bottom)!=null?b:[]).filter(N=>!(m!=null&&m.has(N))),...Array.from(m)]}}if(i==="top"){var w,C;return{top:[...((w=p==null?void 0:p.top)!=null?w:[]).filter(N=>!(m!=null&&m.has(N))),...Array.from(m)],bottom:((C=p==null?void 0:p.bottom)!=null?C:[]).filter(N=>!(m!=null&&m.has(N)))}}return{top:((y=p==null?void 0:p.top)!=null?y:[]).filter(N=>!(m!=null&&m.has(N))),bottom:((x=p==null?void 0:p.bottom)!=null?x:[]).filter(N=>!(m!=null&&m.has(N)))}})},n.getCanPin=()=>{var i;const{enableRowPinning:r,enablePinning:u}=s.options;return typeof r=="function"?r(n):(i=r??u)!=null?i:!0},n.getIsPinned=()=>{const i=[n.id],{top:r,bottom:u}=s.getState().rowPinning,d=i.some(m=>r==null?void 0:r.includes(m)),h=i.some(m=>u==null?void 0:u.includes(m));return d?"top":h?"bottom":!1},n.getPinnedIndex=()=>{var i,r;const u=n.getIsPinned();if(!u)return-1;const d=(i=u==="top"?s.getTopRows():s.getBottomRows())==null?void 0:i.map(h=>{let{id:m}=h;return m});return(r=d==null?void 0:d.indexOf(n.id))!=null?r:-1}},createTable:n=>{n.setRowPinning=s=>n.options.onRowPinningChange==null?void 0:n.options.onRowPinningChange(s),n.resetRowPinning=s=>{var i,r;return n.setRowPinning(s?eh():(i=(r=n.initialState)==null?void 0:r.rowPinning)!=null?i:eh())},n.getIsSomeRowsPinned=s=>{var i;const r=n.getState().rowPinning;if(!s){var u,d;return!!((u=r.top)!=null&&u.length||(d=r.bottom)!=null&&d.length)}return!!((i=r[s])!=null&&i.length)},n._getPinnedRows=(s,i,r)=>{var u;return((u=n.options.keepPinnedRows)==null||u?(i??[]).map(h=>{const m=n.getRow(h,!0);return m.getIsAllParentsExpanded()?m:null}):(i??[]).map(h=>s.find(m=>m.id===h))).filter(Boolean).map(h=>({...h,position:r}))},n.getTopRows=xe(()=>[n.getRowModel().rows,n.getState().rowPinning.top],(s,i)=>n._getPinnedRows(s,i,"top"),Se(n.options,"debugRows")),n.getBottomRows=xe(()=>[n.getRowModel().rows,n.getState().rowPinning.bottom],(s,i)=>n._getPinnedRows(s,i,"bottom"),Se(n.options,"debugRows")),n.getCenterRows=xe(()=>[n.getRowModel().rows,n.getState().rowPinning.top,n.getState().rowPinning.bottom],(s,i,r)=>{const u=new Set([...i??[],...r??[]]);return s.filter(d=>!u.has(d.id))},Se(n.options,"debugRows"))}},GE={getInitialState:n=>({rowSelection:{},...n}),getDefaultOptions:n=>({onRowSelectionChange:Sn("rowSelection",n),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:n=>{n.setRowSelection=s=>n.options.onRowSelectionChange==null?void 0:n.options.onRowSelectionChange(s),n.resetRowSelection=s=>{var i;return n.setRowSelection(s?{}:(i=n.initialState.rowSelection)!=null?i:{})},n.toggleAllRowsSelected=s=>{n.setRowSelection(i=>{s=typeof s<"u"?s:!n.getIsAllRowsSelected();const r={...i},u=n.getPreGroupedRowModel().flatRows;return s?u.forEach(d=>{d.getCanSelect()&&(r[d.id]=!0)}):u.forEach(d=>{delete r[d.id]}),r})},n.toggleAllPageRowsSelected=s=>n.setRowSelection(i=>{const r=typeof s<"u"?s:!n.getIsAllPageRowsSelected(),u={...i};return n.getRowModel().rows.forEach(d=>{Gh(u,d.id,r,!0,n)}),u}),n.getPreSelectedRowModel=()=>n.getCoreRowModel(),n.getSelectedRowModel=xe(()=>[n.getState().rowSelection,n.getCoreRowModel()],(s,i)=>Object.keys(s).length?th(n,i):{rows:[],flatRows:[],rowsById:{}},Se(n.options,"debugTable")),n.getFilteredSelectedRowModel=xe(()=>[n.getState().rowSelection,n.getFilteredRowModel()],(s,i)=>Object.keys(s).length?th(n,i):{rows:[],flatRows:[],rowsById:{}},Se(n.options,"debugTable")),n.getGroupedSelectedRowModel=xe(()=>[n.getState().rowSelection,n.getSortedRowModel()],(s,i)=>Object.keys(s).length?th(n,i):{rows:[],flatRows:[],rowsById:{}},Se(n.options,"debugTable")),n.getIsAllRowsSelected=()=>{const s=n.getFilteredRowModel().flatRows,{rowSelection:i}=n.getState();let r=!!(s.length&&Object.keys(i).length);return r&&s.some(u=>u.getCanSelect()&&!i[u.id])&&(r=!1),r},n.getIsAllPageRowsSelected=()=>{const s=n.getPaginationRowModel().flatRows.filter(u=>u.getCanSelect()),{rowSelection:i}=n.getState();let r=!!s.length;return r&&s.some(u=>!i[u.id])&&(r=!1),r},n.getIsSomeRowsSelected=()=>{var s;const i=Object.keys((s=n.getState().rowSelection)!=null?s:{}).length;return i>0&&i<n.getFilteredRowModel().flatRows.length},n.getIsSomePageRowsSelected=()=>{const s=n.getPaginationRowModel().flatRows;return n.getIsAllPageRowsSelected()?!1:s.filter(i=>i.getCanSelect()).some(i=>i.getIsSelected()||i.getIsSomeSelected())},n.getToggleAllRowsSelectedHandler=()=>s=>{n.toggleAllRowsSelected(s.target.checked)},n.getToggleAllPageRowsSelectedHandler=()=>s=>{n.toggleAllPageRowsSelected(s.target.checked)}},createRow:(n,s)=>{n.toggleSelected=(i,r)=>{const u=n.getIsSelected();s.setRowSelection(d=>{var h;if(i=typeof i<"u"?i:!u,n.getCanSelect()&&u===i)return d;const m={...d};return Gh(m,n.id,i,(h=r==null?void 0:r.selectChildren)!=null?h:!0,s),m})},n.getIsSelected=()=>{const{rowSelection:i}=s.getState();return rm(n,i)},n.getIsSomeSelected=()=>{const{rowSelection:i}=s.getState();return qh(n,i)==="some"},n.getIsAllSubRowsSelected=()=>{const{rowSelection:i}=s.getState();return qh(n,i)==="all"},n.getCanSelect=()=>{var i;return typeof s.options.enableRowSelection=="function"?s.options.enableRowSelection(n):(i=s.options.enableRowSelection)!=null?i:!0},n.getCanSelectSubRows=()=>{var i;return typeof s.options.enableSubRowSelection=="function"?s.options.enableSubRowSelection(n):(i=s.options.enableSubRowSelection)!=null?i:!0},n.getCanMultiSelect=()=>{var i;return typeof s.options.enableMultiRowSelection=="function"?s.options.enableMultiRowSelection(n):(i=s.options.enableMultiRowSelection)!=null?i:!0},n.getToggleSelectedHandler=()=>{const i=n.getCanSelect();return r=>{var u;i&&n.toggleSelected((u=r.target)==null?void 0:u.checked)}}}},Gh=(n,s,i,r,u)=>{var d;const h=u.getRow(s,!0);i?(h.getCanMultiSelect()||Object.keys(n).forEach(m=>delete n[m]),h.getCanSelect()&&(n[s]=!0)):delete n[s],r&&(d=h.subRows)!=null&&d.length&&h.getCanSelectSubRows()&&h.subRows.forEach(m=>Gh(n,m.id,i,r,u))};function th(n,s){const i=n.getState().rowSelection,r=[],u={},d=function(h,m){return h.map(p=>{var y;const x=rm(p,i);if(x&&(r.push(p),u[p.id]=p),(y=p.subRows)!=null&&y.length&&(p={...p,subRows:d(p.subRows)}),x)return p}).filter(Boolean)};return{rows:d(s.rows),flatRows:r,rowsById:u}}function rm(n,s){var i;return(i=s[n.id])!=null?i:!1}function qh(n,s,i){var r;if(!((r=n.subRows)!=null&&r.length))return!1;let u=!0,d=!1;return n.subRows.forEach(h=>{if(!(d&&!u)&&(h.getCanSelect()&&(rm(h,s)?d=!0:u=!1),h.subRows&&h.subRows.length)){const m=qh(h,s);m==="all"?d=!0:(m==="some"&&(d=!0),u=!1)}}),u?"all":d?"some":!1}const Qh=/([0-9]+)/gm,qE=(n,s,i)=>sx(wa(n.getValue(i)).toLowerCase(),wa(s.getValue(i)).toLowerCase()),QE=(n,s,i)=>sx(wa(n.getValue(i)),wa(s.getValue(i))),YE=(n,s,i)=>om(wa(n.getValue(i)).toLowerCase(),wa(s.getValue(i)).toLowerCase()),IE=(n,s,i)=>om(wa(n.getValue(i)),wa(s.getValue(i))),XE=(n,s,i)=>{const r=n.getValue(i),u=s.getValue(i);return r>u?1:r<u?-1:0},KE=(n,s,i)=>om(n.getValue(i),s.getValue(i));function om(n,s){return n===s?0:n>s?1:-1}function wa(n){return typeof n=="number"?isNaN(n)||n===1/0||n===-1/0?"":String(n):typeof n=="string"?n:""}function sx(n,s){const i=n.split(Qh).filter(Boolean),r=s.split(Qh).filter(Boolean);for(;i.length&&r.length;){const u=i.shift(),d=r.shift(),h=parseInt(u,10),m=parseInt(d,10),p=[h,m].sort();if(isNaN(p[0])){if(u>d)return 1;if(d>u)return-1;continue}if(isNaN(p[1]))return isNaN(h)?-1:1;if(h>m)return 1;if(m>h)return-1}return i.length-r.length}const Er={alphanumeric:qE,alphanumericCaseSensitive:QE,text:YE,textCaseSensitive:IE,datetime:XE,basic:KE},ZE={getInitialState:n=>({sorting:[],...n}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:n=>({onSortingChange:Sn("sorting",n),isMultiSortEvent:s=>s.shiftKey}),createColumn:(n,s)=>{n.getAutoSortingFn=()=>{const i=s.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const u of i){const d=u==null?void 0:u.getValue(n.id);if(Object.prototype.toString.call(d)==="[object Date]")return Er.datetime;if(typeof d=="string"&&(r=!0,d.split(Qh).length>1))return Er.alphanumeric}return r?Er.text:Er.basic},n.getAutoSortDir=()=>{const i=s.getFilteredRowModel().flatRows[0];return typeof(i==null?void 0:i.getValue(n.id))=="string"?"asc":"desc"},n.getSortingFn=()=>{var i,r;if(!n)throw new Error;return Ju(n.columnDef.sortingFn)?n.columnDef.sortingFn:n.columnDef.sortingFn==="auto"?n.getAutoSortingFn():(i=(r=s.options.sortingFns)==null?void 0:r[n.columnDef.sortingFn])!=null?i:Er[n.columnDef.sortingFn]},n.toggleSorting=(i,r)=>{const u=n.getNextSortingOrder(),d=typeof i<"u"&&i!==null;s.setSorting(h=>{const m=h==null?void 0:h.find(w=>w.id===n.id),p=h==null?void 0:h.findIndex(w=>w.id===n.id);let y=[],x,v=d?i:u==="desc";if(h!=null&&h.length&&n.getCanMultiSort()&&r?m?x="toggle":x="add":h!=null&&h.length&&p!==h.length-1?x="replace":m?x="toggle":x="replace",x==="toggle"&&(d||u||(x="remove")),x==="add"){var b;y=[...h,{id:n.id,desc:v}],y.splice(0,y.length-((b=s.options.maxMultiSortColCount)!=null?b:Number.MAX_SAFE_INTEGER))}else x==="toggle"?y=h.map(w=>w.id===n.id?{...w,desc:v}:w):x==="remove"?y=h.filter(w=>w.id!==n.id):y=[{id:n.id,desc:v}];return y})},n.getFirstSortDir=()=>{var i,r;return((i=(r=n.columnDef.sortDescFirst)!=null?r:s.options.sortDescFirst)!=null?i:n.getAutoSortDir()==="desc")?"desc":"asc"},n.getNextSortingOrder=i=>{var r,u;const d=n.getFirstSortDir(),h=n.getIsSorted();return h?h!==d&&((r=s.options.enableSortingRemoval)==null||r)&&(!(i&&(u=s.options.enableMultiRemove)!=null)||u)?!1:h==="desc"?"asc":"desc":d},n.getCanSort=()=>{var i,r;return((i=n.columnDef.enableSorting)!=null?i:!0)&&((r=s.options.enableSorting)!=null?r:!0)&&!!n.accessorFn},n.getCanMultiSort=()=>{var i,r;return(i=(r=n.columnDef.enableMultiSort)!=null?r:s.options.enableMultiSort)!=null?i:!!n.accessorFn},n.getIsSorted=()=>{var i;const r=(i=s.getState().sorting)==null?void 0:i.find(u=>u.id===n.id);return r?r.desc?"desc":"asc":!1},n.getSortIndex=()=>{var i,r;return(i=(r=s.getState().sorting)==null?void 0:r.findIndex(u=>u.id===n.id))!=null?i:-1},n.clearSorting=()=>{s.setSorting(i=>i!=null&&i.length?i.filter(r=>r.id!==n.id):[])},n.getToggleSortingHandler=()=>{const i=n.getCanSort();return r=>{i&&(r.persist==null||r.persist(),n.toggleSorting==null||n.toggleSorting(void 0,n.getCanMultiSort()?s.options.isMultiSortEvent==null?void 0:s.options.isMultiSortEvent(r):!1))}}},createTable:n=>{n.setSorting=s=>n.options.onSortingChange==null?void 0:n.options.onSortingChange(s),n.resetSorting=s=>{var i,r;n.setSorting(s?[]:(i=(r=n.initialState)==null?void 0:r.sorting)!=null?i:[])},n.getPreSortedRowModel=()=>n.getGroupedRowModel(),n.getSortedRowModel=()=>(!n._getSortedRowModel&&n.options.getSortedRowModel&&(n._getSortedRowModel=n.options.getSortedRowModel(n)),n.options.manualSorting||!n._getSortedRowModel?n.getPreSortedRowModel():n._getSortedRowModel())}},PE=[vE,UE,OE,zE,xE,SE,VE,$E,ZE,TE,FE,BE,kE,GE,HE];function JE(n){var s,i;const r=[...PE,...(s=n._features)!=null?s:[]];let u={_features:r};const d=u._features.reduce((b,w)=>Object.assign(b,w.getDefaultOptions==null?void 0:w.getDefaultOptions(u)),{}),h=b=>u.options.mergeOptions?u.options.mergeOptions(d,b):{...d,...b};let p={...{},...(i=n.initialState)!=null?i:{}};u._features.forEach(b=>{var w;p=(w=b.getInitialState==null?void 0:b.getInitialState(p))!=null?w:p});const y=[];let x=!1;const v={_features:r,options:{...d,...n},initialState:p,_queue:b=>{y.push(b),x||(x=!0,Promise.resolve().then(()=>{for(;y.length;)y.shift()();x=!1}).catch(w=>setTimeout(()=>{throw w})))},reset:()=>{u.setState(u.initialState)},setOptions:b=>{const w=ba(b,u.options);u.options=h(w)},getState:()=>u.options.state,setState:b=>{u.options.onStateChange==null||u.options.onStateChange(b)},_getRowId:(b,w,C)=>{var N;return(N=u.options.getRowId==null?void 0:u.options.getRowId(b,w,C))!=null?N:`${C?[C.id,w].join("."):w}`},getCoreRowModel:()=>(u._getCoreRowModel||(u._getCoreRowModel=u.options.getCoreRowModel(u)),u._getCoreRowModel()),getRowModel:()=>u.getPaginationRowModel(),getRow:(b,w)=>{let C=(w?u.getPrePaginationRowModel():u.getRowModel()).rowsById[b];if(!C&&(C=u.getCoreRowModel().rowsById[b],!C))throw new Error;return C},_getDefaultColumnDef:xe(()=>[u.options.defaultColumn],b=>{var w;return b=(w=b)!=null?w:{},{header:C=>{const N=C.header.column.columnDef;return N.accessorKey?N.accessorKey:N.accessorFn?N.id:null},cell:C=>{var N,M;return(N=(M=C.renderValue())==null||M.toString==null?void 0:M.toString())!=null?N:null},...u._features.reduce((C,N)=>Object.assign(C,N.getDefaultColumnDef==null?void 0:N.getDefaultColumnDef()),{}),...b}},Se(n,"debugColumns")),_getColumnDefs:()=>u.options.columns,getAllColumns:xe(()=>[u._getColumnDefs()],b=>{const w=function(C,N,M){return M===void 0&&(M=0),C.map(R=>{const j=pE(u,R,M,N),F=R;return j.columns=F.columns?w(F.columns,j,M+1):[],j})};return w(b)},Se(n,"debugColumns")),getAllFlatColumns:xe(()=>[u.getAllColumns()],b=>b.flatMap(w=>w.getFlatColumns()),Se(n,"debugColumns")),_getAllFlatColumnsById:xe(()=>[u.getAllFlatColumns()],b=>b.reduce((w,C)=>(w[C.id]=C,w),{}),Se(n,"debugColumns")),getAllLeafColumns:xe(()=>[u.getAllColumns(),u._getOrderColumnsFn()],(b,w)=>{let C=b.flatMap(N=>N.getLeafColumns());return w(C)},Se(n,"debugColumns")),getColumn:b=>u._getAllFlatColumnsById()[b]};Object.assign(u,v);for(let b=0;b<u._features.length;b++){const w=u._features[b];w==null||w.createTable==null||w.createTable(u)}return u}function ix(){return n=>xe(()=>[n.options.data],s=>{const i={rows:[],flatRows:[],rowsById:{}},r=function(u,d,h){d===void 0&&(d=0);const m=[];for(let y=0;y<u.length;y++){const x=yE(n,n._getRowId(u[y],y,h),u[y],y,d,void 0,h==null?void 0:h.id);if(i.flatRows.push(x),i.rowsById[x.id]=x,m.push(x),n.options.getSubRows){var p;x.originalSubRows=n.options.getSubRows(u[y],y),(p=x.originalSubRows)!=null&&p.length&&(x.subRows=r(x.originalSubRows,d+1,x))}}return m};return i.rows=r(s),i},Se(n.options,"debugTable","getRowModel",()=>n._autoResetPageIndex()))}function rx(){return n=>xe(()=>[n.getState().expanded,n.getPreExpandedRowModel(),n.options.paginateExpandedRows],(s,i,r)=>!i.rows.length||s!==!0&&!Object.keys(s??{}).length||!r?i:WE(i),Se(n.options,"debugTable"))}function WE(n){const s=[],i=r=>{var u;s.push(r),(u=r.subRows)!=null&&u.length&&r.getIsExpanded()&&r.subRows.forEach(i)};return n.rows.forEach(i),{rows:s,flatRows:n.flatRows,rowsById:n.rowsById}}function eN(){return n=>xe(()=>[n.getState().sorting,n.getPreSortedRowModel()],(s,i)=>{if(!i.rows.length||!(s!=null&&s.length))return i;const r=n.getState().sorting,u=[],d=r.filter(p=>{var y;return(y=n.getColumn(p.id))==null?void 0:y.getCanSort()}),h={};d.forEach(p=>{const y=n.getColumn(p.id);y&&(h[p.id]={sortUndefined:y.columnDef.sortUndefined,invertSorting:y.columnDef.invertSorting,sortingFn:y.getSortingFn()})});const m=p=>{const y=p.map(x=>({...x}));return y.sort((x,v)=>{for(let w=0;w<d.length;w+=1){var b;const C=d[w],N=h[C.id],M=N.sortUndefined,R=(b=C==null?void 0:C.desc)!=null?b:!1;let j=0;if(M){const F=x.getValue(C.id),T=v.getValue(C.id),H=F===void 0,D=T===void 0;if(H||D){if(M==="first")return H?-1:1;if(M==="last")return H?1:-1;j=H&&D?0:H?M:-M}}if(j===0&&(j=N.sortingFn(x,v,C.id)),j!==0)return R&&(j*=-1),N.invertSorting&&(j*=-1),j}return x.index-v.index}),y.forEach(x=>{var v;u.push(x),(v=x.subRows)!=null&&v.length&&(x.subRows=m(x.subRows))}),y};return{rows:m(i.rows),flatRows:u,rowsById:i.rowsById}},Se(n.options,"debugTable","getSortedRowModel",()=>n._autoResetPageIndex()))}/**
|
|
279
|
+
color: hsl(${Math.max(0,Math.min(120-120*S,120))}deg 100% 31%);`,i==null?void 0:i.key)}return u}}function Ne(n,a,i,o){return{debug:()=>{var u;return(u=n==null?void 0:n.debugAll)!=null?u:n[a]},key:!1,onChange:o}}function oE(n,a,i,o){const u=()=>{var h;return(h=d.getValue())!=null?h:n.options.renderFallbackValue},d={id:`${a.id}_${i.id}`,row:a,column:i,getValue:()=>a.getValue(o),renderValue:u,getContext:we(()=>[n,i,a,d],(h,m,g,y)=>({table:h,column:m,row:g,cell:y,getValue:y.getValue,renderValue:y.renderValue}),Ne(n.options,"debugCells"))};return n._features.forEach(h=>{h.createCell==null||h.createCell(d,i,a,n)},{}),d}function rE(n,a,i,o){var u,d;const m={...n._getDefaultColumnDef(),...a},g=m.accessorKey;let y=(u=(d=m.id)!=null?d:g?typeof String.prototype.replaceAll=="function"?g.replaceAll(".","_"):g.replace(/\./g,"_"):void 0)!=null?u:typeof m.header=="string"?m.header:void 0,x;if(m.accessorFn?x=m.accessorFn:g&&(g.includes(".")?x=S=>{let w=S;for(const N of g.split(".")){var j;w=(j=w)==null?void 0:j[N]}return w}:x=S=>S[m.accessorKey]),!y)throw new Error;let v={id:`${String(y)}`,accessorFn:x,parent:o,depth:i,columnDef:m,columns:[],getFlatColumns:we(()=>[!0],()=>{var S;return[v,...(S=v.columns)==null?void 0:S.flatMap(w=>w.getFlatColumns())]},Ne(n.options,"debugColumns")),getLeafColumns:we(()=>[n._getOrderColumnsFn()],S=>{var w;if((w=v.columns)!=null&&w.length){let j=v.columns.flatMap(N=>N.getLeafColumns());return S(j)}return[v]},Ne(n.options,"debugColumns"))};for(const S of n._features)S.createColumn==null||S.createColumn(v,n);return v}const Xt="debugHeaders";function Zy(n,a,i){var o;let d={id:(o=i.id)!=null?o:a.id,column:a,index:i.index,isPlaceholder:!!i.isPlaceholder,placeholderId:i.placeholderId,depth:i.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const h=[],m=g=>{g.subHeaders&&g.subHeaders.length&&g.subHeaders.map(m),h.push(g)};return m(d),h},getContext:()=>({table:n,header:d,column:a})};return n._features.forEach(h=>{h.createHeader==null||h.createHeader(d,n)}),d}const uE={createTable:n=>{n.getHeaderGroups=we(()=>[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.left,n.getState().columnPinning.right],(a,i,o,u)=>{var d,h;const m=(d=o==null?void 0:o.map(v=>i.find(S=>S.id===v)).filter(Boolean))!=null?d:[],g=(h=u==null?void 0:u.map(v=>i.find(S=>S.id===v)).filter(Boolean))!=null?h:[],y=i.filter(v=>!(o!=null&&o.includes(v.id))&&!(u!=null&&u.includes(v.id)));return Qu(a,[...m,...y,...g],n)},Ne(n.options,Xt)),n.getCenterHeaderGroups=we(()=>[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.left,n.getState().columnPinning.right],(a,i,o,u)=>(i=i.filter(d=>!(o!=null&&o.includes(d.id))&&!(u!=null&&u.includes(d.id))),Qu(a,i,n,"center")),Ne(n.options,Xt)),n.getLeftHeaderGroups=we(()=>[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.left],(a,i,o)=>{var u;const d=(u=o==null?void 0:o.map(h=>i.find(m=>m.id===h)).filter(Boolean))!=null?u:[];return Qu(a,d,n,"left")},Ne(n.options,Xt)),n.getRightHeaderGroups=we(()=>[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.right],(a,i,o)=>{var u;const d=(u=o==null?void 0:o.map(h=>i.find(m=>m.id===h)).filter(Boolean))!=null?u:[];return Qu(a,d,n,"right")},Ne(n.options,Xt)),n.getFooterGroups=we(()=>[n.getHeaderGroups()],a=>[...a].reverse(),Ne(n.options,Xt)),n.getLeftFooterGroups=we(()=>[n.getLeftHeaderGroups()],a=>[...a].reverse(),Ne(n.options,Xt)),n.getCenterFooterGroups=we(()=>[n.getCenterHeaderGroups()],a=>[...a].reverse(),Ne(n.options,Xt)),n.getRightFooterGroups=we(()=>[n.getRightHeaderGroups()],a=>[...a].reverse(),Ne(n.options,Xt)),n.getFlatHeaders=we(()=>[n.getHeaderGroups()],a=>a.map(i=>i.headers).flat(),Ne(n.options,Xt)),n.getLeftFlatHeaders=we(()=>[n.getLeftHeaderGroups()],a=>a.map(i=>i.headers).flat(),Ne(n.options,Xt)),n.getCenterFlatHeaders=we(()=>[n.getCenterHeaderGroups()],a=>a.map(i=>i.headers).flat(),Ne(n.options,Xt)),n.getRightFlatHeaders=we(()=>[n.getRightHeaderGroups()],a=>a.map(i=>i.headers).flat(),Ne(n.options,Xt)),n.getCenterLeafHeaders=we(()=>[n.getCenterFlatHeaders()],a=>a.filter(i=>{var o;return!((o=i.subHeaders)!=null&&o.length)}),Ne(n.options,Xt)),n.getLeftLeafHeaders=we(()=>[n.getLeftFlatHeaders()],a=>a.filter(i=>{var o;return!((o=i.subHeaders)!=null&&o.length)}),Ne(n.options,Xt)),n.getRightLeafHeaders=we(()=>[n.getRightFlatHeaders()],a=>a.filter(i=>{var o;return!((o=i.subHeaders)!=null&&o.length)}),Ne(n.options,Xt)),n.getLeafHeaders=we(()=>[n.getLeftHeaderGroups(),n.getCenterHeaderGroups(),n.getRightHeaderGroups()],(a,i,o)=>{var u,d,h,m,g,y;return[...(u=(d=a[0])==null?void 0:d.headers)!=null?u:[],...(h=(m=i[0])==null?void 0:m.headers)!=null?h:[],...(g=(y=o[0])==null?void 0:y.headers)!=null?g:[]].map(x=>x.getLeafHeaders()).flat()},Ne(n.options,Xt))}};function Qu(n,a,i,o){var u,d;let h=0;const m=function(S,w){w===void 0&&(w=1),h=Math.max(h,w),S.filter(j=>j.getIsVisible()).forEach(j=>{var N;(N=j.columns)!=null&&N.length&&m(j.columns,w+1)},0)};m(n);let g=[];const y=(S,w)=>{const j={depth:w,id:[o,`${w}`].filter(Boolean).join("_"),headers:[]},N=[];S.forEach(M=>{const A=[...N].reverse()[0],C=M.column.depth===j.depth;let D,O=!1;if(C&&M.column.parent?D=M.column.parent:(D=M.column,O=!0),A&&(A==null?void 0:A.column)===D)A.subHeaders.push(M);else{const z=Zy(i,D,{id:[o,w,D.id,M==null?void 0:M.id].filter(Boolean).join("_"),isPlaceholder:O,placeholderId:O?`${N.filter(_=>_.column===D).length}`:void 0,depth:w,index:N.length});z.subHeaders.push(M),N.push(z)}j.headers.push(M),M.headerGroup=j}),g.push(j),w>0&&y(N,w-1)},x=a.map((S,w)=>Zy(i,S,{depth:h,index:w}));y(x,h-1),g.reverse();const v=S=>S.filter(j=>j.column.getIsVisible()).map(j=>{let N=0,M=0,A=[0];j.subHeaders&&j.subHeaders.length?(A=[],v(j.subHeaders).forEach(D=>{let{colSpan:O,rowSpan:z}=D;N+=O,A.push(z)})):N=1;const C=Math.min(...A);return M=M+C,j.colSpan=N,j.rowSpan=M,{colSpan:N,rowSpan:M}});return v((u=(d=g[0])==null?void 0:d.headers)!=null?u:[]),g}const cE=(n,a,i,o,u,d,h)=>{let m={id:a,index:o,original:i,depth:u,parentId:h,_valuesCache:{},_uniqueValuesCache:{},getValue:g=>{if(m._valuesCache.hasOwnProperty(g))return m._valuesCache[g];const y=n.getColumn(g);if(y!=null&&y.accessorFn)return m._valuesCache[g]=y.accessorFn(m.original,o),m._valuesCache[g]},getUniqueValues:g=>{if(m._uniqueValuesCache.hasOwnProperty(g))return m._uniqueValuesCache[g];const y=n.getColumn(g);if(y!=null&&y.accessorFn)return y.columnDef.getUniqueValues?(m._uniqueValuesCache[g]=y.columnDef.getUniqueValues(m.original,o),m._uniqueValuesCache[g]):(m._uniqueValuesCache[g]=[m.getValue(g)],m._uniqueValuesCache[g])},renderValue:g=>{var y;return(y=m.getValue(g))!=null?y:n.options.renderFallbackValue},subRows:[],getLeafRows:()=>iE(m.subRows,g=>g.subRows),getParentRow:()=>m.parentId?n.getRow(m.parentId,!0):void 0,getParentRows:()=>{let g=[],y=m;for(;;){const x=y.getParentRow();if(!x)break;g.push(x),y=x}return g.reverse()},getAllCells:we(()=>[n.getAllLeafColumns()],g=>g.map(y=>oE(n,m,y,y.id)),Ne(n.options,"debugRows")),_getAllCellsByColumnId:we(()=>[m.getAllCells()],g=>g.reduce((y,x)=>(y[x.column.id]=x,y),{}),Ne(n.options,"debugRows"))};for(let g=0;g<n._features.length;g++){const y=n._features[g];y==null||y.createRow==null||y.createRow(m,n)}return m},fE={createColumn:(n,a)=>{n._getFacetedRowModel=a.options.getFacetedRowModel&&a.options.getFacetedRowModel(a,n.id),n.getFacetedRowModel=()=>n._getFacetedRowModel?n._getFacetedRowModel():a.getPreFilteredRowModel(),n._getFacetedUniqueValues=a.options.getFacetedUniqueValues&&a.options.getFacetedUniqueValues(a,n.id),n.getFacetedUniqueValues=()=>n._getFacetedUniqueValues?n._getFacetedUniqueValues():new Map,n._getFacetedMinMaxValues=a.options.getFacetedMinMaxValues&&a.options.getFacetedMinMaxValues(a,n.id),n.getFacetedMinMaxValues=()=>{if(n._getFacetedMinMaxValues)return n._getFacetedMinMaxValues()}}},C1=(n,a,i)=>{var o,u;const d=i==null||(o=i.toString())==null?void 0:o.toLowerCase();return!!(!((u=n.getValue(a))==null||(u=u.toString())==null||(u=u.toLowerCase())==null)&&u.includes(d))};C1.autoRemove=n=>Xn(n);const E1=(n,a,i)=>{var o;return!!(!((o=n.getValue(a))==null||(o=o.toString())==null)&&o.includes(i))};E1.autoRemove=n=>Xn(n);const M1=(n,a,i)=>{var o;return((o=n.getValue(a))==null||(o=o.toString())==null?void 0:o.toLowerCase())===(i==null?void 0:i.toLowerCase())};M1.autoRemove=n=>Xn(n);const _1=(n,a,i)=>{var o;return(o=n.getValue(a))==null?void 0:o.includes(i)};_1.autoRemove=n=>Xn(n);const T1=(n,a,i)=>!i.some(o=>{var u;return!((u=n.getValue(a))!=null&&u.includes(o))});T1.autoRemove=n=>Xn(n)||!(n!=null&&n.length);const R1=(n,a,i)=>i.some(o=>{var u;return(u=n.getValue(a))==null?void 0:u.includes(o)});R1.autoRemove=n=>Xn(n)||!(n!=null&&n.length);const A1=(n,a,i)=>n.getValue(a)===i;A1.autoRemove=n=>Xn(n);const O1=(n,a,i)=>n.getValue(a)==i;O1.autoRemove=n=>Xn(n);const Rm=(n,a,i)=>{let[o,u]=i;const d=n.getValue(a);return d>=o&&d<=u};Rm.resolveFilterValue=n=>{let[a,i]=n,o=typeof a!="number"?parseFloat(a):a,u=typeof i!="number"?parseFloat(i):i,d=a===null||Number.isNaN(o)?-1/0:o,h=i===null||Number.isNaN(u)?1/0:u;if(d>h){const m=d;d=h,h=m}return[d,h]};Rm.autoRemove=n=>Xn(n)||Xn(n[0])&&Xn(n[1]);const Ll={includesString:C1,includesStringSensitive:E1,equalsString:M1,arrIncludes:_1,arrIncludesAll:T1,arrIncludesSome:R1,equals:A1,weakEquals:O1,inNumberRange:Rm};function Xn(n){return n==null||n===""}const dE={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:n=>({columnFilters:[],...n}),getDefaultOptions:n=>({onColumnFiltersChange:wn("columnFilters",n),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(n,a)=>{n.getAutoFilterFn=()=>{const i=a.getCoreRowModel().flatRows[0],o=i==null?void 0:i.getValue(n.id);return typeof o=="string"?Ll.includesString:typeof o=="number"?Ll.inNumberRange:typeof o=="boolean"||o!==null&&typeof o=="object"?Ll.equals:Array.isArray(o)?Ll.arrIncludes:Ll.weakEquals},n.getFilterFn=()=>{var i,o;return vc(n.columnDef.filterFn)?n.columnDef.filterFn:n.columnDef.filterFn==="auto"?n.getAutoFilterFn():(i=(o=a.options.filterFns)==null?void 0:o[n.columnDef.filterFn])!=null?i:Ll[n.columnDef.filterFn]},n.getCanFilter=()=>{var i,o,u;return((i=n.columnDef.enableColumnFilter)!=null?i:!0)&&((o=a.options.enableColumnFilters)!=null?o:!0)&&((u=a.options.enableFilters)!=null?u:!0)&&!!n.accessorFn},n.getIsFiltered=()=>n.getFilterIndex()>-1,n.getFilterValue=()=>{var i;return(i=a.getState().columnFilters)==null||(i=i.find(o=>o.id===n.id))==null?void 0:i.value},n.getFilterIndex=()=>{var i,o;return(i=(o=a.getState().columnFilters)==null?void 0:o.findIndex(u=>u.id===n.id))!=null?i:-1},n.setFilterValue=i=>{a.setColumnFilters(o=>{const u=n.getFilterFn(),d=o==null?void 0:o.find(x=>x.id===n.id),h=Ta(i,d?d.value:void 0);if(Jy(u,h,n)){var m;return(m=o==null?void 0:o.filter(x=>x.id!==n.id))!=null?m:[]}const g={id:n.id,value:h};if(d){var y;return(y=o==null?void 0:o.map(x=>x.id===n.id?g:x))!=null?y:[]}return o!=null&&o.length?[...o,g]:[g]})}},createRow:(n,a)=>{n.columnFilters={},n.columnFiltersMeta={}},createTable:n=>{n.setColumnFilters=a=>{const i=n.getAllLeafColumns(),o=u=>{var d;return(d=Ta(a,u))==null?void 0:d.filter(h=>{const m=i.find(g=>g.id===h.id);if(m){const g=m.getFilterFn();if(Jy(g,h.value,m))return!1}return!0})};n.options.onColumnFiltersChange==null||n.options.onColumnFiltersChange(o)},n.resetColumnFilters=a=>{var i,o;n.setColumnFilters(a?[]:(i=(o=n.initialState)==null?void 0:o.columnFilters)!=null?i:[])},n.getPreFilteredRowModel=()=>n.getCoreRowModel(),n.getFilteredRowModel=()=>(!n._getFilteredRowModel&&n.options.getFilteredRowModel&&(n._getFilteredRowModel=n.options.getFilteredRowModel(n)),n.options.manualFiltering||!n._getFilteredRowModel?n.getPreFilteredRowModel():n._getFilteredRowModel())}};function Jy(n,a,i){return(n&&n.autoRemove?n.autoRemove(a,i):!1)||typeof a>"u"||typeof a=="string"&&!a}const hE=(n,a,i)=>i.reduce((o,u)=>{const d=u.getValue(n);return o+(typeof d=="number"?d:0)},0),mE=(n,a,i)=>{let o;return i.forEach(u=>{const d=u.getValue(n);d!=null&&(o>d||o===void 0&&d>=d)&&(o=d)}),o},gE=(n,a,i)=>{let o;return i.forEach(u=>{const d=u.getValue(n);d!=null&&(o<d||o===void 0&&d>=d)&&(o=d)}),o},pE=(n,a,i)=>{let o,u;return i.forEach(d=>{const h=d.getValue(n);h!=null&&(o===void 0?h>=h&&(o=u=h):(o>h&&(o=h),u<h&&(u=h)))}),[o,u]},vE=(n,a)=>{let i=0,o=0;if(a.forEach(u=>{let d=u.getValue(n);d!=null&&(d=+d)>=d&&(++i,o+=d)}),i)return o/i},yE=(n,a)=>{if(!a.length)return;const i=a.map(d=>d.getValue(n));if(!sE(i))return;if(i.length===1)return i[0];const o=Math.floor(i.length/2),u=i.sort((d,h)=>d-h);return i.length%2!==0?u[o]:(u[o-1]+u[o])/2},xE=(n,a)=>Array.from(new Set(a.map(i=>i.getValue(n))).values()),SE=(n,a)=>new Set(a.map(i=>i.getValue(n))).size,bE=(n,a)=>a.length,ph={sum:hE,min:mE,max:gE,extent:pE,mean:vE,median:yE,unique:xE,uniqueCount:SE,count:bE},jE={getDefaultColumnDef:()=>({aggregatedCell:n=>{var a,i;return(a=(i=n.getValue())==null||i.toString==null?void 0:i.toString())!=null?a:null},aggregationFn:"auto"}),getInitialState:n=>({grouping:[],...n}),getDefaultOptions:n=>({onGroupingChange:wn("grouping",n),groupedColumnMode:"reorder"}),createColumn:(n,a)=>{n.toggleGrouping=()=>{a.setGrouping(i=>i!=null&&i.includes(n.id)?i.filter(o=>o!==n.id):[...i??[],n.id])},n.getCanGroup=()=>{var i,o;return((i=n.columnDef.enableGrouping)!=null?i:!0)&&((o=a.options.enableGrouping)!=null?o:!0)&&(!!n.accessorFn||!!n.columnDef.getGroupingValue)},n.getIsGrouped=()=>{var i;return(i=a.getState().grouping)==null?void 0:i.includes(n.id)},n.getGroupedIndex=()=>{var i;return(i=a.getState().grouping)==null?void 0:i.indexOf(n.id)},n.getToggleGroupingHandler=()=>{const i=n.getCanGroup();return()=>{i&&n.toggleGrouping()}},n.getAutoAggregationFn=()=>{const i=a.getCoreRowModel().flatRows[0],o=i==null?void 0:i.getValue(n.id);if(typeof o=="number")return ph.sum;if(Object.prototype.toString.call(o)==="[object Date]")return ph.extent},n.getAggregationFn=()=>{var i,o;if(!n)throw new Error;return vc(n.columnDef.aggregationFn)?n.columnDef.aggregationFn:n.columnDef.aggregationFn==="auto"?n.getAutoAggregationFn():(i=(o=a.options.aggregationFns)==null?void 0:o[n.columnDef.aggregationFn])!=null?i:ph[n.columnDef.aggregationFn]}},createTable:n=>{n.setGrouping=a=>n.options.onGroupingChange==null?void 0:n.options.onGroupingChange(a),n.resetGrouping=a=>{var i,o;n.setGrouping(a?[]:(i=(o=n.initialState)==null?void 0:o.grouping)!=null?i:[])},n.getPreGroupedRowModel=()=>n.getFilteredRowModel(),n.getGroupedRowModel=()=>(!n._getGroupedRowModel&&n.options.getGroupedRowModel&&(n._getGroupedRowModel=n.options.getGroupedRowModel(n)),n.options.manualGrouping||!n._getGroupedRowModel?n.getPreGroupedRowModel():n._getGroupedRowModel())},createRow:(n,a)=>{n.getIsGrouped=()=>!!n.groupingColumnId,n.getGroupingValue=i=>{if(n._groupingValuesCache.hasOwnProperty(i))return n._groupingValuesCache[i];const o=a.getColumn(i);return o!=null&&o.columnDef.getGroupingValue?(n._groupingValuesCache[i]=o.columnDef.getGroupingValue(n.original),n._groupingValuesCache[i]):n.getValue(i)},n._groupingValuesCache={}},createCell:(n,a,i,o)=>{n.getIsGrouped=()=>a.getIsGrouped()&&a.id===i.groupingColumnId,n.getIsPlaceholder=()=>!n.getIsGrouped()&&a.getIsGrouped(),n.getIsAggregated=()=>{var u;return!n.getIsGrouped()&&!n.getIsPlaceholder()&&!!((u=i.subRows)!=null&&u.length)}}};function wE(n,a,i){if(!(a!=null&&a.length)||!i)return n;const o=n.filter(d=>!a.includes(d.id));return i==="remove"?o:[...a.map(d=>n.find(h=>h.id===d)).filter(Boolean),...o]}const NE={getInitialState:n=>({columnOrder:[],...n}),getDefaultOptions:n=>({onColumnOrderChange:wn("columnOrder",n)}),createColumn:(n,a)=>{n.getIndex=we(i=>[Wo(a,i)],i=>i.findIndex(o=>o.id===n.id),Ne(a.options,"debugColumns")),n.getIsFirstColumn=i=>{var o;return((o=Wo(a,i)[0])==null?void 0:o.id)===n.id},n.getIsLastColumn=i=>{var o;const u=Wo(a,i);return((o=u[u.length-1])==null?void 0:o.id)===n.id}},createTable:n=>{n.setColumnOrder=a=>n.options.onColumnOrderChange==null?void 0:n.options.onColumnOrderChange(a),n.resetColumnOrder=a=>{var i;n.setColumnOrder(a?[]:(i=n.initialState.columnOrder)!=null?i:[])},n._getOrderColumnsFn=we(()=>[n.getState().columnOrder,n.getState().grouping,n.options.groupedColumnMode],(a,i,o)=>u=>{let d=[];if(!(a!=null&&a.length))d=u;else{const h=[...a],m=[...u];for(;m.length&&h.length;){const g=h.shift(),y=m.findIndex(x=>x.id===g);y>-1&&d.push(m.splice(y,1)[0])}d=[...d,...m]}return wE(d,i,o)},Ne(n.options,"debugTable"))}},vh=()=>({left:[],right:[]}),CE={getInitialState:n=>({columnPinning:vh(),...n}),getDefaultOptions:n=>({onColumnPinningChange:wn("columnPinning",n)}),createColumn:(n,a)=>{n.pin=i=>{const o=n.getLeafColumns().map(u=>u.id).filter(Boolean);a.setColumnPinning(u=>{var d,h;if(i==="right"){var m,g;return{left:((m=u==null?void 0:u.left)!=null?m:[]).filter(v=>!(o!=null&&o.includes(v))),right:[...((g=u==null?void 0:u.right)!=null?g:[]).filter(v=>!(o!=null&&o.includes(v))),...o]}}if(i==="left"){var y,x;return{left:[...((y=u==null?void 0:u.left)!=null?y:[]).filter(v=>!(o!=null&&o.includes(v))),...o],right:((x=u==null?void 0:u.right)!=null?x:[]).filter(v=>!(o!=null&&o.includes(v)))}}return{left:((d=u==null?void 0:u.left)!=null?d:[]).filter(v=>!(o!=null&&o.includes(v))),right:((h=u==null?void 0:u.right)!=null?h:[]).filter(v=>!(o!=null&&o.includes(v)))}})},n.getCanPin=()=>n.getLeafColumns().some(o=>{var u,d,h;return((u=o.columnDef.enablePinning)!=null?u:!0)&&((d=(h=a.options.enableColumnPinning)!=null?h:a.options.enablePinning)!=null?d:!0)}),n.getIsPinned=()=>{const i=n.getLeafColumns().map(m=>m.id),{left:o,right:u}=a.getState().columnPinning,d=i.some(m=>o==null?void 0:o.includes(m)),h=i.some(m=>u==null?void 0:u.includes(m));return d?"left":h?"right":!1},n.getPinnedIndex=()=>{var i,o;const u=n.getIsPinned();return u?(i=(o=a.getState().columnPinning)==null||(o=o[u])==null?void 0:o.indexOf(n.id))!=null?i:-1:0}},createRow:(n,a)=>{n.getCenterVisibleCells=we(()=>[n._getAllVisibleCells(),a.getState().columnPinning.left,a.getState().columnPinning.right],(i,o,u)=>{const d=[...o??[],...u??[]];return i.filter(h=>!d.includes(h.column.id))},Ne(a.options,"debugRows")),n.getLeftVisibleCells=we(()=>[n._getAllVisibleCells(),a.getState().columnPinning.left],(i,o)=>(o??[]).map(d=>i.find(h=>h.column.id===d)).filter(Boolean).map(d=>({...d,position:"left"})),Ne(a.options,"debugRows")),n.getRightVisibleCells=we(()=>[n._getAllVisibleCells(),a.getState().columnPinning.right],(i,o)=>(o??[]).map(d=>i.find(h=>h.column.id===d)).filter(Boolean).map(d=>({...d,position:"right"})),Ne(a.options,"debugRows"))},createTable:n=>{n.setColumnPinning=a=>n.options.onColumnPinningChange==null?void 0:n.options.onColumnPinningChange(a),n.resetColumnPinning=a=>{var i,o;return n.setColumnPinning(a?vh():(i=(o=n.initialState)==null?void 0:o.columnPinning)!=null?i:vh())},n.getIsSomeColumnsPinned=a=>{var i;const o=n.getState().columnPinning;if(!a){var u,d;return!!((u=o.left)!=null&&u.length||(d=o.right)!=null&&d.length)}return!!((i=o[a])!=null&&i.length)},n.getLeftLeafColumns=we(()=>[n.getAllLeafColumns(),n.getState().columnPinning.left],(a,i)=>(i??[]).map(o=>a.find(u=>u.id===o)).filter(Boolean),Ne(n.options,"debugColumns")),n.getRightLeafColumns=we(()=>[n.getAllLeafColumns(),n.getState().columnPinning.right],(a,i)=>(i??[]).map(o=>a.find(u=>u.id===o)).filter(Boolean),Ne(n.options,"debugColumns")),n.getCenterLeafColumns=we(()=>[n.getAllLeafColumns(),n.getState().columnPinning.left,n.getState().columnPinning.right],(a,i,o)=>{const u=[...i??[],...o??[]];return a.filter(d=>!u.includes(d.id))},Ne(n.options,"debugColumns"))}};function EE(n){return n||(typeof document<"u"?document:null)}const Yu={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},yh=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),ME={getDefaultColumnDef:()=>Yu,getInitialState:n=>({columnSizing:{},columnSizingInfo:yh(),...n}),getDefaultOptions:n=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:wn("columnSizing",n),onColumnSizingInfoChange:wn("columnSizingInfo",n)}),createColumn:(n,a)=>{n.getSize=()=>{var i,o,u;const d=a.getState().columnSizing[n.id];return Math.min(Math.max((i=n.columnDef.minSize)!=null?i:Yu.minSize,(o=d??n.columnDef.size)!=null?o:Yu.size),(u=n.columnDef.maxSize)!=null?u:Yu.maxSize)},n.getStart=we(i=>[i,Wo(a,i),a.getState().columnSizing],(i,o)=>o.slice(0,n.getIndex(i)).reduce((u,d)=>u+d.getSize(),0),Ne(a.options,"debugColumns")),n.getAfter=we(i=>[i,Wo(a,i),a.getState().columnSizing],(i,o)=>o.slice(n.getIndex(i)+1).reduce((u,d)=>u+d.getSize(),0),Ne(a.options,"debugColumns")),n.resetSize=()=>{a.setColumnSizing(i=>{let{[n.id]:o,...u}=i;return u})},n.getCanResize=()=>{var i,o;return((i=n.columnDef.enableResizing)!=null?i:!0)&&((o=a.options.enableColumnResizing)!=null?o:!0)},n.getIsResizing=()=>a.getState().columnSizingInfo.isResizingColumn===n.id},createHeader:(n,a)=>{n.getSize=()=>{let i=0;const o=u=>{if(u.subHeaders.length)u.subHeaders.forEach(o);else{var d;i+=(d=u.column.getSize())!=null?d:0}};return o(n),i},n.getStart=()=>{if(n.index>0){const i=n.headerGroup.headers[n.index-1];return i.getStart()+i.getSize()}return 0},n.getResizeHandler=i=>{const o=a.getColumn(n.column.id),u=o==null?void 0:o.getCanResize();return d=>{if(!o||!u||(d.persist==null||d.persist(),xh(d)&&d.touches&&d.touches.length>1))return;const h=n.getSize(),m=n?n.getLeafHeaders().map(A=>[A.column.id,A.column.getSize()]):[[o.id,o.getSize()]],g=xh(d)?Math.round(d.touches[0].clientX):d.clientX,y={},x=(A,C)=>{typeof C=="number"&&(a.setColumnSizingInfo(D=>{var O,z;const _=a.options.columnResizeDirection==="rtl"?-1:1,R=(C-((O=D==null?void 0:D.startOffset)!=null?O:0))*_,Q=Math.max(R/((z=D==null?void 0:D.startSize)!=null?z:0),-.999999);return D.columnSizingStart.forEach(K=>{let[$,le]=K;y[$]=Math.round(Math.max(le+le*Q,0)*100)/100}),{...D,deltaOffset:R,deltaPercentage:Q}}),(a.options.columnResizeMode==="onChange"||A==="end")&&a.setColumnSizing(D=>({...D,...y})))},v=A=>x("move",A),S=A=>{x("end",A),a.setColumnSizingInfo(C=>({...C,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},w=EE(i),j={moveHandler:A=>v(A.clientX),upHandler:A=>{w==null||w.removeEventListener("mousemove",j.moveHandler),w==null||w.removeEventListener("mouseup",j.upHandler),S(A.clientX)}},N={moveHandler:A=>(A.cancelable&&(A.preventDefault(),A.stopPropagation()),v(A.touches[0].clientX),!1),upHandler:A=>{var C;w==null||w.removeEventListener("touchmove",N.moveHandler),w==null||w.removeEventListener("touchend",N.upHandler),A.cancelable&&(A.preventDefault(),A.stopPropagation()),S((C=A.touches[0])==null?void 0:C.clientX)}},M=_E()?{passive:!1}:!1;xh(d)?(w==null||w.addEventListener("touchmove",N.moveHandler,M),w==null||w.addEventListener("touchend",N.upHandler,M)):(w==null||w.addEventListener("mousemove",j.moveHandler,M),w==null||w.addEventListener("mouseup",j.upHandler,M)),a.setColumnSizingInfo(A=>({...A,startOffset:g,startSize:h,deltaOffset:0,deltaPercentage:0,columnSizingStart:m,isResizingColumn:o.id}))}}},createTable:n=>{n.setColumnSizing=a=>n.options.onColumnSizingChange==null?void 0:n.options.onColumnSizingChange(a),n.setColumnSizingInfo=a=>n.options.onColumnSizingInfoChange==null?void 0:n.options.onColumnSizingInfoChange(a),n.resetColumnSizing=a=>{var i;n.setColumnSizing(a?{}:(i=n.initialState.columnSizing)!=null?i:{})},n.resetHeaderSizeInfo=a=>{var i;n.setColumnSizingInfo(a?yh():(i=n.initialState.columnSizingInfo)!=null?i:yh())},n.getTotalSize=()=>{var a,i;return(a=(i=n.getHeaderGroups()[0])==null?void 0:i.headers.reduce((o,u)=>o+u.getSize(),0))!=null?a:0},n.getLeftTotalSize=()=>{var a,i;return(a=(i=n.getLeftHeaderGroups()[0])==null?void 0:i.headers.reduce((o,u)=>o+u.getSize(),0))!=null?a:0},n.getCenterTotalSize=()=>{var a,i;return(a=(i=n.getCenterHeaderGroups()[0])==null?void 0:i.headers.reduce((o,u)=>o+u.getSize(),0))!=null?a:0},n.getRightTotalSize=()=>{var a,i;return(a=(i=n.getRightHeaderGroups()[0])==null?void 0:i.headers.reduce((o,u)=>o+u.getSize(),0))!=null?a:0}}};let Iu=null;function _E(){if(typeof Iu=="boolean")return Iu;let n=!1;try{const a={get passive(){return n=!0,!1}},i=()=>{};window.addEventListener("test",i,a),window.removeEventListener("test",i)}catch{n=!1}return Iu=n,Iu}function xh(n){return n.type==="touchstart"}const TE={getInitialState:n=>({columnVisibility:{},...n}),getDefaultOptions:n=>({onColumnVisibilityChange:wn("columnVisibility",n)}),createColumn:(n,a)=>{n.toggleVisibility=i=>{n.getCanHide()&&a.setColumnVisibility(o=>({...o,[n.id]:i??!n.getIsVisible()}))},n.getIsVisible=()=>{var i,o;const u=n.columns;return(i=u.length?u.some(d=>d.getIsVisible()):(o=a.getState().columnVisibility)==null?void 0:o[n.id])!=null?i:!0},n.getCanHide=()=>{var i,o;return((i=n.columnDef.enableHiding)!=null?i:!0)&&((o=a.options.enableHiding)!=null?o:!0)},n.getToggleVisibilityHandler=()=>i=>{n.toggleVisibility==null||n.toggleVisibility(i.target.checked)}},createRow:(n,a)=>{n._getAllVisibleCells=we(()=>[n.getAllCells(),a.getState().columnVisibility],i=>i.filter(o=>o.column.getIsVisible()),Ne(a.options,"debugRows")),n.getVisibleCells=we(()=>[n.getLeftVisibleCells(),n.getCenterVisibleCells(),n.getRightVisibleCells()],(i,o,u)=>[...i,...o,...u],Ne(a.options,"debugRows"))},createTable:n=>{const a=(i,o)=>we(()=>[o(),o().filter(u=>u.getIsVisible()).map(u=>u.id).join("_")],u=>u.filter(d=>d.getIsVisible==null?void 0:d.getIsVisible()),Ne(n.options,"debugColumns"));n.getVisibleFlatColumns=a("getVisibleFlatColumns",()=>n.getAllFlatColumns()),n.getVisibleLeafColumns=a("getVisibleLeafColumns",()=>n.getAllLeafColumns()),n.getLeftVisibleLeafColumns=a("getLeftVisibleLeafColumns",()=>n.getLeftLeafColumns()),n.getRightVisibleLeafColumns=a("getRightVisibleLeafColumns",()=>n.getRightLeafColumns()),n.getCenterVisibleLeafColumns=a("getCenterVisibleLeafColumns",()=>n.getCenterLeafColumns()),n.setColumnVisibility=i=>n.options.onColumnVisibilityChange==null?void 0:n.options.onColumnVisibilityChange(i),n.resetColumnVisibility=i=>{var o;n.setColumnVisibility(i?{}:(o=n.initialState.columnVisibility)!=null?o:{})},n.toggleAllColumnsVisible=i=>{var o;i=(o=i)!=null?o:!n.getIsAllColumnsVisible(),n.setColumnVisibility(n.getAllLeafColumns().reduce((u,d)=>({...u,[d.id]:i||!(d.getCanHide!=null&&d.getCanHide())}),{}))},n.getIsAllColumnsVisible=()=>!n.getAllLeafColumns().some(i=>!(i.getIsVisible!=null&&i.getIsVisible())),n.getIsSomeColumnsVisible=()=>n.getAllLeafColumns().some(i=>i.getIsVisible==null?void 0:i.getIsVisible()),n.getToggleAllColumnsVisibilityHandler=()=>i=>{var o;n.toggleAllColumnsVisible((o=i.target)==null?void 0:o.checked)}}};function Wo(n,a){return a?a==="center"?n.getCenterVisibleLeafColumns():a==="left"?n.getLeftVisibleLeafColumns():n.getRightVisibleLeafColumns():n.getVisibleLeafColumns()}const RE={createTable:n=>{n._getGlobalFacetedRowModel=n.options.getFacetedRowModel&&n.options.getFacetedRowModel(n,"__global__"),n.getGlobalFacetedRowModel=()=>n.options.manualFiltering||!n._getGlobalFacetedRowModel?n.getPreFilteredRowModel():n._getGlobalFacetedRowModel(),n._getGlobalFacetedUniqueValues=n.options.getFacetedUniqueValues&&n.options.getFacetedUniqueValues(n,"__global__"),n.getGlobalFacetedUniqueValues=()=>n._getGlobalFacetedUniqueValues?n._getGlobalFacetedUniqueValues():new Map,n._getGlobalFacetedMinMaxValues=n.options.getFacetedMinMaxValues&&n.options.getFacetedMinMaxValues(n,"__global__"),n.getGlobalFacetedMinMaxValues=()=>{if(n._getGlobalFacetedMinMaxValues)return n._getGlobalFacetedMinMaxValues()}}},AE={getInitialState:n=>({globalFilter:void 0,...n}),getDefaultOptions:n=>({onGlobalFilterChange:wn("globalFilter",n),globalFilterFn:"auto",getColumnCanGlobalFilter:a=>{var i;const o=(i=n.getCoreRowModel().flatRows[0])==null||(i=i._getAllCellsByColumnId()[a.id])==null?void 0:i.getValue();return typeof o=="string"||typeof o=="number"}}),createColumn:(n,a)=>{n.getCanGlobalFilter=()=>{var i,o,u,d;return((i=n.columnDef.enableGlobalFilter)!=null?i:!0)&&((o=a.options.enableGlobalFilter)!=null?o:!0)&&((u=a.options.enableFilters)!=null?u:!0)&&((d=a.options.getColumnCanGlobalFilter==null?void 0:a.options.getColumnCanGlobalFilter(n))!=null?d:!0)&&!!n.accessorFn}},createTable:n=>{n.getGlobalAutoFilterFn=()=>Ll.includesString,n.getGlobalFilterFn=()=>{var a,i;const{globalFilterFn:o}=n.options;return vc(o)?o:o==="auto"?n.getGlobalAutoFilterFn():(a=(i=n.options.filterFns)==null?void 0:i[o])!=null?a:Ll[o]},n.setGlobalFilter=a=>{n.options.onGlobalFilterChange==null||n.options.onGlobalFilterChange(a)},n.resetGlobalFilter=a=>{n.setGlobalFilter(a?void 0:n.initialState.globalFilter)}}},OE={getInitialState:n=>({expanded:{},...n}),getDefaultOptions:n=>({onExpandedChange:wn("expanded",n),paginateExpandedRows:!0}),createTable:n=>{let a=!1,i=!1;n._autoResetExpanded=()=>{var o,u;if(!a){n._queue(()=>{a=!0});return}if((o=(u=n.options.autoResetAll)!=null?u:n.options.autoResetExpanded)!=null?o:!n.options.manualExpanding){if(i)return;i=!0,n._queue(()=>{n.resetExpanded(),i=!1})}},n.setExpanded=o=>n.options.onExpandedChange==null?void 0:n.options.onExpandedChange(o),n.toggleAllRowsExpanded=o=>{o??!n.getIsAllRowsExpanded()?n.setExpanded(!0):n.setExpanded({})},n.resetExpanded=o=>{var u,d;n.setExpanded(o?{}:(u=(d=n.initialState)==null?void 0:d.expanded)!=null?u:{})},n.getCanSomeRowsExpand=()=>n.getPrePaginationRowModel().flatRows.some(o=>o.getCanExpand()),n.getToggleAllRowsExpandedHandler=()=>o=>{o.persist==null||o.persist(),n.toggleAllRowsExpanded()},n.getIsSomeRowsExpanded=()=>{const o=n.getState().expanded;return o===!0||Object.values(o).some(Boolean)},n.getIsAllRowsExpanded=()=>{const o=n.getState().expanded;return typeof o=="boolean"?o===!0:!(!Object.keys(o).length||n.getRowModel().flatRows.some(u=>!u.getIsExpanded()))},n.getExpandedDepth=()=>{let o=0;return(n.getState().expanded===!0?Object.keys(n.getRowModel().rowsById):Object.keys(n.getState().expanded)).forEach(d=>{const h=d.split(".");o=Math.max(o,h.length)}),o},n.getPreExpandedRowModel=()=>n.getSortedRowModel(),n.getExpandedRowModel=()=>(!n._getExpandedRowModel&&n.options.getExpandedRowModel&&(n._getExpandedRowModel=n.options.getExpandedRowModel(n)),n.options.manualExpanding||!n._getExpandedRowModel?n.getPreExpandedRowModel():n._getExpandedRowModel())},createRow:(n,a)=>{n.toggleExpanded=i=>{a.setExpanded(o=>{var u;const d=o===!0?!0:!!(o!=null&&o[n.id]);let h={};if(o===!0?Object.keys(a.getRowModel().rowsById).forEach(m=>{h[m]=!0}):h=o,i=(u=i)!=null?u:!d,!d&&i)return{...h,[n.id]:!0};if(d&&!i){const{[n.id]:m,...g}=h;return g}return o})},n.getIsExpanded=()=>{var i;const o=a.getState().expanded;return!!((i=a.options.getIsRowExpanded==null?void 0:a.options.getIsRowExpanded(n))!=null?i:o===!0||o!=null&&o[n.id])},n.getCanExpand=()=>{var i,o,u;return(i=a.options.getRowCanExpand==null?void 0:a.options.getRowCanExpand(n))!=null?i:((o=a.options.enableExpanding)!=null?o:!0)&&!!((u=n.subRows)!=null&&u.length)},n.getIsAllParentsExpanded=()=>{let i=!0,o=n;for(;i&&o.parentId;)o=a.getRow(o.parentId,!0),i=o.getIsExpanded();return i},n.getToggleExpandedHandler=()=>{const i=n.getCanExpand();return()=>{i&&n.toggleExpanded()}}}},cm=0,fm=10,Sh=()=>({pageIndex:cm,pageSize:fm}),zE={getInitialState:n=>({...n,pagination:{...Sh(),...n==null?void 0:n.pagination}}),getDefaultOptions:n=>({onPaginationChange:wn("pagination",n)}),createTable:n=>{let a=!1,i=!1;n._autoResetPageIndex=()=>{var o,u;if(!a){n._queue(()=>{a=!0});return}if((o=(u=n.options.autoResetAll)!=null?u:n.options.autoResetPageIndex)!=null?o:!n.options.manualPagination){if(i)return;i=!0,n._queue(()=>{n.resetPageIndex(),i=!1})}},n.setPagination=o=>{const u=d=>Ta(o,d);return n.options.onPaginationChange==null?void 0:n.options.onPaginationChange(u)},n.resetPagination=o=>{var u;n.setPagination(o?Sh():(u=n.initialState.pagination)!=null?u:Sh())},n.setPageIndex=o=>{n.setPagination(u=>{let d=Ta(o,u.pageIndex);const h=typeof n.options.pageCount>"u"||n.options.pageCount===-1?Number.MAX_SAFE_INTEGER:n.options.pageCount-1;return d=Math.max(0,Math.min(d,h)),{...u,pageIndex:d}})},n.resetPageIndex=o=>{var u,d;n.setPageIndex(o?cm:(u=(d=n.initialState)==null||(d=d.pagination)==null?void 0:d.pageIndex)!=null?u:cm)},n.resetPageSize=o=>{var u,d;n.setPageSize(o?fm:(u=(d=n.initialState)==null||(d=d.pagination)==null?void 0:d.pageSize)!=null?u:fm)},n.setPageSize=o=>{n.setPagination(u=>{const d=Math.max(1,Ta(o,u.pageSize)),h=u.pageSize*u.pageIndex,m=Math.floor(h/d);return{...u,pageIndex:m,pageSize:d}})},n.setPageCount=o=>n.setPagination(u=>{var d;let h=Ta(o,(d=n.options.pageCount)!=null?d:-1);return typeof h=="number"&&(h=Math.max(-1,h)),{...u,pageCount:h}}),n.getPageOptions=we(()=>[n.getPageCount()],o=>{let u=[];return o&&o>0&&(u=[...new Array(o)].fill(null).map((d,h)=>h)),u},Ne(n.options,"debugTable")),n.getCanPreviousPage=()=>n.getState().pagination.pageIndex>0,n.getCanNextPage=()=>{const{pageIndex:o}=n.getState().pagination,u=n.getPageCount();return u===-1?!0:u===0?!1:o<u-1},n.previousPage=()=>n.setPageIndex(o=>o-1),n.nextPage=()=>n.setPageIndex(o=>o+1),n.firstPage=()=>n.setPageIndex(0),n.lastPage=()=>n.setPageIndex(n.getPageCount()-1),n.getPrePaginationRowModel=()=>n.getExpandedRowModel(),n.getPaginationRowModel=()=>(!n._getPaginationRowModel&&n.options.getPaginationRowModel&&(n._getPaginationRowModel=n.options.getPaginationRowModel(n)),n.options.manualPagination||!n._getPaginationRowModel?n.getPrePaginationRowModel():n._getPaginationRowModel()),n.getPageCount=()=>{var o;return(o=n.options.pageCount)!=null?o:Math.ceil(n.getRowCount()/n.getState().pagination.pageSize)},n.getRowCount=()=>{var o;return(o=n.options.rowCount)!=null?o:n.getPrePaginationRowModel().rows.length}}},bh=()=>({top:[],bottom:[]}),DE={getInitialState:n=>({rowPinning:bh(),...n}),getDefaultOptions:n=>({onRowPinningChange:wn("rowPinning",n)}),createRow:(n,a)=>{n.pin=(i,o,u)=>{const d=o?n.getLeafRows().map(g=>{let{id:y}=g;return y}):[],h=u?n.getParentRows().map(g=>{let{id:y}=g;return y}):[],m=new Set([...h,n.id,...d]);a.setRowPinning(g=>{var y,x;if(i==="bottom"){var v,S;return{top:((v=g==null?void 0:g.top)!=null?v:[]).filter(N=>!(m!=null&&m.has(N))),bottom:[...((S=g==null?void 0:g.bottom)!=null?S:[]).filter(N=>!(m!=null&&m.has(N))),...Array.from(m)]}}if(i==="top"){var w,j;return{top:[...((w=g==null?void 0:g.top)!=null?w:[]).filter(N=>!(m!=null&&m.has(N))),...Array.from(m)],bottom:((j=g==null?void 0:g.bottom)!=null?j:[]).filter(N=>!(m!=null&&m.has(N)))}}return{top:((y=g==null?void 0:g.top)!=null?y:[]).filter(N=>!(m!=null&&m.has(N))),bottom:((x=g==null?void 0:g.bottom)!=null?x:[]).filter(N=>!(m!=null&&m.has(N)))}})},n.getCanPin=()=>{var i;const{enableRowPinning:o,enablePinning:u}=a.options;return typeof o=="function"?o(n):(i=o??u)!=null?i:!0},n.getIsPinned=()=>{const i=[n.id],{top:o,bottom:u}=a.getState().rowPinning,d=i.some(m=>o==null?void 0:o.includes(m)),h=i.some(m=>u==null?void 0:u.includes(m));return d?"top":h?"bottom":!1},n.getPinnedIndex=()=>{var i,o;const u=n.getIsPinned();if(!u)return-1;const d=(i=u==="top"?a.getTopRows():a.getBottomRows())==null?void 0:i.map(h=>{let{id:m}=h;return m});return(o=d==null?void 0:d.indexOf(n.id))!=null?o:-1}},createTable:n=>{n.setRowPinning=a=>n.options.onRowPinningChange==null?void 0:n.options.onRowPinningChange(a),n.resetRowPinning=a=>{var i,o;return n.setRowPinning(a?bh():(i=(o=n.initialState)==null?void 0:o.rowPinning)!=null?i:bh())},n.getIsSomeRowsPinned=a=>{var i;const o=n.getState().rowPinning;if(!a){var u,d;return!!((u=o.top)!=null&&u.length||(d=o.bottom)!=null&&d.length)}return!!((i=o[a])!=null&&i.length)},n._getPinnedRows=(a,i,o)=>{var u;return((u=n.options.keepPinnedRows)==null||u?(i??[]).map(h=>{const m=n.getRow(h,!0);return m.getIsAllParentsExpanded()?m:null}):(i??[]).map(h=>a.find(m=>m.id===h))).filter(Boolean).map(h=>({...h,position:o}))},n.getTopRows=we(()=>[n.getRowModel().rows,n.getState().rowPinning.top],(a,i)=>n._getPinnedRows(a,i,"top"),Ne(n.options,"debugRows")),n.getBottomRows=we(()=>[n.getRowModel().rows,n.getState().rowPinning.bottom],(a,i)=>n._getPinnedRows(a,i,"bottom"),Ne(n.options,"debugRows")),n.getCenterRows=we(()=>[n.getRowModel().rows,n.getState().rowPinning.top,n.getState().rowPinning.bottom],(a,i,o)=>{const u=new Set([...i??[],...o??[]]);return a.filter(d=>!u.has(d.id))},Ne(n.options,"debugRows"))}},LE={getInitialState:n=>({rowSelection:{},...n}),getDefaultOptions:n=>({onRowSelectionChange:wn("rowSelection",n),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:n=>{n.setRowSelection=a=>n.options.onRowSelectionChange==null?void 0:n.options.onRowSelectionChange(a),n.resetRowSelection=a=>{var i;return n.setRowSelection(a?{}:(i=n.initialState.rowSelection)!=null?i:{})},n.toggleAllRowsSelected=a=>{n.setRowSelection(i=>{a=typeof a<"u"?a:!n.getIsAllRowsSelected();const o={...i},u=n.getPreGroupedRowModel().flatRows;return a?u.forEach(d=>{d.getCanSelect()&&(o[d.id]=!0)}):u.forEach(d=>{delete o[d.id]}),o})},n.toggleAllPageRowsSelected=a=>n.setRowSelection(i=>{const o=typeof a<"u"?a:!n.getIsAllPageRowsSelected(),u={...i};return n.getRowModel().rows.forEach(d=>{dm(u,d.id,o,!0,n)}),u}),n.getPreSelectedRowModel=()=>n.getCoreRowModel(),n.getSelectedRowModel=we(()=>[n.getState().rowSelection,n.getCoreRowModel()],(a,i)=>Object.keys(a).length?jh(n,i):{rows:[],flatRows:[],rowsById:{}},Ne(n.options,"debugTable")),n.getFilteredSelectedRowModel=we(()=>[n.getState().rowSelection,n.getFilteredRowModel()],(a,i)=>Object.keys(a).length?jh(n,i):{rows:[],flatRows:[],rowsById:{}},Ne(n.options,"debugTable")),n.getGroupedSelectedRowModel=we(()=>[n.getState().rowSelection,n.getSortedRowModel()],(a,i)=>Object.keys(a).length?jh(n,i):{rows:[],flatRows:[],rowsById:{}},Ne(n.options,"debugTable")),n.getIsAllRowsSelected=()=>{const a=n.getFilteredRowModel().flatRows,{rowSelection:i}=n.getState();let o=!!(a.length&&Object.keys(i).length);return o&&a.some(u=>u.getCanSelect()&&!i[u.id])&&(o=!1),o},n.getIsAllPageRowsSelected=()=>{const a=n.getPaginationRowModel().flatRows.filter(u=>u.getCanSelect()),{rowSelection:i}=n.getState();let o=!!a.length;return o&&a.some(u=>!i[u.id])&&(o=!1),o},n.getIsSomeRowsSelected=()=>{var a;const i=Object.keys((a=n.getState().rowSelection)!=null?a:{}).length;return i>0&&i<n.getFilteredRowModel().flatRows.length},n.getIsSomePageRowsSelected=()=>{const a=n.getPaginationRowModel().flatRows;return n.getIsAllPageRowsSelected()?!1:a.filter(i=>i.getCanSelect()).some(i=>i.getIsSelected()||i.getIsSomeSelected())},n.getToggleAllRowsSelectedHandler=()=>a=>{n.toggleAllRowsSelected(a.target.checked)},n.getToggleAllPageRowsSelectedHandler=()=>a=>{n.toggleAllPageRowsSelected(a.target.checked)}},createRow:(n,a)=>{n.toggleSelected=(i,o)=>{const u=n.getIsSelected();a.setRowSelection(d=>{var h;if(i=typeof i<"u"?i:!u,n.getCanSelect()&&u===i)return d;const m={...d};return dm(m,n.id,i,(h=o==null?void 0:o.selectChildren)!=null?h:!0,a),m})},n.getIsSelected=()=>{const{rowSelection:i}=a.getState();return Am(n,i)},n.getIsSomeSelected=()=>{const{rowSelection:i}=a.getState();return hm(n,i)==="some"},n.getIsAllSubRowsSelected=()=>{const{rowSelection:i}=a.getState();return hm(n,i)==="all"},n.getCanSelect=()=>{var i;return typeof a.options.enableRowSelection=="function"?a.options.enableRowSelection(n):(i=a.options.enableRowSelection)!=null?i:!0},n.getCanSelectSubRows=()=>{var i;return typeof a.options.enableSubRowSelection=="function"?a.options.enableSubRowSelection(n):(i=a.options.enableSubRowSelection)!=null?i:!0},n.getCanMultiSelect=()=>{var i;return typeof a.options.enableMultiRowSelection=="function"?a.options.enableMultiRowSelection(n):(i=a.options.enableMultiRowSelection)!=null?i:!0},n.getToggleSelectedHandler=()=>{const i=n.getCanSelect();return o=>{var u;i&&n.toggleSelected((u=o.target)==null?void 0:u.checked)}}}},dm=(n,a,i,o,u)=>{var d;const h=u.getRow(a,!0);i?(h.getCanMultiSelect()||Object.keys(n).forEach(m=>delete n[m]),h.getCanSelect()&&(n[a]=!0)):delete n[a],o&&(d=h.subRows)!=null&&d.length&&h.getCanSelectSubRows()&&h.subRows.forEach(m=>dm(n,m.id,i,o,u))};function jh(n,a){const i=n.getState().rowSelection,o=[],u={},d=function(h,m){return h.map(g=>{var y;const x=Am(g,i);if(x&&(o.push(g),u[g.id]=g),(y=g.subRows)!=null&&y.length&&(g={...g,subRows:d(g.subRows)}),x)return g}).filter(Boolean)};return{rows:d(a.rows),flatRows:o,rowsById:u}}function Am(n,a){var i;return(i=a[n.id])!=null?i:!1}function hm(n,a,i){var o;if(!((o=n.subRows)!=null&&o.length))return!1;let u=!0,d=!1;return n.subRows.forEach(h=>{if(!(d&&!u)&&(h.getCanSelect()&&(Am(h,a)?d=!0:u=!1),h.subRows&&h.subRows.length)){const m=hm(h,a);m==="all"?d=!0:(m==="some"&&(d=!0),u=!1)}}),u?"all":d?"some":!1}const mm=/([0-9]+)/gm,HE=(n,a,i)=>z1(Ra(n.getValue(i)).toLowerCase(),Ra(a.getValue(i)).toLowerCase()),UE=(n,a,i)=>z1(Ra(n.getValue(i)),Ra(a.getValue(i))),$E=(n,a,i)=>Om(Ra(n.getValue(i)).toLowerCase(),Ra(a.getValue(i)).toLowerCase()),VE=(n,a,i)=>Om(Ra(n.getValue(i)),Ra(a.getValue(i))),FE=(n,a,i)=>{const o=n.getValue(i),u=a.getValue(i);return o>u?1:o<u?-1:0},kE=(n,a,i)=>Om(n.getValue(i),a.getValue(i));function Om(n,a){return n===a?0:n>a?1:-1}function Ra(n){return typeof n=="number"?isNaN(n)||n===1/0||n===-1/0?"":String(n):typeof n=="string"?n:""}function z1(n,a){const i=n.split(mm).filter(Boolean),o=a.split(mm).filter(Boolean);for(;i.length&&o.length;){const u=i.shift(),d=o.shift(),h=parseInt(u,10),m=parseInt(d,10),g=[h,m].sort();if(isNaN(g[0])){if(u>d)return 1;if(d>u)return-1;continue}if(isNaN(g[1]))return isNaN(h)?-1:1;if(h>m)return 1;if(m>h)return-1}return i.length-o.length}const Go={alphanumeric:HE,alphanumericCaseSensitive:UE,text:$E,textCaseSensitive:VE,datetime:FE,basic:kE},BE={getInitialState:n=>({sorting:[],...n}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:n=>({onSortingChange:wn("sorting",n),isMultiSortEvent:a=>a.shiftKey}),createColumn:(n,a)=>{n.getAutoSortingFn=()=>{const i=a.getFilteredRowModel().flatRows.slice(10);let o=!1;for(const u of i){const d=u==null?void 0:u.getValue(n.id);if(Object.prototype.toString.call(d)==="[object Date]")return Go.datetime;if(typeof d=="string"&&(o=!0,d.split(mm).length>1))return Go.alphanumeric}return o?Go.text:Go.basic},n.getAutoSortDir=()=>{const i=a.getFilteredRowModel().flatRows[0];return typeof(i==null?void 0:i.getValue(n.id))=="string"?"asc":"desc"},n.getSortingFn=()=>{var i,o;if(!n)throw new Error;return vc(n.columnDef.sortingFn)?n.columnDef.sortingFn:n.columnDef.sortingFn==="auto"?n.getAutoSortingFn():(i=(o=a.options.sortingFns)==null?void 0:o[n.columnDef.sortingFn])!=null?i:Go[n.columnDef.sortingFn]},n.toggleSorting=(i,o)=>{const u=n.getNextSortingOrder(),d=typeof i<"u"&&i!==null;a.setSorting(h=>{const m=h==null?void 0:h.find(w=>w.id===n.id),g=h==null?void 0:h.findIndex(w=>w.id===n.id);let y=[],x,v=d?i:u==="desc";if(h!=null&&h.length&&n.getCanMultiSort()&&o?m?x="toggle":x="add":h!=null&&h.length&&g!==h.length-1?x="replace":m?x="toggle":x="replace",x==="toggle"&&(d||u||(x="remove")),x==="add"){var S;y=[...h,{id:n.id,desc:v}],y.splice(0,y.length-((S=a.options.maxMultiSortColCount)!=null?S:Number.MAX_SAFE_INTEGER))}else x==="toggle"?y=h.map(w=>w.id===n.id?{...w,desc:v}:w):x==="remove"?y=h.filter(w=>w.id!==n.id):y=[{id:n.id,desc:v}];return y})},n.getFirstSortDir=()=>{var i,o;return((i=(o=n.columnDef.sortDescFirst)!=null?o:a.options.sortDescFirst)!=null?i:n.getAutoSortDir()==="desc")?"desc":"asc"},n.getNextSortingOrder=i=>{var o,u;const d=n.getFirstSortDir(),h=n.getIsSorted();return h?h!==d&&((o=a.options.enableSortingRemoval)==null||o)&&(!(i&&(u=a.options.enableMultiRemove)!=null)||u)?!1:h==="desc"?"asc":"desc":d},n.getCanSort=()=>{var i,o;return((i=n.columnDef.enableSorting)!=null?i:!0)&&((o=a.options.enableSorting)!=null?o:!0)&&!!n.accessorFn},n.getCanMultiSort=()=>{var i,o;return(i=(o=n.columnDef.enableMultiSort)!=null?o:a.options.enableMultiSort)!=null?i:!!n.accessorFn},n.getIsSorted=()=>{var i;const o=(i=a.getState().sorting)==null?void 0:i.find(u=>u.id===n.id);return o?o.desc?"desc":"asc":!1},n.getSortIndex=()=>{var i,o;return(i=(o=a.getState().sorting)==null?void 0:o.findIndex(u=>u.id===n.id))!=null?i:-1},n.clearSorting=()=>{a.setSorting(i=>i!=null&&i.length?i.filter(o=>o.id!==n.id):[])},n.getToggleSortingHandler=()=>{const i=n.getCanSort();return o=>{i&&(o.persist==null||o.persist(),n.toggleSorting==null||n.toggleSorting(void 0,n.getCanMultiSort()?a.options.isMultiSortEvent==null?void 0:a.options.isMultiSortEvent(o):!1))}}},createTable:n=>{n.setSorting=a=>n.options.onSortingChange==null?void 0:n.options.onSortingChange(a),n.resetSorting=a=>{var i,o;n.setSorting(a?[]:(i=(o=n.initialState)==null?void 0:o.sorting)!=null?i:[])},n.getPreSortedRowModel=()=>n.getGroupedRowModel(),n.getSortedRowModel=()=>(!n._getSortedRowModel&&n.options.getSortedRowModel&&(n._getSortedRowModel=n.options.getSortedRowModel(n)),n.options.manualSorting||!n._getSortedRowModel?n.getPreSortedRowModel():n._getSortedRowModel())}},GE=[uE,TE,NE,CE,fE,dE,RE,AE,BE,jE,OE,zE,DE,LE,ME];function qE(n){var a,i;const o=[...GE,...(a=n._features)!=null?a:[]];let u={_features:o};const d=u._features.reduce((S,w)=>Object.assign(S,w.getDefaultOptions==null?void 0:w.getDefaultOptions(u)),{}),h=S=>u.options.mergeOptions?u.options.mergeOptions(d,S):{...d,...S};let g={...{},...(i=n.initialState)!=null?i:{}};u._features.forEach(S=>{var w;g=(w=S.getInitialState==null?void 0:S.getInitialState(g))!=null?w:g});const y=[];let x=!1;const v={_features:o,options:{...d,...n},initialState:g,_queue:S=>{y.push(S),x||(x=!0,Promise.resolve().then(()=>{for(;y.length;)y.shift()();x=!1}).catch(w=>setTimeout(()=>{throw w})))},reset:()=>{u.setState(u.initialState)},setOptions:S=>{const w=Ta(S,u.options);u.options=h(w)},getState:()=>u.options.state,setState:S=>{u.options.onStateChange==null||u.options.onStateChange(S)},_getRowId:(S,w,j)=>{var N;return(N=u.options.getRowId==null?void 0:u.options.getRowId(S,w,j))!=null?N:`${j?[j.id,w].join("."):w}`},getCoreRowModel:()=>(u._getCoreRowModel||(u._getCoreRowModel=u.options.getCoreRowModel(u)),u._getCoreRowModel()),getRowModel:()=>u.getPaginationRowModel(),getRow:(S,w)=>{let j=(w?u.getPrePaginationRowModel():u.getRowModel()).rowsById[S];if(!j&&(j=u.getCoreRowModel().rowsById[S],!j))throw new Error;return j},_getDefaultColumnDef:we(()=>[u.options.defaultColumn],S=>{var w;return S=(w=S)!=null?w:{},{header:j=>{const N=j.header.column.columnDef;return N.accessorKey?N.accessorKey:N.accessorFn?N.id:null},cell:j=>{var N,M;return(N=(M=j.renderValue())==null||M.toString==null?void 0:M.toString())!=null?N:null},...u._features.reduce((j,N)=>Object.assign(j,N.getDefaultColumnDef==null?void 0:N.getDefaultColumnDef()),{}),...S}},Ne(n,"debugColumns")),_getColumnDefs:()=>u.options.columns,getAllColumns:we(()=>[u._getColumnDefs()],S=>{const w=function(j,N,M){return M===void 0&&(M=0),j.map(A=>{const C=rE(u,A,M,N),D=A;return C.columns=D.columns?w(D.columns,C,M+1):[],C})};return w(S)},Ne(n,"debugColumns")),getAllFlatColumns:we(()=>[u.getAllColumns()],S=>S.flatMap(w=>w.getFlatColumns()),Ne(n,"debugColumns")),_getAllFlatColumnsById:we(()=>[u.getAllFlatColumns()],S=>S.reduce((w,j)=>(w[j.id]=j,w),{}),Ne(n,"debugColumns")),getAllLeafColumns:we(()=>[u.getAllColumns(),u._getOrderColumnsFn()],(S,w)=>{let j=S.flatMap(N=>N.getLeafColumns());return w(j)},Ne(n,"debugColumns")),getColumn:S=>u._getAllFlatColumnsById()[S]};Object.assign(u,v);for(let S=0;S<u._features.length;S++){const w=u._features[S];w==null||w.createTable==null||w.createTable(u)}return u}function D1(){return n=>we(()=>[n.options.data],a=>{const i={rows:[],flatRows:[],rowsById:{}},o=function(u,d,h){d===void 0&&(d=0);const m=[];for(let y=0;y<u.length;y++){const x=cE(n,n._getRowId(u[y],y,h),u[y],y,d,void 0,h==null?void 0:h.id);if(i.flatRows.push(x),i.rowsById[x.id]=x,m.push(x),n.options.getSubRows){var g;x.originalSubRows=n.options.getSubRows(u[y],y),(g=x.originalSubRows)!=null&&g.length&&(x.subRows=o(x.originalSubRows,d+1,x))}}return m};return i.rows=o(a),i},Ne(n.options,"debugTable","getRowModel",()=>n._autoResetPageIndex()))}function L1(){return n=>we(()=>[n.getState().expanded,n.getPreExpandedRowModel(),n.options.paginateExpandedRows],(a,i,o)=>!i.rows.length||a!==!0&&!Object.keys(a??{}).length||!o?i:QE(i),Ne(n.options,"debugTable"))}function QE(n){const a=[],i=o=>{var u;a.push(o),(u=o.subRows)!=null&&u.length&&o.getIsExpanded()&&o.subRows.forEach(i)};return n.rows.forEach(i),{rows:a,flatRows:n.flatRows,rowsById:n.rowsById}}function YE(){return n=>we(()=>[n.getState().sorting,n.getPreSortedRowModel()],(a,i)=>{if(!i.rows.length||!(a!=null&&a.length))return i;const o=n.getState().sorting,u=[],d=o.filter(g=>{var y;return(y=n.getColumn(g.id))==null?void 0:y.getCanSort()}),h={};d.forEach(g=>{const y=n.getColumn(g.id);y&&(h[g.id]={sortUndefined:y.columnDef.sortUndefined,invertSorting:y.columnDef.invertSorting,sortingFn:y.getSortingFn()})});const m=g=>{const y=g.map(x=>({...x}));return y.sort((x,v)=>{for(let w=0;w<d.length;w+=1){var S;const j=d[w],N=h[j.id],M=N.sortUndefined,A=(S=j==null?void 0:j.desc)!=null?S:!1;let C=0;if(M){const D=x.getValue(j.id),O=v.getValue(j.id),z=D===void 0,_=O===void 0;if(z||_){if(M==="first")return z?-1:1;if(M==="last")return z?1:-1;C=z&&_?0:z?M:-M}}if(C===0&&(C=N.sortingFn(x,v,j.id)),C!==0)return A&&(C*=-1),N.invertSorting&&(C*=-1),C}return x.index-v.index}),y.forEach(x=>{var v;u.push(x),(v=x.subRows)!=null&&v.length&&(x.subRows=m(x.subRows))}),y};return{rows:m(i.rows),flatRows:u,rowsById:i.rowsById}},Ne(n.options,"debugTable","getSortedRowModel",()=>n._autoResetPageIndex()))}/**
|
|
280
280
|
* react-table
|
|
281
281
|
*
|
|
282
282
|
* Copyright (c) TanStack
|
|
@@ -285,4 +285,4 @@ Error generating stack: `+a.message+`
|
|
|
285
285
|
* LICENSE.md file in the root directory of this source tree.
|
|
286
286
|
*
|
|
287
287
|
* @license MIT
|
|
288
|
-
*/function Vu(n,s){return n?tN(n)?E.createElement(n,s):n:null}function tN(n){return nN(n)||typeof n=="function"||lN(n)}function nN(n){return typeof n=="function"&&(()=>{const s=Object.getPrototypeOf(n);return s.prototype&&s.prototype.isReactComponent})()}function lN(n){return typeof n=="object"&&typeof n.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(n.$$typeof.description)}function ox(n){const s={state:{},onStateChange:()=>{},renderFallbackValue:null,...n},[i]=E.useState(()=>({current:JE(s)})),[r,u]=E.useState(()=>i.current.initialState);return i.current.setOptions(d=>({...d,...n,state:{...r,...n.state},onStateChange:h=>{u(h),n.onStateChange==null||n.onStateChange(h)}})),i.current}function $u({value:n,onChange:s,label:i="Search mutations",placeholder:r="Search gene, change or locus",shortcut:u=!0,delay:d=250}){const[h,m]=E.useState(n),p=E.useRef(null),y=E.useRef(s);y.current=s,E.useEffect(()=>m(n),[n]),E.useEffect(()=>{if(h===n)return;const v=window.setTimeout(()=>y.current(h),d);return()=>window.clearTimeout(v)},[h,n,d]),E.useEffect(()=>{if(!u)return;const v=b=>{var w,C,N;b.key!=="/"||b.metaKey||b.ctrlKey||b.altKey||(C=(w=b.target)==null?void 0:w.closest)!=null&&C.call(w,"input, textarea, select, [contenteditable]")||(b.preventDefault(),(N=p.current)==null||N.focus())};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[u]);const x=()=>{m(""),s("")};return f.jsxs("div",{className:"tsearch",children:[f.jsx(Du,{size:15,"aria-hidden":!0}),f.jsx("input",{ref:p,type:"search","aria-label":i,placeholder:r,value:h,onChange:v=>{m(v.target.value),d===0&&s(v.target.value)},onKeyDown:v=>{v.key==="Escape"&&x(),v.key==="Enter"&&s(h)}}),h?f.jsx("button",{type:"button",className:"search-clear","aria-label":"Clear the search",onClick:x,children:f.jsx(Qu,{size:14,"aria-hidden":!0})}):u?f.jsx("kbd",{className:"kbd","aria-hidden":!0,children:"/"}):null]})}const nh=n=>n.toLocaleString("en-US");function Wu({shown:n,total:s,noun:i,loaded:r=!1,note:u}){const h=n>=s?`${nh(s)} ${s===1?i[0]:i[1]}`:`${nh(n)} of ${nh(s)} ${i[1]}${r?" loaded":""}`;return f.jsxs("div",{className:"vt-foot",role:"status",children:[u?f.jsx("span",{className:"vt-foot-note",children:u}):null,f.jsx("span",{className:"vt-foot-count",children:h})]})}function aN(n){return typeof n=="object"?n.key:n}function sN(n,s){const i=n.length;return new Proxy(n,{get(r,u,d){if(typeof u=="string"){const h=u.charCodeAt(0);if(h>=48&&h<=57){const m=+u;if(Number.isInteger(m)&&m>=0&&m<i){let p=r[m];if(typeof p!="object"){const y=s[m*2];p=r[m]={index:m,key:p,start:y,size:s[m*2+1],end:y+s[m*2+1],lane:0}}return p}}if(u==="length")return i}return Reflect.get(r,u,d)}})}function ai(n,s,i){let r=i.initialDeps??[],u,d=!0;function h(){const m=n();return(m.length!==r.length||m.some((y,x)=>r[x]!==y))&&(r=m,u=s(...m),i!=null&&i.onChange&&!(d&&i.skipInitialOnChange)&&i.onChange(u),d=!1),u}return h.updateDeps=m=>{r=m},h}function Cy(n,s){if(n===void 0)throw new Error("Unexpected undefined");return n}const jy=(n,s)=>Math.abs(n-s)<1.01,iN=(n,s,i)=>{let r;return Object.assign(function(...u){n.clearTimeout(r),r=n.setTimeout(()=>s.apply(this,u),i)},{cancel:()=>{n.clearTimeout(r)}})};let Nr;const lh=()=>{if(Nr!==void 0)return Nr;if(typeof navigator>"u")return Nr=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return Nr=!0;const n=navigator.maxTouchPoints;return Nr=navigator.platform==="MacIntel"&&n!==void 0&&n>0},Ey=n=>{const{offsetWidth:s,offsetHeight:i}=n;return{width:s,height:i}},rN=n=>n,oN=n=>{const s=Math.max(n.startIndex-n.overscan,0),r=Math.min(n.endIndex+n.overscan,n.count-1)-s+1,u=new Array(r);for(let d=0;d<r;d++)u[d]=s+d;return u},uN=(n,s)=>{const i=n.scrollElement;if(!i)return;const r=n.targetWindow;if(!r)return;const u=h=>{const{width:m,height:p}=h;s({width:Math.round(m),height:Math.round(p)})};if(u(Ey(i)),!r.ResizeObserver)return()=>{};const d=new r.ResizeObserver(h=>{const m=()=>{const p=h[0];if(p!=null&&p.borderBoxSize){const y=p.borderBoxSize[0];if(y){u({width:y.inlineSize,height:y.blockSize});return}}u(Ey(i))};n.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(m):m()});return d.observe(i,{box:"border-box"}),()=>{d.unobserve(i)}},Fu={passive:!0},cN=typeof window>"u"?!0:"onscrollend"in window,fN=(n,s,i)=>{const r=n.scrollElement;if(!r)return;const u=n.targetWindow;if(!u)return;const d=n.options.useScrollendEvent&&cN;let h=0;const m=d?null:iN(u,()=>s(i(r),!1),n.options.isScrollingResetDelay),p=v=>()=>{h=i(r),m==null||m(),s(h,v)},y=p(!0),x=p(!1);return r.addEventListener("scroll",y,Fu),d&&r.addEventListener("scrollend",x,Fu),()=>{r.removeEventListener("scroll",y),d&&r.removeEventListener("scrollend",x),m==null||m.cancel()}},dN=(n,s)=>fN(n,s,i=>{const{horizontal:r,isRtl:u}=n.options;return r?i.scrollLeft*(u&&-1||1):i.scrollTop}),hN=(n,s,i)=>{if(i.options.useCachedMeasurements){const r=i.indexFromElement(n),u=i.options.getItemKey(r);return i.itemSizeCache.get(u)??i.options.estimateSize(r)}if(s!=null&&s.borderBoxSize){const r=s.borderBoxSize[0];if(r)return Math.round(r[i.options.horizontal?"inlineSize":"blockSize"])}if(!s){const r=i.indexFromElement(n),u=i.options.getItemKey(r),d=i.itemSizeCache.get(u);if(d!==void 0)return d}return n[i.options.horizontal?"offsetWidth":"offsetHeight"]},mN=(n,{adjustments:s=0,behavior:i},r)=>{var u,d;(d=(u=r.scrollElement)==null?void 0:u.scrollTo)==null||d.call(u,{[r.options.horizontal?"left":"top"]:n+s,behavior:i})},gN=mN;function pN(n,s,i,r){if(s===0)return!1;const u=r(0),d=new Set;let h=0;for(;h<n;){const p=i(h);if(p===u)break;d.add(p),h++}const m=n-h;if(m===0||m>=s)return!1;for(let p=0;p<m;p++)if(r(p)!==i(h+p))return!1;for(let p=m;p<s;p++)if(d.has(r(p)))return!1;return!0}class vN{constructor(s){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this._clampedAdjustment=null,this.elementsCache=new Map,this.now=()=>{var i,r,u;return((u=(r=(i=this.targetWindow)==null?void 0:i.performance)==null?void 0:r.now)==null?void 0:u.call(r))??Date.now()},this.observer=(()=>{let i=null;const r=()=>i||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:i=new this.targetWindow.ResizeObserver(u=>{u.forEach(d=>{const h=()=>{const m=d.target,p=this.indexFromElement(m);if(!m.isConnected){this.observer.unobserve(m);for(const[y,x]of this.elementsCache)if(x===m){this.elementsCache.delete(y);break}return}this.isIndexInRange(p)&&this.shouldMeasureDuringScroll(p)&&this.resizeItem(p,this.options.measureElement(m,d,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(h):h()})}));return{disconnect:()=>{var u;(u=r())==null||u.disconnect(),i=null},observe:u=>{var d;return(d=r())==null?void 0:d.observe(u,{box:"border-box"})},unobserve:u=>{var d;return(d=r())==null?void 0:d.unobserve(u)}}})(),this.range=null,this.setOptions=i=>{var r;const u={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:rN,rangeExtractor:oN,onChange:()=>{},measureElement:hN,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",useCachedMeasurements:!1};for(const v in i){const b=i[v];b!==void 0&&(u[v]=b)}const d=this.options;let h=null,m=null,p=!1;if(d!==void 0&&d.enabled&&u.enabled&&u.anchorTo==="end"&&this.scrollElement!==null){const v=d.count,b=u.count,w=this.getMeasurements(),C=((r=this._singleLaneMeasurements)==null?void 0:r.items)??w,N=T=>aN(C[T]),M=v>0?N(0):null,R=v>0?N(v-1):null;if(b!==v||v>0&&b>0&&(u.getItemKey(0)!==M||u.getItemKey(b-1)!==R)){p=!0;const T=v>0?this.getVirtualItemForOffset(this.getScrollOffset())??w[0]:null;T&&(h=[T.key,this.getScrollOffset()-T.start]);const H=u.followOnAppend===!0?"auto":u.followOnAppend||null;H&&b>0&&this.isAtEnd(d.scrollEndThreshold)&&(v===0||u.getItemKey(b-1)!==R)&&(b>v||pN(v,b,N,u.getItemKey))&&(m=H)}}this.options=u,p&&(this.pendingMin=0,this.itemSizeCacheVersion++);let y=!1,x=0;if(h&&this.scrollOffset!==null){const[v,b]=h,w=this.getMeasurements(),{count:C,getItemKey:N}=this.options;let M=0;for(;M<C&&N(M)!==v;)M++;if(M<C){const R=w[M];if(R){const j=Math.max(0,R.start+b);!m&&j!==this.scrollOffset&&(x=j-this.scrollOffset,this.scrollOffset=j,y=!0)}}}(y||m)&&(this.pendingScrollAnchor=[y?h[0]:null,y?h[1]:0,m,x])},this.notify=i=>{var r,u;(u=(r=this.options).onChange)==null||u.call(r,this,i)},this.maybeNotify=ai(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),i=>{this.notify(i)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(i=>i()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.isScrolling=!1,this.scrollDirection=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._clampedAdjustment=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var i,r;const u=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==u){if(this.cleanup(),!u){this.maybeNotify();return}if(this.scrollElement=u,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((i=this.scrollElement)==null?void 0:i.window)??null,this.elementsCache.forEach(h=>{this.observer.observe(h)}),this.unsubs.push(this.options.observeElementRect(this,h=>{this.scrollRect=h,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(h,m)=>{if(m&&this._intendedScrollOffset===null&&h===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(h-this._intendedScrollOffset)<1.5&&(h=this._intendedScrollOffset),this._intendedScrollOffset=null,this._clampedAdjustment!==null&&Math.abs(h-this._clampedAdjustment.maxAtWrite)>=1.5&&(this._clampedAdjustment=null),this.scrollAdjustments=0;const p=this.getScrollOffset();this.scrollDirection=m?p===h?this.scrollDirection:p<h?"forward":"backward":null,this.scrollOffset=h,this.isScrolling=m,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),"addEventListener"in this.scrollElement){const h=this.scrollElement,m=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},p=()=>{this._iosTouching=!1,!(!lh()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};h.addEventListener("touchstart",m,Fu),h.addEventListener("touchend",p,Fu),this.unsubs.push(()=>{h.removeEventListener("touchstart",m),h.removeEventListener("touchend",p),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}const d=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,d&&this.scrollElement&&this.options.enabled){const[h,m,p,y]=d;h!==null&&!p&&(lh()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?y!==0&&(this._iosDeferredAdjustment+=y):((r=this.scrollState)==null?void 0:r.behavior)==="smooth"&&!jy(this.getScrollOffset()-y,this.scrollState.lastTargetOffset)||this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),p&&this.scrollToEnd({behavior:p})}this._retryClampedAdjustment()},this._retryClampedAdjustment=()=>{if(this._clampedAdjustment===null||!this.scrollElement||!this.options.enabled)return;const{target:i,maxAtWrite:r}=this._clampedAdjustment,u=this.getMaxScrollOffset();u>r+.5&&(this._clampedAdjustment=i>u+.5?{target:i,maxAtWrite:u}:null,this._scrollToOffset(i,{adjustments:void 0,behavior:void 0}))},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;const i=this.getScrollOffset(),r=this.getMaxScrollOffset();if(i<0||i>r)return;if(this._iosDeferredAdjustment<0&&i>=r-1){this._iosDeferredAdjustment=0;return}const u=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(i,{adjustments:this.scrollAdjustments+=u,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=ai(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(i,r,u,d,h,m,p,y)=>(this.prevLanes!==void 0&&this.prevLanes!==m&&(this.lanesChangedFlag=!0),this.prevLanes=m,this.pendingMin=null,{count:i,paddingStart:r,scrollMargin:u,getItemKey:d,enabled:h,lanes:m,laneAssignmentMode:p,gap:y}),{key:!1}),this.isIndexInRange=i=>i>=0&&i<this.options.count,this.getMeasurements=ai(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:i,paddingStart:r,scrollMargin:u,getItemKey:d,enabled:h,lanes:m,laneAssignmentMode:p,gap:y},x)=>{var v;const b=this.itemSizeCache;if(!h)return this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>i)for(const j of this.laneAssignments.keys())j>=i&&this.laneAssignments.delete(j);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(j=>{this.itemSizeCache.set(j.key,j.size)}));const w=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===i&&(this.lanesSettling=!1),m===1){const j=i*2;let F=(v=this._singleLaneMeasurements)==null?void 0:v.flat;if(!F||F.length<j){const z=new Float64Array(j);F&&w>0&&z.set(F.subarray(0,w*2)),F=z}const T=w===0?new Array(i):this._singleLaneMeasurements.items.slice();let H;if(w===0)H=r+u;else{const z=w-1;H=F[z*2]+F[z*2+1]+y}for(let z=w;z<i;z++){const Y=d(z);T[z]=Y;const te=b.get(Y),k=typeof te=="number"?te:this.options.estimateSize(z);F[z*2]=H,F[z*2+1]=k,H+=k+y}this._singleLaneMeasurements={flat:F,items:T};const D=sN(T,F);return this.measurementsCache=D,D}const C=this.measurementsCache.slice(0,w),N=new Array(m).fill(void 0),M=new Float64Array(m);let R=0;for(let j=0;j<w;j++){const F=C[j];F&&(N[F.lane]===void 0&&R++,N[F.lane]=j,M[F.lane]=F.end)}for(let j=w;j<i;j++){const F=d(j),T=this.laneAssignments.get(j);let H,D;const z=p==="estimate"||b.has(F);if(T!==void 0&&this.options.lanes>1){H=T;const ne=N[H],ie=ne!==void 0?C[ne]:void 0;D=ie?ie.end+y:r+u}else if(R===m){let ne=0,ie=M[0],Ce=N[0];for(let X=1;X<m;X++){const ee=M[X];(ee<ie||ee===ie&&N[X]<Ce)&&(ne=X,ie=ee,Ce=N[X])}H=ne,D=ie+y,z&&this.laneAssignments.set(j,H)}else H=j%this.options.lanes,D=r+u,z&&this.laneAssignments.set(j,H);const Y=b.get(F),te=typeof Y=="number"?Y:this.options.estimateSize(j),k=D+te;C[j]={index:j,start:D,size:te,end:k,key:F,lane:H},N[H]===void 0&&R++,N[H]=j,M[H]=k}return this.measurementsCache=C,C},{key:!1,debug:()=>this.options.debug}),this.calculateRange=ai(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(i,r,u,d)=>i.length===0||r===0?(this.range=null,null):(this.range=xN(i,r,u,d,d===1&&this._singleLaneMeasurements!==null?this._singleLaneMeasurements.flat:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=ai(()=>{let i=null,r=null;const u=this.calculateRange();return u&&(i=u.startIndex,r=u.endIndex),this.maybeNotify.updateDeps([this.isScrolling,i,r]),[this.options.rangeExtractor,this.options.overscan,this.options.count,i,r]},(i,r,u,d,h)=>d===null||h===null?[]:i({startIndex:d,endIndex:h,overscan:r,count:u}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=i=>{const r=this.options.indexAttribute,u=i.getAttribute(r);return u?parseInt(u,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=i=>{var r;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const u=this.scrollState.index??((r=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:r.index);if(u!==void 0&&this.range){const d=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),h=Math.max(0,u-d),m=Math.min(this.options.count-1,u+d);return i>=h&&i<=m}return!0},this.measureElement=i=>{if(!i){this.elementsCache.forEach((h,m)=>{h.isConnected||(this.observer.unobserve(h),this.elementsCache.delete(m))});return}const r=this.indexFromElement(i);if(!this.isIndexInRange(r))return;const u=this.options.getItemKey(r),d=this.elementsCache.get(u);d!==i&&(d&&this.observer.unobserve(d),this.observer.observe(i),this.elementsCache.set(u,i)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(r)&&this.resizeItem(r,this.options.measureElement(i,void 0,this))},this.resizeItem=(i,r)=>{var u,d,h;if(!this.isIndexInRange(i))return;let m,p,y;const x=(u=this._singleLaneMeasurements)==null?void 0:u.flat;if(this.options.lanes===1&&x!=null)y=this.options.getItemKey(i),p=x[i*2],m=x[i*2+1];else{const w=this.measurementsCache[i];if(!w)return;y=w.key,p=w.start,m=w.size}const v=this.itemSizeCache.get(y)??m,b=r-v;if(b!==0){const w=this.options.anchorTo==="end"&&((d=this.scrollState)==null?void 0:d.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,C=w?this.getTotalSize():0,N=this.getScrollOffset()+this.scrollAdjustments,R=!this.itemSizeCache.has(y)?p<N:p+v<=N&&this.scrollDirection!=="backward",j=((h=this.scrollState)==null?void 0:h.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[i]??{index:i,key:y,start:p,size:m,end:p+m,lane:0},b,this):R);(this.pendingMin===null||i<this.pendingMin)&&(this.pendingMin=i),this.itemSizeCache.set(y,r),this.itemSizeCacheVersion++;let F=!1;w?F=this.applyScrollAdjustment(this.getTotalSize()-C):j&&(F=this.applyScrollAdjustment(b)),this.notify(F),this._retryClampedAdjustment()}},this.getVirtualItems=ai(()=>[this.getVirtualIndexes(),this.getMeasurements()],(i,r)=>{const u=[];for(let d=0,h=i.length;d<h;d++){const m=i[d],p=r[m];u.push(p)}return u},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=i=>{var r;const u=this.getMeasurements();if(u.length===0)return;const d=(r=this._singleLaneMeasurements)==null?void 0:r.flat,h=this.options.lanes===1&&d!=null,m=ux(0,u.length-1,h?p=>d[p*2]:p=>Cy(u[p]).start,i);return Cy(u[m])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const i=this.scrollElement.document.documentElement;return this.options.horizontal?i.scrollWidth-this.scrollElement.innerWidth:i.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(i=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=i,this.getOffsetForAlignment=(i,r,u=0)=>{if(!this.scrollElement)return 0;const d=this.getSize(),h=this.getScrollOffset();r==="auto"&&(r=i>=h+d?"end":"start"),r==="center"?i+=(u-d)/2:r==="end"&&(i-=d);const m=this.getMaxScrollOffset();return Math.max(Math.min(m,i),0)},this.getOffsetForIndex=(i,r="auto")=>{i=Math.max(0,Math.min(i,this.options.count-1));const u=this.getSize(),d=this.getScrollOffset(),h=this.measurementsCache[i];if(!h)return;if(r==="auto")if(h.end>=d+u-this.options.scrollPaddingEnd)r="end";else if(h.start<=d+this.options.scrollPaddingStart)r="start";else return[d,r];if(r==="end"&&i===this.options.count-1)return[this.getMaxScrollOffset(),r];const m=r==="end"?h.end+this.options.scrollPaddingEnd:h.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(m,r,h.size),r]},this.scrollToOffset=(i,{align:r="start",behavior:u="auto"}={})=>{this._iosDeferredAdjustment=0;const d=this.getOffsetForAlignment(i,r),h=this.now();this.scrollState={index:null,align:r,behavior:u,startedAt:h,lastTargetOffset:d,stableFrames:0},this._scrollToOffset(d,{adjustments:void 0,behavior:u}),this.scheduleScrollReconcile()},this.scrollToIndex=(i,{align:r="auto",behavior:u="auto"}={})=>{this._iosDeferredAdjustment=0,i=Math.max(0,Math.min(i,this.options.count-1));const d=this.getOffsetForIndex(i,r);if(!d)return;const[h,m]=d,p=this.now();this.scrollState={index:i,align:m,behavior:u,startedAt:p,lastTargetOffset:h,stableFrames:0},this._scrollToOffset(h,{adjustments:void 0,behavior:u}),this.scheduleScrollReconcile()},this.scrollBy=(i,{behavior:r="auto"}={})=>{const u=this.getScrollOffset()+i,d=this.now();this.scrollState={index:null,align:"start",behavior:r,startedAt:d,lastTargetOffset:u,stableFrames:0},this._scrollToOffset(u,{adjustments:void 0,behavior:r}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:i="auto"}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:"end",behavior:i});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:i})},this.getTotalSize=()=>{var i,r;const u=this.getMeasurements();let d;if(u.length===0)d=this.options.paddingStart;else if(this.options.lanes===1){const h=u.length-1,m=(i=this._singleLaneMeasurements)==null?void 0:i.flat;m!=null?d=m[h*2]+m[h*2+1]:d=((r=u[h])==null?void 0:r.end)??0}else{const h=Array(this.options.lanes).fill(null);let m=u.length-1;for(;m>=0&&h.some(p=>p===null);){const p=u[m];h[p.lane]===null&&(h[p.lane]=p.end),m--}d=Math.max(...h.filter(p=>p!==null))}return Math.max(d-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{const i=[];if(this.itemSizeCache.size===0)return i;const r=this.getMeasurements();for(const u of r)u&&this.itemSizeCache.has(u.key)&&i.push({index:u.index,key:u.key,start:u.start,size:u.size,end:u.end,lane:u.lane});return i},this._scrollToOffset=(i,{adjustments:r,behavior:u})=>{this._intendedScrollOffset=i+(r??0),this.options.scrollToFn(i,{behavior:u,adjustments:r},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(s)}applyScrollAdjustment(s,i){if(s===0)return!1;if(lh()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded))return this._iosDeferredAdjustment+=s,!1;{const r=this.getScrollOffset()+this.scrollAdjustments+s,u=this.scrollElement,d=u!==null&&("scrollHeight"in u||"document"in u)?this.getMaxScrollOffset():null;return this._clampedAdjustment=d!==null&&r>d+.5?{target:r,maxAtWrite:d}:null,this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=s,behavior:i}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollOffset<0&&(this.scrollOffset=0),this.scrollAdjustments=0),!0}}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const r=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,u=r?r[0]:this.scrollState.lastTargetOffset,d=1,h=u!==this.scrollState.lastTargetOffset;if(!h&&jy(u,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=d){this.getScrollOffset()!==u&&this._scrollToOffset(u,{adjustments:void 0,behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,h){const m=this.getSize()||600,p=Math.abs(u-this.getScrollOffset()),y=this.scrollState.behavior==="smooth"&&p>m;this.scrollState.lastTargetOffset=u,y||(this.scrollState.behavior="auto"),this._scrollToOffset(u,{adjustments:void 0,behavior:y?"smooth":"auto"})}this.scheduleScrollReconcile()}}const ux=(n,s,i,r)=>{for(;n<=s;){const u=(n+s)/2|0,d=i(u);if(d<r)n=u+1;else if(d>r)s=u-1;else return u}return n>0?n-1:0};function yN(n,s,i){let r=0;for(;r<=s;){const u=(r+s)/2|0,d=n[u*2];if(d<i)r=u+1;else if(d>i)s=u-1;else return u}return r>0?r-1:0}function xN(n,s,i,r,u){const d=n.length-1;if(n.length<=r)return{startIndex:0,endIndex:d};if(r===1&&u!==null){const y=yN(u,d,i);let x=y;const v=i+s;for(;x<d&&u[x*2]+u[x*2+1]<v;)x++;return{startIndex:y,endIndex:x}}let m=ux(0,d,y=>n[y].start,i),p=m;if(r===1)for(;p<d&&n[p].end<i+s;)p++;else if(r>1){const y=Array(r).fill(0);for(;p<d&&y.some(v=>v<i+s);){const v=n[p];y[v.lane]=v.end,p++}const x=Array(r).fill(i+s);for(;m>=0&&x.some(v=>v>=i);){const v=n[m];x[v.lane]=v.start,m--}m=Math.max(0,m-m%r),p=Math.min(d,p+(r-1-p%r))}return{startIndex:m,endIndex:p}}const ah=typeof document<"u"?E.useLayoutEffect:E.useEffect;function SN({useFlushSync:n=!0,directDomUpdates:s=!1,directDomUpdatesMode:i="transform",...r}){const u=E.useReducer(v=>v+1,0)[1],d=E.useRef({enabled:s,mode:i,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});d.current.enabled=s,d.current.mode=i;const h=E.useRef(!1),m=v=>{const b=d.current;if(!b.enabled||!b.container)return;const w=v.getTotalSize();if(w!==b.lastSize){b.lastSize=w;const C=v.options.horizontal?"width":"height";b.container.style[C]=`${w}px`}},p=v=>{const b=d.current;if(!b.enabled||!b.container)return;m(v);const w=!!v.options.horizontal,C=b.mode==="transform",N=w?"left":"top",M=v.options.scrollMargin,R=v.getVirtualItems();for(const j of R){const F=j.start-M,T=v.elementsCache.get(j.key);T&&b.lastPositions.get(T)!==F&&(b.lastPositions.set(T,F),C?T.style.transform=w?`translate3d(${F}px, 0, 0)`:`translate3d(0, ${F}px, 0)`:T.style[N]=`${F}px`)}},y={...r,onChange:(v,b)=>{var w;const C=d.current;let N=!0;if(C.enabled){p(v);const M=v.range,R=C.prevRange;N=!R||R.isScrolling!==v.isScrolling||R.startIndex!==(M==null?void 0:M.startIndex)||R.endIndex!==(M==null?void 0:M.endIndex),N&&(C.prevRange=M?{startIndex:M.startIndex,endIndex:M.endIndex,isScrolling:v.isScrolling}:null)}N&&(n&&b&&!h.current?Wh.flushSync(u):u()),(w=r.onChange)==null||w.call(r,v,b)}},[x]=E.useState(()=>{const v=new vN(y),b=v.measureElement;return v.measureElement=w=>{h.current=!0;try{b(w)}finally{h.current=!1}},Object.assign(v,{containerRef:w=>{const C=d.current;if(C.container=w,C.lastSize=null,w&&C.enabled){const N=v.getTotalSize();C.lastSize=N;const M=v.options.horizontal?"width":"height";w.style[M]=`${N}px`}}})});return x.setOptions(y),ah(()=>x._didMount(),[]),ah(()=>(m(x),x._willUpdate())),ah(()=>{p(x)}),x}function bN(n){return SN({observeElementRect:uN,observeElementOffset:dN,scrollToFn:gN,...n})}const cx=33,si=32,wN=25;function fx({items:n,scrollRef:s,columnCount:i,getKey:r,render:u,onEndReached:d,endThreshold:h=15,rowHeight:m=cx}){var M;const p=bN({count:n.length,getScrollElement:()=>s.current,estimateSize:()=>m,overscan:8,scrollMargin:si,getItemKey:R=>r(n[R],R),initialRect:{width:1e3,height:si+m*10}}),y=!((M=p.scrollRect)!=null&&M.height),x=y?n.slice(0,wN).map((R,j)=>({key:r(R,j),index:j,start:si+j*m,end:si+(j+1)*m})):p.getVirtualItems(),v=x[0],b=x[x.length-1],w=(b==null?void 0:b.index)??-1;E.useEffect(()=>{d&&w>=0&&w>=n.length-h&&d()},[w,n.length,h,d]);const C=!y&&v?v.start-si:0,N=!y&&b?p.getTotalSize()-(b.end-si):0;return f.jsxs(f.Fragment,{children:[C>0&&f.jsx("tbody",{"aria-hidden":!0,children:f.jsx("tr",{className:"vt-spacer",style:{height:C},children:f.jsx("td",{colSpan:i})})}),x.map(R=>f.jsx("tbody",{"data-index":R.index,ref:y?void 0:p.measureElement,children:u(n[R.index],R.index)},R.key)),N>0&&f.jsx("tbody",{"aria-hidden":!0,children:f.jsx("tr",{className:"vt-spacer",style:{height:N},children:f.jsx("td",{colSpan:i})})})]})}function ds({text:n,query:s}){const i=s.trim();if(!i||PC(i))return f.jsx(f.Fragment,{children:n});const r=[],u=n.toLowerCase(),d=i.toLowerCase();let h=0;for(let m=u.indexOf(d);m!==-1;m=u.indexOf(d,h))m>h&&r.push(n.slice(h,m)),r.push(f.jsx("mark",{children:n.slice(m,m+i.length)},m)),h=m+i.length;return r.push(n.slice(h)),f.jsx(f.Fragment,{children:r})}function Ny({value:n,max:s,clonal:i}){return n===null?f.jsx("span",{style:{color:"var(--chev)"},children:"–"}):f.jsxs("span",{className:"vbar",children:[f.jsx("span",{className:"vbar-n",children:Oh(n)}),f.jsxs("span",{className:"vbar-track","aria-hidden":!0,children:[f.jsx("span",{className:"vbar-fill",style:{width:`${Math.min(n/s,1)*100}%`}}),i&&f.jsx("span",{className:"vbar-tick",style:{left:`${1/s*100}%`}})]})]})}function CN({variant:n,showDriver:s}){return f.jsxs("span",{className:"flex flex-wrap gap-1.5",children:[s&&n.is_driver&&f.jsx("span",{className:"sc-pill p-neu",children:"Driver"}),n.hotspot&&f.jsx("span",{className:"sc-pill p-hot",children:"Hotspot"}),n.in_dmp&&f.jsx("span",{className:"sc-pill p-dmp",children:"In DMP"}),n.ffpe_removed&&f.jsx("span",{className:"sc-pill p-ffpe",title:"Left out of the report's counts by its FFPE artifact filter",children:"FFPE filtered"})]})}function jN(n){return`${n.ref}>${n.alt}`}function EN({variant:n,onLocate:s}){const[i,r]=E.useState(!1),u=`chr${n.chrom}:${n.pos}`,d=[["Variant",`${n.kind==="snv"?"SNV":n.kind==="indel"?"Indel":n.kind}, ${jN(n)}`],...n.depth!==null?[["Reads",`${n.alt_reads??"?"} of ${n.depth}`]]:[],["Normal VAF",Oh(n.normal_vaf)],["Mutant copies",tj(n.mut_alleles)??"–"],["Consequence",(n.consequence??n.effect??"–").replace(/&/g,", ")],["COSMIC",ej(n.cosmic)??"–"],...n.ffpe_score!==null||n.ffpe_removed?[["FFPE artifact score",n.ffpe_score!==null?Oh(n.ffpe_score):"Not scored"]]:[],["Expression",n.gene_tpm!==null?`${n.gene_tpm.toFixed(1)} TPM`:"–"],["Gene role",nj(n)??"–"]];return f.jsxs("div",{className:"vt-detail-body",children:[f.jsx("dl",{className:"vt-facts",children:d.map(([h,m])=>f.jsxs("div",{children:[f.jsx("dt",{children:h}),f.jsx("dd",{children:m})]},h))}),f.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[f.jsxs("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:()=>s(n),children:[f.jsx(Ah,{size:14,"aria-hidden":!0}),"Show on copy number"]}),f.jsxs("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:async()=>{try{await navigator.clipboard.writeText(u),r(!0),window.setTimeout(()=>r(!1),1500)}catch{window.prompt("Copy this locus",u)}},children:[f.jsx(R1,{size:14,"aria-hidden":!0}),i?"Copied":"Copy locus"]})]})]})}function NN({sort:n,current:s,onSort:i}){const r=s.replace(/^-/,"")===n.key,u=s.startsWith("-"),d=r?u?n.key:`-${n.key}`:n.descFirst?`-${n.key}`:n.key;return f.jsxs("button",{type:"button",className:"vt-sort","data-active":r,onClick:()=>i(d),title:`Sort by ${n.label.toLowerCase()}`,children:[n.label,r&&u?f.jsx(zu,{size:12,"aria-hidden":!0}):r?f.jsx(N1,{size:12,"aria-hidden":!0}):f.jsx(zu,{size:12,"aria-hidden":!0,className:"vt-sort-idle"})]})}function _N({data:n,rows:s,hasMore:i,loadingMore:r,onMore:u,table:d,fetching:h,showCcf:m,onTable:p,onHover:y,onLocate:x}){const[v,b]=E.useState({}),w=d.q,C=d.scope!=="drivers",N=E.useMemo(()=>[{id:"expand",header:()=>f.jsx("span",{className:"sr-only",children:"Details"}),meta:{className:"pin vt-x"},cell:({row:D})=>f.jsx("button",{type:"button",className:"vt-expand","aria-expanded":D.getIsExpanded(),"aria-label":`Details of ${D.original.gene??"this mutation"} ${D.original.protein_change??""}`.trim(),onClick:z=>{z.stopPropagation(),D.toggleExpanded()},onFocus:()=>y(D.original),children:f.jsx(nm,{size:14,"aria-hidden":!0})})},{id:"gene",header:"Gene",meta:{className:"pin vt-g",sorts:[{key:"gene",label:"Gene"},{key:"position",label:"Position"}]},cell:({row:{original:D}})=>f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"vt-gene",children:f.jsx(ds,{text:D.gene??"–",query:w})}),f.jsx("span",{className:"vt-sub mono",children:Fr(D.chrom,D.pos)})]})},{id:"change",header:"Change",cell:({row:{original:D}})=>f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"mono text-[12.5px] font-medium",children:f.jsx(ds,{text:D.protein_change??"–",query:w})}),D.cdna_change&&f.jsx("span",{className:"vt-sub mono",children:f.jsx(ds,{text:D.cdna_change,query:w})})]})},{id:"effect",header:"Effect",meta:{sorts:[{key:"effect",label:"Effect"}]},cell:({row:{original:D}})=>f.jsx("span",{className:D.effect_class==="truncating"?"font-semibold":void 0,children:_C(D.consequence,D.effect)})},{id:"vaf",header:"VAF",meta:{className:"n",sorts:[{key:"vaf",label:"VAF",descFirst:!0}]},cell:({row:{original:D}})=>f.jsx(Ny,{value:D.vaf,max:1})},...m?[{id:"ccf",header:"CCF",meta:{className:"n",sorts:[{key:"ccf",label:"CCF",descFirst:!0}]},cell:({row:{original:D}})=>f.jsx(Ny,{value:D.ccf,max:1.25,clonal:!0})}]:[],{id:"flags",header:"Flags",cell:({row:{original:D}})=>f.jsx(CN,{variant:D,showDriver:C})}],[w,C,m,y]),M=ox({data:s,columns:N,getRowId:ZC,getCoreRowModel:ix(),getExpandedRowModel:rx(),getRowCanExpand:()=>!0,manualPagination:!0,state:{expanded:v},onExpandedChange:b}),R=d.sort.replace(/^-/,""),j=M.getVisibleLeafColumns().length,F=G1(d)>0,T=E.useRef(null),H=JSON.stringify([d.scope,d.sort,d.q,d.effects,d.flags,d.range,d.ffpe]);return E.useEffect(()=>{T.current&&(T.current.scrollTop=0)},[H]),f.jsxs("div",{className:"flex min-w-0 flex-col",children:[f.jsx("div",{className:"tbar",children:f.jsx($u,{value:d.q,onChange:D=>p({q:D})})}),f.jsxs("div",{ref:T,className:"vt-scroll vt-viewport",onMouseLeave:()=>y(null),"aria-busy":h,children:[h&&f.jsx("div",{className:"vt-progress","aria-hidden":!0}),f.jsxs("table",{className:"vt",children:[f.jsx("thead",{children:M.getHeaderGroups().map(D=>f.jsx("tr",{children:D.headers.map(z=>{var k;const Y=z.column.columnDef.meta,te=(k=Y==null?void 0:Y.sorts)==null?void 0:k.some(ne=>ne.key===R);return f.jsx("th",{className:Y==null?void 0:Y.className,"aria-sort":te?d.sort.startsWith("-")?"descending":"ascending":void 0,children:Y!=null&&Y.sorts?f.jsx("span",{className:"vt-sorts",children:Y.sorts.map(ne=>f.jsx(NN,{sort:ne,current:d.sort,onSort:ie=>p({sort:ie})},ne.key))}):Vu(z.column.columnDef.header,z.getContext())},z.id)})},D.id))}),f.jsx(fx,{items:M.getRowModel().rows,scrollRef:T,columnCount:j,getKey:D=>D.id,onEndReached:i&&!r?u:void 0,render:D=>f.jsxs(f.Fragment,{children:[f.jsx("tr",{className:"vt-row","data-expanded":D.getIsExpanded(),onClick:()=>D.toggleExpanded(),onMouseEnter:()=>y(D.original),children:D.getVisibleCells().map(z=>{var Y;return f.jsx("td",{className:(Y=z.column.columnDef.meta)==null?void 0:Y.className,children:Vu(z.column.columnDef.cell,z.getContext())},z.id)})}),D.getIsExpanded()&&f.jsx("tr",{className:"vt-detail",children:f.jsx("td",{colSpan:j,children:f.jsx(EN,{variant:D.original,onLocate:x})})})]})}),s.length===0&&f.jsx("tbody",{children:f.jsx("tr",{children:f.jsx("td",{colSpan:j,children:f.jsx("div",{className:"vt-empty",children:F?f.jsxs(f.Fragment,{children:["No mutations match these filters.",f.jsx("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:()=>p({q:"",effects:[],flags:[],range:null}),children:"Clear all filters"})]}):`No ${d.scope==="all"?"":`${d.scope} `}mutations in this sample.`})})})})]})]}),n.total>0&&f.jsx(Wu,{shown:s.length,total:n.total,noun:["mutation","mutations"],loaded:!0,note:r?"Loading more…":s.length<n.total?"Scroll the table for more":void 0})]})}const MN=E.forwardRef(function({variants:s,rows:i,hasMore:r,loadingMore:u,onMore:d,variantsLoading:h,variantsFetching:m,density:p,densityLoading:y,picked:x,measure:v,onMeasure:b,table:w,onTable:C,hovered:N,onHover:M,onLocate:R,showCcf:j},F){var k,ne;const T=(s==null?void 0:s.status)==="ok"?s.data??void 0:void 0,H=T==null?void 0:T.counts,D=(p==null?void 0:p.status)==="ok"?(k=p.data)==null?void 0:k.total:void 0,z=(p==null?void 0:p.status)==="ok"?(ne=p.data)==null?void 0:ne.ffpe:null,Y=ie=>ie===void 0?"":ie.toLocaleString("en-US"),te=w.range&&w.range.measure===v?[w.range.low,w.range.high]:null;return f.jsxs(Ku,{ref:F,title:"Mutations",subtitle:D!==void 0?`${Y(D)} PASS SNVs and indels${z&&!z.shown?", after the FFPE filter":""}`:void 0,lineage:K1(p==null?void 0:p.lineage,s==null?void 0:s.lineage),picked:x,className:"mut",info:"mutations",expandable:!0,controls:f.jsx(f.Fragment,{children:f.jsx(Zu,{label:"Which mutations",value:w.scope,onChange:ie=>C({scope:ie,sort:k1[ie]}),options:[{value:"drivers",label:f.jsxs(f.Fragment,{children:["Drivers",f.jsx("span",{className:"seg-n",children:Y(H==null?void 0:H.drivers)})]})},{value:"coding",label:f.jsxs(f.Fragment,{children:["Coding",f.jsx("span",{className:"seg-n",children:Y(H==null?void 0:H.coding)})]})},{value:"all",label:f.jsxs(f.Fragment,{children:["All",f.jsx("span",{className:"seg-n",children:Y(H==null?void 0:H.all)})]})}]})}),children:[f.jsx(uE,{envelope:p,loading:y,measure:v,onMeasure:b,range:te,focus:N,onRange:ie=>{!ie&&!w.range||C({range:ie?{measure:v,low:ie[0],high:ie[1]}:null})},onGene:ie=>C({q:ie})}),T&&s&&s.warnings.length>0&&f.jsx("div",{className:"px-5 py-2 text-xs",role:"note",style:{color:"var(--warn-ink)"},children:s.warnings.join(" ")}),T?f.jsxs("div",{className:"mut-body",children:[f.jsx(dE,{table:w,data:T,onChange:C}),f.jsx(_N,{data:T,rows:i,hasMore:r,loadingMore:u,onMore:d,table:w,fetching:m,showCcf:j,onTable:C,onHover:M,onLocate:R})]}):f.jsx("div",{className:"mut-rule",children:f.jsx(Zr,{label:"mutations",envelope:s,loading:h,skeletonHeight:240,children:()=>null})})]})}),um={oncogene:"Oncogene",tsg:"Tumour suppressor",both:"Oncogene and TSG"},dx=["oncogene","tsg","both"],cm={deletion:"Deletion","tandem-duplication":"Tandem duplication",inversion:"Inversion",translocation:"Translocation"},RN={"<1kb":"<1 kb","1kb-10kb":"1–10 kb","10kb-100kb":"10–100 kb","100kb-1Mb":"100 kb–1 Mb",">1Mb":">1 Mb"};function TN(n){return n?RN[n]??n:""}const AN={DEL:"Deletion",DUP:"Duplication",INV:"Inversion",TRA:"Translocation",BND:"Breakend",INS:"Insertion"};function fm(n){return n?AN[n]??n:"–"}function ON(n){return n==null?"–":n>=1e6?`${(n/1e6).toLocaleString("en-US",{maximumFractionDigits:1})} Mb`:n>=1e3?`${(n/1e3).toLocaleString("en-US",{maximumFractionDigits:1})} kb`:`${n.toLocaleString("en-US")} bp`}function zN(n){return n.some(s=>s.left_expression||s.right_expression||s.expression)}function DN(n){const s={oncogene:0,tsg:0,both:0};for(const i of n)i.role&&(s[i.role]+=1);return s}function HN(n){const s=n.trim().match(Y1);if(!s)return null;const i=Number(s[2].replace(/,/g,"")),r=s[3]?Number(s[3].replace(/,/g,"")):i;return{chrom:s[1].toUpperCase(),start:Math.min(i,r),end:Math.max(i,r)}}function LN(n,s){const i=s.trim().toLowerCase();if(!i)return!0;const r=HN(s);if(r){const u=(d,h)=>(d==null?void 0:d.toUpperCase())===r.chrom&&h!==null&&h>=r.start&&h<=r.end;return u(n.left_chrom,n.left_pos)||u(n.right_chrom,n.right_pos)}return[n.gene,n.left_gene,n.right_gene,n.callers,n.left_loc,n.right_loc,n.sv_type,fm(n.sv_type),n.role?um[n.role]:null].some(u=>u==null?void 0:u.toLowerCase().includes(i))}const Wa={deletion:"var(--sv-del)","tandem-duplication":"var(--sv-dup)",inversion:"var(--sv-inv)",translocation:"var(--sv-tra)"},UN={deletion:"Deletion","tandem-duplication":"Tandem dup.",inversion:"Inversion",translocation:"Transl."},VN={"<1kb":"<1k","1kb-10kb":"10k","10kb-100kb":"100k","100kb-1Mb":"1M",">1Mb":">1M"};function $N(n){return n.size?VN[n.size]??n.size:""}function _y(n){const s=`${n.clustered?"Clustered":"Dispersed"} ${cm[n.sv_class].toLowerCase()}s`;return n.size?`${s}, ${TN(n.size)}`:s}function FN(n){const s=[];return n.forEach((i,r)=>{const u=s[s.length-1];u&&u.clustered===i.clustered&&u.sv_class===i.sv_class?u.end=r:s.push({clustered:i.clustered,sv_class:i.sv_class,start:r,end:r})}),s}function BN(n){const s=new Map;for(const i of n)s.set(i.sv_class,(s.get(i.sv_class)??0)+i.count);return[...s].map(([i,r])=>({sv_class:i,count:r}))}const kN=45;function GN({role:n}){return n?f.jsx("span",{className:`sc-pill p-${n==="oncogene"?"onco":n}`,children:um[n]}):f.jsx("span",{style:{color:"var(--chev)"},children:"–"})}function qN({rows:n,shown:s,onToggle:i}){const r=DN(n);return f.jsx("div",{className:"sv-legend",role:"group","aria-label":"Show rows by gene role",children:dx.filter(u=>r[u]>0).map(u=>f.jsxs("button",{type:"button",className:`sv-legend-item p-${u==="oncogene"?"onco":u}`,"aria-pressed":s.includes(u),onClick:()=>i(u),children:[um[u],f.jsx("span",{className:"sv-legend-n",children:r[u]})]},u))})}function My({gene:n,chrom:s,pos:i,loc:r,query:u}){return f.jsxs(f.Fragment,{children:[f.jsxs("span",{className:"sv-end",children:[f.jsx("span",{className:"vt-gene",children:f.jsx(ds,{text:n||"–",query:u})}),r&&f.jsx("span",{className:"sv-loc",children:r})]}),f.jsx("span",{className:"vt-sub stack mono",children:s&&i!==null?Fr(s,i):"–"})]})}function hx(n){return n?n.replace(/,\s*/g,", "):"–"}function QN({label:n,sorted:s,onClick:i}){return f.jsxs("button",{type:"button",className:"vt-sort","data-active":!!s,onClick:i,title:`Sort by ${n.toLowerCase()}`,children:[n,s==="desc"?f.jsx(zu,{size:12,"aria-hidden":!0}):s==="asc"?f.jsx(N1,{size:12,"aria-hidden":!0}):f.jsx(zu,{size:12,"aria-hidden":!0,className:"vt-sort-idle"})]})}function YN({row:n,onLocate:s}){const[i,r]=E.useState(!1),u=n.left_chrom&&n.left_pos!==null?{chrom:n.left_chrom,pos:n.left_pos}:null,d=n.right_chrom&&n.right_pos!==null?{chrom:n.right_chrom,pos:n.right_pos}:null,h=[["Type",fm(n.sv_type)],["Left breakpoint",u?`${Fr(u.chrom,u.pos)}${n.left_loc?`, ${n.left_loc}`:""}`:"–"],["Right breakpoint",d?`${Fr(d.chrom,d.pos)}${n.right_loc?`, ${n.right_loc}`:""}`:"–"],["Pileups (left, right)",[n.left_pileup,n.right_pileup].filter(Boolean).join(", ")||"–"],["Orientation",n.orientation??"–"],["Callers",hx(n.callers)]],m=n.gene??n.left_gene,p=n.gene??n.right_gene;return f.jsxs("div",{className:"vt-detail-body",children:[f.jsx("dl",{className:"vt-facts",children:h.map(([y,x])=>f.jsxs("div",{children:[f.jsx("dt",{children:y}),f.jsx("dd",{children:x})]},y))}),f.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u&&f.jsxs("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:()=>s({...u,gene:m}),children:[f.jsx(Ah,{size:14,"aria-hidden":!0}),"Show ",d&&d.chrom===u.chrom?"it":"left breakpoint"," on copy number"]}),d&&d.chrom!==(u==null?void 0:u.chrom)&&f.jsxs("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:()=>s({...d,gene:p}),children:[f.jsx(Ah,{size:14,"aria-hidden":!0}),"Show right breakpoint on copy number"]}),n.igv_locus&&f.jsxs("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:async()=>{try{await navigator.clipboard.writeText(n.igv_locus??""),r(!0),window.setTimeout(()=>r(!1),1500)}catch{window.prompt("Copy these IGV loci",n.igv_locus??"")}},children:[f.jsx(R1,{size:14,"aria-hidden":!0}),i?"Copied":"Copy IGV loci"]})]})]})}function Ry({kind:n,rows:s,total:i=s.length,query:r="",onLocate:u}){const[d,h]=E.useState({}),[m,p]=E.useState([]),y=E.useRef(null),x=zN(s);E.useEffect(()=>{y.current&&(y.current.scrollTop=0)},[r,s.length]);const v=E.useMemo(()=>{const N={id:"expand",header:()=>f.jsx("span",{className:"sr-only",children:"Details"}),enableSorting:!1,meta:{className:"pin vt-x"},cell:({row:j})=>f.jsx("button",{type:"button",className:"vt-expand","aria-expanded":j.getIsExpanded(),"aria-label":`Details of ${j.original.gene??[j.original.left_gene,j.original.right_gene].filter(Boolean).join(" and ")}`,onClick:F=>{F.stopPropagation(),j.toggleExpanded()},children:f.jsx(nm,{size:14,"aria-hidden":!0})})},M=[{id:"type",header:"Type",accessorFn:j=>j.sv_type??"",cell:({row:{original:j}})=>fm(j.sv_type)},{id:"role",header:"Role",accessorFn:j=>j.role?dx.indexOf(j.role):9,cell:({row:{original:j}})=>f.jsx(GN,{role:j.role})},{id:"callers",header:"Callers",accessorFn:j=>j.callers??"",cell:({row:{original:j}})=>f.jsx("span",{className:"text-[12.5px]",children:hx(j.callers)})},{id:"support",header:"Support",accessorFn:j=>j.max_support??-1,sortDescFirst:!0,meta:{className:"n"},cell:({row:{original:j}})=>f.jsx("span",{className:"mono",children:j.max_support??"–"})},{id:"pileups",header:"Pileups",enableSorting:!1,cell:({row:{original:j}})=>f.jsx("span",{className:"mono text-[12px]",children:[j.left_pileup,j.right_pileup].filter(Boolean).join(" · ")||"–"})}],R=x?[{id:"expression",header:"Expression",enableSorting:!1,cell:({row:{original:j}})=>n==="whole_gene"?f.jsx("span",{className:"text-[12.5px]",children:j.expression??"–"}):f.jsxs("span",{className:"flex flex-col text-[12.5px] leading-snug",children:[f.jsx("span",{children:j.left_expression??"–"}),f.jsx("span",{style:{color:"var(--muted)"},children:j.right_expression??"–"})]})}]:[];return n==="whole_gene"?[N,{id:"gene",header:"Gene",accessorFn:j=>j.gene??"",meta:{className:"pin vt-g"},cell:({row:{original:j}})=>f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"vt-gene",children:f.jsx(ds,{text:j.gene??"–",query:r})}),f.jsx("span",{className:"vt-sub mono",children:j.left_chrom&&j.left_pos!==null&&j.right_pos!==null?`${Fr(j.left_chrom,j.left_pos)}–${j.right_pos.toLocaleString("en-US")}`:"–"})]})},{id:"length",header:"Length",accessorFn:j=>j.length??-1,sortDescFirst:!0,meta:{className:"n"},cell:({row:{original:j}})=>f.jsx("span",{className:"mono",children:ON(j.length)})},...M,...R]:[N,{id:"left",header:"Left",accessorFn:j=>j.left_gene??"",meta:{className:"pin vt-g"},cell:({row:{original:j}})=>f.jsx(My,{gene:j.left_gene,chrom:j.left_chrom,pos:j.left_pos,loc:j.left_loc,query:r})},{id:"right",header:"Right",accessorFn:j=>j.right_gene??"",cell:({row:{original:j}})=>f.jsx(My,{gene:j.right_gene,chrom:j.right_chrom,pos:j.right_pos,loc:j.right_loc,query:r})},...M,...R]},[n,x,r]),b=ox({data:s,columns:v,getRowId:N=>`${n}-${N.row}`,getCoreRowModel:ix(),getSortedRowModel:eN(),getExpandedRowModel:rx(),getRowCanExpand:()=>!0,state:{expanded:d,sorting:m},onExpandedChange:h,onSortingChange:p}),w=b.getVisibleLeafColumns().length,C=n==="onco"?kN:cx;return f.jsxs(f.Fragment,{children:[f.jsx("div",{ref:y,className:"vt-scroll vt-viewport",style:{"--row-h":`${C}px`},children:f.jsxs("table",{className:"vt",children:[f.jsx("thead",{children:b.getHeaderGroups().map(N=>f.jsx("tr",{children:N.headers.map(M=>{const R=M.column.columnDef.meta,j=M.column.getIsSorted();return f.jsx("th",{className:R==null?void 0:R.className,"aria-sort":j?j==="desc"?"descending":"ascending":void 0,children:M.column.getCanSort()?f.jsx(QN,{label:String(M.column.columnDef.header),sorted:j,onClick:M.column.getToggleSortingHandler()}):Vu(M.column.columnDef.header,M.getContext())},M.id)})},N.id))}),f.jsx(fx,{items:b.getRowModel().rows,scrollRef:y,columnCount:w,rowHeight:C,getKey:N=>N.id,render:N=>f.jsxs(f.Fragment,{children:[f.jsx("tr",{className:"vt-row","data-expanded":N.getIsExpanded(),onClick:()=>N.toggleExpanded(),children:N.getVisibleCells().map(M=>{var R;return f.jsx("td",{className:(R=M.column.columnDef.meta)==null?void 0:R.className,children:Vu(M.column.columnDef.cell,M.getContext())},M.id)})}),N.getIsExpanded()&&f.jsx("tr",{className:"vt-detail",children:f.jsx("td",{colSpan:w,children:f.jsx(YN,{row:N.original,onLocate:u})})})]})})]})}),f.jsx(Wu,{shown:s.length,total:i,noun:["row","rows"]})]})}const _r=176,sh=34,ih=7,rh=22,Tu=30,IN={deletion:"Del","tandem-duplication":"Dup",inversion:"Inv",translocation:"Tra"};function XN(n,s){return[cm[n],UN[n],IN[n]].find(r=>Sa(r,12)+8<=s)??""}function KN(n,s,i,r,u){const d=Math.min(u,i/2,r);return`M${n},${s+r} V${s+d} Q${n},${s} ${n+d},${s} H${n+i-d} Q${n+i},${s} ${n+i},${s+d} V${s+r} Z`}function ZN({categories:n,total:s,litClass:i}){const[r,u]=Pr(),d=E.useId(),[h,m]=E.useState(null),p=FN(n),y=Math.max(0,...n.map(k=>k.count)),x=Xj(y,3),v=x[x.length-1],b=n.length,w=(p.length-1)*ih,C=n.some(k=>k.clustered)&&n.some(k=>!k.clustered),N=Math.max((u-Tu-6-w-(C?rh-ih:0))/b,4),M=Math.min(26,N*.64),R=[],j=[];let F=Tu;p.forEach((k,ne)=>{ne>0&&(F+=p[ne-1].clustered!==k.clustered?rh:ih);const ie=F;for(let ee=k.start;ee<=k.end;ee++)R[ee]=F+(N-M)/2,F+=N;const Ce=j.find(ee=>ee.clustered===k.clustered&&ee.x1>=ie-rh-1),X=n.slice(k.start,k.end+1).reduce((ee,P)=>ee+P.count,0);Ce?(Ce.x1=F,Ce.count+=X):j.push({clustered:k.clustered,x0:ie,x1:F,count:X})});const T=k=>sh+_r-k/v*_r,H=sh+_r,D=k=>h!==null?k===h:i?n[k].sv_class===i:!0,z=h===null?null:n[h],Y=z&&s?Math.round(z.count/s*100):0,te=H+62;return f.jsxs("div",{ref:r,className:"rs","data-lit":h!==null||i?"":void 0,children:[f.jsxs("svg",{width:u,height:te,role:"img","aria-label":`Rearrangement signatures: ${n.filter(k=>k.count>0).map(k=>`${k.category} ${k.count}`).join(", ")}`,children:[f.jsx("defs",{children:Object.keys(Wa).map(k=>f.jsxs("linearGradient",{id:`${d}-${k}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[f.jsx("stop",{offset:"0",style:{stopColor:Wa[k]}}),f.jsx("stop",{offset:"1",style:{stopColor:Wa[k]},stopOpacity:.72})]},k))}),j.map(k=>f.jsxs("g",{children:[C&&k.clustered&&f.jsx("rect",{x:k.x0-6,y:0,width:k.x1-k.x0+12,height:H+56,rx:14,className:"rs-zone"}),C&&f.jsxs("text",{x:k.x0,y:17,className:"rs-zone-name",children:[k.clustered?"Clustered":"Dispersed",f.jsxs("tspan",{className:"rs-zone-n",children:[" ",k.count.toLocaleString("en-US")]})]})]},k.clustered?"c":"d")),x.map(k=>f.jsxs("g",{children:[f.jsx("line",{x1:Tu-4,x2:u,y1:T(k),y2:T(k),className:k===0?"rs-base":"rs-grid"}),f.jsx("text",{x:Tu-10,y:T(k)+4,textAnchor:"end",className:"rs-tick",children:k.toLocaleString("en-US")})]},k)),n.map((k,ne)=>{const ie=k.count/v*_r,Ce=D(ne);return f.jsxs("g",{className:"rs-bar","data-off":Ce?void 0:"",children:[k.count>0?f.jsxs(f.Fragment,{children:[f.jsx("path",{d:KN(R[ne],T(k.count),M,ie,6),fill:`url(#${d}-${k.sv_class})`,fillOpacity:k.clustered?.5:1}),f.jsx("text",{x:R[ne]+M/2,y:T(k.count)-7,textAnchor:"middle",className:"rs-count",children:k.count.toLocaleString("en-US")})]}):f.jsx("rect",{x:R[ne],y:H-3,width:M,height:3,rx:1.5,style:{fill:Wa[k.sv_class]},fillOpacity:.28}),k.size&&N>=26&&f.jsx("text",{x:R[ne]+M/2,y:H+16,textAnchor:"middle",className:"rs-size",children:$N(k)}),f.jsx("rect",{x:R[ne]-(N-M)/2,y:sh-8,width:N,height:_r+30,fill:"transparent",tabIndex:0,"aria-label":`${_y(k)}: ${k.count}`,onMouseEnter:()=>m(ne),onMouseLeave:()=>m(null),onFocus:()=>m(ne),onBlur:()=>m(null)})]},k.category)}),p.map(k=>{const ne=R[k.start],ie=R[k.end]+M,Ce=XN(k.sv_class,ie-ne+(N-M));return f.jsxs("g",{className:"rs-class","data-off":i&&i!==k.sv_class?"":void 0,children:[f.jsx("line",{x1:ne,x2:ie,y1:H+26,y2:H+26,style:{stroke:Wa[k.sv_class]},className:"rs-bracket"}),f.jsx("text",{x:(ne+ie)/2,y:H+44,textAnchor:"middle",className:"rs-class-name",children:Ce})]},`${k.clustered}-${k.sv_class}`)})]}),z&&h!==null&&f.jsxs(Ni,{x:R[h]+M/2,y:Math.max(T(z.count)-8,40),width:u,above:!0,children:[f.jsxs("span",{className:"ctip-title",children:[f.jsx("span",{className:"sv-swatch",style:{background:Wa[z.sv_class],opacity:z.clustered?.5:1},"aria-hidden":!0}),_y(z)]}),f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"Rearrangements"}),f.jsx("b",{children:z.count.toLocaleString("en-US")})]}),s>0&&f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"Of all of them"}),f.jsxs("b",{children:[Y===0&&z.count>0?"<1":Y,"%"]})]})]})]})}function mx(n,s,i){return`${n.toLocaleString("en-US")} ${n===1?s:i}`}function PN({categories:n,total:s}){const[i,r]=E.useState(null),u=BN(n);return f.jsxs("div",{className:"sv-sigs",children:[f.jsxs("div",{className:"sv-sigs-head",children:[f.jsxs("h3",{className:"sv-h",children:["Rearrangement signatures",f.jsx("span",{className:"sv-h-n",children:mx(s,"rearrangement","rearrangements")})]}),f.jsxs("ul",{className:"sv-sigs-key","aria-label":"Classes",onMouseLeave:()=>r(null),children:[u.map(({sv_class:d,count:h})=>f.jsxs("li",{"data-on":i===d||void 0,onMouseEnter:()=>r(d),children:[f.jsx("span",{className:"sv-swatch",style:{background:Wa[d]},"aria-hidden":!0}),cm[d],f.jsx("span",{className:"sv-key-n",children:h.toLocaleString("en-US")})]},d)),f.jsx("li",{className:"sv-sigs-note",children:"Lighter bars: clustered"})]})]}),f.jsx("div",{className:"sv-sigs-plot",children:f.jsx(ZN,{categories:n,total:s,litClass:i})})]})}function JN({data:n,query:s,onQuery:i,onLocate:r}){const[u,d]=E.useState([]),h=w=>d(C=>C.includes(w)?C.filter(N=>N!==w):[...C,w]),m=w=>w.filter(C=>LN(C,s)),p=w=>u.length?w.filter(C=>C.role&&u.includes(C.role)):w,y=[...n.onco,...n.whole_gene],x=[...m(n.onco),...m(n.whole_gene)],v=p(m(n.onco)),b=p(m(n.whole_gene));return y.length===0?f.jsx("p",{className:"sv-empty",children:"No rearrangements with breakpoints in oncogenes or tumour suppressors."}):f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"tbar",children:[x.length>0&&f.jsx(qN,{rows:x,shown:u,onToggle:h}),f.jsx($u,{value:s,onChange:i,label:"Search structural variants",placeholder:"Search gene, caller or locus",shortcut:!1})]}),x.length===0&&f.jsxs("div",{className:"vt-empty sv-empty",children:["No rows match this search.",f.jsx("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:()=>i(""),children:"Clear the search"})]}),v.length>0&&f.jsxs("section",{className:"sv-table","aria-label":"Rearranged oncogenes and tumour suppressors",children:[f.jsx("h3",{className:"sv-h",children:"Rearranged oncogenes and tumour suppressors"}),f.jsx(Ry,{kind:"onco",rows:v,total:n.onco.length,query:s,onLocate:r})]}),b.length>0&&f.jsxs("section",{className:"sv-table","aria-label":"Whole-gene rearrangements",children:[f.jsx("h3",{className:"sv-h",children:"Whole-gene rearrangements"}),f.jsx(Ry,{kind:"whole_gene",rows:b,total:n.whole_gene.length,query:s,onLocate:r})]})]})}const WN=E.forwardRef(function({envelope:s,loading:i,picked:r,onLocate:u},d){const h=(s==null?void 0:s.status)==="ok"?s.data:null,[m,p]=E.useState("");return f.jsx(Ku,{ref:d,title:"Structural variants",subtitle:h?mx(h.rearrangements,"rearrangement","rearrangements"):void 0,lineage:(s==null?void 0:s.lineage)??[],picked:r,info:"structuralVariants",className:"svs",expandable:!0,children:f.jsx(Zr,{label:"structural variants",envelope:s,loading:i,skeletonHeight:220,children:y=>f.jsxs("div",{className:"sv-body",children:[f.jsx(JN,{data:y,query:m,onQuery:p,onLocate:u}),y.signatures&&f.jsx(PN,{categories:y.signatures.categories,total:y.signatures.total})]})})})}),e_={"del.mh.prop":{short:"Del. MH",long:"Deletions with microhomology (share of deletions)"},SNV3:{short:"SBS3",long:"Substitution signature 3"},SV3:{short:"RS3",long:"Rearrangement signature 3"},SV5:{short:"RS5",long:"Rearrangement signature 5"},hrd:{short:"HRD index",long:"HRD index (loss of heterozygosity, telomeric imbalance, large-scale transitions)"},SNV8:{short:"SBS8",long:"Substitution signature 8"}};function Ty(n,s="short"){var i;return((i=e_[n])==null?void 0:i[s])??n}const oh=8;function t_(n){const s=n.find(u=>u.group==="sample")??n[0],i=[...(s==null?void 0:s.signatures)??[]].sort((u,d)=>(d.proportion??0)-(u.proportion??0)).map(u=>u.signature),r=i.length>oh?oh-1:oh;return{shown:i.slice(0,r),other:i.slice(r)}}function Ay(n){return n.group==="sample"?"This tumour":`${n.label.replace(/\(\d+\)$/,"")} cohort${n.cohort_n?`, n = ${n.cohort_n}`:""}`}const Oy=["#2a78d6","#eb6834","#1baf7a","#eda100","#e87ba4","#008300","#6250d6","#e34948"],n_="#a3a3ab";function l_(n){const{shown:s,other:i}=t_(n),r=n.find(p=>p.group==="sample")??n[0],u=n.find(p=>p.group==="cohort")??null,d=(p,y,x)=>p?p.signatures.filter(v=>y.includes(v.signature)).reduce((v,b)=>v+(b[x]??0),0):null,h=(p,y,x)=>{var v,b;return{name:p,members:y,colour:x,share:d(r,y,"proportion")??0,cohortShare:d(u,y,"proportion"),count:d(r,y,"count")??0,cohortCount:d(u,y,"count"),aetiology:y.length===1?((v=r==null?void 0:r.signatures.find(w=>w.signature===p))==null?void 0:v.aetiology)??((b=u==null?void 0:u.signatures.find(w=>w.signature===p))==null?void 0:b.aetiology)??null:`${y.length} smaller signatures`}},m=s.map((p,y)=>h(p,[p],Oy[y%Oy.length]));return i.length&&m.push(h("Other",i,n_)),m}function ua(n){return n.cohortShare===null?null:(n.share-n.cohortShare)*100}function zy(n,s,i){const r=Math.max(s-i*Math.max(n.length-1,0),0),u=n.reduce((h,m)=>h+m,0)||1;let d=0;return n.map(h=>{const m=h/u*r,p={y0:d,y1:d+m};return d+=m+i,p})}function a_(n,s,i,r){const u=(n+i)/2,d=h=>h.toFixed(2);return`M${d(n)},${d(s.y0)} C${d(u)},${d(s.y0)} ${d(u)},${d(r.y0)} ${d(i)},${d(r.y0)} L${d(i)},${d(r.y1)} C${d(u)},${d(r.y1)} ${d(u)},${d(s.y1)} ${d(n)},${d(s.y1)} Z`}function Lr(n,s){const i=(n.length-1)*s,r=Math.floor(i),u=Math.ceil(i);return n[r]+(n[u]-n[r])*(i-r)}function gx(n){var u;const s=n.cohort.filter(d=>d!==null&&Number.isFinite(d)).sort((d,h)=>d-h);if(s.length===0)return null;const i=((u=n.sample)==null?void 0:u.value)??null,r=[...s];if(i!==null){const d=r.indexOf(i);d>=0&&r.splice(d,1)}return{values:s,q1:Lr(s,.25),median:Lr(s,.5),q3:Lr(s,.75),tumour:i,above:i===null?null:r.filter(d=>d<i).length,others:r.length}}function s_(n,s=64){const i=n.length,r=n.reduce((y,x)=>y+x,0)/i,u=Math.sqrt(n.reduce((y,x)=>y+(x-r)**2,0)/Math.max(i-1,1)),d=Math.min(u,(Lr(n,.75)-Lr(n,.25))/1.34)||u||.1,h=Math.max(.9*d*i**-.2,.02),m=Array.from({length:s+1},(y,x)=>{const v=x/s;return{x:v,y:n.reduce((b,w)=>b+Math.exp(-.5*((v-w)/h)**2),0)}}),p=Math.max(...m.map(y=>y.y))||1;return m.map(y=>({x:y.x,y:y.y/p}))}function i_(n,s){const i=[],r=new Array(n.length).fill(0);return[...n.keys()].sort((u,d)=>n[u]-n[d]).forEach(u=>{let d=0;for(;i.some(h=>h.level===d&&Math.abs(h.x-n[u])<s);)d+=1;i.push({x:n[u],level:d}),r[u]=d}),r}function uh(n){return n.above===null||n.others===0?"":n.above===n.others?n.others===1?"Above the other sample":"Highest in the cohort":n.above===0?"Lowest in the cohort":`Above ${n.above} of ${n.others} others`}function ui(n,s,i,r){const u=Math.PI*(1-Math.min(Math.max(r,0),1));return{x:n+i*Math.cos(u),y:s-i*Math.sin(u)}}const ca=n=>n==null?"–":n.toFixed(2),r_=8,o_=250,ke={w:232,h:148,cx:116,cy:122,r:92};function ch(n,s){const i=ui(ke.cx,ke.cy,ke.r,n),r=ui(ke.cx,ke.cy,ke.r,s);return`M${i.x.toFixed(2)},${i.y.toFixed(2)} A${ke.r},${ke.r} 0 0 1 ${r.x.toFixed(2)},${r.y.toFixed(2)}`}function u_({score:n}){const s=n.value===null?null:Math.min(Math.max(n.value,0),1),i=n.rating==="HIGH",r=n.threshold,u=r===null?null:[ui(ke.cx,ke.cy,ke.r-14,r),ui(ke.cx,ke.cy,ke.r+14,r),ui(ke.cx,ke.cy,ke.r+27,r)],d=s===null?null:ui(ke.cx,ke.cy,ke.r,s);return f.jsxs("div",{className:"hrd-score","data-high":i||void 0,children:[f.jsxs("div",{className:"hrd-score-head",children:[f.jsx("span",{className:"hrd-name",children:n.name}),n.rating&&f.jsx("span",{className:`sc-pill ${i?"p-warn":"p-neu"}`,children:n.rating})]}),f.jsxs("svg",{width:ke.w,height:ke.h,viewBox:`0 0 ${ke.w} ${ke.h}`,role:"img","aria-label":`${n.name} ${s===null?"has no score":`scores ${ca(n.value)}`}${n.rating?`, rated ${n.rating}`:""}`,className:"hrd-gauge",children:[f.jsx("path",{d:ch(0,1),pathLength:1,className:"hrd-track"}),r!==null&&f.jsx("path",{d:ch(r,1),pathLength:1,className:"hrd-zone"}),s!==null&&f.jsx("path",{d:ch(0,1),pathLength:1,className:"hrd-fill",style:{"--v":s}}),u&&f.jsxs(f.Fragment,{children:[f.jsx("line",{x1:u[0].x,y1:u[0].y,x2:u[1].x,y2:u[1].y,className:"hrd-tick"}),f.jsx("text",{x:u[2].x,y:u[2].y+4,textAnchor:"middle",className:"hrd-tick-label",children:r})]}),d&&f.jsx("circle",{cx:d.x,cy:d.y,r:8.5,className:"hrd-end"}),f.jsx("text",{x:ke.cx,y:ke.cy-10,textAnchor:"middle",className:"hrd-num",children:s===null?"–":ca(n.value)}),f.jsx("text",{x:ke.cx-ke.r,y:ke.cy+18,textAnchor:"middle",className:"hrd-end-label",children:"0"}),f.jsx("text",{x:ke.cx+ke.r,y:ke.cy+18,textAnchor:"middle",className:"hrd-end-label",children:"1"})]}),n.threshold!==null&&f.jsxs("span",{className:"hrd-rule",children:["High at ",n.threshold," and above"]})]})}function c_(n){const s=n.filter(i=>i.stats&&i.stats.tumour!==null);return{above:s.filter(i=>i.stats.tumour>i.stats.median).length,of:s.length}}const f_="var(--font)";function d_({features:n}){var F;const[s,i]=Pr(720),[r,u]=E.useState(null),d=n.map(T=>({feature:T,stats:gx(T)})),h=i<640,m=h?0:116,p=h?0:168,y=m+10,x=i-p-14,v=T=>y+T*(x-y),b=h?28:0,w=h?100:70,C=b+38,N=30,M=d.length*w+14,R=M+22,j=r===null?null:d[r];return f.jsxs("div",{ref:s,className:"clouds",onMouseLeave:()=>u(null),children:[f.jsxs("svg",{width:i,height:R,role:"img","aria-label":"HRDetect features against the cohort",style:{fontFamily:f_},children:[[0,.25,.5,.75,1].map(T=>f.jsx("line",{x1:v(T),x2:v(T),y1:0,y2:M,className:"cloud-grid","data-major":T===0||T===1||void 0},T)),d.map(({feature:T,stats:H},D)=>{var Ce;const z=D*w,Y=Ty(T.feature),te=H&&H.values.length<=o_?H.values:[],k=i_(te.map(v),7.5),ne=H&&H.values.length>=r_?s_(H.values):null,ie=H&&H.tumour!==null?v(H.tumour):null;return f.jsxs("g",{transform:`translate(0 ${z})`,className:"cloud-row","data-on":r===D||void 0,onMouseEnter:()=>u(D),children:[f.jsx("rect",{x:0,y:2,width:i,height:w-4,rx:12,className:"cloud-hit"}),H&&f.jsxs(f.Fragment,{children:[f.jsx("rect",{x:v(H.q1),y:b+4,width:Math.max(v(H.q3)-v(H.q1),2),height:w-b-10,rx:8,className:"cloud-iqr"}),f.jsx("line",{x1:v(H.median),x2:v(H.median),y1:b+10,y2:w-14,className:"cloud-median"}),ne&&f.jsxs(f.Fragment,{children:[f.jsx("path",{d:`M${v(0)},${C} ${ne.map(X=>`L${v(X.x).toFixed(1)},${(C-X.y*N).toFixed(1)}`).join(" ")} L${v(1)},${C} Z`,className:"cloud-area"}),f.jsx("path",{d:ne.map((X,ee)=>`${ee?"L":"M"}${v(X.x).toFixed(1)},${(C-X.y*N).toFixed(1)}`).join(" "),className:"cloud-line"})]}),te.map((X,ee)=>f.jsx("circle",{cx:v(X),cy:C+11+Math.min(k[ee],2)*7,r:3,className:"cloud-dot"},ee)),ie!==null&&f.jsxs("g",{className:"cloud-pin",transform:`translate(${ie} 0)`,children:[f.jsx("line",{y1:b+8,y2:C,className:"cloud-stem"}),f.jsx("circle",{cy:C,r:8,className:"cloud-pin-dot"})]})]}),f.jsx("text",{x:h?4:6,y:h?18:C-6,className:"cloud-name",children:Y}),!h&&f.jsxs("text",{x:6,y:C+10,className:"cloud-raw",children:["raw ",ca((Ce=T.sample)==null?void 0:Ce.raw)]}),H&&f.jsx("text",{x:i-4,y:h?18:C-6,textAnchor:"end",className:"cloud-rank",children:uh(H)}),!h&&H&&f.jsxs("text",{x:i-4,y:C+10,textAnchor:"end",className:"cloud-raw",children:["of ",H.values.length," in the cohort"]})]},T.feature)}),f.jsxs("g",{transform:`translate(0 ${M})`,className:"cloud-axis",children:[f.jsx("text",{x:v(0),y:12,textAnchor:"start",children:"0 · cohort lowest"}),f.jsx("text",{x:v(.5),y:12,textAnchor:"middle",children:"0.5"}),f.jsx("text",{x:v(1),y:12,textAnchor:"end",children:"cohort highest · 1"})]})]}),j&&r!==null&&j.stats&&f.jsxs(Ni,{x:j.stats.tumour!==null?v(j.stats.tumour):v(j.stats.median),y:r*w+C,width:i,children:[f.jsx("span",{className:"ctip-title",children:Ty(j.feature.feature,"long")}),f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"This tumour"}),f.jsxs("b",{children:[ca((F=j.feature.sample)==null?void 0:F.raw)," ",f.jsxs("i",{children:["scaled ",ca(j.stats.tumour)]})]})]}),f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"Cohort median"}),f.jsx("b",{children:ca(j.stats.median)})]}),f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"Middle half"}),f.jsxs("b",{children:[ca(j.stats.q1),"–",ca(j.stats.q3)]})]}),uh(j.stats)&&f.jsx("span",{className:"ctip-note",children:uh(j.stats)})]})]})}const Mr=n=>`${(n*100).toFixed(n>=.1||n===0?0:1)}%`,Rr=n=>Math.round(n).toLocaleString("en-US"),h_=n=>`${n>=0?"+":"−"}${Math.abs(n).toFixed(Math.abs(n)>=10?0:1)}`,Dy=3,ii=26,ri=52;function m_({groups:n,bands:s,lit:i,onLight:r}){const[u,d]=Pr(),h=n.find(D=>D.group==="sample")??n[0],m=n.find(D=>D.group==="cohort")??null,p=m!==null,y=d>=440,x=y?d>=620?118:92:0,v=p?330:230,b=zy(s.map(D=>D.share),v,Dy),w=p?zy(s.map(D=>D.cohortShare??0),v,Dy):[],C=p?x:0,N=d-x-ii,M=C+ii,R=N,j=s.find(D=>D.name===i)??null,F=j?s.indexOf(j):-1,T=F<0?0:ri+((b[F].y0+b[F].y1)/2+(p?(w[F].y0+w[F].y1)/2:(b[F].y0+b[F].y1)/2))/2,H=(D,z,Y,te,k,ne)=>{const ie=D.y1-D.y0;if(!y||ie<17)return null;const Ce=ri+(D.y0+D.y1)/2,X=ie>=36;return f.jsxs("text",{x:k,y:Ce,textAnchor:ne,className:"flow-label",children:[f.jsxs("tspan",{x:k,dy:X?"-0.35em":"0.35em",className:"flow-name",children:[z.name,!X&&f.jsxs("tspan",{className:"flow-share",children:[" ",Mr(Y)]})]}),X&&f.jsxs("tspan",{x:k,dy:"1.35em",className:"flow-share",children:[Mr(Y),te]})]})};return f.jsxs("div",{ref:u,className:"flow","data-lit":i??void 0,children:[f.jsxs("svg",{width:d,height:ri+v+4,role:"img","aria-label":"Signature shares, tumour against cohort",children:[f.jsxs("g",{className:"flow-head",children:[f.jsx("text",{x:0,y:16,className:"flow-col",children:Ay(h)}),f.jsxs("text",{x:0,y:34,className:"flow-sub",children:[Rr(h.total)," mutations"]}),m&&f.jsxs(f.Fragment,{children:[f.jsx("text",{x:d,y:16,textAnchor:"end",className:"flow-col",children:Ay(m)}),f.jsxs("text",{x:d,y:34,textAnchor:"end",className:"flow-sub",children:["about ",Rr(m.total)," each, on average"]})]})]}),p&&f.jsx("g",{className:"flow-ribs",transform:`translate(0 ${ri})`,children:s.map((D,z)=>f.jsx("path",{d:a_(M,b[z],R,w[z]),fill:D.colour,className:"flow-rib","data-on":i===D.name||void 0,onMouseEnter:()=>r(D.name),onMouseLeave:()=>r(null)},D.name))}),s.map((D,z)=>{const Y=i===D.name||void 0,te=(k,ne)=>k.y1-k.y0>.4&&f.jsx("rect",{x:ne,y:ri+k.y0,width:ii,height:k.y1-k.y0,rx:Math.min(5,(k.y1-k.y0)/2),fill:D.colour,className:"flow-seg","data-on":Y,tabIndex:0,"aria-label":`${D.name}, ${Mr(D.share)} of this tumour`,onMouseEnter:()=>r(D.name),onMouseLeave:()=>r(null),onFocus:()=>r(D.name),onBlur:()=>r(null)});return f.jsxs("g",{className:"flow-band","data-on":Y,children:[te(b[z],C),p&&te(w[z],N),H(b[z],D,D.share,D.count?` · ${Rr(D.count)}`:"",p?C-10:C+ii+10,p?"end":"start"),p&&H(w[z],D,D.cohortShare??0,"",N+ii+10,"start")]},D.name)}),p&&d>=520&&s.map((D,z)=>{const Y=ua(D),te=b[z],k=w[z];if(Y===null||Math.abs(Y)<5||Math.min(te.y1-te.y0,k.y1-k.y0)<22)return null;const ne=(M+R)/2,ie=ri+(te.y0+te.y1+k.y0+k.y1)/4;return f.jsxs("g",{transform:`translate(${ne} ${ie})`,className:"flow-delta","data-on":i===D.name||void 0,children:[f.jsx("rect",{x:-30,y:-10,width:60,height:20,rx:10}),f.jsxs("text",{y:4,textAnchor:"middle",children:[h_(Y)," pts"]})]},D.name)})]}),j&&f.jsxs(Ni,{x:p?d/2:C+ii+x+20,y:T,width:d,children:[f.jsxs("span",{className:"ctip-title",children:[f.jsx("span",{className:"sv-swatch",style:{background:j.colour},"aria-hidden":!0}),j.name]}),j.aetiology&&f.jsx("span",{className:"ctip-sub",children:j.aetiology}),f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"This tumour"}),f.jsxs("b",{children:[Mr(j.share)," ",f.jsxs("i",{children:[Rr(j.count)," mutations"]})]})]}),j.cohortShare!==null&&f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"Cohort"}),f.jsxs("b",{children:[Mr(j.cohortShare)," ",f.jsx("i",{children:j.cohortCount!==null?`about ${Rr(j.cohortCount)} each`:""})]})]}),ua(j)!==null&&f.jsx("span",{className:"ctip-note",children:Math.abs(ua(j))<1?"About the same as its cohort":`${Math.abs(ua(j)).toFixed(Math.abs(ua(j))>=10?0:1)} points ${ua(j)>0?"above":"below"} its cohort`})]})]})}const Hy=n=>`${(n*100).toFixed(n>=.1||n===0?0:1)}%`,px=n=>Math.round(n).toLocaleString("en-US");function g_({points:n,reach:s}){if(n===null)return null;const i=Math.min(Math.abs(n)/s,1)*100;return f.jsx("span",{className:"lead","aria-hidden":!0,children:f.jsx("span",{className:"lead-bar","data-up":n>=0||void 0,style:{width:`${Math.max(i,n===0?0:3)}%`}})})}function p_({groups:n}){const[s,i]=E.useState(null),r=E.useMemo(()=>l_(n),[n]),u=n.find(h=>h.group==="cohort"),d=Math.max(10,...r.map(h=>Math.abs(ua(h)??0)));return f.jsxs("section",{className:"sig-section","aria-label":"Mutational signatures",children:[f.jsx("h3",{className:"sv-h",children:"Mutational signatures"}),f.jsxs("div",{className:"sig-grid",children:[f.jsx(m_,{groups:n,bands:r,lit:s,onLight:i}),f.jsxs("div",{className:"sig-tablebox",children:[f.jsxs("table",{className:"sig-table",children:[f.jsx("thead",{children:f.jsxs("tr",{children:[f.jsx("th",{children:"Signature"}),f.jsx("th",{className:"n",children:"This tumour"}),u&&f.jsx("th",{className:"n",children:"Cohort"}),u&&f.jsx("th",{className:"lead-h",children:"Against cohort"})]})}),f.jsx("tbody",{children:r.map(h=>{const m=ua(h);return f.jsxs("tr",{"data-lit":s===h.name||void 0,onMouseEnter:()=>i(h.name),onMouseLeave:()=>i(null),children:[f.jsxs("td",{children:[f.jsxs("span",{className:"sig-name",title:h.members.length>1?h.members.join(", "):void 0,children:[f.jsx("span",{className:"sv-swatch",style:{background:h.colour},"aria-hidden":!0}),h.name]}),h.aetiology&&f.jsx("span",{className:"sig-aetiology",children:h.aetiology})]}),f.jsxs("td",{className:"n",children:[f.jsx("span",{className:"mono",children:Hy(h.share)}),f.jsx("span",{className:"sig-count",children:px(h.count)})]}),u&&f.jsx("td",{className:"n mono",children:Hy(h.cohortShare??0)}),u&&f.jsx("td",{children:f.jsxs("span",{className:"lead-cell",children:[f.jsx(g_,{points:m,reach:d}),f.jsx("span",{className:"lead-n mono",children:m===null?"":`${m>=0?"+":"−"}${Math.abs(m).toFixed(0)}`})]})})]},h.name)})})]}),f.jsx(Wu,{shown:r.length,total:r.length,noun:["signature","signatures"]})]})]})]})}function v_({hrd:n}){const s=E.useMemo(()=>c_(n.features.map(i=>({feature:i,stats:gx(i)}))),[n.features]);return f.jsxs("section",{className:"sig-section","aria-label":"Homologous recombination deficiency",children:[f.jsx("h3",{className:"sv-h",children:"Homologous recombination deficiency"}),f.jsxs("div",{className:"hrd-body",children:[n.scores.length>0&&f.jsx("div",{className:"hrd-scores",children:n.scores.map(i=>f.jsx(u_,{score:i},i.name))}),n.features.length>0&&f.jsxs("div",{className:"hrd-chart",children:[f.jsxs("div",{className:"sv-sigs-head",children:[f.jsxs("h4",{className:"hrd-sub",children:["HRDetect features against the cohort",n.cohort_n?f.jsxs("span",{className:"sv-h-n",children:["n = ",n.cohort_n]}):null]}),f.jsxs("ul",{className:"sv-sigs-key","aria-label":"Key",children:[f.jsxs("li",{children:[f.jsx("span",{className:"hrd-key-pin","aria-hidden":!0}),"This tumour"]}),f.jsxs("li",{children:[f.jsx("span",{className:"hrd-key-dot","aria-hidden":!0}),"Cohort sample"]}),f.jsxs("li",{children:[f.jsx("span",{className:"hrd-key-band","aria-hidden":!0}),"Middle half of the cohort"]})]})]}),s.of>0&&f.jsxs("p",{className:"hrd-lede",children:["Above the cohort median on ",f.jsx("b",{children:s.above})," of ",s.of," features"]}),f.jsx(d_,{features:n.features})]})]})]})}const y_=E.forwardRef(function({envelope:s,loading:i,picked:r},u){var m;const d=(s==null?void 0:s.status)==="ok"?s.data:null,h=(m=d==null?void 0:d.signatures)==null?void 0:m.find(p=>p.group==="sample");return f.jsx(Ku,{ref:u,title:"Signatures and HRD",subtitle:h?`${px(h.total)} mutations attributed to signatures`:void 0,lineage:(s==null?void 0:s.lineage)??[],picked:r,info:"signaturesHrd",className:"sigs",children:f.jsx(Zr,{label:"signatures and HRD",envelope:s,loading:i,skeletonHeight:300,children:p=>f.jsxs("div",{className:"sig-body",children:[p.signatures?f.jsx(p_,{groups:p.signatures}):f.jsx("p",{className:"sv-empty",children:"No signature contributions for this sample."}),p.hrd&&f.jsx(v_,{hrd:p.hrd})]})})})});function x_(n){var r;const s=n.samples.filter(u=>u.category==="TUMOR");return(r=s.find(u=>Object.values(u.datasets??{}).some(d=>Object.values(d).includes("ok")))??s[0]??n.samples[0])==null?void 0:r.id}const S_=[];function b_(n){const s=E.useRef(!1);return E.useEffect(()=>{let i=0;const r=()=>{s.current=!0,window.clearTimeout(i),i=window.setTimeout(()=>s.current=!1,150)};return window.addEventListener("scroll",r,{passive:!0}),()=>{window.removeEventListener("scroll",r),window.clearTimeout(i)}},[]),E.useCallback(i=>{(i===null||!s.current)&&n(i)},[n])}function w_(n){var i,r;const s=(r=(i=n==null?void 0:n.samples.find(u=>{var d;return(d=u.disease)==null?void 0:d.name}))==null?void 0:i.disease)==null?void 0:r.name;return s?s.charAt(0)+s.slice(1).toLowerCase():void 0}function Tr(n,s){const i=typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches;n==null||n.scrollIntoView({behavior:i?"auto":"smooth",block:s})}const Ly=160;function C_(n,s){const i=E.useRef(n);i.current=n;const r=E.useRef(null),u=E.useRef(null),d=E.useRef(0),h=E.useRef(()=>{}),m=E.useRef(()=>{});E.useEffect(()=>{let x=0;const v=()=>{var H;if(x=0,r.current)return;const M=i.current.filter(([,D])=>D.current).map(([D,z])=>[D,z.current.getBoundingClientRect().top]),R=Math.max(0,document.documentElement.scrollHeight-window.innerHeight),j=Math.max(0,...M.map(([,D])=>D+window.scrollY-R-Ly)),F=Ly+(R>0?j*Math.min(1,window.scrollY/R):0);let T=((H=M[0])==null?void 0:H[0])??null;for(const[D,z]of M)z<=F&&(T=D);s.set(T)},b=()=>{r.current=null,u.current=null,v()};m.current=()=>{u.current=window.scrollY};const w=()=>{if(r.current){u.current===null?(window.clearTimeout(d.current),d.current=window.setTimeout(m.current,160)):Math.abs(window.scrollY-u.current)>4&&b();return}x||(x=requestAnimationFrame(v))},C=()=>{r.current&&u.current===null&&(window.clearTimeout(d.current),b())};return h.current=v,v(),window.addEventListener("scroll",w,{passive:!0}),window.addEventListener("resize",w),window.addEventListener("wheel",C,{passive:!0}),window.addEventListener("touchstart",C,{passive:!0}),window.addEventListener("keydown",C),()=>{window.removeEventListener("scroll",w),window.removeEventListener("resize",w),window.removeEventListener("wheel",C),window.removeEventListener("touchstart",C),window.removeEventListener("keydown",C),window.clearTimeout(d.current),x&&cancelAnimationFrame(x)}},[]);const p=E.useRef("");return E.useEffect(()=>{const x=n.filter(([,v])=>v.current).map(([v])=>v).join();x!==p.current&&(p.current=x,h.current())}),x=>{r.current=x,u.current=null,s.set(x),window.clearTimeout(d.current),d.current=window.setTimeout(m.current,160)}}function j_({held:n,sampleId:s,...i}){const r=Iu(n);return f.jsx($C,{...i,sampleId:r??s})}function E_(){var Z,le,Me,Ve,Fe,Ct,st,et,Yn,Dl,ja,Ea,Jr,Mi,Wr;const{individual:n=""}=Tw(),[s,i]=Pw(),r=s.get("version")??void 0,[u,d]=E.useState(null),[h,m]=E.useState(null),[p,y]=E.useState(fy),[x,v]=E.useState(null),b=b_(v),[w,C]=E.useState(null),N=E.useRef(null),[M,R]=E.useState(null),j=E.useRef(Dr(!0)).current,F=E.useRef(null),T=E.useRef(null),H=E.useRef(null),D=E.useRef(null),z=E.useRef(Dr(null)).current,Y=C_([["overview",T],["copyNumber",N],["mutations",F],["structuralVariants",H],["signatures",D]],z),te=Ky();E.useEffect(()=>{const fe=M;if(!fe||typeof IntersectionObserver>"u")return;const Pe=new IntersectionObserver(([nt])=>j.set(nt.isIntersecting),{rootMargin:"-72px 0px 0px 0px",threshold:0});return Pe.observe(fe),()=>Pe.disconnect()},[M]);const k=E.useCallback(fe=>y(Pe=>({...Pe,...fe})),[]),ne=E.useCallback(fe=>{k({q:JC(fe.chrom,fe.start,fe.end),scope:"all",sort:"position"}),Tr(F.current,"start")},[k]),ie=E.useCallback(fe=>{k({q:fe}),Tr(F.current,"start")},[k]),Ce=E.useCallback(fe=>{C({chrom:fe.chrom,pos:fe.pos,gene:fe.gene,nonce:Date.now()}),Tr(N.current,"center")},[]),X=E.useCallback(fe=>{C({...fe,nonce:Date.now()}),Tr(N.current,"center")},[]),ee=lj(n,r),P=ee.data,J=(P==null?void 0:P.status)==="ok"?P.data??void 0:void 0,ue=s.get("sample")??(J?x_(J):void 0),Ee=J==null?void 0:J.samples.find(fe=>fe.id===ue),je=(Ee==null?void 0:Ee.category)==="TUMOR"?ue:void 0,$e=h??((J==null?void 0:J.mode)==="unmatched"?"vaf":"ccf"),Ie=aj(n,J?ue:void 0,r),We=sj(n,r),A=ij(n,je,r),V=rj(n,je,$e,p.ffpe,r),W=cj(n,je,p,r),se=(Z=W.data)==null?void 0:Z.pages[0],he=E.useMemo(()=>{var fe;return((fe=W.data)==null?void 0:fe.pages.flatMap(Pe=>Pe.status==="ok"&&Pe.data?Pe.data.rows:[]))??[]},[W.data]),{fetchNextPage:ye}=W,be=E.useCallback(()=>void ye(),[ye]),re=uj(n,je,r),me=oj(n,je,r),rt=(Me=(le=We.data)==null?void 0:le.data)==null?void 0:Me.samples.find(fe=>fe.sample===ue),Bt=E.useMemo(()=>(rt==null?void 0:rt.drivers)??S_,[rt]),zn=E.useMemo(()=>x?{chrom:x.chrom,pos:x.pos,gene:x.gene}:w,[x,w]),Nt=E.useRef(null),ot=E.useRef(Dr(null)).current,Ge=(fe,Pe)=>{var nt;(nt=Nt.current)==null||nt.toggleAttribute("data-gliding",fe),Nt.current&&(Nt.current.style.minHeight=fe&&Pe?`${Pe}px`:"")},pt=E.useRef(null);E.useEffect(()=>()=>{var fe;return(fe=pt.current)==null?void 0:fe.call(pt)},[]);const cl=fe=>{var _a,Ma;if(fe===ue)return;(_a=pt.current)==null||_a.call(pt);const Pe=typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches,nt=50;if(Pe||window.scrollY<=nt)return window.scrollTo({top:0,behavior:"auto"}),At("sample",fe);const bn=window.scrollY,Xt=Math.min(520,240+bn*.12),ec=performance.now();Ge(!0,document.documentElement.scrollHeight-(((Ma=Nt.current)==null?void 0:Ma.getBoundingClientRect().top)??0)-bn),ot.set(ue??null),Y("overview"),E.startTransition(()=>At("sample",fe));let Ri=0;function In(){cancelAnimationFrame(Ri),window.removeEventListener("wheel",In),window.removeEventListener("touchstart",In),window.removeEventListener("keydown",In),pt.current=null,ot.set(null),Ge(!1)}const Na=dl=>{const Ra=Math.min(1,(dl-ec)/Xt),Hl=bn*(1-Ra)**3;window.scrollTo({top:Hl,behavior:"instant"}),Hl<=nt&&ot.set(null),Ra<1?Ri=requestAnimationFrame(Na):In()};window.addEventListener("wheel",In,{passive:!0}),window.addEventListener("touchstart",In,{passive:!0}),window.addEventListener("keydown",In),pt.current=In,Ri=requestAnimationFrame(Na)},At=(fe,Pe)=>{const nt=new URLSearchParams(s);nt.set(fe,Pe),i(nt,{replace:!1}),d(null),y(fy()),v(null),C(null)},nn=[ee,Ie,We,A,V,W,re,me].map(fe=>fe.error);if(nn.some(fe=>fe instanceof Xu))return f.jsx("div",{className:`wgts ${Gn.theme}`,children:f.jsx("main",{className:"page",children:f.jsx(Dj,{onSignedIn:()=>te.invalidateQueries()})})});const qn=nn.find(fe=>fe instanceof U1),ut=Ee&&J?lm(Ee.id,J.individual.id):"",fl=new Set(J?je?["overview","copyNumber","mutations","structuralVariants","signatures"]:["overview"]:[]),It=fe=>{if(Y(fe),fe==="overview"){const nt=typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches;window.scrollTo({top:0,behavior:nt?"auto":"smooth"});return}const Pe={copyNumber:N,mutations:F,structuralVariants:H,signatures:D}[fe];Tr((Pe==null?void 0:Pe.current)??null,"start")},kt=J&&ue&&J.analyses[ue]||[],zl=(J==null?void 0:J.failures.filter(fe=>fe.sample===ue))??[],Gt=new Set(kt.map(Ft)),Qn=new Set,ln=fe=>fe==null?void 0:fe.forEach(Pe=>Gt.has(Ft(Pe))&&Qn.add(Ft(Pe)));for(const fe of((Fe=(Ve=Ie.data)==null?void 0:Ve.data)==null?void 0:Fe.metrics)??[])Uh.includes(fe.key)&&ln(fe.sources);ln((Ct=We.data)==null?void 0:Ct.lineage),ln((st=A.data)==null?void 0:st.lineage),ln((et=V.data)==null?void 0:et.lineage),ln(se==null?void 0:se.lineage),ln((Yn=re.data)==null?void 0:Yn.lineage),ln((Dl=me.data)==null?void 0:Dl.lineage);for(const fe of kt)fe.state==="failed"&&zl.length>0&&Qn.add(Ft(fe));return f.jsxs("div",{className:`wgts ${Gn.theme}`,children:[f.jsx(yj,{analyses:kt,onPage:Qn,sampleLabel:ut,picked:u,onPick:d,sections:fl,activeStore:z,onSection:It}),f.jsxs("div",{ref:Nt,className:"page",children:[f.jsx(L1,{individualId:n,subtitle:[w_(J),(ja=J==null?void 0:J.individual.sex)==null?void 0:ja.toLowerCase(),(J==null?void 0:J.mode)==="unmatched"?"tumour only":void 0].filter(Boolean).join(", ")||void 0,patientIcon:J?f.jsx(DC,{sex:J.individual.sex}):void 0,report:J?f.jsx(_j,{data:J,onVersion:fe=>At("version",fe)}):void 0,compact:J&&ue?f.jsx(FC,{data:J,sampleId:ue,fingerprint:((Ea=We.data)==null?void 0:Ea.data)??void 0,onSample:cl}):void 0,headerInView:j}),f.jsxs("main",{className:"flex flex-1 flex-col",children:[J&&ue&&f.jsx("div",{className:"px-8 pt-1",children:f.jsx("div",{ref:R,children:f.jsx(j_,{held:ot,data:J,sampleId:ue,fingerprint:((Jr=We.data)==null?void 0:Jr.data)??void 0,onSample:fe=>At("sample",fe)})})}),f.jsxs("div",{className:"sheet",children:[ee.isPending&&f.jsx("div",{className:"skeleton h-24","aria-label":"Loading the patient"}),qn&&f.jsx("div",{className:"sc-card px-6 py-5",children:f.jsx(es,{envelope:{status:"error",data:null,lineage:[],warnings:[qn.message]}})}),ee.isError&&!qn&&f.jsx("div",{className:"sc-card px-6 py-5",children:f.jsx(es,{envelope:{status:"error",data:null,lineage:[],warnings:[ee.error.message]}})}),P&&P.status!=="ok"&&f.jsx("div",{className:"sc-card px-6 py-5",children:f.jsx(es,{envelope:P})}),(P==null?void 0:P.status)==="ok"&&P.warnings.length>0&&f.jsx("div",{className:"sc-card px-6 py-4",children:f.jsx(es,{envelope:{...P,status:"missing"}})}),J&&ue&&f.jsxs(f.Fragment,{children:[f.jsx(zj,{sampleLabel:ut,failures:zl,analyses:kt}),je?f.jsxs(f.Fragment,{children:[f.jsx("div",{ref:T,className:"page-section",children:f.jsx(Oj,{sampleLabel:`${ut} tumour`,fingerprint:rt,metrics:Ie.data,picked:u,lineage:K1((Mi=Ie.data)==null?void 0:Mi.lineage,(Wr=We.data)==null?void 0:Wr.lineage)})}),f.jsx("div",{ref:N,className:"page-section",children:f.jsx(tE,{envelope:A.data,loading:A.isPending,picked:u,sampleLabel:ut,drivers:Bt,focus:zn,locate:w,onSegment:ne,onGene:ie})}),f.jsx(MN,{ref:F,variants:se,rows:he,hasMore:W.hasNextPage,loadingMore:W.isFetchingNextPage,onMore:be,variantsLoading:W.isPending,variantsFetching:W.isFetching&&W.isPlaceholderData,density:V.data,densityLoading:V.isPending,picked:u,measure:$e,onMeasure:fe=>{m(fe),p.range&&p.range.measure!==fe&&k({range:null})},table:p,onTable:k,hovered:x,onHover:b,onLocate:Ce,showCcf:J.mode!=="unmatched"}),f.jsx(WN,{ref:H,envelope:re.data,loading:re.isPending,picked:u,onLocate:X}),f.jsx(y_,{ref:D,envelope:me.data,loading:me.isPending,picked:u})]}):f.jsx("div",{ref:T,className:"sc-card px-6 py-5",children:f.jsx(es,{envelope:{status:"missing",data:null,lineage:[],warnings:[`${ut} is a normal sample. Its germline and quality panels arrive with those sections.`]}})})]})]})]})]})]})}const fh=200,vx="wgts-picker-scope";function N_(){try{const n=localStorage.getItem(vx);return n&&/^\d+$/.test(n)?Number(n):"all"}catch{return"all"}}function __(n,s){const i=s.toLowerCase().split(/\s+/).filter(Boolean);return i.length===0?n:n.filter(r=>{const u=`${r.individual} ${r.diseases.join(" ")} ${r.report_version}`.toLowerCase();return i.every(d=>u.includes(d))})}function M_(n,s){const i=s.toLowerCase().split(/\s+/).filter(Boolean);return i.length===0?n:n.filter(r=>{const u=`${r.title} ${r.short_title??""} ${r.description??""}`.toLowerCase();return i.every(d=>u.includes(d))})}const dh=n=>n.toLocaleString("en-US");function R_(){return Iu(sm)?f.jsx(T_,{}):null}function T_(){var k,ne,ie,Ce;const n=tm(),s=((k=Mw("/:individual"))==null?void 0:k.params.individual)??"",i=E.useId(),r=E.useRef(null),[u,d]=E.useState(N_),[h,m]=E.useState(""),[p,y]=E.useState(""),[x,v]=E.useState(0),b=fj(),w=dj(u);E.useEffect(()=>{const X=document.activeElement,ee=document.documentElement,P=ee.style.overflow;return ee.style.overflow="hidden",requestAnimationFrame(()=>{var J;return(J=document.querySelector(".pick-main .tsearch input"))==null?void 0:J.focus()}),()=>{ee.style.overflow=P,X==null||X.focus()}},[]);const C=X=>{d(X),y(""),v(0);try{localStorage.setItem(vx,String(X))}catch{}requestAnimationFrame(()=>{var ee;return(ee=document.querySelector(".pick-main .tsearch input"))==null?void 0:ee.focus()})},N=((ne=b.data)==null?void 0:ne.results)??[],M=E.useMemo(()=>M_(N,h),[N,h]),R=u==="all"?null:N.find(X=>X.pk===u)??((ie=w.data)==null?void 0:ie.project)??null,j=((Ce=w.data)==null?void 0:Ce.results)??[],F=E.useMemo(()=>__(j,p),[j,p]),T=F.slice(0,fh),H=E.useRef(null),D=X=>{Eu(),X.individual!==s&&n(`/${encodeURIComponent(X.individual)}`)};E.useEffect(()=>{var X,ee,P;(P=(ee=(X=H.current)==null?void 0:X.querySelector(`[data-index="${x}"]`))==null?void 0:ee.scrollIntoView)==null||P.call(ee,{block:"nearest"})},[x]),E.useEffect(()=>v(0),[p]);const z=X=>{const ee=X.target,P=ee instanceof HTMLInputElement&&!!ee.closest(".pick-main");if(X.key==="Escape"){if(ee instanceof HTMLInputElement&&ee.value)return;Eu()}else if(P&&X.key==="ArrowDown")X.preventDefault(),v(J=>Math.min(J+1,T.length-1));else if(P&&X.key==="ArrowUp")X.preventDefault(),v(J=>Math.max(J-1,0));else if(P&&X.key==="Enter"&&T[x])X.preventDefault(),D(T[x]);else if(ee instanceof HTMLInputElement&&ee.closest(".pick-rail")&&X.key==="Enter"){X.preventDefault();const J=M[0];J&&C(J.pk)}},Y=b.isPending,te=b.isError||w.isError;return Wh.createPortal(f.jsx("div",{className:`info-backdrop ${Gn.theme}`,onMouseDown:X=>X.target===X.currentTarget&&Eu(),children:f.jsxs("div",{className:"info-dialog pick",role:"dialog","aria-modal":"true","aria-labelledby":i,tabIndex:-1,onKeyDown:z,children:[f.jsx("button",{ref:r,type:"button",className:"info-close","aria-label":"Close",onClick:Eu,children:f.jsx(Qu,{size:18,"aria-hidden":!0})}),f.jsxs("nav",{className:"info-rail pick-rail","aria-label":"Projects",children:[f.jsx("span",{className:"info-kicker",children:"Browse"}),f.jsx("h2",{id:i,children:"Projects"}),f.jsx($u,{value:h,onChange:m,label:"Search projects",placeholder:"Search projects",shortcut:!1,delay:0}),f.jsxs("ol",{children:[f.jsx("li",{children:f.jsxs("button",{type:"button","aria-current":u==="all"?"true":void 0,onClick:()=>C("all"),children:[f.jsx("span",{className:"pick-name",children:f.jsxs("span",{children:[f.jsx(bC,{size:14,"aria-hidden":!0}),"All patients"]})}),f.jsx("span",{className:"pick-n",children:b.data?dh(b.data.total):""})]})}),M.map(X=>f.jsx("li",{children:f.jsxs("button",{type:"button","aria-current":u===X.pk?"true":void 0,onClick:()=>C(X.pk),title:X.short_title?`${X.title} (${X.short_title})`:X.title,children:[f.jsx("span",{className:"pick-name",children:X.title}),f.jsx("span",{className:"pick-n",children:dh(X.patients)})]})},X.pk))]}),Y&&f.jsx("p",{className:"pick-note",children:"Loading projects…"}),!Y&&N.length>0&&M.length===0&&f.jsxs("p",{className:"pick-note",children:["No project matches “",h,"”."]}),!Y&&!b.isError&&N.length===0&&f.jsx("p",{className:"pick-note",children:"No project has a dashboard yet. “All patients” lists every one."})]}),f.jsxs("div",{className:"pick-main",children:[f.jsxs("header",{className:"pick-head",children:[f.jsx("span",{className:"info-kicker",children:(R==null?void 0:R.short_title)??(u==="all"?"Every project":"Project")}),f.jsx("h3",{children:(R==null?void 0:R.title)??"All patients"}),(R==null?void 0:R.description)&&f.jsx("p",{children:R.description})]}),f.jsx("div",{className:"tbar",children:f.jsx($u,{value:p,onChange:y,label:"Search patients",placeholder:"Search id or disease",shortcut:!1,delay:0})}),f.jsx("div",{ref:H,className:"pick-list",role:"group","aria-label":"Patients","aria-busy":w.isFetching,children:te?f.jsx("p",{className:"pick-note",children:"The patients could not be loaded. Close this window and try again."}):w.isPending?f.jsx("p",{className:"pick-note",children:"Loading patients…"}):T.length===0?f.jsx("p",{className:"pick-note",children:p?`No patient matches “${p}”.`:"No patients with a dashboard in this project yet."}):T.map((X,ee)=>f.jsxs("button",{type:"button",className:"pick-row","data-index":ee,"data-active":ee===x||void 0,"data-current":X.individual===s||void 0,onMouseEnter:()=>v(ee),onClick:()=>D(X),children:[f.jsx("span",{className:"pick-id mono",children:f.jsx(ds,{text:X.individual,query:p})}),f.jsx("span",{className:"pick-diseases",children:X.diseases.length>0?X.diseases.map(P=>f.jsx("span",{className:"sc-chip",children:f.jsx(ds,{text:P,query:p})},P)):f.jsx("span",{className:"pick-faint",children:"No tumour disease recorded"})}),f.jsx("span",{className:"pick-aside",children:X.individual===s?f.jsxs("span",{className:"pick-here",children:[f.jsx(_1,{size:13,"aria-hidden":!0}),"On this page"]}):f.jsxs(f.Fragment,{children:[f.jsxs("span",{children:[dh(X.samples)," ",X.samples===1?"sample":"samples"]}),f.jsxs("span",{className:"pick-faint",children:["report ",X.report_version,X.built?`, ${O1(X.built)}`:""]})]})})]},X.individual))}),w.data&&f.jsx(Wu,{shown:F.length,total:j.length,noun:["patient","patients"],note:F.length>fh?`Showing the first ${fh}; search to narrow`:void 0})]})]})}),document.body)}const A_=new q2({defaultOptions:{queries:{staleTime:6e4,refetchOnWindowFocus:!1}}});function O_(){return f.jsx(v2,{client:A_,children:f.jsxs(Zw,{basename:Gn.basePath,children:[f.jsxs(Yw,{children:[f.jsx(_h,{path:"/",element:f.jsx(kC,{})}),f.jsx(_h,{path:"/:individual",element:f.jsx(E_,{})})]}),f.jsx(R_,{})]})})}p2.createRoot(document.getElementById("root")).render(f.jsx(E.StrictMode,{children:f.jsx(O_,{})}));
|
|
288
|
+
*/function lc(n,a){return n?IE(n)?E.createElement(n,a):n:null}function IE(n){return XE(n)||typeof n=="function"||KE(n)}function XE(n){return typeof n=="function"&&(()=>{const a=Object.getPrototypeOf(n);return a.prototype&&a.prototype.isReactComponent})()}function KE(n){return typeof n=="object"&&typeof n.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(n.$$typeof.description)}function H1(n){const a={state:{},onStateChange:()=>{},renderFallbackValue:null,...n},[i]=E.useState(()=>({current:qE(a)})),[o,u]=E.useState(()=>i.current.initialState);return i.current.setOptions(d=>({...d,...n,state:{...o,...n.state},onStateChange:h=>{u(h),n.onStateChange==null||n.onStateChange(h)}})),i.current}function ac({value:n,onChange:a,label:i="Search mutations",placeholder:o="Search gene, change or locus",shortcut:u=!0,delay:d=250}){const[h,m]=E.useState(n),g=E.useRef(null),y=E.useRef(a);y.current=a,E.useEffect(()=>m(n),[n]),E.useEffect(()=>{if(h===n)return;const v=window.setTimeout(()=>y.current(h),d);return()=>window.clearTimeout(v)},[h,n,d]),E.useEffect(()=>{if(!u)return;const v=S=>{var w,j,N;S.key!=="/"||S.metaKey||S.ctrlKey||S.altKey||(j=(w=S.target)==null?void 0:w.closest)!=null&&j.call(w,"input, textarea, select, [contenteditable]")||(S.preventDefault(),(N=g.current)==null||N.focus())};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[u]);const x=()=>{m(""),a("")};return c.jsxs("div",{className:"tsearch",children:[c.jsx(Wu,{size:15,"aria-hidden":!0}),c.jsx("input",{ref:g,type:"search","aria-label":i,placeholder:o,value:h,onChange:v=>{m(v.target.value),d===0&&a(v.target.value)},onKeyDown:v=>{v.key==="Escape"&&x(),v.key==="Enter"&&a(h)}}),h?c.jsx("button",{type:"button",className:"search-clear","aria-label":"Clear the search",onClick:x,children:c.jsx(cc,{size:14,"aria-hidden":!0})}):u?c.jsx("kbd",{className:"kbd","aria-hidden":!0,children:"/"}):null]})}const wh=n=>n.toLocaleString("en-US");function yc({shown:n,total:a,noun:i,loaded:o=!1,note:u}){const h=n>=a?`${wh(a)} ${a===1?i[0]:i[1]}`:`${wh(n)} of ${wh(a)} ${i[1]}${o?" loaded":""}`;return c.jsxs("div",{className:"vt-foot",role:"status",children:[u?c.jsx("span",{className:"vt-foot-note",children:u}):null,c.jsx("span",{className:"vt-foot-count",children:h})]})}function PE(n){return typeof n=="object"?n.key:n}function ZE(n,a){const i=n.length;return new Proxy(n,{get(o,u,d){if(typeof u=="string"){const h=u.charCodeAt(0);if(h>=48&&h<=57){const m=+u;if(Number.isInteger(m)&&m>=0&&m<i){let g=o[m];if(typeof g!="object"){const y=a[m*2];g=o[m]={index:m,key:g,start:y,size:a[m*2+1],end:y+a[m*2+1],lane:0}}return g}}if(u==="length")return i}return Reflect.get(o,u,d)}})}function yi(n,a,i){let o=i.initialDeps??[],u,d=!0;function h(){const m=n();return(m.length!==o.length||m.some((y,x)=>o[x]!==y))&&(o=m,u=a(...m),i!=null&&i.onChange&&!(d&&i.skipInitialOnChange)&&i.onChange(u),d=!1),u}return h.updateDeps=m=>{o=m},h}function Wy(n,a){if(n===void 0)throw new Error("Unexpected undefined");return n}const ex=(n,a)=>Math.abs(n-a)<1.01,JE=(n,a,i)=>{let o;return Object.assign(function(...u){n.clearTimeout(o),o=n.setTimeout(()=>a.apply(this,u),i)},{cancel:()=>{n.clearTimeout(o)}})};let qo;const Nh=()=>{if(qo!==void 0)return qo;if(typeof navigator>"u")return qo=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return qo=!0;const n=navigator.maxTouchPoints;return qo=navigator.platform==="MacIntel"&&n!==void 0&&n>0},tx=n=>{const{offsetWidth:a,offsetHeight:i}=n;return{width:a,height:i}},WE=n=>n,eM=n=>{const a=Math.max(n.startIndex-n.overscan,0),o=Math.min(n.endIndex+n.overscan,n.count-1)-a+1,u=new Array(o);for(let d=0;d<o;d++)u[d]=a+d;return u},tM=(n,a)=>{const i=n.scrollElement;if(!i)return;const o=n.targetWindow;if(!o)return;const u=h=>{const{width:m,height:g}=h;a({width:Math.round(m),height:Math.round(g)})};if(u(tx(i)),!o.ResizeObserver)return()=>{};const d=new o.ResizeObserver(h=>{const m=()=>{const g=h[0];if(g!=null&&g.borderBoxSize){const y=g.borderBoxSize[0];if(y){u({width:y.inlineSize,height:y.blockSize});return}}u(tx(i))};n.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(m):m()});return d.observe(i,{box:"border-box"}),()=>{d.unobserve(i)}},sc={passive:!0},nM=typeof window>"u"?!0:"onscrollend"in window,lM=(n,a,i)=>{const o=n.scrollElement;if(!o)return;const u=n.targetWindow;if(!u)return;const d=n.options.useScrollendEvent&&nM;let h=0;const m=d?null:JE(u,()=>a(i(o),!1),n.options.isScrollingResetDelay),g=v=>()=>{h=i(o),m==null||m(),a(h,v)},y=g(!0),x=g(!1);return o.addEventListener("scroll",y,sc),d&&o.addEventListener("scrollend",x,sc),()=>{o.removeEventListener("scroll",y),d&&o.removeEventListener("scrollend",x),m==null||m.cancel()}},aM=(n,a)=>lM(n,a,i=>{const{horizontal:o,isRtl:u}=n.options;return o?i.scrollLeft*(u&&-1||1):i.scrollTop}),sM=(n,a,i)=>{if(i.options.useCachedMeasurements){const o=i.indexFromElement(n),u=i.options.getItemKey(o);return i.itemSizeCache.get(u)??i.options.estimateSize(o)}if(a!=null&&a.borderBoxSize){const o=a.borderBoxSize[0];if(o)return Math.round(o[i.options.horizontal?"inlineSize":"blockSize"])}if(!a){const o=i.indexFromElement(n),u=i.options.getItemKey(o),d=i.itemSizeCache.get(u);if(d!==void 0)return d}return n[i.options.horizontal?"offsetWidth":"offsetHeight"]},iM=(n,{adjustments:a=0,behavior:i},o)=>{var u,d;(d=(u=o.scrollElement)==null?void 0:u.scrollTo)==null||d.call(u,{[o.options.horizontal?"left":"top"]:n+a,behavior:i})},oM=iM;function rM(n,a,i,o){if(a===0)return!1;const u=o(0),d=new Set;let h=0;for(;h<n;){const g=i(h);if(g===u)break;d.add(g),h++}const m=n-h;if(m===0||m>=a)return!1;for(let g=0;g<m;g++)if(o(g)!==i(h+g))return!1;for(let g=m;g<a;g++)if(d.has(o(g)))return!1;return!0}class uM{constructor(a){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this._clampedAdjustment=null,this.elementsCache=new Map,this.now=()=>{var i,o,u;return((u=(o=(i=this.targetWindow)==null?void 0:i.performance)==null?void 0:o.now)==null?void 0:u.call(o))??Date.now()},this.observer=(()=>{let i=null;const o=()=>i||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:i=new this.targetWindow.ResizeObserver(u=>{u.forEach(d=>{const h=()=>{const m=d.target,g=this.indexFromElement(m);if(!m.isConnected){this.observer.unobserve(m);for(const[y,x]of this.elementsCache)if(x===m){this.elementsCache.delete(y);break}return}this.isIndexInRange(g)&&this.shouldMeasureDuringScroll(g)&&this.resizeItem(g,this.options.measureElement(m,d,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(h):h()})}));return{disconnect:()=>{var u;(u=o())==null||u.disconnect(),i=null},observe:u=>{var d;return(d=o())==null?void 0:d.observe(u,{box:"border-box"})},unobserve:u=>{var d;return(d=o())==null?void 0:d.unobserve(u)}}})(),this.range=null,this.setOptions=i=>{var o;const u={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:WE,rangeExtractor:eM,onChange:()=>{},measureElement:sM,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",useCachedMeasurements:!1};for(const v in i){const S=i[v];S!==void 0&&(u[v]=S)}const d=this.options;let h=null,m=null,g=!1;if(d!==void 0&&d.enabled&&u.enabled&&u.anchorTo==="end"&&this.scrollElement!==null){const v=d.count,S=u.count,w=this.getMeasurements(),j=((o=this._singleLaneMeasurements)==null?void 0:o.items)??w,N=O=>PE(j[O]),M=v>0?N(0):null,A=v>0?N(v-1):null;if(S!==v||v>0&&S>0&&(u.getItemKey(0)!==M||u.getItemKey(S-1)!==A)){g=!0;const O=v>0?this.getVirtualItemForOffset(this.getScrollOffset())??w[0]:null;O&&(h=[O.key,this.getScrollOffset()-O.start]);const z=u.followOnAppend===!0?"auto":u.followOnAppend||null;z&&S>0&&this.isAtEnd(d.scrollEndThreshold)&&(v===0||u.getItemKey(S-1)!==A)&&(S>v||rM(v,S,N,u.getItemKey))&&(m=z)}}this.options=u,g&&(this.pendingMin=0,this.itemSizeCacheVersion++);let y=!1,x=0;if(h&&this.scrollOffset!==null){const[v,S]=h,w=this.getMeasurements(),{count:j,getItemKey:N}=this.options;let M=0;for(;M<j&&N(M)!==v;)M++;if(M<j){const A=w[M];if(A){const C=Math.max(0,A.start+S);!m&&C!==this.scrollOffset&&(x=C-this.scrollOffset,this.scrollOffset=C,y=!0)}}}(y||m)&&(this.pendingScrollAnchor=[y?h[0]:null,y?h[1]:0,m,x])},this.notify=i=>{var o,u;(u=(o=this.options).onChange)==null||u.call(o,this,i)},this.maybeNotify=yi(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),i=>{this.notify(i)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(i=>i()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.isScrolling=!1,this.scrollDirection=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._clampedAdjustment=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var i,o;const u=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==u){if(this.cleanup(),!u){this.maybeNotify();return}if(this.scrollElement=u,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((i=this.scrollElement)==null?void 0:i.window)??null,this.elementsCache.forEach(h=>{this.observer.observe(h)}),this.unsubs.push(this.options.observeElementRect(this,h=>{this.scrollRect=h,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(h,m)=>{if(m&&this._intendedScrollOffset===null&&h===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(h-this._intendedScrollOffset)<1.5&&(h=this._intendedScrollOffset),this._intendedScrollOffset=null,this._clampedAdjustment!==null&&Math.abs(h-this._clampedAdjustment.maxAtWrite)>=1.5&&(this._clampedAdjustment=null),this.scrollAdjustments=0;const g=this.getScrollOffset();this.scrollDirection=m?g===h?this.scrollDirection:g<h?"forward":"backward":null,this.scrollOffset=h,this.isScrolling=m,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),"addEventListener"in this.scrollElement){const h=this.scrollElement,m=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},g=()=>{this._iosTouching=!1,!(!Nh()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};h.addEventListener("touchstart",m,sc),h.addEventListener("touchend",g,sc),this.unsubs.push(()=>{h.removeEventListener("touchstart",m),h.removeEventListener("touchend",g),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}const d=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,d&&this.scrollElement&&this.options.enabled){const[h,m,g,y]=d;h!==null&&!g&&(Nh()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?y!==0&&(this._iosDeferredAdjustment+=y):((o=this.scrollState)==null?void 0:o.behavior)==="smooth"&&!ex(this.getScrollOffset()-y,this.scrollState.lastTargetOffset)||this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),g&&this.scrollToEnd({behavior:g})}this._retryClampedAdjustment()},this._retryClampedAdjustment=()=>{if(this._clampedAdjustment===null||!this.scrollElement||!this.options.enabled)return;const{target:i,maxAtWrite:o}=this._clampedAdjustment,u=this.getMaxScrollOffset();u>o+.5&&(this._clampedAdjustment=i>u+.5?{target:i,maxAtWrite:u}:null,this._scrollToOffset(i,{adjustments:void 0,behavior:void 0}))},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;const i=this.getScrollOffset(),o=this.getMaxScrollOffset();if(i<0||i>o)return;if(this._iosDeferredAdjustment<0&&i>=o-1){this._iosDeferredAdjustment=0;return}const u=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(i,{adjustments:this.scrollAdjustments+=u,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=yi(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(i,o,u,d,h,m,g,y)=>(this.prevLanes!==void 0&&this.prevLanes!==m&&(this.lanesChangedFlag=!0),this.prevLanes=m,this.pendingMin=null,{count:i,paddingStart:o,scrollMargin:u,getItemKey:d,enabled:h,lanes:m,laneAssignmentMode:g,gap:y}),{key:!1}),this.isIndexInRange=i=>i>=0&&i<this.options.count,this.getMeasurements=yi(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:i,paddingStart:o,scrollMargin:u,getItemKey:d,enabled:h,lanes:m,laneAssignmentMode:g,gap:y},x)=>{var v;const S=this.itemSizeCache;if(!h)return this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>i)for(const C of this.laneAssignments.keys())C>=i&&this.laneAssignments.delete(C);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(C=>{this.itemSizeCache.set(C.key,C.size)}));const w=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===i&&(this.lanesSettling=!1),m===1){const C=i*2;let D=(v=this._singleLaneMeasurements)==null?void 0:v.flat;if(!D||D.length<C){const R=new Float64Array(C);D&&w>0&&R.set(D.subarray(0,w*2)),D=R}const O=w===0?new Array(i):this._singleLaneMeasurements.items.slice();let z;if(w===0)z=o+u;else{const R=w-1;z=D[R*2]+D[R*2+1]+y}for(let R=w;R<i;R++){const Q=d(R);O[R]=Q;const K=S.get(Q),$=typeof K=="number"?K:this.options.estimateSize(R);D[R*2]=z,D[R*2+1]=$,z+=$+y}this._singleLaneMeasurements={flat:D,items:O};const _=ZE(O,D);return this.measurementsCache=_,_}const j=this.measurementsCache.slice(0,w),N=new Array(m).fill(void 0),M=new Float64Array(m);let A=0;for(let C=0;C<w;C++){const D=j[C];D&&(N[D.lane]===void 0&&A++,N[D.lane]=C,M[D.lane]=D.end)}for(let C=w;C<i;C++){const D=d(C),O=this.laneAssignments.get(C);let z,_;const R=g==="estimate"||S.has(D);if(O!==void 0&&this.options.lanes>1){z=O;const le=N[z],oe=le!==void 0?j[le]:void 0;_=oe?oe.end+y:o+u}else if(A===m){let le=0,oe=M[0],te=N[0];for(let Y=1;Y<m;Y++){const ee=M[Y];(ee<oe||ee===oe&&N[Y]<te)&&(le=Y,oe=ee,te=N[Y])}z=le,_=oe+y,R&&this.laneAssignments.set(C,z)}else z=C%this.options.lanes,_=o+u,R&&this.laneAssignments.set(C,z);const Q=S.get(D),K=typeof Q=="number"?Q:this.options.estimateSize(C),$=_+K;j[C]={index:C,start:_,size:K,end:$,key:D,lane:z},N[z]===void 0&&A++,N[z]=C,M[z]=$}return this.measurementsCache=j,j},{key:!1,debug:()=>this.options.debug}),this.calculateRange=yi(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(i,o,u,d)=>i.length===0||o===0?(this.range=null,null):(this.range=fM(i,o,u,d,d===1&&this._singleLaneMeasurements!==null?this._singleLaneMeasurements.flat:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=yi(()=>{let i=null,o=null;const u=this.calculateRange();return u&&(i=u.startIndex,o=u.endIndex),this.maybeNotify.updateDeps([this.isScrolling,i,o]),[this.options.rangeExtractor,this.options.overscan,this.options.count,i,o]},(i,o,u,d,h)=>d===null||h===null?[]:i({startIndex:d,endIndex:h,overscan:o,count:u}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=i=>{const o=this.options.indexAttribute,u=i.getAttribute(o);return u?parseInt(u,10):(console.warn(`Missing attribute name '${o}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=i=>{var o;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const u=this.scrollState.index??((o=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:o.index);if(u!==void 0&&this.range){const d=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),h=Math.max(0,u-d),m=Math.min(this.options.count-1,u+d);return i>=h&&i<=m}return!0},this.measureElement=i=>{if(!i){this.elementsCache.forEach((h,m)=>{h.isConnected||(this.observer.unobserve(h),this.elementsCache.delete(m))});return}const o=this.indexFromElement(i);if(!this.isIndexInRange(o))return;const u=this.options.getItemKey(o),d=this.elementsCache.get(u);d!==i&&(d&&this.observer.unobserve(d),this.observer.observe(i),this.elementsCache.set(u,i)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(o)&&this.resizeItem(o,this.options.measureElement(i,void 0,this))},this.resizeItem=(i,o)=>{var u,d,h;if(!this.isIndexInRange(i))return;let m,g,y;const x=(u=this._singleLaneMeasurements)==null?void 0:u.flat;if(this.options.lanes===1&&x!=null)y=this.options.getItemKey(i),g=x[i*2],m=x[i*2+1];else{const w=this.measurementsCache[i];if(!w)return;y=w.key,g=w.start,m=w.size}const v=this.itemSizeCache.get(y)??m,S=o-v;if(S!==0){const w=this.options.anchorTo==="end"&&((d=this.scrollState)==null?void 0:d.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,j=w?this.getTotalSize():0,N=this.getScrollOffset()+this.scrollAdjustments,A=!this.itemSizeCache.has(y)?g<N:g+v<=N&&this.scrollDirection!=="backward",C=((h=this.scrollState)==null?void 0:h.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[i]??{index:i,key:y,start:g,size:m,end:g+m,lane:0},S,this):A);(this.pendingMin===null||i<this.pendingMin)&&(this.pendingMin=i),this.itemSizeCache.set(y,o),this.itemSizeCacheVersion++;let D=!1;w?D=this.applyScrollAdjustment(this.getTotalSize()-j):C&&(D=this.applyScrollAdjustment(S)),this.notify(D),this._retryClampedAdjustment()}},this.getVirtualItems=yi(()=>[this.getVirtualIndexes(),this.getMeasurements()],(i,o)=>{const u=[];for(let d=0,h=i.length;d<h;d++){const m=i[d],g=o[m];u.push(g)}return u},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=i=>{var o;const u=this.getMeasurements();if(u.length===0)return;const d=(o=this._singleLaneMeasurements)==null?void 0:o.flat,h=this.options.lanes===1&&d!=null,m=U1(0,u.length-1,h?g=>d[g*2]:g=>Wy(u[g]).start,i);return Wy(u[m])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const i=this.scrollElement.document.documentElement;return this.options.horizontal?i.scrollWidth-this.scrollElement.innerWidth:i.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(i=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=i,this.getOffsetForAlignment=(i,o,u=0)=>{if(!this.scrollElement)return 0;const d=this.getSize(),h=this.getScrollOffset();o==="auto"&&(o=i>=h+d?"end":"start"),o==="center"?i+=(u-d)/2:o==="end"&&(i-=d);const m=this.getMaxScrollOffset();return Math.max(Math.min(m,i),0)},this.getOffsetForIndex=(i,o="auto")=>{i=Math.max(0,Math.min(i,this.options.count-1));const u=this.getSize(),d=this.getScrollOffset(),h=this.measurementsCache[i];if(!h)return;if(o==="auto")if(h.end>=d+u-this.options.scrollPaddingEnd)o="end";else if(h.start<=d+this.options.scrollPaddingStart)o="start";else return[d,o];if(o==="end"&&i===this.options.count-1)return[this.getMaxScrollOffset(),o];const m=o==="end"?h.end+this.options.scrollPaddingEnd:h.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(m,o,h.size),o]},this.scrollToOffset=(i,{align:o="start",behavior:u="auto"}={})=>{this._iosDeferredAdjustment=0;const d=this.getOffsetForAlignment(i,o),h=this.now();this.scrollState={index:null,align:o,behavior:u,startedAt:h,lastTargetOffset:d,stableFrames:0},this._scrollToOffset(d,{adjustments:void 0,behavior:u}),this.scheduleScrollReconcile()},this.scrollToIndex=(i,{align:o="auto",behavior:u="auto"}={})=>{this._iosDeferredAdjustment=0,i=Math.max(0,Math.min(i,this.options.count-1));const d=this.getOffsetForIndex(i,o);if(!d)return;const[h,m]=d,g=this.now();this.scrollState={index:i,align:m,behavior:u,startedAt:g,lastTargetOffset:h,stableFrames:0},this._scrollToOffset(h,{adjustments:void 0,behavior:u}),this.scheduleScrollReconcile()},this.scrollBy=(i,{behavior:o="auto"}={})=>{const u=this.getScrollOffset()+i,d=this.now();this.scrollState={index:null,align:"start",behavior:o,startedAt:d,lastTargetOffset:u,stableFrames:0},this._scrollToOffset(u,{adjustments:void 0,behavior:o}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:i="auto"}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:"end",behavior:i});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:i})},this.getTotalSize=()=>{var i,o;const u=this.getMeasurements();let d;if(u.length===0)d=this.options.paddingStart;else if(this.options.lanes===1){const h=u.length-1,m=(i=this._singleLaneMeasurements)==null?void 0:i.flat;m!=null?d=m[h*2]+m[h*2+1]:d=((o=u[h])==null?void 0:o.end)??0}else{const h=Array(this.options.lanes).fill(null);let m=u.length-1;for(;m>=0&&h.some(g=>g===null);){const g=u[m];h[g.lane]===null&&(h[g.lane]=g.end),m--}d=Math.max(...h.filter(g=>g!==null))}return Math.max(d-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{const i=[];if(this.itemSizeCache.size===0)return i;const o=this.getMeasurements();for(const u of o)u&&this.itemSizeCache.has(u.key)&&i.push({index:u.index,key:u.key,start:u.start,size:u.size,end:u.end,lane:u.lane});return i},this._scrollToOffset=(i,{adjustments:o,behavior:u})=>{this._intendedScrollOffset=i+(o??0),this.options.scrollToFn(i,{behavior:u,adjustments:o},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(a)}applyScrollAdjustment(a,i){if(a===0)return!1;if(Nh()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded))return this._iosDeferredAdjustment+=a,!1;{const o=this.getScrollOffset()+this.scrollAdjustments+a,u=this.scrollElement,d=u!==null&&("scrollHeight"in u||"document"in u)?this.getMaxScrollOffset():null;return this._clampedAdjustment=d!==null&&o>d+.5?{target:o,maxAtWrite:d}:null,this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=a,behavior:i}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollOffset<0&&(this.scrollOffset=0),this.scrollAdjustments=0),!0}}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const o=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,u=o?o[0]:this.scrollState.lastTargetOffset,d=1,h=u!==this.scrollState.lastTargetOffset;if(!h&&ex(u,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=d){this.getScrollOffset()!==u&&this._scrollToOffset(u,{adjustments:void 0,behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,h){const m=this.getSize()||600,g=Math.abs(u-this.getScrollOffset()),y=this.scrollState.behavior==="smooth"&&g>m;this.scrollState.lastTargetOffset=u,y||(this.scrollState.behavior="auto"),this._scrollToOffset(u,{adjustments:void 0,behavior:y?"smooth":"auto"})}this.scheduleScrollReconcile()}}const U1=(n,a,i,o)=>{for(;n<=a;){const u=(n+a)/2|0,d=i(u);if(d<o)n=u+1;else if(d>o)a=u-1;else return u}return n>0?n-1:0};function cM(n,a,i){let o=0;for(;o<=a;){const u=(o+a)/2|0,d=n[u*2];if(d<i)o=u+1;else if(d>i)a=u-1;else return u}return o>0?o-1:0}function fM(n,a,i,o,u){const d=n.length-1;if(n.length<=o)return{startIndex:0,endIndex:d};if(o===1&&u!==null){const y=cM(u,d,i);let x=y;const v=i+a;for(;x<d&&u[x*2]+u[x*2+1]<v;)x++;return{startIndex:y,endIndex:x}}let m=U1(0,d,y=>n[y].start,i),g=m;if(o===1)for(;g<d&&n[g].end<i+a;)g++;else if(o>1){const y=Array(o).fill(0);for(;g<d&&y.some(v=>v<i+a);){const v=n[g];y[v.lane]=v.end,g++}const x=Array(o).fill(i+a);for(;m>=0&&x.some(v=>v>=i);){const v=n[m];x[v.lane]=v.start,m--}m=Math.max(0,m-m%o),g=Math.min(d,g+(o-1-g%o))}return{startIndex:m,endIndex:g}}const Ch=typeof document<"u"?E.useLayoutEffect:E.useEffect;function dM({useFlushSync:n=!0,directDomUpdates:a=!1,directDomUpdatesMode:i="transform",...o}){const u=E.useReducer(v=>v+1,0)[1],d=E.useRef({enabled:a,mode:i,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});d.current.enabled=a,d.current.mode=i;const h=E.useRef(!1),m=v=>{const S=d.current;if(!S.enabled||!S.container)return;const w=v.getTotalSize();if(w!==S.lastSize){S.lastSize=w;const j=v.options.horizontal?"width":"height";S.container.style[j]=`${w}px`}},g=v=>{const S=d.current;if(!S.enabled||!S.container)return;m(v);const w=!!v.options.horizontal,j=S.mode==="transform",N=w?"left":"top",M=v.options.scrollMargin,A=v.getVirtualItems();for(const C of A){const D=C.start-M,O=v.elementsCache.get(C.key);O&&S.lastPositions.get(O)!==D&&(S.lastPositions.set(O,D),j?O.style.transform=w?`translate3d(${D}px, 0, 0)`:`translate3d(0, ${D}px, 0)`:O.style[N]=`${D}px`)}},y={...o,onChange:(v,S)=>{var w;const j=d.current;let N=!0;if(j.enabled){g(v);const M=v.range,A=j.prevRange;N=!A||A.isScrolling!==v.isScrolling||A.startIndex!==(M==null?void 0:M.startIndex)||A.endIndex!==(M==null?void 0:M.endIndex),N&&(j.prevRange=M?{startIndex:M.startIndex,endIndex:M.endIndex,isScrolling:v.isScrolling}:null)}N&&(n&&S&&!h.current?jm.flushSync(u):u()),(w=o.onChange)==null||w.call(o,v,S)}},[x]=E.useState(()=>{const v=new uM(y),S=v.measureElement;return v.measureElement=w=>{h.current=!0;try{S(w)}finally{h.current=!1}},Object.assign(v,{containerRef:w=>{const j=d.current;if(j.container=w,j.lastSize=null,w&&j.enabled){const N=v.getTotalSize();j.lastSize=N;const M=v.options.horizontal?"width":"height";w.style[M]=`${N}px`}}})});return x.setOptions(y),Ch(()=>x._didMount(),[]),Ch(()=>(m(x),x._willUpdate())),Ch(()=>{g(x)}),x}function hM(n){return dM({observeElementRect:tM,observeElementOffset:aM,scrollToFn:oM,...n})}const $1=33,xi=32,mM=25;function V1({items:n,scrollRef:a,columnCount:i,getKey:o,render:u,onEndReached:d,endThreshold:h=15,rowHeight:m=$1}){var M;const g=hM({count:n.length,getScrollElement:()=>a.current,estimateSize:()=>m,overscan:8,scrollMargin:xi,getItemKey:A=>o(n[A],A),initialRect:{width:1e3,height:xi+m*10}}),y=!((M=g.scrollRect)!=null&&M.height),x=y?n.slice(0,mM).map((A,C)=>({key:o(A,C),index:C,start:xi+C*m,end:xi+(C+1)*m})):g.getVirtualItems(),v=x[0],S=x[x.length-1],w=(S==null?void 0:S.index)??-1;E.useEffect(()=>{d&&w>=0&&w>=n.length-h&&d()},[w,n.length,h,d]);const j=!y&&v?v.start-xi:0,N=!y&&S?g.getTotalSize()-(S.end-xi):0;return c.jsxs(c.Fragment,{children:[j>0&&c.jsx("tbody",{"aria-hidden":!0,children:c.jsx("tr",{className:"vt-spacer",style:{height:j},children:c.jsx("td",{colSpan:i})})}),x.map(A=>c.jsx("tbody",{"data-index":A.index,ref:y?void 0:g.measureElement,children:u(n[A.index],A.index)},A.key)),N>0&&c.jsx("tbody",{"aria-hidden":!0,children:c.jsx("tr",{className:"vt-spacer",style:{height:N},children:c.jsx("td",{colSpan:i})})})]})}function xs({text:n,query:a}){const i=a.trim();if(!i||jN(i))return c.jsx(c.Fragment,{children:n});const o=[],u=n.toLowerCase(),d=i.toLowerCase();let h=0;for(let m=u.indexOf(d);m!==-1;m=u.indexOf(d,h))m>h&&o.push(n.slice(h,m)),o.push(c.jsx("mark",{children:n.slice(m,m+i.length)},m)),h=m+i.length;return o.push(n.slice(h)),c.jsx(c.Fragment,{children:o})}function nx({value:n,max:a,clonal:i}){return n===null?c.jsx("span",{style:{color:"var(--chev)"},children:"–"}):c.jsxs("span",{className:"vbar",children:[c.jsx("span",{className:"vbar-n",children:em(n)}),c.jsxs("span",{className:"vbar-track","aria-hidden":!0,children:[c.jsx("span",{className:"vbar-fill",style:{width:`${Math.min(n/a,1)*100}%`}}),i&&c.jsx("span",{className:"vbar-tick",style:{left:`${1/a*100}%`}})]})]})}function gM({variant:n,showDriver:a}){return c.jsxs("span",{className:"flex flex-wrap gap-1.5",children:[a&&n.is_driver&&c.jsx("span",{className:"sc-pill p-neu",children:"Driver"}),n.hotspot&&c.jsx("span",{className:"sc-pill p-hot",children:"Hotspot"}),n.in_dmp&&c.jsx("span",{className:"sc-pill p-dmp",children:"In DMP"}),n.ffpe_removed&&c.jsx("span",{className:"sc-pill p-ffpe",title:"Left out of the report's counts by its FFPE artifact filter",children:"FFPE filtered"})]})}function pM(n){return`${n.ref}>${n.alt}`}function vM({variant:n,onLocate:a}){const[i,o]=E.useState(!1),u=`chr${n.chrom}:${n.pos}`,d=[["Variant",`${n.kind==="snv"?"SNV":n.kind==="indel"?"Indel":n.kind}, ${pM(n)}`],...n.depth!==null?[["Reads",`${n.alt_reads??"?"} of ${n.depth}`]]:[],["Normal VAF",em(n.normal_vaf)],["Mutant copies",EN(n.mut_alleles)??"–"],["Consequence",(n.consequence??n.effect??"–").replace(/&/g,", ")],["COSMIC",CN(n.cosmic)??"–"],...n.ffpe_score!==null||n.ffpe_removed?[["FFPE artifact score",n.ffpe_score!==null?em(n.ffpe_score):"Not scored"]]:[],["Expression",n.gene_tpm!==null?`${n.gene_tpm.toFixed(1)} TPM`:"–"],["Gene role",MN(n)??"–"]];return c.jsxs("div",{className:"vt-detail-body",children:[c.jsx("dl",{className:"vt-facts",children:d.map(([h,m])=>c.jsxs("div",{children:[c.jsx("dt",{children:h}),c.jsx("dd",{children:m})]},h))}),c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c.jsxs("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:()=>a(n),children:[c.jsx(Wh,{size:14,"aria-hidden":!0}),"Show on copy number"]}),c.jsxs("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:async()=>{try{await navigator.clipboard.writeText(u),o(!0),window.setTimeout(()=>o(!1),1500)}catch{window.prompt("Copy this locus",u)}},children:[c.jsx(n1,{size:14,"aria-hidden":!0}),i?"Copied":"Copy locus"]})]})]})}function yM({sort:n,current:a,onSort:i}){const o=a.replace(/^-/,"")===n.key,u=a.startsWith("-"),d=o?u?n.key:`-${n.key}`:n.descFirst?`-${n.key}`:n.key;return c.jsxs("button",{type:"button",className:"vt-sort","data-active":o,onClick:()=>i(d),title:`Sort by ${n.label.toLowerCase()}`,children:[n.label,o&&u?c.jsx(Ju,{size:12,"aria-hidden":!0}):o?c.jsx(Wx,{size:12,"aria-hidden":!0}):c.jsx(Ju,{size:12,"aria-hidden":!0,className:"vt-sort-idle"})]})}function xM({data:n,rows:a,hasMore:i,loadingMore:o,onMore:u,table:d,fetching:h,showCcf:m,onTable:g,onHover:y,onLocate:x}){const[v,S]=E.useState({}),w=d.q,j=d.scope!=="drivers",N=E.useMemo(()=>[{id:"expand",header:()=>c.jsx("span",{className:"sr-only",children:"Details"}),meta:{className:"pin vt-x"},cell:({row:_})=>c.jsx("button",{type:"button",className:"vt-expand","aria-expanded":_.getIsExpanded(),"aria-label":`Details of ${_.original.gene??"this mutation"} ${_.original.protein_change??""}`.trim(),onClick:R=>{R.stopPropagation(),_.toggleExpanded()},onFocus:()=>y(_.original),children:c.jsx(Cm,{size:14,"aria-hidden":!0})})},{id:"gene",header:"Gene",meta:{className:"pin vt-g",sorts:[{key:"gene",label:"Gene"},{key:"position",label:"Position"}]},cell:({row:{original:_}})=>c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"vt-gene",children:c.jsx(xs,{text:_.gene??"–",query:w})}),c.jsx("span",{className:"vt-sub mono",children:lr(_.chrom,_.pos)})]})},{id:"change",header:"Change",cell:({row:{original:_}})=>c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"mono text-[12.5px] font-medium",children:c.jsx(xs,{text:_.protein_change??"–",query:w})}),_.cdna_change&&c.jsx("span",{className:"vt-sub mono",children:c.jsx(xs,{text:_.cdna_change,query:w})})]})},{id:"effect",header:"Effect",meta:{sorts:[{key:"effect",label:"Effect"}]},cell:({row:{original:_}})=>c.jsx("span",{className:_.effect_class==="truncating"?"font-semibold":void 0,children:Jw(_.consequence,_.effect)})},{id:"vaf",header:"VAF",meta:{className:"n",sorts:[{key:"vaf",label:"VAF",descFirst:!0}]},cell:({row:{original:_}})=>c.jsx(nx,{value:_.vaf,max:1})},...m?[{id:"ccf",header:"CCF",meta:{className:"n",sorts:[{key:"ccf",label:"CCF",descFirst:!0}]},cell:({row:{original:_}})=>c.jsx(nx,{value:_.ccf,max:1.25,clonal:!0})}]:[],{id:"flags",header:"Flags",cell:({row:{original:_}})=>c.jsx(gM,{variant:_,showDriver:j})}],[w,j,m,y]),M=H1({data:a,columns:N,getRowId:bN,getCoreRowModel:D1(),getExpandedRowModel:L1(),getRowCanExpand:()=>!0,manualPagination:!0,state:{expanded:v},onExpandedChange:S}),A=d.sort.replace(/^-/,""),C=M.getVisibleLeafColumns().length,D=p1(d)>0,O=E.useRef(null),z=JSON.stringify([d.scope,d.sort,d.q,d.effects,d.flags,d.range,d.ffpe]);return E.useEffect(()=>{O.current&&(O.current.scrollTop=0)},[z]),c.jsxs("div",{className:"flex min-w-0 flex-col",children:[c.jsx("div",{className:"tbar",children:c.jsx(ac,{value:d.q,onChange:_=>g({q:_})})}),c.jsxs("div",{ref:O,className:"vt-scroll vt-viewport",onMouseLeave:()=>y(null),"aria-busy":h,children:[h&&c.jsx("div",{className:"vt-progress","aria-hidden":!0}),c.jsxs("table",{className:"vt",children:[c.jsx("thead",{children:M.getHeaderGroups().map(_=>c.jsx("tr",{children:_.headers.map(R=>{var $;const Q=R.column.columnDef.meta,K=($=Q==null?void 0:Q.sorts)==null?void 0:$.some(le=>le.key===A);return c.jsx("th",{className:Q==null?void 0:Q.className,"aria-sort":K?d.sort.startsWith("-")?"descending":"ascending":void 0,children:Q!=null&&Q.sorts?c.jsx("span",{className:"vt-sorts",children:Q.sorts.map(le=>c.jsx(yM,{sort:le,current:d.sort,onSort:oe=>g({sort:oe})},le.key))}):lc(R.column.columnDef.header,R.getContext())},R.id)})},_.id))}),c.jsx(V1,{items:M.getRowModel().rows,scrollRef:O,columnCount:C,getKey:_=>_.id,onEndReached:i&&!o?u:void 0,render:_=>c.jsxs(c.Fragment,{children:[c.jsx("tr",{className:"vt-row","data-expanded":_.getIsExpanded(),onClick:()=>_.toggleExpanded(),onMouseEnter:()=>y(_.original),children:_.getVisibleCells().map(R=>{var Q;return c.jsx("td",{className:(Q=R.column.columnDef.meta)==null?void 0:Q.className,children:lc(R.column.columnDef.cell,R.getContext())},R.id)})}),_.getIsExpanded()&&c.jsx("tr",{className:"vt-detail",children:c.jsx("td",{colSpan:C,children:c.jsx(vM,{variant:_.original,onLocate:x})})})]})}),a.length===0&&c.jsx("tbody",{children:c.jsx("tr",{children:c.jsx("td",{colSpan:C,children:c.jsx("div",{className:"vt-empty",children:D?c.jsxs(c.Fragment,{children:["No mutations match these filters.",c.jsx("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:()=>g({q:"",effects:[],flags:[],range:null}),children:"Clear all filters"})]}):`No ${d.scope==="all"?"":`${d.scope} `}mutations in this sample.`})})})})]})]}),n.total>0&&c.jsx(yc,{shown:a.length,total:n.total,noun:["mutation","mutations"],loaded:!0,note:o?"Loading more…":a.length<n.total?"Scroll the table for more":void 0})]})}const SM=E.forwardRef(function({variants:a,rows:i,hasMore:o,loadingMore:u,onMore:d,variantsLoading:h,variantsFetching:m,density:g,densityLoading:y,picked:x,measure:v,onMeasure:S,table:w,onTable:j,hovered:N,onHover:M,onLocate:A,showCcf:C,tmb:D},O){var le,oe;const z=(a==null?void 0:a.status)==="ok"?a.data??void 0:void 0,_=z==null?void 0:z.counts,R=(g==null?void 0:g.status)==="ok"?(le=g.data)==null?void 0:le.total:void 0,Q=(g==null?void 0:g.status)==="ok"?(oe=g.data)==null?void 0:oe.ffpe:null,K=te=>te===void 0?"":te.toLocaleString("en-US"),$=w.range&&w.range.measure===v?[w.range.low,w.range.high]:null;return c.jsxs(gc,{ref:O,title:"Mutations",subtitle:R!==void 0?`${K(R)} PASS SNVs and indels${Q&&!Q.shown?", after the FFPE filter":""}`:void 0,lineage:mc(g==null?void 0:g.lineage,a==null?void 0:a.lineage,D==null?void 0:D.lineage),picked:x,className:"mut",info:"mutations",expandable:!0,controls:c.jsx(c.Fragment,{children:c.jsx(Ss,{label:"Which mutations",value:w.scope,onChange:te=>j({scope:te,sort:g1[te]}),options:[{value:"drivers",label:c.jsxs(c.Fragment,{children:["Drivers",c.jsx("span",{className:"seg-n",children:K(_==null?void 0:_.drivers)})]})},{value:"coding",label:c.jsxs(c.Fragment,{children:["Coding",c.jsx("span",{className:"seg-n",children:K(_==null?void 0:_.coding)})]})},{value:"all",label:c.jsxs(c.Fragment,{children:["All",c.jsx("span",{className:"seg-n",children:K(_==null?void 0:_.all)})]})}]})}),children:[c.jsx(WC,{envelope:g,loading:y,measure:v,onMeasure:S,range:$,focus:N,onRange:te=>{!te&&!w.range||j({range:te?{measure:v,low:te[0],high:te[1]}:null})},onGene:te=>j({q:te})}),z&&a&&a.warnings.length>0&&c.jsx("div",{className:"px-5 py-2 text-xs",role:"note",style:{color:"var(--warn-ink)"},children:a.warnings.join(" ")}),z?c.jsxs("div",{className:"mut-body",children:[c.jsx(nE,{table:w,data:z,onChange:j}),c.jsx(xM,{data:z,rows:i,hasMore:o,loadingMore:u,onMore:d,table:w,fetching:m,showCcf:C,onTable:j,onHover:M,onLocate:A})]}):c.jsx("div",{className:"mut-rule",children:c.jsx(dr,{label:"mutations",envelope:a,loading:h,skeletonHeight:240,children:()=>null})}),(D==null?void 0:D.status)==="ok"&&D.data&&c.jsx(aE,{data:D.data}),(D==null?void 0:D.status)==="missing"&&D.warnings.some(te=>te.includes("Rerun"))&&c.jsxs("section",{className:"sig-section","aria-label":"Coding mutations against reference cohorts",children:[c.jsx("h3",{className:"sv-h",children:"Coding mutations against reference cohorts"}),c.jsx("p",{className:"sv-empty",children:D.warnings.join(" ")})]})]})}),zm={oncogene:"Oncogene",tsg:"Tumour suppressor",both:"Oncogene and TSG"},F1=["oncogene","tsg","both"],Dm={deletion:"Deletion","tandem-duplication":"Tandem duplication",inversion:"Inversion",translocation:"Translocation"},bM={"<1kb":"<1 kb","1kb-10kb":"1–10 kb","10kb-100kb":"10–100 kb","100kb-1Mb":"100 kb–1 Mb",">1Mb":">1 Mb"};function jM(n){return n?bM[n]??n:""}const wM={DEL:"Deletion",DUP:"Duplication",INV:"Inversion",TRA:"Translocation",BND:"Breakend",INS:"Insertion"};function Lm(n){return n?wM[n]??n:"–"}function NM(n){return n==null?"–":n>=1e6?`${(n/1e6).toLocaleString("en-US",{maximumFractionDigits:1})} Mb`:n>=1e3?`${(n/1e3).toLocaleString("en-US",{maximumFractionDigits:1})} kb`:`${n.toLocaleString("en-US")} bp`}function CM(n){return n.some(a=>a.left_expression||a.right_expression||a.expression)}function EM(n){const a={oncogene:0,tsg:0,both:0};for(const i of n)i.role&&(a[i.role]+=1);return a}function MM(n){const a=n.trim().match(x1);if(!a)return null;const i=Number(a[2].replace(/,/g,"")),o=a[3]?Number(a[3].replace(/,/g,"")):i;return{chrom:a[1].toUpperCase(),start:Math.min(i,o),end:Math.max(i,o)}}function _M(n,a){const i=a.trim().toLowerCase();if(!i)return!0;const o=MM(a);if(o){const u=(d,h)=>(d==null?void 0:d.toUpperCase())===o.chrom&&h!==null&&h>=o.start&&h<=o.end;return u(n.left_chrom,n.left_pos)||u(n.right_chrom,n.right_pos)}return[n.gene,n.left_gene,n.right_gene,n.callers,n.left_loc,n.right_loc,n.sv_type,Lm(n.sv_type),n.role?zm[n.role]:null].some(u=>u==null?void 0:u.toLowerCase().includes(i))}const is={deletion:"var(--sv-del)","tandem-duplication":"var(--sv-dup)",inversion:"var(--sv-inv)",translocation:"var(--sv-tra)"},TM={deletion:"Deletion","tandem-duplication":"Tandem dup.",inversion:"Inversion",translocation:"Transl."},RM={"<1kb":"<1k","1kb-10kb":"10k","10kb-100kb":"100k","100kb-1Mb":"1M",">1Mb":">1M"};function AM(n){return n.size?RM[n.size]??n.size:""}function lx(n){const a=`${n.clustered?"Clustered":"Dispersed"} ${Dm[n.sv_class].toLowerCase()}s`;return n.size?`${a}, ${jM(n.size)}`:a}function OM(n){const a=[];return n.forEach((i,o)=>{const u=a[a.length-1];u&&u.clustered===i.clustered&&u.sv_class===i.sv_class?u.end=o:a.push({clustered:i.clustered,sv_class:i.sv_class,start:o,end:o})}),a}function zM(n){const a=new Map;for(const i of n)a.set(i.sv_class,(a.get(i.sv_class)??0)+i.count);return[...a].map(([i,o])=>({sv_class:i,count:o}))}const DM=45;function LM({role:n}){return n?c.jsx("span",{className:`sc-pill p-${n==="oncogene"?"onco":n}`,children:zm[n]}):c.jsx("span",{style:{color:"var(--chev)"},children:"–"})}function HM({rows:n,shown:a,onToggle:i}){const o=EM(n);return c.jsx("div",{className:"sv-legend",role:"group","aria-label":"Show rows by gene role",children:F1.filter(u=>o[u]>0).map(u=>c.jsxs("button",{type:"button",className:`sv-legend-item p-${u==="oncogene"?"onco":u}`,"aria-pressed":a.includes(u),onClick:()=>i(u),children:[zm[u],c.jsx("span",{className:"sv-legend-n",children:o[u]})]},u))})}function ax({gene:n,chrom:a,pos:i,loc:o,query:u}){return c.jsxs(c.Fragment,{children:[c.jsxs("span",{className:"sv-end",children:[c.jsx("span",{className:"vt-gene",children:c.jsx(xs,{text:n||"–",query:u})}),o&&c.jsx("span",{className:"sv-loc",children:o})]}),c.jsx("span",{className:"vt-sub stack mono",children:a&&i!==null?lr(a,i):"–"})]})}function k1(n){return n?n.replace(/,\s*/g,", "):"–"}function UM({label:n,sorted:a,onClick:i}){return c.jsxs("button",{type:"button",className:"vt-sort","data-active":!!a,onClick:i,title:`Sort by ${n.toLowerCase()}`,children:[n,a==="desc"?c.jsx(Ju,{size:12,"aria-hidden":!0}):a==="asc"?c.jsx(Wx,{size:12,"aria-hidden":!0}):c.jsx(Ju,{size:12,"aria-hidden":!0,className:"vt-sort-idle"})]})}function $M({row:n,onLocate:a}){const[i,o]=E.useState(!1),u=n.left_chrom&&n.left_pos!==null?{chrom:n.left_chrom,pos:n.left_pos}:null,d=n.right_chrom&&n.right_pos!==null?{chrom:n.right_chrom,pos:n.right_pos}:null,h=[["Type",Lm(n.sv_type)],["Left breakpoint",u?`${lr(u.chrom,u.pos)}${n.left_loc?`, ${n.left_loc}`:""}`:"–"],["Right breakpoint",d?`${lr(d.chrom,d.pos)}${n.right_loc?`, ${n.right_loc}`:""}`:"–"],["Pileups (left, right)",[n.left_pileup,n.right_pileup].filter(Boolean).join(", ")||"–"],["Orientation",n.orientation??"–"],["Callers",k1(n.callers)]],m=n.gene??n.left_gene,g=n.gene??n.right_gene;return c.jsxs("div",{className:"vt-detail-body",children:[c.jsx("dl",{className:"vt-facts",children:h.map(([y,x])=>c.jsxs("div",{children:[c.jsx("dt",{children:y}),c.jsx("dd",{children:x})]},y))}),c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u&&c.jsxs("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:()=>a({...u,gene:m}),children:[c.jsx(Wh,{size:14,"aria-hidden":!0}),"Show ",d&&d.chrom===u.chrom?"it":"left breakpoint"," on copy number"]}),d&&d.chrom!==(u==null?void 0:u.chrom)&&c.jsxs("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:()=>a({...d,gene:g}),children:[c.jsx(Wh,{size:14,"aria-hidden":!0}),"Show right breakpoint on copy number"]}),n.igv_locus&&c.jsxs("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:async()=>{try{await navigator.clipboard.writeText(n.igv_locus??""),o(!0),window.setTimeout(()=>o(!1),1500)}catch{window.prompt("Copy these IGV loci",n.igv_locus??"")}},children:[c.jsx(n1,{size:14,"aria-hidden":!0}),i?"Copied":"Copy IGV loci"]})]})]})}function sx({kind:n,rows:a,total:i=a.length,query:o="",onLocate:u}){const[d,h]=E.useState({}),[m,g]=E.useState([]),y=E.useRef(null),x=CM(a);E.useEffect(()=>{y.current&&(y.current.scrollTop=0)},[o,a.length]);const v=E.useMemo(()=>{const N={id:"expand",header:()=>c.jsx("span",{className:"sr-only",children:"Details"}),enableSorting:!1,meta:{className:"pin vt-x"},cell:({row:C})=>c.jsx("button",{type:"button",className:"vt-expand","aria-expanded":C.getIsExpanded(),"aria-label":`Details of ${C.original.gene??[C.original.left_gene,C.original.right_gene].filter(Boolean).join(" and ")}`,onClick:D=>{D.stopPropagation(),C.toggleExpanded()},children:c.jsx(Cm,{size:14,"aria-hidden":!0})})},M=[{id:"type",header:"Type",accessorFn:C=>C.sv_type??"",cell:({row:{original:C}})=>Lm(C.sv_type)},{id:"role",header:"Role",accessorFn:C=>C.role?F1.indexOf(C.role):9,cell:({row:{original:C}})=>c.jsx(LM,{role:C.role})},{id:"callers",header:"Callers",accessorFn:C=>C.callers??"",cell:({row:{original:C}})=>c.jsx("span",{className:"text-[12.5px]",children:k1(C.callers)})},{id:"support",header:"Support",accessorFn:C=>C.max_support??-1,sortDescFirst:!0,meta:{className:"n"},cell:({row:{original:C}})=>c.jsx("span",{className:"mono",children:C.max_support??"–"})},{id:"pileups",header:"Pileups",enableSorting:!1,cell:({row:{original:C}})=>c.jsx("span",{className:"mono text-[12px]",children:[C.left_pileup,C.right_pileup].filter(Boolean).join(" · ")||"–"})}],A=x?[{id:"expression",header:"Expression",enableSorting:!1,cell:({row:{original:C}})=>n==="whole_gene"?c.jsx("span",{className:"text-[12.5px]",children:C.expression??"–"}):c.jsxs("span",{className:"flex flex-col text-[12.5px] leading-snug",children:[c.jsx("span",{children:C.left_expression??"–"}),c.jsx("span",{style:{color:"var(--muted)"},children:C.right_expression??"–"})]})}]:[];return n==="whole_gene"?[N,{id:"gene",header:"Gene",accessorFn:C=>C.gene??"",meta:{className:"pin vt-g"},cell:({row:{original:C}})=>c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"vt-gene",children:c.jsx(xs,{text:C.gene??"–",query:o})}),c.jsx("span",{className:"vt-sub mono",children:C.left_chrom&&C.left_pos!==null&&C.right_pos!==null?`${lr(C.left_chrom,C.left_pos)}–${C.right_pos.toLocaleString("en-US")}`:"–"})]})},{id:"length",header:"Length",accessorFn:C=>C.length??-1,sortDescFirst:!0,meta:{className:"n"},cell:({row:{original:C}})=>c.jsx("span",{className:"mono",children:NM(C.length)})},...M,...A]:[N,{id:"left",header:"Left",accessorFn:C=>C.left_gene??"",meta:{className:"pin vt-g"},cell:({row:{original:C}})=>c.jsx(ax,{gene:C.left_gene,chrom:C.left_chrom,pos:C.left_pos,loc:C.left_loc,query:o})},{id:"right",header:"Right",accessorFn:C=>C.right_gene??"",cell:({row:{original:C}})=>c.jsx(ax,{gene:C.right_gene,chrom:C.right_chrom,pos:C.right_pos,loc:C.right_loc,query:o})},...M,...A]},[n,x,o]),S=H1({data:a,columns:v,getRowId:N=>`${n}-${N.row}`,getCoreRowModel:D1(),getSortedRowModel:YE(),getExpandedRowModel:L1(),getRowCanExpand:()=>!0,state:{expanded:d,sorting:m},onExpandedChange:h,onSortingChange:g}),w=S.getVisibleLeafColumns().length,j=n==="onco"?DM:$1;return c.jsxs(c.Fragment,{children:[c.jsx("div",{ref:y,className:"vt-scroll vt-viewport",style:{"--row-h":`${j}px`},children:c.jsxs("table",{className:"vt",children:[c.jsx("thead",{children:S.getHeaderGroups().map(N=>c.jsx("tr",{children:N.headers.map(M=>{const A=M.column.columnDef.meta,C=M.column.getIsSorted();return c.jsx("th",{className:A==null?void 0:A.className,"aria-sort":C?C==="desc"?"descending":"ascending":void 0,children:M.column.getCanSort()?c.jsx(UM,{label:String(M.column.columnDef.header),sorted:C,onClick:M.column.getToggleSortingHandler()}):lc(M.column.columnDef.header,M.getContext())},M.id)})},N.id))}),c.jsx(V1,{items:S.getRowModel().rows,scrollRef:y,columnCount:w,rowHeight:j,getKey:N=>N.id,render:N=>c.jsxs(c.Fragment,{children:[c.jsx("tr",{className:"vt-row","data-expanded":N.getIsExpanded(),onClick:()=>N.toggleExpanded(),children:N.getVisibleCells().map(M=>{var A;return c.jsx("td",{className:(A=M.column.columnDef.meta)==null?void 0:A.className,children:lc(M.column.columnDef.cell,M.getContext())},M.id)})}),N.getIsExpanded()&&c.jsx("tr",{className:"vt-detail",children:c.jsx("td",{colSpan:w,children:c.jsx($M,{row:N.original,onLocate:u})})})]})})]})}),c.jsx(yc,{shown:a.length,total:i,noun:["row","rows"]})]})}const Qo=176,Eh=34,Mh=7,_h=22,Xu=30,VM={deletion:"Del","tandem-duplication":"Dup",inversion:"Inv",translocation:"Tra"};function FM(n,a){return[Dm[n],TM[n],VM[n]].find(o=>_a(o,12)+8<=a)??""}function kM(n,a,i,o,u){const d=Math.min(u,i/2,o);return`M${n},${a+o} V${a+d} Q${n},${a} ${n+d},${a} H${n+i-d} Q${n+i},${a} ${n+i},${a+d} V${a+o} Z`}function BM({categories:n,total:a,litClass:i}){const[o,u]=Oa(),d=E.useId(),[h,m]=E.useState(null),g=OM(n),y=Math.max(0,...n.map($=>$.count)),x=Tm(y,3),v=x[x.length-1],S=n.length,w=(g.length-1)*Mh,j=n.some($=>$.clustered)&&n.some($=>!$.clustered),N=Math.max((u-Xu-6-w-(j?_h-Mh:0))/S,4),M=Math.min(26,N*.64),A=[],C=[];let D=Xu;g.forEach(($,le)=>{le>0&&(D+=g[le-1].clustered!==$.clustered?_h:Mh);const oe=D;for(let ee=$.start;ee<=$.end;ee++)A[ee]=D+(N-M)/2,D+=N;const te=C.find(ee=>ee.clustered===$.clustered&&ee.x1>=oe-_h-1),Y=n.slice($.start,$.end+1).reduce((ee,X)=>ee+X.count,0);te?(te.x1=D,te.count+=Y):C.push({clustered:$.clustered,x0:oe,x1:D,count:Y})});const O=$=>Eh+Qo-$/v*Qo,z=Eh+Qo,_=$=>h!==null?$===h:i?n[$].sv_class===i:!0,R=h===null?null:n[h],Q=R&&a?Math.round(R.count/a*100):0,K=z+62;return c.jsxs("div",{ref:o,className:"rs","data-lit":h!==null||i?"":void 0,children:[c.jsxs("svg",{width:u,height:K,role:"img","aria-label":`Rearrangement signatures: ${n.filter($=>$.count>0).map($=>`${$.category} ${$.count}`).join(", ")}`,children:[c.jsx("defs",{children:Object.keys(is).map($=>c.jsxs("linearGradient",{id:`${d}-${$}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[c.jsx("stop",{offset:"0",style:{stopColor:is[$]}}),c.jsx("stop",{offset:"1",style:{stopColor:is[$]},stopOpacity:.72})]},$))}),C.map($=>c.jsxs("g",{children:[j&&$.clustered&&c.jsx("rect",{x:$.x0-6,y:0,width:$.x1-$.x0+12,height:z+56,rx:14,className:"rs-zone"}),j&&c.jsxs("text",{x:$.x0,y:17,className:"rs-zone-name",children:[$.clustered?"Clustered":"Dispersed",c.jsxs("tspan",{className:"rs-zone-n",children:[" ",$.count.toLocaleString("en-US")]})]})]},$.clustered?"c":"d")),x.map($=>c.jsxs("g",{children:[c.jsx("line",{x1:Xu-4,x2:u,y1:O($),y2:O($),className:$===0?"rs-base":"rs-grid"}),c.jsx("text",{x:Xu-10,y:O($)+4,textAnchor:"end",className:"rs-tick",children:$.toLocaleString("en-US")})]},$)),n.map(($,le)=>{const oe=$.count/v*Qo,te=_(le);return c.jsxs("g",{className:"rs-bar","data-off":te?void 0:"",children:[$.count>0?c.jsxs(c.Fragment,{children:[c.jsx("path",{d:kM(A[le],O($.count),M,oe,6),fill:`url(#${d}-${$.sv_class})`,fillOpacity:$.clustered?.5:1}),c.jsx("text",{x:A[le]+M/2,y:O($.count)-7,textAnchor:"middle",className:"rs-count",children:$.count.toLocaleString("en-US")})]}):c.jsx("rect",{x:A[le],y:z-3,width:M,height:3,rx:1.5,style:{fill:is[$.sv_class]},fillOpacity:.28}),$.size&&N>=26&&c.jsx("text",{x:A[le]+M/2,y:z+16,textAnchor:"middle",className:"rs-size",children:AM($)}),c.jsx("rect",{x:A[le]-(N-M)/2,y:Eh-8,width:N,height:Qo+30,fill:"transparent",tabIndex:0,"aria-label":`${lx($)}: ${$.count}`,onMouseEnter:()=>m(le),onMouseLeave:()=>m(null),onFocus:()=>m(le),onBlur:()=>m(null)})]},$.category)}),g.map($=>{const le=A[$.start],oe=A[$.end]+M,te=FM($.sv_class,oe-le+(N-M));return c.jsxs("g",{className:"rs-class","data-off":i&&i!==$.sv_class?"":void 0,children:[c.jsx("line",{x1:le,x2:oe,y1:z+26,y2:z+26,style:{stroke:is[$.sv_class]},className:"rs-bracket"}),c.jsx("text",{x:(le+oe)/2,y:z+44,textAnchor:"middle",className:"rs-class-name",children:te})]},`${$.clustered}-${$.sv_class}`)})]}),R&&h!==null&&c.jsxs(Ul,{x:A[h]+M/2,y:Math.max(O(R.count)-8,40),width:u,above:!0,children:[c.jsxs("span",{className:"ctip-title",children:[c.jsx("span",{className:"sv-swatch",style:{background:is[R.sv_class],opacity:R.clustered?.5:1},"aria-hidden":!0}),lx(R)]}),c.jsxs("span",{className:"ctip-row",children:[c.jsx("span",{children:"Rearrangements"}),c.jsx("b",{children:R.count.toLocaleString("en-US")})]}),a>0&&c.jsxs("span",{className:"ctip-row",children:[c.jsx("span",{children:"Of all of them"}),c.jsxs("b",{children:[Q===0&&R.count>0?"<1":Q,"%"]})]})]})]})}function B1(n,a,i){return`${n.toLocaleString("en-US")} ${n===1?a:i}`}function GM({categories:n,total:a}){const[i,o]=E.useState(null),u=zM(n);return c.jsxs("div",{className:"sv-sigs",children:[c.jsxs("div",{className:"sv-sigs-head",children:[c.jsxs("h3",{className:"sv-h",children:["Rearrangement signatures",c.jsx("span",{className:"sv-h-n",children:B1(a,"rearrangement","rearrangements")})]}),c.jsxs("ul",{className:"sv-sigs-key","aria-label":"Classes",onMouseLeave:()=>o(null),children:[u.map(({sv_class:d,count:h})=>c.jsxs("li",{"data-on":i===d||void 0,onMouseEnter:()=>o(d),children:[c.jsx("span",{className:"sv-swatch",style:{background:is[d]},"aria-hidden":!0}),Dm[d],c.jsx("span",{className:"sv-key-n",children:h.toLocaleString("en-US")})]},d)),c.jsx("li",{className:"sv-sigs-note",children:"Lighter bars: clustered"})]})]}),c.jsx("div",{className:"sv-sigs-plot",children:c.jsx(BM,{categories:n,total:a,litClass:i})})]})}function qM({data:n,query:a,onQuery:i,onLocate:o}){const[u,d]=E.useState([]),h=w=>d(j=>j.includes(w)?j.filter(N=>N!==w):[...j,w]),m=w=>w.filter(j=>_M(j,a)),g=w=>u.length?w.filter(j=>j.role&&u.includes(j.role)):w,y=[...n.onco,...n.whole_gene],x=[...m(n.onco),...m(n.whole_gene)],v=g(m(n.onco)),S=g(m(n.whole_gene));return y.length===0?c.jsx("p",{className:"sv-empty",children:"No rearrangements with breakpoints in oncogenes or tumour suppressors."}):c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"tbar",children:[x.length>0&&c.jsx(HM,{rows:x,shown:u,onToggle:h}),c.jsx(ac,{value:a,onChange:i,label:"Search structural variants",placeholder:"Search gene, caller or locus",shortcut:!1})]}),x.length===0&&c.jsxs("div",{className:"vt-empty sv-empty",children:["No rows match this search.",c.jsx("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:()=>i(""),children:"Clear the search"})]}),v.length>0&&c.jsxs("section",{className:"sv-table","aria-label":"Rearranged oncogenes and tumour suppressors",children:[c.jsx("h3",{className:"sv-h",children:"Rearranged oncogenes and tumour suppressors"}),c.jsx(sx,{kind:"onco",rows:v,total:n.onco.length,query:a,onLocate:o})]}),S.length>0&&c.jsxs("section",{className:"sv-table","aria-label":"Whole-gene rearrangements",children:[c.jsx("h3",{className:"sv-h",children:"Whole-gene rearrangements"}),c.jsx(sx,{kind:"whole_gene",rows:S,total:n.whole_gene.length,query:a,onLocate:o})]})]})}const QM=E.forwardRef(function({envelope:a,loading:i,picked:o,onLocate:u},d){const h=(a==null?void 0:a.status)==="ok"?a.data:null,[m,g]=E.useState("");return c.jsx(gc,{ref:d,title:"Structural variants",subtitle:h?B1(h.rearrangements,"rearrangement","rearrangements"):void 0,lineage:(a==null?void 0:a.lineage)??[],picked:o,info:"structuralVariants",className:"svs",expandable:!0,children:c.jsx(dr,{label:"structural variants",envelope:a,loading:i,skeletonHeight:220,children:y=>c.jsxs("div",{className:"sv-body",children:[c.jsx(qM,{data:y,query:m,onQuery:g,onLocate:u}),y.signatures&&c.jsx(GM,{categories:y.signatures.categories,total:y.signatures.total})]})})})}),Ku={"C>A":"#03bcee","C>G":"#222222","C>T":"#e32926","T>A":"#999999","T>C":"#a1ce63","T>G":"#e9a9a5"};function YM(n,a){const i=n.contexts.every(g=>g.reconstructed!==null),o=n.contexts.reduce((g,y)=>g+y.observed,0),u=i?n.contexts.reduce((g,y)=>g+(y.reconstructed??0),0):0,d=n.contexts.map(g=>a==="share"?o?g.observed/o*100:0:g.observed),h=i?n.contexts.map(g=>a==="share"?u?(g.reconstructed??0)/u*100:0:g.reconstructed??0):null,m=h?d.map((g,y)=>g-h[y]):null;return{observed:d,reconstructed:h,difference:m,top:Math.max(0,...d,...h??[]),reach:m?Math.max(0,...m.map(Math.abs)):0}}function IM(n){const a=[];return n.forEach((i,o)=>{const u=a[a.length-1];u&&u.substitution===i.substitution?u.end=o:a.push({substitution:i.substitution,start:o,end:o})}),a}function XM(n,a,i,o=10){const u=a-o*(n.length-1),d=v=>v.end-v.start+1,h=n.reduce((v,S)=>v+d(S),0),m=i?n.find(v=>v.substitution===i):void 0,g=m?Math.min(.62,Math.max(.4,d(m)*30/u)):0,y=[];let x=0;for(const v of n){const S=d(v),w=m?v===m?u*g:u*(1-g)*S/(h-d(m)):u*S/h,j=w/S;for(let N=0;N<S;N++)y.push({x:x+N*j+j*.11,width:j*.78});x+=w+o}return y}function Th(n){return[n.five_prime,n.substitution[0],n.three_prime]}function Rh(n,a){return a==="count"?Math.round(n).toLocaleString("en-US"):`${n.toFixed(n>=10?1:2)}%`}function ix(n,a){return n==="cosine"?a.toFixed(3):a.toExponential(2).replace("e-","e−").replace("e+","e")}const dn=46,KM=6,ss=28,Ah=14,zl=96,Si=84,PM=["This tumour","Rebuilt from its signatures","Difference"],ZM={reported:"Reported run",unfiltered:"Unfiltered"};function JM({data:n}){const[a,i]=Oa(760),[o,u]=E.useState("share"),[d,h]=E.useState("reported"),[m,g]=E.useState(null),[y,x]=E.useState(null),v=n.runs.find(te=>te.source===d)??n.runs[0],S=n.reconstructed&&v.contexts.every(te=>te.reconstructed!==null),w=E.useMemo(()=>YM(v,o),[v,o]),j=E.useMemo(()=>IM(v.contexts),[v]),N=Math.max(i-dn-KM,240),M=E.useMemo(()=>XM(j,N,m,Ah),[j,N,m]),A=S?3:1,C=m?22:0,D=[ss,ss+zl+Ah,ss+2*(zl+Ah)],O=(S?D[2]+Si:D[0]+zl)+C+8,z=o==="share"?"%":"",_=Tm(w.top,2),R=_[_.length-1],Q=Math.max(w.reach*1.15,o==="share"?.5:1),K=(te,Y)=>Y===2?Si/2*(1-te/Q):zl*(1-te/R),$=[w.observed,w.reconstructed,w.difference],le=y===null?null:v.contexts[y],oe=te=>dn+M[te].x+M[te].width/2;return c.jsxs("section",{className:"ctx sig-section","aria-label":"96 mutational contexts",children:[c.jsxs("div",{className:"ctx-head",children:[c.jsxs("h3",{className:"sv-h",children:["96 mutational contexts",c.jsxs("span",{className:"sv-h-n",children:[Math.round(v.total).toLocaleString("en-US")," SNVs"]})]}),c.jsxs("div",{className:"ctx-controls",children:[S&&n.fit&&c.jsxs("span",{className:"ctx-fit",title:"How well the fitted signatures rebuild the profile, as the report measures it",children:[n.fit.cosine!==null&&c.jsxs("span",{children:["Cosine similarity ",c.jsx("b",{children:ix("cosine",n.fit.cosine)})]}),n.fit.rss!==null&&c.jsxs("span",{children:["RSS ",c.jsx("b",{children:ix("rss",n.fit.rss)})]})]}),n.runs.length>1&&c.jsx(Ss,{label:"Run",value:d,onChange:h,options:n.runs.map(te=>({value:te.source,label:ZM[te.source]}))}),c.jsx(Ss,{label:"Profile measure",value:o,onChange:u,options:[{value:"share",label:"Share"},{value:"count",label:"Count"}]})]})]}),c.jsx("div",{className:"ctx-wrap",children:c.jsxs("div",{ref:a,className:"ctx-plot",onMouseLeave:()=>x(null),children:[c.jsxs("svg",{width:i,height:O,role:"img","aria-label":`SNVs in the 96 mutational contexts${S?", observed and rebuilt from signatures":""}`,children:[c.jsx("g",{transform:`translate(${dn} 0)`,children:j.map(te=>{const Y=M[te.start],ee=M[te.end],X=Y.x-Y.width*.14,W=ee.x+ee.width*1.14,ae=m===te.substitution;return c.jsxs("g",{className:"ctx-chip","data-on":ae||void 0,role:"button",tabIndex:0,"aria-pressed":ae,"aria-label":`${te.substitution}: ${ae?"show all classes":"label its sixteen contexts"}`,onClick:()=>g(ae?null:te.substitution),onKeyDown:ve=>{(ve.key==="Enter"||ve.key===" ")&&(ve.preventDefault(),g(ae?null:te.substitution))},children:[c.jsx("rect",{x:X,y:0,width:Math.max(W-X,1),height:22,rx:11}),c.jsx("circle",{cx:X+11,cy:11,r:4.5,fill:Ku[te.substitution]}),c.jsx("text",{x:X+22,y:15,children:te.substitution})]},te.substitution)})}),Array.from({length:A},(te,Y)=>{const ee=D[Y],X=Y===2?Si:zl,W=$[Y];return W?c.jsxs("g",{transform:`translate(0 ${ee})`,className:"ctx-panel",children:[Y<2?_.map(ae=>c.jsxs("g",{children:[c.jsx("line",{x1:dn,x2:dn+N,y1:K(ae,Y),y2:K(ae,Y),className:ae===0?"ctx-base":"ctx-grid"}),c.jsxs("text",{x:dn-8,y:K(ae,Y)+4,textAnchor:"end",className:"ctx-tick",children:[ae,z]})]},ae)):c.jsxs(c.Fragment,{children:[c.jsx("line",{x1:dn,x2:dn+N,y1:X/2,y2:X/2,className:"ctx-base"}),c.jsx("text",{x:dn-8,y:X/2+4,textAnchor:"end",className:"ctx-tick",children:"0"})]}),c.jsx("text",{x:dn+2,y:12,className:"ctx-name",children:PM[Y]}),c.jsx("g",{className:"ctx-bars","data-hover":y!==null||void 0,children:W.map((ae,ve)=>{const xe=M[ve],He=dn+xe.x,Fe=Y===2?X/2:X,Ye=K(ae,Y),L=Ku[v.contexts[ve].substitution],V=Math.abs(Fe-Ye);return c.jsx("rect",{x:He,y:Math.min(Ye,Fe),width:xe.width,height:Math.max(V,ae===0?0:.8),rx:Math.min(2,xe.width/2),fill:L,className:"ctx-bar","data-on":y===ve||void 0,"data-dim":m&&v.contexts[ve].substitution!==m?"":void 0},ve)})})]},Y):null}),y!==null&&c.jsx("rect",{x:dn+M[y].x-2,y:ss-4,width:M[y].width+4,height:(S?D[2]+Si:D[0]+zl)-ss+8,rx:4,className:"ctx-column",pointerEvents:"none"}),m&&v.contexts.map((te,Y)=>te.substitution===m?c.jsxs("text",{x:dn+M[Y].x+M[Y].width/2,y:(S?D[2]+Si:D[0]+zl)+16,textAnchor:"middle",className:"ctx-tri",children:[Th(te)[0],c.jsx("tspan",{className:"ctx-tri-mid",style:{fill:Ku[te.substitution]},children:Th(te)[1]}),Th(te)[2]]},Y):null),M.map((te,Y)=>c.jsx("rect",{x:dn+te.x-(te.width*.14+1),y:ss,width:te.width*1.28+2,height:(S?D[2]+Si:D[0]+zl)-ss,fill:"transparent",className:"ctx-hit",tabIndex:0,"aria-label":`${v.contexts[Y].context}: ${v.contexts[Y].observed} SNVs`,onMouseEnter:()=>x(Y),onFocus:()=>x(Y),onBlur:()=>x(null)},Y))]}),le&&y!==null&&c.jsxs(Ul,{x:oe(y),y:D[0]+zl/2,width:i,children:[c.jsxs("span",{className:"ctip-title",children:[c.jsx("span",{className:"sv-swatch",style:{background:Ku[le.substitution]},"aria-hidden":!0}),c.jsx("span",{className:"mono",children:le.context})]}),c.jsxs("span",{className:"ctip-row",children:[c.jsx("span",{children:"Observed"}),c.jsxs("b",{children:[Rh(w.observed[y],o),c.jsxs("i",{children:[" ",o==="share"?`${le.observed.toLocaleString("en-US")} SNVs`:""]})]})]}),w.reconstructed&&w.difference&&c.jsxs(c.Fragment,{children:[c.jsxs("span",{className:"ctip-row",children:[c.jsx("span",{children:"Rebuilt"}),c.jsx("b",{children:Rh(w.reconstructed[y],o)})]}),c.jsxs("span",{className:"ctip-note",children:[w.difference[y]>=0?"Observed above":"Observed below"," the signatures by"," ",Rh(Math.abs(w.difference[y]),o).replace("%",o==="share"?" points":"")]})]})]})]})}),!S&&c.jsx("p",{className:"ctx-note",children:"Only the observed profile is shown: this report did not include the signature matrix its fit used, so what the signatures rebuild cannot be drawn."})]})}const ya=n=>n==null?"–":n.toFixed(2),WM=8,e_=250,Ge={w:232,h:148,cx:116,cy:122,r:92};function Oh(n,a){const i=Ni(Ge.cx,Ge.cy,Ge.r,n),o=Ni(Ge.cx,Ge.cy,Ge.r,a);return`M${i.x.toFixed(2)},${i.y.toFixed(2)} A${Ge.r},${Ge.r} 0 0 1 ${o.x.toFixed(2)},${o.y.toFixed(2)}`}function t_({score:n}){const a=n.value===null?null:Math.min(Math.max(n.value,0),1),i=n.rating==="HIGH",o=n.threshold,u=o===null?null:[Ni(Ge.cx,Ge.cy,Ge.r-14,o),Ni(Ge.cx,Ge.cy,Ge.r+14,o),Ni(Ge.cx,Ge.cy,Ge.r+27,o)],d=a===null?null:Ni(Ge.cx,Ge.cy,Ge.r,a);return c.jsxs("div",{className:"hrd-score","data-high":i||void 0,children:[c.jsxs("div",{className:"hrd-score-head",children:[c.jsx("span",{className:"hrd-name",children:n.name}),n.rating&&c.jsx("span",{className:`sc-pill ${i?"p-warn":"p-neu"}`,children:n.rating})]}),c.jsxs("svg",{width:Ge.w,height:Ge.h,viewBox:`0 0 ${Ge.w} ${Ge.h}`,role:"img","aria-label":`${n.name} ${a===null?"has no score":`scores ${ya(n.value)}`}${n.rating?`, rated ${n.rating}`:""}`,className:"hrd-gauge",children:[c.jsx("path",{d:Oh(0,1),pathLength:1,className:"hrd-track"}),o!==null&&c.jsx("path",{d:Oh(o,1),pathLength:1,className:"hrd-zone"}),a!==null&&c.jsx("path",{d:Oh(0,1),pathLength:1,className:"hrd-fill",style:{"--v":a}}),u&&c.jsxs(c.Fragment,{children:[c.jsx("line",{x1:u[0].x,y1:u[0].y,x2:u[1].x,y2:u[1].y,className:"hrd-tick"}),c.jsx("text",{x:u[2].x,y:u[2].y+4,textAnchor:"middle",className:"hrd-tick-label",children:o})]}),d&&c.jsx("circle",{cx:d.x,cy:d.y,r:8.5,className:"hrd-end"}),c.jsx("text",{x:Ge.cx,y:Ge.cy-10,textAnchor:"middle",className:"hrd-num",children:a===null?"–":ya(n.value)}),c.jsx("text",{x:Ge.cx-Ge.r,y:Ge.cy+18,textAnchor:"middle",className:"hrd-end-label",children:"0"}),c.jsx("text",{x:Ge.cx+Ge.r,y:Ge.cy+18,textAnchor:"middle",className:"hrd-end-label",children:"1"})]}),n.threshold!==null&&c.jsxs("span",{className:"hrd-rule",children:["High at ",n.threshold," and above"]})]})}function n_(n){const a=n.filter(i=>i.stats&&i.stats.tumour!==null);return{above:a.filter(i=>i.stats.tumour>i.stats.median).length,of:a.length}}const l_="var(--font)";function a_({features:n}){var D;const[a,i]=Oa(720),[o,u]=E.useState(null),d=n.map(O=>({feature:O,stats:w1(O)})),h=i<640,m=h?0:116,g=h?0:168,y=m+10,x=i-g-14,v=O=>y+O*(x-y),S=h?28:0,w=h?100:70,j=S+38,N=30,M=d.length*w+14,A=M+22,C=o===null?null:d[o];return c.jsxs("div",{ref:a,className:"clouds",onMouseLeave:()=>u(null),children:[c.jsxs("svg",{width:i,height:A,role:"img","aria-label":"HRDetect features against the cohort",style:{fontFamily:l_},children:[[0,.25,.5,.75,1].map(O=>c.jsx("line",{x1:v(O),x2:v(O),y1:0,y2:M,className:"cloud-grid","data-major":O===0||O===1||void 0},O)),d.map(({feature:O,stats:z},_)=>{var te;const R=_*w,Q=ky(O.feature),K=z&&z.values.length<=e_?z.values:[],$=DC(K.map(v),7.5),le=z&&z.values.length>=WM?zC(z.values):null,oe=z&&z.tumour!==null?v(z.tumour):null;return c.jsxs("g",{transform:`translate(0 ${R})`,className:"cloud-row","data-on":o===_||void 0,onMouseEnter:()=>u(_),children:[c.jsx("rect",{x:0,y:2,width:i,height:w-4,rx:12,className:"cloud-hit"}),z&&c.jsxs(c.Fragment,{children:[c.jsx("rect",{x:v(z.q1),y:S+4,width:Math.max(v(z.q3)-v(z.q1),2),height:w-S-10,rx:8,className:"cloud-iqr"}),c.jsx("line",{x1:v(z.median),x2:v(z.median),y1:S+10,y2:w-14,className:"cloud-median"}),le&&c.jsxs(c.Fragment,{children:[c.jsx("path",{d:`M${v(0)},${j} ${le.map(Y=>`L${v(Y.x).toFixed(1)},${(j-Y.y*N).toFixed(1)}`).join(" ")} L${v(1)},${j} Z`,className:"cloud-area"}),c.jsx("path",{d:le.map((Y,ee)=>`${ee?"L":"M"}${v(Y.x).toFixed(1)},${(j-Y.y*N).toFixed(1)}`).join(" "),className:"cloud-line"})]}),K.map((Y,ee)=>c.jsx("circle",{cx:v(Y),cy:j+11+Math.min($[ee],2)*7,r:3,className:"cloud-dot"},ee)),oe!==null&&c.jsxs("g",{className:"cloud-pin",transform:`translate(${oe} 0)`,children:[c.jsx("line",{y1:S+8,y2:j,className:"cloud-stem"}),c.jsx("circle",{cy:j,r:8,className:"cloud-pin-dot"})]})]}),c.jsx("text",{x:h?4:6,y:h?18:j-6,className:"cloud-name",children:Q}),!h&&c.jsxs("text",{x:6,y:j+10,className:"cloud-raw",children:["raw ",ya((te=O.sample)==null?void 0:te.raw)]}),z&&c.jsx("text",{x:i-4,y:h?18:j-6,textAnchor:"end",className:"cloud-rank",children:fh(z)}),!h&&z&&c.jsxs("text",{x:i-4,y:j+10,textAnchor:"end",className:"cloud-raw",children:["of ",z.values.length," in the cohort"]})]},O.feature)}),c.jsxs("g",{transform:`translate(0 ${M})`,className:"cloud-axis",children:[c.jsx("text",{x:v(0),y:12,textAnchor:"start",children:"0 · cohort lowest"}),c.jsx("text",{x:v(.5),y:12,textAnchor:"middle",children:"0.5"}),c.jsx("text",{x:v(1),y:12,textAnchor:"end",children:"cohort highest · 1"})]})]}),C&&o!==null&&C.stats&&c.jsxs(Ul,{x:C.stats.tumour!==null?v(C.stats.tumour):v(C.stats.median),y:o*w+j,width:i,children:[c.jsx("span",{className:"ctip-title",children:ky(C.feature.feature,"long")}),c.jsxs("span",{className:"ctip-row",children:[c.jsx("span",{children:"This tumour"}),c.jsxs("b",{children:[ya((D=C.feature.sample)==null?void 0:D.raw)," ",c.jsxs("i",{children:["scaled ",ya(C.stats.tumour)]})]})]}),c.jsxs("span",{className:"ctip-row",children:[c.jsx("span",{children:"Cohort median"}),c.jsx("b",{children:ya(C.stats.median)})]}),c.jsxs("span",{className:"ctip-row",children:[c.jsx("span",{children:"Middle half"}),c.jsxs("b",{children:[ya(C.stats.q1),"–",ya(C.stats.q3)]})]}),fh(C.stats)&&c.jsx("span",{className:"ctip-note",children:fh(C.stats)})]})]})}const Yo=n=>`${(n*100).toFixed(n>=.1||n===0?0:1)}%`,Io=n=>Math.round(n).toLocaleString("en-US"),s_=n=>`${n>=0?"+":"−"}${Math.abs(n).toFixed(Math.abs(n)>=10?0:1)}`,ox=3,bi=26,ji=52;function i_({groups:n,bands:a,lit:i,onLight:o}){const[u,d]=Oa(),h=n.find(_=>_.group==="sample")??n[0],m=n.find(_=>_.group==="cohort")??null,g=m!==null,y=d>=440,x=y?d>=620?118:92:0,v=g?330:230,S=qy(a.map(_=>_.share),v,ox),w=g?qy(a.map(_=>_.cohortShare??0),v,ox):[],j=g?x:0,N=d-x-bi,M=j+bi,A=N,C=a.find(_=>_.name===i)??null,D=C?a.indexOf(C):-1,O=D<0?0:ji+((S[D].y0+S[D].y1)/2+(g?(w[D].y0+w[D].y1)/2:(S[D].y0+S[D].y1)/2))/2,z=(_,R,Q,K,$,le)=>{const oe=_.y1-_.y0;if(!y||oe<17)return null;const te=ji+(_.y0+_.y1)/2,Y=oe>=36;return c.jsxs("text",{x:$,y:te,textAnchor:le,className:"flow-label",children:[c.jsxs("tspan",{x:$,dy:Y?"-0.35em":"0.35em",className:"flow-name",children:[R.name,!Y&&c.jsxs("tspan",{className:"flow-share",children:[" ",Yo(Q)]})]}),Y&&c.jsxs("tspan",{x:$,dy:"1.35em",className:"flow-share",children:[Yo(Q),K]})]})};return c.jsxs("div",{ref:u,className:"flow","data-lit":i??void 0,children:[c.jsxs("svg",{width:d,height:ji+v+4,role:"img","aria-label":"Signature shares, tumour against cohort",children:[c.jsxs("g",{className:"flow-head",children:[c.jsx("text",{x:0,y:16,className:"flow-col",children:By(h)}),c.jsxs("text",{x:0,y:34,className:"flow-sub",children:[Io(h.total)," mutations"]}),m&&c.jsxs(c.Fragment,{children:[c.jsx("text",{x:d,y:16,textAnchor:"end",className:"flow-col",children:By(m)}),c.jsxs("text",{x:d,y:34,textAnchor:"end",className:"flow-sub",children:["about ",Io(m.total)," each, on average"]})]})]}),g&&c.jsx("g",{className:"flow-ribs",transform:`translate(0 ${ji})`,children:a.map((_,R)=>c.jsx("path",{d:OC(M,S[R],A,w[R]),fill:_.colour,className:"flow-rib","data-on":i===_.name||void 0,onMouseEnter:()=>o(_.name),onMouseLeave:()=>o(null)},_.name))}),a.map((_,R)=>{const Q=i===_.name||void 0,K=($,le)=>$.y1-$.y0>.4&&c.jsx("rect",{x:le,y:ji+$.y0,width:bi,height:$.y1-$.y0,rx:Math.min(5,($.y1-$.y0)/2),fill:_.colour,className:"flow-seg","data-on":Q,tabIndex:0,"aria-label":`${_.name}, ${Yo(_.share)} of this tumour`,onMouseEnter:()=>o(_.name),onMouseLeave:()=>o(null),onFocus:()=>o(_.name),onBlur:()=>o(null)});return c.jsxs("g",{className:"flow-band","data-on":Q,children:[K(S[R],j),g&&K(w[R],N),z(S[R],_,_.share,_.count?` · ${Io(_.count)}`:"",g?j-10:j+bi+10,g?"end":"start"),g&&z(w[R],_,_.cohortShare??0,"",N+bi+10,"start")]},_.name)}),g&&d>=520&&a.map((_,R)=>{const Q=va(_),K=S[R],$=w[R];if(Q===null||Math.abs(Q)<5||Math.min(K.y1-K.y0,$.y1-$.y0)<22)return null;const le=(M+A)/2,oe=ji+(K.y0+K.y1+$.y0+$.y1)/4;return c.jsxs("g",{transform:`translate(${le} ${oe})`,className:"flow-delta","data-on":i===_.name||void 0,children:[c.jsx("rect",{x:-30,y:-10,width:60,height:20,rx:10}),c.jsxs("text",{y:4,textAnchor:"middle",children:[s_(Q)," pts"]})]},_.name)})]}),C&&c.jsxs(Ul,{x:g?d/2:j+bi+x+20,y:O,width:d,children:[c.jsxs("span",{className:"ctip-title",children:[c.jsx("span",{className:"sv-swatch",style:{background:C.colour},"aria-hidden":!0}),C.name]}),C.aetiology&&c.jsx("span",{className:"ctip-sub",children:C.aetiology}),c.jsxs("span",{className:"ctip-row",children:[c.jsx("span",{children:"This tumour"}),c.jsxs("b",{children:[Yo(C.share)," ",c.jsxs("i",{children:[Io(C.count)," mutations"]})]})]}),C.cohortShare!==null&&c.jsxs("span",{className:"ctip-row",children:[c.jsx("span",{children:"Cohort"}),c.jsxs("b",{children:[Yo(C.cohortShare)," ",c.jsx("i",{children:C.cohortCount!==null?`about ${Io(C.cohortCount)} each`:""})]})]}),va(C)!==null&&c.jsx("span",{className:"ctip-note",children:Math.abs(va(C))<1?"About the same as its cohort":`${Math.abs(va(C)).toFixed(Math.abs(va(C))>=10?0:1)} points ${va(C)>0?"above":"below"} its cohort`})]})]})}const rx=n=>`${(n*100).toFixed(n>=.1||n===0?0:1)}%`,G1=n=>Math.round(n).toLocaleString("en-US");function o_({points:n,reach:a}){if(n===null)return null;const i=Math.min(Math.abs(n)/a,1)*100;return c.jsx("span",{className:"lead","aria-hidden":!0,children:c.jsx("span",{className:"lead-bar","data-up":n>=0||void 0,style:{width:`${Math.max(i,n===0?0:3)}%`}})})}function r_({groups:n}){const[a,i]=E.useState(null),o=E.useMemo(()=>AC(n),[n]),u=n.find(h=>h.group==="cohort"),d=Math.max(10,...o.map(h=>Math.abs(va(h)??0)));return c.jsxs("section",{className:"sig-section","aria-label":"Mutational signatures",children:[c.jsx("h3",{className:"sv-h",children:"Mutational signatures"}),c.jsxs("div",{className:"sig-grid",children:[c.jsx(i_,{groups:n,bands:o,lit:a,onLight:i}),c.jsxs("div",{className:"sig-tablebox",children:[c.jsxs("table",{className:"sig-table",children:[c.jsx("thead",{children:c.jsxs("tr",{children:[c.jsx("th",{children:"Signature"}),c.jsx("th",{className:"n",children:"This tumour"}),u&&c.jsx("th",{className:"n",children:"Cohort"}),u&&c.jsx("th",{className:"lead-h",children:"Against cohort"})]})}),c.jsx("tbody",{children:o.map(h=>{const m=va(h);return c.jsxs("tr",{"data-lit":a===h.name||void 0,onMouseEnter:()=>i(h.name),onMouseLeave:()=>i(null),children:[c.jsxs("td",{children:[c.jsxs("span",{className:"sig-name",title:h.members.length>1?h.members.join(", "):void 0,children:[c.jsx("span",{className:"sv-swatch",style:{background:h.colour},"aria-hidden":!0}),h.name]}),h.aetiology&&c.jsx("span",{className:"sig-aetiology",children:h.aetiology})]}),c.jsxs("td",{className:"n",children:[c.jsx("span",{className:"mono",children:rx(h.share)}),c.jsx("span",{className:"sig-count",children:G1(h.count)})]}),u&&c.jsx("td",{className:"n mono",children:rx(h.cohortShare??0)}),u&&c.jsx("td",{children:c.jsxs("span",{className:"lead-cell",children:[c.jsx(o_,{points:m,reach:d}),c.jsx("span",{className:"lead-n mono",children:m===null?"":`${m>=0?"+":"−"}${Math.abs(m).toFixed(0)}`})]})})]},h.name)})})]}),c.jsx(yc,{shown:o.length,total:o.length,noun:["signature","signatures"]})]})]})]})}function u_({envelope:n,loading:a}){return(n==null?void 0:n.status)==="ok"&&n.data?c.jsx(JM,{data:n.data}):n?c.jsxs("section",{className:"sig-section","aria-label":"96 mutational contexts",children:[c.jsx("h3",{className:"sv-h",children:"96 mutational contexts"}),c.jsx("p",{className:"sv-empty",children:n.warnings.join(" ")||"No 96-context profile for this sample."})]}):a?c.jsxs("section",{className:"sig-section","aria-label":"96 mutational contexts",children:[c.jsx("h3",{className:"sv-h",children:"96 mutational contexts"}),c.jsx("div",{className:"px-5 pb-3",children:c.jsx("div",{className:"skeleton",style:{height:220},"aria-label":"Loading 96 mutational contexts"})})]}):null}function c_({hrd:n}){const a=E.useMemo(()=>n_(n.features.map(i=>({feature:i,stats:w1(i)}))),[n.features]);return c.jsxs("section",{className:"sig-section","aria-label":"Homologous recombination deficiency",children:[c.jsx("h3",{className:"sv-h",children:"Homologous recombination deficiency"}),c.jsxs("div",{className:"hrd-body",children:[n.scores.length>0&&c.jsx("div",{className:"hrd-scores",children:n.scores.map(i=>c.jsx(t_,{score:i},i.name))}),n.features.length>0&&c.jsxs("div",{className:"hrd-chart",children:[c.jsxs("div",{className:"sv-sigs-head",children:[c.jsxs("h4",{className:"hrd-sub",children:["HRDetect features against the cohort",n.cohort_n?c.jsxs("span",{className:"sv-h-n",children:["n = ",n.cohort_n]}):null]}),c.jsxs("ul",{className:"sv-sigs-key","aria-label":"Key",children:[c.jsxs("li",{children:[c.jsx("span",{className:"hrd-key-pin","aria-hidden":!0}),"This tumour"]}),c.jsxs("li",{children:[c.jsx("span",{className:"hrd-key-dot","aria-hidden":!0}),"Cohort sample"]}),c.jsxs("li",{children:[c.jsx("span",{className:"hrd-key-band","aria-hidden":!0}),"Middle half of the cohort"]})]})]}),a.of>0&&c.jsxs("p",{className:"hrd-lede",children:["Above the cohort median on ",c.jsx("b",{children:a.above})," of ",a.of," features"]}),c.jsx(a_,{features:n.features})]})]})]})}const f_=E.forwardRef(function({envelope:a,loading:i,contextEnvelope:o,contextLoading:u=!1,picked:d},h){var y;const m=(a==null?void 0:a.status)==="ok"?a.data:null,g=(y=m==null?void 0:m.signatures)==null?void 0:y.find(x=>x.group==="sample");return c.jsx(gc,{ref:h,title:"Signatures and HRD",subtitle:g?`${G1(g.total)} mutations attributed to signatures`:void 0,lineage:mc(a==null?void 0:a.lineage,o==null?void 0:o.lineage),picked:d,info:"signaturesHrd",className:"sigs",children:c.jsx(dr,{label:"signatures and HRD",envelope:a,loading:i,skeletonHeight:300,children:x=>c.jsxs("div",{className:"sig-body",children:[x.signatures?c.jsx(r_,{groups:x.signatures}):c.jsx("p",{className:"sv-empty",children:"No signature contributions for this sample."}),c.jsx(u_,{envelope:o,loading:u}),x.hrd&&c.jsx(c_,{hrd:x.hrd})]})})})});function d_(n){var o;const a=n.samples.filter(u=>u.category==="TUMOR");return(o=a.find(u=>Object.values(u.datasets??{}).some(d=>Object.values(d).includes("ok")))??a[0]??n.samples[0])==null?void 0:o.id}const h_=[];function m_(n){const a=E.useRef(!1);return E.useEffect(()=>{let i=0;const o=()=>{a.current=!0,window.clearTimeout(i),i=window.setTimeout(()=>a.current=!1,150)};return window.addEventListener("scroll",o,{passive:!0}),()=>{window.removeEventListener("scroll",o),window.clearTimeout(i)}},[]),E.useCallback(i=>{(i===null||!a.current)&&n(i)},[n])}function g_(n){var i,o;const a=(o=(i=n==null?void 0:n.samples.find(u=>{var d;return(d=u.disease)==null?void 0:d.name}))==null?void 0:i.disease)==null?void 0:o.name;return a?a.charAt(0)+a.slice(1).toLowerCase():void 0}function Xo(n,a){const i=typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches;n==null||n.scrollIntoView({behavior:i?"auto":"smooth",block:a})}const ux=160;function p_(n,a){const i=E.useRef(n);i.current=n;const o=E.useRef(null),u=E.useRef(null),d=E.useRef(0),h=E.useRef(()=>{}),m=E.useRef(()=>{});E.useEffect(()=>{let x=0;const v=()=>{var z;if(x=0,o.current)return;const M=i.current.filter(([,_])=>_.current).map(([_,R])=>[_,R.current.getBoundingClientRect().top]),A=Math.max(0,document.documentElement.scrollHeight-window.innerHeight),C=Math.max(0,...M.map(([,_])=>_+window.scrollY-A-ux)),D=ux+(A>0?C*Math.min(1,window.scrollY/A):0);let O=((z=M[0])==null?void 0:z[0])??null;for(const[_,R]of M)R<=D&&(O=_);a.set(O)},S=()=>{o.current=null,u.current=null,v()};m.current=()=>{u.current=window.scrollY};const w=()=>{if(o.current){u.current===null?(window.clearTimeout(d.current),d.current=window.setTimeout(m.current,160)):Math.abs(window.scrollY-u.current)>4&&S();return}x||(x=requestAnimationFrame(v))},j=()=>{o.current&&u.current===null&&(window.clearTimeout(d.current),S())};return h.current=v,v(),window.addEventListener("scroll",w,{passive:!0}),window.addEventListener("resize",w),window.addEventListener("wheel",j,{passive:!0}),window.addEventListener("touchstart",j,{passive:!0}),window.addEventListener("keydown",j),()=>{window.removeEventListener("scroll",w),window.removeEventListener("resize",w),window.removeEventListener("wheel",j),window.removeEventListener("touchstart",j),window.removeEventListener("keydown",j),window.clearTimeout(d.current),x&&cancelAnimationFrame(x)}},[]);const g=E.useRef("");return E.useEffect(()=>{const x=n.filter(([,v])=>v.current).map(([v])=>v).join();x!==g.current&&(g.current=x,h.current())}),x=>{o.current=x,u.current=null,a.set(x),window.clearTimeout(d.current),d.current=window.setTimeout(m.current,160)}}function v_({held:n,sampleId:a,...i}){const o=dc(n);return c.jsx(cN,{...i,sampleId:o??a})}function y_(){var Ve,ke,wt,lt,We,Jn,Vl,Da,La,hr,Bi,mr,gr,Fl,Qt,Vn,Yt,pr;const{individual:n=""}=tw(),[a,i]=jw(),o=a.get("version")??void 0,[u,d]=E.useState(null),[h,m]=E.useState(null),[g,y]=E.useState(zy),[x,v]=E.useState(null),S=m_(v),[w,j]=E.useState(null),N=E.useRef(null),[M,A]=E.useState(null),C=E.useRef(Jo(!0)).current,D=E.useRef(null),O=E.useRef(null),z=E.useRef(null),_=E.useRef(null),R=E.useRef(Jo(null)).current,Q=p_([["overview",O],["copyNumber",N],["mutations",D],["structuralVariants",z],["signatures",_]],R),K=jx();E.useEffect(()=>{const de=M;if(!de||typeof IntersectionObserver>"u")return;const st=new IntersectionObserver(([Dt])=>C.set(Dt.isIntersecting),{rootMargin:"-72px 0px 0px 0px",threshold:0});return st.observe(de),()=>st.disconnect()},[M]);const $=E.useCallback(de=>y(st=>({...st,...de})),[]),le=E.useCallback(de=>{$({q:wN(de.chrom,de.start,de.end),scope:"all",sort:"position"}),Xo(D.current,"start")},[$]),oe=E.useCallback(de=>{$({q:de}),Xo(D.current,"start")},[$]),te=E.useCallback(de=>{j({chrom:de.chrom,pos:de.pos,gene:de.gene,nonce:Date.now()}),Xo(N.current,"center")},[]),Y=E.useCallback(de=>{j({...de,nonce:Date.now()}),Xo(N.current,"center")},[]),ee=_N(n,o),X=ee.data,W=(X==null?void 0:X.status)==="ok"?X.data??void 0:void 0,ae=a.get("sample")??(W?d_(W):void 0),ve=W==null?void 0:W.samples.find(de=>de.id===ae),xe=(ve==null?void 0:ve.category)==="TUMOR"?ae:void 0,He=h??((W==null?void 0:W.mode)==="unmatched"?"vaf":"ccf"),Fe=TN(n,W?ae:void 0,o),Ye=RN(n,o),L=AN(n,xe,o),V=ON(n,xe,He,g.ffpe,o),ne=$N(n,xe,g,o),re=(Ve=ne.data)==null?void 0:Ve.pages[0],me=E.useMemo(()=>{var de;return((de=ne.data)==null?void 0:de.pages.flatMap(st=>st.status==="ok"&&st.data?st.data.rows:[]))??[]},[ne.data]),{fetchNextPage:be}=ne,Ce=E.useCallback(()=>void be(),[be]),ue=UN(n,xe,o),ge=zN(n,xe,o),rt=DN(n,xe,o),jt=LN(n,xe,o),mn=HN(n,xe,o),Et=(wt=(ke=Ye.data)==null?void 0:ke.data)==null?void 0:wt.samples.find(de=>de.sample===ae),mt=E.useMemo(()=>(Et==null?void 0:Et.drivers)??h_,[Et]),Ie=E.useMemo(()=>x?{chrom:x.chrom,pos:x.pos,gene:x.gene}:w,[x,w]),Mt=E.useRef(null),Cn=E.useRef(Jo(null)).current,Pt=(de,st)=>{var Dt;(Dt=Mt.current)==null||Dt.toggleAttribute("data-gliding",de),Mt.current&&(Mt.current.style.minHeight=de&&st?`${st}px`:"")},pt=E.useRef(null);E.useEffect(()=>()=>{var de;return(de=pt.current)==null?void 0:de.call(pt)},[]);const $l=de=>{var vr,qi;if(de===ae)return;(vr=pt.current)==null||vr.call(pt);const st=typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches,Dt=50;if(st||window.scrollY<=Dt)return window.scrollTo({top:0,behavior:"auto"}),ut("sample",de);const kl=window.scrollY,js=Math.min(520,240+kl*.12),pl=performance.now();Pt(!0,document.documentElement.scrollHeight-(((qi=Mt.current)==null?void 0:qi.getBoundingClientRect().top)??0)-kl),Cn.set(ae??null),Q("overview"),E.startTransition(()=>ut("sample",de));let Bl=0;function an(){cancelAnimationFrame(Bl),window.removeEventListener("wheel",an),window.removeEventListener("touchstart",an),window.removeEventListener("keydown",an),pt.current=null,Cn.set(null),Pt(!1)}const Gi=Qi=>{const Gl=Math.min(1,(Qi-pl)/js),yr=kl*(1-Gl)**3;window.scrollTo({top:yr,behavior:"instant"}),yr<=Dt&&Cn.set(null),Gl<1?Bl=requestAnimationFrame(Gi):an()};window.addEventListener("wheel",an,{passive:!0}),window.addEventListener("touchstart",an,{passive:!0}),window.addEventListener("keydown",an),pt.current=an,Bl=requestAnimationFrame(Gi)},ut=(de,st)=>{const Dt=new URLSearchParams(a);Dt.set(de,st),i(Dt,{replace:!1}),d(null),y(zy()),v(null),j(null)},Zn=[ee,Fe,Ye,L,V,ne,ue,ge,rt,jt,mn].map(de=>de.error);if(Zn.some(de=>de instanceof hc))return c.jsx("div",{className:`wgts ${Kn.theme}`,children:c.jsx("main",{className:"page",children:c.jsx(rC,{onSignedIn:()=>K.invalidateQueries()})})});const Ot=Zn.find(de=>de instanceof c1),zt=ve&&W?Em(ve.id,W.individual.id):"",za=new Set(W?xe?["overview","copyNumber","mutations","structuralVariants","signatures"]:["overview"]:[]),qt=de=>{if(Q(de),de==="overview"){const Dt=typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches;window.scrollTo({top:0,behavior:Dt?"auto":"smooth"});return}const st={copyNumber:N,mutations:D,structuralVariants:z,signatures:_}[de];Xo((st==null?void 0:st.current)??null,"start")},$n=W&&ae&&W.analyses[ae]||[],gl=(W==null?void 0:W.failures.filter(de=>de.sample===ae))??[],J=new Set($n.map(Gt)),se=new Set,je=de=>de==null?void 0:de.forEach(st=>J.has(Gt(st))&&se.add(Gt(st)));for(const de of((We=(lt=Fe.data)==null?void 0:lt.data)==null?void 0:We.metrics)??[])sm.includes(de.key)&&je(de.sources);je((Jn=Ye.data)==null?void 0:Jn.lineage),je((Vl=L.data)==null?void 0:Vl.lineage),je((Da=V.data)==null?void 0:Da.lineage),je(re==null?void 0:re.lineage),je((La=ue.data)==null?void 0:La.lineage),je((hr=ge.data)==null?void 0:hr.lineage),je((Bi=rt.data)==null?void 0:Bi.lineage),je((mr=jt.data)==null?void 0:mr.lineage),je((gr=mn.data)==null?void 0:gr.lineage);for(const de of $n)de.state==="failed"&&gl.length>0&&se.add(Gt(de));return c.jsxs("div",{className:`wgts ${Kn.theme}`,children:[c.jsx(YN,{analyses:$n,onPage:se,sampleLabel:zt,picked:u,onPick:d,sections:za,activeStore:R,onSection:qt}),c.jsxs("div",{ref:Mt,className:"page",children:[c.jsx(u1,{individualId:n,subtitle:[g_(W),(Fl=W==null?void 0:W.individual.sex)==null?void 0:Fl.toLowerCase(),(W==null?void 0:W.mode)==="unmatched"?"tumour only":void 0].filter(Boolean).join(", ")||void 0,patientIcon:W?c.jsx(sN,{sex:W.individual.sex}):void 0,report:W?c.jsx(tC,{data:W,onVersion:de=>ut("version",de)}):void 0,compact:W&&ae?c.jsx(fN,{data:W,sampleId:ae,fingerprint:((Qt=Ye.data)==null?void 0:Qt.data)??void 0,onSample:$l}):void 0,headerInView:C}),c.jsxs("main",{className:"flex flex-1 flex-col",children:[W&&ae&&c.jsx("div",{className:"px-8 pt-1",children:c.jsx("div",{ref:A,children:c.jsx(v_,{held:Cn,data:W,sampleId:ae,fingerprint:((Vn=Ye.data)==null?void 0:Vn.data)??void 0,onSample:de=>ut("sample",de)})})}),c.jsxs("div",{className:"sheet",children:[ee.isPending&&c.jsx("div",{className:"skeleton h-24","aria-label":"Loading the patient"}),Ot&&c.jsx("div",{className:"sc-card px-6 py-5",children:c.jsx(os,{envelope:{status:"error",data:null,lineage:[],warnings:[Ot.message]}})}),ee.isError&&!Ot&&c.jsx("div",{className:"sc-card px-6 py-5",children:c.jsx(os,{envelope:{status:"error",data:null,lineage:[],warnings:[ee.error.message]}})}),X&&X.status!=="ok"&&c.jsx("div",{className:"sc-card px-6 py-5",children:c.jsx(os,{envelope:X})}),(X==null?void 0:X.status)==="ok"&&X.warnings.length>0&&c.jsx("div",{className:"sc-card px-6 py-4",children:c.jsx(os,{envelope:{...X,status:"missing"}})}),W&&ae&&c.jsxs(c.Fragment,{children:[c.jsx(oC,{sampleLabel:zt,failures:gl,analyses:$n}),xe?c.jsxs(c.Fragment,{children:[c.jsx("div",{ref:O,className:"page-section",children:c.jsx(iC,{sampleLabel:`${zt} tumour`,fingerprint:Et,metrics:Fe.data,picked:u,lineage:mc((Yt=Fe.data)==null?void 0:Yt.lineage,(pr=Ye.data)==null?void 0:pr.lineage)})}),c.jsx("div",{ref:N,className:"page-section",children:c.jsx(QC,{envelope:L.data,loading:L.isPending,picked:u,sampleLabel:zt,drivers:mt,focus:Ie,locate:w,onSegment:le,onGene:oe,fga:jt.data,fgaLoading:jt.isPending})}),c.jsx(SM,{ref:D,variants:re,rows:me,hasMore:ne.hasNextPage,loadingMore:ne.isFetchingNextPage,onMore:Ce,variantsLoading:ne.isPending,variantsFetching:ne.isFetching&&ne.isPlaceholderData,density:V.data,densityLoading:V.isPending,picked:u,measure:He,onMeasure:de=>{m(de),g.range&&g.range.measure!==de&&$({range:null})},table:g,onTable:$,hovered:x,onHover:S,onLocate:te,showCcf:W.mode!=="unmatched",tmb:mn.data}),c.jsx(QM,{ref:z,envelope:ue.data,loading:ue.isPending,picked:u,onLocate:Y}),c.jsx(f_,{ref:_,envelope:ge.data,loading:ge.isPending,contextEnvelope:rt.data,contextLoading:rt.isPending,picked:u})]}):c.jsx("div",{ref:O,className:"sc-card px-6 py-5",children:c.jsx(os,{envelope:{status:"missing",data:null,lineage:[],warnings:[`${zt} is a normal sample. Its germline and quality panels arrive with those sections.`]}})})]})]})]})]})]})}const zh=200,q1="wgts-picker-scope";function x_(){try{const n=localStorage.getItem(q1);return n&&/^\d+$/.test(n)?Number(n):"all"}catch{return"all"}}function S_(n,a){const i=a.toLowerCase().split(/\s+/).filter(Boolean);return i.length===0?n:n.filter(o=>{const u=`${o.individual} ${o.diseases.join(" ")} ${o.report_version}`.toLowerCase();return i.every(d=>u.includes(d))})}function b_(n,a){const i=a.toLowerCase().split(/\s+/).filter(Boolean);return i.length===0?n:n.filter(o=>{const u=`${o.title} ${o.short_title??""} ${o.description??""}`.toLowerCase();return i.every(d=>u.includes(d))})}const Dh=n=>n.toLocaleString("en-US");function j_(){return dc(_m)?c.jsx(w_,{}):null}function w_(){var $,le,oe,te;const n=Nm(),a=(($=Wj("/:individual"))==null?void 0:$.params.individual)??"",i=E.useId(),o=E.useRef(null),[u,d]=E.useState(x_),[h,m]=E.useState(""),[g,y]=E.useState(""),[x,v]=E.useState(0),S=VN(),w=FN(u);E.useEffect(()=>{const Y=document.activeElement,ee=document.documentElement,X=ee.style.overflow;return ee.style.overflow="hidden",requestAnimationFrame(()=>{var W;return(W=document.querySelector(".pick-main .tsearch input"))==null?void 0:W.focus()}),()=>{ee.style.overflow=X,Y==null||Y.focus()}},[]);const j=Y=>{d(Y),y(""),v(0);try{localStorage.setItem(q1,String(Y))}catch{}requestAnimationFrame(()=>{var ee;return(ee=document.querySelector(".pick-main .tsearch input"))==null?void 0:ee.focus()})},N=((le=S.data)==null?void 0:le.results)??[],M=E.useMemo(()=>b_(N,h),[N,h]),A=u==="all"?null:N.find(Y=>Y.pk===u)??((oe=w.data)==null?void 0:oe.project)??null,C=((te=w.data)==null?void 0:te.results)??[],D=E.useMemo(()=>S_(C,g),[C,g]),O=D.slice(0,zh),z=E.useRef(null),_=Y=>{Gu(),Y.individual!==a&&n(`/${encodeURIComponent(Y.individual)}`)};E.useEffect(()=>{var Y,ee,X;(X=(ee=(Y=z.current)==null?void 0:Y.querySelector(`[data-index="${x}"]`))==null?void 0:ee.scrollIntoView)==null||X.call(ee,{block:"nearest"})},[x]),E.useEffect(()=>v(0),[g]);const R=Y=>{const ee=Y.target,X=ee instanceof HTMLInputElement&&!!ee.closest(".pick-main");if(Y.key==="Escape"){if(ee instanceof HTMLInputElement&&ee.value)return;Gu()}else if(X&&Y.key==="ArrowDown")Y.preventDefault(),v(W=>Math.min(W+1,O.length-1));else if(X&&Y.key==="ArrowUp")Y.preventDefault(),v(W=>Math.max(W-1,0));else if(X&&Y.key==="Enter"&&O[x])Y.preventDefault(),_(O[x]);else if(ee instanceof HTMLInputElement&&ee.closest(".pick-rail")&&Y.key==="Enter"){Y.preventDefault();const W=M[0];W&&j(W.pk)}},Q=S.isPending,K=S.isError||w.isError;return jm.createPortal(c.jsx("div",{className:`info-backdrop ${Kn.theme}`,onMouseDown:Y=>Y.target===Y.currentTarget&&Gu(),children:c.jsxs("div",{className:"info-dialog pick",role:"dialog","aria-modal":"true","aria-labelledby":i,tabIndex:-1,onKeyDown:R,children:[c.jsx("button",{ref:o,type:"button",className:"info-close","aria-label":"Close",onClick:Gu,children:c.jsx(cc,{size:18,"aria-hidden":!0})}),c.jsxs("nav",{className:"info-rail pick-rail","aria-label":"Projects",children:[c.jsx("span",{className:"info-kicker",children:"Browse"}),c.jsx("h2",{id:i,children:"Projects"}),c.jsx(ac,{value:h,onChange:m,label:"Search projects",placeholder:"Search projects",shortcut:!1,delay:0}),c.jsxs("ol",{children:[c.jsx("li",{children:c.jsxs("button",{type:"button","aria-current":u==="all"?"true":void 0,onClick:()=>j("all"),children:[c.jsx("span",{className:"pick-name",children:c.jsxs("span",{children:[c.jsx(Yw,{size:14,"aria-hidden":!0}),"All patients"]})}),c.jsx("span",{className:"pick-n",children:S.data?Dh(S.data.total):""})]})}),M.map(Y=>c.jsx("li",{children:c.jsxs("button",{type:"button","aria-current":u===Y.pk?"true":void 0,onClick:()=>j(Y.pk),title:Y.short_title?`${Y.title} (${Y.short_title})`:Y.title,children:[c.jsx("span",{className:"pick-name",children:Y.title}),c.jsx("span",{className:"pick-n",children:Dh(Y.patients)})]})},Y.pk))]}),Q&&c.jsx("p",{className:"pick-note",children:"Loading projects…"}),!Q&&N.length>0&&M.length===0&&c.jsxs("p",{className:"pick-note",children:["No project matches “",h,"”."]}),!Q&&!S.isError&&N.length===0&&c.jsx("p",{className:"pick-note",children:"No project has a dashboard yet. “All patients” lists every one."})]}),c.jsxs("div",{className:"pick-main",children:[c.jsxs("header",{className:"pick-head",children:[c.jsx("span",{className:"info-kicker",children:(A==null?void 0:A.short_title)??(u==="all"?"Every project":"Project")}),c.jsx("h3",{children:(A==null?void 0:A.title)??"All patients"}),(A==null?void 0:A.description)&&c.jsx("p",{children:A.description})]}),c.jsx("div",{className:"tbar",children:c.jsx(ac,{value:g,onChange:y,label:"Search patients",placeholder:"Search id or disease",shortcut:!1,delay:0})}),c.jsx("div",{ref:z,className:"pick-list",role:"group","aria-label":"Patients","aria-busy":w.isFetching,children:K?c.jsx("p",{className:"pick-note",children:"The patients could not be loaded. Close this window and try again."}):w.isPending?c.jsx("p",{className:"pick-note",children:"Loading patients…"}):O.length===0?c.jsx("p",{className:"pick-note",children:g?`No patient matches “${g}”.`:"No patients with a dashboard in this project yet."}):O.map((Y,ee)=>c.jsxs("button",{type:"button",className:"pick-row","data-index":ee,"data-active":ee===x||void 0,"data-current":Y.individual===a||void 0,onMouseEnter:()=>v(ee),onClick:()=>_(Y),children:[c.jsx("span",{className:"pick-id mono",children:c.jsx(xs,{text:Y.individual,query:g})}),c.jsx("span",{className:"pick-diseases",children:Y.diseases.length>0?Y.diseases.map(X=>c.jsx("span",{className:"sc-chip",children:c.jsx(xs,{text:X,query:g})},X)):c.jsx("span",{className:"pick-faint",children:"No tumour disease recorded"})}),c.jsx("span",{className:"pick-aside",children:Y.individual===a?c.jsxs("span",{className:"pick-here",children:[c.jsx(e1,{size:13,"aria-hidden":!0}),"On this page"]}):c.jsxs(c.Fragment,{children:[c.jsxs("span",{children:[Dh(Y.samples)," ",Y.samples===1?"sample":"samples"]}),c.jsxs("span",{className:"pick-faint",children:["report ",Y.report_version,Y.built?`, ${s1(Y.built)}`:""]})]})})]},Y.individual))}),w.data&&c.jsx(yc,{shown:D.length,total:C.length,noun:["patient","patients"],note:D.length>zh?`Showing the first ${zh}; search to narrow`:void 0})]})]})}),document.body)}const N_=new gj({defaultOptions:{queries:{staleTime:6e4,refetchOnWindowFocus:!1}}});function C_(){return c.jsx(B2,{client:N_,children:c.jsxs(bw,{basename:Kn.basePath,children:[c.jsxs(vw,{children:[c.jsx(Kh,{path:"/",element:c.jsx(hN,{})}),c.jsx(Kh,{path:"/:individual",element:c.jsx(y_,{})})]}),c.jsx(j_,{})]})})}k2.createRoot(document.getElementById("root")).render(c.jsx(E.StrictMode,{children:c.jsx(C_,{})}));
|