From df0594852a7422991472a6375ad5edc4c0fa05f8 Mon Sep 17 00:00:00 2001 From: yangdx Date: Sun, 6 Apr 2025 14:56:55 +0800 Subject: [PATCH 1/9] Set queryLabel after query on page first load --- .../src/components/graph/GraphLabels.tsx | 34 +++++++++++-------- lightrag_webui/src/hooks/useLightragGraph.tsx | 12 +++++++ 2 files changed, 31 insertions(+), 15 deletions(-) diff --git a/lightrag_webui/src/components/graph/GraphLabels.tsx b/lightrag_webui/src/components/graph/GraphLabels.tsx index f43bd955..3bfe0024 100644 --- a/lightrag_webui/src/components/graph/GraphLabels.tsx +++ b/lightrag_webui/src/components/graph/GraphLabels.tsx @@ -12,7 +12,8 @@ const GraphLabels = () => { const { t } = useTranslation() const label = useSettingsStore.use.queryLabel() const allDatabaseLabels = useGraphStore.use.allDatabaseLabels() - + const labelsFetchAttempted = useGraphStore.use.labelsFetchAttempted() + // Remove initial label fetch effect as it's now handled by fetchGraph based on lastSuccessfulQueryLabel const getSearchEngine = useCallback(() => { @@ -56,22 +57,25 @@ const GraphLabels = () => { [getSearchEngine] ) - // Validate if current queryLabel exists in allDatabaseLabels + // Show queryLabel validation status useEffect(() => { - // Only update label when all conditions are met: - // 1. allDatabaseLabels is loaded (length > 1, as it has at least '*' by default) - // 2. Current label is not the default '*' - // 3. Current label doesn't exist in allDatabaseLabels - if ( - allDatabaseLabels.length > 1 && - label && - label !== '*' && - !allDatabaseLabels.includes(label) - ) { - console.log(`Label "${label}" not found in available labels, resetting to default`); - useSettingsStore.getState().setQueryLabel('*'); + + if (labelsFetchAttempted) { + if (allDatabaseLabels.length > 1) { + if (label && label !== '*' && !allDatabaseLabels.includes(label)) { + console.log(`Label "${label}" not in available labels`); + // useSettingsStore.getState().setQueryLabel('*'); + } else { + console.log(`Label "${label}" is valid`); + } + } else if (allDatabaseLabels.length <= 1 && label && label !== '*') { + console.log('Available labels list is empty'); + // useSettingsStore.getState().setQueryLabel(''); + } + useGraphStore.getState().setLabelsFetchAttempted(false) } - }, [allDatabaseLabels, label]); + + }, [allDatabaseLabels, label, labelsFetchAttempted]); const handleRefresh = useCallback(() => { // Reset fetch status flags diff --git a/lightrag_webui/src/hooks/useLightragGraph.tsx b/lightrag_webui/src/hooks/useLightragGraph.tsx index 39521fff..af6810e7 100644 --- a/lightrag_webui/src/hooks/useLightragGraph.tsx +++ b/lightrag_webui/src/hooks/useLightragGraph.tsx @@ -119,6 +119,10 @@ const fetchGraph = async (label: string, maxDepth: number, maxNodes: number) => // Continue with graph fetch even if labels fetch fails } } + + // Trigger GraphLabels component to check if the label is valid + // console.log('Setting labelsFetchAttempted to true'); + useGraphStore.getState().setLabelsFetchAttempted(true) // If label is empty, use default label '*' const queryLabel = label || '*'; @@ -339,6 +343,7 @@ const useLightrangeGraph = () => { } // Only fetch data when graphDataFetchAttempted is false (avoids re-fetching on vite dev mode) + // GraphDataFetchAttempted must set to false when queryLabel is changed if (!isFetching && !useGraphStore.getState().graphDataFetchAttempted) { // Set flags fetchInProgressRef.current = true @@ -445,6 +450,13 @@ const useLightrangeGraph = () => { state.setRawGraph(data); state.setGraphIsEmpty(false); + // ensusre GraphLabels show the current label on first load + const lastSuccessfulQueryLabel = useGraphStore.getState().lastSuccessfulQueryLabel; + if (!lastSuccessfulQueryLabel){ + useSettingsStore.getState().setQueryLabel(''); + useSettingsStore.getState().setQueryLabel(queryLabel); + console.log('Set queryLabel after query on page first load'); + } // Update last successful query label state.setLastSuccessfulQueryLabel(currentQueryLabel); From 11b93f1a25c722acdc924996fe83413cf6b7702c Mon Sep 17 00:00:00 2001 From: yangdx Date: Sun, 6 Apr 2025 14:57:21 +0800 Subject: [PATCH 2/9] Fix linting --- lightrag_webui/src/components/graph/GraphLabels.tsx | 6 +++--- lightrag_webui/src/hooks/useLightragGraph.tsx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lightrag_webui/src/components/graph/GraphLabels.tsx b/lightrag_webui/src/components/graph/GraphLabels.tsx index 3bfe0024..29ff798e 100644 --- a/lightrag_webui/src/components/graph/GraphLabels.tsx +++ b/lightrag_webui/src/components/graph/GraphLabels.tsx @@ -13,7 +13,7 @@ const GraphLabels = () => { const label = useSettingsStore.use.queryLabel() const allDatabaseLabels = useGraphStore.use.allDatabaseLabels() const labelsFetchAttempted = useGraphStore.use.labelsFetchAttempted() - + // Remove initial label fetch effect as it's now handled by fetchGraph based on lastSuccessfulQueryLabel const getSearchEngine = useCallback(() => { @@ -59,8 +59,8 @@ const GraphLabels = () => { // Show queryLabel validation status useEffect(() => { - - if (labelsFetchAttempted) { + + if (labelsFetchAttempted) { if (allDatabaseLabels.length > 1) { if (label && label !== '*' && !allDatabaseLabels.includes(label)) { console.log(`Label "${label}" not in available labels`); diff --git a/lightrag_webui/src/hooks/useLightragGraph.tsx b/lightrag_webui/src/hooks/useLightragGraph.tsx index af6810e7..12bbea8f 100644 --- a/lightrag_webui/src/hooks/useLightragGraph.tsx +++ b/lightrag_webui/src/hooks/useLightragGraph.tsx @@ -119,7 +119,7 @@ const fetchGraph = async (label: string, maxDepth: number, maxNodes: number) => // Continue with graph fetch even if labels fetch fails } } - + // Trigger GraphLabels component to check if the label is valid // console.log('Setting labelsFetchAttempted to true'); useGraphStore.getState().setLabelsFetchAttempted(true) From 0942bf102cceaf7289aae2d50b81586a04ea6595 Mon Sep 17 00:00:00 2001 From: yangdx Date: Sun, 6 Apr 2025 14:57:52 +0800 Subject: [PATCH 3/9] Update webui assets --- .../{index-Cma7xY0-.js => index-BhF9Nj8k.js} | 154 +++++++++--------- lightrag/api/webui/index.html | 2 +- 2 files changed, 78 insertions(+), 78 deletions(-) rename lightrag/api/webui/assets/{index-Cma7xY0-.js => index-BhF9Nj8k.js} (85%) diff --git a/lightrag/api/webui/assets/index-Cma7xY0-.js b/lightrag/api/webui/assets/index-BhF9Nj8k.js similarity index 85% rename from lightrag/api/webui/assets/index-Cma7xY0-.js rename to lightrag/api/webui/assets/index-BhF9Nj8k.js index df32e654..281b228f 100644 --- a/lightrag/api/webui/assets/index-Cma7xY0-.js +++ b/lightrag/api/webui/assets/index-BhF9Nj8k.js @@ -6,7 +6,7 @@ var aq=Object.defineProperty;var oq=(e,t,n)=>t in e?aq(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var JC;function lq(){if(JC)return Zl;JC=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,a,o){var s=null;if(o!==void 0&&(s=""+o),a.key!==void 0&&(s=""+a.key),"key"in a){o={};for(var u in a)u!=="key"&&(o[u]=a[u])}else o=a;return a=o.ref,{$$typeof:e,type:r,key:s,ref:a!==void 0?a:null,props:o}}return Zl.Fragment=t,Zl.jsx=n,Zl.jsxs=n,Zl}var e_;function uq(){return e_||(e_=1,Wh.exports=lq()),Wh.exports}var E=uq(),Yh={exports:{}},lt={};/** + */var JC;function lq(){if(JC)return Zl;JC=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,a,o){var s=null;if(o!==void 0&&(s=""+o),a.key!==void 0&&(s=""+a.key),"key"in a){o={};for(var l in a)l!=="key"&&(o[l]=a[l])}else o=a;return a=o.ref,{$$typeof:e,type:r,key:s,ref:a!==void 0?a:null,props:o}}return Zl.Fragment=t,Zl.jsx=n,Zl.jsxs=n,Zl}var e_;function uq(){return e_||(e_=1,Wh.exports=lq()),Wh.exports}var E=uq(),Yh={exports:{}},lt={};/** * @license React * react.production.js * @@ -14,7 +14,7 @@ var aq=Object.defineProperty;var oq=(e,t,n)=>t in e?aq(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var t_;function cq(){if(t_)return lt;t_=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.iterator;function m(M){return M===null||typeof M!="object"?null:(M=g&&M[g]||M["@@iterator"],typeof M=="function"?M:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y=Object.assign,v={};function k(M,V,j){this.props=M,this.context=V,this.refs=v,this.updater=j||b}k.prototype.isReactComponent={},k.prototype.setState=function(M,V){if(typeof M!="object"&&typeof M!="function"&&M!=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,M,V,"setState")},k.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function A(){}A.prototype=k.prototype;function x(M,V,j){this.props=M,this.context=V,this.refs=v,this.updater=j||b}var R=x.prototype=new A;R.constructor=x,y(R,k.prototype),R.isPureReactComponent=!0;var O=Array.isArray,N={H:null,A:null,T:null,S:null},C=Object.prototype.hasOwnProperty;function _(M,V,j,P,K,ee){return j=ee.ref,{$$typeof:e,type:M,key:V,ref:j!==void 0?j:null,props:ee}}function L(M,V){return _(M.type,V,void 0,void 0,void 0,M.props)}function I(M){return typeof M=="object"&&M!==null&&M.$$typeof===e}function D(M){var V={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(j){return V[j]})}var G=/\/+/g;function $(M,V){return typeof M=="object"&&M!==null&&M.key!=null?D(""+M.key):V.toString(36)}function B(){}function W(M){switch(M.status){case"fulfilled":return M.value;case"rejected":throw M.reason;default:switch(typeof M.status=="string"?M.then(B,B):(M.status="pending",M.then(function(V){M.status==="pending"&&(M.status="fulfilled",M.value=V)},function(V){M.status==="pending"&&(M.status="rejected",M.reason=V)})),M.status){case"fulfilled":return M.value;case"rejected":throw M.reason}}throw M}function Q(M,V,j,P,K){var ee=typeof M;(ee==="undefined"||ee==="boolean")&&(M=null);var le=!1;if(M===null)le=!0;else switch(ee){case"bigint":case"string":case"number":le=!0;break;case"object":switch(M.$$typeof){case e:case t:le=!0;break;case p:return le=M._init,Q(le(M._payload),V,j,P,K)}}if(le)return K=K(M),le=P===""?"."+$(M,0):P,O(K)?(j="",le!=null&&(j=le.replace(G,"$&/")+"/"),Q(K,V,j,"",function(he){return he})):K!=null&&(I(K)&&(K=L(K,j+(K.key==null||M&&M.key===K.key?"":(""+K.key).replace(G,"$&/")+"/")+le)),V.push(K)),1;le=0;var X=P===""?".":P+":";if(O(M))for(var J=0;Jt in e?aq(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var r_;function fq(){return r_||(r_=1,function(e){function t(H,U){var F=H.length;H.push(U);e:for(;0>>1,M=H[Y];if(0>>1;Ya(P,F))Ka(ee,P)?(H[Y]=ee,H[K]=F,Y=K):(H[Y]=P,H[j]=F,Y=j);else if(Ka(ee,F))H[Y]=ee,H[K]=F,Y=K;else break e}}return U}function a(H,U){var F=H.sortIndex-U.sortIndex;return F!==0?F:H.id-U.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,u=s.now();e.unstable_now=function(){return s.now()-u}}var c=[],d=[],p=1,g=null,m=3,b=!1,y=!1,v=!1,k=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;function R(H){for(var U=n(d);U!==null;){if(U.callback===null)r(d);else if(U.startTime<=H)r(d),U.sortIndex=U.expirationTime,t(c,U);else break;U=n(d)}}function O(H){if(v=!1,R(H),!y)if(n(c)!==null)y=!0,W();else{var U=n(d);U!==null&&Q(O,U.startTime-H)}}var N=!1,C=-1,_=5,L=-1;function I(){return!(e.unstable_now()-L<_)}function D(){if(N){var H=e.unstable_now();L=H;var U=!0;try{e:{y=!1,v&&(v=!1,A(C),C=-1),b=!0;var F=m;try{t:{for(R(H),g=n(c);g!==null&&!(g.expirationTime>H&&I());){var Y=g.callback;if(typeof Y=="function"){g.callback=null,m=g.priorityLevel;var M=Y(g.expirationTime<=H);if(H=e.unstable_now(),typeof M=="function"){g.callback=M,R(H),U=!0;break t}g===n(c)&&r(c),R(H)}else r(c);g=n(c)}if(g!==null)U=!0;else{var V=n(d);V!==null&&Q(O,V.startTime-H),U=!1}}break e}finally{g=null,m=F,b=!1}U=void 0}}finally{U?G():N=!1}}}var G;if(typeof x=="function")G=function(){x(D)};else if(typeof MessageChannel<"u"){var $=new MessageChannel,B=$.port2;$.port1.onmessage=D,G=function(){B.postMessage(null)}}else G=function(){k(D,0)};function W(){N||(N=!0,G())}function Q(H,U){C=k(function(){H(e.unstable_now())},U)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(H){H.callback=null},e.unstable_continueExecution=function(){y||b||(y=!0,W())},e.unstable_forceFrameRate=function(H){0>H||125Y?(H.sortIndex=F,t(d,H),n(c)===null&&H===n(d)&&(v?(A(C),C=-1):v=!0,Q(O,F-Y))):(H.sortIndex=M,t(c,H),y||b||(y=!0,W())),H},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(H){var U=m;return function(){var F=m;m=U;try{return H.apply(this,arguments)}finally{m=F}}}}(Zh)),Zh}var a_;function pq(){return a_||(a_=1,Xh.exports=fq()),Xh.exports}var Qh={exports:{}},wn={};/** + */var r_;function fq(){return r_||(r_=1,function(e){function t(H,U){var F=H.length;H.push(U);e:for(;0>>1,M=H[Y];if(0>>1;Ya(P,F))Ka(ee,P)?(H[Y]=ee,H[K]=F,Y=K):(H[Y]=P,H[j]=F,Y=j);else if(Ka(ee,F))H[Y]=ee,H[K]=F,Y=K;else break e}}return U}function a(H,U){var F=H.sortIndex-U.sortIndex;return F!==0?F:H.id-U.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var c=[],d=[],p=1,g=null,m=3,b=!1,y=!1,v=!1,k=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;function R(H){for(var U=n(d);U!==null;){if(U.callback===null)r(d);else if(U.startTime<=H)r(d),U.sortIndex=U.expirationTime,t(c,U);else break;U=n(d)}}function O(H){if(v=!1,R(H),!y)if(n(c)!==null)y=!0,W();else{var U=n(d);U!==null&&Q(O,U.startTime-H)}}var N=!1,C=-1,_=5,L=-1;function I(){return!(e.unstable_now()-L<_)}function D(){if(N){var H=e.unstable_now();L=H;var U=!0;try{e:{y=!1,v&&(v=!1,A(C),C=-1),b=!0;var F=m;try{t:{for(R(H),g=n(c);g!==null&&!(g.expirationTime>H&&I());){var Y=g.callback;if(typeof Y=="function"){g.callback=null,m=g.priorityLevel;var M=Y(g.expirationTime<=H);if(H=e.unstable_now(),typeof M=="function"){g.callback=M,R(H),U=!0;break t}g===n(c)&&r(c),R(H)}else r(c);g=n(c)}if(g!==null)U=!0;else{var V=n(d);V!==null&&Q(O,V.startTime-H),U=!1}}break e}finally{g=null,m=F,b=!1}U=void 0}}finally{U?G():N=!1}}}var G;if(typeof x=="function")G=function(){x(D)};else if(typeof MessageChannel<"u"){var $=new MessageChannel,B=$.port2;$.port1.onmessage=D,G=function(){B.postMessage(null)}}else G=function(){k(D,0)};function W(){N||(N=!0,G())}function Q(H,U){C=k(function(){H(e.unstable_now())},U)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(H){H.callback=null},e.unstable_continueExecution=function(){y||b||(y=!0,W())},e.unstable_forceFrameRate=function(H){0>H||125Y?(H.sortIndex=F,t(d,H),n(c)===null&&H===n(d)&&(v?(A(C),C=-1):v=!0,Q(O,F-Y))):(H.sortIndex=M,t(c,H),y||b||(y=!0,W())),H},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(H){var U=m;return function(){var F=m;m=U;try{return H.apply(this,arguments)}finally{m=F}}}}(Zh)),Zh}var a_;function pq(){return a_||(a_=1,Xh.exports=fq()),Xh.exports}var Qh={exports:{}},wn={};/** * @license React * react-dom.production.js * @@ -30,7 +30,7 @@ var aq=Object.defineProperty;var oq=(e,t,n)=>t in e?aq(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var o_;function gq(){if(o_)return wn;o_=1;var e=$f();function t(c){var d="https://react.dev/errors/"+c;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Qh.exports=gq(),Qh.exports}/** + */var o_;function gq(){if(o_)return wn;o_=1;var e=$f();function t(c){var d="https://react.dev/errors/"+c;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Qh.exports=gq(),Qh.exports}/** * @license React * react-dom-client.production.js * @@ -38,15 +38,15 @@ var aq=Object.defineProperty;var oq=(e,t,n)=>t in e?aq(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var s_;function hq(){if(s_)return Ql;s_=1;var e=pq(),t=$f(),n=$z();function r(i){var l="https://react.dev/errors/"+i;if(1)":-1S||Z[h]!==ae[S]){var ye=` -`+Z[h].replace(" at new "," at ");return i.displayName&&ye.includes("")&&(ye=ye.replace("",i.displayName)),ye}while(1<=h&&0<=S);break}}}finally{W=!1,Error.prepareStackTrace=f}return(f=i?i.displayName||i.name:"")?B(f):""}function H(i){switch(i.tag){case 26:case 27:case 5:return B(i.type);case 16:return B("Lazy");case 13:return B("Suspense");case 19:return B("SuspenseList");case 0:case 15:return i=Q(i.type,!1),i;case 11:return i=Q(i.type.render,!1),i;case 1:return i=Q(i.type,!0),i;default:return""}}function U(i){try{var l="";do l+=H(i),i=i.return;while(i);return l}catch(f){return` +`+Z[h].replace(" at new "," at ");return i.displayName&&ye.includes("")&&(ye=ye.replace("",i.displayName)),ye}while(1<=h&&0<=S);break}}}finally{W=!1,Error.prepareStackTrace=f}return(f=i?i.displayName||i.name:"")?B(f):""}function H(i){switch(i.tag){case 26:case 27:case 5:return B(i.type);case 16:return B("Lazy");case 13:return B("Suspense");case 19:return B("SuspenseList");case 0:case 15:return i=Q(i.type,!1),i;case 11:return i=Q(i.type.render,!1),i;case 1:return i=Q(i.type,!0),i;default:return""}}function U(i){try{var u="";do u+=H(i),i=i.return;while(i);return u}catch(f){return` Error generating stack: `+f.message+` -`+f.stack}}function F(i){var l=i,f=i;if(i.alternate)for(;l.return;)l=l.return;else{i=l;do l=i,l.flags&4098&&(f=l.return),i=l.return;while(i)}return l.tag===3?f:null}function Y(i){if(i.tag===13){var l=i.memoizedState;if(l===null&&(i=i.alternate,i!==null&&(l=i.memoizedState)),l!==null)return l.dehydrated}return null}function M(i){if(F(i)!==i)throw Error(r(188))}function V(i){var l=i.alternate;if(!l){if(l=F(i),l===null)throw Error(r(188));return l!==i?null:i}for(var f=i,h=l;;){var S=f.return;if(S===null)break;var T=S.alternate;if(T===null){if(h=S.return,h!==null){f=h;continue}break}if(S.child===T.child){for(T=S.child;T;){if(T===f)return M(S),i;if(T===h)return M(S),l;T=T.sibling}throw Error(r(188))}if(f.return!==h.return)f=S,h=T;else{for(var z=!1,q=S.child;q;){if(q===f){z=!0,f=S,h=T;break}if(q===h){z=!0,h=S,f=T;break}q=q.sibling}if(!z){for(q=T.child;q;){if(q===f){z=!0,f=T,h=S;break}if(q===h){z=!0,h=T,f=S;break}q=q.sibling}if(!z)throw Error(r(189))}}if(f.alternate!==h)throw Error(r(190))}if(f.tag!==3)throw Error(r(188));return f.stateNode.current===f?i:l}function j(i){var l=i.tag;if(l===5||l===26||l===27||l===6)return i;for(i=i.child;i!==null;){if(l=j(i),l!==null)return l;i=i.sibling}return null}var P=Array.isArray,K=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},le=[],X=-1;function J(i){return{current:i}}function he(i){0>X||(i.current=le[X],le[X]=null,X--)}function oe(i,l){X++,le[X]=i.current,i.current=l}var Se=J(null),we=J(null),De=J(null),Ce=J(null);function Ee(i,l){switch(oe(De,l),oe(we,i),oe(Se,null),i=l.nodeType,i){case 9:case 11:l=(l=l.documentElement)&&(l=l.namespaceURI)?CC(l):0;break;default:if(i=i===8?l.parentNode:l,l=i.tagName,i=i.namespaceURI)i=CC(i),l=_C(i,l);else switch(l){case"svg":l=1;break;case"math":l=2;break;default:l=0}}he(Se),oe(Se,l)}function te(){he(Se),he(we),he(De)}function fe(i){i.memoizedState!==null&&oe(Ce,i);var l=Se.current,f=_C(l,i.type);l!==f&&(oe(we,i),oe(Se,f))}function Te(i){we.current===i&&(he(Se),he(we)),Ce.current===i&&(he(Ce),Vl._currentValue=ee)}var be=Object.prototype.hasOwnProperty,xe=e.unstable_scheduleCallback,se=e.unstable_cancelCallback,Be=e.unstable_shouldYield,je=e.unstable_requestPaint,me=e.unstable_now,Ne=e.unstable_getCurrentPriorityLevel,ne=e.unstable_ImmediatePriority,ce=e.unstable_UserBlockingPriority,_e=e.unstable_NormalPriority,Fe=e.unstable_LowPriority,We=e.unstable_IdlePriority,St=e.log,Tt=e.unstable_setDisableYieldValue,bt=null,et=null;function At(i){if(et&&typeof et.onCommitFiberRoot=="function")try{et.onCommitFiberRoot(bt,i,void 0,(i.current.flags&128)===128)}catch{}}function st(i){if(typeof St=="function"&&Tt(i),et&&typeof et.setStrictMode=="function")try{et.setStrictMode(bt,i)}catch{}}var wt=Math.clz32?Math.clz32:zt,Ht=Math.log,pn=Math.LN2;function zt(i){return i>>>=0,i===0?32:31-(Ht(i)/pn|0)|0}var ir=128,Vr=4194304;function Jt(i){var l=i&42;if(l!==0)return l;switch(i&-i){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: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 i&4194176;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function pa(i,l){var f=i.pendingLanes;if(f===0)return 0;var h=0,S=i.suspendedLanes,T=i.pingedLanes,z=i.warmLanes;i=i.finishedLanes!==0;var q=f&134217727;return q!==0?(f=q&~S,f!==0?h=Jt(f):(T&=q,T!==0?h=Jt(T):i||(z=q&~z,z!==0&&(h=Jt(z))))):(q=f&~S,q!==0?h=Jt(q):T!==0?h=Jt(T):i||(z=f&~z,z!==0&&(h=Jt(z)))),h===0?0:l!==0&&l!==h&&!(l&S)&&(S=h&-h,z=l&-l,S>=z||S===32&&(z&4194176)!==0)?l:h}function Xe(i,l){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&l)===0}function yt(i,l){switch(i){case 1:case 2:case 4:case 8:return l+250;case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l+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 Nt(){var i=ir;return ir<<=1,!(ir&4194176)&&(ir=128),i}function Ln(){var i=Vr;return Vr<<=1,!(Vr&62914560)&&(Vr=4194304),i}function _n(i){for(var l=[],f=0;31>f;f++)l.push(i);return l}function Mn(i,l){i.pendingLanes|=l,l!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function ga(i,l,f,h,S,T){var z=i.pendingLanes;i.pendingLanes=f,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=f,i.entangledLanes&=f,i.errorRecoveryDisabledLanes&=f,i.shellSuspendCounter=0;var q=i.entanglements,Z=i.expirationTimes,ae=i.hiddenUpdates;for(f=z&~f;0"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ZH=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]*$"),_A={},NA={};function QH(i){return be.call(NA,i)?!0:be.call(_A,i)?!1:ZH.test(i)?NA[i]=!0:(_A[i]=!0,!1)}function lc(i,l,f){if(QH(l))if(f===null)i.removeAttribute(l);else{switch(typeof f){case"undefined":case"function":case"symbol":i.removeAttribute(l);return;case"boolean":var h=l.toLowerCase().slice(0,5);if(h!=="data-"&&h!=="aria-"){i.removeAttribute(l);return}}i.setAttribute(l,""+f)}}function uc(i,l,f){if(f===null)i.removeAttribute(l);else{switch(typeof f){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(l);return}i.setAttribute(l,""+f)}}function ma(i,l,f,h){if(h===null)i.removeAttribute(f);else{switch(typeof h){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(f);return}i.setAttributeNS(l,f,""+h)}}function sr(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function OA(i){var l=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function JH(i){var l=OA(i)?"checked":"value",f=Object.getOwnPropertyDescriptor(i.constructor.prototype,l),h=""+i[l];if(!i.hasOwnProperty(l)&&typeof f<"u"&&typeof f.get=="function"&&typeof f.set=="function"){var S=f.get,T=f.set;return Object.defineProperty(i,l,{configurable:!0,get:function(){return S.call(this)},set:function(z){h=""+z,T.call(this,z)}}),Object.defineProperty(i,l,{enumerable:f.enumerable}),{getValue:function(){return h},setValue:function(z){h=""+z},stopTracking:function(){i._valueTracker=null,delete i[l]}}}}function cc(i){i._valueTracker||(i._valueTracker=JH(i))}function IA(i){if(!i)return!1;var l=i._valueTracker;if(!l)return!0;var f=l.getValue(),h="";return i&&(h=OA(i)?i.checked?"true":"false":i.value),i=h,i!==f?(l.setValue(i),!0):!1}function dc(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var e$=/[\n"\\]/g;function lr(i){return i.replace(e$,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function qp(i,l,f,h,S,T,z,q){i.name="",z!=null&&typeof z!="function"&&typeof z!="symbol"&&typeof z!="boolean"?i.type=z:i.removeAttribute("type"),l!=null?z==="number"?(l===0&&i.value===""||i.value!=l)&&(i.value=""+sr(l)):i.value!==""+sr(l)&&(i.value=""+sr(l)):z!=="submit"&&z!=="reset"||i.removeAttribute("value"),l!=null?Vp(i,z,sr(l)):f!=null?Vp(i,z,sr(f)):h!=null&&i.removeAttribute("value"),S==null&&T!=null&&(i.defaultChecked=!!T),S!=null&&(i.checked=S&&typeof S!="function"&&typeof S!="symbol"),q!=null&&typeof q!="function"&&typeof q!="symbol"&&typeof q!="boolean"?i.name=""+sr(q):i.removeAttribute("name")}function DA(i,l,f,h,S,T,z,q){if(T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"&&(i.type=T),l!=null||f!=null){if(!(T!=="submit"&&T!=="reset"||l!=null))return;f=f!=null?""+sr(f):"",l=l!=null?""+sr(l):f,q||l===i.value||(i.value=l),i.defaultValue=l}h=h??S,h=typeof h!="function"&&typeof h!="symbol"&&!!h,i.checked=q?i.checked:!!h,i.defaultChecked=!!h,z!=null&&typeof z!="function"&&typeof z!="symbol"&&typeof z!="boolean"&&(i.name=z)}function Vp(i,l,f){l==="number"&&dc(i.ownerDocument)===i||i.defaultValue===""+f||(i.defaultValue=""+f)}function Di(i,l,f,h){if(i=i.options,l){l={};for(var S=0;S=cl),VA=" ",WA=!1;function YA(i,l){switch(i){case"keyup":return C$.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function KA(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Fi=!1;function N$(i,l){switch(i){case"compositionend":return KA(l);case"keypress":return l.which!==32?null:(WA=!0,VA);case"textInput":return i=l.data,i===VA&&WA?null:i;default:return null}}function O$(i,l){if(Fi)return i==="compositionend"||!rg&&YA(i,l)?(i=jA(),pc=Qp=Ya=null,Fi=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1=l)return{node:f,offset:l-i};i=h}e:{for(;f;){if(f.nextSibling){f=f.nextSibling;break e}f=f.parentNode}f=void 0}f=r1(f)}}function o1(i,l){return i&&l?i===l?!0:i&&i.nodeType===3?!1:l&&l.nodeType===3?o1(i,l.parentNode):"contains"in i?i.contains(l):i.compareDocumentPosition?!!(i.compareDocumentPosition(l)&16):!1:!1}function i1(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var l=dc(i.document);l instanceof i.HTMLIFrameElement;){try{var f=typeof l.contentWindow.location.href=="string"}catch{f=!1}if(f)i=l.contentWindow;else break;l=dc(i.document)}return l}function ig(i){var l=i&&i.nodeName&&i.nodeName.toLowerCase();return l&&(l==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||l==="textarea"||i.contentEditable==="true")}function B$(i,l){var f=i1(l);l=i.focusedElem;var h=i.selectionRange;if(f!==l&&l&&l.ownerDocument&&o1(l.ownerDocument.documentElement,l)){if(h!==null&&ig(l)){if(i=h.start,f=h.end,f===void 0&&(f=i),"selectionStart"in l)l.selectionStart=i,l.selectionEnd=Math.min(f,l.value.length);else if(f=(i=l.ownerDocument||document)&&i.defaultView||window,f.getSelection){f=f.getSelection();var S=l.textContent.length,T=Math.min(h.start,S);h=h.end===void 0?T:Math.min(h.end,S),!f.extend&&T>h&&(S=h,h=T,T=S),S=a1(l,T);var z=a1(l,h);S&&z&&(f.rangeCount!==1||f.anchorNode!==S.node||f.anchorOffset!==S.offset||f.focusNode!==z.node||f.focusOffset!==z.offset)&&(i=i.createRange(),i.setStart(S.node,S.offset),f.removeAllRanges(),T>h?(f.addRange(i),f.extend(z.node,z.offset)):(i.setEnd(z.node,z.offset),f.addRange(i)))}}for(i=[],f=l;f=f.parentNode;)f.nodeType===1&&i.push({element:f,left:f.scrollLeft,top:f.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l=document.documentMode,zi=null,sg=null,gl=null,lg=!1;function s1(i,l,f){var h=f.window===f?f.document:f.nodeType===9?f:f.ownerDocument;lg||zi==null||zi!==dc(h)||(h=zi,"selectionStart"in h&&ig(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),gl&&pl(gl,h)||(gl=h,h=ed(sg,"onSelect"),0>=z,S-=z,ba=1<<32-wt(l)+S|f<Qe?(ln=Ye,Ye=null):ln=Ye.sibling;var kt=de(ie,Ye,ue[Qe],ke);if(kt===null){Ye===null&&(Ye=ln);break}i&&Ye&&kt.alternate===null&&l(ie,Ye),re=T(kt,re,Qe),ct===null?Ge=kt:ct.sibling=kt,ct=kt,Ye=ln}if(Qe===ue.length)return f(ie,Ye),xt&&Go(ie,Qe),Ge;if(Ye===null){for(;QeQe?(ln=Ye,Ye=null):ln=Ye.sibling;var ho=de(ie,Ye,kt.value,ke);if(ho===null){Ye===null&&(Ye=ln);break}i&&Ye&&ho.alternate===null&&l(ie,Ye),re=T(ho,re,Qe),ct===null?Ge=ho:ct.sibling=ho,ct=ho,Ye=ln}if(kt.done)return f(ie,Ye),xt&&Go(ie,Qe),Ge;if(Ye===null){for(;!kt.done;Qe++,kt=ue.next())kt=Ae(ie,kt.value,ke),kt!==null&&(re=T(kt,re,Qe),ct===null?Ge=kt:ct.sibling=kt,ct=kt);return xt&&Go(ie,Qe),Ge}for(Ye=h(Ye);!kt.done;Qe++,kt=ue.next())kt=ge(Ye,ie,Qe,kt.value,ke),kt!==null&&(i&&kt.alternate!==null&&Ye.delete(kt.key===null?Qe:kt.key),re=T(kt,re,Qe),ct===null?Ge=kt:ct.sibling=kt,ct=kt);return i&&Ye.forEach(function(rq){return l(ie,rq)}),xt&&Go(ie,Qe),Ge}function Vt(ie,re,ue,ke){if(typeof ue=="object"&&ue!==null&&ue.type===c&&ue.key===null&&(ue=ue.props.children),typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case s:e:{for(var Ge=ue.key;re!==null;){if(re.key===Ge){if(Ge=ue.type,Ge===c){if(re.tag===7){f(ie,re.sibling),ke=S(re,ue.props.children),ke.return=ie,ie=ke;break e}}else if(re.elementType===Ge||typeof Ge=="object"&&Ge!==null&&Ge.$$typeof===x&&k1(Ge)===re.type){f(ie,re.sibling),ke=S(re,ue.props),El(ke,ue),ke.return=ie,ie=ke;break e}f(ie,re);break}else l(ie,re);re=re.sibling}ue.type===c?(ke=Jo(ue.props.children,ie.mode,ke,ue.key),ke.return=ie,ie=ke):(ke=$c(ue.type,ue.key,ue.props,null,ie.mode,ke),El(ke,ue),ke.return=ie,ie=ke)}return z(ie);case u:e:{for(Ge=ue.key;re!==null;){if(re.key===Ge)if(re.tag===4&&re.stateNode.containerInfo===ue.containerInfo&&re.stateNode.implementation===ue.implementation){f(ie,re.sibling),ke=S(re,ue.children||[]),ke.return=ie,ie=ke;break e}else{f(ie,re);break}else l(ie,re);re=re.sibling}ke=ch(ue,ie.mode,ke),ke.return=ie,ie=ke}return z(ie);case x:return Ge=ue._init,ue=Ge(ue._payload),Vt(ie,re,ue,ke)}if(P(ue))return qe(ie,re,ue,ke);if(C(ue)){if(Ge=C(ue),typeof Ge!="function")throw Error(r(150));return ue=Ge.call(ue),rt(ie,re,ue,ke)}if(typeof ue.then=="function")return Vt(ie,re,Tc(ue),ke);if(ue.$$typeof===b)return Vt(ie,re,Uc(ie,ue),ke);Ac(ie,ue)}return typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint"?(ue=""+ue,re!==null&&re.tag===6?(f(ie,re.sibling),ke=S(re,ue),ke.return=ie,ie=ke):(f(ie,re),ke=uh(ue,ie.mode,ke),ke.return=ie,ie=ke),z(ie)):f(ie,re)}return function(ie,re,ue,ke){try{Sl=0;var Ge=Vt(ie,re,ue,ke);return $i=null,Ge}catch(Ye){if(Ye===yl)throw Ye;var ct=mr(29,Ye,null,ie.mode);return ct.lanes=ke,ct.return=ie,ct}finally{}}}var $o=T1(!0),A1=T1(!1),qi=J(null),Rc=J(0);function R1(i,l){i=_a,oe(Rc,i),oe(qi,l),_a=i|l.baseLanes}function mg(){oe(Rc,_a),oe(qi,qi.current)}function bg(){_a=Rc.current,he(qi),he(Rc)}var pr=J(null),Yr=null;function Xa(i){var l=i.alternate;oe(en,en.current&1),oe(pr,i),Yr===null&&(l===null||qi.current!==null||l.memoizedState!==null)&&(Yr=i)}function C1(i){if(i.tag===22){if(oe(en,en.current),oe(pr,i),Yr===null){var l=i.alternate;l!==null&&l.memoizedState!==null&&(Yr=i)}}else Za()}function Za(){oe(en,en.current),oe(pr,pr.current)}function va(i){he(pr),Yr===i&&(Yr=null),he(en)}var en=J(0);function Cc(i){for(var l=i;l!==null;){if(l.tag===13){var f=l.memoizedState;if(f!==null&&(f=f.dehydrated,f===null||f.data==="$?"||f.data==="$!"))return l}else if(l.tag===19&&l.memoizedProps.revealOrder!==void 0){if(l.flags&128)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===i)break;for(;l.sibling===null;){if(l.return===null||l.return===i)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var $$=typeof AbortController<"u"?AbortController:function(){var i=[],l=this.signal={aborted:!1,addEventListener:function(f,h){i.push(h)}};this.abort=function(){l.aborted=!0,i.forEach(function(f){return f()})}},q$=e.unstable_scheduleCallback,V$=e.unstable_NormalPriority,tn={$$typeof:b,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function yg(){return{controller:new $$,data:new Map,refCount:0}}function wl(i){i.refCount--,i.refCount===0&&q$(V$,function(){i.controller.abort()})}var xl=null,vg=0,Vi=0,Wi=null;function W$(i,l){if(xl===null){var f=xl=[];vg=0,Vi=Th(),Wi={status:"pending",value:void 0,then:function(h){f.push(h)}}}return vg++,l.then(_1,_1),l}function _1(){if(--vg===0&&xl!==null){Wi!==null&&(Wi.status="fulfilled");var i=xl;xl=null,Vi=0,Wi=null;for(var l=0;lT?T:8;var z=I.T,q={};I.T=q,Pg(i,!1,l,f);try{var Z=S(),ae=I.S;if(ae!==null&&ae(q,Z),Z!==null&&typeof Z=="object"&&typeof Z.then=="function"){var ye=Y$(Z,h);Al(i,l,ye,Qn(i))}else Al(i,l,h,Qn(i))}catch(Ae){Al(i,l,{then:function(){},status:"rejected",reason:Ae},Qn())}finally{K.p=T,I.T=z}}function J$(){}function Lg(i,l,f,h){if(i.tag!==5)throw Error(r(476));var S=iR(i).queue;oR(i,S,l,ee,f===null?J$:function(){return sR(i),f(h)})}function iR(i){var l=i.memoizedState;if(l!==null)return l;l={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sa,lastRenderedState:ee},next:null};var f={};return l.next={memoizedState:f,baseState:f,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sa,lastRenderedState:f},next:null},i.memoizedState=l,i=i.alternate,i!==null&&(i.memoizedState=l),l}function sR(i){var l=iR(i).next.queue;Al(i,l,{},Qn())}function Mg(){return En(Vl)}function lR(){return Xt().memoizedState}function uR(){return Xt().memoizedState}function e6(i){for(var l=i.return;l!==null;){switch(l.tag){case 24:case 3:var f=Qn();i=no(f);var h=ro(l,i,f);h!==null&&(On(h,l,f),_l(h,l,f)),l={cache:yg()},i.payload=l;return}l=l.return}}function t6(i,l,f){var h=Qn();f={lane:h,revertLane:0,action:f,hasEagerState:!1,eagerState:null,next:null},Fc(i)?dR(l,f):(f=dg(i,l,f,h),f!==null&&(On(f,i,h),fR(f,l,h)))}function cR(i,l,f){var h=Qn();Al(i,l,f,h)}function Al(i,l,f,h){var S={lane:h,revertLane:0,action:f,hasEagerState:!1,eagerState:null,next:null};if(Fc(i))dR(l,S);else{var T=i.alternate;if(i.lanes===0&&(T===null||T.lanes===0)&&(T=l.lastRenderedReducer,T!==null))try{var z=l.lastRenderedState,q=T(z,f);if(S.hasEagerState=!0,S.eagerState=q,Yn(q,z))return Sc(i,l,S,0),Lt===null&&vc(),!1}catch{}finally{}if(f=dg(i,l,S,h),f!==null)return On(f,i,h),fR(f,l,h),!0}return!1}function Pg(i,l,f,h){if(h={lane:2,revertLane:Th(),action:h,hasEagerState:!1,eagerState:null,next:null},Fc(i)){if(l)throw Error(r(479))}else l=dg(i,f,h,2),l!==null&&On(l,i,2)}function Fc(i){var l=i.alternate;return i===ut||l!==null&&l===ut}function dR(i,l){Yi=Nc=!0;var f=i.pending;f===null?l.next=l:(l.next=f.next,f.next=l),i.pending=l}function fR(i,l,f){if(f&4194176){var h=l.lanes;h&=i.pendingLanes,f|=h,l.lanes=f,_r(i,f)}}var Kr={readContext:En,use:Dc,useCallback:Wt,useContext:Wt,useEffect:Wt,useImperativeHandle:Wt,useLayoutEffect:Wt,useInsertionEffect:Wt,useMemo:Wt,useReducer:Wt,useRef:Wt,useState:Wt,useDebugValue:Wt,useDeferredValue:Wt,useTransition:Wt,useSyncExternalStore:Wt,useId:Wt};Kr.useCacheRefresh=Wt,Kr.useMemoCache=Wt,Kr.useHostTransitionStatus=Wt,Kr.useFormState=Wt,Kr.useActionState=Wt,Kr.useOptimistic=Wt;var Wo={readContext:En,use:Dc,useCallback:function(i,l){return Bn().memoizedState=[i,l===void 0?null:l],i},useContext:En,useEffect:Z1,useImperativeHandle:function(i,l,f){f=f!=null?f.concat([i]):null,Mc(4194308,4,eR.bind(null,l,i),f)},useLayoutEffect:function(i,l){return Mc(4194308,4,i,l)},useInsertionEffect:function(i,l){Mc(4,2,i,l)},useMemo:function(i,l){var f=Bn();l=l===void 0?null:l;var h=i();if(Vo){st(!0);try{i()}finally{st(!1)}}return f.memoizedState=[h,l],h},useReducer:function(i,l,f){var h=Bn();if(f!==void 0){var S=f(l);if(Vo){st(!0);try{f(l)}finally{st(!1)}}}else S=l;return h.memoizedState=h.baseState=S,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:S},h.queue=i,i=i.dispatch=t6.bind(null,ut,i),[h.memoizedState,i]},useRef:function(i){var l=Bn();return i={current:i},l.memoizedState=i},useState:function(i){i=_g(i);var l=i.queue,f=cR.bind(null,ut,l);return l.dispatch=f,[i.memoizedState,f]},useDebugValue:Ig,useDeferredValue:function(i,l){var f=Bn();return Dg(f,i,l)},useTransition:function(){var i=_g(!1);return i=oR.bind(null,ut,i.queue,!0,!1),Bn().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,l,f){var h=ut,S=Bn();if(xt){if(f===void 0)throw Error(r(407));f=f()}else{if(f=l(),Lt===null)throw Error(r(349));vt&60||M1(h,l,f)}S.memoizedState=f;var T={value:f,getSnapshot:l};return S.queue=T,Z1(F1.bind(null,h,T,i),[i]),h.flags|=2048,Xi(9,P1.bind(null,h,T,f,l),{destroy:void 0},null),f},useId:function(){var i=Bn(),l=Lt.identifierPrefix;if(xt){var f=ya,h=ba;f=(h&~(1<<32-wt(h)-1)).toString(32)+f,l=":"+l+"R"+f,f=Oc++,0 title"))),mn(T,h,f),T[Sn]=i,an(T),h=T;break e;case"link":var z=BC("link","href",S).get(h+(f.href||""));if(z){for(var q=0;q<\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof h.is=="string"?S.createElement("select",{is:h.is}):S.createElement("select"),h.multiple?i.multiple=!0:h.size&&(i.size=h.size);break;default:i=typeof h.is=="string"?S.createElement(f,{is:h.is}):S.createElement(f)}}i[Sn]=l,i[Fn]=h;e:for(S=l.child;S!==null;){if(S.tag===5||S.tag===6)i.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===l)break e;for(;S.sibling===null;){if(S.return===null||S.return===l)break e;S=S.return}S.sibling.return=S.return,S=S.sibling}l.stateNode=i;e:switch(mn(i,f,h),f){case"button":case"input":case"select":case"textarea":i=!!h.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&Ra(l)}}return Bt(l),l.flags&=-16777217,null;case 6:if(i&&l.stateNode!=null)i.memoizedProps!==h&&Ra(l);else{if(typeof h!="string"&&l.stateNode===null)throw Error(r(166));if(i=De.current,hl(l)){if(i=l.stateNode,f=l.memoizedProps,h=null,S=Nn,S!==null)switch(S.tag){case 27:case 5:h=S.memoizedProps}i[Sn]=l,i=!!(i.nodeValue===f||h!==null&&h.suppressHydrationWarning===!0||RC(i.nodeValue,f)),i||Ho(l)}else i=nd(i).createTextNode(h),i[Sn]=l,l.stateNode=i}return Bt(l),null;case 13:if(h=l.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(S=hl(l),h!==null&&h.dehydrated!==null){if(i===null){if(!S)throw Error(r(318));if(S=l.memoizedState,S=S!==null?S.dehydrated:null,!S)throw Error(r(317));S[Sn]=l}else ml(),!(l.flags&128)&&(l.memoizedState=null),l.flags|=4;Bt(l),S=!1}else Or!==null&&(yh(Or),Or=null),S=!0;if(!S)return l.flags&256?(va(l),l):(va(l),null)}if(va(l),l.flags&128)return l.lanes=f,l;if(f=h!==null,i=i!==null&&i.memoizedState!==null,f){h=l.child,S=null,h.alternate!==null&&h.alternate.memoizedState!==null&&h.alternate.memoizedState.cachePool!==null&&(S=h.alternate.memoizedState.cachePool.pool);var T=null;h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(T=h.memoizedState.cachePool.pool),T!==S&&(h.flags|=2048)}return f!==i&&f&&(l.child.flags|=8192),qc(l,l.updateQueue),Bt(l),null;case 4:return te(),i===null&&_h(l.stateNode.containerInfo),Bt(l),null;case 10:return xa(l.type),Bt(l),null;case 19:if(he(en),S=l.memoizedState,S===null)return Bt(l),null;if(h=(l.flags&128)!==0,T=S.rendering,T===null)if(h)Pl(S,!1);else{if(qt!==0||i!==null&&i.flags&128)for(i=l.child;i!==null;){if(T=Cc(i),T!==null){for(l.flags|=128,Pl(S,!1),i=T.updateQueue,l.updateQueue=i,qc(l,i),l.subtreeFlags=0,i=f,f=l.child;f!==null;)tC(f,i),f=f.sibling;return oe(en,en.current&1|2),l.child}i=i.sibling}S.tail!==null&&me()>Vc&&(l.flags|=128,h=!0,Pl(S,!1),l.lanes=4194304)}else{if(!h)if(i=Cc(T),i!==null){if(l.flags|=128,h=!0,i=i.updateQueue,l.updateQueue=i,qc(l,i),Pl(S,!0),S.tail===null&&S.tailMode==="hidden"&&!T.alternate&&!xt)return Bt(l),null}else 2*me()-S.renderingStartTime>Vc&&f!==536870912&&(l.flags|=128,h=!0,Pl(S,!1),l.lanes=4194304);S.isBackwards?(T.sibling=l.child,l.child=T):(i=S.last,i!==null?i.sibling=T:l.child=T,S.last=T)}return S.tail!==null?(l=S.tail,S.rendering=l,S.tail=l.sibling,S.renderingStartTime=me(),l.sibling=null,i=en.current,oe(en,h?i&1|2:i&1),l):(Bt(l),null);case 22:case 23:return va(l),bg(),h=l.memoizedState!==null,i!==null?i.memoizedState!==null!==h&&(l.flags|=8192):h&&(l.flags|=8192),h?f&536870912&&!(l.flags&128)&&(Bt(l),l.subtreeFlags&6&&(l.flags|=8192)):Bt(l),f=l.updateQueue,f!==null&&qc(l,f.retryQueue),f=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(f=i.memoizedState.cachePool.pool),h=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(h=l.memoizedState.cachePool.pool),h!==f&&(l.flags|=2048),i!==null&&he(qo),null;case 24:return f=null,i!==null&&(f=i.memoizedState.cache),l.memoizedState.cache!==f&&(l.flags|=2048),xa(tn),Bt(l),null;case 25:return null}throw Error(r(156,l.tag))}function l6(i,l){switch(pg(l),l.tag){case 1:return i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 3:return xa(tn),te(),i=l.flags,i&65536&&!(i&128)?(l.flags=i&-65537|128,l):null;case 26:case 27:case 5:return Te(l),null;case 13:if(va(l),i=l.memoizedState,i!==null&&i.dehydrated!==null){if(l.alternate===null)throw Error(r(340));ml()}return i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 19:return he(en),null;case 4:return te(),null;case 10:return xa(l.type),null;case 22:case 23:return va(l),bg(),i!==null&&he(qo),i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 24:return xa(tn),null;case 25:return null;default:return null}}function aC(i,l){switch(pg(l),l.tag){case 3:xa(tn),te();break;case 26:case 27:case 5:Te(l);break;case 4:te();break;case 13:va(l);break;case 19:he(en);break;case 10:xa(l.type);break;case 22:case 23:va(l),bg(),i!==null&&he(qo);break;case 24:xa(tn)}}var u6={getCacheForType:function(i){var l=En(tn),f=l.data.get(i);return f===void 0&&(f=i(),l.data.set(i,f)),f}},c6=typeof WeakMap=="function"?WeakMap:Map,jt=0,Lt=null,ft=null,vt=0,Mt=0,Zn=null,Ca=!1,es=!1,dh=!1,_a=0,qt=0,lo=0,ei=0,fh=0,br=0,ts=0,Fl=null,Xr=null,ph=!1,gh=0,Vc=1/0,Wc=null,uo=null,Yc=!1,ti=null,zl=0,hh=0,mh=null,Bl=0,bh=null;function Qn(){if(jt&2&&vt!==0)return vt&-vt;if(I.T!==null){var i=Vi;return i!==0?i:Th()}return TA()}function oC(){br===0&&(br=!(vt&536870912)||xt?Nt():536870912);var i=pr.current;return i!==null&&(i.flags|=32),br}function On(i,l,f){(i===Lt&&Mt===2||i.cancelPendingCommit!==null)&&(ns(i,0),Na(i,vt,br,!1)),Mn(i,f),(!(jt&2)||i!==Lt)&&(i===Lt&&(!(jt&2)&&(ei|=f),qt===4&&Na(i,vt,br,!1)),Zr(i))}function iC(i,l,f){if(jt&6)throw Error(r(327));var h=!f&&(l&60)===0&&(l&i.expiredLanes)===0||Xe(i,l),S=h?p6(i,l):Eh(i,l,!0),T=h;do{if(S===0){es&&!h&&Na(i,l,0,!1);break}else if(S===6)Na(i,l,0,!Ca);else{if(f=i.current.alternate,T&&!d6(f)){S=Eh(i,l,!1),T=!1;continue}if(S===2){if(T=l,i.errorRecoveryDisabledLanes&T)var z=0;else z=i.pendingLanes&-536870913,z=z!==0?z:z&536870912?536870912:0;if(z!==0){l=z;e:{var q=i;S=Fl;var Z=q.current.memoizedState.isDehydrated;if(Z&&(ns(q,z).flags|=256),z=Eh(q,z,!1),z!==2){if(dh&&!Z){q.errorRecoveryDisabledLanes|=T,ei|=T,S=4;break e}T=Xr,Xr=S,T!==null&&yh(T)}S=z}if(T=!1,S!==2)continue}}if(S===1){ns(i,0),Na(i,l,0,!0);break}e:{switch(h=i,S){case 0:case 1:throw Error(r(345));case 4:if((l&4194176)===l){Na(h,l,br,!Ca);break e}break;case 2:Xr=null;break;case 3:case 5:break;default:throw Error(r(329))}if(h.finishedWork=f,h.finishedLanes=l,(l&62914560)===l&&(T=gh+300-me(),10f?32:f,I.T=null,ti===null)var T=!1;else{f=mh,mh=null;var z=ti,q=zl;if(ti=null,zl=0,jt&6)throw Error(r(331));var Z=jt;if(jt|=4,JR(z.current),XR(z,z.current,q,f),jt=Z,jl(0,!1),et&&typeof et.onPostCommitFiberRoot=="function")try{et.onPostCommitFiberRoot(bt,z)}catch{}T=!0}return T}finally{K.p=S,I.T=h,hC(i,l)}}return!1}function mC(i,l,f){l=cr(f,l),l=Bg(i.stateNode,l,2),i=ro(i,l,2),i!==null&&(Mn(i,2),Zr(i))}function Ot(i,l,f){if(i.tag===3)mC(i,i,f);else for(;l!==null;){if(l.tag===3){mC(l,i,f);break}else if(l.tag===1){var h=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(uo===null||!uo.has(h))){i=cr(f,i),f=vR(2),h=ro(l,f,2),h!==null&&(SR(f,h,l,i),Mn(h,2),Zr(h));break}}l=l.return}}function wh(i,l,f){var h=i.pingCache;if(h===null){h=i.pingCache=new c6;var S=new Set;h.set(l,S)}else S=h.get(l),S===void 0&&(S=new Set,h.set(l,S));S.has(f)||(dh=!0,S.add(f),i=m6.bind(null,i,l,f),l.then(i,i))}function m6(i,l,f){var h=i.pingCache;h!==null&&h.delete(l),i.pingedLanes|=i.suspendedLanes&f,i.warmLanes&=~f,Lt===i&&(vt&f)===f&&(qt===4||qt===3&&(vt&62914560)===vt&&300>me()-gh?!(jt&2)&&ns(i,0):fh|=f,ts===vt&&(ts=0)),Zr(i)}function bC(i,l){l===0&&(l=Ln()),i=Ka(i,l),i!==null&&(Mn(i,l),Zr(i))}function b6(i){var l=i.memoizedState,f=0;l!==null&&(f=l.retryLane),bC(i,f)}function y6(i,l){var f=0;switch(i.tag){case 13:var h=i.stateNode,S=i.memoizedState;S!==null&&(f=S.retryLane);break;case 19:h=i.stateNode;break;case 22:h=i.stateNode._retryCache;break;default:throw Error(r(314))}h!==null&&h.delete(l),bC(i,f)}function v6(i,l){return xe(i,l)}var Zc=null,os=null,xh=!1,Qc=!1,kh=!1,ni=0;function Zr(i){i!==os&&i.next===null&&(os===null?Zc=os=i:os=os.next=i),Qc=!0,xh||(xh=!0,E6(S6))}function jl(i,l){if(!kh&&Qc){kh=!0;do for(var f=!1,h=Zc;h!==null;){if(i!==0){var S=h.pendingLanes;if(S===0)var T=0;else{var z=h.suspendedLanes,q=h.pingedLanes;T=(1<<31-wt(42|i)+1)-1,T&=S&~(z&~q),T=T&201326677?T&201326677|1:T?T|2:0}T!==0&&(f=!0,SC(h,T))}else T=vt,T=pa(h,h===Lt?T:0),!(T&3)||Xe(h,T)||(f=!0,SC(h,T));h=h.next}while(f);kh=!1}}function S6(){Qc=xh=!1;var i=0;ni!==0&&(_6()&&(i=ni),ni=0);for(var l=me(),f=null,h=Zc;h!==null;){var S=h.next,T=yC(h,l);T===0?(h.next=null,f===null?Zc=S:f.next=S,S===null&&(os=f)):(f=h,(i!==0||T&3)&&(Qc=!0)),h=S}jl(i)}function yC(i,l){for(var f=i.suspendedLanes,h=i.pingedLanes,S=i.expirationTimes,T=i.pendingLanes&-62914561;0"u"?null:document;function MC(i,l,f){var h=ss;if(h&&typeof l=="string"&&l){var S=lr(l);S='link[rel="'+i+'"][href="'+S+'"]',typeof f=="string"&&(S+='[crossorigin="'+f+'"]'),LC.has(S)||(LC.add(S),i={rel:i,crossOrigin:f,href:l},h.querySelector(S)===null&&(l=h.createElement("link"),mn(l,"link",i),an(l),h.head.appendChild(l)))}}function F6(i){Oa.D(i),MC("dns-prefetch",i,null)}function z6(i,l){Oa.C(i,l),MC("preconnect",i,l)}function B6(i,l,f){Oa.L(i,l,f);var h=ss;if(h&&i&&l){var S='link[rel="preload"][as="'+lr(l)+'"]';l==="image"&&f&&f.imageSrcSet?(S+='[imagesrcset="'+lr(f.imageSrcSet)+'"]',typeof f.imageSizes=="string"&&(S+='[imagesizes="'+lr(f.imageSizes)+'"]')):S+='[href="'+lr(i)+'"]';var T=S;switch(l){case"style":T=ls(i);break;case"script":T=us(i)}yr.has(T)||(i=D({rel:"preload",href:l==="image"&&f&&f.imageSrcSet?void 0:i,as:l},f),yr.set(T,i),h.querySelector(S)!==null||l==="style"&&h.querySelector(Hl(T))||l==="script"&&h.querySelector($l(T))||(l=h.createElement("link"),mn(l,"link",i),an(l),h.head.appendChild(l)))}}function j6(i,l){Oa.m(i,l);var f=ss;if(f&&i){var h=l&&typeof l.as=="string"?l.as:"script",S='link[rel="modulepreload"][as="'+lr(h)+'"][href="'+lr(i)+'"]',T=S;switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":T=us(i)}if(!yr.has(T)&&(i=D({rel:"modulepreload",href:i},l),yr.set(T,i),f.querySelector(S)===null)){switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(f.querySelector($l(T)))return}h=f.createElement("link"),mn(h,"link",i),an(h),f.head.appendChild(h)}}}function U6(i,l,f){Oa.S(i,l,f);var h=ss;if(h&&i){var S=Oi(h).hoistableStyles,T=ls(i);l=l||"default";var z=S.get(T);if(!z){var q={loading:0,preload:null};if(z=h.querySelector(Hl(T)))q.loading=5;else{i=D({rel:"stylesheet",href:i,"data-precedence":l},f),(f=yr.get(T))&&zh(i,f);var Z=z=h.createElement("link");an(Z),mn(Z,"link",i),Z._p=new Promise(function(ae,ye){Z.onload=ae,Z.onerror=ye}),Z.addEventListener("load",function(){q.loading|=1}),Z.addEventListener("error",function(){q.loading|=2}),q.loading|=4,ad(z,l,h)}z={type:"stylesheet",instance:z,count:1,state:q},S.set(T,z)}}}function G6(i,l){Oa.X(i,l);var f=ss;if(f&&i){var h=Oi(f).hoistableScripts,S=us(i),T=h.get(S);T||(T=f.querySelector($l(S)),T||(i=D({src:i,async:!0},l),(l=yr.get(S))&&Bh(i,l),T=f.createElement("script"),an(T),mn(T,"link",i),f.head.appendChild(T)),T={type:"script",instance:T,count:1,state:null},h.set(S,T))}}function H6(i,l){Oa.M(i,l);var f=ss;if(f&&i){var h=Oi(f).hoistableScripts,S=us(i),T=h.get(S);T||(T=f.querySelector($l(S)),T||(i=D({src:i,async:!0,type:"module"},l),(l=yr.get(S))&&Bh(i,l),T=f.createElement("script"),an(T),mn(T,"link",i),f.head.appendChild(T)),T={type:"script",instance:T,count:1,state:null},h.set(S,T))}}function PC(i,l,f,h){var S=(S=De.current)?rd(S):null;if(!S)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof f.precedence=="string"&&typeof f.href=="string"?(l=ls(f.href),f=Oi(S).hoistableStyles,h=f.get(l),h||(h={type:"style",instance:null,count:0,state:null},f.set(l,h)),h):{type:"void",instance:null,count:0,state:null};case"link":if(f.rel==="stylesheet"&&typeof f.href=="string"&&typeof f.precedence=="string"){i=ls(f.href);var T=Oi(S).hoistableStyles,z=T.get(i);if(z||(S=S.ownerDocument||S,z={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},T.set(i,z),(T=S.querySelector(Hl(i)))&&!T._p&&(z.instance=T,z.state.loading=5),yr.has(i)||(f={rel:"preload",as:"style",href:f.href,crossOrigin:f.crossOrigin,integrity:f.integrity,media:f.media,hrefLang:f.hrefLang,referrerPolicy:f.referrerPolicy},yr.set(i,f),T||$6(S,i,f,z.state))),l&&h===null)throw Error(r(528,""));return z}if(l&&h!==null)throw Error(r(529,""));return null;case"script":return l=f.async,f=f.src,typeof f=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=us(f),f=Oi(S).hoistableScripts,h=f.get(l),h||(h={type:"script",instance:null,count:0,state:null},f.set(l,h)),h):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function ls(i){return'href="'+lr(i)+'"'}function Hl(i){return'link[rel="stylesheet"]['+i+"]"}function FC(i){return D({},i,{"data-precedence":i.precedence,precedence:null})}function $6(i,l,f,h){i.querySelector('link[rel="preload"][as="style"]['+l+"]")?h.loading=1:(l=i.createElement("link"),h.preload=l,l.addEventListener("load",function(){return h.loading|=1}),l.addEventListener("error",function(){return h.loading|=2}),mn(l,"link",f),an(l),i.head.appendChild(l))}function us(i){return'[src="'+lr(i)+'"]'}function $l(i){return"script[async]"+i}function zC(i,l,f){if(l.count++,l.instance===null)switch(l.type){case"style":var h=i.querySelector('style[data-href~="'+lr(f.href)+'"]');if(h)return l.instance=h,an(h),h;var S=D({},f,{"data-href":f.href,"data-precedence":f.precedence,href:null,precedence:null});return h=(i.ownerDocument||i).createElement("style"),an(h),mn(h,"style",S),ad(h,f.precedence,i),l.instance=h;case"stylesheet":S=ls(f.href);var T=i.querySelector(Hl(S));if(T)return l.state.loading|=4,l.instance=T,an(T),T;h=FC(f),(S=yr.get(S))&&zh(h,S),T=(i.ownerDocument||i).createElement("link"),an(T);var z=T;return z._p=new Promise(function(q,Z){z.onload=q,z.onerror=Z}),mn(T,"link",h),l.state.loading|=4,ad(T,f.precedence,i),l.instance=T;case"script":return T=us(f.src),(S=i.querySelector($l(T)))?(l.instance=S,an(S),S):(h=f,(S=yr.get(T))&&(h=D({},f),Bh(h,S)),i=i.ownerDocument||i,S=i.createElement("script"),an(S),mn(S,"link",h),i.head.appendChild(S),l.instance=S);case"void":return null;default:throw Error(r(443,l.type))}else l.type==="stylesheet"&&!(l.state.loading&4)&&(h=l.instance,l.state.loading|=4,ad(h,f.precedence,i));return l.instance}function ad(i,l,f){for(var h=f.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),S=h.length?h[h.length-1]:null,T=S,z=0;z title"):null)}function q6(i,l,f){if(f===1||l.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;switch(l.rel){case"stylesheet":return i=l.disabled,typeof l.precedence=="string"&&i==null;default:return!0}case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function UC(i){return!(i.type==="stylesheet"&&!(i.state.loading&3))}var ql=null;function V6(){}function W6(i,l,f){if(ql===null)throw Error(r(475));var h=ql;if(l.type==="stylesheet"&&(typeof f.media!="string"||matchMedia(f.media).matches!==!1)&&!(l.state.loading&4)){if(l.instance===null){var S=ls(f.href),T=i.querySelector(Hl(S));if(T){i=T._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(h.count++,h=id.bind(h),i.then(h,h)),l.state.loading|=4,l.instance=T,an(T);return}T=i.ownerDocument||i,f=FC(f),(S=yr.get(S))&&zh(f,S),T=T.createElement("link"),an(T);var z=T;z._p=new Promise(function(q,Z){z.onload=q,z.onerror=Z}),mn(T,"link",f),l.instance=T}h.stylesheets===null&&(h.stylesheets=new Map),h.stylesheets.set(l,i),(i=l.state.preload)&&!(l.state.loading&3)&&(h.count++,l=id.bind(h),i.addEventListener("load",l),i.addEventListener("error",l))}}function Y6(){if(ql===null)throw Error(r(475));var i=ql;return i.stylesheets&&i.count===0&&jh(i,i.stylesheets),0"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Kh.exports=hq(),Kh.exports}var bq=mq(),Jl={},u_;function yq(){if(u_)return Jl;u_=1,Object.defineProperty(Jl,"__esModule",{value:!0}),Jl.parse=s,Jl.serialize=d;const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,n=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,r=/^[\u0020-\u003A\u003D-\u007E]*$/,a=Object.prototype.toString,o=(()=>{const m=function(){};return m.prototype=Object.create(null),m})();function s(m,b){const y=new o,v=m.length;if(v<2)return y;const k=(b==null?void 0:b.decode)||p;let A=0;do{const x=m.indexOf("=",A);if(x===-1)break;const R=m.indexOf(";",A),O=R===-1?v:R;if(x>O){A=m.lastIndexOf(";",x-1)+1;continue}const N=u(m,A,x),C=c(m,x,N),_=m.slice(N,C);if(y[_]===void 0){let L=u(m,x+1,O),I=c(m,O,L);const D=k(m.slice(L,I));y[_]=D}A=O+1}while(Ay;){const v=m.charCodeAt(--b);if(v!==32&&v!==9)return b+1}return y}function d(m,b,y){const v=(y==null?void 0:y.encode)||encodeURIComponent;if(!e.test(m))throw new TypeError(`argument name is invalid: ${m}`);const k=v(b);if(!t.test(k))throw new TypeError(`argument val is invalid: ${b}`);let A=m+"="+k;if(!y)return A;if(y.maxAge!==void 0){if(!Number.isInteger(y.maxAge))throw new TypeError(`option maxAge is invalid: ${y.maxAge}`);A+="; Max-Age="+y.maxAge}if(y.domain){if(!n.test(y.domain))throw new TypeError(`option domain is invalid: ${y.domain}`);A+="; Domain="+y.domain}if(y.path){if(!r.test(y.path))throw new TypeError(`option path is invalid: ${y.path}`);A+="; Path="+y.path}if(y.expires){if(!g(y.expires)||!Number.isFinite(y.expires.valueOf()))throw new TypeError(`option expires is invalid: ${y.expires}`);A+="; Expires="+y.expires.toUTCString()}if(y.httpOnly&&(A+="; HttpOnly"),y.secure&&(A+="; Secure"),y.partitioned&&(A+="; Partitioned"),y.priority)switch(typeof y.priority=="string"?y.priority.toLowerCase():void 0){case"low":A+="; Priority=Low";break;case"medium":A+="; Priority=Medium";break;case"high":A+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${y.priority}`)}if(y.sameSite)switch(typeof y.sameSite=="string"?y.sameSite.toLowerCase():y.sameSite){case!0:case"strict":A+="; SameSite=Strict";break;case"lax":A+="; SameSite=Lax";break;case"none":A+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${y.sameSite}`)}return A}function p(m){if(m.indexOf("%")===-1)return m;try{return decodeURIComponent(m)}catch{return m}}function g(m){return a.call(m)==="[object Date]"}return Jl}yq();/** +`+f.stack}}function F(i){var u=i,f=i;if(i.alternate)for(;u.return;)u=u.return;else{i=u;do u=i,u.flags&4098&&(f=u.return),i=u.return;while(i)}return u.tag===3?f:null}function Y(i){if(i.tag===13){var u=i.memoizedState;if(u===null&&(i=i.alternate,i!==null&&(u=i.memoizedState)),u!==null)return u.dehydrated}return null}function M(i){if(F(i)!==i)throw Error(r(188))}function V(i){var u=i.alternate;if(!u){if(u=F(i),u===null)throw Error(r(188));return u!==i?null:i}for(var f=i,h=u;;){var S=f.return;if(S===null)break;var T=S.alternate;if(T===null){if(h=S.return,h!==null){f=h;continue}break}if(S.child===T.child){for(T=S.child;T;){if(T===f)return M(S),i;if(T===h)return M(S),u;T=T.sibling}throw Error(r(188))}if(f.return!==h.return)f=S,h=T;else{for(var z=!1,q=S.child;q;){if(q===f){z=!0,f=S,h=T;break}if(q===h){z=!0,h=S,f=T;break}q=q.sibling}if(!z){for(q=T.child;q;){if(q===f){z=!0,f=T,h=S;break}if(q===h){z=!0,h=T,f=S;break}q=q.sibling}if(!z)throw Error(r(189))}}if(f.alternate!==h)throw Error(r(190))}if(f.tag!==3)throw Error(r(188));return f.stateNode.current===f?i:u}function j(i){var u=i.tag;if(u===5||u===26||u===27||u===6)return i;for(i=i.child;i!==null;){if(u=j(i),u!==null)return u;i=i.sibling}return null}var P=Array.isArray,K=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},le=[],X=-1;function J(i){return{current:i}}function he(i){0>X||(i.current=le[X],le[X]=null,X--)}function oe(i,u){X++,le[X]=i.current,i.current=u}var Se=J(null),we=J(null),De=J(null),Ce=J(null);function Ee(i,u){switch(oe(De,u),oe(we,i),oe(Se,null),i=u.nodeType,i){case 9:case 11:u=(u=u.documentElement)&&(u=u.namespaceURI)?CC(u):0;break;default:if(i=i===8?u.parentNode:u,u=i.tagName,i=i.namespaceURI)i=CC(i),u=_C(i,u);else switch(u){case"svg":u=1;break;case"math":u=2;break;default:u=0}}he(Se),oe(Se,u)}function te(){he(Se),he(we),he(De)}function fe(i){i.memoizedState!==null&&oe(Ce,i);var u=Se.current,f=_C(u,i.type);u!==f&&(oe(we,i),oe(Se,f))}function Te(i){we.current===i&&(he(Se),he(we)),Ce.current===i&&(he(Ce),Vl._currentValue=ee)}var be=Object.prototype.hasOwnProperty,xe=e.unstable_scheduleCallback,se=e.unstable_cancelCallback,Be=e.unstable_shouldYield,je=e.unstable_requestPaint,me=e.unstable_now,Ne=e.unstable_getCurrentPriorityLevel,ne=e.unstable_ImmediatePriority,ce=e.unstable_UserBlockingPriority,_e=e.unstable_NormalPriority,ze=e.unstable_LowPriority,We=e.unstable_IdlePriority,St=e.log,Tt=e.unstable_setDisableYieldValue,bt=null,et=null;function At(i){if(et&&typeof et.onCommitFiberRoot=="function")try{et.onCommitFiberRoot(bt,i,void 0,(i.current.flags&128)===128)}catch{}}function st(i){if(typeof St=="function"&&Tt(i),et&&typeof et.setStrictMode=="function")try{et.setStrictMode(bt,i)}catch{}}var wt=Math.clz32?Math.clz32:zt,Ht=Math.log,pn=Math.LN2;function zt(i){return i>>>=0,i===0?32:31-(Ht(i)/pn|0)|0}var ir=128,Vr=4194304;function Jt(i){var u=i&42;if(u!==0)return u;switch(i&-i){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: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 i&4194176;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function pa(i,u){var f=i.pendingLanes;if(f===0)return 0;var h=0,S=i.suspendedLanes,T=i.pingedLanes,z=i.warmLanes;i=i.finishedLanes!==0;var q=f&134217727;return q!==0?(f=q&~S,f!==0?h=Jt(f):(T&=q,T!==0?h=Jt(T):i||(z=q&~z,z!==0&&(h=Jt(z))))):(q=f&~S,q!==0?h=Jt(q):T!==0?h=Jt(T):i||(z=f&~z,z!==0&&(h=Jt(z)))),h===0?0:u!==0&&u!==h&&!(u&S)&&(S=h&-h,z=u&-u,S>=z||S===32&&(z&4194176)!==0)?u:h}function Xe(i,u){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&u)===0}function yt(i,u){switch(i){case 1:case 2:case 4:case 8:return u+250;case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return u+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 Nt(){var i=ir;return ir<<=1,!(ir&4194176)&&(ir=128),i}function Ln(){var i=Vr;return Vr<<=1,!(Vr&62914560)&&(Vr=4194304),i}function _n(i){for(var u=[],f=0;31>f;f++)u.push(i);return u}function Mn(i,u){i.pendingLanes|=u,u!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function ga(i,u,f,h,S,T){var z=i.pendingLanes;i.pendingLanes=f,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=f,i.entangledLanes&=f,i.errorRecoveryDisabledLanes&=f,i.shellSuspendCounter=0;var q=i.entanglements,Z=i.expirationTimes,ae=i.hiddenUpdates;for(f=z&~f;0"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ZH=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]*$"),_A={},NA={};function QH(i){return be.call(NA,i)?!0:be.call(_A,i)?!1:ZH.test(i)?NA[i]=!0:(_A[i]=!0,!1)}function lc(i,u,f){if(QH(u))if(f===null)i.removeAttribute(u);else{switch(typeof f){case"undefined":case"function":case"symbol":i.removeAttribute(u);return;case"boolean":var h=u.toLowerCase().slice(0,5);if(h!=="data-"&&h!=="aria-"){i.removeAttribute(u);return}}i.setAttribute(u,""+f)}}function uc(i,u,f){if(f===null)i.removeAttribute(u);else{switch(typeof f){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(u);return}i.setAttribute(u,""+f)}}function ma(i,u,f,h){if(h===null)i.removeAttribute(f);else{switch(typeof h){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(f);return}i.setAttributeNS(u,f,""+h)}}function sr(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function OA(i){var u=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(u==="checkbox"||u==="radio")}function JH(i){var u=OA(i)?"checked":"value",f=Object.getOwnPropertyDescriptor(i.constructor.prototype,u),h=""+i[u];if(!i.hasOwnProperty(u)&&typeof f<"u"&&typeof f.get=="function"&&typeof f.set=="function"){var S=f.get,T=f.set;return Object.defineProperty(i,u,{configurable:!0,get:function(){return S.call(this)},set:function(z){h=""+z,T.call(this,z)}}),Object.defineProperty(i,u,{enumerable:f.enumerable}),{getValue:function(){return h},setValue:function(z){h=""+z},stopTracking:function(){i._valueTracker=null,delete i[u]}}}}function cc(i){i._valueTracker||(i._valueTracker=JH(i))}function IA(i){if(!i)return!1;var u=i._valueTracker;if(!u)return!0;var f=u.getValue(),h="";return i&&(h=OA(i)?i.checked?"true":"false":i.value),i=h,i!==f?(u.setValue(i),!0):!1}function dc(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var e$=/[\n"\\]/g;function lr(i){return i.replace(e$,function(u){return"\\"+u.charCodeAt(0).toString(16)+" "})}function qp(i,u,f,h,S,T,z,q){i.name="",z!=null&&typeof z!="function"&&typeof z!="symbol"&&typeof z!="boolean"?i.type=z:i.removeAttribute("type"),u!=null?z==="number"?(u===0&&i.value===""||i.value!=u)&&(i.value=""+sr(u)):i.value!==""+sr(u)&&(i.value=""+sr(u)):z!=="submit"&&z!=="reset"||i.removeAttribute("value"),u!=null?Vp(i,z,sr(u)):f!=null?Vp(i,z,sr(f)):h!=null&&i.removeAttribute("value"),S==null&&T!=null&&(i.defaultChecked=!!T),S!=null&&(i.checked=S&&typeof S!="function"&&typeof S!="symbol"),q!=null&&typeof q!="function"&&typeof q!="symbol"&&typeof q!="boolean"?i.name=""+sr(q):i.removeAttribute("name")}function DA(i,u,f,h,S,T,z,q){if(T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"&&(i.type=T),u!=null||f!=null){if(!(T!=="submit"&&T!=="reset"||u!=null))return;f=f!=null?""+sr(f):"",u=u!=null?""+sr(u):f,q||u===i.value||(i.value=u),i.defaultValue=u}h=h??S,h=typeof h!="function"&&typeof h!="symbol"&&!!h,i.checked=q?i.checked:!!h,i.defaultChecked=!!h,z!=null&&typeof z!="function"&&typeof z!="symbol"&&typeof z!="boolean"&&(i.name=z)}function Vp(i,u,f){u==="number"&&dc(i.ownerDocument)===i||i.defaultValue===""+f||(i.defaultValue=""+f)}function Di(i,u,f,h){if(i=i.options,u){u={};for(var S=0;S=cl),VA=" ",WA=!1;function YA(i,u){switch(i){case"keyup":return C$.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function KA(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Fi=!1;function N$(i,u){switch(i){case"compositionend":return KA(u);case"keypress":return u.which!==32?null:(WA=!0,VA);case"textInput":return i=u.data,i===VA&&WA?null:i;default:return null}}function O$(i,u){if(Fi)return i==="compositionend"||!rg&&YA(i,u)?(i=jA(),pc=Qp=Ya=null,Fi=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(u.ctrlKey||u.altKey||u.metaKey)||u.ctrlKey&&u.altKey){if(u.char&&1=u)return{node:f,offset:u-i};i=h}e:{for(;f;){if(f.nextSibling){f=f.nextSibling;break e}f=f.parentNode}f=void 0}f=r1(f)}}function o1(i,u){return i&&u?i===u?!0:i&&i.nodeType===3?!1:u&&u.nodeType===3?o1(i,u.parentNode):"contains"in i?i.contains(u):i.compareDocumentPosition?!!(i.compareDocumentPosition(u)&16):!1:!1}function i1(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var u=dc(i.document);u instanceof i.HTMLIFrameElement;){try{var f=typeof u.contentWindow.location.href=="string"}catch{f=!1}if(f)i=u.contentWindow;else break;u=dc(i.document)}return u}function ig(i){var u=i&&i.nodeName&&i.nodeName.toLowerCase();return u&&(u==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||u==="textarea"||i.contentEditable==="true")}function B$(i,u){var f=i1(u);u=i.focusedElem;var h=i.selectionRange;if(f!==u&&u&&u.ownerDocument&&o1(u.ownerDocument.documentElement,u)){if(h!==null&&ig(u)){if(i=h.start,f=h.end,f===void 0&&(f=i),"selectionStart"in u)u.selectionStart=i,u.selectionEnd=Math.min(f,u.value.length);else if(f=(i=u.ownerDocument||document)&&i.defaultView||window,f.getSelection){f=f.getSelection();var S=u.textContent.length,T=Math.min(h.start,S);h=h.end===void 0?T:Math.min(h.end,S),!f.extend&&T>h&&(S=h,h=T,T=S),S=a1(u,T);var z=a1(u,h);S&&z&&(f.rangeCount!==1||f.anchorNode!==S.node||f.anchorOffset!==S.offset||f.focusNode!==z.node||f.focusOffset!==z.offset)&&(i=i.createRange(),i.setStart(S.node,S.offset),f.removeAllRanges(),T>h?(f.addRange(i),f.extend(z.node,z.offset)):(i.setEnd(z.node,z.offset),f.addRange(i)))}}for(i=[],f=u;f=f.parentNode;)f.nodeType===1&&i.push({element:f,left:f.scrollLeft,top:f.scrollTop});for(typeof u.focus=="function"&&u.focus(),u=0;u=document.documentMode,zi=null,sg=null,gl=null,lg=!1;function s1(i,u,f){var h=f.window===f?f.document:f.nodeType===9?f:f.ownerDocument;lg||zi==null||zi!==dc(h)||(h=zi,"selectionStart"in h&&ig(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),gl&&pl(gl,h)||(gl=h,h=ed(sg,"onSelect"),0>=z,S-=z,ba=1<<32-wt(u)+S|f<Qe?(ln=Ye,Ye=null):ln=Ye.sibling;var kt=de(ie,Ye,ue[Qe],ke);if(kt===null){Ye===null&&(Ye=ln);break}i&&Ye&&kt.alternate===null&&u(ie,Ye),re=T(kt,re,Qe),ct===null?Ge=kt:ct.sibling=kt,ct=kt,Ye=ln}if(Qe===ue.length)return f(ie,Ye),xt&&Go(ie,Qe),Ge;if(Ye===null){for(;QeQe?(ln=Ye,Ye=null):ln=Ye.sibling;var ho=de(ie,Ye,kt.value,ke);if(ho===null){Ye===null&&(Ye=ln);break}i&&Ye&&ho.alternate===null&&u(ie,Ye),re=T(ho,re,Qe),ct===null?Ge=ho:ct.sibling=ho,ct=ho,Ye=ln}if(kt.done)return f(ie,Ye),xt&&Go(ie,Qe),Ge;if(Ye===null){for(;!kt.done;Qe++,kt=ue.next())kt=Ae(ie,kt.value,ke),kt!==null&&(re=T(kt,re,Qe),ct===null?Ge=kt:ct.sibling=kt,ct=kt);return xt&&Go(ie,Qe),Ge}for(Ye=h(Ye);!kt.done;Qe++,kt=ue.next())kt=ge(Ye,ie,Qe,kt.value,ke),kt!==null&&(i&&kt.alternate!==null&&Ye.delete(kt.key===null?Qe:kt.key),re=T(kt,re,Qe),ct===null?Ge=kt:ct.sibling=kt,ct=kt);return i&&Ye.forEach(function(rq){return u(ie,rq)}),xt&&Go(ie,Qe),Ge}function Vt(ie,re,ue,ke){if(typeof ue=="object"&&ue!==null&&ue.type===c&&ue.key===null&&(ue=ue.props.children),typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case s:e:{for(var Ge=ue.key;re!==null;){if(re.key===Ge){if(Ge=ue.type,Ge===c){if(re.tag===7){f(ie,re.sibling),ke=S(re,ue.props.children),ke.return=ie,ie=ke;break e}}else if(re.elementType===Ge||typeof Ge=="object"&&Ge!==null&&Ge.$$typeof===x&&k1(Ge)===re.type){f(ie,re.sibling),ke=S(re,ue.props),El(ke,ue),ke.return=ie,ie=ke;break e}f(ie,re);break}else u(ie,re);re=re.sibling}ue.type===c?(ke=Jo(ue.props.children,ie.mode,ke,ue.key),ke.return=ie,ie=ke):(ke=$c(ue.type,ue.key,ue.props,null,ie.mode,ke),El(ke,ue),ke.return=ie,ie=ke)}return z(ie);case l:e:{for(Ge=ue.key;re!==null;){if(re.key===Ge)if(re.tag===4&&re.stateNode.containerInfo===ue.containerInfo&&re.stateNode.implementation===ue.implementation){f(ie,re.sibling),ke=S(re,ue.children||[]),ke.return=ie,ie=ke;break e}else{f(ie,re);break}else u(ie,re);re=re.sibling}ke=ch(ue,ie.mode,ke),ke.return=ie,ie=ke}return z(ie);case x:return Ge=ue._init,ue=Ge(ue._payload),Vt(ie,re,ue,ke)}if(P(ue))return qe(ie,re,ue,ke);if(C(ue)){if(Ge=C(ue),typeof Ge!="function")throw Error(r(150));return ue=Ge.call(ue),rt(ie,re,ue,ke)}if(typeof ue.then=="function")return Vt(ie,re,Tc(ue),ke);if(ue.$$typeof===b)return Vt(ie,re,Uc(ie,ue),ke);Ac(ie,ue)}return typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint"?(ue=""+ue,re!==null&&re.tag===6?(f(ie,re.sibling),ke=S(re,ue),ke.return=ie,ie=ke):(f(ie,re),ke=uh(ue,ie.mode,ke),ke.return=ie,ie=ke),z(ie)):f(ie,re)}return function(ie,re,ue,ke){try{Sl=0;var Ge=Vt(ie,re,ue,ke);return $i=null,Ge}catch(Ye){if(Ye===yl)throw Ye;var ct=mr(29,Ye,null,ie.mode);return ct.lanes=ke,ct.return=ie,ct}finally{}}}var $o=T1(!0),A1=T1(!1),qi=J(null),Rc=J(0);function R1(i,u){i=_a,oe(Rc,i),oe(qi,u),_a=i|u.baseLanes}function mg(){oe(Rc,_a),oe(qi,qi.current)}function bg(){_a=Rc.current,he(qi),he(Rc)}var pr=J(null),Yr=null;function Xa(i){var u=i.alternate;oe(en,en.current&1),oe(pr,i),Yr===null&&(u===null||qi.current!==null||u.memoizedState!==null)&&(Yr=i)}function C1(i){if(i.tag===22){if(oe(en,en.current),oe(pr,i),Yr===null){var u=i.alternate;u!==null&&u.memoizedState!==null&&(Yr=i)}}else Za()}function Za(){oe(en,en.current),oe(pr,pr.current)}function va(i){he(pr),Yr===i&&(Yr=null),he(en)}var en=J(0);function Cc(i){for(var u=i;u!==null;){if(u.tag===13){var f=u.memoizedState;if(f!==null&&(f=f.dehydrated,f===null||f.data==="$?"||f.data==="$!"))return u}else if(u.tag===19&&u.memoizedProps.revealOrder!==void 0){if(u.flags&128)return u}else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===i)break;for(;u.sibling===null;){if(u.return===null||u.return===i)return null;u=u.return}u.sibling.return=u.return,u=u.sibling}return null}var $$=typeof AbortController<"u"?AbortController:function(){var i=[],u=this.signal={aborted:!1,addEventListener:function(f,h){i.push(h)}};this.abort=function(){u.aborted=!0,i.forEach(function(f){return f()})}},q$=e.unstable_scheduleCallback,V$=e.unstable_NormalPriority,tn={$$typeof:b,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function yg(){return{controller:new $$,data:new Map,refCount:0}}function wl(i){i.refCount--,i.refCount===0&&q$(V$,function(){i.controller.abort()})}var xl=null,vg=0,Vi=0,Wi=null;function W$(i,u){if(xl===null){var f=xl=[];vg=0,Vi=Th(),Wi={status:"pending",value:void 0,then:function(h){f.push(h)}}}return vg++,u.then(_1,_1),u}function _1(){if(--vg===0&&xl!==null){Wi!==null&&(Wi.status="fulfilled");var i=xl;xl=null,Vi=0,Wi=null;for(var u=0;uT?T:8;var z=I.T,q={};I.T=q,Pg(i,!1,u,f);try{var Z=S(),ae=I.S;if(ae!==null&&ae(q,Z),Z!==null&&typeof Z=="object"&&typeof Z.then=="function"){var ye=Y$(Z,h);Al(i,u,ye,Qn(i))}else Al(i,u,h,Qn(i))}catch(Ae){Al(i,u,{then:function(){},status:"rejected",reason:Ae},Qn())}finally{K.p=T,I.T=z}}function J$(){}function Lg(i,u,f,h){if(i.tag!==5)throw Error(r(476));var S=iR(i).queue;oR(i,S,u,ee,f===null?J$:function(){return sR(i),f(h)})}function iR(i){var u=i.memoizedState;if(u!==null)return u;u={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sa,lastRenderedState:ee},next:null};var f={};return u.next={memoizedState:f,baseState:f,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sa,lastRenderedState:f},next:null},i.memoizedState=u,i=i.alternate,i!==null&&(i.memoizedState=u),u}function sR(i){var u=iR(i).next.queue;Al(i,u,{},Qn())}function Mg(){return En(Vl)}function lR(){return Xt().memoizedState}function uR(){return Xt().memoizedState}function e6(i){for(var u=i.return;u!==null;){switch(u.tag){case 24:case 3:var f=Qn();i=no(f);var h=ro(u,i,f);h!==null&&(On(h,u,f),_l(h,u,f)),u={cache:yg()},i.payload=u;return}u=u.return}}function t6(i,u,f){var h=Qn();f={lane:h,revertLane:0,action:f,hasEagerState:!1,eagerState:null,next:null},Fc(i)?dR(u,f):(f=dg(i,u,f,h),f!==null&&(On(f,i,h),fR(f,u,h)))}function cR(i,u,f){var h=Qn();Al(i,u,f,h)}function Al(i,u,f,h){var S={lane:h,revertLane:0,action:f,hasEagerState:!1,eagerState:null,next:null};if(Fc(i))dR(u,S);else{var T=i.alternate;if(i.lanes===0&&(T===null||T.lanes===0)&&(T=u.lastRenderedReducer,T!==null))try{var z=u.lastRenderedState,q=T(z,f);if(S.hasEagerState=!0,S.eagerState=q,Yn(q,z))return Sc(i,u,S,0),Lt===null&&vc(),!1}catch{}finally{}if(f=dg(i,u,S,h),f!==null)return On(f,i,h),fR(f,u,h),!0}return!1}function Pg(i,u,f,h){if(h={lane:2,revertLane:Th(),action:h,hasEagerState:!1,eagerState:null,next:null},Fc(i)){if(u)throw Error(r(479))}else u=dg(i,f,h,2),u!==null&&On(u,i,2)}function Fc(i){var u=i.alternate;return i===ut||u!==null&&u===ut}function dR(i,u){Yi=Nc=!0;var f=i.pending;f===null?u.next=u:(u.next=f.next,f.next=u),i.pending=u}function fR(i,u,f){if(f&4194176){var h=u.lanes;h&=i.pendingLanes,f|=h,u.lanes=f,_r(i,f)}}var Kr={readContext:En,use:Dc,useCallback:Wt,useContext:Wt,useEffect:Wt,useImperativeHandle:Wt,useLayoutEffect:Wt,useInsertionEffect:Wt,useMemo:Wt,useReducer:Wt,useRef:Wt,useState:Wt,useDebugValue:Wt,useDeferredValue:Wt,useTransition:Wt,useSyncExternalStore:Wt,useId:Wt};Kr.useCacheRefresh=Wt,Kr.useMemoCache=Wt,Kr.useHostTransitionStatus=Wt,Kr.useFormState=Wt,Kr.useActionState=Wt,Kr.useOptimistic=Wt;var Wo={readContext:En,use:Dc,useCallback:function(i,u){return Bn().memoizedState=[i,u===void 0?null:u],i},useContext:En,useEffect:Z1,useImperativeHandle:function(i,u,f){f=f!=null?f.concat([i]):null,Mc(4194308,4,eR.bind(null,u,i),f)},useLayoutEffect:function(i,u){return Mc(4194308,4,i,u)},useInsertionEffect:function(i,u){Mc(4,2,i,u)},useMemo:function(i,u){var f=Bn();u=u===void 0?null:u;var h=i();if(Vo){st(!0);try{i()}finally{st(!1)}}return f.memoizedState=[h,u],h},useReducer:function(i,u,f){var h=Bn();if(f!==void 0){var S=f(u);if(Vo){st(!0);try{f(u)}finally{st(!1)}}}else S=u;return h.memoizedState=h.baseState=S,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:S},h.queue=i,i=i.dispatch=t6.bind(null,ut,i),[h.memoizedState,i]},useRef:function(i){var u=Bn();return i={current:i},u.memoizedState=i},useState:function(i){i=_g(i);var u=i.queue,f=cR.bind(null,ut,u);return u.dispatch=f,[i.memoizedState,f]},useDebugValue:Ig,useDeferredValue:function(i,u){var f=Bn();return Dg(f,i,u)},useTransition:function(){var i=_g(!1);return i=oR.bind(null,ut,i.queue,!0,!1),Bn().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,u,f){var h=ut,S=Bn();if(xt){if(f===void 0)throw Error(r(407));f=f()}else{if(f=u(),Lt===null)throw Error(r(349));vt&60||M1(h,u,f)}S.memoizedState=f;var T={value:f,getSnapshot:u};return S.queue=T,Z1(F1.bind(null,h,T,i),[i]),h.flags|=2048,Xi(9,P1.bind(null,h,T,f,u),{destroy:void 0},null),f},useId:function(){var i=Bn(),u=Lt.identifierPrefix;if(xt){var f=ya,h=ba;f=(h&~(1<<32-wt(h)-1)).toString(32)+f,u=":"+u+"R"+f,f=Oc++,0 title"))),mn(T,h,f),T[Sn]=i,an(T),h=T;break e;case"link":var z=BC("link","href",S).get(h+(f.href||""));if(z){for(var q=0;q<\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof h.is=="string"?S.createElement("select",{is:h.is}):S.createElement("select"),h.multiple?i.multiple=!0:h.size&&(i.size=h.size);break;default:i=typeof h.is=="string"?S.createElement(f,{is:h.is}):S.createElement(f)}}i[Sn]=u,i[Fn]=h;e:for(S=u.child;S!==null;){if(S.tag===5||S.tag===6)i.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===u)break e;for(;S.sibling===null;){if(S.return===null||S.return===u)break e;S=S.return}S.sibling.return=S.return,S=S.sibling}u.stateNode=i;e:switch(mn(i,f,h),f){case"button":case"input":case"select":case"textarea":i=!!h.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&Ra(u)}}return Bt(u),u.flags&=-16777217,null;case 6:if(i&&u.stateNode!=null)i.memoizedProps!==h&&Ra(u);else{if(typeof h!="string"&&u.stateNode===null)throw Error(r(166));if(i=De.current,hl(u)){if(i=u.stateNode,f=u.memoizedProps,h=null,S=Nn,S!==null)switch(S.tag){case 27:case 5:h=S.memoizedProps}i[Sn]=u,i=!!(i.nodeValue===f||h!==null&&h.suppressHydrationWarning===!0||RC(i.nodeValue,f)),i||Ho(u)}else i=nd(i).createTextNode(h),i[Sn]=u,u.stateNode=i}return Bt(u),null;case 13:if(h=u.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(S=hl(u),h!==null&&h.dehydrated!==null){if(i===null){if(!S)throw Error(r(318));if(S=u.memoizedState,S=S!==null?S.dehydrated:null,!S)throw Error(r(317));S[Sn]=u}else ml(),!(u.flags&128)&&(u.memoizedState=null),u.flags|=4;Bt(u),S=!1}else Or!==null&&(yh(Or),Or=null),S=!0;if(!S)return u.flags&256?(va(u),u):(va(u),null)}if(va(u),u.flags&128)return u.lanes=f,u;if(f=h!==null,i=i!==null&&i.memoizedState!==null,f){h=u.child,S=null,h.alternate!==null&&h.alternate.memoizedState!==null&&h.alternate.memoizedState.cachePool!==null&&(S=h.alternate.memoizedState.cachePool.pool);var T=null;h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(T=h.memoizedState.cachePool.pool),T!==S&&(h.flags|=2048)}return f!==i&&f&&(u.child.flags|=8192),qc(u,u.updateQueue),Bt(u),null;case 4:return te(),i===null&&_h(u.stateNode.containerInfo),Bt(u),null;case 10:return xa(u.type),Bt(u),null;case 19:if(he(en),S=u.memoizedState,S===null)return Bt(u),null;if(h=(u.flags&128)!==0,T=S.rendering,T===null)if(h)Pl(S,!1);else{if(qt!==0||i!==null&&i.flags&128)for(i=u.child;i!==null;){if(T=Cc(i),T!==null){for(u.flags|=128,Pl(S,!1),i=T.updateQueue,u.updateQueue=i,qc(u,i),u.subtreeFlags=0,i=f,f=u.child;f!==null;)tC(f,i),f=f.sibling;return oe(en,en.current&1|2),u.child}i=i.sibling}S.tail!==null&&me()>Vc&&(u.flags|=128,h=!0,Pl(S,!1),u.lanes=4194304)}else{if(!h)if(i=Cc(T),i!==null){if(u.flags|=128,h=!0,i=i.updateQueue,u.updateQueue=i,qc(u,i),Pl(S,!0),S.tail===null&&S.tailMode==="hidden"&&!T.alternate&&!xt)return Bt(u),null}else 2*me()-S.renderingStartTime>Vc&&f!==536870912&&(u.flags|=128,h=!0,Pl(S,!1),u.lanes=4194304);S.isBackwards?(T.sibling=u.child,u.child=T):(i=S.last,i!==null?i.sibling=T:u.child=T,S.last=T)}return S.tail!==null?(u=S.tail,S.rendering=u,S.tail=u.sibling,S.renderingStartTime=me(),u.sibling=null,i=en.current,oe(en,h?i&1|2:i&1),u):(Bt(u),null);case 22:case 23:return va(u),bg(),h=u.memoizedState!==null,i!==null?i.memoizedState!==null!==h&&(u.flags|=8192):h&&(u.flags|=8192),h?f&536870912&&!(u.flags&128)&&(Bt(u),u.subtreeFlags&6&&(u.flags|=8192)):Bt(u),f=u.updateQueue,f!==null&&qc(u,f.retryQueue),f=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(f=i.memoizedState.cachePool.pool),h=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(h=u.memoizedState.cachePool.pool),h!==f&&(u.flags|=2048),i!==null&&he(qo),null;case 24:return f=null,i!==null&&(f=i.memoizedState.cache),u.memoizedState.cache!==f&&(u.flags|=2048),xa(tn),Bt(u),null;case 25:return null}throw Error(r(156,u.tag))}function l6(i,u){switch(pg(u),u.tag){case 1:return i=u.flags,i&65536?(u.flags=i&-65537|128,u):null;case 3:return xa(tn),te(),i=u.flags,i&65536&&!(i&128)?(u.flags=i&-65537|128,u):null;case 26:case 27:case 5:return Te(u),null;case 13:if(va(u),i=u.memoizedState,i!==null&&i.dehydrated!==null){if(u.alternate===null)throw Error(r(340));ml()}return i=u.flags,i&65536?(u.flags=i&-65537|128,u):null;case 19:return he(en),null;case 4:return te(),null;case 10:return xa(u.type),null;case 22:case 23:return va(u),bg(),i!==null&&he(qo),i=u.flags,i&65536?(u.flags=i&-65537|128,u):null;case 24:return xa(tn),null;case 25:return null;default:return null}}function aC(i,u){switch(pg(u),u.tag){case 3:xa(tn),te();break;case 26:case 27:case 5:Te(u);break;case 4:te();break;case 13:va(u);break;case 19:he(en);break;case 10:xa(u.type);break;case 22:case 23:va(u),bg(),i!==null&&he(qo);break;case 24:xa(tn)}}var u6={getCacheForType:function(i){var u=En(tn),f=u.data.get(i);return f===void 0&&(f=i(),u.data.set(i,f)),f}},c6=typeof WeakMap=="function"?WeakMap:Map,jt=0,Lt=null,ft=null,vt=0,Mt=0,Zn=null,Ca=!1,es=!1,dh=!1,_a=0,qt=0,lo=0,ei=0,fh=0,br=0,ts=0,Fl=null,Xr=null,ph=!1,gh=0,Vc=1/0,Wc=null,uo=null,Yc=!1,ti=null,zl=0,hh=0,mh=null,Bl=0,bh=null;function Qn(){if(jt&2&&vt!==0)return vt&-vt;if(I.T!==null){var i=Vi;return i!==0?i:Th()}return TA()}function oC(){br===0&&(br=!(vt&536870912)||xt?Nt():536870912);var i=pr.current;return i!==null&&(i.flags|=32),br}function On(i,u,f){(i===Lt&&Mt===2||i.cancelPendingCommit!==null)&&(ns(i,0),Na(i,vt,br,!1)),Mn(i,f),(!(jt&2)||i!==Lt)&&(i===Lt&&(!(jt&2)&&(ei|=f),qt===4&&Na(i,vt,br,!1)),Zr(i))}function iC(i,u,f){if(jt&6)throw Error(r(327));var h=!f&&(u&60)===0&&(u&i.expiredLanes)===0||Xe(i,u),S=h?p6(i,u):Eh(i,u,!0),T=h;do{if(S===0){es&&!h&&Na(i,u,0,!1);break}else if(S===6)Na(i,u,0,!Ca);else{if(f=i.current.alternate,T&&!d6(f)){S=Eh(i,u,!1),T=!1;continue}if(S===2){if(T=u,i.errorRecoveryDisabledLanes&T)var z=0;else z=i.pendingLanes&-536870913,z=z!==0?z:z&536870912?536870912:0;if(z!==0){u=z;e:{var q=i;S=Fl;var Z=q.current.memoizedState.isDehydrated;if(Z&&(ns(q,z).flags|=256),z=Eh(q,z,!1),z!==2){if(dh&&!Z){q.errorRecoveryDisabledLanes|=T,ei|=T,S=4;break e}T=Xr,Xr=S,T!==null&&yh(T)}S=z}if(T=!1,S!==2)continue}}if(S===1){ns(i,0),Na(i,u,0,!0);break}e:{switch(h=i,S){case 0:case 1:throw Error(r(345));case 4:if((u&4194176)===u){Na(h,u,br,!Ca);break e}break;case 2:Xr=null;break;case 3:case 5:break;default:throw Error(r(329))}if(h.finishedWork=f,h.finishedLanes=u,(u&62914560)===u&&(T=gh+300-me(),10f?32:f,I.T=null,ti===null)var T=!1;else{f=mh,mh=null;var z=ti,q=zl;if(ti=null,zl=0,jt&6)throw Error(r(331));var Z=jt;if(jt|=4,JR(z.current),XR(z,z.current,q,f),jt=Z,jl(0,!1),et&&typeof et.onPostCommitFiberRoot=="function")try{et.onPostCommitFiberRoot(bt,z)}catch{}T=!0}return T}finally{K.p=S,I.T=h,hC(i,u)}}return!1}function mC(i,u,f){u=cr(f,u),u=Bg(i.stateNode,u,2),i=ro(i,u,2),i!==null&&(Mn(i,2),Zr(i))}function Ot(i,u,f){if(i.tag===3)mC(i,i,f);else for(;u!==null;){if(u.tag===3){mC(u,i,f);break}else if(u.tag===1){var h=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(uo===null||!uo.has(h))){i=cr(f,i),f=vR(2),h=ro(u,f,2),h!==null&&(SR(f,h,u,i),Mn(h,2),Zr(h));break}}u=u.return}}function wh(i,u,f){var h=i.pingCache;if(h===null){h=i.pingCache=new c6;var S=new Set;h.set(u,S)}else S=h.get(u),S===void 0&&(S=new Set,h.set(u,S));S.has(f)||(dh=!0,S.add(f),i=m6.bind(null,i,u,f),u.then(i,i))}function m6(i,u,f){var h=i.pingCache;h!==null&&h.delete(u),i.pingedLanes|=i.suspendedLanes&f,i.warmLanes&=~f,Lt===i&&(vt&f)===f&&(qt===4||qt===3&&(vt&62914560)===vt&&300>me()-gh?!(jt&2)&&ns(i,0):fh|=f,ts===vt&&(ts=0)),Zr(i)}function bC(i,u){u===0&&(u=Ln()),i=Ka(i,u),i!==null&&(Mn(i,u),Zr(i))}function b6(i){var u=i.memoizedState,f=0;u!==null&&(f=u.retryLane),bC(i,f)}function y6(i,u){var f=0;switch(i.tag){case 13:var h=i.stateNode,S=i.memoizedState;S!==null&&(f=S.retryLane);break;case 19:h=i.stateNode;break;case 22:h=i.stateNode._retryCache;break;default:throw Error(r(314))}h!==null&&h.delete(u),bC(i,f)}function v6(i,u){return xe(i,u)}var Zc=null,os=null,xh=!1,Qc=!1,kh=!1,ni=0;function Zr(i){i!==os&&i.next===null&&(os===null?Zc=os=i:os=os.next=i),Qc=!0,xh||(xh=!0,E6(S6))}function jl(i,u){if(!kh&&Qc){kh=!0;do for(var f=!1,h=Zc;h!==null;){if(i!==0){var S=h.pendingLanes;if(S===0)var T=0;else{var z=h.suspendedLanes,q=h.pingedLanes;T=(1<<31-wt(42|i)+1)-1,T&=S&~(z&~q),T=T&201326677?T&201326677|1:T?T|2:0}T!==0&&(f=!0,SC(h,T))}else T=vt,T=pa(h,h===Lt?T:0),!(T&3)||Xe(h,T)||(f=!0,SC(h,T));h=h.next}while(f);kh=!1}}function S6(){Qc=xh=!1;var i=0;ni!==0&&(_6()&&(i=ni),ni=0);for(var u=me(),f=null,h=Zc;h!==null;){var S=h.next,T=yC(h,u);T===0?(h.next=null,f===null?Zc=S:f.next=S,S===null&&(os=f)):(f=h,(i!==0||T&3)&&(Qc=!0)),h=S}jl(i)}function yC(i,u){for(var f=i.suspendedLanes,h=i.pingedLanes,S=i.expirationTimes,T=i.pendingLanes&-62914561;0"u"?null:document;function MC(i,u,f){var h=ss;if(h&&typeof u=="string"&&u){var S=lr(u);S='link[rel="'+i+'"][href="'+S+'"]',typeof f=="string"&&(S+='[crossorigin="'+f+'"]'),LC.has(S)||(LC.add(S),i={rel:i,crossOrigin:f,href:u},h.querySelector(S)===null&&(u=h.createElement("link"),mn(u,"link",i),an(u),h.head.appendChild(u)))}}function F6(i){Oa.D(i),MC("dns-prefetch",i,null)}function z6(i,u){Oa.C(i,u),MC("preconnect",i,u)}function B6(i,u,f){Oa.L(i,u,f);var h=ss;if(h&&i&&u){var S='link[rel="preload"][as="'+lr(u)+'"]';u==="image"&&f&&f.imageSrcSet?(S+='[imagesrcset="'+lr(f.imageSrcSet)+'"]',typeof f.imageSizes=="string"&&(S+='[imagesizes="'+lr(f.imageSizes)+'"]')):S+='[href="'+lr(i)+'"]';var T=S;switch(u){case"style":T=ls(i);break;case"script":T=us(i)}yr.has(T)||(i=D({rel:"preload",href:u==="image"&&f&&f.imageSrcSet?void 0:i,as:u},f),yr.set(T,i),h.querySelector(S)!==null||u==="style"&&h.querySelector(Hl(T))||u==="script"&&h.querySelector($l(T))||(u=h.createElement("link"),mn(u,"link",i),an(u),h.head.appendChild(u)))}}function j6(i,u){Oa.m(i,u);var f=ss;if(f&&i){var h=u&&typeof u.as=="string"?u.as:"script",S='link[rel="modulepreload"][as="'+lr(h)+'"][href="'+lr(i)+'"]',T=S;switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":T=us(i)}if(!yr.has(T)&&(i=D({rel:"modulepreload",href:i},u),yr.set(T,i),f.querySelector(S)===null)){switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(f.querySelector($l(T)))return}h=f.createElement("link"),mn(h,"link",i),an(h),f.head.appendChild(h)}}}function U6(i,u,f){Oa.S(i,u,f);var h=ss;if(h&&i){var S=Oi(h).hoistableStyles,T=ls(i);u=u||"default";var z=S.get(T);if(!z){var q={loading:0,preload:null};if(z=h.querySelector(Hl(T)))q.loading=5;else{i=D({rel:"stylesheet",href:i,"data-precedence":u},f),(f=yr.get(T))&&zh(i,f);var Z=z=h.createElement("link");an(Z),mn(Z,"link",i),Z._p=new Promise(function(ae,ye){Z.onload=ae,Z.onerror=ye}),Z.addEventListener("load",function(){q.loading|=1}),Z.addEventListener("error",function(){q.loading|=2}),q.loading|=4,ad(z,u,h)}z={type:"stylesheet",instance:z,count:1,state:q},S.set(T,z)}}}function G6(i,u){Oa.X(i,u);var f=ss;if(f&&i){var h=Oi(f).hoistableScripts,S=us(i),T=h.get(S);T||(T=f.querySelector($l(S)),T||(i=D({src:i,async:!0},u),(u=yr.get(S))&&Bh(i,u),T=f.createElement("script"),an(T),mn(T,"link",i),f.head.appendChild(T)),T={type:"script",instance:T,count:1,state:null},h.set(S,T))}}function H6(i,u){Oa.M(i,u);var f=ss;if(f&&i){var h=Oi(f).hoistableScripts,S=us(i),T=h.get(S);T||(T=f.querySelector($l(S)),T||(i=D({src:i,async:!0,type:"module"},u),(u=yr.get(S))&&Bh(i,u),T=f.createElement("script"),an(T),mn(T,"link",i),f.head.appendChild(T)),T={type:"script",instance:T,count:1,state:null},h.set(S,T))}}function PC(i,u,f,h){var S=(S=De.current)?rd(S):null;if(!S)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof f.precedence=="string"&&typeof f.href=="string"?(u=ls(f.href),f=Oi(S).hoistableStyles,h=f.get(u),h||(h={type:"style",instance:null,count:0,state:null},f.set(u,h)),h):{type:"void",instance:null,count:0,state:null};case"link":if(f.rel==="stylesheet"&&typeof f.href=="string"&&typeof f.precedence=="string"){i=ls(f.href);var T=Oi(S).hoistableStyles,z=T.get(i);if(z||(S=S.ownerDocument||S,z={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},T.set(i,z),(T=S.querySelector(Hl(i)))&&!T._p&&(z.instance=T,z.state.loading=5),yr.has(i)||(f={rel:"preload",as:"style",href:f.href,crossOrigin:f.crossOrigin,integrity:f.integrity,media:f.media,hrefLang:f.hrefLang,referrerPolicy:f.referrerPolicy},yr.set(i,f),T||$6(S,i,f,z.state))),u&&h===null)throw Error(r(528,""));return z}if(u&&h!==null)throw Error(r(529,""));return null;case"script":return u=f.async,f=f.src,typeof f=="string"&&u&&typeof u!="function"&&typeof u!="symbol"?(u=us(f),f=Oi(S).hoistableScripts,h=f.get(u),h||(h={type:"script",instance:null,count:0,state:null},f.set(u,h)),h):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function ls(i){return'href="'+lr(i)+'"'}function Hl(i){return'link[rel="stylesheet"]['+i+"]"}function FC(i){return D({},i,{"data-precedence":i.precedence,precedence:null})}function $6(i,u,f,h){i.querySelector('link[rel="preload"][as="style"]['+u+"]")?h.loading=1:(u=i.createElement("link"),h.preload=u,u.addEventListener("load",function(){return h.loading|=1}),u.addEventListener("error",function(){return h.loading|=2}),mn(u,"link",f),an(u),i.head.appendChild(u))}function us(i){return'[src="'+lr(i)+'"]'}function $l(i){return"script[async]"+i}function zC(i,u,f){if(u.count++,u.instance===null)switch(u.type){case"style":var h=i.querySelector('style[data-href~="'+lr(f.href)+'"]');if(h)return u.instance=h,an(h),h;var S=D({},f,{"data-href":f.href,"data-precedence":f.precedence,href:null,precedence:null});return h=(i.ownerDocument||i).createElement("style"),an(h),mn(h,"style",S),ad(h,f.precedence,i),u.instance=h;case"stylesheet":S=ls(f.href);var T=i.querySelector(Hl(S));if(T)return u.state.loading|=4,u.instance=T,an(T),T;h=FC(f),(S=yr.get(S))&&zh(h,S),T=(i.ownerDocument||i).createElement("link"),an(T);var z=T;return z._p=new Promise(function(q,Z){z.onload=q,z.onerror=Z}),mn(T,"link",h),u.state.loading|=4,ad(T,f.precedence,i),u.instance=T;case"script":return T=us(f.src),(S=i.querySelector($l(T)))?(u.instance=S,an(S),S):(h=f,(S=yr.get(T))&&(h=D({},f),Bh(h,S)),i=i.ownerDocument||i,S=i.createElement("script"),an(S),mn(S,"link",h),i.head.appendChild(S),u.instance=S);case"void":return null;default:throw Error(r(443,u.type))}else u.type==="stylesheet"&&!(u.state.loading&4)&&(h=u.instance,u.state.loading|=4,ad(h,f.precedence,i));return u.instance}function ad(i,u,f){for(var h=f.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),S=h.length?h[h.length-1]:null,T=S,z=0;z title"):null)}function q6(i,u,f){if(f===1||u.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof u.precedence!="string"||typeof u.href!="string"||u.href==="")break;return!0;case"link":if(typeof u.rel!="string"||typeof u.href!="string"||u.href===""||u.onLoad||u.onError)break;switch(u.rel){case"stylesheet":return i=u.disabled,typeof u.precedence=="string"&&i==null;default:return!0}case"script":if(u.async&&typeof u.async!="function"&&typeof u.async!="symbol"&&!u.onLoad&&!u.onError&&u.src&&typeof u.src=="string")return!0}return!1}function UC(i){return!(i.type==="stylesheet"&&!(i.state.loading&3))}var ql=null;function V6(){}function W6(i,u,f){if(ql===null)throw Error(r(475));var h=ql;if(u.type==="stylesheet"&&(typeof f.media!="string"||matchMedia(f.media).matches!==!1)&&!(u.state.loading&4)){if(u.instance===null){var S=ls(f.href),T=i.querySelector(Hl(S));if(T){i=T._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(h.count++,h=id.bind(h),i.then(h,h)),u.state.loading|=4,u.instance=T,an(T);return}T=i.ownerDocument||i,f=FC(f),(S=yr.get(S))&&zh(f,S),T=T.createElement("link"),an(T);var z=T;z._p=new Promise(function(q,Z){z.onload=q,z.onerror=Z}),mn(T,"link",f),u.instance=T}h.stylesheets===null&&(h.stylesheets=new Map),h.stylesheets.set(u,i),(i=u.state.preload)&&!(u.state.loading&3)&&(h.count++,u=id.bind(h),i.addEventListener("load",u),i.addEventListener("error",u))}}function Y6(){if(ql===null)throw Error(r(475));var i=ql;return i.stylesheets&&i.count===0&&jh(i,i.stylesheets),0"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Kh.exports=hq(),Kh.exports}var bq=mq(),Jl={},u_;function yq(){if(u_)return Jl;u_=1,Object.defineProperty(Jl,"__esModule",{value:!0}),Jl.parse=s,Jl.serialize=d;const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,n=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,r=/^[\u0020-\u003A\u003D-\u007E]*$/,a=Object.prototype.toString,o=(()=>{const m=function(){};return m.prototype=Object.create(null),m})();function s(m,b){const y=new o,v=m.length;if(v<2)return y;const k=(b==null?void 0:b.decode)||p;let A=0;do{const x=m.indexOf("=",A);if(x===-1)break;const R=m.indexOf(";",A),O=R===-1?v:R;if(x>O){A=m.lastIndexOf(";",x-1)+1;continue}const N=l(m,A,x),C=c(m,x,N),_=m.slice(N,C);if(y[_]===void 0){let L=l(m,x+1,O),I=c(m,O,L);const D=k(m.slice(L,I));y[_]=D}A=O+1}while(Ay;){const v=m.charCodeAt(--b);if(v!==32&&v!==9)return b+1}return y}function d(m,b,y){const v=(y==null?void 0:y.encode)||encodeURIComponent;if(!e.test(m))throw new TypeError(`argument name is invalid: ${m}`);const k=v(b);if(!t.test(k))throw new TypeError(`argument val is invalid: ${b}`);let A=m+"="+k;if(!y)return A;if(y.maxAge!==void 0){if(!Number.isInteger(y.maxAge))throw new TypeError(`option maxAge is invalid: ${y.maxAge}`);A+="; Max-Age="+y.maxAge}if(y.domain){if(!n.test(y.domain))throw new TypeError(`option domain is invalid: ${y.domain}`);A+="; Domain="+y.domain}if(y.path){if(!r.test(y.path))throw new TypeError(`option path is invalid: ${y.path}`);A+="; Path="+y.path}if(y.expires){if(!g(y.expires)||!Number.isFinite(y.expires.valueOf()))throw new TypeError(`option expires is invalid: ${y.expires}`);A+="; Expires="+y.expires.toUTCString()}if(y.httpOnly&&(A+="; HttpOnly"),y.secure&&(A+="; Secure"),y.partitioned&&(A+="; Partitioned"),y.priority)switch(typeof y.priority=="string"?y.priority.toLowerCase():void 0){case"low":A+="; Priority=Low";break;case"medium":A+="; Priority=Medium";break;case"high":A+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${y.priority}`)}if(y.sameSite)switch(typeof y.sameSite=="string"?y.sameSite.toLowerCase():y.sameSite){case!0:case"strict":A+="; SameSite=Strict";break;case"lax":A+="; SameSite=Lax";break;case"none":A+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${y.sameSite}`)}return A}function p(m){if(m.indexOf("%")===-1)return m;try{return decodeURIComponent(m)}catch{return m}}function g(m){return a.call(m)==="[object Date]"}return Jl}yq();/** * react-router v7.3.0 * * Copyright (c) Remix Software Inc. @@ -55,21 +55,21 @@ Error generating stack: `+f.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */var c_="popstate";function vq(e={}){function t(a,o){let{pathname:s="/",search:u="",hash:c=""}=xi(a.location.hash.substring(1));return!s.startsWith("/")&&!s.startsWith(".")&&(s="/"+s),u0("",{pathname:s,search:u,hash:c},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(a,o){let s=a.document.querySelector("base"),u="";if(s&&s.getAttribute("href")){let c=a.location.href,d=c.indexOf("#");u=d===-1?c:c.slice(0,d)}return u+"#"+(typeof o=="string"?o:Su(o))}function r(a,o){jr(a.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(o)})`)}return Eq(t,n,r,e)}function Gt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function jr(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Sq(){return Math.random().toString(36).substring(2,10)}function d_(e,t){return{usr:e.state,key:e.key,idx:t}}function u0(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?xi(t):t,state:n,key:t&&t.key||r||Sq()}}function Su({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function xi(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function Eq(e,t,n,r={}){let{window:a=document.defaultView,v5Compat:o=!1}=r,s=a.history,u="POP",c=null,d=p();d==null&&(d=0,s.replaceState({...s.state,idx:d},""));function p(){return(s.state||{idx:null}).idx}function g(){u="POP";let k=p(),A=k==null?null:k-d;d=k,c&&c({action:u,location:v.location,delta:A})}function m(k,A){u="PUSH";let x=u0(v.location,k,A);n&&n(x,k),d=p()+1;let R=d_(x,d),O=v.createHref(x);try{s.pushState(R,"",O)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;a.location.assign(O)}o&&c&&c({action:u,location:v.location,delta:1})}function b(k,A){u="REPLACE";let x=u0(v.location,k,A);n&&n(x,k),d=p();let R=d_(x,d),O=v.createHref(x);s.replaceState(R,"",O),o&&c&&c({action:u,location:v.location,delta:0})}function y(k){let A=a.location.origin!=="null"?a.location.origin:a.location.href,x=typeof k=="string"?k:Su(k);return x=x.replace(/ $/,"%20"),Gt(A,`No window.location.(origin|href) available to create URL for href: ${x}`),new URL(x,A)}let v={get action(){return u},get location(){return e(a,s)},listen(k){if(c)throw new Error("A history only accepts one active listener");return a.addEventListener(c_,g),c=k,()=>{a.removeEventListener(c_,g),c=null}},createHref(k){return t(a,k)},createURL:y,encodeLocation(k){let A=y(k);return{pathname:A.pathname,search:A.search,hash:A.hash}},push:m,replace:b,go(k){return s.go(k)}};return v}function qz(e,t,n="/"){return wq(e,t,n,!1)}function wq(e,t,n,r){let a=typeof t=="string"?xi(t):t,o=Ba(a.pathname||"/",n);if(o==null)return null;let s=Vz(e);xq(s);let u=null;for(let c=0;u==null&&c{let c={relativePath:u===void 0?o.path||"":u,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};c.relativePath.startsWith("/")&&(Gt(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length));let d=Fa([r,c.relativePath]),p=n.concat(c);o.children&&o.children.length>0&&(Gt(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${d}".`),Vz(o.children,t,p,d)),!(o.path==null&&!o.index)&&t.push({path:d,score:Nq(d,o.index),routesMeta:p})};return e.forEach((o,s)=>{var u;if(o.path===""||!((u=o.path)!=null&&u.includes("?")))a(o,s);else for(let c of Wz(o.path))a(o,s,c)}),t}function Wz(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,a=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return a?[o,""]:[o];let s=Wz(r.join("/")),u=[];return u.push(...s.map(c=>c===""?o:[o,c].join("/"))),a&&u.push(...s),u.map(c=>e.startsWith("/")&&c===""?"/":c)}function xq(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Oq(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var kq=/^:[\w-]+$/,Tq=3,Aq=2,Rq=1,Cq=10,_q=-2,f_=e=>e==="*";function Nq(e,t){let n=e.split("/"),r=n.length;return n.some(f_)&&(r+=_q),t&&(r+=Aq),n.filter(a=>!f_(a)).reduce((a,o)=>a+(kq.test(o)?Tq:o===""?Rq:Cq),r)}function Oq(e,t){return e.length===t.length&&e.slice(0,-1).every((r,a)=>r===t[a])?e[e.length-1]-t[t.length-1]:0}function Iq(e,t,n=!1){let{routesMeta:r}=e,a={},o="/",s=[];for(let u=0;u{if(p==="*"){let y=u[m]||"";s=o.slice(0,o.length-y.length).replace(/(.)\/+$/,"$1")}const b=u[m];return g&&!b?d[p]=void 0:d[p]=(b||"").replace(/%2F/g,"/"),d},{}),pathname:o,pathnameBase:s,pattern:e}}function Dq(e,t=!1,n=!0){jr(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,u,c)=>(r.push({paramName:u,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}function Lq(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return jr(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Ba(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function Mq(e,t="/"){let{pathname:n,search:r="",hash:a=""}=typeof e=="string"?xi(e):e;return{pathname:n?n.startsWith("/")?n:Pq(n,t):t,search:Bq(r),hash:jq(a)}}function Pq(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function Jh(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function Fq(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Yz(e){let t=Fq(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function Kz(e,t,n,r=!1){let a;typeof e=="string"?a=xi(e):(a={...e},Gt(!a.pathname||!a.pathname.includes("?"),Jh("?","pathname","search",a)),Gt(!a.pathname||!a.pathname.includes("#"),Jh("#","pathname","hash",a)),Gt(!a.search||!a.search.includes("#"),Jh("#","search","hash",a)));let o=e===""||a.pathname==="",s=o?"/":a.pathname,u;if(s==null)u=n;else{let g=t.length-1;if(!r&&s.startsWith("..")){let m=s.split("/");for(;m[0]==="..";)m.shift(),g-=1;a.pathname=m.join("/")}u=g>=0?t[g]:"/"}let c=Mq(a,u),d=s&&s!=="/"&&s.endsWith("/"),p=(o||s===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(d||p)&&(c.pathname+="/"),c}var Fa=e=>e.join("/").replace(/\/\/+/g,"/"),zq=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Bq=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,jq=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Uq(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var Xz=["POST","PUT","PATCH","DELETE"];new Set(Xz);var Gq=["GET",...Xz];new Set(Gq);var Us=w.createContext(null);Us.displayName="DataRouter";var qf=w.createContext(null);qf.displayName="DataRouterState";var Zz=w.createContext({isTransitioning:!1});Zz.displayName="ViewTransition";var Hq=w.createContext(new Map);Hq.displayName="Fetchers";var $q=w.createContext(null);$q.displayName="Await";var sa=w.createContext(null);sa.displayName="Navigation";var zu=w.createContext(null);zu.displayName="Location";var Ha=w.createContext({outlet:null,matches:[],isDataRoute:!1});Ha.displayName="Route";var Ck=w.createContext(null);Ck.displayName="RouteError";function qq(e,{relative:t}={}){Gt(Bu(),"useHref() may be used only in the context of a component.");let{basename:n,navigator:r}=w.useContext(sa),{hash:a,pathname:o,search:s}=ju(e,{relative:t}),u=o;return n!=="/"&&(u=o==="/"?n:Fa([n,o])),r.createHref({pathname:u,search:s,hash:a})}function Bu(){return w.useContext(zu)!=null}function ki(){return Gt(Bu(),"useLocation() may be used only in the context of a component."),w.useContext(zu).location}var Qz="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Jz(e){w.useContext(sa).static||w.useLayoutEffect(e)}function _k(){let{isDataRoute:e}=w.useContext(Ha);return e?a9():Vq()}function Vq(){Gt(Bu(),"useNavigate() may be used only in the context of a component.");let e=w.useContext(Us),{basename:t,navigator:n}=w.useContext(sa),{matches:r}=w.useContext(Ha),{pathname:a}=ki(),o=JSON.stringify(Yz(r)),s=w.useRef(!1);return Jz(()=>{s.current=!0}),w.useCallback((c,d={})=>{if(jr(s.current,Qz),!s.current)return;if(typeof c=="number"){n.go(c);return}let p=Kz(c,JSON.parse(o),a,d.relative==="path");e==null&&t!=="/"&&(p.pathname=p.pathname==="/"?t:Fa([t,p.pathname])),(d.replace?n.replace:n.push)(p,d.state,d)},[t,n,o,a,e])}w.createContext(null);function ju(e,{relative:t}={}){let{matches:n}=w.useContext(Ha),{pathname:r}=ki(),a=JSON.stringify(Yz(n));return w.useMemo(()=>Kz(e,JSON.parse(a),r,t==="path"),[e,a,r,t])}function Wq(e,t){return eB(e,t)}function eB(e,t,n,r){var x;Gt(Bu(),"useRoutes() may be used only in the context of a component.");let{navigator:a,static:o}=w.useContext(sa),{matches:s}=w.useContext(Ha),u=s[s.length-1],c=u?u.params:{},d=u?u.pathname:"/",p=u?u.pathnameBase:"/",g=u&&u.route;{let R=g&&g.path||"";tB(d,!g||R.endsWith("*")||R.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${d}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. + */var c_="popstate";function vq(e={}){function t(a,o){let{pathname:s="/",search:l="",hash:c=""}=xi(a.location.hash.substring(1));return!s.startsWith("/")&&!s.startsWith(".")&&(s="/"+s),u0("",{pathname:s,search:l,hash:c},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(a,o){let s=a.document.querySelector("base"),l="";if(s&&s.getAttribute("href")){let c=a.location.href,d=c.indexOf("#");l=d===-1?c:c.slice(0,d)}return l+"#"+(typeof o=="string"?o:Su(o))}function r(a,o){jr(a.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(o)})`)}return Eq(t,n,r,e)}function Gt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function jr(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Sq(){return Math.random().toString(36).substring(2,10)}function d_(e,t){return{usr:e.state,key:e.key,idx:t}}function u0(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?xi(t):t,state:n,key:t&&t.key||r||Sq()}}function Su({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function xi(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function Eq(e,t,n,r={}){let{window:a=document.defaultView,v5Compat:o=!1}=r,s=a.history,l="POP",c=null,d=p();d==null&&(d=0,s.replaceState({...s.state,idx:d},""));function p(){return(s.state||{idx:null}).idx}function g(){l="POP";let k=p(),A=k==null?null:k-d;d=k,c&&c({action:l,location:v.location,delta:A})}function m(k,A){l="PUSH";let x=u0(v.location,k,A);n&&n(x,k),d=p()+1;let R=d_(x,d),O=v.createHref(x);try{s.pushState(R,"",O)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;a.location.assign(O)}o&&c&&c({action:l,location:v.location,delta:1})}function b(k,A){l="REPLACE";let x=u0(v.location,k,A);n&&n(x,k),d=p();let R=d_(x,d),O=v.createHref(x);s.replaceState(R,"",O),o&&c&&c({action:l,location:v.location,delta:0})}function y(k){let A=a.location.origin!=="null"?a.location.origin:a.location.href,x=typeof k=="string"?k:Su(k);return x=x.replace(/ $/,"%20"),Gt(A,`No window.location.(origin|href) available to create URL for href: ${x}`),new URL(x,A)}let v={get action(){return l},get location(){return e(a,s)},listen(k){if(c)throw new Error("A history only accepts one active listener");return a.addEventListener(c_,g),c=k,()=>{a.removeEventListener(c_,g),c=null}},createHref(k){return t(a,k)},createURL:y,encodeLocation(k){let A=y(k);return{pathname:A.pathname,search:A.search,hash:A.hash}},push:m,replace:b,go(k){return s.go(k)}};return v}function qz(e,t,n="/"){return wq(e,t,n,!1)}function wq(e,t,n,r){let a=typeof t=="string"?xi(t):t,o=Ba(a.pathname||"/",n);if(o==null)return null;let s=Vz(e);xq(s);let l=null;for(let c=0;l==null&&c{let c={relativePath:l===void 0?o.path||"":l,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};c.relativePath.startsWith("/")&&(Gt(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length));let d=Fa([r,c.relativePath]),p=n.concat(c);o.children&&o.children.length>0&&(Gt(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${d}".`),Vz(o.children,t,p,d)),!(o.path==null&&!o.index)&&t.push({path:d,score:Nq(d,o.index),routesMeta:p})};return e.forEach((o,s)=>{var l;if(o.path===""||!((l=o.path)!=null&&l.includes("?")))a(o,s);else for(let c of Wz(o.path))a(o,s,c)}),t}function Wz(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,a=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return a?[o,""]:[o];let s=Wz(r.join("/")),l=[];return l.push(...s.map(c=>c===""?o:[o,c].join("/"))),a&&l.push(...s),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function xq(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Oq(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var kq=/^:[\w-]+$/,Tq=3,Aq=2,Rq=1,Cq=10,_q=-2,f_=e=>e==="*";function Nq(e,t){let n=e.split("/"),r=n.length;return n.some(f_)&&(r+=_q),t&&(r+=Aq),n.filter(a=>!f_(a)).reduce((a,o)=>a+(kq.test(o)?Tq:o===""?Rq:Cq),r)}function Oq(e,t){return e.length===t.length&&e.slice(0,-1).every((r,a)=>r===t[a])?e[e.length-1]-t[t.length-1]:0}function Iq(e,t,n=!1){let{routesMeta:r}=e,a={},o="/",s=[];for(let l=0;l{if(p==="*"){let y=l[m]||"";s=o.slice(0,o.length-y.length).replace(/(.)\/+$/,"$1")}const b=l[m];return g&&!b?d[p]=void 0:d[p]=(b||"").replace(/%2F/g,"/"),d},{}),pathname:o,pathnameBase:s,pattern:e}}function Dq(e,t=!1,n=!0){jr(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,l,c)=>(r.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}function Lq(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return jr(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Ba(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function Mq(e,t="/"){let{pathname:n,search:r="",hash:a=""}=typeof e=="string"?xi(e):e;return{pathname:n?n.startsWith("/")?n:Pq(n,t):t,search:Bq(r),hash:jq(a)}}function Pq(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function Jh(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function Fq(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Yz(e){let t=Fq(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function Kz(e,t,n,r=!1){let a;typeof e=="string"?a=xi(e):(a={...e},Gt(!a.pathname||!a.pathname.includes("?"),Jh("?","pathname","search",a)),Gt(!a.pathname||!a.pathname.includes("#"),Jh("#","pathname","hash",a)),Gt(!a.search||!a.search.includes("#"),Jh("#","search","hash",a)));let o=e===""||a.pathname==="",s=o?"/":a.pathname,l;if(s==null)l=n;else{let g=t.length-1;if(!r&&s.startsWith("..")){let m=s.split("/");for(;m[0]==="..";)m.shift(),g-=1;a.pathname=m.join("/")}l=g>=0?t[g]:"/"}let c=Mq(a,l),d=s&&s!=="/"&&s.endsWith("/"),p=(o||s===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(d||p)&&(c.pathname+="/"),c}var Fa=e=>e.join("/").replace(/\/\/+/g,"/"),zq=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Bq=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,jq=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Uq(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var Xz=["POST","PUT","PATCH","DELETE"];new Set(Xz);var Gq=["GET",...Xz];new Set(Gq);var Us=w.createContext(null);Us.displayName="DataRouter";var qf=w.createContext(null);qf.displayName="DataRouterState";var Zz=w.createContext({isTransitioning:!1});Zz.displayName="ViewTransition";var Hq=w.createContext(new Map);Hq.displayName="Fetchers";var $q=w.createContext(null);$q.displayName="Await";var sa=w.createContext(null);sa.displayName="Navigation";var zu=w.createContext(null);zu.displayName="Location";var Ha=w.createContext({outlet:null,matches:[],isDataRoute:!1});Ha.displayName="Route";var Ck=w.createContext(null);Ck.displayName="RouteError";function qq(e,{relative:t}={}){Gt(Bu(),"useHref() may be used only in the context of a component.");let{basename:n,navigator:r}=w.useContext(sa),{hash:a,pathname:o,search:s}=ju(e,{relative:t}),l=o;return n!=="/"&&(l=o==="/"?n:Fa([n,o])),r.createHref({pathname:l,search:s,hash:a})}function Bu(){return w.useContext(zu)!=null}function ki(){return Gt(Bu(),"useLocation() may be used only in the context of a component."),w.useContext(zu).location}var Qz="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Jz(e){w.useContext(sa).static||w.useLayoutEffect(e)}function _k(){let{isDataRoute:e}=w.useContext(Ha);return e?a9():Vq()}function Vq(){Gt(Bu(),"useNavigate() may be used only in the context of a component.");let e=w.useContext(Us),{basename:t,navigator:n}=w.useContext(sa),{matches:r}=w.useContext(Ha),{pathname:a}=ki(),o=JSON.stringify(Yz(r)),s=w.useRef(!1);return Jz(()=>{s.current=!0}),w.useCallback((c,d={})=>{if(jr(s.current,Qz),!s.current)return;if(typeof c=="number"){n.go(c);return}let p=Kz(c,JSON.parse(o),a,d.relative==="path");e==null&&t!=="/"&&(p.pathname=p.pathname==="/"?t:Fa([t,p.pathname])),(d.replace?n.replace:n.push)(p,d.state,d)},[t,n,o,a,e])}w.createContext(null);function ju(e,{relative:t}={}){let{matches:n}=w.useContext(Ha),{pathname:r}=ki(),a=JSON.stringify(Yz(n));return w.useMemo(()=>Kz(e,JSON.parse(a),r,t==="path"),[e,a,r,t])}function Wq(e,t){return eB(e,t)}function eB(e,t,n,r){var x;Gt(Bu(),"useRoutes() may be used only in the context of a component.");let{navigator:a,static:o}=w.useContext(sa),{matches:s}=w.useContext(Ha),l=s[s.length-1],c=l?l.params:{},d=l?l.pathname:"/",p=l?l.pathnameBase:"/",g=l&&l.route;{let R=g&&g.path||"";tB(d,!g||R.endsWith("*")||R.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${d}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. -Please change the parent to .`)}let m=ki(),b;if(t){let R=typeof t=="string"?xi(t):t;Gt(p==="/"||((x=R.pathname)==null?void 0:x.startsWith(p)),`When overriding the location using \`\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${p}" but pathname "${R.pathname}" was given in the \`location\` prop.`),b=R}else b=m;let y=b.pathname||"/",v=y;if(p!=="/"){let R=p.replace(/^\//,"").split("/");v="/"+y.replace(/^\//,"").split("/").slice(R.length).join("/")}let k=!o&&n&&n.matches&&n.matches.length>0?n.matches:qz(e,{pathname:v});jr(g||k!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),jr(k==null||k[k.length-1].route.element!==void 0||k[k.length-1].route.Component!==void 0||k[k.length-1].route.lazy!==void 0,`Matched leaf route at location "${b.pathname}${b.search}${b.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`);let A=Qq(k&&k.map(R=>Object.assign({},R,{params:Object.assign({},c,R.params),pathname:Fa([p,a.encodeLocation?a.encodeLocation(R.pathname).pathname:R.pathname]),pathnameBase:R.pathnameBase==="/"?p:Fa([p,a.encodeLocation?a.encodeLocation(R.pathnameBase).pathname:R.pathnameBase])})),s,n,r);return t&&A?w.createElement(zu.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...b},navigationType:"POP"}},A):A}function Yq(){let e=r9(),t=Uq(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:r},o={padding:"2px 4px",backgroundColor:r},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=w.createElement(w.Fragment,null,w.createElement("p",null,"💿 Hey developer 👋"),w.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",w.createElement("code",{style:o},"ErrorBoundary")," or"," ",w.createElement("code",{style:o},"errorElement")," prop on your route.")),w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},t),n?w.createElement("pre",{style:a},n):null,s)}var Kq=w.createElement(Yq,null),Xq=class extends w.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?w.createElement(Ha.Provider,{value:this.props.routeContext},w.createElement(Ck.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Zq({routeContext:e,match:t,children:n}){let r=w.useContext(Us);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),w.createElement(Ha.Provider,{value:e},n)}function Qq(e,t=[],n=null,r=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,o=n==null?void 0:n.errors;if(o!=null){let c=a.findIndex(d=>d.route.id&&(o==null?void 0:o[d.route.id])!==void 0);Gt(c>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),a=a.slice(0,Math.min(a.length,c+1))}let s=!1,u=-1;if(n)for(let c=0;c=0?a=a.slice(0,u+1):a=[a[0]];break}}}return a.reduceRight((c,d,p)=>{let g,m=!1,b=null,y=null;n&&(g=o&&d.route.id?o[d.route.id]:void 0,b=d.route.errorElement||Kq,s&&(u<0&&p===0?(tB("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),m=!0,y=null):u===p&&(m=!0,y=d.route.hydrateFallbackElement||null)));let v=t.concat(a.slice(0,p+1)),k=()=>{let A;return g?A=b:m?A=y:d.route.Component?A=w.createElement(d.route.Component,null):d.route.element?A=d.route.element:A=c,w.createElement(Zq,{match:d,routeContext:{outlet:c,matches:v,isDataRoute:n!=null},children:A})};return n&&(d.route.ErrorBoundary||d.route.errorElement||p===0)?w.createElement(Xq,{location:n.location,revalidation:n.revalidation,component:b,error:g,children:k(),routeContext:{outlet:null,matches:v,isDataRoute:!0}}):k()},null)}function Nk(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Jq(e){let t=w.useContext(Us);return Gt(t,Nk(e)),t}function e9(e){let t=w.useContext(qf);return Gt(t,Nk(e)),t}function t9(e){let t=w.useContext(Ha);return Gt(t,Nk(e)),t}function Ok(e){let t=t9(e),n=t.matches[t.matches.length-1];return Gt(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function n9(){return Ok("useRouteId")}function r9(){var r;let e=w.useContext(Ck),t=e9("useRouteError"),n=Ok("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function a9(){let{router:e}=Jq("useNavigate"),t=Ok("useNavigate"),n=w.useRef(!1);return Jz(()=>{n.current=!0}),w.useCallback(async(a,o={})=>{jr(n.current,Qz),n.current&&(typeof a=="number"?e.navigate(a):await e.navigate(a,{fromRouteId:t,...o}))},[e,t])}var p_={};function tB(e,t,n){!t&&!p_[e]&&(p_[e]=!0,jr(!1,n))}w.memo(o9);function o9({routes:e,future:t,state:n}){return eB(e,void 0,n,t)}function c0(e){Gt(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function i9({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:a,static:o=!1}){Gt(!Bu(),"You cannot render a inside another . You should never have more than one in your app.");let s=e.replace(/^\/*/,"/"),u=w.useMemo(()=>({basename:s,navigator:a,static:o,future:{}}),[s,a,o]);typeof n=="string"&&(n=xi(n));let{pathname:c="/",search:d="",hash:p="",state:g=null,key:m="default"}=n,b=w.useMemo(()=>{let y=Ba(c,s);return y==null?null:{location:{pathname:y,search:d,hash:p,state:g,key:m},navigationType:r}},[s,c,d,p,g,m,r]);return jr(b!=null,` is not able to match the URL "${c}${d}${p}" because it does not start with the basename, so the won't render anything.`),b==null?null:w.createElement(sa.Provider,{value:u},w.createElement(zu.Provider,{children:t,value:b}))}function s9({children:e,location:t}){return Wq(d0(e),t)}function d0(e,t=[]){let n=[];return w.Children.forEach(e,(r,a)=>{if(!w.isValidElement(r))return;let o=[...t,a];if(r.type===w.Fragment){n.push.apply(n,d0(r.props.children,o));return}Gt(r.type===c0,`[${typeof r.type=="string"?r.type:r.type.name}] is not a component. All component children of must be a or `),Gt(!r.props.index||!r.props.children,"An index route cannot have child routes.");let s={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=d0(r.props.children,o)),n.push(s)}),n}var Vd="get",Wd="application/x-www-form-urlencoded";function Vf(e){return e!=null&&typeof e.tagName=="string"}function l9(e){return Vf(e)&&e.tagName.toLowerCase()==="button"}function u9(e){return Vf(e)&&e.tagName.toLowerCase()==="form"}function c9(e){return Vf(e)&&e.tagName.toLowerCase()==="input"}function d9(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function f9(e,t){return e.button===0&&(!t||t==="_self")&&!d9(e)}var hd=null;function p9(){if(hd===null)try{new FormData(document.createElement("form"),0),hd=!1}catch{hd=!0}return hd}var g9=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function em(e){return e!=null&&!g9.has(e)?(jr(!1,`"${e}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${Wd}"`),null):e}function h9(e,t){let n,r,a,o,s;if(u9(e)){let u=e.getAttribute("action");r=u?Ba(u,t):null,n=e.getAttribute("method")||Vd,a=em(e.getAttribute("enctype"))||Wd,o=new FormData(e)}else if(l9(e)||c9(e)&&(e.type==="submit"||e.type==="image")){let u=e.form;if(u==null)throw new Error('Cannot submit a diff --git a/lightrag_webui/src/hooks/useLightragGraph.tsx b/lightrag_webui/src/hooks/useLightragGraph.tsx index 12bbea8f..d5b66300 100644 --- a/lightrag_webui/src/hooks/useLightragGraph.tsx +++ b/lightrag_webui/src/hooks/useLightragGraph.tsx @@ -450,13 +450,6 @@ const useLightrangeGraph = () => { state.setRawGraph(data); state.setGraphIsEmpty(false); - // ensusre GraphLabels show the current label on first load - const lastSuccessfulQueryLabel = useGraphStore.getState().lastSuccessfulQueryLabel; - if (!lastSuccessfulQueryLabel){ - useSettingsStore.getState().setQueryLabel(''); - useSettingsStore.getState().setQueryLabel(queryLabel); - console.log('Set queryLabel after query on page first load'); - } // Update last successful query label state.setLastSuccessfulQueryLabel(currentQueryLabel); From 2dc59b49c020ec05912103a9d7a99551f11b0fa8 Mon Sep 17 00:00:00 2001 From: yangdx Date: Sun, 6 Apr 2025 15:53:58 +0800 Subject: [PATCH 5/9] Update webui assets --- .../{index-BhF9Nj8k.js => index-B9F57UMz.js} | 50 +++++++++---------- lightrag/api/webui/index.html | 2 +- 2 files changed, 26 insertions(+), 26 deletions(-) rename lightrag/api/webui/assets/{index-BhF9Nj8k.js => index-B9F57UMz.js} (64%) diff --git a/lightrag/api/webui/assets/index-BhF9Nj8k.js b/lightrag/api/webui/assets/index-B9F57UMz.js similarity index 64% rename from lightrag/api/webui/assets/index-BhF9Nj8k.js rename to lightrag/api/webui/assets/index-B9F57UMz.js index 281b228f..a029ba54 100644 --- a/lightrag/api/webui/assets/index-BhF9Nj8k.js +++ b/lightrag/api/webui/assets/index-B9F57UMz.js @@ -14,7 +14,7 @@ var aq=Object.defineProperty;var oq=(e,t,n)=>t in e?aq(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var t_;function cq(){if(t_)return lt;t_=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.iterator;function m(M){return M===null||typeof M!="object"?null:(M=g&&M[g]||M["@@iterator"],typeof M=="function"?M:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y=Object.assign,v={};function k(M,V,j){this.props=M,this.context=V,this.refs=v,this.updater=j||b}k.prototype.isReactComponent={},k.prototype.setState=function(M,V){if(typeof M!="object"&&typeof M!="function"&&M!=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,M,V,"setState")},k.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function A(){}A.prototype=k.prototype;function x(M,V,j){this.props=M,this.context=V,this.refs=v,this.updater=j||b}var R=x.prototype=new A;R.constructor=x,y(R,k.prototype),R.isPureReactComponent=!0;var O=Array.isArray,N={H:null,A:null,T:null,S:null},C=Object.prototype.hasOwnProperty;function _(M,V,j,P,K,ee){return j=ee.ref,{$$typeof:e,type:M,key:V,ref:j!==void 0?j:null,props:ee}}function L(M,V){return _(M.type,V,void 0,void 0,void 0,M.props)}function I(M){return typeof M=="object"&&M!==null&&M.$$typeof===e}function D(M){var V={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(j){return V[j]})}var G=/\/+/g;function $(M,V){return typeof M=="object"&&M!==null&&M.key!=null?D(""+M.key):V.toString(36)}function B(){}function W(M){switch(M.status){case"fulfilled":return M.value;case"rejected":throw M.reason;default:switch(typeof M.status=="string"?M.then(B,B):(M.status="pending",M.then(function(V){M.status==="pending"&&(M.status="fulfilled",M.value=V)},function(V){M.status==="pending"&&(M.status="rejected",M.reason=V)})),M.status){case"fulfilled":return M.value;case"rejected":throw M.reason}}throw M}function Q(M,V,j,P,K){var ee=typeof M;(ee==="undefined"||ee==="boolean")&&(M=null);var le=!1;if(M===null)le=!0;else switch(ee){case"bigint":case"string":case"number":le=!0;break;case"object":switch(M.$$typeof){case e:case t:le=!0;break;case p:return le=M._init,Q(le(M._payload),V,j,P,K)}}if(le)return K=K(M),le=P===""?"."+$(M,0):P,O(K)?(j="",le!=null&&(j=le.replace(G,"$&/")+"/"),Q(K,V,j,"",function(he){return he})):K!=null&&(I(K)&&(K=L(K,j+(K.key==null||M&&M.key===K.key?"":(""+K.key).replace(G,"$&/")+"/")+le)),V.push(K)),1;le=0;var X=P===""?".":P+":";if(O(M))for(var J=0;Jt in e?aq(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var r_;function fq(){return r_||(r_=1,function(e){function t(H,U){var F=H.length;H.push(U);e:for(;0>>1,M=H[Y];if(0>>1;Ya(P,F))Ka(ee,P)?(H[Y]=ee,H[K]=F,Y=K):(H[Y]=P,H[j]=F,Y=j);else if(Ka(ee,F))H[Y]=ee,H[K]=F,Y=K;else break e}}return U}function a(H,U){var F=H.sortIndex-U.sortIndex;return F!==0?F:H.id-U.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var c=[],d=[],p=1,g=null,m=3,b=!1,y=!1,v=!1,k=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;function R(H){for(var U=n(d);U!==null;){if(U.callback===null)r(d);else if(U.startTime<=H)r(d),U.sortIndex=U.expirationTime,t(c,U);else break;U=n(d)}}function O(H){if(v=!1,R(H),!y)if(n(c)!==null)y=!0,W();else{var U=n(d);U!==null&&Q(O,U.startTime-H)}}var N=!1,C=-1,_=5,L=-1;function I(){return!(e.unstable_now()-L<_)}function D(){if(N){var H=e.unstable_now();L=H;var U=!0;try{e:{y=!1,v&&(v=!1,A(C),C=-1),b=!0;var F=m;try{t:{for(R(H),g=n(c);g!==null&&!(g.expirationTime>H&&I());){var Y=g.callback;if(typeof Y=="function"){g.callback=null,m=g.priorityLevel;var M=Y(g.expirationTime<=H);if(H=e.unstable_now(),typeof M=="function"){g.callback=M,R(H),U=!0;break t}g===n(c)&&r(c),R(H)}else r(c);g=n(c)}if(g!==null)U=!0;else{var V=n(d);V!==null&&Q(O,V.startTime-H),U=!1}}break e}finally{g=null,m=F,b=!1}U=void 0}}finally{U?G():N=!1}}}var G;if(typeof x=="function")G=function(){x(D)};else if(typeof MessageChannel<"u"){var $=new MessageChannel,B=$.port2;$.port1.onmessage=D,G=function(){B.postMessage(null)}}else G=function(){k(D,0)};function W(){N||(N=!0,G())}function Q(H,U){C=k(function(){H(e.unstable_now())},U)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(H){H.callback=null},e.unstable_continueExecution=function(){y||b||(y=!0,W())},e.unstable_forceFrameRate=function(H){0>H||125Y?(H.sortIndex=F,t(d,H),n(c)===null&&H===n(d)&&(v?(A(C),C=-1):v=!0,Q(O,F-Y))):(H.sortIndex=M,t(c,H),y||b||(y=!0,W())),H},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(H){var U=m;return function(){var F=m;m=U;try{return H.apply(this,arguments)}finally{m=F}}}}(Zh)),Zh}var a_;function pq(){return a_||(a_=1,Xh.exports=fq()),Xh.exports}var Qh={exports:{}},wn={};/** + */var r_;function fq(){return r_||(r_=1,function(e){function t(H,U){var F=H.length;H.push(U);e:for(;0>>1,M=H[Y];if(0>>1;Ya(P,F))Za(J,P)?(H[Y]=J,H[Z]=F,Y=Z):(H[Y]=P,H[j]=F,Y=j);else if(Za(J,F))H[Y]=J,H[Z]=F,Y=Z;else break e}}return U}function a(H,U){var F=H.sortIndex-U.sortIndex;return F!==0?F:H.id-U.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var c=[],d=[],p=1,g=null,m=3,b=!1,y=!1,v=!1,k=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;function R(H){for(var U=n(d);U!==null;){if(U.callback===null)r(d);else if(U.startTime<=H)r(d),U.sortIndex=U.expirationTime,t(c,U);else break;U=n(d)}}function O(H){if(v=!1,R(H),!y)if(n(c)!==null)y=!0,W();else{var U=n(d);U!==null&&Q(O,U.startTime-H)}}var N=!1,C=-1,_=5,L=-1;function I(){return!(e.unstable_now()-L<_)}function D(){if(N){var H=e.unstable_now();L=H;var U=!0;try{e:{y=!1,v&&(v=!1,A(C),C=-1),b=!0;var F=m;try{t:{for(R(H),g=n(c);g!==null&&!(g.expirationTime>H&&I());){var Y=g.callback;if(typeof Y=="function"){g.callback=null,m=g.priorityLevel;var M=Y(g.expirationTime<=H);if(H=e.unstable_now(),typeof M=="function"){g.callback=M,R(H),U=!0;break t}g===n(c)&&r(c),R(H)}else r(c);g=n(c)}if(g!==null)U=!0;else{var V=n(d);V!==null&&Q(O,V.startTime-H),U=!1}}break e}finally{g=null,m=F,b=!1}U=void 0}}finally{U?G():N=!1}}}var G;if(typeof x=="function")G=function(){x(D)};else if(typeof MessageChannel<"u"){var $=new MessageChannel,B=$.port2;$.port1.onmessage=D,G=function(){B.postMessage(null)}}else G=function(){k(D,0)};function W(){N||(N=!0,G())}function Q(H,U){C=k(function(){H(e.unstable_now())},U)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(H){H.callback=null},e.unstable_continueExecution=function(){y||b||(y=!0,W())},e.unstable_forceFrameRate=function(H){0>H||125Y?(H.sortIndex=F,t(d,H),n(c)===null&&H===n(d)&&(v?(A(C),C=-1):v=!0,Q(O,F-Y))):(H.sortIndex=M,t(c,H),y||b||(y=!0,W())),H},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(H){var U=m;return function(){var F=m;m=U;try{return H.apply(this,arguments)}finally{m=F}}}}(Zh)),Zh}var a_;function pq(){return a_||(a_=1,Xh.exports=fq()),Xh.exports}var Qh={exports:{}},wn={};/** * @license React * react-dom.production.js * @@ -40,13 +40,13 @@ var aq=Object.defineProperty;var oq=(e,t,n)=>t in e?aq(e,t,{enumerable:!0,config * LICENSE file in the root directory of this source tree. */var s_;function hq(){if(s_)return Ql;s_=1;var e=pq(),t=$f(),n=$z();function r(i){var u="https://react.dev/errors/"+i;if(1)":-1S||Z[h]!==ae[S]){var ye=` -`+Z[h].replace(" at new "," at ");return i.displayName&&ye.includes("")&&(ye=ye.replace("",i.displayName)),ye}while(1<=h&&0<=S);break}}}finally{W=!1,Error.prepareStackTrace=f}return(f=i?i.displayName||i.name:"")?B(f):""}function H(i){switch(i.tag){case 26:case 27:case 5:return B(i.type);case 16:return B("Lazy");case 13:return B("Suspense");case 19:return B("SuspenseList");case 0:case 15:return i=Q(i.type,!1),i;case 11:return i=Q(i.type.render,!1),i;case 1:return i=Q(i.type,!0),i;default:return""}}function U(i){try{var u="";do u+=H(i),i=i.return;while(i);return u}catch(f){return` +`);for(S=h=0;hS||X[h]!==ae[S]){var ye=` +`+X[h].replace(" at new "," at ");return i.displayName&&ye.includes("")&&(ye=ye.replace("",i.displayName)),ye}while(1<=h&&0<=S);break}}}finally{W=!1,Error.prepareStackTrace=f}return(f=i?i.displayName||i.name:"")?B(f):""}function H(i){switch(i.tag){case 26:case 27:case 5:return B(i.type);case 16:return B("Lazy");case 13:return B("Suspense");case 19:return B("SuspenseList");case 0:case 15:return i=Q(i.type,!1),i;case 11:return i=Q(i.type.render,!1),i;case 1:return i=Q(i.type,!0),i;default:return""}}function U(i){try{var u="";do u+=H(i),i=i.return;while(i);return u}catch(f){return` Error generating stack: `+f.message+` -`+f.stack}}function F(i){var u=i,f=i;if(i.alternate)for(;u.return;)u=u.return;else{i=u;do u=i,u.flags&4098&&(f=u.return),i=u.return;while(i)}return u.tag===3?f:null}function Y(i){if(i.tag===13){var u=i.memoizedState;if(u===null&&(i=i.alternate,i!==null&&(u=i.memoizedState)),u!==null)return u.dehydrated}return null}function M(i){if(F(i)!==i)throw Error(r(188))}function V(i){var u=i.alternate;if(!u){if(u=F(i),u===null)throw Error(r(188));return u!==i?null:i}for(var f=i,h=u;;){var S=f.return;if(S===null)break;var T=S.alternate;if(T===null){if(h=S.return,h!==null){f=h;continue}break}if(S.child===T.child){for(T=S.child;T;){if(T===f)return M(S),i;if(T===h)return M(S),u;T=T.sibling}throw Error(r(188))}if(f.return!==h.return)f=S,h=T;else{for(var z=!1,q=S.child;q;){if(q===f){z=!0,f=S,h=T;break}if(q===h){z=!0,h=S,f=T;break}q=q.sibling}if(!z){for(q=T.child;q;){if(q===f){z=!0,f=T,h=S;break}if(q===h){z=!0,h=T,f=S;break}q=q.sibling}if(!z)throw Error(r(189))}}if(f.alternate!==h)throw Error(r(190))}if(f.tag!==3)throw Error(r(188));return f.stateNode.current===f?i:u}function j(i){var u=i.tag;if(u===5||u===26||u===27||u===6)return i;for(i=i.child;i!==null;){if(u=j(i),u!==null)return u;i=i.sibling}return null}var P=Array.isArray,K=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},le=[],X=-1;function J(i){return{current:i}}function he(i){0>X||(i.current=le[X],le[X]=null,X--)}function oe(i,u){X++,le[X]=i.current,i.current=u}var Se=J(null),we=J(null),De=J(null),Ce=J(null);function Ee(i,u){switch(oe(De,u),oe(we,i),oe(Se,null),i=u.nodeType,i){case 9:case 11:u=(u=u.documentElement)&&(u=u.namespaceURI)?CC(u):0;break;default:if(i=i===8?u.parentNode:u,u=i.tagName,i=i.namespaceURI)i=CC(i),u=_C(i,u);else switch(u){case"svg":u=1;break;case"math":u=2;break;default:u=0}}he(Se),oe(Se,u)}function te(){he(Se),he(we),he(De)}function fe(i){i.memoizedState!==null&&oe(Ce,i);var u=Se.current,f=_C(u,i.type);u!==f&&(oe(we,i),oe(Se,f))}function Te(i){we.current===i&&(he(Se),he(we)),Ce.current===i&&(he(Ce),Vl._currentValue=ee)}var be=Object.prototype.hasOwnProperty,xe=e.unstable_scheduleCallback,se=e.unstable_cancelCallback,Be=e.unstable_shouldYield,je=e.unstable_requestPaint,me=e.unstable_now,Ne=e.unstable_getCurrentPriorityLevel,ne=e.unstable_ImmediatePriority,ce=e.unstable_UserBlockingPriority,_e=e.unstable_NormalPriority,ze=e.unstable_LowPriority,We=e.unstable_IdlePriority,St=e.log,Tt=e.unstable_setDisableYieldValue,bt=null,et=null;function At(i){if(et&&typeof et.onCommitFiberRoot=="function")try{et.onCommitFiberRoot(bt,i,void 0,(i.current.flags&128)===128)}catch{}}function st(i){if(typeof St=="function"&&Tt(i),et&&typeof et.setStrictMode=="function")try{et.setStrictMode(bt,i)}catch{}}var wt=Math.clz32?Math.clz32:zt,Ht=Math.log,pn=Math.LN2;function zt(i){return i>>>=0,i===0?32:31-(Ht(i)/pn|0)|0}var ir=128,Vr=4194304;function Jt(i){var u=i&42;if(u!==0)return u;switch(i&-i){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: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 i&4194176;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function pa(i,u){var f=i.pendingLanes;if(f===0)return 0;var h=0,S=i.suspendedLanes,T=i.pingedLanes,z=i.warmLanes;i=i.finishedLanes!==0;var q=f&134217727;return q!==0?(f=q&~S,f!==0?h=Jt(f):(T&=q,T!==0?h=Jt(T):i||(z=q&~z,z!==0&&(h=Jt(z))))):(q=f&~S,q!==0?h=Jt(q):T!==0?h=Jt(T):i||(z=f&~z,z!==0&&(h=Jt(z)))),h===0?0:u!==0&&u!==h&&!(u&S)&&(S=h&-h,z=u&-u,S>=z||S===32&&(z&4194176)!==0)?u:h}function Xe(i,u){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&u)===0}function yt(i,u){switch(i){case 1:case 2:case 4:case 8:return u+250;case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return u+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 Nt(){var i=ir;return ir<<=1,!(ir&4194176)&&(ir=128),i}function Ln(){var i=Vr;return Vr<<=1,!(Vr&62914560)&&(Vr=4194304),i}function _n(i){for(var u=[],f=0;31>f;f++)u.push(i);return u}function Mn(i,u){i.pendingLanes|=u,u!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function ga(i,u,f,h,S,T){var z=i.pendingLanes;i.pendingLanes=f,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=f,i.entangledLanes&=f,i.errorRecoveryDisabledLanes&=f,i.shellSuspendCounter=0;var q=i.entanglements,Z=i.expirationTimes,ae=i.hiddenUpdates;for(f=z&~f;0"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ZH=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]*$"),_A={},NA={};function QH(i){return be.call(NA,i)?!0:be.call(_A,i)?!1:ZH.test(i)?NA[i]=!0:(_A[i]=!0,!1)}function lc(i,u,f){if(QH(u))if(f===null)i.removeAttribute(u);else{switch(typeof f){case"undefined":case"function":case"symbol":i.removeAttribute(u);return;case"boolean":var h=u.toLowerCase().slice(0,5);if(h!=="data-"&&h!=="aria-"){i.removeAttribute(u);return}}i.setAttribute(u,""+f)}}function uc(i,u,f){if(f===null)i.removeAttribute(u);else{switch(typeof f){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(u);return}i.setAttribute(u,""+f)}}function ma(i,u,f,h){if(h===null)i.removeAttribute(f);else{switch(typeof h){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(f);return}i.setAttributeNS(u,f,""+h)}}function sr(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function OA(i){var u=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(u==="checkbox"||u==="radio")}function JH(i){var u=OA(i)?"checked":"value",f=Object.getOwnPropertyDescriptor(i.constructor.prototype,u),h=""+i[u];if(!i.hasOwnProperty(u)&&typeof f<"u"&&typeof f.get=="function"&&typeof f.set=="function"){var S=f.get,T=f.set;return Object.defineProperty(i,u,{configurable:!0,get:function(){return S.call(this)},set:function(z){h=""+z,T.call(this,z)}}),Object.defineProperty(i,u,{enumerable:f.enumerable}),{getValue:function(){return h},setValue:function(z){h=""+z},stopTracking:function(){i._valueTracker=null,delete i[u]}}}}function cc(i){i._valueTracker||(i._valueTracker=JH(i))}function IA(i){if(!i)return!1;var u=i._valueTracker;if(!u)return!0;var f=u.getValue(),h="";return i&&(h=OA(i)?i.checked?"true":"false":i.value),i=h,i!==f?(u.setValue(i),!0):!1}function dc(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var e$=/[\n"\\]/g;function lr(i){return i.replace(e$,function(u){return"\\"+u.charCodeAt(0).toString(16)+" "})}function qp(i,u,f,h,S,T,z,q){i.name="",z!=null&&typeof z!="function"&&typeof z!="symbol"&&typeof z!="boolean"?i.type=z:i.removeAttribute("type"),u!=null?z==="number"?(u===0&&i.value===""||i.value!=u)&&(i.value=""+sr(u)):i.value!==""+sr(u)&&(i.value=""+sr(u)):z!=="submit"&&z!=="reset"||i.removeAttribute("value"),u!=null?Vp(i,z,sr(u)):f!=null?Vp(i,z,sr(f)):h!=null&&i.removeAttribute("value"),S==null&&T!=null&&(i.defaultChecked=!!T),S!=null&&(i.checked=S&&typeof S!="function"&&typeof S!="symbol"),q!=null&&typeof q!="function"&&typeof q!="symbol"&&typeof q!="boolean"?i.name=""+sr(q):i.removeAttribute("name")}function DA(i,u,f,h,S,T,z,q){if(T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"&&(i.type=T),u!=null||f!=null){if(!(T!=="submit"&&T!=="reset"||u!=null))return;f=f!=null?""+sr(f):"",u=u!=null?""+sr(u):f,q||u===i.value||(i.value=u),i.defaultValue=u}h=h??S,h=typeof h!="function"&&typeof h!="symbol"&&!!h,i.checked=q?i.checked:!!h,i.defaultChecked=!!h,z!=null&&typeof z!="function"&&typeof z!="symbol"&&typeof z!="boolean"&&(i.name=z)}function Vp(i,u,f){u==="number"&&dc(i.ownerDocument)===i||i.defaultValue===""+f||(i.defaultValue=""+f)}function Di(i,u,f,h){if(i=i.options,u){u={};for(var S=0;S=cl),VA=" ",WA=!1;function YA(i,u){switch(i){case"keyup":return C$.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function KA(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Fi=!1;function N$(i,u){switch(i){case"compositionend":return KA(u);case"keypress":return u.which!==32?null:(WA=!0,VA);case"textInput":return i=u.data,i===VA&&WA?null:i;default:return null}}function O$(i,u){if(Fi)return i==="compositionend"||!rg&&YA(i,u)?(i=jA(),pc=Qp=Ya=null,Fi=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(u.ctrlKey||u.altKey||u.metaKey)||u.ctrlKey&&u.altKey){if(u.char&&1=u)return{node:f,offset:u-i};i=h}e:{for(;f;){if(f.nextSibling){f=f.nextSibling;break e}f=f.parentNode}f=void 0}f=r1(f)}}function o1(i,u){return i&&u?i===u?!0:i&&i.nodeType===3?!1:u&&u.nodeType===3?o1(i,u.parentNode):"contains"in i?i.contains(u):i.compareDocumentPosition?!!(i.compareDocumentPosition(u)&16):!1:!1}function i1(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var u=dc(i.document);u instanceof i.HTMLIFrameElement;){try{var f=typeof u.contentWindow.location.href=="string"}catch{f=!1}if(f)i=u.contentWindow;else break;u=dc(i.document)}return u}function ig(i){var u=i&&i.nodeName&&i.nodeName.toLowerCase();return u&&(u==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||u==="textarea"||i.contentEditable==="true")}function B$(i,u){var f=i1(u);u=i.focusedElem;var h=i.selectionRange;if(f!==u&&u&&u.ownerDocument&&o1(u.ownerDocument.documentElement,u)){if(h!==null&&ig(u)){if(i=h.start,f=h.end,f===void 0&&(f=i),"selectionStart"in u)u.selectionStart=i,u.selectionEnd=Math.min(f,u.value.length);else if(f=(i=u.ownerDocument||document)&&i.defaultView||window,f.getSelection){f=f.getSelection();var S=u.textContent.length,T=Math.min(h.start,S);h=h.end===void 0?T:Math.min(h.end,S),!f.extend&&T>h&&(S=h,h=T,T=S),S=a1(u,T);var z=a1(u,h);S&&z&&(f.rangeCount!==1||f.anchorNode!==S.node||f.anchorOffset!==S.offset||f.focusNode!==z.node||f.focusOffset!==z.offset)&&(i=i.createRange(),i.setStart(S.node,S.offset),f.removeAllRanges(),T>h?(f.addRange(i),f.extend(z.node,z.offset)):(i.setEnd(z.node,z.offset),f.addRange(i)))}}for(i=[],f=u;f=f.parentNode;)f.nodeType===1&&i.push({element:f,left:f.scrollLeft,top:f.scrollTop});for(typeof u.focus=="function"&&u.focus(),u=0;u=document.documentMode,zi=null,sg=null,gl=null,lg=!1;function s1(i,u,f){var h=f.window===f?f.document:f.nodeType===9?f:f.ownerDocument;lg||zi==null||zi!==dc(h)||(h=zi,"selectionStart"in h&&ig(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),gl&&pl(gl,h)||(gl=h,h=ed(sg,"onSelect"),0>=z,S-=z,ba=1<<32-wt(u)+S|f<Qe?(ln=Ye,Ye=null):ln=Ye.sibling;var kt=de(ie,Ye,ue[Qe],ke);if(kt===null){Ye===null&&(Ye=ln);break}i&&Ye&&kt.alternate===null&&u(ie,Ye),re=T(kt,re,Qe),ct===null?Ge=kt:ct.sibling=kt,ct=kt,Ye=ln}if(Qe===ue.length)return f(ie,Ye),xt&&Go(ie,Qe),Ge;if(Ye===null){for(;QeQe?(ln=Ye,Ye=null):ln=Ye.sibling;var ho=de(ie,Ye,kt.value,ke);if(ho===null){Ye===null&&(Ye=ln);break}i&&Ye&&ho.alternate===null&&u(ie,Ye),re=T(ho,re,Qe),ct===null?Ge=ho:ct.sibling=ho,ct=ho,Ye=ln}if(kt.done)return f(ie,Ye),xt&&Go(ie,Qe),Ge;if(Ye===null){for(;!kt.done;Qe++,kt=ue.next())kt=Ae(ie,kt.value,ke),kt!==null&&(re=T(kt,re,Qe),ct===null?Ge=kt:ct.sibling=kt,ct=kt);return xt&&Go(ie,Qe),Ge}for(Ye=h(Ye);!kt.done;Qe++,kt=ue.next())kt=ge(Ye,ie,Qe,kt.value,ke),kt!==null&&(i&&kt.alternate!==null&&Ye.delete(kt.key===null?Qe:kt.key),re=T(kt,re,Qe),ct===null?Ge=kt:ct.sibling=kt,ct=kt);return i&&Ye.forEach(function(rq){return u(ie,rq)}),xt&&Go(ie,Qe),Ge}function Vt(ie,re,ue,ke){if(typeof ue=="object"&&ue!==null&&ue.type===c&&ue.key===null&&(ue=ue.props.children),typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case s:e:{for(var Ge=ue.key;re!==null;){if(re.key===Ge){if(Ge=ue.type,Ge===c){if(re.tag===7){f(ie,re.sibling),ke=S(re,ue.props.children),ke.return=ie,ie=ke;break e}}else if(re.elementType===Ge||typeof Ge=="object"&&Ge!==null&&Ge.$$typeof===x&&k1(Ge)===re.type){f(ie,re.sibling),ke=S(re,ue.props),El(ke,ue),ke.return=ie,ie=ke;break e}f(ie,re);break}else u(ie,re);re=re.sibling}ue.type===c?(ke=Jo(ue.props.children,ie.mode,ke,ue.key),ke.return=ie,ie=ke):(ke=$c(ue.type,ue.key,ue.props,null,ie.mode,ke),El(ke,ue),ke.return=ie,ie=ke)}return z(ie);case l:e:{for(Ge=ue.key;re!==null;){if(re.key===Ge)if(re.tag===4&&re.stateNode.containerInfo===ue.containerInfo&&re.stateNode.implementation===ue.implementation){f(ie,re.sibling),ke=S(re,ue.children||[]),ke.return=ie,ie=ke;break e}else{f(ie,re);break}else u(ie,re);re=re.sibling}ke=ch(ue,ie.mode,ke),ke.return=ie,ie=ke}return z(ie);case x:return Ge=ue._init,ue=Ge(ue._payload),Vt(ie,re,ue,ke)}if(P(ue))return qe(ie,re,ue,ke);if(C(ue)){if(Ge=C(ue),typeof Ge!="function")throw Error(r(150));return ue=Ge.call(ue),rt(ie,re,ue,ke)}if(typeof ue.then=="function")return Vt(ie,re,Tc(ue),ke);if(ue.$$typeof===b)return Vt(ie,re,Uc(ie,ue),ke);Ac(ie,ue)}return typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint"?(ue=""+ue,re!==null&&re.tag===6?(f(ie,re.sibling),ke=S(re,ue),ke.return=ie,ie=ke):(f(ie,re),ke=uh(ue,ie.mode,ke),ke.return=ie,ie=ke),z(ie)):f(ie,re)}return function(ie,re,ue,ke){try{Sl=0;var Ge=Vt(ie,re,ue,ke);return $i=null,Ge}catch(Ye){if(Ye===yl)throw Ye;var ct=mr(29,Ye,null,ie.mode);return ct.lanes=ke,ct.return=ie,ct}finally{}}}var $o=T1(!0),A1=T1(!1),qi=J(null),Rc=J(0);function R1(i,u){i=_a,oe(Rc,i),oe(qi,u),_a=i|u.baseLanes}function mg(){oe(Rc,_a),oe(qi,qi.current)}function bg(){_a=Rc.current,he(qi),he(Rc)}var pr=J(null),Yr=null;function Xa(i){var u=i.alternate;oe(en,en.current&1),oe(pr,i),Yr===null&&(u===null||qi.current!==null||u.memoizedState!==null)&&(Yr=i)}function C1(i){if(i.tag===22){if(oe(en,en.current),oe(pr,i),Yr===null){var u=i.alternate;u!==null&&u.memoizedState!==null&&(Yr=i)}}else Za()}function Za(){oe(en,en.current),oe(pr,pr.current)}function va(i){he(pr),Yr===i&&(Yr=null),he(en)}var en=J(0);function Cc(i){for(var u=i;u!==null;){if(u.tag===13){var f=u.memoizedState;if(f!==null&&(f=f.dehydrated,f===null||f.data==="$?"||f.data==="$!"))return u}else if(u.tag===19&&u.memoizedProps.revealOrder!==void 0){if(u.flags&128)return u}else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===i)break;for(;u.sibling===null;){if(u.return===null||u.return===i)return null;u=u.return}u.sibling.return=u.return,u=u.sibling}return null}var $$=typeof AbortController<"u"?AbortController:function(){var i=[],u=this.signal={aborted:!1,addEventListener:function(f,h){i.push(h)}};this.abort=function(){u.aborted=!0,i.forEach(function(f){return f()})}},q$=e.unstable_scheduleCallback,V$=e.unstable_NormalPriority,tn={$$typeof:b,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function yg(){return{controller:new $$,data:new Map,refCount:0}}function wl(i){i.refCount--,i.refCount===0&&q$(V$,function(){i.controller.abort()})}var xl=null,vg=0,Vi=0,Wi=null;function W$(i,u){if(xl===null){var f=xl=[];vg=0,Vi=Th(),Wi={status:"pending",value:void 0,then:function(h){f.push(h)}}}return vg++,u.then(_1,_1),u}function _1(){if(--vg===0&&xl!==null){Wi!==null&&(Wi.status="fulfilled");var i=xl;xl=null,Vi=0,Wi=null;for(var u=0;uT?T:8;var z=I.T,q={};I.T=q,Pg(i,!1,u,f);try{var Z=S(),ae=I.S;if(ae!==null&&ae(q,Z),Z!==null&&typeof Z=="object"&&typeof Z.then=="function"){var ye=Y$(Z,h);Al(i,u,ye,Qn(i))}else Al(i,u,h,Qn(i))}catch(Ae){Al(i,u,{then:function(){},status:"rejected",reason:Ae},Qn())}finally{K.p=T,I.T=z}}function J$(){}function Lg(i,u,f,h){if(i.tag!==5)throw Error(r(476));var S=iR(i).queue;oR(i,S,u,ee,f===null?J$:function(){return sR(i),f(h)})}function iR(i){var u=i.memoizedState;if(u!==null)return u;u={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sa,lastRenderedState:ee},next:null};var f={};return u.next={memoizedState:f,baseState:f,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sa,lastRenderedState:f},next:null},i.memoizedState=u,i=i.alternate,i!==null&&(i.memoizedState=u),u}function sR(i){var u=iR(i).next.queue;Al(i,u,{},Qn())}function Mg(){return En(Vl)}function lR(){return Xt().memoizedState}function uR(){return Xt().memoizedState}function e6(i){for(var u=i.return;u!==null;){switch(u.tag){case 24:case 3:var f=Qn();i=no(f);var h=ro(u,i,f);h!==null&&(On(h,u,f),_l(h,u,f)),u={cache:yg()},i.payload=u;return}u=u.return}}function t6(i,u,f){var h=Qn();f={lane:h,revertLane:0,action:f,hasEagerState:!1,eagerState:null,next:null},Fc(i)?dR(u,f):(f=dg(i,u,f,h),f!==null&&(On(f,i,h),fR(f,u,h)))}function cR(i,u,f){var h=Qn();Al(i,u,f,h)}function Al(i,u,f,h){var S={lane:h,revertLane:0,action:f,hasEagerState:!1,eagerState:null,next:null};if(Fc(i))dR(u,S);else{var T=i.alternate;if(i.lanes===0&&(T===null||T.lanes===0)&&(T=u.lastRenderedReducer,T!==null))try{var z=u.lastRenderedState,q=T(z,f);if(S.hasEagerState=!0,S.eagerState=q,Yn(q,z))return Sc(i,u,S,0),Lt===null&&vc(),!1}catch{}finally{}if(f=dg(i,u,S,h),f!==null)return On(f,i,h),fR(f,u,h),!0}return!1}function Pg(i,u,f,h){if(h={lane:2,revertLane:Th(),action:h,hasEagerState:!1,eagerState:null,next:null},Fc(i)){if(u)throw Error(r(479))}else u=dg(i,f,h,2),u!==null&&On(u,i,2)}function Fc(i){var u=i.alternate;return i===ut||u!==null&&u===ut}function dR(i,u){Yi=Nc=!0;var f=i.pending;f===null?u.next=u:(u.next=f.next,f.next=u),i.pending=u}function fR(i,u,f){if(f&4194176){var h=u.lanes;h&=i.pendingLanes,f|=h,u.lanes=f,_r(i,f)}}var Kr={readContext:En,use:Dc,useCallback:Wt,useContext:Wt,useEffect:Wt,useImperativeHandle:Wt,useLayoutEffect:Wt,useInsertionEffect:Wt,useMemo:Wt,useReducer:Wt,useRef:Wt,useState:Wt,useDebugValue:Wt,useDeferredValue:Wt,useTransition:Wt,useSyncExternalStore:Wt,useId:Wt};Kr.useCacheRefresh=Wt,Kr.useMemoCache=Wt,Kr.useHostTransitionStatus=Wt,Kr.useFormState=Wt,Kr.useActionState=Wt,Kr.useOptimistic=Wt;var Wo={readContext:En,use:Dc,useCallback:function(i,u){return Bn().memoizedState=[i,u===void 0?null:u],i},useContext:En,useEffect:Z1,useImperativeHandle:function(i,u,f){f=f!=null?f.concat([i]):null,Mc(4194308,4,eR.bind(null,u,i),f)},useLayoutEffect:function(i,u){return Mc(4194308,4,i,u)},useInsertionEffect:function(i,u){Mc(4,2,i,u)},useMemo:function(i,u){var f=Bn();u=u===void 0?null:u;var h=i();if(Vo){st(!0);try{i()}finally{st(!1)}}return f.memoizedState=[h,u],h},useReducer:function(i,u,f){var h=Bn();if(f!==void 0){var S=f(u);if(Vo){st(!0);try{f(u)}finally{st(!1)}}}else S=u;return h.memoizedState=h.baseState=S,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:S},h.queue=i,i=i.dispatch=t6.bind(null,ut,i),[h.memoizedState,i]},useRef:function(i){var u=Bn();return i={current:i},u.memoizedState=i},useState:function(i){i=_g(i);var u=i.queue,f=cR.bind(null,ut,u);return u.dispatch=f,[i.memoizedState,f]},useDebugValue:Ig,useDeferredValue:function(i,u){var f=Bn();return Dg(f,i,u)},useTransition:function(){var i=_g(!1);return i=oR.bind(null,ut,i.queue,!0,!1),Bn().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,u,f){var h=ut,S=Bn();if(xt){if(f===void 0)throw Error(r(407));f=f()}else{if(f=u(),Lt===null)throw Error(r(349));vt&60||M1(h,u,f)}S.memoizedState=f;var T={value:f,getSnapshot:u};return S.queue=T,Z1(F1.bind(null,h,T,i),[i]),h.flags|=2048,Xi(9,P1.bind(null,h,T,f,u),{destroy:void 0},null),f},useId:function(){var i=Bn(),u=Lt.identifierPrefix;if(xt){var f=ya,h=ba;f=(h&~(1<<32-wt(h)-1)).toString(32)+f,u=":"+u+"R"+f,f=Oc++,0 title"))),mn(T,h,f),T[Sn]=i,an(T),h=T;break e;case"link":var z=BC("link","href",S).get(h+(f.href||""));if(z){for(var q=0;q<\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof h.is=="string"?S.createElement("select",{is:h.is}):S.createElement("select"),h.multiple?i.multiple=!0:h.size&&(i.size=h.size);break;default:i=typeof h.is=="string"?S.createElement(f,{is:h.is}):S.createElement(f)}}i[Sn]=u,i[Fn]=h;e:for(S=u.child;S!==null;){if(S.tag===5||S.tag===6)i.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===u)break e;for(;S.sibling===null;){if(S.return===null||S.return===u)break e;S=S.return}S.sibling.return=S.return,S=S.sibling}u.stateNode=i;e:switch(mn(i,f,h),f){case"button":case"input":case"select":case"textarea":i=!!h.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&Ra(u)}}return Bt(u),u.flags&=-16777217,null;case 6:if(i&&u.stateNode!=null)i.memoizedProps!==h&&Ra(u);else{if(typeof h!="string"&&u.stateNode===null)throw Error(r(166));if(i=De.current,hl(u)){if(i=u.stateNode,f=u.memoizedProps,h=null,S=Nn,S!==null)switch(S.tag){case 27:case 5:h=S.memoizedProps}i[Sn]=u,i=!!(i.nodeValue===f||h!==null&&h.suppressHydrationWarning===!0||RC(i.nodeValue,f)),i||Ho(u)}else i=nd(i).createTextNode(h),i[Sn]=u,u.stateNode=i}return Bt(u),null;case 13:if(h=u.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(S=hl(u),h!==null&&h.dehydrated!==null){if(i===null){if(!S)throw Error(r(318));if(S=u.memoizedState,S=S!==null?S.dehydrated:null,!S)throw Error(r(317));S[Sn]=u}else ml(),!(u.flags&128)&&(u.memoizedState=null),u.flags|=4;Bt(u),S=!1}else Or!==null&&(yh(Or),Or=null),S=!0;if(!S)return u.flags&256?(va(u),u):(va(u),null)}if(va(u),u.flags&128)return u.lanes=f,u;if(f=h!==null,i=i!==null&&i.memoizedState!==null,f){h=u.child,S=null,h.alternate!==null&&h.alternate.memoizedState!==null&&h.alternate.memoizedState.cachePool!==null&&(S=h.alternate.memoizedState.cachePool.pool);var T=null;h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(T=h.memoizedState.cachePool.pool),T!==S&&(h.flags|=2048)}return f!==i&&f&&(u.child.flags|=8192),qc(u,u.updateQueue),Bt(u),null;case 4:return te(),i===null&&_h(u.stateNode.containerInfo),Bt(u),null;case 10:return xa(u.type),Bt(u),null;case 19:if(he(en),S=u.memoizedState,S===null)return Bt(u),null;if(h=(u.flags&128)!==0,T=S.rendering,T===null)if(h)Pl(S,!1);else{if(qt!==0||i!==null&&i.flags&128)for(i=u.child;i!==null;){if(T=Cc(i),T!==null){for(u.flags|=128,Pl(S,!1),i=T.updateQueue,u.updateQueue=i,qc(u,i),u.subtreeFlags=0,i=f,f=u.child;f!==null;)tC(f,i),f=f.sibling;return oe(en,en.current&1|2),u.child}i=i.sibling}S.tail!==null&&me()>Vc&&(u.flags|=128,h=!0,Pl(S,!1),u.lanes=4194304)}else{if(!h)if(i=Cc(T),i!==null){if(u.flags|=128,h=!0,i=i.updateQueue,u.updateQueue=i,qc(u,i),Pl(S,!0),S.tail===null&&S.tailMode==="hidden"&&!T.alternate&&!xt)return Bt(u),null}else 2*me()-S.renderingStartTime>Vc&&f!==536870912&&(u.flags|=128,h=!0,Pl(S,!1),u.lanes=4194304);S.isBackwards?(T.sibling=u.child,u.child=T):(i=S.last,i!==null?i.sibling=T:u.child=T,S.last=T)}return S.tail!==null?(u=S.tail,S.rendering=u,S.tail=u.sibling,S.renderingStartTime=me(),u.sibling=null,i=en.current,oe(en,h?i&1|2:i&1),u):(Bt(u),null);case 22:case 23:return va(u),bg(),h=u.memoizedState!==null,i!==null?i.memoizedState!==null!==h&&(u.flags|=8192):h&&(u.flags|=8192),h?f&536870912&&!(u.flags&128)&&(Bt(u),u.subtreeFlags&6&&(u.flags|=8192)):Bt(u),f=u.updateQueue,f!==null&&qc(u,f.retryQueue),f=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(f=i.memoizedState.cachePool.pool),h=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(h=u.memoizedState.cachePool.pool),h!==f&&(u.flags|=2048),i!==null&&he(qo),null;case 24:return f=null,i!==null&&(f=i.memoizedState.cache),u.memoizedState.cache!==f&&(u.flags|=2048),xa(tn),Bt(u),null;case 25:return null}throw Error(r(156,u.tag))}function l6(i,u){switch(pg(u),u.tag){case 1:return i=u.flags,i&65536?(u.flags=i&-65537|128,u):null;case 3:return xa(tn),te(),i=u.flags,i&65536&&!(i&128)?(u.flags=i&-65537|128,u):null;case 26:case 27:case 5:return Te(u),null;case 13:if(va(u),i=u.memoizedState,i!==null&&i.dehydrated!==null){if(u.alternate===null)throw Error(r(340));ml()}return i=u.flags,i&65536?(u.flags=i&-65537|128,u):null;case 19:return he(en),null;case 4:return te(),null;case 10:return xa(u.type),null;case 22:case 23:return va(u),bg(),i!==null&&he(qo),i=u.flags,i&65536?(u.flags=i&-65537|128,u):null;case 24:return xa(tn),null;case 25:return null;default:return null}}function aC(i,u){switch(pg(u),u.tag){case 3:xa(tn),te();break;case 26:case 27:case 5:Te(u);break;case 4:te();break;case 13:va(u);break;case 19:he(en);break;case 10:xa(u.type);break;case 22:case 23:va(u),bg(),i!==null&&he(qo);break;case 24:xa(tn)}}var u6={getCacheForType:function(i){var u=En(tn),f=u.data.get(i);return f===void 0&&(f=i(),u.data.set(i,f)),f}},c6=typeof WeakMap=="function"?WeakMap:Map,jt=0,Lt=null,ft=null,vt=0,Mt=0,Zn=null,Ca=!1,es=!1,dh=!1,_a=0,qt=0,lo=0,ei=0,fh=0,br=0,ts=0,Fl=null,Xr=null,ph=!1,gh=0,Vc=1/0,Wc=null,uo=null,Yc=!1,ti=null,zl=0,hh=0,mh=null,Bl=0,bh=null;function Qn(){if(jt&2&&vt!==0)return vt&-vt;if(I.T!==null){var i=Vi;return i!==0?i:Th()}return TA()}function oC(){br===0&&(br=!(vt&536870912)||xt?Nt():536870912);var i=pr.current;return i!==null&&(i.flags|=32),br}function On(i,u,f){(i===Lt&&Mt===2||i.cancelPendingCommit!==null)&&(ns(i,0),Na(i,vt,br,!1)),Mn(i,f),(!(jt&2)||i!==Lt)&&(i===Lt&&(!(jt&2)&&(ei|=f),qt===4&&Na(i,vt,br,!1)),Zr(i))}function iC(i,u,f){if(jt&6)throw Error(r(327));var h=!f&&(u&60)===0&&(u&i.expiredLanes)===0||Xe(i,u),S=h?p6(i,u):Eh(i,u,!0),T=h;do{if(S===0){es&&!h&&Na(i,u,0,!1);break}else if(S===6)Na(i,u,0,!Ca);else{if(f=i.current.alternate,T&&!d6(f)){S=Eh(i,u,!1),T=!1;continue}if(S===2){if(T=u,i.errorRecoveryDisabledLanes&T)var z=0;else z=i.pendingLanes&-536870913,z=z!==0?z:z&536870912?536870912:0;if(z!==0){u=z;e:{var q=i;S=Fl;var Z=q.current.memoizedState.isDehydrated;if(Z&&(ns(q,z).flags|=256),z=Eh(q,z,!1),z!==2){if(dh&&!Z){q.errorRecoveryDisabledLanes|=T,ei|=T,S=4;break e}T=Xr,Xr=S,T!==null&&yh(T)}S=z}if(T=!1,S!==2)continue}}if(S===1){ns(i,0),Na(i,u,0,!0);break}e:{switch(h=i,S){case 0:case 1:throw Error(r(345));case 4:if((u&4194176)===u){Na(h,u,br,!Ca);break e}break;case 2:Xr=null;break;case 3:case 5:break;default:throw Error(r(329))}if(h.finishedWork=f,h.finishedLanes=u,(u&62914560)===u&&(T=gh+300-me(),10f?32:f,I.T=null,ti===null)var T=!1;else{f=mh,mh=null;var z=ti,q=zl;if(ti=null,zl=0,jt&6)throw Error(r(331));var Z=jt;if(jt|=4,JR(z.current),XR(z,z.current,q,f),jt=Z,jl(0,!1),et&&typeof et.onPostCommitFiberRoot=="function")try{et.onPostCommitFiberRoot(bt,z)}catch{}T=!0}return T}finally{K.p=S,I.T=h,hC(i,u)}}return!1}function mC(i,u,f){u=cr(f,u),u=Bg(i.stateNode,u,2),i=ro(i,u,2),i!==null&&(Mn(i,2),Zr(i))}function Ot(i,u,f){if(i.tag===3)mC(i,i,f);else for(;u!==null;){if(u.tag===3){mC(u,i,f);break}else if(u.tag===1){var h=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(uo===null||!uo.has(h))){i=cr(f,i),f=vR(2),h=ro(u,f,2),h!==null&&(SR(f,h,u,i),Mn(h,2),Zr(h));break}}u=u.return}}function wh(i,u,f){var h=i.pingCache;if(h===null){h=i.pingCache=new c6;var S=new Set;h.set(u,S)}else S=h.get(u),S===void 0&&(S=new Set,h.set(u,S));S.has(f)||(dh=!0,S.add(f),i=m6.bind(null,i,u,f),u.then(i,i))}function m6(i,u,f){var h=i.pingCache;h!==null&&h.delete(u),i.pingedLanes|=i.suspendedLanes&f,i.warmLanes&=~f,Lt===i&&(vt&f)===f&&(qt===4||qt===3&&(vt&62914560)===vt&&300>me()-gh?!(jt&2)&&ns(i,0):fh|=f,ts===vt&&(ts=0)),Zr(i)}function bC(i,u){u===0&&(u=Ln()),i=Ka(i,u),i!==null&&(Mn(i,u),Zr(i))}function b6(i){var u=i.memoizedState,f=0;u!==null&&(f=u.retryLane),bC(i,f)}function y6(i,u){var f=0;switch(i.tag){case 13:var h=i.stateNode,S=i.memoizedState;S!==null&&(f=S.retryLane);break;case 19:h=i.stateNode;break;case 22:h=i.stateNode._retryCache;break;default:throw Error(r(314))}h!==null&&h.delete(u),bC(i,f)}function v6(i,u){return xe(i,u)}var Zc=null,os=null,xh=!1,Qc=!1,kh=!1,ni=0;function Zr(i){i!==os&&i.next===null&&(os===null?Zc=os=i:os=os.next=i),Qc=!0,xh||(xh=!0,E6(S6))}function jl(i,u){if(!kh&&Qc){kh=!0;do for(var f=!1,h=Zc;h!==null;){if(i!==0){var S=h.pendingLanes;if(S===0)var T=0;else{var z=h.suspendedLanes,q=h.pingedLanes;T=(1<<31-wt(42|i)+1)-1,T&=S&~(z&~q),T=T&201326677?T&201326677|1:T?T|2:0}T!==0&&(f=!0,SC(h,T))}else T=vt,T=pa(h,h===Lt?T:0),!(T&3)||Xe(h,T)||(f=!0,SC(h,T));h=h.next}while(f);kh=!1}}function S6(){Qc=xh=!1;var i=0;ni!==0&&(_6()&&(i=ni),ni=0);for(var u=me(),f=null,h=Zc;h!==null;){var S=h.next,T=yC(h,u);T===0?(h.next=null,f===null?Zc=S:f.next=S,S===null&&(os=f)):(f=h,(i!==0||T&3)&&(Qc=!0)),h=S}jl(i)}function yC(i,u){for(var f=i.suspendedLanes,h=i.pingedLanes,S=i.expirationTimes,T=i.pendingLanes&-62914561;0"u"?null:document;function MC(i,u,f){var h=ss;if(h&&typeof u=="string"&&u){var S=lr(u);S='link[rel="'+i+'"][href="'+S+'"]',typeof f=="string"&&(S+='[crossorigin="'+f+'"]'),LC.has(S)||(LC.add(S),i={rel:i,crossOrigin:f,href:u},h.querySelector(S)===null&&(u=h.createElement("link"),mn(u,"link",i),an(u),h.head.appendChild(u)))}}function F6(i){Oa.D(i),MC("dns-prefetch",i,null)}function z6(i,u){Oa.C(i,u),MC("preconnect",i,u)}function B6(i,u,f){Oa.L(i,u,f);var h=ss;if(h&&i&&u){var S='link[rel="preload"][as="'+lr(u)+'"]';u==="image"&&f&&f.imageSrcSet?(S+='[imagesrcset="'+lr(f.imageSrcSet)+'"]',typeof f.imageSizes=="string"&&(S+='[imagesizes="'+lr(f.imageSizes)+'"]')):S+='[href="'+lr(i)+'"]';var T=S;switch(u){case"style":T=ls(i);break;case"script":T=us(i)}yr.has(T)||(i=D({rel:"preload",href:u==="image"&&f&&f.imageSrcSet?void 0:i,as:u},f),yr.set(T,i),h.querySelector(S)!==null||u==="style"&&h.querySelector(Hl(T))||u==="script"&&h.querySelector($l(T))||(u=h.createElement("link"),mn(u,"link",i),an(u),h.head.appendChild(u)))}}function j6(i,u){Oa.m(i,u);var f=ss;if(f&&i){var h=u&&typeof u.as=="string"?u.as:"script",S='link[rel="modulepreload"][as="'+lr(h)+'"][href="'+lr(i)+'"]',T=S;switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":T=us(i)}if(!yr.has(T)&&(i=D({rel:"modulepreload",href:i},u),yr.set(T,i),f.querySelector(S)===null)){switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(f.querySelector($l(T)))return}h=f.createElement("link"),mn(h,"link",i),an(h),f.head.appendChild(h)}}}function U6(i,u,f){Oa.S(i,u,f);var h=ss;if(h&&i){var S=Oi(h).hoistableStyles,T=ls(i);u=u||"default";var z=S.get(T);if(!z){var q={loading:0,preload:null};if(z=h.querySelector(Hl(T)))q.loading=5;else{i=D({rel:"stylesheet",href:i,"data-precedence":u},f),(f=yr.get(T))&&zh(i,f);var Z=z=h.createElement("link");an(Z),mn(Z,"link",i),Z._p=new Promise(function(ae,ye){Z.onload=ae,Z.onerror=ye}),Z.addEventListener("load",function(){q.loading|=1}),Z.addEventListener("error",function(){q.loading|=2}),q.loading|=4,ad(z,u,h)}z={type:"stylesheet",instance:z,count:1,state:q},S.set(T,z)}}}function G6(i,u){Oa.X(i,u);var f=ss;if(f&&i){var h=Oi(f).hoistableScripts,S=us(i),T=h.get(S);T||(T=f.querySelector($l(S)),T||(i=D({src:i,async:!0},u),(u=yr.get(S))&&Bh(i,u),T=f.createElement("script"),an(T),mn(T,"link",i),f.head.appendChild(T)),T={type:"script",instance:T,count:1,state:null},h.set(S,T))}}function H6(i,u){Oa.M(i,u);var f=ss;if(f&&i){var h=Oi(f).hoistableScripts,S=us(i),T=h.get(S);T||(T=f.querySelector($l(S)),T||(i=D({src:i,async:!0,type:"module"},u),(u=yr.get(S))&&Bh(i,u),T=f.createElement("script"),an(T),mn(T,"link",i),f.head.appendChild(T)),T={type:"script",instance:T,count:1,state:null},h.set(S,T))}}function PC(i,u,f,h){var S=(S=De.current)?rd(S):null;if(!S)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof f.precedence=="string"&&typeof f.href=="string"?(u=ls(f.href),f=Oi(S).hoistableStyles,h=f.get(u),h||(h={type:"style",instance:null,count:0,state:null},f.set(u,h)),h):{type:"void",instance:null,count:0,state:null};case"link":if(f.rel==="stylesheet"&&typeof f.href=="string"&&typeof f.precedence=="string"){i=ls(f.href);var T=Oi(S).hoistableStyles,z=T.get(i);if(z||(S=S.ownerDocument||S,z={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},T.set(i,z),(T=S.querySelector(Hl(i)))&&!T._p&&(z.instance=T,z.state.loading=5),yr.has(i)||(f={rel:"preload",as:"style",href:f.href,crossOrigin:f.crossOrigin,integrity:f.integrity,media:f.media,hrefLang:f.hrefLang,referrerPolicy:f.referrerPolicy},yr.set(i,f),T||$6(S,i,f,z.state))),u&&h===null)throw Error(r(528,""));return z}if(u&&h!==null)throw Error(r(529,""));return null;case"script":return u=f.async,f=f.src,typeof f=="string"&&u&&typeof u!="function"&&typeof u!="symbol"?(u=us(f),f=Oi(S).hoistableScripts,h=f.get(u),h||(h={type:"script",instance:null,count:0,state:null},f.set(u,h)),h):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function ls(i){return'href="'+lr(i)+'"'}function Hl(i){return'link[rel="stylesheet"]['+i+"]"}function FC(i){return D({},i,{"data-precedence":i.precedence,precedence:null})}function $6(i,u,f,h){i.querySelector('link[rel="preload"][as="style"]['+u+"]")?h.loading=1:(u=i.createElement("link"),h.preload=u,u.addEventListener("load",function(){return h.loading|=1}),u.addEventListener("error",function(){return h.loading|=2}),mn(u,"link",f),an(u),i.head.appendChild(u))}function us(i){return'[src="'+lr(i)+'"]'}function $l(i){return"script[async]"+i}function zC(i,u,f){if(u.count++,u.instance===null)switch(u.type){case"style":var h=i.querySelector('style[data-href~="'+lr(f.href)+'"]');if(h)return u.instance=h,an(h),h;var S=D({},f,{"data-href":f.href,"data-precedence":f.precedence,href:null,precedence:null});return h=(i.ownerDocument||i).createElement("style"),an(h),mn(h,"style",S),ad(h,f.precedence,i),u.instance=h;case"stylesheet":S=ls(f.href);var T=i.querySelector(Hl(S));if(T)return u.state.loading|=4,u.instance=T,an(T),T;h=FC(f),(S=yr.get(S))&&zh(h,S),T=(i.ownerDocument||i).createElement("link"),an(T);var z=T;return z._p=new Promise(function(q,Z){z.onload=q,z.onerror=Z}),mn(T,"link",h),u.state.loading|=4,ad(T,f.precedence,i),u.instance=T;case"script":return T=us(f.src),(S=i.querySelector($l(T)))?(u.instance=S,an(S),S):(h=f,(S=yr.get(T))&&(h=D({},f),Bh(h,S)),i=i.ownerDocument||i,S=i.createElement("script"),an(S),mn(S,"link",h),i.head.appendChild(S),u.instance=S);case"void":return null;default:throw Error(r(443,u.type))}else u.type==="stylesheet"&&!(u.state.loading&4)&&(h=u.instance,u.state.loading|=4,ad(h,f.precedence,i));return u.instance}function ad(i,u,f){for(var h=f.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),S=h.length?h[h.length-1]:null,T=S,z=0;z title"):null)}function q6(i,u,f){if(f===1||u.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof u.precedence!="string"||typeof u.href!="string"||u.href==="")break;return!0;case"link":if(typeof u.rel!="string"||typeof u.href!="string"||u.href===""||u.onLoad||u.onError)break;switch(u.rel){case"stylesheet":return i=u.disabled,typeof u.precedence=="string"&&i==null;default:return!0}case"script":if(u.async&&typeof u.async!="function"&&typeof u.async!="symbol"&&!u.onLoad&&!u.onError&&u.src&&typeof u.src=="string")return!0}return!1}function UC(i){return!(i.type==="stylesheet"&&!(i.state.loading&3))}var ql=null;function V6(){}function W6(i,u,f){if(ql===null)throw Error(r(475));var h=ql;if(u.type==="stylesheet"&&(typeof f.media!="string"||matchMedia(f.media).matches!==!1)&&!(u.state.loading&4)){if(u.instance===null){var S=ls(f.href),T=i.querySelector(Hl(S));if(T){i=T._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(h.count++,h=id.bind(h),i.then(h,h)),u.state.loading|=4,u.instance=T,an(T);return}T=i.ownerDocument||i,f=FC(f),(S=yr.get(S))&&zh(f,S),T=T.createElement("link"),an(T);var z=T;z._p=new Promise(function(q,Z){z.onload=q,z.onerror=Z}),mn(T,"link",f),u.instance=T}h.stylesheets===null&&(h.stylesheets=new Map),h.stylesheets.set(u,i),(i=u.state.preload)&&!(u.state.loading&3)&&(h.count++,u=id.bind(h),i.addEventListener("load",u),i.addEventListener("error",u))}}function Y6(){if(ql===null)throw Error(r(475));var i=ql;return i.stylesheets&&i.count===0&&jh(i,i.stylesheets),0"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Kh.exports=hq(),Kh.exports}var bq=mq(),Jl={},u_;function yq(){if(u_)return Jl;u_=1,Object.defineProperty(Jl,"__esModule",{value:!0}),Jl.parse=s,Jl.serialize=d;const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,n=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,r=/^[\u0020-\u003A\u003D-\u007E]*$/,a=Object.prototype.toString,o=(()=>{const m=function(){};return m.prototype=Object.create(null),m})();function s(m,b){const y=new o,v=m.length;if(v<2)return y;const k=(b==null?void 0:b.decode)||p;let A=0;do{const x=m.indexOf("=",A);if(x===-1)break;const R=m.indexOf(";",A),O=R===-1?v:R;if(x>O){A=m.lastIndexOf(";",x-1)+1;continue}const N=l(m,A,x),C=c(m,x,N),_=m.slice(N,C);if(y[_]===void 0){let L=l(m,x+1,O),I=c(m,O,L);const D=k(m.slice(L,I));y[_]=D}A=O+1}while(Ay;){const v=m.charCodeAt(--b);if(v!==32&&v!==9)return b+1}return y}function d(m,b,y){const v=(y==null?void 0:y.encode)||encodeURIComponent;if(!e.test(m))throw new TypeError(`argument name is invalid: ${m}`);const k=v(b);if(!t.test(k))throw new TypeError(`argument val is invalid: ${b}`);let A=m+"="+k;if(!y)return A;if(y.maxAge!==void 0){if(!Number.isInteger(y.maxAge))throw new TypeError(`option maxAge is invalid: ${y.maxAge}`);A+="; Max-Age="+y.maxAge}if(y.domain){if(!n.test(y.domain))throw new TypeError(`option domain is invalid: ${y.domain}`);A+="; Domain="+y.domain}if(y.path){if(!r.test(y.path))throw new TypeError(`option path is invalid: ${y.path}`);A+="; Path="+y.path}if(y.expires){if(!g(y.expires)||!Number.isFinite(y.expires.valueOf()))throw new TypeError(`option expires is invalid: ${y.expires}`);A+="; Expires="+y.expires.toUTCString()}if(y.httpOnly&&(A+="; HttpOnly"),y.secure&&(A+="; Secure"),y.partitioned&&(A+="; Partitioned"),y.priority)switch(typeof y.priority=="string"?y.priority.toLowerCase():void 0){case"low":A+="; Priority=Low";break;case"medium":A+="; Priority=Medium";break;case"high":A+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${y.priority}`)}if(y.sameSite)switch(typeof y.sameSite=="string"?y.sameSite.toLowerCase():y.sameSite){case!0:case"strict":A+="; SameSite=Strict";break;case"lax":A+="; SameSite=Lax";break;case"none":A+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${y.sameSite}`)}return A}function p(m){if(m.indexOf("%")===-1)return m;try{return decodeURIComponent(m)}catch{return m}}function g(m){return a.call(m)==="[object Date]"}return Jl}yq();/** +`+f.stack}}function F(i){var u=i,f=i;if(i.alternate)for(;u.return;)u=u.return;else{i=u;do u=i,u.flags&4098&&(f=u.return),i=u.return;while(i)}return u.tag===3?f:null}function Y(i){if(i.tag===13){var u=i.memoizedState;if(u===null&&(i=i.alternate,i!==null&&(u=i.memoizedState)),u!==null)return u.dehydrated}return null}function M(i){if(F(i)!==i)throw Error(r(188))}function V(i){var u=i.alternate;if(!u){if(u=F(i),u===null)throw Error(r(188));return u!==i?null:i}for(var f=i,h=u;;){var S=f.return;if(S===null)break;var T=S.alternate;if(T===null){if(h=S.return,h!==null){f=h;continue}break}if(S.child===T.child){for(T=S.child;T;){if(T===f)return M(S),i;if(T===h)return M(S),u;T=T.sibling}throw Error(r(188))}if(f.return!==h.return)f=S,h=T;else{for(var z=!1,q=S.child;q;){if(q===f){z=!0,f=S,h=T;break}if(q===h){z=!0,h=S,f=T;break}q=q.sibling}if(!z){for(q=T.child;q;){if(q===f){z=!0,f=T,h=S;break}if(q===h){z=!0,h=T,f=S;break}q=q.sibling}if(!z)throw Error(r(189))}}if(f.alternate!==h)throw Error(r(190))}if(f.tag!==3)throw Error(r(188));return f.stateNode.current===f?i:u}function j(i){var u=i.tag;if(u===5||u===26||u===27||u===6)return i;for(i=i.child;i!==null;){if(u=j(i),u!==null)return u;i=i.sibling}return null}var P=Array.isArray,Z=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J={pending:!1,data:null,method:null,action:null},ie=[],K=-1;function ee(i){return{current:i}}function he(i){0>K||(i.current=ie[K],ie[K]=null,K--)}function oe(i,u){K++,ie[K]=i.current,i.current=u}var Se=ee(null),we=ee(null),De=ee(null),Ce=ee(null);function Ee(i,u){switch(oe(De,u),oe(we,i),oe(Se,null),i=u.nodeType,i){case 9:case 11:u=(u=u.documentElement)&&(u=u.namespaceURI)?CC(u):0;break;default:if(i=i===8?u.parentNode:u,u=i.tagName,i=i.namespaceURI)i=CC(i),u=_C(i,u);else switch(u){case"svg":u=1;break;case"math":u=2;break;default:u=0}}he(Se),oe(Se,u)}function te(){he(Se),he(we),he(De)}function fe(i){i.memoizedState!==null&&oe(Ce,i);var u=Se.current,f=_C(u,i.type);u!==f&&(oe(we,i),oe(Se,f))}function Te(i){we.current===i&&(he(Se),he(we)),Ce.current===i&&(he(Ce),Vl._currentValue=J)}var be=Object.prototype.hasOwnProperty,xe=e.unstable_scheduleCallback,le=e.unstable_cancelCallback,Be=e.unstable_shouldYield,je=e.unstable_requestPaint,me=e.unstable_now,Ne=e.unstable_getCurrentPriorityLevel,ne=e.unstable_ImmediatePriority,ce=e.unstable_UserBlockingPriority,_e=e.unstable_NormalPriority,Fe=e.unstable_LowPriority,We=e.unstable_IdlePriority,St=e.log,Tt=e.unstable_setDisableYieldValue,bt=null,et=null;function At(i){if(et&&typeof et.onCommitFiberRoot=="function")try{et.onCommitFiberRoot(bt,i,void 0,(i.current.flags&128)===128)}catch{}}function st(i){if(typeof St=="function"&&Tt(i),et&&typeof et.setStrictMode=="function")try{et.setStrictMode(bt,i)}catch{}}var wt=Math.clz32?Math.clz32:zt,Ht=Math.log,pn=Math.LN2;function zt(i){return i>>>=0,i===0?32:31-(Ht(i)/pn|0)|0}var ir=128,Vr=4194304;function Jt(i){var u=i&42;if(u!==0)return u;switch(i&-i){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: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 i&4194176;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function pa(i,u){var f=i.pendingLanes;if(f===0)return 0;var h=0,S=i.suspendedLanes,T=i.pingedLanes,z=i.warmLanes;i=i.finishedLanes!==0;var q=f&134217727;return q!==0?(f=q&~S,f!==0?h=Jt(f):(T&=q,T!==0?h=Jt(T):i||(z=q&~z,z!==0&&(h=Jt(z))))):(q=f&~S,q!==0?h=Jt(q):T!==0?h=Jt(T):i||(z=f&~z,z!==0&&(h=Jt(z)))),h===0?0:u!==0&&u!==h&&!(u&S)&&(S=h&-h,z=u&-u,S>=z||S===32&&(z&4194176)!==0)?u:h}function Xe(i,u){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&u)===0}function yt(i,u){switch(i){case 1:case 2:case 4:case 8:return u+250;case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return u+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 Nt(){var i=ir;return ir<<=1,!(ir&4194176)&&(ir=128),i}function Ln(){var i=Vr;return Vr<<=1,!(Vr&62914560)&&(Vr=4194304),i}function _n(i){for(var u=[],f=0;31>f;f++)u.push(i);return u}function Mn(i,u){i.pendingLanes|=u,u!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function ga(i,u,f,h,S,T){var z=i.pendingLanes;i.pendingLanes=f,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=f,i.entangledLanes&=f,i.errorRecoveryDisabledLanes&=f,i.shellSuspendCounter=0;var q=i.entanglements,X=i.expirationTimes,ae=i.hiddenUpdates;for(f=z&~f;0"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ZH=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]*$"),_A={},NA={};function QH(i){return be.call(NA,i)?!0:be.call(_A,i)?!1:ZH.test(i)?NA[i]=!0:(_A[i]=!0,!1)}function lc(i,u,f){if(QH(u))if(f===null)i.removeAttribute(u);else{switch(typeof f){case"undefined":case"function":case"symbol":i.removeAttribute(u);return;case"boolean":var h=u.toLowerCase().slice(0,5);if(h!=="data-"&&h!=="aria-"){i.removeAttribute(u);return}}i.setAttribute(u,""+f)}}function uc(i,u,f){if(f===null)i.removeAttribute(u);else{switch(typeof f){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(u);return}i.setAttribute(u,""+f)}}function ma(i,u,f,h){if(h===null)i.removeAttribute(f);else{switch(typeof h){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(f);return}i.setAttributeNS(u,f,""+h)}}function sr(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function OA(i){var u=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(u==="checkbox"||u==="radio")}function JH(i){var u=OA(i)?"checked":"value",f=Object.getOwnPropertyDescriptor(i.constructor.prototype,u),h=""+i[u];if(!i.hasOwnProperty(u)&&typeof f<"u"&&typeof f.get=="function"&&typeof f.set=="function"){var S=f.get,T=f.set;return Object.defineProperty(i,u,{configurable:!0,get:function(){return S.call(this)},set:function(z){h=""+z,T.call(this,z)}}),Object.defineProperty(i,u,{enumerable:f.enumerable}),{getValue:function(){return h},setValue:function(z){h=""+z},stopTracking:function(){i._valueTracker=null,delete i[u]}}}}function cc(i){i._valueTracker||(i._valueTracker=JH(i))}function IA(i){if(!i)return!1;var u=i._valueTracker;if(!u)return!0;var f=u.getValue(),h="";return i&&(h=OA(i)?i.checked?"true":"false":i.value),i=h,i!==f?(u.setValue(i),!0):!1}function dc(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var e$=/[\n"\\]/g;function lr(i){return i.replace(e$,function(u){return"\\"+u.charCodeAt(0).toString(16)+" "})}function qp(i,u,f,h,S,T,z,q){i.name="",z!=null&&typeof z!="function"&&typeof z!="symbol"&&typeof z!="boolean"?i.type=z:i.removeAttribute("type"),u!=null?z==="number"?(u===0&&i.value===""||i.value!=u)&&(i.value=""+sr(u)):i.value!==""+sr(u)&&(i.value=""+sr(u)):z!=="submit"&&z!=="reset"||i.removeAttribute("value"),u!=null?Vp(i,z,sr(u)):f!=null?Vp(i,z,sr(f)):h!=null&&i.removeAttribute("value"),S==null&&T!=null&&(i.defaultChecked=!!T),S!=null&&(i.checked=S&&typeof S!="function"&&typeof S!="symbol"),q!=null&&typeof q!="function"&&typeof q!="symbol"&&typeof q!="boolean"?i.name=""+sr(q):i.removeAttribute("name")}function DA(i,u,f,h,S,T,z,q){if(T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"&&(i.type=T),u!=null||f!=null){if(!(T!=="submit"&&T!=="reset"||u!=null))return;f=f!=null?""+sr(f):"",u=u!=null?""+sr(u):f,q||u===i.value||(i.value=u),i.defaultValue=u}h=h??S,h=typeof h!="function"&&typeof h!="symbol"&&!!h,i.checked=q?i.checked:!!h,i.defaultChecked=!!h,z!=null&&typeof z!="function"&&typeof z!="symbol"&&typeof z!="boolean"&&(i.name=z)}function Vp(i,u,f){u==="number"&&dc(i.ownerDocument)===i||i.defaultValue===""+f||(i.defaultValue=""+f)}function Di(i,u,f,h){if(i=i.options,u){u={};for(var S=0;S=cl),VA=" ",WA=!1;function YA(i,u){switch(i){case"keyup":return C$.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function KA(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Fi=!1;function N$(i,u){switch(i){case"compositionend":return KA(u);case"keypress":return u.which!==32?null:(WA=!0,VA);case"textInput":return i=u.data,i===VA&&WA?null:i;default:return null}}function O$(i,u){if(Fi)return i==="compositionend"||!rg&&YA(i,u)?(i=jA(),pc=Qp=Ya=null,Fi=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(u.ctrlKey||u.altKey||u.metaKey)||u.ctrlKey&&u.altKey){if(u.char&&1=u)return{node:f,offset:u-i};i=h}e:{for(;f;){if(f.nextSibling){f=f.nextSibling;break e}f=f.parentNode}f=void 0}f=r1(f)}}function o1(i,u){return i&&u?i===u?!0:i&&i.nodeType===3?!1:u&&u.nodeType===3?o1(i,u.parentNode):"contains"in i?i.contains(u):i.compareDocumentPosition?!!(i.compareDocumentPosition(u)&16):!1:!1}function i1(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var u=dc(i.document);u instanceof i.HTMLIFrameElement;){try{var f=typeof u.contentWindow.location.href=="string"}catch{f=!1}if(f)i=u.contentWindow;else break;u=dc(i.document)}return u}function ig(i){var u=i&&i.nodeName&&i.nodeName.toLowerCase();return u&&(u==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||u==="textarea"||i.contentEditable==="true")}function B$(i,u){var f=i1(u);u=i.focusedElem;var h=i.selectionRange;if(f!==u&&u&&u.ownerDocument&&o1(u.ownerDocument.documentElement,u)){if(h!==null&&ig(u)){if(i=h.start,f=h.end,f===void 0&&(f=i),"selectionStart"in u)u.selectionStart=i,u.selectionEnd=Math.min(f,u.value.length);else if(f=(i=u.ownerDocument||document)&&i.defaultView||window,f.getSelection){f=f.getSelection();var S=u.textContent.length,T=Math.min(h.start,S);h=h.end===void 0?T:Math.min(h.end,S),!f.extend&&T>h&&(S=h,h=T,T=S),S=a1(u,T);var z=a1(u,h);S&&z&&(f.rangeCount!==1||f.anchorNode!==S.node||f.anchorOffset!==S.offset||f.focusNode!==z.node||f.focusOffset!==z.offset)&&(i=i.createRange(),i.setStart(S.node,S.offset),f.removeAllRanges(),T>h?(f.addRange(i),f.extend(z.node,z.offset)):(i.setEnd(z.node,z.offset),f.addRange(i)))}}for(i=[],f=u;f=f.parentNode;)f.nodeType===1&&i.push({element:f,left:f.scrollLeft,top:f.scrollTop});for(typeof u.focus=="function"&&u.focus(),u=0;u=document.documentMode,zi=null,sg=null,gl=null,lg=!1;function s1(i,u,f){var h=f.window===f?f.document:f.nodeType===9?f:f.ownerDocument;lg||zi==null||zi!==dc(h)||(h=zi,"selectionStart"in h&&ig(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),gl&&pl(gl,h)||(gl=h,h=ed(sg,"onSelect"),0>=z,S-=z,ba=1<<32-wt(u)+S|f<Qe?(ln=Ye,Ye=null):ln=Ye.sibling;var kt=de(se,Ye,ue[Qe],ke);if(kt===null){Ye===null&&(Ye=ln);break}i&&Ye&&kt.alternate===null&&u(se,Ye),re=T(kt,re,Qe),ct===null?Ge=kt:ct.sibling=kt,ct=kt,Ye=ln}if(Qe===ue.length)return f(se,Ye),xt&&Go(se,Qe),Ge;if(Ye===null){for(;QeQe?(ln=Ye,Ye=null):ln=Ye.sibling;var ho=de(se,Ye,kt.value,ke);if(ho===null){Ye===null&&(Ye=ln);break}i&&Ye&&ho.alternate===null&&u(se,Ye),re=T(ho,re,Qe),ct===null?Ge=ho:ct.sibling=ho,ct=ho,Ye=ln}if(kt.done)return f(se,Ye),xt&&Go(se,Qe),Ge;if(Ye===null){for(;!kt.done;Qe++,kt=ue.next())kt=Ae(se,kt.value,ke),kt!==null&&(re=T(kt,re,Qe),ct===null?Ge=kt:ct.sibling=kt,ct=kt);return xt&&Go(se,Qe),Ge}for(Ye=h(Ye);!kt.done;Qe++,kt=ue.next())kt=ge(Ye,se,Qe,kt.value,ke),kt!==null&&(i&&kt.alternate!==null&&Ye.delete(kt.key===null?Qe:kt.key),re=T(kt,re,Qe),ct===null?Ge=kt:ct.sibling=kt,ct=kt);return i&&Ye.forEach(function(rq){return u(se,rq)}),xt&&Go(se,Qe),Ge}function Vt(se,re,ue,ke){if(typeof ue=="object"&&ue!==null&&ue.type===c&&ue.key===null&&(ue=ue.props.children),typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case s:e:{for(var Ge=ue.key;re!==null;){if(re.key===Ge){if(Ge=ue.type,Ge===c){if(re.tag===7){f(se,re.sibling),ke=S(re,ue.props.children),ke.return=se,se=ke;break e}}else if(re.elementType===Ge||typeof Ge=="object"&&Ge!==null&&Ge.$$typeof===x&&k1(Ge)===re.type){f(se,re.sibling),ke=S(re,ue.props),El(ke,ue),ke.return=se,se=ke;break e}f(se,re);break}else u(se,re);re=re.sibling}ue.type===c?(ke=Jo(ue.props.children,se.mode,ke,ue.key),ke.return=se,se=ke):(ke=$c(ue.type,ue.key,ue.props,null,se.mode,ke),El(ke,ue),ke.return=se,se=ke)}return z(se);case l:e:{for(Ge=ue.key;re!==null;){if(re.key===Ge)if(re.tag===4&&re.stateNode.containerInfo===ue.containerInfo&&re.stateNode.implementation===ue.implementation){f(se,re.sibling),ke=S(re,ue.children||[]),ke.return=se,se=ke;break e}else{f(se,re);break}else u(se,re);re=re.sibling}ke=ch(ue,se.mode,ke),ke.return=se,se=ke}return z(se);case x:return Ge=ue._init,ue=Ge(ue._payload),Vt(se,re,ue,ke)}if(P(ue))return qe(se,re,ue,ke);if(C(ue)){if(Ge=C(ue),typeof Ge!="function")throw Error(r(150));return ue=Ge.call(ue),rt(se,re,ue,ke)}if(typeof ue.then=="function")return Vt(se,re,Tc(ue),ke);if(ue.$$typeof===b)return Vt(se,re,Uc(se,ue),ke);Ac(se,ue)}return typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint"?(ue=""+ue,re!==null&&re.tag===6?(f(se,re.sibling),ke=S(re,ue),ke.return=se,se=ke):(f(se,re),ke=uh(ue,se.mode,ke),ke.return=se,se=ke),z(se)):f(se,re)}return function(se,re,ue,ke){try{Sl=0;var Ge=Vt(se,re,ue,ke);return $i=null,Ge}catch(Ye){if(Ye===yl)throw Ye;var ct=mr(29,Ye,null,se.mode);return ct.lanes=ke,ct.return=se,ct}finally{}}}var $o=T1(!0),A1=T1(!1),qi=ee(null),Rc=ee(0);function R1(i,u){i=_a,oe(Rc,i),oe(qi,u),_a=i|u.baseLanes}function mg(){oe(Rc,_a),oe(qi,qi.current)}function bg(){_a=Rc.current,he(qi),he(Rc)}var pr=ee(null),Yr=null;function Xa(i){var u=i.alternate;oe(en,en.current&1),oe(pr,i),Yr===null&&(u===null||qi.current!==null||u.memoizedState!==null)&&(Yr=i)}function C1(i){if(i.tag===22){if(oe(en,en.current),oe(pr,i),Yr===null){var u=i.alternate;u!==null&&u.memoizedState!==null&&(Yr=i)}}else Za()}function Za(){oe(en,en.current),oe(pr,pr.current)}function va(i){he(pr),Yr===i&&(Yr=null),he(en)}var en=ee(0);function Cc(i){for(var u=i;u!==null;){if(u.tag===13){var f=u.memoizedState;if(f!==null&&(f=f.dehydrated,f===null||f.data==="$?"||f.data==="$!"))return u}else if(u.tag===19&&u.memoizedProps.revealOrder!==void 0){if(u.flags&128)return u}else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===i)break;for(;u.sibling===null;){if(u.return===null||u.return===i)return null;u=u.return}u.sibling.return=u.return,u=u.sibling}return null}var $$=typeof AbortController<"u"?AbortController:function(){var i=[],u=this.signal={aborted:!1,addEventListener:function(f,h){i.push(h)}};this.abort=function(){u.aborted=!0,i.forEach(function(f){return f()})}},q$=e.unstable_scheduleCallback,V$=e.unstable_NormalPriority,tn={$$typeof:b,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function yg(){return{controller:new $$,data:new Map,refCount:0}}function wl(i){i.refCount--,i.refCount===0&&q$(V$,function(){i.controller.abort()})}var xl=null,vg=0,Vi=0,Wi=null;function W$(i,u){if(xl===null){var f=xl=[];vg=0,Vi=Th(),Wi={status:"pending",value:void 0,then:function(h){f.push(h)}}}return vg++,u.then(_1,_1),u}function _1(){if(--vg===0&&xl!==null){Wi!==null&&(Wi.status="fulfilled");var i=xl;xl=null,Vi=0,Wi=null;for(var u=0;uT?T:8;var z=I.T,q={};I.T=q,Pg(i,!1,u,f);try{var X=S(),ae=I.S;if(ae!==null&&ae(q,X),X!==null&&typeof X=="object"&&typeof X.then=="function"){var ye=Y$(X,h);Al(i,u,ye,Qn(i))}else Al(i,u,h,Qn(i))}catch(Ae){Al(i,u,{then:function(){},status:"rejected",reason:Ae},Qn())}finally{Z.p=T,I.T=z}}function J$(){}function Lg(i,u,f,h){if(i.tag!==5)throw Error(r(476));var S=iR(i).queue;oR(i,S,u,J,f===null?J$:function(){return sR(i),f(h)})}function iR(i){var u=i.memoizedState;if(u!==null)return u;u={memoizedState:J,baseState:J,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sa,lastRenderedState:J},next:null};var f={};return u.next={memoizedState:f,baseState:f,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sa,lastRenderedState:f},next:null},i.memoizedState=u,i=i.alternate,i!==null&&(i.memoizedState=u),u}function sR(i){var u=iR(i).next.queue;Al(i,u,{},Qn())}function Mg(){return En(Vl)}function lR(){return Xt().memoizedState}function uR(){return Xt().memoizedState}function e6(i){for(var u=i.return;u!==null;){switch(u.tag){case 24:case 3:var f=Qn();i=no(f);var h=ro(u,i,f);h!==null&&(On(h,u,f),_l(h,u,f)),u={cache:yg()},i.payload=u;return}u=u.return}}function t6(i,u,f){var h=Qn();f={lane:h,revertLane:0,action:f,hasEagerState:!1,eagerState:null,next:null},Fc(i)?dR(u,f):(f=dg(i,u,f,h),f!==null&&(On(f,i,h),fR(f,u,h)))}function cR(i,u,f){var h=Qn();Al(i,u,f,h)}function Al(i,u,f,h){var S={lane:h,revertLane:0,action:f,hasEagerState:!1,eagerState:null,next:null};if(Fc(i))dR(u,S);else{var T=i.alternate;if(i.lanes===0&&(T===null||T.lanes===0)&&(T=u.lastRenderedReducer,T!==null))try{var z=u.lastRenderedState,q=T(z,f);if(S.hasEagerState=!0,S.eagerState=q,Yn(q,z))return Sc(i,u,S,0),Lt===null&&vc(),!1}catch{}finally{}if(f=dg(i,u,S,h),f!==null)return On(f,i,h),fR(f,u,h),!0}return!1}function Pg(i,u,f,h){if(h={lane:2,revertLane:Th(),action:h,hasEagerState:!1,eagerState:null,next:null},Fc(i)){if(u)throw Error(r(479))}else u=dg(i,f,h,2),u!==null&&On(u,i,2)}function Fc(i){var u=i.alternate;return i===ut||u!==null&&u===ut}function dR(i,u){Yi=Nc=!0;var f=i.pending;f===null?u.next=u:(u.next=f.next,f.next=u),i.pending=u}function fR(i,u,f){if(f&4194176){var h=u.lanes;h&=i.pendingLanes,f|=h,u.lanes=f,_r(i,f)}}var Kr={readContext:En,use:Dc,useCallback:Wt,useContext:Wt,useEffect:Wt,useImperativeHandle:Wt,useLayoutEffect:Wt,useInsertionEffect:Wt,useMemo:Wt,useReducer:Wt,useRef:Wt,useState:Wt,useDebugValue:Wt,useDeferredValue:Wt,useTransition:Wt,useSyncExternalStore:Wt,useId:Wt};Kr.useCacheRefresh=Wt,Kr.useMemoCache=Wt,Kr.useHostTransitionStatus=Wt,Kr.useFormState=Wt,Kr.useActionState=Wt,Kr.useOptimistic=Wt;var Wo={readContext:En,use:Dc,useCallback:function(i,u){return Bn().memoizedState=[i,u===void 0?null:u],i},useContext:En,useEffect:Z1,useImperativeHandle:function(i,u,f){f=f!=null?f.concat([i]):null,Mc(4194308,4,eR.bind(null,u,i),f)},useLayoutEffect:function(i,u){return Mc(4194308,4,i,u)},useInsertionEffect:function(i,u){Mc(4,2,i,u)},useMemo:function(i,u){var f=Bn();u=u===void 0?null:u;var h=i();if(Vo){st(!0);try{i()}finally{st(!1)}}return f.memoizedState=[h,u],h},useReducer:function(i,u,f){var h=Bn();if(f!==void 0){var S=f(u);if(Vo){st(!0);try{f(u)}finally{st(!1)}}}else S=u;return h.memoizedState=h.baseState=S,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:S},h.queue=i,i=i.dispatch=t6.bind(null,ut,i),[h.memoizedState,i]},useRef:function(i){var u=Bn();return i={current:i},u.memoizedState=i},useState:function(i){i=_g(i);var u=i.queue,f=cR.bind(null,ut,u);return u.dispatch=f,[i.memoizedState,f]},useDebugValue:Ig,useDeferredValue:function(i,u){var f=Bn();return Dg(f,i,u)},useTransition:function(){var i=_g(!1);return i=oR.bind(null,ut,i.queue,!0,!1),Bn().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,u,f){var h=ut,S=Bn();if(xt){if(f===void 0)throw Error(r(407));f=f()}else{if(f=u(),Lt===null)throw Error(r(349));vt&60||M1(h,u,f)}S.memoizedState=f;var T={value:f,getSnapshot:u};return S.queue=T,Z1(F1.bind(null,h,T,i),[i]),h.flags|=2048,Xi(9,P1.bind(null,h,T,f,u),{destroy:void 0},null),f},useId:function(){var i=Bn(),u=Lt.identifierPrefix;if(xt){var f=ya,h=ba;f=(h&~(1<<32-wt(h)-1)).toString(32)+f,u=":"+u+"R"+f,f=Oc++,0 title"))),mn(T,h,f),T[Sn]=i,an(T),h=T;break e;case"link":var z=BC("link","href",S).get(h+(f.href||""));if(z){for(var q=0;q<\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof h.is=="string"?S.createElement("select",{is:h.is}):S.createElement("select"),h.multiple?i.multiple=!0:h.size&&(i.size=h.size);break;default:i=typeof h.is=="string"?S.createElement(f,{is:h.is}):S.createElement(f)}}i[Sn]=u,i[Fn]=h;e:for(S=u.child;S!==null;){if(S.tag===5||S.tag===6)i.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===u)break e;for(;S.sibling===null;){if(S.return===null||S.return===u)break e;S=S.return}S.sibling.return=S.return,S=S.sibling}u.stateNode=i;e:switch(mn(i,f,h),f){case"button":case"input":case"select":case"textarea":i=!!h.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&Ra(u)}}return Bt(u),u.flags&=-16777217,null;case 6:if(i&&u.stateNode!=null)i.memoizedProps!==h&&Ra(u);else{if(typeof h!="string"&&u.stateNode===null)throw Error(r(166));if(i=De.current,hl(u)){if(i=u.stateNode,f=u.memoizedProps,h=null,S=Nn,S!==null)switch(S.tag){case 27:case 5:h=S.memoizedProps}i[Sn]=u,i=!!(i.nodeValue===f||h!==null&&h.suppressHydrationWarning===!0||RC(i.nodeValue,f)),i||Ho(u)}else i=nd(i).createTextNode(h),i[Sn]=u,u.stateNode=i}return Bt(u),null;case 13:if(h=u.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(S=hl(u),h!==null&&h.dehydrated!==null){if(i===null){if(!S)throw Error(r(318));if(S=u.memoizedState,S=S!==null?S.dehydrated:null,!S)throw Error(r(317));S[Sn]=u}else ml(),!(u.flags&128)&&(u.memoizedState=null),u.flags|=4;Bt(u),S=!1}else Or!==null&&(yh(Or),Or=null),S=!0;if(!S)return u.flags&256?(va(u),u):(va(u),null)}if(va(u),u.flags&128)return u.lanes=f,u;if(f=h!==null,i=i!==null&&i.memoizedState!==null,f){h=u.child,S=null,h.alternate!==null&&h.alternate.memoizedState!==null&&h.alternate.memoizedState.cachePool!==null&&(S=h.alternate.memoizedState.cachePool.pool);var T=null;h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(T=h.memoizedState.cachePool.pool),T!==S&&(h.flags|=2048)}return f!==i&&f&&(u.child.flags|=8192),qc(u,u.updateQueue),Bt(u),null;case 4:return te(),i===null&&_h(u.stateNode.containerInfo),Bt(u),null;case 10:return xa(u.type),Bt(u),null;case 19:if(he(en),S=u.memoizedState,S===null)return Bt(u),null;if(h=(u.flags&128)!==0,T=S.rendering,T===null)if(h)Pl(S,!1);else{if(qt!==0||i!==null&&i.flags&128)for(i=u.child;i!==null;){if(T=Cc(i),T!==null){for(u.flags|=128,Pl(S,!1),i=T.updateQueue,u.updateQueue=i,qc(u,i),u.subtreeFlags=0,i=f,f=u.child;f!==null;)tC(f,i),f=f.sibling;return oe(en,en.current&1|2),u.child}i=i.sibling}S.tail!==null&&me()>Vc&&(u.flags|=128,h=!0,Pl(S,!1),u.lanes=4194304)}else{if(!h)if(i=Cc(T),i!==null){if(u.flags|=128,h=!0,i=i.updateQueue,u.updateQueue=i,qc(u,i),Pl(S,!0),S.tail===null&&S.tailMode==="hidden"&&!T.alternate&&!xt)return Bt(u),null}else 2*me()-S.renderingStartTime>Vc&&f!==536870912&&(u.flags|=128,h=!0,Pl(S,!1),u.lanes=4194304);S.isBackwards?(T.sibling=u.child,u.child=T):(i=S.last,i!==null?i.sibling=T:u.child=T,S.last=T)}return S.tail!==null?(u=S.tail,S.rendering=u,S.tail=u.sibling,S.renderingStartTime=me(),u.sibling=null,i=en.current,oe(en,h?i&1|2:i&1),u):(Bt(u),null);case 22:case 23:return va(u),bg(),h=u.memoizedState!==null,i!==null?i.memoizedState!==null!==h&&(u.flags|=8192):h&&(u.flags|=8192),h?f&536870912&&!(u.flags&128)&&(Bt(u),u.subtreeFlags&6&&(u.flags|=8192)):Bt(u),f=u.updateQueue,f!==null&&qc(u,f.retryQueue),f=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(f=i.memoizedState.cachePool.pool),h=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(h=u.memoizedState.cachePool.pool),h!==f&&(u.flags|=2048),i!==null&&he(qo),null;case 24:return f=null,i!==null&&(f=i.memoizedState.cache),u.memoizedState.cache!==f&&(u.flags|=2048),xa(tn),Bt(u),null;case 25:return null}throw Error(r(156,u.tag))}function l6(i,u){switch(pg(u),u.tag){case 1:return i=u.flags,i&65536?(u.flags=i&-65537|128,u):null;case 3:return xa(tn),te(),i=u.flags,i&65536&&!(i&128)?(u.flags=i&-65537|128,u):null;case 26:case 27:case 5:return Te(u),null;case 13:if(va(u),i=u.memoizedState,i!==null&&i.dehydrated!==null){if(u.alternate===null)throw Error(r(340));ml()}return i=u.flags,i&65536?(u.flags=i&-65537|128,u):null;case 19:return he(en),null;case 4:return te(),null;case 10:return xa(u.type),null;case 22:case 23:return va(u),bg(),i!==null&&he(qo),i=u.flags,i&65536?(u.flags=i&-65537|128,u):null;case 24:return xa(tn),null;case 25:return null;default:return null}}function aC(i,u){switch(pg(u),u.tag){case 3:xa(tn),te();break;case 26:case 27:case 5:Te(u);break;case 4:te();break;case 13:va(u);break;case 19:he(en);break;case 10:xa(u.type);break;case 22:case 23:va(u),bg(),i!==null&&he(qo);break;case 24:xa(tn)}}var u6={getCacheForType:function(i){var u=En(tn),f=u.data.get(i);return f===void 0&&(f=i(),u.data.set(i,f)),f}},c6=typeof WeakMap=="function"?WeakMap:Map,jt=0,Lt=null,ft=null,vt=0,Mt=0,Zn=null,Ca=!1,es=!1,dh=!1,_a=0,qt=0,lo=0,ei=0,fh=0,br=0,ts=0,Fl=null,Xr=null,ph=!1,gh=0,Vc=1/0,Wc=null,uo=null,Yc=!1,ti=null,zl=0,hh=0,mh=null,Bl=0,bh=null;function Qn(){if(jt&2&&vt!==0)return vt&-vt;if(I.T!==null){var i=Vi;return i!==0?i:Th()}return TA()}function oC(){br===0&&(br=!(vt&536870912)||xt?Nt():536870912);var i=pr.current;return i!==null&&(i.flags|=32),br}function On(i,u,f){(i===Lt&&Mt===2||i.cancelPendingCommit!==null)&&(ns(i,0),Na(i,vt,br,!1)),Mn(i,f),(!(jt&2)||i!==Lt)&&(i===Lt&&(!(jt&2)&&(ei|=f),qt===4&&Na(i,vt,br,!1)),Zr(i))}function iC(i,u,f){if(jt&6)throw Error(r(327));var h=!f&&(u&60)===0&&(u&i.expiredLanes)===0||Xe(i,u),S=h?p6(i,u):Eh(i,u,!0),T=h;do{if(S===0){es&&!h&&Na(i,u,0,!1);break}else if(S===6)Na(i,u,0,!Ca);else{if(f=i.current.alternate,T&&!d6(f)){S=Eh(i,u,!1),T=!1;continue}if(S===2){if(T=u,i.errorRecoveryDisabledLanes&T)var z=0;else z=i.pendingLanes&-536870913,z=z!==0?z:z&536870912?536870912:0;if(z!==0){u=z;e:{var q=i;S=Fl;var X=q.current.memoizedState.isDehydrated;if(X&&(ns(q,z).flags|=256),z=Eh(q,z,!1),z!==2){if(dh&&!X){q.errorRecoveryDisabledLanes|=T,ei|=T,S=4;break e}T=Xr,Xr=S,T!==null&&yh(T)}S=z}if(T=!1,S!==2)continue}}if(S===1){ns(i,0),Na(i,u,0,!0);break}e:{switch(h=i,S){case 0:case 1:throw Error(r(345));case 4:if((u&4194176)===u){Na(h,u,br,!Ca);break e}break;case 2:Xr=null;break;case 3:case 5:break;default:throw Error(r(329))}if(h.finishedWork=f,h.finishedLanes=u,(u&62914560)===u&&(T=gh+300-me(),10f?32:f,I.T=null,ti===null)var T=!1;else{f=mh,mh=null;var z=ti,q=zl;if(ti=null,zl=0,jt&6)throw Error(r(331));var X=jt;if(jt|=4,JR(z.current),XR(z,z.current,q,f),jt=X,jl(0,!1),et&&typeof et.onPostCommitFiberRoot=="function")try{et.onPostCommitFiberRoot(bt,z)}catch{}T=!0}return T}finally{Z.p=S,I.T=h,hC(i,u)}}return!1}function mC(i,u,f){u=cr(f,u),u=Bg(i.stateNode,u,2),i=ro(i,u,2),i!==null&&(Mn(i,2),Zr(i))}function Ot(i,u,f){if(i.tag===3)mC(i,i,f);else for(;u!==null;){if(u.tag===3){mC(u,i,f);break}else if(u.tag===1){var h=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(uo===null||!uo.has(h))){i=cr(f,i),f=vR(2),h=ro(u,f,2),h!==null&&(SR(f,h,u,i),Mn(h,2),Zr(h));break}}u=u.return}}function wh(i,u,f){var h=i.pingCache;if(h===null){h=i.pingCache=new c6;var S=new Set;h.set(u,S)}else S=h.get(u),S===void 0&&(S=new Set,h.set(u,S));S.has(f)||(dh=!0,S.add(f),i=m6.bind(null,i,u,f),u.then(i,i))}function m6(i,u,f){var h=i.pingCache;h!==null&&h.delete(u),i.pingedLanes|=i.suspendedLanes&f,i.warmLanes&=~f,Lt===i&&(vt&f)===f&&(qt===4||qt===3&&(vt&62914560)===vt&&300>me()-gh?!(jt&2)&&ns(i,0):fh|=f,ts===vt&&(ts=0)),Zr(i)}function bC(i,u){u===0&&(u=Ln()),i=Ka(i,u),i!==null&&(Mn(i,u),Zr(i))}function b6(i){var u=i.memoizedState,f=0;u!==null&&(f=u.retryLane),bC(i,f)}function y6(i,u){var f=0;switch(i.tag){case 13:var h=i.stateNode,S=i.memoizedState;S!==null&&(f=S.retryLane);break;case 19:h=i.stateNode;break;case 22:h=i.stateNode._retryCache;break;default:throw Error(r(314))}h!==null&&h.delete(u),bC(i,f)}function v6(i,u){return xe(i,u)}var Zc=null,os=null,xh=!1,Qc=!1,kh=!1,ni=0;function Zr(i){i!==os&&i.next===null&&(os===null?Zc=os=i:os=os.next=i),Qc=!0,xh||(xh=!0,E6(S6))}function jl(i,u){if(!kh&&Qc){kh=!0;do for(var f=!1,h=Zc;h!==null;){if(i!==0){var S=h.pendingLanes;if(S===0)var T=0;else{var z=h.suspendedLanes,q=h.pingedLanes;T=(1<<31-wt(42|i)+1)-1,T&=S&~(z&~q),T=T&201326677?T&201326677|1:T?T|2:0}T!==0&&(f=!0,SC(h,T))}else T=vt,T=pa(h,h===Lt?T:0),!(T&3)||Xe(h,T)||(f=!0,SC(h,T));h=h.next}while(f);kh=!1}}function S6(){Qc=xh=!1;var i=0;ni!==0&&(_6()&&(i=ni),ni=0);for(var u=me(),f=null,h=Zc;h!==null;){var S=h.next,T=yC(h,u);T===0?(h.next=null,f===null?Zc=S:f.next=S,S===null&&(os=f)):(f=h,(i!==0||T&3)&&(Qc=!0)),h=S}jl(i)}function yC(i,u){for(var f=i.suspendedLanes,h=i.pingedLanes,S=i.expirationTimes,T=i.pendingLanes&-62914561;0"u"?null:document;function MC(i,u,f){var h=ss;if(h&&typeof u=="string"&&u){var S=lr(u);S='link[rel="'+i+'"][href="'+S+'"]',typeof f=="string"&&(S+='[crossorigin="'+f+'"]'),LC.has(S)||(LC.add(S),i={rel:i,crossOrigin:f,href:u},h.querySelector(S)===null&&(u=h.createElement("link"),mn(u,"link",i),an(u),h.head.appendChild(u)))}}function F6(i){Oa.D(i),MC("dns-prefetch",i,null)}function z6(i,u){Oa.C(i,u),MC("preconnect",i,u)}function B6(i,u,f){Oa.L(i,u,f);var h=ss;if(h&&i&&u){var S='link[rel="preload"][as="'+lr(u)+'"]';u==="image"&&f&&f.imageSrcSet?(S+='[imagesrcset="'+lr(f.imageSrcSet)+'"]',typeof f.imageSizes=="string"&&(S+='[imagesizes="'+lr(f.imageSizes)+'"]')):S+='[href="'+lr(i)+'"]';var T=S;switch(u){case"style":T=ls(i);break;case"script":T=us(i)}yr.has(T)||(i=D({rel:"preload",href:u==="image"&&f&&f.imageSrcSet?void 0:i,as:u},f),yr.set(T,i),h.querySelector(S)!==null||u==="style"&&h.querySelector(Hl(T))||u==="script"&&h.querySelector($l(T))||(u=h.createElement("link"),mn(u,"link",i),an(u),h.head.appendChild(u)))}}function j6(i,u){Oa.m(i,u);var f=ss;if(f&&i){var h=u&&typeof u.as=="string"?u.as:"script",S='link[rel="modulepreload"][as="'+lr(h)+'"][href="'+lr(i)+'"]',T=S;switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":T=us(i)}if(!yr.has(T)&&(i=D({rel:"modulepreload",href:i},u),yr.set(T,i),f.querySelector(S)===null)){switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(f.querySelector($l(T)))return}h=f.createElement("link"),mn(h,"link",i),an(h),f.head.appendChild(h)}}}function U6(i,u,f){Oa.S(i,u,f);var h=ss;if(h&&i){var S=Oi(h).hoistableStyles,T=ls(i);u=u||"default";var z=S.get(T);if(!z){var q={loading:0,preload:null};if(z=h.querySelector(Hl(T)))q.loading=5;else{i=D({rel:"stylesheet",href:i,"data-precedence":u},f),(f=yr.get(T))&&zh(i,f);var X=z=h.createElement("link");an(X),mn(X,"link",i),X._p=new Promise(function(ae,ye){X.onload=ae,X.onerror=ye}),X.addEventListener("load",function(){q.loading|=1}),X.addEventListener("error",function(){q.loading|=2}),q.loading|=4,ad(z,u,h)}z={type:"stylesheet",instance:z,count:1,state:q},S.set(T,z)}}}function G6(i,u){Oa.X(i,u);var f=ss;if(f&&i){var h=Oi(f).hoistableScripts,S=us(i),T=h.get(S);T||(T=f.querySelector($l(S)),T||(i=D({src:i,async:!0},u),(u=yr.get(S))&&Bh(i,u),T=f.createElement("script"),an(T),mn(T,"link",i),f.head.appendChild(T)),T={type:"script",instance:T,count:1,state:null},h.set(S,T))}}function H6(i,u){Oa.M(i,u);var f=ss;if(f&&i){var h=Oi(f).hoistableScripts,S=us(i),T=h.get(S);T||(T=f.querySelector($l(S)),T||(i=D({src:i,async:!0,type:"module"},u),(u=yr.get(S))&&Bh(i,u),T=f.createElement("script"),an(T),mn(T,"link",i),f.head.appendChild(T)),T={type:"script",instance:T,count:1,state:null},h.set(S,T))}}function PC(i,u,f,h){var S=(S=De.current)?rd(S):null;if(!S)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof f.precedence=="string"&&typeof f.href=="string"?(u=ls(f.href),f=Oi(S).hoistableStyles,h=f.get(u),h||(h={type:"style",instance:null,count:0,state:null},f.set(u,h)),h):{type:"void",instance:null,count:0,state:null};case"link":if(f.rel==="stylesheet"&&typeof f.href=="string"&&typeof f.precedence=="string"){i=ls(f.href);var T=Oi(S).hoistableStyles,z=T.get(i);if(z||(S=S.ownerDocument||S,z={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},T.set(i,z),(T=S.querySelector(Hl(i)))&&!T._p&&(z.instance=T,z.state.loading=5),yr.has(i)||(f={rel:"preload",as:"style",href:f.href,crossOrigin:f.crossOrigin,integrity:f.integrity,media:f.media,hrefLang:f.hrefLang,referrerPolicy:f.referrerPolicy},yr.set(i,f),T||$6(S,i,f,z.state))),u&&h===null)throw Error(r(528,""));return z}if(u&&h!==null)throw Error(r(529,""));return null;case"script":return u=f.async,f=f.src,typeof f=="string"&&u&&typeof u!="function"&&typeof u!="symbol"?(u=us(f),f=Oi(S).hoistableScripts,h=f.get(u),h||(h={type:"script",instance:null,count:0,state:null},f.set(u,h)),h):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function ls(i){return'href="'+lr(i)+'"'}function Hl(i){return'link[rel="stylesheet"]['+i+"]"}function FC(i){return D({},i,{"data-precedence":i.precedence,precedence:null})}function $6(i,u,f,h){i.querySelector('link[rel="preload"][as="style"]['+u+"]")?h.loading=1:(u=i.createElement("link"),h.preload=u,u.addEventListener("load",function(){return h.loading|=1}),u.addEventListener("error",function(){return h.loading|=2}),mn(u,"link",f),an(u),i.head.appendChild(u))}function us(i){return'[src="'+lr(i)+'"]'}function $l(i){return"script[async]"+i}function zC(i,u,f){if(u.count++,u.instance===null)switch(u.type){case"style":var h=i.querySelector('style[data-href~="'+lr(f.href)+'"]');if(h)return u.instance=h,an(h),h;var S=D({},f,{"data-href":f.href,"data-precedence":f.precedence,href:null,precedence:null});return h=(i.ownerDocument||i).createElement("style"),an(h),mn(h,"style",S),ad(h,f.precedence,i),u.instance=h;case"stylesheet":S=ls(f.href);var T=i.querySelector(Hl(S));if(T)return u.state.loading|=4,u.instance=T,an(T),T;h=FC(f),(S=yr.get(S))&&zh(h,S),T=(i.ownerDocument||i).createElement("link"),an(T);var z=T;return z._p=new Promise(function(q,X){z.onload=q,z.onerror=X}),mn(T,"link",h),u.state.loading|=4,ad(T,f.precedence,i),u.instance=T;case"script":return T=us(f.src),(S=i.querySelector($l(T)))?(u.instance=S,an(S),S):(h=f,(S=yr.get(T))&&(h=D({},f),Bh(h,S)),i=i.ownerDocument||i,S=i.createElement("script"),an(S),mn(S,"link",h),i.head.appendChild(S),u.instance=S);case"void":return null;default:throw Error(r(443,u.type))}else u.type==="stylesheet"&&!(u.state.loading&4)&&(h=u.instance,u.state.loading|=4,ad(h,f.precedence,i));return u.instance}function ad(i,u,f){for(var h=f.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),S=h.length?h[h.length-1]:null,T=S,z=0;z title"):null)}function q6(i,u,f){if(f===1||u.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof u.precedence!="string"||typeof u.href!="string"||u.href==="")break;return!0;case"link":if(typeof u.rel!="string"||typeof u.href!="string"||u.href===""||u.onLoad||u.onError)break;switch(u.rel){case"stylesheet":return i=u.disabled,typeof u.precedence=="string"&&i==null;default:return!0}case"script":if(u.async&&typeof u.async!="function"&&typeof u.async!="symbol"&&!u.onLoad&&!u.onError&&u.src&&typeof u.src=="string")return!0}return!1}function UC(i){return!(i.type==="stylesheet"&&!(i.state.loading&3))}var ql=null;function V6(){}function W6(i,u,f){if(ql===null)throw Error(r(475));var h=ql;if(u.type==="stylesheet"&&(typeof f.media!="string"||matchMedia(f.media).matches!==!1)&&!(u.state.loading&4)){if(u.instance===null){var S=ls(f.href),T=i.querySelector(Hl(S));if(T){i=T._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(h.count++,h=id.bind(h),i.then(h,h)),u.state.loading|=4,u.instance=T,an(T);return}T=i.ownerDocument||i,f=FC(f),(S=yr.get(S))&&zh(f,S),T=T.createElement("link"),an(T);var z=T;z._p=new Promise(function(q,X){z.onload=q,z.onerror=X}),mn(T,"link",f),u.instance=T}h.stylesheets===null&&(h.stylesheets=new Map),h.stylesheets.set(u,i),(i=u.state.preload)&&!(u.state.loading&3)&&(h.count++,u=id.bind(h),i.addEventListener("load",u),i.addEventListener("error",u))}}function Y6(){if(ql===null)throw Error(r(475));var i=ql;return i.stylesheets&&i.count===0&&jh(i,i.stylesheets),0"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Kh.exports=hq(),Kh.exports}var bq=mq(),Jl={},u_;function yq(){if(u_)return Jl;u_=1,Object.defineProperty(Jl,"__esModule",{value:!0}),Jl.parse=s,Jl.serialize=d;const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,n=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,r=/^[\u0020-\u003A\u003D-\u007E]*$/,a=Object.prototype.toString,o=(()=>{const m=function(){};return m.prototype=Object.create(null),m})();function s(m,b){const y=new o,v=m.length;if(v<2)return y;const k=(b==null?void 0:b.decode)||p;let A=0;do{const x=m.indexOf("=",A);if(x===-1)break;const R=m.indexOf(";",A),O=R===-1?v:R;if(x>O){A=m.lastIndexOf(";",x-1)+1;continue}const N=l(m,A,x),C=c(m,x,N),_=m.slice(N,C);if(y[_]===void 0){let L=l(m,x+1,O),I=c(m,O,L);const D=k(m.slice(L,I));y[_]=D}A=O+1}while(Ay;){const v=m.charCodeAt(--b);if(v!==32&&v!==9)return b+1}return y}function d(m,b,y){const v=(y==null?void 0:y.encode)||encodeURIComponent;if(!e.test(m))throw new TypeError(`argument name is invalid: ${m}`);const k=v(b);if(!t.test(k))throw new TypeError(`argument val is invalid: ${b}`);let A=m+"="+k;if(!y)return A;if(y.maxAge!==void 0){if(!Number.isInteger(y.maxAge))throw new TypeError(`option maxAge is invalid: ${y.maxAge}`);A+="; Max-Age="+y.maxAge}if(y.domain){if(!n.test(y.domain))throw new TypeError(`option domain is invalid: ${y.domain}`);A+="; Domain="+y.domain}if(y.path){if(!r.test(y.path))throw new TypeError(`option path is invalid: ${y.path}`);A+="; Path="+y.path}if(y.expires){if(!g(y.expires)||!Number.isFinite(y.expires.valueOf()))throw new TypeError(`option expires is invalid: ${y.expires}`);A+="; Expires="+y.expires.toUTCString()}if(y.httpOnly&&(A+="; HttpOnly"),y.secure&&(A+="; Secure"),y.partitioned&&(A+="; Partitioned"),y.priority)switch(typeof y.priority=="string"?y.priority.toLowerCase():void 0){case"low":A+="; Priority=Low";break;case"medium":A+="; Priority=Medium";break;case"high":A+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${y.priority}`)}if(y.sameSite)switch(typeof y.sameSite=="string"?y.sameSite.toLowerCase():y.sameSite){case!0:case"strict":A+="; SameSite=Strict";break;case"lax":A+="; SameSite=Lax";break;case"none":A+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${y.sameSite}`)}return A}function p(m){if(m.indexOf("%")===-1)return m;try{return decodeURIComponent(m)}catch{return m}}function g(m){return a.call(m)==="[object Date]"}return Jl}yq();/** * react-router v7.3.0 * * Copyright (c) Remix Software Inc. @@ -57,16 +57,16 @@ Error generating stack: `+f.message+` * @license MIT */var c_="popstate";function vq(e={}){function t(a,o){let{pathname:s="/",search:l="",hash:c=""}=xi(a.location.hash.substring(1));return!s.startsWith("/")&&!s.startsWith(".")&&(s="/"+s),u0("",{pathname:s,search:l,hash:c},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(a,o){let s=a.document.querySelector("base"),l="";if(s&&s.getAttribute("href")){let c=a.location.href,d=c.indexOf("#");l=d===-1?c:c.slice(0,d)}return l+"#"+(typeof o=="string"?o:Su(o))}function r(a,o){jr(a.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(o)})`)}return Eq(t,n,r,e)}function Gt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function jr(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Sq(){return Math.random().toString(36).substring(2,10)}function d_(e,t){return{usr:e.state,key:e.key,idx:t}}function u0(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?xi(t):t,state:n,key:t&&t.key||r||Sq()}}function Su({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function xi(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function Eq(e,t,n,r={}){let{window:a=document.defaultView,v5Compat:o=!1}=r,s=a.history,l="POP",c=null,d=p();d==null&&(d=0,s.replaceState({...s.state,idx:d},""));function p(){return(s.state||{idx:null}).idx}function g(){l="POP";let k=p(),A=k==null?null:k-d;d=k,c&&c({action:l,location:v.location,delta:A})}function m(k,A){l="PUSH";let x=u0(v.location,k,A);n&&n(x,k),d=p()+1;let R=d_(x,d),O=v.createHref(x);try{s.pushState(R,"",O)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;a.location.assign(O)}o&&c&&c({action:l,location:v.location,delta:1})}function b(k,A){l="REPLACE";let x=u0(v.location,k,A);n&&n(x,k),d=p();let R=d_(x,d),O=v.createHref(x);s.replaceState(R,"",O),o&&c&&c({action:l,location:v.location,delta:0})}function y(k){let A=a.location.origin!=="null"?a.location.origin:a.location.href,x=typeof k=="string"?k:Su(k);return x=x.replace(/ $/,"%20"),Gt(A,`No window.location.(origin|href) available to create URL for href: ${x}`),new URL(x,A)}let v={get action(){return l},get location(){return e(a,s)},listen(k){if(c)throw new Error("A history only accepts one active listener");return a.addEventListener(c_,g),c=k,()=>{a.removeEventListener(c_,g),c=null}},createHref(k){return t(a,k)},createURL:y,encodeLocation(k){let A=y(k);return{pathname:A.pathname,search:A.search,hash:A.hash}},push:m,replace:b,go(k){return s.go(k)}};return v}function qz(e,t,n="/"){return wq(e,t,n,!1)}function wq(e,t,n,r){let a=typeof t=="string"?xi(t):t,o=Ba(a.pathname||"/",n);if(o==null)return null;let s=Vz(e);xq(s);let l=null;for(let c=0;l==null&&c{let c={relativePath:l===void 0?o.path||"":l,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};c.relativePath.startsWith("/")&&(Gt(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length));let d=Fa([r,c.relativePath]),p=n.concat(c);o.children&&o.children.length>0&&(Gt(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${d}".`),Vz(o.children,t,p,d)),!(o.path==null&&!o.index)&&t.push({path:d,score:Nq(d,o.index),routesMeta:p})};return e.forEach((o,s)=>{var l;if(o.path===""||!((l=o.path)!=null&&l.includes("?")))a(o,s);else for(let c of Wz(o.path))a(o,s,c)}),t}function Wz(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,a=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return a?[o,""]:[o];let s=Wz(r.join("/")),l=[];return l.push(...s.map(c=>c===""?o:[o,c].join("/"))),a&&l.push(...s),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function xq(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Oq(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var kq=/^:[\w-]+$/,Tq=3,Aq=2,Rq=1,Cq=10,_q=-2,f_=e=>e==="*";function Nq(e,t){let n=e.split("/"),r=n.length;return n.some(f_)&&(r+=_q),t&&(r+=Aq),n.filter(a=>!f_(a)).reduce((a,o)=>a+(kq.test(o)?Tq:o===""?Rq:Cq),r)}function Oq(e,t){return e.length===t.length&&e.slice(0,-1).every((r,a)=>r===t[a])?e[e.length-1]-t[t.length-1]:0}function Iq(e,t,n=!1){let{routesMeta:r}=e,a={},o="/",s=[];for(let l=0;l{if(p==="*"){let y=l[m]||"";s=o.slice(0,o.length-y.length).replace(/(.)\/+$/,"$1")}const b=l[m];return g&&!b?d[p]=void 0:d[p]=(b||"").replace(/%2F/g,"/"),d},{}),pathname:o,pathnameBase:s,pattern:e}}function Dq(e,t=!1,n=!0){jr(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,l,c)=>(r.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}function Lq(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return jr(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Ba(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function Mq(e,t="/"){let{pathname:n,search:r="",hash:a=""}=typeof e=="string"?xi(e):e;return{pathname:n?n.startsWith("/")?n:Pq(n,t):t,search:Bq(r),hash:jq(a)}}function Pq(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function Jh(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function Fq(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Yz(e){let t=Fq(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function Kz(e,t,n,r=!1){let a;typeof e=="string"?a=xi(e):(a={...e},Gt(!a.pathname||!a.pathname.includes("?"),Jh("?","pathname","search",a)),Gt(!a.pathname||!a.pathname.includes("#"),Jh("#","pathname","hash",a)),Gt(!a.search||!a.search.includes("#"),Jh("#","search","hash",a)));let o=e===""||a.pathname==="",s=o?"/":a.pathname,l;if(s==null)l=n;else{let g=t.length-1;if(!r&&s.startsWith("..")){let m=s.split("/");for(;m[0]==="..";)m.shift(),g-=1;a.pathname=m.join("/")}l=g>=0?t[g]:"/"}let c=Mq(a,l),d=s&&s!=="/"&&s.endsWith("/"),p=(o||s===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(d||p)&&(c.pathname+="/"),c}var Fa=e=>e.join("/").replace(/\/\/+/g,"/"),zq=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Bq=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,jq=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Uq(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var Xz=["POST","PUT","PATCH","DELETE"];new Set(Xz);var Gq=["GET",...Xz];new Set(Gq);var Us=w.createContext(null);Us.displayName="DataRouter";var qf=w.createContext(null);qf.displayName="DataRouterState";var Zz=w.createContext({isTransitioning:!1});Zz.displayName="ViewTransition";var Hq=w.createContext(new Map);Hq.displayName="Fetchers";var $q=w.createContext(null);$q.displayName="Await";var sa=w.createContext(null);sa.displayName="Navigation";var zu=w.createContext(null);zu.displayName="Location";var Ha=w.createContext({outlet:null,matches:[],isDataRoute:!1});Ha.displayName="Route";var Ck=w.createContext(null);Ck.displayName="RouteError";function qq(e,{relative:t}={}){Gt(Bu(),"useHref() may be used only in the context of a component.");let{basename:n,navigator:r}=w.useContext(sa),{hash:a,pathname:o,search:s}=ju(e,{relative:t}),l=o;return n!=="/"&&(l=o==="/"?n:Fa([n,o])),r.createHref({pathname:l,search:s,hash:a})}function Bu(){return w.useContext(zu)!=null}function ki(){return Gt(Bu(),"useLocation() may be used only in the context of a component."),w.useContext(zu).location}var Qz="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Jz(e){w.useContext(sa).static||w.useLayoutEffect(e)}function _k(){let{isDataRoute:e}=w.useContext(Ha);return e?a9():Vq()}function Vq(){Gt(Bu(),"useNavigate() may be used only in the context of a component.");let e=w.useContext(Us),{basename:t,navigator:n}=w.useContext(sa),{matches:r}=w.useContext(Ha),{pathname:a}=ki(),o=JSON.stringify(Yz(r)),s=w.useRef(!1);return Jz(()=>{s.current=!0}),w.useCallback((c,d={})=>{if(jr(s.current,Qz),!s.current)return;if(typeof c=="number"){n.go(c);return}let p=Kz(c,JSON.parse(o),a,d.relative==="path");e==null&&t!=="/"&&(p.pathname=p.pathname==="/"?t:Fa([t,p.pathname])),(d.replace?n.replace:n.push)(p,d.state,d)},[t,n,o,a,e])}w.createContext(null);function ju(e,{relative:t}={}){let{matches:n}=w.useContext(Ha),{pathname:r}=ki(),a=JSON.stringify(Yz(n));return w.useMemo(()=>Kz(e,JSON.parse(a),r,t==="path"),[e,a,r,t])}function Wq(e,t){return eB(e,t)}function eB(e,t,n,r){var x;Gt(Bu(),"useRoutes() may be used only in the context of a component.");let{navigator:a,static:o}=w.useContext(sa),{matches:s}=w.useContext(Ha),l=s[s.length-1],c=l?l.params:{},d=l?l.pathname:"/",p=l?l.pathnameBase:"/",g=l&&l.route;{let R=g&&g.path||"";tB(d,!g||R.endsWith("*")||R.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${d}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. -Please change the parent to .`)}let m=ki(),b;if(t){let R=typeof t=="string"?xi(t):t;Gt(p==="/"||((x=R.pathname)==null?void 0:x.startsWith(p)),`When overriding the location using \`\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${p}" but pathname "${R.pathname}" was given in the \`location\` prop.`),b=R}else b=m;let y=b.pathname||"/",v=y;if(p!=="/"){let R=p.replace(/^\//,"").split("/");v="/"+y.replace(/^\//,"").split("/").slice(R.length).join("/")}let k=!o&&n&&n.matches&&n.matches.length>0?n.matches:qz(e,{pathname:v});jr(g||k!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),jr(k==null||k[k.length-1].route.element!==void 0||k[k.length-1].route.Component!==void 0||k[k.length-1].route.lazy!==void 0,`Matched leaf route at location "${b.pathname}${b.search}${b.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`);let A=Qq(k&&k.map(R=>Object.assign({},R,{params:Object.assign({},c,R.params),pathname:Fa([p,a.encodeLocation?a.encodeLocation(R.pathname).pathname:R.pathname]),pathnameBase:R.pathnameBase==="/"?p:Fa([p,a.encodeLocation?a.encodeLocation(R.pathnameBase).pathname:R.pathnameBase])})),s,n,r);return t&&A?w.createElement(zu.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...b},navigationType:"POP"}},A):A}function Yq(){let e=r9(),t=Uq(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:r},o={padding:"2px 4px",backgroundColor:r},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=w.createElement(w.Fragment,null,w.createElement("p",null,"💿 Hey developer 👋"),w.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",w.createElement("code",{style:o},"ErrorBoundary")," or"," ",w.createElement("code",{style:o},"errorElement")," prop on your route.")),w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},t),n?w.createElement("pre",{style:a},n):null,s)}var Kq=w.createElement(Yq,null),Xq=class extends w.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?w.createElement(Ha.Provider,{value:this.props.routeContext},w.createElement(Ck.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Zq({routeContext:e,match:t,children:n}){let r=w.useContext(Us);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),w.createElement(Ha.Provider,{value:e},n)}function Qq(e,t=[],n=null,r=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,o=n==null?void 0:n.errors;if(o!=null){let c=a.findIndex(d=>d.route.id&&(o==null?void 0:o[d.route.id])!==void 0);Gt(c>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),a=a.slice(0,Math.min(a.length,c+1))}let s=!1,l=-1;if(n)for(let c=0;c=0?a=a.slice(0,l+1):a=[a[0]];break}}}return a.reduceRight((c,d,p)=>{let g,m=!1,b=null,y=null;n&&(g=o&&d.route.id?o[d.route.id]:void 0,b=d.route.errorElement||Kq,s&&(l<0&&p===0?(tB("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),m=!0,y=null):l===p&&(m=!0,y=d.route.hydrateFallbackElement||null)));let v=t.concat(a.slice(0,p+1)),k=()=>{let A;return g?A=b:m?A=y:d.route.Component?A=w.createElement(d.route.Component,null):d.route.element?A=d.route.element:A=c,w.createElement(Zq,{match:d,routeContext:{outlet:c,matches:v,isDataRoute:n!=null},children:A})};return n&&(d.route.ErrorBoundary||d.route.errorElement||p===0)?w.createElement(Xq,{location:n.location,revalidation:n.revalidation,component:b,error:g,children:k(),routeContext:{outlet:null,matches:v,isDataRoute:!0}}):k()},null)}function Nk(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Jq(e){let t=w.useContext(Us);return Gt(t,Nk(e)),t}function e9(e){let t=w.useContext(qf);return Gt(t,Nk(e)),t}function t9(e){let t=w.useContext(Ha);return Gt(t,Nk(e)),t}function Ok(e){let t=t9(e),n=t.matches[t.matches.length-1];return Gt(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function n9(){return Ok("useRouteId")}function r9(){var r;let e=w.useContext(Ck),t=e9("useRouteError"),n=Ok("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function a9(){let{router:e}=Jq("useNavigate"),t=Ok("useNavigate"),n=w.useRef(!1);return Jz(()=>{n.current=!0}),w.useCallback(async(a,o={})=>{jr(n.current,Qz),n.current&&(typeof a=="number"?e.navigate(a):await e.navigate(a,{fromRouteId:t,...o}))},[e,t])}var p_={};function tB(e,t,n){!t&&!p_[e]&&(p_[e]=!0,jr(!1,n))}w.memo(o9);function o9({routes:e,future:t,state:n}){return eB(e,void 0,n,t)}function c0(e){Gt(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function i9({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:a,static:o=!1}){Gt(!Bu(),"You cannot render a inside another . You should never have more than one in your app.");let s=e.replace(/^\/*/,"/"),l=w.useMemo(()=>({basename:s,navigator:a,static:o,future:{}}),[s,a,o]);typeof n=="string"&&(n=xi(n));let{pathname:c="/",search:d="",hash:p="",state:g=null,key:m="default"}=n,b=w.useMemo(()=>{let y=Ba(c,s);return y==null?null:{location:{pathname:y,search:d,hash:p,state:g,key:m},navigationType:r}},[s,c,d,p,g,m,r]);return jr(b!=null,` is not able to match the URL "${c}${d}${p}" because it does not start with the basename, so the won't render anything.`),b==null?null:w.createElement(sa.Provider,{value:l},w.createElement(zu.Provider,{children:t,value:b}))}function s9({children:e,location:t}){return Wq(d0(e),t)}function d0(e,t=[]){let n=[];return w.Children.forEach(e,(r,a)=>{if(!w.isValidElement(r))return;let o=[...t,a];if(r.type===w.Fragment){n.push.apply(n,d0(r.props.children,o));return}Gt(r.type===c0,`[${typeof r.type=="string"?r.type:r.type.name}] is not a component. All component children of must be a or `),Gt(!r.props.index||!r.props.children,"An index route cannot have child routes.");let s={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=d0(r.props.children,o)),n.push(s)}),n}var Vd="get",Wd="application/x-www-form-urlencoded";function Vf(e){return e!=null&&typeof e.tagName=="string"}function l9(e){return Vf(e)&&e.tagName.toLowerCase()==="button"}function u9(e){return Vf(e)&&e.tagName.toLowerCase()==="form"}function c9(e){return Vf(e)&&e.tagName.toLowerCase()==="input"}function d9(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function f9(e,t){return e.button===0&&(!t||t==="_self")&&!d9(e)}var hd=null;function p9(){if(hd===null)try{new FormData(document.createElement("form"),0),hd=!1}catch{hd=!0}return hd}var g9=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function em(e){return e!=null&&!g9.has(e)?(jr(!1,`"${e}" is not a valid \`encType\` for \`\`/\`\` and will default to "${Wd}"`),null):e}function h9(e,t){let n,r,a,o,s;if(u9(e)){let l=e.getAttribute("action");r=l?Ba(l,t):null,n=e.getAttribute("method")||Vd,a=em(e.getAttribute("enctype"))||Wd,o=new FormData(e)}else if(l9(e)||c9(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a From b2640d8a67d852aebae8d063e8fe6ade287a8ea5 Mon Sep 17 00:00:00 2001 From: yangdx Date: Sun, 6 Apr 2025 16:34:21 +0800 Subject: [PATCH 7/9] Update webui assets --- .../api/webui/assets/{index-B9F57UMz.js => index-4B5TC9ni.js} | 2 +- lightrag/api/webui/index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename lightrag/api/webui/assets/{index-B9F57UMz.js => index-4B5TC9ni.js} (95%) diff --git a/lightrag/api/webui/assets/index-B9F57UMz.js b/lightrag/api/webui/assets/index-4B5TC9ni.js similarity index 95% rename from lightrag/api/webui/assets/index-B9F57UMz.js rename to lightrag/api/webui/assets/index-4B5TC9ni.js index a029ba54..38f1d1c9 100644 --- a/lightrag/api/webui/assets/index-B9F57UMz.js +++ b/lightrag/api/webui/assets/index-4B5TC9ni.js @@ -1113,7 +1113,7 @@ void main() { * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var wO;function Fre(){if(wO)return Jm;wO=1;var e=$f();function t(g,m){return g===m&&(g!==0||1/g===1/m)||g!==g&&m!==m}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,a=e.useEffect,o=e.useLayoutEffect,s=e.useDebugValue;function l(g,m){var b=m(),y=r({inst:{value:b,getSnapshot:m}}),v=y[0].inst,k=y[1];return o(function(){v.value=b,v.getSnapshot=m,c(v)&&k({inst:v})},[g,b,m]),a(function(){return c(v)&&k({inst:v}),g(function(){c(v)&&k({inst:v})})},[g]),s(b),b}function c(g){var m=g.getSnapshot;g=g.value;try{var b=m();return!n(g,b)}catch{return!0}}function d(g,m){return m()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:l;return Jm.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,Jm}var xO;function zre(){return xO||(xO=1,Qm.exports=Fre()),Qm.exports}var Bre=zre(),uu='[cmdk-group=""]',eb='[cmdk-group-items=""]',jre='[cmdk-group-heading=""]',PT='[cmdk-item=""]',kO=`${PT}:not([aria-disabled="true"])`,nk="cmdk-item-select",ui="data-value",Ure=(e,t,n)=>Pre(e,t,n),y5=w.createContext(void 0),rc=()=>w.useContext(y5),v5=w.createContext(void 0),FT=()=>w.useContext(v5),S5=w.createContext(void 0),E5=w.forwardRef((e,t)=>{let n=Es(()=>{var j,P;return{search:"",value:(P=(j=e.value)!=null?j:e.defaultValue)!=null?P:"",filtered:{count:0,items:new Map,groups:new Set}}}),r=Es(()=>new Set),a=Es(()=>new Map),o=Es(()=>new Map),s=Es(()=>new Set),l=w5(e),{label:c,children:d,value:p,onValueChange:g,filter:m,shouldFilter:b,loop:y,disablePointerSelection:v=!1,vimBindings:k=!0,...A}=e,x=An(),R=An(),O=An(),N=w.useRef(null),C=Qre();vi(()=>{if(p!==void 0){let j=p.trim();n.current.value=j,_.emit()}},[p]),vi(()=>{C(6,B)},[]);let _=w.useMemo(()=>({subscribe:j=>(s.current.add(j),()=>s.current.delete(j)),snapshot:()=>n.current,setState:(j,P,Z)=>{var J,ie,K;if(!Object.is(n.current[j],P)){if(n.current[j]=P,j==="search")$(),D(),C(1,G);else if(j==="value"&&(Z||C(5,B),((J=l.current)==null?void 0:J.value)!==void 0)){let ee=P??"";(K=(ie=l.current).onValueChange)==null||K.call(ie,ee);return}_.emit()}},emit:()=>{s.current.forEach(j=>j())}}),[]),L=w.useMemo(()=>({value:(j,P,Z)=>{var J;P!==((J=o.current.get(j))==null?void 0:J.value)&&(o.current.set(j,{value:P,keywords:Z}),n.current.filtered.items.set(j,I(P,Z)),C(2,()=>{D(),_.emit()}))},item:(j,P)=>(r.current.add(j),P&&(a.current.has(P)?a.current.get(P).add(j):a.current.set(P,new Set([j]))),C(3,()=>{$(),D(),n.current.value||G(),_.emit()}),()=>{o.current.delete(j),r.current.delete(j),n.current.filtered.items.delete(j);let Z=W();C(4,()=>{$(),(Z==null?void 0:Z.getAttribute("id"))===j&&G(),_.emit()})}),group:j=>(a.current.has(j)||a.current.set(j,new Set),()=>{o.current.delete(j),a.current.delete(j)}),filter:()=>l.current.shouldFilter,label:c||e["aria-label"],getDisablePointerSelection:()=>l.current.disablePointerSelection,listId:x,inputId:O,labelId:R,listInnerRef:N}),[]);function I(j,P){var Z,J;let ie=(J=(Z=l.current)==null?void 0:Z.filter)!=null?J:Ure;return j?ie(j,n.current.search,P):0}function D(){if(!n.current.search||l.current.shouldFilter===!1)return;let j=n.current.filtered.items,P=[];n.current.filtered.groups.forEach(J=>{let ie=a.current.get(J),K=0;ie.forEach(ee=>{let he=j.get(ee);K=Math.max(he,K)}),P.push([J,K])});let Z=N.current;Q().sort((J,ie)=>{var K,ee;let he=J.getAttribute("id"),oe=ie.getAttribute("id");return((K=j.get(oe))!=null?K:0)-((ee=j.get(he))!=null?ee:0)}).forEach(J=>{let ie=J.closest(eb);ie?ie.appendChild(J.parentElement===ie?J:J.closest(`${eb} > *`)):Z.appendChild(J.parentElement===Z?J:J.closest(`${eb} > *`))}),P.sort((J,ie)=>ie[1]-J[1]).forEach(J=>{var ie;let K=(ie=N.current)==null?void 0:ie.querySelector(`${uu}[${ui}="${encodeURIComponent(J[0])}"]`);K==null||K.parentElement.appendChild(K)})}function G(){let j=Q().find(Z=>Z.getAttribute("aria-disabled")!=="true"),P=j==null?void 0:j.getAttribute(ui);_.setState("value",P||void 0)}function $(){var j,P,Z,J;if(!n.current.search||l.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let ie=0;for(let K of r.current){let ee=(P=(j=o.current.get(K))==null?void 0:j.value)!=null?P:"",he=(J=(Z=o.current.get(K))==null?void 0:Z.keywords)!=null?J:[],oe=I(ee,he);n.current.filtered.items.set(K,oe),oe>0&&ie++}for(let[K,ee]of a.current)for(let he of ee)if(n.current.filtered.items.get(he)>0){n.current.filtered.groups.add(K);break}n.current.filtered.count=ie}function B(){var j,P,Z;let J=W();J&&(((j=J.parentElement)==null?void 0:j.firstChild)===J&&((Z=(P=J.closest(uu))==null?void 0:P.querySelector(jre))==null||Z.scrollIntoView({block:"nearest"})),J.scrollIntoView({block:"nearest"}))}function W(){var j;return(j=N.current)==null?void 0:j.querySelector(`${PT}[aria-selected="true"]`)}function Q(){var j;return Array.from(((j=N.current)==null?void 0:j.querySelectorAll(kO))||[])}function H(j){let P=Q()[j];P&&_.setState("value",P.getAttribute(ui))}function U(j){var P;let Z=W(),J=Q(),ie=J.findIndex(ee=>ee===Z),K=J[ie+j];(P=l.current)!=null&&P.loop&&(K=ie+j<0?J[J.length-1]:ie+j===J.length?J[0]:J[ie+j]),K&&_.setState("value",K.getAttribute(ui))}function F(j){let P=W(),Z=P==null?void 0:P.closest(uu),J;for(;Z&&!J;)Z=j>0?Xre(Z,uu):Zre(Z,uu),J=Z==null?void 0:Z.querySelector(kO);J?_.setState("value",J.getAttribute(ui)):U(j)}let Y=()=>H(Q().length-1),M=j=>{j.preventDefault(),j.metaKey?Y():j.altKey?F(1):U(1)},V=j=>{j.preventDefault(),j.metaKey?H(0):j.altKey?F(-1):U(-1)};return w.createElement(Je.div,{ref:t,tabIndex:-1,...A,"cmdk-root":"",onKeyDown:j=>{var P;if((P=A.onKeyDown)==null||P.call(A,j),!j.defaultPrevented)switch(j.key){case"n":case"j":{k&&j.ctrlKey&&M(j);break}case"ArrowDown":{M(j);break}case"p":case"k":{k&&j.ctrlKey&&V(j);break}case"ArrowUp":{V(j);break}case"Home":{j.preventDefault(),H(0);break}case"End":{j.preventDefault(),Y();break}case"Enter":if(!j.nativeEvent.isComposing&&j.keyCode!==229){j.preventDefault();let Z=W();if(Z){let J=new Event(nk);Z.dispatchEvent(J)}}}}},w.createElement("label",{"cmdk-label":"",htmlFor:L.inputId,id:L.labelId,style:eae},c),Tp(e,j=>w.createElement(v5.Provider,{value:_},w.createElement(y5.Provider,{value:L},j))))}),Gre=w.forwardRef((e,t)=>{var n,r;let a=An(),o=w.useRef(null),s=w.useContext(S5),l=rc(),c=w5(e),d=(r=(n=c.current)==null?void 0:n.forceMount)!=null?r:s==null?void 0:s.forceMount;vi(()=>{if(!d)return l.item(a,s==null?void 0:s.id)},[d]);let p=x5(a,o,[e.value,e.children,o],e.keywords),g=FT(),m=Si(C=>C.value&&C.value===p.current),b=Si(C=>d||l.filter()===!1?!0:C.search?C.filtered.items.get(a)>0:!0);w.useEffect(()=>{let C=o.current;if(!(!C||e.disabled))return C.addEventListener(nk,y),()=>C.removeEventListener(nk,y)},[b,e.onSelect,e.disabled]);function y(){var C,_;v(),(_=(C=c.current).onSelect)==null||_.call(C,p.current)}function v(){g.setState("value",p.current,!0)}if(!b)return null;let{disabled:k,value:A,onSelect:x,forceMount:R,keywords:O,...N}=e;return w.createElement(Je.div,{ref:Ru([o,t]),...N,id:a,"cmdk-item":"",role:"option","aria-disabled":!!k,"aria-selected":!!m,"data-disabled":!!k,"data-selected":!!m,onPointerMove:k||l.getDisablePointerSelection()?void 0:v,onClick:k?void 0:y},e.children)}),Hre=w.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:a,...o}=e,s=An(),l=w.useRef(null),c=w.useRef(null),d=An(),p=rc(),g=Si(b=>a||p.filter()===!1?!0:b.search?b.filtered.groups.has(s):!0);vi(()=>p.group(s),[]),x5(s,l,[e.value,e.heading,c]);let m=w.useMemo(()=>({id:s,forceMount:a}),[a]);return w.createElement(Je.div,{ref:Ru([l,t]),...o,"cmdk-group":"",role:"presentation",hidden:g?void 0:!0},n&&w.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:d},n),Tp(e,b=>w.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?d:void 0},w.createElement(S5.Provider,{value:m},b))))}),$re=w.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,a=w.useRef(null),o=Si(s=>!s.search);return!n&&!o?null:w.createElement(Je.div,{ref:Ru([a,t]),...r,"cmdk-separator":"",role:"separator"})}),qre=w.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,a=e.value!=null,o=FT(),s=Si(p=>p.search),l=Si(p=>p.value),c=rc(),d=w.useMemo(()=>{var p;let g=(p=c.listInnerRef.current)==null?void 0:p.querySelector(`${PT}[${ui}="${encodeURIComponent(l)}"]`);return g==null?void 0:g.getAttribute("id")},[]);return w.useEffect(()=>{e.value!=null&&o.setState("search",e.value)},[e.value]),w.createElement(Je.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":d,id:c.inputId,type:"text",value:a?e.value:s,onChange:p=>{a||o.setState("search",p.target.value),n==null||n(p.target.value)}})}),Vre=w.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...a}=e,o=w.useRef(null),s=w.useRef(null),l=rc();return w.useEffect(()=>{if(s.current&&o.current){let c=s.current,d=o.current,p,g=new ResizeObserver(()=>{p=requestAnimationFrame(()=>{let m=c.offsetHeight;d.style.setProperty("--cmdk-list-height",m.toFixed(1)+"px")})});return g.observe(c),()=>{cancelAnimationFrame(p),g.unobserve(c)}}},[]),w.createElement(Je.div,{ref:Ru([o,t]),...a,"cmdk-list":"",role:"listbox","aria-label":r,id:l.listId},Tp(e,c=>w.createElement("div",{ref:Ru([s,l.listInnerRef]),"cmdk-list-sizer":""},c)))}),Wre=w.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:a,contentClassName:o,container:s,...l}=e;return w.createElement(Kk,{open:n,onOpenChange:r},w.createElement(Xk,{container:s},w.createElement(rp,{"cmdk-overlay":"",className:a}),w.createElement(ap,{"aria-label":e.label,"cmdk-dialog":"",className:o},w.createElement(E5,{ref:t,...l}))))}),Yre=w.forwardRef((e,t)=>Si(n=>n.filtered.count===0)?w.createElement(Je.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Kre=w.forwardRef((e,t)=>{let{progress:n,children:r,label:a="Loading...",...o}=e;return w.createElement(Je.div,{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},Tp(e,s=>w.createElement("div",{"aria-hidden":!0},s)))}),Vn=Object.assign(E5,{List:Vre,Item:Gre,Input:qre,Group:Hre,Separator:$re,Dialog:Wre,Empty:Yre,Loading:Kre});function Xre(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function Zre(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function w5(e){let t=w.useRef(e);return vi(()=>{t.current=e}),t}var vi=typeof window>"u"?w.useEffect:w.useLayoutEffect;function Es(e){let t=w.useRef();return t.current===void 0&&(t.current=e()),t}function Ru(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function Si(e){let t=FT(),n=()=>e(t.snapshot());return Bre.useSyncExternalStore(t.subscribe,n,n)}function x5(e,t,n,r=[]){let a=w.useRef(),o=rc();return vi(()=>{var s;let l=(()=>{var d;for(let p of n){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(d=p.current.textContent)==null?void 0:d.trim():a.current}})(),c=r.map(d=>d.trim());o.value(e,l,c),(s=t.current)==null||s.setAttribute(ui,l),a.current=l}),a}var Qre=()=>{let[e,t]=w.useState(),n=Es(()=>new Map);return vi(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,a)=>{n.current.set(r,a),t({})}};function Jre(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function Tp({asChild:e,children:t},n){return e&&w.isValidElement(t)?w.cloneElement(Jre(t),{ref:t.ref},n(t.props.children)):n(t)}var eae={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const Ap=w.forwardRef(({className:e,...t},n)=>E.jsx(Vn,{ref:n,className:Me("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t}));Ap.displayName=Vn.displayName;const zT=w.forwardRef(({className:e,...t},n)=>E.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[E.jsx(VZ,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),E.jsx(Vn.Input,{ref:n,className:Me("placeholder:text-muted-foreground flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));zT.displayName=Vn.Input.displayName;const Rp=w.forwardRef(({className:e,...t},n)=>E.jsx(Vn.List,{ref:n,className:Me("max-h-[300px] overflow-x-hidden overflow-y-auto",e),...t}));Rp.displayName=Vn.List.displayName;const BT=w.forwardRef((e,t)=>E.jsx(Vn.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));BT.displayName=Vn.Empty.displayName;const el=w.forwardRef(({className:e,...t},n)=>E.jsx(Vn.Group,{ref:n,className:Me("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",e),...t}));el.displayName=Vn.Group.displayName;const tae=w.forwardRef(({className:e,...t},n)=>E.jsx(Vn.Separator,{ref:n,className:Me("bg-border -mx-1 h-px",e),...t}));tae.displayName=Vn.Separator.displayName;const tl=w.forwardRef(({className:e,...t},n)=>E.jsx(Vn.Item,{ref:n,className:Me("data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));tl.displayName=Vn.Item.displayName;const nae=({layout:e,autoRunFor:t,mainLayout:n})=>{const r=Ar(),[a,o]=w.useState(!1),s=w.useRef(null),{t:l}=Et(),c=w.useCallback(()=>{if(r)try{const p=r.getGraph();if(!p||p.order===0)return;const g=n.positions();G4(p,g,{duration:300})}catch(p){console.error("Error updating positions:",p),s.current&&(window.clearInterval(s.current),s.current=null,o(!1))}},[r,n]),d=w.useCallback(()=>{if(a){console.log("Stopping layout animation"),s.current&&(window.clearInterval(s.current),s.current=null);try{typeof e.kill=="function"?(e.kill(),console.log("Layout algorithm killed")):typeof e.stop=="function"&&(e.stop(),console.log("Layout algorithm stopped"))}catch(p){console.error("Error stopping layout algorithm:",p)}o(!1)}else console.log("Starting layout animation"),c(),s.current=window.setInterval(()=>{c()},200),o(!0),setTimeout(()=>{if(s.current){console.log("Auto-stopping layout animation after 3 seconds"),window.clearInterval(s.current),s.current=null,o(!1);try{typeof e.kill=="function"?e.kill():typeof e.stop=="function"&&e.stop()}catch(p){console.error("Error stopping layout algorithm:",p)}}},3e3)},[a,e,c]);return w.useEffect(()=>{if(!r){console.log("No sigma instance available");return}let p=null;return t!==void 0&&t>-1&&r.getGraph().order>0&&(console.log("Auto-starting layout animation"),c(),s.current=window.setInterval(()=>{c()},200),o(!0),t>0&&(p=window.setTimeout(()=>{console.log("Auto-stopping layout animation after timeout"),s.current&&(window.clearInterval(s.current),s.current=null),o(!1)},t))),()=>{s.current&&(window.clearInterval(s.current),s.current=null),p&&window.clearTimeout(p),o(!1)}},[t,r,c]),E.jsx(nt,{size:"icon",onClick:d,tooltip:l(a?"graphPanel.sideBar.layoutsControl.stopAnimation":"graphPanel.sideBar.layoutsControl.startAnimation"),variant:Er,children:a?E.jsx(MZ,{}):E.jsx(FZ,{})})},rae=()=>{const e=Ar(),{t}=Et(),[n,r]=w.useState("Circular"),[a,o]=w.useState(!1),s=Ie.use.graphLayoutMaxIterations(),l=Xne(),c=Vne(),d=Rre(),p=wre({maxIterations:s,settings:{margin:5,expansion:1.1,gridSize:1,ratio:1,speed:3}}),g=rre({maxIterations:s,settings:{attraction:3e-4,repulsion:.02,gravity:.02,inertia:.4,maxMove:100}}),m=g5({iterations:s}),b=xre(),y=are(),v=pre(),k=w.useMemo(()=>({Circular:{layout:l},Circlepack:{layout:c},Random:{layout:d},Noverlaps:{layout:p,worker:b},"Force Directed":{layout:g,worker:y},"Force Atlas":{layout:m,worker:v}}),[c,l,g,m,p,d,y,b,v]),A=w.useCallback(x=>{console.debug("Running layout:",x);const{positions:R}=k[x].layout;try{const O=e.getGraph();if(!O){console.error("No graph available");return}const N=R();console.log("Positions calculated, animating nodes"),G4(O,N,{duration:400}),r(x)}catch(O){console.error("Error running layout:",O)}},[k,e]);return E.jsxs(E.Fragment,{children:[E.jsx("div",{children:k[n]&&"worker"in k[n]&&E.jsx(nae,{layout:k[n].worker,mainLayout:k[n].layout})}),E.jsx("div",{children:E.jsxs(mp,{open:a,onOpenChange:o,children:[E.jsx(bp,{asChild:!0,children:E.jsx(nt,{size:"icon",variant:Er,onClick:()=>o(x=>!x),tooltip:t("graphPanel.sideBar.layoutsControl.layoutGraph"),children:E.jsx(wZ,{})})}),E.jsx(Xu,{side:"right",align:"center",className:"p-1",children:E.jsx(Ap,{children:E.jsx(Rp,{children:E.jsx(el,{children:Object.keys(k).map(x=>E.jsx(tl,{onSelect:()=>{A(x)},className:"cursor-pointer text-xs",children:t(`graphPanel.sideBar.layoutsControl.layouts.${x}`)},x))})})})})]})})]})},k5=()=>{const e=w.useContext(ej);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e},Ld=e=>!!(e.type.startsWith("mouse")&&e.buttons!==0),aae=({disableHoverEffect:e})=>{const t=Ar(),n=W4(),r=V4(),a=Ie.use.graphLayoutMaxIterations(),{assign:o}=g5({iterations:a}),{theme:s}=k5(),l=Ie.use.enableHideUnselectedEdges(),c=Ie.use.enableEdgeEvents(),d=Ie.use.showEdgeLabel(),p=Ie.use.showNodeLabel(),g=Ie.use.minEdgeSize(),m=Ie.use.maxEdgeSize(),b=ze.use.selectedNode(),y=ze.use.focusedNode(),v=ze.use.selectedEdge(),k=ze.use.focusedEdge(),A=ze.use.sigmaGraph();return w.useEffect(()=>{if(A&&t){try{typeof t.setGraph=="function"?(t.setGraph(A),console.log("Binding graph to sigma instance")):(t.graph=A,console.warn("Simgma missing setGraph function, set graph property directly"))}catch(x){console.error("Error setting graph on sigma instance:",x)}o(),console.log("Initial layout applied to graph")}},[t,A,o,a]),w.useEffect(()=>{t&&(ze.getState().sigmaInstance||(console.log("Setting sigma instance from GraphControl"),ze.getState().setSigmaInstance(t)))},[t]),w.useEffect(()=>{const{setFocusedNode:x,setSelectedNode:R,setFocusedEdge:O,setSelectedEdge:N,clearSelection:C}=ze.getState(),_={enterNode:L=>{Ld(L.event.original)||x(L.node)},leaveNode:L=>{Ld(L.event.original)||x(null)},clickNode:L=>{R(L.node),N(null)},clickStage:()=>C()};c&&(_.clickEdge=L=>{N(L.edge),R(null)},_.enterEdge=L=>{Ld(L.event.original)||O(L.edge)},_.leaveEdge=L=>{Ld(L.event.original)||O(null)}),n(_)},[n,c]),w.useEffect(()=>{if(t&&A){const x=t.getGraph();let R=Number.MAX_SAFE_INTEGER,O=0;x.forEachEdge(C=>{const _=x.getEdgeAttribute(C,"originalWeight")||1;typeof _=="number"&&(R=Math.min(R,_),O=Math.max(O,_))});const N=O-R;if(N>0){const C=m-g;x.forEachEdge(_=>{const L=x.getEdgeAttribute(_,"originalWeight")||1;if(typeof L=="number"){const I=g+C*Math.pow((L-R)/N,.5);x.setEdgeAttribute(_,"size",I)}})}else x.forEachEdge(C=>{x.setEdgeAttribute(C,"size",g)});t.refresh()}},[t,A,g,m]),w.useEffect(()=>{const x=s==="dark",R=x?iV:void 0,O=x?cV:void 0;r({enableEdgeEvents:c,renderEdgeLabels:d,renderLabels:p,nodeReducer:(N,C)=>{const _=t.getGraph(),L={...C,highlighted:C.highlighted||!1,labelColor:R};if(!e){L.highlighted=!1;const I=y||b,D=k||v;if(I&&_.hasNode(I))try{(N===I||_.neighbors(I).includes(N))&&(L.highlighted=!0,N===b&&(L.borderColor=uV))}catch(G){console.error("Error in nodeReducer:",G)}else if(D&&_.hasEdge(D))_.extremities(D).includes(N)&&(L.highlighted=!0,L.size=3);else return L;L.highlighted?x&&(L.labelColor=sV):L.color=lV}return L},edgeReducer:(N,C)=>{const _=t.getGraph(),L={...C,hidden:!1,labelColor:R,color:O};if(!e){const I=y||b;if(I&&_.hasNode(I))try{l?_.extremities(N).includes(I)||(L.hidden=!0):_.extremities(N).includes(I)&&(L.color=L_)}catch(D){console.error("Error in edgeReducer:",D)}else{const D=v&&_.hasEdge(v)?v:null,G=k&&_.hasEdge(k)?k:null;(D||G)&&(N===D?L.color=dV:N===G?L.color=L_:l&&(L.hidden=!0))}}return L}})},[b,y,v,k,r,t,e,s,l,c,d,p]),null},oae=()=>{const{zoomIn:e,zoomOut:t,reset:n}=Y4({duration:200,factor:1.5}),r=Ar(),{t:a}=Et(),o=w.useCallback(()=>e(),[e]),s=w.useCallback(()=>t(),[t]),l=w.useCallback(()=>{if(r)try{r.setCustomBBox(null),r.refresh();const p=r.getGraph();if(!(p!=null&&p.order)||p.nodes().length===0){n();return}r.getCamera().animate({x:.5,y:.5,ratio:1.1},{duration:1e3})}catch(p){console.error("Error resetting zoom:",p),n()}},[r,n]),c=w.useCallback(()=>{if(!r)return;const p=r.getCamera(),m=p.angle+Math.PI/8;p.animate({angle:m},{duration:200})},[r]),d=w.useCallback(()=>{if(!r)return;const p=r.getCamera(),m=p.angle-Math.PI/8;p.animate({angle:m},{duration:200})},[r]);return E.jsxs(E.Fragment,{children:[E.jsx(nt,{variant:Er,onClick:d,tooltip:a("graphPanel.sideBar.zoomControl.rotateCameraCounterClockwise"),size:"icon",children:E.jsx(jZ,{})}),E.jsx(nt,{variant:Er,onClick:c,tooltip:a("graphPanel.sideBar.zoomControl.rotateCamera"),size:"icon",children:E.jsx(GZ,{})}),E.jsx(nt,{variant:Er,onClick:l,tooltip:a("graphPanel.sideBar.zoomControl.resetZoom"),size:"icon",children:E.jsx(mZ,{})}),E.jsx(nt,{variant:Er,onClick:o,tooltip:a("graphPanel.sideBar.zoomControl.zoomIn"),size:"icon",children:E.jsx(aQ,{})}),E.jsx(nt,{variant:Er,onClick:s,tooltip:a("graphPanel.sideBar.zoomControl.zoomOut"),size:"icon",children:E.jsx(iQ,{})})]})},iae=()=>{const{isFullScreen:e,toggle:t}=Gte(),{t:n}=Et();return E.jsx(E.Fragment,{children:e?E.jsx(nt,{variant:Er,onClick:t,tooltip:n("graphPanel.sideBar.fullScreenControl.windowed"),size:"icon",children:E.jsx(OZ,{})}):E.jsx(nt,{variant:Er,onClick:t,tooltip:n("graphPanel.sideBar.fullScreenControl.fullScreen"),size:"icon",children:E.jsx(_Z,{})})})};var jT="Checkbox",[sae,g0e]=$r(jT),[lae,uae]=sae(jT),T5=w.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:a,defaultChecked:o,required:s,disabled:l,value:c="on",onCheckedChange:d,form:p,...g}=e,[m,b]=w.useState(null),y=mt(t,O=>b(O)),v=w.useRef(!1),k=m?p||!!m.closest("form"):!0,[A=!1,x]=ja({prop:a,defaultProp:o,onChange:d}),R=w.useRef(A);return w.useEffect(()=>{const O=m==null?void 0:m.form;if(O){const N=()=>x(R.current);return O.addEventListener("reset",N),()=>O.removeEventListener("reset",N)}},[m,x]),E.jsxs(lae,{scope:n,state:A,disabled:l,children:[E.jsx(Je.button,{type:"button",role:"checkbox","aria-checked":Ro(A)?"mixed":A,"aria-required":s,"data-state":C5(A),"data-disabled":l?"":void 0,disabled:l,value:c,...g,ref:y,onKeyDown:Ke(e.onKeyDown,O=>{O.key==="Enter"&&O.preventDefault()}),onClick:Ke(e.onClick,O=>{x(N=>Ro(N)?!0:!N),k&&(v.current=O.isPropagationStopped(),v.current||O.stopPropagation())})}),k&&E.jsx(cae,{control:m,bubbles:!v.current,name:r,value:c,checked:A,required:s,disabled:l,form:p,style:{transform:"translateX(-100%)"},defaultChecked:Ro(o)?!1:o})]})});T5.displayName=jT;var A5="CheckboxIndicator",R5=w.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...a}=e,o=uae(A5,n);return E.jsx(Tr,{present:r||Ro(o.state)||o.state===!0,children:E.jsx(Je.span,{"data-state":C5(o.state),"data-disabled":o.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})});R5.displayName=A5;var cae=e=>{const{control:t,checked:n,bubbles:r=!0,defaultChecked:a,...o}=e,s=w.useRef(null),l=n3(n),c=dU(t);w.useEffect(()=>{const p=s.current,g=window.HTMLInputElement.prototype,b=Object.getOwnPropertyDescriptor(g,"checked").set;if(l!==n&&b){const y=new Event("click",{bubbles:r});p.indeterminate=Ro(n),b.call(p,Ro(n)?!1:n),p.dispatchEvent(y)}},[l,n,r]);const d=w.useRef(Ro(n)?!1:n);return E.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:a??d.current,...o,tabIndex:-1,ref:s,style:{...e.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Ro(e){return e==="indeterminate"}function C5(e){return Ro(e)?"indeterminate":e?"checked":"unchecked"}var _5=T5,dae=R5;const Ns=w.forwardRef(({className:e,...t},n)=>E.jsx(_5,{ref:n,className:Me("peer border-primary ring-offset-background focus-visible:ring-ring data-[state=checked]:bg-muted data-[state=checked]:text-muted-foreground h-4 w-4 shrink-0 rounded-sm border focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:E.jsx(dae,{className:Me("flex items-center justify-center text-current"),children:E.jsx(bT,{className:"h-4 w-4"})})}));Ns.displayName=_5.displayName;var fae="Separator",TO="horizontal",pae=["horizontal","vertical"],N5=w.forwardRef((e,t)=>{const{decorative:n,orientation:r=TO,...a}=e,o=gae(r)?r:TO,l=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return E.jsx(Je.div,{"data-orientation":o,...l,...a,ref:t})});N5.displayName=fae;function gae(e){return pae.includes(e)}var O5=N5;const ws=w.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},a)=>E.jsx(O5,{ref:a,decorative:n,orientation:t,className:Me("bg-border shrink-0",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));ws.displayName=O5.displayName;const vo=({checked:e,onCheckedChange:t,label:n})=>E.jsxs("div",{className:"flex items-center gap-2",children:[E.jsx(Ns,{checked:e,onCheckedChange:t}),E.jsx("label",{htmlFor:"terms",className:"text-sm leading-none font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:n})]}),tb=({value:e,onEditFinished:t,label:n,min:r,max:a,defaultValue:o})=>{const{t:s}=Et(),[l,c]=w.useState(e),d=w.useCallback(m=>{const b=m.target.value.trim();if(b.length===0){c(null);return}const y=Number.parseInt(b);if(!isNaN(y)&&y!==l){if(r!==void 0&&ya)return;c(y)}},[l,r,a]),p=w.useCallback(()=>{l!==null&&e!==l&&t(l)},[e,l,t]),g=w.useCallback(()=>{o!==void 0&&e!==o&&(c(o),t(o))},[o,e,t]);return E.jsxs("div",{className:"flex flex-col gap-2",children:[E.jsx("label",{htmlFor:"terms",className:"text-sm leading-none font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:n}),E.jsxs("div",{className:"flex items-center gap-1",children:[E.jsx(kr,{type:"number",value:l===null?"":l,onChange:d,className:"h-6 w-full min-w-0 pr-1",min:r,max:a,onBlur:p,onKeyDown:m=>{m.key==="Enter"&&p()}}),o!==void 0&&E.jsx(nt,{variant:"ghost",size:"icon",className:"h-6 w-6 flex-shrink-0 hover:bg-muted text-muted-foreground hover:text-foreground",onClick:g,type:"button",title:s("graphPanel.sideBar.settings.resetToDefault"),children:E.jsx(jU,{className:"h-3.5 w-3.5"})})]})]})};function hae(){const[e,t]=w.useState(!1),n=Ie.use.showPropertyPanel(),r=Ie.use.showNodeSearchBar(),a=Ie.use.showNodeLabel(),o=Ie.use.enableEdgeEvents(),s=Ie.use.enableNodeDrag(),l=Ie.use.enableHideUnselectedEdges(),c=Ie.use.showEdgeLabel(),d=Ie.use.minEdgeSize(),p=Ie.use.maxEdgeSize(),g=Ie.use.graphQueryMaxDepth(),m=Ie.use.graphMaxNodes(),b=Ie.use.graphLayoutMaxIterations(),y=Ie.use.enableHealthCheck(),v=w.useCallback(()=>Ie.setState($=>({enableNodeDrag:!$.enableNodeDrag})),[]),k=w.useCallback(()=>Ie.setState($=>({enableEdgeEvents:!$.enableEdgeEvents})),[]),A=w.useCallback(()=>Ie.setState($=>({enableHideUnselectedEdges:!$.enableHideUnselectedEdges})),[]),x=w.useCallback(()=>Ie.setState($=>({showEdgeLabel:!$.showEdgeLabel})),[]),R=w.useCallback(()=>Ie.setState($=>({showPropertyPanel:!$.showPropertyPanel})),[]),O=w.useCallback(()=>Ie.setState($=>({showNodeSearchBar:!$.showNodeSearchBar})),[]),N=w.useCallback(()=>Ie.setState($=>({showNodeLabel:!$.showNodeLabel})),[]),C=w.useCallback(()=>Ie.setState($=>({enableHealthCheck:!$.enableHealthCheck})),[]),_=w.useCallback($=>{if($<1)return;Ie.setState({graphQueryMaxDepth:$});const B=Ie.getState().queryLabel;Ie.getState().setQueryLabel(""),setTimeout(()=>{Ie.getState().setQueryLabel(B)},300)},[]),L=w.useCallback($=>{if($<1||$>1e3)return;Ie.setState({graphMaxNodes:$});const B=Ie.getState().queryLabel;Ie.getState().setQueryLabel(""),setTimeout(()=>{Ie.getState().setQueryLabel(B)},300)},[]),I=w.useCallback($=>{$<1||Ie.setState({graphLayoutMaxIterations:$})},[]),{t:D}=Et(),G=()=>t(!1);return E.jsx(E.Fragment,{children:E.jsxs(mp,{open:e,onOpenChange:t,children:[E.jsx(bp,{asChild:!0,children:E.jsx(nt,{variant:Er,tooltip:D("graphPanel.sideBar.settings.settings"),size:"icon",children:E.jsx(XZ,{})})}),E.jsx(Xu,{side:"right",align:"start",className:"mb-2 p-2",onCloseAutoFocus:$=>$.preventDefault(),children:E.jsxs("div",{className:"flex flex-col gap-2",children:[E.jsx(vo,{checked:y,onCheckedChange:C,label:D("graphPanel.sideBar.settings.healthCheck")}),E.jsx(ws,{}),E.jsx(vo,{checked:n,onCheckedChange:R,label:D("graphPanel.sideBar.settings.showPropertyPanel")}),E.jsx(vo,{checked:r,onCheckedChange:O,label:D("graphPanel.sideBar.settings.showSearchBar")}),E.jsx(ws,{}),E.jsx(vo,{checked:a,onCheckedChange:N,label:D("graphPanel.sideBar.settings.showNodeLabel")}),E.jsx(vo,{checked:s,onCheckedChange:v,label:D("graphPanel.sideBar.settings.nodeDraggable")}),E.jsx(ws,{}),E.jsx(vo,{checked:c,onCheckedChange:x,label:D("graphPanel.sideBar.settings.showEdgeLabel")}),E.jsx(vo,{checked:l,onCheckedChange:A,label:D("graphPanel.sideBar.settings.hideUnselectedEdges")}),E.jsx(vo,{checked:o,onCheckedChange:k,label:D("graphPanel.sideBar.settings.edgeEvents")}),E.jsxs("div",{className:"flex flex-col gap-2",children:[E.jsx("label",{className:"text-sm leading-none font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:D("graphPanel.sideBar.settings.edgeSizeRange")}),E.jsxs("div",{className:"flex items-center gap-2",children:[E.jsx(kr,{type:"number",value:d,onChange:$=>{const B=Number($.target.value);!isNaN(B)&&B>=1&&B<=p&&Ie.setState({minEdgeSize:B})},className:"h-6 w-16 min-w-0 pr-1",min:1,max:Math.min(p,10)}),E.jsx("span",{children:"-"}),E.jsxs("div",{className:"flex items-center gap-1",children:[E.jsx(kr,{type:"number",value:p,onChange:$=>{const B=Number($.target.value);!isNaN(B)&&B>=d&&B>=1&&B<=10&&Ie.setState({maxEdgeSize:B})},className:"h-6 w-16 min-w-0 pr-1",min:d,max:10}),E.jsx(nt,{variant:"ghost",size:"icon",className:"h-6 w-6 flex-shrink-0 hover:bg-muted text-muted-foreground hover:text-foreground",onClick:()=>Ie.setState({minEdgeSize:1,maxEdgeSize:5}),type:"button",title:D("graphPanel.sideBar.settings.resetToDefault"),children:E.jsx(jU,{className:"h-3.5 w-3.5"})})]})]})]}),E.jsx(ws,{}),E.jsx(tb,{label:D("graphPanel.sideBar.settings.maxQueryDepth"),min:1,value:g,defaultValue:3,onEditFinished:_}),E.jsx(tb,{label:D("graphPanel.sideBar.settings.maxNodes"),min:1,max:1e3,value:m,defaultValue:1e3,onEditFinished:L}),E.jsx(tb,{label:D("graphPanel.sideBar.settings.maxLayoutIterations"),min:1,max:30,value:b,defaultValue:15,onEditFinished:I}),E.jsx(ws,{}),E.jsx(nt,{onClick:G,variant:"outline",size:"sm",className:"ml-auto px-4",children:D("graphPanel.sideBar.settings.save")})]})})]})})}const mae="ENTRIES",I5="KEYS",D5="VALUES",bn="";class nb{constructor(t,n){const r=t._tree,a=Array.from(r.keys());this.set=t,this._type=n,this._path=a.length>0?[{node:r,keys:a}]:[]}next(){const t=this.dive();return this.backtrack(),t}dive(){if(this._path.length===0)return{done:!0,value:void 0};const{node:t,keys:n}=hs(this._path);if(hs(n)===bn)return{done:!1,value:this.result()};const r=t.get(hs(n));return this._path.push({node:r,keys:Array.from(r.keys())}),this.dive()}backtrack(){if(this._path.length===0)return;const t=hs(this._path).keys;t.pop(),!(t.length>0)&&(this._path.pop(),this.backtrack())}key(){return this.set._prefix+this._path.map(({keys:t})=>hs(t)).filter(t=>t!==bn).join("")}value(){return hs(this._path).node.get(bn)}result(){switch(this._type){case D5:return this.value();case I5:return this.key();default:return[this.key(),this.value()]}}[Symbol.iterator](){return this}}const hs=e=>e[e.length-1],bae=(e,t,n)=>{const r=new Map;if(t===void 0)return r;const a=t.length+1,o=a+n,s=new Uint8Array(o*a).fill(n+1);for(let l=0;l{const c=o*s;e:for(const d of e.keys())if(d===bn){const p=a[c-1];p<=n&&r.set(l,[e.get(d),p])}else{let p=o;for(let g=0;gn)continue e}L5(e.get(d),t,n,r,a,p,s,l+d)}};class To{constructor(t=new Map,n=""){this._size=void 0,this._tree=t,this._prefix=n}atPrefix(t){if(!t.startsWith(this._prefix))throw new Error("Mismatched prefix");const[n,r]=_f(this._tree,t.slice(this._prefix.length));if(n===void 0){const[a,o]=UT(r);for(const s of a.keys())if(s!==bn&&s.startsWith(o)){const l=new Map;return l.set(s.slice(o.length),a.get(s)),new To(l,t)}}return new To(n,t)}clear(){this._size=void 0,this._tree.clear()}delete(t){return this._size=void 0,yae(this._tree,t)}entries(){return new nb(this,mae)}forEach(t){for(const[n,r]of this)t(n,r,this)}fuzzyGet(t,n){return bae(this._tree,t,n)}get(t){const n=rk(this._tree,t);return n!==void 0?n.get(bn):void 0}has(t){const n=rk(this._tree,t);return n!==void 0&&n.has(bn)}keys(){return new nb(this,I5)}set(t,n){if(typeof t!="string")throw new Error("key must be a string");return this._size=void 0,rb(this._tree,t).set(bn,n),this}get size(){if(this._size)return this._size;this._size=0;const t=this.entries();for(;!t.next().done;)this._size+=1;return this._size}update(t,n){if(typeof t!="string")throw new Error("key must be a string");this._size=void 0;const r=rb(this._tree,t);return r.set(bn,n(r.get(bn))),this}fetch(t,n){if(typeof t!="string")throw new Error("key must be a string");this._size=void 0;const r=rb(this._tree,t);let a=r.get(bn);return a===void 0&&r.set(bn,a=n()),a}values(){return new nb(this,D5)}[Symbol.iterator](){return this.entries()}static from(t){const n=new To;for(const[r,a]of t)n.set(r,a);return n}static fromObject(t){return To.from(Object.entries(t))}}const _f=(e,t,n=[])=>{if(t.length===0||e==null)return[e,n];for(const r of e.keys())if(r!==bn&&t.startsWith(r))return n.push([e,r]),_f(e.get(r),t.slice(r.length),n);return n.push([e,t]),_f(void 0,"",n)},rk=(e,t)=>{if(t.length===0||e==null)return e;for(const n of e.keys())if(n!==bn&&t.startsWith(n))return rk(e.get(n),t.slice(n.length))},rb=(e,t)=>{const n=t.length;e:for(let r=0;e&&r{const[n,r]=_f(e,t);if(n!==void 0){if(n.delete(bn),n.size===0)M5(r);else if(n.size===1){const[a,o]=n.entries().next().value;P5(r,a,o)}}},M5=e=>{if(e.length===0)return;const[t,n]=UT(e);if(t.delete(n),t.size===0)M5(e.slice(0,-1));else if(t.size===1){const[r,a]=t.entries().next().value;r!==bn&&P5(e.slice(0,-1),r,a)}},P5=(e,t,n)=>{if(e.length===0)return;const[r,a]=UT(e);r.set(a+t,n),r.delete(a)},UT=e=>e[e.length-1],GT="or",F5="and",vae="and_not";class Co{constructor(t){if((t==null?void 0:t.fields)==null)throw new Error('MiniSearch: option "fields" must be provided');const n=t.autoVacuum==null||t.autoVacuum===!0?ib:t.autoVacuum;this._options={...ob,...t,autoVacuum:n,searchOptions:{...AO,...t.searchOptions||{}},autoSuggestOptions:{...kae,...t.autoSuggestOptions||{}}},this._index=new To,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldIds={},this._fieldLength=new Map,this._avgFieldLength=[],this._nextId=0,this._storedFields=new Map,this._dirtCount=0,this._currentVacuum=null,this._enqueuedVacuum=null,this._enqueuedVacuumConditions=ok,this.addFields(this._options.fields)}add(t){const{extractField:n,tokenize:r,processTerm:a,fields:o,idField:s}=this._options,l=n(t,s);if(l==null)throw new Error(`MiniSearch: document does not have ID field "${s}"`);if(this._idToShortId.has(l))throw new Error(`MiniSearch: duplicate ID ${l}`);const c=this.addDocumentId(l);this.saveStoredFields(c,t);for(const d of o){const p=n(t,d);if(p==null)continue;const g=r(p.toString(),d),m=this._fieldIds[d],b=new Set(g).size;this.addFieldLength(c,m,this._documentCount-1,b);for(const y of g){const v=a(y,d);if(Array.isArray(v))for(const k of v)this.addTerm(m,c,k);else v&&this.addTerm(m,c,v)}}}addAll(t){for(const n of t)this.add(n)}addAllAsync(t,n={}){const{chunkSize:r=10}=n,a={chunk:[],promise:Promise.resolve()},{chunk:o,promise:s}=t.reduce(({chunk:l,promise:c},d,p)=>(l.push(d),(p+1)%r===0?{chunk:[],promise:c.then(()=>new Promise(g=>setTimeout(g,0))).then(()=>this.addAll(l))}:{chunk:l,promise:c}),a);return s.then(()=>this.addAll(o))}remove(t){const{tokenize:n,processTerm:r,extractField:a,fields:o,idField:s}=this._options,l=a(t,s);if(l==null)throw new Error(`MiniSearch: document does not have ID field "${s}"`);const c=this._idToShortId.get(l);if(c==null)throw new Error(`MiniSearch: cannot remove document with ID ${l}: it is not in the index`);for(const d of o){const p=a(t,d);if(p==null)continue;const g=n(p.toString(),d),m=this._fieldIds[d],b=new Set(g).size;this.removeFieldLength(c,m,this._documentCount,b);for(const y of g){const v=r(y,d);if(Array.isArray(v))for(const k of v)this.removeTerm(m,c,k);else v&&this.removeTerm(m,c,v)}}this._storedFields.delete(c),this._documentIds.delete(c),this._idToShortId.delete(l),this._fieldLength.delete(c),this._documentCount-=1}removeAll(t){if(t)for(const n of t)this.remove(n);else{if(arguments.length>0)throw new Error("Expected documents to be present. Omit the argument to remove all documents.");this._index=new To,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldLength=new Map,this._avgFieldLength=[],this._storedFields=new Map,this._nextId=0}}discard(t){const n=this._idToShortId.get(t);if(n==null)throw new Error(`MiniSearch: cannot discard document with ID ${t}: it is not in the index`);this._idToShortId.delete(t),this._documentIds.delete(n),this._storedFields.delete(n),(this._fieldLength.get(n)||[]).forEach((r,a)=>{this.removeFieldLength(n,a,this._documentCount,r)}),this._fieldLength.delete(n),this._documentCount-=1,this._dirtCount+=1,this.maybeAutoVacuum()}maybeAutoVacuum(){if(this._options.autoVacuum===!1)return;const{minDirtFactor:t,minDirtCount:n,batchSize:r,batchWait:a}=this._options.autoVacuum;this.conditionalVacuum({batchSize:r,batchWait:a},{minDirtCount:n,minDirtFactor:t})}discardAll(t){const n=this._options.autoVacuum;try{this._options.autoVacuum=!1;for(const r of t)this.discard(r)}finally{this._options.autoVacuum=n}this.maybeAutoVacuum()}replace(t){const{idField:n,extractField:r}=this._options,a=r(t,n);this.discard(a),this.add(t)}vacuum(t={}){return this.conditionalVacuum(t)}conditionalVacuum(t,n){return this._currentVacuum?(this._enqueuedVacuumConditions=this._enqueuedVacuumConditions&&n,this._enqueuedVacuum!=null?this._enqueuedVacuum:(this._enqueuedVacuum=this._currentVacuum.then(()=>{const r=this._enqueuedVacuumConditions;return this._enqueuedVacuumConditions=ok,this.performVacuuming(t,r)}),this._enqueuedVacuum)):this.vacuumConditionsMet(n)===!1?Promise.resolve():(this._currentVacuum=this.performVacuuming(t),this._currentVacuum)}async performVacuuming(t,n){const r=this._dirtCount;if(this.vacuumConditionsMet(n)){const a=t.batchSize||ak.batchSize,o=t.batchWait||ak.batchWait;let s=1;for(const[l,c]of this._index){for(const[d,p]of c)for(const[g]of p)this._documentIds.has(g)||(p.size<=1?c.delete(d):p.delete(g));this._index.get(l).size===0&&this._index.delete(l),s%a===0&&await new Promise(d=>setTimeout(d,o)),s+=1}this._dirtCount-=r}await null,this._currentVacuum=this._enqueuedVacuum,this._enqueuedVacuum=null}vacuumConditionsMet(t){if(t==null)return!0;let{minDirtCount:n,minDirtFactor:r}=t;return n=n||ib.minDirtCount,r=r||ib.minDirtFactor,this.dirtCount>=n&&this.dirtFactor>=r}get isVacuuming(){return this._currentVacuum!=null}get dirtCount(){return this._dirtCount}get dirtFactor(){return this._dirtCount/(1+this._documentCount+this._dirtCount)}has(t){return this._idToShortId.has(t)}getStoredFields(t){const n=this._idToShortId.get(t);if(n!=null)return this._storedFields.get(n)}search(t,n={}){const{searchOptions:r}=this._options,a={...r,...n},o=this.executeQuery(t,n),s=[];for(const[l,{score:c,terms:d,match:p}]of o){const g=d.length||1,m={id:this._documentIds.get(l),score:c*g,terms:Object.keys(p),queryTerms:d,match:p};Object.assign(m,this._storedFields.get(l)),(a.filter==null||a.filter(m))&&s.push(m)}return t===Co.wildcard&&a.boostDocument==null||s.sort(CO),s}autoSuggest(t,n={}){n={...this._options.autoSuggestOptions,...n};const r=new Map;for(const{score:o,terms:s}of this.search(t,n)){const l=s.join(" "),c=r.get(l);c!=null?(c.score+=o,c.count+=1):r.set(l,{score:o,terms:s,count:1})}const a=[];for(const[o,{score:s,terms:l,count:c}]of r)a.push({suggestion:o,terms:l,score:s/c});return a.sort(CO),a}get documentCount(){return this._documentCount}get termCount(){return this._index.size}static loadJSON(t,n){if(n==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJS(JSON.parse(t),n)}static async loadJSONAsync(t,n){if(n==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJSAsync(JSON.parse(t),n)}static getDefault(t){if(ob.hasOwnProperty(t))return ab(ob,t);throw new Error(`MiniSearch: unknown option "${t}"`)}static loadJS(t,n){const{index:r,documentIds:a,fieldLength:o,storedFields:s,serializationVersion:l}=t,c=this.instantiateMiniSearch(t,n);c._documentIds=Md(a),c._fieldLength=Md(o),c._storedFields=Md(s);for(const[d,p]of c._documentIds)c._idToShortId.set(p,d);for(const[d,p]of r){const g=new Map;for(const m of Object.keys(p)){let b=p[m];l===1&&(b=b.ds),g.set(parseInt(m,10),Md(b))}c._index.set(d,g)}return c}static async loadJSAsync(t,n){const{index:r,documentIds:a,fieldLength:o,storedFields:s,serializationVersion:l}=t,c=this.instantiateMiniSearch(t,n);c._documentIds=await Pd(a),c._fieldLength=await Pd(o),c._storedFields=await Pd(s);for(const[p,g]of c._documentIds)c._idToShortId.set(g,p);let d=0;for(const[p,g]of r){const m=new Map;for(const b of Object.keys(g)){let y=g[b];l===1&&(y=y.ds),m.set(parseInt(b,10),await Pd(y))}++d%1e3===0&&await z5(0),c._index.set(p,m)}return c}static instantiateMiniSearch(t,n){const{documentCount:r,nextId:a,fieldIds:o,averageFieldLength:s,dirtCount:l,serializationVersion:c}=t;if(c!==1&&c!==2)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");const d=new Co(n);return d._documentCount=r,d._nextId=a,d._idToShortId=new Map,d._fieldIds=o,d._avgFieldLength=s,d._dirtCount=l||0,d._index=new To,d}executeQuery(t,n={}){if(t===Co.wildcard)return this.executeWildcardQuery(n);if(typeof t!="string"){const m={...n,...t,queries:void 0},b=t.queries.map(y=>this.executeQuery(y,m));return this.combineResults(b,m.combineWith)}const{tokenize:r,processTerm:a,searchOptions:o}=this._options,s={tokenize:r,processTerm:a,...o,...n},{tokenize:l,processTerm:c}=s,g=l(t).flatMap(m=>c(m)).filter(m=>!!m).map(xae(s)).map(m=>this.executeQuerySpec(m,s));return this.combineResults(g,s.combineWith)}executeQuerySpec(t,n){const r={...this._options.searchOptions,...n},a=(r.fields||this._options.fields).reduce((v,k)=>({...v,[k]:ab(r.boost,k)||1}),{}),{boostDocument:o,weights:s,maxFuzzy:l,bm25:c}=r,{fuzzy:d,prefix:p}={...AO.weights,...s},g=this._index.get(t.term),m=this.termResults(t.term,t.term,1,t.termBoost,g,a,o,c);let b,y;if(t.prefix&&(b=this._index.atPrefix(t.term)),t.fuzzy){const v=t.fuzzy===!0?.2:t.fuzzy,k=v<1?Math.min(l,Math.round(t.term.length*v)):v;k&&(y=this._index.fuzzyGet(t.term,k))}if(b)for(const[v,k]of b){const A=v.length-t.term.length;if(!A)continue;y==null||y.delete(v);const x=p*v.length/(v.length+.3*A);this.termResults(t.term,v,x,t.termBoost,k,a,o,c,m)}if(y)for(const v of y.keys()){const[k,A]=y.get(v);if(!A)continue;const x=d*v.length/(v.length+A);this.termResults(t.term,v,x,t.termBoost,k,a,o,c,m)}return m}executeWildcardQuery(t){const n=new Map,r={...this._options.searchOptions,...t};for(const[a,o]of this._documentIds){const s=r.boostDocument?r.boostDocument(o,"",this._storedFields.get(a)):1;n.set(a,{score:s,terms:[],match:{}})}return n}combineResults(t,n=GT){if(t.length===0)return new Map;const r=n.toLowerCase(),a=Sae[r];if(!a)throw new Error(`Invalid combination operator: ${n}`);return t.reduce(a)||new Map}toJSON(){const t=[];for(const[n,r]of this._index){const a={};for(const[o,s]of r)a[o]=Object.fromEntries(s);t.push([n,a])}return{documentCount:this._documentCount,nextId:this._nextId,documentIds:Object.fromEntries(this._documentIds),fieldIds:this._fieldIds,fieldLength:Object.fromEntries(this._fieldLength),averageFieldLength:this._avgFieldLength,storedFields:Object.fromEntries(this._storedFields),dirtCount:this._dirtCount,index:t,serializationVersion:2}}termResults(t,n,r,a,o,s,l,c,d=new Map){if(o==null)return d;for(const p of Object.keys(s)){const g=s[p],m=this._fieldIds[p],b=o.get(m);if(b==null)continue;let y=b.size;const v=this._avgFieldLength[m];for(const k of b.keys()){if(!this._documentIds.has(k)){this.removeTerm(m,k,n),y-=1;continue}const A=l?l(this._documentIds.get(k),n,this._storedFields.get(k)):1;if(!A)continue;const x=b.get(k),R=this._fieldLength.get(k)[m],O=wae(x,y,this._documentCount,R,v,c),N=r*a*g*A*O,C=d.get(k);if(C){C.score+=N,Tae(C.terms,t);const _=ab(C.match,n);_?_.push(p):C.match[n]=[p]}else d.set(k,{score:N,terms:[t],match:{[n]:[p]}})}}return d}addTerm(t,n,r){const a=this._index.fetch(r,_O);let o=a.get(t);if(o==null)o=new Map,o.set(n,1),a.set(t,o);else{const s=o.get(n);o.set(n,(s||0)+1)}}removeTerm(t,n,r){if(!this._index.has(r)){this.warnDocumentChanged(n,t,r);return}const a=this._index.fetch(r,_O),o=a.get(t);o==null||o.get(n)==null?this.warnDocumentChanged(n,t,r):o.get(n)<=1?o.size<=1?a.delete(t):o.delete(n):o.set(n,o.get(n)-1),this._index.get(r).size===0&&this._index.delete(r)}warnDocumentChanged(t,n,r){for(const a of Object.keys(this._fieldIds))if(this._fieldIds[a]===n){this._options.logger("warn",`MiniSearch: document with ID ${this._documentIds.get(t)} has changed before removal: term "${r}" was not present in field "${a}". Removing a document after it has changed can corrupt the index!`,"version_conflict");return}}addDocumentId(t){const n=this._nextId;return this._idToShortId.set(t,n),this._documentIds.set(n,t),this._documentCount+=1,this._nextId+=1,n}addFields(t){for(let n=0;nObject.prototype.hasOwnProperty.call(e,t)?e[t]:void 0,Sae={[GT]:(e,t)=>{for(const n of t.keys()){const r=e.get(n);if(r==null)e.set(n,t.get(n));else{const{score:a,terms:o,match:s}=t.get(n);r.score=r.score+a,r.match=Object.assign(r.match,s),RO(r.terms,o)}}return e},[F5]:(e,t)=>{const n=new Map;for(const r of t.keys()){const a=e.get(r);if(a==null)continue;const{score:o,terms:s,match:l}=t.get(r);RO(a.terms,s),n.set(r,{score:a.score+o,terms:a.terms,match:Object.assign(a.match,l)})}return n},[vae]:(e,t)=>{for(const n of t.keys())e.delete(n);return e}},Eae={k:1.2,b:.7,d:.5},wae=(e,t,n,r,a,o)=>{const{k:s,b:l,d:c}=o;return Math.log(1+(n-t+.5)/(t+.5))*(c+e*(s+1)/(e+s*(1-l+l*r/a)))},xae=e=>(t,n,r)=>{const a=typeof e.fuzzy=="function"?e.fuzzy(t,n,r):e.fuzzy||!1,o=typeof e.prefix=="function"?e.prefix(t,n,r):e.prefix===!0,s=typeof e.boostTerm=="function"?e.boostTerm(t,n,r):1;return{term:t,fuzzy:a,prefix:o,termBoost:s}},ob={idField:"id",extractField:(e,t)=>e[t],tokenize:e=>e.split(Aae),processTerm:e=>e.toLowerCase(),fields:void 0,searchOptions:void 0,storeFields:[],logger:(e,t)=>{typeof(console==null?void 0:console[e])=="function"&&console[e](t)},autoVacuum:!0},AO={combineWith:GT,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375},bm25:Eae},kae={combineWith:F5,prefix:(e,t,n)=>t===n.length-1},ak={batchSize:1e3,batchWait:10},ok={minDirtFactor:.1,minDirtCount:20},ib={...ak,...ok},Tae=(e,t)=>{e.includes(t)||e.push(t)},RO=(e,t)=>{for(const n of t)e.includes(n)||e.push(n)},CO=({score:e},{score:t})=>t-e,_O=()=>new Map,Md=e=>{const t=new Map;for(const n of Object.keys(e))t.set(parseInt(n,10),e[n]);return t},Pd=async e=>{const t=new Map;let n=0;for(const r of Object.keys(e))t.set(parseInt(r,10),e[r]),++n%1e3===0&&await z5(0);return t},z5=e=>new Promise(t=>setTimeout(t,e)),Aae=/[\n\r\p{Z}\p{P}]+/u,Rae={index:new Co({fields:[]})};w.createContext(Rae);const ik=({label:e,color:t,hidden:n,labels:r={}})=>ve.createElement("div",{className:"node"},ve.createElement("span",{className:"render "+(n?"circle":"disc"),style:{backgroundColor:t||"#000"}}),ve.createElement("span",{className:`label ${n?"text-muted":""} ${e?"":"text-italic"}`},e||r.no_label||"No label")),Cae=({id:e,labels:t})=>{const n=Ar(),r=w.useMemo(()=>{const a=n.getGraph().getNodeAttributes(e),o=n.getSetting("nodeReducer");return Object.assign(Object.assign({color:n.getSetting("defaultNodeColor")},a),o?o(e,a):{})},[n,e]);return ve.createElement(ik,Object.assign({},r,{labels:t}))},_ae=({label:e,color:t,source:n,target:r,hidden:a,directed:o,labels:s={}})=>ve.createElement("div",{className:"edge"},ve.createElement(ik,Object.assign({},n,{labels:s})),ve.createElement("div",{className:"body"},ve.createElement("div",{className:"render"},ve.createElement("span",{className:a?"dotted":"dash",style:{borderColor:t||"#000"}})," ",o&&ve.createElement("span",{className:"arrow",style:{borderTopColor:t||"#000"}})),ve.createElement("span",{className:`label ${a?"text-muted":""} ${e?"":"fst-italic"}`},e||s.no_label||"No label")),ve.createElement(ik,Object.assign({},r,{labels:s}))),Nae=({id:e,labels:t})=>{const n=Ar(),r=w.useMemo(()=>{const a=n.getGraph().getEdgeAttributes(e),o=n.getSetting("nodeReducer"),s=n.getSetting("edgeReducer"),l=n.getGraph().getNodeAttributes(n.getGraph().source(e)),c=n.getGraph().getNodeAttributes(n.getGraph().target(e));return Object.assign(Object.assign(Object.assign({color:n.getSetting("defaultEdgeColor"),directed:n.getGraph().isDirected(e)},a),s?s(e,a):{}),{source:Object.assign(Object.assign({color:n.getSetting("defaultNodeColor")},l),o?o(e,l):{}),target:Object.assign(Object.assign({color:n.getSetting("defaultNodeColor")},c),o?o(e,c):{})})},[n,e]);return ve.createElement(_ae,Object.assign({},r,{labels:t}))};function HT(e,t){const[n,r]=w.useState(e);return w.useEffect(()=>{const a=setTimeout(()=>{r(e)},t);return()=>{clearTimeout(a)}},[e,t]),n}function Oae({fetcher:e,preload:t,filterFn:n,renderOption:r,getOptionValue:a,notFound:o,loadingSkeleton:s,label:l,placeholder:c="Select...",value:d,onChange:p,onFocus:g,disabled:m=!1,className:b,noResultsMessage:y}){const[v,k]=w.useState(!1),[A,x]=w.useState(!1),[R,O]=w.useState([]),[N,C]=w.useState(!1),[_,L]=w.useState(null),[I,D]=w.useState(""),G=HT(I,t?0:150),$=w.useRef(null);w.useEffect(()=>{k(!0)},[]),w.useEffect(()=>{const U=F=>{$.current&&!$.current.contains(F.target)&&A&&x(!1)};return document.addEventListener("mousedown",U),()=>{document.removeEventListener("mousedown",U)}},[A]);const B=w.useCallback(async U=>{try{C(!0),L(null);const F=await e(U);O(F)}catch(F){L(F instanceof Error?F.message:"Failed to fetch options")}finally{C(!1)}},[e]);w.useEffect(()=>{v&&(t?G&&O(U=>U.filter(F=>n?n(F,G):!0)):B(G))},[v,G,t,n,B]),w.useEffect(()=>{!v||!d||B(d)},[v,d,B]);const W=w.useCallback(U=>{p(U),requestAnimationFrame(()=>{const F=document.activeElement;F==null||F.blur(),x(!1)})},[p]),Q=w.useCallback(()=>{x(!0),B(I)},[I,B]),H=w.useCallback(U=>{U.target.closest(".cmd-item")&&U.preventDefault()},[]);return E.jsx("div",{ref:$,className:Me(m&&"cursor-not-allowed opacity-50",b),onMouseDown:H,children:E.jsxs(Ap,{shouldFilter:!1,className:"bg-transparent",children:[E.jsxs("div",{children:[E.jsx(zT,{placeholder:c,value:I,className:"max-h-8",onFocus:Q,onValueChange:U=>{D(U),A||x(!0)}}),N&&E.jsx("div",{className:"absolute top-1/2 right-2 flex -translate-y-1/2 transform items-center",children:E.jsx(zU,{className:"h-4 w-4 animate-spin"})})]}),E.jsxs(Rp,{hidden:!A,children:[_&&E.jsx("div",{className:"text-destructive p-4 text-center",children:_}),N&&R.length===0&&(s||E.jsx(Iae,{})),!N&&!_&&R.length===0&&(o||E.jsx(BT,{children:y??`No ${l.toLowerCase()} found.`})),E.jsx(el,{children:R.map((U,F)=>E.jsxs(ve.Fragment,{children:[E.jsx(tl,{value:a(U),onSelect:W,onMouseMove:()=>g(a(U)),className:"truncate cmd-item",children:r(U)},a(U)+`${F}`),F!==R.length-1&&E.jsx("div",{className:"bg-foreground/10 h-[1px]"},`divider-${F}`)]},a(U)+`-fragment-${F}`))})]})]})})}function Iae(){return E.jsx(el,{children:E.jsx(tl,{disabled:!0,children:E.jsxs("div",{className:"flex w-full items-center gap-2",children:[E.jsx("div",{className:"bg-muted h-6 w-6 animate-pulse rounded-full"}),E.jsxs("div",{className:"flex flex-1 flex-col gap-1",children:[E.jsx("div",{className:"bg-muted h-4 w-24 animate-pulse rounded"}),E.jsx("div",{className:"bg-muted h-3 w-16 animate-pulse rounded"})]})]})})})}const sb="__message_item",Dae=({id:e})=>{const t=ze.use.sigmaGraph();return t!=null&&t.hasNode(e)?E.jsx(Cae,{id:e}):null};function Lae(e){return E.jsxs("div",{children:[e.type==="nodes"&&E.jsx(Dae,{id:e.id}),e.type==="edges"&&E.jsx(Nae,{id:e.id}),e.type==="message"&&E.jsx("div",{children:e.message})]})}const Mae=({onChange:e,onFocus:t,value:n})=>{const{t:r}=Et(),a=ze.use.sigmaGraph(),o=ze.use.searchEngine();w.useEffect(()=>{a&&ze.getState().resetSearchEngine()},[a]),w.useEffect(()=>{if(!a||a.nodes().length===0||o)return;const l=new Co({idField:"id",fields:["label"],searchOptions:{prefix:!0,fuzzy:.2,boost:{label:2}}}),c=a.nodes().map(d=>({id:d,label:a.getNodeAttribute(d,"label")}));l.addAll(c),ze.getState().setSearchEngine(l)},[a,o]);const s=w.useCallback(async l=>{if(t&&t(null),!a||!o)return[];if(a.nodes().length===0)return[];if(!l)return a.nodes().filter(p=>a.hasNode(p)).slice(0,bd).map(p=>({id:p,type:"nodes"}));const c=o.search(l).filter(d=>a.hasNode(d.id)).map(d=>({id:d.id,type:"nodes"}));return c.length<=bd?c:[...c.slice(0,bd),{type:"message",id:sb,message:r("graphPanel.search.message",{count:c.length-bd})}]},[a,o,t,r]);return E.jsx(Oae,{className:"bg-background/60 w-24 rounded-xl border-1 opacity-60 backdrop-blur-lg transition-all hover:w-fit hover:opacity-100",fetcher:s,renderOption:Lae,getOptionValue:l=>l.id,value:n&&n.type!=="message"?n.id:null,onChange:l=>{l!==sb&&e(l?{id:l,type:"nodes"}:null)},onFocus:l=>{l!==sb&&t&&t(l?{id:l,type:"nodes"}:null)},label:"item",placeholder:r("graphPanel.search.placeholder")})},Pae=({...e})=>E.jsx(Mae,{...e});function Fae({fetcher:e,preload:t,filterFn:n,renderOption:r,getOptionValue:a,getDisplayValue:o,notFound:s,loadingSkeleton:l,label:c,placeholder:d="Select...",value:p,onChange:g,disabled:m=!1,className:b,triggerClassName:y,searchInputClassName:v,noResultsMessage:k,triggerTooltip:A,clearable:x=!0}){const[R,O]=w.useState(!1),[N,C]=w.useState(!1),[_,L]=w.useState([]),[I,D]=w.useState(!1),[G,$]=w.useState(null),[B,W]=w.useState(p),[Q,H]=w.useState(null),[U,F]=w.useState(""),Y=HT(U,t?0:150),[M,V]=w.useState([]),[j,P]=w.useState(null);w.useEffect(()=>{O(!0),W(p)},[p]),w.useEffect(()=>{p&&(!_.length||!Q)?P(E.jsx("div",{children:p})):Q&&P(null)},[p,_.length,Q]),w.useEffect(()=>{if(p&&_.length>0){const J=_.find(ie=>a(ie)===p);J&&H(J)}},[p,_,a]),w.useEffect(()=>{R||(async()=>{try{D(!0),$(null);const ie=await e(p);V(ie),L(ie)}catch(ie){$(ie instanceof Error?ie.message:"Failed to fetch options")}finally{D(!1)}})()},[R,e,p]),w.useEffect(()=>{const J=async()=>{try{D(!0),$(null);const ie=await e(Y);V(ie),L(ie)}catch(ie){$(ie instanceof Error?ie.message:"Failed to fetch options")}finally{D(!1)}};R&&t?t&&L(Y?M.filter(ie=>n?n(ie,Y):!0):M):J()},[e,Y,R,t,n]);const Z=w.useCallback(J=>{const ie=x&&J===B?"":J;W(ie),H(_.find(K=>a(K)===ie)||null),g(ie),C(!1)},[B,g,x,_,a]);return E.jsxs(mp,{open:N,onOpenChange:C,children:[E.jsx(bp,{asChild:!0,children:E.jsxs(nt,{variant:"outline",role:"combobox","aria-expanded":N,className:Me("justify-between",m&&"cursor-not-allowed opacity-50",y),disabled:m,tooltip:A,side:"bottom",children:[Q?o(Q):j||d,E.jsx(iZ,{className:"opacity-50",size:10})]})}),E.jsx(Xu,{className:Me("p-0",b),onCloseAutoFocus:J=>J.preventDefault(),children:E.jsxs(Ap,{shouldFilter:!1,children:[E.jsxs("div",{className:"relative w-full border-b",children:[E.jsx(zT,{placeholder:`Search ${c.toLowerCase()}...`,value:U,onValueChange:J=>{F(J)},className:v}),I&&_.length>0&&E.jsx("div",{className:"absolute top-1/2 right-2 flex -translate-y-1/2 transform items-center",children:E.jsx(zU,{className:"h-4 w-4 animate-spin"})})]}),E.jsxs(Rp,{children:[G&&E.jsx("div",{className:"text-destructive p-4 text-center",children:G}),I&&_.length===0&&(l||E.jsx(zae,{})),!I&&!G&&_.length===0&&(s||E.jsx(BT,{children:k??`No ${c.toLowerCase()} found.`})),E.jsx(el,{children:_.map(J=>E.jsxs(tl,{value:a(J),onSelect:Z,className:"truncate",children:[r(J),E.jsx(bT,{className:Me("ml-auto h-3 w-3",B===a(J)?"opacity-100":"opacity-0")})]},a(J)))})]})]})})]})}function zae(){return E.jsx(el,{children:E.jsx(tl,{disabled:!0,children:E.jsxs("div",{className:"flex w-full items-center gap-2",children:[E.jsx("div",{className:"bg-muted h-6 w-6 animate-pulse rounded-full"}),E.jsxs("div",{className:"flex flex-1 flex-col gap-1",children:[E.jsx("div",{className:"bg-muted h-4 w-24 animate-pulse rounded"}),E.jsx("div",{className:"bg-muted h-3 w-16 animate-pulse rounded"})]})]})})})}const Bae=()=>{const{t:e}=Et(),t=Ie.use.queryLabel(),n=ze.use.allDatabaseLabels(),r=ze.use.labelsFetchAttempted(),a=w.useCallback(()=>{const l=new Co({idField:"id",fields:["value"],searchOptions:{prefix:!0,fuzzy:.2,boost:{label:2}}}),c=n.map((d,p)=>({id:p,value:d}));return l.addAll(c),{labels:n,searchEngine:l}},[n]),o=w.useCallback(async l=>{const{labels:c,searchEngine:d}=a();let p=c;return l&&(p=d.search(l).map(g=>c[g.id])),p.length<=M_?p:[...p.slice(0,M_),"..."]},[a]);w.useEffect(()=>{r&&(n.length>1?t&&t!=="*"&&!n.includes(t)?(console.log(`Label "${t}" not in available labels, setting to "*"`),Ie.getState().setQueryLabel("*")):console.log(`Label "${t}" is valid`):t&&n.length<=1&&t&&t!=="*"&&(console.log("Available labels list is empty, setting label to empty"),Ie.getState().setQueryLabel("")),ze.getState().setLabelsFetchAttempted(!1))},[n,t,r]);const s=w.useCallback(()=>{ze.getState().setLabelsFetchAttempted(!1),ze.getState().setGraphDataFetchAttempted(!1),ze.getState().setLastSuccessfulQueryLabel("");const l=Ie.getState().queryLabel;l?(Ie.getState().setQueryLabel(""),setTimeout(()=>{Ie.getState().setQueryLabel(l)},0)):Ie.getState().setQueryLabel("*")},[]);return E.jsxs("div",{className:"flex items-center",children:[E.jsx(nt,{size:"icon",variant:Er,onClick:s,tooltip:e("graphPanel.graphLabels.refreshTooltip"),className:"mr-1",children:E.jsx(BU,{className:"h-4 w-4"})}),E.jsx(Fae,{className:"ml-2",triggerClassName:"max-h-8",searchInputClassName:"max-h-8",triggerTooltip:e("graphPanel.graphLabels.selectTooltip"),fetcher:o,renderOption:l=>E.jsx("div",{children:l}),getOptionValue:l=>l,getDisplayValue:l=>E.jsx("div",{children:l}),notFound:E.jsx("div",{className:"py-6 text-center text-sm",children:"No labels found"}),label:e("graphPanel.graphLabels.label"),placeholder:e("graphPanel.graphLabels.placeholder"),value:t!==null?t:"*",onChange:l=>{const c=Ie.getState().queryLabel;l==="..."&&(l="*"),l===c&&l!=="*"&&(l="*"),ze.getState().setGraphDataFetchAttempted(!1),Ie.getState().setQueryLabel(l)},clearable:!1})]})},Jn=({text:e,className:t,tooltipClassName:n,tooltip:r,side:a,onClick:o})=>r?E.jsx(gT,{delayDuration:200,children:E.jsxs(hT,{children:[E.jsx(mT,{asChild:!0,children:E.jsx("label",{className:Me(t,o!==void 0?"cursor-pointer":void 0),onClick:o,children:e})}),E.jsx(pp,{side:a,className:n,children:r})]})}):E.jsx("label",{className:Me(t,o!==void 0?"cursor-pointer":void 0),onClick:o,children:e});var nf={exports:{}},jae=nf.exports,NO;function Uae(){return NO||(NO=1,function(e){(function(t,n,r){function a(c){var d=this,p=l();d.next=function(){var g=2091639*d.s0+d.c*23283064365386963e-26;return d.s0=d.s1,d.s1=d.s2,d.s2=g-(d.c=g|0)},d.c=1,d.s0=p(" "),d.s1=p(" "),d.s2=p(" "),d.s0-=p(c),d.s0<0&&(d.s0+=1),d.s1-=p(c),d.s1<0&&(d.s1+=1),d.s2-=p(c),d.s2<0&&(d.s2+=1),p=null}function o(c,d){return d.c=c.c,d.s0=c.s0,d.s1=c.s1,d.s2=c.s2,d}function s(c,d){var p=new a(c),g=d&&d.state,m=p.next;return m.int32=function(){return p.next()*4294967296|0},m.double=function(){return m()+(m()*2097152|0)*11102230246251565e-32},m.quick=m,g&&(typeof g=="object"&&o(g,p),m.state=function(){return o(p,{})}),m}function l(){var c=4022871197,d=function(p){p=String(p);for(var g=0;g>>0,m-=c,m*=c,c=m>>>0,m-=c,c+=m*4294967296}return(c>>>0)*23283064365386963e-26};return d}n&&n.exports?n.exports=s:this.alea=s})(jae,e)}(nf)),nf.exports}var rf={exports:{}},Gae=rf.exports,OO;function Hae(){return OO||(OO=1,function(e){(function(t,n,r){function a(l){var c=this,d="";c.x=0,c.y=0,c.z=0,c.w=0,c.next=function(){var g=c.x^c.x<<11;return c.x=c.y,c.y=c.z,c.z=c.w,c.w^=c.w>>>19^g^g>>>8},l===(l|0)?c.x=l:d+=l;for(var p=0;p>>0)/4294967296};return g.double=function(){do var m=d.next()>>>11,b=(d.next()>>>0)/4294967296,y=(m+b)/(1<<21);while(y===0);return y},g.int32=d.next,g.quick=g,p&&(typeof p=="object"&&o(p,d),g.state=function(){return o(d,{})}),g}n&&n.exports?n.exports=s:this.xor128=s})(Gae,e)}(rf)),rf.exports}var af={exports:{}},$ae=af.exports,IO;function qae(){return IO||(IO=1,function(e){(function(t,n,r){function a(l){var c=this,d="";c.next=function(){var g=c.x^c.x>>>2;return c.x=c.y,c.y=c.z,c.z=c.w,c.w=c.v,(c.d=c.d+362437|0)+(c.v=c.v^c.v<<4^(g^g<<1))|0},c.x=0,c.y=0,c.z=0,c.w=0,c.v=0,l===(l|0)?c.x=l:d+=l;for(var p=0;p>>4),c.next()}function o(l,c){return c.x=l.x,c.y=l.y,c.z=l.z,c.w=l.w,c.v=l.v,c.d=l.d,c}function s(l,c){var d=new a(l),p=c&&c.state,g=function(){return(d.next()>>>0)/4294967296};return g.double=function(){do var m=d.next()>>>11,b=(d.next()>>>0)/4294967296,y=(m+b)/(1<<21);while(y===0);return y},g.int32=d.next,g.quick=g,p&&(typeof p=="object"&&o(p,d),g.state=function(){return o(d,{})}),g}n&&n.exports?n.exports=s:this.xorwow=s})($ae,e)}(af)),af.exports}var of={exports:{}},Vae=of.exports,DO;function Wae(){return DO||(DO=1,function(e){(function(t,n,r){function a(l){var c=this;c.next=function(){var p=c.x,g=c.i,m,b;return m=p[g],m^=m>>>7,b=m^m<<24,m=p[g+1&7],b^=m^m>>>10,m=p[g+3&7],b^=m^m>>>3,m=p[g+4&7],b^=m^m<<7,m=p[g+7&7],m=m^m<<13,b^=m^m<<9,p[g]=b,c.i=g+1&7,b};function d(p,g){var m,b=[];if(g===(g|0))b[0]=g;else for(g=""+g,m=0;m0;--m)p.next()}d(c,l)}function o(l,c){return c.x=l.x.slice(),c.i=l.i,c}function s(l,c){l==null&&(l=+new Date);var d=new a(l),p=c&&c.state,g=function(){return(d.next()>>>0)/4294967296};return g.double=function(){do var m=d.next()>>>11,b=(d.next()>>>0)/4294967296,y=(m+b)/(1<<21);while(y===0);return y},g.int32=d.next,g.quick=g,p&&(p.x&&o(p,d),g.state=function(){return o(d,{})}),g}n&&n.exports?n.exports=s:this.xorshift7=s})(Vae,e)}(of)),of.exports}var sf={exports:{}},Yae=sf.exports,LO;function Kae(){return LO||(LO=1,function(e){(function(t,n,r){function a(l){var c=this;c.next=function(){var p=c.w,g=c.X,m=c.i,b,y;return c.w=p=p+1640531527|0,y=g[m+34&127],b=g[m=m+1&127],y^=y<<13,b^=b<<17,y^=y>>>15,b^=b>>>12,y=g[m]=y^b,c.i=m,y+(p^p>>>16)|0};function d(p,g){var m,b,y,v,k,A=[],x=128;for(g===(g|0)?(b=g,g=null):(g=g+"\0",b=0,x=Math.max(x,g.length)),y=0,v=-32;v>>15,b^=b<<4,b^=b>>>13,v>=0&&(k=k+1640531527|0,m=A[v&127]^=b+k,y=m==0?y+1:0);for(y>=128&&(A[(g&&g.length||0)&127]=-1),y=127,v=4*128;v>0;--v)b=A[y+34&127],m=A[y=y+1&127],b^=b<<13,m^=m<<17,b^=b>>>15,m^=m>>>12,A[y]=b^m;p.w=k,p.X=A,p.i=y}d(c,l)}function o(l,c){return c.i=l.i,c.w=l.w,c.X=l.X.slice(),c}function s(l,c){l==null&&(l=+new Date);var d=new a(l),p=c&&c.state,g=function(){return(d.next()>>>0)/4294967296};return g.double=function(){do var m=d.next()>>>11,b=(d.next()>>>0)/4294967296,y=(m+b)/(1<<21);while(y===0);return y},g.int32=d.next,g.quick=g,p&&(p.X&&o(p,d),g.state=function(){return o(d,{})}),g}n&&n.exports?n.exports=s:this.xor4096=s})(Yae,e)}(sf)),sf.exports}var lf={exports:{}},Xae=lf.exports,MO;function Zae(){return MO||(MO=1,function(e){(function(t,n,r){function a(l){var c=this,d="";c.next=function(){var g=c.b,m=c.c,b=c.d,y=c.a;return g=g<<25^g>>>7^m,m=m-b|0,b=b<<24^b>>>8^y,y=y-g|0,c.b=g=g<<20^g>>>12^m,c.c=m=m-b|0,c.d=b<<16^m>>>16^y,c.a=y-g|0},c.a=0,c.b=0,c.c=-1640531527,c.d=1367130551,l===Math.floor(l)?(c.a=l/4294967296|0,c.b=l|0):d+=l;for(var p=0;p>>0)/4294967296};return g.double=function(){do var m=d.next()>>>11,b=(d.next()>>>0)/4294967296,y=(m+b)/(1<<21);while(y===0);return y},g.int32=d.next,g.quick=g,p&&(typeof p=="object"&&o(p,d),g.state=function(){return o(d,{})}),g}n&&n.exports?n.exports=s:this.tychei=s})(Xae,e)}(lf)),lf.exports}var uf={exports:{}};const Qae={},Jae=Object.freeze(Object.defineProperty({__proto__:null,default:Qae},Symbol.toStringTag,{value:"Module"})),eoe=sq(Jae);var toe=uf.exports,PO;function noe(){return PO||(PO=1,function(e){(function(t,n,r){var a=256,o=6,s=52,l="random",c=r.pow(a,o),d=r.pow(2,s),p=d*2,g=a-1,m;function b(O,N,C){var _=[];N=N==!0?{entropy:!0}:N||{};var L=A(k(N.entropy?[O,R(n)]:O??x(),3),_),I=new y(_),D=function(){for(var G=I.g(o),$=c,B=0;G=p;)G/=2,$/=2,B>>>=1;return(G+B)/$};return D.int32=function(){return I.g(4)|0},D.quick=function(){return I.g(4)/4294967296},D.double=D,A(R(I.S),n),(N.pass||C||function(G,$,B,W){return W&&(W.S&&v(W,I),G.state=function(){return v(I,{})}),B?(r[l]=G,$):G})(D,L,"global"in N?N.global:this==r,N.state)}function y(O){var N,C=O.length,_=this,L=0,I=_.i=_.j=0,D=_.S=[];for(C||(O=[C++]);L{const t="#CCCCCC";if(!e)return t;const n=ze.getState().typeColorMap;if(!n.has(e)){Nf(e,{global:!0});const r=vB(),a=new Map(n);return a.set(e,r),ze.setState({typeColorMap:a}),r}return n.get(e)||t},ioe=e=>{if(!e)return console.log("Graph validation failed: graph is null"),!1;if(!Array.isArray(e.nodes)||!Array.isArray(e.edges))return console.log("Graph validation failed: nodes or edges is not an array"),!1;if(e.nodes.length===0)return console.log("Graph validation failed: nodes array is empty"),!1;for(const t of e.nodes)if(!t.id||!t.labels||!t.properties)return console.log("Graph validation failed: invalid node structure"),!1;for(const t of e.edges)if(!t.id||!t.source||!t.target)return console.log("Graph validation failed: invalid edge structure"),!1;for(const t of e.edges){const n=e.getNode(t.source),r=e.getNode(t.target);if(n==null||r==null)return console.log("Graph validation failed: edge references non-existent node"),!1}return console.log("Graph validation passed"),!0},soe=async(e,t,n)=>{let r=null;if(!ze.getState().lastSuccessfulQueryLabel){console.log("Last successful queryLabel is empty");try{await ze.getState().fetchAllDatabaseLabels()}catch(l){console.error("Failed to fetch all database labels:",l)}}ze.getState().setLabelsFetchAttempted(!0);const o=e||"*";try{console.log(`Fetching graph label: ${o}, depth: ${t}, nodes: ${n}`),r=await XB(o,t,n)}catch(l){return rr.getState().setErrorMessage(Gn(l),"Query Graphs Error!"),null}let s=null;if(r){const l={},c={};for(let m=0;m0){const m=w0-li;for(const b of r.nodes)b.size=Math.round(li+m*Math.pow((b.degree-d)/g,.5))}s=new SV,s.nodes=r.nodes,s.edges=r.edges,s.nodeIdMap=l,s.edgeIdMap=c,ioe(s)||(s=null,console.warn("Invalid graph data")),console.log("Graph data loaded")}return{rawGraph:s,is_truncated:r.is_truncated}},loe=e=>{var l,c;const t=Ie.getState().minEdgeSize,n=Ie.getState().maxEdgeSize;if(!e||!e.nodes.length)return console.log("No graph data available, skipping sigma graph creation"),null;const r=new Au;for(const d of(e==null?void 0:e.nodes)??[]){Nf(d.id+Date.now().toString(),{global:!0});const p=Math.random(),g=Math.random();r.addNode(d.id,{label:d.labels.join(", "),color:d.color,x:p,y:g,size:d.size,borderColor:E0,borderSize:.2})}for(const d of(e==null?void 0:e.edges)??[]){const p=((l=d.properties)==null?void 0:l.weight)!==void 0?Number(d.properties.weight):1;d.dynamicId=r.addDirectedEdge(d.source,d.target,{label:((c=d.properties)==null?void 0:c.keywords)||void 0,size:p,originalWeight:p})}let a=Number.MAX_SAFE_INTEGER,o=0;r.forEachEdge(d=>{const p=r.getEdgeAttribute(d,"originalWeight")||1;a=Math.min(a,p),o=Math.max(o,p)});const s=o-a;if(s>0){const d=n-t;r.forEachEdge(p=>{const g=r.getEdgeAttribute(p,"originalWeight")||1,m=t+d*Math.pow((g-a)/s,.5);r.setEdgeAttribute(p,"size",m)})}else r.forEachEdge(d=>{r.setEdgeAttribute(d,"size",t)});return r},uoe=()=>{const{t:e}=Et(),t=Ie.use.queryLabel(),n=ze.use.rawGraph(),r=ze.use.sigmaGraph(),a=Ie.use.graphQueryMaxDepth(),o=Ie.use.graphMaxNodes(),s=ze.use.isFetching(),l=ze.use.nodeToExpand(),c=ze.use.nodeToPrune(),d=w.useRef(!1),p=w.useRef(!1),g=w.useRef(!1),m=w.useCallback(A=>(n==null?void 0:n.getNode(A))||null,[n]),b=w.useCallback((A,x=!0)=>(n==null?void 0:n.getEdge(A,x))||null,[n]),y=w.useRef(!1);w.useEffect(()=>{if(!t&&(n!==null||r!==null)){const A=ze.getState();A.reset(),A.setGraphDataFetchAttempted(!1),A.setLabelsFetchAttempted(!1),d.current=!1,p.current=!1}},[t,n,r]),w.useEffect(()=>{if(!y.current&&!(!t&&g.current)&&!s&&!ze.getState().graphDataFetchAttempted){y.current=!0,ze.getState().setGraphDataFetchAttempted(!0);const A=ze.getState();A.setIsFetching(!0),A.clearSelection(),A.sigmaGraph&&A.sigmaGraph.forEachNode(C=>{var _;(_=A.sigmaGraph)==null||_.setNodeAttribute(C,"highlighted",!1)}),console.log("Preparing graph data...");const x=t,R=a,O=o;let N;x?N=soe(x,R,O):(console.log("Query label is empty, show empty graph"),N=Promise.resolve({rawGraph:null,is_truncated:!1})),N.then(C=>{const _=ze.getState(),L=C==null?void 0:C.rawGraph;if(L&&L.nodes&&L.nodes.forEach(I=>{var G;const D=(G=I.properties)==null?void 0:G.entity_type;I.color=ooe(D)}),C!=null&&C.is_truncated&&Ft.info(e("graphPanel.dataIsTruncated","Graph data is truncated to Max Nodes")),_.reset(),!L||!L.nodes||L.nodes.length===0){const I=new Au;I.addNode("empty-graph-node",{label:e("graphPanel.emptyGraph"),color:"#cccccc",x:.5,y:.5,size:15,borderColor:E0,borderSize:.2}),_.setSigmaGraph(I),_.setRawGraph(null),_.setGraphIsEmpty(!0);const D=rr.getState().message,G=D&&D.includes("Authentication required");!G&&x&&Ie.getState().setQueryLabel(""),G?console.log("Keep queryLabel for post-login reload"):_.setLastSuccessfulQueryLabel(""),console.log(`Graph data is empty, created graph with empty graph node. Auth error: ${G}`)}else{const I=loe(L);L.buildDynamicMap(),_.setSigmaGraph(I),_.setRawGraph(L),_.setGraphIsEmpty(!1),_.setLastSuccessfulQueryLabel(x),_.setMoveToSelectedNode(!0)}d.current=!0,p.current=!0,y.current=!1,_.setIsFetching(!1),(!L||!L.nodes||L.nodes.length===0)&&!x&&(g.current=!0)}).catch(C=>{console.error("Error fetching graph data:",C);const _=ze.getState();_.setIsFetching(!1),d.current=!1,y.current=!1,_.setGraphDataFetchAttempted(!1),_.setLastSuccessfulQueryLabel("")})}},[t,a,o,s,e]),w.useEffect(()=>{l&&((async x=>{var R,O,N,C;if(!(!x||!r||!n))try{const _=n.getNode(x);if(!_){console.error("Node not found:",x);return}const L=_.labels[0];if(!L){console.error("Node has no label:",x);return}const I=await XB(L,2,1e3);if(!I||!I.nodes||!I.edges){console.error("Failed to fetch extended graph");return}const D=[];for(const K of I.nodes){Nf(K.id,{global:!0});const ee=vB();D.push({id:K.id,labels:K.labels,properties:K.properties,size:10,x:Math.random(),y:Math.random(),color:ee,degree:0})}const G=[];for(const K of I.edges)G.push({id:K.id,source:K.source,target:K.target,type:K.type,properties:K.properties,dynamicId:""});const $={};r.forEachNode(K=>{$[K]={x:r.getNodeAttribute(K,"x"),y:r.getNodeAttribute(K,"y")}});const B=new Set(r.nodes()),W=new Set,Q=new Set,H=1;let U=0;r.forEachNode(K=>{const ee=r.degree(K);U=Math.max(U,ee)});for(const K of D){if(B.has(K.id))continue;G.some(he=>he.source===x&&he.target===K.id||he.target===x&&he.source===K.id)&&W.add(K.id)}const F=new Map,Y=new Map,M=new Set;for(const K of G){const ee=B.has(K.source)||W.has(K.source),he=B.has(K.target)||W.has(K.target);ee&&he?(Q.add(K.id),W.has(K.source)?F.set(K.source,(F.get(K.source)||0)+1):B.has(K.source)&&Y.set(K.source,(Y.get(K.source)||0)+1),W.has(K.target)?F.set(K.target,(F.get(K.target)||0)+1):B.has(K.target)&&Y.set(K.target,(Y.get(K.target)||0)+1)):(r.hasNode(K.source)?M.add(K.source):W.has(K.source)&&(M.add(K.source),F.set(K.source,(F.get(K.source)||0)+1)),r.hasNode(K.target)?M.add(K.target):W.has(K.target)&&(M.add(K.target),F.set(K.target,(F.get(K.target)||0)+1)))}const V=(K,ee,he,oe)=>{const Se=oe-he||1,we=w0-li;for(const De of ee)if(K.hasNode(De)){let Ce=K.degree(De);Ce+=1;const Ee=Math.min(Ce,oe+1),te=Math.round(li+we*Math.pow((Ee-he)/Se,.5)),fe=K.getNodeAttribute(De,"size");te>fe&&K.setNodeAttribute(De,"size",te)}};if(W.size===0){V(r,M,H,U),Ft.info(e("graphPanel.propertiesView.node.noNewNodes"));return}for(const[,K]of F.entries())U=Math.max(U,K);for(const[K,ee]of Y.entries()){const oe=r.degree(K)+ee;U=Math.max(U,oe)}const j=U-H||1,P=w0-li,Z=((R=ze.getState().sigmaInstance)==null?void 0:R.getCamera().ratio)||1,J=Math.max(Math.sqrt(_.size)*4,Math.sqrt(W.size)*3)/Z;Nf(Date.now().toString(),{global:!0});const ie=Math.random()*2*Math.PI;console.log("nodeSize:",_.size,"nodesToAdd:",W.size),console.log("cameraRatio:",Math.round(Z*100)/100,"spreadFactor:",Math.round(J*100)/100);for(const K of W){const ee=D.find(Ee=>Ee.id===K),he=F.get(K)||0,oe=Math.min(he,U+1),Se=Math.round(li+P*Math.pow((oe-H)/j,.5)),we=2*Math.PI*(Array.from(W).indexOf(K)/W.size),De=((O=$[K])==null?void 0:O.x)||$[_.id].x+Math.cos(ie+we)*J,Ce=((N=$[K])==null?void 0:N.y)||$[_.id].y+Math.sin(ie+we)*J;r.addNode(K,{label:ee.labels.join(", "),color:ee.color,x:De,y:Ce,size:Se,borderColor:E0,borderSize:.2}),n.getNode(K)||(ee.size=Se,ee.x=De,ee.y=Ce,ee.degree=he,n.nodes.push(ee),n.nodeIdMap[K]=n.nodes.length-1)}for(const K of Q){const ee=G.find(he=>he.id===K);r.hasEdge(ee.source,ee.target)||r.hasEdge(ee.target,ee.source)||(ee.dynamicId=r.addDirectedEdge(ee.source,ee.target,{label:((C=ee.properties)==null?void 0:C.keywords)||void 0}),n.getEdge(ee.id,!1)?console.error("Edge already exists in rawGraph:",ee.id):(n.edges.push(ee),n.edgeIdMap[ee.id]=n.edges.length-1,n.edgeDynamicIdMap[ee.dynamicId]=n.edges.length-1))}if(n.buildDynamicMap(),ze.getState().resetSearchEngine(),V(r,M,H,U),r.hasNode(x)){const K=r.degree(x),ee=Math.min(K,U+1),he=Math.round(li+P*Math.pow((ee-H)/j,.5));r.setNodeAttribute(x,"size",he),_.size=he,_.degree=K}}catch(_){console.error("Error expanding node:",_)}})(l),window.setTimeout(()=>{ze.getState().triggerNodeExpand(null)},0))},[l,r,n,e]);const v=w.useCallback((A,x)=>{const R=new Set([A]);return x.forEachNode(O=>{if(O===A)return;const N=x.neighbors(O);N.length===1&&N[0]===A&&R.add(O)}),R},[]);return w.useEffect(()=>{c&&((x=>{if(!(!x||!r||!n))try{const R=ze.getState();if(!r.hasNode(x)){console.error("Node not found:",x);return}const O=v(x,r);if(O.size===r.nodes().length){Ft.error(e("graphPanel.propertiesView.node.deleteAllNodesError"));return}R.clearSelection();for(const N of O){r.dropNode(N);const C=n.nodeIdMap[N];if(C!==void 0){const _=n.edges.filter(L=>L.source===N||L.target===N);for(const L of _){const I=n.edgeIdMap[L.id];if(I!==void 0){n.edges.splice(I,1);for(const[D,G]of Object.entries(n.edgeIdMap))G>I&&(n.edgeIdMap[D]=G-1);delete n.edgeIdMap[L.id],delete n.edgeDynamicIdMap[L.dynamicId]}}n.nodes.splice(C,1);for(const[L,I]of Object.entries(n.nodeIdMap))I>C&&(n.nodeIdMap[L]=I-1);delete n.nodeIdMap[N]}}n.buildDynamicMap(),ze.getState().resetSearchEngine(),O.size>1&&Ft.info(e("graphPanel.propertiesView.node.nodesRemoved",{count:O.size}))}catch(R){console.error("Error pruning node:",R)}})(c),window.setTimeout(()=>{ze.getState().triggerNodePrune(null)},0))},[c,r,n,v,e]),{lightrageGraph:w.useCallback(()=>{if(r)return r;console.log("Creating new Sigma graph instance");const A=new Au;return ze.getState().setSigmaGraph(A),A},[r]),getNode:m,getEdge:b}},coe=()=>{const{getNode:e,getEdge:t}=uoe(),n=ze.use.selectedNode(),r=ze.use.focusedNode(),a=ze.use.selectedEdge(),o=ze.use.focusedEdge(),[s,l]=w.useState(null),[c,d]=w.useState(null);return w.useEffect(()=>{let p=null,g=null;r?(p="node",g=e(r)):n?(p="node",g=e(n)):o?(p="edge",g=t(o,!0)):a&&(p="edge",g=t(a,!0)),g?(p=="node"?l(doe(g)):l(foe(g)),d(p)):(l(null),d(null))},[r,n,o,a,l,d,e,t]),s?E.jsx("div",{className:"bg-background/80 max-w-xs rounded-lg border-2 p-2 text-xs backdrop-blur-lg",children:c=="node"?E.jsx(poe,{node:s}):E.jsx(goe,{edge:s})}):E.jsx(E.Fragment,{})},doe=e=>{const t=ze.getState(),n=[];if(t.sigmaGraph&&t.rawGraph)try{if(!t.sigmaGraph.hasNode(e.id))return{...e,relationships:[]};const r=t.sigmaGraph.edges(e.id);for(const a of r){if(!t.sigmaGraph.hasEdge(a))continue;const o=t.rawGraph.getEdge(a,!0);if(o){const l=e.id===o.source?o.target:o.source;if(!t.sigmaGraph.hasNode(l))continue;const c=t.rawGraph.getNode(l);c&&n.push({type:"Neighbour",id:l,label:c.properties.entity_id?c.properties.entity_id:c.labels.join(", ")})}}}catch(r){console.error("Error refining node properties:",r)}return{...e,relationships:n}},foe=e=>{const t=ze.getState();let n,r;if(t.sigmaGraph&&t.rawGraph)try{if(!t.sigmaGraph.hasEdge(e.id))return{...e,sourceNode:void 0,targetNode:void 0};t.sigmaGraph.hasNode(e.source)&&(n=t.rawGraph.getNode(e.source)),t.sigmaGraph.hasNode(e.target)&&(r=t.rawGraph.getNode(e.target))}catch(a){console.error("Error refining edge properties:",a)}return{...e,sourceNode:n,targetNode:r}},ra=({name:e,value:t,onClick:n,tooltip:r})=>{const{t:a}=Et(),o=s=>{const l=`graphPanel.propertiesView.node.propertyNames.${s}`,c=a(l);return c===l?s:c};return E.jsxs("div",{className:"flex items-center gap-2",children:[E.jsx("label",{className:"text-primary/60 tracking-wide whitespace-nowrap",children:o(e)}),":",E.jsx(Jn,{className:"hover:bg-primary/20 rounded p-1 overflow-hidden text-ellipsis",tooltipClassName:"max-w-80",text:t,tooltip:r||(typeof t=="string"?t:JSON.stringify(t,null,2)),side:"left",onClick:n})]})},poe=({node:e})=>{const{t}=Et(),n=()=>{ze.getState().triggerNodeExpand(e.id)},r=()=>{ze.getState().triggerNodePrune(e.id)};return E.jsxs("div",{className:"flex flex-col gap-2",children:[E.jsxs("div",{className:"flex justify-between items-center",children:[E.jsx("label",{className:"text-md pl-1 font-bold tracking-wide text-blue-700",children:t("graphPanel.propertiesView.node.title")}),E.jsxs("div",{className:"flex gap-3",children:[E.jsx(nt,{size:"icon",variant:"ghost",className:"h-7 w-7 border border-gray-400 hover:bg-gray-200 dark:border-gray-600 dark:hover:bg-gray-700",onClick:n,tooltip:t("graphPanel.propertiesView.node.expandNode"),children:E.jsx(yZ,{className:"h-4 w-4 text-gray-700 dark:text-gray-300"})}),E.jsx(nt,{size:"icon",variant:"ghost",className:"h-7 w-7 border border-gray-400 hover:bg-gray-200 dark:border-gray-600 dark:hover:bg-gray-700",onClick:r,tooltip:t("graphPanel.propertiesView.node.pruneNode"),children:E.jsx($Z,{className:"h-4 w-4 text-gray-900 dark:text-gray-300"})})]})]}),E.jsxs("div",{className:"bg-primary/5 max-h-96 overflow-auto rounded p-1",children:[E.jsx(ra,{name:t("graphPanel.propertiesView.node.id"),value:e.id}),E.jsx(ra,{name:t("graphPanel.propertiesView.node.labels"),value:e.labels.join(", "),onClick:()=>{ze.getState().setSelectedNode(e.id,!0)}}),E.jsx(ra,{name:t("graphPanel.propertiesView.node.degree"),value:e.degree})]}),E.jsx("label",{className:"text-md pl-1 font-bold tracking-wide text-amber-700",children:t("graphPanel.propertiesView.node.properties")}),E.jsx("div",{className:"bg-primary/5 max-h-96 overflow-auto rounded p-1",children:Object.keys(e.properties).sort().map(a=>E.jsx(ra,{name:a,value:e.properties[a]},a))}),e.relationships.length>0&&E.jsxs(E.Fragment,{children:[E.jsx("label",{className:"text-md pl-1 font-bold tracking-wide text-emerald-700",children:t("graphPanel.propertiesView.node.relationships")}),E.jsx("div",{className:"bg-primary/5 max-h-96 overflow-auto rounded p-1",children:e.relationships.map(({type:a,id:o,label:s})=>E.jsx(ra,{name:a,value:s,onClick:()=>{ze.getState().setSelectedNode(o,!0)}},o))})]})]})},goe=({edge:e})=>{const{t}=Et();return E.jsxs("div",{className:"flex flex-col gap-2",children:[E.jsx("label",{className:"text-md pl-1 font-bold tracking-wide text-violet-700",children:t("graphPanel.propertiesView.edge.title")}),E.jsxs("div",{className:"bg-primary/5 max-h-96 overflow-auto rounded p-1",children:[E.jsx(ra,{name:t("graphPanel.propertiesView.edge.id"),value:e.id}),e.type&&E.jsx(ra,{name:t("graphPanel.propertiesView.edge.type"),value:e.type}),E.jsx(ra,{name:t("graphPanel.propertiesView.edge.source"),value:e.sourceNode?e.sourceNode.labels.join(", "):e.source,onClick:()=>{ze.getState().setSelectedNode(e.source,!0)}}),E.jsx(ra,{name:t("graphPanel.propertiesView.edge.target"),value:e.targetNode?e.targetNode.labels.join(", "):e.target,onClick:()=>{ze.getState().setSelectedNode(e.target,!0)}})]}),E.jsx("label",{className:"text-md pl-1 font-bold tracking-wide text-amber-700",children:t("graphPanel.propertiesView.edge.properties")}),E.jsx("div",{className:"bg-primary/5 max-h-96 overflow-auto rounded p-1",children:Object.keys(e.properties).sort().map(n=>E.jsx(ra,{name:n,value:e.properties[n]},n))})]})},hoe=()=>{const{t:e}=Et(),t=Ie.use.graphQueryMaxDepth(),n=Ie.use.graphMaxNodes();return E.jsxs("div",{className:"absolute bottom-4 left-[calc(1rem+2.5rem)] flex items-center gap-2 text-xs text-gray-400",children:[E.jsxs("div",{children:[e("graphPanel.sideBar.settings.depth"),": ",t]}),E.jsxs("div",{children:[e("graphPanel.sideBar.settings.max"),": ",n]})]})},Ei=w.forwardRef(({className:e,...t},n)=>E.jsx("div",{ref:n,className:Me("bg-card text-card-foreground rounded-xl border shadow",e),...t}));Ei.displayName="Card";const Cu=w.forwardRef(({className:e,...t},n)=>E.jsx("div",{ref:n,className:Me("flex flex-col space-y-1.5 p-6",e),...t}));Cu.displayName="CardHeader";const _u=w.forwardRef(({className:e,...t},n)=>E.jsx("div",{ref:n,className:Me("leading-none font-semibold tracking-tight",e),...t}));_u.displayName="CardTitle";const Cp=w.forwardRef(({className:e,...t},n)=>E.jsx("div",{ref:n,className:Me("text-muted-foreground text-sm",e),...t}));Cp.displayName="CardDescription";const Nu=w.forwardRef(({className:e,...t},n)=>E.jsx("div",{ref:n,className:Me("p-6 pt-0",e),...t}));Nu.displayName="CardContent";const moe=w.forwardRef(({className:e,...t},n)=>E.jsx("div",{ref:n,className:Me("flex items-center p-6 pt-0",e),...t}));moe.displayName="CardFooter";function boe(e,t){return w.useReducer((n,r)=>t[n][r]??n,e)}var $T="ScrollArea",[B5,h0e]=$r($T),[yoe,Rr]=B5($T),j5=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:a,scrollHideDelay:o=600,...s}=e,[l,c]=w.useState(null),[d,p]=w.useState(null),[g,m]=w.useState(null),[b,y]=w.useState(null),[v,k]=w.useState(null),[A,x]=w.useState(0),[R,O]=w.useState(0),[N,C]=w.useState(!1),[_,L]=w.useState(!1),I=mt(t,G=>c(G)),D=yp(a);return E.jsx(yoe,{scope:n,type:r,dir:D,scrollHideDelay:o,scrollArea:l,viewport:d,onViewportChange:p,content:g,onContentChange:m,scrollbarX:b,onScrollbarXChange:y,scrollbarXEnabled:N,onScrollbarXEnabledChange:C,scrollbarY:v,onScrollbarYChange:k,scrollbarYEnabled:_,onScrollbarYEnabledChange:L,onCornerWidthChange:x,onCornerHeightChange:O,children:E.jsx(Je.div,{dir:D,...s,ref:I,style:{position:"relative","--radix-scroll-area-corner-width":A+"px","--radix-scroll-area-corner-height":R+"px",...e.style}})})});j5.displayName=$T;var U5="ScrollAreaViewport",G5=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:a,...o}=e,s=Rr(U5,n),l=w.useRef(null),c=mt(t,l,s.onViewportChange);return E.jsxs(E.Fragment,{children:[E.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),E.jsx(Je.div,{"data-radix-scroll-area-viewport":"",...o,ref:c,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style},children:E.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});G5.displayName=U5;var da="ScrollAreaScrollbar",qT=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=Rr(da,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:s}=a,l=e.orientation==="horizontal";return w.useEffect(()=>(l?o(!0):s(!0),()=>{l?o(!1):s(!1)}),[l,o,s]),a.type==="hover"?E.jsx(voe,{...r,ref:t,forceMount:n}):a.type==="scroll"?E.jsx(Soe,{...r,ref:t,forceMount:n}):a.type==="auto"?E.jsx(H5,{...r,ref:t,forceMount:n}):a.type==="always"?E.jsx(VT,{...r,ref:t}):null});qT.displayName=da;var voe=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=Rr(da,e.__scopeScrollArea),[o,s]=w.useState(!1);return w.useEffect(()=>{const l=a.scrollArea;let c=0;if(l){const d=()=>{window.clearTimeout(c),s(!0)},p=()=>{c=window.setTimeout(()=>s(!1),a.scrollHideDelay)};return l.addEventListener("pointerenter",d),l.addEventListener("pointerleave",p),()=>{window.clearTimeout(c),l.removeEventListener("pointerenter",d),l.removeEventListener("pointerleave",p)}}},[a.scrollArea,a.scrollHideDelay]),E.jsx(Tr,{present:n||o,children:E.jsx(H5,{"data-state":o?"visible":"hidden",...r,ref:t})})}),Soe=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=Rr(da,e.__scopeScrollArea),o=e.orientation==="horizontal",s=Np(()=>c("SCROLL_END"),100),[l,c]=boe("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return w.useEffect(()=>{if(l==="idle"){const d=window.setTimeout(()=>c("HIDE"),a.scrollHideDelay);return()=>window.clearTimeout(d)}},[l,a.scrollHideDelay,c]),w.useEffect(()=>{const d=a.viewport,p=o?"scrollLeft":"scrollTop";if(d){let g=d[p];const m=()=>{const b=d[p];g!==b&&(c("SCROLL"),s()),g=b};return d.addEventListener("scroll",m),()=>d.removeEventListener("scroll",m)}},[a.viewport,o,c,s]),E.jsx(Tr,{present:n||l!=="hidden",children:E.jsx(VT,{"data-state":l==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:Ke(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:Ke(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),H5=w.forwardRef((e,t)=>{const n=Rr(da,e.__scopeScrollArea),{forceMount:r,...a}=e,[o,s]=w.useState(!1),l=e.orientation==="horizontal",c=Np(()=>{if(n.viewport){const d=n.viewport.offsetWidth{const{orientation:n="vertical",...r}=e,a=Rr(da,e.__scopeScrollArea),o=w.useRef(null),s=w.useRef(0),[l,c]=w.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=Y5(l.viewport,l.content),p={...r,sizes:l,onSizesChange:c,hasThumb:d>0&&d<1,onThumbChange:m=>o.current=m,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:m=>s.current=m};function g(m,b){return Aoe(m,s.current,l,b)}return n==="horizontal"?E.jsx(Eoe,{...p,ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){const m=a.viewport.scrollLeft,b=zO(m,l,a.dir);o.current.style.transform=`translate3d(${b}px, 0, 0)`}},onWheelScroll:m=>{a.viewport&&(a.viewport.scrollLeft=m)},onDragScroll:m=>{a.viewport&&(a.viewport.scrollLeft=g(m,a.dir))}}):n==="vertical"?E.jsx(woe,{...p,ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){const m=a.viewport.scrollTop,b=zO(m,l);o.current.style.transform=`translate3d(0, ${b}px, 0)`}},onWheelScroll:m=>{a.viewport&&(a.viewport.scrollTop=m)},onDragScroll:m=>{a.viewport&&(a.viewport.scrollTop=g(m))}}):null}),Eoe=w.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...a}=e,o=Rr(da,e.__scopeScrollArea),[s,l]=w.useState(),c=w.useRef(null),d=mt(t,c,o.onScrollbarXChange);return w.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),E.jsx(q5,{"data-orientation":"horizontal",...a,ref:d,sizes:n,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":_p(n)+"px",...e.style},onThumbPointerDown:p=>e.onThumbPointerDown(p.x),onDragScroll:p=>e.onDragScroll(p.x),onWheelScroll:(p,g)=>{if(o.viewport){const m=o.viewport.scrollLeft+p.deltaX;e.onWheelScroll(m),X5(m,g)&&p.preventDefault()}},onResize:()=>{c.current&&o.viewport&&s&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:If(s.paddingLeft),paddingEnd:If(s.paddingRight)}})}})}),woe=w.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...a}=e,o=Rr(da,e.__scopeScrollArea),[s,l]=w.useState(),c=w.useRef(null),d=mt(t,c,o.onScrollbarYChange);return w.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),E.jsx(q5,{"data-orientation":"vertical",...a,ref:d,sizes:n,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":_p(n)+"px",...e.style},onThumbPointerDown:p=>e.onThumbPointerDown(p.y),onDragScroll:p=>e.onDragScroll(p.y),onWheelScroll:(p,g)=>{if(o.viewport){const m=o.viewport.scrollTop+p.deltaY;e.onWheelScroll(m),X5(m,g)&&p.preventDefault()}},onResize:()=>{c.current&&o.viewport&&s&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:If(s.paddingTop),paddingEnd:If(s.paddingBottom)}})}})}),[xoe,$5]=B5(da),q5=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:a,onThumbChange:o,onThumbPointerUp:s,onThumbPointerDown:l,onThumbPositionChange:c,onDragScroll:d,onWheelScroll:p,onResize:g,...m}=e,b=Rr(da,n),[y,v]=w.useState(null),k=mt(t,I=>v(I)),A=w.useRef(null),x=w.useRef(""),R=b.viewport,O=r.content-r.viewport,N=yn(p),C=yn(c),_=Np(g,10);function L(I){if(A.current){const D=I.clientX-A.current.left,G=I.clientY-A.current.top;d({x:D,y:G})}}return w.useEffect(()=>{const I=D=>{const G=D.target;(y==null?void 0:y.contains(G))&&N(D,O)};return document.addEventListener("wheel",I,{passive:!1}),()=>document.removeEventListener("wheel",I,{passive:!1})},[R,y,O,N]),w.useEffect(C,[r,C]),zs(y,_),zs(b.content,_),E.jsx(xoe,{scope:n,scrollbar:y,hasThumb:a,onThumbChange:yn(o),onThumbPointerUp:yn(s),onThumbPositionChange:C,onThumbPointerDown:yn(l),children:E.jsx(Je.div,{...m,ref:k,style:{position:"absolute",...m.style},onPointerDown:Ke(e.onPointerDown,I=>{I.button===0&&(I.target.setPointerCapture(I.pointerId),A.current=y.getBoundingClientRect(),x.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",b.viewport&&(b.viewport.style.scrollBehavior="auto"),L(I))}),onPointerMove:Ke(e.onPointerMove,L),onPointerUp:Ke(e.onPointerUp,I=>{const D=I.target;D.hasPointerCapture(I.pointerId)&&D.releasePointerCapture(I.pointerId),document.body.style.webkitUserSelect=x.current,b.viewport&&(b.viewport.style.scrollBehavior=""),A.current=null})})})}),Of="ScrollAreaThumb",V5=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=$5(Of,e.__scopeScrollArea);return E.jsx(Tr,{present:n||a.hasThumb,children:E.jsx(koe,{ref:t,...r})})}),koe=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...a}=e,o=Rr(Of,n),s=$5(Of,n),{onThumbPositionChange:l}=s,c=mt(t,g=>s.onThumbChange(g)),d=w.useRef(void 0),p=Np(()=>{d.current&&(d.current(),d.current=void 0)},100);return w.useEffect(()=>{const g=o.viewport;if(g){const m=()=>{if(p(),!d.current){const b=Roe(g,l);d.current=b,l()}};return l(),g.addEventListener("scroll",m),()=>g.removeEventListener("scroll",m)}},[o.viewport,p,l]),E.jsx(Je.div,{"data-state":s.hasThumb?"visible":"hidden",...a,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:Ke(e.onPointerDownCapture,g=>{const b=g.target.getBoundingClientRect(),y=g.clientX-b.left,v=g.clientY-b.top;s.onThumbPointerDown({x:y,y:v})}),onPointerUp:Ke(e.onPointerUp,s.onThumbPointerUp)})});V5.displayName=Of;var WT="ScrollAreaCorner",W5=w.forwardRef((e,t)=>{const n=Rr(WT,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?E.jsx(Toe,{...e,ref:t}):null});W5.displayName=WT;var Toe=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,a=Rr(WT,n),[o,s]=w.useState(0),[l,c]=w.useState(0),d=!!(o&&l);return zs(a.scrollbarX,()=>{var g;const p=((g=a.scrollbarX)==null?void 0:g.offsetHeight)||0;a.onCornerHeightChange(p),c(p)}),zs(a.scrollbarY,()=>{var g;const p=((g=a.scrollbarY)==null?void 0:g.offsetWidth)||0;a.onCornerWidthChange(p),s(p)}),d?E.jsx(Je.div,{...r,ref:t,style:{width:o,height:l,position:"absolute",right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function If(e){return e?parseInt(e,10):0}function Y5(e,t){const n=e/t;return isNaN(n)?0:n}function _p(e){const t=Y5(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function Aoe(e,t,n,r="ltr"){const a=_p(n),o=a/2,s=t||o,l=a-s,c=n.scrollbar.paddingStart+s,d=n.scrollbar.size-n.scrollbar.paddingEnd-l,p=n.content-n.viewport,g=r==="ltr"?[0,p]:[p*-1,0];return K5([c,d],g)(e)}function zO(e,t,n="ltr"){const r=_p(t),a=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-a,s=t.content-t.viewport,l=o-r,c=n==="ltr"?[0,s]:[s*-1,0],d=z0(e,c);return K5([0,s],[0,l])(d)}function K5(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function X5(e,t){return e>0&&e{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function a(){const o={left:e.scrollLeft,top:e.scrollTop},s=n.left!==o.left,l=n.top!==o.top;(s||l)&&t(),n=o,r=window.requestAnimationFrame(a)}(),()=>window.cancelAnimationFrame(r)};function Np(e,t){const n=yn(e),r=w.useRef(0);return w.useEffect(()=>()=>window.clearTimeout(r.current),[]),w.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function zs(e,t){const n=yn(t);Rn(()=>{let r=0;if(e){const a=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return a.observe(e),()=>{window.cancelAnimationFrame(r),a.unobserve(e)}}},[e,n])}var Z5=j5,Coe=G5,_oe=W5;const YT=w.forwardRef(({className:e,children:t,...n},r)=>E.jsxs(Z5,{ref:r,className:Me("relative overflow-hidden",e),...n,children:[E.jsx(Coe,{className:"h-full w-full rounded-[inherit]",children:t}),E.jsx(Q5,{}),E.jsx(_oe,{})]}));YT.displayName=Z5.displayName;const Q5=w.forwardRef(({className:e,orientation:t="vertical",...n},r)=>E.jsx(qT,{ref:r,orientation:t,className:Me("flex touch-none transition-colors select-none",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:E.jsx(V5,{className:"bg-border relative flex-1 rounded-full"})}));Q5.displayName=qT.displayName;const Noe=({className:e})=>{const{t}=Et(),n=ze.use.typeColorMap();return!n||n.size===0?null:E.jsxs(Ei,{className:`p-2 max-w-xs ${e}`,children:[E.jsx("h3",{className:"text-sm font-medium mb-2",children:t("graphPanel.legend")}),E.jsx(YT,{className:"max-h-40",children:E.jsx("div",{className:"flex flex-col gap-1",children:Array.from(n.entries()).map(([r,a])=>E.jsxs("div",{className:"flex items-center gap-2",children:[E.jsx("div",{className:"w-4 h-4 rounded-full",style:{backgroundColor:a}}),E.jsx("span",{className:"text-xs truncate",title:r,children:r})]},r))})})]})},Ooe=()=>{const{t:e}=Et(),t=Ie.use.showLegend(),n=Ie.use.setShowLegend(),r=w.useCallback(()=>{n(!t)},[t,n]);return E.jsx(nt,{variant:Er,onClick:r,tooltip:e("graphPanel.sideBar.legendControl.toggleLegend"),size:"icon",children:E.jsx(tZ,{})})},BO={allowInvalidContainer:!0,defaultNodeType:"default",defaultEdgeType:"curvedArrow",renderEdgeLabels:!1,edgeProgramClasses:{arrow:z4,curvedArrow:Bne,curvedNoArrow:zne},nodeProgramClasses:{default:Ene,circel:Ju,point:Kte},labelGridCellSize:60,labelRenderedSizeThreshold:12,enableEdgeEvents:!0,labelColor:{color:"#000",attribute:"labelColor"},edgeLabelColor:{color:"#000",attribute:"labelColor"},edgeLabelSize:8,labelSize:12},Ioe=()=>{const e=W4(),t=Ar(),[n,r]=w.useState(null);return w.useEffect(()=>{e({downNode:a=>{r(a.node),t.getGraph().setNodeAttribute(a.node,"highlighted",!0)},mousemovebody:a=>{if(!n)return;const o=t.viewportToGraph(a);t.getGraph().setNodeAttribute(n,"x",o.x),t.getGraph().setNodeAttribute(n,"y",o.y),a.preventSigmaDefault(),a.original.preventDefault(),a.original.stopPropagation()},mouseup:()=>{n&&(r(null),t.getGraph().removeNodeAttribute(n,"highlighted"))},mousedown:a=>{a.original.buttons!==0&&!t.getCustomBBox()&&t.setCustomBBox(t.getBBox())}})},[e,t,n]),null},Doe=()=>{const[e,t]=w.useState(BO),n=w.useRef(null),r=ze.use.selectedNode(),a=ze.use.focusedNode(),o=ze.use.moveToSelectedNode(),s=ze.use.isFetching(),l=Ie.use.showPropertyPanel(),c=Ie.use.showNodeSearchBar(),d=Ie.use.enableNodeDrag(),p=Ie.use.showLegend();w.useEffect(()=>{t(BO),console.log("Initialized sigma settings")},[]),w.useEffect(()=>()=>{const v=ze.getState().sigmaInstance;if(v)try{v.kill(),ze.getState().setSigmaInstance(null),console.log("Cleared sigma instance on Graphviewer unmount")}catch(k){console.error("Error cleaning up sigma instance:",k)}},[]);const g=w.useCallback(v=>{v===null?ze.getState().setFocusedNode(null):v.type==="nodes"&&ze.getState().setFocusedNode(v.id)},[]),m=w.useCallback(v=>{v===null?ze.getState().setSelectedNode(null):v.type==="nodes"&&ze.getState().setSelectedNode(v.id,!0)},[]),b=w.useMemo(()=>a??r,[a,r]),y=w.useMemo(()=>r?{type:"nodes",id:r}:null,[r]);return E.jsxs("div",{className:"relative h-full w-full overflow-hidden",children:[E.jsxs(Hte,{settings:e,className:"!bg-background !size-full overflow-hidden",ref:n,children:[E.jsx(aae,{}),d&&E.jsx(Ioe,{}),E.jsx(jne,{node:b,move:o}),E.jsxs("div",{className:"absolute top-2 left-2 flex items-start gap-2",children:[E.jsx(Bae,{}),c&&E.jsx(Pae,{value:y,onFocus:g,onChange:m})]}),E.jsxs("div",{className:"bg-background/60 absolute bottom-2 left-2 flex flex-col rounded-xl border-2 backdrop-blur-lg",children:[E.jsx(rae,{}),E.jsx(oae,{}),E.jsx(iae,{}),E.jsx(Ooe,{}),E.jsx(hae,{})]}),l&&E.jsx("div",{className:"absolute top-2 right-2",children:E.jsx(coe,{})}),p&&E.jsx("div",{className:"absolute bottom-10 right-2",children:E.jsx(Noe,{className:"bg-background/60 backdrop-blur-lg"})}),E.jsx(hoe,{})]}),s&&E.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-background/80 z-10",children:E.jsxs("div",{className:"text-center",children:[E.jsx("div",{className:"mb-2 h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent"}),E.jsx("p",{children:"Loading Graph Data..."})]})})]})},J5=w.forwardRef(({className:e,...t},n)=>E.jsx("div",{className:"relative w-full overflow-auto",children:E.jsx("table",{ref:n,className:Me("w-full caption-bottom text-sm",e),...t})}));J5.displayName="Table";const eG=w.forwardRef(({className:e,...t},n)=>E.jsx("thead",{ref:n,className:Me("[&_tr]:border-b",e),...t}));eG.displayName="TableHeader";const tG=w.forwardRef(({className:e,...t},n)=>E.jsx("tbody",{ref:n,className:Me("[&_tr:last-child]:border-0",e),...t}));tG.displayName="TableBody";const Loe=w.forwardRef(({className:e,...t},n)=>E.jsx("tfoot",{ref:n,className:Me("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",e),...t}));Loe.displayName="TableFooter";const sk=w.forwardRef(({className:e,...t},n)=>E.jsx("tr",{ref:n,className:Me("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),...t}));sk.displayName="TableRow";const wo=w.forwardRef(({className:e,...t},n)=>E.jsx("th",{ref:n,className:Me("text-muted-foreground h-10 px-2 text-left align-middle font-medium [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));wo.displayName="TableHead";const xo=w.forwardRef(({className:e,...t},n)=>E.jsx("td",{ref:n,className:Me("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));xo.displayName="TableCell";const Moe=w.forwardRef(({className:e,...t},n)=>E.jsx("caption",{ref:n,className:Me("text-muted-foreground mt-4 text-sm",e),...t}));Moe.displayName="TableCaption";function Poe({title:e,description:t,icon:n=fZ,action:r,className:a,...o}){return E.jsxs(Ei,{className:Me("flex w-full flex-col items-center justify-center space-y-6 bg-transparent p-16",a),...o,children:[E.jsx("div",{className:"mr-4 shrink-0 rounded-full border border-dashed p-4",children:E.jsx(n,{className:"text-muted-foreground size-8","aria-hidden":"true"})}),E.jsxs("div",{className:"flex flex-col items-center gap-1.5 text-center",children:[E.jsx(_u,{children:e}),t?E.jsx(Cp,{children:t}):null]}),r||null]})}var ub={exports:{}},cb,jO;function Foe(){if(jO)return cb;jO=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return cb=e,cb}var db,UO;function zoe(){if(UO)return db;UO=1;var e=Foe();function t(){}function n(){}return n.resetWarningCache=t,db=function(){function r(s,l,c,d,p,g){if(g!==e){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}}r.isRequired=r;function a(){return r}var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:a,element:r,elementType:r,instanceOf:a,node:r,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o},db}var GO;function Boe(){return GO||(GO=1,ub.exports=zoe()()),ub.exports}var joe=Boe();const It=cn(joe),Uoe=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function Bs(e,t,n){const r=Goe(e),{webkitRelativePath:a}=e,o=typeof t=="string"?t:typeof a=="string"&&a.length>0?a:`./${e.name}`;return typeof r.path!="string"&&HO(r,"path",o),HO(r,"relativePath",o),r}function Goe(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),a=Uoe.get(r);a&&Object.defineProperty(e,"type",{value:a,writable:!1,configurable:!1,enumerable:!0})}return e}function HO(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const Hoe=[".DS_Store","Thumbs.db"];function $oe(e){return Ti(this,void 0,void 0,function*(){return Df(e)&&qoe(e.dataTransfer)?Koe(e.dataTransfer,e.type):Voe(e)?Woe(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?Yoe(e):[]})}function qoe(e){return Df(e)}function Voe(e){return Df(e)&&Df(e.target)}function Df(e){return typeof e=="object"&&e!==null}function Woe(e){return lk(e.target.files).map(t=>Bs(t))}function Yoe(e){return Ti(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>Bs(n))})}function Koe(e,t){return Ti(this,void 0,void 0,function*(){if(e.items){const n=lk(e.items).filter(a=>a.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(Xoe));return $O(nG(r))}return $O(lk(e.files).map(n=>Bs(n)))})}function $O(e){return e.filter(t=>Hoe.indexOf(t.name)===-1)}function lk(e){if(e===null)return[];const t=[];for(let n=0;n[...t,...Array.isArray(n)?nG(n):[n]],[])}function qO(e,t){return Ti(this,void 0,void 0,function*(){var n;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const o=yield e.getAsFileSystemHandle();if(o===null)throw new Error(`${e} is not a File`);if(o!==void 0){const s=yield o.getFile();return s.handle=o,Bs(s)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return Bs(r,(n=t==null?void 0:t.fullPath)!==null&&n!==void 0?n:void 0)})}function Zoe(e){return Ti(this,void 0,void 0,function*(){return e.isDirectory?rG(e):Qoe(e)})}function rG(e){const t=e.createReader();return new Promise((n,r)=>{const a=[];function o(){t.readEntries(s=>Ti(this,void 0,void 0,function*(){if(s.length){const l=Promise.all(s.map(Zoe));a.push(l),o()}else try{const l=yield Promise.all(a);n(l)}catch(l){r(l)}}),s=>{r(s)})}o()})}function Qoe(e){return Ti(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const a=Bs(r,e.fullPath);t(a)},r=>{n(r)})})})}var Fd={},VO;function Joe(){return VO||(VO=1,Fd.__esModule=!0,Fd.default=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var r=e.name||"",a=(e.type||"").toLowerCase(),o=a.replace(/\/.*$/,"");return n.some(function(s){var l=s.trim().toLowerCase();return l.charAt(0)==="."?r.toLowerCase().endsWith(l):l.endsWith("/*")?o===l.replace(/\/.*$/,""):a===l})}return!0}),Fd}var eie=Joe();const fb=cn(eie);function WO(e){return rie(e)||nie(e)||oG(e)||tie()}function tie(){throw new TypeError(`Invalid attempt to spread non-iterable instance. + */var wO;function Fre(){if(wO)return Jm;wO=1;var e=$f();function t(g,m){return g===m&&(g!==0||1/g===1/m)||g!==g&&m!==m}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,a=e.useEffect,o=e.useLayoutEffect,s=e.useDebugValue;function l(g,m){var b=m(),y=r({inst:{value:b,getSnapshot:m}}),v=y[0].inst,k=y[1];return o(function(){v.value=b,v.getSnapshot=m,c(v)&&k({inst:v})},[g,b,m]),a(function(){return c(v)&&k({inst:v}),g(function(){c(v)&&k({inst:v})})},[g]),s(b),b}function c(g){var m=g.getSnapshot;g=g.value;try{var b=m();return!n(g,b)}catch{return!0}}function d(g,m){return m()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:l;return Jm.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,Jm}var xO;function zre(){return xO||(xO=1,Qm.exports=Fre()),Qm.exports}var Bre=zre(),uu='[cmdk-group=""]',eb='[cmdk-group-items=""]',jre='[cmdk-group-heading=""]',PT='[cmdk-item=""]',kO=`${PT}:not([aria-disabled="true"])`,nk="cmdk-item-select",ui="data-value",Ure=(e,t,n)=>Pre(e,t,n),y5=w.createContext(void 0),rc=()=>w.useContext(y5),v5=w.createContext(void 0),FT=()=>w.useContext(v5),S5=w.createContext(void 0),E5=w.forwardRef((e,t)=>{let n=Es(()=>{var j,P;return{search:"",value:(P=(j=e.value)!=null?j:e.defaultValue)!=null?P:"",filtered:{count:0,items:new Map,groups:new Set}}}),r=Es(()=>new Set),a=Es(()=>new Map),o=Es(()=>new Map),s=Es(()=>new Set),l=w5(e),{label:c,children:d,value:p,onValueChange:g,filter:m,shouldFilter:b,loop:y,disablePointerSelection:v=!1,vimBindings:k=!0,...A}=e,x=An(),R=An(),O=An(),N=w.useRef(null),C=Qre();vi(()=>{if(p!==void 0){let j=p.trim();n.current.value=j,_.emit()}},[p]),vi(()=>{C(6,B)},[]);let _=w.useMemo(()=>({subscribe:j=>(s.current.add(j),()=>s.current.delete(j)),snapshot:()=>n.current,setState:(j,P,Z)=>{var J,ie,K;if(!Object.is(n.current[j],P)){if(n.current[j]=P,j==="search")$(),D(),C(1,G);else if(j==="value"&&(Z||C(5,B),((J=l.current)==null?void 0:J.value)!==void 0)){let ee=P??"";(K=(ie=l.current).onValueChange)==null||K.call(ie,ee);return}_.emit()}},emit:()=>{s.current.forEach(j=>j())}}),[]),L=w.useMemo(()=>({value:(j,P,Z)=>{var J;P!==((J=o.current.get(j))==null?void 0:J.value)&&(o.current.set(j,{value:P,keywords:Z}),n.current.filtered.items.set(j,I(P,Z)),C(2,()=>{D(),_.emit()}))},item:(j,P)=>(r.current.add(j),P&&(a.current.has(P)?a.current.get(P).add(j):a.current.set(P,new Set([j]))),C(3,()=>{$(),D(),n.current.value||G(),_.emit()}),()=>{o.current.delete(j),r.current.delete(j),n.current.filtered.items.delete(j);let Z=W();C(4,()=>{$(),(Z==null?void 0:Z.getAttribute("id"))===j&&G(),_.emit()})}),group:j=>(a.current.has(j)||a.current.set(j,new Set),()=>{o.current.delete(j),a.current.delete(j)}),filter:()=>l.current.shouldFilter,label:c||e["aria-label"],getDisablePointerSelection:()=>l.current.disablePointerSelection,listId:x,inputId:O,labelId:R,listInnerRef:N}),[]);function I(j,P){var Z,J;let ie=(J=(Z=l.current)==null?void 0:Z.filter)!=null?J:Ure;return j?ie(j,n.current.search,P):0}function D(){if(!n.current.search||l.current.shouldFilter===!1)return;let j=n.current.filtered.items,P=[];n.current.filtered.groups.forEach(J=>{let ie=a.current.get(J),K=0;ie.forEach(ee=>{let he=j.get(ee);K=Math.max(he,K)}),P.push([J,K])});let Z=N.current;Q().sort((J,ie)=>{var K,ee;let he=J.getAttribute("id"),oe=ie.getAttribute("id");return((K=j.get(oe))!=null?K:0)-((ee=j.get(he))!=null?ee:0)}).forEach(J=>{let ie=J.closest(eb);ie?ie.appendChild(J.parentElement===ie?J:J.closest(`${eb} > *`)):Z.appendChild(J.parentElement===Z?J:J.closest(`${eb} > *`))}),P.sort((J,ie)=>ie[1]-J[1]).forEach(J=>{var ie;let K=(ie=N.current)==null?void 0:ie.querySelector(`${uu}[${ui}="${encodeURIComponent(J[0])}"]`);K==null||K.parentElement.appendChild(K)})}function G(){let j=Q().find(Z=>Z.getAttribute("aria-disabled")!=="true"),P=j==null?void 0:j.getAttribute(ui);_.setState("value",P||void 0)}function $(){var j,P,Z,J;if(!n.current.search||l.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let ie=0;for(let K of r.current){let ee=(P=(j=o.current.get(K))==null?void 0:j.value)!=null?P:"",he=(J=(Z=o.current.get(K))==null?void 0:Z.keywords)!=null?J:[],oe=I(ee,he);n.current.filtered.items.set(K,oe),oe>0&&ie++}for(let[K,ee]of a.current)for(let he of ee)if(n.current.filtered.items.get(he)>0){n.current.filtered.groups.add(K);break}n.current.filtered.count=ie}function B(){var j,P,Z;let J=W();J&&(((j=J.parentElement)==null?void 0:j.firstChild)===J&&((Z=(P=J.closest(uu))==null?void 0:P.querySelector(jre))==null||Z.scrollIntoView({block:"nearest"})),J.scrollIntoView({block:"nearest"}))}function W(){var j;return(j=N.current)==null?void 0:j.querySelector(`${PT}[aria-selected="true"]`)}function Q(){var j;return Array.from(((j=N.current)==null?void 0:j.querySelectorAll(kO))||[])}function H(j){let P=Q()[j];P&&_.setState("value",P.getAttribute(ui))}function U(j){var P;let Z=W(),J=Q(),ie=J.findIndex(ee=>ee===Z),K=J[ie+j];(P=l.current)!=null&&P.loop&&(K=ie+j<0?J[J.length-1]:ie+j===J.length?J[0]:J[ie+j]),K&&_.setState("value",K.getAttribute(ui))}function F(j){let P=W(),Z=P==null?void 0:P.closest(uu),J;for(;Z&&!J;)Z=j>0?Xre(Z,uu):Zre(Z,uu),J=Z==null?void 0:Z.querySelector(kO);J?_.setState("value",J.getAttribute(ui)):U(j)}let Y=()=>H(Q().length-1),M=j=>{j.preventDefault(),j.metaKey?Y():j.altKey?F(1):U(1)},V=j=>{j.preventDefault(),j.metaKey?H(0):j.altKey?F(-1):U(-1)};return w.createElement(Je.div,{ref:t,tabIndex:-1,...A,"cmdk-root":"",onKeyDown:j=>{var P;if((P=A.onKeyDown)==null||P.call(A,j),!j.defaultPrevented)switch(j.key){case"n":case"j":{k&&j.ctrlKey&&M(j);break}case"ArrowDown":{M(j);break}case"p":case"k":{k&&j.ctrlKey&&V(j);break}case"ArrowUp":{V(j);break}case"Home":{j.preventDefault(),H(0);break}case"End":{j.preventDefault(),Y();break}case"Enter":if(!j.nativeEvent.isComposing&&j.keyCode!==229){j.preventDefault();let Z=W();if(Z){let J=new Event(nk);Z.dispatchEvent(J)}}}}},w.createElement("label",{"cmdk-label":"",htmlFor:L.inputId,id:L.labelId,style:eae},c),Tp(e,j=>w.createElement(v5.Provider,{value:_},w.createElement(y5.Provider,{value:L},j))))}),Gre=w.forwardRef((e,t)=>{var n,r;let a=An(),o=w.useRef(null),s=w.useContext(S5),l=rc(),c=w5(e),d=(r=(n=c.current)==null?void 0:n.forceMount)!=null?r:s==null?void 0:s.forceMount;vi(()=>{if(!d)return l.item(a,s==null?void 0:s.id)},[d]);let p=x5(a,o,[e.value,e.children,o],e.keywords),g=FT(),m=Si(C=>C.value&&C.value===p.current),b=Si(C=>d||l.filter()===!1?!0:C.search?C.filtered.items.get(a)>0:!0);w.useEffect(()=>{let C=o.current;if(!(!C||e.disabled))return C.addEventListener(nk,y),()=>C.removeEventListener(nk,y)},[b,e.onSelect,e.disabled]);function y(){var C,_;v(),(_=(C=c.current).onSelect)==null||_.call(C,p.current)}function v(){g.setState("value",p.current,!0)}if(!b)return null;let{disabled:k,value:A,onSelect:x,forceMount:R,keywords:O,...N}=e;return w.createElement(Je.div,{ref:Ru([o,t]),...N,id:a,"cmdk-item":"",role:"option","aria-disabled":!!k,"aria-selected":!!m,"data-disabled":!!k,"data-selected":!!m,onPointerMove:k||l.getDisablePointerSelection()?void 0:v,onClick:k?void 0:y},e.children)}),Hre=w.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:a,...o}=e,s=An(),l=w.useRef(null),c=w.useRef(null),d=An(),p=rc(),g=Si(b=>a||p.filter()===!1?!0:b.search?b.filtered.groups.has(s):!0);vi(()=>p.group(s),[]),x5(s,l,[e.value,e.heading,c]);let m=w.useMemo(()=>({id:s,forceMount:a}),[a]);return w.createElement(Je.div,{ref:Ru([l,t]),...o,"cmdk-group":"",role:"presentation",hidden:g?void 0:!0},n&&w.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:d},n),Tp(e,b=>w.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?d:void 0},w.createElement(S5.Provider,{value:m},b))))}),$re=w.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,a=w.useRef(null),o=Si(s=>!s.search);return!n&&!o?null:w.createElement(Je.div,{ref:Ru([a,t]),...r,"cmdk-separator":"",role:"separator"})}),qre=w.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,a=e.value!=null,o=FT(),s=Si(p=>p.search),l=Si(p=>p.value),c=rc(),d=w.useMemo(()=>{var p;let g=(p=c.listInnerRef.current)==null?void 0:p.querySelector(`${PT}[${ui}="${encodeURIComponent(l)}"]`);return g==null?void 0:g.getAttribute("id")},[]);return w.useEffect(()=>{e.value!=null&&o.setState("search",e.value)},[e.value]),w.createElement(Je.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":d,id:c.inputId,type:"text",value:a?e.value:s,onChange:p=>{a||o.setState("search",p.target.value),n==null||n(p.target.value)}})}),Vre=w.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...a}=e,o=w.useRef(null),s=w.useRef(null),l=rc();return w.useEffect(()=>{if(s.current&&o.current){let c=s.current,d=o.current,p,g=new ResizeObserver(()=>{p=requestAnimationFrame(()=>{let m=c.offsetHeight;d.style.setProperty("--cmdk-list-height",m.toFixed(1)+"px")})});return g.observe(c),()=>{cancelAnimationFrame(p),g.unobserve(c)}}},[]),w.createElement(Je.div,{ref:Ru([o,t]),...a,"cmdk-list":"",role:"listbox","aria-label":r,id:l.listId},Tp(e,c=>w.createElement("div",{ref:Ru([s,l.listInnerRef]),"cmdk-list-sizer":""},c)))}),Wre=w.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:a,contentClassName:o,container:s,...l}=e;return w.createElement(Kk,{open:n,onOpenChange:r},w.createElement(Xk,{container:s},w.createElement(rp,{"cmdk-overlay":"",className:a}),w.createElement(ap,{"aria-label":e.label,"cmdk-dialog":"",className:o},w.createElement(E5,{ref:t,...l}))))}),Yre=w.forwardRef((e,t)=>Si(n=>n.filtered.count===0)?w.createElement(Je.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Kre=w.forwardRef((e,t)=>{let{progress:n,children:r,label:a="Loading...",...o}=e;return w.createElement(Je.div,{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},Tp(e,s=>w.createElement("div",{"aria-hidden":!0},s)))}),Vn=Object.assign(E5,{List:Vre,Item:Gre,Input:qre,Group:Hre,Separator:$re,Dialog:Wre,Empty:Yre,Loading:Kre});function Xre(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function Zre(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function w5(e){let t=w.useRef(e);return vi(()=>{t.current=e}),t}var vi=typeof window>"u"?w.useEffect:w.useLayoutEffect;function Es(e){let t=w.useRef();return t.current===void 0&&(t.current=e()),t}function Ru(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function Si(e){let t=FT(),n=()=>e(t.snapshot());return Bre.useSyncExternalStore(t.subscribe,n,n)}function x5(e,t,n,r=[]){let a=w.useRef(),o=rc();return vi(()=>{var s;let l=(()=>{var d;for(let p of n){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(d=p.current.textContent)==null?void 0:d.trim():a.current}})(),c=r.map(d=>d.trim());o.value(e,l,c),(s=t.current)==null||s.setAttribute(ui,l),a.current=l}),a}var Qre=()=>{let[e,t]=w.useState(),n=Es(()=>new Map);return vi(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,a)=>{n.current.set(r,a),t({})}};function Jre(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function Tp({asChild:e,children:t},n){return e&&w.isValidElement(t)?w.cloneElement(Jre(t),{ref:t.ref},n(t.props.children)):n(t)}var eae={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const Ap=w.forwardRef(({className:e,...t},n)=>E.jsx(Vn,{ref:n,className:Me("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t}));Ap.displayName=Vn.displayName;const zT=w.forwardRef(({className:e,...t},n)=>E.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[E.jsx(VZ,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),E.jsx(Vn.Input,{ref:n,className:Me("placeholder:text-muted-foreground flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));zT.displayName=Vn.Input.displayName;const Rp=w.forwardRef(({className:e,...t},n)=>E.jsx(Vn.List,{ref:n,className:Me("max-h-[300px] overflow-x-hidden overflow-y-auto",e),...t}));Rp.displayName=Vn.List.displayName;const BT=w.forwardRef((e,t)=>E.jsx(Vn.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));BT.displayName=Vn.Empty.displayName;const el=w.forwardRef(({className:e,...t},n)=>E.jsx(Vn.Group,{ref:n,className:Me("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",e),...t}));el.displayName=Vn.Group.displayName;const tae=w.forwardRef(({className:e,...t},n)=>E.jsx(Vn.Separator,{ref:n,className:Me("bg-border -mx-1 h-px",e),...t}));tae.displayName=Vn.Separator.displayName;const tl=w.forwardRef(({className:e,...t},n)=>E.jsx(Vn.Item,{ref:n,className:Me("data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));tl.displayName=Vn.Item.displayName;const nae=({layout:e,autoRunFor:t,mainLayout:n})=>{const r=Ar(),[a,o]=w.useState(!1),s=w.useRef(null),{t:l}=Et(),c=w.useCallback(()=>{if(r)try{const p=r.getGraph();if(!p||p.order===0)return;const g=n.positions();G4(p,g,{duration:300})}catch(p){console.error("Error updating positions:",p),s.current&&(window.clearInterval(s.current),s.current=null,o(!1))}},[r,n]),d=w.useCallback(()=>{if(a){console.log("Stopping layout animation"),s.current&&(window.clearInterval(s.current),s.current=null);try{typeof e.kill=="function"?(e.kill(),console.log("Layout algorithm killed")):typeof e.stop=="function"&&(e.stop(),console.log("Layout algorithm stopped"))}catch(p){console.error("Error stopping layout algorithm:",p)}o(!1)}else console.log("Starting layout animation"),c(),s.current=window.setInterval(()=>{c()},200),o(!0),setTimeout(()=>{if(s.current){console.log("Auto-stopping layout animation after 3 seconds"),window.clearInterval(s.current),s.current=null,o(!1);try{typeof e.kill=="function"?e.kill():typeof e.stop=="function"&&e.stop()}catch(p){console.error("Error stopping layout algorithm:",p)}}},3e3)},[a,e,c]);return w.useEffect(()=>{if(!r){console.log("No sigma instance available");return}let p=null;return t!==void 0&&t>-1&&r.getGraph().order>0&&(console.log("Auto-starting layout animation"),c(),s.current=window.setInterval(()=>{c()},200),o(!0),t>0&&(p=window.setTimeout(()=>{console.log("Auto-stopping layout animation after timeout"),s.current&&(window.clearInterval(s.current),s.current=null),o(!1)},t))),()=>{s.current&&(window.clearInterval(s.current),s.current=null),p&&window.clearTimeout(p),o(!1)}},[t,r,c]),E.jsx(nt,{size:"icon",onClick:d,tooltip:l(a?"graphPanel.sideBar.layoutsControl.stopAnimation":"graphPanel.sideBar.layoutsControl.startAnimation"),variant:Er,children:a?E.jsx(MZ,{}):E.jsx(FZ,{})})},rae=()=>{const e=Ar(),{t}=Et(),[n,r]=w.useState("Circular"),[a,o]=w.useState(!1),s=Ie.use.graphLayoutMaxIterations(),l=Xne(),c=Vne(),d=Rre(),p=wre({maxIterations:s,settings:{margin:5,expansion:1.1,gridSize:1,ratio:1,speed:3}}),g=rre({maxIterations:s,settings:{attraction:3e-4,repulsion:.02,gravity:.02,inertia:.4,maxMove:100}}),m=g5({iterations:s}),b=xre(),y=are(),v=pre(),k=w.useMemo(()=>({Circular:{layout:l},Circlepack:{layout:c},Random:{layout:d},Noverlaps:{layout:p,worker:b},"Force Directed":{layout:g,worker:y},"Force Atlas":{layout:m,worker:v}}),[c,l,g,m,p,d,y,b,v]),A=w.useCallback(x=>{console.debug("Running layout:",x);const{positions:R}=k[x].layout;try{const O=e.getGraph();if(!O){console.error("No graph available");return}const N=R();console.log("Positions calculated, animating nodes"),G4(O,N,{duration:400}),r(x)}catch(O){console.error("Error running layout:",O)}},[k,e]);return E.jsxs(E.Fragment,{children:[E.jsx("div",{children:k[n]&&"worker"in k[n]&&E.jsx(nae,{layout:k[n].worker,mainLayout:k[n].layout})}),E.jsx("div",{children:E.jsxs(mp,{open:a,onOpenChange:o,children:[E.jsx(bp,{asChild:!0,children:E.jsx(nt,{size:"icon",variant:Er,onClick:()=>o(x=>!x),tooltip:t("graphPanel.sideBar.layoutsControl.layoutGraph"),children:E.jsx(wZ,{})})}),E.jsx(Xu,{side:"right",align:"center",className:"p-1",children:E.jsx(Ap,{children:E.jsx(Rp,{children:E.jsx(el,{children:Object.keys(k).map(x=>E.jsx(tl,{onSelect:()=>{A(x)},className:"cursor-pointer text-xs",children:t(`graphPanel.sideBar.layoutsControl.layouts.${x}`)},x))})})})})]})})]})},k5=()=>{const e=w.useContext(ej);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e},Ld=e=>!!(e.type.startsWith("mouse")&&e.buttons!==0),aae=({disableHoverEffect:e})=>{const t=Ar(),n=W4(),r=V4(),a=Ie.use.graphLayoutMaxIterations(),{assign:o}=g5({iterations:a}),{theme:s}=k5(),l=Ie.use.enableHideUnselectedEdges(),c=Ie.use.enableEdgeEvents(),d=Ie.use.showEdgeLabel(),p=Ie.use.showNodeLabel(),g=Ie.use.minEdgeSize(),m=Ie.use.maxEdgeSize(),b=ze.use.selectedNode(),y=ze.use.focusedNode(),v=ze.use.selectedEdge(),k=ze.use.focusedEdge(),A=ze.use.sigmaGraph();return w.useEffect(()=>{if(A&&t){try{typeof t.setGraph=="function"?(t.setGraph(A),console.log("Binding graph to sigma instance")):(t.graph=A,console.warn("Simgma missing setGraph function, set graph property directly"))}catch(x){console.error("Error setting graph on sigma instance:",x)}o(),console.log("Initial layout applied to graph")}},[t,A,o,a]),w.useEffect(()=>{t&&(ze.getState().sigmaInstance||(console.log("Setting sigma instance from GraphControl"),ze.getState().setSigmaInstance(t)))},[t]),w.useEffect(()=>{const{setFocusedNode:x,setSelectedNode:R,setFocusedEdge:O,setSelectedEdge:N,clearSelection:C}=ze.getState(),_={enterNode:L=>{Ld(L.event.original)||x(L.node)},leaveNode:L=>{Ld(L.event.original)||x(null)},clickNode:L=>{R(L.node),N(null)},clickStage:()=>C()};c&&(_.clickEdge=L=>{N(L.edge),R(null)},_.enterEdge=L=>{Ld(L.event.original)||O(L.edge)},_.leaveEdge=L=>{Ld(L.event.original)||O(null)}),n(_)},[n,c]),w.useEffect(()=>{if(t&&A){const x=t.getGraph();let R=Number.MAX_SAFE_INTEGER,O=0;x.forEachEdge(C=>{const _=x.getEdgeAttribute(C,"originalWeight")||1;typeof _=="number"&&(R=Math.min(R,_),O=Math.max(O,_))});const N=O-R;if(N>0){const C=m-g;x.forEachEdge(_=>{const L=x.getEdgeAttribute(_,"originalWeight")||1;if(typeof L=="number"){const I=g+C*Math.pow((L-R)/N,.5);x.setEdgeAttribute(_,"size",I)}})}else x.forEachEdge(C=>{x.setEdgeAttribute(C,"size",g)});t.refresh()}},[t,A,g,m]),w.useEffect(()=>{const x=s==="dark",R=x?iV:void 0,O=x?cV:void 0;r({enableEdgeEvents:c,renderEdgeLabels:d,renderLabels:p,nodeReducer:(N,C)=>{const _=t.getGraph(),L={...C,highlighted:C.highlighted||!1,labelColor:R};if(!e){L.highlighted=!1;const I=y||b,D=k||v;if(I&&_.hasNode(I))try{(N===I||_.neighbors(I).includes(N))&&(L.highlighted=!0,N===b&&(L.borderColor=uV))}catch(G){console.error("Error in nodeReducer:",G)}else if(D&&_.hasEdge(D))_.extremities(D).includes(N)&&(L.highlighted=!0,L.size=3);else return L;L.highlighted?x&&(L.labelColor=sV):L.color=lV}return L},edgeReducer:(N,C)=>{const _=t.getGraph(),L={...C,hidden:!1,labelColor:R,color:O};if(!e){const I=y||b;if(I&&_.hasNode(I))try{l?_.extremities(N).includes(I)||(L.hidden=!0):_.extremities(N).includes(I)&&(L.color=L_)}catch(D){console.error("Error in edgeReducer:",D)}else{const D=v&&_.hasEdge(v)?v:null,G=k&&_.hasEdge(k)?k:null;(D||G)&&(N===D?L.color=dV:N===G?L.color=L_:l&&(L.hidden=!0))}}return L}})},[b,y,v,k,r,t,e,s,l,c,d,p]),null},oae=()=>{const{zoomIn:e,zoomOut:t,reset:n}=Y4({duration:200,factor:1.5}),r=Ar(),{t:a}=Et(),o=w.useCallback(()=>e(),[e]),s=w.useCallback(()=>t(),[t]),l=w.useCallback(()=>{if(r)try{r.setCustomBBox(null),r.refresh();const p=r.getGraph();if(!(p!=null&&p.order)||p.nodes().length===0){n();return}r.getCamera().animate({x:.5,y:.5,ratio:1.1},{duration:1e3})}catch(p){console.error("Error resetting zoom:",p),n()}},[r,n]),c=w.useCallback(()=>{if(!r)return;const p=r.getCamera(),m=p.angle+Math.PI/8;p.animate({angle:m},{duration:200})},[r]),d=w.useCallback(()=>{if(!r)return;const p=r.getCamera(),m=p.angle-Math.PI/8;p.animate({angle:m},{duration:200})},[r]);return E.jsxs(E.Fragment,{children:[E.jsx(nt,{variant:Er,onClick:d,tooltip:a("graphPanel.sideBar.zoomControl.rotateCameraCounterClockwise"),size:"icon",children:E.jsx(jZ,{})}),E.jsx(nt,{variant:Er,onClick:c,tooltip:a("graphPanel.sideBar.zoomControl.rotateCamera"),size:"icon",children:E.jsx(GZ,{})}),E.jsx(nt,{variant:Er,onClick:l,tooltip:a("graphPanel.sideBar.zoomControl.resetZoom"),size:"icon",children:E.jsx(mZ,{})}),E.jsx(nt,{variant:Er,onClick:o,tooltip:a("graphPanel.sideBar.zoomControl.zoomIn"),size:"icon",children:E.jsx(aQ,{})}),E.jsx(nt,{variant:Er,onClick:s,tooltip:a("graphPanel.sideBar.zoomControl.zoomOut"),size:"icon",children:E.jsx(iQ,{})})]})},iae=()=>{const{isFullScreen:e,toggle:t}=Gte(),{t:n}=Et();return E.jsx(E.Fragment,{children:e?E.jsx(nt,{variant:Er,onClick:t,tooltip:n("graphPanel.sideBar.fullScreenControl.windowed"),size:"icon",children:E.jsx(OZ,{})}):E.jsx(nt,{variant:Er,onClick:t,tooltip:n("graphPanel.sideBar.fullScreenControl.fullScreen"),size:"icon",children:E.jsx(_Z,{})})})};var jT="Checkbox",[sae,g0e]=$r(jT),[lae,uae]=sae(jT),T5=w.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:a,defaultChecked:o,required:s,disabled:l,value:c="on",onCheckedChange:d,form:p,...g}=e,[m,b]=w.useState(null),y=mt(t,O=>b(O)),v=w.useRef(!1),k=m?p||!!m.closest("form"):!0,[A=!1,x]=ja({prop:a,defaultProp:o,onChange:d}),R=w.useRef(A);return w.useEffect(()=>{const O=m==null?void 0:m.form;if(O){const N=()=>x(R.current);return O.addEventListener("reset",N),()=>O.removeEventListener("reset",N)}},[m,x]),E.jsxs(lae,{scope:n,state:A,disabled:l,children:[E.jsx(Je.button,{type:"button",role:"checkbox","aria-checked":Ro(A)?"mixed":A,"aria-required":s,"data-state":C5(A),"data-disabled":l?"":void 0,disabled:l,value:c,...g,ref:y,onKeyDown:Ke(e.onKeyDown,O=>{O.key==="Enter"&&O.preventDefault()}),onClick:Ke(e.onClick,O=>{x(N=>Ro(N)?!0:!N),k&&(v.current=O.isPropagationStopped(),v.current||O.stopPropagation())})}),k&&E.jsx(cae,{control:m,bubbles:!v.current,name:r,value:c,checked:A,required:s,disabled:l,form:p,style:{transform:"translateX(-100%)"},defaultChecked:Ro(o)?!1:o})]})});T5.displayName=jT;var A5="CheckboxIndicator",R5=w.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...a}=e,o=uae(A5,n);return E.jsx(Tr,{present:r||Ro(o.state)||o.state===!0,children:E.jsx(Je.span,{"data-state":C5(o.state),"data-disabled":o.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})});R5.displayName=A5;var cae=e=>{const{control:t,checked:n,bubbles:r=!0,defaultChecked:a,...o}=e,s=w.useRef(null),l=n3(n),c=dU(t);w.useEffect(()=>{const p=s.current,g=window.HTMLInputElement.prototype,b=Object.getOwnPropertyDescriptor(g,"checked").set;if(l!==n&&b){const y=new Event("click",{bubbles:r});p.indeterminate=Ro(n),b.call(p,Ro(n)?!1:n),p.dispatchEvent(y)}},[l,n,r]);const d=w.useRef(Ro(n)?!1:n);return E.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:a??d.current,...o,tabIndex:-1,ref:s,style:{...e.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Ro(e){return e==="indeterminate"}function C5(e){return Ro(e)?"indeterminate":e?"checked":"unchecked"}var _5=T5,dae=R5;const Ns=w.forwardRef(({className:e,...t},n)=>E.jsx(_5,{ref:n,className:Me("peer border-primary ring-offset-background focus-visible:ring-ring data-[state=checked]:bg-muted data-[state=checked]:text-muted-foreground h-4 w-4 shrink-0 rounded-sm border focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:E.jsx(dae,{className:Me("flex items-center justify-center text-current"),children:E.jsx(bT,{className:"h-4 w-4"})})}));Ns.displayName=_5.displayName;var fae="Separator",TO="horizontal",pae=["horizontal","vertical"],N5=w.forwardRef((e,t)=>{const{decorative:n,orientation:r=TO,...a}=e,o=gae(r)?r:TO,l=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return E.jsx(Je.div,{"data-orientation":o,...l,...a,ref:t})});N5.displayName=fae;function gae(e){return pae.includes(e)}var O5=N5;const ws=w.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},a)=>E.jsx(O5,{ref:a,decorative:n,orientation:t,className:Me("bg-border shrink-0",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));ws.displayName=O5.displayName;const vo=({checked:e,onCheckedChange:t,label:n})=>E.jsxs("div",{className:"flex items-center gap-2",children:[E.jsx(Ns,{checked:e,onCheckedChange:t}),E.jsx("label",{htmlFor:"terms",className:"text-sm leading-none font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:n})]}),tb=({value:e,onEditFinished:t,label:n,min:r,max:a,defaultValue:o})=>{const{t:s}=Et(),[l,c]=w.useState(e),d=w.useCallback(m=>{const b=m.target.value.trim();if(b.length===0){c(null);return}const y=Number.parseInt(b);if(!isNaN(y)&&y!==l){if(r!==void 0&&ya)return;c(y)}},[l,r,a]),p=w.useCallback(()=>{l!==null&&e!==l&&t(l)},[e,l,t]),g=w.useCallback(()=>{o!==void 0&&e!==o&&(c(o),t(o))},[o,e,t]);return E.jsxs("div",{className:"flex flex-col gap-2",children:[E.jsx("label",{htmlFor:"terms",className:"text-sm leading-none font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:n}),E.jsxs("div",{className:"flex items-center gap-1",children:[E.jsx(kr,{type:"number",value:l===null?"":l,onChange:d,className:"h-6 w-full min-w-0 pr-1",min:r,max:a,onBlur:p,onKeyDown:m=>{m.key==="Enter"&&p()}}),o!==void 0&&E.jsx(nt,{variant:"ghost",size:"icon",className:"h-6 w-6 flex-shrink-0 hover:bg-muted text-muted-foreground hover:text-foreground",onClick:g,type:"button",title:s("graphPanel.sideBar.settings.resetToDefault"),children:E.jsx(jU,{className:"h-3.5 w-3.5"})})]})]})};function hae(){const[e,t]=w.useState(!1),n=Ie.use.showPropertyPanel(),r=Ie.use.showNodeSearchBar(),a=Ie.use.showNodeLabel(),o=Ie.use.enableEdgeEvents(),s=Ie.use.enableNodeDrag(),l=Ie.use.enableHideUnselectedEdges(),c=Ie.use.showEdgeLabel(),d=Ie.use.minEdgeSize(),p=Ie.use.maxEdgeSize(),g=Ie.use.graphQueryMaxDepth(),m=Ie.use.graphMaxNodes(),b=Ie.use.graphLayoutMaxIterations(),y=Ie.use.enableHealthCheck(),v=w.useCallback(()=>Ie.setState($=>({enableNodeDrag:!$.enableNodeDrag})),[]),k=w.useCallback(()=>Ie.setState($=>({enableEdgeEvents:!$.enableEdgeEvents})),[]),A=w.useCallback(()=>Ie.setState($=>({enableHideUnselectedEdges:!$.enableHideUnselectedEdges})),[]),x=w.useCallback(()=>Ie.setState($=>({showEdgeLabel:!$.showEdgeLabel})),[]),R=w.useCallback(()=>Ie.setState($=>({showPropertyPanel:!$.showPropertyPanel})),[]),O=w.useCallback(()=>Ie.setState($=>({showNodeSearchBar:!$.showNodeSearchBar})),[]),N=w.useCallback(()=>Ie.setState($=>({showNodeLabel:!$.showNodeLabel})),[]),C=w.useCallback(()=>Ie.setState($=>({enableHealthCheck:!$.enableHealthCheck})),[]),_=w.useCallback($=>{if($<1)return;Ie.setState({graphQueryMaxDepth:$});const B=Ie.getState().queryLabel;Ie.getState().setQueryLabel(""),setTimeout(()=>{Ie.getState().setQueryLabel(B)},300)},[]),L=w.useCallback($=>{if($<1||$>1e3)return;Ie.setState({graphMaxNodes:$});const B=Ie.getState().queryLabel;Ie.getState().setQueryLabel(""),setTimeout(()=>{Ie.getState().setQueryLabel(B)},300)},[]),I=w.useCallback($=>{$<1||Ie.setState({graphLayoutMaxIterations:$})},[]),{t:D}=Et(),G=()=>t(!1);return E.jsx(E.Fragment,{children:E.jsxs(mp,{open:e,onOpenChange:t,children:[E.jsx(bp,{asChild:!0,children:E.jsx(nt,{variant:Er,tooltip:D("graphPanel.sideBar.settings.settings"),size:"icon",children:E.jsx(XZ,{})})}),E.jsx(Xu,{side:"right",align:"start",className:"mb-2 p-2",onCloseAutoFocus:$=>$.preventDefault(),children:E.jsxs("div",{className:"flex flex-col gap-2",children:[E.jsx(vo,{checked:y,onCheckedChange:C,label:D("graphPanel.sideBar.settings.healthCheck")}),E.jsx(ws,{}),E.jsx(vo,{checked:n,onCheckedChange:R,label:D("graphPanel.sideBar.settings.showPropertyPanel")}),E.jsx(vo,{checked:r,onCheckedChange:O,label:D("graphPanel.sideBar.settings.showSearchBar")}),E.jsx(ws,{}),E.jsx(vo,{checked:a,onCheckedChange:N,label:D("graphPanel.sideBar.settings.showNodeLabel")}),E.jsx(vo,{checked:s,onCheckedChange:v,label:D("graphPanel.sideBar.settings.nodeDraggable")}),E.jsx(ws,{}),E.jsx(vo,{checked:c,onCheckedChange:x,label:D("graphPanel.sideBar.settings.showEdgeLabel")}),E.jsx(vo,{checked:l,onCheckedChange:A,label:D("graphPanel.sideBar.settings.hideUnselectedEdges")}),E.jsx(vo,{checked:o,onCheckedChange:k,label:D("graphPanel.sideBar.settings.edgeEvents")}),E.jsxs("div",{className:"flex flex-col gap-2",children:[E.jsx("label",{className:"text-sm leading-none font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:D("graphPanel.sideBar.settings.edgeSizeRange")}),E.jsxs("div",{className:"flex items-center gap-2",children:[E.jsx(kr,{type:"number",value:d,onChange:$=>{const B=Number($.target.value);!isNaN(B)&&B>=1&&B<=p&&Ie.setState({minEdgeSize:B})},className:"h-6 w-16 min-w-0 pr-1",min:1,max:Math.min(p,10)}),E.jsx("span",{children:"-"}),E.jsxs("div",{className:"flex items-center gap-1",children:[E.jsx(kr,{type:"number",value:p,onChange:$=>{const B=Number($.target.value);!isNaN(B)&&B>=d&&B>=1&&B<=10&&Ie.setState({maxEdgeSize:B})},className:"h-6 w-16 min-w-0 pr-1",min:d,max:10}),E.jsx(nt,{variant:"ghost",size:"icon",className:"h-6 w-6 flex-shrink-0 hover:bg-muted text-muted-foreground hover:text-foreground",onClick:()=>Ie.setState({minEdgeSize:1,maxEdgeSize:5}),type:"button",title:D("graphPanel.sideBar.settings.resetToDefault"),children:E.jsx(jU,{className:"h-3.5 w-3.5"})})]})]})]}),E.jsx(ws,{}),E.jsx(tb,{label:D("graphPanel.sideBar.settings.maxQueryDepth"),min:1,value:g,defaultValue:3,onEditFinished:_}),E.jsx(tb,{label:D("graphPanel.sideBar.settings.maxNodes"),min:1,max:1e3,value:m,defaultValue:1e3,onEditFinished:L}),E.jsx(tb,{label:D("graphPanel.sideBar.settings.maxLayoutIterations"),min:1,max:30,value:b,defaultValue:15,onEditFinished:I}),E.jsx(ws,{}),E.jsx(nt,{onClick:G,variant:"outline",size:"sm",className:"ml-auto px-4",children:D("graphPanel.sideBar.settings.save")})]})})]})})}const mae="ENTRIES",I5="KEYS",D5="VALUES",bn="";class nb{constructor(t,n){const r=t._tree,a=Array.from(r.keys());this.set=t,this._type=n,this._path=a.length>0?[{node:r,keys:a}]:[]}next(){const t=this.dive();return this.backtrack(),t}dive(){if(this._path.length===0)return{done:!0,value:void 0};const{node:t,keys:n}=hs(this._path);if(hs(n)===bn)return{done:!1,value:this.result()};const r=t.get(hs(n));return this._path.push({node:r,keys:Array.from(r.keys())}),this.dive()}backtrack(){if(this._path.length===0)return;const t=hs(this._path).keys;t.pop(),!(t.length>0)&&(this._path.pop(),this.backtrack())}key(){return this.set._prefix+this._path.map(({keys:t})=>hs(t)).filter(t=>t!==bn).join("")}value(){return hs(this._path).node.get(bn)}result(){switch(this._type){case D5:return this.value();case I5:return this.key();default:return[this.key(),this.value()]}}[Symbol.iterator](){return this}}const hs=e=>e[e.length-1],bae=(e,t,n)=>{const r=new Map;if(t===void 0)return r;const a=t.length+1,o=a+n,s=new Uint8Array(o*a).fill(n+1);for(let l=0;l{const c=o*s;e:for(const d of e.keys())if(d===bn){const p=a[c-1];p<=n&&r.set(l,[e.get(d),p])}else{let p=o;for(let g=0;gn)continue e}L5(e.get(d),t,n,r,a,p,s,l+d)}};class To{constructor(t=new Map,n=""){this._size=void 0,this._tree=t,this._prefix=n}atPrefix(t){if(!t.startsWith(this._prefix))throw new Error("Mismatched prefix");const[n,r]=_f(this._tree,t.slice(this._prefix.length));if(n===void 0){const[a,o]=UT(r);for(const s of a.keys())if(s!==bn&&s.startsWith(o)){const l=new Map;return l.set(s.slice(o.length),a.get(s)),new To(l,t)}}return new To(n,t)}clear(){this._size=void 0,this._tree.clear()}delete(t){return this._size=void 0,yae(this._tree,t)}entries(){return new nb(this,mae)}forEach(t){for(const[n,r]of this)t(n,r,this)}fuzzyGet(t,n){return bae(this._tree,t,n)}get(t){const n=rk(this._tree,t);return n!==void 0?n.get(bn):void 0}has(t){const n=rk(this._tree,t);return n!==void 0&&n.has(bn)}keys(){return new nb(this,I5)}set(t,n){if(typeof t!="string")throw new Error("key must be a string");return this._size=void 0,rb(this._tree,t).set(bn,n),this}get size(){if(this._size)return this._size;this._size=0;const t=this.entries();for(;!t.next().done;)this._size+=1;return this._size}update(t,n){if(typeof t!="string")throw new Error("key must be a string");this._size=void 0;const r=rb(this._tree,t);return r.set(bn,n(r.get(bn))),this}fetch(t,n){if(typeof t!="string")throw new Error("key must be a string");this._size=void 0;const r=rb(this._tree,t);let a=r.get(bn);return a===void 0&&r.set(bn,a=n()),a}values(){return new nb(this,D5)}[Symbol.iterator](){return this.entries()}static from(t){const n=new To;for(const[r,a]of t)n.set(r,a);return n}static fromObject(t){return To.from(Object.entries(t))}}const _f=(e,t,n=[])=>{if(t.length===0||e==null)return[e,n];for(const r of e.keys())if(r!==bn&&t.startsWith(r))return n.push([e,r]),_f(e.get(r),t.slice(r.length),n);return n.push([e,t]),_f(void 0,"",n)},rk=(e,t)=>{if(t.length===0||e==null)return e;for(const n of e.keys())if(n!==bn&&t.startsWith(n))return rk(e.get(n),t.slice(n.length))},rb=(e,t)=>{const n=t.length;e:for(let r=0;e&&r{const[n,r]=_f(e,t);if(n!==void 0){if(n.delete(bn),n.size===0)M5(r);else if(n.size===1){const[a,o]=n.entries().next().value;P5(r,a,o)}}},M5=e=>{if(e.length===0)return;const[t,n]=UT(e);if(t.delete(n),t.size===0)M5(e.slice(0,-1));else if(t.size===1){const[r,a]=t.entries().next().value;r!==bn&&P5(e.slice(0,-1),r,a)}},P5=(e,t,n)=>{if(e.length===0)return;const[r,a]=UT(e);r.set(a+t,n),r.delete(a)},UT=e=>e[e.length-1],GT="or",F5="and",vae="and_not";class Co{constructor(t){if((t==null?void 0:t.fields)==null)throw new Error('MiniSearch: option "fields" must be provided');const n=t.autoVacuum==null||t.autoVacuum===!0?ib:t.autoVacuum;this._options={...ob,...t,autoVacuum:n,searchOptions:{...AO,...t.searchOptions||{}},autoSuggestOptions:{...kae,...t.autoSuggestOptions||{}}},this._index=new To,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldIds={},this._fieldLength=new Map,this._avgFieldLength=[],this._nextId=0,this._storedFields=new Map,this._dirtCount=0,this._currentVacuum=null,this._enqueuedVacuum=null,this._enqueuedVacuumConditions=ok,this.addFields(this._options.fields)}add(t){const{extractField:n,tokenize:r,processTerm:a,fields:o,idField:s}=this._options,l=n(t,s);if(l==null)throw new Error(`MiniSearch: document does not have ID field "${s}"`);if(this._idToShortId.has(l))throw new Error(`MiniSearch: duplicate ID ${l}`);const c=this.addDocumentId(l);this.saveStoredFields(c,t);for(const d of o){const p=n(t,d);if(p==null)continue;const g=r(p.toString(),d),m=this._fieldIds[d],b=new Set(g).size;this.addFieldLength(c,m,this._documentCount-1,b);for(const y of g){const v=a(y,d);if(Array.isArray(v))for(const k of v)this.addTerm(m,c,k);else v&&this.addTerm(m,c,v)}}}addAll(t){for(const n of t)this.add(n)}addAllAsync(t,n={}){const{chunkSize:r=10}=n,a={chunk:[],promise:Promise.resolve()},{chunk:o,promise:s}=t.reduce(({chunk:l,promise:c},d,p)=>(l.push(d),(p+1)%r===0?{chunk:[],promise:c.then(()=>new Promise(g=>setTimeout(g,0))).then(()=>this.addAll(l))}:{chunk:l,promise:c}),a);return s.then(()=>this.addAll(o))}remove(t){const{tokenize:n,processTerm:r,extractField:a,fields:o,idField:s}=this._options,l=a(t,s);if(l==null)throw new Error(`MiniSearch: document does not have ID field "${s}"`);const c=this._idToShortId.get(l);if(c==null)throw new Error(`MiniSearch: cannot remove document with ID ${l}: it is not in the index`);for(const d of o){const p=a(t,d);if(p==null)continue;const g=n(p.toString(),d),m=this._fieldIds[d],b=new Set(g).size;this.removeFieldLength(c,m,this._documentCount,b);for(const y of g){const v=r(y,d);if(Array.isArray(v))for(const k of v)this.removeTerm(m,c,k);else v&&this.removeTerm(m,c,v)}}this._storedFields.delete(c),this._documentIds.delete(c),this._idToShortId.delete(l),this._fieldLength.delete(c),this._documentCount-=1}removeAll(t){if(t)for(const n of t)this.remove(n);else{if(arguments.length>0)throw new Error("Expected documents to be present. Omit the argument to remove all documents.");this._index=new To,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldLength=new Map,this._avgFieldLength=[],this._storedFields=new Map,this._nextId=0}}discard(t){const n=this._idToShortId.get(t);if(n==null)throw new Error(`MiniSearch: cannot discard document with ID ${t}: it is not in the index`);this._idToShortId.delete(t),this._documentIds.delete(n),this._storedFields.delete(n),(this._fieldLength.get(n)||[]).forEach((r,a)=>{this.removeFieldLength(n,a,this._documentCount,r)}),this._fieldLength.delete(n),this._documentCount-=1,this._dirtCount+=1,this.maybeAutoVacuum()}maybeAutoVacuum(){if(this._options.autoVacuum===!1)return;const{minDirtFactor:t,minDirtCount:n,batchSize:r,batchWait:a}=this._options.autoVacuum;this.conditionalVacuum({batchSize:r,batchWait:a},{minDirtCount:n,minDirtFactor:t})}discardAll(t){const n=this._options.autoVacuum;try{this._options.autoVacuum=!1;for(const r of t)this.discard(r)}finally{this._options.autoVacuum=n}this.maybeAutoVacuum()}replace(t){const{idField:n,extractField:r}=this._options,a=r(t,n);this.discard(a),this.add(t)}vacuum(t={}){return this.conditionalVacuum(t)}conditionalVacuum(t,n){return this._currentVacuum?(this._enqueuedVacuumConditions=this._enqueuedVacuumConditions&&n,this._enqueuedVacuum!=null?this._enqueuedVacuum:(this._enqueuedVacuum=this._currentVacuum.then(()=>{const r=this._enqueuedVacuumConditions;return this._enqueuedVacuumConditions=ok,this.performVacuuming(t,r)}),this._enqueuedVacuum)):this.vacuumConditionsMet(n)===!1?Promise.resolve():(this._currentVacuum=this.performVacuuming(t),this._currentVacuum)}async performVacuuming(t,n){const r=this._dirtCount;if(this.vacuumConditionsMet(n)){const a=t.batchSize||ak.batchSize,o=t.batchWait||ak.batchWait;let s=1;for(const[l,c]of this._index){for(const[d,p]of c)for(const[g]of p)this._documentIds.has(g)||(p.size<=1?c.delete(d):p.delete(g));this._index.get(l).size===0&&this._index.delete(l),s%a===0&&await new Promise(d=>setTimeout(d,o)),s+=1}this._dirtCount-=r}await null,this._currentVacuum=this._enqueuedVacuum,this._enqueuedVacuum=null}vacuumConditionsMet(t){if(t==null)return!0;let{minDirtCount:n,minDirtFactor:r}=t;return n=n||ib.minDirtCount,r=r||ib.minDirtFactor,this.dirtCount>=n&&this.dirtFactor>=r}get isVacuuming(){return this._currentVacuum!=null}get dirtCount(){return this._dirtCount}get dirtFactor(){return this._dirtCount/(1+this._documentCount+this._dirtCount)}has(t){return this._idToShortId.has(t)}getStoredFields(t){const n=this._idToShortId.get(t);if(n!=null)return this._storedFields.get(n)}search(t,n={}){const{searchOptions:r}=this._options,a={...r,...n},o=this.executeQuery(t,n),s=[];for(const[l,{score:c,terms:d,match:p}]of o){const g=d.length||1,m={id:this._documentIds.get(l),score:c*g,terms:Object.keys(p),queryTerms:d,match:p};Object.assign(m,this._storedFields.get(l)),(a.filter==null||a.filter(m))&&s.push(m)}return t===Co.wildcard&&a.boostDocument==null||s.sort(CO),s}autoSuggest(t,n={}){n={...this._options.autoSuggestOptions,...n};const r=new Map;for(const{score:o,terms:s}of this.search(t,n)){const l=s.join(" "),c=r.get(l);c!=null?(c.score+=o,c.count+=1):r.set(l,{score:o,terms:s,count:1})}const a=[];for(const[o,{score:s,terms:l,count:c}]of r)a.push({suggestion:o,terms:l,score:s/c});return a.sort(CO),a}get documentCount(){return this._documentCount}get termCount(){return this._index.size}static loadJSON(t,n){if(n==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJS(JSON.parse(t),n)}static async loadJSONAsync(t,n){if(n==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJSAsync(JSON.parse(t),n)}static getDefault(t){if(ob.hasOwnProperty(t))return ab(ob,t);throw new Error(`MiniSearch: unknown option "${t}"`)}static loadJS(t,n){const{index:r,documentIds:a,fieldLength:o,storedFields:s,serializationVersion:l}=t,c=this.instantiateMiniSearch(t,n);c._documentIds=Md(a),c._fieldLength=Md(o),c._storedFields=Md(s);for(const[d,p]of c._documentIds)c._idToShortId.set(p,d);for(const[d,p]of r){const g=new Map;for(const m of Object.keys(p)){let b=p[m];l===1&&(b=b.ds),g.set(parseInt(m,10),Md(b))}c._index.set(d,g)}return c}static async loadJSAsync(t,n){const{index:r,documentIds:a,fieldLength:o,storedFields:s,serializationVersion:l}=t,c=this.instantiateMiniSearch(t,n);c._documentIds=await Pd(a),c._fieldLength=await Pd(o),c._storedFields=await Pd(s);for(const[p,g]of c._documentIds)c._idToShortId.set(g,p);let d=0;for(const[p,g]of r){const m=new Map;for(const b of Object.keys(g)){let y=g[b];l===1&&(y=y.ds),m.set(parseInt(b,10),await Pd(y))}++d%1e3===0&&await z5(0),c._index.set(p,m)}return c}static instantiateMiniSearch(t,n){const{documentCount:r,nextId:a,fieldIds:o,averageFieldLength:s,dirtCount:l,serializationVersion:c}=t;if(c!==1&&c!==2)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");const d=new Co(n);return d._documentCount=r,d._nextId=a,d._idToShortId=new Map,d._fieldIds=o,d._avgFieldLength=s,d._dirtCount=l||0,d._index=new To,d}executeQuery(t,n={}){if(t===Co.wildcard)return this.executeWildcardQuery(n);if(typeof t!="string"){const m={...n,...t,queries:void 0},b=t.queries.map(y=>this.executeQuery(y,m));return this.combineResults(b,m.combineWith)}const{tokenize:r,processTerm:a,searchOptions:o}=this._options,s={tokenize:r,processTerm:a,...o,...n},{tokenize:l,processTerm:c}=s,g=l(t).flatMap(m=>c(m)).filter(m=>!!m).map(xae(s)).map(m=>this.executeQuerySpec(m,s));return this.combineResults(g,s.combineWith)}executeQuerySpec(t,n){const r={...this._options.searchOptions,...n},a=(r.fields||this._options.fields).reduce((v,k)=>({...v,[k]:ab(r.boost,k)||1}),{}),{boostDocument:o,weights:s,maxFuzzy:l,bm25:c}=r,{fuzzy:d,prefix:p}={...AO.weights,...s},g=this._index.get(t.term),m=this.termResults(t.term,t.term,1,t.termBoost,g,a,o,c);let b,y;if(t.prefix&&(b=this._index.atPrefix(t.term)),t.fuzzy){const v=t.fuzzy===!0?.2:t.fuzzy,k=v<1?Math.min(l,Math.round(t.term.length*v)):v;k&&(y=this._index.fuzzyGet(t.term,k))}if(b)for(const[v,k]of b){const A=v.length-t.term.length;if(!A)continue;y==null||y.delete(v);const x=p*v.length/(v.length+.3*A);this.termResults(t.term,v,x,t.termBoost,k,a,o,c,m)}if(y)for(const v of y.keys()){const[k,A]=y.get(v);if(!A)continue;const x=d*v.length/(v.length+A);this.termResults(t.term,v,x,t.termBoost,k,a,o,c,m)}return m}executeWildcardQuery(t){const n=new Map,r={...this._options.searchOptions,...t};for(const[a,o]of this._documentIds){const s=r.boostDocument?r.boostDocument(o,"",this._storedFields.get(a)):1;n.set(a,{score:s,terms:[],match:{}})}return n}combineResults(t,n=GT){if(t.length===0)return new Map;const r=n.toLowerCase(),a=Sae[r];if(!a)throw new Error(`Invalid combination operator: ${n}`);return t.reduce(a)||new Map}toJSON(){const t=[];for(const[n,r]of this._index){const a={};for(const[o,s]of r)a[o]=Object.fromEntries(s);t.push([n,a])}return{documentCount:this._documentCount,nextId:this._nextId,documentIds:Object.fromEntries(this._documentIds),fieldIds:this._fieldIds,fieldLength:Object.fromEntries(this._fieldLength),averageFieldLength:this._avgFieldLength,storedFields:Object.fromEntries(this._storedFields),dirtCount:this._dirtCount,index:t,serializationVersion:2}}termResults(t,n,r,a,o,s,l,c,d=new Map){if(o==null)return d;for(const p of Object.keys(s)){const g=s[p],m=this._fieldIds[p],b=o.get(m);if(b==null)continue;let y=b.size;const v=this._avgFieldLength[m];for(const k of b.keys()){if(!this._documentIds.has(k)){this.removeTerm(m,k,n),y-=1;continue}const A=l?l(this._documentIds.get(k),n,this._storedFields.get(k)):1;if(!A)continue;const x=b.get(k),R=this._fieldLength.get(k)[m],O=wae(x,y,this._documentCount,R,v,c),N=r*a*g*A*O,C=d.get(k);if(C){C.score+=N,Tae(C.terms,t);const _=ab(C.match,n);_?_.push(p):C.match[n]=[p]}else d.set(k,{score:N,terms:[t],match:{[n]:[p]}})}}return d}addTerm(t,n,r){const a=this._index.fetch(r,_O);let o=a.get(t);if(o==null)o=new Map,o.set(n,1),a.set(t,o);else{const s=o.get(n);o.set(n,(s||0)+1)}}removeTerm(t,n,r){if(!this._index.has(r)){this.warnDocumentChanged(n,t,r);return}const a=this._index.fetch(r,_O),o=a.get(t);o==null||o.get(n)==null?this.warnDocumentChanged(n,t,r):o.get(n)<=1?o.size<=1?a.delete(t):o.delete(n):o.set(n,o.get(n)-1),this._index.get(r).size===0&&this._index.delete(r)}warnDocumentChanged(t,n,r){for(const a of Object.keys(this._fieldIds))if(this._fieldIds[a]===n){this._options.logger("warn",`MiniSearch: document with ID ${this._documentIds.get(t)} has changed before removal: term "${r}" was not present in field "${a}". Removing a document after it has changed can corrupt the index!`,"version_conflict");return}}addDocumentId(t){const n=this._nextId;return this._idToShortId.set(t,n),this._documentIds.set(n,t),this._documentCount+=1,this._nextId+=1,n}addFields(t){for(let n=0;nObject.prototype.hasOwnProperty.call(e,t)?e[t]:void 0,Sae={[GT]:(e,t)=>{for(const n of t.keys()){const r=e.get(n);if(r==null)e.set(n,t.get(n));else{const{score:a,terms:o,match:s}=t.get(n);r.score=r.score+a,r.match=Object.assign(r.match,s),RO(r.terms,o)}}return e},[F5]:(e,t)=>{const n=new Map;for(const r of t.keys()){const a=e.get(r);if(a==null)continue;const{score:o,terms:s,match:l}=t.get(r);RO(a.terms,s),n.set(r,{score:a.score+o,terms:a.terms,match:Object.assign(a.match,l)})}return n},[vae]:(e,t)=>{for(const n of t.keys())e.delete(n);return e}},Eae={k:1.2,b:.7,d:.5},wae=(e,t,n,r,a,o)=>{const{k:s,b:l,d:c}=o;return Math.log(1+(n-t+.5)/(t+.5))*(c+e*(s+1)/(e+s*(1-l+l*r/a)))},xae=e=>(t,n,r)=>{const a=typeof e.fuzzy=="function"?e.fuzzy(t,n,r):e.fuzzy||!1,o=typeof e.prefix=="function"?e.prefix(t,n,r):e.prefix===!0,s=typeof e.boostTerm=="function"?e.boostTerm(t,n,r):1;return{term:t,fuzzy:a,prefix:o,termBoost:s}},ob={idField:"id",extractField:(e,t)=>e[t],tokenize:e=>e.split(Aae),processTerm:e=>e.toLowerCase(),fields:void 0,searchOptions:void 0,storeFields:[],logger:(e,t)=>{typeof(console==null?void 0:console[e])=="function"&&console[e](t)},autoVacuum:!0},AO={combineWith:GT,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375},bm25:Eae},kae={combineWith:F5,prefix:(e,t,n)=>t===n.length-1},ak={batchSize:1e3,batchWait:10},ok={minDirtFactor:.1,minDirtCount:20},ib={...ak,...ok},Tae=(e,t)=>{e.includes(t)||e.push(t)},RO=(e,t)=>{for(const n of t)e.includes(n)||e.push(n)},CO=({score:e},{score:t})=>t-e,_O=()=>new Map,Md=e=>{const t=new Map;for(const n of Object.keys(e))t.set(parseInt(n,10),e[n]);return t},Pd=async e=>{const t=new Map;let n=0;for(const r of Object.keys(e))t.set(parseInt(r,10),e[r]),++n%1e3===0&&await z5(0);return t},z5=e=>new Promise(t=>setTimeout(t,e)),Aae=/[\n\r\p{Z}\p{P}]+/u,Rae={index:new Co({fields:[]})};w.createContext(Rae);const ik=({label:e,color:t,hidden:n,labels:r={}})=>ve.createElement("div",{className:"node"},ve.createElement("span",{className:"render "+(n?"circle":"disc"),style:{backgroundColor:t||"#000"}}),ve.createElement("span",{className:`label ${n?"text-muted":""} ${e?"":"text-italic"}`},e||r.no_label||"No label")),Cae=({id:e,labels:t})=>{const n=Ar(),r=w.useMemo(()=>{const a=n.getGraph().getNodeAttributes(e),o=n.getSetting("nodeReducer");return Object.assign(Object.assign({color:n.getSetting("defaultNodeColor")},a),o?o(e,a):{})},[n,e]);return ve.createElement(ik,Object.assign({},r,{labels:t}))},_ae=({label:e,color:t,source:n,target:r,hidden:a,directed:o,labels:s={}})=>ve.createElement("div",{className:"edge"},ve.createElement(ik,Object.assign({},n,{labels:s})),ve.createElement("div",{className:"body"},ve.createElement("div",{className:"render"},ve.createElement("span",{className:a?"dotted":"dash",style:{borderColor:t||"#000"}})," ",o&&ve.createElement("span",{className:"arrow",style:{borderTopColor:t||"#000"}})),ve.createElement("span",{className:`label ${a?"text-muted":""} ${e?"":"fst-italic"}`},e||s.no_label||"No label")),ve.createElement(ik,Object.assign({},r,{labels:s}))),Nae=({id:e,labels:t})=>{const n=Ar(),r=w.useMemo(()=>{const a=n.getGraph().getEdgeAttributes(e),o=n.getSetting("nodeReducer"),s=n.getSetting("edgeReducer"),l=n.getGraph().getNodeAttributes(n.getGraph().source(e)),c=n.getGraph().getNodeAttributes(n.getGraph().target(e));return Object.assign(Object.assign(Object.assign({color:n.getSetting("defaultEdgeColor"),directed:n.getGraph().isDirected(e)},a),s?s(e,a):{}),{source:Object.assign(Object.assign({color:n.getSetting("defaultNodeColor")},l),o?o(e,l):{}),target:Object.assign(Object.assign({color:n.getSetting("defaultNodeColor")},c),o?o(e,c):{})})},[n,e]);return ve.createElement(_ae,Object.assign({},r,{labels:t}))};function HT(e,t){const[n,r]=w.useState(e);return w.useEffect(()=>{const a=setTimeout(()=>{r(e)},t);return()=>{clearTimeout(a)}},[e,t]),n}function Oae({fetcher:e,preload:t,filterFn:n,renderOption:r,getOptionValue:a,notFound:o,loadingSkeleton:s,label:l,placeholder:c="Select...",value:d,onChange:p,onFocus:g,disabled:m=!1,className:b,noResultsMessage:y}){const[v,k]=w.useState(!1),[A,x]=w.useState(!1),[R,O]=w.useState([]),[N,C]=w.useState(!1),[_,L]=w.useState(null),[I,D]=w.useState(""),G=HT(I,t?0:150),$=w.useRef(null);w.useEffect(()=>{k(!0)},[]),w.useEffect(()=>{const U=F=>{$.current&&!$.current.contains(F.target)&&A&&x(!1)};return document.addEventListener("mousedown",U),()=>{document.removeEventListener("mousedown",U)}},[A]);const B=w.useCallback(async U=>{try{C(!0),L(null);const F=await e(U);O(F)}catch(F){L(F instanceof Error?F.message:"Failed to fetch options")}finally{C(!1)}},[e]);w.useEffect(()=>{v&&(t?G&&O(U=>U.filter(F=>n?n(F,G):!0)):B(G))},[v,G,t,n,B]),w.useEffect(()=>{!v||!d||B(d)},[v,d,B]);const W=w.useCallback(U=>{p(U),requestAnimationFrame(()=>{const F=document.activeElement;F==null||F.blur(),x(!1)})},[p]),Q=w.useCallback(()=>{x(!0),B(I)},[I,B]),H=w.useCallback(U=>{U.target.closest(".cmd-item")&&U.preventDefault()},[]);return E.jsx("div",{ref:$,className:Me(m&&"cursor-not-allowed opacity-50",b),onMouseDown:H,children:E.jsxs(Ap,{shouldFilter:!1,className:"bg-transparent",children:[E.jsxs("div",{children:[E.jsx(zT,{placeholder:c,value:I,className:"max-h-8",onFocus:Q,onValueChange:U=>{D(U),A||x(!0)}}),N&&E.jsx("div",{className:"absolute top-1/2 right-2 flex -translate-y-1/2 transform items-center",children:E.jsx(zU,{className:"h-4 w-4 animate-spin"})})]}),E.jsxs(Rp,{hidden:!A,children:[_&&E.jsx("div",{className:"text-destructive p-4 text-center",children:_}),N&&R.length===0&&(s||E.jsx(Iae,{})),!N&&!_&&R.length===0&&(o||E.jsx(BT,{children:y??`No ${l.toLowerCase()} found.`})),E.jsx(el,{children:R.map((U,F)=>E.jsxs(ve.Fragment,{children:[E.jsx(tl,{value:a(U),onSelect:W,onMouseMove:()=>g(a(U)),className:"truncate cmd-item",children:r(U)},a(U)+`${F}`),F!==R.length-1&&E.jsx("div",{className:"bg-foreground/10 h-[1px]"},`divider-${F}`)]},a(U)+`-fragment-${F}`))})]})]})})}function Iae(){return E.jsx(el,{children:E.jsx(tl,{disabled:!0,children:E.jsxs("div",{className:"flex w-full items-center gap-2",children:[E.jsx("div",{className:"bg-muted h-6 w-6 animate-pulse rounded-full"}),E.jsxs("div",{className:"flex flex-1 flex-col gap-1",children:[E.jsx("div",{className:"bg-muted h-4 w-24 animate-pulse rounded"}),E.jsx("div",{className:"bg-muted h-3 w-16 animate-pulse rounded"})]})]})})})}const sb="__message_item",Dae=({id:e})=>{const t=ze.use.sigmaGraph();return t!=null&&t.hasNode(e)?E.jsx(Cae,{id:e}):null};function Lae(e){return E.jsxs("div",{children:[e.type==="nodes"&&E.jsx(Dae,{id:e.id}),e.type==="edges"&&E.jsx(Nae,{id:e.id}),e.type==="message"&&E.jsx("div",{children:e.message})]})}const Mae=({onChange:e,onFocus:t,value:n})=>{const{t:r}=Et(),a=ze.use.sigmaGraph(),o=ze.use.searchEngine();w.useEffect(()=>{a&&ze.getState().resetSearchEngine()},[a]),w.useEffect(()=>{if(!a||a.nodes().length===0||o)return;const l=new Co({idField:"id",fields:["label"],searchOptions:{prefix:!0,fuzzy:.2,boost:{label:2}}}),c=a.nodes().map(d=>({id:d,label:a.getNodeAttribute(d,"label")}));l.addAll(c),ze.getState().setSearchEngine(l)},[a,o]);const s=w.useCallback(async l=>{if(t&&t(null),!a||!o)return[];if(a.nodes().length===0)return[];if(!l)return a.nodes().filter(p=>a.hasNode(p)).slice(0,bd).map(p=>({id:p,type:"nodes"}));const c=o.search(l).filter(d=>a.hasNode(d.id)).map(d=>({id:d.id,type:"nodes"}));return c.length<=bd?c:[...c.slice(0,bd),{type:"message",id:sb,message:r("graphPanel.search.message",{count:c.length-bd})}]},[a,o,t,r]);return E.jsx(Oae,{className:"bg-background/60 w-24 rounded-xl border-1 opacity-60 backdrop-blur-lg transition-all hover:w-fit hover:opacity-100",fetcher:s,renderOption:Lae,getOptionValue:l=>l.id,value:n&&n.type!=="message"?n.id:null,onChange:l=>{l!==sb&&e(l?{id:l,type:"nodes"}:null)},onFocus:l=>{l!==sb&&t&&t(l?{id:l,type:"nodes"}:null)},label:"item",placeholder:r("graphPanel.search.placeholder")})},Pae=({...e})=>E.jsx(Mae,{...e});function Fae({fetcher:e,preload:t,filterFn:n,renderOption:r,getOptionValue:a,getDisplayValue:o,notFound:s,loadingSkeleton:l,label:c,placeholder:d="Select...",value:p,onChange:g,disabled:m=!1,className:b,triggerClassName:y,searchInputClassName:v,noResultsMessage:k,triggerTooltip:A,clearable:x=!0}){const[R,O]=w.useState(!1),[N,C]=w.useState(!1),[_,L]=w.useState([]),[I,D]=w.useState(!1),[G,$]=w.useState(null),[B,W]=w.useState(p),[Q,H]=w.useState(null),[U,F]=w.useState(""),Y=HT(U,t?0:150),[M,V]=w.useState([]),[j,P]=w.useState(null);w.useEffect(()=>{O(!0),W(p)},[p]),w.useEffect(()=>{p&&(!_.length||!Q)?P(E.jsx("div",{children:p})):Q&&P(null)},[p,_.length,Q]),w.useEffect(()=>{if(p&&_.length>0){const J=_.find(ie=>a(ie)===p);J&&H(J)}},[p,_,a]),w.useEffect(()=>{R||(async()=>{try{D(!0),$(null);const ie=await e(p);V(ie),L(ie)}catch(ie){$(ie instanceof Error?ie.message:"Failed to fetch options")}finally{D(!1)}})()},[R,e,p]),w.useEffect(()=>{const J=async()=>{try{D(!0),$(null);const ie=await e(Y);V(ie),L(ie)}catch(ie){$(ie instanceof Error?ie.message:"Failed to fetch options")}finally{D(!1)}};R&&t?t&&L(Y?M.filter(ie=>n?n(ie,Y):!0):M):J()},[e,Y,R,t,n]);const Z=w.useCallback(J=>{const ie=x&&J===B?"":J;W(ie),H(_.find(K=>a(K)===ie)||null),g(ie),C(!1)},[B,g,x,_,a]);return E.jsxs(mp,{open:N,onOpenChange:C,children:[E.jsx(bp,{asChild:!0,children:E.jsxs(nt,{variant:"outline",role:"combobox","aria-expanded":N,className:Me("justify-between",m&&"cursor-not-allowed opacity-50",y),disabled:m,tooltip:A,side:"bottom",children:[p==="*"?E.jsx("div",{children:"*"}):Q?o(Q):j||d,E.jsx(iZ,{className:"opacity-50",size:10})]})}),E.jsx(Xu,{className:Me("p-0",b),onCloseAutoFocus:J=>J.preventDefault(),children:E.jsxs(Ap,{shouldFilter:!1,children:[E.jsxs("div",{className:"relative w-full border-b",children:[E.jsx(zT,{placeholder:`Search ${c.toLowerCase()}...`,value:U,onValueChange:J=>{F(J)},className:v}),I&&_.length>0&&E.jsx("div",{className:"absolute top-1/2 right-2 flex -translate-y-1/2 transform items-center",children:E.jsx(zU,{className:"h-4 w-4 animate-spin"})})]}),E.jsxs(Rp,{children:[G&&E.jsx("div",{className:"text-destructive p-4 text-center",children:G}),I&&_.length===0&&(l||E.jsx(zae,{})),!I&&!G&&_.length===0&&(s||E.jsx(BT,{children:k??`No ${c.toLowerCase()} found.`})),E.jsx(el,{children:_.map(J=>E.jsxs(tl,{value:a(J),onSelect:Z,className:"truncate",children:[r(J),E.jsx(bT,{className:Me("ml-auto h-3 w-3",B===a(J)?"opacity-100":"opacity-0")})]},a(J)))})]})]})})]})}function zae(){return E.jsx(el,{children:E.jsx(tl,{disabled:!0,children:E.jsxs("div",{className:"flex w-full items-center gap-2",children:[E.jsx("div",{className:"bg-muted h-6 w-6 animate-pulse rounded-full"}),E.jsxs("div",{className:"flex flex-1 flex-col gap-1",children:[E.jsx("div",{className:"bg-muted h-4 w-24 animate-pulse rounded"}),E.jsx("div",{className:"bg-muted h-3 w-16 animate-pulse rounded"})]})]})})})}const Bae=()=>{const{t:e}=Et(),t=Ie.use.queryLabel(),n=ze.use.allDatabaseLabels(),r=ze.use.labelsFetchAttempted(),a=w.useCallback(()=>{const l=new Co({idField:"id",fields:["value"],searchOptions:{prefix:!0,fuzzy:.2,boost:{label:2}}}),c=n.map((d,p)=>({id:p,value:d}));return l.addAll(c),{labels:n,searchEngine:l}},[n]),o=w.useCallback(async l=>{const{labels:c,searchEngine:d}=a();let p=c;return l&&(p=d.search(l).map(g=>c[g.id])),p.length<=M_?p:[...p.slice(0,M_),"..."]},[a]);w.useEffect(()=>{r&&(n.length>1?t&&t!=="*"&&!n.includes(t)?(console.log(`Label "${t}" not in available labels, setting to "*"`),Ie.getState().setQueryLabel("*")):console.log(`Label "${t}" is valid`):t&&n.length<=1&&t&&t!=="*"&&(console.log("Available labels list is empty, setting label to empty"),Ie.getState().setQueryLabel("")),ze.getState().setLabelsFetchAttempted(!1))},[n,t,r]);const s=w.useCallback(()=>{ze.getState().setLabelsFetchAttempted(!1),ze.getState().setGraphDataFetchAttempted(!1),ze.getState().setLastSuccessfulQueryLabel("");const l=Ie.getState().queryLabel;l?(Ie.getState().setQueryLabel(""),setTimeout(()=>{Ie.getState().setQueryLabel(l)},0)):Ie.getState().setQueryLabel("*")},[]);return E.jsxs("div",{className:"flex items-center",children:[E.jsx(nt,{size:"icon",variant:Er,onClick:s,tooltip:e("graphPanel.graphLabels.refreshTooltip"),className:"mr-1",children:E.jsx(BU,{className:"h-4 w-4"})}),E.jsx(Fae,{className:"ml-2",triggerClassName:"max-h-8",searchInputClassName:"max-h-8",triggerTooltip:e("graphPanel.graphLabels.selectTooltip"),fetcher:o,renderOption:l=>E.jsx("div",{children:l}),getOptionValue:l=>l,getDisplayValue:l=>E.jsx("div",{children:l}),notFound:E.jsx("div",{className:"py-6 text-center text-sm",children:"No labels found"}),label:e("graphPanel.graphLabels.label"),placeholder:e("graphPanel.graphLabels.placeholder"),value:t!==null?t:"*",onChange:l=>{const c=Ie.getState().queryLabel;l==="..."&&(l="*"),l===c&&l!=="*"&&(l="*"),ze.getState().setGraphDataFetchAttempted(!1),Ie.getState().setQueryLabel(l)},clearable:!1})]})},Jn=({text:e,className:t,tooltipClassName:n,tooltip:r,side:a,onClick:o})=>r?E.jsx(gT,{delayDuration:200,children:E.jsxs(hT,{children:[E.jsx(mT,{asChild:!0,children:E.jsx("label",{className:Me(t,o!==void 0?"cursor-pointer":void 0),onClick:o,children:e})}),E.jsx(pp,{side:a,className:n,children:r})]})}):E.jsx("label",{className:Me(t,o!==void 0?"cursor-pointer":void 0),onClick:o,children:e});var nf={exports:{}},jae=nf.exports,NO;function Uae(){return NO||(NO=1,function(e){(function(t,n,r){function a(c){var d=this,p=l();d.next=function(){var g=2091639*d.s0+d.c*23283064365386963e-26;return d.s0=d.s1,d.s1=d.s2,d.s2=g-(d.c=g|0)},d.c=1,d.s0=p(" "),d.s1=p(" "),d.s2=p(" "),d.s0-=p(c),d.s0<0&&(d.s0+=1),d.s1-=p(c),d.s1<0&&(d.s1+=1),d.s2-=p(c),d.s2<0&&(d.s2+=1),p=null}function o(c,d){return d.c=c.c,d.s0=c.s0,d.s1=c.s1,d.s2=c.s2,d}function s(c,d){var p=new a(c),g=d&&d.state,m=p.next;return m.int32=function(){return p.next()*4294967296|0},m.double=function(){return m()+(m()*2097152|0)*11102230246251565e-32},m.quick=m,g&&(typeof g=="object"&&o(g,p),m.state=function(){return o(p,{})}),m}function l(){var c=4022871197,d=function(p){p=String(p);for(var g=0;g>>0,m-=c,m*=c,c=m>>>0,m-=c,c+=m*4294967296}return(c>>>0)*23283064365386963e-26};return d}n&&n.exports?n.exports=s:this.alea=s})(jae,e)}(nf)),nf.exports}var rf={exports:{}},Gae=rf.exports,OO;function Hae(){return OO||(OO=1,function(e){(function(t,n,r){function a(l){var c=this,d="";c.x=0,c.y=0,c.z=0,c.w=0,c.next=function(){var g=c.x^c.x<<11;return c.x=c.y,c.y=c.z,c.z=c.w,c.w^=c.w>>>19^g^g>>>8},l===(l|0)?c.x=l:d+=l;for(var p=0;p>>0)/4294967296};return g.double=function(){do var m=d.next()>>>11,b=(d.next()>>>0)/4294967296,y=(m+b)/(1<<21);while(y===0);return y},g.int32=d.next,g.quick=g,p&&(typeof p=="object"&&o(p,d),g.state=function(){return o(d,{})}),g}n&&n.exports?n.exports=s:this.xor128=s})(Gae,e)}(rf)),rf.exports}var af={exports:{}},$ae=af.exports,IO;function qae(){return IO||(IO=1,function(e){(function(t,n,r){function a(l){var c=this,d="";c.next=function(){var g=c.x^c.x>>>2;return c.x=c.y,c.y=c.z,c.z=c.w,c.w=c.v,(c.d=c.d+362437|0)+(c.v=c.v^c.v<<4^(g^g<<1))|0},c.x=0,c.y=0,c.z=0,c.w=0,c.v=0,l===(l|0)?c.x=l:d+=l;for(var p=0;p>>4),c.next()}function o(l,c){return c.x=l.x,c.y=l.y,c.z=l.z,c.w=l.w,c.v=l.v,c.d=l.d,c}function s(l,c){var d=new a(l),p=c&&c.state,g=function(){return(d.next()>>>0)/4294967296};return g.double=function(){do var m=d.next()>>>11,b=(d.next()>>>0)/4294967296,y=(m+b)/(1<<21);while(y===0);return y},g.int32=d.next,g.quick=g,p&&(typeof p=="object"&&o(p,d),g.state=function(){return o(d,{})}),g}n&&n.exports?n.exports=s:this.xorwow=s})($ae,e)}(af)),af.exports}var of={exports:{}},Vae=of.exports,DO;function Wae(){return DO||(DO=1,function(e){(function(t,n,r){function a(l){var c=this;c.next=function(){var p=c.x,g=c.i,m,b;return m=p[g],m^=m>>>7,b=m^m<<24,m=p[g+1&7],b^=m^m>>>10,m=p[g+3&7],b^=m^m>>>3,m=p[g+4&7],b^=m^m<<7,m=p[g+7&7],m=m^m<<13,b^=m^m<<9,p[g]=b,c.i=g+1&7,b};function d(p,g){var m,b=[];if(g===(g|0))b[0]=g;else for(g=""+g,m=0;m0;--m)p.next()}d(c,l)}function o(l,c){return c.x=l.x.slice(),c.i=l.i,c}function s(l,c){l==null&&(l=+new Date);var d=new a(l),p=c&&c.state,g=function(){return(d.next()>>>0)/4294967296};return g.double=function(){do var m=d.next()>>>11,b=(d.next()>>>0)/4294967296,y=(m+b)/(1<<21);while(y===0);return y},g.int32=d.next,g.quick=g,p&&(p.x&&o(p,d),g.state=function(){return o(d,{})}),g}n&&n.exports?n.exports=s:this.xorshift7=s})(Vae,e)}(of)),of.exports}var sf={exports:{}},Yae=sf.exports,LO;function Kae(){return LO||(LO=1,function(e){(function(t,n,r){function a(l){var c=this;c.next=function(){var p=c.w,g=c.X,m=c.i,b,y;return c.w=p=p+1640531527|0,y=g[m+34&127],b=g[m=m+1&127],y^=y<<13,b^=b<<17,y^=y>>>15,b^=b>>>12,y=g[m]=y^b,c.i=m,y+(p^p>>>16)|0};function d(p,g){var m,b,y,v,k,A=[],x=128;for(g===(g|0)?(b=g,g=null):(g=g+"\0",b=0,x=Math.max(x,g.length)),y=0,v=-32;v>>15,b^=b<<4,b^=b>>>13,v>=0&&(k=k+1640531527|0,m=A[v&127]^=b+k,y=m==0?y+1:0);for(y>=128&&(A[(g&&g.length||0)&127]=-1),y=127,v=4*128;v>0;--v)b=A[y+34&127],m=A[y=y+1&127],b^=b<<13,m^=m<<17,b^=b>>>15,m^=m>>>12,A[y]=b^m;p.w=k,p.X=A,p.i=y}d(c,l)}function o(l,c){return c.i=l.i,c.w=l.w,c.X=l.X.slice(),c}function s(l,c){l==null&&(l=+new Date);var d=new a(l),p=c&&c.state,g=function(){return(d.next()>>>0)/4294967296};return g.double=function(){do var m=d.next()>>>11,b=(d.next()>>>0)/4294967296,y=(m+b)/(1<<21);while(y===0);return y},g.int32=d.next,g.quick=g,p&&(p.X&&o(p,d),g.state=function(){return o(d,{})}),g}n&&n.exports?n.exports=s:this.xor4096=s})(Yae,e)}(sf)),sf.exports}var lf={exports:{}},Xae=lf.exports,MO;function Zae(){return MO||(MO=1,function(e){(function(t,n,r){function a(l){var c=this,d="";c.next=function(){var g=c.b,m=c.c,b=c.d,y=c.a;return g=g<<25^g>>>7^m,m=m-b|0,b=b<<24^b>>>8^y,y=y-g|0,c.b=g=g<<20^g>>>12^m,c.c=m=m-b|0,c.d=b<<16^m>>>16^y,c.a=y-g|0},c.a=0,c.b=0,c.c=-1640531527,c.d=1367130551,l===Math.floor(l)?(c.a=l/4294967296|0,c.b=l|0):d+=l;for(var p=0;p>>0)/4294967296};return g.double=function(){do var m=d.next()>>>11,b=(d.next()>>>0)/4294967296,y=(m+b)/(1<<21);while(y===0);return y},g.int32=d.next,g.quick=g,p&&(typeof p=="object"&&o(p,d),g.state=function(){return o(d,{})}),g}n&&n.exports?n.exports=s:this.tychei=s})(Xae,e)}(lf)),lf.exports}var uf={exports:{}};const Qae={},Jae=Object.freeze(Object.defineProperty({__proto__:null,default:Qae},Symbol.toStringTag,{value:"Module"})),eoe=sq(Jae);var toe=uf.exports,PO;function noe(){return PO||(PO=1,function(e){(function(t,n,r){var a=256,o=6,s=52,l="random",c=r.pow(a,o),d=r.pow(2,s),p=d*2,g=a-1,m;function b(O,N,C){var _=[];N=N==!0?{entropy:!0}:N||{};var L=A(k(N.entropy?[O,R(n)]:O??x(),3),_),I=new y(_),D=function(){for(var G=I.g(o),$=c,B=0;G=p;)G/=2,$/=2,B>>>=1;return(G+B)/$};return D.int32=function(){return I.g(4)|0},D.quick=function(){return I.g(4)/4294967296},D.double=D,A(R(I.S),n),(N.pass||C||function(G,$,B,W){return W&&(W.S&&v(W,I),G.state=function(){return v(I,{})}),B?(r[l]=G,$):G})(D,L,"global"in N?N.global:this==r,N.state)}function y(O){var N,C=O.length,_=this,L=0,I=_.i=_.j=0,D=_.S=[];for(C||(O=[C++]);L{const t="#CCCCCC";if(!e)return t;const n=ze.getState().typeColorMap;if(!n.has(e)){Nf(e,{global:!0});const r=vB(),a=new Map(n);return a.set(e,r),ze.setState({typeColorMap:a}),r}return n.get(e)||t},ioe=e=>{if(!e)return console.log("Graph validation failed: graph is null"),!1;if(!Array.isArray(e.nodes)||!Array.isArray(e.edges))return console.log("Graph validation failed: nodes or edges is not an array"),!1;if(e.nodes.length===0)return console.log("Graph validation failed: nodes array is empty"),!1;for(const t of e.nodes)if(!t.id||!t.labels||!t.properties)return console.log("Graph validation failed: invalid node structure"),!1;for(const t of e.edges)if(!t.id||!t.source||!t.target)return console.log("Graph validation failed: invalid edge structure"),!1;for(const t of e.edges){const n=e.getNode(t.source),r=e.getNode(t.target);if(n==null||r==null)return console.log("Graph validation failed: edge references non-existent node"),!1}return console.log("Graph validation passed"),!0},soe=async(e,t,n)=>{let r=null;if(!ze.getState().lastSuccessfulQueryLabel){console.log("Last successful queryLabel is empty");try{await ze.getState().fetchAllDatabaseLabels()}catch(l){console.error("Failed to fetch all database labels:",l)}}ze.getState().setLabelsFetchAttempted(!0);const o=e||"*";try{console.log(`Fetching graph label: ${o}, depth: ${t}, nodes: ${n}`),r=await XB(o,t,n)}catch(l){return rr.getState().setErrorMessage(Gn(l),"Query Graphs Error!"),null}let s=null;if(r){const l={},c={};for(let m=0;m0){const m=w0-li;for(const b of r.nodes)b.size=Math.round(li+m*Math.pow((b.degree-d)/g,.5))}s=new SV,s.nodes=r.nodes,s.edges=r.edges,s.nodeIdMap=l,s.edgeIdMap=c,ioe(s)||(s=null,console.warn("Invalid graph data")),console.log("Graph data loaded")}return{rawGraph:s,is_truncated:r.is_truncated}},loe=e=>{var l,c;const t=Ie.getState().minEdgeSize,n=Ie.getState().maxEdgeSize;if(!e||!e.nodes.length)return console.log("No graph data available, skipping sigma graph creation"),null;const r=new Au;for(const d of(e==null?void 0:e.nodes)??[]){Nf(d.id+Date.now().toString(),{global:!0});const p=Math.random(),g=Math.random();r.addNode(d.id,{label:d.labels.join(", "),color:d.color,x:p,y:g,size:d.size,borderColor:E0,borderSize:.2})}for(const d of(e==null?void 0:e.edges)??[]){const p=((l=d.properties)==null?void 0:l.weight)!==void 0?Number(d.properties.weight):1;d.dynamicId=r.addDirectedEdge(d.source,d.target,{label:((c=d.properties)==null?void 0:c.keywords)||void 0,size:p,originalWeight:p})}let a=Number.MAX_SAFE_INTEGER,o=0;r.forEachEdge(d=>{const p=r.getEdgeAttribute(d,"originalWeight")||1;a=Math.min(a,p),o=Math.max(o,p)});const s=o-a;if(s>0){const d=n-t;r.forEachEdge(p=>{const g=r.getEdgeAttribute(p,"originalWeight")||1,m=t+d*Math.pow((g-a)/s,.5);r.setEdgeAttribute(p,"size",m)})}else r.forEachEdge(d=>{r.setEdgeAttribute(d,"size",t)});return r},uoe=()=>{const{t:e}=Et(),t=Ie.use.queryLabel(),n=ze.use.rawGraph(),r=ze.use.sigmaGraph(),a=Ie.use.graphQueryMaxDepth(),o=Ie.use.graphMaxNodes(),s=ze.use.isFetching(),l=ze.use.nodeToExpand(),c=ze.use.nodeToPrune(),d=w.useRef(!1),p=w.useRef(!1),g=w.useRef(!1),m=w.useCallback(A=>(n==null?void 0:n.getNode(A))||null,[n]),b=w.useCallback((A,x=!0)=>(n==null?void 0:n.getEdge(A,x))||null,[n]),y=w.useRef(!1);w.useEffect(()=>{if(!t&&(n!==null||r!==null)){const A=ze.getState();A.reset(),A.setGraphDataFetchAttempted(!1),A.setLabelsFetchAttempted(!1),d.current=!1,p.current=!1}},[t,n,r]),w.useEffect(()=>{if(!y.current&&!(!t&&g.current)&&!s&&!ze.getState().graphDataFetchAttempted){y.current=!0,ze.getState().setGraphDataFetchAttempted(!0);const A=ze.getState();A.setIsFetching(!0),A.clearSelection(),A.sigmaGraph&&A.sigmaGraph.forEachNode(C=>{var _;(_=A.sigmaGraph)==null||_.setNodeAttribute(C,"highlighted",!1)}),console.log("Preparing graph data...");const x=t,R=a,O=o;let N;x?N=soe(x,R,O):(console.log("Query label is empty, show empty graph"),N=Promise.resolve({rawGraph:null,is_truncated:!1})),N.then(C=>{const _=ze.getState(),L=C==null?void 0:C.rawGraph;if(L&&L.nodes&&L.nodes.forEach(I=>{var G;const D=(G=I.properties)==null?void 0:G.entity_type;I.color=ooe(D)}),C!=null&&C.is_truncated&&Ft.info(e("graphPanel.dataIsTruncated","Graph data is truncated to Max Nodes")),_.reset(),!L||!L.nodes||L.nodes.length===0){const I=new Au;I.addNode("empty-graph-node",{label:e("graphPanel.emptyGraph"),color:"#cccccc",x:.5,y:.5,size:15,borderColor:E0,borderSize:.2}),_.setSigmaGraph(I),_.setRawGraph(null),_.setGraphIsEmpty(!0);const D=rr.getState().message,G=D&&D.includes("Authentication required");!G&&x&&Ie.getState().setQueryLabel(""),G?console.log("Keep queryLabel for post-login reload"):_.setLastSuccessfulQueryLabel(""),console.log(`Graph data is empty, created graph with empty graph node. Auth error: ${G}`)}else{const I=loe(L);L.buildDynamicMap(),_.setSigmaGraph(I),_.setRawGraph(L),_.setGraphIsEmpty(!1),_.setLastSuccessfulQueryLabel(x),_.setMoveToSelectedNode(!0)}d.current=!0,p.current=!0,y.current=!1,_.setIsFetching(!1),(!L||!L.nodes||L.nodes.length===0)&&!x&&(g.current=!0)}).catch(C=>{console.error("Error fetching graph data:",C);const _=ze.getState();_.setIsFetching(!1),d.current=!1,y.current=!1,_.setGraphDataFetchAttempted(!1),_.setLastSuccessfulQueryLabel("")})}},[t,a,o,s,e]),w.useEffect(()=>{l&&((async x=>{var R,O,N,C;if(!(!x||!r||!n))try{const _=n.getNode(x);if(!_){console.error("Node not found:",x);return}const L=_.labels[0];if(!L){console.error("Node has no label:",x);return}const I=await XB(L,2,1e3);if(!I||!I.nodes||!I.edges){console.error("Failed to fetch extended graph");return}const D=[];for(const K of I.nodes){Nf(K.id,{global:!0});const ee=vB();D.push({id:K.id,labels:K.labels,properties:K.properties,size:10,x:Math.random(),y:Math.random(),color:ee,degree:0})}const G=[];for(const K of I.edges)G.push({id:K.id,source:K.source,target:K.target,type:K.type,properties:K.properties,dynamicId:""});const $={};r.forEachNode(K=>{$[K]={x:r.getNodeAttribute(K,"x"),y:r.getNodeAttribute(K,"y")}});const B=new Set(r.nodes()),W=new Set,Q=new Set,H=1;let U=0;r.forEachNode(K=>{const ee=r.degree(K);U=Math.max(U,ee)});for(const K of D){if(B.has(K.id))continue;G.some(he=>he.source===x&&he.target===K.id||he.target===x&&he.source===K.id)&&W.add(K.id)}const F=new Map,Y=new Map,M=new Set;for(const K of G){const ee=B.has(K.source)||W.has(K.source),he=B.has(K.target)||W.has(K.target);ee&&he?(Q.add(K.id),W.has(K.source)?F.set(K.source,(F.get(K.source)||0)+1):B.has(K.source)&&Y.set(K.source,(Y.get(K.source)||0)+1),W.has(K.target)?F.set(K.target,(F.get(K.target)||0)+1):B.has(K.target)&&Y.set(K.target,(Y.get(K.target)||0)+1)):(r.hasNode(K.source)?M.add(K.source):W.has(K.source)&&(M.add(K.source),F.set(K.source,(F.get(K.source)||0)+1)),r.hasNode(K.target)?M.add(K.target):W.has(K.target)&&(M.add(K.target),F.set(K.target,(F.get(K.target)||0)+1)))}const V=(K,ee,he,oe)=>{const Se=oe-he||1,we=w0-li;for(const De of ee)if(K.hasNode(De)){let Ce=K.degree(De);Ce+=1;const Ee=Math.min(Ce,oe+1),te=Math.round(li+we*Math.pow((Ee-he)/Se,.5)),fe=K.getNodeAttribute(De,"size");te>fe&&K.setNodeAttribute(De,"size",te)}};if(W.size===0){V(r,M,H,U),Ft.info(e("graphPanel.propertiesView.node.noNewNodes"));return}for(const[,K]of F.entries())U=Math.max(U,K);for(const[K,ee]of Y.entries()){const oe=r.degree(K)+ee;U=Math.max(U,oe)}const j=U-H||1,P=w0-li,Z=((R=ze.getState().sigmaInstance)==null?void 0:R.getCamera().ratio)||1,J=Math.max(Math.sqrt(_.size)*4,Math.sqrt(W.size)*3)/Z;Nf(Date.now().toString(),{global:!0});const ie=Math.random()*2*Math.PI;console.log("nodeSize:",_.size,"nodesToAdd:",W.size),console.log("cameraRatio:",Math.round(Z*100)/100,"spreadFactor:",Math.round(J*100)/100);for(const K of W){const ee=D.find(Ee=>Ee.id===K),he=F.get(K)||0,oe=Math.min(he,U+1),Se=Math.round(li+P*Math.pow((oe-H)/j,.5)),we=2*Math.PI*(Array.from(W).indexOf(K)/W.size),De=((O=$[K])==null?void 0:O.x)||$[_.id].x+Math.cos(ie+we)*J,Ce=((N=$[K])==null?void 0:N.y)||$[_.id].y+Math.sin(ie+we)*J;r.addNode(K,{label:ee.labels.join(", "),color:ee.color,x:De,y:Ce,size:Se,borderColor:E0,borderSize:.2}),n.getNode(K)||(ee.size=Se,ee.x=De,ee.y=Ce,ee.degree=he,n.nodes.push(ee),n.nodeIdMap[K]=n.nodes.length-1)}for(const K of Q){const ee=G.find(he=>he.id===K);r.hasEdge(ee.source,ee.target)||r.hasEdge(ee.target,ee.source)||(ee.dynamicId=r.addDirectedEdge(ee.source,ee.target,{label:((C=ee.properties)==null?void 0:C.keywords)||void 0}),n.getEdge(ee.id,!1)?console.error("Edge already exists in rawGraph:",ee.id):(n.edges.push(ee),n.edgeIdMap[ee.id]=n.edges.length-1,n.edgeDynamicIdMap[ee.dynamicId]=n.edges.length-1))}if(n.buildDynamicMap(),ze.getState().resetSearchEngine(),V(r,M,H,U),r.hasNode(x)){const K=r.degree(x),ee=Math.min(K,U+1),he=Math.round(li+P*Math.pow((ee-H)/j,.5));r.setNodeAttribute(x,"size",he),_.size=he,_.degree=K}}catch(_){console.error("Error expanding node:",_)}})(l),window.setTimeout(()=>{ze.getState().triggerNodeExpand(null)},0))},[l,r,n,e]);const v=w.useCallback((A,x)=>{const R=new Set([A]);return x.forEachNode(O=>{if(O===A)return;const N=x.neighbors(O);N.length===1&&N[0]===A&&R.add(O)}),R},[]);return w.useEffect(()=>{c&&((x=>{if(!(!x||!r||!n))try{const R=ze.getState();if(!r.hasNode(x)){console.error("Node not found:",x);return}const O=v(x,r);if(O.size===r.nodes().length){Ft.error(e("graphPanel.propertiesView.node.deleteAllNodesError"));return}R.clearSelection();for(const N of O){r.dropNode(N);const C=n.nodeIdMap[N];if(C!==void 0){const _=n.edges.filter(L=>L.source===N||L.target===N);for(const L of _){const I=n.edgeIdMap[L.id];if(I!==void 0){n.edges.splice(I,1);for(const[D,G]of Object.entries(n.edgeIdMap))G>I&&(n.edgeIdMap[D]=G-1);delete n.edgeIdMap[L.id],delete n.edgeDynamicIdMap[L.dynamicId]}}n.nodes.splice(C,1);for(const[L,I]of Object.entries(n.nodeIdMap))I>C&&(n.nodeIdMap[L]=I-1);delete n.nodeIdMap[N]}}n.buildDynamicMap(),ze.getState().resetSearchEngine(),O.size>1&&Ft.info(e("graphPanel.propertiesView.node.nodesRemoved",{count:O.size}))}catch(R){console.error("Error pruning node:",R)}})(c),window.setTimeout(()=>{ze.getState().triggerNodePrune(null)},0))},[c,r,n,v,e]),{lightrageGraph:w.useCallback(()=>{if(r)return r;console.log("Creating new Sigma graph instance");const A=new Au;return ze.getState().setSigmaGraph(A),A},[r]),getNode:m,getEdge:b}},coe=()=>{const{getNode:e,getEdge:t}=uoe(),n=ze.use.selectedNode(),r=ze.use.focusedNode(),a=ze.use.selectedEdge(),o=ze.use.focusedEdge(),[s,l]=w.useState(null),[c,d]=w.useState(null);return w.useEffect(()=>{let p=null,g=null;r?(p="node",g=e(r)):n?(p="node",g=e(n)):o?(p="edge",g=t(o,!0)):a&&(p="edge",g=t(a,!0)),g?(p=="node"?l(doe(g)):l(foe(g)),d(p)):(l(null),d(null))},[r,n,o,a,l,d,e,t]),s?E.jsx("div",{className:"bg-background/80 max-w-xs rounded-lg border-2 p-2 text-xs backdrop-blur-lg",children:c=="node"?E.jsx(poe,{node:s}):E.jsx(goe,{edge:s})}):E.jsx(E.Fragment,{})},doe=e=>{const t=ze.getState(),n=[];if(t.sigmaGraph&&t.rawGraph)try{if(!t.sigmaGraph.hasNode(e.id))return{...e,relationships:[]};const r=t.sigmaGraph.edges(e.id);for(const a of r){if(!t.sigmaGraph.hasEdge(a))continue;const o=t.rawGraph.getEdge(a,!0);if(o){const l=e.id===o.source?o.target:o.source;if(!t.sigmaGraph.hasNode(l))continue;const c=t.rawGraph.getNode(l);c&&n.push({type:"Neighbour",id:l,label:c.properties.entity_id?c.properties.entity_id:c.labels.join(", ")})}}}catch(r){console.error("Error refining node properties:",r)}return{...e,relationships:n}},foe=e=>{const t=ze.getState();let n,r;if(t.sigmaGraph&&t.rawGraph)try{if(!t.sigmaGraph.hasEdge(e.id))return{...e,sourceNode:void 0,targetNode:void 0};t.sigmaGraph.hasNode(e.source)&&(n=t.rawGraph.getNode(e.source)),t.sigmaGraph.hasNode(e.target)&&(r=t.rawGraph.getNode(e.target))}catch(a){console.error("Error refining edge properties:",a)}return{...e,sourceNode:n,targetNode:r}},ra=({name:e,value:t,onClick:n,tooltip:r})=>{const{t:a}=Et(),o=s=>{const l=`graphPanel.propertiesView.node.propertyNames.${s}`,c=a(l);return c===l?s:c};return E.jsxs("div",{className:"flex items-center gap-2",children:[E.jsx("label",{className:"text-primary/60 tracking-wide whitespace-nowrap",children:o(e)}),":",E.jsx(Jn,{className:"hover:bg-primary/20 rounded p-1 overflow-hidden text-ellipsis",tooltipClassName:"max-w-80",text:t,tooltip:r||(typeof t=="string"?t:JSON.stringify(t,null,2)),side:"left",onClick:n})]})},poe=({node:e})=>{const{t}=Et(),n=()=>{ze.getState().triggerNodeExpand(e.id)},r=()=>{ze.getState().triggerNodePrune(e.id)};return E.jsxs("div",{className:"flex flex-col gap-2",children:[E.jsxs("div",{className:"flex justify-between items-center",children:[E.jsx("label",{className:"text-md pl-1 font-bold tracking-wide text-blue-700",children:t("graphPanel.propertiesView.node.title")}),E.jsxs("div",{className:"flex gap-3",children:[E.jsx(nt,{size:"icon",variant:"ghost",className:"h-7 w-7 border border-gray-400 hover:bg-gray-200 dark:border-gray-600 dark:hover:bg-gray-700",onClick:n,tooltip:t("graphPanel.propertiesView.node.expandNode"),children:E.jsx(yZ,{className:"h-4 w-4 text-gray-700 dark:text-gray-300"})}),E.jsx(nt,{size:"icon",variant:"ghost",className:"h-7 w-7 border border-gray-400 hover:bg-gray-200 dark:border-gray-600 dark:hover:bg-gray-700",onClick:r,tooltip:t("graphPanel.propertiesView.node.pruneNode"),children:E.jsx($Z,{className:"h-4 w-4 text-gray-900 dark:text-gray-300"})})]})]}),E.jsxs("div",{className:"bg-primary/5 max-h-96 overflow-auto rounded p-1",children:[E.jsx(ra,{name:t("graphPanel.propertiesView.node.id"),value:e.id}),E.jsx(ra,{name:t("graphPanel.propertiesView.node.labels"),value:e.labels.join(", "),onClick:()=>{ze.getState().setSelectedNode(e.id,!0)}}),E.jsx(ra,{name:t("graphPanel.propertiesView.node.degree"),value:e.degree})]}),E.jsx("label",{className:"text-md pl-1 font-bold tracking-wide text-amber-700",children:t("graphPanel.propertiesView.node.properties")}),E.jsx("div",{className:"bg-primary/5 max-h-96 overflow-auto rounded p-1",children:Object.keys(e.properties).sort().map(a=>E.jsx(ra,{name:a,value:e.properties[a]},a))}),e.relationships.length>0&&E.jsxs(E.Fragment,{children:[E.jsx("label",{className:"text-md pl-1 font-bold tracking-wide text-emerald-700",children:t("graphPanel.propertiesView.node.relationships")}),E.jsx("div",{className:"bg-primary/5 max-h-96 overflow-auto rounded p-1",children:e.relationships.map(({type:a,id:o,label:s})=>E.jsx(ra,{name:a,value:s,onClick:()=>{ze.getState().setSelectedNode(o,!0)}},o))})]})]})},goe=({edge:e})=>{const{t}=Et();return E.jsxs("div",{className:"flex flex-col gap-2",children:[E.jsx("label",{className:"text-md pl-1 font-bold tracking-wide text-violet-700",children:t("graphPanel.propertiesView.edge.title")}),E.jsxs("div",{className:"bg-primary/5 max-h-96 overflow-auto rounded p-1",children:[E.jsx(ra,{name:t("graphPanel.propertiesView.edge.id"),value:e.id}),e.type&&E.jsx(ra,{name:t("graphPanel.propertiesView.edge.type"),value:e.type}),E.jsx(ra,{name:t("graphPanel.propertiesView.edge.source"),value:e.sourceNode?e.sourceNode.labels.join(", "):e.source,onClick:()=>{ze.getState().setSelectedNode(e.source,!0)}}),E.jsx(ra,{name:t("graphPanel.propertiesView.edge.target"),value:e.targetNode?e.targetNode.labels.join(", "):e.target,onClick:()=>{ze.getState().setSelectedNode(e.target,!0)}})]}),E.jsx("label",{className:"text-md pl-1 font-bold tracking-wide text-amber-700",children:t("graphPanel.propertiesView.edge.properties")}),E.jsx("div",{className:"bg-primary/5 max-h-96 overflow-auto rounded p-1",children:Object.keys(e.properties).sort().map(n=>E.jsx(ra,{name:n,value:e.properties[n]},n))})]})},hoe=()=>{const{t:e}=Et(),t=Ie.use.graphQueryMaxDepth(),n=Ie.use.graphMaxNodes();return E.jsxs("div",{className:"absolute bottom-4 left-[calc(1rem+2.5rem)] flex items-center gap-2 text-xs text-gray-400",children:[E.jsxs("div",{children:[e("graphPanel.sideBar.settings.depth"),": ",t]}),E.jsxs("div",{children:[e("graphPanel.sideBar.settings.max"),": ",n]})]})},Ei=w.forwardRef(({className:e,...t},n)=>E.jsx("div",{ref:n,className:Me("bg-card text-card-foreground rounded-xl border shadow",e),...t}));Ei.displayName="Card";const Cu=w.forwardRef(({className:e,...t},n)=>E.jsx("div",{ref:n,className:Me("flex flex-col space-y-1.5 p-6",e),...t}));Cu.displayName="CardHeader";const _u=w.forwardRef(({className:e,...t},n)=>E.jsx("div",{ref:n,className:Me("leading-none font-semibold tracking-tight",e),...t}));_u.displayName="CardTitle";const Cp=w.forwardRef(({className:e,...t},n)=>E.jsx("div",{ref:n,className:Me("text-muted-foreground text-sm",e),...t}));Cp.displayName="CardDescription";const Nu=w.forwardRef(({className:e,...t},n)=>E.jsx("div",{ref:n,className:Me("p-6 pt-0",e),...t}));Nu.displayName="CardContent";const moe=w.forwardRef(({className:e,...t},n)=>E.jsx("div",{ref:n,className:Me("flex items-center p-6 pt-0",e),...t}));moe.displayName="CardFooter";function boe(e,t){return w.useReducer((n,r)=>t[n][r]??n,e)}var $T="ScrollArea",[B5,h0e]=$r($T),[yoe,Rr]=B5($T),j5=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:a,scrollHideDelay:o=600,...s}=e,[l,c]=w.useState(null),[d,p]=w.useState(null),[g,m]=w.useState(null),[b,y]=w.useState(null),[v,k]=w.useState(null),[A,x]=w.useState(0),[R,O]=w.useState(0),[N,C]=w.useState(!1),[_,L]=w.useState(!1),I=mt(t,G=>c(G)),D=yp(a);return E.jsx(yoe,{scope:n,type:r,dir:D,scrollHideDelay:o,scrollArea:l,viewport:d,onViewportChange:p,content:g,onContentChange:m,scrollbarX:b,onScrollbarXChange:y,scrollbarXEnabled:N,onScrollbarXEnabledChange:C,scrollbarY:v,onScrollbarYChange:k,scrollbarYEnabled:_,onScrollbarYEnabledChange:L,onCornerWidthChange:x,onCornerHeightChange:O,children:E.jsx(Je.div,{dir:D,...s,ref:I,style:{position:"relative","--radix-scroll-area-corner-width":A+"px","--radix-scroll-area-corner-height":R+"px",...e.style}})})});j5.displayName=$T;var U5="ScrollAreaViewport",G5=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:a,...o}=e,s=Rr(U5,n),l=w.useRef(null),c=mt(t,l,s.onViewportChange);return E.jsxs(E.Fragment,{children:[E.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),E.jsx(Je.div,{"data-radix-scroll-area-viewport":"",...o,ref:c,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style},children:E.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});G5.displayName=U5;var da="ScrollAreaScrollbar",qT=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=Rr(da,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:s}=a,l=e.orientation==="horizontal";return w.useEffect(()=>(l?o(!0):s(!0),()=>{l?o(!1):s(!1)}),[l,o,s]),a.type==="hover"?E.jsx(voe,{...r,ref:t,forceMount:n}):a.type==="scroll"?E.jsx(Soe,{...r,ref:t,forceMount:n}):a.type==="auto"?E.jsx(H5,{...r,ref:t,forceMount:n}):a.type==="always"?E.jsx(VT,{...r,ref:t}):null});qT.displayName=da;var voe=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=Rr(da,e.__scopeScrollArea),[o,s]=w.useState(!1);return w.useEffect(()=>{const l=a.scrollArea;let c=0;if(l){const d=()=>{window.clearTimeout(c),s(!0)},p=()=>{c=window.setTimeout(()=>s(!1),a.scrollHideDelay)};return l.addEventListener("pointerenter",d),l.addEventListener("pointerleave",p),()=>{window.clearTimeout(c),l.removeEventListener("pointerenter",d),l.removeEventListener("pointerleave",p)}}},[a.scrollArea,a.scrollHideDelay]),E.jsx(Tr,{present:n||o,children:E.jsx(H5,{"data-state":o?"visible":"hidden",...r,ref:t})})}),Soe=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=Rr(da,e.__scopeScrollArea),o=e.orientation==="horizontal",s=Np(()=>c("SCROLL_END"),100),[l,c]=boe("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return w.useEffect(()=>{if(l==="idle"){const d=window.setTimeout(()=>c("HIDE"),a.scrollHideDelay);return()=>window.clearTimeout(d)}},[l,a.scrollHideDelay,c]),w.useEffect(()=>{const d=a.viewport,p=o?"scrollLeft":"scrollTop";if(d){let g=d[p];const m=()=>{const b=d[p];g!==b&&(c("SCROLL"),s()),g=b};return d.addEventListener("scroll",m),()=>d.removeEventListener("scroll",m)}},[a.viewport,o,c,s]),E.jsx(Tr,{present:n||l!=="hidden",children:E.jsx(VT,{"data-state":l==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:Ke(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:Ke(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),H5=w.forwardRef((e,t)=>{const n=Rr(da,e.__scopeScrollArea),{forceMount:r,...a}=e,[o,s]=w.useState(!1),l=e.orientation==="horizontal",c=Np(()=>{if(n.viewport){const d=n.viewport.offsetWidth{const{orientation:n="vertical",...r}=e,a=Rr(da,e.__scopeScrollArea),o=w.useRef(null),s=w.useRef(0),[l,c]=w.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=Y5(l.viewport,l.content),p={...r,sizes:l,onSizesChange:c,hasThumb:d>0&&d<1,onThumbChange:m=>o.current=m,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:m=>s.current=m};function g(m,b){return Aoe(m,s.current,l,b)}return n==="horizontal"?E.jsx(Eoe,{...p,ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){const m=a.viewport.scrollLeft,b=zO(m,l,a.dir);o.current.style.transform=`translate3d(${b}px, 0, 0)`}},onWheelScroll:m=>{a.viewport&&(a.viewport.scrollLeft=m)},onDragScroll:m=>{a.viewport&&(a.viewport.scrollLeft=g(m,a.dir))}}):n==="vertical"?E.jsx(woe,{...p,ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){const m=a.viewport.scrollTop,b=zO(m,l);o.current.style.transform=`translate3d(0, ${b}px, 0)`}},onWheelScroll:m=>{a.viewport&&(a.viewport.scrollTop=m)},onDragScroll:m=>{a.viewport&&(a.viewport.scrollTop=g(m))}}):null}),Eoe=w.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...a}=e,o=Rr(da,e.__scopeScrollArea),[s,l]=w.useState(),c=w.useRef(null),d=mt(t,c,o.onScrollbarXChange);return w.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),E.jsx(q5,{"data-orientation":"horizontal",...a,ref:d,sizes:n,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":_p(n)+"px",...e.style},onThumbPointerDown:p=>e.onThumbPointerDown(p.x),onDragScroll:p=>e.onDragScroll(p.x),onWheelScroll:(p,g)=>{if(o.viewport){const m=o.viewport.scrollLeft+p.deltaX;e.onWheelScroll(m),X5(m,g)&&p.preventDefault()}},onResize:()=>{c.current&&o.viewport&&s&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:If(s.paddingLeft),paddingEnd:If(s.paddingRight)}})}})}),woe=w.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...a}=e,o=Rr(da,e.__scopeScrollArea),[s,l]=w.useState(),c=w.useRef(null),d=mt(t,c,o.onScrollbarYChange);return w.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),E.jsx(q5,{"data-orientation":"vertical",...a,ref:d,sizes:n,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":_p(n)+"px",...e.style},onThumbPointerDown:p=>e.onThumbPointerDown(p.y),onDragScroll:p=>e.onDragScroll(p.y),onWheelScroll:(p,g)=>{if(o.viewport){const m=o.viewport.scrollTop+p.deltaY;e.onWheelScroll(m),X5(m,g)&&p.preventDefault()}},onResize:()=>{c.current&&o.viewport&&s&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:If(s.paddingTop),paddingEnd:If(s.paddingBottom)}})}})}),[xoe,$5]=B5(da),q5=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:a,onThumbChange:o,onThumbPointerUp:s,onThumbPointerDown:l,onThumbPositionChange:c,onDragScroll:d,onWheelScroll:p,onResize:g,...m}=e,b=Rr(da,n),[y,v]=w.useState(null),k=mt(t,I=>v(I)),A=w.useRef(null),x=w.useRef(""),R=b.viewport,O=r.content-r.viewport,N=yn(p),C=yn(c),_=Np(g,10);function L(I){if(A.current){const D=I.clientX-A.current.left,G=I.clientY-A.current.top;d({x:D,y:G})}}return w.useEffect(()=>{const I=D=>{const G=D.target;(y==null?void 0:y.contains(G))&&N(D,O)};return document.addEventListener("wheel",I,{passive:!1}),()=>document.removeEventListener("wheel",I,{passive:!1})},[R,y,O,N]),w.useEffect(C,[r,C]),zs(y,_),zs(b.content,_),E.jsx(xoe,{scope:n,scrollbar:y,hasThumb:a,onThumbChange:yn(o),onThumbPointerUp:yn(s),onThumbPositionChange:C,onThumbPointerDown:yn(l),children:E.jsx(Je.div,{...m,ref:k,style:{position:"absolute",...m.style},onPointerDown:Ke(e.onPointerDown,I=>{I.button===0&&(I.target.setPointerCapture(I.pointerId),A.current=y.getBoundingClientRect(),x.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",b.viewport&&(b.viewport.style.scrollBehavior="auto"),L(I))}),onPointerMove:Ke(e.onPointerMove,L),onPointerUp:Ke(e.onPointerUp,I=>{const D=I.target;D.hasPointerCapture(I.pointerId)&&D.releasePointerCapture(I.pointerId),document.body.style.webkitUserSelect=x.current,b.viewport&&(b.viewport.style.scrollBehavior=""),A.current=null})})})}),Of="ScrollAreaThumb",V5=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=$5(Of,e.__scopeScrollArea);return E.jsx(Tr,{present:n||a.hasThumb,children:E.jsx(koe,{ref:t,...r})})}),koe=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...a}=e,o=Rr(Of,n),s=$5(Of,n),{onThumbPositionChange:l}=s,c=mt(t,g=>s.onThumbChange(g)),d=w.useRef(void 0),p=Np(()=>{d.current&&(d.current(),d.current=void 0)},100);return w.useEffect(()=>{const g=o.viewport;if(g){const m=()=>{if(p(),!d.current){const b=Roe(g,l);d.current=b,l()}};return l(),g.addEventListener("scroll",m),()=>g.removeEventListener("scroll",m)}},[o.viewport,p,l]),E.jsx(Je.div,{"data-state":s.hasThumb?"visible":"hidden",...a,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:Ke(e.onPointerDownCapture,g=>{const b=g.target.getBoundingClientRect(),y=g.clientX-b.left,v=g.clientY-b.top;s.onThumbPointerDown({x:y,y:v})}),onPointerUp:Ke(e.onPointerUp,s.onThumbPointerUp)})});V5.displayName=Of;var WT="ScrollAreaCorner",W5=w.forwardRef((e,t)=>{const n=Rr(WT,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?E.jsx(Toe,{...e,ref:t}):null});W5.displayName=WT;var Toe=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,a=Rr(WT,n),[o,s]=w.useState(0),[l,c]=w.useState(0),d=!!(o&&l);return zs(a.scrollbarX,()=>{var g;const p=((g=a.scrollbarX)==null?void 0:g.offsetHeight)||0;a.onCornerHeightChange(p),c(p)}),zs(a.scrollbarY,()=>{var g;const p=((g=a.scrollbarY)==null?void 0:g.offsetWidth)||0;a.onCornerWidthChange(p),s(p)}),d?E.jsx(Je.div,{...r,ref:t,style:{width:o,height:l,position:"absolute",right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function If(e){return e?parseInt(e,10):0}function Y5(e,t){const n=e/t;return isNaN(n)?0:n}function _p(e){const t=Y5(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function Aoe(e,t,n,r="ltr"){const a=_p(n),o=a/2,s=t||o,l=a-s,c=n.scrollbar.paddingStart+s,d=n.scrollbar.size-n.scrollbar.paddingEnd-l,p=n.content-n.viewport,g=r==="ltr"?[0,p]:[p*-1,0];return K5([c,d],g)(e)}function zO(e,t,n="ltr"){const r=_p(t),a=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-a,s=t.content-t.viewport,l=o-r,c=n==="ltr"?[0,s]:[s*-1,0],d=z0(e,c);return K5([0,s],[0,l])(d)}function K5(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function X5(e,t){return e>0&&e{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function a(){const o={left:e.scrollLeft,top:e.scrollTop},s=n.left!==o.left,l=n.top!==o.top;(s||l)&&t(),n=o,r=window.requestAnimationFrame(a)}(),()=>window.cancelAnimationFrame(r)};function Np(e,t){const n=yn(e),r=w.useRef(0);return w.useEffect(()=>()=>window.clearTimeout(r.current),[]),w.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function zs(e,t){const n=yn(t);Rn(()=>{let r=0;if(e){const a=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return a.observe(e),()=>{window.cancelAnimationFrame(r),a.unobserve(e)}}},[e,n])}var Z5=j5,Coe=G5,_oe=W5;const YT=w.forwardRef(({className:e,children:t,...n},r)=>E.jsxs(Z5,{ref:r,className:Me("relative overflow-hidden",e),...n,children:[E.jsx(Coe,{className:"h-full w-full rounded-[inherit]",children:t}),E.jsx(Q5,{}),E.jsx(_oe,{})]}));YT.displayName=Z5.displayName;const Q5=w.forwardRef(({className:e,orientation:t="vertical",...n},r)=>E.jsx(qT,{ref:r,orientation:t,className:Me("flex touch-none transition-colors select-none",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:E.jsx(V5,{className:"bg-border relative flex-1 rounded-full"})}));Q5.displayName=qT.displayName;const Noe=({className:e})=>{const{t}=Et(),n=ze.use.typeColorMap();return!n||n.size===0?null:E.jsxs(Ei,{className:`p-2 max-w-xs ${e}`,children:[E.jsx("h3",{className:"text-sm font-medium mb-2",children:t("graphPanel.legend")}),E.jsx(YT,{className:"max-h-40",children:E.jsx("div",{className:"flex flex-col gap-1",children:Array.from(n.entries()).map(([r,a])=>E.jsxs("div",{className:"flex items-center gap-2",children:[E.jsx("div",{className:"w-4 h-4 rounded-full",style:{backgroundColor:a}}),E.jsx("span",{className:"text-xs truncate",title:r,children:r})]},r))})})]})},Ooe=()=>{const{t:e}=Et(),t=Ie.use.showLegend(),n=Ie.use.setShowLegend(),r=w.useCallback(()=>{n(!t)},[t,n]);return E.jsx(nt,{variant:Er,onClick:r,tooltip:e("graphPanel.sideBar.legendControl.toggleLegend"),size:"icon",children:E.jsx(tZ,{})})},BO={allowInvalidContainer:!0,defaultNodeType:"default",defaultEdgeType:"curvedArrow",renderEdgeLabels:!1,edgeProgramClasses:{arrow:z4,curvedArrow:Bne,curvedNoArrow:zne},nodeProgramClasses:{default:Ene,circel:Ju,point:Kte},labelGridCellSize:60,labelRenderedSizeThreshold:12,enableEdgeEvents:!0,labelColor:{color:"#000",attribute:"labelColor"},edgeLabelColor:{color:"#000",attribute:"labelColor"},edgeLabelSize:8,labelSize:12},Ioe=()=>{const e=W4(),t=Ar(),[n,r]=w.useState(null);return w.useEffect(()=>{e({downNode:a=>{r(a.node),t.getGraph().setNodeAttribute(a.node,"highlighted",!0)},mousemovebody:a=>{if(!n)return;const o=t.viewportToGraph(a);t.getGraph().setNodeAttribute(n,"x",o.x),t.getGraph().setNodeAttribute(n,"y",o.y),a.preventSigmaDefault(),a.original.preventDefault(),a.original.stopPropagation()},mouseup:()=>{n&&(r(null),t.getGraph().removeNodeAttribute(n,"highlighted"))},mousedown:a=>{a.original.buttons!==0&&!t.getCustomBBox()&&t.setCustomBBox(t.getBBox())}})},[e,t,n]),null},Doe=()=>{const[e,t]=w.useState(BO),n=w.useRef(null),r=ze.use.selectedNode(),a=ze.use.focusedNode(),o=ze.use.moveToSelectedNode(),s=ze.use.isFetching(),l=Ie.use.showPropertyPanel(),c=Ie.use.showNodeSearchBar(),d=Ie.use.enableNodeDrag(),p=Ie.use.showLegend();w.useEffect(()=>{t(BO),console.log("Initialized sigma settings")},[]),w.useEffect(()=>()=>{const v=ze.getState().sigmaInstance;if(v)try{v.kill(),ze.getState().setSigmaInstance(null),console.log("Cleared sigma instance on Graphviewer unmount")}catch(k){console.error("Error cleaning up sigma instance:",k)}},[]);const g=w.useCallback(v=>{v===null?ze.getState().setFocusedNode(null):v.type==="nodes"&&ze.getState().setFocusedNode(v.id)},[]),m=w.useCallback(v=>{v===null?ze.getState().setSelectedNode(null):v.type==="nodes"&&ze.getState().setSelectedNode(v.id,!0)},[]),b=w.useMemo(()=>a??r,[a,r]),y=w.useMemo(()=>r?{type:"nodes",id:r}:null,[r]);return E.jsxs("div",{className:"relative h-full w-full overflow-hidden",children:[E.jsxs(Hte,{settings:e,className:"!bg-background !size-full overflow-hidden",ref:n,children:[E.jsx(aae,{}),d&&E.jsx(Ioe,{}),E.jsx(jne,{node:b,move:o}),E.jsxs("div",{className:"absolute top-2 left-2 flex items-start gap-2",children:[E.jsx(Bae,{}),c&&E.jsx(Pae,{value:y,onFocus:g,onChange:m})]}),E.jsxs("div",{className:"bg-background/60 absolute bottom-2 left-2 flex flex-col rounded-xl border-2 backdrop-blur-lg",children:[E.jsx(rae,{}),E.jsx(oae,{}),E.jsx(iae,{}),E.jsx(Ooe,{}),E.jsx(hae,{})]}),l&&E.jsx("div",{className:"absolute top-2 right-2",children:E.jsx(coe,{})}),p&&E.jsx("div",{className:"absolute bottom-10 right-2",children:E.jsx(Noe,{className:"bg-background/60 backdrop-blur-lg"})}),E.jsx(hoe,{})]}),s&&E.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-background/80 z-10",children:E.jsxs("div",{className:"text-center",children:[E.jsx("div",{className:"mb-2 h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent"}),E.jsx("p",{children:"Loading Graph Data..."})]})})]})},J5=w.forwardRef(({className:e,...t},n)=>E.jsx("div",{className:"relative w-full overflow-auto",children:E.jsx("table",{ref:n,className:Me("w-full caption-bottom text-sm",e),...t})}));J5.displayName="Table";const eG=w.forwardRef(({className:e,...t},n)=>E.jsx("thead",{ref:n,className:Me("[&_tr]:border-b",e),...t}));eG.displayName="TableHeader";const tG=w.forwardRef(({className:e,...t},n)=>E.jsx("tbody",{ref:n,className:Me("[&_tr:last-child]:border-0",e),...t}));tG.displayName="TableBody";const Loe=w.forwardRef(({className:e,...t},n)=>E.jsx("tfoot",{ref:n,className:Me("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",e),...t}));Loe.displayName="TableFooter";const sk=w.forwardRef(({className:e,...t},n)=>E.jsx("tr",{ref:n,className:Me("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),...t}));sk.displayName="TableRow";const wo=w.forwardRef(({className:e,...t},n)=>E.jsx("th",{ref:n,className:Me("text-muted-foreground h-10 px-2 text-left align-middle font-medium [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));wo.displayName="TableHead";const xo=w.forwardRef(({className:e,...t},n)=>E.jsx("td",{ref:n,className:Me("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));xo.displayName="TableCell";const Moe=w.forwardRef(({className:e,...t},n)=>E.jsx("caption",{ref:n,className:Me("text-muted-foreground mt-4 text-sm",e),...t}));Moe.displayName="TableCaption";function Poe({title:e,description:t,icon:n=fZ,action:r,className:a,...o}){return E.jsxs(Ei,{className:Me("flex w-full flex-col items-center justify-center space-y-6 bg-transparent p-16",a),...o,children:[E.jsx("div",{className:"mr-4 shrink-0 rounded-full border border-dashed p-4",children:E.jsx(n,{className:"text-muted-foreground size-8","aria-hidden":"true"})}),E.jsxs("div",{className:"flex flex-col items-center gap-1.5 text-center",children:[E.jsx(_u,{children:e}),t?E.jsx(Cp,{children:t}):null]}),r||null]})}var ub={exports:{}},cb,jO;function Foe(){if(jO)return cb;jO=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return cb=e,cb}var db,UO;function zoe(){if(UO)return db;UO=1;var e=Foe();function t(){}function n(){}return n.resetWarningCache=t,db=function(){function r(s,l,c,d,p,g){if(g!==e){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}}r.isRequired=r;function a(){return r}var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:a,element:r,elementType:r,instanceOf:a,node:r,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o},db}var GO;function Boe(){return GO||(GO=1,ub.exports=zoe()()),ub.exports}var joe=Boe();const It=cn(joe),Uoe=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function Bs(e,t,n){const r=Goe(e),{webkitRelativePath:a}=e,o=typeof t=="string"?t:typeof a=="string"&&a.length>0?a:`./${e.name}`;return typeof r.path!="string"&&HO(r,"path",o),HO(r,"relativePath",o),r}function Goe(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),a=Uoe.get(r);a&&Object.defineProperty(e,"type",{value:a,writable:!1,configurable:!1,enumerable:!0})}return e}function HO(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const Hoe=[".DS_Store","Thumbs.db"];function $oe(e){return Ti(this,void 0,void 0,function*(){return Df(e)&&qoe(e.dataTransfer)?Koe(e.dataTransfer,e.type):Voe(e)?Woe(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?Yoe(e):[]})}function qoe(e){return Df(e)}function Voe(e){return Df(e)&&Df(e.target)}function Df(e){return typeof e=="object"&&e!==null}function Woe(e){return lk(e.target.files).map(t=>Bs(t))}function Yoe(e){return Ti(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>Bs(n))})}function Koe(e,t){return Ti(this,void 0,void 0,function*(){if(e.items){const n=lk(e.items).filter(a=>a.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(Xoe));return $O(nG(r))}return $O(lk(e.files).map(n=>Bs(n)))})}function $O(e){return e.filter(t=>Hoe.indexOf(t.name)===-1)}function lk(e){if(e===null)return[];const t=[];for(let n=0;n[...t,...Array.isArray(n)?nG(n):[n]],[])}function qO(e,t){return Ti(this,void 0,void 0,function*(){var n;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const o=yield e.getAsFileSystemHandle();if(o===null)throw new Error(`${e} is not a File`);if(o!==void 0){const s=yield o.getFile();return s.handle=o,Bs(s)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return Bs(r,(n=t==null?void 0:t.fullPath)!==null&&n!==void 0?n:void 0)})}function Zoe(e){return Ti(this,void 0,void 0,function*(){return e.isDirectory?rG(e):Qoe(e)})}function rG(e){const t=e.createReader();return new Promise((n,r)=>{const a=[];function o(){t.readEntries(s=>Ti(this,void 0,void 0,function*(){if(s.length){const l=Promise.all(s.map(Zoe));a.push(l),o()}else try{const l=yield Promise.all(a);n(l)}catch(l){r(l)}}),s=>{r(s)})}o()})}function Qoe(e){return Ti(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const a=Bs(r,e.fullPath);t(a)},r=>{n(r)})})})}var Fd={},VO;function Joe(){return VO||(VO=1,Fd.__esModule=!0,Fd.default=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var r=e.name||"",a=(e.type||"").toLowerCase(),o=a.replace(/\/.*$/,"");return n.some(function(s){var l=s.trim().toLowerCase();return l.charAt(0)==="."?r.toLowerCase().endsWith(l):l.endsWith("/*")?o===l.replace(/\/.*$/,""):a===l})}return!0}),Fd}var eie=Joe();const fb=cn(eie);function WO(e){return rie(e)||nie(e)||oG(e)||tie()}function tie(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nie(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function rie(e){if(Array.isArray(e))return uk(e)}function YO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function KO(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:"",n=t.split(","),r=n.length>1?"one of ".concat(n.join(", ")):n[0];return{code:lie,message:"File type must be ".concat(r)}},XO=function(t){return{code:uie,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},ZO=function(t){return{code:cie,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},pie={code:die,message:"Too many files"};function iG(e,t){var n=e.type==="application/x-moz-file"||sie(e,t);return[n,n?null:fie(t)]}function sG(e,t,n){if(ci(e.size))if(ci(t)&&ci(n)){if(e.size>n)return[!1,XO(n)];if(e.sizen)return[!1,XO(n)]}return[!0,null]}function ci(e){return e!=null}function gie(e){var t=e.files,n=e.accept,r=e.minSize,a=e.maxSize,o=e.multiple,s=e.maxFiles,l=e.validator;return!o&&t.length>1||o&&s>=1&&t.length>s?!1:t.every(function(c){var d=iG(c,n),p=Ou(d,1),g=p[0],m=sG(c,r,a),b=Ou(m,1),y=b[0],v=l?l(c):null;return g&&y&&!v})}function Lf(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function zd(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function QO(e){e.preventDefault()}function hie(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function mie(e){return e.indexOf("Edge/")!==-1}function bie(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return hie(e)||mie(e)}function ea(){for(var e=arguments.length,t=new Array(e),n=0;n1?a-1:0),s=1;s