diff --git a/lightrag/api/webui/assets/index-BMB0OroL.js b/lightrag/api/webui/assets/index-BMB0OroL.js deleted file mode 100644 index 75b01c44..00000000 --- a/lightrag/api/webui/assets/index-BMB0OroL.js +++ /dev/null @@ -1,1065 +0,0 @@ -var gD=Object.defineProperty;var vD=(e,t,n)=>t in e?gD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Xr=(e,t,n)=>vD(e,typeof t!="symbol"?t+"":t,n);function yD(e,t){for(var n=0;na[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))a(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const c of s.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&a(c)}).observe(document,{childList:!0,subtree:!0});function n(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function a(o){if(o.ep)return;o.ep=!0;const s=n(o);fetch(o.href,s)}})();function dn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function bD(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function a(){return this instanceof a?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(a){var o=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(n,a,o.get?o:{enumerable:!0,get:function(){return e[a]}})}),n}var Mh={exports:{}},qs={};/** - * @license React - * react-jsx-runtime.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Vx;function xD(){if(Vx)return qs;Vx=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(a,o,s){var c=null;if(s!==void 0&&(c=""+s),o.key!==void 0&&(c=""+o.key),"key"in o){s={};for(var u in o)u!=="key"&&(s[u]=o[u])}else s=o;return o=s.ref,{$$typeof:e,type:a,key:c,ref:o!==void 0?o:null,props:s}}return qs.Fragment=t,qs.jsx=n,qs.jsxs=n,qs}var qx;function wD(){return qx||(qx=1,Mh.exports=xD()),Mh.exports}var x=wD(),Ph={exports:{}},Ke={};/** - * @license React - * react.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Yx;function ED(){if(Yx)return Ke;Yx=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.iterator;function y(G){return G===null||typeof G!="object"?null:(G=g&&G[g]||G["@@iterator"],typeof G=="function"?G:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,E={};function _(G,H,O){this.props=G,this.context=H,this.refs=E,this.updater=O||b}_.prototype.isReactComponent={},_.prototype.setState=function(G,H){if(typeof G!="object"&&typeof G!="function"&&G!=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,G,H,"setState")},_.prototype.forceUpdate=function(G){this.updater.enqueueForceUpdate(this,G,"forceUpdate")};function N(){}N.prototype=_.prototype;function C(G,H,O){this.props=G,this.context=H,this.refs=E,this.updater=O||b}var A=C.prototype=new N;A.constructor=C,S(A,_.prototype),A.isPureReactComponent=!0;var k=Array.isArray,D={H:null,A:null,T:null,S:null},M=Object.prototype.hasOwnProperty;function R(G,H,O,$,W,re){return O=re.ref,{$$typeof:e,type:G,key:H,ref:O!==void 0?O:null,props:re}}function U(G,H){return R(G.type,H,void 0,void 0,void 0,G.props)}function L(G){return typeof G=="object"&&G!==null&&G.$$typeof===e}function I(G){var H={"=":"=0",":":"=2"};return"$"+G.replace(/[=:]/g,function(O){return H[O]})}var q=/\/+/g;function Y(G,H){return typeof G=="object"&&G!==null&&G.key!=null?I(""+G.key):H.toString(36)}function B(){}function X(G){switch(G.status){case"fulfilled":return G.value;case"rejected":throw G.reason;default:switch(typeof G.status=="string"?G.then(B,B):(G.status="pending",G.then(function(H){G.status==="pending"&&(G.status="fulfilled",G.value=H)},function(H){G.status==="pending"&&(G.status="rejected",G.reason=H)})),G.status){case"fulfilled":return G.value;case"rejected":throw G.reason}}throw G}function ne(G,H,O,$,W){var re=typeof G;(re==="undefined"||re==="boolean")&&(G=null);var de=!1;if(G===null)de=!0;else switch(re){case"bigint":case"string":case"number":de=!0;break;case"object":switch(G.$$typeof){case e:case t:de=!0;break;case m:return de=G._init,ne(de(G._payload),H,O,$,W)}}if(de)return W=W(G),de=$===""?"."+Y(G,0):$,k(W)?(O="",de!=null&&(O=de.replace(q,"$&/")+"/"),ne(W,H,O,"",function(Ce){return Ce})):W!=null&&(L(W)&&(W=U(W,O+(W.key==null||G&&G.key===W.key?"":(""+W.key).replace(q,"$&/")+"/")+de)),H.push(W)),1;de=0;var ie=$===""?".":$+":";if(k(G))for(var oe=0;oe>>1,G=F[K];if(0>>1;Ko($,j))Wo(re,$)?(F[K]=re,F[W]=j,K=W):(F[K]=$,F[O]=j,K=O);else if(Wo(re,j))F[K]=re,F[W]=j,K=W;else break e}}return z}function o(F,z){var j=F.sortIndex-z.sortIndex;return j!==0?j:F.id-z.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var c=Date,u=c.now();e.unstable_now=function(){return c.now()-u}}var f=[],h=[],m=1,g=null,y=3,b=!1,S=!1,E=!1,_=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;function A(F){for(var z=n(h);z!==null;){if(z.callback===null)a(h);else if(z.startTime<=F)a(h),z.sortIndex=z.expirationTime,t(f,z);else break;z=n(h)}}function k(F){if(E=!1,A(F),!S)if(n(f)!==null)S=!0,X();else{var z=n(h);z!==null&&ne(k,z.startTime-F)}}var D=!1,M=-1,R=5,U=-1;function L(){return!(e.unstable_now()-UF&&L());){var K=g.callback;if(typeof K=="function"){g.callback=null,y=g.priorityLevel;var G=K(g.expirationTime<=F);if(F=e.unstable_now(),typeof G=="function"){g.callback=G,A(F),z=!0;break t}g===n(f)&&a(f),A(F)}else a(f);g=n(f)}if(g!==null)z=!0;else{var H=n(h);H!==null&&ne(k,H.startTime-F),z=!1}}break e}finally{g=null,y=j,b=!1}z=void 0}}finally{z?q():D=!1}}}var q;if(typeof C=="function")q=function(){C(I)};else if(typeof MessageChannel<"u"){var Y=new MessageChannel,B=Y.port2;Y.port1.onmessage=I,q=function(){B.postMessage(null)}}else q=function(){_(I,0)};function X(){D||(D=!0,q())}function ne(F,z){M=_(function(){F(e.unstable_now())},z)}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(F){F.callback=null},e.unstable_continueExecution=function(){S||b||(S=!0,X())},e.unstable_forceFrameRate=function(F){0>F||125K?(F.sortIndex=j,t(h,F),n(f)===null&&F===n(h)&&(E?(N(M),M=-1):E=!0,ne(k,j-K))):(F.sortIndex=G,t(f,F),S||b||(S=!0,X())),F},e.unstable_shouldYield=L,e.unstable_wrapCallback=function(F){var z=y;return function(){var j=y;y=z;try{return F.apply(this,arguments)}finally{y=j}}}}(Uh)),Uh}var Kx;function CD(){return Kx||(Kx=1,Fh.exports=_D()),Fh.exports}var Bh={exports:{}},nn={};/** - * @license React - * react-dom.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Zx;function TD(){if(Zx)return nn;Zx=1;var e=Yu();function t(f){var h="https://react.dev/errors/"+f;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Bh.exports=TD(),Bh.exports}/** - * @license React - * react-dom-client.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Jx;function RD(){if(Jx)return Ys;Jx=1;var e=CD(),t=Yu(),n=Y1();function a(r){var i="https://react.dev/errors/"+r;if(1)":-1p||V[d]!==Q[p]){var fe=` -`+V[d].replace(" at new "," at ");return r.displayName&&fe.includes("")&&(fe=fe.replace("",r.displayName)),fe}while(1<=d&&0<=p);break}}}finally{X=!1,Error.prepareStackTrace=l}return(l=r?r.displayName||r.name:"")?B(l):""}function F(r){switch(r.tag){case 26:case 27:case 5:return B(r.type);case 16:return B("Lazy");case 13:return B("Suspense");case 19:return B("SuspenseList");case 0:case 15:return r=ne(r.type,!1),r;case 11:return r=ne(r.type.render,!1),r;case 1:return r=ne(r.type,!0),r;default:return""}}function z(r){try{var i="";do i+=F(r),r=r.return;while(r);return i}catch(l){return` -Error generating stack: `+l.message+` -`+l.stack}}function j(r){var i=r,l=r;if(r.alternate)for(;i.return;)i=i.return;else{r=i;do i=r,i.flags&4098&&(l=i.return),r=i.return;while(r)}return i.tag===3?l:null}function K(r){if(r.tag===13){var i=r.memoizedState;if(i===null&&(r=r.alternate,r!==null&&(i=r.memoizedState)),i!==null)return i.dehydrated}return null}function G(r){if(j(r)!==r)throw Error(a(188))}function H(r){var i=r.alternate;if(!i){if(i=j(r),i===null)throw Error(a(188));return i!==r?null:r}for(var l=r,d=i;;){var p=l.return;if(p===null)break;var v=p.alternate;if(v===null){if(d=p.return,d!==null){l=d;continue}break}if(p.child===v.child){for(v=p.child;v;){if(v===l)return G(p),r;if(v===d)return G(p),i;v=v.sibling}throw Error(a(188))}if(l.return!==d.return)l=p,d=v;else{for(var T=!1,P=p.child;P;){if(P===l){T=!0,l=p,d=v;break}if(P===d){T=!0,d=p,l=v;break}P=P.sibling}if(!T){for(P=v.child;P;){if(P===l){T=!0,l=v,d=p;break}if(P===d){T=!0,d=v,l=p;break}P=P.sibling}if(!T)throw Error(a(189))}}if(l.alternate!==d)throw Error(a(190))}if(l.tag!==3)throw Error(a(188));return l.stateNode.current===l?r:i}function O(r){var i=r.tag;if(i===5||i===26||i===27||i===6)return r;for(r=r.child;r!==null;){if(i=O(r),i!==null)return i;r=r.sibling}return null}var $=Array.isArray,W=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,re={pending:!1,data:null,method:null,action:null},de=[],ie=-1;function oe(r){return{current:r}}function Ce(r){0>ie||(r.current=de[ie],de[ie]=null,ie--)}function he(r,i){ie++,de[ie]=r.current,r.current=i}var Se=oe(null),be=oe(null),Le=oe(null),Te=oe(null);function ye(r,i){switch(he(Le,i),he(be,r),he(Se,null),r=i.nodeType,r){case 9:case 11:i=(i=i.documentElement)&&(i=i.namespaceURI)?xx(i):0;break;default:if(r=r===8?i.parentNode:i,i=r.tagName,r=r.namespaceURI)r=xx(r),i=wx(r,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}Ce(Se),he(Se,i)}function J(){Ce(Se),Ce(be),Ce(Le)}function le(r){r.memoizedState!==null&&he(Te,r);var i=Se.current,l=wx(i,r.type);i!==l&&(he(be,r),he(Se,l))}function _e(r){be.current===r&&(Ce(Se),Ce(be)),Te.current===r&&(Ce(Te),Bs._currentValue=re)}var pe=Object.prototype.hasOwnProperty,Ee=e.unstable_scheduleCallback,te=e.unstable_cancelCallback,Fe=e.unstable_shouldYield,Pe=e.unstable_requestPaint,me=e.unstable_now,Ae=e.unstable_getCurrentPriorityLevel,je=e.unstable_ImmediatePriority,He=e.unstable_UserBlockingPriority,it=e.unstable_NormalPriority,Ct=e.unstable_LowPriority,bt=e.unstable_IdlePriority,qt=e.log,fn=e.unstable_setDisableYieldValue,Gt=null,at=null;function Tn(r){if(at&&typeof at.onCommitFiberRoot=="function")try{at.onCommitFiberRoot(Gt,r,void 0,(r.current.flags&128)===128)}catch{}}function xt(r){if(typeof qt=="function"&&fn(r),at&&typeof at.setStrictMode=="function")try{at.setStrictMode(Gt,r)}catch{}}var Lt=Math.clz32?Math.clz32:Ol,Wa=Math.log,ji=Math.LN2;function Ol(r){return r>>>=0,r===0?32:31-(Wa(r)/ji|0)|0}var Li=128,ca=4194304;function Jt(r){var i=r&42;if(i!==0)return i;switch(r&-r){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 r&4194176;case 4194304:case 8388608:case 16777216:case 33554432:return r&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return r}}function zi(r,i){var l=r.pendingLanes;if(l===0)return 0;var d=0,p=r.suspendedLanes,v=r.pingedLanes,T=r.warmLanes;r=r.finishedLanes!==0;var P=l&134217727;return P!==0?(l=P&~p,l!==0?d=Jt(l):(v&=P,v!==0?d=Jt(v):r||(T=P&~T,T!==0&&(d=Jt(T))))):(P=l&~p,P!==0?d=Jt(P):v!==0?d=Jt(v):r||(T=l&~T,T!==0&&(d=Jt(T)))),d===0?0:i!==0&&i!==d&&!(i&p)&&(p=d&-d,T=i&-i,p>=T||p===32&&(T&4194176)!==0)?i:d}function qe(r,i){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&i)===0}function lt(r,i){switch(r){case 1:case 2:case 4:case 8:return i+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 i+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 pt(){var r=Li;return Li<<=1,!(Li&4194176)&&(Li=128),r}function hn(){var r=ca;return ca<<=1,!(ca&62914560)&&(ca=4194304),r}function ln(r){for(var i=[],l=0;31>l;l++)i.push(r);return i}function pn(r,i){r.pendingLanes|=i,i!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function Nr(r,i,l,d,p,v){var T=r.pendingLanes;r.pendingLanes=l,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=l,r.entangledLanes&=l,r.errorRecoveryDisabledLanes&=l,r.shellSuspendCounter=0;var P=r.entanglements,V=r.expirationTimes,Q=r.hiddenUpdates;for(l=T&~l;0"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),cA=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]*$"),wv={},Ev={};function uA(r){return pe.call(Ev,r)?!0:pe.call(wv,r)?!1:cA.test(r)?Ev[r]=!0:(wv[r]=!0,!1)}function jl(r,i,l){if(uA(i))if(l===null)r.removeAttribute(i);else{switch(typeof l){case"undefined":case"function":case"symbol":r.removeAttribute(i);return;case"boolean":var d=i.toLowerCase().slice(0,5);if(d!=="data-"&&d!=="aria-"){r.removeAttribute(i);return}}r.setAttribute(i,""+l)}}function Ll(r,i,l){if(l===null)r.removeAttribute(i);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(i);return}r.setAttribute(i,""+l)}}function jr(r,i,l,d){if(d===null)r.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(l);return}r.setAttributeNS(i,l,""+d)}}function Mn(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function Sv(r){var i=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function dA(r){var i=Sv(r)?"checked":"value",l=Object.getOwnPropertyDescriptor(r.constructor.prototype,i),d=""+r[i];if(!r.hasOwnProperty(i)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var p=l.get,v=l.set;return Object.defineProperty(r,i,{configurable:!0,get:function(){return p.call(this)},set:function(T){d=""+T,v.call(this,T)}}),Object.defineProperty(r,i,{enumerable:l.enumerable}),{getValue:function(){return d},setValue:function(T){d=""+T},stopTracking:function(){r._valueTracker=null,delete r[i]}}}}function zl(r){r._valueTracker||(r._valueTracker=dA(r))}function _v(r){if(!r)return!1;var i=r._valueTracker;if(!i)return!0;var l=i.getValue(),d="";return r&&(d=Sv(r)?r.checked?"true":"false":r.value),r=d,r!==l?(i.setValue(r),!0):!1}function Ml(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}var fA=/[\n"\\]/g;function Pn(r){return r.replace(fA,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function jd(r,i,l,d,p,v,T,P){r.name="",T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?r.type=T:r.removeAttribute("type"),i!=null?T==="number"?(i===0&&r.value===""||r.value!=i)&&(r.value=""+Mn(i)):r.value!==""+Mn(i)&&(r.value=""+Mn(i)):T!=="submit"&&T!=="reset"||r.removeAttribute("value"),i!=null?Ld(r,T,Mn(i)):l!=null?Ld(r,T,Mn(l)):d!=null&&r.removeAttribute("value"),p==null&&v!=null&&(r.defaultChecked=!!v),p!=null&&(r.checked=p&&typeof p!="function"&&typeof p!="symbol"),P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"?r.name=""+Mn(P):r.removeAttribute("name")}function Cv(r,i,l,d,p,v,T,P){if(v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(r.type=v),i!=null||l!=null){if(!(v!=="submit"&&v!=="reset"||i!=null))return;l=l!=null?""+Mn(l):"",i=i!=null?""+Mn(i):l,P||i===r.value||(r.value=i),r.defaultValue=i}d=d??p,d=typeof d!="function"&&typeof d!="symbol"&&!!d,r.checked=P?r.checked:!!d,r.defaultChecked=!!d,T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"&&(r.name=T)}function Ld(r,i,l){i==="number"&&Ml(r.ownerDocument)===r||r.defaultValue===""+l||(r.defaultValue=""+l)}function Ui(r,i,l,d){if(r=r.options,i){i={};for(var p=0;p=is),Gv=" ",Fv=!1;function Uv(r,i){switch(r){case"keyup":return UA.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Bv(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var $i=!1;function IA(r,i){switch(r){case"compositionend":return Bv(i);case"keypress":return i.which!==32?null:(Fv=!0,Gv);case"textInput":return r=i.data,r===Gv&&Fv?null:r;default:return null}}function HA(r,i){if($i)return r==="compositionend"||!Vd&&Uv(r,i)?(r=Ov(),Gl=Ud=da=null,$i=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1=i)return{node:l,offset:i-r};r=d}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Xv(l)}}function Zv(r,i){return r&&i?r===i?!0:r&&r.nodeType===3?!1:i&&i.nodeType===3?Zv(r,i.parentNode):"contains"in r?r.contains(i):r.compareDocumentPosition?!!(r.compareDocumentPosition(i)&16):!1:!1}function Qv(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var i=Ml(r.document);i instanceof r.HTMLIFrameElement;){try{var l=typeof i.contentWindow.location.href=="string"}catch{l=!1}if(l)r=i.contentWindow;else break;i=Ml(r.document)}return i}function Wd(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i&&(i==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||i==="textarea"||r.contentEditable==="true")}function ZA(r,i){var l=Qv(i);i=r.focusedElem;var d=r.selectionRange;if(l!==i&&i&&i.ownerDocument&&Zv(i.ownerDocument.documentElement,i)){if(d!==null&&Wd(i)){if(r=d.start,l=d.end,l===void 0&&(l=r),"selectionStart"in i)i.selectionStart=r,i.selectionEnd=Math.min(l,i.value.length);else if(l=(r=i.ownerDocument||document)&&r.defaultView||window,l.getSelection){l=l.getSelection();var p=i.textContent.length,v=Math.min(d.start,p);d=d.end===void 0?v:Math.min(d.end,p),!l.extend&&v>d&&(p=d,d=v,v=p),p=Kv(i,v);var T=Kv(i,d);p&&T&&(l.rangeCount!==1||l.anchorNode!==p.node||l.anchorOffset!==p.offset||l.focusNode!==T.node||l.focusOffset!==T.offset)&&(r=r.createRange(),r.setStart(p.node,p.offset),l.removeAllRanges(),v>d?(l.addRange(r),l.extend(T.node,T.offset)):(r.setEnd(T.node,T.offset),l.addRange(r)))}}for(r=[],l=i;l=l.parentNode;)l.nodeType===1&&r.push({element:l,left:l.scrollLeft,top:l.scrollTop});for(typeof i.focus=="function"&&i.focus(),i=0;i=document.documentMode,Vi=null,Xd=null,cs=null,Kd=!1;function Jv(r,i,l){var d=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Kd||Vi==null||Vi!==Ml(d)||(d=Vi,"selectionStart"in d&&Wd(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),cs&&ls(cs,d)||(cs=d,d=Cc(Xd,"onSelect"),0>=T,p-=T,Lr=1<<32-Lt(i)+p|l<Ve?(It=Ue,Ue=null):It=Ue.sibling;var st=se(ee,Ue,ae[Ve],ge);if(st===null){Ue===null&&(Ue=It);break}r&&Ue&&st.alternate===null&&i(ee,Ue),Z=v(st,Z,Ve),Qe===null?Me=st:Qe.sibling=st,Qe=st,Ue=It}if(Ve===ae.length)return l(ee,Ue),ot&&ti(ee,Ve),Me;if(Ue===null){for(;VeVe?(It=Ue,Ue=null):It=Ue.sibling;var Na=se(ee,Ue,st.value,ge);if(Na===null){Ue===null&&(Ue=It);break}r&&Ue&&Na.alternate===null&&i(ee,Ue),Z=v(Na,Z,Ve),Qe===null?Me=Na:Qe.sibling=Na,Qe=Na,Ue=It}if(st.done)return l(ee,Ue),ot&&ti(ee,Ve),Me;if(Ue===null){for(;!st.done;Ve++,st=ae.next())st=xe(ee,st.value,ge),st!==null&&(Z=v(st,Z,Ve),Qe===null?Me=st:Qe.sibling=st,Qe=st);return ot&&ti(ee,Ve),Me}for(Ue=d(Ue);!st.done;Ve++,st=ae.next())st=ue(Ue,ee,Ve,st.value,ge),st!==null&&(r&&st.alternate!==null&&Ue.delete(st.key===null?Ve:st.key),Z=v(st,Z,Ve),Qe===null?Me=st:Qe.sibling=st,Qe=st);return r&&Ue.forEach(function(mD){return i(ee,mD)}),ot&&ti(ee,Ve),Me}function At(ee,Z,ae,ge){if(typeof ae=="object"&&ae!==null&&ae.type===f&&ae.key===null&&(ae=ae.props.children),typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case c:e:{for(var Me=ae.key;Z!==null;){if(Z.key===Me){if(Me=ae.type,Me===f){if(Z.tag===7){l(ee,Z.sibling),ge=p(Z,ae.props.children),ge.return=ee,ee=ge;break e}}else if(Z.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===C&&gy(Me)===Z.type){l(ee,Z.sibling),ge=p(Z,ae.props),gs(ge,ae),ge.return=ee,ee=ge;break e}l(ee,Z);break}else i(ee,Z);Z=Z.sibling}ae.type===f?(ge=fi(ae.props.children,ee.mode,ge,ae.key),ge.return=ee,ee=ge):(ge=mc(ae.type,ae.key,ae.props,null,ee.mode,ge),gs(ge,ae),ge.return=ee,ee=ge)}return T(ee);case u:e:{for(Me=ae.key;Z!==null;){if(Z.key===Me)if(Z.tag===4&&Z.stateNode.containerInfo===ae.containerInfo&&Z.stateNode.implementation===ae.implementation){l(ee,Z.sibling),ge=p(Z,ae.children||[]),ge.return=ee,ee=ge;break e}else{l(ee,Z);break}else i(ee,Z);Z=Z.sibling}ge=Jf(ae,ee.mode,ge),ge.return=ee,ee=ge}return T(ee);case C:return Me=ae._init,ae=Me(ae._payload),At(ee,Z,ae,ge)}if($(ae))return Ge(ee,Z,ae,ge);if(M(ae)){if(Me=M(ae),typeof Me!="function")throw Error(a(150));return ae=Me.call(ae),We(ee,Z,ae,ge)}if(typeof ae.then=="function")return At(ee,Z,Kl(ae),ge);if(ae.$$typeof===b)return At(ee,Z,fc(ee,ae),ge);Zl(ee,ae)}return typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint"?(ae=""+ae,Z!==null&&Z.tag===6?(l(ee,Z.sibling),ge=p(Z,ae),ge.return=ee,ee=ge):(l(ee,Z),ge=Qf(ae,ee.mode,ge),ge.return=ee,ee=ge),T(ee)):l(ee,Z)}return function(ee,Z,ae,ge){try{ms=0;var Me=At(ee,Z,ae,ge);return Zi=null,Me}catch(Ue){if(Ue===hs)throw Ue;var Qe=Vn(29,Ue,null,ee.mode);return Qe.lanes=ge,Qe.return=ee,Qe}finally{}}}var ri=vy(!0),yy=vy(!1),Qi=oe(null),Ql=oe(0);function by(r,i){r=qr,he(Ql,r),he(Qi,i),qr=r|i.baseLanes}function af(){he(Ql,qr),he(Qi,Qi.current)}function of(){qr=Ql.current,Ce(Qi),Ce(Ql)}var In=oe(null),mr=null;function ha(r){var i=r.alternate;he(zt,zt.current&1),he(In,r),mr===null&&(i===null||Qi.current!==null||i.memoizedState!==null)&&(mr=r)}function xy(r){if(r.tag===22){if(he(zt,zt.current),he(In,r),mr===null){var i=r.alternate;i!==null&&i.memoizedState!==null&&(mr=r)}}else pa()}function pa(){he(zt,zt.current),he(In,In.current)}function Mr(r){Ce(In),mr===r&&(mr=null),Ce(zt)}var zt=oe(0);function Jl(r){for(var i=r;i!==null;){if(i.tag===13){var l=i.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data==="$?"||l.data==="$!"))return i}else if(i.tag===19&&i.memoizedProps.revealOrder!==void 0){if(i.flags&128)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break;for(;i.sibling===null;){if(i.return===null||i.return===r)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var n2=typeof AbortController<"u"?AbortController:function(){var r=[],i=this.signal={aborted:!1,addEventListener:function(l,d){r.push(d)}};this.abort=function(){i.aborted=!0,r.forEach(function(l){return l()})}},r2=e.unstable_scheduleCallback,a2=e.unstable_NormalPriority,Mt={$$typeof:b,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function sf(){return{controller:new n2,data:new Map,refCount:0}}function vs(r){r.refCount--,r.refCount===0&&r2(a2,function(){r.controller.abort()})}var ys=null,lf=0,Ji=0,eo=null;function i2(r,i){if(ys===null){var l=ys=[];lf=0,Ji=ph(),eo={status:"pending",value:void 0,then:function(d){l.push(d)}}}return lf++,i.then(wy,wy),i}function wy(){if(--lf===0&&ys!==null){eo!==null&&(eo.status="fulfilled");var r=ys;ys=null,Ji=0,eo=null;for(var i=0;iv?v:8;var T=L.T,P={};L.T=P,Cf(r,!1,i,l);try{var V=p(),Q=L.S;if(Q!==null&&Q(P,V),V!==null&&typeof V=="object"&&typeof V.then=="function"){var fe=o2(V,d);ws(r,i,fe,Nn(r))}else ws(r,i,d,Nn(r))}catch(xe){ws(r,i,{then:function(){},status:"rejected",reason:xe},Nn())}finally{W.p=v,L.T=T}}function d2(){}function Sf(r,i,l,d){if(r.tag!==5)throw Error(a(476));var p=Qy(r).queue;Zy(r,p,i,re,l===null?d2:function(){return Jy(r),l(d)})}function Qy(r){var i=r.memoizedState;if(i!==null)return i;i={memoizedState:re,baseState:re,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pr,lastRenderedState:re},next:null};var l={};return i.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pr,lastRenderedState:l},next:null},r.memoizedState=i,r=r.alternate,r!==null&&(r.memoizedState=i),i}function Jy(r){var i=Qy(r).next.queue;ws(r,i,{},Nn())}function _f(){return tn(Bs)}function eb(){return Ot().memoizedState}function tb(){return Ot().memoizedState}function f2(r){for(var i=r.return;i!==null;){switch(i.tag){case 24:case 3:var l=Nn();r=ba(l);var d=xa(i,r,l);d!==null&&(un(d,i,l),_s(d,i,l)),i={cache:sf()},r.payload=i;return}i=i.return}}function h2(r,i,l){var d=Nn();l={lane:d,revertLane:0,action:l,hasEagerState:!1,eagerState:null,next:null},lc(r)?rb(i,l):(l=Jd(r,i,l,d),l!==null&&(un(l,r,d),ab(l,i,d)))}function nb(r,i,l){var d=Nn();ws(r,i,l,d)}function ws(r,i,l,d){var p={lane:d,revertLane:0,action:l,hasEagerState:!1,eagerState:null,next:null};if(lc(r))rb(i,p);else{var v=r.alternate;if(r.lanes===0&&(v===null||v.lanes===0)&&(v=i.lastRenderedReducer,v!==null))try{var T=i.lastRenderedState,P=v(T,l);if(p.hasEagerState=!0,p.eagerState=P,Rn(P,T))return Vl(r,i,p,0),vt===null&&$l(),!1}catch{}finally{}if(l=Jd(r,i,p,d),l!==null)return un(l,r,d),ab(l,i,d),!0}return!1}function Cf(r,i,l,d){if(d={lane:2,revertLane:ph(),action:d,hasEagerState:!1,eagerState:null,next:null},lc(r)){if(i)throw Error(a(479))}else i=Jd(r,l,d,2),i!==null&&un(i,r,2)}function lc(r){var i=r.alternate;return r===Ze||i!==null&&i===Ze}function rb(r,i){to=tc=!0;var l=r.pending;l===null?i.next=i:(i.next=l.next,l.next=i),r.pending=i}function ab(r,i,l){if(l&4194176){var d=i.lanes;d&=r.pendingLanes,l|=d,i.lanes=l,Jn(r,l)}}var gr={readContext:tn,use:ac,useCallback:Dt,useContext:Dt,useEffect:Dt,useImperativeHandle:Dt,useLayoutEffect:Dt,useInsertionEffect:Dt,useMemo:Dt,useReducer:Dt,useRef:Dt,useState:Dt,useDebugValue:Dt,useDeferredValue:Dt,useTransition:Dt,useSyncExternalStore:Dt,useId:Dt};gr.useCacheRefresh=Dt,gr.useMemoCache=Dt,gr.useHostTransitionStatus=Dt,gr.useFormState=Dt,gr.useActionState=Dt,gr.useOptimistic=Dt;var oi={readContext:tn,use:ac,useCallback:function(r,i){return yn().memoizedState=[r,i===void 0?null:i],r},useContext:tn,useEffect:Hy,useImperativeHandle:function(r,i,l){l=l!=null?l.concat([r]):null,oc(4194308,4,qy.bind(null,i,r),l)},useLayoutEffect:function(r,i){return oc(4194308,4,r,i)},useInsertionEffect:function(r,i){oc(4,2,r,i)},useMemo:function(r,i){var l=yn();i=i===void 0?null:i;var d=r();if(ii){xt(!0);try{r()}finally{xt(!1)}}return l.memoizedState=[d,i],d},useReducer:function(r,i,l){var d=yn();if(l!==void 0){var p=l(i);if(ii){xt(!0);try{l(i)}finally{xt(!1)}}}else p=i;return d.memoizedState=d.baseState=p,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:p},d.queue=r,r=r.dispatch=h2.bind(null,Ze,r),[d.memoizedState,r]},useRef:function(r){var i=yn();return r={current:r},i.memoizedState=r},useState:function(r){r=yf(r);var i=r.queue,l=nb.bind(null,Ze,i);return i.dispatch=l,[r.memoizedState,l]},useDebugValue:wf,useDeferredValue:function(r,i){var l=yn();return Ef(l,r,i)},useTransition:function(){var r=yf(!1);return r=Zy.bind(null,Ze,r.queue,!0,!1),yn().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,i,l){var d=Ze,p=yn();if(ot){if(l===void 0)throw Error(a(407));l=l()}else{if(l=i(),vt===null)throw Error(a(349));rt&60||Ry(d,i,l)}p.memoizedState=l;var v={value:l,getSnapshot:i};return p.queue=v,Hy(Dy.bind(null,d,v,r),[r]),d.flags|=2048,ro(9,Ay.bind(null,d,v,l,i),{destroy:void 0},null),l},useId:function(){var r=yn(),i=vt.identifierPrefix;if(ot){var l=zr,d=Lr;l=(d&~(1<<32-Lt(d)-1)).toString(32)+l,i=":"+i+"R"+l,l=nc++,0 title"))),Xt(v,d,l),v[en]=r,Ft(v),d=v;break e;case"link":var T=Nx("link","href",p).get(d+(l.href||""));if(T){for(var P=0;P<\/script>",r=r.removeChild(r.firstChild);break;case"select":r=typeof d.is=="string"?p.createElement("select",{is:d.is}):p.createElement("select"),d.multiple?r.multiple=!0:d.size&&(r.size=d.size);break;default:r=typeof d.is=="string"?p.createElement(l,{is:d.is}):p.createElement(l)}}r[en]=i,r[gn]=d;e:for(p=i.child;p!==null;){if(p.tag===5||p.tag===6)r.appendChild(p.stateNode);else if(p.tag!==4&&p.tag!==27&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===i)break e;for(;p.sibling===null;){if(p.return===null||p.return===i)break e;p=p.return}p.sibling.return=p.return,p=p.sibling}i.stateNode=r;e:switch(Xt(r,l,d),l){case"button":case"input":case"select":case"textarea":r=!!d.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&$r(i)}}return Et(i),i.flags&=-16777217,null;case 6:if(r&&i.stateNode!=null)r.memoizedProps!==d&&$r(i);else{if(typeof d!="string"&&i.stateNode===null)throw Error(a(166));if(r=Le.current,us(i)){if(r=i.stateNode,l=i.memoizedProps,d=null,p=cn,p!==null)switch(p.tag){case 27:case 5:d=p.memoizedProps}r[en]=i,r=!!(r.nodeValue===l||d!==null&&d.suppressHydrationWarning===!0||bx(r.nodeValue,l)),r||ni(i)}else r=Rc(r).createTextNode(d),r[en]=i,i.stateNode=r}return Et(i),null;case 13:if(d=i.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(p=us(i),d!==null&&d.dehydrated!==null){if(r===null){if(!p)throw Error(a(318));if(p=i.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(a(317));p[en]=i}else ds(),!(i.flags&128)&&(i.memoizedState=null),i.flags|=4;Et(i),p=!1}else tr!==null&&(sh(tr),tr=null),p=!0;if(!p)return i.flags&256?(Mr(i),i):(Mr(i),null)}if(Mr(i),i.flags&128)return i.lanes=l,i;if(l=d!==null,r=r!==null&&r.memoizedState!==null,l){d=i.child,p=null,d.alternate!==null&&d.alternate.memoizedState!==null&&d.alternate.memoizedState.cachePool!==null&&(p=d.alternate.memoizedState.cachePool.pool);var v=null;d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(v=d.memoizedState.cachePool.pool),v!==p&&(d.flags|=2048)}return l!==r&&l&&(i.child.flags|=8192),gc(i,i.updateQueue),Et(i),null;case 4:return J(),r===null&&yh(i.stateNode.containerInfo),Et(i),null;case 10:return Ur(i.type),Et(i),null;case 19:if(Ce(zt),p=i.memoizedState,p===null)return Et(i),null;if(d=(i.flags&128)!==0,v=p.rendering,v===null)if(d)Ns(p,!1);else{if(Rt!==0||r!==null&&r.flags&128)for(r=i.child;r!==null;){if(v=Jl(r),v!==null){for(i.flags|=128,Ns(p,!1),r=v.updateQueue,i.updateQueue=r,gc(i,r),i.subtreeFlags=0,r=l,l=i.child;l!==null;)Yb(l,r),l=l.sibling;return he(zt,zt.current&1|2),i.child}r=r.sibling}p.tail!==null&&me()>vc&&(i.flags|=128,d=!0,Ns(p,!1),i.lanes=4194304)}else{if(!d)if(r=Jl(v),r!==null){if(i.flags|=128,d=!0,r=r.updateQueue,i.updateQueue=r,gc(i,r),Ns(p,!0),p.tail===null&&p.tailMode==="hidden"&&!v.alternate&&!ot)return Et(i),null}else 2*me()-p.renderingStartTime>vc&&l!==536870912&&(i.flags|=128,d=!0,Ns(p,!1),i.lanes=4194304);p.isBackwards?(v.sibling=i.child,i.child=v):(r=p.last,r!==null?r.sibling=v:i.child=v,p.last=v)}return p.tail!==null?(i=p.tail,p.rendering=i,p.tail=i.sibling,p.renderingStartTime=me(),i.sibling=null,r=zt.current,he(zt,d?r&1|2:r&1),i):(Et(i),null);case 22:case 23:return Mr(i),of(),d=i.memoizedState!==null,r!==null?r.memoizedState!==null!==d&&(i.flags|=8192):d&&(i.flags|=8192),d?l&536870912&&!(i.flags&128)&&(Et(i),i.subtreeFlags&6&&(i.flags|=8192)):Et(i),l=i.updateQueue,l!==null&&gc(i,l.retryQueue),l=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(l=r.memoizedState.cachePool.pool),d=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(d=i.memoizedState.cachePool.pool),d!==l&&(i.flags|=2048),r!==null&&Ce(ai),null;case 24:return l=null,r!==null&&(l=r.memoizedState.cache),i.memoizedState.cache!==l&&(i.flags|=2048),Ur(Mt),Et(i),null;case 25:return null}throw Error(a(156,i.tag))}function x2(r,i){switch(tf(i),i.tag){case 1:return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 3:return Ur(Mt),J(),r=i.flags,r&65536&&!(r&128)?(i.flags=r&-65537|128,i):null;case 26:case 27:case 5:return _e(i),null;case 13:if(Mr(i),r=i.memoizedState,r!==null&&r.dehydrated!==null){if(i.alternate===null)throw Error(a(340));ds()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 19:return Ce(zt),null;case 4:return J(),null;case 10:return Ur(i.type),null;case 22:case 23:return Mr(i),of(),r!==null&&Ce(ai),r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 24:return Ur(Mt),null;case 25:return null;default:return null}}function Kb(r,i){switch(tf(i),i.tag){case 3:Ur(Mt),J();break;case 26:case 27:case 5:_e(i);break;case 4:J();break;case 13:Mr(i);break;case 19:Ce(zt);break;case 10:Ur(i.type);break;case 22:case 23:Mr(i),of(),r!==null&&Ce(ai);break;case 24:Ur(Mt)}}var w2={getCacheForType:function(r){var i=tn(Mt),l=i.data.get(r);return l===void 0&&(l=r(),i.data.set(r,l)),l}},E2=typeof WeakMap=="function"?WeakMap:Map,St=0,vt=null,Je=null,rt=0,yt=0,kn=null,Vr=!1,so=!1,eh=!1,qr=0,Rt=0,Ca=0,hi=0,th=0,qn=0,lo=0,Os=null,vr=null,nh=!1,rh=0,vc=1/0,yc=null,Ta=null,bc=!1,pi=null,js=0,ah=0,ih=null,Ls=0,oh=null;function Nn(){if(St&2&&rt!==0)return rt&-rt;if(L.T!==null){var r=Ji;return r!==0?r:ph()}return vv()}function Zb(){qn===0&&(qn=!(rt&536870912)||ot?pt():536870912);var r=In.current;return r!==null&&(r.flags|=32),qn}function un(r,i,l){(r===vt&&yt===2||r.cancelPendingCommit!==null)&&(co(r,0),Yr(r,rt,qn,!1)),pn(r,l),(!(St&2)||r!==vt)&&(r===vt&&(!(St&2)&&(hi|=l),Rt===4&&Yr(r,rt,qn,!1)),yr(r))}function Qb(r,i,l){if(St&6)throw Error(a(327));var d=!l&&(i&60)===0&&(i&r.expiredLanes)===0||qe(r,i),p=d?C2(r,i):uh(r,i,!0),v=d;do{if(p===0){so&&!d&&Yr(r,i,0,!1);break}else if(p===6)Yr(r,i,0,!Vr);else{if(l=r.current.alternate,v&&!S2(l)){p=uh(r,i,!1),v=!1;continue}if(p===2){if(v=i,r.errorRecoveryDisabledLanes&v)var T=0;else T=r.pendingLanes&-536870913,T=T!==0?T:T&536870912?536870912:0;if(T!==0){i=T;e:{var P=r;p=Os;var V=P.current.memoizedState.isDehydrated;if(V&&(co(P,T).flags|=256),T=uh(P,T,!1),T!==2){if(eh&&!V){P.errorRecoveryDisabledLanes|=v,hi|=v,p=4;break e}v=vr,vr=p,v!==null&&sh(v)}p=T}if(v=!1,p!==2)continue}}if(p===1){co(r,0),Yr(r,i,0,!0);break}e:{switch(d=r,p){case 0:case 1:throw Error(a(345));case 4:if((i&4194176)===i){Yr(d,i,qn,!Vr);break e}break;case 2:vr=null;break;case 3:case 5:break;default:throw Error(a(329))}if(d.finishedWork=l,d.finishedLanes=i,(i&62914560)===i&&(v=rh+300-me(),10l?32:l,L.T=null,pi===null)var v=!1;else{l=ih,ih=null;var T=pi,P=js;if(pi=null,js=0,St&6)throw Error(a(331));var V=St;if(St|=4,Vb(T.current),Ib(T,T.current,P,l),St=V,zs(0,!1),at&&typeof at.onPostCommitFiberRoot=="function")try{at.onPostCommitFiberRoot(Gt,T)}catch{}v=!0}return v}finally{W.p=p,L.T=d,sx(r,i)}}return!1}function lx(r,i,l){i=Fn(l,i),i=Af(r.stateNode,i,2),r=xa(r,i,2),r!==null&&(pn(r,2),yr(r))}function mt(r,i,l){if(r.tag===3)lx(r,r,l);else for(;i!==null;){if(i.tag===3){lx(i,r,l);break}else if(i.tag===1){var d=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(Ta===null||!Ta.has(d))){r=Fn(l,r),l=db(2),d=xa(i,l,2),d!==null&&(fb(l,d,i,r),pn(d,2),yr(d));break}}i=i.return}}function dh(r,i,l){var d=r.pingCache;if(d===null){d=r.pingCache=new E2;var p=new Set;d.set(i,p)}else p=d.get(i),p===void 0&&(p=new Set,d.set(i,p));p.has(l)||(eh=!0,p.add(l),r=A2.bind(null,r,i,l),i.then(r,r))}function A2(r,i,l){var d=r.pingCache;d!==null&&d.delete(i),r.pingedLanes|=r.suspendedLanes&l,r.warmLanes&=~l,vt===r&&(rt&l)===l&&(Rt===4||Rt===3&&(rt&62914560)===rt&&300>me()-rh?!(St&2)&&co(r,0):th|=l,lo===rt&&(lo=0)),yr(r)}function cx(r,i){i===0&&(i=hn()),r=fa(r,i),r!==null&&(pn(r,i),yr(r))}function D2(r){var i=r.memoizedState,l=0;i!==null&&(l=i.retryLane),cx(r,l)}function k2(r,i){var l=0;switch(r.tag){case 13:var d=r.stateNode,p=r.memoizedState;p!==null&&(l=p.retryLane);break;case 19:d=r.stateNode;break;case 22:d=r.stateNode._retryCache;break;default:throw Error(a(314))}d!==null&&d.delete(i),cx(r,l)}function N2(r,i){return Ee(r,i)}var Ec=null,ho=null,fh=!1,Sc=!1,hh=!1,mi=0;function yr(r){r!==ho&&r.next===null&&(ho===null?Ec=ho=r:ho=ho.next=r),Sc=!0,fh||(fh=!0,j2(O2))}function zs(r,i){if(!hh&&Sc){hh=!0;do for(var l=!1,d=Ec;d!==null;){if(r!==0){var p=d.pendingLanes;if(p===0)var v=0;else{var T=d.suspendedLanes,P=d.pingedLanes;v=(1<<31-Lt(42|r)+1)-1,v&=p&~(T&~P),v=v&201326677?v&201326677|1:v?v|2:0}v!==0&&(l=!0,fx(d,v))}else v=rt,v=zi(d,d===vt?v:0),!(v&3)||qe(d,v)||(l=!0,fx(d,v));d=d.next}while(l);hh=!1}}function O2(){Sc=fh=!1;var r=0;mi!==0&&(B2()&&(r=mi),mi=0);for(var i=me(),l=null,d=Ec;d!==null;){var p=d.next,v=ux(d,i);v===0?(d.next=null,l===null?Ec=p:l.next=p,p===null&&(ho=l)):(l=d,(r!==0||v&3)&&(Sc=!0)),d=p}zs(r)}function ux(r,i){for(var l=r.suspendedLanes,d=r.pingedLanes,p=r.expirationTimes,v=r.pendingLanes&-62914561;0"u"?null:document;function Rx(r,i,l){var d=mo;if(d&&typeof i=="string"&&i){var p=Pn(i);p='link[rel="'+r+'"][href="'+p+'"]',typeof l=="string"&&(p+='[crossorigin="'+l+'"]'),Tx.has(p)||(Tx.add(p),r={rel:r,crossOrigin:l,href:i},d.querySelector(p)===null&&(i=d.createElement("link"),Xt(i,"link",r),Ft(i),d.head.appendChild(i)))}}function X2(r){Wr.D(r),Rx("dns-prefetch",r,null)}function K2(r,i){Wr.C(r,i),Rx("preconnect",r,i)}function Z2(r,i,l){Wr.L(r,i,l);var d=mo;if(d&&r&&i){var p='link[rel="preload"][as="'+Pn(i)+'"]';i==="image"&&l&&l.imageSrcSet?(p+='[imagesrcset="'+Pn(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(p+='[imagesizes="'+Pn(l.imageSizes)+'"]')):p+='[href="'+Pn(r)+'"]';var v=p;switch(i){case"style":v=go(r);break;case"script":v=vo(r)}Yn.has(v)||(r=I({rel:"preload",href:i==="image"&&l&&l.imageSrcSet?void 0:r,as:i},l),Yn.set(v,r),d.querySelector(p)!==null||i==="style"&&d.querySelector(Gs(v))||i==="script"&&d.querySelector(Fs(v))||(i=d.createElement("link"),Xt(i,"link",r),Ft(i),d.head.appendChild(i)))}}function Q2(r,i){Wr.m(r,i);var l=mo;if(l&&r){var d=i&&typeof i.as=="string"?i.as:"script",p='link[rel="modulepreload"][as="'+Pn(d)+'"][href="'+Pn(r)+'"]',v=p;switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":v=vo(r)}if(!Yn.has(v)&&(r=I({rel:"modulepreload",href:r},i),Yn.set(v,r),l.querySelector(p)===null)){switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Fs(v)))return}d=l.createElement("link"),Xt(d,"link",r),Ft(d),l.head.appendChild(d)}}}function J2(r,i,l){Wr.S(r,i,l);var d=mo;if(d&&r){var p=Gi(d).hoistableStyles,v=go(r);i=i||"default";var T=p.get(v);if(!T){var P={loading:0,preload:null};if(T=d.querySelector(Gs(v)))P.loading=5;else{r=I({rel:"stylesheet",href:r,"data-precedence":i},l),(l=Yn.get(v))&&Rh(r,l);var V=T=d.createElement("link");Ft(V),Xt(V,"link",r),V._p=new Promise(function(Q,fe){V.onload=Q,V.onerror=fe}),V.addEventListener("load",function(){P.loading|=1}),V.addEventListener("error",function(){P.loading|=2}),P.loading|=4,Dc(T,i,d)}T={type:"stylesheet",instance:T,count:1,state:P},p.set(v,T)}}}function eD(r,i){Wr.X(r,i);var l=mo;if(l&&r){var d=Gi(l).hoistableScripts,p=vo(r),v=d.get(p);v||(v=l.querySelector(Fs(p)),v||(r=I({src:r,async:!0},i),(i=Yn.get(p))&&Ah(r,i),v=l.createElement("script"),Ft(v),Xt(v,"link",r),l.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},d.set(p,v))}}function tD(r,i){Wr.M(r,i);var l=mo;if(l&&r){var d=Gi(l).hoistableScripts,p=vo(r),v=d.get(p);v||(v=l.querySelector(Fs(p)),v||(r=I({src:r,async:!0,type:"module"},i),(i=Yn.get(p))&&Ah(r,i),v=l.createElement("script"),Ft(v),Xt(v,"link",r),l.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},d.set(p,v))}}function Ax(r,i,l,d){var p=(p=Le.current)?Ac(p):null;if(!p)throw Error(a(446));switch(r){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(i=go(l.href),l=Gi(p).hoistableStyles,d=l.get(i),d||(d={type:"style",instance:null,count:0,state:null},l.set(i,d)),d):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){r=go(l.href);var v=Gi(p).hoistableStyles,T=v.get(r);if(T||(p=p.ownerDocument||p,T={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},v.set(r,T),(v=p.querySelector(Gs(r)))&&!v._p&&(T.instance=v,T.state.loading=5),Yn.has(r)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Yn.set(r,l),v||nD(p,r,l,T.state))),i&&d===null)throw Error(a(528,""));return T}if(i&&d!==null)throw Error(a(529,""));return null;case"script":return i=l.async,l=l.src,typeof l=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=vo(l),l=Gi(p).hoistableScripts,d=l.get(i),d||(d={type:"script",instance:null,count:0,state:null},l.set(i,d)),d):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,r))}}function go(r){return'href="'+Pn(r)+'"'}function Gs(r){return'link[rel="stylesheet"]['+r+"]"}function Dx(r){return I({},r,{"data-precedence":r.precedence,precedence:null})}function nD(r,i,l,d){r.querySelector('link[rel="preload"][as="style"]['+i+"]")?d.loading=1:(i=r.createElement("link"),d.preload=i,i.addEventListener("load",function(){return d.loading|=1}),i.addEventListener("error",function(){return d.loading|=2}),Xt(i,"link",l),Ft(i),r.head.appendChild(i))}function vo(r){return'[src="'+Pn(r)+'"]'}function Fs(r){return"script[async]"+r}function kx(r,i,l){if(i.count++,i.instance===null)switch(i.type){case"style":var d=r.querySelector('style[data-href~="'+Pn(l.href)+'"]');if(d)return i.instance=d,Ft(d),d;var p=I({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return d=(r.ownerDocument||r).createElement("style"),Ft(d),Xt(d,"style",p),Dc(d,l.precedence,r),i.instance=d;case"stylesheet":p=go(l.href);var v=r.querySelector(Gs(p));if(v)return i.state.loading|=4,i.instance=v,Ft(v),v;d=Dx(l),(p=Yn.get(p))&&Rh(d,p),v=(r.ownerDocument||r).createElement("link"),Ft(v);var T=v;return T._p=new Promise(function(P,V){T.onload=P,T.onerror=V}),Xt(v,"link",d),i.state.loading|=4,Dc(v,l.precedence,r),i.instance=v;case"script":return v=vo(l.src),(p=r.querySelector(Fs(v)))?(i.instance=p,Ft(p),p):(d=l,(p=Yn.get(v))&&(d=I({},l),Ah(d,p)),r=r.ownerDocument||r,p=r.createElement("script"),Ft(p),Xt(p,"link",d),r.head.appendChild(p),i.instance=p);case"void":return null;default:throw Error(a(443,i.type))}else i.type==="stylesheet"&&!(i.state.loading&4)&&(d=i.instance,i.state.loading|=4,Dc(d,l.precedence,r));return i.instance}function Dc(r,i,l){for(var d=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=d.length?d[d.length-1]:null,v=p,T=0;T title"):null)}function rD(r,i,l){if(l===1||i.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;switch(i.rel){case"stylesheet":return r=i.disabled,typeof i.precedence=="string"&&r==null;default:return!0}case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function jx(r){return!(r.type==="stylesheet"&&!(r.state.loading&3))}var Us=null;function aD(){}function iD(r,i,l){if(Us===null)throw Error(a(475));var d=Us;if(i.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&!(i.state.loading&4)){if(i.instance===null){var p=go(l.href),v=r.querySelector(Gs(p));if(v){r=v._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(d.count++,d=Nc.bind(d),r.then(d,d)),i.state.loading|=4,i.instance=v,Ft(v);return}v=r.ownerDocument||r,l=Dx(l),(p=Yn.get(p))&&Rh(l,p),v=v.createElement("link"),Ft(v);var T=v;T._p=new Promise(function(P,V){T.onload=P,T.onerror=V}),Xt(v,"link",l),i.instance=v}d.stylesheets===null&&(d.stylesheets=new Map),d.stylesheets.set(i,r),(r=i.state.preload)&&!(i.state.loading&3)&&(d.count++,i=Nc.bind(d),r.addEventListener("load",i),r.addEventListener("error",i))}}function oD(){if(Us===null)throw Error(a(475));var r=Us;return r.stylesheets&&r.count===0&&Dh(r,r.stylesheets),0"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Gh.exports=RD(),Gh.exports}var DD=AD();const t0=e=>{let t;const n=new Set,a=(h,m)=>{const g=typeof h=="function"?h(t):h;if(!Object.is(g,t)){const y=t;t=m??(typeof g!="object"||g===null)?g:Object.assign({},t,g),n.forEach(b=>b(t,y))}},o=()=>t,u={setState:a,getState:o,getInitialState:()=>f,subscribe:h=>(n.add(h),()=>n.delete(h))},f=t=e(a,o,u);return u},kD=e=>e?t0(e):t0,ND=e=>e;function OD(e,t=ND){const n=ve.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return ve.useDebugValue(n),n}const jD=e=>{const t=kD(e),n=a=>OD(t,a);return Object.assign(n,t),n},Qm=e=>jD;function W1(e,t){let n;try{n=e()}catch{return}return{getItem:o=>{var s;const c=f=>f===null?null:JSON.parse(f,void 0),u=(s=n.getItem(o))!=null?s:null;return u instanceof Promise?u.then(c):c(u)},setItem:(o,s)=>n.setItem(o,JSON.stringify(s,void 0)),removeItem:o=>n.removeItem(o)}}const em=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(a){return em(a)(n)},catch(a){return this}}}catch(n){return{then(a){return this},catch(a){return em(a)(n)}}}},LD=(e,t)=>(n,a,o)=>{let s={storage:W1(()=>localStorage),partialize:E=>E,version:0,merge:(E,_)=>({..._,...E}),...t},c=!1;const u=new Set,f=new Set;let h=s.storage;if(!h)return e((...E)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),n(...E)},a,o);const m=()=>{const E=s.partialize({...a()});return h.setItem(s.name,{state:E,version:s.version})},g=o.setState;o.setState=(E,_)=>{g(E,_),m()};const y=e((...E)=>{n(...E),m()},a,o);o.getInitialState=()=>y;let b;const S=()=>{var E,_;if(!h)return;c=!1,u.forEach(C=>{var A;return C((A=a())!=null?A:y)});const N=((_=s.onRehydrateStorage)==null?void 0:_.call(s,(E=a())!=null?E:y))||void 0;return em(h.getItem.bind(h))(s.name).then(C=>{if(C)if(typeof C.version=="number"&&C.version!==s.version){if(s.migrate){const A=s.migrate(C.state,C.version);return A instanceof Promise?A.then(k=>[!0,k]):[!0,A]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,C.state];return[!1,void 0]}).then(C=>{var A;const[k,D]=C;if(b=s.merge(D,(A=a())!=null?A:y),n(b,!0),k)return m()}).then(()=>{N==null||N(b,void 0),b=a(),c=!0,f.forEach(C=>C(b))}).catch(C=>{N==null||N(void 0,C)})};return o.persist={setOptions:E=>{s={...s,...E},E.storage&&(h=E.storage)},clearStorage:()=>{h==null||h.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>S(),hasHydrated:()=>c,onHydrate:E=>(u.add(E),()=>{u.delete(E)}),onFinishHydration:E=>(f.add(E),()=>{f.delete(E)})},s.skipHydration||S(),b||y},zD=LD;function X1(e){var t,n,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t{const t=GD(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:c=>{const u=c.split(Jm);return u[0]===""&&u.length!==1&&u.shift(),Z1(u,t)||PD(c)},getConflictingClassGroupIds:(c,u)=>{const f=n[c]||[];return u&&a[c]?[...f,...a[c]]:f}}},Z1=(e,t)=>{var c;if(e.length===0)return t.classGroupId;const n=e[0],a=t.nextPart.get(n),o=a?Z1(e.slice(1),a):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(Jm);return(c=t.validators.find(({validator:u})=>u(s)))==null?void 0:c.classGroupId},n0=/^\[(.+)\]$/,PD=e=>{if(n0.test(e)){const t=n0.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},GD=e=>{const{theme:t,classGroups:n}=e,a={nextPart:new Map,validators:[]};for(const o in n)tm(n[o],a,o,t);return a},tm=(e,t,n,a)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:r0(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(FD(o)){tm(o(a),t,n,a);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,c])=>{tm(c,r0(t,s),n,a)})})},r0=(e,t)=>{let n=e;return t.split(Jm).forEach(a=>{n.nextPart.has(a)||n.nextPart.set(a,{nextPart:new Map,validators:[]}),n=n.nextPart.get(a)}),n},FD=e=>e.isThemeGetter,UD=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,a=new Map;const o=(s,c)=>{n.set(s,c),t++,t>e&&(t=0,a=n,n=new Map)};return{get(s){let c=n.get(s);if(c!==void 0)return c;if((c=a.get(s))!==void 0)return o(s,c),c},set(s,c){n.has(s)?n.set(s,c):o(s,c)}}},nm="!",rm=":",BD=rm.length,ID=e=>{const{prefix:t,experimentalParseClassName:n}=e;let a=o=>{const s=[];let c=0,u=0,f=0,h;for(let S=0;Sf?h-f:void 0;return{modifiers:s,hasImportantModifier:y,baseClassName:g,maybePostfixModifierPosition:b}};if(t){const o=t+rm,s=a;a=c=>c.startsWith(o)?s(c.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:c,maybePostfixModifierPosition:void 0}}if(n){const o=a;a=s=>n({className:s,parseClassName:o})}return a},HD=e=>e.endsWith(nm)?e.substring(0,e.length-1):e.startsWith(nm)?e.substring(1):e,$D=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(a=>[a,!0]));return a=>{if(a.length<=1)return a;const o=[];let s=[];return a.forEach(c=>{c[0]==="["||t[c]?(o.push(...s.sort(),c),s=[]):s.push(c)}),o.push(...s.sort()),o}},VD=e=>({cache:UD(e.cacheSize),parseClassName:ID(e),sortModifiers:$D(e),...MD(e)}),qD=/\s+/,YD=(e,t)=>{const{parseClassName:n,getClassGroupId:a,getConflictingClassGroupIds:o,sortModifiers:s}=t,c=[],u=e.trim().split(qD);let f="";for(let h=u.length-1;h>=0;h-=1){const m=u[h],{isExternal:g,modifiers:y,hasImportantModifier:b,baseClassName:S,maybePostfixModifierPosition:E}=n(m);if(g){f=m+(f.length>0?" "+f:f);continue}let _=!!E,N=a(_?S.substring(0,E):S);if(!N){if(!_){f=m+(f.length>0?" "+f:f);continue}if(N=a(S),!N){f=m+(f.length>0?" "+f:f);continue}_=!1}const C=s(y).join(":"),A=b?C+nm:C,k=A+N;if(c.includes(k))continue;c.push(k);const D=o(N,_);for(let M=0;M0?" "+f:f)}return f};function WD(){let e=0,t,n,a="";for(;e{if(typeof e=="string")return e;let t,n="";for(let a=0;ag(m),e());return n=VD(h),a=n.cache.get,o=n.cache.set,s=u,u(f)}function u(f){const h=a(f);if(h)return h;const m=YD(f,n);return o(f,m),m}return function(){return s(WD.apply(null,arguments))}}const Ht=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},J1=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,eE=/^\((?:(\w[\w-]*):)?(.+)\)$/i,KD=/^\d+\/\d+$/,ZD=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,QD=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,JD=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,ek=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,tk=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,yo=e=>KD.test(e),et=e=>!!e&&!Number.isNaN(Number(e)),gi=e=>!!e&&Number.isInteger(Number(e)),a0=e=>e.endsWith("%")&&et(e.slice(0,-1)),Oa=e=>ZD.test(e),nk=()=>!0,rk=e=>QD.test(e)&&!JD.test(e),eg=()=>!1,ak=e=>ek.test(e),ik=e=>tk.test(e),ok=e=>!ke(e)&&!Ne(e),sk=e=>Fo(e,rE,eg),ke=e=>J1.test(e),vi=e=>Fo(e,aE,rk),Ih=e=>Fo(e,yk,et),lk=e=>Fo(e,tE,eg),ck=e=>Fo(e,nE,ik),uk=e=>Fo(e,eg,ak),Ne=e=>eE.test(e),Uc=e=>Uo(e,aE),dk=e=>Uo(e,bk),fk=e=>Uo(e,tE),hk=e=>Uo(e,rE),pk=e=>Uo(e,nE),mk=e=>Uo(e,xk,!0),Fo=(e,t,n)=>{const a=J1.exec(e);return a?a[1]?t(a[1]):n(a[2]):!1},Uo=(e,t,n=!1)=>{const a=eE.exec(e);return a?a[1]?t(a[1]):n:!1},tE=e=>e==="position",gk=new Set(["image","url"]),nE=e=>gk.has(e),vk=new Set(["length","size","percentage"]),rE=e=>vk.has(e),aE=e=>e==="length",yk=e=>e==="number",bk=e=>e==="family-name",xk=e=>e==="shadow",wk=()=>{const e=Ht("color"),t=Ht("font"),n=Ht("text"),a=Ht("font-weight"),o=Ht("tracking"),s=Ht("leading"),c=Ht("breakpoint"),u=Ht("container"),f=Ht("spacing"),h=Ht("radius"),m=Ht("shadow"),g=Ht("inset-shadow"),y=Ht("drop-shadow"),b=Ht("blur"),S=Ht("perspective"),E=Ht("aspect"),_=Ht("ease"),N=Ht("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],A=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],k=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto","contain","none"],M=()=>[yo,"px","full","auto",Ne,ke,f],R=()=>[gi,"none","subgrid",Ne,ke],U=()=>["auto",{span:["full",gi,Ne,ke]},Ne,ke],L=()=>[gi,"auto",Ne,ke],I=()=>["auto","min","max","fr",Ne,ke],q=()=>[Ne,ke,f],Y=()=>["start","end","center","between","around","evenly","stretch","baseline"],B=()=>["start","end","center","stretch"],X=()=>[Ne,ke,f],ne=()=>["px",...X()],F=()=>["px","auto",...X()],z=()=>[yo,"auto","px","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",Ne,ke,f],j=()=>[e,Ne,ke],K=()=>[a0,vi],G=()=>["","none","full",h,Ne,ke],H=()=>["",et,Uc,vi],O=()=>["solid","dashed","dotted","double"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],W=()=>["","none",b,Ne,ke],re=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ne,ke],de=()=>["none",et,Ne,ke],ie=()=>["none",et,Ne,ke],oe=()=>[et,Ne,ke],Ce=()=>[yo,"full","px",Ne,ke,f];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Oa],breakpoint:[Oa],color:[nk],container:[Oa],"drop-shadow":[Oa],ease:["in","out","in-out"],font:[ok],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Oa],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Oa],shadow:[Oa],spacing:[et],text:[Oa],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",yo,ke,Ne,E]}],container:["container"],columns:[{columns:[et,ke,Ne,u]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...A(),ke,Ne]}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:M()}],"inset-x":[{"inset-x":M()}],"inset-y":[{"inset-y":M()}],start:[{start:M()}],end:[{end:M()}],top:[{top:M()}],right:[{right:M()}],bottom:[{bottom:M()}],left:[{left:M()}],visibility:["visible","invisible","collapse"],z:[{z:[gi,"auto",Ne,ke]}],basis:[{basis:[yo,"full","auto",Ne,ke,u,f]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[et,yo,"auto","initial","none",ke]}],grow:[{grow:["",et,Ne,ke]}],shrink:[{shrink:["",et,Ne,ke]}],order:[{order:[gi,"first","last","none",Ne,ke]}],"grid-cols":[{"grid-cols":R()}],"col-start-end":[{col:U()}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":R()}],"row-start-end":[{row:U()}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":I()}],"auto-rows":[{"auto-rows":I()}],gap:[{gap:q()}],"gap-x":[{"gap-x":q()}],"gap-y":[{"gap-y":q()}],"justify-content":[{justify:[...Y(),"normal"]}],"justify-items":[{"justify-items":[...B(),"normal"]}],"justify-self":[{"justify-self":["auto",...B()]}],"align-content":[{content:["normal",...Y()]}],"align-items":[{items:[...B(),"baseline"]}],"align-self":[{self:["auto",...B(),"baseline"]}],"place-content":[{"place-content":Y()}],"place-items":[{"place-items":[...B(),"baseline"]}],"place-self":[{"place-self":["auto",...B()]}],p:[{p:ne()}],px:[{px:ne()}],py:[{py:ne()}],ps:[{ps:ne()}],pe:[{pe:ne()}],pt:[{pt:ne()}],pr:[{pr:ne()}],pb:[{pb:ne()}],pl:[{pl:ne()}],m:[{m:F()}],mx:[{mx:F()}],my:[{my:F()}],ms:[{ms:F()}],me:[{me:F()}],mt:[{mt:F()}],mr:[{mr:F()}],mb:[{mb:F()}],ml:[{ml:F()}],"space-x":[{"space-x":X()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":X()}],"space-y-reverse":["space-y-reverse"],size:[{size:z()}],w:[{w:[u,"screen",...z()]}],"min-w":[{"min-w":[u,"screen","none",...z()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[c]},...z()]}],h:[{h:["screen",...z()]}],"min-h":[{"min-h":["screen","none",...z()]}],"max-h":[{"max-h":["screen",...z()]}],"font-size":[{text:["base",n,Uc,vi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,Ne,Ih]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",a0,ke]}],"font-family":[{font:[dk,ke,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,Ne,ke]}],"line-clamp":[{"line-clamp":[et,"none",Ne,Ih]}],leading:[{leading:[Ne,ke,s,f]}],"list-image":[{"list-image":["none",Ne,ke]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ne,ke]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:j()}],"text-color":[{text:j()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...O(),"wavy"]}],"text-decoration-thickness":[{decoration:[et,"from-font","auto",Ne,vi]}],"text-decoration-color":[{decoration:j()}],"underline-offset":[{"underline-offset":[et,"auto",Ne,ke]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:["px",...X()]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ne,ke]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ne,ke]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...A(),fk,lk]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",hk,sk]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},gi,Ne,ke],radial:["",Ne,ke],conic:[gi,Ne,ke]},pk,ck]}],"bg-color":[{bg:j()}],"gradient-from-pos":[{from:K()}],"gradient-via-pos":[{via:K()}],"gradient-to-pos":[{to:K()}],"gradient-from":[{from:j()}],"gradient-via":[{via:j()}],"gradient-to":[{to:j()}],rounded:[{rounded:G()}],"rounded-s":[{"rounded-s":G()}],"rounded-e":[{"rounded-e":G()}],"rounded-t":[{"rounded-t":G()}],"rounded-r":[{"rounded-r":G()}],"rounded-b":[{"rounded-b":G()}],"rounded-l":[{"rounded-l":G()}],"rounded-ss":[{"rounded-ss":G()}],"rounded-se":[{"rounded-se":G()}],"rounded-ee":[{"rounded-ee":G()}],"rounded-es":[{"rounded-es":G()}],"rounded-tl":[{"rounded-tl":G()}],"rounded-tr":[{"rounded-tr":G()}],"rounded-br":[{"rounded-br":G()}],"rounded-bl":[{"rounded-bl":G()}],"border-w":[{border:H()}],"border-w-x":[{"border-x":H()}],"border-w-y":[{"border-y":H()}],"border-w-s":[{"border-s":H()}],"border-w-e":[{"border-e":H()}],"border-w-t":[{"border-t":H()}],"border-w-r":[{"border-r":H()}],"border-w-b":[{"border-b":H()}],"border-w-l":[{"border-l":H()}],"divide-x":[{"divide-x":H()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":H()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...O(),"hidden","none"]}],"divide-style":[{divide:[...O(),"hidden","none"]}],"border-color":[{border:j()}],"border-color-x":[{"border-x":j()}],"border-color-y":[{"border-y":j()}],"border-color-s":[{"border-s":j()}],"border-color-e":[{"border-e":j()}],"border-color-t":[{"border-t":j()}],"border-color-r":[{"border-r":j()}],"border-color-b":[{"border-b":j()}],"border-color-l":[{"border-l":j()}],"divide-color":[{divide:j()}],"outline-style":[{outline:[...O(),"none","hidden"]}],"outline-offset":[{"outline-offset":[et,Ne,ke]}],"outline-w":[{outline:["",et,Uc,vi]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",m,mk,uk]}],"shadow-color":[{shadow:j()}],"inset-shadow":[{"inset-shadow":["none",Ne,ke,g]}],"inset-shadow-color":[{"inset-shadow":j()}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:j()}],"ring-offset-w":[{"ring-offset":[et,vi]}],"ring-offset-color":[{"ring-offset":j()}],"inset-ring-w":[{"inset-ring":H()}],"inset-ring-color":[{"inset-ring":j()}],opacity:[{opacity:[et,Ne,ke]}],"mix-blend":[{"mix-blend":[...$(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":$()}],filter:[{filter:["","none",Ne,ke]}],blur:[{blur:W()}],brightness:[{brightness:[et,Ne,ke]}],contrast:[{contrast:[et,Ne,ke]}],"drop-shadow":[{"drop-shadow":["","none",y,Ne,ke]}],grayscale:[{grayscale:["",et,Ne,ke]}],"hue-rotate":[{"hue-rotate":[et,Ne,ke]}],invert:[{invert:["",et,Ne,ke]}],saturate:[{saturate:[et,Ne,ke]}],sepia:[{sepia:["",et,Ne,ke]}],"backdrop-filter":[{"backdrop-filter":["","none",Ne,ke]}],"backdrop-blur":[{"backdrop-blur":W()}],"backdrop-brightness":[{"backdrop-brightness":[et,Ne,ke]}],"backdrop-contrast":[{"backdrop-contrast":[et,Ne,ke]}],"backdrop-grayscale":[{"backdrop-grayscale":["",et,Ne,ke]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[et,Ne,ke]}],"backdrop-invert":[{"backdrop-invert":["",et,Ne,ke]}],"backdrop-opacity":[{"backdrop-opacity":[et,Ne,ke]}],"backdrop-saturate":[{"backdrop-saturate":[et,Ne,ke]}],"backdrop-sepia":[{"backdrop-sepia":["",et,Ne,ke]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":X()}],"border-spacing-x":[{"border-spacing-x":X()}],"border-spacing-y":[{"border-spacing-y":X()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ne,ke]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[et,"initial",Ne,ke]}],ease:[{ease:["linear","initial",_,Ne,ke]}],delay:[{delay:[et,Ne,ke]}],animate:[{animate:["none",N,Ne,ke]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,Ne,ke]}],"perspective-origin":[{"perspective-origin":re()}],rotate:[{rotate:de()}],"rotate-x":[{"rotate-x":de()}],"rotate-y":[{"rotate-y":de()}],"rotate-z":[{"rotate-z":de()}],scale:[{scale:ie()}],"scale-x":[{"scale-x":ie()}],"scale-y":[{"scale-y":ie()}],"scale-z":[{"scale-z":ie()}],"scale-3d":["scale-3d"],skew:[{skew:oe()}],"skew-x":[{"skew-x":oe()}],"skew-y":[{"skew-y":oe()}],transform:[{transform:[Ne,ke,"","none","gpu","cpu"]}],"transform-origin":[{origin:re()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ce()}],"translate-x":[{"translate-x":Ce()}],"translate-y":[{"translate-y":Ce()}],"translate-z":[{"translate-z":Ce()}],"translate-none":["translate-none"],accent:[{accent:j()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:j()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ne,ke]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":X()}],"scroll-mx":[{"scroll-mx":X()}],"scroll-my":[{"scroll-my":X()}],"scroll-ms":[{"scroll-ms":X()}],"scroll-me":[{"scroll-me":X()}],"scroll-mt":[{"scroll-mt":X()}],"scroll-mr":[{"scroll-mr":X()}],"scroll-mb":[{"scroll-mb":X()}],"scroll-ml":[{"scroll-ml":X()}],"scroll-p":[{"scroll-p":X()}],"scroll-px":[{"scroll-px":X()}],"scroll-py":[{"scroll-py":X()}],"scroll-ps":[{"scroll-ps":X()}],"scroll-pe":[{"scroll-pe":X()}],"scroll-pt":[{"scroll-pt":X()}],"scroll-pr":[{"scroll-pr":X()}],"scroll-pb":[{"scroll-pb":X()}],"scroll-pl":[{"scroll-pl":X()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ne,ke]}],fill:[{fill:["none",...j()]}],"stroke-w":[{stroke:[et,Uc,vi,Ih]}],stroke:[{stroke:["none",...j()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["before","after","placeholder","file","marker","selection","first-line","first-letter","backdrop","*","**"]}},Ek=XD(wk);function Oe(...e){return Ek(K1(e))}function Sk(){const e="0123456789abcdef";let t="#";for(let n=0;n<6;n++)t+=e.charAt(Math.floor(Math.random()*16));return t}function Sr(e){return e instanceof Error?e.message:`${e}`}const tg=e=>{const t=e;t.use={};for(const n of Object.keys(t.getState()))t.use[n]=()=>t(a=>a[n]);return t},iE="",_r="ghost",_k="#B2EBF2",Ck="#000",Tk="#E2E2E2",Rk="#EEEEEE",Ak="#F57F17",Dk="#969696",kk="#F57F17",i0="#B2EBF2",Hh=20,o0=4,Nk=20,Ok=15,s0="*",jk={"text/plain":[".txt",".md"],"application/pdf":[".pdf"],"application/msword":[".doc"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":[".docx"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":[".pptx"]},l0={name:"LightRAG",github:"https://github.com/HKUDS/LightRAG"},Lk=Qm()(zD(e=>({theme:"system",showPropertyPanel:!0,showNodeSearchBar:!0,showNodeLabel:!0,enableNodeDrag:!0,showEdgeLabel:!1,enableHideUnselectedEdges:!0,enableEdgeEvents:!1,queryLabel:s0,enableHealthCheck:!0,apiKey:null,currentTab:"documents",retrievalHistory:[],querySettings:{mode:"global",response_type:"Multiple Paragraphs",top_k:10,max_token_for_text_unit:4e3,max_token_for_global_context:4e3,max_token_for_local_context:4e3,only_need_context:!1,only_need_prompt:!1,stream:!0,history_turns:3,hl_keywords:[],ll_keywords:[]},setTheme:t=>e({theme:t}),setQueryLabel:t=>e({queryLabel:t}),setEnableHealthCheck:t=>e({enableHealthCheck:t}),setApiKey:t=>e({apiKey:t}),setCurrentTab:t=>e({currentTab:t}),setRetrievalHistory:t=>e({retrievalHistory:t}),updateQuerySettings:t=>e(n=>({querySettings:{...n.querySettings,...t}}))}),{name:"settings-storage",storage:W1(()=>localStorage),version:6,migrate:(e,t)=>(t<2&&(e.showEdgeLabel=!1),t<3&&(e.queryLabel=s0),t<4&&(e.showPropertyPanel=!0,e.showNodeSearchBar=!0,e.showNodeLabel=!0,e.enableHealthCheck=!0,e.apiKey=null),t<5&&(e.currentTab="documents"),t<6&&(e.querySettings={mode:"global",response_type:"Multiple Paragraphs",top_k:10,max_token_for_text_unit:4e3,max_token_for_global_context:4e3,max_token_for_local_context:4e3,only_need_context:!1,only_need_prompt:!1,stream:!0,history_turns:3,hl_keywords:[],ll_keywords:[]},e.retrievalHistory=[]),e)})),Ye=tg(Lk),zk={theme:"system",setTheme:()=>null},oE=w.createContext(zk);function Mk({children:e,...t}){const[n,a]=w.useState(Ye.getState().theme);w.useEffect(()=>{const s=window.document.documentElement;if(s.classList.remove("light","dark"),n==="system"){const c=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";s.classList.add(c),a(c);return}s.classList.add(n)},[n]);const o={theme:n,setTheme:s=>{Ye.getState().setTheme(s),a(s)}};return x.jsx(oE.Provider,{...t,value:o,children:e})}const c0=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,u0=K1,sE=(e,t)=>n=>{var a;if((t==null?void 0:t.variants)==null)return u0(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=t,c=Object.keys(o).map(h=>{const m=n==null?void 0:n[h],g=s==null?void 0:s[h];if(m===null)return null;const y=c0(m)||c0(g);return o[h][y]}),u=n&&Object.entries(n).reduce((h,m)=>{let[g,y]=m;return y===void 0||(h[g]=y),h},{}),f=t==null||(a=t.compoundVariants)===null||a===void 0?void 0:a.reduce((h,m)=>{let{class:g,className:y,...b}=m;return Object.entries(b).every(S=>{let[E,_]=S;return Array.isArray(_)?_.includes({...s,...u}[E]):{...s,...u}[E]===_})?[...h,g,y]:h},[]);return u0(e,c,f,n==null?void 0:n.class,n==null?void 0:n.className)},Pk=sE("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),lE=w.forwardRef(({className:e,variant:t,...n},a)=>x.jsx("div",{ref:a,role:"alert",className:Oe(Pk({variant:t}),e),...n}));lE.displayName="Alert";const cE=w.forwardRef(({className:e,...t},n)=>x.jsx("h5",{ref:n,className:Oe("mb-1 leading-none font-medium tracking-tight",e),...t}));cE.displayName="AlertTitle";const uE=w.forwardRef(({className:e,...t},n)=>x.jsx("div",{ref:n,className:Oe("text-sm [&_p]:leading-relaxed",e),...t}));uE.displayName="AlertDescription";function dE(e,t){return function(){return e.apply(t,arguments)}}const{toString:Gk}=Object.prototype,{getPrototypeOf:ng}=Object,Wu=(e=>t=>{const n=Gk.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),dr=e=>(e=e.toLowerCase(),t=>Wu(t)===e),Xu=e=>t=>typeof t===e,{isArray:Bo}=Array,ll=Xu("undefined");function Fk(e){return e!==null&&!ll(e)&&e.constructor!==null&&!ll(e.constructor)&&jn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const fE=dr("ArrayBuffer");function Uk(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&fE(e.buffer),t}const Bk=Xu("string"),jn=Xu("function"),hE=Xu("number"),Ku=e=>e!==null&&typeof e=="object",Ik=e=>e===!0||e===!1,cu=e=>{if(Wu(e)!=="object")return!1;const t=ng(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Hk=dr("Date"),$k=dr("File"),Vk=dr("Blob"),qk=dr("FileList"),Yk=e=>Ku(e)&&jn(e.pipe),Wk=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||jn(e.append)&&((t=Wu(e))==="formdata"||t==="object"&&jn(e.toString)&&e.toString()==="[object FormData]"))},Xk=dr("URLSearchParams"),[Kk,Zk,Qk,Jk]=["ReadableStream","Request","Response","Headers"].map(dr),eN=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function yl(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let a,o;if(typeof e!="object"&&(e=[e]),Bo(e))for(a=0,o=e.length;a0;)if(o=n[a],t===o.toLowerCase())return o;return null}const Si=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,mE=e=>!ll(e)&&e!==Si;function am(){const{caseless:e}=mE(this)&&this||{},t={},n=(a,o)=>{const s=e&&pE(t,o)||o;cu(t[s])&&cu(a)?t[s]=am(t[s],a):cu(a)?t[s]=am({},a):Bo(a)?t[s]=a.slice():t[s]=a};for(let a=0,o=arguments.length;a(yl(t,(o,s)=>{n&&jn(o)?e[s]=dE(o,n):e[s]=o},{allOwnKeys:a}),e),nN=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),rN=(e,t,n,a)=>{e.prototype=Object.create(t.prototype,a),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},aN=(e,t,n,a)=>{let o,s,c;const u={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)c=o[s],(!a||a(c,e,t))&&!u[c]&&(t[c]=e[c],u[c]=!0);e=n!==!1&&ng(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},iN=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const a=e.indexOf(t,n);return a!==-1&&a===n},oN=e=>{if(!e)return null;if(Bo(e))return e;let t=e.length;if(!hE(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},sN=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ng(Uint8Array)),lN=(e,t)=>{const a=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=a.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},cN=(e,t)=>{let n;const a=[];for(;(n=e.exec(t))!==null;)a.push(n);return a},uN=dr("HTMLFormElement"),dN=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,a,o){return a.toUpperCase()+o}),d0=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),fN=dr("RegExp"),gE=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),a={};yl(n,(o,s)=>{let c;(c=t(o,s,e))!==!1&&(a[s]=c||o)}),Object.defineProperties(e,a)},hN=e=>{gE(e,(t,n)=>{if(jn(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const a=e[n];if(jn(a)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},pN=(e,t)=>{const n={},a=o=>{o.forEach(s=>{n[s]=!0})};return Bo(e)?a(e):a(String(e).split(t)),n},mN=()=>{},gN=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,$h="abcdefghijklmnopqrstuvwxyz",f0="0123456789",vE={DIGIT:f0,ALPHA:$h,ALPHA_DIGIT:$h+$h.toUpperCase()+f0},vN=(e=16,t=vE.ALPHA_DIGIT)=>{let n="";const{length:a}=t;for(;e--;)n+=t[Math.random()*a|0];return n};function yN(e){return!!(e&&jn(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const bN=e=>{const t=new Array(10),n=(a,o)=>{if(Ku(a)){if(t.indexOf(a)>=0)return;if(!("toJSON"in a)){t[o]=a;const s=Bo(a)?[]:{};return yl(a,(c,u)=>{const f=n(c,o+1);!ll(f)&&(s[u]=f)}),t[o]=void 0,s}}return a};return n(e,0)},xN=dr("AsyncFunction"),wN=e=>e&&(Ku(e)||jn(e))&&jn(e.then)&&jn(e.catch),yE=((e,t)=>e?setImmediate:t?((n,a)=>(Si.addEventListener("message",({source:o,data:s})=>{o===Si&&s===n&&a.length&&a.shift()()},!1),o=>{a.push(o),Si.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",jn(Si.postMessage)),EN=typeof queueMicrotask<"u"?queueMicrotask.bind(Si):typeof process<"u"&&process.nextTick||yE,ce={isArray:Bo,isArrayBuffer:fE,isBuffer:Fk,isFormData:Wk,isArrayBufferView:Uk,isString:Bk,isNumber:hE,isBoolean:Ik,isObject:Ku,isPlainObject:cu,isReadableStream:Kk,isRequest:Zk,isResponse:Qk,isHeaders:Jk,isUndefined:ll,isDate:Hk,isFile:$k,isBlob:Vk,isRegExp:fN,isFunction:jn,isStream:Yk,isURLSearchParams:Xk,isTypedArray:sN,isFileList:qk,forEach:yl,merge:am,extend:tN,trim:eN,stripBOM:nN,inherits:rN,toFlatObject:aN,kindOf:Wu,kindOfTest:dr,endsWith:iN,toArray:oN,forEachEntry:lN,matchAll:cN,isHTMLForm:uN,hasOwnProperty:d0,hasOwnProp:d0,reduceDescriptors:gE,freezeMethods:hN,toObjectSet:pN,toCamelCase:dN,noop:mN,toFiniteNumber:gN,findKey:pE,global:Si,isContextDefined:mE,ALPHABET:vE,generateString:vN,isSpecCompliantForm:yN,toJSONObject:bN,isAsyncFn:xN,isThenable:wN,setImmediate:yE,asap:EN};function Xe(e,t,n,a,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),a&&(this.request=a),o&&(this.response=o,this.status=o.status?o.status:null)}ce.inherits(Xe,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ce.toJSONObject(this.config),code:this.code,status:this.status}}});const bE=Xe.prototype,xE={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{xE[e]={value:e}});Object.defineProperties(Xe,xE);Object.defineProperty(bE,"isAxiosError",{value:!0});Xe.from=(e,t,n,a,o,s)=>{const c=Object.create(bE);return ce.toFlatObject(e,c,function(f){return f!==Error.prototype},u=>u!=="isAxiosError"),Xe.call(c,e.message,t,n,a,o),c.cause=e,c.name=e.name,s&&Object.assign(c,s),c};const SN=null;function im(e){return ce.isPlainObject(e)||ce.isArray(e)}function wE(e){return ce.endsWith(e,"[]")?e.slice(0,-2):e}function h0(e,t,n){return e?e.concat(t).map(function(o,s){return o=wE(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function _N(e){return ce.isArray(e)&&!e.some(im)}const CN=ce.toFlatObject(ce,{},null,function(t){return/^is[A-Z]/.test(t)});function Zu(e,t,n){if(!ce.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=ce.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(E,_){return!ce.isUndefined(_[E])});const a=n.metaTokens,o=n.visitor||m,s=n.dots,c=n.indexes,f=(n.Blob||typeof Blob<"u"&&Blob)&&ce.isSpecCompliantForm(t);if(!ce.isFunction(o))throw new TypeError("visitor must be a function");function h(S){if(S===null)return"";if(ce.isDate(S))return S.toISOString();if(!f&&ce.isBlob(S))throw new Xe("Blob is not supported. Use a Buffer instead.");return ce.isArrayBuffer(S)||ce.isTypedArray(S)?f&&typeof Blob=="function"?new Blob([S]):Buffer.from(S):S}function m(S,E,_){let N=S;if(S&&!_&&typeof S=="object"){if(ce.endsWith(E,"{}"))E=a?E:E.slice(0,-2),S=JSON.stringify(S);else if(ce.isArray(S)&&_N(S)||(ce.isFileList(S)||ce.endsWith(E,"[]"))&&(N=ce.toArray(S)))return E=wE(E),N.forEach(function(A,k){!(ce.isUndefined(A)||A===null)&&t.append(c===!0?h0([E],k,s):c===null?E:E+"[]",h(A))}),!1}return im(S)?!0:(t.append(h0(_,E,s),h(S)),!1)}const g=[],y=Object.assign(CN,{defaultVisitor:m,convertValue:h,isVisitable:im});function b(S,E){if(!ce.isUndefined(S)){if(g.indexOf(S)!==-1)throw Error("Circular reference detected in "+E.join("."));g.push(S),ce.forEach(S,function(N,C){(!(ce.isUndefined(N)||N===null)&&o.call(t,N,ce.isString(C)?C.trim():C,E,y))===!0&&b(N,E?E.concat(C):[C])}),g.pop()}}if(!ce.isObject(e))throw new TypeError("data must be an object");return b(e),t}function p0(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(a){return t[a]})}function rg(e,t){this._pairs=[],e&&Zu(e,this,t)}const EE=rg.prototype;EE.append=function(t,n){this._pairs.push([t,n])};EE.toString=function(t){const n=t?function(a){return t.call(this,a,p0)}:p0;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function TN(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function SE(e,t,n){if(!t)return e;const a=n&&n.encode||TN;ce.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let s;if(o?s=o(t,n):s=ce.isURLSearchParams(t)?t.toString():new rg(t,n).toString(a),s){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class m0{constructor(){this.handlers=[]}use(t,n,a){return this.handlers.push({fulfilled:t,rejected:n,synchronous:a?a.synchronous:!1,runWhen:a?a.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){ce.forEach(this.handlers,function(a){a!==null&&t(a)})}}const _E={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},RN=typeof URLSearchParams<"u"?URLSearchParams:rg,AN=typeof FormData<"u"?FormData:null,DN=typeof Blob<"u"?Blob:null,kN={isBrowser:!0,classes:{URLSearchParams:RN,FormData:AN,Blob:DN},protocols:["http","https","file","blob","url","data"]},ag=typeof window<"u"&&typeof document<"u",om=typeof navigator=="object"&&navigator||void 0,NN=ag&&(!om||["ReactNative","NativeScript","NS"].indexOf(om.product)<0),ON=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",jN=ag&&window.location.href||"http://localhost",LN=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ag,hasStandardBrowserEnv:NN,hasStandardBrowserWebWorkerEnv:ON,navigator:om,origin:jN},Symbol.toStringTag,{value:"Module"})),rn={...LN,...kN};function zN(e,t){return Zu(e,new rn.classes.URLSearchParams,Object.assign({visitor:function(n,a,o,s){return rn.isNode&&ce.isBuffer(n)?(this.append(a,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function MN(e){return ce.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function PN(e){const t={},n=Object.keys(e);let a;const o=n.length;let s;for(a=0;a=n.length;return c=!c&&ce.isArray(o)?o.length:c,f?(ce.hasOwnProp(o,c)?o[c]=[o[c],a]:o[c]=a,!u):((!o[c]||!ce.isObject(o[c]))&&(o[c]=[]),t(n,a,o[c],s)&&ce.isArray(o[c])&&(o[c]=PN(o[c])),!u)}if(ce.isFormData(e)&&ce.isFunction(e.entries)){const n={};return ce.forEachEntry(e,(a,o)=>{t(MN(a),o,n,0)}),n}return null}function GN(e,t,n){if(ce.isString(e))try{return(t||JSON.parse)(e),ce.trim(e)}catch(a){if(a.name!=="SyntaxError")throw a}return(n||JSON.stringify)(e)}const bl={transitional:_E,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const a=n.getContentType()||"",o=a.indexOf("application/json")>-1,s=ce.isObject(t);if(s&&ce.isHTMLForm(t)&&(t=new FormData(t)),ce.isFormData(t))return o?JSON.stringify(CE(t)):t;if(ce.isArrayBuffer(t)||ce.isBuffer(t)||ce.isStream(t)||ce.isFile(t)||ce.isBlob(t)||ce.isReadableStream(t))return t;if(ce.isArrayBufferView(t))return t.buffer;if(ce.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let u;if(s){if(a.indexOf("application/x-www-form-urlencoded")>-1)return zN(t,this.formSerializer).toString();if((u=ce.isFileList(t))||a.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return Zu(u?{"files[]":t}:t,f&&new f,this.formSerializer)}}return s||o?(n.setContentType("application/json",!1),GN(t)):t}],transformResponse:[function(t){const n=this.transitional||bl.transitional,a=n&&n.forcedJSONParsing,o=this.responseType==="json";if(ce.isResponse(t)||ce.isReadableStream(t))return t;if(t&&ce.isString(t)&&(a&&!this.responseType||o)){const c=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(u){if(c)throw u.name==="SyntaxError"?Xe.from(u,Xe.ERR_BAD_RESPONSE,this,null,this.response):u}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:rn.classes.FormData,Blob:rn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ce.forEach(["delete","get","head","post","put","patch"],e=>{bl.headers[e]={}});const FN=ce.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),UN=e=>{const t={};let n,a,o;return e&&e.split(` -`).forEach(function(c){o=c.indexOf(":"),n=c.substring(0,o).trim().toLowerCase(),a=c.substring(o+1).trim(),!(!n||t[n]&&FN[n])&&(n==="set-cookie"?t[n]?t[n].push(a):t[n]=[a]:t[n]=t[n]?t[n]+", "+a:a)}),t},g0=Symbol("internals");function Ws(e){return e&&String(e).trim().toLowerCase()}function uu(e){return e===!1||e==null?e:ce.isArray(e)?e.map(uu):String(e)}function BN(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let a;for(;a=n.exec(e);)t[a[1]]=a[2];return t}const IN=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Vh(e,t,n,a,o){if(ce.isFunction(a))return a.call(this,t,n);if(o&&(t=n),!!ce.isString(t)){if(ce.isString(a))return t.indexOf(a)!==-1;if(ce.isRegExp(a))return a.test(t)}}function HN(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,a)=>n.toUpperCase()+a)}function $N(e,t){const n=ce.toCamelCase(" "+t);["get","set","has"].forEach(a=>{Object.defineProperty(e,a+n,{value:function(o,s,c){return this[a].call(this,t,o,s,c)},configurable:!0})})}let wn=class{constructor(t){t&&this.set(t)}set(t,n,a){const o=this;function s(u,f,h){const m=Ws(f);if(!m)throw new Error("header name must be a non-empty string");const g=ce.findKey(o,m);(!g||o[g]===void 0||h===!0||h===void 0&&o[g]!==!1)&&(o[g||f]=uu(u))}const c=(u,f)=>ce.forEach(u,(h,m)=>s(h,m,f));if(ce.isPlainObject(t)||t instanceof this.constructor)c(t,n);else if(ce.isString(t)&&(t=t.trim())&&!IN(t))c(UN(t),n);else if(ce.isHeaders(t))for(const[u,f]of t.entries())s(f,u,a);else t!=null&&s(n,t,a);return this}get(t,n){if(t=Ws(t),t){const a=ce.findKey(this,t);if(a){const o=this[a];if(!n)return o;if(n===!0)return BN(o);if(ce.isFunction(n))return n.call(this,o,a);if(ce.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Ws(t),t){const a=ce.findKey(this,t);return!!(a&&this[a]!==void 0&&(!n||Vh(this,this[a],a,n)))}return!1}delete(t,n){const a=this;let o=!1;function s(c){if(c=Ws(c),c){const u=ce.findKey(a,c);u&&(!n||Vh(a,a[u],u,n))&&(delete a[u],o=!0)}}return ce.isArray(t)?t.forEach(s):s(t),o}clear(t){const n=Object.keys(this);let a=n.length,o=!1;for(;a--;){const s=n[a];(!t||Vh(this,this[s],s,t,!0))&&(delete this[s],o=!0)}return o}normalize(t){const n=this,a={};return ce.forEach(this,(o,s)=>{const c=ce.findKey(a,s);if(c){n[c]=uu(o),delete n[s];return}const u=t?HN(s):String(s).trim();u!==s&&delete n[s],n[u]=uu(o),a[u]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return ce.forEach(this,(a,o)=>{a!=null&&a!==!1&&(n[o]=t&&ce.isArray(a)?a.join(", "):a)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` -`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const a=new this(t);return n.forEach(o=>a.set(o)),a}static accessor(t){const a=(this[g0]=this[g0]={accessors:{}}).accessors,o=this.prototype;function s(c){const u=Ws(c);a[u]||($N(o,c),a[u]=!0)}return ce.isArray(t)?t.forEach(s):s(t),this}};wn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ce.reduceDescriptors(wn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(a){this[n]=a}}});ce.freezeMethods(wn);function qh(e,t){const n=this||bl,a=t||n,o=wn.from(a.headers);let s=a.data;return ce.forEach(e,function(u){s=u.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function TE(e){return!!(e&&e.__CANCEL__)}function Io(e,t,n){Xe.call(this,e??"canceled",Xe.ERR_CANCELED,t,n),this.name="CanceledError"}ce.inherits(Io,Xe,{__CANCEL__:!0});function RE(e,t,n){const a=n.config.validateStatus;!n.status||!a||a(n.status)?e(n):t(new Xe("Request failed with status code "+n.status,[Xe.ERR_BAD_REQUEST,Xe.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function VN(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function qN(e,t){e=e||10;const n=new Array(e),a=new Array(e);let o=0,s=0,c;return t=t!==void 0?t:1e3,function(f){const h=Date.now(),m=a[s];c||(c=h),n[o]=f,a[o]=h;let g=s,y=0;for(;g!==o;)y+=n[g++],g=g%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),h-c{n=m,o=null,s&&(clearTimeout(s),s=null),e.apply(null,h)};return[(...h)=>{const m=Date.now(),g=m-n;g>=a?c(h,m):(o=h,s||(s=setTimeout(()=>{s=null,c(o)},a-g)))},()=>o&&c(o)]}const Cu=(e,t,n=3)=>{let a=0;const o=qN(50,250);return YN(s=>{const c=s.loaded,u=s.lengthComputable?s.total:void 0,f=c-a,h=o(f),m=c<=u;a=c;const g={loaded:c,total:u,progress:u?c/u:void 0,bytes:f,rate:h||void 0,estimated:h&&u&&m?(u-c)/h:void 0,event:s,lengthComputable:u!=null,[t?"download":"upload"]:!0};e(g)},n)},v0=(e,t)=>{const n=e!=null;return[a=>t[0]({lengthComputable:n,total:e,loaded:a}),t[1]]},y0=e=>(...t)=>ce.asap(()=>e(...t)),WN=rn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,rn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(rn.origin),rn.navigator&&/(msie|trident)/i.test(rn.navigator.userAgent)):()=>!0,XN=rn.hasStandardBrowserEnv?{write(e,t,n,a,o,s){const c=[e+"="+encodeURIComponent(t)];ce.isNumber(n)&&c.push("expires="+new Date(n).toGMTString()),ce.isString(a)&&c.push("path="+a),ce.isString(o)&&c.push("domain="+o),s===!0&&c.push("secure"),document.cookie=c.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function KN(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function ZN(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function AE(e,t){return e&&!KN(t)?ZN(e,t):t}const b0=e=>e instanceof wn?{...e}:e;function Ci(e,t){t=t||{};const n={};function a(h,m,g,y){return ce.isPlainObject(h)&&ce.isPlainObject(m)?ce.merge.call({caseless:y},h,m):ce.isPlainObject(m)?ce.merge({},m):ce.isArray(m)?m.slice():m}function o(h,m,g,y){if(ce.isUndefined(m)){if(!ce.isUndefined(h))return a(void 0,h,g,y)}else return a(h,m,g,y)}function s(h,m){if(!ce.isUndefined(m))return a(void 0,m)}function c(h,m){if(ce.isUndefined(m)){if(!ce.isUndefined(h))return a(void 0,h)}else return a(void 0,m)}function u(h,m,g){if(g in t)return a(h,m);if(g in e)return a(void 0,h)}const f={url:s,method:s,data:s,baseURL:c,transformRequest:c,transformResponse:c,paramsSerializer:c,timeout:c,timeoutMessage:c,withCredentials:c,withXSRFToken:c,adapter:c,responseType:c,xsrfCookieName:c,xsrfHeaderName:c,onUploadProgress:c,onDownloadProgress:c,decompress:c,maxContentLength:c,maxBodyLength:c,beforeRedirect:c,transport:c,httpAgent:c,httpsAgent:c,cancelToken:c,socketPath:c,responseEncoding:c,validateStatus:u,headers:(h,m,g)=>o(b0(h),b0(m),g,!0)};return ce.forEach(Object.keys(Object.assign({},e,t)),function(m){const g=f[m]||o,y=g(e[m],t[m],m);ce.isUndefined(y)&&g!==u||(n[m]=y)}),n}const DE=e=>{const t=Ci({},e);let{data:n,withXSRFToken:a,xsrfHeaderName:o,xsrfCookieName:s,headers:c,auth:u}=t;t.headers=c=wn.from(c),t.url=SE(AE(t.baseURL,t.url),e.params,e.paramsSerializer),u&&c.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):"")));let f;if(ce.isFormData(n)){if(rn.hasStandardBrowserEnv||rn.hasStandardBrowserWebWorkerEnv)c.setContentType(void 0);else if((f=c.getContentType())!==!1){const[h,...m]=f?f.split(";").map(g=>g.trim()).filter(Boolean):[];c.setContentType([h||"multipart/form-data",...m].join("; "))}}if(rn.hasStandardBrowserEnv&&(a&&ce.isFunction(a)&&(a=a(t)),a||a!==!1&&WN(t.url))){const h=o&&s&&XN.read(s);h&&c.set(o,h)}return t},QN=typeof XMLHttpRequest<"u",JN=QN&&function(e){return new Promise(function(n,a){const o=DE(e);let s=o.data;const c=wn.from(o.headers).normalize();let{responseType:u,onUploadProgress:f,onDownloadProgress:h}=o,m,g,y,b,S;function E(){b&&b(),S&&S(),o.cancelToken&&o.cancelToken.unsubscribe(m),o.signal&&o.signal.removeEventListener("abort",m)}let _=new XMLHttpRequest;_.open(o.method.toUpperCase(),o.url,!0),_.timeout=o.timeout;function N(){if(!_)return;const A=wn.from("getAllResponseHeaders"in _&&_.getAllResponseHeaders()),D={data:!u||u==="text"||u==="json"?_.responseText:_.response,status:_.status,statusText:_.statusText,headers:A,config:e,request:_};RE(function(R){n(R),E()},function(R){a(R),E()},D),_=null}"onloadend"in _?_.onloadend=N:_.onreadystatechange=function(){!_||_.readyState!==4||_.status===0&&!(_.responseURL&&_.responseURL.indexOf("file:")===0)||setTimeout(N)},_.onabort=function(){_&&(a(new Xe("Request aborted",Xe.ECONNABORTED,e,_)),_=null)},_.onerror=function(){a(new Xe("Network Error",Xe.ERR_NETWORK,e,_)),_=null},_.ontimeout=function(){let k=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const D=o.transitional||_E;o.timeoutErrorMessage&&(k=o.timeoutErrorMessage),a(new Xe(k,D.clarifyTimeoutError?Xe.ETIMEDOUT:Xe.ECONNABORTED,e,_)),_=null},s===void 0&&c.setContentType(null),"setRequestHeader"in _&&ce.forEach(c.toJSON(),function(k,D){_.setRequestHeader(D,k)}),ce.isUndefined(o.withCredentials)||(_.withCredentials=!!o.withCredentials),u&&u!=="json"&&(_.responseType=o.responseType),h&&([y,S]=Cu(h,!0),_.addEventListener("progress",y)),f&&_.upload&&([g,b]=Cu(f),_.upload.addEventListener("progress",g),_.upload.addEventListener("loadend",b)),(o.cancelToken||o.signal)&&(m=A=>{_&&(a(!A||A.type?new Io(null,e,_):A),_.abort(),_=null)},o.cancelToken&&o.cancelToken.subscribe(m),o.signal&&(o.signal.aborted?m():o.signal.addEventListener("abort",m)));const C=VN(o.url);if(C&&rn.protocols.indexOf(C)===-1){a(new Xe("Unsupported protocol "+C+":",Xe.ERR_BAD_REQUEST,e));return}_.send(s||null)})},eO=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let a=new AbortController,o;const s=function(h){if(!o){o=!0,u();const m=h instanceof Error?h:this.reason;a.abort(m instanceof Xe?m:new Io(m instanceof Error?m.message:m))}};let c=t&&setTimeout(()=>{c=null,s(new Xe(`timeout ${t} of ms exceeded`,Xe.ETIMEDOUT))},t);const u=()=>{e&&(c&&clearTimeout(c),c=null,e.forEach(h=>{h.unsubscribe?h.unsubscribe(s):h.removeEventListener("abort",s)}),e=null)};e.forEach(h=>h.addEventListener("abort",s));const{signal:f}=a;return f.unsubscribe=()=>ce.asap(u),f}},tO=function*(e,t){let n=e.byteLength;if(n{const o=nO(e,t);let s=0,c,u=f=>{c||(c=!0,a&&a(f))};return new ReadableStream({async pull(f){try{const{done:h,value:m}=await o.next();if(h){u(),f.close();return}let g=m.byteLength;if(n){let y=s+=g;n(y)}f.enqueue(new Uint8Array(m))}catch(h){throw u(h),h}},cancel(f){return u(f),o.return()}},{highWaterMark:2})},Qu=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",kE=Qu&&typeof ReadableStream=="function",aO=Qu&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),NE=(e,...t)=>{try{return!!e(...t)}catch{return!1}},iO=kE&&NE(()=>{let e=!1;const t=new Request(rn.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),w0=64*1024,sm=kE&&NE(()=>ce.isReadableStream(new Response("").body)),Tu={stream:sm&&(e=>e.body)};Qu&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Tu[t]&&(Tu[t]=ce.isFunction(e[t])?n=>n[t]():(n,a)=>{throw new Xe(`Response type '${t}' is not supported`,Xe.ERR_NOT_SUPPORT,a)})})})(new Response);const oO=async e=>{if(e==null)return 0;if(ce.isBlob(e))return e.size;if(ce.isSpecCompliantForm(e))return(await new Request(rn.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(ce.isArrayBufferView(e)||ce.isArrayBuffer(e))return e.byteLength;if(ce.isURLSearchParams(e)&&(e=e+""),ce.isString(e))return(await aO(e)).byteLength},sO=async(e,t)=>{const n=ce.toFiniteNumber(e.getContentLength());return n??oO(t)},lO=Qu&&(async e=>{let{url:t,method:n,data:a,signal:o,cancelToken:s,timeout:c,onDownloadProgress:u,onUploadProgress:f,responseType:h,headers:m,withCredentials:g="same-origin",fetchOptions:y}=DE(e);h=h?(h+"").toLowerCase():"text";let b=eO([o,s&&s.toAbortSignal()],c),S;const E=b&&b.unsubscribe&&(()=>{b.unsubscribe()});let _;try{if(f&&iO&&n!=="get"&&n!=="head"&&(_=await sO(m,a))!==0){let D=new Request(t,{method:"POST",body:a,duplex:"half"}),M;if(ce.isFormData(a)&&(M=D.headers.get("content-type"))&&m.setContentType(M),D.body){const[R,U]=v0(_,Cu(y0(f)));a=x0(D.body,w0,R,U)}}ce.isString(g)||(g=g?"include":"omit");const N="credentials"in Request.prototype;S=new Request(t,{...y,signal:b,method:n.toUpperCase(),headers:m.normalize().toJSON(),body:a,duplex:"half",credentials:N?g:void 0});let C=await fetch(S);const A=sm&&(h==="stream"||h==="response");if(sm&&(u||A&&E)){const D={};["status","statusText","headers"].forEach(L=>{D[L]=C[L]});const M=ce.toFiniteNumber(C.headers.get("content-length")),[R,U]=u&&v0(M,Cu(y0(u),!0))||[];C=new Response(x0(C.body,w0,R,()=>{U&&U(),E&&E()}),D)}h=h||"text";let k=await Tu[ce.findKey(Tu,h)||"text"](C,e);return!A&&E&&E(),await new Promise((D,M)=>{RE(D,M,{data:k,headers:wn.from(C.headers),status:C.status,statusText:C.statusText,config:e,request:S})})}catch(N){throw E&&E(),N&&N.name==="TypeError"&&/fetch/i.test(N.message)?Object.assign(new Xe("Network Error",Xe.ERR_NETWORK,e,S),{cause:N.cause||N}):Xe.from(N,N&&N.code,e,S)}}),lm={http:SN,xhr:JN,fetch:lO};ce.forEach(lm,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const E0=e=>`- ${e}`,cO=e=>ce.isFunction(e)||e===null||e===!1,OE={getAdapter:e=>{e=ce.isArray(e)?e:[e];const{length:t}=e;let n,a;const o={};for(let s=0;s`adapter ${u} `+(f===!1?"is not supported by the environment":"is not available in the build"));let c=t?s.length>1?`since : -`+s.map(E0).join(` -`):" "+E0(s[0]):"as no adapter specified";throw new Xe("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return a},adapters:lm};function Yh(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Io(null,e)}function S0(e){return Yh(e),e.headers=wn.from(e.headers),e.data=qh.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),OE.getAdapter(e.adapter||bl.adapter)(e).then(function(a){return Yh(e),a.data=qh.call(e,e.transformResponse,a),a.headers=wn.from(a.headers),a},function(a){return TE(a)||(Yh(e),a&&a.response&&(a.response.data=qh.call(e,e.transformResponse,a.response),a.response.headers=wn.from(a.response.headers))),Promise.reject(a)})}const jE="1.7.9",Ju={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ju[e]=function(a){return typeof a===e||"a"+(t<1?"n ":" ")+e}});const _0={};Ju.transitional=function(t,n,a){function o(s,c){return"[Axios v"+jE+"] Transitional option '"+s+"'"+c+(a?". "+a:"")}return(s,c,u)=>{if(t===!1)throw new Xe(o(c," has been removed"+(n?" in "+n:"")),Xe.ERR_DEPRECATED);return n&&!_0[c]&&(_0[c]=!0,console.warn(o(c," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,c,u):!0}};Ju.spelling=function(t){return(n,a)=>(console.warn(`${a} is likely a misspelling of ${t}`),!0)};function uO(e,t,n){if(typeof e!="object")throw new Xe("options must be an object",Xe.ERR_BAD_OPTION_VALUE);const a=Object.keys(e);let o=a.length;for(;o-- >0;){const s=a[o],c=t[s];if(c){const u=e[s],f=u===void 0||c(u,s,e);if(f!==!0)throw new Xe("option "+s+" must be "+f,Xe.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Xe("Unknown option "+s,Xe.ERR_BAD_OPTION)}}const du={assertOptions:uO,validators:Ju},br=du.validators;let _i=class{constructor(t){this.defaults=t,this.interceptors={request:new m0,response:new m0}}async request(t,n){try{return await this._request(t,n)}catch(a){if(a instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const s=o.stack?o.stack.replace(/^.+\n/,""):"";try{a.stack?s&&!String(a.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(a.stack+=` -`+s):a.stack=s}catch{}}throw a}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Ci(this.defaults,n);const{transitional:a,paramsSerializer:o,headers:s}=n;a!==void 0&&du.assertOptions(a,{silentJSONParsing:br.transitional(br.boolean),forcedJSONParsing:br.transitional(br.boolean),clarifyTimeoutError:br.transitional(br.boolean)},!1),o!=null&&(ce.isFunction(o)?n.paramsSerializer={serialize:o}:du.assertOptions(o,{encode:br.function,serialize:br.function},!0)),du.assertOptions(n,{baseUrl:br.spelling("baseURL"),withXsrfToken:br.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let c=s&&ce.merge(s.common,s[n.method]);s&&ce.forEach(["delete","get","head","post","put","patch","common"],S=>{delete s[S]}),n.headers=wn.concat(c,s);const u=[];let f=!0;this.interceptors.request.forEach(function(E){typeof E.runWhen=="function"&&E.runWhen(n)===!1||(f=f&&E.synchronous,u.unshift(E.fulfilled,E.rejected))});const h=[];this.interceptors.response.forEach(function(E){h.push(E.fulfilled,E.rejected)});let m,g=0,y;if(!f){const S=[S0.bind(this),void 0];for(S.unshift.apply(S,u),S.push.apply(S,h),y=S.length,m=Promise.resolve(n);g{if(!a._listeners)return;let s=a._listeners.length;for(;s-- >0;)a._listeners[s](o);a._listeners=null}),this.promise.then=o=>{let s;const c=new Promise(u=>{a.subscribe(u),s=u}).then(o);return c.cancel=function(){a.unsubscribe(s)},c},t(function(s,c,u){a.reason||(a.reason=new Io(s,c,u),n(a.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=a=>{t.abort(a)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new LE(function(o){t=o}),cancel:t}}};function fO(e){return function(n){return e.apply(null,n)}}function hO(e){return ce.isObject(e)&&e.isAxiosError===!0}const cm={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(cm).forEach(([e,t])=>{cm[t]=e});function zE(e){const t=new _i(e),n=dE(_i.prototype.request,t);return ce.extend(n,_i.prototype,t,{allOwnKeys:!0}),ce.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return zE(Ci(e,o))},n}const kt=zE(bl);kt.Axios=_i;kt.CanceledError=Io;kt.CancelToken=dO;kt.isCancel=TE;kt.VERSION=jE;kt.toFormData=Zu;kt.AxiosError=Xe;kt.Cancel=kt.CanceledError;kt.all=function(t){return Promise.all(t)};kt.spread=fO;kt.isAxiosError=hO;kt.mergeConfig=Ci;kt.AxiosHeaders=wn;kt.formToJSON=e=>CE(ce.isHTMLForm(e)?new FormData(e):e);kt.getAdapter=OE.getAdapter;kt.HttpStatusCode=cm;kt.default=kt;const{Axios:R6,AxiosError:A6,CanceledError:D6,isCancel:k6,CancelToken:N6,VERSION:O6,all:j6,Cancel:L6,isAxiosError:z6,spread:M6,toFormData:P6,AxiosHeaders:G6,HttpStatusCode:F6,formToJSON:U6,getAdapter:B6,mergeConfig:I6}=kt,ME="Invalid API Key",PE="API Key required",fr=kt.create({baseURL:iE,headers:{"Content-Type":"application/json"}});fr.interceptors.request.use(e=>{const t=Ye.getState().apiKey;return t&&(e.headers["X-API-Key"]=t),e});fr.interceptors.response.use(e=>e,e=>{var t;throw e.response?new Error(`${e.response.status} ${e.response.statusText} -${JSON.stringify(e.response.data)} -${(t=e.config)==null?void 0:t.url}`):e});const pO=async e=>(await fr.get(`/graphs?label=${e}`)).data,mO=async()=>(await fr.get("/graph/label/list")).data,gO=async()=>{try{return(await fr.get("/health")).data}catch(e){return{status:"error",message:Sr(e)}}},vO=async()=>(await fr.get("/documents")).data,yO=async()=>(await fr.post("/documents/scan")).data,bO=async e=>(await fr.post("/query",e)).data,xO=async(e,t,n)=>{try{let a="";if(await fr.post("/query/stream",e,{responseType:"text",headers:{Accept:"application/x-ndjson"},transformResponse:[o=>{a+=o;const s=a.split(` -`);a=s.pop()||"";for(const c of s)if(c.trim())try{const u=JSON.parse(c);u.response?t(u.response):u.error}catch(u){console.error("Error parsing stream chunk:",u)}return o}]}),a.trim())try{const o=JSON.parse(a);o.response?t(o.response):o.error}catch(o){console.error("Error parsing final chunk:",o)}}catch(a){const o=Sr(a);console.error("Stream request failed:",o)}},wO=async(e,t)=>{const n=new FormData;return n.append("file",e),(await fr.post("/documents/upload",n,{headers:{"Content-Type":"multipart/form-data"},onUploadProgress:t!==void 0?o=>{const s=Math.round(o.loaded*100/o.total);t(s)}:void 0})).data},EO=async()=>(await fr.delete("/documents")).data,SO=Qm()(e=>({health:!0,message:null,messageTitle:null,lastCheckTime:Date.now(),status:null,check:async()=>{const t=await gO();return t.status==="healthy"?(e({health:!0,message:null,messageTitle:null,lastCheckTime:Date.now(),status:t}),!0):(e({health:!1,message:t.message,messageTitle:"Backend Health Check Error!",lastCheckTime:Date.now(),status:null}),!1)},clear:()=>{e({health:!0,message:null,messageTitle:null})},setErrorMessage:(t,n)=>{e({health:!1,message:t,messageTitle:n})}})),En=tg(SO);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const _O=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),GE=(...e)=>e.filter((t,n,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===n).join(" ").trim();/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */var CO={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const TO=w.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:a,className:o="",children:s,iconNode:c,...u},f)=>w.createElement("svg",{ref:f,...CO,width:t,height:t,stroke:e,strokeWidth:a?Number(n)*24/Number(t):n,className:GE("lucide",o),...u},[...c.map(([h,m])=>w.createElement(h,m)),...Array.isArray(s)?s:[s]]));/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ht=(e,t)=>{const n=w.forwardRef(({className:a,...o},s)=>w.createElement(TO,{ref:s,iconNode:t,className:GE(`lucide-${_O(e)}`,a),...o}));return n.displayName=`${e}`,n};/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const RO=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ig=ht("Check",RO);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const AO=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],og=ht("ChevronDown",AO);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const DO=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],FE=ht("ChevronUp",DO);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const kO=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],NO=ht("ChevronsUpDown",kO);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const OO=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],jO=ht("CircleAlert",OO);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const LO=[["path",{d:"m7 21-4.3-4.3c-1-1-1-2.5 0-3.4l9.6-9.6c1-1 2.5-1 3.4 0l5.6 5.6c1 1 1 2.5 0 3.4L13 21",key:"182aya"}],["path",{d:"M22 21H7",key:"t4ddhn"}],["path",{d:"m5 11 9 9",key:"1mo9qw"}]],UE=ht("Eraser",LO);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const zO=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],MO=ht("FileText",zO);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const PO=[["path",{d:"M20 7h-3a2 2 0 0 1-2-2V2",key:"x099mo"}],["path",{d:"M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z",key:"18t6ie"}],["path",{d:"M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8",key:"1nja0z"}]],GO=ht("Files",PO);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const FO=[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["rect",{width:"10",height:"8",x:"7",y:"8",rx:"1",key:"vys8me"}]],UO=ht("Fullscreen",FO);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const BO=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]],IO=ht("Github",BO);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const HO=[["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"19",cy:"5",r:"1",key:"w8mnmm"}],["circle",{cx:"5",cy:"5",r:"1",key:"lttvr7"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}],["circle",{cx:"19",cy:"19",r:"1",key:"shf9b7"}],["circle",{cx:"5",cy:"19",r:"1",key:"bfqh0e"}]],$O=ht("Grip",HO);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const VO=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],BE=ht("LoaderCircle",VO);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const qO=[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]],YO=ht("Loader",qO);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const WO=[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]],XO=ht("Maximize",WO);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const KO=[["path",{d:"M8 3v3a2 2 0 0 1-2 2H3",key:"hohbtr"}],["path",{d:"M21 8h-3a2 2 0 0 1-2-2V3",key:"5jw1f3"}],["path",{d:"M3 16h3a2 2 0 0 1 2 2v3",key:"198tvr"}],["path",{d:"M16 21v-3a2 2 0 0 1 2-2h3",key:"ph8mxp"}]],ZO=ht("Minimize",KO);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const QO=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],JO=ht("Moon",QO);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ej=[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]],tj=ht("Pause",ej);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const nj=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],rj=ht("Play",nj);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const aj=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],ij=ht("RefreshCw",aj);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const oj=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],sj=ht("Search",oj);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const lj=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],cj=ht("Send",lj);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const uj=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],dj=ht("Settings",uj);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const fj=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],hj=ht("Sun",fj);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const pj=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]],um=ht("Upload",pj);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const mj=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],IE=ht("X",mj);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const gj=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],vj=ht("Zap",gj);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const yj=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]],bj=ht("ZoomIn",yj);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const xj=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]],wj=ht("ZoomOut",xj),Ej=()=>{const e=En.use.health(),t=En.use.message(),n=En.use.messageTitle(),[a,o]=w.useState(!1);return w.useEffect(()=>{setTimeout(()=>{o(!0)},50)},[]),x.jsxs(lE,{className:Oe("bg-background/90 absolute top-12 left-1/2 flex w-auto max-w-lg -translate-x-1/2 transform items-center gap-4 shadow-md backdrop-blur-lg transition-all duration-500 ease-in-out",a?"translate-y-0 opacity-100":"-translate-y-20 opacity-0",!e&&"bg-red-700 text-white"),children:[!e&&x.jsx("div",{children:x.jsx(jO,{className:"size-4"})}),x.jsxs("div",{children:[x.jsx(cE,{className:"font-bold",children:n}),x.jsx(uE,{children:t})]})]})};function Sj(e,t){const n=w.createContext(t),a=s=>{const{children:c,...u}=s,f=w.useMemo(()=>u,Object.values(u));return x.jsx(n.Provider,{value:f,children:c})};a.displayName=e+"Provider";function o(s){const c=w.useContext(n);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[a,o]}function Kn(e,t=[]){let n=[];function a(s,c){const u=w.createContext(c),f=n.length;n=[...n,c];const h=g=>{var N;const{scope:y,children:b,...S}=g,E=((N=y==null?void 0:y[e])==null?void 0:N[f])||u,_=w.useMemo(()=>S,Object.values(S));return x.jsx(E.Provider,{value:_,children:b})};h.displayName=s+"Provider";function m(g,y){var E;const b=((E=y==null?void 0:y[e])==null?void 0:E[f])||u,S=w.useContext(b);if(S)return S;if(c!==void 0)return c;throw new Error(`\`${g}\` must be used within \`${s}\``)}return[h,m]}const o=()=>{const s=n.map(c=>w.createContext(c));return function(u){const f=(u==null?void 0:u[e])||s;return w.useMemo(()=>({[`__scope${e}`]:{...u,[e]:f}}),[u,f])}};return o.scopeName=e,[a,_j(o,...t)]}function _j(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const a=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const c=a.reduce((u,{useScope:f,scopeName:h})=>{const g=f(s)[`__scope${h}`];return{...u,...g}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}function C0(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function HE(...e){return t=>{let n=!1;const a=e.map(o=>{const s=C0(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o{},Cj=SD.useId||(()=>{}),Tj=0;function on(e){const[t,n]=w.useState(Cj());return sn(()=>{n(a=>a??String(Tj++))},[e]),t?`radix-${t}`:""}function Zt(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),w.useMemo(()=>(...n)=>{var a;return(a=t.current)==null?void 0:a.call(t,...n)},[])}function aa({prop:e,defaultProp:t,onChange:n=()=>{}}){const[a,o]=Rj({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:a,u=Zt(n),f=w.useCallback(h=>{if(s){const g=typeof h=="function"?h(e):h;g!==e&&u(g)}else o(h)},[s,e,o,u]);return[c,f]}function Rj({defaultProp:e,onChange:t}){const n=w.useState(e),[a]=n,o=w.useRef(a),s=Zt(t);return w.useEffect(()=>{o.current!==a&&(s(a),o.current=a)},[a,o,s]),n}var xl=Y1();const $E=dn(xl);var Ba=w.forwardRef((e,t)=>{const{children:n,...a}=e,o=w.Children.toArray(n),s=o.find(Aj);if(s){const c=s.props.children,u=o.map(f=>f===s?w.Children.count(c)>1?w.Children.only(null):w.isValidElement(c)?c.props.children:null:f);return x.jsx(dm,{...a,ref:t,children:w.isValidElement(c)?w.cloneElement(c,void 0,u):null})}return x.jsx(dm,{...a,ref:t,children:n})});Ba.displayName="Slot";var dm=w.forwardRef((e,t)=>{const{children:n,...a}=e;if(w.isValidElement(n)){const o=kj(n),s=Dj(a,n.props);return n.type!==w.Fragment&&(s.ref=t?HE(t,o):o),w.cloneElement(n,s)}return w.Children.count(n)>1?w.Children.only(null):null});dm.displayName="SlotClone";var sg=({children:e})=>x.jsx(x.Fragment,{children:e});function Aj(e){return w.isValidElement(e)&&e.type===sg}function Dj(e,t){const n={...t};for(const a in t){const o=e[a],s=t[a];/^on[A-Z]/.test(a)?o&&s?n[a]=(...u)=>{s(...u),o(...u)}:o&&(n[a]=o):a==="style"?n[a]={...o,...s}:a==="className"&&(n[a]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function kj(e){var a,o;let t=(a=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Nj=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ie=Nj.reduce((e,t)=>{const n=w.forwardRef((a,o)=>{const{asChild:s,...c}=a,u=s?Ba:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(u,{...c,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Oj(e,t){e&&xl.flushSync(()=>e.dispatchEvent(t))}function jj(e,t=globalThis==null?void 0:globalThis.document){const n=Zt(e);w.useEffect(()=>{const a=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",a,{capture:!0}),()=>t.removeEventListener("keydown",a,{capture:!0})},[n,t])}var Lj="DismissableLayer",fm="dismissableLayer.update",zj="dismissableLayer.pointerDownOutside",Mj="dismissableLayer.focusOutside",T0,VE=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),wl=w.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:c,onDismiss:u,...f}=e,h=w.useContext(VE),[m,g]=w.useState(null),y=(m==null?void 0:m.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,b]=w.useState({}),S=nt(t,R=>g(R)),E=Array.from(h.layers),[_]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),N=E.indexOf(_),C=m?E.indexOf(m):-1,A=h.layersWithOutsidePointerEventsDisabled.size>0,k=C>=N,D=Fj(R=>{const U=R.target,L=[...h.branches].some(I=>I.contains(U));!k||L||(o==null||o(R),c==null||c(R),R.defaultPrevented||u==null||u())},y),M=Uj(R=>{const U=R.target;[...h.branches].some(I=>I.contains(U))||(s==null||s(R),c==null||c(R),R.defaultPrevented||u==null||u())},y);return jj(R=>{C===h.layers.size-1&&(a==null||a(R),!R.defaultPrevented&&u&&(R.preventDefault(),u()))},y),w.useEffect(()=>{if(m)return n&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(T0=y.body.style.pointerEvents,y.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(m)),h.layers.add(m),R0(),()=>{n&&h.layersWithOutsidePointerEventsDisabled.size===1&&(y.body.style.pointerEvents=T0)}},[m,y,n,h]),w.useEffect(()=>()=>{m&&(h.layers.delete(m),h.layersWithOutsidePointerEventsDisabled.delete(m),R0())},[m,h]),w.useEffect(()=>{const R=()=>b({});return document.addEventListener(fm,R),()=>document.removeEventListener(fm,R)},[]),x.jsx(Ie.div,{...f,ref:S,style:{pointerEvents:A?k?"auto":"none":void 0,...e.style},onFocusCapture:Be(e.onFocusCapture,M.onFocusCapture),onBlurCapture:Be(e.onBlurCapture,M.onBlurCapture),onPointerDownCapture:Be(e.onPointerDownCapture,D.onPointerDownCapture)})});wl.displayName=Lj;var Pj="DismissableLayerBranch",Gj=w.forwardRef((e,t)=>{const n=w.useContext(VE),a=w.useRef(null),o=nt(t,a);return w.useEffect(()=>{const s=a.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),x.jsx(Ie.div,{...e,ref:o})});Gj.displayName=Pj;function Fj(e,t=globalThis==null?void 0:globalThis.document){const n=Zt(e),a=w.useRef(!1),o=w.useRef(()=>{});return w.useEffect(()=>{const s=u=>{if(u.target&&!a.current){let f=function(){qE(zj,n,h,{discrete:!0})};const h={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=f,t.addEventListener("click",o.current,{once:!0})):f()}else t.removeEventListener("click",o.current);a.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>a.current=!0}}function Uj(e,t=globalThis==null?void 0:globalThis.document){const n=Zt(e),a=w.useRef(!1);return w.useEffect(()=>{const o=s=>{s.target&&!a.current&&qE(Mj,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>a.current=!0,onBlurCapture:()=>a.current=!1}}function R0(){const e=new CustomEvent(fm);document.dispatchEvent(e)}function qE(e,t,n,{discrete:a}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),a?Oj(o,s):o.dispatchEvent(s)}var Wh="focusScope.autoFocusOnMount",Xh="focusScope.autoFocusOnUnmount",A0={bubbles:!1,cancelable:!0},Bj="FocusScope",ed=w.forwardRef((e,t)=>{const{loop:n=!1,trapped:a=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...c}=e,[u,f]=w.useState(null),h=Zt(o),m=Zt(s),g=w.useRef(null),y=nt(t,E=>f(E)),b=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(a){let E=function(A){if(b.paused||!u)return;const k=A.target;u.contains(k)?g.current=k:Ma(g.current,{select:!0})},_=function(A){if(b.paused||!u)return;const k=A.relatedTarget;k!==null&&(u.contains(k)||Ma(g.current,{select:!0}))},N=function(A){if(document.activeElement===document.body)for(const D of A)D.removedNodes.length>0&&Ma(u)};document.addEventListener("focusin",E),document.addEventListener("focusout",_);const C=new MutationObserver(N);return u&&C.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",E),document.removeEventListener("focusout",_),C.disconnect()}}},[a,u,b.paused]),w.useEffect(()=>{if(u){k0.add(b);const E=document.activeElement;if(!u.contains(E)){const N=new CustomEvent(Wh,A0);u.addEventListener(Wh,h),u.dispatchEvent(N),N.defaultPrevented||(Ij(Yj(YE(u)),{select:!0}),document.activeElement===E&&Ma(u))}return()=>{u.removeEventListener(Wh,h),setTimeout(()=>{const N=new CustomEvent(Xh,A0);u.addEventListener(Xh,m),u.dispatchEvent(N),N.defaultPrevented||Ma(E??document.body,{select:!0}),u.removeEventListener(Xh,m),k0.remove(b)},0)}}},[u,h,m,b]);const S=w.useCallback(E=>{if(!n&&!a||b.paused)return;const _=E.key==="Tab"&&!E.altKey&&!E.ctrlKey&&!E.metaKey,N=document.activeElement;if(_&&N){const C=E.currentTarget,[A,k]=Hj(C);A&&k?!E.shiftKey&&N===k?(E.preventDefault(),n&&Ma(A,{select:!0})):E.shiftKey&&N===A&&(E.preventDefault(),n&&Ma(k,{select:!0})):N===C&&E.preventDefault()}},[n,a,b.paused]);return x.jsx(Ie.div,{tabIndex:-1,...c,ref:y,onKeyDown:S})});ed.displayName=Bj;function Ij(e,{select:t=!1}={}){const n=document.activeElement;for(const a of e)if(Ma(a,{select:t}),document.activeElement!==n)return}function Hj(e){const t=YE(e),n=D0(t,e),a=D0(t.reverse(),e);return[n,a]}function YE(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{const o=a.tagName==="INPUT"&&a.type==="hidden";return a.disabled||a.hidden||o?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function D0(e,t){for(const n of e)if(!$j(n,{upTo:t}))return n}function $j(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Vj(e){return e instanceof HTMLInputElement&&"select"in e}function Ma(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Vj(e)&&t&&e.select()}}var k0=qj();function qj(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=N0(e,t),e.unshift(t)},remove(t){var n;e=N0(e,t),(n=e[0])==null||n.resume()}}}function N0(e,t){const n=[...e],a=n.indexOf(t);return a!==-1&&n.splice(a,1),n}function Yj(e){return e.filter(t=>t.tagName!=="A")}var Wj="Portal",td=w.forwardRef((e,t)=>{var u;const{container:n,...a}=e,[o,s]=w.useState(!1);sn(()=>s(!0),[]);const c=n||o&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return c?$E.createPortal(x.jsx(Ie.div,{...a,ref:t}),c):null});td.displayName=Wj;function Xj(e,t){return w.useReducer((n,a)=>t[n][a]??n,e)}var zn=e=>{const{present:t,children:n}=e,a=Kj(t),o=typeof n=="function"?n({present:a.isPresent}):w.Children.only(n),s=nt(a.ref,Zj(o));return typeof n=="function"||a.isPresent?w.cloneElement(o,{ref:s}):null};zn.displayName="Presence";function Kj(e){const[t,n]=w.useState(),a=w.useRef({}),o=w.useRef(e),s=w.useRef("none"),c=e?"mounted":"unmounted",[u,f]=Xj(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const h=Bc(a.current);s.current=u==="mounted"?h:"none"},[u]),sn(()=>{const h=a.current,m=o.current;if(m!==e){const y=s.current,b=Bc(h);e?f("MOUNT"):b==="none"||(h==null?void 0:h.display)==="none"?f("UNMOUNT"):f(m&&y!==b?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,f]),sn(()=>{if(t){let h;const m=t.ownerDocument.defaultView??window,g=b=>{const E=Bc(a.current).includes(b.animationName);if(b.target===t&&E&&(f("ANIMATION_END"),!o.current)){const _=t.style.animationFillMode;t.style.animationFillMode="forwards",h=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=_)})}},y=b=>{b.target===t&&(s.current=Bc(a.current))};return t.addEventListener("animationstart",y),t.addEventListener("animationcancel",g),t.addEventListener("animationend",g),()=>{m.clearTimeout(h),t.removeEventListener("animationstart",y),t.removeEventListener("animationcancel",g),t.removeEventListener("animationend",g)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:w.useCallback(h=>{h&&(a.current=getComputedStyle(h)),n(h)},[])}}function Bc(e){return(e==null?void 0:e.animationName)||"none"}function Zj(e){var a,o;let t=(a=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Kh=0;function lg(){w.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??O0()),document.body.insertAdjacentElement("beforeend",e[1]??O0()),Kh++,()=>{Kh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Kh--}},[])}function O0(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var wr=function(){return wr=Object.assign||function(t){for(var n,a=1,o=arguments.length;a"u")return pL;var t=mL(e),n=document.documentElement.clientWidth,a=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,a-n+t[2]-t[0])}},vL=ZE(),Ro="data-scroll-locked",yL=function(e,t,n,a){var o=e.left,s=e.top,c=e.right,u=e.gap;return n===void 0&&(n="margin"),` - .`.concat(Jj,` { - overflow: hidden `).concat(a,`; - padding-right: `).concat(u,"px ").concat(a,`; - } - body[`).concat(Ro,`] { - overflow: hidden `).concat(a,`; - overscroll-behavior: contain; - `).concat([t&&"position: relative ".concat(a,";"),n==="margin"&&` - padding-left: `.concat(o,`px; - padding-top: `).concat(s,`px; - padding-right: `).concat(c,`px; - margin-left:0; - margin-top:0; - margin-right: `).concat(u,"px ").concat(a,`; - `),n==="padding"&&"padding-right: ".concat(u,"px ").concat(a,";")].filter(Boolean).join(""),` - } - - .`).concat(fu,` { - right: `).concat(u,"px ").concat(a,`; - } - - .`).concat(hu,` { - margin-right: `).concat(u,"px ").concat(a,`; - } - - .`).concat(fu," .").concat(fu,` { - right: 0 `).concat(a,`; - } - - .`).concat(hu," .").concat(hu,` { - margin-right: 0 `).concat(a,`; - } - - body[`).concat(Ro,`] { - `).concat(eL,": ").concat(u,`px; - } -`)},L0=function(){var e=parseInt(document.body.getAttribute(Ro)||"0",10);return isFinite(e)?e:0},bL=function(){w.useEffect(function(){return document.body.setAttribute(Ro,(L0()+1).toString()),function(){var e=L0()-1;e<=0?document.body.removeAttribute(Ro):document.body.setAttribute(Ro,e.toString())}},[])},xL=function(e){var t=e.noRelative,n=e.noImportant,a=e.gapMode,o=a===void 0?"margin":a;bL();var s=w.useMemo(function(){return gL(o)},[o]);return w.createElement(vL,{styles:yL(s,!t,o,n?"":"!important")})},hm=!1;if(typeof window<"u")try{var Ic=Object.defineProperty({},"passive",{get:function(){return hm=!0,!0}});window.addEventListener("test",Ic,Ic),window.removeEventListener("test",Ic,Ic)}catch{hm=!1}var bo=hm?{passive:!1}:!1,wL=function(e){return e.tagName==="TEXTAREA"},QE=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!wL(e)&&n[t]==="visible")},EL=function(e){return QE(e,"overflowY")},SL=function(e){return QE(e,"overflowX")},z0=function(e,t){var n=t.ownerDocument,a=t;do{typeof ShadowRoot<"u"&&a instanceof ShadowRoot&&(a=a.host);var o=JE(e,a);if(o){var s=eS(e,a),c=s[1],u=s[2];if(c>u)return!0}a=a.parentNode}while(a&&a!==n.body);return!1},_L=function(e){var t=e.scrollTop,n=e.scrollHeight,a=e.clientHeight;return[t,n,a]},CL=function(e){var t=e.scrollLeft,n=e.scrollWidth,a=e.clientWidth;return[t,n,a]},JE=function(e,t){return e==="v"?EL(t):SL(t)},eS=function(e,t){return e==="v"?_L(t):CL(t)},TL=function(e,t){return e==="h"&&t==="rtl"?-1:1},RL=function(e,t,n,a,o){var s=TL(e,window.getComputedStyle(t).direction),c=s*a,u=n.target,f=t.contains(u),h=!1,m=c>0,g=0,y=0;do{var b=eS(e,u),S=b[0],E=b[1],_=b[2],N=E-_-s*S;(S||N)&&JE(e,u)&&(g+=N,y+=S),u instanceof ShadowRoot?u=u.host:u=u.parentNode}while(!f&&u!==document.body||f&&(t.contains(u)||t===u));return(m&&Math.abs(g)<1||!m&&Math.abs(y)<1)&&(h=!0),h},Hc=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},M0=function(e){return[e.deltaX,e.deltaY]},P0=function(e){return e&&"current"in e?e.current:e},AL=function(e,t){return e[0]===t[0]&&e[1]===t[1]},DL=function(e){return` - .block-interactivity-`.concat(e,` {pointer-events: none;} - .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},kL=0,xo=[];function NL(e){var t=w.useRef([]),n=w.useRef([0,0]),a=w.useRef(),o=w.useState(kL++)[0],s=w.useState(ZE)[0],c=w.useRef(e);w.useEffect(function(){c.current=e},[e]),w.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var E=Qj([e.lockRef.current],(e.shards||[]).map(P0),!0).filter(Boolean);return E.forEach(function(_){return _.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),E.forEach(function(_){return _.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var u=w.useCallback(function(E,_){if("touches"in E&&E.touches.length===2||E.type==="wheel"&&E.ctrlKey)return!c.current.allowPinchZoom;var N=Hc(E),C=n.current,A="deltaX"in E?E.deltaX:C[0]-N[0],k="deltaY"in E?E.deltaY:C[1]-N[1],D,M=E.target,R=Math.abs(A)>Math.abs(k)?"h":"v";if("touches"in E&&R==="h"&&M.type==="range")return!1;var U=z0(R,M);if(!U)return!0;if(U?D=R:(D=R==="v"?"h":"v",U=z0(R,M)),!U)return!1;if(!a.current&&"changedTouches"in E&&(A||k)&&(a.current=D),!D)return!0;var L=a.current||D;return RL(L,_,E,L==="h"?A:k)},[]),f=w.useCallback(function(E){var _=E;if(!(!xo.length||xo[xo.length-1]!==s)){var N="deltaY"in _?M0(_):Hc(_),C=t.current.filter(function(D){return D.name===_.type&&(D.target===_.target||_.target===D.shadowParent)&&AL(D.delta,N)})[0];if(C&&C.should){_.cancelable&&_.preventDefault();return}if(!C){var A=(c.current.shards||[]).map(P0).filter(Boolean).filter(function(D){return D.contains(_.target)}),k=A.length>0?u(_,A[0]):!c.current.noIsolation;k&&_.cancelable&&_.preventDefault()}}},[]),h=w.useCallback(function(E,_,N,C){var A={name:E,delta:_,target:N,should:C,shadowParent:OL(N)};t.current.push(A),setTimeout(function(){t.current=t.current.filter(function(k){return k!==A})},1)},[]),m=w.useCallback(function(E){n.current=Hc(E),a.current=void 0},[]),g=w.useCallback(function(E){h(E.type,M0(E),E.target,u(E,e.lockRef.current))},[]),y=w.useCallback(function(E){h(E.type,Hc(E),E.target,u(E,e.lockRef.current))},[]);w.useEffect(function(){return xo.push(s),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:y}),document.addEventListener("wheel",f,bo),document.addEventListener("touchmove",f,bo),document.addEventListener("touchstart",m,bo),function(){xo=xo.filter(function(E){return E!==s}),document.removeEventListener("wheel",f,bo),document.removeEventListener("touchmove",f,bo),document.removeEventListener("touchstart",m,bo)}},[]);var b=e.removeScrollBar,S=e.inert;return w.createElement(w.Fragment,null,S?w.createElement(s,{styles:DL(o)}):null,b?w.createElement(xL,{gapMode:e.gapMode}):null)}function OL(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const jL=sL(KE,NL);var rd=w.forwardRef(function(e,t){return w.createElement(nd,wr({},e,{ref:t,sideCar:jL}))});rd.classNames=nd.classNames;var LL=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},wo=new WeakMap,$c=new WeakMap,Vc={},ep=0,tS=function(e){return e&&(e.host||tS(e.parentNode))},zL=function(e,t){return t.map(function(n){if(e.contains(n))return n;var a=tS(n);return a&&e.contains(a)?a:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},ML=function(e,t,n,a){var o=zL(t,Array.isArray(e)?e:[e]);Vc[n]||(Vc[n]=new WeakMap);var s=Vc[n],c=[],u=new Set,f=new Set(o),h=function(g){!g||u.has(g)||(u.add(g),h(g.parentNode))};o.forEach(h);var m=function(g){!g||f.has(g)||Array.prototype.forEach.call(g.children,function(y){if(u.has(y))m(y);else try{var b=y.getAttribute(a),S=b!==null&&b!=="false",E=(wo.get(y)||0)+1,_=(s.get(y)||0)+1;wo.set(y,E),s.set(y,_),c.push(y),E===1&&S&&$c.set(y,!0),_===1&&y.setAttribute(n,"true"),S||y.setAttribute(a,"true")}catch(N){console.error("aria-hidden: cannot operate on ",y,N)}})};return m(t),u.clear(),ep++,function(){c.forEach(function(g){var y=wo.get(g)-1,b=s.get(g)-1;wo.set(g,y),s.set(g,b),y||($c.has(g)||g.removeAttribute(a),$c.delete(g)),b||g.removeAttribute(n)}),ep--,ep||(wo=new WeakMap,wo=new WeakMap,$c=new WeakMap,Vc={})}},cg=function(e,t,n){n===void 0&&(n="data-aria-hidden");var a=Array.from(Array.isArray(e)?e:[e]),o=LL(e);return o?(a.push.apply(a,Array.from(o.querySelectorAll("[aria-live]"))),ML(a,o,n,"aria-hidden")):function(){return null}},ug="Dialog",[nS,rS]=Kn(ug),[PL,hr]=nS(ug),aS=e=>{const{__scopeDialog:t,children:n,open:a,defaultOpen:o,onOpenChange:s,modal:c=!0}=e,u=w.useRef(null),f=w.useRef(null),[h=!1,m]=aa({prop:a,defaultProp:o,onChange:s});return x.jsx(PL,{scope:t,triggerRef:u,contentRef:f,contentId:on(),titleId:on(),descriptionId:on(),open:h,onOpenChange:m,onOpenToggle:w.useCallback(()=>m(g=>!g),[m]),modal:c,children:n})};aS.displayName=ug;var iS="DialogTrigger",oS=w.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,o=hr(iS,n),s=nt(t,o.triggerRef);return x.jsx(Ie.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":hg(o.open),...a,ref:s,onClick:Be(e.onClick,o.onOpenToggle)})});oS.displayName=iS;var dg="DialogPortal",[GL,sS]=nS(dg,{forceMount:void 0}),lS=e=>{const{__scopeDialog:t,forceMount:n,children:a,container:o}=e,s=hr(dg,t);return x.jsx(GL,{scope:t,forceMount:n,children:w.Children.map(a,c=>x.jsx(zn,{present:n||s.open,children:x.jsx(td,{asChild:!0,container:o,children:c})}))})};lS.displayName=dg;var Ru="DialogOverlay",cS=w.forwardRef((e,t)=>{const n=sS(Ru,e.__scopeDialog),{forceMount:a=n.forceMount,...o}=e,s=hr(Ru,e.__scopeDialog);return s.modal?x.jsx(zn,{present:a||s.open,children:x.jsx(FL,{...o,ref:t})}):null});cS.displayName=Ru;var FL=w.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,o=hr(Ru,n);return x.jsx(rd,{as:Ba,allowPinchZoom:!0,shards:[o.contentRef],children:x.jsx(Ie.div,{"data-state":hg(o.open),...a,ref:t,style:{pointerEvents:"auto",...a.style}})})}),Ti="DialogContent",uS=w.forwardRef((e,t)=>{const n=sS(Ti,e.__scopeDialog),{forceMount:a=n.forceMount,...o}=e,s=hr(Ti,e.__scopeDialog);return x.jsx(zn,{present:a||s.open,children:s.modal?x.jsx(UL,{...o,ref:t}):x.jsx(BL,{...o,ref:t})})});uS.displayName=Ti;var UL=w.forwardRef((e,t)=>{const n=hr(Ti,e.__scopeDialog),a=w.useRef(null),o=nt(t,n.contentRef,a);return w.useEffect(()=>{const s=a.current;if(s)return cg(s)},[]),x.jsx(dS,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Be(e.onCloseAutoFocus,s=>{var c;s.preventDefault(),(c=n.triggerRef.current)==null||c.focus()}),onPointerDownOutside:Be(e.onPointerDownOutside,s=>{const c=s.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0;(c.button===2||u)&&s.preventDefault()}),onFocusOutside:Be(e.onFocusOutside,s=>s.preventDefault())})}),BL=w.forwardRef((e,t)=>{const n=hr(Ti,e.__scopeDialog),a=w.useRef(!1),o=w.useRef(!1);return x.jsx(dS,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var c,u;(c=e.onCloseAutoFocus)==null||c.call(e,s),s.defaultPrevented||(a.current||(u=n.triggerRef.current)==null||u.focus(),s.preventDefault()),a.current=!1,o.current=!1},onInteractOutside:s=>{var f,h;(f=e.onInteractOutside)==null||f.call(e,s),s.defaultPrevented||(a.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=s.target;((h=n.triggerRef.current)==null?void 0:h.contains(c))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),dS=w.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:s,...c}=e,u=hr(Ti,n),f=w.useRef(null),h=nt(t,f);return lg(),x.jsxs(x.Fragment,{children:[x.jsx(ed,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:o,onUnmountAutoFocus:s,children:x.jsx(wl,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":hg(u.open),...c,ref:h,onDismiss:()=>u.onOpenChange(!1)})}),x.jsxs(x.Fragment,{children:[x.jsx(HL,{titleId:u.titleId}),x.jsx(VL,{contentRef:f,descriptionId:u.descriptionId})]})]})}),fg="DialogTitle",fS=w.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,o=hr(fg,n);return x.jsx(Ie.h2,{id:o.titleId,...a,ref:t})});fS.displayName=fg;var hS="DialogDescription",pS=w.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,o=hr(hS,n);return x.jsx(Ie.p,{id:o.descriptionId,...a,ref:t})});pS.displayName=hS;var mS="DialogClose",gS=w.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,o=hr(mS,n);return x.jsx(Ie.button,{type:"button",...a,ref:t,onClick:Be(e.onClick,()=>o.onOpenChange(!1))})});gS.displayName=mS;function hg(e){return e?"open":"closed"}var vS="DialogTitleWarning",[IL,yS]=Sj(vS,{contentName:Ti,titleName:fg,docsSlug:"dialog"}),HL=({titleId:e})=>{const t=yS(vS),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. - -If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. - -For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return w.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},$L="DialogDescriptionWarning",VL=({contentRef:e,descriptionId:t})=>{const a=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${yS($L).contentName}}.`;return w.useEffect(()=>{var s;const o=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(a))},[a,e,t]),null},pg=aS,bS=oS,mg=lS,ad=cS,id=uS,gg=fS,vg=pS,yg=gS,xS="AlertDialog",[qL,H6]=Kn(xS,[rS]),sa=rS(),wS=e=>{const{__scopeAlertDialog:t,...n}=e,a=sa(t);return x.jsx(pg,{...a,...n,modal:!0})};wS.displayName=xS;var YL="AlertDialogTrigger",WL=w.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...a}=e,o=sa(n);return x.jsx(bS,{...o,...a,ref:t})});WL.displayName=YL;var XL="AlertDialogPortal",ES=e=>{const{__scopeAlertDialog:t,...n}=e,a=sa(t);return x.jsx(mg,{...a,...n})};ES.displayName=XL;var KL="AlertDialogOverlay",SS=w.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...a}=e,o=sa(n);return x.jsx(ad,{...o,...a,ref:t})});SS.displayName=KL;var Ao="AlertDialogContent",[ZL,QL]=qL(Ao),_S=w.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:a,...o}=e,s=sa(n),c=w.useRef(null),u=nt(t,c),f=w.useRef(null);return x.jsx(IL,{contentName:Ao,titleName:CS,docsSlug:"alert-dialog",children:x.jsx(ZL,{scope:n,cancelRef:f,children:x.jsxs(id,{role:"alertdialog",...s,...o,ref:u,onOpenAutoFocus:Be(o.onOpenAutoFocus,h=>{var m;h.preventDefault(),(m=f.current)==null||m.focus({preventScroll:!0})}),onPointerDownOutside:h=>h.preventDefault(),onInteractOutside:h=>h.preventDefault(),children:[x.jsx(sg,{children:a}),x.jsx(ez,{contentRef:c})]})})})});_S.displayName=Ao;var CS="AlertDialogTitle",TS=w.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...a}=e,o=sa(n);return x.jsx(gg,{...o,...a,ref:t})});TS.displayName=CS;var RS="AlertDialogDescription",AS=w.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...a}=e,o=sa(n);return x.jsx(vg,{...o,...a,ref:t})});AS.displayName=RS;var JL="AlertDialogAction",DS=w.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...a}=e,o=sa(n);return x.jsx(yg,{...o,...a,ref:t})});DS.displayName=JL;var kS="AlertDialogCancel",NS=w.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...a}=e,{cancelRef:o}=QL(kS,n),s=sa(n),c=nt(t,o);return x.jsx(yg,{...s,...a,ref:c})});NS.displayName=kS;var ez=({contentRef:e})=>{const t=`\`${Ao}\` requires a description for the component to be accessible for screen reader users. - -You can add a description to the \`${Ao}\` by passing a \`${RS}\` component as a child, which also benefits sighted users by adding visible context to the dialog. - -Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Ao}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component. - -For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return w.useEffect(()=>{var a;document.getElementById((a=e.current)==null?void 0:a.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},tz=wS,nz=ES,OS=SS,jS=_S,LS=DS,zS=NS,MS=TS,PS=AS;const rz=["top","right","bottom","left"],Ia=Math.min,On=Math.max,Au=Math.round,qc=Math.floor,Cr=e=>({x:e,y:e}),az={left:"right",right:"left",bottom:"top",top:"bottom"},iz={start:"end",end:"start"};function pm(e,t,n){return On(e,Ia(t,n))}function ia(e,t){return typeof e=="function"?e(t):e}function oa(e){return e.split("-")[0]}function Ho(e){return e.split("-")[1]}function bg(e){return e==="x"?"y":"x"}function xg(e){return e==="y"?"height":"width"}function Ha(e){return["top","bottom"].includes(oa(e))?"y":"x"}function wg(e){return bg(Ha(e))}function oz(e,t,n){n===void 0&&(n=!1);const a=Ho(e),o=wg(e),s=xg(o);let c=o==="x"?a===(n?"end":"start")?"right":"left":a==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(c=Du(c)),[c,Du(c)]}function sz(e){const t=Du(e);return[mm(e),t,mm(t)]}function mm(e){return e.replace(/start|end/g,t=>iz[t])}function lz(e,t,n){const a=["left","right"],o=["right","left"],s=["top","bottom"],c=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:a:t?a:o;case"left":case"right":return t?s:c;default:return[]}}function cz(e,t,n,a){const o=Ho(e);let s=lz(oa(e),n==="start",a);return o&&(s=s.map(c=>c+"-"+o),t&&(s=s.concat(s.map(mm)))),s}function Du(e){return e.replace(/left|right|bottom|top/g,t=>az[t])}function uz(e){return{top:0,right:0,bottom:0,left:0,...e}}function GS(e){return typeof e!="number"?uz(e):{top:e,right:e,bottom:e,left:e}}function ku(e){const{x:t,y:n,width:a,height:o}=e;return{width:a,height:o,top:n,left:t,right:t+a,bottom:n+o,x:t,y:n}}function G0(e,t,n){let{reference:a,floating:o}=e;const s=Ha(t),c=wg(t),u=xg(c),f=oa(t),h=s==="y",m=a.x+a.width/2-o.width/2,g=a.y+a.height/2-o.height/2,y=a[u]/2-o[u]/2;let b;switch(f){case"top":b={x:m,y:a.y-o.height};break;case"bottom":b={x:m,y:a.y+a.height};break;case"right":b={x:a.x+a.width,y:g};break;case"left":b={x:a.x-o.width,y:g};break;default:b={x:a.x,y:a.y}}switch(Ho(t)){case"start":b[c]-=y*(n&&h?-1:1);break;case"end":b[c]+=y*(n&&h?-1:1);break}return b}const dz=async(e,t,n)=>{const{placement:a="bottom",strategy:o="absolute",middleware:s=[],platform:c}=n,u=s.filter(Boolean),f=await(c.isRTL==null?void 0:c.isRTL(t));let h=await c.getElementRects({reference:e,floating:t,strategy:o}),{x:m,y:g}=G0(h,a,f),y=a,b={},S=0;for(let E=0;E({name:"arrow",options:e,async fn(t){const{x:n,y:a,placement:o,rects:s,platform:c,elements:u,middlewareData:f}=t,{element:h,padding:m=0}=ia(e,t)||{};if(h==null)return{};const g=GS(m),y={x:n,y:a},b=wg(o),S=xg(b),E=await c.getDimensions(h),_=b==="y",N=_?"top":"left",C=_?"bottom":"right",A=_?"clientHeight":"clientWidth",k=s.reference[S]+s.reference[b]-y[b]-s.floating[S],D=y[b]-s.reference[b],M=await(c.getOffsetParent==null?void 0:c.getOffsetParent(h));let R=M?M[A]:0;(!R||!await(c.isElement==null?void 0:c.isElement(M)))&&(R=u.floating[A]||s.floating[S]);const U=k/2-D/2,L=R/2-E[S]/2-1,I=Ia(g[N],L),q=Ia(g[C],L),Y=I,B=R-E[S]-q,X=R/2-E[S]/2+U,ne=pm(Y,X,B),F=!f.arrow&&Ho(o)!=null&&X!==ne&&s.reference[S]/2-(XX<=0)){var q,Y;const X=(((q=s.flip)==null?void 0:q.index)||0)+1,ne=R[X];if(ne)return{data:{index:X,overflows:I},reset:{placement:ne}};let F=(Y=I.filter(z=>z.overflows[0]<=0).sort((z,j)=>z.overflows[1]-j.overflows[1])[0])==null?void 0:Y.placement;if(!F)switch(b){case"bestFit":{var B;const z=(B=I.filter(j=>{if(M){const K=Ha(j.placement);return K===C||K==="y"}return!0}).map(j=>[j.placement,j.overflows.filter(K=>K>0).reduce((K,G)=>K+G,0)]).sort((j,K)=>j[1]-K[1])[0])==null?void 0:B[0];z&&(F=z);break}case"initialPlacement":F=u;break}if(o!==F)return{reset:{placement:F}}}return{}}}};function F0(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function U0(e){return rz.some(t=>e[t]>=0)}const pz=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:a="referenceHidden",...o}=ia(e,t);switch(a){case"referenceHidden":{const s=await cl(t,{...o,elementContext:"reference"}),c=F0(s,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:U0(c)}}}case"escaped":{const s=await cl(t,{...o,altBoundary:!0}),c=F0(s,n.floating);return{data:{escapedOffsets:c,escaped:U0(c)}}}default:return{}}}}};async function mz(e,t){const{placement:n,platform:a,elements:o}=e,s=await(a.isRTL==null?void 0:a.isRTL(o.floating)),c=oa(n),u=Ho(n),f=Ha(n)==="y",h=["left","top"].includes(c)?-1:1,m=s&&f?-1:1,g=ia(t,e);let{mainAxis:y,crossAxis:b,alignmentAxis:S}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return u&&typeof S=="number"&&(b=u==="end"?S*-1:S),f?{x:b*m,y:y*h}:{x:y*h,y:b*m}}const gz=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,a;const{x:o,y:s,placement:c,middlewareData:u}=t,f=await mz(t,e);return c===((n=u.offset)==null?void 0:n.placement)&&(a=u.arrow)!=null&&a.alignmentOffset?{}:{x:o+f.x,y:s+f.y,data:{...f,placement:c}}}}},vz=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:a,placement:o}=t,{mainAxis:s=!0,crossAxis:c=!1,limiter:u={fn:_=>{let{x:N,y:C}=_;return{x:N,y:C}}},...f}=ia(e,t),h={x:n,y:a},m=await cl(t,f),g=Ha(oa(o)),y=bg(g);let b=h[y],S=h[g];if(s){const _=y==="y"?"top":"left",N=y==="y"?"bottom":"right",C=b+m[_],A=b-m[N];b=pm(C,b,A)}if(c){const _=g==="y"?"top":"left",N=g==="y"?"bottom":"right",C=S+m[_],A=S-m[N];S=pm(C,S,A)}const E=u.fn({...t,[y]:b,[g]:S});return{...E,data:{x:E.x-n,y:E.y-a,enabled:{[y]:s,[g]:c}}}}}},yz=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:a,placement:o,rects:s,middlewareData:c}=t,{offset:u=0,mainAxis:f=!0,crossAxis:h=!0}=ia(e,t),m={x:n,y:a},g=Ha(o),y=bg(g);let b=m[y],S=m[g];const E=ia(u,t),_=typeof E=="number"?{mainAxis:E,crossAxis:0}:{mainAxis:0,crossAxis:0,...E};if(f){const A=y==="y"?"height":"width",k=s.reference[y]-s.floating[A]+_.mainAxis,D=s.reference[y]+s.reference[A]-_.mainAxis;bD&&(b=D)}if(h){var N,C;const A=y==="y"?"width":"height",k=["top","left"].includes(oa(o)),D=s.reference[g]-s.floating[A]+(k&&((N=c.offset)==null?void 0:N[g])||0)+(k?0:_.crossAxis),M=s.reference[g]+s.reference[A]+(k?0:((C=c.offset)==null?void 0:C[g])||0)-(k?_.crossAxis:0);SM&&(S=M)}return{[y]:b,[g]:S}}}},bz=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,a;const{placement:o,rects:s,platform:c,elements:u}=t,{apply:f=()=>{},...h}=ia(e,t),m=await cl(t,h),g=oa(o),y=Ho(o),b=Ha(o)==="y",{width:S,height:E}=s.floating;let _,N;g==="top"||g==="bottom"?(_=g,N=y===(await(c.isRTL==null?void 0:c.isRTL(u.floating))?"start":"end")?"left":"right"):(N=g,_=y==="end"?"top":"bottom");const C=E-m.top-m.bottom,A=S-m.left-m.right,k=Ia(E-m[_],C),D=Ia(S-m[N],A),M=!t.middlewareData.shift;let R=k,U=D;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(U=A),(a=t.middlewareData.shift)!=null&&a.enabled.y&&(R=C),M&&!y){const I=On(m.left,0),q=On(m.right,0),Y=On(m.top,0),B=On(m.bottom,0);b?U=S-2*(I!==0||q!==0?I+q:On(m.left,m.right)):R=E-2*(Y!==0||B!==0?Y+B:On(m.top,m.bottom))}await f({...t,availableWidth:U,availableHeight:R});const L=await c.getDimensions(u.floating);return S!==L.width||E!==L.height?{reset:{rects:!0}}:{}}}};function od(){return typeof window<"u"}function $o(e){return FS(e)?(e.nodeName||"").toLowerCase():"#document"}function Ln(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Rr(e){var t;return(t=(FS(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function FS(e){return od()?e instanceof Node||e instanceof Ln(e).Node:!1}function cr(e){return od()?e instanceof Element||e instanceof Ln(e).Element:!1}function Tr(e){return od()?e instanceof HTMLElement||e instanceof Ln(e).HTMLElement:!1}function B0(e){return!od()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ln(e).ShadowRoot}function El(e){const{overflow:t,overflowX:n,overflowY:a,display:o}=ur(e);return/auto|scroll|overlay|hidden|clip/.test(t+a+n)&&!["inline","contents"].includes(o)}function xz(e){return["table","td","th"].includes($o(e))}function sd(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Eg(e){const t=Sg(),n=cr(e)?ur(e):e;return["transform","translate","scale","rotate","perspective"].some(a=>n[a]?n[a]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(a=>(n.willChange||"").includes(a))||["paint","layout","strict","content"].some(a=>(n.contain||"").includes(a))}function wz(e){let t=$a(e);for(;Tr(t)&&!Oo(t);){if(Eg(t))return t;if(sd(t))return null;t=$a(t)}return null}function Sg(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Oo(e){return["html","body","#document"].includes($o(e))}function ur(e){return Ln(e).getComputedStyle(e)}function ld(e){return cr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function $a(e){if($o(e)==="html")return e;const t=e.assignedSlot||e.parentNode||B0(e)&&e.host||Rr(e);return B0(t)?t.host:t}function US(e){const t=$a(e);return Oo(t)?e.ownerDocument?e.ownerDocument.body:e.body:Tr(t)&&El(t)?t:US(t)}function ul(e,t,n){var a;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=US(e),s=o===((a=e.ownerDocument)==null?void 0:a.body),c=Ln(o);if(s){const u=gm(c);return t.concat(c,c.visualViewport||[],El(o)?o:[],u&&n?ul(u):[])}return t.concat(o,ul(o,[],n))}function gm(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function BS(e){const t=ur(e);let n=parseFloat(t.width)||0,a=parseFloat(t.height)||0;const o=Tr(e),s=o?e.offsetWidth:n,c=o?e.offsetHeight:a,u=Au(n)!==s||Au(a)!==c;return u&&(n=s,a=c),{width:n,height:a,$:u}}function _g(e){return cr(e)?e:e.contextElement}function Do(e){const t=_g(e);if(!Tr(t))return Cr(1);const n=t.getBoundingClientRect(),{width:a,height:o,$:s}=BS(t);let c=(s?Au(n.width):n.width)/a,u=(s?Au(n.height):n.height)/o;return(!c||!Number.isFinite(c))&&(c=1),(!u||!Number.isFinite(u))&&(u=1),{x:c,y:u}}const Ez=Cr(0);function IS(e){const t=Ln(e);return!Sg()||!t.visualViewport?Ez:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Sz(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ln(e)?!1:t}function Ri(e,t,n,a){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=_g(e);let c=Cr(1);t&&(a?cr(a)&&(c=Do(a)):c=Do(e));const u=Sz(s,n,a)?IS(s):Cr(0);let f=(o.left+u.x)/c.x,h=(o.top+u.y)/c.y,m=o.width/c.x,g=o.height/c.y;if(s){const y=Ln(s),b=a&&cr(a)?Ln(a):a;let S=y,E=gm(S);for(;E&&a&&b!==S;){const _=Do(E),N=E.getBoundingClientRect(),C=ur(E),A=N.left+(E.clientLeft+parseFloat(C.paddingLeft))*_.x,k=N.top+(E.clientTop+parseFloat(C.paddingTop))*_.y;f*=_.x,h*=_.y,m*=_.x,g*=_.y,f+=A,h+=k,S=Ln(E),E=gm(S)}}return ku({width:m,height:g,x:f,y:h})}function Cg(e,t){const n=ld(e).scrollLeft;return t?t.left+n:Ri(Rr(e)).left+n}function HS(e,t,n){n===void 0&&(n=!1);const a=e.getBoundingClientRect(),o=a.left+t.scrollLeft-(n?0:Cg(e,a)),s=a.top+t.scrollTop;return{x:o,y:s}}function _z(e){let{elements:t,rect:n,offsetParent:a,strategy:o}=e;const s=o==="fixed",c=Rr(a),u=t?sd(t.floating):!1;if(a===c||u&&s)return n;let f={scrollLeft:0,scrollTop:0},h=Cr(1);const m=Cr(0),g=Tr(a);if((g||!g&&!s)&&(($o(a)!=="body"||El(c))&&(f=ld(a)),Tr(a))){const b=Ri(a);h=Do(a),m.x=b.x+a.clientLeft,m.y=b.y+a.clientTop}const y=c&&!g&&!s?HS(c,f,!0):Cr(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-f.scrollLeft*h.x+m.x+y.x,y:n.y*h.y-f.scrollTop*h.y+m.y+y.y}}function Cz(e){return Array.from(e.getClientRects())}function Tz(e){const t=Rr(e),n=ld(e),a=e.ownerDocument.body,o=On(t.scrollWidth,t.clientWidth,a.scrollWidth,a.clientWidth),s=On(t.scrollHeight,t.clientHeight,a.scrollHeight,a.clientHeight);let c=-n.scrollLeft+Cg(e);const u=-n.scrollTop;return ur(a).direction==="rtl"&&(c+=On(t.clientWidth,a.clientWidth)-o),{width:o,height:s,x:c,y:u}}function Rz(e,t){const n=Ln(e),a=Rr(e),o=n.visualViewport;let s=a.clientWidth,c=a.clientHeight,u=0,f=0;if(o){s=o.width,c=o.height;const h=Sg();(!h||h&&t==="fixed")&&(u=o.offsetLeft,f=o.offsetTop)}return{width:s,height:c,x:u,y:f}}function Az(e,t){const n=Ri(e,!0,t==="fixed"),a=n.top+e.clientTop,o=n.left+e.clientLeft,s=Tr(e)?Do(e):Cr(1),c=e.clientWidth*s.x,u=e.clientHeight*s.y,f=o*s.x,h=a*s.y;return{width:c,height:u,x:f,y:h}}function I0(e,t,n){let a;if(t==="viewport")a=Rz(e,n);else if(t==="document")a=Tz(Rr(e));else if(cr(t))a=Az(t,n);else{const o=IS(e);a={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ku(a)}function $S(e,t){const n=$a(e);return n===t||!cr(n)||Oo(n)?!1:ur(n).position==="fixed"||$S(n,t)}function Dz(e,t){const n=t.get(e);if(n)return n;let a=ul(e,[],!1).filter(u=>cr(u)&&$o(u)!=="body"),o=null;const s=ur(e).position==="fixed";let c=s?$a(e):e;for(;cr(c)&&!Oo(c);){const u=ur(c),f=Eg(c);!f&&u.position==="fixed"&&(o=null),(s?!f&&!o:!f&&u.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||El(c)&&!f&&$S(e,c))?a=a.filter(m=>m!==c):o=u,c=$a(c)}return t.set(e,a),a}function kz(e){let{element:t,boundary:n,rootBoundary:a,strategy:o}=e;const c=[...n==="clippingAncestors"?sd(t)?[]:Dz(t,this._c):[].concat(n),a],u=c[0],f=c.reduce((h,m)=>{const g=I0(t,m,o);return h.top=On(g.top,h.top),h.right=Ia(g.right,h.right),h.bottom=Ia(g.bottom,h.bottom),h.left=On(g.left,h.left),h},I0(t,u,o));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function Nz(e){const{width:t,height:n}=BS(e);return{width:t,height:n}}function Oz(e,t,n){const a=Tr(t),o=Rr(t),s=n==="fixed",c=Ri(e,!0,s,t);let u={scrollLeft:0,scrollTop:0};const f=Cr(0);if(a||!a&&!s)if(($o(t)!=="body"||El(o))&&(u=ld(t)),a){const y=Ri(t,!0,s,t);f.x=y.x+t.clientLeft,f.y=y.y+t.clientTop}else o&&(f.x=Cg(o));const h=o&&!a&&!s?HS(o,u):Cr(0),m=c.left+u.scrollLeft-f.x-h.x,g=c.top+u.scrollTop-f.y-h.y;return{x:m,y:g,width:c.width,height:c.height}}function tp(e){return ur(e).position==="static"}function H0(e,t){if(!Tr(e)||ur(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Rr(e)===n&&(n=n.ownerDocument.body),n}function VS(e,t){const n=Ln(e);if(sd(e))return n;if(!Tr(e)){let o=$a(e);for(;o&&!Oo(o);){if(cr(o)&&!tp(o))return o;o=$a(o)}return n}let a=H0(e,t);for(;a&&xz(a)&&tp(a);)a=H0(a,t);return a&&Oo(a)&&tp(a)&&!Eg(a)?n:a||wz(e)||n}const jz=async function(e){const t=this.getOffsetParent||VS,n=this.getDimensions,a=await n(e.floating);return{reference:Oz(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}};function Lz(e){return ur(e).direction==="rtl"}const zz={convertOffsetParentRelativeRectToViewportRelativeRect:_z,getDocumentElement:Rr,getClippingRect:kz,getOffsetParent:VS,getElementRects:jz,getClientRects:Cz,getDimensions:Nz,getScale:Do,isElement:cr,isRTL:Lz};function qS(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Mz(e,t){let n=null,a;const o=Rr(e);function s(){var u;clearTimeout(a),(u=n)==null||u.disconnect(),n=null}function c(u,f){u===void 0&&(u=!1),f===void 0&&(f=1),s();const h=e.getBoundingClientRect(),{left:m,top:g,width:y,height:b}=h;if(u||t(),!y||!b)return;const S=qc(g),E=qc(o.clientWidth-(m+y)),_=qc(o.clientHeight-(g+b)),N=qc(m),A={rootMargin:-S+"px "+-E+"px "+-_+"px "+-N+"px",threshold:On(0,Ia(1,f))||1};let k=!0;function D(M){const R=M[0].intersectionRatio;if(R!==f){if(!k)return c();R?c(!1,R):a=setTimeout(()=>{c(!1,1e-7)},1e3)}R===1&&!qS(h,e.getBoundingClientRect())&&c(),k=!1}try{n=new IntersectionObserver(D,{...A,root:o.ownerDocument})}catch{n=new IntersectionObserver(D,A)}n.observe(e)}return c(!0),s}function Pz(e,t,n,a){a===void 0&&(a={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:f=!1}=a,h=_g(e),m=o||s?[...h?ul(h):[],...ul(t)]:[];m.forEach(N=>{o&&N.addEventListener("scroll",n,{passive:!0}),s&&N.addEventListener("resize",n)});const g=h&&u?Mz(h,n):null;let y=-1,b=null;c&&(b=new ResizeObserver(N=>{let[C]=N;C&&C.target===h&&b&&(b.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var A;(A=b)==null||A.observe(t)})),n()}),h&&!f&&b.observe(h),b.observe(t));let S,E=f?Ri(e):null;f&&_();function _(){const N=Ri(e);E&&!qS(E,N)&&n(),E=N,S=requestAnimationFrame(_)}return n(),()=>{var N;m.forEach(C=>{o&&C.removeEventListener("scroll",n),s&&C.removeEventListener("resize",n)}),g==null||g(),(N=b)==null||N.disconnect(),b=null,f&&cancelAnimationFrame(S)}}const Gz=gz,Fz=vz,Uz=hz,Bz=bz,Iz=pz,$0=fz,Hz=yz,$z=(e,t,n)=>{const a=new Map,o={platform:zz,...n},s={...o.platform,_c:a};return dz(e,t,{...o,platform:s})};var pu=typeof document<"u"?w.useLayoutEffect:w.useEffect;function Nu(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,a,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(a=n;a--!==0;)if(!Nu(e[a],t[a]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(a=n;a--!==0;)if(!{}.hasOwnProperty.call(t,o[a]))return!1;for(a=n;a--!==0;){const s=o[a];if(!(s==="_owner"&&e.$$typeof)&&!Nu(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function YS(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function V0(e,t){const n=YS(e);return Math.round(t*n)/n}function np(e){const t=w.useRef(e);return pu(()=>{t.current=e}),t}function Vz(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:a=[],platform:o,elements:{reference:s,floating:c}={},transform:u=!0,whileElementsMounted:f,open:h}=e,[m,g]=w.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[y,b]=w.useState(a);Nu(y,a)||b(a);const[S,E]=w.useState(null),[_,N]=w.useState(null),C=w.useCallback(j=>{j!==M.current&&(M.current=j,E(j))},[]),A=w.useCallback(j=>{j!==R.current&&(R.current=j,N(j))},[]),k=s||S,D=c||_,M=w.useRef(null),R=w.useRef(null),U=w.useRef(m),L=f!=null,I=np(f),q=np(o),Y=np(h),B=w.useCallback(()=>{if(!M.current||!R.current)return;const j={placement:t,strategy:n,middleware:y};q.current&&(j.platform=q.current),$z(M.current,R.current,j).then(K=>{const G={...K,isPositioned:Y.current!==!1};X.current&&!Nu(U.current,G)&&(U.current=G,xl.flushSync(()=>{g(G)}))})},[y,t,n,q,Y]);pu(()=>{h===!1&&U.current.isPositioned&&(U.current.isPositioned=!1,g(j=>({...j,isPositioned:!1})))},[h]);const X=w.useRef(!1);pu(()=>(X.current=!0,()=>{X.current=!1}),[]),pu(()=>{if(k&&(M.current=k),D&&(R.current=D),k&&D){if(I.current)return I.current(k,D,B);B()}},[k,D,B,I,L]);const ne=w.useMemo(()=>({reference:M,floating:R,setReference:C,setFloating:A}),[C,A]),F=w.useMemo(()=>({reference:k,floating:D}),[k,D]),z=w.useMemo(()=>{const j={position:n,left:0,top:0};if(!F.floating)return j;const K=V0(F.floating,m.x),G=V0(F.floating,m.y);return u?{...j,transform:"translate("+K+"px, "+G+"px)",...YS(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:K,top:G}},[n,u,F.floating,m.x,m.y]);return w.useMemo(()=>({...m,update:B,refs:ne,elements:F,floatingStyles:z}),[m,B,ne,F,z])}const qz=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:a,padding:o}=typeof e=="function"?e(n):e;return a&&t(a)?a.current!=null?$0({element:a.current,padding:o}).fn(n):{}:a?$0({element:a,padding:o}).fn(n):{}}}},Yz=(e,t)=>({...Gz(e),options:[e,t]}),Wz=(e,t)=>({...Fz(e),options:[e,t]}),Xz=(e,t)=>({...Hz(e),options:[e,t]}),Kz=(e,t)=>({...Uz(e),options:[e,t]}),Zz=(e,t)=>({...Bz(e),options:[e,t]}),Qz=(e,t)=>({...Iz(e),options:[e,t]}),Jz=(e,t)=>({...qz(e),options:[e,t]});var eM="Arrow",WS=w.forwardRef((e,t)=>{const{children:n,width:a=10,height:o=5,...s}=e;return x.jsx(Ie.svg,{...s,ref:t,width:a,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:x.jsx("polygon",{points:"0,0 30,0 15,10"})})});WS.displayName=eM;var tM=WS;function XS(e){const[t,n]=w.useState(void 0);return sn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const a=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let c,u;if("borderBoxSize"in s){const f=s.borderBoxSize,h=Array.isArray(f)?f[0]:f;c=h.inlineSize,u=h.blockSize}else c=e.offsetWidth,u=e.offsetHeight;n({width:c,height:u})});return a.observe(e,{box:"border-box"}),()=>a.unobserve(e)}else n(void 0)},[e]),t}var Tg="Popper",[KS,Vo]=Kn(Tg),[nM,ZS]=KS(Tg),QS=e=>{const{__scopePopper:t,children:n}=e,[a,o]=w.useState(null);return x.jsx(nM,{scope:t,anchor:a,onAnchorChange:o,children:n})};QS.displayName=Tg;var JS="PopperAnchor",e_=w.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:a,...o}=e,s=ZS(JS,n),c=w.useRef(null),u=nt(t,c);return w.useEffect(()=>{s.onAnchorChange((a==null?void 0:a.current)||c.current)}),a?null:x.jsx(Ie.div,{...o,ref:u})});e_.displayName=JS;var Rg="PopperContent",[rM,aM]=KS(Rg),t_=w.forwardRef((e,t)=>{var ie,oe,Ce,he,Se,be;const{__scopePopper:n,side:a="bottom",sideOffset:o=0,align:s="center",alignOffset:c=0,arrowPadding:u=0,avoidCollisions:f=!0,collisionBoundary:h=[],collisionPadding:m=0,sticky:g="partial",hideWhenDetached:y=!1,updatePositionStrategy:b="optimized",onPlaced:S,...E}=e,_=ZS(Rg,n),[N,C]=w.useState(null),A=nt(t,Le=>C(Le)),[k,D]=w.useState(null),M=XS(k),R=(M==null?void 0:M.width)??0,U=(M==null?void 0:M.height)??0,L=a+(s!=="center"?"-"+s:""),I=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},q=Array.isArray(h)?h:[h],Y=q.length>0,B={padding:I,boundary:q.filter(oM),altBoundary:Y},{refs:X,floatingStyles:ne,placement:F,isPositioned:z,middlewareData:j}=Vz({strategy:"fixed",placement:L,whileElementsMounted:(...Le)=>Pz(...Le,{animationFrame:b==="always"}),elements:{reference:_.anchor},middleware:[Yz({mainAxis:o+U,alignmentAxis:c}),f&&Wz({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?Xz():void 0,...B}),f&&Kz({...B}),Zz({...B,apply:({elements:Le,rects:Te,availableWidth:ye,availableHeight:J})=>{const{width:le,height:_e}=Te.reference,pe=Le.floating.style;pe.setProperty("--radix-popper-available-width",`${ye}px`),pe.setProperty("--radix-popper-available-height",`${J}px`),pe.setProperty("--radix-popper-anchor-width",`${le}px`),pe.setProperty("--radix-popper-anchor-height",`${_e}px`)}}),k&&Jz({element:k,padding:u}),sM({arrowWidth:R,arrowHeight:U}),y&&Qz({strategy:"referenceHidden",...B})]}),[K,G]=a_(F),H=Zt(S);sn(()=>{z&&(H==null||H())},[z,H]);const O=(ie=j.arrow)==null?void 0:ie.x,$=(oe=j.arrow)==null?void 0:oe.y,W=((Ce=j.arrow)==null?void 0:Ce.centerOffset)!==0,[re,de]=w.useState();return sn(()=>{N&&de(window.getComputedStyle(N).zIndex)},[N]),x.jsx("div",{ref:X.setFloating,"data-radix-popper-content-wrapper":"",style:{...ne,transform:z?ne.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:re,"--radix-popper-transform-origin":[(he=j.transformOrigin)==null?void 0:he.x,(Se=j.transformOrigin)==null?void 0:Se.y].join(" "),...((be=j.hide)==null?void 0:be.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:x.jsx(rM,{scope:n,placedSide:K,onArrowChange:D,arrowX:O,arrowY:$,shouldHideArrow:W,children:x.jsx(Ie.div,{"data-side":K,"data-align":G,...E,ref:A,style:{...E.style,animation:z?void 0:"none"}})})})});t_.displayName=Rg;var n_="PopperArrow",iM={top:"bottom",right:"left",bottom:"top",left:"right"},r_=w.forwardRef(function(t,n){const{__scopePopper:a,...o}=t,s=aM(n_,a),c=iM[s.placedSide];return x.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:x.jsx(tM,{...o,ref:n,style:{...o.style,display:"block"}})})});r_.displayName=n_;function oM(e){return e!==null}var sM=e=>({name:"transformOrigin",options:e,fn(t){var _,N,C;const{placement:n,rects:a,middlewareData:o}=t,c=((_=o.arrow)==null?void 0:_.centerOffset)!==0,u=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[h,m]=a_(n),g={start:"0%",center:"50%",end:"100%"}[m],y=(((N=o.arrow)==null?void 0:N.x)??0)+u/2,b=(((C=o.arrow)==null?void 0:C.y)??0)+f/2;let S="",E="";return h==="bottom"?(S=c?g:`${y}px`,E=`${-f}px`):h==="top"?(S=c?g:`${y}px`,E=`${a.floating.height+f}px`):h==="right"?(S=`${-f}px`,E=c?g:`${b}px`):h==="left"&&(S=`${a.floating.width+f}px`,E=c?g:`${b}px`),{data:{x:S,y:E}}}});function a_(e){const[t,n="center"]=e.split("-");return[t,n]}var Ag=QS,cd=e_,Dg=t_,kg=r_,lM="VisuallyHidden",Ng=w.forwardRef((e,t)=>x.jsx(Ie.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Ng.displayName=lM;var cM=Ng,[ud,$6]=Kn("Tooltip",[Vo]),dd=Vo(),i_="TooltipProvider",uM=700,vm="tooltip.open",[dM,Og]=ud(i_),o_=e=>{const{__scopeTooltip:t,delayDuration:n=uM,skipDelayDuration:a=300,disableHoverableContent:o=!1,children:s}=e,[c,u]=w.useState(!0),f=w.useRef(!1),h=w.useRef(0);return w.useEffect(()=>{const m=h.current;return()=>window.clearTimeout(m)},[]),x.jsx(dM,{scope:t,isOpenDelayed:c,delayDuration:n,onOpen:w.useCallback(()=>{window.clearTimeout(h.current),u(!1)},[]),onClose:w.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>u(!0),a)},[a]),isPointerInTransitRef:f,onPointerInTransitChange:w.useCallback(m=>{f.current=m},[]),disableHoverableContent:o,children:s})};o_.displayName=i_;var fd="Tooltip",[fM,hd]=ud(fd),s_=e=>{const{__scopeTooltip:t,children:n,open:a,defaultOpen:o=!1,onOpenChange:s,disableHoverableContent:c,delayDuration:u}=e,f=Og(fd,e.__scopeTooltip),h=dd(t),[m,g]=w.useState(null),y=on(),b=w.useRef(0),S=c??f.disableHoverableContent,E=u??f.delayDuration,_=w.useRef(!1),[N=!1,C]=aa({prop:a,defaultProp:o,onChange:R=>{R?(f.onOpen(),document.dispatchEvent(new CustomEvent(vm))):f.onClose(),s==null||s(R)}}),A=w.useMemo(()=>N?_.current?"delayed-open":"instant-open":"closed",[N]),k=w.useCallback(()=>{window.clearTimeout(b.current),b.current=0,_.current=!1,C(!0)},[C]),D=w.useCallback(()=>{window.clearTimeout(b.current),b.current=0,C(!1)},[C]),M=w.useCallback(()=>{window.clearTimeout(b.current),b.current=window.setTimeout(()=>{_.current=!0,C(!0),b.current=0},E)},[E,C]);return w.useEffect(()=>()=>{b.current&&(window.clearTimeout(b.current),b.current=0)},[]),x.jsx(Ag,{...h,children:x.jsx(fM,{scope:t,contentId:y,open:N,stateAttribute:A,trigger:m,onTriggerChange:g,onTriggerEnter:w.useCallback(()=>{f.isOpenDelayed?M():k()},[f.isOpenDelayed,M,k]),onTriggerLeave:w.useCallback(()=>{S?D():(window.clearTimeout(b.current),b.current=0)},[D,S]),onOpen:k,onClose:D,disableHoverableContent:S,children:n})})};s_.displayName=fd;var ym="TooltipTrigger",l_=w.forwardRef((e,t)=>{const{__scopeTooltip:n,...a}=e,o=hd(ym,n),s=Og(ym,n),c=dd(n),u=w.useRef(null),f=nt(t,u,o.onTriggerChange),h=w.useRef(!1),m=w.useRef(!1),g=w.useCallback(()=>h.current=!1,[]);return w.useEffect(()=>()=>document.removeEventListener("pointerup",g),[g]),x.jsx(cd,{asChild:!0,...c,children:x.jsx(Ie.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...a,ref:f,onPointerMove:Be(e.onPointerMove,y=>{y.pointerType!=="touch"&&!m.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),m.current=!0)}),onPointerLeave:Be(e.onPointerLeave,()=>{o.onTriggerLeave(),m.current=!1}),onPointerDown:Be(e.onPointerDown,()=>{h.current=!0,document.addEventListener("pointerup",g,{once:!0})}),onFocus:Be(e.onFocus,()=>{h.current||o.onOpen()}),onBlur:Be(e.onBlur,o.onClose),onClick:Be(e.onClick,o.onClose)})})});l_.displayName=ym;var hM="TooltipPortal",[V6,pM]=ud(hM,{forceMount:void 0}),jo="TooltipContent",c_=w.forwardRef((e,t)=>{const n=pM(jo,e.__scopeTooltip),{forceMount:a=n.forceMount,side:o="top",...s}=e,c=hd(jo,e.__scopeTooltip);return x.jsx(zn,{present:a||c.open,children:c.disableHoverableContent?x.jsx(u_,{side:o,...s,ref:t}):x.jsx(mM,{side:o,...s,ref:t})})}),mM=w.forwardRef((e,t)=>{const n=hd(jo,e.__scopeTooltip),a=Og(jo,e.__scopeTooltip),o=w.useRef(null),s=nt(t,o),[c,u]=w.useState(null),{trigger:f,onClose:h}=n,m=o.current,{onPointerInTransitChange:g}=a,y=w.useCallback(()=>{u(null),g(!1)},[g]),b=w.useCallback((S,E)=>{const _=S.currentTarget,N={x:S.clientX,y:S.clientY},C=bM(N,_.getBoundingClientRect()),A=xM(N,C),k=wM(E.getBoundingClientRect()),D=SM([...A,...k]);u(D),g(!0)},[g]);return w.useEffect(()=>()=>y(),[y]),w.useEffect(()=>{if(f&&m){const S=_=>b(_,m),E=_=>b(_,f);return f.addEventListener("pointerleave",S),m.addEventListener("pointerleave",E),()=>{f.removeEventListener("pointerleave",S),m.removeEventListener("pointerleave",E)}}},[f,m,b,y]),w.useEffect(()=>{if(c){const S=E=>{const _=E.target,N={x:E.clientX,y:E.clientY},C=(f==null?void 0:f.contains(_))||(m==null?void 0:m.contains(_)),A=!EM(N,c);C?y():A&&(y(),h())};return document.addEventListener("pointermove",S),()=>document.removeEventListener("pointermove",S)}},[f,m,c,h,y]),x.jsx(u_,{...e,ref:s})}),[gM,vM]=ud(fd,{isInside:!1}),u_=w.forwardRef((e,t)=>{const{__scopeTooltip:n,children:a,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:c,...u}=e,f=hd(jo,n),h=dd(n),{onClose:m}=f;return w.useEffect(()=>(document.addEventListener(vm,m),()=>document.removeEventListener(vm,m)),[m]),w.useEffect(()=>{if(f.trigger){const g=y=>{const b=y.target;b!=null&&b.contains(f.trigger)&&m()};return window.addEventListener("scroll",g,{capture:!0}),()=>window.removeEventListener("scroll",g,{capture:!0})}},[f.trigger,m]),x.jsx(wl,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:g=>g.preventDefault(),onDismiss:m,children:x.jsxs(Dg,{"data-state":f.stateAttribute,...h,...u,ref:t,style:{...u.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[x.jsx(sg,{children:a}),x.jsx(gM,{scope:n,isInside:!0,children:x.jsx(cM,{id:f.contentId,role:"tooltip",children:o||a})})]})})});c_.displayName=jo;var d_="TooltipArrow",yM=w.forwardRef((e,t)=>{const{__scopeTooltip:n,...a}=e,o=dd(n);return vM(d_,n).isInside?null:x.jsx(kg,{...o,...a,ref:t})});yM.displayName=d_;function bM(e,t){const n=Math.abs(t.top-e.y),a=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,a,o,s)){case s:return"left";case o:return"right";case n:return"top";case a:return"bottom";default:throw new Error("unreachable")}}function xM(e,t,n=5){const a=[];switch(t){case"top":a.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":a.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":a.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":a.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return a}function wM(e){const{top:t,right:n,bottom:a,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:a},{x:o,y:a}]}function EM(e,t){const{x:n,y:a}=e;let o=!1;for(let s=0,c=t.length-1;sa!=m>a&&n<(h-u)*(a-f)/(m-f)+u&&(o=!o)}return o}function SM(e){const t=e.slice();return t.sort((n,a)=>n.xa.x?1:n.ya.y?1:0),_M(t)}function _M(e){if(e.length<=1)return e.slice();const t=[];for(let a=0;a=2;){const s=t[t.length-1],c=t[t.length-2];if((s.x-c.x)*(o.y-c.y)>=(s.y-c.y)*(o.x-c.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let a=e.length-1;a>=0;a--){const o=e[a];for(;n.length>=2;){const s=n[n.length-1],c=n[n.length-2];if((s.x-c.x)*(o.y-c.y)>=(s.y-c.y)*(o.x-c.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var CM=o_,TM=s_,RM=l_,f_=c_;const h_=CM,p_=TM,m_=RM,AM=e=>typeof e!="string"?e:e.split("\\n").map((t,n)=>x.jsxs(w.Fragment,{children:[t,nx.jsx(f_,{ref:o,sideOffset:t,className:Oe("bg-popover text-popover-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 mx-1 max-w-sm overflow-hidden rounded-md border px-3 py-2 text-sm shadow-md",e),...a,children:typeof n=="string"?AM(n):n}));jg.displayName=f_.displayName;const Ou=sE("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"size-8"}},defaultVariants:{variant:"default",size:"default"}}),wt=w.forwardRef(({className:e,variant:t,tooltip:n,size:a,side:o="right",asChild:s=!1,...c},u)=>{const f=s?Ba:"button";return n?x.jsx(h_,{children:x.jsxs(p_,{children:[x.jsx(m_,{asChild:!0,children:x.jsx(f,{className:Oe(Ou({variant:t,size:a,className:e}),"cursor-pointer"),ref:u,...c})}),x.jsx(jg,{side:o,children:n})]})}):x.jsx(f,{className:Oe(Ou({variant:t,size:a,className:e}),"cursor-pointer"),ref:u,...c})});wt.displayName="Button";const DM=tz,kM=nz,g_=w.forwardRef(({className:e,...t},n)=>x.jsx(OS,{className:Oe("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80",e),...t,ref:n}));g_.displayName=OS.displayName;const v_=w.forwardRef(({className:e,...t},n)=>x.jsxs(kM,{children:[x.jsx(g_,{}),x.jsx(jS,{ref:n,className:Oe("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-top-[48%] fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg",e),...t})]}));v_.displayName=jS.displayName;const y_=({className:e,...t})=>x.jsx("div",{className:Oe("flex flex-col space-y-2 text-center sm:text-left",e),...t});y_.displayName="AlertDialogHeader";const b_=w.forwardRef(({className:e,...t},n)=>x.jsx(MS,{ref:n,className:Oe("text-lg font-semibold",e),...t}));b_.displayName=MS.displayName;const x_=w.forwardRef(({className:e,...t},n)=>x.jsx(PS,{ref:n,className:Oe("text-muted-foreground text-sm",e),...t}));x_.displayName=PS.displayName;const NM=w.forwardRef(({className:e,...t},n)=>x.jsx(LS,{ref:n,className:Oe(Ou(),e),...t}));NM.displayName=LS.displayName;const OM=w.forwardRef(({className:e,...t},n)=>x.jsx(zS,{ref:n,className:Oe(Ou({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));OM.displayName=zS.displayName;const Ai=w.forwardRef(({className:e,type:t,...n},a)=>x.jsx("input",{type:t,className:Oe("border-input file:text-foreground placeholder:text-muted-foreground focus-visible:ring-ring flex h-9 rounded-md border bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-1 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:a,...n}));Ai.displayName="Input";var jM=e=>{switch(e){case"success":return MM;case"info":return GM;case"warning":return PM;case"error":return FM;default:return null}},LM=Array(12).fill(0),zM=({visible:e,className:t})=>ve.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},ve.createElement("div",{className:"sonner-spinner"},LM.map((n,a)=>ve.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${a}`})))),MM=ve.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ve.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),PM=ve.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ve.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),GM=ve.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ve.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),FM=ve.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ve.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),UM=ve.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},ve.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ve.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),BM=()=>{let[e,t]=ve.useState(document.hidden);return ve.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},bm=1,IM=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...a}=e,o=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:bm++,s=this.toasts.find(u=>u.id===o),c=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),s?this.toasts=this.toasts.map(u=>u.id===o?(this.publish({...u,...e,id:o,title:n}),{...u,...e,id:o,dismissible:c,title:n}):u):this.addToast({title:n,...a,dismissible:c,id:o}),o},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let a=e instanceof Promise?e:e(),o=n!==void 0,s,c=a.then(async f=>{if(s=["resolve",f],ve.isValidElement(f))o=!1,this.create({id:n,type:"default",message:f});else if($M(f)&&!f.ok){o=!1;let h=typeof t.error=="function"?await t.error(`HTTP error! status: ${f.status}`):t.error,m=typeof t.description=="function"?await t.description(`HTTP error! status: ${f.status}`):t.description;this.create({id:n,type:"error",message:h,description:m})}else if(t.success!==void 0){o=!1;let h=typeof t.success=="function"?await t.success(f):t.success,m=typeof t.description=="function"?await t.description(f):t.description;this.create({id:n,type:"success",message:h,description:m})}}).catch(async f=>{if(s=["reject",f],t.error!==void 0){o=!1;let h=typeof t.error=="function"?await t.error(f):t.error,m=typeof t.description=="function"?await t.description(f):t.description;this.create({id:n,type:"error",message:h,description:m})}}).finally(()=>{var f;o&&(this.dismiss(n),n=void 0),(f=t.finally)==null||f.call(t)}),u=()=>new Promise((f,h)=>c.then(()=>s[0]==="reject"?h(s[1]):f(s[1])).catch(h));return typeof n!="string"&&typeof n!="number"?{unwrap:u}:Object.assign(n,{unwrap:u})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||bm++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},xn=new IM,HM=(e,t)=>{let n=(t==null?void 0:t.id)||bm++;return xn.addToast({title:e,...t,id:n}),n},$M=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",VM=HM,qM=()=>xn.toasts,YM=()=>xn.getActiveToasts(),an=Object.assign(VM,{success:xn.success,info:xn.info,warning:xn.warning,error:xn.error,custom:xn.custom,message:xn.message,promise:xn.promise,dismiss:xn.dismiss,loading:xn.loading},{getHistory:qM,getToasts:YM});function WM(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css",t==="top"&&n.firstChild?n.insertBefore(a,n.firstChild):n.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}WM(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} -`);function Yc(e){return e.label!==void 0}var XM=3,KM="32px",ZM="16px",q0=4e3,QM=356,JM=14,eP=20,tP=200;function ar(...e){return e.filter(Boolean).join(" ")}function nP(e){let[t,n]=e.split("-"),a=[];return t&&a.push(t),n&&a.push(n),a}var rP=e=>{var t,n,a,o,s,c,u,f,h,m,g;let{invert:y,toast:b,unstyled:S,interacting:E,setHeights:_,visibleToasts:N,heights:C,index:A,toasts:k,expanded:D,removeToast:M,defaultRichColors:R,closeButton:U,style:L,cancelButtonStyle:I,actionButtonStyle:q,className:Y="",descriptionClassName:B="",duration:X,position:ne,gap:F,loadingIcon:z,expandByDefault:j,classNames:K,icons:G,closeButtonAriaLabel:H="Close toast",pauseWhenPageIsHidden:O}=e,[$,W]=ve.useState(null),[re,de]=ve.useState(null),[ie,oe]=ve.useState(!1),[Ce,he]=ve.useState(!1),[Se,be]=ve.useState(!1),[Le,Te]=ve.useState(!1),[ye,J]=ve.useState(!1),[le,_e]=ve.useState(0),[pe,Ee]=ve.useState(0),te=ve.useRef(b.duration||X||q0),Fe=ve.useRef(null),Pe=ve.useRef(null),me=A===0,Ae=A+1<=N,je=b.type,He=b.dismissible!==!1,it=b.className||"",Ct=b.descriptionClassName||"",bt=ve.useMemo(()=>C.findIndex(qe=>qe.toastId===b.id)||0,[C,b.id]),qt=ve.useMemo(()=>{var qe;return(qe=b.closeButton)!=null?qe:U},[b.closeButton,U]),fn=ve.useMemo(()=>b.duration||X||q0,[b.duration,X]),Gt=ve.useRef(0),at=ve.useRef(0),Tn=ve.useRef(0),xt=ve.useRef(null),[Lt,Wa]=ne.split("-"),ji=ve.useMemo(()=>C.reduce((qe,lt,pt)=>pt>=bt?qe:qe+lt.height,0),[C,bt]),Ol=BM(),Li=b.invert||y,ca=je==="loading";at.current=ve.useMemo(()=>bt*F+ji,[bt,ji]),ve.useEffect(()=>{te.current=fn},[fn]),ve.useEffect(()=>{oe(!0)},[]),ve.useEffect(()=>{let qe=Pe.current;if(qe){let lt=qe.getBoundingClientRect().height;return Ee(lt),_(pt=>[{toastId:b.id,height:lt,position:b.position},...pt]),()=>_(pt=>pt.filter(hn=>hn.toastId!==b.id))}},[_,b.id]),ve.useLayoutEffect(()=>{if(!ie)return;let qe=Pe.current,lt=qe.style.height;qe.style.height="auto";let pt=qe.getBoundingClientRect().height;qe.style.height=lt,Ee(pt),_(hn=>hn.find(ln=>ln.toastId===b.id)?hn.map(ln=>ln.toastId===b.id?{...ln,height:pt}:ln):[{toastId:b.id,height:pt,position:b.position},...hn])},[ie,b.title,b.description,_,b.id]);let Jt=ve.useCallback(()=>{he(!0),_e(at.current),_(qe=>qe.filter(lt=>lt.toastId!==b.id)),setTimeout(()=>{M(b)},tP)},[b,M,_,at]);ve.useEffect(()=>{if(b.promise&&je==="loading"||b.duration===1/0||b.type==="loading")return;let qe;return D||E||O&&Ol?(()=>{if(Tn.current{var lt;(lt=b.onAutoClose)==null||lt.call(b,b),Jt()},te.current)),()=>clearTimeout(qe)},[D,E,b,je,O,Ol,Jt]),ve.useEffect(()=>{b.delete&&Jt()},[Jt,b.delete]);function zi(){var qe,lt,pt;return G!=null&&G.loading?ve.createElement("div",{className:ar(K==null?void 0:K.loader,(qe=b==null?void 0:b.classNames)==null?void 0:qe.loader,"sonner-loader"),"data-visible":je==="loading"},G.loading):z?ve.createElement("div",{className:ar(K==null?void 0:K.loader,(lt=b==null?void 0:b.classNames)==null?void 0:lt.loader,"sonner-loader"),"data-visible":je==="loading"},z):ve.createElement(zM,{className:ar(K==null?void 0:K.loader,(pt=b==null?void 0:b.classNames)==null?void 0:pt.loader),visible:je==="loading"})}return ve.createElement("li",{tabIndex:0,ref:Pe,className:ar(Y,it,K==null?void 0:K.toast,(t=b==null?void 0:b.classNames)==null?void 0:t.toast,K==null?void 0:K.default,K==null?void 0:K[je],(n=b==null?void 0:b.classNames)==null?void 0:n[je]),"data-sonner-toast":"","data-rich-colors":(a=b.richColors)!=null?a:R,"data-styled":!(b.jsx||b.unstyled||S),"data-mounted":ie,"data-promise":!!b.promise,"data-swiped":ye,"data-removed":Ce,"data-visible":Ae,"data-y-position":Lt,"data-x-position":Wa,"data-index":A,"data-front":me,"data-swiping":Se,"data-dismissible":He,"data-type":je,"data-invert":Li,"data-swipe-out":Le,"data-swipe-direction":re,"data-expanded":!!(D||j&&ie),style:{"--index":A,"--toasts-before":A,"--z-index":k.length-A,"--offset":`${Ce?le:at.current}px`,"--initial-height":j?"auto":`${pe}px`,...L,...b.style},onDragEnd:()=>{be(!1),W(null),xt.current=null},onPointerDown:qe=>{ca||!He||(Fe.current=new Date,_e(at.current),qe.target.setPointerCapture(qe.pointerId),qe.target.tagName!=="BUTTON"&&(be(!0),xt.current={x:qe.clientX,y:qe.clientY}))},onPointerUp:()=>{var qe,lt,pt,hn;if(Le||!He)return;xt.current=null;let ln=Number(((qe=Pe.current)==null?void 0:qe.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),pn=Number(((lt=Pe.current)==null?void 0:lt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Nr=new Date().getTime()-((pt=Fe.current)==null?void 0:pt.getTime()),mn=$==="x"?ln:pn,Jn=Math.abs(mn)/Nr;if(Math.abs(mn)>=eP||Jn>.11){_e(at.current),(hn=b.onDismiss)==null||hn.call(b,b),de($==="x"?ln>0?"right":"left":pn>0?"down":"up"),Jt(),Te(!0),J(!1);return}be(!1),W(null)},onPointerMove:qe=>{var lt,pt,hn,ln;if(!xt.current||!He||((lt=window.getSelection())==null?void 0:lt.toString().length)>0)return;let pn=qe.clientY-xt.current.y,Nr=qe.clientX-xt.current.x,mn=(pt=e.swipeDirections)!=null?pt:nP(ne);!$&&(Math.abs(Nr)>1||Math.abs(pn)>1)&&W(Math.abs(Nr)>Math.abs(pn)?"x":"y");let Jn={x:0,y:0};$==="y"?(mn.includes("top")||mn.includes("bottom"))&&(mn.includes("top")&&pn<0||mn.includes("bottom")&&pn>0)&&(Jn.y=pn):$==="x"&&(mn.includes("left")||mn.includes("right"))&&(mn.includes("left")&&Nr<0||mn.includes("right")&&Nr>0)&&(Jn.x=Nr),(Math.abs(Jn.x)>0||Math.abs(Jn.y)>0)&&J(!0),(hn=Pe.current)==null||hn.style.setProperty("--swipe-amount-x",`${Jn.x}px`),(ln=Pe.current)==null||ln.style.setProperty("--swipe-amount-y",`${Jn.y}px`)}},qt&&!b.jsx?ve.createElement("button",{"aria-label":H,"data-disabled":ca,"data-close-button":!0,onClick:ca||!He?()=>{}:()=>{var qe;Jt(),(qe=b.onDismiss)==null||qe.call(b,b)},className:ar(K==null?void 0:K.closeButton,(o=b==null?void 0:b.classNames)==null?void 0:o.closeButton)},(s=G==null?void 0:G.close)!=null?s:UM):null,b.jsx||w.isValidElement(b.title)?b.jsx?b.jsx:typeof b.title=="function"?b.title():b.title:ve.createElement(ve.Fragment,null,je||b.icon||b.promise?ve.createElement("div",{"data-icon":"",className:ar(K==null?void 0:K.icon,(c=b==null?void 0:b.classNames)==null?void 0:c.icon)},b.promise||b.type==="loading"&&!b.icon?b.icon||zi():null,b.type!=="loading"?b.icon||(G==null?void 0:G[je])||jM(je):null):null,ve.createElement("div",{"data-content":"",className:ar(K==null?void 0:K.content,(u=b==null?void 0:b.classNames)==null?void 0:u.content)},ve.createElement("div",{"data-title":"",className:ar(K==null?void 0:K.title,(f=b==null?void 0:b.classNames)==null?void 0:f.title)},typeof b.title=="function"?b.title():b.title),b.description?ve.createElement("div",{"data-description":"",className:ar(B,Ct,K==null?void 0:K.description,(h=b==null?void 0:b.classNames)==null?void 0:h.description)},typeof b.description=="function"?b.description():b.description):null),w.isValidElement(b.cancel)?b.cancel:b.cancel&&Yc(b.cancel)?ve.createElement("button",{"data-button":!0,"data-cancel":!0,style:b.cancelButtonStyle||I,onClick:qe=>{var lt,pt;Yc(b.cancel)&&He&&((pt=(lt=b.cancel).onClick)==null||pt.call(lt,qe),Jt())},className:ar(K==null?void 0:K.cancelButton,(m=b==null?void 0:b.classNames)==null?void 0:m.cancelButton)},b.cancel.label):null,w.isValidElement(b.action)?b.action:b.action&&Yc(b.action)?ve.createElement("button",{"data-button":!0,"data-action":!0,style:b.actionButtonStyle||q,onClick:qe=>{var lt,pt;Yc(b.action)&&((pt=(lt=b.action).onClick)==null||pt.call(lt,qe),!qe.defaultPrevented&&Jt())},className:ar(K==null?void 0:K.actionButton,(g=b==null?void 0:b.classNames)==null?void 0:g.actionButton)},b.action.label):null))};function Y0(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function aP(e,t){let n={};return[e,t].forEach((a,o)=>{let s=o===1,c=s?"--mobile-offset":"--offset",u=s?ZM:KM;function f(h){["top","right","bottom","left"].forEach(m=>{n[`${c}-${m}`]=typeof h=="number"?`${h}px`:h})}typeof a=="number"||typeof a=="string"?f(a):typeof a=="object"?["top","right","bottom","left"].forEach(h=>{a[h]===void 0?n[`${c}-${h}`]=u:n[`${c}-${h}`]=typeof a[h]=="number"?`${a[h]}px`:a[h]}):f(u)}),n}var iP=w.forwardRef(function(e,t){let{invert:n,position:a="bottom-right",hotkey:o=["altKey","KeyT"],expand:s,closeButton:c,className:u,offset:f,mobileOffset:h,theme:m="light",richColors:g,duration:y,style:b,visibleToasts:S=XM,toastOptions:E,dir:_=Y0(),gap:N=JM,loadingIcon:C,icons:A,containerAriaLabel:k="Notifications",pauseWhenPageIsHidden:D}=e,[M,R]=ve.useState([]),U=ve.useMemo(()=>Array.from(new Set([a].concat(M.filter(O=>O.position).map(O=>O.position)))),[M,a]),[L,I]=ve.useState([]),[q,Y]=ve.useState(!1),[B,X]=ve.useState(!1),[ne,F]=ve.useState(m!=="system"?m:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),z=ve.useRef(null),j=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),K=ve.useRef(null),G=ve.useRef(!1),H=ve.useCallback(O=>{R($=>{var W;return(W=$.find(re=>re.id===O.id))!=null&&W.delete||xn.dismiss(O.id),$.filter(({id:re})=>re!==O.id)})},[]);return ve.useEffect(()=>xn.subscribe(O=>{if(O.dismiss){R($=>$.map(W=>W.id===O.id?{...W,delete:!0}:W));return}setTimeout(()=>{$E.flushSync(()=>{R($=>{let W=$.findIndex(re=>re.id===O.id);return W!==-1?[...$.slice(0,W),{...$[W],...O},...$.slice(W+1)]:[O,...$]})})})}),[]),ve.useEffect(()=>{if(m!=="system"){F(m);return}if(m==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?F("dark"):F("light")),typeof window>"u")return;let O=window.matchMedia("(prefers-color-scheme: dark)");try{O.addEventListener("change",({matches:$})=>{F($?"dark":"light")})}catch{O.addListener(({matches:W})=>{try{F(W?"dark":"light")}catch(re){console.error(re)}})}},[m]),ve.useEffect(()=>{M.length<=1&&Y(!1)},[M]),ve.useEffect(()=>{let O=$=>{var W,re;o.every(de=>$[de]||$.code===de)&&(Y(!0),(W=z.current)==null||W.focus()),$.code==="Escape"&&(document.activeElement===z.current||(re=z.current)!=null&&re.contains(document.activeElement))&&Y(!1)};return document.addEventListener("keydown",O),()=>document.removeEventListener("keydown",O)},[o]),ve.useEffect(()=>{if(z.current)return()=>{K.current&&(K.current.focus({preventScroll:!0}),K.current=null,G.current=!1)}},[z.current]),ve.createElement("section",{ref:t,"aria-label":`${k} ${j}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},U.map((O,$)=>{var W;let[re,de]=O.split("-");return M.length?ve.createElement("ol",{key:O,dir:_==="auto"?Y0():_,tabIndex:-1,ref:z,className:u,"data-sonner-toaster":!0,"data-theme":ne,"data-y-position":re,"data-lifted":q&&M.length>1&&!s,"data-x-position":de,style:{"--front-toast-height":`${((W=L[0])==null?void 0:W.height)||0}px`,"--width":`${QM}px`,"--gap":`${N}px`,...b,...aP(f,h)},onBlur:ie=>{G.current&&!ie.currentTarget.contains(ie.relatedTarget)&&(G.current=!1,K.current&&(K.current.focus({preventScroll:!0}),K.current=null))},onFocus:ie=>{ie.target instanceof HTMLElement&&ie.target.dataset.dismissible==="false"||G.current||(G.current=!0,K.current=ie.relatedTarget)},onMouseEnter:()=>Y(!0),onMouseMove:()=>Y(!0),onMouseLeave:()=>{B||Y(!1)},onDragEnd:()=>Y(!1),onPointerDown:ie=>{ie.target instanceof HTMLElement&&ie.target.dataset.dismissible==="false"||X(!0)},onPointerUp:()=>X(!1)},M.filter(ie=>!ie.position&&$===0||ie.position===O).map((ie,oe)=>{var Ce,he;return ve.createElement(rP,{key:ie.id,icons:A,index:oe,toast:ie,defaultRichColors:g,duration:(Ce=E==null?void 0:E.duration)!=null?Ce:y,className:E==null?void 0:E.className,descriptionClassName:E==null?void 0:E.descriptionClassName,invert:n,visibleToasts:S,closeButton:(he=E==null?void 0:E.closeButton)!=null?he:c,interacting:B,position:O,style:E==null?void 0:E.style,unstyled:E==null?void 0:E.unstyled,classNames:E==null?void 0:E.classNames,cancelButtonStyle:E==null?void 0:E.cancelButtonStyle,actionButtonStyle:E==null?void 0:E.actionButtonStyle,removeToast:H,toasts:M.filter(Se=>Se.position==ie.position),heights:L.filter(Se=>Se.position==ie.position),setHeights:I,expandByDefault:s,gap:N,loadingIcon:C,expanded:q,pauseWhenPageIsHidden:D,swipeDirections:e.swipeDirections})})):null}))});const oP=()=>{const[e,t]=w.useState(!0),n=Ye.use.apiKey(),[a,o]=w.useState(""),s=En.use.message();w.useEffect(()=>{o(n||"")},[n,e]),w.useEffect(()=>{s&&(s.includes(ME)||s.includes(PE))&&t(!0)},[s,t]);const c=w.useCallback(async()=>{if(Ye.setState({apiKey:a||null}),await En.getState().check()){t(!1);return}an.error("API Key is invalid")},[a]),u=w.useCallback(f=>{o(f.target.value)},[o]);return x.jsx(DM,{open:e,onOpenChange:t,children:x.jsxs(v_,{children:[x.jsxs(y_,{children:[x.jsx(b_,{children:"API Key is required"}),x.jsx(x_,{children:"Please enter your API key"})]}),x.jsxs("form",{className:"flex gap-2",onSubmit:f=>f.preventDefault(),children:[x.jsx(Ai,{type:"password",value:a,onChange:u,placeholder:"Enter your API key",className:"max-h-full w-full min-w-0",autoComplete:"off"}),x.jsx(wt,{onClick:c,variant:"outline",size:"sm",children:"Save"})]})]})})};var Lg="Popover",[w_,q6]=Kn(Lg,[Vo]),Sl=Vo(),[sP,Va]=w_(Lg),E_=e=>{const{__scopePopover:t,children:n,open:a,defaultOpen:o,onOpenChange:s,modal:c=!1}=e,u=Sl(t),f=w.useRef(null),[h,m]=w.useState(!1),[g=!1,y]=aa({prop:a,defaultProp:o,onChange:s});return x.jsx(Ag,{...u,children:x.jsx(sP,{scope:t,contentId:on(),triggerRef:f,open:g,onOpenChange:y,onOpenToggle:w.useCallback(()=>y(b=>!b),[y]),hasCustomAnchor:h,onCustomAnchorAdd:w.useCallback(()=>m(!0),[]),onCustomAnchorRemove:w.useCallback(()=>m(!1),[]),modal:c,children:n})})};E_.displayName=Lg;var S_="PopoverAnchor",lP=w.forwardRef((e,t)=>{const{__scopePopover:n,...a}=e,o=Va(S_,n),s=Sl(n),{onCustomAnchorAdd:c,onCustomAnchorRemove:u}=o;return w.useEffect(()=>(c(),()=>u()),[c,u]),x.jsx(cd,{...s,...a,ref:t})});lP.displayName=S_;var __="PopoverTrigger",C_=w.forwardRef((e,t)=>{const{__scopePopover:n,...a}=e,o=Va(__,n),s=Sl(n),c=nt(t,o.triggerRef),u=x.jsx(Ie.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":k_(o.open),...a,ref:c,onClick:Be(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?u:x.jsx(cd,{asChild:!0,...s,children:u})});C_.displayName=__;var zg="PopoverPortal",[cP,uP]=w_(zg,{forceMount:void 0}),T_=e=>{const{__scopePopover:t,forceMount:n,children:a,container:o}=e,s=Va(zg,t);return x.jsx(cP,{scope:t,forceMount:n,children:x.jsx(zn,{present:n||s.open,children:x.jsx(td,{asChild:!0,container:o,children:a})})})};T_.displayName=zg;var Lo="PopoverContent",R_=w.forwardRef((e,t)=>{const n=uP(Lo,e.__scopePopover),{forceMount:a=n.forceMount,...o}=e,s=Va(Lo,e.__scopePopover);return x.jsx(zn,{present:a||s.open,children:s.modal?x.jsx(dP,{...o,ref:t}):x.jsx(fP,{...o,ref:t})})});R_.displayName=Lo;var dP=w.forwardRef((e,t)=>{const n=Va(Lo,e.__scopePopover),a=w.useRef(null),o=nt(t,a),s=w.useRef(!1);return w.useEffect(()=>{const c=a.current;if(c)return cg(c)},[]),x.jsx(rd,{as:Ba,allowPinchZoom:!0,children:x.jsx(A_,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Be(e.onCloseAutoFocus,c=>{var u;c.preventDefault(),s.current||(u=n.triggerRef.current)==null||u.focus()}),onPointerDownOutside:Be(e.onPointerDownOutside,c=>{const u=c.detail.originalEvent,f=u.button===0&&u.ctrlKey===!0,h=u.button===2||f;s.current=h},{checkForDefaultPrevented:!1}),onFocusOutside:Be(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1})})})}),fP=w.forwardRef((e,t)=>{const n=Va(Lo,e.__scopePopover),a=w.useRef(!1),o=w.useRef(!1);return x.jsx(A_,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var c,u;(c=e.onCloseAutoFocus)==null||c.call(e,s),s.defaultPrevented||(a.current||(u=n.triggerRef.current)==null||u.focus(),s.preventDefault()),a.current=!1,o.current=!1},onInteractOutside:s=>{var f,h;(f=e.onInteractOutside)==null||f.call(e,s),s.defaultPrevented||(a.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=s.target;((h=n.triggerRef.current)==null?void 0:h.contains(c))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),A_=w.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:c,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:h,onInteractOutside:m,...g}=e,y=Va(Lo,n),b=Sl(n);return lg(),x.jsx(ed,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:o,onUnmountAutoFocus:s,children:x.jsx(wl,{asChild:!0,disableOutsidePointerEvents:c,onInteractOutside:m,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:h,onDismiss:()=>y.onOpenChange(!1),children:x.jsx(Dg,{"data-state":k_(y.open),role:"dialog",id:y.contentId,...b,...g,ref:t,style:{...g.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),D_="PopoverClose",hP=w.forwardRef((e,t)=>{const{__scopePopover:n,...a}=e,o=Va(D_,n);return x.jsx(Ie.button,{type:"button",...a,ref:t,onClick:Be(e.onClick,()=>o.onOpenChange(!1))})});hP.displayName=D_;var pP="PopoverArrow",mP=w.forwardRef((e,t)=>{const{__scopePopover:n,...a}=e,o=Sl(n);return x.jsx(kg,{...o,...a,ref:t})});mP.displayName=pP;function k_(e){return e?"open":"closed"}var gP=E_,vP=C_,yP=T_,N_=R_;const pd=gP,md=vP,_l=w.forwardRef(({className:e,align:t="center",sideOffset:n=4,...a},o)=>x.jsx(yP,{children:x.jsx(N_,{ref:o,align:t,sideOffset:n,className:Oe("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 rounded-md border p-4 shadow-md outline-none",e),...a})}));_l.displayName=N_.displayName;const bP=({status:e})=>e?x.jsxs("div",{className:"min-w-[300px] space-y-3 text-sm",children:[x.jsxs("div",{className:"space-y-1",children:[x.jsx("h4",{className:"font-medium",children:"Storage Info"}),x.jsxs("div",{className:"text-muted-foreground grid grid-cols-2 gap-1",children:[x.jsx("span",{children:"Working Directory:"}),x.jsx("span",{className:"truncate",children:e.working_directory}),x.jsx("span",{children:"Input Directory:"}),x.jsx("span",{className:"truncate",children:e.input_directory})]})]}),x.jsxs("div",{className:"space-y-1",children:[x.jsx("h4",{className:"font-medium",children:"LLM Configuration"}),x.jsxs("div",{className:"text-muted-foreground grid grid-cols-2 gap-1",children:[x.jsx("span",{children:"LLM Binding:"}),x.jsx("span",{children:e.configuration.llm_binding}),x.jsx("span",{children:"LLM Binding Host:"}),x.jsx("span",{children:e.configuration.llm_binding_host}),x.jsx("span",{children:"LLM Model:"}),x.jsx("span",{children:e.configuration.llm_model}),x.jsx("span",{children:"Max Tokens:"}),x.jsx("span",{children:e.configuration.max_tokens})]})]}),x.jsxs("div",{className:"space-y-1",children:[x.jsx("h4",{className:"font-medium",children:"Embedding Configuration"}),x.jsxs("div",{className:"text-muted-foreground grid grid-cols-2 gap-1",children:[x.jsx("span",{children:"Embedding Binding:"}),x.jsx("span",{children:e.configuration.embedding_binding}),x.jsx("span",{children:"Embedding Binding Host:"}),x.jsx("span",{children:e.configuration.embedding_binding_host}),x.jsx("span",{children:"Embedding Model:"}),x.jsx("span",{children:e.configuration.embedding_model})]})]}),x.jsxs("div",{className:"space-y-1",children:[x.jsx("h4",{className:"font-medium",children:"Storage Configuration"}),x.jsxs("div",{className:"text-muted-foreground grid grid-cols-2 gap-1",children:[x.jsx("span",{children:"KV Storage:"}),x.jsx("span",{children:e.configuration.kv_storage}),x.jsx("span",{children:"Doc Status Storage:"}),x.jsx("span",{children:e.configuration.doc_status_storage}),x.jsx("span",{children:"Graph Storage:"}),x.jsx("span",{children:e.configuration.graph_storage}),x.jsx("span",{children:"Vector Storage:"}),x.jsx("span",{children:e.configuration.vector_storage})]})]})]}):x.jsx("div",{className:"text-muted-foreground text-sm",children:"Status information unavailable"}),xP=()=>{const e=En.use.health(),t=En.use.lastCheckTime(),n=En.use.status(),[a,o]=w.useState(!1);return w.useEffect(()=>{o(!0);const s=setTimeout(()=>o(!1),300);return()=>clearTimeout(s)},[t]),x.jsx("div",{className:"fixed right-4 bottom-4 flex items-center gap-2 opacity-80 select-none",children:x.jsxs(pd,{children:[x.jsx(md,{asChild:!0,children:x.jsxs("div",{className:"flex cursor-help items-center gap-2",children:[x.jsx("div",{className:Oe("h-3 w-3 rounded-full transition-all duration-300","shadow-[0_0_8px_rgba(0,0,0,0.2)]",e?"bg-green-500":"bg-red-500",a&&"scale-125",a&&e&&"shadow-[0_0_12px_rgba(34,197,94,0.4)]",a&&!e&&"shadow-[0_0_12px_rgba(239,68,68,0.4)]")}),x.jsx("span",{className:"text-muted-foreground text-xs",children:e?"Connected":"Disconnected"})]})}),x.jsx(_l,{className:"w-auto",side:"top",align:"end",children:x.jsx(bP,{status:n})})]})})},O_=()=>{const e=w.useContext(oE);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};function wP(){const{theme:e,setTheme:t}=O_(),n=w.useCallback(()=>t("light"),[t]),a=w.useCallback(()=>t("dark"),[t]);return e==="dark"?x.jsx(wt,{onClick:n,variant:_r,tooltip:"Switch to light theme",size:"icon",side:"bottom",children:x.jsx(JO,{})}):x.jsx(wt,{onClick:a,variant:_r,tooltip:"Switch to dark theme",size:"icon",side:"bottom",children:x.jsx(hj,{})})}function j_(e){const t=e+"CollectionProvider",[n,a]=Kn(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=b=>{const{scope:S,children:E}=b,_=ve.useRef(null),N=ve.useRef(new Map).current;return x.jsx(o,{scope:S,itemMap:N,collectionRef:_,children:E})};c.displayName=t;const u=e+"CollectionSlot",f=ve.forwardRef((b,S)=>{const{scope:E,children:_}=b,N=s(u,E),C=nt(S,N.collectionRef);return x.jsx(Ba,{ref:C,children:_})});f.displayName=u;const h=e+"CollectionItemSlot",m="data-radix-collection-item",g=ve.forwardRef((b,S)=>{const{scope:E,children:_,...N}=b,C=ve.useRef(null),A=nt(S,C),k=s(h,E);return ve.useEffect(()=>(k.itemMap.set(C,{ref:C,...N}),()=>void k.itemMap.delete(C))),x.jsx(Ba,{[m]:"",ref:A,children:_})});g.displayName=h;function y(b){const S=s(e+"CollectionConsumer",b);return ve.useCallback(()=>{const _=S.collectionRef.current;if(!_)return[];const N=Array.from(_.querySelectorAll(`[${m}]`));return Array.from(S.itemMap.values()).sort((k,D)=>N.indexOf(k.ref.current)-N.indexOf(D.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:c,Slot:f,ItemSlot:g},y,a]}var EP=w.createContext(void 0);function gd(e){const t=w.useContext(EP);return e||t||"ltr"}var rp="rovingFocusGroup.onEntryFocus",SP={bubbles:!1,cancelable:!0},vd="RovingFocusGroup",[xm,L_,_P]=j_(vd),[CP,z_]=Kn(vd,[_P]),[TP,RP]=CP(vd),M_=w.forwardRef((e,t)=>x.jsx(xm.Provider,{scope:e.__scopeRovingFocusGroup,children:x.jsx(xm.Slot,{scope:e.__scopeRovingFocusGroup,children:x.jsx(AP,{...e,ref:t})})}));M_.displayName=vd;var AP=w.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:a,loop:o=!1,dir:s,currentTabStopId:c,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:f,onEntryFocus:h,preventScrollOnEntryFocus:m=!1,...g}=e,y=w.useRef(null),b=nt(t,y),S=gd(s),[E=null,_]=aa({prop:c,defaultProp:u,onChange:f}),[N,C]=w.useState(!1),A=Zt(h),k=L_(n),D=w.useRef(!1),[M,R]=w.useState(0);return w.useEffect(()=>{const U=y.current;if(U)return U.addEventListener(rp,A),()=>U.removeEventListener(rp,A)},[A]),x.jsx(TP,{scope:n,orientation:a,dir:S,loop:o,currentTabStopId:E,onItemFocus:w.useCallback(U=>_(U),[_]),onItemShiftTab:w.useCallback(()=>C(!0),[]),onFocusableItemAdd:w.useCallback(()=>R(U=>U+1),[]),onFocusableItemRemove:w.useCallback(()=>R(U=>U-1),[]),children:x.jsx(Ie.div,{tabIndex:N||M===0?-1:0,"data-orientation":a,...g,ref:b,style:{outline:"none",...e.style},onMouseDown:Be(e.onMouseDown,()=>{D.current=!0}),onFocus:Be(e.onFocus,U=>{const L=!D.current;if(U.target===U.currentTarget&&L&&!N){const I=new CustomEvent(rp,SP);if(U.currentTarget.dispatchEvent(I),!I.defaultPrevented){const q=k().filter(F=>F.focusable),Y=q.find(F=>F.active),B=q.find(F=>F.id===E),ne=[Y,B,...q].filter(Boolean).map(F=>F.ref.current);F_(ne,m)}}D.current=!1}),onBlur:Be(e.onBlur,()=>C(!1))})})}),P_="RovingFocusGroupItem",G_=w.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:a=!0,active:o=!1,tabStopId:s,...c}=e,u=on(),f=s||u,h=RP(P_,n),m=h.currentTabStopId===f,g=L_(n),{onFocusableItemAdd:y,onFocusableItemRemove:b}=h;return w.useEffect(()=>{if(a)return y(),()=>b()},[a,y,b]),x.jsx(xm.ItemSlot,{scope:n,id:f,focusable:a,active:o,children:x.jsx(Ie.span,{tabIndex:m?0:-1,"data-orientation":h.orientation,...c,ref:t,onMouseDown:Be(e.onMouseDown,S=>{a?h.onItemFocus(f):S.preventDefault()}),onFocus:Be(e.onFocus,()=>h.onItemFocus(f)),onKeyDown:Be(e.onKeyDown,S=>{if(S.key==="Tab"&&S.shiftKey){h.onItemShiftTab();return}if(S.target!==S.currentTarget)return;const E=NP(S,h.orientation,h.dir);if(E!==void 0){if(S.metaKey||S.ctrlKey||S.altKey||S.shiftKey)return;S.preventDefault();let N=g().filter(C=>C.focusable).map(C=>C.ref.current);if(E==="last")N.reverse();else if(E==="prev"||E==="next"){E==="prev"&&N.reverse();const C=N.indexOf(S.currentTarget);N=h.loop?OP(N,C+1):N.slice(C+1)}setTimeout(()=>F_(N))}})})})});G_.displayName=P_;var DP={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function kP(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function NP(e,t,n){const a=kP(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(a))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(a)))return DP[a]}function F_(e,t=!1){const n=document.activeElement;for(const a of e)if(a===n||(a.focus({preventScroll:t}),document.activeElement!==n))return}function OP(e,t){return e.map((n,a)=>e[(t+a)%e.length])}var jP=M_,LP=G_,Mg="Tabs",[zP,Y6]=Kn(Mg,[z_]),U_=z_(),[MP,Pg]=zP(Mg),B_=w.forwardRef((e,t)=>{const{__scopeTabs:n,value:a,onValueChange:o,defaultValue:s,orientation:c="horizontal",dir:u,activationMode:f="automatic",...h}=e,m=gd(u),[g,y]=aa({prop:a,onChange:o,defaultProp:s});return x.jsx(MP,{scope:n,baseId:on(),value:g,onValueChange:y,orientation:c,dir:m,activationMode:f,children:x.jsx(Ie.div,{dir:m,"data-orientation":c,...h,ref:t})})});B_.displayName=Mg;var I_="TabsList",H_=w.forwardRef((e,t)=>{const{__scopeTabs:n,loop:a=!0,...o}=e,s=Pg(I_,n),c=U_(n);return x.jsx(jP,{asChild:!0,...c,orientation:s.orientation,dir:s.dir,loop:a,children:x.jsx(Ie.div,{role:"tablist","aria-orientation":s.orientation,...o,ref:t})})});H_.displayName=I_;var $_="TabsTrigger",V_=w.forwardRef((e,t)=>{const{__scopeTabs:n,value:a,disabled:o=!1,...s}=e,c=Pg($_,n),u=U_(n),f=W_(c.baseId,a),h=X_(c.baseId,a),m=a===c.value;return x.jsx(LP,{asChild:!0,...u,focusable:!o,active:m,children:x.jsx(Ie.button,{type:"button",role:"tab","aria-selected":m,"aria-controls":h,"data-state":m?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:f,...s,ref:t,onMouseDown:Be(e.onMouseDown,g=>{!o&&g.button===0&&g.ctrlKey===!1?c.onValueChange(a):g.preventDefault()}),onKeyDown:Be(e.onKeyDown,g=>{[" ","Enter"].includes(g.key)&&c.onValueChange(a)}),onFocus:Be(e.onFocus,()=>{const g=c.activationMode!=="manual";!m&&!o&&g&&c.onValueChange(a)})})})});V_.displayName=$_;var q_="TabsContent",Y_=w.forwardRef((e,t)=>{const{__scopeTabs:n,value:a,forceMount:o,children:s,...c}=e,u=Pg(q_,n),f=W_(u.baseId,a),h=X_(u.baseId,a),m=a===u.value,g=w.useRef(m);return w.useEffect(()=>{const y=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(y)},[]),x.jsx(zn,{present:o||m,children:({present:y})=>x.jsx(Ie.div,{"data-state":m?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":f,hidden:!y,id:h,tabIndex:0,...c,ref:t,style:{...e.style,animationDuration:g.current?"0s":void 0},children:y&&s})})});Y_.displayName=q_;function W_(e,t){return`${e}-trigger-${t}`}function X_(e,t){return`${e}-content-${t}`}var PP=B_,K_=H_,Z_=V_,Q_=Y_;const GP=PP,J_=w.forwardRef(({className:e,...t},n)=>x.jsx(K_,{ref:n,className:Oe("bg-muted text-muted-foreground inline-flex h-10 items-center justify-center rounded-md p-1",e),...t}));J_.displayName=K_.displayName;const eC=w.forwardRef(({className:e,...t},n)=>x.jsx(Z_,{ref:n,className:Oe("ring-offset-background focus-visible:ring-ring data-[state=active]:bg-background data-[state=active]:text-foreground inline-flex items-center justify-center rounded-sm px-3 py-1.5 text-sm font-medium whitespace-nowrap transition-all focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm",e),...t}));eC.displayName=Z_.displayName;const rl=w.forwardRef(({className:e,...t},n)=>x.jsx(Q_,{ref:n,className:Oe("ring-offset-background focus-visible:ring-ring mt-2 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",e),...t}));rl.displayName=Q_.displayName;function Wc({value:e,currentTab:t,children:n}){return x.jsx(eC,{value:e,className:Oe("cursor-pointer px-2 py-1 transition-all",t===e?"!bg-emerald-400 !text-zinc-50":"hover:bg-background/60"),children:n})}function FP(){const e=Ye.use.currentTab();return x.jsx("div",{className:"flex h-8 self-center",children:x.jsxs(J_,{className:"h-full gap-2",children:[x.jsx(Wc,{value:"documents",currentTab:e,children:"Documents"}),x.jsx(Wc,{value:"knowledge-graph",currentTab:e,children:"Knowledge Graph"}),x.jsx(Wc,{value:"retrieval",currentTab:e,children:"Retrieval"}),x.jsx(Wc,{value:"api",currentTab:e,children:"API"})]})})}function UP(){return x.jsxs("header",{className:"border-border/40 bg-background/95 supports-[backdrop-filter]:bg-background/60 sticky top-0 z-50 flex h-10 w-full border-b px-4 backdrop-blur",children:[x.jsxs("a",{href:"/",className:"mr-6 flex items-center gap-2",children:[x.jsx(vj,{className:"size-4 text-emerald-400","aria-hidden":"true"}),x.jsx("span",{className:"font-bold md:inline-block",children:l0.name})]}),x.jsx("div",{className:"flex h-10 flex-1 justify-center",children:x.jsx(FP,{})}),x.jsxs("nav",{className:"flex items-center",children:[x.jsx(wt,{variant:"ghost",size:"icon",side:"bottom",tooltip:"Project Repository",children:x.jsx("a",{href:l0.github,target:"_blank",rel:"noopener noreferrer",children:x.jsx(IO,{className:"size-4","aria-hidden":"true"})})}),x.jsx(wP,{})]})]})}var Xc={exports:{}},W0;function BP(){if(W0)return Xc.exports;W0=1;var e=typeof Reflect=="object"?Reflect:null,t=e&&typeof e.apply=="function"?e.apply:function(D,M,R){return Function.prototype.apply.call(D,M,R)},n;e&&typeof e.ownKeys=="function"?n=e.ownKeys:Object.getOwnPropertySymbols?n=function(D){return Object.getOwnPropertyNames(D).concat(Object.getOwnPropertySymbols(D))}:n=function(D){return Object.getOwnPropertyNames(D)};function a(k){console&&console.warn&&console.warn(k)}var o=Number.isNaN||function(D){return D!==D};function s(){s.init.call(this)}Xc.exports=s,Xc.exports.once=N,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var c=10;function u(k){if(typeof k!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof k)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(k){if(typeof k!="number"||k<0||o(k))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+k+".");c=k}}),s.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(D){if(typeof D!="number"||D<0||o(D))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+D+".");return this._maxListeners=D,this};function f(k){return k._maxListeners===void 0?s.defaultMaxListeners:k._maxListeners}s.prototype.getMaxListeners=function(){return f(this)},s.prototype.emit=function(D){for(var M=[],R=1;R0&&(I=M[0]),I instanceof Error)throw I;var q=new Error("Unhandled error."+(I?" ("+I.message+")":""));throw q.context=I,q}var Y=L[D];if(Y===void 0)return!1;if(typeof Y=="function")t(Y,this,M);else for(var B=Y.length,X=S(Y,B),R=0;R0&&I.length>U&&!I.warned){I.warned=!0;var q=new Error("Possible EventEmitter memory leak detected. "+I.length+" "+String(D)+" listeners added. Use emitter.setMaxListeners() to increase limit");q.name="MaxListenersExceededWarning",q.emitter=k,q.type=D,q.count=I.length,a(q)}return k}s.prototype.addListener=function(D,M){return h(this,D,M,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(D,M){return h(this,D,M,!0)};function m(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function g(k,D,M){var R={fired:!1,wrapFn:void 0,target:k,type:D,listener:M},U=m.bind(R);return U.listener=M,R.wrapFn=U,U}s.prototype.once=function(D,M){return u(M),this.on(D,g(this,D,M)),this},s.prototype.prependOnceListener=function(D,M){return u(M),this.prependListener(D,g(this,D,M)),this},s.prototype.removeListener=function(D,M){var R,U,L,I,q;if(u(M),U=this._events,U===void 0)return this;if(R=U[D],R===void 0)return this;if(R===M||R.listener===M)--this._eventsCount===0?this._events=Object.create(null):(delete U[D],U.removeListener&&this.emit("removeListener",D,R.listener||M));else if(typeof R!="function"){for(L=-1,I=R.length-1;I>=0;I--)if(R[I]===M||R[I].listener===M){q=R[I].listener,L=I;break}if(L<0)return this;L===0?R.shift():E(R,L),R.length===1&&(U[D]=R[0]),U.removeListener!==void 0&&this.emit("removeListener",D,q||M)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(D){var M,R,U;if(R=this._events,R===void 0)return this;if(R.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):R[D]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete R[D]),this;if(arguments.length===0){var L=Object.keys(R),I;for(U=0;U=0;U--)this.removeListener(D,M[U]);return this};function y(k,D,M){var R=k._events;if(R===void 0)return[];var U=R[D];return U===void 0?[]:typeof U=="function"?M?[U.listener||U]:[U]:M?_(U):S(U,U.length)}s.prototype.listeners=function(D){return y(this,D,!0)},s.prototype.rawListeners=function(D){return y(this,D,!1)},s.listenerCount=function(k,D){return typeof k.listenerCount=="function"?k.listenerCount(D):b.call(k,D)},s.prototype.listenerCount=b;function b(k){var D=this._events;if(D!==void 0){var M=D[k];if(typeof M=="function")return 1;if(M!==void 0)return M.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]};function S(k,D){for(var M=new Array(D),R=0;Re++}function ra(){const e=arguments;let t=null,n=-1;return{[Symbol.iterator](){return this},next(){let a=null;do{if(t===null){if(n++,n>=e.length)return{done:!0};t=e[n][Symbol.iterator]()}if(a=t.next(),a.done){t=null;continue}break}while(!0);return a}}}function qo(){return{[Symbol.iterator](){return this},next(){return{done:!0}}}}class Gg extends Error{constructor(t){super(),this.name="GraphError",this.message=t}}class De extends Gg{constructor(t){super(t),this.name="InvalidArgumentsGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,De.prototype.constructor)}}class Re extends Gg{constructor(t){super(t),this.name="NotFoundGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Re.prototype.constructor)}}class $e extends Gg{constructor(t){super(t),this.name="UsageGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,$e.prototype.constructor)}}function rC(e,t){this.key=e,this.attributes=t,this.clear()}rC.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.undirectedDegree=0,this.undirectedLoops=0,this.directedLoops=0,this.in={},this.out={},this.undirected={}};function aC(e,t){this.key=e,this.attributes=t,this.clear()}aC.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.directedLoops=0,this.in={},this.out={}};function iC(e,t){this.key=e,this.attributes=t,this.clear()}iC.prototype.clear=function(){this.undirectedDegree=0,this.undirectedLoops=0,this.undirected={}};function Yo(e,t,n,a,o){this.key=t,this.attributes=o,this.undirected=e,this.source=n,this.target=a}Yo.prototype.attach=function(){let e="out",t="in";this.undirected&&(e=t="undirected");const n=this.source.key,a=this.target.key;this.source[e][a]=this,!(this.undirected&&n===a)&&(this.target[t][n]=this)};Yo.prototype.attachMulti=function(){let e="out",t="in";const n=this.source.key,a=this.target.key;this.undirected&&(e=t="undirected");const o=this.source[e],s=o[a];if(typeof s>"u"){o[a]=this,this.undirected&&n===a||(this.target[t][n]=this);return}s.previous=this,this.next=s,o[a]=this,this.target[t][n]=this};Yo.prototype.detach=function(){const e=this.source.key,t=this.target.key;let n="out",a="in";this.undirected&&(n=a="undirected"),delete this.source[n][t],delete this.target[a][e]};Yo.prototype.detachMulti=function(){const e=this.source.key,t=this.target.key;let n="out",a="in";this.undirected&&(n=a="undirected"),this.previous===void 0?this.next===void 0?(delete this.source[n][t],delete this.target[a][e]):(this.next.previous=void 0,this.source[n][t]=this.next,this.target[a][e]=this.next):(this.previous.next=this.next,this.next!==void 0&&(this.next.previous=this.previous))};const oC=0,sC=1,$P=2,lC=3;function la(e,t,n,a,o,s,c){let u,f,h,m;if(a=""+a,n===oC){if(u=e._nodes.get(a),!u)throw new Re(`Graph.${t}: could not find the "${a}" node in the graph.`);h=o,m=s}else if(n===lC){if(o=""+o,f=e._edges.get(o),!f)throw new Re(`Graph.${t}: could not find the "${o}" edge in the graph.`);const g=f.source.key,y=f.target.key;if(a===g)u=f.target;else if(a===y)u=f.source;else throw new Re(`Graph.${t}: the "${a}" node is not attached to the "${o}" edge (${g}, ${y}).`);h=s,m=c}else{if(f=e._edges.get(a),!f)throw new Re(`Graph.${t}: could not find the "${a}" edge in the graph.`);n===sC?u=f.source:u=f.target,h=o,m=s}return[u,h,m]}function VP(e,t,n){e.prototype[t]=function(a,o,s){const[c,u]=la(this,t,n,a,o,s);return c.attributes[u]}}function qP(e,t,n){e.prototype[t]=function(a,o){const[s]=la(this,t,n,a,o);return s.attributes}}function YP(e,t,n){e.prototype[t]=function(a,o,s){const[c,u]=la(this,t,n,a,o,s);return c.attributes.hasOwnProperty(u)}}function WP(e,t,n){e.prototype[t]=function(a,o,s,c){const[u,f,h]=la(this,t,n,a,o,s,c);return u.attributes[f]=h,this.emit("nodeAttributesUpdated",{key:u.key,type:"set",attributes:u.attributes,name:f}),this}}function XP(e,t,n){e.prototype[t]=function(a,o,s,c){const[u,f,h]=la(this,t,n,a,o,s,c);if(typeof h!="function")throw new De(`Graph.${t}: updater should be a function.`);const m=u.attributes,g=h(m[f]);return m[f]=g,this.emit("nodeAttributesUpdated",{key:u.key,type:"set",attributes:u.attributes,name:f}),this}}function KP(e,t,n){e.prototype[t]=function(a,o,s){const[c,u]=la(this,t,n,a,o,s);return delete c.attributes[u],this.emit("nodeAttributesUpdated",{key:c.key,type:"remove",attributes:c.attributes,name:u}),this}}function ZP(e,t,n){e.prototype[t]=function(a,o,s){const[c,u]=la(this,t,n,a,o,s);if(!Qt(u))throw new De(`Graph.${t}: provided attributes are not a plain object.`);return c.attributes=u,this.emit("nodeAttributesUpdated",{key:c.key,type:"replace",attributes:c.attributes}),this}}function QP(e,t,n){e.prototype[t]=function(a,o,s){const[c,u]=la(this,t,n,a,o,s);if(!Qt(u))throw new De(`Graph.${t}: provided attributes are not a plain object.`);return Pt(c.attributes,u),this.emit("nodeAttributesUpdated",{key:c.key,type:"merge",attributes:c.attributes,data:u}),this}}function JP(e,t,n){e.prototype[t]=function(a,o,s){const[c,u]=la(this,t,n,a,o,s);if(typeof u!="function")throw new De(`Graph.${t}: provided updater is not a function.`);return c.attributes=u(c.attributes),this.emit("nodeAttributesUpdated",{key:c.key,type:"update",attributes:c.attributes}),this}}const e4=[{name:e=>`get${e}Attribute`,attacher:VP},{name:e=>`get${e}Attributes`,attacher:qP},{name:e=>`has${e}Attribute`,attacher:YP},{name:e=>`set${e}Attribute`,attacher:WP},{name:e=>`update${e}Attribute`,attacher:XP},{name:e=>`remove${e}Attribute`,attacher:KP},{name:e=>`replace${e}Attributes`,attacher:ZP},{name:e=>`merge${e}Attributes`,attacher:QP},{name:e=>`update${e}Attributes`,attacher:JP}];function t4(e){e4.forEach(function({name:t,attacher:n}){n(e,t("Node"),oC),n(e,t("Source"),sC),n(e,t("Target"),$P),n(e,t("Opposite"),lC)})}function n4(e,t,n){e.prototype[t]=function(a,o){let s;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new $e(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new $e(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const c=""+a,u=""+o;if(o=arguments[2],s=Xn(this,c,u,n),!s)throw new Re(`Graph.${t}: could not find an edge for the given path ("${c}" - "${u}").`)}else{if(n!=="mixed")throw new $e(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(a=""+a,s=this._edges.get(a),!s)throw new Re(`Graph.${t}: could not find the "${a}" edge in the graph.`)}return s.attributes[o]}}function r4(e,t,n){e.prototype[t]=function(a){let o;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new $e(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>1){if(this.multi)throw new $e(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const s=""+a,c=""+arguments[1];if(o=Xn(this,s,c,n),!o)throw new Re(`Graph.${t}: could not find an edge for the given path ("${s}" - "${c}").`)}else{if(n!=="mixed")throw new $e(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(a=""+a,o=this._edges.get(a),!o)throw new Re(`Graph.${t}: could not find the "${a}" edge in the graph.`)}return o.attributes}}function a4(e,t,n){e.prototype[t]=function(a,o){let s;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new $e(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new $e(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const c=""+a,u=""+o;if(o=arguments[2],s=Xn(this,c,u,n),!s)throw new Re(`Graph.${t}: could not find an edge for the given path ("${c}" - "${u}").`)}else{if(n!=="mixed")throw new $e(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(a=""+a,s=this._edges.get(a),!s)throw new Re(`Graph.${t}: could not find the "${a}" edge in the graph.`)}return s.attributes.hasOwnProperty(o)}}function i4(e,t,n){e.prototype[t]=function(a,o,s){let c;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new $e(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>3){if(this.multi)throw new $e(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const u=""+a,f=""+o;if(o=arguments[2],s=arguments[3],c=Xn(this,u,f,n),!c)throw new Re(`Graph.${t}: could not find an edge for the given path ("${u}" - "${f}").`)}else{if(n!=="mixed")throw new $e(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(a=""+a,c=this._edges.get(a),!c)throw new Re(`Graph.${t}: could not find the "${a}" edge in the graph.`)}return c.attributes[o]=s,this.emit("edgeAttributesUpdated",{key:c.key,type:"set",attributes:c.attributes,name:o}),this}}function o4(e,t,n){e.prototype[t]=function(a,o,s){let c;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new $e(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>3){if(this.multi)throw new $e(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const u=""+a,f=""+o;if(o=arguments[2],s=arguments[3],c=Xn(this,u,f,n),!c)throw new Re(`Graph.${t}: could not find an edge for the given path ("${u}" - "${f}").`)}else{if(n!=="mixed")throw new $e(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(a=""+a,c=this._edges.get(a),!c)throw new Re(`Graph.${t}: could not find the "${a}" edge in the graph.`)}if(typeof s!="function")throw new De(`Graph.${t}: updater should be a function.`);return c.attributes[o]=s(c.attributes[o]),this.emit("edgeAttributesUpdated",{key:c.key,type:"set",attributes:c.attributes,name:o}),this}}function s4(e,t,n){e.prototype[t]=function(a,o){let s;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new $e(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new $e(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const c=""+a,u=""+o;if(o=arguments[2],s=Xn(this,c,u,n),!s)throw new Re(`Graph.${t}: could not find an edge for the given path ("${c}" - "${u}").`)}else{if(n!=="mixed")throw new $e(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(a=""+a,s=this._edges.get(a),!s)throw new Re(`Graph.${t}: could not find the "${a}" edge in the graph.`)}return delete s.attributes[o],this.emit("edgeAttributesUpdated",{key:s.key,type:"remove",attributes:s.attributes,name:o}),this}}function l4(e,t,n){e.prototype[t]=function(a,o){let s;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new $e(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new $e(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const c=""+a,u=""+o;if(o=arguments[2],s=Xn(this,c,u,n),!s)throw new Re(`Graph.${t}: could not find an edge for the given path ("${c}" - "${u}").`)}else{if(n!=="mixed")throw new $e(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(a=""+a,s=this._edges.get(a),!s)throw new Re(`Graph.${t}: could not find the "${a}" edge in the graph.`)}if(!Qt(o))throw new De(`Graph.${t}: provided attributes are not a plain object.`);return s.attributes=o,this.emit("edgeAttributesUpdated",{key:s.key,type:"replace",attributes:s.attributes}),this}}function c4(e,t,n){e.prototype[t]=function(a,o){let s;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new $e(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new $e(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const c=""+a,u=""+o;if(o=arguments[2],s=Xn(this,c,u,n),!s)throw new Re(`Graph.${t}: could not find an edge for the given path ("${c}" - "${u}").`)}else{if(n!=="mixed")throw new $e(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(a=""+a,s=this._edges.get(a),!s)throw new Re(`Graph.${t}: could not find the "${a}" edge in the graph.`)}if(!Qt(o))throw new De(`Graph.${t}: provided attributes are not a plain object.`);return Pt(s.attributes,o),this.emit("edgeAttributesUpdated",{key:s.key,type:"merge",attributes:s.attributes,data:o}),this}}function u4(e,t,n){e.prototype[t]=function(a,o){let s;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new $e(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new $e(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const c=""+a,u=""+o;if(o=arguments[2],s=Xn(this,c,u,n),!s)throw new Re(`Graph.${t}: could not find an edge for the given path ("${c}" - "${u}").`)}else{if(n!=="mixed")throw new $e(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(a=""+a,s=this._edges.get(a),!s)throw new Re(`Graph.${t}: could not find the "${a}" edge in the graph.`)}if(typeof o!="function")throw new De(`Graph.${t}: provided updater is not a function.`);return s.attributes=o(s.attributes),this.emit("edgeAttributesUpdated",{key:s.key,type:"update",attributes:s.attributes}),this}}const d4=[{name:e=>`get${e}Attribute`,attacher:n4},{name:e=>`get${e}Attributes`,attacher:r4},{name:e=>`has${e}Attribute`,attacher:a4},{name:e=>`set${e}Attribute`,attacher:i4},{name:e=>`update${e}Attribute`,attacher:o4},{name:e=>`remove${e}Attribute`,attacher:s4},{name:e=>`replace${e}Attributes`,attacher:l4},{name:e=>`merge${e}Attributes`,attacher:c4},{name:e=>`update${e}Attributes`,attacher:u4}];function f4(e){d4.forEach(function({name:t,attacher:n}){n(e,t("Edge"),"mixed"),n(e,t("DirectedEdge"),"directed"),n(e,t("UndirectedEdge"),"undirected")})}const h4=[{name:"edges",type:"mixed"},{name:"inEdges",type:"directed",direction:"in"},{name:"outEdges",type:"directed",direction:"out"},{name:"inboundEdges",type:"mixed",direction:"in"},{name:"outboundEdges",type:"mixed",direction:"out"},{name:"directedEdges",type:"directed"},{name:"undirectedEdges",type:"undirected"}];function p4(e,t,n,a){let o=!1;for(const s in t){if(s===a)continue;const c=t[s];if(o=n(c.key,c.attributes,c.source.key,c.target.key,c.source.attributes,c.target.attributes,c.undirected),e&&o)return c.key}}function m4(e,t,n,a){let o,s,c,u=!1;for(const f in t)if(f!==a){o=t[f];do{if(s=o.source,c=o.target,u=n(o.key,o.attributes,s.key,c.key,s.attributes,c.attributes,o.undirected),e&&u)return o.key;o=o.next}while(o!==void 0)}}function ap(e,t){const n=Object.keys(e),a=n.length;let o,s=0;return{[Symbol.iterator](){return this},next(){do if(o)o=o.next;else{if(s>=a)return{done:!0};const c=n[s++];if(c===t){o=void 0;continue}o=e[c]}while(!o);return{done:!1,value:{edge:o.key,attributes:o.attributes,source:o.source.key,target:o.target.key,sourceAttributes:o.source.attributes,targetAttributes:o.target.attributes,undirected:o.undirected}}}}}function g4(e,t,n,a){const o=t[n];if(!o)return;const s=o.source,c=o.target;if(a(o.key,o.attributes,s.key,c.key,s.attributes,c.attributes,o.undirected)&&e)return o.key}function v4(e,t,n,a){let o=t[n];if(!o)return;let s=!1;do{if(s=a(o.key,o.attributes,o.source.key,o.target.key,o.source.attributes,o.target.attributes,o.undirected),e&&s)return o.key;o=o.next}while(o!==void 0)}function ip(e,t){let n=e[t];if(n.next!==void 0)return{[Symbol.iterator](){return this},next(){if(!n)return{done:!0};const o={edge:n.key,attributes:n.attributes,source:n.source.key,target:n.target.key,sourceAttributes:n.source.attributes,targetAttributes:n.target.attributes,undirected:n.undirected};return n=n.next,{done:!1,value:o}}};let a=!1;return{[Symbol.iterator](){return this},next(){return a===!0?{done:!0}:(a=!0,{done:!1,value:{edge:n.key,attributes:n.attributes,source:n.source.key,target:n.target.key,sourceAttributes:n.source.attributes,targetAttributes:n.target.attributes,undirected:n.undirected}})}}}function y4(e,t){if(e.size===0)return[];if(t==="mixed"||t===e.type)return Array.from(e._edges.keys());const n=t==="undirected"?e.undirectedSize:e.directedSize,a=new Array(n),o=t==="undirected",s=e._edges.values();let c=0,u,f;for(;u=s.next(),u.done!==!0;)f=u.value,f.undirected===o&&(a[c++]=f.key);return a}function cC(e,t,n,a){if(t.size===0)return;const o=n!=="mixed"&&n!==t.type,s=n==="undirected";let c,u,f=!1;const h=t._edges.values();for(;c=h.next(),c.done!==!0;){if(u=c.value,o&&u.undirected!==s)continue;const{key:m,attributes:g,source:y,target:b}=u;if(f=a(m,g,y.key,b.key,y.attributes,b.attributes,u.undirected),e&&f)return m}}function b4(e,t){if(e.size===0)return qo();const n=t!=="mixed"&&t!==e.type,a=t==="undirected",o=e._edges.values();return{[Symbol.iterator](){return this},next(){let s,c;for(;;){if(s=o.next(),s.done)return s;if(c=s.value,!(n&&c.undirected!==a))break}return{value:{edge:c.key,attributes:c.attributes,source:c.source.key,target:c.target.key,sourceAttributes:c.source.attributes,targetAttributes:c.target.attributes,undirected:c.undirected},done:!1}}}}function Fg(e,t,n,a,o,s){const c=t?m4:p4;let u;if(n!=="undirected"&&(a!=="out"&&(u=c(e,o.in,s),e&&u)||a!=="in"&&(u=c(e,o.out,s,a?void 0:o.key),e&&u))||n!=="directed"&&(u=c(e,o.undirected,s),e&&u))return u}function x4(e,t,n,a){const o=[];return Fg(!1,e,t,n,a,function(s){o.push(s)}),o}function w4(e,t,n){let a=qo();return e!=="undirected"&&(t!=="out"&&typeof n.in<"u"&&(a=ra(a,ap(n.in))),t!=="in"&&typeof n.out<"u"&&(a=ra(a,ap(n.out,t?void 0:n.key)))),e!=="directed"&&typeof n.undirected<"u"&&(a=ra(a,ap(n.undirected))),a}function Ug(e,t,n,a,o,s,c){const u=n?v4:g4;let f;if(t!=="undirected"&&(typeof o.in<"u"&&a!=="out"&&(f=u(e,o.in,s,c),e&&f)||typeof o.out<"u"&&a!=="in"&&(a||o.key!==s)&&(f=u(e,o.out,s,c),e&&f))||t!=="directed"&&typeof o.undirected<"u"&&(f=u(e,o.undirected,s,c),e&&f))return f}function E4(e,t,n,a,o){const s=[];return Ug(!1,e,t,n,a,o,function(c){s.push(c)}),s}function S4(e,t,n,a){let o=qo();return e!=="undirected"&&(typeof n.in<"u"&&t!=="out"&&a in n.in&&(o=ra(o,ip(n.in,a))),typeof n.out<"u"&&t!=="in"&&a in n.out&&(t||n.key!==a)&&(o=ra(o,ip(n.out,a)))),e!=="directed"&&typeof n.undirected<"u"&&a in n.undirected&&(o=ra(o,ip(n.undirected,a))),o}function _4(e,t){const{name:n,type:a,direction:o}=t;e.prototype[n]=function(s,c){if(a!=="mixed"&&this.type!=="mixed"&&a!==this.type)return[];if(!arguments.length)return y4(this,a);if(arguments.length===1){s=""+s;const u=this._nodes.get(s);if(typeof u>"u")throw new Re(`Graph.${n}: could not find the "${s}" node in the graph.`);return x4(this.multi,a==="mixed"?this.type:a,o,u)}if(arguments.length===2){s=""+s,c=""+c;const u=this._nodes.get(s);if(!u)throw new Re(`Graph.${n}: could not find the "${s}" source node in the graph.`);if(!this._nodes.has(c))throw new Re(`Graph.${n}: could not find the "${c}" target node in the graph.`);return E4(a,this.multi,o,u,c)}throw new De(`Graph.${n}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}function C4(e,t){const{name:n,type:a,direction:o}=t,s="forEach"+n[0].toUpperCase()+n.slice(1,-1);e.prototype[s]=function(h,m,g){if(!(a!=="mixed"&&this.type!=="mixed"&&a!==this.type)){if(arguments.length===1)return g=h,cC(!1,this,a,g);if(arguments.length===2){h=""+h,g=m;const y=this._nodes.get(h);if(typeof y>"u")throw new Re(`Graph.${s}: could not find the "${h}" node in the graph.`);return Fg(!1,this.multi,a==="mixed"?this.type:a,o,y,g)}if(arguments.length===3){h=""+h,m=""+m;const y=this._nodes.get(h);if(!y)throw new Re(`Graph.${s}: could not find the "${h}" source node in the graph.`);if(!this._nodes.has(m))throw new Re(`Graph.${s}: could not find the "${m}" target node in the graph.`);return Ug(!1,a,this.multi,o,y,m,g)}throw new De(`Graph.${s}: too many arguments (expecting 1, 2 or 3 and got ${arguments.length}).`)}};const c="map"+n[0].toUpperCase()+n.slice(1);e.prototype[c]=function(){const h=Array.prototype.slice.call(arguments),m=h.pop();let g;if(h.length===0){let y=0;a!=="directed"&&(y+=this.undirectedSize),a!=="undirected"&&(y+=this.directedSize),g=new Array(y);let b=0;h.push((S,E,_,N,C,A,k)=>{g[b++]=m(S,E,_,N,C,A,k)})}else g=[],h.push((y,b,S,E,_,N,C)=>{g.push(m(y,b,S,E,_,N,C))});return this[s].apply(this,h),g};const u="filter"+n[0].toUpperCase()+n.slice(1);e.prototype[u]=function(){const h=Array.prototype.slice.call(arguments),m=h.pop(),g=[];return h.push((y,b,S,E,_,N,C)=>{m(y,b,S,E,_,N,C)&&g.push(y)}),this[s].apply(this,h),g};const f="reduce"+n[0].toUpperCase()+n.slice(1);e.prototype[f]=function(){let h=Array.prototype.slice.call(arguments);if(h.length<2||h.length>4)throw new De(`Graph.${f}: invalid number of arguments (expecting 2, 3 or 4 and got ${h.length}).`);if(typeof h[h.length-1]=="function"&&typeof h[h.length-2]!="function")throw new De(`Graph.${f}: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);let m,g;h.length===2?(m=h[0],g=h[1],h=[]):h.length===3?(m=h[1],g=h[2],h=[h[0]]):h.length===4&&(m=h[2],g=h[3],h=[h[0],h[1]]);let y=g;return h.push((b,S,E,_,N,C,A)=>{y=m(y,b,S,E,_,N,C,A)}),this[s].apply(this,h),y}}function T4(e,t){const{name:n,type:a,direction:o}=t,s="find"+n[0].toUpperCase()+n.slice(1,-1);e.prototype[s]=function(f,h,m){if(a!=="mixed"&&this.type!=="mixed"&&a!==this.type)return!1;if(arguments.length===1)return m=f,cC(!0,this,a,m);if(arguments.length===2){f=""+f,m=h;const g=this._nodes.get(f);if(typeof g>"u")throw new Re(`Graph.${s}: could not find the "${f}" node in the graph.`);return Fg(!0,this.multi,a==="mixed"?this.type:a,o,g,m)}if(arguments.length===3){f=""+f,h=""+h;const g=this._nodes.get(f);if(!g)throw new Re(`Graph.${s}: could not find the "${f}" source node in the graph.`);if(!this._nodes.has(h))throw new Re(`Graph.${s}: could not find the "${h}" target node in the graph.`);return Ug(!0,a,this.multi,o,g,h,m)}throw new De(`Graph.${s}: too many arguments (expecting 1, 2 or 3 and got ${arguments.length}).`)};const c="some"+n[0].toUpperCase()+n.slice(1,-1);e.prototype[c]=function(){const f=Array.prototype.slice.call(arguments),h=f.pop();return f.push((g,y,b,S,E,_,N)=>h(g,y,b,S,E,_,N)),!!this[s].apply(this,f)};const u="every"+n[0].toUpperCase()+n.slice(1,-1);e.prototype[u]=function(){const f=Array.prototype.slice.call(arguments),h=f.pop();return f.push((g,y,b,S,E,_,N)=>!h(g,y,b,S,E,_,N)),!this[s].apply(this,f)}}function R4(e,t){const{name:n,type:a,direction:o}=t,s=n.slice(0,-1)+"Entries";e.prototype[s]=function(c,u){if(a!=="mixed"&&this.type!=="mixed"&&a!==this.type)return qo();if(!arguments.length)return b4(this,a);if(arguments.length===1){c=""+c;const f=this._nodes.get(c);if(!f)throw new Re(`Graph.${s}: could not find the "${c}" node in the graph.`);return w4(a,o,f)}if(arguments.length===2){c=""+c,u=""+u;const f=this._nodes.get(c);if(!f)throw new Re(`Graph.${s}: could not find the "${c}" source node in the graph.`);if(!this._nodes.has(u))throw new Re(`Graph.${s}: could not find the "${u}" target node in the graph.`);return S4(a,o,f,u)}throw new De(`Graph.${s}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}function A4(e){h4.forEach(t=>{_4(e,t),C4(e,t),T4(e,t),R4(e,t)})}const D4=[{name:"neighbors",type:"mixed"},{name:"inNeighbors",type:"directed",direction:"in"},{name:"outNeighbors",type:"directed",direction:"out"},{name:"inboundNeighbors",type:"mixed",direction:"in"},{name:"outboundNeighbors",type:"mixed",direction:"out"},{name:"directedNeighbors",type:"directed"},{name:"undirectedNeighbors",type:"undirected"}];function yd(){this.A=null,this.B=null}yd.prototype.wrap=function(e){this.A===null?this.A=e:this.B===null&&(this.B=e)};yd.prototype.has=function(e){return this.A!==null&&e in this.A||this.B!==null&&e in this.B};function Xs(e,t,n,a,o){for(const s in a){const c=a[s],u=c.source,f=c.target,h=u===n?f:u;if(t&&t.has(h.key))continue;const m=o(h.key,h.attributes);if(e&&m)return h.key}}function Bg(e,t,n,a,o){if(t!=="mixed"){if(t==="undirected")return Xs(e,null,a,a.undirected,o);if(typeof n=="string")return Xs(e,null,a,a[n],o)}const s=new yd;let c;if(t!=="undirected"){if(n!=="out"){if(c=Xs(e,null,a,a.in,o),e&&c)return c;s.wrap(a.in)}if(n!=="in"){if(c=Xs(e,s,a,a.out,o),e&&c)return c;s.wrap(a.out)}}if(t!=="directed"&&(c=Xs(e,s,a,a.undirected,o),e&&c))return c}function k4(e,t,n){if(e!=="mixed"){if(e==="undirected")return Object.keys(n.undirected);if(typeof t=="string")return Object.keys(n[t])}const a=[];return Bg(!1,e,t,n,function(o){a.push(o)}),a}function Ks(e,t,n){const a=Object.keys(n),o=a.length;let s=0;return{[Symbol.iterator](){return this},next(){let c=null;do{if(s>=o)return e&&e.wrap(n),{done:!0};const u=n[a[s++]],f=u.source,h=u.target;if(c=f===t?h:f,e&&e.has(c.key)){c=null;continue}}while(c===null);return{done:!1,value:{neighbor:c.key,attributes:c.attributes}}}}}function N4(e,t,n){if(e!=="mixed"){if(e==="undirected")return Ks(null,n,n.undirected);if(typeof t=="string")return Ks(null,n,n[t])}let a=qo();const o=new yd;return e!=="undirected"&&(t!=="out"&&(a=ra(a,Ks(o,n,n.in))),t!=="in"&&(a=ra(a,Ks(o,n,n.out)))),e!=="directed"&&(a=ra(a,Ks(o,n,n.undirected))),a}function O4(e,t){const{name:n,type:a,direction:o}=t;e.prototype[n]=function(s){if(a!=="mixed"&&this.type!=="mixed"&&a!==this.type)return[];s=""+s;const c=this._nodes.get(s);if(typeof c>"u")throw new Re(`Graph.${n}: could not find the "${s}" node in the graph.`);return k4(a==="mixed"?this.type:a,o,c)}}function j4(e,t){const{name:n,type:a,direction:o}=t,s="forEach"+n[0].toUpperCase()+n.slice(1,-1);e.prototype[s]=function(h,m){if(a!=="mixed"&&this.type!=="mixed"&&a!==this.type)return;h=""+h;const g=this._nodes.get(h);if(typeof g>"u")throw new Re(`Graph.${s}: could not find the "${h}" node in the graph.`);Bg(!1,a==="mixed"?this.type:a,o,g,m)};const c="map"+n[0].toUpperCase()+n.slice(1);e.prototype[c]=function(h,m){const g=[];return this[s](h,(y,b)=>{g.push(m(y,b))}),g};const u="filter"+n[0].toUpperCase()+n.slice(1);e.prototype[u]=function(h,m){const g=[];return this[s](h,(y,b)=>{m(y,b)&&g.push(y)}),g};const f="reduce"+n[0].toUpperCase()+n.slice(1);e.prototype[f]=function(h,m,g){if(arguments.length<3)throw new De(`Graph.${f}: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);let y=g;return this[s](h,(b,S)=>{y=m(y,b,S)}),y}}function L4(e,t){const{name:n,type:a,direction:o}=t,s=n[0].toUpperCase()+n.slice(1,-1),c="find"+s;e.prototype[c]=function(h,m){if(a!=="mixed"&&this.type!=="mixed"&&a!==this.type)return;h=""+h;const g=this._nodes.get(h);if(typeof g>"u")throw new Re(`Graph.${c}: could not find the "${h}" node in the graph.`);return Bg(!0,a==="mixed"?this.type:a,o,g,m)};const u="some"+s;e.prototype[u]=function(h,m){return!!this[c](h,m)};const f="every"+s;e.prototype[f]=function(h,m){return!this[c](h,(y,b)=>!m(y,b))}}function z4(e,t){const{name:n,type:a,direction:o}=t,s=n.slice(0,-1)+"Entries";e.prototype[s]=function(c){if(a!=="mixed"&&this.type!=="mixed"&&a!==this.type)return qo();c=""+c;const u=this._nodes.get(c);if(typeof u>"u")throw new Re(`Graph.${s}: could not find the "${c}" node in the graph.`);return N4(a==="mixed"?this.type:a,o,u)}}function M4(e){D4.forEach(t=>{O4(e,t),j4(e,t),L4(e,t),z4(e,t)})}function Kc(e,t,n,a,o){const s=a._nodes.values(),c=a.type;let u,f,h,m,g,y;for(;u=s.next(),u.done!==!0;){let b=!1;if(f=u.value,c!=="undirected"){m=f.out;for(h in m){g=m[h];do y=g.target,b=!0,o(f.key,y.key,f.attributes,y.attributes,g.key,g.attributes,g.undirected),g=g.next;while(g)}}if(c!=="directed"){m=f.undirected;for(h in m)if(!(t&&f.key>h)){g=m[h];do y=g.target,y.key!==h&&(y=g.source),b=!0,o(f.key,y.key,f.attributes,y.attributes,g.key,g.attributes,g.undirected),g=g.next;while(g)}}n&&!b&&o(f.key,null,f.attributes,null,null,null,null)}}function P4(e,t){const n={key:e};return nC(t.attributes)||(n.attributes=Pt({},t.attributes)),n}function G4(e,t,n){const a={key:t,source:n.source.key,target:n.target.key};return nC(n.attributes)||(a.attributes=Pt({},n.attributes)),e==="mixed"&&n.undirected&&(a.undirected=!0),a}function F4(e){if(!Qt(e))throw new De('Graph.import: invalid serialized node. A serialized node should be a plain object with at least a "key" property.');if(!("key"in e))throw new De("Graph.import: serialized node is missing its key.");if("attributes"in e&&(!Qt(e.attributes)||e.attributes===null))throw new De("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.")}function U4(e){if(!Qt(e))throw new De('Graph.import: invalid serialized edge. A serialized edge should be a plain object with at least a "source" & "target" property.');if(!("source"in e))throw new De("Graph.import: serialized edge is missing its source.");if(!("target"in e))throw new De("Graph.import: serialized edge is missing its target.");if("attributes"in e&&(!Qt(e.attributes)||e.attributes===null))throw new De("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.");if("undirected"in e&&typeof e.undirected!="boolean")throw new De("Graph.import: invalid undirectedness information. Undirected should be boolean or omitted.")}const B4=HP(),I4=new Set(["directed","undirected","mixed"]),K0=new Set(["domain","_events","_eventsCount","_maxListeners"]),H4=[{name:e=>`${e}Edge`,generateKey:!0},{name:e=>`${e}DirectedEdge`,generateKey:!0,type:"directed"},{name:e=>`${e}UndirectedEdge`,generateKey:!0,type:"undirected"},{name:e=>`${e}EdgeWithKey`},{name:e=>`${e}DirectedEdgeWithKey`,type:"directed"},{name:e=>`${e}UndirectedEdgeWithKey`,type:"undirected"}],$4={allowSelfLoops:!0,multi:!1,type:"mixed"};function V4(e,t,n){if(n&&!Qt(n))throw new De(`Graph.addNode: invalid attributes. Expecting an object but got "${n}"`);if(t=""+t,n=n||{},e._nodes.has(t))throw new $e(`Graph.addNode: the "${t}" node already exist in the graph.`);const a=new e.NodeDataClass(t,n);return e._nodes.set(t,a),e.emit("nodeAdded",{key:t,attributes:n}),a}function Z0(e,t,n){const a=new e.NodeDataClass(t,n);return e._nodes.set(t,a),e.emit("nodeAdded",{key:t,attributes:n}),a}function uC(e,t,n,a,o,s,c,u){if(!a&&e.type==="undirected")throw new $e(`Graph.${t}: you cannot add a directed edge to an undirected graph. Use the #.addEdge or #.addUndirectedEdge instead.`);if(a&&e.type==="directed")throw new $e(`Graph.${t}: you cannot add an undirected edge to a directed graph. Use the #.addEdge or #.addDirectedEdge instead.`);if(u&&!Qt(u))throw new De(`Graph.${t}: invalid attributes. Expecting an object but got "${u}"`);if(s=""+s,c=""+c,u=u||{},!e.allowSelfLoops&&s===c)throw new $e(`Graph.${t}: source & target are the same ("${s}"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`);const f=e._nodes.get(s),h=e._nodes.get(c);if(!f)throw new Re(`Graph.${t}: source node "${s}" not found.`);if(!h)throw new Re(`Graph.${t}: target node "${c}" not found.`);const m={key:null,undirected:a,source:s,target:c,attributes:u};if(n)o=e._edgeKeyGenerator();else if(o=""+o,e._edges.has(o))throw new $e(`Graph.${t}: the "${o}" edge already exists in the graph.`);if(!e.multi&&(a?typeof f.undirected[c]<"u":typeof f.out[c]<"u"))throw new $e(`Graph.${t}: an edge linking "${s}" to "${c}" already exists. If you really want to add multiple edges linking those nodes, you should create a multi graph by using the 'multi' option.`);const g=new Yo(a,o,f,h,u);e._edges.set(o,g);const y=s===c;return a?(f.undirectedDegree++,h.undirectedDegree++,y&&(f.undirectedLoops++,e._undirectedSelfLoopCount++)):(f.outDegree++,h.inDegree++,y&&(f.directedLoops++,e._directedSelfLoopCount++)),e.multi?g.attachMulti():g.attach(),a?e._undirectedSize++:e._directedSize++,m.key=o,e.emit("edgeAdded",m),o}function q4(e,t,n,a,o,s,c,u,f){if(!a&&e.type==="undirected")throw new $e(`Graph.${t}: you cannot merge/update a directed edge to an undirected graph. Use the #.mergeEdge/#.updateEdge or #.addUndirectedEdge instead.`);if(a&&e.type==="directed")throw new $e(`Graph.${t}: you cannot merge/update an undirected edge to a directed graph. Use the #.mergeEdge/#.updateEdge or #.addDirectedEdge instead.`);if(u){if(f){if(typeof u!="function")throw new De(`Graph.${t}: invalid updater function. Expecting a function but got "${u}"`)}else if(!Qt(u))throw new De(`Graph.${t}: invalid attributes. Expecting an object but got "${u}"`)}s=""+s,c=""+c;let h;if(f&&(h=u,u=void 0),!e.allowSelfLoops&&s===c)throw new $e(`Graph.${t}: source & target are the same ("${s}"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`);let m=e._nodes.get(s),g=e._nodes.get(c),y,b;if(!n&&(y=e._edges.get(o),y)){if((y.source.key!==s||y.target.key!==c)&&(!a||y.source.key!==c||y.target.key!==s))throw new $e(`Graph.${t}: inconsistency detected when attempting to merge the "${o}" edge with "${s}" source & "${c}" target vs. ("${y.source.key}", "${y.target.key}").`);b=y}if(!b&&!e.multi&&m&&(b=a?m.undirected[c]:m.out[c]),b){const C=[b.key,!1,!1,!1];if(f?!h:!u)return C;if(f){const A=b.attributes;b.attributes=h(A),e.emit("edgeAttributesUpdated",{type:"replace",key:b.key,attributes:b.attributes})}else Pt(b.attributes,u),e.emit("edgeAttributesUpdated",{type:"merge",key:b.key,attributes:b.attributes,data:u});return C}u=u||{},f&&h&&(u=h(u));const S={key:null,undirected:a,source:s,target:c,attributes:u};if(n)o=e._edgeKeyGenerator();else if(o=""+o,e._edges.has(o))throw new $e(`Graph.${t}: the "${o}" edge already exists in the graph.`);let E=!1,_=!1;m||(m=Z0(e,s,{}),E=!0,s===c&&(g=m,_=!0)),g||(g=Z0(e,c,{}),_=!0),y=new Yo(a,o,m,g,u),e._edges.set(o,y);const N=s===c;return a?(m.undirectedDegree++,g.undirectedDegree++,N&&(m.undirectedLoops++,e._undirectedSelfLoopCount++)):(m.outDegree++,g.inDegree++,N&&(m.directedLoops++,e._directedSelfLoopCount++)),e.multi?y.attachMulti():y.attach(),a?e._undirectedSize++:e._directedSize++,S.key=o,e.emit("edgeAdded",S),[o,!0,E,_]}function Eo(e,t){e._edges.delete(t.key);const{source:n,target:a,attributes:o}=t,s=t.undirected,c=n===a;s?(n.undirectedDegree--,a.undirectedDegree--,c&&(n.undirectedLoops--,e._undirectedSelfLoopCount--)):(n.outDegree--,a.inDegree--,c&&(n.directedLoops--,e._directedSelfLoopCount--)),e.multi?t.detachMulti():t.detach(),s?e._undirectedSize--:e._directedSize--,e.emit("edgeDropped",{key:t.key,attributes:o,source:n.key,target:a.key,undirected:s})}class ft extends tC.EventEmitter{constructor(t){if(super(),t=Pt({},$4,t),typeof t.multi!="boolean")throw new De(`Graph.constructor: invalid 'multi' option. Expecting a boolean but got "${t.multi}".`);if(!I4.has(t.type))throw new De(`Graph.constructor: invalid 'type' option. Should be one of "mixed", "directed" or "undirected" but got "${t.type}".`);if(typeof t.allowSelfLoops!="boolean")throw new De(`Graph.constructor: invalid 'allowSelfLoops' option. Expecting a boolean but got "${t.allowSelfLoops}".`);const n=t.type==="mixed"?rC:t.type==="directed"?aC:iC;Wn(this,"NodeDataClass",n);const a="geid_"+B4()+"_";let o=0;const s=()=>{let c;do c=a+o++;while(this._edges.has(c));return c};Wn(this,"_attributes",{}),Wn(this,"_nodes",new Map),Wn(this,"_edges",new Map),Wn(this,"_directedSize",0),Wn(this,"_undirectedSize",0),Wn(this,"_directedSelfLoopCount",0),Wn(this,"_undirectedSelfLoopCount",0),Wn(this,"_edgeKeyGenerator",s),Wn(this,"_options",t),K0.forEach(c=>Wn(this,c,this[c])),ir(this,"order",()=>this._nodes.size),ir(this,"size",()=>this._edges.size),ir(this,"directedSize",()=>this._directedSize),ir(this,"undirectedSize",()=>this._undirectedSize),ir(this,"selfLoopCount",()=>this._directedSelfLoopCount+this._undirectedSelfLoopCount),ir(this,"directedSelfLoopCount",()=>this._directedSelfLoopCount),ir(this,"undirectedSelfLoopCount",()=>this._undirectedSelfLoopCount),ir(this,"multi",this._options.multi),ir(this,"type",this._options.type),ir(this,"allowSelfLoops",this._options.allowSelfLoops),ir(this,"implementation",()=>"graphology")}_resetInstanceCounters(){this._directedSize=0,this._undirectedSize=0,this._directedSelfLoopCount=0,this._undirectedSelfLoopCount=0}hasNode(t){return this._nodes.has(""+t)}hasDirectedEdge(t,n){if(this.type==="undirected")return!1;if(arguments.length===1){const a=""+t,o=this._edges.get(a);return!!o&&!o.undirected}else if(arguments.length===2){t=""+t,n=""+n;const a=this._nodes.get(t);return a?a.out.hasOwnProperty(n):!1}throw new De(`Graph.hasDirectedEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}hasUndirectedEdge(t,n){if(this.type==="directed")return!1;if(arguments.length===1){const a=""+t,o=this._edges.get(a);return!!o&&o.undirected}else if(arguments.length===2){t=""+t,n=""+n;const a=this._nodes.get(t);return a?a.undirected.hasOwnProperty(n):!1}throw new De(`Graph.hasDirectedEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}hasEdge(t,n){if(arguments.length===1){const a=""+t;return this._edges.has(a)}else if(arguments.length===2){t=""+t,n=""+n;const a=this._nodes.get(t);return a?typeof a.out<"u"&&a.out.hasOwnProperty(n)||typeof a.undirected<"u"&&a.undirected.hasOwnProperty(n):!1}throw new De(`Graph.hasEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}directedEdge(t,n){if(this.type==="undirected")return;if(t=""+t,n=""+n,this.multi)throw new $e("Graph.directedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.directedEdges instead.");const a=this._nodes.get(t);if(!a)throw new Re(`Graph.directedEdge: could not find the "${t}" source node in the graph.`);if(!this._nodes.has(n))throw new Re(`Graph.directedEdge: could not find the "${n}" target node in the graph.`);const o=a.out&&a.out[n]||void 0;if(o)return o.key}undirectedEdge(t,n){if(this.type==="directed")return;if(t=""+t,n=""+n,this.multi)throw new $e("Graph.undirectedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.undirectedEdges instead.");const a=this._nodes.get(t);if(!a)throw new Re(`Graph.undirectedEdge: could not find the "${t}" source node in the graph.`);if(!this._nodes.has(n))throw new Re(`Graph.undirectedEdge: could not find the "${n}" target node in the graph.`);const o=a.undirected&&a.undirected[n]||void 0;if(o)return o.key}edge(t,n){if(this.multi)throw new $e("Graph.edge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.edges instead.");t=""+t,n=""+n;const a=this._nodes.get(t);if(!a)throw new Re(`Graph.edge: could not find the "${t}" source node in the graph.`);if(!this._nodes.has(n))throw new Re(`Graph.edge: could not find the "${n}" target node in the graph.`);const o=a.out&&a.out[n]||a.undirected&&a.undirected[n]||void 0;if(o)return o.key}areDirectedNeighbors(t,n){t=""+t,n=""+n;const a=this._nodes.get(t);if(!a)throw new Re(`Graph.areDirectedNeighbors: could not find the "${t}" node in the graph.`);return this.type==="undirected"?!1:n in a.in||n in a.out}areOutNeighbors(t,n){t=""+t,n=""+n;const a=this._nodes.get(t);if(!a)throw new Re(`Graph.areOutNeighbors: could not find the "${t}" node in the graph.`);return this.type==="undirected"?!1:n in a.out}areInNeighbors(t,n){t=""+t,n=""+n;const a=this._nodes.get(t);if(!a)throw new Re(`Graph.areInNeighbors: could not find the "${t}" node in the graph.`);return this.type==="undirected"?!1:n in a.in}areUndirectedNeighbors(t,n){t=""+t,n=""+n;const a=this._nodes.get(t);if(!a)throw new Re(`Graph.areUndirectedNeighbors: could not find the "${t}" node in the graph.`);return this.type==="directed"?!1:n in a.undirected}areNeighbors(t,n){t=""+t,n=""+n;const a=this._nodes.get(t);if(!a)throw new Re(`Graph.areNeighbors: could not find the "${t}" node in the graph.`);return this.type!=="undirected"&&(n in a.in||n in a.out)||this.type!=="directed"&&n in a.undirected}areInboundNeighbors(t,n){t=""+t,n=""+n;const a=this._nodes.get(t);if(!a)throw new Re(`Graph.areInboundNeighbors: could not find the "${t}" node in the graph.`);return this.type!=="undirected"&&n in a.in||this.type!=="directed"&&n in a.undirected}areOutboundNeighbors(t,n){t=""+t,n=""+n;const a=this._nodes.get(t);if(!a)throw new Re(`Graph.areOutboundNeighbors: could not find the "${t}" node in the graph.`);return this.type!=="undirected"&&n in a.out||this.type!=="directed"&&n in a.undirected}inDegree(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new Re(`Graph.inDegree: could not find the "${t}" node in the graph.`);return this.type==="undirected"?0:n.inDegree}outDegree(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new Re(`Graph.outDegree: could not find the "${t}" node in the graph.`);return this.type==="undirected"?0:n.outDegree}directedDegree(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new Re(`Graph.directedDegree: could not find the "${t}" node in the graph.`);return this.type==="undirected"?0:n.inDegree+n.outDegree}undirectedDegree(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new Re(`Graph.undirectedDegree: could not find the "${t}" node in the graph.`);return this.type==="directed"?0:n.undirectedDegree}inboundDegree(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new Re(`Graph.inboundDegree: could not find the "${t}" node in the graph.`);let a=0;return this.type!=="directed"&&(a+=n.undirectedDegree),this.type!=="undirected"&&(a+=n.inDegree),a}outboundDegree(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new Re(`Graph.outboundDegree: could not find the "${t}" node in the graph.`);let a=0;return this.type!=="directed"&&(a+=n.undirectedDegree),this.type!=="undirected"&&(a+=n.outDegree),a}degree(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new Re(`Graph.degree: could not find the "${t}" node in the graph.`);let a=0;return this.type!=="directed"&&(a+=n.undirectedDegree),this.type!=="undirected"&&(a+=n.inDegree+n.outDegree),a}inDegreeWithoutSelfLoops(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new Re(`Graph.inDegreeWithoutSelfLoops: could not find the "${t}" node in the graph.`);return this.type==="undirected"?0:n.inDegree-n.directedLoops}outDegreeWithoutSelfLoops(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new Re(`Graph.outDegreeWithoutSelfLoops: could not find the "${t}" node in the graph.`);return this.type==="undirected"?0:n.outDegree-n.directedLoops}directedDegreeWithoutSelfLoops(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new Re(`Graph.directedDegreeWithoutSelfLoops: could not find the "${t}" node in the graph.`);return this.type==="undirected"?0:n.inDegree+n.outDegree-n.directedLoops*2}undirectedDegreeWithoutSelfLoops(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new Re(`Graph.undirectedDegreeWithoutSelfLoops: could not find the "${t}" node in the graph.`);return this.type==="directed"?0:n.undirectedDegree-n.undirectedLoops*2}inboundDegreeWithoutSelfLoops(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new Re(`Graph.inboundDegreeWithoutSelfLoops: could not find the "${t}" node in the graph.`);let a=0,o=0;return this.type!=="directed"&&(a+=n.undirectedDegree,o+=n.undirectedLoops*2),this.type!=="undirected"&&(a+=n.inDegree,o+=n.directedLoops),a-o}outboundDegreeWithoutSelfLoops(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new Re(`Graph.outboundDegreeWithoutSelfLoops: could not find the "${t}" node in the graph.`);let a=0,o=0;return this.type!=="directed"&&(a+=n.undirectedDegree,o+=n.undirectedLoops*2),this.type!=="undirected"&&(a+=n.outDegree,o+=n.directedLoops),a-o}degreeWithoutSelfLoops(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new Re(`Graph.degreeWithoutSelfLoops: could not find the "${t}" node in the graph.`);let a=0,o=0;return this.type!=="directed"&&(a+=n.undirectedDegree,o+=n.undirectedLoops*2),this.type!=="undirected"&&(a+=n.inDegree+n.outDegree,o+=n.directedLoops*2),a-o}source(t){t=""+t;const n=this._edges.get(t);if(!n)throw new Re(`Graph.source: could not find the "${t}" edge in the graph.`);return n.source.key}target(t){t=""+t;const n=this._edges.get(t);if(!n)throw new Re(`Graph.target: could not find the "${t}" edge in the graph.`);return n.target.key}extremities(t){t=""+t;const n=this._edges.get(t);if(!n)throw new Re(`Graph.extremities: could not find the "${t}" edge in the graph.`);return[n.source.key,n.target.key]}opposite(t,n){t=""+t,n=""+n;const a=this._edges.get(n);if(!a)throw new Re(`Graph.opposite: could not find the "${n}" edge in the graph.`);const o=a.source.key,s=a.target.key;if(t===o)return s;if(t===s)return o;throw new Re(`Graph.opposite: the "${t}" node is not attached to the "${n}" edge (${o}, ${s}).`)}hasExtremity(t,n){t=""+t,n=""+n;const a=this._edges.get(t);if(!a)throw new Re(`Graph.hasExtremity: could not find the "${t}" edge in the graph.`);return a.source.key===n||a.target.key===n}isUndirected(t){t=""+t;const n=this._edges.get(t);if(!n)throw new Re(`Graph.isUndirected: could not find the "${t}" edge in the graph.`);return n.undirected}isDirected(t){t=""+t;const n=this._edges.get(t);if(!n)throw new Re(`Graph.isDirected: could not find the "${t}" edge in the graph.`);return!n.undirected}isSelfLoop(t){t=""+t;const n=this._edges.get(t);if(!n)throw new Re(`Graph.isSelfLoop: could not find the "${t}" edge in the graph.`);return n.source===n.target}addNode(t,n){return V4(this,t,n).key}mergeNode(t,n){if(n&&!Qt(n))throw new De(`Graph.mergeNode: invalid attributes. Expecting an object but got "${n}"`);t=""+t,n=n||{};let a=this._nodes.get(t);return a?(n&&(Pt(a.attributes,n),this.emit("nodeAttributesUpdated",{type:"merge",key:t,attributes:a.attributes,data:n})),[t,!1]):(a=new this.NodeDataClass(t,n),this._nodes.set(t,a),this.emit("nodeAdded",{key:t,attributes:n}),[t,!0])}updateNode(t,n){if(n&&typeof n!="function")throw new De(`Graph.updateNode: invalid updater function. Expecting a function but got "${n}"`);t=""+t;let a=this._nodes.get(t);if(a){if(n){const s=a.attributes;a.attributes=n(s),this.emit("nodeAttributesUpdated",{type:"replace",key:t,attributes:a.attributes})}return[t,!1]}const o=n?n({}):{};return a=new this.NodeDataClass(t,o),this._nodes.set(t,a),this.emit("nodeAdded",{key:t,attributes:o}),[t,!0]}dropNode(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new Re(`Graph.dropNode: could not find the "${t}" node in the graph.`);let a;if(this.type!=="undirected"){for(const o in n.out){a=n.out[o];do Eo(this,a),a=a.next;while(a)}for(const o in n.in){a=n.in[o];do Eo(this,a),a=a.next;while(a)}}if(this.type!=="directed")for(const o in n.undirected){a=n.undirected[o];do Eo(this,a),a=a.next;while(a)}this._nodes.delete(t),this.emit("nodeDropped",{key:t,attributes:n.attributes})}dropEdge(t){let n;if(arguments.length>1){const a=""+arguments[0],o=""+arguments[1];if(n=Xn(this,a,o,this.type),!n)throw new Re(`Graph.dropEdge: could not find the "${a}" -> "${o}" edge in the graph.`)}else if(t=""+t,n=this._edges.get(t),!n)throw new Re(`Graph.dropEdge: could not find the "${t}" edge in the graph.`);return Eo(this,n),this}dropDirectedEdge(t,n){if(arguments.length<2)throw new $e("Graph.dropDirectedEdge: it does not make sense to try and drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new $e("Graph.dropDirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");t=""+t,n=""+n;const a=Xn(this,t,n,"directed");if(!a)throw new Re(`Graph.dropDirectedEdge: could not find a "${t}" -> "${n}" edge in the graph.`);return Eo(this,a),this}dropUndirectedEdge(t,n){if(arguments.length<2)throw new $e("Graph.dropUndirectedEdge: it does not make sense to drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new $e("Graph.dropUndirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");const a=Xn(this,t,n,"undirected");if(!a)throw new Re(`Graph.dropUndirectedEdge: could not find a "${t}" -> "${n}" edge in the graph.`);return Eo(this,a),this}clear(){this._edges.clear(),this._nodes.clear(),this._resetInstanceCounters(),this.emit("cleared")}clearEdges(){const t=this._nodes.values();let n;for(;n=t.next(),n.done!==!0;)n.value.clear();this._edges.clear(),this._resetInstanceCounters(),this.emit("edgesCleared")}getAttribute(t){return this._attributes[t]}getAttributes(){return this._attributes}hasAttribute(t){return this._attributes.hasOwnProperty(t)}setAttribute(t,n){return this._attributes[t]=n,this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:t}),this}updateAttribute(t,n){if(typeof n!="function")throw new De("Graph.updateAttribute: updater should be a function.");const a=this._attributes[t];return this._attributes[t]=n(a),this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:t}),this}removeAttribute(t){return delete this._attributes[t],this.emit("attributesUpdated",{type:"remove",attributes:this._attributes,name:t}),this}replaceAttributes(t){if(!Qt(t))throw new De("Graph.replaceAttributes: provided attributes are not a plain object.");return this._attributes=t,this.emit("attributesUpdated",{type:"replace",attributes:this._attributes}),this}mergeAttributes(t){if(!Qt(t))throw new De("Graph.mergeAttributes: provided attributes are not a plain object.");return Pt(this._attributes,t),this.emit("attributesUpdated",{type:"merge",attributes:this._attributes,data:t}),this}updateAttributes(t){if(typeof t!="function")throw new De("Graph.updateAttributes: provided updater is not a function.");return this._attributes=t(this._attributes),this.emit("attributesUpdated",{type:"update",attributes:this._attributes}),this}updateEachNodeAttributes(t,n){if(typeof t!="function")throw new De("Graph.updateEachNodeAttributes: expecting an updater function.");if(n&&!X0(n))throw new De("Graph.updateEachNodeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");const a=this._nodes.values();let o,s;for(;o=a.next(),o.done!==!0;)s=o.value,s.attributes=t(s.key,s.attributes);this.emit("eachNodeAttributesUpdated",{hints:n||null})}updateEachEdgeAttributes(t,n){if(typeof t!="function")throw new De("Graph.updateEachEdgeAttributes: expecting an updater function.");if(n&&!X0(n))throw new De("Graph.updateEachEdgeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");const a=this._edges.values();let o,s,c,u;for(;o=a.next(),o.done!==!0;)s=o.value,c=s.source,u=s.target,s.attributes=t(s.key,s.attributes,c.key,u.key,c.attributes,u.attributes,s.undirected);this.emit("eachEdgeAttributesUpdated",{hints:n||null})}forEachAdjacencyEntry(t){if(typeof t!="function")throw new De("Graph.forEachAdjacencyEntry: expecting a callback.");Kc(!1,!1,!1,this,t)}forEachAdjacencyEntryWithOrphans(t){if(typeof t!="function")throw new De("Graph.forEachAdjacencyEntryWithOrphans: expecting a callback.");Kc(!1,!1,!0,this,t)}forEachAssymetricAdjacencyEntry(t){if(typeof t!="function")throw new De("Graph.forEachAssymetricAdjacencyEntry: expecting a callback.");Kc(!1,!0,!1,this,t)}forEachAssymetricAdjacencyEntryWithOrphans(t){if(typeof t!="function")throw new De("Graph.forEachAssymetricAdjacencyEntryWithOrphans: expecting a callback.");Kc(!1,!0,!0,this,t)}nodes(){return Array.from(this._nodes.keys())}forEachNode(t){if(typeof t!="function")throw new De("Graph.forEachNode: expecting a callback.");const n=this._nodes.values();let a,o;for(;a=n.next(),a.done!==!0;)o=a.value,t(o.key,o.attributes)}findNode(t){if(typeof t!="function")throw new De("Graph.findNode: expecting a callback.");const n=this._nodes.values();let a,o;for(;a=n.next(),a.done!==!0;)if(o=a.value,t(o.key,o.attributes))return o.key}mapNodes(t){if(typeof t!="function")throw new De("Graph.mapNode: expecting a callback.");const n=this._nodes.values();let a,o;const s=new Array(this.order);let c=0;for(;a=n.next(),a.done!==!0;)o=a.value,s[c++]=t(o.key,o.attributes);return s}someNode(t){if(typeof t!="function")throw new De("Graph.someNode: expecting a callback.");const n=this._nodes.values();let a,o;for(;a=n.next(),a.done!==!0;)if(o=a.value,t(o.key,o.attributes))return!0;return!1}everyNode(t){if(typeof t!="function")throw new De("Graph.everyNode: expecting a callback.");const n=this._nodes.values();let a,o;for(;a=n.next(),a.done!==!0;)if(o=a.value,!t(o.key,o.attributes))return!1;return!0}filterNodes(t){if(typeof t!="function")throw new De("Graph.filterNodes: expecting a callback.");const n=this._nodes.values();let a,o;const s=[];for(;a=n.next(),a.done!==!0;)o=a.value,t(o.key,o.attributes)&&s.push(o.key);return s}reduceNodes(t,n){if(typeof t!="function")throw new De("Graph.reduceNodes: expecting a callback.");if(arguments.length<2)throw new De("Graph.reduceNodes: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.");let a=n;const o=this._nodes.values();let s,c;for(;s=o.next(),s.done!==!0;)c=s.value,a=t(a,c.key,c.attributes);return a}nodeEntries(){const t=this._nodes.values();return{[Symbol.iterator](){return this},next(){const n=t.next();if(n.done)return n;const a=n.value;return{value:{node:a.key,attributes:a.attributes},done:!1}}}}export(){const t=new Array(this._nodes.size);let n=0;this._nodes.forEach((o,s)=>{t[n++]=P4(s,o)});const a=new Array(this._edges.size);return n=0,this._edges.forEach((o,s)=>{a[n++]=G4(this.type,s,o)}),{options:{type:this.type,multi:this.multi,allowSelfLoops:this.allowSelfLoops},attributes:this.getAttributes(),nodes:t,edges:a}}import(t,n=!1){if(t instanceof ft)return t.forEachNode((f,h)=>{n?this.mergeNode(f,h):this.addNode(f,h)}),t.forEachEdge((f,h,m,g,y,b,S)=>{n?S?this.mergeUndirectedEdgeWithKey(f,m,g,h):this.mergeDirectedEdgeWithKey(f,m,g,h):S?this.addUndirectedEdgeWithKey(f,m,g,h):this.addDirectedEdgeWithKey(f,m,g,h)}),this;if(!Qt(t))throw new De("Graph.import: invalid argument. Expecting a serialized graph or, alternatively, a Graph instance.");if(t.attributes){if(!Qt(t.attributes))throw new De("Graph.import: invalid attributes. Expecting a plain object.");n?this.mergeAttributes(t.attributes):this.replaceAttributes(t.attributes)}let a,o,s,c,u;if(t.nodes){if(s=t.nodes,!Array.isArray(s))throw new De("Graph.import: invalid nodes. Expecting an array.");for(a=0,o=s.length;a{const s=Pt({},a.attributes);a=new n.NodeDataClass(o,s),n._nodes.set(o,a)}),n}copy(t){if(t=t||{},typeof t.type=="string"&&t.type!==this.type&&t.type!=="mixed")throw new $e(`Graph.copy: cannot create an incompatible copy from "${this.type}" type to "${t.type}" because this would mean losing information about the current graph.`);if(typeof t.multi=="boolean"&&t.multi!==this.multi&&t.multi!==!0)throw new $e("Graph.copy: cannot create an incompatible copy by downgrading a multi graph to a simple one because this would mean losing information about the current graph.");if(typeof t.allowSelfLoops=="boolean"&&t.allowSelfLoops!==this.allowSelfLoops&&t.allowSelfLoops!==!0)throw new $e("Graph.copy: cannot create an incompatible copy from a graph allowing self loops to one that does not because this would mean losing information about the current graph.");const n=this.emptyCopy(t),a=this._edges.values();let o,s;for(;o=a.next(),o.done!==!0;)s=o.value,uC(n,"copy",!1,s.undirected,s.key,s.source.key,s.target.key,Pt({},s.attributes));return n}toJSON(){return this.export()}toString(){return"[object Graph]"}inspect(){const t={};this._nodes.forEach((s,c)=>{t[c]=s.attributes});const n={},a={};this._edges.forEach((s,c)=>{const u=s.undirected?"--":"->";let f="",h=s.source.key,m=s.target.key,g;s.undirected&&h>m&&(g=h,h=m,m=g);const y=`(${h})${u}(${m})`;c.startsWith("geid_")?this.multi&&(typeof a[y]>"u"?a[y]=0:a[y]++,f+=`${a[y]}. `):f+=`[${c}]: `,f+=y,n[f]=s.attributes});const o={};for(const s in this)this.hasOwnProperty(s)&&!K0.has(s)&&typeof this[s]!="function"&&typeof s!="symbol"&&(o[s]=this[s]);return o.attributes=this._attributes,o.nodes=t,o.edges=n,Wn(o,"constructor",this.constructor),o}}typeof Symbol<"u"&&(ft.prototype[Symbol.for("nodejs.util.inspect.custom")]=ft.prototype.inspect);H4.forEach(e=>{["add","merge","update"].forEach(t=>{const n=e.name(t),a=t==="add"?uC:q4;e.generateKey?ft.prototype[n]=function(o,s,c){return a(this,n,!0,(e.type||this.type)==="undirected",null,o,s,c,t==="update")}:ft.prototype[n]=function(o,s,c,u){return a(this,n,!1,(e.type||this.type)==="undirected",o,s,c,u,t==="update")}})});t4(ft);f4(ft);A4(ft);M4(ft);class dl extends ft{constructor(t){const n=Pt({type:"directed"},t);if("multi"in n&&n.multi!==!1)throw new De("DirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if(n.type!=="directed")throw new De('DirectedGraph.from: inconsistent "'+n.type+'" type in given options!');super(n)}}class dC extends ft{constructor(t){const n=Pt({type:"undirected"},t);if("multi"in n&&n.multi!==!1)throw new De("UndirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if(n.type!=="undirected")throw new De('UndirectedGraph.from: inconsistent "'+n.type+'" type in given options!');super(n)}}class fC extends ft{constructor(t){const n=Pt({multi:!0},t);if("multi"in n&&n.multi!==!0)throw new De("MultiGraph.from: inconsistent indication that the graph should be simple in given options!");super(n)}}class hC extends ft{constructor(t){const n=Pt({type:"directed",multi:!0},t);if("multi"in n&&n.multi!==!0)throw new De("MultiDirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if(n.type!=="directed")throw new De('MultiDirectedGraph.from: inconsistent "'+n.type+'" type in given options!');super(n)}}class pC extends ft{constructor(t){const n=Pt({type:"undirected",multi:!0},t);if("multi"in n&&n.multi!==!0)throw new De("MultiUndirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if(n.type!=="undirected")throw new De('MultiUndirectedGraph.from: inconsistent "'+n.type+'" type in given options!');super(n)}}function Wo(e){e.from=function(t,n){const a=Pt({},t.options,n),o=new e(a);return o.import(t),o}}Wo(ft);Wo(dl);Wo(dC);Wo(fC);Wo(hC);Wo(pC);ft.Graph=ft;ft.DirectedGraph=dl;ft.UndirectedGraph=dC;ft.MultiGraph=fC;ft.MultiDirectedGraph=hC;ft.MultiUndirectedGraph=pC;ft.InvalidArgumentsGraphError=De;ft.NotFoundGraphError=Re;ft.UsageGraphError=$e;function Y4(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,t);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function ol(e){var t=Y4(e,"string");return typeof t=="symbol"?t:t+""}function $t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Q0(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,a=Array(t);n>8&255,s=n>>16&255,c=n>>24&255;return[a,o,s,c]}var sp={};function xC(e){if(typeof sp[e]<"u")return sp[e];var t=(e&16711680)>>>16,n=(e&65280)>>>8,a=e&255,o=255,s=bC(t,n,a,o);return sp[e]=s,s}function J0(e,t,n,a){return n+(t<<8)+(e<<16)}function ew(e,t,n,a,o,s){var c=Math.floor(n/s*o),u=Math.floor(e.drawingBufferHeight/s-a/s*o),f=new Uint8Array(4);e.bindFramebuffer(e.FRAMEBUFFER,t),e.readPixels(c,u,1,1,e.RGBA,e.UNSIGNED_BYTE,f);var h=Mo(f,4),m=h[0],g=h[1],y=h[2],b=h[3];return[m,g,y,b]}function we(e,t,n){return(t=ol(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,a)}return n}function ze(e){for(var t=1;tk){var M="…";for(h=h+M,D=e.measureText(h).width;D>k&&h.length>1;)h=h.slice(0,-2)+M,D=e.measureText(h).width;if(h.length<4)return}var R;C>0?A>0?R=Math.acos(C/k):R=Math.asin(A/k):A>0?R=Math.acos(C/k)+Math.PI:R=Math.asin(C/k)+Math.PI/2,e.save(),e.translate(_,N),e.rotate(R),e.fillText(h,-D/2,t.size/2+s),e.restore()}}}function CC(e,t,n){if(t.label){var a=n.labelSize,o=n.labelFont,s=n.labelWeight,c=n.labelColor.attribute?t[n.labelColor.attribute]||n.labelColor.color||"#000":n.labelColor.color;e.fillStyle=c,e.font="".concat(s," ").concat(a,"px ").concat(o),e.fillText(t.label,t.x+t.size+3,t.y+a/3)}}function uG(e,t,n){var a=n.labelSize,o=n.labelFont,s=n.labelWeight;e.font="".concat(s," ").concat(a,"px ").concat(o),e.fillStyle="#FFF",e.shadowOffsetX=0,e.shadowOffsetY=0,e.shadowBlur=8,e.shadowColor="#000";var c=2;if(typeof t.label=="string"){var u=e.measureText(t.label).width,f=Math.round(u+5),h=Math.round(a+2*c),m=Math.max(t.size,a/2)+c,g=Math.asin(h/2/m),y=Math.sqrt(Math.abs(Math.pow(m,2)-Math.pow(h/2,2)));e.beginPath(),e.moveTo(t.x+y,t.y+h/2),e.lineTo(t.x+m+f,t.y+h/2),e.lineTo(t.x+m+f,t.y-h/2),e.lineTo(t.x+y,t.y-h/2),e.arc(t.x,t.y,m,g,-g),e.closePath(),e.fill()}else e.beginPath(),e.arc(t.x,t.y,t.size+c,0,Math.PI*2),e.closePath(),e.fill();e.shadowOffsetX=0,e.shadowOffsetY=0,e.shadowBlur=0,CC(e,t,n)}var dG=` -precision highp float; - -varying vec4 v_color; -varying vec2 v_diffVector; -varying float v_radius; - -uniform float u_correctionRatio; - -const vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0); - -void main(void) { - float border = u_correctionRatio * 2.0; - float dist = length(v_diffVector) - v_radius + border; - - // No antialiasing for picking mode: - #ifdef PICKING_MODE - if (dist > border) - gl_FragColor = transparent; - else - gl_FragColor = v_color; - - #else - float t = 0.0; - if (dist > border) - t = 1.0; - else if (dist > 0.0) - t = dist / border; - - gl_FragColor = mix(v_color, transparent, t); - #endif -} -`,fG=dG,hG=` -attribute vec4 a_id; -attribute vec4 a_color; -attribute vec2 a_position; -attribute float a_size; -attribute float a_angle; - -uniform mat3 u_matrix; -uniform float u_sizeRatio; -uniform float u_correctionRatio; - -varying vec4 v_color; -varying vec2 v_diffVector; -varying float v_radius; -varying float v_border; - -const float bias = 255.0 / 254.0; - -void main() { - float size = a_size * u_correctionRatio / u_sizeRatio * 4.0; - vec2 diffVector = size * vec2(cos(a_angle), sin(a_angle)); - vec2 position = a_position + diffVector; - gl_Position = vec4( - (u_matrix * vec3(position, 1)).xy, - 0, - 1 - ); - - v_diffVector = diffVector; - v_radius = size / 2.0; - - #ifdef PICKING_MODE - // For picking mode, we use the ID as the color: - v_color = a_id; - #else - // For normal mode, we use the color: - v_color = a_color; - #endif - - v_color.a *= bias; -} -`,pG=hG,TC=WebGLRenderingContext,iw=TC.UNSIGNED_BYTE,cp=TC.FLOAT,mG=["u_sizeRatio","u_correctionRatio","u_matrix"],Tl=function(e){function t(){return $t(this,t),Sn(this,t,arguments)}return _n(t,e),Vt(t,[{key:"getDefinition",value:function(){return{VERTICES:3,VERTEX_SHADER_SOURCE:pG,FRAGMENT_SHADER_SOURCE:fG,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:mG,ATTRIBUTES:[{name:"a_position",size:2,type:cp},{name:"a_size",size:1,type:cp},{name:"a_color",size:4,type:iw,normalized:!0},{name:"a_id",size:4,type:iw,normalized:!0}],CONSTANT_ATTRIBUTES:[{name:"a_angle",size:1,type:cp}],CONSTANT_DATA:[[t.ANGLE_1],[t.ANGLE_2],[t.ANGLE_3]]}}},{key:"processVisibleItem",value:function(a,o,s){var c=this.array,u=Ar(s.color);c[o++]=s.x,c[o++]=s.y,c[o++]=s.size,c[o++]=u,c[o++]=a}},{key:"setUniforms",value:function(a,o){var s=o.gl,c=o.uniformLocations,u=c.u_sizeRatio,f=c.u_correctionRatio,h=c.u_matrix;s.uniform1f(f,a.correctionRatio),s.uniform1f(u,a.sizeRatio),s.uniformMatrix3fv(h,!1,a.matrix)}}])}(Ig);we(Tl,"ANGLE_1",0);we(Tl,"ANGLE_2",2*Math.PI/3);we(Tl,"ANGLE_3",4*Math.PI/3);var gG=` -precision mediump float; - -varying vec4 v_color; - -void main(void) { - gl_FragColor = v_color; -} -`,vG=gG,yG=` -attribute vec2 a_position; -attribute vec2 a_normal; -attribute float a_radius; -attribute vec3 a_barycentric; - -#ifdef PICKING_MODE -attribute vec4 a_id; -#else -attribute vec4 a_color; -#endif - -uniform mat3 u_matrix; -uniform float u_sizeRatio; -uniform float u_correctionRatio; -uniform float u_minEdgeThickness; -uniform float u_lengthToThicknessRatio; -uniform float u_widenessToThicknessRatio; - -varying vec4 v_color; - -const float bias = 255.0 / 254.0; - -void main() { - float minThickness = u_minEdgeThickness; - - float normalLength = length(a_normal); - vec2 unitNormal = a_normal / normalLength; - - // These first computations are taken from edge.vert.glsl and - // edge.clamped.vert.glsl. Please read it to get better comments on what's - // happening: - float pixelsThickness = max(normalLength / u_sizeRatio, minThickness); - float webGLThickness = pixelsThickness * u_correctionRatio; - float webGLNodeRadius = a_radius * 2.0 * u_correctionRatio / u_sizeRatio; - float webGLArrowHeadLength = webGLThickness * u_lengthToThicknessRatio * 2.0; - float webGLArrowHeadThickness = webGLThickness * u_widenessToThicknessRatio; - - float da = a_barycentric.x; - float db = a_barycentric.y; - float dc = a_barycentric.z; - - vec2 delta = vec2( - da * (webGLNodeRadius * unitNormal.y) - + db * ((webGLNodeRadius + webGLArrowHeadLength) * unitNormal.y + webGLArrowHeadThickness * unitNormal.x) - + dc * ((webGLNodeRadius + webGLArrowHeadLength) * unitNormal.y - webGLArrowHeadThickness * unitNormal.x), - - da * (-webGLNodeRadius * unitNormal.x) - + db * (-(webGLNodeRadius + webGLArrowHeadLength) * unitNormal.x + webGLArrowHeadThickness * unitNormal.y) - + dc * (-(webGLNodeRadius + webGLArrowHeadLength) * unitNormal.x - webGLArrowHeadThickness * unitNormal.y) - ); - - vec2 position = (u_matrix * vec3(a_position + delta, 1)).xy; - - gl_Position = vec4(position, 0, 1); - - #ifdef PICKING_MODE - // For picking mode, we use the ID as the color: - v_color = a_id; - #else - // For normal mode, we use the color: - v_color = a_color; - #endif - - v_color.a *= bias; -} -`,bG=yG,RC=WebGLRenderingContext,ow=RC.UNSIGNED_BYTE,Qc=RC.FLOAT,xG=["u_matrix","u_sizeRatio","u_correctionRatio","u_minEdgeThickness","u_lengthToThicknessRatio","u_widenessToThicknessRatio"],Rl={extremity:"target",lengthToThicknessRatio:2.5,widenessToThicknessRatio:2};function ju(e){var t=ze(ze({},Rl),e||{});return function(n){function a(){return $t(this,a),Sn(this,a,arguments)}return _n(a,n),Vt(a,[{key:"getDefinition",value:function(){return{VERTICES:3,VERTEX_SHADER_SOURCE:bG,FRAGMENT_SHADER_SOURCE:vG,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:xG,ATTRIBUTES:[{name:"a_position",size:2,type:Qc},{name:"a_normal",size:2,type:Qc},{name:"a_radius",size:1,type:Qc},{name:"a_color",size:4,type:ow,normalized:!0},{name:"a_id",size:4,type:ow,normalized:!0}],CONSTANT_ATTRIBUTES:[{name:"a_barycentric",size:3,type:Qc}],CONSTANT_DATA:[[1,0,0],[0,1,0],[0,0,1]]}}},{key:"processVisibleItem",value:function(s,c,u,f,h){if(t.extremity==="source"){var m=[f,u];u=m[0],f=m[1]}var g=h.size||1,y=f.size||1,b=u.x,S=u.y,E=f.x,_=f.y,N=Ar(h.color),C=E-b,A=_-S,k=C*C+A*A,D=0,M=0;k&&(k=1/Math.sqrt(k),D=-A*k*g,M=C*k*g);var R=this.array;R[c++]=E,R[c++]=_,R[c++]=-D,R[c++]=-M,R[c++]=y,R[c++]=N,R[c++]=s}},{key:"setUniforms",value:function(s,c){var u=c.gl,f=c.uniformLocations,h=f.u_matrix,m=f.u_sizeRatio,g=f.u_correctionRatio,y=f.u_minEdgeThickness,b=f.u_lengthToThicknessRatio,S=f.u_widenessToThicknessRatio;u.uniformMatrix3fv(h,!1,s.matrix),u.uniform1f(m,s.sizeRatio),u.uniform1f(g,s.correctionRatio),u.uniform1f(y,s.minEdgeThickness),u.uniform1f(b,t.lengthToThicknessRatio),u.uniform1f(S,t.widenessToThicknessRatio)}}])}(Cl)}ju();var wG=` -precision mediump float; - -varying vec4 v_color; -varying vec2 v_normal; -varying float v_thickness; -varying float v_feather; - -const vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0); - -void main(void) { - // We only handle antialiasing for normal mode: - #ifdef PICKING_MODE - gl_FragColor = v_color; - #else - float dist = length(v_normal) * v_thickness; - - float t = smoothstep( - v_thickness - v_feather, - v_thickness, - dist - ); - - gl_FragColor = mix(v_color, transparent, t); - #endif -} -`,Hg=wG,EG=` -attribute vec4 a_id; -attribute vec4 a_color; -attribute vec2 a_normal; -attribute float a_normalCoef; -attribute vec2 a_positionStart; -attribute vec2 a_positionEnd; -attribute float a_positionCoef; -attribute float a_radius; -attribute float a_radiusCoef; - -uniform mat3 u_matrix; -uniform float u_zoomRatio; -uniform float u_sizeRatio; -uniform float u_pixelRatio; -uniform float u_correctionRatio; -uniform float u_minEdgeThickness; -uniform float u_lengthToThicknessRatio; -uniform float u_feather; - -varying vec4 v_color; -varying vec2 v_normal; -varying float v_thickness; -varying float v_feather; - -const float bias = 255.0 / 254.0; - -void main() { - float minThickness = u_minEdgeThickness; - - float radius = a_radius * a_radiusCoef; - vec2 normal = a_normal * a_normalCoef; - vec2 position = a_positionStart * (1.0 - a_positionCoef) + a_positionEnd * a_positionCoef; - - float normalLength = length(normal); - vec2 unitNormal = normal / normalLength; - - // These first computations are taken from edge.vert.glsl. Please read it to - // get better comments on what's happening: - float pixelsThickness = max(normalLength, minThickness * u_sizeRatio); - float webGLThickness = pixelsThickness * u_correctionRatio / u_sizeRatio; - - // Here, we move the point to leave space for the arrow head: - float direction = sign(radius); - float webGLNodeRadius = direction * radius * 2.0 * u_correctionRatio / u_sizeRatio; - float webGLArrowHeadLength = webGLThickness * u_lengthToThicknessRatio * 2.0; - - vec2 compensationVector = vec2(-direction * unitNormal.y, direction * unitNormal.x) * (webGLNodeRadius + webGLArrowHeadLength); - - // Here is the proper position of the vertex - gl_Position = vec4((u_matrix * vec3(position + unitNormal * webGLThickness + compensationVector, 1)).xy, 0, 1); - - v_thickness = webGLThickness / u_zoomRatio; - - v_normal = unitNormal; - - v_feather = u_feather * u_correctionRatio / u_zoomRatio / u_pixelRatio * 2.0; - - #ifdef PICKING_MODE - // For picking mode, we use the ID as the color: - v_color = a_id; - #else - // For normal mode, we use the color: - v_color = a_color; - #endif - - v_color.a *= bias; -} -`,SG=EG,AC=WebGLRenderingContext,sw=AC.UNSIGNED_BYTE,yi=AC.FLOAT,_G=["u_matrix","u_zoomRatio","u_sizeRatio","u_correctionRatio","u_pixelRatio","u_feather","u_minEdgeThickness","u_lengthToThicknessRatio"],CG={lengthToThicknessRatio:Rl.lengthToThicknessRatio};function DC(e){var t=ze(ze({},CG),{});return function(n){function a(){return $t(this,a),Sn(this,a,arguments)}return _n(a,n),Vt(a,[{key:"getDefinition",value:function(){return{VERTICES:6,VERTEX_SHADER_SOURCE:SG,FRAGMENT_SHADER_SOURCE:Hg,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:_G,ATTRIBUTES:[{name:"a_positionStart",size:2,type:yi},{name:"a_positionEnd",size:2,type:yi},{name:"a_normal",size:2,type:yi},{name:"a_color",size:4,type:sw,normalized:!0},{name:"a_id",size:4,type:sw,normalized:!0},{name:"a_radius",size:1,type:yi}],CONSTANT_ATTRIBUTES:[{name:"a_positionCoef",size:1,type:yi},{name:"a_normalCoef",size:1,type:yi},{name:"a_radiusCoef",size:1,type:yi}],CONSTANT_DATA:[[0,1,0],[0,-1,0],[1,1,1],[1,1,1],[0,-1,0],[1,-1,-1]]}}},{key:"processVisibleItem",value:function(s,c,u,f,h){var m=h.size||1,g=u.x,y=u.y,b=f.x,S=f.y,E=Ar(h.color),_=b-g,N=S-y,C=f.size||1,A=_*_+N*N,k=0,D=0;A&&(A=1/Math.sqrt(A),k=-N*A*m,D=_*A*m);var M=this.array;M[c++]=g,M[c++]=y,M[c++]=b,M[c++]=S,M[c++]=k,M[c++]=D,M[c++]=E,M[c++]=s,M[c++]=C}},{key:"setUniforms",value:function(s,c){var u=c.gl,f=c.uniformLocations,h=f.u_matrix,m=f.u_zoomRatio,g=f.u_feather,y=f.u_pixelRatio,b=f.u_correctionRatio,S=f.u_sizeRatio,E=f.u_minEdgeThickness,_=f.u_lengthToThicknessRatio;u.uniformMatrix3fv(h,!1,s.matrix),u.uniform1f(m,s.zoomRatio),u.uniform1f(S,s.sizeRatio),u.uniform1f(b,s.correctionRatio),u.uniform1f(y,s.pixelRatio),u.uniform1f(g,s.antiAliasingFeather),u.uniform1f(E,s.minEdgeThickness),u.uniform1f(_,t.lengthToThicknessRatio)}}])}(Cl)}DC();function TG(e){return _C([DC(),ju(e)])}var RG=TG(),kC=RG,AG=` -attribute vec4 a_id; -attribute vec4 a_color; -attribute vec2 a_normal; -attribute float a_normalCoef; -attribute vec2 a_positionStart; -attribute vec2 a_positionEnd; -attribute float a_positionCoef; - -uniform mat3 u_matrix; -uniform float u_sizeRatio; -uniform float u_zoomRatio; -uniform float u_pixelRatio; -uniform float u_correctionRatio; -uniform float u_minEdgeThickness; -uniform float u_feather; - -varying vec4 v_color; -varying vec2 v_normal; -varying float v_thickness; -varying float v_feather; - -const float bias = 255.0 / 254.0; - -void main() { - float minThickness = u_minEdgeThickness; - - vec2 normal = a_normal * a_normalCoef; - vec2 position = a_positionStart * (1.0 - a_positionCoef) + a_positionEnd * a_positionCoef; - - float normalLength = length(normal); - vec2 unitNormal = normal / normalLength; - - // We require edges to be at least "minThickness" pixels thick *on screen* - // (so we need to compensate the size ratio): - float pixelsThickness = max(normalLength, minThickness * u_sizeRatio); - - // Then, we need to retrieve the normalized thickness of the edge in the WebGL - // referential (in a ([0, 1], [0, 1]) space), using our "magic" correction - // ratio: - float webGLThickness = pixelsThickness * u_correctionRatio / u_sizeRatio; - - // Here is the proper position of the vertex - gl_Position = vec4((u_matrix * vec3(position + unitNormal * webGLThickness, 1)).xy, 0, 1); - - // For the fragment shader though, we need a thickness that takes the "magic" - // correction ratio into account (as in webGLThickness), but so that the - // antialiasing effect does not depend on the zoom level. So here's yet - // another thickness version: - v_thickness = webGLThickness / u_zoomRatio; - - v_normal = unitNormal; - - v_feather = u_feather * u_correctionRatio / u_zoomRatio / u_pixelRatio * 2.0; - - #ifdef PICKING_MODE - // For picking mode, we use the ID as the color: - v_color = a_id; - #else - // For normal mode, we use the color: - v_color = a_color; - #endif - - v_color.a *= bias; -} -`,DG=AG,NC=WebGLRenderingContext,lw=NC.UNSIGNED_BYTE,Zs=NC.FLOAT,kG=["u_matrix","u_zoomRatio","u_sizeRatio","u_correctionRatio","u_pixelRatio","u_feather","u_minEdgeThickness"],NG=function(e){function t(){return $t(this,t),Sn(this,t,arguments)}return _n(t,e),Vt(t,[{key:"getDefinition",value:function(){return{VERTICES:6,VERTEX_SHADER_SOURCE:DG,FRAGMENT_SHADER_SOURCE:Hg,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:kG,ATTRIBUTES:[{name:"a_positionStart",size:2,type:Zs},{name:"a_positionEnd",size:2,type:Zs},{name:"a_normal",size:2,type:Zs},{name:"a_color",size:4,type:lw,normalized:!0},{name:"a_id",size:4,type:lw,normalized:!0}],CONSTANT_ATTRIBUTES:[{name:"a_positionCoef",size:1,type:Zs},{name:"a_normalCoef",size:1,type:Zs}],CONSTANT_DATA:[[0,1],[0,-1],[1,1],[1,1],[0,-1],[1,-1]]}}},{key:"processVisibleItem",value:function(a,o,s,c,u){var f=u.size||1,h=s.x,m=s.y,g=c.x,y=c.y,b=Ar(u.color),S=g-h,E=y-m,_=S*S+E*E,N=0,C=0;_&&(_=1/Math.sqrt(_),N=-E*_*f,C=S*_*f);var A=this.array;A[o++]=h,A[o++]=m,A[o++]=g,A[o++]=y,A[o++]=N,A[o++]=C,A[o++]=b,A[o++]=a}},{key:"setUniforms",value:function(a,o){var s=o.gl,c=o.uniformLocations,u=c.u_matrix,f=c.u_zoomRatio,h=c.u_feather,m=c.u_pixelRatio,g=c.u_correctionRatio,y=c.u_sizeRatio,b=c.u_minEdgeThickness;s.uniformMatrix3fv(u,!1,a.matrix),s.uniform1f(f,a.zoomRatio),s.uniform1f(y,a.sizeRatio),s.uniform1f(g,a.correctionRatio),s.uniform1f(m,a.pixelRatio),s.uniform1f(h,a.antiAliasingFeather),s.uniform1f(b,a.minEdgeThickness)}}])}(Cl),$g=function(e){function t(){var n;return $t(this,t),n=Sn(this,t),n.rawEmitter=n,n}return _n(t,e),Vt(t)}(tC.EventEmitter),up,cw;function Dr(){return cw||(cw=1,up=function(t){return t!==null&&typeof t=="object"&&typeof t.addUndirectedEdgeWithKey=="function"&&typeof t.dropNode=="function"&&typeof t.multi=="boolean"}),up}var OG=Dr();const jG=dn(OG);var LG=function(t){return t},zG=function(t){return t*t},MG=function(t){return t*(2-t)},PG=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},GG=function(t){return t*t*t},FG=function(t){return--t*t*t+1},UG=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},OC={linear:LG,quadraticIn:zG,quadraticOut:MG,quadraticInOut:PG,cubicIn:GG,cubicOut:FG,cubicInOut:UG},jC={easing:"quadraticInOut",duration:150};function BG(e,t,n,a){var o=Object.assign({},jC,n),s=typeof o.easing=="function"?o.easing:OC[o.easing],c=Date.now(),u={};for(var f in t){var h=t[f];u[f]={};for(var m in h)u[f][m]=e.getNodeAttribute(f,m)}var g=null,y=function(){g=null;var S=(Date.now()-c)/o.duration;if(S>=1){for(var E in t){var _=t[E];for(var N in _)e.setNodeAttribute(E,N,_[N])}return}S=s(S);for(var C in t){var A=t[C],k=u[C];for(var D in A)e.setNodeAttribute(C,D,A[D]*S+k[D]*(1-S))}g=requestAnimationFrame(y)};return y(),function(){g&&cancelAnimationFrame(g)}}function or(){return Float32Array.of(1,0,0,0,1,0,0,0,1)}function Jc(e,t,n){return e[0]=t,e[4]=typeof n=="number"?n:t,e}function uw(e,t){var n=Math.sin(t),a=Math.cos(t);return e[0]=a,e[1]=n,e[3]=-n,e[4]=a,e}function dw(e,t,n){return e[6]=t,e[7]=n,e}function ja(e,t){var n=e[0],a=e[1],o=e[2],s=e[3],c=e[4],u=e[5],f=e[6],h=e[7],m=e[8],g=t[0],y=t[1],b=t[2],S=t[3],E=t[4],_=t[5],N=t[6],C=t[7],A=t[8];return e[0]=g*n+y*s+b*f,e[1]=g*a+y*c+b*h,e[2]=g*o+y*u+b*m,e[3]=S*n+E*s+_*f,e[4]=S*a+E*c+_*h,e[5]=S*o+E*u+_*m,e[6]=N*n+C*s+A*f,e[7]=N*a+C*c+A*h,e[8]=N*o+C*u+A*m,e}function _m(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,a=e[0],o=e[1],s=e[3],c=e[4],u=e[6],f=e[7],h=t.x,m=t.y;return{x:h*a+m*s+u*n,y:h*o+m*c+f*n}}function IG(e,t){var n=e.height/e.width,a=t.height/t.width;return n<1&&a>1||n>1&&a<1?1:Math.min(Math.max(a,1/a),Math.max(1/n,n))}function Qs(e,t,n,a,o){var s=e.angle,c=e.ratio,u=e.x,f=e.y,h=t.width,m=t.height,g=or(),y=Math.min(h,m)-2*a,b=IG(t,n);return o?(ja(g,dw(or(),u,f)),ja(g,Jc(or(),c)),ja(g,uw(or(),s)),ja(g,Jc(or(),h/y/2/b,m/y/2/b))):(ja(g,Jc(or(),2*(y/h)*b,2*(y/m)*b)),ja(g,uw(or(),-s)),ja(g,Jc(or(),1/c)),ja(g,dw(or(),-u,-f))),g}function HG(e,t,n){var a=_m(e,{x:Math.cos(t.angle),y:Math.sin(t.angle)},0),o=a.x,s=a.y;return 1/Math.sqrt(Math.pow(o,2)+Math.pow(s,2))/n.width}function $G(e){if(!e.order)return{x:[0,1],y:[0,1]};var t=1/0,n=-1/0,a=1/0,o=-1/0;return e.forEachNode(function(s,c){var u=c.x,f=c.y;un&&(n=u),fo&&(o=f)}),{x:[t,n],y:[a,o]}}function VG(e){if(!jG(e))throw new Error("Sigma: invalid graph instance.");e.forEachNode(function(t,n){if(!Number.isFinite(n.x)||!Number.isFinite(n.y))throw new Error("Sigma: Coordinates of node ".concat(t," are invalid. A node must have a numeric 'x' and 'y' attribute."))})}function qG(e,t,n){var a=document.createElement(e);if(t)for(var o in t)a.style[o]=t[o];if(n)for(var s in n)a.setAttribute(s,n[s]);return a}function fw(){return typeof window.devicePixelRatio<"u"?window.devicePixelRatio:1}function hw(e,t,n){return n.sort(function(a,o){var s=t(a)||0,c=t(o)||0;return sc?1:0})}function pw(e){var t=Mo(e.x,2),n=t[0],a=t[1],o=Mo(e.y,2),s=o[0],c=o[1],u=Math.max(a-n,c-s),f=(a+n)/2,h=(c+s)/2;(u===0||Math.abs(u)===1/0||isNaN(u))&&(u=1),isNaN(f)&&(f=0),isNaN(h)&&(h=0);var m=function(y){return{x:.5+(y.x-f)/u,y:.5+(y.y-h)/u}};return m.applyTo=function(g){g.x=.5+(g.x-f)/u,g.y=.5+(g.y-h)/u},m.inverse=function(g){return{x:f+u*(g.x-.5),y:h+u*(g.y-.5)}},m.ratio=u,m}function Cm(e){"@babel/helpers - typeof";return Cm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cm(e)}function mw(e,t){var n=t.size;if(n!==0){var a=e.length;e.length+=n;var o=0;t.forEach(function(s){e[a+o]=s,o++})}}function dp(e){e=e||{};for(var t=0,n=arguments.length<=1?0:arguments.length-1;t1&&arguments[1]!==void 0?arguments[1]:{},c=arguments.length>2?arguments[2]:void 0;if(!c)return new Promise(function(b){return o.animate(a,s,b)});if(this.enabled){var u=ze(ze({},jC),s),f=this.validateState(a),h=typeof u.easing=="function"?u.easing:OC[u.easing],m=Date.now(),g=this.getState(),y=function(){var S=(Date.now()-m)/u.duration;if(S>=1){o.nextFrame=null,o.setState(f),o.animationCallback&&(o.animationCallback.call(null),o.animationCallback=void 0);return}var E=h(S),_={};typeof f.x=="number"&&(_.x=g.x+(f.x-g.x)*E),typeof f.y=="number"&&(_.y=g.y+(f.y-g.y)*E),o.enabledRotation&&typeof f.angle=="number"&&(_.angle=g.angle+(f.angle-g.angle)*E),typeof f.ratio=="number"&&(_.ratio=g.ratio+(f.ratio-g.ratio)*E),o.setState(_),o.nextFrame=requestAnimationFrame(y)};this.nextFrame?(cancelAnimationFrame(this.nextFrame),this.animationCallback&&this.animationCallback.call(null),this.nextFrame=requestAnimationFrame(y)):y(),this.animationCallback=c}}},{key:"animatedZoom",value:function(a){return a?typeof a=="number"?this.animate({ratio:this.ratio/a}):this.animate({ratio:this.ratio/(a.factor||eu)},a):this.animate({ratio:this.ratio/eu})}},{key:"animatedUnzoom",value:function(a){return a?typeof a=="number"?this.animate({ratio:this.ratio*a}):this.animate({ratio:this.ratio*(a.factor||eu)},a):this.animate({ratio:this.ratio*eu})}},{key:"animatedReset",value:function(a){return this.animate({x:.5,y:.5,ratio:1,angle:0},a)}},{key:"copy",value:function(){return t.from(this.getState())}}],[{key:"from",value:function(a){var o=new t;return o.setState(a)}}])}($g);function lr(e,t){var n=t.getBoundingClientRect();return{x:e.clientX-n.left,y:e.clientY-n.top}}function Qr(e,t){var n=ze(ze({},lr(e,t)),{},{sigmaDefaultPrevented:!1,preventSigmaDefault:function(){n.sigmaDefaultPrevented=!0},original:e});return n}function Js(e){var t="x"in e?e:ze(ze({},e.touches[0]||e.previousTouches[0]),{},{original:e.original,sigmaDefaultPrevented:e.sigmaDefaultPrevented,preventSigmaDefault:function(){e.sigmaDefaultPrevented=!0,t.sigmaDefaultPrevented=!0}});return t}function KG(e,t){return ze(ze({},Qr(e,t)),{},{delta:LC(e)})}var ZG=2;function gu(e){for(var t=[],n=0,a=Math.min(e.length,ZG);n0;o.draggedEvents=0,g&&o.renderer.getSetting("hideEdgesOnMove")&&o.renderer.refresh()},0),this.emit("mouseup",Qr(a,this.container))}}},{key:"handleMove",value:function(a){var o=this;if(this.enabled){var s=Qr(a,this.container);if(this.emit("mousemovebody",s),(a.target===this.container||a.composedPath()[0]===this.container)&&this.emit("mousemove",s),!s.sigmaDefaultPrevented&&this.isMouseDown){this.isMoving=!0,this.draggedEvents++,typeof this.movingTimeout=="number"&&clearTimeout(this.movingTimeout),this.movingTimeout=window.setTimeout(function(){o.movingTimeout=null,o.isMoving=!1},this.settings.dragTimeout);var c=this.renderer.getCamera(),u=lr(a,this.container),f=u.x,h=u.y,m=this.renderer.viewportToFramedGraph({x:this.lastMouseX,y:this.lastMouseY}),g=this.renderer.viewportToFramedGraph({x:f,y:h}),y=m.x-g.x,b=m.y-g.y,S=c.getState(),E=S.x+y,_=S.y+b;c.setState({x:E,y:_}),this.lastMouseX=f,this.lastMouseY=h,a.preventDefault(),a.stopPropagation()}}}},{key:"handleLeave",value:function(a){this.emit("mouseleave",Qr(a,this.container))}},{key:"handleEnter",value:function(a){this.emit("mouseenter",Qr(a,this.container))}},{key:"handleWheel",value:function(a){var o=this,s=this.renderer.getCamera();if(!(!this.enabled||!s.enabledZooming)){var c=LC(a);if(c){var u=KG(a,this.container);if(this.emit("wheel",u),u.sigmaDefaultPrevented){a.preventDefault(),a.stopPropagation();return}var f=s.getState().ratio,h=c>0?1/this.settings.zoomingRatio:this.settings.zoomingRatio,m=s.getBoundedRatio(f*h),g=c>0?1:-1,y=Date.now();f!==m&&(a.preventDefault(),a.stopPropagation(),!(this.currentWheelDirection===g&&this.lastWheelTriggerTime&&y-this.lastWheelTriggerTimea.size?-1:n.sizea.key?1:-1}}])}(),bw=function(){function e(){$t(this,e),we(this,"width",0),we(this,"height",0),we(this,"cellSize",0),we(this,"columns",0),we(this,"rows",0),we(this,"cells",{})}return Vt(e,[{key:"resizeAndClear",value:function(n,a){this.width=n.width,this.height=n.height,this.cellSize=a,this.columns=Math.ceil(n.width/a),this.rows=Math.ceil(n.height/a),this.cells={}}},{key:"getIndex",value:function(n){var a=Math.floor(n.x/this.cellSize),o=Math.floor(n.y/this.cellSize);return o*this.columns+a}},{key:"add",value:function(n,a,o){var s=new yw(n,a),c=this.getIndex(o),u=this.cells[c];u||(u=[],this.cells[c]=u),u.push(s)}},{key:"organize",value:function(){for(var n in this.cells){var a=this.cells[n];a.sort(yw.compare)}}},{key:"getLabelsToDisplay",value:function(n,a){var o=this.cellSize*this.cellSize,s=o/n/n,c=s*a/o,u=Math.ceil(c),f=[];for(var h in this.cells)for(var m=this.cells[h],g=0;g2&&arguments[2]!==void 0?arguments[2]:{};if($t(this,t),o=Sn(this,t),we(o,"elements",{}),we(o,"canvasContexts",{}),we(o,"webGLContexts",{}),we(o,"pickingLayers",new Set),we(o,"textures",{}),we(o,"frameBuffers",{}),we(o,"activeListeners",{}),we(o,"labelGrid",new bw),we(o,"nodeDataCache",{}),we(o,"edgeDataCache",{}),we(o,"nodeProgramIndex",{}),we(o,"edgeProgramIndex",{}),we(o,"nodesWithForcedLabels",new Set),we(o,"edgesWithForcedLabels",new Set),we(o,"nodeExtent",{x:[0,1],y:[0,1]}),we(o,"nodeZExtent",[1/0,-1/0]),we(o,"edgeZExtent",[1/0,-1/0]),we(o,"matrix",or()),we(o,"invMatrix",or()),we(o,"correctionRatio",1),we(o,"customBBox",null),we(o,"normalizationFunction",pw({x:[0,1],y:[0,1]})),we(o,"graphToViewportRatio",1),we(o,"itemIDsIndex",{}),we(o,"nodeIndices",{}),we(o,"edgeIndices",{}),we(o,"width",0),we(o,"height",0),we(o,"pixelRatio",fw()),we(o,"pickingDownSizingRatio",2*o.pixelRatio),we(o,"displayedNodeLabels",new Set),we(o,"displayedEdgeLabels",new Set),we(o,"highlightedNodes",new Set),we(o,"hoveredNode",null),we(o,"hoveredEdge",null),we(o,"renderFrame",null),we(o,"renderHighlightedNodesFrame",null),we(o,"needToProcess",!1),we(o,"checkEdgesEventsFrame",null),we(o,"nodePrograms",{}),we(o,"nodeHoverPrograms",{}),we(o,"edgePrograms",{}),o.settings=XG(s),fp(o.settings),VG(n),!(a instanceof HTMLElement))throw new Error("Sigma: container should be an html element.");o.graph=n,o.container=a,o.createWebGLContext("edges",{picking:s.enableEdgeEvents}),o.createCanvasContext("edgeLabels"),o.createWebGLContext("nodes",{picking:!0}),o.createCanvasContext("labels"),o.createCanvasContext("hovers"),o.createWebGLContext("hoverNodes"),o.createCanvasContext("mouse",{style:{touchAction:"none",userSelect:"none"}}),o.resize();for(var c in o.settings.nodeProgramClasses)o.registerNodeProgram(c,o.settings.nodeProgramClasses[c],o.settings.nodeHoverProgramClasses[c]);for(var u in o.settings.edgeProgramClasses)o.registerEdgeProgram(u,o.settings.edgeProgramClasses[u]);return o.camera=new gw,o.bindCameraHandlers(),o.mouseCaptor=new e3(o.elements.mouse,o),o.mouseCaptor.setSettings(o.settings),o.touchCaptor=new r3(o.elements.mouse,o),o.touchCaptor.setSettings(o.settings),o.bindEventHandlers(),o.bindGraphHandlers(),o.handleSettingsUpdate(),o.refresh(),o}return _n(t,e),Vt(t,[{key:"registerNodeProgram",value:function(a,o,s){return this.nodePrograms[a]&&this.nodePrograms[a].kill(),this.nodeHoverPrograms[a]&&this.nodeHoverPrograms[a].kill(),this.nodePrograms[a]=new o(this.webGLContexts.nodes,this.frameBuffers.nodes,this),this.nodeHoverPrograms[a]=new(s||o)(this.webGLContexts.hoverNodes,null,this),this}},{key:"registerEdgeProgram",value:function(a,o){return this.edgePrograms[a]&&this.edgePrograms[a].kill(),this.edgePrograms[a]=new o(this.webGLContexts.edges,this.frameBuffers.edges,this),this}},{key:"unregisterNodeProgram",value:function(a){if(this.nodePrograms[a]){var o=this.nodePrograms,s=o[a],c=hp(o,[a].map(ol));s.kill(),this.nodePrograms=c}if(this.nodeHoverPrograms[a]){var u=this.nodeHoverPrograms,f=u[a],h=hp(u,[a].map(ol));f.kill(),this.nodePrograms=h}return this}},{key:"unregisterEdgeProgram",value:function(a){if(this.edgePrograms[a]){var o=this.edgePrograms,s=o[a],c=hp(o,[a].map(ol));s.kill(),this.edgePrograms=c}return this}},{key:"resetWebGLTexture",value:function(a){var o=this.webGLContexts[a],s=this.frameBuffers[a],c=this.textures[a];c&&o.deleteTexture(c);var u=o.createTexture();return o.bindFramebuffer(o.FRAMEBUFFER,s),o.bindTexture(o.TEXTURE_2D,u),o.texImage2D(o.TEXTURE_2D,0,o.RGBA,this.width,this.height,0,o.RGBA,o.UNSIGNED_BYTE,null),o.framebufferTexture2D(o.FRAMEBUFFER,o.COLOR_ATTACHMENT0,o.TEXTURE_2D,u,0),this.textures[a]=u,this}},{key:"bindCameraHandlers",value:function(){var a=this;return this.activeListeners.camera=function(){a.scheduleRender()},this.camera.on("updated",this.activeListeners.camera),this}},{key:"unbindCameraHandlers",value:function(){return this.camera.removeListener("updated",this.activeListeners.camera),this}},{key:"getNodeAtPosition",value:function(a){var o=a.x,s=a.y,c=ew(this.webGLContexts.nodes,this.frameBuffers.nodes,o,s,this.pixelRatio,this.pickingDownSizingRatio),u=J0.apply(void 0,vw(c)),f=this.itemIDsIndex[u];return f&&f.type==="node"?f.id:null}},{key:"bindEventHandlers",value:function(){var a=this;this.activeListeners.handleResize=function(){a.scheduleRefresh()},window.addEventListener("resize",this.activeListeners.handleResize),this.activeListeners.handleMove=function(s){var c=Js(s),u={event:c,preventSigmaDefault:function(){c.preventSigmaDefault()}},f=a.getNodeAtPosition(c);if(f&&a.hoveredNode!==f&&!a.nodeDataCache[f].hidden){a.hoveredNode&&a.emit("leaveNode",ze(ze({},u),{},{node:a.hoveredNode})),a.hoveredNode=f,a.emit("enterNode",ze(ze({},u),{},{node:f})),a.scheduleHighlightedNodesRender();return}if(a.hoveredNode&&a.getNodeAtPosition(c)!==a.hoveredNode){var h=a.hoveredNode;a.hoveredNode=null,a.emit("leaveNode",ze(ze({},u),{},{node:h})),a.scheduleHighlightedNodesRender();return}if(a.settings.enableEdgeEvents){var m=a.hoveredNode?null:a.getEdgeAtPoint(u.event.x,u.event.y);m!==a.hoveredEdge&&(a.hoveredEdge&&a.emit("leaveEdge",ze(ze({},u),{},{edge:a.hoveredEdge})),m&&a.emit("enterEdge",ze(ze({},u),{},{edge:m})),a.hoveredEdge=m)}},this.activeListeners.handleMoveBody=function(s){var c=Js(s);a.emit("moveBody",{event:c,preventSigmaDefault:function(){c.preventSigmaDefault()}})},this.activeListeners.handleLeave=function(s){var c=Js(s),u={event:c,preventSigmaDefault:function(){c.preventSigmaDefault()}};a.hoveredNode&&(a.emit("leaveNode",ze(ze({},u),{},{node:a.hoveredNode})),a.scheduleHighlightedNodesRender()),a.settings.enableEdgeEvents&&a.hoveredEdge&&(a.emit("leaveEdge",ze(ze({},u),{},{edge:a.hoveredEdge})),a.scheduleHighlightedNodesRender()),a.emit("leaveStage",ze({},u))},this.activeListeners.handleEnter=function(s){var c=Js(s),u={event:c,preventSigmaDefault:function(){c.preventSigmaDefault()}};a.emit("enterStage",ze({},u))};var o=function(c){return function(u){var f=Js(u),h={event:f,preventSigmaDefault:function(){f.preventSigmaDefault()}},m=a.getNodeAtPosition(f);if(m)return a.emit("".concat(c,"Node"),ze(ze({},h),{},{node:m}));if(a.settings.enableEdgeEvents){var g=a.getEdgeAtPoint(f.x,f.y);if(g)return a.emit("".concat(c,"Edge"),ze(ze({},h),{},{edge:g}))}return a.emit("".concat(c,"Stage"),h)}};return this.activeListeners.handleClick=o("click"),this.activeListeners.handleRightClick=o("rightClick"),this.activeListeners.handleDoubleClick=o("doubleClick"),this.activeListeners.handleWheel=o("wheel"),this.activeListeners.handleDown=o("down"),this.activeListeners.handleUp=o("up"),this.mouseCaptor.on("mousemove",this.activeListeners.handleMove),this.mouseCaptor.on("mousemovebody",this.activeListeners.handleMoveBody),this.mouseCaptor.on("click",this.activeListeners.handleClick),this.mouseCaptor.on("rightClick",this.activeListeners.handleRightClick),this.mouseCaptor.on("doubleClick",this.activeListeners.handleDoubleClick),this.mouseCaptor.on("wheel",this.activeListeners.handleWheel),this.mouseCaptor.on("mousedown",this.activeListeners.handleDown),this.mouseCaptor.on("mouseup",this.activeListeners.handleUp),this.mouseCaptor.on("mouseleave",this.activeListeners.handleLeave),this.mouseCaptor.on("mouseenter",this.activeListeners.handleEnter),this.touchCaptor.on("touchdown",this.activeListeners.handleDown),this.touchCaptor.on("touchdown",this.activeListeners.handleMove),this.touchCaptor.on("touchup",this.activeListeners.handleUp),this.touchCaptor.on("touchmove",this.activeListeners.handleMove),this.touchCaptor.on("tap",this.activeListeners.handleClick),this.touchCaptor.on("doubletap",this.activeListeners.handleDoubleClick),this.touchCaptor.on("touchmove",this.activeListeners.handleMoveBody),this}},{key:"bindGraphHandlers",value:function(){var a=this,o=this.graph,s=new Set(["x","y","zIndex","type"]);return this.activeListeners.eachNodeAttributesUpdatedGraphUpdate=function(c){var u,f=(u=c.hints)===null||u===void 0?void 0:u.attributes;a.graph.forEachNode(function(m){return a.updateNode(m)});var h=!f||f.some(function(m){return s.has(m)});a.refresh({partialGraph:{nodes:o.nodes()},skipIndexation:!h,schedule:!0})},this.activeListeners.eachEdgeAttributesUpdatedGraphUpdate=function(c){var u,f=(u=c.hints)===null||u===void 0?void 0:u.attributes;a.graph.forEachEdge(function(m){return a.updateEdge(m)});var h=f&&["zIndex","type"].some(function(m){return f==null?void 0:f.includes(m)});a.refresh({partialGraph:{edges:o.edges()},skipIndexation:!h,schedule:!0})},this.activeListeners.addNodeGraphUpdate=function(c){var u=c.key;a.addNode(u),a.refresh({partialGraph:{nodes:[u]},skipIndexation:!1,schedule:!0})},this.activeListeners.updateNodeGraphUpdate=function(c){var u=c.key;a.refresh({partialGraph:{nodes:[u]},skipIndexation:!1,schedule:!0})},this.activeListeners.dropNodeGraphUpdate=function(c){var u=c.key;a.removeNode(u),a.refresh({schedule:!0})},this.activeListeners.addEdgeGraphUpdate=function(c){var u=c.key;a.addEdge(u),a.refresh({partialGraph:{edges:[u]},schedule:!0})},this.activeListeners.updateEdgeGraphUpdate=function(c){var u=c.key;a.refresh({partialGraph:{edges:[u]},skipIndexation:!1,schedule:!0})},this.activeListeners.dropEdgeGraphUpdate=function(c){var u=c.key;a.removeEdge(u),a.refresh({schedule:!0})},this.activeListeners.clearEdgesGraphUpdate=function(){a.clearEdgeState(),a.clearEdgeIndices(),a.refresh({schedule:!0})},this.activeListeners.clearGraphUpdate=function(){a.clearEdgeState(),a.clearNodeState(),a.clearEdgeIndices(),a.clearNodeIndices(),a.refresh({schedule:!0})},o.on("nodeAdded",this.activeListeners.addNodeGraphUpdate),o.on("nodeDropped",this.activeListeners.dropNodeGraphUpdate),o.on("nodeAttributesUpdated",this.activeListeners.updateNodeGraphUpdate),o.on("eachNodeAttributesUpdated",this.activeListeners.eachNodeAttributesUpdatedGraphUpdate),o.on("edgeAdded",this.activeListeners.addEdgeGraphUpdate),o.on("edgeDropped",this.activeListeners.dropEdgeGraphUpdate),o.on("edgeAttributesUpdated",this.activeListeners.updateEdgeGraphUpdate),o.on("eachEdgeAttributesUpdated",this.activeListeners.eachEdgeAttributesUpdatedGraphUpdate),o.on("edgesCleared",this.activeListeners.clearEdgesGraphUpdate),o.on("cleared",this.activeListeners.clearGraphUpdate),this}},{key:"unbindGraphHandlers",value:function(){var a=this.graph;a.removeListener("nodeAdded",this.activeListeners.addNodeGraphUpdate),a.removeListener("nodeDropped",this.activeListeners.dropNodeGraphUpdate),a.removeListener("nodeAttributesUpdated",this.activeListeners.updateNodeGraphUpdate),a.removeListener("eachNodeAttributesUpdated",this.activeListeners.eachNodeAttributesUpdatedGraphUpdate),a.removeListener("edgeAdded",this.activeListeners.addEdgeGraphUpdate),a.removeListener("edgeDropped",this.activeListeners.dropEdgeGraphUpdate),a.removeListener("edgeAttributesUpdated",this.activeListeners.updateEdgeGraphUpdate),a.removeListener("eachEdgeAttributesUpdated",this.activeListeners.eachEdgeAttributesUpdatedGraphUpdate),a.removeListener("edgesCleared",this.activeListeners.clearEdgesGraphUpdate),a.removeListener("cleared",this.activeListeners.clearGraphUpdate)}},{key:"getEdgeAtPoint",value:function(a,o){var s=ew(this.webGLContexts.edges,this.frameBuffers.edges,a,o,this.pixelRatio,this.pickingDownSizingRatio),c=J0.apply(void 0,vw(s)),u=this.itemIDsIndex[c];return u&&u.type==="edge"?u.id:null}},{key:"process",value:function(){var a=this;this.emit("beforeProcess");var o=this.graph,s=this.settings,c=this.getDimensions();if(this.nodeExtent=$G(this.graph),!this.settings.autoRescale){var u=c.width,f=c.height,h=this.nodeExtent,m=h.x,g=h.y;this.nodeExtent={x:[(m[0]+m[1])/2-u/2,(m[0]+m[1])/2+u/2],y:[(g[0]+g[1])/2-f/2,(g[0]+g[1])/2+f/2]}}this.normalizationFunction=pw(this.customBBox||this.nodeExtent);var y=new gw,b=Qs(y.getState(),c,this.getGraphDimensions(),this.getStagePadding());this.labelGrid.resizeAndClear(c,s.labelGridCellSize);for(var S={},E={},_={},N={},C=1,A=o.nodes(),k=0,D=A.length;k1&&arguments[1]!==void 0?arguments[1]:{},s=o.tolerance,c=s===void 0?0:s,u=o.boundaries,f=ze({},a),h=u||this.nodeExtent,m=Mo(h.x,2),g=m[0],y=m[1],b=Mo(h.y,2),S=b[0],E=b[1],_=[this.graphToViewport({x:g,y:S},{cameraState:a}),this.graphToViewport({x:y,y:S},{cameraState:a}),this.graphToViewport({x:g,y:E},{cameraState:a}),this.graphToViewport({x:y,y:E},{cameraState:a})],N=1/0,C=-1/0,A=1/0,k=-1/0;_.forEach(function(X){var ne=X.x,F=X.y;N=Math.min(N,ne),C=Math.max(C,ne),A=Math.min(A,F),k=Math.max(k,F)});var D=C-N,M=k-A,R=this.getDimensions(),U=R.width,L=R.height,I=0,q=0;if(D>=U?Cc&&(I=N-c):C>U+c?I=C-(U+c):N<-c&&(I=N+c),M>=L?kc&&(q=A-c):k>L+c?q=k-(L+c):A<-c&&(q=A+c),I||q){var Y=this.viewportToFramedGraph({x:0,y:0},{cameraState:a}),B=this.viewportToFramedGraph({x:I,y:q},{cameraState:a});I=B.x-Y.x,q=B.y-Y.y,f.x+=I,f.y+=q}return f}},{key:"renderLabels",value:function(){if(!this.settings.renderLabels)return this;var a=this.camera.getState(),o=this.labelGrid.getLabelsToDisplay(a.ratio,this.settings.labelDensity);mw(o,this.nodesWithForcedLabels),this.displayedNodeLabels=new Set;for(var s=this.canvasContexts.labels,c=0,u=o.length;cthis.width+c3||y<-50||y>this.height+u3)){this.displayedNodeLabels.add(f);var S=this.settings.defaultDrawNodeLabel,E=this.nodePrograms[h.type],_=(E==null?void 0:E.drawLabel)||S;_(s,ze(ze({key:f},h),{},{size:b,x:g,y}),this.settings)}}}return this}},{key:"renderEdgeLabels",value:function(){if(!this.settings.renderEdgeLabels)return this;var a=this.canvasContexts.edgeLabels;a.clearRect(0,0,this.width,this.height);var o=l3({graph:this.graph,hoveredNode:this.hoveredNode,displayedNodeLabels:this.displayedNodeLabels,highlightedNodes:this.highlightedNodes});mw(o,this.edgesWithForcedLabels);for(var s=new Set,c=0,u=o.length;cthis.nodeZExtent[1]&&(this.nodeZExtent[1]=s.zIndex))}},{key:"updateNode",value:function(a){this.addNode(a);var o=this.nodeDataCache[a];this.normalizationFunction.applyTo(o)}},{key:"removeNode",value:function(a){delete this.nodeDataCache[a],delete this.nodeProgramIndex[a],this.highlightedNodes.delete(a),this.hoveredNode===a&&(this.hoveredNode=null),this.nodesWithForcedLabels.delete(a)}},{key:"addEdge",value:function(a){var o=Object.assign({},this.graph.getEdgeAttributes(a));this.settings.edgeReducer&&(o=this.settings.edgeReducer(a,o));var s=f3(this.settings,a,o);this.edgeDataCache[a]=s,this.edgesWithForcedLabels.delete(a),s.forceLabel&&!s.hidden&&this.edgesWithForcedLabels.add(a),this.settings.zIndex&&(s.zIndexthis.edgeZExtent[1]&&(this.edgeZExtent[1]=s.zIndex))}},{key:"updateEdge",value:function(a){this.addEdge(a)}},{key:"removeEdge",value:function(a){delete this.edgeDataCache[a],delete this.edgeProgramIndex[a],this.hoveredEdge===a&&(this.hoveredEdge=null),this.edgesWithForcedLabels.delete(a)}},{key:"clearNodeIndices",value:function(){this.labelGrid=new bw,this.nodeExtent={x:[0,1],y:[0,1]},this.nodeDataCache={},this.edgeProgramIndex={},this.nodesWithForcedLabels=new Set,this.nodeZExtent=[1/0,-1/0]}},{key:"clearEdgeIndices",value:function(){this.edgeDataCache={},this.edgeProgramIndex={},this.edgesWithForcedLabels=new Set,this.edgeZExtent=[1/0,-1/0]}},{key:"clearIndices",value:function(){this.clearEdgeIndices(),this.clearNodeIndices()}},{key:"clearNodeState",value:function(){this.displayedNodeLabels=new Set,this.highlightedNodes=new Set,this.hoveredNode=null}},{key:"clearEdgeState",value:function(){this.displayedEdgeLabels=new Set,this.highlightedNodes=new Set,this.hoveredEdge=null}},{key:"clearState",value:function(){this.clearEdgeState(),this.clearNodeState()}},{key:"addNodeToProgram",value:function(a,o,s){var c=this.nodeDataCache[a],u=this.nodePrograms[c.type];if(!u)throw new Error('Sigma: could not find a suitable program for node type "'.concat(c.type,'"!'));u.process(o,s,c),this.nodeProgramIndex[a]=s}},{key:"addEdgeToProgram",value:function(a,o,s){var c=this.edgeDataCache[a],u=this.edgePrograms[c.type];if(!u)throw new Error('Sigma: could not find a suitable program for edge type "'.concat(c.type,'"!'));var f=this.graph.extremities(a),h=this.nodeDataCache[f[0]],m=this.nodeDataCache[f[1]];u.process(o,s,h,m,c),this.edgeProgramIndex[a]=s}},{key:"getRenderParams",value:function(){return{matrix:this.matrix,invMatrix:this.invMatrix,width:this.width,height:this.height,pixelRatio:this.pixelRatio,zoomRatio:this.camera.ratio,cameraAngle:this.camera.angle,sizeRatio:1/this.scaleSize(),correctionRatio:this.correctionRatio,downSizingRatio:this.pickingDownSizingRatio,minEdgeThickness:this.settings.minEdgeThickness,antiAliasingFeather:this.settings.antiAliasingFeather}}},{key:"getStagePadding",value:function(){var a=this.settings,o=a.stagePadding,s=a.autoRescale;return s&&o||0}},{key:"createLayer",value:function(a,o){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.elements[a])throw new Error('Sigma: a layer named "'.concat(a,'" already exists'));var c=qG(o,{position:"absolute"},{class:"sigma-".concat(a)});return s.style&&Object.assign(c.style,s.style),this.elements[a]=c,"beforeLayer"in s&&s.beforeLayer?this.elements[s.beforeLayer].before(c):"afterLayer"in s&&s.afterLayer?this.elements[s.afterLayer].after(c):this.container.appendChild(c),c}},{key:"createCanvas",value:function(a){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.createLayer(a,"canvas",o)}},{key:"createCanvasContext",value:function(a){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=this.createCanvas(a,o),c={preserveDrawingBuffer:!1,antialias:!1};return this.canvasContexts[a]=s.getContext("2d",c),this}},{key:"createWebGLContext",value:function(a){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=(o==null?void 0:o.canvas)||this.createCanvas(a,o);o.hidden&&s.remove();var c=ze({preserveDrawingBuffer:!1,antialias:!1},o),u;u=s.getContext("webgl2",c),u||(u=s.getContext("webgl",c)),u||(u=s.getContext("experimental-webgl",c));var f=u;if(this.webGLContexts[a]=f,f.blendFunc(f.ONE,f.ONE_MINUS_SRC_ALPHA),o.picking){this.pickingLayers.add(a);var h=f.createFramebuffer();if(!h)throw new Error("Sigma: cannot create a new frame buffer for layer ".concat(a));this.frameBuffers[a]=h}return f}},{key:"killLayer",value:function(a){var o=this.elements[a];if(!o)throw new Error("Sigma: cannot kill layer ".concat(a,", which does not exist"));if(this.webGLContexts[a]){var s,c=this.webGLContexts[a];(s=c.getExtension("WEBGL_lose_context"))===null||s===void 0||s.loseContext(),delete this.webGLContexts[a]}else this.canvasContexts[a]&&delete this.canvasContexts[a];return o.remove(),delete this.elements[a],this}},{key:"getCamera",value:function(){return this.camera}},{key:"setCamera",value:function(a){this.unbindCameraHandlers(),this.camera=a,this.bindCameraHandlers()}},{key:"getContainer",value:function(){return this.container}},{key:"getGraph",value:function(){return this.graph}},{key:"setGraph",value:function(a){a!==this.graph&&(this.hoveredNode&&!a.hasNode(this.hoveredNode)&&(this.hoveredNode=null),this.hoveredEdge&&!a.hasEdge(this.hoveredEdge)&&(this.hoveredEdge=null),this.unbindGraphHandlers(),this.checkEdgesEventsFrame!==null&&(cancelAnimationFrame(this.checkEdgesEventsFrame),this.checkEdgesEventsFrame=null),this.graph=a,this.bindGraphHandlers(),this.refresh())}},{key:"getMouseCaptor",value:function(){return this.mouseCaptor}},{key:"getTouchCaptor",value:function(){return this.touchCaptor}},{key:"getDimensions",value:function(){return{width:this.width,height:this.height}}},{key:"getGraphDimensions",value:function(){var a=this.customBBox||this.nodeExtent;return{width:a.x[1]-a.x[0]||1,height:a.y[1]-a.y[0]||1}}},{key:"getNodeDisplayData",value:function(a){var o=this.nodeDataCache[a];return o?Object.assign({},o):void 0}},{key:"getEdgeDisplayData",value:function(a){var o=this.edgeDataCache[a];return o?Object.assign({},o):void 0}},{key:"getNodeDisplayedLabels",value:function(){return new Set(this.displayedNodeLabels)}},{key:"getEdgeDisplayedLabels",value:function(){return new Set(this.displayedEdgeLabels)}},{key:"getSettings",value:function(){return ze({},this.settings)}},{key:"getSetting",value:function(a){return this.settings[a]}},{key:"setSetting",value:function(a,o){var s=ze({},this.settings);return this.settings[a]=o,fp(this.settings),this.handleSettingsUpdate(s),this.scheduleRefresh(),this}},{key:"updateSetting",value:function(a,o){return this.setSetting(a,o(this.settings[a])),this}},{key:"setSettings",value:function(a){var o=ze({},this.settings);return this.settings=ze(ze({},this.settings),a),fp(this.settings),this.handleSettingsUpdate(o),this.scheduleRefresh(),this}},{key:"resize",value:function(a){var o=this.width,s=this.height;if(this.width=this.container.offsetWidth,this.height=this.container.offsetHeight,this.pixelRatio=fw(),this.width===0)if(this.settings.allowInvalidContainer)this.width=1;else throw new Error("Sigma: Container has no width. You can set the allowInvalidContainer setting to true to stop seeing this error.");if(this.height===0)if(this.settings.allowInvalidContainer)this.height=1;else throw new Error("Sigma: Container has no height. You can set the allowInvalidContainer setting to true to stop seeing this error.");if(!a&&o===this.width&&s===this.height)return this;for(var c in this.elements){var u=this.elements[c];u.style.width=this.width+"px",u.style.height=this.height+"px"}for(var f in this.canvasContexts)this.elements[f].setAttribute("width",this.width*this.pixelRatio+"px"),this.elements[f].setAttribute("height",this.height*this.pixelRatio+"px"),this.pixelRatio!==1&&this.canvasContexts[f].scale(this.pixelRatio,this.pixelRatio);for(var h in this.webGLContexts){this.elements[h].setAttribute("width",this.width*this.pixelRatio+"px"),this.elements[h].setAttribute("height",this.height*this.pixelRatio+"px");var m=this.webGLContexts[h];if(m.viewport(0,0,this.width*this.pixelRatio,this.height*this.pixelRatio),this.pickingLayers.has(h)){var g=this.textures[h];g&&m.deleteTexture(g)}}return this.emit("resize"),this}},{key:"clear",value:function(){return this.emit("beforeClear"),this.webGLContexts.nodes.bindFramebuffer(WebGLRenderingContext.FRAMEBUFFER,null),this.webGLContexts.nodes.clear(WebGLRenderingContext.COLOR_BUFFER_BIT),this.webGLContexts.edges.bindFramebuffer(WebGLRenderingContext.FRAMEBUFFER,null),this.webGLContexts.edges.clear(WebGLRenderingContext.COLOR_BUFFER_BIT),this.webGLContexts.hoverNodes.clear(WebGLRenderingContext.COLOR_BUFFER_BIT),this.canvasContexts.labels.clearRect(0,0,this.width,this.height),this.canvasContexts.hovers.clearRect(0,0,this.width,this.height),this.canvasContexts.edgeLabels.clearRect(0,0,this.width,this.height),this.emit("afterClear"),this}},{key:"refresh",value:function(a){var o=this,s=(a==null?void 0:a.skipIndexation)!==void 0?a==null?void 0:a.skipIndexation:!1,c=(a==null?void 0:a.schedule)!==void 0?a.schedule:!1,u=!a||!a.partialGraph;if(u)this.clearEdgeIndices(),this.clearNodeIndices(),this.graph.forEachNode(function(k){return o.addNode(k)}),this.graph.forEachEdge(function(k){return o.addEdge(k)});else{for(var f,h,m=((f=a.partialGraph)===null||f===void 0?void 0:f.nodes)||[],g=0,y=(m==null?void 0:m.length)||0;g1&&arguments[1]!==void 0?arguments[1]:{},s=!!o.cameraState||!!o.viewportDimensions||!!o.graphDimensions,c=o.matrix?o.matrix:s?Qs(o.cameraState||this.camera.getState(),o.viewportDimensions||this.getDimensions(),o.graphDimensions||this.getGraphDimensions(),o.padding||this.getStagePadding()):this.matrix,u=_m(c,a);return{x:(1+u.x)*this.width/2,y:(1-u.y)*this.height/2}}},{key:"viewportToFramedGraph",value:function(a){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=!!o.cameraState||!!o.viewportDimensions||!o.graphDimensions,c=o.matrix?o.matrix:s?Qs(o.cameraState||this.camera.getState(),o.viewportDimensions||this.getDimensions(),o.graphDimensions||this.getGraphDimensions(),o.padding||this.getStagePadding(),!0):this.invMatrix,u=_m(c,{x:a.x/this.width*2-1,y:1-a.y/this.height*2});return isNaN(u.x)&&(u.x=0),isNaN(u.y)&&(u.y=0),u}},{key:"viewportToGraph",value:function(a){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.normalizationFunction.inverse(this.viewportToFramedGraph(a,o))}},{key:"graphToViewport",value:function(a){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.framedGraphToViewport(this.normalizationFunction(a),o)}},{key:"getGraphToViewportRatio",value:function(){var a={x:0,y:0},o={x:1,y:1},s=Math.sqrt(Math.pow(a.x-o.x,2)+Math.pow(a.y-o.y,2)),c=this.graphToViewport(a),u=this.graphToViewport(o),f=Math.sqrt(Math.pow(c.x-u.x,2)+Math.pow(c.y-u.y,2));return f/s}},{key:"getBBox",value:function(){return this.nodeExtent}},{key:"getCustomBBox",value:function(){return this.customBBox}},{key:"setCustomBBox",value:function(a){return this.customBBox=a,this.scheduleRender(),this}},{key:"kill",value:function(){this.emit("kill"),this.removeAllListeners(),this.unbindCameraHandlers(),window.removeEventListener("resize",this.activeListeners.handleResize),this.mouseCaptor.kill(),this.touchCaptor.kill(),this.unbindGraphHandlers(),this.clearIndices(),this.clearState(),this.nodeDataCache={},this.edgeDataCache={},this.highlightedNodes.clear(),this.renderFrame&&(cancelAnimationFrame(this.renderFrame),this.renderFrame=null),this.renderHighlightedNodesFrame&&(cancelAnimationFrame(this.renderHighlightedNodesFrame),this.renderHighlightedNodesFrame=null);for(var a=this.container;a.firstChild;)a.removeChild(a.firstChild);this.canvasContexts={},this.webGLContexts={},this.elements={};for(var o in this.nodePrograms)this.nodePrograms[o].kill();for(var s in this.nodeHoverPrograms)this.nodeHoverPrograms[s].kill();for(var c in this.edgePrograms)this.edgePrograms[c].kill();this.nodePrograms={},this.nodeHoverPrograms={},this.edgePrograms={};for(var u in this.elements)this.killLayer(u)}},{key:"scaleSize",value:function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.camera.ratio;return a/this.settings.zoomToSizeRatioFunction(o)*(this.getSetting("itemSizesReference")==="positions"?o*this.graphToViewportRatio:1)}},{key:"getCanvases",value:function(){var a={};for(var o in this.elements)this.elements[o]instanceof HTMLCanvasElement&&(a[o]=this.elements[o]);return a}}])}($g);const MC=w.createContext(null),p3=MC.Provider;function qg(){const e=w.useContext(MC);if(e==null)throw new Error("No context provided: useSigmaContext() can only be used in a descendant of ");return e}function Zn(){return qg().sigma}function PC(){const{sigma:e}=qg();return w.useCallback(t=>{e&&Object.keys(t).forEach(n=>{e.setSetting(n,t[n])})},[e])}function bd(e){return new Set(Object.keys(e))}const xw=bd({clickNode:!0,rightClickNode:!0,downNode:!0,enterNode:!0,leaveNode:!0,doubleClickNode:!0,wheelNode:!0,clickEdge:!0,rightClickEdge:!0,downEdge:!0,enterEdge:!0,leaveEdge:!0,doubleClickEdge:!0,wheelEdge:!0,clickStage:!0,rightClickStage:!0,downStage:!0,doubleClickStage:!0,wheelStage:!0,beforeRender:!0,afterRender:!0,kill:!0,upStage:!0,upEdge:!0,upNode:!0,enterStage:!0,leaveStage:!0,resize:!0,afterClear:!0,afterProcess:!0,beforeClear:!0,beforeProcess:!0,moveBody:!0}),ww=bd({click:!0,rightClick:!0,doubleClick:!0,mouseup:!0,mousedown:!0,mousemove:!0,mousemovebody:!0,mouseleave:!0,mouseenter:!0,wheel:!0}),Ew=bd({touchup:!0,touchdown:!0,touchmove:!0,touchmovebody:!0,tap:!0,doubletap:!0}),Sw=bd({updated:!0});function GC(){const e=Zn(),t=PC(),[n,a]=w.useState({});return w.useEffect(()=>{if(!e||!n)return;const o=n,s=Object.keys(o);return s.forEach(c=>{const u=o[c];xw.has(c)&&e.on(c,u),ww.has(c)&&e.getMouseCaptor().on(c,u),Ew.has(c)&&e.getTouchCaptor().on(c,u),Sw.has(c)&&e.getCamera().on(c,u)}),()=>{e&&s.forEach(c=>{const u=o[c];xw.has(c)&&e.off(c,u),ww.has(c)&&e.getMouseCaptor().off(c,u),Ew.has(c)&&e.getTouchCaptor().off(c,u),Sw.has(c)&&e.getCamera().off(c,u)})}},[e,n,t]),a}function m3(){const e=Zn();return w.useCallback((t,n=!0)=>{e&&t&&(n&&e.getGraph().order>0&&e.getGraph().clear(),e.getGraph().import(t),e.refresh())},[e])}function Al(e,t){if(e===t)return!0;if(typeof e=="object"&&e!=null&&typeof t=="object"&&t!=null){if(Object.keys(e).length!=Object.keys(t).length)return!1;for(const n in e)if(!Object.hasOwn(t,n)||!Al(e[n],t[n]))return!1;return!0}return!1}function FC(e){const t=Zn(),[n,a]=w.useState(e||{});w.useEffect(()=>{a(h=>Al(h,e||{})?h:e||{})},[e]);const o=w.useCallback(h=>{t.getCamera().animatedZoom(Object.assign(Object.assign({},n),h))},[t,n]),s=w.useCallback(h=>{t.getCamera().animatedUnzoom(Object.assign(Object.assign({},n),h))},[t,n]),c=w.useCallback(h=>{t.getCamera().animatedReset(Object.assign(Object.assign({},n),h))},[t,n]),u=w.useCallback((h,m)=>{t.getCamera().animate(h,Object.assign(Object.assign({},n),m))},[t,n]),f=w.useCallback((h,m)=>{const g=t.getNodeDisplayData(h);g?t.getCamera().animate(g,Object.assign(Object.assign({},n),m)):console.warn(`Node ${h} not found`)},[t,n]);return{zoomIn:o,zoomOut:s,reset:c,goto:u,gotoNode:f}}function g3(e){const t=qg(),[n,a]=w.useState(!1),[o,s]=w.useState(t.container),c=w.useCallback(()=>a(u=>!u),[]);return w.useEffect(()=>(document.addEventListener("fullscreenchange",c),()=>document.removeEventListener("fullscreenchange",c)),[c]),w.useEffect(()=>{s(t.container)},[e,t.container]),{toggle:w.useCallback(()=>{var u;u=o,document.fullscreenElement!==u?u.requestFullscreen():document.exitFullscreen&&document.exitFullscreen()},[o]),isFullScreen:n}}const v3=w.forwardRef(({graph:e,id:t,className:n,style:a,settings:o={},children:s},c)=>{const u=w.useRef(null),f=w.useRef(null),h={className:`react-sigma ${n||""}`,id:t,style:a},[m,g]=w.useState(null),[y,b]=w.useState(o);w.useEffect(()=>{b(_=>Al(_,o)?_:o)},[o]),w.useEffect(()=>{g(_=>{let N=null;if(f.current!==null){let C=new ft;e&&(C=typeof e=="function"?new e:e);let A=null;_&&(A=_.getCamera().getState(),_.kill()),N=new h3(C,f.current,y),A&&N.getCamera().setState(A)}return N})},[f,e,y]),w.useImperativeHandle(c,()=>m,[m]);const S=w.useMemo(()=>m&&u.current?{sigma:m,container:u.current}:null,[m,u]),E=S!==null?ve.createElement(p3,{value:S},s):null;return ve.createElement("div",Object.assign({},h,{ref:u}),ve.createElement("div",{className:"sigma-container",ref:f}),E)});var y3=` -precision mediump float; - -varying vec4 v_color; -varying float v_border; - -const float radius = 0.5; -const vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0); - -void main(void) { - vec2 m = gl_PointCoord - vec2(0.5, 0.5); - float dist = radius - length(m); - - // No antialiasing for picking mode: - #ifdef PICKING_MODE - if (dist > v_border) - gl_FragColor = v_color; - else - gl_FragColor = transparent; - - #else - float t = 0.0; - if (dist > v_border) - t = 1.0; - else if (dist > 0.0) - t = dist / v_border; - - gl_FragColor = mix(transparent, v_color, t); - #endif -} -`,b3=y3,x3=` -attribute vec4 a_id; -attribute vec4 a_color; -attribute vec2 a_position; -attribute float a_size; - -uniform float u_sizeRatio; -uniform float u_pixelRatio; -uniform mat3 u_matrix; - -varying vec4 v_color; -varying float v_border; - -const float bias = 255.0 / 254.0; - -void main() { - gl_Position = vec4( - (u_matrix * vec3(a_position, 1)).xy, - 0, - 1 - ); - - // Multiply the point size twice: - // - x SCALING_RATIO to correct the canvas scaling - // - x 2 to correct the formulae - gl_PointSize = a_size / u_sizeRatio * u_pixelRatio * 2.0; - - v_border = (0.5 / a_size) * u_sizeRatio; - - #ifdef PICKING_MODE - // For picking mode, we use the ID as the color: - v_color = a_id; - #else - // For normal mode, we use the color: - v_color = a_color; - #endif - - v_color.a *= bias; -} -`,w3=x3,UC=WebGLRenderingContext,_w=UC.UNSIGNED_BYTE,Cw=UC.FLOAT,E3=["u_sizeRatio","u_pixelRatio","u_matrix"],S3=function(e){function t(){return $t(this,t),Sn(this,t,arguments)}return _n(t,e),Vt(t,[{key:"getDefinition",value:function(){return{VERTICES:1,VERTEX_SHADER_SOURCE:w3,FRAGMENT_SHADER_SOURCE:b3,METHOD:WebGLRenderingContext.POINTS,UNIFORMS:E3,ATTRIBUTES:[{name:"a_position",size:2,type:Cw},{name:"a_size",size:1,type:Cw},{name:"a_color",size:4,type:_w,normalized:!0},{name:"a_id",size:4,type:_w,normalized:!0}]}}},{key:"processVisibleItem",value:function(a,o,s){var c=this.array;c[o++]=s.x,c[o++]=s.y,c[o++]=s.size,c[o++]=Ar(s.color),c[o++]=a}},{key:"setUniforms",value:function(a,o){var s=a.sizeRatio,c=a.pixelRatio,u=a.matrix,f=o.gl,h=o.uniformLocations,m=h.u_sizeRatio,g=h.u_pixelRatio,y=h.u_matrix;f.uniform1f(g,c),f.uniform1f(m,s),f.uniformMatrix3fv(y,!1,u)}}])}(Ig),_3=` -attribute vec4 a_id; -attribute vec4 a_color; -attribute vec2 a_normal; -attribute float a_normalCoef; -attribute vec2 a_positionStart; -attribute vec2 a_positionEnd; -attribute float a_positionCoef; -attribute float a_sourceRadius; -attribute float a_targetRadius; -attribute float a_sourceRadiusCoef; -attribute float a_targetRadiusCoef; - -uniform mat3 u_matrix; -uniform float u_zoomRatio; -uniform float u_sizeRatio; -uniform float u_pixelRatio; -uniform float u_correctionRatio; -uniform float u_minEdgeThickness; -uniform float u_lengthToThicknessRatio; -uniform float u_feather; - -varying vec4 v_color; -varying vec2 v_normal; -varying float v_thickness; -varying float v_feather; - -const float bias = 255.0 / 254.0; - -void main() { - float minThickness = u_minEdgeThickness; - - vec2 normal = a_normal * a_normalCoef; - vec2 position = a_positionStart * (1.0 - a_positionCoef) + a_positionEnd * a_positionCoef; - - float normalLength = length(normal); - vec2 unitNormal = normal / normalLength; - - // These first computations are taken from edge.vert.glsl. Please read it to - // get better comments on what's happening: - float pixelsThickness = max(normalLength, minThickness * u_sizeRatio); - float webGLThickness = pixelsThickness * u_correctionRatio / u_sizeRatio; - - // Here, we move the point to leave space for the arrow heads: - // Source arrow head - float sourceRadius = a_sourceRadius * a_sourceRadiusCoef; - float sourceDirection = sign(sourceRadius); - float webGLSourceRadius = sourceDirection * sourceRadius * 2.0 * u_correctionRatio / u_sizeRatio; - float webGLSourceArrowHeadLength = webGLThickness * u_lengthToThicknessRatio * 2.0; - vec2 sourceCompensationVector = - vec2(-sourceDirection * unitNormal.y, sourceDirection * unitNormal.x) - * (webGLSourceRadius + webGLSourceArrowHeadLength); - - // Target arrow head - float targetRadius = a_targetRadius * a_targetRadiusCoef; - float targetDirection = sign(targetRadius); - float webGLTargetRadius = targetDirection * targetRadius * 2.0 * u_correctionRatio / u_sizeRatio; - float webGLTargetArrowHeadLength = webGLThickness * u_lengthToThicknessRatio * 2.0; - vec2 targetCompensationVector = - vec2(-targetDirection * unitNormal.y, targetDirection * unitNormal.x) - * (webGLTargetRadius + webGLTargetArrowHeadLength); - - // Here is the proper position of the vertex - gl_Position = vec4((u_matrix * vec3(position + unitNormal * webGLThickness + sourceCompensationVector + targetCompensationVector, 1)).xy, 0, 1); - - v_thickness = webGLThickness / u_zoomRatio; - - v_normal = unitNormal; - - v_feather = u_feather * u_correctionRatio / u_zoomRatio / u_pixelRatio * 2.0; - - #ifdef PICKING_MODE - // For picking mode, we use the ID as the color: - v_color = a_id; - #else - // For normal mode, we use the color: - v_color = a_color; - #endif - - v_color.a *= bias; -} -`,C3=_3,BC=WebGLRenderingContext,Tw=BC.UNSIGNED_BYTE,Kr=BC.FLOAT,T3=["u_matrix","u_zoomRatio","u_sizeRatio","u_correctionRatio","u_pixelRatio","u_feather","u_minEdgeThickness","u_lengthToThicknessRatio"],R3={lengthToThicknessRatio:Rl.lengthToThicknessRatio};function IC(e){var t=ze(ze({},R3),{});return function(n){function a(){return $t(this,a),Sn(this,a,arguments)}return _n(a,n),Vt(a,[{key:"getDefinition",value:function(){return{VERTICES:6,VERTEX_SHADER_SOURCE:C3,FRAGMENT_SHADER_SOURCE:Hg,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:T3,ATTRIBUTES:[{name:"a_positionStart",size:2,type:Kr},{name:"a_positionEnd",size:2,type:Kr},{name:"a_normal",size:2,type:Kr},{name:"a_color",size:4,type:Tw,normalized:!0},{name:"a_id",size:4,type:Tw,normalized:!0},{name:"a_sourceRadius",size:1,type:Kr},{name:"a_targetRadius",size:1,type:Kr}],CONSTANT_ATTRIBUTES:[{name:"a_positionCoef",size:1,type:Kr},{name:"a_normalCoef",size:1,type:Kr},{name:"a_sourceRadiusCoef",size:1,type:Kr},{name:"a_targetRadiusCoef",size:1,type:Kr}],CONSTANT_DATA:[[0,1,-1,0],[0,-1,1,0],[1,1,0,1],[1,1,0,1],[0,-1,1,0],[1,-1,0,-1]]}}},{key:"processVisibleItem",value:function(s,c,u,f,h){var m=h.size||1,g=u.x,y=u.y,b=f.x,S=f.y,E=Ar(h.color),_=b-g,N=S-y,C=u.size||1,A=f.size||1,k=_*_+N*N,D=0,M=0;k&&(k=1/Math.sqrt(k),D=-N*k*m,M=_*k*m);var R=this.array;R[c++]=g,R[c++]=y,R[c++]=b,R[c++]=S,R[c++]=D,R[c++]=M,R[c++]=E,R[c++]=s,R[c++]=C,R[c++]=A}},{key:"setUniforms",value:function(s,c){var u=c.gl,f=c.uniformLocations,h=f.u_matrix,m=f.u_zoomRatio,g=f.u_feather,y=f.u_pixelRatio,b=f.u_correctionRatio,S=f.u_sizeRatio,E=f.u_minEdgeThickness,_=f.u_lengthToThicknessRatio;u.uniformMatrix3fv(h,!1,s.matrix),u.uniform1f(m,s.zoomRatio),u.uniform1f(S,s.sizeRatio),u.uniform1f(b,s.correctionRatio),u.uniform1f(y,s.pixelRatio),u.uniform1f(g,s.antiAliasingFeather),u.uniform1f(E,s.minEdgeThickness),u.uniform1f(_,t.lengthToThicknessRatio)}}])}(Cl)}IC();function A3(e){return _C([IC(),ju(e),ju(ze(ze({},e),{},{extremity:"source"}))])}A3();function D3(e){if(Array.isArray(e))return e}function k3(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a,o,s,c,u=[],f=!0,h=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(f=(a=s.call(n)).done)&&(u.push(a.value),u.length!==t);f=!0);}catch(m){h=!0,o=m}finally{try{if(!f&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(h)throw o}}return u}}function Tm(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n v_radius) - gl_FragColor = transparent; - else { - gl_FragColor = v_color; - gl_FragColor.a *= bias; - } - #else - // Sizes: -`).concat(t.flatMap(function(o,s){var c=o.size;if("fill"in c)return[];c=c;var u="attribute"in c?"v_borderSize_".concat(s+1):rw(c.value),f=(c.mode||H3)==="pixels"?"u_correctionRatio":"v_radius";return[" float borderSize_".concat(s+1," = ").concat(f," * ").concat(u,";")]}).join(` -`),` - // Now, let's split the remaining space between "fill" borders: - float fillBorderSize = (v_radius - (`).concat(t.flatMap(function(o,s){var c=o.size;return"fill"in c?[]:["borderSize_".concat(s+1)]}).join(" + "),") ) / ").concat(n,`; -`).concat(t.flatMap(function(o,s){var c=o.size;return"fill"in c?[" float borderSize_".concat(s+1," = fillBorderSize;")]:[]}).join(` -`),` - - // Finally, normalize all border sizes, to start from the full size and to end with the smallest: - float adjustedBorderSize_0 = v_radius; -`).concat(t.map(function(o,s){return" float adjustedBorderSize_".concat(s+1," = adjustedBorderSize_").concat(s," - borderSize_").concat(s+1,";")}).join(` -`),` - - // Colors: - vec4 borderColor_0 = transparent; -`).concat(t.map(function(o,s){var c=o.color,u=[];return"attribute"in c?u.push(" vec4 borderColor_".concat(s+1," = v_borderColor_").concat(s+1,";")):"transparent"in c?u.push(" vec4 borderColor_".concat(s+1," = vec4(0.0, 0.0, 0.0, 0.0);")):u.push(" vec4 borderColor_".concat(s+1," = u_borderColor_").concat(s+1,";")),u.push(" borderColor_".concat(s+1,".a *= bias;")),u.push(" if (borderSize_".concat(s+1," <= 1.0 * u_correctionRatio) { borderColor_").concat(s+1," = borderColor_").concat(s,"; }")),u.join(` -`)}).join(` -`),` - if (dist > adjustedBorderSize_0) { - gl_FragColor = borderColor_0; - } else `).concat(t.map(function(o,s){return"if (dist > adjustedBorderSize_".concat(s,` - aaBorder) { - gl_FragColor = mix(borderColor_`).concat(s+1,", borderColor_").concat(s,", (dist - adjustedBorderSize_").concat(s,` + aaBorder) / aaBorder); - } else if (dist > adjustedBorderSize_`).concat(s+1,`) { - gl_FragColor = borderColor_`).concat(s+1,`; - } else `)}).join(""),` { /* Nothing to add here */ } - #endif -} -`);return a}function Y3(e){var t=e.borders,n=` -attribute vec2 a_position; -attribute float a_size; -attribute float a_angle; - -uniform mat3 u_matrix; -uniform float u_sizeRatio; -uniform float u_correctionRatio; - -varying vec2 v_diffVector; -varying float v_radius; - -#ifdef PICKING_MODE -attribute vec4 a_id; -varying vec4 v_color; -#else -`.concat(t.flatMap(function(a,o){var s=a.size;return"attribute"in s?["attribute float a_borderSize_".concat(o+1,";"),"varying float v_borderSize_".concat(o+1,";")]:[]}).join(` -`),` -`).concat(t.flatMap(function(a,o){var s=a.color;return"attribute"in s?["attribute vec4 a_borderColor_".concat(o+1,";"),"varying vec4 v_borderColor_".concat(o+1,";")]:[]}).join(` -`),` -#endif - -const float bias = 255.0 / 254.0; -const vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0); - -void main() { - float size = a_size * u_correctionRatio / u_sizeRatio * 4.0; - vec2 diffVector = size * vec2(cos(a_angle), sin(a_angle)); - vec2 position = a_position + diffVector; - gl_Position = vec4( - (u_matrix * vec3(position, 1)).xy, - 0, - 1 - ); - - v_radius = size / 2.0; - v_diffVector = diffVector; - - #ifdef PICKING_MODE - v_color = a_id; - #else -`).concat(t.flatMap(function(a,o){var s=a.size;return"attribute"in s?[" v_borderSize_".concat(o+1," = a_borderSize_").concat(o+1,";")]:[]}).join(` -`),` -`).concat(t.flatMap(function(a,o){var s=a.color;return"attribute"in s?[" v_borderColor_".concat(o+1," = a_borderColor_").concat(o+1,";")]:[]}).join(` -`),` - #endif -} -`);return n}var qC=WebGLRenderingContext,Dw=qC.UNSIGNED_BYTE,tu=qC.FLOAT;function W3(e){var t,n=Aw(Aw({},$3),{}),a=n.borders,o=n.drawLabel,s=n.drawHover,c=["u_sizeRatio","u_correctionRatio","u_matrix"].concat(pp(a.flatMap(function(u,f){var h=u.color;return"value"in h?["u_borderColor_".concat(f+1)]:[]})));return t=function(u){F3(f,u);function f(){var h;j3(this,f);for(var m=arguments.length,g=new Array(m),y=0;ye.length)&&(t=e.length);for(var n=0,a=Array(t);n$){var W="…";for(E=E+W,O=s.measureText(E).width;O>$&&E.length>1;)E=E.slice(0,-2)+W,O=s.measureText(E).width;if(E.length<4)return}for(var re={},de=0,ie=E.length;de{const n=this.nodeIdMap[t];if(n!==void 0)return this.nodes[n]});Xr(this,"getEdge",(t,n=!0)=>{const a=n?this.edgeDynamicIdMap[t]:this.edgeIdMap[t];if(a!==void 0)return this.edges[a]});Xr(this,"buildDynamicMap",()=>{this.edgeDynamicIdMap={};for(let t=0;t({selectedNode:null,focusedNode:null,selectedEdge:null,focusedEdge:null,moveToSelectedNode:!1,rawGraph:null,sigmaGraph:null,setSelectedNode:(t,n)=>e({selectedNode:t,moveToSelectedNode:n}),setFocusedNode:t=>e({focusedNode:t}),setSelectedEdge:t=>e({selectedEdge:t}),setFocusedEdge:t=>e({focusedEdge:t}),clearSelection:()=>e({selectedNode:null,focusedNode:null,selectedEdge:null,focusedEdge:null}),reset:()=>e({selectedNode:null,focusedNode:null,selectedEdge:null,focusedEdge:null,rawGraph:null,sigmaGraph:null,moveToSelectedNode:!1}),setRawGraph:t=>e({rawGraph:t}),setSigmaGraph:t=>e({sigmaGraph:t}),setMoveToSelectedNode:t=>e({moveToSelectedNode:t})})),ct=tg(m5),g5=({node:e,move:t})=>{const n=Zn(),{gotoNode:a}=FC();return w.useEffect(()=>{if(e)return n.getGraph().setNodeAttribute(e,"highlighted",!0),t&&(a(e),ct.getState().setMoveToSelectedNode(!1)),()=>{n.getGraph().setNodeAttribute(e,"highlighted",!1)}},[e,t,n,a]),null};function Xo(e,t){const n=Zn(),a=w.useRef(t);return Al(a.current,t)||(a.current=t),{positions:w.useCallback(()=>a.current?e(n.getGraph(),a.current):{},[n,a,e]),assign:w.useCallback(()=>{a.current&&e.assign(n.getGraph(),a.current)},[n,a,e])}}function Wg(e,t){const n=Zn(),[a,o]=w.useState(!1),[s,c]=w.useState(null),u=w.useRef(t);return Al(u.current,t)||(u.current=t),w.useEffect(()=>{o(!1);let f=null;return u.current&&(f=new e(n.getGraph(),u.current)),c(f),()=>{f!==null&&f.kill()}},[n,u,c,o,e]),{stop:w.useCallback(()=>{s&&(s.stop(),o(!1))},[s,o]),start:w.useCallback(()=>{s&&(s.start(),o(!0))},[s,o]),kill:w.useCallback(()=>{s&&s.kill(),o(!1)},[s,o]),isRunning:a}}var gp,Ow;function Dl(){if(Ow)return gp;Ow=1;function e(n){return!n||typeof n!="object"||typeof n=="function"||Array.isArray(n)||n instanceof Set||n instanceof Map||n instanceof RegExp||n instanceof Date}function t(n,a){n=n||{};var o={};for(var s in a){var c=n[s],u=a[s];if(!e(u)){o[s]=t(c,u);continue}c===void 0?o[s]=u:o[s]=c}return o}return gp=t,gp}var vp,jw;function v5(){if(jw)return vp;jw=1;function e(n){return function(a,o){return a+Math.floor(n()*(o-a+1))}}var t=e(Math.random);return t.createRandom=e,vp=t,vp}var yp,Lw;function y5(){if(Lw)return yp;Lw=1;var e=v5().createRandom;function t(a){var o=e(a);return function(s){for(var c=s.length,u=c-1,f=-1;++f0},o.prototype.addChild=function(R,U){this.children[R]=U,++this.countChildren},o.prototype.getChild=function(R){if(!this.children.hasOwnProperty(R)){var U=new o;this.children[R]=U,++this.countChildren}return this.children[R]},o.prototype.applyPositionToChildren=function(){if(this.hasChildren()){var R=this;for(var U in R.children){var L=R.children[U];L.x+=R.x,L.y+=R.y,L.applyPositionToChildren()}}};function s(R,U,L){for(var I in U.children){var q=U.children[I];q.hasChildren()?s(R,q,L):L[q.id]={x:q.x,y:q.y}}}function c(R,U){var L=R.r-U.r,I=U.x-R.x,q=U.y-R.y;return L<0||L*L0&&L*L>I*I+q*q}function f(R,U){for(var L=0;Lne?(q=(F+ne-Y)/(2*F),X=Math.sqrt(Math.max(0,ne/F-q*q)),L.x=R.x-q*I-X*B,L.y=R.y-q*B+X*I):(q=(F+Y-ne)/(2*F),X=Math.sqrt(Math.max(0,Y/F-q*q)),L.x=U.x+q*I-X*B,L.y=U.y+q*B+X*I)):(L.x=U.x+L.r,L.y=U.y)}function N(R,U){var L=R.r+U.r-1e-6,I=U.x-R.x,q=U.y-R.y;return L>0&&L*L>I*I+q*q}function C(R,U){var L=R.length;if(L===0)return 0;var I,q,Y,B,X,ne,F,z,j,K;if(I=R[0],I.x=0,I.y=0,L<=1)return I.r;if(q=R[1],I.x=-q.r,q.x=I.r,q.y=0,L<=2)return I.r+q.r;Y=R[2],_(q,I,Y),I=new o(null,null,null,null,I),q=new o(null,null,null,null,q),Y=new o(null,null,null,null,Y),I.next=Y.previous=q,q.next=I.previous=Y,Y.next=q.previous=I;e:for(ne=3;ne"u"?o:h};typeof o=="function"&&(c=o);var u=function(h){return c(h[a])},f=function(){return c(void 0)};return typeof a=="string"?(s.fromAttributes=u,s.fromGraph=function(h,m){return u(h.getNodeAttributes(m))},s.fromEntry=function(h,m){return u(m)}):typeof a=="function"?(s.fromAttributes=function(){throw new Error("graphology-utils/getters/createNodeValueGetter: irrelevant usage.")},s.fromGraph=function(h,m){return c(a(m,h.getNodeAttributes(m)))},s.fromEntry=function(h,m){return c(a(h,m))}):(s.fromAttributes=f,s.fromGraph=f,s.fromEntry=f),s}function n(a,o){var s={},c=function(h){return typeof h>"u"?o:h};typeof o=="function"&&(c=o);var u=function(h){return c(h[a])},f=function(){return c(void 0)};return typeof a=="string"?(s.fromAttributes=u,s.fromGraph=function(h,m){return u(h.getEdgeAttributes(m))},s.fromEntry=function(h,m){return u(m)},s.fromPartialEntry=s.fromEntry,s.fromMinimalEntry=s.fromEntry):typeof a=="function"?(s.fromAttributes=function(){throw new Error("graphology-utils/getters/createEdgeValueGetter: irrelevant usage.")},s.fromGraph=function(h,m){var g=h.extremities(m);return c(a(m,h.getEdgeAttributes(m),g[0],g[1],h.getNodeAttributes(g[0]),h.getNodeAttributes(g[1]),h.isUndirected(m)))},s.fromEntry=function(h,m,g,y,b,S,E){return c(a(h,m,g,y,b,S,E))},s.fromPartialEntry=function(h,m,g,y){return c(a(h,m,g,y))},s.fromMinimalEntry=function(h,m){return c(a(h,m))}):(s.fromAttributes=f,s.fromGraph=f,s.fromEntry=f,s.fromMinimalEntry=f),s}return tl.createNodeValueGetter=t,tl.createEdgeValueGetter=n,tl.createEdgeWeightGetter=function(a){return n(a,e)},tl}var wp,Gw;function eT(){if(Gw)return wp;Gw=1;const{createNodeValueGetter:e,createEdgeValueGetter:t}=Xg();return wp=function(a,o,s){const{nodeXAttribute:c,nodeYAttribute:u}=s,{attraction:f,repulsion:h,gravity:m,inertia:g,maxMove:y}=s.settings;let{shouldSkipNode:b,shouldSkipEdge:S,isNodeFixed:E}=s;E=e(E),b=e(b,!1),S=t(S,!1);const _=a.filterNodes((A,k)=>!b.fromEntry(A,k)),N=_.length;for(let A=0;A{if(D===M||b.fromEntry(D,R)||b.fromEntry(M,U)||S.fromEntry(A,k,D,M,R,U,L))return;const I=o[D],q=o[M],Y=q.x-I.x,B=q.y-I.y,X=Math.sqrt(Y*Y+B*B)||1,ne=f*X*Y,F=f*X*B;I.dx+=ne,I.dy+=F,q.dx-=ne,q.dy-=F}),m)for(let A=0;Ay&&(D.dx*=y/M,D.dy*=y/M),E.fromGraph(a,k)?D.fixed=!0:(D.x+=D.dx,D.y+=D.dy,D.fixed=!1)}return{converged:C}},wp}var nu={},Fw;function tT(){return Fw||(Fw=1,nu.assignLayoutChanges=function(e,t,n){const{nodeXAttribute:a,nodeYAttribute:o}=n;e.updateEachNodeAttributes((s,c)=>{const u=t[s];return!u||u.fixed||(c[a]=u.x,c[o]=u.y),c},{attributes:["x","y"]})},nu.collectLayoutChanges=function(e){const t={};for(const n in e){const a=e[n];t[n]={x:a.x,y:a.y}}return t}),nu}var Ep,Uw;function nT(){return Uw||(Uw=1,Ep={nodeXAttribute:"x",nodeYAttribute:"y",isNodeFixed:"fixed",shouldSkipNode:null,shouldSkipEdge:null,settings:{attraction:5e-4,repulsion:.1,gravity:1e-4,inertia:.6,maxMove:200}}),Ep}var Sp,Bw;function R5(){if(Bw)return Sp;Bw=1;const e=Dr(),t=Dl(),n=eT(),a=tT(),o=nT();function s(u,f,h){if(!e(f))throw new Error("graphology-layout-force: the given graph is not a valid graphology instance.");typeof h=="number"?h={maxIterations:h}:h=h||{};const m=h.maxIterations;if(h=t(h,o),typeof m!="number"||m<=0)throw new Error("graphology-layout-force: you should provide a positive number of maximum iterations.");const g={};let y=null,b;for(b=0;bthis.runFrame())},s.prototype.stop=function(){return this.running=!1,this.frameID!==null&&(window.cancelAnimationFrame(this.frameID),this.frameID=null),this},s.prototype.start=function(){if(this.killed)throw new Error("graphology-layout-force/worker.start: layout was killed.");this.running||(this.running=!0,this.runFrame())},s.prototype.kill=function(){this.stop(),delete this.nodeStates,this.killed=!0},_p=s,_p}var N5=k5();const O5=dn(N5);function j5(e={maxIterations:100}){return Xo(D5,e)}function L5(e={}){return Wg(O5,e)}var Cp,Hw;function z5(){if(Hw)return Cp;Hw=1;var e=0,t=1,n=2,a=3,o=4,s=5,c=6,u=7,f=8,h=9,m=0,g=1,y=2,b=0,S=1,E=2,_=3,N=4,C=5,A=6,k=7,D=8,M=3,R=10,U=3,L=9,I=10;return Cp=function(Y,B,X){var ne,F,z,j,K,G,H,O,$,W,re=B.length,de=X.length,ie=Y.adjustSizes,oe=Y.barnesHutTheta*Y.barnesHutTheta,Ce,he,Se,be,Le,Te,ye,J=[];for(z=0;zAe?(pe-=(me-Ae)/2,Ee=pe+me):(le-=(Ae-me)/2,_e=le+Ae),J[0+b]=-1,J[0+S]=(le+_e)/2,J[0+E]=(pe+Ee)/2,J[0+_]=Math.max(_e-le,Ee-pe),J[0+N]=-1,J[0+C]=-1,J[0+A]=0,J[0+k]=0,J[0+D]=0,ne=1,z=0;z=0){B[z+e]=0)if(Te=Math.pow(B[z+e]-J[F+k],2)+Math.pow(B[z+t]-J[F+D],2),W=J[F+_],4*W*W/Te0?(ye=he*B[z+c]*J[F+A]/Te,B[z+n]+=Se*ye,B[z+a]+=be*ye):Te<0&&(ye=-he*B[z+c]*J[F+A]/Math.sqrt(Te),B[z+n]+=Se*ye,B[z+a]+=be*ye):Te>0&&(ye=he*B[z+c]*J[F+A]/Te,B[z+n]+=Se*ye,B[z+a]+=be*ye),F=J[F+N],F<0)break;continue}else{F=J[F+C];continue}else{if(G=J[F+b],G>=0&&G!==z&&(Se=B[z+e]-B[G+e],be=B[z+t]-B[G+t],Te=Se*Se+be*be,ie===!0?Te>0?(ye=he*B[z+c]*B[G+c]/Te,B[z+n]+=Se*ye,B[z+a]+=be*ye):Te<0&&(ye=-he*B[z+c]*B[G+c]/Math.sqrt(Te),B[z+n]+=Se*ye,B[z+a]+=be*ye):Te>0&&(ye=he*B[z+c]*B[G+c]/Te,B[z+n]+=Se*ye,B[z+a]+=be*ye)),F=J[F+N],F<0)break;continue}else for(he=Y.scalingRatio,j=0;j0?(ye=he*B[j+c]*B[K+c]/Te/Te,B[j+n]+=Se*ye,B[j+a]+=be*ye,B[K+n]-=Se*ye,B[K+a]-=be*ye):Te<0&&(ye=100*he*B[j+c]*B[K+c],B[j+n]+=Se*ye,B[j+a]+=be*ye,B[K+n]-=Se*ye,B[K+a]-=be*ye)):(Te=Math.sqrt(Se*Se+be*be),Te>0&&(ye=he*B[j+c]*B[K+c]/Te/Te,B[j+n]+=Se*ye,B[j+a]+=be*ye,B[K+n]-=Se*ye,B[K+a]-=be*ye));for($=Y.gravity/Y.scalingRatio,he=Y.scalingRatio,z=0;z0&&(ye=he*B[z+c]*$):Te>0&&(ye=he*B[z+c]*$/Te),B[z+n]-=Se*ye,B[z+a]-=be*ye;for(he=1*(Y.outboundAttractionDistribution?Ce:1),H=0;H0&&(ye=-he*Le*Math.log(1+Te)/Te/B[j+c]):Te>0&&(ye=-he*Le*Math.log(1+Te)/Te):Y.outboundAttractionDistribution?Te>0&&(ye=-he*Le/B[j+c]):Te>0&&(ye=-he*Le)):(Te=Math.sqrt(Math.pow(Se,2)+Math.pow(be,2)),Y.linLogMode?Y.outboundAttractionDistribution?Te>0&&(ye=-he*Le*Math.log(1+Te)/Te/B[j+c]):Te>0&&(ye=-he*Le*Math.log(1+Te)/Te):Y.outboundAttractionDistribution?(Te=1,ye=-he*Le/B[j+c]):(Te=1,ye=-he*Le)),Te>0&&(B[j+n]+=Se*ye,B[j+a]+=be*ye,B[K+n]-=Se*ye,B[K+a]-=be*ye);var je,He,it,Ct,bt,qt;if(ie===!0)for(z=0;zI&&(B[z+n]=B[z+n]*I/je,B[z+a]=B[z+a]*I/je),He=B[z+c]*Math.sqrt((B[z+o]-B[z+n])*(B[z+o]-B[z+n])+(B[z+s]-B[z+a])*(B[z+s]-B[z+a])),it=Math.sqrt((B[z+o]+B[z+n])*(B[z+o]+B[z+n])+(B[z+s]+B[z+a])*(B[z+s]+B[z+a]))/2,Ct=.1*Math.log(1+it)/(1+Math.sqrt(He)),bt=B[z+e]+B[z+n]*(Ct/Y.slowDown),B[z+e]=bt,qt=B[z+t]+B[z+a]*(Ct/Y.slowDown),B[z+t]=qt);else for(z=0;z=0)?{message:"the `scalingRatio` setting should be a number >= 0."}:"strongGravityMode"in n&&typeof n.strongGravityMode!="boolean"?{message:"the `strongGravityMode` setting should be a boolean."}:"gravity"in n&&!(typeof n.gravity=="number"&&n.gravity>=0)?{message:"the `gravity` setting should be a number >= 0."}:"slowDown"in n&&!(typeof n.slowDown=="number"||n.slowDown>=0)?{message:"the `slowDown` setting should be a number >= 0."}:"barnesHutOptimize"in n&&typeof n.barnesHutOptimize!="boolean"?{message:"the `barnesHutOptimize` setting should be a boolean."}:"barnesHutTheta"in n&&!(typeof n.barnesHutTheta=="number"&&n.barnesHutTheta>=0)?{message:"the `barnesHutTheta` setting should be a number >= 0."}:null},Zr.graphToByteArrays=function(n,a){var o=n.order,s=n.size,c={},u,f=new Float32Array(o*e),h=new Float32Array(s*t);return u=0,n.forEachNode(function(m,g){c[m]=u,f[u]=g.x,f[u+1]=g.y,f[u+2]=0,f[u+3]=0,f[u+4]=0,f[u+5]=0,f[u+6]=1,f[u+7]=1,f[u+8]=g.size||1,f[u+9]=g.fixed?1:0,u+=e}),u=0,n.forEachEdge(function(m,g,y,b,S,E,_){var N=c[y],C=c[b],A=a(m,g,y,b,S,E,_);f[N+6]+=A,f[C+6]+=A,h[u]=N,h[u+1]=C,h[u+2]=A,u+=t}),{nodes:f,edges:h}},Zr.assignLayoutChanges=function(n,a,o){var s=0;n.updateEachNodeAttributes(function(c,u){return u.x=a[s],u.y=a[s+1],s+=e,o?o(c,u):u})},Zr.readGraphPositions=function(n,a){var o=0;n.forEachNode(function(s,c){a[o]=c.x,a[o+1]=c.y,o+=e})},Zr.collectLayoutChanges=function(n,a,o){for(var s=n.nodes(),c={},u=0,f=0,h=a.length;u2e3,strongGravityMode:!0,gravity:.05,scalingRatio:10,slowDown:1+Math.log(h)}}var u=s.bind(null,!1);return u.assign=s.bind(null,!0),u.inferSettings=c,Rp=u,Rp}var P5=M5();const G5=dn(P5);var Ap,Yw;function F5(){return Yw||(Yw=1,Ap=function(){var t,n,a={};(function(){var s=0,c=1,u=2,f=3,h=4,m=5,g=6,y=7,b=8,S=9,E=0,_=1,N=2,C=0,A=1,k=2,D=3,M=4,R=5,U=6,L=7,I=8,q=3,Y=10,B=3,X=9,ne=10;a.exports=function(z,j,K){var G,H,O,$,W,re,de,ie,oe,Ce,he=j.length,Se=K.length,be=z.adjustSizes,Le=z.barnesHutTheta*z.barnesHutTheta,Te,ye,J,le,_e,pe,Ee,te=[];for(O=0;Obt?(me-=(Ct-bt)/2,Ae=me+Ct):(Fe-=(bt-Ct)/2,Pe=Fe+bt),te[0+C]=-1,te[0+A]=(Fe+Pe)/2,te[0+k]=(me+Ae)/2,te[0+D]=Math.max(Pe-Fe,Ae-me),te[0+M]=-1,te[0+R]=-1,te[0+U]=0,te[0+L]=0,te[0+I]=0,G=1,O=0;O=0){j[O+s]=0)if(pe=Math.pow(j[O+s]-te[H+L],2)+Math.pow(j[O+c]-te[H+I],2),Ce=te[H+D],4*Ce*Ce/pe0?(Ee=ye*j[O+g]*te[H+U]/pe,j[O+u]+=J*Ee,j[O+f]+=le*Ee):pe<0&&(Ee=-ye*j[O+g]*te[H+U]/Math.sqrt(pe),j[O+u]+=J*Ee,j[O+f]+=le*Ee):pe>0&&(Ee=ye*j[O+g]*te[H+U]/pe,j[O+u]+=J*Ee,j[O+f]+=le*Ee),H=te[H+M],H<0)break;continue}else{H=te[H+R];continue}else{if(re=te[H+C],re>=0&&re!==O&&(J=j[O+s]-j[re+s],le=j[O+c]-j[re+c],pe=J*J+le*le,be===!0?pe>0?(Ee=ye*j[O+g]*j[re+g]/pe,j[O+u]+=J*Ee,j[O+f]+=le*Ee):pe<0&&(Ee=-ye*j[O+g]*j[re+g]/Math.sqrt(pe),j[O+u]+=J*Ee,j[O+f]+=le*Ee):pe>0&&(Ee=ye*j[O+g]*j[re+g]/pe,j[O+u]+=J*Ee,j[O+f]+=le*Ee)),H=te[H+M],H<0)break;continue}else for(ye=z.scalingRatio,$=0;$0?(Ee=ye*j[$+g]*j[W+g]/pe/pe,j[$+u]+=J*Ee,j[$+f]+=le*Ee,j[W+u]-=J*Ee,j[W+f]-=le*Ee):pe<0&&(Ee=100*ye*j[$+g]*j[W+g],j[$+u]+=J*Ee,j[$+f]+=le*Ee,j[W+u]-=J*Ee,j[W+f]-=le*Ee)):(pe=Math.sqrt(J*J+le*le),pe>0&&(Ee=ye*j[$+g]*j[W+g]/pe/pe,j[$+u]+=J*Ee,j[$+f]+=le*Ee,j[W+u]-=J*Ee,j[W+f]-=le*Ee));for(oe=z.gravity/z.scalingRatio,ye=z.scalingRatio,O=0;O0&&(Ee=ye*j[O+g]*oe):pe>0&&(Ee=ye*j[O+g]*oe/pe),j[O+u]-=J*Ee,j[O+f]-=le*Ee;for(ye=1*(z.outboundAttractionDistribution?Te:1),de=0;de0&&(Ee=-ye*_e*Math.log(1+pe)/pe/j[$+g]):pe>0&&(Ee=-ye*_e*Math.log(1+pe)/pe):z.outboundAttractionDistribution?pe>0&&(Ee=-ye*_e/j[$+g]):pe>0&&(Ee=-ye*_e)):(pe=Math.sqrt(Math.pow(J,2)+Math.pow(le,2)),z.linLogMode?z.outboundAttractionDistribution?pe>0&&(Ee=-ye*_e*Math.log(1+pe)/pe/j[$+g]):pe>0&&(Ee=-ye*_e*Math.log(1+pe)/pe):z.outboundAttractionDistribution?(pe=1,Ee=-ye*_e/j[$+g]):(pe=1,Ee=-ye*_e)),pe>0&&(j[$+u]+=J*Ee,j[$+f]+=le*Ee,j[W+u]-=J*Ee,j[W+f]-=le*Ee);var qt,fn,Gt,at,Tn,xt;if(be===!0)for(O=0;One&&(j[O+u]=j[O+u]*ne/qt,j[O+f]=j[O+f]*ne/qt),fn=j[O+g]*Math.sqrt((j[O+h]-j[O+u])*(j[O+h]-j[O+u])+(j[O+m]-j[O+f])*(j[O+m]-j[O+f])),Gt=Math.sqrt((j[O+h]+j[O+u])*(j[O+h]+j[O+u])+(j[O+m]+j[O+f])*(j[O+m]+j[O+f]))/2,at=.1*Math.log(1+Gt)/(1+Math.sqrt(fn)),Tn=j[O+s]+j[O+u]*(at/z.slowDown),j[O+s]=Tn,xt=j[O+c]+j[O+f]*(at/z.slowDown),j[O+c]=xt);else for(O=0;O1&&Se.has(Ee))&&(j>1&&Se.add(Ee),ye=f[Le+e],le=f[Le+t],pe=f[Le+n],te=ye-Te,Fe=le-J,Pe=Math.sqrt(te*te+Fe*Fe),me=Pe<_e*m+h+(pe*m+h),me&&(k=!1,Le=Le/a|0,Pe>0?(R[Le]+=te/Pe*(1+_e),U[Le]+=Fe/Pe*(1+_e)):(R[Le]+=B*s(),U[Le]+=X*s())));for(S=0,E=0;S1&&ye.has(me))&&(O>1&&ye.add(me),pe=y[le+o],te=y[le+s],Pe=y[le+c],Ae=pe-_e,je=te-Ee,He=Math.sqrt(Ae*Ae+je*je),it=He0?(q[le]+=Ae/He*(1+Fe),Y[le]+=je/He*(1+Fe)):(q[le]+=z*h(),Y[le]+=j*h())));for(C=0,A=0;C=0;)g=Nm(e,t,n,a,h+1,s+1,c),g>m&&(h===o?g*=n1:cF.test(e.charAt(h-1))?(g*=iF,b=e.slice(o,h-1).match(uF),b&&o>0&&(g*=Math.pow(Pp,b.length))):dF.test(e.charAt(h-1))?(g*=aF,S=e.slice(o,h-1).match(lT),S&&o>0&&(g*=Math.pow(Pp,S.length))):(g*=oF,o>0&&(g*=Math.pow(Pp,h-o))),e.charAt(h)!==t.charAt(s)&&(g*=sF)),(gg&&(g=y*Mp)),g>m&&(m=g),h=n.indexOf(f,h+1);return c[u]=m,m}function r1(e){return e.toLowerCase().replace(lT," ")}function fF(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,Nm(e,t,r1(e),r1(t),0,0,{})}var Gp={exports:{}},Fp={};/** - * @license React - * use-sync-external-store-shim.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var a1;function hF(){if(a1)return Fp;a1=1;var e=Yu();function t(g,y){return g===y&&(g!==0||1/g===1/y)||g!==g&&y!==y}var n=typeof Object.is=="function"?Object.is:t,a=e.useState,o=e.useEffect,s=e.useLayoutEffect,c=e.useDebugValue;function u(g,y){var b=y(),S=a({inst:{value:b,getSnapshot:y}}),E=S[0].inst,_=S[1];return s(function(){E.value=b,E.getSnapshot=y,f(E)&&_({inst:E})},[g,b,y]),o(function(){return f(E)&&_({inst:E}),g(function(){f(E)&&_({inst:E})})},[g]),c(b),b}function f(g){var y=g.getSnapshot;g=g.value;try{var b=y();return!n(g,b)}catch{return!0}}function h(g,y){return y()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:u;return Fp.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,Fp}var i1;function pF(){return i1||(i1=1,Gp.exports=hF()),Gp.exports}var mF=pF(),nl='[cmdk-group=""]',Up='[cmdk-group-items=""]',gF='[cmdk-group-heading=""]',Kg='[cmdk-item=""]',o1=`${Kg}:not([aria-disabled="true"])`,Om="cmdk-item-select",xi="data-value",vF=(e,t,n)=>fF(e,t,n),cT=w.createContext(void 0),kl=()=>w.useContext(cT),uT=w.createContext(void 0),Zg=()=>w.useContext(uT),dT=w.createContext(void 0),fT=w.forwardRef((e,t)=>{let n=Co(()=>{var O,$;return{search:"",value:($=(O=e.value)!=null?O:e.defaultValue)!=null?$:"",filtered:{count:0,items:new Map,groups:new Set}}}),a=Co(()=>new Set),o=Co(()=>new Map),s=Co(()=>new Map),c=Co(()=>new Set),u=hT(e),{label:f,children:h,value:m,onValueChange:g,filter:y,shouldFilter:b,loop:S,disablePointerSelection:E=!1,vimBindings:_=!0,...N}=e,C=on(),A=on(),k=on(),D=w.useRef(null),M=AF();Di(()=>{if(m!==void 0){let O=m.trim();n.current.value=O,R.emit()}},[m]),Di(()=>{M(6,B)},[]);let R=w.useMemo(()=>({subscribe:O=>(c.current.add(O),()=>c.current.delete(O)),snapshot:()=>n.current,setState:(O,$,W)=>{var re,de,ie;if(!Object.is(n.current[O],$)){if(n.current[O]=$,O==="search")Y(),I(),M(1,q);else if(O==="value"&&(W||M(5,B),((re=u.current)==null?void 0:re.value)!==void 0)){let oe=$??"";(ie=(de=u.current).onValueChange)==null||ie.call(de,oe);return}R.emit()}},emit:()=>{c.current.forEach(O=>O())}}),[]),U=w.useMemo(()=>({value:(O,$,W)=>{var re;$!==((re=s.current.get(O))==null?void 0:re.value)&&(s.current.set(O,{value:$,keywords:W}),n.current.filtered.items.set(O,L($,W)),M(2,()=>{I(),R.emit()}))},item:(O,$)=>(a.current.add(O),$&&(o.current.has($)?o.current.get($).add(O):o.current.set($,new Set([O]))),M(3,()=>{Y(),I(),n.current.value||q(),R.emit()}),()=>{s.current.delete(O),a.current.delete(O),n.current.filtered.items.delete(O);let W=X();M(4,()=>{Y(),(W==null?void 0:W.getAttribute("id"))===O&&q(),R.emit()})}),group:O=>(o.current.has(O)||o.current.set(O,new Set),()=>{s.current.delete(O),o.current.delete(O)}),filter:()=>u.current.shouldFilter,label:f||e["aria-label"],getDisablePointerSelection:()=>u.current.disablePointerSelection,listId:C,inputId:k,labelId:A,listInnerRef:D}),[]);function L(O,$){var W,re;let de=(re=(W=u.current)==null?void 0:W.filter)!=null?re:vF;return O?de(O,n.current.search,$):0}function I(){if(!n.current.search||u.current.shouldFilter===!1)return;let O=n.current.filtered.items,$=[];n.current.filtered.groups.forEach(re=>{let de=o.current.get(re),ie=0;de.forEach(oe=>{let Ce=O.get(oe);ie=Math.max(Ce,ie)}),$.push([re,ie])});let W=D.current;ne().sort((re,de)=>{var ie,oe;let Ce=re.getAttribute("id"),he=de.getAttribute("id");return((ie=O.get(he))!=null?ie:0)-((oe=O.get(Ce))!=null?oe:0)}).forEach(re=>{let de=re.closest(Up);de?de.appendChild(re.parentElement===de?re:re.closest(`${Up} > *`)):W.appendChild(re.parentElement===W?re:re.closest(`${Up} > *`))}),$.sort((re,de)=>de[1]-re[1]).forEach(re=>{var de;let ie=(de=D.current)==null?void 0:de.querySelector(`${nl}[${xi}="${encodeURIComponent(re[0])}"]`);ie==null||ie.parentElement.appendChild(ie)})}function q(){let O=ne().find(W=>W.getAttribute("aria-disabled")!=="true"),$=O==null?void 0:O.getAttribute(xi);R.setState("value",$||void 0)}function Y(){var O,$,W,re;if(!n.current.search||u.current.shouldFilter===!1){n.current.filtered.count=a.current.size;return}n.current.filtered.groups=new Set;let de=0;for(let ie of a.current){let oe=($=(O=s.current.get(ie))==null?void 0:O.value)!=null?$:"",Ce=(re=(W=s.current.get(ie))==null?void 0:W.keywords)!=null?re:[],he=L(oe,Ce);n.current.filtered.items.set(ie,he),he>0&&de++}for(let[ie,oe]of o.current)for(let Ce of oe)if(n.current.filtered.items.get(Ce)>0){n.current.filtered.groups.add(ie);break}n.current.filtered.count=de}function B(){var O,$,W;let re=X();re&&(((O=re.parentElement)==null?void 0:O.firstChild)===re&&((W=($=re.closest(nl))==null?void 0:$.querySelector(gF))==null||W.scrollIntoView({block:"nearest"})),re.scrollIntoView({block:"nearest"}))}function X(){var O;return(O=D.current)==null?void 0:O.querySelector(`${Kg}[aria-selected="true"]`)}function ne(){var O;return Array.from(((O=D.current)==null?void 0:O.querySelectorAll(o1))||[])}function F(O){let $=ne()[O];$&&R.setState("value",$.getAttribute(xi))}function z(O){var $;let W=X(),re=ne(),de=re.findIndex(oe=>oe===W),ie=re[de+O];($=u.current)!=null&&$.loop&&(ie=de+O<0?re[re.length-1]:de+O===re.length?re[0]:re[de+O]),ie&&R.setState("value",ie.getAttribute(xi))}function j(O){let $=X(),W=$==null?void 0:$.closest(nl),re;for(;W&&!re;)W=O>0?TF(W,nl):RF(W,nl),re=W==null?void 0:W.querySelector(o1);re?R.setState("value",re.getAttribute(xi)):z(O)}let K=()=>F(ne().length-1),G=O=>{O.preventDefault(),O.metaKey?K():O.altKey?j(1):z(1)},H=O=>{O.preventDefault(),O.metaKey?F(0):O.altKey?j(-1):z(-1)};return w.createElement(Ie.div,{ref:t,tabIndex:-1,...N,"cmdk-root":"",onKeyDown:O=>{var $;if(($=N.onKeyDown)==null||$.call(N,O),!O.defaultPrevented)switch(O.key){case"n":case"j":{_&&O.ctrlKey&&G(O);break}case"ArrowDown":{G(O);break}case"p":case"k":{_&&O.ctrlKey&&H(O);break}case"ArrowUp":{H(O);break}case"Home":{O.preventDefault(),F(0);break}case"End":{O.preventDefault(),K();break}case"Enter":if(!O.nativeEvent.isComposing&&O.keyCode!==229){O.preventDefault();let W=X();if(W){let re=new Event(Om);W.dispatchEvent(re)}}}}},w.createElement("label",{"cmdk-label":"",htmlFor:U.inputId,id:U.labelId,style:kF},f),xd(e,O=>w.createElement(uT.Provider,{value:R},w.createElement(cT.Provider,{value:U},O))))}),yF=w.forwardRef((e,t)=>{var n,a;let o=on(),s=w.useRef(null),c=w.useContext(dT),u=kl(),f=hT(e),h=(a=(n=f.current)==null?void 0:n.forceMount)!=null?a:c==null?void 0:c.forceMount;Di(()=>{if(!h)return u.item(o,c==null?void 0:c.id)},[h]);let m=pT(o,s,[e.value,e.children,s],e.keywords),g=Zg(),y=ki(M=>M.value&&M.value===m.current),b=ki(M=>h||u.filter()===!1?!0:M.search?M.filtered.items.get(o)>0:!0);w.useEffect(()=>{let M=s.current;if(!(!M||e.disabled))return M.addEventListener(Om,S),()=>M.removeEventListener(Om,S)},[b,e.onSelect,e.disabled]);function S(){var M,R;E(),(R=(M=f.current).onSelect)==null||R.call(M,m.current)}function E(){g.setState("value",m.current,!0)}if(!b)return null;let{disabled:_,value:N,onSelect:C,forceMount:A,keywords:k,...D}=e;return w.createElement(Ie.div,{ref:fl([s,t]),...D,id:o,"cmdk-item":"",role:"option","aria-disabled":!!_,"aria-selected":!!y,"data-disabled":!!_,"data-selected":!!y,onPointerMove:_||u.getDisablePointerSelection()?void 0:E,onClick:_?void 0:S},e.children)}),bF=w.forwardRef((e,t)=>{let{heading:n,children:a,forceMount:o,...s}=e,c=on(),u=w.useRef(null),f=w.useRef(null),h=on(),m=kl(),g=ki(b=>o||m.filter()===!1?!0:b.search?b.filtered.groups.has(c):!0);Di(()=>m.group(c),[]),pT(c,u,[e.value,e.heading,f]);let y=w.useMemo(()=>({id:c,forceMount:o}),[o]);return w.createElement(Ie.div,{ref:fl([u,t]),...s,"cmdk-group":"",role:"presentation",hidden:g?void 0:!0},n&&w.createElement("div",{ref:f,"cmdk-group-heading":"","aria-hidden":!0,id:h},n),xd(e,b=>w.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?h:void 0},w.createElement(dT.Provider,{value:y},b))))}),xF=w.forwardRef((e,t)=>{let{alwaysRender:n,...a}=e,o=w.useRef(null),s=ki(c=>!c.search);return!n&&!s?null:w.createElement(Ie.div,{ref:fl([o,t]),...a,"cmdk-separator":"",role:"separator"})}),wF=w.forwardRef((e,t)=>{let{onValueChange:n,...a}=e,o=e.value!=null,s=Zg(),c=ki(m=>m.search),u=ki(m=>m.value),f=kl(),h=w.useMemo(()=>{var m;let g=(m=f.listInnerRef.current)==null?void 0:m.querySelector(`${Kg}[${xi}="${encodeURIComponent(u)}"]`);return g==null?void 0:g.getAttribute("id")},[]);return w.useEffect(()=>{e.value!=null&&s.setState("search",e.value)},[e.value]),w.createElement(Ie.input,{ref:t,...a,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":f.listId,"aria-labelledby":f.labelId,"aria-activedescendant":h,id:f.inputId,type:"text",value:o?e.value:c,onChange:m=>{o||s.setState("search",m.target.value),n==null||n(m.target.value)}})}),EF=w.forwardRef((e,t)=>{let{children:n,label:a="Suggestions",...o}=e,s=w.useRef(null),c=w.useRef(null),u=kl();return w.useEffect(()=>{if(c.current&&s.current){let f=c.current,h=s.current,m,g=new ResizeObserver(()=>{m=requestAnimationFrame(()=>{let y=f.offsetHeight;h.style.setProperty("--cmdk-list-height",y.toFixed(1)+"px")})});return g.observe(f),()=>{cancelAnimationFrame(m),g.unobserve(f)}}},[]),w.createElement(Ie.div,{ref:fl([s,t]),...o,"cmdk-list":"",role:"listbox","aria-label":a,id:u.listId},xd(e,f=>w.createElement("div",{ref:fl([c,u.listInnerRef]),"cmdk-list-sizer":""},f)))}),SF=w.forwardRef((e,t)=>{let{open:n,onOpenChange:a,overlayClassName:o,contentClassName:s,container:c,...u}=e;return w.createElement(pg,{open:n,onOpenChange:a},w.createElement(mg,{container:c},w.createElement(ad,{"cmdk-overlay":"",className:o}),w.createElement(id,{"aria-label":e.label,"cmdk-dialog":"",className:s},w.createElement(fT,{ref:t,...u}))))}),_F=w.forwardRef((e,t)=>ki(n=>n.filtered.count===0)?w.createElement(Ie.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),CF=w.forwardRef((e,t)=>{let{progress:n,children:a,label:o="Loading...",...s}=e;return w.createElement(Ie.div,{ref:t,...s,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},xd(e,c=>w.createElement("div",{"aria-hidden":!0},c)))}),Cn=Object.assign(fT,{List:EF,Item:yF,Input:wF,Group:bF,Separator:xF,Dialog:SF,Empty:_F,Loading:CF});function TF(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function RF(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function hT(e){let t=w.useRef(e);return Di(()=>{t.current=e}),t}var Di=typeof window>"u"?w.useEffect:w.useLayoutEffect;function Co(e){let t=w.useRef();return t.current===void 0&&(t.current=e()),t}function fl(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function ki(e){let t=Zg(),n=()=>e(t.snapshot());return mF.useSyncExternalStore(t.subscribe,n,n)}function pT(e,t,n,a=[]){let o=w.useRef(),s=kl();return Di(()=>{var c;let u=(()=>{var h;for(let m of n){if(typeof m=="string")return m.trim();if(typeof m=="object"&&"current"in m)return m.current?(h=m.current.textContent)==null?void 0:h.trim():o.current}})(),f=a.map(h=>h.trim());s.value(e,u,f),(c=t.current)==null||c.setAttribute(xi,u),o.current=u}),o}var AF=()=>{let[e,t]=w.useState(),n=Co(()=>new Map);return Di(()=>{n.current.forEach(a=>a()),n.current=new Map},[e]),(a,o)=>{n.current.set(a,o),t({})}};function DF(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function xd({asChild:e,children:t},n){return e&&w.isValidElement(t)?w.cloneElement(DF(t),{ref:t.ref},n(t.props.children)):n(t)}var kF={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const mT=pg,gT=bS,NF=mg,vT=w.forwardRef(({className:e,...t},n)=>x.jsx(ad,{ref:n,className:Oe("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80",e),...t}));vT.displayName=ad.displayName;const Qg=w.forwardRef(({className:e,children:t,...n},a)=>x.jsxs(NF,{children:[x.jsx(vT,{}),x.jsxs(id,{ref:a,className:Oe("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-top-[48%] fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg",e),...n,children:[t,x.jsxs(yg,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none",children:[x.jsx(IE,{className:"h-4 w-4"}),x.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Qg.displayName=id.displayName;const Jg=({className:e,...t})=>x.jsx("div",{className:Oe("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Jg.displayName="DialogHeader";const ev=w.forwardRef(({className:e,...t},n)=>x.jsx(gg,{ref:n,className:Oe("text-lg leading-none font-semibold tracking-tight",e),...t}));ev.displayName=gg.displayName;const tv=w.forwardRef(({className:e,...t},n)=>x.jsx(vg,{ref:n,className:Oe("text-muted-foreground text-sm",e),...t}));tv.displayName=vg.displayName;const wd=w.forwardRef(({className:e,...t},n)=>x.jsx(Cn,{ref:n,className:Oe("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t}));wd.displayName=Cn.displayName;const nv=w.forwardRef(({className:e,...t},n)=>x.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[x.jsx(sj,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),x.jsx(Cn.Input,{ref:n,className:Oe("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})]}));nv.displayName=Cn.Input.displayName;const Ed=w.forwardRef(({className:e,...t},n)=>x.jsx(Cn.List,{ref:n,className:Oe("max-h-[300px] overflow-x-hidden overflow-y-auto",e),...t}));Ed.displayName=Cn.List.displayName;const rv=w.forwardRef((e,t)=>x.jsx(Cn.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));rv.displayName=Cn.Empty.displayName;const Ko=w.forwardRef(({className:e,...t},n)=>x.jsx(Cn.Group,{ref:n,className:Oe("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}));Ko.displayName=Cn.Group.displayName;const OF=w.forwardRef(({className:e,...t},n)=>x.jsx(Cn.Separator,{ref:n,className:Oe("bg-border -mx-1 h-px",e),...t}));OF.displayName=Cn.Separator.displayName;const Zo=w.forwardRef(({className:e,...t},n)=>x.jsx(Cn.Item,{ref:n,className:Oe("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}));Zo.displayName=Cn.Item.displayName;const jF=({layout:e,autoRunFor:t})=>{const n=Zn(),{stop:a,start:o,isRunning:s}=e;return w.useEffect(()=>{if(!n)return;let c=null;return t!==void 0&&t>-1&&n.getGraph().order>0&&(o(),c=t>0?window.setTimeout(()=>{a()},t):null),()=>{a(),c&&clearTimeout(c)}},[t,o,a,n]),x.jsx(wt,{size:"icon",onClick:()=>s?a():o(),tooltip:s?"Stop the layout animation":"Start the layout animation",variant:_r,children:s?x.jsx(tj,{}):x.jsx(rj,{})})},LF=()=>{const e=Zn(),[t,n]=w.useState("Circular"),[a,o]=w.useState(!1),s=T5(),c=E5(),u=rF(),f=Q5({settings:{margin:1}}),h=j5({maxIterations:20}),m=iT({iterations:20}),g=J5(),y=L5(),b=H5(),S=w.useMemo(()=>({Circular:{layout:s},Circlepack:{layout:c},Random:{layout:u},Noverlaps:{layout:f,worker:g},"Force Directed":{layout:h,worker:y},"Force Atlas":{layout:m,worker:b}}),[c,s,h,m,f,u,y,g,b]),E=w.useCallback(_=>{console.debug(_);const{positions:N}=S[_].layout;BG(e.getGraph(),N(),{duration:500}),n(_)},[S,e]);return x.jsxs(x.Fragment,{children:[x.jsx("div",{children:S[t]&&"worker"in S[t]&&x.jsx(jF,{layout:S[t].worker})}),x.jsx("div",{children:x.jsxs(pd,{open:a,onOpenChange:o,children:[x.jsx(md,{asChild:!0,children:x.jsx(wt,{size:"icon",variant:_r,onClick:()=>o(_=>!_),tooltip:"Layout Graph",children:x.jsx($O,{})})}),x.jsx(_l,{side:"right",align:"center",className:"p-1",children:x.jsx(wd,{children:x.jsx(Ed,{children:x.jsx(Ko,{children:Object.keys(S).map(_=>x.jsx(Zo,{onSelect:()=>{E(_)},className:"cursor-pointer text-xs",children:_},_))})})})})]})})]})};var vu={exports:{}},zF=vu.exports,s1;function MF(){return s1||(s1=1,function(e){(function(t,n,a){function o(f){var h=this,m=u();h.next=function(){var g=2091639*h.s0+h.c*23283064365386963e-26;return h.s0=h.s1,h.s1=h.s2,h.s2=g-(h.c=g|0)},h.c=1,h.s0=m(" "),h.s1=m(" "),h.s2=m(" "),h.s0-=m(f),h.s0<0&&(h.s0+=1),h.s1-=m(f),h.s1<0&&(h.s1+=1),h.s2-=m(f),h.s2<0&&(h.s2+=1),m=null}function s(f,h){return h.c=f.c,h.s0=f.s0,h.s1=f.s1,h.s2=f.s2,h}function c(f,h){var m=new o(f),g=h&&h.state,y=m.next;return y.int32=function(){return m.next()*4294967296|0},y.double=function(){return y()+(y()*2097152|0)*11102230246251565e-32},y.quick=y,g&&(typeof g=="object"&&s(g,m),y.state=function(){return s(m,{})}),y}function u(){var f=4022871197,h=function(m){m=String(m);for(var g=0;g>>0,y-=f,y*=f,f=y>>>0,y-=f,f+=y*4294967296}return(f>>>0)*23283064365386963e-26};return h}n&&n.exports?n.exports=c:this.alea=c})(zF,e)}(vu)),vu.exports}var yu={exports:{}},PF=yu.exports,l1;function GF(){return l1||(l1=1,function(e){(function(t,n,a){function o(u){var f=this,h="";f.x=0,f.y=0,f.z=0,f.w=0,f.next=function(){var g=f.x^f.x<<11;return f.x=f.y,f.y=f.z,f.z=f.w,f.w^=f.w>>>19^g^g>>>8},u===(u|0)?f.x=u:h+=u;for(var m=0;m>>0)/4294967296};return g.double=function(){do var y=h.next()>>>11,b=(h.next()>>>0)/4294967296,S=(y+b)/(1<<21);while(S===0);return S},g.int32=h.next,g.quick=g,m&&(typeof m=="object"&&s(m,h),g.state=function(){return s(h,{})}),g}n&&n.exports?n.exports=c:this.xor128=c})(PF,e)}(yu)),yu.exports}var bu={exports:{}},FF=bu.exports,c1;function UF(){return c1||(c1=1,function(e){(function(t,n,a){function o(u){var f=this,h="";f.next=function(){var g=f.x^f.x>>>2;return f.x=f.y,f.y=f.z,f.z=f.w,f.w=f.v,(f.d=f.d+362437|0)+(f.v=f.v^f.v<<4^(g^g<<1))|0},f.x=0,f.y=0,f.z=0,f.w=0,f.v=0,u===(u|0)?f.x=u:h+=u;for(var m=0;m>>4),f.next()}function s(u,f){return f.x=u.x,f.y=u.y,f.z=u.z,f.w=u.w,f.v=u.v,f.d=u.d,f}function c(u,f){var h=new o(u),m=f&&f.state,g=function(){return(h.next()>>>0)/4294967296};return g.double=function(){do var y=h.next()>>>11,b=(h.next()>>>0)/4294967296,S=(y+b)/(1<<21);while(S===0);return S},g.int32=h.next,g.quick=g,m&&(typeof m=="object"&&s(m,h),g.state=function(){return s(h,{})}),g}n&&n.exports?n.exports=c:this.xorwow=c})(FF,e)}(bu)),bu.exports}var xu={exports:{}},BF=xu.exports,u1;function IF(){return u1||(u1=1,function(e){(function(t,n,a){function o(u){var f=this;f.next=function(){var m=f.x,g=f.i,y,b;return y=m[g],y^=y>>>7,b=y^y<<24,y=m[g+1&7],b^=y^y>>>10,y=m[g+3&7],b^=y^y>>>3,y=m[g+4&7],b^=y^y<<7,y=m[g+7&7],y=y^y<<13,b^=y^y<<9,m[g]=b,f.i=g+1&7,b};function h(m,g){var y,b=[];if(g===(g|0))b[0]=g;else for(g=""+g,y=0;y0;--y)m.next()}h(f,u)}function s(u,f){return f.x=u.x.slice(),f.i=u.i,f}function c(u,f){u==null&&(u=+new Date);var h=new o(u),m=f&&f.state,g=function(){return(h.next()>>>0)/4294967296};return g.double=function(){do var y=h.next()>>>11,b=(h.next()>>>0)/4294967296,S=(y+b)/(1<<21);while(S===0);return S},g.int32=h.next,g.quick=g,m&&(m.x&&s(m,h),g.state=function(){return s(h,{})}),g}n&&n.exports?n.exports=c:this.xorshift7=c})(BF,e)}(xu)),xu.exports}var wu={exports:{}},HF=wu.exports,d1;function $F(){return d1||(d1=1,function(e){(function(t,n,a){function o(u){var f=this;f.next=function(){var m=f.w,g=f.X,y=f.i,b,S;return f.w=m=m+1640531527|0,S=g[y+34&127],b=g[y=y+1&127],S^=S<<13,b^=b<<17,S^=S>>>15,b^=b>>>12,S=g[y]=S^b,f.i=y,S+(m^m>>>16)|0};function h(m,g){var y,b,S,E,_,N=[],C=128;for(g===(g|0)?(b=g,g=null):(g=g+"\0",b=0,C=Math.max(C,g.length)),S=0,E=-32;E>>15,b^=b<<4,b^=b>>>13,E>=0&&(_=_+1640531527|0,y=N[E&127]^=b+_,S=y==0?S+1:0);for(S>=128&&(N[(g&&g.length||0)&127]=-1),S=127,E=4*128;E>0;--E)b=N[S+34&127],y=N[S=S+1&127],b^=b<<13,y^=y<<17,b^=b>>>15,y^=y>>>12,N[S]=b^y;m.w=_,m.X=N,m.i=S}h(f,u)}function s(u,f){return f.i=u.i,f.w=u.w,f.X=u.X.slice(),f}function c(u,f){u==null&&(u=+new Date);var h=new o(u),m=f&&f.state,g=function(){return(h.next()>>>0)/4294967296};return g.double=function(){do var y=h.next()>>>11,b=(h.next()>>>0)/4294967296,S=(y+b)/(1<<21);while(S===0);return S},g.int32=h.next,g.quick=g,m&&(m.X&&s(m,h),g.state=function(){return s(h,{})}),g}n&&n.exports?n.exports=c:this.xor4096=c})(HF,e)}(wu)),wu.exports}var Eu={exports:{}},VF=Eu.exports,f1;function qF(){return f1||(f1=1,function(e){(function(t,n,a){function o(u){var f=this,h="";f.next=function(){var g=f.b,y=f.c,b=f.d,S=f.a;return g=g<<25^g>>>7^y,y=y-b|0,b=b<<24^b>>>8^S,S=S-g|0,f.b=g=g<<20^g>>>12^y,f.c=y=y-b|0,f.d=b<<16^y>>>16^S,f.a=S-g|0},f.a=0,f.b=0,f.c=-1640531527,f.d=1367130551,u===Math.floor(u)?(f.a=u/4294967296|0,f.b=u|0):h+=u;for(var m=0;m>>0)/4294967296};return g.double=function(){do var y=h.next()>>>11,b=(h.next()>>>0)/4294967296,S=(y+b)/(1<<21);while(S===0);return S},g.int32=h.next,g.quick=g,m&&(typeof m=="object"&&s(m,h),g.state=function(){return s(h,{})}),g}n&&n.exports?n.exports=c:this.tychei=c})(VF,e)}(Eu)),Eu.exports}var Su={exports:{}};const YF={},WF=Object.freeze(Object.defineProperty({__proto__:null,default:YF},Symbol.toStringTag,{value:"Module"})),XF=bD(WF);var KF=Su.exports,h1;function ZF(){return h1||(h1=1,function(e){(function(t,n,a){var o=256,s=6,c=52,u="random",f=a.pow(o,s),h=a.pow(2,c),m=h*2,g=o-1,y;function b(k,D,M){var R=[];D=D==!0?{entropy:!0}:D||{};var U=N(_(D.entropy?[k,A(n)]:k??C(),3),R),L=new S(R),I=function(){for(var q=L.g(s),Y=f,B=0;q=m;)q/=2,Y/=2,B>>>=1;return(q+B)/Y};return I.int32=function(){return L.g(4)|0},I.quick=function(){return L.g(4)/4294967296},I.double=I,N(A(L.S),n),(D.pass||M||function(q,Y,B,X){return X&&(X.S&&E(X,L),q.state=function(){return E(L,{})}),B?(a[u]=q,Y):q})(I,U,"global"in D?D.global:this==a,D.state)}function S(k){var D,M=k.length,R=this,U=0,L=R.i=R.j=0,I=R.S=[];for(M||(k=[M++]);U{if(!e||!Array.isArray(e.nodes)||!Array.isArray(e.edges))return!1;for(const t of e.nodes)if(!t.id||!t.labels||!t.properties)return!1;for(const t of e.edges)if(!t.id||!t.source||!t.target)return!1;for(const t of e.edges){const n=e.getNode(t.source),a=e.getNode(t.target);if(n==null||a==null)return!1}return!0},nU=async e=>{let t=null;try{t=await pO(e)}catch(a){return En.getState().setErrorMessage(Sr(a),"Query Graphs Error!"),null}let n=null;if(t){const a={},o={};for(let f=0;f0){const f=Nk-o0;for(const h of t.nodes)h.size=Math.round(o0+f*Math.pow((h.degree-s)/u,.5))}n=new p5,n.nodes=t.nodes,n.edges=t.edges,n.nodeIdMap=a,n.edgeIdMap=o,tU(n)||(n=null,console.error("Invalid graph data")),console.log("Graph data loaded")}return n},rU=e=>{const t=new dl;for(const n of(e==null?void 0:e.nodes)??[])t.addNode(n.id,{label:n.labels.join(", "),color:n.color,x:n.x,y:n.y,size:n.size,borderColor:Rk,borderSize:.2});for(const n of(e==null?void 0:e.edges)??[])n.dynamicId=t.addDirectedEdge(n.source,n.target,{label:n.type||void 0});return t},m1={label:""},yT=()=>{const e=Ye.use.queryLabel(),t=ct.use.rawGraph(),n=ct.use.sigmaGraph(),a=w.useCallback(c=>(t==null?void 0:t.getNode(c))||null,[t]),o=w.useCallback((c,u=!0)=>(t==null?void 0:t.getEdge(c,u))||null,[t]);return w.useEffect(()=>{if(e){if(m1.label!==e){m1.label=e;const c=ct.getState();c.reset(),nU(e).then(u=>{c.setSigmaGraph(rU(u)),u==null||u.buildDynamicMap(),c.setRawGraph(u)})}}else{const c=ct.getState();c.reset(),c.setSigmaGraph(new dl)}},[e]),{lightrageGraph:w.useCallback(()=>{if(n)return n;const c=new dl;return ct.getState().setSigmaGraph(c),c},[n]),getNode:a,getEdge:o}},ru=e=>!!(e.type.startsWith("mouse")&&e.buttons!==0),aU=({disableHoverEffect:e})=>{const{lightrageGraph:t}=yT(),n=Zn(),a=GC(),o=PC(),s=m3(),{assign:c}=iT({iterations:20}),{theme:u}=O_(),f=Ye.use.enableHideUnselectedEdges(),h=ct.use.selectedNode(),m=ct.use.focusedNode(),g=ct.use.selectedEdge(),y=ct.use.focusedEdge();return w.useEffect(()=>{const b=t();s(b),b.__force_applied||(c(),Object.assign(b,{__force_applied:!0}));const{setFocusedNode:S,setSelectedNode:E,setFocusedEdge:_,setSelectedEdge:N,clearSelection:C}=ct.getState();a({enterNode:A=>{ru(A.event.original)||S(A.node)},leaveNode:A=>{ru(A.event.original)||S(null)},clickNode:A=>{E(A.node),N(null)},clickEdge:A=>{N(A.edge),E(null)},enterEdge:A=>{ru(A.event.original)||_(A.edge)},leaveEdge:A=>{ru(A.event.original)||_(null)},clickStage:()=>C()})},[c,s,a,t]),w.useEffect(()=>{const b=u==="dark",S=b?_k:void 0,E=b?Dk:void 0;o({nodeReducer:(_,N)=>{const C=n.getGraph(),A={...N,highlighted:N.highlighted||!1,labelColor:S};if(!e){A.highlighted=!1;const k=m||h,D=y||g;if(k)(_===k||C.neighbors(k).includes(_))&&(A.highlighted=!0,_===h&&(A.borderColor=Ak));else if(D)C.extremities(D).includes(_)&&(A.highlighted=!0,A.size=3);else return A;A.highlighted?b&&(A.labelColor=Ck):A.color=Tk}return A},edgeReducer:(_,N)=>{const C=n.getGraph(),A={...N,hidden:!1,labelColor:S,color:E};if(!e){const k=m||h;k?f?C.extremities(_).includes(k)||(A.hidden=!0):C.extremities(_).includes(k)&&(A.color=i0):(y||g)&&(_===g?A.color=kk:_===y?A.color=i0:f&&(A.hidden=!0))}return A}})},[h,m,g,y,o,n,e,u,f]),null},iU=()=>{const{zoomIn:e,zoomOut:t,reset:n}=FC({duration:200,factor:1.5}),a=w.useCallback(()=>e(),[e]),o=w.useCallback(()=>t(),[t]),s=w.useCallback(()=>n(),[n]);return x.jsxs(x.Fragment,{children:[x.jsx(wt,{variant:_r,onClick:a,tooltip:"Zoom In",size:"icon",children:x.jsx(bj,{})}),x.jsx(wt,{variant:_r,onClick:o,tooltip:"Zoom Out",size:"icon",children:x.jsx(wj,{})}),x.jsx(wt,{variant:_r,onClick:s,tooltip:"Reset Zoom",size:"icon",children:x.jsx(UO,{})})]})},oU=()=>{const{isFullScreen:e,toggle:t}=g3();return x.jsx(x.Fragment,{children:e?x.jsx(wt,{variant:_r,onClick:t,tooltip:"Windowed",size:"icon",children:x.jsx(ZO,{})}):x.jsx(wt,{variant:_r,onClick:t,tooltip:"Full Screen",size:"icon",children:x.jsx(XO,{})})})};function bT(e){const t=w.useRef({value:e,previous:e});return w.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var av="Checkbox",[sU,W6]=Kn(av),[lU,cU]=sU(av),xT=w.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:a,checked:o,defaultChecked:s,required:c,disabled:u,value:f="on",onCheckedChange:h,form:m,...g}=e,[y,b]=w.useState(null),S=nt(t,k=>b(k)),E=w.useRef(!1),_=y?m||!!y.closest("form"):!0,[N=!1,C]=aa({prop:o,defaultProp:s,onChange:h}),A=w.useRef(N);return w.useEffect(()=>{const k=y==null?void 0:y.form;if(k){const D=()=>C(A.current);return k.addEventListener("reset",D),()=>k.removeEventListener("reset",D)}},[y,C]),x.jsxs(lU,{scope:n,state:N,disabled:u,children:[x.jsx(Ie.button,{type:"button",role:"checkbox","aria-checked":Fa(N)?"mixed":N,"aria-required":c,"data-state":ST(N),"data-disabled":u?"":void 0,disabled:u,value:f,...g,ref:S,onKeyDown:Be(e.onKeyDown,k=>{k.key==="Enter"&&k.preventDefault()}),onClick:Be(e.onClick,k=>{C(D=>Fa(D)?!0:!D),_&&(E.current=k.isPropagationStopped(),E.current||k.stopPropagation())})}),_&&x.jsx(uU,{control:y,bubbles:!E.current,name:a,value:f,checked:N,required:c,disabled:u,form:m,style:{transform:"translateX(-100%)"},defaultChecked:Fa(s)?!1:s})]})});xT.displayName=av;var wT="CheckboxIndicator",ET=w.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:a,...o}=e,s=cU(wT,n);return x.jsx(zn,{present:a||Fa(s.state)||s.state===!0,children:x.jsx(Ie.span,{"data-state":ST(s.state),"data-disabled":s.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});ET.displayName=wT;var uU=e=>{const{control:t,checked:n,bubbles:a=!0,defaultChecked:o,...s}=e,c=w.useRef(null),u=bT(n),f=XS(t);w.useEffect(()=>{const m=c.current,g=window.HTMLInputElement.prototype,b=Object.getOwnPropertyDescriptor(g,"checked").set;if(u!==n&&b){const S=new Event("click",{bubbles:a});m.indeterminate=Fa(n),b.call(m,Fa(n)?!1:n),m.dispatchEvent(S)}},[u,n,a]);const h=w.useRef(Fa(n)?!1:n);return x.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:o??h.current,...s,tabIndex:-1,ref:c,style:{...e.style,...f,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Fa(e){return e==="indeterminate"}function ST(e){return Fa(e)?"indeterminate":e?"checked":"unchecked"}var _T=xT,dU=ET;const sl=w.forwardRef(({className:e,...t},n)=>x.jsx(_T,{ref:n,className:Oe("peer border-primary ring-offset-background focus-visible:ring-ring data-[state=checked]:bg-primary data-[state=checked]:text-primary-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:x.jsx(dU,{className:Oe("flex items-center justify-center text-current"),children:x.jsx(ig,{className:"h-4 w-4"})})}));sl.displayName=_T.displayName;var fU="Separator",g1="horizontal",hU=["horizontal","vertical"],CT=w.forwardRef((e,t)=>{const{decorative:n,orientation:a=g1,...o}=e,s=pU(a)?a:g1,u=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return x.jsx(Ie.div,{"data-orientation":s,...u,...o,ref:t})});CT.displayName=fU;function pU(e){return hU.includes(e)}var TT=CT;const al=w.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...a},o)=>x.jsx(TT,{ref:o,decorative:n,orientation:t,className:Oe("bg-border shrink-0",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...a}));al.displayName=TT.displayName;const za=({checked:e,onCheckedChange:t,label:n})=>x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(sl,{checked:e,onCheckedChange:t}),x.jsx("label",{htmlFor:"terms",className:"text-sm leading-none font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:n})]});function mU(){const[e,t]=w.useState(!1),[n,a]=w.useState(""),o=Ye.use.showPropertyPanel(),s=Ye.use.showNodeSearchBar(),c=Ye.use.showNodeLabel(),u=Ye.use.enableEdgeEvents(),f=Ye.use.enableNodeDrag(),h=Ye.use.enableHideUnselectedEdges(),m=Ye.use.showEdgeLabel(),g=Ye.use.enableHealthCheck(),y=Ye.use.apiKey();w.useEffect(()=>{a(y||"")},[y,e]);const b=w.useCallback(()=>Ye.setState(R=>({enableNodeDrag:!R.enableNodeDrag})),[]),S=w.useCallback(()=>Ye.setState(R=>({enableEdgeEvents:!R.enableEdgeEvents})),[]),E=w.useCallback(()=>Ye.setState(R=>({enableHideUnselectedEdges:!R.enableHideUnselectedEdges})),[]),_=w.useCallback(()=>Ye.setState(R=>({showEdgeLabel:!R.showEdgeLabel})),[]),N=w.useCallback(()=>Ye.setState(R=>({showPropertyPanel:!R.showPropertyPanel})),[]),C=w.useCallback(()=>Ye.setState(R=>({showNodeSearchBar:!R.showNodeSearchBar})),[]),A=w.useCallback(()=>Ye.setState(R=>({showNodeLabel:!R.showNodeLabel})),[]),k=w.useCallback(()=>Ye.setState(R=>({enableHealthCheck:!R.enableHealthCheck})),[]),D=w.useCallback(async()=>{Ye.setState({apiKey:n||null}),await En.getState().check(),t(!1)},[n]),M=w.useCallback(R=>{a(R.target.value)},[a]);return x.jsxs(pd,{open:e,onOpenChange:t,children:[x.jsx(md,{asChild:!0,children:x.jsx(wt,{variant:_r,tooltip:"Settings",size:"icon",children:x.jsx(dj,{})})}),x.jsx(_l,{side:"right",align:"start",className:"mb-2 p-2",onCloseAutoFocus:R=>R.preventDefault(),children:x.jsxs("div",{className:"flex flex-col gap-2",children:[x.jsx(za,{checked:o,onCheckedChange:N,label:"Show Property Panel"}),x.jsx(za,{checked:s,onCheckedChange:C,label:"Show Search Bar"}),x.jsx(al,{}),x.jsx(za,{checked:c,onCheckedChange:A,label:"Show Node Label"}),x.jsx(za,{checked:f,onCheckedChange:b,label:"Node Draggable"}),x.jsx(al,{}),x.jsx(za,{checked:m,onCheckedChange:_,label:"Show Edge Label"}),x.jsx(za,{checked:h,onCheckedChange:E,label:"Hide Unselected Edges"}),x.jsx(za,{checked:u,onCheckedChange:S,label:"Edge Events"}),x.jsx(al,{}),x.jsx(za,{checked:g,onCheckedChange:k,label:"Health Check"}),x.jsx(al,{}),x.jsxs("div",{className:"flex flex-col gap-2",children:[x.jsx("label",{className:"text-sm font-medium",children:"API Key"}),x.jsxs("form",{className:"flex h-6 gap-2",onSubmit:R=>R.preventDefault(),children:[x.jsx("div",{className:"w-0 flex-1",children:x.jsx(Ai,{type:"password",value:n,onChange:M,placeholder:"Enter your API key",className:"max-h-full w-full min-w-0",autoComplete:"off"})}),x.jsx(wt,{onClick:D,variant:"outline",size:"sm",className:"max-h-full shrink-0",children:"Save"})]})]})]})})]})}function _u(e,t,n,a){function o(s){return s instanceof n?s:new n(function(c){c(s)})}return new(n||(n=Promise))(function(s,c){function u(m){try{h(a.next(m))}catch(g){c(g)}}function f(m){try{h(a.throw(m))}catch(g){c(g)}}function h(m){m.done?s(m.value):o(m.value).then(u,f)}h((a=a.apply(e,[])).next())})}const gU="ENTRIES",RT="KEYS",AT="VALUES",Kt="";class Ip{constructor(t,n){const a=t._tree,o=Array.from(a.keys());this.set=t,this._type=n,this._path=o.length>0?[{node:a,keys:o}]:[]}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}=So(this._path);if(So(n)===Kt)return{done:!1,value:this.result()};const a=t.get(So(n));return this._path.push({node:a,keys:Array.from(a.keys())}),this.dive()}backtrack(){if(this._path.length===0)return;const t=So(this._path).keys;t.pop(),!(t.length>0)&&(this._path.pop(),this.backtrack())}key(){return this.set._prefix+this._path.map(({keys:t})=>So(t)).filter(t=>t!==Kt).join("")}value(){return So(this._path).node.get(Kt)}result(){switch(this._type){case AT:return this.value();case RT:return this.key();default:return[this.key(),this.value()]}}[Symbol.iterator](){return this}}const So=e=>e[e.length-1],vU=(e,t,n)=>{const a=new Map;if(t===void 0)return a;const o=t.length+1,s=o+n,c=new Uint8Array(s*o).fill(n+1);for(let u=0;u{const f=s*c;e:for(const h of e.keys())if(h===Kt){const m=o[f-1];m<=n&&a.set(u,[e.get(h),m])}else{let m=s;for(let g=0;gn)continue e}DT(e.get(h),t,n,a,o,m,c,u+h)}};class Ga{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,a]=Pu(this._tree,t.slice(this._prefix.length));if(n===void 0){const[o,s]=iv(a);for(const c of o.keys())if(c!==Kt&&c.startsWith(s)){const u=new Map;return u.set(c.slice(s.length),o.get(c)),new Ga(u,t)}}return new Ga(n,t)}clear(){this._size=void 0,this._tree.clear()}delete(t){return this._size=void 0,yU(this._tree,t)}entries(){return new Ip(this,gU)}forEach(t){for(const[n,a]of this)t(n,a,this)}fuzzyGet(t,n){return vU(this._tree,t,n)}get(t){const n=jm(this._tree,t);return n!==void 0?n.get(Kt):void 0}has(t){const n=jm(this._tree,t);return n!==void 0&&n.has(Kt)}keys(){return new Ip(this,RT)}set(t,n){if(typeof t!="string")throw new Error("key must be a string");return this._size=void 0,Hp(this._tree,t).set(Kt,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 a=Hp(this._tree,t);return a.set(Kt,n(a.get(Kt))),this}fetch(t,n){if(typeof t!="string")throw new Error("key must be a string");this._size=void 0;const a=Hp(this._tree,t);let o=a.get(Kt);return o===void 0&&a.set(Kt,o=n()),o}values(){return new Ip(this,AT)}[Symbol.iterator](){return this.entries()}static from(t){const n=new Ga;for(const[a,o]of t)n.set(a,o);return n}static fromObject(t){return Ga.from(Object.entries(t))}}const Pu=(e,t,n=[])=>{if(t.length===0||e==null)return[e,n];for(const a of e.keys())if(a!==Kt&&t.startsWith(a))return n.push([e,a]),Pu(e.get(a),t.slice(a.length),n);return n.push([e,t]),Pu(void 0,"",n)},jm=(e,t)=>{if(t.length===0||e==null)return e;for(const n of e.keys())if(n!==Kt&&t.startsWith(n))return jm(e.get(n),t.slice(n.length))},Hp=(e,t)=>{const n=t.length;e:for(let a=0;e&&a{const[n,a]=Pu(e,t);if(n!==void 0){if(n.delete(Kt),n.size===0)kT(a);else if(n.size===1){const[o,s]=n.entries().next().value;NT(a,o,s)}}},kT=e=>{if(e.length===0)return;const[t,n]=iv(e);if(t.delete(n),t.size===0)kT(e.slice(0,-1));else if(t.size===1){const[a,o]=t.entries().next().value;a!==Kt&&NT(e.slice(0,-1),a,o)}},NT=(e,t,n)=>{if(e.length===0)return;const[a,o]=iv(e);a.set(o+t,n),a.delete(o)},iv=e=>e[e.length-1],ov="or",OT="and",bU="and_not";class Ua{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?qp:t.autoVacuum;this._options=Object.assign(Object.assign(Object.assign({},Vp),t),{autoVacuum:n,searchOptions:Object.assign(Object.assign({},v1),t.searchOptions||{}),autoSuggestOptions:Object.assign(Object.assign({},_U),t.autoSuggestOptions||{})}),this._index=new Ga,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=zm,this.addFields(this._options.fields)}add(t){const{extractField:n,tokenize:a,processTerm:o,fields:s,idField:c}=this._options,u=n(t,c);if(u==null)throw new Error(`MiniSearch: document does not have ID field "${c}"`);if(this._idToShortId.has(u))throw new Error(`MiniSearch: duplicate ID ${u}`);const f=this.addDocumentId(u);this.saveStoredFields(f,t);for(const h of s){const m=n(t,h);if(m==null)continue;const g=a(m.toString(),h),y=this._fieldIds[h],b=new Set(g).size;this.addFieldLength(f,y,this._documentCount-1,b);for(const S of g){const E=o(S,h);if(Array.isArray(E))for(const _ of E)this.addTerm(y,f,_);else E&&this.addTerm(y,f,E)}}}addAll(t){for(const n of t)this.add(n)}addAllAsync(t,n={}){const{chunkSize:a=10}=n,o={chunk:[],promise:Promise.resolve()},{chunk:s,promise:c}=t.reduce(({chunk:u,promise:f},h,m)=>(u.push(h),(m+1)%a===0?{chunk:[],promise:f.then(()=>new Promise(g=>setTimeout(g,0))).then(()=>this.addAll(u))}:{chunk:u,promise:f}),o);return c.then(()=>this.addAll(s))}remove(t){const{tokenize:n,processTerm:a,extractField:o,fields:s,idField:c}=this._options,u=o(t,c);if(u==null)throw new Error(`MiniSearch: document does not have ID field "${c}"`);const f=this._idToShortId.get(u);if(f==null)throw new Error(`MiniSearch: cannot remove document with ID ${u}: it is not in the index`);for(const h of s){const m=o(t,h);if(m==null)continue;const g=n(m.toString(),h),y=this._fieldIds[h],b=new Set(g).size;this.removeFieldLength(f,y,this._documentCount,b);for(const S of g){const E=a(S,h);if(Array.isArray(E))for(const _ of E)this.removeTerm(y,f,_);else E&&this.removeTerm(y,f,E)}}this._storedFields.delete(f),this._documentIds.delete(f),this._idToShortId.delete(u),this._fieldLength.delete(f),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 Ga,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((a,o)=>{this.removeFieldLength(n,o,this._documentCount,a)}),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:a,batchWait:o}=this._options.autoVacuum;this.conditionalVacuum({batchSize:a,batchWait:o},{minDirtCount:n,minDirtFactor:t})}discardAll(t){const n=this._options.autoVacuum;try{this._options.autoVacuum=!1;for(const a of t)this.discard(a)}finally{this._options.autoVacuum=n}this.maybeAutoVacuum()}replace(t){const{idField:n,extractField:a}=this._options,o=a(t,n);this.discard(o),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 a=this._enqueuedVacuumConditions;return this._enqueuedVacuumConditions=zm,this.performVacuuming(t,a)}),this._enqueuedVacuum)):this.vacuumConditionsMet(n)===!1?Promise.resolve():(this._currentVacuum=this.performVacuuming(t),this._currentVacuum)}performVacuuming(t,n){return _u(this,void 0,void 0,function*(){const a=this._dirtCount;if(this.vacuumConditionsMet(n)){const o=t.batchSize||Lm.batchSize,s=t.batchWait||Lm.batchWait;let c=1;for(const[u,f]of this._index){for(const[h,m]of f)for(const[g]of m)this._documentIds.has(g)||(m.size<=1?f.delete(h):m.delete(g));this._index.get(u).size===0&&this._index.delete(u),c%o===0&&(yield new Promise(h=>setTimeout(h,s))),c+=1}this._dirtCount-=a}yield null,this._currentVacuum=this._enqueuedVacuum,this._enqueuedVacuum=null})}vacuumConditionsMet(t){if(t==null)return!0;let{minDirtCount:n,minDirtFactor:a}=t;return n=n||qp.minDirtCount,a=a||qp.minDirtFactor,this.dirtCount>=n&&this.dirtFactor>=a}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:a}=this._options,o=Object.assign(Object.assign({},a),n),s=this.executeQuery(t,n),c=[];for(const[u,{score:f,terms:h,match:m}]of s){const g=h.length||1,y={id:this._documentIds.get(u),score:f*g,terms:Object.keys(m),queryTerms:h,match:m};Object.assign(y,this._storedFields.get(u)),(o.filter==null||o.filter(y))&&c.push(y)}return t===Ua.wildcard&&o.boostDocument==null||c.sort(b1),c}autoSuggest(t,n={}){n=Object.assign(Object.assign({},this._options.autoSuggestOptions),n);const a=new Map;for(const{score:s,terms:c}of this.search(t,n)){const u=c.join(" "),f=a.get(u);f!=null?(f.score+=s,f.count+=1):a.set(u,{score:s,terms:c,count:1})}const o=[];for(const[s,{score:c,terms:u,count:f}]of a)o.push({suggestion:s,terms:u,score:c/f});return o.sort(b1),o}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 loadJSONAsync(t,n){return _u(this,void 0,void 0,function*(){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(Vp.hasOwnProperty(t))return $p(Vp,t);throw new Error(`MiniSearch: unknown option "${t}"`)}static loadJS(t,n){const{index:a,documentIds:o,fieldLength:s,storedFields:c,serializationVersion:u}=t,f=this.instantiateMiniSearch(t,n);f._documentIds=au(o),f._fieldLength=au(s),f._storedFields=au(c);for(const[h,m]of f._documentIds)f._idToShortId.set(m,h);for(const[h,m]of a){const g=new Map;for(const y of Object.keys(m)){let b=m[y];u===1&&(b=b.ds),g.set(parseInt(y,10),au(b))}f._index.set(h,g)}return f}static loadJSAsync(t,n){return _u(this,void 0,void 0,function*(){const{index:a,documentIds:o,fieldLength:s,storedFields:c,serializationVersion:u}=t,f=this.instantiateMiniSearch(t,n);f._documentIds=yield iu(o),f._fieldLength=yield iu(s),f._storedFields=yield iu(c);for(const[m,g]of f._documentIds)f._idToShortId.set(g,m);let h=0;for(const[m,g]of a){const y=new Map;for(const b of Object.keys(g)){let S=g[b];u===1&&(S=S.ds),y.set(parseInt(b,10),yield iu(S))}++h%1e3===0&&(yield jT(0)),f._index.set(m,y)}return f})}static instantiateMiniSearch(t,n){const{documentCount:a,nextId:o,fieldIds:s,averageFieldLength:c,dirtCount:u,serializationVersion:f}=t;if(f!==1&&f!==2)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");const h=new Ua(n);return h._documentCount=a,h._nextId=o,h._idToShortId=new Map,h._fieldIds=s,h._avgFieldLength=c,h._dirtCount=u||0,h._index=new Ga,h}executeQuery(t,n={}){if(t===Ua.wildcard)return this.executeWildcardQuery(n);if(typeof t!="string"){const y=Object.assign(Object.assign(Object.assign({},n),t),{queries:void 0}),b=t.queries.map(S=>this.executeQuery(S,y));return this.combineResults(b,y.combineWith)}const{tokenize:a,processTerm:o,searchOptions:s}=this._options,c=Object.assign(Object.assign({tokenize:a,processTerm:o},s),n),{tokenize:u,processTerm:f}=c,g=u(t).flatMap(y=>f(y)).filter(y=>!!y).map(SU(c)).map(y=>this.executeQuerySpec(y,c));return this.combineResults(g,c.combineWith)}executeQuerySpec(t,n){const a=Object.assign(Object.assign({},this._options.searchOptions),n),o=(a.fields||this._options.fields).reduce((E,_)=>Object.assign(Object.assign({},E),{[_]:$p(a.boost,_)||1}),{}),{boostDocument:s,weights:c,maxFuzzy:u,bm25:f}=a,{fuzzy:h,prefix:m}=Object.assign(Object.assign({},v1.weights),c),g=this._index.get(t.term),y=this.termResults(t.term,t.term,1,t.termBoost,g,o,s,f);let b,S;if(t.prefix&&(b=this._index.atPrefix(t.term)),t.fuzzy){const E=t.fuzzy===!0?.2:t.fuzzy,_=E<1?Math.min(u,Math.round(t.term.length*E)):E;_&&(S=this._index.fuzzyGet(t.term,_))}if(b)for(const[E,_]of b){const N=E.length-t.term.length;if(!N)continue;S==null||S.delete(E);const C=m*E.length/(E.length+.3*N);this.termResults(t.term,E,C,t.termBoost,_,o,s,f,y)}if(S)for(const E of S.keys()){const[_,N]=S.get(E);if(!N)continue;const C=h*E.length/(E.length+N);this.termResults(t.term,E,C,t.termBoost,_,o,s,f,y)}return y}executeWildcardQuery(t){const n=new Map,a=Object.assign(Object.assign({},this._options.searchOptions),t);for(const[o,s]of this._documentIds){const c=a.boostDocument?a.boostDocument(s,"",this._storedFields.get(o)):1;n.set(o,{score:c,terms:[],match:{}})}return n}combineResults(t,n=ov){if(t.length===0)return new Map;const a=n.toLowerCase(),o=xU[a];if(!o)throw new Error(`Invalid combination operator: ${n}`);return t.reduce(o)||new Map}toJSON(){const t=[];for(const[n,a]of this._index){const o={};for(const[s,c]of a)o[s]=Object.fromEntries(c);t.push([n,o])}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,a,o,s,c,u,f,h=new Map){if(s==null)return h;for(const m of Object.keys(c)){const g=c[m],y=this._fieldIds[m],b=s.get(y);if(b==null)continue;let S=b.size;const E=this._avgFieldLength[y];for(const _ of b.keys()){if(!this._documentIds.has(_)){this.removeTerm(y,_,n),S-=1;continue}const N=u?u(this._documentIds.get(_),n,this._storedFields.get(_)):1;if(!N)continue;const C=b.get(_),A=this._fieldLength.get(_)[y],k=EU(C,S,this._documentCount,A,E,f),D=a*o*g*N*k,M=h.get(_);if(M){M.score+=D,CU(M.terms,t);const R=$p(M.match,n);R?R.push(m):M.match[n]=[m]}else h.set(_,{score:D,terms:[t],match:{[n]:[m]}})}}return h}addTerm(t,n,a){const o=this._index.fetch(a,x1);let s=o.get(t);if(s==null)s=new Map,s.set(n,1),o.set(t,s);else{const c=s.get(n);s.set(n,(c||0)+1)}}removeTerm(t,n,a){if(!this._index.has(a)){this.warnDocumentChanged(n,t,a);return}const o=this._index.fetch(a,x1),s=o.get(t);s==null||s.get(n)==null?this.warnDocumentChanged(n,t,a):s.get(n)<=1?s.size<=1?o.delete(t):s.delete(n):s.set(n,s.get(n)-1),this._index.get(a).size===0&&this._index.delete(a)}warnDocumentChanged(t,n,a){for(const o of Object.keys(this._fieldIds))if(this._fieldIds[o]===n){this._options.logger("warn",`MiniSearch: document with ID ${this._documentIds.get(t)} has changed before removal: term "${a}" was not present in field "${o}". 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,xU={[ov]:(e,t)=>{for(const n of t.keys()){const a=e.get(n);if(a==null)e.set(n,t.get(n));else{const{score:o,terms:s,match:c}=t.get(n);a.score=a.score+o,a.match=Object.assign(a.match,c),y1(a.terms,s)}}return e},[OT]:(e,t)=>{const n=new Map;for(const a of t.keys()){const o=e.get(a);if(o==null)continue;const{score:s,terms:c,match:u}=t.get(a);y1(o.terms,c),n.set(a,{score:o.score+s,terms:o.terms,match:Object.assign(o.match,u)})}return n},[bU]:(e,t)=>{for(const n of t.keys())e.delete(n);return e}},wU={k:1.2,b:.7,d:.5},EU=(e,t,n,a,o,s)=>{const{k:c,b:u,d:f}=s;return Math.log(1+(n-t+.5)/(t+.5))*(f+e*(c+1)/(e+c*(1-u+u*a/o)))},SU=e=>(t,n,a)=>{const o=typeof e.fuzzy=="function"?e.fuzzy(t,n,a):e.fuzzy||!1,s=typeof e.prefix=="function"?e.prefix(t,n,a):e.prefix===!0,c=typeof e.boostTerm=="function"?e.boostTerm(t,n,a):1;return{term:t,fuzzy:o,prefix:s,termBoost:c}},Vp={idField:"id",extractField:(e,t)=>e[t],tokenize:e=>e.split(TU),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},v1={combineWith:ov,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375},bm25:wU},_U={combineWith:OT,prefix:(e,t,n)=>t===n.length-1},Lm={batchSize:1e3,batchWait:10},zm={minDirtFactor:.1,minDirtCount:20},qp=Object.assign(Object.assign({},Lm),zm),CU=(e,t)=>{e.includes(t)||e.push(t)},y1=(e,t)=>{for(const n of t)e.includes(n)||e.push(n)},b1=({score:e},{score:t})=>t-e,x1=()=>new Map,au=e=>{const t=new Map;for(const n of Object.keys(e))t.set(parseInt(n,10),e[n]);return t},iu=e=>_u(void 0,void 0,void 0,function*(){const t=new Map;let n=0;for(const a of Object.keys(e))t.set(parseInt(a,10),e[a]),++n%1e3===0&&(yield jT(0));return t}),jT=e=>new Promise(t=>setTimeout(t,e)),TU=/[\n\r\p{Z}\p{P}]+/u,RU={index:new Ua({fields:[]})};w.createContext(RU);const Mm=({label:e,color:t,hidden:n,labels:a={}})=>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||a.no_label||"No label")),AU=({id:e,labels:t})=>{const n=Zn(),a=w.useMemo(()=>{const o=n.getGraph().getNodeAttributes(e),s=n.getSetting("nodeReducer");return Object.assign(Object.assign({color:n.getSetting("defaultNodeColor")},o),s?s(e,o):{})},[n,e]);return ve.createElement(Mm,Object.assign({},a,{labels:t}))},DU=({label:e,color:t,source:n,target:a,hidden:o,directed:s,labels:c={}})=>ve.createElement("div",{className:"edge"},ve.createElement(Mm,Object.assign({},n,{labels:c})),ve.createElement("div",{className:"body"},ve.createElement("div",{className:"render"},ve.createElement("span",{className:o?"dotted":"dash",style:{borderColor:t||"#000"}})," ",s&&ve.createElement("span",{className:"arrow",style:{borderTopColor:t||"#000"}})),ve.createElement("span",{className:`label ${o?"text-muted":""} ${e?"":"fst-italic"}`},e||c.no_label||"No label")),ve.createElement(Mm,Object.assign({},a,{labels:c}))),kU=({id:e,labels:t})=>{const n=Zn(),a=w.useMemo(()=>{const o=n.getGraph().getEdgeAttributes(e),s=n.getSetting("nodeReducer"),c=n.getSetting("edgeReducer"),u=n.getGraph().getNodeAttributes(n.getGraph().source(e)),f=n.getGraph().getNodeAttributes(n.getGraph().target(e));return Object.assign(Object.assign(Object.assign({color:n.getSetting("defaultEdgeColor"),directed:n.getGraph().isDirected(e)},o),c?c(e,o):{}),{source:Object.assign(Object.assign({color:n.getSetting("defaultNodeColor")},u),s?s(e,u):{}),target:Object.assign(Object.assign({color:n.getSetting("defaultNodeColor")},f),s?s(e,f):{})})},[n,e]);return ve.createElement(DU,Object.assign({},a,{labels:t}))};function sv(e,t){const[n,a]=w.useState(e);return w.useEffect(()=>{const o=setTimeout(()=>{a(e)},t);return()=>{clearTimeout(o)}},[e,t]),n}function NU({fetcher:e,preload:t,filterFn:n,renderOption:a,getOptionValue:o,notFound:s,loadingSkeleton:c,label:u,placeholder:f="Select...",value:h,onChange:m,onFocus:g,disabled:y=!1,className:b,noResultsMessage:S}){const[E,_]=w.useState(!1),[N,C]=w.useState(!1),[A,k]=w.useState([]),[D,M]=w.useState(!1),[R,U]=w.useState(null),[L,I]=w.useState(h),[q,Y]=w.useState(null),[B,X]=w.useState(""),ne=sv(B,t?0:150),[F,z]=w.useState([]);w.useEffect(()=>{_(!0),I(h)},[h]),w.useEffect(()=>{E||(async()=>{try{M(!0),U(null);const H=h!==null?await e(h):[];z(H),k(H)}catch(H){U(H instanceof Error?H.message:"Failed to fetch options")}finally{M(!1)}})()},[E,e,h]),w.useEffect(()=>{const G=async()=>{try{M(!0),U(null);const H=await e(ne);z(H),k(H)}catch(H){U(H instanceof Error?H.message:"Failed to fetch options")}finally{M(!1)}};E&&t?t&&k(ne?F.filter(H=>n?n(H,ne):!0):F):G()},[e,ne,E,t,n]);const j=w.useCallback(G=>{G!==L&&(I(G),m(G)),C(!1)},[L,I,C,m]),K=w.useCallback(G=>{G!==q&&(Y(G),g(G))},[q,Y,g]);return x.jsx("div",{className:Oe(y&&"cursor-not-allowed opacity-50",b),onFocus:()=>{C(!0)},onBlur:()=>C(!1),children:x.jsxs(wd,{shouldFilter:!1,className:"bg-transparent",children:[x.jsxs("div",{children:[x.jsx(nv,{placeholder:f,value:B,className:"max-h-8",onValueChange:G=>{X(G),G&&!N&&C(!0)}}),D&&A.length>0&&x.jsx("div",{className:"absolute top-1/2 right-2 flex -translate-y-1/2 transform items-center",children:x.jsx(BE,{className:"h-4 w-4 animate-spin"})})]}),x.jsxs(Ed,{hidden:!N||ne.length===0,children:[R&&x.jsx("div",{className:"text-destructive p-4 text-center",children:R}),D&&A.length===0&&(c||x.jsx(OU,{})),!D&&!R&&A.length===0&&(s||x.jsx(rv,{children:S??`No ${u.toLowerCase()} found.`})),x.jsx(Ko,{children:A.map((G,H)=>x.jsxs(x.Fragment,{children:[x.jsx(Zo,{value:o(G),onSelect:j,onMouseEnter:()=>K(o(G)),className:"truncate",children:a(G)},o(G)+`${H}`),H!==A.length-1&&x.jsx("div",{className:"bg-foreground/10 h-[1px]"},H)]}))})]})]})})}function OU(){return x.jsx(Ko,{children:x.jsx(Zo,{disabled:!0,children:x.jsxs("div",{className:"flex w-full items-center gap-2",children:[x.jsx("div",{className:"bg-muted h-6 w-6 animate-pulse rounded-full"}),x.jsxs("div",{className:"flex flex-1 flex-col gap-1",children:[x.jsx("div",{className:"bg-muted h-4 w-24 animate-pulse rounded"}),x.jsx("div",{className:"bg-muted h-3 w-16 animate-pulse rounded"})]})]})})})}function jU(e){return x.jsxs("div",{children:[e.type==="nodes"&&x.jsx(AU,{id:e.id}),e.type==="edges"&&x.jsx(kU,{id:e.id}),e.type==="message"&&x.jsx("div",{children:e.message})]})}const Yp="__message_item",ou={graph:null,searchEngine:null},LU=({onChange:e,onFocus:t,value:n})=>{const a=ct.use.sigmaGraph(),o=w.useMemo(()=>{if(ou.graph==a)return ou.searchEngine;if(!a||a.nodes().length==0)return;ou.graph=a;const c=new Ua({idField:"id",fields:["label"],searchOptions:{prefix:!0,fuzzy:.2,boost:{label:2}}}),u=a.nodes().map(f=>({id:f,label:a.getNodeAttribute(f,"label")}));return c.addAll(u),ou.searchEngine=c,c},[a]),s=w.useCallback(async c=>{if(t&&t(null),!c||!o)return[];const u=o.search(c).map(f=>({id:f.id,type:"nodes"}));return u.length<=Hh?u:[...u.slice(0,Hh),{type:"message",id:Yp,message:`And ${u.length-Hh} others`}]},[o,t]);return x.jsx(NU,{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:jU,getOptionValue:c=>c.id,value:n&&n.type!=="message"?n.id:null,onChange:c=>{c!==Yp&&e(c?{id:c,type:"nodes"}:null)},onFocus:c=>{c!==Yp&&t&&t(c?{id:c,type:"nodes"}:null)},label:"item",placeholder:"Search nodes..."})},zU=({...e})=>x.jsx(LU,{...e});function MU({fetcher:e,preload:t,filterFn:n,renderOption:a,getOptionValue:o,getDisplayValue:s,notFound:c,loadingSkeleton:u,label:f,placeholder:h="Select...",value:m,onChange:g,disabled:y=!1,className:b,triggerClassName:S,searchInputClassName:E,noResultsMessage:_,triggerTooltip:N,clearable:C=!0}){const[A,k]=w.useState(!1),[D,M]=w.useState(!1),[R,U]=w.useState([]),[L,I]=w.useState(!1),[q,Y]=w.useState(null),[B,X]=w.useState(m),[ne,F]=w.useState(null),[z,j]=w.useState(""),K=sv(z,t?0:150),[G,H]=w.useState([]);w.useEffect(()=>{k(!0),X(m)},[m]),w.useEffect(()=>{if(m&&R.length>0){const $=R.find(W=>o(W)===m);$&&F($)}},[m,R,o]),w.useEffect(()=>{A||(async()=>{try{I(!0),Y(null);const W=await e(m);H(W),U(W)}catch(W){Y(W instanceof Error?W.message:"Failed to fetch options")}finally{I(!1)}})()},[A,e,m]),w.useEffect(()=>{const $=async()=>{try{I(!0),Y(null);const W=await e(K);H(W),U(W)}catch(W){Y(W instanceof Error?W.message:"Failed to fetch options")}finally{I(!1)}};A&&t?t&&U(K?G.filter(W=>n?n(W,K):!0):G):$()},[e,K,A,t,n]);const O=w.useCallback($=>{const W=C&&$===B?"":$;X(W),F(R.find(re=>o(re)===W)||null),g(W),M(!1)},[B,g,C,R,o]);return x.jsxs(pd,{open:D,onOpenChange:M,children:[x.jsx(md,{asChild:!0,children:x.jsxs(wt,{variant:"outline",role:"combobox","aria-expanded":D,className:Oe("justify-between",y&&"cursor-not-allowed opacity-50",S),disabled:y,tooltip:N,side:"bottom",children:[ne?s(ne):h,x.jsx(NO,{className:"opacity-50",size:10})]})}),x.jsx(_l,{className:Oe("p-0",b),onCloseAutoFocus:$=>$.preventDefault(),children:x.jsxs(wd,{shouldFilter:!1,children:[x.jsxs("div",{className:"relative w-full border-b",children:[x.jsx(nv,{placeholder:`Search ${f.toLowerCase()}...`,value:z,onValueChange:$=>{j($)},className:E}),L&&R.length>0&&x.jsx("div",{className:"absolute top-1/2 right-2 flex -translate-y-1/2 transform items-center",children:x.jsx(BE,{className:"h-4 w-4 animate-spin"})})]}),x.jsxs(Ed,{children:[q&&x.jsx("div",{className:"text-destructive p-4 text-center",children:q}),L&&R.length===0&&(u||x.jsx(PU,{})),!L&&!q&&R.length===0&&(c||x.jsx(rv,{children:_??`No ${f.toLowerCase()} found.`})),x.jsx(Ko,{children:R.map($=>x.jsxs(Zo,{value:o($),onSelect:O,className:"truncate",children:[a($),x.jsx(ig,{className:Oe("ml-auto h-3 w-3",B===o($)?"opacity-100":"opacity-0")})]},o($)))})]})]})})]})}function PU(){return x.jsx(Ko,{children:x.jsx(Zo,{disabled:!0,children:x.jsxs("div",{className:"flex w-full items-center gap-2",children:[x.jsx("div",{className:"bg-muted h-6 w-6 animate-pulse rounded-full"}),x.jsxs("div",{className:"flex flex-1 flex-col gap-1",children:[x.jsx("div",{className:"bg-muted h-4 w-24 animate-pulse rounded"}),x.jsx("div",{className:"bg-muted h-3 w-16 animate-pulse rounded"})]})]})})})}const GU=()=>{const e=Ye.use.queryLabel(),[t,n]=w.useState({labels:[],searchEngine:null}),[a,o]=w.useState(!1),s=w.useCallback(async u=>{let f=t.labels,h=t.searchEngine;if(!a||!h){f=["*"].concat(await mO()),f.includes(Ye.getState().queryLabel)||Ye.getState().setQueryLabel(f[0]),h=new Ua({idField:"id",fields:["value"],searchOptions:{prefix:!0,fuzzy:.2,boost:{label:2}}});const m=f.map((g,y)=>({id:y,value:g}));h.addAll(m),n({labels:f,searchEngine:h}),o(!0)}return u?h.search(u).map(m=>f[m.id]):f},[t,a,n,o]),c=w.useCallback(u=>{Ye.getState().setQueryLabel(u)},[]);return x.jsx(MU,{className:"ml-2",triggerClassName:"max-h-8",searchInputClassName:"max-h-8",triggerTooltip:"Select query label",fetcher:s,renderOption:u=>x.jsx("div",{children:u}),getOptionValue:u=>u,getDisplayValue:u=>x.jsx("div",{children:u}),notFound:x.jsx("div",{className:"py-6 text-center text-sm",children:"No labels found"}),label:"Label",placeholder:"Search labels...",value:e!==null?e:"",onChange:c})},bn=({text:e,className:t,tooltipClassName:n,tooltip:a,side:o,onClick:s})=>a?x.jsx(h_,{delayDuration:200,children:x.jsxs(p_,{children:[x.jsx(m_,{asChild:!0,children:x.jsx("label",{className:Oe(t,s!==void 0?"cursor-pointer":void 0),onClick:s,children:e})}),x.jsx(jg,{side:o,className:n,children:a})]})}):x.jsx("label",{className:Oe(t,s!==void 0?"cursor-pointer":void 0),onClick:s,children:e}),FU=()=>{const{getNode:e,getEdge:t}=yT(),n=ct.use.selectedNode(),a=ct.use.focusedNode(),o=ct.use.selectedEdge(),s=ct.use.focusedEdge(),[c,u]=w.useState(null),[f,h]=w.useState(null);return w.useEffect(()=>{let m=null,g=null;a?(m="node",g=e(a)):n?(m="node",g=e(n)):s?(m="edge",g=t(s,!0)):o&&(m="edge",g=t(o,!0)),g?(m=="node"?u(UU(g)):u(BU(g)),h(m)):(u(null),h(null))},[a,n,s,o,u,h,e,t]),c?x.jsx("div",{className:"bg-background/80 max-w-xs rounded-lg border-2 p-2 text-xs backdrop-blur-lg",children:f=="node"?x.jsx(IU,{node:c}):x.jsx(HU,{edge:c})}):x.jsx(x.Fragment,{})},UU=e=>{const t=ct.getState(),n=[];if(t.sigmaGraph&&t.rawGraph)for(const a of t.sigmaGraph.edges(e.id)){const o=t.rawGraph.getEdge(a,!0);if(o){const s=e.id===o.source,c=s?o.target:o.source,u=t.rawGraph.getNode(c);u&&n.push({type:s?"Target":"Source",id:c,label:u.labels.join(", ")})}}return{...e,relationships:n}},BU=e=>{var o,s;const t=ct.getState(),n=(o=t.rawGraph)==null?void 0:o.getNode(e.source),a=(s=t.rawGraph)==null?void 0:s.getNode(e.target);return{...e,sourceNode:n,targetNode:a}},Er=({name:e,value:t,onClick:n,tooltip:a})=>x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx("label",{className:"text-primary/60 tracking-wide",children:e}),":",x.jsx(bn,{className:"hover:bg-primary/20 rounded p-1 text-ellipsis",tooltipClassName:"max-w-80",text:t,tooltip:a||t,side:"left",onClick:n})]}),IU=({node:e})=>x.jsxs("div",{className:"flex flex-col gap-2",children:[x.jsx("label",{className:"text-md pl-1 font-bold tracking-wide text-sky-300",children:"Node"}),x.jsxs("div",{className:"bg-primary/5 max-h-96 overflow-auto rounded p-1",children:[x.jsx(Er,{name:"Id",value:e.id}),x.jsx(Er,{name:"Labels",value:e.labels.join(", "),onClick:()=>{ct.getState().setSelectedNode(e.id,!0)}}),x.jsx(Er,{name:"Degree",value:e.degree})]}),x.jsx("label",{className:"text-md pl-1 font-bold tracking-wide text-yellow-400/90",children:"Properties"}),x.jsx("div",{className:"bg-primary/5 max-h-96 overflow-auto rounded p-1",children:Object.keys(e.properties).sort().map(t=>x.jsx(Er,{name:t,value:e.properties[t]},t))}),e.relationships.length>0&&x.jsxs(x.Fragment,{children:[x.jsx("label",{className:"text-md pl-1 font-bold tracking-wide text-teal-600/90",children:"Relationships"}),x.jsx("div",{className:"bg-primary/5 max-h-96 overflow-auto rounded p-1",children:e.relationships.map(({type:t,id:n,label:a})=>x.jsx(Er,{name:t,value:a,onClick:()=>{ct.getState().setSelectedNode(n,!0)}},n))})]})]}),HU=({edge:e})=>x.jsxs("div",{className:"flex flex-col gap-2",children:[x.jsx("label",{className:"text-md pl-1 font-bold tracking-wide text-teal-600",children:"Relationship"}),x.jsxs("div",{className:"bg-primary/5 max-h-96 overflow-auto rounded p-1",children:[x.jsx(Er,{name:"Id",value:e.id}),e.type&&x.jsx(Er,{name:"Type",value:e.type}),x.jsx(Er,{name:"Source",value:e.sourceNode?e.sourceNode.labels.join(", "):e.source,onClick:()=>{ct.getState().setSelectedNode(e.source,!0)}}),x.jsx(Er,{name:"Target",value:e.targetNode?e.targetNode.labels.join(", "):e.target,onClick:()=>{ct.getState().setSelectedNode(e.target,!0)}})]}),x.jsx("label",{className:"text-md pl-1 font-bold tracking-wide text-yellow-400/90",children:"Properties"}),x.jsx("div",{className:"bg-primary/5 max-h-96 overflow-auto rounded p-1",children:Object.keys(e.properties).sort().map(t=>x.jsx(Er,{name:t,value:e.properties[t]},t))})]}),w1={allowInvalidContainer:!0,defaultNodeType:"default",defaultEdgeType:"curvedArrow",renderEdgeLabels:!1,edgeProgramClasses:{arrow:kC,curvedArrow:h5,curvedNoArrow:f5},nodeProgramClasses:{default:X3,circel:Tl,point:S3},labelGridCellSize:60,labelRenderedSizeThreshold:12,enableEdgeEvents:!0,labelColor:{color:"#000",attribute:"labelColor"},edgeLabelColor:{color:"#000",attribute:"labelColor"},edgeLabelSize:8,labelSize:12},$U=()=>{const e=GC(),t=Zn(),[n,a]=w.useState(null);return w.useEffect(()=>{e({downNode:o=>{a(o.node),t.getGraph().setNodeAttribute(o.node,"highlighted",!0)},mousemovebody:o=>{if(!n)return;const s=t.viewportToGraph(o);t.getGraph().setNodeAttribute(n,"x",s.x),t.getGraph().setNodeAttribute(n,"y",s.y),o.preventSigmaDefault(),o.original.preventDefault(),o.original.stopPropagation()},mouseup:()=>{n&&(a(null),t.getGraph().removeNodeAttribute(n,"highlighted"))},mousedown:()=>{t.getCustomBBox()||t.setCustomBBox(t.getBBox())}})},[e,t,n]),null},VU=()=>{const[e,t]=w.useState(w1),n=ct.use.selectedNode(),a=ct.use.focusedNode(),o=ct.use.moveToSelectedNode(),s=Ye.use.showPropertyPanel(),c=Ye.use.showNodeSearchBar(),u=Ye.use.showNodeLabel(),f=Ye.use.enableEdgeEvents(),h=Ye.use.enableNodeDrag(),m=Ye.use.showEdgeLabel();w.useEffect(()=>{t({...w1,enableEdgeEvents:f,renderEdgeLabels:m,renderLabels:u})},[u,f,m]);const g=w.useCallback(E=>{E===null?ct.getState().setFocusedNode(null):E.type==="nodes"&&ct.getState().setFocusedNode(E.id)},[]),y=w.useCallback(E=>{E===null?ct.getState().setSelectedNode(null):E.type==="nodes"&&ct.getState().setSelectedNode(E.id,!0)},[]),b=w.useMemo(()=>a??n,[a,n]),S=w.useMemo(()=>n?{type:"nodes",id:n}:null,[n]);return x.jsxs(v3,{settings:e,className:"!bg-background !size-full overflow-hidden",children:[x.jsx(aU,{}),h&&x.jsx($U,{}),x.jsx(g5,{node:b,move:o}),x.jsxs("div",{className:"absolute top-2 left-2 flex items-start gap-2",children:[x.jsx(GU,{}),c&&x.jsx(zU,{value:S,onFocus:g,onChange:y})]}),x.jsxs("div",{className:"bg-background/60 absolute bottom-2 left-2 flex flex-col rounded-xl border-2 backdrop-blur-lg",children:[x.jsx(mU,{}),x.jsx(iU,{}),x.jsx(LF,{}),x.jsx(oU,{})]}),s&&x.jsx("div",{className:"absolute top-2 right-2",children:x.jsx(FU,{})})]})},LT=w.forwardRef(({className:e,...t},n)=>x.jsx("div",{className:"relative w-full overflow-auto",children:x.jsx("table",{ref:n,className:Oe("w-full caption-bottom text-sm",e),...t})}));LT.displayName="Table";const zT=w.forwardRef(({className:e,...t},n)=>x.jsx("thead",{ref:n,className:Oe("[&_tr]:border-b",e),...t}));zT.displayName="TableHeader";const MT=w.forwardRef(({className:e,...t},n)=>x.jsx("tbody",{ref:n,className:Oe("[&_tr:last-child]:border-0",e),...t}));MT.displayName="TableBody";const qU=w.forwardRef(({className:e,...t},n)=>x.jsx("tfoot",{ref:n,className:Oe("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",e),...t}));qU.displayName="TableFooter";const Pm=w.forwardRef(({className:e,...t},n)=>x.jsx("tr",{ref:n,className:Oe("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),...t}));Pm.displayName="TableRow";const Jr=w.forwardRef(({className:e,...t},n)=>x.jsx("th",{ref:n,className:Oe("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}));Jr.displayName="TableHead";const ea=w.forwardRef(({className:e,...t},n)=>x.jsx("td",{ref:n,className:Oe("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));ea.displayName="TableCell";const YU=w.forwardRef(({className:e,...t},n)=>x.jsx("caption",{ref:n,className:Oe("text-muted-foreground mt-4 text-sm",e),...t}));YU.displayName="TableCaption";const hl=w.forwardRef(({className:e,...t},n)=>x.jsx("div",{ref:n,className:Oe("bg-card text-card-foreground rounded-xl border shadow",e),...t}));hl.displayName="Card";const Gu=w.forwardRef(({className:e,...t},n)=>x.jsx("div",{ref:n,className:Oe("flex flex-col space-y-1.5 p-6",e),...t}));Gu.displayName="CardHeader";const pl=w.forwardRef(({className:e,...t},n)=>x.jsx("div",{ref:n,className:Oe("leading-none font-semibold tracking-tight",e),...t}));pl.displayName="CardTitle";const Sd=w.forwardRef(({className:e,...t},n)=>x.jsx("div",{ref:n,className:Oe("text-muted-foreground text-sm",e),...t}));Sd.displayName="CardDescription";const Fu=w.forwardRef(({className:e,...t},n)=>x.jsx("div",{ref:n,className:Oe("p-6 pt-0",e),...t}));Fu.displayName="CardContent";const WU=w.forwardRef(({className:e,...t},n)=>x.jsx("div",{ref:n,className:Oe("flex items-center p-6 pt-0",e),...t}));WU.displayName="CardFooter";function XU({title:e,description:t,icon:n=GO,action:a,className:o,...s}){return x.jsxs(hl,{className:Oe("flex w-full flex-col items-center justify-center space-y-6 bg-transparent p-16",o),...s,children:[x.jsx("div",{className:"mr-4 shrink-0 rounded-full border border-dashed p-4",children:x.jsx(n,{className:"text-muted-foreground size-8","aria-hidden":"true"})}),x.jsxs("div",{className:"flex flex-col items-center gap-1.5 text-center",children:[x.jsx(pl,{children:e}),t?x.jsx(Sd,{children:t}):null]}),a||null]})}var Wp={exports:{}},Xp,E1;function KU(){if(E1)return Xp;E1=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Xp=e,Xp}var Kp,S1;function ZU(){if(S1)return Kp;S1=1;var e=KU();function t(){}function n(){}return n.resetWarningCache=t,Kp=function(){function a(c,u,f,h,m,g){if(g!==e){var y=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 y.name="Invariant Violation",y}}a.isRequired=a;function o(){return a}var s={array:a,bigint:a,bool:a,func:a,number:a,object:a,string:a,symbol:a,any:a,arrayOf:o,element:a,elementType:a,instanceOf:o,node:a,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},Kp}var _1;function QU(){return _1||(_1=1,Wp.exports=ZU()()),Wp.exports}var JU=QU();const gt=dn(JU),eB=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 Po(e,t,n){const a=tB(e),{webkitRelativePath:o}=e,s=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof a.path!="string"&&C1(a,"path",s),C1(a,"relativePath",s),a}function tB(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const a=t.split(".").pop().toLowerCase(),o=eB.get(a);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function C1(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const nB=[".DS_Store","Thumbs.db"];function rB(e){return Oi(this,void 0,void 0,function*(){return Uu(e)&&aB(e.dataTransfer)?lB(e.dataTransfer,e.type):iB(e)?oB(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?sB(e):[]})}function aB(e){return Uu(e)}function iB(e){return Uu(e)&&Uu(e.target)}function Uu(e){return typeof e=="object"&&e!==null}function oB(e){return Gm(e.target.files).map(t=>Po(t))}function sB(e){return Oi(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>Po(n))})}function lB(e,t){return Oi(this,void 0,void 0,function*(){if(e.items){const n=Gm(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const a=yield Promise.all(n.map(cB));return T1(PT(a))}return T1(Gm(e.files).map(n=>Po(n)))})}function T1(e){return e.filter(t=>nB.indexOf(t.name)===-1)}function Gm(e){if(e===null)return[];const t=[];for(let n=0;n[...t,...Array.isArray(n)?PT(n):[n]],[])}function R1(e,t){return Oi(this,void 0,void 0,function*(){var n;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const s=yield e.getAsFileSystemHandle();if(s===null)throw new Error(`${e} is not a File`);if(s!==void 0){const c=yield s.getFile();return c.handle=s,Po(c)}}const a=e.getAsFile();if(!a)throw new Error(`${e} is not a File`);return Po(a,(n=t==null?void 0:t.fullPath)!==null&&n!==void 0?n:void 0)})}function uB(e){return Oi(this,void 0,void 0,function*(){return e.isDirectory?GT(e):dB(e)})}function GT(e){const t=e.createReader();return new Promise((n,a)=>{const o=[];function s(){t.readEntries(c=>Oi(this,void 0,void 0,function*(){if(c.length){const u=Promise.all(c.map(uB));o.push(u),s()}else try{const u=yield Promise.all(o);n(u)}catch(u){a(u)}}),c=>{a(c)})}s()})}function dB(e){return Oi(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(a=>{const o=Po(a,e.fullPath);t(o)},a=>{n(a)})})})}var su={},A1;function fB(){return A1||(A1=1,su.__esModule=!0,su.default=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var a=e.name||"",o=(e.type||"").toLowerCase(),s=o.replace(/\/.*$/,"");return n.some(function(c){var u=c.trim().toLowerCase();return u.charAt(0)==="."?a.toLowerCase().endsWith(u):u.endsWith("/*")?s===u.replace(/\/.*$/,""):o===u})}return!0}),su}var hB=fB();const Zp=dn(hB);function D1(e){return gB(e)||mB(e)||UT(e)||pB()}function pB(){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 mB(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function gB(e){if(Array.isArray(e))return Fm(e)}function k1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,a)}return n}function N1(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,a=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:"",n=t.split(","),a=n.length>1?"one of ".concat(n.join(", ")):n[0];return{code:wB,message:"File type must be ".concat(a)}},O1=function(t){return{code:EB,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},j1=function(t){return{code:SB,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},TB={code:_B,message:"Too many files"};function BT(e,t){var n=e.type==="application/x-moz-file"||xB(e,t);return[n,n?null:CB(t)]}function IT(e,t,n){if(wi(e.size))if(wi(t)&&wi(n)){if(e.size>n)return[!1,O1(n)];if(e.sizen)return[!1,O1(n)]}return[!0,null]}function wi(e){return e!=null}function RB(e){var t=e.files,n=e.accept,a=e.minSize,o=e.maxSize,s=e.multiple,c=e.maxFiles,u=e.validator;return!s&&t.length>1||s&&c>=1&&t.length>c?!1:t.every(function(f){var h=BT(f,n),m=ml(h,1),g=m[0],y=IT(f,a,o),b=ml(y,1),S=b[0],E=u?u(f):null;return g&&S&&!E})}function Bu(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function lu(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 L1(e){e.preventDefault()}function AB(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function DB(e){return e.indexOf("Edge/")!==-1}function kB(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return AB(e)||DB(e)}function xr(){for(var e=arguments.length,t=new Array(e),n=0;n1?o-1:0),c=1;ce.length)&&(t=e.length);for(var n=0,a=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}function YB(e,t){if(e==null)return{};var n={},a=Object.keys(e),o,s;for(s=0;s=0)&&(n[o]=e[o]);return n}var _d=w.forwardRef(function(e,t){var n=e.children,a=Iu(e,MB),o=WB(a),s=o.open,c=Iu(o,PB);return w.useImperativeHandle(t,function(){return{open:s}},[s]),ve.createElement(w.Fragment,null,n(_t(_t({},c),{},{open:s})))});_d.displayName="Dropzone";var qT={disabled:!1,getFilesFromEvent:rB,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};_d.defaultProps=qT;_d.propTypes={children:gt.func,accept:gt.objectOf(gt.arrayOf(gt.string)),multiple:gt.bool,preventDropOnDocument:gt.bool,noClick:gt.bool,noKeyboard:gt.bool,noDrag:gt.bool,noDragEventsBubbling:gt.bool,minSize:gt.number,maxSize:gt.number,maxFiles:gt.number,disabled:gt.bool,getFilesFromEvent:gt.func,onFileDialogCancel:gt.func,onFileDialogOpen:gt.func,useFsAccessApi:gt.bool,autoFocus:gt.bool,onDragEnter:gt.func,onDragLeave:gt.func,onDragOver:gt.func,onDrop:gt.func,onDropAccepted:gt.func,onDropRejected:gt.func,onError:gt.func,validator:gt.func};var Im={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function WB(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=_t(_t({},qT),e),n=t.accept,a=t.disabled,o=t.getFilesFromEvent,s=t.maxSize,c=t.minSize,u=t.multiple,f=t.maxFiles,h=t.onDragEnter,m=t.onDragLeave,g=t.onDragOver,y=t.onDrop,b=t.onDropAccepted,S=t.onDropRejected,E=t.onFileDialogCancel,_=t.onFileDialogOpen,N=t.useFsAccessApi,C=t.autoFocus,A=t.preventDropOnDocument,k=t.noClick,D=t.noKeyboard,M=t.noDrag,R=t.noDragEventsBubbling,U=t.onError,L=t.validator,I=w.useMemo(function(){return jB(n)},[n]),q=w.useMemo(function(){return OB(n)},[n]),Y=w.useMemo(function(){return typeof _=="function"?_:M1},[_]),B=w.useMemo(function(){return typeof E=="function"?E:M1},[E]),X=w.useRef(null),ne=w.useRef(null),F=w.useReducer(XB,Im),z=Qp(F,2),j=z[0],K=z[1],G=j.isFocused,H=j.isFileDialogActive,O=w.useRef(typeof window<"u"&&window.isSecureContext&&N&&NB()),$=function(){!O.current&&H&&setTimeout(function(){if(ne.current){var Ae=ne.current.files;Ae.length||(K({type:"closeDialog"}),B())}},300)};w.useEffect(function(){return window.addEventListener("focus",$,!1),function(){window.removeEventListener("focus",$,!1)}},[ne,H,B,O]);var W=w.useRef([]),re=function(Ae){X.current&&X.current.contains(Ae.target)||(Ae.preventDefault(),W.current=[])};w.useEffect(function(){return A&&(document.addEventListener("dragover",L1,!1),document.addEventListener("drop",re,!1)),function(){A&&(document.removeEventListener("dragover",L1),document.removeEventListener("drop",re))}},[X,A]),w.useEffect(function(){return!a&&C&&X.current&&X.current.focus(),function(){}},[X,C,a]);var de=w.useCallback(function(me){U?U(me):console.error(me)},[U]),ie=w.useCallback(function(me){me.preventDefault(),me.persist(),Ee(me),W.current=[].concat(UB(W.current),[me.target]),lu(me)&&Promise.resolve(o(me)).then(function(Ae){if(!(Bu(me)&&!R)){var je=Ae.length,He=je>0&&RB({files:Ae,accept:I,minSize:c,maxSize:s,multiple:u,maxFiles:f,validator:L}),it=je>0&&!He;K({isDragAccept:He,isDragReject:it,isDragActive:!0,type:"setDraggedFiles"}),h&&h(me)}}).catch(function(Ae){return de(Ae)})},[o,h,de,R,I,c,s,u,f,L]),oe=w.useCallback(function(me){me.preventDefault(),me.persist(),Ee(me);var Ae=lu(me);if(Ae&&me.dataTransfer)try{me.dataTransfer.dropEffect="copy"}catch{}return Ae&&g&&g(me),!1},[g,R]),Ce=w.useCallback(function(me){me.preventDefault(),me.persist(),Ee(me);var Ae=W.current.filter(function(He){return X.current&&X.current.contains(He)}),je=Ae.indexOf(me.target);je!==-1&&Ae.splice(je,1),W.current=Ae,!(Ae.length>0)&&(K({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),lu(me)&&m&&m(me))},[X,m,R]),he=w.useCallback(function(me,Ae){var je=[],He=[];me.forEach(function(it){var Ct=BT(it,I),bt=Qp(Ct,2),qt=bt[0],fn=bt[1],Gt=IT(it,c,s),at=Qp(Gt,2),Tn=at[0],xt=at[1],Lt=L?L(it):null;if(qt&&Tn&&!Lt)je.push(it);else{var Wa=[fn,xt];Lt&&(Wa=Wa.concat(Lt)),He.push({file:it,errors:Wa.filter(function(ji){return ji})})}}),(!u&&je.length>1||u&&f>=1&&je.length>f)&&(je.forEach(function(it){He.push({file:it,errors:[TB]})}),je.splice(0)),K({acceptedFiles:je,fileRejections:He,isDragReject:He.length>0,type:"setFiles"}),y&&y(je,He,Ae),He.length>0&&S&&S(He,Ae),je.length>0&&b&&b(je,Ae)},[K,u,I,c,s,f,y,b,S,L]),Se=w.useCallback(function(me){me.preventDefault(),me.persist(),Ee(me),W.current=[],lu(me)&&Promise.resolve(o(me)).then(function(Ae){Bu(me)&&!R||he(Ae,me)}).catch(function(Ae){return de(Ae)}),K({type:"reset"})},[o,he,de,R]),be=w.useCallback(function(){if(O.current){K({type:"openDialog"}),Y();var me={multiple:u,types:q};window.showOpenFilePicker(me).then(function(Ae){return o(Ae)}).then(function(Ae){he(Ae,null),K({type:"closeDialog"})}).catch(function(Ae){LB(Ae)?(B(Ae),K({type:"closeDialog"})):zB(Ae)?(O.current=!1,ne.current?(ne.current.value=null,ne.current.click()):de(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):de(Ae)});return}ne.current&&(K({type:"openDialog"}),Y(),ne.current.value=null,ne.current.click())},[K,Y,B,N,he,de,q,u]),Le=w.useCallback(function(me){!X.current||!X.current.isEqualNode(me.target)||(me.key===" "||me.key==="Enter"||me.keyCode===32||me.keyCode===13)&&(me.preventDefault(),be())},[X,be]),Te=w.useCallback(function(){K({type:"focus"})},[]),ye=w.useCallback(function(){K({type:"blur"})},[]),J=w.useCallback(function(){k||(kB()?setTimeout(be,0):be())},[k,be]),le=function(Ae){return a?null:Ae},_e=function(Ae){return D?null:le(Ae)},pe=function(Ae){return M?null:le(Ae)},Ee=function(Ae){R&&Ae.stopPropagation()},te=w.useMemo(function(){return function(){var me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Ae=me.refKey,je=Ae===void 0?"ref":Ae,He=me.role,it=me.onKeyDown,Ct=me.onFocus,bt=me.onBlur,qt=me.onClick,fn=me.onDragEnter,Gt=me.onDragOver,at=me.onDragLeave,Tn=me.onDrop,xt=Iu(me,GB);return _t(_t(Bm({onKeyDown:_e(xr(it,Le)),onFocus:_e(xr(Ct,Te)),onBlur:_e(xr(bt,ye)),onClick:le(xr(qt,J)),onDragEnter:pe(xr(fn,ie)),onDragOver:pe(xr(Gt,oe)),onDragLeave:pe(xr(at,Ce)),onDrop:pe(xr(Tn,Se)),role:typeof He=="string"&&He!==""?He:"presentation"},je,X),!a&&!D?{tabIndex:0}:{}),xt)}},[X,Le,Te,ye,J,ie,oe,Ce,Se,D,M,a]),Fe=w.useCallback(function(me){me.stopPropagation()},[]),Pe=w.useMemo(function(){return function(){var me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Ae=me.refKey,je=Ae===void 0?"ref":Ae,He=me.onChange,it=me.onClick,Ct=Iu(me,FB),bt=Bm({accept:I,multiple:u,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:le(xr(He,Se)),onClick:le(xr(it,Fe)),tabIndex:-1},je,ne);return _t(_t({},bt),Ct)}},[ne,n,u,Se,a]);return _t(_t({},j),{},{isFocused:G&&!a,getRootProps:te,getInputProps:Pe,rootRef:X,inputRef:ne,open:le(be)})}function XB(e,t){switch(t.type){case"focus":return _t(_t({},e),{},{isFocused:!0});case"blur":return _t(_t({},e),{},{isFocused:!1});case"openDialog":return _t(_t({},Im),{},{isFileDialogActive:!0});case"closeDialog":return _t(_t({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return _t(_t({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return _t(_t({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return _t({},Im);default:return e}}function M1(){}var lv="Progress",cv=100,[KB,X6]=Kn(lv),[ZB,QB]=KB(lv),YT=w.forwardRef((e,t)=>{const{__scopeProgress:n,value:a=null,max:o,getValueLabel:s=JB,...c}=e;(o||o===0)&&!P1(o)&&console.error(eI(`${o}`,"Progress"));const u=P1(o)?o:cv;a!==null&&!G1(a,u)&&console.error(tI(`${a}`,"Progress"));const f=G1(a,u)?a:null,h=Hu(f)?s(f,u):void 0;return x.jsx(ZB,{scope:n,value:f,max:u,children:x.jsx(Ie.div,{"aria-valuemax":u,"aria-valuemin":0,"aria-valuenow":Hu(f)?f:void 0,"aria-valuetext":h,role:"progressbar","data-state":KT(f,u),"data-value":f??void 0,"data-max":u,...c,ref:t})})});YT.displayName=lv;var WT="ProgressIndicator",XT=w.forwardRef((e,t)=>{const{__scopeProgress:n,...a}=e,o=QB(WT,n);return x.jsx(Ie.div,{"data-state":KT(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...a,ref:t})});XT.displayName=WT;function JB(e,t){return`${Math.round(e/t*100)}%`}function KT(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Hu(e){return typeof e=="number"}function P1(e){return Hu(e)&&!isNaN(e)&&e>0}function G1(e,t){return Hu(e)&&!isNaN(e)&&e<=t&&e>=0}function eI(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${cv}\`.`}function tI(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be: - - a positive number - - less than the value passed to \`max\` (or ${cv} if no \`max\` prop is set) - - \`null\` or \`undefined\` if the progress is indeterminate. - -Defaulting to \`null\`.`}var ZT=YT,nI=XT;const QT=w.forwardRef(({className:e,value:t,...n},a)=>x.jsx(ZT,{ref:a,className:Oe("bg-secondary relative h-4 w-full overflow-hidden rounded-full",e),...n,children:x.jsx(nI,{className:"bg-primary h-full w-full flex-1 transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));QT.displayName=ZT.displayName;function Hm(e,[t,n]){return Math.min(n,Math.max(t,e))}function rI(e,t){return w.useReducer((n,a)=>t[n][a]??n,e)}var uv="ScrollArea",[JT,K6]=Kn(uv),[aI,Qn]=JT(uv),eR=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:a="hover",dir:o,scrollHideDelay:s=600,...c}=e,[u,f]=w.useState(null),[h,m]=w.useState(null),[g,y]=w.useState(null),[b,S]=w.useState(null),[E,_]=w.useState(null),[N,C]=w.useState(0),[A,k]=w.useState(0),[D,M]=w.useState(!1),[R,U]=w.useState(!1),L=nt(t,q=>f(q)),I=gd(o);return x.jsx(aI,{scope:n,type:a,dir:I,scrollHideDelay:s,scrollArea:u,viewport:h,onViewportChange:m,content:g,onContentChange:y,scrollbarX:b,onScrollbarXChange:S,scrollbarXEnabled:D,onScrollbarXEnabledChange:M,scrollbarY:E,onScrollbarYChange:_,scrollbarYEnabled:R,onScrollbarYEnabledChange:U,onCornerWidthChange:C,onCornerHeightChange:k,children:x.jsx(Ie.div,{dir:I,...c,ref:L,style:{position:"relative","--radix-scroll-area-corner-width":N+"px","--radix-scroll-area-corner-height":A+"px",...e.style}})})});eR.displayName=uv;var tR="ScrollAreaViewport",nR=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:a,nonce:o,...s}=e,c=Qn(tR,n),u=w.useRef(null),f=nt(t,u,c.onViewportChange);return x.jsxs(x.Fragment,{children:[x.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:o}),x.jsx(Ie.div,{"data-radix-scroll-area-viewport":"",...s,ref:f,style:{overflowX:c.scrollbarXEnabled?"scroll":"hidden",overflowY:c.scrollbarYEnabled?"scroll":"hidden",...e.style},children:x.jsx("div",{ref:c.onContentChange,style:{minWidth:"100%",display:"table"},children:a})})]})});nR.displayName=tR;var kr="ScrollAreaScrollbar",dv=w.forwardRef((e,t)=>{const{forceMount:n,...a}=e,o=Qn(kr,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:c}=o,u=e.orientation==="horizontal";return w.useEffect(()=>(u?s(!0):c(!0),()=>{u?s(!1):c(!1)}),[u,s,c]),o.type==="hover"?x.jsx(iI,{...a,ref:t,forceMount:n}):o.type==="scroll"?x.jsx(oI,{...a,ref:t,forceMount:n}):o.type==="auto"?x.jsx(rR,{...a,ref:t,forceMount:n}):o.type==="always"?x.jsx(fv,{...a,ref:t}):null});dv.displayName=kr;var iI=w.forwardRef((e,t)=>{const{forceMount:n,...a}=e,o=Qn(kr,e.__scopeScrollArea),[s,c]=w.useState(!1);return w.useEffect(()=>{const u=o.scrollArea;let f=0;if(u){const h=()=>{window.clearTimeout(f),c(!0)},m=()=>{f=window.setTimeout(()=>c(!1),o.scrollHideDelay)};return u.addEventListener("pointerenter",h),u.addEventListener("pointerleave",m),()=>{window.clearTimeout(f),u.removeEventListener("pointerenter",h),u.removeEventListener("pointerleave",m)}}},[o.scrollArea,o.scrollHideDelay]),x.jsx(zn,{present:n||s,children:x.jsx(rR,{"data-state":s?"visible":"hidden",...a,ref:t})})}),oI=w.forwardRef((e,t)=>{const{forceMount:n,...a}=e,o=Qn(kr,e.__scopeScrollArea),s=e.orientation==="horizontal",c=Td(()=>f("SCROLL_END"),100),[u,f]=rI("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(u==="idle"){const h=window.setTimeout(()=>f("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(h)}},[u,o.scrollHideDelay,f]),w.useEffect(()=>{const h=o.viewport,m=s?"scrollLeft":"scrollTop";if(h){let g=h[m];const y=()=>{const b=h[m];g!==b&&(f("SCROLL"),c()),g=b};return h.addEventListener("scroll",y),()=>h.removeEventListener("scroll",y)}},[o.viewport,s,f,c]),x.jsx(zn,{present:n||u!=="hidden",children:x.jsx(fv,{"data-state":u==="hidden"?"hidden":"visible",...a,ref:t,onPointerEnter:Be(e.onPointerEnter,()=>f("POINTER_ENTER")),onPointerLeave:Be(e.onPointerLeave,()=>f("POINTER_LEAVE"))})})}),rR=w.forwardRef((e,t)=>{const n=Qn(kr,e.__scopeScrollArea),{forceMount:a,...o}=e,[s,c]=w.useState(!1),u=e.orientation==="horizontal",f=Td(()=>{if(n.viewport){const h=n.viewport.offsetWidth{const{orientation:n="vertical",...a}=e,o=Qn(kr,e.__scopeScrollArea),s=w.useRef(null),c=w.useRef(0),[u,f]=w.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),h=lR(u.viewport,u.content),m={...a,sizes:u,onSizesChange:f,hasThumb:h>0&&h<1,onThumbChange:y=>s.current=y,onThumbPointerUp:()=>c.current=0,onThumbPointerDown:y=>c.current=y};function g(y,b){return fI(y,c.current,u,b)}return n==="horizontal"?x.jsx(sI,{...m,ref:t,onThumbPositionChange:()=>{if(o.viewport&&s.current){const y=o.viewport.scrollLeft,b=F1(y,u,o.dir);s.current.style.transform=`translate3d(${b}px, 0, 0)`}},onWheelScroll:y=>{o.viewport&&(o.viewport.scrollLeft=y)},onDragScroll:y=>{o.viewport&&(o.viewport.scrollLeft=g(y,o.dir))}}):n==="vertical"?x.jsx(lI,{...m,ref:t,onThumbPositionChange:()=>{if(o.viewport&&s.current){const y=o.viewport.scrollTop,b=F1(y,u);s.current.style.transform=`translate3d(0, ${b}px, 0)`}},onWheelScroll:y=>{o.viewport&&(o.viewport.scrollTop=y)},onDragScroll:y=>{o.viewport&&(o.viewport.scrollTop=g(y))}}):null}),sI=w.forwardRef((e,t)=>{const{sizes:n,onSizesChange:a,...o}=e,s=Qn(kr,e.__scopeScrollArea),[c,u]=w.useState(),f=w.useRef(null),h=nt(t,f,s.onScrollbarXChange);return w.useEffect(()=>{f.current&&u(getComputedStyle(f.current))},[f]),x.jsx(iR,{"data-orientation":"horizontal",...o,ref:h,sizes:n,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Cd(n)+"px",...e.style},onThumbPointerDown:m=>e.onThumbPointerDown(m.x),onDragScroll:m=>e.onDragScroll(m.x),onWheelScroll:(m,g)=>{if(s.viewport){const y=s.viewport.scrollLeft+m.deltaX;e.onWheelScroll(y),uR(y,g)&&m.preventDefault()}},onResize:()=>{f.current&&s.viewport&&c&&a({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:f.current.clientWidth,paddingStart:Vu(c.paddingLeft),paddingEnd:Vu(c.paddingRight)}})}})}),lI=w.forwardRef((e,t)=>{const{sizes:n,onSizesChange:a,...o}=e,s=Qn(kr,e.__scopeScrollArea),[c,u]=w.useState(),f=w.useRef(null),h=nt(t,f,s.onScrollbarYChange);return w.useEffect(()=>{f.current&&u(getComputedStyle(f.current))},[f]),x.jsx(iR,{"data-orientation":"vertical",...o,ref:h,sizes:n,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Cd(n)+"px",...e.style},onThumbPointerDown:m=>e.onThumbPointerDown(m.y),onDragScroll:m=>e.onDragScroll(m.y),onWheelScroll:(m,g)=>{if(s.viewport){const y=s.viewport.scrollTop+m.deltaY;e.onWheelScroll(y),uR(y,g)&&m.preventDefault()}},onResize:()=>{f.current&&s.viewport&&c&&a({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:f.current.clientHeight,paddingStart:Vu(c.paddingTop),paddingEnd:Vu(c.paddingBottom)}})}})}),[cI,aR]=JT(kr),iR=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:a,hasThumb:o,onThumbChange:s,onThumbPointerUp:c,onThumbPointerDown:u,onThumbPositionChange:f,onDragScroll:h,onWheelScroll:m,onResize:g,...y}=e,b=Qn(kr,n),[S,E]=w.useState(null),_=nt(t,L=>E(L)),N=w.useRef(null),C=w.useRef(""),A=b.viewport,k=a.content-a.viewport,D=Zt(m),M=Zt(f),R=Td(g,10);function U(L){if(N.current){const I=L.clientX-N.current.left,q=L.clientY-N.current.top;h({x:I,y:q})}}return w.useEffect(()=>{const L=I=>{const q=I.target;(S==null?void 0:S.contains(q))&&D(I,k)};return document.addEventListener("wheel",L,{passive:!1}),()=>document.removeEventListener("wheel",L,{passive:!1})},[A,S,k,D]),w.useEffect(M,[a,M]),Go(S,R),Go(b.content,R),x.jsx(cI,{scope:n,scrollbar:S,hasThumb:o,onThumbChange:Zt(s),onThumbPointerUp:Zt(c),onThumbPositionChange:M,onThumbPointerDown:Zt(u),children:x.jsx(Ie.div,{...y,ref:_,style:{position:"absolute",...y.style},onPointerDown:Be(e.onPointerDown,L=>{L.button===0&&(L.target.setPointerCapture(L.pointerId),N.current=S.getBoundingClientRect(),C.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",b.viewport&&(b.viewport.style.scrollBehavior="auto"),U(L))}),onPointerMove:Be(e.onPointerMove,U),onPointerUp:Be(e.onPointerUp,L=>{const I=L.target;I.hasPointerCapture(L.pointerId)&&I.releasePointerCapture(L.pointerId),document.body.style.webkitUserSelect=C.current,b.viewport&&(b.viewport.style.scrollBehavior=""),N.current=null})})})}),$u="ScrollAreaThumb",oR=w.forwardRef((e,t)=>{const{forceMount:n,...a}=e,o=aR($u,e.__scopeScrollArea);return x.jsx(zn,{present:n||o.hasThumb,children:x.jsx(uI,{ref:t,...a})})}),uI=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:a,...o}=e,s=Qn($u,n),c=aR($u,n),{onThumbPositionChange:u}=c,f=nt(t,g=>c.onThumbChange(g)),h=w.useRef(void 0),m=Td(()=>{h.current&&(h.current(),h.current=void 0)},100);return w.useEffect(()=>{const g=s.viewport;if(g){const y=()=>{if(m(),!h.current){const b=hI(g,u);h.current=b,u()}};return u(),g.addEventListener("scroll",y),()=>g.removeEventListener("scroll",y)}},[s.viewport,m,u]),x.jsx(Ie.div,{"data-state":c.hasThumb?"visible":"hidden",...o,ref:f,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...a},onPointerDownCapture:Be(e.onPointerDownCapture,g=>{const b=g.target.getBoundingClientRect(),S=g.clientX-b.left,E=g.clientY-b.top;c.onThumbPointerDown({x:S,y:E})}),onPointerUp:Be(e.onPointerUp,c.onThumbPointerUp)})});oR.displayName=$u;var hv="ScrollAreaCorner",sR=w.forwardRef((e,t)=>{const n=Qn(hv,e.__scopeScrollArea),a=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&a?x.jsx(dI,{...e,ref:t}):null});sR.displayName=hv;var dI=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,...a}=e,o=Qn(hv,n),[s,c]=w.useState(0),[u,f]=w.useState(0),h=!!(s&&u);return Go(o.scrollbarX,()=>{var g;const m=((g=o.scrollbarX)==null?void 0:g.offsetHeight)||0;o.onCornerHeightChange(m),f(m)}),Go(o.scrollbarY,()=>{var g;const m=((g=o.scrollbarY)==null?void 0:g.offsetWidth)||0;o.onCornerWidthChange(m),c(m)}),h?x.jsx(Ie.div,{...a,ref:t,style:{width:s,height:u,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Vu(e){return e?parseInt(e,10):0}function lR(e,t){const n=e/t;return isNaN(n)?0:n}function Cd(e){const t=lR(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,a=(e.scrollbar.size-n)*t;return Math.max(a,18)}function fI(e,t,n,a="ltr"){const o=Cd(n),s=o/2,c=t||s,u=o-c,f=n.scrollbar.paddingStart+c,h=n.scrollbar.size-n.scrollbar.paddingEnd-u,m=n.content-n.viewport,g=a==="ltr"?[0,m]:[m*-1,0];return cR([f,h],g)(e)}function F1(e,t,n="ltr"){const a=Cd(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,s=t.scrollbar.size-o,c=t.content-t.viewport,u=s-a,f=n==="ltr"?[0,c]:[c*-1,0],h=Hm(e,f);return cR([0,c],[0,u])(h)}function cR(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const a=(t[1]-t[0])/(e[1]-e[0]);return t[0]+a*(n-e[0])}}function uR(e,t){return e>0&&e{})=>{let n={left:e.scrollLeft,top:e.scrollTop},a=0;return function o(){const s={left:e.scrollLeft,top:e.scrollTop},c=n.left!==s.left,u=n.top!==s.top;(c||u)&&t(),n=s,a=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(a)};function Td(e,t){const n=Zt(e),a=w.useRef(0);return w.useEffect(()=>()=>window.clearTimeout(a.current),[]),w.useCallback(()=>{window.clearTimeout(a.current),a.current=window.setTimeout(n,t)},[n,t])}function Go(e,t){const n=Zt(t);sn(()=>{let a=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(a),a=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(a),o.unobserve(e)}}},[e,n])}var dR=eR,pI=nR,mI=sR;const fR=w.forwardRef(({className:e,children:t,...n},a)=>x.jsxs(dR,{ref:a,className:Oe("relative overflow-hidden",e),...n,children:[x.jsx(pI,{className:"h-full w-full rounded-[inherit]",children:t}),x.jsx(hR,{}),x.jsx(mI,{})]}));fR.displayName=dR.displayName;const hR=w.forwardRef(({className:e,orientation:t="vertical",...n},a)=>x.jsx(dv,{ref:a,orientation:t,className:Oe("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:x.jsx(oR,{className:"bg-border relative flex-1 rounded-full"})}));hR.displayName=dv.displayName;function $m(e,t={}){const{decimals:n=0,sizeType:a="normal"}=t,o=["Bytes","KB","MB","GB","TB"],s=["Bytes","KiB","MiB","GiB","TiB"];if(e===0)return"0 Byte";const c=Math.floor(Math.log(e)/Math.log(1024));return`${(e/Math.pow(1024,c)).toFixed(n)} ${a==="accurate"?s[c]??"Bytes":o[c]??"Bytes"}`}function gI(e){const{value:t,onValueChange:n,onUpload:a,progresses:o,accept:s=jk,maxSize:c=1024*1024*200,maxFileCount:u=1,multiple:f=!1,disabled:h=!1,description:m,className:g,...y}=e,[b,S]=aa({prop:t,onChange:n}),E=w.useCallback((C,A)=>{if(!f&&u===1&&C.length>1){an.error("Cannot upload more than 1 file at a time");return}if(((b==null?void 0:b.length)??0)+C.length>u){an.error(`Cannot upload more than ${u} files`);return}const k=C.map(M=>Object.assign(M,{preview:URL.createObjectURL(M)})),D=b?[...b,...k]:k;if(S(D),A.length>0&&A.forEach(({file:M})=>{an.error(`File ${M.name} was rejected`)}),a&&D.length>0&&D.length<=u){const M=D.length>0?`${D.length} files`:"file";an.promise(a(D),{loading:`Uploading ${M}...`,success:()=>(S([]),`${M} uploaded`),error:`Failed to upload ${M}`})}},[b,u,f,a,S]);function _(C){if(!b)return;const A=b.filter((k,D)=>D!==C);S(A),n==null||n(A)}w.useEffect(()=>()=>{b&&b.forEach(C=>{pR(C)&&URL.revokeObjectURL(C.preview)})},[]);const N=h||((b==null?void 0:b.length)??0)>=u;return x.jsxs("div",{className:"relative flex flex-col gap-6 overflow-hidden",children:[x.jsx(_d,{onDrop:E,accept:s,maxSize:c,maxFiles:u,multiple:u>1||f,disabled:N,children:({getRootProps:C,getInputProps:A,isDragActive:k})=>x.jsxs("div",{...C(),className:Oe("group border-muted-foreground/25 hover:bg-muted/25 relative grid h-52 w-full cursor-pointer place-items-center rounded-lg border-2 border-dashed px-5 py-2.5 text-center transition","ring-offset-background focus-visible:ring-ring focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",k&&"border-muted-foreground/50",N&&"pointer-events-none opacity-60",g),...y,children:[x.jsx("input",{...A()}),k?x.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 sm:px-5",children:[x.jsx("div",{className:"rounded-full border border-dashed p-3",children:x.jsx(um,{className:"text-muted-foreground size-7","aria-hidden":"true"})}),x.jsx("p",{className:"text-muted-foreground font-medium",children:"Drop the files here"})]}):x.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 sm:px-5",children:[x.jsx("div",{className:"rounded-full border border-dashed p-3",children:x.jsx(um,{className:"text-muted-foreground size-7","aria-hidden":"true"})}),x.jsxs("div",{className:"flex flex-col gap-px",children:[x.jsx("p",{className:"text-muted-foreground font-medium",children:"Drag and drop files here, or click to select files"}),m?x.jsx("p",{className:"text-muted-foreground/70 text-sm",children:m}):x.jsxs("p",{className:"text-muted-foreground/70 text-sm",children:["You can upload",u>1?` ${u===1/0?"multiple":u} - files (up to ${$m(c)} each)`:` a file with ${$m(c)}`,"Supported formats: TXT, MD, DOC, PDF, PPTX"]})]})]})]})}),b!=null&&b.length?x.jsx(fR,{className:"h-fit w-full px-3",children:x.jsx("div",{className:"flex max-h-48 flex-col gap-4",children:b==null?void 0:b.map((C,A)=>x.jsx(vI,{file:C,onRemove:()=>_(A),progress:o==null?void 0:o[C.name]},A))})}):null]})}function vI({file:e,progress:t,onRemove:n}){return x.jsxs("div",{className:"relative flex items-center gap-2.5",children:[x.jsxs("div",{className:"flex flex-1 gap-2.5",children:[pR(e)?x.jsx(yI,{file:e}):null,x.jsxs("div",{className:"flex w-full flex-col gap-2",children:[x.jsxs("div",{className:"flex flex-col gap-px",children:[x.jsx("p",{className:"text-foreground/80 line-clamp-1 text-sm font-medium",children:e.name}),x.jsx("p",{className:"text-muted-foreground text-xs",children:$m(e.size)})]}),t?x.jsx(QT,{value:t}):null]})]}),x.jsx("div",{className:"flex items-center gap-2",children:x.jsxs(wt,{type:"button",variant:"outline",size:"icon",className:"size-7",onClick:n,children:[x.jsx(IE,{className:"size-4","aria-hidden":"true"}),x.jsx("span",{className:"sr-only",children:"Remove file"})]})})]})}function pR(e){return"preview"in e&&typeof e.preview=="string"}function yI({file:e}){return e.type.startsWith("image/")?x.jsx("div",{className:"aspect-square shrink-0 rounded-md object-cover"}):x.jsx(MO,{className:"text-muted-foreground size-10","aria-hidden":"true"})}function bI(){const[e,t]=w.useState(!1),[n,a]=w.useState(!1),[o,s]=w.useState({}),c=w.useCallback(async u=>{a(!0);try{await Promise.all(u.map(async f=>{try{const h=await wO(f,m=>{console.debug(`Uploading ${f.name}: ${m}%`),s(g=>({...g,[f.name]:m}))});h.status==="success"?an.success(`Upload Success: -${f.name} uploaded successfully`):an.error(`Upload Failed: -${f.name} -${h.message}`)}catch(h){an.error(`Upload Failed: -${f.name} -${Sr(h)}`)}}))}catch(f){an.error(`Upload Failed -`+Sr(f))}finally{a(!1)}},[a,s]);return x.jsxs(mT,{open:e,onOpenChange:u=>{n&&!u||t(u)},children:[x.jsx(gT,{asChild:!0,children:x.jsxs(wt,{variant:"default",side:"bottom",tooltip:"Upload documents",size:"sm",children:[x.jsx(um,{})," Upload"]})}),x.jsxs(Qg,{className:"sm:max-w-xl",onCloseAutoFocus:u=>u.preventDefault(),children:[x.jsxs(Jg,{children:[x.jsx(ev,{children:"Upload documents"}),x.jsx(tv,{children:"Drag and drop your documents here or click to browse."})]}),x.jsx(gI,{maxFileCount:1/0,maxSize:200*1024*1024,description:"supported types: TXT, MD, DOC, PDF, PPTX",onUpload:c,progresses:o,disabled:n})]})]})}function xI(){const[e,t]=w.useState(!1),n=w.useCallback(async()=>{try{const a=await EO();a.status==="success"?(an.success("Documents cleared successfully"),t(!1)):an.error(`Clear Documents Failed: -${a.message}`)}catch(a){an.error(`Clear Documents Failed: -`+Sr(a))}},[t]);return x.jsxs(mT,{open:e,onOpenChange:t,children:[x.jsx(gT,{asChild:!0,children:x.jsxs(wt,{variant:"outline",side:"bottom",tooltip:"Clear documents",size:"sm",children:[x.jsx(UE,{})," Clear"]})}),x.jsxs(Qg,{className:"sm:max-w-xl",onCloseAutoFocus:a=>a.preventDefault(),children:[x.jsxs(Jg,{children:[x.jsx(ev,{children:"Clear documents"}),x.jsx(tv,{children:"Do you really want to clear all documents?"})]}),x.jsx(wt,{variant:"destructive",onClick:n,children:"YES"})]})]})}function wI(){const e=En.use.health(),[t,n]=w.useState(null),a=w.useCallback(async()=>{try{const s=await vO();s&&s.statuses?n(s):n(null)}catch(s){an.error(`Failed to load documents -`+Sr(s))}},[n]);w.useEffect(()=>{a()},[]);const o=w.useCallback(async()=>{try{const{status:s}=await yO();an.message(s)}catch(s){an.error(`Failed to load documents -`+Sr(s))}},[]);return w.useEffect(()=>{const s=setInterval(async()=>{if(e)try{await a()}catch(c){an.error(`Failed to get scan progress -`+Sr(c))}},5e3);return()=>clearInterval(s)},[e,a]),x.jsxs(hl,{className:"!size-full !rounded-none !border-none",children:[x.jsx(Gu,{children:x.jsx(pl,{className:"text-lg",children:"Document Management"})}),x.jsxs(Fu,{className:"space-y-4",children:[x.jsxs("div",{className:"flex gap-2",children:[x.jsxs(wt,{variant:"outline",onClick:o,side:"bottom",tooltip:"Scan documents",size:"sm",children:[x.jsx(ij,{})," Scan"]}),x.jsx("div",{className:"flex-1"}),x.jsx(xI,{}),x.jsx(bI,{})]}),x.jsxs(hl,{children:[x.jsxs(Gu,{children:[x.jsx(pl,{children:"Uploaded documents"}),x.jsx(Sd,{children:"view the uploaded documents here"})]}),x.jsxs(Fu,{children:[!t&&x.jsx(XU,{title:"No documents uploaded",description:"upload documents to see them here"}),t&&x.jsxs(LT,{children:[x.jsx(zT,{children:x.jsxs(Pm,{children:[x.jsx(Jr,{children:"ID"}),x.jsx(Jr,{children:"Summary"}),x.jsx(Jr,{children:"Status"}),x.jsx(Jr,{children:"Length"}),x.jsx(Jr,{children:"Chunks"}),x.jsx(Jr,{children:"Created"}),x.jsx(Jr,{children:"Updated"}),x.jsx(Jr,{children:"Metadata"})]})}),x.jsx(MT,{className:"text-sm",children:Object.entries(t.statuses).map(([s,c])=>c.map(u=>x.jsxs(Pm,{children:[x.jsx(ea,{className:"truncate font-mono",children:u.id}),x.jsx(ea,{className:"max-w-xs min-w-24 truncate",children:x.jsx(bn,{text:u.content_summary,tooltip:u.content_summary,tooltipClassName:"max-w-none overflow-visible block"})}),x.jsxs(ea,{children:[s==="processed"&&x.jsx("span",{className:"text-green-600",children:"Completed"}),s==="processing"&&x.jsx("span",{className:"text-blue-600",children:"Processing"}),s==="pending"&&x.jsx("span",{className:"text-yellow-600",children:"Pending"}),s==="failed"&&x.jsx("span",{className:"text-red-600",children:"Failed"}),u.error&&x.jsx("span",{className:"ml-2 text-red-500",title:u.error,children:"⚠️"})]}),x.jsx(ea,{children:u.content_length??"-"}),x.jsx(ea,{children:u.chunks_count??"-"}),x.jsx(ea,{className:"truncate",children:new Date(u.created_at).toLocaleString()}),x.jsx(ea,{className:"truncate",children:new Date(u.updated_at).toLocaleString()}),x.jsx(ea,{className:"max-w-xs truncate",children:u.metadata?JSON.stringify(u.metadata):"-"})]},u.id)))})]})]})]})]})]})}function mR(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,a=Object.getOwnPropertySymbols(e);o=u?o=o+U1("0",c-u):o=(o.substring(0,c)||"0")+"."+o.substring(c),n+o}function B1(e,t,n){if(["","-"].indexOf(e)!==-1)return e;var a=(e.indexOf(".")!==-1||n)&&t,o=pv(e),s=o.beforeDecimal,c=o.afterDecimal,u=o.hasNegation,f=parseFloat("0."+(c||"0")),h=c.length<=t?"0."+c:f.toFixed(t),m=h.split("."),g=s;s&&Number(m[0])&&(g=s.split("").reverse().reduce(function(E,_,N){return E.length>N?(Number(E[0])+Number(_)).toString()+E.substring(1,E.length):_+E},m[0]));var y=yR(m[1]||"",t,n),b=u?"-":"",S=a?".":"";return""+b+g+S+y}function Ei(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var n=e.createTextRange();return n.move("character",t),n.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var xR=EI(function(e,t){for(var n=0,a=0,o=e.length,s=t.length;e[n]===t[n]&&nn&&o-a>n;)a++;return{from:{start:n,end:o-a},to:{start:n,end:s-a}}}),AI=function(e,t){var n=Math.min(e.selectionStart,t);return{from:{start:n,end:e.selectionEnd},to:{start:n,end:t}}};function DI(e,t,n){return Math.min(Math.max(e,t),n)}function Jp(e){return Math.max(e.selectionStart,e.selectionEnd)}function kI(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function NI(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function OI(e){var t=e.currentValue,n=e.formattedValue,a=e.currentValueIndex,o=e.formattedValueIndex;return t[a]===n[o]}function jI(e,t,n,a,o,s,c){c===void 0&&(c=OI);var u=o.findIndex(function(k){return k}),f=e.slice(0,u);!t&&!n.startsWith(f)&&(t=f,n=f+n,a=a+f.length);for(var h=n.length,m=e.length,g={},y=new Array(h),b=0;b0&&y[N]===-1;)N--;var A=N===-1||y[N]===-1?0:y[N]+1;return A>C?C:a-A=0&&!n[t];)t--;t===-1&&(t=n.indexOf(!0))}else{for(;t<=o&&!n[t];)t++;t>o&&(t=n.lastIndexOf(!0))}return t===-1&&(t=o),t}function LI(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),n=0,a=t.length;nR.length-c.length||Mq||g>e.length-c.length)&&(I=g),e=e.substring(0,I),e=GI(A?"-"+e:e,o),e=(e.match(FI(S))||[]).join("");var Y=e.indexOf(S);e=e.replace(new RegExp(vR(S),"g"),function(z,j){return j===Y?".":""});var B=pv(e,o),X=B.beforeDecimal,ne=B.afterDecimal,F=B.addNegation;return h.end-h.startH?!1:G>=re.start&&G{const[E,_]=w.useState(y??a),N=w.useCallback(()=>{_(D=>D===void 0?e??1:Math.min(D+(e??1),s))},[e,s]),C=w.useCallback(()=>{_(D=>D===void 0?-(e??1):Math.max(D-(e??1),o))},[e,o]);w.useEffect(()=>{y!==void 0&&_(y)},[y]);const A=D=>{const M=D.floatValue===void 0?void 0:D.floatValue;_(M),c&&c(M)},k=()=>{E!==void 0&&(Es&&(_(s),S.current.value=String(s)))};return x.jsxs("div",{className:"relative flex",children:[x.jsx(VI,{value:E,onValueChange:A,thousandSeparator:t,decimalScale:f,fixedDecimalScale:u,allowNegative:o<0,valueIsNumericString:!0,onBlur:k,max:s,min:o,suffix:m,prefix:g,customInput:D=>x.jsx(Ai,{...D,className:Oe("w-full",h)}),placeholder:n,className:"[appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",getInputRef:S,...b}),x.jsxs("div",{className:"absolute top-0 right-0 bottom-0 flex flex-col",children:[x.jsx(wt,{"aria-label":"Increase value",className:"border-input h-1/2 rounded-l-none rounded-br-none border-b border-l px-2 focus-visible:relative",variant:"outline",onClick:N,disabled:E===s,children:x.jsx(FE,{size:15})}),x.jsx(wt,{"aria-label":"Decrease value",className:"border-input h-1/2 rounded-l-none rounded-tr-none border-b border-l px-2 focus-visible:relative",variant:"outline",onClick:C,disabled:E===o,children:x.jsx(og,{size:15})})]})]})});To.displayName="NumberInput";var qI=[" ","Enter","ArrowUp","ArrowDown"],YI=[" ","Enter"],Nl="Select",[Ad,Dd,WI]=j_(Nl),[Qo,Z6]=Kn(Nl,[WI,Vo]),kd=Vo(),[XI,qa]=Qo(Nl),[KI,ZI]=Qo(Nl),ER=e=>{const{__scopeSelect:t,children:n,open:a,defaultOpen:o,onOpenChange:s,value:c,defaultValue:u,onValueChange:f,dir:h,name:m,autoComplete:g,disabled:y,required:b,form:S}=e,E=kd(t),[_,N]=w.useState(null),[C,A]=w.useState(null),[k,D]=w.useState(!1),M=gd(h),[R=!1,U]=aa({prop:a,defaultProp:o,onChange:s}),[L,I]=aa({prop:c,defaultProp:u,onChange:f}),q=w.useRef(null),Y=_?S||!!_.closest("form"):!0,[B,X]=w.useState(new Set),ne=Array.from(B).map(F=>F.props.value).join(";");return x.jsx(Ag,{...E,children:x.jsxs(XI,{required:b,scope:t,trigger:_,onTriggerChange:N,valueNode:C,onValueNodeChange:A,valueNodeHasChildren:k,onValueNodeHasChildrenChange:D,contentId:on(),value:L,onValueChange:I,open:R,onOpenChange:U,dir:M,triggerPointerDownPosRef:q,disabled:y,children:[x.jsx(Ad.Provider,{scope:t,children:x.jsx(KI,{scope:e.__scopeSelect,onNativeOptionAdd:w.useCallback(F=>{X(z=>new Set(z).add(F))},[]),onNativeOptionRemove:w.useCallback(F=>{X(z=>{const j=new Set(z);return j.delete(F),j})},[]),children:n})}),Y?x.jsxs(WR,{"aria-hidden":!0,required:b,tabIndex:-1,name:m,autoComplete:g,value:L,onChange:F=>I(F.target.value),disabled:y,form:S,children:[L===void 0?x.jsx("option",{value:""}):null,Array.from(B)]},ne):null]})})};ER.displayName=Nl;var SR="SelectTrigger",_R=w.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:a=!1,...o}=e,s=kd(n),c=qa(SR,n),u=c.disabled||a,f=nt(t,c.onTriggerChange),h=Dd(n),m=w.useRef("touch"),[g,y,b]=XR(E=>{const _=h().filter(A=>!A.disabled),N=_.find(A=>A.value===c.value),C=KR(_,E,N);C!==void 0&&c.onValueChange(C.value)}),S=E=>{u||(c.onOpenChange(!0),b()),E&&(c.triggerPointerDownPosRef.current={x:Math.round(E.pageX),y:Math.round(E.pageY)})};return x.jsx(cd,{asChild:!0,...s,children:x.jsx(Ie.button,{type:"button",role:"combobox","aria-controls":c.contentId,"aria-expanded":c.open,"aria-required":c.required,"aria-autocomplete":"none",dir:c.dir,"data-state":c.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":YR(c.value)?"":void 0,...o,ref:f,onClick:Be(o.onClick,E=>{E.currentTarget.focus(),m.current!=="mouse"&&S(E)}),onPointerDown:Be(o.onPointerDown,E=>{m.current=E.pointerType;const _=E.target;_.hasPointerCapture(E.pointerId)&&_.releasePointerCapture(E.pointerId),E.button===0&&E.ctrlKey===!1&&E.pointerType==="mouse"&&(S(E),E.preventDefault())}),onKeyDown:Be(o.onKeyDown,E=>{const _=g.current!=="";!(E.ctrlKey||E.altKey||E.metaKey)&&E.key.length===1&&y(E.key),!(_&&E.key===" ")&&qI.includes(E.key)&&(S(),E.preventDefault())})})})});_R.displayName=SR;var CR="SelectValue",TR=w.forwardRef((e,t)=>{const{__scopeSelect:n,className:a,style:o,children:s,placeholder:c="",...u}=e,f=qa(CR,n),{onValueNodeHasChildrenChange:h}=f,m=s!==void 0,g=nt(t,f.onValueNodeChange);return sn(()=>{h(m)},[h,m]),x.jsx(Ie.span,{...u,ref:g,style:{pointerEvents:"none"},children:YR(f.value)?x.jsx(x.Fragment,{children:c}):s})});TR.displayName=CR;var QI="SelectIcon",RR=w.forwardRef((e,t)=>{const{__scopeSelect:n,children:a,...o}=e;return x.jsx(Ie.span,{"aria-hidden":!0,...o,ref:t,children:a||"▼"})});RR.displayName=QI;var JI="SelectPortal",AR=e=>x.jsx(td,{asChild:!0,...e});AR.displayName=JI;var Ni="SelectContent",DR=w.forwardRef((e,t)=>{const n=qa(Ni,e.__scopeSelect),[a,o]=w.useState();if(sn(()=>{o(new DocumentFragment)},[]),!n.open){const s=a;return s?xl.createPortal(x.jsx(kR,{scope:e.__scopeSelect,children:x.jsx(Ad.Slot,{scope:e.__scopeSelect,children:x.jsx("div",{children:e.children})})}),s):null}return x.jsx(NR,{...e,ref:t})});DR.displayName=Ni;var sr=10,[kR,Ya]=Qo(Ni),e6="SelectContentImpl",NR=w.forwardRef((e,t)=>{const{__scopeSelect:n,position:a="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:c,side:u,sideOffset:f,align:h,alignOffset:m,arrowPadding:g,collisionBoundary:y,collisionPadding:b,sticky:S,hideWhenDetached:E,avoidCollisions:_,...N}=e,C=qa(Ni,n),[A,k]=w.useState(null),[D,M]=w.useState(null),R=nt(t,ie=>k(ie)),[U,L]=w.useState(null),[I,q]=w.useState(null),Y=Dd(n),[B,X]=w.useState(!1),ne=w.useRef(!1);w.useEffect(()=>{if(A)return cg(A)},[A]),lg();const F=w.useCallback(ie=>{const[oe,...Ce]=Y().map(be=>be.ref.current),[he]=Ce.slice(-1),Se=document.activeElement;for(const be of ie)if(be===Se||(be==null||be.scrollIntoView({block:"nearest"}),be===oe&&D&&(D.scrollTop=0),be===he&&D&&(D.scrollTop=D.scrollHeight),be==null||be.focus(),document.activeElement!==Se))return},[Y,D]),z=w.useCallback(()=>F([U,A]),[F,U,A]);w.useEffect(()=>{B&&z()},[B,z]);const{onOpenChange:j,triggerPointerDownPosRef:K}=C;w.useEffect(()=>{if(A){let ie={x:0,y:0};const oe=he=>{var Se,be;ie={x:Math.abs(Math.round(he.pageX)-(((Se=K.current)==null?void 0:Se.x)??0)),y:Math.abs(Math.round(he.pageY)-(((be=K.current)==null?void 0:be.y)??0))}},Ce=he=>{ie.x<=10&&ie.y<=10?he.preventDefault():A.contains(he.target)||j(!1),document.removeEventListener("pointermove",oe),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",oe),document.addEventListener("pointerup",Ce,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",oe),document.removeEventListener("pointerup",Ce,{capture:!0})}}},[A,j,K]),w.useEffect(()=>{const ie=()=>j(!1);return window.addEventListener("blur",ie),window.addEventListener("resize",ie),()=>{window.removeEventListener("blur",ie),window.removeEventListener("resize",ie)}},[j]);const[G,H]=XR(ie=>{const oe=Y().filter(Se=>!Se.disabled),Ce=oe.find(Se=>Se.ref.current===document.activeElement),he=KR(oe,ie,Ce);he&&setTimeout(()=>he.ref.current.focus())}),O=w.useCallback((ie,oe,Ce)=>{const he=!ne.current&&!Ce;(C.value!==void 0&&C.value===oe||he)&&(L(ie),he&&(ne.current=!0))},[C.value]),$=w.useCallback(()=>A==null?void 0:A.focus(),[A]),W=w.useCallback((ie,oe,Ce)=>{const he=!ne.current&&!Ce;(C.value!==void 0&&C.value===oe||he)&&q(ie)},[C.value]),re=a==="popper"?Vm:OR,de=re===Vm?{side:u,sideOffset:f,align:h,alignOffset:m,arrowPadding:g,collisionBoundary:y,collisionPadding:b,sticky:S,hideWhenDetached:E,avoidCollisions:_}:{};return x.jsx(kR,{scope:n,content:A,viewport:D,onViewportChange:M,itemRefCallback:O,selectedItem:U,onItemLeave:$,itemTextRefCallback:W,focusSelectedItem:z,selectedItemText:I,position:a,isPositioned:B,searchRef:G,children:x.jsx(rd,{as:Ba,allowPinchZoom:!0,children:x.jsx(ed,{asChild:!0,trapped:C.open,onMountAutoFocus:ie=>{ie.preventDefault()},onUnmountAutoFocus:Be(o,ie=>{var oe;(oe=C.trigger)==null||oe.focus({preventScroll:!0}),ie.preventDefault()}),children:x.jsx(wl,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:ie=>ie.preventDefault(),onDismiss:()=>C.onOpenChange(!1),children:x.jsx(re,{role:"listbox",id:C.contentId,"data-state":C.open?"open":"closed",dir:C.dir,onContextMenu:ie=>ie.preventDefault(),...N,...de,onPlaced:()=>X(!0),ref:R,style:{display:"flex",flexDirection:"column",outline:"none",...N.style},onKeyDown:Be(N.onKeyDown,ie=>{const oe=ie.ctrlKey||ie.altKey||ie.metaKey;if(ie.key==="Tab"&&ie.preventDefault(),!oe&&ie.key.length===1&&H(ie.key),["ArrowUp","ArrowDown","Home","End"].includes(ie.key)){let he=Y().filter(Se=>!Se.disabled).map(Se=>Se.ref.current);if(["ArrowUp","End"].includes(ie.key)&&(he=he.slice().reverse()),["ArrowUp","ArrowDown"].includes(ie.key)){const Se=ie.target,be=he.indexOf(Se);he=he.slice(be+1)}setTimeout(()=>F(he)),ie.preventDefault()}})})})})})})});NR.displayName=e6;var t6="SelectItemAlignedPosition",OR=w.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:a,...o}=e,s=qa(Ni,n),c=Ya(Ni,n),[u,f]=w.useState(null),[h,m]=w.useState(null),g=nt(t,R=>m(R)),y=Dd(n),b=w.useRef(!1),S=w.useRef(!0),{viewport:E,selectedItem:_,selectedItemText:N,focusSelectedItem:C}=c,A=w.useCallback(()=>{if(s.trigger&&s.valueNode&&u&&h&&E&&_&&N){const R=s.trigger.getBoundingClientRect(),U=h.getBoundingClientRect(),L=s.valueNode.getBoundingClientRect(),I=N.getBoundingClientRect();if(s.dir!=="rtl"){const Se=I.left-U.left,be=L.left-Se,Le=R.left-be,Te=R.width+Le,ye=Math.max(Te,U.width),J=window.innerWidth-sr,le=Hm(be,[sr,Math.max(sr,J-ye)]);u.style.minWidth=Te+"px",u.style.left=le+"px"}else{const Se=U.right-I.right,be=window.innerWidth-L.right-Se,Le=window.innerWidth-R.right-be,Te=R.width+Le,ye=Math.max(Te,U.width),J=window.innerWidth-sr,le=Hm(be,[sr,Math.max(sr,J-ye)]);u.style.minWidth=Te+"px",u.style.right=le+"px"}const q=y(),Y=window.innerHeight-sr*2,B=E.scrollHeight,X=window.getComputedStyle(h),ne=parseInt(X.borderTopWidth,10),F=parseInt(X.paddingTop,10),z=parseInt(X.borderBottomWidth,10),j=parseInt(X.paddingBottom,10),K=ne+F+B+j+z,G=Math.min(_.offsetHeight*5,K),H=window.getComputedStyle(E),O=parseInt(H.paddingTop,10),$=parseInt(H.paddingBottom,10),W=R.top+R.height/2-sr,re=Y-W,de=_.offsetHeight/2,ie=_.offsetTop+de,oe=ne+F+ie,Ce=K-oe;if(oe<=W){const Se=q.length>0&&_===q[q.length-1].ref.current;u.style.bottom="0px";const be=h.clientHeight-E.offsetTop-E.offsetHeight,Le=Math.max(re,de+(Se?$:0)+be+z),Te=oe+Le;u.style.height=Te+"px"}else{const Se=q.length>0&&_===q[0].ref.current;u.style.top="0px";const Le=Math.max(W,ne+E.offsetTop+(Se?O:0)+de)+Ce;u.style.height=Le+"px",E.scrollTop=oe-W+E.offsetTop}u.style.margin=`${sr}px 0`,u.style.minHeight=G+"px",u.style.maxHeight=Y+"px",a==null||a(),requestAnimationFrame(()=>b.current=!0)}},[y,s.trigger,s.valueNode,u,h,E,_,N,s.dir,a]);sn(()=>A(),[A]);const[k,D]=w.useState();sn(()=>{h&&D(window.getComputedStyle(h).zIndex)},[h]);const M=w.useCallback(R=>{R&&S.current===!0&&(A(),C==null||C(),S.current=!1)},[A,C]);return x.jsx(r6,{scope:n,contentWrapper:u,shouldExpandOnScrollRef:b,onScrollButtonChange:M,children:x.jsx("div",{ref:f,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k},children:x.jsx(Ie.div,{...o,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});OR.displayName=t6;var n6="SelectPopperPosition",Vm=w.forwardRef((e,t)=>{const{__scopeSelect:n,align:a="start",collisionPadding:o=sr,...s}=e,c=kd(n);return x.jsx(Dg,{...c,...s,ref:t,align:a,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Vm.displayName=n6;var[r6,mv]=Qo(Ni,{}),qm="SelectViewport",jR=w.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:a,...o}=e,s=Ya(qm,n),c=mv(qm,n),u=nt(t,s.onViewportChange),f=w.useRef(0);return x.jsxs(x.Fragment,{children:[x.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),x.jsx(Ad.Slot,{scope:n,children:x.jsx(Ie.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:Be(o.onScroll,h=>{const m=h.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:y}=c;if(y!=null&&y.current&&g){const b=Math.abs(f.current-m.scrollTop);if(b>0){const S=window.innerHeight-sr*2,E=parseFloat(g.style.minHeight),_=parseFloat(g.style.height),N=Math.max(E,_);if(N0?k:0,g.style.justifyContent="flex-end")}}}f.current=m.scrollTop})})})]})});jR.displayName=qm;var LR="SelectGroup",[a6,i6]=Qo(LR),zR=w.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e,o=on();return x.jsx(a6,{scope:n,id:o,children:x.jsx(Ie.div,{role:"group","aria-labelledby":o,...a,ref:t})})});zR.displayName=LR;var MR="SelectLabel",PR=w.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e,o=i6(MR,n);return x.jsx(Ie.div,{id:o.id,...a,ref:t})});PR.displayName=MR;var qu="SelectItem",[o6,GR]=Qo(qu),FR=w.forwardRef((e,t)=>{const{__scopeSelect:n,value:a,disabled:o=!1,textValue:s,...c}=e,u=qa(qu,n),f=Ya(qu,n),h=u.value===a,[m,g]=w.useState(s??""),[y,b]=w.useState(!1),S=nt(t,C=>{var A;return(A=f.itemRefCallback)==null?void 0:A.call(f,C,a,o)}),E=on(),_=w.useRef("touch"),N=()=>{o||(u.onValueChange(a),u.onOpenChange(!1))};if(a==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return x.jsx(o6,{scope:n,value:a,disabled:o,textId:E,isSelected:h,onItemTextChange:w.useCallback(C=>{g(A=>A||((C==null?void 0:C.textContent)??"").trim())},[]),children:x.jsx(Ad.ItemSlot,{scope:n,value:a,disabled:o,textValue:m,children:x.jsx(Ie.div,{role:"option","aria-labelledby":E,"data-highlighted":y?"":void 0,"aria-selected":h&&y,"data-state":h?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...c,ref:S,onFocus:Be(c.onFocus,()=>b(!0)),onBlur:Be(c.onBlur,()=>b(!1)),onClick:Be(c.onClick,()=>{_.current!=="mouse"&&N()}),onPointerUp:Be(c.onPointerUp,()=>{_.current==="mouse"&&N()}),onPointerDown:Be(c.onPointerDown,C=>{_.current=C.pointerType}),onPointerMove:Be(c.onPointerMove,C=>{var A;_.current=C.pointerType,o?(A=f.onItemLeave)==null||A.call(f):_.current==="mouse"&&C.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Be(c.onPointerLeave,C=>{var A;C.currentTarget===document.activeElement&&((A=f.onItemLeave)==null||A.call(f))}),onKeyDown:Be(c.onKeyDown,C=>{var k;((k=f.searchRef)==null?void 0:k.current)!==""&&C.key===" "||(YI.includes(C.key)&&N(),C.key===" "&&C.preventDefault())})})})})});FR.displayName=qu;var il="SelectItemText",UR=w.forwardRef((e,t)=>{const{__scopeSelect:n,className:a,style:o,...s}=e,c=qa(il,n),u=Ya(il,n),f=GR(il,n),h=ZI(il,n),[m,g]=w.useState(null),y=nt(t,N=>g(N),f.onItemTextChange,N=>{var C;return(C=u.itemTextRefCallback)==null?void 0:C.call(u,N,f.value,f.disabled)}),b=m==null?void 0:m.textContent,S=w.useMemo(()=>x.jsx("option",{value:f.value,disabled:f.disabled,children:b},f.value),[f.disabled,f.value,b]),{onNativeOptionAdd:E,onNativeOptionRemove:_}=h;return sn(()=>(E(S),()=>_(S)),[E,_,S]),x.jsxs(x.Fragment,{children:[x.jsx(Ie.span,{id:f.textId,...s,ref:y}),f.isSelected&&c.valueNode&&!c.valueNodeHasChildren?xl.createPortal(s.children,c.valueNode):null]})});UR.displayName=il;var BR="SelectItemIndicator",IR=w.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e;return GR(BR,n).isSelected?x.jsx(Ie.span,{"aria-hidden":!0,...a,ref:t}):null});IR.displayName=BR;var Ym="SelectScrollUpButton",HR=w.forwardRef((e,t)=>{const n=Ya(Ym,e.__scopeSelect),a=mv(Ym,e.__scopeSelect),[o,s]=w.useState(!1),c=nt(t,a.onScrollButtonChange);return sn(()=>{if(n.viewport&&n.isPositioned){let u=function(){const h=f.scrollTop>0;s(h)};const f=n.viewport;return u(),f.addEventListener("scroll",u),()=>f.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),o?x.jsx(VR,{...e,ref:c,onAutoScroll:()=>{const{viewport:u,selectedItem:f}=n;u&&f&&(u.scrollTop=u.scrollTop-f.offsetHeight)}}):null});HR.displayName=Ym;var Wm="SelectScrollDownButton",$R=w.forwardRef((e,t)=>{const n=Ya(Wm,e.__scopeSelect),a=mv(Wm,e.__scopeSelect),[o,s]=w.useState(!1),c=nt(t,a.onScrollButtonChange);return sn(()=>{if(n.viewport&&n.isPositioned){let u=function(){const h=f.scrollHeight-f.clientHeight,m=Math.ceil(f.scrollTop)f.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),o?x.jsx(VR,{...e,ref:c,onAutoScroll:()=>{const{viewport:u,selectedItem:f}=n;u&&f&&(u.scrollTop=u.scrollTop+f.offsetHeight)}}):null});$R.displayName=Wm;var VR=w.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:a,...o}=e,s=Ya("SelectScrollButton",n),c=w.useRef(null),u=Dd(n),f=w.useCallback(()=>{c.current!==null&&(window.clearInterval(c.current),c.current=null)},[]);return w.useEffect(()=>()=>f(),[f]),sn(()=>{var m;const h=u().find(g=>g.ref.current===document.activeElement);(m=h==null?void 0:h.ref.current)==null||m.scrollIntoView({block:"nearest"})},[u]),x.jsx(Ie.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:Be(o.onPointerDown,()=>{c.current===null&&(c.current=window.setInterval(a,50))}),onPointerMove:Be(o.onPointerMove,()=>{var h;(h=s.onItemLeave)==null||h.call(s),c.current===null&&(c.current=window.setInterval(a,50))}),onPointerLeave:Be(o.onPointerLeave,()=>{f()})})}),s6="SelectSeparator",qR=w.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e;return x.jsx(Ie.div,{"aria-hidden":!0,...a,ref:t})});qR.displayName=s6;var Xm="SelectArrow",l6=w.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e,o=kd(n),s=qa(Xm,n),c=Ya(Xm,n);return s.open&&c.position==="popper"?x.jsx(kg,{...o,...a,ref:t}):null});l6.displayName=Xm;function YR(e){return e===""||e===void 0}var WR=w.forwardRef((e,t)=>{const{value:n,...a}=e,o=w.useRef(null),s=nt(t,o),c=bT(n);return w.useEffect(()=>{const u=o.current,f=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(f,"value").set;if(c!==n&&m){const g=new Event("change",{bubbles:!0});m.call(u,n),u.dispatchEvent(g)}},[c,n]),x.jsx(Ng,{asChild:!0,children:x.jsx("select",{...a,ref:s,defaultValue:n})})});WR.displayName="BubbleSelect";function XR(e){const t=Zt(e),n=w.useRef(""),a=w.useRef(0),o=w.useCallback(c=>{const u=n.current+c;t(u),function f(h){n.current=h,window.clearTimeout(a.current),h!==""&&(a.current=window.setTimeout(()=>f(""),1e3))}(u)},[t]),s=w.useCallback(()=>{n.current="",window.clearTimeout(a.current)},[]);return w.useEffect(()=>()=>window.clearTimeout(a.current),[]),[n,o,s]}function KR(e,t,n){const o=t.length>1&&Array.from(t).every(h=>h===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let c=c6(e,Math.max(s,0));o.length===1&&(c=c.filter(h=>h!==n));const f=c.find(h=>h.textValue.toLowerCase().startsWith(o.toLowerCase()));return f!==n?f:void 0}function c6(e,t){return e.map((n,a)=>e[(t+a)%e.length])}var u6=ER,ZR=_R,d6=TR,f6=RR,h6=AR,QR=DR,p6=jR,m6=zR,JR=PR,eA=FR,g6=UR,v6=IR,tA=HR,nA=$R,rA=qR;const $1=u6,V1=m6,q1=d6,Km=w.forwardRef(({className:e,children:t,...n},a)=>x.jsxs(ZR,{ref:a,className:Oe("border-input bg-background ring-offset-background placeholder:text-muted-foreground focus:ring-ring flex h-10 w-full items-center justify-between rounded-md border px-3 py-2 text-sm focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,x.jsx(f6,{asChild:!0,children:x.jsx(og,{className:"h-4 w-4 opacity-50"})})]}));Km.displayName=ZR.displayName;const aA=w.forwardRef(({className:e,...t},n)=>x.jsx(tA,{ref:n,className:Oe("flex cursor-default items-center justify-center py-1",e),...t,children:x.jsx(FE,{className:"h-4 w-4"})}));aA.displayName=tA.displayName;const iA=w.forwardRef(({className:e,...t},n)=>x.jsx(nA,{ref:n,className:Oe("flex cursor-default items-center justify-center py-1",e),...t,children:x.jsx(og,{className:"h-4 w-4"})}));iA.displayName=nA.displayName;const Zm=w.forwardRef(({className:e,children:t,position:n="popper",...a},o)=>x.jsx(h6,{children:x.jsxs(QR,{ref:o,className:Oe("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border shadow-md",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...a,children:[x.jsx(aA,{}),x.jsx(p6,{className:Oe("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),x.jsx(iA,{})]})}));Zm.displayName=QR.displayName;const y6=w.forwardRef(({className:e,...t},n)=>x.jsx(JR,{ref:n,className:Oe("py-1.5 pr-2 pl-8 text-sm font-semibold",e),...t}));y6.displayName=JR.displayName;const ta=w.forwardRef(({className:e,children:t,...n},a)=>x.jsxs(eA,{ref:a,className:Oe("focus:bg-accent focus:text-accent-foreground relative flex w-full cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[x.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:x.jsx(v6,{children:x.jsx(ig,{className:"h-4 w-4"})})}),x.jsx(g6,{children:t})]}));ta.displayName=eA.displayName;const b6=w.forwardRef(({className:e,...t},n)=>x.jsx(rA,{ref:n,className:Oe("bg-muted -mx-1 my-1 h-px",e),...t}));b6.displayName=rA.displayName;function x6(){var n,a;const e=Ye(o=>o.querySettings),t=w.useCallback((o,s)=>{Ye.getState().updateQuerySettings({[o]:s})},[]);return x.jsxs(hl,{className:"flex shrink-0 flex-col",children:[x.jsxs(Gu,{className:"px-4 pt-4 pb-2",children:[x.jsx(pl,{children:"Parameters"}),x.jsx(Sd,{children:"Configure your query parameters"})]}),x.jsx(Fu,{className:"m-0 flex grow flex-col p-0 text-xs",children:x.jsx("div",{className:"relative size-full",children:x.jsxs("div",{className:"absolute inset-0 flex flex-col gap-2 overflow-auto px-2",children:[x.jsxs(x.Fragment,{children:[x.jsx(bn,{className:"ml-1",text:"Query Mode",tooltip:"Select the retrieval strategy:\\n• Naive: Basic search without advanced techniques\\n• Local: Context-dependent information retrieval\\n• Global: Utilizes global knowledge base\\n• Hybrid: Combines local and global retrieval\\n• Mix: Integrates knowledge graph with vector retrieval",side:"left"}),x.jsxs($1,{value:e.mode,onValueChange:o=>t("mode",o),children:[x.jsx(Km,{className:"hover:bg-primary/5 h-9 cursor-pointer focus:ring-0 focus:ring-offset-0 focus:outline-0 active:right-0",children:x.jsx(q1,{})}),x.jsx(Zm,{children:x.jsxs(V1,{children:[x.jsx(ta,{value:"naive",children:"Naive"}),x.jsx(ta,{value:"local",children:"Local"}),x.jsx(ta,{value:"global",children:"Global"}),x.jsx(ta,{value:"hybrid",children:"Hybrid"}),x.jsx(ta,{value:"mix",children:"Mix"})]})})]})]}),x.jsxs(x.Fragment,{children:[x.jsx(bn,{className:"ml-1",text:"Response Format",tooltip:"Defines the response format. Examples:\\n• Multiple Paragraphs\\n• Single Paragraph\\n• Bullet Points",side:"left"}),x.jsxs($1,{value:e.response_type,onValueChange:o=>t("response_type",o),children:[x.jsx(Km,{className:"hover:bg-primary/5 h-9 cursor-pointer focus:ring-0 focus:ring-offset-0 focus:outline-0 active:right-0",children:x.jsx(q1,{})}),x.jsx(Zm,{children:x.jsxs(V1,{children:[x.jsx(ta,{value:"Multiple Paragraphs",children:"Multiple Paragraphs"}),x.jsx(ta,{value:"Single Paragraph",children:"Single Paragraph"}),x.jsx(ta,{value:"Bullet Points",children:"Bullet Points"})]})})]})]}),x.jsxs(x.Fragment,{children:[x.jsx(bn,{className:"ml-1",text:"Top K Results",tooltip:"Number of top items to retrieve. Represents entities in 'local' mode and relationships in 'global' mode",side:"left"}),x.jsx(To,{id:"top_k",stepper:1,value:e.top_k,onValueChange:o=>t("top_k",o),min:1,placeholder:"Number of results"})]}),x.jsxs(x.Fragment,{children:[x.jsxs(x.Fragment,{children:[x.jsx(bn,{className:"ml-1",text:"Max Tokens for Text Unit",tooltip:"Maximum number of tokens allowed for each retrieved text chunk",side:"left"}),x.jsx(To,{id:"max_token_for_text_unit",stepper:500,value:e.max_token_for_text_unit,onValueChange:o=>t("max_token_for_text_unit",o),min:1,placeholder:"Max tokens for text unit"})]}),x.jsxs(x.Fragment,{children:[x.jsx(bn,{text:"Max Tokens for Global Context",tooltip:"Maximum number of tokens allocated for relationship descriptions in global retrieval",side:"left"}),x.jsx(To,{id:"max_token_for_global_context",stepper:500,value:e.max_token_for_global_context,onValueChange:o=>t("max_token_for_global_context",o),min:1,placeholder:"Max tokens for global context"})]}),x.jsxs(x.Fragment,{children:[x.jsx(bn,{className:"ml-1",text:"Max Tokens for Local Context",tooltip:"Maximum number of tokens allocated for entity descriptions in local retrieval",side:"left"}),x.jsx(To,{id:"max_token_for_local_context",stepper:500,value:e.max_token_for_local_context,onValueChange:o=>t("max_token_for_local_context",o),min:1,placeholder:"Max tokens for local context"})]})]}),x.jsxs(x.Fragment,{children:[x.jsx(bn,{className:"ml-1",text:"History Turns",tooltip:"Number of complete conversation turns (user-assistant pairs) to consider in the response context",side:"left"}),x.jsx(To,{className:"!border-input",id:"history_turns",stepper:1,type:"text",value:e.history_turns,onValueChange:o=>t("history_turns",o),min:0,placeholder:"Number of history turns"})]}),x.jsxs(x.Fragment,{children:[x.jsxs(x.Fragment,{children:[x.jsx(bn,{className:"ml-1",text:"High-Level Keywords",tooltip:"List of high-level keywords to prioritize in retrieval. Separate with commas",side:"left"}),x.jsx(Ai,{id:"hl_keywords",type:"text",value:(n=e.hl_keywords)==null?void 0:n.join(", "),onChange:o=>{const s=o.target.value.split(",").map(c=>c.trim()).filter(c=>c!=="");t("hl_keywords",s)},placeholder:"Enter keywords"})]}),x.jsxs(x.Fragment,{children:[x.jsx(bn,{className:"ml-1",text:"Low-Level Keywords",tooltip:"List of low-level keywords to refine retrieval focus. Separate with commas",side:"left"}),x.jsx(Ai,{id:"ll_keywords",type:"text",value:(a=e.ll_keywords)==null?void 0:a.join(", "),onChange:o=>{const s=o.target.value.split(",").map(c=>c.trim()).filter(c=>c!=="");t("ll_keywords",s)},placeholder:"Enter keywords"})]})]}),x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(bn,{className:"ml-1",text:"Only Need Context",tooltip:"If True, only returns the retrieved context without generating a response",side:"left"}),x.jsx("div",{className:"grow"}),x.jsx(sl,{className:"mr-1 cursor-pointer",id:"only_need_context",checked:e.only_need_context,onCheckedChange:o=>t("only_need_context",o)})]}),x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(bn,{className:"ml-1",text:"Only Need Prompt",tooltip:"If True, only returns the generated prompt without producing a response",side:"left"}),x.jsx("div",{className:"grow"}),x.jsx(sl,{className:"mr-1 cursor-pointer",id:"only_need_prompt",checked:e.only_need_prompt,onCheckedChange:o=>t("only_need_prompt",o)})]}),x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(bn,{className:"ml-1",text:"Stream Response",tooltip:"If True, enables streaming output for real-time responses",side:"left"}),x.jsx("div",{className:"grow"}),x.jsx(sl,{className:"mr-1 cursor-pointer",id:"stream",checked:e.stream,onCheckedChange:o=>t("stream",o)})]})]})]})})})]})}function w6(){const[e,t]=w.useState(()=>Ye.getState().retrievalHistory||[]),[n,a]=w.useState(""),[o,s]=w.useState(!1),c=w.useRef(null),u=w.useCallback(()=>{var g;(g=c.current)==null||g.scrollIntoView({behavior:"smooth"})},[]),f=w.useCallback(async g=>{if(g.preventDefault(),!n.trim()||o)return;const y={content:n,role:"user"},b={content:"",role:"assistant"},S=[...e];t([...S,y,b]),a(""),s(!0);const E=C=>{b.content+=C,t(A=>{const k=[...A],D=k[k.length-1];return D.role==="assistant"&&(D.content=b.content),k})},_=Ye.getState(),N={..._.querySettings,query:y.content,conversation_history:S};try{if(_.querySettings.stream)await xO(N,E);else{const C=await bO(N);E(C.response)}}catch(C){E(`Error: Failed to get response -${Sr(C)}`)}finally{s(!1),Ye.getState().setRetrievalHistory([...S,y,b])}},[n,o,e,t]),h=sv(e,100);w.useEffect(()=>u(),[h,u]);const m=w.useCallback(()=>{t([]),Ye.getState().setRetrievalHistory([])},[t]);return x.jsxs("div",{className:"flex size-full gap-2 px-2 pb-12",children:[x.jsxs("div",{className:"flex grow flex-col gap-4",children:[x.jsx("div",{className:"relative grow",children:x.jsx("div",{className:"bg-primary-foreground/60 absolute inset-0 flex flex-col overflow-auto rounded-lg border p-2",children:x.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-2",children:[e.length===0?x.jsx("div",{className:"text-muted-foreground flex h-full items-center justify-center text-lg",children:"Start a retrieval by typing your query below"}):e.map((g,y)=>x.jsx("div",{className:`flex ${g.role==="user"?"justify-end":"justify-start"}`,children:x.jsxs("div",{className:`max-w-[80%] rounded-lg px-4 py-2 ${g.role==="user"?"bg-primary text-primary-foreground":"bg-muted"}`,children:[x.jsx("pre",{className:"break-words whitespace-pre-wrap",children:g.content}),g.content.length===0&&x.jsx(YO,{className:"animate-spin duration-2000"})]})},y)),x.jsx("div",{ref:c,className:"pb-1"})]})})}),x.jsxs("form",{onSubmit:f,className:"flex shrink-0 items-center gap-2",children:[x.jsxs(wt,{type:"button",variant:"outline",onClick:m,disabled:o,size:"sm",children:[x.jsx(UE,{}),"Clear"]}),x.jsx(Ai,{className:"flex-1",value:n,onChange:g=>a(g.target.value),placeholder:"Type your query...",disabled:o}),x.jsxs(wt,{type:"submit",variant:"default",disabled:o,size:"sm",children:[x.jsx(cj,{}),"Send"]})]})]}),x.jsx(x6,{})]})}function E6(){return x.jsx("iframe",{src:iE+"/docs",className:"size-full"})}function S6(){const e=En.use.message(),t=Ye.use.enableHealthCheck(),[n]=w.useState(()=>Ye.getState().currentTab),[a,o]=w.useState(!1);w.useEffect(()=>{if(!t)return;En.getState().check();const c=setInterval(async()=>{await En.getState().check()},Ok*1e3);return()=>clearInterval(c)},[t]);const s=w.useCallback(c=>Ye.getState().setCurrentTab(c),[]);return w.useEffect(()=>{if(e&&(e.includes(ME)||e.includes(PE))){o(!0);return}o(!1)},[e,o]),x.jsx(Mk,{children:x.jsxs("main",{className:"flex h-screen w-screen overflow-x-hidden",children:[x.jsxs(GP,{defaultValue:n,className:"!m-0 flex grow flex-col !p-0",onValueChange:s,children:[x.jsx(UP,{}),x.jsxs("div",{className:"relative grow",children:[x.jsx(rl,{value:"documents",className:"absolute top-0 right-0 bottom-0 left-0",children:x.jsx(wI,{})}),x.jsx(rl,{value:"knowledge-graph",className:"absolute top-0 right-0 bottom-0 left-0",children:x.jsx(VU,{})}),x.jsx(rl,{value:"retrieval",className:"absolute top-0 right-0 bottom-0 left-0",children:x.jsx(w6,{})}),x.jsx(rl,{value:"api",className:"absolute top-0 right-0 bottom-0 left-0",children:x.jsx(E6,{})})]})]}),t&&x.jsx(xP,{}),e!==null&&!a&&x.jsx(Ej,{}),a&&x.jsx(oP,{}),x.jsx(iP,{})]})})}DD.createRoot(document.getElementById("root")).render(x.jsx(w.StrictMode,{children:x.jsx(S6,{})})); diff --git a/lightrag/api/webui/assets/index-CLgSwrjG.css b/lightrag/api/webui/assets/index-CLgSwrjG.css deleted file mode 100644 index 0a63c408..00000000 --- a/lightrag/api/webui/assets/index-CLgSwrjG.css +++ /dev/null @@ -1 +0,0 @@ -/*! tailwindcss v4.0.6 | MIT License | https://tailwindcss.com */@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-serif:ui-serif,Georgia,Cambria,"Times New Roman",Times,serif;--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-50:oklch(.971 .013 17.38);--color-red-100:oklch(.936 .032 17.717);--color-red-200:oklch(.885 .062 18.334);--color-red-300:oklch(.808 .114 19.571);--color-red-400:oklch(.704 .191 22.216);--color-red-500:oklch(.637 .237 25.331);--color-red-600:oklch(.577 .245 27.325);--color-red-700:oklch(.505 .213 27.518);--color-red-800:oklch(.444 .177 26.899);--color-red-900:oklch(.396 .141 25.723);--color-red-950:oklch(.258 .092 26.042);--color-orange-50:oklch(.98 .016 73.684);--color-orange-100:oklch(.954 .038 75.164);--color-orange-200:oklch(.901 .076 70.697);--color-orange-300:oklch(.837 .128 66.29);--color-orange-400:oklch(.75 .183 55.934);--color-orange-500:oklch(.705 .213 47.604);--color-orange-600:oklch(.646 .222 41.116);--color-orange-700:oklch(.553 .195 38.402);--color-orange-800:oklch(.47 .157 37.304);--color-orange-900:oklch(.408 .123 38.172);--color-orange-950:oklch(.266 .079 36.259);--color-amber-50:oklch(.987 .022 95.277);--color-amber-100:oklch(.962 .059 95.617);--color-amber-200:oklch(.924 .12 95.746);--color-amber-300:oklch(.879 .169 91.605);--color-amber-400:oklch(.828 .189 84.429);--color-amber-500:oklch(.769 .188 70.08);--color-amber-600:oklch(.666 .179 58.318);--color-amber-700:oklch(.555 .163 48.998);--color-amber-800:oklch(.473 .137 46.201);--color-amber-900:oklch(.414 .112 45.904);--color-amber-950:oklch(.279 .077 45.635);--color-yellow-50:oklch(.987 .026 102.212);--color-yellow-100:oklch(.973 .071 103.193);--color-yellow-200:oklch(.945 .129 101.54);--color-yellow-300:oklch(.905 .182 98.111);--color-yellow-400:oklch(.852 .199 91.936);--color-yellow-500:oklch(.795 .184 86.047);--color-yellow-600:oklch(.681 .162 75.834);--color-yellow-700:oklch(.554 .135 66.442);--color-yellow-800:oklch(.476 .114 61.907);--color-yellow-900:oklch(.421 .095 57.708);--color-yellow-950:oklch(.286 .066 53.813);--color-lime-50:oklch(.986 .031 120.757);--color-lime-100:oklch(.967 .067 122.328);--color-lime-200:oklch(.938 .127 124.321);--color-lime-300:oklch(.897 .196 126.665);--color-lime-400:oklch(.841 .238 128.85);--color-lime-500:oklch(.768 .233 130.85);--color-lime-600:oklch(.648 .2 131.684);--color-lime-700:oklch(.532 .157 131.589);--color-lime-800:oklch(.453 .124 130.933);--color-lime-900:oklch(.405 .101 131.063);--color-lime-950:oklch(.274 .072 132.109);--color-green-50:oklch(.982 .018 155.826);--color-green-100:oklch(.962 .044 156.743);--color-green-200:oklch(.925 .084 155.995);--color-green-300:oklch(.871 .15 154.449);--color-green-400:oklch(.792 .209 151.711);--color-green-500:oklch(.723 .219 149.579);--color-green-600:oklch(.627 .194 149.214);--color-green-700:oklch(.527 .154 150.069);--color-green-800:oklch(.448 .119 151.328);--color-green-900:oklch(.393 .095 152.535);--color-green-950:oklch(.266 .065 152.934);--color-emerald-50:oklch(.979 .021 166.113);--color-emerald-100:oklch(.95 .052 163.051);--color-emerald-200:oklch(.905 .093 164.15);--color-emerald-300:oklch(.845 .143 164.978);--color-emerald-400:oklch(.765 .177 163.223);--color-emerald-500:oklch(.696 .17 162.48);--color-emerald-600:oklch(.596 .145 163.225);--color-emerald-700:oklch(.508 .118 165.612);--color-emerald-800:oklch(.432 .095 166.913);--color-emerald-900:oklch(.378 .077 168.94);--color-emerald-950:oklch(.262 .051 172.552);--color-teal-50:oklch(.984 .014 180.72);--color-teal-100:oklch(.953 .051 180.801);--color-teal-200:oklch(.91 .096 180.426);--color-teal-300:oklch(.855 .138 181.071);--color-teal-400:oklch(.777 .152 181.912);--color-teal-500:oklch(.704 .14 182.503);--color-teal-600:oklch(.6 .118 184.704);--color-teal-700:oklch(.511 .096 186.391);--color-teal-800:oklch(.437 .078 188.216);--color-teal-900:oklch(.386 .063 188.416);--color-teal-950:oklch(.277 .046 192.524);--color-cyan-50:oklch(.984 .019 200.873);--color-cyan-100:oklch(.956 .045 203.388);--color-cyan-200:oklch(.917 .08 205.041);--color-cyan-300:oklch(.865 .127 207.078);--color-cyan-400:oklch(.789 .154 211.53);--color-cyan-500:oklch(.715 .143 215.221);--color-cyan-600:oklch(.609 .126 221.723);--color-cyan-700:oklch(.52 .105 223.128);--color-cyan-800:oklch(.45 .085 224.283);--color-cyan-900:oklch(.398 .07 227.392);--color-cyan-950:oklch(.302 .056 229.695);--color-sky-50:oklch(.977 .013 236.62);--color-sky-100:oklch(.951 .026 236.824);--color-sky-200:oklch(.901 .058 230.902);--color-sky-300:oklch(.828 .111 230.318);--color-sky-400:oklch(.746 .16 232.661);--color-sky-500:oklch(.685 .169 237.323);--color-sky-600:oklch(.588 .158 241.966);--color-sky-700:oklch(.5 .134 242.749);--color-sky-800:oklch(.443 .11 240.79);--color-sky-900:oklch(.391 .09 240.876);--color-sky-950:oklch(.293 .066 243.157);--color-blue-50:oklch(.97 .014 254.604);--color-blue-100:oklch(.932 .032 255.585);--color-blue-200:oklch(.882 .059 254.128);--color-blue-300:oklch(.809 .105 251.813);--color-blue-400:oklch(.707 .165 254.624);--color-blue-500:oklch(.623 .214 259.815);--color-blue-600:oklch(.546 .245 262.881);--color-blue-700:oklch(.488 .243 264.376);--color-blue-800:oklch(.424 .199 265.638);--color-blue-900:oklch(.379 .146 265.522);--color-blue-950:oklch(.282 .091 267.935);--color-indigo-50:oklch(.962 .018 272.314);--color-indigo-100:oklch(.93 .034 272.788);--color-indigo-200:oklch(.87 .065 274.039);--color-indigo-300:oklch(.785 .115 274.713);--color-indigo-400:oklch(.673 .182 276.935);--color-indigo-500:oklch(.585 .233 277.117);--color-indigo-600:oklch(.511 .262 276.966);--color-indigo-700:oklch(.457 .24 277.023);--color-indigo-800:oklch(.398 .195 277.366);--color-indigo-900:oklch(.359 .144 278.697);--color-indigo-950:oklch(.257 .09 281.288);--color-violet-50:oklch(.969 .016 293.756);--color-violet-100:oklch(.943 .029 294.588);--color-violet-200:oklch(.894 .057 293.283);--color-violet-300:oklch(.811 .111 293.571);--color-violet-400:oklch(.702 .183 293.541);--color-violet-500:oklch(.606 .25 292.717);--color-violet-600:oklch(.541 .281 293.009);--color-violet-700:oklch(.491 .27 292.581);--color-violet-800:oklch(.432 .232 292.759);--color-violet-900:oklch(.38 .189 293.745);--color-violet-950:oklch(.283 .141 291.089);--color-purple-50:oklch(.977 .014 308.299);--color-purple-100:oklch(.946 .033 307.174);--color-purple-200:oklch(.902 .063 306.703);--color-purple-300:oklch(.827 .119 306.383);--color-purple-400:oklch(.714 .203 305.504);--color-purple-500:oklch(.627 .265 303.9);--color-purple-600:oklch(.558 .288 302.321);--color-purple-700:oklch(.496 .265 301.924);--color-purple-800:oklch(.438 .218 303.724);--color-purple-900:oklch(.381 .176 304.987);--color-purple-950:oklch(.291 .149 302.717);--color-fuchsia-50:oklch(.977 .017 320.058);--color-fuchsia-100:oklch(.952 .037 318.852);--color-fuchsia-200:oklch(.903 .076 319.62);--color-fuchsia-300:oklch(.833 .145 321.434);--color-fuchsia-400:oklch(.74 .238 322.16);--color-fuchsia-500:oklch(.667 .295 322.15);--color-fuchsia-600:oklch(.591 .293 322.896);--color-fuchsia-700:oklch(.518 .253 323.949);--color-fuchsia-800:oklch(.452 .211 324.591);--color-fuchsia-900:oklch(.401 .17 325.612);--color-fuchsia-950:oklch(.293 .136 325.661);--color-pink-50:oklch(.971 .014 343.198);--color-pink-100:oklch(.948 .028 342.258);--color-pink-200:oklch(.899 .061 343.231);--color-pink-300:oklch(.823 .12 346.018);--color-pink-400:oklch(.718 .202 349.761);--color-pink-500:oklch(.656 .241 354.308);--color-pink-600:oklch(.592 .249 .584);--color-pink-700:oklch(.525 .223 3.958);--color-pink-800:oklch(.459 .187 3.815);--color-pink-900:oklch(.408 .153 2.432);--color-pink-950:oklch(.284 .109 3.907);--color-rose-50:oklch(.969 .015 12.422);--color-rose-100:oklch(.941 .03 12.58);--color-rose-200:oklch(.892 .058 10.001);--color-rose-300:oklch(.81 .117 11.638);--color-rose-400:oklch(.712 .194 13.428);--color-rose-500:oklch(.645 .246 16.439);--color-rose-600:oklch(.586 .253 17.585);--color-rose-700:oklch(.514 .222 16.935);--color-rose-800:oklch(.455 .188 13.697);--color-rose-900:oklch(.41 .159 10.272);--color-rose-950:oklch(.271 .105 12.094);--color-slate-50:oklch(.984 .003 247.858);--color-slate-100:oklch(.968 .007 247.896);--color-slate-200:oklch(.929 .013 255.508);--color-slate-300:oklch(.869 .022 252.894);--color-slate-400:oklch(.704 .04 256.788);--color-slate-500:oklch(.554 .046 257.417);--color-slate-600:oklch(.446 .043 257.281);--color-slate-700:oklch(.372 .044 257.287);--color-slate-800:oklch(.279 .041 260.031);--color-slate-900:oklch(.208 .042 265.755);--color-slate-950:oklch(.129 .042 264.695);--color-gray-50:oklch(.985 .002 247.839);--color-gray-100:oklch(.967 .003 264.542);--color-gray-200:oklch(.928 .006 264.531);--color-gray-300:oklch(.872 .01 258.338);--color-gray-400:oklch(.707 .022 261.325);--color-gray-500:oklch(.551 .027 264.364);--color-gray-600:oklch(.446 .03 256.802);--color-gray-700:oklch(.373 .034 259.733);--color-gray-800:oklch(.278 .033 256.848);--color-gray-900:oklch(.21 .034 264.665);--color-gray-950:oklch(.13 .028 261.692);--color-zinc-50:oklch(.985 0 0);--color-zinc-100:oklch(.967 .001 286.375);--color-zinc-200:oklch(.92 .004 286.32);--color-zinc-300:oklch(.871 .006 286.286);--color-zinc-400:oklch(.705 .015 286.067);--color-zinc-500:oklch(.552 .016 285.938);--color-zinc-600:oklch(.442 .017 285.786);--color-zinc-700:oklch(.37 .013 285.805);--color-zinc-800:oklch(.274 .006 286.033);--color-zinc-900:oklch(.21 .006 285.885);--color-zinc-950:oklch(.141 .005 285.823);--color-neutral-50:oklch(.985 0 0);--color-neutral-100:oklch(.97 0 0);--color-neutral-200:oklch(.922 0 0);--color-neutral-300:oklch(.87 0 0);--color-neutral-400:oklch(.708 0 0);--color-neutral-500:oklch(.556 0 0);--color-neutral-600:oklch(.439 0 0);--color-neutral-700:oklch(.371 0 0);--color-neutral-800:oklch(.269 0 0);--color-neutral-900:oklch(.205 0 0);--color-neutral-950:oklch(.145 0 0);--color-stone-50:oklch(.985 .001 106.423);--color-stone-100:oklch(.97 .001 106.424);--color-stone-200:oklch(.923 .003 48.717);--color-stone-300:oklch(.869 .005 56.366);--color-stone-400:oklch(.709 .01 56.259);--color-stone-500:oklch(.553 .013 58.071);--color-stone-600:oklch(.444 .011 73.639);--color-stone-700:oklch(.374 .01 67.558);--color-stone-800:oklch(.268 .007 34.298);--color-stone-900:oklch(.216 .006 56.043);--color-stone-950:oklch(.147 .004 49.25);--color-black:#000;--color-white:#fff;--spacing:.25rem;--breakpoint-sm:40rem;--breakpoint-md:48rem;--breakpoint-lg:64rem;--breakpoint-xl:80rem;--breakpoint-2xl:96rem;--container-3xs:16rem;--container-2xs:18rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--container-3xl:48rem;--container-4xl:56rem;--container-5xl:64rem;--container-6xl:72rem;--container-7xl:80rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5/2.25);--text-5xl:3rem;--text-5xl--line-height:1;--text-6xl:3.75rem;--text-6xl--line-height:1;--text-7xl:4.5rem;--text-7xl--line-height:1;--text-8xl:6rem;--text-8xl--line-height:1;--text-9xl:8rem;--text-9xl--line-height:1;--font-weight-thin:100;--font-weight-extralight:200;--font-weight-light:300;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--font-weight-black:900;--tracking-tighter:-.05em;--tracking-tight:-.025em;--tracking-normal:0em;--tracking-wide:.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-tight:1.25;--leading-snug:1.375;--leading-normal:1.5;--leading-relaxed:1.625;--leading-loose:2;--radius-xs:.125rem;--radius-sm:calc(var(--radius) - 4px);--radius-md:calc(var(--radius) - 2px);--radius-lg:var(--radius);--radius-xl:calc(var(--radius) + 4px);--radius-2xl:1rem;--radius-3xl:1.5rem;--radius-4xl:2rem;--shadow-2xs:0 1px #0000000d;--shadow-xs:0 1px 2px 0 #0000000d;--shadow-sm:0 1px 3px 0 #0000001a,0 1px 2px -1px #0000001a;--shadow-md:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;--shadow-lg:0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a;--shadow-xl:0 20px 25px -5px #0000001a,0 8px 10px -6px #0000001a;--shadow-2xl:0 25px 50px -12px #00000040;--inset-shadow-2xs:inset 0 1px #0000000d;--inset-shadow-xs:inset 0 1px 1px #0000000d;--inset-shadow-sm:inset 0 2px 4px #0000000d;--drop-shadow-xs:0 1px 1px #0000000d;--drop-shadow-sm:0 1px 2px #00000026;--drop-shadow-md:0 3px 3px #0000001f;--drop-shadow-lg:0 4px 4px #00000026;--drop-shadow-xl:0 9px 7px #0000001a;--drop-shadow-2xl:0 25px 25px #00000026;--ease-in:cubic-bezier(.4,0,1,1);--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0,0,.2,1)infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--animate-bounce:bounce 1s infinite;--blur-xs:4px;--blur-sm:8px;--blur-md:12px;--blur-lg:16px;--blur-xl:24px;--blur-2xl:40px;--blur-3xl:64px;--perspective-dramatic:100px;--perspective-near:300px;--perspective-normal:500px;--perspective-midrange:800px;--perspective-distant:1200px;--aspect-video:16/9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-font-feature-settings:var(--font-sans--font-feature-settings);--default-font-variation-settings:var(--font-sans--font-variation-settings);--default-mono-font-family:var(--font-mono);--default-mono-font-feature-settings:var(--font-mono--font-feature-settings);--default-mono-font-variation-settings:var(--font-mono--font-variation-settings);--color-background:var(--background);--color-foreground:var(--foreground);--color-card:var(--card);--color-card-foreground:var(--card-foreground);--color-popover:var(--popover);--color-popover-foreground:var(--popover-foreground);--color-primary:var(--primary);--color-primary-foreground:var(--primary-foreground);--color-secondary:var(--secondary);--color-secondary-foreground:var(--secondary-foreground);--color-muted:var(--muted);--color-muted-foreground:var(--muted-foreground);--color-accent:var(--accent);--color-accent-foreground:var(--accent-foreground);--color-destructive:var(--destructive);--color-destructive-foreground:var(--destructive-foreground);--color-border:var(--border);--color-input:var(--input);--color-ring:var(--ring);--color-chart-1:var(--chart-1);--color-chart-2:var(--chart-2);--color-chart-3:var(--chart-3);--color-chart-4:var(--chart-4);--color-chart-5:var(--chart-5);--color-sidebar-ring:var(--sidebar-ring);--color-sidebar-border:var(--sidebar-border);--color-sidebar-accent-foreground:var(--sidebar-accent-foreground);--color-sidebar-accent:var(--sidebar-accent);--color-sidebar-primary-foreground:var(--sidebar-primary-foreground);--color-sidebar-primary:var(--sidebar-primary);--color-sidebar-foreground:var(--sidebar-foreground);--color-sidebar:var(--sidebar-background);--animate-accordion-down:accordion-down .2s ease-out;--animate-accordion-up:accordion-up .2s ease-out}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}body{line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1;color:color-mix(in oklab,currentColor 50%,transparent)}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border);outline-color:color-mix(in oklab,var(--ring)50%,transparent)}body{background-color:var(--background);color:var(--foreground)}*{scrollbar-color:initial;scrollbar-width:initial}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.top-1\/2{top:50%}.top-2{top:calc(var(--spacing)*2)}.top-4{top:calc(var(--spacing)*4)}.top-12{top:calc(var(--spacing)*12)}.top-\[50\%\]{top:50%}.right-0{right:calc(var(--spacing)*0)}.right-2{right:calc(var(--spacing)*2)}.right-4{right:calc(var(--spacing)*4)}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-2{bottom:calc(var(--spacing)*2)}.bottom-4{bottom:calc(var(--spacing)*4)}.left-0{left:calc(var(--spacing)*0)}.left-1\/2{left:50%}.left-2{left:calc(var(--spacing)*2)}.left-\[50\%\]{left:50%}.isolate{isolation:isolate}.z-50{z-index:50}.\!container{width:100%!important}@media (width>=40rem){.\!container{max-width:40rem!important}}@media (width>=48rem){.\!container{max-width:48rem!important}}@media (width>=64rem){.\!container{max-width:64rem!important}}@media (width>=80rem){.\!container{max-width:80rem!important}}@media (width>=96rem){.\!container{max-width:96rem!important}}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.\!m-0{margin:calc(var(--spacing)*0)!important}.m-0{margin:calc(var(--spacing)*0)}.-mx-1{margin-inline:calc(var(--spacing)*-1)}.mx-1{margin-inline:calc(var(--spacing)*1)}.my-1{margin-block:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-4{margin-top:calc(var(--spacing)*4)}.mr-1{margin-right:calc(var(--spacing)*1)}.mr-2{margin-right:calc(var(--spacing)*2)}.mr-4{margin-right:calc(var(--spacing)*4)}.mr-6{margin-right:calc(var(--spacing)*6)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-2{margin-left:calc(var(--spacing)*2)}.ml-auto{margin-left:auto}.scrollbar{scrollbar-width:auto;scrollbar-color:var(--scrollbar-thumb,initial)var(--scrollbar-track,initial)}.scrollbar::-webkit-scrollbar-track{background-color:var(--scrollbar-track);border-radius:var(--scrollbar-track-radius)}.scrollbar::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb);border-radius:var(--scrollbar-thumb-radius)}.scrollbar::-webkit-scrollbar-corner{background-color:var(--scrollbar-corner);border-radius:var(--scrollbar-corner-radius)}.scrollbar::-webkit-scrollbar{width:var(--scrollbar-width,16px);height:var(--scrollbar-height,16px);display:block}.line-clamp-1{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.inline-grid{display:inline-grid}.table{display:table}.aspect-square{aspect-ratio:1}.\!size-full{width:100%!important;height:100%!important}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.size-7{width:calc(var(--spacing)*7);height:calc(var(--spacing)*7)}.size-8{width:calc(var(--spacing)*8);height:calc(var(--spacing)*8)}.size-10{width:calc(var(--spacing)*10);height:calc(var(--spacing)*10)}.size-full{width:100%;height:100%}.h-1\/2{height:50%}.h-2\.5{height:calc(var(--spacing)*2.5)}.h-3{height:calc(var(--spacing)*3)}.h-3\.5{height:calc(var(--spacing)*3.5)}.h-4{height:calc(var(--spacing)*4)}.h-6{height:calc(var(--spacing)*6)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.h-11{height:calc(var(--spacing)*11)}.h-52{height:calc(var(--spacing)*52)}.h-\[1px\]{height:1px}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-fit{height:fit-content}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-8{max-height:calc(var(--spacing)*8)}.max-h-48{max-height:calc(var(--spacing)*48)}.max-h-96{max-height:calc(var(--spacing)*96)}.max-h-\[300px\]{max-height:300px}.max-h-full{max-height:100%}.min-h-0{min-height:calc(var(--spacing)*0)}.w-0{width:calc(var(--spacing)*0)}.w-2\.5{width:calc(var(--spacing)*2.5)}.w-3{width:calc(var(--spacing)*3)}.w-3\.5{width:calc(var(--spacing)*3.5)}.w-4{width:calc(var(--spacing)*4)}.w-6{width:calc(var(--spacing)*6)}.w-16{width:calc(var(--spacing)*16)}.w-24{width:calc(var(--spacing)*24)}.w-\[1px\]{width:1px}.w-auto{width:auto}.w-full{width:100%}.w-screen{width:100vw}.max-w-80{max-width:calc(var(--spacing)*80)}.max-w-\[80\%\]{max-width:80%}.max-w-lg{max-width:var(--container-lg)}.max-w-none{max-width:none}.max-w-sm{max-width:var(--container-sm)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-24{min-width:calc(var(--spacing)*24)}.min-w-\[8rem\]{min-width:8rem}.min-w-\[300px\]{min-width:300px}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.flex-1{flex:1}.flex-auto{flex:auto}.flex-shrink,.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.caption-bottom{caption-side:bottom}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-20{--tw-translate-y:calc(var(--spacing)*-20);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-\[-50\%\]{--tw-translate-x:-50%;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-0{--tw-translate-y:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-\[-50\%\]{--tw-translate-y:-50%;translate:var(--tw-translate-x)var(--tw-translate-y)}.scale-125{--tw-scale-x:125%;--tw-scale-y:125%;--tw-scale-z:125%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-3d{scale:var(--tw-scale-x)var(--tw-scale-y)var(--tw-scale-z)}.transform{transform:var(--tw-rotate-x)var(--tw-rotate-y)var(--tw-rotate-z)var(--tw-skew-x)var(--tw-skew-y)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-help{cursor:help}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.resize{resize:both}.\[appearance\:textfield\]{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.columns-2{columns:2}.columns-3{columns:3}.columns-4{columns:4}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.place-items-center{place-items:center}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-2\.5{gap:calc(var(--spacing)*2.5)}.gap-4{gap:calc(var(--spacing)*4)}.gap-6{gap:calc(var(--spacing)*6)}.gap-px{gap:1px}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}.self-center{align-self:center}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.\!rounded-none{border-radius:0!important}.rounded{border-radius:.25rem}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:calc(var(--radius) + 4px)}.rounded-l-none{border-top-left-radius:0;border-bottom-left-radius:0}.rounded-tr-none{border-top-right-radius:0}.rounded-br-none{border-bottom-right-radius:0}.border,.border-1{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.\!border-none{--tw-border-style:none!important;border-style:none!important}.border-dashed{--tw-border-style:dashed;border-style:dashed}.\!border-input{border-color:var(--input)!important}.border-border\/40{border-color:color-mix(in oklab,var(--border)40%,transparent)}.border-destructive\/50{border-color:color-mix(in oklab,var(--destructive)50%,transparent)}.border-input{border-color:var(--input)}.border-muted-foreground\/25{border-color:color-mix(in oklab,var(--muted-foreground)25%,transparent)}.border-muted-foreground\/50{border-color:color-mix(in oklab,var(--muted-foreground)50%,transparent)}.border-primary{border-color:var(--primary)}.border-t-transparent{border-top-color:#0000}.border-l-transparent{border-left-color:#0000}.\!bg-background{background-color:var(--background)!important}.\!bg-emerald-400{background-color:var(--color-emerald-400)!important}.bg-background{background-color:var(--background)}.bg-background\/60{background-color:color-mix(in oklab,var(--background)60%,transparent)}.bg-background\/80{background-color:color-mix(in oklab,var(--background)80%,transparent)}.bg-background\/90{background-color:color-mix(in oklab,var(--background)90%,transparent)}.bg-background\/95{background-color:color-mix(in oklab,var(--background)95%,transparent)}.bg-black\/80{background-color:color-mix(in oklab,var(--color-black)80%,transparent)}.bg-border{background-color:var(--border)}.bg-card{background-color:var(--card)}.bg-destructive{background-color:var(--destructive)}.bg-foreground\/10{background-color:color-mix(in oklab,var(--foreground)10%,transparent)}.bg-green-500{background-color:var(--color-green-500)}.bg-muted{background-color:var(--muted)}.bg-muted\/50{background-color:color-mix(in oklab,var(--muted)50%,transparent)}.bg-popover{background-color:var(--popover)}.bg-primary{background-color:var(--primary)}.bg-primary-foreground\/60{background-color:color-mix(in oklab,var(--primary-foreground)60%,transparent)}.bg-primary\/5{background-color:color-mix(in oklab,var(--primary)5%,transparent)}.bg-red-500{background-color:var(--color-red-500)}.bg-red-700{background-color:var(--color-red-700)}.bg-secondary{background-color:var(--secondary)}.bg-transparent{background-color:#0000}.object-cover{object-fit:cover}.\!p-0{padding:calc(var(--spacing)*0)!important}.\!p-2{padding:calc(var(--spacing)*2)!important}.p-0{padding:calc(var(--spacing)*0)}.p-1{padding:calc(var(--spacing)*1)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-6{padding:calc(var(--spacing)*6)}.p-16{padding:calc(var(--spacing)*16)}.p-\[1px\]{padding:1px}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-5{padding-inline:calc(var(--spacing)*5)}.px-8{padding-inline:calc(var(--spacing)*8)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\.5{padding-block:calc(var(--spacing)*2.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-6{padding-block:calc(var(--spacing)*6)}.pt-0{padding-top:calc(var(--spacing)*0)}.pt-4{padding-top:calc(var(--spacing)*4)}.pr-2{padding-right:calc(var(--spacing)*2)}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-12{padding-bottom:calc(var(--spacing)*12)}.pl-1{padding-left:calc(var(--spacing)*1)}.pl-8{padding-left:calc(var(--spacing)*8)}.text-center{text-align:center}.text-left{text-align:left}.align-middle{vertical-align:middle}.font-mono{font-family:var(--font-mono)}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-none{--tw-leading:1;line-height:1}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.break-words{overflow-wrap:break-word}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.\!text-zinc-50{color:var(--color-zinc-50)!important}.text-blue-600{color:var(--color-blue-600)}.text-card-foreground{color:var(--card-foreground)}.text-current{color:currentColor}.text-destructive{color:var(--destructive)}.text-destructive-foreground{color:var(--destructive-foreground)}.text-emerald-400{color:var(--color-emerald-400)}.text-foreground{color:var(--foreground)}.text-foreground\/80{color:color-mix(in oklab,var(--foreground)80%,transparent)}.text-green-600{color:var(--color-green-600)}.text-muted{color:var(--muted)}.text-muted-foreground{color:var(--muted-foreground)}.text-muted-foreground\/70{color:color-mix(in oklab,var(--muted-foreground)70%,transparent)}.text-popover-foreground{color:var(--popover-foreground)}.text-primary{color:var(--primary)}.text-primary-foreground{color:var(--primary-foreground)}.text-primary\/60{color:color-mix(in oklab,var(--primary)60%,transparent)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-secondary-foreground{color:var(--secondary-foreground)}.text-sky-300{color:var(--color-sky-300)}.text-teal-600{color:var(--color-teal-600)}.text-teal-600\/90{color:color-mix(in oklab,var(--color-teal-600)90%,transparent)}.text-white{color:var(--color-white)}.text-yellow-400\/90{color:color-mix(in oklab,var(--color-yellow-400)90%,transparent)}.text-yellow-600{color:var(--color-yellow-600)}.uppercase{text-transform:uppercase}.italic{font-style:italic}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_8px_rgba\(0\,0\,0\,0\.2\)\]{--tw-shadow:0 0 8px var(--tw-shadow-color,#0003);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_12px_rgba\(34\,197\,94\,0\.4\)\]{--tw-shadow:0 0 12px var(--tw-shadow-color,#22c55e66);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_12px_rgba\(239\,68\,68\,0\.4\)\]{--tw-shadow:0 0 12px var(--tw-shadow-color,#ef444466);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-offset-background{--tw-ring-offset-color:var(--background)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.invert{--tw-invert:invert(100%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.\!filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)!important}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-lg{--tw-backdrop-blur:blur(var(--blur-lg));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.duration-2000{--tw-duration:2s;transition-duration:2s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.animate-in{--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial;animation-name:enter;animation-duration:.15s}.duration-200{animation-duration:.2s}.duration-300{animation-duration:.3s}.duration-500{animation-duration:.5s}.duration-2000{animation-duration:2s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.fade-in-0{--tw-enter-opacity:0}.outline-none{--tw-outline-style:none;outline-style:none}.paused{animation-play-state:paused}.repeat-1{animation-iteration-count:1}.running{animation-play-state:running}.select-none{-webkit-user-select:none;user-select:none}.zoom-in{--tw-enter-scale:0}.zoom-in-95{--tw-enter-scale:.95}.zoom-out{--tw-exit-scale:0}.peer-disabled\:cursor-not-allowed:is(:where(.peer):disabled~*){cursor:not-allowed}.peer-disabled\:opacity-70:is(:where(.peer):disabled~*){opacity:.7}.file\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\:bg-transparent::file-selector-button{background-color:#0000}.file\:text-sm::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.file\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.file\:text-foreground::file-selector-button{color:var(--foreground)}.placeholder\:text-muted-foreground::placeholder{color:var(--muted-foreground)}@media (hover:hover){.hover\:w-fit:hover{width:fit-content}.hover\:bg-accent:hover{background-color:var(--accent)}.hover\:bg-background\/60:hover{background-color:color-mix(in oklab,var(--background)60%,transparent)}.hover\:bg-destructive\/90:hover{background-color:color-mix(in oklab,var(--destructive)90%,transparent)}.hover\:bg-muted\/25:hover{background-color:color-mix(in oklab,var(--muted)25%,transparent)}.hover\:bg-muted\/50:hover{background-color:color-mix(in oklab,var(--muted)50%,transparent)}.hover\:bg-primary\/5:hover{background-color:color-mix(in oklab,var(--primary)5%,transparent)}.hover\:bg-primary\/20:hover{background-color:color-mix(in oklab,var(--primary)20%,transparent)}.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab,var(--primary)90%,transparent)}.hover\:bg-secondary\/80:hover{background-color:color-mix(in oklab,var(--secondary)80%,transparent)}.hover\:text-accent-foreground:hover{color:var(--accent-foreground)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}}.focus\:bg-accent:focus{background-color:var(--accent)}.focus\:text-accent-foreground:focus{color:var(--accent-foreground)}.focus\:ring-0:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + var(--tw-ring-offset-width))var(--tw-ring-color,currentColor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentColor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-ring:focus{--tw-ring-color:var(--ring)}.focus\:ring-offset-0:focus{--tw-ring-offset-width:0px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus\:outline-0:focus{outline-style:var(--tw-outline-style);outline-width:0}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\:relative:focus-visible{position:relative}.focus-visible\:ring-1:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentColor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentColor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color:var(--ring)}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.active\:right-0:active{right:calc(var(--spacing)*0)}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[disabled\=true\]\:pointer-events-none[data-disabled=true]{pointer-events:none}.data-\[disabled\=true\]\:opacity-50[data-disabled=true]{opacity:.5}.data-\[selected\=\'true\'\]\:bg-accent[data-selected=true]{background-color:var(--accent)}.data-\[selected\=true\]\:text-accent-foreground[data-selected=true]{color:var(--accent-foreground)}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:-.5rem}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:.5rem}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:-.5rem}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:.5rem}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:var(--background)}.data-\[state\=active\]\:text-foreground[data-state=active]{color:var(--foreground)}.data-\[state\=active\]\:shadow-sm[data-state=active]{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:var(--primary)}.data-\[state\=checked\]\:text-primary-foreground[data-state=checked]{color:var(--primary-foreground)}.data-\[state\=closed\]\:animate-out[data-state=closed]{--tw-exit-opacity:initial;--tw-exit-scale:initial;--tw-exit-rotate:initial;--tw-exit-translate-x:initial;--tw-exit-translate-y:initial;animation-name:exit;animation-duration:.15s}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y:-48%}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:var(--accent)}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:var(--muted-foreground)}.data-\[state\=open\]\:animate-in[data-state=open]{--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial;animation-name:enter;animation-duration:.15s}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y:-48%}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:var(--muted)}@supports ((-webkit-backdrop-filter:var(--tw)) or (backdrop-filter:var(--tw))){.supports-\[backdrop-filter\]\:bg-background\/60{background-color:color-mix(in oklab,var(--background)60%,transparent)}}@media (width>=40rem){.sm\:mt-0{margin-top:calc(var(--spacing)*0)}.sm\:max-w-xl{max-width:var(--container-xl)}.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}:where(.sm\:space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:px-5{padding-inline:calc(var(--spacing)*5)}.sm\:text-left{text-align:left}}@media (width>=48rem){.md\:inline-block{display:inline-block}.md\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}.dark\:border-destructive:is(.dark *){border-color:var(--destructive)}.\[\&_\[cmdk-group-heading\]\]\:px-2 [cmdk-group-heading]{padding-inline:calc(var(--spacing)*2)}.\[\&_\[cmdk-group-heading\]\]\:py-1\.5 [cmdk-group-heading]{padding-block:calc(var(--spacing)*1.5)}.\[\&_\[cmdk-group-heading\]\]\:text-xs [cmdk-group-heading]{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\[cmdk-group-heading\]\]\:font-medium [cmdk-group-heading]{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\[cmdk-group-heading\]\]\:text-muted-foreground [cmdk-group-heading]{color:var(--muted-foreground)}.\[\&_\[cmdk-group\]\]\:px-2 [cmdk-group]{padding-inline:calc(var(--spacing)*2)}.\[\&_\[cmdk-group\]\:not\(\[hidden\]\)_\~\[cmdk-group\]\]\:pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:calc(var(--spacing)*0)}.\[\&_\[cmdk-input-wrapper\]_svg\]\:h-5 [cmdk-input-wrapper] svg{height:calc(var(--spacing)*5)}.\[\&_\[cmdk-input-wrapper\]_svg\]\:w-5 [cmdk-input-wrapper] svg{width:calc(var(--spacing)*5)}.\[\&_\[cmdk-input\]\]\:h-12 [cmdk-input]{height:calc(var(--spacing)*12)}.\[\&_\[cmdk-item\]\]\:px-2 [cmdk-item]{padding-inline:calc(var(--spacing)*2)}.\[\&_\[cmdk-item\]\]\:py-3 [cmdk-item]{padding-block:calc(var(--spacing)*3)}.\[\&_\[cmdk-item\]_svg\]\:h-5 [cmdk-item] svg{height:calc(var(--spacing)*5)}.\[\&_\[cmdk-item\]_svg\]\:w-5 [cmdk-item] svg{width:calc(var(--spacing)*5)}.\[\&_p\]\:leading-relaxed p{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-4 svg{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_tr\]\:border-b tr{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-style:var(--tw-border-style);border-width:0}.\[\&\:\:-webkit-inner-spin-button\]\:appearance-none::-webkit-inner-spin-button{-webkit-appearance:none;-moz-appearance:none;appearance:none}.\[\&\:\:-webkit-outer-spin-button\]\:appearance-none::-webkit-outer-spin-button{-webkit-appearance:none;-moz-appearance:none;appearance:none}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:calc(var(--spacing)*0)}.\[\&\>\[role\=checkbox\]\]\:translate-y-\[2px\]>[role=checkbox]{--tw-translate-y:2px;translate:var(--tw-translate-x)var(--tw-translate-y)}.\[\&\>span\]\:line-clamp-1>span{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.\[\&\>svg\]\:absolute>svg{position:absolute}.\[\&\>svg\]\:top-4>svg{top:calc(var(--spacing)*4)}.\[\&\>svg\]\:left-4>svg{left:calc(var(--spacing)*4)}.\[\&\>svg\]\:text-destructive>svg{color:var(--destructive)}.\[\&\>svg\]\:text-foreground>svg{color:var(--foreground)}.\[\&\>svg\+div\]\:translate-y-\[-3px\]>svg+div{--tw-translate-y:-3px;translate:var(--tw-translate-x)var(--tw-translate-y)}.\[\&\>svg\~\*\]\:pl-7>svg~*{padding-left:calc(var(--spacing)*7)}.\[\&\>tr\]\:last\:border-b-0>tr:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}}:root{--background:#fff;--foreground:#09090b;--card:#fff;--card-foreground:#09090b;--popover:#fff;--popover-foreground:#09090b;--primary:#18181b;--primary-foreground:#fafafa;--secondary:#f4f4f5;--secondary-foreground:#18181b;--muted:#f4f4f5;--muted-foreground:#71717a;--accent:#f4f4f5;--accent-foreground:#18181b;--destructive:#ef4444;--destructive-foreground:#fafafa;--border:#e4e4e7;--input:#e4e4e7;--ring:#09090b;--chart-1:#e76e50;--chart-2:#2a9d90;--chart-3:#274754;--chart-4:#e8c468;--chart-5:#f4a462;--radius:.6rem;--sidebar-background:#fafafa;--sidebar-foreground:#3f3f46;--sidebar-primary:#18181b;--sidebar-primary-foreground:#fafafa;--sidebar-accent:#f4f4f5;--sidebar-accent-foreground:#18181b;--sidebar-border:#e5e7eb;--sidebar-ring:#3b82f6}.dark{--background:#09090b;--foreground:#fafafa;--card:#09090b;--card-foreground:#fafafa;--popover:#09090b;--popover-foreground:#fafafa;--primary:#fafafa;--primary-foreground:#18181b;--secondary:#27272a;--secondary-foreground:#fafafa;--muted:#27272a;--muted-foreground:#a1a1aa;--accent:#27272a;--accent-foreground:#fafafa;--destructive:#7f1d1d;--destructive-foreground:#fafafa;--border:#27272a;--input:#27272a;--ring:#d4d4d8;--chart-1:#2662d9;--chart-2:#2eb88a;--chart-3:#e88c30;--chart-4:#af57db;--chart-5:#e23670;--sidebar-background:#18181b;--sidebar-foreground:#f4f4f5;--sidebar-primary:#1d4ed8;--sidebar-primary-foreground:#fff;--sidebar-accent:#27272a;--sidebar-accent-foreground:#f4f4f5;--sidebar-border:#27272a;--sidebar-ring:#3b82f6}::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:5px}::-webkit-scrollbar-track{background-color:#f2f2f2}.dark ::-webkit-scrollbar-thumb{background-color:#e6e6e6}.dark ::-webkit-scrollbar-track{background-color:#000}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0)scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1))rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0)scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1))rotate(var(--tw-exit-rotate,0))}}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}}@keyframes bounce{0%,to{animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}@keyframes accordion-down{0%{height:0}to{height:var(--radix-accordion-content-height)}}@keyframes accordion-up{0%{height:var(--radix-accordion-content-height)}to{height:0}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false;initial-value:rotateX(0)}@property --tw-rotate-y{syntax:"*";inherits:false;initial-value:rotateY(0)}@property --tw-rotate-z{syntax:"*";inherits:false;initial-value:rotateZ(0)}@property --tw-skew-x{syntax:"*";inherits:false;initial-value:skewX(0)}@property --tw-skew-y{syntax:"*";inherits:false;initial-value:skewY(0)}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}:root{--sigma-background-color:#fff;--sigma-controls-background-color:#fff;--sigma-controls-background-color-hover:rgba(0,0,0,.2);--sigma-controls-border-color:rgba(0,0,0,.2);--sigma-controls-color:#000;--sigma-controls-zindex:100;--sigma-controls-margin:5px;--sigma-controls-size:30px}div.react-sigma{height:100%;width:100%;position:relative;background:var(--sigma-background-color)}div.sigma-container{height:100%;width:100%}.react-sigma-controls{position:absolute;z-index:var(--sigma-controls-zindex);border:2px solid var(--sigma-controls-border-color);border-radius:4px;color:var(--sigma-controls-color);background-color:var(--sigma-controls-background-color)}.react-sigma-controls.bottom-right{bottom:var(--sigma-controls-margin);right:var(--sigma-controls-margin)}.react-sigma-controls.bottom-left{bottom:var(--sigma-controls-margin);left:var(--sigma-controls-margin)}.react-sigma-controls.top-right{top:var(--sigma-controls-margin);right:var(--sigma-controls-margin)}.react-sigma-controls.top-left{top:var(--sigma-controls-margin);left:var(--sigma-controls-margin)}.react-sigma-controls:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.react-sigma-controls:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.react-sigma-control{width:var(--sigma-controls-size);height:var(--sigma-controls-size);line-height:var(--sigma-controls-size);background-color:var(--sigma-controls-background-color);border-bottom:1px solid var(--sigma-controls-border-color)}.react-sigma-control:last-child{border-bottom:none}.react-sigma-control>*{box-sizing:border-box}.react-sigma-control>button{display:block;border:none;margin:0;padding:0;width:var(--sigma-controls-size);height:var(--sigma-controls-size);line-height:var(--sigma-controls-size);background-position:center;background-size:50%;background-repeat:no-repeat;background-color:var(--sigma-controls-background-color);clip:rect(0,0,0,0)}.react-sigma-control>button:hover{background-color:var(--sigma-controls-background-color-hover)}.react-sigma-search{background-color:var(--sigma-controls-background-color)}.react-sigma-search label{visibility:hidden}.react-sigma-search input{color:var(--sigma-controls-color);background-color:var(--sigma-controls-background-color);font-size:1em;width:100%;margin:0;border:none;padding:var(--sigma-controls-margin);box-sizing:border-box}:root{--sigma-grey-color:#ccc}.react-sigma .option.hoverable{cursor:pointer!important}.react-sigma .text-ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.react-sigma .react-select__clear-indicator{cursor:pointer!important}.react-sigma .text-muted{color:var(--sigma-grey-color)}.react-sigma .text-italic{font-style:italic}.react-sigma .text-center{text-align:center}.react-sigma .graph-search{min-width:250px}.react-sigma .graph-search .option{padding:2px 8px}.react-sigma .graph-search .dropdown-indicator{font-size:1.25em;padding:4px}.react-sigma .graph-search .option.selected{background-color:var(--sigma-grey-color)}.react-sigma .node .render{position:relative;display:inline-block;width:1em;height:1em;border-radius:1em;background-color:var(--sigma-grey-color);margin-right:8px}.react-sigma .node{display:flex;flex-direction:row;align-items:center}.react-sigma .node .render{flex-grow:0;flex-shrink:0;margin-right:0 .25em}.react-sigma .node .label{flex-grow:1;flex-shrink:1}.react-sigma .edge{display:flex;flex-direction:column;align-items:flex-start;flex-grow:0;flex-shrink:0;flex-wrap:nowrap}.react-sigma .edge .node{font-size:.7em}.react-sigma .edge .body{display:flex;flex-direction:row;flex-grow:1;flex-shrink:1;min-height:.6em}.react-sigma .edge .body .render{display:flex;flex-direction:column;margin:0 2px}.react-sigma .edge .body .render .dash,.react-sigma .edge .body .render .dotted{display:inline-block;width:0;margin:0 2px;border:2px solid #ccc;flex-grow:1;flex-shrink:1}.react-sigma .edge .body .render .dotted{border-style:dotted}.react-sigma .edge .body .render .arrow{width:0;height:0;border-left:.3em solid transparent;border-right:.3em solid transparent;border-top:.6em solid red;flex-shrink:0;flex-grow:0;border-left-width:.3em;border-right-width:.3em}.react-sigma .edge .body .label{flex-grow:1;flex-shrink:1;text-align:center} diff --git a/lightrag/api/webui/assets/index-Cq9iD15S.css b/lightrag/api/webui/assets/index-Cq9iD15S.css new file mode 100644 index 00000000..1c6451f5 --- /dev/null +++ b/lightrag/api/webui/assets/index-Cq9iD15S.css @@ -0,0 +1 @@ +/*! tailwindcss v4.0.6 | MIT License | https://tailwindcss.com */@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-serif:ui-serif,Georgia,Cambria,"Times New Roman",Times,serif;--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-50:oklch(.971 .013 17.38);--color-red-100:oklch(.936 .032 17.717);--color-red-200:oklch(.885 .062 18.334);--color-red-300:oklch(.808 .114 19.571);--color-red-400:oklch(.704 .191 22.216);--color-red-500:oklch(.637 .237 25.331);--color-red-600:oklch(.577 .245 27.325);--color-red-700:oklch(.505 .213 27.518);--color-red-800:oklch(.444 .177 26.899);--color-red-900:oklch(.396 .141 25.723);--color-red-950:oklch(.258 .092 26.042);--color-orange-50:oklch(.98 .016 73.684);--color-orange-100:oklch(.954 .038 75.164);--color-orange-200:oklch(.901 .076 70.697);--color-orange-300:oklch(.837 .128 66.29);--color-orange-400:oklch(.75 .183 55.934);--color-orange-500:oklch(.705 .213 47.604);--color-orange-600:oklch(.646 .222 41.116);--color-orange-700:oklch(.553 .195 38.402);--color-orange-800:oklch(.47 .157 37.304);--color-orange-900:oklch(.408 .123 38.172);--color-orange-950:oklch(.266 .079 36.259);--color-amber-50:oklch(.987 .022 95.277);--color-amber-100:oklch(.962 .059 95.617);--color-amber-200:oklch(.924 .12 95.746);--color-amber-300:oklch(.879 .169 91.605);--color-amber-400:oklch(.828 .189 84.429);--color-amber-500:oklch(.769 .188 70.08);--color-amber-600:oklch(.666 .179 58.318);--color-amber-700:oklch(.555 .163 48.998);--color-amber-800:oklch(.473 .137 46.201);--color-amber-900:oklch(.414 .112 45.904);--color-amber-950:oklch(.279 .077 45.635);--color-yellow-50:oklch(.987 .026 102.212);--color-yellow-100:oklch(.973 .071 103.193);--color-yellow-200:oklch(.945 .129 101.54);--color-yellow-300:oklch(.905 .182 98.111);--color-yellow-400:oklch(.852 .199 91.936);--color-yellow-500:oklch(.795 .184 86.047);--color-yellow-600:oklch(.681 .162 75.834);--color-yellow-700:oklch(.554 .135 66.442);--color-yellow-800:oklch(.476 .114 61.907);--color-yellow-900:oklch(.421 .095 57.708);--color-yellow-950:oklch(.286 .066 53.813);--color-lime-50:oklch(.986 .031 120.757);--color-lime-100:oklch(.967 .067 122.328);--color-lime-200:oklch(.938 .127 124.321);--color-lime-300:oklch(.897 .196 126.665);--color-lime-400:oklch(.841 .238 128.85);--color-lime-500:oklch(.768 .233 130.85);--color-lime-600:oklch(.648 .2 131.684);--color-lime-700:oklch(.532 .157 131.589);--color-lime-800:oklch(.453 .124 130.933);--color-lime-900:oklch(.405 .101 131.063);--color-lime-950:oklch(.274 .072 132.109);--color-green-50:oklch(.982 .018 155.826);--color-green-100:oklch(.962 .044 156.743);--color-green-200:oklch(.925 .084 155.995);--color-green-300:oklch(.871 .15 154.449);--color-green-400:oklch(.792 .209 151.711);--color-green-500:oklch(.723 .219 149.579);--color-green-600:oklch(.627 .194 149.214);--color-green-700:oklch(.527 .154 150.069);--color-green-800:oklch(.448 .119 151.328);--color-green-900:oklch(.393 .095 152.535);--color-green-950:oklch(.266 .065 152.934);--color-emerald-50:oklch(.979 .021 166.113);--color-emerald-100:oklch(.95 .052 163.051);--color-emerald-200:oklch(.905 .093 164.15);--color-emerald-300:oklch(.845 .143 164.978);--color-emerald-400:oklch(.765 .177 163.223);--color-emerald-500:oklch(.696 .17 162.48);--color-emerald-600:oklch(.596 .145 163.225);--color-emerald-700:oklch(.508 .118 165.612);--color-emerald-800:oklch(.432 .095 166.913);--color-emerald-900:oklch(.378 .077 168.94);--color-emerald-950:oklch(.262 .051 172.552);--color-teal-50:oklch(.984 .014 180.72);--color-teal-100:oklch(.953 .051 180.801);--color-teal-200:oklch(.91 .096 180.426);--color-teal-300:oklch(.855 .138 181.071);--color-teal-400:oklch(.777 .152 181.912);--color-teal-500:oklch(.704 .14 182.503);--color-teal-600:oklch(.6 .118 184.704);--color-teal-700:oklch(.511 .096 186.391);--color-teal-800:oklch(.437 .078 188.216);--color-teal-900:oklch(.386 .063 188.416);--color-teal-950:oklch(.277 .046 192.524);--color-cyan-50:oklch(.984 .019 200.873);--color-cyan-100:oklch(.956 .045 203.388);--color-cyan-200:oklch(.917 .08 205.041);--color-cyan-300:oklch(.865 .127 207.078);--color-cyan-400:oklch(.789 .154 211.53);--color-cyan-500:oklch(.715 .143 215.221);--color-cyan-600:oklch(.609 .126 221.723);--color-cyan-700:oklch(.52 .105 223.128);--color-cyan-800:oklch(.45 .085 224.283);--color-cyan-900:oklch(.398 .07 227.392);--color-cyan-950:oklch(.302 .056 229.695);--color-sky-50:oklch(.977 .013 236.62);--color-sky-100:oklch(.951 .026 236.824);--color-sky-200:oklch(.901 .058 230.902);--color-sky-300:oklch(.828 .111 230.318);--color-sky-400:oklch(.746 .16 232.661);--color-sky-500:oklch(.685 .169 237.323);--color-sky-600:oklch(.588 .158 241.966);--color-sky-700:oklch(.5 .134 242.749);--color-sky-800:oklch(.443 .11 240.79);--color-sky-900:oklch(.391 .09 240.876);--color-sky-950:oklch(.293 .066 243.157);--color-blue-50:oklch(.97 .014 254.604);--color-blue-100:oklch(.932 .032 255.585);--color-blue-200:oklch(.882 .059 254.128);--color-blue-300:oklch(.809 .105 251.813);--color-blue-400:oklch(.707 .165 254.624);--color-blue-500:oklch(.623 .214 259.815);--color-blue-600:oklch(.546 .245 262.881);--color-blue-700:oklch(.488 .243 264.376);--color-blue-800:oklch(.424 .199 265.638);--color-blue-900:oklch(.379 .146 265.522);--color-blue-950:oklch(.282 .091 267.935);--color-indigo-50:oklch(.962 .018 272.314);--color-indigo-100:oklch(.93 .034 272.788);--color-indigo-200:oklch(.87 .065 274.039);--color-indigo-300:oklch(.785 .115 274.713);--color-indigo-400:oklch(.673 .182 276.935);--color-indigo-500:oklch(.585 .233 277.117);--color-indigo-600:oklch(.511 .262 276.966);--color-indigo-700:oklch(.457 .24 277.023);--color-indigo-800:oklch(.398 .195 277.366);--color-indigo-900:oklch(.359 .144 278.697);--color-indigo-950:oklch(.257 .09 281.288);--color-violet-50:oklch(.969 .016 293.756);--color-violet-100:oklch(.943 .029 294.588);--color-violet-200:oklch(.894 .057 293.283);--color-violet-300:oklch(.811 .111 293.571);--color-violet-400:oklch(.702 .183 293.541);--color-violet-500:oklch(.606 .25 292.717);--color-violet-600:oklch(.541 .281 293.009);--color-violet-700:oklch(.491 .27 292.581);--color-violet-800:oklch(.432 .232 292.759);--color-violet-900:oklch(.38 .189 293.745);--color-violet-950:oklch(.283 .141 291.089);--color-purple-50:oklch(.977 .014 308.299);--color-purple-100:oklch(.946 .033 307.174);--color-purple-200:oklch(.902 .063 306.703);--color-purple-300:oklch(.827 .119 306.383);--color-purple-400:oklch(.714 .203 305.504);--color-purple-500:oklch(.627 .265 303.9);--color-purple-600:oklch(.558 .288 302.321);--color-purple-700:oklch(.496 .265 301.924);--color-purple-800:oklch(.438 .218 303.724);--color-purple-900:oklch(.381 .176 304.987);--color-purple-950:oklch(.291 .149 302.717);--color-fuchsia-50:oklch(.977 .017 320.058);--color-fuchsia-100:oklch(.952 .037 318.852);--color-fuchsia-200:oklch(.903 .076 319.62);--color-fuchsia-300:oklch(.833 .145 321.434);--color-fuchsia-400:oklch(.74 .238 322.16);--color-fuchsia-500:oklch(.667 .295 322.15);--color-fuchsia-600:oklch(.591 .293 322.896);--color-fuchsia-700:oklch(.518 .253 323.949);--color-fuchsia-800:oklch(.452 .211 324.591);--color-fuchsia-900:oklch(.401 .17 325.612);--color-fuchsia-950:oklch(.293 .136 325.661);--color-pink-50:oklch(.971 .014 343.198);--color-pink-100:oklch(.948 .028 342.258);--color-pink-200:oklch(.899 .061 343.231);--color-pink-300:oklch(.823 .12 346.018);--color-pink-400:oklch(.718 .202 349.761);--color-pink-500:oklch(.656 .241 354.308);--color-pink-600:oklch(.592 .249 .584);--color-pink-700:oklch(.525 .223 3.958);--color-pink-800:oklch(.459 .187 3.815);--color-pink-900:oklch(.408 .153 2.432);--color-pink-950:oklch(.284 .109 3.907);--color-rose-50:oklch(.969 .015 12.422);--color-rose-100:oklch(.941 .03 12.58);--color-rose-200:oklch(.892 .058 10.001);--color-rose-300:oklch(.81 .117 11.638);--color-rose-400:oklch(.712 .194 13.428);--color-rose-500:oklch(.645 .246 16.439);--color-rose-600:oklch(.586 .253 17.585);--color-rose-700:oklch(.514 .222 16.935);--color-rose-800:oklch(.455 .188 13.697);--color-rose-900:oklch(.41 .159 10.272);--color-rose-950:oklch(.271 .105 12.094);--color-slate-50:oklch(.984 .003 247.858);--color-slate-100:oklch(.968 .007 247.896);--color-slate-200:oklch(.929 .013 255.508);--color-slate-300:oklch(.869 .022 252.894);--color-slate-400:oklch(.704 .04 256.788);--color-slate-500:oklch(.554 .046 257.417);--color-slate-600:oklch(.446 .043 257.281);--color-slate-700:oklch(.372 .044 257.287);--color-slate-800:oklch(.279 .041 260.031);--color-slate-900:oklch(.208 .042 265.755);--color-slate-950:oklch(.129 .042 264.695);--color-gray-50:oklch(.985 .002 247.839);--color-gray-100:oklch(.967 .003 264.542);--color-gray-200:oklch(.928 .006 264.531);--color-gray-300:oklch(.872 .01 258.338);--color-gray-400:oklch(.707 .022 261.325);--color-gray-500:oklch(.551 .027 264.364);--color-gray-600:oklch(.446 .03 256.802);--color-gray-700:oklch(.373 .034 259.733);--color-gray-800:oklch(.278 .033 256.848);--color-gray-900:oklch(.21 .034 264.665);--color-gray-950:oklch(.13 .028 261.692);--color-zinc-50:oklch(.985 0 0);--color-zinc-100:oklch(.967 .001 286.375);--color-zinc-200:oklch(.92 .004 286.32);--color-zinc-300:oklch(.871 .006 286.286);--color-zinc-400:oklch(.705 .015 286.067);--color-zinc-500:oklch(.552 .016 285.938);--color-zinc-600:oklch(.442 .017 285.786);--color-zinc-700:oklch(.37 .013 285.805);--color-zinc-800:oklch(.274 .006 286.033);--color-zinc-900:oklch(.21 .006 285.885);--color-zinc-950:oklch(.141 .005 285.823);--color-neutral-50:oklch(.985 0 0);--color-neutral-100:oklch(.97 0 0);--color-neutral-200:oklch(.922 0 0);--color-neutral-300:oklch(.87 0 0);--color-neutral-400:oklch(.708 0 0);--color-neutral-500:oklch(.556 0 0);--color-neutral-600:oklch(.439 0 0);--color-neutral-700:oklch(.371 0 0);--color-neutral-800:oklch(.269 0 0);--color-neutral-900:oklch(.205 0 0);--color-neutral-950:oklch(.145 0 0);--color-stone-50:oklch(.985 .001 106.423);--color-stone-100:oklch(.97 .001 106.424);--color-stone-200:oklch(.923 .003 48.717);--color-stone-300:oklch(.869 .005 56.366);--color-stone-400:oklch(.709 .01 56.259);--color-stone-500:oklch(.553 .013 58.071);--color-stone-600:oklch(.444 .011 73.639);--color-stone-700:oklch(.374 .01 67.558);--color-stone-800:oklch(.268 .007 34.298);--color-stone-900:oklch(.216 .006 56.043);--color-stone-950:oklch(.147 .004 49.25);--color-black:#000;--color-white:#fff;--spacing:.25rem;--breakpoint-sm:40rem;--breakpoint-md:48rem;--breakpoint-lg:64rem;--breakpoint-xl:80rem;--breakpoint-2xl:96rem;--container-3xs:16rem;--container-2xs:18rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--container-3xl:48rem;--container-4xl:56rem;--container-5xl:64rem;--container-6xl:72rem;--container-7xl:80rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5/2.25);--text-5xl:3rem;--text-5xl--line-height:1;--text-6xl:3.75rem;--text-6xl--line-height:1;--text-7xl:4.5rem;--text-7xl--line-height:1;--text-8xl:6rem;--text-8xl--line-height:1;--text-9xl:8rem;--text-9xl--line-height:1;--font-weight-thin:100;--font-weight-extralight:200;--font-weight-light:300;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--font-weight-black:900;--tracking-tighter:-.05em;--tracking-tight:-.025em;--tracking-normal:0em;--tracking-wide:.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-tight:1.25;--leading-snug:1.375;--leading-normal:1.5;--leading-relaxed:1.625;--leading-loose:2;--radius-xs:.125rem;--radius-sm:calc(var(--radius) - 4px);--radius-md:calc(var(--radius) - 2px);--radius-lg:var(--radius);--radius-xl:calc(var(--radius) + 4px);--radius-2xl:1rem;--radius-3xl:1.5rem;--radius-4xl:2rem;--shadow-2xs:0 1px #0000000d;--shadow-xs:0 1px 2px 0 #0000000d;--shadow-sm:0 1px 3px 0 #0000001a,0 1px 2px -1px #0000001a;--shadow-md:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;--shadow-lg:0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a;--shadow-xl:0 20px 25px -5px #0000001a,0 8px 10px -6px #0000001a;--shadow-2xl:0 25px 50px -12px #00000040;--inset-shadow-2xs:inset 0 1px #0000000d;--inset-shadow-xs:inset 0 1px 1px #0000000d;--inset-shadow-sm:inset 0 2px 4px #0000000d;--drop-shadow-xs:0 1px 1px #0000000d;--drop-shadow-sm:0 1px 2px #00000026;--drop-shadow-md:0 3px 3px #0000001f;--drop-shadow-lg:0 4px 4px #00000026;--drop-shadow-xl:0 9px 7px #0000001a;--drop-shadow-2xl:0 25px 25px #00000026;--ease-in:cubic-bezier(.4,0,1,1);--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0,0,.2,1)infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--animate-bounce:bounce 1s infinite;--blur-xs:4px;--blur-sm:8px;--blur-md:12px;--blur-lg:16px;--blur-xl:24px;--blur-2xl:40px;--blur-3xl:64px;--perspective-dramatic:100px;--perspective-near:300px;--perspective-normal:500px;--perspective-midrange:800px;--perspective-distant:1200px;--aspect-video:16/9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-font-feature-settings:var(--font-sans--font-feature-settings);--default-font-variation-settings:var(--font-sans--font-variation-settings);--default-mono-font-family:var(--font-mono);--default-mono-font-feature-settings:var(--font-mono--font-feature-settings);--default-mono-font-variation-settings:var(--font-mono--font-variation-settings);--color-background:var(--background);--color-foreground:var(--foreground);--color-card:var(--card);--color-card-foreground:var(--card-foreground);--color-popover:var(--popover);--color-popover-foreground:var(--popover-foreground);--color-primary:var(--primary);--color-primary-foreground:var(--primary-foreground);--color-secondary:var(--secondary);--color-secondary-foreground:var(--secondary-foreground);--color-muted:var(--muted);--color-muted-foreground:var(--muted-foreground);--color-accent:var(--accent);--color-accent-foreground:var(--accent-foreground);--color-destructive:var(--destructive);--color-destructive-foreground:var(--destructive-foreground);--color-border:var(--border);--color-input:var(--input);--color-ring:var(--ring);--color-chart-1:var(--chart-1);--color-chart-2:var(--chart-2);--color-chart-3:var(--chart-3);--color-chart-4:var(--chart-4);--color-chart-5:var(--chart-5);--color-sidebar-ring:var(--sidebar-ring);--color-sidebar-border:var(--sidebar-border);--color-sidebar-accent-foreground:var(--sidebar-accent-foreground);--color-sidebar-accent:var(--sidebar-accent);--color-sidebar-primary-foreground:var(--sidebar-primary-foreground);--color-sidebar-primary:var(--sidebar-primary);--color-sidebar-foreground:var(--sidebar-foreground);--color-sidebar:var(--sidebar-background);--animate-accordion-down:accordion-down .2s ease-out;--animate-accordion-up:accordion-up .2s ease-out}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}body{line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1;color:color-mix(in oklab,currentColor 50%,transparent)}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border);outline-color:color-mix(in oklab,var(--ring)50%,transparent)}body{background-color:var(--background);color:var(--foreground)}*{scrollbar-color:initial;scrollbar-width:initial}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.\!absolute{position:absolute!important}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.top-1\/2{top:50%}.top-2{top:calc(var(--spacing)*2)}.top-4{top:calc(var(--spacing)*4)}.top-12{top:calc(var(--spacing)*12)}.top-\[50\%\]{top:50%}.right-0{right:calc(var(--spacing)*0)}.right-2{right:calc(var(--spacing)*2)}.right-4{right:calc(var(--spacing)*4)}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-2{bottom:calc(var(--spacing)*2)}.bottom-4{bottom:calc(var(--spacing)*4)}.left-0{left:calc(var(--spacing)*0)}.left-1\/2{left:50%}.left-2{left:calc(var(--spacing)*2)}.left-\[50\%\]{left:50%}.isolate{isolation:isolate}.z-50{z-index:50}.\!container{width:100%!important}@media (width>=40rem){.\!container{max-width:40rem!important}}@media (width>=48rem){.\!container{max-width:48rem!important}}@media (width>=64rem){.\!container{max-width:64rem!important}}@media (width>=80rem){.\!container{max-width:80rem!important}}@media (width>=96rem){.\!container{max-width:96rem!important}}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.\!m-0{margin:calc(var(--spacing)*0)!important}.m-0{margin:calc(var(--spacing)*0)}.-mx-1{margin-inline:calc(var(--spacing)*-1)}.mx-1{margin-inline:calc(var(--spacing)*1)}.my-1{margin-block:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-4{margin-top:calc(var(--spacing)*4)}.mr-1{margin-right:calc(var(--spacing)*1)}.mr-2{margin-right:calc(var(--spacing)*2)}.mr-4{margin-right:calc(var(--spacing)*4)}.mr-6{margin-right:calc(var(--spacing)*6)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-2{margin-left:calc(var(--spacing)*2)}.ml-auto{margin-left:auto}.scrollbar{scrollbar-width:auto;scrollbar-color:var(--scrollbar-thumb,initial)var(--scrollbar-track,initial)}.scrollbar::-webkit-scrollbar-track{background-color:var(--scrollbar-track);border-radius:var(--scrollbar-track-radius)}.scrollbar::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb);border-radius:var(--scrollbar-thumb-radius)}.scrollbar::-webkit-scrollbar-corner{background-color:var(--scrollbar-corner);border-radius:var(--scrollbar-corner-radius)}.scrollbar::-webkit-scrollbar{width:var(--scrollbar-width,16px);height:var(--scrollbar-height,16px);display:block}.line-clamp-1{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.inline-grid{display:inline-grid}.list-item{display:list-item}.table{display:table}.table-cell{display:table-cell}.table-row{display:table-row}.aspect-square{aspect-ratio:1}.\!size-full{width:100%!important;height:100%!important}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.size-7{width:calc(var(--spacing)*7);height:calc(var(--spacing)*7)}.size-8{width:calc(var(--spacing)*8);height:calc(var(--spacing)*8)}.size-10{width:calc(var(--spacing)*10);height:calc(var(--spacing)*10)}.size-full{width:100%;height:100%}.h-1\/2{height:50%}.h-2\.5{height:calc(var(--spacing)*2.5)}.h-3{height:calc(var(--spacing)*3)}.h-3\.5{height:calc(var(--spacing)*3.5)}.h-4{height:calc(var(--spacing)*4)}.h-6{height:calc(var(--spacing)*6)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.h-11{height:calc(var(--spacing)*11)}.h-40{height:calc(var(--spacing)*40)}.h-52{height:calc(var(--spacing)*52)}.h-84{height:calc(var(--spacing)*84)}.h-\[1px\]{height:1px}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-fit{height:fit-content}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-8{max-height:calc(var(--spacing)*8)}.max-h-48{max-height:calc(var(--spacing)*48)}.max-h-96{max-height:calc(var(--spacing)*96)}.max-h-\[300px\]{max-height:300px}.max-h-full{max-height:100%}.min-h-0{min-height:calc(var(--spacing)*0)}.w-0{width:calc(var(--spacing)*0)}.w-2\.5{width:calc(var(--spacing)*2.5)}.w-3{width:calc(var(--spacing)*3)}.w-3\.5{width:calc(var(--spacing)*3.5)}.w-4{width:calc(var(--spacing)*4)}.w-6{width:calc(var(--spacing)*6)}.w-16{width:calc(var(--spacing)*16)}.w-24{width:calc(var(--spacing)*24)}.w-\[1px\]{width:1px}.w-auto{width:auto}.w-full{width:100%}.w-screen{width:100vw}.max-w-80{max-width:calc(var(--spacing)*80)}.max-w-\[80\%\]{max-width:80%}.max-w-lg{max-width:var(--container-lg)}.max-w-none{max-width:none}.max-w-sm{max-width:var(--container-sm)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-24{min-width:calc(var(--spacing)*24)}.min-w-\[8rem\]{min-width:8rem}.min-w-\[300px\]{min-width:300px}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.flex-1{flex:1}.flex-auto{flex:auto}.flex-shrink,.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.caption-bottom{caption-side:bottom}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-20{--tw-translate-y:calc(var(--spacing)*-20);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-\[-50\%\]{--tw-translate-x:-50%;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-0{--tw-translate-y:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-\[-50\%\]{--tw-translate-y:-50%;translate:var(--tw-translate-x)var(--tw-translate-y)}.scale-125{--tw-scale-x:125%;--tw-scale-y:125%;--tw-scale-z:125%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-3d{scale:var(--tw-scale-x)var(--tw-scale-y)var(--tw-scale-z)}.transform{transform:var(--tw-rotate-x)var(--tw-rotate-y)var(--tw-rotate-z)var(--tw-skew-x)var(--tw-skew-y)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-help{cursor:help}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.resize{resize:both}.\[appearance\:textfield\]{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.columns-2{columns:2}.columns-3{columns:3}.columns-4{columns:4}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.place-items-center{place-items:center}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-2\.5{gap:calc(var(--spacing)*2.5)}.gap-4{gap:calc(var(--spacing)*4)}.gap-6{gap:calc(var(--spacing)*6)}.gap-px{gap:1px}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}.self-center{align-self:center}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.\!rounded-none{border-radius:0!important}.rounded{border-radius:.25rem}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:calc(var(--radius) + 4px)}.rounded-l-none{border-top-left-radius:0;border-bottom-left-radius:0}.rounded-tr-none{border-top-right-radius:0}.rounded-br-none{border-bottom-right-radius:0}.border,.border-1{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.\!border-none{--tw-border-style:none!important;border-style:none!important}.border-dashed{--tw-border-style:dashed;border-style:dashed}.\!border-input{border-color:var(--input)!important}.border-border\/40{border-color:color-mix(in oklab,var(--border)40%,transparent)}.border-destructive\/50{border-color:color-mix(in oklab,var(--destructive)50%,transparent)}.border-input{border-color:var(--input)}.border-muted-foreground\/25{border-color:color-mix(in oklab,var(--muted-foreground)25%,transparent)}.border-muted-foreground\/50{border-color:color-mix(in oklab,var(--muted-foreground)50%,transparent)}.border-primary{border-color:var(--primary)}.border-t-transparent{border-top-color:#0000}.border-l-transparent{border-left-color:#0000}.\!bg-background{background-color:var(--background)!important}.\!bg-emerald-400{background-color:var(--color-emerald-400)!important}.bg-background{background-color:var(--background)}.bg-background\/60{background-color:color-mix(in oklab,var(--background)60%,transparent)}.bg-background\/80{background-color:color-mix(in oklab,var(--background)80%,transparent)}.bg-background\/90{background-color:color-mix(in oklab,var(--background)90%,transparent)}.bg-background\/95{background-color:color-mix(in oklab,var(--background)95%,transparent)}.bg-black\/80{background-color:color-mix(in oklab,var(--color-black)80%,transparent)}.bg-border{background-color:var(--border)}.bg-card{background-color:var(--card)}.bg-destructive{background-color:var(--destructive)}.bg-foreground\/10{background-color:color-mix(in oklab,var(--foreground)10%,transparent)}.bg-green-500{background-color:var(--color-green-500)}.bg-muted{background-color:var(--muted)}.bg-muted\/50{background-color:color-mix(in oklab,var(--muted)50%,transparent)}.bg-popover{background-color:var(--popover)}.bg-primary{background-color:var(--primary)}.bg-primary-foreground\/60{background-color:color-mix(in oklab,var(--primary-foreground)60%,transparent)}.bg-primary\/5{background-color:color-mix(in oklab,var(--primary)5%,transparent)}.bg-red-100{background-color:var(--color-red-100)}.bg-red-500{background-color:var(--color-red-500)}.bg-red-700{background-color:var(--color-red-700)}.bg-secondary{background-color:var(--secondary)}.bg-transparent{background-color:#0000}.object-cover{object-fit:cover}.\!p-0{padding:calc(var(--spacing)*0)!important}.\!p-2{padding:calc(var(--spacing)*2)!important}.p-0{padding:calc(var(--spacing)*0)}.p-1{padding:calc(var(--spacing)*1)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-6{padding:calc(var(--spacing)*6)}.p-16{padding:calc(var(--spacing)*16)}.p-\[1px\]{padding:1px}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-5{padding-inline:calc(var(--spacing)*5)}.px-8{padding-inline:calc(var(--spacing)*8)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\.5{padding-block:calc(var(--spacing)*2.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-6{padding-block:calc(var(--spacing)*6)}.pt-0{padding-top:calc(var(--spacing)*0)}.pt-4{padding-top:calc(var(--spacing)*4)}.pr-2{padding-right:calc(var(--spacing)*2)}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-12{padding-bottom:calc(var(--spacing)*12)}.pl-1{padding-left:calc(var(--spacing)*1)}.pl-8{padding-left:calc(var(--spacing)*8)}.text-center{text-align:center}.text-left{text-align:left}.align-middle{vertical-align:middle}.font-mono{font-family:var(--font-mono)}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-none{--tw-leading:1;line-height:1}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.break-words{overflow-wrap:break-word}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.\!text-zinc-50{color:var(--color-zinc-50)!important}.text-blue-600{color:var(--color-blue-600)}.text-card-foreground{color:var(--card-foreground)}.text-current{color:currentColor}.text-destructive{color:var(--destructive)}.text-destructive-foreground{color:var(--destructive-foreground)}.text-emerald-400{color:var(--color-emerald-400)}.text-foreground{color:var(--foreground)}.text-foreground\/80{color:color-mix(in oklab,var(--foreground)80%,transparent)}.text-green-600{color:var(--color-green-600)}.text-muted{color:var(--muted)}.text-muted-foreground{color:var(--muted-foreground)}.text-muted-foreground\/70{color:color-mix(in oklab,var(--muted-foreground)70%,transparent)}.text-popover-foreground{color:var(--popover-foreground)}.text-primary{color:var(--primary)}.text-primary-foreground{color:var(--primary-foreground)}.text-primary\/60{color:color-mix(in oklab,var(--primary)60%,transparent)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-secondary-foreground{color:var(--secondary-foreground)}.text-sky-300{color:var(--color-sky-300)}.text-teal-600{color:var(--color-teal-600)}.text-teal-600\/90{color:color-mix(in oklab,var(--color-teal-600)90%,transparent)}.text-white{color:var(--color-white)}.text-yellow-400\/90{color:color-mix(in oklab,var(--color-yellow-400)90%,transparent)}.text-yellow-600{color:var(--color-yellow-600)}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.overline{text-decoration-line:overline}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.opacity-100{opacity:1}.ring{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentColor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_8px_rgba\(0\,0\,0\,0\.2\)\]{--tw-shadow:0 0 8px var(--tw-shadow-color,#0003);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_12px_rgba\(34\,197\,94\,0\.4\)\]{--tw-shadow:0 0 12px var(--tw-shadow-color,#22c55e66);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_12px_rgba\(239\,68\,68\,0\.4\)\]{--tw-shadow:0 0 12px var(--tw-shadow-color,#ef444466);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-offset-background{--tw-ring-offset-color:var(--background)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.invert{--tw-invert:invert(100%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.\!filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)!important}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-lg{--tw-backdrop-blur:blur(var(--blur-lg));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.duration-2000{--tw-duration:2s;transition-duration:2s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.animate-in{--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial;animation-name:enter;animation-duration:.15s}.duration-200{animation-duration:.2s}.duration-300{animation-duration:.3s}.duration-500{animation-duration:.5s}.duration-2000{animation-duration:2s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.fade-in-0{--tw-enter-opacity:0}.outline-none{--tw-outline-style:none;outline-style:none}.paused{animation-play-state:paused}.repeat-1{animation-iteration-count:1}.running{animation-play-state:running}.select-none{-webkit-user-select:none;user-select:none}.zoom-in{--tw-enter-scale:0}.zoom-in-95{--tw-enter-scale:.95}.zoom-out{--tw-exit-scale:0}.peer-disabled\:cursor-not-allowed:is(:where(.peer):disabled~*){cursor:not-allowed}.peer-disabled\:opacity-70:is(:where(.peer):disabled~*){opacity:.7}.file\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\:bg-transparent::file-selector-button{background-color:#0000}.file\:text-sm::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.file\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.file\:text-foreground::file-selector-button{color:var(--foreground)}.placeholder\:text-muted-foreground::placeholder{color:var(--muted-foreground)}@media (hover:hover){.hover\:w-fit:hover{width:fit-content}.hover\:bg-accent:hover{background-color:var(--accent)}.hover\:bg-background\/60:hover{background-color:color-mix(in oklab,var(--background)60%,transparent)}.hover\:bg-destructive\/90:hover{background-color:color-mix(in oklab,var(--destructive)90%,transparent)}.hover\:bg-muted\/25:hover{background-color:color-mix(in oklab,var(--muted)25%,transparent)}.hover\:bg-muted\/50:hover{background-color:color-mix(in oklab,var(--muted)50%,transparent)}.hover\:bg-primary\/5:hover{background-color:color-mix(in oklab,var(--primary)5%,transparent)}.hover\:bg-primary\/20:hover{background-color:color-mix(in oklab,var(--primary)20%,transparent)}.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab,var(--primary)90%,transparent)}.hover\:bg-secondary\/80:hover{background-color:color-mix(in oklab,var(--secondary)80%,transparent)}.hover\:text-accent-foreground:hover{color:var(--accent-foreground)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}}.focus\:bg-accent:focus{background-color:var(--accent)}.focus\:text-accent-foreground:focus{color:var(--accent-foreground)}.focus\:ring-0:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + var(--tw-ring-offset-width))var(--tw-ring-color,currentColor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentColor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-ring:focus{--tw-ring-color:var(--ring)}.focus\:ring-offset-0:focus{--tw-ring-offset-width:0px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus\:outline-0:focus{outline-style:var(--tw-outline-style);outline-width:0}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\:relative:focus-visible{position:relative}.focus-visible\:ring-1:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentColor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentColor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color:var(--ring)}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.active\:right-0:active{right:calc(var(--spacing)*0)}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[disabled\=true\]\:pointer-events-none[data-disabled=true]{pointer-events:none}.data-\[disabled\=true\]\:opacity-50[data-disabled=true]{opacity:.5}.data-\[selected\=\'true\'\]\:bg-accent[data-selected=true]{background-color:var(--accent)}.data-\[selected\=true\]\:text-accent-foreground[data-selected=true]{color:var(--accent-foreground)}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:-.5rem}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:.5rem}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:-.5rem}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:.5rem}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:var(--background)}.data-\[state\=active\]\:text-foreground[data-state=active]{color:var(--foreground)}.data-\[state\=active\]\:shadow-sm[data-state=active]{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:var(--primary)}.data-\[state\=checked\]\:text-primary-foreground[data-state=checked]{color:var(--primary-foreground)}.data-\[state\=closed\]\:animate-out[data-state=closed]{--tw-exit-opacity:initial;--tw-exit-scale:initial;--tw-exit-rotate:initial;--tw-exit-translate-x:initial;--tw-exit-translate-y:initial;animation-name:exit;animation-duration:.15s}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y:-48%}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:var(--accent)}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:var(--muted-foreground)}.data-\[state\=open\]\:animate-in[data-state=open]{--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial;animation-name:enter;animation-duration:.15s}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y:-48%}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:var(--muted)}@supports ((-webkit-backdrop-filter:var(--tw)) or (backdrop-filter:var(--tw))){.supports-\[backdrop-filter\]\:bg-background\/60{background-color:color-mix(in oklab,var(--background)60%,transparent)}}@media (width>=40rem){.sm\:mt-0{margin-top:calc(var(--spacing)*0)}.sm\:max-w-xl{max-width:var(--container-xl)}.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}:where(.sm\:space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:px-5{padding-inline:calc(var(--spacing)*5)}.sm\:text-left{text-align:left}}@media (width>=48rem){.md\:inline-block{display:inline-block}.md\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}.dark\:border-destructive:is(.dark *){border-color:var(--destructive)}.dark\:bg-red-950:is(.dark *){background-color:var(--color-red-950)}.dark\:text-red-400:is(.dark *){color:var(--color-red-400)}.\[\&_\[cmdk-group-heading\]\]\:px-2 [cmdk-group-heading]{padding-inline:calc(var(--spacing)*2)}.\[\&_\[cmdk-group-heading\]\]\:py-1\.5 [cmdk-group-heading]{padding-block:calc(var(--spacing)*1.5)}.\[\&_\[cmdk-group-heading\]\]\:text-xs [cmdk-group-heading]{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\[cmdk-group-heading\]\]\:font-medium [cmdk-group-heading]{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\[cmdk-group-heading\]\]\:text-muted-foreground [cmdk-group-heading]{color:var(--muted-foreground)}.\[\&_\[cmdk-group\]\]\:px-2 [cmdk-group]{padding-inline:calc(var(--spacing)*2)}.\[\&_\[cmdk-group\]\:not\(\[hidden\]\)_\~\[cmdk-group\]\]\:pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:calc(var(--spacing)*0)}.\[\&_\[cmdk-input-wrapper\]_svg\]\:h-5 [cmdk-input-wrapper] svg{height:calc(var(--spacing)*5)}.\[\&_\[cmdk-input-wrapper\]_svg\]\:w-5 [cmdk-input-wrapper] svg{width:calc(var(--spacing)*5)}.\[\&_\[cmdk-input\]\]\:h-12 [cmdk-input]{height:calc(var(--spacing)*12)}.\[\&_\[cmdk-item\]\]\:px-2 [cmdk-item]{padding-inline:calc(var(--spacing)*2)}.\[\&_\[cmdk-item\]\]\:py-3 [cmdk-item]{padding-block:calc(var(--spacing)*3)}.\[\&_\[cmdk-item\]_svg\]\:h-5 [cmdk-item] svg{height:calc(var(--spacing)*5)}.\[\&_\[cmdk-item\]_svg\]\:w-5 [cmdk-item] svg{width:calc(var(--spacing)*5)}.\[\&_p\]\:leading-relaxed p{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-4 svg{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_tr\]\:border-b tr{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-style:var(--tw-border-style);border-width:0}.\[\&\:\:-webkit-inner-spin-button\]\:appearance-none::-webkit-inner-spin-button{-webkit-appearance:none;-moz-appearance:none;appearance:none}.\[\&\:\:-webkit-outer-spin-button\]\:appearance-none::-webkit-outer-spin-button{-webkit-appearance:none;-moz-appearance:none;appearance:none}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:calc(var(--spacing)*0)}.\[\&\>\[role\=checkbox\]\]\:translate-y-\[2px\]>[role=checkbox]{--tw-translate-y:2px;translate:var(--tw-translate-x)var(--tw-translate-y)}.\[\&\>span\]\:line-clamp-1>span{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.\[\&\>svg\]\:absolute>svg{position:absolute}.\[\&\>svg\]\:top-4>svg{top:calc(var(--spacing)*4)}.\[\&\>svg\]\:left-4>svg{left:calc(var(--spacing)*4)}.\[\&\>svg\]\:text-destructive>svg{color:var(--destructive)}.\[\&\>svg\]\:text-foreground>svg{color:var(--foreground)}.\[\&\>svg\+div\]\:translate-y-\[-3px\]>svg+div{--tw-translate-y:-3px;translate:var(--tw-translate-x)var(--tw-translate-y)}.\[\&\>svg\~\*\]\:pl-7>svg~*{padding-left:calc(var(--spacing)*7)}.\[\&\>tr\]\:last\:border-b-0>tr:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}}:root{--background:#fff;--foreground:#09090b;--card:#fff;--card-foreground:#09090b;--popover:#fff;--popover-foreground:#09090b;--primary:#18181b;--primary-foreground:#fafafa;--secondary:#f4f4f5;--secondary-foreground:#18181b;--muted:#f4f4f5;--muted-foreground:#71717a;--accent:#f4f4f5;--accent-foreground:#18181b;--destructive:#ef4444;--destructive-foreground:#fafafa;--border:#e4e4e7;--input:#e4e4e7;--ring:#09090b;--chart-1:#e76e50;--chart-2:#2a9d90;--chart-3:#274754;--chart-4:#e8c468;--chart-5:#f4a462;--radius:.6rem;--sidebar-background:#fafafa;--sidebar-foreground:#3f3f46;--sidebar-primary:#18181b;--sidebar-primary-foreground:#fafafa;--sidebar-accent:#f4f4f5;--sidebar-accent-foreground:#18181b;--sidebar-border:#e5e7eb;--sidebar-ring:#3b82f6}.dark{--background:#09090b;--foreground:#fafafa;--card:#09090b;--card-foreground:#fafafa;--popover:#09090b;--popover-foreground:#fafafa;--primary:#fafafa;--primary-foreground:#18181b;--secondary:#27272a;--secondary-foreground:#fafafa;--muted:#27272a;--muted-foreground:#a1a1aa;--accent:#27272a;--accent-foreground:#fafafa;--destructive:#7f1d1d;--destructive-foreground:#fafafa;--border:#27272a;--input:#27272a;--ring:#d4d4d8;--chart-1:#2662d9;--chart-2:#2eb88a;--chart-3:#e88c30;--chart-4:#af57db;--chart-5:#e23670;--sidebar-background:#18181b;--sidebar-foreground:#f4f4f5;--sidebar-primary:#1d4ed8;--sidebar-primary-foreground:#fff;--sidebar-accent:#27272a;--sidebar-accent-foreground:#f4f4f5;--sidebar-border:#27272a;--sidebar-ring:#3b82f6}::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:5px}::-webkit-scrollbar-track{background-color:#f2f2f2}.dark ::-webkit-scrollbar-thumb{background-color:#e6e6e6}.dark ::-webkit-scrollbar-track{background-color:#000}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0)scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1))rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0)scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1))rotate(var(--tw-exit-rotate,0))}}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}}@keyframes bounce{0%,to{animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}@keyframes accordion-down{0%{height:0}to{height:var(--radix-accordion-content-height)}}@keyframes accordion-up{0%{height:var(--radix-accordion-content-height)}to{height:0}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false;initial-value:rotateX(0)}@property --tw-rotate-y{syntax:"*";inherits:false;initial-value:rotateY(0)}@property --tw-rotate-z{syntax:"*";inherits:false;initial-value:rotateZ(0)}@property --tw-skew-x{syntax:"*";inherits:false;initial-value:skewX(0)}@property --tw-skew-y{syntax:"*";inherits:false;initial-value:skewY(0)}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}:root{--sigma-background-color:#fff;--sigma-controls-background-color:#fff;--sigma-controls-background-color-hover:rgba(0,0,0,.2);--sigma-controls-border-color:rgba(0,0,0,.2);--sigma-controls-color:#000;--sigma-controls-zindex:100;--sigma-controls-margin:5px;--sigma-controls-size:30px}div.react-sigma{height:100%;width:100%;position:relative;background:var(--sigma-background-color)}div.sigma-container{height:100%;width:100%}.react-sigma-controls{position:absolute;z-index:var(--sigma-controls-zindex);border:2px solid var(--sigma-controls-border-color);border-radius:4px;color:var(--sigma-controls-color);background-color:var(--sigma-controls-background-color)}.react-sigma-controls.bottom-right{bottom:var(--sigma-controls-margin);right:var(--sigma-controls-margin)}.react-sigma-controls.bottom-left{bottom:var(--sigma-controls-margin);left:var(--sigma-controls-margin)}.react-sigma-controls.top-right{top:var(--sigma-controls-margin);right:var(--sigma-controls-margin)}.react-sigma-controls.top-left{top:var(--sigma-controls-margin);left:var(--sigma-controls-margin)}.react-sigma-controls:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.react-sigma-controls:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.react-sigma-control{width:var(--sigma-controls-size);height:var(--sigma-controls-size);line-height:var(--sigma-controls-size);background-color:var(--sigma-controls-background-color);border-bottom:1px solid var(--sigma-controls-border-color)}.react-sigma-control:last-child{border-bottom:none}.react-sigma-control>*{box-sizing:border-box}.react-sigma-control>button{display:block;border:none;margin:0;padding:0;width:var(--sigma-controls-size);height:var(--sigma-controls-size);line-height:var(--sigma-controls-size);background-position:center;background-size:50%;background-repeat:no-repeat;background-color:var(--sigma-controls-background-color);clip:rect(0,0,0,0)}.react-sigma-control>button:hover{background-color:var(--sigma-controls-background-color-hover)}.react-sigma-search{background-color:var(--sigma-controls-background-color)}.react-sigma-search label{visibility:hidden}.react-sigma-search input{color:var(--sigma-controls-color);background-color:var(--sigma-controls-background-color);font-size:1em;width:100%;margin:0;border:none;padding:var(--sigma-controls-margin);box-sizing:border-box}:root{--sigma-grey-color:#ccc}.react-sigma .option.hoverable{cursor:pointer!important}.react-sigma .text-ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.react-sigma .react-select__clear-indicator{cursor:pointer!important}.react-sigma .text-muted{color:var(--sigma-grey-color)}.react-sigma .text-italic{font-style:italic}.react-sigma .text-center{text-align:center}.react-sigma .graph-search{min-width:250px}.react-sigma .graph-search .option{padding:2px 8px}.react-sigma .graph-search .dropdown-indicator{font-size:1.25em;padding:4px}.react-sigma .graph-search .option.selected{background-color:var(--sigma-grey-color)}.react-sigma .node .render{position:relative;display:inline-block;width:1em;height:1em;border-radius:1em;background-color:var(--sigma-grey-color);margin-right:8px}.react-sigma .node{display:flex;flex-direction:row;align-items:center}.react-sigma .node .render{flex-grow:0;flex-shrink:0;margin-right:0 .25em}.react-sigma .node .label{flex-grow:1;flex-shrink:1}.react-sigma .edge{display:flex;flex-direction:column;align-items:flex-start;flex-grow:0;flex-shrink:0;flex-wrap:nowrap}.react-sigma .edge .node{font-size:.7em}.react-sigma .edge .body{display:flex;flex-direction:row;flex-grow:1;flex-shrink:1;min-height:.6em}.react-sigma .edge .body .render{display:flex;flex-direction:column;margin:0 2px}.react-sigma .edge .body .render .dash,.react-sigma .edge .body .render .dotted{display:inline-block;width:0;margin:0 2px;border:2px solid #ccc;flex-grow:1;flex-shrink:1}.react-sigma .edge .body .render .dotted{border-style:dotted}.react-sigma .edge .body .render .arrow{width:0;height:0;border-left:.3em solid transparent;border-right:.3em solid transparent;border-top:.6em solid red;flex-shrink:0;flex-grow:0;border-left-width:.3em;border-right-width:.3em}.react-sigma .edge .body .label{flex-grow:1;flex-shrink:1;text-align:center} diff --git a/lightrag/api/webui/assets/index-gr1CNi7P.js b/lightrag/api/webui/assets/index-gr1CNi7P.js new file mode 100644 index 00000000..0282850c --- /dev/null +++ b/lightrag/api/webui/assets/index-gr1CNi7P.js @@ -0,0 +1,1098 @@ +var aj=Object.defineProperty;var oj=(e,t,n)=>t in e?aj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var mi=(e,t,n)=>oj(e,typeof t!="symbol"?t+"":t,n);function sj(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();function fn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function lj(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var Fp={exports:{}},_l={};/** + * @license React + * react-jsx-runtime.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var F0;function uj(){if(F0)return _l;F0=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,o){var l=null;if(o!==void 0&&(l=""+o),i.key!==void 0&&(l=""+i.key),"key"in i){o={};for(var u in i)u!=="key"&&(o[u]=i[u])}else o=i;return i=o.ref,{$$typeof:e,type:r,key:l,ref:i!==void 0?i:null,props:o}}return _l.Fragment=t,_l.jsx=n,_l.jsxs=n,_l}var I0;function cj(){return I0||(I0=1,Fp.exports=uj()),Fp.exports}var S=cj(),Ip={exports:{}},nt={};/** + * @license React + * react.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var G0;function fj(){if(G0)return nt;G0=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.iterator;function v(A){return A===null||typeof A!="object"?null:(A=m&&A[m]||A["@@iterator"],typeof A=="function"?A:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,x={};function k(A,H,M){this.props=A,this.context=H,this.refs=x,this.updater=M||g}k.prototype.isReactComponent={},k.prototype.setState=function(A,H){if(typeof A!="object"&&typeof A!="function"&&A!=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,A,H,"setState")},k.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function C(){}C.prototype=k.prototype;function _(A,H,M){this.props=A,this.context=H,this.refs=x,this.updater=M||g}var T=_.prototype=new C;T.constructor=_,w(T,k.prototype),T.isPureReactComponent=!0;var N=Array.isArray,D={H:null,A:null,T:null,S:null},L=Object.prototype.hasOwnProperty;function R(A,H,M,O,X,re){return M=re.ref,{$$typeof:e,type:A,key:H,ref:M!==void 0?M:null,props:re}}function U(A,H){return R(A.type,H,void 0,void 0,void 0,A.props)}function P(A){return typeof A=="object"&&A!==null&&A.$$typeof===e}function z(A){var H={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(M){return H[M]})}var V=/\/+/g;function q(A,H){return typeof A=="object"&&A!==null&&A.key!=null?z(""+A.key):H.toString(36)}function I(){}function Y(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(I,I):(A.status="pending",A.then(function(H){A.status==="pending"&&(A.status="fulfilled",A.value=H)},function(H){A.status==="pending"&&(A.status="rejected",A.reason=H)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function Z(A,H,M,O,X){var re=typeof A;(re==="undefined"||re==="boolean")&&(A=null);var ue=!1;if(A===null)ue=!0;else switch(re){case"bigint":case"string":case"number":ue=!0;break;case"object":switch(A.$$typeof){case e:case t:ue=!0;break;case p:return ue=A._init,Z(ue(A._payload),H,M,O,X)}}if(ue)return X=X(A),ue=O===""?"."+q(A,0):O,N(X)?(M="",ue!=null&&(M=ue.replace(V,"$&/")+"/"),Z(X,H,M,"",function(Ce){return Ce})):X!=null&&(P(X)&&(X=U(X,M+(X.key==null||A&&A.key===X.key?"":(""+X.key).replace(V,"$&/")+"/")+ue)),H.push(X)),1;ue=0;var ae=O===""?".":O+":";if(N(A))for(var oe=0;oe>>1,A=B[K];if(0>>1;Ki(O,F))Xi(re,O)?(B[K]=re,B[X]=F,K=X):(B[K]=O,B[M]=F,K=M);else if(Xi(re,F))B[K]=re,B[X]=F,K=X;else break e}}return G}function i(B,G){var F=B.sortIndex-G.sortIndex;return F!==0?F:B.id-G.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 l=Date,u=l.now();e.unstable_now=function(){return l.now()-u}}var f=[],d=[],p=1,m=null,v=3,g=!1,w=!1,x=!1,k=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;function T(B){for(var G=n(d);G!==null;){if(G.callback===null)r(d);else if(G.startTime<=B)r(d),G.sortIndex=G.expirationTime,t(f,G);else break;G=n(d)}}function N(B){if(x=!1,T(B),!w)if(n(f)!==null)w=!0,Y();else{var G=n(d);G!==null&&Z(N,G.startTime-B)}}var D=!1,L=-1,R=5,U=-1;function P(){return!(e.unstable_now()-UB&&P());){var K=m.callback;if(typeof K=="function"){m.callback=null,v=m.priorityLevel;var A=K(m.expirationTime<=B);if(B=e.unstable_now(),typeof A=="function"){m.callback=A,T(B),G=!0;break t}m===n(f)&&r(f),T(B)}else r(f);m=n(f)}if(m!==null)G=!0;else{var H=n(d);H!==null&&Z(N,H.startTime-B),G=!1}}break e}finally{m=null,v=F,g=!1}G=void 0}}finally{G?V():D=!1}}}var V;if(typeof _=="function")V=function(){_(z)};else if(typeof MessageChannel<"u"){var q=new MessageChannel,I=q.port2;q.port1.onmessage=z,V=function(){I.postMessage(null)}}else V=function(){k(z,0)};function Y(){D||(D=!0,V())}function Z(B,G){L=k(function(){B(e.unstable_now())},G)}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(B){B.callback=null},e.unstable_continueExecution=function(){w||g||(w=!0,Y())},e.unstable_forceFrameRate=function(B){0>B||125K?(B.sortIndex=F,t(d,B),n(f)===null&&B===n(d)&&(x?(C(L),L=-1):x=!0,Z(N,F-K))):(B.sortIndex=A,t(f,B),w||g||(w=!0,Y())),B},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(B){var G=v;return function(){var F=v;v=G;try{return B.apply(this,arguments)}finally{v=F}}}}(Bp)),Bp}var $0;function pj(){return $0||($0=1,Up.exports=hj()),Up.exports}var $p={exports:{}},mn={};/** + * @license React + * react-dom.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var H0;function mj(){if(H0)return mn;H0=1;var e=Vf();function t(f){var d="https://react.dev/errors/"+f;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),$p.exports=mj(),$p.exports}/** + * @license React + * react-dom-client.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var q0;function gj(){if(q0)return kl;q0=1;var e=pj(),t=Vf(),n=R_();function r(a){var s="https://react.dev/errors/"+a;if(1)":-1y||W[h]!==J[y]){var me=` +`+W[h].replace(" at new "," at ");return a.displayName&&me.includes("")&&(me=me.replace("",a.displayName)),me}while(1<=h&&0<=y);break}}}finally{Y=!1,Error.prepareStackTrace=c}return(c=a?a.displayName||a.name:"")?I(c):""}function B(a){switch(a.tag){case 26:case 27:case 5:return I(a.type);case 16:return I("Lazy");case 13:return I("Suspense");case 19:return I("SuspenseList");case 0:case 15:return a=Z(a.type,!1),a;case 11:return a=Z(a.type.render,!1),a;case 1:return a=Z(a.type,!0),a;default:return""}}function G(a){try{var s="";do s+=B(a),a=a.return;while(a);return s}catch(c){return` +Error generating stack: `+c.message+` +`+c.stack}}function F(a){var s=a,c=a;if(a.alternate)for(;s.return;)s=s.return;else{a=s;do s=a,s.flags&4098&&(c=s.return),a=s.return;while(a)}return s.tag===3?c:null}function K(a){if(a.tag===13){var s=a.memoizedState;if(s===null&&(a=a.alternate,a!==null&&(s=a.memoizedState)),s!==null)return s.dehydrated}return null}function A(a){if(F(a)!==a)throw Error(r(188))}function H(a){var s=a.alternate;if(!s){if(s=F(a),s===null)throw Error(r(188));return s!==a?null:a}for(var c=a,h=s;;){var y=c.return;if(y===null)break;var b=y.alternate;if(b===null){if(h=y.return,h!==null){c=h;continue}break}if(y.child===b.child){for(b=y.child;b;){if(b===c)return A(y),a;if(b===h)return A(y),s;b=b.sibling}throw Error(r(188))}if(c.return!==h.return)c=y,h=b;else{for(var j=!1,$=y.child;$;){if($===c){j=!0,c=y,h=b;break}if($===h){j=!0,h=y,c=b;break}$=$.sibling}if(!j){for($=b.child;$;){if($===c){j=!0,c=b,h=y;break}if($===h){j=!0,h=b,c=y;break}$=$.sibling}if(!j)throw Error(r(189))}}if(c.alternate!==h)throw Error(r(190))}if(c.tag!==3)throw Error(r(188));return c.stateNode.current===c?a:s}function M(a){var s=a.tag;if(s===5||s===26||s===27||s===6)return a;for(a=a.child;a!==null;){if(s=M(a),s!==null)return s;a=a.sibling}return null}var O=Array.isArray,X=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,re={pending:!1,data:null,method:null,action:null},ue=[],ae=-1;function oe(a){return{current:a}}function Ce(a){0>ae||(a.current=ue[ae],ue[ae]=null,ae--)}function he(a,s){ae++,ue[ae]=a.current,a.current=s}var Ee=oe(null),we=oe(null),Pe=oe(null),Ae=oe(null);function xe(a,s){switch(he(Pe,s),he(we,a),he(Ee,null),a=s.nodeType,a){case 9:case 11:s=(s=s.documentElement)&&(s=s.namespaceURI)?h0(s):0;break;default:if(a=a===8?s.parentNode:s,s=a.tagName,a=a.namespaceURI)a=h0(a),s=p0(a,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}Ce(Ee),he(Ee,s)}function ee(){Ce(Ee),Ce(we),Ce(Pe)}function ce(a){a.memoizedState!==null&&he(Ae,a);var s=Ee.current,c=p0(s,a.type);s!==c&&(he(we,a),he(Ee,c))}function Te(a){we.current===a&&(Ce(Ee),Ce(we)),Ae.current===a&&(Ce(Ae),bl._currentValue=re)}var ge=Object.prototype.hasOwnProperty,Se=e.unstable_scheduleCallback,ie=e.unstable_cancelCallback,$e=e.unstable_shouldYield,Ge=e.unstable_requestPaint,ve=e.unstable_now,Ne=e.unstable_getCurrentPriorityLevel,te=e.unstable_ImmediatePriority,de=e.unstable_UserBlockingPriority,Oe=e.unstable_NormalPriority,He=e.unstable_LowPriority,Ye=e.unstable_IdlePriority,vt=e.log,Mt=e.unstable_setDisableYieldValue,bt=null,rt=null;function qt(a){if(rt&&typeof rt.onCommitFiberRoot=="function")try{rt.onCommitFiberRoot(bt,a,void 0,(a.current.flags&128)===128)}catch{}}function at(a){if(typeof vt=="function"&&Mt(a),rt&&typeof rt.setStrictMode=="function")try{rt.setStrictMode(bt,a)}catch{}}var At=Math.clz32?Math.clz32:xu,rn=Math.log,io=Math.LN2;function xu(a){return a>>>=0,a===0?32:31-(rn(a)/io|0)|0}var ao=128,Di=4194304;function dn(a){var s=a&42;if(s!==0)return s;switch(a&-a){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 a&4194176;case 4194304:case 8388608:case 16777216:case 33554432:return a&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return a}}function oo(a,s){var c=a.pendingLanes;if(c===0)return 0;var h=0,y=a.suspendedLanes,b=a.pingedLanes,j=a.warmLanes;a=a.finishedLanes!==0;var $=c&134217727;return $!==0?(c=$&~y,c!==0?h=dn(c):(b&=$,b!==0?h=dn(b):a||(j=$&~j,j!==0&&(h=dn(j))))):($=c&~y,$!==0?h=dn($):b!==0?h=dn(b):a||(j=c&~j,j!==0&&(h=dn(j)))),h===0?0:s!==0&&s!==h&&!(s&y)&&(y=h&-h,j=s&-s,y>=j||y===32&&(j&4194176)!==0)?s:h}function Ze(a,s){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&s)===0}function gt(a,s){switch(a){case 1:case 2:case 4:case 8:return s+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 s+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 _t(){var a=ao;return ao<<=1,!(ao&4194176)&&(ao=128),a}function Cn(){var a=Di;return Di<<=1,!(Di&62914560)&&(Di=4194304),a}function Sn(a){for(var s=[],c=0;31>c;c++)s.push(a);return s}function Tn(a,s){a.pendingLanes|=s,s!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function Zr(a,s,c,h,y,b){var j=a.pendingLanes;a.pendingLanes=c,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=c,a.entangledLanes&=c,a.errorRecoveryDisabledLanes&=c,a.shellSuspendCounter=0;var $=a.entanglements,W=a.expirationTimes,J=a.hiddenUpdates;for(c=j&~c;0"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),QD=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]*$"),pb={},mb={};function JD(a){return ge.call(mb,a)?!0:ge.call(pb,a)?!1:QD.test(a)?mb[a]=!0:(pb[a]=!0,!1)}function wu(a,s,c){if(JD(s))if(c===null)a.removeAttribute(s);else{switch(typeof c){case"undefined":case"function":case"symbol":a.removeAttribute(s);return;case"boolean":var h=s.toLowerCase().slice(0,5);if(h!=="data-"&&h!=="aria-"){a.removeAttribute(s);return}}a.setAttribute(s,""+c)}}function Su(a,s,c){if(c===null)a.removeAttribute(s);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(s);return}a.setAttribute(s,""+c)}}function Jr(a,s,c,h){if(h===null)a.removeAttribute(c);else{switch(typeof h){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(c);return}a.setAttributeNS(s,c,""+h)}}function Zn(a){switch(typeof a){case"bigint":case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function gb(a){var s=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function eN(a){var s=gb(a)?"checked":"value",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,s),h=""+a[s];if(!a.hasOwnProperty(s)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var y=c.get,b=c.set;return Object.defineProperty(a,s,{configurable:!0,get:function(){return y.call(this)},set:function(j){h=""+j,b.call(this,j)}}),Object.defineProperty(a,s,{enumerable:c.enumerable}),{getValue:function(){return h},setValue:function(j){h=""+j},stopTracking:function(){a._valueTracker=null,delete a[s]}}}}function Eu(a){a._valueTracker||(a._valueTracker=eN(a))}function vb(a){if(!a)return!1;var s=a._valueTracker;if(!s)return!0;var c=s.getValue(),h="";return a&&(h=gb(a)?a.checked?"true":"false":a.value),a=h,a!==c?(s.setValue(a),!0):!1}function _u(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}var tN=/[\n"\\]/g;function Qn(a){return a.replace(tN,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function Md(a,s,c,h,y,b,j,$){a.name="",j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"?a.type=j:a.removeAttribute("type"),s!=null?j==="number"?(s===0&&a.value===""||a.value!=s)&&(a.value=""+Zn(s)):a.value!==""+Zn(s)&&(a.value=""+Zn(s)):j!=="submit"&&j!=="reset"||a.removeAttribute("value"),s!=null?Pd(a,j,Zn(s)):c!=null?Pd(a,j,Zn(c)):h!=null&&a.removeAttribute("value"),y==null&&b!=null&&(a.defaultChecked=!!b),y!=null&&(a.checked=y&&typeof y!="function"&&typeof y!="symbol"),$!=null&&typeof $!="function"&&typeof $!="symbol"&&typeof $!="boolean"?a.name=""+Zn($):a.removeAttribute("name")}function yb(a,s,c,h,y,b,j,$){if(b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(a.type=b),s!=null||c!=null){if(!(b!=="submit"&&b!=="reset"||s!=null))return;c=c!=null?""+Zn(c):"",s=s!=null?""+Zn(s):c,$||s===a.value||(a.value=s),a.defaultValue=s}h=h??y,h=typeof h!="function"&&typeof h!="symbol"&&!!h,a.checked=$?a.checked:!!h,a.defaultChecked=!!h,j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"&&(a.name=j)}function Pd(a,s,c){s==="number"&&_u(a.ownerDocument)===a||a.defaultValue===""+c||(a.defaultValue=""+c)}function fo(a,s,c,h){if(a=a.options,s){s={};for(var y=0;y=Ps),Nb=" ",Ob=!1;function jb(a,s){switch(a){case"keyup":return RN.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Lb(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var go=!1;function NN(a,s){switch(a){case"compositionend":return Lb(s);case"keypress":return s.which!==32?null:(Ob=!0,Nb);case"textInput":return a=s.data,a===Nb&&Ob?null:a;default:return null}}function ON(a,s){if(go)return a==="compositionend"||!Wd&&jb(a,s)?(a=kb(),Cu=$d=Oi=null,go=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1=s)return{node:c,offset:s-a};a=h}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=Bb(c)}}function Hb(a,s){return a&&s?a===s?!0:a&&a.nodeType===3?!1:s&&s.nodeType===3?Hb(a,s.parentNode):"contains"in a?a.contains(s):a.compareDocumentPosition?!!(a.compareDocumentPosition(s)&16):!1:!1}function Vb(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var s=_u(a.document);s instanceof a.HTMLIFrameElement;){try{var c=typeof s.contentWindow.location.href=="string"}catch{c=!1}if(c)a=s.contentWindow;else break;s=_u(a.document)}return s}function Zd(a){var s=a&&a.nodeName&&a.nodeName.toLowerCase();return s&&(s==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||s==="textarea"||a.contentEditable==="true")}function GN(a,s){var c=Vb(s);s=a.focusedElem;var h=a.selectionRange;if(c!==s&&s&&s.ownerDocument&&Hb(s.ownerDocument.documentElement,s)){if(h!==null&&Zd(s)){if(a=h.start,c=h.end,c===void 0&&(c=a),"selectionStart"in s)s.selectionStart=a,s.selectionEnd=Math.min(c,s.value.length);else if(c=(a=s.ownerDocument||document)&&a.defaultView||window,c.getSelection){c=c.getSelection();var y=s.textContent.length,b=Math.min(h.start,y);h=h.end===void 0?b:Math.min(h.end,y),!c.extend&&b>h&&(y=h,h=b,b=y),y=$b(s,b);var j=$b(s,h);y&&j&&(c.rangeCount!==1||c.anchorNode!==y.node||c.anchorOffset!==y.offset||c.focusNode!==j.node||c.focusOffset!==j.offset)&&(a=a.createRange(),a.setStart(y.node,y.offset),c.removeAllRanges(),b>h?(c.addRange(a),c.extend(j.node,j.offset)):(a.setEnd(j.node,j.offset),c.addRange(a)))}}for(a=[],c=s;c=c.parentNode;)c.nodeType===1&&a.push({element:c,left:c.scrollLeft,top:c.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s=document.documentMode,vo=null,Qd=null,Us=null,Jd=!1;function qb(a,s,c){var h=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;Jd||vo==null||vo!==_u(h)||(h=vo,"selectionStart"in h&&Zd(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}),Us&&Gs(Us,h)||(Us=h,h=hc(Qd,"onSelect"),0>=j,y-=j,ei=1<<32-At(s)+y|c<Ke?(Jt=Ve,Ve=null):Jt=Ve.sibling;var mt=le(ne,Ve,se[Ke],ye);if(mt===null){Ve===null&&(Ve=Jt);break}a&&Ve&&mt.alternate===null&&s(ne,Ve),Q=b(mt,Q,Ke),ot===null?Ie=mt:ot.sibling=mt,ot=mt,Ve=Jt}if(Ke===se.length)return c(ne,Ve),pt&&Ea(ne,Ke),Ie;if(Ve===null){for(;KeKe?(Jt=Ve,Ve=null):Jt=Ve.sibling;var Qi=le(ne,Ve,mt.value,ye);if(Qi===null){Ve===null&&(Ve=Jt);break}a&&Ve&&Qi.alternate===null&&s(ne,Ve),Q=b(Qi,Q,Ke),ot===null?Ie=Qi:ot.sibling=Qi,ot=Qi,Ve=Jt}if(mt.done)return c(ne,Ve),pt&&Ea(ne,Ke),Ie;if(Ve===null){for(;!mt.done;Ke++,mt=se.next())mt=_e(ne,mt.value,ye),mt!==null&&(Q=b(mt,Q,Ke),ot===null?Ie=mt:ot.sibling=mt,ot=mt);return pt&&Ea(ne,Ke),Ie}for(Ve=h(Ve);!mt.done;Ke++,mt=se.next())mt=pe(Ve,ne,Ke,mt.value,ye),mt!==null&&(a&&mt.alternate!==null&&Ve.delete(mt.key===null?Ke:mt.key),Q=b(mt,Q,Ke),ot===null?Ie=mt:ot.sibling=mt,ot=mt);return a&&Ve.forEach(function(ij){return s(ne,ij)}),pt&&Ea(ne,Ke),Ie}function It(ne,Q,se,ye){if(typeof se=="object"&&se!==null&&se.type===f&&se.key===null&&(se=se.props.children),typeof se=="object"&&se!==null){switch(se.$$typeof){case l:e:{for(var Ie=se.key;Q!==null;){if(Q.key===Ie){if(Ie=se.type,Ie===f){if(Q.tag===7){c(ne,Q.sibling),ye=y(Q,se.props.children),ye.return=ne,ne=ye;break e}}else if(Q.elementType===Ie||typeof Ie=="object"&&Ie!==null&&Ie.$$typeof===_&&ux(Ie)===Q.type){c(ne,Q.sibling),ye=y(Q,se.props),Ws(ye,se),ye.return=ne,ne=ye;break e}c(ne,Q);break}else s(ne,Q);Q=Q.sibling}se.type===f?(ye=La(se.props.children,ne.mode,ye,se.key),ye.return=ne,ne=ye):(ye=rc(se.type,se.key,se.props,null,ne.mode,ye),Ws(ye,se),ye.return=ne,ne=ye)}return j(ne);case u:e:{for(Ie=se.key;Q!==null;){if(Q.key===Ie)if(Q.tag===4&&Q.stateNode.containerInfo===se.containerInfo&&Q.stateNode.implementation===se.implementation){c(ne,Q.sibling),ye=y(Q,se.children||[]),ye.return=ne,ne=ye;break e}else{c(ne,Q);break}else s(ne,Q);Q=Q.sibling}ye=tp(se,ne.mode,ye),ye.return=ne,ne=ye}return j(ne);case _:return Ie=se._init,se=Ie(se._payload),It(ne,Q,se,ye)}if(O(se))return Ue(ne,Q,se,ye);if(L(se)){if(Ie=L(se),typeof Ie!="function")throw Error(r(150));return se=Ie.call(se),Je(ne,Q,se,ye)}if(typeof se.then=="function")return It(ne,Q,Fu(se),ye);if(se.$$typeof===g)return It(ne,Q,ec(ne,se),ye);Iu(ne,se)}return typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint"?(se=""+se,Q!==null&&Q.tag===6?(c(ne,Q.sibling),ye=y(Q,se),ye.return=ne,ne=ye):(c(ne,Q),ye=ep(se,ne.mode,ye),ye.return=ne,ne=ye),j(ne)):c(ne,Q)}return function(ne,Q,se,ye){try{Ys=0;var Ie=It(ne,Q,se,ye);return Eo=null,Ie}catch(Ve){if(Ve===Vs)throw Ve;var ot=or(29,Ve,null,ne.mode);return ot.lanes=ye,ot.return=ne,ot}finally{}}}var ka=cx(!0),fx=cx(!1),_o=oe(null),Gu=oe(0);function dx(a,s){a=di,he(Gu,a),he(_o,s),di=a|s.baseLanes}function sh(){he(Gu,di),he(_o,_o.current)}function lh(){di=Gu.current,Ce(_o),Ce(Gu)}var rr=oe(null),Lr=null;function Li(a){var s=a.alternate;he(Yt,Yt.current&1),he(rr,a),Lr===null&&(s===null||_o.current!==null||s.memoizedState!==null)&&(Lr=a)}function hx(a){if(a.tag===22){if(he(Yt,Yt.current),he(rr,a),Lr===null){var s=a.alternate;s!==null&&s.memoizedState!==null&&(Lr=a)}}else zi()}function zi(){he(Yt,Yt.current),he(rr,rr.current)}function ni(a){Ce(rr),Lr===a&&(Lr=null),Ce(Yt)}var Yt=oe(0);function Uu(a){for(var s=a;s!==null;){if(s.tag===13){var c=s.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||c.data==="$?"||c.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if(s.flags&128)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===a)break;for(;s.sibling===null;){if(s.return===null||s.return===a)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var VN=typeof AbortController<"u"?AbortController:function(){var a=[],s=this.signal={aborted:!1,addEventListener:function(c,h){a.push(h)}};this.abort=function(){s.aborted=!0,a.forEach(function(c){return c()})}},qN=e.unstable_scheduleCallback,YN=e.unstable_NormalPriority,Wt={$$typeof:g,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function uh(){return{controller:new VN,data:new Map,refCount:0}}function Xs(a){a.refCount--,a.refCount===0&&qN(YN,function(){a.controller.abort()})}var Ks=null,ch=0,ko=0,Co=null;function WN(a,s){if(Ks===null){var c=Ks=[];ch=0,ko=gp(),Co={status:"pending",value:void 0,then:function(h){c.push(h)}}}return ch++,s.then(px,px),s}function px(){if(--ch===0&&Ks!==null){Co!==null&&(Co.status="fulfilled");var a=Ks;Ks=null,ko=0,Co=null;for(var s=0;sb?b:8;var j=P.T,$={};P.T=$,Th(a,!1,s,c);try{var W=y(),J=P.S;if(J!==null&&J($,W),W!==null&&typeof W=="object"&&typeof W.then=="function"){var me=XN(W,h);Js(a,s,me,Hn(a))}else Js(a,s,h,Hn(a))}catch(_e){Js(a,s,{then:function(){},status:"rejected",reason:_e},Hn())}finally{X.p=b,P.T=j}}function eO(){}function kh(a,s,c,h){if(a.tag!==5)throw Error(r(476));var y=Vx(a).queue;Hx(a,y,s,re,c===null?eO:function(){return qx(a),c(h)})}function Vx(a){var s=a.memoizedState;if(s!==null)return s;s={memoizedState:re,baseState:re,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ri,lastRenderedState:re},next:null};var c={};return s.next={memoizedState:c,baseState:c,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ri,lastRenderedState:c},next:null},a.memoizedState=s,a=a.alternate,a!==null&&(a.memoizedState=s),s}function qx(a){var s=Vx(a).next.queue;Js(a,s,{},Hn())}function Ch(){return pn(bl)}function Yx(){return $t().memoizedState}function Wx(){return $t().memoizedState}function tO(a){for(var s=a.return;s!==null;){switch(s.tag){case 24:case 3:var c=Hn();a=Gi(c);var h=Ui(s,a,c);h!==null&&(_n(h,s,c),nl(h,s,c)),s={cache:uh()},a.payload=s;return}s=s.return}}function nO(a,s,c){var h=Hn();c={lane:h,revertLane:0,action:c,hasEagerState:!1,eagerState:null,next:null},Ku(a)?Kx(s,c):(c=nh(a,s,c,h),c!==null&&(_n(c,a,h),Zx(c,s,h)))}function Xx(a,s,c){var h=Hn();Js(a,s,c,h)}function Js(a,s,c,h){var y={lane:h,revertLane:0,action:c,hasEagerState:!1,eagerState:null,next:null};if(Ku(a))Kx(s,y);else{var b=a.alternate;if(a.lanes===0&&(b===null||b.lanes===0)&&(b=s.lastRenderedReducer,b!==null))try{var j=s.lastRenderedState,$=b(j,c);if(y.hasEagerState=!0,y.eagerState=$,Gn($,j))return ju(a,s,y,0),Rt===null&&Ou(),!1}catch{}finally{}if(c=nh(a,s,y,h),c!==null)return _n(c,a,h),Zx(c,s,h),!0}return!1}function Th(a,s,c,h){if(h={lane:2,revertLane:gp(),action:h,hasEagerState:!1,eagerState:null,next:null},Ku(a)){if(s)throw Error(r(479))}else s=nh(a,c,h,2),s!==null&&_n(s,a,2)}function Ku(a){var s=a.alternate;return a===it||s!==null&&s===it}function Kx(a,s){To=$u=!0;var c=a.pending;c===null?s.next=s:(s.next=c.next,c.next=s),a.pending=s}function Zx(a,s,c){if(c&4194176){var h=s.lanes;h&=a.pendingLanes,c|=h,s.lanes=c,gr(a,c)}}var zr={readContext:pn,use:qu,useCallback:Gt,useContext:Gt,useEffect:Gt,useImperativeHandle:Gt,useLayoutEffect:Gt,useInsertionEffect:Gt,useMemo:Gt,useReducer:Gt,useRef:Gt,useState:Gt,useDebugValue:Gt,useDeferredValue:Gt,useTransition:Gt,useSyncExternalStore:Gt,useId:Gt};zr.useCacheRefresh=Gt,zr.useMemoCache=Gt,zr.useHostTransitionStatus=Gt,zr.useFormState=Gt,zr.useActionState=Gt,zr.useOptimistic=Gt;var Aa={readContext:pn,use:qu,useCallback:function(a,s){return Nn().memoizedState=[a,s===void 0?null:s],a},useContext:pn,useEffect:Mx,useImperativeHandle:function(a,s,c){c=c!=null?c.concat([a]):null,Wu(4194308,4,Ix.bind(null,s,a),c)},useLayoutEffect:function(a,s){return Wu(4194308,4,a,s)},useInsertionEffect:function(a,s){Wu(4,2,a,s)},useMemo:function(a,s){var c=Nn();s=s===void 0?null:s;var h=a();if(Ta){at(!0);try{a()}finally{at(!1)}}return c.memoizedState=[h,s],h},useReducer:function(a,s,c){var h=Nn();if(c!==void 0){var y=c(s);if(Ta){at(!0);try{c(s)}finally{at(!1)}}}else y=s;return h.memoizedState=h.baseState=y,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:y},h.queue=a,a=a.dispatch=nO.bind(null,it,a),[h.memoizedState,a]},useRef:function(a){var s=Nn();return a={current:a},s.memoizedState=a},useState:function(a){a=xh(a);var s=a.queue,c=Xx.bind(null,it,s);return s.dispatch=c,[a.memoizedState,c]},useDebugValue:Eh,useDeferredValue:function(a,s){var c=Nn();return _h(c,a,s)},useTransition:function(){var a=xh(!1);return a=Hx.bind(null,it,a.queue,!0,!1),Nn().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,s,c){var h=it,y=Nn();if(pt){if(c===void 0)throw Error(r(407));c=c()}else{if(c=s(),Rt===null)throw Error(r(349));ht&60||xx(h,s,c)}y.memoizedState=c;var b={value:c,getSnapshot:s};return y.queue=b,Mx(Sx.bind(null,h,b,a),[a]),h.flags|=2048,Ro(9,wx.bind(null,h,b,c,s),{destroy:void 0},null),c},useId:function(){var a=Nn(),s=Rt.identifierPrefix;if(pt){var c=ti,h=ei;c=(h&~(1<<32-At(h)-1)).toString(32)+c,s=":"+s+"R"+c,c=Hu++,0 title"))),sn(b,h,c),b[hn]=a,Kt(b),h=b;break e;case"link":var j=_0("link","href",y).get(h+(c.href||""));if(j){for(var $=0;$<\/script>",a=a.removeChild(a.firstChild);break;case"select":a=typeof h.is=="string"?y.createElement("select",{is:h.is}):y.createElement("select"),h.multiple?a.multiple=!0:h.size&&(a.size=h.size);break;default:a=typeof h.is=="string"?y.createElement(c,{is:h.is}):y.createElement(c)}}a[hn]=s,a[Rn]=h;e:for(y=s.child;y!==null;){if(y.tag===5||y.tag===6)a.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===s)break e;for(;y.sibling===null;){if(y.return===null||y.return===s)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}s.stateNode=a;e:switch(sn(a,c,h),c){case"button":case"input":case"select":case"textarea":a=!!h.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&ci(s)}}return jt(s),s.flags&=-16777217,null;case 6:if(a&&s.stateNode!=null)a.memoizedProps!==h&&ci(s);else{if(typeof h!="string"&&s.stateNode===null)throw Error(r(166));if(a=Pe.current,Bs(s)){if(a=s.stateNode,c=s.memoizedProps,h=null,y=En,y!==null)switch(y.tag){case 27:case 5:h=y.memoizedProps}a[hn]=s,a=!!(a.nodeValue===c||h!==null&&h.suppressHydrationWarning===!0||d0(a.nodeValue,c)),a||_a(s)}else a=mc(a).createTextNode(h),a[hn]=s,s.stateNode=a}return jt(s),null;case 13:if(h=s.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(y=Bs(s),h!==null&&h.dehydrated!==null){if(a===null){if(!y)throw Error(r(318));if(y=s.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(r(317));y[hn]=s}else $s(),!(s.flags&128)&&(s.memoizedState=null),s.flags|=4;jt(s),y=!1}else yr!==null&&(up(yr),yr=null),y=!0;if(!y)return s.flags&256?(ni(s),s):(ni(s),null)}if(ni(s),s.flags&128)return s.lanes=c,s;if(c=h!==null,a=a!==null&&a.memoizedState!==null,c){h=s.child,y=null,h.alternate!==null&&h.alternate.memoizedState!==null&&h.alternate.memoizedState.cachePool!==null&&(y=h.alternate.memoizedState.cachePool.pool);var b=null;h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(b=h.memoizedState.cachePool.pool),b!==y&&(h.flags|=2048)}return c!==a&&c&&(s.child.flags|=8192),ic(s,s.updateQueue),jt(s),null;case 4:return ee(),a===null&&xp(s.stateNode.containerInfo),jt(s),null;case 10:return oi(s.type),jt(s),null;case 19:if(Ce(Yt),y=s.memoizedState,y===null)return jt(s),null;if(h=(s.flags&128)!==0,b=y.rendering,b===null)if(h)ul(y,!1);else{if(Ft!==0||a!==null&&a.flags&128)for(a=s.child;a!==null;){if(b=Uu(a),b!==null){for(s.flags|=128,ul(y,!1),a=b.updateQueue,s.updateQueue=a,ic(s,a),s.subtreeFlags=0,a=c,c=s.child;c!==null;)Gw(c,a),c=c.sibling;return he(Yt,Yt.current&1|2),s.child}a=a.sibling}y.tail!==null&&ve()>ac&&(s.flags|=128,h=!0,ul(y,!1),s.lanes=4194304)}else{if(!h)if(a=Uu(b),a!==null){if(s.flags|=128,h=!0,a=a.updateQueue,s.updateQueue=a,ic(s,a),ul(y,!0),y.tail===null&&y.tailMode==="hidden"&&!b.alternate&&!pt)return jt(s),null}else 2*ve()-y.renderingStartTime>ac&&c!==536870912&&(s.flags|=128,h=!0,ul(y,!1),s.lanes=4194304);y.isBackwards?(b.sibling=s.child,s.child=b):(a=y.last,a!==null?a.sibling=b:s.child=b,y.last=b)}return y.tail!==null?(s=y.tail,y.rendering=s,y.tail=s.sibling,y.renderingStartTime=ve(),s.sibling=null,a=Yt.current,he(Yt,h?a&1|2:a&1),s):(jt(s),null);case 22:case 23:return ni(s),lh(),h=s.memoizedState!==null,a!==null?a.memoizedState!==null!==h&&(s.flags|=8192):h&&(s.flags|=8192),h?c&536870912&&!(s.flags&128)&&(jt(s),s.subtreeFlags&6&&(s.flags|=8192)):jt(s),c=s.updateQueue,c!==null&&ic(s,c.retryQueue),c=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(c=a.memoizedState.cachePool.pool),h=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(h=s.memoizedState.cachePool.pool),h!==c&&(s.flags|=2048),a!==null&&Ce(Ca),null;case 24:return c=null,a!==null&&(c=a.memoizedState.cache),s.memoizedState.cache!==c&&(s.flags|=2048),oi(Wt),jt(s),null;case 25:return null}throw Error(r(156,s.tag))}function uO(a,s){switch(ih(s),s.tag){case 1:return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 3:return oi(Wt),ee(),a=s.flags,a&65536&&!(a&128)?(s.flags=a&-65537|128,s):null;case 26:case 27:case 5:return Te(s),null;case 13:if(ni(s),a=s.memoizedState,a!==null&&a.dehydrated!==null){if(s.alternate===null)throw Error(r(340));$s()}return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 19:return Ce(Yt),null;case 4:return ee(),null;case 10:return oi(s.type),null;case 22:case 23:return ni(s),lh(),a!==null&&Ce(Ca),a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 24:return oi(Wt),null;case 25:return null;default:return null}}function $w(a,s){switch(ih(s),s.tag){case 3:oi(Wt),ee();break;case 26:case 27:case 5:Te(s);break;case 4:ee();break;case 13:ni(s);break;case 19:Ce(Yt);break;case 10:oi(s.type);break;case 22:case 23:ni(s),lh(),a!==null&&Ce(Ca);break;case 24:oi(Wt)}}var cO={getCacheForType:function(a){var s=pn(Wt),c=s.data.get(a);return c===void 0&&(c=a(),s.data.set(a,c)),c}},fO=typeof WeakMap=="function"?WeakMap:Map,Lt=0,Rt=null,lt=null,ht=0,Dt=0,$n=null,fi=!1,jo=!1,np=!1,di=0,Ft=0,qi=0,za=0,rp=0,sr=0,Lo=0,cl=null,Mr=null,ip=!1,ap=0,ac=1/0,oc=null,Yi=null,sc=!1,Ma=null,fl=0,op=0,sp=null,dl=0,lp=null;function Hn(){if(Lt&2&&ht!==0)return ht&-ht;if(P.T!==null){var a=ko;return a!==0?a:gp()}return cb()}function Hw(){sr===0&&(sr=!(ht&536870912)||pt?_t():536870912);var a=rr.current;return a!==null&&(a.flags|=32),sr}function _n(a,s,c){(a===Rt&&Dt===2||a.cancelPendingCommit!==null)&&(zo(a,0),hi(a,ht,sr,!1)),Tn(a,c),(!(Lt&2)||a!==Rt)&&(a===Rt&&(!(Lt&2)&&(za|=c),Ft===4&&hi(a,ht,sr,!1)),Pr(a))}function Vw(a,s,c){if(Lt&6)throw Error(r(327));var h=!c&&(s&60)===0&&(s&a.expiredLanes)===0||Ze(a,s),y=h?pO(a,s):dp(a,s,!0),b=h;do{if(y===0){jo&&!h&&hi(a,s,0,!1);break}else if(y===6)hi(a,s,0,!fi);else{if(c=a.current.alternate,b&&!dO(c)){y=dp(a,s,!1),b=!1;continue}if(y===2){if(b=s,a.errorRecoveryDisabledLanes&b)var j=0;else j=a.pendingLanes&-536870913,j=j!==0?j:j&536870912?536870912:0;if(j!==0){s=j;e:{var $=a;y=cl;var W=$.current.memoizedState.isDehydrated;if(W&&(zo($,j).flags|=256),j=dp($,j,!1),j!==2){if(np&&!W){$.errorRecoveryDisabledLanes|=b,za|=b,y=4;break e}b=Mr,Mr=y,b!==null&&up(b)}y=j}if(b=!1,y!==2)continue}}if(y===1){zo(a,0),hi(a,s,0,!0);break}e:{switch(h=a,y){case 0:case 1:throw Error(r(345));case 4:if((s&4194176)===s){hi(h,s,sr,!fi);break e}break;case 2:Mr=null;break;case 3:case 5:break;default:throw Error(r(329))}if(h.finishedWork=c,h.finishedLanes=s,(s&62914560)===s&&(b=ap+300-ve(),10c?32:c,P.T=null,Ma===null)var b=!1;else{c=sp,sp=null;var j=Ma,$=fl;if(Ma=null,fl=0,Lt&6)throw Error(r(331));var W=Lt;if(Lt|=4,Fw(j.current),zw(j,j.current,$,c),Lt=W,hl(0,!1),rt&&typeof rt.onPostCommitFiberRoot=="function")try{rt.onPostCommitFiberRoot(bt,j)}catch{}b=!0}return b}finally{X.p=y,P.T=h,e0(a,s)}}return!1}function t0(a,s,c){s=er(c,s),s=Dh(a.stateNode,s,2),a=Ui(a,s,2),a!==null&&(Tn(a,2),Pr(a))}function kt(a,s,c){if(a.tag===3)t0(a,a,c);else for(;s!==null;){if(s.tag===3){t0(s,a,c);break}else if(s.tag===1){var h=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Yi===null||!Yi.has(h))){a=er(c,a),c=iw(2),h=Ui(s,c,2),h!==null&&(aw(c,h,s,a),Tn(h,2),Pr(h));break}}s=s.return}}function hp(a,s,c){var h=a.pingCache;if(h===null){h=a.pingCache=new fO;var y=new Set;h.set(s,y)}else y=h.get(s),y===void 0&&(y=new Set,h.set(s,y));y.has(c)||(np=!0,y.add(c),a=vO.bind(null,a,s,c),s.then(a,a))}function vO(a,s,c){var h=a.pingCache;h!==null&&h.delete(s),a.pingedLanes|=a.suspendedLanes&c,a.warmLanes&=~c,Rt===a&&(ht&c)===c&&(Ft===4||Ft===3&&(ht&62914560)===ht&&300>ve()-ap?!(Lt&2)&&zo(a,0):rp|=c,Lo===ht&&(Lo=0)),Pr(a)}function n0(a,s){s===0&&(s=Cn()),a=ji(a,s),a!==null&&(Tn(a,s),Pr(a))}function yO(a){var s=a.memoizedState,c=0;s!==null&&(c=s.retryLane),n0(a,c)}function bO(a,s){var c=0;switch(a.tag){case 13:var h=a.stateNode,y=a.memoizedState;y!==null&&(c=y.retryLane);break;case 19:h=a.stateNode;break;case 22:h=a.stateNode._retryCache;break;default:throw Error(r(314))}h!==null&&h.delete(s),n0(a,c)}function xO(a,s){return Se(a,s)}var cc=null,Fo=null,pp=!1,fc=!1,mp=!1,Pa=0;function Pr(a){a!==Fo&&a.next===null&&(Fo===null?cc=Fo=a:Fo=Fo.next=a),fc=!0,pp||(pp=!0,SO(wO))}function hl(a,s){if(!mp&&fc){mp=!0;do for(var c=!1,h=cc;h!==null;){if(a!==0){var y=h.pendingLanes;if(y===0)var b=0;else{var j=h.suspendedLanes,$=h.pingedLanes;b=(1<<31-At(42|a)+1)-1,b&=y&~(j&~$),b=b&201326677?b&201326677|1:b?b|2:0}b!==0&&(c=!0,a0(h,b))}else b=ht,b=oo(h,h===Rt?b:0),!(b&3)||Ze(h,b)||(c=!0,a0(h,b));h=h.next}while(c);mp=!1}}function wO(){fc=pp=!1;var a=0;Pa!==0&&(DO()&&(a=Pa),Pa=0);for(var s=ve(),c=null,h=cc;h!==null;){var y=h.next,b=r0(h,s);b===0?(h.next=null,c===null?cc=y:c.next=y,y===null&&(Fo=c)):(c=h,(a!==0||b&3)&&(fc=!0)),h=y}hl(a)}function r0(a,s){for(var c=a.suspendedLanes,h=a.pingedLanes,y=a.expirationTimes,b=a.pendingLanes&-62914561;0"u"?null:document;function x0(a,s,c){var h=Go;if(h&&typeof s=="string"&&s){var y=Qn(s);y='link[rel="'+a+'"][href="'+y+'"]',typeof c=="string"&&(y+='[crossorigin="'+c+'"]'),b0.has(y)||(b0.add(y),a={rel:a,crossOrigin:c,href:s},h.querySelector(y)===null&&(s=h.createElement("link"),sn(s,"link",a),Kt(s),h.head.appendChild(s)))}}function FO(a){pi.D(a),x0("dns-prefetch",a,null)}function IO(a,s){pi.C(a,s),x0("preconnect",a,s)}function GO(a,s,c){pi.L(a,s,c);var h=Go;if(h&&a&&s){var y='link[rel="preload"][as="'+Qn(s)+'"]';s==="image"&&c&&c.imageSrcSet?(y+='[imagesrcset="'+Qn(c.imageSrcSet)+'"]',typeof c.imageSizes=="string"&&(y+='[imagesizes="'+Qn(c.imageSizes)+'"]')):y+='[href="'+Qn(a)+'"]';var b=y;switch(s){case"style":b=Uo(a);break;case"script":b=Bo(a)}lr.has(b)||(a=z({rel:"preload",href:s==="image"&&c&&c.imageSrcSet?void 0:a,as:s},c),lr.set(b,a),h.querySelector(y)!==null||s==="style"&&h.querySelector(gl(b))||s==="script"&&h.querySelector(vl(b))||(s=h.createElement("link"),sn(s,"link",a),Kt(s),h.head.appendChild(s)))}}function UO(a,s){pi.m(a,s);var c=Go;if(c&&a){var h=s&&typeof s.as=="string"?s.as:"script",y='link[rel="modulepreload"][as="'+Qn(h)+'"][href="'+Qn(a)+'"]',b=y;switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":b=Bo(a)}if(!lr.has(b)&&(a=z({rel:"modulepreload",href:a},s),lr.set(b,a),c.querySelector(y)===null)){switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(c.querySelector(vl(b)))return}h=c.createElement("link"),sn(h,"link",a),Kt(h),c.head.appendChild(h)}}}function BO(a,s,c){pi.S(a,s,c);var h=Go;if(h&&a){var y=uo(h).hoistableStyles,b=Uo(a);s=s||"default";var j=y.get(b);if(!j){var $={loading:0,preload:null};if(j=h.querySelector(gl(b)))$.loading=5;else{a=z({rel:"stylesheet",href:a,"data-precedence":s},c),(c=lr.get(b))&&Rp(a,c);var W=j=h.createElement("link");Kt(W),sn(W,"link",a),W._p=new Promise(function(J,me){W.onload=J,W.onerror=me}),W.addEventListener("load",function(){$.loading|=1}),W.addEventListener("error",function(){$.loading|=2}),$.loading|=4,vc(j,s,h)}j={type:"stylesheet",instance:j,count:1,state:$},y.set(b,j)}}}function $O(a,s){pi.X(a,s);var c=Go;if(c&&a){var h=uo(c).hoistableScripts,y=Bo(a),b=h.get(y);b||(b=c.querySelector(vl(y)),b||(a=z({src:a,async:!0},s),(s=lr.get(y))&&Dp(a,s),b=c.createElement("script"),Kt(b),sn(b,"link",a),c.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},h.set(y,b))}}function HO(a,s){pi.M(a,s);var c=Go;if(c&&a){var h=uo(c).hoistableScripts,y=Bo(a),b=h.get(y);b||(b=c.querySelector(vl(y)),b||(a=z({src:a,async:!0,type:"module"},s),(s=lr.get(y))&&Dp(a,s),b=c.createElement("script"),Kt(b),sn(b,"link",a),c.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},h.set(y,b))}}function w0(a,s,c,h){var y=(y=Pe.current)?gc(y):null;if(!y)throw Error(r(446));switch(a){case"meta":case"title":return null;case"style":return typeof c.precedence=="string"&&typeof c.href=="string"?(s=Uo(c.href),c=uo(y).hoistableStyles,h=c.get(s),h||(h={type:"style",instance:null,count:0,state:null},c.set(s,h)),h):{type:"void",instance:null,count:0,state:null};case"link":if(c.rel==="stylesheet"&&typeof c.href=="string"&&typeof c.precedence=="string"){a=Uo(c.href);var b=uo(y).hoistableStyles,j=b.get(a);if(j||(y=y.ownerDocument||y,j={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},b.set(a,j),(b=y.querySelector(gl(a)))&&!b._p&&(j.instance=b,j.state.loading=5),lr.has(a)||(c={rel:"preload",as:"style",href:c.href,crossOrigin:c.crossOrigin,integrity:c.integrity,media:c.media,hrefLang:c.hrefLang,referrerPolicy:c.referrerPolicy},lr.set(a,c),b||VO(y,a,c,j.state))),s&&h===null)throw Error(r(528,""));return j}if(s&&h!==null)throw Error(r(529,""));return null;case"script":return s=c.async,c=c.src,typeof c=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=Bo(c),c=uo(y).hoistableScripts,h=c.get(s),h||(h={type:"script",instance:null,count:0,state:null},c.set(s,h)),h):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,a))}}function Uo(a){return'href="'+Qn(a)+'"'}function gl(a){return'link[rel="stylesheet"]['+a+"]"}function S0(a){return z({},a,{"data-precedence":a.precedence,precedence:null})}function VO(a,s,c,h){a.querySelector('link[rel="preload"][as="style"]['+s+"]")?h.loading=1:(s=a.createElement("link"),h.preload=s,s.addEventListener("load",function(){return h.loading|=1}),s.addEventListener("error",function(){return h.loading|=2}),sn(s,"link",c),Kt(s),a.head.appendChild(s))}function Bo(a){return'[src="'+Qn(a)+'"]'}function vl(a){return"script[async]"+a}function E0(a,s,c){if(s.count++,s.instance===null)switch(s.type){case"style":var h=a.querySelector('style[data-href~="'+Qn(c.href)+'"]');if(h)return s.instance=h,Kt(h),h;var y=z({},c,{"data-href":c.href,"data-precedence":c.precedence,href:null,precedence:null});return h=(a.ownerDocument||a).createElement("style"),Kt(h),sn(h,"style",y),vc(h,c.precedence,a),s.instance=h;case"stylesheet":y=Uo(c.href);var b=a.querySelector(gl(y));if(b)return s.state.loading|=4,s.instance=b,Kt(b),b;h=S0(c),(y=lr.get(y))&&Rp(h,y),b=(a.ownerDocument||a).createElement("link"),Kt(b);var j=b;return j._p=new Promise(function($,W){j.onload=$,j.onerror=W}),sn(b,"link",h),s.state.loading|=4,vc(b,c.precedence,a),s.instance=b;case"script":return b=Bo(c.src),(y=a.querySelector(vl(b)))?(s.instance=y,Kt(y),y):(h=c,(y=lr.get(b))&&(h=z({},c),Dp(h,y)),a=a.ownerDocument||a,y=a.createElement("script"),Kt(y),sn(y,"link",h),a.head.appendChild(y),s.instance=y);case"void":return null;default:throw Error(r(443,s.type))}else s.type==="stylesheet"&&!(s.state.loading&4)&&(h=s.instance,s.state.loading|=4,vc(h,c.precedence,a));return s.instance}function vc(a,s,c){for(var h=c.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),y=h.length?h[h.length-1]:null,b=y,j=0;j title"):null)}function qO(a,s,c){if(c===1||s.itemProp!=null)return!1;switch(a){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;switch(s.rel){case"stylesheet":return a=s.disabled,typeof s.precedence=="string"&&a==null;default:return!0}case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function C0(a){return!(a.type==="stylesheet"&&!(a.state.loading&3))}var yl=null;function YO(){}function WO(a,s,c){if(yl===null)throw Error(r(475));var h=yl;if(s.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&!(s.state.loading&4)){if(s.instance===null){var y=Uo(c.href),b=a.querySelector(gl(y));if(b){a=b._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(h.count++,h=bc.bind(h),a.then(h,h)),s.state.loading|=4,s.instance=b,Kt(b);return}b=a.ownerDocument||a,c=S0(c),(y=lr.get(y))&&Rp(c,y),b=b.createElement("link"),Kt(b);var j=b;j._p=new Promise(function($,W){j.onload=$,j.onerror=W}),sn(b,"link",c),s.instance=b}h.stylesheets===null&&(h.stylesheets=new Map),h.stylesheets.set(s,a),(a=s.state.preload)&&!(s.state.loading&3)&&(h.count++,s=bc.bind(h),a.addEventListener("load",s),a.addEventListener("error",s))}}function XO(){if(yl===null)throw Error(r(475));var a=yl;return a.stylesheets&&a.count===0&&Np(a,a.stylesheets),0"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Gp.exports=gj(),Gp.exports}var yj=vj();const W0=e=>{let t;const n=new Set,r=(d,p)=>{const m=typeof d=="function"?d(t):d;if(!Object.is(m,t)){const v=t;t=p??(typeof m!="object"||m===null)?m:Object.assign({},t,m),n.forEach(g=>g(t,v))}},i=()=>t,u={setState:r,getState:i,getInitialState:()=>f,subscribe:d=>(n.add(d),()=>n.delete(d))},f=t=e(r,i,u);return u},bj=e=>e?W0(e):W0,xj=e=>e;function wj(e,t=xj){const n=be.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return be.useDebugValue(n),n}const Sj=e=>{const t=bj(e),n=r=>wj(t,r);return Object.assign(n,t),n},Tv=e=>Sj;function D_(e,t){let n;try{n=e()}catch{return}return{getItem:i=>{var o;const l=f=>f===null?null:JSON.parse(f,void 0),u=(o=n.getItem(i))!=null?o:null;return u instanceof Promise?u.then(l):l(u)},setItem:(i,o)=>n.setItem(i,JSON.stringify(o,void 0)),removeItem:i=>n.removeItem(i)}}const bg=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return bg(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return bg(r)(n)}}}},Ej=(e,t)=>(n,r,i)=>{let o={storage:D_(()=>localStorage),partialize:x=>x,version:0,merge:(x,k)=>({...k,...x}),...t},l=!1;const u=new Set,f=new Set;let d=o.storage;if(!d)return e((...x)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...x)},r,i);const p=()=>{const x=o.partialize({...r()});return d.setItem(o.name,{state:x,version:o.version})},m=i.setState;i.setState=(x,k)=>{m(x,k),p()};const v=e((...x)=>{n(...x),p()},r,i);i.getInitialState=()=>v;let g;const w=()=>{var x,k;if(!d)return;l=!1,u.forEach(_=>{var T;return _((T=r())!=null?T:v)});const C=((k=o.onRehydrateStorage)==null?void 0:k.call(o,(x=r())!=null?x:v))||void 0;return bg(d.getItem.bind(d))(o.name).then(_=>{if(_)if(typeof _.version=="number"&&_.version!==o.version){if(o.migrate){const T=o.migrate(_.state,_.version);return T instanceof Promise?T.then(N=>[!0,N]):[!0,T]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,_.state];return[!1,void 0]}).then(_=>{var T;const[N,D]=_;if(g=o.merge(D,(T=r())!=null?T:v),n(g,!0),N)return p()}).then(()=>{C==null||C(g,void 0),g=r(),l=!0,f.forEach(_=>_(g))}).catch(_=>{C==null||C(void 0,_)})};return i.persist={setOptions:x=>{o={...o,...x},x.storage&&(d=x.storage)},clearStorage:()=>{d==null||d.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>w(),hasHydrated:()=>l,onHydrate:x=>(u.add(x),()=>{u.delete(x)}),onFinishHydration:x=>(f.add(x),()=>{f.delete(x)})},o.skipHydration||w(),g||v},_j=Ej;function N_(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t{const t=Tj(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{const u=l.split(Av);return u[0]===""&&u.length!==1&&u.shift(),j_(u,t)||Cj(l)},getConflictingClassGroupIds:(l,u)=>{const f=n[l]||[];return u&&r[l]?[...f,...r[l]]:f}}},j_=(e,t)=>{var l;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?j_(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const o=e.join(Av);return(l=t.validators.find(({validator:u})=>u(o)))==null?void 0:l.classGroupId},X0=/^\[(.+)\]$/,Cj=e=>{if(X0.test(e)){const t=X0.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Tj=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const i in n)xg(n[i],r,i,t);return r},xg=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:K0(t,i);o.classGroupId=n;return}if(typeof i=="function"){if(Aj(i)){xg(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([o,l])=>{xg(l,K0(t,o),n,r)})})},K0=(e,t)=>{let n=e;return t.split(Av).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Aj=e=>e.isThemeGetter,Rj=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(o,l)=>{n.set(o,l),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let l=n.get(o);if(l!==void 0)return l;if((l=r.get(o))!==void 0)return i(o,l),l},set(o,l){n.has(o)?n.set(o,l):i(o,l)}}},wg="!",Sg=":",Dj=Sg.length,Nj=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const o=[];let l=0,u=0,f=0,d;for(let w=0;wf?d-f:void 0;return{modifiers:o,hasImportantModifier:v,baseClassName:m,maybePostfixModifierPosition:g}};if(t){const i=t+Sg,o=r;r=l=>l.startsWith(i)?o(l.substring(i.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:l,maybePostfixModifierPosition:void 0}}if(n){const i=r;r=o=>n({className:o,parseClassName:i})}return r},Oj=e=>e.endsWith(wg)?e.substring(0,e.length-1):e.startsWith(wg)?e.substring(1):e,jj=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const i=[];let o=[];return r.forEach(l=>{l[0]==="["||t[l]?(i.push(...o.sort(),l),o=[]):o.push(l)}),i.push(...o.sort()),i}},Lj=e=>({cache:Rj(e.cacheSize),parseClassName:Nj(e),sortModifiers:jj(e),...kj(e)}),zj=/\s+/,Mj=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:o}=t,l=[],u=e.trim().split(zj);let f="";for(let d=u.length-1;d>=0;d-=1){const p=u[d],{isExternal:m,modifiers:v,hasImportantModifier:g,baseClassName:w,maybePostfixModifierPosition:x}=n(p);if(m){f=p+(f.length>0?" "+f:f);continue}let k=!!x,C=r(k?w.substring(0,x):w);if(!C){if(!k){f=p+(f.length>0?" "+f:f);continue}if(C=r(w),!C){f=p+(f.length>0?" "+f:f);continue}k=!1}const _=o(v).join(":"),T=g?_+wg:_,N=T+C;if(l.includes(N))continue;l.push(N);const D=i(C,k);for(let L=0;L0?" "+f:f)}return f};function Pj(){let e=0,t,n,r="";for(;e{if(typeof e=="string")return e;let t,n="";for(let r=0;rm(p),e());return n=Lj(d),r=n.cache.get,i=n.cache.set,o=u,u(f)}function u(f){const d=r(f);if(d)return d;const p=Mj(f,n);return i(f,p),p}return function(){return o(Pj.apply(null,arguments))}}const en=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},z_=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,M_=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Ij=/^\d+\/\d+$/,Gj=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Uj=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Bj=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,$j=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Hj=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,$o=e=>Ij.test(e),ct=e=>!!e&&!Number.isNaN(Number(e)),Fa=e=>!!e&&Number.isInteger(Number(e)),Z0=e=>e.endsWith("%")&&ct(e.slice(0,-1)),Ji=e=>Gj.test(e),Vj=()=>!0,qj=e=>Uj.test(e)&&!Bj.test(e),Rv=()=>!1,Yj=e=>$j.test(e),Wj=e=>Hj.test(e),Xj=e=>!Le(e)&&!ze(e),Kj=e=>ms(e,I_,Rv),Le=e=>z_.test(e),Ia=e=>ms(e,G_,qj),Hp=e=>ms(e,sL,ct),Zj=e=>ms(e,P_,Rv),Qj=e=>ms(e,F_,Wj),Jj=e=>ms(e,Rv,Yj),ze=e=>M_.test(e),Ac=e=>gs(e,G_),eL=e=>gs(e,lL),tL=e=>gs(e,P_),nL=e=>gs(e,I_),rL=e=>gs(e,F_),iL=e=>gs(e,uL,!0),ms=(e,t,n)=>{const r=z_.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},gs=(e,t,n=!1)=>{const r=M_.exec(e);return r?r[1]?t(r[1]):n:!1},P_=e=>e==="position",aL=new Set(["image","url"]),F_=e=>aL.has(e),oL=new Set(["length","size","percentage"]),I_=e=>oL.has(e),G_=e=>e==="length",sL=e=>e==="number",lL=e=>e==="family-name",uL=e=>e==="shadow",cL=()=>{const e=en("color"),t=en("font"),n=en("text"),r=en("font-weight"),i=en("tracking"),o=en("leading"),l=en("breakpoint"),u=en("container"),f=en("spacing"),d=en("radius"),p=en("shadow"),m=en("inset-shadow"),v=en("drop-shadow"),g=en("blur"),w=en("perspective"),x=en("aspect"),k=en("ease"),C=en("animate"),_=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],N=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto","contain","none"],L=()=>[$o,"px","full","auto",ze,Le,f],R=()=>[Fa,"none","subgrid",ze,Le],U=()=>["auto",{span:["full",Fa,ze,Le]},ze,Le],P=()=>[Fa,"auto",ze,Le],z=()=>["auto","min","max","fr",ze,Le],V=()=>[ze,Le,f],q=()=>["start","end","center","between","around","evenly","stretch","baseline"],I=()=>["start","end","center","stretch"],Y=()=>[ze,Le,f],Z=()=>["px",...Y()],B=()=>["px","auto",...Y()],G=()=>[$o,"auto","px","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",ze,Le,f],F=()=>[e,ze,Le],K=()=>[Z0,Ia],A=()=>["","none","full",d,ze,Le],H=()=>["",ct,Ac,Ia],M=()=>["solid","dashed","dotted","double"],O=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],X=()=>["","none",g,ze,Le],re=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ze,Le],ue=()=>["none",ct,ze,Le],ae=()=>["none",ct,ze,Le],oe=()=>[ct,ze,Le],Ce=()=>[$o,"full","px",ze,Le,f];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ji],breakpoint:[Ji],color:[Vj],container:[Ji],"drop-shadow":[Ji],ease:["in","out","in-out"],font:[Xj],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ji],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ji],shadow:[Ji],spacing:[ct],text:[Ji],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",$o,Le,ze,x]}],container:["container"],columns:[{columns:[ct,Le,ze,u]}],"break-after":[{"break-after":_()}],"break-before":[{"break-before":_()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...T(),Le,ze]}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:L()}],"inset-x":[{"inset-x":L()}],"inset-y":[{"inset-y":L()}],start:[{start:L()}],end:[{end:L()}],top:[{top:L()}],right:[{right:L()}],bottom:[{bottom:L()}],left:[{left:L()}],visibility:["visible","invisible","collapse"],z:[{z:[Fa,"auto",ze,Le]}],basis:[{basis:[$o,"full","auto",ze,Le,u,f]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ct,$o,"auto","initial","none",Le]}],grow:[{grow:["",ct,ze,Le]}],shrink:[{shrink:["",ct,ze,Le]}],order:[{order:[Fa,"first","last","none",ze,Le]}],"grid-cols":[{"grid-cols":R()}],"col-start-end":[{col:U()}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":R()}],"row-start-end":[{row:U()}],"row-start":[{"row-start":P()}],"row-end":[{"row-end":P()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":z()}],"auto-rows":[{"auto-rows":z()}],gap:[{gap:V()}],"gap-x":[{"gap-x":V()}],"gap-y":[{"gap-y":V()}],"justify-content":[{justify:[...q(),"normal"]}],"justify-items":[{"justify-items":[...I(),"normal"]}],"justify-self":[{"justify-self":["auto",...I()]}],"align-content":[{content:["normal",...q()]}],"align-items":[{items:[...I(),"baseline"]}],"align-self":[{self:["auto",...I(),"baseline"]}],"place-content":[{"place-content":q()}],"place-items":[{"place-items":[...I(),"baseline"]}],"place-self":[{"place-self":["auto",...I()]}],p:[{p:Z()}],px:[{px:Z()}],py:[{py:Z()}],ps:[{ps:Z()}],pe:[{pe:Z()}],pt:[{pt:Z()}],pr:[{pr:Z()}],pb:[{pb:Z()}],pl:[{pl:Z()}],m:[{m:B()}],mx:[{mx:B()}],my:[{my:B()}],ms:[{ms:B()}],me:[{me:B()}],mt:[{mt:B()}],mr:[{mr:B()}],mb:[{mb:B()}],ml:[{ml:B()}],"space-x":[{"space-x":Y()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":Y()}],"space-y-reverse":["space-y-reverse"],size:[{size:G()}],w:[{w:[u,"screen",...G()]}],"min-w":[{"min-w":[u,"screen","none",...G()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[l]},...G()]}],h:[{h:["screen",...G()]}],"min-h":[{"min-h":["screen","none",...G()]}],"max-h":[{"max-h":["screen",...G()]}],"font-size":[{text:["base",n,Ac,Ia]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ze,Hp]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Z0,Le]}],"font-family":[{font:[eL,Le,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,ze,Le]}],"line-clamp":[{"line-clamp":[ct,"none",ze,Hp]}],leading:[{leading:[ze,Le,o,f]}],"list-image":[{"list-image":["none",ze,Le]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ze,Le]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:F()}],"text-color":[{text:F()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...M(),"wavy"]}],"text-decoration-thickness":[{decoration:[ct,"from-font","auto",ze,Ia]}],"text-decoration-color":[{decoration:F()}],"underline-offset":[{"underline-offset":[ct,"auto",ze,Le]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:["px",...Y()]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ze,Le]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ze,Le]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...T(),tL,Zj]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",nL,Kj]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Fa,ze,Le],radial:["",ze,Le],conic:[Fa,ze,Le]},rL,Qj]}],"bg-color":[{bg:F()}],"gradient-from-pos":[{from:K()}],"gradient-via-pos":[{via:K()}],"gradient-to-pos":[{to:K()}],"gradient-from":[{from:F()}],"gradient-via":[{via:F()}],"gradient-to":[{to:F()}],rounded:[{rounded:A()}],"rounded-s":[{"rounded-s":A()}],"rounded-e":[{"rounded-e":A()}],"rounded-t":[{"rounded-t":A()}],"rounded-r":[{"rounded-r":A()}],"rounded-b":[{"rounded-b":A()}],"rounded-l":[{"rounded-l":A()}],"rounded-ss":[{"rounded-ss":A()}],"rounded-se":[{"rounded-se":A()}],"rounded-ee":[{"rounded-ee":A()}],"rounded-es":[{"rounded-es":A()}],"rounded-tl":[{"rounded-tl":A()}],"rounded-tr":[{"rounded-tr":A()}],"rounded-br":[{"rounded-br":A()}],"rounded-bl":[{"rounded-bl":A()}],"border-w":[{border:H()}],"border-w-x":[{"border-x":H()}],"border-w-y":[{"border-y":H()}],"border-w-s":[{"border-s":H()}],"border-w-e":[{"border-e":H()}],"border-w-t":[{"border-t":H()}],"border-w-r":[{"border-r":H()}],"border-w-b":[{"border-b":H()}],"border-w-l":[{"border-l":H()}],"divide-x":[{"divide-x":H()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":H()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...M(),"hidden","none"]}],"divide-style":[{divide:[...M(),"hidden","none"]}],"border-color":[{border:F()}],"border-color-x":[{"border-x":F()}],"border-color-y":[{"border-y":F()}],"border-color-s":[{"border-s":F()}],"border-color-e":[{"border-e":F()}],"border-color-t":[{"border-t":F()}],"border-color-r":[{"border-r":F()}],"border-color-b":[{"border-b":F()}],"border-color-l":[{"border-l":F()}],"divide-color":[{divide:F()}],"outline-style":[{outline:[...M(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ct,ze,Le]}],"outline-w":[{outline:["",ct,Ac,Ia]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",p,iL,Jj]}],"shadow-color":[{shadow:F()}],"inset-shadow":[{"inset-shadow":["none",ze,Le,m]}],"inset-shadow-color":[{"inset-shadow":F()}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:F()}],"ring-offset-w":[{"ring-offset":[ct,Ia]}],"ring-offset-color":[{"ring-offset":F()}],"inset-ring-w":[{"inset-ring":H()}],"inset-ring-color":[{"inset-ring":F()}],opacity:[{opacity:[ct,ze,Le]}],"mix-blend":[{"mix-blend":[...O(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":O()}],filter:[{filter:["","none",ze,Le]}],blur:[{blur:X()}],brightness:[{brightness:[ct,ze,Le]}],contrast:[{contrast:[ct,ze,Le]}],"drop-shadow":[{"drop-shadow":["","none",v,ze,Le]}],grayscale:[{grayscale:["",ct,ze,Le]}],"hue-rotate":[{"hue-rotate":[ct,ze,Le]}],invert:[{invert:["",ct,ze,Le]}],saturate:[{saturate:[ct,ze,Le]}],sepia:[{sepia:["",ct,ze,Le]}],"backdrop-filter":[{"backdrop-filter":["","none",ze,Le]}],"backdrop-blur":[{"backdrop-blur":X()}],"backdrop-brightness":[{"backdrop-brightness":[ct,ze,Le]}],"backdrop-contrast":[{"backdrop-contrast":[ct,ze,Le]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ct,ze,Le]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ct,ze,Le]}],"backdrop-invert":[{"backdrop-invert":["",ct,ze,Le]}],"backdrop-opacity":[{"backdrop-opacity":[ct,ze,Le]}],"backdrop-saturate":[{"backdrop-saturate":[ct,ze,Le]}],"backdrop-sepia":[{"backdrop-sepia":["",ct,ze,Le]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":Y()}],"border-spacing-x":[{"border-spacing-x":Y()}],"border-spacing-y":[{"border-spacing-y":Y()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ze,Le]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ct,"initial",ze,Le]}],ease:[{ease:["linear","initial",k,ze,Le]}],delay:[{delay:[ct,ze,Le]}],animate:[{animate:["none",C,ze,Le]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,ze,Le]}],"perspective-origin":[{"perspective-origin":re()}],rotate:[{rotate:ue()}],"rotate-x":[{"rotate-x":ue()}],"rotate-y":[{"rotate-y":ue()}],"rotate-z":[{"rotate-z":ue()}],scale:[{scale:ae()}],"scale-x":[{"scale-x":ae()}],"scale-y":[{"scale-y":ae()}],"scale-z":[{"scale-z":ae()}],"scale-3d":["scale-3d"],skew:[{skew:oe()}],"skew-x":[{"skew-x":oe()}],"skew-y":[{"skew-y":oe()}],transform:[{transform:[ze,Le,"","none","gpu","cpu"]}],"transform-origin":[{origin:re()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ce()}],"translate-x":[{"translate-x":Ce()}],"translate-y":[{"translate-y":Ce()}],"translate-z":[{"translate-z":Ce()}],"translate-none":["translate-none"],accent:[{accent:F()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:F()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ze,Le]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":Y()}],"scroll-mx":[{"scroll-mx":Y()}],"scroll-my":[{"scroll-my":Y()}],"scroll-ms":[{"scroll-ms":Y()}],"scroll-me":[{"scroll-me":Y()}],"scroll-mt":[{"scroll-mt":Y()}],"scroll-mr":[{"scroll-mr":Y()}],"scroll-mb":[{"scroll-mb":Y()}],"scroll-ml":[{"scroll-ml":Y()}],"scroll-p":[{"scroll-p":Y()}],"scroll-px":[{"scroll-px":Y()}],"scroll-py":[{"scroll-py":Y()}],"scroll-ps":[{"scroll-ps":Y()}],"scroll-pe":[{"scroll-pe":Y()}],"scroll-pt":[{"scroll-pt":Y()}],"scroll-pr":[{"scroll-pr":Y()}],"scroll-pb":[{"scroll-pb":Y()}],"scroll-pl":[{"scroll-pl":Y()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ze,Le]}],fill:[{fill:["none",...F()]}],"stroke-w":[{stroke:[ct,Ac,Ia,Hp]}],stroke:[{stroke:["none",...F()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["before","after","placeholder","file","marker","selection","first-line","first-letter","backdrop","*","**"]}},fL=Fj(cL);function Me(...e){return fL(O_(e))}function dL(){const e="0123456789abcdef";let t="#";for(let n=0;n<6;n++)t+=e.charAt(Math.floor(Math.random()*16));return t}function Cr(e){return e instanceof Error?e.message:`${e}`}const Dv=e=>{const t=e;t.use={};for(const n of Object.keys(t.getState()))t.use[n]=()=>t(r=>r[n]);return t},U_="",$r="ghost",hL="#B2EBF2",pL="#000",mL="#E2E2E2",gL="#EEEEEE",vL="#F57F17",yL="#969696",bL="#F57F17",Q0="#B2EBF2",Vp=20,J0=4,xL=20,wL=15,e1="*",SL={"text/plain":[".txt",".md"],"application/pdf":[".pdf"],"application/msword":[".doc"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":[".docx"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":[".pptx"]},t1={name:"LightRAG",github:"https://github.com/HKUDS/LightRAG"},EL=Tv()(_j(e=>({theme:"system",showPropertyPanel:!0,showNodeSearchBar:!0,showNodeLabel:!0,enableNodeDrag:!0,showEdgeLabel:!1,enableHideUnselectedEdges:!0,enableEdgeEvents:!1,queryLabel:e1,enableHealthCheck:!0,apiKey:null,currentTab:"documents",retrievalHistory:[],querySettings:{mode:"global",response_type:"Multiple Paragraphs",top_k:10,max_token_for_text_unit:4e3,max_token_for_global_context:4e3,max_token_for_local_context:4e3,only_need_context:!1,only_need_prompt:!1,stream:!0,history_turns:3,hl_keywords:[],ll_keywords:[]},setTheme:t=>e({theme:t}),setQueryLabel:t=>e({queryLabel:t}),setEnableHealthCheck:t=>e({enableHealthCheck:t}),setApiKey:t=>e({apiKey:t}),setCurrentTab:t=>e({currentTab:t}),setRetrievalHistory:t=>e({retrievalHistory:t}),updateQuerySettings:t=>e(n=>({querySettings:{...n.querySettings,...t}}))}),{name:"settings-storage",storage:D_(()=>localStorage),version:6,migrate:(e,t)=>(t<2&&(e.showEdgeLabel=!1),t<3&&(e.queryLabel=e1),t<4&&(e.showPropertyPanel=!0,e.showNodeSearchBar=!0,e.showNodeLabel=!0,e.enableHealthCheck=!0,e.apiKey=null),t<5&&(e.currentTab="documents"),t<6&&(e.querySettings={mode:"global",response_type:"Multiple Paragraphs",top_k:10,max_token_for_text_unit:4e3,max_token_for_global_context:4e3,max_token_for_local_context:4e3,only_need_context:!1,only_need_prompt:!1,stream:!0,history_turns:3,hl_keywords:[],ll_keywords:[]},e.retrievalHistory=[]),e)})),Qe=Dv(EL),_L={theme:"system",setTheme:()=>null},B_=E.createContext(_L);function kL({children:e,...t}){const[n,r]=E.useState(Qe.getState().theme);E.useEffect(()=>{const o=window.document.documentElement;if(o.classList.remove("light","dark"),n==="system"){const l=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";o.classList.add(l),r(l);return}o.classList.add(n)},[n]);const i={theme:n,setTheme:o=>{Qe.getState().setTheme(o),r(o)}};return S.jsx(B_.Provider,{...t,value:i,children:e})}const n1=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,r1=O_,$_=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return r1(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:o}=t,l=Object.keys(i).map(d=>{const p=n==null?void 0:n[d],m=o==null?void 0:o[d];if(p===null)return null;const v=n1(p)||n1(m);return i[d][v]}),u=n&&Object.entries(n).reduce((d,p)=>{let[m,v]=p;return v===void 0||(d[m]=v),d},{}),f=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((d,p)=>{let{class:m,className:v,...g}=p;return Object.entries(g).every(w=>{let[x,k]=w;return Array.isArray(k)?k.includes({...o,...u}[x]):{...o,...u}[x]===k})?[...d,m,v]:d},[]);return r1(e,l,f,n==null?void 0:n.class,n==null?void 0:n.className)},CL=$_("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),H_=E.forwardRef(({className:e,variant:t,...n},r)=>S.jsx("div",{ref:r,role:"alert",className:Me(CL({variant:t}),e),...n}));H_.displayName="Alert";const V_=E.forwardRef(({className:e,...t},n)=>S.jsx("h5",{ref:n,className:Me("mb-1 leading-none font-medium tracking-tight",e),...t}));V_.displayName="AlertTitle";const q_=E.forwardRef(({className:e,...t},n)=>S.jsx("div",{ref:n,className:Me("text-sm [&_p]:leading-relaxed",e),...t}));q_.displayName="AlertDescription";function Y_(e,t){return function(){return e.apply(t,arguments)}}const{toString:TL}=Object.prototype,{getPrototypeOf:Nv}=Object,qf=(e=>t=>{const n=TL.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Dr=e=>(e=e.toLowerCase(),t=>qf(t)===e),Yf=e=>t=>typeof t===e,{isArray:vs}=Array,Vl=Yf("undefined");function AL(e){return e!==null&&!Vl(e)&&e.constructor!==null&&!Vl(e.constructor)&&Yn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const W_=Dr("ArrayBuffer");function RL(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&W_(e.buffer),t}const DL=Yf("string"),Yn=Yf("function"),X_=Yf("number"),Wf=e=>e!==null&&typeof e=="object",NL=e=>e===!0||e===!1,tf=e=>{if(qf(e)!=="object")return!1;const t=Nv(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},OL=Dr("Date"),jL=Dr("File"),LL=Dr("Blob"),zL=Dr("FileList"),ML=e=>Wf(e)&&Yn(e.pipe),PL=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Yn(e.append)&&((t=qf(e))==="formdata"||t==="object"&&Yn(e.toString)&&e.toString()==="[object FormData]"))},FL=Dr("URLSearchParams"),[IL,GL,UL,BL]=["ReadableStream","Request","Response","Headers"].map(Dr),$L=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ru(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),vs(e))for(r=0,i=e.length;r0;)if(i=n[r],t===i.toLowerCase())return i;return null}const qa=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Z_=e=>!Vl(e)&&e!==qa;function Eg(){const{caseless:e}=Z_(this)&&this||{},t={},n=(r,i)=>{const o=e&&K_(t,i)||i;tf(t[o])&&tf(r)?t[o]=Eg(t[o],r):tf(r)?t[o]=Eg({},r):vs(r)?t[o]=r.slice():t[o]=r};for(let r=0,i=arguments.length;r(ru(t,(i,o)=>{n&&Yn(i)?e[o]=Y_(i,n):e[o]=i},{allOwnKeys:r}),e),VL=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),qL=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},YL=(e,t,n,r)=>{let i,o,l;const u={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)l=i[o],(!r||r(l,e,t))&&!u[l]&&(t[l]=e[l],u[l]=!0);e=n!==!1&&Nv(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},WL=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},XL=e=>{if(!e)return null;if(vs(e))return e;let t=e.length;if(!X_(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},KL=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Nv(Uint8Array)),ZL=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},QL=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},JL=Dr("HTMLFormElement"),ez=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),i1=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),tz=Dr("RegExp"),Q_=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ru(n,(i,o)=>{let l;(l=t(i,o,e))!==!1&&(r[o]=l||i)}),Object.defineProperties(e,r)},nz=e=>{Q_(e,(t,n)=>{if(Yn(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Yn(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},rz=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return vs(e)?r(e):r(String(e).split(t)),n},iz=()=>{},az=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,qp="abcdefghijklmnopqrstuvwxyz",a1="0123456789",J_={DIGIT:a1,ALPHA:qp,ALPHA_DIGIT:qp+qp.toUpperCase()+a1},oz=(e=16,t=J_.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function sz(e){return!!(e&&Yn(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const lz=e=>{const t=new Array(10),n=(r,i)=>{if(Wf(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const o=vs(r)?[]:{};return ru(r,(l,u)=>{const f=n(l,i+1);!Vl(f)&&(o[u]=f)}),t[i]=void 0,o}}return r};return n(e,0)},uz=Dr("AsyncFunction"),cz=e=>e&&(Wf(e)||Yn(e))&&Yn(e.then)&&Yn(e.catch),ek=((e,t)=>e?setImmediate:t?((n,r)=>(qa.addEventListener("message",({source:i,data:o})=>{i===qa&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),qa.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Yn(qa.postMessage)),fz=typeof queueMicrotask<"u"?queueMicrotask.bind(qa):typeof process<"u"&&process.nextTick||ek,fe={isArray:vs,isArrayBuffer:W_,isBuffer:AL,isFormData:PL,isArrayBufferView:RL,isString:DL,isNumber:X_,isBoolean:NL,isObject:Wf,isPlainObject:tf,isReadableStream:IL,isRequest:GL,isResponse:UL,isHeaders:BL,isUndefined:Vl,isDate:OL,isFile:jL,isBlob:LL,isRegExp:tz,isFunction:Yn,isStream:ML,isURLSearchParams:FL,isTypedArray:KL,isFileList:zL,forEach:ru,merge:Eg,extend:HL,trim:$L,stripBOM:VL,inherits:qL,toFlatObject:YL,kindOf:qf,kindOfTest:Dr,endsWith:WL,toArray:XL,forEachEntry:ZL,matchAll:QL,isHTMLForm:JL,hasOwnProperty:i1,hasOwnProp:i1,reduceDescriptors:Q_,freezeMethods:nz,toObjectSet:rz,toCamelCase:ez,noop:iz,toFiniteNumber:az,findKey:K_,global:qa,isContextDefined:Z_,ALPHABET:J_,generateString:oz,isSpecCompliantForm:sz,toJSONObject:lz,isAsyncFn:uz,isThenable:cz,setImmediate:ek,asap:fz};function tt(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}fe.inherits(tt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:fe.toJSONObject(this.config),code:this.code,status:this.status}}});const tk=tt.prototype,nk={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{nk[e]={value:e}});Object.defineProperties(tt,nk);Object.defineProperty(tk,"isAxiosError",{value:!0});tt.from=(e,t,n,r,i,o)=>{const l=Object.create(tk);return fe.toFlatObject(e,l,function(f){return f!==Error.prototype},u=>u!=="isAxiosError"),tt.call(l,e.message,t,n,r,i),l.cause=e,l.name=e.name,o&&Object.assign(l,o),l};const dz=null;function _g(e){return fe.isPlainObject(e)||fe.isArray(e)}function rk(e){return fe.endsWith(e,"[]")?e.slice(0,-2):e}function o1(e,t,n){return e?e.concat(t).map(function(i,o){return i=rk(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function hz(e){return fe.isArray(e)&&!e.some(_g)}const pz=fe.toFlatObject(fe,{},null,function(t){return/^is[A-Z]/.test(t)});function Xf(e,t,n){if(!fe.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=fe.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,k){return!fe.isUndefined(k[x])});const r=n.metaTokens,i=n.visitor||p,o=n.dots,l=n.indexes,f=(n.Blob||typeof Blob<"u"&&Blob)&&fe.isSpecCompliantForm(t);if(!fe.isFunction(i))throw new TypeError("visitor must be a function");function d(w){if(w===null)return"";if(fe.isDate(w))return w.toISOString();if(!f&&fe.isBlob(w))throw new tt("Blob is not supported. Use a Buffer instead.");return fe.isArrayBuffer(w)||fe.isTypedArray(w)?f&&typeof Blob=="function"?new Blob([w]):Buffer.from(w):w}function p(w,x,k){let C=w;if(w&&!k&&typeof w=="object"){if(fe.endsWith(x,"{}"))x=r?x:x.slice(0,-2),w=JSON.stringify(w);else if(fe.isArray(w)&&hz(w)||(fe.isFileList(w)||fe.endsWith(x,"[]"))&&(C=fe.toArray(w)))return x=rk(x),C.forEach(function(T,N){!(fe.isUndefined(T)||T===null)&&t.append(l===!0?o1([x],N,o):l===null?x:x+"[]",d(T))}),!1}return _g(w)?!0:(t.append(o1(k,x,o),d(w)),!1)}const m=[],v=Object.assign(pz,{defaultVisitor:p,convertValue:d,isVisitable:_g});function g(w,x){if(!fe.isUndefined(w)){if(m.indexOf(w)!==-1)throw Error("Circular reference detected in "+x.join("."));m.push(w),fe.forEach(w,function(C,_){(!(fe.isUndefined(C)||C===null)&&i.call(t,C,fe.isString(_)?_.trim():_,x,v))===!0&&g(C,x?x.concat(_):[_])}),m.pop()}}if(!fe.isObject(e))throw new TypeError("data must be an object");return g(e),t}function s1(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Ov(e,t){this._pairs=[],e&&Xf(e,this,t)}const ik=Ov.prototype;ik.append=function(t,n){this._pairs.push([t,n])};ik.toString=function(t){const n=t?function(r){return t.call(this,r,s1)}:s1;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function mz(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ak(e,t,n){if(!t)return e;const r=n&&n.encode||mz;fe.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let o;if(i?o=i(t,n):o=fe.isURLSearchParams(t)?t.toString():new Ov(t,n).toString(r),o){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class l1{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){fe.forEach(this.handlers,function(r){r!==null&&t(r)})}}const ok={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},gz=typeof URLSearchParams<"u"?URLSearchParams:Ov,vz=typeof FormData<"u"?FormData:null,yz=typeof Blob<"u"?Blob:null,bz={isBrowser:!0,classes:{URLSearchParams:gz,FormData:vz,Blob:yz},protocols:["http","https","file","blob","url","data"]},jv=typeof window<"u"&&typeof document<"u",kg=typeof navigator=="object"&&navigator||void 0,xz=jv&&(!kg||["ReactNative","NativeScript","NS"].indexOf(kg.product)<0),wz=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Sz=jv&&window.location.href||"http://localhost",Ez=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:jv,hasStandardBrowserEnv:xz,hasStandardBrowserWebWorkerEnv:wz,navigator:kg,origin:Sz},Symbol.toStringTag,{value:"Module"})),gn={...Ez,...bz};function _z(e,t){return Xf(e,new gn.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return gn.isNode&&fe.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function kz(e){return fe.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Cz(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r=n.length;return l=!l&&fe.isArray(i)?i.length:l,f?(fe.hasOwnProp(i,l)?i[l]=[i[l],r]:i[l]=r,!u):((!i[l]||!fe.isObject(i[l]))&&(i[l]=[]),t(n,r,i[l],o)&&fe.isArray(i[l])&&(i[l]=Cz(i[l])),!u)}if(fe.isFormData(e)&&fe.isFunction(e.entries)){const n={};return fe.forEachEntry(e,(r,i)=>{t(kz(r),i,n,0)}),n}return null}function Tz(e,t,n){if(fe.isString(e))try{return(t||JSON.parse)(e),fe.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const iu={transitional:ok,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=fe.isObject(t);if(o&&fe.isHTMLForm(t)&&(t=new FormData(t)),fe.isFormData(t))return i?JSON.stringify(sk(t)):t;if(fe.isArrayBuffer(t)||fe.isBuffer(t)||fe.isStream(t)||fe.isFile(t)||fe.isBlob(t)||fe.isReadableStream(t))return t;if(fe.isArrayBufferView(t))return t.buffer;if(fe.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let u;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return _z(t,this.formSerializer).toString();if((u=fe.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return Xf(u?{"files[]":t}:t,f&&new f,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),Tz(t)):t}],transformResponse:[function(t){const n=this.transitional||iu.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(fe.isResponse(t)||fe.isReadableStream(t))return t;if(t&&fe.isString(t)&&(r&&!this.responseType||i)){const l=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(u){if(l)throw u.name==="SyntaxError"?tt.from(u,tt.ERR_BAD_RESPONSE,this,null,this.response):u}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:gn.classes.FormData,Blob:gn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};fe.forEach(["delete","get","head","post","put","patch"],e=>{iu.headers[e]={}});const Az=fe.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Rz=e=>{const t={};let n,r,i;return e&&e.split(` +`).forEach(function(l){i=l.indexOf(":"),n=l.substring(0,i).trim().toLowerCase(),r=l.substring(i+1).trim(),!(!n||t[n]&&Az[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},u1=Symbol("internals");function Cl(e){return e&&String(e).trim().toLowerCase()}function nf(e){return e===!1||e==null?e:fe.isArray(e)?e.map(nf):String(e)}function Dz(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Nz=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Yp(e,t,n,r,i){if(fe.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!fe.isString(t)){if(fe.isString(r))return t.indexOf(r)!==-1;if(fe.isRegExp(r))return r.test(t)}}function Oz(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function jz(e,t){const n=fe.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,o,l){return this[r].call(this,t,i,o,l)},configurable:!0})})}let zn=class{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(u,f,d){const p=Cl(f);if(!p)throw new Error("header name must be a non-empty string");const m=fe.findKey(i,p);(!m||i[m]===void 0||d===!0||d===void 0&&i[m]!==!1)&&(i[m||f]=nf(u))}const l=(u,f)=>fe.forEach(u,(d,p)=>o(d,p,f));if(fe.isPlainObject(t)||t instanceof this.constructor)l(t,n);else if(fe.isString(t)&&(t=t.trim())&&!Nz(t))l(Rz(t),n);else if(fe.isHeaders(t))for(const[u,f]of t.entries())o(f,u,r);else t!=null&&o(n,t,r);return this}get(t,n){if(t=Cl(t),t){const r=fe.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return Dz(i);if(fe.isFunction(n))return n.call(this,i,r);if(fe.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Cl(t),t){const r=fe.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Yp(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(l){if(l=Cl(l),l){const u=fe.findKey(r,l);u&&(!n||Yp(r,r[u],u,n))&&(delete r[u],i=!0)}}return fe.isArray(t)?t.forEach(o):o(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!t||Yp(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return fe.forEach(this,(i,o)=>{const l=fe.findKey(r,o);if(l){n[l]=nf(i),delete n[o];return}const u=t?Oz(o):String(o).trim();u!==o&&delete n[o],n[u]=nf(i),r[u]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return fe.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&fe.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[u1]=this[u1]={accessors:{}}).accessors,i=this.prototype;function o(l){const u=Cl(l);r[u]||(jz(i,l),r[u]=!0)}return fe.isArray(t)?t.forEach(o):o(t),this}};zn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);fe.reduceDescriptors(zn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});fe.freezeMethods(zn);function Wp(e,t){const n=this||iu,r=t||n,i=zn.from(r.headers);let o=r.data;return fe.forEach(e,function(u){o=u.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function lk(e){return!!(e&&e.__CANCEL__)}function ys(e,t,n){tt.call(this,e??"canceled",tt.ERR_CANCELED,t,n),this.name="CanceledError"}fe.inherits(ys,tt,{__CANCEL__:!0});function uk(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new tt("Request failed with status code "+n.status,[tt.ERR_BAD_REQUEST,tt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Lz(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function zz(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,l;return t=t!==void 0?t:1e3,function(f){const d=Date.now(),p=r[o];l||(l=d),n[i]=f,r[i]=d;let m=o,v=0;for(;m!==i;)v+=n[m++],m=m%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),d-l{n=p,i=null,o&&(clearTimeout(o),o=null),e.apply(null,d)};return[(...d)=>{const p=Date.now(),m=p-n;m>=r?l(d,p):(i=d,o||(o=setTimeout(()=>{o=null,l(i)},r-m)))},()=>i&&l(i)]}const bf=(e,t,n=3)=>{let r=0;const i=zz(50,250);return Mz(o=>{const l=o.loaded,u=o.lengthComputable?o.total:void 0,f=l-r,d=i(f),p=l<=u;r=l;const m={loaded:l,total:u,progress:u?l/u:void 0,bytes:f,rate:d||void 0,estimated:d&&u&&p?(u-l)/d:void 0,event:o,lengthComputable:u!=null,[t?"download":"upload"]:!0};e(m)},n)},c1=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},f1=e=>(...t)=>fe.asap(()=>e(...t)),Pz=gn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,gn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(gn.origin),gn.navigator&&/(msie|trident)/i.test(gn.navigator.userAgent)):()=>!0,Fz=gn.hasStandardBrowserEnv?{write(e,t,n,r,i,o){const l=[e+"="+encodeURIComponent(t)];fe.isNumber(n)&&l.push("expires="+new Date(n).toGMTString()),fe.isString(r)&&l.push("path="+r),fe.isString(i)&&l.push("domain="+i),o===!0&&l.push("secure"),document.cookie=l.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Iz(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Gz(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function ck(e,t){return e&&!Iz(t)?Gz(e,t):t}const d1=e=>e instanceof zn?{...e}:e;function Wa(e,t){t=t||{};const n={};function r(d,p,m,v){return fe.isPlainObject(d)&&fe.isPlainObject(p)?fe.merge.call({caseless:v},d,p):fe.isPlainObject(p)?fe.merge({},p):fe.isArray(p)?p.slice():p}function i(d,p,m,v){if(fe.isUndefined(p)){if(!fe.isUndefined(d))return r(void 0,d,m,v)}else return r(d,p,m,v)}function o(d,p){if(!fe.isUndefined(p))return r(void 0,p)}function l(d,p){if(fe.isUndefined(p)){if(!fe.isUndefined(d))return r(void 0,d)}else return r(void 0,p)}function u(d,p,m){if(m in t)return r(d,p);if(m in e)return r(void 0,d)}const f={url:o,method:o,data:o,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:u,headers:(d,p,m)=>i(d1(d),d1(p),m,!0)};return fe.forEach(Object.keys(Object.assign({},e,t)),function(p){const m=f[p]||i,v=m(e[p],t[p],p);fe.isUndefined(v)&&m!==u||(n[p]=v)}),n}const fk=e=>{const t=Wa({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:l,auth:u}=t;t.headers=l=zn.from(l),t.url=ak(ck(t.baseURL,t.url),e.params,e.paramsSerializer),u&&l.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):"")));let f;if(fe.isFormData(n)){if(gn.hasStandardBrowserEnv||gn.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if((f=l.getContentType())!==!1){const[d,...p]=f?f.split(";").map(m=>m.trim()).filter(Boolean):[];l.setContentType([d||"multipart/form-data",...p].join("; "))}}if(gn.hasStandardBrowserEnv&&(r&&fe.isFunction(r)&&(r=r(t)),r||r!==!1&&Pz(t.url))){const d=i&&o&&Fz.read(o);d&&l.set(i,d)}return t},Uz=typeof XMLHttpRequest<"u",Bz=Uz&&function(e){return new Promise(function(n,r){const i=fk(e);let o=i.data;const l=zn.from(i.headers).normalize();let{responseType:u,onUploadProgress:f,onDownloadProgress:d}=i,p,m,v,g,w;function x(){g&&g(),w&&w(),i.cancelToken&&i.cancelToken.unsubscribe(p),i.signal&&i.signal.removeEventListener("abort",p)}let k=new XMLHttpRequest;k.open(i.method.toUpperCase(),i.url,!0),k.timeout=i.timeout;function C(){if(!k)return;const T=zn.from("getAllResponseHeaders"in k&&k.getAllResponseHeaders()),D={data:!u||u==="text"||u==="json"?k.responseText:k.response,status:k.status,statusText:k.statusText,headers:T,config:e,request:k};uk(function(R){n(R),x()},function(R){r(R),x()},D),k=null}"onloadend"in k?k.onloadend=C:k.onreadystatechange=function(){!k||k.readyState!==4||k.status===0&&!(k.responseURL&&k.responseURL.indexOf("file:")===0)||setTimeout(C)},k.onabort=function(){k&&(r(new tt("Request aborted",tt.ECONNABORTED,e,k)),k=null)},k.onerror=function(){r(new tt("Network Error",tt.ERR_NETWORK,e,k)),k=null},k.ontimeout=function(){let N=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const D=i.transitional||ok;i.timeoutErrorMessage&&(N=i.timeoutErrorMessage),r(new tt(N,D.clarifyTimeoutError?tt.ETIMEDOUT:tt.ECONNABORTED,e,k)),k=null},o===void 0&&l.setContentType(null),"setRequestHeader"in k&&fe.forEach(l.toJSON(),function(N,D){k.setRequestHeader(D,N)}),fe.isUndefined(i.withCredentials)||(k.withCredentials=!!i.withCredentials),u&&u!=="json"&&(k.responseType=i.responseType),d&&([v,w]=bf(d,!0),k.addEventListener("progress",v)),f&&k.upload&&([m,g]=bf(f),k.upload.addEventListener("progress",m),k.upload.addEventListener("loadend",g)),(i.cancelToken||i.signal)&&(p=T=>{k&&(r(!T||T.type?new ys(null,e,k):T),k.abort(),k=null)},i.cancelToken&&i.cancelToken.subscribe(p),i.signal&&(i.signal.aborted?p():i.signal.addEventListener("abort",p)));const _=Lz(i.url);if(_&&gn.protocols.indexOf(_)===-1){r(new tt("Unsupported protocol "+_+":",tt.ERR_BAD_REQUEST,e));return}k.send(o||null)})},$z=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const o=function(d){if(!i){i=!0,u();const p=d instanceof Error?d:this.reason;r.abort(p instanceof tt?p:new ys(p instanceof Error?p.message:p))}};let l=t&&setTimeout(()=>{l=null,o(new tt(`timeout ${t} of ms exceeded`,tt.ETIMEDOUT))},t);const u=()=>{e&&(l&&clearTimeout(l),l=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(o):d.removeEventListener("abort",o)}),e=null)};e.forEach(d=>d.addEventListener("abort",o));const{signal:f}=r;return f.unsubscribe=()=>fe.asap(u),f}},Hz=function*(e,t){let n=e.byteLength;if(n{const i=Vz(e,t);let o=0,l,u=f=>{l||(l=!0,r&&r(f))};return new ReadableStream({async pull(f){try{const{done:d,value:p}=await i.next();if(d){u(),f.close();return}let m=p.byteLength;if(n){let v=o+=m;n(v)}f.enqueue(new Uint8Array(p))}catch(d){throw u(d),d}},cancel(f){return u(f),i.return()}},{highWaterMark:2})},Kf=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",dk=Kf&&typeof ReadableStream=="function",Yz=Kf&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),hk=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Wz=dk&&hk(()=>{let e=!1;const t=new Request(gn.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),p1=64*1024,Cg=dk&&hk(()=>fe.isReadableStream(new Response("").body)),xf={stream:Cg&&(e=>e.body)};Kf&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!xf[t]&&(xf[t]=fe.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new tt(`Response type '${t}' is not supported`,tt.ERR_NOT_SUPPORT,r)})})})(new Response);const Xz=async e=>{if(e==null)return 0;if(fe.isBlob(e))return e.size;if(fe.isSpecCompliantForm(e))return(await new Request(gn.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(fe.isArrayBufferView(e)||fe.isArrayBuffer(e))return e.byteLength;if(fe.isURLSearchParams(e)&&(e=e+""),fe.isString(e))return(await Yz(e)).byteLength},Kz=async(e,t)=>{const n=fe.toFiniteNumber(e.getContentLength());return n??Xz(t)},Zz=Kf&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:o,timeout:l,onDownloadProgress:u,onUploadProgress:f,responseType:d,headers:p,withCredentials:m="same-origin",fetchOptions:v}=fk(e);d=d?(d+"").toLowerCase():"text";let g=$z([i,o&&o.toAbortSignal()],l),w;const x=g&&g.unsubscribe&&(()=>{g.unsubscribe()});let k;try{if(f&&Wz&&n!=="get"&&n!=="head"&&(k=await Kz(p,r))!==0){let D=new Request(t,{method:"POST",body:r,duplex:"half"}),L;if(fe.isFormData(r)&&(L=D.headers.get("content-type"))&&p.setContentType(L),D.body){const[R,U]=c1(k,bf(f1(f)));r=h1(D.body,p1,R,U)}}fe.isString(m)||(m=m?"include":"omit");const C="credentials"in Request.prototype;w=new Request(t,{...v,signal:g,method:n.toUpperCase(),headers:p.normalize().toJSON(),body:r,duplex:"half",credentials:C?m:void 0});let _=await fetch(w);const T=Cg&&(d==="stream"||d==="response");if(Cg&&(u||T&&x)){const D={};["status","statusText","headers"].forEach(P=>{D[P]=_[P]});const L=fe.toFiniteNumber(_.headers.get("content-length")),[R,U]=u&&c1(L,bf(f1(u),!0))||[];_=new Response(h1(_.body,p1,R,()=>{U&&U(),x&&x()}),D)}d=d||"text";let N=await xf[fe.findKey(xf,d)||"text"](_,e);return!T&&x&&x(),await new Promise((D,L)=>{uk(D,L,{data:N,headers:zn.from(_.headers),status:_.status,statusText:_.statusText,config:e,request:w})})}catch(C){throw x&&x(),C&&C.name==="TypeError"&&/fetch/i.test(C.message)?Object.assign(new tt("Network Error",tt.ERR_NETWORK,e,w),{cause:C.cause||C}):tt.from(C,C&&C.code,e,w)}}),Tg={http:dz,xhr:Bz,fetch:Zz};fe.forEach(Tg,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const m1=e=>`- ${e}`,Qz=e=>fe.isFunction(e)||e===null||e===!1,pk={getAdapter:e=>{e=fe.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let o=0;o`adapter ${u} `+(f===!1?"is not supported by the environment":"is not available in the build"));let l=t?o.length>1?`since : +`+o.map(m1).join(` +`):" "+m1(o[0]):"as no adapter specified";throw new tt("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return r},adapters:Tg};function Xp(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ys(null,e)}function g1(e){return Xp(e),e.headers=zn.from(e.headers),e.data=Wp.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),pk.getAdapter(e.adapter||iu.adapter)(e).then(function(r){return Xp(e),r.data=Wp.call(e,e.transformResponse,r),r.headers=zn.from(r.headers),r},function(r){return lk(r)||(Xp(e),r&&r.response&&(r.response.data=Wp.call(e,e.transformResponse,r.response),r.response.headers=zn.from(r.response.headers))),Promise.reject(r)})}const mk="1.7.9",Zf={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Zf[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const v1={};Zf.transitional=function(t,n,r){function i(o,l){return"[Axios v"+mk+"] Transitional option '"+o+"'"+l+(r?". "+r:"")}return(o,l,u)=>{if(t===!1)throw new tt(i(l," has been removed"+(n?" in "+n:"")),tt.ERR_DEPRECATED);return n&&!v1[l]&&(v1[l]=!0,console.warn(i(l," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,l,u):!0}};Zf.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Jz(e,t,n){if(typeof e!="object")throw new tt("options must be an object",tt.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],l=t[o];if(l){const u=e[o],f=u===void 0||l(u,o,e);if(f!==!0)throw new tt("option "+o+" must be "+f,tt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new tt("Unknown option "+o,tt.ERR_BAD_OPTION)}}const rf={assertOptions:Jz,validators:Zf},Fr=rf.validators;let Ya=class{constructor(t){this.defaults=t,this.interceptors={request:new l1,response:new l1}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=` +`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Wa(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&rf.assertOptions(r,{silentJSONParsing:Fr.transitional(Fr.boolean),forcedJSONParsing:Fr.transitional(Fr.boolean),clarifyTimeoutError:Fr.transitional(Fr.boolean)},!1),i!=null&&(fe.isFunction(i)?n.paramsSerializer={serialize:i}:rf.assertOptions(i,{encode:Fr.function,serialize:Fr.function},!0)),rf.assertOptions(n,{baseUrl:Fr.spelling("baseURL"),withXsrfToken:Fr.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=o&&fe.merge(o.common,o[n.method]);o&&fe.forEach(["delete","get","head","post","put","patch","common"],w=>{delete o[w]}),n.headers=zn.concat(l,o);const u=[];let f=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(n)===!1||(f=f&&x.synchronous,u.unshift(x.fulfilled,x.rejected))});const d=[];this.interceptors.response.forEach(function(x){d.push(x.fulfilled,x.rejected)});let p,m=0,v;if(!f){const w=[g1.bind(this),void 0];for(w.unshift.apply(w,u),w.push.apply(w,d),v=w.length,p=Promise.resolve(n);m{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const l=new Promise(u=>{r.subscribe(u),o=u}).then(i);return l.cancel=function(){r.unsubscribe(o)},l},t(function(o,l,u){r.reason||(r.reason=new ys(o,l,u),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new gk(function(i){t=i}),cancel:t}}};function tM(e){return function(n){return e.apply(null,n)}}function nM(e){return fe.isObject(e)&&e.isAxiosError===!0}const Ag={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ag).forEach(([e,t])=>{Ag[t]=e});function vk(e){const t=new Ya(e),n=Y_(Ya.prototype.request,t);return fe.extend(n,Ya.prototype,t,{allOwnKeys:!0}),fe.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return vk(Wa(e,i))},n}const Ut=vk(iu);Ut.Axios=Ya;Ut.CanceledError=ys;Ut.CancelToken=eM;Ut.isCancel=lk;Ut.VERSION=mk;Ut.toFormData=Xf;Ut.AxiosError=tt;Ut.Cancel=Ut.CanceledError;Ut.all=function(t){return Promise.all(t)};Ut.spread=tM;Ut.isAxiosError=nM;Ut.mergeConfig=Wa;Ut.AxiosHeaders=zn;Ut.formToJSON=e=>sk(fe.isHTMLForm(e)?new FormData(e):e);Ut.getAdapter=pk.getAdapter;Ut.HttpStatusCode=Ag;Ut.default=Ut;const{Axios:XX,AxiosError:KX,CanceledError:ZX,isCancel:QX,CancelToken:JX,VERSION:eK,all:tK,Cancel:nK,isAxiosError:rK,spread:iK,toFormData:aK,AxiosHeaders:oK,HttpStatusCode:sK,formToJSON:lK,getAdapter:uK,mergeConfig:cK}=Ut,yk="Invalid API Key",bk="API Key required",Nr=Ut.create({baseURL:U_,headers:{"Content-Type":"application/json"}});Nr.interceptors.request.use(e=>{const t=Qe.getState().apiKey;return t&&(e.headers["X-API-Key"]=t),e});Nr.interceptors.response.use(e=>e,e=>{var t;throw e.response?new Error(`${e.response.status} ${e.response.statusText} +${JSON.stringify(e.response.data)} +${(t=e.config)==null?void 0:t.url}`):e});const rM=async e=>(await Nr.get(`/graphs?label=${e}`)).data,iM=async()=>(await Nr.get("/graph/label/list")).data,aM=async()=>{try{return(await Nr.get("/health")).data}catch(e){return{status:"error",message:Cr(e)}}},oM=async()=>(await Nr.get("/documents")).data,sM=async()=>(await Nr.post("/documents/scan")).data,lM=async e=>(await Nr.post("/query",e)).data,uM=async(e,t,n)=>{try{let r="";if(await Nr.post("/query/stream",e,{responseType:"text",headers:{Accept:"application/x-ndjson"},transformResponse:[i=>{r+=i;const o=r.split(` +`);r=o.pop()||"";for(const l of o)if(l.trim())try{const u=JSON.parse(l);u.response?t(u.response):u.error&&n&&n(u.error)}catch(u){console.error("Error parsing stream chunk:",u),n&&n("Error parsing server response")}return i}]}).catch(i=>{n&&n(Cr(i))}),r.trim())try{const i=JSON.parse(r);i.response?t(i.response):i.error&&n&&n(i.error)}catch(i){console.error("Error parsing final chunk:",i),n&&n("Error parsing server response")}}catch(r){const i=Cr(r);console.error("Stream request failed:",i),n&&n(i)}},cM=async(e,t)=>{const n=new FormData;return n.append("file",e),(await Nr.post("/documents/upload",n,{headers:{"Content-Type":"multipart/form-data"},onUploadProgress:t!==void 0?i=>{const o=Math.round(i.loaded*100/i.total);t(o)}:void 0})).data},fM=async()=>(await Nr.delete("/documents")).data,dM=Tv()(e=>({health:!0,message:null,messageTitle:null,lastCheckTime:Date.now(),status:null,check:async()=>{const t=await aM();return t.status==="healthy"?(e({health:!0,message:null,messageTitle:null,lastCheckTime:Date.now(),status:t}),!0):(e({health:!1,message:t.message,messageTitle:"Backend Health Check Error!",lastCheckTime:Date.now(),status:null}),!1)},clear:()=>{e({health:!0,message:null,messageTitle:null})},setErrorMessage:(t,n)=>{e({health:!1,message:t,messageTitle:n})}})),Mn=Dv(dM);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const hM=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),xk=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */var pM={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const mM=E.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:l,...u},f)=>E.createElement("svg",{ref:f,...pM,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:xk("lucide",i),...u},[...l.map(([d,p])=>E.createElement(d,p)),...Array.isArray(o)?o:[o]]));/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Et=(e,t)=>{const n=E.forwardRef(({className:r,...i},o)=>E.createElement(mM,{ref:o,iconNode:t,className:xk(`lucide-${hM(e)}`,r),...i}));return n.displayName=`${e}`,n};/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const gM=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Lv=Et("Check",gM);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const vM=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],zv=Et("ChevronDown",vM);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const yM=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],wk=Et("ChevronUp",yM);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const bM=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],xM=Et("ChevronsUpDown",bM);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const wM=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],SM=Et("CircleAlert",wM);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const EM=[["path",{d:"m7 21-4.3-4.3c-1-1-1-2.5 0-3.4l9.6-9.6c1-1 2.5-1 3.4 0l5.6 5.6c1 1 1 2.5 0 3.4L13 21",key:"182aya"}],["path",{d:"M22 21H7",key:"t4ddhn"}],["path",{d:"m5 11 9 9",key:"1mo9qw"}]],Sk=Et("Eraser",EM);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const _M=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],kM=Et("FileText",_M);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const CM=[["path",{d:"M20 7h-3a2 2 0 0 1-2-2V2",key:"x099mo"}],["path",{d:"M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z",key:"18t6ie"}],["path",{d:"M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8",key:"1nja0z"}]],TM=Et("Files",CM);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const AM=[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["rect",{width:"10",height:"8",x:"7",y:"8",rx:"1",key:"vys8me"}]],RM=Et("Fullscreen",AM);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const DM=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]],NM=Et("Github",DM);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const OM=[["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"19",cy:"5",r:"1",key:"w8mnmm"}],["circle",{cx:"5",cy:"5",r:"1",key:"lttvr7"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}],["circle",{cx:"19",cy:"19",r:"1",key:"shf9b7"}],["circle",{cx:"5",cy:"19",r:"1",key:"bfqh0e"}]],jM=Et("Grip",OM);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const LM=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Ek=Et("LoaderCircle",LM);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const zM=[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]],MM=Et("Loader",zM);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const PM=[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]],FM=Et("Maximize",PM);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const IM=[["path",{d:"M8 3v3a2 2 0 0 1-2 2H3",key:"hohbtr"}],["path",{d:"M21 8h-3a2 2 0 0 1-2-2V3",key:"5jw1f3"}],["path",{d:"M3 16h3a2 2 0 0 1 2 2v3",key:"198tvr"}],["path",{d:"M16 21v-3a2 2 0 0 1 2-2h3",key:"ph8mxp"}]],GM=Et("Minimize",IM);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const UM=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],BM=Et("Moon",UM);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const $M=[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]],HM=Et("Pause",$M);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const VM=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],qM=Et("Play",VM);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const YM=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],WM=Et("RefreshCw",YM);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const XM=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],KM=Et("Search",XM);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ZM=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],QM=Et("Send",ZM);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const JM=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],eP=Et("Settings",JM);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const tP=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],nP=Et("Sun",tP);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const rP=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]],Rg=Et("Upload",rP);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const iP=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],_k=Et("X",iP);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const aP=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],oP=Et("Zap",aP);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const sP=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]],lP=Et("ZoomIn",sP);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const uP=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]],cP=Et("ZoomOut",uP),fP=()=>{const e=Mn.use.health(),t=Mn.use.message(),n=Mn.use.messageTitle(),[r,i]=E.useState(!1);return E.useEffect(()=>{setTimeout(()=>{i(!0)},50)},[]),S.jsxs(H_,{className:Me("bg-background/90 absolute top-12 left-1/2 flex w-auto max-w-lg -translate-x-1/2 transform items-center gap-4 shadow-md backdrop-blur-lg transition-all duration-500 ease-in-out",r?"translate-y-0 opacity-100":"-translate-y-20 opacity-0",!e&&"bg-red-700 text-white"),children:[!e&&S.jsx("div",{children:S.jsx(SM,{className:"size-4"})}),S.jsxs("div",{children:[S.jsx(V_,{className:"font-bold",children:n}),S.jsx(q_,{children:t})]})]})};function dP(e,t){const n=E.createContext(t),r=o=>{const{children:l,...u}=o,f=E.useMemo(()=>u,Object.values(u));return S.jsx(n.Provider,{value:f,children:l})};r.displayName=e+"Provider";function i(o){const l=E.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,i]}function dr(e,t=[]){let n=[];function r(o,l){const u=E.createContext(l),f=n.length;n=[...n,l];const d=m=>{var C;const{scope:v,children:g,...w}=m,x=((C=v==null?void 0:v[e])==null?void 0:C[f])||u,k=E.useMemo(()=>w,Object.values(w));return S.jsx(x.Provider,{value:k,children:g})};d.displayName=o+"Provider";function p(m,v){var x;const g=((x=v==null?void 0:v[e])==null?void 0:x[f])||u,w=E.useContext(g);if(w)return w;if(l!==void 0)return l;throw new Error(`\`${m}\` must be used within \`${o}\``)}return[d,p]}const i=()=>{const o=n.map(l=>E.createContext(l));return function(u){const f=(u==null?void 0:u[e])||o;return E.useMemo(()=>({[`__scope${e}`]:{...u,[e]:f}}),[u,f])}};return i.scopeName=e,[r,hP(i,...t)]}function hP(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const l=r.reduce((u,{useScope:f,scopeName:d})=>{const m=f(o)[`__scope${d}`];return{...u,...m}},{});return E.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}function y1(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function kk(...e){return t=>{let n=!1;const r=e.map(i=>{const o=y1(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i{},pP=dj.useId||(()=>{}),mP=0;function bn(e){const[t,n]=E.useState(pP());return xn(()=>{n(r=>r??String(mP++))},[e]),t?`radix-${t}`:""}function un(e){const t=E.useRef(e);return E.useEffect(()=>{t.current=e}),E.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function _i({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=gP({defaultProp:t,onChange:n}),o=e!==void 0,l=o?e:r,u=un(n),f=E.useCallback(d=>{if(o){const m=typeof d=="function"?d(e):d;m!==e&&u(m)}else i(d)},[o,e,i,u]);return[l,f]}function gP({defaultProp:e,onChange:t}){const n=E.useState(e),[r]=n,i=E.useRef(r),o=un(t);return E.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}var au=R_();const Ck=fn(au);var ua=E.forwardRef((e,t)=>{const{children:n,...r}=e,i=E.Children.toArray(n),o=i.find(vP);if(o){const l=o.props.children,u=i.map(f=>f===o?E.Children.count(l)>1?E.Children.only(null):E.isValidElement(l)?l.props.children:null:f);return S.jsx(Dg,{...r,ref:t,children:E.isValidElement(l)?E.cloneElement(l,void 0,u):null})}return S.jsx(Dg,{...r,ref:t,children:n})});ua.displayName="Slot";var Dg=E.forwardRef((e,t)=>{const{children:n,...r}=e;if(E.isValidElement(n)){const i=bP(n),o=yP(r,n.props);return n.type!==E.Fragment&&(o.ref=t?kk(t,i):i),E.cloneElement(n,o)}return E.Children.count(n)>1?E.Children.only(null):null});Dg.displayName="SlotClone";var Mv=({children:e})=>S.jsx(S.Fragment,{children:e});function vP(e){return E.isValidElement(e)&&e.type===Mv}function yP(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...u)=>{o(...u),i(...u)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function bP(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var xP=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],We=xP.reduce((e,t)=>{const n=E.forwardRef((r,i)=>{const{asChild:o,...l}=r,u=o?ua:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),S.jsx(u,{...l,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function wP(e,t){e&&au.flushSync(()=>e.dispatchEvent(t))}function SP(e,t=globalThis==null?void 0:globalThis.document){const n=un(e);E.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var EP="DismissableLayer",Ng="dismissableLayer.update",_P="dismissableLayer.pointerDownOutside",kP="dismissableLayer.focusOutside",b1,Tk=E.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ou=E.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:l,onDismiss:u,...f}=e,d=E.useContext(Tk),[p,m]=E.useState(null),v=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=E.useState({}),w=dt(t,R=>m(R)),x=Array.from(d.layers),[k]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),C=x.indexOf(k),_=p?x.indexOf(p):-1,T=d.layersWithOutsidePointerEventsDisabled.size>0,N=_>=C,D=AP(R=>{const U=R.target,P=[...d.branches].some(z=>z.contains(U));!N||P||(i==null||i(R),l==null||l(R),R.defaultPrevented||u==null||u())},v),L=RP(R=>{const U=R.target;[...d.branches].some(z=>z.contains(U))||(o==null||o(R),l==null||l(R),R.defaultPrevented||u==null||u())},v);return SP(R=>{_===d.layers.size-1&&(r==null||r(R),!R.defaultPrevented&&u&&(R.preventDefault(),u()))},v),E.useEffect(()=>{if(p)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(b1=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(p)),d.layers.add(p),x1(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=b1)}},[p,v,n,d]),E.useEffect(()=>()=>{p&&(d.layers.delete(p),d.layersWithOutsidePointerEventsDisabled.delete(p),x1())},[p,d]),E.useEffect(()=>{const R=()=>g({});return document.addEventListener(Ng,R),()=>document.removeEventListener(Ng,R)},[]),S.jsx(We.div,{...f,ref:w,style:{pointerEvents:T?N?"auto":"none":void 0,...e.style},onFocusCapture:qe(e.onFocusCapture,L.onFocusCapture),onBlurCapture:qe(e.onBlurCapture,L.onBlurCapture),onPointerDownCapture:qe(e.onPointerDownCapture,D.onPointerDownCapture)})});ou.displayName=EP;var CP="DismissableLayerBranch",TP=E.forwardRef((e,t)=>{const n=E.useContext(Tk),r=E.useRef(null),i=dt(t,r);return E.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),S.jsx(We.div,{...e,ref:i})});TP.displayName=CP;function AP(e,t=globalThis==null?void 0:globalThis.document){const n=un(e),r=E.useRef(!1),i=E.useRef(()=>{});return E.useEffect(()=>{const o=u=>{if(u.target&&!r.current){let f=function(){Ak(_P,n,d,{discrete:!0})};const d={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=f,t.addEventListener("click",i.current,{once:!0})):f()}else t.removeEventListener("click",i.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function RP(e,t=globalThis==null?void 0:globalThis.document){const n=un(e),r=E.useRef(!1);return E.useEffect(()=>{const i=o=>{o.target&&!r.current&&Ak(kP,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function x1(){const e=new CustomEvent(Ng);document.dispatchEvent(e)}function Ak(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?wP(i,o):i.dispatchEvent(o)}var Kp="focusScope.autoFocusOnMount",Zp="focusScope.autoFocusOnUnmount",w1={bubbles:!1,cancelable:!0},DP="FocusScope",Qf=E.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...l}=e,[u,f]=E.useState(null),d=un(i),p=un(o),m=E.useRef(null),v=dt(t,x=>f(x)),g=E.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;E.useEffect(()=>{if(r){let x=function(T){if(g.paused||!u)return;const N=T.target;u.contains(N)?m.current=N:ia(m.current,{select:!0})},k=function(T){if(g.paused||!u)return;const N=T.relatedTarget;N!==null&&(u.contains(N)||ia(m.current,{select:!0}))},C=function(T){if(document.activeElement===document.body)for(const D of T)D.removedNodes.length>0&&ia(u)};document.addEventListener("focusin",x),document.addEventListener("focusout",k);const _=new MutationObserver(C);return u&&_.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",k),_.disconnect()}}},[r,u,g.paused]),E.useEffect(()=>{if(u){E1.add(g);const x=document.activeElement;if(!u.contains(x)){const C=new CustomEvent(Kp,w1);u.addEventListener(Kp,d),u.dispatchEvent(C),C.defaultPrevented||(NP(MP(Rk(u)),{select:!0}),document.activeElement===x&&ia(u))}return()=>{u.removeEventListener(Kp,d),setTimeout(()=>{const C=new CustomEvent(Zp,w1);u.addEventListener(Zp,p),u.dispatchEvent(C),C.defaultPrevented||ia(x??document.body,{select:!0}),u.removeEventListener(Zp,p),E1.remove(g)},0)}}},[u,d,p,g]);const w=E.useCallback(x=>{if(!n&&!r||g.paused)return;const k=x.key==="Tab"&&!x.altKey&&!x.ctrlKey&&!x.metaKey,C=document.activeElement;if(k&&C){const _=x.currentTarget,[T,N]=OP(_);T&&N?!x.shiftKey&&C===N?(x.preventDefault(),n&&ia(T,{select:!0})):x.shiftKey&&C===T&&(x.preventDefault(),n&&ia(N,{select:!0})):C===_&&x.preventDefault()}},[n,r,g.paused]);return S.jsx(We.div,{tabIndex:-1,...l,ref:v,onKeyDown:w})});Qf.displayName=DP;function NP(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ia(r,{select:t}),document.activeElement!==n)return}function OP(e){const t=Rk(e),n=S1(t,e),r=S1(t.reverse(),e);return[n,r]}function Rk(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function S1(e,t){for(const n of e)if(!jP(n,{upTo:t}))return n}function jP(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function LP(e){return e instanceof HTMLInputElement&&"select"in e}function ia(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&LP(e)&&t&&e.select()}}var E1=zP();function zP(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=_1(e,t),e.unshift(t)},remove(t){var n;e=_1(e,t),(n=e[0])==null||n.resume()}}}function _1(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function MP(e){return e.filter(t=>t.tagName!=="A")}var PP="Portal",Jf=E.forwardRef((e,t)=>{var u;const{container:n,...r}=e,[i,o]=E.useState(!1);xn(()=>o(!0),[]);const l=n||i&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return l?Ck.createPortal(S.jsx(We.div,{...r,ref:t}),l):null});Jf.displayName=PP;function FP(e,t){return E.useReducer((n,r)=>t[n][r]??n,e)}var Kn=e=>{const{present:t,children:n}=e,r=IP(t),i=typeof n=="function"?n({present:r.isPresent}):E.Children.only(n),o=dt(r.ref,GP(i));return typeof n=="function"||r.isPresent?E.cloneElement(i,{ref:o}):null};Kn.displayName="Presence";function IP(e){const[t,n]=E.useState(),r=E.useRef({}),i=E.useRef(e),o=E.useRef("none"),l=e?"mounted":"unmounted",[u,f]=FP(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return E.useEffect(()=>{const d=Rc(r.current);o.current=u==="mounted"?d:"none"},[u]),xn(()=>{const d=r.current,p=i.current;if(p!==e){const v=o.current,g=Rc(d);e?f("MOUNT"):g==="none"||(d==null?void 0:d.display)==="none"?f("UNMOUNT"):f(p&&v!==g?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,f]),xn(()=>{if(t){let d;const p=t.ownerDocument.defaultView??window,m=g=>{const x=Rc(r.current).includes(g.animationName);if(g.target===t&&x&&(f("ANIMATION_END"),!i.current)){const k=t.style.animationFillMode;t.style.animationFillMode="forwards",d=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=k)})}},v=g=>{g.target===t&&(o.current=Rc(r.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{p.clearTimeout(d),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:E.useCallback(d=>{d&&(r.current=getComputedStyle(d)),n(d)},[])}}function Rc(e){return(e==null?void 0:e.animationName)||"none"}function GP(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Qp=0;function Pv(){E.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??k1()),document.body.insertAdjacentElement("beforeend",e[1]??k1()),Qp++,()=>{Qp===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Qp--}},[])}function k1(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Ur=function(){return Ur=Object.assign||function(t){for(var n,r=1,i=arguments.length;r"u")return rF;var t=iF(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},oF=jk(),ts="data-scroll-locked",sF=function(e,t,n,r){var i=e.left,o=e.top,l=e.right,u=e.gap;return n===void 0&&(n="margin"),` + .`.concat(BP,` { + overflow: hidden `).concat(r,`; + padding-right: `).concat(u,"px ").concat(r,`; + } + body[`).concat(ts,`] { + overflow: hidden `).concat(r,`; + overscroll-behavior: contain; + `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` + padding-left: `.concat(i,`px; + padding-top: `).concat(o,`px; + padding-right: `).concat(l,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(u,"px ").concat(r,`; + `),n==="padding"&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),` + } + + .`).concat(af,` { + right: `).concat(u,"px ").concat(r,`; + } + + .`).concat(of,` { + margin-right: `).concat(u,"px ").concat(r,`; + } + + .`).concat(af," .").concat(af,` { + right: 0 `).concat(r,`; + } + + .`).concat(of," .").concat(of,` { + margin-right: 0 `).concat(r,`; + } + + body[`).concat(ts,`] { + `).concat($P,": ").concat(u,`px; + } +`)},T1=function(){var e=parseInt(document.body.getAttribute(ts)||"0",10);return isFinite(e)?e:0},lF=function(){E.useEffect(function(){return document.body.setAttribute(ts,(T1()+1).toString()),function(){var e=T1()-1;e<=0?document.body.removeAttribute(ts):document.body.setAttribute(ts,e.toString())}},[])},uF=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;lF();var o=E.useMemo(function(){return aF(i)},[i]);return E.createElement(oF,{styles:sF(o,!t,i,n?"":"!important")})},Og=!1;if(typeof window<"u")try{var Dc=Object.defineProperty({},"passive",{get:function(){return Og=!0,!0}});window.addEventListener("test",Dc,Dc),window.removeEventListener("test",Dc,Dc)}catch{Og=!1}var Ho=Og?{passive:!1}:!1,cF=function(e){return e.tagName==="TEXTAREA"},Lk=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!cF(e)&&n[t]==="visible")},fF=function(e){return Lk(e,"overflowY")},dF=function(e){return Lk(e,"overflowX")},A1=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=zk(e,r);if(i){var o=Mk(e,r),l=o[1],u=o[2];if(l>u)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},hF=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},pF=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},zk=function(e,t){return e==="v"?fF(t):dF(t)},Mk=function(e,t){return e==="v"?hF(t):pF(t)},mF=function(e,t){return e==="h"&&t==="rtl"?-1:1},gF=function(e,t,n,r,i){var o=mF(e,window.getComputedStyle(t).direction),l=o*r,u=n.target,f=t.contains(u),d=!1,p=l>0,m=0,v=0;do{var g=Mk(e,u),w=g[0],x=g[1],k=g[2],C=x-k-o*w;(w||C)&&zk(e,u)&&(m+=C,v+=w),u instanceof ShadowRoot?u=u.host:u=u.parentNode}while(!f&&u!==document.body||f&&(t.contains(u)||t===u));return(p&&Math.abs(m)<1||!p&&Math.abs(v)<1)&&(d=!0),d},Nc=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},R1=function(e){return[e.deltaX,e.deltaY]},D1=function(e){return e&&"current"in e?e.current:e},vF=function(e,t){return e[0]===t[0]&&e[1]===t[1]},yF=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},bF=0,Vo=[];function xF(e){var t=E.useRef([]),n=E.useRef([0,0]),r=E.useRef(),i=E.useState(bF++)[0],o=E.useState(jk)[0],l=E.useRef(e);E.useEffect(function(){l.current=e},[e]),E.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var x=UP([e.lockRef.current],(e.shards||[]).map(D1),!0).filter(Boolean);return x.forEach(function(k){return k.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),x.forEach(function(k){return k.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var u=E.useCallback(function(x,k){if("touches"in x&&x.touches.length===2||x.type==="wheel"&&x.ctrlKey)return!l.current.allowPinchZoom;var C=Nc(x),_=n.current,T="deltaX"in x?x.deltaX:_[0]-C[0],N="deltaY"in x?x.deltaY:_[1]-C[1],D,L=x.target,R=Math.abs(T)>Math.abs(N)?"h":"v";if("touches"in x&&R==="h"&&L.type==="range")return!1;var U=A1(R,L);if(!U)return!0;if(U?D=R:(D=R==="v"?"h":"v",U=A1(R,L)),!U)return!1;if(!r.current&&"changedTouches"in x&&(T||N)&&(r.current=D),!D)return!0;var P=r.current||D;return gF(P,k,x,P==="h"?T:N)},[]),f=E.useCallback(function(x){var k=x;if(!(!Vo.length||Vo[Vo.length-1]!==o)){var C="deltaY"in k?R1(k):Nc(k),_=t.current.filter(function(D){return D.name===k.type&&(D.target===k.target||k.target===D.shadowParent)&&vF(D.delta,C)})[0];if(_&&_.should){k.cancelable&&k.preventDefault();return}if(!_){var T=(l.current.shards||[]).map(D1).filter(Boolean).filter(function(D){return D.contains(k.target)}),N=T.length>0?u(k,T[0]):!l.current.noIsolation;N&&k.cancelable&&k.preventDefault()}}},[]),d=E.useCallback(function(x,k,C,_){var T={name:x,delta:k,target:C,should:_,shadowParent:wF(C)};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(N){return N!==T})},1)},[]),p=E.useCallback(function(x){n.current=Nc(x),r.current=void 0},[]),m=E.useCallback(function(x){d(x.type,R1(x),x.target,u(x,e.lockRef.current))},[]),v=E.useCallback(function(x){d(x.type,Nc(x),x.target,u(x,e.lockRef.current))},[]);E.useEffect(function(){return Vo.push(o),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:v}),document.addEventListener("wheel",f,Ho),document.addEventListener("touchmove",f,Ho),document.addEventListener("touchstart",p,Ho),function(){Vo=Vo.filter(function(x){return x!==o}),document.removeEventListener("wheel",f,Ho),document.removeEventListener("touchmove",f,Ho),document.removeEventListener("touchstart",p,Ho)}},[]);var g=e.removeScrollBar,w=e.inert;return E.createElement(E.Fragment,null,w?E.createElement(o,{styles:yF(i)}):null,g?E.createElement(uF,{gapMode:e.gapMode}):null)}function wF(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const SF=KP(Ok,xF);var td=E.forwardRef(function(e,t){return E.createElement(ed,Ur({},e,{ref:t,sideCar:SF}))});td.classNames=ed.classNames;var EF=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},qo=new WeakMap,Oc=new WeakMap,jc={},nm=0,Pk=function(e){return e&&(e.host||Pk(e.parentNode))},_F=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Pk(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},kF=function(e,t,n,r){var i=_F(t,Array.isArray(e)?e:[e]);jc[n]||(jc[n]=new WeakMap);var o=jc[n],l=[],u=new Set,f=new Set(i),d=function(m){!m||u.has(m)||(u.add(m),d(m.parentNode))};i.forEach(d);var p=function(m){!m||f.has(m)||Array.prototype.forEach.call(m.children,function(v){if(u.has(v))p(v);else try{var g=v.getAttribute(r),w=g!==null&&g!=="false",x=(qo.get(v)||0)+1,k=(o.get(v)||0)+1;qo.set(v,x),o.set(v,k),l.push(v),x===1&&w&&Oc.set(v,!0),k===1&&v.setAttribute(n,"true"),w||v.setAttribute(r,"true")}catch(C){console.error("aria-hidden: cannot operate on ",v,C)}})};return p(t),u.clear(),nm++,function(){l.forEach(function(m){var v=qo.get(m)-1,g=o.get(m)-1;qo.set(m,v),o.set(m,g),v||(Oc.has(m)||m.removeAttribute(r),Oc.delete(m)),g||m.removeAttribute(n)}),nm--,nm||(qo=new WeakMap,qo=new WeakMap,Oc=new WeakMap,jc={})}},Fv=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=EF(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),kF(r,i,n,"aria-hidden")):function(){return null}},Iv="Dialog",[Fk,Ik]=dr(Iv),[CF,Or]=Fk(Iv),Gk=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:l=!0}=e,u=E.useRef(null),f=E.useRef(null),[d=!1,p]=_i({prop:r,defaultProp:i,onChange:o});return S.jsx(CF,{scope:t,triggerRef:u,contentRef:f,contentId:bn(),titleId:bn(),descriptionId:bn(),open:d,onOpenChange:p,onOpenToggle:E.useCallback(()=>p(m=>!m),[p]),modal:l,children:n})};Gk.displayName=Iv;var Uk="DialogTrigger",Bk=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Or(Uk,n),o=dt(t,i.triggerRef);return S.jsx(We.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Bv(i.open),...r,ref:o,onClick:qe(e.onClick,i.onOpenToggle)})});Bk.displayName=Uk;var Gv="DialogPortal",[TF,$k]=Fk(Gv,{forceMount:void 0}),Hk=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,o=Or(Gv,t);return S.jsx(TF,{scope:t,forceMount:n,children:E.Children.map(r,l=>S.jsx(Kn,{present:n||o.open,children:S.jsx(Jf,{asChild:!0,container:i,children:l})}))})};Hk.displayName=Gv;var wf="DialogOverlay",Vk=E.forwardRef((e,t)=>{const n=$k(wf,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Or(wf,e.__scopeDialog);return o.modal?S.jsx(Kn,{present:r||o.open,children:S.jsx(AF,{...i,ref:t})}):null});Vk.displayName=wf;var AF=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Or(wf,n);return S.jsx(td,{as:ua,allowPinchZoom:!0,shards:[i.contentRef],children:S.jsx(We.div,{"data-state":Bv(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Xa="DialogContent",qk=E.forwardRef((e,t)=>{const n=$k(Xa,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Or(Xa,e.__scopeDialog);return S.jsx(Kn,{present:r||o.open,children:o.modal?S.jsx(RF,{...i,ref:t}):S.jsx(DF,{...i,ref:t})})});qk.displayName=Xa;var RF=E.forwardRef((e,t)=>{const n=Or(Xa,e.__scopeDialog),r=E.useRef(null),i=dt(t,n.contentRef,r);return E.useEffect(()=>{const o=r.current;if(o)return Fv(o)},[]),S.jsx(Yk,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:qe(e.onCloseAutoFocus,o=>{var l;o.preventDefault(),(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:qe(e.onPointerDownOutside,o=>{const l=o.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0;(l.button===2||u)&&o.preventDefault()}),onFocusOutside:qe(e.onFocusOutside,o=>o.preventDefault())})}),DF=E.forwardRef((e,t)=>{const n=Or(Xa,e.__scopeDialog),r=E.useRef(!1),i=E.useRef(!1);return S.jsx(Yk,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var l,u;(l=e.onCloseAutoFocus)==null||l.call(e,o),o.defaultPrevented||(r.current||(u=n.triggerRef.current)==null||u.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{var f,d;(f=e.onInteractOutside)==null||f.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const l=o.target;((d=n.triggerRef.current)==null?void 0:d.contains(l))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),Yk=E.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...l}=e,u=Or(Xa,n),f=E.useRef(null),d=dt(t,f);return Pv(),S.jsxs(S.Fragment,{children:[S.jsx(Qf,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:S.jsx(ou,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":Bv(u.open),...l,ref:d,onDismiss:()=>u.onOpenChange(!1)})}),S.jsxs(S.Fragment,{children:[S.jsx(OF,{titleId:u.titleId}),S.jsx(LF,{contentRef:f,descriptionId:u.descriptionId})]})]})}),Uv="DialogTitle",Wk=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Or(Uv,n);return S.jsx(We.h2,{id:i.titleId,...r,ref:t})});Wk.displayName=Uv;var Xk="DialogDescription",Kk=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Or(Xk,n);return S.jsx(We.p,{id:i.descriptionId,...r,ref:t})});Kk.displayName=Xk;var Zk="DialogClose",Qk=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Or(Zk,n);return S.jsx(We.button,{type:"button",...r,ref:t,onClick:qe(e.onClick,()=>i.onOpenChange(!1))})});Qk.displayName=Zk;function Bv(e){return e?"open":"closed"}var Jk="DialogTitleWarning",[NF,eC]=dP(Jk,{contentName:Xa,titleName:Uv,docsSlug:"dialog"}),OF=({titleId:e})=>{const t=eC(Jk),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. + +If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. + +For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return E.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},jF="DialogDescriptionWarning",LF=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${eC(jF).contentName}}.`;return E.useEffect(()=>{var o;const i=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},$v=Gk,tC=Bk,Hv=Hk,nd=Vk,rd=qk,Vv=Wk,qv=Kk,Yv=Qk,nC="AlertDialog",[zF,fK]=dr(nC,[Ik]),Ti=Ik(),rC=e=>{const{__scopeAlertDialog:t,...n}=e,r=Ti(t);return S.jsx($v,{...r,...n,modal:!0})};rC.displayName=nC;var MF="AlertDialogTrigger",PF=E.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Ti(n);return S.jsx(tC,{...i,...r,ref:t})});PF.displayName=MF;var FF="AlertDialogPortal",iC=e=>{const{__scopeAlertDialog:t,...n}=e,r=Ti(t);return S.jsx(Hv,{...r,...n})};iC.displayName=FF;var IF="AlertDialogOverlay",aC=E.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Ti(n);return S.jsx(nd,{...i,...r,ref:t})});aC.displayName=IF;var ns="AlertDialogContent",[GF,UF]=zF(ns),oC=E.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...i}=e,o=Ti(n),l=E.useRef(null),u=dt(t,l),f=E.useRef(null);return S.jsx(NF,{contentName:ns,titleName:sC,docsSlug:"alert-dialog",children:S.jsx(GF,{scope:n,cancelRef:f,children:S.jsxs(rd,{role:"alertdialog",...o,...i,ref:u,onOpenAutoFocus:qe(i.onOpenAutoFocus,d=>{var p;d.preventDefault(),(p=f.current)==null||p.focus({preventScroll:!0})}),onPointerDownOutside:d=>d.preventDefault(),onInteractOutside:d=>d.preventDefault(),children:[S.jsx(Mv,{children:r}),S.jsx($F,{contentRef:l})]})})})});oC.displayName=ns;var sC="AlertDialogTitle",lC=E.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Ti(n);return S.jsx(Vv,{...i,...r,ref:t})});lC.displayName=sC;var uC="AlertDialogDescription",cC=E.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Ti(n);return S.jsx(qv,{...i,...r,ref:t})});cC.displayName=uC;var BF="AlertDialogAction",fC=E.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Ti(n);return S.jsx(Yv,{...i,...r,ref:t})});fC.displayName=BF;var dC="AlertDialogCancel",hC=E.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=UF(dC,n),o=Ti(n),l=dt(t,i);return S.jsx(Yv,{...o,...r,ref:l})});hC.displayName=dC;var $F=({contentRef:e})=>{const t=`\`${ns}\` requires a description for the component to be accessible for screen reader users. + +You can add a description to the \`${ns}\` by passing a \`${uC}\` component as a child, which also benefits sighted users by adding visible context to the dialog. + +Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${ns}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component. + +For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return E.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},HF=rC,VF=iC,pC=aC,mC=oC,gC=fC,vC=hC,yC=lC,bC=cC;const qF=["top","right","bottom","left"],ca=Math.min,qn=Math.max,Sf=Math.round,Lc=Math.floor,Hr=e=>({x:e,y:e}),YF={left:"right",right:"left",bottom:"top",top:"bottom"},WF={start:"end",end:"start"};function jg(e,t,n){return qn(e,ca(t,n))}function ki(e,t){return typeof e=="function"?e(t):e}function Ci(e){return e.split("-")[0]}function bs(e){return e.split("-")[1]}function Wv(e){return e==="x"?"y":"x"}function Xv(e){return e==="y"?"height":"width"}function fa(e){return["top","bottom"].includes(Ci(e))?"y":"x"}function Kv(e){return Wv(fa(e))}function XF(e,t,n){n===void 0&&(n=!1);const r=bs(e),i=Kv(e),o=Xv(i);let l=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=Ef(l)),[l,Ef(l)]}function KF(e){const t=Ef(e);return[Lg(e),t,Lg(t)]}function Lg(e){return e.replace(/start|end/g,t=>WF[t])}function ZF(e,t,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?o:l;default:return[]}}function QF(e,t,n,r){const i=bs(e);let o=ZF(Ci(e),n==="start",r);return i&&(o=o.map(l=>l+"-"+i),t&&(o=o.concat(o.map(Lg)))),o}function Ef(e){return e.replace(/left|right|bottom|top/g,t=>YF[t])}function JF(e){return{top:0,right:0,bottom:0,left:0,...e}}function xC(e){return typeof e!="number"?JF(e):{top:e,right:e,bottom:e,left:e}}function _f(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function N1(e,t,n){let{reference:r,floating:i}=e;const o=fa(t),l=Kv(t),u=Xv(l),f=Ci(t),d=o==="y",p=r.x+r.width/2-i.width/2,m=r.y+r.height/2-i.height/2,v=r[u]/2-i[u]/2;let g;switch(f){case"top":g={x:p,y:r.y-i.height};break;case"bottom":g={x:p,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:m};break;case"left":g={x:r.x-i.width,y:m};break;default:g={x:r.x,y:r.y}}switch(bs(t)){case"start":g[l]-=v*(n&&d?-1:1);break;case"end":g[l]+=v*(n&&d?-1:1);break}return g}const e4=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:l}=n,u=o.filter(Boolean),f=await(l.isRTL==null?void 0:l.isRTL(t));let d=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:p,y:m}=N1(d,r,f),v=r,g={},w=0;for(let x=0;x({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:l,elements:u,middlewareData:f}=t,{element:d,padding:p=0}=ki(e,t)||{};if(d==null)return{};const m=xC(p),v={x:n,y:r},g=Kv(i),w=Xv(g),x=await l.getDimensions(d),k=g==="y",C=k?"top":"left",_=k?"bottom":"right",T=k?"clientHeight":"clientWidth",N=o.reference[w]+o.reference[g]-v[g]-o.floating[w],D=v[g]-o.reference[g],L=await(l.getOffsetParent==null?void 0:l.getOffsetParent(d));let R=L?L[T]:0;(!R||!await(l.isElement==null?void 0:l.isElement(L)))&&(R=u.floating[T]||o.floating[w]);const U=N/2-D/2,P=R/2-x[w]/2-1,z=ca(m[C],P),V=ca(m[_],P),q=z,I=R-x[w]-V,Y=R/2-x[w]/2+U,Z=jg(q,Y,I),B=!f.arrow&&bs(i)!=null&&Y!==Z&&o.reference[w]/2-(YY<=0)){var V,q;const Y=(((V=o.flip)==null?void 0:V.index)||0)+1,Z=R[Y];if(Z)return{data:{index:Y,overflows:z},reset:{placement:Z}};let B=(q=z.filter(G=>G.overflows[0]<=0).sort((G,F)=>G.overflows[1]-F.overflows[1])[0])==null?void 0:q.placement;if(!B)switch(g){case"bestFit":{var I;const G=(I=z.filter(F=>{if(L){const K=fa(F.placement);return K===_||K==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(K=>K>0).reduce((K,A)=>K+A,0)]).sort((F,K)=>F[1]-K[1])[0])==null?void 0:I[0];G&&(B=G);break}case"initialPlacement":B=u;break}if(i!==B)return{reset:{placement:B}}}return{}}}};function O1(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function j1(e){return qF.some(t=>e[t]>=0)}const r4=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=ki(e,t);switch(r){case"referenceHidden":{const o=await ql(t,{...i,elementContext:"reference"}),l=O1(o,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:j1(l)}}}case"escaped":{const o=await ql(t,{...i,altBoundary:!0}),l=O1(o,n.floating);return{data:{escapedOffsets:l,escaped:j1(l)}}}default:return{}}}}};async function i4(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),l=Ci(n),u=bs(n),f=fa(n)==="y",d=["left","top"].includes(l)?-1:1,p=o&&f?-1:1,m=ki(t,e);let{mainAxis:v,crossAxis:g,alignmentAxis:w}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return u&&typeof w=="number"&&(g=u==="end"?w*-1:w),f?{x:g*p,y:v*d}:{x:v*d,y:g*p}}const a4=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:l,middlewareData:u}=t,f=await i4(t,e);return l===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:i+f.x,y:o+f.y,data:{...f,placement:l}}}}},o4=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:l=!1,limiter:u={fn:k=>{let{x:C,y:_}=k;return{x:C,y:_}}},...f}=ki(e,t),d={x:n,y:r},p=await ql(t,f),m=fa(Ci(i)),v=Wv(m);let g=d[v],w=d[m];if(o){const k=v==="y"?"top":"left",C=v==="y"?"bottom":"right",_=g+p[k],T=g-p[C];g=jg(_,g,T)}if(l){const k=m==="y"?"top":"left",C=m==="y"?"bottom":"right",_=w+p[k],T=w-p[C];w=jg(_,w,T)}const x=u.fn({...t,[v]:g,[m]:w});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[v]:o,[m]:l}}}}}},s4=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:l}=t,{offset:u=0,mainAxis:f=!0,crossAxis:d=!0}=ki(e,t),p={x:n,y:r},m=fa(i),v=Wv(m);let g=p[v],w=p[m];const x=ki(u,t),k=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(f){const T=v==="y"?"height":"width",N=o.reference[v]-o.floating[T]+k.mainAxis,D=o.reference[v]+o.reference[T]-k.mainAxis;gD&&(g=D)}if(d){var C,_;const T=v==="y"?"width":"height",N=["top","left"].includes(Ci(i)),D=o.reference[m]-o.floating[T]+(N&&((C=l.offset)==null?void 0:C[m])||0)+(N?0:k.crossAxis),L=o.reference[m]+o.reference[T]+(N?0:((_=l.offset)==null?void 0:_[m])||0)-(N?k.crossAxis:0);wL&&(w=L)}return{[v]:g,[m]:w}}}},l4=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:l,elements:u}=t,{apply:f=()=>{},...d}=ki(e,t),p=await ql(t,d),m=Ci(i),v=bs(i),g=fa(i)==="y",{width:w,height:x}=o.floating;let k,C;m==="top"||m==="bottom"?(k=m,C=v===(await(l.isRTL==null?void 0:l.isRTL(u.floating))?"start":"end")?"left":"right"):(C=m,k=v==="end"?"top":"bottom");const _=x-p.top-p.bottom,T=w-p.left-p.right,N=ca(x-p[k],_),D=ca(w-p[C],T),L=!t.middlewareData.shift;let R=N,U=D;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(U=T),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(R=_),L&&!v){const z=qn(p.left,0),V=qn(p.right,0),q=qn(p.top,0),I=qn(p.bottom,0);g?U=w-2*(z!==0||V!==0?z+V:qn(p.left,p.right)):R=x-2*(q!==0||I!==0?q+I:qn(p.top,p.bottom))}await f({...t,availableWidth:U,availableHeight:R});const P=await l.getDimensions(u.floating);return w!==P.width||x!==P.height?{reset:{rects:!0}}:{}}}};function id(){return typeof window<"u"}function xs(e){return wC(e)?(e.nodeName||"").toLowerCase():"#document"}function Wn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function qr(e){var t;return(t=(wC(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function wC(e){return id()?e instanceof Node||e instanceof Wn(e).Node:!1}function Ar(e){return id()?e instanceof Element||e instanceof Wn(e).Element:!1}function Vr(e){return id()?e instanceof HTMLElement||e instanceof Wn(e).HTMLElement:!1}function L1(e){return!id()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Wn(e).ShadowRoot}function su(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Rr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function u4(e){return["table","td","th"].includes(xs(e))}function ad(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Zv(e){const t=Qv(),n=Ar(e)?Rr(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function c4(e){let t=da(e);for(;Vr(t)&&!ss(t);){if(Zv(t))return t;if(ad(t))return null;t=da(t)}return null}function Qv(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ss(e){return["html","body","#document"].includes(xs(e))}function Rr(e){return Wn(e).getComputedStyle(e)}function od(e){return Ar(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function da(e){if(xs(e)==="html")return e;const t=e.assignedSlot||e.parentNode||L1(e)&&e.host||qr(e);return L1(t)?t.host:t}function SC(e){const t=da(e);return ss(t)?e.ownerDocument?e.ownerDocument.body:e.body:Vr(t)&&su(t)?t:SC(t)}function Yl(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=SC(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),l=Wn(i);if(o){const u=zg(l);return t.concat(l,l.visualViewport||[],su(i)?i:[],u&&n?Yl(u):[])}return t.concat(i,Yl(i,[],n))}function zg(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function EC(e){const t=Rr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Vr(e),o=i?e.offsetWidth:n,l=i?e.offsetHeight:r,u=Sf(n)!==o||Sf(r)!==l;return u&&(n=o,r=l),{width:n,height:r,$:u}}function Jv(e){return Ar(e)?e:e.contextElement}function rs(e){const t=Jv(e);if(!Vr(t))return Hr(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=EC(t);let l=(o?Sf(n.width):n.width)/r,u=(o?Sf(n.height):n.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!u||!Number.isFinite(u))&&(u=1),{x:l,y:u}}const f4=Hr(0);function _C(e){const t=Wn(e);return!Qv()||!t.visualViewport?f4:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function d4(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Wn(e)?!1:t}function Ka(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=Jv(e);let l=Hr(1);t&&(r?Ar(r)&&(l=rs(r)):l=rs(e));const u=d4(o,n,r)?_C(o):Hr(0);let f=(i.left+u.x)/l.x,d=(i.top+u.y)/l.y,p=i.width/l.x,m=i.height/l.y;if(o){const v=Wn(o),g=r&&Ar(r)?Wn(r):r;let w=v,x=zg(w);for(;x&&r&&g!==w;){const k=rs(x),C=x.getBoundingClientRect(),_=Rr(x),T=C.left+(x.clientLeft+parseFloat(_.paddingLeft))*k.x,N=C.top+(x.clientTop+parseFloat(_.paddingTop))*k.y;f*=k.x,d*=k.y,p*=k.x,m*=k.y,f+=T,d+=N,w=Wn(x),x=zg(w)}}return _f({width:p,height:m,x:f,y:d})}function ey(e,t){const n=od(e).scrollLeft;return t?t.left+n:Ka(qr(e)).left+n}function kC(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-(n?0:ey(e,r)),o=r.top+t.scrollTop;return{x:i,y:o}}function h4(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",l=qr(r),u=t?ad(t.floating):!1;if(r===l||u&&o)return n;let f={scrollLeft:0,scrollTop:0},d=Hr(1);const p=Hr(0),m=Vr(r);if((m||!m&&!o)&&((xs(r)!=="body"||su(l))&&(f=od(r)),Vr(r))){const g=Ka(r);d=rs(r),p.x=g.x+r.clientLeft,p.y=g.y+r.clientTop}const v=l&&!m&&!o?kC(l,f,!0):Hr(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-f.scrollLeft*d.x+p.x+v.x,y:n.y*d.y-f.scrollTop*d.y+p.y+v.y}}function p4(e){return Array.from(e.getClientRects())}function m4(e){const t=qr(e),n=od(e),r=e.ownerDocument.body,i=qn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=qn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+ey(e);const u=-n.scrollTop;return Rr(r).direction==="rtl"&&(l+=qn(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:l,y:u}}function g4(e,t){const n=Wn(e),r=qr(e),i=n.visualViewport;let o=r.clientWidth,l=r.clientHeight,u=0,f=0;if(i){o=i.width,l=i.height;const d=Qv();(!d||d&&t==="fixed")&&(u=i.offsetLeft,f=i.offsetTop)}return{width:o,height:l,x:u,y:f}}function v4(e,t){const n=Ka(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Vr(e)?rs(e):Hr(1),l=e.clientWidth*o.x,u=e.clientHeight*o.y,f=i*o.x,d=r*o.y;return{width:l,height:u,x:f,y:d}}function z1(e,t,n){let r;if(t==="viewport")r=g4(e,n);else if(t==="document")r=m4(qr(e));else if(Ar(t))r=v4(t,n);else{const i=_C(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return _f(r)}function CC(e,t){const n=da(e);return n===t||!Ar(n)||ss(n)?!1:Rr(n).position==="fixed"||CC(n,t)}function y4(e,t){const n=t.get(e);if(n)return n;let r=Yl(e,[],!1).filter(u=>Ar(u)&&xs(u)!=="body"),i=null;const o=Rr(e).position==="fixed";let l=o?da(e):e;for(;Ar(l)&&!ss(l);){const u=Rr(l),f=Zv(l);!f&&u.position==="fixed"&&(i=null),(o?!f&&!i:!f&&u.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||su(l)&&!f&&CC(e,l))?r=r.filter(p=>p!==l):i=u,l=da(l)}return t.set(e,r),r}function b4(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const l=[...n==="clippingAncestors"?ad(t)?[]:y4(t,this._c):[].concat(n),r],u=l[0],f=l.reduce((d,p)=>{const m=z1(t,p,i);return d.top=qn(m.top,d.top),d.right=ca(m.right,d.right),d.bottom=ca(m.bottom,d.bottom),d.left=qn(m.left,d.left),d},z1(t,u,i));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function x4(e){const{width:t,height:n}=EC(e);return{width:t,height:n}}function w4(e,t,n){const r=Vr(t),i=qr(t),o=n==="fixed",l=Ka(e,!0,o,t);let u={scrollLeft:0,scrollTop:0};const f=Hr(0);if(r||!r&&!o)if((xs(t)!=="body"||su(i))&&(u=od(t)),r){const v=Ka(t,!0,o,t);f.x=v.x+t.clientLeft,f.y=v.y+t.clientTop}else i&&(f.x=ey(i));const d=i&&!r&&!o?kC(i,u):Hr(0),p=l.left+u.scrollLeft-f.x-d.x,m=l.top+u.scrollTop-f.y-d.y;return{x:p,y:m,width:l.width,height:l.height}}function rm(e){return Rr(e).position==="static"}function M1(e,t){if(!Vr(e)||Rr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return qr(e)===n&&(n=n.ownerDocument.body),n}function TC(e,t){const n=Wn(e);if(ad(e))return n;if(!Vr(e)){let i=da(e);for(;i&&!ss(i);){if(Ar(i)&&!rm(i))return i;i=da(i)}return n}let r=M1(e,t);for(;r&&u4(r)&&rm(r);)r=M1(r,t);return r&&ss(r)&&rm(r)&&!Zv(r)?n:r||c4(e)||n}const S4=async function(e){const t=this.getOffsetParent||TC,n=this.getDimensions,r=await n(e.floating);return{reference:w4(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function E4(e){return Rr(e).direction==="rtl"}const _4={convertOffsetParentRelativeRectToViewportRelativeRect:h4,getDocumentElement:qr,getClippingRect:b4,getOffsetParent:TC,getElementRects:S4,getClientRects:p4,getDimensions:x4,getScale:rs,isElement:Ar,isRTL:E4};function AC(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function k4(e,t){let n=null,r;const i=qr(e);function o(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function l(u,f){u===void 0&&(u=!1),f===void 0&&(f=1),o();const d=e.getBoundingClientRect(),{left:p,top:m,width:v,height:g}=d;if(u||t(),!v||!g)return;const w=Lc(m),x=Lc(i.clientWidth-(p+v)),k=Lc(i.clientHeight-(m+g)),C=Lc(p),T={rootMargin:-w+"px "+-x+"px "+-k+"px "+-C+"px",threshold:qn(0,ca(1,f))||1};let N=!0;function D(L){const R=L[0].intersectionRatio;if(R!==f){if(!N)return l();R?l(!1,R):r=setTimeout(()=>{l(!1,1e-7)},1e3)}R===1&&!AC(d,e.getBoundingClientRect())&&l(),N=!1}try{n=new IntersectionObserver(D,{...T,root:i.ownerDocument})}catch{n=new IntersectionObserver(D,T)}n.observe(e)}return l(!0),o}function C4(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:f=!1}=r,d=Jv(e),p=i||o?[...d?Yl(d):[],...Yl(t)]:[];p.forEach(C=>{i&&C.addEventListener("scroll",n,{passive:!0}),o&&C.addEventListener("resize",n)});const m=d&&u?k4(d,n):null;let v=-1,g=null;l&&(g=new ResizeObserver(C=>{let[_]=C;_&&_.target===d&&g&&(g.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var T;(T=g)==null||T.observe(t)})),n()}),d&&!f&&g.observe(d),g.observe(t));let w,x=f?Ka(e):null;f&&k();function k(){const C=Ka(e);x&&!AC(x,C)&&n(),x=C,w=requestAnimationFrame(k)}return n(),()=>{var C;p.forEach(_=>{i&&_.removeEventListener("scroll",n),o&&_.removeEventListener("resize",n)}),m==null||m(),(C=g)==null||C.disconnect(),g=null,f&&cancelAnimationFrame(w)}}const T4=a4,A4=o4,R4=n4,D4=l4,N4=r4,P1=t4,O4=s4,j4=(e,t,n)=>{const r=new Map,i={platform:_4,...n},o={...i.platform,_c:r};return e4(e,t,{...i,platform:o})};var sf=typeof document<"u"?E.useLayoutEffect:E.useEffect;function kf(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!kf(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!kf(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function RC(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function F1(e,t){const n=RC(e);return Math.round(t*n)/n}function im(e){const t=E.useRef(e);return sf(()=>{t.current=e}),t}function L4(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:l}={},transform:u=!0,whileElementsMounted:f,open:d}=e,[p,m]=E.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,g]=E.useState(r);kf(v,r)||g(r);const[w,x]=E.useState(null),[k,C]=E.useState(null),_=E.useCallback(F=>{F!==L.current&&(L.current=F,x(F))},[]),T=E.useCallback(F=>{F!==R.current&&(R.current=F,C(F))},[]),N=o||w,D=l||k,L=E.useRef(null),R=E.useRef(null),U=E.useRef(p),P=f!=null,z=im(f),V=im(i),q=im(d),I=E.useCallback(()=>{if(!L.current||!R.current)return;const F={placement:t,strategy:n,middleware:v};V.current&&(F.platform=V.current),j4(L.current,R.current,F).then(K=>{const A={...K,isPositioned:q.current!==!1};Y.current&&!kf(U.current,A)&&(U.current=A,au.flushSync(()=>{m(A)}))})},[v,t,n,V,q]);sf(()=>{d===!1&&U.current.isPositioned&&(U.current.isPositioned=!1,m(F=>({...F,isPositioned:!1})))},[d]);const Y=E.useRef(!1);sf(()=>(Y.current=!0,()=>{Y.current=!1}),[]),sf(()=>{if(N&&(L.current=N),D&&(R.current=D),N&&D){if(z.current)return z.current(N,D,I);I()}},[N,D,I,z,P]);const Z=E.useMemo(()=>({reference:L,floating:R,setReference:_,setFloating:T}),[_,T]),B=E.useMemo(()=>({reference:N,floating:D}),[N,D]),G=E.useMemo(()=>{const F={position:n,left:0,top:0};if(!B.floating)return F;const K=F1(B.floating,p.x),A=F1(B.floating,p.y);return u?{...F,transform:"translate("+K+"px, "+A+"px)",...RC(B.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:K,top:A}},[n,u,B.floating,p.x,p.y]);return E.useMemo(()=>({...p,update:I,refs:Z,elements:B,floatingStyles:G}),[p,I,Z,B,G])}const z4=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?P1({element:r.current,padding:i}).fn(n):{}:r?P1({element:r,padding:i}).fn(n):{}}}},M4=(e,t)=>({...T4(e),options:[e,t]}),P4=(e,t)=>({...A4(e),options:[e,t]}),F4=(e,t)=>({...O4(e),options:[e,t]}),I4=(e,t)=>({...R4(e),options:[e,t]}),G4=(e,t)=>({...D4(e),options:[e,t]}),U4=(e,t)=>({...N4(e),options:[e,t]}),B4=(e,t)=>({...z4(e),options:[e,t]});var $4="Arrow",DC=E.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...o}=e;return S.jsx(We.svg,{...o,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:S.jsx("polygon",{points:"0,0 30,0 15,10"})})});DC.displayName=$4;var H4=DC;function NC(e){const[t,n]=E.useState(void 0);return xn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let l,u;if("borderBoxSize"in o){const f=o.borderBoxSize,d=Array.isArray(f)?f[0]:f;l=d.inlineSize,u=d.blockSize}else l=e.offsetWidth,u=e.offsetHeight;n({width:l,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var ty="Popper",[OC,ws]=dr(ty),[V4,jC]=OC(ty),LC=e=>{const{__scopePopper:t,children:n}=e,[r,i]=E.useState(null);return S.jsx(V4,{scope:t,anchor:r,onAnchorChange:i,children:n})};LC.displayName=ty;var zC="PopperAnchor",MC=E.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=jC(zC,n),l=E.useRef(null),u=dt(t,l);return E.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||l.current)}),r?null:S.jsx(We.div,{...i,ref:u})});MC.displayName=zC;var ny="PopperContent",[q4,Y4]=OC(ny),PC=E.forwardRef((e,t)=>{var ae,oe,Ce,he,Ee,we;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:l=0,arrowPadding:u=0,avoidCollisions:f=!0,collisionBoundary:d=[],collisionPadding:p=0,sticky:m="partial",hideWhenDetached:v=!1,updatePositionStrategy:g="optimized",onPlaced:w,...x}=e,k=jC(ny,n),[C,_]=E.useState(null),T=dt(t,Pe=>_(Pe)),[N,D]=E.useState(null),L=NC(N),R=(L==null?void 0:L.width)??0,U=(L==null?void 0:L.height)??0,P=r+(o!=="center"?"-"+o:""),z=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},V=Array.isArray(d)?d:[d],q=V.length>0,I={padding:z,boundary:V.filter(X4),altBoundary:q},{refs:Y,floatingStyles:Z,placement:B,isPositioned:G,middlewareData:F}=L4({strategy:"fixed",placement:P,whileElementsMounted:(...Pe)=>C4(...Pe,{animationFrame:g==="always"}),elements:{reference:k.anchor},middleware:[M4({mainAxis:i+U,alignmentAxis:l}),f&&P4({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?F4():void 0,...I}),f&&I4({...I}),G4({...I,apply:({elements:Pe,rects:Ae,availableWidth:xe,availableHeight:ee})=>{const{width:ce,height:Te}=Ae.reference,ge=Pe.floating.style;ge.setProperty("--radix-popper-available-width",`${xe}px`),ge.setProperty("--radix-popper-available-height",`${ee}px`),ge.setProperty("--radix-popper-anchor-width",`${ce}px`),ge.setProperty("--radix-popper-anchor-height",`${Te}px`)}}),N&&B4({element:N,padding:u}),K4({arrowWidth:R,arrowHeight:U}),v&&U4({strategy:"referenceHidden",...I})]}),[K,A]=GC(B),H=un(w);xn(()=>{G&&(H==null||H())},[G,H]);const M=(ae=F.arrow)==null?void 0:ae.x,O=(oe=F.arrow)==null?void 0:oe.y,X=((Ce=F.arrow)==null?void 0:Ce.centerOffset)!==0,[re,ue]=E.useState();return xn(()=>{C&&ue(window.getComputedStyle(C).zIndex)},[C]),S.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...Z,transform:G?Z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:re,"--radix-popper-transform-origin":[(he=F.transformOrigin)==null?void 0:he.x,(Ee=F.transformOrigin)==null?void 0:Ee.y].join(" "),...((we=F.hide)==null?void 0:we.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:S.jsx(q4,{scope:n,placedSide:K,onArrowChange:D,arrowX:M,arrowY:O,shouldHideArrow:X,children:S.jsx(We.div,{"data-side":K,"data-align":A,...x,ref:T,style:{...x.style,animation:G?void 0:"none"}})})})});PC.displayName=ny;var FC="PopperArrow",W4={top:"bottom",right:"left",bottom:"top",left:"right"},IC=E.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,o=Y4(FC,r),l=W4[o.placedSide];return S.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:S.jsx(H4,{...i,ref:n,style:{...i.style,display:"block"}})})});IC.displayName=FC;function X4(e){return e!==null}var K4=e=>({name:"transformOrigin",options:e,fn(t){var k,C,_;const{placement:n,rects:r,middlewareData:i}=t,l=((k=i.arrow)==null?void 0:k.centerOffset)!==0,u=l?0:e.arrowWidth,f=l?0:e.arrowHeight,[d,p]=GC(n),m={start:"0%",center:"50%",end:"100%"}[p],v=(((C=i.arrow)==null?void 0:C.x)??0)+u/2,g=(((_=i.arrow)==null?void 0:_.y)??0)+f/2;let w="",x="";return d==="bottom"?(w=l?m:`${v}px`,x=`${-f}px`):d==="top"?(w=l?m:`${v}px`,x=`${r.floating.height+f}px`):d==="right"?(w=`${-f}px`,x=l?m:`${g}px`):d==="left"&&(w=`${r.floating.width+f}px`,x=l?m:`${g}px`),{data:{x:w,y:x}}}});function GC(e){const[t,n="center"]=e.split("-");return[t,n]}var ry=LC,sd=MC,iy=PC,ay=IC,Z4="VisuallyHidden",oy=E.forwardRef((e,t)=>S.jsx(We.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));oy.displayName=Z4;var Q4=oy,[ld,dK]=dr("Tooltip",[ws]),ud=ws(),UC="TooltipProvider",J4=700,Mg="tooltip.open",[eI,sy]=ld(UC),BC=e=>{const{__scopeTooltip:t,delayDuration:n=J4,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:o}=e,[l,u]=E.useState(!0),f=E.useRef(!1),d=E.useRef(0);return E.useEffect(()=>{const p=d.current;return()=>window.clearTimeout(p)},[]),S.jsx(eI,{scope:t,isOpenDelayed:l,delayDuration:n,onOpen:E.useCallback(()=>{window.clearTimeout(d.current),u(!1)},[]),onClose:E.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>u(!0),r)},[r]),isPointerInTransitRef:f,onPointerInTransitChange:E.useCallback(p=>{f.current=p},[]),disableHoverableContent:i,children:o})};BC.displayName=UC;var cd="Tooltip",[tI,fd]=ld(cd),$C=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i=!1,onOpenChange:o,disableHoverableContent:l,delayDuration:u}=e,f=sy(cd,e.__scopeTooltip),d=ud(t),[p,m]=E.useState(null),v=bn(),g=E.useRef(0),w=l??f.disableHoverableContent,x=u??f.delayDuration,k=E.useRef(!1),[C=!1,_]=_i({prop:r,defaultProp:i,onChange:R=>{R?(f.onOpen(),document.dispatchEvent(new CustomEvent(Mg))):f.onClose(),o==null||o(R)}}),T=E.useMemo(()=>C?k.current?"delayed-open":"instant-open":"closed",[C]),N=E.useCallback(()=>{window.clearTimeout(g.current),g.current=0,k.current=!1,_(!0)},[_]),D=E.useCallback(()=>{window.clearTimeout(g.current),g.current=0,_(!1)},[_]),L=E.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{k.current=!0,_(!0),g.current=0},x)},[x,_]);return E.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),S.jsx(ry,{...d,children:S.jsx(tI,{scope:t,contentId:v,open:C,stateAttribute:T,trigger:p,onTriggerChange:m,onTriggerEnter:E.useCallback(()=>{f.isOpenDelayed?L():N()},[f.isOpenDelayed,L,N]),onTriggerLeave:E.useCallback(()=>{w?D():(window.clearTimeout(g.current),g.current=0)},[D,w]),onOpen:N,onClose:D,disableHoverableContent:w,children:n})})};$C.displayName=cd;var Pg="TooltipTrigger",HC=E.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=fd(Pg,n),o=sy(Pg,n),l=ud(n),u=E.useRef(null),f=dt(t,u,i.onTriggerChange),d=E.useRef(!1),p=E.useRef(!1),m=E.useCallback(()=>d.current=!1,[]);return E.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),S.jsx(sd,{asChild:!0,...l,children:S.jsx(We.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:f,onPointerMove:qe(e.onPointerMove,v=>{v.pointerType!=="touch"&&!p.current&&!o.isPointerInTransitRef.current&&(i.onTriggerEnter(),p.current=!0)}),onPointerLeave:qe(e.onPointerLeave,()=>{i.onTriggerLeave(),p.current=!1}),onPointerDown:qe(e.onPointerDown,()=>{d.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:qe(e.onFocus,()=>{d.current||i.onOpen()}),onBlur:qe(e.onBlur,i.onClose),onClick:qe(e.onClick,i.onClose)})})});HC.displayName=Pg;var nI="TooltipPortal",[hK,rI]=ld(nI,{forceMount:void 0}),ls="TooltipContent",VC=E.forwardRef((e,t)=>{const n=rI(ls,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...o}=e,l=fd(ls,e.__scopeTooltip);return S.jsx(Kn,{present:r||l.open,children:l.disableHoverableContent?S.jsx(qC,{side:i,...o,ref:t}):S.jsx(iI,{side:i,...o,ref:t})})}),iI=E.forwardRef((e,t)=>{const n=fd(ls,e.__scopeTooltip),r=sy(ls,e.__scopeTooltip),i=E.useRef(null),o=dt(t,i),[l,u]=E.useState(null),{trigger:f,onClose:d}=n,p=i.current,{onPointerInTransitChange:m}=r,v=E.useCallback(()=>{u(null),m(!1)},[m]),g=E.useCallback((w,x)=>{const k=w.currentTarget,C={x:w.clientX,y:w.clientY},_=lI(C,k.getBoundingClientRect()),T=uI(C,_),N=cI(x.getBoundingClientRect()),D=dI([...T,...N]);u(D),m(!0)},[m]);return E.useEffect(()=>()=>v(),[v]),E.useEffect(()=>{if(f&&p){const w=k=>g(k,p),x=k=>g(k,f);return f.addEventListener("pointerleave",w),p.addEventListener("pointerleave",x),()=>{f.removeEventListener("pointerleave",w),p.removeEventListener("pointerleave",x)}}},[f,p,g,v]),E.useEffect(()=>{if(l){const w=x=>{const k=x.target,C={x:x.clientX,y:x.clientY},_=(f==null?void 0:f.contains(k))||(p==null?void 0:p.contains(k)),T=!fI(C,l);_?v():T&&(v(),d())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[f,p,l,d,v]),S.jsx(qC,{...e,ref:o})}),[aI,oI]=ld(cd,{isInside:!1}),qC=E.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:o,onPointerDownOutside:l,...u}=e,f=fd(ls,n),d=ud(n),{onClose:p}=f;return E.useEffect(()=>(document.addEventListener(Mg,p),()=>document.removeEventListener(Mg,p)),[p]),E.useEffect(()=>{if(f.trigger){const m=v=>{const g=v.target;g!=null&&g.contains(f.trigger)&&p()};return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[f.trigger,p]),S.jsx(ou,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:m=>m.preventDefault(),onDismiss:p,children:S.jsxs(iy,{"data-state":f.stateAttribute,...d,...u,ref:t,style:{...u.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[S.jsx(Mv,{children:r}),S.jsx(aI,{scope:n,isInside:!0,children:S.jsx(Q4,{id:f.contentId,role:"tooltip",children:i||r})})]})})});VC.displayName=ls;var YC="TooltipArrow",sI=E.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=ud(n);return oI(YC,n).isInside?null:S.jsx(ay,{...i,...r,ref:t})});sI.displayName=YC;function lI(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,i,o)){case o:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function uI(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function cI(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function fI(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,l=t.length-1;or!=p>r&&n<(d-u)*(r-f)/(p-f)+u&&(i=!i)}return i}function dI(e){const t=e.slice();return t.sort((n,r)=>n.xr.x?1:n.yr.y?1:0),hI(t)}function hI(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r=2;){const o=t[t.length-1],l=t[t.length-2];if((o.x-l.x)*(i.y-l.y)>=(o.y-l.y)*(i.x-l.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const o=n[n.length-1],l=n[n.length-2];if((o.x-l.x)*(i.y-l.y)>=(o.y-l.y)*(i.x-l.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var pI=BC,mI=$C,gI=HC,WC=VC;const XC=pI,KC=mI,ZC=gI,vI=e=>typeof e!="string"?e:e.split("\\n").map((t,n)=>S.jsxs(E.Fragment,{children:[t,nS.jsx(WC,{ref:i,sideOffset:t,className:Me("bg-popover text-popover-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 mx-1 max-w-sm overflow-hidden rounded-md border px-3 py-2 text-sm shadow-md",e),...r,children:typeof n=="string"?vI(n):n}));ly.displayName=WC.displayName;const Cf=$_("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"size-8"}},defaultVariants:{variant:"default",size:"default"}}),Ot=E.forwardRef(({className:e,variant:t,tooltip:n,size:r,side:i="right",asChild:o=!1,...l},u)=>{const f=o?ua:"button";return n?S.jsx(XC,{children:S.jsxs(KC,{children:[S.jsx(ZC,{asChild:!0,children:S.jsx(f,{className:Me(Cf({variant:t,size:r,className:e}),"cursor-pointer"),ref:u,...l})}),S.jsx(ly,{side:i,children:n})]})}):S.jsx(f,{className:Me(Cf({variant:t,size:r,className:e}),"cursor-pointer"),ref:u,...l})});Ot.displayName="Button";const yI=HF,bI=VF,QC=E.forwardRef(({className:e,...t},n)=>S.jsx(pC,{className:Me("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80",e),...t,ref:n}));QC.displayName=pC.displayName;const JC=E.forwardRef(({className:e,...t},n)=>S.jsxs(bI,{children:[S.jsx(QC,{}),S.jsx(mC,{ref:n,className:Me("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-top-[48%] fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg",e),...t})]}));JC.displayName=mC.displayName;const eT=({className:e,...t})=>S.jsx("div",{className:Me("flex flex-col space-y-2 text-center sm:text-left",e),...t});eT.displayName="AlertDialogHeader";const tT=E.forwardRef(({className:e,...t},n)=>S.jsx(yC,{ref:n,className:Me("text-lg font-semibold",e),...t}));tT.displayName=yC.displayName;const nT=E.forwardRef(({className:e,...t},n)=>S.jsx(bC,{ref:n,className:Me("text-muted-foreground text-sm",e),...t}));nT.displayName=bC.displayName;const xI=E.forwardRef(({className:e,...t},n)=>S.jsx(gC,{ref:n,className:Me(Cf(),e),...t}));xI.displayName=gC.displayName;const wI=E.forwardRef(({className:e,...t},n)=>S.jsx(vC,{ref:n,className:Me(Cf({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));wI.displayName=vC.displayName;const Za=E.forwardRef(({className:e,type:t,...n},r)=>S.jsx("input",{type:t,className:Me("border-input file:text-foreground placeholder:text-muted-foreground focus-visible:ring-ring flex h-9 rounded-md border bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-1 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));Za.displayName="Input";var SI=e=>{switch(e){case"success":return kI;case"info":return TI;case"warning":return CI;case"error":return AI;default:return null}},EI=Array(12).fill(0),_I=({visible:e,className:t})=>be.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},be.createElement("div",{className:"sonner-spinner"},EI.map((n,r)=>be.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),kI=be.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},be.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),CI=be.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},be.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),TI=be.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},be.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),AI=be.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},be.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),RI=be.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},be.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),be.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),DI=()=>{let[e,t]=be.useState(document.hidden);return be.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},Fg=1,NI=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,i=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Fg++,o=this.toasts.find(u=>u.id===i),l=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),o?this.toasts=this.toasts.map(u=>u.id===i?(this.publish({...u,...e,id:i,title:n}),{...u,...e,id:i,dismissible:l,title:n}):u):this.addToast({title:n,...r,dismissible:l,id:i}),i},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),i=n!==void 0,o,l=r.then(async f=>{if(o=["resolve",f],be.isValidElement(f))i=!1,this.create({id:n,type:"default",message:f});else if(jI(f)&&!f.ok){i=!1;let d=typeof t.error=="function"?await t.error(`HTTP error! status: ${f.status}`):t.error,p=typeof t.description=="function"?await t.description(`HTTP error! status: ${f.status}`):t.description;this.create({id:n,type:"error",message:d,description:p})}else if(t.success!==void 0){i=!1;let d=typeof t.success=="function"?await t.success(f):t.success,p=typeof t.description=="function"?await t.description(f):t.description;this.create({id:n,type:"success",message:d,description:p})}}).catch(async f=>{if(o=["reject",f],t.error!==void 0){i=!1;let d=typeof t.error=="function"?await t.error(f):t.error,p=typeof t.description=="function"?await t.description(f):t.description;this.create({id:n,type:"error",message:d,description:p})}}).finally(()=>{var f;i&&(this.dismiss(n),n=void 0),(f=t.finally)==null||f.call(t)}),u=()=>new Promise((f,d)=>l.then(()=>o[0]==="reject"?d(o[1]):f(o[1])).catch(d));return typeof n!="string"&&typeof n!="number"?{unwrap:u}:Object.assign(n,{unwrap:u})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||Fg++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Ln=new NI,OI=(e,t)=>{let n=(t==null?void 0:t.id)||Fg++;return Ln.addToast({title:e,...t,id:n}),n},jI=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",LI=OI,zI=()=>Ln.toasts,MI=()=>Ln.getActiveToasts(),vn=Object.assign(LI,{success:Ln.success,info:Ln.info,warning:Ln.warning,error:Ln.error,custom:Ln.custom,message:Ln.message,promise:Ln.promise,dismiss:Ln.dismiss,loading:Ln.loading},{getHistory:zI,getToasts:MI});function PI(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}PI(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} +`);function zc(e){return e.label!==void 0}var FI=3,II="32px",GI="16px",I1=4e3,UI=356,BI=14,$I=20,HI=200;function wr(...e){return e.filter(Boolean).join(" ")}function VI(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var qI=e=>{var t,n,r,i,o,l,u,f,d,p,m;let{invert:v,toast:g,unstyled:w,interacting:x,setHeights:k,visibleToasts:C,heights:_,index:T,toasts:N,expanded:D,removeToast:L,defaultRichColors:R,closeButton:U,style:P,cancelButtonStyle:z,actionButtonStyle:V,className:q="",descriptionClassName:I="",duration:Y,position:Z,gap:B,loadingIcon:G,expandByDefault:F,classNames:K,icons:A,closeButtonAriaLabel:H="Close toast",pauseWhenPageIsHidden:M}=e,[O,X]=be.useState(null),[re,ue]=be.useState(null),[ae,oe]=be.useState(!1),[Ce,he]=be.useState(!1),[Ee,we]=be.useState(!1),[Pe,Ae]=be.useState(!1),[xe,ee]=be.useState(!1),[ce,Te]=be.useState(0),[ge,Se]=be.useState(0),ie=be.useRef(g.duration||Y||I1),$e=be.useRef(null),Ge=be.useRef(null),ve=T===0,Ne=T+1<=C,te=g.type,de=g.dismissible!==!1,Oe=g.className||"",He=g.descriptionClassName||"",Ye=be.useMemo(()=>_.findIndex(Ze=>Ze.toastId===g.id)||0,[_,g.id]),vt=be.useMemo(()=>{var Ze;return(Ze=g.closeButton)!=null?Ze:U},[g.closeButton,U]),Mt=be.useMemo(()=>g.duration||Y||I1,[g.duration,Y]),bt=be.useRef(0),rt=be.useRef(0),qt=be.useRef(0),at=be.useRef(null),[At,rn]=Z.split("-"),io=be.useMemo(()=>_.reduce((Ze,gt,_t)=>_t>=Ye?Ze:Ze+gt.height,0),[_,Ye]),xu=DI(),ao=g.invert||v,Di=te==="loading";rt.current=be.useMemo(()=>Ye*B+io,[Ye,io]),be.useEffect(()=>{ie.current=Mt},[Mt]),be.useEffect(()=>{oe(!0)},[]),be.useEffect(()=>{let Ze=Ge.current;if(Ze){let gt=Ze.getBoundingClientRect().height;return Se(gt),k(_t=>[{toastId:g.id,height:gt,position:g.position},..._t]),()=>k(_t=>_t.filter(Cn=>Cn.toastId!==g.id))}},[k,g.id]),be.useLayoutEffect(()=>{if(!ae)return;let Ze=Ge.current,gt=Ze.style.height;Ze.style.height="auto";let _t=Ze.getBoundingClientRect().height;Ze.style.height=gt,Se(_t),k(Cn=>Cn.find(Sn=>Sn.toastId===g.id)?Cn.map(Sn=>Sn.toastId===g.id?{...Sn,height:_t}:Sn):[{toastId:g.id,height:_t,position:g.position},...Cn])},[ae,g.title,g.description,k,g.id]);let dn=be.useCallback(()=>{he(!0),Te(rt.current),k(Ze=>Ze.filter(gt=>gt.toastId!==g.id)),setTimeout(()=>{L(g)},HI)},[g,L,k,rt]);be.useEffect(()=>{if(g.promise&&te==="loading"||g.duration===1/0||g.type==="loading")return;let Ze;return D||x||M&&xu?(()=>{if(qt.current{var gt;(gt=g.onAutoClose)==null||gt.call(g,g),dn()},ie.current)),()=>clearTimeout(Ze)},[D,x,g,te,M,xu,dn]),be.useEffect(()=>{g.delete&&dn()},[dn,g.delete]);function oo(){var Ze,gt,_t;return A!=null&&A.loading?be.createElement("div",{className:wr(K==null?void 0:K.loader,(Ze=g==null?void 0:g.classNames)==null?void 0:Ze.loader,"sonner-loader"),"data-visible":te==="loading"},A.loading):G?be.createElement("div",{className:wr(K==null?void 0:K.loader,(gt=g==null?void 0:g.classNames)==null?void 0:gt.loader,"sonner-loader"),"data-visible":te==="loading"},G):be.createElement(_I,{className:wr(K==null?void 0:K.loader,(_t=g==null?void 0:g.classNames)==null?void 0:_t.loader),visible:te==="loading"})}return be.createElement("li",{tabIndex:0,ref:Ge,className:wr(q,Oe,K==null?void 0:K.toast,(t=g==null?void 0:g.classNames)==null?void 0:t.toast,K==null?void 0:K.default,K==null?void 0:K[te],(n=g==null?void 0:g.classNames)==null?void 0:n[te]),"data-sonner-toast":"","data-rich-colors":(r=g.richColors)!=null?r:R,"data-styled":!(g.jsx||g.unstyled||w),"data-mounted":ae,"data-promise":!!g.promise,"data-swiped":xe,"data-removed":Ce,"data-visible":Ne,"data-y-position":At,"data-x-position":rn,"data-index":T,"data-front":ve,"data-swiping":Ee,"data-dismissible":de,"data-type":te,"data-invert":ao,"data-swipe-out":Pe,"data-swipe-direction":re,"data-expanded":!!(D||F&&ae),style:{"--index":T,"--toasts-before":T,"--z-index":N.length-T,"--offset":`${Ce?ce:rt.current}px`,"--initial-height":F?"auto":`${ge}px`,...P,...g.style},onDragEnd:()=>{we(!1),X(null),at.current=null},onPointerDown:Ze=>{Di||!de||($e.current=new Date,Te(rt.current),Ze.target.setPointerCapture(Ze.pointerId),Ze.target.tagName!=="BUTTON"&&(we(!0),at.current={x:Ze.clientX,y:Ze.clientY}))},onPointerUp:()=>{var Ze,gt,_t,Cn;if(Pe||!de)return;at.current=null;let Sn=Number(((Ze=Ge.current)==null?void 0:Ze.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Tn=Number(((gt=Ge.current)==null?void 0:gt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Zr=new Date().getTime()-((_t=$e.current)==null?void 0:_t.getTime()),An=O==="x"?Sn:Tn,gr=Math.abs(An)/Zr;if(Math.abs(An)>=$I||gr>.11){Te(rt.current),(Cn=g.onDismiss)==null||Cn.call(g,g),ue(O==="x"?Sn>0?"right":"left":Tn>0?"down":"up"),dn(),Ae(!0),ee(!1);return}we(!1),X(null)},onPointerMove:Ze=>{var gt,_t,Cn,Sn;if(!at.current||!de||((gt=window.getSelection())==null?void 0:gt.toString().length)>0)return;let Tn=Ze.clientY-at.current.y,Zr=Ze.clientX-at.current.x,An=(_t=e.swipeDirections)!=null?_t:VI(Z);!O&&(Math.abs(Zr)>1||Math.abs(Tn)>1)&&X(Math.abs(Zr)>Math.abs(Tn)?"x":"y");let gr={x:0,y:0};O==="y"?(An.includes("top")||An.includes("bottom"))&&(An.includes("top")&&Tn<0||An.includes("bottom")&&Tn>0)&&(gr.y=Tn):O==="x"&&(An.includes("left")||An.includes("right"))&&(An.includes("left")&&Zr<0||An.includes("right")&&Zr>0)&&(gr.x=Zr),(Math.abs(gr.x)>0||Math.abs(gr.y)>0)&&ee(!0),(Cn=Ge.current)==null||Cn.style.setProperty("--swipe-amount-x",`${gr.x}px`),(Sn=Ge.current)==null||Sn.style.setProperty("--swipe-amount-y",`${gr.y}px`)}},vt&&!g.jsx?be.createElement("button",{"aria-label":H,"data-disabled":Di,"data-close-button":!0,onClick:Di||!de?()=>{}:()=>{var Ze;dn(),(Ze=g.onDismiss)==null||Ze.call(g,g)},className:wr(K==null?void 0:K.closeButton,(i=g==null?void 0:g.classNames)==null?void 0:i.closeButton)},(o=A==null?void 0:A.close)!=null?o:RI):null,g.jsx||E.isValidElement(g.title)?g.jsx?g.jsx:typeof g.title=="function"?g.title():g.title:be.createElement(be.Fragment,null,te||g.icon||g.promise?be.createElement("div",{"data-icon":"",className:wr(K==null?void 0:K.icon,(l=g==null?void 0:g.classNames)==null?void 0:l.icon)},g.promise||g.type==="loading"&&!g.icon?g.icon||oo():null,g.type!=="loading"?g.icon||(A==null?void 0:A[te])||SI(te):null):null,be.createElement("div",{"data-content":"",className:wr(K==null?void 0:K.content,(u=g==null?void 0:g.classNames)==null?void 0:u.content)},be.createElement("div",{"data-title":"",className:wr(K==null?void 0:K.title,(f=g==null?void 0:g.classNames)==null?void 0:f.title)},typeof g.title=="function"?g.title():g.title),g.description?be.createElement("div",{"data-description":"",className:wr(I,He,K==null?void 0:K.description,(d=g==null?void 0:g.classNames)==null?void 0:d.description)},typeof g.description=="function"?g.description():g.description):null),E.isValidElement(g.cancel)?g.cancel:g.cancel&&zc(g.cancel)?be.createElement("button",{"data-button":!0,"data-cancel":!0,style:g.cancelButtonStyle||z,onClick:Ze=>{var gt,_t;zc(g.cancel)&&de&&((_t=(gt=g.cancel).onClick)==null||_t.call(gt,Ze),dn())},className:wr(K==null?void 0:K.cancelButton,(p=g==null?void 0:g.classNames)==null?void 0:p.cancelButton)},g.cancel.label):null,E.isValidElement(g.action)?g.action:g.action&&zc(g.action)?be.createElement("button",{"data-button":!0,"data-action":!0,style:g.actionButtonStyle||V,onClick:Ze=>{var gt,_t;zc(g.action)&&((_t=(gt=g.action).onClick)==null||_t.call(gt,Ze),!Ze.defaultPrevented&&dn())},className:wr(K==null?void 0:K.actionButton,(m=g==null?void 0:g.classNames)==null?void 0:m.actionButton)},g.action.label):null))};function G1(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function YI(e,t){let n={};return[e,t].forEach((r,i)=>{let o=i===1,l=o?"--mobile-offset":"--offset",u=o?GI:II;function f(d){["top","right","bottom","left"].forEach(p=>{n[`${l}-${p}`]=typeof d=="number"?`${d}px`:d})}typeof r=="number"||typeof r=="string"?f(r):typeof r=="object"?["top","right","bottom","left"].forEach(d=>{r[d]===void 0?n[`${l}-${d}`]=u:n[`${l}-${d}`]=typeof r[d]=="number"?`${r[d]}px`:r[d]}):f(u)}),n}var WI=E.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:i=["altKey","KeyT"],expand:o,closeButton:l,className:u,offset:f,mobileOffset:d,theme:p="light",richColors:m,duration:v,style:g,visibleToasts:w=FI,toastOptions:x,dir:k=G1(),gap:C=BI,loadingIcon:_,icons:T,containerAriaLabel:N="Notifications",pauseWhenPageIsHidden:D}=e,[L,R]=be.useState([]),U=be.useMemo(()=>Array.from(new Set([r].concat(L.filter(M=>M.position).map(M=>M.position)))),[L,r]),[P,z]=be.useState([]),[V,q]=be.useState(!1),[I,Y]=be.useState(!1),[Z,B]=be.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),G=be.useRef(null),F=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),K=be.useRef(null),A=be.useRef(!1),H=be.useCallback(M=>{R(O=>{var X;return(X=O.find(re=>re.id===M.id))!=null&&X.delete||Ln.dismiss(M.id),O.filter(({id:re})=>re!==M.id)})},[]);return be.useEffect(()=>Ln.subscribe(M=>{if(M.dismiss){R(O=>O.map(X=>X.id===M.id?{...X,delete:!0}:X));return}setTimeout(()=>{Ck.flushSync(()=>{R(O=>{let X=O.findIndex(re=>re.id===M.id);return X!==-1?[...O.slice(0,X),{...O[X],...M},...O.slice(X+1)]:[M,...O]})})})}),[]),be.useEffect(()=>{if(p!=="system"){B(p);return}if(p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?B("dark"):B("light")),typeof window>"u")return;let M=window.matchMedia("(prefers-color-scheme: dark)");try{M.addEventListener("change",({matches:O})=>{B(O?"dark":"light")})}catch{M.addListener(({matches:X})=>{try{B(X?"dark":"light")}catch(re){console.error(re)}})}},[p]),be.useEffect(()=>{L.length<=1&&q(!1)},[L]),be.useEffect(()=>{let M=O=>{var X,re;i.every(ue=>O[ue]||O.code===ue)&&(q(!0),(X=G.current)==null||X.focus()),O.code==="Escape"&&(document.activeElement===G.current||(re=G.current)!=null&&re.contains(document.activeElement))&&q(!1)};return document.addEventListener("keydown",M),()=>document.removeEventListener("keydown",M)},[i]),be.useEffect(()=>{if(G.current)return()=>{K.current&&(K.current.focus({preventScroll:!0}),K.current=null,A.current=!1)}},[G.current]),be.createElement("section",{ref:t,"aria-label":`${N} ${F}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},U.map((M,O)=>{var X;let[re,ue]=M.split("-");return L.length?be.createElement("ol",{key:M,dir:k==="auto"?G1():k,tabIndex:-1,ref:G,className:u,"data-sonner-toaster":!0,"data-theme":Z,"data-y-position":re,"data-lifted":V&&L.length>1&&!o,"data-x-position":ue,style:{"--front-toast-height":`${((X=P[0])==null?void 0:X.height)||0}px`,"--width":`${UI}px`,"--gap":`${C}px`,...g,...YI(f,d)},onBlur:ae=>{A.current&&!ae.currentTarget.contains(ae.relatedTarget)&&(A.current=!1,K.current&&(K.current.focus({preventScroll:!0}),K.current=null))},onFocus:ae=>{ae.target instanceof HTMLElement&&ae.target.dataset.dismissible==="false"||A.current||(A.current=!0,K.current=ae.relatedTarget)},onMouseEnter:()=>q(!0),onMouseMove:()=>q(!0),onMouseLeave:()=>{I||q(!1)},onDragEnd:()=>q(!1),onPointerDown:ae=>{ae.target instanceof HTMLElement&&ae.target.dataset.dismissible==="false"||Y(!0)},onPointerUp:()=>Y(!1)},L.filter(ae=>!ae.position&&O===0||ae.position===M).map((ae,oe)=>{var Ce,he;return be.createElement(qI,{key:ae.id,icons:T,index:oe,toast:ae,defaultRichColors:m,duration:(Ce=x==null?void 0:x.duration)!=null?Ce:v,className:x==null?void 0:x.className,descriptionClassName:x==null?void 0:x.descriptionClassName,invert:n,visibleToasts:w,closeButton:(he=x==null?void 0:x.closeButton)!=null?he:l,interacting:I,position:M,style:x==null?void 0:x.style,unstyled:x==null?void 0:x.unstyled,classNames:x==null?void 0:x.classNames,cancelButtonStyle:x==null?void 0:x.cancelButtonStyle,actionButtonStyle:x==null?void 0:x.actionButtonStyle,removeToast:H,toasts:L.filter(Ee=>Ee.position==ae.position),heights:P.filter(Ee=>Ee.position==ae.position),setHeights:z,expandByDefault:o,gap:C,loadingIcon:_,expanded:V,pauseWhenPageIsHidden:D,swipeDirections:e.swipeDirections})})):null}))});const XI=()=>{const[e,t]=E.useState(!0),n=Qe.use.apiKey(),[r,i]=E.useState(""),o=Mn.use.message();E.useEffect(()=>{i(n||"")},[n,e]),E.useEffect(()=>{o&&(o.includes(yk)||o.includes(bk))&&t(!0)},[o,t]);const l=E.useCallback(async()=>{if(Qe.setState({apiKey:r||null}),await Mn.getState().check()){t(!1);return}vn.error("API Key is invalid")},[r]),u=E.useCallback(f=>{i(f.target.value)},[i]);return S.jsx(yI,{open:e,onOpenChange:t,children:S.jsxs(JC,{children:[S.jsxs(eT,{children:[S.jsx(tT,{children:"API Key is required"}),S.jsx(nT,{children:"Please enter your API key"})]}),S.jsxs("form",{className:"flex gap-2",onSubmit:f=>f.preventDefault(),children:[S.jsx(Za,{type:"password",value:r,onChange:u,placeholder:"Enter your API key",className:"max-h-full w-full min-w-0",autoComplete:"off"}),S.jsx(Ot,{onClick:l,variant:"outline",size:"sm",children:"Save"})]})]})})};var uy="Popover",[rT,pK]=dr(uy,[ws]),lu=ws(),[KI,ha]=rT(uy),iT=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:l=!1}=e,u=lu(t),f=E.useRef(null),[d,p]=E.useState(!1),[m=!1,v]=_i({prop:r,defaultProp:i,onChange:o});return S.jsx(ry,{...u,children:S.jsx(KI,{scope:t,contentId:bn(),triggerRef:f,open:m,onOpenChange:v,onOpenToggle:E.useCallback(()=>v(g=>!g),[v]),hasCustomAnchor:d,onCustomAnchorAdd:E.useCallback(()=>p(!0),[]),onCustomAnchorRemove:E.useCallback(()=>p(!1),[]),modal:l,children:n})})};iT.displayName=uy;var aT="PopoverAnchor",ZI=E.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=ha(aT,n),o=lu(n),{onCustomAnchorAdd:l,onCustomAnchorRemove:u}=i;return E.useEffect(()=>(l(),()=>u()),[l,u]),S.jsx(sd,{...o,...r,ref:t})});ZI.displayName=aT;var oT="PopoverTrigger",sT=E.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=ha(oT,n),o=lu(n),l=dt(t,i.triggerRef),u=S.jsx(We.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":dT(i.open),...r,ref:l,onClick:qe(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?u:S.jsx(sd,{asChild:!0,...o,children:u})});sT.displayName=oT;var cy="PopoverPortal",[QI,JI]=rT(cy,{forceMount:void 0}),lT=e=>{const{__scopePopover:t,forceMount:n,children:r,container:i}=e,o=ha(cy,t);return S.jsx(QI,{scope:t,forceMount:n,children:S.jsx(Kn,{present:n||o.open,children:S.jsx(Jf,{asChild:!0,container:i,children:r})})})};lT.displayName=cy;var us="PopoverContent",uT=E.forwardRef((e,t)=>{const n=JI(us,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,o=ha(us,e.__scopePopover);return S.jsx(Kn,{present:r||o.open,children:o.modal?S.jsx(e3,{...i,ref:t}):S.jsx(t3,{...i,ref:t})})});uT.displayName=us;var e3=E.forwardRef((e,t)=>{const n=ha(us,e.__scopePopover),r=E.useRef(null),i=dt(t,r),o=E.useRef(!1);return E.useEffect(()=>{const l=r.current;if(l)return Fv(l)},[]),S.jsx(td,{as:ua,allowPinchZoom:!0,children:S.jsx(cT,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:qe(e.onCloseAutoFocus,l=>{var u;l.preventDefault(),o.current||(u=n.triggerRef.current)==null||u.focus()}),onPointerDownOutside:qe(e.onPointerDownOutside,l=>{const u=l.detail.originalEvent,f=u.button===0&&u.ctrlKey===!0,d=u.button===2||f;o.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:qe(e.onFocusOutside,l=>l.preventDefault(),{checkForDefaultPrevented:!1})})})}),t3=E.forwardRef((e,t)=>{const n=ha(us,e.__scopePopover),r=E.useRef(!1),i=E.useRef(!1);return S.jsx(cT,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var l,u;(l=e.onCloseAutoFocus)==null||l.call(e,o),o.defaultPrevented||(r.current||(u=n.triggerRef.current)==null||u.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{var f,d;(f=e.onInteractOutside)==null||f.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const l=o.target;((d=n.triggerRef.current)==null?void 0:d.contains(l))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),cT=E.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:p,...m}=e,v=ha(us,n),g=lu(n);return Pv(),S.jsx(Qf,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:S.jsx(ou,{asChild:!0,disableOutsidePointerEvents:l,onInteractOutside:p,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:d,onDismiss:()=>v.onOpenChange(!1),children:S.jsx(iy,{"data-state":dT(v.open),role:"dialog",id:v.contentId,...g,...m,ref:t,style:{...m.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),fT="PopoverClose",n3=E.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=ha(fT,n);return S.jsx(We.button,{type:"button",...r,ref:t,onClick:qe(e.onClick,()=>i.onOpenChange(!1))})});n3.displayName=fT;var r3="PopoverArrow",i3=E.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=lu(n);return S.jsx(ay,{...i,...r,ref:t})});i3.displayName=r3;function dT(e){return e?"open":"closed"}var a3=iT,o3=sT,s3=lT,hT=uT;const dd=a3,hd=o3,uu=E.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},i)=>S.jsx(s3,{children:S.jsx(hT,{ref:i,align:t,sideOffset:n,className:Me("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 rounded-md border p-4 shadow-md outline-none",e),...r})}));uu.displayName=hT.displayName;const l3=({status:e})=>e?S.jsxs("div",{className:"min-w-[300px] space-y-3 text-sm",children:[S.jsxs("div",{className:"space-y-1",children:[S.jsx("h4",{className:"font-medium",children:"Storage Info"}),S.jsxs("div",{className:"text-muted-foreground grid grid-cols-2 gap-1",children:[S.jsx("span",{children:"Working Directory:"}),S.jsx("span",{className:"truncate",children:e.working_directory}),S.jsx("span",{children:"Input Directory:"}),S.jsx("span",{className:"truncate",children:e.input_directory})]})]}),S.jsxs("div",{className:"space-y-1",children:[S.jsx("h4",{className:"font-medium",children:"LLM Configuration"}),S.jsxs("div",{className:"text-muted-foreground grid grid-cols-2 gap-1",children:[S.jsx("span",{children:"LLM Binding:"}),S.jsx("span",{children:e.configuration.llm_binding}),S.jsx("span",{children:"LLM Binding Host:"}),S.jsx("span",{children:e.configuration.llm_binding_host}),S.jsx("span",{children:"LLM Model:"}),S.jsx("span",{children:e.configuration.llm_model}),S.jsx("span",{children:"Max Tokens:"}),S.jsx("span",{children:e.configuration.max_tokens})]})]}),S.jsxs("div",{className:"space-y-1",children:[S.jsx("h4",{className:"font-medium",children:"Embedding Configuration"}),S.jsxs("div",{className:"text-muted-foreground grid grid-cols-2 gap-1",children:[S.jsx("span",{children:"Embedding Binding:"}),S.jsx("span",{children:e.configuration.embedding_binding}),S.jsx("span",{children:"Embedding Binding Host:"}),S.jsx("span",{children:e.configuration.embedding_binding_host}),S.jsx("span",{children:"Embedding Model:"}),S.jsx("span",{children:e.configuration.embedding_model})]})]}),S.jsxs("div",{className:"space-y-1",children:[S.jsx("h4",{className:"font-medium",children:"Storage Configuration"}),S.jsxs("div",{className:"text-muted-foreground grid grid-cols-2 gap-1",children:[S.jsx("span",{children:"KV Storage:"}),S.jsx("span",{children:e.configuration.kv_storage}),S.jsx("span",{children:"Doc Status Storage:"}),S.jsx("span",{children:e.configuration.doc_status_storage}),S.jsx("span",{children:"Graph Storage:"}),S.jsx("span",{children:e.configuration.graph_storage}),S.jsx("span",{children:"Vector Storage:"}),S.jsx("span",{children:e.configuration.vector_storage})]})]})]}):S.jsx("div",{className:"text-muted-foreground text-sm",children:"Status information unavailable"}),u3=()=>{const e=Mn.use.health(),t=Mn.use.lastCheckTime(),n=Mn.use.status(),[r,i]=E.useState(!1);return E.useEffect(()=>{i(!0);const o=setTimeout(()=>i(!1),300);return()=>clearTimeout(o)},[t]),S.jsx("div",{className:"fixed right-4 bottom-4 flex items-center gap-2 opacity-80 select-none",children:S.jsxs(dd,{children:[S.jsx(hd,{asChild:!0,children:S.jsxs("div",{className:"flex cursor-help items-center gap-2",children:[S.jsx("div",{className:Me("h-3 w-3 rounded-full transition-all duration-300","shadow-[0_0_8px_rgba(0,0,0,0.2)]",e?"bg-green-500":"bg-red-500",r&&"scale-125",r&&e&&"shadow-[0_0_12px_rgba(34,197,94,0.4)]",r&&!e&&"shadow-[0_0_12px_rgba(239,68,68,0.4)]")}),S.jsx("span",{className:"text-muted-foreground text-xs",children:e?"Connected":"Disconnected"})]})}),S.jsx(uu,{className:"w-auto",side:"top",align:"end",children:S.jsx(l3,{status:n})})]})})},pT=()=>{const e=E.useContext(B_);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};function c3(){const{theme:e,setTheme:t}=pT(),n=E.useCallback(()=>t("light"),[t]),r=E.useCallback(()=>t("dark"),[t]);return e==="dark"?S.jsx(Ot,{onClick:n,variant:$r,tooltip:"Switch to light theme",size:"icon",side:"bottom",children:S.jsx(BM,{})}):S.jsx(Ot,{onClick:r,variant:$r,tooltip:"Switch to dark theme",size:"icon",side:"bottom",children:S.jsx(nP,{})})}function mT(e){const t=e+"CollectionProvider",[n,r]=dr(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=g=>{const{scope:w,children:x}=g,k=be.useRef(null),C=be.useRef(new Map).current;return S.jsx(i,{scope:w,itemMap:C,collectionRef:k,children:x})};l.displayName=t;const u=e+"CollectionSlot",f=be.forwardRef((g,w)=>{const{scope:x,children:k}=g,C=o(u,x),_=dt(w,C.collectionRef);return S.jsx(ua,{ref:_,children:k})});f.displayName=u;const d=e+"CollectionItemSlot",p="data-radix-collection-item",m=be.forwardRef((g,w)=>{const{scope:x,children:k,...C}=g,_=be.useRef(null),T=dt(w,_),N=o(d,x);return be.useEffect(()=>(N.itemMap.set(_,{ref:_,...C}),()=>void N.itemMap.delete(_))),S.jsx(ua,{[p]:"",ref:T,children:k})});m.displayName=d;function v(g){const w=o(e+"CollectionConsumer",g);return be.useCallback(()=>{const k=w.collectionRef.current;if(!k)return[];const C=Array.from(k.querySelectorAll(`[${p}]`));return Array.from(w.itemMap.values()).sort((N,D)=>C.indexOf(N.ref.current)-C.indexOf(D.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:l,Slot:f,ItemSlot:m},v,r]}var f3=E.createContext(void 0);function pd(e){const t=E.useContext(f3);return e||t||"ltr"}var am="rovingFocusGroup.onEntryFocus",d3={bubbles:!1,cancelable:!0},md="RovingFocusGroup",[Ig,gT,h3]=mT(md),[p3,vT]=dr(md,[h3]),[m3,g3]=p3(md),yT=E.forwardRef((e,t)=>S.jsx(Ig.Provider,{scope:e.__scopeRovingFocusGroup,children:S.jsx(Ig.Slot,{scope:e.__scopeRovingFocusGroup,children:S.jsx(v3,{...e,ref:t})})}));yT.displayName=md;var v3=E.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:l,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:f,onEntryFocus:d,preventScrollOnEntryFocus:p=!1,...m}=e,v=E.useRef(null),g=dt(t,v),w=pd(o),[x=null,k]=_i({prop:l,defaultProp:u,onChange:f}),[C,_]=E.useState(!1),T=un(d),N=gT(n),D=E.useRef(!1),[L,R]=E.useState(0);return E.useEffect(()=>{const U=v.current;if(U)return U.addEventListener(am,T),()=>U.removeEventListener(am,T)},[T]),S.jsx(m3,{scope:n,orientation:r,dir:w,loop:i,currentTabStopId:x,onItemFocus:E.useCallback(U=>k(U),[k]),onItemShiftTab:E.useCallback(()=>_(!0),[]),onFocusableItemAdd:E.useCallback(()=>R(U=>U+1),[]),onFocusableItemRemove:E.useCallback(()=>R(U=>U-1),[]),children:S.jsx(We.div,{tabIndex:C||L===0?-1:0,"data-orientation":r,...m,ref:g,style:{outline:"none",...e.style},onMouseDown:qe(e.onMouseDown,()=>{D.current=!0}),onFocus:qe(e.onFocus,U=>{const P=!D.current;if(U.target===U.currentTarget&&P&&!C){const z=new CustomEvent(am,d3);if(U.currentTarget.dispatchEvent(z),!z.defaultPrevented){const V=N().filter(B=>B.focusable),q=V.find(B=>B.active),I=V.find(B=>B.id===x),Z=[q,I,...V].filter(Boolean).map(B=>B.ref.current);wT(Z,p)}}D.current=!1}),onBlur:qe(e.onBlur,()=>_(!1))})})}),bT="RovingFocusGroupItem",xT=E.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,...l}=e,u=bn(),f=o||u,d=g3(bT,n),p=d.currentTabStopId===f,m=gT(n),{onFocusableItemAdd:v,onFocusableItemRemove:g}=d;return E.useEffect(()=>{if(r)return v(),()=>g()},[r,v,g]),S.jsx(Ig.ItemSlot,{scope:n,id:f,focusable:r,active:i,children:S.jsx(We.span,{tabIndex:p?0:-1,"data-orientation":d.orientation,...l,ref:t,onMouseDown:qe(e.onMouseDown,w=>{r?d.onItemFocus(f):w.preventDefault()}),onFocus:qe(e.onFocus,()=>d.onItemFocus(f)),onKeyDown:qe(e.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){d.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const x=x3(w,d.orientation,d.dir);if(x!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let C=m().filter(_=>_.focusable).map(_=>_.ref.current);if(x==="last")C.reverse();else if(x==="prev"||x==="next"){x==="prev"&&C.reverse();const _=C.indexOf(w.currentTarget);C=d.loop?w3(C,_+1):C.slice(_+1)}setTimeout(()=>wT(C))}})})})});xT.displayName=bT;var y3={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function b3(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function x3(e,t,n){const r=b3(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return y3[r]}function wT(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function w3(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var S3=yT,E3=xT,fy="Tabs",[_3,mK]=dr(fy,[vT]),ST=vT(),[k3,dy]=_3(fy),ET=E.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:o,orientation:l="horizontal",dir:u,activationMode:f="automatic",...d}=e,p=pd(u),[m,v]=_i({prop:r,onChange:i,defaultProp:o});return S.jsx(k3,{scope:n,baseId:bn(),value:m,onValueChange:v,orientation:l,dir:p,activationMode:f,children:S.jsx(We.div,{dir:p,"data-orientation":l,...d,ref:t})})});ET.displayName=fy;var _T="TabsList",kT=E.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,o=dy(_T,n),l=ST(n);return S.jsx(S3,{asChild:!0,...l,orientation:o.orientation,dir:o.dir,loop:r,children:S.jsx(We.div,{role:"tablist","aria-orientation":o.orientation,...i,ref:t})})});kT.displayName=_T;var CT="TabsTrigger",TT=E.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...o}=e,l=dy(CT,n),u=ST(n),f=DT(l.baseId,r),d=NT(l.baseId,r),p=r===l.value;return S.jsx(E3,{asChild:!0,...u,focusable:!i,active:p,children:S.jsx(We.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":d,"data-state":p?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:f,...o,ref:t,onMouseDown:qe(e.onMouseDown,m=>{!i&&m.button===0&&m.ctrlKey===!1?l.onValueChange(r):m.preventDefault()}),onKeyDown:qe(e.onKeyDown,m=>{[" ","Enter"].includes(m.key)&&l.onValueChange(r)}),onFocus:qe(e.onFocus,()=>{const m=l.activationMode!=="manual";!p&&!i&&m&&l.onValueChange(r)})})})});TT.displayName=CT;var AT="TabsContent",RT=E.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:o,...l}=e,u=dy(AT,n),f=DT(u.baseId,r),d=NT(u.baseId,r),p=r===u.value,m=E.useRef(p);return E.useEffect(()=>{const v=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(v)},[]),S.jsx(Kn,{present:i||p,children:({present:v})=>S.jsx(We.div,{"data-state":p?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":f,hidden:!v,id:d,tabIndex:0,...l,ref:t,style:{...e.style,animationDuration:m.current?"0s":void 0},children:v&&o})})});RT.displayName=AT;function DT(e,t){return`${e}-trigger-${t}`}function NT(e,t){return`${e}-content-${t}`}var C3=ET,OT=kT,jT=TT,LT=RT;const T3=C3,zT=E.forwardRef(({className:e,...t},n)=>S.jsx(OT,{ref:n,className:Me("bg-muted text-muted-foreground inline-flex h-10 items-center justify-center rounded-md p-1",e),...t}));zT.displayName=OT.displayName;const MT=E.forwardRef(({className:e,...t},n)=>S.jsx(jT,{ref:n,className:Me("ring-offset-background focus-visible:ring-ring data-[state=active]:bg-background data-[state=active]:text-foreground inline-flex items-center justify-center rounded-sm px-3 py-1.5 text-sm font-medium whitespace-nowrap transition-all focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm",e),...t}));MT.displayName=jT.displayName;const Pl=E.forwardRef(({className:e,...t},n)=>S.jsx(LT,{ref:n,className:Me("ring-offset-background focus-visible:ring-ring mt-2 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",e),...t}));Pl.displayName=LT.displayName;function Mc({value:e,currentTab:t,children:n}){return S.jsx(MT,{value:e,className:Me("cursor-pointer px-2 py-1 transition-all",t===e?"!bg-emerald-400 !text-zinc-50":"hover:bg-background/60"),children:n})}function A3(){const e=Qe.use.currentTab();return S.jsx("div",{className:"flex h-8 self-center",children:S.jsxs(zT,{className:"h-full gap-2",children:[S.jsx(Mc,{value:"documents",currentTab:e,children:"Documents"}),S.jsx(Mc,{value:"knowledge-graph",currentTab:e,children:"Knowledge Graph"}),S.jsx(Mc,{value:"retrieval",currentTab:e,children:"Retrieval"}),S.jsx(Mc,{value:"api",currentTab:e,children:"API"})]})})}function R3(){return S.jsxs("header",{className:"border-border/40 bg-background/95 supports-[backdrop-filter]:bg-background/60 sticky top-0 z-50 flex h-10 w-full border-b px-4 backdrop-blur",children:[S.jsxs("a",{href:"/",className:"mr-6 flex items-center gap-2",children:[S.jsx(oP,{className:"size-4 text-emerald-400","aria-hidden":"true"}),S.jsx("span",{className:"font-bold md:inline-block",children:t1.name})]}),S.jsx("div",{className:"flex h-10 flex-1 justify-center",children:S.jsx(A3,{})}),S.jsxs("nav",{className:"flex items-center",children:[S.jsx(Ot,{variant:"ghost",size:"icon",side:"bottom",tooltip:"Project Repository",children:S.jsx("a",{href:t1.github,target:"_blank",rel:"noopener noreferrer",children:S.jsx(NM,{className:"size-4","aria-hidden":"true"})})}),S.jsx(c3,{})]})]})}var Pc={exports:{}},U1;function D3(){if(U1)return Pc.exports;U1=1;var e=typeof Reflect=="object"?Reflect:null,t=e&&typeof e.apply=="function"?e.apply:function(D,L,R){return Function.prototype.apply.call(D,L,R)},n;e&&typeof e.ownKeys=="function"?n=e.ownKeys:Object.getOwnPropertySymbols?n=function(D){return Object.getOwnPropertyNames(D).concat(Object.getOwnPropertySymbols(D))}:n=function(D){return Object.getOwnPropertyNames(D)};function r(N){console&&console.warn&&console.warn(N)}var i=Number.isNaN||function(D){return D!==D};function o(){o.init.call(this)}Pc.exports=o,Pc.exports.once=C,o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var l=10;function u(N){if(typeof N!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof N)}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(N){if(typeof N!="number"||N<0||i(N))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+N+".");l=N}}),o.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(D){if(typeof D!="number"||D<0||i(D))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+D+".");return this._maxListeners=D,this};function f(N){return N._maxListeners===void 0?o.defaultMaxListeners:N._maxListeners}o.prototype.getMaxListeners=function(){return f(this)},o.prototype.emit=function(D){for(var L=[],R=1;R0&&(z=L[0]),z instanceof Error)throw z;var V=new Error("Unhandled error."+(z?" ("+z.message+")":""));throw V.context=z,V}var q=P[D];if(q===void 0)return!1;if(typeof q=="function")t(q,this,L);else for(var I=q.length,Y=w(q,I),R=0;R0&&z.length>U&&!z.warned){z.warned=!0;var V=new Error("Possible EventEmitter memory leak detected. "+z.length+" "+String(D)+" listeners added. Use emitter.setMaxListeners() to increase limit");V.name="MaxListenersExceededWarning",V.emitter=N,V.type=D,V.count=z.length,r(V)}return N}o.prototype.addListener=function(D,L){return d(this,D,L,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(D,L){return d(this,D,L,!0)};function p(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function m(N,D,L){var R={fired:!1,wrapFn:void 0,target:N,type:D,listener:L},U=p.bind(R);return U.listener=L,R.wrapFn=U,U}o.prototype.once=function(D,L){return u(L),this.on(D,m(this,D,L)),this},o.prototype.prependOnceListener=function(D,L){return u(L),this.prependListener(D,m(this,D,L)),this},o.prototype.removeListener=function(D,L){var R,U,P,z,V;if(u(L),U=this._events,U===void 0)return this;if(R=U[D],R===void 0)return this;if(R===L||R.listener===L)--this._eventsCount===0?this._events=Object.create(null):(delete U[D],U.removeListener&&this.emit("removeListener",D,R.listener||L));else if(typeof R!="function"){for(P=-1,z=R.length-1;z>=0;z--)if(R[z]===L||R[z].listener===L){V=R[z].listener,P=z;break}if(P<0)return this;P===0?R.shift():x(R,P),R.length===1&&(U[D]=R[0]),U.removeListener!==void 0&&this.emit("removeListener",D,V||L)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(D){var L,R,U;if(R=this._events,R===void 0)return this;if(R.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):R[D]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete R[D]),this;if(arguments.length===0){var P=Object.keys(R),z;for(U=0;U=0;U--)this.removeListener(D,L[U]);return this};function v(N,D,L){var R=N._events;if(R===void 0)return[];var U=R[D];return U===void 0?[]:typeof U=="function"?L?[U.listener||U]:[U]:L?k(U):w(U,U.length)}o.prototype.listeners=function(D){return v(this,D,!0)},o.prototype.rawListeners=function(D){return v(this,D,!1)},o.listenerCount=function(N,D){return typeof N.listenerCount=="function"?N.listenerCount(D):g.call(N,D)},o.prototype.listenerCount=g;function g(N){var D=this._events;if(D!==void 0){var L=D[N];if(typeof L=="function")return 1;if(L!==void 0)return L.length}return 0}o.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]};function w(N,D){for(var L=new Array(D),R=0;Re++}function Ei(){const e=arguments;let t=null,n=-1;return{[Symbol.iterator](){return this},next(){let r=null;do{if(t===null){if(n++,n>=e.length)return{done:!0};t=e[n][Symbol.iterator]()}if(r=t.next(),r.done){t=null;continue}break}while(!0);return r}}}function Ss(){return{[Symbol.iterator](){return this},next(){return{done:!0}}}}class hy extends Error{constructor(t){super(),this.name="GraphError",this.message=t}}class je extends hy{constructor(t){super(t),this.name="InvalidArgumentsGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,je.prototype.constructor)}}class De extends hy{constructor(t){super(t),this.name="NotFoundGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,De.prototype.constructor)}}class Xe extends hy{constructor(t){super(t),this.name="UsageGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Xe.prototype.constructor)}}function IT(e,t){this.key=e,this.attributes=t,this.clear()}IT.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.undirectedDegree=0,this.undirectedLoops=0,this.directedLoops=0,this.in={},this.out={},this.undirected={}};function GT(e,t){this.key=e,this.attributes=t,this.clear()}GT.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.directedLoops=0,this.in={},this.out={}};function UT(e,t){this.key=e,this.attributes=t,this.clear()}UT.prototype.clear=function(){this.undirectedDegree=0,this.undirectedLoops=0,this.undirected={}};function Es(e,t,n,r,i){this.key=t,this.attributes=i,this.undirected=e,this.source=n,this.target=r}Es.prototype.attach=function(){let e="out",t="in";this.undirected&&(e=t="undirected");const n=this.source.key,r=this.target.key;this.source[e][r]=this,!(this.undirected&&n===r)&&(this.target[t][n]=this)};Es.prototype.attachMulti=function(){let e="out",t="in";const n=this.source.key,r=this.target.key;this.undirected&&(e=t="undirected");const i=this.source[e],o=i[r];if(typeof o>"u"){i[r]=this,this.undirected&&n===r||(this.target[t][n]=this);return}o.previous=this,this.next=o,i[r]=this,this.target[t][n]=this};Es.prototype.detach=function(){const e=this.source.key,t=this.target.key;let n="out",r="in";this.undirected&&(n=r="undirected"),delete this.source[n][t],delete this.target[r][e]};Es.prototype.detachMulti=function(){const e=this.source.key,t=this.target.key;let n="out",r="in";this.undirected&&(n=r="undirected"),this.previous===void 0?this.next===void 0?(delete this.source[n][t],delete this.target[r][e]):(this.next.previous=void 0,this.source[n][t]=this.next,this.target[r][e]=this.next):(this.previous.next=this.next,this.next!==void 0&&(this.next.previous=this.previous))};const BT=0,$T=1,j3=2,HT=3;function Ai(e,t,n,r,i,o,l){let u,f,d,p;if(r=""+r,n===BT){if(u=e._nodes.get(r),!u)throw new De(`Graph.${t}: could not find the "${r}" node in the graph.`);d=i,p=o}else if(n===HT){if(i=""+i,f=e._edges.get(i),!f)throw new De(`Graph.${t}: could not find the "${i}" edge in the graph.`);const m=f.source.key,v=f.target.key;if(r===m)u=f.target;else if(r===v)u=f.source;else throw new De(`Graph.${t}: the "${r}" node is not attached to the "${i}" edge (${m}, ${v}).`);d=o,p=l}else{if(f=e._edges.get(r),!f)throw new De(`Graph.${t}: could not find the "${r}" edge in the graph.`);n===$T?u=f.source:u=f.target,d=i,p=o}return[u,d,p]}function L3(e,t,n){e.prototype[t]=function(r,i,o){const[l,u]=Ai(this,t,n,r,i,o);return l.attributes[u]}}function z3(e,t,n){e.prototype[t]=function(r,i){const[o]=Ai(this,t,n,r,i);return o.attributes}}function M3(e,t,n){e.prototype[t]=function(r,i,o){const[l,u]=Ai(this,t,n,r,i,o);return l.attributes.hasOwnProperty(u)}}function P3(e,t,n){e.prototype[t]=function(r,i,o,l){const[u,f,d]=Ai(this,t,n,r,i,o,l);return u.attributes[f]=d,this.emit("nodeAttributesUpdated",{key:u.key,type:"set",attributes:u.attributes,name:f}),this}}function F3(e,t,n){e.prototype[t]=function(r,i,o,l){const[u,f,d]=Ai(this,t,n,r,i,o,l);if(typeof d!="function")throw new je(`Graph.${t}: updater should be a function.`);const p=u.attributes,m=d(p[f]);return p[f]=m,this.emit("nodeAttributesUpdated",{key:u.key,type:"set",attributes:u.attributes,name:f}),this}}function I3(e,t,n){e.prototype[t]=function(r,i,o){const[l,u]=Ai(this,t,n,r,i,o);return delete l.attributes[u],this.emit("nodeAttributesUpdated",{key:l.key,type:"remove",attributes:l.attributes,name:u}),this}}function G3(e,t,n){e.prototype[t]=function(r,i,o){const[l,u]=Ai(this,t,n,r,i,o);if(!cn(u))throw new je(`Graph.${t}: provided attributes are not a plain object.`);return l.attributes=u,this.emit("nodeAttributesUpdated",{key:l.key,type:"replace",attributes:l.attributes}),this}}function U3(e,t,n){e.prototype[t]=function(r,i,o){const[l,u]=Ai(this,t,n,r,i,o);if(!cn(u))throw new je(`Graph.${t}: provided attributes are not a plain object.`);return Xt(l.attributes,u),this.emit("nodeAttributesUpdated",{key:l.key,type:"merge",attributes:l.attributes,data:u}),this}}function B3(e,t,n){e.prototype[t]=function(r,i,o){const[l,u]=Ai(this,t,n,r,i,o);if(typeof u!="function")throw new je(`Graph.${t}: provided updater is not a function.`);return l.attributes=u(l.attributes),this.emit("nodeAttributesUpdated",{key:l.key,type:"update",attributes:l.attributes}),this}}const $3=[{name:e=>`get${e}Attribute`,attacher:L3},{name:e=>`get${e}Attributes`,attacher:z3},{name:e=>`has${e}Attribute`,attacher:M3},{name:e=>`set${e}Attribute`,attacher:P3},{name:e=>`update${e}Attribute`,attacher:F3},{name:e=>`remove${e}Attribute`,attacher:I3},{name:e=>`replace${e}Attributes`,attacher:G3},{name:e=>`merge${e}Attributes`,attacher:U3},{name:e=>`update${e}Attributes`,attacher:B3}];function H3(e){$3.forEach(function({name:t,attacher:n}){n(e,t("Node"),BT),n(e,t("Source"),$T),n(e,t("Target"),j3),n(e,t("Opposite"),HT)})}function V3(e,t,n){e.prototype[t]=function(r,i){let o;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new Xe(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new Xe(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const l=""+r,u=""+i;if(i=arguments[2],o=fr(this,l,u,n),!o)throw new De(`Graph.${t}: could not find an edge for the given path ("${l}" - "${u}").`)}else{if(n!=="mixed")throw new Xe(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(r=""+r,o=this._edges.get(r),!o)throw new De(`Graph.${t}: could not find the "${r}" edge in the graph.`)}return o.attributes[i]}}function q3(e,t,n){e.prototype[t]=function(r){let i;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new Xe(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>1){if(this.multi)throw new Xe(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const o=""+r,l=""+arguments[1];if(i=fr(this,o,l,n),!i)throw new De(`Graph.${t}: could not find an edge for the given path ("${o}" - "${l}").`)}else{if(n!=="mixed")throw new Xe(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(r=""+r,i=this._edges.get(r),!i)throw new De(`Graph.${t}: could not find the "${r}" edge in the graph.`)}return i.attributes}}function Y3(e,t,n){e.prototype[t]=function(r,i){let o;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new Xe(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new Xe(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const l=""+r,u=""+i;if(i=arguments[2],o=fr(this,l,u,n),!o)throw new De(`Graph.${t}: could not find an edge for the given path ("${l}" - "${u}").`)}else{if(n!=="mixed")throw new Xe(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(r=""+r,o=this._edges.get(r),!o)throw new De(`Graph.${t}: could not find the "${r}" edge in the graph.`)}return o.attributes.hasOwnProperty(i)}}function W3(e,t,n){e.prototype[t]=function(r,i,o){let l;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new Xe(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>3){if(this.multi)throw new Xe(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const u=""+r,f=""+i;if(i=arguments[2],o=arguments[3],l=fr(this,u,f,n),!l)throw new De(`Graph.${t}: could not find an edge for the given path ("${u}" - "${f}").`)}else{if(n!=="mixed")throw new Xe(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(r=""+r,l=this._edges.get(r),!l)throw new De(`Graph.${t}: could not find the "${r}" edge in the graph.`)}return l.attributes[i]=o,this.emit("edgeAttributesUpdated",{key:l.key,type:"set",attributes:l.attributes,name:i}),this}}function X3(e,t,n){e.prototype[t]=function(r,i,o){let l;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new Xe(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>3){if(this.multi)throw new Xe(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const u=""+r,f=""+i;if(i=arguments[2],o=arguments[3],l=fr(this,u,f,n),!l)throw new De(`Graph.${t}: could not find an edge for the given path ("${u}" - "${f}").`)}else{if(n!=="mixed")throw new Xe(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(r=""+r,l=this._edges.get(r),!l)throw new De(`Graph.${t}: could not find the "${r}" edge in the graph.`)}if(typeof o!="function")throw new je(`Graph.${t}: updater should be a function.`);return l.attributes[i]=o(l.attributes[i]),this.emit("edgeAttributesUpdated",{key:l.key,type:"set",attributes:l.attributes,name:i}),this}}function K3(e,t,n){e.prototype[t]=function(r,i){let o;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new Xe(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new Xe(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const l=""+r,u=""+i;if(i=arguments[2],o=fr(this,l,u,n),!o)throw new De(`Graph.${t}: could not find an edge for the given path ("${l}" - "${u}").`)}else{if(n!=="mixed")throw new Xe(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(r=""+r,o=this._edges.get(r),!o)throw new De(`Graph.${t}: could not find the "${r}" edge in the graph.`)}return delete o.attributes[i],this.emit("edgeAttributesUpdated",{key:o.key,type:"remove",attributes:o.attributes,name:i}),this}}function Z3(e,t,n){e.prototype[t]=function(r,i){let o;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new Xe(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new Xe(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const l=""+r,u=""+i;if(i=arguments[2],o=fr(this,l,u,n),!o)throw new De(`Graph.${t}: could not find an edge for the given path ("${l}" - "${u}").`)}else{if(n!=="mixed")throw new Xe(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(r=""+r,o=this._edges.get(r),!o)throw new De(`Graph.${t}: could not find the "${r}" edge in the graph.`)}if(!cn(i))throw new je(`Graph.${t}: provided attributes are not a plain object.`);return o.attributes=i,this.emit("edgeAttributesUpdated",{key:o.key,type:"replace",attributes:o.attributes}),this}}function Q3(e,t,n){e.prototype[t]=function(r,i){let o;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new Xe(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new Xe(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const l=""+r,u=""+i;if(i=arguments[2],o=fr(this,l,u,n),!o)throw new De(`Graph.${t}: could not find an edge for the given path ("${l}" - "${u}").`)}else{if(n!=="mixed")throw new Xe(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(r=""+r,o=this._edges.get(r),!o)throw new De(`Graph.${t}: could not find the "${r}" edge in the graph.`)}if(!cn(i))throw new je(`Graph.${t}: provided attributes are not a plain object.`);return Xt(o.attributes,i),this.emit("edgeAttributesUpdated",{key:o.key,type:"merge",attributes:o.attributes,data:i}),this}}function J3(e,t,n){e.prototype[t]=function(r,i){let o;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new Xe(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new Xe(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const l=""+r,u=""+i;if(i=arguments[2],o=fr(this,l,u,n),!o)throw new De(`Graph.${t}: could not find an edge for the given path ("${l}" - "${u}").`)}else{if(n!=="mixed")throw new Xe(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(r=""+r,o=this._edges.get(r),!o)throw new De(`Graph.${t}: could not find the "${r}" edge in the graph.`)}if(typeof i!="function")throw new je(`Graph.${t}: provided updater is not a function.`);return o.attributes=i(o.attributes),this.emit("edgeAttributesUpdated",{key:o.key,type:"update",attributes:o.attributes}),this}}const e5=[{name:e=>`get${e}Attribute`,attacher:V3},{name:e=>`get${e}Attributes`,attacher:q3},{name:e=>`has${e}Attribute`,attacher:Y3},{name:e=>`set${e}Attribute`,attacher:W3},{name:e=>`update${e}Attribute`,attacher:X3},{name:e=>`remove${e}Attribute`,attacher:K3},{name:e=>`replace${e}Attributes`,attacher:Z3},{name:e=>`merge${e}Attributes`,attacher:Q3},{name:e=>`update${e}Attributes`,attacher:J3}];function t5(e){e5.forEach(function({name:t,attacher:n}){n(e,t("Edge"),"mixed"),n(e,t("DirectedEdge"),"directed"),n(e,t("UndirectedEdge"),"undirected")})}const n5=[{name:"edges",type:"mixed"},{name:"inEdges",type:"directed",direction:"in"},{name:"outEdges",type:"directed",direction:"out"},{name:"inboundEdges",type:"mixed",direction:"in"},{name:"outboundEdges",type:"mixed",direction:"out"},{name:"directedEdges",type:"directed"},{name:"undirectedEdges",type:"undirected"}];function r5(e,t,n,r){let i=!1;for(const o in t){if(o===r)continue;const l=t[o];if(i=n(l.key,l.attributes,l.source.key,l.target.key,l.source.attributes,l.target.attributes,l.undirected),e&&i)return l.key}}function i5(e,t,n,r){let i,o,l,u=!1;for(const f in t)if(f!==r){i=t[f];do{if(o=i.source,l=i.target,u=n(i.key,i.attributes,o.key,l.key,o.attributes,l.attributes,i.undirected),e&&u)return i.key;i=i.next}while(i!==void 0)}}function om(e,t){const n=Object.keys(e),r=n.length;let i,o=0;return{[Symbol.iterator](){return this},next(){do if(i)i=i.next;else{if(o>=r)return{done:!0};const l=n[o++];if(l===t){i=void 0;continue}i=e[l]}while(!i);return{done:!1,value:{edge:i.key,attributes:i.attributes,source:i.source.key,target:i.target.key,sourceAttributes:i.source.attributes,targetAttributes:i.target.attributes,undirected:i.undirected}}}}}function a5(e,t,n,r){const i=t[n];if(!i)return;const o=i.source,l=i.target;if(r(i.key,i.attributes,o.key,l.key,o.attributes,l.attributes,i.undirected)&&e)return i.key}function o5(e,t,n,r){let i=t[n];if(!i)return;let o=!1;do{if(o=r(i.key,i.attributes,i.source.key,i.target.key,i.source.attributes,i.target.attributes,i.undirected),e&&o)return i.key;i=i.next}while(i!==void 0)}function sm(e,t){let n=e[t];if(n.next!==void 0)return{[Symbol.iterator](){return this},next(){if(!n)return{done:!0};const i={edge:n.key,attributes:n.attributes,source:n.source.key,target:n.target.key,sourceAttributes:n.source.attributes,targetAttributes:n.target.attributes,undirected:n.undirected};return n=n.next,{done:!1,value:i}}};let r=!1;return{[Symbol.iterator](){return this},next(){return r===!0?{done:!0}:(r=!0,{done:!1,value:{edge:n.key,attributes:n.attributes,source:n.source.key,target:n.target.key,sourceAttributes:n.source.attributes,targetAttributes:n.target.attributes,undirected:n.undirected}})}}}function s5(e,t){if(e.size===0)return[];if(t==="mixed"||t===e.type)return Array.from(e._edges.keys());const n=t==="undirected"?e.undirectedSize:e.directedSize,r=new Array(n),i=t==="undirected",o=e._edges.values();let l=0,u,f;for(;u=o.next(),u.done!==!0;)f=u.value,f.undirected===i&&(r[l++]=f.key);return r}function VT(e,t,n,r){if(t.size===0)return;const i=n!=="mixed"&&n!==t.type,o=n==="undirected";let l,u,f=!1;const d=t._edges.values();for(;l=d.next(),l.done!==!0;){if(u=l.value,i&&u.undirected!==o)continue;const{key:p,attributes:m,source:v,target:g}=u;if(f=r(p,m,v.key,g.key,v.attributes,g.attributes,u.undirected),e&&f)return p}}function l5(e,t){if(e.size===0)return Ss();const n=t!=="mixed"&&t!==e.type,r=t==="undirected",i=e._edges.values();return{[Symbol.iterator](){return this},next(){let o,l;for(;;){if(o=i.next(),o.done)return o;if(l=o.value,!(n&&l.undirected!==r))break}return{value:{edge:l.key,attributes:l.attributes,source:l.source.key,target:l.target.key,sourceAttributes:l.source.attributes,targetAttributes:l.target.attributes,undirected:l.undirected},done:!1}}}}function py(e,t,n,r,i,o){const l=t?i5:r5;let u;if(n!=="undirected"&&(r!=="out"&&(u=l(e,i.in,o),e&&u)||r!=="in"&&(u=l(e,i.out,o,r?void 0:i.key),e&&u))||n!=="directed"&&(u=l(e,i.undirected,o),e&&u))return u}function u5(e,t,n,r){const i=[];return py(!1,e,t,n,r,function(o){i.push(o)}),i}function c5(e,t,n){let r=Ss();return e!=="undirected"&&(t!=="out"&&typeof n.in<"u"&&(r=Ei(r,om(n.in))),t!=="in"&&typeof n.out<"u"&&(r=Ei(r,om(n.out,t?void 0:n.key)))),e!=="directed"&&typeof n.undirected<"u"&&(r=Ei(r,om(n.undirected))),r}function my(e,t,n,r,i,o,l){const u=n?o5:a5;let f;if(t!=="undirected"&&(typeof i.in<"u"&&r!=="out"&&(f=u(e,i.in,o,l),e&&f)||typeof i.out<"u"&&r!=="in"&&(r||i.key!==o)&&(f=u(e,i.out,o,l),e&&f))||t!=="directed"&&typeof i.undirected<"u"&&(f=u(e,i.undirected,o,l),e&&f))return f}function f5(e,t,n,r,i){const o=[];return my(!1,e,t,n,r,i,function(l){o.push(l)}),o}function d5(e,t,n,r){let i=Ss();return e!=="undirected"&&(typeof n.in<"u"&&t!=="out"&&r in n.in&&(i=Ei(i,sm(n.in,r))),typeof n.out<"u"&&t!=="in"&&r in n.out&&(t||n.key!==r)&&(i=Ei(i,sm(n.out,r)))),e!=="directed"&&typeof n.undirected<"u"&&r in n.undirected&&(i=Ei(i,sm(n.undirected,r))),i}function h5(e,t){const{name:n,type:r,direction:i}=t;e.prototype[n]=function(o,l){if(r!=="mixed"&&this.type!=="mixed"&&r!==this.type)return[];if(!arguments.length)return s5(this,r);if(arguments.length===1){o=""+o;const u=this._nodes.get(o);if(typeof u>"u")throw new De(`Graph.${n}: could not find the "${o}" node in the graph.`);return u5(this.multi,r==="mixed"?this.type:r,i,u)}if(arguments.length===2){o=""+o,l=""+l;const u=this._nodes.get(o);if(!u)throw new De(`Graph.${n}: could not find the "${o}" source node in the graph.`);if(!this._nodes.has(l))throw new De(`Graph.${n}: could not find the "${l}" target node in the graph.`);return f5(r,this.multi,i,u,l)}throw new je(`Graph.${n}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}function p5(e,t){const{name:n,type:r,direction:i}=t,o="forEach"+n[0].toUpperCase()+n.slice(1,-1);e.prototype[o]=function(d,p,m){if(!(r!=="mixed"&&this.type!=="mixed"&&r!==this.type)){if(arguments.length===1)return m=d,VT(!1,this,r,m);if(arguments.length===2){d=""+d,m=p;const v=this._nodes.get(d);if(typeof v>"u")throw new De(`Graph.${o}: could not find the "${d}" node in the graph.`);return py(!1,this.multi,r==="mixed"?this.type:r,i,v,m)}if(arguments.length===3){d=""+d,p=""+p;const v=this._nodes.get(d);if(!v)throw new De(`Graph.${o}: could not find the "${d}" source node in the graph.`);if(!this._nodes.has(p))throw new De(`Graph.${o}: could not find the "${p}" target node in the graph.`);return my(!1,r,this.multi,i,v,p,m)}throw new je(`Graph.${o}: too many arguments (expecting 1, 2 or 3 and got ${arguments.length}).`)}};const l="map"+n[0].toUpperCase()+n.slice(1);e.prototype[l]=function(){const d=Array.prototype.slice.call(arguments),p=d.pop();let m;if(d.length===0){let v=0;r!=="directed"&&(v+=this.undirectedSize),r!=="undirected"&&(v+=this.directedSize),m=new Array(v);let g=0;d.push((w,x,k,C,_,T,N)=>{m[g++]=p(w,x,k,C,_,T,N)})}else m=[],d.push((v,g,w,x,k,C,_)=>{m.push(p(v,g,w,x,k,C,_))});return this[o].apply(this,d),m};const u="filter"+n[0].toUpperCase()+n.slice(1);e.prototype[u]=function(){const d=Array.prototype.slice.call(arguments),p=d.pop(),m=[];return d.push((v,g,w,x,k,C,_)=>{p(v,g,w,x,k,C,_)&&m.push(v)}),this[o].apply(this,d),m};const f="reduce"+n[0].toUpperCase()+n.slice(1);e.prototype[f]=function(){let d=Array.prototype.slice.call(arguments);if(d.length<2||d.length>4)throw new je(`Graph.${f}: invalid number of arguments (expecting 2, 3 or 4 and got ${d.length}).`);if(typeof d[d.length-1]=="function"&&typeof d[d.length-2]!="function")throw new je(`Graph.${f}: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);let p,m;d.length===2?(p=d[0],m=d[1],d=[]):d.length===3?(p=d[1],m=d[2],d=[d[0]]):d.length===4&&(p=d[2],m=d[3],d=[d[0],d[1]]);let v=m;return d.push((g,w,x,k,C,_,T)=>{v=p(v,g,w,x,k,C,_,T)}),this[o].apply(this,d),v}}function m5(e,t){const{name:n,type:r,direction:i}=t,o="find"+n[0].toUpperCase()+n.slice(1,-1);e.prototype[o]=function(f,d,p){if(r!=="mixed"&&this.type!=="mixed"&&r!==this.type)return!1;if(arguments.length===1)return p=f,VT(!0,this,r,p);if(arguments.length===2){f=""+f,p=d;const m=this._nodes.get(f);if(typeof m>"u")throw new De(`Graph.${o}: could not find the "${f}" node in the graph.`);return py(!0,this.multi,r==="mixed"?this.type:r,i,m,p)}if(arguments.length===3){f=""+f,d=""+d;const m=this._nodes.get(f);if(!m)throw new De(`Graph.${o}: could not find the "${f}" source node in the graph.`);if(!this._nodes.has(d))throw new De(`Graph.${o}: could not find the "${d}" target node in the graph.`);return my(!0,r,this.multi,i,m,d,p)}throw new je(`Graph.${o}: too many arguments (expecting 1, 2 or 3 and got ${arguments.length}).`)};const l="some"+n[0].toUpperCase()+n.slice(1,-1);e.prototype[l]=function(){const f=Array.prototype.slice.call(arguments),d=f.pop();return f.push((m,v,g,w,x,k,C)=>d(m,v,g,w,x,k,C)),!!this[o].apply(this,f)};const u="every"+n[0].toUpperCase()+n.slice(1,-1);e.prototype[u]=function(){const f=Array.prototype.slice.call(arguments),d=f.pop();return f.push((m,v,g,w,x,k,C)=>!d(m,v,g,w,x,k,C)),!this[o].apply(this,f)}}function g5(e,t){const{name:n,type:r,direction:i}=t,o=n.slice(0,-1)+"Entries";e.prototype[o]=function(l,u){if(r!=="mixed"&&this.type!=="mixed"&&r!==this.type)return Ss();if(!arguments.length)return l5(this,r);if(arguments.length===1){l=""+l;const f=this._nodes.get(l);if(!f)throw new De(`Graph.${o}: could not find the "${l}" node in the graph.`);return c5(r,i,f)}if(arguments.length===2){l=""+l,u=""+u;const f=this._nodes.get(l);if(!f)throw new De(`Graph.${o}: could not find the "${l}" source node in the graph.`);if(!this._nodes.has(u))throw new De(`Graph.${o}: could not find the "${u}" target node in the graph.`);return d5(r,i,f,u)}throw new je(`Graph.${o}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}function v5(e){n5.forEach(t=>{h5(e,t),p5(e,t),m5(e,t),g5(e,t)})}const y5=[{name:"neighbors",type:"mixed"},{name:"inNeighbors",type:"directed",direction:"in"},{name:"outNeighbors",type:"directed",direction:"out"},{name:"inboundNeighbors",type:"mixed",direction:"in"},{name:"outboundNeighbors",type:"mixed",direction:"out"},{name:"directedNeighbors",type:"directed"},{name:"undirectedNeighbors",type:"undirected"}];function gd(){this.A=null,this.B=null}gd.prototype.wrap=function(e){this.A===null?this.A=e:this.B===null&&(this.B=e)};gd.prototype.has=function(e){return this.A!==null&&e in this.A||this.B!==null&&e in this.B};function Tl(e,t,n,r,i){for(const o in r){const l=r[o],u=l.source,f=l.target,d=u===n?f:u;if(t&&t.has(d.key))continue;const p=i(d.key,d.attributes);if(e&&p)return d.key}}function gy(e,t,n,r,i){if(t!=="mixed"){if(t==="undirected")return Tl(e,null,r,r.undirected,i);if(typeof n=="string")return Tl(e,null,r,r[n],i)}const o=new gd;let l;if(t!=="undirected"){if(n!=="out"){if(l=Tl(e,null,r,r.in,i),e&&l)return l;o.wrap(r.in)}if(n!=="in"){if(l=Tl(e,o,r,r.out,i),e&&l)return l;o.wrap(r.out)}}if(t!=="directed"&&(l=Tl(e,o,r,r.undirected,i),e&&l))return l}function b5(e,t,n){if(e!=="mixed"){if(e==="undirected")return Object.keys(n.undirected);if(typeof t=="string")return Object.keys(n[t])}const r=[];return gy(!1,e,t,n,function(i){r.push(i)}),r}function Al(e,t,n){const r=Object.keys(n),i=r.length;let o=0;return{[Symbol.iterator](){return this},next(){let l=null;do{if(o>=i)return e&&e.wrap(n),{done:!0};const u=n[r[o++]],f=u.source,d=u.target;if(l=f===t?d:f,e&&e.has(l.key)){l=null;continue}}while(l===null);return{done:!1,value:{neighbor:l.key,attributes:l.attributes}}}}}function x5(e,t,n){if(e!=="mixed"){if(e==="undirected")return Al(null,n,n.undirected);if(typeof t=="string")return Al(null,n,n[t])}let r=Ss();const i=new gd;return e!=="undirected"&&(t!=="out"&&(r=Ei(r,Al(i,n,n.in))),t!=="in"&&(r=Ei(r,Al(i,n,n.out)))),e!=="directed"&&(r=Ei(r,Al(i,n,n.undirected))),r}function w5(e,t){const{name:n,type:r,direction:i}=t;e.prototype[n]=function(o){if(r!=="mixed"&&this.type!=="mixed"&&r!==this.type)return[];o=""+o;const l=this._nodes.get(o);if(typeof l>"u")throw new De(`Graph.${n}: could not find the "${o}" node in the graph.`);return b5(r==="mixed"?this.type:r,i,l)}}function S5(e,t){const{name:n,type:r,direction:i}=t,o="forEach"+n[0].toUpperCase()+n.slice(1,-1);e.prototype[o]=function(d,p){if(r!=="mixed"&&this.type!=="mixed"&&r!==this.type)return;d=""+d;const m=this._nodes.get(d);if(typeof m>"u")throw new De(`Graph.${o}: could not find the "${d}" node in the graph.`);gy(!1,r==="mixed"?this.type:r,i,m,p)};const l="map"+n[0].toUpperCase()+n.slice(1);e.prototype[l]=function(d,p){const m=[];return this[o](d,(v,g)=>{m.push(p(v,g))}),m};const u="filter"+n[0].toUpperCase()+n.slice(1);e.prototype[u]=function(d,p){const m=[];return this[o](d,(v,g)=>{p(v,g)&&m.push(v)}),m};const f="reduce"+n[0].toUpperCase()+n.slice(1);e.prototype[f]=function(d,p,m){if(arguments.length<3)throw new je(`Graph.${f}: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);let v=m;return this[o](d,(g,w)=>{v=p(v,g,w)}),v}}function E5(e,t){const{name:n,type:r,direction:i}=t,o=n[0].toUpperCase()+n.slice(1,-1),l="find"+o;e.prototype[l]=function(d,p){if(r!=="mixed"&&this.type!=="mixed"&&r!==this.type)return;d=""+d;const m=this._nodes.get(d);if(typeof m>"u")throw new De(`Graph.${l}: could not find the "${d}" node in the graph.`);return gy(!0,r==="mixed"?this.type:r,i,m,p)};const u="some"+o;e.prototype[u]=function(d,p){return!!this[l](d,p)};const f="every"+o;e.prototype[f]=function(d,p){return!this[l](d,(v,g)=>!p(v,g))}}function _5(e,t){const{name:n,type:r,direction:i}=t,o=n.slice(0,-1)+"Entries";e.prototype[o]=function(l){if(r!=="mixed"&&this.type!=="mixed"&&r!==this.type)return Ss();l=""+l;const u=this._nodes.get(l);if(typeof u>"u")throw new De(`Graph.${o}: could not find the "${l}" node in the graph.`);return x5(r==="mixed"?this.type:r,i,u)}}function k5(e){y5.forEach(t=>{w5(e,t),S5(e,t),E5(e,t),_5(e,t)})}function Fc(e,t,n,r,i){const o=r._nodes.values(),l=r.type;let u,f,d,p,m,v;for(;u=o.next(),u.done!==!0;){let g=!1;if(f=u.value,l!=="undirected"){p=f.out;for(d in p){m=p[d];do v=m.target,g=!0,i(f.key,v.key,f.attributes,v.attributes,m.key,m.attributes,m.undirected),m=m.next;while(m)}}if(l!=="directed"){p=f.undirected;for(d in p)if(!(t&&f.key>d)){m=p[d];do v=m.target,v.key!==d&&(v=m.source),g=!0,i(f.key,v.key,f.attributes,v.attributes,m.key,m.attributes,m.undirected),m=m.next;while(m)}}n&&!g&&i(f.key,null,f.attributes,null,null,null,null)}}function C5(e,t){const n={key:e};return FT(t.attributes)||(n.attributes=Xt({},t.attributes)),n}function T5(e,t,n){const r={key:t,source:n.source.key,target:n.target.key};return FT(n.attributes)||(r.attributes=Xt({},n.attributes)),e==="mixed"&&n.undirected&&(r.undirected=!0),r}function A5(e){if(!cn(e))throw new je('Graph.import: invalid serialized node. A serialized node should be a plain object with at least a "key" property.');if(!("key"in e))throw new je("Graph.import: serialized node is missing its key.");if("attributes"in e&&(!cn(e.attributes)||e.attributes===null))throw new je("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.")}function R5(e){if(!cn(e))throw new je('Graph.import: invalid serialized edge. A serialized edge should be a plain object with at least a "source" & "target" property.');if(!("source"in e))throw new je("Graph.import: serialized edge is missing its source.");if(!("target"in e))throw new je("Graph.import: serialized edge is missing its target.");if("attributes"in e&&(!cn(e.attributes)||e.attributes===null))throw new je("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.");if("undirected"in e&&typeof e.undirected!="boolean")throw new je("Graph.import: invalid undirectedness information. Undirected should be boolean or omitted.")}const D5=O3(),N5=new Set(["directed","undirected","mixed"]),$1=new Set(["domain","_events","_eventsCount","_maxListeners"]),O5=[{name:e=>`${e}Edge`,generateKey:!0},{name:e=>`${e}DirectedEdge`,generateKey:!0,type:"directed"},{name:e=>`${e}UndirectedEdge`,generateKey:!0,type:"undirected"},{name:e=>`${e}EdgeWithKey`},{name:e=>`${e}DirectedEdgeWithKey`,type:"directed"},{name:e=>`${e}UndirectedEdgeWithKey`,type:"undirected"}],j5={allowSelfLoops:!0,multi:!1,type:"mixed"};function L5(e,t,n){if(n&&!cn(n))throw new je(`Graph.addNode: invalid attributes. Expecting an object but got "${n}"`);if(t=""+t,n=n||{},e._nodes.has(t))throw new Xe(`Graph.addNode: the "${t}" node already exist in the graph.`);const r=new e.NodeDataClass(t,n);return e._nodes.set(t,r),e.emit("nodeAdded",{key:t,attributes:n}),r}function H1(e,t,n){const r=new e.NodeDataClass(t,n);return e._nodes.set(t,r),e.emit("nodeAdded",{key:t,attributes:n}),r}function qT(e,t,n,r,i,o,l,u){if(!r&&e.type==="undirected")throw new Xe(`Graph.${t}: you cannot add a directed edge to an undirected graph. Use the #.addEdge or #.addUndirectedEdge instead.`);if(r&&e.type==="directed")throw new Xe(`Graph.${t}: you cannot add an undirected edge to a directed graph. Use the #.addEdge or #.addDirectedEdge instead.`);if(u&&!cn(u))throw new je(`Graph.${t}: invalid attributes. Expecting an object but got "${u}"`);if(o=""+o,l=""+l,u=u||{},!e.allowSelfLoops&&o===l)throw new Xe(`Graph.${t}: source & target are the same ("${o}"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`);const f=e._nodes.get(o),d=e._nodes.get(l);if(!f)throw new De(`Graph.${t}: source node "${o}" not found.`);if(!d)throw new De(`Graph.${t}: target node "${l}" not found.`);const p={key:null,undirected:r,source:o,target:l,attributes:u};if(n)i=e._edgeKeyGenerator();else if(i=""+i,e._edges.has(i))throw new Xe(`Graph.${t}: the "${i}" edge already exists in the graph.`);if(!e.multi&&(r?typeof f.undirected[l]<"u":typeof f.out[l]<"u"))throw new Xe(`Graph.${t}: an edge linking "${o}" to "${l}" already exists. If you really want to add multiple edges linking those nodes, you should create a multi graph by using the 'multi' option.`);const m=new Es(r,i,f,d,u);e._edges.set(i,m);const v=o===l;return r?(f.undirectedDegree++,d.undirectedDegree++,v&&(f.undirectedLoops++,e._undirectedSelfLoopCount++)):(f.outDegree++,d.inDegree++,v&&(f.directedLoops++,e._directedSelfLoopCount++)),e.multi?m.attachMulti():m.attach(),r?e._undirectedSize++:e._directedSize++,p.key=i,e.emit("edgeAdded",p),i}function z5(e,t,n,r,i,o,l,u,f){if(!r&&e.type==="undirected")throw new Xe(`Graph.${t}: you cannot merge/update a directed edge to an undirected graph. Use the #.mergeEdge/#.updateEdge or #.addUndirectedEdge instead.`);if(r&&e.type==="directed")throw new Xe(`Graph.${t}: you cannot merge/update an undirected edge to a directed graph. Use the #.mergeEdge/#.updateEdge or #.addDirectedEdge instead.`);if(u){if(f){if(typeof u!="function")throw new je(`Graph.${t}: invalid updater function. Expecting a function but got "${u}"`)}else if(!cn(u))throw new je(`Graph.${t}: invalid attributes. Expecting an object but got "${u}"`)}o=""+o,l=""+l;let d;if(f&&(d=u,u=void 0),!e.allowSelfLoops&&o===l)throw new Xe(`Graph.${t}: source & target are the same ("${o}"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`);let p=e._nodes.get(o),m=e._nodes.get(l),v,g;if(!n&&(v=e._edges.get(i),v)){if((v.source.key!==o||v.target.key!==l)&&(!r||v.source.key!==l||v.target.key!==o))throw new Xe(`Graph.${t}: inconsistency detected when attempting to merge the "${i}" edge with "${o}" source & "${l}" target vs. ("${v.source.key}", "${v.target.key}").`);g=v}if(!g&&!e.multi&&p&&(g=r?p.undirected[l]:p.out[l]),g){const _=[g.key,!1,!1,!1];if(f?!d:!u)return _;if(f){const T=g.attributes;g.attributes=d(T),e.emit("edgeAttributesUpdated",{type:"replace",key:g.key,attributes:g.attributes})}else Xt(g.attributes,u),e.emit("edgeAttributesUpdated",{type:"merge",key:g.key,attributes:g.attributes,data:u});return _}u=u||{},f&&d&&(u=d(u));const w={key:null,undirected:r,source:o,target:l,attributes:u};if(n)i=e._edgeKeyGenerator();else if(i=""+i,e._edges.has(i))throw new Xe(`Graph.${t}: the "${i}" edge already exists in the graph.`);let x=!1,k=!1;p||(p=H1(e,o,{}),x=!0,o===l&&(m=p,k=!0)),m||(m=H1(e,l,{}),k=!0),v=new Es(r,i,p,m,u),e._edges.set(i,v);const C=o===l;return r?(p.undirectedDegree++,m.undirectedDegree++,C&&(p.undirectedLoops++,e._undirectedSelfLoopCount++)):(p.outDegree++,m.inDegree++,C&&(p.directedLoops++,e._directedSelfLoopCount++)),e.multi?v.attachMulti():v.attach(),r?e._undirectedSize++:e._directedSize++,w.key=i,e.emit("edgeAdded",w),[i,!0,x,k]}function Yo(e,t){e._edges.delete(t.key);const{source:n,target:r,attributes:i}=t,o=t.undirected,l=n===r;o?(n.undirectedDegree--,r.undirectedDegree--,l&&(n.undirectedLoops--,e._undirectedSelfLoopCount--)):(n.outDegree--,r.inDegree--,l&&(n.directedLoops--,e._directedSelfLoopCount--)),e.multi?t.detachMulti():t.detach(),o?e._undirectedSize--:e._directedSize--,e.emit("edgeDropped",{key:t.key,attributes:i,source:n.key,target:r.key,undirected:o})}class St extends PT.EventEmitter{constructor(t){if(super(),t=Xt({},j5,t),typeof t.multi!="boolean")throw new je(`Graph.constructor: invalid 'multi' option. Expecting a boolean but got "${t.multi}".`);if(!N5.has(t.type))throw new je(`Graph.constructor: invalid 'type' option. Should be one of "mixed", "directed" or "undirected" but got "${t.type}".`);if(typeof t.allowSelfLoops!="boolean")throw new je(`Graph.constructor: invalid 'allowSelfLoops' option. Expecting a boolean but got "${t.allowSelfLoops}".`);const n=t.type==="mixed"?IT:t.type==="directed"?GT:UT;ur(this,"NodeDataClass",n);const r="geid_"+D5()+"_";let i=0;const o=()=>{let l;do l=r+i++;while(this._edges.has(l));return l};ur(this,"_attributes",{}),ur(this,"_nodes",new Map),ur(this,"_edges",new Map),ur(this,"_directedSize",0),ur(this,"_undirectedSize",0),ur(this,"_directedSelfLoopCount",0),ur(this,"_undirectedSelfLoopCount",0),ur(this,"_edgeKeyGenerator",o),ur(this,"_options",t),$1.forEach(l=>ur(this,l,this[l])),Sr(this,"order",()=>this._nodes.size),Sr(this,"size",()=>this._edges.size),Sr(this,"directedSize",()=>this._directedSize),Sr(this,"undirectedSize",()=>this._undirectedSize),Sr(this,"selfLoopCount",()=>this._directedSelfLoopCount+this._undirectedSelfLoopCount),Sr(this,"directedSelfLoopCount",()=>this._directedSelfLoopCount),Sr(this,"undirectedSelfLoopCount",()=>this._undirectedSelfLoopCount),Sr(this,"multi",this._options.multi),Sr(this,"type",this._options.type),Sr(this,"allowSelfLoops",this._options.allowSelfLoops),Sr(this,"implementation",()=>"graphology")}_resetInstanceCounters(){this._directedSize=0,this._undirectedSize=0,this._directedSelfLoopCount=0,this._undirectedSelfLoopCount=0}hasNode(t){return this._nodes.has(""+t)}hasDirectedEdge(t,n){if(this.type==="undirected")return!1;if(arguments.length===1){const r=""+t,i=this._edges.get(r);return!!i&&!i.undirected}else if(arguments.length===2){t=""+t,n=""+n;const r=this._nodes.get(t);return r?r.out.hasOwnProperty(n):!1}throw new je(`Graph.hasDirectedEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}hasUndirectedEdge(t,n){if(this.type==="directed")return!1;if(arguments.length===1){const r=""+t,i=this._edges.get(r);return!!i&&i.undirected}else if(arguments.length===2){t=""+t,n=""+n;const r=this._nodes.get(t);return r?r.undirected.hasOwnProperty(n):!1}throw new je(`Graph.hasDirectedEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}hasEdge(t,n){if(arguments.length===1){const r=""+t;return this._edges.has(r)}else if(arguments.length===2){t=""+t,n=""+n;const r=this._nodes.get(t);return r?typeof r.out<"u"&&r.out.hasOwnProperty(n)||typeof r.undirected<"u"&&r.undirected.hasOwnProperty(n):!1}throw new je(`Graph.hasEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}directedEdge(t,n){if(this.type==="undirected")return;if(t=""+t,n=""+n,this.multi)throw new Xe("Graph.directedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.directedEdges instead.");const r=this._nodes.get(t);if(!r)throw new De(`Graph.directedEdge: could not find the "${t}" source node in the graph.`);if(!this._nodes.has(n))throw new De(`Graph.directedEdge: could not find the "${n}" target node in the graph.`);const i=r.out&&r.out[n]||void 0;if(i)return i.key}undirectedEdge(t,n){if(this.type==="directed")return;if(t=""+t,n=""+n,this.multi)throw new Xe("Graph.undirectedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.undirectedEdges instead.");const r=this._nodes.get(t);if(!r)throw new De(`Graph.undirectedEdge: could not find the "${t}" source node in the graph.`);if(!this._nodes.has(n))throw new De(`Graph.undirectedEdge: could not find the "${n}" target node in the graph.`);const i=r.undirected&&r.undirected[n]||void 0;if(i)return i.key}edge(t,n){if(this.multi)throw new Xe("Graph.edge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.edges instead.");t=""+t,n=""+n;const r=this._nodes.get(t);if(!r)throw new De(`Graph.edge: could not find the "${t}" source node in the graph.`);if(!this._nodes.has(n))throw new De(`Graph.edge: could not find the "${n}" target node in the graph.`);const i=r.out&&r.out[n]||r.undirected&&r.undirected[n]||void 0;if(i)return i.key}areDirectedNeighbors(t,n){t=""+t,n=""+n;const r=this._nodes.get(t);if(!r)throw new De(`Graph.areDirectedNeighbors: could not find the "${t}" node in the graph.`);return this.type==="undirected"?!1:n in r.in||n in r.out}areOutNeighbors(t,n){t=""+t,n=""+n;const r=this._nodes.get(t);if(!r)throw new De(`Graph.areOutNeighbors: could not find the "${t}" node in the graph.`);return this.type==="undirected"?!1:n in r.out}areInNeighbors(t,n){t=""+t,n=""+n;const r=this._nodes.get(t);if(!r)throw new De(`Graph.areInNeighbors: could not find the "${t}" node in the graph.`);return this.type==="undirected"?!1:n in r.in}areUndirectedNeighbors(t,n){t=""+t,n=""+n;const r=this._nodes.get(t);if(!r)throw new De(`Graph.areUndirectedNeighbors: could not find the "${t}" node in the graph.`);return this.type==="directed"?!1:n in r.undirected}areNeighbors(t,n){t=""+t,n=""+n;const r=this._nodes.get(t);if(!r)throw new De(`Graph.areNeighbors: could not find the "${t}" node in the graph.`);return this.type!=="undirected"&&(n in r.in||n in r.out)||this.type!=="directed"&&n in r.undirected}areInboundNeighbors(t,n){t=""+t,n=""+n;const r=this._nodes.get(t);if(!r)throw new De(`Graph.areInboundNeighbors: could not find the "${t}" node in the graph.`);return this.type!=="undirected"&&n in r.in||this.type!=="directed"&&n in r.undirected}areOutboundNeighbors(t,n){t=""+t,n=""+n;const r=this._nodes.get(t);if(!r)throw new De(`Graph.areOutboundNeighbors: could not find the "${t}" node in the graph.`);return this.type!=="undirected"&&n in r.out||this.type!=="directed"&&n in r.undirected}inDegree(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new De(`Graph.inDegree: could not find the "${t}" node in the graph.`);return this.type==="undirected"?0:n.inDegree}outDegree(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new De(`Graph.outDegree: could not find the "${t}" node in the graph.`);return this.type==="undirected"?0:n.outDegree}directedDegree(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new De(`Graph.directedDegree: could not find the "${t}" node in the graph.`);return this.type==="undirected"?0:n.inDegree+n.outDegree}undirectedDegree(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new De(`Graph.undirectedDegree: could not find the "${t}" node in the graph.`);return this.type==="directed"?0:n.undirectedDegree}inboundDegree(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new De(`Graph.inboundDegree: could not find the "${t}" node in the graph.`);let r=0;return this.type!=="directed"&&(r+=n.undirectedDegree),this.type!=="undirected"&&(r+=n.inDegree),r}outboundDegree(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new De(`Graph.outboundDegree: could not find the "${t}" node in the graph.`);let r=0;return this.type!=="directed"&&(r+=n.undirectedDegree),this.type!=="undirected"&&(r+=n.outDegree),r}degree(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new De(`Graph.degree: could not find the "${t}" node in the graph.`);let r=0;return this.type!=="directed"&&(r+=n.undirectedDegree),this.type!=="undirected"&&(r+=n.inDegree+n.outDegree),r}inDegreeWithoutSelfLoops(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new De(`Graph.inDegreeWithoutSelfLoops: could not find the "${t}" node in the graph.`);return this.type==="undirected"?0:n.inDegree-n.directedLoops}outDegreeWithoutSelfLoops(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new De(`Graph.outDegreeWithoutSelfLoops: could not find the "${t}" node in the graph.`);return this.type==="undirected"?0:n.outDegree-n.directedLoops}directedDegreeWithoutSelfLoops(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new De(`Graph.directedDegreeWithoutSelfLoops: could not find the "${t}" node in the graph.`);return this.type==="undirected"?0:n.inDegree+n.outDegree-n.directedLoops*2}undirectedDegreeWithoutSelfLoops(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new De(`Graph.undirectedDegreeWithoutSelfLoops: could not find the "${t}" node in the graph.`);return this.type==="directed"?0:n.undirectedDegree-n.undirectedLoops*2}inboundDegreeWithoutSelfLoops(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new De(`Graph.inboundDegreeWithoutSelfLoops: could not find the "${t}" node in the graph.`);let r=0,i=0;return this.type!=="directed"&&(r+=n.undirectedDegree,i+=n.undirectedLoops*2),this.type!=="undirected"&&(r+=n.inDegree,i+=n.directedLoops),r-i}outboundDegreeWithoutSelfLoops(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new De(`Graph.outboundDegreeWithoutSelfLoops: could not find the "${t}" node in the graph.`);let r=0,i=0;return this.type!=="directed"&&(r+=n.undirectedDegree,i+=n.undirectedLoops*2),this.type!=="undirected"&&(r+=n.outDegree,i+=n.directedLoops),r-i}degreeWithoutSelfLoops(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new De(`Graph.degreeWithoutSelfLoops: could not find the "${t}" node in the graph.`);let r=0,i=0;return this.type!=="directed"&&(r+=n.undirectedDegree,i+=n.undirectedLoops*2),this.type!=="undirected"&&(r+=n.inDegree+n.outDegree,i+=n.directedLoops*2),r-i}source(t){t=""+t;const n=this._edges.get(t);if(!n)throw new De(`Graph.source: could not find the "${t}" edge in the graph.`);return n.source.key}target(t){t=""+t;const n=this._edges.get(t);if(!n)throw new De(`Graph.target: could not find the "${t}" edge in the graph.`);return n.target.key}extremities(t){t=""+t;const n=this._edges.get(t);if(!n)throw new De(`Graph.extremities: could not find the "${t}" edge in the graph.`);return[n.source.key,n.target.key]}opposite(t,n){t=""+t,n=""+n;const r=this._edges.get(n);if(!r)throw new De(`Graph.opposite: could not find the "${n}" edge in the graph.`);const i=r.source.key,o=r.target.key;if(t===i)return o;if(t===o)return i;throw new De(`Graph.opposite: the "${t}" node is not attached to the "${n}" edge (${i}, ${o}).`)}hasExtremity(t,n){t=""+t,n=""+n;const r=this._edges.get(t);if(!r)throw new De(`Graph.hasExtremity: could not find the "${t}" edge in the graph.`);return r.source.key===n||r.target.key===n}isUndirected(t){t=""+t;const n=this._edges.get(t);if(!n)throw new De(`Graph.isUndirected: could not find the "${t}" edge in the graph.`);return n.undirected}isDirected(t){t=""+t;const n=this._edges.get(t);if(!n)throw new De(`Graph.isDirected: could not find the "${t}" edge in the graph.`);return!n.undirected}isSelfLoop(t){t=""+t;const n=this._edges.get(t);if(!n)throw new De(`Graph.isSelfLoop: could not find the "${t}" edge in the graph.`);return n.source===n.target}addNode(t,n){return L5(this,t,n).key}mergeNode(t,n){if(n&&!cn(n))throw new je(`Graph.mergeNode: invalid attributes. Expecting an object but got "${n}"`);t=""+t,n=n||{};let r=this._nodes.get(t);return r?(n&&(Xt(r.attributes,n),this.emit("nodeAttributesUpdated",{type:"merge",key:t,attributes:r.attributes,data:n})),[t,!1]):(r=new this.NodeDataClass(t,n),this._nodes.set(t,r),this.emit("nodeAdded",{key:t,attributes:n}),[t,!0])}updateNode(t,n){if(n&&typeof n!="function")throw new je(`Graph.updateNode: invalid updater function. Expecting a function but got "${n}"`);t=""+t;let r=this._nodes.get(t);if(r){if(n){const o=r.attributes;r.attributes=n(o),this.emit("nodeAttributesUpdated",{type:"replace",key:t,attributes:r.attributes})}return[t,!1]}const i=n?n({}):{};return r=new this.NodeDataClass(t,i),this._nodes.set(t,r),this.emit("nodeAdded",{key:t,attributes:i}),[t,!0]}dropNode(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new De(`Graph.dropNode: could not find the "${t}" node in the graph.`);let r;if(this.type!=="undirected"){for(const i in n.out){r=n.out[i];do Yo(this,r),r=r.next;while(r)}for(const i in n.in){r=n.in[i];do Yo(this,r),r=r.next;while(r)}}if(this.type!=="directed")for(const i in n.undirected){r=n.undirected[i];do Yo(this,r),r=r.next;while(r)}this._nodes.delete(t),this.emit("nodeDropped",{key:t,attributes:n.attributes})}dropEdge(t){let n;if(arguments.length>1){const r=""+arguments[0],i=""+arguments[1];if(n=fr(this,r,i,this.type),!n)throw new De(`Graph.dropEdge: could not find the "${r}" -> "${i}" edge in the graph.`)}else if(t=""+t,n=this._edges.get(t),!n)throw new De(`Graph.dropEdge: could not find the "${t}" edge in the graph.`);return Yo(this,n),this}dropDirectedEdge(t,n){if(arguments.length<2)throw new Xe("Graph.dropDirectedEdge: it does not make sense to try and drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new Xe("Graph.dropDirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");t=""+t,n=""+n;const r=fr(this,t,n,"directed");if(!r)throw new De(`Graph.dropDirectedEdge: could not find a "${t}" -> "${n}" edge in the graph.`);return Yo(this,r),this}dropUndirectedEdge(t,n){if(arguments.length<2)throw new Xe("Graph.dropUndirectedEdge: it does not make sense to drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new Xe("Graph.dropUndirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");const r=fr(this,t,n,"undirected");if(!r)throw new De(`Graph.dropUndirectedEdge: could not find a "${t}" -> "${n}" edge in the graph.`);return Yo(this,r),this}clear(){this._edges.clear(),this._nodes.clear(),this._resetInstanceCounters(),this.emit("cleared")}clearEdges(){const t=this._nodes.values();let n;for(;n=t.next(),n.done!==!0;)n.value.clear();this._edges.clear(),this._resetInstanceCounters(),this.emit("edgesCleared")}getAttribute(t){return this._attributes[t]}getAttributes(){return this._attributes}hasAttribute(t){return this._attributes.hasOwnProperty(t)}setAttribute(t,n){return this._attributes[t]=n,this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:t}),this}updateAttribute(t,n){if(typeof n!="function")throw new je("Graph.updateAttribute: updater should be a function.");const r=this._attributes[t];return this._attributes[t]=n(r),this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:t}),this}removeAttribute(t){return delete this._attributes[t],this.emit("attributesUpdated",{type:"remove",attributes:this._attributes,name:t}),this}replaceAttributes(t){if(!cn(t))throw new je("Graph.replaceAttributes: provided attributes are not a plain object.");return this._attributes=t,this.emit("attributesUpdated",{type:"replace",attributes:this._attributes}),this}mergeAttributes(t){if(!cn(t))throw new je("Graph.mergeAttributes: provided attributes are not a plain object.");return Xt(this._attributes,t),this.emit("attributesUpdated",{type:"merge",attributes:this._attributes,data:t}),this}updateAttributes(t){if(typeof t!="function")throw new je("Graph.updateAttributes: provided updater is not a function.");return this._attributes=t(this._attributes),this.emit("attributesUpdated",{type:"update",attributes:this._attributes}),this}updateEachNodeAttributes(t,n){if(typeof t!="function")throw new je("Graph.updateEachNodeAttributes: expecting an updater function.");if(n&&!B1(n))throw new je("Graph.updateEachNodeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");const r=this._nodes.values();let i,o;for(;i=r.next(),i.done!==!0;)o=i.value,o.attributes=t(o.key,o.attributes);this.emit("eachNodeAttributesUpdated",{hints:n||null})}updateEachEdgeAttributes(t,n){if(typeof t!="function")throw new je("Graph.updateEachEdgeAttributes: expecting an updater function.");if(n&&!B1(n))throw new je("Graph.updateEachEdgeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");const r=this._edges.values();let i,o,l,u;for(;i=r.next(),i.done!==!0;)o=i.value,l=o.source,u=o.target,o.attributes=t(o.key,o.attributes,l.key,u.key,l.attributes,u.attributes,o.undirected);this.emit("eachEdgeAttributesUpdated",{hints:n||null})}forEachAdjacencyEntry(t){if(typeof t!="function")throw new je("Graph.forEachAdjacencyEntry: expecting a callback.");Fc(!1,!1,!1,this,t)}forEachAdjacencyEntryWithOrphans(t){if(typeof t!="function")throw new je("Graph.forEachAdjacencyEntryWithOrphans: expecting a callback.");Fc(!1,!1,!0,this,t)}forEachAssymetricAdjacencyEntry(t){if(typeof t!="function")throw new je("Graph.forEachAssymetricAdjacencyEntry: expecting a callback.");Fc(!1,!0,!1,this,t)}forEachAssymetricAdjacencyEntryWithOrphans(t){if(typeof t!="function")throw new je("Graph.forEachAssymetricAdjacencyEntryWithOrphans: expecting a callback.");Fc(!1,!0,!0,this,t)}nodes(){return Array.from(this._nodes.keys())}forEachNode(t){if(typeof t!="function")throw new je("Graph.forEachNode: expecting a callback.");const n=this._nodes.values();let r,i;for(;r=n.next(),r.done!==!0;)i=r.value,t(i.key,i.attributes)}findNode(t){if(typeof t!="function")throw new je("Graph.findNode: expecting a callback.");const n=this._nodes.values();let r,i;for(;r=n.next(),r.done!==!0;)if(i=r.value,t(i.key,i.attributes))return i.key}mapNodes(t){if(typeof t!="function")throw new je("Graph.mapNode: expecting a callback.");const n=this._nodes.values();let r,i;const o=new Array(this.order);let l=0;for(;r=n.next(),r.done!==!0;)i=r.value,o[l++]=t(i.key,i.attributes);return o}someNode(t){if(typeof t!="function")throw new je("Graph.someNode: expecting a callback.");const n=this._nodes.values();let r,i;for(;r=n.next(),r.done!==!0;)if(i=r.value,t(i.key,i.attributes))return!0;return!1}everyNode(t){if(typeof t!="function")throw new je("Graph.everyNode: expecting a callback.");const n=this._nodes.values();let r,i;for(;r=n.next(),r.done!==!0;)if(i=r.value,!t(i.key,i.attributes))return!1;return!0}filterNodes(t){if(typeof t!="function")throw new je("Graph.filterNodes: expecting a callback.");const n=this._nodes.values();let r,i;const o=[];for(;r=n.next(),r.done!==!0;)i=r.value,t(i.key,i.attributes)&&o.push(i.key);return o}reduceNodes(t,n){if(typeof t!="function")throw new je("Graph.reduceNodes: expecting a callback.");if(arguments.length<2)throw new je("Graph.reduceNodes: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.");let r=n;const i=this._nodes.values();let o,l;for(;o=i.next(),o.done!==!0;)l=o.value,r=t(r,l.key,l.attributes);return r}nodeEntries(){const t=this._nodes.values();return{[Symbol.iterator](){return this},next(){const n=t.next();if(n.done)return n;const r=n.value;return{value:{node:r.key,attributes:r.attributes},done:!1}}}}export(){const t=new Array(this._nodes.size);let n=0;this._nodes.forEach((i,o)=>{t[n++]=C5(o,i)});const r=new Array(this._edges.size);return n=0,this._edges.forEach((i,o)=>{r[n++]=T5(this.type,o,i)}),{options:{type:this.type,multi:this.multi,allowSelfLoops:this.allowSelfLoops},attributes:this.getAttributes(),nodes:t,edges:r}}import(t,n=!1){if(t instanceof St)return t.forEachNode((f,d)=>{n?this.mergeNode(f,d):this.addNode(f,d)}),t.forEachEdge((f,d,p,m,v,g,w)=>{n?w?this.mergeUndirectedEdgeWithKey(f,p,m,d):this.mergeDirectedEdgeWithKey(f,p,m,d):w?this.addUndirectedEdgeWithKey(f,p,m,d):this.addDirectedEdgeWithKey(f,p,m,d)}),this;if(!cn(t))throw new je("Graph.import: invalid argument. Expecting a serialized graph or, alternatively, a Graph instance.");if(t.attributes){if(!cn(t.attributes))throw new je("Graph.import: invalid attributes. Expecting a plain object.");n?this.mergeAttributes(t.attributes):this.replaceAttributes(t.attributes)}let r,i,o,l,u;if(t.nodes){if(o=t.nodes,!Array.isArray(o))throw new je("Graph.import: invalid nodes. Expecting an array.");for(r=0,i=o.length;r{const o=Xt({},r.attributes);r=new n.NodeDataClass(i,o),n._nodes.set(i,r)}),n}copy(t){if(t=t||{},typeof t.type=="string"&&t.type!==this.type&&t.type!=="mixed")throw new Xe(`Graph.copy: cannot create an incompatible copy from "${this.type}" type to "${t.type}" because this would mean losing information about the current graph.`);if(typeof t.multi=="boolean"&&t.multi!==this.multi&&t.multi!==!0)throw new Xe("Graph.copy: cannot create an incompatible copy by downgrading a multi graph to a simple one because this would mean losing information about the current graph.");if(typeof t.allowSelfLoops=="boolean"&&t.allowSelfLoops!==this.allowSelfLoops&&t.allowSelfLoops!==!0)throw new Xe("Graph.copy: cannot create an incompatible copy from a graph allowing self loops to one that does not because this would mean losing information about the current graph.");const n=this.emptyCopy(t),r=this._edges.values();let i,o;for(;i=r.next(),i.done!==!0;)o=i.value,qT(n,"copy",!1,o.undirected,o.key,o.source.key,o.target.key,Xt({},o.attributes));return n}toJSON(){return this.export()}toString(){return"[object Graph]"}inspect(){const t={};this._nodes.forEach((o,l)=>{t[l]=o.attributes});const n={},r={};this._edges.forEach((o,l)=>{const u=o.undirected?"--":"->";let f="",d=o.source.key,p=o.target.key,m;o.undirected&&d>p&&(m=d,d=p,p=m);const v=`(${d})${u}(${p})`;l.startsWith("geid_")?this.multi&&(typeof r[v]>"u"?r[v]=0:r[v]++,f+=`${r[v]}. `):f+=`[${l}]: `,f+=v,n[f]=o.attributes});const i={};for(const o in this)this.hasOwnProperty(o)&&!$1.has(o)&&typeof this[o]!="function"&&typeof o!="symbol"&&(i[o]=this[o]);return i.attributes=this._attributes,i.nodes=t,i.edges=n,ur(i,"constructor",this.constructor),i}}typeof Symbol<"u"&&(St.prototype[Symbol.for("nodejs.util.inspect.custom")]=St.prototype.inspect);O5.forEach(e=>{["add","merge","update"].forEach(t=>{const n=e.name(t),r=t==="add"?qT:z5;e.generateKey?St.prototype[n]=function(i,o,l){return r(this,n,!0,(e.type||this.type)==="undirected",null,i,o,l,t==="update")}:St.prototype[n]=function(i,o,l,u){return r(this,n,!1,(e.type||this.type)==="undirected",i,o,l,u,t==="update")}})});H3(St);t5(St);v5(St);k5(St);class Wl extends St{constructor(t){const n=Xt({type:"directed"},t);if("multi"in n&&n.multi!==!1)throw new je("DirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if(n.type!=="directed")throw new je('DirectedGraph.from: inconsistent "'+n.type+'" type in given options!');super(n)}}class YT extends St{constructor(t){const n=Xt({type:"undirected"},t);if("multi"in n&&n.multi!==!1)throw new je("UndirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if(n.type!=="undirected")throw new je('UndirectedGraph.from: inconsistent "'+n.type+'" type in given options!');super(n)}}class WT extends St{constructor(t){const n=Xt({multi:!0},t);if("multi"in n&&n.multi!==!0)throw new je("MultiGraph.from: inconsistent indication that the graph should be simple in given options!");super(n)}}class XT extends St{constructor(t){const n=Xt({type:"directed",multi:!0},t);if("multi"in n&&n.multi!==!0)throw new je("MultiDirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if(n.type!=="directed")throw new je('MultiDirectedGraph.from: inconsistent "'+n.type+'" type in given options!');super(n)}}class KT extends St{constructor(t){const n=Xt({type:"undirected",multi:!0},t);if("multi"in n&&n.multi!==!0)throw new je("MultiUndirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if(n.type!=="undirected")throw new je('MultiUndirectedGraph.from: inconsistent "'+n.type+'" type in given options!');super(n)}}function _s(e){e.from=function(t,n){const r=Xt({},t.options,n),i=new e(r);return i.import(t),i}}_s(St);_s(Wl);_s(YT);_s(WT);_s(XT);_s(KT);St.Graph=St;St.DirectedGraph=Wl;St.UndirectedGraph=YT;St.MultiGraph=WT;St.MultiDirectedGraph=XT;St.MultiUndirectedGraph=KT;St.InvalidArgumentsGraphError=je;St.NotFoundGraphError=De;St.UsageGraphError=Xe;function M5(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Gl(e){var t=M5(e,"string");return typeof t=="symbol"?t:t+""}function tn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function V1(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=Array(t);n>8&255,o=n>>16&255,l=n>>24&255;return[r,i,o,l]}var um={};function nA(e){if(typeof um[e]<"u")return um[e];var t=(e&16711680)>>>16,n=(e&65280)>>>8,r=e&255,i=255,o=tA(t,n,r,i);return um[e]=o,o}function q1(e,t,n,r){return n+(t<<8)+(e<<16)}function Y1(e,t,n,r,i,o){var l=Math.floor(n/o*i),u=Math.floor(e.drawingBufferHeight/o-r/o*i),f=new Uint8Array(4);e.bindFramebuffer(e.FRAMEBUFFER,t),e.readPixels(l,u,1,1,e.RGBA,e.UNSIGNED_BYTE,f);var d=fs(f,4),p=d[0],m=d[1],v=d[2],g=d[3];return[p,m,v,g]}function ke(e,t,n){return(t=Gl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function W1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Fe(e){for(var t=1;tN){var L="…";for(d=d+L,D=e.measureText(d).width;D>N&&d.length>1;)d=d.slice(0,-2)+L,D=e.measureText(d).width;if(d.length<4)return}var R;_>0?T>0?R=Math.acos(_/N):R=Math.asin(T/N):T>0?R=Math.acos(_/N)+Math.PI:R=Math.asin(_/N)+Math.PI/2,e.save(),e.translate(k,C),e.rotate(R),e.fillText(d,-D/2,t.size/2+o),e.restore()}}}function sA(e,t,n){if(t.label){var r=n.labelSize,i=n.labelFont,o=n.labelWeight,l=n.labelColor.attribute?t[n.labelColor.attribute]||n.labelColor.color||"#000":n.labelColor.color;e.fillStyle=l,e.font="".concat(o," ").concat(r,"px ").concat(i),e.fillText(t.label,t.x+t.size+3,t.y+r/3)}}function J5(e,t,n){var r=n.labelSize,i=n.labelFont,o=n.labelWeight;e.font="".concat(o," ").concat(r,"px ").concat(i),e.fillStyle="#FFF",e.shadowOffsetX=0,e.shadowOffsetY=0,e.shadowBlur=8,e.shadowColor="#000";var l=2;if(typeof t.label=="string"){var u=e.measureText(t.label).width,f=Math.round(u+5),d=Math.round(r+2*l),p=Math.max(t.size,r/2)+l,m=Math.asin(d/2/p),v=Math.sqrt(Math.abs(Math.pow(p,2)-Math.pow(d/2,2)));e.beginPath(),e.moveTo(t.x+v,t.y+d/2),e.lineTo(t.x+p+f,t.y+d/2),e.lineTo(t.x+p+f,t.y-d/2),e.lineTo(t.x+v,t.y-d/2),e.arc(t.x,t.y,p,m,-m),e.closePath(),e.fill()}else e.beginPath(),e.arc(t.x,t.y,t.size+l,0,Math.PI*2),e.closePath(),e.fill();e.shadowOffsetX=0,e.shadowOffsetY=0,e.shadowBlur=0,sA(e,t,n)}var eG=` +precision highp float; + +varying vec4 v_color; +varying vec2 v_diffVector; +varying float v_radius; + +uniform float u_correctionRatio; + +const vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0); + +void main(void) { + float border = u_correctionRatio * 2.0; + float dist = length(v_diffVector) - v_radius + border; + + // No antialiasing for picking mode: + #ifdef PICKING_MODE + if (dist > border) + gl_FragColor = transparent; + else + gl_FragColor = v_color; + + #else + float t = 0.0; + if (dist > border) + t = 1.0; + else if (dist > 0.0) + t = dist / border; + + gl_FragColor = mix(v_color, transparent, t); + #endif +} +`,tG=eG,nG=` +attribute vec4 a_id; +attribute vec4 a_color; +attribute vec2 a_position; +attribute float a_size; +attribute float a_angle; + +uniform mat3 u_matrix; +uniform float u_sizeRatio; +uniform float u_correctionRatio; + +varying vec4 v_color; +varying vec2 v_diffVector; +varying float v_radius; +varying float v_border; + +const float bias = 255.0 / 254.0; + +void main() { + float size = a_size * u_correctionRatio / u_sizeRatio * 4.0; + vec2 diffVector = size * vec2(cos(a_angle), sin(a_angle)); + vec2 position = a_position + diffVector; + gl_Position = vec4( + (u_matrix * vec3(position, 1)).xy, + 0, + 1 + ); + + v_diffVector = diffVector; + v_radius = size / 2.0; + + #ifdef PICKING_MODE + // For picking mode, we use the ID as the color: + v_color = a_id; + #else + // For normal mode, we use the color: + v_color = a_color; + #endif + + v_color.a *= bias; +} +`,rG=nG,lA=WebGLRenderingContext,Q1=lA.UNSIGNED_BYTE,fm=lA.FLOAT,iG=["u_sizeRatio","u_correctionRatio","u_matrix"],fu=function(e){function t(){return tn(this,t),Pn(this,t,arguments)}return Fn(t,e),nn(t,[{key:"getDefinition",value:function(){return{VERTICES:3,VERTEX_SHADER_SOURCE:rG,FRAGMENT_SHADER_SOURCE:tG,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:iG,ATTRIBUTES:[{name:"a_position",size:2,type:fm},{name:"a_size",size:1,type:fm},{name:"a_color",size:4,type:Q1,normalized:!0},{name:"a_id",size:4,type:Q1,normalized:!0}],CONSTANT_ATTRIBUTES:[{name:"a_angle",size:1,type:fm}],CONSTANT_DATA:[[t.ANGLE_1],[t.ANGLE_2],[t.ANGLE_3]]}}},{key:"processVisibleItem",value:function(r,i,o){var l=this.array,u=Yr(o.color);l[i++]=o.x,l[i++]=o.y,l[i++]=o.size,l[i++]=u,l[i++]=r}},{key:"setUniforms",value:function(r,i){var o=i.gl,l=i.uniformLocations,u=l.u_sizeRatio,f=l.u_correctionRatio,d=l.u_matrix;o.uniform1f(f,r.correctionRatio),o.uniform1f(u,r.sizeRatio),o.uniformMatrix3fv(d,!1,r.matrix)}}])}(vy);ke(fu,"ANGLE_1",0);ke(fu,"ANGLE_2",2*Math.PI/3);ke(fu,"ANGLE_3",4*Math.PI/3);var aG=` +precision mediump float; + +varying vec4 v_color; + +void main(void) { + gl_FragColor = v_color; +} +`,oG=aG,sG=` +attribute vec2 a_position; +attribute vec2 a_normal; +attribute float a_radius; +attribute vec3 a_barycentric; + +#ifdef PICKING_MODE +attribute vec4 a_id; +#else +attribute vec4 a_color; +#endif + +uniform mat3 u_matrix; +uniform float u_sizeRatio; +uniform float u_correctionRatio; +uniform float u_minEdgeThickness; +uniform float u_lengthToThicknessRatio; +uniform float u_widenessToThicknessRatio; + +varying vec4 v_color; + +const float bias = 255.0 / 254.0; + +void main() { + float minThickness = u_minEdgeThickness; + + float normalLength = length(a_normal); + vec2 unitNormal = a_normal / normalLength; + + // These first computations are taken from edge.vert.glsl and + // edge.clamped.vert.glsl. Please read it to get better comments on what's + // happening: + float pixelsThickness = max(normalLength / u_sizeRatio, minThickness); + float webGLThickness = pixelsThickness * u_correctionRatio; + float webGLNodeRadius = a_radius * 2.0 * u_correctionRatio / u_sizeRatio; + float webGLArrowHeadLength = webGLThickness * u_lengthToThicknessRatio * 2.0; + float webGLArrowHeadThickness = webGLThickness * u_widenessToThicknessRatio; + + float da = a_barycentric.x; + float db = a_barycentric.y; + float dc = a_barycentric.z; + + vec2 delta = vec2( + da * (webGLNodeRadius * unitNormal.y) + + db * ((webGLNodeRadius + webGLArrowHeadLength) * unitNormal.y + webGLArrowHeadThickness * unitNormal.x) + + dc * ((webGLNodeRadius + webGLArrowHeadLength) * unitNormal.y - webGLArrowHeadThickness * unitNormal.x), + + da * (-webGLNodeRadius * unitNormal.x) + + db * (-(webGLNodeRadius + webGLArrowHeadLength) * unitNormal.x + webGLArrowHeadThickness * unitNormal.y) + + dc * (-(webGLNodeRadius + webGLArrowHeadLength) * unitNormal.x - webGLArrowHeadThickness * unitNormal.y) + ); + + vec2 position = (u_matrix * vec3(a_position + delta, 1)).xy; + + gl_Position = vec4(position, 0, 1); + + #ifdef PICKING_MODE + // For picking mode, we use the ID as the color: + v_color = a_id; + #else + // For normal mode, we use the color: + v_color = a_color; + #endif + + v_color.a *= bias; +} +`,lG=sG,uA=WebGLRenderingContext,J1=uA.UNSIGNED_BYTE,Gc=uA.FLOAT,uG=["u_matrix","u_sizeRatio","u_correctionRatio","u_minEdgeThickness","u_lengthToThicknessRatio","u_widenessToThicknessRatio"],du={extremity:"target",lengthToThicknessRatio:2.5,widenessToThicknessRatio:2};function Tf(e){var t=Fe(Fe({},du),e||{});return function(n){function r(){return tn(this,r),Pn(this,r,arguments)}return Fn(r,n),nn(r,[{key:"getDefinition",value:function(){return{VERTICES:3,VERTEX_SHADER_SOURCE:lG,FRAGMENT_SHADER_SOURCE:oG,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:uG,ATTRIBUTES:[{name:"a_position",size:2,type:Gc},{name:"a_normal",size:2,type:Gc},{name:"a_radius",size:1,type:Gc},{name:"a_color",size:4,type:J1,normalized:!0},{name:"a_id",size:4,type:J1,normalized:!0}],CONSTANT_ATTRIBUTES:[{name:"a_barycentric",size:3,type:Gc}],CONSTANT_DATA:[[1,0,0],[0,1,0],[0,0,1]]}}},{key:"processVisibleItem",value:function(o,l,u,f,d){if(t.extremity==="source"){var p=[f,u];u=p[0],f=p[1]}var m=d.size||1,v=f.size||1,g=u.x,w=u.y,x=f.x,k=f.y,C=Yr(d.color),_=x-g,T=k-w,N=_*_+T*T,D=0,L=0;N&&(N=1/Math.sqrt(N),D=-T*N*m,L=_*N*m);var R=this.array;R[l++]=x,R[l++]=k,R[l++]=-D,R[l++]=-L,R[l++]=v,R[l++]=C,R[l++]=o}},{key:"setUniforms",value:function(o,l){var u=l.gl,f=l.uniformLocations,d=f.u_matrix,p=f.u_sizeRatio,m=f.u_correctionRatio,v=f.u_minEdgeThickness,g=f.u_lengthToThicknessRatio,w=f.u_widenessToThicknessRatio;u.uniformMatrix3fv(d,!1,o.matrix),u.uniform1f(p,o.sizeRatio),u.uniform1f(m,o.correctionRatio),u.uniform1f(v,o.minEdgeThickness),u.uniform1f(g,t.lengthToThicknessRatio),u.uniform1f(w,t.widenessToThicknessRatio)}}])}(cu)}Tf();var cG=` +precision mediump float; + +varying vec4 v_color; +varying vec2 v_normal; +varying float v_thickness; +varying float v_feather; + +const vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0); + +void main(void) { + // We only handle antialiasing for normal mode: + #ifdef PICKING_MODE + gl_FragColor = v_color; + #else + float dist = length(v_normal) * v_thickness; + + float t = smoothstep( + v_thickness - v_feather, + v_thickness, + dist + ); + + gl_FragColor = mix(v_color, transparent, t); + #endif +} +`,yy=cG,fG=` +attribute vec4 a_id; +attribute vec4 a_color; +attribute vec2 a_normal; +attribute float a_normalCoef; +attribute vec2 a_positionStart; +attribute vec2 a_positionEnd; +attribute float a_positionCoef; +attribute float a_radius; +attribute float a_radiusCoef; + +uniform mat3 u_matrix; +uniform float u_zoomRatio; +uniform float u_sizeRatio; +uniform float u_pixelRatio; +uniform float u_correctionRatio; +uniform float u_minEdgeThickness; +uniform float u_lengthToThicknessRatio; +uniform float u_feather; + +varying vec4 v_color; +varying vec2 v_normal; +varying float v_thickness; +varying float v_feather; + +const float bias = 255.0 / 254.0; + +void main() { + float minThickness = u_minEdgeThickness; + + float radius = a_radius * a_radiusCoef; + vec2 normal = a_normal * a_normalCoef; + vec2 position = a_positionStart * (1.0 - a_positionCoef) + a_positionEnd * a_positionCoef; + + float normalLength = length(normal); + vec2 unitNormal = normal / normalLength; + + // These first computations are taken from edge.vert.glsl. Please read it to + // get better comments on what's happening: + float pixelsThickness = max(normalLength, minThickness * u_sizeRatio); + float webGLThickness = pixelsThickness * u_correctionRatio / u_sizeRatio; + + // Here, we move the point to leave space for the arrow head: + float direction = sign(radius); + float webGLNodeRadius = direction * radius * 2.0 * u_correctionRatio / u_sizeRatio; + float webGLArrowHeadLength = webGLThickness * u_lengthToThicknessRatio * 2.0; + + vec2 compensationVector = vec2(-direction * unitNormal.y, direction * unitNormal.x) * (webGLNodeRadius + webGLArrowHeadLength); + + // Here is the proper position of the vertex + gl_Position = vec4((u_matrix * vec3(position + unitNormal * webGLThickness + compensationVector, 1)).xy, 0, 1); + + v_thickness = webGLThickness / u_zoomRatio; + + v_normal = unitNormal; + + v_feather = u_feather * u_correctionRatio / u_zoomRatio / u_pixelRatio * 2.0; + + #ifdef PICKING_MODE + // For picking mode, we use the ID as the color: + v_color = a_id; + #else + // For normal mode, we use the color: + v_color = a_color; + #endif + + v_color.a *= bias; +} +`,dG=fG,cA=WebGLRenderingContext,eS=cA.UNSIGNED_BYTE,Ga=cA.FLOAT,hG=["u_matrix","u_zoomRatio","u_sizeRatio","u_correctionRatio","u_pixelRatio","u_feather","u_minEdgeThickness","u_lengthToThicknessRatio"],pG={lengthToThicknessRatio:du.lengthToThicknessRatio};function fA(e){var t=Fe(Fe({},pG),{});return function(n){function r(){return tn(this,r),Pn(this,r,arguments)}return Fn(r,n),nn(r,[{key:"getDefinition",value:function(){return{VERTICES:6,VERTEX_SHADER_SOURCE:dG,FRAGMENT_SHADER_SOURCE:yy,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:hG,ATTRIBUTES:[{name:"a_positionStart",size:2,type:Ga},{name:"a_positionEnd",size:2,type:Ga},{name:"a_normal",size:2,type:Ga},{name:"a_color",size:4,type:eS,normalized:!0},{name:"a_id",size:4,type:eS,normalized:!0},{name:"a_radius",size:1,type:Ga}],CONSTANT_ATTRIBUTES:[{name:"a_positionCoef",size:1,type:Ga},{name:"a_normalCoef",size:1,type:Ga},{name:"a_radiusCoef",size:1,type:Ga}],CONSTANT_DATA:[[0,1,0],[0,-1,0],[1,1,1],[1,1,1],[0,-1,0],[1,-1,-1]]}}},{key:"processVisibleItem",value:function(o,l,u,f,d){var p=d.size||1,m=u.x,v=u.y,g=f.x,w=f.y,x=Yr(d.color),k=g-m,C=w-v,_=f.size||1,T=k*k+C*C,N=0,D=0;T&&(T=1/Math.sqrt(T),N=-C*T*p,D=k*T*p);var L=this.array;L[l++]=m,L[l++]=v,L[l++]=g,L[l++]=w,L[l++]=N,L[l++]=D,L[l++]=x,L[l++]=o,L[l++]=_}},{key:"setUniforms",value:function(o,l){var u=l.gl,f=l.uniformLocations,d=f.u_matrix,p=f.u_zoomRatio,m=f.u_feather,v=f.u_pixelRatio,g=f.u_correctionRatio,w=f.u_sizeRatio,x=f.u_minEdgeThickness,k=f.u_lengthToThicknessRatio;u.uniformMatrix3fv(d,!1,o.matrix),u.uniform1f(p,o.zoomRatio),u.uniform1f(w,o.sizeRatio),u.uniform1f(g,o.correctionRatio),u.uniform1f(v,o.pixelRatio),u.uniform1f(m,o.antiAliasingFeather),u.uniform1f(x,o.minEdgeThickness),u.uniform1f(k,t.lengthToThicknessRatio)}}])}(cu)}fA();function mG(e){return oA([fA(),Tf(e)])}var gG=mG(),dA=gG,vG=` +attribute vec4 a_id; +attribute vec4 a_color; +attribute vec2 a_normal; +attribute float a_normalCoef; +attribute vec2 a_positionStart; +attribute vec2 a_positionEnd; +attribute float a_positionCoef; + +uniform mat3 u_matrix; +uniform float u_sizeRatio; +uniform float u_zoomRatio; +uniform float u_pixelRatio; +uniform float u_correctionRatio; +uniform float u_minEdgeThickness; +uniform float u_feather; + +varying vec4 v_color; +varying vec2 v_normal; +varying float v_thickness; +varying float v_feather; + +const float bias = 255.0 / 254.0; + +void main() { + float minThickness = u_minEdgeThickness; + + vec2 normal = a_normal * a_normalCoef; + vec2 position = a_positionStart * (1.0 - a_positionCoef) + a_positionEnd * a_positionCoef; + + float normalLength = length(normal); + vec2 unitNormal = normal / normalLength; + + // We require edges to be at least "minThickness" pixels thick *on screen* + // (so we need to compensate the size ratio): + float pixelsThickness = max(normalLength, minThickness * u_sizeRatio); + + // Then, we need to retrieve the normalized thickness of the edge in the WebGL + // referential (in a ([0, 1], [0, 1]) space), using our "magic" correction + // ratio: + float webGLThickness = pixelsThickness * u_correctionRatio / u_sizeRatio; + + // Here is the proper position of the vertex + gl_Position = vec4((u_matrix * vec3(position + unitNormal * webGLThickness, 1)).xy, 0, 1); + + // For the fragment shader though, we need a thickness that takes the "magic" + // correction ratio into account (as in webGLThickness), but so that the + // antialiasing effect does not depend on the zoom level. So here's yet + // another thickness version: + v_thickness = webGLThickness / u_zoomRatio; + + v_normal = unitNormal; + + v_feather = u_feather * u_correctionRatio / u_zoomRatio / u_pixelRatio * 2.0; + + #ifdef PICKING_MODE + // For picking mode, we use the ID as the color: + v_color = a_id; + #else + // For normal mode, we use the color: + v_color = a_color; + #endif + + v_color.a *= bias; +} +`,yG=vG,hA=WebGLRenderingContext,tS=hA.UNSIGNED_BYTE,Rl=hA.FLOAT,bG=["u_matrix","u_zoomRatio","u_sizeRatio","u_correctionRatio","u_pixelRatio","u_feather","u_minEdgeThickness"],xG=function(e){function t(){return tn(this,t),Pn(this,t,arguments)}return Fn(t,e),nn(t,[{key:"getDefinition",value:function(){return{VERTICES:6,VERTEX_SHADER_SOURCE:yG,FRAGMENT_SHADER_SOURCE:yy,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:bG,ATTRIBUTES:[{name:"a_positionStart",size:2,type:Rl},{name:"a_positionEnd",size:2,type:Rl},{name:"a_normal",size:2,type:Rl},{name:"a_color",size:4,type:tS,normalized:!0},{name:"a_id",size:4,type:tS,normalized:!0}],CONSTANT_ATTRIBUTES:[{name:"a_positionCoef",size:1,type:Rl},{name:"a_normalCoef",size:1,type:Rl}],CONSTANT_DATA:[[0,1],[0,-1],[1,1],[1,1],[0,-1],[1,-1]]}}},{key:"processVisibleItem",value:function(r,i,o,l,u){var f=u.size||1,d=o.x,p=o.y,m=l.x,v=l.y,g=Yr(u.color),w=m-d,x=v-p,k=w*w+x*x,C=0,_=0;k&&(k=1/Math.sqrt(k),C=-x*k*f,_=w*k*f);var T=this.array;T[i++]=d,T[i++]=p,T[i++]=m,T[i++]=v,T[i++]=C,T[i++]=_,T[i++]=g,T[i++]=r}},{key:"setUniforms",value:function(r,i){var o=i.gl,l=i.uniformLocations,u=l.u_matrix,f=l.u_zoomRatio,d=l.u_feather,p=l.u_pixelRatio,m=l.u_correctionRatio,v=l.u_sizeRatio,g=l.u_minEdgeThickness;o.uniformMatrix3fv(u,!1,r.matrix),o.uniform1f(f,r.zoomRatio),o.uniform1f(v,r.sizeRatio),o.uniform1f(m,r.correctionRatio),o.uniform1f(p,r.pixelRatio),o.uniform1f(d,r.antiAliasingFeather),o.uniform1f(g,r.minEdgeThickness)}}])}(cu),by=function(e){function t(){var n;return tn(this,t),n=Pn(this,t),n.rawEmitter=n,n}return Fn(t,e),nn(t)}(PT.EventEmitter),dm,nS;function Wr(){return nS||(nS=1,dm=function(t){return t!==null&&typeof t=="object"&&typeof t.addUndirectedEdgeWithKey=="function"&&typeof t.dropNode=="function"&&typeof t.multi=="boolean"}),dm}var wG=Wr();const SG=fn(wG);var EG=function(t){return t},_G=function(t){return t*t},kG=function(t){return t*(2-t)},CG=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},TG=function(t){return t*t*t},AG=function(t){return--t*t*t+1},RG=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},pA={linear:EG,quadraticIn:_G,quadraticOut:kG,quadraticInOut:CG,cubicIn:TG,cubicOut:AG,cubicInOut:RG},mA={easing:"quadraticInOut",duration:150};function DG(e,t,n,r){var i=Object.assign({},mA,n),o=typeof i.easing=="function"?i.easing:pA[i.easing],l=Date.now(),u={};for(var f in t){var d=t[f];u[f]={};for(var p in d)u[f][p]=e.getNodeAttribute(f,p)}var m=null,v=function(){m=null;var w=(Date.now()-l)/i.duration;if(w>=1){for(var x in t){var k=t[x];for(var C in k)e.setNodeAttribute(x,C,k[C])}return}w=o(w);for(var _ in t){var T=t[_],N=u[_];for(var D in T)e.setNodeAttribute(_,D,T[D]*w+N[D]*(1-w))}m=requestAnimationFrame(v)};return v(),function(){m&&cancelAnimationFrame(m)}}function Er(){return Float32Array.of(1,0,0,0,1,0,0,0,1)}function Uc(e,t,n){return e[0]=t,e[4]=typeof n=="number"?n:t,e}function rS(e,t){var n=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=n,e[3]=-n,e[4]=r,e}function iS(e,t,n){return e[6]=t,e[7]=n,e}function ea(e,t){var n=e[0],r=e[1],i=e[2],o=e[3],l=e[4],u=e[5],f=e[6],d=e[7],p=e[8],m=t[0],v=t[1],g=t[2],w=t[3],x=t[4],k=t[5],C=t[6],_=t[7],T=t[8];return e[0]=m*n+v*o+g*f,e[1]=m*r+v*l+g*d,e[2]=m*i+v*u+g*p,e[3]=w*n+x*o+k*f,e[4]=w*r+x*l+k*d,e[5]=w*i+x*u+k*p,e[6]=C*n+_*o+T*f,e[7]=C*r+_*l+T*d,e[8]=C*i+_*u+T*p,e}function $g(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,r=e[0],i=e[1],o=e[3],l=e[4],u=e[6],f=e[7],d=t.x,p=t.y;return{x:d*r+p*o+u*n,y:d*i+p*l+f*n}}function NG(e,t){var n=e.height/e.width,r=t.height/t.width;return n<1&&r>1||n>1&&r<1?1:Math.min(Math.max(r,1/r),Math.max(1/n,n))}function Dl(e,t,n,r,i){var o=e.angle,l=e.ratio,u=e.x,f=e.y,d=t.width,p=t.height,m=Er(),v=Math.min(d,p)-2*r,g=NG(t,n);return i?(ea(m,iS(Er(),u,f)),ea(m,Uc(Er(),l)),ea(m,rS(Er(),o)),ea(m,Uc(Er(),d/v/2/g,p/v/2/g))):(ea(m,Uc(Er(),2*(v/d)*g,2*(v/p)*g)),ea(m,rS(Er(),-o)),ea(m,Uc(Er(),1/l)),ea(m,iS(Er(),-u,-f))),m}function OG(e,t,n){var r=$g(e,{x:Math.cos(t.angle),y:Math.sin(t.angle)},0),i=r.x,o=r.y;return 1/Math.sqrt(Math.pow(i,2)+Math.pow(o,2))/n.width}function jG(e){if(!e.order)return{x:[0,1],y:[0,1]};var t=1/0,n=-1/0,r=1/0,i=-1/0;return e.forEachNode(function(o,l){var u=l.x,f=l.y;un&&(n=u),fi&&(i=f)}),{x:[t,n],y:[r,i]}}function LG(e){if(!SG(e))throw new Error("Sigma: invalid graph instance.");e.forEachNode(function(t,n){if(!Number.isFinite(n.x)||!Number.isFinite(n.y))throw new Error("Sigma: Coordinates of node ".concat(t," are invalid. A node must have a numeric 'x' and 'y' attribute."))})}function zG(e,t,n){var r=document.createElement(e);if(t)for(var i in t)r.style[i]=t[i];if(n)for(var o in n)r.setAttribute(o,n[o]);return r}function aS(){return typeof window.devicePixelRatio<"u"?window.devicePixelRatio:1}function oS(e,t,n){return n.sort(function(r,i){var o=t(r)||0,l=t(i)||0;return ol?1:0})}function sS(e){var t=fs(e.x,2),n=t[0],r=t[1],i=fs(e.y,2),o=i[0],l=i[1],u=Math.max(r-n,l-o),f=(r+n)/2,d=(l+o)/2;(u===0||Math.abs(u)===1/0||isNaN(u))&&(u=1),isNaN(f)&&(f=0),isNaN(d)&&(d=0);var p=function(v){return{x:.5+(v.x-f)/u,y:.5+(v.y-d)/u}};return p.applyTo=function(m){m.x=.5+(m.x-f)/u,m.y=.5+(m.y-d)/u},p.inverse=function(m){return{x:f+u*(m.x-.5),y:d+u*(m.y-.5)}},p.ratio=u,p}function Hg(e){"@babel/helpers - typeof";return Hg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hg(e)}function lS(e,t){var n=t.size;if(n!==0){var r=e.length;e.length+=n;var i=0;t.forEach(function(o){e[r+i]=o,i++})}}function hm(e){e=e||{};for(var t=0,n=arguments.length<=1?0:arguments.length-1;t1&&arguments[1]!==void 0?arguments[1]:{},l=arguments.length>2?arguments[2]:void 0;if(!l)return new Promise(function(g){return i.animate(r,o,g)});if(this.enabled){var u=Fe(Fe({},mA),o),f=this.validateState(r),d=typeof u.easing=="function"?u.easing:pA[u.easing],p=Date.now(),m=this.getState(),v=function(){var w=(Date.now()-p)/u.duration;if(w>=1){i.nextFrame=null,i.setState(f),i.animationCallback&&(i.animationCallback.call(null),i.animationCallback=void 0);return}var x=d(w),k={};typeof f.x=="number"&&(k.x=m.x+(f.x-m.x)*x),typeof f.y=="number"&&(k.y=m.y+(f.y-m.y)*x),i.enabledRotation&&typeof f.angle=="number"&&(k.angle=m.angle+(f.angle-m.angle)*x),typeof f.ratio=="number"&&(k.ratio=m.ratio+(f.ratio-m.ratio)*x),i.setState(k),i.nextFrame=requestAnimationFrame(v)};this.nextFrame?(cancelAnimationFrame(this.nextFrame),this.animationCallback&&this.animationCallback.call(null),this.nextFrame=requestAnimationFrame(v)):v(),this.animationCallback=l}}},{key:"animatedZoom",value:function(r){return r?typeof r=="number"?this.animate({ratio:this.ratio/r}):this.animate({ratio:this.ratio/(r.factor||Bc)},r):this.animate({ratio:this.ratio/Bc})}},{key:"animatedUnzoom",value:function(r){return r?typeof r=="number"?this.animate({ratio:this.ratio*r}):this.animate({ratio:this.ratio*(r.factor||Bc)},r):this.animate({ratio:this.ratio*Bc})}},{key:"animatedReset",value:function(r){return this.animate({x:.5,y:.5,ratio:1,angle:0},r)}},{key:"copy",value:function(){return t.from(this.getState())}}],[{key:"from",value:function(r){var i=new t;return i.setState(r)}}])}(by);function kr(e,t){var n=t.getBoundingClientRect();return{x:e.clientX-n.left,y:e.clientY-n.top}}function yi(e,t){var n=Fe(Fe({},kr(e,t)),{},{sigmaDefaultPrevented:!1,preventSigmaDefault:function(){n.sigmaDefaultPrevented=!0},original:e});return n}function Nl(e){var t="x"in e?e:Fe(Fe({},e.touches[0]||e.previousTouches[0]),{},{original:e.original,sigmaDefaultPrevented:e.sigmaDefaultPrevented,preventSigmaDefault:function(){e.sigmaDefaultPrevented=!0,t.sigmaDefaultPrevented=!0}});return t}function IG(e,t){return Fe(Fe({},yi(e,t)),{},{delta:gA(e)})}var GG=2;function uf(e){for(var t=[],n=0,r=Math.min(e.length,GG);n0;i.draggedEvents=0,m&&i.renderer.getSetting("hideEdgesOnMove")&&i.renderer.refresh()},0),this.emit("mouseup",yi(r,this.container))}}},{key:"handleMove",value:function(r){var i=this;if(this.enabled){var o=yi(r,this.container);if(this.emit("mousemovebody",o),(r.target===this.container||r.composedPath()[0]===this.container)&&this.emit("mousemove",o),!o.sigmaDefaultPrevented&&this.isMouseDown){this.isMoving=!0,this.draggedEvents++,typeof this.movingTimeout=="number"&&clearTimeout(this.movingTimeout),this.movingTimeout=window.setTimeout(function(){i.movingTimeout=null,i.isMoving=!1},this.settings.dragTimeout);var l=this.renderer.getCamera(),u=kr(r,this.container),f=u.x,d=u.y,p=this.renderer.viewportToFramedGraph({x:this.lastMouseX,y:this.lastMouseY}),m=this.renderer.viewportToFramedGraph({x:f,y:d}),v=p.x-m.x,g=p.y-m.y,w=l.getState(),x=w.x+v,k=w.y+g;l.setState({x,y:k}),this.lastMouseX=f,this.lastMouseY=d,r.preventDefault(),r.stopPropagation()}}}},{key:"handleLeave",value:function(r){this.emit("mouseleave",yi(r,this.container))}},{key:"handleEnter",value:function(r){this.emit("mouseenter",yi(r,this.container))}},{key:"handleWheel",value:function(r){var i=this,o=this.renderer.getCamera();if(!(!this.enabled||!o.enabledZooming)){var l=gA(r);if(l){var u=IG(r,this.container);if(this.emit("wheel",u),u.sigmaDefaultPrevented){r.preventDefault(),r.stopPropagation();return}var f=o.getState().ratio,d=l>0?1/this.settings.zoomingRatio:this.settings.zoomingRatio,p=o.getBoundedRatio(f*d),m=l>0?1:-1,v=Date.now();f!==p&&(r.preventDefault(),r.stopPropagation(),!(this.currentWheelDirection===m&&this.lastWheelTriggerTime&&v-this.lastWheelTriggerTimer.size?-1:n.sizer.key?1:-1}}])}(),dS=function(){function e(){tn(this,e),ke(this,"width",0),ke(this,"height",0),ke(this,"cellSize",0),ke(this,"columns",0),ke(this,"rows",0),ke(this,"cells",{})}return nn(e,[{key:"resizeAndClear",value:function(n,r){this.width=n.width,this.height=n.height,this.cellSize=r,this.columns=Math.ceil(n.width/r),this.rows=Math.ceil(n.height/r),this.cells={}}},{key:"getIndex",value:function(n){var r=Math.floor(n.x/this.cellSize),i=Math.floor(n.y/this.cellSize);return i*this.columns+r}},{key:"add",value:function(n,r,i){var o=new fS(n,r),l=this.getIndex(i),u=this.cells[l];u||(u=[],this.cells[l]=u),u.push(o)}},{key:"organize",value:function(){for(var n in this.cells){var r=this.cells[n];r.sort(fS.compare)}}},{key:"getLabelsToDisplay",value:function(n,r){var i=this.cellSize*this.cellSize,o=i/n/n,l=o*r/i,u=Math.ceil(l),f=[];for(var d in this.cells)for(var p=this.cells[d],m=0;m2&&arguments[2]!==void 0?arguments[2]:{};if(tn(this,t),i=Pn(this,t),ke(i,"elements",{}),ke(i,"canvasContexts",{}),ke(i,"webGLContexts",{}),ke(i,"pickingLayers",new Set),ke(i,"textures",{}),ke(i,"frameBuffers",{}),ke(i,"activeListeners",{}),ke(i,"labelGrid",new dS),ke(i,"nodeDataCache",{}),ke(i,"edgeDataCache",{}),ke(i,"nodeProgramIndex",{}),ke(i,"edgeProgramIndex",{}),ke(i,"nodesWithForcedLabels",new Set),ke(i,"edgesWithForcedLabels",new Set),ke(i,"nodeExtent",{x:[0,1],y:[0,1]}),ke(i,"nodeZExtent",[1/0,-1/0]),ke(i,"edgeZExtent",[1/0,-1/0]),ke(i,"matrix",Er()),ke(i,"invMatrix",Er()),ke(i,"correctionRatio",1),ke(i,"customBBox",null),ke(i,"normalizationFunction",sS({x:[0,1],y:[0,1]})),ke(i,"graphToViewportRatio",1),ke(i,"itemIDsIndex",{}),ke(i,"nodeIndices",{}),ke(i,"edgeIndices",{}),ke(i,"width",0),ke(i,"height",0),ke(i,"pixelRatio",aS()),ke(i,"pickingDownSizingRatio",2*i.pixelRatio),ke(i,"displayedNodeLabels",new Set),ke(i,"displayedEdgeLabels",new Set),ke(i,"highlightedNodes",new Set),ke(i,"hoveredNode",null),ke(i,"hoveredEdge",null),ke(i,"renderFrame",null),ke(i,"renderHighlightedNodesFrame",null),ke(i,"needToProcess",!1),ke(i,"checkEdgesEventsFrame",null),ke(i,"nodePrograms",{}),ke(i,"nodeHoverPrograms",{}),ke(i,"edgePrograms",{}),i.settings=FG(o),pm(i.settings),LG(n),!(r instanceof HTMLElement))throw new Error("Sigma: container should be an html element.");i.graph=n,i.container=r,i.createWebGLContext("edges",{picking:o.enableEdgeEvents}),i.createCanvasContext("edgeLabels"),i.createWebGLContext("nodes",{picking:!0}),i.createCanvasContext("labels"),i.createCanvasContext("hovers"),i.createWebGLContext("hoverNodes"),i.createCanvasContext("mouse",{style:{touchAction:"none",userSelect:"none"}}),i.resize();for(var l in i.settings.nodeProgramClasses)i.registerNodeProgram(l,i.settings.nodeProgramClasses[l],i.settings.nodeHoverProgramClasses[l]);for(var u in i.settings.edgeProgramClasses)i.registerEdgeProgram(u,i.settings.edgeProgramClasses[u]);return i.camera=new uS,i.bindCameraHandlers(),i.mouseCaptor=new $G(i.elements.mouse,i),i.mouseCaptor.setSettings(i.settings),i.touchCaptor=new qG(i.elements.mouse,i),i.touchCaptor.setSettings(i.settings),i.bindEventHandlers(),i.bindGraphHandlers(),i.handleSettingsUpdate(),i.refresh(),i}return Fn(t,e),nn(t,[{key:"registerNodeProgram",value:function(r,i,o){return this.nodePrograms[r]&&this.nodePrograms[r].kill(),this.nodeHoverPrograms[r]&&this.nodeHoverPrograms[r].kill(),this.nodePrograms[r]=new i(this.webGLContexts.nodes,this.frameBuffers.nodes,this),this.nodeHoverPrograms[r]=new(o||i)(this.webGLContexts.hoverNodes,null,this),this}},{key:"registerEdgeProgram",value:function(r,i){return this.edgePrograms[r]&&this.edgePrograms[r].kill(),this.edgePrograms[r]=new i(this.webGLContexts.edges,this.frameBuffers.edges,this),this}},{key:"unregisterNodeProgram",value:function(r){if(this.nodePrograms[r]){var i=this.nodePrograms,o=i[r],l=mm(i,[r].map(Gl));o.kill(),this.nodePrograms=l}if(this.nodeHoverPrograms[r]){var u=this.nodeHoverPrograms,f=u[r],d=mm(u,[r].map(Gl));f.kill(),this.nodePrograms=d}return this}},{key:"unregisterEdgeProgram",value:function(r){if(this.edgePrograms[r]){var i=this.edgePrograms,o=i[r],l=mm(i,[r].map(Gl));o.kill(),this.edgePrograms=l}return this}},{key:"resetWebGLTexture",value:function(r){var i=this.webGLContexts[r],o=this.frameBuffers[r],l=this.textures[r];l&&i.deleteTexture(l);var u=i.createTexture();return i.bindFramebuffer(i.FRAMEBUFFER,o),i.bindTexture(i.TEXTURE_2D,u),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,this.width,this.height,0,i.RGBA,i.UNSIGNED_BYTE,null),i.framebufferTexture2D(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.TEXTURE_2D,u,0),this.textures[r]=u,this}},{key:"bindCameraHandlers",value:function(){var r=this;return this.activeListeners.camera=function(){r.scheduleRender()},this.camera.on("updated",this.activeListeners.camera),this}},{key:"unbindCameraHandlers",value:function(){return this.camera.removeListener("updated",this.activeListeners.camera),this}},{key:"getNodeAtPosition",value:function(r){var i=r.x,o=r.y,l=Y1(this.webGLContexts.nodes,this.frameBuffers.nodes,i,o,this.pixelRatio,this.pickingDownSizingRatio),u=q1.apply(void 0,cS(l)),f=this.itemIDsIndex[u];return f&&f.type==="node"?f.id:null}},{key:"bindEventHandlers",value:function(){var r=this;this.activeListeners.handleResize=function(){r.scheduleRefresh()},window.addEventListener("resize",this.activeListeners.handleResize),this.activeListeners.handleMove=function(o){var l=Nl(o),u={event:l,preventSigmaDefault:function(){l.preventSigmaDefault()}},f=r.getNodeAtPosition(l);if(f&&r.hoveredNode!==f&&!r.nodeDataCache[f].hidden){r.hoveredNode&&r.emit("leaveNode",Fe(Fe({},u),{},{node:r.hoveredNode})),r.hoveredNode=f,r.emit("enterNode",Fe(Fe({},u),{},{node:f})),r.scheduleHighlightedNodesRender();return}if(r.hoveredNode&&r.getNodeAtPosition(l)!==r.hoveredNode){var d=r.hoveredNode;r.hoveredNode=null,r.emit("leaveNode",Fe(Fe({},u),{},{node:d})),r.scheduleHighlightedNodesRender();return}if(r.settings.enableEdgeEvents){var p=r.hoveredNode?null:r.getEdgeAtPoint(u.event.x,u.event.y);p!==r.hoveredEdge&&(r.hoveredEdge&&r.emit("leaveEdge",Fe(Fe({},u),{},{edge:r.hoveredEdge})),p&&r.emit("enterEdge",Fe(Fe({},u),{},{edge:p})),r.hoveredEdge=p)}},this.activeListeners.handleMoveBody=function(o){var l=Nl(o);r.emit("moveBody",{event:l,preventSigmaDefault:function(){l.preventSigmaDefault()}})},this.activeListeners.handleLeave=function(o){var l=Nl(o),u={event:l,preventSigmaDefault:function(){l.preventSigmaDefault()}};r.hoveredNode&&(r.emit("leaveNode",Fe(Fe({},u),{},{node:r.hoveredNode})),r.scheduleHighlightedNodesRender()),r.settings.enableEdgeEvents&&r.hoveredEdge&&(r.emit("leaveEdge",Fe(Fe({},u),{},{edge:r.hoveredEdge})),r.scheduleHighlightedNodesRender()),r.emit("leaveStage",Fe({},u))},this.activeListeners.handleEnter=function(o){var l=Nl(o),u={event:l,preventSigmaDefault:function(){l.preventSigmaDefault()}};r.emit("enterStage",Fe({},u))};var i=function(l){return function(u){var f=Nl(u),d={event:f,preventSigmaDefault:function(){f.preventSigmaDefault()}},p=r.getNodeAtPosition(f);if(p)return r.emit("".concat(l,"Node"),Fe(Fe({},d),{},{node:p}));if(r.settings.enableEdgeEvents){var m=r.getEdgeAtPoint(f.x,f.y);if(m)return r.emit("".concat(l,"Edge"),Fe(Fe({},d),{},{edge:m}))}return r.emit("".concat(l,"Stage"),d)}};return this.activeListeners.handleClick=i("click"),this.activeListeners.handleRightClick=i("rightClick"),this.activeListeners.handleDoubleClick=i("doubleClick"),this.activeListeners.handleWheel=i("wheel"),this.activeListeners.handleDown=i("down"),this.activeListeners.handleUp=i("up"),this.mouseCaptor.on("mousemove",this.activeListeners.handleMove),this.mouseCaptor.on("mousemovebody",this.activeListeners.handleMoveBody),this.mouseCaptor.on("click",this.activeListeners.handleClick),this.mouseCaptor.on("rightClick",this.activeListeners.handleRightClick),this.mouseCaptor.on("doubleClick",this.activeListeners.handleDoubleClick),this.mouseCaptor.on("wheel",this.activeListeners.handleWheel),this.mouseCaptor.on("mousedown",this.activeListeners.handleDown),this.mouseCaptor.on("mouseup",this.activeListeners.handleUp),this.mouseCaptor.on("mouseleave",this.activeListeners.handleLeave),this.mouseCaptor.on("mouseenter",this.activeListeners.handleEnter),this.touchCaptor.on("touchdown",this.activeListeners.handleDown),this.touchCaptor.on("touchdown",this.activeListeners.handleMove),this.touchCaptor.on("touchup",this.activeListeners.handleUp),this.touchCaptor.on("touchmove",this.activeListeners.handleMove),this.touchCaptor.on("tap",this.activeListeners.handleClick),this.touchCaptor.on("doubletap",this.activeListeners.handleDoubleClick),this.touchCaptor.on("touchmove",this.activeListeners.handleMoveBody),this}},{key:"bindGraphHandlers",value:function(){var r=this,i=this.graph,o=new Set(["x","y","zIndex","type"]);return this.activeListeners.eachNodeAttributesUpdatedGraphUpdate=function(l){var u,f=(u=l.hints)===null||u===void 0?void 0:u.attributes;r.graph.forEachNode(function(p){return r.updateNode(p)});var d=!f||f.some(function(p){return o.has(p)});r.refresh({partialGraph:{nodes:i.nodes()},skipIndexation:!d,schedule:!0})},this.activeListeners.eachEdgeAttributesUpdatedGraphUpdate=function(l){var u,f=(u=l.hints)===null||u===void 0?void 0:u.attributes;r.graph.forEachEdge(function(p){return r.updateEdge(p)});var d=f&&["zIndex","type"].some(function(p){return f==null?void 0:f.includes(p)});r.refresh({partialGraph:{edges:i.edges()},skipIndexation:!d,schedule:!0})},this.activeListeners.addNodeGraphUpdate=function(l){var u=l.key;r.addNode(u),r.refresh({partialGraph:{nodes:[u]},skipIndexation:!1,schedule:!0})},this.activeListeners.updateNodeGraphUpdate=function(l){var u=l.key;r.refresh({partialGraph:{nodes:[u]},skipIndexation:!1,schedule:!0})},this.activeListeners.dropNodeGraphUpdate=function(l){var u=l.key;r.removeNode(u),r.refresh({schedule:!0})},this.activeListeners.addEdgeGraphUpdate=function(l){var u=l.key;r.addEdge(u),r.refresh({partialGraph:{edges:[u]},schedule:!0})},this.activeListeners.updateEdgeGraphUpdate=function(l){var u=l.key;r.refresh({partialGraph:{edges:[u]},skipIndexation:!1,schedule:!0})},this.activeListeners.dropEdgeGraphUpdate=function(l){var u=l.key;r.removeEdge(u),r.refresh({schedule:!0})},this.activeListeners.clearEdgesGraphUpdate=function(){r.clearEdgeState(),r.clearEdgeIndices(),r.refresh({schedule:!0})},this.activeListeners.clearGraphUpdate=function(){r.clearEdgeState(),r.clearNodeState(),r.clearEdgeIndices(),r.clearNodeIndices(),r.refresh({schedule:!0})},i.on("nodeAdded",this.activeListeners.addNodeGraphUpdate),i.on("nodeDropped",this.activeListeners.dropNodeGraphUpdate),i.on("nodeAttributesUpdated",this.activeListeners.updateNodeGraphUpdate),i.on("eachNodeAttributesUpdated",this.activeListeners.eachNodeAttributesUpdatedGraphUpdate),i.on("edgeAdded",this.activeListeners.addEdgeGraphUpdate),i.on("edgeDropped",this.activeListeners.dropEdgeGraphUpdate),i.on("edgeAttributesUpdated",this.activeListeners.updateEdgeGraphUpdate),i.on("eachEdgeAttributesUpdated",this.activeListeners.eachEdgeAttributesUpdatedGraphUpdate),i.on("edgesCleared",this.activeListeners.clearEdgesGraphUpdate),i.on("cleared",this.activeListeners.clearGraphUpdate),this}},{key:"unbindGraphHandlers",value:function(){var r=this.graph;r.removeListener("nodeAdded",this.activeListeners.addNodeGraphUpdate),r.removeListener("nodeDropped",this.activeListeners.dropNodeGraphUpdate),r.removeListener("nodeAttributesUpdated",this.activeListeners.updateNodeGraphUpdate),r.removeListener("eachNodeAttributesUpdated",this.activeListeners.eachNodeAttributesUpdatedGraphUpdate),r.removeListener("edgeAdded",this.activeListeners.addEdgeGraphUpdate),r.removeListener("edgeDropped",this.activeListeners.dropEdgeGraphUpdate),r.removeListener("edgeAttributesUpdated",this.activeListeners.updateEdgeGraphUpdate),r.removeListener("eachEdgeAttributesUpdated",this.activeListeners.eachEdgeAttributesUpdatedGraphUpdate),r.removeListener("edgesCleared",this.activeListeners.clearEdgesGraphUpdate),r.removeListener("cleared",this.activeListeners.clearGraphUpdate)}},{key:"getEdgeAtPoint",value:function(r,i){var o=Y1(this.webGLContexts.edges,this.frameBuffers.edges,r,i,this.pixelRatio,this.pickingDownSizingRatio),l=q1.apply(void 0,cS(o)),u=this.itemIDsIndex[l];return u&&u.type==="edge"?u.id:null}},{key:"process",value:function(){var r=this;this.emit("beforeProcess");var i=this.graph,o=this.settings,l=this.getDimensions();if(this.nodeExtent=jG(this.graph),!this.settings.autoRescale){var u=l.width,f=l.height,d=this.nodeExtent,p=d.x,m=d.y;this.nodeExtent={x:[(p[0]+p[1])/2-u/2,(p[0]+p[1])/2+u/2],y:[(m[0]+m[1])/2-f/2,(m[0]+m[1])/2+f/2]}}this.normalizationFunction=sS(this.customBBox||this.nodeExtent);var v=new uS,g=Dl(v.getState(),l,this.getGraphDimensions(),this.getStagePadding());this.labelGrid.resizeAndClear(l,o.labelGridCellSize);for(var w={},x={},k={},C={},_=1,T=i.nodes(),N=0,D=T.length;N1&&arguments[1]!==void 0?arguments[1]:{},o=i.tolerance,l=o===void 0?0:o,u=i.boundaries,f=Fe({},r),d=u||this.nodeExtent,p=fs(d.x,2),m=p[0],v=p[1],g=fs(d.y,2),w=g[0],x=g[1],k=[this.graphToViewport({x:m,y:w},{cameraState:r}),this.graphToViewport({x:v,y:w},{cameraState:r}),this.graphToViewport({x:m,y:x},{cameraState:r}),this.graphToViewport({x:v,y:x},{cameraState:r})],C=1/0,_=-1/0,T=1/0,N=-1/0;k.forEach(function(Y){var Z=Y.x,B=Y.y;C=Math.min(C,Z),_=Math.max(_,Z),T=Math.min(T,B),N=Math.max(N,B)});var D=_-C,L=N-T,R=this.getDimensions(),U=R.width,P=R.height,z=0,V=0;if(D>=U?_l&&(z=C-l):_>U+l?z=_-(U+l):C<-l&&(z=C+l),L>=P?Nl&&(V=T-l):N>P+l?V=N-(P+l):T<-l&&(V=T+l),z||V){var q=this.viewportToFramedGraph({x:0,y:0},{cameraState:r}),I=this.viewportToFramedGraph({x:z,y:V},{cameraState:r});z=I.x-q.x,V=I.y-q.y,f.x+=z,f.y+=V}return f}},{key:"renderLabels",value:function(){if(!this.settings.renderLabels)return this;var r=this.camera.getState(),i=this.labelGrid.getLabelsToDisplay(r.ratio,this.settings.labelDensity);lS(i,this.nodesWithForcedLabels),this.displayedNodeLabels=new Set;for(var o=this.canvasContexts.labels,l=0,u=i.length;lthis.width+QG||v<-50||v>this.height+JG)){this.displayedNodeLabels.add(f);var w=this.settings.defaultDrawNodeLabel,x=this.nodePrograms[d.type],k=(x==null?void 0:x.drawLabel)||w;k(o,Fe(Fe({key:f},d),{},{size:g,x:m,y:v}),this.settings)}}}return this}},{key:"renderEdgeLabels",value:function(){if(!this.settings.renderEdgeLabels)return this;var r=this.canvasContexts.edgeLabels;r.clearRect(0,0,this.width,this.height);var i=ZG({graph:this.graph,hoveredNode:this.hoveredNode,displayedNodeLabels:this.displayedNodeLabels,highlightedNodes:this.highlightedNodes});lS(i,this.edgesWithForcedLabels);for(var o=new Set,l=0,u=i.length;lthis.nodeZExtent[1]&&(this.nodeZExtent[1]=o.zIndex))}},{key:"updateNode",value:function(r){this.addNode(r);var i=this.nodeDataCache[r];this.normalizationFunction.applyTo(i)}},{key:"removeNode",value:function(r){delete this.nodeDataCache[r],delete this.nodeProgramIndex[r],this.highlightedNodes.delete(r),this.hoveredNode===r&&(this.hoveredNode=null),this.nodesWithForcedLabels.delete(r)}},{key:"addEdge",value:function(r){var i=Object.assign({},this.graph.getEdgeAttributes(r));this.settings.edgeReducer&&(i=this.settings.edgeReducer(r,i));var o=tU(this.settings,r,i);this.edgeDataCache[r]=o,this.edgesWithForcedLabels.delete(r),o.forceLabel&&!o.hidden&&this.edgesWithForcedLabels.add(r),this.settings.zIndex&&(o.zIndexthis.edgeZExtent[1]&&(this.edgeZExtent[1]=o.zIndex))}},{key:"updateEdge",value:function(r){this.addEdge(r)}},{key:"removeEdge",value:function(r){delete this.edgeDataCache[r],delete this.edgeProgramIndex[r],this.hoveredEdge===r&&(this.hoveredEdge=null),this.edgesWithForcedLabels.delete(r)}},{key:"clearNodeIndices",value:function(){this.labelGrid=new dS,this.nodeExtent={x:[0,1],y:[0,1]},this.nodeDataCache={},this.edgeProgramIndex={},this.nodesWithForcedLabels=new Set,this.nodeZExtent=[1/0,-1/0]}},{key:"clearEdgeIndices",value:function(){this.edgeDataCache={},this.edgeProgramIndex={},this.edgesWithForcedLabels=new Set,this.edgeZExtent=[1/0,-1/0]}},{key:"clearIndices",value:function(){this.clearEdgeIndices(),this.clearNodeIndices()}},{key:"clearNodeState",value:function(){this.displayedNodeLabels=new Set,this.highlightedNodes=new Set,this.hoveredNode=null}},{key:"clearEdgeState",value:function(){this.displayedEdgeLabels=new Set,this.highlightedNodes=new Set,this.hoveredEdge=null}},{key:"clearState",value:function(){this.clearEdgeState(),this.clearNodeState()}},{key:"addNodeToProgram",value:function(r,i,o){var l=this.nodeDataCache[r],u=this.nodePrograms[l.type];if(!u)throw new Error('Sigma: could not find a suitable program for node type "'.concat(l.type,'"!'));u.process(i,o,l),this.nodeProgramIndex[r]=o}},{key:"addEdgeToProgram",value:function(r,i,o){var l=this.edgeDataCache[r],u=this.edgePrograms[l.type];if(!u)throw new Error('Sigma: could not find a suitable program for edge type "'.concat(l.type,'"!'));var f=this.graph.extremities(r),d=this.nodeDataCache[f[0]],p=this.nodeDataCache[f[1]];u.process(i,o,d,p,l),this.edgeProgramIndex[r]=o}},{key:"getRenderParams",value:function(){return{matrix:this.matrix,invMatrix:this.invMatrix,width:this.width,height:this.height,pixelRatio:this.pixelRatio,zoomRatio:this.camera.ratio,cameraAngle:this.camera.angle,sizeRatio:1/this.scaleSize(),correctionRatio:this.correctionRatio,downSizingRatio:this.pickingDownSizingRatio,minEdgeThickness:this.settings.minEdgeThickness,antiAliasingFeather:this.settings.antiAliasingFeather}}},{key:"getStagePadding",value:function(){var r=this.settings,i=r.stagePadding,o=r.autoRescale;return o&&i||0}},{key:"createLayer",value:function(r,i){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.elements[r])throw new Error('Sigma: a layer named "'.concat(r,'" already exists'));var l=zG(i,{position:"absolute"},{class:"sigma-".concat(r)});return o.style&&Object.assign(l.style,o.style),this.elements[r]=l,"beforeLayer"in o&&o.beforeLayer?this.elements[o.beforeLayer].before(l):"afterLayer"in o&&o.afterLayer?this.elements[o.afterLayer].after(l):this.container.appendChild(l),l}},{key:"createCanvas",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.createLayer(r,"canvas",i)}},{key:"createCanvasContext",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=this.createCanvas(r,i),l={preserveDrawingBuffer:!1,antialias:!1};return this.canvasContexts[r]=o.getContext("2d",l),this}},{key:"createWebGLContext",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=(i==null?void 0:i.canvas)||this.createCanvas(r,i);i.hidden&&o.remove();var l=Fe({preserveDrawingBuffer:!1,antialias:!1},i),u;u=o.getContext("webgl2",l),u||(u=o.getContext("webgl",l)),u||(u=o.getContext("experimental-webgl",l));var f=u;if(this.webGLContexts[r]=f,f.blendFunc(f.ONE,f.ONE_MINUS_SRC_ALPHA),i.picking){this.pickingLayers.add(r);var d=f.createFramebuffer();if(!d)throw new Error("Sigma: cannot create a new frame buffer for layer ".concat(r));this.frameBuffers[r]=d}return f}},{key:"killLayer",value:function(r){var i=this.elements[r];if(!i)throw new Error("Sigma: cannot kill layer ".concat(r,", which does not exist"));if(this.webGLContexts[r]){var o,l=this.webGLContexts[r];(o=l.getExtension("WEBGL_lose_context"))===null||o===void 0||o.loseContext(),delete this.webGLContexts[r]}else this.canvasContexts[r]&&delete this.canvasContexts[r];return i.remove(),delete this.elements[r],this}},{key:"getCamera",value:function(){return this.camera}},{key:"setCamera",value:function(r){this.unbindCameraHandlers(),this.camera=r,this.bindCameraHandlers()}},{key:"getContainer",value:function(){return this.container}},{key:"getGraph",value:function(){return this.graph}},{key:"setGraph",value:function(r){r!==this.graph&&(this.hoveredNode&&!r.hasNode(this.hoveredNode)&&(this.hoveredNode=null),this.hoveredEdge&&!r.hasEdge(this.hoveredEdge)&&(this.hoveredEdge=null),this.unbindGraphHandlers(),this.checkEdgesEventsFrame!==null&&(cancelAnimationFrame(this.checkEdgesEventsFrame),this.checkEdgesEventsFrame=null),this.graph=r,this.bindGraphHandlers(),this.refresh())}},{key:"getMouseCaptor",value:function(){return this.mouseCaptor}},{key:"getTouchCaptor",value:function(){return this.touchCaptor}},{key:"getDimensions",value:function(){return{width:this.width,height:this.height}}},{key:"getGraphDimensions",value:function(){var r=this.customBBox||this.nodeExtent;return{width:r.x[1]-r.x[0]||1,height:r.y[1]-r.y[0]||1}}},{key:"getNodeDisplayData",value:function(r){var i=this.nodeDataCache[r];return i?Object.assign({},i):void 0}},{key:"getEdgeDisplayData",value:function(r){var i=this.edgeDataCache[r];return i?Object.assign({},i):void 0}},{key:"getNodeDisplayedLabels",value:function(){return new Set(this.displayedNodeLabels)}},{key:"getEdgeDisplayedLabels",value:function(){return new Set(this.displayedEdgeLabels)}},{key:"getSettings",value:function(){return Fe({},this.settings)}},{key:"getSetting",value:function(r){return this.settings[r]}},{key:"setSetting",value:function(r,i){var o=Fe({},this.settings);return this.settings[r]=i,pm(this.settings),this.handleSettingsUpdate(o),this.scheduleRefresh(),this}},{key:"updateSetting",value:function(r,i){return this.setSetting(r,i(this.settings[r])),this}},{key:"setSettings",value:function(r){var i=Fe({},this.settings);return this.settings=Fe(Fe({},this.settings),r),pm(this.settings),this.handleSettingsUpdate(i),this.scheduleRefresh(),this}},{key:"resize",value:function(r){var i=this.width,o=this.height;if(this.width=this.container.offsetWidth,this.height=this.container.offsetHeight,this.pixelRatio=aS(),this.width===0)if(this.settings.allowInvalidContainer)this.width=1;else throw new Error("Sigma: Container has no width. You can set the allowInvalidContainer setting to true to stop seeing this error.");if(this.height===0)if(this.settings.allowInvalidContainer)this.height=1;else throw new Error("Sigma: Container has no height. You can set the allowInvalidContainer setting to true to stop seeing this error.");if(!r&&i===this.width&&o===this.height)return this;for(var l in this.elements){var u=this.elements[l];u.style.width=this.width+"px",u.style.height=this.height+"px"}for(var f in this.canvasContexts)this.elements[f].setAttribute("width",this.width*this.pixelRatio+"px"),this.elements[f].setAttribute("height",this.height*this.pixelRatio+"px"),this.pixelRatio!==1&&this.canvasContexts[f].scale(this.pixelRatio,this.pixelRatio);for(var d in this.webGLContexts){this.elements[d].setAttribute("width",this.width*this.pixelRatio+"px"),this.elements[d].setAttribute("height",this.height*this.pixelRatio+"px");var p=this.webGLContexts[d];if(p.viewport(0,0,this.width*this.pixelRatio,this.height*this.pixelRatio),this.pickingLayers.has(d)){var m=this.textures[d];m&&p.deleteTexture(m)}}return this.emit("resize"),this}},{key:"clear",value:function(){return this.emit("beforeClear"),this.webGLContexts.nodes.bindFramebuffer(WebGLRenderingContext.FRAMEBUFFER,null),this.webGLContexts.nodes.clear(WebGLRenderingContext.COLOR_BUFFER_BIT),this.webGLContexts.edges.bindFramebuffer(WebGLRenderingContext.FRAMEBUFFER,null),this.webGLContexts.edges.clear(WebGLRenderingContext.COLOR_BUFFER_BIT),this.webGLContexts.hoverNodes.clear(WebGLRenderingContext.COLOR_BUFFER_BIT),this.canvasContexts.labels.clearRect(0,0,this.width,this.height),this.canvasContexts.hovers.clearRect(0,0,this.width,this.height),this.canvasContexts.edgeLabels.clearRect(0,0,this.width,this.height),this.emit("afterClear"),this}},{key:"refresh",value:function(r){var i=this,o=(r==null?void 0:r.skipIndexation)!==void 0?r==null?void 0:r.skipIndexation:!1,l=(r==null?void 0:r.schedule)!==void 0?r.schedule:!1,u=!r||!r.partialGraph;if(u)this.clearEdgeIndices(),this.clearNodeIndices(),this.graph.forEachNode(function(N){return i.addNode(N)}),this.graph.forEachEdge(function(N){return i.addEdge(N)});else{for(var f,d,p=((f=r.partialGraph)===null||f===void 0?void 0:f.nodes)||[],m=0,v=(p==null?void 0:p.length)||0;m1&&arguments[1]!==void 0?arguments[1]:{},o=!!i.cameraState||!!i.viewportDimensions||!!i.graphDimensions,l=i.matrix?i.matrix:o?Dl(i.cameraState||this.camera.getState(),i.viewportDimensions||this.getDimensions(),i.graphDimensions||this.getGraphDimensions(),i.padding||this.getStagePadding()):this.matrix,u=$g(l,r);return{x:(1+u.x)*this.width/2,y:(1-u.y)*this.height/2}}},{key:"viewportToFramedGraph",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=!!i.cameraState||!!i.viewportDimensions||!i.graphDimensions,l=i.matrix?i.matrix:o?Dl(i.cameraState||this.camera.getState(),i.viewportDimensions||this.getDimensions(),i.graphDimensions||this.getGraphDimensions(),i.padding||this.getStagePadding(),!0):this.invMatrix,u=$g(l,{x:r.x/this.width*2-1,y:1-r.y/this.height*2});return isNaN(u.x)&&(u.x=0),isNaN(u.y)&&(u.y=0),u}},{key:"viewportToGraph",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.normalizationFunction.inverse(this.viewportToFramedGraph(r,i))}},{key:"graphToViewport",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.framedGraphToViewport(this.normalizationFunction(r),i)}},{key:"getGraphToViewportRatio",value:function(){var r={x:0,y:0},i={x:1,y:1},o=Math.sqrt(Math.pow(r.x-i.x,2)+Math.pow(r.y-i.y,2)),l=this.graphToViewport(r),u=this.graphToViewport(i),f=Math.sqrt(Math.pow(l.x-u.x,2)+Math.pow(l.y-u.y,2));return f/o}},{key:"getBBox",value:function(){return this.nodeExtent}},{key:"getCustomBBox",value:function(){return this.customBBox}},{key:"setCustomBBox",value:function(r){return this.customBBox=r,this.scheduleRender(),this}},{key:"kill",value:function(){this.emit("kill"),this.removeAllListeners(),this.unbindCameraHandlers(),window.removeEventListener("resize",this.activeListeners.handleResize),this.mouseCaptor.kill(),this.touchCaptor.kill(),this.unbindGraphHandlers(),this.clearIndices(),this.clearState(),this.nodeDataCache={},this.edgeDataCache={},this.highlightedNodes.clear(),this.renderFrame&&(cancelAnimationFrame(this.renderFrame),this.renderFrame=null),this.renderHighlightedNodesFrame&&(cancelAnimationFrame(this.renderHighlightedNodesFrame),this.renderHighlightedNodesFrame=null);for(var r=this.container;r.firstChild;)r.removeChild(r.firstChild);this.canvasContexts={},this.webGLContexts={},this.elements={};for(var i in this.nodePrograms)this.nodePrograms[i].kill();for(var o in this.nodeHoverPrograms)this.nodeHoverPrograms[o].kill();for(var l in this.edgePrograms)this.edgePrograms[l].kill();this.nodePrograms={},this.nodeHoverPrograms={},this.edgePrograms={};for(var u in this.elements)this.killLayer(u)}},{key:"scaleSize",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.camera.ratio;return r/this.settings.zoomToSizeRatioFunction(i)*(this.getSetting("itemSizesReference")==="positions"?i*this.graphToViewportRatio:1)}},{key:"getCanvases",value:function(){var r={};for(var i in this.elements)this.elements[i]instanceof HTMLCanvasElement&&(r[i]=this.elements[i]);return r}}])}(by);const yA=E.createContext(null),rU=yA.Provider;function wy(){const e=E.useContext(yA);if(e==null)throw new Error("No context provided: useSigmaContext() can only be used in a descendant of ");return e}function hr(){return wy().sigma}function bA(){const{sigma:e}=wy();return E.useCallback(t=>{e&&Object.keys(t).forEach(n=>{e.setSetting(n,t[n])})},[e])}function vd(e){return new Set(Object.keys(e))}const hS=vd({clickNode:!0,rightClickNode:!0,downNode:!0,enterNode:!0,leaveNode:!0,doubleClickNode:!0,wheelNode:!0,clickEdge:!0,rightClickEdge:!0,downEdge:!0,enterEdge:!0,leaveEdge:!0,doubleClickEdge:!0,wheelEdge:!0,clickStage:!0,rightClickStage:!0,downStage:!0,doubleClickStage:!0,wheelStage:!0,beforeRender:!0,afterRender:!0,kill:!0,upStage:!0,upEdge:!0,upNode:!0,enterStage:!0,leaveStage:!0,resize:!0,afterClear:!0,afterProcess:!0,beforeClear:!0,beforeProcess:!0,moveBody:!0}),pS=vd({click:!0,rightClick:!0,doubleClick:!0,mouseup:!0,mousedown:!0,mousemove:!0,mousemovebody:!0,mouseleave:!0,mouseenter:!0,wheel:!0}),mS=vd({touchup:!0,touchdown:!0,touchmove:!0,touchmovebody:!0,tap:!0,doubletap:!0}),gS=vd({updated:!0});function xA(){const e=hr(),t=bA(),[n,r]=E.useState({});return E.useEffect(()=>{if(!e||!n)return;const i=n,o=Object.keys(i);return o.forEach(l=>{const u=i[l];hS.has(l)&&e.on(l,u),pS.has(l)&&e.getMouseCaptor().on(l,u),mS.has(l)&&e.getTouchCaptor().on(l,u),gS.has(l)&&e.getCamera().on(l,u)}),()=>{e&&o.forEach(l=>{const u=i[l];hS.has(l)&&e.off(l,u),pS.has(l)&&e.getMouseCaptor().off(l,u),mS.has(l)&&e.getTouchCaptor().off(l,u),gS.has(l)&&e.getCamera().off(l,u)})}},[e,n,t]),r}function iU(){const e=hr();return E.useCallback((t,n=!0)=>{e&&t&&(n&&e.getGraph().order>0&&e.getGraph().clear(),e.getGraph().import(t),e.refresh())},[e])}function hu(e,t){if(e===t)return!0;if(typeof e=="object"&&e!=null&&typeof t=="object"&&t!=null){if(Object.keys(e).length!=Object.keys(t).length)return!1;for(const n in e)if(!Object.hasOwn(t,n)||!hu(e[n],t[n]))return!1;return!0}return!1}function wA(e){const t=hr(),[n,r]=E.useState(e||{});E.useEffect(()=>{r(d=>hu(d,e||{})?d:e||{})},[e]);const i=E.useCallback(d=>{t.getCamera().animatedZoom(Object.assign(Object.assign({},n),d))},[t,n]),o=E.useCallback(d=>{t.getCamera().animatedUnzoom(Object.assign(Object.assign({},n),d))},[t,n]),l=E.useCallback(d=>{t.getCamera().animatedReset(Object.assign(Object.assign({},n),d))},[t,n]),u=E.useCallback((d,p)=>{t.getCamera().animate(d,Object.assign(Object.assign({},n),p))},[t,n]),f=E.useCallback((d,p)=>{const m=t.getNodeDisplayData(d);m?t.getCamera().animate(m,Object.assign(Object.assign({},n),p)):console.warn(`Node ${d} not found`)},[t,n]);return{zoomIn:i,zoomOut:o,reset:l,goto:u,gotoNode:f}}function aU(e){const t=wy(),[n,r]=E.useState(!1),[i,o]=E.useState(t.container),l=E.useCallback(()=>r(u=>!u),[]);return E.useEffect(()=>(document.addEventListener("fullscreenchange",l),()=>document.removeEventListener("fullscreenchange",l)),[l]),E.useEffect(()=>{o(t.container)},[e,t.container]),{toggle:E.useCallback(()=>{var u;u=i,document.fullscreenElement!==u?u.requestFullscreen():document.exitFullscreen&&document.exitFullscreen()},[i]),isFullScreen:n}}const oU=E.forwardRef(({graph:e,id:t,className:n,style:r,settings:i={},children:o},l)=>{const u=E.useRef(null),f=E.useRef(null),d={className:`react-sigma ${n||""}`,id:t,style:r},[p,m]=E.useState(null),[v,g]=E.useState(i);E.useEffect(()=>{g(k=>hu(k,i)?k:i)},[i]),E.useEffect(()=>{m(k=>{let C=null;if(f.current!==null){let _=new St;e&&(_=typeof e=="function"?new e:e);let T=null;k&&(T=k.getCamera().getState(),k.kill()),C=new nU(_,f.current,v),T&&C.getCamera().setState(T)}return C})},[f,e,v]),E.useImperativeHandle(l,()=>p,[p]);const w=E.useMemo(()=>p&&u.current?{sigma:p,container:u.current}:null,[p,u]),x=w!==null?be.createElement(rU,{value:w},o):null;return be.createElement("div",Object.assign({},d,{ref:u}),be.createElement("div",{className:"sigma-container",ref:f}),x)});var sU=` +precision mediump float; + +varying vec4 v_color; +varying float v_border; + +const float radius = 0.5; +const vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0); + +void main(void) { + vec2 m = gl_PointCoord - vec2(0.5, 0.5); + float dist = radius - length(m); + + // No antialiasing for picking mode: + #ifdef PICKING_MODE + if (dist > v_border) + gl_FragColor = v_color; + else + gl_FragColor = transparent; + + #else + float t = 0.0; + if (dist > v_border) + t = 1.0; + else if (dist > 0.0) + t = dist / v_border; + + gl_FragColor = mix(transparent, v_color, t); + #endif +} +`,lU=sU,uU=` +attribute vec4 a_id; +attribute vec4 a_color; +attribute vec2 a_position; +attribute float a_size; + +uniform float u_sizeRatio; +uniform float u_pixelRatio; +uniform mat3 u_matrix; + +varying vec4 v_color; +varying float v_border; + +const float bias = 255.0 / 254.0; + +void main() { + gl_Position = vec4( + (u_matrix * vec3(a_position, 1)).xy, + 0, + 1 + ); + + // Multiply the point size twice: + // - x SCALING_RATIO to correct the canvas scaling + // - x 2 to correct the formulae + gl_PointSize = a_size / u_sizeRatio * u_pixelRatio * 2.0; + + v_border = (0.5 / a_size) * u_sizeRatio; + + #ifdef PICKING_MODE + // For picking mode, we use the ID as the color: + v_color = a_id; + #else + // For normal mode, we use the color: + v_color = a_color; + #endif + + v_color.a *= bias; +} +`,cU=uU,SA=WebGLRenderingContext,vS=SA.UNSIGNED_BYTE,yS=SA.FLOAT,fU=["u_sizeRatio","u_pixelRatio","u_matrix"],dU=function(e){function t(){return tn(this,t),Pn(this,t,arguments)}return Fn(t,e),nn(t,[{key:"getDefinition",value:function(){return{VERTICES:1,VERTEX_SHADER_SOURCE:cU,FRAGMENT_SHADER_SOURCE:lU,METHOD:WebGLRenderingContext.POINTS,UNIFORMS:fU,ATTRIBUTES:[{name:"a_position",size:2,type:yS},{name:"a_size",size:1,type:yS},{name:"a_color",size:4,type:vS,normalized:!0},{name:"a_id",size:4,type:vS,normalized:!0}]}}},{key:"processVisibleItem",value:function(r,i,o){var l=this.array;l[i++]=o.x,l[i++]=o.y,l[i++]=o.size,l[i++]=Yr(o.color),l[i++]=r}},{key:"setUniforms",value:function(r,i){var o=r.sizeRatio,l=r.pixelRatio,u=r.matrix,f=i.gl,d=i.uniformLocations,p=d.u_sizeRatio,m=d.u_pixelRatio,v=d.u_matrix;f.uniform1f(m,l),f.uniform1f(p,o),f.uniformMatrix3fv(v,!1,u)}}])}(vy),hU=` +attribute vec4 a_id; +attribute vec4 a_color; +attribute vec2 a_normal; +attribute float a_normalCoef; +attribute vec2 a_positionStart; +attribute vec2 a_positionEnd; +attribute float a_positionCoef; +attribute float a_sourceRadius; +attribute float a_targetRadius; +attribute float a_sourceRadiusCoef; +attribute float a_targetRadiusCoef; + +uniform mat3 u_matrix; +uniform float u_zoomRatio; +uniform float u_sizeRatio; +uniform float u_pixelRatio; +uniform float u_correctionRatio; +uniform float u_minEdgeThickness; +uniform float u_lengthToThicknessRatio; +uniform float u_feather; + +varying vec4 v_color; +varying vec2 v_normal; +varying float v_thickness; +varying float v_feather; + +const float bias = 255.0 / 254.0; + +void main() { + float minThickness = u_minEdgeThickness; + + vec2 normal = a_normal * a_normalCoef; + vec2 position = a_positionStart * (1.0 - a_positionCoef) + a_positionEnd * a_positionCoef; + + float normalLength = length(normal); + vec2 unitNormal = normal / normalLength; + + // These first computations are taken from edge.vert.glsl. Please read it to + // get better comments on what's happening: + float pixelsThickness = max(normalLength, minThickness * u_sizeRatio); + float webGLThickness = pixelsThickness * u_correctionRatio / u_sizeRatio; + + // Here, we move the point to leave space for the arrow heads: + // Source arrow head + float sourceRadius = a_sourceRadius * a_sourceRadiusCoef; + float sourceDirection = sign(sourceRadius); + float webGLSourceRadius = sourceDirection * sourceRadius * 2.0 * u_correctionRatio / u_sizeRatio; + float webGLSourceArrowHeadLength = webGLThickness * u_lengthToThicknessRatio * 2.0; + vec2 sourceCompensationVector = + vec2(-sourceDirection * unitNormal.y, sourceDirection * unitNormal.x) + * (webGLSourceRadius + webGLSourceArrowHeadLength); + + // Target arrow head + float targetRadius = a_targetRadius * a_targetRadiusCoef; + float targetDirection = sign(targetRadius); + float webGLTargetRadius = targetDirection * targetRadius * 2.0 * u_correctionRatio / u_sizeRatio; + float webGLTargetArrowHeadLength = webGLThickness * u_lengthToThicknessRatio * 2.0; + vec2 targetCompensationVector = + vec2(-targetDirection * unitNormal.y, targetDirection * unitNormal.x) + * (webGLTargetRadius + webGLTargetArrowHeadLength); + + // Here is the proper position of the vertex + gl_Position = vec4((u_matrix * vec3(position + unitNormal * webGLThickness + sourceCompensationVector + targetCompensationVector, 1)).xy, 0, 1); + + v_thickness = webGLThickness / u_zoomRatio; + + v_normal = unitNormal; + + v_feather = u_feather * u_correctionRatio / u_zoomRatio / u_pixelRatio * 2.0; + + #ifdef PICKING_MODE + // For picking mode, we use the ID as the color: + v_color = a_id; + #else + // For normal mode, we use the color: + v_color = a_color; + #endif + + v_color.a *= bias; +} +`,pU=hU,EA=WebGLRenderingContext,bS=EA.UNSIGNED_BYTE,gi=EA.FLOAT,mU=["u_matrix","u_zoomRatio","u_sizeRatio","u_correctionRatio","u_pixelRatio","u_feather","u_minEdgeThickness","u_lengthToThicknessRatio"],gU={lengthToThicknessRatio:du.lengthToThicknessRatio};function _A(e){var t=Fe(Fe({},gU),{});return function(n){function r(){return tn(this,r),Pn(this,r,arguments)}return Fn(r,n),nn(r,[{key:"getDefinition",value:function(){return{VERTICES:6,VERTEX_SHADER_SOURCE:pU,FRAGMENT_SHADER_SOURCE:yy,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:mU,ATTRIBUTES:[{name:"a_positionStart",size:2,type:gi},{name:"a_positionEnd",size:2,type:gi},{name:"a_normal",size:2,type:gi},{name:"a_color",size:4,type:bS,normalized:!0},{name:"a_id",size:4,type:bS,normalized:!0},{name:"a_sourceRadius",size:1,type:gi},{name:"a_targetRadius",size:1,type:gi}],CONSTANT_ATTRIBUTES:[{name:"a_positionCoef",size:1,type:gi},{name:"a_normalCoef",size:1,type:gi},{name:"a_sourceRadiusCoef",size:1,type:gi},{name:"a_targetRadiusCoef",size:1,type:gi}],CONSTANT_DATA:[[0,1,-1,0],[0,-1,1,0],[1,1,0,1],[1,1,0,1],[0,-1,1,0],[1,-1,0,-1]]}}},{key:"processVisibleItem",value:function(o,l,u,f,d){var p=d.size||1,m=u.x,v=u.y,g=f.x,w=f.y,x=Yr(d.color),k=g-m,C=w-v,_=u.size||1,T=f.size||1,N=k*k+C*C,D=0,L=0;N&&(N=1/Math.sqrt(N),D=-C*N*p,L=k*N*p);var R=this.array;R[l++]=m,R[l++]=v,R[l++]=g,R[l++]=w,R[l++]=D,R[l++]=L,R[l++]=x,R[l++]=o,R[l++]=_,R[l++]=T}},{key:"setUniforms",value:function(o,l){var u=l.gl,f=l.uniformLocations,d=f.u_matrix,p=f.u_zoomRatio,m=f.u_feather,v=f.u_pixelRatio,g=f.u_correctionRatio,w=f.u_sizeRatio,x=f.u_minEdgeThickness,k=f.u_lengthToThicknessRatio;u.uniformMatrix3fv(d,!1,o.matrix),u.uniform1f(p,o.zoomRatio),u.uniform1f(w,o.sizeRatio),u.uniform1f(g,o.correctionRatio),u.uniform1f(v,o.pixelRatio),u.uniform1f(m,o.antiAliasingFeather),u.uniform1f(x,o.minEdgeThickness),u.uniform1f(k,t.lengthToThicknessRatio)}}])}(cu)}_A();function vU(e){return oA([_A(),Tf(e),Tf(Fe(Fe({},e),{},{extremity:"source"}))])}vU();function yU(e){if(Array.isArray(e))return e}function bU(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,u=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);f=!0);}catch(p){d=!0,i=p}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw i}}return u}}function Vg(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n v_radius) + gl_FragColor = transparent; + else { + gl_FragColor = v_color; + gl_FragColor.a *= bias; + } + #else + // Sizes: +`).concat(t.flatMap(function(i,o){var l=i.size;if("fill"in l)return[];l=l;var u="attribute"in l?"v_borderSize_".concat(o+1):K1(l.value),f=(l.mode||OU)==="pixels"?"u_correctionRatio":"v_radius";return[" float borderSize_".concat(o+1," = ").concat(f," * ").concat(u,";")]}).join(` +`),` + // Now, let's split the remaining space between "fill" borders: + float fillBorderSize = (v_radius - (`).concat(t.flatMap(function(i,o){var l=i.size;return"fill"in l?[]:["borderSize_".concat(o+1)]}).join(" + "),") ) / ").concat(n,`; +`).concat(t.flatMap(function(i,o){var l=i.size;return"fill"in l?[" float borderSize_".concat(o+1," = fillBorderSize;")]:[]}).join(` +`),` + + // Finally, normalize all border sizes, to start from the full size and to end with the smallest: + float adjustedBorderSize_0 = v_radius; +`).concat(t.map(function(i,o){return" float adjustedBorderSize_".concat(o+1," = adjustedBorderSize_").concat(o," - borderSize_").concat(o+1,";")}).join(` +`),` + + // Colors: + vec4 borderColor_0 = transparent; +`).concat(t.map(function(i,o){var l=i.color,u=[];return"attribute"in l?u.push(" vec4 borderColor_".concat(o+1," = v_borderColor_").concat(o+1,";")):"transparent"in l?u.push(" vec4 borderColor_".concat(o+1," = vec4(0.0, 0.0, 0.0, 0.0);")):u.push(" vec4 borderColor_".concat(o+1," = u_borderColor_").concat(o+1,";")),u.push(" borderColor_".concat(o+1,".a *= bias;")),u.push(" if (borderSize_".concat(o+1," <= 1.0 * u_correctionRatio) { borderColor_").concat(o+1," = borderColor_").concat(o,"; }")),u.join(` +`)}).join(` +`),` + if (dist > adjustedBorderSize_0) { + gl_FragColor = borderColor_0; + } else `).concat(t.map(function(i,o){return"if (dist > adjustedBorderSize_".concat(o,` - aaBorder) { + gl_FragColor = mix(borderColor_`).concat(o+1,", borderColor_").concat(o,", (dist - adjustedBorderSize_").concat(o,` + aaBorder) / aaBorder); + } else if (dist > adjustedBorderSize_`).concat(o+1,`) { + gl_FragColor = borderColor_`).concat(o+1,`; + } else `)}).join(""),` { /* Nothing to add here */ } + #endif +} +`);return r}function MU(e){var t=e.borders,n=` +attribute vec2 a_position; +attribute float a_size; +attribute float a_angle; + +uniform mat3 u_matrix; +uniform float u_sizeRatio; +uniform float u_correctionRatio; + +varying vec2 v_diffVector; +varying float v_radius; + +#ifdef PICKING_MODE +attribute vec4 a_id; +varying vec4 v_color; +#else +`.concat(t.flatMap(function(r,i){var o=r.size;return"attribute"in o?["attribute float a_borderSize_".concat(i+1,";"),"varying float v_borderSize_".concat(i+1,";")]:[]}).join(` +`),` +`).concat(t.flatMap(function(r,i){var o=r.color;return"attribute"in o?["attribute vec4 a_borderColor_".concat(i+1,";"),"varying vec4 v_borderColor_".concat(i+1,";")]:[]}).join(` +`),` +#endif + +const float bias = 255.0 / 254.0; +const vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0); + +void main() { + float size = a_size * u_correctionRatio / u_sizeRatio * 4.0; + vec2 diffVector = size * vec2(cos(a_angle), sin(a_angle)); + vec2 position = a_position + diffVector; + gl_Position = vec4( + (u_matrix * vec3(position, 1)).xy, + 0, + 1 + ); + + v_radius = size / 2.0; + v_diffVector = diffVector; + + #ifdef PICKING_MODE + v_color = a_id; + #else +`).concat(t.flatMap(function(r,i){var o=r.size;return"attribute"in o?[" v_borderSize_".concat(i+1," = a_borderSize_").concat(i+1,";")]:[]}).join(` +`),` +`).concat(t.flatMap(function(r,i){var o=r.color;return"attribute"in o?[" v_borderColor_".concat(i+1," = a_borderColor_").concat(i+1,";")]:[]}).join(` +`),` + #endif +} +`);return n}var AA=WebGLRenderingContext,SS=AA.UNSIGNED_BYTE,$c=AA.FLOAT;function PU(e){var t,n=wS(wS({},jU),{}),r=n.borders,i=n.drawLabel,o=n.drawHover,l=["u_sizeRatio","u_correctionRatio","u_matrix"].concat(gm(r.flatMap(function(u,f){var d=u.color;return"value"in d?["u_borderColor_".concat(f+1)]:[]})));return t=function(u){AU(f,u);function f(){var d;SU(this,f);for(var p=arguments.length,m=new Array(p),v=0;ve.length)&&(t=e.length);for(var n=0,r=Array(t);nO){var X="…";for(x=x+X,M=o.measureText(x).width;M>O&&x.length>1;)x=x.slice(0,-2)+X,M=o.measureText(x).width;if(x.length<4)return}for(var re={},ue=0,ae=x.length;ue{const n=this.nodeIdMap[t];if(n!==void 0)return this.nodes[n]});mi(this,"getEdge",(t,n=!0)=>{const r=n?this.edgeDynamicIdMap[t]:this.edgeIdMap[t];if(r!==void 0)return this.edges[r]});mi(this,"buildDynamicMap",()=>{this.edgeDynamicIdMap={};for(let t=0;t({selectedNode:null,focusedNode:null,selectedEdge:null,focusedEdge:null,moveToSelectedNode:!1,rawGraph:null,sigmaGraph:null,setSelectedNode:(t,n)=>e({selectedNode:t,moveToSelectedNode:n}),setFocusedNode:t=>e({focusedNode:t}),setSelectedEdge:t=>e({selectedEdge:t}),setFocusedEdge:t=>e({focusedEdge:t}),clearSelection:()=>e({selectedNode:null,focusedNode:null,selectedEdge:null,focusedEdge:null}),reset:()=>e({selectedNode:null,focusedNode:null,selectedEdge:null,focusedEdge:null,rawGraph:null,sigmaGraph:null,moveToSelectedNode:!1}),setRawGraph:t=>e({rawGraph:t}),setSigmaGraph:t=>e({sigmaGraph:t}),setMoveToSelectedNode:t=>e({moveToSelectedNode:t})})),yt=Dv(iB),aB=({node:e,move:t})=>{const n=hr(),{gotoNode:r}=wA();return E.useEffect(()=>{if(e)return n.getGraph().setNodeAttribute(e,"highlighted",!0),t&&(r(e),yt.getState().setMoveToSelectedNode(!1)),()=>{n.getGraph().setNodeAttribute(e,"highlighted",!1)}},[e,t,n,r]),null};function ks(e,t){const n=hr(),r=E.useRef(t);return hu(r.current,t)||(r.current=t),{positions:E.useCallback(()=>r.current?e(n.getGraph(),r.current):{},[n,r,e]),assign:E.useCallback(()=>{r.current&&e.assign(n.getGraph(),r.current)},[n,r,e])}}function Ey(e,t){const n=hr(),[r,i]=E.useState(!1),[o,l]=E.useState(null),u=E.useRef(t);return hu(u.current,t)||(u.current=t),E.useEffect(()=>{i(!1);let f=null;return u.current&&(f=new e(n.getGraph(),u.current)),l(f),()=>{f!==null&&f.kill()}},[n,u,l,i,e]),{stop:E.useCallback(()=>{o&&(o.stop(),i(!1))},[o,i]),start:E.useCallback(()=>{o&&(o.start(),i(!0))},[o,i]),kill:E.useCallback(()=>{o&&o.kill(),i(!1)},[o,i]),isRunning:r}}var ym,kS;function pu(){if(kS)return ym;kS=1;function e(n){return!n||typeof n!="object"||typeof n=="function"||Array.isArray(n)||n instanceof Set||n instanceof Map||n instanceof RegExp||n instanceof Date}function t(n,r){n=n||{};var i={};for(var o in r){var l=n[o],u=r[o];if(!e(u)){i[o]=t(l,u);continue}l===void 0?i[o]=u:i[o]=l}return i}return ym=t,ym}var bm,CS;function oB(){if(CS)return bm;CS=1;function e(n){return function(r,i){return r+Math.floor(n()*(i-r+1))}}var t=e(Math.random);return t.createRandom=e,bm=t,bm}var xm,TS;function sB(){if(TS)return xm;TS=1;var e=oB().createRandom;function t(r){var i=e(r);return function(o){for(var l=o.length,u=l-1,f=-1;++f0},i.prototype.addChild=function(R,U){this.children[R]=U,++this.countChildren},i.prototype.getChild=function(R){if(!this.children.hasOwnProperty(R)){var U=new i;this.children[R]=U,++this.countChildren}return this.children[R]},i.prototype.applyPositionToChildren=function(){if(this.hasChildren()){var R=this;for(var U in R.children){var P=R.children[U];P.x+=R.x,P.y+=R.y,P.applyPositionToChildren()}}};function o(R,U,P){for(var z in U.children){var V=U.children[z];V.hasChildren()?o(R,V,P):P[V.id]={x:V.x,y:V.y}}}function l(R,U){var P=R.r-U.r,z=U.x-R.x,V=U.y-R.y;return P<0||P*P0&&P*P>z*z+V*V}function f(R,U){for(var P=0;PZ?(V=(B+Z-q)/(2*B),Y=Math.sqrt(Math.max(0,Z/B-V*V)),P.x=R.x-V*z-Y*I,P.y=R.y-V*I+Y*z):(V=(B+q-Z)/(2*B),Y=Math.sqrt(Math.max(0,q/B-V*V)),P.x=U.x+V*z-Y*I,P.y=U.y+V*I+Y*z)):(P.x=U.x+P.r,P.y=U.y)}function C(R,U){var P=R.r+U.r-1e-6,z=U.x-R.x,V=U.y-R.y;return P>0&&P*P>z*z+V*V}function _(R,U){var P=R.length;if(P===0)return 0;var z,V,q,I,Y,Z,B,G,F,K;if(z=R[0],z.x=0,z.y=0,P<=1)return z.r;if(V=R[1],z.x=-V.r,V.x=z.r,V.y=0,P<=2)return z.r+V.r;q=R[2],k(V,z,q),z=new i(null,null,null,null,z),V=new i(null,null,null,null,V),q=new i(null,null,null,null,q),z.next=q.previous=V,V.next=z.previous=q,q.next=V.previous=z;e:for(Z=3;Z"u"?i:d};typeof i=="function"&&(l=i);var u=function(d){return l(d[r])},f=function(){return l(void 0)};return typeof r=="string"?(o.fromAttributes=u,o.fromGraph=function(d,p){return u(d.getNodeAttributes(p))},o.fromEntry=function(d,p){return u(p)}):typeof r=="function"?(o.fromAttributes=function(){throw new Error("graphology-utils/getters/createNodeValueGetter: irrelevant usage.")},o.fromGraph=function(d,p){return l(r(p,d.getNodeAttributes(p)))},o.fromEntry=function(d,p){return l(r(d,p))}):(o.fromAttributes=f,o.fromGraph=f,o.fromEntry=f),o}function n(r,i){var o={},l=function(d){return typeof d>"u"?i:d};typeof i=="function"&&(l=i);var u=function(d){return l(d[r])},f=function(){return l(void 0)};return typeof r=="string"?(o.fromAttributes=u,o.fromGraph=function(d,p){return u(d.getEdgeAttributes(p))},o.fromEntry=function(d,p){return u(p)},o.fromPartialEntry=o.fromEntry,o.fromMinimalEntry=o.fromEntry):typeof r=="function"?(o.fromAttributes=function(){throw new Error("graphology-utils/getters/createEdgeValueGetter: irrelevant usage.")},o.fromGraph=function(d,p){var m=d.extremities(p);return l(r(p,d.getEdgeAttributes(p),m[0],m[1],d.getNodeAttributes(m[0]),d.getNodeAttributes(m[1]),d.isUndirected(p)))},o.fromEntry=function(d,p,m,v,g,w,x){return l(r(d,p,m,v,g,w,x))},o.fromPartialEntry=function(d,p,m,v){return l(r(d,p,m,v))},o.fromMinimalEntry=function(d,p){return l(r(d,p))}):(o.fromAttributes=f,o.fromGraph=f,o.fromEntry=f,o.fromMinimalEntry=f),o}return jl.createNodeValueGetter=t,jl.createEdgeValueGetter=n,jl.createEdgeWeightGetter=function(r){return n(r,e)},jl}var Em,NS;function MA(){if(NS)return Em;NS=1;const{createNodeValueGetter:e,createEdgeValueGetter:t}=_y();return Em=function(r,i,o){const{nodeXAttribute:l,nodeYAttribute:u}=o,{attraction:f,repulsion:d,gravity:p,inertia:m,maxMove:v}=o.settings;let{shouldSkipNode:g,shouldSkipEdge:w,isNodeFixed:x}=o;x=e(x),g=e(g,!1),w=t(w,!1);const k=r.filterNodes((T,N)=>!g.fromEntry(T,N)),C=k.length;for(let T=0;T{if(D===L||g.fromEntry(D,R)||g.fromEntry(L,U)||w.fromEntry(T,N,D,L,R,U,P))return;const z=i[D],V=i[L],q=V.x-z.x,I=V.y-z.y,Y=Math.sqrt(q*q+I*I)||1,Z=f*Y*q,B=f*Y*I;z.dx+=Z,z.dy+=B,V.dx-=Z,V.dy-=B}),p)for(let T=0;Tv&&(D.dx*=v/L,D.dy*=v/L),x.fromGraph(r,N)?D.fixed=!0:(D.x+=D.dx,D.y+=D.dy,D.fixed=!1)}return{converged:_}},Em}var Hc={},OS;function PA(){return OS||(OS=1,Hc.assignLayoutChanges=function(e,t,n){const{nodeXAttribute:r,nodeYAttribute:i}=n;e.updateEachNodeAttributes((o,l)=>{const u=t[o];return!u||u.fixed||(l[r]=u.x,l[i]=u.y),l},{attributes:["x","y"]})},Hc.collectLayoutChanges=function(e){const t={};for(const n in e){const r=e[n];t[n]={x:r.x,y:r.y}}return t}),Hc}var _m,jS;function FA(){return jS||(jS=1,_m={nodeXAttribute:"x",nodeYAttribute:"y",isNodeFixed:"fixed",shouldSkipNode:null,shouldSkipEdge:null,settings:{attraction:5e-4,repulsion:.1,gravity:1e-4,inertia:.6,maxMove:200}}),_m}var km,LS;function gB(){if(LS)return km;LS=1;const e=Wr(),t=pu(),n=MA(),r=PA(),i=FA();function o(u,f,d){if(!e(f))throw new Error("graphology-layout-force: the given graph is not a valid graphology instance.");typeof d=="number"?d={maxIterations:d}:d=d||{};const p=d.maxIterations;if(d=t(d,i),typeof p!="number"||p<=0)throw new Error("graphology-layout-force: you should provide a positive number of maximum iterations.");const m={};let v=null,g;for(g=0;gthis.runFrame())},o.prototype.stop=function(){return this.running=!1,this.frameID!==null&&(window.cancelAnimationFrame(this.frameID),this.frameID=null),this},o.prototype.start=function(){if(this.killed)throw new Error("graphology-layout-force/worker.start: layout was killed.");this.running||(this.running=!0,this.runFrame())},o.prototype.kill=function(){this.stop(),delete this.nodeStates,this.killed=!0},Cm=o,Cm}var xB=bB();const wB=fn(xB);function SB(e={maxIterations:100}){return ks(yB,e)}function EB(e={}){return Ey(wB,e)}var Tm,MS;function _B(){if(MS)return Tm;MS=1;var e=0,t=1,n=2,r=3,i=4,o=5,l=6,u=7,f=8,d=9,p=0,m=1,v=2,g=0,w=1,x=2,k=3,C=4,_=5,T=6,N=7,D=8,L=3,R=10,U=3,P=9,z=10;return Tm=function(q,I,Y){var Z,B,G,F,K,A,H,M,O,X,re=I.length,ue=Y.length,ae=q.adjustSizes,oe=q.barnesHutTheta*q.barnesHutTheta,Ce,he,Ee,we,Pe,Ae,xe,ee=[];for(G=0;GNe?(ge-=(ve-Ne)/2,Se=ge+ve):(ce-=(Ne-ve)/2,Te=ce+Ne),ee[0+g]=-1,ee[0+w]=(ce+Te)/2,ee[0+x]=(ge+Se)/2,ee[0+k]=Math.max(Te-ce,Se-ge),ee[0+C]=-1,ee[0+_]=-1,ee[0+T]=0,ee[0+N]=0,ee[0+D]=0,Z=1,G=0;G=0){I[G+e]=0)if(Ae=Math.pow(I[G+e]-ee[B+N],2)+Math.pow(I[G+t]-ee[B+D],2),X=ee[B+k],4*X*X/Ae0?(xe=he*I[G+l]*ee[B+T]/Ae,I[G+n]+=Ee*xe,I[G+r]+=we*xe):Ae<0&&(xe=-he*I[G+l]*ee[B+T]/Math.sqrt(Ae),I[G+n]+=Ee*xe,I[G+r]+=we*xe):Ae>0&&(xe=he*I[G+l]*ee[B+T]/Ae,I[G+n]+=Ee*xe,I[G+r]+=we*xe),B=ee[B+C],B<0)break;continue}else{B=ee[B+_];continue}else{if(A=ee[B+g],A>=0&&A!==G&&(Ee=I[G+e]-I[A+e],we=I[G+t]-I[A+t],Ae=Ee*Ee+we*we,ae===!0?Ae>0?(xe=he*I[G+l]*I[A+l]/Ae,I[G+n]+=Ee*xe,I[G+r]+=we*xe):Ae<0&&(xe=-he*I[G+l]*I[A+l]/Math.sqrt(Ae),I[G+n]+=Ee*xe,I[G+r]+=we*xe):Ae>0&&(xe=he*I[G+l]*I[A+l]/Ae,I[G+n]+=Ee*xe,I[G+r]+=we*xe)),B=ee[B+C],B<0)break;continue}else for(he=q.scalingRatio,F=0;F0?(xe=he*I[F+l]*I[K+l]/Ae/Ae,I[F+n]+=Ee*xe,I[F+r]+=we*xe,I[K+n]-=Ee*xe,I[K+r]-=we*xe):Ae<0&&(xe=100*he*I[F+l]*I[K+l],I[F+n]+=Ee*xe,I[F+r]+=we*xe,I[K+n]-=Ee*xe,I[K+r]-=we*xe)):(Ae=Math.sqrt(Ee*Ee+we*we),Ae>0&&(xe=he*I[F+l]*I[K+l]/Ae/Ae,I[F+n]+=Ee*xe,I[F+r]+=we*xe,I[K+n]-=Ee*xe,I[K+r]-=we*xe));for(O=q.gravity/q.scalingRatio,he=q.scalingRatio,G=0;G0&&(xe=he*I[G+l]*O):Ae>0&&(xe=he*I[G+l]*O/Ae),I[G+n]-=Ee*xe,I[G+r]-=we*xe;for(he=1*(q.outboundAttractionDistribution?Ce:1),H=0;H0&&(xe=-he*Pe*Math.log(1+Ae)/Ae/I[F+l]):Ae>0&&(xe=-he*Pe*Math.log(1+Ae)/Ae):q.outboundAttractionDistribution?Ae>0&&(xe=-he*Pe/I[F+l]):Ae>0&&(xe=-he*Pe)):(Ae=Math.sqrt(Math.pow(Ee,2)+Math.pow(we,2)),q.linLogMode?q.outboundAttractionDistribution?Ae>0&&(xe=-he*Pe*Math.log(1+Ae)/Ae/I[F+l]):Ae>0&&(xe=-he*Pe*Math.log(1+Ae)/Ae):q.outboundAttractionDistribution?(Ae=1,xe=-he*Pe/I[F+l]):(Ae=1,xe=-he*Pe)),Ae>0&&(I[F+n]+=Ee*xe,I[F+r]+=we*xe,I[K+n]-=Ee*xe,I[K+r]-=we*xe);var te,de,Oe,He,Ye,vt;if(ae===!0)for(G=0;Gz&&(I[G+n]=I[G+n]*z/te,I[G+r]=I[G+r]*z/te),de=I[G+l]*Math.sqrt((I[G+i]-I[G+n])*(I[G+i]-I[G+n])+(I[G+o]-I[G+r])*(I[G+o]-I[G+r])),Oe=Math.sqrt((I[G+i]+I[G+n])*(I[G+i]+I[G+n])+(I[G+o]+I[G+r])*(I[G+o]+I[G+r]))/2,He=.1*Math.log(1+Oe)/(1+Math.sqrt(de)),Ye=I[G+e]+I[G+n]*(He/q.slowDown),I[G+e]=Ye,vt=I[G+t]+I[G+r]*(He/q.slowDown),I[G+t]=vt);else for(G=0;G=0)?{message:"the `scalingRatio` setting should be a number >= 0."}:"strongGravityMode"in n&&typeof n.strongGravityMode!="boolean"?{message:"the `strongGravityMode` setting should be a boolean."}:"gravity"in n&&!(typeof n.gravity=="number"&&n.gravity>=0)?{message:"the `gravity` setting should be a number >= 0."}:"slowDown"in n&&!(typeof n.slowDown=="number"||n.slowDown>=0)?{message:"the `slowDown` setting should be a number >= 0."}:"barnesHutOptimize"in n&&typeof n.barnesHutOptimize!="boolean"?{message:"the `barnesHutOptimize` setting should be a boolean."}:"barnesHutTheta"in n&&!(typeof n.barnesHutTheta=="number"&&n.barnesHutTheta>=0)?{message:"the `barnesHutTheta` setting should be a number >= 0."}:null},vi.graphToByteArrays=function(n,r){var i=n.order,o=n.size,l={},u,f=new Float32Array(i*e),d=new Float32Array(o*t);return u=0,n.forEachNode(function(p,m){l[p]=u,f[u]=m.x,f[u+1]=m.y,f[u+2]=0,f[u+3]=0,f[u+4]=0,f[u+5]=0,f[u+6]=1,f[u+7]=1,f[u+8]=m.size||1,f[u+9]=m.fixed?1:0,u+=e}),u=0,n.forEachEdge(function(p,m,v,g,w,x,k){var C=l[v],_=l[g],T=r(p,m,v,g,w,x,k);f[C+6]+=T,f[_+6]+=T,d[u]=C,d[u+1]=_,d[u+2]=T,u+=t}),{nodes:f,edges:d}},vi.assignLayoutChanges=function(n,r,i){var o=0;n.updateEachNodeAttributes(function(l,u){return u.x=r[o],u.y=r[o+1],o+=e,i?i(l,u):u})},vi.readGraphPositions=function(n,r){var i=0;n.forEachNode(function(o,l){r[i]=l.x,r[i+1]=l.y,i+=e})},vi.collectLayoutChanges=function(n,r,i){for(var o=n.nodes(),l={},u=0,f=0,d=r.length;u2e3,strongGravityMode:!0,gravity:.05,scalingRatio:10,slowDown:1+Math.log(d)}}var u=o.bind(null,!1);return u.assign=o.bind(null,!0),u.inferSettings=l,Rm=u,Rm}var CB=kB();const TB=fn(CB);var Dm,GS;function AB(){return GS||(GS=1,Dm=function(){var t,n,r={};(function(){var o=0,l=1,u=2,f=3,d=4,p=5,m=6,v=7,g=8,w=9,x=0,k=1,C=2,_=0,T=1,N=2,D=3,L=4,R=5,U=6,P=7,z=8,V=3,q=10,I=3,Y=9,Z=10;r.exports=function(G,F,K){var A,H,M,O,X,re,ue,ae,oe,Ce,he=F.length,Ee=K.length,we=G.adjustSizes,Pe=G.barnesHutTheta*G.barnesHutTheta,Ae,xe,ee,ce,Te,ge,Se,ie=[];for(M=0;MYe?(ve-=(He-Ye)/2,Ne=ve+He):($e-=(Ye-He)/2,Ge=$e+Ye),ie[0+_]=-1,ie[0+T]=($e+Ge)/2,ie[0+N]=(ve+Ne)/2,ie[0+D]=Math.max(Ge-$e,Ne-ve),ie[0+L]=-1,ie[0+R]=-1,ie[0+U]=0,ie[0+P]=0,ie[0+z]=0,A=1,M=0;M=0){F[M+o]=0)if(ge=Math.pow(F[M+o]-ie[H+P],2)+Math.pow(F[M+l]-ie[H+z],2),Ce=ie[H+D],4*Ce*Ce/ge0?(Se=xe*F[M+m]*ie[H+U]/ge,F[M+u]+=ee*Se,F[M+f]+=ce*Se):ge<0&&(Se=-xe*F[M+m]*ie[H+U]/Math.sqrt(ge),F[M+u]+=ee*Se,F[M+f]+=ce*Se):ge>0&&(Se=xe*F[M+m]*ie[H+U]/ge,F[M+u]+=ee*Se,F[M+f]+=ce*Se),H=ie[H+L],H<0)break;continue}else{H=ie[H+R];continue}else{if(re=ie[H+_],re>=0&&re!==M&&(ee=F[M+o]-F[re+o],ce=F[M+l]-F[re+l],ge=ee*ee+ce*ce,we===!0?ge>0?(Se=xe*F[M+m]*F[re+m]/ge,F[M+u]+=ee*Se,F[M+f]+=ce*Se):ge<0&&(Se=-xe*F[M+m]*F[re+m]/Math.sqrt(ge),F[M+u]+=ee*Se,F[M+f]+=ce*Se):ge>0&&(Se=xe*F[M+m]*F[re+m]/ge,F[M+u]+=ee*Se,F[M+f]+=ce*Se)),H=ie[H+L],H<0)break;continue}else for(xe=G.scalingRatio,O=0;O0?(Se=xe*F[O+m]*F[X+m]/ge/ge,F[O+u]+=ee*Se,F[O+f]+=ce*Se,F[X+u]-=ee*Se,F[X+f]-=ce*Se):ge<0&&(Se=100*xe*F[O+m]*F[X+m],F[O+u]+=ee*Se,F[O+f]+=ce*Se,F[X+u]-=ee*Se,F[X+f]-=ce*Se)):(ge=Math.sqrt(ee*ee+ce*ce),ge>0&&(Se=xe*F[O+m]*F[X+m]/ge/ge,F[O+u]+=ee*Se,F[O+f]+=ce*Se,F[X+u]-=ee*Se,F[X+f]-=ce*Se));for(oe=G.gravity/G.scalingRatio,xe=G.scalingRatio,M=0;M0&&(Se=xe*F[M+m]*oe):ge>0&&(Se=xe*F[M+m]*oe/ge),F[M+u]-=ee*Se,F[M+f]-=ce*Se;for(xe=1*(G.outboundAttractionDistribution?Ae:1),ue=0;ue0&&(Se=-xe*Te*Math.log(1+ge)/ge/F[O+m]):ge>0&&(Se=-xe*Te*Math.log(1+ge)/ge):G.outboundAttractionDistribution?ge>0&&(Se=-xe*Te/F[O+m]):ge>0&&(Se=-xe*Te)):(ge=Math.sqrt(Math.pow(ee,2)+Math.pow(ce,2)),G.linLogMode?G.outboundAttractionDistribution?ge>0&&(Se=-xe*Te*Math.log(1+ge)/ge/F[O+m]):ge>0&&(Se=-xe*Te*Math.log(1+ge)/ge):G.outboundAttractionDistribution?(ge=1,Se=-xe*Te/F[O+m]):(ge=1,Se=-xe*Te)),ge>0&&(F[O+u]+=ee*Se,F[O+f]+=ce*Se,F[X+u]-=ee*Se,F[X+f]-=ce*Se);var vt,Mt,bt,rt,qt,at;if(we===!0)for(M=0;MZ&&(F[M+u]=F[M+u]*Z/vt,F[M+f]=F[M+f]*Z/vt),Mt=F[M+m]*Math.sqrt((F[M+d]-F[M+u])*(F[M+d]-F[M+u])+(F[M+p]-F[M+f])*(F[M+p]-F[M+f])),bt=Math.sqrt((F[M+d]+F[M+u])*(F[M+d]+F[M+u])+(F[M+p]+F[M+f])*(F[M+p]+F[M+f]))/2,rt=.1*Math.log(1+bt)/(1+Math.sqrt(Mt)),qt=F[M+o]+F[M+u]*(rt/G.slowDown),F[M+o]=qt,at=F[M+l]+F[M+f]*(rt/G.slowDown),F[M+l]=at);else for(M=0;M1&&Ee.has(Se))&&(F>1&&Ee.add(Se),xe=f[Pe+e],ce=f[Pe+t],ge=f[Pe+n],ie=xe-Ae,$e=ce-ee,Ge=Math.sqrt(ie*ie+$e*$e),ve=Ge0?(R[Pe]+=ie/Ge*(1+Te),U[Pe]+=$e/Ge*(1+Te)):(R[Pe]+=I*o(),U[Pe]+=Y*o())));for(w=0,x=0;w1&&xe.has(ve))&&(M>1&&xe.add(ve),ge=v[ce+i],ie=v[ce+o],Ge=v[ce+l],Ne=ge-Te,te=ie-Se,de=Math.sqrt(Ne*Ne+te*te),Oe=de<$e*w+g+(Ge*w+g),Oe&&(U=!1,ce=ce/u|0,de>0?(V[ce]+=Ne/de*(1+$e),q[ce]+=te/de*(1+$e)):(V[ce]+=G*d(),q[ce]+=F*d())));for(_=0,T=0;_=0;)m=Kg(e,t,n,r,d+1,o+1,l),m>p&&(d===i?m*=XS:QB.test(e.charAt(d-1))?(m*=WB,g=e.slice(i,d-1).match(JB),g&&i>0&&(m*=Math.pow(Im,g.length))):e6.test(e.charAt(d-1))?(m*=YB,w=e.slice(i,d-1).match(HA),w&&i>0&&(m*=Math.pow(Im,w.length))):(m*=XB,i>0&&(m*=Math.pow(Im,d-i))),e.charAt(d)!==t.charAt(o)&&(m*=KB)),(mm&&(m=v*Fm)),m>p&&(p=m),d=n.indexOf(f,d+1);return l[u]=p,p}function KS(e){return e.toLowerCase().replace(HA," ")}function t6(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,Kg(e,t,KS(e),KS(t),0,0,{})}var Gm={exports:{}},Um={};/** + * @license React + * use-sync-external-store-shim.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var ZS;function n6(){if(ZS)return Um;ZS=1;var e=Vf();function t(m,v){return m===v&&(m!==0||1/m===1/v)||m!==m&&v!==v}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,o=e.useLayoutEffect,l=e.useDebugValue;function u(m,v){var g=v(),w=r({inst:{value:g,getSnapshot:v}}),x=w[0].inst,k=w[1];return o(function(){x.value=g,x.getSnapshot=v,f(x)&&k({inst:x})},[m,g,v]),i(function(){return f(x)&&k({inst:x}),m(function(){f(x)&&k({inst:x})})},[m]),l(g),g}function f(m){var v=m.getSnapshot;m=m.value;try{var g=v();return!n(m,g)}catch{return!0}}function d(m,v){return v()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:u;return Um.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,Um}var QS;function r6(){return QS||(QS=1,Gm.exports=n6()),Gm.exports}var i6=r6(),Ll='[cmdk-group=""]',Bm='[cmdk-group-items=""]',a6='[cmdk-group-heading=""]',ky='[cmdk-item=""]',JS=`${ky}:not([aria-disabled="true"])`,Zg="cmdk-item-select",$a="data-value",o6=(e,t,n)=>t6(e,t,n),VA=E.createContext(void 0),mu=()=>E.useContext(VA),qA=E.createContext(void 0),Cy=()=>E.useContext(qA),YA=E.createContext(void 0),WA=E.forwardRef((e,t)=>{let n=Qo(()=>{var M,O;return{search:"",value:(O=(M=e.value)!=null?M:e.defaultValue)!=null?O:"",filtered:{count:0,items:new Map,groups:new Set}}}),r=Qo(()=>new Set),i=Qo(()=>new Map),o=Qo(()=>new Map),l=Qo(()=>new Set),u=XA(e),{label:f,children:d,value:p,onValueChange:m,filter:v,shouldFilter:g,loop:w,disablePointerSelection:x=!1,vimBindings:k=!0,...C}=e,_=bn(),T=bn(),N=bn(),D=E.useRef(null),L=v6();Qa(()=>{if(p!==void 0){let M=p.trim();n.current.value=M,R.emit()}},[p]),Qa(()=>{L(6,I)},[]);let R=E.useMemo(()=>({subscribe:M=>(l.current.add(M),()=>l.current.delete(M)),snapshot:()=>n.current,setState:(M,O,X)=>{var re,ue,ae;if(!Object.is(n.current[M],O)){if(n.current[M]=O,M==="search")q(),z(),L(1,V);else if(M==="value"&&(X||L(5,I),((re=u.current)==null?void 0:re.value)!==void 0)){let oe=O??"";(ae=(ue=u.current).onValueChange)==null||ae.call(ue,oe);return}R.emit()}},emit:()=>{l.current.forEach(M=>M())}}),[]),U=E.useMemo(()=>({value:(M,O,X)=>{var re;O!==((re=o.current.get(M))==null?void 0:re.value)&&(o.current.set(M,{value:O,keywords:X}),n.current.filtered.items.set(M,P(O,X)),L(2,()=>{z(),R.emit()}))},item:(M,O)=>(r.current.add(M),O&&(i.current.has(O)?i.current.get(O).add(M):i.current.set(O,new Set([M]))),L(3,()=>{q(),z(),n.current.value||V(),R.emit()}),()=>{o.current.delete(M),r.current.delete(M),n.current.filtered.items.delete(M);let X=Y();L(4,()=>{q(),(X==null?void 0:X.getAttribute("id"))===M&&V(),R.emit()})}),group:M=>(i.current.has(M)||i.current.set(M,new Set),()=>{o.current.delete(M),i.current.delete(M)}),filter:()=>u.current.shouldFilter,label:f||e["aria-label"],getDisablePointerSelection:()=>u.current.disablePointerSelection,listId:_,inputId:N,labelId:T,listInnerRef:D}),[]);function P(M,O){var X,re;let ue=(re=(X=u.current)==null?void 0:X.filter)!=null?re:o6;return M?ue(M,n.current.search,O):0}function z(){if(!n.current.search||u.current.shouldFilter===!1)return;let M=n.current.filtered.items,O=[];n.current.filtered.groups.forEach(re=>{let ue=i.current.get(re),ae=0;ue.forEach(oe=>{let Ce=M.get(oe);ae=Math.max(Ce,ae)}),O.push([re,ae])});let X=D.current;Z().sort((re,ue)=>{var ae,oe;let Ce=re.getAttribute("id"),he=ue.getAttribute("id");return((ae=M.get(he))!=null?ae:0)-((oe=M.get(Ce))!=null?oe:0)}).forEach(re=>{let ue=re.closest(Bm);ue?ue.appendChild(re.parentElement===ue?re:re.closest(`${Bm} > *`)):X.appendChild(re.parentElement===X?re:re.closest(`${Bm} > *`))}),O.sort((re,ue)=>ue[1]-re[1]).forEach(re=>{var ue;let ae=(ue=D.current)==null?void 0:ue.querySelector(`${Ll}[${$a}="${encodeURIComponent(re[0])}"]`);ae==null||ae.parentElement.appendChild(ae)})}function V(){let M=Z().find(X=>X.getAttribute("aria-disabled")!=="true"),O=M==null?void 0:M.getAttribute($a);R.setState("value",O||void 0)}function q(){var M,O,X,re;if(!n.current.search||u.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let ue=0;for(let ae of r.current){let oe=(O=(M=o.current.get(ae))==null?void 0:M.value)!=null?O:"",Ce=(re=(X=o.current.get(ae))==null?void 0:X.keywords)!=null?re:[],he=P(oe,Ce);n.current.filtered.items.set(ae,he),he>0&&ue++}for(let[ae,oe]of i.current)for(let Ce of oe)if(n.current.filtered.items.get(Ce)>0){n.current.filtered.groups.add(ae);break}n.current.filtered.count=ue}function I(){var M,O,X;let re=Y();re&&(((M=re.parentElement)==null?void 0:M.firstChild)===re&&((X=(O=re.closest(Ll))==null?void 0:O.querySelector(a6))==null||X.scrollIntoView({block:"nearest"})),re.scrollIntoView({block:"nearest"}))}function Y(){var M;return(M=D.current)==null?void 0:M.querySelector(`${ky}[aria-selected="true"]`)}function Z(){var M;return Array.from(((M=D.current)==null?void 0:M.querySelectorAll(JS))||[])}function B(M){let O=Z()[M];O&&R.setState("value",O.getAttribute($a))}function G(M){var O;let X=Y(),re=Z(),ue=re.findIndex(oe=>oe===X),ae=re[ue+M];(O=u.current)!=null&&O.loop&&(ae=ue+M<0?re[re.length-1]:ue+M===re.length?re[0]:re[ue+M]),ae&&R.setState("value",ae.getAttribute($a))}function F(M){let O=Y(),X=O==null?void 0:O.closest(Ll),re;for(;X&&!re;)X=M>0?m6(X,Ll):g6(X,Ll),re=X==null?void 0:X.querySelector(JS);re?R.setState("value",re.getAttribute($a)):G(M)}let K=()=>B(Z().length-1),A=M=>{M.preventDefault(),M.metaKey?K():M.altKey?F(1):G(1)},H=M=>{M.preventDefault(),M.metaKey?B(0):M.altKey?F(-1):G(-1)};return E.createElement(We.div,{ref:t,tabIndex:-1,...C,"cmdk-root":"",onKeyDown:M=>{var O;if((O=C.onKeyDown)==null||O.call(C,M),!M.defaultPrevented)switch(M.key){case"n":case"j":{k&&M.ctrlKey&&A(M);break}case"ArrowDown":{A(M);break}case"p":case"k":{k&&M.ctrlKey&&H(M);break}case"ArrowUp":{H(M);break}case"Home":{M.preventDefault(),B(0);break}case"End":{M.preventDefault(),K();break}case"Enter":if(!M.nativeEvent.isComposing&&M.keyCode!==229){M.preventDefault();let X=Y();if(X){let re=new Event(Zg);X.dispatchEvent(re)}}}}},E.createElement("label",{"cmdk-label":"",htmlFor:U.inputId,id:U.labelId,style:b6},f),yd(e,M=>E.createElement(qA.Provider,{value:R},E.createElement(VA.Provider,{value:U},M))))}),s6=E.forwardRef((e,t)=>{var n,r;let i=bn(),o=E.useRef(null),l=E.useContext(YA),u=mu(),f=XA(e),d=(r=(n=f.current)==null?void 0:n.forceMount)!=null?r:l==null?void 0:l.forceMount;Qa(()=>{if(!d)return u.item(i,l==null?void 0:l.id)},[d]);let p=KA(i,o,[e.value,e.children,o],e.keywords),m=Cy(),v=Ja(L=>L.value&&L.value===p.current),g=Ja(L=>d||u.filter()===!1?!0:L.search?L.filtered.items.get(i)>0:!0);E.useEffect(()=>{let L=o.current;if(!(!L||e.disabled))return L.addEventListener(Zg,w),()=>L.removeEventListener(Zg,w)},[g,e.onSelect,e.disabled]);function w(){var L,R;x(),(R=(L=f.current).onSelect)==null||R.call(L,p.current)}function x(){m.setState("value",p.current,!0)}if(!g)return null;let{disabled:k,value:C,onSelect:_,forceMount:T,keywords:N,...D}=e;return E.createElement(We.div,{ref:Xl([o,t]),...D,id:i,"cmdk-item":"",role:"option","aria-disabled":!!k,"aria-selected":!!v,"data-disabled":!!k,"data-selected":!!v,onPointerMove:k||u.getDisablePointerSelection()?void 0:x,onClick:k?void 0:w},e.children)}),l6=E.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...o}=e,l=bn(),u=E.useRef(null),f=E.useRef(null),d=bn(),p=mu(),m=Ja(g=>i||p.filter()===!1?!0:g.search?g.filtered.groups.has(l):!0);Qa(()=>p.group(l),[]),KA(l,u,[e.value,e.heading,f]);let v=E.useMemo(()=>({id:l,forceMount:i}),[i]);return E.createElement(We.div,{ref:Xl([u,t]),...o,"cmdk-group":"",role:"presentation",hidden:m?void 0:!0},n&&E.createElement("div",{ref:f,"cmdk-group-heading":"","aria-hidden":!0,id:d},n),yd(e,g=>E.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?d:void 0},E.createElement(YA.Provider,{value:v},g))))}),u6=E.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=E.useRef(null),o=Ja(l=>!l.search);return!n&&!o?null:E.createElement(We.div,{ref:Xl([i,t]),...r,"cmdk-separator":"",role:"separator"})}),c6=E.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,o=Cy(),l=Ja(p=>p.search),u=Ja(p=>p.value),f=mu(),d=E.useMemo(()=>{var p;let m=(p=f.listInnerRef.current)==null?void 0:p.querySelector(`${ky}[${$a}="${encodeURIComponent(u)}"]`);return m==null?void 0:m.getAttribute("id")},[]);return E.useEffect(()=>{e.value!=null&&o.setState("search",e.value)},[e.value]),E.createElement(We.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":f.listId,"aria-labelledby":f.labelId,"aria-activedescendant":d,id:f.inputId,type:"text",value:i?e.value:l,onChange:p=>{i||o.setState("search",p.target.value),n==null||n(p.target.value)}})}),f6=E.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...i}=e,o=E.useRef(null),l=E.useRef(null),u=mu();return E.useEffect(()=>{if(l.current&&o.current){let f=l.current,d=o.current,p,m=new ResizeObserver(()=>{p=requestAnimationFrame(()=>{let v=f.offsetHeight;d.style.setProperty("--cmdk-list-height",v.toFixed(1)+"px")})});return m.observe(f),()=>{cancelAnimationFrame(p),m.unobserve(f)}}},[]),E.createElement(We.div,{ref:Xl([o,t]),...i,"cmdk-list":"",role:"listbox","aria-label":r,id:u.listId},yd(e,f=>E.createElement("div",{ref:Xl([l,u.listInnerRef]),"cmdk-list-sizer":""},f)))}),d6=E.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:o,container:l,...u}=e;return E.createElement($v,{open:n,onOpenChange:r},E.createElement(Hv,{container:l},E.createElement(nd,{"cmdk-overlay":"",className:i}),E.createElement(rd,{"aria-label":e.label,"cmdk-dialog":"",className:o},E.createElement(WA,{ref:t,...u}))))}),h6=E.forwardRef((e,t)=>Ja(n=>n.filtered.count===0)?E.createElement(We.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),p6=E.forwardRef((e,t)=>{let{progress:n,children:r,label:i="Loading...",...o}=e;return E.createElement(We.div,{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},yd(e,l=>E.createElement("div",{"aria-hidden":!0},l)))}),In=Object.assign(WA,{List:f6,Item:s6,Input:c6,Group:l6,Separator:u6,Dialog:d6,Empty:h6,Loading:p6});function m6(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function g6(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function XA(e){let t=E.useRef(e);return Qa(()=>{t.current=e}),t}var Qa=typeof window>"u"?E.useEffect:E.useLayoutEffect;function Qo(e){let t=E.useRef();return t.current===void 0&&(t.current=e()),t}function Xl(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function Ja(e){let t=Cy(),n=()=>e(t.snapshot());return i6.useSyncExternalStore(t.subscribe,n,n)}function KA(e,t,n,r=[]){let i=E.useRef(),o=mu();return Qa(()=>{var l;let u=(()=>{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():i.current}})(),f=r.map(d=>d.trim());o.value(e,u,f),(l=t.current)==null||l.setAttribute($a,u),i.current=u}),i}var v6=()=>{let[e,t]=E.useState(),n=Qo(()=>new Map);return Qa(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,i)=>{n.current.set(r,i),t({})}};function y6(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function yd({asChild:e,children:t},n){return e&&E.isValidElement(t)?E.cloneElement(y6(t),{ref:t.ref},n(t.props.children)):n(t)}var b6={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const ZA=$v,QA=tC,x6=Hv,JA=E.forwardRef(({className:e,...t},n)=>S.jsx(nd,{ref:n,className:Me("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80",e),...t}));JA.displayName=nd.displayName;const Ty=E.forwardRef(({className:e,children:t,...n},r)=>S.jsxs(x6,{children:[S.jsx(JA,{}),S.jsxs(rd,{ref:r,className:Me("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-top-[48%] fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg",e),...n,children:[t,S.jsxs(Yv,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none",children:[S.jsx(_k,{className:"h-4 w-4"}),S.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Ty.displayName=rd.displayName;const Ay=({className:e,...t})=>S.jsx("div",{className:Me("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Ay.displayName="DialogHeader";const Ry=E.forwardRef(({className:e,...t},n)=>S.jsx(Vv,{ref:n,className:Me("text-lg leading-none font-semibold tracking-tight",e),...t}));Ry.displayName=Vv.displayName;const Dy=E.forwardRef(({className:e,...t},n)=>S.jsx(qv,{ref:n,className:Me("text-muted-foreground text-sm",e),...t}));Dy.displayName=qv.displayName;const bd=E.forwardRef(({className:e,...t},n)=>S.jsx(In,{ref:n,className:Me("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t}));bd.displayName=In.displayName;const Ny=E.forwardRef(({className:e,...t},n)=>S.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[S.jsx(KM,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),S.jsx(In.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})]}));Ny.displayName=In.Input.displayName;const xd=E.forwardRef(({className:e,...t},n)=>S.jsx(In.List,{ref:n,className:Me("max-h-[300px] overflow-x-hidden overflow-y-auto",e),...t}));xd.displayName=In.List.displayName;const Oy=E.forwardRef((e,t)=>S.jsx(In.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));Oy.displayName=In.Empty.displayName;const Cs=E.forwardRef(({className:e,...t},n)=>S.jsx(In.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}));Cs.displayName=In.Group.displayName;const w6=E.forwardRef(({className:e,...t},n)=>S.jsx(In.Separator,{ref:n,className:Me("bg-border -mx-1 h-px",e),...t}));w6.displayName=In.Separator.displayName;const Ts=E.forwardRef(({className:e,...t},n)=>S.jsx(In.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}));Ts.displayName=In.Item.displayName;const S6=({layout:e,autoRunFor:t})=>{const n=hr(),{stop:r,start:i,isRunning:o}=e;return E.useEffect(()=>{if(!n)return;let l=null;return t!==void 0&&t>-1&&n.getGraph().order>0&&(i(),l=t>0?window.setTimeout(()=>{r()},t):null),()=>{r(),l&&clearTimeout(l)}},[t,i,r,n]),S.jsx(Ot,{size:"icon",onClick:()=>o?r():i(),tooltip:o?"Stop the layout animation":"Start the layout animation",variant:$r,children:o?S.jsx(HM,{}):S.jsx(qM,{})})},E6=()=>{const e=hr(),[t,n]=E.useState("Circular"),[r,i]=E.useState(!1),o=mB(),l=fB(),u=qB(),f=UB({settings:{margin:1}}),d=SB({maxIterations:20}),p=UA({iterations:20}),m=BB(),v=EB(),g=OB(),w=E.useMemo(()=>({Circular:{layout:o},Circlepack:{layout:l},Random:{layout:u},Noverlaps:{layout:f,worker:m},"Force Directed":{layout:d,worker:v},"Force Atlas":{layout:p,worker:g}}),[l,o,d,p,f,u,v,m,g]),x=E.useCallback(k=>{console.debug(k);const{positions:C}=w[k].layout;DG(e.getGraph(),C(),{duration:500}),n(k)},[w,e]);return S.jsxs(S.Fragment,{children:[S.jsx("div",{children:w[t]&&"worker"in w[t]&&S.jsx(S6,{layout:w[t].worker})}),S.jsx("div",{children:S.jsxs(dd,{open:r,onOpenChange:i,children:[S.jsx(hd,{asChild:!0,children:S.jsx(Ot,{size:"icon",variant:$r,onClick:()=>i(k=>!k),tooltip:"Layout Graph",children:S.jsx(jM,{})})}),S.jsx(uu,{side:"right",align:"center",className:"p-1",children:S.jsx(bd,{children:S.jsx(xd,{children:S.jsx(Cs,{children:Object.keys(w).map(k=>S.jsx(Ts,{onSelect:()=>{x(k)},className:"cursor-pointer text-xs",children:k},k))})})})})]})})]})};var cf={exports:{}},_6=cf.exports,eE;function k6(){return eE||(eE=1,function(e){(function(t,n,r){function i(f){var d=this,p=u();d.next=function(){var m=2091639*d.s0+d.c*23283064365386963e-26;return d.s0=d.s1,d.s1=d.s2,d.s2=m-(d.c=m|0)},d.c=1,d.s0=p(" "),d.s1=p(" "),d.s2=p(" "),d.s0-=p(f),d.s0<0&&(d.s0+=1),d.s1-=p(f),d.s1<0&&(d.s1+=1),d.s2-=p(f),d.s2<0&&(d.s2+=1),p=null}function o(f,d){return d.c=f.c,d.s0=f.s0,d.s1=f.s1,d.s2=f.s2,d}function l(f,d){var p=new i(f),m=d&&d.state,v=p.next;return v.int32=function(){return p.next()*4294967296|0},v.double=function(){return v()+(v()*2097152|0)*11102230246251565e-32},v.quick=v,m&&(typeof m=="object"&&o(m,p),v.state=function(){return o(p,{})}),v}function u(){var f=4022871197,d=function(p){p=String(p);for(var m=0;m>>0,v-=f,v*=f,f=v>>>0,v-=f,f+=v*4294967296}return(f>>>0)*23283064365386963e-26};return d}n&&n.exports?n.exports=l:this.alea=l})(_6,e)}(cf)),cf.exports}var ff={exports:{}},C6=ff.exports,tE;function T6(){return tE||(tE=1,function(e){(function(t,n,r){function i(u){var f=this,d="";f.x=0,f.y=0,f.z=0,f.w=0,f.next=function(){var m=f.x^f.x<<11;return f.x=f.y,f.y=f.z,f.z=f.w,f.w^=f.w>>>19^m^m>>>8},u===(u|0)?f.x=u:d+=u;for(var p=0;p>>0)/4294967296};return m.double=function(){do var v=d.next()>>>11,g=(d.next()>>>0)/4294967296,w=(v+g)/(1<<21);while(w===0);return w},m.int32=d.next,m.quick=m,p&&(typeof p=="object"&&o(p,d),m.state=function(){return o(d,{})}),m}n&&n.exports?n.exports=l:this.xor128=l})(C6,e)}(ff)),ff.exports}var df={exports:{}},A6=df.exports,nE;function R6(){return nE||(nE=1,function(e){(function(t,n,r){function i(u){var f=this,d="";f.next=function(){var m=f.x^f.x>>>2;return f.x=f.y,f.y=f.z,f.z=f.w,f.w=f.v,(f.d=f.d+362437|0)+(f.v=f.v^f.v<<4^(m^m<<1))|0},f.x=0,f.y=0,f.z=0,f.w=0,f.v=0,u===(u|0)?f.x=u:d+=u;for(var p=0;p>>4),f.next()}function o(u,f){return f.x=u.x,f.y=u.y,f.z=u.z,f.w=u.w,f.v=u.v,f.d=u.d,f}function l(u,f){var d=new i(u),p=f&&f.state,m=function(){return(d.next()>>>0)/4294967296};return m.double=function(){do var v=d.next()>>>11,g=(d.next()>>>0)/4294967296,w=(v+g)/(1<<21);while(w===0);return w},m.int32=d.next,m.quick=m,p&&(typeof p=="object"&&o(p,d),m.state=function(){return o(d,{})}),m}n&&n.exports?n.exports=l:this.xorwow=l})(A6,e)}(df)),df.exports}var hf={exports:{}},D6=hf.exports,rE;function N6(){return rE||(rE=1,function(e){(function(t,n,r){function i(u){var f=this;f.next=function(){var p=f.x,m=f.i,v,g;return v=p[m],v^=v>>>7,g=v^v<<24,v=p[m+1&7],g^=v^v>>>10,v=p[m+3&7],g^=v^v>>>3,v=p[m+4&7],g^=v^v<<7,v=p[m+7&7],v=v^v<<13,g^=v^v<<9,p[m]=g,f.i=m+1&7,g};function d(p,m){var v,g=[];if(m===(m|0))g[0]=m;else for(m=""+m,v=0;v0;--v)p.next()}d(f,u)}function o(u,f){return f.x=u.x.slice(),f.i=u.i,f}function l(u,f){u==null&&(u=+new Date);var d=new i(u),p=f&&f.state,m=function(){return(d.next()>>>0)/4294967296};return m.double=function(){do var v=d.next()>>>11,g=(d.next()>>>0)/4294967296,w=(v+g)/(1<<21);while(w===0);return w},m.int32=d.next,m.quick=m,p&&(p.x&&o(p,d),m.state=function(){return o(d,{})}),m}n&&n.exports?n.exports=l:this.xorshift7=l})(D6,e)}(hf)),hf.exports}var pf={exports:{}},O6=pf.exports,iE;function j6(){return iE||(iE=1,function(e){(function(t,n,r){function i(u){var f=this;f.next=function(){var p=f.w,m=f.X,v=f.i,g,w;return f.w=p=p+1640531527|0,w=m[v+34&127],g=m[v=v+1&127],w^=w<<13,g^=g<<17,w^=w>>>15,g^=g>>>12,w=m[v]=w^g,f.i=v,w+(p^p>>>16)|0};function d(p,m){var v,g,w,x,k,C=[],_=128;for(m===(m|0)?(g=m,m=null):(m=m+"\0",g=0,_=Math.max(_,m.length)),w=0,x=-32;x<_;++x)m&&(g^=m.charCodeAt((x+32)%m.length)),x===0&&(k=g),g^=g<<10,g^=g>>>15,g^=g<<4,g^=g>>>13,x>=0&&(k=k+1640531527|0,v=C[x&127]^=g+k,w=v==0?w+1:0);for(w>=128&&(C[(m&&m.length||0)&127]=-1),w=127,x=4*128;x>0;--x)g=C[w+34&127],v=C[w=w+1&127],g^=g<<13,v^=v<<17,g^=g>>>15,v^=v>>>12,C[w]=g^v;p.w=k,p.X=C,p.i=w}d(f,u)}function o(u,f){return f.i=u.i,f.w=u.w,f.X=u.X.slice(),f}function l(u,f){u==null&&(u=+new Date);var d=new i(u),p=f&&f.state,m=function(){return(d.next()>>>0)/4294967296};return m.double=function(){do var v=d.next()>>>11,g=(d.next()>>>0)/4294967296,w=(v+g)/(1<<21);while(w===0);return w},m.int32=d.next,m.quick=m,p&&(p.X&&o(p,d),m.state=function(){return o(d,{})}),m}n&&n.exports?n.exports=l:this.xor4096=l})(O6,e)}(pf)),pf.exports}var mf={exports:{}},L6=mf.exports,aE;function z6(){return aE||(aE=1,function(e){(function(t,n,r){function i(u){var f=this,d="";f.next=function(){var m=f.b,v=f.c,g=f.d,w=f.a;return m=m<<25^m>>>7^v,v=v-g|0,g=g<<24^g>>>8^w,w=w-m|0,f.b=m=m<<20^m>>>12^v,f.c=v=v-g|0,f.d=g<<16^v>>>16^w,f.a=w-m|0},f.a=0,f.b=0,f.c=-1640531527,f.d=1367130551,u===Math.floor(u)?(f.a=u/4294967296|0,f.b=u|0):d+=u;for(var p=0;p>>0)/4294967296};return m.double=function(){do var v=d.next()>>>11,g=(d.next()>>>0)/4294967296,w=(v+g)/(1<<21);while(w===0);return w},m.int32=d.next,m.quick=m,p&&(typeof p=="object"&&o(p,d),m.state=function(){return o(d,{})}),m}n&&n.exports?n.exports=l:this.tychei=l})(L6,e)}(mf)),mf.exports}var gf={exports:{}};const M6={},P6=Object.freeze(Object.defineProperty({__proto__:null,default:M6},Symbol.toStringTag,{value:"Module"})),F6=lj(P6);var I6=gf.exports,oE;function G6(){return oE||(oE=1,function(e){(function(t,n,r){var i=256,o=6,l=52,u="random",f=r.pow(i,o),d=r.pow(2,l),p=d*2,m=i-1,v;function g(N,D,L){var R=[];D=D==!0?{entropy:!0}:D||{};var U=C(k(D.entropy?[N,T(n)]:N??_(),3),R),P=new w(R),z=function(){for(var V=P.g(o),q=f,I=0;V=p;)V/=2,q/=2,I>>>=1;return(V+I)/q};return z.int32=function(){return P.g(4)|0},z.quick=function(){return P.g(4)/4294967296},z.double=z,C(T(P.S),n),(D.pass||L||function(V,q,I,Y){return Y&&(Y.S&&x(Y,P),V.state=function(){return x(P,{})}),I?(r[u]=V,q):V})(z,U,"global"in D?D.global:this==r,D.state)}function w(N){var D,L=N.length,R=this,U=0,P=R.i=R.j=0,z=R.S=[];for(L||(N=[L++]);U{if(!e||!Array.isArray(e.nodes)||!Array.isArray(e.edges))return!1;for(const t of e.nodes)if(!t.id||!t.labels||!t.properties)return!1;for(const t of e.edges)if(!t.id||!t.source||!t.target)return!1;for(const t of e.edges){const n=e.getNode(t.source),r=e.getNode(t.target);if(n==null||r==null)return!1}return!0},V6=async e=>{let t=null;try{t=await rM(e)}catch(r){return Mn.getState().setErrorMessage(Cr(r),"Query Graphs Error!"),null}let n=null;if(t){const r={},i={};for(let f=0;f0){const f=xL-J0;for(const d of t.nodes)d.size=Math.round(J0+f*Math.pow((d.degree-o)/u,.5))}n=new rB,n.nodes=t.nodes,n.edges=t.edges,n.nodeIdMap=r,n.edgeIdMap=i,H6(n)||(n=null,console.error("Invalid graph data")),console.log("Graph data loaded")}return n},q6=e=>{const t=new Wl;for(const n of(e==null?void 0:e.nodes)??[])t.addNode(n.id,{label:n.labels.join(", "),color:n.color,x:n.x,y:n.y,size:n.size,borderColor:gL,borderSize:.2});for(const n of(e==null?void 0:e.edges)??[])n.dynamicId=t.addDirectedEdge(n.source,n.target,{label:n.type||void 0});return t},lE={label:""},eR=()=>{const e=Qe.use.queryLabel(),t=yt.use.rawGraph(),n=yt.use.sigmaGraph(),r=E.useCallback(l=>(t==null?void 0:t.getNode(l))||null,[t]),i=E.useCallback((l,u=!0)=>(t==null?void 0:t.getEdge(l,u))||null,[t]);return E.useEffect(()=>{if(e){if(lE.label!==e){lE.label=e;const l=yt.getState();l.reset(),V6(e).then(u=>{l.setSigmaGraph(q6(u)),u==null||u.buildDynamicMap(),l.setRawGraph(u)})}}else{const l=yt.getState();l.reset(),l.setSigmaGraph(new Wl)}},[e]),{lightrageGraph:E.useCallback(()=>{if(n)return n;const l=new Wl;return yt.getState().setSigmaGraph(l),l},[n]),getNode:r,getEdge:i}},Vc=e=>!!(e.type.startsWith("mouse")&&e.buttons!==0),Y6=({disableHoverEffect:e})=>{const{lightrageGraph:t}=eR(),n=hr(),r=xA(),i=bA(),o=iU(),{assign:l}=UA({iterations:20}),{theme:u}=pT(),f=Qe.use.enableHideUnselectedEdges(),d=yt.use.selectedNode(),p=yt.use.focusedNode(),m=yt.use.selectedEdge(),v=yt.use.focusedEdge();return E.useEffect(()=>{const g=t();o(g),g.__force_applied||(l(),Object.assign(g,{__force_applied:!0}));const{setFocusedNode:w,setSelectedNode:x,setFocusedEdge:k,setSelectedEdge:C,clearSelection:_}=yt.getState();r({enterNode:T=>{Vc(T.event.original)||w(T.node)},leaveNode:T=>{Vc(T.event.original)||w(null)},clickNode:T=>{x(T.node),C(null)},clickEdge:T=>{C(T.edge),x(null)},enterEdge:T=>{Vc(T.event.original)||k(T.edge)},leaveEdge:T=>{Vc(T.event.original)||k(null)},clickStage:()=>_()})},[l,o,r,t]),E.useEffect(()=>{const g=u==="dark",w=g?hL:void 0,x=g?yL:void 0;i({nodeReducer:(k,C)=>{const _=n.getGraph(),T={...C,highlighted:C.highlighted||!1,labelColor:w};if(!e){T.highlighted=!1;const N=p||d,D=v||m;if(N)(k===N||_.neighbors(N).includes(k))&&(T.highlighted=!0,k===d&&(T.borderColor=vL));else if(D)_.extremities(D).includes(k)&&(T.highlighted=!0,T.size=3);else return T;T.highlighted?g&&(T.labelColor=pL):T.color=mL}return T},edgeReducer:(k,C)=>{const _=n.getGraph(),T={...C,hidden:!1,labelColor:w,color:x};if(!e){const N=p||d;N?f?_.extremities(k).includes(N)||(T.hidden=!0):_.extremities(k).includes(N)&&(T.color=Q0):(v||m)&&(k===m?T.color=bL:k===v?T.color=Q0:f&&(T.hidden=!0))}return T}})},[d,p,m,v,i,n,e,u,f]),null},W6=()=>{const{zoomIn:e,zoomOut:t,reset:n}=wA({duration:200,factor:1.5}),r=E.useCallback(()=>e(),[e]),i=E.useCallback(()=>t(),[t]),o=E.useCallback(()=>n(),[n]);return S.jsxs(S.Fragment,{children:[S.jsx(Ot,{variant:$r,onClick:r,tooltip:"Zoom In",size:"icon",children:S.jsx(lP,{})}),S.jsx(Ot,{variant:$r,onClick:i,tooltip:"Zoom Out",size:"icon",children:S.jsx(cP,{})}),S.jsx(Ot,{variant:$r,onClick:o,tooltip:"Reset Zoom",size:"icon",children:S.jsx(RM,{})})]})},X6=()=>{const{isFullScreen:e,toggle:t}=aU();return S.jsx(S.Fragment,{children:e?S.jsx(Ot,{variant:$r,onClick:t,tooltip:"Windowed",size:"icon",children:S.jsx(GM,{})}):S.jsx(Ot,{variant:$r,onClick:t,tooltip:"Full Screen",size:"icon",children:S.jsx(FM,{})})})};function tR(e){const t=E.useRef({value:e,previous:e});return E.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var jy="Checkbox",[K6,gK]=dr(jy),[Z6,Q6]=K6(jy),nR=E.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:i,defaultChecked:o,required:l,disabled:u,value:f="on",onCheckedChange:d,form:p,...m}=e,[v,g]=E.useState(null),w=dt(t,N=>g(N)),x=E.useRef(!1),k=v?p||!!v.closest("form"):!0,[C=!1,_]=_i({prop:i,defaultProp:o,onChange:d}),T=E.useRef(C);return E.useEffect(()=>{const N=v==null?void 0:v.form;if(N){const D=()=>_(T.current);return N.addEventListener("reset",D),()=>N.removeEventListener("reset",D)}},[v,_]),S.jsxs(Z6,{scope:n,state:C,disabled:u,children:[S.jsx(We.button,{type:"button",role:"checkbox","aria-checked":sa(C)?"mixed":C,"aria-required":l,"data-state":aR(C),"data-disabled":u?"":void 0,disabled:u,value:f,...m,ref:w,onKeyDown:qe(e.onKeyDown,N=>{N.key==="Enter"&&N.preventDefault()}),onClick:qe(e.onClick,N=>{_(D=>sa(D)?!0:!D),k&&(x.current=N.isPropagationStopped(),x.current||N.stopPropagation())})}),k&&S.jsx(J6,{control:v,bubbles:!x.current,name:r,value:f,checked:C,required:l,disabled:u,form:p,style:{transform:"translateX(-100%)"},defaultChecked:sa(o)?!1:o})]})});nR.displayName=jy;var rR="CheckboxIndicator",iR=E.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...i}=e,o=Q6(rR,n);return S.jsx(Kn,{present:r||sa(o.state)||o.state===!0,children:S.jsx(We.span,{"data-state":aR(o.state),"data-disabled":o.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});iR.displayName=rR;var J6=e=>{const{control:t,checked:n,bubbles:r=!0,defaultChecked:i,...o}=e,l=E.useRef(null),u=tR(n),f=NC(t);E.useEffect(()=>{const p=l.current,m=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(m,"checked").set;if(u!==n&&g){const w=new Event("click",{bubbles:r});p.indeterminate=sa(n),g.call(p,sa(n)?!1:n),p.dispatchEvent(w)}},[u,n,r]);const d=E.useRef(sa(n)?!1:n);return S.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:i??d.current,...o,tabIndex:-1,ref:l,style:{...e.style,...f,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function sa(e){return e==="indeterminate"}function aR(e){return sa(e)?"indeterminate":e?"checked":"unchecked"}var oR=nR,e$=iR;const Ul=E.forwardRef(({className:e,...t},n)=>S.jsx(oR,{ref:n,className:Me("peer border-primary ring-offset-background focus-visible:ring-ring data-[state=checked]:bg-primary data-[state=checked]:text-primary-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:S.jsx(e$,{className:Me("flex items-center justify-center text-current"),children:S.jsx(Lv,{className:"h-4 w-4"})})}));Ul.displayName=oR.displayName;var t$="Separator",uE="horizontal",n$=["horizontal","vertical"],sR=E.forwardRef((e,t)=>{const{decorative:n,orientation:r=uE,...i}=e,o=r$(r)?r:uE,u=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return S.jsx(We.div,{"data-orientation":o,...u,...i,ref:t})});sR.displayName=t$;function r$(e){return n$.includes(e)}var lR=sR;const Fl=E.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},i)=>S.jsx(lR,{ref:i,decorative:n,orientation:t,className:Me("bg-border shrink-0",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));Fl.displayName=lR.displayName;const na=({checked:e,onCheckedChange:t,label:n})=>S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx(Ul,{checked:e,onCheckedChange:t}),S.jsx("label",{htmlFor:"terms",className:"text-sm leading-none font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:n})]});function i$(){const[e,t]=E.useState(!1),[n,r]=E.useState(""),i=Qe.use.showPropertyPanel(),o=Qe.use.showNodeSearchBar(),l=Qe.use.showNodeLabel(),u=Qe.use.enableEdgeEvents(),f=Qe.use.enableNodeDrag(),d=Qe.use.enableHideUnselectedEdges(),p=Qe.use.showEdgeLabel(),m=Qe.use.enableHealthCheck(),v=Qe.use.apiKey();E.useEffect(()=>{r(v||"")},[v,e]);const g=E.useCallback(()=>Qe.setState(R=>({enableNodeDrag:!R.enableNodeDrag})),[]),w=E.useCallback(()=>Qe.setState(R=>({enableEdgeEvents:!R.enableEdgeEvents})),[]),x=E.useCallback(()=>Qe.setState(R=>({enableHideUnselectedEdges:!R.enableHideUnselectedEdges})),[]),k=E.useCallback(()=>Qe.setState(R=>({showEdgeLabel:!R.showEdgeLabel})),[]),C=E.useCallback(()=>Qe.setState(R=>({showPropertyPanel:!R.showPropertyPanel})),[]),_=E.useCallback(()=>Qe.setState(R=>({showNodeSearchBar:!R.showNodeSearchBar})),[]),T=E.useCallback(()=>Qe.setState(R=>({showNodeLabel:!R.showNodeLabel})),[]),N=E.useCallback(()=>Qe.setState(R=>({enableHealthCheck:!R.enableHealthCheck})),[]),D=E.useCallback(async()=>{Qe.setState({apiKey:n||null}),await Mn.getState().check(),t(!1)},[n]),L=E.useCallback(R=>{r(R.target.value)},[r]);return S.jsxs(dd,{open:e,onOpenChange:t,children:[S.jsx(hd,{asChild:!0,children:S.jsx(Ot,{variant:$r,tooltip:"Settings",size:"icon",children:S.jsx(eP,{})})}),S.jsx(uu,{side:"right",align:"start",className:"mb-2 p-2",onCloseAutoFocus:R=>R.preventDefault(),children:S.jsxs("div",{className:"flex flex-col gap-2",children:[S.jsx(na,{checked:i,onCheckedChange:C,label:"Show Property Panel"}),S.jsx(na,{checked:o,onCheckedChange:_,label:"Show Search Bar"}),S.jsx(Fl,{}),S.jsx(na,{checked:l,onCheckedChange:T,label:"Show Node Label"}),S.jsx(na,{checked:f,onCheckedChange:g,label:"Node Draggable"}),S.jsx(Fl,{}),S.jsx(na,{checked:p,onCheckedChange:k,label:"Show Edge Label"}),S.jsx(na,{checked:d,onCheckedChange:x,label:"Hide Unselected Edges"}),S.jsx(na,{checked:u,onCheckedChange:w,label:"Edge Events"}),S.jsx(Fl,{}),S.jsx(na,{checked:m,onCheckedChange:N,label:"Health Check"}),S.jsx(Fl,{}),S.jsxs("div",{className:"flex flex-col gap-2",children:[S.jsx("label",{className:"text-sm font-medium",children:"API Key"}),S.jsxs("form",{className:"flex h-6 gap-2",onSubmit:R=>R.preventDefault(),children:[S.jsx("div",{className:"w-0 flex-1",children:S.jsx(Za,{type:"password",value:n,onChange:L,placeholder:"Enter your API key",className:"max-h-full w-full min-w-0",autoComplete:"off"})}),S.jsx(Ot,{onClick:D,variant:"outline",size:"sm",className:"max-h-full shrink-0",children:"Save"})]})]})]})})]})}function vf(e,t,n,r){function i(o){return o instanceof n?o:new n(function(l){l(o)})}return new(n||(n=Promise))(function(o,l){function u(p){try{d(r.next(p))}catch(m){l(m)}}function f(p){try{d(r.throw(p))}catch(m){l(m)}}function d(p){p.done?o(p.value):i(p.value).then(u,f)}d((r=r.apply(e,[])).next())})}const a$="ENTRIES",uR="KEYS",cR="VALUES",ln="";class Hm{constructor(t,n){const r=t._tree,i=Array.from(r.keys());this.set=t,this._type=n,this._path=i.length>0?[{node:r,keys:i}]:[]}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}=Wo(this._path);if(Wo(n)===ln)return{done:!1,value:this.result()};const r=t.get(Wo(n));return this._path.push({node:r,keys:Array.from(r.keys())}),this.dive()}backtrack(){if(this._path.length===0)return;const t=Wo(this._path).keys;t.pop(),!(t.length>0)&&(this._path.pop(),this.backtrack())}key(){return this.set._prefix+this._path.map(({keys:t})=>Wo(t)).filter(t=>t!==ln).join("")}value(){return Wo(this._path).node.get(ln)}result(){switch(this._type){case cR:return this.value();case uR:return this.key();default:return[this.key(),this.value()]}}[Symbol.iterator](){return this}}const Wo=e=>e[e.length-1],o$=(e,t,n)=>{const r=new Map;if(t===void 0)return r;const i=t.length+1,o=i+n,l=new Uint8Array(o*i).fill(n+1);for(let u=0;u{const f=o*l;e:for(const d of e.keys())if(d===ln){const p=i[f-1];p<=n&&r.set(u,[e.get(d),p])}else{let p=o;for(let m=0;mn)continue e}fR(e.get(d),t,n,r,i,p,l,u+d)}};class oa{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]=Nf(this._tree,t.slice(this._prefix.length));if(n===void 0){const[i,o]=Ly(r);for(const l of i.keys())if(l!==ln&&l.startsWith(o)){const u=new Map;return u.set(l.slice(o.length),i.get(l)),new oa(u,t)}}return new oa(n,t)}clear(){this._size=void 0,this._tree.clear()}delete(t){return this._size=void 0,s$(this._tree,t)}entries(){return new Hm(this,a$)}forEach(t){for(const[n,r]of this)t(n,r,this)}fuzzyGet(t,n){return o$(this._tree,t,n)}get(t){const n=Qg(this._tree,t);return n!==void 0?n.get(ln):void 0}has(t){const n=Qg(this._tree,t);return n!==void 0&&n.has(ln)}keys(){return new Hm(this,uR)}set(t,n){if(typeof t!="string")throw new Error("key must be a string");return this._size=void 0,Vm(this._tree,t).set(ln,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=Vm(this._tree,t);return r.set(ln,n(r.get(ln))),this}fetch(t,n){if(typeof t!="string")throw new Error("key must be a string");this._size=void 0;const r=Vm(this._tree,t);let i=r.get(ln);return i===void 0&&r.set(ln,i=n()),i}values(){return new Hm(this,cR)}[Symbol.iterator](){return this.entries()}static from(t){const n=new oa;for(const[r,i]of t)n.set(r,i);return n}static fromObject(t){return oa.from(Object.entries(t))}}const Nf=(e,t,n=[])=>{if(t.length===0||e==null)return[e,n];for(const r of e.keys())if(r!==ln&&t.startsWith(r))return n.push([e,r]),Nf(e.get(r),t.slice(r.length),n);return n.push([e,t]),Nf(void 0,"",n)},Qg=(e,t)=>{if(t.length===0||e==null)return e;for(const n of e.keys())if(n!==ln&&t.startsWith(n))return Qg(e.get(n),t.slice(n.length))},Vm=(e,t)=>{const n=t.length;e:for(let r=0;e&&r{const[n,r]=Nf(e,t);if(n!==void 0){if(n.delete(ln),n.size===0)dR(r);else if(n.size===1){const[i,o]=n.entries().next().value;hR(r,i,o)}}},dR=e=>{if(e.length===0)return;const[t,n]=Ly(e);if(t.delete(n),t.size===0)dR(e.slice(0,-1));else if(t.size===1){const[r,i]=t.entries().next().value;r!==ln&&hR(e.slice(0,-1),r,i)}},hR=(e,t,n)=>{if(e.length===0)return;const[r,i]=Ly(e);r.set(i+t,n),r.delete(i)},Ly=e=>e[e.length-1],zy="or",pR="and",l$="and_not";class la{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?Wm:t.autoVacuum;this._options=Object.assign(Object.assign(Object.assign({},Ym),t),{autoVacuum:n,searchOptions:Object.assign(Object.assign({},cE),t.searchOptions||{}),autoSuggestOptions:Object.assign(Object.assign({},h$),t.autoSuggestOptions||{})}),this._index=new oa,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=ev,this.addFields(this._options.fields)}add(t){const{extractField:n,tokenize:r,processTerm:i,fields:o,idField:l}=this._options,u=n(t,l);if(u==null)throw new Error(`MiniSearch: document does not have ID field "${l}"`);if(this._idToShortId.has(u))throw new Error(`MiniSearch: duplicate ID ${u}`);const f=this.addDocumentId(u);this.saveStoredFields(f,t);for(const d of o){const p=n(t,d);if(p==null)continue;const m=r(p.toString(),d),v=this._fieldIds[d],g=new Set(m).size;this.addFieldLength(f,v,this._documentCount-1,g);for(const w of m){const x=i(w,d);if(Array.isArray(x))for(const k of x)this.addTerm(v,f,k);else x&&this.addTerm(v,f,x)}}}addAll(t){for(const n of t)this.add(n)}addAllAsync(t,n={}){const{chunkSize:r=10}=n,i={chunk:[],promise:Promise.resolve()},{chunk:o,promise:l}=t.reduce(({chunk:u,promise:f},d,p)=>(u.push(d),(p+1)%r===0?{chunk:[],promise:f.then(()=>new Promise(m=>setTimeout(m,0))).then(()=>this.addAll(u))}:{chunk:u,promise:f}),i);return l.then(()=>this.addAll(o))}remove(t){const{tokenize:n,processTerm:r,extractField:i,fields:o,idField:l}=this._options,u=i(t,l);if(u==null)throw new Error(`MiniSearch: document does not have ID field "${l}"`);const f=this._idToShortId.get(u);if(f==null)throw new Error(`MiniSearch: cannot remove document with ID ${u}: it is not in the index`);for(const d of o){const p=i(t,d);if(p==null)continue;const m=n(p.toString(),d),v=this._fieldIds[d],g=new Set(m).size;this.removeFieldLength(f,v,this._documentCount,g);for(const w of m){const x=r(w,d);if(Array.isArray(x))for(const k of x)this.removeTerm(v,f,k);else x&&this.removeTerm(v,f,x)}}this._storedFields.delete(f),this._documentIds.delete(f),this._idToShortId.delete(u),this._fieldLength.delete(f),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 oa,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,i)=>{this.removeFieldLength(n,i,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:i}=this._options.autoVacuum;this.conditionalVacuum({batchSize:r,batchWait:i},{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,i=r(t,n);this.discard(i),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=ev,this.performVacuuming(t,r)}),this._enqueuedVacuum)):this.vacuumConditionsMet(n)===!1?Promise.resolve():(this._currentVacuum=this.performVacuuming(t),this._currentVacuum)}performVacuuming(t,n){return vf(this,void 0,void 0,function*(){const r=this._dirtCount;if(this.vacuumConditionsMet(n)){const i=t.batchSize||Jg.batchSize,o=t.batchWait||Jg.batchWait;let l=1;for(const[u,f]of this._index){for(const[d,p]of f)for(const[m]of p)this._documentIds.has(m)||(p.size<=1?f.delete(d):p.delete(m));this._index.get(u).size===0&&this._index.delete(u),l%i===0&&(yield new Promise(d=>setTimeout(d,o))),l+=1}this._dirtCount-=r}yield null,this._currentVacuum=this._enqueuedVacuum,this._enqueuedVacuum=null})}vacuumConditionsMet(t){if(t==null)return!0;let{minDirtCount:n,minDirtFactor:r}=t;return n=n||Wm.minDirtCount,r=r||Wm.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,i=Object.assign(Object.assign({},r),n),o=this.executeQuery(t,n),l=[];for(const[u,{score:f,terms:d,match:p}]of o){const m=d.length||1,v={id:this._documentIds.get(u),score:f*m,terms:Object.keys(p),queryTerms:d,match:p};Object.assign(v,this._storedFields.get(u)),(i.filter==null||i.filter(v))&&l.push(v)}return t===la.wildcard&&i.boostDocument==null||l.sort(dE),l}autoSuggest(t,n={}){n=Object.assign(Object.assign({},this._options.autoSuggestOptions),n);const r=new Map;for(const{score:o,terms:l}of this.search(t,n)){const u=l.join(" "),f=r.get(u);f!=null?(f.score+=o,f.count+=1):r.set(u,{score:o,terms:l,count:1})}const i=[];for(const[o,{score:l,terms:u,count:f}]of r)i.push({suggestion:o,terms:u,score:l/f});return i.sort(dE),i}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 loadJSONAsync(t,n){return vf(this,void 0,void 0,function*(){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(Ym.hasOwnProperty(t))return qm(Ym,t);throw new Error(`MiniSearch: unknown option "${t}"`)}static loadJS(t,n){const{index:r,documentIds:i,fieldLength:o,storedFields:l,serializationVersion:u}=t,f=this.instantiateMiniSearch(t,n);f._documentIds=qc(i),f._fieldLength=qc(o),f._storedFields=qc(l);for(const[d,p]of f._documentIds)f._idToShortId.set(p,d);for(const[d,p]of r){const m=new Map;for(const v of Object.keys(p)){let g=p[v];u===1&&(g=g.ds),m.set(parseInt(v,10),qc(g))}f._index.set(d,m)}return f}static loadJSAsync(t,n){return vf(this,void 0,void 0,function*(){const{index:r,documentIds:i,fieldLength:o,storedFields:l,serializationVersion:u}=t,f=this.instantiateMiniSearch(t,n);f._documentIds=yield Yc(i),f._fieldLength=yield Yc(o),f._storedFields=yield Yc(l);for(const[p,m]of f._documentIds)f._idToShortId.set(m,p);let d=0;for(const[p,m]of r){const v=new Map;for(const g of Object.keys(m)){let w=m[g];u===1&&(w=w.ds),v.set(parseInt(g,10),yield Yc(w))}++d%1e3===0&&(yield mR(0)),f._index.set(p,v)}return f})}static instantiateMiniSearch(t,n){const{documentCount:r,nextId:i,fieldIds:o,averageFieldLength:l,dirtCount:u,serializationVersion:f}=t;if(f!==1&&f!==2)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");const d=new la(n);return d._documentCount=r,d._nextId=i,d._idToShortId=new Map,d._fieldIds=o,d._avgFieldLength=l,d._dirtCount=u||0,d._index=new oa,d}executeQuery(t,n={}){if(t===la.wildcard)return this.executeWildcardQuery(n);if(typeof t!="string"){const v=Object.assign(Object.assign(Object.assign({},n),t),{queries:void 0}),g=t.queries.map(w=>this.executeQuery(w,v));return this.combineResults(g,v.combineWith)}const{tokenize:r,processTerm:i,searchOptions:o}=this._options,l=Object.assign(Object.assign({tokenize:r,processTerm:i},o),n),{tokenize:u,processTerm:f}=l,m=u(t).flatMap(v=>f(v)).filter(v=>!!v).map(d$(l)).map(v=>this.executeQuerySpec(v,l));return this.combineResults(m,l.combineWith)}executeQuerySpec(t,n){const r=Object.assign(Object.assign({},this._options.searchOptions),n),i=(r.fields||this._options.fields).reduce((x,k)=>Object.assign(Object.assign({},x),{[k]:qm(r.boost,k)||1}),{}),{boostDocument:o,weights:l,maxFuzzy:u,bm25:f}=r,{fuzzy:d,prefix:p}=Object.assign(Object.assign({},cE.weights),l),m=this._index.get(t.term),v=this.termResults(t.term,t.term,1,t.termBoost,m,i,o,f);let g,w;if(t.prefix&&(g=this._index.atPrefix(t.term)),t.fuzzy){const x=t.fuzzy===!0?.2:t.fuzzy,k=x<1?Math.min(u,Math.round(t.term.length*x)):x;k&&(w=this._index.fuzzyGet(t.term,k))}if(g)for(const[x,k]of g){const C=x.length-t.term.length;if(!C)continue;w==null||w.delete(x);const _=p*x.length/(x.length+.3*C);this.termResults(t.term,x,_,t.termBoost,k,i,o,f,v)}if(w)for(const x of w.keys()){const[k,C]=w.get(x);if(!C)continue;const _=d*x.length/(x.length+C);this.termResults(t.term,x,_,t.termBoost,k,i,o,f,v)}return v}executeWildcardQuery(t){const n=new Map,r=Object.assign(Object.assign({},this._options.searchOptions),t);for(const[i,o]of this._documentIds){const l=r.boostDocument?r.boostDocument(o,"",this._storedFields.get(i)):1;n.set(i,{score:l,terms:[],match:{}})}return n}combineResults(t,n=zy){if(t.length===0)return new Map;const r=n.toLowerCase(),i=u$[r];if(!i)throw new Error(`Invalid combination operator: ${n}`);return t.reduce(i)||new Map}toJSON(){const t=[];for(const[n,r]of this._index){const i={};for(const[o,l]of r)i[o]=Object.fromEntries(l);t.push([n,i])}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,i,o,l,u,f,d=new Map){if(o==null)return d;for(const p of Object.keys(l)){const m=l[p],v=this._fieldIds[p],g=o.get(v);if(g==null)continue;let w=g.size;const x=this._avgFieldLength[v];for(const k of g.keys()){if(!this._documentIds.has(k)){this.removeTerm(v,k,n),w-=1;continue}const C=u?u(this._documentIds.get(k),n,this._storedFields.get(k)):1;if(!C)continue;const _=g.get(k),T=this._fieldLength.get(k)[v],N=f$(_,w,this._documentCount,T,x,f),D=r*i*m*C*N,L=d.get(k);if(L){L.score+=D,p$(L.terms,t);const R=qm(L.match,n);R?R.push(p):L.match[n]=[p]}else d.set(k,{score:D,terms:[t],match:{[n]:[p]}})}}return d}addTerm(t,n,r){const i=this._index.fetch(r,hE);let o=i.get(t);if(o==null)o=new Map,o.set(n,1),i.set(t,o);else{const l=o.get(n);o.set(n,(l||0)+1)}}removeTerm(t,n,r){if(!this._index.has(r)){this.warnDocumentChanged(n,t,r);return}const i=this._index.fetch(r,hE),o=i.get(t);o==null||o.get(n)==null?this.warnDocumentChanged(n,t,r):o.get(n)<=1?o.size<=1?i.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 i of Object.keys(this._fieldIds))if(this._fieldIds[i]===n){this._options.logger("warn",`MiniSearch: document with ID ${this._documentIds.get(t)} has changed before removal: term "${r}" was not present in field "${i}". 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,u$={[zy]:(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:i,terms:o,match:l}=t.get(n);r.score=r.score+i,r.match=Object.assign(r.match,l),fE(r.terms,o)}}return e},[pR]:(e,t)=>{const n=new Map;for(const r of t.keys()){const i=e.get(r);if(i==null)continue;const{score:o,terms:l,match:u}=t.get(r);fE(i.terms,l),n.set(r,{score:i.score+o,terms:i.terms,match:Object.assign(i.match,u)})}return n},[l$]:(e,t)=>{for(const n of t.keys())e.delete(n);return e}},c$={k:1.2,b:.7,d:.5},f$=(e,t,n,r,i,o)=>{const{k:l,b:u,d:f}=o;return Math.log(1+(n-t+.5)/(t+.5))*(f+e*(l+1)/(e+l*(1-u+u*r/i)))},d$=e=>(t,n,r)=>{const i=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,l=typeof e.boostTerm=="function"?e.boostTerm(t,n,r):1;return{term:t,fuzzy:i,prefix:o,termBoost:l}},Ym={idField:"id",extractField:(e,t)=>e[t],tokenize:e=>e.split(m$),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},cE={combineWith:zy,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375},bm25:c$},h$={combineWith:pR,prefix:(e,t,n)=>t===n.length-1},Jg={batchSize:1e3,batchWait:10},ev={minDirtFactor:.1,minDirtCount:20},Wm=Object.assign(Object.assign({},Jg),ev),p$=(e,t)=>{e.includes(t)||e.push(t)},fE=(e,t)=>{for(const n of t)e.includes(n)||e.push(n)},dE=({score:e},{score:t})=>t-e,hE=()=>new Map,qc=e=>{const t=new Map;for(const n of Object.keys(e))t.set(parseInt(n,10),e[n]);return t},Yc=e=>vf(void 0,void 0,void 0,function*(){const t=new Map;let n=0;for(const r of Object.keys(e))t.set(parseInt(r,10),e[r]),++n%1e3===0&&(yield mR(0));return t}),mR=e=>new Promise(t=>setTimeout(t,e)),m$=/[\n\r\p{Z}\p{P}]+/u,g$={index:new la({fields:[]})};E.createContext(g$);const tv=({label:e,color:t,hidden:n,labels:r={}})=>be.createElement("div",{className:"node"},be.createElement("span",{className:"render "+(n?"circle":"disc"),style:{backgroundColor:t||"#000"}}),be.createElement("span",{className:`label ${n?"text-muted":""} ${e?"":"text-italic"}`},e||r.no_label||"No label")),v$=({id:e,labels:t})=>{const n=hr(),r=E.useMemo(()=>{const i=n.getGraph().getNodeAttributes(e),o=n.getSetting("nodeReducer");return Object.assign(Object.assign({color:n.getSetting("defaultNodeColor")},i),o?o(e,i):{})},[n,e]);return be.createElement(tv,Object.assign({},r,{labels:t}))},y$=({label:e,color:t,source:n,target:r,hidden:i,directed:o,labels:l={}})=>be.createElement("div",{className:"edge"},be.createElement(tv,Object.assign({},n,{labels:l})),be.createElement("div",{className:"body"},be.createElement("div",{className:"render"},be.createElement("span",{className:i?"dotted":"dash",style:{borderColor:t||"#000"}})," ",o&&be.createElement("span",{className:"arrow",style:{borderTopColor:t||"#000"}})),be.createElement("span",{className:`label ${i?"text-muted":""} ${e?"":"fst-italic"}`},e||l.no_label||"No label")),be.createElement(tv,Object.assign({},r,{labels:l}))),b$=({id:e,labels:t})=>{const n=hr(),r=E.useMemo(()=>{const i=n.getGraph().getEdgeAttributes(e),o=n.getSetting("nodeReducer"),l=n.getSetting("edgeReducer"),u=n.getGraph().getNodeAttributes(n.getGraph().source(e)),f=n.getGraph().getNodeAttributes(n.getGraph().target(e));return Object.assign(Object.assign(Object.assign({color:n.getSetting("defaultEdgeColor"),directed:n.getGraph().isDirected(e)},i),l?l(e,i):{}),{source:Object.assign(Object.assign({color:n.getSetting("defaultNodeColor")},u),o?o(e,u):{}),target:Object.assign(Object.assign({color:n.getSetting("defaultNodeColor")},f),o?o(e,f):{})})},[n,e]);return be.createElement(y$,Object.assign({},r,{labels:t}))};function My(e,t){const[n,r]=E.useState(e);return E.useEffect(()=>{const i=setTimeout(()=>{r(e)},t);return()=>{clearTimeout(i)}},[e,t]),n}function x$({fetcher:e,preload:t,filterFn:n,renderOption:r,getOptionValue:i,notFound:o,loadingSkeleton:l,label:u,placeholder:f="Select...",value:d,onChange:p,onFocus:m,disabled:v=!1,className:g,noResultsMessage:w}){const[x,k]=E.useState(!1),[C,_]=E.useState(!1),[T,N]=E.useState([]),[D,L]=E.useState(!1),[R,U]=E.useState(null),[P,z]=E.useState(d),[V,q]=E.useState(null),[I,Y]=E.useState(""),Z=My(I,t?0:150),[B,G]=E.useState([]);E.useEffect(()=>{k(!0),z(d)},[d]),E.useEffect(()=>{x||(async()=>{try{L(!0),U(null);const H=d!==null?await e(d):[];G(H),N(H)}catch(H){U(H instanceof Error?H.message:"Failed to fetch options")}finally{L(!1)}})()},[x,e,d]),E.useEffect(()=>{const A=async()=>{try{L(!0),U(null);const H=await e(Z);G(H),N(H)}catch(H){U(H instanceof Error?H.message:"Failed to fetch options")}finally{L(!1)}};x&&t?t&&N(Z?B.filter(H=>n?n(H,Z):!0):B):A()},[e,Z,x,t,n]);const F=E.useCallback(A=>{A!==P&&(z(A),p(A)),_(!1)},[P,z,_,p]),K=E.useCallback(A=>{A!==V&&(q(A),m(A))},[V,q,m]);return S.jsx("div",{className:Me(v&&"cursor-not-allowed opacity-50",g),onFocus:()=>{_(!0)},onBlur:()=>_(!1),children:S.jsxs(bd,{shouldFilter:!1,className:"bg-transparent",children:[S.jsxs("div",{children:[S.jsx(Ny,{placeholder:f,value:I,className:"max-h-8",onValueChange:A=>{Y(A),A&&!C&&_(!0)}}),D&&T.length>0&&S.jsx("div",{className:"absolute top-1/2 right-2 flex -translate-y-1/2 transform items-center",children:S.jsx(Ek,{className:"h-4 w-4 animate-spin"})})]}),S.jsxs(xd,{hidden:!C||Z.length===0,children:[R&&S.jsx("div",{className:"text-destructive p-4 text-center",children:R}),D&&T.length===0&&(l||S.jsx(w$,{})),!D&&!R&&T.length===0&&(o||S.jsx(Oy,{children:w??`No ${u.toLowerCase()} found.`})),S.jsx(Cs,{children:T.map((A,H)=>S.jsxs(S.Fragment,{children:[S.jsx(Ts,{value:i(A),onSelect:F,onMouseEnter:()=>K(i(A)),className:"truncate",children:r(A)},i(A)+`${H}`),H!==T.length-1&&S.jsx("div",{className:"bg-foreground/10 h-[1px]"},H)]}))})]})]})})}function w$(){return S.jsx(Cs,{children:S.jsx(Ts,{disabled:!0,children:S.jsxs("div",{className:"flex w-full items-center gap-2",children:[S.jsx("div",{className:"bg-muted h-6 w-6 animate-pulse rounded-full"}),S.jsxs("div",{className:"flex flex-1 flex-col gap-1",children:[S.jsx("div",{className:"bg-muted h-4 w-24 animate-pulse rounded"}),S.jsx("div",{className:"bg-muted h-3 w-16 animate-pulse rounded"})]})]})})})}function S$(e){return S.jsxs("div",{children:[e.type==="nodes"&&S.jsx(v$,{id:e.id}),e.type==="edges"&&S.jsx(b$,{id:e.id}),e.type==="message"&&S.jsx("div",{children:e.message})]})}const Xm="__message_item",Wc={graph:null,searchEngine:null},E$=({onChange:e,onFocus:t,value:n})=>{const r=yt.use.sigmaGraph(),i=E.useMemo(()=>{if(Wc.graph==r)return Wc.searchEngine;if(!r||r.nodes().length==0)return;Wc.graph=r;const l=new la({idField:"id",fields:["label"],searchOptions:{prefix:!0,fuzzy:.2,boost:{label:2}}}),u=r.nodes().map(f=>({id:f,label:r.getNodeAttribute(f,"label")}));return l.addAll(u),Wc.searchEngine=l,l},[r]),o=E.useCallback(async l=>{if(t&&t(null),!l||!i)return[];const u=i.search(l).map(f=>({id:f.id,type:"nodes"}));return u.length<=Vp?u:[...u.slice(0,Vp),{type:"message",id:Xm,message:`And ${u.length-Vp} others`}]},[i,t]);return S.jsx(x$,{className:"bg-background/60 w-24 rounded-xl border-1 opacity-60 backdrop-blur-lg transition-all hover:w-fit hover:opacity-100",fetcher:o,renderOption:S$,getOptionValue:l=>l.id,value:n&&n.type!=="message"?n.id:null,onChange:l=>{l!==Xm&&e(l?{id:l,type:"nodes"}:null)},onFocus:l=>{l!==Xm&&t&&t(l?{id:l,type:"nodes"}:null)},label:"item",placeholder:"Search nodes..."})},_$=({...e})=>S.jsx(E$,{...e});function k$({fetcher:e,preload:t,filterFn:n,renderOption:r,getOptionValue:i,getDisplayValue:o,notFound:l,loadingSkeleton:u,label:f,placeholder:d="Select...",value:p,onChange:m,disabled:v=!1,className:g,triggerClassName:w,searchInputClassName:x,noResultsMessage:k,triggerTooltip:C,clearable:_=!0}){const[T,N]=E.useState(!1),[D,L]=E.useState(!1),[R,U]=E.useState([]),[P,z]=E.useState(!1),[V,q]=E.useState(null),[I,Y]=E.useState(p),[Z,B]=E.useState(null),[G,F]=E.useState(""),K=My(G,t?0:150),[A,H]=E.useState([]);E.useEffect(()=>{N(!0),Y(p)},[p]),E.useEffect(()=>{if(p&&R.length>0){const O=R.find(X=>i(X)===p);O&&B(O)}},[p,R,i]),E.useEffect(()=>{T||(async()=>{try{z(!0),q(null);const X=await e(p);H(X),U(X)}catch(X){q(X instanceof Error?X.message:"Failed to fetch options")}finally{z(!1)}})()},[T,e,p]),E.useEffect(()=>{const O=async()=>{try{z(!0),q(null);const X=await e(K);H(X),U(X)}catch(X){q(X instanceof Error?X.message:"Failed to fetch options")}finally{z(!1)}};T&&t?t&&U(K?A.filter(X=>n?n(X,K):!0):A):O()},[e,K,T,t,n]);const M=E.useCallback(O=>{const X=_&&O===I?"":O;Y(X),B(R.find(re=>i(re)===X)||null),m(X),L(!1)},[I,m,_,R,i]);return S.jsxs(dd,{open:D,onOpenChange:L,children:[S.jsx(hd,{asChild:!0,children:S.jsxs(Ot,{variant:"outline",role:"combobox","aria-expanded":D,className:Me("justify-between",v&&"cursor-not-allowed opacity-50",w),disabled:v,tooltip:C,side:"bottom",children:[Z?o(Z):d,S.jsx(xM,{className:"opacity-50",size:10})]})}),S.jsx(uu,{className:Me("p-0",g),onCloseAutoFocus:O=>O.preventDefault(),children:S.jsxs(bd,{shouldFilter:!1,children:[S.jsxs("div",{className:"relative w-full border-b",children:[S.jsx(Ny,{placeholder:`Search ${f.toLowerCase()}...`,value:G,onValueChange:O=>{F(O)},className:x}),P&&R.length>0&&S.jsx("div",{className:"absolute top-1/2 right-2 flex -translate-y-1/2 transform items-center",children:S.jsx(Ek,{className:"h-4 w-4 animate-spin"})})]}),S.jsxs(xd,{children:[V&&S.jsx("div",{className:"text-destructive p-4 text-center",children:V}),P&&R.length===0&&(u||S.jsx(C$,{})),!P&&!V&&R.length===0&&(l||S.jsx(Oy,{children:k??`No ${f.toLowerCase()} found.`})),S.jsx(Cs,{children:R.map(O=>S.jsxs(Ts,{value:i(O),onSelect:M,className:"truncate",children:[r(O),S.jsx(Lv,{className:Me("ml-auto h-3 w-3",I===i(O)?"opacity-100":"opacity-0")})]},i(O)))})]})]})})]})}function C$(){return S.jsx(Cs,{children:S.jsx(Ts,{disabled:!0,children:S.jsxs("div",{className:"flex w-full items-center gap-2",children:[S.jsx("div",{className:"bg-muted h-6 w-6 animate-pulse rounded-full"}),S.jsxs("div",{className:"flex flex-1 flex-col gap-1",children:[S.jsx("div",{className:"bg-muted h-4 w-24 animate-pulse rounded"}),S.jsx("div",{className:"bg-muted h-3 w-16 animate-pulse rounded"})]})]})})})}const T$=()=>{const e=Qe.use.queryLabel(),[t,n]=E.useState({labels:[],searchEngine:null}),[r,i]=E.useState(!1),o=E.useCallback(async u=>{let f=t.labels,d=t.searchEngine;if(!r||!d){f=["*"].concat(await iM()),f.includes(Qe.getState().queryLabel)||Qe.getState().setQueryLabel(f[0]),d=new la({idField:"id",fields:["value"],searchOptions:{prefix:!0,fuzzy:.2,boost:{label:2}}});const p=f.map((m,v)=>({id:v,value:m}));d.addAll(p),n({labels:f,searchEngine:d}),i(!0)}return u?d.search(u).map(p=>f[p.id]):f},[t,r,n,i]),l=E.useCallback(u=>{Qe.getState().setQueryLabel(u)},[]);return S.jsx(k$,{className:"ml-2",triggerClassName:"max-h-8",searchInputClassName:"max-h-8",triggerTooltip:"Select query label",fetcher:o,renderOption:u=>S.jsx("div",{children:u}),getOptionValue:u=>u,getDisplayValue:u=>S.jsx("div",{children:u}),notFound:S.jsx("div",{className:"py-6 text-center text-sm",children:"No labels found"}),label:"Label",placeholder:"Search labels...",value:e!==null?e:"",onChange:l})},jn=({text:e,className:t,tooltipClassName:n,tooltip:r,side:i,onClick:o})=>r?S.jsx(XC,{delayDuration:200,children:S.jsxs(KC,{children:[S.jsx(ZC,{asChild:!0,children:S.jsx("label",{className:Me(t,o!==void 0?"cursor-pointer":void 0),onClick:o,children:e})}),S.jsx(ly,{side:i,className:n,children:r})]})}):S.jsx("label",{className:Me(t,o!==void 0?"cursor-pointer":void 0),onClick:o,children:e}),A$=()=>{const{getNode:e,getEdge:t}=eR(),n=yt.use.selectedNode(),r=yt.use.focusedNode(),i=yt.use.selectedEdge(),o=yt.use.focusedEdge(),[l,u]=E.useState(null),[f,d]=E.useState(null);return E.useEffect(()=>{let p=null,m=null;r?(p="node",m=e(r)):n?(p="node",m=e(n)):o?(p="edge",m=t(o,!0)):i&&(p="edge",m=t(i,!0)),m?(p=="node"?u(R$(m)):u(D$(m)),d(p)):(u(null),d(null))},[r,n,o,i,u,d,e,t]),l?S.jsx("div",{className:"bg-background/80 max-w-xs rounded-lg border-2 p-2 text-xs backdrop-blur-lg",children:f=="node"?S.jsx(N$,{node:l}):S.jsx(O$,{edge:l})}):S.jsx(S.Fragment,{})},R$=e=>{const t=yt.getState(),n=[];if(t.sigmaGraph&&t.rawGraph)for(const r of t.sigmaGraph.edges(e.id)){const i=t.rawGraph.getEdge(r,!0);if(i){const o=e.id===i.source,l=o?i.target:i.source,u=t.rawGraph.getNode(l);u&&n.push({type:o?"Target":"Source",id:l,label:u.labels.join(", ")})}}return{...e,relationships:n}},D$=e=>{var i,o;const t=yt.getState(),n=(i=t.rawGraph)==null?void 0:i.getNode(e.source),r=(o=t.rawGraph)==null?void 0:o.getNode(e.target);return{...e,sourceNode:n,targetNode:r}},Br=({name:e,value:t,onClick:n,tooltip:r})=>S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx("label",{className:"text-primary/60 tracking-wide",children:e}),":",S.jsx(jn,{className:"hover:bg-primary/20 rounded p-1 text-ellipsis",tooltipClassName:"max-w-80",text:t,tooltip:r||t,side:"left",onClick:n})]}),N$=({node:e})=>S.jsxs("div",{className:"flex flex-col gap-2",children:[S.jsx("label",{className:"text-md pl-1 font-bold tracking-wide text-sky-300",children:"Node"}),S.jsxs("div",{className:"bg-primary/5 max-h-96 overflow-auto rounded p-1",children:[S.jsx(Br,{name:"Id",value:e.id}),S.jsx(Br,{name:"Labels",value:e.labels.join(", "),onClick:()=>{yt.getState().setSelectedNode(e.id,!0)}}),S.jsx(Br,{name:"Degree",value:e.degree})]}),S.jsx("label",{className:"text-md pl-1 font-bold tracking-wide text-yellow-400/90",children:"Properties"}),S.jsx("div",{className:"bg-primary/5 max-h-96 overflow-auto rounded p-1",children:Object.keys(e.properties).sort().map(t=>S.jsx(Br,{name:t,value:e.properties[t]},t))}),e.relationships.length>0&&S.jsxs(S.Fragment,{children:[S.jsx("label",{className:"text-md pl-1 font-bold tracking-wide text-teal-600/90",children:"Relationships"}),S.jsx("div",{className:"bg-primary/5 max-h-96 overflow-auto rounded p-1",children:e.relationships.map(({type:t,id:n,label:r})=>S.jsx(Br,{name:t,value:r,onClick:()=>{yt.getState().setSelectedNode(n,!0)}},n))})]})]}),O$=({edge:e})=>S.jsxs("div",{className:"flex flex-col gap-2",children:[S.jsx("label",{className:"text-md pl-1 font-bold tracking-wide text-teal-600",children:"Relationship"}),S.jsxs("div",{className:"bg-primary/5 max-h-96 overflow-auto rounded p-1",children:[S.jsx(Br,{name:"Id",value:e.id}),e.type&&S.jsx(Br,{name:"Type",value:e.type}),S.jsx(Br,{name:"Source",value:e.sourceNode?e.sourceNode.labels.join(", "):e.source,onClick:()=>{yt.getState().setSelectedNode(e.source,!0)}}),S.jsx(Br,{name:"Target",value:e.targetNode?e.targetNode.labels.join(", "):e.target,onClick:()=>{yt.getState().setSelectedNode(e.target,!0)}})]}),S.jsx("label",{className:"text-md pl-1 font-bold tracking-wide text-yellow-400/90",children:"Properties"}),S.jsx("div",{className:"bg-primary/5 max-h-96 overflow-auto rounded p-1",children:Object.keys(e.properties).sort().map(t=>S.jsx(Br,{name:t,value:e.properties[t]},t))})]}),pE={allowInvalidContainer:!0,defaultNodeType:"default",defaultEdgeType:"curvedArrow",renderEdgeLabels:!1,edgeProgramClasses:{arrow:dA,curvedArrow:nB,curvedNoArrow:tB},nodeProgramClasses:{default:FU,circel:fu,point:dU},labelGridCellSize:60,labelRenderedSizeThreshold:12,enableEdgeEvents:!0,labelColor:{color:"#000",attribute:"labelColor"},edgeLabelColor:{color:"#000",attribute:"labelColor"},edgeLabelSize:8,labelSize:12},j$=()=>{const e=xA(),t=hr(),[n,r]=E.useState(null);return E.useEffect(()=>{e({downNode:i=>{r(i.node),t.getGraph().setNodeAttribute(i.node,"highlighted",!0)},mousemovebody:i=>{if(!n)return;const o=t.viewportToGraph(i);t.getGraph().setNodeAttribute(n,"x",o.x),t.getGraph().setNodeAttribute(n,"y",o.y),i.preventSigmaDefault(),i.original.preventDefault(),i.original.stopPropagation()},mouseup:()=>{n&&(r(null),t.getGraph().removeNodeAttribute(n,"highlighted"))},mousedown:()=>{t.getCustomBBox()||t.setCustomBBox(t.getBBox())}})},[e,t,n]),null},L$=()=>{const[e,t]=E.useState(pE),n=yt.use.selectedNode(),r=yt.use.focusedNode(),i=yt.use.moveToSelectedNode(),o=Qe.use.showPropertyPanel(),l=Qe.use.showNodeSearchBar(),u=Qe.use.showNodeLabel(),f=Qe.use.enableEdgeEvents(),d=Qe.use.enableNodeDrag(),p=Qe.use.showEdgeLabel();E.useEffect(()=>{t({...pE,enableEdgeEvents:f,renderEdgeLabels:p,renderLabels:u})},[u,f,p]);const m=E.useCallback(x=>{x===null?yt.getState().setFocusedNode(null):x.type==="nodes"&&yt.getState().setFocusedNode(x.id)},[]),v=E.useCallback(x=>{x===null?yt.getState().setSelectedNode(null):x.type==="nodes"&&yt.getState().setSelectedNode(x.id,!0)},[]),g=E.useMemo(()=>r??n,[r,n]),w=E.useMemo(()=>n?{type:"nodes",id:n}:null,[n]);return S.jsxs(oU,{settings:e,className:"!bg-background !size-full overflow-hidden",children:[S.jsx(Y6,{}),d&&S.jsx(j$,{}),S.jsx(aB,{node:g,move:i}),S.jsxs("div",{className:"absolute top-2 left-2 flex items-start gap-2",children:[S.jsx(T$,{}),l&&S.jsx(_$,{value:w,onFocus:m,onChange:v})]}),S.jsxs("div",{className:"bg-background/60 absolute bottom-2 left-2 flex flex-col rounded-xl border-2 backdrop-blur-lg",children:[S.jsx(i$,{}),S.jsx(W6,{}),S.jsx(E6,{}),S.jsx(X6,{})]}),o&&S.jsx("div",{className:"absolute top-2 right-2",children:S.jsx(A$,{})})]})},gR=E.forwardRef(({className:e,...t},n)=>S.jsx("div",{className:"relative w-full overflow-auto",children:S.jsx("table",{ref:n,className:Me("w-full caption-bottom text-sm",e),...t})}));gR.displayName="Table";const vR=E.forwardRef(({className:e,...t},n)=>S.jsx("thead",{ref:n,className:Me("[&_tr]:border-b",e),...t}));vR.displayName="TableHeader";const yR=E.forwardRef(({className:e,...t},n)=>S.jsx("tbody",{ref:n,className:Me("[&_tr:last-child]:border-0",e),...t}));yR.displayName="TableBody";const z$=E.forwardRef(({className:e,...t},n)=>S.jsx("tfoot",{ref:n,className:Me("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",e),...t}));z$.displayName="TableFooter";const nv=E.forwardRef(({className:e,...t},n)=>S.jsx("tr",{ref:n,className:Me("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),...t}));nv.displayName="TableRow";const bi=E.forwardRef(({className:e,...t},n)=>S.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}));bi.displayName="TableHead";const xi=E.forwardRef(({className:e,...t},n)=>S.jsx("td",{ref:n,className:Me("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));xi.displayName="TableCell";const M$=E.forwardRef(({className:e,...t},n)=>S.jsx("caption",{ref:n,className:Me("text-muted-foreground mt-4 text-sm",e),...t}));M$.displayName="TableCaption";const Kl=E.forwardRef(({className:e,...t},n)=>S.jsx("div",{ref:n,className:Me("bg-card text-card-foreground rounded-xl border shadow",e),...t}));Kl.displayName="Card";const Of=E.forwardRef(({className:e,...t},n)=>S.jsx("div",{ref:n,className:Me("flex flex-col space-y-1.5 p-6",e),...t}));Of.displayName="CardHeader";const Zl=E.forwardRef(({className:e,...t},n)=>S.jsx("div",{ref:n,className:Me("leading-none font-semibold tracking-tight",e),...t}));Zl.displayName="CardTitle";const wd=E.forwardRef(({className:e,...t},n)=>S.jsx("div",{ref:n,className:Me("text-muted-foreground text-sm",e),...t}));wd.displayName="CardDescription";const jf=E.forwardRef(({className:e,...t},n)=>S.jsx("div",{ref:n,className:Me("p-6 pt-0",e),...t}));jf.displayName="CardContent";const P$=E.forwardRef(({className:e,...t},n)=>S.jsx("div",{ref:n,className:Me("flex items-center p-6 pt-0",e),...t}));P$.displayName="CardFooter";function F$({title:e,description:t,icon:n=TM,action:r,className:i,...o}){return S.jsxs(Kl,{className:Me("flex w-full flex-col items-center justify-center space-y-6 bg-transparent p-16",i),...o,children:[S.jsx("div",{className:"mr-4 shrink-0 rounded-full border border-dashed p-4",children:S.jsx(n,{className:"text-muted-foreground size-8","aria-hidden":"true"})}),S.jsxs("div",{className:"flex flex-col items-center gap-1.5 text-center",children:[S.jsx(Zl,{children:e}),t?S.jsx(wd,{children:t}):null]}),r||null]})}var Km={exports:{}},Zm,mE;function I$(){if(mE)return Zm;mE=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Zm=e,Zm}var Qm,gE;function G$(){if(gE)return Qm;gE=1;var e=I$();function t(){}function n(){}return n.resetWarningCache=t,Qm=function(){function r(l,u,f,d,p,m){if(m!==e){var v=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 v.name="Invariant Violation",v}}r.isRequired=r;function i(){return r}var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o},Qm}var vE;function U$(){return vE||(vE=1,Km.exports=G$()()),Km.exports}var B$=U$();const Ct=fn(B$),$$=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 ds(e,t,n){const r=H$(e),{webkitRelativePath:i}=e,o=typeof t=="string"?t:typeof i=="string"&&i.length>0?i:`./${e.name}`;return typeof r.path!="string"&&yE(r,"path",o),yE(r,"relativePath",o),r}function H$(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),i=$$.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}function yE(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const V$=[".DS_Store","Thumbs.db"];function q$(e){return no(this,void 0,void 0,function*(){return Lf(e)&&Y$(e.dataTransfer)?Z$(e.dataTransfer,e.type):W$(e)?X$(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?K$(e):[]})}function Y$(e){return Lf(e)}function W$(e){return Lf(e)&&Lf(e.target)}function Lf(e){return typeof e=="object"&&e!==null}function X$(e){return rv(e.target.files).map(t=>ds(t))}function K$(e){return no(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>ds(n))})}function Z$(e,t){return no(this,void 0,void 0,function*(){if(e.items){const n=rv(e.items).filter(i=>i.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(Q$));return bE(bR(r))}return bE(rv(e.files).map(n=>ds(n)))})}function bE(e){return e.filter(t=>V$.indexOf(t.name)===-1)}function rv(e){if(e===null)return[];const t=[];for(let n=0;n[...t,...Array.isArray(n)?bR(n):[n]],[])}function xE(e,t){return no(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 l=yield o.getFile();return l.handle=o,ds(l)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return ds(r,(n=t==null?void 0:t.fullPath)!==null&&n!==void 0?n:void 0)})}function J$(e){return no(this,void 0,void 0,function*(){return e.isDirectory?xR(e):eH(e)})}function xR(e){const t=e.createReader();return new Promise((n,r)=>{const i=[];function o(){t.readEntries(l=>no(this,void 0,void 0,function*(){if(l.length){const u=Promise.all(l.map(J$));i.push(u),o()}else try{const u=yield Promise.all(i);n(u)}catch(u){r(u)}}),l=>{r(l)})}o()})}function eH(e){return no(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const i=ds(r,e.fullPath);t(i)},r=>{n(r)})})})}var Xc={},wE;function tH(){return wE||(wE=1,Xc.__esModule=!0,Xc.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||"",i=(e.type||"").toLowerCase(),o=i.replace(/\/.*$/,"");return n.some(function(l){var u=l.trim().toLowerCase();return u.charAt(0)==="."?r.toLowerCase().endsWith(u):u.endsWith("/*")?o===u.replace(/\/.*$/,""):i===u})}return!0}),Xc}var nH=tH();const Jm=fn(nH);function SE(e){return aH(e)||iH(e)||SR(e)||rH()}function rH(){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 iH(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function aH(e){if(Array.isArray(e))return iv(e)}function EE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function _E(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:cH,message:"File type must be ".concat(r)}},kE=function(t){return{code:fH,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},CE=function(t){return{code:dH,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},mH={code:hH,message:"Too many files"};function ER(e,t){var n=e.type==="application/x-moz-file"||uH(e,t);return[n,n?null:pH(t)]}function _R(e,t,n){if(Ha(e.size))if(Ha(t)&&Ha(n)){if(e.size>n)return[!1,kE(n)];if(e.sizen)return[!1,kE(n)]}return[!0,null]}function Ha(e){return e!=null}function gH(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,o=e.multiple,l=e.maxFiles,u=e.validator;return!o&&t.length>1||o&&l>=1&&t.length>l?!1:t.every(function(f){var d=ER(f,n),p=Ql(d,1),m=p[0],v=_R(f,r,i),g=Ql(v,1),w=g[0],x=u?u(f):null;return m&&w&&!x})}function zf(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Kc(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 TE(e){e.preventDefault()}function vH(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function yH(e){return e.indexOf("Edge/")!==-1}function bH(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return vH(e)||yH(e)}function Ir(){for(var e=arguments.length,t=new Array(e),n=0;n1?i-1:0),l=1;le.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function MH(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Sd=E.forwardRef(function(e,t){var n=e.children,r=Mf(e,kH),i=PH(r),o=i.open,l=Mf(i,CH);return E.useImperativeHandle(t,function(){return{open:o}},[o]),be.createElement(E.Fragment,null,n(zt(zt({},l),{},{open:o})))});Sd.displayName="Dropzone";var AR={disabled:!1,getFilesFromEvent:q$,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};Sd.defaultProps=AR;Sd.propTypes={children:Ct.func,accept:Ct.objectOf(Ct.arrayOf(Ct.string)),multiple:Ct.bool,preventDropOnDocument:Ct.bool,noClick:Ct.bool,noKeyboard:Ct.bool,noDrag:Ct.bool,noDragEventsBubbling:Ct.bool,minSize:Ct.number,maxSize:Ct.number,maxFiles:Ct.number,disabled:Ct.bool,getFilesFromEvent:Ct.func,onFileDialogCancel:Ct.func,onFileDialogOpen:Ct.func,useFsAccessApi:Ct.bool,autoFocus:Ct.bool,onDragEnter:Ct.func,onDragLeave:Ct.func,onDragOver:Ct.func,onDrop:Ct.func,onDropAccepted:Ct.func,onDropRejected:Ct.func,onError:Ct.func,validator:Ct.func};var sv={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function PH(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=zt(zt({},AR),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,l=t.minSize,u=t.multiple,f=t.maxFiles,d=t.onDragEnter,p=t.onDragLeave,m=t.onDragOver,v=t.onDrop,g=t.onDropAccepted,w=t.onDropRejected,x=t.onFileDialogCancel,k=t.onFileDialogOpen,C=t.useFsAccessApi,_=t.autoFocus,T=t.preventDropOnDocument,N=t.noClick,D=t.noKeyboard,L=t.noDrag,R=t.noDragEventsBubbling,U=t.onError,P=t.validator,z=E.useMemo(function(){return SH(n)},[n]),V=E.useMemo(function(){return wH(n)},[n]),q=E.useMemo(function(){return typeof k=="function"?k:RE},[k]),I=E.useMemo(function(){return typeof x=="function"?x:RE},[x]),Y=E.useRef(null),Z=E.useRef(null),B=E.useReducer(FH,sv),G=eg(B,2),F=G[0],K=G[1],A=F.isFocused,H=F.isFileDialogActive,M=E.useRef(typeof window<"u"&&window.isSecureContext&&C&&xH()),O=function(){!M.current&&H&&setTimeout(function(){if(Z.current){var Ne=Z.current.files;Ne.length||(K({type:"closeDialog"}),I())}},300)};E.useEffect(function(){return window.addEventListener("focus",O,!1),function(){window.removeEventListener("focus",O,!1)}},[Z,H,I,M]);var X=E.useRef([]),re=function(Ne){Y.current&&Y.current.contains(Ne.target)||(Ne.preventDefault(),X.current=[])};E.useEffect(function(){return T&&(document.addEventListener("dragover",TE,!1),document.addEventListener("drop",re,!1)),function(){T&&(document.removeEventListener("dragover",TE),document.removeEventListener("drop",re))}},[Y,T]),E.useEffect(function(){return!r&&_&&Y.current&&Y.current.focus(),function(){}},[Y,_,r]);var ue=E.useCallback(function(ve){U?U(ve):console.error(ve)},[U]),ae=E.useCallback(function(ve){ve.preventDefault(),ve.persist(),Se(ve),X.current=[].concat(RH(X.current),[ve.target]),Kc(ve)&&Promise.resolve(i(ve)).then(function(Ne){if(!(zf(ve)&&!R)){var te=Ne.length,de=te>0&&gH({files:Ne,accept:z,minSize:l,maxSize:o,multiple:u,maxFiles:f,validator:P}),Oe=te>0&&!de;K({isDragAccept:de,isDragReject:Oe,isDragActive:!0,type:"setDraggedFiles"}),d&&d(ve)}}).catch(function(Ne){return ue(Ne)})},[i,d,ue,R,z,l,o,u,f,P]),oe=E.useCallback(function(ve){ve.preventDefault(),ve.persist(),Se(ve);var Ne=Kc(ve);if(Ne&&ve.dataTransfer)try{ve.dataTransfer.dropEffect="copy"}catch{}return Ne&&m&&m(ve),!1},[m,R]),Ce=E.useCallback(function(ve){ve.preventDefault(),ve.persist(),Se(ve);var Ne=X.current.filter(function(de){return Y.current&&Y.current.contains(de)}),te=Ne.indexOf(ve.target);te!==-1&&Ne.splice(te,1),X.current=Ne,!(Ne.length>0)&&(K({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Kc(ve)&&p&&p(ve))},[Y,p,R]),he=E.useCallback(function(ve,Ne){var te=[],de=[];ve.forEach(function(Oe){var He=ER(Oe,z),Ye=eg(He,2),vt=Ye[0],Mt=Ye[1],bt=_R(Oe,l,o),rt=eg(bt,2),qt=rt[0],at=rt[1],At=P?P(Oe):null;if(vt&&qt&&!At)te.push(Oe);else{var rn=[Mt,at];At&&(rn=rn.concat(At)),de.push({file:Oe,errors:rn.filter(function(io){return io})})}}),(!u&&te.length>1||u&&f>=1&&te.length>f)&&(te.forEach(function(Oe){de.push({file:Oe,errors:[mH]})}),te.splice(0)),K({acceptedFiles:te,fileRejections:de,isDragReject:de.length>0,type:"setFiles"}),v&&v(te,de,Ne),de.length>0&&w&&w(de,Ne),te.length>0&&g&&g(te,Ne)},[K,u,z,l,o,f,v,g,w,P]),Ee=E.useCallback(function(ve){ve.preventDefault(),ve.persist(),Se(ve),X.current=[],Kc(ve)&&Promise.resolve(i(ve)).then(function(Ne){zf(ve)&&!R||he(Ne,ve)}).catch(function(Ne){return ue(Ne)}),K({type:"reset"})},[i,he,ue,R]),we=E.useCallback(function(){if(M.current){K({type:"openDialog"}),q();var ve={multiple:u,types:V};window.showOpenFilePicker(ve).then(function(Ne){return i(Ne)}).then(function(Ne){he(Ne,null),K({type:"closeDialog"})}).catch(function(Ne){EH(Ne)?(I(Ne),K({type:"closeDialog"})):_H(Ne)?(M.current=!1,Z.current?(Z.current.value=null,Z.current.click()):ue(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):ue(Ne)});return}Z.current&&(K({type:"openDialog"}),q(),Z.current.value=null,Z.current.click())},[K,q,I,C,he,ue,V,u]),Pe=E.useCallback(function(ve){!Y.current||!Y.current.isEqualNode(ve.target)||(ve.key===" "||ve.key==="Enter"||ve.keyCode===32||ve.keyCode===13)&&(ve.preventDefault(),we())},[Y,we]),Ae=E.useCallback(function(){K({type:"focus"})},[]),xe=E.useCallback(function(){K({type:"blur"})},[]),ee=E.useCallback(function(){N||(bH()?setTimeout(we,0):we())},[N,we]),ce=function(Ne){return r?null:Ne},Te=function(Ne){return D?null:ce(Ne)},ge=function(Ne){return L?null:ce(Ne)},Se=function(Ne){R&&Ne.stopPropagation()},ie=E.useMemo(function(){return function(){var ve=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Ne=ve.refKey,te=Ne===void 0?"ref":Ne,de=ve.role,Oe=ve.onKeyDown,He=ve.onFocus,Ye=ve.onBlur,vt=ve.onClick,Mt=ve.onDragEnter,bt=ve.onDragOver,rt=ve.onDragLeave,qt=ve.onDrop,at=Mf(ve,TH);return zt(zt(ov({onKeyDown:Te(Ir(Oe,Pe)),onFocus:Te(Ir(He,Ae)),onBlur:Te(Ir(Ye,xe)),onClick:ce(Ir(vt,ee)),onDragEnter:ge(Ir(Mt,ae)),onDragOver:ge(Ir(bt,oe)),onDragLeave:ge(Ir(rt,Ce)),onDrop:ge(Ir(qt,Ee)),role:typeof de=="string"&&de!==""?de:"presentation"},te,Y),!r&&!D?{tabIndex:0}:{}),at)}},[Y,Pe,Ae,xe,ee,ae,oe,Ce,Ee,D,L,r]),$e=E.useCallback(function(ve){ve.stopPropagation()},[]),Ge=E.useMemo(function(){return function(){var ve=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Ne=ve.refKey,te=Ne===void 0?"ref":Ne,de=ve.onChange,Oe=ve.onClick,He=Mf(ve,AH),Ye=ov({accept:z,multiple:u,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:ce(Ir(de,Ee)),onClick:ce(Ir(Oe,$e)),tabIndex:-1},te,Z);return zt(zt({},Ye),He)}},[Z,n,u,Ee,r]);return zt(zt({},F),{},{isFocused:A&&!r,getRootProps:ie,getInputProps:Ge,rootRef:Y,inputRef:Z,open:ce(we)})}function FH(e,t){switch(t.type){case"focus":return zt(zt({},e),{},{isFocused:!0});case"blur":return zt(zt({},e),{},{isFocused:!1});case"openDialog":return zt(zt({},sv),{},{isFileDialogActive:!0});case"closeDialog":return zt(zt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return zt(zt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return zt(zt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return zt({},sv);default:return e}}function RE(){}var Py="Progress",Fy=100,[IH,vK]=dr(Py),[GH,UH]=IH(Py),RR=E.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:i,getValueLabel:o=BH,...l}=e;(i||i===0)&&!DE(i)&&console.error($H(`${i}`,"Progress"));const u=DE(i)?i:Fy;r!==null&&!NE(r,u)&&console.error(HH(`${r}`,"Progress"));const f=NE(r,u)?r:null,d=Pf(f)?o(f,u):void 0;return S.jsx(GH,{scope:n,value:f,max:u,children:S.jsx(We.div,{"aria-valuemax":u,"aria-valuemin":0,"aria-valuenow":Pf(f)?f:void 0,"aria-valuetext":d,role:"progressbar","data-state":OR(f,u),"data-value":f??void 0,"data-max":u,...l,ref:t})})});RR.displayName=Py;var DR="ProgressIndicator",NR=E.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,i=UH(DR,n);return S.jsx(We.div,{"data-state":OR(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...r,ref:t})});NR.displayName=DR;function BH(e,t){return`${Math.round(e/t*100)}%`}function OR(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Pf(e){return typeof e=="number"}function DE(e){return Pf(e)&&!isNaN(e)&&e>0}function NE(e,t){return Pf(e)&&!isNaN(e)&&e<=t&&e>=0}function $H(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Fy}\`.`}function HH(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be: + - a positive number + - less than the value passed to \`max\` (or ${Fy} if no \`max\` prop is set) + - \`null\` or \`undefined\` if the progress is indeterminate. + +Defaulting to \`null\`.`}var jR=RR,VH=NR;const LR=E.forwardRef(({className:e,value:t,...n},r)=>S.jsx(jR,{ref:r,className:Me("bg-secondary relative h-4 w-full overflow-hidden rounded-full",e),...n,children:S.jsx(VH,{className:"bg-primary h-full w-full flex-1 transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));LR.displayName=jR.displayName;function lv(e,[t,n]){return Math.min(n,Math.max(t,e))}function qH(e,t){return E.useReducer((n,r)=>t[n][r]??n,e)}var Iy="ScrollArea",[zR,yK]=dr(Iy),[YH,pr]=zR(Iy),MR=E.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:i,scrollHideDelay:o=600,...l}=e,[u,f]=E.useState(null),[d,p]=E.useState(null),[m,v]=E.useState(null),[g,w]=E.useState(null),[x,k]=E.useState(null),[C,_]=E.useState(0),[T,N]=E.useState(0),[D,L]=E.useState(!1),[R,U]=E.useState(!1),P=dt(t,V=>f(V)),z=pd(i);return S.jsx(YH,{scope:n,type:r,dir:z,scrollHideDelay:o,scrollArea:u,viewport:d,onViewportChange:p,content:m,onContentChange:v,scrollbarX:g,onScrollbarXChange:w,scrollbarXEnabled:D,onScrollbarXEnabledChange:L,scrollbarY:x,onScrollbarYChange:k,scrollbarYEnabled:R,onScrollbarYEnabledChange:U,onCornerWidthChange:_,onCornerHeightChange:N,children:S.jsx(We.div,{dir:z,...l,ref:P,style:{position:"relative","--radix-scroll-area-corner-width":C+"px","--radix-scroll-area-corner-height":T+"px",...e.style}})})});MR.displayName=Iy;var PR="ScrollAreaViewport",FR=E.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:i,...o}=e,l=pr(PR,n),u=E.useRef(null),f=dt(t,u,l.onViewportChange);return S.jsxs(S.Fragment,{children:[S.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:i}),S.jsx(We.div,{"data-radix-scroll-area-viewport":"",...o,ref:f,style:{overflowX:l.scrollbarXEnabled?"scroll":"hidden",overflowY:l.scrollbarYEnabled?"scroll":"hidden",...e.style},children:S.jsx("div",{ref:l.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});FR.displayName=PR;var Xr="ScrollAreaScrollbar",Gy=E.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=pr(Xr,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:l}=i,u=e.orientation==="horizontal";return E.useEffect(()=>(u?o(!0):l(!0),()=>{u?o(!1):l(!1)}),[u,o,l]),i.type==="hover"?S.jsx(WH,{...r,ref:t,forceMount:n}):i.type==="scroll"?S.jsx(XH,{...r,ref:t,forceMount:n}):i.type==="auto"?S.jsx(IR,{...r,ref:t,forceMount:n}):i.type==="always"?S.jsx(Uy,{...r,ref:t}):null});Gy.displayName=Xr;var WH=E.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=pr(Xr,e.__scopeScrollArea),[o,l]=E.useState(!1);return E.useEffect(()=>{const u=i.scrollArea;let f=0;if(u){const d=()=>{window.clearTimeout(f),l(!0)},p=()=>{f=window.setTimeout(()=>l(!1),i.scrollHideDelay)};return u.addEventListener("pointerenter",d),u.addEventListener("pointerleave",p),()=>{window.clearTimeout(f),u.removeEventListener("pointerenter",d),u.removeEventListener("pointerleave",p)}}},[i.scrollArea,i.scrollHideDelay]),S.jsx(Kn,{present:n||o,children:S.jsx(IR,{"data-state":o?"visible":"hidden",...r,ref:t})})}),XH=E.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=pr(Xr,e.__scopeScrollArea),o=e.orientation==="horizontal",l=_d(()=>f("SCROLL_END"),100),[u,f]=qH("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 E.useEffect(()=>{if(u==="idle"){const d=window.setTimeout(()=>f("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(d)}},[u,i.scrollHideDelay,f]),E.useEffect(()=>{const d=i.viewport,p=o?"scrollLeft":"scrollTop";if(d){let m=d[p];const v=()=>{const g=d[p];m!==g&&(f("SCROLL"),l()),m=g};return d.addEventListener("scroll",v),()=>d.removeEventListener("scroll",v)}},[i.viewport,o,f,l]),S.jsx(Kn,{present:n||u!=="hidden",children:S.jsx(Uy,{"data-state":u==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:qe(e.onPointerEnter,()=>f("POINTER_ENTER")),onPointerLeave:qe(e.onPointerLeave,()=>f("POINTER_LEAVE"))})})}),IR=E.forwardRef((e,t)=>{const n=pr(Xr,e.__scopeScrollArea),{forceMount:r,...i}=e,[o,l]=E.useState(!1),u=e.orientation==="horizontal",f=_d(()=>{if(n.viewport){const d=n.viewport.offsetWidth{const{orientation:n="vertical",...r}=e,i=pr(Xr,e.__scopeScrollArea),o=E.useRef(null),l=E.useRef(0),[u,f]=E.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=HR(u.viewport,u.content),p={...r,sizes:u,onSizesChange:f,hasThumb:d>0&&d<1,onThumbChange:v=>o.current=v,onThumbPointerUp:()=>l.current=0,onThumbPointerDown:v=>l.current=v};function m(v,g){return t9(v,l.current,u,g)}return n==="horizontal"?S.jsx(KH,{...p,ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const v=i.viewport.scrollLeft,g=OE(v,u,i.dir);o.current.style.transform=`translate3d(${g}px, 0, 0)`}},onWheelScroll:v=>{i.viewport&&(i.viewport.scrollLeft=v)},onDragScroll:v=>{i.viewport&&(i.viewport.scrollLeft=m(v,i.dir))}}):n==="vertical"?S.jsx(ZH,{...p,ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const v=i.viewport.scrollTop,g=OE(v,u);o.current.style.transform=`translate3d(0, ${g}px, 0)`}},onWheelScroll:v=>{i.viewport&&(i.viewport.scrollTop=v)},onDragScroll:v=>{i.viewport&&(i.viewport.scrollTop=m(v))}}):null}),KH=E.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,o=pr(Xr,e.__scopeScrollArea),[l,u]=E.useState(),f=E.useRef(null),d=dt(t,f,o.onScrollbarXChange);return E.useEffect(()=>{f.current&&u(getComputedStyle(f.current))},[f]),S.jsx(UR,{"data-orientation":"horizontal",...i,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":Ed(n)+"px",...e.style},onThumbPointerDown:p=>e.onThumbPointerDown(p.x),onDragScroll:p=>e.onDragScroll(p.x),onWheelScroll:(p,m)=>{if(o.viewport){const v=o.viewport.scrollLeft+p.deltaX;e.onWheelScroll(v),qR(v,m)&&p.preventDefault()}},onResize:()=>{f.current&&o.viewport&&l&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:f.current.clientWidth,paddingStart:If(l.paddingLeft),paddingEnd:If(l.paddingRight)}})}})}),ZH=E.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,o=pr(Xr,e.__scopeScrollArea),[l,u]=E.useState(),f=E.useRef(null),d=dt(t,f,o.onScrollbarYChange);return E.useEffect(()=>{f.current&&u(getComputedStyle(f.current))},[f]),S.jsx(UR,{"data-orientation":"vertical",...i,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":Ed(n)+"px",...e.style},onThumbPointerDown:p=>e.onThumbPointerDown(p.y),onDragScroll:p=>e.onDragScroll(p.y),onWheelScroll:(p,m)=>{if(o.viewport){const v=o.viewport.scrollTop+p.deltaY;e.onWheelScroll(v),qR(v,m)&&p.preventDefault()}},onResize:()=>{f.current&&o.viewport&&l&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:f.current.clientHeight,paddingStart:If(l.paddingTop),paddingEnd:If(l.paddingBottom)}})}})}),[QH,GR]=zR(Xr),UR=E.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:o,onThumbPointerUp:l,onThumbPointerDown:u,onThumbPositionChange:f,onDragScroll:d,onWheelScroll:p,onResize:m,...v}=e,g=pr(Xr,n),[w,x]=E.useState(null),k=dt(t,P=>x(P)),C=E.useRef(null),_=E.useRef(""),T=g.viewport,N=r.content-r.viewport,D=un(p),L=un(f),R=_d(m,10);function U(P){if(C.current){const z=P.clientX-C.current.left,V=P.clientY-C.current.top;d({x:z,y:V})}}return E.useEffect(()=>{const P=z=>{const V=z.target;(w==null?void 0:w.contains(V))&&D(z,N)};return document.addEventListener("wheel",P,{passive:!1}),()=>document.removeEventListener("wheel",P,{passive:!1})},[T,w,N,D]),E.useEffect(L,[r,L]),hs(w,R),hs(g.content,R),S.jsx(QH,{scope:n,scrollbar:w,hasThumb:i,onThumbChange:un(o),onThumbPointerUp:un(l),onThumbPositionChange:L,onThumbPointerDown:un(u),children:S.jsx(We.div,{...v,ref:k,style:{position:"absolute",...v.style},onPointerDown:qe(e.onPointerDown,P=>{P.button===0&&(P.target.setPointerCapture(P.pointerId),C.current=w.getBoundingClientRect(),_.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",g.viewport&&(g.viewport.style.scrollBehavior="auto"),U(P))}),onPointerMove:qe(e.onPointerMove,U),onPointerUp:qe(e.onPointerUp,P=>{const z=P.target;z.hasPointerCapture(P.pointerId)&&z.releasePointerCapture(P.pointerId),document.body.style.webkitUserSelect=_.current,g.viewport&&(g.viewport.style.scrollBehavior=""),C.current=null})})})}),Ff="ScrollAreaThumb",BR=E.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=GR(Ff,e.__scopeScrollArea);return S.jsx(Kn,{present:n||i.hasThumb,children:S.jsx(JH,{ref:t,...r})})}),JH=E.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...i}=e,o=pr(Ff,n),l=GR(Ff,n),{onThumbPositionChange:u}=l,f=dt(t,m=>l.onThumbChange(m)),d=E.useRef(void 0),p=_d(()=>{d.current&&(d.current(),d.current=void 0)},100);return E.useEffect(()=>{const m=o.viewport;if(m){const v=()=>{if(p(),!d.current){const g=n9(m,u);d.current=g,u()}};return u(),m.addEventListener("scroll",v),()=>m.removeEventListener("scroll",v)}},[o.viewport,p,u]),S.jsx(We.div,{"data-state":l.hasThumb?"visible":"hidden",...i,ref:f,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:qe(e.onPointerDownCapture,m=>{const g=m.target.getBoundingClientRect(),w=m.clientX-g.left,x=m.clientY-g.top;l.onThumbPointerDown({x:w,y:x})}),onPointerUp:qe(e.onPointerUp,l.onThumbPointerUp)})});BR.displayName=Ff;var By="ScrollAreaCorner",$R=E.forwardRef((e,t)=>{const n=pr(By,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?S.jsx(e9,{...e,ref:t}):null});$R.displayName=By;var e9=E.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,i=pr(By,n),[o,l]=E.useState(0),[u,f]=E.useState(0),d=!!(o&&u);return hs(i.scrollbarX,()=>{var m;const p=((m=i.scrollbarX)==null?void 0:m.offsetHeight)||0;i.onCornerHeightChange(p),f(p)}),hs(i.scrollbarY,()=>{var m;const p=((m=i.scrollbarY)==null?void 0:m.offsetWidth)||0;i.onCornerWidthChange(p),l(p)}),d?S.jsx(We.div,{...r,ref:t,style:{width:o,height:u,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function If(e){return e?parseInt(e,10):0}function HR(e,t){const n=e/t;return isNaN(n)?0:n}function Ed(e){const t=HR(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function t9(e,t,n,r="ltr"){const i=Ed(n),o=i/2,l=t||o,u=i-l,f=n.scrollbar.paddingStart+l,d=n.scrollbar.size-n.scrollbar.paddingEnd-u,p=n.content-n.viewport,m=r==="ltr"?[0,p]:[p*-1,0];return VR([f,d],m)(e)}function OE(e,t,n="ltr"){const r=Ed(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-i,l=t.content-t.viewport,u=o-r,f=n==="ltr"?[0,l]:[l*-1,0],d=lv(e,f);return VR([0,l],[0,u])(d)}function VR(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 qR(e,t){return e>0&&e{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function i(){const o={left:e.scrollLeft,top:e.scrollTop},l=n.left!==o.left,u=n.top!==o.top;(l||u)&&t(),n=o,r=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(r)};function _d(e,t){const n=un(e),r=E.useRef(0);return E.useEffect(()=>()=>window.clearTimeout(r.current),[]),E.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function hs(e,t){const n=un(t);xn(()=>{let r=0;if(e){const i=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return i.observe(e),()=>{window.cancelAnimationFrame(r),i.unobserve(e)}}},[e,n])}var YR=MR,r9=FR,i9=$R;const WR=E.forwardRef(({className:e,children:t,...n},r)=>S.jsxs(YR,{ref:r,className:Me("relative overflow-hidden",e),...n,children:[S.jsx(r9,{className:"h-full w-full rounded-[inherit]",children:t}),S.jsx(XR,{}),S.jsx(i9,{})]}));WR.displayName=YR.displayName;const XR=E.forwardRef(({className:e,orientation:t="vertical",...n},r)=>S.jsx(Gy,{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:S.jsx(BR,{className:"bg-border relative flex-1 rounded-full"})}));XR.displayName=Gy.displayName;function uv(e,t={}){const{decimals:n=0,sizeType:r="normal"}=t,i=["Bytes","KB","MB","GB","TB"],o=["Bytes","KiB","MiB","GiB","TiB"];if(e===0)return"0 Byte";const l=Math.floor(Math.log(e)/Math.log(1024));return`${(e/Math.pow(1024,l)).toFixed(n)} ${r==="accurate"?o[l]??"Bytes":i[l]??"Bytes"}`}function a9(e){const{value:t,onValueChange:n,onUpload:r,progresses:i,accept:o=SL,maxSize:l=1024*1024*200,maxFileCount:u=1,multiple:f=!1,disabled:d=!1,description:p,className:m,...v}=e,[g,w]=_i({prop:t,onChange:n}),x=E.useCallback((_,T)=>{if(!f&&u===1&&_.length>1){vn.error("Cannot upload more than 1 file at a time");return}if(((g==null?void 0:g.length)??0)+_.length>u){vn.error(`Cannot upload more than ${u} files`);return}const N=_.map(L=>Object.assign(L,{preview:URL.createObjectURL(L)})),D=g?[...g,...N]:N;if(w(D),T.length>0&&T.forEach(({file:L})=>{vn.error(`File ${L.name} was rejected`)}),r&&D.length>0&&D.length<=u){const L=D.length>0?`${D.length} files`:"file";vn.promise(r(D),{loading:`Uploading ${L}...`,success:()=>(w([]),`${L} uploaded`),error:`Failed to upload ${L}`})}},[g,u,f,r,w]);function k(_){if(!g)return;const T=g.filter((N,D)=>D!==_);w(T),n==null||n(T)}E.useEffect(()=>()=>{g&&g.forEach(_=>{KR(_)&&URL.revokeObjectURL(_.preview)})},[]);const C=d||((g==null?void 0:g.length)??0)>=u;return S.jsxs("div",{className:"relative flex flex-col gap-6 overflow-hidden",children:[S.jsx(Sd,{onDrop:x,accept:o,maxSize:l,maxFiles:u,multiple:u>1||f,disabled:C,children:({getRootProps:_,getInputProps:T,isDragActive:N})=>S.jsxs("div",{..._(),className:Me("group border-muted-foreground/25 hover:bg-muted/25 relative grid h-52 w-full cursor-pointer place-items-center rounded-lg border-2 border-dashed px-5 py-2.5 text-center transition","ring-offset-background focus-visible:ring-ring focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",N&&"border-muted-foreground/50",C&&"pointer-events-none opacity-60",m),...v,children:[S.jsx("input",{...T()}),N?S.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 sm:px-5",children:[S.jsx("div",{className:"rounded-full border border-dashed p-3",children:S.jsx(Rg,{className:"text-muted-foreground size-7","aria-hidden":"true"})}),S.jsx("p",{className:"text-muted-foreground font-medium",children:"Drop the files here"})]}):S.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 sm:px-5",children:[S.jsx("div",{className:"rounded-full border border-dashed p-3",children:S.jsx(Rg,{className:"text-muted-foreground size-7","aria-hidden":"true"})}),S.jsxs("div",{className:"flex flex-col gap-px",children:[S.jsx("p",{className:"text-muted-foreground font-medium",children:"Drag and drop files here, or click to select files"}),p?S.jsx("p",{className:"text-muted-foreground/70 text-sm",children:p}):S.jsxs("p",{className:"text-muted-foreground/70 text-sm",children:["You can upload",u>1?` ${u===1/0?"multiple":u} + files (up to ${uv(l)} each)`:` a file with ${uv(l)}`,"Supported formats: TXT, MD, DOC, PDF, PPTX"]})]})]})]})}),g!=null&&g.length?S.jsx(WR,{className:"h-fit w-full px-3",children:S.jsx("div",{className:"flex max-h-48 flex-col gap-4",children:g==null?void 0:g.map((_,T)=>S.jsx(o9,{file:_,onRemove:()=>k(T),progress:i==null?void 0:i[_.name]},T))})}):null]})}function o9({file:e,progress:t,onRemove:n}){return S.jsxs("div",{className:"relative flex items-center gap-2.5",children:[S.jsxs("div",{className:"flex flex-1 gap-2.5",children:[KR(e)?S.jsx(s9,{file:e}):null,S.jsxs("div",{className:"flex w-full flex-col gap-2",children:[S.jsxs("div",{className:"flex flex-col gap-px",children:[S.jsx("p",{className:"text-foreground/80 line-clamp-1 text-sm font-medium",children:e.name}),S.jsx("p",{className:"text-muted-foreground text-xs",children:uv(e.size)})]}),t?S.jsx(LR,{value:t}):null]})]}),S.jsx("div",{className:"flex items-center gap-2",children:S.jsxs(Ot,{type:"button",variant:"outline",size:"icon",className:"size-7",onClick:n,children:[S.jsx(_k,{className:"size-4","aria-hidden":"true"}),S.jsx("span",{className:"sr-only",children:"Remove file"})]})})]})}function KR(e){return"preview"in e&&typeof e.preview=="string"}function s9({file:e}){return e.type.startsWith("image/")?S.jsx("div",{className:"aspect-square shrink-0 rounded-md object-cover"}):S.jsx(kM,{className:"text-muted-foreground size-10","aria-hidden":"true"})}function l9(){const[e,t]=E.useState(!1),[n,r]=E.useState(!1),[i,o]=E.useState({}),l=E.useCallback(async u=>{r(!0);try{await Promise.all(u.map(async f=>{try{const d=await cM(f,p=>{console.debug(`Uploading ${f.name}: ${p}%`),o(m=>({...m,[f.name]:p}))});d.status==="success"?vn.success(`Upload Success: +${f.name} uploaded successfully`):vn.error(`Upload Failed: +${f.name} +${d.message}`)}catch(d){vn.error(`Upload Failed: +${f.name} +${Cr(d)}`)}}))}catch(f){vn.error(`Upload Failed +`+Cr(f))}finally{r(!1)}},[r,o]);return S.jsxs(ZA,{open:e,onOpenChange:u=>{n&&!u||t(u)},children:[S.jsx(QA,{asChild:!0,children:S.jsxs(Ot,{variant:"default",side:"bottom",tooltip:"Upload documents",size:"sm",children:[S.jsx(Rg,{})," Upload"]})}),S.jsxs(Ty,{className:"sm:max-w-xl",onCloseAutoFocus:u=>u.preventDefault(),children:[S.jsxs(Ay,{children:[S.jsx(Ry,{children:"Upload documents"}),S.jsx(Dy,{children:"Drag and drop your documents here or click to browse."})]}),S.jsx(a9,{maxFileCount:1/0,maxSize:200*1024*1024,description:"supported types: TXT, MD, DOC, PDF, PPTX",onUpload:l,progresses:i,disabled:n})]})]})}function u9(){const[e,t]=E.useState(!1),n=E.useCallback(async()=>{try{const r=await fM();r.status==="success"?(vn.success("Documents cleared successfully"),t(!1)):vn.error(`Clear Documents Failed: +${r.message}`)}catch(r){vn.error(`Clear Documents Failed: +`+Cr(r))}},[t]);return S.jsxs(ZA,{open:e,onOpenChange:t,children:[S.jsx(QA,{asChild:!0,children:S.jsxs(Ot,{variant:"outline",side:"bottom",tooltip:"Clear documents",size:"sm",children:[S.jsx(Sk,{})," Clear"]})}),S.jsxs(Ty,{className:"sm:max-w-xl",onCloseAutoFocus:r=>r.preventDefault(),children:[S.jsxs(Ay,{children:[S.jsx(Ry,{children:"Clear documents"}),S.jsx(Dy,{children:"Do you really want to clear all documents?"})]}),S.jsx(Ot,{variant:"destructive",onClick:n,children:"YES"})]})]})}function c9(){const e=Mn.use.health(),[t,n]=E.useState(null),r=E.useCallback(async()=>{try{const o=await oM();o&&o.statuses&&Object.values(o.statuses).reduce((u,f)=>u+f.length,0)>0?n(o):n(null)}catch(o){vn.error(`Failed to load documents +`+Cr(o))}},[n]);E.useEffect(()=>{r()},[]);const i=E.useCallback(async()=>{try{const{status:o}=await sM();vn.message(o)}catch(o){vn.error(`Failed to load documents +`+Cr(o))}},[]);return E.useEffect(()=>{const o=setInterval(async()=>{if(e)try{await r()}catch(l){vn.error(`Failed to get scan progress +`+Cr(l))}},5e3);return()=>clearInterval(o)},[e,r]),S.jsxs(Kl,{className:"!size-full !rounded-none !border-none",children:[S.jsx(Of,{children:S.jsx(Zl,{className:"text-lg",children:"Document Management"})}),S.jsxs(jf,{className:"space-y-4",children:[S.jsxs("div",{className:"flex gap-2",children:[S.jsxs(Ot,{variant:"outline",onClick:i,side:"bottom",tooltip:"Scan documents",size:"sm",children:[S.jsx(WM,{})," Scan"]}),S.jsx("div",{className:"flex-1"}),S.jsx(u9,{}),S.jsx(l9,{})]}),S.jsxs(Kl,{children:[S.jsxs(Of,{children:[S.jsx(Zl,{children:"Uploaded documents"}),S.jsx(wd,{children:"view the uploaded documents here"})]}),S.jsxs(jf,{children:[!t&&S.jsx(F$,{title:"No documents uploaded",description:"upload documents to see them here"}),t&&S.jsxs(gR,{children:[S.jsx(vR,{children:S.jsxs(nv,{children:[S.jsx(bi,{children:"ID"}),S.jsx(bi,{children:"Summary"}),S.jsx(bi,{children:"Status"}),S.jsx(bi,{children:"Length"}),S.jsx(bi,{children:"Chunks"}),S.jsx(bi,{children:"Created"}),S.jsx(bi,{children:"Updated"}),S.jsx(bi,{children:"Metadata"})]})}),S.jsx(yR,{className:"text-sm",children:Object.entries(t.statuses).map(([o,l])=>l.map(u=>S.jsxs(nv,{children:[S.jsx(xi,{className:"truncate font-mono",children:u.id}),S.jsx(xi,{className:"max-w-xs min-w-24 truncate",children:S.jsx(jn,{text:u.content_summary,tooltip:u.content_summary,tooltipClassName:"max-w-none overflow-visible block"})}),S.jsxs(xi,{children:[o==="processed"&&S.jsx("span",{className:"text-green-600",children:"Completed"}),o==="processing"&&S.jsx("span",{className:"text-blue-600",children:"Processing"}),o==="pending"&&S.jsx("span",{className:"text-yellow-600",children:"Pending"}),o==="failed"&&S.jsx("span",{className:"text-red-600",children:"Failed"}),u.error&&S.jsx("span",{className:"ml-2 text-red-500",title:u.error,children:"⚠️"})]}),S.jsx(xi,{children:u.content_length??"-"}),S.jsx(xi,{children:u.chunks_count??"-"}),S.jsx(xi,{className:"truncate",children:new Date(u.created_at).toLocaleString()}),S.jsx(xi,{className:"truncate",children:new Date(u.updated_at).toLocaleString()}),S.jsx(xi,{className:"max-w-xs truncate",children:u.metadata?JSON.stringify(u.metadata):"-"})]},u.id)))})]})]})]})]})]})}function ZR(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i=u?i=i+jE("0",l-u):i=(i.substring(0,l)||"0")+"."+i.substring(l),n+i}function LE(e,t,n){if(["","-"].indexOf(e)!==-1)return e;var r=(e.indexOf(".")!==-1||n)&&t,i=$y(e),o=i.beforeDecimal,l=i.afterDecimal,u=i.hasNegation,f=parseFloat("0."+(l||"0")),d=l.length<=t?"0."+l:f.toFixed(t),p=d.split("."),m=o;o&&Number(p[0])&&(m=o.split("").reverse().reduce(function(x,k,C){return x.length>C?(Number(x[0])+Number(k)).toString()+x.substring(1,x.length):k+x},p[0]));var v=e2(p[1]||"",t,n),g=u?"-":"",w=r?".":"";return""+g+m+w+v}function Va(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var n=e.createTextRange();return n.move("character",t),n.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var n2=f9(function(e,t){for(var n=0,r=0,i=e.length,o=t.length;e[n]===t[n]&&nn&&i-r>n;)r++;return{from:{start:n,end:i-r},to:{start:n,end:o-r}}}),v9=function(e,t){var n=Math.min(e.selectionStart,t);return{from:{start:n,end:e.selectionEnd},to:{start:n,end:t}}};function y9(e,t,n){return Math.min(Math.max(e,t),n)}function tg(e){return Math.max(e.selectionStart,e.selectionEnd)}function b9(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function x9(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function w9(e){var t=e.currentValue,n=e.formattedValue,r=e.currentValueIndex,i=e.formattedValueIndex;return t[r]===n[i]}function S9(e,t,n,r,i,o,l){l===void 0&&(l=w9);var u=i.findIndex(function(N){return N}),f=e.slice(0,u);!t&&!n.startsWith(f)&&(t=f,n=f+n,r=r+f.length);for(var d=n.length,p=e.length,m={},v=new Array(d),g=0;g0&&v[C]===-1;)C--;var T=C===-1||v[C]===-1?0:v[C]+1;return T>_?_:r-T<_-r?T:_}function zE(e,t,n,r){var i=e.length;if(t=y9(t,0,i),r==="left"){for(;t>=0&&!n[t];)t--;t===-1&&(t=n.indexOf(!0))}else{for(;t<=i&&!n[t];)t++;t>i&&(t=n.lastIndexOf(!0))}return t===-1&&(t=i),t}function E9(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),n=0,r=t.length;nR.length-l.length||LV||m>e.length-l.length)&&(z=m),e=e.substring(0,z),e=T9(T?"-"+e:e,i),e=(e.match(A9(w))||[]).join("");var q=e.indexOf(w);e=e.replace(new RegExp(JR(w),"g"),function(G,F){return F===q?".":""});var I=$y(e,i),Y=I.beforeDecimal,Z=I.afterDecimal,B=I.addNegation;return d.end-d.startH?!1:A>=re.start&&A{const[x,k]=E.useState(v??r),C=E.useCallback(()=>{k(D=>D===void 0?e??1:Math.min(D+(e??1),o))},[e,o]),_=E.useCallback(()=>{k(D=>D===void 0?-(e??1):Math.max(D-(e??1),i))},[e,i]);E.useEffect(()=>{v!==void 0&&k(v)},[v]);const T=D=>{const L=D.floatValue===void 0?void 0:D.floatValue;k(L),l&&l(L)},N=()=>{x!==void 0&&(xo&&(k(o),w.current.value=String(o)))};return S.jsxs("div",{className:"relative flex",children:[S.jsx(L9,{value:x,onValueChange:T,thousandSeparator:t,decimalScale:f,fixedDecimalScale:u,allowNegative:i<0,valueIsNumericString:!0,onBlur:N,max:o,min:i,suffix:p,prefix:m,customInput:D=>S.jsx(Za,{...D,className:Me("w-full",d)}),placeholder:n,className:"[appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",getInputRef:w,...g}),S.jsxs("div",{className:"absolute top-0 right-0 bottom-0 flex flex-col",children:[S.jsx(Ot,{"aria-label":"Increase value",className:"border-input h-1/2 rounded-l-none rounded-br-none border-b border-l px-2 focus-visible:relative",variant:"outline",onClick:C,disabled:x===o,children:S.jsx(wk,{size:15})}),S.jsx(Ot,{"aria-label":"Decrease value",className:"border-input h-1/2 rounded-l-none rounded-tr-none border-b border-l px-2 focus-visible:relative",variant:"outline",onClick:_,disabled:x===i,children:S.jsx(zv,{size:15})})]})]})});Jo.displayName="NumberInput";var z9=[" ","Enter","ArrowUp","ArrowDown"],M9=[" ","Enter"],gu="Select",[Cd,Td,P9]=mT(gu),[As,bK]=dr(gu,[P9,ws]),Ad=ws(),[F9,pa]=As(gu),[I9,G9]=As(gu),i2=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:o,value:l,defaultValue:u,onValueChange:f,dir:d,name:p,autoComplete:m,disabled:v,required:g,form:w}=e,x=Ad(t),[k,C]=E.useState(null),[_,T]=E.useState(null),[N,D]=E.useState(!1),L=pd(d),[R=!1,U]=_i({prop:r,defaultProp:i,onChange:o}),[P,z]=_i({prop:l,defaultProp:u,onChange:f}),V=E.useRef(null),q=k?w||!!k.closest("form"):!0,[I,Y]=E.useState(new Set),Z=Array.from(I).map(B=>B.props.value).join(";");return S.jsx(ry,{...x,children:S.jsxs(F9,{required:g,scope:t,trigger:k,onTriggerChange:C,valueNode:_,onValueNodeChange:T,valueNodeHasChildren:N,onValueNodeHasChildrenChange:D,contentId:bn(),value:P,onValueChange:z,open:R,onOpenChange:U,dir:L,triggerPointerDownPosRef:V,disabled:v,children:[S.jsx(Cd.Provider,{scope:t,children:S.jsx(I9,{scope:e.__scopeSelect,onNativeOptionAdd:E.useCallback(B=>{Y(G=>new Set(G).add(B))},[]),onNativeOptionRemove:E.useCallback(B=>{Y(G=>{const F=new Set(G);return F.delete(B),F})},[]),children:n})}),q?S.jsxs(D2,{"aria-hidden":!0,required:g,tabIndex:-1,name:p,autoComplete:m,value:P,onChange:B=>z(B.target.value),disabled:v,form:w,children:[P===void 0?S.jsx("option",{value:""}):null,Array.from(I)]},Z):null]})})};i2.displayName=gu;var a2="SelectTrigger",o2=E.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,o=Ad(n),l=pa(a2,n),u=l.disabled||r,f=dt(t,l.onTriggerChange),d=Td(n),p=E.useRef("touch"),[m,v,g]=N2(x=>{const k=d().filter(T=>!T.disabled),C=k.find(T=>T.value===l.value),_=O2(k,x,C);_!==void 0&&l.onValueChange(_.value)}),w=x=>{u||(l.onOpenChange(!0),g()),x&&(l.triggerPointerDownPosRef.current={x:Math.round(x.pageX),y:Math.round(x.pageY)})};return S.jsx(sd,{asChild:!0,...o,children:S.jsx(We.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":R2(l.value)?"":void 0,...i,ref:f,onClick:qe(i.onClick,x=>{x.currentTarget.focus(),p.current!=="mouse"&&w(x)}),onPointerDown:qe(i.onPointerDown,x=>{p.current=x.pointerType;const k=x.target;k.hasPointerCapture(x.pointerId)&&k.releasePointerCapture(x.pointerId),x.button===0&&x.ctrlKey===!1&&x.pointerType==="mouse"&&(w(x),x.preventDefault())}),onKeyDown:qe(i.onKeyDown,x=>{const k=m.current!=="";!(x.ctrlKey||x.altKey||x.metaKey)&&x.key.length===1&&v(x.key),!(k&&x.key===" ")&&z9.includes(x.key)&&(w(),x.preventDefault())})})})});o2.displayName=a2;var s2="SelectValue",l2=E.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:o,placeholder:l="",...u}=e,f=pa(s2,n),{onValueNodeHasChildrenChange:d}=f,p=o!==void 0,m=dt(t,f.onValueNodeChange);return xn(()=>{d(p)},[d,p]),S.jsx(We.span,{...u,ref:m,style:{pointerEvents:"none"},children:R2(f.value)?S.jsx(S.Fragment,{children:l}):o})});l2.displayName=s2;var U9="SelectIcon",u2=E.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return S.jsx(We.span,{"aria-hidden":!0,...i,ref:t,children:r||"▼"})});u2.displayName=U9;var B9="SelectPortal",c2=e=>S.jsx(Jf,{asChild:!0,...e});c2.displayName=B9;var eo="SelectContent",f2=E.forwardRef((e,t)=>{const n=pa(eo,e.__scopeSelect),[r,i]=E.useState();if(xn(()=>{i(new DocumentFragment)},[]),!n.open){const o=r;return o?au.createPortal(S.jsx(d2,{scope:e.__scopeSelect,children:S.jsx(Cd.Slot,{scope:e.__scopeSelect,children:S.jsx("div",{children:e.children})})}),o):null}return S.jsx(h2,{...e,ref:t})});f2.displayName=eo;var _r=10,[d2,ma]=As(eo),$9="SelectContentImpl",h2=E.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:o,onPointerDownOutside:l,side:u,sideOffset:f,align:d,alignOffset:p,arrowPadding:m,collisionBoundary:v,collisionPadding:g,sticky:w,hideWhenDetached:x,avoidCollisions:k,...C}=e,_=pa(eo,n),[T,N]=E.useState(null),[D,L]=E.useState(null),R=dt(t,ae=>N(ae)),[U,P]=E.useState(null),[z,V]=E.useState(null),q=Td(n),[I,Y]=E.useState(!1),Z=E.useRef(!1);E.useEffect(()=>{if(T)return Fv(T)},[T]),Pv();const B=E.useCallback(ae=>{const[oe,...Ce]=q().map(we=>we.ref.current),[he]=Ce.slice(-1),Ee=document.activeElement;for(const we of ae)if(we===Ee||(we==null||we.scrollIntoView({block:"nearest"}),we===oe&&D&&(D.scrollTop=0),we===he&&D&&(D.scrollTop=D.scrollHeight),we==null||we.focus(),document.activeElement!==Ee))return},[q,D]),G=E.useCallback(()=>B([U,T]),[B,U,T]);E.useEffect(()=>{I&&G()},[I,G]);const{onOpenChange:F,triggerPointerDownPosRef:K}=_;E.useEffect(()=>{if(T){let ae={x:0,y:0};const oe=he=>{var Ee,we;ae={x:Math.abs(Math.round(he.pageX)-(((Ee=K.current)==null?void 0:Ee.x)??0)),y:Math.abs(Math.round(he.pageY)-(((we=K.current)==null?void 0:we.y)??0))}},Ce=he=>{ae.x<=10&&ae.y<=10?he.preventDefault():T.contains(he.target)||F(!1),document.removeEventListener("pointermove",oe),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",oe),document.addEventListener("pointerup",Ce,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",oe),document.removeEventListener("pointerup",Ce,{capture:!0})}}},[T,F,K]),E.useEffect(()=>{const ae=()=>F(!1);return window.addEventListener("blur",ae),window.addEventListener("resize",ae),()=>{window.removeEventListener("blur",ae),window.removeEventListener("resize",ae)}},[F]);const[A,H]=N2(ae=>{const oe=q().filter(Ee=>!Ee.disabled),Ce=oe.find(Ee=>Ee.ref.current===document.activeElement),he=O2(oe,ae,Ce);he&&setTimeout(()=>he.ref.current.focus())}),M=E.useCallback((ae,oe,Ce)=>{const he=!Z.current&&!Ce;(_.value!==void 0&&_.value===oe||he)&&(P(ae),he&&(Z.current=!0))},[_.value]),O=E.useCallback(()=>T==null?void 0:T.focus(),[T]),X=E.useCallback((ae,oe,Ce)=>{const he=!Z.current&&!Ce;(_.value!==void 0&&_.value===oe||he)&&V(ae)},[_.value]),re=r==="popper"?cv:p2,ue=re===cv?{side:u,sideOffset:f,align:d,alignOffset:p,arrowPadding:m,collisionBoundary:v,collisionPadding:g,sticky:w,hideWhenDetached:x,avoidCollisions:k}:{};return S.jsx(d2,{scope:n,content:T,viewport:D,onViewportChange:L,itemRefCallback:M,selectedItem:U,onItemLeave:O,itemTextRefCallback:X,focusSelectedItem:G,selectedItemText:z,position:r,isPositioned:I,searchRef:A,children:S.jsx(td,{as:ua,allowPinchZoom:!0,children:S.jsx(Qf,{asChild:!0,trapped:_.open,onMountAutoFocus:ae=>{ae.preventDefault()},onUnmountAutoFocus:qe(i,ae=>{var oe;(oe=_.trigger)==null||oe.focus({preventScroll:!0}),ae.preventDefault()}),children:S.jsx(ou,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:ae=>ae.preventDefault(),onDismiss:()=>_.onOpenChange(!1),children:S.jsx(re,{role:"listbox",id:_.contentId,"data-state":_.open?"open":"closed",dir:_.dir,onContextMenu:ae=>ae.preventDefault(),...C,...ue,onPlaced:()=>Y(!0),ref:R,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:qe(C.onKeyDown,ae=>{const oe=ae.ctrlKey||ae.altKey||ae.metaKey;if(ae.key==="Tab"&&ae.preventDefault(),!oe&&ae.key.length===1&&H(ae.key),["ArrowUp","ArrowDown","Home","End"].includes(ae.key)){let he=q().filter(Ee=>!Ee.disabled).map(Ee=>Ee.ref.current);if(["ArrowUp","End"].includes(ae.key)&&(he=he.slice().reverse()),["ArrowUp","ArrowDown"].includes(ae.key)){const Ee=ae.target,we=he.indexOf(Ee);he=he.slice(we+1)}setTimeout(()=>B(he)),ae.preventDefault()}})})})})})})});h2.displayName=$9;var H9="SelectItemAlignedPosition",p2=E.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,o=pa(eo,n),l=ma(eo,n),[u,f]=E.useState(null),[d,p]=E.useState(null),m=dt(t,R=>p(R)),v=Td(n),g=E.useRef(!1),w=E.useRef(!0),{viewport:x,selectedItem:k,selectedItemText:C,focusSelectedItem:_}=l,T=E.useCallback(()=>{if(o.trigger&&o.valueNode&&u&&d&&x&&k&&C){const R=o.trigger.getBoundingClientRect(),U=d.getBoundingClientRect(),P=o.valueNode.getBoundingClientRect(),z=C.getBoundingClientRect();if(o.dir!=="rtl"){const Ee=z.left-U.left,we=P.left-Ee,Pe=R.left-we,Ae=R.width+Pe,xe=Math.max(Ae,U.width),ee=window.innerWidth-_r,ce=lv(we,[_r,Math.max(_r,ee-xe)]);u.style.minWidth=Ae+"px",u.style.left=ce+"px"}else{const Ee=U.right-z.right,we=window.innerWidth-P.right-Ee,Pe=window.innerWidth-R.right-we,Ae=R.width+Pe,xe=Math.max(Ae,U.width),ee=window.innerWidth-_r,ce=lv(we,[_r,Math.max(_r,ee-xe)]);u.style.minWidth=Ae+"px",u.style.right=ce+"px"}const V=v(),q=window.innerHeight-_r*2,I=x.scrollHeight,Y=window.getComputedStyle(d),Z=parseInt(Y.borderTopWidth,10),B=parseInt(Y.paddingTop,10),G=parseInt(Y.borderBottomWidth,10),F=parseInt(Y.paddingBottom,10),K=Z+B+I+F+G,A=Math.min(k.offsetHeight*5,K),H=window.getComputedStyle(x),M=parseInt(H.paddingTop,10),O=parseInt(H.paddingBottom,10),X=R.top+R.height/2-_r,re=q-X,ue=k.offsetHeight/2,ae=k.offsetTop+ue,oe=Z+B+ae,Ce=K-oe;if(oe<=X){const Ee=V.length>0&&k===V[V.length-1].ref.current;u.style.bottom="0px";const we=d.clientHeight-x.offsetTop-x.offsetHeight,Pe=Math.max(re,ue+(Ee?O:0)+we+G),Ae=oe+Pe;u.style.height=Ae+"px"}else{const Ee=V.length>0&&k===V[0].ref.current;u.style.top="0px";const Pe=Math.max(X,Z+x.offsetTop+(Ee?M:0)+ue)+Ce;u.style.height=Pe+"px",x.scrollTop=oe-X+x.offsetTop}u.style.margin=`${_r}px 0`,u.style.minHeight=A+"px",u.style.maxHeight=q+"px",r==null||r(),requestAnimationFrame(()=>g.current=!0)}},[v,o.trigger,o.valueNode,u,d,x,k,C,o.dir,r]);xn(()=>T(),[T]);const[N,D]=E.useState();xn(()=>{d&&D(window.getComputedStyle(d).zIndex)},[d]);const L=E.useCallback(R=>{R&&w.current===!0&&(T(),_==null||_(),w.current=!1)},[T,_]);return S.jsx(q9,{scope:n,contentWrapper:u,shouldExpandOnScrollRef:g,onScrollButtonChange:L,children:S.jsx("div",{ref:f,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:N},children:S.jsx(We.div,{...i,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});p2.displayName=H9;var V9="SelectPopperPosition",cv=E.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=_r,...o}=e,l=Ad(n);return S.jsx(iy,{...l,...o,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});cv.displayName=V9;var[q9,Hy]=As(eo,{}),fv="SelectViewport",m2=E.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,o=ma(fv,n),l=Hy(fv,n),u=dt(t,o.onViewportChange),f=E.useRef(0);return S.jsxs(S.Fragment,{children:[S.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),S.jsx(Cd.Slot,{scope:n,children:S.jsx(We.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:qe(i.onScroll,d=>{const p=d.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:v}=l;if(v!=null&&v.current&&m){const g=Math.abs(f.current-p.scrollTop);if(g>0){const w=window.innerHeight-_r*2,x=parseFloat(m.style.minHeight),k=parseFloat(m.style.height),C=Math.max(x,k);if(C0?N:0,m.style.justifyContent="flex-end")}}}f.current=p.scrollTop})})})]})});m2.displayName=fv;var g2="SelectGroup",[Y9,W9]=As(g2),v2=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=bn();return S.jsx(Y9,{scope:n,id:i,children:S.jsx(We.div,{role:"group","aria-labelledby":i,...r,ref:t})})});v2.displayName=g2;var y2="SelectLabel",b2=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=W9(y2,n);return S.jsx(We.div,{id:i.id,...r,ref:t})});b2.displayName=y2;var Gf="SelectItem",[X9,x2]=As(Gf),w2=E.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:o,...l}=e,u=pa(Gf,n),f=ma(Gf,n),d=u.value===r,[p,m]=E.useState(o??""),[v,g]=E.useState(!1),w=dt(t,_=>{var T;return(T=f.itemRefCallback)==null?void 0:T.call(f,_,r,i)}),x=bn(),k=E.useRef("touch"),C=()=>{i||(u.onValueChange(r),u.onOpenChange(!1))};if(r==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return S.jsx(X9,{scope:n,value:r,disabled:i,textId:x,isSelected:d,onItemTextChange:E.useCallback(_=>{m(T=>T||((_==null?void 0:_.textContent)??"").trim())},[]),children:S.jsx(Cd.ItemSlot,{scope:n,value:r,disabled:i,textValue:p,children:S.jsx(We.div,{role:"option","aria-labelledby":x,"data-highlighted":v?"":void 0,"aria-selected":d&&v,"data-state":d?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...l,ref:w,onFocus:qe(l.onFocus,()=>g(!0)),onBlur:qe(l.onBlur,()=>g(!1)),onClick:qe(l.onClick,()=>{k.current!=="mouse"&&C()}),onPointerUp:qe(l.onPointerUp,()=>{k.current==="mouse"&&C()}),onPointerDown:qe(l.onPointerDown,_=>{k.current=_.pointerType}),onPointerMove:qe(l.onPointerMove,_=>{var T;k.current=_.pointerType,i?(T=f.onItemLeave)==null||T.call(f):k.current==="mouse"&&_.currentTarget.focus({preventScroll:!0})}),onPointerLeave:qe(l.onPointerLeave,_=>{var T;_.currentTarget===document.activeElement&&((T=f.onItemLeave)==null||T.call(f))}),onKeyDown:qe(l.onKeyDown,_=>{var N;((N=f.searchRef)==null?void 0:N.current)!==""&&_.key===" "||(M9.includes(_.key)&&C(),_.key===" "&&_.preventDefault())})})})})});w2.displayName=Gf;var Il="SelectItemText",S2=E.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...o}=e,l=pa(Il,n),u=ma(Il,n),f=x2(Il,n),d=G9(Il,n),[p,m]=E.useState(null),v=dt(t,C=>m(C),f.onItemTextChange,C=>{var _;return(_=u.itemTextRefCallback)==null?void 0:_.call(u,C,f.value,f.disabled)}),g=p==null?void 0:p.textContent,w=E.useMemo(()=>S.jsx("option",{value:f.value,disabled:f.disabled,children:g},f.value),[f.disabled,f.value,g]),{onNativeOptionAdd:x,onNativeOptionRemove:k}=d;return xn(()=>(x(w),()=>k(w)),[x,k,w]),S.jsxs(S.Fragment,{children:[S.jsx(We.span,{id:f.textId,...o,ref:v}),f.isSelected&&l.valueNode&&!l.valueNodeHasChildren?au.createPortal(o.children,l.valueNode):null]})});S2.displayName=Il;var E2="SelectItemIndicator",_2=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return x2(E2,n).isSelected?S.jsx(We.span,{"aria-hidden":!0,...r,ref:t}):null});_2.displayName=E2;var dv="SelectScrollUpButton",k2=E.forwardRef((e,t)=>{const n=ma(dv,e.__scopeSelect),r=Hy(dv,e.__scopeSelect),[i,o]=E.useState(!1),l=dt(t,r.onScrollButtonChange);return xn(()=>{if(n.viewport&&n.isPositioned){let u=function(){const d=f.scrollTop>0;o(d)};const f=n.viewport;return u(),f.addEventListener("scroll",u),()=>f.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),i?S.jsx(T2,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:f}=n;u&&f&&(u.scrollTop=u.scrollTop-f.offsetHeight)}}):null});k2.displayName=dv;var hv="SelectScrollDownButton",C2=E.forwardRef((e,t)=>{const n=ma(hv,e.__scopeSelect),r=Hy(hv,e.__scopeSelect),[i,o]=E.useState(!1),l=dt(t,r.onScrollButtonChange);return xn(()=>{if(n.viewport&&n.isPositioned){let u=function(){const d=f.scrollHeight-f.clientHeight,p=Math.ceil(f.scrollTop)f.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),i?S.jsx(T2,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:f}=n;u&&f&&(u.scrollTop=u.scrollTop+f.offsetHeight)}}):null});C2.displayName=hv;var T2=E.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,o=ma("SelectScrollButton",n),l=E.useRef(null),u=Td(n),f=E.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return E.useEffect(()=>()=>f(),[f]),xn(()=>{var p;const d=u().find(m=>m.ref.current===document.activeElement);(p=d==null?void 0:d.ref.current)==null||p.scrollIntoView({block:"nearest"})},[u]),S.jsx(We.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:qe(i.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(r,50))}),onPointerMove:qe(i.onPointerMove,()=>{var d;(d=o.onItemLeave)==null||d.call(o),l.current===null&&(l.current=window.setInterval(r,50))}),onPointerLeave:qe(i.onPointerLeave,()=>{f()})})}),K9="SelectSeparator",A2=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return S.jsx(We.div,{"aria-hidden":!0,...r,ref:t})});A2.displayName=K9;var pv="SelectArrow",Z9=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Ad(n),o=pa(pv,n),l=ma(pv,n);return o.open&&l.position==="popper"?S.jsx(ay,{...i,...r,ref:t}):null});Z9.displayName=pv;function R2(e){return e===""||e===void 0}var D2=E.forwardRef((e,t)=>{const{value:n,...r}=e,i=E.useRef(null),o=dt(t,i),l=tR(n);return E.useEffect(()=>{const u=i.current,f=window.HTMLSelectElement.prototype,p=Object.getOwnPropertyDescriptor(f,"value").set;if(l!==n&&p){const m=new Event("change",{bubbles:!0});p.call(u,n),u.dispatchEvent(m)}},[l,n]),S.jsx(oy,{asChild:!0,children:S.jsx("select",{...r,ref:o,defaultValue:n})})});D2.displayName="BubbleSelect";function N2(e){const t=un(e),n=E.useRef(""),r=E.useRef(0),i=E.useCallback(l=>{const u=n.current+l;t(u),function f(d){n.current=d,window.clearTimeout(r.current),d!==""&&(r.current=window.setTimeout(()=>f(""),1e3))}(u)},[t]),o=E.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return E.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,o]}function O2(e,t,n){const i=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let l=Q9(e,Math.max(o,0));i.length===1&&(l=l.filter(d=>d!==n));const f=l.find(d=>d.textValue.toLowerCase().startsWith(i.toLowerCase()));return f!==n?f:void 0}function Q9(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var J9=i2,j2=o2,e8=l2,t8=u2,n8=c2,L2=f2,r8=m2,i8=v2,z2=b2,M2=w2,a8=S2,o8=_2,P2=k2,F2=C2,I2=A2;const PE=J9,FE=i8,IE=e8,mv=E.forwardRef(({className:e,children:t,...n},r)=>S.jsxs(j2,{ref:r,className:Me("border-input bg-background ring-offset-background placeholder:text-muted-foreground focus:ring-ring flex h-10 w-full items-center justify-between rounded-md border px-3 py-2 text-sm focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,S.jsx(t8,{asChild:!0,children:S.jsx(zv,{className:"h-4 w-4 opacity-50"})})]}));mv.displayName=j2.displayName;const G2=E.forwardRef(({className:e,...t},n)=>S.jsx(P2,{ref:n,className:Me("flex cursor-default items-center justify-center py-1",e),...t,children:S.jsx(wk,{className:"h-4 w-4"})}));G2.displayName=P2.displayName;const U2=E.forwardRef(({className:e,...t},n)=>S.jsx(F2,{ref:n,className:Me("flex cursor-default items-center justify-center py-1",e),...t,children:S.jsx(zv,{className:"h-4 w-4"})}));U2.displayName=F2.displayName;const gv=E.forwardRef(({className:e,children:t,position:n="popper",...r},i)=>S.jsx(n8,{children:S.jsxs(L2,{ref:i,className:Me("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border shadow-md",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[S.jsx(G2,{}),S.jsx(r8,{className:Me("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),S.jsx(U2,{})]})}));gv.displayName=L2.displayName;const s8=E.forwardRef(({className:e,...t},n)=>S.jsx(z2,{ref:n,className:Me("py-1.5 pr-2 pl-8 text-sm font-semibold",e),...t}));s8.displayName=z2.displayName;const wi=E.forwardRef(({className:e,children:t,...n},r)=>S.jsxs(M2,{ref:r,className:Me("focus:bg-accent focus:text-accent-foreground relative flex w-full cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[S.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:S.jsx(o8,{children:S.jsx(Lv,{className:"h-4 w-4"})})}),S.jsx(a8,{children:t})]}));wi.displayName=M2.displayName;const l8=E.forwardRef(({className:e,...t},n)=>S.jsx(I2,{ref:n,className:Me("bg-muted -mx-1 my-1 h-px",e),...t}));l8.displayName=I2.displayName;function u8(){var n,r;const e=Qe(i=>i.querySettings),t=E.useCallback((i,o)=>{Qe.getState().updateQuerySettings({[i]:o})},[]);return S.jsxs(Kl,{className:"flex shrink-0 flex-col",children:[S.jsxs(Of,{className:"px-4 pt-4 pb-2",children:[S.jsx(Zl,{children:"Parameters"}),S.jsx(wd,{children:"Configure your query parameters"})]}),S.jsx(jf,{className:"m-0 flex grow flex-col p-0 text-xs",children:S.jsx("div",{className:"relative size-full",children:S.jsxs("div",{className:"absolute inset-0 flex flex-col gap-2 overflow-auto px-2",children:[S.jsxs(S.Fragment,{children:[S.jsx(jn,{className:"ml-1",text:"Query Mode",tooltip:"Select the retrieval strategy:\\n• Naive: Basic search without advanced techniques\\n• Local: Context-dependent information retrieval\\n• Global: Utilizes global knowledge base\\n• Hybrid: Combines local and global retrieval\\n• Mix: Integrates knowledge graph with vector retrieval",side:"left"}),S.jsxs(PE,{value:e.mode,onValueChange:i=>t("mode",i),children:[S.jsx(mv,{className:"hover:bg-primary/5 h-9 cursor-pointer focus:ring-0 focus:ring-offset-0 focus:outline-0 active:right-0",children:S.jsx(IE,{})}),S.jsx(gv,{children:S.jsxs(FE,{children:[S.jsx(wi,{value:"naive",children:"Naive"}),S.jsx(wi,{value:"local",children:"Local"}),S.jsx(wi,{value:"global",children:"Global"}),S.jsx(wi,{value:"hybrid",children:"Hybrid"}),S.jsx(wi,{value:"mix",children:"Mix"})]})})]})]}),S.jsxs(S.Fragment,{children:[S.jsx(jn,{className:"ml-1",text:"Response Format",tooltip:"Defines the response format. Examples:\\n• Multiple Paragraphs\\n• Single Paragraph\\n• Bullet Points",side:"left"}),S.jsxs(PE,{value:e.response_type,onValueChange:i=>t("response_type",i),children:[S.jsx(mv,{className:"hover:bg-primary/5 h-9 cursor-pointer focus:ring-0 focus:ring-offset-0 focus:outline-0 active:right-0",children:S.jsx(IE,{})}),S.jsx(gv,{children:S.jsxs(FE,{children:[S.jsx(wi,{value:"Multiple Paragraphs",children:"Multiple Paragraphs"}),S.jsx(wi,{value:"Single Paragraph",children:"Single Paragraph"}),S.jsx(wi,{value:"Bullet Points",children:"Bullet Points"})]})})]})]}),S.jsxs(S.Fragment,{children:[S.jsx(jn,{className:"ml-1",text:"Top K Results",tooltip:"Number of top items to retrieve. Represents entities in 'local' mode and relationships in 'global' mode",side:"left"}),S.jsx(Jo,{id:"top_k",stepper:1,value:e.top_k,onValueChange:i=>t("top_k",i),min:1,placeholder:"Number of results"})]}),S.jsxs(S.Fragment,{children:[S.jsxs(S.Fragment,{children:[S.jsx(jn,{className:"ml-1",text:"Max Tokens for Text Unit",tooltip:"Maximum number of tokens allowed for each retrieved text chunk",side:"left"}),S.jsx(Jo,{id:"max_token_for_text_unit",stepper:500,value:e.max_token_for_text_unit,onValueChange:i=>t("max_token_for_text_unit",i),min:1,placeholder:"Max tokens for text unit"})]}),S.jsxs(S.Fragment,{children:[S.jsx(jn,{text:"Max Tokens for Global Context",tooltip:"Maximum number of tokens allocated for relationship descriptions in global retrieval",side:"left"}),S.jsx(Jo,{id:"max_token_for_global_context",stepper:500,value:e.max_token_for_global_context,onValueChange:i=>t("max_token_for_global_context",i),min:1,placeholder:"Max tokens for global context"})]}),S.jsxs(S.Fragment,{children:[S.jsx(jn,{className:"ml-1",text:"Max Tokens for Local Context",tooltip:"Maximum number of tokens allocated for entity descriptions in local retrieval",side:"left"}),S.jsx(Jo,{id:"max_token_for_local_context",stepper:500,value:e.max_token_for_local_context,onValueChange:i=>t("max_token_for_local_context",i),min:1,placeholder:"Max tokens for local context"})]})]}),S.jsxs(S.Fragment,{children:[S.jsx(jn,{className:"ml-1",text:"History Turns",tooltip:"Number of complete conversation turns (user-assistant pairs) to consider in the response context",side:"left"}),S.jsx(Jo,{className:"!border-input",id:"history_turns",stepper:1,type:"text",value:e.history_turns,onValueChange:i=>t("history_turns",i),min:0,placeholder:"Number of history turns"})]}),S.jsxs(S.Fragment,{children:[S.jsxs(S.Fragment,{children:[S.jsx(jn,{className:"ml-1",text:"High-Level Keywords",tooltip:"List of high-level keywords to prioritize in retrieval. Separate with commas",side:"left"}),S.jsx(Za,{id:"hl_keywords",type:"text",value:(n=e.hl_keywords)==null?void 0:n.join(", "),onChange:i=>{const o=i.target.value.split(",").map(l=>l.trim()).filter(l=>l!=="");t("hl_keywords",o)},placeholder:"Enter keywords"})]}),S.jsxs(S.Fragment,{children:[S.jsx(jn,{className:"ml-1",text:"Low-Level Keywords",tooltip:"List of low-level keywords to refine retrieval focus. Separate with commas",side:"left"}),S.jsx(Za,{id:"ll_keywords",type:"text",value:(r=e.ll_keywords)==null?void 0:r.join(", "),onChange:i=>{const o=i.target.value.split(",").map(l=>l.trim()).filter(l=>l!=="");t("ll_keywords",o)},placeholder:"Enter keywords"})]})]}),S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx(jn,{className:"ml-1",text:"Only Need Context",tooltip:"If True, only returns the retrieved context without generating a response",side:"left"}),S.jsx("div",{className:"grow"}),S.jsx(Ul,{className:"mr-1 cursor-pointer",id:"only_need_context",checked:e.only_need_context,onCheckedChange:i=>t("only_need_context",i)})]}),S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx(jn,{className:"ml-1",text:"Only Need Prompt",tooltip:"If True, only returns the generated prompt without producing a response",side:"left"}),S.jsx("div",{className:"grow"}),S.jsx(Ul,{className:"mr-1 cursor-pointer",id:"only_need_prompt",checked:e.only_need_prompt,onCheckedChange:i=>t("only_need_prompt",i)})]}),S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx(jn,{className:"ml-1",text:"Stream Response",tooltip:"If True, enables streaming output for real-time responses",side:"left"}),S.jsx("div",{className:"grow"}),S.jsx(Ul,{className:"mr-1 cursor-pointer",id:"stream",checked:e.stream,onCheckedChange:i=>t("stream",i)})]})]})]})})})]})}function c8(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const f8=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,d8=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,h8={};function GE(e,t){return(h8.jsx?d8:f8).test(e)}const p8=/[ \t\n\f\r]/g;function m8(e){return typeof e=="object"?e.type==="text"?UE(e.value):!1:UE(e)}function UE(e){return e.replace(p8,"")===""}class vu{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}vu.prototype.property={};vu.prototype.normal={};vu.prototype.space=null;function B2(e,t){const n={},r={};let i=-1;for(;++i4&&n.slice(0,4)==="data"&&x8.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace($E,_8);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!$E.test(o)){let l=o.replace(w8,E8);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}i=Vy}return new i(r,t)}function E8(e){return"-"+e.toLowerCase()}function _8(e){return e.charAt(1).toUpperCase()}const k8={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},C8=B2([V2,H2,W2,X2,y8],"html"),qy=B2([V2,H2,W2,X2,b8],"svg");function T8(e){return e.join(" ").trim()}var Xo={},rg,HE;function A8(){if(HE)return rg;HE=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,u=/^\s+|\s+$/g,f=` +`,d="/",p="*",m="",v="comment",g="declaration";rg=function(x,k){if(typeof x!="string")throw new TypeError("First argument must be a string");if(!x)return[];k=k||{};var C=1,_=1;function T(I){var Y=I.match(t);Y&&(C+=Y.length);var Z=I.lastIndexOf(f);_=~Z?I.length-Z:_+I.length}function N(){var I={line:C,column:_};return function(Y){return Y.position=new D(I),U(),Y}}function D(I){this.start=I,this.end={line:C,column:_},this.source=k.source}D.prototype.content=x;function L(I){var Y=new Error(k.source+":"+C+":"+_+": "+I);if(Y.reason=I,Y.filename=k.source,Y.line=C,Y.column=_,Y.source=x,!k.silent)throw Y}function R(I){var Y=I.exec(x);if(Y){var Z=Y[0];return T(Z),x=x.slice(Z.length),Y}}function U(){R(n)}function P(I){var Y;for(I=I||[];Y=z();)Y!==!1&&I.push(Y);return I}function z(){var I=N();if(!(d!=x.charAt(0)||p!=x.charAt(1))){for(var Y=2;m!=x.charAt(Y)&&(p!=x.charAt(Y)||d!=x.charAt(Y+1));)++Y;if(Y+=2,m===x.charAt(Y-1))return L("End of comment missing");var Z=x.slice(2,Y-2);return _+=2,T(Z),x=x.slice(Y),_+=2,I({type:v,comment:Z})}}function V(){var I=N(),Y=R(r);if(Y){if(z(),!R(i))return L("property missing ':'");var Z=R(o),B=I({type:g,property:w(Y[0].replace(e,m)),value:Z?w(Z[0].replace(e,m)):m});return R(l),B}}function q(){var I=[];P(I);for(var Y;Y=V();)Y!==!1&&(I.push(Y),P(I));return I}return U(),q()};function w(x){return x?x.replace(u,m):m}return rg}var VE;function R8(){if(VE)return Xo;VE=1;var e=Xo&&Xo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Xo,"__esModule",{value:!0}),Xo.default=n;var t=e(A8());function n(r,i){var o=null;if(!r||typeof r!="string")return o;var l=(0,t.default)(r),u=typeof i=="function";return l.forEach(function(f){if(f.type==="declaration"){var d=f.property,p=f.value;u?i(d,p,f):p&&(o=o||{},o[d]=p)}}),o}return Xo}var D8=R8();const qE=fn(D8),N8=qE.default||qE,K2=Z2("end"),Yy=Z2("start");function Z2(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function O8(e){const t=Yy(e),n=K2(e);if(t&&n)return{start:t,end:n}}function Bl(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?YE(e.position):"start"in e||"end"in e?YE(e):"line"in e||"column"in e?bv(e):""}function bv(e){return WE(e&&e.line)+":"+WE(e&&e.column)}function YE(e){return bv(e&&e.start)+"-"+bv(e&&e.end)}function WE(e){return e&&typeof e=="number"?e:1}class wn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},l=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(l=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const f=r.indexOf(":");f===-1?o.ruleId=r:(o.source=r.slice(0,f),o.ruleId=r.slice(f+1))}if(!o.place&&o.ancestors&&o.ancestors){const f=o.ancestors[o.ancestors.length-1];f&&(o.place=f.position)}const u=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=u?u.line:void 0,this.name=Bl(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=l&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}wn.prototype.file="";wn.prototype.name="";wn.prototype.reason="";wn.prototype.message="";wn.prototype.stack="";wn.prototype.column=void 0;wn.prototype.line=void 0;wn.prototype.ancestors=void 0;wn.prototype.cause=void 0;wn.prototype.fatal=void 0;wn.prototype.place=void 0;wn.prototype.ruleId=void 0;wn.prototype.source=void 0;const Wy={}.hasOwnProperty,j8=new Map,L8=/[A-Z]/g,z8=/-([a-z])/g,M8=new Set(["table","tbody","thead","tfoot","tr"]),P8=new Set(["td","th"]),Q2="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function J2(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=V8(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=H8(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?qy:C8,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=eD(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function eD(e,t,n){if(t.type==="element")return F8(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return I8(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return U8(e,t,n);if(t.type==="mdxjsEsm")return G8(e,t);if(t.type==="root")return B8(e,t,n);if(t.type==="text")return $8(e,t)}function F8(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=qy,e.schema=i),e.ancestors.push(t);const o=nD(e,t.tagName,!1),l=q8(e,t);let u=Ky(e,t);return M8.has(t.tagName)&&(u=u.filter(function(f){return typeof f=="string"?!m8(f):!0})),tD(e,l,o,t),Xy(l,u),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function I8(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}tu(e,t.position)}function G8(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);tu(e,t.position)}function U8(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=qy,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:nD(e,t.name,!0),l=Y8(e,t),u=Ky(e,t);return tD(e,l,o,t),Xy(l,u),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function B8(e,t,n){const r={};return Xy(r,Ky(e,t)),e.create(t,e.Fragment,r,n)}function $8(e,t){return t.value}function tD(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Xy(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function H8(e,t,n){return r;function r(i,o,l,u){const d=Array.isArray(l.children)?n:t;return u?d(o,l,u):d(o,l)}}function V8(e,t){return n;function n(r,i,o,l){const u=Array.isArray(o.children),f=Yy(r);return t(i,o,l,u,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function q8(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Wy.call(t.properties,i)){const o=W8(e,i,t.properties[i]);if(o){const[l,u]=o;e.tableCellAlignToStyle&&l==="align"&&typeof u=="string"&&P8.has(t.tagName)?r=u:n[l]=u}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Y8(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const l=o.expression;l.type;const u=l.properties[0];u.type,Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else tu(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const u=r.value.data.estree.body[0];u.type,o=e.evaluater.evaluateExpression(u.expression)}else tu(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function Ky(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:j8;for(;++ri?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);o0?(Xn(e,e.length,0,t),e):t}const ZE={}.hasOwnProperty;function iD(e){const t={};let n=-1;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Tr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const kn=ga(/[A-Za-z]/),yn=ga(/[\dA-Za-z]/),i7=ga(/[#-'*+\--9=?A-Z^-~]/);function Uf(e){return e!==null&&(e<32||e===127)}const xv=ga(/\d/),a7=ga(/[\dA-Fa-f]/),o7=ga(/[!-/:-@[-`{-~]/);function Be(e){return e!==null&&e<-2}function Tt(e){return e!==null&&(e<0||e===32)}function ut(e){return e===-2||e===-1||e===32}const Rd=ga(new RegExp("\\p{P}|\\p{S}","u")),to=ga(/\s/);function ga(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ds(e){const t=[];let n=-1,r=0,i=0;for(;++n55295&&o<57344){const u=e.charCodeAt(n+1);o<56320&&u>56319&&u<57344?(l=String.fromCharCode(o,u),i=1):l="�"}else l=String.fromCharCode(o);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+i+1,l=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function st(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(f){return ut(f)?(e.enter(n),u(f)):t(f)}function u(f){return ut(f)&&o++l))return;const R=t.events.length;let U=R,P,z;for(;U--;)if(t.events[U][0]==="exit"&&t.events[U][1].type==="chunkFlow"){if(P){z=t.events[U][1].end;break}P=!0}for(C(r),L=R;LT;){const D=n[N];t.containerState=D[1],D[0].exit.call(t,e)}n.length=T}function _(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function f7(e,t,n){return st(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ps(e){if(e===null||Tt(e)||to(e))return 1;if(Rd(e))return 2}function Dd(e,t,n){const r=[];let i=-1;for(;++i1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m={...e[r][1].end},v={...e[n][1].start};JE(m,-f),JE(v,f),l={type:f>1?"strongSequence":"emphasisSequence",start:m,end:{...e[r][1].end}},u={type:f>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:v},o={type:f>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:f>1?"strong":"emphasis",start:{...l.start},end:{...u.end}},e[r][1].end={...l.start},e[n][1].start={...u.end},d=[],e[r][1].end.offset-e[r][1].start.offset&&(d=cr(d,[["enter",e[r][1],t],["exit",e[r][1],t]])),d=cr(d,[["enter",i,t],["enter",l,t],["exit",l,t],["enter",o,t]]),d=cr(d,Dd(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),d=cr(d,[["exit",o,t],["enter",u,t],["exit",u,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,d=cr(d,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,Xn(e,r-1,n-r+3,d),n=r+d.length-p-2;break}}for(n=-1;++n0&&ut(L)?st(e,_,"linePrefix",o+1)(L):_(L)}function _(L){return L===null||Be(L)?e.check(e_,x,N)(L):(e.enter("codeFlowValue"),T(L))}function T(L){return L===null||Be(L)?(e.exit("codeFlowValue"),_(L)):(e.consume(L),T)}function N(L){return e.exit("codeFenced"),t(L)}function D(L,R,U){let P=0;return z;function z(Z){return L.enter("lineEnding"),L.consume(Z),L.exit("lineEnding"),V}function V(Z){return L.enter("codeFencedFence"),ut(Z)?st(L,q,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Z):q(Z)}function q(Z){return Z===u?(L.enter("codeFencedFenceSequence"),I(Z)):U(Z)}function I(Z){return Z===u?(P++,L.consume(Z),I):P>=l?(L.exit("codeFencedFenceSequence"),ut(Z)?st(L,Y,"whitespace")(Z):Y(Z)):U(Z)}function Y(Z){return Z===null||Be(Z)?(L.exit("codeFencedFence"),R(Z)):U(Z)}}}function E7(e,t,n){const r=this;return i;function i(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const ag={name:"codeIndented",tokenize:k7},_7={partial:!0,tokenize:C7};function k7(e,t,n){const r=this;return i;function i(d){return e.enter("codeIndented"),st(e,o,"linePrefix",5)(d)}function o(d){const p=r.events[r.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?l(d):n(d)}function l(d){return d===null?f(d):Be(d)?e.attempt(_7,l,f)(d):(e.enter("codeFlowValue"),u(d))}function u(d){return d===null||Be(d)?(e.exit("codeFlowValue"),l(d)):(e.consume(d),u)}function f(d){return e.exit("codeIndented"),t(d)}}function C7(e,t,n){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?n(l):Be(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):st(e,o,"linePrefix",5)(l)}function o(l){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(l):Be(l)?i(l):n(l)}}const T7={name:"codeText",previous:R7,resolve:A7,tokenize:D7};function A7(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return tthis.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&zl(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),zl(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),zl(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function cD(e,t,n,r,i,o,l,u,f){const d=f||Number.POSITIVE_INFINITY;let p=0;return m;function m(C){return C===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(C),e.exit(o),v):C===null||C===32||C===41||Uf(C)?n(C):(e.enter(r),e.enter(l),e.enter(u),e.enter("chunkString",{contentType:"string"}),x(C))}function v(C){return C===62?(e.enter(o),e.consume(C),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),g(C))}function g(C){return C===62?(e.exit("chunkString"),e.exit(u),v(C)):C===null||C===60||Be(C)?n(C):(e.consume(C),C===92?w:g)}function w(C){return C===60||C===62||C===92?(e.consume(C),g):g(C)}function x(C){return!p&&(C===null||C===41||Tt(C))?(e.exit("chunkString"),e.exit(u),e.exit(l),e.exit(r),t(C)):p999||g===null||g===91||g===93&&!f||g===94&&!u&&"_hiddenFootnoteSupport"in l.parser.constructs?n(g):g===93?(e.exit(o),e.enter(i),e.consume(g),e.exit(i),e.exit(r),t):Be(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),m(g))}function m(g){return g===null||g===91||g===93||Be(g)||u++>999?(e.exit("chunkString"),p(g)):(e.consume(g),f||(f=!ut(g)),g===92?v:m)}function v(g){return g===91||g===92||g===93?(e.consume(g),u++,m):m(g)}}function dD(e,t,n,r,i,o){let l;return u;function u(v){return v===34||v===39||v===40?(e.enter(r),e.enter(i),e.consume(v),e.exit(i),l=v===40?41:v,f):n(v)}function f(v){return v===l?(e.enter(i),e.consume(v),e.exit(i),e.exit(r),t):(e.enter(o),d(v))}function d(v){return v===l?(e.exit(o),f(l)):v===null?n(v):Be(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),st(e,d,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(v))}function p(v){return v===l||v===null||Be(v)?(e.exit("chunkString"),d(v)):(e.consume(v),v===92?m:p)}function m(v){return v===l||v===92?(e.consume(v),p):p(v)}}function $l(e,t){let n;return r;function r(i){return Be(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):ut(i)?st(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const F7={name:"definition",tokenize:G7},I7={partial:!0,tokenize:U7};function G7(e,t,n){const r=this;let i;return o;function o(g){return e.enter("definition"),l(g)}function l(g){return fD.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(g)}function u(g){return i=Tr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),f):n(g)}function f(g){return Tt(g)?$l(e,d)(g):d(g)}function d(g){return cD(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(g)}function p(g){return e.attempt(I7,m,m)(g)}function m(g){return ut(g)?st(e,v,"whitespace")(g):v(g)}function v(g){return g===null||Be(g)?(e.exit("definition"),r.parser.defined.push(i),t(g)):n(g)}}function U7(e,t,n){return r;function r(u){return Tt(u)?$l(e,i)(u):n(u)}function i(u){return dD(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function o(u){return ut(u)?st(e,l,"whitespace")(u):l(u)}function l(u){return u===null||Be(u)?t(u):n(u)}}const B7={name:"hardBreakEscape",tokenize:$7};function $7(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return Be(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const H7={name:"headingAtx",resolve:V7,tokenize:q7};function V7(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Xn(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function q7(e,t,n){let r=0;return i;function i(p){return e.enter("atxHeading"),o(p)}function o(p){return e.enter("atxHeadingSequence"),l(p)}function l(p){return p===35&&r++<6?(e.consume(p),l):p===null||Tt(p)?(e.exit("atxHeadingSequence"),u(p)):n(p)}function u(p){return p===35?(e.enter("atxHeadingSequence"),f(p)):p===null||Be(p)?(e.exit("atxHeading"),t(p)):ut(p)?st(e,u,"whitespace")(p):(e.enter("atxHeadingText"),d(p))}function f(p){return p===35?(e.consume(p),f):(e.exit("atxHeadingSequence"),u(p))}function d(p){return p===null||p===35||Tt(p)?(e.exit("atxHeadingText"),u(p)):(e.consume(p),d)}}const Y7=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],n_=["pre","script","style","textarea"],W7={concrete:!0,name:"htmlFlow",resolveTo:Z7,tokenize:Q7},X7={partial:!0,tokenize:eV},K7={partial:!0,tokenize:J7};function Z7(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Q7(e,t,n){const r=this;let i,o,l,u,f;return d;function d(O){return p(O)}function p(O){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(O),m}function m(O){return O===33?(e.consume(O),v):O===47?(e.consume(O),o=!0,x):O===63?(e.consume(O),i=3,r.interrupt?t:A):kn(O)?(e.consume(O),l=String.fromCharCode(O),k):n(O)}function v(O){return O===45?(e.consume(O),i=2,g):O===91?(e.consume(O),i=5,u=0,w):kn(O)?(e.consume(O),i=4,r.interrupt?t:A):n(O)}function g(O){return O===45?(e.consume(O),r.interrupt?t:A):n(O)}function w(O){const X="CDATA[";return O===X.charCodeAt(u++)?(e.consume(O),u===X.length?r.interrupt?t:q:w):n(O)}function x(O){return kn(O)?(e.consume(O),l=String.fromCharCode(O),k):n(O)}function k(O){if(O===null||O===47||O===62||Tt(O)){const X=O===47,re=l.toLowerCase();return!X&&!o&&n_.includes(re)?(i=1,r.interrupt?t(O):q(O)):Y7.includes(l.toLowerCase())?(i=6,X?(e.consume(O),C):r.interrupt?t(O):q(O)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(O):o?_(O):T(O))}return O===45||yn(O)?(e.consume(O),l+=String.fromCharCode(O),k):n(O)}function C(O){return O===62?(e.consume(O),r.interrupt?t:q):n(O)}function _(O){return ut(O)?(e.consume(O),_):z(O)}function T(O){return O===47?(e.consume(O),z):O===58||O===95||kn(O)?(e.consume(O),N):ut(O)?(e.consume(O),T):z(O)}function N(O){return O===45||O===46||O===58||O===95||yn(O)?(e.consume(O),N):D(O)}function D(O){return O===61?(e.consume(O),L):ut(O)?(e.consume(O),D):T(O)}function L(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),f=O,R):ut(O)?(e.consume(O),L):U(O)}function R(O){return O===f?(e.consume(O),f=null,P):O===null||Be(O)?n(O):(e.consume(O),R)}function U(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||Tt(O)?D(O):(e.consume(O),U)}function P(O){return O===47||O===62||ut(O)?T(O):n(O)}function z(O){return O===62?(e.consume(O),V):n(O)}function V(O){return O===null||Be(O)?q(O):ut(O)?(e.consume(O),V):n(O)}function q(O){return O===45&&i===2?(e.consume(O),B):O===60&&i===1?(e.consume(O),G):O===62&&i===4?(e.consume(O),H):O===63&&i===3?(e.consume(O),A):O===93&&i===5?(e.consume(O),K):Be(O)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(X7,M,I)(O)):O===null||Be(O)?(e.exit("htmlFlowData"),I(O)):(e.consume(O),q)}function I(O){return e.check(K7,Y,M)(O)}function Y(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),Z}function Z(O){return O===null||Be(O)?I(O):(e.enter("htmlFlowData"),q(O))}function B(O){return O===45?(e.consume(O),A):q(O)}function G(O){return O===47?(e.consume(O),l="",F):q(O)}function F(O){if(O===62){const X=l.toLowerCase();return n_.includes(X)?(e.consume(O),H):q(O)}return kn(O)&&l.length<8?(e.consume(O),l+=String.fromCharCode(O),F):q(O)}function K(O){return O===93?(e.consume(O),A):q(O)}function A(O){return O===62?(e.consume(O),H):O===45&&i===2?(e.consume(O),A):q(O)}function H(O){return O===null||Be(O)?(e.exit("htmlFlowData"),M(O)):(e.consume(O),H)}function M(O){return e.exit("htmlFlow"),t(O)}}function J7(e,t,n){const r=this;return i;function i(l){return Be(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):n(l)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function eV(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(yu,t,n)}}const tV={name:"htmlText",tokenize:nV};function nV(e,t,n){const r=this;let i,o,l;return u;function u(A){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(A),f}function f(A){return A===33?(e.consume(A),d):A===47?(e.consume(A),D):A===63?(e.consume(A),T):kn(A)?(e.consume(A),U):n(A)}function d(A){return A===45?(e.consume(A),p):A===91?(e.consume(A),o=0,w):kn(A)?(e.consume(A),_):n(A)}function p(A){return A===45?(e.consume(A),g):n(A)}function m(A){return A===null?n(A):A===45?(e.consume(A),v):Be(A)?(l=m,G(A)):(e.consume(A),m)}function v(A){return A===45?(e.consume(A),g):m(A)}function g(A){return A===62?B(A):A===45?v(A):m(A)}function w(A){const H="CDATA[";return A===H.charCodeAt(o++)?(e.consume(A),o===H.length?x:w):n(A)}function x(A){return A===null?n(A):A===93?(e.consume(A),k):Be(A)?(l=x,G(A)):(e.consume(A),x)}function k(A){return A===93?(e.consume(A),C):x(A)}function C(A){return A===62?B(A):A===93?(e.consume(A),C):x(A)}function _(A){return A===null||A===62?B(A):Be(A)?(l=_,G(A)):(e.consume(A),_)}function T(A){return A===null?n(A):A===63?(e.consume(A),N):Be(A)?(l=T,G(A)):(e.consume(A),T)}function N(A){return A===62?B(A):T(A)}function D(A){return kn(A)?(e.consume(A),L):n(A)}function L(A){return A===45||yn(A)?(e.consume(A),L):R(A)}function R(A){return Be(A)?(l=R,G(A)):ut(A)?(e.consume(A),R):B(A)}function U(A){return A===45||yn(A)?(e.consume(A),U):A===47||A===62||Tt(A)?P(A):n(A)}function P(A){return A===47?(e.consume(A),B):A===58||A===95||kn(A)?(e.consume(A),z):Be(A)?(l=P,G(A)):ut(A)?(e.consume(A),P):B(A)}function z(A){return A===45||A===46||A===58||A===95||yn(A)?(e.consume(A),z):V(A)}function V(A){return A===61?(e.consume(A),q):Be(A)?(l=V,G(A)):ut(A)?(e.consume(A),V):P(A)}function q(A){return A===null||A===60||A===61||A===62||A===96?n(A):A===34||A===39?(e.consume(A),i=A,I):Be(A)?(l=q,G(A)):ut(A)?(e.consume(A),q):(e.consume(A),Y)}function I(A){return A===i?(e.consume(A),i=void 0,Z):A===null?n(A):Be(A)?(l=I,G(A)):(e.consume(A),I)}function Y(A){return A===null||A===34||A===39||A===60||A===61||A===96?n(A):A===47||A===62||Tt(A)?P(A):(e.consume(A),Y)}function Z(A){return A===47||A===62||Tt(A)?P(A):n(A)}function B(A){return A===62?(e.consume(A),e.exit("htmlTextData"),e.exit("htmlText"),t):n(A)}function G(A){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),F}function F(A){return ut(A)?st(e,K,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):K(A)}function K(A){return e.enter("htmlTextData"),l(A)}}const Jy={name:"labelEnd",resolveAll:oV,resolveTo:sV,tokenize:lV},rV={tokenize:uV},iV={tokenize:cV},aV={tokenize:fV};function oV(e){let t=-1;const n=[];for(;++t=3&&(d===null||Be(d))?(e.exit("thematicBreak"),t(d)):n(d)}function f(d){return d===i?(e.consume(d),r++,f):(e.exit("thematicBreakSequence"),ut(d)?st(e,u,"whitespace")(d):u(d))}}const On={continuation:{tokenize:wV},exit:EV,name:"list",tokenize:xV},yV={partial:!0,tokenize:_V},bV={partial:!0,tokenize:SV};function xV(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return u;function u(g){const w=r.containerState.type||(g===42||g===43||g===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!r.containerState.marker||g===r.containerState.marker:xv(g)){if(r.containerState.type||(r.containerState.type=w,e.enter(w,{_container:!0})),w==="listUnordered")return e.enter("listItemPrefix"),g===42||g===45?e.check(yf,n,d)(g):d(g);if(!r.interrupt||g===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(g)}return n(g)}function f(g){return xv(g)&&++l<10?(e.consume(g),f):(!r.interrupt||l<2)&&(r.containerState.marker?g===r.containerState.marker:g===41||g===46)?(e.exit("listItemValue"),d(g)):n(g)}function d(g){return e.enter("listItemMarker"),e.consume(g),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||g,e.check(yu,r.interrupt?n:p,e.attempt(yV,v,m))}function p(g){return r.containerState.initialBlankLine=!0,o++,v(g)}function m(g){return ut(g)?(e.enter("listItemPrefixWhitespace"),e.consume(g),e.exit("listItemPrefixWhitespace"),v):n(g)}function v(g){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(g)}}function wV(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(yu,i,o);function i(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,st(e,t,"listItemIndent",r.containerState.size+1)(u)}function o(u){return r.containerState.furtherBlankLines||!ut(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(bV,t,l)(u))}function l(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,st(e,e.attempt(On,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function SV(e,t,n){const r=this;return st(e,i,"listItemIndent",r.containerState.size+1);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(o):n(o)}}function EV(e){e.exit(this.containerState.type)}function _V(e,t,n){const r=this;return st(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const l=r.events[r.events.length-1];return!ut(o)&&l&&l[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const r_={name:"setextUnderline",resolveTo:kV,tokenize:CV};function kV(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const l={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",l,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function CV(e,t,n){const r=this;let i;return o;function o(d){let p=r.events.length,m;for(;p--;)if(r.events[p][1].type!=="lineEnding"&&r.events[p][1].type!=="linePrefix"&&r.events[p][1].type!=="content"){m=r.events[p][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||m)?(e.enter("setextHeadingLine"),i=d,l(d)):n(d)}function l(d){return e.enter("setextHeadingLineSequence"),u(d)}function u(d){return d===i?(e.consume(d),u):(e.exit("setextHeadingLineSequence"),ut(d)?st(e,f,"lineSuffix")(d):f(d))}function f(d){return d===null||Be(d)?(e.exit("setextHeadingLine"),t(d)):n(d)}}const TV={tokenize:AV};function AV(e){const t=this,n=e.attempt(yu,r,e.attempt(this.parser.constructs.flowInitial,i,st(e,e.attempt(this.parser.constructs.flow,i,e.attempt(j7,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const RV={resolveAll:pD()},DV=hD("string"),NV=hD("text");function hD(e){return{resolveAll:pD(e==="text"?OV:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,l,u);return l;function l(p){return d(p)?o(p):u(p)}function u(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),f}function f(p){return d(p)?(n.exit("data"),o(p)):(n.consume(p),f)}function d(p){if(p===null)return!0;const m=i[p];let v=-1;if(m)for(;++v-1){const u=l[0];typeof u=="string"?l[0]=u.slice(r):l.shift()}o>0&&l.push(e[i].slice(0,o))}return l}function VV(e,t){let n=-1;const r=[];let i;for(;++n0){const vt=Oe.tokenStack[Oe.tokenStack.length-1];(vt[1]||a_).call(Oe,void 0,vt[0])}for(de.position={start:ra(te.length>0?te[0][1].start:{line:1,column:1,offset:0}),end:ra(te.length>0?te[te.length-2][1].end:{line:1,column:1,offset:0})},Ye=-1;++Ye1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,f);const d={type:"element",tagName:"sup",properties:{},children:[f]};return e.patch(t,d),e.applyData(t,d)}function lq(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function uq(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function vD(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const l=i[i.length-1];return l&&l.type==="text"?l.value+=r:i.push({type:"text",value:r}),i}function cq(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return vD(e,t);const i={src:Ds(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function fq(e,t){const n={src:Ds(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function dq(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function hq(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return vD(e,t);const i={href:Ds(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function pq(e,t){const n={href:Ds(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function mq(e,t,n){const r=e.all(t),i=n?gq(n):yD(t),o={},l=[];if(typeof t.checked=="boolean"){const p=r[0];let m;p&&p.type==="element"&&p.tagName==="p"?m=p:(m={type:"element",tagName:"p",properties:{},children:[]},r.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let u=-1;for(;++u1}function vq(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},u=Yy(t.children[1]),f=K2(t.children[t.children.length-1]);u&&f&&(l.position={start:u,end:f}),i.push(l)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function Sq(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,u=l?l.length:t.children.length;let f=-1;const d=[];for(;++f0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(l_(t.slice(i),i>0,!1)),o.join("")}function l_(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===o_||o===s_;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===o_||o===s_;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function kq(e,t){const n={type:"text",value:_q(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Cq(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Tq={blockquote:nq,break:rq,code:iq,delete:aq,emphasis:oq,footnoteReference:sq,heading:lq,html:uq,imageReference:cq,image:fq,inlineCode:dq,linkReference:hq,link:pq,listItem:mq,list:vq,paragraph:yq,root:bq,strong:xq,table:wq,tableCell:Eq,tableRow:Sq,text:kq,thematicBreak:Cq,toml:Zc,yaml:Zc,definition:Zc,footnoteDefinition:Zc};function Zc(){}const bD=-1,Nd=0,Hl=1,Bf=2,eb=3,tb=4,nb=5,rb=6,xD=7,wD=8,u_=typeof self=="object"?self:globalThis,Aq=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,l]=t[i];switch(o){case Nd:case bD:return n(l,i);case Hl:{const u=n([],i);for(const f of l)u.push(r(f));return u}case Bf:{const u=n({},i);for(const[f,d]of l)u[r(f)]=r(d);return u}case eb:return n(new Date(l),i);case tb:{const{source:u,flags:f}=l;return n(new RegExp(u,f),i)}case nb:{const u=n(new Map,i);for(const[f,d]of l)u.set(r(f),r(d));return u}case rb:{const u=n(new Set,i);for(const f of l)u.add(r(f));return u}case xD:{const{name:u,message:f}=l;return n(new u_[u](f),i)}case wD:return n(BigInt(l),i);case"BigInt":return n(Object(BigInt(l)),i);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:u}=new Uint8Array(l);return n(new DataView(u),l)}}return n(new u_[o](l),i)};return r},c_=e=>Aq(new Map,e)(0),Ko="",{toString:Rq}={},{keys:Dq}=Object,Ml=e=>{const t=typeof e;if(t!=="object"||!e)return[Nd,t];const n=Rq.call(e).slice(8,-1);switch(n){case"Array":return[Hl,Ko];case"Object":return[Bf,Ko];case"Date":return[eb,Ko];case"RegExp":return[tb,Ko];case"Map":return[nb,Ko];case"Set":return[rb,Ko];case"DataView":return[Hl,n]}return n.includes("Array")?[Hl,n]:n.includes("Error")?[xD,n]:[Bf,n]},Qc=([e,t])=>e===Nd&&(t==="function"||t==="symbol"),Nq=(e,t,n,r)=>{const i=(l,u)=>{const f=r.push(l)-1;return n.set(u,f),f},o=l=>{if(n.has(l))return n.get(l);let[u,f]=Ml(l);switch(u){case Nd:{let p=l;switch(f){case"bigint":u=wD,p=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);p=null;break;case"undefined":return i([bD],l)}return i([u,p],l)}case Hl:{if(f){let v=l;return f==="DataView"?v=new Uint8Array(l.buffer):f==="ArrayBuffer"&&(v=new Uint8Array(l)),i([f,[...v]],l)}const p=[],m=i([u,p],l);for(const v of l)p.push(o(v));return m}case Bf:{if(f)switch(f){case"BigInt":return i([f,l.toString()],l);case"Boolean":case"Number":case"String":return i([f,l.valueOf()],l)}if(t&&"toJSON"in l)return o(l.toJSON());const p=[],m=i([u,p],l);for(const v of Dq(l))(e||!Qc(Ml(l[v])))&&p.push([o(v),o(l[v])]);return m}case eb:return i([u,l.toISOString()],l);case tb:{const{source:p,flags:m}=l;return i([u,{source:p,flags:m}],l)}case nb:{const p=[],m=i([u,p],l);for(const[v,g]of l)(e||!(Qc(Ml(v))||Qc(Ml(g))))&&p.push([o(v),o(g)]);return m}case rb:{const p=[],m=i([u,p],l);for(const v of l)(e||!Qc(Ml(v)))&&p.push(o(v));return m}}const{message:d}=l;return i([u,{name:f,message:d}],l)};return o},f_=(e,{json:t,lossy:n}={})=>{const r=[];return Nq(!(t||n),!!t,new Map,r)(e),r},$f=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?c_(f_(e,t)):structuredClone(e):(e,t)=>c_(f_(e,t));function Oq(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function jq(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Lq(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Oq,r=e.options.footnoteBackLabel||jq,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},u=[];let f=-1;for(;++f0&&w.push({type:"text",value:" "});let _=typeof n=="string"?n:n(f,g);typeof _=="string"&&(_={type:"text",value:_}),w.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+v+(g>1?"-"+g:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(f,g),className:["data-footnote-backref"]},children:Array.isArray(_)?_:[_]})}const k=p[p.length-1];if(k&&k.type==="element"&&k.tagName==="p"){const _=k.children[k.children.length-1];_&&_.type==="text"?_.value+=" ":k.children.push({type:"text",value:" "}),k.children.push(...w)}else p.push(...w);const C={type:"element",tagName:"li",properties:{id:t+"fn-"+v},children:e.wrap(p,!0)};e.patch(d,C),u.push(C)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...$f(l),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:` +`},{type:"element",tagName:"ol",properties:{},children:e.wrap(u,!0)},{type:"text",value:` +`}]}}const Od=function(e){if(e==null)return Fq;if(typeof e=="function")return jd(e);if(typeof e=="object")return Array.isArray(e)?zq(e):Mq(e);if(typeof e=="string")return Pq(e);throw new Error("Expected function, string, or object as test")};function zq(e){const t=[];let n=-1;for(;++n":""))+")"})}return v;function v(){let g=SD,w,x,k;if((!t||o(f,d,p[p.length-1]||void 0))&&(g=Bq(n(f,p)),g[0]===Sv))return g;if("children"in f&&f.children){const C=f;if(C.children&&g[0]!==Uq)for(x=(r?C.children.length:-1)+l,k=p.concat(C);x>-1&&x0&&n.push({type:"text",value:` +`}),n}function d_(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function h_(e,t){const n=Hq(e,t),r=n.one(e,void 0),i=Lq(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:` +`},i),o}function Xq(e,t){return e&&"run"in e?async function(n,r){const i=h_(n,{file:r,...t});await e.run(i,r)}:function(n,r){return h_(n,{file:r,...e||t})}}function p_(e){if(e)throw e}var sg,m_;function Kq(){if(m_)return sg;m_=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(d){return typeof Array.isArray=="function"?Array.isArray(d):t.call(d)==="[object Array]"},o=function(d){if(!d||t.call(d)!=="[object Object]")return!1;var p=e.call(d,"constructor"),m=d.constructor&&d.constructor.prototype&&e.call(d.constructor.prototype,"isPrototypeOf");if(d.constructor&&!p&&!m)return!1;var v;for(v in d);return typeof v>"u"||e.call(d,v)},l=function(d,p){n&&p.name==="__proto__"?n(d,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):d[p.name]=p.newValue},u=function(d,p){if(p==="__proto__")if(e.call(d,p)){if(r)return r(d,p).value}else return;return d[p]};return sg=function f(){var d,p,m,v,g,w,x=arguments[0],k=1,C=arguments.length,_=!1;for(typeof x=="boolean"&&(_=x,x=arguments[1]||{},k=2),(x==null||typeof x!="object"&&typeof x!="function")&&(x={});kl.length;let f;u&&l.push(i);try{f=e.apply(this,l)}catch(d){const p=d;if(u&&n)throw p;return i(p)}u||(f&&f.then&&typeof f.then=="function"?f.then(o,i):f instanceof Error?i(f):o(f))}function i(l,...u){n||(n=!0,t(l,...u))}function o(l){i(null,l)}}const Gr={basename:eY,dirname:tY,extname:nY,join:rY,sep:"/"};function eY(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');bu(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,u=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else l<0&&(o=!0,l=i+1),u>-1&&(e.codePointAt(i)===t.codePointAt(u--)?u<0&&(r=i):(u=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function tY(e){if(bu(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function nY(e){bu(e);let t=e.length,n=-1,r=0,i=-1,o=0,l;for(;t--;){const u=e.codePointAt(t);if(u===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),u===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function rY(...e){let t=-1,n;for(;++t0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function aY(e,t){let n="",r=0,i=-1,o=0,l=-1,u,f;for(;++l<=e.length;){if(l2){if(f=n.lastIndexOf("/"),f!==n.length-1){f<0?(n="",r=0):(n=n.slice(0,f),r=n.length-1-n.lastIndexOf("/")),i=l,o=0;continue}}else if(n.length>0){n="",r=0,i=l,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,l):n=e.slice(i+1,l),r=l-i-1;i=l,o=0}else u===46&&o>-1?o++:o=-1}return n}function bu(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const oY={cwd:sY};function sY(){return"/"}function kv(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function lY(e){if(typeof e=="string")e=new URL(e);else if(!kv(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return uY(e)}function uY(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n0){let[g,...w]=p;const x=r[v][1];_v(x)&&_v(g)&&(g=lg(!0,x,g)),r[v]=[d,g,...w]}}}}const hY=new ab().freeze();function dg(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function hg(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function pg(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function v_(e){if(!_v(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function y_(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Jc(e){return pY(e)?e:new _D(e)}function pY(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function mY(e){return typeof e=="string"||gY(e)}function gY(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const vY="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",b_=[],x_={allowDangerousHtml:!0},yY=/^(https?|ircs?|mailto|xmpp)$/i,bY=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function xY(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",i=e.className,o=e.components,l=e.disallowedElements,u=e.rehypePlugins||b_,f=e.remarkPlugins||b_,d=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...x_}:x_,p=e.skipHtml,m=e.unwrapDisallowed,v=e.urlTransform||wY,g=hY().use(tq).use(f).use(Xq,d).use(u),w=new _D;typeof r=="string"&&(w.value=r);for(const _ of bY)Object.hasOwn(e,_.from)&&(""+_.from+(_.to?"use `"+_.to+"` instead":"remove it")+vY+_.id,void 0);const x=g.parse(w);let k=g.runSync(x,w);return i&&(k={type:"element",tagName:"div",properties:{className:i},children:k.type==="root"?k.children:[k]}),ib(k,C),J2(k,{Fragment:S.Fragment,components:o,ignoreInvalidStyle:!0,jsx:S.jsx,jsxs:S.jsxs,passKeys:!0,passNode:!0});function C(_,T,N){if(_.type==="raw"&&N&&typeof T=="number")return p?N.children.splice(T,1):N.children[T]={type:"text",value:_.value},T;if(_.type==="element"){let D;for(D in ig)if(Object.hasOwn(ig,D)&&Object.hasOwn(_.properties,D)){const L=_.properties[D],R=ig[D];(R===null||R.includes(_.tagName))&&(_.properties[D]=v(String(L||""),D,_))}}if(_.type==="element"){let D=t?!t.includes(_.tagName):l?l.includes(_.tagName):!1;if(!D&&n&&typeof T=="number"&&(D=!n(_,T,N)),D&&N&&typeof T=="number")return m&&_.children?N.children.splice(T,1,..._.children):N.children.splice(T,1),T}}}function wY(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||yY.test(e.slice(0,t))?e:""}function w_(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function SY(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function EY(e,t,n){const i=Od((n||{}).ignore||[]),o=_Y(t);let l=-1;for(;++l0?{type:"text",value:L}:void 0),L===!1?v.lastIndex=N+1:(w!==N&&_.push({type:"text",value:d.value.slice(w,N)}),Array.isArray(L)?_.push(...L):L&&_.push(L),w=N+T[0].length,C=!0),!v.global)break;T=v.exec(d.value)}return C?(w?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=w_(e,"(");let o=w_(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function kD(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||to(n)||Rd(n))&&(!t||n!==47)}CD.peek=YY;function IY(){this.buffer()}function GY(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function UY(){this.buffer()}function BY(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function $Y(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Tr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function HY(e){this.exit(e)}function VY(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Tr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function qY(e){this.exit(e)}function YY(){return"["}function CD(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const l=n.enter("footnoteReference"),u=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{after:"]",before:o})),u(),l(),o+=i.move("]"),o}function WY(){return{enter:{gfmFootnoteCallString:IY,gfmFootnoteCall:GY,gfmFootnoteDefinitionLabelString:UY,gfmFootnoteDefinition:BY},exit:{gfmFootnoteCallString:$Y,gfmFootnoteCall:HY,gfmFootnoteDefinitionLabelString:VY,gfmFootnoteDefinition:qY}}}function XY(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:CD},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,o,l){const u=o.createTracker(l);let f=u.move("[^");const d=o.enter("footnoteDefinition"),p=o.enter("label");return f+=u.move(o.safe(o.associationId(r),{before:f,after:"]"})),p(),f+=u.move("]:"),r.children&&r.children.length>0&&(u.shift(4),f+=u.move((t?` +`:" ")+o.indentLines(o.containerFlow(r,u.current()),t?TD:KY))),d(),f}}function KY(e,t,n){return t===0?e:TD(e,t,n)}function TD(e,t,n){return(n?"":" ")+e}const ZY=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];AD.peek=nW;function QY(){return{canContainEols:["delete"],enter:{strikethrough:eW},exit:{strikethrough:tW}}}function JY(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:ZY}],handlers:{delete:AD}}}function eW(e){this.enter({type:"delete",children:[]},e)}function tW(e){this.exit(e)}function AD(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let l=i.move("~~");return l+=n.containerPhrasing(e,{...i.current(),before:l,after:"~"}),l+=i.move("~~"),o(),l}function nW(){return"~"}function rW(e){return e.length}function iW(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||rW,o=[],l=[],u=[],f=[];let d=0,p=-1;for(;++pd&&(d=e[p].length);++Cf[C])&&(f[C]=T)}x.push(_)}l[p]=x,u[p]=k}let m=-1;if(typeof r=="object"&&"length"in r)for(;++mf[m]&&(f[m]=_),g[m]=_),v[m]=T}l.splice(1,0,v),u.splice(1,0,g),p=-1;const w=[];for(;++p "),o.shift(2);const l=n.indentLines(n.containerFlow(e,o.current()),sW);return i(),l}function sW(e,t,n){return">"+(n?"":" ")+e}function lW(e,t){return E_(e,t.inConstruct,!0)&&!E_(e,t.notInConstruct,!1)}function E_(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++rl&&(l=o):o=1,i=r+t.length,r=n.indexOf(t,i);return l}function uW(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function cW(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function fW(e,t,n,r){const i=cW(n),o=e.value||"",l=i==="`"?"GraveAccent":"Tilde";if(uW(e,n)){const m=n.enter("codeIndented"),v=n.indentLines(o,dW);return m(),v}const u=n.createTracker(r),f=i.repeat(Math.max(RD(o,i)+1,3)),d=n.enter("codeFenced");let p=u.move(f);if(e.lang){const m=n.enter(`codeFencedLang${l}`);p+=u.move(n.safe(e.lang,{before:p,after:" ",encode:["`"],...u.current()})),m()}if(e.lang&&e.meta){const m=n.enter(`codeFencedMeta${l}`);p+=u.move(" "),p+=u.move(n.safe(e.meta,{before:p,after:` +`,encode:["`"],...u.current()})),m()}return p+=u.move(` +`),o&&(p+=u.move(o+` +`)),p+=u.move(f),d(),p}function dW(e,t,n){return(n?"":" ")+e}function ob(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function hW(e,t,n,r){const i=ob(n),o=i==='"'?"Quote":"Apostrophe",l=n.enter("definition");let u=n.enter("label");const f=n.createTracker(r);let d=f.move("[");return d+=f.move(n.safe(n.associationId(e),{before:d,after:"]",...f.current()})),d+=f.move("]: "),u(),!e.url||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),d+=f.move("<"),d+=f.move(n.safe(e.url,{before:d,after:">",...f.current()})),d+=f.move(">")):(u=n.enter("destinationRaw"),d+=f.move(n.safe(e.url,{before:d,after:e.title?" ":` +`,...f.current()}))),u(),e.title&&(u=n.enter(`title${o}`),d+=f.move(" "+i),d+=f.move(n.safe(e.title,{before:d,after:i,...f.current()})),d+=f.move(i),u()),l(),d}function pW(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function nu(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Hf(e,t,n){const r=ps(e),i=ps(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}DD.peek=mW;function DD(e,t,n,r){const i=pW(n),o=n.enter("emphasis"),l=n.createTracker(r),u=l.move(i);let f=l.move(n.containerPhrasing(e,{after:i,before:u,...l.current()}));const d=f.charCodeAt(0),p=Hf(r.before.charCodeAt(r.before.length-1),d,i);p.inside&&(f=nu(d)+f.slice(1));const m=f.charCodeAt(f.length-1),v=Hf(r.after.charCodeAt(0),m,i);v.inside&&(f=f.slice(0,-1)+nu(m));const g=l.move(i);return o(),n.attentionEncodeSurroundingInfo={after:v.outside,before:p.outside},u+f+g}function mW(e,t,n){return n.options.emphasis||"*"}function gW(e,t){let n=!1;return ib(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Sv}),!!((!e.depth||e.depth<3)&&Zy(e)&&(t.options.setext||n))}function vW(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(gW(e,n)){const p=n.enter("headingSetext"),m=n.enter("phrasing"),v=n.containerPhrasing(e,{...o.current(),before:` +`,after:` +`});return m(),p(),v+` +`+(i===1?"=":"-").repeat(v.length-(Math.max(v.lastIndexOf("\r"),v.lastIndexOf(` +`))+1))}const l="#".repeat(i),u=n.enter("headingAtx"),f=n.enter("phrasing");o.move(l+" ");let d=n.containerPhrasing(e,{before:"# ",after:` +`,...o.current()});return/^[\t ]/.test(d)&&(d=nu(d.charCodeAt(0))+d.slice(1)),d=d?l+" "+d:l,n.options.closeAtx&&(d+=" "+l),f(),u(),d}ND.peek=yW;function ND(e){return e.value||""}function yW(){return"<"}OD.peek=bW;function OD(e,t,n,r){const i=ob(n),o=i==='"'?"Quote":"Apostrophe",l=n.enter("image");let u=n.enter("label");const f=n.createTracker(r);let d=f.move("![");return d+=f.move(n.safe(e.alt,{before:d,after:"]",...f.current()})),d+=f.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),d+=f.move("<"),d+=f.move(n.safe(e.url,{before:d,after:">",...f.current()})),d+=f.move(">")):(u=n.enter("destinationRaw"),d+=f.move(n.safe(e.url,{before:d,after:e.title?" ":")",...f.current()}))),u(),e.title&&(u=n.enter(`title${o}`),d+=f.move(" "+i),d+=f.move(n.safe(e.title,{before:d,after:i,...f.current()})),d+=f.move(i),u()),d+=f.move(")"),l(),d}function bW(){return"!"}jD.peek=xW;function jD(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let l=n.enter("label");const u=n.createTracker(r);let f=u.move("![");const d=n.safe(e.alt,{before:f,after:"]",...u.current()});f+=u.move(d+"]["),l();const p=n.stack;n.stack=[],l=n.enter("reference");const m=n.safe(n.associationId(e),{before:f,after:"]",...u.current()});return l(),n.stack=p,o(),i==="full"||!d||d!==m?f+=u.move(m+"]"):i==="shortcut"?f=f.slice(0,-1):f+=u.move("]"),f}function xW(){return"!"}LD.peek=wW;function LD(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o\u007F]/.test(e.url))}MD.peek=SW;function MD(e,t,n,r){const i=ob(n),o=i==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let u,f;if(zD(e,n)){const p=n.stack;n.stack=[],u=n.enter("autolink");let m=l.move("<");return m+=l.move(n.containerPhrasing(e,{before:m,after:">",...l.current()})),m+=l.move(">"),u(),n.stack=p,m}u=n.enter("link"),f=n.enter("label");let d=l.move("[");return d+=l.move(n.containerPhrasing(e,{before:d,after:"](",...l.current()})),d+=l.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),d+=l.move("<"),d+=l.move(n.safe(e.url,{before:d,after:">",...l.current()})),d+=l.move(">")):(f=n.enter("destinationRaw"),d+=l.move(n.safe(e.url,{before:d,after:e.title?" ":")",...l.current()}))),f(),e.title&&(f=n.enter(`title${o}`),d+=l.move(" "+i),d+=l.move(n.safe(e.title,{before:d,after:i,...l.current()})),d+=l.move(i),f()),d+=l.move(")"),u(),d}function SW(e,t,n){return zD(e,n)?"<":"["}PD.peek=EW;function PD(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let l=n.enter("label");const u=n.createTracker(r);let f=u.move("[");const d=n.containerPhrasing(e,{before:f,after:"]",...u.current()});f+=u.move(d+"]["),l();const p=n.stack;n.stack=[],l=n.enter("reference");const m=n.safe(n.associationId(e),{before:f,after:"]",...u.current()});return l(),n.stack=p,o(),i==="full"||!d||d!==m?f+=u.move(m+"]"):i==="shortcut"?f=f.slice(0,-1):f+=u.move("]"),f}function EW(){return"["}function sb(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function _W(e){const t=sb(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function kW(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function FD(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function CW(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let l=e.ordered?kW(n):sb(n);const u=e.ordered?l==="."?")":".":_W(n);let f=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const p=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&p&&(!p.children||!p.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(f=!0),FD(n)===l&&p){let m=-1;for(;++m-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let l=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const u=n.createTracker(r);u.move(o+" ".repeat(l-o.length)),u.shift(l);const f=n.enter("listItem"),d=n.indentLines(n.containerFlow(e,u.current()),p);return f(),d;function p(m,v,g){return v?(g?"":" ".repeat(l))+m:(g?o:o+" ".repeat(l-o.length))+m}}function RW(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),l=n.containerPhrasing(e,r);return o(),i(),l}const DW=Od(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function NW(e,t,n,r){return(e.children.some(function(l){return DW(l)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function OW(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}ID.peek=jW;function ID(e,t,n,r){const i=OW(n),o=n.enter("strong"),l=n.createTracker(r),u=l.move(i+i);let f=l.move(n.containerPhrasing(e,{after:i,before:u,...l.current()}));const d=f.charCodeAt(0),p=Hf(r.before.charCodeAt(r.before.length-1),d,i);p.inside&&(f=nu(d)+f.slice(1));const m=f.charCodeAt(f.length-1),v=Hf(r.after.charCodeAt(0),m,i);v.inside&&(f=f.slice(0,-1)+nu(m));const g=l.move(i+i);return o(),n.attentionEncodeSurroundingInfo={after:v.outside,before:p.outside},u+f+g}function jW(e,t,n){return n.options.strong||"*"}function LW(e,t,n,r){return n.safe(e.value,r)}function zW(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function MW(e,t,n){const r=(FD(n)+(n.options.ruleSpaces?" ":"")).repeat(zW(n));return n.options.ruleSpaces?r.slice(0,-1):r}const GD={blockquote:oW,break:__,code:fW,definition:hW,emphasis:DD,hardBreak:__,heading:vW,html:ND,image:OD,imageReference:jD,inlineCode:LD,link:MD,linkReference:PD,list:CW,listItem:AW,paragraph:RW,root:NW,strong:ID,text:LW,thematicBreak:MW};function PW(){return{enter:{table:FW,tableData:k_,tableHeader:k_,tableRow:GW},exit:{codeText:UW,table:IW,tableData:yg,tableHeader:yg,tableRow:yg}}}function FW(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function IW(e){this.exit(e),this.data.inTable=void 0}function GW(e){this.enter({type:"tableRow",children:[]},e)}function yg(e){this.exit(e)}function k_(e){this.enter({type:"tableCell",children:[]},e)}function UW(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,BW));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function BW(e,t){return t==="|"?t:e}function $W(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` +`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:v,table:l,tableCell:f,tableRow:u}};function l(g,w,x,k){return d(p(g,x,k),g.align)}function u(g,w,x,k){const C=m(g,x,k),_=d([C]);return _.slice(0,_.indexOf(` +`))}function f(g,w,x,k){const C=x.enter("tableCell"),_=x.enter("phrasing"),T=x.containerPhrasing(g,{...k,before:o,after:o});return _(),C(),T}function d(g,w){return iW(g,{align:w,alignDelimiters:r,padding:n,stringLength:i})}function p(g,w,x){const k=g.children;let C=-1;const _=[],T=w.enter("table");for(;++C0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const sX={tokenize:mX,partial:!0};function lX(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:dX,continuation:{tokenize:hX},exit:pX}},text:{91:{name:"gfmFootnoteCall",tokenize:fX},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:uX,resolveTo:cX}}}}function uX(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;i--;){const f=r.events[i][1];if(f.type==="labelImage"){l=f;break}if(f.type==="gfmFootnoteCall"||f.type==="labelLink"||f.type==="label"||f.type==="image"||f.type==="link")break}return u;function u(f){if(!l||!l._balanced)return n(f);const d=Tr(r.sliceSerialize({start:l.end,end:r.now()}));return d.codePointAt(0)!==94||!o.includes(d.slice(1))?n(f):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),t(f))}}function cX(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},u=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",l,t],["exit",l,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...u),e}function fX(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,l;return u;function u(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),f}function f(m){return m!==94?n(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",d)}function d(m){if(o>999||m===93&&!l||m===null||m===91||Tt(m))return n(m);if(m===93){e.exit("chunkString");const v=e.exit("gfmFootnoteCallString");return i.includes(Tr(r.sliceSerialize(v)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return Tt(m)||(l=!0),o++,e.consume(m),m===92?p:d}function p(m){return m===91||m===92||m===93?(e.consume(m),o++,d):d(m)}}function dX(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,l=0,u;return f;function f(w){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),d}function d(w){return w===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):n(w)}function p(w){if(l>999||w===93&&!u||w===null||w===91||Tt(w))return n(w);if(w===93){e.exit("chunkString");const x=e.exit("gfmFootnoteDefinitionLabelString");return o=Tr(r.sliceSerialize(x)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),v}return Tt(w)||(u=!0),l++,e.consume(w),w===92?m:p}function m(w){return w===91||w===92||w===93?(e.consume(w),l++,p):p(w)}function v(w){return w===58?(e.enter("definitionMarker"),e.consume(w),e.exit("definitionMarker"),i.includes(o)||i.push(o),st(e,g,"gfmFootnoteDefinitionWhitespace")):n(w)}function g(w){return t(w)}}function hX(e,t,n){return e.check(yu,t,e.attempt(sX,t,n))}function pX(e){e.exit("gfmFootnoteDefinition")}function mX(e,t,n){const r=this;return st(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(o):n(o)}}function gX(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(l,u){let f=-1;for(;++f1?f(w):(l.consume(w),m++,g);if(m<2&&!n)return f(w);const k=l.exit("strikethroughSequenceTemporary"),C=ps(w);return k._open=!C||C===2&&!!x,k._close=!x||x===2&&!!C,u(w)}}}class vX{constructor(){this.map=[]}add(t,n,r){yX(this,t,n,r)}consume(t){if(this.map.sort(function(o,l){return o[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const o of i)t.push(o);i=r.pop()}this.map.length=0}}function yX(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i-1;){const Y=r.events[V][1].type;if(Y==="lineEnding"||Y==="linePrefix")V--;else break}const q=V>-1?r.events[V][1].type:null,I=q==="tableHead"||q==="tableRow"?L:f;return I===L&&r.parser.lazy[r.now().line]?n(z):I(z)}function f(z){return e.enter("tableHead"),e.enter("tableRow"),d(z)}function d(z){return z===124||(l=!0,o+=1),p(z)}function p(z){return z===null?n(z):Be(z)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),g):n(z):ut(z)?st(e,p,"whitespace")(z):(o+=1,l&&(l=!1,i+=1),z===124?(e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),l=!0,p):(e.enter("data"),m(z)))}function m(z){return z===null||z===124||Tt(z)?(e.exit("data"),p(z)):(e.consume(z),z===92?v:m)}function v(z){return z===92||z===124?(e.consume(z),m):m(z)}function g(z){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(z):(e.enter("tableDelimiterRow"),l=!1,ut(z)?st(e,w,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):w(z))}function w(z){return z===45||z===58?k(z):z===124?(l=!0,e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),x):D(z)}function x(z){return ut(z)?st(e,k,"whitespace")(z):k(z)}function k(z){return z===58?(o+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(z),e.exit("tableDelimiterMarker"),C):z===45?(o+=1,C(z)):z===null||Be(z)?N(z):D(z)}function C(z){return z===45?(e.enter("tableDelimiterFiller"),_(z)):D(z)}function _(z){return z===45?(e.consume(z),_):z===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(z),e.exit("tableDelimiterMarker"),T):(e.exit("tableDelimiterFiller"),T(z))}function T(z){return ut(z)?st(e,N,"whitespace")(z):N(z)}function N(z){return z===124?w(z):z===null||Be(z)?!l||i!==o?D(z):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(z)):D(z)}function D(z){return n(z)}function L(z){return e.enter("tableRow"),R(z)}function R(z){return z===124?(e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),R):z===null||Be(z)?(e.exit("tableRow"),t(z)):ut(z)?st(e,R,"whitespace")(z):(e.enter("data"),U(z))}function U(z){return z===null||z===124||Tt(z)?(e.exit("data"),R(z)):(e.consume(z),z===92?P:U)}function P(z){return z===92||z===124?(e.consume(z),U):U(z)}}function SX(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],l=[0,0,0,0],u=!1,f=0,d,p,m;const v=new vX;for(;++nn[2]+1){const w=n[2]+1,x=n[3]-n[2]-1;e.add(w,x,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return i!==void 0&&(o.end=Object.assign({},es(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function T_(e,t,n,r,i){const o=[],l=es(t.events,n);i&&(i.end=Object.assign({},l),o.push(["exit",i,t])),r.end=Object.assign({},l),o.push(["exit",r,t]),e.add(n+1,0,o)}function es(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const EX={name:"tasklistCheck",tokenize:kX};function _X(){return{text:{91:EX}}}function kX(e,t,n){const r=this;return i;function i(f){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(f):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),o)}function o(f){return Tt(f)?(e.enter("taskListCheckValueUnchecked"),e.consume(f),e.exit("taskListCheckValueUnchecked"),l):f===88||f===120?(e.enter("taskListCheckValueChecked"),e.consume(f),e.exit("taskListCheckValueChecked"),l):n(f)}function l(f){return f===93?(e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),u):n(f)}function u(f){return Be(f)?t(f):ut(f)?e.check({tokenize:CX},t,n)(f):n(f)}}function CX(e,t,n){return st(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function TX(e){return iD([QW(),lX(),gX(e),xX(),_X()])}const AX={};function RX(e){const t=this,n=e||AX,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(TX(n)),o.push(WW()),l.push(XW(n))}function DX(e){const t=this;t.compiler=n;function n(r,i){return J2(r,{filePath:i.path,...e})}}function NX(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:o},exit:{mathFlow:i,mathFlowFence:r,mathFlowFenceMeta:n,mathFlowValue:u,mathText:l,mathTextData:u}};function e(f){const d={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[d]}},f)}function t(){this.buffer()}function n(){const f=this.resume(),d=this.stack[this.stack.length-1];d.type,d.meta=f}function r(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function i(f){const d=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),p=this.stack[this.stack.length-1];p.type,this.exit(f),p.value=d;const m=p.data.hChildren[0];m.type,m.tagName,m.children.push({type:"text",value:d}),this.data.mathFlowInside=void 0}function o(f){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},f),this.buffer()}function l(f){const d=this.resume(),p=this.stack[this.stack.length-1];p.type,this.exit(f),p.value=d,p.data.hChildren.push({type:"text",value:d})}function u(f){this.config.enter.data.call(this,f),this.config.exit.data.call(this,f)}}function OX(e){let t=(e||{}).singleDollarTextMath;return t==null&&(t=!0),r.peek=i,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:` +`,inConstruct:"mathFlowMeta"},{character:"$",after:t?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:n,inlineMath:r}};function n(o,l,u,f){const d=o.value||"",p=u.createTracker(f),m="$".repeat(Math.max(RD(d,"$")+1,2)),v=u.enter("mathFlow");let g=p.move(m);if(o.meta){const w=u.enter("mathFlowMeta");g+=p.move(u.safe(o.meta,{after:` +`,before:g,encode:["$"],...p.current()})),w()}return g+=p.move(` +`),d&&(g+=p.move(d+` +`)),g+=p.move(m),v(),g}function r(o,l,u){let f=o.value||"",d=1;for(t||d++;new RegExp("(^|[^$])"+"\\$".repeat(d)+"([^$]|$)").test(f);)d++;const p="$".repeat(d);/[^ \r\n]/.test(f)&&(/^[ \r\n]/.test(f)&&/[ \r\n]$/.test(f)||/^\$|\$$/.test(f))&&(f=" "+f+" ");let m=-1;for(;++mS.jsx(xY,{className:"prose lg:prose-xs dark:prose-invert max-w-none text-base",remarkPlugins:[RX,UX],rehypePlugins:[DX],skipHtml:!1,children:e.content});function $X(){const[e,t]=E.useState(()=>Qe.getState().retrievalHistory||[]),[n,r]=E.useState(""),[i,o]=E.useState(!1),l=E.useRef(null),u=E.useCallback(()=>{var m;(m=l.current)==null||m.scrollIntoView({behavior:"smooth"})},[]),f=E.useCallback(async m=>{if(m.preventDefault(),!n.trim()||i)return;const v={content:n,role:"user"},g={content:"",role:"assistant"},w=[...e];t([...w,v,g]),r(""),o(!0);const x=(_,T)=>{g.content+=_,t(N=>{const D=[...N],L=D[D.length-1];return L.role==="assistant"&&(L.content=g.content,L.isError=T),D})},k=Qe.getState(),C={...k.querySettings,query:v.content,conversation_history:w.filter(_=>_.isError!==!0).map(_=>({role:_.role,content:_.content}))};try{if(k.querySettings.stream){let _="";await uM(C,x,T=>{_+=T}),_&&(g.content&&(_=g.content+` +`+_),x(_,!0))}else{const _=await lM(C);x(_.response)}}catch(_){x(`Error: Failed to get response +${Cr(_)}`,!0)}finally{o(!1),Qe.getState().setRetrievalHistory([...w,v,g])}},[n,i,e,t]),d=My(e,100);E.useEffect(()=>u(),[d,u]);const p=E.useCallback(()=>{t([]),Qe.getState().setRetrievalHistory([])},[t]);return S.jsxs("div",{className:"flex size-full gap-2 px-2 pb-12",children:[S.jsxs("div",{className:"flex grow flex-col gap-4",children:[S.jsx("div",{className:"relative grow",children:S.jsx("div",{className:"bg-primary-foreground/60 absolute inset-0 flex flex-col overflow-auto rounded-lg border p-2",children:S.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-2",children:[e.length===0?S.jsx("div",{className:"text-muted-foreground flex h-full items-center justify-center text-lg",children:"Start a retrieval by typing your query below"}):e.map((m,v)=>S.jsx("div",{className:`flex ${m.role==="user"?"justify-end":"justify-start"}`,children:S.jsxs("div",{className:`max-w-[80%] rounded-lg px-4 py-2 ${m.role==="user"?"bg-primary text-primary-foreground":m.isError?"bg-red-100 text-red-600 dark:bg-red-950 dark:text-red-400":"bg-muted"}`,children:[S.jsx("pre",{className:"break-words whitespace-pre-wrap",children:S.jsx(BX,{message:m})}),m.content.length===0&&S.jsx(MM,{className:"animate-spin duration-2000"})]})},v)),S.jsx("div",{ref:l,className:"pb-1"})]})})}),S.jsxs("form",{onSubmit:f,className:"flex shrink-0 items-center gap-2",children:[S.jsxs(Ot,{type:"button",variant:"outline",onClick:p,disabled:i,size:"sm",children:[S.jsx(Sk,{}),"Clear"]}),S.jsx(Za,{className:"flex-1",value:n,onChange:m=>r(m.target.value),placeholder:"Type your query...",disabled:i}),S.jsxs(Ot,{type:"submit",variant:"default",disabled:i,size:"sm",children:[S.jsx(QM,{}),"Send"]})]})]}),S.jsx(u8,{})]})}function HX(){return S.jsx("iframe",{src:U_+"/docs",className:"size-full"})}function VX(){const e=Mn.use.message(),t=Qe.use.enableHealthCheck(),[n]=E.useState(()=>Qe.getState().currentTab),[r,i]=E.useState(!1);E.useEffect(()=>{if(!t)return;Mn.getState().check();const l=setInterval(async()=>{await Mn.getState().check()},wL*1e3);return()=>clearInterval(l)},[t]);const o=E.useCallback(l=>Qe.getState().setCurrentTab(l),[]);return E.useEffect(()=>{if(e&&(e.includes(yk)||e.includes(bk))){i(!0);return}i(!1)},[e,i]),S.jsx(kL,{children:S.jsxs("main",{className:"flex h-screen w-screen overflow-x-hidden",children:[S.jsxs(T3,{defaultValue:n,className:"!m-0 flex grow flex-col !p-0",onValueChange:o,children:[S.jsx(R3,{}),S.jsxs("div",{className:"relative grow",children:[S.jsx(Pl,{value:"documents",className:"absolute top-0 right-0 bottom-0 left-0",children:S.jsx(c9,{})}),S.jsx(Pl,{value:"knowledge-graph",className:"absolute top-0 right-0 bottom-0 left-0",children:S.jsx(L$,{})}),S.jsx(Pl,{value:"retrieval",className:"absolute top-0 right-0 bottom-0 left-0",children:S.jsx($X,{})}),S.jsx(Pl,{value:"api",className:"absolute top-0 right-0 bottom-0 left-0",children:S.jsx(HX,{})})]})]}),t&&S.jsx(u3,{}),e!==null&&!r&&S.jsx(fP,{}),r&&S.jsx(XI,{}),S.jsx(WI,{})]})})}yj.createRoot(document.getElementById("root")).render(S.jsx(E.StrictMode,{children:S.jsx(VX,{})})); diff --git a/lightrag/api/webui/index.html b/lightrag/api/webui/index.html index dc92bda5..f375c134 100644 --- a/lightrag/api/webui/index.html +++ b/lightrag/api/webui/index.html @@ -5,8 +5,8 @@ Lightrag - - + +
diff --git a/lightrag_webui/bun.lock b/lightrag_webui/bun.lock index 570fa3a6..00daedc0 100644 --- a/lightrag_webui/bun.lock +++ b/lightrag_webui/bun.lock @@ -39,7 +39,11 @@ "react": "^19.0.0", "react-dom": "^19.0.0", "react-dropzone": "^14.3.5", + "react-markdown": "^9.0.3", "react-number-format": "^5.4.3", + "rehype-react": "^8.0.0", + "remark-gfm": "^4.0.1", + "remark-math": "^6.0.0", "seedrandom": "^3.0.5", "sigma": "^3.0.1", "sonner": "^1.7.4", @@ -53,8 +57,8 @@ "@tailwindcss/vite": "^4.0.6", "@types/bun": "^1.2.2", "@types/node": "^22.13.4", - "@types/react": "^19.0.8", - "@types/react-dom": "^19.0.3", + "@types/react": "^19.0.10", + "@types/react-dom": "^19.0.4", "@types/seedrandom": "^3.0.8", "@vitejs/plugin-react-swc": "^3.8.0", "eslint": "^9.20.1", @@ -409,24 +413,38 @@ "@types/bun": ["@types/bun@1.2.2", "", { "dependencies": { "bun-types": "1.2.2" } }, "sha512-tr74gdku+AEDN5ergNiBnplr7hpDp3V1h7fqI2GcR/rsUaM39jpSeKH0TFibRvU0KwniRx5POgaYnaXbk0hU+w=="], + "@types/debug": ["@types/debug@4.1.12", "", { "dependencies": { "@types/ms": "*" } }, "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ=="], + "@types/estree": ["@types/estree@1.0.6", "", {}, "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw=="], + "@types/estree-jsx": ["@types/estree-jsx@1.0.5", "", { "dependencies": { "@types/estree": "*" } }, "sha512-52CcUVNFyfb1A2ALocQw/Dd1BQFNmSdkuC3BkZ6iqhdMfQz7JWOFRuJFloOzjk+6WijU56m9oKXFAXc7o3Towg=="], + + "@types/hast": ["@types/hast@3.0.4", "", { "dependencies": { "@types/unist": "*" } }, "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ=="], + "@types/json-schema": ["@types/json-schema@7.0.15", "", {}, "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA=="], + "@types/katex": ["@types/katex@0.16.7", "", {}, "sha512-HMwFiRujE5PjrgwHQ25+bsLJgowjGjm5Z8FVSf0N6PwgJrwxH0QxzHYDcKsTfV3wva0vzrpqMTJS2jXPr5BMEQ=="], + + "@types/mdast": ["@types/mdast@4.0.4", "", { "dependencies": { "@types/unist": "*" } }, "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA=="], + + "@types/ms": ["@types/ms@2.1.0", "", {}, "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA=="], + "@types/node": ["@types/node@22.13.4", "", { "dependencies": { "undici-types": "~6.20.0" } }, "sha512-ywP2X0DYtX3y08eFVx5fNIw7/uIv8hYUKgXoK8oayJlLnKcRfEYCxWMVE1XagUdVtCJlZT1AU4LXEABW+L1Peg=="], "@types/parse-json": ["@types/parse-json@4.0.2", "", {}, "sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw=="], "@types/prismjs": ["@types/prismjs@1.26.5", "", {}, "sha512-AUZTa7hQ2KY5L7AmtSiqxlhWxb4ina0yd8hNbl4TWuqnv/pFP0nDMb3YrfSBf4hJVGLh2YEIBfKaBW/9UEl6IQ=="], - "@types/react": ["@types/react@19.0.8", "", { "dependencies": { "csstype": "^3.0.2" } }, "sha512-9P/o1IGdfmQxrujGbIMDyYaaCykhLKc0NGCtYcECNUr9UAaDe4gwvV9bR6tvd5Br1SG0j+PBpbKr2UYY8CwqSw=="], + "@types/react": ["@types/react@19.0.10", "", { "dependencies": { "csstype": "^3.0.2" } }, "sha512-JuRQ9KXLEjaUNjTWpzuR231Z2WpIwczOkBEIvbHNCzQefFIT0L8IqE6NV6ULLyC1SI/i234JnDoMkfg+RjQj2g=="], - "@types/react-dom": ["@types/react-dom@19.0.3", "", { "peerDependencies": { "@types/react": "^19.0.0" } }, "sha512-0Knk+HJiMP/qOZgMyNFamlIjw9OFCsyC2ZbigmEEyXXixgre6IQpm/4V+r3qH4GC1JPvRJKInw+on2rV6YZLeA=="], + "@types/react-dom": ["@types/react-dom@19.0.4", "", { "peerDependencies": { "@types/react": "^19.0.0" } }, "sha512-4fSQ8vWFkg+TGhePfUzVmat3eC14TXYSsiiDSLI0dVLsrm9gZFABjPy/Qu6TKgl1tq1Bu1yDsuQgY3A3DOjCcg=="], "@types/react-transition-group": ["@types/react-transition-group@4.4.12", "", { "peerDependencies": { "@types/react": "*" } }, "sha512-8TV6R3h2j7a91c+1DXdJi3Syo69zzIZbz7Lg5tORM5LEJG7X/E6a1V3drRyBRZq7/utz7A+c4OgYLiLcYGHG6w=="], "@types/seedrandom": ["@types/seedrandom@3.0.8", "", {}, "sha512-TY1eezMU2zH2ozQoAFAQFOPpvP15g+ZgSfTZt31AUUH/Rxtnz3H+A/Sv1Snw2/amp//omibc+AEkTaA8KUeOLQ=="], + "@types/unist": ["@types/unist@3.0.3", "", {}, "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q=="], + "@types/ws": ["@types/ws@8.5.14", "", { "dependencies": { "@types/node": "*" } }, "sha512-bd/YFLW+URhBzMXurx7lWByOu+xzU9+kb3RboOteXYDfW+tr+JZa99OyNmPINEGB/ahzKrEuc8rcv4gnpJmxTw=="], "@typescript-eslint/eslint-plugin": ["@typescript-eslint/eslint-plugin@8.24.0", "", { "dependencies": { "@eslint-community/regexpp": "^4.10.0", "@typescript-eslint/scope-manager": "8.24.0", "@typescript-eslint/type-utils": "8.24.0", "@typescript-eslint/utils": "8.24.0", "@typescript-eslint/visitor-keys": "8.24.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", "ts-api-utils": "^2.0.1" }, "peerDependencies": { "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <5.8.0" } }, "sha512-aFcXEJJCI4gUdXgoo/j9udUYIHgF23MFkg09LFz2dzEmU0+1Plk4rQWv/IYKvPHAtlkkGoB3m5e6oUp+JPsNaQ=="], @@ -445,6 +463,8 @@ "@typescript-eslint/visitor-keys": ["@typescript-eslint/visitor-keys@8.24.0", "", { "dependencies": { "@typescript-eslint/types": "8.24.0", "eslint-visitor-keys": "^4.2.0" } }, "sha512-kArLq83QxGLbuHrTMoOEWO+l2MwsNS2TGISEdx8xgqpkbytB07XmlQyQdNDrCc1ecSqx0cnmhGvpX+VBwqqSkg=="], + "@ungap/structured-clone": ["@ungap/structured-clone@1.3.0", "", {}, "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g=="], + "@vitejs/plugin-react-swc": ["@vitejs/plugin-react-swc@3.8.0", "", { "dependencies": { "@swc/core": "^1.10.15" }, "peerDependencies": { "vite": "^4 || ^5 || ^6" } }, "sha512-T4sHPvS+DIqDP51ifPqa9XIRAz/kIvIi8oXcnOZZgHmMotgmmdxe/DD5tMFlt5nuIRzT0/QuiwmKlH0503Aapw=="], "@yomguithereal/helpers": ["@yomguithereal/helpers@1.1.1", "", {}, "sha512-UYvAq/XCA7xoh1juWDYsq3W0WywOB+pz8cgVnE1b45ZfdMhBvHDrgmSFG3jXeZSr2tMTYLGHFHON+ekG05Jebg=="], @@ -487,6 +507,8 @@ "babel-plugin-macros": ["babel-plugin-macros@3.1.0", "", { "dependencies": { "@babel/runtime": "^7.12.5", "cosmiconfig": "^7.0.0", "resolve": "^1.19.0" } }, "sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg=="], + "bail": ["bail@2.0.2", "", {}, "sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw=="], + "balanced-match": ["balanced-match@1.0.2", "", {}, "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="], "brace-expansion": ["brace-expansion@1.1.11", "", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA=="], @@ -503,8 +525,18 @@ "callsites": ["callsites@3.1.0", "", {}, "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ=="], + "ccount": ["ccount@2.0.1", "", {}, "sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg=="], + "chalk": ["chalk@4.1.2", "", { "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="], + "character-entities": ["character-entities@2.0.2", "", {}, "sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ=="], + + "character-entities-html4": ["character-entities-html4@2.1.0", "", {}, "sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA=="], + + "character-entities-legacy": ["character-entities-legacy@3.0.0", "", {}, "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ=="], + + "character-reference-invalid": ["character-reference-invalid@2.0.1", "", {}, "sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw=="], + "class-variance-authority": ["class-variance-authority@0.7.1", "", { "dependencies": { "clsx": "^2.1.1" } }, "sha512-Ka+9Trutv7G8M6WT6SeiRWz792K5qEqIGEGzXKhAE6xOWAY6pPH8U+9IY3oCMv6kqTmLsv7Xh/2w2RigkePMsg=="], "clsx": ["clsx@2.1.1", "", {}, "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA=="], @@ -517,6 +549,10 @@ "combined-stream": ["combined-stream@1.0.8", "", { "dependencies": { "delayed-stream": "~1.0.0" } }, "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg=="], + "comma-separated-tokens": ["comma-separated-tokens@2.0.3", "", {}, "sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg=="], + + "commander": ["commander@8.3.0", "", {}, "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww=="], + "concat-map": ["concat-map@0.0.1", "", {}, "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="], "convert-source-map": ["convert-source-map@1.9.0", "", {}, "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A=="], @@ -535,6 +571,8 @@ "debug": ["debug@4.4.0", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA=="], + "decode-named-character-reference": ["decode-named-character-reference@1.0.2", "", { "dependencies": { "character-entities": "^2.0.0" } }, "sha512-O8x12RzrUF8xyVcY0KJowWsmaJxQbmy0/EtnNtHRpsOcT7dFk5W598coHqBVpmWo1oQQfsCqfCmkZN5DJrZVdg=="], + "deep-is": ["deep-is@0.1.4", "", {}, "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ=="], "define-data-property": ["define-data-property@1.1.4", "", { "dependencies": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", "gopd": "^1.0.1" } }, "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A=="], @@ -543,10 +581,14 @@ "delayed-stream": ["delayed-stream@1.0.0", "", {}, "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ=="], + "dequal": ["dequal@2.0.3", "", {}, "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA=="], + "detect-libc": ["detect-libc@1.0.3", "", { "bin": { "detect-libc": "./bin/detect-libc.js" } }, "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg=="], "detect-node-es": ["detect-node-es@1.1.0", "", {}, "sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ=="], + "devlop": ["devlop@1.1.0", "", { "dependencies": { "dequal": "^2.0.0" } }, "sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA=="], + "doctrine": ["doctrine@2.1.0", "", { "dependencies": { "esutils": "^2.0.2" } }, "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw=="], "dom-helpers": ["dom-helpers@5.2.1", "", { "dependencies": { "@babel/runtime": "^7.8.7", "csstype": "^3.0.2" } }, "sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA=="], @@ -599,10 +641,14 @@ "estraverse": ["estraverse@5.3.0", "", {}, "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA=="], + "estree-util-is-identifier-name": ["estree-util-is-identifier-name@3.0.0", "", {}, "sha512-hFtqIDZTIUZ9BXLb8y4pYGyk6+wekIivNVTcmvk8NoOh+VeRn5y6cEHzbURrWbfp1fIqdVipilzj+lfaadNZmg=="], + "esutils": ["esutils@2.0.3", "", {}, "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g=="], "events": ["events@3.3.0", "", {}, "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q=="], + "extend": ["extend@3.0.2", "", {}, "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="], + "fast-deep-equal": ["fast-deep-equal@3.1.3", "", {}, "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="], "fast-glob": ["fast-glob@3.3.3", "", { "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", "glob-parent": "^5.1.2", "merge2": "^1.3.0", "micromatch": "^4.0.8" } }, "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg=="], @@ -697,16 +743,28 @@ "hasown": ["hasown@2.0.2", "", { "dependencies": { "function-bind": "^1.1.2" } }, "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ=="], + "hast-util-to-jsx-runtime": ["hast-util-to-jsx-runtime@2.3.2", "", { "dependencies": { "@types/estree": "^1.0.0", "@types/hast": "^3.0.0", "@types/unist": "^3.0.0", "comma-separated-tokens": "^2.0.0", "devlop": "^1.0.0", "estree-util-is-identifier-name": "^3.0.0", "hast-util-whitespace": "^3.0.0", "mdast-util-mdx-expression": "^2.0.0", "mdast-util-mdx-jsx": "^3.0.0", "mdast-util-mdxjs-esm": "^2.0.0", "property-information": "^6.0.0", "space-separated-tokens": "^2.0.0", "style-to-object": "^1.0.0", "unist-util-position": "^5.0.0", "vfile-message": "^4.0.0" } }, "sha512-1ngXYb+V9UT5h+PxNRa1O1FYguZK/XL+gkeqvp7EdHlB9oHUG0eYRo/vY5inBdcqo3RkPMC58/H94HvkbfGdyg=="], + + "hast-util-whitespace": ["hast-util-whitespace@3.0.0", "", { "dependencies": { "@types/hast": "^3.0.0" } }, "sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw=="], + "hoist-non-react-statics": ["hoist-non-react-statics@3.3.2", "", { "dependencies": { "react-is": "^16.7.0" } }, "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw=="], + "html-url-attributes": ["html-url-attributes@3.0.1", "", {}, "sha512-ol6UPyBWqsrO6EJySPz2O7ZSr856WDrEzM5zMqp+FJJLGMW35cLYmmZnl0vztAZxRUoNZJFTCohfjuIJ8I4QBQ=="], + "ignore": ["ignore@5.3.2", "", {}, "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g=="], "import-fresh": ["import-fresh@3.3.1", "", { "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" } }, "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ=="], "imurmurhash": ["imurmurhash@0.1.4", "", {}, "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA=="], + "inline-style-parser": ["inline-style-parser@0.2.4", "", {}, "sha512-0aO8FkhNZlj/ZIbNi7Lxxr12obT7cL1moPfE4tg1LkX7LlLfC6DeX4l2ZEud1ukP9jNQyNnfzQVqwbwmAATY4Q=="], + "internal-slot": ["internal-slot@1.1.0", "", { "dependencies": { "es-errors": "^1.3.0", "hasown": "^2.0.2", "side-channel": "^1.1.0" } }, "sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw=="], + "is-alphabetical": ["is-alphabetical@2.0.1", "", {}, "sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ=="], + + "is-alphanumerical": ["is-alphanumerical@2.0.1", "", { "dependencies": { "is-alphabetical": "^2.0.0", "is-decimal": "^2.0.0" } }, "sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw=="], + "is-array-buffer": ["is-array-buffer@3.0.5", "", { "dependencies": { "call-bind": "^1.0.8", "call-bound": "^1.0.3", "get-intrinsic": "^1.2.6" } }, "sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A=="], "is-arrayish": ["is-arrayish@0.2.1", "", {}, "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg=="], @@ -725,6 +783,8 @@ "is-date-object": ["is-date-object@1.1.0", "", { "dependencies": { "call-bound": "^1.0.2", "has-tostringtag": "^1.0.2" } }, "sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg=="], + "is-decimal": ["is-decimal@2.0.1", "", {}, "sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A=="], + "is-extglob": ["is-extglob@2.1.1", "", {}, "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ=="], "is-finalizationregistry": ["is-finalizationregistry@1.1.1", "", { "dependencies": { "call-bound": "^1.0.3" } }, "sha512-1pC6N8qWJbWoPtEjgcL2xyhQOP491EQjeUo3qTKcmV8YSDDJrOepfG8pcC7h/QgnQHYSv0mJ3Z/ZWxmatVrysg=="], @@ -733,12 +793,16 @@ "is-glob": ["is-glob@4.0.3", "", { "dependencies": { "is-extglob": "^2.1.1" } }, "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg=="], + "is-hexadecimal": ["is-hexadecimal@2.0.1", "", {}, "sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg=="], + "is-map": ["is-map@2.0.3", "", {}, "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw=="], "is-number": ["is-number@7.0.0", "", {}, "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng=="], "is-number-object": ["is-number-object@1.1.1", "", { "dependencies": { "call-bound": "^1.0.3", "has-tostringtag": "^1.0.2" } }, "sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw=="], + "is-plain-obj": ["is-plain-obj@4.1.0", "", {}, "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg=="], + "is-regex": ["is-regex@1.2.1", "", { "dependencies": { "call-bound": "^1.0.2", "gopd": "^1.2.0", "has-tostringtag": "^1.0.2", "hasown": "^2.0.2" } }, "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g=="], "is-set": ["is-set@2.0.3", "", {}, "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg=="], @@ -781,6 +845,8 @@ "jsx-ast-utils": ["jsx-ast-utils@3.3.5", "", { "dependencies": { "array-includes": "^3.1.6", "array.prototype.flat": "^1.3.1", "object.assign": "^4.1.4", "object.values": "^1.1.6" } }, "sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ=="], + "katex": ["katex@0.16.21", "", { "dependencies": { "commander": "^8.3.0" }, "bin": { "katex": "cli.js" } }, "sha512-XvqR7FgOHtWupfMiigNzmh+MgUVmDGU2kXZm899ZkPfcuoPuFxyHmXsgATDpFZDAXCI8tvinaVcDo8PIIJSo4A=="], + "keyv": ["keyv@4.5.4", "", { "dependencies": { "json-buffer": "3.0.1" } }, "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw=="], "levn": ["levn@0.4.1", "", { "dependencies": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" } }, "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ=="], @@ -813,16 +879,110 @@ "lodash.merge": ["lodash.merge@4.6.2", "", {}, "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ=="], + "longest-streak": ["longest-streak@3.1.0", "", {}, "sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g=="], + "loose-envify": ["loose-envify@1.4.0", "", { "dependencies": { "js-tokens": "^3.0.0 || ^4.0.0" }, "bin": { "loose-envify": "cli.js" } }, "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q=="], "lucide-react": ["lucide-react@0.475.0", "", { "peerDependencies": { "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-NJzvVu1HwFVeZ+Gwq2q00KygM1aBhy/ZrhY9FsAgJtpB+E4R7uxRk9M2iKvHa6/vNxZydIB59htha4c2vvwvVg=="], + "markdown-table": ["markdown-table@3.0.4", "", {}, "sha512-wiYz4+JrLyb/DqW2hkFJxP7Vd7JuTDm77fvbM8VfEQdmSMqcImWeeRbHwZjBjIFki/VaMK2BhFi7oUUZeM5bqw=="], + "math-intrinsics": ["math-intrinsics@1.1.0", "", {}, "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g=="], + "mdast-util-find-and-replace": ["mdast-util-find-and-replace@3.0.2", "", { "dependencies": { "@types/mdast": "^4.0.0", "escape-string-regexp": "^5.0.0", "unist-util-is": "^6.0.0", "unist-util-visit-parents": "^6.0.0" } }, "sha512-Tmd1Vg/m3Xz43afeNxDIhWRtFZgM2VLyaf4vSTYwudTyeuTneoL3qtWMA5jeLyz/O1vDJmmV4QuScFCA2tBPwg=="], + + "mdast-util-from-markdown": ["mdast-util-from-markdown@2.0.2", "", { "dependencies": { "@types/mdast": "^4.0.0", "@types/unist": "^3.0.0", "decode-named-character-reference": "^1.0.0", "devlop": "^1.0.0", "mdast-util-to-string": "^4.0.0", "micromark": "^4.0.0", "micromark-util-decode-numeric-character-reference": "^2.0.0", "micromark-util-decode-string": "^2.0.0", "micromark-util-normalize-identifier": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0", "unist-util-stringify-position": "^4.0.0" } }, "sha512-uZhTV/8NBuw0WHkPTrCqDOl0zVe1BIng5ZtHoDk49ME1qqcjYmmLmOf0gELgcRMxN4w2iuIeVso5/6QymSrgmA=="], + + "mdast-util-gfm": ["mdast-util-gfm@3.1.0", "", { "dependencies": { "mdast-util-from-markdown": "^2.0.0", "mdast-util-gfm-autolink-literal": "^2.0.0", "mdast-util-gfm-footnote": "^2.0.0", "mdast-util-gfm-strikethrough": "^2.0.0", "mdast-util-gfm-table": "^2.0.0", "mdast-util-gfm-task-list-item": "^2.0.0", "mdast-util-to-markdown": "^2.0.0" } }, "sha512-0ulfdQOM3ysHhCJ1p06l0b0VKlhU0wuQs3thxZQagjcjPrlFRqY215uZGHHJan9GEAXd9MbfPjFJz+qMkVR6zQ=="], + + "mdast-util-gfm-autolink-literal": ["mdast-util-gfm-autolink-literal@2.0.1", "", { "dependencies": { "@types/mdast": "^4.0.0", "ccount": "^2.0.0", "devlop": "^1.0.0", "mdast-util-find-and-replace": "^3.0.0", "micromark-util-character": "^2.0.0" } }, "sha512-5HVP2MKaP6L+G6YaxPNjuL0BPrq9orG3TsrZ9YXbA3vDw/ACI4MEsnoDpn6ZNm7GnZgtAcONJyPhOP8tNJQavQ=="], + + "mdast-util-gfm-footnote": ["mdast-util-gfm-footnote@2.1.0", "", { "dependencies": { "@types/mdast": "^4.0.0", "devlop": "^1.1.0", "mdast-util-from-markdown": "^2.0.0", "mdast-util-to-markdown": "^2.0.0", "micromark-util-normalize-identifier": "^2.0.0" } }, "sha512-sqpDWlsHn7Ac9GNZQMeUzPQSMzR6Wv0WKRNvQRg0KqHh02fpTz69Qc1QSseNX29bhz1ROIyNyxExfawVKTm1GQ=="], + + "mdast-util-gfm-strikethrough": ["mdast-util-gfm-strikethrough@2.0.0", "", { "dependencies": { "@types/mdast": "^4.0.0", "mdast-util-from-markdown": "^2.0.0", "mdast-util-to-markdown": "^2.0.0" } }, "sha512-mKKb915TF+OC5ptj5bJ7WFRPdYtuHv0yTRxK2tJvi+BDqbkiG7h7u/9SI89nRAYcmap2xHQL9D+QG/6wSrTtXg=="], + + "mdast-util-gfm-table": ["mdast-util-gfm-table@2.0.0", "", { "dependencies": { "@types/mdast": "^4.0.0", "devlop": "^1.0.0", "markdown-table": "^3.0.0", "mdast-util-from-markdown": "^2.0.0", "mdast-util-to-markdown": "^2.0.0" } }, "sha512-78UEvebzz/rJIxLvE7ZtDd/vIQ0RHv+3Mh5DR96p7cS7HsBhYIICDBCu8csTNWNO6tBWfqXPWekRuj2FNOGOZg=="], + + "mdast-util-gfm-task-list-item": ["mdast-util-gfm-task-list-item@2.0.0", "", { "dependencies": { "@types/mdast": "^4.0.0", "devlop": "^1.0.0", "mdast-util-from-markdown": "^2.0.0", "mdast-util-to-markdown": "^2.0.0" } }, "sha512-IrtvNvjxC1o06taBAVJznEnkiHxLFTzgonUdy8hzFVeDun0uTjxxrRGVaNFqkU1wJR3RBPEfsxmU6jDWPofrTQ=="], + + "mdast-util-math": ["mdast-util-math@3.0.0", "", { "dependencies": { "@types/hast": "^3.0.0", "@types/mdast": "^4.0.0", "devlop": "^1.0.0", "longest-streak": "^3.0.0", "mdast-util-from-markdown": "^2.0.0", "mdast-util-to-markdown": "^2.1.0", "unist-util-remove-position": "^5.0.0" } }, "sha512-Tl9GBNeG/AhJnQM221bJR2HPvLOSnLE/T9cJI9tlc6zwQk2nPk/4f0cHkOdEixQPC/j8UtKDdITswvLAy1OZ1w=="], + + "mdast-util-mdx-expression": ["mdast-util-mdx-expression@2.0.1", "", { "dependencies": { "@types/estree-jsx": "^1.0.0", "@types/hast": "^3.0.0", "@types/mdast": "^4.0.0", "devlop": "^1.0.0", "mdast-util-from-markdown": "^2.0.0", "mdast-util-to-markdown": "^2.0.0" } }, "sha512-J6f+9hUp+ldTZqKRSg7Vw5V6MqjATc+3E4gf3CFNcuZNWD8XdyI6zQ8GqH7f8169MM6P7hMBRDVGnn7oHB9kXQ=="], + + "mdast-util-mdx-jsx": ["mdast-util-mdx-jsx@3.2.0", "", { "dependencies": { "@types/estree-jsx": "^1.0.0", "@types/hast": "^3.0.0", "@types/mdast": "^4.0.0", "@types/unist": "^3.0.0", "ccount": "^2.0.0", "devlop": "^1.1.0", "mdast-util-from-markdown": "^2.0.0", "mdast-util-to-markdown": "^2.0.0", "parse-entities": "^4.0.0", "stringify-entities": "^4.0.0", "unist-util-stringify-position": "^4.0.0", "vfile-message": "^4.0.0" } }, "sha512-lj/z8v0r6ZtsN/cGNNtemmmfoLAFZnjMbNyLzBafjzikOM+glrjNHPlf6lQDOTccj9n5b0PPihEBbhneMyGs1Q=="], + + "mdast-util-mdxjs-esm": ["mdast-util-mdxjs-esm@2.0.1", "", { "dependencies": { "@types/estree-jsx": "^1.0.0", "@types/hast": "^3.0.0", "@types/mdast": "^4.0.0", "devlop": "^1.0.0", "mdast-util-from-markdown": "^2.0.0", "mdast-util-to-markdown": "^2.0.0" } }, "sha512-EcmOpxsZ96CvlP03NghtH1EsLtr0n9Tm4lPUJUBccV9RwUOneqSycg19n5HGzCf+10LozMRSObtVr3ee1WoHtg=="], + + "mdast-util-phrasing": ["mdast-util-phrasing@4.1.0", "", { "dependencies": { "@types/mdast": "^4.0.0", "unist-util-is": "^6.0.0" } }, "sha512-TqICwyvJJpBwvGAMZjj4J2n0X8QWp21b9l0o7eXyVJ25YNWYbJDVIyD1bZXE6WtV6RmKJVYmQAKWa0zWOABz2w=="], + + "mdast-util-to-hast": ["mdast-util-to-hast@13.2.0", "", { "dependencies": { "@types/hast": "^3.0.0", "@types/mdast": "^4.0.0", "@ungap/structured-clone": "^1.0.0", "devlop": "^1.0.0", "micromark-util-sanitize-uri": "^2.0.0", "trim-lines": "^3.0.0", "unist-util-position": "^5.0.0", "unist-util-visit": "^5.0.0", "vfile": "^6.0.0" } }, "sha512-QGYKEuUsYT9ykKBCMOEDLsU5JRObWQusAolFMeko/tYPufNkRffBAQjIE+99jbA87xv6FgmjLtwjh9wBWajwAA=="], + + "mdast-util-to-markdown": ["mdast-util-to-markdown@2.1.2", "", { "dependencies": { "@types/mdast": "^4.0.0", "@types/unist": "^3.0.0", "longest-streak": "^3.0.0", "mdast-util-phrasing": "^4.0.0", "mdast-util-to-string": "^4.0.0", "micromark-util-classify-character": "^2.0.0", "micromark-util-decode-string": "^2.0.0", "unist-util-visit": "^5.0.0", "zwitch": "^2.0.0" } }, "sha512-xj68wMTvGXVOKonmog6LwyJKrYXZPvlwabaryTjLh9LuvovB/KAH+kvi8Gjj+7rJjsFi23nkUxRQv1KqSroMqA=="], + + "mdast-util-to-string": ["mdast-util-to-string@4.0.0", "", { "dependencies": { "@types/mdast": "^4.0.0" } }, "sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg=="], + "memoize-one": ["memoize-one@6.0.0", "", {}, "sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw=="], "merge2": ["merge2@1.4.1", "", {}, "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg=="], + "micromark": ["micromark@4.0.1", "", { "dependencies": { "@types/debug": "^4.0.0", "debug": "^4.0.0", "decode-named-character-reference": "^1.0.0", "devlop": "^1.0.0", "micromark-core-commonmark": "^2.0.0", "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-chunked": "^2.0.0", "micromark-util-combine-extensions": "^2.0.0", "micromark-util-decode-numeric-character-reference": "^2.0.0", "micromark-util-encode": "^2.0.0", "micromark-util-normalize-identifier": "^2.0.0", "micromark-util-resolve-all": "^2.0.0", "micromark-util-sanitize-uri": "^2.0.0", "micromark-util-subtokenize": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-eBPdkcoCNvYcxQOAKAlceo5SNdzZWfF+FcSupREAzdAh9rRmE239CEQAiTwIgblwnoM8zzj35sZ5ZwvSEOF6Kw=="], + + "micromark-core-commonmark": ["micromark-core-commonmark@2.0.2", "", { "dependencies": { "decode-named-character-reference": "^1.0.0", "devlop": "^1.0.0", "micromark-factory-destination": "^2.0.0", "micromark-factory-label": "^2.0.0", "micromark-factory-space": "^2.0.0", "micromark-factory-title": "^2.0.0", "micromark-factory-whitespace": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-chunked": "^2.0.0", "micromark-util-classify-character": "^2.0.0", "micromark-util-html-tag-name": "^2.0.0", "micromark-util-normalize-identifier": "^2.0.0", "micromark-util-resolve-all": "^2.0.0", "micromark-util-subtokenize": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-FKjQKbxd1cibWMM1P9N+H8TwlgGgSkWZMmfuVucLCHaYqeSvJ0hFeHsIa65pA2nYbes0f8LDHPMrd9X7Ujxg9w=="], + + "micromark-extension-gfm": ["micromark-extension-gfm@3.0.0", "", { "dependencies": { "micromark-extension-gfm-autolink-literal": "^2.0.0", "micromark-extension-gfm-footnote": "^2.0.0", "micromark-extension-gfm-strikethrough": "^2.0.0", "micromark-extension-gfm-table": "^2.0.0", "micromark-extension-gfm-tagfilter": "^2.0.0", "micromark-extension-gfm-task-list-item": "^2.0.0", "micromark-util-combine-extensions": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-vsKArQsicm7t0z2GugkCKtZehqUm31oeGBV/KVSorWSy8ZlNAv7ytjFhvaryUiCUJYqs+NoE6AFhpQvBTM6Q4w=="], + + "micromark-extension-gfm-autolink-literal": ["micromark-extension-gfm-autolink-literal@2.1.0", "", { "dependencies": { "micromark-util-character": "^2.0.0", "micromark-util-sanitize-uri": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-oOg7knzhicgQ3t4QCjCWgTmfNhvQbDDnJeVu9v81r7NltNCVmhPy1fJRX27pISafdjL+SVc4d3l48Gb6pbRypw=="], + + "micromark-extension-gfm-footnote": ["micromark-extension-gfm-footnote@2.1.0", "", { "dependencies": { "devlop": "^1.0.0", "micromark-core-commonmark": "^2.0.0", "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-normalize-identifier": "^2.0.0", "micromark-util-sanitize-uri": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-/yPhxI1ntnDNsiHtzLKYnE3vf9JZ6cAisqVDauhp4CEHxlb4uoOTxOCJ+9s51bIB8U1N1FJ1RXOKTIlD5B/gqw=="], + + "micromark-extension-gfm-strikethrough": ["micromark-extension-gfm-strikethrough@2.1.0", "", { "dependencies": { "devlop": "^1.0.0", "micromark-util-chunked": "^2.0.0", "micromark-util-classify-character": "^2.0.0", "micromark-util-resolve-all": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-ADVjpOOkjz1hhkZLlBiYA9cR2Anf8F4HqZUO6e5eDcPQd0Txw5fxLzzxnEkSkfnD0wziSGiv7sYhk/ktvbf1uw=="], + + "micromark-extension-gfm-table": ["micromark-extension-gfm-table@2.1.1", "", { "dependencies": { "devlop": "^1.0.0", "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-t2OU/dXXioARrC6yWfJ4hqB7rct14e8f7m0cbI5hUmDyyIlwv5vEtooptH8INkbLzOatzKuVbQmAYcbWoyz6Dg=="], + + "micromark-extension-gfm-tagfilter": ["micromark-extension-gfm-tagfilter@2.0.0", "", { "dependencies": { "micromark-util-types": "^2.0.0" } }, "sha512-xHlTOmuCSotIA8TW1mDIM6X2O1SiX5P9IuDtqGonFhEK0qgRI4yeC6vMxEV2dgyr2TiD+2PQ10o+cOhdVAcwfg=="], + + "micromark-extension-gfm-task-list-item": ["micromark-extension-gfm-task-list-item@2.1.0", "", { "dependencies": { "devlop": "^1.0.0", "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-qIBZhqxqI6fjLDYFTBIa4eivDMnP+OZqsNwmQ3xNLE4Cxwc+zfQEfbs6tzAo2Hjq+bh6q5F+Z8/cksrLFYWQQw=="], + + "micromark-extension-math": ["micromark-extension-math@3.1.0", "", { "dependencies": { "@types/katex": "^0.16.0", "devlop": "^1.0.0", "katex": "^0.16.0", "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-lvEqd+fHjATVs+2v/8kg9i5Q0AP2k85H0WUOwpIVvUML8BapsMvh1XAogmQjOCsLpoKRCVQqEkQBB3NhVBcsOg=="], + + "micromark-factory-destination": ["micromark-factory-destination@2.0.1", "", { "dependencies": { "micromark-util-character": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-Xe6rDdJlkmbFRExpTOmRj9N3MaWmbAgdpSrBQvCFqhezUn4AHqJHbaEnfbVYYiexVSs//tqOdY/DxhjdCiJnIA=="], + + "micromark-factory-label": ["micromark-factory-label@2.0.1", "", { "dependencies": { "devlop": "^1.0.0", "micromark-util-character": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-VFMekyQExqIW7xIChcXn4ok29YE3rnuyveW3wZQWWqF4Nv9Wk5rgJ99KzPvHjkmPXF93FXIbBp6YdW3t71/7Vg=="], + + "micromark-factory-space": ["micromark-factory-space@2.0.1", "", { "dependencies": { "micromark-util-character": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-zRkxjtBxxLd2Sc0d+fbnEunsTj46SWXgXciZmHq0kDYGnck/ZSGj9/wULTV95uoeYiK5hRXP2mJ98Uo4cq/LQg=="], + + "micromark-factory-title": ["micromark-factory-title@2.0.1", "", { "dependencies": { "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-5bZ+3CjhAd9eChYTHsjy6TGxpOFSKgKKJPJxr293jTbfry2KDoWkhBb6TcPVB4NmzaPhMs1Frm9AZH7OD4Cjzw=="], + + "micromark-factory-whitespace": ["micromark-factory-whitespace@2.0.1", "", { "dependencies": { "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-Ob0nuZ3PKt/n0hORHyvoD9uZhr+Za8sFoP+OnMcnWK5lngSzALgQYKMr9RJVOWLqQYuyn6ulqGWSXdwf6F80lQ=="], + + "micromark-util-character": ["micromark-util-character@2.1.1", "", { "dependencies": { "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q=="], + + "micromark-util-chunked": ["micromark-util-chunked@2.0.1", "", { "dependencies": { "micromark-util-symbol": "^2.0.0" } }, "sha512-QUNFEOPELfmvv+4xiNg2sRYeS/P84pTW0TCgP5zc9FpXetHY0ab7SxKyAQCNCc1eK0459uoLI1y5oO5Vc1dbhA=="], + + "micromark-util-classify-character": ["micromark-util-classify-character@2.0.1", "", { "dependencies": { "micromark-util-character": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-K0kHzM6afW/MbeWYWLjoHQv1sgg2Q9EccHEDzSkxiP/EaagNzCm7T/WMKZ3rjMbvIpvBiZgwR3dKMygtA4mG1Q=="], + + "micromark-util-combine-extensions": ["micromark-util-combine-extensions@2.0.1", "", { "dependencies": { "micromark-util-chunked": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-OnAnH8Ujmy59JcyZw8JSbK9cGpdVY44NKgSM7E9Eh7DiLS2E9RNQf0dONaGDzEG9yjEl5hcqeIsj4hfRkLH/Bg=="], + + "micromark-util-decode-numeric-character-reference": ["micromark-util-decode-numeric-character-reference@2.0.2", "", { "dependencies": { "micromark-util-symbol": "^2.0.0" } }, "sha512-ccUbYk6CwVdkmCQMyr64dXz42EfHGkPQlBj5p7YVGzq8I7CtjXZJrubAYezf7Rp+bjPseiROqe7G6foFd+lEuw=="], + + "micromark-util-decode-string": ["micromark-util-decode-string@2.0.1", "", { "dependencies": { "decode-named-character-reference": "^1.0.0", "micromark-util-character": "^2.0.0", "micromark-util-decode-numeric-character-reference": "^2.0.0", "micromark-util-symbol": "^2.0.0" } }, "sha512-nDV/77Fj6eH1ynwscYTOsbK7rR//Uj0bZXBwJZRfaLEJ1iGBR6kIfNmlNqaqJf649EP0F3NWNdeJi03elllNUQ=="], + + "micromark-util-encode": ["micromark-util-encode@2.0.1", "", {}, "sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw=="], + + "micromark-util-html-tag-name": ["micromark-util-html-tag-name@2.0.1", "", {}, "sha512-2cNEiYDhCWKI+Gs9T0Tiysk136SnR13hhO8yW6BGNyhOC4qYFnwF1nKfD3HFAIXA5c45RrIG1ub11GiXeYd1xA=="], + + "micromark-util-normalize-identifier": ["micromark-util-normalize-identifier@2.0.1", "", { "dependencies": { "micromark-util-symbol": "^2.0.0" } }, "sha512-sxPqmo70LyARJs0w2UclACPUUEqltCkJ6PhKdMIDuJ3gSf/Q+/GIe3WKl0Ijb/GyH9lOpUkRAO2wp0GVkLvS9Q=="], + + "micromark-util-resolve-all": ["micromark-util-resolve-all@2.0.1", "", { "dependencies": { "micromark-util-types": "^2.0.0" } }, "sha512-VdQyxFWFT2/FGJgwQnJYbe1jjQoNTS4RjglmSjTUlpUMa95Htx9NHeYW4rGDJzbjvCsl9eLjMQwGeElsqmzcHg=="], + + "micromark-util-sanitize-uri": ["micromark-util-sanitize-uri@2.0.1", "", { "dependencies": { "micromark-util-character": "^2.0.0", "micromark-util-encode": "^2.0.0", "micromark-util-symbol": "^2.0.0" } }, "sha512-9N9IomZ/YuGGZZmQec1MbgxtlgougxTodVwDzzEouPKo3qFWvymFHWcnDi2vzV1ff6kas9ucW+o3yzJK9YB1AQ=="], + + "micromark-util-subtokenize": ["micromark-util-subtokenize@2.0.4", "", { "dependencies": { "devlop": "^1.0.0", "micromark-util-chunked": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-N6hXjrin2GTJDe3MVjf5FuXpm12PGm80BrUAeub9XFXca8JZbP+oIwY4LJSVwFUCL1IPm/WwSVUN7goFHmSGGQ=="], + + "micromark-util-symbol": ["micromark-util-symbol@2.0.1", "", {}, "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q=="], + + "micromark-util-types": ["micromark-util-types@2.0.1", "", {}, "sha512-534m2WhVTddrcKVepwmVEVnUAmtrx9bfIjNoQHRqfnvdaHQiFytEhJoTgpWJvDEXCO5gLTQh3wYC1PgOJA4NSQ=="], + "micromatch": ["micromatch@4.0.8", "", { "dependencies": { "braces": "^3.0.3", "picomatch": "^2.3.1" } }, "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA=="], "mime-db": ["mime-db@1.52.0", "", {}, "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg=="], @@ -869,6 +1029,8 @@ "parent-module": ["parent-module@1.0.1", "", { "dependencies": { "callsites": "^3.0.0" } }, "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g=="], + "parse-entities": ["parse-entities@4.0.2", "", { "dependencies": { "@types/unist": "^2.0.0", "character-entities-legacy": "^3.0.0", "character-reference-invalid": "^2.0.0", "decode-named-character-reference": "^1.0.0", "is-alphanumerical": "^2.0.0", "is-decimal": "^2.0.0", "is-hexadecimal": "^2.0.0" } }, "sha512-GG2AQYWoLgL877gQIKeRPGO1xF9+eG1ujIb5soS5gPvLQ1y2o8FL90w2QWNdf9I361Mpp7726c+lj3U0qK1uGw=="], + "parse-json": ["parse-json@5.2.0", "", { "dependencies": { "@babel/code-frame": "^7.0.0", "error-ex": "^1.3.1", "json-parse-even-better-errors": "^2.3.0", "lines-and-columns": "^1.1.6" } }, "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg=="], "path-exists": ["path-exists@4.0.0", "", {}, "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w=="], @@ -897,6 +1059,8 @@ "prop-types": ["prop-types@15.8.1", "", { "dependencies": { "loose-envify": "^1.4.0", "object-assign": "^4.1.1", "react-is": "^16.13.1" } }, "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg=="], + "property-information": ["property-information@6.5.0", "", {}, "sha512-PgTgs/BlvHxOu8QuEN7wi5A0OmXaBcHpmCSTehcs6Uuu9IkDIEo13Hy7n898RHfrQ49vKCoGeWZSaAK01nwVig=="], + "proxy-from-env": ["proxy-from-env@1.1.0", "", {}, "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="], "punycode": ["punycode@2.3.1", "", {}, "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg=="], @@ -911,6 +1075,8 @@ "react-is": ["react-is@16.13.1", "", {}, "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="], + "react-markdown": ["react-markdown@9.0.3", "", { "dependencies": { "@types/hast": "^3.0.0", "devlop": "^1.0.0", "hast-util-to-jsx-runtime": "^2.0.0", "html-url-attributes": "^3.0.0", "mdast-util-to-hast": "^13.0.0", "remark-parse": "^11.0.0", "remark-rehype": "^11.0.0", "unified": "^11.0.0", "unist-util-visit": "^5.0.0", "vfile": "^6.0.0" }, "peerDependencies": { "@types/react": ">=18", "react": ">=18" } }, "sha512-Yk7Z94dbgYTOrdk41Z74GoKA7rThnsbbqBTRYuxoe08qvfQ9tJVhmAKw6BJS/ZORG7kTy/s1QvYzSuaoBA1qfw=="], + "react-number-format": ["react-number-format@5.4.3", "", { "peerDependencies": { "react": "^0.14 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "react-dom": "^0.14 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-VCY5hFg/soBighAoGcdE+GagkJq0230qN6jcS5sp8wQX1qy1fYN/RX7/BXkrs0oyzzwqR8/+eSUrqXbGeywdUQ=="], "react-remove-scroll": ["react-remove-scroll@2.6.3", "", { "dependencies": { "react-remove-scroll-bar": "^2.3.7", "react-style-singleton": "^2.2.3", "tslib": "^2.1.0", "use-callback-ref": "^1.3.3", "use-sidecar": "^1.1.3" }, "peerDependencies": { "@types/react": "*", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-pnAi91oOk8g8ABQKGF5/M9qxmmOPxaAnopyTHYfqYEwJhyFrbbBtHuSgtKEoH0jpcxx5o3hXqH1mNd9/Oi+8iQ=="], @@ -929,6 +1095,18 @@ "regexp.prototype.flags": ["regexp.prototype.flags@1.5.4", "", { "dependencies": { "call-bind": "^1.0.8", "define-properties": "^1.2.1", "es-errors": "^1.3.0", "get-proto": "^1.0.1", "gopd": "^1.2.0", "set-function-name": "^2.0.2" } }, "sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA=="], + "rehype-react": ["rehype-react@8.0.0", "", { "dependencies": { "@types/hast": "^3.0.0", "hast-util-to-jsx-runtime": "^2.0.0", "unified": "^11.0.0" } }, "sha512-vzo0YxYbB2HE+36+9HWXVdxNoNDubx63r5LBzpxBGVWM8s9mdnMdbmuJBAX6TTyuGdZjZix6qU3GcSuKCIWivw=="], + + "remark-gfm": ["remark-gfm@4.0.1", "", { "dependencies": { "@types/mdast": "^4.0.0", "mdast-util-gfm": "^3.0.0", "micromark-extension-gfm": "^3.0.0", "remark-parse": "^11.0.0", "remark-stringify": "^11.0.0", "unified": "^11.0.0" } }, "sha512-1quofZ2RQ9EWdeN34S79+KExV1764+wCUGop5CPL1WGdD0ocPpu91lzPGbwWMECpEpd42kJGQwzRfyov9j4yNg=="], + + "remark-math": ["remark-math@6.0.0", "", { "dependencies": { "@types/mdast": "^4.0.0", "mdast-util-math": "^3.0.0", "micromark-extension-math": "^3.0.0", "unified": "^11.0.0" } }, "sha512-MMqgnP74Igy+S3WwnhQ7kqGlEerTETXMvJhrUzDikVZ2/uogJCb+WHUg97hK9/jcfc0dkD73s3LN8zU49cTEtA=="], + + "remark-parse": ["remark-parse@11.0.0", "", { "dependencies": { "@types/mdast": "^4.0.0", "mdast-util-from-markdown": "^2.0.0", "micromark-util-types": "^2.0.0", "unified": "^11.0.0" } }, "sha512-FCxlKLNGknS5ba/1lmpYijMUzX2esxW5xQqjWxw2eHFfS2MSdaHVINFmhjo+qN1WhZhNimq0dZATN9pH0IDrpA=="], + + "remark-rehype": ["remark-rehype@11.1.1", "", { "dependencies": { "@types/hast": "^3.0.0", "@types/mdast": "^4.0.0", "mdast-util-to-hast": "^13.0.0", "unified": "^11.0.0", "vfile": "^6.0.0" } }, "sha512-g/osARvjkBXb6Wo0XvAeXQohVta8i84ACbenPpoSsxTOQH/Ae0/RGP4WZgnMH5pMLpsj4FG7OHmcIcXxpza8eQ=="], + + "remark-stringify": ["remark-stringify@11.0.0", "", { "dependencies": { "@types/mdast": "^4.0.0", "mdast-util-to-markdown": "^2.0.0", "unified": "^11.0.0" } }, "sha512-1OSmLd3awB/t8qdoEOMazZkNsfVTeY4fTsgzcQFdXNq8ToTN4ZGwrMnlda4K6smTFKD+GRV6O48i6Z4iKgPPpw=="], + "resolve": ["resolve@2.0.0-next.5", "", { "dependencies": { "is-core-module": "^2.13.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, "bin": { "resolve": "bin/resolve" } }, "sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA=="], "resolve-from": ["resolve-from@4.0.0", "", {}, "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g=="], @@ -977,6 +1155,8 @@ "source-map-js": ["source-map-js@1.2.1", "", {}, "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA=="], + "space-separated-tokens": ["space-separated-tokens@2.0.2", "", {}, "sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q=="], + "string.prototype.matchall": ["string.prototype.matchall@4.0.12", "", { "dependencies": { "call-bind": "^1.0.8", "call-bound": "^1.0.3", "define-properties": "^1.2.1", "es-abstract": "^1.23.6", "es-errors": "^1.3.0", "es-object-atoms": "^1.0.0", "get-intrinsic": "^1.2.6", "gopd": "^1.2.0", "has-symbols": "^1.1.0", "internal-slot": "^1.1.0", "regexp.prototype.flags": "^1.5.3", "set-function-name": "^2.0.2", "side-channel": "^1.1.0" } }, "sha512-6CC9uyBL+/48dYizRf7H7VAYCMCNTBeM78x/VTUe9bFEaxBepPJDa1Ow99LqI/1yF7kuy7Q3cQsYMrcjGUcskA=="], "string.prototype.repeat": ["string.prototype.repeat@1.0.0", "", { "dependencies": { "define-properties": "^1.1.3", "es-abstract": "^1.17.5" } }, "sha512-0u/TldDbKD8bFCQ/4f5+mNRrXwZ8hg2w7ZR8wa16e8z9XpePWl3eGEcUD0OXpEH/VJH/2G3gjUtR3ZOiBe2S/w=="], @@ -987,8 +1167,12 @@ "string.prototype.trimstart": ["string.prototype.trimstart@1.0.8", "", { "dependencies": { "call-bind": "^1.0.7", "define-properties": "^1.2.1", "es-object-atoms": "^1.0.0" } }, "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg=="], + "stringify-entities": ["stringify-entities@4.0.4", "", { "dependencies": { "character-entities-html4": "^2.0.0", "character-entities-legacy": "^3.0.0" } }, "sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg=="], + "strip-json-comments": ["strip-json-comments@3.1.1", "", {}, "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig=="], + "style-to-object": ["style-to-object@1.0.8", "", { "dependencies": { "inline-style-parser": "0.2.4" } }, "sha512-xT47I/Eo0rwJmaXC4oilDGDWLohVhR6o/xAQcPQN8q6QBuZVL8qMYL85kLmST5cPjAorwvqIA4qXTRQoYHaL6g=="], + "stylis": ["stylis@4.2.0", "", {}, "sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw=="], "supports-color": ["supports-color@7.2.0", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="], @@ -1007,6 +1191,10 @@ "to-regex-range": ["to-regex-range@5.0.1", "", { "dependencies": { "is-number": "^7.0.0" } }, "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ=="], + "trim-lines": ["trim-lines@3.0.1", "", {}, "sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg=="], + + "trough": ["trough@2.2.0", "", {}, "sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw=="], + "ts-api-utils": ["ts-api-utils@2.0.1", "", { "peerDependencies": { "typescript": ">=4.8.4" } }, "sha512-dnlgjFSVetynI8nzgJ+qF62efpglpWRk8isUEWZGWlJYySCTD6aKvbUDu+zbPeDakk3bg5H4XpitHukgfL1m9w=="], "tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], @@ -1029,6 +1217,20 @@ "undici-types": ["undici-types@6.20.0", "", {}, "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg=="], + "unified": ["unified@11.0.5", "", { "dependencies": { "@types/unist": "^3.0.0", "bail": "^2.0.0", "devlop": "^1.0.0", "extend": "^3.0.0", "is-plain-obj": "^4.0.0", "trough": "^2.0.0", "vfile": "^6.0.0" } }, "sha512-xKvGhPWw3k84Qjh8bI3ZeJjqnyadK+GEFtazSfZv/rKeTkTjOJho6mFqh2SM96iIcZokxiOpg78GazTSg8+KHA=="], + + "unist-util-is": ["unist-util-is@6.0.0", "", { "dependencies": { "@types/unist": "^3.0.0" } }, "sha512-2qCTHimwdxLfz+YzdGfkqNlH0tLi9xjTnHddPmJwtIG9MGsdbutfTc4P+haPD7l7Cjxf/WZj+we5qfVPvvxfYw=="], + + "unist-util-position": ["unist-util-position@5.0.0", "", { "dependencies": { "@types/unist": "^3.0.0" } }, "sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA=="], + + "unist-util-remove-position": ["unist-util-remove-position@5.0.0", "", { "dependencies": { "@types/unist": "^3.0.0", "unist-util-visit": "^5.0.0" } }, "sha512-Hp5Kh3wLxv0PHj9m2yZhhLt58KzPtEYKQQ4yxfYFEO7EvHwzyDYnduhHnY1mDxoqr7VUwVuHXk9RXKIiYS1N8Q=="], + + "unist-util-stringify-position": ["unist-util-stringify-position@4.0.0", "", { "dependencies": { "@types/unist": "^3.0.0" } }, "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ=="], + + "unist-util-visit": ["unist-util-visit@5.0.0", "", { "dependencies": { "@types/unist": "^3.0.0", "unist-util-is": "^6.0.0", "unist-util-visit-parents": "^6.0.0" } }, "sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg=="], + + "unist-util-visit-parents": ["unist-util-visit-parents@6.0.1", "", { "dependencies": { "@types/unist": "^3.0.0", "unist-util-is": "^6.0.0" } }, "sha512-L/PqWzfTP9lzzEa6CKs0k2nARxTdZduw3zyh8d2NVBnsyvHjSX4TWse388YrrQKbvI8w20fGjGlhgT96WwKykw=="], + "uri-js": ["uri-js@4.4.1", "", { "dependencies": { "punycode": "^2.1.0" } }, "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg=="], "use-callback-ref": ["use-callback-ref@1.3.3", "", { "dependencies": { "tslib": "^2.0.0" }, "peerDependencies": { "@types/react": "*", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-jQL3lRnocaFtu3V00JToYz/4QkNWswxijDaCVNZRiRTO3HQDLsdu1ZtmIUvV4yPp+rvWm5j0y0TG/S61cuijTg=="], @@ -1039,6 +1241,10 @@ "use-sync-external-store": ["use-sync-external-store@1.4.0", "", { "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-9WXSPC5fMv61vaupRkCKCxsPxBocVnwakBEkMIHHpkTTg6icbJtg6jzgtLDm4bl3cSHAca52rYWih0k4K3PfHw=="], + "vfile": ["vfile@6.0.3", "", { "dependencies": { "@types/unist": "^3.0.0", "vfile-message": "^4.0.0" } }, "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q=="], + + "vfile-message": ["vfile-message@4.0.2", "", { "dependencies": { "@types/unist": "^3.0.0", "unist-util-stringify-position": "^4.0.0" } }, "sha512-jRDZ1IMLttGj41KcZvlrYAaI3CfqpLpfpf+Mfig13viT6NKvRzWZ+lXz0Y5D60w6uJIBAOGq9mSHf0gktF0duw=="], + "vite": ["vite@6.1.0", "", { "dependencies": { "esbuild": "^0.24.2", "postcss": "^8.5.1", "rollup": "^4.30.1" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", "jiti": ">=1.21.0", "less": "*", "lightningcss": "^1.21.0", "sass": "*", "sass-embedded": "*", "stylus": "*", "sugarss": "*", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "jiti", "less", "lightningcss", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-RjjMipCKVoR4hVfPY6GQTgveinjNuyLw+qruksLDvA5ktI1150VmcMBKmQaEWJhg/j6Uaf6dNCNA0AfdzUb/hQ=="], "which": ["which@2.0.2", "", { "dependencies": { "isexe": "^2.0.0" }, "bin": { "node-which": "./bin/node-which" } }, "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA=="], @@ -1059,6 +1265,8 @@ "zustand": ["zustand@5.0.3", "", { "peerDependencies": { "@types/react": ">=18.0.0", "immer": ">=9.0.6", "react": ">=18.0.0", "use-sync-external-store": ">=1.2.0" }, "optionalPeers": ["@types/react", "immer", "react", "use-sync-external-store"] }, "sha512-14fwWQtU3pH4dE0dOpdMiWjddcH+QzKIgk1cl8epwSE7yag43k/AD/m4L6+K7DytAOr9gGBe3/EXj9g7cdostg=="], + "zwitch": ["zwitch@2.0.4", "", {}, "sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A=="], + "@babel/traverse/globals": ["globals@11.12.0", "", {}, "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA=="], "@eslint-community/eslint-utils/eslint-visitor-keys": ["eslint-visitor-keys@3.4.3", "", {}, "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag=="], @@ -1081,6 +1289,10 @@ "fast-glob/glob-parent": ["glob-parent@5.1.2", "", { "dependencies": { "is-glob": "^4.0.1" } }, "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow=="], + "mdast-util-find-and-replace/escape-string-regexp": ["escape-string-regexp@5.0.0", "", {}, "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw=="], + + "parse-entities/@types/unist": ["@types/unist@2.0.11", "", {}, "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA=="], + "@typescript-eslint/typescript-estree/minimatch/brace-expansion": ["brace-expansion@2.0.1", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA=="], } } diff --git a/lightrag_webui/package.json b/lightrag_webui/package.json index 26991d9c..7181347f 100644 --- a/lightrag_webui/package.json +++ b/lightrag_webui/package.json @@ -45,7 +45,11 @@ "react": "^19.0.0", "react-dom": "^19.0.0", "react-dropzone": "^14.3.5", + "react-markdown": "^9.0.3", "react-number-format": "^5.4.3", + "rehype-react": "^8.0.0", + "remark-gfm": "^4.0.1", + "remark-math": "^6.0.0", "seedrandom": "^3.0.5", "sigma": "^3.0.1", "sonner": "^1.7.4", @@ -59,8 +63,8 @@ "@tailwindcss/vite": "^4.0.6", "@types/bun": "^1.2.2", "@types/node": "^22.13.4", - "@types/react": "^19.0.8", - "@types/react-dom": "^19.0.3", + "@types/react": "^19.0.10", + "@types/react-dom": "^19.0.4", "@types/seedrandom": "^3.0.8", "@vitejs/plugin-react-swc": "^3.8.0", "eslint": "^9.20.1", diff --git a/lightrag_webui/src/api/lightrag.ts b/lightrag_webui/src/api/lightrag.ts index 6308ef62..1de79898 100644 --- a/lightrag_webui/src/api/lightrag.ts +++ b/lightrag_webui/src/api/lightrag.ts @@ -212,38 +212,42 @@ export const queryTextStream = async ( ) => { try { let buffer = '' - await axiosInstance.post('/query/stream', request, { - responseType: 'text', - headers: { - Accept: 'application/x-ndjson' - }, - transformResponse: [ - (data: string) => { - // Accumulate the data and process complete lines - buffer += data - const lines = buffer.split('\n') - // Keep the last potentially incomplete line in the buffer - buffer = lines.pop() || '' + await axiosInstance + .post('/query/stream', request, { + responseType: 'text', + headers: { + Accept: 'application/x-ndjson' + }, + transformResponse: [ + (data: string) => { + // Accumulate the data and process complete lines + buffer += data + const lines = buffer.split('\n') + // Keep the last potentially incomplete line in the buffer + buffer = lines.pop() || '' - for (const line of lines) { - if (line.trim()) { - try { - const parsed = JSON.parse(line) - if (parsed.response) { - onChunk(parsed.response) - } else if (parsed.error && onError) { - onError(parsed.error) + for (const line of lines) { + if (line.trim()) { + try { + const parsed = JSON.parse(line) + if (parsed.response) { + onChunk(parsed.response) + } else if (parsed.error && onError) { + onError(parsed.error) + } + } catch (e) { + console.error('Error parsing stream chunk:', e) + if (onError) onError('Error parsing server response') } - } catch (e) { - console.error('Error parsing stream chunk:', e) - if (onError) onError('Error parsing server response') } } + return data } - return data - } - ] - }) + ] + }) + .catch((error) => { + if (onError) onError(errorMessage(error)) + }) // Process any remaining data in the buffer if (buffer.trim()) { @@ -266,11 +270,13 @@ export const queryTextStream = async ( } } -export const insertText = async ( - text: string, - description?: string -): Promise => { - const response = await axiosInstance.post('/documents/text', { text, description }) +export const insertText = async (text: string): Promise => { + const response = await axiosInstance.post('/documents/text', { text }) + return response.data +} + +export const insertTexts = async (texts: string[]): Promise => { + const response = await axiosInstance.post('/documents/texts', { texts }) return response.data } diff --git a/lightrag_webui/src/features/DocumentManager.tsx b/lightrag_webui/src/features/DocumentManager.tsx index 0aa068d4..30e55d48 100644 --- a/lightrag_webui/src/features/DocumentManager.tsx +++ b/lightrag_webui/src/features/DocumentManager.tsx @@ -29,7 +29,16 @@ export default function DocumentManager() { try { const docs = await getDocuments() if (docs && docs.statuses) { - setDocs(docs) + // compose all documents count + const numDocuments = Object.values(docs.statuses).reduce( + (acc, status) => acc + status.length, + 0 + ) + if (numDocuments > 0) { + setDocs(docs) + } else { + setDocs(null) + } // console.log(docs) } else { setDocs(null) diff --git a/lightrag_webui/src/features/RetrievalTesting.tsx b/lightrag_webui/src/features/RetrievalTesting.tsx index e293322b..0fee7dae 100644 --- a/lightrag_webui/src/features/RetrievalTesting.tsx +++ b/lightrag_webui/src/features/RetrievalTesting.tsx @@ -1,14 +1,36 @@ import Input from '@/components/ui/Input' import Button from '@/components/ui/Button' import { useCallback, useEffect, useRef, useState } from 'react' -import { queryText, queryTextStream, Message } from '@/api/lightrag' +import { queryText, queryTextStream, Message as ChatMessage } from '@/api/lightrag' import { errorMessage } from '@/lib/utils' import { useSettingsStore } from '@/stores/settings' import { useDebounce } from '@/hooks/useDebounce' import QuerySettings from '@/components/retrieval/QuerySettings' +import ReactMarkdown from 'react-markdown' +import remarkGfm from 'remark-gfm' +import rehypeReact from 'rehype-react' +import remarkMath from 'remark-math' + import { EraserIcon, SendIcon, LoaderIcon } from 'lucide-react' +type Message = ChatMessage & { + isError?: boolean +} + +const ChatMessageComponent = ({ message }: { message: Message }) => { + return ( + + {message.content} + + ) +} + export default function RetrievalTesting() { const [messages, setMessages] = useState( () => useSettingsStore.getState().retrievalHistory || [] @@ -47,13 +69,14 @@ export default function RetrievalTesting() { setIsLoading(true) // Create a function to update the assistant's message - const updateAssistantMessage = (chunk: string) => { + const updateAssistantMessage = (chunk: string, isError?: boolean) => { assistantMessage.content += chunk setMessages((prev) => { const newMessages = [...prev] const lastMessage = newMessages[newMessages.length - 1] if (lastMessage.role === 'assistant') { lastMessage.content = assistantMessage.content + lastMessage.isError = isError } return newMessages }) @@ -65,19 +88,30 @@ export default function RetrievalTesting() { ...state.querySettings, query: userMessage.content, conversation_history: prevMessages + .filter((m) => m.isError !== true) + .map((m) => ({ role: m.role, content: m.content })) } try { // Run query if (state.querySettings.stream) { - await queryTextStream(queryParams, updateAssistantMessage) + let errorMessage = '' + await queryTextStream(queryParams, updateAssistantMessage, (error) => { + errorMessage += error + }) + if (errorMessage) { + if (assistantMessage.content) { + errorMessage = assistantMessage.content + '\n' + errorMessage + } + updateAssistantMessage(errorMessage, true) + } } else { const response = await queryText(queryParams) updateAssistantMessage(response.response) } } catch (err) { // Handle error - updateAssistantMessage(`Error: Failed to get response\n${errorMessage(err)}`) + updateAssistantMessage(`Error: Failed to get response\n${errorMessage(err)}`, true) } finally { // Clear loading and add messages to state setIsLoading(false) @@ -115,10 +149,16 @@ export default function RetrievalTesting() { >
-
{message.content}
+
+                        {}
+                      
{message.content.length === 0 && ( )}