diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/assets/index-BHr7qL-4.js b/assets/index-BHr7qL-4.js new file mode 100644 index 0000000..bcea8b1 --- /dev/null +++ b/assets/index-BHr7qL-4.js @@ -0,0 +1,386 @@ +var tk=Object.defineProperty;var nk=(e,t,n)=>t in e?tk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ks=(e,t,n)=>nk(e,typeof t!="symbol"?t+"":t,n);(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 s of i)if(s.type==="childList")for(const u of s.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&r(u)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var Er=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Oi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Wy={exports:{}},Gl={},Hy={exports:{}},Ae={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Ca=Symbol.for("react.element"),rk=Symbol.for("react.portal"),ik=Symbol.for("react.fragment"),ok=Symbol.for("react.strict_mode"),sk=Symbol.for("react.profiler"),ak=Symbol.for("react.provider"),uk=Symbol.for("react.context"),lk=Symbol.for("react.forward_ref"),fk=Symbol.for("react.suspense"),ck=Symbol.for("react.memo"),hk=Symbol.for("react.lazy"),$v=Symbol.iterator;function dk(e){return e===null||typeof e!="object"?null:(e=$v&&e[$v]||e["@@iterator"],typeof e=="function"?e:null)}var jy={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Vy=Object.assign,Ky={};function as(e,t,n){this.props=e,this.context=t,this.refs=Ky,this.updater=n||jy}as.prototype.isReactComponent={};as.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};as.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Yy(){}Yy.prototype=as.prototype;function sd(e,t,n){this.props=e,this.context=t,this.refs=Ky,this.updater=n||jy}var ad=sd.prototype=new Yy;ad.constructor=sd;Vy(ad,as.prototype);ad.isPureReactComponent=!0;var Mv=Array.isArray,Zy=Object.prototype.hasOwnProperty,ud={current:null},Qy={key:!0,ref:!0,__self:!0,__source:!0};function Xy(e,t,n){var r,i={},s=null,u=null;if(t!=null)for(r in t.ref!==void 0&&(u=t.ref),t.key!==void 0&&(s=""+t.key),t)Zy.call(t,r)&&!Qy.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(l===1)i.children=n;else if(1>>1,P=C[$];if(0>>1;$i(Xe,ne))hti(rt,Xe)?(C[$]=rt,C[ht]=ne,$=ht):(C[$]=Xe,C[xe]=ne,$=xe);else if(hti(rt,ne))C[$]=rt,C[ht]=ne,$=ht;else break e}}return re}function i(C,re){var ne=C.sortIndex-re.sortIndex;return ne!==0?ne:C.id-re.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var u=Date,l=u.now();e.unstable_now=function(){return u.now()-l}}var c=[],h=[],g=1,p=null,v=3,_=!1,T=!1,b=!1,N=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(C){for(var re=n(h);re!==null;){if(re.callback===null)r(h);else if(re.startTime<=C)r(h),re.sortIndex=re.expirationTime,t(c,re);else break;re=n(h)}}function R(C){if(b=!1,S(C),!T)if(n(c)!==null)T=!0,bt(O);else{var re=n(h);re!==null&&ge(R,re.startTime-C)}}function O(C,re){T=!1,b&&(b=!1,x(G),G=-1),_=!0;var ne=v;try{for(S(re),p=n(c);p!==null&&(!(p.expirationTime>re)||C&&!be());){var $=p.callback;if(typeof $=="function"){p.callback=null,v=p.priorityLevel;var P=$(p.expirationTime<=re);re=e.unstable_now(),typeof P=="function"?p.callback=P:p===n(c)&&r(c),S(re)}else r(c);p=n(c)}if(p!==null)var he=!0;else{var xe=n(h);xe!==null&&ge(R,xe.startTime-re),he=!1}return he}finally{p=null,v=ne,_=!1}}var B=!1,F=null,G=-1,I=5,ee=-1;function be(){return!(e.unstable_now()-eeC||125$?(C.sortIndex=ne,t(h,C),n(c)===null&&C===n(h)&&(b?(x(G),G=-1):b=!0,ge(R,ne-$))):(C.sortIndex=P,t(c,C),T||_||(T=!0,bt(O))),C},e.unstable_shouldYield=be,e.unstable_wrapCallback=function(C){var re=v;return function(){var ne=v;v=re;try{return C.apply(this,arguments)}finally{v=ne}}}})(n0);t0.exports=n0;var Ck=t0.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Ak=en,En=Ck;function Y(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),lh=Object.prototype.hasOwnProperty,Tk=/^[: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={},Hv={};function kk(e){return lh.call(Hv,e)?!0:lh.call(Wv,e)?!1:Tk.test(e)?Hv[e]=!0:(Wv[e]=!0,!1)}function bk(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Rk(e,t,n,r){if(t===null||typeof t>"u"||bk(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Kt(e,t,n,r,i,s,u){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=u}var kt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){kt[e]=new Kt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];kt[t]=new Kt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){kt[e]=new Kt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){kt[e]=new Kt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){kt[e]=new Kt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){kt[e]=new Kt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){kt[e]=new Kt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){kt[e]=new Kt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){kt[e]=new Kt(e,5,!1,e.toLowerCase(),null,!1,!1)});var fd=/[\-:]([a-z])/g;function cd(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(fd,cd);kt[t]=new Kt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(fd,cd);kt[t]=new Kt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(fd,cd);kt[t]=new Kt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){kt[e]=new Kt(e,1,!1,e.toLowerCase(),null,!1,!1)});kt.xlinkHref=new Kt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){kt[e]=new Kt(e,1,!1,e.toLowerCase(),null,!0,!0)});function hd(e,t,n,r){var i=kt.hasOwnProperty(t)?kt[t]:null;(i!==null?i.type!==0:r||!(2l||i[u]!==s[l]){var c=` +`+i[u].replace(" at new "," at ");return e.displayName&&c.includes("")&&(c=c.replace("",e.displayName)),c}while(1<=u&&0<=l);break}}}finally{Sc=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ws(e):""}function Lk(e){switch(e.tag){case 5:return Ws(e.type);case 16:return Ws("Lazy");case 13:return Ws("Suspense");case 19:return Ws("SuspenseList");case 0:case 2:case 15:return e=xc(e.type,!1),e;case 11:return e=xc(e.type.render,!1),e;case 1:return e=xc(e.type,!0),e;default:return""}}function dh(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Io:return"Fragment";case Po:return"Portal";case fh:return"Profiler";case dd:return"StrictMode";case ch:return"Suspense";case hh:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case o0:return(e.displayName||"Context")+".Consumer";case i0:return(e._context.displayName||"Context")+".Provider";case pd:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case gd:return t=e.displayName||null,t!==null?t:dh(e.type)||"Memo";case wi:t=e._payload,e=e._init;try{return dh(e(t))}catch{}}return null}function Dk(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return dh(t);case 8:return t===dd?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Fi(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function a0(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Pk(e){var t=a0(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(u){r=""+u,s.call(this,u)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(u){r=""+u},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Tu(e){e._valueTracker||(e._valueTracker=Pk(e))}function u0(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=a0(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ll(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function ph(e,t){var n=t.checked;return nt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Vv(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Fi(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function l0(e,t){t=t.checked,t!=null&&hd(e,"checked",t,!1)}function gh(e,t){l0(e,t);var n=Fi(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?vh(e,t.type,n):t.hasOwnProperty("defaultValue")&&vh(e,t.type,Fi(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Kv(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function vh(e,t,n){(t!=="number"||ll(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Hs=Array.isArray;function Ho(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=ku.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function sa(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Zs={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ik=["Webkit","ms","Moz","O"];Object.keys(Zs).forEach(function(e){Ik.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Zs[t]=Zs[e]})});function d0(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Zs.hasOwnProperty(e)&&Zs[e]?(""+t).trim():t+"px"}function p0(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=d0(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Fk=nt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function wh(e,t){if(t){if(Fk[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Y(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Y(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Y(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Y(62))}}function Eh(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var _h=null;function vd(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Sh=null,jo=null,Vo=null;function Qv(e){if(e=ka(e)){if(typeof Sh!="function")throw Error(Y(280));var t=e.stateNode;t&&(t=Wl(t),Sh(e.stateNode,e.type,t))}}function g0(e){jo?Vo?Vo.push(e):Vo=[e]:jo=e}function v0(){if(jo){var e=jo,t=Vo;if(Vo=jo=null,Qv(e),t)for(e=0;e>>=0,e===0?32:31-(jk(e)/Vk|0)|0}var bu=64,Ru=4194304;function js(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function dl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,u=n&268435455;if(u!==0){var l=u&~i;l!==0?r=js(l):(s&=u,s!==0&&(r=js(s)))}else u=n&~i,u!==0?r=js(u):s!==0&&(r=js(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Aa(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ur(t),e[t]=n}function Qk(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Xs),om=" ",sm=!1;function O0(e,t){switch(e){case"keyup":return Cb.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function z0(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Fo=!1;function Tb(e,t){switch(e){case"compositionend":return z0(t);case"keypress":return t.which!==32?null:(sm=!0,om);case"textInput":return e=t.data,e===om&&sm?null:e;default:return null}}function kb(e,t){if(Fo)return e==="compositionend"||!Cd&&O0(e,t)?(e=F0(),qu=_d=xi=null,Fo=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=fm(n)}}function M0(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?M0(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function B0(){for(var e=window,t=ll();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ll(e.document)}return t}function Ad(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Ob(e){var t=B0(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&M0(n.ownerDocument.documentElement,n)){if(r!==null&&Ad(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!e.extend&&s>r&&(i=r,r=s,s=i),i=cm(n,s);var u=cm(n,r);i&&u&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==u.node||e.focusOffset!==u.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(u.node,u.offset)):(t.setEnd(u.node,u.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,No=null,bh=null,Js=null,Rh=!1;function hm(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Rh||No==null||No!==ll(r)||(r=No,"selectionStart"in r&&Ad(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Js&&ha(Js,r)||(Js=r,r=vl(bh,"onSelect"),0Go||(e.current=Nh[Go],Nh[Go]=null,Go--)}function We(e,t){Go++,Nh[Go]=e.current,e.current=t}var Ni={},Ot=Gi(Ni),on=Gi(!1),so=Ni;function Jo(e,t){var n=e.type.contextTypes;if(!n)return Ni;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function sn(e){return e=e.childContextTypes,e!=null}function yl(){Ke(on),Ke(Ot)}function wm(e,t,n){if(Ot.current!==Ni)throw Error(Y(168));We(Ot,t),We(on,n)}function X0(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Y(108,Dk(e)||"Unknown",i));return nt({},n,r)}function wl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ni,so=Ot.current,We(Ot,e),We(on,on.current),!0}function Em(e,t,n){var r=e.stateNode;if(!r)throw Error(Y(169));n?(e=X0(e,t,so),r.__reactInternalMemoizedMergedChildContext=e,Ke(on),Ke(Ot),We(Ot,e)):Ke(on),We(on,n)}var Mr=null,Hl=!1,zc=!1;function q0(e){Mr===null?Mr=[e]:Mr.push(e)}function Yb(e){Hl=!0,q0(e)}function Ui(){if(!zc&&Mr!==null){zc=!0;var e=0,t=Ge;try{var n=Mr;for(Ge=1;e>=u,i-=u,Wr=1<<32-ur(t)+i|n<G?(I=F,F=null):I=F.sibling;var ee=v(x,F,S[G],R);if(ee===null){F===null&&(F=I);break}e&&F&&ee.alternate===null&&t(x,F),E=s(ee,E,G),B===null?O=ee:B.sibling=ee,B=ee,F=I}if(G===S.length)return n(x,F),Ze&&Ji(x,G),O;if(F===null){for(;GG?(I=F,F=null):I=F.sibling;var be=v(x,F,ee.value,R);if(be===null){F===null&&(F=I);break}e&&F&&be.alternate===null&&t(x,F),E=s(be,E,G),B===null?O=be:B.sibling=be,B=be,F=I}if(ee.done)return n(x,F),Ze&&Ji(x,G),O;if(F===null){for(;!ee.done;G++,ee=S.next())ee=p(x,ee.value,R),ee!==null&&(E=s(ee,E,G),B===null?O=ee:B.sibling=ee,B=ee);return Ze&&Ji(x,G),O}for(F=r(x,F);!ee.done;G++,ee=S.next())ee=_(F,x,G,ee.value,R),ee!==null&&(e&&ee.alternate!==null&&F.delete(ee.key===null?G:ee.key),E=s(ee,E,G),B===null?O=ee:B.sibling=ee,B=ee);return e&&F.forEach(function(ye){return t(x,ye)}),Ze&&Ji(x,G),O}function N(x,E,S,R){if(typeof S=="object"&&S!==null&&S.type===Io&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case Au:e:{for(var O=S.key,B=E;B!==null;){if(B.key===O){if(O=S.type,O===Io){if(B.tag===7){n(x,B.sibling),E=i(B,S.props.children),E.return=x,x=E;break e}}else if(B.elementType===O||typeof O=="object"&&O!==null&&O.$$typeof===wi&&xm(O)===B.type){n(x,B.sibling),E=i(B,S.props),E.ref=Is(x,B,S),E.return=x,x=E;break e}n(x,B);break}else t(x,B);B=B.sibling}S.type===Io?(E=oo(S.props.children,x.mode,R,S.key),E.return=x,x=E):(R=sl(S.type,S.key,S.props,null,x.mode,R),R.ref=Is(x,E,S),R.return=x,x=R)}return u(x);case Po:e:{for(B=S.key;E!==null;){if(E.key===B)if(E.tag===4&&E.stateNode.containerInfo===S.containerInfo&&E.stateNode.implementation===S.implementation){n(x,E.sibling),E=i(E,S.children||[]),E.return=x,x=E;break e}else{n(x,E);break}else t(x,E);E=E.sibling}E=jc(S,x.mode,R),E.return=x,x=E}return u(x);case wi:return B=S._init,N(x,E,B(S._payload),R)}if(Hs(S))return T(x,E,S,R);if(bs(S))return b(x,E,S,R);Ou(x,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,E!==null&&E.tag===6?(n(x,E.sibling),E=i(E,S),E.return=x,x=E):(n(x,E),E=Hc(S,x.mode,R),E.return=x,x=E),u(x)):n(x,E)}return N}var ts=nw(!0),rw=nw(!1),Sl=Gi(null),xl=null,Mo=null,Rd=null;function Ld(){Rd=Mo=xl=null}function Dd(e){var t=Sl.current;Ke(Sl),e._currentValue=t}function Gh(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Yo(e,t){xl=e,Rd=Mo=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(nn=!0),e.firstContext=null)}function Bn(e){var t=e._currentValue;if(Rd!==e)if(e={context:e,memoizedValue:t,next:null},Mo===null){if(xl===null)throw Error(Y(308));Mo=e,xl.dependencies={lanes:0,firstContext:e}}else Mo=Mo.next=e;return t}var no=null;function Pd(e){no===null?no=[e]:no.push(e)}function iw(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Pd(t)):(n.next=i.next,i.next=n),t.interleaved=n,Zr(e,r)}function Zr(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Ei=!1;function Id(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ow(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function jr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Li(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Re&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Zr(e,n)}return i=r.interleaved,i===null?(t.next=t,Pd(r)):(t.next=i.next,i.next=t),r.interleaved=t,Zr(e,n)}function el(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,yd(e,n)}}function Cm(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var u={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=u:s=s.next=u,n=n.next}while(n!==null);s===null?i=s=t:s=s.next=t}else i=s=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Cl(e,t,n,r){var i=e.updateQueue;Ei=!1;var s=i.firstBaseUpdate,u=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var c=l,h=c.next;c.next=null,u===null?s=h:u.next=h,u=c;var g=e.alternate;g!==null&&(g=g.updateQueue,l=g.lastBaseUpdate,l!==u&&(l===null?g.firstBaseUpdate=h:l.next=h,g.lastBaseUpdate=c))}if(s!==null){var p=i.baseState;u=0,g=h=c=null,l=s;do{var v=l.lane,_=l.eventTime;if((r&v)===v){g!==null&&(g=g.next={eventTime:_,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var T=e,b=l;switch(v=t,_=n,b.tag){case 1:if(T=b.payload,typeof T=="function"){p=T.call(_,p,v);break e}p=T;break e;case 3:T.flags=T.flags&-65537|128;case 0:if(T=b.payload,v=typeof T=="function"?T.call(_,p,v):T,v==null)break e;p=nt({},p,v);break e;case 2:Ei=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,v=i.effects,v===null?i.effects=[l]:v.push(l))}else _={eventTime:_,lane:v,tag:l.tag,payload:l.payload,callback:l.callback,next:null},g===null?(h=g=_,c=p):g=g.next=_,u|=v;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;v=l,l=v.next,v.next=null,i.lastBaseUpdate=v,i.shared.pending=null}}while(!0);if(g===null&&(c=p),i.baseState=c,i.firstBaseUpdate=h,i.lastBaseUpdate=g,t=i.shared.interleaved,t!==null){i=t;do u|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);lo|=u,e.lanes=u,e.memoizedState=p}}function Am(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Uc.transition;Uc.transition={};try{e(!1),t()}finally{Ge=n,Uc.transition=r}}function Sw(){return Wn().memoizedState}function qb(e,t,n){var r=Pi(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},xw(e))Cw(t,n);else if(n=iw(e,t,n,r),n!==null){var i=jt();lr(n,e,r,i),Aw(n,t,r)}}function Jb(e,t,n){var r=Pi(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(xw(e))Cw(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var u=t.lastRenderedState,l=s(u,n);if(i.hasEagerState=!0,i.eagerState=l,fr(l,u)){var c=t.interleaved;c===null?(i.next=i,Pd(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}finally{}n=iw(e,t,i,r),n!==null&&(i=jt(),lr(n,e,r,i),Aw(n,t,r))}}function xw(e){var t=e.alternate;return e===tt||t!==null&&t===tt}function Cw(e,t){ea=Tl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Aw(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,yd(e,n)}}var kl={readContext:Bn,useCallback:Pt,useContext:Pt,useEffect:Pt,useImperativeHandle:Pt,useInsertionEffect:Pt,useLayoutEffect:Pt,useMemo:Pt,useReducer:Pt,useRef:Pt,useState:Pt,useDebugValue:Pt,useDeferredValue:Pt,useTransition:Pt,useMutableSource:Pt,useSyncExternalStore:Pt,useId:Pt,unstable_isNewReconciler:!1},eR={readContext:Bn,useCallback:function(e,t){return wr().memoizedState=[e,t===void 0?null:t],e},useContext:Bn,useEffect:km,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,nl(4194308,4,mw.bind(null,t,e),n)},useLayoutEffect:function(e,t){return nl(4194308,4,e,t)},useInsertionEffect:function(e,t){return nl(4,2,e,t)},useMemo:function(e,t){var n=wr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=wr();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=qb.bind(null,tt,e),[r.memoizedState,e]},useRef:function(e){var t=wr();return e={current:e},t.memoizedState=e},useState:Tm,useDebugValue:Md,useDeferredValue:function(e){return wr().memoizedState=e},useTransition:function(){var e=Tm(!1),t=e[0];return e=Xb.bind(null,e[1]),wr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=tt,i=wr();if(Ze){if(n===void 0)throw Error(Y(407));n=n()}else{if(n=t(),_t===null)throw Error(Y(349));uo&30||lw(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,km(cw.bind(null,r,s,e),[e]),r.flags|=2048,Ea(9,fw.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=wr(),t=_t.identifierPrefix;if(Ze){var n=Hr,r=Wr;n=(r&~(1<<32-ur(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ya++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=u.createElement(n,{is:r.is}):(e=u.createElement(n),n==="select"&&(u=e,r.multiple?u.multiple=!0:r.size&&(u.size=r.size))):e=u.createElementNS(e,n),e[_r]=t,e[ga]=r,Nw(e,t,!1,!1),t.stateNode=e;e:{switch(u=Eh(n,r),n){case"dialog":Ve("cancel",e),Ve("close",e),i=r;break;case"iframe":case"object":case"embed":Ve("load",e),i=r;break;case"video":case"audio":for(i=0;iis&&(t.flags|=128,r=!0,Fs(s,!1),t.lanes=4194304)}else{if(!r)if(e=Al(u),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Fs(s,!0),s.tail===null&&s.tailMode==="hidden"&&!u.alternate&&!Ze)return It(t),null}else 2*lt()-s.renderingStartTime>is&&n!==1073741824&&(t.flags|=128,r=!0,Fs(s,!1),t.lanes=4194304);s.isBackwards?(u.sibling=t.child,t.child=u):(n=s.last,n!==null?n.sibling=u:t.child=u,s.last=u)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=lt(),t.sibling=null,n=et.current,We(et,r?n&1|2:n&1),t):(It(t),null);case 22:case 23:return Kd(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?vn&1073741824&&(It(t),t.subtreeFlags&6&&(t.flags|=8192)):It(t),null;case 24:return null;case 25:return null}throw Error(Y(156,t.tag))}function uR(e,t){switch(kd(t),t.tag){case 1:return sn(t.type)&&yl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ns(),Ke(on),Ke(Ot),Od(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Nd(t),null;case 13:if(Ke(et),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Y(340));es()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ke(et),null;case 4:return ns(),null;case 10:return Dd(t.type._context),null;case 22:case 23:return Kd(),null;case 24:return null;default:return null}}var Gu=!1,Nt=!1,lR=typeof WeakSet=="function"?WeakSet:Set,te=null;function Bo(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){st(e,t,r)}else n.current=null}function Kh(e,t,n){try{n()}catch(r){st(e,t,r)}}var Gm=!1;function fR(e,t){if(Lh=pl,e=B0(),Ad(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var u=0,l=-1,c=-1,h=0,g=0,p=e,v=null;t:for(;;){for(var _;p!==n||i!==0&&p.nodeType!==3||(l=u+i),p!==s||r!==0&&p.nodeType!==3||(c=u+r),p.nodeType===3&&(u+=p.nodeValue.length),(_=p.firstChild)!==null;)v=p,p=_;for(;;){if(p===e)break t;if(v===n&&++h===i&&(l=u),v===s&&++g===r&&(c=u),(_=p.nextSibling)!==null)break;p=v,v=p.parentNode}p=_}n=l===-1||c===-1?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Dh={focusedElem:e,selectionRange:n},pl=!1,te=t;te!==null;)if(t=te,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,te=e;else for(;te!==null;){t=te;try{var T=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(T!==null){var b=T.memoizedProps,N=T.memoizedState,x=t.stateNode,E=x.getSnapshotBeforeUpdate(t.elementType===t.type?b:ir(t.type,b),N);x.__reactInternalSnapshotBeforeUpdate=E}break;case 3:var S=t.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Y(163))}}catch(R){st(t,t.return,R)}if(e=t.sibling,e!==null){e.return=t.return,te=e;break}te=t.return}return T=Gm,Gm=!1,T}function ta(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&Kh(t,n,s)}i=i.next}while(i!==r)}}function Kl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Yh(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Gw(e){var t=e.alternate;t!==null&&(e.alternate=null,Gw(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[_r],delete t[ga],delete t[Fh],delete t[Vb],delete t[Kb])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Uw(e){return e.tag===5||e.tag===3||e.tag===4}function Um(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Uw(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Zh(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ml));else if(r!==4&&(e=e.child,e!==null))for(Zh(e,t,n),e=e.sibling;e!==null;)Zh(e,t,n),e=e.sibling}function Qh(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Qh(e,t,n),e=e.sibling;e!==null;)Qh(e,t,n),e=e.sibling}var Ct=null,or=!1;function gi(e,t,n){for(n=n.child;n!==null;)$w(e,t,n),n=n.sibling}function $w(e,t,n){if(Sr&&typeof Sr.onCommitFiberUnmount=="function")try{Sr.onCommitFiberUnmount(Ul,n)}catch{}switch(n.tag){case 5:Nt||Bo(n,t);case 6:var r=Ct,i=or;Ct=null,gi(e,t,n),Ct=r,or=i,Ct!==null&&(or?(e=Ct,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ct.removeChild(n.stateNode));break;case 18:Ct!==null&&(or?(e=Ct,n=n.stateNode,e.nodeType===8?Oc(e.parentNode,n):e.nodeType===1&&Oc(e,n),fa(e)):Oc(Ct,n.stateNode));break;case 4:r=Ct,i=or,Ct=n.stateNode.containerInfo,or=!0,gi(e,t,n),Ct=r,or=i;break;case 0:case 11:case 14:case 15:if(!Nt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,u=s.destroy;s=s.tag,u!==void 0&&(s&2||s&4)&&Kh(n,t,u),i=i.next}while(i!==r)}gi(e,t,n);break;case 1:if(!Nt&&(Bo(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){st(n,t,l)}gi(e,t,n);break;case 21:gi(e,t,n);break;case 22:n.mode&1?(Nt=(r=Nt)||n.memoizedState!==null,gi(e,t,n),Nt=r):gi(e,t,n);break;default:gi(e,t,n)}}function $m(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new lR),t.forEach(function(r){var i=wR.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function er(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=u),r&=~s}if(r=i,r=lt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*hR(r/1960))-r,10e?16:e,Ci===null)var r=!1;else{if(e=Ci,Ci=null,Ll=0,Re&6)throw Error(Y(331));var i=Re;for(Re|=4,te=e.current;te!==null;){var s=te,u=s.child;if(te.flags&16){var l=s.deletions;if(l!==null){for(var c=0;clt()-jd?io(e,0):Hd|=n),an(e,t)}function Yw(e,t){t===0&&(e.mode&1?(t=Ru,Ru<<=1,!(Ru&130023424)&&(Ru=4194304)):t=1);var n=jt();e=Zr(e,t),e!==null&&(Aa(e,t,n),an(e,n))}function yR(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Yw(e,n)}function wR(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Y(314))}r!==null&&r.delete(t),Yw(e,n)}var Zw;Zw=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||on.current)nn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return nn=!1,sR(e,t,n);nn=!!(e.flags&131072)}else nn=!1,Ze&&t.flags&1048576&&J0(t,_l,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;rl(e,t),e=t.pendingProps;var i=Jo(t,Ot.current);Yo(t,n),i=Gd(null,t,r,e,i,n);var s=Ud();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,sn(r)?(s=!0,wl(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Id(t),i.updater=Vl,t.stateNode=i,i._reactInternals=t,$h(t,r,e,n),t=Wh(null,t,r,!0,s,n)):(t.tag=0,Ze&&s&&Td(t),Wt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(rl(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=_R(r),e=ir(r,e),i){case 0:t=Bh(null,t,r,e,n);break e;case 1:t=Nm(null,t,r,e,n);break e;case 11:t=Im(null,t,r,e,n);break e;case 14:t=Fm(null,t,r,ir(r.type,e),n);break e}throw Error(Y(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ir(r,i),Bh(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ir(r,i),Nm(e,t,r,i,n);case 3:e:{if(Pw(t),e===null)throw Error(Y(387));r=t.pendingProps,s=t.memoizedState,i=s.element,ow(e,t),Cl(t,r,null,n);var u=t.memoizedState;if(r=u.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:u.cache,pendingSuspenseBoundaries:u.pendingSuspenseBoundaries,transitions:u.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=rs(Error(Y(423)),t),t=Om(e,t,r,n,i);break e}else if(r!==i){i=rs(Error(Y(424)),t),t=Om(e,t,r,n,i);break e}else for(mn=Ri(t.stateNode.containerInfo.firstChild),wn=t,Ze=!0,sr=null,n=rw(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(es(),r===i){t=Qr(e,t,n);break e}Wt(e,t,r,n)}t=t.child}return t;case 5:return sw(t),e===null&&zh(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,u=i.children,Ph(r,i)?u=null:s!==null&&Ph(r,s)&&(t.flags|=32),Dw(e,t),Wt(e,t,u,n),t.child;case 6:return e===null&&zh(t),null;case 13:return Iw(e,t,n);case 4:return Fd(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ts(t,null,r,n):Wt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ir(r,i),Im(e,t,r,i,n);case 7:return Wt(e,t,t.pendingProps,n),t.child;case 8:return Wt(e,t,t.pendingProps.children,n),t.child;case 12:return Wt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,u=i.value,We(Sl,r._currentValue),r._currentValue=u,s!==null)if(fr(s.value,u)){if(s.children===i.children&&!on.current){t=Qr(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var l=s.dependencies;if(l!==null){u=s.child;for(var c=l.firstContext;c!==null;){if(c.context===r){if(s.tag===1){c=jr(-1,n&-n),c.tag=2;var h=s.updateQueue;if(h!==null){h=h.shared;var g=h.pending;g===null?c.next=c:(c.next=g.next,g.next=c),h.pending=c}}s.lanes|=n,c=s.alternate,c!==null&&(c.lanes|=n),Gh(s.return,n,t),l.lanes|=n;break}c=c.next}}else if(s.tag===10)u=s.type===t.type?null:s.child;else if(s.tag===18){if(u=s.return,u===null)throw Error(Y(341));u.lanes|=n,l=u.alternate,l!==null&&(l.lanes|=n),Gh(u,n,t),u=s.sibling}else u=s.child;if(u!==null)u.return=s;else for(u=s;u!==null;){if(u===t){u=null;break}if(s=u.sibling,s!==null){s.return=u.return,u=s;break}u=u.return}s=u}Wt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Yo(t,n),i=Bn(i),r=r(i),t.flags|=1,Wt(e,t,r,n),t.child;case 14:return r=t.type,i=ir(r,t.pendingProps),i=ir(r.type,i),Fm(e,t,r,i,n);case 15:return Rw(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ir(r,i),rl(e,t),t.tag=1,sn(r)?(e=!0,wl(t)):e=!1,Yo(t,n),Tw(t,r,i),$h(t,r,i,n),Wh(null,t,r,!0,e,n);case 19:return Fw(e,t,n);case 22:return Lw(e,t,n)}throw Error(Y(156,t.tag))};function Qw(e,t){return x0(e,t)}function ER(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Un(e,t,n,r){return new ER(e,t,n,r)}function Zd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function _R(e){if(typeof e=="function")return Zd(e)?1:0;if(e!=null){if(e=e.$$typeof,e===pd)return 11;if(e===gd)return 14}return 2}function Ii(e,t){var n=e.alternate;return n===null?(n=Un(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function sl(e,t,n,r,i,s){var u=2;if(r=e,typeof e=="function")Zd(e)&&(u=1);else if(typeof e=="string")u=5;else e:switch(e){case Io:return oo(n.children,i,s,t);case dd:u=8,i|=8;break;case fh:return e=Un(12,n,t,i|2),e.elementType=fh,e.lanes=s,e;case ch:return e=Un(13,n,t,i),e.elementType=ch,e.lanes=s,e;case hh:return e=Un(19,n,t,i),e.elementType=hh,e.lanes=s,e;case s0:return Zl(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case i0:u=10;break e;case o0:u=9;break e;case pd:u=11;break e;case gd:u=14;break e;case wi:u=16,r=null;break e}throw Error(Y(130,e==null?e:typeof e,""))}return t=Un(u,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function oo(e,t,n,r){return e=Un(7,e,r,t),e.lanes=n,e}function Zl(e,t,n,r){return e=Un(22,e,r,t),e.elementType=s0,e.lanes=n,e.stateNode={isHidden:!1},e}function Hc(e,t,n){return e=Un(6,e,null,t),e.lanes=n,e}function jc(e,t,n){return t=Un(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function SR(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ac(0),this.expirationTimes=Ac(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ac(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Qd(e,t,n,r,i,s,u,l,c){return e=new SR(e,t,n,l,c),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Un(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Id(s),e}function xR(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e1)}catch(e){console.error(e)}}e1(),e0.exports=_n;var bR=e0.exports,t1,Ym=bR;t1=Ym.createRoot,Ym.hydrateRoot;var n1={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Zm=Ai.createContext&&Ai.createContext(n1),RR=["attr","size","title"];function LR(e,t){if(e==null)return{};var n=DR(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function DR(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Il(){return Il=Object.assign?Object.assign.bind():function(e){for(var t=1;tAi.createElement(t.tag,Fl({key:n},t.attr),r1(t.child)))}function po(e){return t=>Ai.createElement(NR,Il({attr:Fl({},e.attr)},t),r1(e.child))}function NR(e){var t=n=>{var{attr:r,size:i,title:s}=e,u=LR(e,RR),l=i||n.size||"1em",c;return n.className&&(c=n.className),e.className&&(c=(c?c+" ":"")+e.className),Ai.createElement("svg",Il({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:c,style:Fl(Fl({color:e.color||n.color},n.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),s&&Ai.createElement("title",null,s),e.children)};return Zm!==void 0?Ai.createElement(Zm.Consumer,null,n=>t(n)):t(n1)}function Vc(e){return po({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M288 32c0-17.7-14.3-32-32-32s-32 14.3-32 32V274.7l-73.4-73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l128 128c12.5 12.5 32.8 12.5 45.3 0l128-128c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L288 274.7V32zM64 352c-35.3 0-64 28.7-64 64v32c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V416c0-35.3-28.7-64-64-64H346.5l-45.3 45.3c-25 25-65.5 25-90.5 0L165.5 352H64zm368 56a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"},child:[]}]})(e)}function OR(e){return po({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M73 39c-14.8-9.1-33.4-9.4-48.5-.9S0 62.6 0 80V432c0 17.4 9.4 33.4 24.5 41.9s33.7 8.1 48.5-.9L361 297c14.3-8.7 23-24.2 23-41s-8.7-32.2-23-41L73 39z"},child:[]}]})(e)}function i1(e){return po({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M304 48a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zm0 416a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zM48 304a48 48 0 1 0 0-96 48 48 0 1 0 0 96zm464-48a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zM142.9 437A48 48 0 1 0 75 369.1 48 48 0 1 0 142.9 437zm0-294.2A48 48 0 1 0 75 75a48 48 0 1 0 67.9 67.9zM369.1 437A48 48 0 1 0 437 369.1 48 48 0 1 0 369.1 437z"},child:[]}]})(e)}var Nl={exports:{}};/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */Nl.exports;(function(e,t){(function(){var n,r="4.17.21",i=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",u="Expected a function",l="Invalid `variable` option passed into `_.template`",c="__lodash_hash_undefined__",h=500,g="__lodash_placeholder__",p=1,v=2,_=4,T=1,b=2,N=1,x=2,E=4,S=8,R=16,O=32,B=64,F=128,G=256,I=512,ee=30,be="...",ye=800,He=16,pe=1,Qe=2,bt=3,ge=1/0,C=9007199254740991,re=17976931348623157e292,ne=NaN,$=4294967295,P=$-1,he=$>>>1,xe=[["ary",F],["bind",N],["bindKey",x],["curry",S],["curryRight",R],["flip",I],["partial",O],["partialRight",B],["rearg",G]],Xe="[object Arguments]",ht="[object Array]",rt="[object AsyncFunction]",ae="[object Boolean]",Ar="[object Date]",xn="[object DOMException]",go="[object Error]",cr="[object Function]",Na="[object GeneratorFunction]",Rt="[object Map]",Oe="[object Number]",Le="[object Null]",Ee="[object Object]",Cn="[object Promise]",de="[object Proxy]",oe="[object RegExp]",U="[object Set]",un="[object String]",Yn="[object Symbol]",Tr="[object Undefined]",An="[object WeakMap]",Yt="[object WeakSet]",Tn="[object ArrayBuffer]",hr="[object DataView]",ei="[object Float32Array]",ti="[object Float64Array]",ni="[object Int8Array]",kr="[object Int16Array]",ri="[object Int32Array]",Zn="[object Uint8Array]",ii="[object Uint8ClampedArray]",oi="[object Uint16Array]",af="[object Uint32Array]",SE=/\b__p \+= '';/g,xE=/\b(__p \+=) '' \+/g,CE=/(__e\(.*?\)|\b__t\)) \+\n'';/g,cp=/&(?:amp|lt|gt|quot|#39);/g,hp=/[&<>"']/g,AE=RegExp(cp.source),TE=RegExp(hp.source),kE=/<%-([\s\S]+?)%>/g,bE=/<%([\s\S]+?)%>/g,dp=/<%=([\s\S]+?)%>/g,RE=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,LE=/^\w*$/,DE=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,uf=/[\\^$.*+?()[\]{}|]/g,PE=RegExp(uf.source),lf=/^\s+/,IE=/\s/,FE=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,NE=/\{\n\/\* \[wrapped with (.+)\] \*/,OE=/,? & /,zE=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,GE=/[()=,{}\[\]\/\s]/,UE=/\\(\\)?/g,$E=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pp=/\w*$/,ME=/^[-+]0x[0-9a-f]+$/i,BE=/^0b[01]+$/i,WE=/^\[object .+?Constructor\]$/,HE=/^0o[0-7]+$/i,jE=/^(?:0|[1-9]\d*)$/,VE=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Oa=/($^)/,KE=/['\n\r\u2028\u2029\\]/g,za="\\ud800-\\udfff",YE="\\u0300-\\u036f",ZE="\\ufe20-\\ufe2f",QE="\\u20d0-\\u20ff",gp=YE+ZE+QE,vp="\\u2700-\\u27bf",mp="a-z\\xdf-\\xf6\\xf8-\\xff",XE="\\xac\\xb1\\xd7\\xf7",qE="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",JE="\\u2000-\\u206f",e_=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",yp="A-Z\\xc0-\\xd6\\xd8-\\xde",wp="\\ufe0e\\ufe0f",Ep=XE+qE+JE+e_,ff="['’]",t_="["+za+"]",_p="["+Ep+"]",Ga="["+gp+"]",Sp="\\d+",n_="["+vp+"]",xp="["+mp+"]",Cp="[^"+za+Ep+Sp+vp+mp+yp+"]",cf="\\ud83c[\\udffb-\\udfff]",r_="(?:"+Ga+"|"+cf+")",Ap="[^"+za+"]",hf="(?:\\ud83c[\\udde6-\\uddff]){2}",df="[\\ud800-\\udbff][\\udc00-\\udfff]",vo="["+yp+"]",Tp="\\u200d",kp="(?:"+xp+"|"+Cp+")",i_="(?:"+vo+"|"+Cp+")",bp="(?:"+ff+"(?:d|ll|m|re|s|t|ve))?",Rp="(?:"+ff+"(?:D|LL|M|RE|S|T|VE))?",Lp=r_+"?",Dp="["+wp+"]?",o_="(?:"+Tp+"(?:"+[Ap,hf,df].join("|")+")"+Dp+Lp+")*",s_="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",a_="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Pp=Dp+Lp+o_,u_="(?:"+[n_,hf,df].join("|")+")"+Pp,l_="(?:"+[Ap+Ga+"?",Ga,hf,df,t_].join("|")+")",f_=RegExp(ff,"g"),c_=RegExp(Ga,"g"),pf=RegExp(cf+"(?="+cf+")|"+l_+Pp,"g"),h_=RegExp([vo+"?"+xp+"+"+bp+"(?="+[_p,vo,"$"].join("|")+")",i_+"+"+Rp+"(?="+[_p,vo+kp,"$"].join("|")+")",vo+"?"+kp+"+"+bp,vo+"+"+Rp,a_,s_,Sp,u_].join("|"),"g"),d_=RegExp("["+Tp+za+gp+wp+"]"),p_=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,g_=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],v_=-1,je={};je[ei]=je[ti]=je[ni]=je[kr]=je[ri]=je[Zn]=je[ii]=je[oi]=je[af]=!0,je[Xe]=je[ht]=je[Tn]=je[ae]=je[hr]=je[Ar]=je[go]=je[cr]=je[Rt]=je[Oe]=je[Ee]=je[oe]=je[U]=je[un]=je[An]=!1;var Be={};Be[Xe]=Be[ht]=Be[Tn]=Be[hr]=Be[ae]=Be[Ar]=Be[ei]=Be[ti]=Be[ni]=Be[kr]=Be[ri]=Be[Rt]=Be[Oe]=Be[Ee]=Be[oe]=Be[U]=Be[un]=Be[Yn]=Be[Zn]=Be[ii]=Be[oi]=Be[af]=!0,Be[go]=Be[cr]=Be[An]=!1;var m_={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},y_={"&":"&","<":"<",">":">",'"':""","'":"'"},w_={"&":"&","<":"<",">":">",""":'"',"'":"'"},E_={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},__=parseFloat,S_=parseInt,Ip=typeof Er=="object"&&Er&&Er.Object===Object&&Er,x_=typeof self=="object"&&self&&self.Object===Object&&self,St=Ip||x_||Function("return this")(),gf=t&&!t.nodeType&&t,Bi=gf&&!0&&e&&!e.nodeType&&e,Fp=Bi&&Bi.exports===gf,vf=Fp&&Ip.process,kn=function(){try{var L=Bi&&Bi.require&&Bi.require("util").types;return L||vf&&vf.binding&&vf.binding("util")}catch{}}(),Np=kn&&kn.isArrayBuffer,Op=kn&&kn.isDate,zp=kn&&kn.isMap,Gp=kn&&kn.isRegExp,Up=kn&&kn.isSet,$p=kn&&kn.isTypedArray;function ln(L,M,z){switch(z.length){case 0:return L.call(M);case 1:return L.call(M,z[0]);case 2:return L.call(M,z[0],z[1]);case 3:return L.call(M,z[0],z[1],z[2])}return L.apply(M,z)}function C_(L,M,z,J){for(var ve=-1,De=L==null?0:L.length;++ve-1}function mf(L,M,z){for(var J=-1,ve=L==null?0:L.length;++J-1;);return z}function Yp(L,M){for(var z=L.length;z--&&mo(M,L[z],0)>-1;);return z}function I_(L,M){for(var z=L.length,J=0;z--;)L[z]===M&&++J;return J}var F_=_f(m_),N_=_f(y_);function O_(L){return"\\"+E_[L]}function z_(L,M){return L==null?n:L[M]}function yo(L){return d_.test(L)}function G_(L){return p_.test(L)}function U_(L){for(var M,z=[];!(M=L.next()).done;)z.push(M.value);return z}function Af(L){var M=-1,z=Array(L.size);return L.forEach(function(J,ve){z[++M]=[ve,J]}),z}function Zp(L,M){return function(z){return L(M(z))}}function ui(L,M){for(var z=-1,J=L.length,ve=0,De=[];++z-1}function TS(o,a){var f=this.__data__,d=nu(f,o);return d<0?(++this.size,f.push([o,a])):f[d][1]=a,this}br.prototype.clear=SS,br.prototype.delete=xS,br.prototype.get=CS,br.prototype.has=AS,br.prototype.set=TS;function Rr(o){var a=-1,f=o==null?0:o.length;for(this.clear();++a=a?o:a)),o}function Dn(o,a,f,d,m,w){var A,k=a&p,D=a&v,W=a&_;if(f&&(A=m?f(o,d,m,w):f(o)),A!==n)return A;if(!qe(o))return o;var H=me(o);if(H){if(A=L2(o),!k)return Zt(o,A)}else{var j=Dt(o),X=j==cr||j==Na;if(pi(o))return Dg(o,k);if(j==Ee||j==Xe||X&&!m){if(A=D||X?{}:Qg(o),!k)return D?w2(o,BS(A,o)):y2(o,ag(A,o))}else{if(!Be[j])return m?o:{};A=D2(o,j,k)}}w||(w=new Xn);var ie=w.get(o);if(ie)return ie;w.set(o,A),Av(o)?o.forEach(function(ce){A.add(Dn(ce,a,f,ce,o,w))}):xv(o)&&o.forEach(function(ce,Ce){A.set(Ce,Dn(ce,a,f,Ce,o,w))});var fe=W?D?Xf:Qf:D?Xt:yt,_e=H?n:fe(o);return bn(_e||o,function(ce,Ce){_e&&(Ce=ce,ce=o[Ce]),ys(A,Ce,Dn(ce,a,f,Ce,o,w))}),A}function WS(o){var a=yt(o);return function(f){return ug(f,o,a)}}function ug(o,a,f){var d=f.length;if(o==null)return!d;for(o=Me(o);d--;){var m=f[d],w=a[m],A=o[m];if(A===n&&!(m in o)||!w(A))return!1}return!0}function lg(o,a,f){if(typeof o!="function")throw new Rn(u);return As(function(){o.apply(n,f)},a)}function ws(o,a,f,d){var m=-1,w=Ua,A=!0,k=o.length,D=[],W=a.length;if(!k)return D;f&&(a=Ye(a,fn(f))),d?(w=mf,A=!1):a.length>=i&&(w=hs,A=!1,a=new ji(a));e:for(;++mm?0:m+f),d=d===n||d>m?m:we(d),d<0&&(d+=m),d=f>d?0:kv(d);f0&&f(k)?a>1?xt(k,a-1,f,d,m):ai(m,k):d||(m[m.length]=k)}return m}var Pf=zg(),hg=zg(!0);function dr(o,a){return o&&Pf(o,a,yt)}function If(o,a){return o&&hg(o,a,yt)}function iu(o,a){return si(a,function(f){return Fr(o[f])})}function Ki(o,a){a=hi(a,o);for(var f=0,d=a.length;o!=null&&fa}function VS(o,a){return o!=null&&ze.call(o,a)}function KS(o,a){return o!=null&&a in Me(o)}function YS(o,a,f){return o>=Lt(a,f)&&o=120&&H.length>=120)?new ji(A&&H):n}H=o[0];var j=-1,X=k[0];e:for(;++j-1;)k!==o&&Za.call(k,D,1),Za.call(o,D,1);return o}function xg(o,a){for(var f=o?a.length:0,d=f-1;f--;){var m=a[f];if(f==d||m!==w){var w=m;Ir(m)?Za.call(o,m,1):Wf(o,m)}}return o}function $f(o,a){return o+qa(rg()*(a-o+1))}function a2(o,a,f,d){for(var m=-1,w=pt(Xa((a-o)/(f||1)),0),A=z(w);w--;)A[d?w:++m]=o,o+=f;return A}function Mf(o,a){var f="";if(!o||a<1||a>C)return f;do a%2&&(f+=o),a=qa(a/2),a&&(o+=o);while(a);return f}function Se(o,a){return ic(Jg(o,a,qt),o+"")}function u2(o){return sg(Ro(o))}function l2(o,a){var f=Ro(o);return gu(f,Vi(a,0,f.length))}function Ss(o,a,f,d){if(!qe(o))return o;a=hi(a,o);for(var m=-1,w=a.length,A=w-1,k=o;k!=null&&++mm?0:m+a),f=f>m?m:f,f<0&&(f+=m),m=a>f?0:f-a>>>0,a>>>=0;for(var w=z(m);++d>>1,A=o[w];A!==null&&!hn(A)&&(f?A<=a:A=i){var W=a?null:x2(o);if(W)return Ma(W);A=!1,m=hs,D=new ji}else D=a?[]:k;e:for(;++d=d?o:Pn(o,a,f)}var Lg=eS||function(o){return St.clearTimeout(o)};function Dg(o,a){if(a)return o.slice();var f=o.length,d=qp?qp(f):new o.constructor(f);return o.copy(d),d}function Kf(o){var a=new o.constructor(o.byteLength);return new Ka(a).set(new Ka(o)),a}function p2(o,a){var f=a?Kf(o.buffer):o.buffer;return new o.constructor(f,o.byteOffset,o.byteLength)}function g2(o){var a=new o.constructor(o.source,pp.exec(o));return a.lastIndex=o.lastIndex,a}function v2(o){return ms?Me(ms.call(o)):{}}function Pg(o,a){var f=a?Kf(o.buffer):o.buffer;return new o.constructor(f,o.byteOffset,o.length)}function Ig(o,a){if(o!==a){var f=o!==n,d=o===null,m=o===o,w=hn(o),A=a!==n,k=a===null,D=a===a,W=hn(a);if(!k&&!W&&!w&&o>a||w&&A&&D&&!k&&!W||d&&A&&D||!f&&D||!m)return 1;if(!d&&!w&&!W&&o=k)return D;var W=f[d];return D*(W=="desc"?-1:1)}}return o.index-a.index}function Fg(o,a,f,d){for(var m=-1,w=o.length,A=f.length,k=-1,D=a.length,W=pt(w-A,0),H=z(D+W),j=!d;++k1?f[m-1]:n,A=m>2?f[2]:n;for(w=o.length>3&&typeof w=="function"?(m--,w):n,A&&$t(f[0],f[1],A)&&(w=m<3?n:w,m=1),a=Me(a);++d-1?m[w?a[A]:A]:n}}function $g(o){return Pr(function(a){var f=a.length,d=f,m=Ln.prototype.thru;for(o&&a.reverse();d--;){var w=a[d];if(typeof w!="function")throw new Rn(u);if(m&&!A&&du(w)=="wrapper")var A=new Ln([],!0)}for(d=A?d:f;++d1&&ke.reverse(),H&&Dk))return!1;var W=w.get(o),H=w.get(a);if(W&&H)return W==a&&H==o;var j=-1,X=!0,ie=f&b?new ji:n;for(w.set(o,a),w.set(a,o);++j1?"& ":"")+a[d],a=a.join(f>2?", ":" "),o.replace(FE,`{ +/* [wrapped with `+a+`] */ +`)}function I2(o){return me(o)||Qi(o)||!!(tg&&o&&o[tg])}function Ir(o,a){var f=typeof o;return a=a??C,!!a&&(f=="number"||f!="symbol"&&jE.test(o))&&o>-1&&o%1==0&&o0){if(++a>=ye)return arguments[0]}else a=0;return o.apply(n,arguments)}}function gu(o,a){var f=-1,d=o.length,m=d-1;for(a=a===n?d:a;++f1?o[a-1]:n;return f=typeof f=="function"?(o.pop(),f):n,cv(o,f)});function hv(o){var a=y(o);return a.__chain__=!0,a}function Hx(o,a){return a(o),o}function vu(o,a){return a(o)}var jx=Pr(function(o){var a=o.length,f=a?o[0]:0,d=this.__wrapped__,m=function(w){return Df(w,o)};return a>1||this.__actions__.length||!(d instanceof Te)||!Ir(f)?this.thru(m):(d=d.slice(f,+f+(a?1:0)),d.__actions__.push({func:vu,args:[m],thisArg:n}),new Ln(d,this.__chain__).thru(function(w){return a&&!w.length&&w.push(n),w}))});function Vx(){return hv(this)}function Kx(){return new Ln(this.value(),this.__chain__)}function Yx(){this.__values__===n&&(this.__values__=Tv(this.value()));var o=this.__index__>=this.__values__.length,a=o?n:this.__values__[this.__index__++];return{done:o,value:a}}function Zx(){return this}function Qx(o){for(var a,f=this;f instanceof tu;){var d=ov(f);d.__index__=0,d.__values__=n,a?m.__wrapped__=d:a=d;var m=d;f=f.__wrapped__}return m.__wrapped__=o,a}function Xx(){var o=this.__wrapped__;if(o instanceof Te){var a=o;return this.__actions__.length&&(a=new Te(this)),a=a.reverse(),a.__actions__.push({func:vu,args:[oc],thisArg:n}),new Ln(a,this.__chain__)}return this.thru(oc)}function qx(){return bg(this.__wrapped__,this.__actions__)}var Jx=uu(function(o,a,f){ze.call(o,f)?++o[f]:Lr(o,f,1)});function eC(o,a,f){var d=me(o)?Mp:HS;return f&&$t(o,a,f)&&(a=n),d(o,ue(a,3))}function tC(o,a){var f=me(o)?si:cg;return f(o,ue(a,3))}var nC=Ug(sv),rC=Ug(av);function iC(o,a){return xt(mu(o,a),1)}function oC(o,a){return xt(mu(o,a),ge)}function sC(o,a,f){return f=f===n?1:we(f),xt(mu(o,a),f)}function dv(o,a){var f=me(o)?bn:fi;return f(o,ue(a,3))}function pv(o,a){var f=me(o)?A_:fg;return f(o,ue(a,3))}var aC=uu(function(o,a,f){ze.call(o,f)?o[f].push(a):Lr(o,f,[a])});function uC(o,a,f,d){o=Qt(o)?o:Ro(o),f=f&&!d?we(f):0;var m=o.length;return f<0&&(f=pt(m+f,0)),Su(o)?f<=m&&o.indexOf(a,f)>-1:!!m&&mo(o,a,f)>-1}var lC=Se(function(o,a,f){var d=-1,m=typeof a=="function",w=Qt(o)?z(o.length):[];return fi(o,function(A){w[++d]=m?ln(a,A,f):Es(A,a,f)}),w}),fC=uu(function(o,a,f){Lr(o,f,a)});function mu(o,a){var f=me(o)?Ye:mg;return f(o,ue(a,3))}function cC(o,a,f,d){return o==null?[]:(me(a)||(a=a==null?[]:[a]),f=d?n:f,me(f)||(f=f==null?[]:[f]),_g(o,a,f))}var hC=uu(function(o,a,f){o[f?0:1].push(a)},function(){return[[],[]]});function dC(o,a,f){var d=me(o)?yf:jp,m=arguments.length<3;return d(o,ue(a,4),f,m,fi)}function pC(o,a,f){var d=me(o)?T_:jp,m=arguments.length<3;return d(o,ue(a,4),f,m,fg)}function gC(o,a){var f=me(o)?si:cg;return f(o,Eu(ue(a,3)))}function vC(o){var a=me(o)?sg:u2;return a(o)}function mC(o,a,f){(f?$t(o,a,f):a===n)?a=1:a=we(a);var d=me(o)?US:l2;return d(o,a)}function yC(o){var a=me(o)?$S:c2;return a(o)}function wC(o){if(o==null)return 0;if(Qt(o))return Su(o)?wo(o):o.length;var a=Dt(o);return a==Rt||a==U?o.size:zf(o).length}function EC(o,a,f){var d=me(o)?wf:h2;return f&&$t(o,a,f)&&(a=n),d(o,ue(a,3))}var _C=Se(function(o,a){if(o==null)return[];var f=a.length;return f>1&&$t(o,a[0],a[1])?a=[]:f>2&&$t(a[0],a[1],a[2])&&(a=[a[0]]),_g(o,xt(a,1),[])}),yu=tS||function(){return St.Date.now()};function SC(o,a){if(typeof a!="function")throw new Rn(u);return o=we(o),function(){if(--o<1)return a.apply(this,arguments)}}function gv(o,a,f){return a=f?n:a,a=o&&a==null?o.length:a,Dr(o,F,n,n,n,n,a)}function vv(o,a){var f;if(typeof a!="function")throw new Rn(u);return o=we(o),function(){return--o>0&&(f=a.apply(this,arguments)),o<=1&&(a=n),f}}var ac=Se(function(o,a,f){var d=N;if(f.length){var m=ui(f,ko(ac));d|=O}return Dr(o,d,a,f,m)}),mv=Se(function(o,a,f){var d=N|x;if(f.length){var m=ui(f,ko(mv));d|=O}return Dr(a,d,o,f,m)});function yv(o,a,f){a=f?n:a;var d=Dr(o,S,n,n,n,n,n,a);return d.placeholder=yv.placeholder,d}function wv(o,a,f){a=f?n:a;var d=Dr(o,R,n,n,n,n,n,a);return d.placeholder=wv.placeholder,d}function Ev(o,a,f){var d,m,w,A,k,D,W=0,H=!1,j=!1,X=!0;if(typeof o!="function")throw new Rn(u);a=Fn(a)||0,qe(f)&&(H=!!f.leading,j="maxWait"in f,w=j?pt(Fn(f.maxWait)||0,a):w,X="trailing"in f?!!f.trailing:X);function ie(ut){var Jn=d,Or=m;return d=m=n,W=ut,A=o.apply(Or,Jn),A}function fe(ut){return W=ut,k=As(Ce,a),H?ie(ut):A}function _e(ut){var Jn=ut-D,Or=ut-W,Uv=a-Jn;return j?Lt(Uv,w-Or):Uv}function ce(ut){var Jn=ut-D,Or=ut-W;return D===n||Jn>=a||Jn<0||j&&Or>=w}function Ce(){var ut=yu();if(ce(ut))return ke(ut);k=As(Ce,_e(ut))}function ke(ut){return k=n,X&&d?ie(ut):(d=m=n,A)}function dn(){k!==n&&Lg(k),W=0,d=D=m=k=n}function Mt(){return k===n?A:ke(yu())}function pn(){var ut=yu(),Jn=ce(ut);if(d=arguments,m=this,D=ut,Jn){if(k===n)return fe(D);if(j)return Lg(k),k=As(Ce,a),ie(D)}return k===n&&(k=As(Ce,a)),A}return pn.cancel=dn,pn.flush=Mt,pn}var xC=Se(function(o,a){return lg(o,1,a)}),CC=Se(function(o,a,f){return lg(o,Fn(a)||0,f)});function AC(o){return Dr(o,I)}function wu(o,a){if(typeof o!="function"||a!=null&&typeof a!="function")throw new Rn(u);var f=function(){var d=arguments,m=a?a.apply(this,d):d[0],w=f.cache;if(w.has(m))return w.get(m);var A=o.apply(this,d);return f.cache=w.set(m,A)||w,A};return f.cache=new(wu.Cache||Rr),f}wu.Cache=Rr;function Eu(o){if(typeof o!="function")throw new Rn(u);return function(){var a=arguments;switch(a.length){case 0:return!o.call(this);case 1:return!o.call(this,a[0]);case 2:return!o.call(this,a[0],a[1]);case 3:return!o.call(this,a[0],a[1],a[2])}return!o.apply(this,a)}}function TC(o){return vv(2,o)}var kC=d2(function(o,a){a=a.length==1&&me(a[0])?Ye(a[0],fn(ue())):Ye(xt(a,1),fn(ue()));var f=a.length;return Se(function(d){for(var m=-1,w=Lt(d.length,f);++m=a}),Qi=pg(function(){return arguments}())?pg:function(o){return it(o)&&ze.call(o,"callee")&&!eg.call(o,"callee")},me=z.isArray,BC=Np?fn(Np):QS;function Qt(o){return o!=null&&_u(o.length)&&!Fr(o)}function at(o){return it(o)&&Qt(o)}function WC(o){return o===!0||o===!1||it(o)&&Ut(o)==ae}var pi=rS||wc,HC=Op?fn(Op):XS;function jC(o){return it(o)&&o.nodeType===1&&!Ts(o)}function VC(o){if(o==null)return!0;if(Qt(o)&&(me(o)||typeof o=="string"||typeof o.splice=="function"||pi(o)||bo(o)||Qi(o)))return!o.length;var a=Dt(o);if(a==Rt||a==U)return!o.size;if(Cs(o))return!zf(o).length;for(var f in o)if(ze.call(o,f))return!1;return!0}function KC(o,a){return _s(o,a)}function YC(o,a,f){f=typeof f=="function"?f:n;var d=f?f(o,a):n;return d===n?_s(o,a,n,f):!!d}function lc(o){if(!it(o))return!1;var a=Ut(o);return a==go||a==xn||typeof o.message=="string"&&typeof o.name=="string"&&!Ts(o)}function ZC(o){return typeof o=="number"&&ng(o)}function Fr(o){if(!qe(o))return!1;var a=Ut(o);return a==cr||a==Na||a==rt||a==de}function Sv(o){return typeof o=="number"&&o==we(o)}function _u(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=C}function qe(o){var a=typeof o;return o!=null&&(a=="object"||a=="function")}function it(o){return o!=null&&typeof o=="object"}var xv=zp?fn(zp):JS;function QC(o,a){return o===a||Of(o,a,Jf(a))}function XC(o,a,f){return f=typeof f=="function"?f:n,Of(o,a,Jf(a),f)}function qC(o){return Cv(o)&&o!=+o}function JC(o){if(O2(o))throw new ve(s);return gg(o)}function eA(o){return o===null}function tA(o){return o==null}function Cv(o){return typeof o=="number"||it(o)&&Ut(o)==Oe}function Ts(o){if(!it(o)||Ut(o)!=Ee)return!1;var a=Ya(o);if(a===null)return!0;var f=ze.call(a,"constructor")&&a.constructor;return typeof f=="function"&&f instanceof f&&Ha.call(f)==X_}var fc=Gp?fn(Gp):e2;function nA(o){return Sv(o)&&o>=-C&&o<=C}var Av=Up?fn(Up):t2;function Su(o){return typeof o=="string"||!me(o)&&it(o)&&Ut(o)==un}function hn(o){return typeof o=="symbol"||it(o)&&Ut(o)==Yn}var bo=$p?fn($p):n2;function rA(o){return o===n}function iA(o){return it(o)&&Dt(o)==An}function oA(o){return it(o)&&Ut(o)==Yt}var sA=hu(Gf),aA=hu(function(o,a){return o<=a});function Tv(o){if(!o)return[];if(Qt(o))return Su(o)?Qn(o):Zt(o);if(ds&&o[ds])return U_(o[ds]());var a=Dt(o),f=a==Rt?Af:a==U?Ma:Ro;return f(o)}function Nr(o){if(!o)return o===0?o:0;if(o=Fn(o),o===ge||o===-ge){var a=o<0?-1:1;return a*re}return o===o?o:0}function we(o){var a=Nr(o),f=a%1;return a===a?f?a-f:a:0}function kv(o){return o?Vi(we(o),0,$):0}function Fn(o){if(typeof o=="number")return o;if(hn(o))return ne;if(qe(o)){var a=typeof o.valueOf=="function"?o.valueOf():o;o=qe(a)?a+"":a}if(typeof o!="string")return o===0?o:+o;o=Vp(o);var f=BE.test(o);return f||HE.test(o)?S_(o.slice(2),f?2:8):ME.test(o)?ne:+o}function bv(o){return pr(o,Xt(o))}function uA(o){return o?Vi(we(o),-C,C):o===0?o:0}function Fe(o){return o==null?"":cn(o)}var lA=Ao(function(o,a){if(Cs(a)||Qt(a)){pr(a,yt(a),o);return}for(var f in a)ze.call(a,f)&&ys(o,f,a[f])}),Rv=Ao(function(o,a){pr(a,Xt(a),o)}),xu=Ao(function(o,a,f,d){pr(a,Xt(a),o,d)}),fA=Ao(function(o,a,f,d){pr(a,yt(a),o,d)}),cA=Pr(Df);function hA(o,a){var f=Co(o);return a==null?f:ag(f,a)}var dA=Se(function(o,a){o=Me(o);var f=-1,d=a.length,m=d>2?a[2]:n;for(m&&$t(a[0],a[1],m)&&(d=1);++f1),w}),pr(o,Xf(o),f),d&&(f=Dn(f,p|v|_,C2));for(var m=a.length;m--;)Wf(f,a[m]);return f});function DA(o,a){return Dv(o,Eu(ue(a)))}var PA=Pr(function(o,a){return o==null?{}:o2(o,a)});function Dv(o,a){if(o==null)return{};var f=Ye(Xf(o),function(d){return[d]});return a=ue(a),Sg(o,f,function(d,m){return a(d,m[0])})}function IA(o,a,f){a=hi(a,o);var d=-1,m=a.length;for(m||(m=1,o=n);++da){var d=o;o=a,a=d}if(f||o%1||a%1){var m=rg();return Lt(o+m*(a-o+__("1e-"+((m+"").length-1))),a)}return $f(o,a)}var HA=To(function(o,a,f){return a=a.toLowerCase(),o+(f?Fv(a):a)});function Fv(o){return dc(Fe(o).toLowerCase())}function Nv(o){return o=Fe(o),o&&o.replace(VE,F_).replace(c_,"")}function jA(o,a,f){o=Fe(o),a=cn(a);var d=o.length;f=f===n?d:Vi(we(f),0,d);var m=f;return f-=a.length,f>=0&&o.slice(f,m)==a}function VA(o){return o=Fe(o),o&&TE.test(o)?o.replace(hp,N_):o}function KA(o){return o=Fe(o),o&&PE.test(o)?o.replace(uf,"\\$&"):o}var YA=To(function(o,a,f){return o+(f?"-":"")+a.toLowerCase()}),ZA=To(function(o,a,f){return o+(f?" ":"")+a.toLowerCase()}),QA=Gg("toLowerCase");function XA(o,a,f){o=Fe(o),a=we(a);var d=a?wo(o):0;if(!a||d>=a)return o;var m=(a-d)/2;return cu(qa(m),f)+o+cu(Xa(m),f)}function qA(o,a,f){o=Fe(o),a=we(a);var d=a?wo(o):0;return a&&d>>0,f?(o=Fe(o),o&&(typeof a=="string"||a!=null&&!fc(a))&&(a=cn(a),!a&&yo(o))?di(Qn(o),0,f):o.split(a,f)):[]}var oT=To(function(o,a,f){return o+(f?" ":"")+dc(a)});function sT(o,a,f){return o=Fe(o),f=f==null?0:Vi(we(f),0,o.length),a=cn(a),o.slice(f,f+a.length)==a}function aT(o,a,f){var d=y.templateSettings;f&&$t(o,a,f)&&(a=n),o=Fe(o),a=xu({},a,d,jg);var m=xu({},a.imports,d.imports,jg),w=yt(m),A=Cf(m,w),k,D,W=0,H=a.interpolate||Oa,j="__p += '",X=Tf((a.escape||Oa).source+"|"+H.source+"|"+(H===dp?$E:Oa).source+"|"+(a.evaluate||Oa).source+"|$","g"),ie="//# sourceURL="+(ze.call(a,"sourceURL")?(a.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++v_+"]")+` +`;o.replace(X,function(ce,Ce,ke,dn,Mt,pn){return ke||(ke=dn),j+=o.slice(W,pn).replace(KE,O_),Ce&&(k=!0,j+=`' + +__e(`+Ce+`) + +'`),Mt&&(D=!0,j+=`'; +`+Mt+`; +__p += '`),ke&&(j+=`' + +((__t = (`+ke+`)) == null ? '' : __t) + +'`),W=pn+ce.length,ce}),j+=`'; +`;var fe=ze.call(a,"variable")&&a.variable;if(!fe)j=`with (obj) { +`+j+` +} +`;else if(GE.test(fe))throw new ve(l);j=(D?j.replace(SE,""):j).replace(xE,"$1").replace(CE,"$1;"),j="function("+(fe||"obj")+`) { +`+(fe?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(k?", __e = _.escape":"")+(D?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+j+`return __p +}`;var _e=zv(function(){return De(w,ie+"return "+j).apply(n,A)});if(_e.source=j,lc(_e))throw _e;return _e}function uT(o){return Fe(o).toLowerCase()}function lT(o){return Fe(o).toUpperCase()}function fT(o,a,f){if(o=Fe(o),o&&(f||a===n))return Vp(o);if(!o||!(a=cn(a)))return o;var d=Qn(o),m=Qn(a),w=Kp(d,m),A=Yp(d,m)+1;return di(d,w,A).join("")}function cT(o,a,f){if(o=Fe(o),o&&(f||a===n))return o.slice(0,Qp(o)+1);if(!o||!(a=cn(a)))return o;var d=Qn(o),m=Yp(d,Qn(a))+1;return di(d,0,m).join("")}function hT(o,a,f){if(o=Fe(o),o&&(f||a===n))return o.replace(lf,"");if(!o||!(a=cn(a)))return o;var d=Qn(o),m=Kp(d,Qn(a));return di(d,m).join("")}function dT(o,a){var f=ee,d=be;if(qe(a)){var m="separator"in a?a.separator:m;f="length"in a?we(a.length):f,d="omission"in a?cn(a.omission):d}o=Fe(o);var w=o.length;if(yo(o)){var A=Qn(o);w=A.length}if(f>=w)return o;var k=f-wo(d);if(k<1)return d;var D=A?di(A,0,k).join(""):o.slice(0,k);if(m===n)return D+d;if(A&&(k+=D.length-k),fc(m)){if(o.slice(k).search(m)){var W,H=D;for(m.global||(m=Tf(m.source,Fe(pp.exec(m))+"g")),m.lastIndex=0;W=m.exec(H);)var j=W.index;D=D.slice(0,j===n?k:j)}}else if(o.indexOf(cn(m),k)!=k){var X=D.lastIndexOf(m);X>-1&&(D=D.slice(0,X))}return D+d}function pT(o){return o=Fe(o),o&&AE.test(o)?o.replace(cp,W_):o}var gT=To(function(o,a,f){return o+(f?" ":"")+a.toUpperCase()}),dc=Gg("toUpperCase");function Ov(o,a,f){return o=Fe(o),a=f?n:a,a===n?G_(o)?V_(o):R_(o):o.match(a)||[]}var zv=Se(function(o,a){try{return ln(o,n,a)}catch(f){return lc(f)?f:new ve(f)}}),vT=Pr(function(o,a){return bn(a,function(f){f=gr(f),Lr(o,f,ac(o[f],o))}),o});function mT(o){var a=o==null?0:o.length,f=ue();return o=a?Ye(o,function(d){if(typeof d[1]!="function")throw new Rn(u);return[f(d[0]),d[1]]}):[],Se(function(d){for(var m=-1;++mC)return[];var f=$,d=Lt(o,$);a=ue(a),o-=$;for(var m=xf(d,a);++f0||a<0)?new Te(f):(o<0?f=f.takeRight(-o):o&&(f=f.drop(o)),a!==n&&(a=we(a),f=a<0?f.dropRight(-a):f.take(a-o)),f)},Te.prototype.takeRightWhile=function(o){return this.reverse().takeWhile(o).reverse()},Te.prototype.toArray=function(){return this.take($)},dr(Te.prototype,function(o,a){var f=/^(?:filter|find|map|reject)|While$/.test(a),d=/^(?:head|last)$/.test(a),m=y[d?"take"+(a=="last"?"Right":""):a],w=d||/^find/.test(a);m&&(y.prototype[a]=function(){var A=this.__wrapped__,k=d?[1]:arguments,D=A instanceof Te,W=k[0],H=D||me(A),j=function(Ce){var ke=m.apply(y,ai([Ce],k));return d&&X?ke[0]:ke};H&&f&&typeof W=="function"&&W.length!=1&&(D=H=!1);var X=this.__chain__,ie=!!this.__actions__.length,fe=w&&!X,_e=D&&!ie;if(!w&&H){A=_e?A:new Te(this);var ce=o.apply(A,k);return ce.__actions__.push({func:vu,args:[j],thisArg:n}),new Ln(ce,X)}return fe&&_e?o.apply(this,k):(ce=this.thru(j),fe?d?ce.value()[0]:ce.value():ce)})}),bn(["pop","push","shift","sort","splice","unshift"],function(o){var a=Ba[o],f=/^(?:push|sort|unshift)$/.test(o)?"tap":"thru",d=/^(?:pop|shift)$/.test(o);y.prototype[o]=function(){var m=arguments;if(d&&!this.__chain__){var w=this.value();return a.apply(me(w)?w:[],m)}return this[f](function(A){return a.apply(me(A)?A:[],m)})}}),dr(Te.prototype,function(o,a){var f=y[a];if(f){var d=f.name+"";ze.call(xo,d)||(xo[d]=[]),xo[d].push({name:a,func:f})}}),xo[lu(n,x).name]=[{name:"wrapper",func:n}],Te.prototype.clone=pS,Te.prototype.reverse=gS,Te.prototype.value=vS,y.prototype.at=jx,y.prototype.chain=Vx,y.prototype.commit=Kx,y.prototype.next=Yx,y.prototype.plant=Qx,y.prototype.reverse=Xx,y.prototype.toJSON=y.prototype.valueOf=y.prototype.value=qx,y.prototype.first=y.prototype.head,ds&&(y.prototype[ds]=Zx),y},Eo=K_();Bi?((Bi.exports=Eo)._=Eo,gf._=Eo):St._=Eo}).call(Er)})(Nl,Nl.exports);var Ht=Nl.exports;async function o1(e){const t=await e;return(Array.isArray(t)?t:[t]).flatMap(r=>typeof r=="string"?[{id:r}]:r?[r]:[])}const Ra={refs:{label:"References",color:"#ebebeb",threshold:5e3,getValues:e=>e.referenced_works},authors:{label:"Authors",color:"#ffe915",threshold:50,getValues:e=>{var t;return(t=e.authorships)==null?void 0:t.map(({author:n})=>({id:n.id,label:n.display_name}))}},sources:{label:"Sources",color:"#a7d30d",threshold:50,getValues:e=>[e.primary_location,...e.locations||[]].flatMap(({source:t}={})=>t!=null&&t.id?[{id:t.id,label:t.display_name}]:[])},institutions:{label:"Institutions",color:"#e22521",threshold:50,getValues:e=>{var t;return(t=e.authorships)==null?void 0:t.flatMap(({institutions:n})=>n.flatMap(r=>({id:r.id,label:r.display_name})))}},countries:{label:"Countries",color:"#df60bf",threshold:25,getValues:e=>{var t;return(t=e.authorships)==null?void 0:t.flatMap(({countries:n})=>n)}},funders:{label:"Funders",color:"#ff8f2e",threshold:25,getValues:e=>{var t;return(t=e.grants)==null?void 0:t.map(n=>({id:n.funder,label:n.funder_display_name}))}},concepts:{label:"Concepts",color:"#9dabf5",threshold:200,getValues:e=>{var t;return(t=e.concepts)==null?void 0:t.map(n=>({id:n.id,label:n.display_name}))}}},yn=["refs","authors","sources","institutions","countries","funders","concepts"];async function zR(e=0){return new Promise(t=>e?setTimeout(t,e):requestIdleCallback(t))}const Xm=200;async function GR(e){let t=0;const n=new URL(e);n.searchParams.set("select","id"),n.searchParams.set("mailto","****@****.com"),n.searchParams.set("per-page","1"),n.searchParams.set("page","1");try{const r=await fetch(n);if(!r.ok)throw new Error(`Network response was ${r.status} ${r.statusText}`);t=(await r.json()).meta.count}catch(r){console.error(`Error while fetching works count: + ${r}`)}return t}async function UR(e,{maxWorks:t=1e4,updateProgress:n}={}){const r=await GR(e),i=Math.ceil(Math.min(r,t)/Xm);let s=0;const u=new URL(e);return u.searchParams.set("sort","cited_by_count:desc"),u.searchParams.set("select","id,title,publication_year,primary_location,authorships,concepts,locations,grants,referenced_works,cited_by_count"),u.searchParams.set("mailto","****@****.com"),u.searchParams.set("per-page",`${Xm}`),(await Promise.all([...Array(i).keys()].map(async c=>{try{u.searchParams.set("page",`${c+1}`);let h=await fetch(u);if(h.status==429)for(let p=1;p<=3&&!h.ok;p++)await zR(p*100),h=await fetch(u);if(!h.ok)throw new Error(`Network response was ${h.status} ${h.statusText}`);const g=await h.json();return s++,n&&n(Math.round(s/i*100)),g.results}catch(h){console.error(`Error while fetching works: + ${h}`)}return[]}))).flat().slice(0,t).filter(c=>c)}async function $R(e){const t=[];return await Promise.all(e.map(async n=>{const r=await n.text();JSON.parse(r).results.forEach(s=>t.push(s))})),t}async function MR(e){const t=Ht.zipObject(yn,yn.map(()=>({})));for(let n=0;n{t[s][c]=t[s][c]||{count:0,label:h},t[s][c].count++})}}return t}var ep={exports:{}},Qo=typeof Reflect=="object"?Reflect:null,qm=Qo&&typeof Qo.apply=="function"?Qo.apply:function(t,n,r){return Function.prototype.apply.call(t,n,r)},al;Qo&&typeof Qo.ownKeys=="function"?al=Qo.ownKeys:Object.getOwnPropertySymbols?al=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:al=function(t){return Object.getOwnPropertyNames(t)};function BR(e){console&&console.warn&&console.warn(e)}var s1=Number.isNaN||function(t){return t!==t};function Ue(){Ue.init.call(this)}ep.exports=Ue;ep.exports.once=VR;Ue.EventEmitter=Ue;Ue.prototype._events=void 0;Ue.prototype._eventsCount=0;Ue.prototype._maxListeners=void 0;var Jm=10;function ef(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(Ue,"defaultMaxListeners",{enumerable:!0,get:function(){return Jm},set:function(e){if(typeof e!="number"||e<0||s1(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");Jm=e}});Ue.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};Ue.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||s1(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function a1(e){return e._maxListeners===void 0?Ue.defaultMaxListeners:e._maxListeners}Ue.prototype.getMaxListeners=function(){return a1(this)};Ue.prototype.emit=function(t){for(var n=[],r=1;r0&&(u=n[0]),u instanceof Error)throw u;var l=new Error("Unhandled error."+(u?" ("+u.message+")":""));throw l.context=u,l}var c=s[t];if(c===void 0)return!1;if(typeof c=="function")qm(c,this,n);else for(var h=c.length,g=h1(c,h),r=0;r0&&u.length>i&&!u.warned){u.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+u.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=u.length,BR(l)}return e}Ue.prototype.addListener=function(t,n){return u1(this,t,n,!1)};Ue.prototype.on=Ue.prototype.addListener;Ue.prototype.prependListener=function(t,n){return u1(this,t,n,!0)};function WR(){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 l1(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=WR.bind(r);return i.listener=n,r.wrapFn=i,i}Ue.prototype.once=function(t,n){return ef(n),this.on(t,l1(this,t,n)),this};Ue.prototype.prependOnceListener=function(t,n){return ef(n),this.prependListener(t,l1(this,t,n)),this};Ue.prototype.removeListener=function(t,n){var r,i,s,u,l;if(ef(n),i=this._events,i===void 0)return this;if(r=i[t],r===void 0)return this;if(r===n||r.listener===n)--this._eventsCount===0?this._events=Object.create(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,r.listener||n));else if(typeof r!="function"){for(s=-1,u=r.length-1;u>=0;u--)if(r[u]===n||r[u].listener===n){l=r[u].listener,s=u;break}if(s<0)return this;s===0?r.shift():HR(r,s),r.length===1&&(i[t]=r[0]),i.removeListener!==void 0&&this.emit("removeListener",t,l||n)}return this};Ue.prototype.off=Ue.prototype.removeListener;Ue.prototype.removeAllListeners=function(t){var n,r,i;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[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete r[t]),this;if(arguments.length===0){var s=Object.keys(r),u;for(i=0;i=0;i--)this.removeListener(t,n[i]);return this};function f1(e,t,n){var r=e._events;if(r===void 0)return[];var i=r[t];return i===void 0?[]:typeof i=="function"?n?[i.listener||i]:[i]:n?jR(i):h1(i,i.length)}Ue.prototype.listeners=function(t){return f1(this,t,!0)};Ue.prototype.rawListeners=function(t){return f1(this,t,!1)};Ue.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):c1.call(e,t)};Ue.prototype.listenerCount=c1;function c1(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n=="function")return 1;if(n!==void 0)return n.length}return 0}Ue.prototype.eventNames=function(){return this._eventsCount>0?al(this._events):[]};function h1(e,t){for(var n=new Array(t),r=0;r=t?{done:!0}:{done:!1,value:e[n++]}})};Cr.empty=function(){var e=new Cr(function(){return{done:!0}});return e};Cr.fromSequence=function(e){var t=0,n=e.length;return new Cr(function(){return t>=n?{done:!0}:{done:!1,value:e[t++]}})};Cr.is=function(e){return e instanceof Cr?!0:typeof e=="object"&&e!==null&&typeof e.next=="function"};var tf=Cr;const Hn=Oi(tf);var tp={};tp.ARRAY_BUFFER_SUPPORT=typeof ArrayBuffer<"u";tp.SYMBOL_SUPPORT=typeof Symbol<"u";var YR=tf,g1=tp,ZR=g1.ARRAY_BUFFER_SUPPORT,QR=g1.SYMBOL_SUPPORT;function XR(e){return typeof e=="string"||Array.isArray(e)||ZR&&ArrayBuffer.isView(e)?YR.fromSequence(e):typeof e!="object"||e===null?null:QR&&typeof e[Symbol.iterator]=="function"?e[Symbol.iterator]():typeof e.next=="function"?e:null}var v1=function(t){var n=XR(t);if(!n)throw new Error("obliterator: target is not iterable nor a valid iterator.");return n},qR=v1,JR=function(t,n){for(var r=arguments.length>1?n:1/0,i=r!==1/0?new Array(r):[],s,u=0,l=qR(t);;){if(u===r)return i;if(s=l.next(),s.done)return u!==n&&(i.length=u),i;i[u++]=s.value}};const m1=Oi(JR);var eL=tf,tL=v1,nL=function(){var t=arguments,n=null,r=-1;return new eL(function(){var s=null;do{if(n===null){if(r++,r>=t.length)return{done:!0};n=tL(t[r])}if(s=n.next(),s.done===!0){n=null;continue}break}while(!0);return s})};const Vr=Oi(nL);function rL(){const e=arguments[0];for(let t=1,n=arguments.length;te++}class np extends Error{constructor(t){super(),this.name="GraphError",this.message=t}}class q extends np{constructor(t){super(t),this.name="InvalidArgumentsGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,q.prototype.constructor)}}class Q extends np{constructor(t){super(t),this.name="NotFoundGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Q.prototype.constructor)}}class le extends np{constructor(t){super(t),this.name="UsageGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,le.prototype.constructor)}}function w1(e,t){this.key=e,this.attributes=t,this.clear()}w1.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 E1(e,t){this.key=e,this.attributes=t,this.clear()}E1.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.directedLoops=0,this.in={},this.out={}};function _1(e,t){this.key=e,this.attributes=t,this.clear()}_1.prototype.clear=function(){this.undirectedDegree=0,this.undirectedLoops=0,this.undirected={}};function fs(e,t,n,r,i){this.key=t,this.attributes=i,this.undirected=e,this.source=n,this.target=r}fs.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)};fs.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],s=i[r];if(typeof s>"u"){i[r]=this,this.undirected&&n===r||(this.target[t][n]=this);return}s.previous=this,this.next=s,i[r]=this,this.target[t][n]=this};fs.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]};fs.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 S1=0,x1=1,oL=2,C1=3;function qr(e,t,n,r,i,s,u){let l,c,h,g;if(r=""+r,n===S1){if(l=e._nodes.get(r),!l)throw new Q(`Graph.${t}: could not find the "${r}" node in the graph.`);h=i,g=s}else if(n===C1){if(i=""+i,c=e._edges.get(i),!c)throw new Q(`Graph.${t}: could not find the "${i}" edge in the graph.`);const p=c.source.key,v=c.target.key;if(r===p)l=c.target;else if(r===v)l=c.source;else throw new Q(`Graph.${t}: the "${r}" node is not attached to the "${i}" edge (${p}, ${v}).`);h=s,g=u}else{if(c=e._edges.get(r),!c)throw new Q(`Graph.${t}: could not find the "${r}" edge in the graph.`);n===x1?l=c.source:l=c.target,h=i,g=s}return[l,h,g]}function sL(e,t,n){e.prototype[t]=function(r,i,s){const[u,l]=qr(this,t,n,r,i,s);return u.attributes[l]}}function aL(e,t,n){e.prototype[t]=function(r,i){const[s]=qr(this,t,n,r,i);return s.attributes}}function uL(e,t,n){e.prototype[t]=function(r,i,s){const[u,l]=qr(this,t,n,r,i,s);return u.attributes.hasOwnProperty(l)}}function lL(e,t,n){e.prototype[t]=function(r,i,s,u){const[l,c,h]=qr(this,t,n,r,i,s,u);return l.attributes[c]=h,this.emit("nodeAttributesUpdated",{key:l.key,type:"set",attributes:l.attributes,name:c}),this}}function fL(e,t,n){e.prototype[t]=function(r,i,s,u){const[l,c,h]=qr(this,t,n,r,i,s,u);if(typeof h!="function")throw new q(`Graph.${t}: updater should be a function.`);const g=l.attributes,p=h(g[c]);return g[c]=p,this.emit("nodeAttributesUpdated",{key:l.key,type:"set",attributes:l.attributes,name:c}),this}}function cL(e,t,n){e.prototype[t]=function(r,i,s){const[u,l]=qr(this,t,n,r,i,s);return delete u.attributes[l],this.emit("nodeAttributesUpdated",{key:u.key,type:"remove",attributes:u.attributes,name:l}),this}}function hL(e,t,n){e.prototype[t]=function(r,i,s){const[u,l]=qr(this,t,n,r,i,s);if(!At(l))throw new q(`Graph.${t}: provided attributes are not a plain object.`);return u.attributes=l,this.emit("nodeAttributesUpdated",{key:u.key,type:"replace",attributes:u.attributes}),this}}function dL(e,t,n){e.prototype[t]=function(r,i,s){const[u,l]=qr(this,t,n,r,i,s);if(!At(l))throw new q(`Graph.${t}: provided attributes are not a plain object.`);return vt(u.attributes,l),this.emit("nodeAttributesUpdated",{key:u.key,type:"merge",attributes:u.attributes,data:l}),this}}function pL(e,t,n){e.prototype[t]=function(r,i,s){const[u,l]=qr(this,t,n,r,i,s);if(typeof l!="function")throw new q(`Graph.${t}: provided updater is not a function.`);return u.attributes=l(u.attributes),this.emit("nodeAttributesUpdated",{key:u.key,type:"update",attributes:u.attributes}),this}}const gL=[{name:e=>`get${e}Attribute`,attacher:sL},{name:e=>`get${e}Attributes`,attacher:aL},{name:e=>`has${e}Attribute`,attacher:uL},{name:e=>`set${e}Attribute`,attacher:lL},{name:e=>`update${e}Attribute`,attacher:fL},{name:e=>`remove${e}Attribute`,attacher:cL},{name:e=>`replace${e}Attributes`,attacher:hL},{name:e=>`merge${e}Attributes`,attacher:dL},{name:e=>`update${e}Attributes`,attacher:pL}];function vL(e){gL.forEach(function({name:t,attacher:n}){n(e,t("Node"),S1),n(e,t("Source"),x1),n(e,t("Target"),oL),n(e,t("Opposite"),C1)})}function mL(e,t,n){e.prototype[t]=function(r,i){let s;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new le(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new le(`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,l=""+i;if(i=arguments[2],s=Mn(this,u,l,n),!s)throw new Q(`Graph.${t}: could not find an edge for the given path ("${u}" - "${l}").`)}else{if(n!=="mixed")throw new le(`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,s=this._edges.get(r),!s)throw new Q(`Graph.${t}: could not find the "${r}" edge in the graph.`)}return s.attributes[i]}}function yL(e,t,n){e.prototype[t]=function(r){let i;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new le(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>1){if(this.multi)throw new le(`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=""+r,u=""+arguments[1];if(i=Mn(this,s,u,n),!i)throw new Q(`Graph.${t}: could not find an edge for the given path ("${s}" - "${u}").`)}else{if(n!=="mixed")throw new le(`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 Q(`Graph.${t}: could not find the "${r}" edge in the graph.`)}return i.attributes}}function wL(e,t,n){e.prototype[t]=function(r,i){let s;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new le(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new le(`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,l=""+i;if(i=arguments[2],s=Mn(this,u,l,n),!s)throw new Q(`Graph.${t}: could not find an edge for the given path ("${u}" - "${l}").`)}else{if(n!=="mixed")throw new le(`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,s=this._edges.get(r),!s)throw new Q(`Graph.${t}: could not find the "${r}" edge in the graph.`)}return s.attributes.hasOwnProperty(i)}}function EL(e,t,n){e.prototype[t]=function(r,i,s){let u;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new le(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>3){if(this.multi)throw new le(`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,c=""+i;if(i=arguments[2],s=arguments[3],u=Mn(this,l,c,n),!u)throw new Q(`Graph.${t}: could not find an edge for the given path ("${l}" - "${c}").`)}else{if(n!=="mixed")throw new le(`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,u=this._edges.get(r),!u)throw new Q(`Graph.${t}: could not find the "${r}" edge in the graph.`)}return u.attributes[i]=s,this.emit("edgeAttributesUpdated",{key:u.key,type:"set",attributes:u.attributes,name:i}),this}}function _L(e,t,n){e.prototype[t]=function(r,i,s){let u;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new le(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>3){if(this.multi)throw new le(`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,c=""+i;if(i=arguments[2],s=arguments[3],u=Mn(this,l,c,n),!u)throw new Q(`Graph.${t}: could not find an edge for the given path ("${l}" - "${c}").`)}else{if(n!=="mixed")throw new le(`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,u=this._edges.get(r),!u)throw new Q(`Graph.${t}: could not find the "${r}" edge in the graph.`)}if(typeof s!="function")throw new q(`Graph.${t}: updater should be a function.`);return u.attributes[i]=s(u.attributes[i]),this.emit("edgeAttributesUpdated",{key:u.key,type:"set",attributes:u.attributes,name:i}),this}}function SL(e,t,n){e.prototype[t]=function(r,i){let s;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new le(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new le(`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,l=""+i;if(i=arguments[2],s=Mn(this,u,l,n),!s)throw new Q(`Graph.${t}: could not find an edge for the given path ("${u}" - "${l}").`)}else{if(n!=="mixed")throw new le(`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,s=this._edges.get(r),!s)throw new Q(`Graph.${t}: could not find the "${r}" edge in the graph.`)}return delete s.attributes[i],this.emit("edgeAttributesUpdated",{key:s.key,type:"remove",attributes:s.attributes,name:i}),this}}function xL(e,t,n){e.prototype[t]=function(r,i){let s;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new le(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new le(`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,l=""+i;if(i=arguments[2],s=Mn(this,u,l,n),!s)throw new Q(`Graph.${t}: could not find an edge for the given path ("${u}" - "${l}").`)}else{if(n!=="mixed")throw new le(`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,s=this._edges.get(r),!s)throw new Q(`Graph.${t}: could not find the "${r}" edge in the graph.`)}if(!At(i))throw new q(`Graph.${t}: provided attributes are not a plain object.`);return s.attributes=i,this.emit("edgeAttributesUpdated",{key:s.key,type:"replace",attributes:s.attributes}),this}}function CL(e,t,n){e.prototype[t]=function(r,i){let s;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new le(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new le(`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,l=""+i;if(i=arguments[2],s=Mn(this,u,l,n),!s)throw new Q(`Graph.${t}: could not find an edge for the given path ("${u}" - "${l}").`)}else{if(n!=="mixed")throw new le(`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,s=this._edges.get(r),!s)throw new Q(`Graph.${t}: could not find the "${r}" edge in the graph.`)}if(!At(i))throw new q(`Graph.${t}: provided attributes are not a plain object.`);return vt(s.attributes,i),this.emit("edgeAttributesUpdated",{key:s.key,type:"merge",attributes:s.attributes,data:i}),this}}function AL(e,t,n){e.prototype[t]=function(r,i){let s;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new le(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new le(`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,l=""+i;if(i=arguments[2],s=Mn(this,u,l,n),!s)throw new Q(`Graph.${t}: could not find an edge for the given path ("${u}" - "${l}").`)}else{if(n!=="mixed")throw new le(`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,s=this._edges.get(r),!s)throw new Q(`Graph.${t}: could not find the "${r}" edge in the graph.`)}if(typeof i!="function")throw new q(`Graph.${t}: provided updater is not a function.`);return s.attributes=i(s.attributes),this.emit("edgeAttributesUpdated",{key:s.key,type:"update",attributes:s.attributes}),this}}const TL=[{name:e=>`get${e}Attribute`,attacher:mL},{name:e=>`get${e}Attributes`,attacher:yL},{name:e=>`has${e}Attribute`,attacher:wL},{name:e=>`set${e}Attribute`,attacher:EL},{name:e=>`update${e}Attribute`,attacher:_L},{name:e=>`remove${e}Attribute`,attacher:SL},{name:e=>`replace${e}Attributes`,attacher:xL},{name:e=>`merge${e}Attributes`,attacher:CL},{name:e=>`update${e}Attributes`,attacher:AL}];function kL(e){TL.forEach(function({name:t,attacher:n}){n(e,t("Edge"),"mixed"),n(e,t("DirectedEdge"),"directed"),n(e,t("UndirectedEdge"),"undirected")})}const bL=[{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 RL(e,t,n,r){let i=!1;for(const s in t){if(s===r)continue;const u=t[s];if(i=n(u.key,u.attributes,u.source.key,u.target.key,u.source.attributes,u.target.attributes,u.undirected),e&&i)return u.key}}function LL(e,t,n,r){let i,s,u,l=!1;for(const c in t)if(c!==r){i=t[c];do{if(s=i.source,u=i.target,l=n(i.key,i.attributes,s.key,u.key,s.attributes,u.attributes,i.undirected),e&&l)return i.key;i=i.next}while(i!==void 0)}}function Kc(e,t){const n=Object.keys(e),r=n.length;let i,s=0;return new Hn(function(){do if(i)i=i.next;else{if(s>=r)return{done:!0};const l=n[s++];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 DL(e,t,n,r){const i=t[n];if(!i)return;const s=i.source,u=i.target;if(r(i.key,i.attributes,s.key,u.key,s.attributes,u.attributes,i.undirected)&&e)return i.key}function PL(e,t,n,r){let i=t[n];if(!i)return;let s=!1;do{if(s=r(i.key,i.attributes,i.source.key,i.target.key,i.source.attributes,i.target.attributes,i.undirected),e&&s)return i.key;i=i.next}while(i!==void 0)}function Yc(e,t){let n=e[t];return n.next!==void 0?new Hn(function(){if(!n)return{done:!0};const r={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:r}}):Hn.of({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 IL(e,t){if(e.size===0)return[];if(t==="mixed"||t===e.type)return typeof Array.from=="function"?Array.from(e._edges.keys()):m1(e._edges.keys(),e._edges.size);const n=t==="undirected"?e.undirectedSize:e.directedSize,r=new Array(n),i=t==="undirected",s=e._edges.values();let u=0,l,c;for(;l=s.next(),l.done!==!0;)c=l.value,c.undirected===i&&(r[u++]=c.key);return r}function A1(e,t,n,r){if(t.size===0)return;const i=n!=="mixed"&&n!==t.type,s=n==="undirected";let u,l,c=!1;const h=t._edges.values();for(;u=h.next(),u.done!==!0;){if(l=u.value,i&&l.undirected!==s)continue;const{key:g,attributes:p,source:v,target:_}=l;if(c=r(g,p,v.key,_.key,v.attributes,_.attributes,l.undirected),e&&c)return g}}function FL(e,t){if(e.size===0)return Hn.empty();const n=t!=="mixed"&&t!==e.type,r=t==="undirected",i=e._edges.values();return new Hn(function(){let u,l;for(;;){if(u=i.next(),u.done)return u;if(l=u.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 rp(e,t,n,r,i,s){const u=t?LL:RL;let l;if(n!=="undirected"&&(r!=="out"&&(l=u(e,i.in,s),e&&l)||r!=="in"&&(l=u(e,i.out,s,r?void 0:i.key),e&&l))||n!=="directed"&&(l=u(e,i.undirected,s),e&&l))return l}function NL(e,t,n,r){const i=[];return rp(!1,e,t,n,r,function(s){i.push(s)}),i}function OL(e,t,n){let r=Hn.empty();return e!=="undirected"&&(t!=="out"&&typeof n.in<"u"&&(r=Vr(r,Kc(n.in))),t!=="in"&&typeof n.out<"u"&&(r=Vr(r,Kc(n.out,t?void 0:n.key)))),e!=="directed"&&typeof n.undirected<"u"&&(r=Vr(r,Kc(n.undirected))),r}function ip(e,t,n,r,i,s,u){const l=n?PL:DL;let c;if(t!=="undirected"&&(typeof i.in<"u"&&r!=="out"&&(c=l(e,i.in,s,u),e&&c)||typeof i.out<"u"&&r!=="in"&&(r||i.key!==s)&&(c=l(e,i.out,s,u),e&&c))||t!=="directed"&&typeof i.undirected<"u"&&(c=l(e,i.undirected,s,u),e&&c))return c}function zL(e,t,n,r,i){const s=[];return ip(!1,e,t,n,r,i,function(u){s.push(u)}),s}function GL(e,t,n,r){let i=Hn.empty();return e!=="undirected"&&(typeof n.in<"u"&&t!=="out"&&r in n.in&&(i=Vr(i,Yc(n.in,r))),typeof n.out<"u"&&t!=="in"&&r in n.out&&(t||n.key!==r)&&(i=Vr(i,Yc(n.out,r)))),e!=="directed"&&typeof n.undirected<"u"&&r in n.undirected&&(i=Vr(i,Yc(n.undirected,r))),i}function UL(e,t){const{name:n,type:r,direction:i}=t;e.prototype[n]=function(s,u){if(r!=="mixed"&&this.type!=="mixed"&&r!==this.type)return[];if(!arguments.length)return IL(this,r);if(arguments.length===1){s=""+s;const l=this._nodes.get(s);if(typeof l>"u")throw new Q(`Graph.${n}: could not find the "${s}" node in the graph.`);return NL(this.multi,r==="mixed"?this.type:r,i,l)}if(arguments.length===2){s=""+s,u=""+u;const l=this._nodes.get(s);if(!l)throw new Q(`Graph.${n}: could not find the "${s}" source node in the graph.`);if(!this._nodes.has(u))throw new Q(`Graph.${n}: could not find the "${u}" target node in the graph.`);return zL(r,this.multi,i,l,u)}throw new q(`Graph.${n}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}function $L(e,t){const{name:n,type:r,direction:i}=t,s="forEach"+n[0].toUpperCase()+n.slice(1,-1);e.prototype[s]=function(h,g,p){if(!(r!=="mixed"&&this.type!=="mixed"&&r!==this.type)){if(arguments.length===1)return p=h,A1(!1,this,r,p);if(arguments.length===2){h=""+h,p=g;const v=this._nodes.get(h);if(typeof v>"u")throw new Q(`Graph.${s}: could not find the "${h}" node in the graph.`);return rp(!1,this.multi,r==="mixed"?this.type:r,i,v,p)}if(arguments.length===3){h=""+h,g=""+g;const v=this._nodes.get(h);if(!v)throw new Q(`Graph.${s}: could not find the "${h}" source node in the graph.`);if(!this._nodes.has(g))throw new Q(`Graph.${s}: could not find the "${g}" target node in the graph.`);return ip(!1,r,this.multi,i,v,g,p)}throw new q(`Graph.${s}: too many arguments (expecting 1, 2 or 3 and got ${arguments.length}).`)}};const u="map"+n[0].toUpperCase()+n.slice(1);e.prototype[u]=function(){const h=Array.prototype.slice.call(arguments),g=h.pop();let p;if(h.length===0){let v=0;r!=="directed"&&(v+=this.undirectedSize),r!=="undirected"&&(v+=this.directedSize),p=new Array(v);let _=0;h.push((T,b,N,x,E,S,R)=>{p[_++]=g(T,b,N,x,E,S,R)})}else p=[],h.push((v,_,T,b,N,x,E)=>{p.push(g(v,_,T,b,N,x,E))});return this[s].apply(this,h),p};const l="filter"+n[0].toUpperCase()+n.slice(1);e.prototype[l]=function(){const h=Array.prototype.slice.call(arguments),g=h.pop(),p=[];return h.push((v,_,T,b,N,x,E)=>{g(v,_,T,b,N,x,E)&&p.push(v)}),this[s].apply(this,h),p};const c="reduce"+n[0].toUpperCase()+n.slice(1);e.prototype[c]=function(){let h=Array.prototype.slice.call(arguments);if(h.length<2||h.length>4)throw new q(`Graph.${c}: 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 q(`Graph.${c}: 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 g,p;h.length===2?(g=h[0],p=h[1],h=[]):h.length===3?(g=h[1],p=h[2],h=[h[0]]):h.length===4&&(g=h[2],p=h[3],h=[h[0],h[1]]);let v=p;return h.push((_,T,b,N,x,E,S)=>{v=g(v,_,T,b,N,x,E,S)}),this[s].apply(this,h),v}}function ML(e,t){const{name:n,type:r,direction:i}=t,s="find"+n[0].toUpperCase()+n.slice(1,-1);e.prototype[s]=function(c,h,g){if(r!=="mixed"&&this.type!=="mixed"&&r!==this.type)return!1;if(arguments.length===1)return g=c,A1(!0,this,r,g);if(arguments.length===2){c=""+c,g=h;const p=this._nodes.get(c);if(typeof p>"u")throw new Q(`Graph.${s}: could not find the "${c}" node in the graph.`);return rp(!0,this.multi,r==="mixed"?this.type:r,i,p,g)}if(arguments.length===3){c=""+c,h=""+h;const p=this._nodes.get(c);if(!p)throw new Q(`Graph.${s}: could not find the "${c}" source node in the graph.`);if(!this._nodes.has(h))throw new Q(`Graph.${s}: could not find the "${h}" target node in the graph.`);return ip(!0,r,this.multi,i,p,h,g)}throw new q(`Graph.${s}: too many arguments (expecting 1, 2 or 3 and got ${arguments.length}).`)};const u="some"+n[0].toUpperCase()+n.slice(1,-1);e.prototype[u]=function(){const c=Array.prototype.slice.call(arguments),h=c.pop();return c.push((p,v,_,T,b,N,x)=>h(p,v,_,T,b,N,x)),!!this[s].apply(this,c)};const l="every"+n[0].toUpperCase()+n.slice(1,-1);e.prototype[l]=function(){const c=Array.prototype.slice.call(arguments),h=c.pop();return c.push((p,v,_,T,b,N,x)=>!h(p,v,_,T,b,N,x)),!this[s].apply(this,c)}}function BL(e,t){const{name:n,type:r,direction:i}=t,s=n.slice(0,-1)+"Entries";e.prototype[s]=function(u,l){if(r!=="mixed"&&this.type!=="mixed"&&r!==this.type)return Hn.empty();if(!arguments.length)return FL(this,r);if(arguments.length===1){u=""+u;const c=this._nodes.get(u);if(!c)throw new Q(`Graph.${s}: could not find the "${u}" node in the graph.`);return OL(r,i,c)}if(arguments.length===2){u=""+u,l=""+l;const c=this._nodes.get(u);if(!c)throw new Q(`Graph.${s}: could not find the "${u}" source node in the graph.`);if(!this._nodes.has(l))throw new Q(`Graph.${s}: could not find the "${l}" target node in the graph.`);return GL(r,i,c,l)}throw new q(`Graph.${s}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}function WL(e){bL.forEach(t=>{UL(e,t),$L(e,t),ML(e,t),BL(e,t)})}const HL=[{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 nf(){this.A=null,this.B=null}nf.prototype.wrap=function(e){this.A===null?this.A=e:this.B===null&&(this.B=e)};nf.prototype.has=function(e){return this.A!==null&&e in this.A||this.B!==null&&e in this.B};function Os(e,t,n,r,i){for(const s in r){const u=r[s],l=u.source,c=u.target,h=l===n?c:l;if(t&&t.has(h.key))continue;const g=i(h.key,h.attributes);if(e&&g)return h.key}}function op(e,t,n,r,i){if(t!=="mixed"){if(t==="undirected")return Os(e,null,r,r.undirected,i);if(typeof n=="string")return Os(e,null,r,r[n],i)}const s=new nf;let u;if(t!=="undirected"){if(n!=="out"){if(u=Os(e,null,r,r.in,i),e&&u)return u;s.wrap(r.in)}if(n!=="in"){if(u=Os(e,s,r,r.out,i),e&&u)return u;s.wrap(r.out)}}if(t!=="directed"&&(u=Os(e,s,r,r.undirected,i),e&&u))return u}function jL(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 op(!1,e,t,n,function(i){r.push(i)}),r}function zs(e,t,n){const r=Object.keys(n),i=r.length;let s=0;return new Hn(function(){let l=null;do{if(s>=i)return e&&e.wrap(n),{done:!0};const c=n[r[s++]],h=c.source,g=c.target;if(l=h===t?g:h,e&&e.has(l.key)){l=null;continue}}while(l===null);return{done:!1,value:{neighbor:l.key,attributes:l.attributes}}})}function VL(e,t,n){if(e!=="mixed"){if(e==="undirected")return zs(null,n,n.undirected);if(typeof t=="string")return zs(null,n,n[t])}let r=Hn.empty();const i=new nf;return e!=="undirected"&&(t!=="out"&&(r=Vr(r,zs(i,n,n.in))),t!=="in"&&(r=Vr(r,zs(i,n,n.out)))),e!=="directed"&&(r=Vr(r,zs(i,n,n.undirected))),r}function KL(e,t){const{name:n,type:r,direction:i}=t;e.prototype[n]=function(s){if(r!=="mixed"&&this.type!=="mixed"&&r!==this.type)return[];s=""+s;const u=this._nodes.get(s);if(typeof u>"u")throw new Q(`Graph.${n}: could not find the "${s}" node in the graph.`);return jL(r==="mixed"?this.type:r,i,u)}}function YL(e,t){const{name:n,type:r,direction:i}=t,s="forEach"+n[0].toUpperCase()+n.slice(1,-1);e.prototype[s]=function(h,g){if(r!=="mixed"&&this.type!=="mixed"&&r!==this.type)return;h=""+h;const p=this._nodes.get(h);if(typeof p>"u")throw new Q(`Graph.${s}: could not find the "${h}" node in the graph.`);op(!1,r==="mixed"?this.type:r,i,p,g)};const u="map"+n[0].toUpperCase()+n.slice(1);e.prototype[u]=function(h,g){const p=[];return this[s](h,(v,_)=>{p.push(g(v,_))}),p};const l="filter"+n[0].toUpperCase()+n.slice(1);e.prototype[l]=function(h,g){const p=[];return this[s](h,(v,_)=>{g(v,_)&&p.push(v)}),p};const c="reduce"+n[0].toUpperCase()+n.slice(1);e.prototype[c]=function(h,g,p){if(arguments.length<3)throw new q(`Graph.${c}: 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=p;return this[s](h,(_,T)=>{v=g(v,_,T)}),v}}function ZL(e,t){const{name:n,type:r,direction:i}=t,s=n[0].toUpperCase()+n.slice(1,-1),u="find"+s;e.prototype[u]=function(h,g){if(r!=="mixed"&&this.type!=="mixed"&&r!==this.type)return;h=""+h;const p=this._nodes.get(h);if(typeof p>"u")throw new Q(`Graph.${u}: could not find the "${h}" node in the graph.`);return op(!0,r==="mixed"?this.type:r,i,p,g)};const l="some"+s;e.prototype[l]=function(h,g){return!!this[u](h,g)};const c="every"+s;e.prototype[c]=function(h,g){return!this[u](h,(v,_)=>!g(v,_))}}function QL(e,t){const{name:n,type:r,direction:i}=t,s=n.slice(0,-1)+"Entries";e.prototype[s]=function(u){if(r!=="mixed"&&this.type!=="mixed"&&r!==this.type)return Hn.empty();u=""+u;const l=this._nodes.get(u);if(typeof l>"u")throw new Q(`Graph.${s}: could not find the "${u}" node in the graph.`);return VL(r==="mixed"?this.type:r,i,l)}}function XL(e){HL.forEach(t=>{KL(e,t),YL(e,t),ZL(e,t),QL(e,t)})}function Mu(e,t,n,r,i){const s=r._nodes.values(),u=r.type;let l,c,h,g,p,v;for(;l=s.next(),l.done!==!0;){let _=!1;if(c=l.value,u!=="undirected"){g=c.out;for(h in g){p=g[h];do v=p.target,_=!0,i(c.key,v.key,c.attributes,v.attributes,p.key,p.attributes,p.undirected),p=p.next;while(p)}}if(u!=="directed"){g=c.undirected;for(h in g)if(!(t&&c.key>h)){p=g[h];do v=p.target,v.key!==h&&(v=p.source),_=!0,i(c.key,v.key,c.attributes,v.attributes,p.key,p.attributes,p.undirected),p=p.next;while(p)}}n&&!_&&i(c.key,null,c.attributes,null,null,null,null)}}function qL(e,t){const n={key:e};return y1(t.attributes)||(n.attributes=vt({},t.attributes)),n}function JL(e,t,n){const r={key:t,source:n.source.key,target:n.target.key};return y1(n.attributes)||(r.attributes=vt({},n.attributes)),e==="mixed"&&n.undirected&&(r.undirected=!0),r}function eD(e){if(!At(e))throw new q('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 q("Graph.import: serialized node is missing its key.");if("attributes"in e&&(!At(e.attributes)||e.attributes===null))throw new q("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.")}function tD(e){if(!At(e))throw new q('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 q("Graph.import: serialized edge is missing its source.");if(!("target"in e))throw new q("Graph.import: serialized edge is missing its target.");if("attributes"in e&&(!At(e.attributes)||e.attributes===null))throw new q("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.");if("undirected"in e&&typeof e.undirected!="boolean")throw new q("Graph.import: invalid undirectedness information. Undirected should be boolean or omitted.")}const nD=iL(),rD=new Set(["directed","undirected","mixed"]),ty=new Set(["domain","_events","_eventsCount","_maxListeners"]),iD=[{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"}],oD={allowSelfLoops:!0,multi:!1,type:"mixed"};function sD(e,t,n){if(n&&!At(n))throw new q(`Graph.addNode: invalid attributes. Expecting an object but got "${n}"`);if(t=""+t,n=n||{},e._nodes.has(t))throw new le(`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 ny(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 T1(e,t,n,r,i,s,u,l){if(!r&&e.type==="undirected")throw new le(`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 le(`Graph.${t}: you cannot add an undirected edge to a directed graph. Use the #.addEdge or #.addDirectedEdge instead.`);if(l&&!At(l))throw new q(`Graph.${t}: invalid attributes. Expecting an object but got "${l}"`);if(s=""+s,u=""+u,l=l||{},!e.allowSelfLoops&&s===u)throw new le(`Graph.${t}: source & target are the same ("${s}"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`);const c=e._nodes.get(s),h=e._nodes.get(u);if(!c)throw new Q(`Graph.${t}: source node "${s}" not found.`);if(!h)throw new Q(`Graph.${t}: target node "${u}" not found.`);const g={key:null,undirected:r,source:s,target:u,attributes:l};if(n)i=e._edgeKeyGenerator();else if(i=""+i,e._edges.has(i))throw new le(`Graph.${t}: the "${i}" edge already exists in the graph.`);if(!e.multi&&(r?typeof c.undirected[u]<"u":typeof c.out[u]<"u"))throw new le(`Graph.${t}: an edge linking "${s}" to "${u}" 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 p=new fs(r,i,c,h,l);e._edges.set(i,p);const v=s===u;return r?(c.undirectedDegree++,h.undirectedDegree++,v&&(c.undirectedLoops++,e._undirectedSelfLoopCount++)):(c.outDegree++,h.inDegree++,v&&(c.directedLoops++,e._directedSelfLoopCount++)),e.multi?p.attachMulti():p.attach(),r?e._undirectedSize++:e._directedSize++,g.key=i,e.emit("edgeAdded",g),i}function aD(e,t,n,r,i,s,u,l,c){if(!r&&e.type==="undirected")throw new le(`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 le(`Graph.${t}: you cannot merge/update an undirected edge to a directed graph. Use the #.mergeEdge/#.updateEdge or #.addDirectedEdge instead.`);if(l){if(c){if(typeof l!="function")throw new q(`Graph.${t}: invalid updater function. Expecting a function but got "${l}"`)}else if(!At(l))throw new q(`Graph.${t}: invalid attributes. Expecting an object but got "${l}"`)}s=""+s,u=""+u;let h;if(c&&(h=l,l=void 0),!e.allowSelfLoops&&s===u)throw new le(`Graph.${t}: source & target are the same ("${s}"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`);let g=e._nodes.get(s),p=e._nodes.get(u),v,_;if(!n&&(v=e._edges.get(i),v)){if((v.source.key!==s||v.target.key!==u)&&(!r||v.source.key!==u||v.target.key!==s))throw new le(`Graph.${t}: inconsistency detected when attempting to merge the "${i}" edge with "${s}" source & "${u}" target vs. ("${v.source.key}", "${v.target.key}").`);_=v}if(!_&&!e.multi&&g&&(_=r?g.undirected[u]:g.out[u]),_){const E=[_.key,!1,!1,!1];if(c?!h:!l)return E;if(c){const S=_.attributes;_.attributes=h(S),e.emit("edgeAttributesUpdated",{type:"replace",key:_.key,attributes:_.attributes})}else vt(_.attributes,l),e.emit("edgeAttributesUpdated",{type:"merge",key:_.key,attributes:_.attributes,data:l});return E}l=l||{},c&&h&&(l=h(l));const T={key:null,undirected:r,source:s,target:u,attributes:l};if(n)i=e._edgeKeyGenerator();else if(i=""+i,e._edges.has(i))throw new le(`Graph.${t}: the "${i}" edge already exists in the graph.`);let b=!1,N=!1;g||(g=ny(e,s,{}),b=!0,s===u&&(p=g,N=!0)),p||(p=ny(e,u,{}),N=!0),v=new fs(r,i,g,p,l),e._edges.set(i,v);const x=s===u;return r?(g.undirectedDegree++,p.undirectedDegree++,x&&(g.undirectedLoops++,e._undirectedSelfLoopCount++)):(g.outDegree++,p.inDegree++,x&&(g.directedLoops++,e._directedSelfLoopCount++)),e.multi?v.attachMulti():v.attach(),r?e._undirectedSize++:e._directedSize++,T.key=i,e.emit("edgeAdded",T),[i,!0,b,N]}function Do(e,t){e._edges.delete(t.key);const{source:n,target:r,attributes:i}=t,s=t.undirected,u=n===r;s?(n.undirectedDegree--,r.undirectedDegree--,u&&(n.undirectedLoops--,e._undirectedSelfLoopCount--)):(n.outDegree--,r.inDegree--,u&&(n.directedLoops--,e._directedSelfLoopCount--)),e.multi?t.detachMulti():t.detach(),s?e._undirectedSize--:e._directedSize--,e.emit("edgeDropped",{key:t.key,attributes:i,source:n.key,target:r.key,undirected:s})}class $e extends p1.EventEmitter{constructor(t){if(super(),t=vt({},oD,t),typeof t.multi!="boolean")throw new q(`Graph.constructor: invalid 'multi' option. Expecting a boolean but got "${t.multi}".`);if(!rD.has(t.type))throw new q(`Graph.constructor: invalid 'type' option. Should be one of "mixed", "directed" or "undirected" but got "${t.type}".`);if(typeof t.allowSelfLoops!="boolean")throw new q(`Graph.constructor: invalid 'allowSelfLoops' option. Expecting a boolean but got "${t.allowSelfLoops}".`);const n=t.type==="mixed"?w1:t.type==="directed"?E1:_1;Nn(this,"NodeDataClass",n);const r="geid_"+nD()+"_";let i=0;const s=()=>{let u;do u=r+i++;while(this._edges.has(u));return u};Nn(this,"_attributes",{}),Nn(this,"_nodes",new Map),Nn(this,"_edges",new Map),Nn(this,"_directedSize",0),Nn(this,"_undirectedSize",0),Nn(this,"_directedSelfLoopCount",0),Nn(this,"_undirectedSelfLoopCount",0),Nn(this,"_edgeKeyGenerator",s),Nn(this,"_options",t),ty.forEach(u=>Nn(this,u,this[u])),tr(this,"order",()=>this._nodes.size),tr(this,"size",()=>this._edges.size),tr(this,"directedSize",()=>this._directedSize),tr(this,"undirectedSize",()=>this._undirectedSize),tr(this,"selfLoopCount",()=>this._directedSelfLoopCount+this._undirectedSelfLoopCount),tr(this,"directedSelfLoopCount",()=>this._directedSelfLoopCount),tr(this,"undirectedSelfLoopCount",()=>this._undirectedSelfLoopCount),tr(this,"multi",this._options.multi),tr(this,"type",this._options.type),tr(this,"allowSelfLoops",this._options.allowSelfLoops),tr(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 q(`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 q(`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 q(`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 le("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 Q(`Graph.directedEdge: could not find the "${t}" source node in the graph.`);if(!this._nodes.has(n))throw new Q(`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 le("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 Q(`Graph.undirectedEdge: could not find the "${t}" source node in the graph.`);if(!this._nodes.has(n))throw new Q(`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 le("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 Q(`Graph.edge: could not find the "${t}" source node in the graph.`);if(!this._nodes.has(n))throw new Q(`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 Q(`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 Q(`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 Q(`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 Q(`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 Q(`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 Q(`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 Q(`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 Q(`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 Q(`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 Q(`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 Q(`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 Q(`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 Q(`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 Q(`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 Q(`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 Q(`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 Q(`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 Q(`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 Q(`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 Q(`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 Q(`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 Q(`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 Q(`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 Q(`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 Q(`Graph.opposite: could not find the "${n}" edge in the graph.`);const i=r.source.key,s=r.target.key;if(t===i)return s;if(t===s)return i;throw new Q(`Graph.opposite: the "${t}" node is not attached to the "${n}" edge (${i}, ${s}).`)}hasExtremity(t,n){t=""+t,n=""+n;const r=this._edges.get(t);if(!r)throw new Q(`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 Q(`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 Q(`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 Q(`Graph.isSelfLoop: could not find the "${t}" edge in the graph.`);return n.source===n.target}addNode(t,n){return sD(this,t,n).key}mergeNode(t,n){if(n&&!At(n))throw new q(`Graph.mergeNode: invalid attributes. Expecting an object but got "${n}"`);t=""+t,n=n||{};let r=this._nodes.get(t);return r?(n&&(vt(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 q(`Graph.updateNode: invalid updater function. Expecting a function but got "${n}"`);t=""+t;let r=this._nodes.get(t);if(r){if(n){const s=r.attributes;r.attributes=n(s),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 Q(`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 Do(this,r),r=r.next;while(r)}for(const i in n.in){r=n.in[i];do Do(this,r),r=r.next;while(r)}}if(this.type!=="directed")for(const i in n.undirected){r=n.undirected[i];do Do(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=Mn(this,r,i,this.type),!n)throw new Q(`Graph.dropEdge: could not find the "${r}" -> "${i}" edge in the graph.`)}else if(t=""+t,n=this._edges.get(t),!n)throw new Q(`Graph.dropEdge: could not find the "${t}" edge in the graph.`);return Do(this,n),this}dropDirectedEdge(t,n){if(arguments.length<2)throw new le("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 le("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=Mn(this,t,n,"directed");if(!r)throw new Q(`Graph.dropDirectedEdge: could not find a "${t}" -> "${n}" edge in the graph.`);return Do(this,r),this}dropUndirectedEdge(t,n){if(arguments.length<2)throw new le("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 le("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=Mn(this,t,n,"undirected");if(!r)throw new Q(`Graph.dropUndirectedEdge: could not find a "${t}" -> "${n}" edge in the graph.`);return Do(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 q("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(!At(t))throw new q("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(!At(t))throw new q("Graph.mergeAttributes: provided attributes are not a plain object.");return vt(this._attributes,t),this.emit("attributesUpdated",{type:"merge",attributes:this._attributes,data:t}),this}updateAttributes(t){if(typeof t!="function")throw new q("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 q("Graph.updateEachNodeAttributes: expecting an updater function.");if(n&&!ey(n))throw new q("Graph.updateEachNodeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");const r=this._nodes.values();let i,s;for(;i=r.next(),i.done!==!0;)s=i.value,s.attributes=t(s.key,s.attributes);this.emit("eachNodeAttributesUpdated",{hints:n||null})}updateEachEdgeAttributes(t,n){if(typeof t!="function")throw new q("Graph.updateEachEdgeAttributes: expecting an updater function.");if(n&&!ey(n))throw new q("Graph.updateEachEdgeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");const r=this._edges.values();let i,s,u,l;for(;i=r.next(),i.done!==!0;)s=i.value,u=s.source,l=s.target,s.attributes=t(s.key,s.attributes,u.key,l.key,u.attributes,l.attributes,s.undirected);this.emit("eachEdgeAttributesUpdated",{hints:n||null})}forEachAdjacencyEntry(t){if(typeof t!="function")throw new q("Graph.forEachAdjacencyEntry: expecting a callback.");Mu(!1,!1,!1,this,t)}forEachAdjacencyEntryWithOrphans(t){if(typeof t!="function")throw new q("Graph.forEachAdjacencyEntryWithOrphans: expecting a callback.");Mu(!1,!1,!0,this,t)}forEachAssymetricAdjacencyEntry(t){if(typeof t!="function")throw new q("Graph.forEachAssymetricAdjacencyEntry: expecting a callback.");Mu(!1,!0,!1,this,t)}forEachAssymetricAdjacencyEntryWithOrphans(t){if(typeof t!="function")throw new q("Graph.forEachAssymetricAdjacencyEntryWithOrphans: expecting a callback.");Mu(!1,!0,!0,this,t)}nodes(){return typeof Array.from=="function"?Array.from(this._nodes.keys()):m1(this._nodes.keys(),this._nodes.size)}forEachNode(t){if(typeof t!="function")throw new q("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 q("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 q("Graph.mapNode: expecting a callback.");const n=this._nodes.values();let r,i;const s=new Array(this.order);let u=0;for(;r=n.next(),r.done!==!0;)i=r.value,s[u++]=t(i.key,i.attributes);return s}someNode(t){if(typeof t!="function")throw new q("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 q("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 q("Graph.filterNodes: expecting a callback.");const n=this._nodes.values();let r,i;const s=[];for(;r=n.next(),r.done!==!0;)i=r.value,t(i.key,i.attributes)&&s.push(i.key);return s}reduceNodes(t,n){if(typeof t!="function")throw new q("Graph.reduceNodes: expecting a callback.");if(arguments.length<2)throw new q("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 s,u;for(;s=i.next(),s.done!==!0;)u=s.value,r=t(r,u.key,u.attributes);return r}nodeEntries(){const t=this._nodes.values();return new Hn(()=>{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,s)=>{t[n++]=qL(s,i)});const r=new Array(this._edges.size);return n=0,this._edges.forEach((i,s)=>{r[n++]=JL(this.type,s,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 $e)return t.forEachNode((c,h)=>{n?this.mergeNode(c,h):this.addNode(c,h)}),t.forEachEdge((c,h,g,p,v,_,T)=>{n?T?this.mergeUndirectedEdgeWithKey(c,g,p,h):this.mergeDirectedEdgeWithKey(c,g,p,h):T?this.addUndirectedEdgeWithKey(c,g,p,h):this.addDirectedEdgeWithKey(c,g,p,h)}),this;if(!At(t))throw new q("Graph.import: invalid argument. Expecting a serialized graph or, alternatively, a Graph instance.");if(t.attributes){if(!At(t.attributes))throw new q("Graph.import: invalid attributes. Expecting a plain object.");n?this.mergeAttributes(t.attributes):this.replaceAttributes(t.attributes)}let r,i,s,u,l;if(t.nodes){if(s=t.nodes,!Array.isArray(s))throw new q("Graph.import: invalid nodes. Expecting an array.");for(r=0,i=s.length;r{const s=vt({},r.attributes);r=new n.NodeDataClass(i,s),n._nodes.set(i,r)}),n}copy(t){if(t=t||{},typeof t.type=="string"&&t.type!==this.type&&t.type!=="mixed")throw new le(`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 le("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 le("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,s;for(;i=r.next(),i.done!==!0;)s=i.value,T1(n,"copy",!1,s.undirected,s.key,s.source.key,s.target.key,vt({},s.attributes));return n}toJSON(){return this.export()}toString(){return"[object Graph]"}inspect(){const t={};this._nodes.forEach((s,u)=>{t[u]=s.attributes});const n={},r={};this._edges.forEach((s,u)=>{const l=s.undirected?"--":"->";let c="",h=s.source.key,g=s.target.key,p;s.undirected&&h>g&&(p=h,h=g,g=p);const v=`(${h})${l}(${g})`;u.startsWith("geid_")?this.multi&&(typeof r[v]>"u"?r[v]=0:r[v]++,c+=`${r[v]}. `):c+=`[${u}]: `,c+=v,n[c]=s.attributes});const i={};for(const s in this)this.hasOwnProperty(s)&&!ty.has(s)&&typeof this[s]!="function"&&typeof s!="symbol"&&(i[s]=this[s]);return i.attributes=this._attributes,i.nodes=t,i.edges=n,Nn(i,"constructor",this.constructor),i}}typeof Symbol<"u"&&($e.prototype[Symbol.for("nodejs.util.inspect.custom")]=$e.prototype.inspect);iD.forEach(e=>{["add","merge","update"].forEach(t=>{const n=e.name(t),r=t==="add"?T1:aD;e.generateKey?$e.prototype[n]=function(i,s,u){return r(this,n,!0,(e.type||this.type)==="undirected",null,i,s,u,t==="update")}:$e.prototype[n]=function(i,s,u,l){return r(this,n,!1,(e.type||this.type)==="undirected",i,s,u,l,t==="update")}})});vL($e);kL($e);WL($e);XL($e);class k1 extends $e{constructor(t){const n=vt({type:"directed"},t);if("multi"in n&&n.multi!==!1)throw new q("DirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if(n.type!=="directed")throw new q('DirectedGraph.from: inconsistent "'+n.type+'" type in given options!');super(n)}}class b1 extends $e{constructor(t){const n=vt({type:"undirected"},t);if("multi"in n&&n.multi!==!1)throw new q("UndirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if(n.type!=="undirected")throw new q('UndirectedGraph.from: inconsistent "'+n.type+'" type in given options!');super(n)}}class R1 extends $e{constructor(t){const n=vt({multi:!0},t);if("multi"in n&&n.multi!==!0)throw new q("MultiGraph.from: inconsistent indication that the graph should be simple in given options!");super(n)}}class L1 extends $e{constructor(t){const n=vt({type:"directed",multi:!0},t);if("multi"in n&&n.multi!==!0)throw new q("MultiDirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if(n.type!=="directed")throw new q('MultiDirectedGraph.from: inconsistent "'+n.type+'" type in given options!');super(n)}}class D1 extends $e{constructor(t){const n=vt({type:"undirected",multi:!0},t);if("multi"in n&&n.multi!==!0)throw new q("MultiUndirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if(n.type!=="undirected")throw new q('MultiUndirectedGraph.from: inconsistent "'+n.type+'" type in given options!');super(n)}}function cs(e){e.from=function(t,n){const r=vt({},t.options,n),i=new e(r);return i.import(t),i}}cs($e);cs(k1);cs(b1);cs(R1);cs(L1);cs(D1);$e.Graph=$e;$e.DirectedGraph=k1;$e.UndirectedGraph=b1;$e.MultiGraph=R1;$e.MultiDirectedGraph=L1;$e.MultiUndirectedGraph=D1;$e.InvalidArgumentsGraphError=q;$e.NotFoundGraphError=Q;$e.UsageGraphError=le;var ry=tf;function Zc(e,t,n,r){for(var i=0;ir)throw new Error("obliterator/combinations: the size of the subsequences should not exceed the length of the array.");if(n===r)return ry.of(t.slice());var i=new Array(n),s=new Array(n),u=!0,l;for(l=0;l=0&&i[l]>=r-(n-l);)--l;if(l<0)return{done:!0};for(i[l]++;++l{const{threshold:n}=Ra[t],r=e[t];return(Ht.sortBy(r.values,"lowerBound").find(({count:i})=>i<=n)||r.values[0]).lowerBound}))}function cD(e,t,n,r){var i;return(((i=n[e][t])==null?void 0:i.count)||0)>=r[e]}async function hD(e,t,n){const r=new $e;for(let s=0;scD(g,T.id,t,n)).forEach(({id:T,label:b})=>{const[N]=r.mergeNode(T,{label:b,dataType:g,color:v}),x=(r.getNodeAttribute(T,"nbArticles")||0)+1;r.mergeNodeAttributes(N,{nbArticles:x,size:Math.sqrt(x)}),g==="refs"?l.push(N):c.push(N)})}if(l.length>1){const h=lD(l,2);for(const[g,p]of h)g!==p&&(r.mergeEdge(g,p),r.mergeEdgeAttributes(g,p,{weight:(r.getEdgeAttribute(g,p,"weight")||0)+1}))}l.forEach(h=>c.forEach(g=>{r.mergeEdge(h,g),r.mergeEdgeAttributes(h,g,{weight:(r.getEdgeAttribute(h,g,"weight")||0)+1})}))}return r.nodes().filter(s=>r.degree(s)===0).forEach(s=>r.dropNode(s)),r.setAttribute("entriescount",e.length),r}function dD(e){const t=Ht.mapValues(Ht.groupBy(e),u=>u.length),n=Ht.sortBy(Ht.keys(t).map(u=>+u)),r=n.length-1,i=e.length,s=Ht.range(n[0],r+1).reduce((u,l)=>({[l]:(u[l-1]!==void 0?u[l-1]:i)-(t[l-1]||0),...u}),{});return{min:Math.min(...Ht.values(s)),max:Math.max(...Ht.values(s)),values:Ht.toPairs(s).map(([u,l])=>({lowerBound:+u,count:l}))}}function pD(e){const t=Ht.zipObject(yn,yn.map(()=>({})));return yn.forEach(n=>{t[n]=dD(Ht.map(e[n],({count:r})=>r))}),t}var jn=function(t){return t!==null&&typeof t=="object"&&typeof t.addUndirectedEdgeWithKey=="function"&&typeof t.dropNode=="function"&&typeof t.multi=="boolean"};const gD=Oi(jn);var P1={};P1.copyNode=function(e,t,n){return n=Object.assign({},n),e.addNode(t,n)};var La={};La.addEdge=function(t,n,r,i,s,u){return n?r==null?t.addUndirectedEdge(i,s,u):t.addUndirectedEdgeWithKey(r,i,s,u):r==null?t.addDirectedEdge(i,s,u):t.addDirectedEdgeWithKey(r,i,s,u)};La.copyEdge=function(t,n,r,i,s,u){return u=Object.assign({},u),n?r==null?t.addUndirectedEdge(i,s,u):t.addUndirectedEdgeWithKey(r,i,s,u):r==null?t.addDirectedEdge(i,s,u):t.addDirectedEdgeWithKey(r,i,s,u)};La.mergeEdge=function(t,n,r,i,s,u){return n?r==null?t.mergeUndirectedEdge(i,s,u):t.mergeUndirectedEdgeWithKey(r,i,s,u):r==null?t.mergeDirectedEdge(i,s,u):t.mergeDirectedEdgeWithKey(r,i,s,u)};La.updateEdge=function(t,n,r,i,s,u){return n?r==null?t.updateUndirectedEdge(i,s,u):t.updateUndirectedEdgeWithKey(r,i,s,u):r==null?t.updateDirectedEdge(i,s,u):t.updateDirectedEdgeWithKey(r,i,s,u)};function $i(e){this.graph=e,this.stack=new Array(e.order),this.seen=new Set,this.size=0}$i.prototype.hasAlreadySeenEverything=function(){return this.seen.size===this.graph.order};$i.prototype.countUnseenNodes=function(){return this.graph.order-this.seen.size};$i.prototype.forEachNodeYetUnseen=function(e){var t=this.seen,n=this.graph;n.someNode(function(r,i){if(t.size===n.order)return!0;if(t.has(r))return!1;var s=e(r,i);return!!s})};$i.prototype.has=function(e){return this.seen.has(e)};$i.prototype.push=function(e){var t=this.seen.size;return this.seen.add(e),t===this.seen.size?!1:(this.stack[this.size++]=e,!0)};$i.prototype.pushWith=function(e,t){var n=this.seen.size;return this.seen.add(e),n===this.seen.size?!1:(this.stack[this.size++]=t,!0)};$i.prototype.pop=function(){if(this.size!==0)return this.stack[--this.size]};var vD=$i,mD=jn,yD=vD;function wD(e){if(!mD(e))throw new Error("graphology-components: the given graph is not a valid graphology instance.");if(!e.order)return[];var t=new yD(e),n=t.push.bind(t),r=[],i;return t.forEachNodeYetUnseen(function(s){i=[],t.push(s);for(var u;t.size!==0;)u=t.pop(),i.push(u),e.forEachNeighbor(u,n);return i.length>r.length&&(r=i),r.length>t.countUnseenNodes()}),r}var ED=wD;function _D(e){return!e||typeof e!="object"||typeof e=="function"||Array.isArray(e)||e instanceof Set||e instanceof Map||e instanceof RegExp||e instanceof Date}function I1(e,t){e=e||{};var n={};for(var r in t){var i=e[r],s=t[r];if(!_D(s)){n[r]=I1(i,s);continue}i===void 0?n[r]=s:n[r]=i}return n}var rf=I1;function F1(e){return function(t,n){return t+Math.floor(e()*(n-t+1))}}var N1=F1(Math.random);N1.createRandom=F1;var SD=N1,xD=SD.createRandom;function O1(e){var t=xD(e);return function(n){for(var r=n.length,i=r-1,s=-1;++s0};rn.prototype.addChild=function(e,t){this.children[e]=t,++this.countChildren};rn.prototype.getChild=function(e){if(!this.children.hasOwnProperty(e)){var t=new rn;this.children[e]=t,++this.countChildren}return this.children[e]};rn.prototype.applyPositionToChildren=function(){if(this.hasChildren()){var e=this;for(var t in e.children){var n=e.children[t];n.x+=e.x,n.y+=e.y,n.applyPositionToChildren()}}};function G1(e,t,n){for(var r in t.children){var i=t.children[r];i.hasChildren()?G1(e,i,n):n[i.id]={x:i.x,y:i.y}}}function Bu(e,t){var n=e.r-t.r,r=t.x-e.x,i=t.y-e.y;return n<0||n*n0&&n*n>r*r+i*i}function Qc(e,t){for(var n=0;nc?(i=(h+c-s)/(2*h),l=Math.sqrt(Math.max(0,c/h-i*i)),n.x=e.x-i*r-l*u,n.y=e.y-i*u+l*r):(i=(h+s-c)/(2*h),l=Math.sqrt(Math.max(0,s/h-i*i)),n.x=t.x+i*r-l*u,n.y=t.y+i*u+l*r)):(n.x=t.x+n.r,n.y=t.y)}function sy(e,t){var n=e.r+t.r-1e-6,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function ID(e,t){var n=e.length;if(n===0)return 0;var r,i,s,u,l,c,h,g,p,v;if(r=e[0],r.x=0,r.y=0,n<=1)return r.r;if(i=e[1],r.x=-i.r,i.x=r.r,i.y=0,n<=2)return r.r+i.r;s=e[2],oy(i,r,s),r=new rn(null,null,null,null,r),i=new rn(null,null,null,null,i),s=new rn(null,null,null,null,s),r.next=s.previous=i,i.next=r.previous=s,s.next=i.previous=r;e:for(c=3;cg&&(g=S),Rv&&(v=R)}),l=(h+g)/2,c=(p+v)/2}var _=Math.cos(n),T=Math.sin(n);function b(x){var E=x[s],S=x[u];return x[s]=l+(E-l)*_-(S-c)*T,x[u]=c+(E-l)*T+(S-c)*_,x}if(!e){var N={};return t.forEachNode(function(x,E){var S={};S[s]=E[s],S[u]=E[u],N[x]=b(S)}),N}t.updateEachNodeAttributes(function(x,E){return b(E),E},{attributes:i})}var YD=V1.bind(null,!1);YD.assign=V1.bind(null,!0);var ZD=UD,Da={};function QD(e){return typeof e!="number"||isNaN(e)?1:e}function XD(e,t){var n={},r=function(u){return typeof u>"u"?t:u};typeof t=="function"&&(r=t);var i=function(u){return r(u[e])},s=function(){return r(void 0)};return typeof e=="string"?(n.fromAttributes=i,n.fromGraph=function(u,l){return i(u.getNodeAttributes(l))},n.fromEntry=function(u,l){return i(l)}):typeof e=="function"?(n.fromAttributes=function(){throw new Error("graphology-utils/getters/createNodeValueGetter: irrelevant usage.")},n.fromGraph=function(u,l){return r(e(l,u.getNodeAttributes(l)))},n.fromEntry=function(u,l){return r(e(u,l))}):(n.fromAttributes=s,n.fromGraph=s,n.fromEntry=s),n}function K1(e,t){var n={},r=function(u){return typeof u>"u"?t:u};typeof t=="function"&&(r=t);var i=function(u){return r(u[e])},s=function(){return r(void 0)};return typeof e=="string"?(n.fromAttributes=i,n.fromGraph=function(u,l){return i(u.getEdgeAttributes(l))},n.fromEntry=function(u,l){return i(l)},n.fromPartialEntry=n.fromEntry,n.fromMinimalEntry=n.fromEntry):typeof e=="function"?(n.fromAttributes=function(){throw new Error("graphology-utils/getters/createEdgeValueGetter: irrelevant usage.")},n.fromGraph=function(u,l){var c=u.extremities(l);return r(e(l,u.getEdgeAttributes(l),c[0],c[1],u.getNodeAttributes(c[0]),u.getNodeAttributes(c[1]),u.isUndirected(l)))},n.fromEntry=function(u,l,c,h,g,p,v){return r(e(u,l,c,h,g,p,v))},n.fromPartialEntry=function(u,l,c,h){return r(e(u,l,c,h))},n.fromMinimalEntry=function(u,l){return r(e(u,l))}):(n.fromAttributes=s,n.fromGraph=s,n.fromEntry=s,n.fromMinimalEntry=s),n}Da.createNodeValueGetter=XD;Da.createEdgeValueGetter=K1;Da.createEdgeWeightGetter=function(e){return K1(e,QD)};var ft=0,Je=1,Pe=2,Ie=3,zr=4,Gr=5,Ne=6,ay=7,Wu=8,uy=9,qD=0,JD=1,eP=2,wt=0,On=1,Bt=2,Xi=3,vi=4,ot=5,Jt=6,mr=7,yr=8,ly=3,nr=10,tP=3,Ft=9,Xc=10,nP=function(t,n,r){var i,s,u,l,c,h,g,p,v,_,T=n.length,b=r.length,N=t.adjustSizes,x=t.barnesHutTheta*t.barnesHutTheta,E,S,R,O,B,F,G,I=[];for(u=0;uC?(ye-=(ge-C)/2,He=ye+ge):(ee-=(C-ge)/2,be=ee+C),I[0+wt]=-1,I[0+On]=(ee+be)/2,I[0+Bt]=(ye+He)/2,I[0+Xi]=Math.max(be-ee,He-ye),I[0+vi]=-1,I[0+ot]=-1,I[0+Jt]=0,I[0+mr]=0,I[0+yr]=0,i=1,u=0;u=0){n[u+ft]=0)if(F=Math.pow(n[u+ft]-I[s+mr],2)+Math.pow(n[u+Je]-I[s+yr],2),_=I[s+Xi],4*_*_/F0?(G=S*n[u+Ne]*I[s+Jt]/F,n[u+Pe]+=R*G,n[u+Ie]+=O*G):F<0&&(G=-S*n[u+Ne]*I[s+Jt]/Math.sqrt(F),n[u+Pe]+=R*G,n[u+Ie]+=O*G):F>0&&(G=S*n[u+Ne]*I[s+Jt]/F,n[u+Pe]+=R*G,n[u+Ie]+=O*G),s=I[s+vi],s<0)break;continue}else{s=I[s+ot];continue}else{if(h=I[s+wt],h>=0&&h!==u&&(R=n[u+ft]-n[h+ft],O=n[u+Je]-n[h+Je],F=R*R+O*O,N===!0?F>0?(G=S*n[u+Ne]*n[h+Ne]/F,n[u+Pe]+=R*G,n[u+Ie]+=O*G):F<0&&(G=-S*n[u+Ne]*n[h+Ne]/Math.sqrt(F),n[u+Pe]+=R*G,n[u+Ie]+=O*G):F>0&&(G=S*n[u+Ne]*n[h+Ne]/F,n[u+Pe]+=R*G,n[u+Ie]+=O*G)),s=I[s+vi],s<0)break;continue}else for(S=t.scalingRatio,l=0;l0?(G=S*n[l+Ne]*n[c+Ne]/F/F,n[l+Pe]+=R*G,n[l+Ie]+=O*G,n[c+Pe]-=R*G,n[c+Ie]-=O*G):F<0&&(G=100*S*n[l+Ne]*n[c+Ne],n[l+Pe]+=R*G,n[l+Ie]+=O*G,n[c+Pe]-=R*G,n[c+Ie]-=O*G)):(F=Math.sqrt(R*R+O*O),F>0&&(G=S*n[l+Ne]*n[c+Ne]/F/F,n[l+Pe]+=R*G,n[l+Ie]+=O*G,n[c+Pe]-=R*G,n[c+Ie]-=O*G));for(v=t.gravity/t.scalingRatio,S=t.scalingRatio,u=0;u0&&(G=S*n[u+Ne]*v):F>0&&(G=S*n[u+Ne]*v/F),n[u+Pe]-=R*G,n[u+Ie]-=O*G;for(S=1*(t.outboundAttractionDistribution?E:1),g=0;g0&&(G=-S*B*Math.log(1+F)/F/n[l+Ne]):F>0&&(G=-S*B*Math.log(1+F)/F):t.outboundAttractionDistribution?F>0&&(G=-S*B/n[l+Ne]):F>0&&(G=-S*B)):(F=Math.sqrt(Math.pow(R,2)+Math.pow(O,2)),t.linLogMode?t.outboundAttractionDistribution?F>0&&(G=-S*B*Math.log(1+F)/F/n[l+Ne]):F>0&&(G=-S*B*Math.log(1+F)/F):t.outboundAttractionDistribution?(F=1,G=-S*B/n[l+Ne]):(F=1,G=-S*B)),F>0&&(n[l+Pe]+=R*G,n[l+Ie]+=O*G,n[c+Pe]-=R*G,n[c+Ie]-=O*G);var re,ne,$,P,he,xe;if(N===!0)for(u=0;uXc&&(n[u+Pe]=n[u+Pe]*Xc/re,n[u+Ie]=n[u+Ie]*Xc/re),ne=n[u+Ne]*Math.sqrt((n[u+zr]-n[u+Pe])*(n[u+zr]-n[u+Pe])+(n[u+Gr]-n[u+Ie])*(n[u+Gr]-n[u+Ie])),$=Math.sqrt((n[u+zr]+n[u+Pe])*(n[u+zr]+n[u+Pe])+(n[u+Gr]+n[u+Ie])*(n[u+Gr]+n[u+Ie]))/2,P=.1*Math.log(1+$)/(1+Math.sqrt(ne)),he=n[u+ft]+n[u+Pe]*(P/t.slowDown),n[u+ft]=he,xe=n[u+Je]+n[u+Ie]*(P/t.slowDown),n[u+Je]=xe);else for(u=0;u=0)?{message:"the `scalingRatio` setting should be a number >= 0."}:"strongGravityMode"in e&&typeof e.strongGravityMode!="boolean"?{message:"the `strongGravityMode` setting should be a boolean."}:"gravity"in e&&!(typeof e.gravity=="number"&&e.gravity>=0)?{message:"the `gravity` setting should be a number >= 0."}:"slowDown"in e&&!(typeof e.slowDown=="number"||e.slowDown>=0)?{message:"the `slowDown` setting should be a number >= 0."}:"barnesHutOptimize"in e&&typeof e.barnesHutOptimize!="boolean"?{message:"the `barnesHutOptimize` setting should be a boolean."}:"barnesHutTheta"in e&&!(typeof e.barnesHutTheta=="number"&&e.barnesHutTheta>=0)?{message:"the `barnesHutTheta` setting should be a number >= 0."}:null};Jr.graphToByteArrays=function(e,t){var n=e.order,r=e.size,i={},s,u=new Float32Array(n*Sa),l=new Float32Array(r*fy);return s=0,e.forEachNode(function(c,h){i[c]=s,u[s]=h.x,u[s+1]=h.y,u[s+2]=0,u[s+3]=0,u[s+4]=0,u[s+5]=0,u[s+6]=1,u[s+7]=1,u[s+8]=h.size||1,u[s+9]=h.fixed?1:0,s+=Sa}),s=0,e.forEachEdge(function(c,h,g,p,v,_,T){var b=i[g],N=i[p],x=t(c,h,g,p,v,_,T);u[b+6]+=x,u[N+6]+=x,l[s]=b,l[s+1]=N,l[s+2]=x,s+=fy}),{nodes:u,edges:l}};Jr.assignLayoutChanges=function(e,t,n){var r=0;e.updateEachNodeAttributes(function(i,s){return s.x=t[r],s.y=t[r+1],r+=Sa,n?n(i,s):s})};Jr.readGraphPositions=function(e,t){var n=0;e.forEachNode(function(r,i){t[n]=i.x,t[n+1]=i.y,n+=Sa})};Jr.collectLayoutChanges=function(e,t,n){for(var r=e.nodes(),i={},s=0,u=0,l=t.length;s2e3,strongGravityMode:!0,gravity:.05,scalingRatio:10,slowDown:1+Math.log(t)}}var sp=Z1.bind(null,!1);sp.assign=Z1.bind(null,!0);sp.inferSettings=aP;var uP=sp;const Ys=Oi(uP);var lP=jn,cy=P1.copyNode,fP=La.copyEdge,cP=function(t,n){if(!lP(t))throw new Error("graphology-operators/subgraph: invalid graph instance.");var r=t.nullCopy(),i=n;if(Array.isArray(n)){if(n.length===0)return r;n=new Set(n)}if(n instanceof Set){if(n.size===0)return r;i=function(u){return n.has(u)};var s=n;n=new Set,s.forEach(function(u){n.add(""+u)})}if(typeof i!="function")throw new Error("graphology-operators/subgraph: invalid nodes. Expecting an array or a set or a filtering function.");if(typeof n=="function"){if(t.forEachNode(function(u,l){i(u,l)&&cy(r,u,l)}),r.order===0)return r}else n.forEach(function(u){if(!t.hasNode(u))throw new Error('graphology-operators/subgraph: the "'+u+'" node was not found in the graph.');cy(r,u,t.getNodeAttributes(u))});return t.forEachEdge(function(u,l,c,h,g,p,v){i(c,g)&&(h!==c&&!i(h,p)||fP(r,v,u,c,h,l))}),r},hy=cP;const dy={references:30,metadata:50};async function hP(e){const t=ED(e),n=hy(e,t),r=e.getAttributes();for(const h in r)n.setAttribute(h,r[h]);const i={};e.forEachNode((h,g)=>{g.dataType==="references"?g.nbArticles>(i.references||0)&&(i.references=g.nbArticles):g.nbArticles>(i[g.dataType]||0)&&(i[g.dataType]=g.nbArticles)});const s=[],u=[];n.forEachNode((h,g)=>{g.dataType==="refs"?(s.push(h),n.setNodeAttribute(h,"size",Math.sqrt(dy.references*(g.nbArticles||1)/i.references))):(u.push(h),n.setNodeAttribute(h,"size",Math.sqrt(dy.metadata*(g.nbArticles||1)/i[g.dataType])))});const l=hy(n,s);ZD.assign(l);const c=Ys(l,{iterations:1e3,settings:Ys.inferSettings(l)});return l.forEachNode(h=>n.mergeNodeAttributes(h,{...c[h],fixed:!0})),u.forEach((h,g)=>{const p=n.neighbors(h).length;let v=0,_=0;n.forEachNeighbor(h,T=>{v+=c[T].x,_+=c[T].y}),n.mergeNodeAttributes(h,{x:v/p+Math.cos(Math.PI*2*g/u.length)/100,y:_/p+Math.sin(Math.PI*2*g/u.length)/100})}),Ys.assign(n,{iterations:200,settings:Ys.inferSettings(n)}),Promise.resolve(n)}function dP(e){return po({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 8C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm80 248c0 44.112-35.888 80-80 80s-80-35.888-80-80 35.888-80 80-80 80 35.888 80 80z"},child:[]}]})(e)}function pP(e){return po({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M304 192v32c0 6.6-5.4 12-12 12H124c-6.6 0-12-5.4-12-12v-32c0-6.6 5.4-12 12-12h168c6.6 0 12 5.4 12 12zm201 284.7L476.7 505c-9.4 9.4-24.6 9.4-33.9 0L343 405.3c-4.5-4.5-7-10.6-7-17V372c-35.3 27.6-79.7 44-128 44C93.1 416 0 322.9 0 208S93.1 0 208 0s208 93.1 208 208c0 48.3-16.4 92.7-44 128h16.3c6.4 0 12.5 2.5 17 7l99.7 99.7c9.3 9.4 9.3 24.6 0 34zM344 208c0-75.2-60.8-136-136-136S72 132.8 72 208s60.8 136 136 136 136-60.8 136-136z"},child:[]}]})(e)}function gP(e){return po({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M304 192v32c0 6.6-5.4 12-12 12h-56v56c0 6.6-5.4 12-12 12h-32c-6.6 0-12-5.4-12-12v-56h-56c-6.6 0-12-5.4-12-12v-32c0-6.6 5.4-12 12-12h56v-56c0-6.6 5.4-12 12-12h32c6.6 0 12 5.4 12 12v56h56c6.6 0 12 5.4 12 12zm201 284.7L476.7 505c-9.4 9.4-24.6 9.4-33.9 0L343 405.3c-4.5-4.5-7-10.6-7-17V372c-35.3 27.6-79.7 44-128 44C93.1 416 0 322.9 0 208S93.1 0 208 0s208 93.1 208 208c0 48.3-16.4 92.7-44 128h16.3c6.4 0 12.5 2.5 17 7l99.7 99.7c9.3 9.4 9.3 24.6 0 34zM344 208c0-75.2-60.8-136-136-136S72 132.8 72 208s60.8 136 136 136 136-60.8 136-136z"},child:[]}]})(e)}function Q1(e){return po({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z"},child:[]}]})(e)}const vP=({filters:e,setFilters:t,aggregations:n,works:r,onSubmit:i,onGoBack:s})=>K.jsxs("section",{className:"Filters c",children:[K.jsx("div",{className:"actions",children:K.jsxs("button",{className:"btn right",onClick:s,children:[K.jsx(Q1,{})," Go back to ",K.jsx("strong",{children:"upload CSV files"})]})}),K.jsx("h2",{children:K.jsx("span",{className:"hg",children:"Filters"})}),K.jsx("p",{children:"Use the sliders to chose how many nodes of each type should be included in your network based on the number of records in which they appears. It is strongly recommended NOT to include the references occurring in one record only."}),K.jsxs("p",{children:[K.jsx("br",{}),K.jsxs("i",{children:["Your data-set contains ",r.length," articles."]})]}),K.jsx("br",{}),K.jsx("div",{className:"fields",children:yn.map(u=>{var T;const{label:l}=Ra[u],c=n[u],h=((T=Ht.last(c.values))==null?void 0:T.lowerBound)||0,g=e[u]||h+1,p=c.values.find(b=>b.lowerBound>=g),v=Ht.max(c.values.map(b=>b.count)),_=p?p.count:0;return K.jsxs("div",{children:[K.jsxs("div",{children:["Keep the ",K.jsx("strong",{children:_})," ",K.jsx("span",{className:"hg",children:l.toLowerCase()})," occurring in at least ",K.jsx("strong",{children:g})," record",g>1?"s":""]}),K.jsxs("div",{children:[K.jsx("span",{style:{float:"left"},children:"0"}),K.jsx("span",{style:{float:"right"},children:v})]}),K.jsx("input",{list:u+"-tickmarks",type:"range",name:"vol",min:0,max:h,value:h+1-g,onChange:b=>t({...e,[u]:h+1-+b.target.value})})]},l)})}),K.jsx("br",{}),K.jsx("div",{className:"center",children:K.jsx("button",{className:"btn primary",onClick:()=>i(e),children:"Filter and visualise"})})]}),mP=({onSubmit:e})=>{const[n,r]=en.useState(null),[i,s]=en.useState([]),u=en.useMemo(()=>n?n.replace("//api.","//")+"&view=api,list,report":"https://openalex.org/works?view=api,list,report",[]);return K.jsxs("section",{className:"Home c",children:[K.jsx("h1",{className:"center",children:K.jsx("span",{className:"hg",children:"Bibliograph"})}),K.jsx("p",{children:"Bibliograph allows you turn a corpus of scientometrics records from ISI Web of Science or Scopus into a landscape of bibliographic coupling. Such a landscape consists in:"}),K.jsxs("ol",{children:[K.jsx("li",{children:"A base map network of references co-occurring in the records of the corpus - weighted by the frequency of their co-occurrence;"}),K.jsx("li",{children:"A layer of metadata extracted from the records (e.g. authors, subject areas, keywords) and positioned in the graph according to their co-occurrence with the references of the base map."})]}),K.jsx("p",{children:"Upload your corpus, choose the period you want to investigate, select the filtering thresholds and explore your bibliographic landscape."}),K.jsx("br",{}),K.jsx("iframe",{src:u,width:"100%",height:"480px",allow:"clipboard-write"}),K.jsx("br",{}),K.jsxs("div",{className:"row",children:[K.jsxs("div",{className:"6 col",children:[K.jsx("label",{htmlFor:"query-url",children:'Please copy the address provided above in the "API Box" and paste it below:'}),K.jsx("div",{className:"flex-row",children:K.jsx("input",{id:"query-url",type:"text",value:n||"",onChange:l=>r(l.target.value||null),placeholder:void 0,style:{flexGrow:1}})})]}),K.jsxs("div",{className:"6 col",children:[K.jsx("label",{htmlFor:"file-upload",children:"Or upload a local OpenAlex CSV works results file instead:"}),K.jsx("div",{children:K.jsx("input",{id:"file-upload",type:"file",multiple:!0,onChange:l=>s(Array.from(l.target.files||[])),style:{width:"100%"}})})]})]}),K.jsx("br",{}),K.jsx("div",{className:"flex-row center",children:K.jsx("button",{className:"btn primary",disabled:!i.length&&!n,onClick:()=>{i.length?$R(i).then(l=>e(l)):n&&UR(n).then(l=>e(l))},children:i.length?"Index the given OpenAlex API results JSON files":"Query OpenAlex API"})}),K.jsx("hr",{}),K.jsx("div",{className:"flex-row center",children:K.jsxs("div",{className:"logos",children:[K.jsx("a",{href:"https://cis.cnrs.fr/",children:K.jsx("img",{className:"logo",src:"/bibliograph/img/logo_CNRS_CIS.jpg",alt:"Centre Internet Société CNRS"})}),K.jsx("a",{href:"https://ouestware.com",children:K.jsx("img",{className:"logo",src:"/bibliograph/img/logo_ouestware_text.svg",alt:"OuestWare"})})]})})]})};var yP=function(){var t,n,r={};(function(){var s=0,u=1,l=2,c=3,h=4,g=5,p=6,v=7,_=8,T=9,b=0,N=1,x=2,E=0,S=1,R=2,O=3,B=4,F=5,G=6,I=7,ee=8,be=3,ye=10,He=3,pe=9,Qe=10;r.exports=function(ge,C,re){var ne,$,P,he,xe,Xe,ht,rt,ae,Ar,xn=C.length,go=re.length,cr=ge.adjustSizes,Na=ge.barnesHutTheta*ge.barnesHutTheta,Rt,Oe,Le,Ee,Cn,de,oe,U=[];for(P=0;Pti?(Tr-=(ei-ti)/2,An=Tr+ei):(un-=(ti-ei)/2,Yn=un+ti),U[0+E]=-1,U[0+S]=(un+Yn)/2,U[0+R]=(Tr+An)/2,U[0+O]=Math.max(Yn-un,An-Tr),U[0+B]=-1,U[0+F]=-1,U[0+G]=0,U[0+I]=0,U[0+ee]=0,ne=1,P=0;P=0){C[P+s]=0)if(de=Math.pow(C[P+s]-U[$+I],2)+Math.pow(C[P+u]-U[$+ee],2),Ar=U[$+O],4*Ar*Ar/de0?(oe=Oe*C[P+p]*U[$+G]/de,C[P+l]+=Le*oe,C[P+c]+=Ee*oe):de<0&&(oe=-Oe*C[P+p]*U[$+G]/Math.sqrt(de),C[P+l]+=Le*oe,C[P+c]+=Ee*oe):de>0&&(oe=Oe*C[P+p]*U[$+G]/de,C[P+l]+=Le*oe,C[P+c]+=Ee*oe),$=U[$+B],$<0)break;continue}else{$=U[$+F];continue}else{if(Xe=U[$+E],Xe>=0&&Xe!==P&&(Le=C[P+s]-C[Xe+s],Ee=C[P+u]-C[Xe+u],de=Le*Le+Ee*Ee,cr===!0?de>0?(oe=Oe*C[P+p]*C[Xe+p]/de,C[P+l]+=Le*oe,C[P+c]+=Ee*oe):de<0&&(oe=-Oe*C[P+p]*C[Xe+p]/Math.sqrt(de),C[P+l]+=Le*oe,C[P+c]+=Ee*oe):de>0&&(oe=Oe*C[P+p]*C[Xe+p]/de,C[P+l]+=Le*oe,C[P+c]+=Ee*oe)),$=U[$+B],$<0)break;continue}else for(Oe=ge.scalingRatio,he=0;he0?(oe=Oe*C[he+p]*C[xe+p]/de/de,C[he+l]+=Le*oe,C[he+c]+=Ee*oe,C[xe+l]-=Le*oe,C[xe+c]-=Ee*oe):de<0&&(oe=100*Oe*C[he+p]*C[xe+p],C[he+l]+=Le*oe,C[he+c]+=Ee*oe,C[xe+l]-=Le*oe,C[xe+c]-=Ee*oe)):(de=Math.sqrt(Le*Le+Ee*Ee),de>0&&(oe=Oe*C[he+p]*C[xe+p]/de/de,C[he+l]+=Le*oe,C[he+c]+=Ee*oe,C[xe+l]-=Le*oe,C[xe+c]-=Ee*oe));for(ae=ge.gravity/ge.scalingRatio,Oe=ge.scalingRatio,P=0;P0&&(oe=Oe*C[P+p]*ae):de>0&&(oe=Oe*C[P+p]*ae/de),C[P+l]-=Le*oe,C[P+c]-=Ee*oe;for(Oe=1*(ge.outboundAttractionDistribution?Rt:1),ht=0;ht0&&(oe=-Oe*Cn*Math.log(1+de)/de/C[he+p]):de>0&&(oe=-Oe*Cn*Math.log(1+de)/de):ge.outboundAttractionDistribution?de>0&&(oe=-Oe*Cn/C[he+p]):de>0&&(oe=-Oe*Cn)):(de=Math.sqrt(Math.pow(Le,2)+Math.pow(Ee,2)),ge.linLogMode?ge.outboundAttractionDistribution?de>0&&(oe=-Oe*Cn*Math.log(1+de)/de/C[he+p]):de>0&&(oe=-Oe*Cn*Math.log(1+de)/de):ge.outboundAttractionDistribution?(de=1,oe=-Oe*Cn/C[he+p]):(de=1,oe=-Oe*Cn)),de>0&&(C[he+l]+=Le*oe,C[he+c]+=Ee*oe,C[xe+l]-=Le*oe,C[xe+c]-=Ee*oe);var ni,kr,ri,Zn,ii,oi;if(cr===!0)for(P=0;PQe&&(C[P+l]=C[P+l]*Qe/ni,C[P+c]=C[P+c]*Qe/ni),kr=C[P+p]*Math.sqrt((C[P+h]-C[P+l])*(C[P+h]-C[P+l])+(C[P+g]-C[P+c])*(C[P+g]-C[P+c])),ri=Math.sqrt((C[P+h]+C[P+l])*(C[P+h]+C[P+l])+(C[P+g]+C[P+c])*(C[P+g]+C[P+c]))/2,Zn=.1*Math.log(1+ri)/(1+Math.sqrt(kr)),ii=C[P+s]+C[P+l]*(Zn/ge.slowDown),C[P+s]=ii,oi=C[P+u]+C[P+c]*(Zn/ge.slowDown),C[P+u]=oi);else for(P=0;Pe.length)&&(t=e.length);for(var n=0,r=Array(t);n>>16,n=(e&65280)>>>8,r=e&255,i=255,s=eE(t,n,r,i);return eh[e]=s,s}function gy(e,t,n,r){return n+(t<<8)+(e<<16)}function vy(e,t,n,r,i,s){var u=Math.floor(n/s*i),l=Math.floor(e.drawingBufferHeight/s-r/s*i),c=new Uint8Array(4);e.bindFramebuffer(e.FRAMEBUFFER,t),e.readPixels(u,l,1,1,e.RGBA,e.UNSIGNED_BYTE,c);var h=Ol(c,4),g=h[0],p=h[1],v=h[2],_=h[3];return[g,p,v,_]}function V(e,t,n){return(t=ia(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function my(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 se(e){for(var t=1;tR){var B="…";for(h=h+B,O=e.measureText(h).width;O>R&&h.length>1;)h=h.slice(0,-2)+B,O=e.measureText(h).width;if(h.length<4)return}var F;E>0?S>0?F=Math.acos(E/R):F=Math.asin(S/R):S>0?F=Math.acos(E/R)+Math.PI:F=Math.asin(E/R)+Math.PI/2,e.save(),e.translate(N,x),e.rotate(F),e.fillText(h,-O/2,t.size/2+s),e.restore()}}}function oE(e,t,n){if(t.label){var r=n.labelSize,i=n.labelFont,s=n.labelWeight,u=n.labelColor.attribute?t[n.labelColor.attribute]||n.labelColor.color||"#000":n.labelColor.color;e.fillStyle=u,e.font="".concat(s," ").concat(r,"px ").concat(i),e.fillText(t.label,t.x+t.size+3,t.y+r/3)}}function WP(e,t,n){var r=n.labelSize,i=n.labelFont,s=n.labelWeight;e.font="".concat(s," ").concat(r,"px ").concat(i),e.fillStyle="#FFF",e.shadowOffsetX=0,e.shadowOffsetY=0,e.shadowBlur=8,e.shadowColor="#000";var u=2;if(typeof t.label=="string"){var l=e.measureText(t.label).width,c=Math.round(l+5),h=Math.round(r+2*u),g=Math.max(t.size,r/2)+u,p=Math.asin(h/2/g),v=Math.sqrt(Math.abs(Math.pow(g,2)-Math.pow(h/2,2)));e.beginPath(),e.moveTo(t.x+v,t.y+h/2),e.lineTo(t.x+g+c,t.y+h/2),e.lineTo(t.x+g+c,t.y-h/2),e.lineTo(t.x+v,t.y-h/2),e.arc(t.x,t.y,g,p,-p),e.closePath(),e.fill()}else e.beginPath(),e.arc(t.x,t.y,t.size+u,0,Math.PI*2),e.closePath(),e.fill();e.shadowOffsetX=0,e.shadowOffsetY=0,e.shadowBlur=0,oE(e,t,n)}var HP=` +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 +} +`,jP=HP,VP=` +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; +} +`,KP=VP,sE=WebGLRenderingContext,Ey=sE.UNSIGNED_BYTE,nh=sE.FLOAT,YP=["u_sizeRatio","u_correctionRatio","u_matrix"],of=function(e){Kn(t,e);function t(){return zt(this,t),Vn(this,t,arguments)}return Gt(t,[{key:"getDefinition",value:function(){return{VERTICES:3,VERTEX_SHADER_SOURCE:KP,FRAGMENT_SHADER_SOURCE:jP,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:YP,ATTRIBUTES:[{name:"a_position",size:2,type:nh},{name:"a_size",size:1,type:nh},{name:"a_color",size:4,type:Ey,normalized:!0},{name:"a_id",size:4,type:Ey,normalized:!0}],CONSTANT_ATTRIBUTES:[{name:"a_angle",size:1,type:nh}],CONSTANT_DATA:[[t.ANGLE_1],[t.ANGLE_2],[t.ANGLE_3]]}}},{key:"processVisibleItem",value:function(r,i,s){var u=this.array,l=Pa(s.color);u[i++]=s.x,u[i++]=s.y,u[i++]=s.size,u[i++]=l,u[i++]=r}},{key:"setUniforms",value:function(r,i){var s=i.gl,u=i.uniformLocations,l=u.u_sizeRatio,c=u.u_correctionRatio,h=u.u_matrix;s.uniform1f(c,r.correctionRatio),s.uniform1f(l,r.sizeRatio),s.uniformMatrix3fv(h,!1,r.matrix)}}]),t}($P);V(of,"ANGLE_1",0);V(of,"ANGLE_2",2*Math.PI/3);V(of,"ANGLE_3",4*Math.PI/3);var ZP=` +precision mediump float; + +varying vec4 v_color; + +void main(void) { + gl_FragColor = v_color; +} +`,QP=ZP,XP=` +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; +} +`,qP=XP,aE=WebGLRenderingContext,_y=aE.UNSIGNED_BYTE,ju=aE.FLOAT,JP=["u_matrix","u_sizeRatio","u_correctionRatio","u_minEdgeThickness","u_lengthToThicknessRatio","u_widenessToThicknessRatio"],uE={lengthToThicknessRatio:2.5,widenessToThicknessRatio:2};function lE(e){var t=se(se({},uE),{});return function(n){Kn(r,n);function r(){return zt(this,r),Vn(this,r,arguments)}return Gt(r,[{key:"getDefinition",value:function(){return{VERTICES:3,VERTEX_SHADER_SOURCE:qP,FRAGMENT_SHADER_SOURCE:QP,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:JP,ATTRIBUTES:[{name:"a_position",size:2,type:ju},{name:"a_normal",size:2,type:ju},{name:"a_radius",size:1,type:ju},{name:"a_color",size:4,type:_y,normalized:!0},{name:"a_id",size:4,type:_y,normalized:!0}],CONSTANT_ATTRIBUTES:[{name:"a_barycentric",size:3,type:ju}],CONSTANT_DATA:[[1,0,0],[0,1,0],[0,0,1]]}}},{key:"processVisibleItem",value:function(s,u,l,c,h){var g=h.size||1,p=c.size||1,v=l.x,_=l.y,T=c.x,b=c.y,N=Pa(h.color),x=T-v,E=b-_,S=x*x+E*E,R=0,O=0;S&&(S=1/Math.sqrt(S),R=-E*S*g,O=x*S*g);var B=this.array;B[u++]=T,B[u++]=b,B[u++]=-R,B[u++]=-O,B[u++]=p,B[u++]=N,B[u++]=s}},{key:"setUniforms",value:function(s,u){var l=u.gl,c=u.uniformLocations,h=c.u_matrix,g=c.u_sizeRatio,p=c.u_correctionRatio,v=c.u_minEdgeThickness,_=c.u_lengthToThicknessRatio,T=c.u_widenessToThicknessRatio;l.uniformMatrix3fv(h,!1,s.matrix),l.uniform1f(g,s.sizeRatio),l.uniform1f(p,s.correctionRatio),l.uniform1f(v,s.minEdgeThickness),l.uniform1f(_,t.lengthToThicknessRatio),l.uniform1f(T,t.widenessToThicknessRatio)}}]),r}(ap)}lE();var e3=` +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 +} +`,fE=e3,t3=` +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; +} +`,n3=t3,cE=WebGLRenderingContext,Sy=cE.UNSIGNED_BYTE,qi=cE.FLOAT,r3=["u_matrix","u_zoomRatio","u_sizeRatio","u_correctionRatio","u_pixelRatio","u_feather","u_minEdgeThickness","u_lengthToThicknessRatio"],i3={lengthToThicknessRatio:uE.lengthToThicknessRatio};function hE(e){var t=se(se({},i3),{});return function(n){Kn(r,n);function r(){return zt(this,r),Vn(this,r,arguments)}return Gt(r,[{key:"getDefinition",value:function(){return{VERTICES:6,VERTEX_SHADER_SOURCE:n3,FRAGMENT_SHADER_SOURCE:fE,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:r3,ATTRIBUTES:[{name:"a_positionStart",size:2,type:qi},{name:"a_positionEnd",size:2,type:qi},{name:"a_normal",size:2,type:qi},{name:"a_color",size:4,type:Sy,normalized:!0},{name:"a_id",size:4,type:Sy,normalized:!0},{name:"a_radius",size:1,type:qi}],CONSTANT_ATTRIBUTES:[{name:"a_positionCoef",size:1,type:qi},{name:"a_normalCoef",size:1,type:qi},{name:"a_radiusCoef",size:1,type:qi}],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,u,l,c,h){var g=h.size||1,p=l.x,v=l.y,_=c.x,T=c.y,b=Pa(h.color),N=_-p,x=T-v,E=c.size||1,S=N*N+x*x,R=0,O=0;S&&(S=1/Math.sqrt(S),R=-x*S*g,O=N*S*g);var B=this.array;B[u++]=p,B[u++]=v,B[u++]=_,B[u++]=T,B[u++]=R,B[u++]=O,B[u++]=b,B[u++]=s,B[u++]=E}},{key:"setUniforms",value:function(s,u){var l=u.gl,c=u.uniformLocations,h=c.u_matrix,g=c.u_zoomRatio,p=c.u_feather,v=c.u_pixelRatio,_=c.u_correctionRatio,T=c.u_sizeRatio,b=c.u_minEdgeThickness,N=c.u_lengthToThicknessRatio;l.uniformMatrix3fv(h,!1,s.matrix),l.uniform1f(g,s.zoomRatio),l.uniform1f(T,s.sizeRatio),l.uniform1f(_,s.correctionRatio),l.uniform1f(v,s.pixelRatio),l.uniform1f(p,s.antiAliasingFeather),l.uniform1f(b,s.minEdgeThickness),l.uniform1f(N,t.lengthToThicknessRatio)}}]),r}(ap)}hE();function o3(e){return MP([hE(),lE()])}var s3=o3(),a3=s3,u3=` +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; +} +`,l3=u3,dE=WebGLRenderingContext,xy=dE.UNSIGNED_BYTE,Us=dE.FLOAT,f3=["u_matrix","u_zoomRatio","u_sizeRatio","u_correctionRatio","u_pixelRatio","u_feather","u_minEdgeThickness"],c3=function(e){Kn(t,e);function t(){return zt(this,t),Vn(this,t,arguments)}return Gt(t,[{key:"getDefinition",value:function(){return{VERTICES:6,VERTEX_SHADER_SOURCE:l3,FRAGMENT_SHADER_SOURCE:fE,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:f3,ATTRIBUTES:[{name:"a_positionStart",size:2,type:Us},{name:"a_positionEnd",size:2,type:Us},{name:"a_normal",size:2,type:Us},{name:"a_color",size:4,type:xy,normalized:!0},{name:"a_id",size:4,type:xy,normalized:!0}],CONSTANT_ATTRIBUTES:[{name:"a_positionCoef",size:1,type:Us},{name:"a_normalCoef",size:1,type:Us}],CONSTANT_DATA:[[0,1],[0,-1],[1,1],[1,1],[0,-1],[1,-1]]}}},{key:"processVisibleItem",value:function(r,i,s,u,l){var c=l.size||1,h=s.x,g=s.y,p=u.x,v=u.y,_=Pa(l.color),T=p-h,b=v-g,N=T*T+b*b,x=0,E=0;N&&(N=1/Math.sqrt(N),x=-b*N*c,E=T*N*c);var S=this.array;S[i++]=h,S[i++]=g,S[i++]=p,S[i++]=v,S[i++]=x,S[i++]=E,S[i++]=_,S[i++]=r}},{key:"setUniforms",value:function(r,i){var s=i.gl,u=i.uniformLocations,l=u.u_matrix,c=u.u_zoomRatio,h=u.u_feather,g=u.u_pixelRatio,p=u.u_correctionRatio,v=u.u_sizeRatio,_=u.u_minEdgeThickness;s.uniformMatrix3fv(l,!1,r.matrix),s.uniform1f(c,r.zoomRatio),s.uniform1f(v,r.sizeRatio),s.uniform1f(p,r.correctionRatio),s.uniform1f(g,r.pixelRatio),s.uniform1f(h,r.antiAliasingFeather),s.uniform1f(_,r.minEdgeThickness)}}]),t}(ap),up=function(e){Kn(t,e);function t(){var n;return zt(this,t),n=Vn(this,t),n.rawEmitter=Z(n),n}return Gt(t)}(p1.EventEmitter),h3=function(t){return t},d3=function(t){return t*t},p3=function(t){return t*(2-t)},g3=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},v3=function(t){return t*t*t},m3=function(t){return--t*t*t+1},y3=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},w3={linear:h3,quadraticIn:d3,quadraticOut:p3,quadraticInOut:g3,cubicIn:v3,cubicOut:m3,cubicInOut:y3},E3={easing:"quadraticInOut",duration:150};function rr(){return Float32Array.of(1,0,0,0,1,0,0,0,1)}function Vu(e,t,n){return e[0]=t,e[4]=typeof n=="number"?n:t,e}function Cy(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 Ay(e,t,n){return e[6]=t,e[7]=n,e}function mi(e,t){var n=e[0],r=e[1],i=e[2],s=e[3],u=e[4],l=e[5],c=e[6],h=e[7],g=e[8],p=t[0],v=t[1],_=t[2],T=t[3],b=t[4],N=t[5],x=t[6],E=t[7],S=t[8];return e[0]=p*n+v*s+_*c,e[1]=p*r+v*u+_*h,e[2]=p*i+v*l+_*g,e[3]=T*n+b*s+N*c,e[4]=T*r+b*u+N*h,e[5]=T*i+b*l+N*g,e[6]=x*n+E*s+S*c,e[7]=x*r+E*u+S*h,e[8]=x*i+E*l+S*g,e}function id(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,r=e[0],i=e[1],s=e[3],u=e[4],l=e[6],c=e[7],h=t.x,g=t.y;return{x:h*r+g*s+l*n,y:h*i+g*u+c*n}}function _3(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 $s(e,t,n,r,i){var s=e.angle,u=e.ratio,l=e.x,c=e.y,h=t.width,g=t.height,p=rr(),v=Math.min(h,g)-2*r,_=_3(t,n);return i?(mi(p,Ay(rr(),l,c)),mi(p,Vu(rr(),u)),mi(p,Cy(rr(),s)),mi(p,Vu(rr(),h/v/2/_,g/v/2/_))):(mi(p,Vu(rr(),2*(v/h)*_,2*(v/g)*_)),mi(p,Cy(rr(),-s)),mi(p,Vu(rr(),1/u)),mi(p,Ay(rr(),-l,-c))),p}function S3(e,t,n){var r=id(e,{x:Math.cos(t.angle),y:Math.sin(t.angle)},0),i=r.x,s=r.y;return 1/Math.sqrt(Math.pow(i,2)+Math.pow(s,2))/n.width}function x3(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(s,u){var l=u.x,c=u.y;ln&&(n=l),ci&&(i=c)}),{x:[t,n],y:[r,i]}}function C3(e){if(!gD(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 A3(e,t,n){var r=document.createElement(e);if(t)for(var i in t)r.style[i]=t[i];if(n)for(var s in n)r.setAttribute(s,n[s]);return r}function Ty(){return typeof window.devicePixelRatio<"u"?window.devicePixelRatio:1}function ky(e,t,n){return n.sort(function(r,i){var s=t(r)||0,u=t(i)||0;return su?1:0})}function by(e){var t=Ol(e.x,2),n=t[0],r=t[1],i=Ol(e.y,2),s=i[0],u=i[1],l=Math.max(r-n,u-s),c=(r+n)/2,h=(u+s)/2;(l===0||Math.abs(l)===1/0||isNaN(l))&&(l=1),isNaN(c)&&(c=0),isNaN(h)&&(h=0);var g=function(v){return{x:.5+(v.x-c)/l,y:.5+(v.y-h)/l}};return g.applyTo=function(p){p.x=.5+(p.x-c)/l,p.y=.5+(p.y-h)/l},g.inverse=function(p){return{x:c+l*(p.x-.5),y:h+l*(p.y-.5)}},g.ratio=l,g}function Ry(e,t){var n=t.size;if(n!==0){var r=e.length;e.length+=n;var i=0;t.forEach(function(s){e[r+i]=s,i++})}}function rh(e){e=e||{};for(var t=0,n=arguments.length<=1?0:arguments.length-1;t1&&arguments[1]!==void 0?arguments[1]:{},u=arguments.length>2?arguments[2]:void 0;if(!u)return new Promise(function(_){return i.animate(r,s,_)});if(this.enabled){var l=se(se({},E3),s),c=this.validateState(r),h=typeof l.easing=="function"?l.easing:w3[l.easing],g=Date.now(),p=this.getState(),v=function _(){var T=(Date.now()-g)/l.duration;if(T>=1){i.nextFrame=null,i.setState(c),i.animationCallback&&(i.animationCallback.call(null),i.animationCallback=void 0);return}var b=h(T),N={};typeof c.x=="number"&&(N.x=p.x+(c.x-p.x)*b),typeof c.y=="number"&&(N.y=p.y+(c.y-p.y)*b),i.enabledRotation&&typeof c.angle=="number"&&(N.angle=p.angle+(c.angle-p.angle)*b),typeof c.ratio=="number"&&(N.ratio=p.ratio+(c.ratio-p.ratio)*b),i.setState(N),i.nextFrame=requestAnimationFrame(_)};this.nextFrame?(cancelAnimationFrame(this.nextFrame),this.animationCallback&&this.animationCallback.call(null),this.nextFrame=requestAnimationFrame(v)):v(),this.animationCallback=u}}},{key:"animatedZoom",value:function(r){return r?typeof r=="number"?this.animate({ratio:this.ratio/r}):this.animate({ratio:this.ratio/(r.factor||Ku)},r):this.animate({ratio:this.ratio/Ku})}},{key:"animatedUnzoom",value:function(r){return r?typeof r=="number"?this.animate({ratio:this.ratio*r}):this.animate({ratio:this.ratio*(r.factor||Ku)},r):this.animate({ratio:this.ratio*Ku})}},{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)}}]),t}(up);function ar(e,t){var n=t.getBoundingClientRect();return{x:e.clientX-n.left,y:e.clientY-n.top}}function Ur(e,t){var n=se(se({},ar(e,t)),{},{sigmaDefaultPrevented:!1,preventSigmaDefault:function(){n.sigmaDefaultPrevented=!0},original:e});return n}function Ms(e){var t="x"in e?e:se(se({},e.touches[0]||e.previousTouches[0]),{},{original:e.original,sigmaDefaultPrevented:e.sigmaDefaultPrevented,preventSigmaDefault:function(){e.sigmaDefaultPrevented=!0,t.sigmaDefaultPrevented=!0}});return t}function R3(e,t){return se(se({},Ur(e,t)),{},{delta:pE(e)})}var L3=2;function ul(e){for(var t=[],n=0,r=Math.min(e.length,L3);n0;i.draggedEvents=0,p&&i.renderer.refresh()},0),this.emit("mouseup",Ur(r,this.container))}}},{key:"handleMove",value:function(r){var i=this;if(this.enabled){var s=Ur(r,this.container);if(this.emit("mousemovebody",s),(r.target===this.container||r.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(){i.movingTimeout=null,i.isMoving=!1},this.settings.dragTimeout);var u=this.renderer.getCamera(),l=ar(r,this.container),c=l.x,h=l.y,g=this.renderer.viewportToFramedGraph({x:this.lastMouseX,y:this.lastMouseY}),p=this.renderer.viewportToFramedGraph({x:c,y:h}),v=g.x-p.x,_=g.y-p.y,T=u.getState(),b=T.x+v,N=T.y+_;u.setState({x:b,y:N}),this.lastMouseX=c,this.lastMouseY=h,r.preventDefault(),r.stopPropagation()}}}},{key:"handleLeave",value:function(r){this.emit("mouseleave",Ur(r,this.container))}},{key:"handleEnter",value:function(r){this.emit("mouseenter",Ur(r,this.container))}},{key:"handleWheel",value:function(r){var i=this;if(this.enabled){r.preventDefault(),r.stopPropagation();var s=pE(r);if(s){var u=R3(r,this.container);if(this.emit("wheel",u),!u.sigmaDefaultPrevented){var l=s>0?1/this.settings.zoomingRatio:this.settings.zoomingRatio,c=this.renderer.getCamera(),h=c.getBoundedRatio(c.getState().ratio*l),g=s>0?1:-1,p=Date.now();this.currentWheelDirection===g&&this.lastWheelTriggerTime&&p-this.lastWheelTriggerTimer.size?-1:n.sizer.key?1:-1}}]),e}(),Fy=function(){function e(){zt(this,e),V(this,"width",0),V(this,"height",0),V(this,"cellSize",0),V(this,"columns",0),V(this,"rows",0),V(this,"cells",{})}return Gt(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 s=new Iy(n,r),u=this.getIndex(i),l=this.cells[u];l||(l=[],this.cells[u]=l),l.push(s)}},{key:"organize",value:function(){for(var n in this.cells){var r=this.cells[n];r.sort(Iy.compare)}}},{key:"getLabelsToDisplay",value:function(n,r){var i=this.cellSize*this.cellSize,s=i/n/n,u=s*r/i,l=Math.ceil(u),c=[];for(var h in this.cells)for(var g=this.cells[h],p=0;p2&&arguments[2]!==void 0?arguments[2]:{};if(zt(this,t),i=Vn(this,t),V(Z(i),"elements",{}),V(Z(i),"canvasContexts",{}),V(Z(i),"webGLContexts",{}),V(Z(i),"pickingLayers",new Set),V(Z(i),"textures",{}),V(Z(i),"frameBuffers",{}),V(Z(i),"activeListeners",{}),V(Z(i),"labelGrid",new Fy),V(Z(i),"nodeDataCache",{}),V(Z(i),"edgeDataCache",{}),V(Z(i),"nodeProgramIndex",{}),V(Z(i),"edgeProgramIndex",{}),V(Z(i),"nodesWithForcedLabels",new Set),V(Z(i),"edgesWithForcedLabels",new Set),V(Z(i),"nodeExtent",{x:[0,1],y:[0,1]}),V(Z(i),"nodeZExtent",[1/0,-1/0]),V(Z(i),"edgeZExtent",[1/0,-1/0]),V(Z(i),"matrix",rr()),V(Z(i),"invMatrix",rr()),V(Z(i),"correctionRatio",1),V(Z(i),"customBBox",null),V(Z(i),"normalizationFunction",by({x:[0,1],y:[0,1]})),V(Z(i),"graphToViewportRatio",1),V(Z(i),"itemIDsIndex",{}),V(Z(i),"nodeIndices",{}),V(Z(i),"edgeIndices",{}),V(Z(i),"width",0),V(Z(i),"height",0),V(Z(i),"pixelRatio",Ty()),V(Z(i),"pickingDownSizingRatio",2*i.pixelRatio),V(Z(i),"displayedNodeLabels",new Set),V(Z(i),"displayedEdgeLabels",new Set),V(Z(i),"highlightedNodes",new Set),V(Z(i),"hoveredNode",null),V(Z(i),"hoveredEdge",null),V(Z(i),"renderFrame",null),V(Z(i),"renderHighlightedNodesFrame",null),V(Z(i),"needToProcess",!1),V(Z(i),"checkEdgesEventsFrame",null),V(Z(i),"nodePrograms",{}),V(Z(i),"nodeHoverPrograms",{}),V(Z(i),"edgePrograms",{}),i.settings=b3(s),Ly(i.settings),C3(n),!(r instanceof HTMLElement))throw new Error("Sigma: container should be an html element.");i.graph=n,i.container=r,i.createWebGLContext("edges",{picking:s.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 u in i.settings.nodeProgramClasses)i.registerNodeProgram(u,i.settings.nodeProgramClasses[u],i.settings.nodeHoverProgramClasses[u]);for(var l in i.settings.edgeProgramClasses)i.registerEdgeProgram(l,i.settings.edgeProgramClasses[l]);return i.camera=new Dy,i.bindCameraHandlers(),i.mouseCaptor=new I3(i.elements.mouse,Z(i)),i.mouseCaptor.setSettings(i.settings),i.touchCaptor=new O3(i.elements.mouse,Z(i)),i.touchCaptor.setSettings(i.settings),i.bindEventHandlers(),i.bindGraphHandlers(),i.handleSettingsUpdate(),i.refresh(),i}return Gt(t,[{key:"registerNodeProgram",value:function(r,i,s){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(s||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,s=i[r],u=ih(i,[r].map(ia));s.kill(),this.nodePrograms=u}if(this.nodeHoverPrograms[r]){var l=this.nodeHoverPrograms,c=l[r],h=ih(l,[r].map(ia));c.kill(),this.nodePrograms=h}return this}},{key:"unregisterEdgeProgram",value:function(r){if(this.edgePrograms[r]){var i=this.edgePrograms,s=i[r],u=ih(i,[r].map(ia));s.kill(),this.edgePrograms=u}return this}},{key:"resetWebGLTexture",value:function(r){var i=this.webGLContexts[r],s=this.frameBuffers[r],u=this.textures[r];u&&i.deleteTexture(u);var l=i.createTexture();return i.bindFramebuffer(i.FRAMEBUFFER,s),i.bindTexture(i.TEXTURE_2D,l),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,l,0),this.textures[r]=l,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,s=r.y,u=vy(this.webGLContexts.nodes,this.frameBuffers.nodes,i,s,this.pixelRatio,this.pickingDownSizingRatio),l=gy.apply(void 0,Py(u)),c=this.itemIDsIndex[l];return c&&c.type==="node"?c.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(s){var u=Ms(s),l={event:u,preventSigmaDefault:function(){u.preventSigmaDefault()}},c=r.getNodeAtPosition(u);if(c&&r.hoveredNode!==c&&!r.nodeDataCache[c].hidden){r.hoveredNode&&r.emit("leaveNode",se(se({},l),{},{node:r.hoveredNode})),r.hoveredNode=c,r.emit("enterNode",se(se({},l),{},{node:c})),r.scheduleHighlightedNodesRender();return}if(r.hoveredNode&&r.getNodeAtPosition(u)!==r.hoveredNode){var h=r.hoveredNode;r.hoveredNode=null,r.emit("leaveNode",se(se({},l),{},{node:h})),r.scheduleHighlightedNodesRender();return}if(r.settings.enableEdgeEvents){var g=r.hoveredNode?null:r.getEdgeAtPoint(l.event.x,l.event.y);g!==r.hoveredEdge&&(r.hoveredEdge&&r.emit("leaveEdge",se(se({},l),{},{edge:r.hoveredEdge})),g&&r.emit("enterEdge",se(se({},l),{},{edge:g})),r.hoveredEdge=g)}},this.activeListeners.handleMoveBody=function(s){var u=Ms(s);r.emit("moveBody",{event:u,preventSigmaDefault:function(){u.preventSigmaDefault()}})},this.activeListeners.handleLeave=function(s){var u=Ms(s),l={event:u,preventSigmaDefault:function(){u.preventSigmaDefault()}};r.hoveredNode&&(r.emit("leaveNode",se(se({},l),{},{node:r.hoveredNode})),r.scheduleHighlightedNodesRender()),r.settings.enableEdgeEvents&&r.hoveredEdge&&(r.emit("leaveEdge",se(se({},l),{},{edge:r.hoveredEdge})),r.scheduleHighlightedNodesRender()),r.emit("leaveStage",se({},l))},this.activeListeners.handleEnter=function(s){var u=Ms(s),l={event:u,preventSigmaDefault:function(){u.preventSigmaDefault()}};r.emit("enterStage",se({},l))};var i=function(u){return function(l){var c=Ms(l),h={event:c,preventSigmaDefault:function(){c.preventSigmaDefault()}},g=r.getNodeAtPosition(c);if(g)return r.emit("".concat(u,"Node"),se(se({},h),{},{node:g}));if(r.settings.enableEdgeEvents){var p=r.getEdgeAtPoint(c.x,c.y);if(p)return r.emit("".concat(u,"Edge"),se(se({},h),{},{edge:p}))}return r.emit("".concat(u,"Stage"),h)}};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,s=new Set(["x","y","zIndex","type"]);return this.activeListeners.eachNodeAttributesUpdatedGraphUpdate=function(u){var l,c=(l=u.hints)===null||l===void 0?void 0:l.attributes;r.graph.forEachNode(function(g){return r.updateNode(g)});var h=!c||c.some(function(g){return s.has(g)});r.refresh({partialGraph:{nodes:i.nodes()},skipIndexation:!h,schedule:!0})},this.activeListeners.eachEdgeAttributesUpdatedGraphUpdate=function(u){var l,c=(l=u.hints)===null||l===void 0?void 0:l.attributes;r.graph.forEachEdge(function(g){return r.updateEdge(g)});var h=c&&["zIndex","type"].some(function(g){return c==null?void 0:c.includes(g)});r.refresh({partialGraph:{edges:i.edges()},skipIndexation:!h,schedule:!0})},this.activeListeners.addNodeGraphUpdate=function(u){var l=u.key;r.addNode(l),r.refresh({partialGraph:{nodes:[l]},skipIndexation:!1,schedule:!0})},this.activeListeners.updateNodeGraphUpdate=function(u){var l=u.key;r.refresh({partialGraph:{nodes:[l]},skipIndexation:!1,schedule:!0})},this.activeListeners.dropNodeGraphUpdate=function(u){var l=u.key;r.removeNode(l),r.refresh({schedule:!0})},this.activeListeners.addEdgeGraphUpdate=function(u){var l=u.key;r.addEdge(l),r.refresh({partialGraph:{edges:[l]},schedule:!0})},this.activeListeners.updateEdgeGraphUpdate=function(u){var l=u.key;r.refresh({partialGraph:{edges:[l]},skipIndexation:!1,schedule:!0})},this.activeListeners.dropEdgeGraphUpdate=function(u){var l=u.key;r.removeEdge(l),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 s=vy(this.webGLContexts.edges,this.frameBuffers.edges,r,i,this.pixelRatio,this.pickingDownSizingRatio),u=gy.apply(void 0,Py(s)),l=this.itemIDsIndex[u];return l&&l.type==="edge"?l.id:null}},{key:"process",value:function(){var r=this;this.emit("beforeProcess");var i=this.graph,s=this.settings,u=this.getDimensions();if(this.nodeExtent=x3(this.graph),!this.settings.autoRescale){var l=u.width,c=u.height,h=this.nodeExtent,g=h.x,p=h.y;this.nodeExtent={x:[(g[0]+g[1])/2-l/2,(g[0]+g[1])/2+l/2],y:[(p[0]+p[1])/2-c/2,(p[0]+p[1])/2+c/2]}}this.normalizationFunction=by(this.customBBox||this.nodeExtent);var v=new Dy,_=$s(v.getState(),u,this.getGraphDimensions(),this.getStagePadding());this.labelGrid.resizeAndClear(u,s.labelGridCellSize);for(var T={},b={},N={},x={},E=1,S=i.nodes(),R=0,O=S.length;Rthis.width+Ny||v<-Oy||v>this.height+Oy)){this.displayedNodeLabels.add(c);var T=this.settings.defaultDrawNodeLabel,b=this.nodePrograms[h.type],N=(b==null?void 0:b.drawLabel)||T;N(s,se(se({key:c},h),{},{size:_,x:p,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=M3({graph:this.graph,hoveredNode:this.hoveredNode,displayedNodeLabels:this.displayedNodeLabels,highlightedNodes:this.highlightedNodes});Ry(i,this.edgesWithForcedLabels);for(var s=new Set,u=0,l=i.length;uthis.nodeZExtent[1]&&(this.nodeZExtent[1]=s.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 s=W3(this.settings,r,i);this.edgeDataCache[r]=s,this.edgesWithForcedLabels.delete(r),s.forceLabel&&!s.hidden&&this.edgesWithForcedLabels.add(r),this.settings.zIndex&&(s.zIndexthis.edgeZExtent[1]&&(this.edgeZExtent[1]=s.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 Fy,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,s){var u=this.nodeDataCache[r],l=this.nodePrograms[u.type];if(!l)throw new Error('Sigma: could not find a suitable program for node type "'.concat(u.type,'"!'));l.process(i,s,u),this.nodeProgramIndex[r]=s}},{key:"addEdgeToProgram",value:function(r,i,s){var u=this.edgeDataCache[r],l=this.edgePrograms[u.type];if(!l)throw new Error('Sigma: could not find a suitable program for edge type "'.concat(u.type,'"!'));var c=this.graph.extremities(r),h=this.nodeDataCache[c[0]],g=this.nodeDataCache[c[1]];l.process(i,s,h,g,u),this.edgeProgramIndex[r]=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 r=this.settings,i=r.stagePadding,s=r.autoRescale;return s&&i||0}},{key:"createCanvas",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.elements[r])throw new Error('Sigma: a layer named "'.concat(r,'" already exists'));var s=A3("canvas",{position:"absolute"},{class:"sigma-".concat(r)});return i.style&&Object.assign(s.style,i.style),this.elements[r]=s,"beforeLayer"in i&&i.beforeLayer?this.elements[i.beforeLayer].before(s):"afterLayer"in i&&i.afterLayer?this.elements[i.afterLayer].after(s):this.container.appendChild(s),s}},{key:"createCanvasContext",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=this.createCanvas(r,i),u={preserveDrawingBuffer:!1,antialias:!1};return this.canvasContexts[r]=s.getContext("2d",u),this}},{key:"createWebGLContext",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=(i==null?void 0:i.canvas)||this.createCanvas(r,i);i.hidden&&s.remove();var u=se({preserveDrawingBuffer:!1,antialias:!1},i),l;l=s.getContext("webgl2",u),l||(l=s.getContext("webgl",u)),l||(l=s.getContext("experimental-webgl",u));var c=l;if(this.webGLContexts[r]=c,c.blendFunc(c.ONE,c.ONE_MINUS_SRC_ALPHA),i.picking){this.pickingLayers.add(r);var h=c.createFramebuffer();if(!h)throw new Error("Sigma: cannot create a new frame buffer for layer ".concat(r));this.frameBuffers[r]=h}return c}},{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 s,u=this.webGLContexts[r];(s=u.getExtension("WEBGL_lose_context"))===null||s===void 0||s.loseContext(),delete this.webGLContexts[r]}else 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.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 se({},this.settings)}},{key:"getSetting",value:function(r){return this.settings[r]}},{key:"setSetting",value:function(r,i){var s=se({},this.settings);return this.settings[r]=i,Ly(this.settings),this.handleSettingsUpdate(s),this.scheduleRefresh(),this}},{key:"updateSetting",value:function(r,i){return this.setSetting(r,i(this.settings[r])),this}},{key:"resize",value:function(r){var i=this.width,s=this.height;if(this.width=this.container.offsetWidth,this.height=this.container.offsetHeight,this.pixelRatio=Ty(),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&&s===this.height)return this;this.emit("resize");for(var u in this.elements){var l=this.elements[u];l.style.width=this.width+"px",l.style.height=this.height+"px"}for(var c in this.canvasContexts)this.elements[c].setAttribute("width",this.width*this.pixelRatio+"px"),this.elements[c].setAttribute("height",this.height*this.pixelRatio+"px"),this.pixelRatio!==1&&this.canvasContexts[c].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 g=this.webGLContexts[h];if(g.viewport(0,0,this.width*this.pixelRatio,this.height*this.pixelRatio),this.pickingLayers.has(h)){var p=this.textures[h];p&&g.deleteTexture(p)}}return 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,s=(r==null?void 0:r.skipIndexation)!==void 0?r==null?void 0:r.skipIndexation:!1,u=(r==null?void 0:r.schedule)!==void 0?r.schedule:!1,l=!r||!r.partialGraph;if(l)this.clearEdgeIndices(),this.clearNodeIndices(),this.graph.forEachNode(function(R){return i.addNode(R)}),this.graph.forEachEdge(function(R){return i.addEdge(R)});else{for(var c,h,g=((c=r.partialGraph)===null||c===void 0?void 0:c.nodes)||[],p=0,v=(g==null?void 0:g.length)||0;p1&&arguments[1]!==void 0?arguments[1]:{},s=!!i.cameraState||!!i.viewportDimensions||!!i.graphDimensions,u=i.matrix?i.matrix:s?$s(i.cameraState||this.camera.getState(),i.viewportDimensions||this.getDimensions(),i.graphDimensions||this.getGraphDimensions(),i.padding||this.getStagePadding()):this.matrix,l=id(u,r);return{x:(1+l.x)*this.width/2,y:(1-l.y)*this.height/2}}},{key:"viewportToFramedGraph",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=!!i.cameraState||!!i.viewportDimensions||!i.graphDimensions,u=i.matrix?i.matrix:s?$s(i.cameraState||this.camera.getState(),i.viewportDimensions||this.getDimensions(),i.graphDimensions||this.getGraphDimensions(),i.padding||this.getStagePadding(),!0):this.invMatrix,l=id(u,{x:r.x/this.width*2-1,y:1-r.y/this.height*2});return isNaN(l.x)&&(l.x=0),isNaN(l.y)&&(l.y=0),l}},{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},s=Math.sqrt(Math.pow(r.x-i.x,2)+Math.pow(r.y-i.y,2)),u=this.graphToViewport(r),l=this.graphToViewport(i),c=Math.sqrt(Math.pow(u.x-l.x,2)+Math.pow(u.y-l.y,2));return c/s}},{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 s in this.nodeHoverPrograms)this.nodeHoverPrograms[s].kill();for(var u in this.edgePrograms)this.edgePrograms[u].kill();this.nodePrograms={},this.nodeHoverPrograms={},this.edgePrograms={};for(var l in this.elements)this.killLayer(l)}},{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(){return se({},this.elements)}}]),t}(up),j3=H3,vE={exports:{}};(function(e,t){(function(n,r){r()})(Er,function(){function n(h,g){return typeof g>"u"?g={autoBom:!1}:typeof g!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),g={autoBom:!g}),g.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(h.type)?new Blob(["\uFEFF",h],{type:h.type}):h}function r(h,g,p){var v=new XMLHttpRequest;v.open("GET",h),v.responseType="blob",v.onload=function(){c(v.response,g,p)},v.onerror=function(){console.error("could not download file")},v.send()}function i(h){var g=new XMLHttpRequest;g.open("HEAD",h,!1);try{g.send()}catch{}return 200<=g.status&&299>=g.status}function s(h){try{h.dispatchEvent(new MouseEvent("click"))}catch{var g=document.createEvent("MouseEvents");g.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),h.dispatchEvent(g)}}var u=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Er=="object"&&Er.global===Er?Er:void 0,l=u.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),c=u.saveAs||(typeof window!="object"||window!==u?function(){}:"download"in HTMLAnchorElement.prototype&&!l?function(h,g,p){var v=u.URL||u.webkitURL,_=document.createElement("a");g=g||h.name||"download",_.download=g,_.rel="noopener",typeof h=="string"?(_.href=h,_.origin===location.origin?s(_):i(_.href)?r(h,g,p):s(_,_.target="_blank")):(_.href=v.createObjectURL(h),setTimeout(function(){v.revokeObjectURL(_.href)},4e4),setTimeout(function(){s(_)},0))}:"msSaveOrOpenBlob"in navigator?function(h,g,p){if(g=g||h.name||"download",typeof h!="string")navigator.msSaveOrOpenBlob(n(h,p),g);else if(i(h))r(h,g,p);else{var v=document.createElement("a");v.href=h,v.target="_blank",setTimeout(function(){s(v)})}}:function(h,g,p,v){if(v=v||open("","_blank"),v&&(v.document.title=v.document.body.innerText="downloading..."),typeof h=="string")return r(h,g,p);var _=h.type==="application/octet-stream",T=/constructor/i.test(u.HTMLElement)||u.safari,b=/CriOS\/[\d]+/.test(navigator.userAgent);if((b||_&&T||l)&&typeof FileReader<"u"){var N=new FileReader;N.onloadend=function(){var S=N.result;S=b?S:S.replace(/^data:[^;]*;/,"data:attachment/file;"),v?v.location.href=S:location=S,v=null},N.readAsDataURL(h)}else{var x=u.URL||u.webkitURL,E=x.createObjectURL(h);v?v.location=E:location.href=E,v=null,setTimeout(function(){x.revokeObjectURL(E)},4e4)}});u.saveAs=c.saveAs=c,e.exports=c})})(vE);var fp=vE.exports,Ia={},V3=/^\s$/,K3=/\s*,\s*/,Y3=/\s*\|\s*/;function Z3(e){return V3.test(e)}function mE(e){var t,n,r,i,s=!1,u=!1,l=void 0,c=[],h="";for(r=0,i=e.length;r=2&&t[0]==="["&&t[t.length-1]==="]"?r=mE(t.slice(1,-1)):t.includes("|")?r=t.split(Y3):t.includes(",")?r=t.split(K3):r=[t],r.map(function(i){return od(n,i)})}else return od(e,t)}Ia.parseListPieces=mE;Ia.parseScalarValue=od;Ia.parseValue=Q3;var X3=/["'<>&\s]/g;Ia.sanitizeTagName=function(t){return t.replace(X3,"").trim()};var q3=jn,J3=function(t){if(!q3(t))throw new Error("graphology-utils/infer-type: expecting a valid graphology instance.");var n=t.type;return n!=="mixed"?n:t.directedSize===0&&t.undirectedSize===0||t.directedSize>0&&t.undirectedSize>0?"mixed":t.directedSize>0?"directed":"undirected"};function zy(e){return typeof e!="number"&&!e}function gn(e){if(typeof e=="string")return e;if(typeof e=="number")return e+"";if(typeof e=="function")return e();if(e instanceof xa)return e.toString();throw Error("Bad Parameter")}function xa(e,t){if(!(this instanceof xa))return new xa;this.name_regex=/[_:A-Za-z][-._:A-Za-z0-9]*/,this.indent=!!e,this.indentString=this.indent&&typeof e=="string"?e:" ",this.output="",this.stack=[],this.tags=0,this.attributes=0,this.attribute=0,this.texts=0,this.comment=0,this.dtd=0,this.root="",this.pi=0,this.cdata=0,this.started_write=!1,this.writer,this.writer_encoding="UTF-8",typeof t=="function"?this.writer=t:this.writer=function(n,r){this.output+=n}}xa.prototype={toString:function(){return this.flush(),this.output},indenter:function(){if(this.indent){this.write(` +`);for(var e=1;e0;e--)this.endElement();this.tags=0},startDocument:function(e,t,n){return this.tags||this.attributes?this:(this.startPI("xml"),this.startAttribute("version"),this.text(typeof e=="string"?e:"1.0"),this.endAttribute(),typeof t=="string"&&(this.startAttribute("encoding"),this.text(t),this.endAttribute(),this.writer_encoding=t),n&&(this.startAttribute("standalone"),this.text("yes"),this.endAttribute()),this.endPI(),this.indent||this.write(` +`),this)},endDocument:function(){return this.attributes&&this.endAttributes(),this},writeElement:function(e,t){return this.startElement(e).text(t).endElement()},writeElementNS:function(e,t,n,r){return r||(r=n),this.startElementNS(e,t,n).text(r).endElement()},startElement:function(e){if(e=gn(e),!e.match(this.name_regex)||this.tags===0&&this.root&&this.root!==e)throw Error("Invalid Parameter");return this.attributes&&this.endAttributes(),++this.tags,this.texts=0,this.stack.length>0&&(this.stack[this.stack.length-1].containsTag=!0),this.stack.push({name:e,tags:this.tags}),this.started_write&&this.indenter(),this.write("<",e),this.startAttributes(),this.started_write=!0,this},startElementNS:function(e,t,n){if(e=gn(e),t=gn(t),!e.match(this.name_regex)||!t.match(this.name_regex))throw Error("Invalid Parameter");return this.attributes&&this.endAttributes(),++this.tags,this.texts=0,this.stack.length>0&&(this.stack[this.stack.length-1].containsTag=!0),this.stack.push({name:e+":"+t,tags:this.tags}),this.started_write&&this.indenter(),this.write("<",e+":"+t),this.startAttributes(),this.started_write=!0,this},endElement:function(){if(!this.tags)return this;var e=this.stack.pop();return this.attributes>0?(this.attribute&&(this.texts&&this.endAttribute(),this.endAttribute()),this.write("/"),this.endAttributes()):(e.containsTag&&this.indenter(),this.write("")),--this.tags,this.texts=0,this},writeAttribute:function(e,t){return typeof t=="function"&&(t=t()),zy(t)?this:this.startAttribute(e).text(t).endAttribute()},writeAttributeNS:function(e,t,n,r){return r||(r=n),typeof r=="function"&&(r=r()),zy(r)?this:this.startAttributeNS(e,t,n).text(r).endAttribute()},startAttributes:function(){return this.attributes=1,this},endAttributes:function(){return this.attributes?(this.attribute&&this.endAttribute(),this.attributes=0,this.attribute=0,this.texts=0,this.write(">"),this):this},startAttribute:function(e){if(e=gn(e),!e.match(this.name_regex))throw Error("Invalid Parameter");return!this.attributes&&!this.pi?this:this.attribute?this:(this.attribute=1,this.write(" ",e,'="'),this)},startAttributeNS:function(e,t,n){if(e=gn(e),t=gn(t),!e.match(this.name_regex)||!t.match(this.name_regex))throw Error("Invalid Parameter");return!this.attributes&&!this.pi?this:this.attribute?this:(this.attribute=1,this.write(" ",e+":"+t,'="'),this)},endAttribute:function(){return this.attribute?(this.attribute=0,this.texts=0,this.write('"'),this):this},text:function(e){return e=gn(e),!this.tags&&!this.comment&&!this.pi&&!this.cdata?this:this.attributes&&this.attribute?(++this.texts,this.write(e.replace(/&/g,"&").replace(//g,">")),++this.texts,this.started_write=!0,this)},writeComment:function(e){return this.startComment().text(e).endComment()},startComment:function(){return this.comment?this:(this.attributes&&this.endAttributes(),this.indenter(),this.write(""),this.comment=0,this):this},writeDocType:function(e,t,n,r){return this.startDocType(e,t,n,r).endDocType()},startDocType:function(e,t,n,r){if(this.dtd||this.tags)return this;if(e=gn(e),t=t&&gn(t),n=n&&gn(n),r=r&&gn(r),!e.match(this.name_regex)||t&&!t.match(/^[\w\-][\w\s\-\/\+\:\.]*/)||n&&!n.match(/^[\w\.][\w\-\/\\\:\.]*/)||r&&!r.match(/[\w\s\<\>\+\.\!\#\-\?\*\,\(\)\|]*/))throw Error("Invalid Parameter");return t=t?' PUBLIC "'+t+'"':n?" SYSTEM":"",n=n?' "'+n+'"':"",r=r?" ["+r+"]":"",this.started_write&&this.indenter(),this.write(""),this):this},writePI:function(e,t){return this.startPI(e).text(t).endPI()},startPI:function(e){if(e=gn(e),!e.match(this.name_regex))throw Error("Invalid Parameter");return this.pi?this:(this.attributes&&this.endAttributes(),this.started_write&&this.indenter(),this.write(""),this.pi=0,this):this},writeCData:function(e){return this.startCData().text(e).endCData()},startCData:function(){return this.cdata?this:(this.attributes&&this.endAttributes(),this.indenter(),this.write(""),this.cdata=0,this):this},writeRaw:function(e){return e=gn(e),!this.tags&&!this.comment&&!this.pi&&!this.cdata?this:this.attributes&&this.attribute?(++this.texts,this.write(e.replace("&","&").replace('"',""")),this):(this.attributes&&!this.attribute&&this.endAttributes(),++this.texts,this.write(e),this.started_write=!0,this)}};var eI=xa,tI=eI,nI=jn,rI=J3,iI=tI,oI=Ia.sanitizeTagName,sI=new Set(["color","size","x","y","z","shape","thickness"]),aI=/^\s*rgba?\s*\(/i,uI=/^\s*rgba?\s*\(\s*([0-9]*)\s*,\s*([0-9]*)\s*,\s*([0-9]*)\s*(?:,\s*([.0-9]*))?\)\s*$/;function lI(e){if(!e||typeof e!="string")return{};if(e[0]==="#")return e=e.slice(1),e.length===3?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16)}:{r:parseInt(e[0]+e[1],16),g:parseInt(e[2]+e[3],16),b:parseInt(e[4]+e[5],16)};if(aI.test(e)){var t={};return e=e.match(uI),t.r=+e[1],t.g=+e[2],t.b=+e[3],e[4]&&(t.a=+e[4]),t}return{}}function yE(e,t,n){var r={},i;for(i in n)i==="label"?r.label=n.label:e==="edge"&&i==="weight"?r.weight=n.weight:e==="edge"&&i==="kind"?r.kind=n.kind:sI.has(i)?(r.viz=r.viz||{},r.viz[i]=n[i]):(r.attributes=r.attributes||{},r.attributes[i]=n[i]);return r}var fI=yE.bind(null,"node"),cI=yE.bind(null,"edge");function hI(e){return e<=2147483647&&e>=-2147483647}function wE(e){return typeof e>"u"||e===null||e===""||e!==e}var zl={liststring:0,listdouble:1,listlong:2,listinteger:3,listboolean:4,string:5,double:6,long:7,integer:8,boolean:9,empty:10};function EE(e){return wE(e)?"empty":typeof e=="boolean"?"boolean":typeof e=="object"?"string":typeof e=="number"?e===(e|0)?hI(e)?"integer":"long":"double":"string"}function dI(e){for(var t="empty",n=zl[t],r,i,s,u=0,l=e.length;up&&(p=c);h=(Math.min(n,r)-2*t.margin)/(2*Math.sqrt(p));for(v in l)g=l[v],g.x=n/2+(g.x-i)*h,g.y=r/2+(g.y-s)*h,g.size*=h;return l}var TI=/["'<>&]/g,kI={'"':""","'":"'","<":"<",">":">","&":"&"};function bI(e){return kI[e]}function RI(e){return e.replace(TI,bI)}sf.reduceNodes=AI;sf.escape=RI;var LI=function(t,n){return''},DI=function(t,n,r,i){return''},By=sf.escape,PI=function(t,n){return''+By(n.label)+""},II=jn,FI=sf,NI=Fa,sh={nodes:{circle:LI},edges:{line:DI},nodeLabels:{default:PI}};function OI(e,t){if(!II(e))throw new Error("graphology-svg/renderer: expecting a valid graphology instance.");var n=FI.reduceNodes(e,t),r=[];e.forEachEdge(function(l,c,h,g){typeof t.edges.reducer=="function"&&(c=t.edges.reducer(t,l,c)),c=NI.DEFAULT_EDGE_REDUCER(t,l,c),r.push(sh.edges[c.type](t,c,n[h],n[g]))});var i=[],s=[],u;for(u in n)i.push(sh.nodes[n[u].type](t,n[u])),s.push(sh.nodeLabels[n[u].labelType](t,n[u]));return''+r.join("")+""+i.join("")+""+s.join("")+""}var zI=OI;const GI=Oi(zI);function ah(e){return!isNaN(parseFloat(""+e))&&isFinite(+e)}function UI(e){let t=[],n=1/0;for(;n>1;)t=[2*Math.random()-1,2*Math.random()-1],n=t[0]*t[0]+t[1]*t[1];const r=5*Math.sqrt(e.order);return t.map(function(i){return i*r})}function $I(e){let t=0;e.forEachNode(n=>{const{x:r,y:i,size:s,color:u}=e.getNodeAttributes(n);if(!ah(r)||!ah(i)){const l=UI(e);e.mergeNodeAttributes(n,{x:l[0],y:l[1]}),t++}ah(s)||e.setNodeAttribute(n,"size",1),u===void 0&&e.setNodeAttribute(n,"color","#665")}),t>0&&alert("Note: "+t+" nodes had coordinate issues. We carelessly fixed them.")}function MI(e,t){let n=0,r=0,i=0,s;e.forEachNode(c=>{const h=e.getNodeAttributes(c),{x:g}=h;let{size:p,y:v}=h;e.setNodeAttribute(c,"y",v=-v),p||e.setNodeAttribute(c,"size",p=1),n+=p*g,r+=p*v,i+=p}),n/=i,r/=i;let u=0;e.forEachNode(c=>{const{x:h,y:g}=e.getNodeAttributes(c),p=Math.sqrt(Math.pow(h-n,2)+Math.pow(g-n,2));u=Math.max(u,p)}),s=(Math.min(t.width,t.height)-2*t.offset)/(2*u);const l=()=>e.forEachNode(c=>{const{x:h,y:g,size:p}=e.getNodeAttributes(c);e.mergeNodeAttributes(c,{x:t.width/2+(h-n)*s,y:t.height/2+(g-r)*s,size:p*s})});if(l(),t.zoomEnabled){const c=t.zoomPoint;n=c.x*t.width,r=c.y*t.height,s=1/t.zoomWindowSize,l()}}function BI(e,t){const n=e.copy();n.forEachNode(p=>{n.setNodeAttribute(p,"heatmapScore",1)});const r=document.createElement("canvas");r.width=t.width,r.height=t.height;const i=r.getContext("2d");$I(n),MI(n,t);const s=new Float32Array(t.width*t.height);for(const p in s)s[p]=0;n.forEachNode(p=>{const v=n.getNodeAttributes(p);for(let _=Math.max(0,Math.floor(v.x-t.spreading/2));_<=Math.min(t.width,Math.floor(v.x+t.spreading/2));_++)for(let T=Math.max(0,Math.floor(v.y-t.spreading/2));T<=Math.min(t.height,Math.floor(v.y+t.spreading/2));T++){const b=Math.sqrt(Math.pow(v.x-_,2)+Math.pow(v.y-T,2));if(b({...r,y:-r.y})}})}function WI(e,t){const n=SI(e);fp.saveAs(new Blob([n]),t)}function HI(e,t){const n=_E(e);fp.saveAs(new Blob([n]),t)}function jI(e,t){const n=e.emptyCopy(),r=BI(n,{width:yi.width,height:yi.height,offset:yi.margin,quantize:!0,quantizationColors:9,min255Color:255,max255Color:170,spreading:(yi.width+yi.height)/2/20});let i=_E(n);i=i.replace('xmlns="http://www.w3.org/2000/svg">',`xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink"> + + + `),fp.saveAs(new Blob([i]),t)}const uh=200;class VI extends en.Component{constructor(){super(...arguments);ks(this,"domRoot",en.createRef());ks(this,"sigma");ks(this,"fa2");ks(this,"state",{isFA2Running:!1})}componentDidMount(){this.initSigma()}componentWillUnmount(){this.killSigma()}componentDidUpdate(n){n.graph!==this.props.graph&&(this.props.graph?this.initSigma():this.killSigma())}killSigma(){this.sigma&&(this.sigma.kill(),this.sigma=void 0)}initSigma(){this.domRoot.current&&(this.state.isFA2Running&&this.stopFA2(),this.sigma&&this.killSigma(),this.sigma=new j3(this.props.graph,this.domRoot.current,{labelFont:"Nunito, sans-serif"}),this.initFA2())}initFA2(){this.fa2&&this.fa2.kill(),this.fa2=new CP(this.props.graph,{settings:Ys.inferSettings(this.props.graph)})}stopFA2(){this.fa2&&(this.setState({...this.state,isFA2Running:!1}),this.fa2.stop())}startFA2(){this.fa2&&(this.setState({...this.state,isFA2Running:!0}),this.fa2.start())}toggleFA2(){this.state.isFA2Running?this.stopFA2():this.startFA2()}zoom(n){this.sigma&&(n?n>0?this.sigma.getCamera().animatedZoom({duration:uh}):n<0&&this.sigma.getCamera().animatedUnzoom({duration:uh}):this.sigma.getCamera().animatedReset({duration:uh}))}render(){return K.jsxs("section",{className:"Viz",children:[K.jsxs("div",{className:"features",children:[K.jsxs("button",{className:"btn",onClick:()=>WI(this.props.graph,"graph-export.gexf"),children:[K.jsx(Vc,{})," Download ",K.jsx("strong",{children:".GEXF"})," file"]}),K.jsxs("button",{className:"btn",onClick:()=>HI(this.props.graph,"graph-export.svg"),children:[K.jsx(Vc,{})," Download ",K.jsx("strong",{children:".SVG"})," file"]}),K.jsxs("button",{className:"btn",onClick:()=>jI(this.props.graph,"graph-heatmap-export.svg"),children:[K.jsx(Vc,{})," Download ",K.jsx("strong",{children:"Heatmap"})," image"]}),K.jsxs("button",{className:"btn right",onClick:this.props.onGoBack,children:[K.jsx(Q1,{})," Go back to ",K.jsx("strong",{children:"filters"})," view"]})]}),K.jsxs("div",{className:"sigma-wrapper",children:[K.jsx("div",{className:"sigma-container",ref:this.domRoot}),K.jsxs("div",{className:"controls",children:[K.jsx("span",{className:"btn-wrapper",children:K.jsx("button",{className:"btn",onClick:()=>this.toggleFA2(),title:this.state.isFA2Running?"Stop the layout animation":"Start the layout animation",children:this.state.isFA2Running?K.jsx(i1,{className:"spin"}):K.jsx(OR,{})})}),K.jsx("span",{className:"btn-wrapper",children:K.jsx("button",{className:"btn",onClick:()=>this.zoom(1),title:"Zoomer",children:K.jsx(gP,{})})}),K.jsx("span",{className:"btn-wrapper",children:K.jsx("button",{className:"btn",onClick:()=>this.zoom(-1),title:"Unzoom",children:K.jsx(pP,{})})}),K.jsx("span",{className:"btn-wrapper",children:K.jsx("button",{className:"btn",onClick:()=>this.zoom(),title:"Zoom",children:K.jsx(dP,{})})})]})]}),K.jsx("div",{className:"caption",children:yn.map(n=>{const{color:r,label:i}=Ra[n];return K.jsxs("span",{children:[K.jsx("span",{className:"color-disc",style:{background:r}})," ",i]},n)})})]})}}const KI=()=>{const[e,t]=en.useState(null),[n,r]=en.useState(null),[i,s]=en.useState(!1),[u,l]=en.useState(null),c=en.useCallback(async p=>{s(!0);const v=await MR(p),_=pD(v);s(!1),t({works:p,indices:v,aggregations:_,filters:fD(_)})},[s,t]),h=en.useCallback(async()=>{if(!e)return;s(!0);let p=await hD(e.works,e.indices,e.filters);p=await hP(p),s(!1),r(p)},[e,s,r]);let g=K.jsx("div",{children:"Woops, something went wrong..."});return e||(g=K.jsx(mP,{onSubmit:c})),e&&!n&&(g=K.jsx(vP,{works:e.works,aggregations:e.aggregations,filters:e.filters,setFilters:p=>t({...e,filters:p}),onSubmit:h,onGoBack:()=>{t(null)}})),e&&n&&(g=K.jsx(VI,{graph:n,indices:e.indices,filters:e.filters,onGoBack:()=>{r(null)}})),i&&(g=K.jsxs("div",{className:"loading",children:[K.jsx("div",{children:K.jsx(i1,{className:"spin x5"})}),K.jsx("div",{children:u})]})),K.jsx("div",{className:"App",children:g})};t1(document.getElementById("root")).render(K.jsx(Ai.StrictMode,{children:K.jsx(KI,{})})); diff --git a/assets/index-CugXjZHx.css b/assets/index-CugXjZHx.css new file mode 100644 index 0000000..da033fb --- /dev/null +++ b/assets/index-CugXjZHx.css @@ -0,0 +1 @@ +@import"https://fonts.googleapis.com/css2?family=Nunito:wght@300&display=swap";:root{--font: nunito;--primary-color: #fa0;--light: #eee}*+*{box-sizing:border-box;margin:.5em 0}@media (min-width:35em){.col{display:table-cell}.\31 {width:5%}.\33 {width:22%}.\34 {width:30%}.\35 {width:40%}.\32 {width:15%}.row{display:table;border-spacing:1em 0}}.w-100,.row{width:100%}.card:focus,hr{outline:0;border:solid var(--primary-color)}.card,pre{padding:1em;border:solid var(--light)}a:hover,.btn:hover{opacity:.6}.c{max-width:60em;padding:1em;margin:auto;font:1em/1.6 var(--font)}h6{font:300 1em var(--font)}h5{font:300 1.2em var(--font)}h3{font:300 2em var(--font)}h4{font:300 1.5em var(--font)}h2{font:300 2.2em var(--font)}h1{font:300 2.5em var(--font)}a{color:var(--primary-color);text-decoration:none}.btn.primary{color:#fff;background:var(--primary-color);border:solid var(--primary-color)}pre{overflow:auto}td,th{padding:1em;text-align:left;border-bottom:solid var(--light)}.btn{padding:1em;letter-spacing:.1em;text-transform:uppercase;background:#fff;border:solid;font:.7em var(--font)}.loading{height:100vh;display:flex;align-items:center;justify-content:center;flex-direction:column}.Filters .fields{display:flex;flex-direction:row;flex-wrap:wrap}.Filters .fields>div{width:calc(50% - 1em)}.Filters .fields>div:nth-child(odd){margin-right:2em}.Filters .fields input[type=range]{width:100%}.Filters .actions{width:100%;text-align:right}.Home .dropzone{height:300px;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:20px;border-width:2px;border-radius:2px;border-color:gray;border-style:dashed;background-color:#fafafa;outline:none;transition:border .24s ease-in-out}.Home .flex-row{display:flex;align-items:baseline;margin:.5em 0}.Home .flex-row.center{justify-content:center}.Home .flex-row>*{margin:0 .4em}iframe{outline:none;border:1px solid #bdbdbd}.files-list{display:flex;flex-wrap:wrap;width:80%;justify-content:center}.files-list span{margin:0 5px}.logo{height:80px;max-width:250px;margin:0 10px}.Home .flex-row .logos{margin-top:10px}.Home hr{margin-top:40px}.Viz{width:100vw;min-height:100vh;display:flex;flex-direction:column;align-items:stretch;justify-content:stretch}.Viz .features{margin:30px 30px 0;display:flex}.Viz .features>*:not(:last-child){margin-right:.5em}.Viz .features .right{margin-left:auto}.Viz .sigma-wrapper{position:relative;flex-grow:1;margin:15px 30px;border:1px solid #bdbdbd;box-sizing:border-box}.Viz .sigma-container{width:100%;height:100%;position:absolute}.Viz .sigma-container canvas{margin:0}.Viz .controls{position:absolute;top:10px;right:10px;display:flex;flex-direction:column;margin:0}.Viz .controls>*{margin:0 0 10px;z-index:1}.Viz .controls .btn-wrapper{background:#fff;font-size:1.6em}.Viz .controls .btn{padding:.8em;width:3em;height:3em;text-align:center}.Viz .caption{text-align:right;margin:0 30px 30px}.Viz .caption>span{margin-left:1em}.Viz .caption .color-disc{display:inline-block;height:1em;width:1em;border-radius:1em;vertical-align:sub}body{margin:0;font-family:Nunito,sans-serif}*+*{box-sizing:unset;margin:unset}#root{margin:0}input,select{font-family:Nunito,sans-serif}.center{text-align:center}.btn:not([disabled]){cursor:pointer}.btn[disabled]{background:gray;border-color:gray;opacity:1!important}.hg{box-shadow:inset 0 -.4em #fa0}.spin{animation:spin 2s infinite linear}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(359deg)}}.x5{font-size:5em} diff --git a/img/logo_CNRS_CIS.jpg b/img/logo_CNRS_CIS.jpg new file mode 100644 index 0000000..d756efa Binary files /dev/null and b/img/logo_CNRS_CIS.jpg differ diff --git a/img/logo_ouestware_text.svg b/img/logo_ouestware_text.svg new file mode 100644 index 0000000..6347a61 --- /dev/null +++ b/img/logo_ouestware_text.svg @@ -0,0 +1,120 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/index.html b/index.html new file mode 100644 index 0000000..514ff4f --- /dev/null +++ b/index.html @@ -0,0 +1,16 @@ + + + + + + + + Bibliograph + + + + + +
+ + diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..86bba84 --- /dev/null +++ b/manifest.json @@ -0,0 +1,9 @@ +{ + "short_name": "Bibliograph", + "name": "Bibliograph", + "icons": [], + "start_url": ".", + "display": "standalone", + "theme_color": "#000000", + "background_color": "#ffffff" +} diff --git a/robots.txt b/robots.txt new file mode 100644 index 0000000..e9e57dc --- /dev/null +++ b/robots.txt @@ -0,0 +1,3 @@ +# https://www.robotstxt.org/robotstxt.html +User-agent: * +Disallow: