@reltio/remotes 1.4.1680 → 1.4.1682
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/1039.js +1 -1
- package/1088.js +1 -1
- package/1148.js +1 -1
- package/1215.js +1 -1
- package/1334.js +1 -1
- package/1425.js +1 -1
- package/1550.js +1 -1
- package/1664.js +1 -1
- package/1707.js +1 -1
- package/1840.js +1 -1
- package/2066.js +1 -1
- package/2400.js +1 -1
- package/2596.js +1 -1
- package/2617.js +1 -1
- package/2966.js +1 -1
- package/3096.js +1 -1
- package/3144.js +1 -1
- package/3209.js +1 -1
- package/3348.js +1 -1
- package/3373.js +1 -1
- package/3381.js +1 -1
- package/3383.js +1 -1
- package/3463.js +1 -1
- package/3469.js +1 -1
- package/3538.js +1 -1
- package/3639.js +1 -1
- package/3785.js +1 -1
- package/4038.js +1 -1
- package/4143.js +1 -1
- package/415.js +1 -1
- package/4197.js +1 -1
- package/4197.js.map +1 -1
- package/4212.js +1 -1
- package/4481.js +1 -1
- package/4610.js +1 -1
- package/4787.js +1 -1
- package/4806.js +1 -1
- package/4838.js +1 -1
- package/50.js +1 -1
- package/5039.js +1 -1
- package/5177.js +1 -1
- package/5201.js +1 -1
- package/5258.js +1 -1
- package/5292.js +1 -1
- package/5383.js +1 -1
- package/5738.js +1 -1
- package/5738.js.map +1 -1
- package/5769.js +1 -1
- package/6287.js +1 -1
- package/636.js +1 -1
- package/6422.js +1 -1
- package/658.js +1 -1
- package/6799.js +1 -1
- package/6844.js +1 -1
- package/6903.js +1 -1
- package/7074.js +1 -1
- package/7119.js +1 -1
- package/7237.js +1 -1
- package/7340.js +1 -1
- package/735.js +1 -1
- package/7407.js +1 -1
- package/7422.js +1 -1
- package/7468.js +1 -1
- package/7605.js +1 -1
- package/7626.js +1 -1
- package/7744.js +1 -1
- package/7802.js +1 -1
- package/7896.js +1 -1
- package/820.js +1 -1
- package/8207.js +1 -1
- package/8216.js +1 -1
- package/8216.js.map +1 -1
- package/829.js +1 -1
- package/8741.js +1 -1
- package/8786.js +1 -1
- package/9016.js +1 -1
- package/9032.js +1 -1
- package/9050.js +1 -1
- package/9109.js +1 -1
- package/9283.js +1 -1
- package/9328.js +1 -1
- package/9387.js +1 -1
- package/9719.js +1 -1
- package/9861.js +1 -1
- package/main.js +1 -1
- package/package.json +1 -1
- package/remoteEntry.js +1 -1
package/3144.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! For license information please see 3144.js.LICENSE.txt */
|
|
2
|
-
!function(){try{var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e=(new Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="f8678f65-a104-41e1-9d35-e27ace6e573b",t._sentryDebugIdIdentifier="sentry-dbid-f8678f65-a104-41e1-9d35-e27ace6e573b")}catch(t){}}();var _global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};_global.SENTRY_RELEASE={id:"1.4.1681"},(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[3144],{812:(t,e,r)=>{"use strict";var n=r(71600);e.Z=void 0;var i=n(r(68671)),o=r(52322),a=(0,i.default)((0,o.jsx)("path",{d:"m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward");e.Z=a},16e3:(t,e,r)=>{"use strict";var n=r(71600);e.Z=void 0;var i=n(r(68671)),o=r(52322),a=(0,i.default)((0,o.jsx)("path",{d:"M7.38 21.01c.49.49 1.28.49 1.77 0l8.31-8.31c.39-.39.39-1.02 0-1.41L9.15 2.98c-.49-.49-1.28-.49-1.77 0s-.49 1.28 0 1.77L14.62 12l-7.25 7.25c-.48.48-.48 1.28.01 1.76z"}),"ArrowForwardIosRounded");e.Z=a},74654:(t,e,r)=>{"use strict";var n=r(71600);e.Z=void 0;var i=n(r(68671)),o=r(52322),a=(0,i.default)((0,o.jsx)("path",{d:"m4 12 1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"}),"ArrowUpward");e.Z=a},70369:(t,e,r)=>{"use strict";var n=r(71600);e.Z=void 0;var i=n(r(68671)),o=r(52322),a=(0,i.default)((0,o.jsx)("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"}),"Create");e.Z=a},13510:(t,e,r)=>{"use strict";var n=r(71600);e.Z=void 0;var i=n(r(68671)),o=r(52322),a=(0,i.default)((0,o.jsx)("path",{d:"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"}),"History");e.Z=a},36592:(t,e,r)=>{"use strict";var n=r(71600);e.Z=void 0;var i=n(r(68671)),o=r(52322),a=(0,i.default)((0,o.jsx)("path",{d:"M19 3H4.99c-1.11 0-1.98.89-1.98 2L3 19c0 1.1.88 2 1.99 2H19c1.1 0 2-.9 2-2V5c0-1.11-.9-2-2-2zm0 12h-4c0 1.66-1.35 3-3 3s-3-1.34-3-3H4.99V5H19v10z"}),"Inbox");e.Z=a},89025:(t,e,r)=>{"use strict";var n=r(71600);e.Z=void 0;var i=n(r(68671)),o=r(52322),a=(0,i.default)((0,o.jsx)("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"}),"InfoOutlined");e.Z=a},93400:(t,e,r)=>{"use strict";var n=r(71600);e.Z=void 0;var i=n(r(68671)),o=r(52322),a=(0,i.default)((0,o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 15c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1s1 .45 1 1v4c0 .55-.45 1-1 1zm1-8h-2V7h2v2z"}),"InfoRounded");e.Z=a},35299:(t,e,r)=>{"use strict";var n=r(71600);e.Z=void 0;var i=n(r(68671)),o=r(52322),a=(0,i.default)((0,o.jsx)("path",{d:"M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm8.94 3c-.46-4.17-3.77-7.48-7.94-7.94V1h-2v2.06C6.83 3.52 3.52 6.83 3.06 11H1v2h2.06c.46 4.17 3.77 7.48 7.94 7.94V23h2v-2.06c4.17-.46 7.48-3.77 7.94-7.94H23v-2h-2.06zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"}),"MyLocation");e.Z=a},81087:(t,e,r)=>{"use strict";var n=r(71600);e.Z=void 0;var i=n(r(68671)),o=r(52322),a=(0,i.default)((0,o.jsx)("path",{d:"M19 13H5v-2h14v2z"}),"Remove");e.Z=a},944:(t,e,r)=>{"use strict";var n=r(71600);e.Z=void 0;var i=n(r(68671)),o=r(52322),a=(0,i.default)((0,o.jsx)("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}),"ReportProblem");e.Z=a},71976:(t,e,r)=>{"use strict";var n=r(71600);e.Z=void 0;var i=n(r(68671)),o=r(52322),a=(0,i.default)((0,o.jsx)("path",{d:"M15 3H6c-.83 0-1.54.5-1.84 1.22l-3.02 7.05c-.09.23-.14.47-.14.73v2c0 1.1.9 2 2 2h6.31l-.95 4.57-.03.32c0 .41.17.79.44 1.06L9.83 23l6.59-6.59c.36-.36.58-.86.58-1.41V5c0-1.1-.9-2-2-2zm4 0v12h4V3h-4z"}),"ThumbDown");e.Z=a},18876:(t,e,r)=>{"use strict";var n=r(71600);e.Z=void 0;var i=n(r(68671)),o=r(52322),a=(0,i.default)((0,o.jsx)("path",{d:"M1 21h4V9H1v12zm22-11c0-1.1-.9-2-2-2h-6.31l.95-4.57.03-.32c0-.41-.17-.79-.44-1.06L14.17 1 7.59 7.59C7.22 7.95 7 8.45 7 9v10c0 1.1.9 2 2 2h9c.83 0 1.54-.5 1.84-1.22l3.02-7.05c.09-.23.14-.47.14-.73v-2z"}),"ThumbUp");e.Z=a},46339:(t,e,r)=>{"use strict";r.d(e,{C6:()=>_,AH:()=>w,sG:()=>b,$j:()=>m,eP:()=>f,Ys:()=>d,Vr:()=>l});var n=r(24328),i=r.n(n),o=r(76635),a=r(98996),u=r.n(a),s=r(49358);const c=(0,n.createContext)(null),h=c.Provider;function l(){const t=(0,n.useContext)(c);if(null==t)throw new Error("No context provided: useSigmaContext() can only be used in a descendant of <SigmaContainer>");return t}function d(){return l().sigma}function f(){const{sigma:t,container:e}=l(),[r,i]=(0,n.useState)({});return(0,n.useEffect)((()=>{if(!t||!r)return;const n={};return Object.keys(r).forEach((e=>{n[e]=r[e],t.setSetting(e,r[e])})),()=>{t&&e&&e.offsetWidth>0&&e.offsetHeight>0&&Object.keys(n).forEach((e=>{t.setSetting(e,n[e])}))}}),[t,r,e]),i}const p=["clickNode","rightClickNode","downNode","enterNode","leaveNode","doubleClickNode","wheelNode","clickEdge","rightClickEdge","downEdge","enterEdge","leaveEdge","doubleClickEdge","wheelEdge","clickStage","rightClickStage","downStage","doubleClickStage","wheelStage","beforeRender","afterRender","kill"],g=["click","rightClick","mouseup","mousedown","mousemove","mousemovebody","doubleClick","wheel"],v=["touchup","touchdown","touchmove"],y=["updated"];function m(){const t=d(),e=f(),[r,i]=(0,n.useState)({});return(0,n.useEffect)((()=>{if(!t||!r)return;const n=r,i=Object.keys(n),o={},a={},u=t.getSettings();return i.some((t=>["clickEdge","rightClickEdge","doubleClickEdge","downEdge"].includes(t)))&&!1===u.enableEdgeClickEvents&&(o.enableEdgeClickEvents=!0,a.enableEdgeClickEvents=!1),i.some((t=>["enterEdge","leaveEdge"].includes(t)))&&!1===u.enableEdgeHoverEvents&&(o.enableEdgeHoverEvents=!0,a.enableEdgeHoverEvents=!1),i.some((t=>["wheelEdge"].includes(t)))&&!1===u.enableEdgeWheelEvents&&(o.enableEdgeWheelEvents=!0,a.enableEdgeWheelEvents=!1),Object.keys(o).length>0&&e(o),i.forEach((e=>{const r=n[e];p.find((t=>t===e))&&t.on(e,r),g.find((t=>t===e))&&t.getMouseCaptor().on(e,r),v.find((t=>t===e))&&t.getTouchCaptor().on(e,r),y.find((t=>t===e))&&t.getCamera().on(e,r)})),()=>{Object.keys(a).length>0&&e(a),t&&i.forEach((e=>{const r=n[e];p.find((t=>t===e))&&t.off(e,r),g.find((t=>t===e))&&t.getMouseCaptor().off(e,r),v.find((t=>t===e))&&t.getTouchCaptor().off(e,r),y.find((t=>t===e))&&t.getCamera().off(e,r)}))}}),[t,r,e]),i}function b(){const t=d();return(0,n.useCallback)(((e,r=!0)=>{t&&e&&(r&&t.getGraph().order>0&&t.getGraph().clear(),t.getGraph().import(e),t.refresh())}),[t])}function w(t){const e=d(),r=(0,n.useRef)();(0,o.isEqual)(r.current,t)||(r.current=t);const i=(0,n.useCallback)((t=>{e.getCamera().animatedZoom(Object.assign(Object.assign({},r.current),t))}),[e,r]),a=(0,n.useCallback)((t=>{e.getCamera().animatedUnzoom(Object.assign(Object.assign({},r.current),t))}),[e,r]),u=(0,n.useCallback)((t=>{e.getCamera().animatedReset(Object.assign(Object.assign({},r.current),t))}),[e,r]),s=(0,n.useCallback)(((t,n)=>{e.getCamera().animate(t,Object.assign(Object.assign({},r.current),n))}),[e,r]),c=(0,n.useCallback)(((t,n)=>{const i=e.getNodeDisplayData(t);i?e.getCamera().animate(i,Object.assign(Object.assign({},r.current),n)):console.log(`Node ${t} not found`)}),[e,r]);return{zoomIn:i,zoomOut:a,reset:u,goto:s,gotoNode:c}}const _=(0,n.forwardRef)((({graph:t,id:e,className:r,style:a,settings:c,children:l},d)=>{const f=(0,n.useRef)(null),p=(0,n.useRef)(null),g={className:`react-sigma ${r||""}`,id:e,style:a},[v,y]=(0,n.useState)(null),m=(0,n.useRef)({});(0,o.isEqual)(m.current,c)||(m.current=c||{}),(0,n.useEffect)((()=>{let e=null;if(null!==p.current){const r=t?"function"==typeof t?new t:t:new(u());e=new s.Sigma(r,p.current,Object.assign({allowInvalidContainer:!0},m.current)),v&&e.getCamera().setState(v.getCamera().getState())}return y(e),()=>{e&&e.kill(),y(null)}}),[p,t,m]),(0,n.useImperativeHandle)(d,(()=>v),[v]);const b=(0,n.useMemo)((()=>v&&f.current?{sigma:v,container:f.current}:null),[v,f.current]),w=null!==b?i().createElement(h,{value:b},l):null;return i().createElement("div",Object.assign({},g,{ref:f}),i().createElement("div",{className:"sigma-container",ref:p}),w)}))},8884:t=>{t.exports=function(t,e){var r=e.length;if(0!==r){var n=t.length;t.length+=r;for(var i=0;i<r;i++)t[n+i]=e[i]}}},19869:t=>{t.exports={linLogMode:!1,outboundAttractionDistribution:!1,adjustSizes:!1,edgeWeightInfluence:1,scalingRatio:1,strongGravityMode:!1,gravity:1,slowDown:1,barnesHutOptimize:!1,barnesHutTheta:.5}},36061:(t,e)=>{e.assign=function(t){t=t||{};var e,r,n,i=Array.prototype.slice.call(arguments).slice(1);for(e=0,n=i.length;e<n;e++)if(i[e])for(r in i[e])t[r]=i[e][r];return t},e.validateSettings=function(t){return"linLogMode"in t&&"boolean"!=typeof t.linLogMode?{message:"the `linLogMode` setting should be a boolean."}:"outboundAttractionDistribution"in t&&"boolean"!=typeof t.outboundAttractionDistribution?{message:"the `outboundAttractionDistribution` setting should be a boolean."}:"adjustSizes"in t&&"boolean"!=typeof t.adjustSizes?{message:"the `adjustSizes` setting should be a boolean."}:"edgeWeightInfluence"in t&&"number"!=typeof t.edgeWeightInfluence?{message:"the `edgeWeightInfluence` setting should be a number."}:!("scalingRatio"in t)||"number"==typeof t.scalingRatio&&t.scalingRatio>=0?"strongGravityMode"in t&&"boolean"!=typeof t.strongGravityMode?{message:"the `strongGravityMode` setting should be a boolean."}:!("gravity"in t)||"number"==typeof t.gravity&&t.gravity>=0?"slowDown"in t&&!("number"==typeof t.slowDown||t.slowDown>=0)?{message:"the `slowDown` setting should be a number >= 0."}:"barnesHutOptimize"in t&&"boolean"!=typeof t.barnesHutOptimize?{message:"the `barnesHutOptimize` setting should be a boolean."}:!("barnesHutTheta"in t)||"number"==typeof t.barnesHutTheta&&t.barnesHutTheta>=0?null:{message:"the `barnesHutTheta` setting should be a number >= 0."}:{message:"the `gravity` setting should be a number >= 0."}:{message:"the `scalingRatio` setting should be a number >= 0."}},e.graphToByteArrays=function(t,e){var r,n=t.order,i=t.size,o={},a=new Float32Array(10*n),u=new Float32Array(3*i);return r=0,t.forEachNode((function(t,e){o[t]=r,a[r]=e.x,a[r+1]=e.y,a[r+2]=0,a[r+3]=0,a[r+4]=0,a[r+5]=0,a[r+6]=1,a[r+7]=1,a[r+8]=e.size||1,a[r+9]=e.fixed?1:0,r+=10})),r=0,t.forEachEdge((function(t,n,i,s,c,h,l){var d=o[i],f=o[s],p=e(t,n,i,s,c,h,l);a[d+6]+=p,a[f+6]+=p,u[r]=d,u[r+1]=f,u[r+2]=p,r+=3})),{nodes:a,edges:u}},e.assignLayoutChanges=function(t,e,r){var n=0;t.updateEachNodeAttributes((function(t,i){return i.x=e[n],i.y=e[n+1],n+=10,r?r(t,i):i}))},e.readGraphPositions=function(t,e){var r=0;t.forEachNode((function(t,n){e[r]=n.x,e[r+1]=n.y,r+=10}))},e.collectLayoutChanges=function(t,e,r){for(var n=t.nodes(),i={},o=0,a=0,u=e.length;o<u;o+=10){if(r){var s=Object.assign({},t.getNodeAttributes(n[a]));s.x=e[o],s.y=e[o+1],s=r(n[a],s),i[n[a]]={x:s.x,y:s.y}}else i[n[a]]={x:e[o],y:e[o+1]};a++}return i},e.createWorker=function(t){var e=window.URL||window.webkitURL,r=t.toString(),n=e.createObjectURL(new Blob(["("+r+").call(this);"],{type:"text/javascript"})),i=new Worker(n);return e.revokeObjectURL(n),i}},3660:(t,e,r)=>{var n=r(31880),i=r(4363).Q6,o=r(8725),a=r(36061),u=r(19869);function s(t,e,r){if(!n(e))throw new Error("graphology-layout-forceatlas2: the given graph is not a valid graphology instance.");"number"==typeof r&&(r={iterations:r});var s=r.iterations;if("number"!=typeof s)throw new Error("graphology-layout-forceatlas2: invalid number of iterations.");if(s<=0)throw new Error("graphology-layout-forceatlas2: you should provide a positive number of iterations.");var c=i("getEdgeWeight"in r?r.getEdgeWeight:"weight").fromEntry,h="function"==typeof r.outputReducer?r.outputReducer:null,l=a.assign({},u,r.settings),d=a.validateSettings(l);if(d)throw new Error("graphology-layout-forceatlas2: "+d.message);var f,p=a.graphToByteArrays(e,c);for(f=0;f<s;f++)o(l,p.nodes,p.edges);if(!t)return a.collectLayoutChanges(e,p.nodes);a.assignLayoutChanges(e,p.nodes,h)}var c=s.bind(null,!1);c.assign=s.bind(null,!0),c.inferSettings=function(t){var e="number"==typeof t?t:t.order;return{barnesHutOptimize:e>2e3,strongGravityMode:!0,gravity:.05,scalingRatio:10,slowDown:1+Math.log(e)}},t.exports=c},8725:t=>{var e=10;t.exports=function(t,r,n){var i,o,a,u,s,c,h,l,d,f,p,g,v,y,m,b,w,_,x,E,A,L,k,C=r.length,S=n.length,M=t.adjustSizes,D=t.barnesHutTheta*t.barnesHutTheta,O=[];for(a=0;a<C;a+=e)r[a+4]=r[a+2],r[a+5]=r[a+3],r[a+2]=0,r[a+3]=0;if(t.outboundAttractionDistribution){for(p=0,a=0;a<C;a+=e)p+=r[a+6];p/=C/e}if(t.barnesHutOptimize){var G,F,R,T=1/0,P=-1/0,N=1/0,j=-1/0;for(a=0;a<C;a+=e)T=Math.min(T,r[a+0]),P=Math.max(P,r[a+0]),N=Math.min(N,r[a+1]),j=Math.max(j,r[a+1]);var z=P-T,U=j-N;for(z>U?j=(N-=(z-U)/2)+z:P=(T-=(U-z)/2)+U,O[0]=-1,O[1]=(T+P)/2,O[2]=(N+j)/2,O[3]=Math.max(P-T,j-N),O[4]=-1,O[5]=-1,O[6]=0,O[7]=0,O[8]=0,i=1,a=0;a<C;a+=e)for(o=0,R=3;;){if(!(O[o+5]>=0)){if(O[o+0]<0){O[o+0]=a;break}if(O[o+5]=9*i,l=O[o+3]/2,O[(d=O[o+5])+0]=-1,O[d+1]=O[o+1]-l,O[d+2]=O[o+2]-l,O[d+3]=l,O[d+4]=d+9,O[d+5]=-1,O[d+6]=0,O[d+7]=0,O[d+8]=0,O[(d+=9)+0]=-1,O[d+1]=O[o+1]-l,O[d+2]=O[o+2]+l,O[d+3]=l,O[d+4]=d+9,O[d+5]=-1,O[d+6]=0,O[d+7]=0,O[d+8]=0,O[(d+=9)+0]=-1,O[d+1]=O[o+1]+l,O[d+2]=O[o+2]-l,O[d+3]=l,O[d+4]=d+9,O[d+5]=-1,O[d+6]=0,O[d+7]=0,O[d+8]=0,O[(d+=9)+0]=-1,O[d+1]=O[o+1]+l,O[d+2]=O[o+2]+l,O[d+3]=l,O[d+4]=O[o+4],O[d+5]=-1,O[d+6]=0,O[d+7]=0,O[d+8]=0,i+=4,G=r[O[o+0]+0]<O[o+1]?r[O[o+0]+1]<O[o+2]?O[o+5]:O[o+5]+9:r[O[o+0]+1]<O[o+2]?O[o+5]+18:O[o+5]+27,O[o+6]=r[O[o+0]+6],O[o+7]=r[O[o+0]+0],O[o+8]=r[O[o+0]+1],O[G+0]=O[o+0],O[o+0]=-1,G===(F=r[a+0]<O[o+1]?r[a+1]<O[o+2]?O[o+5]:O[o+5]+9:r[a+1]<O[o+2]?O[o+5]+18:O[o+5]+27)){if(R--){o=G;continue}R=3;break}O[F+0]=a;break}G=r[a+0]<O[o+1]?r[a+1]<O[o+2]?O[o+5]:O[o+5]+9:r[a+1]<O[o+2]?O[o+5]+18:O[o+5]+27,O[o+7]=(O[o+7]*O[o+6]+r[a+0]*r[a+6])/(O[o+6]+r[a+6]),O[o+8]=(O[o+8]*O[o+6]+r[a+1]*r[a+6])/(O[o+6]+r[a+6]),O[o+6]+=r[a+6],o=G}}if(t.barnesHutOptimize){for(g=t.scalingRatio,a=0;a<C;a+=e)for(o=0;;)if(O[o+5]>=0){if(b=Math.pow(r[a+0]-O[o+7],2)+Math.pow(r[a+1]-O[o+8],2),4*(f=O[o+3])*f/b<D){if(v=r[a+0]-O[o+7],y=r[a+1]-O[o+8],!0===M?b>0?(w=g*r[a+6]*O[o+6]/b,r[a+2]+=v*w,r[a+3]+=y*w):b<0&&(w=-g*r[a+6]*O[o+6]/Math.sqrt(b),r[a+2]+=v*w,r[a+3]+=y*w):b>0&&(w=g*r[a+6]*O[o+6]/b,r[a+2]+=v*w,r[a+3]+=y*w),(o=O[o+4])<0)break;continue}o=O[o+5]}else if((c=O[o+0])>=0&&c!==a&&(b=(v=r[a+0]-r[c+0])*v+(y=r[a+1]-r[c+1])*y,!0===M?b>0?(w=g*r[a+6]*r[c+6]/b,r[a+2]+=v*w,r[a+3]+=y*w):b<0&&(w=-g*r[a+6]*r[c+6]/Math.sqrt(b),r[a+2]+=v*w,r[a+3]+=y*w):b>0&&(w=g*r[a+6]*r[c+6]/b,r[a+2]+=v*w,r[a+3]+=y*w)),(o=O[o+4])<0)break}else for(g=t.scalingRatio,u=0;u<C;u+=e)for(s=0;s<u;s+=e)v=r[u+0]-r[s+0],y=r[u+1]-r[s+1],!0===M?(b=Math.sqrt(v*v+y*y)-r[u+8]-r[s+8])>0?(w=g*r[u+6]*r[s+6]/b/b,r[u+2]+=v*w,r[u+3]+=y*w,r[s+2]-=v*w,r[s+3]-=y*w):b<0&&(w=100*g*r[u+6]*r[s+6],r[u+2]+=v*w,r[u+3]+=y*w,r[s+2]-=v*w,r[s+3]-=y*w):(b=Math.sqrt(v*v+y*y))>0&&(w=g*r[u+6]*r[s+6]/b/b,r[u+2]+=v*w,r[u+3]+=y*w,r[s+2]-=v*w,r[s+3]-=y*w);for(d=t.gravity/t.scalingRatio,g=t.scalingRatio,a=0;a<C;a+=e)w=0,v=r[a+0],y=r[a+1],b=Math.sqrt(Math.pow(v,2)+Math.pow(y,2)),t.strongGravityMode?b>0&&(w=g*r[a+6]*d):b>0&&(w=g*r[a+6]*d/b),r[a+2]-=v*w,r[a+3]-=y*w;for(g=1*(t.outboundAttractionDistribution?p:1),h=0;h<S;h+=3)u=n[h+0],s=n[h+1],l=n[h+2],m=Math.pow(l,t.edgeWeightInfluence),v=r[u+0]-r[s+0],y=r[u+1]-r[s+1],!0===M?(b=Math.sqrt(v*v+y*y)-r[u+8]-r[s+8],t.linLogMode?t.outboundAttractionDistribution?b>0&&(w=-g*m*Math.log(1+b)/b/r[u+6]):b>0&&(w=-g*m*Math.log(1+b)/b):t.outboundAttractionDistribution?b>0&&(w=-g*m/r[u+6]):b>0&&(w=-g*m)):(b=Math.sqrt(Math.pow(v,2)+Math.pow(y,2)),t.linLogMode?t.outboundAttractionDistribution?b>0&&(w=-g*m*Math.log(1+b)/b/r[u+6]):b>0&&(w=-g*m*Math.log(1+b)/b):t.outboundAttractionDistribution?(b=1,w=-g*m/r[u+6]):(b=1,w=-g*m)),b>0&&(r[u+2]+=v*w,r[u+3]+=y*w,r[s+2]-=v*w,r[s+3]-=y*w);if(!0===M)for(a=0;a<C;a+=e)1!==r[a+9]&&((_=Math.sqrt(Math.pow(r[a+2],2)+Math.pow(r[a+3],2)))>10&&(r[a+2]=10*r[a+2]/_,r[a+3]=10*r[a+3]/_),x=r[a+6]*Math.sqrt((r[a+4]-r[a+2])*(r[a+4]-r[a+2])+(r[a+5]-r[a+3])*(r[a+5]-r[a+3])),E=Math.sqrt((r[a+4]+r[a+2])*(r[a+4]+r[a+2])+(r[a+5]+r[a+3])*(r[a+5]+r[a+3]))/2,A=.1*Math.log(1+E)/(1+Math.sqrt(x)),L=r[a+0]+r[a+2]*(A/t.slowDown),r[a+0]=L,k=r[a+1]+r[a+3]*(A/t.slowDown),r[a+1]=k);else for(a=0;a<C;a+=e)1!==r[a+9]&&(x=r[a+6]*Math.sqrt((r[a+4]-r[a+2])*(r[a+4]-r[a+2])+(r[a+5]-r[a+3])*(r[a+5]-r[a+3])),E=Math.sqrt((r[a+4]+r[a+2])*(r[a+4]+r[a+2])+(r[a+5]+r[a+3])*(r[a+5]+r[a+3]))/2,A=r[a+7]*Math.log(1+E)/(1+Math.sqrt(x)),r[a+7]=Math.min(1,Math.sqrt(A*(Math.pow(r[a+2],2)+Math.pow(r[a+3],2))/(1+Math.sqrt(x)))),L=r[a+0]+r[a+2]*(A/t.slowDown),r[a+0]=L,k=r[a+1]+r[a+3]*(A/t.slowDown),r[a+1]=k);return{}}},61026:t=>{t.exports=function(){var t,e,r,n={};r=10,n.exports=function(t,e,n){var i,o,a,u,s,c,h,l,d,f,p,g,v,y,m,b,w,_,x,E,A,L,k,C=e.length,S=n.length,M=t.adjustSizes,D=t.barnesHutTheta*t.barnesHutTheta,O=[];for(a=0;a<C;a+=r)e[a+4]=e[a+2],e[a+5]=e[a+3],e[a+2]=0,e[a+3]=0;if(t.outboundAttractionDistribution){for(p=0,a=0;a<C;a+=r)p+=e[a+6];p/=C/r}if(t.barnesHutOptimize){var G,F,R,T=1/0,P=-1/0,N=1/0,j=-1/0;for(a=0;a<C;a+=r)T=Math.min(T,e[a+0]),P=Math.max(P,e[a+0]),N=Math.min(N,e[a+1]),j=Math.max(j,e[a+1]);var z=P-T,U=j-N;for(z>U?j=(N-=(z-U)/2)+z:P=(T-=(U-z)/2)+U,O[0]=-1,O[1]=(T+P)/2,O[2]=(N+j)/2,O[3]=Math.max(P-T,j-N),O[4]=-1,O[5]=-1,O[6]=0,O[7]=0,O[8]=0,i=1,a=0;a<C;a+=r)for(o=0,R=3;;){if(!(O[o+5]>=0)){if(O[o+0]<0){O[o+0]=a;break}if(O[o+5]=9*i,l=O[o+3]/2,O[(d=O[o+5])+0]=-1,O[d+1]=O[o+1]-l,O[d+2]=O[o+2]-l,O[d+3]=l,O[d+4]=d+9,O[d+5]=-1,O[d+6]=0,O[d+7]=0,O[d+8]=0,O[(d+=9)+0]=-1,O[d+1]=O[o+1]-l,O[d+2]=O[o+2]+l,O[d+3]=l,O[d+4]=d+9,O[d+5]=-1,O[d+6]=0,O[d+7]=0,O[d+8]=0,O[(d+=9)+0]=-1,O[d+1]=O[o+1]+l,O[d+2]=O[o+2]-l,O[d+3]=l,O[d+4]=d+9,O[d+5]=-1,O[d+6]=0,O[d+7]=0,O[d+8]=0,O[(d+=9)+0]=-1,O[d+1]=O[o+1]+l,O[d+2]=O[o+2]+l,O[d+3]=l,O[d+4]=O[o+4],O[d+5]=-1,O[d+6]=0,O[d+7]=0,O[d+8]=0,i+=4,G=e[O[o+0]+0]<O[o+1]?e[O[o+0]+1]<O[o+2]?O[o+5]:O[o+5]+9:e[O[o+0]+1]<O[o+2]?O[o+5]+18:O[o+5]+27,O[o+6]=e[O[o+0]+6],O[o+7]=e[O[o+0]+0],O[o+8]=e[O[o+0]+1],O[G+0]=O[o+0],O[o+0]=-1,G===(F=e[a+0]<O[o+1]?e[a+1]<O[o+2]?O[o+5]:O[o+5]+9:e[a+1]<O[o+2]?O[o+5]+18:O[o+5]+27)){if(R--){o=G;continue}R=3;break}O[F+0]=a;break}G=e[a+0]<O[o+1]?e[a+1]<O[o+2]?O[o+5]:O[o+5]+9:e[a+1]<O[o+2]?O[o+5]+18:O[o+5]+27,O[o+7]=(O[o+7]*O[o+6]+e[a+0]*e[a+6])/(O[o+6]+e[a+6]),O[o+8]=(O[o+8]*O[o+6]+e[a+1]*e[a+6])/(O[o+6]+e[a+6]),O[o+6]+=e[a+6],o=G}}if(t.barnesHutOptimize){for(g=t.scalingRatio,a=0;a<C;a+=r)for(o=0;;)if(O[o+5]>=0){if(b=Math.pow(e[a+0]-O[o+7],2)+Math.pow(e[a+1]-O[o+8],2),4*(f=O[o+3])*f/b<D){if(v=e[a+0]-O[o+7],y=e[a+1]-O[o+8],!0===M?b>0?(w=g*e[a+6]*O[o+6]/b,e[a+2]+=v*w,e[a+3]+=y*w):b<0&&(w=-g*e[a+6]*O[o+6]/Math.sqrt(b),e[a+2]+=v*w,e[a+3]+=y*w):b>0&&(w=g*e[a+6]*O[o+6]/b,e[a+2]+=v*w,e[a+3]+=y*w),(o=O[o+4])<0)break;continue}o=O[o+5]}else if((c=O[o+0])>=0&&c!==a&&(b=(v=e[a+0]-e[c+0])*v+(y=e[a+1]-e[c+1])*y,!0===M?b>0?(w=g*e[a+6]*e[c+6]/b,e[a+2]+=v*w,e[a+3]+=y*w):b<0&&(w=-g*e[a+6]*e[c+6]/Math.sqrt(b),e[a+2]+=v*w,e[a+3]+=y*w):b>0&&(w=g*e[a+6]*e[c+6]/b,e[a+2]+=v*w,e[a+3]+=y*w)),(o=O[o+4])<0)break}else for(g=t.scalingRatio,u=0;u<C;u+=r)for(s=0;s<u;s+=r)v=e[u+0]-e[s+0],y=e[u+1]-e[s+1],!0===M?(b=Math.sqrt(v*v+y*y)-e[u+8]-e[s+8])>0?(w=g*e[u+6]*e[s+6]/b/b,e[u+2]+=v*w,e[u+3]+=y*w,e[s+2]-=v*w,e[s+3]-=y*w):b<0&&(w=100*g*e[u+6]*e[s+6],e[u+2]+=v*w,e[u+3]+=y*w,e[s+2]-=v*w,e[s+3]-=y*w):(b=Math.sqrt(v*v+y*y))>0&&(w=g*e[u+6]*e[s+6]/b/b,e[u+2]+=v*w,e[u+3]+=y*w,e[s+2]-=v*w,e[s+3]-=y*w);for(d=t.gravity/t.scalingRatio,g=t.scalingRatio,a=0;a<C;a+=r)w=0,v=e[a+0],y=e[a+1],b=Math.sqrt(Math.pow(v,2)+Math.pow(y,2)),t.strongGravityMode?b>0&&(w=g*e[a+6]*d):b>0&&(w=g*e[a+6]*d/b),e[a+2]-=v*w,e[a+3]-=y*w;for(g=1*(t.outboundAttractionDistribution?p:1),h=0;h<S;h+=3)u=n[h+0],s=n[h+1],l=n[h+2],m=Math.pow(l,t.edgeWeightInfluence),v=e[u+0]-e[s+0],y=e[u+1]-e[s+1],!0===M?(b=Math.sqrt(v*v+y*y)-e[u+8]-e[s+8],t.linLogMode?t.outboundAttractionDistribution?b>0&&(w=-g*m*Math.log(1+b)/b/e[u+6]):b>0&&(w=-g*m*Math.log(1+b)/b):t.outboundAttractionDistribution?b>0&&(w=-g*m/e[u+6]):b>0&&(w=-g*m)):(b=Math.sqrt(Math.pow(v,2)+Math.pow(y,2)),t.linLogMode?t.outboundAttractionDistribution?b>0&&(w=-g*m*Math.log(1+b)/b/e[u+6]):b>0&&(w=-g*m*Math.log(1+b)/b):t.outboundAttractionDistribution?(b=1,w=-g*m/e[u+6]):(b=1,w=-g*m)),b>0&&(e[u+2]+=v*w,e[u+3]+=y*w,e[s+2]-=v*w,e[s+3]-=y*w);if(!0===M)for(a=0;a<C;a+=r)1!==e[a+9]&&((_=Math.sqrt(Math.pow(e[a+2],2)+Math.pow(e[a+3],2)))>10&&(e[a+2]=10*e[a+2]/_,e[a+3]=10*e[a+3]/_),x=e[a+6]*Math.sqrt((e[a+4]-e[a+2])*(e[a+4]-e[a+2])+(e[a+5]-e[a+3])*(e[a+5]-e[a+3])),E=Math.sqrt((e[a+4]+e[a+2])*(e[a+4]+e[a+2])+(e[a+5]+e[a+3])*(e[a+5]+e[a+3]))/2,A=.1*Math.log(1+E)/(1+Math.sqrt(x)),L=e[a+0]+e[a+2]*(A/t.slowDown),e[a+0]=L,k=e[a+1]+e[a+3]*(A/t.slowDown),e[a+1]=k);else for(a=0;a<C;a+=r)1!==e[a+9]&&(x=e[a+6]*Math.sqrt((e[a+4]-e[a+2])*(e[a+4]-e[a+2])+(e[a+5]-e[a+3])*(e[a+5]-e[a+3])),E=Math.sqrt((e[a+4]+e[a+2])*(e[a+4]+e[a+2])+(e[a+5]+e[a+3])*(e[a+5]+e[a+3]))/2,A=e[a+7]*Math.log(1+E)/(1+Math.sqrt(x)),e[a+7]=Math.min(1,Math.sqrt(A*(Math.pow(e[a+2],2)+Math.pow(e[a+3],2))/(1+Math.sqrt(x)))),L=e[a+0]+e[a+2]*(A/t.slowDown),e[a+0]=L,k=e[a+1]+e[a+3]*(A/t.slowDown),e[a+1]=k);return{}};var i=n.exports;self.addEventListener("message",(function(r){var n=r.data;t=new Float32Array(n.nodes),n.edges&&(e=new Float32Array(n.edges)),i(n.settings,t,e),self.postMessage({nodes:t.buffer},[t.buffer])}))}},28301:(t,e,r)=>{var n=r(61026),i=r(31880),o=r(4363).Q6,a=r(36061),u=r(19869);function s(t,e){if(e=e||{},!i(t))throw new Error("graphology-layout-forceatlas2/worker: the given graph is not a valid graphology instance.");var r=o("getEdgeWeight"in e?e.getEdgeWeight:"weight").fromEntry,n=a.assign({},u,e.settings),s=a.validateSettings(n);if(s)throw new Error("graphology-layout-forceatlas2/worker: "+s.message);this.worker=null,this.graph=t,this.settings=n,this.getEdgeWeight=r,this.matrices=null,this.running=!1,this.killed=!1,this.outputReducer="function"==typeof e.outputReducer?e.outputReducer:null,this.handleMessage=this.handleMessage.bind(this);var c=void 0,h=this;this.handleGraphUpdate=function(){h.worker&&h.worker.terminate(),c&&clearTimeout(c),c=setTimeout((function(){c=void 0,h.spawnWorker()}),0)},t.on("nodeAdded",this.handleGraphUpdate),t.on("edgeAdded",this.handleGraphUpdate),t.on("nodeDropped",this.handleGraphUpdate),t.on("edgeDropped",this.handleGraphUpdate),this.spawnWorker()}s.prototype.isRunning=function(){return this.running},s.prototype.spawnWorker=function(){this.worker&&this.worker.terminate(),this.worker=a.createWorker(n),this.worker.addEventListener("message",this.handleMessage),this.running&&(this.running=!1,this.start())},s.prototype.handleMessage=function(t){if(this.running){var e=new Float32Array(t.data.nodes);a.assignLayoutChanges(this.graph,e,this.outputReducer),this.outputReducer&&a.readGraphPositions(this.graph,e),this.matrices.nodes=e,this.askForIterations()}},s.prototype.askForIterations=function(t){var e=this.matrices,r={settings:this.settings,nodes:e.nodes.buffer},n=[e.nodes.buffer];return t&&(r.edges=e.edges.buffer,n.push(e.edges.buffer)),this.worker.postMessage(r,n),this},s.prototype.start=function(){if(this.killed)throw new Error("graphology-layout-forceatlas2/worker.start: layout was killed.");return this.running||(this.matrices=a.graphToByteArrays(this.graph,this.getEdgeWeight),this.running=!0,this.askForIterations(!0)),this},s.prototype.stop=function(){return this.running=!1,this},s.prototype.kill=function(){if(this.killed)return this;this.running=!1,this.killed=!0,this.matrices=null,this.worker.terminate(),this.graph.removeListener("nodeAdded",this.handleGraphUpdate),this.graph.removeListener("edgeAdded",this.handleGraphUpdate),this.graph.removeListener("nodeDropped",this.handleGraphUpdate),this.graph.removeListener("edgeDropped",this.handleGraphUpdate)},t.exports=s},11155:(t,e,r)=>{var n=r(46586),i=r(31880),o=r(64341),a={attributes:{x:"x",y:"y"},center:0,hierarchyAttributes:[],rng:Math.random,scale:1};function u(t,e,r,n,i){this.wrappedCircle=i||null,this.children={},this.countChildren=0,this.id=t||null,this.next=null,this.previous=null,this.x=e||null,this.y=r||null,this.r=i?1010101:n||999}function s(t,e,r){for(var n in e.children){var i=e.children[n];i.hasChildren()?s(t,i,r):r[i.id]={x:i.x,y:i.y}}}function c(t,e){var r=t.r-e.r,n=e.x-t.x,i=e.y-t.y;return r<0||r*r<n*n+i*i}function h(t,e){var r=t.r-e.r+1e-6,n=e.x-t.x,i=e.y-t.y;return r>0&&r*r>n*n+i*i}function l(t,e){for(var r=0;r<e.length;++r)if(!h(t,e[r]))return!1;return!0}function d(t,e){var r=t.x,n=t.y,i=t.r,o=e.x,a=e.y,s=e.r,c=o-r,h=a-n,l=s-i,d=Math.sqrt(c*c+h*h);return new u(null,(r+o+c/d*l)/2,(n+a+h/d*l)/2,(d+i+s)/2)}function f(t,e,r){var n=t.x,i=t.y,o=t.r,a=e.x,s=e.y,c=e.r,h=r.x,l=r.y,d=r.r,f=n-a,p=n-h,g=i-s,v=i-l,y=c-o,m=d-o,b=n*n+i*i-o*o,w=b-a*a-s*s+c*c,_=b-h*h-l*l+d*d,x=p*g-f*v,E=(g*_-v*w)/(2*x)-n,A=(v*y-g*m)/x,L=(p*w-f*_)/(2*x)-i,k=(f*m-p*y)/x,C=A*A+k*k-1,S=2*(o+E*A+L*k),M=E*E+L*L-o*o,D=-(C?(S+Math.sqrt(S*S-4*C*M))/(2*C):M/S);return new u(null,n+E+A*D,i+L+k*D,D)}function p(t){switch(t.length){case 1:return new u(null,(e=t[0]).x,e.y,e.r);case 2:return d(t[0],t[1]);case 3:return f(t[0],t[1],t[2]);default:throw new Error("graphology-layout/circlepack: Invalid basis length "+t.length)}var e}function g(t,e){var r,n;if(l(e,t))return[e];for(r=0;r<t.length;++r)if(c(e,t[r])&&l(d(t[r],e),t))return[t[r],e];for(r=0;r<t.length-1;++r)for(n=r+1;n<t.length;++n)if(c(d(t[r],t[n]),e)&&c(d(t[r],e),t[n])&&c(d(t[n],e),t[r])&&l(f(t[r],t[n],e),t))return[t[r],t[n],e];throw new Error("graphology-layout/circlepack: extendBasis failure !")}function v(t){var e=t.wrappedCircle,r=t.next.wrappedCircle,n=e.r+r.r,i=(e.x*r.r+r.x*e.r)/n,o=(e.y*r.r+r.y*e.r)/n;return i*i+o*o}function y(t,e,r){var n,i,o,a,u=t.x-e.x,s=t.y-e.y,c=u*u+s*s;c?(i=e.r+r.r,i*=i,a=t.r+r.r,i>(a*=a)?(n=(c+a-i)/(2*c),o=Math.sqrt(Math.max(0,a/c-n*n)),r.x=t.x-n*u-o*s,r.y=t.y-n*s+o*u):(n=(c+i-a)/(2*c),o=Math.sqrt(Math.max(0,i/c-n*n)),r.x=e.x+n*u-o*s,r.y=e.y+n*s+o*u)):(r.x=e.x+r.r,r.y=e.y)}function m(t,e){var r=t.r+e.r-1e-6,n=e.x-t.x,i=e.y-t.y;return r>0&&r*r>n*n+i*i}function b(t,e){var r=0;if(t.hasChildren()){for(var n in t.children){var i=t.children[n];i.hasChildren()&&(i.r=b(i,e))}r=function(t,e){var r,n,i,o,a,s,c,l,d,f,b=t.length;if(0===b)return 0;if((r=t[0]).x=0,r.y=0,b<=1)return r.r;if(n=t[1],r.x=-n.r,n.x=r.r,n.y=0,b<=2)return r.r+n.r;y(n,r,i=t[2]),r=new u(null,null,null,null,r),n=new u(null,null,null,null,n),i=new u(null,null,null,null,i),r.next=i.previous=n,n.next=r.previous=i,i.next=n.previous=r;t:for(s=3;s<b;++s){i=t[s],y(r.wrappedCircle,n.wrappedCircle,i),i=new u(null,null,null,null,i),c=n.next,l=r.previous,d=n.wrappedCircle.r,f=r.wrappedCircle.r;do{if(d<=f){if(m(c.wrappedCircle,i.wrappedCircle)){n=c,r.next=n,n.previous=r,--s;continue t}d+=c.wrappedCircle.r,c=c.next}else{if(m(l.wrappedCircle,i.wrappedCircle)){(r=l).next=n,n.previous=r,--s;continue t}f+=l.wrappedCircle.r,l=l.previous}}while(c!==l.next);for(i.previous=r,i.next=n,r.next=n.previous=n=i,o=v(r);(i=i.next)!==n;)(a=v(i))<o&&(r=i,o=a);n=r.next}r=[n.wrappedCircle],i=n;for(var w=1e4;(i=i.next)!==n&&0!=--w;)r.push(i.wrappedCircle);for(i=function(t,e){var r,n,i=0,o=t.slice(),a=t.length,u=[];for(e(o);i<a;)r=o[i],n&&h(n,r)?++i:(n=p(u=g(u,r)),i=0);return n}(r,e),s=0;s<b;++s)(r=t[s]).x-=i.x,r.y-=i.y;return i.r}(Object.values(t.children),e)}return r}function w(t,e,r){if(!i(e))throw new Error("graphology-layout/circlepack: the given graph is not a valid graphology instance.");r=n(r,a);var c={},h={},l=e.nodes(),d=r.center,f=r.hierarchyAttributes,p=o.createShuffleInPlace(r.rng),g=r.scale,v=new u;e.forEachNode((function(t,e){var r=new u(t,null,null,e.size?e.size:1),n=v;f.forEach((function(t){var r=e[t];n=n.getChild(r)})),n.addChild(t,r)})),function(t,e){for(var r in b(t,e),t.children)t.children[r].applyPositionToChildren()}(v,p),s(e,v,c);var y,m,w,_=l.length;for(w=0;w<_;w++){var x=l[w];y=d+g*c[x].x,m=d+g*c[x].y,h[x]={x:y,y:m},t&&(e.setNodeAttribute(x,r.attributes.x,y),e.setNodeAttribute(x,r.attributes.y,m))}return h}u.prototype.hasChildren=function(){return this.countChildren>0},u.prototype.addChild=function(t,e){this.children[t]=e,++this.countChildren},u.prototype.getChild=function(t){if(!this.children.hasOwnProperty(t)){var e=new u;this.children[t]=e,++this.countChildren}return this.children[t]},u.prototype.applyPositionToChildren=function(){if(this.hasChildren()){var t=this;for(var e in t.children){var r=t.children[e];r.x+=t.x,r.y+=t.y,r.applyPositionToChildren()}}};var _=w.bind(null,!1);_.assign=w.bind(null,!0),t.exports=_},28833:(t,e,r)=>{var n=r(46586),i=r(31880),o={dimensions:["x","y"],center:.5,scale:1};function a(t,e,r){if(!i(e))throw new Error("graphology-layout/random: the given graph is not a valid graphology instance.");var a=(r=n(r,o)).dimensions;if(!Array.isArray(a)||2!==a.length)throw new Error("graphology-layout/random: given dimensions are invalid.");var u=r.center,s=r.scale,c=2*Math.PI,h=(u-.5)*s,l=e.order,d=a[0],f=a[1];function p(t,e){return e[d]=s*Math.cos(t*c/l)+h,e[f]=s*Math.sin(t*c/l)+h,e}var g=0;if(!t){var v={};return e.forEachNode((function(t){v[t]=p(g++,{})})),v}e.updateEachNodeAttributes((function(t,e){return p(g++,e),e}),{attributes:a})}var u=a.bind(null,!1);u.assign=a.bind(null,!0),t.exports=u},36039:(t,e,r)=>{r(11155),r(28833),r(18645),e.rotation=r(47621)},18645:(t,e,r)=>{var n=r(46586),i=r(31880),o={dimensions:["x","y"],center:.5,rng:Math.random,scale:1};function a(t,e,r){if(!i(e))throw new Error("graphology-layout/random: the given graph is not a valid graphology instance.");var a=(r=n(r,o)).dimensions;if(!Array.isArray(a)||a.length<1)throw new Error("graphology-layout/random: given dimensions are invalid.");var u=a.length,s=r.center,c=r.rng,h=r.scale,l=(s-.5)*h;function d(t){for(var e=0;e<u;e++)t[a[e]]=c()*h+l;return t}if(!t){var f={};return e.forEachNode((function(t){f[t]=d({})})),f}e.updateEachNodeAttributes((function(t,e){return d(e),e}),{attributes:a})}var u=a.bind(null,!1);u.assign=a.bind(null,!0),t.exports=u},47621:(t,e,r)=>{var n=r(46586),i=r(31880),o=Math.PI/180,a={dimensions:["x","y"],centeredOnZero:!1,degrees:!1};function u(t,e,r,u){if(!i(e))throw new Error("graphology-layout/rotation: the given graph is not a valid graphology instance.");(u=n(u,a)).degrees&&(r*=o);var s=u.dimensions;if(!Array.isArray(s)||2!==s.length)throw new Error("graphology-layout/random: given dimensions are invalid.");if(0===e.order){if(t)return;return{}}var c=s[0],h=s[1],l=0,d=0;if(!u.centeredOnZero){var f=1/0,p=-1/0,g=1/0,v=-1/0;e.forEachNode((function(t,e){var r=e[c],n=e[h];r<f&&(f=r),r>p&&(p=r),n<g&&(g=n),n>v&&(v=n)})),l=(f+p)/2,d=(g+v)/2}var y=Math.cos(r),m=Math.sin(r);function b(t){var e=t[c],r=t[h];return t[c]=l+(e-l)*y-(r-d)*m,t[h]=d+(e-l)*m+(r-d)*y,t}if(!t){var w={};return e.forEachNode((function(t,e){var r={};r[c]=e[c],r[h]=e[h],w[t]=b(r)})),w}e.updateEachNodeAttributes((function(t,e){return b(e),e}),{attributes:s})}var s=u.bind(null,!1);s.assign=u.bind(null,!0),t.exports=s},61359:(t,e,r)=>{var n=r(31880),i=r(97052).B,o=r(27155).De;t.exports=function(t,e){if(!n(t)||!n(e))throw new Error("graphology-operators/disjoint-union: invalid graph.");if(t.multi!==e.multi)throw new Error("graphology-operators/disjoint-union: both graph should be simple or multi.");var r=t.nullCopy();r.mergeAttributes(t.getAttributes());var a={},u={},s=0;return t.forEachNode((function(t,e){a[t]=s,i(r,s,e),s++})),e.forEachNode((function(t,e){u[t]=s,i(r,s,e),s++})),s=0,t.forEachEdge((function(t,e,n,i,u,c,h){o(r,h,s++,a[n],a[i],i,e)})),e.forEachEdge((function(t,e,n,i,a,c,h){o(r,h,s++,u[n],u[i],i,e)})),r}},35174:(t,e,r)=>{r(61359),r(9484),r(61499),r(76458),r(88947),r(92971),r(14230),e.toUndirected=r(51624),r(79106)},9484:(t,e,r)=>{var n=r(31880),i=r(27155).De;t.exports=function(t){if(!n(t))throw new Error("graphology-operators/reverse: invalid graph.");var e=t.emptyCopy();return t.forEachUndirectedEdge((function(t,r,n,o){i(e,!0,t,n,o,r)})),t.forEachDirectedEdge((function(t,r,n,o){i(e,!1,t,o,n,r)})),e}},61499:(t,e,r)=>{var n=r(31880),i=r(97052).B,o=r(27155).De;t.exports=function(t,e){if(!n(t))throw new Error("graphology-operators/subgraph: invalid graph instance.");var r=t.nullCopy(),a=e;if(Array.isArray(e)){if(0===e.length)return r;e=new Set(e)}if(e instanceof Set){if(0===e.size)return r;a=function(t){return e.has(t)};var u=e;e=new Set,u.forEach((function(t){e.add(""+t)}))}if("function"!=typeof a)throw new Error("graphology-operators/subgraph: invalid nodes. Expecting an array or a set or a filtering function.");if("function"==typeof e){if(t.forEachNode((function(t,e){a(t,e)&&i(r,t,e)})),0===r.order)return r}else e.forEach((function(e){if(!t.hasNode(e))throw new Error('graphology-operators/subgraph: the "'+e+'" node was not found in the graph.');i(r,e,t.getNodeAttributes(e))}));return t.forEachEdge((function(t,e,n,i,u,s,c){a(n,u)&&(i===n||a(i,s))&&o(r,c,t,n,i,e)})),r}},76458:(t,e,r)=>{var n=r(31880),i=r(27155).De;t.exports=function(t,e){if(!n(t))throw new Error("graphology-operators/to-directed: expecting a valid graphology instance.");"function"==typeof e&&(e={mergeEdge:e});var r="function"==typeof(e=e||{}).mergeEdge?e.mergeEdge:null;if("directed"===t.type)return t.copy();var o=t.emptyCopy({type:"directed"});return t.forEachDirectedEdge((function(t,e,r,n){i(o,!1,t,r,n,e)})),t.forEachUndirectedEdge((function(e,n,a,u){var s=!t.multi&&"mixed"===t.type&&o.edge(a,u),c=!t.multi&&"mixed"===t.type&&o.edge(u,a);s?o.replaceEdgeAttributes(s,r(o.getEdgeAttributes(s),n)):i(o,!1,null,a,u,n),a!==u&&(c?o.replaceEdgeAttributes(c,r(o.getEdgeAttributes(c),n)):i(o,!1,null,u,a,n))})),o}},88947:(t,e,r)=>{var n=r(31880);t.exports=function(t){if(!n(t))throw new Error("graphology-operators/to-mixed: expecting a valid graphology instance.");return t.copy({type:"mixed"})}},92971:(t,e,r)=>{var n=r(31880);t.exports=function(t){if(!n(t))throw new Error("graphology-operators/to-multi: expecting a valid graphology instance.");return t.copy({multi:!0})}},14230:(t,e,r)=>{var n=r(31880),i=r(27155).De;t.exports=function(t,e){if(!n(t))throw new Error("graphology-operators/to-simple: expecting a valid graphology instance.");"function"==typeof e&&(e={mergeEdge:e});var r="function"==typeof(e=e||{}).mergeEdge?e.mergeEdge:null;if(!t.multi)return t.copy();var o=t.emptyCopy({multi:!1});return t.forEachEdge((function(t,e,n,a,u,s,c){var h=c?o.undirectedEdge(n,a):o.directedEdge(n,a);h?r&&o.replaceEdgeAttributes(h,r(o.getEdgeAttributes(h),e)):i(o,c,t,n,a,e)})),o}},51624:(t,e,r)=>{var n=r(31880),i=r(27155).De;t.exports=function(t,e){if(!n(t))throw new Error("graphology-operators/to-undirected: expecting a valid graphology instance.");"function"==typeof e&&(e={mergeEdge:e});var r="function"==typeof(e=e||{}).mergeEdge?e.mergeEdge:null;if("undirected"===t.type)return t.copy();var o=t.emptyCopy({type:"undirected"});return t.forEachUndirectedEdge((function(t,e,r,n){i(o,!0,t,r,n,e)})),t.forEachDirectedEdge((function(e,n,a,u){if(!t.multi){var s=o.edge(a,u);if(s)return void(r&&o.replaceEdgeAttributes(s,r(o.getEdgeAttributes(s),n)))}i(o,!0,null,a,u,n)})),o}},79106:(t,e,r)=>{var n=r(31880);t.exports=function(t,e){if(!n(t)||!n(e))throw new Error("graphology-operators/union: invalid graph.");if(t.multi!==e.multi)throw new Error("graphology-operators/union: both graph should be simple or multi.");var r=t.copy();return r.import(e,!0),r}},39260:(t,e,r)=>{r(31880),r(4363).Q6,r(64231)},60715:(t,e,r)=>{var n=r(15129),i=r(77672);r(39260),e.Ar=n.bidirectional,n.singleSource,n.singleSourceLength,n.undirectedSingleSourceLength,n.brandes,i.edgePathFromNodePath},15129:(t,e,r)=>{var n=r(31880),i=r(4034),o=r(8884);function a(t,e,r){if(!n(e))throw new Error("graphology-shortest-path: invalid graphology instance.");if(!e.hasNode(r))throw new Error('graphology-shortest-path: the "'+r+'" source node does not exist in the given graph.');r=""+r;var i=new Set,a={},u=0;a[r]=0;for(var s,c,h,l=[r];0!==l.length;){var d=[];for(s=0,c=l.length;s<c;s++)h=l[s],i.has(h)||(i.add(h),o(d,e[t](h)),a[h]=u);u++,l=d}return a}var u=a.bind(null,"outboundNeighbors"),s=a.bind(null,"neighbors");e.bidirectional=function(t,e,r){if(!n(t))throw new Error("graphology-shortest-path: invalid graphology instance.");if(arguments.length<3)throw new Error("graphology-shortest-path: invalid number of arguments. Expecting at least 3.");if(!t.hasNode(e))throw new Error('graphology-shortest-path: the "'+e+'" source node does not exist in the given graph.');if(!t.hasNode(r))throw new Error('graphology-shortest-path: the "'+r+'" target node does not exist in the given graph.');if((e=""+e)==(r=""+r))return[e];var i=t.inboundNeighbors.bind(t),o=t.outboundNeighbors.bind(t),a={},u={};a[e]=null,u[r]=null;var s,c,h,l,d,f,p,g,v=[e],y=[r],m=!1;t:for(;v.length&&y.length;)if(v.length<=y.length){for(s=v,v=[],d=0,p=s.length;d<p;d++)for(f=0,g=(h=o(c=s[d])).length;f<g;f++)if((l=h[f])in a||(v.push(l),a[l]=c),l in u){m=!0;break t}}else for(s=y,y=[],d=0,p=s.length;d<p;d++)for(f=0,g=(h=i(c=s[d])).length;f<g;f++)if((l=h[f])in u||(y.push(l),u[l]=c),l in a){m=!0;break t}if(!m)return null;for(var b=[];l;)b.unshift(l),l=a[l];for(l=u[b[b.length-1]];l;)b.push(l),l=u[l];return b.length?b:null},e.singleSource=function(t,e){if(!n(t))throw new Error("graphology-shortest-path: invalid graphology instance.");if(arguments.length<2)throw new Error("graphology-shortest-path: invalid number of arguments. Expecting at least 2.");if(!t.hasNode(e))throw new Error('graphology-shortest-path: the "'+e+'" source node does not exist in the given graph.');var r,i,o,a,u,s,c={},h={};for(c[e=""+e]=!0,h[e]=[e];Object.keys(c).length;)for(o in r=c,c={},r)for(u=0,s=(i=t.outboundNeighbors(o)).length;u<s;u++)h[a=i[u]]||(h[a]=h[o].concat(a),c[a]=!0);return h},e.singleSourceLength=u,e.undirectedSingleSourceLength=s,e.brandes=function(t,e){e=""+e;var r,n,o,a,u,s,c,h,l,d=[],f={},p={},g=t.nodes();for(s=0,h=g.length;s<h;s++)f[a=g[s]]=[],p[a]=0;var v={};p[e]=1,v[e]=0;for(var y=i.of(e);y.size;)for(a=y.dequeue(),d.push(a),r=v[a],n=p[a],c=0,l=(o=t.outboundNeighbors(a)).length;c<l;c++)(u=o[c])in v||(y.enqueue(u),v[u]=r+1),v[u]===r+1&&(p[u]+=n,f[u].push(a));return[d,f,p]}},77672:(t,e)=>{var r=function(){return!0};e.edgePathFromNodePath=function(t,e){var n,i,o,a,u=e.length;if(u<2)return i=e[0],(a=t.multi?t.findEdge(i,i,r):t.edge(i,i))?[a]:[];u--;var s=new Array(u);for(n=0;n<u;n++){if(i=e[n],o=e[n+1],void 0===(a=t.multi?t.findOutboundEdge(i,o,r):t.edge(i,o)))throw new Error("graphology-shortest-path: given path is impossible in given graph.");s[n]=a}return s}},27155:(t,e)=>{e.De=function(t,e,r,n,i,o){return o=Object.assign({},o),e?null==r?t.addUndirectedEdge(n,i,o):t.addUndirectedEdgeWithKey(r,n,i,o):null==r?t.addDirectedEdge(n,i,o):t.addDirectedEdgeWithKey(r,n,i,o)}},97052:(t,e)=>{e.B=function(t,e,r){return r=Object.assign({},r),t.addNode(e,r)}},46586:t=>{t.exports=function t(e,r){e=e||{};var n,i={};for(var o in r){var a=e[o],u=r[o];!(n=u)||"object"!=typeof n||"function"==typeof n||Array.isArray(n)||n instanceof Set||n instanceof Map||n instanceof RegExp||n instanceof Date?i[o]=void 0===a?u:a:i[o]=t(a,u)}return i}},4363:(t,e)=>{function r(t){return"number"!=typeof t||isNaN(t)?1:t}e.Q6=function(t){return function(t,e){var r={},n=function(t){return void 0===t?e:t};"function"==typeof e&&(n=e);var i=function(e){return n(e[t])},o=function(){return n(void 0)};return"string"==typeof t?(r.fromAttributes=i,r.fromGraph=function(t,e){return i(t.getEdgeAttributes(e))},r.fromEntry=function(t,e){return i(e)},r.fromPartialEntry=r.fromEntry,r.fromMinimalEntry=r.fromEntry):"function"==typeof t?(r.fromAttributes=function(){throw new Error("graphology-utils/getters/createEdgeValueGetter: irrelevant usage.")},r.fromGraph=function(e,r){var i=e.extremities(r);return n(t(r,e.getEdgeAttributes(r),i[0],i[1],e.getNodeAttributes(i[0]),e.getNodeAttributes(i[1]),e.isUndirected(r)))},r.fromEntry=function(e,r,i,o,a,u,s){return n(t(e,r,i,o,a,u,s))},r.fromPartialEntry=function(e,r,i,o){return n(t(e,r,i,o))},r.fromMinimalEntry=function(e,r){return n(t(e,r))}):(r.fromAttributes=o,r.fromGraph=o,r.fromEntry=o,r.fromMinimalEntry=o),r}(t,r)}},31880:t=>{t.exports=function(t){return null!==t&&"object"==typeof t&&"function"==typeof t.addUndirectedEdgeWithKey&&"function"==typeof t.dropNode&&"boolean"==typeof t.multi}},98996:function(t){t.exports=function(){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,n(t,e)}function r(t){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},r(t)}function n(t,e){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},n(t,e)}function i(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function o(t,e,r){return o=i()?Reflect.construct.bind():function(t,e,r){var i=[null];i.push.apply(i,e);var o=new(Function.bind.apply(t,i));return r&&n(o,r.prototype),o},o.apply(null,arguments)}function a(t){var e="function"==typeof Map?new Map:void 0;return a=function(t){if(null===t||(i=t,-1===Function.toString.call(i).indexOf("[native code]")))return t;var i;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,a)}function a(){return o(t,arguments,r(this).constructor)}return a.prototype=Object.create(t.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),n(a,t)},a(t)}function u(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var s=function(){for(var t=arguments[0],e=1,r=arguments.length;e<r;e++)if(arguments[e])for(var n in arguments[e])t[n]=arguments[e][n];return t};function c(t,e,r,n){var i=t._nodes.get(e),o=null;return i?o="mixed"===n?i.out&&i.out[r]||i.undirected&&i.undirected[r]:"directed"===n?i.out&&i.out[r]:i.undirected&&i.undirected[r]:o}function h(e){return"object"===t(e)&&null!==e&&e.constructor===Object}function l(t){var e;for(e in t)return!1;return!0}function d(t,e,r){Object.defineProperty(t,e,{enumerable:!1,configurable:!1,writable:!0,value:r})}function f(t,e,r){var n={enumerable:!0,configurable:!0};"function"==typeof r?n.get=r:(n.value=r,n.writable=!1),Object.defineProperty(t,e,n)}function p(t){return!(!h(t)||t.attributes&&!Array.isArray(t.attributes))}"function"==typeof Object.assign&&(s=Object.assign);var g,v={exports:{}},y="object"==typeof Reflect?Reflect:null,m=y&&"function"==typeof y.apply?y.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};g=y&&"function"==typeof y.ownKeys?y.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var b=Number.isNaN||function(t){return t!=t};function w(){w.init.call(this)}v.exports=w,v.exports.once=function(t,e){return new Promise((function(r,n){function i(r){t.removeListener(e,o),n(r)}function o(){"function"==typeof t.removeListener&&t.removeListener("error",i),r([].slice.call(arguments))}D(t,e,o,{once:!0}),"error"!==e&&function(t,e,r){"function"==typeof t.on&&D(t,"error",e,{once:!0})}(t,i)}))},w.EventEmitter=w,w.prototype._events=void 0,w.prototype._eventsCount=0,w.prototype._maxListeners=void 0;var _=10;function x(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function E(t){return void 0===t._maxListeners?w.defaultMaxListeners:t._maxListeners}function A(t,e,r,n){var i,o,a,u;if(x(r),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),a=o[e]),void 0===a)a=o[e]=r,++t._eventsCount;else if("function"==typeof a?a=o[e]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(i=E(t))>0&&a.length>i&&!a.warned){a.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=t,s.type=e,s.count=a.length,u=s,console&&console.warn&&console.warn(u)}return t}function L(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function k(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=L.bind(n);return i.listener=r,n.wrapFn=i,i}function C(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(i):M(i,i.length)}function S(t){var e=this._events;if(void 0!==e){var r=e[t];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function M(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}function D(t,e,r,n){if("function"==typeof t.on)n.once?t.once(e,r):t.on(e,r);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function i(o){n.once&&t.removeEventListener(e,i),r(o)}))}}function O(t){if("function"!=typeof t)throw new Error("obliterator/iterator: expecting a function!");this.next=t}Object.defineProperty(w,"defaultMaxListeners",{enumerable:!0,get:function(){return _},set:function(t){if("number"!=typeof t||t<0||b(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");_=t}}),w.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},w.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||b(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},w.prototype.getMaxListeners=function(){return E(this)},w.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var n="error"===t,i=this._events;if(void 0!==i)n=n&&void 0===i.error;else if(!n)return!1;if(n){var o;if(e.length>0&&(o=e[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var u=i[t];if(void 0===u)return!1;if("function"==typeof u)m(u,this,e);else{var s=u.length,c=M(u,s);for(r=0;r<s;++r)m(c[r],this,e)}return!0},w.prototype.addListener=function(t,e){return A(this,t,e,!1)},w.prototype.on=w.prototype.addListener,w.prototype.prependListener=function(t,e){return A(this,t,e,!0)},w.prototype.once=function(t,e){return x(e),this.on(t,k(this,t,e)),this},w.prototype.prependOnceListener=function(t,e){return x(e),this.prependListener(t,k(this,t,e)),this},w.prototype.removeListener=function(t,e){var r,n,i,o,a;if(x(e),void 0===(n=this._events))return this;if(void 0===(r=n[t]))return this;if(r===e||r.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===e||r[o].listener===e){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(r,i),1===r.length&&(n[t]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",t,a||e)}return this},w.prototype.off=w.prototype.removeListener,w.prototype.removeAllListeners=function(t){var e,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[t]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(void 0!==e)for(n=e.length-1;n>=0;n--)this.removeListener(t,e[n]);return this},w.prototype.listeners=function(t){return C(this,t,!0)},w.prototype.rawListeners=function(t){return C(this,t,!1)},w.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):S.call(t,e)},w.prototype.listenerCount=S,w.prototype.eventNames=function(){return this._eventsCount>0?g(this._events):[]},"undefined"!=typeof Symbol&&(O.prototype[Symbol.iterator]=function(){return this}),O.of=function(){var t=arguments,e=t.length,r=0;return new O((function(){return r>=e?{done:!0}:{done:!1,value:t[r++]}}))},O.empty=function(){return new O((function(){return{done:!0}}))},O.fromSequence=function(t){var e=0,r=t.length;return new O((function(){return e>=r?{done:!0}:{done:!1,value:t[e++]}}))},O.is=function(t){return t instanceof O||"object"==typeof t&&null!==t&&"function"==typeof t.next};var G=O,F={};F.ARRAY_BUFFER_SUPPORT="undefined"!=typeof ArrayBuffer,F.SYMBOL_SUPPORT="undefined"!=typeof Symbol;var R=G,T=F,P=T.ARRAY_BUFFER_SUPPORT,N=T.SYMBOL_SUPPORT,j=function(t){var e=function(t){return"string"==typeof t||Array.isArray(t)||P&&ArrayBuffer.isView(t)?R.fromSequence(t):"object"!=typeof t||null===t?null:N&&"function"==typeof t[Symbol.iterator]?t[Symbol.iterator]():"function"==typeof t.next?t:null}(t);if(!e)throw new Error("obliterator: target is not iterable nor a valid iterator.");return e},z=j,U=function(t,e){for(var r,n=arguments.length>1?e:1/0,i=n!==1/0?new Array(n):[],o=0,a=z(t);;){if(o===n)return i;if((r=a.next()).done)return o!==e&&(i.length=o),i;i[o++]=r.value}},I=function(t){function r(e){var r;return(r=t.call(this)||this).name="GraphError",r.message=e,r}return e(r,t),r}(a(Error)),B=function(t){function r(e){var n;return(n=t.call(this,e)||this).name="InvalidArgumentsGraphError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(u(n),r.prototype.constructor),n}return e(r,t),r}(I),W=function(t){function r(e){var n;return(n=t.call(this,e)||this).name="NotFoundGraphError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(u(n),r.prototype.constructor),n}return e(r,t),r}(I),q=function(t){function r(e){var n;return(n=t.call(this,e)||this).name="UsageGraphError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(u(n),r.prototype.constructor),n}return e(r,t),r}(I);function H(t,e){this.key=t,this.attributes=e,this.clear()}function V(t,e){this.key=t,this.attributes=e,this.clear()}function Z(t,e){this.key=t,this.attributes=e,this.clear()}function Y(t,e,r,n,i){this.key=e,this.attributes=i,this.undirected=t,this.source=r,this.target=n}function K(t,e,r,n,i,o,a){var u,s,c,h;if(n=""+n,0===r){if(!(u=t._nodes.get(n)))throw new W("Graph.".concat(e,': could not find the "').concat(n,'" node in the graph.'));c=i,h=o}else if(3===r){if(i=""+i,!(s=t._edges.get(i)))throw new W("Graph.".concat(e,': could not find the "').concat(i,'" edge in the graph.'));var l=s.source.key,d=s.target.key;if(n===l)u=s.target;else{if(n!==d)throw new W("Graph.".concat(e,': the "').concat(n,'" node is not attached to the "').concat(i,'" edge (').concat(l,", ").concat(d,")."));u=s.source}c=o,h=a}else{if(!(s=t._edges.get(n)))throw new W("Graph.".concat(e,': could not find the "').concat(n,'" edge in the graph.'));u=1===r?s.source:s.target,c=i,h=o}return[u,c,h]}H.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.undirectedDegree=0,this.undirectedLoops=0,this.directedLoops=0,this.in={},this.out={},this.undirected={}},V.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.directedLoops=0,this.in={},this.out={}},Z.prototype.clear=function(){this.undirectedDegree=0,this.undirectedLoops=0,this.undirected={}},Y.prototype.attach=function(){var t="out",e="in";this.undirected&&(t=e="undirected");var r=this.source.key,n=this.target.key;this.source[t][n]=this,this.undirected&&r===n||(this.target[e][r]=this)},Y.prototype.attachMulti=function(){var t="out",e="in",r=this.source.key,n=this.target.key;this.undirected&&(t=e="undirected");var i=this.source[t],o=i[n];if(void 0===o)return i[n]=this,void(this.undirected&&r===n||(this.target[e][r]=this));o.previous=this,this.next=o,i[n]=this,this.target[e][r]=this},Y.prototype.detach=function(){var t=this.source.key,e=this.target.key,r="out",n="in";this.undirected&&(r=n="undirected"),delete this.source[r][e],delete this.target[n][t]},Y.prototype.detachMulti=function(){var t=this.source.key,e=this.target.key,r="out",n="in";this.undirected&&(r=n="undirected"),void 0===this.previous?void 0===this.next?(delete this.source[r][e],delete this.target[n][t]):(this.next.previous=void 0,this.source[r][e]=this.next,this.target[n][t]=this.next):(this.previous.next=this.next,void 0!==this.next&&(this.next.previous=this.previous))};var $=[{name:function(t){return"get".concat(t,"Attribute")},attacher:function(t,e,r){t.prototype[e]=function(t,n,i){var o=K(this,e,r,t,n,i),a=o[0],u=o[1];return a.attributes[u]}}},{name:function(t){return"get".concat(t,"Attributes")},attacher:function(t,e,r){t.prototype[e]=function(t,n){return K(this,e,r,t,n)[0].attributes}}},{name:function(t){return"has".concat(t,"Attribute")},attacher:function(t,e,r){t.prototype[e]=function(t,n,i){var o=K(this,e,r,t,n,i),a=o[0],u=o[1];return a.attributes.hasOwnProperty(u)}}},{name:function(t){return"set".concat(t,"Attribute")},attacher:function(t,e,r){t.prototype[e]=function(t,n,i,o){var a=K(this,e,r,t,n,i,o),u=a[0],s=a[1],c=a[2];return u.attributes[s]=c,this.emit("nodeAttributesUpdated",{key:u.key,type:"set",attributes:u.attributes,name:s}),this}}},{name:function(t){return"update".concat(t,"Attribute")},attacher:function(t,e,r){t.prototype[e]=function(t,n,i,o){var a=K(this,e,r,t,n,i,o),u=a[0],s=a[1],c=a[2];if("function"!=typeof c)throw new B("Graph.".concat(e,": updater should be a function."));var h=u.attributes,l=c(h[s]);return h[s]=l,this.emit("nodeAttributesUpdated",{key:u.key,type:"set",attributes:u.attributes,name:s}),this}}},{name:function(t){return"remove".concat(t,"Attribute")},attacher:function(t,e,r){t.prototype[e]=function(t,n,i){var o=K(this,e,r,t,n,i),a=o[0],u=o[1];return delete a.attributes[u],this.emit("nodeAttributesUpdated",{key:a.key,type:"remove",attributes:a.attributes,name:u}),this}}},{name:function(t){return"replace".concat(t,"Attributes")},attacher:function(t,e,r){t.prototype[e]=function(t,n,i){var o=K(this,e,r,t,n,i),a=o[0],u=o[1];if(!h(u))throw new B("Graph.".concat(e,": provided attributes are not a plain object."));return a.attributes=u,this.emit("nodeAttributesUpdated",{key:a.key,type:"replace",attributes:a.attributes}),this}}},{name:function(t){return"merge".concat(t,"Attributes")},attacher:function(t,e,r){t.prototype[e]=function(t,n,i){var o=K(this,e,r,t,n,i),a=o[0],u=o[1];if(!h(u))throw new B("Graph.".concat(e,": provided attributes are not a plain object."));return s(a.attributes,u),this.emit("nodeAttributesUpdated",{key:a.key,type:"merge",attributes:a.attributes,data:u}),this}}},{name:function(t){return"update".concat(t,"Attributes")},attacher:function(t,e,r){t.prototype[e]=function(t,n,i){var o=K(this,e,r,t,n,i),a=o[0],u=o[1];if("function"!=typeof u)throw new B("Graph.".concat(e,": provided updater is not a function."));return a.attributes=u(a.attributes),this.emit("nodeAttributesUpdated",{key:a.key,type:"update",attributes:a.attributes}),this}}}],Q=[{name:function(t){return"get".concat(t,"Attribute")},attacher:function(t,e,r){t.prototype[e]=function(t,n){var i;if("mixed"!==this.type&&"mixed"!==r&&r!==this.type)throw new q("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new q("Graph.".concat(e,": 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."));var o=""+t,a=""+n;if(n=arguments[2],!(i=c(this,o,a,r)))throw new W("Graph.".concat(e,': could not find an edge for the given path ("').concat(o,'" - "').concat(a,'").'))}else{if("mixed"!==r)throw new q("Graph.".concat(e,": 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(t=""+t,!(i=this._edges.get(t)))throw new W("Graph.".concat(e,': could not find the "').concat(t,'" edge in the graph.'))}return i.attributes[n]}}},{name:function(t){return"get".concat(t,"Attributes")},attacher:function(t,e,r){t.prototype[e]=function(t){var n;if("mixed"!==this.type&&"mixed"!==r&&r!==this.type)throw new q("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>1){if(this.multi)throw new q("Graph.".concat(e,": 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."));var i=""+t,o=""+arguments[1];if(!(n=c(this,i,o,r)))throw new W("Graph.".concat(e,': could not find an edge for the given path ("').concat(i,'" - "').concat(o,'").'))}else{if("mixed"!==r)throw new q("Graph.".concat(e,": 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(t=""+t,!(n=this._edges.get(t)))throw new W("Graph.".concat(e,': could not find the "').concat(t,'" edge in the graph.'))}return n.attributes}}},{name:function(t){return"has".concat(t,"Attribute")},attacher:function(t,e,r){t.prototype[e]=function(t,n){var i;if("mixed"!==this.type&&"mixed"!==r&&r!==this.type)throw new q("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new q("Graph.".concat(e,": 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."));var o=""+t,a=""+n;if(n=arguments[2],!(i=c(this,o,a,r)))throw new W("Graph.".concat(e,': could not find an edge for the given path ("').concat(o,'" - "').concat(a,'").'))}else{if("mixed"!==r)throw new q("Graph.".concat(e,": 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(t=""+t,!(i=this._edges.get(t)))throw new W("Graph.".concat(e,': could not find the "').concat(t,'" edge in the graph.'))}return i.attributes.hasOwnProperty(n)}}},{name:function(t){return"set".concat(t,"Attribute")},attacher:function(t,e,r){t.prototype[e]=function(t,n,i){var o;if("mixed"!==this.type&&"mixed"!==r&&r!==this.type)throw new q("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>3){if(this.multi)throw new q("Graph.".concat(e,": 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."));var a=""+t,u=""+n;if(n=arguments[2],i=arguments[3],!(o=c(this,a,u,r)))throw new W("Graph.".concat(e,': could not find an edge for the given path ("').concat(a,'" - "').concat(u,'").'))}else{if("mixed"!==r)throw new q("Graph.".concat(e,": 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(t=""+t,!(o=this._edges.get(t)))throw new W("Graph.".concat(e,': could not find the "').concat(t,'" edge in the graph.'))}return o.attributes[n]=i,this.emit("edgeAttributesUpdated",{key:o.key,type:"set",attributes:o.attributes,name:n}),this}}},{name:function(t){return"update".concat(t,"Attribute")},attacher:function(t,e,r){t.prototype[e]=function(t,n,i){var o;if("mixed"!==this.type&&"mixed"!==r&&r!==this.type)throw new q("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>3){if(this.multi)throw new q("Graph.".concat(e,": 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."));var a=""+t,u=""+n;if(n=arguments[2],i=arguments[3],!(o=c(this,a,u,r)))throw new W("Graph.".concat(e,': could not find an edge for the given path ("').concat(a,'" - "').concat(u,'").'))}else{if("mixed"!==r)throw new q("Graph.".concat(e,": 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(t=""+t,!(o=this._edges.get(t)))throw new W("Graph.".concat(e,': could not find the "').concat(t,'" edge in the graph.'))}if("function"!=typeof i)throw new B("Graph.".concat(e,": updater should be a function."));return o.attributes[n]=i(o.attributes[n]),this.emit("edgeAttributesUpdated",{key:o.key,type:"set",attributes:o.attributes,name:n}),this}}},{name:function(t){return"remove".concat(t,"Attribute")},attacher:function(t,e,r){t.prototype[e]=function(t,n){var i;if("mixed"!==this.type&&"mixed"!==r&&r!==this.type)throw new q("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new q("Graph.".concat(e,": 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."));var o=""+t,a=""+n;if(n=arguments[2],!(i=c(this,o,a,r)))throw new W("Graph.".concat(e,': could not find an edge for the given path ("').concat(o,'" - "').concat(a,'").'))}else{if("mixed"!==r)throw new q("Graph.".concat(e,": 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(t=""+t,!(i=this._edges.get(t)))throw new W("Graph.".concat(e,': could not find the "').concat(t,'" edge in the graph.'))}return delete i.attributes[n],this.emit("edgeAttributesUpdated",{key:i.key,type:"remove",attributes:i.attributes,name:n}),this}}},{name:function(t){return"replace".concat(t,"Attributes")},attacher:function(t,e,r){t.prototype[e]=function(t,n){var i;if("mixed"!==this.type&&"mixed"!==r&&r!==this.type)throw new q("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new q("Graph.".concat(e,": 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."));var o=""+t,a=""+n;if(n=arguments[2],!(i=c(this,o,a,r)))throw new W("Graph.".concat(e,': could not find an edge for the given path ("').concat(o,'" - "').concat(a,'").'))}else{if("mixed"!==r)throw new q("Graph.".concat(e,": 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(t=""+t,!(i=this._edges.get(t)))throw new W("Graph.".concat(e,': could not find the "').concat(t,'" edge in the graph.'))}if(!h(n))throw new B("Graph.".concat(e,": provided attributes are not a plain object."));return i.attributes=n,this.emit("edgeAttributesUpdated",{key:i.key,type:"replace",attributes:i.attributes}),this}}},{name:function(t){return"merge".concat(t,"Attributes")},attacher:function(t,e,r){t.prototype[e]=function(t,n){var i;if("mixed"!==this.type&&"mixed"!==r&&r!==this.type)throw new q("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new q("Graph.".concat(e,": 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."));var o=""+t,a=""+n;if(n=arguments[2],!(i=c(this,o,a,r)))throw new W("Graph.".concat(e,': could not find an edge for the given path ("').concat(o,'" - "').concat(a,'").'))}else{if("mixed"!==r)throw new q("Graph.".concat(e,": 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(t=""+t,!(i=this._edges.get(t)))throw new W("Graph.".concat(e,': could not find the "').concat(t,'" edge in the graph.'))}if(!h(n))throw new B("Graph.".concat(e,": provided attributes are not a plain object."));return s(i.attributes,n),this.emit("edgeAttributesUpdated",{key:i.key,type:"merge",attributes:i.attributes,data:n}),this}}},{name:function(t){return"update".concat(t,"Attributes")},attacher:function(t,e,r){t.prototype[e]=function(t,n){var i;if("mixed"!==this.type&&"mixed"!==r&&r!==this.type)throw new q("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new q("Graph.".concat(e,": 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."));var o=""+t,a=""+n;if(n=arguments[2],!(i=c(this,o,a,r)))throw new W("Graph.".concat(e,': could not find an edge for the given path ("').concat(o,'" - "').concat(a,'").'))}else{if("mixed"!==r)throw new q("Graph.".concat(e,": 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(t=""+t,!(i=this._edges.get(t)))throw new W("Graph.".concat(e,': could not find the "').concat(t,'" edge in the graph.'))}if("function"!=typeof n)throw new B("Graph.".concat(e,": provided updater is not a function."));return i.attributes=n(i.attributes),this.emit("edgeAttributesUpdated",{key:i.key,type:"update",attributes:i.attributes}),this}}}],X=G,J=j,tt=function(){var t=arguments,e=null,r=-1;return new X((function(){for(var n=null;;){if(null===e){if(++r>=t.length)return{done:!0};e=J(t[r])}if(!0!==(n=e.next()).done)break;e=null}return n}))},et=[{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 rt(t,e,r,n){var i=!1;for(var o in e)if(o!==n){var a=e[o];if(i=r(a.key,a.attributes,a.source.key,a.target.key,a.source.attributes,a.target.attributes,a.undirected),t&&i)return a.key}}function nt(t,e,r,n){var i,o,a,u=!1;for(var s in e)if(s!==n){i=e[s];do{if(o=i.source,a=i.target,u=r(i.key,i.attributes,o.key,a.key,o.attributes,a.attributes,i.undirected),t&&u)return i.key;i=i.next}while(void 0!==i)}}function it(t,e){var r,n=Object.keys(t),i=n.length,o=0;return new G((function(){do{if(r)r=r.next;else{if(o>=i)return{done:!0};var a=n[o++];if(a===e){r=void 0;continue}r=t[a]}}while(!r);return{done:!1,value:{edge:r.key,attributes:r.attributes,source:r.source.key,target:r.target.key,sourceAttributes:r.source.attributes,targetAttributes:r.target.attributes,undirected:r.undirected}}}))}function ot(t,e,r,n){var i=e[r];if(i){var o=i.source,a=i.target;return n(i.key,i.attributes,o.key,a.key,o.attributes,a.attributes,i.undirected)&&t?i.key:void 0}}function at(t,e,r,n){var i=e[r];if(i){var o=!1;do{if(o=n(i.key,i.attributes,i.source.key,i.target.key,i.source.attributes,i.target.attributes,i.undirected),t&&o)return i.key;i=i.next}while(void 0!==i)}}function ut(t,e){var r=t[e];return void 0!==r.next?new G((function(){if(!r)return{done:!0};var t={edge:r.key,attributes:r.attributes,source:r.source.key,target:r.target.key,sourceAttributes:r.source.attributes,targetAttributes:r.target.attributes,undirected:r.undirected};return r=r.next,{done:!1,value:t}})):G.of({edge:r.key,attributes:r.attributes,source:r.source.key,target:r.target.key,sourceAttributes:r.source.attributes,targetAttributes:r.target.attributes,undirected:r.undirected})}function st(t,e){if(0===t.size)return[];if("mixed"===e||e===t.type)return"function"==typeof Array.from?Array.from(t._edges.keys()):U(t._edges.keys(),t._edges.size);for(var r,n,i="undirected"===e?t.undirectedSize:t.directedSize,o=new Array(i),a="undirected"===e,u=t._edges.values(),s=0;!0!==(r=u.next()).done;)(n=r.value).undirected===a&&(o[s++]=n.key);return o}function ct(t,e,r,n){if(0!==e.size)for(var i,o,a="mixed"!==r&&r!==e.type,u="undirected"===r,s=!1,c=e._edges.values();!0!==(i=c.next()).done;)if(o=i.value,!a||o.undirected===u){var h=o,l=h.key,d=h.attributes,f=h.source,p=h.target;if(s=n(l,d,f.key,p.key,f.attributes,p.attributes,o.undirected),t&&s)return l}}function ht(t,e){if(0===t.size)return G.empty();var r="mixed"!==e&&e!==t.type,n="undirected"===e,i=t._edges.values();return new G((function(){for(var t,e;;){if((t=i.next()).done)return t;if(e=t.value,!r||e.undirected===n)break}return{value:{edge:e.key,attributes:e.attributes,source:e.source.key,target:e.target.key,sourceAttributes:e.source.attributes,targetAttributes:e.target.attributes,undirected:e.undirected},done:!1}}))}function lt(t,e,r,n,i,o){var a,u=e?nt:rt;if("undirected"!==r){if("out"!==n&&(a=u(t,i.in,o),t&&a))return a;if("in"!==n&&(a=u(t,i.out,o,n?void 0:i.key),t&&a))return a}if("directed"!==r&&(a=u(t,i.undirected,o),t&&a))return a}function dt(t,e,r,n){var i=[];return lt(!1,t,e,r,n,(function(t){i.push(t)})),i}function ft(t,e,r){var n=G.empty();return"undirected"!==t&&("out"!==e&&void 0!==r.in&&(n=tt(n,it(r.in))),"in"!==e&&void 0!==r.out&&(n=tt(n,it(r.out,e?void 0:r.key)))),"directed"!==t&&void 0!==r.undirected&&(n=tt(n,it(r.undirected))),n}function pt(t,e,r,n,i,o,a){var u,s=r?at:ot;if("undirected"!==e){if(void 0!==i.in&&"out"!==n&&(u=s(t,i.in,o,a),t&&u))return u;if(void 0!==i.out&&"in"!==n&&(n||i.key!==o)&&(u=s(t,i.out,o,a),t&&u))return u}if("directed"!==e&&void 0!==i.undirected&&(u=s(t,i.undirected,o,a),t&&u))return u}function gt(t,e,r,n,i){var o=[];return pt(!1,t,e,r,n,i,(function(t){o.push(t)})),o}function vt(t,e,r,n){var i=G.empty();return"undirected"!==t&&(void 0!==r.in&&"out"!==e&&n in r.in&&(i=tt(i,ut(r.in,n))),void 0!==r.out&&"in"!==e&&n in r.out&&(e||r.key!==n)&&(i=tt(i,ut(r.out,n)))),"directed"!==t&&void 0!==r.undirected&&n in r.undirected&&(i=tt(i,ut(r.undirected,n))),i}var yt=[{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 mt(){this.A=null,this.B=null}function bt(t,e,r,n,i){for(var o in n){var a=n[o],u=a.source,s=a.target,c=u===r?s:u;if(!e||!e.has(c.key)){var h=i(c.key,c.attributes);if(t&&h)return c.key}}}function wt(t,e,r,n,i){if("mixed"!==e){if("undirected"===e)return bt(t,null,n,n.undirected,i);if("string"==typeof r)return bt(t,null,n,n[r],i)}var o,a=new mt;if("undirected"!==e){if("out"!==r){if(o=bt(t,null,n,n.in,i),t&&o)return o;a.wrap(n.in)}if("in"!==r){if(o=bt(t,a,n,n.out,i),t&&o)return o;a.wrap(n.out)}}if("directed"!==e&&(o=bt(t,a,n,n.undirected,i),t&&o))return o}function _t(t,e,r){var n=Object.keys(r),i=n.length,o=0;return new G((function(){var a=null;do{if(o>=i)return t&&t.wrap(r),{done:!0};var u=r[n[o++]],s=u.source,c=u.target;a=s===e?c:s,t&&t.has(a.key)&&(a=null)}while(null===a);return{done:!1,value:{neighbor:a.key,attributes:a.attributes}}}))}function xt(t,e,r,n,i){for(var o,a,u,s,c,h,l,d=n._nodes.values(),f=n.type;!0!==(o=d.next()).done;){var p=!1;if(a=o.value,"undirected"!==f)for(u in s=a.out){c=s[u];do{if(h=c.target,p=!0,l=i(a.key,h.key,a.attributes,h.attributes,c.key,c.attributes,c.undirected),t&&l)return c;c=c.next}while(c)}if("directed"!==f)for(u in s=a.undirected)if(!(e&&a.key>u)){c=s[u];do{if((h=c.target).key!==u&&(h=c.source),p=!0,l=i(a.key,h.key,a.attributes,h.attributes,c.key,c.attributes,c.undirected),t&&l)return c;c=c.next}while(c)}if(r&&!p&&(l=i(a.key,null,a.attributes,null,null,null,null),t&&l))return null}}function Et(t){if(!h(t))throw new B('Graph.import: invalid serialized node. A serialized node should be a plain object with at least a "key" property.');if(!("key"in t))throw new B("Graph.import: serialized node is missing its key.");if("attributes"in t&&(!h(t.attributes)||null===t.attributes))throw new B("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.")}function At(t){if(!h(t))throw new B('Graph.import: invalid serialized edge. A serialized edge should be a plain object with at least a "source" & "target" property.');if(!("source"in t))throw new B("Graph.import: serialized edge is missing its source.");if(!("target"in t))throw new B("Graph.import: serialized edge is missing its target.");if("attributes"in t&&(!h(t.attributes)||null===t.attributes))throw new B("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.");if("undirected"in t&&"boolean"!=typeof t.undirected)throw new B("Graph.import: invalid undirectedness information. Undirected should be boolean or omitted.")}mt.prototype.wrap=function(t){null===this.A?this.A=t:null===this.B&&(this.B=t)},mt.prototype.has=function(t){return null!==this.A&&t in this.A||null!==this.B&&t in this.B};var Lt,kt=(Lt=255&Math.floor(256*Math.random()),function(){return Lt++}),Ct=new Set(["directed","undirected","mixed"]),St=new Set(["domain","_events","_eventsCount","_maxListeners"]),Mt={allowSelfLoops:!0,multi:!1,type:"mixed"};function Dt(t,e,r){var n=new t.NodeDataClass(e,r);return t._nodes.set(e,n),t.emit("nodeAdded",{key:e,attributes:r}),n}function Ot(t,e,r,n,i,o,a,u){if(!n&&"undirected"===t.type)throw new q("Graph.".concat(e,": you cannot add a directed edge to an undirected graph. Use the #.addEdge or #.addUndirectedEdge instead."));if(n&&"directed"===t.type)throw new q("Graph.".concat(e,": you cannot add an undirected edge to a directed graph. Use the #.addEdge or #.addDirectedEdge instead."));if(u&&!h(u))throw new B("Graph.".concat(e,': invalid attributes. Expecting an object but got "').concat(u,'"'));if(o=""+o,a=""+a,u=u||{},!t.allowSelfLoops&&o===a)throw new q("Graph.".concat(e,': source & target are the same ("').concat(o,"\"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false."));var s=t._nodes.get(o),c=t._nodes.get(a);if(!s)throw new W("Graph.".concat(e,': source node "').concat(o,'" not found.'));if(!c)throw new W("Graph.".concat(e,': target node "').concat(a,'" not found.'));var l={key:null,undirected:n,source:o,target:a,attributes:u};if(r)i=t._edgeKeyGenerator();else if(i=""+i,t._edges.has(i))throw new q("Graph.".concat(e,': the "').concat(i,'" edge already exists in the graph.'));if(!t.multi&&(n?void 0!==s.undirected[a]:void 0!==s.out[a]))throw new q("Graph.".concat(e,': an edge linking "').concat(o,'" to "').concat(a,"\" already exists. If you really want to add multiple edges linking those nodes, you should create a multi graph by using the 'multi' option."));var d=new Y(n,i,s,c,u);t._edges.set(i,d);var f=o===a;return n?(s.undirectedDegree++,c.undirectedDegree++,f&&(s.undirectedLoops++,t._undirectedSelfLoopCount++)):(s.outDegree++,c.inDegree++,f&&(s.directedLoops++,t._directedSelfLoopCount++)),t.multi?d.attachMulti():d.attach(),n?t._undirectedSize++:t._directedSize++,l.key=i,t.emit("edgeAdded",l),i}function Gt(t,e,r,n,i,o,a,u,c){if(!n&&"undirected"===t.type)throw new q("Graph.".concat(e,": you cannot merge/update a directed edge to an undirected graph. Use the #.mergeEdge/#.updateEdge or #.addUndirectedEdge instead."));if(n&&"directed"===t.type)throw new q("Graph.".concat(e,": you cannot merge/update an undirected edge to a directed graph. Use the #.mergeEdge/#.updateEdge or #.addDirectedEdge instead."));if(u)if(c){if("function"!=typeof u)throw new B("Graph.".concat(e,': invalid updater function. Expecting a function but got "').concat(u,'"'))}else if(!h(u))throw new B("Graph.".concat(e,': invalid attributes. Expecting an object but got "').concat(u,'"'));var l;if(o=""+o,a=""+a,c&&(l=u,u=void 0),!t.allowSelfLoops&&o===a)throw new q("Graph.".concat(e,': source & target are the same ("').concat(o,"\"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false."));var d,f,p=t._nodes.get(o),g=t._nodes.get(a);if(!r&&(d=t._edges.get(i))){if(!(d.source.key===o&&d.target.key===a||n&&d.source.key===a&&d.target.key===o))throw new q("Graph.".concat(e,': inconsistency detected when attempting to merge the "').concat(i,'" edge with "').concat(o,'" source & "').concat(a,'" target vs. ("').concat(d.source.key,'", "').concat(d.target.key,'").'));f=d}if(f||t.multi||!p||(f=n?p.undirected[a]:p.out[a]),f){var v=[f.key,!1,!1,!1];if(c?!l:!u)return v;if(c){var y=f.attributes;f.attributes=l(y),t.emit("edgeAttributesUpdated",{type:"replace",key:f.key,attributes:f.attributes})}else s(f.attributes,u),t.emit("edgeAttributesUpdated",{type:"merge",key:f.key,attributes:f.attributes,data:u});return v}u=u||{},c&&l&&(u=l(u));var m={key:null,undirected:n,source:o,target:a,attributes:u};if(r)i=t._edgeKeyGenerator();else if(i=""+i,t._edges.has(i))throw new q("Graph.".concat(e,': the "').concat(i,'" edge already exists in the graph.'));var b=!1,w=!1;p||(p=Dt(t,o,{}),b=!0,o===a&&(g=p,w=!0)),g||(g=Dt(t,a,{}),w=!0),d=new Y(n,i,p,g,u),t._edges.set(i,d);var _=o===a;return n?(p.undirectedDegree++,g.undirectedDegree++,_&&(p.undirectedLoops++,t._undirectedSelfLoopCount++)):(p.outDegree++,g.inDegree++,_&&(p.directedLoops++,t._directedSelfLoopCount++)),t.multi?d.attachMulti():d.attach(),n?t._undirectedSize++:t._directedSize++,m.key=i,t.emit("edgeAdded",m),[i,!0,b,w]}function Ft(t,e){t._edges.delete(e.key);var r=e.source,n=e.target,i=e.attributes,o=e.undirected,a=r===n;o?(r.undirectedDegree--,n.undirectedDegree--,a&&(r.undirectedLoops--,t._undirectedSelfLoopCount--)):(r.outDegree--,n.inDegree--,a&&(r.directedLoops--,t._directedSelfLoopCount--)),t.multi?e.detachMulti():e.detach(),o?t._undirectedSize--:t._directedSize--,t.emit("edgeDropped",{key:e.key,attributes:i,source:r.key,target:n.key,undirected:o})}var Rt=function(r){function n(t){var e;if(e=r.call(this)||this,"boolean"!=typeof(t=s({},Mt,t)).multi)throw new B("Graph.constructor: invalid 'multi' option. Expecting a boolean but got \"".concat(t.multi,'".'));if(!Ct.has(t.type))throw new B('Graph.constructor: invalid \'type\' option. Should be one of "mixed", "directed" or "undirected" but got "'.concat(t.type,'".'));if("boolean"!=typeof t.allowSelfLoops)throw new B("Graph.constructor: invalid 'allowSelfLoops' option. Expecting a boolean but got \"".concat(t.allowSelfLoops,'".'));var n="mixed"===t.type?H:"directed"===t.type?V:Z;d(u(e),"NodeDataClass",n);var i="geid_"+kt()+"_",o=0;return d(u(e),"_attributes",{}),d(u(e),"_nodes",new Map),d(u(e),"_edges",new Map),d(u(e),"_directedSize",0),d(u(e),"_undirectedSize",0),d(u(e),"_directedSelfLoopCount",0),d(u(e),"_undirectedSelfLoopCount",0),d(u(e),"_edgeKeyGenerator",(function(){var t;do{t=i+o++}while(e._edges.has(t));return t})),d(u(e),"_options",t),St.forEach((function(t){return d(u(e),t,e[t])})),f(u(e),"order",(function(){return e._nodes.size})),f(u(e),"size",(function(){return e._edges.size})),f(u(e),"directedSize",(function(){return e._directedSize})),f(u(e),"undirectedSize",(function(){return e._undirectedSize})),f(u(e),"selfLoopCount",(function(){return e._directedSelfLoopCount+e._undirectedSelfLoopCount})),f(u(e),"directedSelfLoopCount",(function(){return e._directedSelfLoopCount})),f(u(e),"undirectedSelfLoopCount",(function(){return e._undirectedSelfLoopCount})),f(u(e),"multi",e._options.multi),f(u(e),"type",e._options.type),f(u(e),"allowSelfLoops",e._options.allowSelfLoops),f(u(e),"implementation",(function(){return"graphology"})),e}e(n,r);var i=n.prototype;return i._resetInstanceCounters=function(){this._directedSize=0,this._undirectedSize=0,this._directedSelfLoopCount=0,this._undirectedSelfLoopCount=0},i.hasNode=function(t){return this._nodes.has(""+t)},i.hasDirectedEdge=function(t,e){if("undirected"===this.type)return!1;if(1===arguments.length){var r=""+t,n=this._edges.get(r);return!!n&&!n.undirected}if(2===arguments.length){t=""+t,e=""+e;var i=this._nodes.get(t);return!!i&&i.out.hasOwnProperty(e)}throw new B("Graph.hasDirectedEdge: invalid arity (".concat(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."))},i.hasUndirectedEdge=function(t,e){if("directed"===this.type)return!1;if(1===arguments.length){var r=""+t,n=this._edges.get(r);return!!n&&n.undirected}if(2===arguments.length){t=""+t,e=""+e;var i=this._nodes.get(t);return!!i&&i.undirected.hasOwnProperty(e)}throw new B("Graph.hasDirectedEdge: invalid arity (".concat(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."))},i.hasEdge=function(t,e){if(1===arguments.length){var r=""+t;return this._edges.has(r)}if(2===arguments.length){t=""+t,e=""+e;var n=this._nodes.get(t);return!!n&&(void 0!==n.out&&n.out.hasOwnProperty(e)||void 0!==n.undirected&&n.undirected.hasOwnProperty(e))}throw new B("Graph.hasEdge: invalid arity (".concat(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."))},i.directedEdge=function(t,e){if("undirected"!==this.type){if(t=""+t,e=""+e,this.multi)throw new q("Graph.directedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.directedEdges instead.");var r=this._nodes.get(t);if(!r)throw new W('Graph.directedEdge: could not find the "'.concat(t,'" source node in the graph.'));if(!this._nodes.has(e))throw new W('Graph.directedEdge: could not find the "'.concat(e,'" target node in the graph.'));var n=r.out&&r.out[e]||void 0;return n?n.key:void 0}},i.undirectedEdge=function(t,e){if("directed"!==this.type){if(t=""+t,e=""+e,this.multi)throw new q("Graph.undirectedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.undirectedEdges instead.");var r=this._nodes.get(t);if(!r)throw new W('Graph.undirectedEdge: could not find the "'.concat(t,'" source node in the graph.'));if(!this._nodes.has(e))throw new W('Graph.undirectedEdge: could not find the "'.concat(e,'" target node in the graph.'));var n=r.undirected&&r.undirected[e]||void 0;return n?n.key:void 0}},i.edge=function(t,e){if(this.multi)throw new q("Graph.edge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.edges instead.");t=""+t,e=""+e;var r=this._nodes.get(t);if(!r)throw new W('Graph.edge: could not find the "'.concat(t,'" source node in the graph.'));if(!this._nodes.has(e))throw new W('Graph.edge: could not find the "'.concat(e,'" target node in the graph.'));var n=r.out&&r.out[e]||r.undirected&&r.undirected[e]||void 0;if(n)return n.key},i.areDirectedNeighbors=function(t,e){t=""+t,e=""+e;var r=this._nodes.get(t);if(!r)throw new W('Graph.areDirectedNeighbors: could not find the "'.concat(t,'" node in the graph.'));return"undirected"!==this.type&&(e in r.in||e in r.out)},i.areOutNeighbors=function(t,e){t=""+t,e=""+e;var r=this._nodes.get(t);if(!r)throw new W('Graph.areOutNeighbors: could not find the "'.concat(t,'" node in the graph.'));return"undirected"!==this.type&&e in r.out},i.areInNeighbors=function(t,e){t=""+t,e=""+e;var r=this._nodes.get(t);if(!r)throw new W('Graph.areInNeighbors: could not find the "'.concat(t,'" node in the graph.'));return"undirected"!==this.type&&e in r.in},i.areUndirectedNeighbors=function(t,e){t=""+t,e=""+e;var r=this._nodes.get(t);if(!r)throw new W('Graph.areUndirectedNeighbors: could not find the "'.concat(t,'" node in the graph.'));return"directed"!==this.type&&e in r.undirected},i.areNeighbors=function(t,e){t=""+t,e=""+e;var r=this._nodes.get(t);if(!r)throw new W('Graph.areNeighbors: could not find the "'.concat(t,'" node in the graph.'));return"undirected"!==this.type&&(e in r.in||e in r.out)||"directed"!==this.type&&e in r.undirected},i.areInboundNeighbors=function(t,e){t=""+t,e=""+e;var r=this._nodes.get(t);if(!r)throw new W('Graph.areInboundNeighbors: could not find the "'.concat(t,'" node in the graph.'));return"undirected"!==this.type&&e in r.in||"directed"!==this.type&&e in r.undirected},i.areOutboundNeighbors=function(t,e){t=""+t,e=""+e;var r=this._nodes.get(t);if(!r)throw new W('Graph.areOutboundNeighbors: could not find the "'.concat(t,'" node in the graph.'));return"undirected"!==this.type&&e in r.out||"directed"!==this.type&&e in r.undirected},i.inDegree=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new W('Graph.inDegree: could not find the "'.concat(t,'" node in the graph.'));return"undirected"===this.type?0:e.inDegree},i.outDegree=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new W('Graph.outDegree: could not find the "'.concat(t,'" node in the graph.'));return"undirected"===this.type?0:e.outDegree},i.directedDegree=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new W('Graph.directedDegree: could not find the "'.concat(t,'" node in the graph.'));return"undirected"===this.type?0:e.inDegree+e.outDegree},i.undirectedDegree=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new W('Graph.undirectedDegree: could not find the "'.concat(t,'" node in the graph.'));return"directed"===this.type?0:e.undirectedDegree},i.inboundDegree=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new W('Graph.inboundDegree: could not find the "'.concat(t,'" node in the graph.'));var r=0;return"directed"!==this.type&&(r+=e.undirectedDegree),"undirected"!==this.type&&(r+=e.inDegree),r},i.outboundDegree=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new W('Graph.outboundDegree: could not find the "'.concat(t,'" node in the graph.'));var r=0;return"directed"!==this.type&&(r+=e.undirectedDegree),"undirected"!==this.type&&(r+=e.outDegree),r},i.degree=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new W('Graph.degree: could not find the "'.concat(t,'" node in the graph.'));var r=0;return"directed"!==this.type&&(r+=e.undirectedDegree),"undirected"!==this.type&&(r+=e.inDegree+e.outDegree),r},i.inDegreeWithoutSelfLoops=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new W('Graph.inDegreeWithoutSelfLoops: could not find the "'.concat(t,'" node in the graph.'));return"undirected"===this.type?0:e.inDegree-e.directedLoops},i.outDegreeWithoutSelfLoops=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new W('Graph.outDegreeWithoutSelfLoops: could not find the "'.concat(t,'" node in the graph.'));return"undirected"===this.type?0:e.outDegree-e.directedLoops},i.directedDegreeWithoutSelfLoops=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new W('Graph.directedDegreeWithoutSelfLoops: could not find the "'.concat(t,'" node in the graph.'));return"undirected"===this.type?0:e.inDegree+e.outDegree-2*e.directedLoops},i.undirectedDegreeWithoutSelfLoops=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new W('Graph.undirectedDegreeWithoutSelfLoops: could not find the "'.concat(t,'" node in the graph.'));return"directed"===this.type?0:e.undirectedDegree-2*e.undirectedLoops},i.inboundDegreeWithoutSelfLoops=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new W('Graph.inboundDegreeWithoutSelfLoops: could not find the "'.concat(t,'" node in the graph.'));var r=0,n=0;return"directed"!==this.type&&(r+=e.undirectedDegree,n+=2*e.undirectedLoops),"undirected"!==this.type&&(r+=e.inDegree,n+=e.directedLoops),r-n},i.outboundDegreeWithoutSelfLoops=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new W('Graph.outboundDegreeWithoutSelfLoops: could not find the "'.concat(t,'" node in the graph.'));var r=0,n=0;return"directed"!==this.type&&(r+=e.undirectedDegree,n+=2*e.undirectedLoops),"undirected"!==this.type&&(r+=e.outDegree,n+=e.directedLoops),r-n},i.degreeWithoutSelfLoops=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new W('Graph.degreeWithoutSelfLoops: could not find the "'.concat(t,'" node in the graph.'));var r=0,n=0;return"directed"!==this.type&&(r+=e.undirectedDegree,n+=2*e.undirectedLoops),"undirected"!==this.type&&(r+=e.inDegree+e.outDegree,n+=2*e.directedLoops),r-n},i.source=function(t){t=""+t;var e=this._edges.get(t);if(!e)throw new W('Graph.source: could not find the "'.concat(t,'" edge in the graph.'));return e.source.key},i.target=function(t){t=""+t;var e=this._edges.get(t);if(!e)throw new W('Graph.target: could not find the "'.concat(t,'" edge in the graph.'));return e.target.key},i.extremities=function(t){t=""+t;var e=this._edges.get(t);if(!e)throw new W('Graph.extremities: could not find the "'.concat(t,'" edge in the graph.'));return[e.source.key,e.target.key]},i.opposite=function(t,e){t=""+t,e=""+e;var r=this._edges.get(e);if(!r)throw new W('Graph.opposite: could not find the "'.concat(e,'" edge in the graph.'));var n=r.source.key,i=r.target.key;if(t===n)return i;if(t===i)return n;throw new W('Graph.opposite: the "'.concat(t,'" node is not attached to the "').concat(e,'" edge (').concat(n,", ").concat(i,")."))},i.hasExtremity=function(t,e){t=""+t,e=""+e;var r=this._edges.get(t);if(!r)throw new W('Graph.hasExtremity: could not find the "'.concat(t,'" edge in the graph.'));return r.source.key===e||r.target.key===e},i.isUndirected=function(t){t=""+t;var e=this._edges.get(t);if(!e)throw new W('Graph.isUndirected: could not find the "'.concat(t,'" edge in the graph.'));return e.undirected},i.isDirected=function(t){t=""+t;var e=this._edges.get(t);if(!e)throw new W('Graph.isDirected: could not find the "'.concat(t,'" edge in the graph.'));return!e.undirected},i.isSelfLoop=function(t){t=""+t;var e=this._edges.get(t);if(!e)throw new W('Graph.isSelfLoop: could not find the "'.concat(t,'" edge in the graph.'));return e.source===e.target},i.addNode=function(t,e){var r=function(t,e,r){if(r&&!h(r))throw new B('Graph.addNode: invalid attributes. Expecting an object but got "'.concat(r,'"'));if(e=""+e,r=r||{},t._nodes.has(e))throw new q('Graph.addNode: the "'.concat(e,'" node already exist in the graph.'));var n=new t.NodeDataClass(e,r);return t._nodes.set(e,n),t.emit("nodeAdded",{key:e,attributes:r}),n}(this,t,e);return r.key},i.mergeNode=function(t,e){if(e&&!h(e))throw new B('Graph.mergeNode: invalid attributes. Expecting an object but got "'.concat(e,'"'));t=""+t,e=e||{};var r=this._nodes.get(t);return r?(e&&(s(r.attributes,e),this.emit("nodeAttributesUpdated",{type:"merge",key:t,attributes:r.attributes,data:e})),[t,!1]):(r=new this.NodeDataClass(t,e),this._nodes.set(t,r),this.emit("nodeAdded",{key:t,attributes:e}),[t,!0])},i.updateNode=function(t,e){if(e&&"function"!=typeof e)throw new B('Graph.updateNode: invalid updater function. Expecting a function but got "'.concat(e,'"'));t=""+t;var r=this._nodes.get(t);if(r){if(e){var n=r.attributes;r.attributes=e(n),this.emit("nodeAttributesUpdated",{type:"replace",key:t,attributes:r.attributes})}return[t,!1]}var i=e?e({}):{};return r=new this.NodeDataClass(t,i),this._nodes.set(t,r),this.emit("nodeAdded",{key:t,attributes:i}),[t,!0]},i.dropNode=function(t){t=""+t;var e,r=this._nodes.get(t);if(!r)throw new W('Graph.dropNode: could not find the "'.concat(t,'" node in the graph.'));if("undirected"!==this.type){for(var n in r.out){e=r.out[n];do{Ft(this,e),e=e.next}while(e)}for(var i in r.in){e=r.in[i];do{Ft(this,e),e=e.next}while(e)}}if("directed"!==this.type)for(var o in r.undirected){e=r.undirected[o];do{Ft(this,e),e=e.next}while(e)}this._nodes.delete(t),this.emit("nodeDropped",{key:t,attributes:r.attributes})},i.dropEdge=function(t){var e;if(arguments.length>1){var r=""+arguments[0],n=""+arguments[1];if(!(e=c(this,r,n,this.type)))throw new W('Graph.dropEdge: could not find the "'.concat(r,'" -> "').concat(n,'" edge in the graph.'))}else if(t=""+t,!(e=this._edges.get(t)))throw new W('Graph.dropEdge: could not find the "'.concat(t,'" edge in the graph.'));return Ft(this,e),this},i.dropDirectedEdge=function(t,e){if(arguments.length<2)throw new q("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 q("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.");var r=c(this,t=""+t,e=""+e,"directed");if(!r)throw new W('Graph.dropDirectedEdge: could not find a "'.concat(t,'" -> "').concat(e,'" edge in the graph.'));return Ft(this,r),this},i.dropUndirectedEdge=function(t,e){if(arguments.length<2)throw new q("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 q("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.");var r=c(this,t,e,"undirected");if(!r)throw new W('Graph.dropUndirectedEdge: could not find a "'.concat(t,'" -> "').concat(e,'" edge in the graph.'));return Ft(this,r),this},i.clear=function(){this._edges.clear(),this._nodes.clear(),this._resetInstanceCounters(),this.emit("cleared")},i.clearEdges=function(){for(var t,e=this._nodes.values();!0!==(t=e.next()).done;)t.value.clear();this._edges.clear(),this._resetInstanceCounters(),this.emit("edgesCleared")},i.getAttribute=function(t){return this._attributes[t]},i.getAttributes=function(){return this._attributes},i.hasAttribute=function(t){return this._attributes.hasOwnProperty(t)},i.setAttribute=function(t,e){return this._attributes[t]=e,this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:t}),this},i.updateAttribute=function(t,e){if("function"!=typeof e)throw new B("Graph.updateAttribute: updater should be a function.");var r=this._attributes[t];return this._attributes[t]=e(r),this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:t}),this},i.removeAttribute=function(t){return delete this._attributes[t],this.emit("attributesUpdated",{type:"remove",attributes:this._attributes,name:t}),this},i.replaceAttributes=function(t){if(!h(t))throw new B("Graph.replaceAttributes: provided attributes are not a plain object.");return this._attributes=t,this.emit("attributesUpdated",{type:"replace",attributes:this._attributes}),this},i.mergeAttributes=function(t){if(!h(t))throw new B("Graph.mergeAttributes: provided attributes are not a plain object.");return s(this._attributes,t),this.emit("attributesUpdated",{type:"merge",attributes:this._attributes,data:t}),this},i.updateAttributes=function(t){if("function"!=typeof t)throw new B("Graph.updateAttributes: provided updater is not a function.");return this._attributes=t(this._attributes),this.emit("attributesUpdated",{type:"update",attributes:this._attributes}),this},i.updateEachNodeAttributes=function(t,e){if("function"!=typeof t)throw new B("Graph.updateEachNodeAttributes: expecting an updater function.");if(e&&!p(e))throw new B("Graph.updateEachNodeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");for(var r,n,i=this._nodes.values();!0!==(r=i.next()).done;)(n=r.value).attributes=t(n.key,n.attributes);this.emit("eachNodeAttributesUpdated",{hints:e||null})},i.updateEachEdgeAttributes=function(t,e){if("function"!=typeof t)throw new B("Graph.updateEachEdgeAttributes: expecting an updater function.");if(e&&!p(e))throw new B("Graph.updateEachEdgeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");for(var r,n,i,o,a=this._edges.values();!0!==(r=a.next()).done;)i=(n=r.value).source,o=n.target,n.attributes=t(n.key,n.attributes,i.key,o.key,i.attributes,o.attributes,n.undirected);this.emit("eachEdgeAttributesUpdated",{hints:e||null})},i.forEachAdjacencyEntry=function(t){if("function"!=typeof t)throw new B("Graph.forEachAdjacencyEntry: expecting a callback.");xt(!1,!1,!1,this,t)},i.forEachAdjacencyEntryWithOrphans=function(t){if("function"!=typeof t)throw new B("Graph.forEachAdjacencyEntryWithOrphans: expecting a callback.");xt(!1,!1,!0,this,t)},i.forEachAssymetricAdjacencyEntry=function(t){if("function"!=typeof t)throw new B("Graph.forEachAssymetricAdjacencyEntry: expecting a callback.");xt(!1,!0,!1,this,t)},i.forEachAssymetricAdjacencyEntryWithOrphans=function(t){if("function"!=typeof t)throw new B("Graph.forEachAssymetricAdjacencyEntryWithOrphans: expecting a callback.");xt(!1,!0,!0,this,t)},i.nodes=function(){return"function"==typeof Array.from?Array.from(this._nodes.keys()):U(this._nodes.keys(),this._nodes.size)},i.forEachNode=function(t){if("function"!=typeof t)throw new B("Graph.forEachNode: expecting a callback.");for(var e,r,n=this._nodes.values();!0!==(e=n.next()).done;)t((r=e.value).key,r.attributes)},i.findNode=function(t){if("function"!=typeof t)throw new B("Graph.findNode: expecting a callback.");for(var e,r,n=this._nodes.values();!0!==(e=n.next()).done;)if(t((r=e.value).key,r.attributes))return r.key},i.mapNodes=function(t){if("function"!=typeof t)throw new B("Graph.mapNode: expecting a callback.");for(var e,r,n=this._nodes.values(),i=new Array(this.order),o=0;!0!==(e=n.next()).done;)r=e.value,i[o++]=t(r.key,r.attributes);return i},i.someNode=function(t){if("function"!=typeof t)throw new B("Graph.someNode: expecting a callback.");for(var e,r,n=this._nodes.values();!0!==(e=n.next()).done;)if(t((r=e.value).key,r.attributes))return!0;return!1},i.everyNode=function(t){if("function"!=typeof t)throw new B("Graph.everyNode: expecting a callback.");for(var e,r,n=this._nodes.values();!0!==(e=n.next()).done;)if(!t((r=e.value).key,r.attributes))return!1;return!0},i.filterNodes=function(t){if("function"!=typeof t)throw new B("Graph.filterNodes: expecting a callback.");for(var e,r,n=this._nodes.values(),i=[];!0!==(e=n.next()).done;)t((r=e.value).key,r.attributes)&&i.push(r.key);return i},i.reduceNodes=function(t,e){if("function"!=typeof t)throw new B("Graph.reduceNodes: expecting a callback.");if(arguments.length<2)throw new B("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.");for(var r,n,i=e,o=this._nodes.values();!0!==(r=o.next()).done;)i=t(i,(n=r.value).key,n.attributes);return i},i.nodeEntries=function(){var t=this._nodes.values();return new G((function(){var e=t.next();if(e.done)return e;var r=e.value;return{value:{node:r.key,attributes:r.attributes},done:!1}}))},i.export=function(){var t=this,e=new Array(this._nodes.size),r=0;this._nodes.forEach((function(t,n){e[r++]=function(t,e){var r={key:t};return l(e.attributes)||(r.attributes=s({},e.attributes)),r}(n,t)}));var n=new Array(this._edges.size);return r=0,this._edges.forEach((function(e,i){n[r++]=function(t,e,r){var n={key:e,source:r.source.key,target:r.target.key};return l(r.attributes)||(n.attributes=s({},r.attributes)),"mixed"===t&&r.undirected&&(n.undirected=!0),n}(t.type,i,e)})),{options:{type:this.type,multi:this.multi,allowSelfLoops:this.allowSelfLoops},attributes:this.getAttributes(),nodes:e,edges:n}},i.import=function(t){var e,r,i,o,a,u=this,s=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t instanceof n)return t.forEachNode((function(t,e){s?u.mergeNode(t,e):u.addNode(t,e)})),t.forEachEdge((function(t,e,r,n,i,o,a){s?a?u.mergeUndirectedEdgeWithKey(t,r,n,e):u.mergeDirectedEdgeWithKey(t,r,n,e):a?u.addUndirectedEdgeWithKey(t,r,n,e):u.addDirectedEdgeWithKey(t,r,n,e)})),this;if(!h(t))throw new B("Graph.import: invalid argument. Expecting a serialized graph or, alternatively, a Graph instance.");if(t.attributes){if(!h(t.attributes))throw new B("Graph.import: invalid attributes. Expecting a plain object.");s?this.mergeAttributes(t.attributes):this.replaceAttributes(t.attributes)}if(t.nodes){if(i=t.nodes,!Array.isArray(i))throw new B("Graph.import: invalid nodes. Expecting an array.");for(e=0,r=i.length;e<r;e++){Et(o=i[e]);var c=o,l=c.key,d=c.attributes;s?this.mergeNode(l,d):this.addNode(l,d)}}if(t.edges){var f=!1;if("undirected"===this.type&&(f=!0),i=t.edges,!Array.isArray(i))throw new B("Graph.import: invalid edges. Expecting an array.");for(e=0,r=i.length;e<r;e++){At(a=i[e]);var p=a,g=p.source,v=p.target,y=p.attributes,m=p.undirected,b=void 0===m?f:m;"key"in a?(s?b?this.mergeUndirectedEdgeWithKey:this.mergeDirectedEdgeWithKey:b?this.addUndirectedEdgeWithKey:this.addDirectedEdgeWithKey).call(this,a.key,g,v,y):(s?b?this.mergeUndirectedEdge:this.mergeDirectedEdge:b?this.addUndirectedEdge:this.addDirectedEdge).call(this,g,v,y)}}return this},i.nullCopy=function(t){var e=new n(s({},this._options,t));return e.replaceAttributes(s({},this.getAttributes())),e},i.emptyCopy=function(t){var e=this.nullCopy(t);return this._nodes.forEach((function(t,r){var n=s({},t.attributes);t=new e.NodeDataClass(r,n),e._nodes.set(r,t)})),e},i.copy=function(t){if("string"==typeof(t=t||{}).type&&t.type!==this.type&&"mixed"!==t.type)throw new q('Graph.copy: cannot create an incompatible copy from "'.concat(this.type,'" type to "').concat(t.type,'" because this would mean losing information about the current graph.'));if("boolean"==typeof t.multi&&t.multi!==this.multi&&!0!==t.multi)throw new q("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("boolean"==typeof t.allowSelfLoops&&t.allowSelfLoops!==this.allowSelfLoops&&!0!==t.allowSelfLoops)throw new q("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.");for(var e,r,n=this.emptyCopy(t),i=this._edges.values();!0!==(e=i.next()).done;)Ot(n,"copy",!1,(r=e.value).undirected,r.key,r.source.key,r.target.key,s({},r.attributes));return n},i.toJSON=function(){return this.export()},i.toString=function(){return"[object Graph]"},i.inspect=function(){var e=this,r={};this._nodes.forEach((function(t,e){r[e]=t.attributes}));var n={},i={};this._edges.forEach((function(t,r){var o,a=t.undirected?"--":"->",u="",s=t.source.key,c=t.target.key;t.undirected&&s>c&&(o=s,s=c,c=o);var h="(".concat(s,")").concat(a,"(").concat(c,")");r.startsWith("geid_")?e.multi&&(void 0===i[h]?i[h]=0:i[h]++,u+="".concat(i[h],". ")):u+="[".concat(r,"]: "),n[u+=h]=t.attributes}));var o={};for(var a in this)this.hasOwnProperty(a)&&!St.has(a)&&"function"!=typeof this[a]&&"symbol"!==t(a)&&(o[a]=this[a]);return o.attributes=this._attributes,o.nodes=r,o.edges=n,d(o,"constructor",this.constructor),o},n}(v.exports.EventEmitter);"undefined"!=typeof Symbol&&(Rt.prototype[Symbol.for("nodejs.util.inspect.custom")]=Rt.prototype.inspect),[{name:function(t){return"".concat(t,"Edge")},generateKey:!0},{name:function(t){return"".concat(t,"DirectedEdge")},generateKey:!0,type:"directed"},{name:function(t){return"".concat(t,"UndirectedEdge")},generateKey:!0,type:"undirected"},{name:function(t){return"".concat(t,"EdgeWithKey")}},{name:function(t){return"".concat(t,"DirectedEdgeWithKey")},type:"directed"},{name:function(t){return"".concat(t,"UndirectedEdgeWithKey")},type:"undirected"}].forEach((function(t){["add","merge","update"].forEach((function(e){var r=t.name(e),n="add"===e?Ot:Gt;t.generateKey?Rt.prototype[r]=function(i,o,a){return n(this,r,!0,"undirected"===(t.type||this.type),null,i,o,a,"update"===e)}:Rt.prototype[r]=function(i,o,a,u){return n(this,r,!1,"undirected"===(t.type||this.type),i,o,a,u,"update"===e)}}))})),function(t){$.forEach((function(e){var r=e.name,n=e.attacher;n(t,r("Node"),0),n(t,r("Source"),1),n(t,r("Target"),2),n(t,r("Opposite"),3)}))}(Rt),function(t){Q.forEach((function(e){var r=e.name,n=e.attacher;n(t,r("Edge"),"mixed"),n(t,r("DirectedEdge"),"directed"),n(t,r("UndirectedEdge"),"undirected")}))}(Rt),function(t){et.forEach((function(e){!function(t,e){var r=e.name,n=e.type,i=e.direction;t.prototype[r]=function(t,e){if("mixed"!==n&&"mixed"!==this.type&&n!==this.type)return[];if(!arguments.length)return st(this,n);if(1===arguments.length){t=""+t;var o=this._nodes.get(t);if(void 0===o)throw new W("Graph.".concat(r,': could not find the "').concat(t,'" node in the graph.'));return dt(this.multi,"mixed"===n?this.type:n,i,o)}if(2===arguments.length){t=""+t,e=""+e;var a=this._nodes.get(t);if(!a)throw new W("Graph.".concat(r,': could not find the "').concat(t,'" source node in the graph.'));if(!this._nodes.has(e))throw new W("Graph.".concat(r,': could not find the "').concat(e,'" target node in the graph.'));return gt(n,this.multi,i,a,e)}throw new B("Graph.".concat(r,": too many arguments (expecting 0, 1 or 2 and got ").concat(arguments.length,")."))}}(t,e),function(t,e){var r=e.name,n=e.type,i=e.direction,o="forEach"+r[0].toUpperCase()+r.slice(1,-1);t.prototype[o]=function(t,e,r){if("mixed"===n||"mixed"===this.type||n===this.type){if(1===arguments.length)return ct(!1,this,n,r=t);if(2===arguments.length){t=""+t,r=e;var a=this._nodes.get(t);if(void 0===a)throw new W("Graph.".concat(o,': could not find the "').concat(t,'" node in the graph.'));return lt(!1,this.multi,"mixed"===n?this.type:n,i,a,r)}if(3===arguments.length){t=""+t,e=""+e;var u=this._nodes.get(t);if(!u)throw new W("Graph.".concat(o,': could not find the "').concat(t,'" source node in the graph.'));if(!this._nodes.has(e))throw new W("Graph.".concat(o,': could not find the "').concat(e,'" target node in the graph.'));return pt(!1,n,this.multi,i,u,e,r)}throw new B("Graph.".concat(o,": too many arguments (expecting 1, 2 or 3 and got ").concat(arguments.length,")."))}};var a="map"+r[0].toUpperCase()+r.slice(1);t.prototype[a]=function(){var t,e=Array.prototype.slice.call(arguments),r=e.pop();if(0===e.length){var i=0;"directed"!==n&&(i+=this.undirectedSize),"undirected"!==n&&(i+=this.directedSize),t=new Array(i);var a=0;e.push((function(e,n,i,o,u,s,c){t[a++]=r(e,n,i,o,u,s,c)}))}else t=[],e.push((function(e,n,i,o,a,u,s){t.push(r(e,n,i,o,a,u,s))}));return this[o].apply(this,e),t};var u="filter"+r[0].toUpperCase()+r.slice(1);t.prototype[u]=function(){var t=Array.prototype.slice.call(arguments),e=t.pop(),r=[];return t.push((function(t,n,i,o,a,u,s){e(t,n,i,o,a,u,s)&&r.push(t)})),this[o].apply(this,t),r};var s="reduce"+r[0].toUpperCase()+r.slice(1);t.prototype[s]=function(){var t,e,r=Array.prototype.slice.call(arguments);if(r.length<2||r.length>4)throw new B("Graph.".concat(s,": invalid number of arguments (expecting 2, 3 or 4 and got ").concat(r.length,")."));if("function"==typeof r[r.length-1]&&"function"!=typeof r[r.length-2])throw new B("Graph.".concat(s,": 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."));2===r.length?(t=r[0],e=r[1],r=[]):3===r.length?(t=r[1],e=r[2],r=[r[0]]):4===r.length&&(t=r[2],e=r[3],r=[r[0],r[1]]);var n=e;return r.push((function(e,r,i,o,a,u,s){n=t(n,e,r,i,o,a,u,s)})),this[o].apply(this,r),n}}(t,e),function(t,e){var r=e.name,n=e.type,i=e.direction,o="find"+r[0].toUpperCase()+r.slice(1,-1);t.prototype[o]=function(t,e,r){if("mixed"!==n&&"mixed"!==this.type&&n!==this.type)return!1;if(1===arguments.length)return ct(!0,this,n,r=t);if(2===arguments.length){t=""+t,r=e;var a=this._nodes.get(t);if(void 0===a)throw new W("Graph.".concat(o,': could not find the "').concat(t,'" node in the graph.'));return lt(!0,this.multi,"mixed"===n?this.type:n,i,a,r)}if(3===arguments.length){t=""+t,e=""+e;var u=this._nodes.get(t);if(!u)throw new W("Graph.".concat(o,': could not find the "').concat(t,'" source node in the graph.'));if(!this._nodes.has(e))throw new W("Graph.".concat(o,': could not find the "').concat(e,'" target node in the graph.'));return pt(!0,n,this.multi,i,u,e,r)}throw new B("Graph.".concat(o,": too many arguments (expecting 1, 2 or 3 and got ").concat(arguments.length,")."))};var a="some"+r[0].toUpperCase()+r.slice(1,-1);t.prototype[a]=function(){var t=Array.prototype.slice.call(arguments),e=t.pop();return t.push((function(t,r,n,i,o,a,u){return e(t,r,n,i,o,a,u)})),!!this[o].apply(this,t)};var u="every"+r[0].toUpperCase()+r.slice(1,-1);t.prototype[u]=function(){var t=Array.prototype.slice.call(arguments),e=t.pop();return t.push((function(t,r,n,i,o,a,u){return!e(t,r,n,i,o,a,u)})),!this[o].apply(this,t)}}(t,e),function(t,e){var r=e.name,n=e.type,i=e.direction,o=r.slice(0,-1)+"Entries";t.prototype[o]=function(t,e){if("mixed"!==n&&"mixed"!==this.type&&n!==this.type)return G.empty();if(!arguments.length)return ht(this,n);if(1===arguments.length){t=""+t;var r=this._nodes.get(t);if(!r)throw new W("Graph.".concat(o,': could not find the "').concat(t,'" node in the graph.'));return ft(n,i,r)}if(2===arguments.length){t=""+t,e=""+e;var a=this._nodes.get(t);if(!a)throw new W("Graph.".concat(o,': could not find the "').concat(t,'" source node in the graph.'));if(!this._nodes.has(e))throw new W("Graph.".concat(o,': could not find the "').concat(e,'" target node in the graph.'));return vt(n,i,a,e)}throw new B("Graph.".concat(o,": too many arguments (expecting 0, 1 or 2 and got ").concat(arguments.length,")."))}}(t,e)}))}(Rt),function(t){yt.forEach((function(e){(function(t,e){var r=e.name,n=e.type,i=e.direction;t.prototype[r]=function(t){if("mixed"!==n&&"mixed"!==this.type&&n!==this.type)return[];t=""+t;var e=this._nodes.get(t);if(void 0===e)throw new W("Graph.".concat(r,': could not find the "').concat(t,'" node in the graph.'));return function(t,e,r){if("mixed"!==t){if("undirected"===t)return Object.keys(r.undirected);if("string"==typeof e)return Object.keys(r[e])}var n=[];return wt(!1,t,e,r,(function(t){n.push(t)})),n}("mixed"===n?this.type:n,i,e)}})(t,e),function(t,e){var r=e.name,n=e.type,i=e.direction,o="forEach"+r[0].toUpperCase()+r.slice(1,-1);t.prototype[o]=function(t,e){if("mixed"===n||"mixed"===this.type||n===this.type){t=""+t;var r=this._nodes.get(t);if(void 0===r)throw new W("Graph.".concat(o,': could not find the "').concat(t,'" node in the graph.'));wt(!1,"mixed"===n?this.type:n,i,r,e)}};var a="map"+r[0].toUpperCase()+r.slice(1);t.prototype[a]=function(t,e){var r=[];return this[o](t,(function(t,n){r.push(e(t,n))})),r};var u="filter"+r[0].toUpperCase()+r.slice(1);t.prototype[u]=function(t,e){var r=[];return this[o](t,(function(t,n){e(t,n)&&r.push(t)})),r};var s="reduce"+r[0].toUpperCase()+r.slice(1);t.prototype[s]=function(t,e,r){if(arguments.length<3)throw new B("Graph.".concat(s,": 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."));var n=r;return this[o](t,(function(t,r){n=e(n,t,r)})),n}}(t,e),function(t,e){var r=e.name,n=e.type,i=e.direction,o=r[0].toUpperCase()+r.slice(1,-1),a="find"+o;t.prototype[a]=function(t,e){if("mixed"===n||"mixed"===this.type||n===this.type){t=""+t;var r=this._nodes.get(t);if(void 0===r)throw new W("Graph.".concat(a,': could not find the "').concat(t,'" node in the graph.'));return wt(!0,"mixed"===n?this.type:n,i,r,e)}};var u="some"+o;t.prototype[u]=function(t,e){return!!this[a](t,e)};var s="every"+o;t.prototype[s]=function(t,e){return!this[a](t,(function(t,r){return!e(t,r)}))}}(t,e),function(t,e){var r=e.name,n=e.type,i=e.direction,o=r.slice(0,-1)+"Entries";t.prototype[o]=function(t){if("mixed"!==n&&"mixed"!==this.type&&n!==this.type)return G.empty();t=""+t;var e=this._nodes.get(t);if(void 0===e)throw new W("Graph.".concat(o,': could not find the "').concat(t,'" node in the graph.'));return function(t,e,r){if("mixed"!==t){if("undirected"===t)return _t(null,r,r.undirected);if("string"==typeof e)return _t(null,r,r[e])}var n=G.empty(),i=new mt;return"undirected"!==t&&("out"!==e&&(n=tt(n,_t(i,r,r.in))),"in"!==e&&(n=tt(n,_t(i,r,r.out)))),"directed"!==t&&(n=tt(n,_t(i,r,r.undirected))),n}("mixed"===n?this.type:n,i,e)}}(t,e)}))}(Rt);var Tt=function(t){function r(e){var r=s({type:"directed"},e);if("multi"in r&&!1!==r.multi)throw new B("DirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if("directed"!==r.type)throw new B('DirectedGraph.from: inconsistent "'+r.type+'" type in given options!');return t.call(this,r)||this}return e(r,t),r}(Rt),Pt=function(t){function r(e){var r=s({type:"undirected"},e);if("multi"in r&&!1!==r.multi)throw new B("UndirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if("undirected"!==r.type)throw new B('UndirectedGraph.from: inconsistent "'+r.type+'" type in given options!');return t.call(this,r)||this}return e(r,t),r}(Rt),Nt=function(t){function r(e){var r=s({multi:!0},e);if("multi"in r&&!0!==r.multi)throw new B("MultiGraph.from: inconsistent indication that the graph should be simple in given options!");return t.call(this,r)||this}return e(r,t),r}(Rt),jt=function(t){function r(e){var r=s({type:"directed",multi:!0},e);if("multi"in r&&!0!==r.multi)throw new B("MultiDirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if("directed"!==r.type)throw new B('MultiDirectedGraph.from: inconsistent "'+r.type+'" type in given options!');return t.call(this,r)||this}return e(r,t),r}(Rt),zt=function(t){function r(e){var r=s({type:"undirected",multi:!0},e);if("multi"in r&&!0!==r.multi)throw new B("MultiUndirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if("undirected"!==r.type)throw new B('MultiUndirectedGraph.from: inconsistent "'+r.type+'" type in given options!');return t.call(this,r)||this}return e(r,t),r}(Rt);function Ut(t){t.from=function(e,r){var n=s({},e.options,r),i=new t(n);return i.import(e),i}}return Ut(Rt),Ut(Tt),Ut(Pt),Ut(Nt),Ut(jt),Ut(zt),Rt.Graph=Rt,Rt.DirectedGraph=Tt,Rt.UndirectedGraph=Pt,Rt.MultiGraph=Nt,Rt.MultiDirectedGraph=jt,Rt.MultiUndirectedGraph=zt,Rt.InvalidArgumentsGraphError=B,Rt.NotFoundGraphError=W,Rt.UsageGraphError=q,Rt}()},76635:function(t,e,r){var n;t=r.nmd(t),function(){var i,o="Expected a function",a="__lodash_hash_undefined__",u="__lodash_placeholder__",s=32,c=128,h=1/0,l=9007199254740991,d=NaN,f=4294967295,p=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",s],["partialRight",64],["rearg",256]],g="[object Arguments]",v="[object Array]",y="[object Boolean]",m="[object Date]",b="[object Error]",w="[object Function]",_="[object GeneratorFunction]",x="[object Map]",E="[object Number]",A="[object Object]",L="[object Promise]",k="[object RegExp]",C="[object Set]",S="[object String]",M="[object Symbol]",D="[object WeakMap]",O="[object ArrayBuffer]",G="[object DataView]",F="[object Float32Array]",R="[object Float64Array]",T="[object Int8Array]",P="[object Int16Array]",N="[object Int32Array]",j="[object Uint8Array]",z="[object Uint8ClampedArray]",U="[object Uint16Array]",I="[object Uint32Array]",B=/\b__p \+= '';/g,W=/\b(__p \+=) '' \+/g,q=/(__e\(.*?\)|\b__t\)) \+\n'';/g,H=/&(?:amp|lt|gt|quot|#39);/g,V=/[&<>"']/g,Z=RegExp(H.source),Y=RegExp(V.source),K=/<%-([\s\S]+?)%>/g,$=/<%([\s\S]+?)%>/g,Q=/<%=([\s\S]+?)%>/g,X=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,J=/^\w*$/,tt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,et=/[\\^$.*+?()[\]{}|]/g,rt=RegExp(et.source),nt=/^\s+|\s+$/g,it=/^\s+/,ot=/\s+$/,at=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ut=/\{\n\/\* \[wrapped with (.+)\] \*/,st=/,? & /,ct=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ht=/\\(\\)?/g,lt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,dt=/\w*$/,ft=/^[-+]0x[0-9a-f]+$/i,pt=/^0b[01]+$/i,gt=/^\[object .+?Constructor\]$/,vt=/^0o[0-7]+$/i,yt=/^(?:0|[1-9]\d*)$/,mt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,bt=/($^)/,wt=/['\n\r\u2028\u2029\\]/g,_t="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",xt="a-z\\xdf-\\xf6\\xf8-\\xff",Et="A-Z\\xc0-\\xd6\\xd8-\\xde",At="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\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",Lt="["+At+"]",kt="["+_t+"]",Ct="\\d+",St="["+xt+"]",Mt="[^\\ud800-\\udfff"+At+Ct+"\\u2700-\\u27bf"+xt+Et+"]",Dt="\\ud83c[\\udffb-\\udfff]",Ot="[^\\ud800-\\udfff]",Gt="(?:\\ud83c[\\udde6-\\uddff]){2}",Ft="[\\ud800-\\udbff][\\udc00-\\udfff]",Rt="["+Et+"]",Tt="(?:"+St+"|"+Mt+")",Pt="(?:"+Rt+"|"+Mt+")",Nt="(?:['’](?:d|ll|m|re|s|t|ve))?",jt="(?:['’](?:D|LL|M|RE|S|T|VE))?",zt="(?:"+kt+"|"+Dt+")?",Ut="[\\ufe0e\\ufe0f]?",It=Ut+zt+"(?:\\u200d(?:"+[Ot,Gt,Ft].join("|")+")"+Ut+zt+")*",Bt="(?:"+["[\\u2700-\\u27bf]",Gt,Ft].join("|")+")"+It,Wt="(?:"+[Ot+kt+"?",kt,Gt,Ft,"[\\ud800-\\udfff]"].join("|")+")",qt=RegExp("['’]","g"),Ht=RegExp(kt,"g"),Vt=RegExp(Dt+"(?="+Dt+")|"+Wt+It,"g"),Zt=RegExp([Rt+"?"+St+"+"+Nt+"(?="+[Lt,Rt,"$"].join("|")+")",Pt+"+"+jt+"(?="+[Lt,Rt+Tt,"$"].join("|")+")",Rt+"?"+Tt+"+"+Nt,Rt+"+"+jt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ct,Bt].join("|"),"g"),Yt=RegExp("[\\u200d\\ud800-\\udfff"+_t+"\\ufe0e\\ufe0f]"),Kt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,$t=["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"],Qt=-1,Xt={};Xt[F]=Xt[R]=Xt[T]=Xt[P]=Xt[N]=Xt[j]=Xt[z]=Xt[U]=Xt[I]=!0,Xt[g]=Xt[v]=Xt[O]=Xt[y]=Xt[G]=Xt[m]=Xt[b]=Xt[w]=Xt[x]=Xt[E]=Xt[A]=Xt[k]=Xt[C]=Xt[S]=Xt[D]=!1;var Jt={};Jt[g]=Jt[v]=Jt[O]=Jt[G]=Jt[y]=Jt[m]=Jt[F]=Jt[R]=Jt[T]=Jt[P]=Jt[N]=Jt[x]=Jt[E]=Jt[A]=Jt[k]=Jt[C]=Jt[S]=Jt[M]=Jt[j]=Jt[z]=Jt[U]=Jt[I]=!0,Jt[b]=Jt[w]=Jt[D]=!1;var te={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ee=parseFloat,re=parseInt,ne="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,ie="object"==typeof self&&self&&self.Object===Object&&self,oe=ne||ie||Function("return this")(),ae=e&&!e.nodeType&&e,ue=ae&&t&&!t.nodeType&&t,se=ue&&ue.exports===ae,ce=se&&ne.process,he=function(){try{return ue&&ue.require&&ue.require("util").types||ce&&ce.binding&&ce.binding("util")}catch(t){}}(),le=he&&he.isArrayBuffer,de=he&&he.isDate,fe=he&&he.isMap,pe=he&&he.isRegExp,ge=he&&he.isSet,ve=he&&he.isTypedArray;function ye(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function me(t,e,r,n){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(n,a,r(a),t)}return n}function be(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t}function we(t,e){for(var r=null==t?0:t.length;r--&&!1!==e(t[r],r,t););return t}function _e(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(!e(t[r],r,t))return!1;return!0}function xe(t,e){for(var r=-1,n=null==t?0:t.length,i=0,o=[];++r<n;){var a=t[r];e(a,r,t)&&(o[i++]=a)}return o}function Ee(t,e){return!(null==t||!t.length)&&Fe(t,e,0)>-1}function Ae(t,e,r){for(var n=-1,i=null==t?0:t.length;++n<i;)if(r(e,t[n]))return!0;return!1}function Le(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}function ke(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}function Ce(t,e,r,n){var i=-1,o=null==t?0:t.length;for(n&&o&&(r=t[++i]);++i<o;)r=e(r,t[i],i,t);return r}function Se(t,e,r,n){var i=null==t?0:t.length;for(n&&i&&(r=t[--i]);i--;)r=e(r,t[i],i,t);return r}function Me(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}var De=Ne("length");function Oe(t,e,r){var n;return r(t,(function(t,r,i){if(e(t,r,i))return n=r,!1})),n}function Ge(t,e,r,n){for(var i=t.length,o=r+(n?1:-1);n?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function Fe(t,e,r){return e==e?function(t,e,r){for(var n=r-1,i=t.length;++n<i;)if(t[n]===e)return n;return-1}(t,e,r):Ge(t,Te,r)}function Re(t,e,r,n){for(var i=r-1,o=t.length;++i<o;)if(n(t[i],e))return i;return-1}function Te(t){return t!=t}function Pe(t,e){var r=null==t?0:t.length;return r?Ue(t,e)/r:d}function Ne(t){return function(e){return null==e?i:e[t]}}function je(t){return function(e){return null==t?i:t[e]}}function ze(t,e,r,n,i){return i(t,(function(t,i,o){r=n?(n=!1,t):e(r,t,i,o)})),r}function Ue(t,e){for(var r,n=-1,o=t.length;++n<o;){var a=e(t[n]);a!==i&&(r=r===i?a:r+a)}return r}function Ie(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}function Be(t){return function(e){return t(e)}}function We(t,e){return Le(e,(function(e){return t[e]}))}function qe(t,e){return t.has(e)}function He(t,e){for(var r=-1,n=t.length;++r<n&&Fe(e,t[r],0)>-1;);return r}function Ve(t,e){for(var r=t.length;r--&&Fe(e,t[r],0)>-1;);return r}function Ze(t,e){for(var r=t.length,n=0;r--;)t[r]===e&&++n;return n}var Ye=je({À:"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"}),Ke=je({"&":"&","<":"<",">":">",'"':""","'":"'"});function $e(t){return"\\"+te[t]}function Qe(t){return Yt.test(t)}function Xe(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r}function Je(t,e){return function(r){return t(e(r))}}function tr(t,e){for(var r=-1,n=t.length,i=0,o=[];++r<n;){var a=t[r];a!==e&&a!==u||(t[r]=u,o[i++]=r)}return o}function er(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}function rr(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=[t,t]})),r}function nr(t){return Qe(t)?function(t){for(var e=Vt.lastIndex=0;Vt.test(t);)++e;return e}(t):De(t)}function ir(t){return Qe(t)?function(t){return t.match(Vt)||[]}(t):function(t){return t.split("")}(t)}var or=je({"&":"&","<":"<",">":">",""":'"',"'":"'"}),ar=function t(e){var r,n=(e=null==e?oe:ar.defaults(oe.Object(),e,ar.pick(oe,$t))).Array,_t=e.Date,xt=e.Error,Et=e.Function,At=e.Math,Lt=e.Object,kt=e.RegExp,Ct=e.String,St=e.TypeError,Mt=n.prototype,Dt=Et.prototype,Ot=Lt.prototype,Gt=e["__core-js_shared__"],Ft=Dt.toString,Rt=Ot.hasOwnProperty,Tt=0,Pt=(r=/[^.]+$/.exec(Gt&&Gt.keys&&Gt.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",Nt=Ot.toString,jt=Ft.call(Lt),zt=oe._,Ut=kt("^"+Ft.call(Rt).replace(et,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),It=se?e.Buffer:i,Bt=e.Symbol,Wt=e.Uint8Array,Vt=It?It.allocUnsafe:i,Yt=Je(Lt.getPrototypeOf,Lt),te=Lt.create,ne=Ot.propertyIsEnumerable,ie=Mt.splice,ae=Bt?Bt.isConcatSpreadable:i,ue=Bt?Bt.iterator:i,ce=Bt?Bt.toStringTag:i,he=function(){try{var t=so(Lt,"defineProperty");return t({},"",{}),t}catch(t){}}(),De=e.clearTimeout!==oe.clearTimeout&&e.clearTimeout,je=_t&&_t.now!==oe.Date.now&&_t.now,ur=e.setTimeout!==oe.setTimeout&&e.setTimeout,sr=At.ceil,cr=At.floor,hr=Lt.getOwnPropertySymbols,lr=It?It.isBuffer:i,dr=e.isFinite,fr=Mt.join,pr=Je(Lt.keys,Lt),gr=At.max,vr=At.min,yr=_t.now,mr=e.parseInt,br=At.random,wr=Mt.reverse,_r=so(e,"DataView"),xr=so(e,"Map"),Er=so(e,"Promise"),Ar=so(e,"Set"),Lr=so(e,"WeakMap"),kr=so(Lt,"create"),Cr=Lr&&new Lr,Sr={},Mr=jo(_r),Dr=jo(xr),Or=jo(Er),Gr=jo(Ar),Fr=jo(Lr),Rr=Bt?Bt.prototype:i,Tr=Rr?Rr.valueOf:i,Pr=Rr?Rr.toString:i;function Nr(t){if(eu(t)&&!qa(t)&&!(t instanceof Ir)){if(t instanceof Ur)return t;if(Rt.call(t,"__wrapped__"))return zo(t)}return new Ur(t)}var jr=function(){function t(){}return function(e){if(!tu(e))return{};if(te)return te(e);t.prototype=e;var r=new t;return t.prototype=i,r}}();function zr(){}function Ur(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=i}function Ir(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=f,this.__views__=[]}function Br(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Wr(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function qr(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Hr(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new qr;++e<r;)this.add(t[e])}function Vr(t){var e=this.__data__=new Wr(t);this.size=e.size}function Zr(t,e){var r=qa(t),n=!r&&Wa(t),i=!r&&!n&&Ya(t),o=!r&&!n&&!i&&cu(t),a=r||n||i||o,u=a?Ie(t.length,Ct):[],s=u.length;for(var c in t)!e&&!Rt.call(t,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||vo(c,s))||u.push(c);return u}function Yr(t){var e=t.length;return e?t[Hn(0,e-1)]:i}function Kr(t,e){return Fo(ki(t),on(e,0,t.length))}function $r(t){return Fo(ki(t))}function Qr(t,e,r){(r!==i&&!Ua(t[e],r)||r===i&&!(e in t))&&rn(t,e,r)}function Xr(t,e,r){var n=t[e];Rt.call(t,e)&&Ua(n,r)&&(r!==i||e in t)||rn(t,e,r)}function Jr(t,e){for(var r=t.length;r--;)if(Ua(t[r][0],e))return r;return-1}function tn(t,e,r,n){return hn(t,(function(t,i,o){e(n,t,r(t),o)})),n}function en(t,e){return t&&Ci(e,Ou(e),t)}function rn(t,e,r){"__proto__"==e&&he?he(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function nn(t,e){for(var r=-1,o=e.length,a=n(o),u=null==t;++r<o;)a[r]=u?i:ku(t,e[r]);return a}function on(t,e,r){return t==t&&(r!==i&&(t=t<=r?t:r),e!==i&&(t=t>=e?t:e)),t}function an(t,e,r,n,o,a){var u,s=1&e,c=2&e,h=4&e;if(r&&(u=o?r(t,n,o,a):r(t)),u!==i)return u;if(!tu(t))return t;var l=qa(t);if(l){if(u=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&Rt.call(t,"index")&&(r.index=t.index,r.input=t.input),r}(t),!s)return ki(t,u)}else{var d=lo(t),f=d==w||d==_;if(Ya(t))return wi(t,s);if(d==A||d==g||f&&!o){if(u=c||f?{}:po(t),!s)return c?function(t,e){return Ci(t,ho(t),e)}(t,function(t,e){return t&&Ci(e,Gu(e),t)}(u,t)):function(t,e){return Ci(t,co(t),e)}(t,en(u,t))}else{if(!Jt[d])return o?t:{};u=function(t,e,r){var n,i=t.constructor;switch(e){case O:return _i(t);case y:case m:return new i(+t);case G:return function(t,e){var r=e?_i(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}(t,r);case F:case R:case T:case P:case N:case j:case z:case U:case I:return xi(t,r);case x:return new i;case E:case S:return new i(t);case k:return function(t){var e=new t.constructor(t.source,dt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case C:return new i;case M:return n=t,Tr?Lt(Tr.call(n)):{}}}(t,d,s)}}a||(a=new Vr);var p=a.get(t);if(p)return p;a.set(t,u),au(t)?t.forEach((function(n){u.add(an(n,e,r,n,t,a))})):ru(t)&&t.forEach((function(n,i){u.set(i,an(n,e,r,i,t,a))}));var v=l?i:(h?c?eo:to:c?Gu:Ou)(t);return be(v||t,(function(n,i){v&&(n=t[i=n]),Xr(u,i,an(n,e,r,i,t,a))})),u}function un(t,e,r){var n=r.length;if(null==t)return!n;for(t=Lt(t);n--;){var o=r[n],a=e[o],u=t[o];if(u===i&&!(o in t)||!a(u))return!1}return!0}function sn(t,e,r){if("function"!=typeof t)throw new St(o);return Mo((function(){t.apply(i,r)}),e)}function cn(t,e,r,n){var i=-1,o=Ee,a=!0,u=t.length,s=[],c=e.length;if(!u)return s;r&&(e=Le(e,Be(r))),n?(o=Ae,a=!1):e.length>=200&&(o=qe,a=!1,e=new Hr(e));t:for(;++i<u;){var h=t[i],l=null==r?h:r(h);if(h=n||0!==h?h:0,a&&l==l){for(var d=c;d--;)if(e[d]===l)continue t;s.push(h)}else o(e,l,n)||s.push(h)}return s}Nr.templateSettings={escape:K,evaluate:$,interpolate:Q,variable:"",imports:{_:Nr}},Nr.prototype=zr.prototype,Nr.prototype.constructor=Nr,Ur.prototype=jr(zr.prototype),Ur.prototype.constructor=Ur,Ir.prototype=jr(zr.prototype),Ir.prototype.constructor=Ir,Br.prototype.clear=function(){this.__data__=kr?kr(null):{},this.size=0},Br.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Br.prototype.get=function(t){var e=this.__data__;if(kr){var r=e[t];return r===a?i:r}return Rt.call(e,t)?e[t]:i},Br.prototype.has=function(t){var e=this.__data__;return kr?e[t]!==i:Rt.call(e,t)},Br.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=kr&&e===i?a:e,this},Wr.prototype.clear=function(){this.__data__=[],this.size=0},Wr.prototype.delete=function(t){var e=this.__data__,r=Jr(e,t);return!(r<0||(r==e.length-1?e.pop():ie.call(e,r,1),--this.size,0))},Wr.prototype.get=function(t){var e=this.__data__,r=Jr(e,t);return r<0?i:e[r][1]},Wr.prototype.has=function(t){return Jr(this.__data__,t)>-1},Wr.prototype.set=function(t,e){var r=this.__data__,n=Jr(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this},qr.prototype.clear=function(){this.size=0,this.__data__={hash:new Br,map:new(xr||Wr),string:new Br}},qr.prototype.delete=function(t){var e=ao(this,t).delete(t);return this.size-=e?1:0,e},qr.prototype.get=function(t){return ao(this,t).get(t)},qr.prototype.has=function(t){return ao(this,t).has(t)},qr.prototype.set=function(t,e){var r=ao(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this},Hr.prototype.add=Hr.prototype.push=function(t){return this.__data__.set(t,a),this},Hr.prototype.has=function(t){return this.__data__.has(t)},Vr.prototype.clear=function(){this.__data__=new Wr,this.size=0},Vr.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},Vr.prototype.get=function(t){return this.__data__.get(t)},Vr.prototype.has=function(t){return this.__data__.has(t)},Vr.prototype.set=function(t,e){var r=this.__data__;if(r instanceof Wr){var n=r.__data__;if(!xr||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new qr(n)}return r.set(t,e),this.size=r.size,this};var hn=Di(mn),ln=Di(bn,!0);function dn(t,e){var r=!0;return hn(t,(function(t,n,i){return r=!!e(t,n,i)})),r}function fn(t,e,r){for(var n=-1,o=t.length;++n<o;){var a=t[n],u=e(a);if(null!=u&&(s===i?u==u&&!su(u):r(u,s)))var s=u,c=a}return c}function pn(t,e){var r=[];return hn(t,(function(t,n,i){e(t,n,i)&&r.push(t)})),r}function gn(t,e,r,n,i){var o=-1,a=t.length;for(r||(r=go),i||(i=[]);++o<a;){var u=t[o];e>0&&r(u)?e>1?gn(u,e-1,r,n,i):ke(i,u):n||(i[i.length]=u)}return i}var vn=Oi(),yn=Oi(!0);function mn(t,e){return t&&vn(t,e,Ou)}function bn(t,e){return t&&yn(t,e,Ou)}function wn(t,e){return xe(e,(function(e){return Qa(t[e])}))}function _n(t,e){for(var r=0,n=(e=vi(e,t)).length;null!=t&&r<n;)t=t[No(e[r++])];return r&&r==n?t:i}function xn(t,e,r){var n=e(t);return qa(t)?n:ke(n,r(t))}function En(t){return null==t?t===i?"[object Undefined]":"[object Null]":ce&&ce in Lt(t)?function(t){var e=Rt.call(t,ce),r=t[ce];try{t[ce]=i;var n=!0}catch(t){}var o=Nt.call(t);return n&&(e?t[ce]=r:delete t[ce]),o}(t):function(t){return Nt.call(t)}(t)}function An(t,e){return t>e}function Ln(t,e){return null!=t&&Rt.call(t,e)}function kn(t,e){return null!=t&&e in Lt(t)}function Cn(t,e,r){for(var o=r?Ae:Ee,a=t[0].length,u=t.length,s=u,c=n(u),h=1/0,l=[];s--;){var d=t[s];s&&e&&(d=Le(d,Be(e))),h=vr(d.length,h),c[s]=!r&&(e||a>=120&&d.length>=120)?new Hr(s&&d):i}d=t[0];var f=-1,p=c[0];t:for(;++f<a&&l.length<h;){var g=d[f],v=e?e(g):g;if(g=r||0!==g?g:0,!(p?qe(p,v):o(l,v,r))){for(s=u;--s;){var y=c[s];if(!(y?qe(y,v):o(t[s],v,r)))continue t}p&&p.push(v),l.push(g)}}return l}function Sn(t,e,r){var n=null==(t=Lo(t,e=vi(e,t)))?t:t[No($o(e))];return null==n?i:ye(n,t,r)}function Mn(t){return eu(t)&&En(t)==g}function Dn(t,e,r,n,o){return t===e||(null==t||null==e||!eu(t)&&!eu(e)?t!=t&&e!=e:function(t,e,r,n,o,a){var u=qa(t),s=qa(e),c=u?v:lo(t),h=s?v:lo(e),l=(c=c==g?A:c)==A,d=(h=h==g?A:h)==A,f=c==h;if(f&&Ya(t)){if(!Ya(e))return!1;u=!0,l=!1}if(f&&!l)return a||(a=new Vr),u||cu(t)?Xi(t,e,r,n,o,a):function(t,e,r,n,i,o,a){switch(r){case G:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case O:return!(t.byteLength!=e.byteLength||!o(new Wt(t),new Wt(e)));case y:case m:case E:return Ua(+t,+e);case b:return t.name==e.name&&t.message==e.message;case k:case S:return t==e+"";case x:var u=Xe;case C:var s=1&n;if(u||(u=er),t.size!=e.size&&!s)return!1;var c=a.get(t);if(c)return c==e;n|=2,a.set(t,e);var h=Xi(u(t),u(e),n,i,o,a);return a.delete(t),h;case M:if(Tr)return Tr.call(t)==Tr.call(e)}return!1}(t,e,c,r,n,o,a);if(!(1&r)){var p=l&&Rt.call(t,"__wrapped__"),w=d&&Rt.call(e,"__wrapped__");if(p||w){var _=p?t.value():t,L=w?e.value():e;return a||(a=new Vr),o(_,L,r,n,a)}}return!!f&&(a||(a=new Vr),function(t,e,r,n,o,a){var u=1&r,s=to(t),c=s.length;if(c!=to(e).length&&!u)return!1;for(var h=c;h--;){var l=s[h];if(!(u?l in e:Rt.call(e,l)))return!1}var d=a.get(t);if(d&&a.get(e))return d==e;var f=!0;a.set(t,e),a.set(e,t);for(var p=u;++h<c;){var g=t[l=s[h]],v=e[l];if(n)var y=u?n(v,g,l,e,t,a):n(g,v,l,t,e,a);if(!(y===i?g===v||o(g,v,r,n,a):y)){f=!1;break}p||(p="constructor"==l)}if(f&&!p){var m=t.constructor,b=e.constructor;m==b||!("constructor"in t)||!("constructor"in e)||"function"==typeof m&&m instanceof m&&"function"==typeof b&&b instanceof b||(f=!1)}return a.delete(t),a.delete(e),f}(t,e,r,n,o,a))}(t,e,r,n,Dn,o))}function On(t,e,r,n){var o=r.length,a=o,u=!n;if(null==t)return!a;for(t=Lt(t);o--;){var s=r[o];if(u&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++o<a;){var c=(s=r[o])[0],h=t[c],l=s[1];if(u&&s[2]){if(h===i&&!(c in t))return!1}else{var d=new Vr;if(n)var f=n(h,l,c,t,e,d);if(!(f===i?Dn(l,h,3,n,d):f))return!1}}return!0}function Gn(t){return!(!tu(t)||(e=t,Pt&&Pt in e))&&(Qa(t)?Ut:gt).test(jo(t));var e}function Fn(t){return"function"==typeof t?t:null==t?ns:"object"==typeof t?qa(t)?jn(t[0],t[1]):Nn(t):ds(t)}function Rn(t){if(!_o(t))return pr(t);var e=[];for(var r in Lt(t))Rt.call(t,r)&&"constructor"!=r&&e.push(r);return e}function Tn(t,e){return t<e}function Pn(t,e){var r=-1,i=Va(t)?n(t.length):[];return hn(t,(function(t,n,o){i[++r]=e(t,n,o)})),i}function Nn(t){var e=uo(t);return 1==e.length&&e[0][2]?Eo(e[0][0],e[0][1]):function(r){return r===t||On(r,t,e)}}function jn(t,e){return mo(t)&&xo(e)?Eo(No(t),e):function(r){var n=ku(r,t);return n===i&&n===e?Cu(r,t):Dn(e,n,3)}}function zn(t,e,r,n,o){t!==e&&vn(e,(function(a,u){if(o||(o=new Vr),tu(a))!function(t,e,r,n,o,a,u){var s=Co(t,r),c=Co(e,r),h=u.get(c);if(h)Qr(t,r,h);else{var l=a?a(s,c,r+"",t,e,u):i,d=l===i;if(d){var f=qa(c),p=!f&&Ya(c),g=!f&&!p&&cu(c);l=c,f||p||g?qa(s)?l=s:Za(s)?l=ki(s):p?(d=!1,l=wi(c,!0)):g?(d=!1,l=xi(c,!0)):l=[]:iu(c)||Wa(c)?(l=s,Wa(s)?l=yu(s):tu(s)&&!Qa(s)||(l=po(c))):d=!1}d&&(u.set(c,l),o(l,c,n,a,u),u.delete(c)),Qr(t,r,l)}}(t,e,u,r,zn,n,o);else{var s=n?n(Co(t,u),a,u+"",t,e,o):i;s===i&&(s=a),Qr(t,u,s)}}),Gu)}function Un(t,e){var r=t.length;if(r)return vo(e+=e<0?r:0,r)?t[e]:i}function In(t,e,r){var n=-1;e=Le(e.length?e:[ns],Be(oo()));var i=Pn(t,(function(t,r,i){var o=Le(e,(function(e){return e(t)}));return{criteria:o,index:++n,value:t}}));return function(t,e){var n=t.length;for(t.sort((function(t,e){return function(t,e,r){for(var n=-1,i=t.criteria,o=e.criteria,a=i.length,u=r.length;++n<a;){var s=Ei(i[n],o[n]);if(s)return n>=u?s:s*("desc"==r[n]?-1:1)}return t.index-e.index}(t,e,r)}));n--;)t[n]=t[n].value;return t}(i)}function Bn(t,e,r){for(var n=-1,i=e.length,o={};++n<i;){var a=e[n],u=_n(t,a);r(u,a)&&$n(o,vi(a,t),u)}return o}function Wn(t,e,r,n){var i=n?Re:Fe,o=-1,a=e.length,u=t;for(t===e&&(e=ki(e)),r&&(u=Le(t,Be(r)));++o<a;)for(var s=0,c=e[o],h=r?r(c):c;(s=i(u,h,s,n))>-1;)u!==t&&ie.call(u,s,1),ie.call(t,s,1);return t}function qn(t,e){for(var r=t?e.length:0,n=r-1;r--;){var i=e[r];if(r==n||i!==o){var o=i;vo(i)?ie.call(t,i,1):si(t,i)}}return t}function Hn(t,e){return t+cr(br()*(e-t+1))}function Vn(t,e){var r="";if(!t||e<1||e>l)return r;do{e%2&&(r+=t),(e=cr(e/2))&&(t+=t)}while(e);return r}function Zn(t,e){return Do(Ao(t,e,ns),t+"")}function Yn(t){return Yr(Uu(t))}function Kn(t,e){var r=Uu(t);return Fo(r,on(e,0,r.length))}function $n(t,e,r,n){if(!tu(t))return t;for(var o=-1,a=(e=vi(e,t)).length,u=a-1,s=t;null!=s&&++o<a;){var c=No(e[o]),h=r;if(o!=u){var l=s[c];(h=n?n(l,c,s):i)===i&&(h=tu(l)?l:vo(e[o+1])?[]:{})}Xr(s,c,h),s=s[c]}return t}var Qn=Cr?function(t,e){return Cr.set(t,e),t}:ns,Xn=he?function(t,e){return he(t,"toString",{configurable:!0,enumerable:!1,value:ts(e),writable:!0})}:ns;function Jn(t){return Fo(Uu(t))}function ti(t,e,r){var i=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(r=r>o?o:r)<0&&(r+=o),o=e>r?0:r-e>>>0,e>>>=0;for(var a=n(o);++i<o;)a[i]=t[i+e];return a}function ei(t,e){var r;return hn(t,(function(t,n,i){return!(r=e(t,n,i))})),!!r}function ri(t,e,r){var n=0,i=null==t?n:t.length;if("number"==typeof e&&e==e&&i<=2147483647){for(;n<i;){var o=n+i>>>1,a=t[o];null!==a&&!su(a)&&(r?a<=e:a<e)?n=o+1:i=o}return i}return ni(t,e,ns,r)}function ni(t,e,r,n){e=r(e);for(var o=0,a=null==t?0:t.length,u=e!=e,s=null===e,c=su(e),h=e===i;o<a;){var l=cr((o+a)/2),d=r(t[l]),f=d!==i,p=null===d,g=d==d,v=su(d);if(u)var y=n||g;else y=h?g&&(n||f):s?g&&f&&(n||!p):c?g&&f&&!p&&(n||!v):!p&&!v&&(n?d<=e:d<e);y?o=l+1:a=l}return vr(a,4294967294)}function ii(t,e){for(var r=-1,n=t.length,i=0,o=[];++r<n;){var a=t[r],u=e?e(a):a;if(!r||!Ua(u,s)){var s=u;o[i++]=0===a?0:a}}return o}function oi(t){return"number"==typeof t?t:su(t)?d:+t}function ai(t){if("string"==typeof t)return t;if(qa(t))return Le(t,ai)+"";if(su(t))return Pr?Pr.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function ui(t,e,r){var n=-1,i=Ee,o=t.length,a=!0,u=[],s=u;if(r)a=!1,i=Ae;else if(o>=200){var c=e?null:Vi(t);if(c)return er(c);a=!1,i=qe,s=new Hr}else s=e?[]:u;t:for(;++n<o;){var h=t[n],l=e?e(h):h;if(h=r||0!==h?h:0,a&&l==l){for(var d=s.length;d--;)if(s[d]===l)continue t;e&&s.push(l),u.push(h)}else i(s,l,r)||(s!==u&&s.push(l),u.push(h))}return u}function si(t,e){return null==(t=Lo(t,e=vi(e,t)))||delete t[No($o(e))]}function ci(t,e,r,n){return $n(t,e,r(_n(t,e)),n)}function hi(t,e,r,n){for(var i=t.length,o=n?i:-1;(n?o--:++o<i)&&e(t[o],o,t););return r?ti(t,n?0:o,n?o+1:i):ti(t,n?o+1:0,n?i:o)}function li(t,e){var r=t;return r instanceof Ir&&(r=r.value()),Ce(e,(function(t,e){return e.func.apply(e.thisArg,ke([t],e.args))}),r)}function di(t,e,r){var i=t.length;if(i<2)return i?ui(t[0]):[];for(var o=-1,a=n(i);++o<i;)for(var u=t[o],s=-1;++s<i;)s!=o&&(a[o]=cn(a[o]||u,t[s],e,r));return ui(gn(a,1),e,r)}function fi(t,e,r){for(var n=-1,o=t.length,a=e.length,u={};++n<o;){var s=n<a?e[n]:i;r(u,t[n],s)}return u}function pi(t){return Za(t)?t:[]}function gi(t){return"function"==typeof t?t:ns}function vi(t,e){return qa(t)?t:mo(t,e)?[t]:Po(mu(t))}var yi=Zn;function mi(t,e,r){var n=t.length;return r=r===i?n:r,!e&&r>=n?t:ti(t,e,r)}var bi=De||function(t){return oe.clearTimeout(t)};function wi(t,e){if(e)return t.slice();var r=t.length,n=Vt?Vt(r):new t.constructor(r);return t.copy(n),n}function _i(t){var e=new t.constructor(t.byteLength);return new Wt(e).set(new Wt(t)),e}function xi(t,e){var r=e?_i(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function Ei(t,e){if(t!==e){var r=t!==i,n=null===t,o=t==t,a=su(t),u=e!==i,s=null===e,c=e==e,h=su(e);if(!s&&!h&&!a&&t>e||a&&u&&c&&!s&&!h||n&&u&&c||!r&&c||!o)return 1;if(!n&&!a&&!h&&t<e||h&&r&&o&&!n&&!a||s&&r&&o||!u&&o||!c)return-1}return 0}function Ai(t,e,r,i){for(var o=-1,a=t.length,u=r.length,s=-1,c=e.length,h=gr(a-u,0),l=n(c+h),d=!i;++s<c;)l[s]=e[s];for(;++o<u;)(d||o<a)&&(l[r[o]]=t[o]);for(;h--;)l[s++]=t[o++];return l}function Li(t,e,r,i){for(var o=-1,a=t.length,u=-1,s=r.length,c=-1,h=e.length,l=gr(a-s,0),d=n(l+h),f=!i;++o<l;)d[o]=t[o];for(var p=o;++c<h;)d[p+c]=e[c];for(;++u<s;)(f||o<a)&&(d[p+r[u]]=t[o++]);return d}function ki(t,e){var r=-1,i=t.length;for(e||(e=n(i));++r<i;)e[r]=t[r];return e}function Ci(t,e,r,n){var o=!r;r||(r={});for(var a=-1,u=e.length;++a<u;){var s=e[a],c=n?n(r[s],t[s],s,r,t):i;c===i&&(c=t[s]),o?rn(r,s,c):Xr(r,s,c)}return r}function Si(t,e){return function(r,n){var i=qa(r)?me:tn,o=e?e():{};return i(r,t,oo(n,2),o)}}function Mi(t){return Zn((function(e,r){var n=-1,o=r.length,a=o>1?r[o-1]:i,u=o>2?r[2]:i;for(a=t.length>3&&"function"==typeof a?(o--,a):i,u&&yo(r[0],r[1],u)&&(a=o<3?i:a,o=1),e=Lt(e);++n<o;){var s=r[n];s&&t(e,s,n,a)}return e}))}function Di(t,e){return function(r,n){if(null==r)return r;if(!Va(r))return t(r,n);for(var i=r.length,o=e?i:-1,a=Lt(r);(e?o--:++o<i)&&!1!==n(a[o],o,a););return r}}function Oi(t){return function(e,r,n){for(var i=-1,o=Lt(e),a=n(e),u=a.length;u--;){var s=a[t?u:++i];if(!1===r(o[s],s,o))break}return e}}function Gi(t){return function(e){var r=Qe(e=mu(e))?ir(e):i,n=r?r[0]:e.charAt(0),o=r?mi(r,1).join(""):e.slice(1);return n[t]()+o}}function Fi(t){return function(e){return Ce(Qu(Wu(e).replace(qt,"")),t,"")}}function Ri(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var r=jr(t.prototype),n=t.apply(r,e);return tu(n)?n:r}}function Ti(t){return function(e,r,n){var o=Lt(e);if(!Va(e)){var a=oo(r,3);e=Ou(e),r=function(t){return a(o[t],t,o)}}var u=t(e,r,n);return u>-1?o[a?e[u]:u]:i}}function Pi(t){return Ji((function(e){var r=e.length,n=r,a=Ur.prototype.thru;for(t&&e.reverse();n--;){var u=e[n];if("function"!=typeof u)throw new St(o);if(a&&!s&&"wrapper"==no(u))var s=new Ur([],!0)}for(n=s?n:r;++n<r;){var c=no(u=e[n]),h="wrapper"==c?ro(u):i;s=h&&bo(h[0])&&424==h[1]&&!h[4].length&&1==h[9]?s[no(h[0])].apply(s,h[3]):1==u.length&&bo(u)?s[c]():s.thru(u)}return function(){var t=arguments,n=t[0];if(s&&1==t.length&&qa(n))return s.plant(n).value();for(var i=0,o=r?e[i].apply(this,t):n;++i<r;)o=e[i].call(this,o);return o}}))}function Ni(t,e,r,o,a,u,s,h,l,d){var f=e&c,p=1&e,g=2&e,v=24&e,y=512&e,m=g?i:Ri(t);return function i(){for(var c=arguments.length,b=n(c),w=c;w--;)b[w]=arguments[w];if(v)var _=io(i),x=Ze(b,_);if(o&&(b=Ai(b,o,a,v)),u&&(b=Li(b,u,s,v)),c-=x,v&&c<d){var E=tr(b,_);return qi(t,e,Ni,i.placeholder,r,b,E,h,l,d-c)}var A=p?r:this,L=g?A[t]:t;return c=b.length,h?b=ko(b,h):y&&c>1&&b.reverse(),f&&l<c&&(b.length=l),this&&this!==oe&&this instanceof i&&(L=m||Ri(L)),L.apply(A,b)}}function ji(t,e){return function(r,n){return function(t,e,r,n){return mn(t,(function(t,i,o){e(n,r(t),i,o)})),n}(r,t,e(n),{})}}function zi(t,e){return function(r,n){var o;if(r===i&&n===i)return e;if(r!==i&&(o=r),n!==i){if(o===i)return n;"string"==typeof r||"string"==typeof n?(r=ai(r),n=ai(n)):(r=oi(r),n=oi(n)),o=t(r,n)}return o}}function Ui(t){return Ji((function(e){return e=Le(e,Be(oo())),Zn((function(r){var n=this;return t(e,(function(t){return ye(t,n,r)}))}))}))}function Ii(t,e){var r=(e=e===i?" ":ai(e)).length;if(r<2)return r?Vn(e,t):e;var n=Vn(e,sr(t/nr(e)));return Qe(e)?mi(ir(n),0,t).join(""):n.slice(0,t)}function Bi(t){return function(e,r,o){return o&&"number"!=typeof o&&yo(e,r,o)&&(r=o=i),e=fu(e),r===i?(r=e,e=0):r=fu(r),function(t,e,r,i){for(var o=-1,a=gr(sr((e-t)/(r||1)),0),u=n(a);a--;)u[i?a:++o]=t,t+=r;return u}(e,r,o=o===i?e<r?1:-1:fu(o),t)}}function Wi(t){return function(e,r){return"string"==typeof e&&"string"==typeof r||(e=vu(e),r=vu(r)),t(e,r)}}function qi(t,e,r,n,o,a,u,c,h,l){var d=8&e;e|=d?s:64,4&(e&=~(d?64:s))||(e&=-4);var f=[t,e,o,d?a:i,d?u:i,d?i:a,d?i:u,c,h,l],p=r.apply(i,f);return bo(t)&&So(p,f),p.placeholder=n,Oo(p,t,e)}function Hi(t){var e=At[t];return function(t,r){if(t=vu(t),(r=null==r?0:vr(pu(r),292))&&dr(t)){var n=(mu(t)+"e").split("e");return+((n=(mu(e(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return e(t)}}var Vi=Ar&&1/er(new Ar([,-0]))[1]==h?function(t){return new Ar(t)}:ss;function Zi(t){return function(e){var r=lo(e);return r==x?Xe(e):r==C?rr(e):function(t,e){return Le(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Yi(t,e,r,a,h,l,d,f){var p=2&e;if(!p&&"function"!=typeof t)throw new St(o);var g=a?a.length:0;if(g||(e&=-97,a=h=i),d=d===i?d:gr(pu(d),0),f=f===i?f:pu(f),g-=h?h.length:0,64&e){var v=a,y=h;a=h=i}var m=p?i:ro(t),b=[t,e,r,a,h,v,y,l,d,f];if(m&&function(t,e){var r=t[1],n=e[1],i=r|n,o=i<131,a=n==c&&8==r||n==c&&256==r&&t[7].length<=e[8]||384==n&&e[7].length<=e[8]&&8==r;if(!o&&!a)return t;1&n&&(t[2]=e[2],i|=1&r?0:4);var s=e[3];if(s){var h=t[3];t[3]=h?Ai(h,s,e[4]):s,t[4]=h?tr(t[3],u):e[4]}(s=e[5])&&(h=t[5],t[5]=h?Li(h,s,e[6]):s,t[6]=h?tr(t[5],u):e[6]),(s=e[7])&&(t[7]=s),n&c&&(t[8]=null==t[8]?e[8]:vr(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i}(b,m),t=b[0],e=b[1],r=b[2],a=b[3],h=b[4],!(f=b[9]=b[9]===i?p?0:t.length:gr(b[9]-g,0))&&24&e&&(e&=-25),e&&1!=e)w=8==e||16==e?function(t,e,r){var o=Ri(t);return function a(){for(var u=arguments.length,s=n(u),c=u,h=io(a);c--;)s[c]=arguments[c];var l=u<3&&s[0]!==h&&s[u-1]!==h?[]:tr(s,h);return(u-=l.length)<r?qi(t,e,Ni,a.placeholder,i,s,l,i,i,r-u):ye(this&&this!==oe&&this instanceof a?o:t,this,s)}}(t,e,f):e!=s&&33!=e||h.length?Ni.apply(i,b):function(t,e,r,i){var o=1&e,a=Ri(t);return function e(){for(var u=-1,s=arguments.length,c=-1,h=i.length,l=n(h+s),d=this&&this!==oe&&this instanceof e?a:t;++c<h;)l[c]=i[c];for(;s--;)l[c++]=arguments[++u];return ye(d,o?r:this,l)}}(t,e,r,a);else var w=function(t,e,r){var n=1&e,i=Ri(t);return function e(){return(this&&this!==oe&&this instanceof e?i:t).apply(n?r:this,arguments)}}(t,e,r);return Oo((m?Qn:So)(w,b),t,e)}function Ki(t,e,r,n){return t===i||Ua(t,Ot[r])&&!Rt.call(n,r)?e:t}function $i(t,e,r,n,o,a){return tu(t)&&tu(e)&&(a.set(e,t),zn(t,e,i,$i,a),a.delete(e)),t}function Qi(t){return iu(t)?i:t}function Xi(t,e,r,n,o,a){var u=1&r,s=t.length,c=e.length;if(s!=c&&!(u&&c>s))return!1;var h=a.get(t);if(h&&a.get(e))return h==e;var l=-1,d=!0,f=2&r?new Hr:i;for(a.set(t,e),a.set(e,t);++l<s;){var p=t[l],g=e[l];if(n)var v=u?n(g,p,l,e,t,a):n(p,g,l,t,e,a);if(v!==i){if(v)continue;d=!1;break}if(f){if(!Me(e,(function(t,e){if(!qe(f,e)&&(p===t||o(p,t,r,n,a)))return f.push(e)}))){d=!1;break}}else if(p!==g&&!o(p,g,r,n,a)){d=!1;break}}return a.delete(t),a.delete(e),d}function Ji(t){return Do(Ao(t,i,Ho),t+"")}function to(t){return xn(t,Ou,co)}function eo(t){return xn(t,Gu,ho)}var ro=Cr?function(t){return Cr.get(t)}:ss;function no(t){for(var e=t.name+"",r=Sr[e],n=Rt.call(Sr,e)?r.length:0;n--;){var i=r[n],o=i.func;if(null==o||o==t)return i.name}return e}function io(t){return(Rt.call(Nr,"placeholder")?Nr:t).placeholder}function oo(){var t=Nr.iteratee||is;return t=t===is?Fn:t,arguments.length?t(arguments[0],arguments[1]):t}function ao(t,e){var r,n,i=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof e?"string":"hash"]:i.map}function uo(t){for(var e=Ou(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,xo(i)]}return e}function so(t,e){var r=function(t,e){return null==t?i:t[e]}(t,e);return Gn(r)?r:i}var co=hr?function(t){return null==t?[]:(t=Lt(t),xe(hr(t),(function(e){return ne.call(t,e)})))}:gs,ho=hr?function(t){for(var e=[];t;)ke(e,co(t)),t=Yt(t);return e}:gs,lo=En;function fo(t,e,r){for(var n=-1,i=(e=vi(e,t)).length,o=!1;++n<i;){var a=No(e[n]);if(!(o=null!=t&&r(t,a)))break;t=t[a]}return o||++n!=i?o:!!(i=null==t?0:t.length)&&Ja(i)&&vo(a,i)&&(qa(t)||Wa(t))}function po(t){return"function"!=typeof t.constructor||_o(t)?{}:jr(Yt(t))}function go(t){return qa(t)||Wa(t)||!!(ae&&t&&t[ae])}function vo(t,e){var r=typeof t;return!!(e=null==e?l:e)&&("number"==r||"symbol"!=r&&yt.test(t))&&t>-1&&t%1==0&&t<e}function yo(t,e,r){if(!tu(r))return!1;var n=typeof e;return!!("number"==n?Va(r)&&vo(e,r.length):"string"==n&&e in r)&&Ua(r[e],t)}function mo(t,e){if(qa(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!su(t))||J.test(t)||!X.test(t)||null!=e&&t in Lt(e)}function bo(t){var e=no(t),r=Nr[e];if("function"!=typeof r||!(e in Ir.prototype))return!1;if(t===r)return!0;var n=ro(r);return!!n&&t===n[0]}(_r&&lo(new _r(new ArrayBuffer(1)))!=G||xr&&lo(new xr)!=x||Er&&lo(Er.resolve())!=L||Ar&&lo(new Ar)!=C||Lr&&lo(new Lr)!=D)&&(lo=function(t){var e=En(t),r=e==A?t.constructor:i,n=r?jo(r):"";if(n)switch(n){case Mr:return G;case Dr:return x;case Or:return L;case Gr:return C;case Fr:return D}return e});var wo=Gt?Qa:vs;function _o(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Ot)}function xo(t){return t==t&&!tu(t)}function Eo(t,e){return function(r){return null!=r&&r[t]===e&&(e!==i||t in Lt(r))}}function Ao(t,e,r){return e=gr(e===i?t.length-1:e,0),function(){for(var i=arguments,o=-1,a=gr(i.length-e,0),u=n(a);++o<a;)u[o]=i[e+o];o=-1;for(var s=n(e+1);++o<e;)s[o]=i[o];return s[e]=r(u),ye(t,this,s)}}function Lo(t,e){return e.length<2?t:_n(t,ti(e,0,-1))}function ko(t,e){for(var r=t.length,n=vr(e.length,r),o=ki(t);n--;){var a=e[n];t[n]=vo(a,r)?o[a]:i}return t}function Co(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var So=Go(Qn),Mo=ur||function(t,e){return oe.setTimeout(t,e)},Do=Go(Xn);function Oo(t,e,r){var n=e+"";return Do(t,function(t,e){var r=e.length;if(!r)return t;var n=r-1;return e[n]=(r>1?"& ":"")+e[n],e=e.join(r>2?", ":" "),t.replace(at,"{\n/* [wrapped with "+e+"] */\n")}(n,function(t,e){return be(p,(function(r){var n="_."+r[0];e&r[1]&&!Ee(t,n)&&t.push(n)})),t.sort()}(function(t){var e=t.match(ut);return e?e[1].split(st):[]}(n),r)))}function Go(t){var e=0,r=0;return function(){var n=yr(),o=16-(n-r);if(r=n,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(i,arguments)}}function Fo(t,e){var r=-1,n=t.length,o=n-1;for(e=e===i?n:e;++r<e;){var a=Hn(r,o),u=t[a];t[a]=t[r],t[r]=u}return t.length=e,t}var Ro,To,Po=(Ro=Ra((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(tt,(function(t,r,n,i){e.push(n?i.replace(ht,"$1"):r||t)})),e}),(function(t){return 500===To.size&&To.clear(),t})),To=Ro.cache,Ro);function No(t){if("string"==typeof t||su(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function jo(t){if(null!=t){try{return Ft.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function zo(t){if(t instanceof Ir)return t.clone();var e=new Ur(t.__wrapped__,t.__chain__);return e.__actions__=ki(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Uo=Zn((function(t,e){return Za(t)?cn(t,gn(e,1,Za,!0)):[]})),Io=Zn((function(t,e){var r=$o(e);return Za(r)&&(r=i),Za(t)?cn(t,gn(e,1,Za,!0),oo(r,2)):[]})),Bo=Zn((function(t,e){var r=$o(e);return Za(r)&&(r=i),Za(t)?cn(t,gn(e,1,Za,!0),i,r):[]}));function Wo(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var i=null==r?0:pu(r);return i<0&&(i=gr(n+i,0)),Ge(t,oo(e,3),i)}function qo(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var o=n-1;return r!==i&&(o=pu(r),o=r<0?gr(n+o,0):vr(o,n-1)),Ge(t,oo(e,3),o,!0)}function Ho(t){return null!=t&&t.length?gn(t,1):[]}function Vo(t){return t&&t.length?t[0]:i}var Zo=Zn((function(t){var e=Le(t,pi);return e.length&&e[0]===t[0]?Cn(e):[]})),Yo=Zn((function(t){var e=$o(t),r=Le(t,pi);return e===$o(r)?e=i:r.pop(),r.length&&r[0]===t[0]?Cn(r,oo(e,2)):[]})),Ko=Zn((function(t){var e=$o(t),r=Le(t,pi);return(e="function"==typeof e?e:i)&&r.pop(),r.length&&r[0]===t[0]?Cn(r,i,e):[]}));function $o(t){var e=null==t?0:t.length;return e?t[e-1]:i}var Qo=Zn(Xo);function Xo(t,e){return t&&t.length&&e&&e.length?Wn(t,e):t}var Jo=Ji((function(t,e){var r=null==t?0:t.length,n=nn(t,e);return qn(t,Le(e,(function(t){return vo(t,r)?+t:t})).sort(Ei)),n}));function ta(t){return null==t?t:wr.call(t)}var ea=Zn((function(t){return ui(gn(t,1,Za,!0))})),ra=Zn((function(t){var e=$o(t);return Za(e)&&(e=i),ui(gn(t,1,Za,!0),oo(e,2))})),na=Zn((function(t){var e=$o(t);return e="function"==typeof e?e:i,ui(gn(t,1,Za,!0),i,e)}));function ia(t){if(!t||!t.length)return[];var e=0;return t=xe(t,(function(t){if(Za(t))return e=gr(t.length,e),!0})),Ie(e,(function(e){return Le(t,Ne(e))}))}function oa(t,e){if(!t||!t.length)return[];var r=ia(t);return null==e?r:Le(r,(function(t){return ye(e,i,t)}))}var aa=Zn((function(t,e){return Za(t)?cn(t,e):[]})),ua=Zn((function(t){return di(xe(t,Za))})),sa=Zn((function(t){var e=$o(t);return Za(e)&&(e=i),di(xe(t,Za),oo(e,2))})),ca=Zn((function(t){var e=$o(t);return e="function"==typeof e?e:i,di(xe(t,Za),i,e)})),ha=Zn(ia),la=Zn((function(t){var e=t.length,r=e>1?t[e-1]:i;return r="function"==typeof r?(t.pop(),r):i,oa(t,r)}));function da(t){var e=Nr(t);return e.__chain__=!0,e}function fa(t,e){return e(t)}var pa=Ji((function(t){var e=t.length,r=e?t[0]:0,n=this.__wrapped__,o=function(e){return nn(e,t)};return!(e>1||this.__actions__.length)&&n instanceof Ir&&vo(r)?((n=n.slice(r,+r+(e?1:0))).__actions__.push({func:fa,args:[o],thisArg:i}),new Ur(n,this.__chain__).thru((function(t){return e&&!t.length&&t.push(i),t}))):this.thru(o)})),ga=Si((function(t,e,r){Rt.call(t,r)?++t[r]:rn(t,r,1)})),va=Ti(Wo),ya=Ti(qo);function ma(t,e){return(qa(t)?be:hn)(t,oo(e,3))}function ba(t,e){return(qa(t)?we:ln)(t,oo(e,3))}var wa=Si((function(t,e,r){Rt.call(t,r)?t[r].push(e):rn(t,r,[e])})),_a=Zn((function(t,e,r){var i=-1,o="function"==typeof e,a=Va(t)?n(t.length):[];return hn(t,(function(t){a[++i]=o?ye(e,t,r):Sn(t,e,r)})),a})),xa=Si((function(t,e,r){rn(t,r,e)}));function Ea(t,e){return(qa(t)?Le:Pn)(t,oo(e,3))}var Aa=Si((function(t,e,r){t[r?0:1].push(e)}),(function(){return[[],[]]})),La=Zn((function(t,e){if(null==t)return[];var r=e.length;return r>1&&yo(t,e[0],e[1])?e=[]:r>2&&yo(e[0],e[1],e[2])&&(e=[e[0]]),In(t,gn(e,1),[])})),ka=je||function(){return oe.Date.now()};function Ca(t,e,r){return e=r?i:e,e=t&&null==e?t.length:e,Yi(t,c,i,i,i,i,e)}function Sa(t,e){var r;if("function"!=typeof e)throw new St(o);return t=pu(t),function(){return--t>0&&(r=e.apply(this,arguments)),t<=1&&(e=i),r}}var Ma=Zn((function(t,e,r){var n=1;if(r.length){var i=tr(r,io(Ma));n|=s}return Yi(t,n,e,r,i)})),Da=Zn((function(t,e,r){var n=3;if(r.length){var i=tr(r,io(Da));n|=s}return Yi(e,n,t,r,i)}));function Oa(t,e,r){var n,a,u,s,c,h,l=0,d=!1,f=!1,p=!0;if("function"!=typeof t)throw new St(o);function g(e){var r=n,o=a;return n=a=i,l=e,s=t.apply(o,r)}function v(t){return l=t,c=Mo(m,e),d?g(t):s}function y(t){var r=t-h;return h===i||r>=e||r<0||f&&t-l>=u}function m(){var t=ka();if(y(t))return b(t);c=Mo(m,function(t){var r=e-(t-h);return f?vr(r,u-(t-l)):r}(t))}function b(t){return c=i,p&&n?g(t):(n=a=i,s)}function w(){var t=ka(),r=y(t);if(n=arguments,a=this,h=t,r){if(c===i)return v(h);if(f)return bi(c),c=Mo(m,e),g(h)}return c===i&&(c=Mo(m,e)),s}return e=vu(e)||0,tu(r)&&(d=!!r.leading,u=(f="maxWait"in r)?gr(vu(r.maxWait)||0,e):u,p="trailing"in r?!!r.trailing:p),w.cancel=function(){c!==i&&bi(c),l=0,n=h=a=c=i},w.flush=function(){return c===i?s:b(ka())},w}var Ga=Zn((function(t,e){return sn(t,1,e)})),Fa=Zn((function(t,e,r){return sn(t,vu(e)||0,r)}));function Ra(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new St(o);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=t.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(Ra.Cache||qr),r}function Ta(t){if("function"!=typeof t)throw new St(o);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Ra.Cache=qr;var Pa=yi((function(t,e){var r=(e=1==e.length&&qa(e[0])?Le(e[0],Be(oo())):Le(gn(e,1),Be(oo()))).length;return Zn((function(n){for(var i=-1,o=vr(n.length,r);++i<o;)n[i]=e[i].call(this,n[i]);return ye(t,this,n)}))})),Na=Zn((function(t,e){var r=tr(e,io(Na));return Yi(t,s,i,e,r)})),ja=Zn((function(t,e){var r=tr(e,io(ja));return Yi(t,64,i,e,r)})),za=Ji((function(t,e){return Yi(t,256,i,i,i,e)}));function Ua(t,e){return t===e||t!=t&&e!=e}var Ia=Wi(An),Ba=Wi((function(t,e){return t>=e})),Wa=Mn(function(){return arguments}())?Mn:function(t){return eu(t)&&Rt.call(t,"callee")&&!ne.call(t,"callee")},qa=n.isArray,Ha=le?Be(le):function(t){return eu(t)&&En(t)==O};function Va(t){return null!=t&&Ja(t.length)&&!Qa(t)}function Za(t){return eu(t)&&Va(t)}var Ya=lr||vs,Ka=de?Be(de):function(t){return eu(t)&&En(t)==m};function $a(t){if(!eu(t))return!1;var e=En(t);return e==b||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!iu(t)}function Qa(t){if(!tu(t))return!1;var e=En(t);return e==w||e==_||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Xa(t){return"number"==typeof t&&t==pu(t)}function Ja(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=l}function tu(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function eu(t){return null!=t&&"object"==typeof t}var ru=fe?Be(fe):function(t){return eu(t)&&lo(t)==x};function nu(t){return"number"==typeof t||eu(t)&&En(t)==E}function iu(t){if(!eu(t)||En(t)!=A)return!1;var e=Yt(t);if(null===e)return!0;var r=Rt.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&Ft.call(r)==jt}var ou=pe?Be(pe):function(t){return eu(t)&&En(t)==k},au=ge?Be(ge):function(t){return eu(t)&&lo(t)==C};function uu(t){return"string"==typeof t||!qa(t)&&eu(t)&&En(t)==S}function su(t){return"symbol"==typeof t||eu(t)&&En(t)==M}var cu=ve?Be(ve):function(t){return eu(t)&&Ja(t.length)&&!!Xt[En(t)]},hu=Wi(Tn),lu=Wi((function(t,e){return t<=e}));function du(t){if(!t)return[];if(Va(t))return uu(t)?ir(t):ki(t);if(ue&&t[ue])return function(t){for(var e,r=[];!(e=t.next()).done;)r.push(e.value);return r}(t[ue]());var e=lo(t);return(e==x?Xe:e==C?er:Uu)(t)}function fu(t){return t?(t=vu(t))===h||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function pu(t){var e=fu(t),r=e%1;return e==e?r?e-r:e:0}function gu(t){return t?on(pu(t),0,f):0}function vu(t){if("number"==typeof t)return t;if(su(t))return d;if(tu(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=tu(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(nt,"");var r=pt.test(t);return r||vt.test(t)?re(t.slice(2),r?2:8):ft.test(t)?d:+t}function yu(t){return Ci(t,Gu(t))}function mu(t){return null==t?"":ai(t)}var bu=Mi((function(t,e){if(_o(e)||Va(e))Ci(e,Ou(e),t);else for(var r in e)Rt.call(e,r)&&Xr(t,r,e[r])})),wu=Mi((function(t,e){Ci(e,Gu(e),t)})),_u=Mi((function(t,e,r,n){Ci(e,Gu(e),t,n)})),xu=Mi((function(t,e,r,n){Ci(e,Ou(e),t,n)})),Eu=Ji(nn),Au=Zn((function(t,e){t=Lt(t);var r=-1,n=e.length,o=n>2?e[2]:i;for(o&&yo(e[0],e[1],o)&&(n=1);++r<n;)for(var a=e[r],u=Gu(a),s=-1,c=u.length;++s<c;){var h=u[s],l=t[h];(l===i||Ua(l,Ot[h])&&!Rt.call(t,h))&&(t[h]=a[h])}return t})),Lu=Zn((function(t){return t.push(i,$i),ye(Ru,i,t)}));function ku(t,e,r){var n=null==t?i:_n(t,e);return n===i?r:n}function Cu(t,e){return null!=t&&fo(t,e,kn)}var Su=ji((function(t,e,r){null!=e&&"function"!=typeof e.toString&&(e=Nt.call(e)),t[e]=r}),ts(ns)),Mu=ji((function(t,e,r){null!=e&&"function"!=typeof e.toString&&(e=Nt.call(e)),Rt.call(t,e)?t[e].push(r):t[e]=[r]}),oo),Du=Zn(Sn);function Ou(t){return Va(t)?Zr(t):Rn(t)}function Gu(t){return Va(t)?Zr(t,!0):function(t){if(!tu(t))return function(t){var e=[];if(null!=t)for(var r in Lt(t))e.push(r);return e}(t);var e=_o(t),r=[];for(var n in t)("constructor"!=n||!e&&Rt.call(t,n))&&r.push(n);return r}(t)}var Fu=Mi((function(t,e,r){zn(t,e,r)})),Ru=Mi((function(t,e,r,n){zn(t,e,r,n)})),Tu=Ji((function(t,e){var r={};if(null==t)return r;var n=!1;e=Le(e,(function(e){return e=vi(e,t),n||(n=e.length>1),e})),Ci(t,eo(t),r),n&&(r=an(r,7,Qi));for(var i=e.length;i--;)si(r,e[i]);return r})),Pu=Ji((function(t,e){return null==t?{}:function(t,e){return Bn(t,e,(function(e,r){return Cu(t,r)}))}(t,e)}));function Nu(t,e){if(null==t)return{};var r=Le(eo(t),(function(t){return[t]}));return e=oo(e),Bn(t,r,(function(t,r){return e(t,r[0])}))}var ju=Zi(Ou),zu=Zi(Gu);function Uu(t){return null==t?[]:We(t,Ou(t))}var Iu=Fi((function(t,e,r){return e=e.toLowerCase(),t+(r?Bu(e):e)}));function Bu(t){return $u(mu(t).toLowerCase())}function Wu(t){return(t=mu(t))&&t.replace(mt,Ye).replace(Ht,"")}var qu=Fi((function(t,e,r){return t+(r?"-":"")+e.toLowerCase()})),Hu=Fi((function(t,e,r){return t+(r?" ":"")+e.toLowerCase()})),Vu=Gi("toLowerCase"),Zu=Fi((function(t,e,r){return t+(r?"_":"")+e.toLowerCase()})),Yu=Fi((function(t,e,r){return t+(r?" ":"")+$u(e)})),Ku=Fi((function(t,e,r){return t+(r?" ":"")+e.toUpperCase()})),$u=Gi("toUpperCase");function Qu(t,e,r){return t=mu(t),(e=r?i:e)===i?function(t){return Kt.test(t)}(t)?function(t){return t.match(Zt)||[]}(t):function(t){return t.match(ct)||[]}(t):t.match(e)||[]}var Xu=Zn((function(t,e){try{return ye(t,i,e)}catch(t){return $a(t)?t:new xt(t)}})),Ju=Ji((function(t,e){return be(e,(function(e){e=No(e),rn(t,e,Ma(t[e],t))})),t}));function ts(t){return function(){return t}}var es=Pi(),rs=Pi(!0);function ns(t){return t}function is(t){return Fn("function"==typeof t?t:an(t,1))}var os=Zn((function(t,e){return function(r){return Sn(r,t,e)}})),as=Zn((function(t,e){return function(r){return Sn(t,r,e)}}));function us(t,e,r){var n=Ou(e),i=wn(e,n);null!=r||tu(e)&&(i.length||!n.length)||(r=e,e=t,t=this,i=wn(e,Ou(e)));var o=!(tu(r)&&"chain"in r&&!r.chain),a=Qa(t);return be(i,(function(r){var n=e[r];t[r]=n,a&&(t.prototype[r]=function(){var e=this.__chain__;if(o||e){var r=t(this.__wrapped__),i=r.__actions__=ki(this.__actions__);return i.push({func:n,args:arguments,thisArg:t}),r.__chain__=e,r}return n.apply(t,ke([this.value()],arguments))})})),t}function ss(){}var cs=Ui(Le),hs=Ui(_e),ls=Ui(Me);function ds(t){return mo(t)?Ne(No(t)):function(t){return function(e){return _n(e,t)}}(t)}var fs=Bi(),ps=Bi(!0);function gs(){return[]}function vs(){return!1}var ys,ms=zi((function(t,e){return t+e}),0),bs=Hi("ceil"),ws=zi((function(t,e){return t/e}),1),_s=Hi("floor"),xs=zi((function(t,e){return t*e}),1),Es=Hi("round"),As=zi((function(t,e){return t-e}),0);return Nr.after=function(t,e){if("function"!=typeof e)throw new St(o);return t=pu(t),function(){if(--t<1)return e.apply(this,arguments)}},Nr.ary=Ca,Nr.assign=bu,Nr.assignIn=wu,Nr.assignInWith=_u,Nr.assignWith=xu,Nr.at=Eu,Nr.before=Sa,Nr.bind=Ma,Nr.bindAll=Ju,Nr.bindKey=Da,Nr.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return qa(t)?t:[t]},Nr.chain=da,Nr.chunk=function(t,e,r){e=(r?yo(t,e,r):e===i)?1:gr(pu(e),0);var o=null==t?0:t.length;if(!o||e<1)return[];for(var a=0,u=0,s=n(sr(o/e));a<o;)s[u++]=ti(t,a,a+=e);return s},Nr.compact=function(t){for(var e=-1,r=null==t?0:t.length,n=0,i=[];++e<r;){var o=t[e];o&&(i[n++]=o)}return i},Nr.concat=function(){var t=arguments.length;if(!t)return[];for(var e=n(t-1),r=arguments[0],i=t;i--;)e[i-1]=arguments[i];return ke(qa(r)?ki(r):[r],gn(e,1))},Nr.cond=function(t){var e=null==t?0:t.length,r=oo();return t=e?Le(t,(function(t){if("function"!=typeof t[1])throw new St(o);return[r(t[0]),t[1]]})):[],Zn((function(r){for(var n=-1;++n<e;){var i=t[n];if(ye(i[0],this,r))return ye(i[1],this,r)}}))},Nr.conforms=function(t){return function(t){var e=Ou(t);return function(r){return un(r,t,e)}}(an(t,1))},Nr.constant=ts,Nr.countBy=ga,Nr.create=function(t,e){var r=jr(t);return null==e?r:en(r,e)},Nr.curry=function t(e,r,n){var o=Yi(e,8,i,i,i,i,i,r=n?i:r);return o.placeholder=t.placeholder,o},Nr.curryRight=function t(e,r,n){var o=Yi(e,16,i,i,i,i,i,r=n?i:r);return o.placeholder=t.placeholder,o},Nr.debounce=Oa,Nr.defaults=Au,Nr.defaultsDeep=Lu,Nr.defer=Ga,Nr.delay=Fa,Nr.difference=Uo,Nr.differenceBy=Io,Nr.differenceWith=Bo,Nr.drop=function(t,e,r){var n=null==t?0:t.length;return n?ti(t,(e=r||e===i?1:pu(e))<0?0:e,n):[]},Nr.dropRight=function(t,e,r){var n=null==t?0:t.length;return n?ti(t,0,(e=n-(e=r||e===i?1:pu(e)))<0?0:e):[]},Nr.dropRightWhile=function(t,e){return t&&t.length?hi(t,oo(e,3),!0,!0):[]},Nr.dropWhile=function(t,e){return t&&t.length?hi(t,oo(e,3),!0):[]},Nr.fill=function(t,e,r,n){var o=null==t?0:t.length;return o?(r&&"number"!=typeof r&&yo(t,e,r)&&(r=0,n=o),function(t,e,r,n){var o=t.length;for((r=pu(r))<0&&(r=-r>o?0:o+r),(n=n===i||n>o?o:pu(n))<0&&(n+=o),n=r>n?0:gu(n);r<n;)t[r++]=e;return t}(t,e,r,n)):[]},Nr.filter=function(t,e){return(qa(t)?xe:pn)(t,oo(e,3))},Nr.flatMap=function(t,e){return gn(Ea(t,e),1)},Nr.flatMapDeep=function(t,e){return gn(Ea(t,e),h)},Nr.flatMapDepth=function(t,e,r){return r=r===i?1:pu(r),gn(Ea(t,e),r)},Nr.flatten=Ho,Nr.flattenDeep=function(t){return null!=t&&t.length?gn(t,h):[]},Nr.flattenDepth=function(t,e){return null!=t&&t.length?gn(t,e=e===i?1:pu(e)):[]},Nr.flip=function(t){return Yi(t,512)},Nr.flow=es,Nr.flowRight=rs,Nr.fromPairs=function(t){for(var e=-1,r=null==t?0:t.length,n={};++e<r;){var i=t[e];n[i[0]]=i[1]}return n},Nr.functions=function(t){return null==t?[]:wn(t,Ou(t))},Nr.functionsIn=function(t){return null==t?[]:wn(t,Gu(t))},Nr.groupBy=wa,Nr.initial=function(t){return null!=t&&t.length?ti(t,0,-1):[]},Nr.intersection=Zo,Nr.intersectionBy=Yo,Nr.intersectionWith=Ko,Nr.invert=Su,Nr.invertBy=Mu,Nr.invokeMap=_a,Nr.iteratee=is,Nr.keyBy=xa,Nr.keys=Ou,Nr.keysIn=Gu,Nr.map=Ea,Nr.mapKeys=function(t,e){var r={};return e=oo(e,3),mn(t,(function(t,n,i){rn(r,e(t,n,i),t)})),r},Nr.mapValues=function(t,e){var r={};return e=oo(e,3),mn(t,(function(t,n,i){rn(r,n,e(t,n,i))})),r},Nr.matches=function(t){return Nn(an(t,1))},Nr.matchesProperty=function(t,e){return jn(t,an(e,1))},Nr.memoize=Ra,Nr.merge=Fu,Nr.mergeWith=Ru,Nr.method=os,Nr.methodOf=as,Nr.mixin=us,Nr.negate=Ta,Nr.nthArg=function(t){return t=pu(t),Zn((function(e){return Un(e,t)}))},Nr.omit=Tu,Nr.omitBy=function(t,e){return Nu(t,Ta(oo(e)))},Nr.once=function(t){return Sa(2,t)},Nr.orderBy=function(t,e,r,n){return null==t?[]:(qa(e)||(e=null==e?[]:[e]),qa(r=n?i:r)||(r=null==r?[]:[r]),In(t,e,r))},Nr.over=cs,Nr.overArgs=Pa,Nr.overEvery=hs,Nr.overSome=ls,Nr.partial=Na,Nr.partialRight=ja,Nr.partition=Aa,Nr.pick=Pu,Nr.pickBy=Nu,Nr.property=ds,Nr.propertyOf=function(t){return function(e){return null==t?i:_n(t,e)}},Nr.pull=Qo,Nr.pullAll=Xo,Nr.pullAllBy=function(t,e,r){return t&&t.length&&e&&e.length?Wn(t,e,oo(r,2)):t},Nr.pullAllWith=function(t,e,r){return t&&t.length&&e&&e.length?Wn(t,e,i,r):t},Nr.pullAt=Jo,Nr.range=fs,Nr.rangeRight=ps,Nr.rearg=za,Nr.reject=function(t,e){return(qa(t)?xe:pn)(t,Ta(oo(e,3)))},Nr.remove=function(t,e){var r=[];if(!t||!t.length)return r;var n=-1,i=[],o=t.length;for(e=oo(e,3);++n<o;){var a=t[n];e(a,n,t)&&(r.push(a),i.push(n))}return qn(t,i),r},Nr.rest=function(t,e){if("function"!=typeof t)throw new St(o);return Zn(t,e=e===i?e:pu(e))},Nr.reverse=ta,Nr.sampleSize=function(t,e,r){return e=(r?yo(t,e,r):e===i)?1:pu(e),(qa(t)?Kr:Kn)(t,e)},Nr.set=function(t,e,r){return null==t?t:$n(t,e,r)},Nr.setWith=function(t,e,r,n){return n="function"==typeof n?n:i,null==t?t:$n(t,e,r,n)},Nr.shuffle=function(t){return(qa(t)?$r:Jn)(t)},Nr.slice=function(t,e,r){var n=null==t?0:t.length;return n?(r&&"number"!=typeof r&&yo(t,e,r)?(e=0,r=n):(e=null==e?0:pu(e),r=r===i?n:pu(r)),ti(t,e,r)):[]},Nr.sortBy=La,Nr.sortedUniq=function(t){return t&&t.length?ii(t):[]},Nr.sortedUniqBy=function(t,e){return t&&t.length?ii(t,oo(e,2)):[]},Nr.split=function(t,e,r){return r&&"number"!=typeof r&&yo(t,e,r)&&(e=r=i),(r=r===i?f:r>>>0)?(t=mu(t))&&("string"==typeof e||null!=e&&!ou(e))&&!(e=ai(e))&&Qe(t)?mi(ir(t),0,r):t.split(e,r):[]},Nr.spread=function(t,e){if("function"!=typeof t)throw new St(o);return e=null==e?0:gr(pu(e),0),Zn((function(r){var n=r[e],i=mi(r,0,e);return n&&ke(i,n),ye(t,this,i)}))},Nr.tail=function(t){var e=null==t?0:t.length;return e?ti(t,1,e):[]},Nr.take=function(t,e,r){return t&&t.length?ti(t,0,(e=r||e===i?1:pu(e))<0?0:e):[]},Nr.takeRight=function(t,e,r){var n=null==t?0:t.length;return n?ti(t,(e=n-(e=r||e===i?1:pu(e)))<0?0:e,n):[]},Nr.takeRightWhile=function(t,e){return t&&t.length?hi(t,oo(e,3),!1,!0):[]},Nr.takeWhile=function(t,e){return t&&t.length?hi(t,oo(e,3)):[]},Nr.tap=function(t,e){return e(t),t},Nr.throttle=function(t,e,r){var n=!0,i=!0;if("function"!=typeof t)throw new St(o);return tu(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),Oa(t,e,{leading:n,maxWait:e,trailing:i})},Nr.thru=fa,Nr.toArray=du,Nr.toPairs=ju,Nr.toPairsIn=zu,Nr.toPath=function(t){return qa(t)?Le(t,No):su(t)?[t]:ki(Po(mu(t)))},Nr.toPlainObject=yu,Nr.transform=function(t,e,r){var n=qa(t),i=n||Ya(t)||cu(t);if(e=oo(e,4),null==r){var o=t&&t.constructor;r=i?n?new o:[]:tu(t)&&Qa(o)?jr(Yt(t)):{}}return(i?be:mn)(t,(function(t,n,i){return e(r,t,n,i)})),r},Nr.unary=function(t){return Ca(t,1)},Nr.union=ea,Nr.unionBy=ra,Nr.unionWith=na,Nr.uniq=function(t){return t&&t.length?ui(t):[]},Nr.uniqBy=function(t,e){return t&&t.length?ui(t,oo(e,2)):[]},Nr.uniqWith=function(t,e){return e="function"==typeof e?e:i,t&&t.length?ui(t,i,e):[]},Nr.unset=function(t,e){return null==t||si(t,e)},Nr.unzip=ia,Nr.unzipWith=oa,Nr.update=function(t,e,r){return null==t?t:ci(t,e,gi(r))},Nr.updateWith=function(t,e,r,n){return n="function"==typeof n?n:i,null==t?t:ci(t,e,gi(r),n)},Nr.values=Uu,Nr.valuesIn=function(t){return null==t?[]:We(t,Gu(t))},Nr.without=aa,Nr.words=Qu,Nr.wrap=function(t,e){return Na(gi(e),t)},Nr.xor=ua,Nr.xorBy=sa,Nr.xorWith=ca,Nr.zip=ha,Nr.zipObject=function(t,e){return fi(t||[],e||[],Xr)},Nr.zipObjectDeep=function(t,e){return fi(t||[],e||[],$n)},Nr.zipWith=la,Nr.entries=ju,Nr.entriesIn=zu,Nr.extend=wu,Nr.extendWith=_u,us(Nr,Nr),Nr.add=ms,Nr.attempt=Xu,Nr.camelCase=Iu,Nr.capitalize=Bu,Nr.ceil=bs,Nr.clamp=function(t,e,r){return r===i&&(r=e,e=i),r!==i&&(r=(r=vu(r))==r?r:0),e!==i&&(e=(e=vu(e))==e?e:0),on(vu(t),e,r)},Nr.clone=function(t){return an(t,4)},Nr.cloneDeep=function(t){return an(t,5)},Nr.cloneDeepWith=function(t,e){return an(t,5,e="function"==typeof e?e:i)},Nr.cloneWith=function(t,e){return an(t,4,e="function"==typeof e?e:i)},Nr.conformsTo=function(t,e){return null==e||un(t,e,Ou(e))},Nr.deburr=Wu,Nr.defaultTo=function(t,e){return null==t||t!=t?e:t},Nr.divide=ws,Nr.endsWith=function(t,e,r){t=mu(t),e=ai(e);var n=t.length,o=r=r===i?n:on(pu(r),0,n);return(r-=e.length)>=0&&t.slice(r,o)==e},Nr.eq=Ua,Nr.escape=function(t){return(t=mu(t))&&Y.test(t)?t.replace(V,Ke):t},Nr.escapeRegExp=function(t){return(t=mu(t))&&rt.test(t)?t.replace(et,"\\$&"):t},Nr.every=function(t,e,r){var n=qa(t)?_e:dn;return r&&yo(t,e,r)&&(e=i),n(t,oo(e,3))},Nr.find=va,Nr.findIndex=Wo,Nr.findKey=function(t,e){return Oe(t,oo(e,3),mn)},Nr.findLast=ya,Nr.findLastIndex=qo,Nr.findLastKey=function(t,e){return Oe(t,oo(e,3),bn)},Nr.floor=_s,Nr.forEach=ma,Nr.forEachRight=ba,Nr.forIn=function(t,e){return null==t?t:vn(t,oo(e,3),Gu)},Nr.forInRight=function(t,e){return null==t?t:yn(t,oo(e,3),Gu)},Nr.forOwn=function(t,e){return t&&mn(t,oo(e,3))},Nr.forOwnRight=function(t,e){return t&&bn(t,oo(e,3))},Nr.get=ku,Nr.gt=Ia,Nr.gte=Ba,Nr.has=function(t,e){return null!=t&&fo(t,e,Ln)},Nr.hasIn=Cu,Nr.head=Vo,Nr.identity=ns,Nr.includes=function(t,e,r,n){t=Va(t)?t:Uu(t),r=r&&!n?pu(r):0;var i=t.length;return r<0&&(r=gr(i+r,0)),uu(t)?r<=i&&t.indexOf(e,r)>-1:!!i&&Fe(t,e,r)>-1},Nr.indexOf=function(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var i=null==r?0:pu(r);return i<0&&(i=gr(n+i,0)),Fe(t,e,i)},Nr.inRange=function(t,e,r){return e=fu(e),r===i?(r=e,e=0):r=fu(r),function(t,e,r){return t>=vr(e,r)&&t<gr(e,r)}(t=vu(t),e,r)},Nr.invoke=Du,Nr.isArguments=Wa,Nr.isArray=qa,Nr.isArrayBuffer=Ha,Nr.isArrayLike=Va,Nr.isArrayLikeObject=Za,Nr.isBoolean=function(t){return!0===t||!1===t||eu(t)&&En(t)==y},Nr.isBuffer=Ya,Nr.isDate=Ka,Nr.isElement=function(t){return eu(t)&&1===t.nodeType&&!iu(t)},Nr.isEmpty=function(t){if(null==t)return!0;if(Va(t)&&(qa(t)||"string"==typeof t||"function"==typeof t.splice||Ya(t)||cu(t)||Wa(t)))return!t.length;var e=lo(t);if(e==x||e==C)return!t.size;if(_o(t))return!Rn(t).length;for(var r in t)if(Rt.call(t,r))return!1;return!0},Nr.isEqual=function(t,e){return Dn(t,e)},Nr.isEqualWith=function(t,e,r){var n=(r="function"==typeof r?r:i)?r(t,e):i;return n===i?Dn(t,e,i,r):!!n},Nr.isError=$a,Nr.isFinite=function(t){return"number"==typeof t&&dr(t)},Nr.isFunction=Qa,Nr.isInteger=Xa,Nr.isLength=Ja,Nr.isMap=ru,Nr.isMatch=function(t,e){return t===e||On(t,e,uo(e))},Nr.isMatchWith=function(t,e,r){return r="function"==typeof r?r:i,On(t,e,uo(e),r)},Nr.isNaN=function(t){return nu(t)&&t!=+t},Nr.isNative=function(t){if(wo(t))throw new xt("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Gn(t)},Nr.isNil=function(t){return null==t},Nr.isNull=function(t){return null===t},Nr.isNumber=nu,Nr.isObject=tu,Nr.isObjectLike=eu,Nr.isPlainObject=iu,Nr.isRegExp=ou,Nr.isSafeInteger=function(t){return Xa(t)&&t>=-9007199254740991&&t<=l},Nr.isSet=au,Nr.isString=uu,Nr.isSymbol=su,Nr.isTypedArray=cu,Nr.isUndefined=function(t){return t===i},Nr.isWeakMap=function(t){return eu(t)&&lo(t)==D},Nr.isWeakSet=function(t){return eu(t)&&"[object WeakSet]"==En(t)},Nr.join=function(t,e){return null==t?"":fr.call(t,e)},Nr.kebabCase=qu,Nr.last=$o,Nr.lastIndexOf=function(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var o=n;return r!==i&&(o=(o=pu(r))<0?gr(n+o,0):vr(o,n-1)),e==e?function(t,e,r){for(var n=r+1;n--;)if(t[n]===e)return n;return n}(t,e,o):Ge(t,Te,o,!0)},Nr.lowerCase=Hu,Nr.lowerFirst=Vu,Nr.lt=hu,Nr.lte=lu,Nr.max=function(t){return t&&t.length?fn(t,ns,An):i},Nr.maxBy=function(t,e){return t&&t.length?fn(t,oo(e,2),An):i},Nr.mean=function(t){return Pe(t,ns)},Nr.meanBy=function(t,e){return Pe(t,oo(e,2))},Nr.min=function(t){return t&&t.length?fn(t,ns,Tn):i},Nr.minBy=function(t,e){return t&&t.length?fn(t,oo(e,2),Tn):i},Nr.stubArray=gs,Nr.stubFalse=vs,Nr.stubObject=function(){return{}},Nr.stubString=function(){return""},Nr.stubTrue=function(){return!0},Nr.multiply=xs,Nr.nth=function(t,e){return t&&t.length?Un(t,pu(e)):i},Nr.noConflict=function(){return oe._===this&&(oe._=zt),this},Nr.noop=ss,Nr.now=ka,Nr.pad=function(t,e,r){t=mu(t);var n=(e=pu(e))?nr(t):0;if(!e||n>=e)return t;var i=(e-n)/2;return Ii(cr(i),r)+t+Ii(sr(i),r)},Nr.padEnd=function(t,e,r){t=mu(t);var n=(e=pu(e))?nr(t):0;return e&&n<e?t+Ii(e-n,r):t},Nr.padStart=function(t,e,r){t=mu(t);var n=(e=pu(e))?nr(t):0;return e&&n<e?Ii(e-n,r)+t:t},Nr.parseInt=function(t,e,r){return r||null==e?e=0:e&&(e=+e),mr(mu(t).replace(it,""),e||0)},Nr.random=function(t,e,r){if(r&&"boolean"!=typeof r&&yo(t,e,r)&&(e=r=i),r===i&&("boolean"==typeof e?(r=e,e=i):"boolean"==typeof t&&(r=t,t=i)),t===i&&e===i?(t=0,e=1):(t=fu(t),e===i?(e=t,t=0):e=fu(e)),t>e){var n=t;t=e,e=n}if(r||t%1||e%1){var o=br();return vr(t+o*(e-t+ee("1e-"+((o+"").length-1))),e)}return Hn(t,e)},Nr.reduce=function(t,e,r){var n=qa(t)?Ce:ze,i=arguments.length<3;return n(t,oo(e,4),r,i,hn)},Nr.reduceRight=function(t,e,r){var n=qa(t)?Se:ze,i=arguments.length<3;return n(t,oo(e,4),r,i,ln)},Nr.repeat=function(t,e,r){return e=(r?yo(t,e,r):e===i)?1:pu(e),Vn(mu(t),e)},Nr.replace=function(){var t=arguments,e=mu(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Nr.result=function(t,e,r){var n=-1,o=(e=vi(e,t)).length;for(o||(o=1,t=i);++n<o;){var a=null==t?i:t[No(e[n])];a===i&&(n=o,a=r),t=Qa(a)?a.call(t):a}return t},Nr.round=Es,Nr.runInContext=t,Nr.sample=function(t){return(qa(t)?Yr:Yn)(t)},Nr.size=function(t){if(null==t)return 0;if(Va(t))return uu(t)?nr(t):t.length;var e=lo(t);return e==x||e==C?t.size:Rn(t).length},Nr.snakeCase=Zu,Nr.some=function(t,e,r){var n=qa(t)?Me:ei;return r&&yo(t,e,r)&&(e=i),n(t,oo(e,3))},Nr.sortedIndex=function(t,e){return ri(t,e)},Nr.sortedIndexBy=function(t,e,r){return ni(t,e,oo(r,2))},Nr.sortedIndexOf=function(t,e){var r=null==t?0:t.length;if(r){var n=ri(t,e);if(n<r&&Ua(t[n],e))return n}return-1},Nr.sortedLastIndex=function(t,e){return ri(t,e,!0)},Nr.sortedLastIndexBy=function(t,e,r){return ni(t,e,oo(r,2),!0)},Nr.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var r=ri(t,e,!0)-1;if(Ua(t[r],e))return r}return-1},Nr.startCase=Yu,Nr.startsWith=function(t,e,r){return t=mu(t),r=null==r?0:on(pu(r),0,t.length),e=ai(e),t.slice(r,r+e.length)==e},Nr.subtract=As,Nr.sum=function(t){return t&&t.length?Ue(t,ns):0},Nr.sumBy=function(t,e){return t&&t.length?Ue(t,oo(e,2)):0},Nr.template=function(t,e,r){var n=Nr.templateSettings;r&&yo(t,e,r)&&(e=i),t=mu(t),e=_u({},e,n,Ki);var o,a,u=_u({},e.imports,n.imports,Ki),s=Ou(u),c=We(u,s),h=0,l=e.interpolate||bt,d="__p += '",f=kt((e.escape||bt).source+"|"+l.source+"|"+(l===Q?lt:bt).source+"|"+(e.evaluate||bt).source+"|$","g"),p="//# sourceURL="+(Rt.call(e,"sourceURL")?(e.sourceURL+"").replace(/[\r\n]/g," "):"lodash.templateSources["+ ++Qt+"]")+"\n";t.replace(f,(function(e,r,n,i,u,s){return n||(n=i),d+=t.slice(h,s).replace(wt,$e),r&&(o=!0,d+="' +\n__e("+r+") +\n'"),u&&(a=!0,d+="';\n"+u+";\n__p += '"),n&&(d+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),h=s+e.length,e})),d+="';\n";var g=Rt.call(e,"variable")&&e.variable;g||(d="with (obj) {\n"+d+"\n}\n"),d=(a?d.replace(B,""):d).replace(W,"$1").replace(q,"$1;"),d="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var v=Xu((function(){return Et(s,p+"return "+d).apply(i,c)}));if(v.source=d,$a(v))throw v;return v},Nr.times=function(t,e){if((t=pu(t))<1||t>l)return[];var r=f,n=vr(t,f);e=oo(e),t-=f;for(var i=Ie(n,e);++r<t;)e(r);return i},Nr.toFinite=fu,Nr.toInteger=pu,Nr.toLength=gu,Nr.toLower=function(t){return mu(t).toLowerCase()},Nr.toNumber=vu,Nr.toSafeInteger=function(t){return t?on(pu(t),-9007199254740991,l):0===t?t:0},Nr.toString=mu,Nr.toUpper=function(t){return mu(t).toUpperCase()},Nr.trim=function(t,e,r){if((t=mu(t))&&(r||e===i))return t.replace(nt,"");if(!t||!(e=ai(e)))return t;var n=ir(t),o=ir(e);return mi(n,He(n,o),Ve(n,o)+1).join("")},Nr.trimEnd=function(t,e,r){if((t=mu(t))&&(r||e===i))return t.replace(ot,"");if(!t||!(e=ai(e)))return t;var n=ir(t);return mi(n,0,Ve(n,ir(e))+1).join("")},Nr.trimStart=function(t,e,r){if((t=mu(t))&&(r||e===i))return t.replace(it,"");if(!t||!(e=ai(e)))return t;var n=ir(t);return mi(n,He(n,ir(e))).join("")},Nr.truncate=function(t,e){var r=30,n="...";if(tu(e)){var o="separator"in e?e.separator:o;r="length"in e?pu(e.length):r,n="omission"in e?ai(e.omission):n}var a=(t=mu(t)).length;if(Qe(t)){var u=ir(t);a=u.length}if(r>=a)return t;var s=r-nr(n);if(s<1)return n;var c=u?mi(u,0,s).join(""):t.slice(0,s);if(o===i)return c+n;if(u&&(s+=c.length-s),ou(o)){if(t.slice(s).search(o)){var h,l=c;for(o.global||(o=kt(o.source,mu(dt.exec(o))+"g")),o.lastIndex=0;h=o.exec(l);)var d=h.index;c=c.slice(0,d===i?s:d)}}else if(t.indexOf(ai(o),s)!=s){var f=c.lastIndexOf(o);f>-1&&(c=c.slice(0,f))}return c+n},Nr.unescape=function(t){return(t=mu(t))&&Z.test(t)?t.replace(H,or):t},Nr.uniqueId=function(t){var e=++Tt;return mu(t)+e},Nr.upperCase=Ku,Nr.upperFirst=$u,Nr.each=ma,Nr.eachRight=ba,Nr.first=Vo,us(Nr,(ys={},mn(Nr,(function(t,e){Rt.call(Nr.prototype,e)||(ys[e]=t)})),ys),{chain:!1}),Nr.VERSION="4.17.15",be(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Nr[t].placeholder=Nr})),be(["drop","take"],(function(t,e){Ir.prototype[t]=function(r){r=r===i?1:gr(pu(r),0);var n=this.__filtered__&&!e?new Ir(this):this.clone();return n.__filtered__?n.__takeCount__=vr(r,n.__takeCount__):n.__views__.push({size:vr(r,f),type:t+(n.__dir__<0?"Right":"")}),n},Ir.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),be(["filter","map","takeWhile"],(function(t,e){var r=e+1,n=1==r||3==r;Ir.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:oo(t,3),type:r}),e.__filtered__=e.__filtered__||n,e}})),be(["head","last"],(function(t,e){var r="take"+(e?"Right":"");Ir.prototype[t]=function(){return this[r](1).value()[0]}})),be(["initial","tail"],(function(t,e){var r="drop"+(e?"":"Right");Ir.prototype[t]=function(){return this.__filtered__?new Ir(this):this[r](1)}})),Ir.prototype.compact=function(){return this.filter(ns)},Ir.prototype.find=function(t){return this.filter(t).head()},Ir.prototype.findLast=function(t){return this.reverse().find(t)},Ir.prototype.invokeMap=Zn((function(t,e){return"function"==typeof t?new Ir(this):this.map((function(r){return Sn(r,t,e)}))})),Ir.prototype.reject=function(t){return this.filter(Ta(oo(t)))},Ir.prototype.slice=function(t,e){t=pu(t);var r=this;return r.__filtered__&&(t>0||e<0)?new Ir(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),e!==i&&(r=(e=pu(e))<0?r.dropRight(-e):r.take(e-t)),r)},Ir.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Ir.prototype.toArray=function(){return this.take(f)},mn(Ir.prototype,(function(t,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),n=/^(?:head|last)$/.test(e),o=Nr[n?"take"+("last"==e?"Right":""):e],a=n||/^find/.test(e);o&&(Nr.prototype[e]=function(){var e=this.__wrapped__,u=n?[1]:arguments,s=e instanceof Ir,c=u[0],h=s||qa(e),l=function(t){var e=o.apply(Nr,ke([t],u));return n&&d?e[0]:e};h&&r&&"function"==typeof c&&1!=c.length&&(s=h=!1);var d=this.__chain__,f=!!this.__actions__.length,p=a&&!d,g=s&&!f;if(!a&&h){e=g?e:new Ir(this);var v=t.apply(e,u);return v.__actions__.push({func:fa,args:[l],thisArg:i}),new Ur(v,d)}return p&&g?t.apply(this,u):(v=this.thru(l),p?n?v.value()[0]:v.value():v)})})),be(["pop","push","shift","sort","splice","unshift"],(function(t){var e=Mt[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",n=/^(?:pop|shift)$/.test(t);Nr.prototype[t]=function(){var t=arguments;if(n&&!this.__chain__){var i=this.value();return e.apply(qa(i)?i:[],t)}return this[r]((function(r){return e.apply(qa(r)?r:[],t)}))}})),mn(Ir.prototype,(function(t,e){var r=Nr[e];if(r){var n=r.name+"";Rt.call(Sr,n)||(Sr[n]=[]),Sr[n].push({name:e,func:r})}})),Sr[Ni(i,2).name]=[{name:"wrapper",func:i}],Ir.prototype.clone=function(){var t=new Ir(this.__wrapped__);return t.__actions__=ki(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=ki(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=ki(this.__views__),t},Ir.prototype.reverse=function(){if(this.__filtered__){var t=new Ir(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Ir.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,r=qa(t),n=e<0,i=r?t.length:0,o=function(t,e,r){for(var n=-1,i=r.length;++n<i;){var o=r[n],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=vr(e,t+a);break;case"takeRight":t=gr(t,e-a)}}return{start:t,end:e}}(0,i,this.__views__),a=o.start,u=o.end,s=u-a,c=n?u:a-1,h=this.__iteratees__,l=h.length,d=0,f=vr(s,this.__takeCount__);if(!r||!n&&i==s&&f==s)return li(t,this.__actions__);var p=[];t:for(;s--&&d<f;){for(var g=-1,v=t[c+=e];++g<l;){var y=h[g],m=y.iteratee,b=y.type,w=m(v);if(2==b)v=w;else if(!w){if(1==b)continue t;break t}}p[d++]=v}return p},Nr.prototype.at=pa,Nr.prototype.chain=function(){return da(this)},Nr.prototype.commit=function(){return new Ur(this.value(),this.__chain__)},Nr.prototype.next=function(){this.__values__===i&&(this.__values__=du(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?i:this.__values__[this.__index__++]}},Nr.prototype.plant=function(t){for(var e,r=this;r instanceof zr;){var n=zo(r);n.__index__=0,n.__values__=i,e?o.__wrapped__=n:e=n;var o=n;r=r.__wrapped__}return o.__wrapped__=t,e},Nr.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Ir){var e=t;return this.__actions__.length&&(e=new Ir(this)),(e=e.reverse()).__actions__.push({func:fa,args:[ta],thisArg:i}),new Ur(e,this.__chain__)}return this.thru(ta)},Nr.prototype.toJSON=Nr.prototype.valueOf=Nr.prototype.value=function(){return li(this.__wrapped__,this.__actions__)},Nr.prototype.first=Nr.prototype.head,ue&&(Nr.prototype[ue]=function(){return this}),Nr}();oe._=ar,(n=function(){return ar}.call(e,r,e,t))===i||(t.exports=n)}.call(this)},64231:(t,e,r)=>{var n=r(32528),i=r(50535),o=r(3535),a=i.DEFAULT_COMPARATOR,u=i.reverseComparator;function s(t,e,r,n){for(var i,o,a=e[n];n>r&&t(a,o=e[i=n-1>>1])<0;)e[n]=o,n=i;e[n]=a}function c(t,e,r){for(var n,i=e.length,o=r,a=e[r],u=2*r+1;u<i;)(n=u+1)<i&&t(e[u],e[n])>=0&&(u=n),e[r]=e[u],u=2*(r=u)+1;e[r]=a,s(t,e,o,r)}function h(t,e,r){e.push(r),s(t,e,0,e.length-1)}function l(t,e){var r=e.pop();if(0!==e.length){var n=e[0];return e[0]=r,c(t,e,0),n}return r}function d(t,e,r){if(0===e.length)throw new Error("mnemonist/heap.replace: cannot pop an empty heap.");var n=e[0];return e[0]=r,c(t,e,0),n}function f(t,e,r){var n;return 0!==e.length&&t(e[0],r)<0&&(n=e[0],e[0]=r,r=n,c(t,e,0)),r}function p(t,e){for(var r=e.length>>1;--r>=0;)c(t,e,r)}function g(t,e){for(var r=e.length,n=0,i=new Array(r);n<r;)i[n++]=l(t,e);return i}function v(t){if(this.clear(),this.comparator=t||a,"function"!=typeof this.comparator)throw new Error("mnemonist/Heap.constructor: given comparator should be a function.")}function y(t){if(this.clear(),this.comparator=t||a,"function"!=typeof this.comparator)throw new Error("mnemonist/MaxHeap.constructor: given comparator should be a function.");this.comparator=u(this.comparator)}v.prototype.clear=function(){this.items=[],this.size=0},v.prototype.push=function(t){return h(this.comparator,this.items,t),++this.size},v.prototype.peek=function(){return this.items[0]},v.prototype.pop=function(){return 0!==this.size&&this.size--,l(this.comparator,this.items)},v.prototype.replace=function(t){return d(this.comparator,this.items,t)},v.prototype.pushpop=function(t){return f(this.comparator,this.items,t)},v.prototype.consume=function(){return this.size=0,g(this.comparator,this.items)},v.prototype.toArray=function(){return g(this.comparator,this.items.slice())},v.prototype.inspect=function(){var t=this.toArray();return Object.defineProperty(t,"constructor",{value:v,enumerable:!1}),t},"undefined"!=typeof Symbol&&(v.prototype[Symbol.for("nodejs.util.inspect.custom")]=v.prototype.inspect),y.prototype=v.prototype,v.from=function(t,e){var r,n=new v(e);return r=o.isArrayLike(t)?t.slice():o.toArray(t),p(n.comparator,r),n.items=r,n.size=r.length,n},y.from=function(t,e){var r,n=new y(e);return r=o.isArrayLike(t)?t.slice():o.toArray(t),p(n.comparator,r),n.items=r,n.size=r.length,n},v.siftUp=c,v.siftDown=s,v.push=h,v.pop=l,v.replace=d,v.pushpop=f,v.heapify=p,v.consume=g,v.nsmallest=function(t,e,r){2===arguments.length&&(r=e,e=t,t=a);var i,s,c,h,l=u(t),f=1/0;if(1===e){if(o.isArrayLike(r)){for(i=0,s=r.length;i<s;i++)c=r[i],(f===1/0||t(c,f)<0)&&(f=c);return(h=new r.constructor(1))[0]=f,h}return n(r,(function(e){(f===1/0||t(e,f)<0)&&(f=e)})),[f]}if(o.isArrayLike(r)){if(e>=r.length)return r.slice().sort(t);for(h=r.slice(0,e),p(l,h),i=e,s=r.length;i<s;i++)l(r[i],h[0])>0&&d(l,h,r[i]);return h.sort(t)}var g=o.guessLength(r);return null!==g&&g<e&&(e=g),h=new Array(e),i=0,n(r,(function(t){i<e?h[i]=t:(i===e&&p(l,h),l(t,h[0])>0&&d(l,h,t)),i++})),h.length>i&&(h.length=i),h.sort(t)},v.nlargest=function(t,e,r){2===arguments.length&&(r=e,e=t,t=a);var i,s,c,h,l=u(t),f=-1/0;if(1===e){if(o.isArrayLike(r)){for(i=0,s=r.length;i<s;i++)c=r[i],(f===-1/0||t(c,f)>0)&&(f=c);return(h=new r.constructor(1))[0]=f,h}return n(r,(function(e){(f===-1/0||t(e,f)>0)&&(f=e)})),[f]}if(o.isArrayLike(r)){if(e>=r.length)return r.slice().sort(l);for(h=r.slice(0,e),p(t,h),i=e,s=r.length;i<s;i++)t(r[i],h[0])>0&&d(t,h,r[i]);return h.sort(l)}var g=o.guessLength(r);return null!==g&&g<e&&(e=g),h=new Array(e),i=0,n(r,(function(r){i<e?h[i]=r:(i===e&&p(t,h),t(r,h[0])>0&&d(t,h,r)),i++})),h.length>i&&(h.length=i),h.sort(l)},v.MinHeap=v,v.MaxHeap=y,t.exports=v},4034:(t,e,r)=>{var n=r(68298),i=r(32528);function o(){this.clear()}o.prototype.clear=function(){this.items=[],this.offset=0,this.size=0},o.prototype.enqueue=function(t){return this.items.push(t),++this.size},o.prototype.dequeue=function(){if(this.size){var t=this.items[this.offset];return 2*++this.offset>=this.items.length&&(this.items=this.items.slice(this.offset),this.offset=0),this.size--,t}},o.prototype.peek=function(){if(this.size)return this.items[this.offset]},o.prototype.forEach=function(t,e){e=arguments.length>1?e:this;for(var r=this.offset,n=0,i=this.items.length;r<i;r++,n++)t.call(e,this.items[r],n,this)},o.prototype.toArray=function(){return this.items.slice(this.offset)},o.prototype.values=function(){var t=this.items,e=this.offset;return new n((function(){if(e>=t.length)return{done:!0};var r=t[e];return e++,{value:r,done:!1}}))},o.prototype.entries=function(){var t=this.items,e=this.offset,r=0;return new n((function(){if(e>=t.length)return{done:!0};var n=t[e];return e++,{value:[r++,n],done:!1}}))},"undefined"!=typeof Symbol&&(o.prototype[Symbol.iterator]=o.prototype.values),o.prototype.toString=function(){return this.toArray().join(",")},o.prototype.toJSON=function(){return this.toArray()},o.prototype.inspect=function(){var t=this.toArray();return Object.defineProperty(t,"constructor",{value:o,enumerable:!1}),t},"undefined"!=typeof Symbol&&(o.prototype[Symbol.for("nodejs.util.inspect.custom")]=o.prototype.inspect),o.from=function(t){var e=new o;return i(t,(function(t){e.enqueue(t)})),e},o.of=function(){return o.from(arguments)},t.exports=o},50535:(t,e)=>{e.DEFAULT_COMPARATOR=function(t,e){return t<e?-1:t>e?1:0},e.DEFAULT_REVERSE_COMPARATOR=function(t,e){return t<e?1:t>e?-1:0},e.reverseComparator=function(t){return function(e,r){return t(r,e)}},e.createTupleComparator=function(t){return 2===t?function(t,e){return t[0]<e[0]?-1:t[0]>e[0]?1:t[1]<e[1]?-1:t[1]>e[1]?1:0}:function(e,r){for(var n=0;n<t;){if(e[n]<r[n])return-1;if(e[n]>r[n])return 1;n++}return 0}}},3535:(t,e,r)=>{var n=r(32528),i=r(6023);function o(t){return"number"==typeof t.length?t.length:"number"==typeof t.size?t.size:void 0}e.isArrayLike=function(t){return Array.isArray(t)||i.isTypedArray(t)},e.guessLength=o,e.toArray=function(t){var e=o(t),r="number"==typeof e?new Array(e):[],i=0;return n(t,(function(t){r[i++]=t})),r},e.toArrayWithIndices=function(t){var e=o(t),r="number"==typeof e?i.getPointerArray(e):Array,a="number"==typeof e?new Array(e):[],u="number"==typeof e?new r(e):[],s=0;return n(t,(function(t){a[s]=t,u[s]=s++})),[a,u]}},6023:(t,e)=>{var r=Math.pow(2,8)-1,n=Math.pow(2,16)-1,i=Math.pow(2,32)-1,o=Math.pow(2,7)-1,a=Math.pow(2,15)-1,u=Math.pow(2,31)-1;e.getPointerArray=function(t){var e=t-1;if(e<=r)return Uint8Array;if(e<=n)return Uint16Array;if(e<=i)return Uint32Array;throw new Error("mnemonist: Pointer Array of size > 4294967295 is not supported.")},e.getSignedPointerArray=function(t){var e=t-1;return e<=o?Int8Array:e<=a?Int16Array:e<=u?Int32Array:Float64Array},e.getNumberType=function(t){return t===(0|t)?-1===Math.sign(t)?t<=127&&t>=-128?Int8Array:t<=32767&&t>=-32768?Int16Array:Int32Array:t<=255?Uint8Array:t<=65535?Uint16Array:Uint32Array:Float64Array};var s={Uint8Array:1,Int8Array:2,Uint16Array:3,Int16Array:4,Uint32Array:5,Int32Array:6,Float32Array:7,Float64Array:8};e.getMinimalRepresentation=function(t,r){var n,i,o,a,u,c=null,h=0;for(a=0,u=t.length;a<u;a++)o=r?r(t[a]):t[a],i=e.getNumberType(o),(n=s[i.name])>h&&(h=n,c=i);return c},e.isTypedArray=function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView(t)},e.concat=function(){var t,e,r,n=0;for(t=0,r=arguments.length;t<r;t++)n+=arguments[t].length;var i=new arguments[0].constructor(n);for(t=0,e=0;t<r;t++)i.set(arguments[t],e),e+=arguments[t].length;return i},e.indices=function(t){for(var r=new(e.getPointerArray(t))(t),n=0;n<t;n++)r[n]=n;return r}},32528:(t,e,r)=>{var n=r(24529),i=n.ARRAY_BUFFER_SUPPORT,o=n.SYMBOL_SUPPORT;t.exports=function(t,e){var r,n,a,u,s;if(!t)throw new Error("obliterator/forEach: invalid iterable.");if("function"!=typeof e)throw new Error("obliterator/forEach: expecting a callback.");if(Array.isArray(t)||i&&ArrayBuffer.isView(t)||"string"==typeof t||"[object Arguments]"===t.toString())for(a=0,u=t.length;a<u;a++)e(t[a],a);else if("function"!=typeof t.forEach)if(o&&Symbol.iterator in t&&"function"!=typeof t.next&&(t=t[Symbol.iterator]()),"function"!=typeof t.next)for(n in t)t.hasOwnProperty(n)&&e(t[n],n);else for(r=t,a=0;!0!==(s=r.next()).done;)e(s.value,a),a++;else t.forEach(e)}},68298:t=>{function e(t){if("function"!=typeof t)throw new Error("obliterator/iterator: expecting a function!");this.next=t}"undefined"!=typeof Symbol&&(e.prototype[Symbol.iterator]=function(){return this}),e.of=function(){var t=arguments,r=t.length,n=0;return new e((function(){return n>=r?{done:!0}:{done:!1,value:t[n++]}}))},e.empty=function(){return new e((function(){return{done:!0}}))},e.fromSequence=function(t){var r=0,n=t.length;return new e((function(){return r>=n?{done:!0}:{done:!1,value:t[r++]}}))},e.is=function(t){return t instanceof e||"object"==typeof t&&null!==t&&"function"==typeof t.next},t.exports=e},24529:(t,e)=>{e.ARRAY_BUFFER_SUPPORT="undefined"!=typeof ArrayBuffer,e.SYMBOL_SUPPORT="undefined"!=typeof Symbol},94835:t=>{function e(t){return function(e,r){return e+Math.floor(t()*(r-e+1))}}var r=e(Math.random);r.createRandom=e,t.exports=r},64341:(t,e,r)=>{var n=r(94835).createRandom;function i(t){var e=n(t);return function(t){for(var r=t.length,n=r-1,i=-1;++i<r;){var o=e(i,n),a=t[o];t[o]=t[i],t[i]=a}}}var o=i(Math.random);o.createShuffleInPlace=i,t.exports=o},31250:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=r(31181),u=o(r(2383)),s=r(88586),c=r(30432),h=1.5,l=function(t){function e(){var e=t.call(this)||this;return e.x=.5,e.y=.5,e.angle=0,e.ratio=1,e.minRatio=null,e.maxRatio=null,e.nextFrame=null,e.previousState=null,e.enabled=!0,e.previousState=e.getState(),e}return i(e,t),e.from=function(t){return(new e).setState(t)},e.prototype.enable=function(){return this.enabled=!0,this},e.prototype.disable=function(){return this.enabled=!1,this},e.prototype.getState=function(){return{x:this.x,y:this.y,angle:this.angle,ratio:this.ratio}},e.prototype.hasState=function(t){return this.x===t.x&&this.y===t.y&&this.ratio===t.ratio&&this.angle===t.angle},e.prototype.getPreviousState=function(){var t=this.previousState;return t?{x:t.x,y:t.y,angle:t.angle,ratio:t.ratio}:null},e.prototype.getBoundedRatio=function(t){var e=t;return"number"==typeof this.minRatio&&(e=Math.max(e,this.minRatio)),"number"==typeof this.maxRatio&&(e=Math.min(e,this.maxRatio)),e},e.prototype.validateState=function(t){var e={};return"number"==typeof t.x&&(e.x=t.x),"number"==typeof t.y&&(e.y=t.y),"number"==typeof t.angle&&(e.angle=t.angle),"number"==typeof t.ratio&&(e.ratio=this.getBoundedRatio(t.ratio)),e},e.prototype.isAnimated=function(){return!!this.nextFrame},e.prototype.setState=function(t){if(!this.enabled)return this;this.previousState=this.getState();var e=this.validateState(t);return"number"==typeof e.x&&(this.x=e.x),"number"==typeof e.y&&(this.y=e.y),"number"==typeof e.angle&&(this.angle=e.angle),"number"==typeof e.ratio&&(this.ratio=e.ratio),this.hasState(this.previousState)||this.emit("updated",this.getState()),this},e.prototype.updateState=function(t){return this.setState(t(this.getState())),this},e.prototype.animate=function(t,e,r){var n=this;if(this.enabled){var i=Object.assign({},a.ANIMATE_DEFAULTS,e),o=this.validateState(t),c="function"==typeof i.easing?i.easing:u.default[i.easing],h=Date.now(),l=this.getState(),d=function(){var t=(Date.now()-h)/i.duration;if(t>=1)return n.nextFrame=null,n.setState(o),void(n.animationCallback&&(n.animationCallback.call(null),n.animationCallback=void 0));var e=c(t),r={};"number"==typeof o.x&&(r.x=l.x+(o.x-l.x)*e),"number"==typeof o.y&&(r.y=l.y+(o.y-l.y)*e),"number"==typeof o.angle&&(r.angle=l.angle+(o.angle-l.angle)*e),"number"==typeof o.ratio&&(r.ratio=l.ratio+(o.ratio-l.ratio)*e),n.setState(r),n.nextFrame=(0,s.requestFrame)(d)};this.nextFrame?((0,s.cancelFrame)(this.nextFrame),this.animationCallback&&this.animationCallback.call(null),this.nextFrame=(0,s.requestFrame)(d)):d(),this.animationCallback=r}},e.prototype.animatedZoom=function(t){if(t){if("number"==typeof t)return this.animate({ratio:this.ratio/t});this.animate({ratio:this.ratio/(t.factor||h)},t)}else this.animate({ratio:this.ratio/h})},e.prototype.animatedUnzoom=function(t){if(t){if("number"==typeof t)return this.animate({ratio:this.ratio*t});this.animate({ratio:this.ratio*(t.factor||h)},t)}else this.animate({ratio:this.ratio*h})},e.prototype.animatedReset=function(t){this.animate({x:.5,y:.5,ratio:1,angle:0},t)},e.prototype.copy=function(){return e.from(this.getState())},e}(c.TypedEventEmitter);e.default=l},48231:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__assign||function(){return o=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},o.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.getWheelDelta=e.getTouchCoords=e.getTouchesArray=e.getWheelCoords=e.getMouseCoords=e.getPosition=void 0;var a=r(30432);function u(t,e){var r=e.getBoundingClientRect();return{x:t.clientX-r.left,y:t.clientY-r.top}}function s(t,e){var r=o(o({},u(t,e)),{sigmaDefaultPrevented:!1,preventSigmaDefault:function(){r.sigmaDefaultPrevented=!0},original:t});return r}function c(t){for(var e=[],r=0,n=Math.min(t.length,2);r<n;r++)e.push(t[r]);return e}function h(t){if(void 0!==t.deltaY)return-3*t.deltaY/360;if(void 0!==t.detail)return t.detail/-9;throw new Error("Captor: could not extract delta from event.")}e.getPosition=u,e.getMouseCoords=s,e.getWheelCoords=function(t,e){return o(o({},s(t,e)),{delta:h(t)})},e.getTouchesArray=c,e.getTouchCoords=function(t,e){return{touches:c(t.touches).map((function(t){return u(t,e)})),original:t}},e.getWheelDelta=h;var l=function(t){function e(e,r){var n=t.call(this)||this;return n.container=e,n.renderer=r,n}return i(e,t),e}(a.TypedEventEmitter);e.default=l},73834:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),a=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),u=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&o(e,t,r);return a(e,t),e};Object.defineProperty(e,"__esModule",{value:!0});var s=u(r(48231)),c=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.enabled=!0,n.draggedEvents=0,n.downStartTime=null,n.lastMouseX=null,n.lastMouseY=null,n.isMouseDown=!1,n.isMoving=!1,n.movingTimeout=null,n.startCameraState=null,n.clicks=0,n.doubleClickTimeout=null,n.currentWheelDirection=0,n.handleClick=n.handleClick.bind(n),n.handleRightClick=n.handleRightClick.bind(n),n.handleDown=n.handleDown.bind(n),n.handleUp=n.handleUp.bind(n),n.handleMove=n.handleMove.bind(n),n.handleWheel=n.handleWheel.bind(n),n.handleOut=n.handleOut.bind(n),e.addEventListener("click",n.handleClick,!1),e.addEventListener("contextmenu",n.handleRightClick,!1),e.addEventListener("mousedown",n.handleDown,!1),e.addEventListener("wheel",n.handleWheel,!1),e.addEventListener("mouseout",n.handleOut,!1),document.addEventListener("mousemove",n.handleMove,!1),document.addEventListener("mouseup",n.handleUp,!1),n}return i(e,t),e.prototype.kill=function(){var t=this.container;t.removeEventListener("click",this.handleClick),t.removeEventListener("contextmenu",this.handleRightClick),t.removeEventListener("mousedown",this.handleDown),t.removeEventListener("wheel",this.handleWheel),t.removeEventListener("mouseout",this.handleOut),document.removeEventListener("mousemove",this.handleMove),document.removeEventListener("mouseup",this.handleUp)},e.prototype.handleClick=function(t){var e=this;if(this.enabled){if(this.clicks++,2===this.clicks)return this.clicks=0,"number"==typeof this.doubleClickTimeout&&(clearTimeout(this.doubleClickTimeout),this.doubleClickTimeout=null),this.handleDoubleClick(t);setTimeout((function(){e.clicks=0,e.doubleClickTimeout=null}),300),this.draggedEvents<3&&this.emit("click",(0,s.getMouseCoords)(t,this.container))}},e.prototype.handleRightClick=function(t){this.enabled&&this.emit("rightClick",(0,s.getMouseCoords)(t,this.container))},e.prototype.handleDoubleClick=function(t){if(this.enabled){t.preventDefault(),t.stopPropagation();var e=(0,s.getMouseCoords)(t,this.container);if(this.emit("doubleClick",e),!e.sigmaDefaultPrevented){var r=this.renderer.getCamera(),n=r.getBoundedRatio(r.getState().ratio/2.2);r.animate(this.renderer.getViewportZoomedState((0,s.getPosition)(t,this.container),n),{easing:"quadraticInOut",duration:200})}}},e.prototype.handleDown=function(t){if(this.enabled){if(0===t.button){this.startCameraState=this.renderer.getCamera().getState();var e=(0,s.getPosition)(t,this.container),r=e.x,n=e.y;this.lastMouseX=r,this.lastMouseY=n,this.draggedEvents=0,this.downStartTime=Date.now(),this.isMouseDown=!0}this.emit("mousedown",(0,s.getMouseCoords)(t,this.container))}},e.prototype.handleUp=function(t){var e=this;if(this.enabled&&this.isMouseDown){var r=this.renderer.getCamera();this.isMouseDown=!1,"number"==typeof this.movingTimeout&&(clearTimeout(this.movingTimeout),this.movingTimeout=null);var n=(0,s.getPosition)(t,this.container),i=n.x,o=n.y,a=r.getState(),u=r.getPreviousState()||{x:0,y:0};this.isMoving?r.animate({x:a.x+3*(a.x-u.x),y:a.y+3*(a.y-u.y)},{duration:200,easing:"quadraticOut"}):this.lastMouseX===i&&this.lastMouseY===o||r.setState({x:a.x,y:a.y}),this.isMoving=!1,setTimeout((function(){e.draggedEvents=0,e.renderer.refresh()}),0),this.emit("mouseup",(0,s.getMouseCoords)(t,this.container))}},e.prototype.handleMove=function(t){var e=this;if(this.enabled){var r=(0,s.getMouseCoords)(t,this.container);if(this.emit("mousemovebody",r),t.target===this.container&&this.emit("mousemove",r),!r.sigmaDefaultPrevented&&this.isMouseDown){this.isMoving=!0,this.draggedEvents++,"number"==typeof this.movingTimeout&&clearTimeout(this.movingTimeout),this.movingTimeout=window.setTimeout((function(){e.movingTimeout=null,e.isMoving=!1}),100);var n=this.renderer.getCamera(),i=(0,s.getPosition)(t,this.container),o=i.x,a=i.y,u=this.renderer.viewportToFramedGraph({x:this.lastMouseX,y:this.lastMouseY}),c=this.renderer.viewportToFramedGraph({x:o,y:a}),h=u.x-c.x,l=u.y-c.y,d=n.getState(),f=d.x+h,p=d.y+l;n.setState({x:f,y:p}),this.lastMouseX=o,this.lastMouseY=a,t.preventDefault(),t.stopPropagation()}}},e.prototype.handleWheel=function(t){var e=this;if(this.enabled){t.preventDefault(),t.stopPropagation();var r=(0,s.getWheelDelta)(t);if(r){var n=(0,s.getWheelCoords)(t,this.container);if(this.emit("wheel",n),!n.sigmaDefaultPrevented){var i=r>0?1/1.7:1.7,o=this.renderer.getCamera(),a=o.getBoundedRatio(o.getState().ratio*i),u=r>0?1:-1,c=Date.now();this.currentWheelDirection===u&&this.lastWheelTriggerTime&&c-this.lastWheelTriggerTime<50||(o.animate(this.renderer.getViewportZoomedState((0,s.getPosition)(t,this.container),a),{easing:"quadraticOut",duration:250},(function(){e.currentWheelDirection=0})),this.currentWheelDirection=u,this.lastWheelTriggerTime=c)}}}},e.prototype.handleOut=function(){},e}(s.default);e.default=c},40916:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),a=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),u=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&o(e,t,r);return a(e,t),e},s=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a};Object.defineProperty(e,"__esModule",{value:!0});var c=u(r(48231)),h=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.enabled=!0,n.isMoving=!1,n.hasMoved=!1,n.touchMode=0,n.startTouchesPositions=[],n.handleStart=n.handleStart.bind(n),n.handleLeave=n.handleLeave.bind(n),n.handleMove=n.handleMove.bind(n),e.addEventListener("touchstart",n.handleStart,!1),e.addEventListener("touchend",n.handleLeave,!1),e.addEventListener("touchcancel",n.handleLeave,!1),e.addEventListener("touchmove",n.handleMove,!1),n}return i(e,t),e.prototype.kill=function(){var t=this.container;t.removeEventListener("touchstart",this.handleStart),t.removeEventListener("touchend",this.handleLeave),t.removeEventListener("touchcancel",this.handleLeave),t.removeEventListener("touchmove",this.handleMove)},e.prototype.getDimensions=function(){return{width:this.container.offsetWidth,height:this.container.offsetHeight}},e.prototype.dispatchRelatedMouseEvent=function(t,e,r,n){var i=r||e.touches[0],o=new MouseEvent(t,{clientX:i.clientX,clientY:i.clientY,altKey:e.altKey,ctrlKey:e.ctrlKey});o.isFakeSigmaMouseEvent=!0,(n||this.container).dispatchEvent(o)},e.prototype.handleStart=function(t){var e=this;if(this.enabled){t.preventDefault(),1===t.touches.length&&this.dispatchRelatedMouseEvent("mousedown",t);var r=(0,c.getTouchesArray)(t.touches);if(this.touchMode=r.length,this.startCameraState=this.renderer.getCamera().getState(),this.startTouchesPositions=r.map((function(t){return(0,c.getPosition)(t,e.container)})),this.lastTouches=r,this.lastTouchesPositions=this.startTouchesPositions,2===this.touchMode){var n=s(this.startTouchesPositions,2),i=n[0],o=i.x,a=i.y,u=n[1],h=u.x,l=u.y;this.startTouchesAngle=Math.atan2(l-a,h-o),this.startTouchesDistance=Math.sqrt(Math.pow(h-o,2)+Math.pow(l-a,2))}this.emit("touchdown",(0,c.getTouchCoords)(t,this.container))}},e.prototype.handleLeave=function(t){if(this.enabled){switch(t.preventDefault(),0===t.touches.length&&this.lastTouches&&this.lastTouches.length&&(this.dispatchRelatedMouseEvent("mouseup",t,this.lastTouches[0],document),this.hasMoved||this.dispatchRelatedMouseEvent("click",t,this.lastTouches[0])),this.movingTimeout&&(this.isMoving=!1,clearTimeout(this.movingTimeout)),this.touchMode){case 2:if(1===t.touches.length){this.handleStart(t),t.preventDefault();break}case 1:if(this.isMoving){var e=this.renderer.getCamera(),r=e.getState(),n=e.getPreviousState()||{x:0,y:0};e.animate({x:r.x+3*(r.x-n.x),y:r.y+3*(r.y-n.y)},{duration:200,easing:"quadraticOut"})}this.hasMoved=!1,this.isMoving=!1,this.touchMode=0}this.emit("touchup",(0,c.getTouchCoords)(t,this.container))}},e.prototype.handleMove=function(t){var e,r=this;if(this.enabled){t.preventDefault(),1===t.touches.length&&this.dispatchRelatedMouseEvent("mousemove",t);var n=(0,c.getTouchesArray)(t.touches),i=n.map((function(t){return(0,c.getPosition)(t,r.container)}));if(this.lastTouches=n,this.lastTouchesPositions=i,this.hasMoved||(this.hasMoved=i.some((function(t,e){var n=r.startTouchesPositions[e];return t.x!==n.x||t.y!==n.y}))),this.hasMoved){this.isMoving=!0,this.movingTimeout&&clearTimeout(this.movingTimeout),this.movingTimeout=window.setTimeout((function(){r.isMoving=!1}),200);var o=this.renderer.getCamera(),a=this.startCameraState;switch(this.touchMode){case 1:var u=this.renderer.viewportToFramedGraph((this.startTouchesPositions||[])[0]),h=u.x,l=u.y,d=this.renderer.viewportToFramedGraph(i[0]),f=d.x,p=d.y;o.setState({x:a.x+h-f,y:a.y+l-p});break;case 2:var g={},v=i[0],y=v.x,m=v.y,b=i[1],w=b.x,_=b.y,x=Math.atan2(_-m,w-y)-this.startTouchesAngle,E=Math.hypot(_-m,w-y)/this.startTouchesDistance,A=o.getBoundedRatio(a.ratio/E);g.ratio=A,g.angle=a.angle+x;var L=this.getDimensions(),k=this.renderer.viewportToFramedGraph((this.startTouchesPositions||[])[0],{cameraState:a}),C=Math.min(L.width,L.height),S=C/L.width,M=A/C;p=m-C/2/(C/L.height),f=(e=s([(f=y-C/2/S)*Math.cos(-g.angle)-p*Math.sin(-g.angle),p*Math.cos(-g.angle)+f*Math.sin(-g.angle)],2))[0],p=e[1],g.x=k.x-f*M,g.y=k.y+p*M,o.setState(g)}this.emit("touchmove",(0,c.getTouchCoords)(t,this.container))}}},e}(c.default);e.default=h},2306:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.edgeLabelsToDisplayFromNodes=e.LabelGrid=void 0;var r=function(){function t(t,e){this.key=t,this.size=e}return t.compare=function(t,e){return t.size>e.size?-1:t.size<e.size||t.key>e.key?1:-1},t}(),n=function(){function t(){this.width=0,this.height=0,this.cellSize=0,this.columns=0,this.rows=0,this.cells={}}return t.prototype.resizeAndClear=function(t,e){this.width=t.width,this.height=t.height,this.cellSize=e,this.columns=Math.ceil(t.width/e),this.rows=Math.ceil(t.height/e),this.cells={}},t.prototype.getIndex=function(t){var e=Math.floor(t.x/this.cellSize);return Math.floor(t.y/this.cellSize)*this.columns+e},t.prototype.add=function(t,e,n){var i=new r(t,e),o=this.getIndex(n),a=this.cells[o];a||(a=[],this.cells[o]=a),a.push(i)},t.prototype.organize=function(){for(var t in this.cells)this.cells[t].sort(r.compare)},t.prototype.getLabelsToDisplay=function(t,e){var r=this.cellSize*this.cellSize,n=r/t/t*e/r,i=Math.ceil(n),o=[];for(var a in this.cells)for(var u=this.cells[a],s=0;s<Math.min(i,u.length);s++)o.push(u[s].key);return o},t}();e.LabelGrid=n,e.edgeLabelsToDisplayFromNodes=function(t){var e=t.graph,r=t.hoveredNode,n=t.highlightedNodes,i=t.displayedNodeLabels,o=[];return e.forEachEdge((function(t,e,a,u){(a===r||u===r||n.has(a)||n.has(u)||i.has(a)&&i.has(u))&&o.push(t)})),o}},39316:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.rectangleCollidesWithQuad=e.squareCollidesWithQuad=e.getCircumscribedAlignedRectangle=e.isRectangleAligned=void 0;var i=n(r(8884)),o=!1;function a(t){return t.x1===t.x2||t.y1===t.y2}function u(t){var e=Math.sqrt(Math.pow(t.x2-t.x1,2)+Math.pow(t.y2-t.y1,2)),r=(t.y1-t.y2)*t.height/e,n=(t.x2-t.x1)*t.height/e,i={x:t.x1,y:t.y1},o={x:t.x2,y:t.y2},a={x:t.x1+r,y:t.y1+n},u={x:t.x2+r,y:t.y2+n},s=Math.min(i.x,o.x,a.x,u.x),c=Math.max(i.x,o.x,a.x,u.x),h=Math.min(i.y,o.y,a.y,u.y);return{x1:s,y1:h,x2:c,y2:h,height:Math.max(i.y,o.y,a.y,u.y)-h}}function s(t,e,r,n,i,o,a){return t<n+o&&t+r>n&&e<i+a&&e+r>i}function c(t,e,r,n,i,o,a,u){return t<i+a&&t+r>i&&e<o+u&&e+n>o}function h(t,e,r,n,i,o){var a=t<r+i/2;return e<n+o/2?a?1:2:a?3:4}e.isRectangleAligned=a,e.getCircumscribedAlignedRectangle=u,e.squareCollidesWithQuad=s,e.rectangleCollidesWithQuad=c;var l=function(){function t(t){var e;void 0===t&&(t={}),this.containers=((e={})[5460]=[],e),this.cache=null,this.lastRectangle=null;var r=Math.pow(4,5);this.data=new Float32Array((4*r-1)/3*4),t.boundaries?this.resize(t.boundaries):this.resize({x:0,y:0,width:1,height:1})}return t.prototype.add=function(t,e,r,n){return function(t,e,r,n,i,a,u){for(var c=i-u,h=a-u,l=2*u,d=0,f=0;;){if(d>=5)return r[f]=r[f]||[],void r[f].push(n);var p=4*f+4,g=4*f+8,v=4*f+12,y=4*f+16,m=s(c,h,l,e[p+0],e[p+1],e[p+2],e[p+3]),b=s(c,h,l,e[g+0],e[g+1],e[g+2],e[g+3]),w=s(c,h,l,e[v+0],e[v+1],e[v+2],e[v+3]),_=s(c,h,l,e[y+0],e[y+1],e[y+2],e[y+3]),x=[m,b,w,_].reduce((function(t,e){return e?t+1:t}),0);if(0===x&&0===d)return r[5460].push(n),void(!o&&r[5460].length>=5&&(o=!0,console.warn("sigma/quadtree.insertNode: At least 5 nodes are outside the global quadtree zone. You might have a problem with the normalization function or the custom bounding box.")));if(0===x)throw new Error("sigma/quadtree.insertNode: no collision (level: ".concat(d,", key: ").concat(n,", x: ").concat(i,", y: ").concat(a,", size: ").concat(u,")."));if(3===x)throw new Error("sigma/quadtree.insertNode: 3 impossible collisions (level: ".concat(d,", key: ").concat(n,", x: ").concat(i,", y: ").concat(a,", size: ").concat(u,")."));if(x>1)return r[f]=r[f]||[],void r[f].push(n);d++,m&&(f=p),b&&(f=g),w&&(f=v),_&&(f=y)}}(0,this.data,this.containers,t,e,r,n),this},t.prototype.resize=function(t){this.clear(),this.data[0]=t.x,this.data[1]=t.y,this.data[2]=t.width,this.data[3]=t.height,function(t,e){for(var r=[0,0];r.length;){var n=r.pop(),i=r.pop(),o=4*i+4,a=4*i+8,u=4*i+12,s=4*i+16,c=e[i+0],h=e[i+1],l=e[i+2]/2,d=e[i+3]/2;e[o+0]=c,e[o+1]=h,e[o+2]=l,e[o+3]=d,e[a+0]=c+l,e[a+1]=h,e[a+2]=l,e[a+3]=d,e[u+0]=c,e[u+1]=h+d,e[u+2]=l,e[u+3]=d,e[s+0]=c+l,e[s+1]=h+d,e[s+2]=l,e[s+3]=d,n<4&&(r.push(s,n+1),r.push(u,n+1),r.push(a,n+1),r.push(o,n+1))}}(0,this.data)},t.prototype.clear=function(){var t;return this.containers=((t={})[5460]=[],t),this},t.prototype.point=function(t,e){var r=this.containers[5460].slice(),n=0,o=0;do{this.containers[n]&&(0,i.default)(r,this.containers[n]),n=4*n+4*h(t,e,this.data[n+0],this.data[n+1],this.data[n+2],this.data[n+3]),o++}while(o<=5);return r},t.prototype.rectangle=function(t,e,r,n,o){var s=this.lastRectangle;return s&&t===s.x1&&r===s.x2&&e===s.y1&&n===s.y2&&o===s.height||(this.lastRectangle={x1:t,y1:e,x2:r,y2:n,height:o},a(this.lastRectangle)||(this.lastRectangle=u(this.lastRectangle)),this.cache=function(t,e,r,n,o,a,u){for(var s,h=[0,0],l=[];h.length;){var d=h.pop(),f=h.pop();if((s=r[f])&&(0,i.default)(l,s),!(d>=5)){var p=4*f+4,g=4*f+8,v=4*f+12,y=4*f+16,m=c(n,o,a,u,e[p+0],e[p+1],e[p+2],e[p+3]),b=c(n,o,a,u,e[g+0],e[g+1],e[g+2],e[g+3]),w=c(n,o,a,u,e[v+0],e[v+1],e[v+2],e[v+3]),_=c(n,o,a,u,e[y+0],e[y+1],e[y+2],e[y+3]);m&&h.push(p,d+1),b&&h.push(g,d+1),w&&h.push(v,d+1),_&&h.push(y,d+1)}}return l}(0,this.data,this.containers,t,e,Math.abs(t-r)||Math.abs(e-n),o),(0,i.default)(this.cache,this.containers[5460])),this.cache},t}();e.default=l},49358:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Sigma=e.MouseCaptor=e.QuadTree=e.Camera=void 0;var i=n(r(38953));e.Sigma=i.default;var o=n(r(31250));e.Camera=o.default;var a=n(r(39316));e.QuadTree=a.default;var u=n(r(73834));e.MouseCaptor=u.default,e.default=i.default},30284:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,r,n,i){var o=i.edgeLabelSize,a=i.edgeLabelFont,u=i.edgeLabelWeight,s=i.edgeLabelColor.attribute?e[i.edgeLabelColor.attribute]||i.edgeLabelColor.color||"#000":i.edgeLabelColor.color,c=e.label;if(c){t.fillStyle=s,t.font="".concat(u," ").concat(o,"px ").concat(a);var h,l,d=r.size,f=n.size,p=r.x,g=r.y,v=n.x,y=n.y,m=v-p,b=y-g,w=Math.sqrt(m*m+b*b);if(!(w<d+f)){h=((p+=m*d/w)+(v-=m*f/w))/2,l=((g+=b*d/w)+(y-=b*f/w))/2,m=v-p,b=y-g,w=Math.sqrt(m*m+b*b);var _,x=t.measureText(c).width;if(x>w){for(c+="…",x=t.measureText(c).width;x>w&&c.length>1;)c=c.slice(0,-2)+"…",x=t.measureText(c).width;if(c.length<4)return}_=m>0?b>0?Math.acos(m/w):Math.asin(b/w):b>0?Math.acos(m/w)+Math.PI:Math.asin(m/w)+Math.PI/2,t.save(),t.translate(h,l),t.rotate(_),t.fillText(c,-x/2,e.size/2+o),t.restore()}}}},64362:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(r(12193));e.default=function(t,e,r){var n=r.labelSize,o=r.labelFont,a=r.labelWeight;if(t.font="".concat(a," ").concat(n,"px ").concat(o),t.fillStyle="#FFF",t.shadowOffsetX=0,t.shadowOffsetY=0,t.shadowBlur=8,t.shadowColor="#000","string"==typeof e.label){var u=t.measureText(e.label).width,s=Math.round(u+5),c=Math.round(n+4),h=Math.max(e.size,n/2)+2,l=Math.asin(c/2/h),d=Math.sqrt(Math.abs(Math.pow(h,2)-Math.pow(c/2,2)));t.beginPath(),t.moveTo(e.x+d,e.y+c/2),t.lineTo(e.x+h+s,e.y+c/2),t.lineTo(e.x+h+s,e.y-c/2),t.lineTo(e.x+d,e.y-c/2),t.arc(e.x,e.y,h,l,-l),t.closePath(),t.fill()}else t.beginPath(),t.arc(e.x,e.y,e.size+2,0,2*Math.PI),t.closePath(),t.fill();t.shadowOffsetX=0,t.shadowOffsetY=0,t.shadowBlur=0,(0,i.default)(t,e,r)}},12193:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,r){if(e.label){var n=r.labelSize,i=r.labelFont,o=r.labelWeight,a=r.labelColor.attribute?e[r.labelColor.attribute]||r.labelColor.color||"#000":r.labelColor.color;t.fillStyle=a,t.font="".concat(o," ").concat(n,"px ").concat(i),t.fillText(e.label,e.x+e.size+3,e.y+n/3)}}},64488:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.createEdgeCompoundProgram=e.AbstractEdgeProgram=void 0;var o=function(t){function e(e,r,n,i,o){return t.call(this,e,r,n,i,o)||this}return i(e,t),e}(r(71549).AbstractProgram);e.AbstractEdgeProgram=o,e.createEdgeCompoundProgram=function(t){return function(){function e(e,r){this.programs=t.map((function(t){return new t(e,r)}))}return e.prototype.bufferData=function(){this.programs.forEach((function(t){return t.bufferData()}))},e.prototype.allocate=function(t){this.programs.forEach((function(e){return e.allocate(t)}))},e.prototype.bind=function(){},e.prototype.computeIndices=function(){this.programs.forEach((function(t){return t.computeIndices()}))},e.prototype.render=function(t){this.programs.forEach((function(e){e.bind(),e.bufferData(),e.render(t)}))},e.prototype.process=function(t,e,r,n,i){this.programs.forEach((function(o){return o.process(t,e,r,n,i)}))},e}()}},23304:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.createNodeCompoundProgram=e.AbstractNodeProgram=void 0;var o=function(t){function e(e,r,n,i,o){var a=t.call(this,e,r,n,i,o)||this;a.positionLocation=e.getAttribLocation(a.program,"a_position"),a.sizeLocation=e.getAttribLocation(a.program,"a_size"),a.colorLocation=e.getAttribLocation(a.program,"a_color");var u=e.getUniformLocation(a.program,"u_matrix");if(null===u)throw new Error("AbstractNodeProgram: error while getting matrixLocation");a.matrixLocation=u;var s=e.getUniformLocation(a.program,"u_ratio");if(null===s)throw new Error("AbstractNodeProgram: error while getting ratioLocation");a.ratioLocation=s;var c=e.getUniformLocation(a.program,"u_scale");if(null===c)throw new Error("AbstractNodeProgram: error while getting scaleLocation");return a.scaleLocation=c,a}return i(e,t),e.prototype.bind=function(){var t=this.gl;t.enableVertexAttribArray(this.positionLocation),t.enableVertexAttribArray(this.sizeLocation),t.enableVertexAttribArray(this.colorLocation),t.vertexAttribPointer(this.positionLocation,2,t.FLOAT,!1,this.attributes*Float32Array.BYTES_PER_ELEMENT,0),t.vertexAttribPointer(this.sizeLocation,1,t.FLOAT,!1,this.attributes*Float32Array.BYTES_PER_ELEMENT,8),t.vertexAttribPointer(this.colorLocation,4,t.UNSIGNED_BYTE,!0,this.attributes*Float32Array.BYTES_PER_ELEMENT,12)},e}(r(71549).AbstractProgram);e.AbstractNodeProgram=o,e.createNodeCompoundProgram=function(t){return function(){function e(e,r){this.programs=t.map((function(t){return new t(e,r)}))}return e.prototype.bufferData=function(){this.programs.forEach((function(t){return t.bufferData()}))},e.prototype.allocate=function(t){this.programs.forEach((function(e){return e.allocate(t)}))},e.prototype.bind=function(){},e.prototype.render=function(t){this.programs.forEach((function(e){e.bind(),e.bufferData(),e.render(t)}))},e.prototype.process=function(t,e,r){this.programs.forEach((function(n){return n.process(t,e,r)}))},e}()}},71549:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractProgram=void 0;var n=r(83451),i=function(){function t(t,e,r,i,o){this.array=new Float32Array,this.points=i,this.attributes=o,this.gl=t,this.vertexShaderSource=e,this.fragmentShaderSource=r;var a=t.createBuffer();if(null===a)throw new Error("AbstractProgram: error while creating the buffer");this.buffer=a,t.bindBuffer(t.ARRAY_BUFFER,this.buffer),this.vertexShader=(0,n.loadVertexShader)(t,this.vertexShaderSource),this.fragmentShader=(0,n.loadFragmentShader)(t,this.fragmentShaderSource),this.program=(0,n.loadProgram)(t,[this.vertexShader,this.fragmentShader])}return t.prototype.bufferData=function(){var t=this.gl;t.bufferData(t.ARRAY_BUFFER,this.array,t.DYNAMIC_DRAW)},t.prototype.allocate=function(t){this.array=new Float32Array(this.points*this.attributes*t)},t.prototype.hasNothingToRender=function(){return 0===this.array.length},t}();e.AbstractProgram=i},65696:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(64488),o=n(r(23193)),a=n(r(83653)),u=(0,i.createEdgeCompoundProgram)([a.default,o.default]);e.default=u},23193:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=r(88586),u=o(r(50577)),s=o(r(91604)),c=function(t){function e(e){var r=t.call(this,e,u.default,s.default,3,9)||this;r.positionLocation=e.getAttribLocation(r.program,"a_position"),r.colorLocation=e.getAttribLocation(r.program,"a_color"),r.normalLocation=e.getAttribLocation(r.program,"a_normal"),r.radiusLocation=e.getAttribLocation(r.program,"a_radius"),r.barycentricLocation=e.getAttribLocation(r.program,"a_barycentric");var n=e.getUniformLocation(r.program,"u_matrix");if(null===n)throw new Error("EdgeArrowHeadProgram: error while getting matrixLocation");r.matrixLocation=n;var i=e.getUniformLocation(r.program,"u_sqrtZoomRatio");if(null===i)throw new Error("EdgeArrowHeadProgram: error while getting sqrtZoomRatioLocation");r.sqrtZoomRatioLocation=i;var o=e.getUniformLocation(r.program,"u_correctionRatio");if(null===o)throw new Error("EdgeArrowHeadProgram: error while getting correctionRatioLocation");return r.correctionRatioLocation=o,r.bind(),r}return i(e,t),e.prototype.bind=function(){var t=this.gl;t.enableVertexAttribArray(this.positionLocation),t.enableVertexAttribArray(this.normalLocation),t.enableVertexAttribArray(this.radiusLocation),t.enableVertexAttribArray(this.colorLocation),t.enableVertexAttribArray(this.barycentricLocation),t.vertexAttribPointer(this.positionLocation,2,t.FLOAT,!1,9*Float32Array.BYTES_PER_ELEMENT,0),t.vertexAttribPointer(this.normalLocation,2,t.FLOAT,!1,9*Float32Array.BYTES_PER_ELEMENT,8),t.vertexAttribPointer(this.radiusLocation,1,t.FLOAT,!1,9*Float32Array.BYTES_PER_ELEMENT,16),t.vertexAttribPointer(this.colorLocation,4,t.UNSIGNED_BYTE,!0,9*Float32Array.BYTES_PER_ELEMENT,20),t.vertexAttribPointer(this.barycentricLocation,3,t.FLOAT,!1,9*Float32Array.BYTES_PER_ELEMENT,24)},e.prototype.computeIndices=function(){},e.prototype.process=function(t,e,r,n,i){if(n)for(var o=27*i,u=o+27;o<u;o++)this.array[o]=0;else{var s=r.size||1,c=e.size||1,h=t.x,l=t.y,d=e.x,f=e.y,p=(0,a.floatColor)(r.color),g=d-h,v=f-l,y=g*g+v*v,m=0,b=0;y&&(m=-v*(y=1/Math.sqrt(y))*s,b=g*y*s);var w=27*i,_=this.array;_[w++]=d,_[w++]=f,_[w++]=-m,_[w++]=-b,_[w++]=c,_[w++]=p,_[w++]=1,_[w++]=0,_[w++]=0,_[w++]=d,_[w++]=f,_[w++]=-m,_[w++]=-b,_[w++]=c,_[w++]=p,_[w++]=0,_[w++]=1,_[w++]=0,_[w++]=d,_[w++]=f,_[w++]=-m,_[w++]=-b,_[w++]=c,_[w++]=p,_[w++]=0,_[w++]=0,_[w]=1}},e.prototype.render=function(t){if(!this.hasNothingToRender()){var e=this.gl,r=this.program;e.useProgram(r),e.uniformMatrix3fv(this.matrixLocation,!1,t.matrix),e.uniform1f(this.sqrtZoomRatioLocation,Math.sqrt(t.ratio)),e.uniform1f(this.correctionRatioLocation,t.correctionRatio),e.drawArrays(e.TRIANGLES,0,this.array.length/9)}},e}(r(64488).AbstractEdgeProgram);e.default=c},83653:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=r(64488),u=r(88586),s=o(r(83574)),c=o(r(73343)),h=function(t){function e(e){var r=t.call(this,e,s.default,c.default,4,6)||this,n=e.createBuffer();if(null===n)throw new Error("EdgeClampedProgram: error while getting resolutionLocation");r.indicesBuffer=n,r.positionLocation=e.getAttribLocation(r.program,"a_position"),r.colorLocation=e.getAttribLocation(r.program,"a_color"),r.normalLocation=e.getAttribLocation(r.program,"a_normal"),r.radiusLocation=e.getAttribLocation(r.program,"a_radius");var i=e.getUniformLocation(r.program,"u_matrix");if(null===i)throw new Error("EdgeClampedProgram: error while getting matrixLocation");r.matrixLocation=i;var o=e.getUniformLocation(r.program,"u_sqrtZoomRatio");if(null===o)throw new Error("EdgeClampedProgram: error while getting cameraRatioLocation");r.sqrtZoomRatioLocation=o;var a=e.getUniformLocation(r.program,"u_correctionRatio");if(null===a)throw new Error("EdgeClampedProgram: error while getting viewportRatioLocation");return r.correctionRatioLocation=a,r.canUse32BitsIndices=(0,u.canUse32BitsIndices)(e),r.IndicesArray=r.canUse32BitsIndices?Uint32Array:Uint16Array,r.indicesArray=new r.IndicesArray,r.indicesType=r.canUse32BitsIndices?e.UNSIGNED_INT:e.UNSIGNED_SHORT,r.bind(),r}return i(e,t),e.prototype.bind=function(){var t=this.gl;t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this.indicesBuffer),t.enableVertexAttribArray(this.positionLocation),t.enableVertexAttribArray(this.normalLocation),t.enableVertexAttribArray(this.colorLocation),t.enableVertexAttribArray(this.radiusLocation),t.vertexAttribPointer(this.positionLocation,2,t.FLOAT,!1,6*Float32Array.BYTES_PER_ELEMENT,0),t.vertexAttribPointer(this.normalLocation,2,t.FLOAT,!1,6*Float32Array.BYTES_PER_ELEMENT,8),t.vertexAttribPointer(this.colorLocation,4,t.UNSIGNED_BYTE,!0,6*Float32Array.BYTES_PER_ELEMENT,16),t.vertexAttribPointer(this.radiusLocation,1,t.FLOAT,!1,6*Float32Array.BYTES_PER_ELEMENT,20)},e.prototype.process=function(t,e,r,n,i){if(n)for(var o=24*i,a=o+24;o<a;o++)this.array[o]=0;else{var s=r.size||1,c=t.x,h=t.y,l=e.x,d=e.y,f=e.size||1,p=(0,u.floatColor)(r.color),g=l-c,v=d-h,y=g*g+v*v,m=0,b=0;y&&(m=-v*(y=1/Math.sqrt(y))*s,b=g*y*s);var w=24*i,_=this.array;_[w++]=c,_[w++]=h,_[w++]=m,_[w++]=b,_[w++]=p,_[w++]=0,_[w++]=c,_[w++]=h,_[w++]=-m,_[w++]=-b,_[w++]=p,_[w++]=0,_[w++]=l,_[w++]=d,_[w++]=m,_[w++]=b,_[w++]=p,_[w++]=f,_[w++]=l,_[w++]=d,_[w++]=-m,_[w++]=-b,_[w++]=p,_[w]=-f}},e.prototype.computeIndices=function(){for(var t=this.array.length/6,e=t+t/2,r=new this.IndicesArray(e),n=0,i=0;n<t;n+=4)r[i++]=n,r[i++]=n+1,r[i++]=n+2,r[i++]=n+2,r[i++]=n+1,r[i++]=n+3;this.indicesArray=r},e.prototype.bufferData=function(){t.prototype.bufferData.call(this);var e=this.gl;e.bufferData(e.ELEMENT_ARRAY_BUFFER,this.indicesArray,e.STATIC_DRAW)},e.prototype.render=function(t){if(!this.hasNothingToRender()){var e=this.gl,r=this.program;e.useProgram(r),e.uniformMatrix3fv(this.matrixLocation,!1,t.matrix),e.uniform1f(this.sqrtZoomRatioLocation,Math.sqrt(t.ratio)),e.uniform1f(this.correctionRatioLocation,t.correctionRatio),e.drawElements(e.TRIANGLES,this.indicesArray.length,this.indicesType,0)}},e}(a.AbstractEdgeProgram);e.default=h},95372:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=r(88586),u=o(r(59843)),s=o(r(73343)),c=function(t){function e(e){var r=t.call(this,e,u.default,s.default,4,5)||this,n=e.createBuffer();if(null===n)throw new Error("EdgeProgram: error while creating indicesBuffer");r.indicesBuffer=n,r.positionLocation=e.getAttribLocation(r.program,"a_position"),r.colorLocation=e.getAttribLocation(r.program,"a_color"),r.normalLocation=e.getAttribLocation(r.program,"a_normal");var i=e.getUniformLocation(r.program,"u_matrix");if(null===i)throw new Error("EdgeProgram: error while getting matrixLocation");r.matrixLocation=i;var o=e.getUniformLocation(r.program,"u_correctionRatio");if(null===o)throw new Error("EdgeProgram: error while getting correctionRatioLocation");r.correctionRatioLocation=o;var c=e.getUniformLocation(r.program,"u_sqrtZoomRatio");if(null===c)throw new Error("EdgeProgram: error while getting sqrtZoomRatioLocation");return r.sqrtZoomRatioLocation=c,r.canUse32BitsIndices=(0,a.canUse32BitsIndices)(e),r.IndicesArray=r.canUse32BitsIndices?Uint32Array:Uint16Array,r.indicesArray=new r.IndicesArray,r.indicesType=r.canUse32BitsIndices?e.UNSIGNED_INT:e.UNSIGNED_SHORT,r.bind(),r}return i(e,t),e.prototype.bind=function(){var t=this.gl;t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this.indicesBuffer),t.enableVertexAttribArray(this.positionLocation),t.enableVertexAttribArray(this.normalLocation),t.enableVertexAttribArray(this.colorLocation),t.vertexAttribPointer(this.positionLocation,2,t.FLOAT,!1,5*Float32Array.BYTES_PER_ELEMENT,0),t.vertexAttribPointer(this.normalLocation,2,t.FLOAT,!1,5*Float32Array.BYTES_PER_ELEMENT,8),t.vertexAttribPointer(this.colorLocation,4,t.UNSIGNED_BYTE,!0,5*Float32Array.BYTES_PER_ELEMENT,16)},e.prototype.computeIndices=function(){for(var t=this.array.length/5,e=t+t/2,r=new this.IndicesArray(e),n=0,i=0;n<t;n+=4)r[i++]=n,r[i++]=n+1,r[i++]=n+2,r[i++]=n+2,r[i++]=n+1,r[i++]=n+3;this.indicesArray=r},e.prototype.bufferData=function(){t.prototype.bufferData.call(this);var e=this.gl;e.bufferData(e.ELEMENT_ARRAY_BUFFER,this.indicesArray,e.STATIC_DRAW)},e.prototype.process=function(t,e,r,n,i){if(n)for(var o=20*i,u=o+20;o<u;o++)this.array[o]=0;else{var s=r.size||1,c=t.x,h=t.y,l=e.x,d=e.y,f=(0,a.floatColor)(r.color),p=l-c,g=d-h,v=p*p+g*g,y=0,m=0;v&&(y=-g*(v=1/Math.sqrt(v))*s,m=p*v*s);var b=20*i,w=this.array;w[b++]=c,w[b++]=h,w[b++]=y,w[b++]=m,w[b++]=f,w[b++]=c,w[b++]=h,w[b++]=-y,w[b++]=-m,w[b++]=f,w[b++]=l,w[b++]=d,w[b++]=y,w[b++]=m,w[b++]=f,w[b++]=l,w[b++]=d,w[b++]=-y,w[b++]=-m,w[b]=f}},e.prototype.render=function(t){if(!this.hasNothingToRender()){var e=this.gl,r=this.program;e.useProgram(r),e.uniformMatrix3fv(this.matrixLocation,!1,t.matrix),e.uniform1f(this.sqrtZoomRatioLocation,Math.sqrt(t.ratio)),e.uniform1f(this.correctionRatioLocation,t.correctionRatio),e.drawElements(e.TRIANGLES,this.indicesArray.length,this.indicesType,0)}},e}(r(64488).AbstractEdgeProgram);e.default=c},90732:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=r(88586),u=o(r(21432)),s=o(r(36846)),c=function(t){function e(e){var r=t.call(this,e,u.default,s.default,1,4)||this;return r.bind(),r}return i(e,t),e.prototype.process=function(t,e,r){var n=this.array,i=1*r*4;if(e)return n[i++]=0,n[i++]=0,n[i++]=0,void(n[i++]=0);var o=(0,a.floatColor)(t.color);n[i++]=t.x,n[i++]=t.y,n[i++]=t.size,n[i]=o},e.prototype.render=function(t){if(!this.hasNothingToRender()){var e=this.gl,r=this.program;e.useProgram(r),e.uniform1f(this.ratioLocation,1/Math.sqrt(t.ratio)),e.uniform1f(this.scaleLocation,t.scalingRatio),e.uniformMatrix3fv(this.matrixLocation,!1,t.matrix),e.drawArrays(e.POINTS,0,this.array.length/4)}},e}(r(23304).AbstractNodeProgram);e.default=c},91604:t=>{(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{default:()=>n});const n="precision mediump float;\n\nvarying vec4 v_color;\n\nvoid main(void) {\n gl_FragColor = v_color;\n}\n";t.exports=r})()},50577:t=>{(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{default:()=>n});const n="attribute vec2 a_position;\nattribute vec2 a_normal;\nattribute float a_radius;\nattribute vec4 a_color;\nattribute vec3 a_barycentric;\n\nuniform mat3 u_matrix;\nuniform float u_sqrtZoomRatio;\nuniform float u_correctionRatio;\n\nvarying vec4 v_color;\n\nconst float minThickness = 1.7;\nconst float bias = 255.0 / 254.0;\nconst float arrowHeadWidthLengthRatio = 0.66;\nconst float arrowHeadLengthThicknessRatio = 2.5;\n\nvoid main() {\n float normalLength = length(a_normal);\n vec2 unitNormal = a_normal / normalLength;\n\n // These first computations are taken from edge.vert.glsl and\n // edge.clamped.vert.glsl. Please read it to get better comments on what's\n // happening:\n float pixelsThickness = max(normalLength, minThickness * u_sqrtZoomRatio);\n float webGLThickness = pixelsThickness * u_correctionRatio;\n float adaptedWebGLThickness = webGLThickness * u_sqrtZoomRatio;\n float adaptedWebGLNodeRadius = a_radius * 2.0 * u_correctionRatio * u_sqrtZoomRatio;\n float adaptedWebGLArrowHeadLength = adaptedWebGLThickness * 2.0 * arrowHeadLengthThicknessRatio;\n float adaptedWebGLArrowHeadHalfWidth = adaptedWebGLArrowHeadLength * arrowHeadWidthLengthRatio / 2.0;\n\n float da = a_barycentric.x;\n float db = a_barycentric.y;\n float dc = a_barycentric.z;\n\n vec2 delta = vec2(\n da * (adaptedWebGLNodeRadius * unitNormal.y)\n + db * ((adaptedWebGLNodeRadius + adaptedWebGLArrowHeadLength) * unitNormal.y + adaptedWebGLArrowHeadHalfWidth * unitNormal.x)\n + dc * ((adaptedWebGLNodeRadius + adaptedWebGLArrowHeadLength) * unitNormal.y - adaptedWebGLArrowHeadHalfWidth * unitNormal.x),\n\n da * (-adaptedWebGLNodeRadius * unitNormal.x)\n + db * (-(adaptedWebGLNodeRadius + adaptedWebGLArrowHeadLength) * unitNormal.x + adaptedWebGLArrowHeadHalfWidth * unitNormal.y)\n + dc * (-(adaptedWebGLNodeRadius + adaptedWebGLArrowHeadLength) * unitNormal.x - adaptedWebGLArrowHeadHalfWidth * unitNormal.y)\n );\n\n vec2 position = (u_matrix * vec3(a_position + delta, 1)).xy;\n\n gl_Position = vec4(position, 0, 1);\n\n // Extract the color:\n v_color = a_color;\n v_color.a *= bias;\n}\n";t.exports=r})()},83574:t=>{(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{default:()=>n});const n="attribute vec4 a_color;\nattribute vec2 a_normal;\nattribute vec2 a_position;\nattribute float a_radius;\n\nuniform mat3 u_matrix;\nuniform float u_sqrtZoomRatio;\nuniform float u_correctionRatio;\n\nvarying vec4 v_color;\nvarying vec2 v_normal;\nvarying float v_thickness;\n\nconst float minThickness = 1.7;\nconst float bias = 255.0 / 254.0;\nconst float arrowHeadLengthThicknessRatio = 2.5;\n\nvoid main() {\n float normalLength = length(a_normal);\n vec2 unitNormal = a_normal / normalLength;\n\n // These first computations are taken from edge.vert.glsl. Please read it to\n // get better comments on what's happening:\n float pixelsThickness = max(normalLength, minThickness * u_sqrtZoomRatio);\n float webGLThickness = pixelsThickness * u_correctionRatio;\n float adaptedWebGLThickness = webGLThickness * u_sqrtZoomRatio;\n\n // Here, we move the point to leave space for the arrow head:\n float direction = sign(a_radius);\n float adaptedWebGLNodeRadius = direction * a_radius * 2.0 * u_correctionRatio * u_sqrtZoomRatio;\n float adaptedWebGLArrowHeadLength = adaptedWebGLThickness * 2.0 * arrowHeadLengthThicknessRatio;\n\n vec2 compensationVector = vec2(-direction * unitNormal.y, direction * unitNormal.x) * (adaptedWebGLNodeRadius + adaptedWebGLArrowHeadLength);\n\n // Here is the proper position of the vertex\n gl_Position = vec4((u_matrix * vec3(a_position + unitNormal * adaptedWebGLThickness + compensationVector, 1)).xy, 0, 1);\n\n v_thickness = webGLThickness / u_sqrtZoomRatio;\n\n v_normal = unitNormal;\n v_color = a_color;\n v_color.a *= bias;\n}\n";t.exports=r})()},73343:t=>{(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{default:()=>n});const n="precision mediump float;\n\nvarying vec4 v_color;\nvarying vec2 v_normal;\nvarying float v_thickness;\n\nconst float feather = 0.001;\nconst vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0);\n\nvoid main(void) {\n float dist = length(v_normal) * v_thickness;\n\n float t = smoothstep(\n v_thickness - feather,\n v_thickness,\n dist\n );\n\n gl_FragColor = mix(v_color, transparent, t);\n}\n";t.exports=r})()},59843:t=>{(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{default:()=>n});const n='attribute vec4 a_color;\nattribute vec2 a_normal;\nattribute vec2 a_position;\n\nuniform mat3 u_matrix;\nuniform float u_sqrtZoomRatio;\nuniform float u_correctionRatio;\n\nvarying vec4 v_color;\nvarying vec2 v_normal;\nvarying float v_thickness;\n\nconst float minThickness = 1.7;\nconst float bias = 255.0 / 254.0;\n\nvoid main() {\n float normalLength = length(a_normal);\n vec2 unitNormal = a_normal / normalLength;\n\n // We require edges to be at least `minThickness` pixels thick *on screen*\n // (so we need to compensate the SQRT zoom ratio):\n float pixelsThickness = max(normalLength, minThickness * u_sqrtZoomRatio);\n\n // Then, we need to retrieve the normalized thickness of the edge in the WebGL\n // referential (in a ([0, 1], [0, 1]) space), using our "magic" correction\n // ratio:\n float webGLThickness = pixelsThickness * u_correctionRatio;\n\n // Finally, we adapt the edge thickness to the "SQRT rule" in sigma (so that\n // items are not too big when zoomed in, and not too small when zoomed out).\n // The exact computation should be `adapted = value * zoom / sqrt(zoom)`, but\n // it\'s simpler like this:\n float adaptedWebGLThickness = webGLThickness * u_sqrtZoomRatio;\n\n // Here is the proper position of the vertex\n gl_Position = vec4((u_matrix * vec3(a_position + unitNormal * adaptedWebGLThickness, 1)).xy, 0, 1);\n\n // For the fragment shader though, we need a thickness that takes the "magic"\n // correction ratio into account (as in webGLThickness), but so that the\n // antialiasing effect does not depend on the zoom level. So here\'s yet\n // another thickness version:\n v_thickness = webGLThickness / u_sqrtZoomRatio;\n\n v_normal = unitNormal;\n v_color = a_color;\n v_color.a *= bias;\n}\n';t.exports=r})()},36846:t=>{(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{default:()=>n});const n="precision mediump float;\n\nvarying vec4 v_color;\nvarying float v_border;\n\nconst float radius = 0.5;\nconst vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0);\n\nvoid main(void) {\n vec2 m = gl_PointCoord - vec2(0.5, 0.5);\n float dist = radius - length(m);\n\n float t = 0.0;\n if (dist > v_border)\n t = 1.0;\n else if (dist > 0.0)\n t = dist / v_border;\n\n gl_FragColor = mix(transparent, v_color, t);\n}\n";t.exports=r})()},21432:t=>{(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{default:()=>n});const n="attribute vec2 a_position;\nattribute float a_size;\nattribute vec4 a_color;\n\nuniform float u_ratio;\nuniform float u_scale;\nuniform mat3 u_matrix;\n\nvarying vec4 v_color;\nvarying float v_border;\n\nconst float bias = 255.0 / 254.0;\n\nvoid main() {\n gl_Position = vec4(\n (u_matrix * vec3(a_position, 1)).xy,\n 0,\n 1\n );\n\n // Multiply the point size twice:\n // - x SCALING_RATIO to correct the canvas scaling\n // - x 2 to correct the formulae\n gl_PointSize = a_size * u_ratio * u_scale * 2.0;\n\n v_border = (1.0 / u_ratio) * (0.5 / a_size);\n\n // Extract the color:\n v_color = a_color;\n v_color.a *= bias;\n}\n";t.exports=r})()},83451:(t,e)=>{"use strict";function r(t,e,r){var n="VERTEX"===t?e.VERTEX_SHADER:e.FRAGMENT_SHADER,i=e.createShader(n);if(null===i)throw new Error("loadShader: error while creating the shader");if(e.shaderSource(i,r),e.compileShader(i),!e.getShaderParameter(i,e.COMPILE_STATUS)){var o=e.getShaderInfoLog(i);throw e.deleteShader(i),new Error("loadShader: error while compiling the shader:\n".concat(o,"\n").concat(r))}return i}Object.defineProperty(e,"__esModule",{value:!0}),e.loadProgram=e.loadFragmentShader=e.loadVertexShader=void 0,e.loadVertexShader=function(t,e){return r("VERTEX",t,e)},e.loadFragmentShader=function(t,e){return r("FRAGMENT",t,e)},e.loadProgram=function(t,e){var r,n,i=t.createProgram();if(null===i)throw new Error("loadProgram: error while creating the program.");for(r=0,n=e.length;r<n;r++)t.attachShader(i,e[r]);if(t.linkProgram(i),!t.getProgramParameter(i,t.LINK_STATUS))throw t.deleteProgram(i),new Error("loadProgram: error while linking the program.");return i}},49061:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.resolveSettings=e.validateSettings=e.DEFAULT_EDGE_PROGRAM_CLASSES=e.DEFAULT_NODE_PROGRAM_CLASSES=e.DEFAULT_SETTINGS=void 0;var i=r(88586),o=n(r(12193)),a=n(r(64362)),u=n(r(30284)),s=n(r(90732)),c=n(r(95372)),h=n(r(65696));e.DEFAULT_SETTINGS={hideEdgesOnMove:!1,hideLabelsOnMove:!1,renderLabels:!0,renderEdgeLabels:!1,enableEdgeClickEvents:!1,enableEdgeWheelEvents:!1,enableEdgeHoverEvents:!1,defaultNodeColor:"#999",defaultNodeType:"circle",defaultEdgeColor:"#ccc",defaultEdgeType:"line",labelFont:"Arial",labelSize:14,labelWeight:"normal",labelColor:{color:"#000"},edgeLabelFont:"Arial",edgeLabelSize:14,edgeLabelWeight:"normal",edgeLabelColor:{attribute:"color"},stagePadding:30,labelDensity:1,labelGridCellSize:100,labelRenderedSizeThreshold:6,nodeReducer:null,edgeReducer:null,zIndex:!1,minCameraRatio:null,maxCameraRatio:null,labelRenderer:o.default,hoverRenderer:a.default,edgeLabelRenderer:u.default,allowInvalidContainer:!1,nodeProgramClasses:{},nodeHoverProgramClasses:{},edgeProgramClasses:{}},e.DEFAULT_NODE_PROGRAM_CLASSES={circle:s.default},e.DEFAULT_EDGE_PROGRAM_CLASSES={arrow:h.default,line:c.default},e.validateSettings=function(t){if("number"!=typeof t.labelDensity||t.labelDensity<0)throw new Error("Settings: invalid `labelDensity`. Expecting a positive number.");var e=t.minCameraRatio,r=t.maxCameraRatio;if("number"==typeof e&&"number"==typeof r&&r<e)throw new Error("Settings: invalid camera ratio boundaries. Expecting `maxCameraRatio` to be greater than `minCameraRatio`.")},e.resolveSettings=function(t){var r=(0,i.assign)({},e.DEFAULT_SETTINGS,t);return r.nodeProgramClasses=(0,i.assign)({},e.DEFAULT_NODE_PROGRAM_CLASSES,r.nodeProgramClasses),r.edgeProgramClasses=(0,i.assign)({},e.DEFAULT_EDGE_PROGRAM_CLASSES,r.edgeProgramClasses),r}},38953:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__assign||function(){return o=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},o.apply(this,arguments)},a=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},u=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=u(r(8884)),c=u(r(31250)),h=u(r(73834)),l=u(r(39316)),d=r(30432),f=r(88586),p=r(2306),g=r(49061),v=u(r(40916)),y=r(42237),m=r(38073);function b(t,e,r){if(!r.hasOwnProperty("x")||!r.hasOwnProperty("y"))throw new Error('Sigma: could not find a valid position (x, y) for node "'.concat(e,'". All your nodes must have a number "x" and "y". Maybe your forgot to apply a layout or your "nodeReducer" is not returning the correct data?'));return r.color||(r.color=t.defaultNodeColor),r.label||""===r.label||(r.label=null),void 0!==r.label&&null!==r.label?r.label=""+r.label:r.label=null,r.size||(r.size=2),r.hasOwnProperty("hidden")||(r.hidden=!1),r.hasOwnProperty("highlighted")||(r.highlighted=!1),r.hasOwnProperty("forceLabel")||(r.forceLabel=!1),r.type&&""!==r.type||(r.type=t.defaultNodeType),r.zIndex||(r.zIndex=0),r}function w(t,e,r){return r.color||(r.color=t.defaultEdgeColor),r.label||(r.label=""),r.size||(r.size=.5),r.hasOwnProperty("hidden")||(r.hidden=!1),r.hasOwnProperty("forceLabel")||(r.forceLabel=!1),r.type&&""!==r.type||(r.type=t.defaultEdgeType),r.zIndex||(r.zIndex=0),r}var _=function(t){function e(e,r,n){void 0===n&&(n={});var i=t.call(this)||this;if(i.elements={},i.canvasContexts={},i.webGLContexts={},i.activeListeners={},i.quadtree=new l.default,i.labelGrid=new p.LabelGrid,i.nodeDataCache={},i.edgeDataCache={},i.nodesWithForcedLabels=[],i.edgesWithForcedLabels=[],i.nodeExtent={x:[0,1],y:[0,1]},i.matrix=(0,y.identity)(),i.invMatrix=(0,y.identity)(),i.correctionRatio=1,i.customBBox=null,i.normalizationFunction=(0,f.createNormalizationFunction)({x:[0,1],y:[0,1]}),i.cameraSizeRatio=1,i.width=0,i.height=0,i.pixelRatio=(0,f.getPixelRatio)(),i.displayedLabels=new Set,i.highlightedNodes=new Set,i.hoveredNode=null,i.hoveredEdge=null,i.renderFrame=null,i.renderHighlightedNodesFrame=null,i.needToProcess=!1,i.needToSoftProcess=!1,i.checkEdgesEventsFrame=null,i.nodePrograms={},i.nodeHoverPrograms={},i.edgePrograms={},i.settings=(0,g.resolveSettings)(n),(0,g.validateSettings)(i.settings),(0,f.validateGraph)(e),!(r instanceof HTMLElement))throw new Error("Sigma: container should be an html element.");for(var o in i.graph=e,i.container=r,i.createWebGLContext("edges",{preserveDrawingBuffer:!0}),i.createCanvasContext("edgeLabels"),i.createWebGLContext("nodes"),i.createCanvasContext("labels"),i.createCanvasContext("hovers"),i.createWebGLContext("hoverNodes"),i.createCanvasContext("mouse"),i.webGLContexts){var a=i.webGLContexts[o];a.blendFunc(a.ONE,a.ONE_MINUS_SRC_ALPHA),a.enable(a.BLEND)}for(var u in i.settings.nodeProgramClasses){var s=i.settings.nodeProgramClasses[u];i.nodePrograms[u]=new s(i.webGLContexts.nodes,i);var d=s;u in i.settings.nodeHoverProgramClasses&&(d=i.settings.nodeHoverProgramClasses[u]),i.nodeHoverPrograms[u]=new d(i.webGLContexts.hoverNodes,i)}for(var u in i.settings.edgeProgramClasses){var m=i.settings.edgeProgramClasses[u];i.edgePrograms[u]=new m(i.webGLContexts.edges,i)}return i.resize(),i.camera=new c.default,i.bindCameraHandlers(),i.mouseCaptor=new h.default(i.elements.mouse,i),i.touchCaptor=new v.default(i.elements.mouse,i),i.bindEventHandlers(),i.bindGraphHandlers(),i.handleSettingsUpdate(),i.process(),i.render(),i}return i(e,t),e.prototype.createCanvas=function(t){var e=(0,f.createElement)("canvas",{position:"absolute"},{class:"sigma-".concat(t)});return this.elements[t]=e,this.container.appendChild(e),e},e.prototype.createCanvasContext=function(t){var e=this.createCanvas(t);return this.canvasContexts[t]=e.getContext("2d",{preserveDrawingBuffer:!1,antialias:!1}),this},e.prototype.createWebGLContext=function(t,e){var r,n=this.createCanvas(t),i=o({preserveDrawingBuffer:!1,antialias:!1},e||{});return(r=n.getContext("webgl2",i))||(r=n.getContext("webgl",i)),r||(r=n.getContext("experimental-webgl",i)),this.webGLContexts[t]=r,this},e.prototype.bindCameraHandlers=function(){var t=this;return this.activeListeners.camera=function(){t._scheduleRefresh()},this.camera.on("updated",this.activeListeners.camera),this},e.prototype.mouseIsOnNode=function(t,e,r){var n=t.x,i=t.y,o=e.x,a=e.y;return n>o-r&&n<o+r&&i>a-r&&i<a+r&&Math.sqrt(Math.pow(n-o,2)+Math.pow(i-a,2))<r},e.prototype.getQuadNodes=function(t){var e=this.viewportToFramedGraph(t);return this.quadtree.point(e.x,1-e.y)},e.prototype.getNodeAtPosition=function(t){for(var e=t.x,r=t.y,n=this.getQuadNodes(t),i=1/0,o=null,a=0,u=n.length;a<u;a++){var s=n[a],c=this.nodeDataCache[s],h=this.framedGraphToViewport(c),l=this.scaleSize(c.size);if(!c.hidden&&this.mouseIsOnNode(t,h,l)){var d=Math.sqrt(Math.pow(e-h.x,2)+Math.pow(r-h.y,2));d<i&&(i=d,o=s)}}return o},e.prototype.bindEventHandlers=function(){var t=this;this.activeListeners.handleResize=function(){t.needToSoftProcess=!0,t._scheduleRefresh()},window.addEventListener("resize",this.activeListeners.handleResize),this.activeListeners.handleMove=function(e){var r={event:e,preventSigmaDefault:function(){e.preventSigmaDefault()}},n=t.getNodeAtPosition(e);if(n&&t.hoveredNode!==n&&!t.nodeDataCache[n].hidden)return t.hoveredNode&&t.emit("leaveNode",o(o({},r),{node:t.hoveredNode})),t.hoveredNode=n,t.emit("enterNode",o(o({},r),{node:n})),void t.scheduleHighlightedNodesRender();if(t.hoveredNode){var i=t.nodeDataCache[t.hoveredNode],a=t.framedGraphToViewport(i),u=t.scaleSize(i.size);if(!t.mouseIsOnNode(e,a,u)){var s=t.hoveredNode;return t.hoveredNode=null,t.emit("leaveNode",o(o({},r),{node:s})),void t.scheduleHighlightedNodesRender()}}!0===t.settings.enableEdgeHoverEvents?t.checkEdgeHoverEvents(r):"debounce"===t.settings.enableEdgeHoverEvents&&(t.checkEdgesEventsFrame||(t.checkEdgesEventsFrame=(0,f.requestFrame)((function(){t.checkEdgeHoverEvents(r),t.checkEdgesEventsFrame=null}))))};var e=function(e){return function(r){var n={event:r,preventSigmaDefault:function(){r.preventSigmaDefault()}},i=r.original.isFakeSigmaMouseEvent?t.getNodeAtPosition(r):t.hoveredNode;if(i)return t.emit("".concat(e,"Node"),o(o({},n),{node:i}));if("wheel"===e?t.settings.enableEdgeWheelEvents:t.settings.enableEdgeClickEvents){var a=t.getEdgeAtPoint(r.x,r.y);if(a)return t.emit("".concat(e,"Edge"),o(o({},n),{edge:a}))}return t.emit("".concat(e,"Stage"),n)}};return this.activeListeners.handleClick=e("click"),this.activeListeners.handleRightClick=e("rightClick"),this.activeListeners.handleDoubleClick=e("doubleClick"),this.activeListeners.handleWheel=e("wheel"),this.activeListeners.handleDown=e("down"),this.mouseCaptor.on("mousemove",this.activeListeners.handleMove),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},e.prototype.bindGraphHandlers=function(){var t=this,e=this.graph;return this.activeListeners.graphUpdate=function(){t.needToProcess=!0,t._scheduleRefresh()},this.activeListeners.softGraphUpdate=function(){t.needToSoftProcess=!0,t._scheduleRefresh()},this.activeListeners.dropNodeGraphUpdate=function(e){delete t.nodeDataCache[e.key],t.hoveredNode===e.key&&(t.hoveredNode=null),t.activeListeners.graphUpdate()},this.activeListeners.dropEdgeGraphUpdate=function(e){delete t.edgeDataCache[e.key],t.hoveredEdge===e.key&&(t.hoveredEdge=null),t.activeListeners.graphUpdate()},this.activeListeners.clearEdgesGraphUpdate=function(){t.edgeDataCache={},t.hoveredEdge=null,t.activeListeners.graphUpdate()},this.activeListeners.clearGraphUpdate=function(){t.nodeDataCache={},t.hoveredNode=null,t.activeListeners.clearEdgesGraphUpdate()},e.on("nodeAdded",this.activeListeners.graphUpdate),e.on("nodeDropped",this.activeListeners.dropNodeGraphUpdate),e.on("nodeAttributesUpdated",this.activeListeners.softGraphUpdate),e.on("eachNodeAttributesUpdated",this.activeListeners.graphUpdate),e.on("edgeAdded",this.activeListeners.graphUpdate),e.on("edgeDropped",this.activeListeners.dropEdgeGraphUpdate),e.on("edgeAttributesUpdated",this.activeListeners.softGraphUpdate),e.on("eachEdgeAttributesUpdated",this.activeListeners.graphUpdate),e.on("edgesCleared",this.activeListeners.clearEdgesGraphUpdate),e.on("cleared",this.activeListeners.clearGraphUpdate),this},e.prototype.unbindGraphHandlers=function(){var t=this.graph;t.removeListener("nodeAdded",this.activeListeners.graphUpdate),t.removeListener("nodeDropped",this.activeListeners.dropNodeGraphUpdate),t.removeListener("nodeAttributesUpdated",this.activeListeners.softGraphUpdate),t.removeListener("eachNodeAttributesUpdated",this.activeListeners.graphUpdate),t.removeListener("edgeAdded",this.activeListeners.graphUpdate),t.removeListener("edgeDropped",this.activeListeners.dropEdgeGraphUpdate),t.removeListener("edgeAttributesUpdated",this.activeListeners.softGraphUpdate),t.removeListener("eachEdgeAttributesUpdated",this.activeListeners.graphUpdate),t.removeListener("edgesCleared",this.activeListeners.clearEdgesGraphUpdate),t.removeListener("cleared",this.activeListeners.clearGraphUpdate)},e.prototype.checkEdgeHoverEvents=function(t){var e=this.hoveredNode?null:this.getEdgeAtPoint(t.event.x,t.event.y);return e!==this.hoveredEdge&&(this.hoveredEdge&&this.emit("leaveEdge",o(o({},t),{edge:this.hoveredEdge})),e&&this.emit("enterEdge",o(o({},t),{edge:e})),this.hoveredEdge=e),this},e.prototype.getEdgeAtPoint=function(t,e){var r,n,i=this,o=this.edgeDataCache,u=this.nodeDataCache;if(!(0,m.isPixelColored)(this.webGLContexts.edges,t*this.pixelRatio,e*this.pixelRatio))return null;var s=this.viewportToGraph({x:t,y:e}),c=s.x,h=s.y,l=0;if(this.graph.someEdge((function(t,e,r,n,a,s){var c=a.x,h=a.y,d=s.x,f=s.y;if(o[t].hidden||u[r].hidden||u[n].hidden)return!1;if(c!==d||h!==f){var p=Math.sqrt(Math.pow(d-c,2)+Math.pow(f-h,2)),g=i.graphToViewport({x:c,y:h}),v=g.x,y=g.y,m=i.graphToViewport({x:d,y:f}),b=m.x,w=m.y,_=Math.sqrt(Math.pow(b-v,2)+Math.pow(w-y,2));return l=p/_,!0}})),!l)return null;var d=this.graph.filterEdges((function(t,e,r,n,a,s){return!(o[t].hidden||u[r].hidden||u[n].hidden)&&(!!(0,m.doEdgeCollideWithPoint)(c,h,a.x,a.y,s.x,s.y,o[t].size*l/i.cameraSizeRatio)||void 0)}));if(0===d.length)return null;var f=d[d.length-1],p=-1/0;try{for(var g=a(d),v=g.next();!v.done;v=g.next()){var y=v.value,b=this.graph.getEdgeAttribute(y,"zIndex");b>=p&&(f=y,p=b)}}catch(t){r={error:t}}finally{try{v&&!v.done&&(n=g.return)&&n.call(g)}finally{if(r)throw r.error}}return f},e.prototype.process=function(t){var e=this;void 0===t&&(t=!1);var r=this.graph,n=this.settings,i=this.getDimensions(),o=[1/0,-1/0],a=[1/0,-1/0];this.quadtree.clear(),this.labelGrid.resizeAndClear(i,n.labelGridCellSize),this.highlightedNodes=new Set,this.nodeExtent=(0,f.graphExtent)(r),this.nodesWithForcedLabels=[],this.edgesWithForcedLabels=[];var u=new c.default,s=(0,f.matrixFromCamera)(u.getState(),this.getDimensions(),this.getGraphDimensions(),this.getSetting("stagePadding")||0);this.normalizationFunction=(0,f.createNormalizationFunction)(this.customBBox||this.nodeExtent);for(var h={},l=r.nodes(),d=0,p=l.length;d<p;d++){var g=l[d],v=Object.assign({},r.getNodeAttributes(g));n.nodeReducer&&(v=n.nodeReducer(g,v)),h[(m=b(this.settings,g,v)).type]=(h[m.type]||0)+1,this.nodeDataCache[g]=m,this.normalizationFunction.applyTo(m),m.forceLabel&&this.nodesWithForcedLabels.push(g),this.settings.zIndex&&(m.zIndex<o[0]&&(o[0]=m.zIndex),m.zIndex>o[1]&&(o[1]=m.zIndex))}for(var y in this.nodePrograms){if(!this.nodePrograms.hasOwnProperty(y))throw new Error('Sigma: could not find a suitable program for node type "'.concat(y,'"!'));t||this.nodePrograms[y].allocate(h[y]||0),h[y]=0}for(this.settings.zIndex&&o[0]!==o[1]&&(l=(0,f.zIndexOrdering)(o,(function(t){return e.nodeDataCache[t].zIndex}),l)),d=0,p=l.length;d<p;d++){g=l[d];var m=this.nodeDataCache[g];this.quadtree.add(g,m.x,1-m.y,m.size/this.width),"string"!=typeof m.label||m.hidden||this.labelGrid.add(g,m.size,this.framedGraphToViewport(m,{matrix:s}));var _=this.nodePrograms[m.type];if(!_)throw new Error('Sigma: could not find a suitable program for node type "'.concat(m.type,'"!'));_.process(m,m.hidden,h[m.type]++),m.highlighted&&!m.hidden&&this.highlightedNodes.add(g)}this.labelGrid.organize();var x={},E=r.edges();for(d=0,p=E.length;d<p;d++){var A=E[d];v=Object.assign({},r.getEdgeAttributes(A)),n.edgeReducer&&(v=n.edgeReducer(A,v)),x[(m=w(this.settings,0,v)).type]=(x[m.type]||0)+1,this.edgeDataCache[A]=m,m.forceLabel&&!m.hidden&&this.edgesWithForcedLabels.push(A),this.settings.zIndex&&(m.zIndex<a[0]&&(a[0]=m.zIndex),m.zIndex>a[1]&&(a[1]=m.zIndex))}for(var y in this.edgePrograms){if(!this.edgePrograms.hasOwnProperty(y))throw new Error('Sigma: could not find a suitable program for edge type "'.concat(y,'"!'));t||this.edgePrograms[y].allocate(x[y]||0),x[y]=0}for(this.settings.zIndex&&a[0]!==a[1]&&(E=(0,f.zIndexOrdering)(a,(function(t){return e.edgeDataCache[t].zIndex}),E)),d=0,p=E.length;d<p;d++){A=E[d],m=this.edgeDataCache[A];var L=r.extremities(A),k=this.nodeDataCache[L[0]],C=this.nodeDataCache[L[1]],S=m.hidden||k.hidden||C.hidden;this.edgePrograms[m.type].process(k,C,m,S,x[m.type]++)}for(var y in this.edgePrograms){var M=this.edgePrograms[y];t||"function"!=typeof M.computeIndices||M.computeIndices()}return this},e.prototype.handleSettingsUpdate=function(){return this.camera.minRatio=this.settings.minCameraRatio,this.camera.maxRatio=this.settings.maxCameraRatio,this.camera.setState(this.camera.validateState(this.camera.getState())),this},e.prototype._refresh=function(){return this.needToProcess?this.process():this.needToSoftProcess&&this.process(!0),this.needToProcess=!1,this.needToSoftProcess=!1,this.render(),this},e.prototype._scheduleRefresh=function(){var t=this;return this.renderFrame||(this.renderFrame=(0,f.requestFrame)((function(){t._refresh(),t.renderFrame=null}))),this},e.prototype.renderLabels=function(){if(!this.settings.renderLabels)return this;var t=this.camera.getState(),e=this.labelGrid.getLabelsToDisplay(t.ratio,this.settings.labelDensity);(0,s.default)(e,this.nodesWithForcedLabels),this.displayedLabels=new Set;for(var r=this.canvasContexts.labels,n=0,i=e.length;n<i;n++){var a=e[n],u=this.nodeDataCache[a];if(!this.displayedLabels.has(a)&&!u.hidden){var c=this.framedGraphToViewport(u),h=c.x,l=c.y,d=this.scaleSize(u.size);!u.forceLabel&&d<this.settings.labelRenderedSizeThreshold||h<-150||h>this.width+150||l<-50||l>this.height+50||(this.displayedLabels.add(a),this.settings.labelRenderer(r,o(o({key:a},u),{size:d,x:h,y:l}),this.settings))}}return this},e.prototype.renderEdgeLabels=function(){if(!this.settings.renderEdgeLabels)return this;var t=this.canvasContexts.edgeLabels;t.clearRect(0,0,this.width,this.height);for(var e=(0,p.edgeLabelsToDisplayFromNodes)({graph:this.graph,hoveredNode:this.hoveredNode,displayedNodeLabels:this.displayedLabels,highlightedNodes:this.highlightedNodes}).concat(this.edgesWithForcedLabels),r=new Set,n=0,i=e.length;n<i;n++){var a=e[n],u=this.graph.extremities(a),s=this.nodeDataCache[u[0]],c=this.nodeDataCache[u[1]],h=this.edgeDataCache[a];r.has(a)||h.hidden||s.hidden||c.hidden||(this.settings.edgeLabelRenderer(t,o(o({key:a},h),{size:this.scaleSize(h.size)}),o(o(o({key:u[0]},s),this.framedGraphToViewport(s)),{size:this.scaleSize(s.size)}),o(o(o({key:u[1]},c),this.framedGraphToViewport(c)),{size:this.scaleSize(c.size)}),this.settings),r.add(a))}return this},e.prototype.renderHighlightedNodes=function(){var t=this,e=this.canvasContexts.hovers;e.clearRect(0,0,this.width,this.height);var r=[];this.hoveredNode&&!this.nodeDataCache[this.hoveredNode].hidden&&r.push(this.hoveredNode),this.highlightedNodes.forEach((function(e){e!==t.hoveredNode&&r.push(e)})),r.forEach((function(r){return function(r){var n=t.nodeDataCache[r],i=t.framedGraphToViewport(n),a=i.x,u=i.y,s=t.scaleSize(n.size);t.settings.hoverRenderer(e,o(o({key:r},n),{size:s,x:a,y:u}),t.settings)}(r)}));var n={};for(var i in r.forEach((function(e){var r=t.nodeDataCache[e].type;n[r]=(n[r]||0)+1})),this.nodeHoverPrograms)this.nodeHoverPrograms[i].allocate(n[i]||0),n[i]=0;for(var i in r.forEach((function(e){var r=t.nodeDataCache[e];t.nodeHoverPrograms[r.type].process(r,r.hidden,n[r.type]++)})),this.webGLContexts.hoverNodes.clear(this.webGLContexts.hoverNodes.COLOR_BUFFER_BIT),this.nodeHoverPrograms){var a=this.nodeHoverPrograms[i];a.bind(),a.bufferData(),a.render({matrix:this.matrix,width:this.width,height:this.height,ratio:this.camera.ratio,correctionRatio:this.correctionRatio/this.camera.ratio,scalingRatio:this.pixelRatio})}},e.prototype.scheduleHighlightedNodesRender=function(){var t=this;this.renderHighlightedNodesFrame||this.renderFrame||(this.renderHighlightedNodesFrame=(0,f.requestFrame)((function(){t.renderHighlightedNodesFrame=null,t.renderHighlightedNodes(),t.renderEdgeLabels()})))},e.prototype.render=function(){var t=this;this.emit("beforeRender");var e=function(){return t.emit("afterRender"),t};if(this.renderFrame&&((0,f.cancelFrame)(this.renderFrame),this.renderFrame=null,this.needToProcess=!1,this.needToSoftProcess=!1),this.resize(),this.clear(),this.updateCachedValues(),!this.graph.order)return e();var r=this.mouseCaptor,n=this.camera.isAnimated()||r.isMoving||r.draggedEvents||r.currentWheelDirection,i=this.camera.getState(),o=this.getDimensions(),a=this.getGraphDimensions(),u=this.getSetting("stagePadding")||0;for(var s in this.matrix=(0,f.matrixFromCamera)(i,o,a,u),this.invMatrix=(0,f.matrixFromCamera)(i,o,a,u,!0),this.correctionRatio=(0,f.getMatrixImpact)(this.matrix,i,o),this.nodePrograms)(c=this.nodePrograms[s]).bind(),c.bufferData(),c.render({matrix:this.matrix,width:this.width,height:this.height,ratio:i.ratio,correctionRatio:this.correctionRatio/i.ratio,scalingRatio:this.pixelRatio});if(!this.settings.hideEdgesOnMove||!n)for(var s in this.edgePrograms){var c;(c=this.edgePrograms[s]).bind(),c.bufferData(),c.render({matrix:this.matrix,width:this.width,height:this.height,ratio:i.ratio,correctionRatio:this.correctionRatio/i.ratio,scalingRatio:this.pixelRatio})}return this.settings.hideLabelsOnMove&&n||(this.renderLabels(),this.renderEdgeLabels(),this.renderHighlightedNodes()),e()},e.prototype.updateCachedValues=function(){var t=this.camera.getState().ratio;this.cameraSizeRatio=Math.sqrt(t)},e.prototype.getCamera=function(){return this.camera},e.prototype.getContainer=function(){return this.container},e.prototype.getGraph=function(){return this.graph},e.prototype.setGraph=function(t){t!==this.graph&&(this.unbindGraphHandlers(),this.nodeDataCache={},this.edgeDataCache={},this.displayedLabels.clear(),this.highlightedNodes.clear(),this.hoveredNode=null,this.hoveredEdge=null,this.nodesWithForcedLabels.length=0,this.edgesWithForcedLabels.length=0,null!==this.checkEdgesEventsFrame&&((0,f.cancelFrame)(this.checkEdgesEventsFrame),this.checkEdgesEventsFrame=null),this.graph=t,this.bindGraphHandlers(),this.process(),this.render())},e.prototype.getMouseCaptor=function(){return this.mouseCaptor},e.prototype.getTouchCaptor=function(){return this.touchCaptor},e.prototype.getDimensions=function(){return{width:this.width,height:this.height}},e.prototype.getGraphDimensions=function(){var t=this.customBBox||this.nodeExtent;return{width:t.x[1]-t.x[0]||1,height:t.y[1]-t.y[0]||1}},e.prototype.getNodeDisplayData=function(t){var e=this.nodeDataCache[t];return e?Object.assign({},e):void 0},e.prototype.getEdgeDisplayData=function(t){var e=this.edgeDataCache[t];return e?Object.assign({},e):void 0},e.prototype.getSettings=function(){return o({},this.settings)},e.prototype.getSetting=function(t){return this.settings[t]},e.prototype.setSetting=function(t,e){return this.settings[t]=e,(0,g.validateSettings)(this.settings),this.handleSettingsUpdate(),this.needToProcess=!0,this._scheduleRefresh(),this},e.prototype.updateSetting=function(t,e){return this.settings[t]=e(this.settings[t]),(0,g.validateSettings)(this.settings),this.handleSettingsUpdate(),this.needToProcess=!0,this._scheduleRefresh(),this},e.prototype.resize=function(){var t=this.width,e=this.height;if(this.width=this.container.offsetWidth,this.height=this.container.offsetHeight,this.pixelRatio=(0,f.getPixelRatio)(),0===this.width){if(!this.settings.allowInvalidContainer)throw new Error("Sigma: Container has no width. You can set the allowInvalidContainer setting to true to stop seeing this error.");this.width=1}if(0===this.height){if(!this.settings.allowInvalidContainer)throw new Error("Sigma: Container has no height. You can set the allowInvalidContainer setting to true to stop seeing this error.");this.height=1}if(t===this.width&&e===this.height)return this;for(var r in this.emit("resize"),this.elements){var n=this.elements[r];n.style.width=this.width+"px",n.style.height=this.height+"px"}for(var r in this.canvasContexts)this.elements[r].setAttribute("width",this.width*this.pixelRatio+"px"),this.elements[r].setAttribute("height",this.height*this.pixelRatio+"px"),1!==this.pixelRatio&&this.canvasContexts[r].scale(this.pixelRatio,this.pixelRatio);for(var r in this.webGLContexts)this.elements[r].setAttribute("width",this.width*this.pixelRatio+"px"),this.elements[r].setAttribute("height",this.height*this.pixelRatio+"px"),this.webGLContexts[r].viewport(0,0,this.width*this.pixelRatio,this.height*this.pixelRatio);return this},e.prototype.clear=function(){return this.webGLContexts.nodes.clear(this.webGLContexts.nodes.COLOR_BUFFER_BIT),this.webGLContexts.edges.clear(this.webGLContexts.edges.COLOR_BUFFER_BIT),this.webGLContexts.hoverNodes.clear(this.webGLContexts.hoverNodes.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},e.prototype.refresh=function(){return this.needToProcess=!0,this._refresh(),this},e.prototype.scheduleRefresh=function(){return this.needToProcess=!0,this._scheduleRefresh(),this},e.prototype.getViewportZoomedState=function(t,e){var r=this.camera.getState(),n=r.ratio,i=r.angle,o=r.x,a=r.y,u=e/n,s={x:this.width/2,y:this.height/2},c=this.viewportToFramedGraph(t),h=this.viewportToFramedGraph(s);return{angle:i,x:(c.x-h.x)*(1-u)+o,y:(c.y-h.y)*(1-u)+a,ratio:e}},e.prototype.viewRectangle=function(){var t=0*this.width/8,e=0*this.height/8,r=this.viewportToFramedGraph({x:0-t,y:0-e}),n=this.viewportToFramedGraph({x:this.width+t,y:0-e}),i=this.viewportToFramedGraph({x:0,y:this.height+e});return{x1:r.x,y1:r.y,x2:n.x,y2:n.y,height:n.y-i.y}},e.prototype.framedGraphToViewport=function(t,e){void 0===e&&(e={});var r=!!e.cameraState||!!e.viewportDimensions||!!e.graphDimensions,n=e.matrix?e.matrix:r?(0,f.matrixFromCamera)(e.cameraState||this.camera.getState(),e.viewportDimensions||this.getDimensions(),e.graphDimensions||this.getGraphDimensions(),e.padding||this.getSetting("stagePadding")||0):this.matrix,i=(0,y.multiplyVec2)(n,t);return{x:(1+i.x)*this.width/2,y:(1-i.y)*this.height/2}},e.prototype.viewportToFramedGraph=function(t,e){void 0===e&&(e={});var r=!!e.cameraState||!!e.viewportDimensions||!e.graphDimensions,n=e.matrix?e.matrix:r?(0,f.matrixFromCamera)(e.cameraState||this.camera.getState(),e.viewportDimensions||this.getDimensions(),e.graphDimensions||this.getGraphDimensions(),e.padding||this.getSetting("stagePadding")||0,!0):this.invMatrix,i=(0,y.multiplyVec2)(n,{x:t.x/this.width*2-1,y:1-t.y/this.height*2});return isNaN(i.x)&&(i.x=0),isNaN(i.y)&&(i.y=0),i},e.prototype.viewportToGraph=function(t,e){return void 0===e&&(e={}),this.normalizationFunction.inverse(this.viewportToFramedGraph(t,e))},e.prototype.graphToViewport=function(t,e){return void 0===e&&(e={}),this.framedGraphToViewport(this.normalizationFunction(t),e)},e.prototype.getBBox=function(){return(0,f.graphExtent)(this.graph)},e.prototype.getCustomBBox=function(){return this.customBBox},e.prototype.setCustomBBox=function(t){return this.customBBox=t,this._scheduleRefresh(),this},e.prototype.kill=function(){this.emit("kill"),this.removeAllListeners(),this.camera.removeListener("updated",this.activeListeners.camera),window.removeEventListener("resize",this.activeListeners.handleResize),this.mouseCaptor.kill(),this.touchCaptor.kill(),this.unbindGraphHandlers(),this.quadtree=new l.default,this.nodeDataCache={},this.edgeDataCache={},this.nodesWithForcedLabels=[],this.edgesWithForcedLabels=[],this.highlightedNodes.clear(),this.renderFrame&&((0,f.cancelFrame)(this.renderFrame),this.renderFrame=null),this.renderHighlightedNodesFrame&&((0,f.cancelFrame)(this.renderHighlightedNodesFrame),this.renderHighlightedNodesFrame=null);for(var t=this.container;t.firstChild;)t.removeChild(t.firstChild)},e.prototype.scaleSize=function(t){return t/this.cameraSizeRatio},e.prototype.getCanvases=function(){return o({},this.elements)},e}(d.TypedEventEmitter);e.default=_},30432:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.TypedEventEmitter=void 0;var o=function(t){function e(){var e=t.call(this)||this;return e.rawEmitter=e,e}return i(e,t),e}(r(22699).EventEmitter);e.TypedEventEmitter=o},31181:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.animateNodes=e.ANIMATE_DEFAULTS=void 0;var i=r(88586),o=n(r(2383));e.ANIMATE_DEFAULTS={easing:"quadraticInOut",duration:150},e.animateNodes=function(t,r,n,a){var u=Object.assign({},e.ANIMATE_DEFAULTS,n),s="function"==typeof u.easing?u.easing:o.default[u.easing],c=Date.now(),h={};for(var l in r){var d=r[l];for(var f in h[l]={},d)h[l][f]=t.getNodeAttribute(l,f)}var p=null,g=function(){p=null;var e=(Date.now()-c)/u.duration;if(e>=1){for(var n in r){var o=r[n];for(var l in o)t.setNodeAttribute(n,l,o[l])}"function"==typeof a&&a()}else{for(var n in e=s(e),r){o=r[n];var d=h[n];for(var l in o)t.setNodeAttribute(n,l,o[l]*e+d[l]*(1-e))}p=(0,i.requestFrame)(g)}};return g(),function(){p&&(0,i.cancelFrame)(p)}}},71078:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HTML_COLORS=void 0,e.HTML_COLORS={black:"#000000",silver:"#C0C0C0",gray:"#808080",grey:"#808080",white:"#FFFFFF",maroon:"#800000",red:"#FF0000",purple:"#800080",fuchsia:"#FF00FF",green:"#008000",lime:"#00FF00",olive:"#808000",yellow:"#FFFF00",navy:"#000080",blue:"#0000FF",teal:"#008080",aqua:"#00FFFF",darkblue:"#00008B",mediumblue:"#0000CD",darkgreen:"#006400",darkcyan:"#008B8B",deepskyblue:"#00BFFF",darkturquoise:"#00CED1",mediumspringgreen:"#00FA9A",springgreen:"#00FF7F",cyan:"#00FFFF",midnightblue:"#191970",dodgerblue:"#1E90FF",lightseagreen:"#20B2AA",forestgreen:"#228B22",seagreen:"#2E8B57",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",limegreen:"#32CD32",mediumseagreen:"#3CB371",turquoise:"#40E0D0",royalblue:"#4169E1",steelblue:"#4682B4",darkslateblue:"#483D8B",mediumturquoise:"#48D1CC",indigo:"#4B0082",darkolivegreen:"#556B2F",cadetblue:"#5F9EA0",cornflowerblue:"#6495ED",rebeccapurple:"#663399",mediumaquamarine:"#66CDAA",dimgray:"#696969",dimgrey:"#696969",slateblue:"#6A5ACD",olivedrab:"#6B8E23",slategray:"#708090",slategrey:"#708090",lightslategray:"#778899",lightslategrey:"#778899",mediumslateblue:"#7B68EE",lawngreen:"#7CFC00",chartreuse:"#7FFF00",aquamarine:"#7FFFD4",skyblue:"#87CEEB",lightskyblue:"#87CEFA",blueviolet:"#8A2BE2",darkred:"#8B0000",darkmagenta:"#8B008B",saddlebrown:"#8B4513",darkseagreen:"#8FBC8F",lightgreen:"#90EE90",mediumpurple:"#9370DB",darkviolet:"#9400D3",palegreen:"#98FB98",darkorchid:"#9932CC",yellowgreen:"#9ACD32",sienna:"#A0522D",brown:"#A52A2A",darkgray:"#A9A9A9",darkgrey:"#A9A9A9",lightblue:"#ADD8E6",greenyellow:"#ADFF2F",paleturquoise:"#AFEEEE",lightsteelblue:"#B0C4DE",powderblue:"#B0E0E6",firebrick:"#B22222",darkgoldenrod:"#B8860B",mediumorchid:"#BA55D3",rosybrown:"#BC8F8F",darkkhaki:"#BDB76B",mediumvioletred:"#C71585",indianred:"#CD5C5C",peru:"#CD853F",chocolate:"#D2691E",tan:"#D2B48C",lightgray:"#D3D3D3",lightgrey:"#D3D3D3",thistle:"#D8BFD8",orchid:"#DA70D6",goldenrod:"#DAA520",palevioletred:"#DB7093",crimson:"#DC143C",gainsboro:"#DCDCDC",plum:"#DDA0DD",burlywood:"#DEB887",lightcyan:"#E0FFFF",lavender:"#E6E6FA",darksalmon:"#E9967A",violet:"#EE82EE",palegoldenrod:"#EEE8AA",lightcoral:"#F08080",khaki:"#F0E68C",aliceblue:"#F0F8FF",honeydew:"#F0FFF0",azure:"#F0FFFF",sandybrown:"#F4A460",wheat:"#F5DEB3",beige:"#F5F5DC",whitesmoke:"#F5F5F5",mintcream:"#F5FFFA",ghostwhite:"#F8F8FF",salmon:"#FA8072",antiquewhite:"#FAEBD7",linen:"#FAF0E6",lightgoldenrodyellow:"#FAFAD2",oldlace:"#FDF5E6",magenta:"#FF00FF",deeppink:"#FF1493",orangered:"#FF4500",tomato:"#FF6347",hotpink:"#FF69B4",coral:"#FF7F50",darkorange:"#FF8C00",lightsalmon:"#FFA07A",orange:"#FFA500",lightpink:"#FFB6C1",pink:"#FFC0CB",gold:"#FFD700",peachpuff:"#FFDAB9",navajowhite:"#FFDEAD",moccasin:"#FFE4B5",bisque:"#FFE4C4",mistyrose:"#FFE4E1",blanchedalmond:"#FFEBCD",papayawhip:"#FFEFD5",lavenderblush:"#FFF0F5",seashell:"#FFF5EE",cornsilk:"#FFF8DC",lemonchiffon:"#FFFACD",floralwhite:"#FFFAF0",snow:"#FFFAFA",lightyellow:"#FFFFE0",ivory:"#FFFFF0"}},2383:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.cubicInOut=e.cubicOut=e.cubicIn=e.quadraticInOut=e.quadraticOut=e.quadraticIn=e.linear=void 0,e.linear=function(t){return t},e.quadraticIn=function(t){return t*t},e.quadraticOut=function(t){return t*(2-t)},e.quadraticInOut=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},e.cubicIn=function(t){return t*t*t},e.cubicOut=function(t){return--t*t*t+1},e.cubicInOut=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)};var r={linear:e.linear,quadraticIn:e.quadraticIn,quadraticOut:e.quadraticOut,quadraticInOut:e.quadraticInOut,cubicIn:e.cubicIn,cubicOut:e.cubicOut,cubicInOut:e.cubicInOut};e.default=r},38073:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.doEdgeCollideWithPoint=e.isPixelColored=void 0,e.isPixelColored=function(t,e,r){var n=new Uint8Array(4);return t.readPixels(e,t.drawingBufferHeight-r,1,1,t.RGBA,t.UNSIGNED_BYTE,n),n[3]>0},e.doEdgeCollideWithPoint=function(t,e,r,n,i,o,a){return!(t<r-a&&t<i-a||e<n-a&&e<o-a||t>r+a&&t>i+a||e>n+a&&e>o+a||!(Math.abs((i-r)*(n-e)-(r-t)*(o-n))/Math.sqrt(Math.pow(i-r,2)+Math.pow(o-n,2))<a/2))}},88586:function(t,e,r){"use strict";var n=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.validateGraph=e.canUse32BitsIndices=e.extractPixel=e.getMatrixImpact=e.matrixFromCamera=e.getCorrectionRatio=e.floatColor=e.floatArrayColor=e.parseColor=e.zIndexOrdering=e.createNormalizationFunction=e.graphExtent=e.getPixelRatio=e.createElement=e.cancelFrame=e.requestFrame=e.assignDeep=e.assign=e.isPlainObject=void 0;var o=i(r(31880)),a=r(42237),u=r(71078);function s(t){return"object"==typeof t&&null!==t&&t.constructor===Object}e.isPlainObject=s,e.assign=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];t=t||{};for(var n=0,i=e.length;n<i;n++){var o=e[n];o&&Object.assign(t,o)}return t},e.assignDeep=function t(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];e=e||{};for(var i=0,o=r.length;i<o;i++){var a=r[i];if(a)for(var u in a)s(a[u])?e[u]=t(e[u],a[u]):e[u]=a[u]}return e},e.requestFrame="undefined"!=typeof requestAnimationFrame?function(t){return requestAnimationFrame(t)}:function(t){return setTimeout(t,0)},e.cancelFrame="undefined"!=typeof cancelAnimationFrame?function(t){return cancelAnimationFrame(t)}:function(t){return clearTimeout(t)},e.createElement=function(t,e,r){var n=document.createElement(t);if(e)for(var i in e)n.style[i]=e[i];if(r)for(var i in r)n.setAttribute(i,r[i]);return n},e.getPixelRatio=function(){return void 0!==window.devicePixelRatio?window.devicePixelRatio:1},e.graphExtent=function(t){if(!t.order)return{x:[0,1],y:[0,1]};var e=1/0,r=-1/0,n=1/0,i=-1/0;return t.forEachNode((function(t,o){var a=o.x,u=o.y;a<e&&(e=a),a>r&&(r=a),u<n&&(n=u),u>i&&(i=u)})),{x:[e,r],y:[n,i]}},e.createNormalizationFunction=function(t){var e=n(t.x,2),r=e[0],i=e[1],o=n(t.y,2),a=o[0],u=o[1],s=Math.max(i-r,u-a),c=(i+r)/2,h=(u+a)/2;(0===s||Math.abs(s)===1/0||isNaN(s))&&(s=1),isNaN(c)&&(c=0),isNaN(h)&&(h=0);var l=function(t){return{x:.5+(t.x-c)/s,y:.5+(t.y-h)/s}};return l.applyTo=function(t){t.x=.5+(t.x-c)/s,t.y=.5+(t.y-h)/s},l.inverse=function(t){return{x:c+s*(t.x-.5),y:h+s*(t.y-.5)}},l.ratio=s,l},e.zIndexOrdering=function(t,e,r){return r.sort((function(t,r){var n=e(t)||0,i=e(r)||0;return n<i?-1:n>i?1:0}))};var c=new Int8Array(4),h=new Int32Array(c.buffer,0,1),l=new Float32Array(c.buffer,0,1),d=/^\s*rgba?\s*\(/,f=/^\s*rgba?\s*\(\s*([0-9]*)\s*,\s*([0-9]*)\s*,\s*([0-9]*)(?:\s*,\s*(.*)?)?\)\s*$/;function p(t){var e=0,r=0,n=0,i=1;if("#"===t[0])4===t.length?(e=parseInt(t.charAt(1)+t.charAt(1),16),r=parseInt(t.charAt(2)+t.charAt(2),16),n=parseInt(t.charAt(3)+t.charAt(3),16)):(e=parseInt(t.charAt(1)+t.charAt(2),16),r=parseInt(t.charAt(3)+t.charAt(4),16),n=parseInt(t.charAt(5)+t.charAt(6),16)),9===t.length&&(i=parseInt(t.charAt(7)+t.charAt(8),16)/255);else if(d.test(t)){var o=t.match(f);o&&(e=+o[1],r=+o[2],n=+o[3],o[4]&&(i=+o[4]))}return{r:e,g:r,b:n,a:i}}e.parseColor=p;var g={};for(var v in u.HTML_COLORS)g[v]=y(u.HTML_COLORS[v]),g[u.HTML_COLORS[v]]=g[v];function y(t){if(void 0!==g[t])return g[t];var e=p(t),r=e.r,n=e.g,i=e.b,o=e.a;o=255*o|0,h[0]=4278190079&(o<<24|i<<16|n<<8|r);var a=l[0];return g[t]=a,a}function m(t,e){var r=t.height/t.width,n=e.height/e.width;return r<1&&n>1||r>1&&n<1?1:Math.min(Math.max(n,1/n),Math.max(1/r,r))}e.floatArrayColor=function(t){var e=p(t=u.HTML_COLORS[t]||t),r=e.r,n=e.g,i=e.b,o=e.a;return new Float32Array([r/255,n/255,i/255,o])},e.floatColor=y,e.getCorrectionRatio=m,e.matrixFromCamera=function(t,e,r,n,i){var o=t.angle,u=t.ratio,s=t.x,c=t.y,h=e.width,l=e.height,d=(0,a.identity)(),f=Math.min(h,l)-2*n,p=m(e,r);return i?((0,a.multiply)(d,(0,a.translate)((0,a.identity)(),s,c)),(0,a.multiply)(d,(0,a.scale)((0,a.identity)(),u)),(0,a.multiply)(d,(0,a.rotate)((0,a.identity)(),o)),(0,a.multiply)(d,(0,a.scale)((0,a.identity)(),h/f/2/p,l/f/2/p))):((0,a.multiply)(d,(0,a.scale)((0,a.identity)(),f/h*2*p,f/l*2*p)),(0,a.multiply)(d,(0,a.rotate)((0,a.identity)(),-o)),(0,a.multiply)(d,(0,a.scale)((0,a.identity)(),1/u)),(0,a.multiply)(d,(0,a.translate)((0,a.identity)(),-s,-c))),d},e.getMatrixImpact=function(t,e,r){var n=(0,a.multiplyVec2)(t,{x:Math.cos(e.angle),y:Math.sin(e.angle)},0),i=n.x,o=n.y;return 1/Math.sqrt(Math.pow(i,2)+Math.pow(o,2))/r.width},e.extractPixel=function(t,e,r,n){var i=n||new Uint8Array(4);return t.readPixels(e,r,1,1,t.RGBA,t.UNSIGNED_BYTE,i),i},e.canUse32BitsIndices=function(t){return"undefined"!=typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext||!!t.getExtension("OES_element_index_uint")},e.validateGraph=function(t){if(!(0,o.default)(t))throw new Error("Sigma: invalid graph instance.");t.forEachNode((function(t,e){if(!Number.isFinite(e.x)||!Number.isFinite(e.y))throw new Error("Sigma: Coordinates of node ".concat(t," are invalid. A node must have a numeric 'x' and 'y' attribute."))}))}},42237:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.multiplyVec2=e.multiply=e.translate=e.rotate=e.scale=e.identity=void 0,e.identity=function(){return Float32Array.of(1,0,0,0,1,0,0,0,1)},e.scale=function(t,e,r){return t[0]=e,t[4]="number"==typeof r?r:e,t},e.rotate=function(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=r,t[3]=-r,t[4]=n,t},e.translate=function(t,e,r){return t[6]=e,t[7]=r,t},e.multiply=function(t,e){var r=t[0],n=t[1],i=t[2],o=t[3],a=t[4],u=t[5],s=t[6],c=t[7],h=t[8],l=e[0],d=e[1],f=e[2],p=e[3],g=e[4],v=e[5],y=e[6],m=e[7],b=e[8];return t[0]=l*r+d*o+f*s,t[1]=l*n+d*a+f*c,t[2]=l*i+d*u+f*h,t[3]=p*r+g*o+v*s,t[4]=p*n+g*a+v*c,t[5]=p*i+g*u+v*h,t[6]=y*r+m*o+b*s,t[7]=y*n+m*a+b*c,t[8]=y*i+m*u+b*h,t},e.multiplyVec2=function(t,e,r){void 0===r&&(r=1);var n=t[0],i=t[1],o=t[3],a=t[4],u=t[6],s=t[7],c=e.x,h=e.y;return{x:c*n+h*o+u*r,y:c*i+h*a+s*r}}}}]);
|
|
2
|
+
!function(){try{var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e=(new Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="f8678f65-a104-41e1-9d35-e27ace6e573b",t._sentryDebugIdIdentifier="sentry-dbid-f8678f65-a104-41e1-9d35-e27ace6e573b")}catch(t){}}();var _global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};_global.SENTRY_RELEASE={id:"1.4.1683"},(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[3144],{812:(t,e,r)=>{"use strict";var n=r(71600);e.Z=void 0;var i=n(r(68671)),o=r(52322),a=(0,i.default)((0,o.jsx)("path",{d:"m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward");e.Z=a},16e3:(t,e,r)=>{"use strict";var n=r(71600);e.Z=void 0;var i=n(r(68671)),o=r(52322),a=(0,i.default)((0,o.jsx)("path",{d:"M7.38 21.01c.49.49 1.28.49 1.77 0l8.31-8.31c.39-.39.39-1.02 0-1.41L9.15 2.98c-.49-.49-1.28-.49-1.77 0s-.49 1.28 0 1.77L14.62 12l-7.25 7.25c-.48.48-.48 1.28.01 1.76z"}),"ArrowForwardIosRounded");e.Z=a},74654:(t,e,r)=>{"use strict";var n=r(71600);e.Z=void 0;var i=n(r(68671)),o=r(52322),a=(0,i.default)((0,o.jsx)("path",{d:"m4 12 1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"}),"ArrowUpward");e.Z=a},70369:(t,e,r)=>{"use strict";var n=r(71600);e.Z=void 0;var i=n(r(68671)),o=r(52322),a=(0,i.default)((0,o.jsx)("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"}),"Create");e.Z=a},13510:(t,e,r)=>{"use strict";var n=r(71600);e.Z=void 0;var i=n(r(68671)),o=r(52322),a=(0,i.default)((0,o.jsx)("path",{d:"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"}),"History");e.Z=a},36592:(t,e,r)=>{"use strict";var n=r(71600);e.Z=void 0;var i=n(r(68671)),o=r(52322),a=(0,i.default)((0,o.jsx)("path",{d:"M19 3H4.99c-1.11 0-1.98.89-1.98 2L3 19c0 1.1.88 2 1.99 2H19c1.1 0 2-.9 2-2V5c0-1.11-.9-2-2-2zm0 12h-4c0 1.66-1.35 3-3 3s-3-1.34-3-3H4.99V5H19v10z"}),"Inbox");e.Z=a},89025:(t,e,r)=>{"use strict";var n=r(71600);e.Z=void 0;var i=n(r(68671)),o=r(52322),a=(0,i.default)((0,o.jsx)("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"}),"InfoOutlined");e.Z=a},93400:(t,e,r)=>{"use strict";var n=r(71600);e.Z=void 0;var i=n(r(68671)),o=r(52322),a=(0,i.default)((0,o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 15c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1s1 .45 1 1v4c0 .55-.45 1-1 1zm1-8h-2V7h2v2z"}),"InfoRounded");e.Z=a},35299:(t,e,r)=>{"use strict";var n=r(71600);e.Z=void 0;var i=n(r(68671)),o=r(52322),a=(0,i.default)((0,o.jsx)("path",{d:"M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm8.94 3c-.46-4.17-3.77-7.48-7.94-7.94V1h-2v2.06C6.83 3.52 3.52 6.83 3.06 11H1v2h2.06c.46 4.17 3.77 7.48 7.94 7.94V23h2v-2.06c4.17-.46 7.48-3.77 7.94-7.94H23v-2h-2.06zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"}),"MyLocation");e.Z=a},81087:(t,e,r)=>{"use strict";var n=r(71600);e.Z=void 0;var i=n(r(68671)),o=r(52322),a=(0,i.default)((0,o.jsx)("path",{d:"M19 13H5v-2h14v2z"}),"Remove");e.Z=a},944:(t,e,r)=>{"use strict";var n=r(71600);e.Z=void 0;var i=n(r(68671)),o=r(52322),a=(0,i.default)((0,o.jsx)("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}),"ReportProblem");e.Z=a},71976:(t,e,r)=>{"use strict";var n=r(71600);e.Z=void 0;var i=n(r(68671)),o=r(52322),a=(0,i.default)((0,o.jsx)("path",{d:"M15 3H6c-.83 0-1.54.5-1.84 1.22l-3.02 7.05c-.09.23-.14.47-.14.73v2c0 1.1.9 2 2 2h6.31l-.95 4.57-.03.32c0 .41.17.79.44 1.06L9.83 23l6.59-6.59c.36-.36.58-.86.58-1.41V5c0-1.1-.9-2-2-2zm4 0v12h4V3h-4z"}),"ThumbDown");e.Z=a},18876:(t,e,r)=>{"use strict";var n=r(71600);e.Z=void 0;var i=n(r(68671)),o=r(52322),a=(0,i.default)((0,o.jsx)("path",{d:"M1 21h4V9H1v12zm22-11c0-1.1-.9-2-2-2h-6.31l.95-4.57.03-.32c0-.41-.17-.79-.44-1.06L14.17 1 7.59 7.59C7.22 7.95 7 8.45 7 9v10c0 1.1.9 2 2 2h9c.83 0 1.54-.5 1.84-1.22l3.02-7.05c.09-.23.14-.47.14-.73v-2z"}),"ThumbUp");e.Z=a},46339:(t,e,r)=>{"use strict";r.d(e,{C6:()=>_,AH:()=>w,sG:()=>b,$j:()=>m,eP:()=>f,Ys:()=>d,Vr:()=>l});var n=r(24328),i=r.n(n),o=r(76635),a=r(98996),u=r.n(a),s=r(49358);const c=(0,n.createContext)(null),h=c.Provider;function l(){const t=(0,n.useContext)(c);if(null==t)throw new Error("No context provided: useSigmaContext() can only be used in a descendant of <SigmaContainer>");return t}function d(){return l().sigma}function f(){const{sigma:t,container:e}=l(),[r,i]=(0,n.useState)({});return(0,n.useEffect)((()=>{if(!t||!r)return;const n={};return Object.keys(r).forEach((e=>{n[e]=r[e],t.setSetting(e,r[e])})),()=>{t&&e&&e.offsetWidth>0&&e.offsetHeight>0&&Object.keys(n).forEach((e=>{t.setSetting(e,n[e])}))}}),[t,r,e]),i}const p=["clickNode","rightClickNode","downNode","enterNode","leaveNode","doubleClickNode","wheelNode","clickEdge","rightClickEdge","downEdge","enterEdge","leaveEdge","doubleClickEdge","wheelEdge","clickStage","rightClickStage","downStage","doubleClickStage","wheelStage","beforeRender","afterRender","kill"],g=["click","rightClick","mouseup","mousedown","mousemove","mousemovebody","doubleClick","wheel"],v=["touchup","touchdown","touchmove"],y=["updated"];function m(){const t=d(),e=f(),[r,i]=(0,n.useState)({});return(0,n.useEffect)((()=>{if(!t||!r)return;const n=r,i=Object.keys(n),o={},a={},u=t.getSettings();return i.some((t=>["clickEdge","rightClickEdge","doubleClickEdge","downEdge"].includes(t)))&&!1===u.enableEdgeClickEvents&&(o.enableEdgeClickEvents=!0,a.enableEdgeClickEvents=!1),i.some((t=>["enterEdge","leaveEdge"].includes(t)))&&!1===u.enableEdgeHoverEvents&&(o.enableEdgeHoverEvents=!0,a.enableEdgeHoverEvents=!1),i.some((t=>["wheelEdge"].includes(t)))&&!1===u.enableEdgeWheelEvents&&(o.enableEdgeWheelEvents=!0,a.enableEdgeWheelEvents=!1),Object.keys(o).length>0&&e(o),i.forEach((e=>{const r=n[e];p.find((t=>t===e))&&t.on(e,r),g.find((t=>t===e))&&t.getMouseCaptor().on(e,r),v.find((t=>t===e))&&t.getTouchCaptor().on(e,r),y.find((t=>t===e))&&t.getCamera().on(e,r)})),()=>{Object.keys(a).length>0&&e(a),t&&i.forEach((e=>{const r=n[e];p.find((t=>t===e))&&t.off(e,r),g.find((t=>t===e))&&t.getMouseCaptor().off(e,r),v.find((t=>t===e))&&t.getTouchCaptor().off(e,r),y.find((t=>t===e))&&t.getCamera().off(e,r)}))}}),[t,r,e]),i}function b(){const t=d();return(0,n.useCallback)(((e,r=!0)=>{t&&e&&(r&&t.getGraph().order>0&&t.getGraph().clear(),t.getGraph().import(e),t.refresh())}),[t])}function w(t){const e=d(),r=(0,n.useRef)();(0,o.isEqual)(r.current,t)||(r.current=t);const i=(0,n.useCallback)((t=>{e.getCamera().animatedZoom(Object.assign(Object.assign({},r.current),t))}),[e,r]),a=(0,n.useCallback)((t=>{e.getCamera().animatedUnzoom(Object.assign(Object.assign({},r.current),t))}),[e,r]),u=(0,n.useCallback)((t=>{e.getCamera().animatedReset(Object.assign(Object.assign({},r.current),t))}),[e,r]),s=(0,n.useCallback)(((t,n)=>{e.getCamera().animate(t,Object.assign(Object.assign({},r.current),n))}),[e,r]),c=(0,n.useCallback)(((t,n)=>{const i=e.getNodeDisplayData(t);i?e.getCamera().animate(i,Object.assign(Object.assign({},r.current),n)):console.log(`Node ${t} not found`)}),[e,r]);return{zoomIn:i,zoomOut:a,reset:u,goto:s,gotoNode:c}}const _=(0,n.forwardRef)((({graph:t,id:e,className:r,style:a,settings:c,children:l},d)=>{const f=(0,n.useRef)(null),p=(0,n.useRef)(null),g={className:`react-sigma ${r||""}`,id:e,style:a},[v,y]=(0,n.useState)(null),m=(0,n.useRef)({});(0,o.isEqual)(m.current,c)||(m.current=c||{}),(0,n.useEffect)((()=>{let e=null;if(null!==p.current){const r=t?"function"==typeof t?new t:t:new(u());e=new s.Sigma(r,p.current,Object.assign({allowInvalidContainer:!0},m.current)),v&&e.getCamera().setState(v.getCamera().getState())}return y(e),()=>{e&&e.kill(),y(null)}}),[p,t,m]),(0,n.useImperativeHandle)(d,(()=>v),[v]);const b=(0,n.useMemo)((()=>v&&f.current?{sigma:v,container:f.current}:null),[v,f.current]),w=null!==b?i().createElement(h,{value:b},l):null;return i().createElement("div",Object.assign({},g,{ref:f}),i().createElement("div",{className:"sigma-container",ref:p}),w)}))},8884:t=>{t.exports=function(t,e){var r=e.length;if(0!==r){var n=t.length;t.length+=r;for(var i=0;i<r;i++)t[n+i]=e[i]}}},19869:t=>{t.exports={linLogMode:!1,outboundAttractionDistribution:!1,adjustSizes:!1,edgeWeightInfluence:1,scalingRatio:1,strongGravityMode:!1,gravity:1,slowDown:1,barnesHutOptimize:!1,barnesHutTheta:.5}},36061:(t,e)=>{e.assign=function(t){t=t||{};var e,r,n,i=Array.prototype.slice.call(arguments).slice(1);for(e=0,n=i.length;e<n;e++)if(i[e])for(r in i[e])t[r]=i[e][r];return t},e.validateSettings=function(t){return"linLogMode"in t&&"boolean"!=typeof t.linLogMode?{message:"the `linLogMode` setting should be a boolean."}:"outboundAttractionDistribution"in t&&"boolean"!=typeof t.outboundAttractionDistribution?{message:"the `outboundAttractionDistribution` setting should be a boolean."}:"adjustSizes"in t&&"boolean"!=typeof t.adjustSizes?{message:"the `adjustSizes` setting should be a boolean."}:"edgeWeightInfluence"in t&&"number"!=typeof t.edgeWeightInfluence?{message:"the `edgeWeightInfluence` setting should be a number."}:!("scalingRatio"in t)||"number"==typeof t.scalingRatio&&t.scalingRatio>=0?"strongGravityMode"in t&&"boolean"!=typeof t.strongGravityMode?{message:"the `strongGravityMode` setting should be a boolean."}:!("gravity"in t)||"number"==typeof t.gravity&&t.gravity>=0?"slowDown"in t&&!("number"==typeof t.slowDown||t.slowDown>=0)?{message:"the `slowDown` setting should be a number >= 0."}:"barnesHutOptimize"in t&&"boolean"!=typeof t.barnesHutOptimize?{message:"the `barnesHutOptimize` setting should be a boolean."}:!("barnesHutTheta"in t)||"number"==typeof t.barnesHutTheta&&t.barnesHutTheta>=0?null:{message:"the `barnesHutTheta` setting should be a number >= 0."}:{message:"the `gravity` setting should be a number >= 0."}:{message:"the `scalingRatio` setting should be a number >= 0."}},e.graphToByteArrays=function(t,e){var r,n=t.order,i=t.size,o={},a=new Float32Array(10*n),u=new Float32Array(3*i);return r=0,t.forEachNode((function(t,e){o[t]=r,a[r]=e.x,a[r+1]=e.y,a[r+2]=0,a[r+3]=0,a[r+4]=0,a[r+5]=0,a[r+6]=1,a[r+7]=1,a[r+8]=e.size||1,a[r+9]=e.fixed?1:0,r+=10})),r=0,t.forEachEdge((function(t,n,i,s,c,h,l){var d=o[i],f=o[s],p=e(t,n,i,s,c,h,l);a[d+6]+=p,a[f+6]+=p,u[r]=d,u[r+1]=f,u[r+2]=p,r+=3})),{nodes:a,edges:u}},e.assignLayoutChanges=function(t,e,r){var n=0;t.updateEachNodeAttributes((function(t,i){return i.x=e[n],i.y=e[n+1],n+=10,r?r(t,i):i}))},e.readGraphPositions=function(t,e){var r=0;t.forEachNode((function(t,n){e[r]=n.x,e[r+1]=n.y,r+=10}))},e.collectLayoutChanges=function(t,e,r){for(var n=t.nodes(),i={},o=0,a=0,u=e.length;o<u;o+=10){if(r){var s=Object.assign({},t.getNodeAttributes(n[a]));s.x=e[o],s.y=e[o+1],s=r(n[a],s),i[n[a]]={x:s.x,y:s.y}}else i[n[a]]={x:e[o],y:e[o+1]};a++}return i},e.createWorker=function(t){var e=window.URL||window.webkitURL,r=t.toString(),n=e.createObjectURL(new Blob(["("+r+").call(this);"],{type:"text/javascript"})),i=new Worker(n);return e.revokeObjectURL(n),i}},3660:(t,e,r)=>{var n=r(31880),i=r(4363).Q6,o=r(8725),a=r(36061),u=r(19869);function s(t,e,r){if(!n(e))throw new Error("graphology-layout-forceatlas2: the given graph is not a valid graphology instance.");"number"==typeof r&&(r={iterations:r});var s=r.iterations;if("number"!=typeof s)throw new Error("graphology-layout-forceatlas2: invalid number of iterations.");if(s<=0)throw new Error("graphology-layout-forceatlas2: you should provide a positive number of iterations.");var c=i("getEdgeWeight"in r?r.getEdgeWeight:"weight").fromEntry,h="function"==typeof r.outputReducer?r.outputReducer:null,l=a.assign({},u,r.settings),d=a.validateSettings(l);if(d)throw new Error("graphology-layout-forceatlas2: "+d.message);var f,p=a.graphToByteArrays(e,c);for(f=0;f<s;f++)o(l,p.nodes,p.edges);if(!t)return a.collectLayoutChanges(e,p.nodes);a.assignLayoutChanges(e,p.nodes,h)}var c=s.bind(null,!1);c.assign=s.bind(null,!0),c.inferSettings=function(t){var e="number"==typeof t?t:t.order;return{barnesHutOptimize:e>2e3,strongGravityMode:!0,gravity:.05,scalingRatio:10,slowDown:1+Math.log(e)}},t.exports=c},8725:t=>{var e=10;t.exports=function(t,r,n){var i,o,a,u,s,c,h,l,d,f,p,g,v,y,m,b,w,_,x,E,A,L,k,C=r.length,S=n.length,M=t.adjustSizes,D=t.barnesHutTheta*t.barnesHutTheta,O=[];for(a=0;a<C;a+=e)r[a+4]=r[a+2],r[a+5]=r[a+3],r[a+2]=0,r[a+3]=0;if(t.outboundAttractionDistribution){for(p=0,a=0;a<C;a+=e)p+=r[a+6];p/=C/e}if(t.barnesHutOptimize){var G,F,R,T=1/0,P=-1/0,N=1/0,j=-1/0;for(a=0;a<C;a+=e)T=Math.min(T,r[a+0]),P=Math.max(P,r[a+0]),N=Math.min(N,r[a+1]),j=Math.max(j,r[a+1]);var z=P-T,U=j-N;for(z>U?j=(N-=(z-U)/2)+z:P=(T-=(U-z)/2)+U,O[0]=-1,O[1]=(T+P)/2,O[2]=(N+j)/2,O[3]=Math.max(P-T,j-N),O[4]=-1,O[5]=-1,O[6]=0,O[7]=0,O[8]=0,i=1,a=0;a<C;a+=e)for(o=0,R=3;;){if(!(O[o+5]>=0)){if(O[o+0]<0){O[o+0]=a;break}if(O[o+5]=9*i,l=O[o+3]/2,O[(d=O[o+5])+0]=-1,O[d+1]=O[o+1]-l,O[d+2]=O[o+2]-l,O[d+3]=l,O[d+4]=d+9,O[d+5]=-1,O[d+6]=0,O[d+7]=0,O[d+8]=0,O[(d+=9)+0]=-1,O[d+1]=O[o+1]-l,O[d+2]=O[o+2]+l,O[d+3]=l,O[d+4]=d+9,O[d+5]=-1,O[d+6]=0,O[d+7]=0,O[d+8]=0,O[(d+=9)+0]=-1,O[d+1]=O[o+1]+l,O[d+2]=O[o+2]-l,O[d+3]=l,O[d+4]=d+9,O[d+5]=-1,O[d+6]=0,O[d+7]=0,O[d+8]=0,O[(d+=9)+0]=-1,O[d+1]=O[o+1]+l,O[d+2]=O[o+2]+l,O[d+3]=l,O[d+4]=O[o+4],O[d+5]=-1,O[d+6]=0,O[d+7]=0,O[d+8]=0,i+=4,G=r[O[o+0]+0]<O[o+1]?r[O[o+0]+1]<O[o+2]?O[o+5]:O[o+5]+9:r[O[o+0]+1]<O[o+2]?O[o+5]+18:O[o+5]+27,O[o+6]=r[O[o+0]+6],O[o+7]=r[O[o+0]+0],O[o+8]=r[O[o+0]+1],O[G+0]=O[o+0],O[o+0]=-1,G===(F=r[a+0]<O[o+1]?r[a+1]<O[o+2]?O[o+5]:O[o+5]+9:r[a+1]<O[o+2]?O[o+5]+18:O[o+5]+27)){if(R--){o=G;continue}R=3;break}O[F+0]=a;break}G=r[a+0]<O[o+1]?r[a+1]<O[o+2]?O[o+5]:O[o+5]+9:r[a+1]<O[o+2]?O[o+5]+18:O[o+5]+27,O[o+7]=(O[o+7]*O[o+6]+r[a+0]*r[a+6])/(O[o+6]+r[a+6]),O[o+8]=(O[o+8]*O[o+6]+r[a+1]*r[a+6])/(O[o+6]+r[a+6]),O[o+6]+=r[a+6],o=G}}if(t.barnesHutOptimize){for(g=t.scalingRatio,a=0;a<C;a+=e)for(o=0;;)if(O[o+5]>=0){if(b=Math.pow(r[a+0]-O[o+7],2)+Math.pow(r[a+1]-O[o+8],2),4*(f=O[o+3])*f/b<D){if(v=r[a+0]-O[o+7],y=r[a+1]-O[o+8],!0===M?b>0?(w=g*r[a+6]*O[o+6]/b,r[a+2]+=v*w,r[a+3]+=y*w):b<0&&(w=-g*r[a+6]*O[o+6]/Math.sqrt(b),r[a+2]+=v*w,r[a+3]+=y*w):b>0&&(w=g*r[a+6]*O[o+6]/b,r[a+2]+=v*w,r[a+3]+=y*w),(o=O[o+4])<0)break;continue}o=O[o+5]}else if((c=O[o+0])>=0&&c!==a&&(b=(v=r[a+0]-r[c+0])*v+(y=r[a+1]-r[c+1])*y,!0===M?b>0?(w=g*r[a+6]*r[c+6]/b,r[a+2]+=v*w,r[a+3]+=y*w):b<0&&(w=-g*r[a+6]*r[c+6]/Math.sqrt(b),r[a+2]+=v*w,r[a+3]+=y*w):b>0&&(w=g*r[a+6]*r[c+6]/b,r[a+2]+=v*w,r[a+3]+=y*w)),(o=O[o+4])<0)break}else for(g=t.scalingRatio,u=0;u<C;u+=e)for(s=0;s<u;s+=e)v=r[u+0]-r[s+0],y=r[u+1]-r[s+1],!0===M?(b=Math.sqrt(v*v+y*y)-r[u+8]-r[s+8])>0?(w=g*r[u+6]*r[s+6]/b/b,r[u+2]+=v*w,r[u+3]+=y*w,r[s+2]-=v*w,r[s+3]-=y*w):b<0&&(w=100*g*r[u+6]*r[s+6],r[u+2]+=v*w,r[u+3]+=y*w,r[s+2]-=v*w,r[s+3]-=y*w):(b=Math.sqrt(v*v+y*y))>0&&(w=g*r[u+6]*r[s+6]/b/b,r[u+2]+=v*w,r[u+3]+=y*w,r[s+2]-=v*w,r[s+3]-=y*w);for(d=t.gravity/t.scalingRatio,g=t.scalingRatio,a=0;a<C;a+=e)w=0,v=r[a+0],y=r[a+1],b=Math.sqrt(Math.pow(v,2)+Math.pow(y,2)),t.strongGravityMode?b>0&&(w=g*r[a+6]*d):b>0&&(w=g*r[a+6]*d/b),r[a+2]-=v*w,r[a+3]-=y*w;for(g=1*(t.outboundAttractionDistribution?p:1),h=0;h<S;h+=3)u=n[h+0],s=n[h+1],l=n[h+2],m=Math.pow(l,t.edgeWeightInfluence),v=r[u+0]-r[s+0],y=r[u+1]-r[s+1],!0===M?(b=Math.sqrt(v*v+y*y)-r[u+8]-r[s+8],t.linLogMode?t.outboundAttractionDistribution?b>0&&(w=-g*m*Math.log(1+b)/b/r[u+6]):b>0&&(w=-g*m*Math.log(1+b)/b):t.outboundAttractionDistribution?b>0&&(w=-g*m/r[u+6]):b>0&&(w=-g*m)):(b=Math.sqrt(Math.pow(v,2)+Math.pow(y,2)),t.linLogMode?t.outboundAttractionDistribution?b>0&&(w=-g*m*Math.log(1+b)/b/r[u+6]):b>0&&(w=-g*m*Math.log(1+b)/b):t.outboundAttractionDistribution?(b=1,w=-g*m/r[u+6]):(b=1,w=-g*m)),b>0&&(r[u+2]+=v*w,r[u+3]+=y*w,r[s+2]-=v*w,r[s+3]-=y*w);if(!0===M)for(a=0;a<C;a+=e)1!==r[a+9]&&((_=Math.sqrt(Math.pow(r[a+2],2)+Math.pow(r[a+3],2)))>10&&(r[a+2]=10*r[a+2]/_,r[a+3]=10*r[a+3]/_),x=r[a+6]*Math.sqrt((r[a+4]-r[a+2])*(r[a+4]-r[a+2])+(r[a+5]-r[a+3])*(r[a+5]-r[a+3])),E=Math.sqrt((r[a+4]+r[a+2])*(r[a+4]+r[a+2])+(r[a+5]+r[a+3])*(r[a+5]+r[a+3]))/2,A=.1*Math.log(1+E)/(1+Math.sqrt(x)),L=r[a+0]+r[a+2]*(A/t.slowDown),r[a+0]=L,k=r[a+1]+r[a+3]*(A/t.slowDown),r[a+1]=k);else for(a=0;a<C;a+=e)1!==r[a+9]&&(x=r[a+6]*Math.sqrt((r[a+4]-r[a+2])*(r[a+4]-r[a+2])+(r[a+5]-r[a+3])*(r[a+5]-r[a+3])),E=Math.sqrt((r[a+4]+r[a+2])*(r[a+4]+r[a+2])+(r[a+5]+r[a+3])*(r[a+5]+r[a+3]))/2,A=r[a+7]*Math.log(1+E)/(1+Math.sqrt(x)),r[a+7]=Math.min(1,Math.sqrt(A*(Math.pow(r[a+2],2)+Math.pow(r[a+3],2))/(1+Math.sqrt(x)))),L=r[a+0]+r[a+2]*(A/t.slowDown),r[a+0]=L,k=r[a+1]+r[a+3]*(A/t.slowDown),r[a+1]=k);return{}}},61026:t=>{t.exports=function(){var t,e,r,n={};r=10,n.exports=function(t,e,n){var i,o,a,u,s,c,h,l,d,f,p,g,v,y,m,b,w,_,x,E,A,L,k,C=e.length,S=n.length,M=t.adjustSizes,D=t.barnesHutTheta*t.barnesHutTheta,O=[];for(a=0;a<C;a+=r)e[a+4]=e[a+2],e[a+5]=e[a+3],e[a+2]=0,e[a+3]=0;if(t.outboundAttractionDistribution){for(p=0,a=0;a<C;a+=r)p+=e[a+6];p/=C/r}if(t.barnesHutOptimize){var G,F,R,T=1/0,P=-1/0,N=1/0,j=-1/0;for(a=0;a<C;a+=r)T=Math.min(T,e[a+0]),P=Math.max(P,e[a+0]),N=Math.min(N,e[a+1]),j=Math.max(j,e[a+1]);var z=P-T,U=j-N;for(z>U?j=(N-=(z-U)/2)+z:P=(T-=(U-z)/2)+U,O[0]=-1,O[1]=(T+P)/2,O[2]=(N+j)/2,O[3]=Math.max(P-T,j-N),O[4]=-1,O[5]=-1,O[6]=0,O[7]=0,O[8]=0,i=1,a=0;a<C;a+=r)for(o=0,R=3;;){if(!(O[o+5]>=0)){if(O[o+0]<0){O[o+0]=a;break}if(O[o+5]=9*i,l=O[o+3]/2,O[(d=O[o+5])+0]=-1,O[d+1]=O[o+1]-l,O[d+2]=O[o+2]-l,O[d+3]=l,O[d+4]=d+9,O[d+5]=-1,O[d+6]=0,O[d+7]=0,O[d+8]=0,O[(d+=9)+0]=-1,O[d+1]=O[o+1]-l,O[d+2]=O[o+2]+l,O[d+3]=l,O[d+4]=d+9,O[d+5]=-1,O[d+6]=0,O[d+7]=0,O[d+8]=0,O[(d+=9)+0]=-1,O[d+1]=O[o+1]+l,O[d+2]=O[o+2]-l,O[d+3]=l,O[d+4]=d+9,O[d+5]=-1,O[d+6]=0,O[d+7]=0,O[d+8]=0,O[(d+=9)+0]=-1,O[d+1]=O[o+1]+l,O[d+2]=O[o+2]+l,O[d+3]=l,O[d+4]=O[o+4],O[d+5]=-1,O[d+6]=0,O[d+7]=0,O[d+8]=0,i+=4,G=e[O[o+0]+0]<O[o+1]?e[O[o+0]+1]<O[o+2]?O[o+5]:O[o+5]+9:e[O[o+0]+1]<O[o+2]?O[o+5]+18:O[o+5]+27,O[o+6]=e[O[o+0]+6],O[o+7]=e[O[o+0]+0],O[o+8]=e[O[o+0]+1],O[G+0]=O[o+0],O[o+0]=-1,G===(F=e[a+0]<O[o+1]?e[a+1]<O[o+2]?O[o+5]:O[o+5]+9:e[a+1]<O[o+2]?O[o+5]+18:O[o+5]+27)){if(R--){o=G;continue}R=3;break}O[F+0]=a;break}G=e[a+0]<O[o+1]?e[a+1]<O[o+2]?O[o+5]:O[o+5]+9:e[a+1]<O[o+2]?O[o+5]+18:O[o+5]+27,O[o+7]=(O[o+7]*O[o+6]+e[a+0]*e[a+6])/(O[o+6]+e[a+6]),O[o+8]=(O[o+8]*O[o+6]+e[a+1]*e[a+6])/(O[o+6]+e[a+6]),O[o+6]+=e[a+6],o=G}}if(t.barnesHutOptimize){for(g=t.scalingRatio,a=0;a<C;a+=r)for(o=0;;)if(O[o+5]>=0){if(b=Math.pow(e[a+0]-O[o+7],2)+Math.pow(e[a+1]-O[o+8],2),4*(f=O[o+3])*f/b<D){if(v=e[a+0]-O[o+7],y=e[a+1]-O[o+8],!0===M?b>0?(w=g*e[a+6]*O[o+6]/b,e[a+2]+=v*w,e[a+3]+=y*w):b<0&&(w=-g*e[a+6]*O[o+6]/Math.sqrt(b),e[a+2]+=v*w,e[a+3]+=y*w):b>0&&(w=g*e[a+6]*O[o+6]/b,e[a+2]+=v*w,e[a+3]+=y*w),(o=O[o+4])<0)break;continue}o=O[o+5]}else if((c=O[o+0])>=0&&c!==a&&(b=(v=e[a+0]-e[c+0])*v+(y=e[a+1]-e[c+1])*y,!0===M?b>0?(w=g*e[a+6]*e[c+6]/b,e[a+2]+=v*w,e[a+3]+=y*w):b<0&&(w=-g*e[a+6]*e[c+6]/Math.sqrt(b),e[a+2]+=v*w,e[a+3]+=y*w):b>0&&(w=g*e[a+6]*e[c+6]/b,e[a+2]+=v*w,e[a+3]+=y*w)),(o=O[o+4])<0)break}else for(g=t.scalingRatio,u=0;u<C;u+=r)for(s=0;s<u;s+=r)v=e[u+0]-e[s+0],y=e[u+1]-e[s+1],!0===M?(b=Math.sqrt(v*v+y*y)-e[u+8]-e[s+8])>0?(w=g*e[u+6]*e[s+6]/b/b,e[u+2]+=v*w,e[u+3]+=y*w,e[s+2]-=v*w,e[s+3]-=y*w):b<0&&(w=100*g*e[u+6]*e[s+6],e[u+2]+=v*w,e[u+3]+=y*w,e[s+2]-=v*w,e[s+3]-=y*w):(b=Math.sqrt(v*v+y*y))>0&&(w=g*e[u+6]*e[s+6]/b/b,e[u+2]+=v*w,e[u+3]+=y*w,e[s+2]-=v*w,e[s+3]-=y*w);for(d=t.gravity/t.scalingRatio,g=t.scalingRatio,a=0;a<C;a+=r)w=0,v=e[a+0],y=e[a+1],b=Math.sqrt(Math.pow(v,2)+Math.pow(y,2)),t.strongGravityMode?b>0&&(w=g*e[a+6]*d):b>0&&(w=g*e[a+6]*d/b),e[a+2]-=v*w,e[a+3]-=y*w;for(g=1*(t.outboundAttractionDistribution?p:1),h=0;h<S;h+=3)u=n[h+0],s=n[h+1],l=n[h+2],m=Math.pow(l,t.edgeWeightInfluence),v=e[u+0]-e[s+0],y=e[u+1]-e[s+1],!0===M?(b=Math.sqrt(v*v+y*y)-e[u+8]-e[s+8],t.linLogMode?t.outboundAttractionDistribution?b>0&&(w=-g*m*Math.log(1+b)/b/e[u+6]):b>0&&(w=-g*m*Math.log(1+b)/b):t.outboundAttractionDistribution?b>0&&(w=-g*m/e[u+6]):b>0&&(w=-g*m)):(b=Math.sqrt(Math.pow(v,2)+Math.pow(y,2)),t.linLogMode?t.outboundAttractionDistribution?b>0&&(w=-g*m*Math.log(1+b)/b/e[u+6]):b>0&&(w=-g*m*Math.log(1+b)/b):t.outboundAttractionDistribution?(b=1,w=-g*m/e[u+6]):(b=1,w=-g*m)),b>0&&(e[u+2]+=v*w,e[u+3]+=y*w,e[s+2]-=v*w,e[s+3]-=y*w);if(!0===M)for(a=0;a<C;a+=r)1!==e[a+9]&&((_=Math.sqrt(Math.pow(e[a+2],2)+Math.pow(e[a+3],2)))>10&&(e[a+2]=10*e[a+2]/_,e[a+3]=10*e[a+3]/_),x=e[a+6]*Math.sqrt((e[a+4]-e[a+2])*(e[a+4]-e[a+2])+(e[a+5]-e[a+3])*(e[a+5]-e[a+3])),E=Math.sqrt((e[a+4]+e[a+2])*(e[a+4]+e[a+2])+(e[a+5]+e[a+3])*(e[a+5]+e[a+3]))/2,A=.1*Math.log(1+E)/(1+Math.sqrt(x)),L=e[a+0]+e[a+2]*(A/t.slowDown),e[a+0]=L,k=e[a+1]+e[a+3]*(A/t.slowDown),e[a+1]=k);else for(a=0;a<C;a+=r)1!==e[a+9]&&(x=e[a+6]*Math.sqrt((e[a+4]-e[a+2])*(e[a+4]-e[a+2])+(e[a+5]-e[a+3])*(e[a+5]-e[a+3])),E=Math.sqrt((e[a+4]+e[a+2])*(e[a+4]+e[a+2])+(e[a+5]+e[a+3])*(e[a+5]+e[a+3]))/2,A=e[a+7]*Math.log(1+E)/(1+Math.sqrt(x)),e[a+7]=Math.min(1,Math.sqrt(A*(Math.pow(e[a+2],2)+Math.pow(e[a+3],2))/(1+Math.sqrt(x)))),L=e[a+0]+e[a+2]*(A/t.slowDown),e[a+0]=L,k=e[a+1]+e[a+3]*(A/t.slowDown),e[a+1]=k);return{}};var i=n.exports;self.addEventListener("message",(function(r){var n=r.data;t=new Float32Array(n.nodes),n.edges&&(e=new Float32Array(n.edges)),i(n.settings,t,e),self.postMessage({nodes:t.buffer},[t.buffer])}))}},28301:(t,e,r)=>{var n=r(61026),i=r(31880),o=r(4363).Q6,a=r(36061),u=r(19869);function s(t,e){if(e=e||{},!i(t))throw new Error("graphology-layout-forceatlas2/worker: the given graph is not a valid graphology instance.");var r=o("getEdgeWeight"in e?e.getEdgeWeight:"weight").fromEntry,n=a.assign({},u,e.settings),s=a.validateSettings(n);if(s)throw new Error("graphology-layout-forceatlas2/worker: "+s.message);this.worker=null,this.graph=t,this.settings=n,this.getEdgeWeight=r,this.matrices=null,this.running=!1,this.killed=!1,this.outputReducer="function"==typeof e.outputReducer?e.outputReducer:null,this.handleMessage=this.handleMessage.bind(this);var c=void 0,h=this;this.handleGraphUpdate=function(){h.worker&&h.worker.terminate(),c&&clearTimeout(c),c=setTimeout((function(){c=void 0,h.spawnWorker()}),0)},t.on("nodeAdded",this.handleGraphUpdate),t.on("edgeAdded",this.handleGraphUpdate),t.on("nodeDropped",this.handleGraphUpdate),t.on("edgeDropped",this.handleGraphUpdate),this.spawnWorker()}s.prototype.isRunning=function(){return this.running},s.prototype.spawnWorker=function(){this.worker&&this.worker.terminate(),this.worker=a.createWorker(n),this.worker.addEventListener("message",this.handleMessage),this.running&&(this.running=!1,this.start())},s.prototype.handleMessage=function(t){if(this.running){var e=new Float32Array(t.data.nodes);a.assignLayoutChanges(this.graph,e,this.outputReducer),this.outputReducer&&a.readGraphPositions(this.graph,e),this.matrices.nodes=e,this.askForIterations()}},s.prototype.askForIterations=function(t){var e=this.matrices,r={settings:this.settings,nodes:e.nodes.buffer},n=[e.nodes.buffer];return t&&(r.edges=e.edges.buffer,n.push(e.edges.buffer)),this.worker.postMessage(r,n),this},s.prototype.start=function(){if(this.killed)throw new Error("graphology-layout-forceatlas2/worker.start: layout was killed.");return this.running||(this.matrices=a.graphToByteArrays(this.graph,this.getEdgeWeight),this.running=!0,this.askForIterations(!0)),this},s.prototype.stop=function(){return this.running=!1,this},s.prototype.kill=function(){if(this.killed)return this;this.running=!1,this.killed=!0,this.matrices=null,this.worker.terminate(),this.graph.removeListener("nodeAdded",this.handleGraphUpdate),this.graph.removeListener("edgeAdded",this.handleGraphUpdate),this.graph.removeListener("nodeDropped",this.handleGraphUpdate),this.graph.removeListener("edgeDropped",this.handleGraphUpdate)},t.exports=s},11155:(t,e,r)=>{var n=r(46586),i=r(31880),o=r(64341),a={attributes:{x:"x",y:"y"},center:0,hierarchyAttributes:[],rng:Math.random,scale:1};function u(t,e,r,n,i){this.wrappedCircle=i||null,this.children={},this.countChildren=0,this.id=t||null,this.next=null,this.previous=null,this.x=e||null,this.y=r||null,this.r=i?1010101:n||999}function s(t,e,r){for(var n in e.children){var i=e.children[n];i.hasChildren()?s(t,i,r):r[i.id]={x:i.x,y:i.y}}}function c(t,e){var r=t.r-e.r,n=e.x-t.x,i=e.y-t.y;return r<0||r*r<n*n+i*i}function h(t,e){var r=t.r-e.r+1e-6,n=e.x-t.x,i=e.y-t.y;return r>0&&r*r>n*n+i*i}function l(t,e){for(var r=0;r<e.length;++r)if(!h(t,e[r]))return!1;return!0}function d(t,e){var r=t.x,n=t.y,i=t.r,o=e.x,a=e.y,s=e.r,c=o-r,h=a-n,l=s-i,d=Math.sqrt(c*c+h*h);return new u(null,(r+o+c/d*l)/2,(n+a+h/d*l)/2,(d+i+s)/2)}function f(t,e,r){var n=t.x,i=t.y,o=t.r,a=e.x,s=e.y,c=e.r,h=r.x,l=r.y,d=r.r,f=n-a,p=n-h,g=i-s,v=i-l,y=c-o,m=d-o,b=n*n+i*i-o*o,w=b-a*a-s*s+c*c,_=b-h*h-l*l+d*d,x=p*g-f*v,E=(g*_-v*w)/(2*x)-n,A=(v*y-g*m)/x,L=(p*w-f*_)/(2*x)-i,k=(f*m-p*y)/x,C=A*A+k*k-1,S=2*(o+E*A+L*k),M=E*E+L*L-o*o,D=-(C?(S+Math.sqrt(S*S-4*C*M))/(2*C):M/S);return new u(null,n+E+A*D,i+L+k*D,D)}function p(t){switch(t.length){case 1:return new u(null,(e=t[0]).x,e.y,e.r);case 2:return d(t[0],t[1]);case 3:return f(t[0],t[1],t[2]);default:throw new Error("graphology-layout/circlepack: Invalid basis length "+t.length)}var e}function g(t,e){var r,n;if(l(e,t))return[e];for(r=0;r<t.length;++r)if(c(e,t[r])&&l(d(t[r],e),t))return[t[r],e];for(r=0;r<t.length-1;++r)for(n=r+1;n<t.length;++n)if(c(d(t[r],t[n]),e)&&c(d(t[r],e),t[n])&&c(d(t[n],e),t[r])&&l(f(t[r],t[n],e),t))return[t[r],t[n],e];throw new Error("graphology-layout/circlepack: extendBasis failure !")}function v(t){var e=t.wrappedCircle,r=t.next.wrappedCircle,n=e.r+r.r,i=(e.x*r.r+r.x*e.r)/n,o=(e.y*r.r+r.y*e.r)/n;return i*i+o*o}function y(t,e,r){var n,i,o,a,u=t.x-e.x,s=t.y-e.y,c=u*u+s*s;c?(i=e.r+r.r,i*=i,a=t.r+r.r,i>(a*=a)?(n=(c+a-i)/(2*c),o=Math.sqrt(Math.max(0,a/c-n*n)),r.x=t.x-n*u-o*s,r.y=t.y-n*s+o*u):(n=(c+i-a)/(2*c),o=Math.sqrt(Math.max(0,i/c-n*n)),r.x=e.x+n*u-o*s,r.y=e.y+n*s+o*u)):(r.x=e.x+r.r,r.y=e.y)}function m(t,e){var r=t.r+e.r-1e-6,n=e.x-t.x,i=e.y-t.y;return r>0&&r*r>n*n+i*i}function b(t,e){var r=0;if(t.hasChildren()){for(var n in t.children){var i=t.children[n];i.hasChildren()&&(i.r=b(i,e))}r=function(t,e){var r,n,i,o,a,s,c,l,d,f,b=t.length;if(0===b)return 0;if((r=t[0]).x=0,r.y=0,b<=1)return r.r;if(n=t[1],r.x=-n.r,n.x=r.r,n.y=0,b<=2)return r.r+n.r;y(n,r,i=t[2]),r=new u(null,null,null,null,r),n=new u(null,null,null,null,n),i=new u(null,null,null,null,i),r.next=i.previous=n,n.next=r.previous=i,i.next=n.previous=r;t:for(s=3;s<b;++s){i=t[s],y(r.wrappedCircle,n.wrappedCircle,i),i=new u(null,null,null,null,i),c=n.next,l=r.previous,d=n.wrappedCircle.r,f=r.wrappedCircle.r;do{if(d<=f){if(m(c.wrappedCircle,i.wrappedCircle)){n=c,r.next=n,n.previous=r,--s;continue t}d+=c.wrappedCircle.r,c=c.next}else{if(m(l.wrappedCircle,i.wrappedCircle)){(r=l).next=n,n.previous=r,--s;continue t}f+=l.wrappedCircle.r,l=l.previous}}while(c!==l.next);for(i.previous=r,i.next=n,r.next=n.previous=n=i,o=v(r);(i=i.next)!==n;)(a=v(i))<o&&(r=i,o=a);n=r.next}r=[n.wrappedCircle],i=n;for(var w=1e4;(i=i.next)!==n&&0!=--w;)r.push(i.wrappedCircle);for(i=function(t,e){var r,n,i=0,o=t.slice(),a=t.length,u=[];for(e(o);i<a;)r=o[i],n&&h(n,r)?++i:(n=p(u=g(u,r)),i=0);return n}(r,e),s=0;s<b;++s)(r=t[s]).x-=i.x,r.y-=i.y;return i.r}(Object.values(t.children),e)}return r}function w(t,e,r){if(!i(e))throw new Error("graphology-layout/circlepack: the given graph is not a valid graphology instance.");r=n(r,a);var c={},h={},l=e.nodes(),d=r.center,f=r.hierarchyAttributes,p=o.createShuffleInPlace(r.rng),g=r.scale,v=new u;e.forEachNode((function(t,e){var r=new u(t,null,null,e.size?e.size:1),n=v;f.forEach((function(t){var r=e[t];n=n.getChild(r)})),n.addChild(t,r)})),function(t,e){for(var r in b(t,e),t.children)t.children[r].applyPositionToChildren()}(v,p),s(e,v,c);var y,m,w,_=l.length;for(w=0;w<_;w++){var x=l[w];y=d+g*c[x].x,m=d+g*c[x].y,h[x]={x:y,y:m},t&&(e.setNodeAttribute(x,r.attributes.x,y),e.setNodeAttribute(x,r.attributes.y,m))}return h}u.prototype.hasChildren=function(){return this.countChildren>0},u.prototype.addChild=function(t,e){this.children[t]=e,++this.countChildren},u.prototype.getChild=function(t){if(!this.children.hasOwnProperty(t)){var e=new u;this.children[t]=e,++this.countChildren}return this.children[t]},u.prototype.applyPositionToChildren=function(){if(this.hasChildren()){var t=this;for(var e in t.children){var r=t.children[e];r.x+=t.x,r.y+=t.y,r.applyPositionToChildren()}}};var _=w.bind(null,!1);_.assign=w.bind(null,!0),t.exports=_},28833:(t,e,r)=>{var n=r(46586),i=r(31880),o={dimensions:["x","y"],center:.5,scale:1};function a(t,e,r){if(!i(e))throw new Error("graphology-layout/random: the given graph is not a valid graphology instance.");var a=(r=n(r,o)).dimensions;if(!Array.isArray(a)||2!==a.length)throw new Error("graphology-layout/random: given dimensions are invalid.");var u=r.center,s=r.scale,c=2*Math.PI,h=(u-.5)*s,l=e.order,d=a[0],f=a[1];function p(t,e){return e[d]=s*Math.cos(t*c/l)+h,e[f]=s*Math.sin(t*c/l)+h,e}var g=0;if(!t){var v={};return e.forEachNode((function(t){v[t]=p(g++,{})})),v}e.updateEachNodeAttributes((function(t,e){return p(g++,e),e}),{attributes:a})}var u=a.bind(null,!1);u.assign=a.bind(null,!0),t.exports=u},36039:(t,e,r)=>{r(11155),r(28833),r(18645),e.rotation=r(47621)},18645:(t,e,r)=>{var n=r(46586),i=r(31880),o={dimensions:["x","y"],center:.5,rng:Math.random,scale:1};function a(t,e,r){if(!i(e))throw new Error("graphology-layout/random: the given graph is not a valid graphology instance.");var a=(r=n(r,o)).dimensions;if(!Array.isArray(a)||a.length<1)throw new Error("graphology-layout/random: given dimensions are invalid.");var u=a.length,s=r.center,c=r.rng,h=r.scale,l=(s-.5)*h;function d(t){for(var e=0;e<u;e++)t[a[e]]=c()*h+l;return t}if(!t){var f={};return e.forEachNode((function(t){f[t]=d({})})),f}e.updateEachNodeAttributes((function(t,e){return d(e),e}),{attributes:a})}var u=a.bind(null,!1);u.assign=a.bind(null,!0),t.exports=u},47621:(t,e,r)=>{var n=r(46586),i=r(31880),o=Math.PI/180,a={dimensions:["x","y"],centeredOnZero:!1,degrees:!1};function u(t,e,r,u){if(!i(e))throw new Error("graphology-layout/rotation: the given graph is not a valid graphology instance.");(u=n(u,a)).degrees&&(r*=o);var s=u.dimensions;if(!Array.isArray(s)||2!==s.length)throw new Error("graphology-layout/random: given dimensions are invalid.");if(0===e.order){if(t)return;return{}}var c=s[0],h=s[1],l=0,d=0;if(!u.centeredOnZero){var f=1/0,p=-1/0,g=1/0,v=-1/0;e.forEachNode((function(t,e){var r=e[c],n=e[h];r<f&&(f=r),r>p&&(p=r),n<g&&(g=n),n>v&&(v=n)})),l=(f+p)/2,d=(g+v)/2}var y=Math.cos(r),m=Math.sin(r);function b(t){var e=t[c],r=t[h];return t[c]=l+(e-l)*y-(r-d)*m,t[h]=d+(e-l)*m+(r-d)*y,t}if(!t){var w={};return e.forEachNode((function(t,e){var r={};r[c]=e[c],r[h]=e[h],w[t]=b(r)})),w}e.updateEachNodeAttributes((function(t,e){return b(e),e}),{attributes:s})}var s=u.bind(null,!1);s.assign=u.bind(null,!0),t.exports=s},61359:(t,e,r)=>{var n=r(31880),i=r(97052).B,o=r(27155).De;t.exports=function(t,e){if(!n(t)||!n(e))throw new Error("graphology-operators/disjoint-union: invalid graph.");if(t.multi!==e.multi)throw new Error("graphology-operators/disjoint-union: both graph should be simple or multi.");var r=t.nullCopy();r.mergeAttributes(t.getAttributes());var a={},u={},s=0;return t.forEachNode((function(t,e){a[t]=s,i(r,s,e),s++})),e.forEachNode((function(t,e){u[t]=s,i(r,s,e),s++})),s=0,t.forEachEdge((function(t,e,n,i,u,c,h){o(r,h,s++,a[n],a[i],i,e)})),e.forEachEdge((function(t,e,n,i,a,c,h){o(r,h,s++,u[n],u[i],i,e)})),r}},35174:(t,e,r)=>{r(61359),r(9484),r(61499),r(76458),r(88947),r(92971),r(14230),e.toUndirected=r(51624),r(79106)},9484:(t,e,r)=>{var n=r(31880),i=r(27155).De;t.exports=function(t){if(!n(t))throw new Error("graphology-operators/reverse: invalid graph.");var e=t.emptyCopy();return t.forEachUndirectedEdge((function(t,r,n,o){i(e,!0,t,n,o,r)})),t.forEachDirectedEdge((function(t,r,n,o){i(e,!1,t,o,n,r)})),e}},61499:(t,e,r)=>{var n=r(31880),i=r(97052).B,o=r(27155).De;t.exports=function(t,e){if(!n(t))throw new Error("graphology-operators/subgraph: invalid graph instance.");var r=t.nullCopy(),a=e;if(Array.isArray(e)){if(0===e.length)return r;e=new Set(e)}if(e instanceof Set){if(0===e.size)return r;a=function(t){return e.has(t)};var u=e;e=new Set,u.forEach((function(t){e.add(""+t)}))}if("function"!=typeof a)throw new Error("graphology-operators/subgraph: invalid nodes. Expecting an array or a set or a filtering function.");if("function"==typeof e){if(t.forEachNode((function(t,e){a(t,e)&&i(r,t,e)})),0===r.order)return r}else e.forEach((function(e){if(!t.hasNode(e))throw new Error('graphology-operators/subgraph: the "'+e+'" node was not found in the graph.');i(r,e,t.getNodeAttributes(e))}));return t.forEachEdge((function(t,e,n,i,u,s,c){a(n,u)&&(i===n||a(i,s))&&o(r,c,t,n,i,e)})),r}},76458:(t,e,r)=>{var n=r(31880),i=r(27155).De;t.exports=function(t,e){if(!n(t))throw new Error("graphology-operators/to-directed: expecting a valid graphology instance.");"function"==typeof e&&(e={mergeEdge:e});var r="function"==typeof(e=e||{}).mergeEdge?e.mergeEdge:null;if("directed"===t.type)return t.copy();var o=t.emptyCopy({type:"directed"});return t.forEachDirectedEdge((function(t,e,r,n){i(o,!1,t,r,n,e)})),t.forEachUndirectedEdge((function(e,n,a,u){var s=!t.multi&&"mixed"===t.type&&o.edge(a,u),c=!t.multi&&"mixed"===t.type&&o.edge(u,a);s?o.replaceEdgeAttributes(s,r(o.getEdgeAttributes(s),n)):i(o,!1,null,a,u,n),a!==u&&(c?o.replaceEdgeAttributes(c,r(o.getEdgeAttributes(c),n)):i(o,!1,null,u,a,n))})),o}},88947:(t,e,r)=>{var n=r(31880);t.exports=function(t){if(!n(t))throw new Error("graphology-operators/to-mixed: expecting a valid graphology instance.");return t.copy({type:"mixed"})}},92971:(t,e,r)=>{var n=r(31880);t.exports=function(t){if(!n(t))throw new Error("graphology-operators/to-multi: expecting a valid graphology instance.");return t.copy({multi:!0})}},14230:(t,e,r)=>{var n=r(31880),i=r(27155).De;t.exports=function(t,e){if(!n(t))throw new Error("graphology-operators/to-simple: expecting a valid graphology instance.");"function"==typeof e&&(e={mergeEdge:e});var r="function"==typeof(e=e||{}).mergeEdge?e.mergeEdge:null;if(!t.multi)return t.copy();var o=t.emptyCopy({multi:!1});return t.forEachEdge((function(t,e,n,a,u,s,c){var h=c?o.undirectedEdge(n,a):o.directedEdge(n,a);h?r&&o.replaceEdgeAttributes(h,r(o.getEdgeAttributes(h),e)):i(o,c,t,n,a,e)})),o}},51624:(t,e,r)=>{var n=r(31880),i=r(27155).De;t.exports=function(t,e){if(!n(t))throw new Error("graphology-operators/to-undirected: expecting a valid graphology instance.");"function"==typeof e&&(e={mergeEdge:e});var r="function"==typeof(e=e||{}).mergeEdge?e.mergeEdge:null;if("undirected"===t.type)return t.copy();var o=t.emptyCopy({type:"undirected"});return t.forEachUndirectedEdge((function(t,e,r,n){i(o,!0,t,r,n,e)})),t.forEachDirectedEdge((function(e,n,a,u){if(!t.multi){var s=o.edge(a,u);if(s)return void(r&&o.replaceEdgeAttributes(s,r(o.getEdgeAttributes(s),n)))}i(o,!0,null,a,u,n)})),o}},79106:(t,e,r)=>{var n=r(31880);t.exports=function(t,e){if(!n(t)||!n(e))throw new Error("graphology-operators/union: invalid graph.");if(t.multi!==e.multi)throw new Error("graphology-operators/union: both graph should be simple or multi.");var r=t.copy();return r.import(e,!0),r}},39260:(t,e,r)=>{r(31880),r(4363).Q6,r(64231)},60715:(t,e,r)=>{var n=r(15129),i=r(77672);r(39260),e.Ar=n.bidirectional,n.singleSource,n.singleSourceLength,n.undirectedSingleSourceLength,n.brandes,i.edgePathFromNodePath},15129:(t,e,r)=>{var n=r(31880),i=r(4034),o=r(8884);function a(t,e,r){if(!n(e))throw new Error("graphology-shortest-path: invalid graphology instance.");if(!e.hasNode(r))throw new Error('graphology-shortest-path: the "'+r+'" source node does not exist in the given graph.');r=""+r;var i=new Set,a={},u=0;a[r]=0;for(var s,c,h,l=[r];0!==l.length;){var d=[];for(s=0,c=l.length;s<c;s++)h=l[s],i.has(h)||(i.add(h),o(d,e[t](h)),a[h]=u);u++,l=d}return a}var u=a.bind(null,"outboundNeighbors"),s=a.bind(null,"neighbors");e.bidirectional=function(t,e,r){if(!n(t))throw new Error("graphology-shortest-path: invalid graphology instance.");if(arguments.length<3)throw new Error("graphology-shortest-path: invalid number of arguments. Expecting at least 3.");if(!t.hasNode(e))throw new Error('graphology-shortest-path: the "'+e+'" source node does not exist in the given graph.');if(!t.hasNode(r))throw new Error('graphology-shortest-path: the "'+r+'" target node does not exist in the given graph.');if((e=""+e)==(r=""+r))return[e];var i=t.inboundNeighbors.bind(t),o=t.outboundNeighbors.bind(t),a={},u={};a[e]=null,u[r]=null;var s,c,h,l,d,f,p,g,v=[e],y=[r],m=!1;t:for(;v.length&&y.length;)if(v.length<=y.length){for(s=v,v=[],d=0,p=s.length;d<p;d++)for(f=0,g=(h=o(c=s[d])).length;f<g;f++)if((l=h[f])in a||(v.push(l),a[l]=c),l in u){m=!0;break t}}else for(s=y,y=[],d=0,p=s.length;d<p;d++)for(f=0,g=(h=i(c=s[d])).length;f<g;f++)if((l=h[f])in u||(y.push(l),u[l]=c),l in a){m=!0;break t}if(!m)return null;for(var b=[];l;)b.unshift(l),l=a[l];for(l=u[b[b.length-1]];l;)b.push(l),l=u[l];return b.length?b:null},e.singleSource=function(t,e){if(!n(t))throw new Error("graphology-shortest-path: invalid graphology instance.");if(arguments.length<2)throw new Error("graphology-shortest-path: invalid number of arguments. Expecting at least 2.");if(!t.hasNode(e))throw new Error('graphology-shortest-path: the "'+e+'" source node does not exist in the given graph.');var r,i,o,a,u,s,c={},h={};for(c[e=""+e]=!0,h[e]=[e];Object.keys(c).length;)for(o in r=c,c={},r)for(u=0,s=(i=t.outboundNeighbors(o)).length;u<s;u++)h[a=i[u]]||(h[a]=h[o].concat(a),c[a]=!0);return h},e.singleSourceLength=u,e.undirectedSingleSourceLength=s,e.brandes=function(t,e){e=""+e;var r,n,o,a,u,s,c,h,l,d=[],f={},p={},g=t.nodes();for(s=0,h=g.length;s<h;s++)f[a=g[s]]=[],p[a]=0;var v={};p[e]=1,v[e]=0;for(var y=i.of(e);y.size;)for(a=y.dequeue(),d.push(a),r=v[a],n=p[a],c=0,l=(o=t.outboundNeighbors(a)).length;c<l;c++)(u=o[c])in v||(y.enqueue(u),v[u]=r+1),v[u]===r+1&&(p[u]+=n,f[u].push(a));return[d,f,p]}},77672:(t,e)=>{var r=function(){return!0};e.edgePathFromNodePath=function(t,e){var n,i,o,a,u=e.length;if(u<2)return i=e[0],(a=t.multi?t.findEdge(i,i,r):t.edge(i,i))?[a]:[];u--;var s=new Array(u);for(n=0;n<u;n++){if(i=e[n],o=e[n+1],void 0===(a=t.multi?t.findOutboundEdge(i,o,r):t.edge(i,o)))throw new Error("graphology-shortest-path: given path is impossible in given graph.");s[n]=a}return s}},27155:(t,e)=>{e.De=function(t,e,r,n,i,o){return o=Object.assign({},o),e?null==r?t.addUndirectedEdge(n,i,o):t.addUndirectedEdgeWithKey(r,n,i,o):null==r?t.addDirectedEdge(n,i,o):t.addDirectedEdgeWithKey(r,n,i,o)}},97052:(t,e)=>{e.B=function(t,e,r){return r=Object.assign({},r),t.addNode(e,r)}},46586:t=>{t.exports=function t(e,r){e=e||{};var n,i={};for(var o in r){var a=e[o],u=r[o];!(n=u)||"object"!=typeof n||"function"==typeof n||Array.isArray(n)||n instanceof Set||n instanceof Map||n instanceof RegExp||n instanceof Date?i[o]=void 0===a?u:a:i[o]=t(a,u)}return i}},4363:(t,e)=>{function r(t){return"number"!=typeof t||isNaN(t)?1:t}e.Q6=function(t){return function(t,e){var r={},n=function(t){return void 0===t?e:t};"function"==typeof e&&(n=e);var i=function(e){return n(e[t])},o=function(){return n(void 0)};return"string"==typeof t?(r.fromAttributes=i,r.fromGraph=function(t,e){return i(t.getEdgeAttributes(e))},r.fromEntry=function(t,e){return i(e)},r.fromPartialEntry=r.fromEntry,r.fromMinimalEntry=r.fromEntry):"function"==typeof t?(r.fromAttributes=function(){throw new Error("graphology-utils/getters/createEdgeValueGetter: irrelevant usage.")},r.fromGraph=function(e,r){var i=e.extremities(r);return n(t(r,e.getEdgeAttributes(r),i[0],i[1],e.getNodeAttributes(i[0]),e.getNodeAttributes(i[1]),e.isUndirected(r)))},r.fromEntry=function(e,r,i,o,a,u,s){return n(t(e,r,i,o,a,u,s))},r.fromPartialEntry=function(e,r,i,o){return n(t(e,r,i,o))},r.fromMinimalEntry=function(e,r){return n(t(e,r))}):(r.fromAttributes=o,r.fromGraph=o,r.fromEntry=o,r.fromMinimalEntry=o),r}(t,r)}},31880:t=>{t.exports=function(t){return null!==t&&"object"==typeof t&&"function"==typeof t.addUndirectedEdgeWithKey&&"function"==typeof t.dropNode&&"boolean"==typeof t.multi}},98996:function(t){t.exports=function(){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,n(t,e)}function r(t){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},r(t)}function n(t,e){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},n(t,e)}function i(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function o(t,e,r){return o=i()?Reflect.construct.bind():function(t,e,r){var i=[null];i.push.apply(i,e);var o=new(Function.bind.apply(t,i));return r&&n(o,r.prototype),o},o.apply(null,arguments)}function a(t){var e="function"==typeof Map?new Map:void 0;return a=function(t){if(null===t||(i=t,-1===Function.toString.call(i).indexOf("[native code]")))return t;var i;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,a)}function a(){return o(t,arguments,r(this).constructor)}return a.prototype=Object.create(t.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),n(a,t)},a(t)}function u(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var s=function(){for(var t=arguments[0],e=1,r=arguments.length;e<r;e++)if(arguments[e])for(var n in arguments[e])t[n]=arguments[e][n];return t};function c(t,e,r,n){var i=t._nodes.get(e),o=null;return i?o="mixed"===n?i.out&&i.out[r]||i.undirected&&i.undirected[r]:"directed"===n?i.out&&i.out[r]:i.undirected&&i.undirected[r]:o}function h(e){return"object"===t(e)&&null!==e&&e.constructor===Object}function l(t){var e;for(e in t)return!1;return!0}function d(t,e,r){Object.defineProperty(t,e,{enumerable:!1,configurable:!1,writable:!0,value:r})}function f(t,e,r){var n={enumerable:!0,configurable:!0};"function"==typeof r?n.get=r:(n.value=r,n.writable=!1),Object.defineProperty(t,e,n)}function p(t){return!(!h(t)||t.attributes&&!Array.isArray(t.attributes))}"function"==typeof Object.assign&&(s=Object.assign);var g,v={exports:{}},y="object"==typeof Reflect?Reflect:null,m=y&&"function"==typeof y.apply?y.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};g=y&&"function"==typeof y.ownKeys?y.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var b=Number.isNaN||function(t){return t!=t};function w(){w.init.call(this)}v.exports=w,v.exports.once=function(t,e){return new Promise((function(r,n){function i(r){t.removeListener(e,o),n(r)}function o(){"function"==typeof t.removeListener&&t.removeListener("error",i),r([].slice.call(arguments))}D(t,e,o,{once:!0}),"error"!==e&&function(t,e,r){"function"==typeof t.on&&D(t,"error",e,{once:!0})}(t,i)}))},w.EventEmitter=w,w.prototype._events=void 0,w.prototype._eventsCount=0,w.prototype._maxListeners=void 0;var _=10;function x(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function E(t){return void 0===t._maxListeners?w.defaultMaxListeners:t._maxListeners}function A(t,e,r,n){var i,o,a,u;if(x(r),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),a=o[e]),void 0===a)a=o[e]=r,++t._eventsCount;else if("function"==typeof a?a=o[e]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(i=E(t))>0&&a.length>i&&!a.warned){a.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=t,s.type=e,s.count=a.length,u=s,console&&console.warn&&console.warn(u)}return t}function L(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function k(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=L.bind(n);return i.listener=r,n.wrapFn=i,i}function C(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(i):M(i,i.length)}function S(t){var e=this._events;if(void 0!==e){var r=e[t];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function M(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}function D(t,e,r,n){if("function"==typeof t.on)n.once?t.once(e,r):t.on(e,r);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function i(o){n.once&&t.removeEventListener(e,i),r(o)}))}}function O(t){if("function"!=typeof t)throw new Error("obliterator/iterator: expecting a function!");this.next=t}Object.defineProperty(w,"defaultMaxListeners",{enumerable:!0,get:function(){return _},set:function(t){if("number"!=typeof t||t<0||b(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");_=t}}),w.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},w.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||b(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},w.prototype.getMaxListeners=function(){return E(this)},w.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var n="error"===t,i=this._events;if(void 0!==i)n=n&&void 0===i.error;else if(!n)return!1;if(n){var o;if(e.length>0&&(o=e[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var u=i[t];if(void 0===u)return!1;if("function"==typeof u)m(u,this,e);else{var s=u.length,c=M(u,s);for(r=0;r<s;++r)m(c[r],this,e)}return!0},w.prototype.addListener=function(t,e){return A(this,t,e,!1)},w.prototype.on=w.prototype.addListener,w.prototype.prependListener=function(t,e){return A(this,t,e,!0)},w.prototype.once=function(t,e){return x(e),this.on(t,k(this,t,e)),this},w.prototype.prependOnceListener=function(t,e){return x(e),this.prependListener(t,k(this,t,e)),this},w.prototype.removeListener=function(t,e){var r,n,i,o,a;if(x(e),void 0===(n=this._events))return this;if(void 0===(r=n[t]))return this;if(r===e||r.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===e||r[o].listener===e){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(r,i),1===r.length&&(n[t]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",t,a||e)}return this},w.prototype.off=w.prototype.removeListener,w.prototype.removeAllListeners=function(t){var e,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[t]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(void 0!==e)for(n=e.length-1;n>=0;n--)this.removeListener(t,e[n]);return this},w.prototype.listeners=function(t){return C(this,t,!0)},w.prototype.rawListeners=function(t){return C(this,t,!1)},w.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):S.call(t,e)},w.prototype.listenerCount=S,w.prototype.eventNames=function(){return this._eventsCount>0?g(this._events):[]},"undefined"!=typeof Symbol&&(O.prototype[Symbol.iterator]=function(){return this}),O.of=function(){var t=arguments,e=t.length,r=0;return new O((function(){return r>=e?{done:!0}:{done:!1,value:t[r++]}}))},O.empty=function(){return new O((function(){return{done:!0}}))},O.fromSequence=function(t){var e=0,r=t.length;return new O((function(){return e>=r?{done:!0}:{done:!1,value:t[e++]}}))},O.is=function(t){return t instanceof O||"object"==typeof t&&null!==t&&"function"==typeof t.next};var G=O,F={};F.ARRAY_BUFFER_SUPPORT="undefined"!=typeof ArrayBuffer,F.SYMBOL_SUPPORT="undefined"!=typeof Symbol;var R=G,T=F,P=T.ARRAY_BUFFER_SUPPORT,N=T.SYMBOL_SUPPORT,j=function(t){var e=function(t){return"string"==typeof t||Array.isArray(t)||P&&ArrayBuffer.isView(t)?R.fromSequence(t):"object"!=typeof t||null===t?null:N&&"function"==typeof t[Symbol.iterator]?t[Symbol.iterator]():"function"==typeof t.next?t:null}(t);if(!e)throw new Error("obliterator: target is not iterable nor a valid iterator.");return e},z=j,U=function(t,e){for(var r,n=arguments.length>1?e:1/0,i=n!==1/0?new Array(n):[],o=0,a=z(t);;){if(o===n)return i;if((r=a.next()).done)return o!==e&&(i.length=o),i;i[o++]=r.value}},I=function(t){function r(e){var r;return(r=t.call(this)||this).name="GraphError",r.message=e,r}return e(r,t),r}(a(Error)),B=function(t){function r(e){var n;return(n=t.call(this,e)||this).name="InvalidArgumentsGraphError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(u(n),r.prototype.constructor),n}return e(r,t),r}(I),W=function(t){function r(e){var n;return(n=t.call(this,e)||this).name="NotFoundGraphError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(u(n),r.prototype.constructor),n}return e(r,t),r}(I),q=function(t){function r(e){var n;return(n=t.call(this,e)||this).name="UsageGraphError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(u(n),r.prototype.constructor),n}return e(r,t),r}(I);function H(t,e){this.key=t,this.attributes=e,this.clear()}function V(t,e){this.key=t,this.attributes=e,this.clear()}function Z(t,e){this.key=t,this.attributes=e,this.clear()}function Y(t,e,r,n,i){this.key=e,this.attributes=i,this.undirected=t,this.source=r,this.target=n}function K(t,e,r,n,i,o,a){var u,s,c,h;if(n=""+n,0===r){if(!(u=t._nodes.get(n)))throw new W("Graph.".concat(e,': could not find the "').concat(n,'" node in the graph.'));c=i,h=o}else if(3===r){if(i=""+i,!(s=t._edges.get(i)))throw new W("Graph.".concat(e,': could not find the "').concat(i,'" edge in the graph.'));var l=s.source.key,d=s.target.key;if(n===l)u=s.target;else{if(n!==d)throw new W("Graph.".concat(e,': the "').concat(n,'" node is not attached to the "').concat(i,'" edge (').concat(l,", ").concat(d,")."));u=s.source}c=o,h=a}else{if(!(s=t._edges.get(n)))throw new W("Graph.".concat(e,': could not find the "').concat(n,'" edge in the graph.'));u=1===r?s.source:s.target,c=i,h=o}return[u,c,h]}H.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.undirectedDegree=0,this.undirectedLoops=0,this.directedLoops=0,this.in={},this.out={},this.undirected={}},V.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.directedLoops=0,this.in={},this.out={}},Z.prototype.clear=function(){this.undirectedDegree=0,this.undirectedLoops=0,this.undirected={}},Y.prototype.attach=function(){var t="out",e="in";this.undirected&&(t=e="undirected");var r=this.source.key,n=this.target.key;this.source[t][n]=this,this.undirected&&r===n||(this.target[e][r]=this)},Y.prototype.attachMulti=function(){var t="out",e="in",r=this.source.key,n=this.target.key;this.undirected&&(t=e="undirected");var i=this.source[t],o=i[n];if(void 0===o)return i[n]=this,void(this.undirected&&r===n||(this.target[e][r]=this));o.previous=this,this.next=o,i[n]=this,this.target[e][r]=this},Y.prototype.detach=function(){var t=this.source.key,e=this.target.key,r="out",n="in";this.undirected&&(r=n="undirected"),delete this.source[r][e],delete this.target[n][t]},Y.prototype.detachMulti=function(){var t=this.source.key,e=this.target.key,r="out",n="in";this.undirected&&(r=n="undirected"),void 0===this.previous?void 0===this.next?(delete this.source[r][e],delete this.target[n][t]):(this.next.previous=void 0,this.source[r][e]=this.next,this.target[n][t]=this.next):(this.previous.next=this.next,void 0!==this.next&&(this.next.previous=this.previous))};var $=[{name:function(t){return"get".concat(t,"Attribute")},attacher:function(t,e,r){t.prototype[e]=function(t,n,i){var o=K(this,e,r,t,n,i),a=o[0],u=o[1];return a.attributes[u]}}},{name:function(t){return"get".concat(t,"Attributes")},attacher:function(t,e,r){t.prototype[e]=function(t,n){return K(this,e,r,t,n)[0].attributes}}},{name:function(t){return"has".concat(t,"Attribute")},attacher:function(t,e,r){t.prototype[e]=function(t,n,i){var o=K(this,e,r,t,n,i),a=o[0],u=o[1];return a.attributes.hasOwnProperty(u)}}},{name:function(t){return"set".concat(t,"Attribute")},attacher:function(t,e,r){t.prototype[e]=function(t,n,i,o){var a=K(this,e,r,t,n,i,o),u=a[0],s=a[1],c=a[2];return u.attributes[s]=c,this.emit("nodeAttributesUpdated",{key:u.key,type:"set",attributes:u.attributes,name:s}),this}}},{name:function(t){return"update".concat(t,"Attribute")},attacher:function(t,e,r){t.prototype[e]=function(t,n,i,o){var a=K(this,e,r,t,n,i,o),u=a[0],s=a[1],c=a[2];if("function"!=typeof c)throw new B("Graph.".concat(e,": updater should be a function."));var h=u.attributes,l=c(h[s]);return h[s]=l,this.emit("nodeAttributesUpdated",{key:u.key,type:"set",attributes:u.attributes,name:s}),this}}},{name:function(t){return"remove".concat(t,"Attribute")},attacher:function(t,e,r){t.prototype[e]=function(t,n,i){var o=K(this,e,r,t,n,i),a=o[0],u=o[1];return delete a.attributes[u],this.emit("nodeAttributesUpdated",{key:a.key,type:"remove",attributes:a.attributes,name:u}),this}}},{name:function(t){return"replace".concat(t,"Attributes")},attacher:function(t,e,r){t.prototype[e]=function(t,n,i){var o=K(this,e,r,t,n,i),a=o[0],u=o[1];if(!h(u))throw new B("Graph.".concat(e,": provided attributes are not a plain object."));return a.attributes=u,this.emit("nodeAttributesUpdated",{key:a.key,type:"replace",attributes:a.attributes}),this}}},{name:function(t){return"merge".concat(t,"Attributes")},attacher:function(t,e,r){t.prototype[e]=function(t,n,i){var o=K(this,e,r,t,n,i),a=o[0],u=o[1];if(!h(u))throw new B("Graph.".concat(e,": provided attributes are not a plain object."));return s(a.attributes,u),this.emit("nodeAttributesUpdated",{key:a.key,type:"merge",attributes:a.attributes,data:u}),this}}},{name:function(t){return"update".concat(t,"Attributes")},attacher:function(t,e,r){t.prototype[e]=function(t,n,i){var o=K(this,e,r,t,n,i),a=o[0],u=o[1];if("function"!=typeof u)throw new B("Graph.".concat(e,": provided updater is not a function."));return a.attributes=u(a.attributes),this.emit("nodeAttributesUpdated",{key:a.key,type:"update",attributes:a.attributes}),this}}}],Q=[{name:function(t){return"get".concat(t,"Attribute")},attacher:function(t,e,r){t.prototype[e]=function(t,n){var i;if("mixed"!==this.type&&"mixed"!==r&&r!==this.type)throw new q("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new q("Graph.".concat(e,": 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."));var o=""+t,a=""+n;if(n=arguments[2],!(i=c(this,o,a,r)))throw new W("Graph.".concat(e,': could not find an edge for the given path ("').concat(o,'" - "').concat(a,'").'))}else{if("mixed"!==r)throw new q("Graph.".concat(e,": 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(t=""+t,!(i=this._edges.get(t)))throw new W("Graph.".concat(e,': could not find the "').concat(t,'" edge in the graph.'))}return i.attributes[n]}}},{name:function(t){return"get".concat(t,"Attributes")},attacher:function(t,e,r){t.prototype[e]=function(t){var n;if("mixed"!==this.type&&"mixed"!==r&&r!==this.type)throw new q("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>1){if(this.multi)throw new q("Graph.".concat(e,": 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."));var i=""+t,o=""+arguments[1];if(!(n=c(this,i,o,r)))throw new W("Graph.".concat(e,': could not find an edge for the given path ("').concat(i,'" - "').concat(o,'").'))}else{if("mixed"!==r)throw new q("Graph.".concat(e,": 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(t=""+t,!(n=this._edges.get(t)))throw new W("Graph.".concat(e,': could not find the "').concat(t,'" edge in the graph.'))}return n.attributes}}},{name:function(t){return"has".concat(t,"Attribute")},attacher:function(t,e,r){t.prototype[e]=function(t,n){var i;if("mixed"!==this.type&&"mixed"!==r&&r!==this.type)throw new q("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new q("Graph.".concat(e,": 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."));var o=""+t,a=""+n;if(n=arguments[2],!(i=c(this,o,a,r)))throw new W("Graph.".concat(e,': could not find an edge for the given path ("').concat(o,'" - "').concat(a,'").'))}else{if("mixed"!==r)throw new q("Graph.".concat(e,": 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(t=""+t,!(i=this._edges.get(t)))throw new W("Graph.".concat(e,': could not find the "').concat(t,'" edge in the graph.'))}return i.attributes.hasOwnProperty(n)}}},{name:function(t){return"set".concat(t,"Attribute")},attacher:function(t,e,r){t.prototype[e]=function(t,n,i){var o;if("mixed"!==this.type&&"mixed"!==r&&r!==this.type)throw new q("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>3){if(this.multi)throw new q("Graph.".concat(e,": 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."));var a=""+t,u=""+n;if(n=arguments[2],i=arguments[3],!(o=c(this,a,u,r)))throw new W("Graph.".concat(e,': could not find an edge for the given path ("').concat(a,'" - "').concat(u,'").'))}else{if("mixed"!==r)throw new q("Graph.".concat(e,": 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(t=""+t,!(o=this._edges.get(t)))throw new W("Graph.".concat(e,': could not find the "').concat(t,'" edge in the graph.'))}return o.attributes[n]=i,this.emit("edgeAttributesUpdated",{key:o.key,type:"set",attributes:o.attributes,name:n}),this}}},{name:function(t){return"update".concat(t,"Attribute")},attacher:function(t,e,r){t.prototype[e]=function(t,n,i){var o;if("mixed"!==this.type&&"mixed"!==r&&r!==this.type)throw new q("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>3){if(this.multi)throw new q("Graph.".concat(e,": 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."));var a=""+t,u=""+n;if(n=arguments[2],i=arguments[3],!(o=c(this,a,u,r)))throw new W("Graph.".concat(e,': could not find an edge for the given path ("').concat(a,'" - "').concat(u,'").'))}else{if("mixed"!==r)throw new q("Graph.".concat(e,": 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(t=""+t,!(o=this._edges.get(t)))throw new W("Graph.".concat(e,': could not find the "').concat(t,'" edge in the graph.'))}if("function"!=typeof i)throw new B("Graph.".concat(e,": updater should be a function."));return o.attributes[n]=i(o.attributes[n]),this.emit("edgeAttributesUpdated",{key:o.key,type:"set",attributes:o.attributes,name:n}),this}}},{name:function(t){return"remove".concat(t,"Attribute")},attacher:function(t,e,r){t.prototype[e]=function(t,n){var i;if("mixed"!==this.type&&"mixed"!==r&&r!==this.type)throw new q("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new q("Graph.".concat(e,": 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."));var o=""+t,a=""+n;if(n=arguments[2],!(i=c(this,o,a,r)))throw new W("Graph.".concat(e,': could not find an edge for the given path ("').concat(o,'" - "').concat(a,'").'))}else{if("mixed"!==r)throw new q("Graph.".concat(e,": 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(t=""+t,!(i=this._edges.get(t)))throw new W("Graph.".concat(e,': could not find the "').concat(t,'" edge in the graph.'))}return delete i.attributes[n],this.emit("edgeAttributesUpdated",{key:i.key,type:"remove",attributes:i.attributes,name:n}),this}}},{name:function(t){return"replace".concat(t,"Attributes")},attacher:function(t,e,r){t.prototype[e]=function(t,n){var i;if("mixed"!==this.type&&"mixed"!==r&&r!==this.type)throw new q("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new q("Graph.".concat(e,": 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."));var o=""+t,a=""+n;if(n=arguments[2],!(i=c(this,o,a,r)))throw new W("Graph.".concat(e,': could not find an edge for the given path ("').concat(o,'" - "').concat(a,'").'))}else{if("mixed"!==r)throw new q("Graph.".concat(e,": 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(t=""+t,!(i=this._edges.get(t)))throw new W("Graph.".concat(e,': could not find the "').concat(t,'" edge in the graph.'))}if(!h(n))throw new B("Graph.".concat(e,": provided attributes are not a plain object."));return i.attributes=n,this.emit("edgeAttributesUpdated",{key:i.key,type:"replace",attributes:i.attributes}),this}}},{name:function(t){return"merge".concat(t,"Attributes")},attacher:function(t,e,r){t.prototype[e]=function(t,n){var i;if("mixed"!==this.type&&"mixed"!==r&&r!==this.type)throw new q("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new q("Graph.".concat(e,": 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."));var o=""+t,a=""+n;if(n=arguments[2],!(i=c(this,o,a,r)))throw new W("Graph.".concat(e,': could not find an edge for the given path ("').concat(o,'" - "').concat(a,'").'))}else{if("mixed"!==r)throw new q("Graph.".concat(e,": 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(t=""+t,!(i=this._edges.get(t)))throw new W("Graph.".concat(e,': could not find the "').concat(t,'" edge in the graph.'))}if(!h(n))throw new B("Graph.".concat(e,": provided attributes are not a plain object."));return s(i.attributes,n),this.emit("edgeAttributesUpdated",{key:i.key,type:"merge",attributes:i.attributes,data:n}),this}}},{name:function(t){return"update".concat(t,"Attributes")},attacher:function(t,e,r){t.prototype[e]=function(t,n){var i;if("mixed"!==this.type&&"mixed"!==r&&r!==this.type)throw new q("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new q("Graph.".concat(e,": 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."));var o=""+t,a=""+n;if(n=arguments[2],!(i=c(this,o,a,r)))throw new W("Graph.".concat(e,': could not find an edge for the given path ("').concat(o,'" - "').concat(a,'").'))}else{if("mixed"!==r)throw new q("Graph.".concat(e,": 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(t=""+t,!(i=this._edges.get(t)))throw new W("Graph.".concat(e,': could not find the "').concat(t,'" edge in the graph.'))}if("function"!=typeof n)throw new B("Graph.".concat(e,": provided updater is not a function."));return i.attributes=n(i.attributes),this.emit("edgeAttributesUpdated",{key:i.key,type:"update",attributes:i.attributes}),this}}}],X=G,J=j,tt=function(){var t=arguments,e=null,r=-1;return new X((function(){for(var n=null;;){if(null===e){if(++r>=t.length)return{done:!0};e=J(t[r])}if(!0!==(n=e.next()).done)break;e=null}return n}))},et=[{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 rt(t,e,r,n){var i=!1;for(var o in e)if(o!==n){var a=e[o];if(i=r(a.key,a.attributes,a.source.key,a.target.key,a.source.attributes,a.target.attributes,a.undirected),t&&i)return a.key}}function nt(t,e,r,n){var i,o,a,u=!1;for(var s in e)if(s!==n){i=e[s];do{if(o=i.source,a=i.target,u=r(i.key,i.attributes,o.key,a.key,o.attributes,a.attributes,i.undirected),t&&u)return i.key;i=i.next}while(void 0!==i)}}function it(t,e){var r,n=Object.keys(t),i=n.length,o=0;return new G((function(){do{if(r)r=r.next;else{if(o>=i)return{done:!0};var a=n[o++];if(a===e){r=void 0;continue}r=t[a]}}while(!r);return{done:!1,value:{edge:r.key,attributes:r.attributes,source:r.source.key,target:r.target.key,sourceAttributes:r.source.attributes,targetAttributes:r.target.attributes,undirected:r.undirected}}}))}function ot(t,e,r,n){var i=e[r];if(i){var o=i.source,a=i.target;return n(i.key,i.attributes,o.key,a.key,o.attributes,a.attributes,i.undirected)&&t?i.key:void 0}}function at(t,e,r,n){var i=e[r];if(i){var o=!1;do{if(o=n(i.key,i.attributes,i.source.key,i.target.key,i.source.attributes,i.target.attributes,i.undirected),t&&o)return i.key;i=i.next}while(void 0!==i)}}function ut(t,e){var r=t[e];return void 0!==r.next?new G((function(){if(!r)return{done:!0};var t={edge:r.key,attributes:r.attributes,source:r.source.key,target:r.target.key,sourceAttributes:r.source.attributes,targetAttributes:r.target.attributes,undirected:r.undirected};return r=r.next,{done:!1,value:t}})):G.of({edge:r.key,attributes:r.attributes,source:r.source.key,target:r.target.key,sourceAttributes:r.source.attributes,targetAttributes:r.target.attributes,undirected:r.undirected})}function st(t,e){if(0===t.size)return[];if("mixed"===e||e===t.type)return"function"==typeof Array.from?Array.from(t._edges.keys()):U(t._edges.keys(),t._edges.size);for(var r,n,i="undirected"===e?t.undirectedSize:t.directedSize,o=new Array(i),a="undirected"===e,u=t._edges.values(),s=0;!0!==(r=u.next()).done;)(n=r.value).undirected===a&&(o[s++]=n.key);return o}function ct(t,e,r,n){if(0!==e.size)for(var i,o,a="mixed"!==r&&r!==e.type,u="undirected"===r,s=!1,c=e._edges.values();!0!==(i=c.next()).done;)if(o=i.value,!a||o.undirected===u){var h=o,l=h.key,d=h.attributes,f=h.source,p=h.target;if(s=n(l,d,f.key,p.key,f.attributes,p.attributes,o.undirected),t&&s)return l}}function ht(t,e){if(0===t.size)return G.empty();var r="mixed"!==e&&e!==t.type,n="undirected"===e,i=t._edges.values();return new G((function(){for(var t,e;;){if((t=i.next()).done)return t;if(e=t.value,!r||e.undirected===n)break}return{value:{edge:e.key,attributes:e.attributes,source:e.source.key,target:e.target.key,sourceAttributes:e.source.attributes,targetAttributes:e.target.attributes,undirected:e.undirected},done:!1}}))}function lt(t,e,r,n,i,o){var a,u=e?nt:rt;if("undirected"!==r){if("out"!==n&&(a=u(t,i.in,o),t&&a))return a;if("in"!==n&&(a=u(t,i.out,o,n?void 0:i.key),t&&a))return a}if("directed"!==r&&(a=u(t,i.undirected,o),t&&a))return a}function dt(t,e,r,n){var i=[];return lt(!1,t,e,r,n,(function(t){i.push(t)})),i}function ft(t,e,r){var n=G.empty();return"undirected"!==t&&("out"!==e&&void 0!==r.in&&(n=tt(n,it(r.in))),"in"!==e&&void 0!==r.out&&(n=tt(n,it(r.out,e?void 0:r.key)))),"directed"!==t&&void 0!==r.undirected&&(n=tt(n,it(r.undirected))),n}function pt(t,e,r,n,i,o,a){var u,s=r?at:ot;if("undirected"!==e){if(void 0!==i.in&&"out"!==n&&(u=s(t,i.in,o,a),t&&u))return u;if(void 0!==i.out&&"in"!==n&&(n||i.key!==o)&&(u=s(t,i.out,o,a),t&&u))return u}if("directed"!==e&&void 0!==i.undirected&&(u=s(t,i.undirected,o,a),t&&u))return u}function gt(t,e,r,n,i){var o=[];return pt(!1,t,e,r,n,i,(function(t){o.push(t)})),o}function vt(t,e,r,n){var i=G.empty();return"undirected"!==t&&(void 0!==r.in&&"out"!==e&&n in r.in&&(i=tt(i,ut(r.in,n))),void 0!==r.out&&"in"!==e&&n in r.out&&(e||r.key!==n)&&(i=tt(i,ut(r.out,n)))),"directed"!==t&&void 0!==r.undirected&&n in r.undirected&&(i=tt(i,ut(r.undirected,n))),i}var yt=[{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 mt(){this.A=null,this.B=null}function bt(t,e,r,n,i){for(var o in n){var a=n[o],u=a.source,s=a.target,c=u===r?s:u;if(!e||!e.has(c.key)){var h=i(c.key,c.attributes);if(t&&h)return c.key}}}function wt(t,e,r,n,i){if("mixed"!==e){if("undirected"===e)return bt(t,null,n,n.undirected,i);if("string"==typeof r)return bt(t,null,n,n[r],i)}var o,a=new mt;if("undirected"!==e){if("out"!==r){if(o=bt(t,null,n,n.in,i),t&&o)return o;a.wrap(n.in)}if("in"!==r){if(o=bt(t,a,n,n.out,i),t&&o)return o;a.wrap(n.out)}}if("directed"!==e&&(o=bt(t,a,n,n.undirected,i),t&&o))return o}function _t(t,e,r){var n=Object.keys(r),i=n.length,o=0;return new G((function(){var a=null;do{if(o>=i)return t&&t.wrap(r),{done:!0};var u=r[n[o++]],s=u.source,c=u.target;a=s===e?c:s,t&&t.has(a.key)&&(a=null)}while(null===a);return{done:!1,value:{neighbor:a.key,attributes:a.attributes}}}))}function xt(t,e,r,n,i){for(var o,a,u,s,c,h,l,d=n._nodes.values(),f=n.type;!0!==(o=d.next()).done;){var p=!1;if(a=o.value,"undirected"!==f)for(u in s=a.out){c=s[u];do{if(h=c.target,p=!0,l=i(a.key,h.key,a.attributes,h.attributes,c.key,c.attributes,c.undirected),t&&l)return c;c=c.next}while(c)}if("directed"!==f)for(u in s=a.undirected)if(!(e&&a.key>u)){c=s[u];do{if((h=c.target).key!==u&&(h=c.source),p=!0,l=i(a.key,h.key,a.attributes,h.attributes,c.key,c.attributes,c.undirected),t&&l)return c;c=c.next}while(c)}if(r&&!p&&(l=i(a.key,null,a.attributes,null,null,null,null),t&&l))return null}}function Et(t){if(!h(t))throw new B('Graph.import: invalid serialized node. A serialized node should be a plain object with at least a "key" property.');if(!("key"in t))throw new B("Graph.import: serialized node is missing its key.");if("attributes"in t&&(!h(t.attributes)||null===t.attributes))throw new B("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.")}function At(t){if(!h(t))throw new B('Graph.import: invalid serialized edge. A serialized edge should be a plain object with at least a "source" & "target" property.');if(!("source"in t))throw new B("Graph.import: serialized edge is missing its source.");if(!("target"in t))throw new B("Graph.import: serialized edge is missing its target.");if("attributes"in t&&(!h(t.attributes)||null===t.attributes))throw new B("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.");if("undirected"in t&&"boolean"!=typeof t.undirected)throw new B("Graph.import: invalid undirectedness information. Undirected should be boolean or omitted.")}mt.prototype.wrap=function(t){null===this.A?this.A=t:null===this.B&&(this.B=t)},mt.prototype.has=function(t){return null!==this.A&&t in this.A||null!==this.B&&t in this.B};var Lt,kt=(Lt=255&Math.floor(256*Math.random()),function(){return Lt++}),Ct=new Set(["directed","undirected","mixed"]),St=new Set(["domain","_events","_eventsCount","_maxListeners"]),Mt={allowSelfLoops:!0,multi:!1,type:"mixed"};function Dt(t,e,r){var n=new t.NodeDataClass(e,r);return t._nodes.set(e,n),t.emit("nodeAdded",{key:e,attributes:r}),n}function Ot(t,e,r,n,i,o,a,u){if(!n&&"undirected"===t.type)throw new q("Graph.".concat(e,": you cannot add a directed edge to an undirected graph. Use the #.addEdge or #.addUndirectedEdge instead."));if(n&&"directed"===t.type)throw new q("Graph.".concat(e,": you cannot add an undirected edge to a directed graph. Use the #.addEdge or #.addDirectedEdge instead."));if(u&&!h(u))throw new B("Graph.".concat(e,': invalid attributes. Expecting an object but got "').concat(u,'"'));if(o=""+o,a=""+a,u=u||{},!t.allowSelfLoops&&o===a)throw new q("Graph.".concat(e,': source & target are the same ("').concat(o,"\"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false."));var s=t._nodes.get(o),c=t._nodes.get(a);if(!s)throw new W("Graph.".concat(e,': source node "').concat(o,'" not found.'));if(!c)throw new W("Graph.".concat(e,': target node "').concat(a,'" not found.'));var l={key:null,undirected:n,source:o,target:a,attributes:u};if(r)i=t._edgeKeyGenerator();else if(i=""+i,t._edges.has(i))throw new q("Graph.".concat(e,': the "').concat(i,'" edge already exists in the graph.'));if(!t.multi&&(n?void 0!==s.undirected[a]:void 0!==s.out[a]))throw new q("Graph.".concat(e,': an edge linking "').concat(o,'" to "').concat(a,"\" already exists. If you really want to add multiple edges linking those nodes, you should create a multi graph by using the 'multi' option."));var d=new Y(n,i,s,c,u);t._edges.set(i,d);var f=o===a;return n?(s.undirectedDegree++,c.undirectedDegree++,f&&(s.undirectedLoops++,t._undirectedSelfLoopCount++)):(s.outDegree++,c.inDegree++,f&&(s.directedLoops++,t._directedSelfLoopCount++)),t.multi?d.attachMulti():d.attach(),n?t._undirectedSize++:t._directedSize++,l.key=i,t.emit("edgeAdded",l),i}function Gt(t,e,r,n,i,o,a,u,c){if(!n&&"undirected"===t.type)throw new q("Graph.".concat(e,": you cannot merge/update a directed edge to an undirected graph. Use the #.mergeEdge/#.updateEdge or #.addUndirectedEdge instead."));if(n&&"directed"===t.type)throw new q("Graph.".concat(e,": you cannot merge/update an undirected edge to a directed graph. Use the #.mergeEdge/#.updateEdge or #.addDirectedEdge instead."));if(u)if(c){if("function"!=typeof u)throw new B("Graph.".concat(e,': invalid updater function. Expecting a function but got "').concat(u,'"'))}else if(!h(u))throw new B("Graph.".concat(e,': invalid attributes. Expecting an object but got "').concat(u,'"'));var l;if(o=""+o,a=""+a,c&&(l=u,u=void 0),!t.allowSelfLoops&&o===a)throw new q("Graph.".concat(e,': source & target are the same ("').concat(o,"\"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false."));var d,f,p=t._nodes.get(o),g=t._nodes.get(a);if(!r&&(d=t._edges.get(i))){if(!(d.source.key===o&&d.target.key===a||n&&d.source.key===a&&d.target.key===o))throw new q("Graph.".concat(e,': inconsistency detected when attempting to merge the "').concat(i,'" edge with "').concat(o,'" source & "').concat(a,'" target vs. ("').concat(d.source.key,'", "').concat(d.target.key,'").'));f=d}if(f||t.multi||!p||(f=n?p.undirected[a]:p.out[a]),f){var v=[f.key,!1,!1,!1];if(c?!l:!u)return v;if(c){var y=f.attributes;f.attributes=l(y),t.emit("edgeAttributesUpdated",{type:"replace",key:f.key,attributes:f.attributes})}else s(f.attributes,u),t.emit("edgeAttributesUpdated",{type:"merge",key:f.key,attributes:f.attributes,data:u});return v}u=u||{},c&&l&&(u=l(u));var m={key:null,undirected:n,source:o,target:a,attributes:u};if(r)i=t._edgeKeyGenerator();else if(i=""+i,t._edges.has(i))throw new q("Graph.".concat(e,': the "').concat(i,'" edge already exists in the graph.'));var b=!1,w=!1;p||(p=Dt(t,o,{}),b=!0,o===a&&(g=p,w=!0)),g||(g=Dt(t,a,{}),w=!0),d=new Y(n,i,p,g,u),t._edges.set(i,d);var _=o===a;return n?(p.undirectedDegree++,g.undirectedDegree++,_&&(p.undirectedLoops++,t._undirectedSelfLoopCount++)):(p.outDegree++,g.inDegree++,_&&(p.directedLoops++,t._directedSelfLoopCount++)),t.multi?d.attachMulti():d.attach(),n?t._undirectedSize++:t._directedSize++,m.key=i,t.emit("edgeAdded",m),[i,!0,b,w]}function Ft(t,e){t._edges.delete(e.key);var r=e.source,n=e.target,i=e.attributes,o=e.undirected,a=r===n;o?(r.undirectedDegree--,n.undirectedDegree--,a&&(r.undirectedLoops--,t._undirectedSelfLoopCount--)):(r.outDegree--,n.inDegree--,a&&(r.directedLoops--,t._directedSelfLoopCount--)),t.multi?e.detachMulti():e.detach(),o?t._undirectedSize--:t._directedSize--,t.emit("edgeDropped",{key:e.key,attributes:i,source:r.key,target:n.key,undirected:o})}var Rt=function(r){function n(t){var e;if(e=r.call(this)||this,"boolean"!=typeof(t=s({},Mt,t)).multi)throw new B("Graph.constructor: invalid 'multi' option. Expecting a boolean but got \"".concat(t.multi,'".'));if(!Ct.has(t.type))throw new B('Graph.constructor: invalid \'type\' option. Should be one of "mixed", "directed" or "undirected" but got "'.concat(t.type,'".'));if("boolean"!=typeof t.allowSelfLoops)throw new B("Graph.constructor: invalid 'allowSelfLoops' option. Expecting a boolean but got \"".concat(t.allowSelfLoops,'".'));var n="mixed"===t.type?H:"directed"===t.type?V:Z;d(u(e),"NodeDataClass",n);var i="geid_"+kt()+"_",o=0;return d(u(e),"_attributes",{}),d(u(e),"_nodes",new Map),d(u(e),"_edges",new Map),d(u(e),"_directedSize",0),d(u(e),"_undirectedSize",0),d(u(e),"_directedSelfLoopCount",0),d(u(e),"_undirectedSelfLoopCount",0),d(u(e),"_edgeKeyGenerator",(function(){var t;do{t=i+o++}while(e._edges.has(t));return t})),d(u(e),"_options",t),St.forEach((function(t){return d(u(e),t,e[t])})),f(u(e),"order",(function(){return e._nodes.size})),f(u(e),"size",(function(){return e._edges.size})),f(u(e),"directedSize",(function(){return e._directedSize})),f(u(e),"undirectedSize",(function(){return e._undirectedSize})),f(u(e),"selfLoopCount",(function(){return e._directedSelfLoopCount+e._undirectedSelfLoopCount})),f(u(e),"directedSelfLoopCount",(function(){return e._directedSelfLoopCount})),f(u(e),"undirectedSelfLoopCount",(function(){return e._undirectedSelfLoopCount})),f(u(e),"multi",e._options.multi),f(u(e),"type",e._options.type),f(u(e),"allowSelfLoops",e._options.allowSelfLoops),f(u(e),"implementation",(function(){return"graphology"})),e}e(n,r);var i=n.prototype;return i._resetInstanceCounters=function(){this._directedSize=0,this._undirectedSize=0,this._directedSelfLoopCount=0,this._undirectedSelfLoopCount=0},i.hasNode=function(t){return this._nodes.has(""+t)},i.hasDirectedEdge=function(t,e){if("undirected"===this.type)return!1;if(1===arguments.length){var r=""+t,n=this._edges.get(r);return!!n&&!n.undirected}if(2===arguments.length){t=""+t,e=""+e;var i=this._nodes.get(t);return!!i&&i.out.hasOwnProperty(e)}throw new B("Graph.hasDirectedEdge: invalid arity (".concat(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."))},i.hasUndirectedEdge=function(t,e){if("directed"===this.type)return!1;if(1===arguments.length){var r=""+t,n=this._edges.get(r);return!!n&&n.undirected}if(2===arguments.length){t=""+t,e=""+e;var i=this._nodes.get(t);return!!i&&i.undirected.hasOwnProperty(e)}throw new B("Graph.hasDirectedEdge: invalid arity (".concat(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."))},i.hasEdge=function(t,e){if(1===arguments.length){var r=""+t;return this._edges.has(r)}if(2===arguments.length){t=""+t,e=""+e;var n=this._nodes.get(t);return!!n&&(void 0!==n.out&&n.out.hasOwnProperty(e)||void 0!==n.undirected&&n.undirected.hasOwnProperty(e))}throw new B("Graph.hasEdge: invalid arity (".concat(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."))},i.directedEdge=function(t,e){if("undirected"!==this.type){if(t=""+t,e=""+e,this.multi)throw new q("Graph.directedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.directedEdges instead.");var r=this._nodes.get(t);if(!r)throw new W('Graph.directedEdge: could not find the "'.concat(t,'" source node in the graph.'));if(!this._nodes.has(e))throw new W('Graph.directedEdge: could not find the "'.concat(e,'" target node in the graph.'));var n=r.out&&r.out[e]||void 0;return n?n.key:void 0}},i.undirectedEdge=function(t,e){if("directed"!==this.type){if(t=""+t,e=""+e,this.multi)throw new q("Graph.undirectedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.undirectedEdges instead.");var r=this._nodes.get(t);if(!r)throw new W('Graph.undirectedEdge: could not find the "'.concat(t,'" source node in the graph.'));if(!this._nodes.has(e))throw new W('Graph.undirectedEdge: could not find the "'.concat(e,'" target node in the graph.'));var n=r.undirected&&r.undirected[e]||void 0;return n?n.key:void 0}},i.edge=function(t,e){if(this.multi)throw new q("Graph.edge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.edges instead.");t=""+t,e=""+e;var r=this._nodes.get(t);if(!r)throw new W('Graph.edge: could not find the "'.concat(t,'" source node in the graph.'));if(!this._nodes.has(e))throw new W('Graph.edge: could not find the "'.concat(e,'" target node in the graph.'));var n=r.out&&r.out[e]||r.undirected&&r.undirected[e]||void 0;if(n)return n.key},i.areDirectedNeighbors=function(t,e){t=""+t,e=""+e;var r=this._nodes.get(t);if(!r)throw new W('Graph.areDirectedNeighbors: could not find the "'.concat(t,'" node in the graph.'));return"undirected"!==this.type&&(e in r.in||e in r.out)},i.areOutNeighbors=function(t,e){t=""+t,e=""+e;var r=this._nodes.get(t);if(!r)throw new W('Graph.areOutNeighbors: could not find the "'.concat(t,'" node in the graph.'));return"undirected"!==this.type&&e in r.out},i.areInNeighbors=function(t,e){t=""+t,e=""+e;var r=this._nodes.get(t);if(!r)throw new W('Graph.areInNeighbors: could not find the "'.concat(t,'" node in the graph.'));return"undirected"!==this.type&&e in r.in},i.areUndirectedNeighbors=function(t,e){t=""+t,e=""+e;var r=this._nodes.get(t);if(!r)throw new W('Graph.areUndirectedNeighbors: could not find the "'.concat(t,'" node in the graph.'));return"directed"!==this.type&&e in r.undirected},i.areNeighbors=function(t,e){t=""+t,e=""+e;var r=this._nodes.get(t);if(!r)throw new W('Graph.areNeighbors: could not find the "'.concat(t,'" node in the graph.'));return"undirected"!==this.type&&(e in r.in||e in r.out)||"directed"!==this.type&&e in r.undirected},i.areInboundNeighbors=function(t,e){t=""+t,e=""+e;var r=this._nodes.get(t);if(!r)throw new W('Graph.areInboundNeighbors: could not find the "'.concat(t,'" node in the graph.'));return"undirected"!==this.type&&e in r.in||"directed"!==this.type&&e in r.undirected},i.areOutboundNeighbors=function(t,e){t=""+t,e=""+e;var r=this._nodes.get(t);if(!r)throw new W('Graph.areOutboundNeighbors: could not find the "'.concat(t,'" node in the graph.'));return"undirected"!==this.type&&e in r.out||"directed"!==this.type&&e in r.undirected},i.inDegree=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new W('Graph.inDegree: could not find the "'.concat(t,'" node in the graph.'));return"undirected"===this.type?0:e.inDegree},i.outDegree=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new W('Graph.outDegree: could not find the "'.concat(t,'" node in the graph.'));return"undirected"===this.type?0:e.outDegree},i.directedDegree=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new W('Graph.directedDegree: could not find the "'.concat(t,'" node in the graph.'));return"undirected"===this.type?0:e.inDegree+e.outDegree},i.undirectedDegree=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new W('Graph.undirectedDegree: could not find the "'.concat(t,'" node in the graph.'));return"directed"===this.type?0:e.undirectedDegree},i.inboundDegree=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new W('Graph.inboundDegree: could not find the "'.concat(t,'" node in the graph.'));var r=0;return"directed"!==this.type&&(r+=e.undirectedDegree),"undirected"!==this.type&&(r+=e.inDegree),r},i.outboundDegree=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new W('Graph.outboundDegree: could not find the "'.concat(t,'" node in the graph.'));var r=0;return"directed"!==this.type&&(r+=e.undirectedDegree),"undirected"!==this.type&&(r+=e.outDegree),r},i.degree=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new W('Graph.degree: could not find the "'.concat(t,'" node in the graph.'));var r=0;return"directed"!==this.type&&(r+=e.undirectedDegree),"undirected"!==this.type&&(r+=e.inDegree+e.outDegree),r},i.inDegreeWithoutSelfLoops=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new W('Graph.inDegreeWithoutSelfLoops: could not find the "'.concat(t,'" node in the graph.'));return"undirected"===this.type?0:e.inDegree-e.directedLoops},i.outDegreeWithoutSelfLoops=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new W('Graph.outDegreeWithoutSelfLoops: could not find the "'.concat(t,'" node in the graph.'));return"undirected"===this.type?0:e.outDegree-e.directedLoops},i.directedDegreeWithoutSelfLoops=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new W('Graph.directedDegreeWithoutSelfLoops: could not find the "'.concat(t,'" node in the graph.'));return"undirected"===this.type?0:e.inDegree+e.outDegree-2*e.directedLoops},i.undirectedDegreeWithoutSelfLoops=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new W('Graph.undirectedDegreeWithoutSelfLoops: could not find the "'.concat(t,'" node in the graph.'));return"directed"===this.type?0:e.undirectedDegree-2*e.undirectedLoops},i.inboundDegreeWithoutSelfLoops=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new W('Graph.inboundDegreeWithoutSelfLoops: could not find the "'.concat(t,'" node in the graph.'));var r=0,n=0;return"directed"!==this.type&&(r+=e.undirectedDegree,n+=2*e.undirectedLoops),"undirected"!==this.type&&(r+=e.inDegree,n+=e.directedLoops),r-n},i.outboundDegreeWithoutSelfLoops=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new W('Graph.outboundDegreeWithoutSelfLoops: could not find the "'.concat(t,'" node in the graph.'));var r=0,n=0;return"directed"!==this.type&&(r+=e.undirectedDegree,n+=2*e.undirectedLoops),"undirected"!==this.type&&(r+=e.outDegree,n+=e.directedLoops),r-n},i.degreeWithoutSelfLoops=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new W('Graph.degreeWithoutSelfLoops: could not find the "'.concat(t,'" node in the graph.'));var r=0,n=0;return"directed"!==this.type&&(r+=e.undirectedDegree,n+=2*e.undirectedLoops),"undirected"!==this.type&&(r+=e.inDegree+e.outDegree,n+=2*e.directedLoops),r-n},i.source=function(t){t=""+t;var e=this._edges.get(t);if(!e)throw new W('Graph.source: could not find the "'.concat(t,'" edge in the graph.'));return e.source.key},i.target=function(t){t=""+t;var e=this._edges.get(t);if(!e)throw new W('Graph.target: could not find the "'.concat(t,'" edge in the graph.'));return e.target.key},i.extremities=function(t){t=""+t;var e=this._edges.get(t);if(!e)throw new W('Graph.extremities: could not find the "'.concat(t,'" edge in the graph.'));return[e.source.key,e.target.key]},i.opposite=function(t,e){t=""+t,e=""+e;var r=this._edges.get(e);if(!r)throw new W('Graph.opposite: could not find the "'.concat(e,'" edge in the graph.'));var n=r.source.key,i=r.target.key;if(t===n)return i;if(t===i)return n;throw new W('Graph.opposite: the "'.concat(t,'" node is not attached to the "').concat(e,'" edge (').concat(n,", ").concat(i,")."))},i.hasExtremity=function(t,e){t=""+t,e=""+e;var r=this._edges.get(t);if(!r)throw new W('Graph.hasExtremity: could not find the "'.concat(t,'" edge in the graph.'));return r.source.key===e||r.target.key===e},i.isUndirected=function(t){t=""+t;var e=this._edges.get(t);if(!e)throw new W('Graph.isUndirected: could not find the "'.concat(t,'" edge in the graph.'));return e.undirected},i.isDirected=function(t){t=""+t;var e=this._edges.get(t);if(!e)throw new W('Graph.isDirected: could not find the "'.concat(t,'" edge in the graph.'));return!e.undirected},i.isSelfLoop=function(t){t=""+t;var e=this._edges.get(t);if(!e)throw new W('Graph.isSelfLoop: could not find the "'.concat(t,'" edge in the graph.'));return e.source===e.target},i.addNode=function(t,e){var r=function(t,e,r){if(r&&!h(r))throw new B('Graph.addNode: invalid attributes. Expecting an object but got "'.concat(r,'"'));if(e=""+e,r=r||{},t._nodes.has(e))throw new q('Graph.addNode: the "'.concat(e,'" node already exist in the graph.'));var n=new t.NodeDataClass(e,r);return t._nodes.set(e,n),t.emit("nodeAdded",{key:e,attributes:r}),n}(this,t,e);return r.key},i.mergeNode=function(t,e){if(e&&!h(e))throw new B('Graph.mergeNode: invalid attributes. Expecting an object but got "'.concat(e,'"'));t=""+t,e=e||{};var r=this._nodes.get(t);return r?(e&&(s(r.attributes,e),this.emit("nodeAttributesUpdated",{type:"merge",key:t,attributes:r.attributes,data:e})),[t,!1]):(r=new this.NodeDataClass(t,e),this._nodes.set(t,r),this.emit("nodeAdded",{key:t,attributes:e}),[t,!0])},i.updateNode=function(t,e){if(e&&"function"!=typeof e)throw new B('Graph.updateNode: invalid updater function. Expecting a function but got "'.concat(e,'"'));t=""+t;var r=this._nodes.get(t);if(r){if(e){var n=r.attributes;r.attributes=e(n),this.emit("nodeAttributesUpdated",{type:"replace",key:t,attributes:r.attributes})}return[t,!1]}var i=e?e({}):{};return r=new this.NodeDataClass(t,i),this._nodes.set(t,r),this.emit("nodeAdded",{key:t,attributes:i}),[t,!0]},i.dropNode=function(t){t=""+t;var e,r=this._nodes.get(t);if(!r)throw new W('Graph.dropNode: could not find the "'.concat(t,'" node in the graph.'));if("undirected"!==this.type){for(var n in r.out){e=r.out[n];do{Ft(this,e),e=e.next}while(e)}for(var i in r.in){e=r.in[i];do{Ft(this,e),e=e.next}while(e)}}if("directed"!==this.type)for(var o in r.undirected){e=r.undirected[o];do{Ft(this,e),e=e.next}while(e)}this._nodes.delete(t),this.emit("nodeDropped",{key:t,attributes:r.attributes})},i.dropEdge=function(t){var e;if(arguments.length>1){var r=""+arguments[0],n=""+arguments[1];if(!(e=c(this,r,n,this.type)))throw new W('Graph.dropEdge: could not find the "'.concat(r,'" -> "').concat(n,'" edge in the graph.'))}else if(t=""+t,!(e=this._edges.get(t)))throw new W('Graph.dropEdge: could not find the "'.concat(t,'" edge in the graph.'));return Ft(this,e),this},i.dropDirectedEdge=function(t,e){if(arguments.length<2)throw new q("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 q("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.");var r=c(this,t=""+t,e=""+e,"directed");if(!r)throw new W('Graph.dropDirectedEdge: could not find a "'.concat(t,'" -> "').concat(e,'" edge in the graph.'));return Ft(this,r),this},i.dropUndirectedEdge=function(t,e){if(arguments.length<2)throw new q("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 q("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.");var r=c(this,t,e,"undirected");if(!r)throw new W('Graph.dropUndirectedEdge: could not find a "'.concat(t,'" -> "').concat(e,'" edge in the graph.'));return Ft(this,r),this},i.clear=function(){this._edges.clear(),this._nodes.clear(),this._resetInstanceCounters(),this.emit("cleared")},i.clearEdges=function(){for(var t,e=this._nodes.values();!0!==(t=e.next()).done;)t.value.clear();this._edges.clear(),this._resetInstanceCounters(),this.emit("edgesCleared")},i.getAttribute=function(t){return this._attributes[t]},i.getAttributes=function(){return this._attributes},i.hasAttribute=function(t){return this._attributes.hasOwnProperty(t)},i.setAttribute=function(t,e){return this._attributes[t]=e,this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:t}),this},i.updateAttribute=function(t,e){if("function"!=typeof e)throw new B("Graph.updateAttribute: updater should be a function.");var r=this._attributes[t];return this._attributes[t]=e(r),this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:t}),this},i.removeAttribute=function(t){return delete this._attributes[t],this.emit("attributesUpdated",{type:"remove",attributes:this._attributes,name:t}),this},i.replaceAttributes=function(t){if(!h(t))throw new B("Graph.replaceAttributes: provided attributes are not a plain object.");return this._attributes=t,this.emit("attributesUpdated",{type:"replace",attributes:this._attributes}),this},i.mergeAttributes=function(t){if(!h(t))throw new B("Graph.mergeAttributes: provided attributes are not a plain object.");return s(this._attributes,t),this.emit("attributesUpdated",{type:"merge",attributes:this._attributes,data:t}),this},i.updateAttributes=function(t){if("function"!=typeof t)throw new B("Graph.updateAttributes: provided updater is not a function.");return this._attributes=t(this._attributes),this.emit("attributesUpdated",{type:"update",attributes:this._attributes}),this},i.updateEachNodeAttributes=function(t,e){if("function"!=typeof t)throw new B("Graph.updateEachNodeAttributes: expecting an updater function.");if(e&&!p(e))throw new B("Graph.updateEachNodeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");for(var r,n,i=this._nodes.values();!0!==(r=i.next()).done;)(n=r.value).attributes=t(n.key,n.attributes);this.emit("eachNodeAttributesUpdated",{hints:e||null})},i.updateEachEdgeAttributes=function(t,e){if("function"!=typeof t)throw new B("Graph.updateEachEdgeAttributes: expecting an updater function.");if(e&&!p(e))throw new B("Graph.updateEachEdgeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");for(var r,n,i,o,a=this._edges.values();!0!==(r=a.next()).done;)i=(n=r.value).source,o=n.target,n.attributes=t(n.key,n.attributes,i.key,o.key,i.attributes,o.attributes,n.undirected);this.emit("eachEdgeAttributesUpdated",{hints:e||null})},i.forEachAdjacencyEntry=function(t){if("function"!=typeof t)throw new B("Graph.forEachAdjacencyEntry: expecting a callback.");xt(!1,!1,!1,this,t)},i.forEachAdjacencyEntryWithOrphans=function(t){if("function"!=typeof t)throw new B("Graph.forEachAdjacencyEntryWithOrphans: expecting a callback.");xt(!1,!1,!0,this,t)},i.forEachAssymetricAdjacencyEntry=function(t){if("function"!=typeof t)throw new B("Graph.forEachAssymetricAdjacencyEntry: expecting a callback.");xt(!1,!0,!1,this,t)},i.forEachAssymetricAdjacencyEntryWithOrphans=function(t){if("function"!=typeof t)throw new B("Graph.forEachAssymetricAdjacencyEntryWithOrphans: expecting a callback.");xt(!1,!0,!0,this,t)},i.nodes=function(){return"function"==typeof Array.from?Array.from(this._nodes.keys()):U(this._nodes.keys(),this._nodes.size)},i.forEachNode=function(t){if("function"!=typeof t)throw new B("Graph.forEachNode: expecting a callback.");for(var e,r,n=this._nodes.values();!0!==(e=n.next()).done;)t((r=e.value).key,r.attributes)},i.findNode=function(t){if("function"!=typeof t)throw new B("Graph.findNode: expecting a callback.");for(var e,r,n=this._nodes.values();!0!==(e=n.next()).done;)if(t((r=e.value).key,r.attributes))return r.key},i.mapNodes=function(t){if("function"!=typeof t)throw new B("Graph.mapNode: expecting a callback.");for(var e,r,n=this._nodes.values(),i=new Array(this.order),o=0;!0!==(e=n.next()).done;)r=e.value,i[o++]=t(r.key,r.attributes);return i},i.someNode=function(t){if("function"!=typeof t)throw new B("Graph.someNode: expecting a callback.");for(var e,r,n=this._nodes.values();!0!==(e=n.next()).done;)if(t((r=e.value).key,r.attributes))return!0;return!1},i.everyNode=function(t){if("function"!=typeof t)throw new B("Graph.everyNode: expecting a callback.");for(var e,r,n=this._nodes.values();!0!==(e=n.next()).done;)if(!t((r=e.value).key,r.attributes))return!1;return!0},i.filterNodes=function(t){if("function"!=typeof t)throw new B("Graph.filterNodes: expecting a callback.");for(var e,r,n=this._nodes.values(),i=[];!0!==(e=n.next()).done;)t((r=e.value).key,r.attributes)&&i.push(r.key);return i},i.reduceNodes=function(t,e){if("function"!=typeof t)throw new B("Graph.reduceNodes: expecting a callback.");if(arguments.length<2)throw new B("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.");for(var r,n,i=e,o=this._nodes.values();!0!==(r=o.next()).done;)i=t(i,(n=r.value).key,n.attributes);return i},i.nodeEntries=function(){var t=this._nodes.values();return new G((function(){var e=t.next();if(e.done)return e;var r=e.value;return{value:{node:r.key,attributes:r.attributes},done:!1}}))},i.export=function(){var t=this,e=new Array(this._nodes.size),r=0;this._nodes.forEach((function(t,n){e[r++]=function(t,e){var r={key:t};return l(e.attributes)||(r.attributes=s({},e.attributes)),r}(n,t)}));var n=new Array(this._edges.size);return r=0,this._edges.forEach((function(e,i){n[r++]=function(t,e,r){var n={key:e,source:r.source.key,target:r.target.key};return l(r.attributes)||(n.attributes=s({},r.attributes)),"mixed"===t&&r.undirected&&(n.undirected=!0),n}(t.type,i,e)})),{options:{type:this.type,multi:this.multi,allowSelfLoops:this.allowSelfLoops},attributes:this.getAttributes(),nodes:e,edges:n}},i.import=function(t){var e,r,i,o,a,u=this,s=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t instanceof n)return t.forEachNode((function(t,e){s?u.mergeNode(t,e):u.addNode(t,e)})),t.forEachEdge((function(t,e,r,n,i,o,a){s?a?u.mergeUndirectedEdgeWithKey(t,r,n,e):u.mergeDirectedEdgeWithKey(t,r,n,e):a?u.addUndirectedEdgeWithKey(t,r,n,e):u.addDirectedEdgeWithKey(t,r,n,e)})),this;if(!h(t))throw new B("Graph.import: invalid argument. Expecting a serialized graph or, alternatively, a Graph instance.");if(t.attributes){if(!h(t.attributes))throw new B("Graph.import: invalid attributes. Expecting a plain object.");s?this.mergeAttributes(t.attributes):this.replaceAttributes(t.attributes)}if(t.nodes){if(i=t.nodes,!Array.isArray(i))throw new B("Graph.import: invalid nodes. Expecting an array.");for(e=0,r=i.length;e<r;e++){Et(o=i[e]);var c=o,l=c.key,d=c.attributes;s?this.mergeNode(l,d):this.addNode(l,d)}}if(t.edges){var f=!1;if("undirected"===this.type&&(f=!0),i=t.edges,!Array.isArray(i))throw new B("Graph.import: invalid edges. Expecting an array.");for(e=0,r=i.length;e<r;e++){At(a=i[e]);var p=a,g=p.source,v=p.target,y=p.attributes,m=p.undirected,b=void 0===m?f:m;"key"in a?(s?b?this.mergeUndirectedEdgeWithKey:this.mergeDirectedEdgeWithKey:b?this.addUndirectedEdgeWithKey:this.addDirectedEdgeWithKey).call(this,a.key,g,v,y):(s?b?this.mergeUndirectedEdge:this.mergeDirectedEdge:b?this.addUndirectedEdge:this.addDirectedEdge).call(this,g,v,y)}}return this},i.nullCopy=function(t){var e=new n(s({},this._options,t));return e.replaceAttributes(s({},this.getAttributes())),e},i.emptyCopy=function(t){var e=this.nullCopy(t);return this._nodes.forEach((function(t,r){var n=s({},t.attributes);t=new e.NodeDataClass(r,n),e._nodes.set(r,t)})),e},i.copy=function(t){if("string"==typeof(t=t||{}).type&&t.type!==this.type&&"mixed"!==t.type)throw new q('Graph.copy: cannot create an incompatible copy from "'.concat(this.type,'" type to "').concat(t.type,'" because this would mean losing information about the current graph.'));if("boolean"==typeof t.multi&&t.multi!==this.multi&&!0!==t.multi)throw new q("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("boolean"==typeof t.allowSelfLoops&&t.allowSelfLoops!==this.allowSelfLoops&&!0!==t.allowSelfLoops)throw new q("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.");for(var e,r,n=this.emptyCopy(t),i=this._edges.values();!0!==(e=i.next()).done;)Ot(n,"copy",!1,(r=e.value).undirected,r.key,r.source.key,r.target.key,s({},r.attributes));return n},i.toJSON=function(){return this.export()},i.toString=function(){return"[object Graph]"},i.inspect=function(){var e=this,r={};this._nodes.forEach((function(t,e){r[e]=t.attributes}));var n={},i={};this._edges.forEach((function(t,r){var o,a=t.undirected?"--":"->",u="",s=t.source.key,c=t.target.key;t.undirected&&s>c&&(o=s,s=c,c=o);var h="(".concat(s,")").concat(a,"(").concat(c,")");r.startsWith("geid_")?e.multi&&(void 0===i[h]?i[h]=0:i[h]++,u+="".concat(i[h],". ")):u+="[".concat(r,"]: "),n[u+=h]=t.attributes}));var o={};for(var a in this)this.hasOwnProperty(a)&&!St.has(a)&&"function"!=typeof this[a]&&"symbol"!==t(a)&&(o[a]=this[a]);return o.attributes=this._attributes,o.nodes=r,o.edges=n,d(o,"constructor",this.constructor),o},n}(v.exports.EventEmitter);"undefined"!=typeof Symbol&&(Rt.prototype[Symbol.for("nodejs.util.inspect.custom")]=Rt.prototype.inspect),[{name:function(t){return"".concat(t,"Edge")},generateKey:!0},{name:function(t){return"".concat(t,"DirectedEdge")},generateKey:!0,type:"directed"},{name:function(t){return"".concat(t,"UndirectedEdge")},generateKey:!0,type:"undirected"},{name:function(t){return"".concat(t,"EdgeWithKey")}},{name:function(t){return"".concat(t,"DirectedEdgeWithKey")},type:"directed"},{name:function(t){return"".concat(t,"UndirectedEdgeWithKey")},type:"undirected"}].forEach((function(t){["add","merge","update"].forEach((function(e){var r=t.name(e),n="add"===e?Ot:Gt;t.generateKey?Rt.prototype[r]=function(i,o,a){return n(this,r,!0,"undirected"===(t.type||this.type),null,i,o,a,"update"===e)}:Rt.prototype[r]=function(i,o,a,u){return n(this,r,!1,"undirected"===(t.type||this.type),i,o,a,u,"update"===e)}}))})),function(t){$.forEach((function(e){var r=e.name,n=e.attacher;n(t,r("Node"),0),n(t,r("Source"),1),n(t,r("Target"),2),n(t,r("Opposite"),3)}))}(Rt),function(t){Q.forEach((function(e){var r=e.name,n=e.attacher;n(t,r("Edge"),"mixed"),n(t,r("DirectedEdge"),"directed"),n(t,r("UndirectedEdge"),"undirected")}))}(Rt),function(t){et.forEach((function(e){!function(t,e){var r=e.name,n=e.type,i=e.direction;t.prototype[r]=function(t,e){if("mixed"!==n&&"mixed"!==this.type&&n!==this.type)return[];if(!arguments.length)return st(this,n);if(1===arguments.length){t=""+t;var o=this._nodes.get(t);if(void 0===o)throw new W("Graph.".concat(r,': could not find the "').concat(t,'" node in the graph.'));return dt(this.multi,"mixed"===n?this.type:n,i,o)}if(2===arguments.length){t=""+t,e=""+e;var a=this._nodes.get(t);if(!a)throw new W("Graph.".concat(r,': could not find the "').concat(t,'" source node in the graph.'));if(!this._nodes.has(e))throw new W("Graph.".concat(r,': could not find the "').concat(e,'" target node in the graph.'));return gt(n,this.multi,i,a,e)}throw new B("Graph.".concat(r,": too many arguments (expecting 0, 1 or 2 and got ").concat(arguments.length,")."))}}(t,e),function(t,e){var r=e.name,n=e.type,i=e.direction,o="forEach"+r[0].toUpperCase()+r.slice(1,-1);t.prototype[o]=function(t,e,r){if("mixed"===n||"mixed"===this.type||n===this.type){if(1===arguments.length)return ct(!1,this,n,r=t);if(2===arguments.length){t=""+t,r=e;var a=this._nodes.get(t);if(void 0===a)throw new W("Graph.".concat(o,': could not find the "').concat(t,'" node in the graph.'));return lt(!1,this.multi,"mixed"===n?this.type:n,i,a,r)}if(3===arguments.length){t=""+t,e=""+e;var u=this._nodes.get(t);if(!u)throw new W("Graph.".concat(o,': could not find the "').concat(t,'" source node in the graph.'));if(!this._nodes.has(e))throw new W("Graph.".concat(o,': could not find the "').concat(e,'" target node in the graph.'));return pt(!1,n,this.multi,i,u,e,r)}throw new B("Graph.".concat(o,": too many arguments (expecting 1, 2 or 3 and got ").concat(arguments.length,")."))}};var a="map"+r[0].toUpperCase()+r.slice(1);t.prototype[a]=function(){var t,e=Array.prototype.slice.call(arguments),r=e.pop();if(0===e.length){var i=0;"directed"!==n&&(i+=this.undirectedSize),"undirected"!==n&&(i+=this.directedSize),t=new Array(i);var a=0;e.push((function(e,n,i,o,u,s,c){t[a++]=r(e,n,i,o,u,s,c)}))}else t=[],e.push((function(e,n,i,o,a,u,s){t.push(r(e,n,i,o,a,u,s))}));return this[o].apply(this,e),t};var u="filter"+r[0].toUpperCase()+r.slice(1);t.prototype[u]=function(){var t=Array.prototype.slice.call(arguments),e=t.pop(),r=[];return t.push((function(t,n,i,o,a,u,s){e(t,n,i,o,a,u,s)&&r.push(t)})),this[o].apply(this,t),r};var s="reduce"+r[0].toUpperCase()+r.slice(1);t.prototype[s]=function(){var t,e,r=Array.prototype.slice.call(arguments);if(r.length<2||r.length>4)throw new B("Graph.".concat(s,": invalid number of arguments (expecting 2, 3 or 4 and got ").concat(r.length,")."));if("function"==typeof r[r.length-1]&&"function"!=typeof r[r.length-2])throw new B("Graph.".concat(s,": 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."));2===r.length?(t=r[0],e=r[1],r=[]):3===r.length?(t=r[1],e=r[2],r=[r[0]]):4===r.length&&(t=r[2],e=r[3],r=[r[0],r[1]]);var n=e;return r.push((function(e,r,i,o,a,u,s){n=t(n,e,r,i,o,a,u,s)})),this[o].apply(this,r),n}}(t,e),function(t,e){var r=e.name,n=e.type,i=e.direction,o="find"+r[0].toUpperCase()+r.slice(1,-1);t.prototype[o]=function(t,e,r){if("mixed"!==n&&"mixed"!==this.type&&n!==this.type)return!1;if(1===arguments.length)return ct(!0,this,n,r=t);if(2===arguments.length){t=""+t,r=e;var a=this._nodes.get(t);if(void 0===a)throw new W("Graph.".concat(o,': could not find the "').concat(t,'" node in the graph.'));return lt(!0,this.multi,"mixed"===n?this.type:n,i,a,r)}if(3===arguments.length){t=""+t,e=""+e;var u=this._nodes.get(t);if(!u)throw new W("Graph.".concat(o,': could not find the "').concat(t,'" source node in the graph.'));if(!this._nodes.has(e))throw new W("Graph.".concat(o,': could not find the "').concat(e,'" target node in the graph.'));return pt(!0,n,this.multi,i,u,e,r)}throw new B("Graph.".concat(o,": too many arguments (expecting 1, 2 or 3 and got ").concat(arguments.length,")."))};var a="some"+r[0].toUpperCase()+r.slice(1,-1);t.prototype[a]=function(){var t=Array.prototype.slice.call(arguments),e=t.pop();return t.push((function(t,r,n,i,o,a,u){return e(t,r,n,i,o,a,u)})),!!this[o].apply(this,t)};var u="every"+r[0].toUpperCase()+r.slice(1,-1);t.prototype[u]=function(){var t=Array.prototype.slice.call(arguments),e=t.pop();return t.push((function(t,r,n,i,o,a,u){return!e(t,r,n,i,o,a,u)})),!this[o].apply(this,t)}}(t,e),function(t,e){var r=e.name,n=e.type,i=e.direction,o=r.slice(0,-1)+"Entries";t.prototype[o]=function(t,e){if("mixed"!==n&&"mixed"!==this.type&&n!==this.type)return G.empty();if(!arguments.length)return ht(this,n);if(1===arguments.length){t=""+t;var r=this._nodes.get(t);if(!r)throw new W("Graph.".concat(o,': could not find the "').concat(t,'" node in the graph.'));return ft(n,i,r)}if(2===arguments.length){t=""+t,e=""+e;var a=this._nodes.get(t);if(!a)throw new W("Graph.".concat(o,': could not find the "').concat(t,'" source node in the graph.'));if(!this._nodes.has(e))throw new W("Graph.".concat(o,': could not find the "').concat(e,'" target node in the graph.'));return vt(n,i,a,e)}throw new B("Graph.".concat(o,": too many arguments (expecting 0, 1 or 2 and got ").concat(arguments.length,")."))}}(t,e)}))}(Rt),function(t){yt.forEach((function(e){(function(t,e){var r=e.name,n=e.type,i=e.direction;t.prototype[r]=function(t){if("mixed"!==n&&"mixed"!==this.type&&n!==this.type)return[];t=""+t;var e=this._nodes.get(t);if(void 0===e)throw new W("Graph.".concat(r,': could not find the "').concat(t,'" node in the graph.'));return function(t,e,r){if("mixed"!==t){if("undirected"===t)return Object.keys(r.undirected);if("string"==typeof e)return Object.keys(r[e])}var n=[];return wt(!1,t,e,r,(function(t){n.push(t)})),n}("mixed"===n?this.type:n,i,e)}})(t,e),function(t,e){var r=e.name,n=e.type,i=e.direction,o="forEach"+r[0].toUpperCase()+r.slice(1,-1);t.prototype[o]=function(t,e){if("mixed"===n||"mixed"===this.type||n===this.type){t=""+t;var r=this._nodes.get(t);if(void 0===r)throw new W("Graph.".concat(o,': could not find the "').concat(t,'" node in the graph.'));wt(!1,"mixed"===n?this.type:n,i,r,e)}};var a="map"+r[0].toUpperCase()+r.slice(1);t.prototype[a]=function(t,e){var r=[];return this[o](t,(function(t,n){r.push(e(t,n))})),r};var u="filter"+r[0].toUpperCase()+r.slice(1);t.prototype[u]=function(t,e){var r=[];return this[o](t,(function(t,n){e(t,n)&&r.push(t)})),r};var s="reduce"+r[0].toUpperCase()+r.slice(1);t.prototype[s]=function(t,e,r){if(arguments.length<3)throw new B("Graph.".concat(s,": 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."));var n=r;return this[o](t,(function(t,r){n=e(n,t,r)})),n}}(t,e),function(t,e){var r=e.name,n=e.type,i=e.direction,o=r[0].toUpperCase()+r.slice(1,-1),a="find"+o;t.prototype[a]=function(t,e){if("mixed"===n||"mixed"===this.type||n===this.type){t=""+t;var r=this._nodes.get(t);if(void 0===r)throw new W("Graph.".concat(a,': could not find the "').concat(t,'" node in the graph.'));return wt(!0,"mixed"===n?this.type:n,i,r,e)}};var u="some"+o;t.prototype[u]=function(t,e){return!!this[a](t,e)};var s="every"+o;t.prototype[s]=function(t,e){return!this[a](t,(function(t,r){return!e(t,r)}))}}(t,e),function(t,e){var r=e.name,n=e.type,i=e.direction,o=r.slice(0,-1)+"Entries";t.prototype[o]=function(t){if("mixed"!==n&&"mixed"!==this.type&&n!==this.type)return G.empty();t=""+t;var e=this._nodes.get(t);if(void 0===e)throw new W("Graph.".concat(o,': could not find the "').concat(t,'" node in the graph.'));return function(t,e,r){if("mixed"!==t){if("undirected"===t)return _t(null,r,r.undirected);if("string"==typeof e)return _t(null,r,r[e])}var n=G.empty(),i=new mt;return"undirected"!==t&&("out"!==e&&(n=tt(n,_t(i,r,r.in))),"in"!==e&&(n=tt(n,_t(i,r,r.out)))),"directed"!==t&&(n=tt(n,_t(i,r,r.undirected))),n}("mixed"===n?this.type:n,i,e)}}(t,e)}))}(Rt);var Tt=function(t){function r(e){var r=s({type:"directed"},e);if("multi"in r&&!1!==r.multi)throw new B("DirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if("directed"!==r.type)throw new B('DirectedGraph.from: inconsistent "'+r.type+'" type in given options!');return t.call(this,r)||this}return e(r,t),r}(Rt),Pt=function(t){function r(e){var r=s({type:"undirected"},e);if("multi"in r&&!1!==r.multi)throw new B("UndirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if("undirected"!==r.type)throw new B('UndirectedGraph.from: inconsistent "'+r.type+'" type in given options!');return t.call(this,r)||this}return e(r,t),r}(Rt),Nt=function(t){function r(e){var r=s({multi:!0},e);if("multi"in r&&!0!==r.multi)throw new B("MultiGraph.from: inconsistent indication that the graph should be simple in given options!");return t.call(this,r)||this}return e(r,t),r}(Rt),jt=function(t){function r(e){var r=s({type:"directed",multi:!0},e);if("multi"in r&&!0!==r.multi)throw new B("MultiDirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if("directed"!==r.type)throw new B('MultiDirectedGraph.from: inconsistent "'+r.type+'" type in given options!');return t.call(this,r)||this}return e(r,t),r}(Rt),zt=function(t){function r(e){var r=s({type:"undirected",multi:!0},e);if("multi"in r&&!0!==r.multi)throw new B("MultiUndirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if("undirected"!==r.type)throw new B('MultiUndirectedGraph.from: inconsistent "'+r.type+'" type in given options!');return t.call(this,r)||this}return e(r,t),r}(Rt);function Ut(t){t.from=function(e,r){var n=s({},e.options,r),i=new t(n);return i.import(e),i}}return Ut(Rt),Ut(Tt),Ut(Pt),Ut(Nt),Ut(jt),Ut(zt),Rt.Graph=Rt,Rt.DirectedGraph=Tt,Rt.UndirectedGraph=Pt,Rt.MultiGraph=Nt,Rt.MultiDirectedGraph=jt,Rt.MultiUndirectedGraph=zt,Rt.InvalidArgumentsGraphError=B,Rt.NotFoundGraphError=W,Rt.UsageGraphError=q,Rt}()},76635:function(t,e,r){var n;t=r.nmd(t),function(){var i,o="Expected a function",a="__lodash_hash_undefined__",u="__lodash_placeholder__",s=32,c=128,h=1/0,l=9007199254740991,d=NaN,f=4294967295,p=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",s],["partialRight",64],["rearg",256]],g="[object Arguments]",v="[object Array]",y="[object Boolean]",m="[object Date]",b="[object Error]",w="[object Function]",_="[object GeneratorFunction]",x="[object Map]",E="[object Number]",A="[object Object]",L="[object Promise]",k="[object RegExp]",C="[object Set]",S="[object String]",M="[object Symbol]",D="[object WeakMap]",O="[object ArrayBuffer]",G="[object DataView]",F="[object Float32Array]",R="[object Float64Array]",T="[object Int8Array]",P="[object Int16Array]",N="[object Int32Array]",j="[object Uint8Array]",z="[object Uint8ClampedArray]",U="[object Uint16Array]",I="[object Uint32Array]",B=/\b__p \+= '';/g,W=/\b(__p \+=) '' \+/g,q=/(__e\(.*?\)|\b__t\)) \+\n'';/g,H=/&(?:amp|lt|gt|quot|#39);/g,V=/[&<>"']/g,Z=RegExp(H.source),Y=RegExp(V.source),K=/<%-([\s\S]+?)%>/g,$=/<%([\s\S]+?)%>/g,Q=/<%=([\s\S]+?)%>/g,X=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,J=/^\w*$/,tt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,et=/[\\^$.*+?()[\]{}|]/g,rt=RegExp(et.source),nt=/^\s+|\s+$/g,it=/^\s+/,ot=/\s+$/,at=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ut=/\{\n\/\* \[wrapped with (.+)\] \*/,st=/,? & /,ct=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ht=/\\(\\)?/g,lt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,dt=/\w*$/,ft=/^[-+]0x[0-9a-f]+$/i,pt=/^0b[01]+$/i,gt=/^\[object .+?Constructor\]$/,vt=/^0o[0-7]+$/i,yt=/^(?:0|[1-9]\d*)$/,mt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,bt=/($^)/,wt=/['\n\r\u2028\u2029\\]/g,_t="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",xt="a-z\\xdf-\\xf6\\xf8-\\xff",Et="A-Z\\xc0-\\xd6\\xd8-\\xde",At="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\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",Lt="["+At+"]",kt="["+_t+"]",Ct="\\d+",St="["+xt+"]",Mt="[^\\ud800-\\udfff"+At+Ct+"\\u2700-\\u27bf"+xt+Et+"]",Dt="\\ud83c[\\udffb-\\udfff]",Ot="[^\\ud800-\\udfff]",Gt="(?:\\ud83c[\\udde6-\\uddff]){2}",Ft="[\\ud800-\\udbff][\\udc00-\\udfff]",Rt="["+Et+"]",Tt="(?:"+St+"|"+Mt+")",Pt="(?:"+Rt+"|"+Mt+")",Nt="(?:['’](?:d|ll|m|re|s|t|ve))?",jt="(?:['’](?:D|LL|M|RE|S|T|VE))?",zt="(?:"+kt+"|"+Dt+")?",Ut="[\\ufe0e\\ufe0f]?",It=Ut+zt+"(?:\\u200d(?:"+[Ot,Gt,Ft].join("|")+")"+Ut+zt+")*",Bt="(?:"+["[\\u2700-\\u27bf]",Gt,Ft].join("|")+")"+It,Wt="(?:"+[Ot+kt+"?",kt,Gt,Ft,"[\\ud800-\\udfff]"].join("|")+")",qt=RegExp("['’]","g"),Ht=RegExp(kt,"g"),Vt=RegExp(Dt+"(?="+Dt+")|"+Wt+It,"g"),Zt=RegExp([Rt+"?"+St+"+"+Nt+"(?="+[Lt,Rt,"$"].join("|")+")",Pt+"+"+jt+"(?="+[Lt,Rt+Tt,"$"].join("|")+")",Rt+"?"+Tt+"+"+Nt,Rt+"+"+jt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ct,Bt].join("|"),"g"),Yt=RegExp("[\\u200d\\ud800-\\udfff"+_t+"\\ufe0e\\ufe0f]"),Kt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,$t=["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"],Qt=-1,Xt={};Xt[F]=Xt[R]=Xt[T]=Xt[P]=Xt[N]=Xt[j]=Xt[z]=Xt[U]=Xt[I]=!0,Xt[g]=Xt[v]=Xt[O]=Xt[y]=Xt[G]=Xt[m]=Xt[b]=Xt[w]=Xt[x]=Xt[E]=Xt[A]=Xt[k]=Xt[C]=Xt[S]=Xt[D]=!1;var Jt={};Jt[g]=Jt[v]=Jt[O]=Jt[G]=Jt[y]=Jt[m]=Jt[F]=Jt[R]=Jt[T]=Jt[P]=Jt[N]=Jt[x]=Jt[E]=Jt[A]=Jt[k]=Jt[C]=Jt[S]=Jt[M]=Jt[j]=Jt[z]=Jt[U]=Jt[I]=!0,Jt[b]=Jt[w]=Jt[D]=!1;var te={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ee=parseFloat,re=parseInt,ne="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,ie="object"==typeof self&&self&&self.Object===Object&&self,oe=ne||ie||Function("return this")(),ae=e&&!e.nodeType&&e,ue=ae&&t&&!t.nodeType&&t,se=ue&&ue.exports===ae,ce=se&&ne.process,he=function(){try{return ue&&ue.require&&ue.require("util").types||ce&&ce.binding&&ce.binding("util")}catch(t){}}(),le=he&&he.isArrayBuffer,de=he&&he.isDate,fe=he&&he.isMap,pe=he&&he.isRegExp,ge=he&&he.isSet,ve=he&&he.isTypedArray;function ye(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function me(t,e,r,n){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(n,a,r(a),t)}return n}function be(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t}function we(t,e){for(var r=null==t?0:t.length;r--&&!1!==e(t[r],r,t););return t}function _e(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(!e(t[r],r,t))return!1;return!0}function xe(t,e){for(var r=-1,n=null==t?0:t.length,i=0,o=[];++r<n;){var a=t[r];e(a,r,t)&&(o[i++]=a)}return o}function Ee(t,e){return!(null==t||!t.length)&&Fe(t,e,0)>-1}function Ae(t,e,r){for(var n=-1,i=null==t?0:t.length;++n<i;)if(r(e,t[n]))return!0;return!1}function Le(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}function ke(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}function Ce(t,e,r,n){var i=-1,o=null==t?0:t.length;for(n&&o&&(r=t[++i]);++i<o;)r=e(r,t[i],i,t);return r}function Se(t,e,r,n){var i=null==t?0:t.length;for(n&&i&&(r=t[--i]);i--;)r=e(r,t[i],i,t);return r}function Me(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}var De=Ne("length");function Oe(t,e,r){var n;return r(t,(function(t,r,i){if(e(t,r,i))return n=r,!1})),n}function Ge(t,e,r,n){for(var i=t.length,o=r+(n?1:-1);n?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function Fe(t,e,r){return e==e?function(t,e,r){for(var n=r-1,i=t.length;++n<i;)if(t[n]===e)return n;return-1}(t,e,r):Ge(t,Te,r)}function Re(t,e,r,n){for(var i=r-1,o=t.length;++i<o;)if(n(t[i],e))return i;return-1}function Te(t){return t!=t}function Pe(t,e){var r=null==t?0:t.length;return r?Ue(t,e)/r:d}function Ne(t){return function(e){return null==e?i:e[t]}}function je(t){return function(e){return null==t?i:t[e]}}function ze(t,e,r,n,i){return i(t,(function(t,i,o){r=n?(n=!1,t):e(r,t,i,o)})),r}function Ue(t,e){for(var r,n=-1,o=t.length;++n<o;){var a=e(t[n]);a!==i&&(r=r===i?a:r+a)}return r}function Ie(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}function Be(t){return function(e){return t(e)}}function We(t,e){return Le(e,(function(e){return t[e]}))}function qe(t,e){return t.has(e)}function He(t,e){for(var r=-1,n=t.length;++r<n&&Fe(e,t[r],0)>-1;);return r}function Ve(t,e){for(var r=t.length;r--&&Fe(e,t[r],0)>-1;);return r}function Ze(t,e){for(var r=t.length,n=0;r--;)t[r]===e&&++n;return n}var Ye=je({À:"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"}),Ke=je({"&":"&","<":"<",">":">",'"':""","'":"'"});function $e(t){return"\\"+te[t]}function Qe(t){return Yt.test(t)}function Xe(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r}function Je(t,e){return function(r){return t(e(r))}}function tr(t,e){for(var r=-1,n=t.length,i=0,o=[];++r<n;){var a=t[r];a!==e&&a!==u||(t[r]=u,o[i++]=r)}return o}function er(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}function rr(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=[t,t]})),r}function nr(t){return Qe(t)?function(t){for(var e=Vt.lastIndex=0;Vt.test(t);)++e;return e}(t):De(t)}function ir(t){return Qe(t)?function(t){return t.match(Vt)||[]}(t):function(t){return t.split("")}(t)}var or=je({"&":"&","<":"<",">":">",""":'"',"'":"'"}),ar=function t(e){var r,n=(e=null==e?oe:ar.defaults(oe.Object(),e,ar.pick(oe,$t))).Array,_t=e.Date,xt=e.Error,Et=e.Function,At=e.Math,Lt=e.Object,kt=e.RegExp,Ct=e.String,St=e.TypeError,Mt=n.prototype,Dt=Et.prototype,Ot=Lt.prototype,Gt=e["__core-js_shared__"],Ft=Dt.toString,Rt=Ot.hasOwnProperty,Tt=0,Pt=(r=/[^.]+$/.exec(Gt&&Gt.keys&&Gt.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",Nt=Ot.toString,jt=Ft.call(Lt),zt=oe._,Ut=kt("^"+Ft.call(Rt).replace(et,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),It=se?e.Buffer:i,Bt=e.Symbol,Wt=e.Uint8Array,Vt=It?It.allocUnsafe:i,Yt=Je(Lt.getPrototypeOf,Lt),te=Lt.create,ne=Ot.propertyIsEnumerable,ie=Mt.splice,ae=Bt?Bt.isConcatSpreadable:i,ue=Bt?Bt.iterator:i,ce=Bt?Bt.toStringTag:i,he=function(){try{var t=so(Lt,"defineProperty");return t({},"",{}),t}catch(t){}}(),De=e.clearTimeout!==oe.clearTimeout&&e.clearTimeout,je=_t&&_t.now!==oe.Date.now&&_t.now,ur=e.setTimeout!==oe.setTimeout&&e.setTimeout,sr=At.ceil,cr=At.floor,hr=Lt.getOwnPropertySymbols,lr=It?It.isBuffer:i,dr=e.isFinite,fr=Mt.join,pr=Je(Lt.keys,Lt),gr=At.max,vr=At.min,yr=_t.now,mr=e.parseInt,br=At.random,wr=Mt.reverse,_r=so(e,"DataView"),xr=so(e,"Map"),Er=so(e,"Promise"),Ar=so(e,"Set"),Lr=so(e,"WeakMap"),kr=so(Lt,"create"),Cr=Lr&&new Lr,Sr={},Mr=jo(_r),Dr=jo(xr),Or=jo(Er),Gr=jo(Ar),Fr=jo(Lr),Rr=Bt?Bt.prototype:i,Tr=Rr?Rr.valueOf:i,Pr=Rr?Rr.toString:i;function Nr(t){if(eu(t)&&!qa(t)&&!(t instanceof Ir)){if(t instanceof Ur)return t;if(Rt.call(t,"__wrapped__"))return zo(t)}return new Ur(t)}var jr=function(){function t(){}return function(e){if(!tu(e))return{};if(te)return te(e);t.prototype=e;var r=new t;return t.prototype=i,r}}();function zr(){}function Ur(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=i}function Ir(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=f,this.__views__=[]}function Br(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Wr(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function qr(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Hr(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new qr;++e<r;)this.add(t[e])}function Vr(t){var e=this.__data__=new Wr(t);this.size=e.size}function Zr(t,e){var r=qa(t),n=!r&&Wa(t),i=!r&&!n&&Ya(t),o=!r&&!n&&!i&&cu(t),a=r||n||i||o,u=a?Ie(t.length,Ct):[],s=u.length;for(var c in t)!e&&!Rt.call(t,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||vo(c,s))||u.push(c);return u}function Yr(t){var e=t.length;return e?t[Hn(0,e-1)]:i}function Kr(t,e){return Fo(ki(t),on(e,0,t.length))}function $r(t){return Fo(ki(t))}function Qr(t,e,r){(r!==i&&!Ua(t[e],r)||r===i&&!(e in t))&&rn(t,e,r)}function Xr(t,e,r){var n=t[e];Rt.call(t,e)&&Ua(n,r)&&(r!==i||e in t)||rn(t,e,r)}function Jr(t,e){for(var r=t.length;r--;)if(Ua(t[r][0],e))return r;return-1}function tn(t,e,r,n){return hn(t,(function(t,i,o){e(n,t,r(t),o)})),n}function en(t,e){return t&&Ci(e,Ou(e),t)}function rn(t,e,r){"__proto__"==e&&he?he(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function nn(t,e){for(var r=-1,o=e.length,a=n(o),u=null==t;++r<o;)a[r]=u?i:ku(t,e[r]);return a}function on(t,e,r){return t==t&&(r!==i&&(t=t<=r?t:r),e!==i&&(t=t>=e?t:e)),t}function an(t,e,r,n,o,a){var u,s=1&e,c=2&e,h=4&e;if(r&&(u=o?r(t,n,o,a):r(t)),u!==i)return u;if(!tu(t))return t;var l=qa(t);if(l){if(u=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&Rt.call(t,"index")&&(r.index=t.index,r.input=t.input),r}(t),!s)return ki(t,u)}else{var d=lo(t),f=d==w||d==_;if(Ya(t))return wi(t,s);if(d==A||d==g||f&&!o){if(u=c||f?{}:po(t),!s)return c?function(t,e){return Ci(t,ho(t),e)}(t,function(t,e){return t&&Ci(e,Gu(e),t)}(u,t)):function(t,e){return Ci(t,co(t),e)}(t,en(u,t))}else{if(!Jt[d])return o?t:{};u=function(t,e,r){var n,i=t.constructor;switch(e){case O:return _i(t);case y:case m:return new i(+t);case G:return function(t,e){var r=e?_i(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}(t,r);case F:case R:case T:case P:case N:case j:case z:case U:case I:return xi(t,r);case x:return new i;case E:case S:return new i(t);case k:return function(t){var e=new t.constructor(t.source,dt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case C:return new i;case M:return n=t,Tr?Lt(Tr.call(n)):{}}}(t,d,s)}}a||(a=new Vr);var p=a.get(t);if(p)return p;a.set(t,u),au(t)?t.forEach((function(n){u.add(an(n,e,r,n,t,a))})):ru(t)&&t.forEach((function(n,i){u.set(i,an(n,e,r,i,t,a))}));var v=l?i:(h?c?eo:to:c?Gu:Ou)(t);return be(v||t,(function(n,i){v&&(n=t[i=n]),Xr(u,i,an(n,e,r,i,t,a))})),u}function un(t,e,r){var n=r.length;if(null==t)return!n;for(t=Lt(t);n--;){var o=r[n],a=e[o],u=t[o];if(u===i&&!(o in t)||!a(u))return!1}return!0}function sn(t,e,r){if("function"!=typeof t)throw new St(o);return Mo((function(){t.apply(i,r)}),e)}function cn(t,e,r,n){var i=-1,o=Ee,a=!0,u=t.length,s=[],c=e.length;if(!u)return s;r&&(e=Le(e,Be(r))),n?(o=Ae,a=!1):e.length>=200&&(o=qe,a=!1,e=new Hr(e));t:for(;++i<u;){var h=t[i],l=null==r?h:r(h);if(h=n||0!==h?h:0,a&&l==l){for(var d=c;d--;)if(e[d]===l)continue t;s.push(h)}else o(e,l,n)||s.push(h)}return s}Nr.templateSettings={escape:K,evaluate:$,interpolate:Q,variable:"",imports:{_:Nr}},Nr.prototype=zr.prototype,Nr.prototype.constructor=Nr,Ur.prototype=jr(zr.prototype),Ur.prototype.constructor=Ur,Ir.prototype=jr(zr.prototype),Ir.prototype.constructor=Ir,Br.prototype.clear=function(){this.__data__=kr?kr(null):{},this.size=0},Br.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Br.prototype.get=function(t){var e=this.__data__;if(kr){var r=e[t];return r===a?i:r}return Rt.call(e,t)?e[t]:i},Br.prototype.has=function(t){var e=this.__data__;return kr?e[t]!==i:Rt.call(e,t)},Br.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=kr&&e===i?a:e,this},Wr.prototype.clear=function(){this.__data__=[],this.size=0},Wr.prototype.delete=function(t){var e=this.__data__,r=Jr(e,t);return!(r<0||(r==e.length-1?e.pop():ie.call(e,r,1),--this.size,0))},Wr.prototype.get=function(t){var e=this.__data__,r=Jr(e,t);return r<0?i:e[r][1]},Wr.prototype.has=function(t){return Jr(this.__data__,t)>-1},Wr.prototype.set=function(t,e){var r=this.__data__,n=Jr(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this},qr.prototype.clear=function(){this.size=0,this.__data__={hash:new Br,map:new(xr||Wr),string:new Br}},qr.prototype.delete=function(t){var e=ao(this,t).delete(t);return this.size-=e?1:0,e},qr.prototype.get=function(t){return ao(this,t).get(t)},qr.prototype.has=function(t){return ao(this,t).has(t)},qr.prototype.set=function(t,e){var r=ao(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this},Hr.prototype.add=Hr.prototype.push=function(t){return this.__data__.set(t,a),this},Hr.prototype.has=function(t){return this.__data__.has(t)},Vr.prototype.clear=function(){this.__data__=new Wr,this.size=0},Vr.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},Vr.prototype.get=function(t){return this.__data__.get(t)},Vr.prototype.has=function(t){return this.__data__.has(t)},Vr.prototype.set=function(t,e){var r=this.__data__;if(r instanceof Wr){var n=r.__data__;if(!xr||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new qr(n)}return r.set(t,e),this.size=r.size,this};var hn=Di(mn),ln=Di(bn,!0);function dn(t,e){var r=!0;return hn(t,(function(t,n,i){return r=!!e(t,n,i)})),r}function fn(t,e,r){for(var n=-1,o=t.length;++n<o;){var a=t[n],u=e(a);if(null!=u&&(s===i?u==u&&!su(u):r(u,s)))var s=u,c=a}return c}function pn(t,e){var r=[];return hn(t,(function(t,n,i){e(t,n,i)&&r.push(t)})),r}function gn(t,e,r,n,i){var o=-1,a=t.length;for(r||(r=go),i||(i=[]);++o<a;){var u=t[o];e>0&&r(u)?e>1?gn(u,e-1,r,n,i):ke(i,u):n||(i[i.length]=u)}return i}var vn=Oi(),yn=Oi(!0);function mn(t,e){return t&&vn(t,e,Ou)}function bn(t,e){return t&&yn(t,e,Ou)}function wn(t,e){return xe(e,(function(e){return Qa(t[e])}))}function _n(t,e){for(var r=0,n=(e=vi(e,t)).length;null!=t&&r<n;)t=t[No(e[r++])];return r&&r==n?t:i}function xn(t,e,r){var n=e(t);return qa(t)?n:ke(n,r(t))}function En(t){return null==t?t===i?"[object Undefined]":"[object Null]":ce&&ce in Lt(t)?function(t){var e=Rt.call(t,ce),r=t[ce];try{t[ce]=i;var n=!0}catch(t){}var o=Nt.call(t);return n&&(e?t[ce]=r:delete t[ce]),o}(t):function(t){return Nt.call(t)}(t)}function An(t,e){return t>e}function Ln(t,e){return null!=t&&Rt.call(t,e)}function kn(t,e){return null!=t&&e in Lt(t)}function Cn(t,e,r){for(var o=r?Ae:Ee,a=t[0].length,u=t.length,s=u,c=n(u),h=1/0,l=[];s--;){var d=t[s];s&&e&&(d=Le(d,Be(e))),h=vr(d.length,h),c[s]=!r&&(e||a>=120&&d.length>=120)?new Hr(s&&d):i}d=t[0];var f=-1,p=c[0];t:for(;++f<a&&l.length<h;){var g=d[f],v=e?e(g):g;if(g=r||0!==g?g:0,!(p?qe(p,v):o(l,v,r))){for(s=u;--s;){var y=c[s];if(!(y?qe(y,v):o(t[s],v,r)))continue t}p&&p.push(v),l.push(g)}}return l}function Sn(t,e,r){var n=null==(t=Lo(t,e=vi(e,t)))?t:t[No($o(e))];return null==n?i:ye(n,t,r)}function Mn(t){return eu(t)&&En(t)==g}function Dn(t,e,r,n,o){return t===e||(null==t||null==e||!eu(t)&&!eu(e)?t!=t&&e!=e:function(t,e,r,n,o,a){var u=qa(t),s=qa(e),c=u?v:lo(t),h=s?v:lo(e),l=(c=c==g?A:c)==A,d=(h=h==g?A:h)==A,f=c==h;if(f&&Ya(t)){if(!Ya(e))return!1;u=!0,l=!1}if(f&&!l)return a||(a=new Vr),u||cu(t)?Xi(t,e,r,n,o,a):function(t,e,r,n,i,o,a){switch(r){case G:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case O:return!(t.byteLength!=e.byteLength||!o(new Wt(t),new Wt(e)));case y:case m:case E:return Ua(+t,+e);case b:return t.name==e.name&&t.message==e.message;case k:case S:return t==e+"";case x:var u=Xe;case C:var s=1&n;if(u||(u=er),t.size!=e.size&&!s)return!1;var c=a.get(t);if(c)return c==e;n|=2,a.set(t,e);var h=Xi(u(t),u(e),n,i,o,a);return a.delete(t),h;case M:if(Tr)return Tr.call(t)==Tr.call(e)}return!1}(t,e,c,r,n,o,a);if(!(1&r)){var p=l&&Rt.call(t,"__wrapped__"),w=d&&Rt.call(e,"__wrapped__");if(p||w){var _=p?t.value():t,L=w?e.value():e;return a||(a=new Vr),o(_,L,r,n,a)}}return!!f&&(a||(a=new Vr),function(t,e,r,n,o,a){var u=1&r,s=to(t),c=s.length;if(c!=to(e).length&&!u)return!1;for(var h=c;h--;){var l=s[h];if(!(u?l in e:Rt.call(e,l)))return!1}var d=a.get(t);if(d&&a.get(e))return d==e;var f=!0;a.set(t,e),a.set(e,t);for(var p=u;++h<c;){var g=t[l=s[h]],v=e[l];if(n)var y=u?n(v,g,l,e,t,a):n(g,v,l,t,e,a);if(!(y===i?g===v||o(g,v,r,n,a):y)){f=!1;break}p||(p="constructor"==l)}if(f&&!p){var m=t.constructor,b=e.constructor;m==b||!("constructor"in t)||!("constructor"in e)||"function"==typeof m&&m instanceof m&&"function"==typeof b&&b instanceof b||(f=!1)}return a.delete(t),a.delete(e),f}(t,e,r,n,o,a))}(t,e,r,n,Dn,o))}function On(t,e,r,n){var o=r.length,a=o,u=!n;if(null==t)return!a;for(t=Lt(t);o--;){var s=r[o];if(u&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++o<a;){var c=(s=r[o])[0],h=t[c],l=s[1];if(u&&s[2]){if(h===i&&!(c in t))return!1}else{var d=new Vr;if(n)var f=n(h,l,c,t,e,d);if(!(f===i?Dn(l,h,3,n,d):f))return!1}}return!0}function Gn(t){return!(!tu(t)||(e=t,Pt&&Pt in e))&&(Qa(t)?Ut:gt).test(jo(t));var e}function Fn(t){return"function"==typeof t?t:null==t?ns:"object"==typeof t?qa(t)?jn(t[0],t[1]):Nn(t):ds(t)}function Rn(t){if(!_o(t))return pr(t);var e=[];for(var r in Lt(t))Rt.call(t,r)&&"constructor"!=r&&e.push(r);return e}function Tn(t,e){return t<e}function Pn(t,e){var r=-1,i=Va(t)?n(t.length):[];return hn(t,(function(t,n,o){i[++r]=e(t,n,o)})),i}function Nn(t){var e=uo(t);return 1==e.length&&e[0][2]?Eo(e[0][0],e[0][1]):function(r){return r===t||On(r,t,e)}}function jn(t,e){return mo(t)&&xo(e)?Eo(No(t),e):function(r){var n=ku(r,t);return n===i&&n===e?Cu(r,t):Dn(e,n,3)}}function zn(t,e,r,n,o){t!==e&&vn(e,(function(a,u){if(o||(o=new Vr),tu(a))!function(t,e,r,n,o,a,u){var s=Co(t,r),c=Co(e,r),h=u.get(c);if(h)Qr(t,r,h);else{var l=a?a(s,c,r+"",t,e,u):i,d=l===i;if(d){var f=qa(c),p=!f&&Ya(c),g=!f&&!p&&cu(c);l=c,f||p||g?qa(s)?l=s:Za(s)?l=ki(s):p?(d=!1,l=wi(c,!0)):g?(d=!1,l=xi(c,!0)):l=[]:iu(c)||Wa(c)?(l=s,Wa(s)?l=yu(s):tu(s)&&!Qa(s)||(l=po(c))):d=!1}d&&(u.set(c,l),o(l,c,n,a,u),u.delete(c)),Qr(t,r,l)}}(t,e,u,r,zn,n,o);else{var s=n?n(Co(t,u),a,u+"",t,e,o):i;s===i&&(s=a),Qr(t,u,s)}}),Gu)}function Un(t,e){var r=t.length;if(r)return vo(e+=e<0?r:0,r)?t[e]:i}function In(t,e,r){var n=-1;e=Le(e.length?e:[ns],Be(oo()));var i=Pn(t,(function(t,r,i){var o=Le(e,(function(e){return e(t)}));return{criteria:o,index:++n,value:t}}));return function(t,e){var n=t.length;for(t.sort((function(t,e){return function(t,e,r){for(var n=-1,i=t.criteria,o=e.criteria,a=i.length,u=r.length;++n<a;){var s=Ei(i[n],o[n]);if(s)return n>=u?s:s*("desc"==r[n]?-1:1)}return t.index-e.index}(t,e,r)}));n--;)t[n]=t[n].value;return t}(i)}function Bn(t,e,r){for(var n=-1,i=e.length,o={};++n<i;){var a=e[n],u=_n(t,a);r(u,a)&&$n(o,vi(a,t),u)}return o}function Wn(t,e,r,n){var i=n?Re:Fe,o=-1,a=e.length,u=t;for(t===e&&(e=ki(e)),r&&(u=Le(t,Be(r)));++o<a;)for(var s=0,c=e[o],h=r?r(c):c;(s=i(u,h,s,n))>-1;)u!==t&&ie.call(u,s,1),ie.call(t,s,1);return t}function qn(t,e){for(var r=t?e.length:0,n=r-1;r--;){var i=e[r];if(r==n||i!==o){var o=i;vo(i)?ie.call(t,i,1):si(t,i)}}return t}function Hn(t,e){return t+cr(br()*(e-t+1))}function Vn(t,e){var r="";if(!t||e<1||e>l)return r;do{e%2&&(r+=t),(e=cr(e/2))&&(t+=t)}while(e);return r}function Zn(t,e){return Do(Ao(t,e,ns),t+"")}function Yn(t){return Yr(Uu(t))}function Kn(t,e){var r=Uu(t);return Fo(r,on(e,0,r.length))}function $n(t,e,r,n){if(!tu(t))return t;for(var o=-1,a=(e=vi(e,t)).length,u=a-1,s=t;null!=s&&++o<a;){var c=No(e[o]),h=r;if(o!=u){var l=s[c];(h=n?n(l,c,s):i)===i&&(h=tu(l)?l:vo(e[o+1])?[]:{})}Xr(s,c,h),s=s[c]}return t}var Qn=Cr?function(t,e){return Cr.set(t,e),t}:ns,Xn=he?function(t,e){return he(t,"toString",{configurable:!0,enumerable:!1,value:ts(e),writable:!0})}:ns;function Jn(t){return Fo(Uu(t))}function ti(t,e,r){var i=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(r=r>o?o:r)<0&&(r+=o),o=e>r?0:r-e>>>0,e>>>=0;for(var a=n(o);++i<o;)a[i]=t[i+e];return a}function ei(t,e){var r;return hn(t,(function(t,n,i){return!(r=e(t,n,i))})),!!r}function ri(t,e,r){var n=0,i=null==t?n:t.length;if("number"==typeof e&&e==e&&i<=2147483647){for(;n<i;){var o=n+i>>>1,a=t[o];null!==a&&!su(a)&&(r?a<=e:a<e)?n=o+1:i=o}return i}return ni(t,e,ns,r)}function ni(t,e,r,n){e=r(e);for(var o=0,a=null==t?0:t.length,u=e!=e,s=null===e,c=su(e),h=e===i;o<a;){var l=cr((o+a)/2),d=r(t[l]),f=d!==i,p=null===d,g=d==d,v=su(d);if(u)var y=n||g;else y=h?g&&(n||f):s?g&&f&&(n||!p):c?g&&f&&!p&&(n||!v):!p&&!v&&(n?d<=e:d<e);y?o=l+1:a=l}return vr(a,4294967294)}function ii(t,e){for(var r=-1,n=t.length,i=0,o=[];++r<n;){var a=t[r],u=e?e(a):a;if(!r||!Ua(u,s)){var s=u;o[i++]=0===a?0:a}}return o}function oi(t){return"number"==typeof t?t:su(t)?d:+t}function ai(t){if("string"==typeof t)return t;if(qa(t))return Le(t,ai)+"";if(su(t))return Pr?Pr.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function ui(t,e,r){var n=-1,i=Ee,o=t.length,a=!0,u=[],s=u;if(r)a=!1,i=Ae;else if(o>=200){var c=e?null:Vi(t);if(c)return er(c);a=!1,i=qe,s=new Hr}else s=e?[]:u;t:for(;++n<o;){var h=t[n],l=e?e(h):h;if(h=r||0!==h?h:0,a&&l==l){for(var d=s.length;d--;)if(s[d]===l)continue t;e&&s.push(l),u.push(h)}else i(s,l,r)||(s!==u&&s.push(l),u.push(h))}return u}function si(t,e){return null==(t=Lo(t,e=vi(e,t)))||delete t[No($o(e))]}function ci(t,e,r,n){return $n(t,e,r(_n(t,e)),n)}function hi(t,e,r,n){for(var i=t.length,o=n?i:-1;(n?o--:++o<i)&&e(t[o],o,t););return r?ti(t,n?0:o,n?o+1:i):ti(t,n?o+1:0,n?i:o)}function li(t,e){var r=t;return r instanceof Ir&&(r=r.value()),Ce(e,(function(t,e){return e.func.apply(e.thisArg,ke([t],e.args))}),r)}function di(t,e,r){var i=t.length;if(i<2)return i?ui(t[0]):[];for(var o=-1,a=n(i);++o<i;)for(var u=t[o],s=-1;++s<i;)s!=o&&(a[o]=cn(a[o]||u,t[s],e,r));return ui(gn(a,1),e,r)}function fi(t,e,r){for(var n=-1,o=t.length,a=e.length,u={};++n<o;){var s=n<a?e[n]:i;r(u,t[n],s)}return u}function pi(t){return Za(t)?t:[]}function gi(t){return"function"==typeof t?t:ns}function vi(t,e){return qa(t)?t:mo(t,e)?[t]:Po(mu(t))}var yi=Zn;function mi(t,e,r){var n=t.length;return r=r===i?n:r,!e&&r>=n?t:ti(t,e,r)}var bi=De||function(t){return oe.clearTimeout(t)};function wi(t,e){if(e)return t.slice();var r=t.length,n=Vt?Vt(r):new t.constructor(r);return t.copy(n),n}function _i(t){var e=new t.constructor(t.byteLength);return new Wt(e).set(new Wt(t)),e}function xi(t,e){var r=e?_i(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function Ei(t,e){if(t!==e){var r=t!==i,n=null===t,o=t==t,a=su(t),u=e!==i,s=null===e,c=e==e,h=su(e);if(!s&&!h&&!a&&t>e||a&&u&&c&&!s&&!h||n&&u&&c||!r&&c||!o)return 1;if(!n&&!a&&!h&&t<e||h&&r&&o&&!n&&!a||s&&r&&o||!u&&o||!c)return-1}return 0}function Ai(t,e,r,i){for(var o=-1,a=t.length,u=r.length,s=-1,c=e.length,h=gr(a-u,0),l=n(c+h),d=!i;++s<c;)l[s]=e[s];for(;++o<u;)(d||o<a)&&(l[r[o]]=t[o]);for(;h--;)l[s++]=t[o++];return l}function Li(t,e,r,i){for(var o=-1,a=t.length,u=-1,s=r.length,c=-1,h=e.length,l=gr(a-s,0),d=n(l+h),f=!i;++o<l;)d[o]=t[o];for(var p=o;++c<h;)d[p+c]=e[c];for(;++u<s;)(f||o<a)&&(d[p+r[u]]=t[o++]);return d}function ki(t,e){var r=-1,i=t.length;for(e||(e=n(i));++r<i;)e[r]=t[r];return e}function Ci(t,e,r,n){var o=!r;r||(r={});for(var a=-1,u=e.length;++a<u;){var s=e[a],c=n?n(r[s],t[s],s,r,t):i;c===i&&(c=t[s]),o?rn(r,s,c):Xr(r,s,c)}return r}function Si(t,e){return function(r,n){var i=qa(r)?me:tn,o=e?e():{};return i(r,t,oo(n,2),o)}}function Mi(t){return Zn((function(e,r){var n=-1,o=r.length,a=o>1?r[o-1]:i,u=o>2?r[2]:i;for(a=t.length>3&&"function"==typeof a?(o--,a):i,u&&yo(r[0],r[1],u)&&(a=o<3?i:a,o=1),e=Lt(e);++n<o;){var s=r[n];s&&t(e,s,n,a)}return e}))}function Di(t,e){return function(r,n){if(null==r)return r;if(!Va(r))return t(r,n);for(var i=r.length,o=e?i:-1,a=Lt(r);(e?o--:++o<i)&&!1!==n(a[o],o,a););return r}}function Oi(t){return function(e,r,n){for(var i=-1,o=Lt(e),a=n(e),u=a.length;u--;){var s=a[t?u:++i];if(!1===r(o[s],s,o))break}return e}}function Gi(t){return function(e){var r=Qe(e=mu(e))?ir(e):i,n=r?r[0]:e.charAt(0),o=r?mi(r,1).join(""):e.slice(1);return n[t]()+o}}function Fi(t){return function(e){return Ce(Qu(Wu(e).replace(qt,"")),t,"")}}function Ri(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var r=jr(t.prototype),n=t.apply(r,e);return tu(n)?n:r}}function Ti(t){return function(e,r,n){var o=Lt(e);if(!Va(e)){var a=oo(r,3);e=Ou(e),r=function(t){return a(o[t],t,o)}}var u=t(e,r,n);return u>-1?o[a?e[u]:u]:i}}function Pi(t){return Ji((function(e){var r=e.length,n=r,a=Ur.prototype.thru;for(t&&e.reverse();n--;){var u=e[n];if("function"!=typeof u)throw new St(o);if(a&&!s&&"wrapper"==no(u))var s=new Ur([],!0)}for(n=s?n:r;++n<r;){var c=no(u=e[n]),h="wrapper"==c?ro(u):i;s=h&&bo(h[0])&&424==h[1]&&!h[4].length&&1==h[9]?s[no(h[0])].apply(s,h[3]):1==u.length&&bo(u)?s[c]():s.thru(u)}return function(){var t=arguments,n=t[0];if(s&&1==t.length&&qa(n))return s.plant(n).value();for(var i=0,o=r?e[i].apply(this,t):n;++i<r;)o=e[i].call(this,o);return o}}))}function Ni(t,e,r,o,a,u,s,h,l,d){var f=e&c,p=1&e,g=2&e,v=24&e,y=512&e,m=g?i:Ri(t);return function i(){for(var c=arguments.length,b=n(c),w=c;w--;)b[w]=arguments[w];if(v)var _=io(i),x=Ze(b,_);if(o&&(b=Ai(b,o,a,v)),u&&(b=Li(b,u,s,v)),c-=x,v&&c<d){var E=tr(b,_);return qi(t,e,Ni,i.placeholder,r,b,E,h,l,d-c)}var A=p?r:this,L=g?A[t]:t;return c=b.length,h?b=ko(b,h):y&&c>1&&b.reverse(),f&&l<c&&(b.length=l),this&&this!==oe&&this instanceof i&&(L=m||Ri(L)),L.apply(A,b)}}function ji(t,e){return function(r,n){return function(t,e,r,n){return mn(t,(function(t,i,o){e(n,r(t),i,o)})),n}(r,t,e(n),{})}}function zi(t,e){return function(r,n){var o;if(r===i&&n===i)return e;if(r!==i&&(o=r),n!==i){if(o===i)return n;"string"==typeof r||"string"==typeof n?(r=ai(r),n=ai(n)):(r=oi(r),n=oi(n)),o=t(r,n)}return o}}function Ui(t){return Ji((function(e){return e=Le(e,Be(oo())),Zn((function(r){var n=this;return t(e,(function(t){return ye(t,n,r)}))}))}))}function Ii(t,e){var r=(e=e===i?" ":ai(e)).length;if(r<2)return r?Vn(e,t):e;var n=Vn(e,sr(t/nr(e)));return Qe(e)?mi(ir(n),0,t).join(""):n.slice(0,t)}function Bi(t){return function(e,r,o){return o&&"number"!=typeof o&&yo(e,r,o)&&(r=o=i),e=fu(e),r===i?(r=e,e=0):r=fu(r),function(t,e,r,i){for(var o=-1,a=gr(sr((e-t)/(r||1)),0),u=n(a);a--;)u[i?a:++o]=t,t+=r;return u}(e,r,o=o===i?e<r?1:-1:fu(o),t)}}function Wi(t){return function(e,r){return"string"==typeof e&&"string"==typeof r||(e=vu(e),r=vu(r)),t(e,r)}}function qi(t,e,r,n,o,a,u,c,h,l){var d=8&e;e|=d?s:64,4&(e&=~(d?64:s))||(e&=-4);var f=[t,e,o,d?a:i,d?u:i,d?i:a,d?i:u,c,h,l],p=r.apply(i,f);return bo(t)&&So(p,f),p.placeholder=n,Oo(p,t,e)}function Hi(t){var e=At[t];return function(t,r){if(t=vu(t),(r=null==r?0:vr(pu(r),292))&&dr(t)){var n=(mu(t)+"e").split("e");return+((n=(mu(e(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return e(t)}}var Vi=Ar&&1/er(new Ar([,-0]))[1]==h?function(t){return new Ar(t)}:ss;function Zi(t){return function(e){var r=lo(e);return r==x?Xe(e):r==C?rr(e):function(t,e){return Le(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Yi(t,e,r,a,h,l,d,f){var p=2&e;if(!p&&"function"!=typeof t)throw new St(o);var g=a?a.length:0;if(g||(e&=-97,a=h=i),d=d===i?d:gr(pu(d),0),f=f===i?f:pu(f),g-=h?h.length:0,64&e){var v=a,y=h;a=h=i}var m=p?i:ro(t),b=[t,e,r,a,h,v,y,l,d,f];if(m&&function(t,e){var r=t[1],n=e[1],i=r|n,o=i<131,a=n==c&&8==r||n==c&&256==r&&t[7].length<=e[8]||384==n&&e[7].length<=e[8]&&8==r;if(!o&&!a)return t;1&n&&(t[2]=e[2],i|=1&r?0:4);var s=e[3];if(s){var h=t[3];t[3]=h?Ai(h,s,e[4]):s,t[4]=h?tr(t[3],u):e[4]}(s=e[5])&&(h=t[5],t[5]=h?Li(h,s,e[6]):s,t[6]=h?tr(t[5],u):e[6]),(s=e[7])&&(t[7]=s),n&c&&(t[8]=null==t[8]?e[8]:vr(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i}(b,m),t=b[0],e=b[1],r=b[2],a=b[3],h=b[4],!(f=b[9]=b[9]===i?p?0:t.length:gr(b[9]-g,0))&&24&e&&(e&=-25),e&&1!=e)w=8==e||16==e?function(t,e,r){var o=Ri(t);return function a(){for(var u=arguments.length,s=n(u),c=u,h=io(a);c--;)s[c]=arguments[c];var l=u<3&&s[0]!==h&&s[u-1]!==h?[]:tr(s,h);return(u-=l.length)<r?qi(t,e,Ni,a.placeholder,i,s,l,i,i,r-u):ye(this&&this!==oe&&this instanceof a?o:t,this,s)}}(t,e,f):e!=s&&33!=e||h.length?Ni.apply(i,b):function(t,e,r,i){var o=1&e,a=Ri(t);return function e(){for(var u=-1,s=arguments.length,c=-1,h=i.length,l=n(h+s),d=this&&this!==oe&&this instanceof e?a:t;++c<h;)l[c]=i[c];for(;s--;)l[c++]=arguments[++u];return ye(d,o?r:this,l)}}(t,e,r,a);else var w=function(t,e,r){var n=1&e,i=Ri(t);return function e(){return(this&&this!==oe&&this instanceof e?i:t).apply(n?r:this,arguments)}}(t,e,r);return Oo((m?Qn:So)(w,b),t,e)}function Ki(t,e,r,n){return t===i||Ua(t,Ot[r])&&!Rt.call(n,r)?e:t}function $i(t,e,r,n,o,a){return tu(t)&&tu(e)&&(a.set(e,t),zn(t,e,i,$i,a),a.delete(e)),t}function Qi(t){return iu(t)?i:t}function Xi(t,e,r,n,o,a){var u=1&r,s=t.length,c=e.length;if(s!=c&&!(u&&c>s))return!1;var h=a.get(t);if(h&&a.get(e))return h==e;var l=-1,d=!0,f=2&r?new Hr:i;for(a.set(t,e),a.set(e,t);++l<s;){var p=t[l],g=e[l];if(n)var v=u?n(g,p,l,e,t,a):n(p,g,l,t,e,a);if(v!==i){if(v)continue;d=!1;break}if(f){if(!Me(e,(function(t,e){if(!qe(f,e)&&(p===t||o(p,t,r,n,a)))return f.push(e)}))){d=!1;break}}else if(p!==g&&!o(p,g,r,n,a)){d=!1;break}}return a.delete(t),a.delete(e),d}function Ji(t){return Do(Ao(t,i,Ho),t+"")}function to(t){return xn(t,Ou,co)}function eo(t){return xn(t,Gu,ho)}var ro=Cr?function(t){return Cr.get(t)}:ss;function no(t){for(var e=t.name+"",r=Sr[e],n=Rt.call(Sr,e)?r.length:0;n--;){var i=r[n],o=i.func;if(null==o||o==t)return i.name}return e}function io(t){return(Rt.call(Nr,"placeholder")?Nr:t).placeholder}function oo(){var t=Nr.iteratee||is;return t=t===is?Fn:t,arguments.length?t(arguments[0],arguments[1]):t}function ao(t,e){var r,n,i=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof e?"string":"hash"]:i.map}function uo(t){for(var e=Ou(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,xo(i)]}return e}function so(t,e){var r=function(t,e){return null==t?i:t[e]}(t,e);return Gn(r)?r:i}var co=hr?function(t){return null==t?[]:(t=Lt(t),xe(hr(t),(function(e){return ne.call(t,e)})))}:gs,ho=hr?function(t){for(var e=[];t;)ke(e,co(t)),t=Yt(t);return e}:gs,lo=En;function fo(t,e,r){for(var n=-1,i=(e=vi(e,t)).length,o=!1;++n<i;){var a=No(e[n]);if(!(o=null!=t&&r(t,a)))break;t=t[a]}return o||++n!=i?o:!!(i=null==t?0:t.length)&&Ja(i)&&vo(a,i)&&(qa(t)||Wa(t))}function po(t){return"function"!=typeof t.constructor||_o(t)?{}:jr(Yt(t))}function go(t){return qa(t)||Wa(t)||!!(ae&&t&&t[ae])}function vo(t,e){var r=typeof t;return!!(e=null==e?l:e)&&("number"==r||"symbol"!=r&&yt.test(t))&&t>-1&&t%1==0&&t<e}function yo(t,e,r){if(!tu(r))return!1;var n=typeof e;return!!("number"==n?Va(r)&&vo(e,r.length):"string"==n&&e in r)&&Ua(r[e],t)}function mo(t,e){if(qa(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!su(t))||J.test(t)||!X.test(t)||null!=e&&t in Lt(e)}function bo(t){var e=no(t),r=Nr[e];if("function"!=typeof r||!(e in Ir.prototype))return!1;if(t===r)return!0;var n=ro(r);return!!n&&t===n[0]}(_r&&lo(new _r(new ArrayBuffer(1)))!=G||xr&&lo(new xr)!=x||Er&&lo(Er.resolve())!=L||Ar&&lo(new Ar)!=C||Lr&&lo(new Lr)!=D)&&(lo=function(t){var e=En(t),r=e==A?t.constructor:i,n=r?jo(r):"";if(n)switch(n){case Mr:return G;case Dr:return x;case Or:return L;case Gr:return C;case Fr:return D}return e});var wo=Gt?Qa:vs;function _o(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Ot)}function xo(t){return t==t&&!tu(t)}function Eo(t,e){return function(r){return null!=r&&r[t]===e&&(e!==i||t in Lt(r))}}function Ao(t,e,r){return e=gr(e===i?t.length-1:e,0),function(){for(var i=arguments,o=-1,a=gr(i.length-e,0),u=n(a);++o<a;)u[o]=i[e+o];o=-1;for(var s=n(e+1);++o<e;)s[o]=i[o];return s[e]=r(u),ye(t,this,s)}}function Lo(t,e){return e.length<2?t:_n(t,ti(e,0,-1))}function ko(t,e){for(var r=t.length,n=vr(e.length,r),o=ki(t);n--;){var a=e[n];t[n]=vo(a,r)?o[a]:i}return t}function Co(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var So=Go(Qn),Mo=ur||function(t,e){return oe.setTimeout(t,e)},Do=Go(Xn);function Oo(t,e,r){var n=e+"";return Do(t,function(t,e){var r=e.length;if(!r)return t;var n=r-1;return e[n]=(r>1?"& ":"")+e[n],e=e.join(r>2?", ":" "),t.replace(at,"{\n/* [wrapped with "+e+"] */\n")}(n,function(t,e){return be(p,(function(r){var n="_."+r[0];e&r[1]&&!Ee(t,n)&&t.push(n)})),t.sort()}(function(t){var e=t.match(ut);return e?e[1].split(st):[]}(n),r)))}function Go(t){var e=0,r=0;return function(){var n=yr(),o=16-(n-r);if(r=n,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(i,arguments)}}function Fo(t,e){var r=-1,n=t.length,o=n-1;for(e=e===i?n:e;++r<e;){var a=Hn(r,o),u=t[a];t[a]=t[r],t[r]=u}return t.length=e,t}var Ro,To,Po=(Ro=Ra((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(tt,(function(t,r,n,i){e.push(n?i.replace(ht,"$1"):r||t)})),e}),(function(t){return 500===To.size&&To.clear(),t})),To=Ro.cache,Ro);function No(t){if("string"==typeof t||su(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function jo(t){if(null!=t){try{return Ft.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function zo(t){if(t instanceof Ir)return t.clone();var e=new Ur(t.__wrapped__,t.__chain__);return e.__actions__=ki(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Uo=Zn((function(t,e){return Za(t)?cn(t,gn(e,1,Za,!0)):[]})),Io=Zn((function(t,e){var r=$o(e);return Za(r)&&(r=i),Za(t)?cn(t,gn(e,1,Za,!0),oo(r,2)):[]})),Bo=Zn((function(t,e){var r=$o(e);return Za(r)&&(r=i),Za(t)?cn(t,gn(e,1,Za,!0),i,r):[]}));function Wo(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var i=null==r?0:pu(r);return i<0&&(i=gr(n+i,0)),Ge(t,oo(e,3),i)}function qo(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var o=n-1;return r!==i&&(o=pu(r),o=r<0?gr(n+o,0):vr(o,n-1)),Ge(t,oo(e,3),o,!0)}function Ho(t){return null!=t&&t.length?gn(t,1):[]}function Vo(t){return t&&t.length?t[0]:i}var Zo=Zn((function(t){var e=Le(t,pi);return e.length&&e[0]===t[0]?Cn(e):[]})),Yo=Zn((function(t){var e=$o(t),r=Le(t,pi);return e===$o(r)?e=i:r.pop(),r.length&&r[0]===t[0]?Cn(r,oo(e,2)):[]})),Ko=Zn((function(t){var e=$o(t),r=Le(t,pi);return(e="function"==typeof e?e:i)&&r.pop(),r.length&&r[0]===t[0]?Cn(r,i,e):[]}));function $o(t){var e=null==t?0:t.length;return e?t[e-1]:i}var Qo=Zn(Xo);function Xo(t,e){return t&&t.length&&e&&e.length?Wn(t,e):t}var Jo=Ji((function(t,e){var r=null==t?0:t.length,n=nn(t,e);return qn(t,Le(e,(function(t){return vo(t,r)?+t:t})).sort(Ei)),n}));function ta(t){return null==t?t:wr.call(t)}var ea=Zn((function(t){return ui(gn(t,1,Za,!0))})),ra=Zn((function(t){var e=$o(t);return Za(e)&&(e=i),ui(gn(t,1,Za,!0),oo(e,2))})),na=Zn((function(t){var e=$o(t);return e="function"==typeof e?e:i,ui(gn(t,1,Za,!0),i,e)}));function ia(t){if(!t||!t.length)return[];var e=0;return t=xe(t,(function(t){if(Za(t))return e=gr(t.length,e),!0})),Ie(e,(function(e){return Le(t,Ne(e))}))}function oa(t,e){if(!t||!t.length)return[];var r=ia(t);return null==e?r:Le(r,(function(t){return ye(e,i,t)}))}var aa=Zn((function(t,e){return Za(t)?cn(t,e):[]})),ua=Zn((function(t){return di(xe(t,Za))})),sa=Zn((function(t){var e=$o(t);return Za(e)&&(e=i),di(xe(t,Za),oo(e,2))})),ca=Zn((function(t){var e=$o(t);return e="function"==typeof e?e:i,di(xe(t,Za),i,e)})),ha=Zn(ia),la=Zn((function(t){var e=t.length,r=e>1?t[e-1]:i;return r="function"==typeof r?(t.pop(),r):i,oa(t,r)}));function da(t){var e=Nr(t);return e.__chain__=!0,e}function fa(t,e){return e(t)}var pa=Ji((function(t){var e=t.length,r=e?t[0]:0,n=this.__wrapped__,o=function(e){return nn(e,t)};return!(e>1||this.__actions__.length)&&n instanceof Ir&&vo(r)?((n=n.slice(r,+r+(e?1:0))).__actions__.push({func:fa,args:[o],thisArg:i}),new Ur(n,this.__chain__).thru((function(t){return e&&!t.length&&t.push(i),t}))):this.thru(o)})),ga=Si((function(t,e,r){Rt.call(t,r)?++t[r]:rn(t,r,1)})),va=Ti(Wo),ya=Ti(qo);function ma(t,e){return(qa(t)?be:hn)(t,oo(e,3))}function ba(t,e){return(qa(t)?we:ln)(t,oo(e,3))}var wa=Si((function(t,e,r){Rt.call(t,r)?t[r].push(e):rn(t,r,[e])})),_a=Zn((function(t,e,r){var i=-1,o="function"==typeof e,a=Va(t)?n(t.length):[];return hn(t,(function(t){a[++i]=o?ye(e,t,r):Sn(t,e,r)})),a})),xa=Si((function(t,e,r){rn(t,r,e)}));function Ea(t,e){return(qa(t)?Le:Pn)(t,oo(e,3))}var Aa=Si((function(t,e,r){t[r?0:1].push(e)}),(function(){return[[],[]]})),La=Zn((function(t,e){if(null==t)return[];var r=e.length;return r>1&&yo(t,e[0],e[1])?e=[]:r>2&&yo(e[0],e[1],e[2])&&(e=[e[0]]),In(t,gn(e,1),[])})),ka=je||function(){return oe.Date.now()};function Ca(t,e,r){return e=r?i:e,e=t&&null==e?t.length:e,Yi(t,c,i,i,i,i,e)}function Sa(t,e){var r;if("function"!=typeof e)throw new St(o);return t=pu(t),function(){return--t>0&&(r=e.apply(this,arguments)),t<=1&&(e=i),r}}var Ma=Zn((function(t,e,r){var n=1;if(r.length){var i=tr(r,io(Ma));n|=s}return Yi(t,n,e,r,i)})),Da=Zn((function(t,e,r){var n=3;if(r.length){var i=tr(r,io(Da));n|=s}return Yi(e,n,t,r,i)}));function Oa(t,e,r){var n,a,u,s,c,h,l=0,d=!1,f=!1,p=!0;if("function"!=typeof t)throw new St(o);function g(e){var r=n,o=a;return n=a=i,l=e,s=t.apply(o,r)}function v(t){return l=t,c=Mo(m,e),d?g(t):s}function y(t){var r=t-h;return h===i||r>=e||r<0||f&&t-l>=u}function m(){var t=ka();if(y(t))return b(t);c=Mo(m,function(t){var r=e-(t-h);return f?vr(r,u-(t-l)):r}(t))}function b(t){return c=i,p&&n?g(t):(n=a=i,s)}function w(){var t=ka(),r=y(t);if(n=arguments,a=this,h=t,r){if(c===i)return v(h);if(f)return bi(c),c=Mo(m,e),g(h)}return c===i&&(c=Mo(m,e)),s}return e=vu(e)||0,tu(r)&&(d=!!r.leading,u=(f="maxWait"in r)?gr(vu(r.maxWait)||0,e):u,p="trailing"in r?!!r.trailing:p),w.cancel=function(){c!==i&&bi(c),l=0,n=h=a=c=i},w.flush=function(){return c===i?s:b(ka())},w}var Ga=Zn((function(t,e){return sn(t,1,e)})),Fa=Zn((function(t,e,r){return sn(t,vu(e)||0,r)}));function Ra(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new St(o);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=t.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(Ra.Cache||qr),r}function Ta(t){if("function"!=typeof t)throw new St(o);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Ra.Cache=qr;var Pa=yi((function(t,e){var r=(e=1==e.length&&qa(e[0])?Le(e[0],Be(oo())):Le(gn(e,1),Be(oo()))).length;return Zn((function(n){for(var i=-1,o=vr(n.length,r);++i<o;)n[i]=e[i].call(this,n[i]);return ye(t,this,n)}))})),Na=Zn((function(t,e){var r=tr(e,io(Na));return Yi(t,s,i,e,r)})),ja=Zn((function(t,e){var r=tr(e,io(ja));return Yi(t,64,i,e,r)})),za=Ji((function(t,e){return Yi(t,256,i,i,i,e)}));function Ua(t,e){return t===e||t!=t&&e!=e}var Ia=Wi(An),Ba=Wi((function(t,e){return t>=e})),Wa=Mn(function(){return arguments}())?Mn:function(t){return eu(t)&&Rt.call(t,"callee")&&!ne.call(t,"callee")},qa=n.isArray,Ha=le?Be(le):function(t){return eu(t)&&En(t)==O};function Va(t){return null!=t&&Ja(t.length)&&!Qa(t)}function Za(t){return eu(t)&&Va(t)}var Ya=lr||vs,Ka=de?Be(de):function(t){return eu(t)&&En(t)==m};function $a(t){if(!eu(t))return!1;var e=En(t);return e==b||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!iu(t)}function Qa(t){if(!tu(t))return!1;var e=En(t);return e==w||e==_||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Xa(t){return"number"==typeof t&&t==pu(t)}function Ja(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=l}function tu(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function eu(t){return null!=t&&"object"==typeof t}var ru=fe?Be(fe):function(t){return eu(t)&&lo(t)==x};function nu(t){return"number"==typeof t||eu(t)&&En(t)==E}function iu(t){if(!eu(t)||En(t)!=A)return!1;var e=Yt(t);if(null===e)return!0;var r=Rt.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&Ft.call(r)==jt}var ou=pe?Be(pe):function(t){return eu(t)&&En(t)==k},au=ge?Be(ge):function(t){return eu(t)&&lo(t)==C};function uu(t){return"string"==typeof t||!qa(t)&&eu(t)&&En(t)==S}function su(t){return"symbol"==typeof t||eu(t)&&En(t)==M}var cu=ve?Be(ve):function(t){return eu(t)&&Ja(t.length)&&!!Xt[En(t)]},hu=Wi(Tn),lu=Wi((function(t,e){return t<=e}));function du(t){if(!t)return[];if(Va(t))return uu(t)?ir(t):ki(t);if(ue&&t[ue])return function(t){for(var e,r=[];!(e=t.next()).done;)r.push(e.value);return r}(t[ue]());var e=lo(t);return(e==x?Xe:e==C?er:Uu)(t)}function fu(t){return t?(t=vu(t))===h||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function pu(t){var e=fu(t),r=e%1;return e==e?r?e-r:e:0}function gu(t){return t?on(pu(t),0,f):0}function vu(t){if("number"==typeof t)return t;if(su(t))return d;if(tu(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=tu(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(nt,"");var r=pt.test(t);return r||vt.test(t)?re(t.slice(2),r?2:8):ft.test(t)?d:+t}function yu(t){return Ci(t,Gu(t))}function mu(t){return null==t?"":ai(t)}var bu=Mi((function(t,e){if(_o(e)||Va(e))Ci(e,Ou(e),t);else for(var r in e)Rt.call(e,r)&&Xr(t,r,e[r])})),wu=Mi((function(t,e){Ci(e,Gu(e),t)})),_u=Mi((function(t,e,r,n){Ci(e,Gu(e),t,n)})),xu=Mi((function(t,e,r,n){Ci(e,Ou(e),t,n)})),Eu=Ji(nn),Au=Zn((function(t,e){t=Lt(t);var r=-1,n=e.length,o=n>2?e[2]:i;for(o&&yo(e[0],e[1],o)&&(n=1);++r<n;)for(var a=e[r],u=Gu(a),s=-1,c=u.length;++s<c;){var h=u[s],l=t[h];(l===i||Ua(l,Ot[h])&&!Rt.call(t,h))&&(t[h]=a[h])}return t})),Lu=Zn((function(t){return t.push(i,$i),ye(Ru,i,t)}));function ku(t,e,r){var n=null==t?i:_n(t,e);return n===i?r:n}function Cu(t,e){return null!=t&&fo(t,e,kn)}var Su=ji((function(t,e,r){null!=e&&"function"!=typeof e.toString&&(e=Nt.call(e)),t[e]=r}),ts(ns)),Mu=ji((function(t,e,r){null!=e&&"function"!=typeof e.toString&&(e=Nt.call(e)),Rt.call(t,e)?t[e].push(r):t[e]=[r]}),oo),Du=Zn(Sn);function Ou(t){return Va(t)?Zr(t):Rn(t)}function Gu(t){return Va(t)?Zr(t,!0):function(t){if(!tu(t))return function(t){var e=[];if(null!=t)for(var r in Lt(t))e.push(r);return e}(t);var e=_o(t),r=[];for(var n in t)("constructor"!=n||!e&&Rt.call(t,n))&&r.push(n);return r}(t)}var Fu=Mi((function(t,e,r){zn(t,e,r)})),Ru=Mi((function(t,e,r,n){zn(t,e,r,n)})),Tu=Ji((function(t,e){var r={};if(null==t)return r;var n=!1;e=Le(e,(function(e){return e=vi(e,t),n||(n=e.length>1),e})),Ci(t,eo(t),r),n&&(r=an(r,7,Qi));for(var i=e.length;i--;)si(r,e[i]);return r})),Pu=Ji((function(t,e){return null==t?{}:function(t,e){return Bn(t,e,(function(e,r){return Cu(t,r)}))}(t,e)}));function Nu(t,e){if(null==t)return{};var r=Le(eo(t),(function(t){return[t]}));return e=oo(e),Bn(t,r,(function(t,r){return e(t,r[0])}))}var ju=Zi(Ou),zu=Zi(Gu);function Uu(t){return null==t?[]:We(t,Ou(t))}var Iu=Fi((function(t,e,r){return e=e.toLowerCase(),t+(r?Bu(e):e)}));function Bu(t){return $u(mu(t).toLowerCase())}function Wu(t){return(t=mu(t))&&t.replace(mt,Ye).replace(Ht,"")}var qu=Fi((function(t,e,r){return t+(r?"-":"")+e.toLowerCase()})),Hu=Fi((function(t,e,r){return t+(r?" ":"")+e.toLowerCase()})),Vu=Gi("toLowerCase"),Zu=Fi((function(t,e,r){return t+(r?"_":"")+e.toLowerCase()})),Yu=Fi((function(t,e,r){return t+(r?" ":"")+$u(e)})),Ku=Fi((function(t,e,r){return t+(r?" ":"")+e.toUpperCase()})),$u=Gi("toUpperCase");function Qu(t,e,r){return t=mu(t),(e=r?i:e)===i?function(t){return Kt.test(t)}(t)?function(t){return t.match(Zt)||[]}(t):function(t){return t.match(ct)||[]}(t):t.match(e)||[]}var Xu=Zn((function(t,e){try{return ye(t,i,e)}catch(t){return $a(t)?t:new xt(t)}})),Ju=Ji((function(t,e){return be(e,(function(e){e=No(e),rn(t,e,Ma(t[e],t))})),t}));function ts(t){return function(){return t}}var es=Pi(),rs=Pi(!0);function ns(t){return t}function is(t){return Fn("function"==typeof t?t:an(t,1))}var os=Zn((function(t,e){return function(r){return Sn(r,t,e)}})),as=Zn((function(t,e){return function(r){return Sn(t,r,e)}}));function us(t,e,r){var n=Ou(e),i=wn(e,n);null!=r||tu(e)&&(i.length||!n.length)||(r=e,e=t,t=this,i=wn(e,Ou(e)));var o=!(tu(r)&&"chain"in r&&!r.chain),a=Qa(t);return be(i,(function(r){var n=e[r];t[r]=n,a&&(t.prototype[r]=function(){var e=this.__chain__;if(o||e){var r=t(this.__wrapped__),i=r.__actions__=ki(this.__actions__);return i.push({func:n,args:arguments,thisArg:t}),r.__chain__=e,r}return n.apply(t,ke([this.value()],arguments))})})),t}function ss(){}var cs=Ui(Le),hs=Ui(_e),ls=Ui(Me);function ds(t){return mo(t)?Ne(No(t)):function(t){return function(e){return _n(e,t)}}(t)}var fs=Bi(),ps=Bi(!0);function gs(){return[]}function vs(){return!1}var ys,ms=zi((function(t,e){return t+e}),0),bs=Hi("ceil"),ws=zi((function(t,e){return t/e}),1),_s=Hi("floor"),xs=zi((function(t,e){return t*e}),1),Es=Hi("round"),As=zi((function(t,e){return t-e}),0);return Nr.after=function(t,e){if("function"!=typeof e)throw new St(o);return t=pu(t),function(){if(--t<1)return e.apply(this,arguments)}},Nr.ary=Ca,Nr.assign=bu,Nr.assignIn=wu,Nr.assignInWith=_u,Nr.assignWith=xu,Nr.at=Eu,Nr.before=Sa,Nr.bind=Ma,Nr.bindAll=Ju,Nr.bindKey=Da,Nr.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return qa(t)?t:[t]},Nr.chain=da,Nr.chunk=function(t,e,r){e=(r?yo(t,e,r):e===i)?1:gr(pu(e),0);var o=null==t?0:t.length;if(!o||e<1)return[];for(var a=0,u=0,s=n(sr(o/e));a<o;)s[u++]=ti(t,a,a+=e);return s},Nr.compact=function(t){for(var e=-1,r=null==t?0:t.length,n=0,i=[];++e<r;){var o=t[e];o&&(i[n++]=o)}return i},Nr.concat=function(){var t=arguments.length;if(!t)return[];for(var e=n(t-1),r=arguments[0],i=t;i--;)e[i-1]=arguments[i];return ke(qa(r)?ki(r):[r],gn(e,1))},Nr.cond=function(t){var e=null==t?0:t.length,r=oo();return t=e?Le(t,(function(t){if("function"!=typeof t[1])throw new St(o);return[r(t[0]),t[1]]})):[],Zn((function(r){for(var n=-1;++n<e;){var i=t[n];if(ye(i[0],this,r))return ye(i[1],this,r)}}))},Nr.conforms=function(t){return function(t){var e=Ou(t);return function(r){return un(r,t,e)}}(an(t,1))},Nr.constant=ts,Nr.countBy=ga,Nr.create=function(t,e){var r=jr(t);return null==e?r:en(r,e)},Nr.curry=function t(e,r,n){var o=Yi(e,8,i,i,i,i,i,r=n?i:r);return o.placeholder=t.placeholder,o},Nr.curryRight=function t(e,r,n){var o=Yi(e,16,i,i,i,i,i,r=n?i:r);return o.placeholder=t.placeholder,o},Nr.debounce=Oa,Nr.defaults=Au,Nr.defaultsDeep=Lu,Nr.defer=Ga,Nr.delay=Fa,Nr.difference=Uo,Nr.differenceBy=Io,Nr.differenceWith=Bo,Nr.drop=function(t,e,r){var n=null==t?0:t.length;return n?ti(t,(e=r||e===i?1:pu(e))<0?0:e,n):[]},Nr.dropRight=function(t,e,r){var n=null==t?0:t.length;return n?ti(t,0,(e=n-(e=r||e===i?1:pu(e)))<0?0:e):[]},Nr.dropRightWhile=function(t,e){return t&&t.length?hi(t,oo(e,3),!0,!0):[]},Nr.dropWhile=function(t,e){return t&&t.length?hi(t,oo(e,3),!0):[]},Nr.fill=function(t,e,r,n){var o=null==t?0:t.length;return o?(r&&"number"!=typeof r&&yo(t,e,r)&&(r=0,n=o),function(t,e,r,n){var o=t.length;for((r=pu(r))<0&&(r=-r>o?0:o+r),(n=n===i||n>o?o:pu(n))<0&&(n+=o),n=r>n?0:gu(n);r<n;)t[r++]=e;return t}(t,e,r,n)):[]},Nr.filter=function(t,e){return(qa(t)?xe:pn)(t,oo(e,3))},Nr.flatMap=function(t,e){return gn(Ea(t,e),1)},Nr.flatMapDeep=function(t,e){return gn(Ea(t,e),h)},Nr.flatMapDepth=function(t,e,r){return r=r===i?1:pu(r),gn(Ea(t,e),r)},Nr.flatten=Ho,Nr.flattenDeep=function(t){return null!=t&&t.length?gn(t,h):[]},Nr.flattenDepth=function(t,e){return null!=t&&t.length?gn(t,e=e===i?1:pu(e)):[]},Nr.flip=function(t){return Yi(t,512)},Nr.flow=es,Nr.flowRight=rs,Nr.fromPairs=function(t){for(var e=-1,r=null==t?0:t.length,n={};++e<r;){var i=t[e];n[i[0]]=i[1]}return n},Nr.functions=function(t){return null==t?[]:wn(t,Ou(t))},Nr.functionsIn=function(t){return null==t?[]:wn(t,Gu(t))},Nr.groupBy=wa,Nr.initial=function(t){return null!=t&&t.length?ti(t,0,-1):[]},Nr.intersection=Zo,Nr.intersectionBy=Yo,Nr.intersectionWith=Ko,Nr.invert=Su,Nr.invertBy=Mu,Nr.invokeMap=_a,Nr.iteratee=is,Nr.keyBy=xa,Nr.keys=Ou,Nr.keysIn=Gu,Nr.map=Ea,Nr.mapKeys=function(t,e){var r={};return e=oo(e,3),mn(t,(function(t,n,i){rn(r,e(t,n,i),t)})),r},Nr.mapValues=function(t,e){var r={};return e=oo(e,3),mn(t,(function(t,n,i){rn(r,n,e(t,n,i))})),r},Nr.matches=function(t){return Nn(an(t,1))},Nr.matchesProperty=function(t,e){return jn(t,an(e,1))},Nr.memoize=Ra,Nr.merge=Fu,Nr.mergeWith=Ru,Nr.method=os,Nr.methodOf=as,Nr.mixin=us,Nr.negate=Ta,Nr.nthArg=function(t){return t=pu(t),Zn((function(e){return Un(e,t)}))},Nr.omit=Tu,Nr.omitBy=function(t,e){return Nu(t,Ta(oo(e)))},Nr.once=function(t){return Sa(2,t)},Nr.orderBy=function(t,e,r,n){return null==t?[]:(qa(e)||(e=null==e?[]:[e]),qa(r=n?i:r)||(r=null==r?[]:[r]),In(t,e,r))},Nr.over=cs,Nr.overArgs=Pa,Nr.overEvery=hs,Nr.overSome=ls,Nr.partial=Na,Nr.partialRight=ja,Nr.partition=Aa,Nr.pick=Pu,Nr.pickBy=Nu,Nr.property=ds,Nr.propertyOf=function(t){return function(e){return null==t?i:_n(t,e)}},Nr.pull=Qo,Nr.pullAll=Xo,Nr.pullAllBy=function(t,e,r){return t&&t.length&&e&&e.length?Wn(t,e,oo(r,2)):t},Nr.pullAllWith=function(t,e,r){return t&&t.length&&e&&e.length?Wn(t,e,i,r):t},Nr.pullAt=Jo,Nr.range=fs,Nr.rangeRight=ps,Nr.rearg=za,Nr.reject=function(t,e){return(qa(t)?xe:pn)(t,Ta(oo(e,3)))},Nr.remove=function(t,e){var r=[];if(!t||!t.length)return r;var n=-1,i=[],o=t.length;for(e=oo(e,3);++n<o;){var a=t[n];e(a,n,t)&&(r.push(a),i.push(n))}return qn(t,i),r},Nr.rest=function(t,e){if("function"!=typeof t)throw new St(o);return Zn(t,e=e===i?e:pu(e))},Nr.reverse=ta,Nr.sampleSize=function(t,e,r){return e=(r?yo(t,e,r):e===i)?1:pu(e),(qa(t)?Kr:Kn)(t,e)},Nr.set=function(t,e,r){return null==t?t:$n(t,e,r)},Nr.setWith=function(t,e,r,n){return n="function"==typeof n?n:i,null==t?t:$n(t,e,r,n)},Nr.shuffle=function(t){return(qa(t)?$r:Jn)(t)},Nr.slice=function(t,e,r){var n=null==t?0:t.length;return n?(r&&"number"!=typeof r&&yo(t,e,r)?(e=0,r=n):(e=null==e?0:pu(e),r=r===i?n:pu(r)),ti(t,e,r)):[]},Nr.sortBy=La,Nr.sortedUniq=function(t){return t&&t.length?ii(t):[]},Nr.sortedUniqBy=function(t,e){return t&&t.length?ii(t,oo(e,2)):[]},Nr.split=function(t,e,r){return r&&"number"!=typeof r&&yo(t,e,r)&&(e=r=i),(r=r===i?f:r>>>0)?(t=mu(t))&&("string"==typeof e||null!=e&&!ou(e))&&!(e=ai(e))&&Qe(t)?mi(ir(t),0,r):t.split(e,r):[]},Nr.spread=function(t,e){if("function"!=typeof t)throw new St(o);return e=null==e?0:gr(pu(e),0),Zn((function(r){var n=r[e],i=mi(r,0,e);return n&&ke(i,n),ye(t,this,i)}))},Nr.tail=function(t){var e=null==t?0:t.length;return e?ti(t,1,e):[]},Nr.take=function(t,e,r){return t&&t.length?ti(t,0,(e=r||e===i?1:pu(e))<0?0:e):[]},Nr.takeRight=function(t,e,r){var n=null==t?0:t.length;return n?ti(t,(e=n-(e=r||e===i?1:pu(e)))<0?0:e,n):[]},Nr.takeRightWhile=function(t,e){return t&&t.length?hi(t,oo(e,3),!1,!0):[]},Nr.takeWhile=function(t,e){return t&&t.length?hi(t,oo(e,3)):[]},Nr.tap=function(t,e){return e(t),t},Nr.throttle=function(t,e,r){var n=!0,i=!0;if("function"!=typeof t)throw new St(o);return tu(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),Oa(t,e,{leading:n,maxWait:e,trailing:i})},Nr.thru=fa,Nr.toArray=du,Nr.toPairs=ju,Nr.toPairsIn=zu,Nr.toPath=function(t){return qa(t)?Le(t,No):su(t)?[t]:ki(Po(mu(t)))},Nr.toPlainObject=yu,Nr.transform=function(t,e,r){var n=qa(t),i=n||Ya(t)||cu(t);if(e=oo(e,4),null==r){var o=t&&t.constructor;r=i?n?new o:[]:tu(t)&&Qa(o)?jr(Yt(t)):{}}return(i?be:mn)(t,(function(t,n,i){return e(r,t,n,i)})),r},Nr.unary=function(t){return Ca(t,1)},Nr.union=ea,Nr.unionBy=ra,Nr.unionWith=na,Nr.uniq=function(t){return t&&t.length?ui(t):[]},Nr.uniqBy=function(t,e){return t&&t.length?ui(t,oo(e,2)):[]},Nr.uniqWith=function(t,e){return e="function"==typeof e?e:i,t&&t.length?ui(t,i,e):[]},Nr.unset=function(t,e){return null==t||si(t,e)},Nr.unzip=ia,Nr.unzipWith=oa,Nr.update=function(t,e,r){return null==t?t:ci(t,e,gi(r))},Nr.updateWith=function(t,e,r,n){return n="function"==typeof n?n:i,null==t?t:ci(t,e,gi(r),n)},Nr.values=Uu,Nr.valuesIn=function(t){return null==t?[]:We(t,Gu(t))},Nr.without=aa,Nr.words=Qu,Nr.wrap=function(t,e){return Na(gi(e),t)},Nr.xor=ua,Nr.xorBy=sa,Nr.xorWith=ca,Nr.zip=ha,Nr.zipObject=function(t,e){return fi(t||[],e||[],Xr)},Nr.zipObjectDeep=function(t,e){return fi(t||[],e||[],$n)},Nr.zipWith=la,Nr.entries=ju,Nr.entriesIn=zu,Nr.extend=wu,Nr.extendWith=_u,us(Nr,Nr),Nr.add=ms,Nr.attempt=Xu,Nr.camelCase=Iu,Nr.capitalize=Bu,Nr.ceil=bs,Nr.clamp=function(t,e,r){return r===i&&(r=e,e=i),r!==i&&(r=(r=vu(r))==r?r:0),e!==i&&(e=(e=vu(e))==e?e:0),on(vu(t),e,r)},Nr.clone=function(t){return an(t,4)},Nr.cloneDeep=function(t){return an(t,5)},Nr.cloneDeepWith=function(t,e){return an(t,5,e="function"==typeof e?e:i)},Nr.cloneWith=function(t,e){return an(t,4,e="function"==typeof e?e:i)},Nr.conformsTo=function(t,e){return null==e||un(t,e,Ou(e))},Nr.deburr=Wu,Nr.defaultTo=function(t,e){return null==t||t!=t?e:t},Nr.divide=ws,Nr.endsWith=function(t,e,r){t=mu(t),e=ai(e);var n=t.length,o=r=r===i?n:on(pu(r),0,n);return(r-=e.length)>=0&&t.slice(r,o)==e},Nr.eq=Ua,Nr.escape=function(t){return(t=mu(t))&&Y.test(t)?t.replace(V,Ke):t},Nr.escapeRegExp=function(t){return(t=mu(t))&&rt.test(t)?t.replace(et,"\\$&"):t},Nr.every=function(t,e,r){var n=qa(t)?_e:dn;return r&&yo(t,e,r)&&(e=i),n(t,oo(e,3))},Nr.find=va,Nr.findIndex=Wo,Nr.findKey=function(t,e){return Oe(t,oo(e,3),mn)},Nr.findLast=ya,Nr.findLastIndex=qo,Nr.findLastKey=function(t,e){return Oe(t,oo(e,3),bn)},Nr.floor=_s,Nr.forEach=ma,Nr.forEachRight=ba,Nr.forIn=function(t,e){return null==t?t:vn(t,oo(e,3),Gu)},Nr.forInRight=function(t,e){return null==t?t:yn(t,oo(e,3),Gu)},Nr.forOwn=function(t,e){return t&&mn(t,oo(e,3))},Nr.forOwnRight=function(t,e){return t&&bn(t,oo(e,3))},Nr.get=ku,Nr.gt=Ia,Nr.gte=Ba,Nr.has=function(t,e){return null!=t&&fo(t,e,Ln)},Nr.hasIn=Cu,Nr.head=Vo,Nr.identity=ns,Nr.includes=function(t,e,r,n){t=Va(t)?t:Uu(t),r=r&&!n?pu(r):0;var i=t.length;return r<0&&(r=gr(i+r,0)),uu(t)?r<=i&&t.indexOf(e,r)>-1:!!i&&Fe(t,e,r)>-1},Nr.indexOf=function(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var i=null==r?0:pu(r);return i<0&&(i=gr(n+i,0)),Fe(t,e,i)},Nr.inRange=function(t,e,r){return e=fu(e),r===i?(r=e,e=0):r=fu(r),function(t,e,r){return t>=vr(e,r)&&t<gr(e,r)}(t=vu(t),e,r)},Nr.invoke=Du,Nr.isArguments=Wa,Nr.isArray=qa,Nr.isArrayBuffer=Ha,Nr.isArrayLike=Va,Nr.isArrayLikeObject=Za,Nr.isBoolean=function(t){return!0===t||!1===t||eu(t)&&En(t)==y},Nr.isBuffer=Ya,Nr.isDate=Ka,Nr.isElement=function(t){return eu(t)&&1===t.nodeType&&!iu(t)},Nr.isEmpty=function(t){if(null==t)return!0;if(Va(t)&&(qa(t)||"string"==typeof t||"function"==typeof t.splice||Ya(t)||cu(t)||Wa(t)))return!t.length;var e=lo(t);if(e==x||e==C)return!t.size;if(_o(t))return!Rn(t).length;for(var r in t)if(Rt.call(t,r))return!1;return!0},Nr.isEqual=function(t,e){return Dn(t,e)},Nr.isEqualWith=function(t,e,r){var n=(r="function"==typeof r?r:i)?r(t,e):i;return n===i?Dn(t,e,i,r):!!n},Nr.isError=$a,Nr.isFinite=function(t){return"number"==typeof t&&dr(t)},Nr.isFunction=Qa,Nr.isInteger=Xa,Nr.isLength=Ja,Nr.isMap=ru,Nr.isMatch=function(t,e){return t===e||On(t,e,uo(e))},Nr.isMatchWith=function(t,e,r){return r="function"==typeof r?r:i,On(t,e,uo(e),r)},Nr.isNaN=function(t){return nu(t)&&t!=+t},Nr.isNative=function(t){if(wo(t))throw new xt("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Gn(t)},Nr.isNil=function(t){return null==t},Nr.isNull=function(t){return null===t},Nr.isNumber=nu,Nr.isObject=tu,Nr.isObjectLike=eu,Nr.isPlainObject=iu,Nr.isRegExp=ou,Nr.isSafeInteger=function(t){return Xa(t)&&t>=-9007199254740991&&t<=l},Nr.isSet=au,Nr.isString=uu,Nr.isSymbol=su,Nr.isTypedArray=cu,Nr.isUndefined=function(t){return t===i},Nr.isWeakMap=function(t){return eu(t)&&lo(t)==D},Nr.isWeakSet=function(t){return eu(t)&&"[object WeakSet]"==En(t)},Nr.join=function(t,e){return null==t?"":fr.call(t,e)},Nr.kebabCase=qu,Nr.last=$o,Nr.lastIndexOf=function(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var o=n;return r!==i&&(o=(o=pu(r))<0?gr(n+o,0):vr(o,n-1)),e==e?function(t,e,r){for(var n=r+1;n--;)if(t[n]===e)return n;return n}(t,e,o):Ge(t,Te,o,!0)},Nr.lowerCase=Hu,Nr.lowerFirst=Vu,Nr.lt=hu,Nr.lte=lu,Nr.max=function(t){return t&&t.length?fn(t,ns,An):i},Nr.maxBy=function(t,e){return t&&t.length?fn(t,oo(e,2),An):i},Nr.mean=function(t){return Pe(t,ns)},Nr.meanBy=function(t,e){return Pe(t,oo(e,2))},Nr.min=function(t){return t&&t.length?fn(t,ns,Tn):i},Nr.minBy=function(t,e){return t&&t.length?fn(t,oo(e,2),Tn):i},Nr.stubArray=gs,Nr.stubFalse=vs,Nr.stubObject=function(){return{}},Nr.stubString=function(){return""},Nr.stubTrue=function(){return!0},Nr.multiply=xs,Nr.nth=function(t,e){return t&&t.length?Un(t,pu(e)):i},Nr.noConflict=function(){return oe._===this&&(oe._=zt),this},Nr.noop=ss,Nr.now=ka,Nr.pad=function(t,e,r){t=mu(t);var n=(e=pu(e))?nr(t):0;if(!e||n>=e)return t;var i=(e-n)/2;return Ii(cr(i),r)+t+Ii(sr(i),r)},Nr.padEnd=function(t,e,r){t=mu(t);var n=(e=pu(e))?nr(t):0;return e&&n<e?t+Ii(e-n,r):t},Nr.padStart=function(t,e,r){t=mu(t);var n=(e=pu(e))?nr(t):0;return e&&n<e?Ii(e-n,r)+t:t},Nr.parseInt=function(t,e,r){return r||null==e?e=0:e&&(e=+e),mr(mu(t).replace(it,""),e||0)},Nr.random=function(t,e,r){if(r&&"boolean"!=typeof r&&yo(t,e,r)&&(e=r=i),r===i&&("boolean"==typeof e?(r=e,e=i):"boolean"==typeof t&&(r=t,t=i)),t===i&&e===i?(t=0,e=1):(t=fu(t),e===i?(e=t,t=0):e=fu(e)),t>e){var n=t;t=e,e=n}if(r||t%1||e%1){var o=br();return vr(t+o*(e-t+ee("1e-"+((o+"").length-1))),e)}return Hn(t,e)},Nr.reduce=function(t,e,r){var n=qa(t)?Ce:ze,i=arguments.length<3;return n(t,oo(e,4),r,i,hn)},Nr.reduceRight=function(t,e,r){var n=qa(t)?Se:ze,i=arguments.length<3;return n(t,oo(e,4),r,i,ln)},Nr.repeat=function(t,e,r){return e=(r?yo(t,e,r):e===i)?1:pu(e),Vn(mu(t),e)},Nr.replace=function(){var t=arguments,e=mu(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Nr.result=function(t,e,r){var n=-1,o=(e=vi(e,t)).length;for(o||(o=1,t=i);++n<o;){var a=null==t?i:t[No(e[n])];a===i&&(n=o,a=r),t=Qa(a)?a.call(t):a}return t},Nr.round=Es,Nr.runInContext=t,Nr.sample=function(t){return(qa(t)?Yr:Yn)(t)},Nr.size=function(t){if(null==t)return 0;if(Va(t))return uu(t)?nr(t):t.length;var e=lo(t);return e==x||e==C?t.size:Rn(t).length},Nr.snakeCase=Zu,Nr.some=function(t,e,r){var n=qa(t)?Me:ei;return r&&yo(t,e,r)&&(e=i),n(t,oo(e,3))},Nr.sortedIndex=function(t,e){return ri(t,e)},Nr.sortedIndexBy=function(t,e,r){return ni(t,e,oo(r,2))},Nr.sortedIndexOf=function(t,e){var r=null==t?0:t.length;if(r){var n=ri(t,e);if(n<r&&Ua(t[n],e))return n}return-1},Nr.sortedLastIndex=function(t,e){return ri(t,e,!0)},Nr.sortedLastIndexBy=function(t,e,r){return ni(t,e,oo(r,2),!0)},Nr.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var r=ri(t,e,!0)-1;if(Ua(t[r],e))return r}return-1},Nr.startCase=Yu,Nr.startsWith=function(t,e,r){return t=mu(t),r=null==r?0:on(pu(r),0,t.length),e=ai(e),t.slice(r,r+e.length)==e},Nr.subtract=As,Nr.sum=function(t){return t&&t.length?Ue(t,ns):0},Nr.sumBy=function(t,e){return t&&t.length?Ue(t,oo(e,2)):0},Nr.template=function(t,e,r){var n=Nr.templateSettings;r&&yo(t,e,r)&&(e=i),t=mu(t),e=_u({},e,n,Ki);var o,a,u=_u({},e.imports,n.imports,Ki),s=Ou(u),c=We(u,s),h=0,l=e.interpolate||bt,d="__p += '",f=kt((e.escape||bt).source+"|"+l.source+"|"+(l===Q?lt:bt).source+"|"+(e.evaluate||bt).source+"|$","g"),p="//# sourceURL="+(Rt.call(e,"sourceURL")?(e.sourceURL+"").replace(/[\r\n]/g," "):"lodash.templateSources["+ ++Qt+"]")+"\n";t.replace(f,(function(e,r,n,i,u,s){return n||(n=i),d+=t.slice(h,s).replace(wt,$e),r&&(o=!0,d+="' +\n__e("+r+") +\n'"),u&&(a=!0,d+="';\n"+u+";\n__p += '"),n&&(d+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),h=s+e.length,e})),d+="';\n";var g=Rt.call(e,"variable")&&e.variable;g||(d="with (obj) {\n"+d+"\n}\n"),d=(a?d.replace(B,""):d).replace(W,"$1").replace(q,"$1;"),d="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var v=Xu((function(){return Et(s,p+"return "+d).apply(i,c)}));if(v.source=d,$a(v))throw v;return v},Nr.times=function(t,e){if((t=pu(t))<1||t>l)return[];var r=f,n=vr(t,f);e=oo(e),t-=f;for(var i=Ie(n,e);++r<t;)e(r);return i},Nr.toFinite=fu,Nr.toInteger=pu,Nr.toLength=gu,Nr.toLower=function(t){return mu(t).toLowerCase()},Nr.toNumber=vu,Nr.toSafeInteger=function(t){return t?on(pu(t),-9007199254740991,l):0===t?t:0},Nr.toString=mu,Nr.toUpper=function(t){return mu(t).toUpperCase()},Nr.trim=function(t,e,r){if((t=mu(t))&&(r||e===i))return t.replace(nt,"");if(!t||!(e=ai(e)))return t;var n=ir(t),o=ir(e);return mi(n,He(n,o),Ve(n,o)+1).join("")},Nr.trimEnd=function(t,e,r){if((t=mu(t))&&(r||e===i))return t.replace(ot,"");if(!t||!(e=ai(e)))return t;var n=ir(t);return mi(n,0,Ve(n,ir(e))+1).join("")},Nr.trimStart=function(t,e,r){if((t=mu(t))&&(r||e===i))return t.replace(it,"");if(!t||!(e=ai(e)))return t;var n=ir(t);return mi(n,He(n,ir(e))).join("")},Nr.truncate=function(t,e){var r=30,n="...";if(tu(e)){var o="separator"in e?e.separator:o;r="length"in e?pu(e.length):r,n="omission"in e?ai(e.omission):n}var a=(t=mu(t)).length;if(Qe(t)){var u=ir(t);a=u.length}if(r>=a)return t;var s=r-nr(n);if(s<1)return n;var c=u?mi(u,0,s).join(""):t.slice(0,s);if(o===i)return c+n;if(u&&(s+=c.length-s),ou(o)){if(t.slice(s).search(o)){var h,l=c;for(o.global||(o=kt(o.source,mu(dt.exec(o))+"g")),o.lastIndex=0;h=o.exec(l);)var d=h.index;c=c.slice(0,d===i?s:d)}}else if(t.indexOf(ai(o),s)!=s){var f=c.lastIndexOf(o);f>-1&&(c=c.slice(0,f))}return c+n},Nr.unescape=function(t){return(t=mu(t))&&Z.test(t)?t.replace(H,or):t},Nr.uniqueId=function(t){var e=++Tt;return mu(t)+e},Nr.upperCase=Ku,Nr.upperFirst=$u,Nr.each=ma,Nr.eachRight=ba,Nr.first=Vo,us(Nr,(ys={},mn(Nr,(function(t,e){Rt.call(Nr.prototype,e)||(ys[e]=t)})),ys),{chain:!1}),Nr.VERSION="4.17.15",be(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Nr[t].placeholder=Nr})),be(["drop","take"],(function(t,e){Ir.prototype[t]=function(r){r=r===i?1:gr(pu(r),0);var n=this.__filtered__&&!e?new Ir(this):this.clone();return n.__filtered__?n.__takeCount__=vr(r,n.__takeCount__):n.__views__.push({size:vr(r,f),type:t+(n.__dir__<0?"Right":"")}),n},Ir.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),be(["filter","map","takeWhile"],(function(t,e){var r=e+1,n=1==r||3==r;Ir.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:oo(t,3),type:r}),e.__filtered__=e.__filtered__||n,e}})),be(["head","last"],(function(t,e){var r="take"+(e?"Right":"");Ir.prototype[t]=function(){return this[r](1).value()[0]}})),be(["initial","tail"],(function(t,e){var r="drop"+(e?"":"Right");Ir.prototype[t]=function(){return this.__filtered__?new Ir(this):this[r](1)}})),Ir.prototype.compact=function(){return this.filter(ns)},Ir.prototype.find=function(t){return this.filter(t).head()},Ir.prototype.findLast=function(t){return this.reverse().find(t)},Ir.prototype.invokeMap=Zn((function(t,e){return"function"==typeof t?new Ir(this):this.map((function(r){return Sn(r,t,e)}))})),Ir.prototype.reject=function(t){return this.filter(Ta(oo(t)))},Ir.prototype.slice=function(t,e){t=pu(t);var r=this;return r.__filtered__&&(t>0||e<0)?new Ir(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),e!==i&&(r=(e=pu(e))<0?r.dropRight(-e):r.take(e-t)),r)},Ir.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Ir.prototype.toArray=function(){return this.take(f)},mn(Ir.prototype,(function(t,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),n=/^(?:head|last)$/.test(e),o=Nr[n?"take"+("last"==e?"Right":""):e],a=n||/^find/.test(e);o&&(Nr.prototype[e]=function(){var e=this.__wrapped__,u=n?[1]:arguments,s=e instanceof Ir,c=u[0],h=s||qa(e),l=function(t){var e=o.apply(Nr,ke([t],u));return n&&d?e[0]:e};h&&r&&"function"==typeof c&&1!=c.length&&(s=h=!1);var d=this.__chain__,f=!!this.__actions__.length,p=a&&!d,g=s&&!f;if(!a&&h){e=g?e:new Ir(this);var v=t.apply(e,u);return v.__actions__.push({func:fa,args:[l],thisArg:i}),new Ur(v,d)}return p&&g?t.apply(this,u):(v=this.thru(l),p?n?v.value()[0]:v.value():v)})})),be(["pop","push","shift","sort","splice","unshift"],(function(t){var e=Mt[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",n=/^(?:pop|shift)$/.test(t);Nr.prototype[t]=function(){var t=arguments;if(n&&!this.__chain__){var i=this.value();return e.apply(qa(i)?i:[],t)}return this[r]((function(r){return e.apply(qa(r)?r:[],t)}))}})),mn(Ir.prototype,(function(t,e){var r=Nr[e];if(r){var n=r.name+"";Rt.call(Sr,n)||(Sr[n]=[]),Sr[n].push({name:e,func:r})}})),Sr[Ni(i,2).name]=[{name:"wrapper",func:i}],Ir.prototype.clone=function(){var t=new Ir(this.__wrapped__);return t.__actions__=ki(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=ki(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=ki(this.__views__),t},Ir.prototype.reverse=function(){if(this.__filtered__){var t=new Ir(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Ir.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,r=qa(t),n=e<0,i=r?t.length:0,o=function(t,e,r){for(var n=-1,i=r.length;++n<i;){var o=r[n],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=vr(e,t+a);break;case"takeRight":t=gr(t,e-a)}}return{start:t,end:e}}(0,i,this.__views__),a=o.start,u=o.end,s=u-a,c=n?u:a-1,h=this.__iteratees__,l=h.length,d=0,f=vr(s,this.__takeCount__);if(!r||!n&&i==s&&f==s)return li(t,this.__actions__);var p=[];t:for(;s--&&d<f;){for(var g=-1,v=t[c+=e];++g<l;){var y=h[g],m=y.iteratee,b=y.type,w=m(v);if(2==b)v=w;else if(!w){if(1==b)continue t;break t}}p[d++]=v}return p},Nr.prototype.at=pa,Nr.prototype.chain=function(){return da(this)},Nr.prototype.commit=function(){return new Ur(this.value(),this.__chain__)},Nr.prototype.next=function(){this.__values__===i&&(this.__values__=du(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?i:this.__values__[this.__index__++]}},Nr.prototype.plant=function(t){for(var e,r=this;r instanceof zr;){var n=zo(r);n.__index__=0,n.__values__=i,e?o.__wrapped__=n:e=n;var o=n;r=r.__wrapped__}return o.__wrapped__=t,e},Nr.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Ir){var e=t;return this.__actions__.length&&(e=new Ir(this)),(e=e.reverse()).__actions__.push({func:fa,args:[ta],thisArg:i}),new Ur(e,this.__chain__)}return this.thru(ta)},Nr.prototype.toJSON=Nr.prototype.valueOf=Nr.prototype.value=function(){return li(this.__wrapped__,this.__actions__)},Nr.prototype.first=Nr.prototype.head,ue&&(Nr.prototype[ue]=function(){return this}),Nr}();oe._=ar,(n=function(){return ar}.call(e,r,e,t))===i||(t.exports=n)}.call(this)},64231:(t,e,r)=>{var n=r(32528),i=r(50535),o=r(3535),a=i.DEFAULT_COMPARATOR,u=i.reverseComparator;function s(t,e,r,n){for(var i,o,a=e[n];n>r&&t(a,o=e[i=n-1>>1])<0;)e[n]=o,n=i;e[n]=a}function c(t,e,r){for(var n,i=e.length,o=r,a=e[r],u=2*r+1;u<i;)(n=u+1)<i&&t(e[u],e[n])>=0&&(u=n),e[r]=e[u],u=2*(r=u)+1;e[r]=a,s(t,e,o,r)}function h(t,e,r){e.push(r),s(t,e,0,e.length-1)}function l(t,e){var r=e.pop();if(0!==e.length){var n=e[0];return e[0]=r,c(t,e,0),n}return r}function d(t,e,r){if(0===e.length)throw new Error("mnemonist/heap.replace: cannot pop an empty heap.");var n=e[0];return e[0]=r,c(t,e,0),n}function f(t,e,r){var n;return 0!==e.length&&t(e[0],r)<0&&(n=e[0],e[0]=r,r=n,c(t,e,0)),r}function p(t,e){for(var r=e.length>>1;--r>=0;)c(t,e,r)}function g(t,e){for(var r=e.length,n=0,i=new Array(r);n<r;)i[n++]=l(t,e);return i}function v(t){if(this.clear(),this.comparator=t||a,"function"!=typeof this.comparator)throw new Error("mnemonist/Heap.constructor: given comparator should be a function.")}function y(t){if(this.clear(),this.comparator=t||a,"function"!=typeof this.comparator)throw new Error("mnemonist/MaxHeap.constructor: given comparator should be a function.");this.comparator=u(this.comparator)}v.prototype.clear=function(){this.items=[],this.size=0},v.prototype.push=function(t){return h(this.comparator,this.items,t),++this.size},v.prototype.peek=function(){return this.items[0]},v.prototype.pop=function(){return 0!==this.size&&this.size--,l(this.comparator,this.items)},v.prototype.replace=function(t){return d(this.comparator,this.items,t)},v.prototype.pushpop=function(t){return f(this.comparator,this.items,t)},v.prototype.consume=function(){return this.size=0,g(this.comparator,this.items)},v.prototype.toArray=function(){return g(this.comparator,this.items.slice())},v.prototype.inspect=function(){var t=this.toArray();return Object.defineProperty(t,"constructor",{value:v,enumerable:!1}),t},"undefined"!=typeof Symbol&&(v.prototype[Symbol.for("nodejs.util.inspect.custom")]=v.prototype.inspect),y.prototype=v.prototype,v.from=function(t,e){var r,n=new v(e);return r=o.isArrayLike(t)?t.slice():o.toArray(t),p(n.comparator,r),n.items=r,n.size=r.length,n},y.from=function(t,e){var r,n=new y(e);return r=o.isArrayLike(t)?t.slice():o.toArray(t),p(n.comparator,r),n.items=r,n.size=r.length,n},v.siftUp=c,v.siftDown=s,v.push=h,v.pop=l,v.replace=d,v.pushpop=f,v.heapify=p,v.consume=g,v.nsmallest=function(t,e,r){2===arguments.length&&(r=e,e=t,t=a);var i,s,c,h,l=u(t),f=1/0;if(1===e){if(o.isArrayLike(r)){for(i=0,s=r.length;i<s;i++)c=r[i],(f===1/0||t(c,f)<0)&&(f=c);return(h=new r.constructor(1))[0]=f,h}return n(r,(function(e){(f===1/0||t(e,f)<0)&&(f=e)})),[f]}if(o.isArrayLike(r)){if(e>=r.length)return r.slice().sort(t);for(h=r.slice(0,e),p(l,h),i=e,s=r.length;i<s;i++)l(r[i],h[0])>0&&d(l,h,r[i]);return h.sort(t)}var g=o.guessLength(r);return null!==g&&g<e&&(e=g),h=new Array(e),i=0,n(r,(function(t){i<e?h[i]=t:(i===e&&p(l,h),l(t,h[0])>0&&d(l,h,t)),i++})),h.length>i&&(h.length=i),h.sort(t)},v.nlargest=function(t,e,r){2===arguments.length&&(r=e,e=t,t=a);var i,s,c,h,l=u(t),f=-1/0;if(1===e){if(o.isArrayLike(r)){for(i=0,s=r.length;i<s;i++)c=r[i],(f===-1/0||t(c,f)>0)&&(f=c);return(h=new r.constructor(1))[0]=f,h}return n(r,(function(e){(f===-1/0||t(e,f)>0)&&(f=e)})),[f]}if(o.isArrayLike(r)){if(e>=r.length)return r.slice().sort(l);for(h=r.slice(0,e),p(t,h),i=e,s=r.length;i<s;i++)t(r[i],h[0])>0&&d(t,h,r[i]);return h.sort(l)}var g=o.guessLength(r);return null!==g&&g<e&&(e=g),h=new Array(e),i=0,n(r,(function(r){i<e?h[i]=r:(i===e&&p(t,h),t(r,h[0])>0&&d(t,h,r)),i++})),h.length>i&&(h.length=i),h.sort(l)},v.MinHeap=v,v.MaxHeap=y,t.exports=v},4034:(t,e,r)=>{var n=r(68298),i=r(32528);function o(){this.clear()}o.prototype.clear=function(){this.items=[],this.offset=0,this.size=0},o.prototype.enqueue=function(t){return this.items.push(t),++this.size},o.prototype.dequeue=function(){if(this.size){var t=this.items[this.offset];return 2*++this.offset>=this.items.length&&(this.items=this.items.slice(this.offset),this.offset=0),this.size--,t}},o.prototype.peek=function(){if(this.size)return this.items[this.offset]},o.prototype.forEach=function(t,e){e=arguments.length>1?e:this;for(var r=this.offset,n=0,i=this.items.length;r<i;r++,n++)t.call(e,this.items[r],n,this)},o.prototype.toArray=function(){return this.items.slice(this.offset)},o.prototype.values=function(){var t=this.items,e=this.offset;return new n((function(){if(e>=t.length)return{done:!0};var r=t[e];return e++,{value:r,done:!1}}))},o.prototype.entries=function(){var t=this.items,e=this.offset,r=0;return new n((function(){if(e>=t.length)return{done:!0};var n=t[e];return e++,{value:[r++,n],done:!1}}))},"undefined"!=typeof Symbol&&(o.prototype[Symbol.iterator]=o.prototype.values),o.prototype.toString=function(){return this.toArray().join(",")},o.prototype.toJSON=function(){return this.toArray()},o.prototype.inspect=function(){var t=this.toArray();return Object.defineProperty(t,"constructor",{value:o,enumerable:!1}),t},"undefined"!=typeof Symbol&&(o.prototype[Symbol.for("nodejs.util.inspect.custom")]=o.prototype.inspect),o.from=function(t){var e=new o;return i(t,(function(t){e.enqueue(t)})),e},o.of=function(){return o.from(arguments)},t.exports=o},50535:(t,e)=>{e.DEFAULT_COMPARATOR=function(t,e){return t<e?-1:t>e?1:0},e.DEFAULT_REVERSE_COMPARATOR=function(t,e){return t<e?1:t>e?-1:0},e.reverseComparator=function(t){return function(e,r){return t(r,e)}},e.createTupleComparator=function(t){return 2===t?function(t,e){return t[0]<e[0]?-1:t[0]>e[0]?1:t[1]<e[1]?-1:t[1]>e[1]?1:0}:function(e,r){for(var n=0;n<t;){if(e[n]<r[n])return-1;if(e[n]>r[n])return 1;n++}return 0}}},3535:(t,e,r)=>{var n=r(32528),i=r(6023);function o(t){return"number"==typeof t.length?t.length:"number"==typeof t.size?t.size:void 0}e.isArrayLike=function(t){return Array.isArray(t)||i.isTypedArray(t)},e.guessLength=o,e.toArray=function(t){var e=o(t),r="number"==typeof e?new Array(e):[],i=0;return n(t,(function(t){r[i++]=t})),r},e.toArrayWithIndices=function(t){var e=o(t),r="number"==typeof e?i.getPointerArray(e):Array,a="number"==typeof e?new Array(e):[],u="number"==typeof e?new r(e):[],s=0;return n(t,(function(t){a[s]=t,u[s]=s++})),[a,u]}},6023:(t,e)=>{var r=Math.pow(2,8)-1,n=Math.pow(2,16)-1,i=Math.pow(2,32)-1,o=Math.pow(2,7)-1,a=Math.pow(2,15)-1,u=Math.pow(2,31)-1;e.getPointerArray=function(t){var e=t-1;if(e<=r)return Uint8Array;if(e<=n)return Uint16Array;if(e<=i)return Uint32Array;throw new Error("mnemonist: Pointer Array of size > 4294967295 is not supported.")},e.getSignedPointerArray=function(t){var e=t-1;return e<=o?Int8Array:e<=a?Int16Array:e<=u?Int32Array:Float64Array},e.getNumberType=function(t){return t===(0|t)?-1===Math.sign(t)?t<=127&&t>=-128?Int8Array:t<=32767&&t>=-32768?Int16Array:Int32Array:t<=255?Uint8Array:t<=65535?Uint16Array:Uint32Array:Float64Array};var s={Uint8Array:1,Int8Array:2,Uint16Array:3,Int16Array:4,Uint32Array:5,Int32Array:6,Float32Array:7,Float64Array:8};e.getMinimalRepresentation=function(t,r){var n,i,o,a,u,c=null,h=0;for(a=0,u=t.length;a<u;a++)o=r?r(t[a]):t[a],i=e.getNumberType(o),(n=s[i.name])>h&&(h=n,c=i);return c},e.isTypedArray=function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView(t)},e.concat=function(){var t,e,r,n=0;for(t=0,r=arguments.length;t<r;t++)n+=arguments[t].length;var i=new arguments[0].constructor(n);for(t=0,e=0;t<r;t++)i.set(arguments[t],e),e+=arguments[t].length;return i},e.indices=function(t){for(var r=new(e.getPointerArray(t))(t),n=0;n<t;n++)r[n]=n;return r}},32528:(t,e,r)=>{var n=r(24529),i=n.ARRAY_BUFFER_SUPPORT,o=n.SYMBOL_SUPPORT;t.exports=function(t,e){var r,n,a,u,s;if(!t)throw new Error("obliterator/forEach: invalid iterable.");if("function"!=typeof e)throw new Error("obliterator/forEach: expecting a callback.");if(Array.isArray(t)||i&&ArrayBuffer.isView(t)||"string"==typeof t||"[object Arguments]"===t.toString())for(a=0,u=t.length;a<u;a++)e(t[a],a);else if("function"!=typeof t.forEach)if(o&&Symbol.iterator in t&&"function"!=typeof t.next&&(t=t[Symbol.iterator]()),"function"!=typeof t.next)for(n in t)t.hasOwnProperty(n)&&e(t[n],n);else for(r=t,a=0;!0!==(s=r.next()).done;)e(s.value,a),a++;else t.forEach(e)}},68298:t=>{function e(t){if("function"!=typeof t)throw new Error("obliterator/iterator: expecting a function!");this.next=t}"undefined"!=typeof Symbol&&(e.prototype[Symbol.iterator]=function(){return this}),e.of=function(){var t=arguments,r=t.length,n=0;return new e((function(){return n>=r?{done:!0}:{done:!1,value:t[n++]}}))},e.empty=function(){return new e((function(){return{done:!0}}))},e.fromSequence=function(t){var r=0,n=t.length;return new e((function(){return r>=n?{done:!0}:{done:!1,value:t[r++]}}))},e.is=function(t){return t instanceof e||"object"==typeof t&&null!==t&&"function"==typeof t.next},t.exports=e},24529:(t,e)=>{e.ARRAY_BUFFER_SUPPORT="undefined"!=typeof ArrayBuffer,e.SYMBOL_SUPPORT="undefined"!=typeof Symbol},94835:t=>{function e(t){return function(e,r){return e+Math.floor(t()*(r-e+1))}}var r=e(Math.random);r.createRandom=e,t.exports=r},64341:(t,e,r)=>{var n=r(94835).createRandom;function i(t){var e=n(t);return function(t){for(var r=t.length,n=r-1,i=-1;++i<r;){var o=e(i,n),a=t[o];t[o]=t[i],t[i]=a}}}var o=i(Math.random);o.createShuffleInPlace=i,t.exports=o},31250:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=r(31181),u=o(r(2383)),s=r(88586),c=r(30432),h=1.5,l=function(t){function e(){var e=t.call(this)||this;return e.x=.5,e.y=.5,e.angle=0,e.ratio=1,e.minRatio=null,e.maxRatio=null,e.nextFrame=null,e.previousState=null,e.enabled=!0,e.previousState=e.getState(),e}return i(e,t),e.from=function(t){return(new e).setState(t)},e.prototype.enable=function(){return this.enabled=!0,this},e.prototype.disable=function(){return this.enabled=!1,this},e.prototype.getState=function(){return{x:this.x,y:this.y,angle:this.angle,ratio:this.ratio}},e.prototype.hasState=function(t){return this.x===t.x&&this.y===t.y&&this.ratio===t.ratio&&this.angle===t.angle},e.prototype.getPreviousState=function(){var t=this.previousState;return t?{x:t.x,y:t.y,angle:t.angle,ratio:t.ratio}:null},e.prototype.getBoundedRatio=function(t){var e=t;return"number"==typeof this.minRatio&&(e=Math.max(e,this.minRatio)),"number"==typeof this.maxRatio&&(e=Math.min(e,this.maxRatio)),e},e.prototype.validateState=function(t){var e={};return"number"==typeof t.x&&(e.x=t.x),"number"==typeof t.y&&(e.y=t.y),"number"==typeof t.angle&&(e.angle=t.angle),"number"==typeof t.ratio&&(e.ratio=this.getBoundedRatio(t.ratio)),e},e.prototype.isAnimated=function(){return!!this.nextFrame},e.prototype.setState=function(t){if(!this.enabled)return this;this.previousState=this.getState();var e=this.validateState(t);return"number"==typeof e.x&&(this.x=e.x),"number"==typeof e.y&&(this.y=e.y),"number"==typeof e.angle&&(this.angle=e.angle),"number"==typeof e.ratio&&(this.ratio=e.ratio),this.hasState(this.previousState)||this.emit("updated",this.getState()),this},e.prototype.updateState=function(t){return this.setState(t(this.getState())),this},e.prototype.animate=function(t,e,r){var n=this;if(this.enabled){var i=Object.assign({},a.ANIMATE_DEFAULTS,e),o=this.validateState(t),c="function"==typeof i.easing?i.easing:u.default[i.easing],h=Date.now(),l=this.getState(),d=function(){var t=(Date.now()-h)/i.duration;if(t>=1)return n.nextFrame=null,n.setState(o),void(n.animationCallback&&(n.animationCallback.call(null),n.animationCallback=void 0));var e=c(t),r={};"number"==typeof o.x&&(r.x=l.x+(o.x-l.x)*e),"number"==typeof o.y&&(r.y=l.y+(o.y-l.y)*e),"number"==typeof o.angle&&(r.angle=l.angle+(o.angle-l.angle)*e),"number"==typeof o.ratio&&(r.ratio=l.ratio+(o.ratio-l.ratio)*e),n.setState(r),n.nextFrame=(0,s.requestFrame)(d)};this.nextFrame?((0,s.cancelFrame)(this.nextFrame),this.animationCallback&&this.animationCallback.call(null),this.nextFrame=(0,s.requestFrame)(d)):d(),this.animationCallback=r}},e.prototype.animatedZoom=function(t){if(t){if("number"==typeof t)return this.animate({ratio:this.ratio/t});this.animate({ratio:this.ratio/(t.factor||h)},t)}else this.animate({ratio:this.ratio/h})},e.prototype.animatedUnzoom=function(t){if(t){if("number"==typeof t)return this.animate({ratio:this.ratio*t});this.animate({ratio:this.ratio*(t.factor||h)},t)}else this.animate({ratio:this.ratio*h})},e.prototype.animatedReset=function(t){this.animate({x:.5,y:.5,ratio:1,angle:0},t)},e.prototype.copy=function(){return e.from(this.getState())},e}(c.TypedEventEmitter);e.default=l},48231:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__assign||function(){return o=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},o.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.getWheelDelta=e.getTouchCoords=e.getTouchesArray=e.getWheelCoords=e.getMouseCoords=e.getPosition=void 0;var a=r(30432);function u(t,e){var r=e.getBoundingClientRect();return{x:t.clientX-r.left,y:t.clientY-r.top}}function s(t,e){var r=o(o({},u(t,e)),{sigmaDefaultPrevented:!1,preventSigmaDefault:function(){r.sigmaDefaultPrevented=!0},original:t});return r}function c(t){for(var e=[],r=0,n=Math.min(t.length,2);r<n;r++)e.push(t[r]);return e}function h(t){if(void 0!==t.deltaY)return-3*t.deltaY/360;if(void 0!==t.detail)return t.detail/-9;throw new Error("Captor: could not extract delta from event.")}e.getPosition=u,e.getMouseCoords=s,e.getWheelCoords=function(t,e){return o(o({},s(t,e)),{delta:h(t)})},e.getTouchesArray=c,e.getTouchCoords=function(t,e){return{touches:c(t.touches).map((function(t){return u(t,e)})),original:t}},e.getWheelDelta=h;var l=function(t){function e(e,r){var n=t.call(this)||this;return n.container=e,n.renderer=r,n}return i(e,t),e}(a.TypedEventEmitter);e.default=l},73834:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),a=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),u=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&o(e,t,r);return a(e,t),e};Object.defineProperty(e,"__esModule",{value:!0});var s=u(r(48231)),c=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.enabled=!0,n.draggedEvents=0,n.downStartTime=null,n.lastMouseX=null,n.lastMouseY=null,n.isMouseDown=!1,n.isMoving=!1,n.movingTimeout=null,n.startCameraState=null,n.clicks=0,n.doubleClickTimeout=null,n.currentWheelDirection=0,n.handleClick=n.handleClick.bind(n),n.handleRightClick=n.handleRightClick.bind(n),n.handleDown=n.handleDown.bind(n),n.handleUp=n.handleUp.bind(n),n.handleMove=n.handleMove.bind(n),n.handleWheel=n.handleWheel.bind(n),n.handleOut=n.handleOut.bind(n),e.addEventListener("click",n.handleClick,!1),e.addEventListener("contextmenu",n.handleRightClick,!1),e.addEventListener("mousedown",n.handleDown,!1),e.addEventListener("wheel",n.handleWheel,!1),e.addEventListener("mouseout",n.handleOut,!1),document.addEventListener("mousemove",n.handleMove,!1),document.addEventListener("mouseup",n.handleUp,!1),n}return i(e,t),e.prototype.kill=function(){var t=this.container;t.removeEventListener("click",this.handleClick),t.removeEventListener("contextmenu",this.handleRightClick),t.removeEventListener("mousedown",this.handleDown),t.removeEventListener("wheel",this.handleWheel),t.removeEventListener("mouseout",this.handleOut),document.removeEventListener("mousemove",this.handleMove),document.removeEventListener("mouseup",this.handleUp)},e.prototype.handleClick=function(t){var e=this;if(this.enabled){if(this.clicks++,2===this.clicks)return this.clicks=0,"number"==typeof this.doubleClickTimeout&&(clearTimeout(this.doubleClickTimeout),this.doubleClickTimeout=null),this.handleDoubleClick(t);setTimeout((function(){e.clicks=0,e.doubleClickTimeout=null}),300),this.draggedEvents<3&&this.emit("click",(0,s.getMouseCoords)(t,this.container))}},e.prototype.handleRightClick=function(t){this.enabled&&this.emit("rightClick",(0,s.getMouseCoords)(t,this.container))},e.prototype.handleDoubleClick=function(t){if(this.enabled){t.preventDefault(),t.stopPropagation();var e=(0,s.getMouseCoords)(t,this.container);if(this.emit("doubleClick",e),!e.sigmaDefaultPrevented){var r=this.renderer.getCamera(),n=r.getBoundedRatio(r.getState().ratio/2.2);r.animate(this.renderer.getViewportZoomedState((0,s.getPosition)(t,this.container),n),{easing:"quadraticInOut",duration:200})}}},e.prototype.handleDown=function(t){if(this.enabled){if(0===t.button){this.startCameraState=this.renderer.getCamera().getState();var e=(0,s.getPosition)(t,this.container),r=e.x,n=e.y;this.lastMouseX=r,this.lastMouseY=n,this.draggedEvents=0,this.downStartTime=Date.now(),this.isMouseDown=!0}this.emit("mousedown",(0,s.getMouseCoords)(t,this.container))}},e.prototype.handleUp=function(t){var e=this;if(this.enabled&&this.isMouseDown){var r=this.renderer.getCamera();this.isMouseDown=!1,"number"==typeof this.movingTimeout&&(clearTimeout(this.movingTimeout),this.movingTimeout=null);var n=(0,s.getPosition)(t,this.container),i=n.x,o=n.y,a=r.getState(),u=r.getPreviousState()||{x:0,y:0};this.isMoving?r.animate({x:a.x+3*(a.x-u.x),y:a.y+3*(a.y-u.y)},{duration:200,easing:"quadraticOut"}):this.lastMouseX===i&&this.lastMouseY===o||r.setState({x:a.x,y:a.y}),this.isMoving=!1,setTimeout((function(){e.draggedEvents=0,e.renderer.refresh()}),0),this.emit("mouseup",(0,s.getMouseCoords)(t,this.container))}},e.prototype.handleMove=function(t){var e=this;if(this.enabled){var r=(0,s.getMouseCoords)(t,this.container);if(this.emit("mousemovebody",r),t.target===this.container&&this.emit("mousemove",r),!r.sigmaDefaultPrevented&&this.isMouseDown){this.isMoving=!0,this.draggedEvents++,"number"==typeof this.movingTimeout&&clearTimeout(this.movingTimeout),this.movingTimeout=window.setTimeout((function(){e.movingTimeout=null,e.isMoving=!1}),100);var n=this.renderer.getCamera(),i=(0,s.getPosition)(t,this.container),o=i.x,a=i.y,u=this.renderer.viewportToFramedGraph({x:this.lastMouseX,y:this.lastMouseY}),c=this.renderer.viewportToFramedGraph({x:o,y:a}),h=u.x-c.x,l=u.y-c.y,d=n.getState(),f=d.x+h,p=d.y+l;n.setState({x:f,y:p}),this.lastMouseX=o,this.lastMouseY=a,t.preventDefault(),t.stopPropagation()}}},e.prototype.handleWheel=function(t){var e=this;if(this.enabled){t.preventDefault(),t.stopPropagation();var r=(0,s.getWheelDelta)(t);if(r){var n=(0,s.getWheelCoords)(t,this.container);if(this.emit("wheel",n),!n.sigmaDefaultPrevented){var i=r>0?1/1.7:1.7,o=this.renderer.getCamera(),a=o.getBoundedRatio(o.getState().ratio*i),u=r>0?1:-1,c=Date.now();this.currentWheelDirection===u&&this.lastWheelTriggerTime&&c-this.lastWheelTriggerTime<50||(o.animate(this.renderer.getViewportZoomedState((0,s.getPosition)(t,this.container),a),{easing:"quadraticOut",duration:250},(function(){e.currentWheelDirection=0})),this.currentWheelDirection=u,this.lastWheelTriggerTime=c)}}}},e.prototype.handleOut=function(){},e}(s.default);e.default=c},40916:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),a=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),u=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&o(e,t,r);return a(e,t),e},s=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a};Object.defineProperty(e,"__esModule",{value:!0});var c=u(r(48231)),h=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.enabled=!0,n.isMoving=!1,n.hasMoved=!1,n.touchMode=0,n.startTouchesPositions=[],n.handleStart=n.handleStart.bind(n),n.handleLeave=n.handleLeave.bind(n),n.handleMove=n.handleMove.bind(n),e.addEventListener("touchstart",n.handleStart,!1),e.addEventListener("touchend",n.handleLeave,!1),e.addEventListener("touchcancel",n.handleLeave,!1),e.addEventListener("touchmove",n.handleMove,!1),n}return i(e,t),e.prototype.kill=function(){var t=this.container;t.removeEventListener("touchstart",this.handleStart),t.removeEventListener("touchend",this.handleLeave),t.removeEventListener("touchcancel",this.handleLeave),t.removeEventListener("touchmove",this.handleMove)},e.prototype.getDimensions=function(){return{width:this.container.offsetWidth,height:this.container.offsetHeight}},e.prototype.dispatchRelatedMouseEvent=function(t,e,r,n){var i=r||e.touches[0],o=new MouseEvent(t,{clientX:i.clientX,clientY:i.clientY,altKey:e.altKey,ctrlKey:e.ctrlKey});o.isFakeSigmaMouseEvent=!0,(n||this.container).dispatchEvent(o)},e.prototype.handleStart=function(t){var e=this;if(this.enabled){t.preventDefault(),1===t.touches.length&&this.dispatchRelatedMouseEvent("mousedown",t);var r=(0,c.getTouchesArray)(t.touches);if(this.touchMode=r.length,this.startCameraState=this.renderer.getCamera().getState(),this.startTouchesPositions=r.map((function(t){return(0,c.getPosition)(t,e.container)})),this.lastTouches=r,this.lastTouchesPositions=this.startTouchesPositions,2===this.touchMode){var n=s(this.startTouchesPositions,2),i=n[0],o=i.x,a=i.y,u=n[1],h=u.x,l=u.y;this.startTouchesAngle=Math.atan2(l-a,h-o),this.startTouchesDistance=Math.sqrt(Math.pow(h-o,2)+Math.pow(l-a,2))}this.emit("touchdown",(0,c.getTouchCoords)(t,this.container))}},e.prototype.handleLeave=function(t){if(this.enabled){switch(t.preventDefault(),0===t.touches.length&&this.lastTouches&&this.lastTouches.length&&(this.dispatchRelatedMouseEvent("mouseup",t,this.lastTouches[0],document),this.hasMoved||this.dispatchRelatedMouseEvent("click",t,this.lastTouches[0])),this.movingTimeout&&(this.isMoving=!1,clearTimeout(this.movingTimeout)),this.touchMode){case 2:if(1===t.touches.length){this.handleStart(t),t.preventDefault();break}case 1:if(this.isMoving){var e=this.renderer.getCamera(),r=e.getState(),n=e.getPreviousState()||{x:0,y:0};e.animate({x:r.x+3*(r.x-n.x),y:r.y+3*(r.y-n.y)},{duration:200,easing:"quadraticOut"})}this.hasMoved=!1,this.isMoving=!1,this.touchMode=0}this.emit("touchup",(0,c.getTouchCoords)(t,this.container))}},e.prototype.handleMove=function(t){var e,r=this;if(this.enabled){t.preventDefault(),1===t.touches.length&&this.dispatchRelatedMouseEvent("mousemove",t);var n=(0,c.getTouchesArray)(t.touches),i=n.map((function(t){return(0,c.getPosition)(t,r.container)}));if(this.lastTouches=n,this.lastTouchesPositions=i,this.hasMoved||(this.hasMoved=i.some((function(t,e){var n=r.startTouchesPositions[e];return t.x!==n.x||t.y!==n.y}))),this.hasMoved){this.isMoving=!0,this.movingTimeout&&clearTimeout(this.movingTimeout),this.movingTimeout=window.setTimeout((function(){r.isMoving=!1}),200);var o=this.renderer.getCamera(),a=this.startCameraState;switch(this.touchMode){case 1:var u=this.renderer.viewportToFramedGraph((this.startTouchesPositions||[])[0]),h=u.x,l=u.y,d=this.renderer.viewportToFramedGraph(i[0]),f=d.x,p=d.y;o.setState({x:a.x+h-f,y:a.y+l-p});break;case 2:var g={},v=i[0],y=v.x,m=v.y,b=i[1],w=b.x,_=b.y,x=Math.atan2(_-m,w-y)-this.startTouchesAngle,E=Math.hypot(_-m,w-y)/this.startTouchesDistance,A=o.getBoundedRatio(a.ratio/E);g.ratio=A,g.angle=a.angle+x;var L=this.getDimensions(),k=this.renderer.viewportToFramedGraph((this.startTouchesPositions||[])[0],{cameraState:a}),C=Math.min(L.width,L.height),S=C/L.width,M=A/C;p=m-C/2/(C/L.height),f=(e=s([(f=y-C/2/S)*Math.cos(-g.angle)-p*Math.sin(-g.angle),p*Math.cos(-g.angle)+f*Math.sin(-g.angle)],2))[0],p=e[1],g.x=k.x-f*M,g.y=k.y+p*M,o.setState(g)}this.emit("touchmove",(0,c.getTouchCoords)(t,this.container))}}},e}(c.default);e.default=h},2306:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.edgeLabelsToDisplayFromNodes=e.LabelGrid=void 0;var r=function(){function t(t,e){this.key=t,this.size=e}return t.compare=function(t,e){return t.size>e.size?-1:t.size<e.size||t.key>e.key?1:-1},t}(),n=function(){function t(){this.width=0,this.height=0,this.cellSize=0,this.columns=0,this.rows=0,this.cells={}}return t.prototype.resizeAndClear=function(t,e){this.width=t.width,this.height=t.height,this.cellSize=e,this.columns=Math.ceil(t.width/e),this.rows=Math.ceil(t.height/e),this.cells={}},t.prototype.getIndex=function(t){var e=Math.floor(t.x/this.cellSize);return Math.floor(t.y/this.cellSize)*this.columns+e},t.prototype.add=function(t,e,n){var i=new r(t,e),o=this.getIndex(n),a=this.cells[o];a||(a=[],this.cells[o]=a),a.push(i)},t.prototype.organize=function(){for(var t in this.cells)this.cells[t].sort(r.compare)},t.prototype.getLabelsToDisplay=function(t,e){var r=this.cellSize*this.cellSize,n=r/t/t*e/r,i=Math.ceil(n),o=[];for(var a in this.cells)for(var u=this.cells[a],s=0;s<Math.min(i,u.length);s++)o.push(u[s].key);return o},t}();e.LabelGrid=n,e.edgeLabelsToDisplayFromNodes=function(t){var e=t.graph,r=t.hoveredNode,n=t.highlightedNodes,i=t.displayedNodeLabels,o=[];return e.forEachEdge((function(t,e,a,u){(a===r||u===r||n.has(a)||n.has(u)||i.has(a)&&i.has(u))&&o.push(t)})),o}},39316:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.rectangleCollidesWithQuad=e.squareCollidesWithQuad=e.getCircumscribedAlignedRectangle=e.isRectangleAligned=void 0;var i=n(r(8884)),o=!1;function a(t){return t.x1===t.x2||t.y1===t.y2}function u(t){var e=Math.sqrt(Math.pow(t.x2-t.x1,2)+Math.pow(t.y2-t.y1,2)),r=(t.y1-t.y2)*t.height/e,n=(t.x2-t.x1)*t.height/e,i={x:t.x1,y:t.y1},o={x:t.x2,y:t.y2},a={x:t.x1+r,y:t.y1+n},u={x:t.x2+r,y:t.y2+n},s=Math.min(i.x,o.x,a.x,u.x),c=Math.max(i.x,o.x,a.x,u.x),h=Math.min(i.y,o.y,a.y,u.y);return{x1:s,y1:h,x2:c,y2:h,height:Math.max(i.y,o.y,a.y,u.y)-h}}function s(t,e,r,n,i,o,a){return t<n+o&&t+r>n&&e<i+a&&e+r>i}function c(t,e,r,n,i,o,a,u){return t<i+a&&t+r>i&&e<o+u&&e+n>o}function h(t,e,r,n,i,o){var a=t<r+i/2;return e<n+o/2?a?1:2:a?3:4}e.isRectangleAligned=a,e.getCircumscribedAlignedRectangle=u,e.squareCollidesWithQuad=s,e.rectangleCollidesWithQuad=c;var l=function(){function t(t){var e;void 0===t&&(t={}),this.containers=((e={})[5460]=[],e),this.cache=null,this.lastRectangle=null;var r=Math.pow(4,5);this.data=new Float32Array((4*r-1)/3*4),t.boundaries?this.resize(t.boundaries):this.resize({x:0,y:0,width:1,height:1})}return t.prototype.add=function(t,e,r,n){return function(t,e,r,n,i,a,u){for(var c=i-u,h=a-u,l=2*u,d=0,f=0;;){if(d>=5)return r[f]=r[f]||[],void r[f].push(n);var p=4*f+4,g=4*f+8,v=4*f+12,y=4*f+16,m=s(c,h,l,e[p+0],e[p+1],e[p+2],e[p+3]),b=s(c,h,l,e[g+0],e[g+1],e[g+2],e[g+3]),w=s(c,h,l,e[v+0],e[v+1],e[v+2],e[v+3]),_=s(c,h,l,e[y+0],e[y+1],e[y+2],e[y+3]),x=[m,b,w,_].reduce((function(t,e){return e?t+1:t}),0);if(0===x&&0===d)return r[5460].push(n),void(!o&&r[5460].length>=5&&(o=!0,console.warn("sigma/quadtree.insertNode: At least 5 nodes are outside the global quadtree zone. You might have a problem with the normalization function or the custom bounding box.")));if(0===x)throw new Error("sigma/quadtree.insertNode: no collision (level: ".concat(d,", key: ").concat(n,", x: ").concat(i,", y: ").concat(a,", size: ").concat(u,")."));if(3===x)throw new Error("sigma/quadtree.insertNode: 3 impossible collisions (level: ".concat(d,", key: ").concat(n,", x: ").concat(i,", y: ").concat(a,", size: ").concat(u,")."));if(x>1)return r[f]=r[f]||[],void r[f].push(n);d++,m&&(f=p),b&&(f=g),w&&(f=v),_&&(f=y)}}(0,this.data,this.containers,t,e,r,n),this},t.prototype.resize=function(t){this.clear(),this.data[0]=t.x,this.data[1]=t.y,this.data[2]=t.width,this.data[3]=t.height,function(t,e){for(var r=[0,0];r.length;){var n=r.pop(),i=r.pop(),o=4*i+4,a=4*i+8,u=4*i+12,s=4*i+16,c=e[i+0],h=e[i+1],l=e[i+2]/2,d=e[i+3]/2;e[o+0]=c,e[o+1]=h,e[o+2]=l,e[o+3]=d,e[a+0]=c+l,e[a+1]=h,e[a+2]=l,e[a+3]=d,e[u+0]=c,e[u+1]=h+d,e[u+2]=l,e[u+3]=d,e[s+0]=c+l,e[s+1]=h+d,e[s+2]=l,e[s+3]=d,n<4&&(r.push(s,n+1),r.push(u,n+1),r.push(a,n+1),r.push(o,n+1))}}(0,this.data)},t.prototype.clear=function(){var t;return this.containers=((t={})[5460]=[],t),this},t.prototype.point=function(t,e){var r=this.containers[5460].slice(),n=0,o=0;do{this.containers[n]&&(0,i.default)(r,this.containers[n]),n=4*n+4*h(t,e,this.data[n+0],this.data[n+1],this.data[n+2],this.data[n+3]),o++}while(o<=5);return r},t.prototype.rectangle=function(t,e,r,n,o){var s=this.lastRectangle;return s&&t===s.x1&&r===s.x2&&e===s.y1&&n===s.y2&&o===s.height||(this.lastRectangle={x1:t,y1:e,x2:r,y2:n,height:o},a(this.lastRectangle)||(this.lastRectangle=u(this.lastRectangle)),this.cache=function(t,e,r,n,o,a,u){for(var s,h=[0,0],l=[];h.length;){var d=h.pop(),f=h.pop();if((s=r[f])&&(0,i.default)(l,s),!(d>=5)){var p=4*f+4,g=4*f+8,v=4*f+12,y=4*f+16,m=c(n,o,a,u,e[p+0],e[p+1],e[p+2],e[p+3]),b=c(n,o,a,u,e[g+0],e[g+1],e[g+2],e[g+3]),w=c(n,o,a,u,e[v+0],e[v+1],e[v+2],e[v+3]),_=c(n,o,a,u,e[y+0],e[y+1],e[y+2],e[y+3]);m&&h.push(p,d+1),b&&h.push(g,d+1),w&&h.push(v,d+1),_&&h.push(y,d+1)}}return l}(0,this.data,this.containers,t,e,Math.abs(t-r)||Math.abs(e-n),o),(0,i.default)(this.cache,this.containers[5460])),this.cache},t}();e.default=l},49358:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Sigma=e.MouseCaptor=e.QuadTree=e.Camera=void 0;var i=n(r(38953));e.Sigma=i.default;var o=n(r(31250));e.Camera=o.default;var a=n(r(39316));e.QuadTree=a.default;var u=n(r(73834));e.MouseCaptor=u.default,e.default=i.default},30284:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,r,n,i){var o=i.edgeLabelSize,a=i.edgeLabelFont,u=i.edgeLabelWeight,s=i.edgeLabelColor.attribute?e[i.edgeLabelColor.attribute]||i.edgeLabelColor.color||"#000":i.edgeLabelColor.color,c=e.label;if(c){t.fillStyle=s,t.font="".concat(u," ").concat(o,"px ").concat(a);var h,l,d=r.size,f=n.size,p=r.x,g=r.y,v=n.x,y=n.y,m=v-p,b=y-g,w=Math.sqrt(m*m+b*b);if(!(w<d+f)){h=((p+=m*d/w)+(v-=m*f/w))/2,l=((g+=b*d/w)+(y-=b*f/w))/2,m=v-p,b=y-g,w=Math.sqrt(m*m+b*b);var _,x=t.measureText(c).width;if(x>w){for(c+="…",x=t.measureText(c).width;x>w&&c.length>1;)c=c.slice(0,-2)+"…",x=t.measureText(c).width;if(c.length<4)return}_=m>0?b>0?Math.acos(m/w):Math.asin(b/w):b>0?Math.acos(m/w)+Math.PI:Math.asin(m/w)+Math.PI/2,t.save(),t.translate(h,l),t.rotate(_),t.fillText(c,-x/2,e.size/2+o),t.restore()}}}},64362:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(r(12193));e.default=function(t,e,r){var n=r.labelSize,o=r.labelFont,a=r.labelWeight;if(t.font="".concat(a," ").concat(n,"px ").concat(o),t.fillStyle="#FFF",t.shadowOffsetX=0,t.shadowOffsetY=0,t.shadowBlur=8,t.shadowColor="#000","string"==typeof e.label){var u=t.measureText(e.label).width,s=Math.round(u+5),c=Math.round(n+4),h=Math.max(e.size,n/2)+2,l=Math.asin(c/2/h),d=Math.sqrt(Math.abs(Math.pow(h,2)-Math.pow(c/2,2)));t.beginPath(),t.moveTo(e.x+d,e.y+c/2),t.lineTo(e.x+h+s,e.y+c/2),t.lineTo(e.x+h+s,e.y-c/2),t.lineTo(e.x+d,e.y-c/2),t.arc(e.x,e.y,h,l,-l),t.closePath(),t.fill()}else t.beginPath(),t.arc(e.x,e.y,e.size+2,0,2*Math.PI),t.closePath(),t.fill();t.shadowOffsetX=0,t.shadowOffsetY=0,t.shadowBlur=0,(0,i.default)(t,e,r)}},12193:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,r){if(e.label){var n=r.labelSize,i=r.labelFont,o=r.labelWeight,a=r.labelColor.attribute?e[r.labelColor.attribute]||r.labelColor.color||"#000":r.labelColor.color;t.fillStyle=a,t.font="".concat(o," ").concat(n,"px ").concat(i),t.fillText(e.label,e.x+e.size+3,e.y+n/3)}}},64488:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.createEdgeCompoundProgram=e.AbstractEdgeProgram=void 0;var o=function(t){function e(e,r,n,i,o){return t.call(this,e,r,n,i,o)||this}return i(e,t),e}(r(71549).AbstractProgram);e.AbstractEdgeProgram=o,e.createEdgeCompoundProgram=function(t){return function(){function e(e,r){this.programs=t.map((function(t){return new t(e,r)}))}return e.prototype.bufferData=function(){this.programs.forEach((function(t){return t.bufferData()}))},e.prototype.allocate=function(t){this.programs.forEach((function(e){return e.allocate(t)}))},e.prototype.bind=function(){},e.prototype.computeIndices=function(){this.programs.forEach((function(t){return t.computeIndices()}))},e.prototype.render=function(t){this.programs.forEach((function(e){e.bind(),e.bufferData(),e.render(t)}))},e.prototype.process=function(t,e,r,n,i){this.programs.forEach((function(o){return o.process(t,e,r,n,i)}))},e}()}},23304:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.createNodeCompoundProgram=e.AbstractNodeProgram=void 0;var o=function(t){function e(e,r,n,i,o){var a=t.call(this,e,r,n,i,o)||this;a.positionLocation=e.getAttribLocation(a.program,"a_position"),a.sizeLocation=e.getAttribLocation(a.program,"a_size"),a.colorLocation=e.getAttribLocation(a.program,"a_color");var u=e.getUniformLocation(a.program,"u_matrix");if(null===u)throw new Error("AbstractNodeProgram: error while getting matrixLocation");a.matrixLocation=u;var s=e.getUniformLocation(a.program,"u_ratio");if(null===s)throw new Error("AbstractNodeProgram: error while getting ratioLocation");a.ratioLocation=s;var c=e.getUniformLocation(a.program,"u_scale");if(null===c)throw new Error("AbstractNodeProgram: error while getting scaleLocation");return a.scaleLocation=c,a}return i(e,t),e.prototype.bind=function(){var t=this.gl;t.enableVertexAttribArray(this.positionLocation),t.enableVertexAttribArray(this.sizeLocation),t.enableVertexAttribArray(this.colorLocation),t.vertexAttribPointer(this.positionLocation,2,t.FLOAT,!1,this.attributes*Float32Array.BYTES_PER_ELEMENT,0),t.vertexAttribPointer(this.sizeLocation,1,t.FLOAT,!1,this.attributes*Float32Array.BYTES_PER_ELEMENT,8),t.vertexAttribPointer(this.colorLocation,4,t.UNSIGNED_BYTE,!0,this.attributes*Float32Array.BYTES_PER_ELEMENT,12)},e}(r(71549).AbstractProgram);e.AbstractNodeProgram=o,e.createNodeCompoundProgram=function(t){return function(){function e(e,r){this.programs=t.map((function(t){return new t(e,r)}))}return e.prototype.bufferData=function(){this.programs.forEach((function(t){return t.bufferData()}))},e.prototype.allocate=function(t){this.programs.forEach((function(e){return e.allocate(t)}))},e.prototype.bind=function(){},e.prototype.render=function(t){this.programs.forEach((function(e){e.bind(),e.bufferData(),e.render(t)}))},e.prototype.process=function(t,e,r){this.programs.forEach((function(n){return n.process(t,e,r)}))},e}()}},71549:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractProgram=void 0;var n=r(83451),i=function(){function t(t,e,r,i,o){this.array=new Float32Array,this.points=i,this.attributes=o,this.gl=t,this.vertexShaderSource=e,this.fragmentShaderSource=r;var a=t.createBuffer();if(null===a)throw new Error("AbstractProgram: error while creating the buffer");this.buffer=a,t.bindBuffer(t.ARRAY_BUFFER,this.buffer),this.vertexShader=(0,n.loadVertexShader)(t,this.vertexShaderSource),this.fragmentShader=(0,n.loadFragmentShader)(t,this.fragmentShaderSource),this.program=(0,n.loadProgram)(t,[this.vertexShader,this.fragmentShader])}return t.prototype.bufferData=function(){var t=this.gl;t.bufferData(t.ARRAY_BUFFER,this.array,t.DYNAMIC_DRAW)},t.prototype.allocate=function(t){this.array=new Float32Array(this.points*this.attributes*t)},t.prototype.hasNothingToRender=function(){return 0===this.array.length},t}();e.AbstractProgram=i},65696:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(64488),o=n(r(23193)),a=n(r(83653)),u=(0,i.createEdgeCompoundProgram)([a.default,o.default]);e.default=u},23193:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=r(88586),u=o(r(50577)),s=o(r(91604)),c=function(t){function e(e){var r=t.call(this,e,u.default,s.default,3,9)||this;r.positionLocation=e.getAttribLocation(r.program,"a_position"),r.colorLocation=e.getAttribLocation(r.program,"a_color"),r.normalLocation=e.getAttribLocation(r.program,"a_normal"),r.radiusLocation=e.getAttribLocation(r.program,"a_radius"),r.barycentricLocation=e.getAttribLocation(r.program,"a_barycentric");var n=e.getUniformLocation(r.program,"u_matrix");if(null===n)throw new Error("EdgeArrowHeadProgram: error while getting matrixLocation");r.matrixLocation=n;var i=e.getUniformLocation(r.program,"u_sqrtZoomRatio");if(null===i)throw new Error("EdgeArrowHeadProgram: error while getting sqrtZoomRatioLocation");r.sqrtZoomRatioLocation=i;var o=e.getUniformLocation(r.program,"u_correctionRatio");if(null===o)throw new Error("EdgeArrowHeadProgram: error while getting correctionRatioLocation");return r.correctionRatioLocation=o,r.bind(),r}return i(e,t),e.prototype.bind=function(){var t=this.gl;t.enableVertexAttribArray(this.positionLocation),t.enableVertexAttribArray(this.normalLocation),t.enableVertexAttribArray(this.radiusLocation),t.enableVertexAttribArray(this.colorLocation),t.enableVertexAttribArray(this.barycentricLocation),t.vertexAttribPointer(this.positionLocation,2,t.FLOAT,!1,9*Float32Array.BYTES_PER_ELEMENT,0),t.vertexAttribPointer(this.normalLocation,2,t.FLOAT,!1,9*Float32Array.BYTES_PER_ELEMENT,8),t.vertexAttribPointer(this.radiusLocation,1,t.FLOAT,!1,9*Float32Array.BYTES_PER_ELEMENT,16),t.vertexAttribPointer(this.colorLocation,4,t.UNSIGNED_BYTE,!0,9*Float32Array.BYTES_PER_ELEMENT,20),t.vertexAttribPointer(this.barycentricLocation,3,t.FLOAT,!1,9*Float32Array.BYTES_PER_ELEMENT,24)},e.prototype.computeIndices=function(){},e.prototype.process=function(t,e,r,n,i){if(n)for(var o=27*i,u=o+27;o<u;o++)this.array[o]=0;else{var s=r.size||1,c=e.size||1,h=t.x,l=t.y,d=e.x,f=e.y,p=(0,a.floatColor)(r.color),g=d-h,v=f-l,y=g*g+v*v,m=0,b=0;y&&(m=-v*(y=1/Math.sqrt(y))*s,b=g*y*s);var w=27*i,_=this.array;_[w++]=d,_[w++]=f,_[w++]=-m,_[w++]=-b,_[w++]=c,_[w++]=p,_[w++]=1,_[w++]=0,_[w++]=0,_[w++]=d,_[w++]=f,_[w++]=-m,_[w++]=-b,_[w++]=c,_[w++]=p,_[w++]=0,_[w++]=1,_[w++]=0,_[w++]=d,_[w++]=f,_[w++]=-m,_[w++]=-b,_[w++]=c,_[w++]=p,_[w++]=0,_[w++]=0,_[w]=1}},e.prototype.render=function(t){if(!this.hasNothingToRender()){var e=this.gl,r=this.program;e.useProgram(r),e.uniformMatrix3fv(this.matrixLocation,!1,t.matrix),e.uniform1f(this.sqrtZoomRatioLocation,Math.sqrt(t.ratio)),e.uniform1f(this.correctionRatioLocation,t.correctionRatio),e.drawArrays(e.TRIANGLES,0,this.array.length/9)}},e}(r(64488).AbstractEdgeProgram);e.default=c},83653:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=r(64488),u=r(88586),s=o(r(83574)),c=o(r(73343)),h=function(t){function e(e){var r=t.call(this,e,s.default,c.default,4,6)||this,n=e.createBuffer();if(null===n)throw new Error("EdgeClampedProgram: error while getting resolutionLocation");r.indicesBuffer=n,r.positionLocation=e.getAttribLocation(r.program,"a_position"),r.colorLocation=e.getAttribLocation(r.program,"a_color"),r.normalLocation=e.getAttribLocation(r.program,"a_normal"),r.radiusLocation=e.getAttribLocation(r.program,"a_radius");var i=e.getUniformLocation(r.program,"u_matrix");if(null===i)throw new Error("EdgeClampedProgram: error while getting matrixLocation");r.matrixLocation=i;var o=e.getUniformLocation(r.program,"u_sqrtZoomRatio");if(null===o)throw new Error("EdgeClampedProgram: error while getting cameraRatioLocation");r.sqrtZoomRatioLocation=o;var a=e.getUniformLocation(r.program,"u_correctionRatio");if(null===a)throw new Error("EdgeClampedProgram: error while getting viewportRatioLocation");return r.correctionRatioLocation=a,r.canUse32BitsIndices=(0,u.canUse32BitsIndices)(e),r.IndicesArray=r.canUse32BitsIndices?Uint32Array:Uint16Array,r.indicesArray=new r.IndicesArray,r.indicesType=r.canUse32BitsIndices?e.UNSIGNED_INT:e.UNSIGNED_SHORT,r.bind(),r}return i(e,t),e.prototype.bind=function(){var t=this.gl;t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this.indicesBuffer),t.enableVertexAttribArray(this.positionLocation),t.enableVertexAttribArray(this.normalLocation),t.enableVertexAttribArray(this.colorLocation),t.enableVertexAttribArray(this.radiusLocation),t.vertexAttribPointer(this.positionLocation,2,t.FLOAT,!1,6*Float32Array.BYTES_PER_ELEMENT,0),t.vertexAttribPointer(this.normalLocation,2,t.FLOAT,!1,6*Float32Array.BYTES_PER_ELEMENT,8),t.vertexAttribPointer(this.colorLocation,4,t.UNSIGNED_BYTE,!0,6*Float32Array.BYTES_PER_ELEMENT,16),t.vertexAttribPointer(this.radiusLocation,1,t.FLOAT,!1,6*Float32Array.BYTES_PER_ELEMENT,20)},e.prototype.process=function(t,e,r,n,i){if(n)for(var o=24*i,a=o+24;o<a;o++)this.array[o]=0;else{var s=r.size||1,c=t.x,h=t.y,l=e.x,d=e.y,f=e.size||1,p=(0,u.floatColor)(r.color),g=l-c,v=d-h,y=g*g+v*v,m=0,b=0;y&&(m=-v*(y=1/Math.sqrt(y))*s,b=g*y*s);var w=24*i,_=this.array;_[w++]=c,_[w++]=h,_[w++]=m,_[w++]=b,_[w++]=p,_[w++]=0,_[w++]=c,_[w++]=h,_[w++]=-m,_[w++]=-b,_[w++]=p,_[w++]=0,_[w++]=l,_[w++]=d,_[w++]=m,_[w++]=b,_[w++]=p,_[w++]=f,_[w++]=l,_[w++]=d,_[w++]=-m,_[w++]=-b,_[w++]=p,_[w]=-f}},e.prototype.computeIndices=function(){for(var t=this.array.length/6,e=t+t/2,r=new this.IndicesArray(e),n=0,i=0;n<t;n+=4)r[i++]=n,r[i++]=n+1,r[i++]=n+2,r[i++]=n+2,r[i++]=n+1,r[i++]=n+3;this.indicesArray=r},e.prototype.bufferData=function(){t.prototype.bufferData.call(this);var e=this.gl;e.bufferData(e.ELEMENT_ARRAY_BUFFER,this.indicesArray,e.STATIC_DRAW)},e.prototype.render=function(t){if(!this.hasNothingToRender()){var e=this.gl,r=this.program;e.useProgram(r),e.uniformMatrix3fv(this.matrixLocation,!1,t.matrix),e.uniform1f(this.sqrtZoomRatioLocation,Math.sqrt(t.ratio)),e.uniform1f(this.correctionRatioLocation,t.correctionRatio),e.drawElements(e.TRIANGLES,this.indicesArray.length,this.indicesType,0)}},e}(a.AbstractEdgeProgram);e.default=h},95372:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=r(88586),u=o(r(59843)),s=o(r(73343)),c=function(t){function e(e){var r=t.call(this,e,u.default,s.default,4,5)||this,n=e.createBuffer();if(null===n)throw new Error("EdgeProgram: error while creating indicesBuffer");r.indicesBuffer=n,r.positionLocation=e.getAttribLocation(r.program,"a_position"),r.colorLocation=e.getAttribLocation(r.program,"a_color"),r.normalLocation=e.getAttribLocation(r.program,"a_normal");var i=e.getUniformLocation(r.program,"u_matrix");if(null===i)throw new Error("EdgeProgram: error while getting matrixLocation");r.matrixLocation=i;var o=e.getUniformLocation(r.program,"u_correctionRatio");if(null===o)throw new Error("EdgeProgram: error while getting correctionRatioLocation");r.correctionRatioLocation=o;var c=e.getUniformLocation(r.program,"u_sqrtZoomRatio");if(null===c)throw new Error("EdgeProgram: error while getting sqrtZoomRatioLocation");return r.sqrtZoomRatioLocation=c,r.canUse32BitsIndices=(0,a.canUse32BitsIndices)(e),r.IndicesArray=r.canUse32BitsIndices?Uint32Array:Uint16Array,r.indicesArray=new r.IndicesArray,r.indicesType=r.canUse32BitsIndices?e.UNSIGNED_INT:e.UNSIGNED_SHORT,r.bind(),r}return i(e,t),e.prototype.bind=function(){var t=this.gl;t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this.indicesBuffer),t.enableVertexAttribArray(this.positionLocation),t.enableVertexAttribArray(this.normalLocation),t.enableVertexAttribArray(this.colorLocation),t.vertexAttribPointer(this.positionLocation,2,t.FLOAT,!1,5*Float32Array.BYTES_PER_ELEMENT,0),t.vertexAttribPointer(this.normalLocation,2,t.FLOAT,!1,5*Float32Array.BYTES_PER_ELEMENT,8),t.vertexAttribPointer(this.colorLocation,4,t.UNSIGNED_BYTE,!0,5*Float32Array.BYTES_PER_ELEMENT,16)},e.prototype.computeIndices=function(){for(var t=this.array.length/5,e=t+t/2,r=new this.IndicesArray(e),n=0,i=0;n<t;n+=4)r[i++]=n,r[i++]=n+1,r[i++]=n+2,r[i++]=n+2,r[i++]=n+1,r[i++]=n+3;this.indicesArray=r},e.prototype.bufferData=function(){t.prototype.bufferData.call(this);var e=this.gl;e.bufferData(e.ELEMENT_ARRAY_BUFFER,this.indicesArray,e.STATIC_DRAW)},e.prototype.process=function(t,e,r,n,i){if(n)for(var o=20*i,u=o+20;o<u;o++)this.array[o]=0;else{var s=r.size||1,c=t.x,h=t.y,l=e.x,d=e.y,f=(0,a.floatColor)(r.color),p=l-c,g=d-h,v=p*p+g*g,y=0,m=0;v&&(y=-g*(v=1/Math.sqrt(v))*s,m=p*v*s);var b=20*i,w=this.array;w[b++]=c,w[b++]=h,w[b++]=y,w[b++]=m,w[b++]=f,w[b++]=c,w[b++]=h,w[b++]=-y,w[b++]=-m,w[b++]=f,w[b++]=l,w[b++]=d,w[b++]=y,w[b++]=m,w[b++]=f,w[b++]=l,w[b++]=d,w[b++]=-y,w[b++]=-m,w[b]=f}},e.prototype.render=function(t){if(!this.hasNothingToRender()){var e=this.gl,r=this.program;e.useProgram(r),e.uniformMatrix3fv(this.matrixLocation,!1,t.matrix),e.uniform1f(this.sqrtZoomRatioLocation,Math.sqrt(t.ratio)),e.uniform1f(this.correctionRatioLocation,t.correctionRatio),e.drawElements(e.TRIANGLES,this.indicesArray.length,this.indicesType,0)}},e}(r(64488).AbstractEdgeProgram);e.default=c},90732:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=r(88586),u=o(r(21432)),s=o(r(36846)),c=function(t){function e(e){var r=t.call(this,e,u.default,s.default,1,4)||this;return r.bind(),r}return i(e,t),e.prototype.process=function(t,e,r){var n=this.array,i=1*r*4;if(e)return n[i++]=0,n[i++]=0,n[i++]=0,void(n[i++]=0);var o=(0,a.floatColor)(t.color);n[i++]=t.x,n[i++]=t.y,n[i++]=t.size,n[i]=o},e.prototype.render=function(t){if(!this.hasNothingToRender()){var e=this.gl,r=this.program;e.useProgram(r),e.uniform1f(this.ratioLocation,1/Math.sqrt(t.ratio)),e.uniform1f(this.scaleLocation,t.scalingRatio),e.uniformMatrix3fv(this.matrixLocation,!1,t.matrix),e.drawArrays(e.POINTS,0,this.array.length/4)}},e}(r(23304).AbstractNodeProgram);e.default=c},91604:t=>{(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{default:()=>n});const n="precision mediump float;\n\nvarying vec4 v_color;\n\nvoid main(void) {\n gl_FragColor = v_color;\n}\n";t.exports=r})()},50577:t=>{(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{default:()=>n});const n="attribute vec2 a_position;\nattribute vec2 a_normal;\nattribute float a_radius;\nattribute vec4 a_color;\nattribute vec3 a_barycentric;\n\nuniform mat3 u_matrix;\nuniform float u_sqrtZoomRatio;\nuniform float u_correctionRatio;\n\nvarying vec4 v_color;\n\nconst float minThickness = 1.7;\nconst float bias = 255.0 / 254.0;\nconst float arrowHeadWidthLengthRatio = 0.66;\nconst float arrowHeadLengthThicknessRatio = 2.5;\n\nvoid main() {\n float normalLength = length(a_normal);\n vec2 unitNormal = a_normal / normalLength;\n\n // These first computations are taken from edge.vert.glsl and\n // edge.clamped.vert.glsl. Please read it to get better comments on what's\n // happening:\n float pixelsThickness = max(normalLength, minThickness * u_sqrtZoomRatio);\n float webGLThickness = pixelsThickness * u_correctionRatio;\n float adaptedWebGLThickness = webGLThickness * u_sqrtZoomRatio;\n float adaptedWebGLNodeRadius = a_radius * 2.0 * u_correctionRatio * u_sqrtZoomRatio;\n float adaptedWebGLArrowHeadLength = adaptedWebGLThickness * 2.0 * arrowHeadLengthThicknessRatio;\n float adaptedWebGLArrowHeadHalfWidth = adaptedWebGLArrowHeadLength * arrowHeadWidthLengthRatio / 2.0;\n\n float da = a_barycentric.x;\n float db = a_barycentric.y;\n float dc = a_barycentric.z;\n\n vec2 delta = vec2(\n da * (adaptedWebGLNodeRadius * unitNormal.y)\n + db * ((adaptedWebGLNodeRadius + adaptedWebGLArrowHeadLength) * unitNormal.y + adaptedWebGLArrowHeadHalfWidth * unitNormal.x)\n + dc * ((adaptedWebGLNodeRadius + adaptedWebGLArrowHeadLength) * unitNormal.y - adaptedWebGLArrowHeadHalfWidth * unitNormal.x),\n\n da * (-adaptedWebGLNodeRadius * unitNormal.x)\n + db * (-(adaptedWebGLNodeRadius + adaptedWebGLArrowHeadLength) * unitNormal.x + adaptedWebGLArrowHeadHalfWidth * unitNormal.y)\n + dc * (-(adaptedWebGLNodeRadius + adaptedWebGLArrowHeadLength) * unitNormal.x - adaptedWebGLArrowHeadHalfWidth * unitNormal.y)\n );\n\n vec2 position = (u_matrix * vec3(a_position + delta, 1)).xy;\n\n gl_Position = vec4(position, 0, 1);\n\n // Extract the color:\n v_color = a_color;\n v_color.a *= bias;\n}\n";t.exports=r})()},83574:t=>{(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{default:()=>n});const n="attribute vec4 a_color;\nattribute vec2 a_normal;\nattribute vec2 a_position;\nattribute float a_radius;\n\nuniform mat3 u_matrix;\nuniform float u_sqrtZoomRatio;\nuniform float u_correctionRatio;\n\nvarying vec4 v_color;\nvarying vec2 v_normal;\nvarying float v_thickness;\n\nconst float minThickness = 1.7;\nconst float bias = 255.0 / 254.0;\nconst float arrowHeadLengthThicknessRatio = 2.5;\n\nvoid main() {\n float normalLength = length(a_normal);\n vec2 unitNormal = a_normal / normalLength;\n\n // These first computations are taken from edge.vert.glsl. Please read it to\n // get better comments on what's happening:\n float pixelsThickness = max(normalLength, minThickness * u_sqrtZoomRatio);\n float webGLThickness = pixelsThickness * u_correctionRatio;\n float adaptedWebGLThickness = webGLThickness * u_sqrtZoomRatio;\n\n // Here, we move the point to leave space for the arrow head:\n float direction = sign(a_radius);\n float adaptedWebGLNodeRadius = direction * a_radius * 2.0 * u_correctionRatio * u_sqrtZoomRatio;\n float adaptedWebGLArrowHeadLength = adaptedWebGLThickness * 2.0 * arrowHeadLengthThicknessRatio;\n\n vec2 compensationVector = vec2(-direction * unitNormal.y, direction * unitNormal.x) * (adaptedWebGLNodeRadius + adaptedWebGLArrowHeadLength);\n\n // Here is the proper position of the vertex\n gl_Position = vec4((u_matrix * vec3(a_position + unitNormal * adaptedWebGLThickness + compensationVector, 1)).xy, 0, 1);\n\n v_thickness = webGLThickness / u_sqrtZoomRatio;\n\n v_normal = unitNormal;\n v_color = a_color;\n v_color.a *= bias;\n}\n";t.exports=r})()},73343:t=>{(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{default:()=>n});const n="precision mediump float;\n\nvarying vec4 v_color;\nvarying vec2 v_normal;\nvarying float v_thickness;\n\nconst float feather = 0.001;\nconst vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0);\n\nvoid main(void) {\n float dist = length(v_normal) * v_thickness;\n\n float t = smoothstep(\n v_thickness - feather,\n v_thickness,\n dist\n );\n\n gl_FragColor = mix(v_color, transparent, t);\n}\n";t.exports=r})()},59843:t=>{(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{default:()=>n});const n='attribute vec4 a_color;\nattribute vec2 a_normal;\nattribute vec2 a_position;\n\nuniform mat3 u_matrix;\nuniform float u_sqrtZoomRatio;\nuniform float u_correctionRatio;\n\nvarying vec4 v_color;\nvarying vec2 v_normal;\nvarying float v_thickness;\n\nconst float minThickness = 1.7;\nconst float bias = 255.0 / 254.0;\n\nvoid main() {\n float normalLength = length(a_normal);\n vec2 unitNormal = a_normal / normalLength;\n\n // We require edges to be at least `minThickness` pixels thick *on screen*\n // (so we need to compensate the SQRT zoom ratio):\n float pixelsThickness = max(normalLength, minThickness * u_sqrtZoomRatio);\n\n // Then, we need to retrieve the normalized thickness of the edge in the WebGL\n // referential (in a ([0, 1], [0, 1]) space), using our "magic" correction\n // ratio:\n float webGLThickness = pixelsThickness * u_correctionRatio;\n\n // Finally, we adapt the edge thickness to the "SQRT rule" in sigma (so that\n // items are not too big when zoomed in, and not too small when zoomed out).\n // The exact computation should be `adapted = value * zoom / sqrt(zoom)`, but\n // it\'s simpler like this:\n float adaptedWebGLThickness = webGLThickness * u_sqrtZoomRatio;\n\n // Here is the proper position of the vertex\n gl_Position = vec4((u_matrix * vec3(a_position + unitNormal * adaptedWebGLThickness, 1)).xy, 0, 1);\n\n // For the fragment shader though, we need a thickness that takes the "magic"\n // correction ratio into account (as in webGLThickness), but so that the\n // antialiasing effect does not depend on the zoom level. So here\'s yet\n // another thickness version:\n v_thickness = webGLThickness / u_sqrtZoomRatio;\n\n v_normal = unitNormal;\n v_color = a_color;\n v_color.a *= bias;\n}\n';t.exports=r})()},36846:t=>{(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{default:()=>n});const n="precision mediump float;\n\nvarying vec4 v_color;\nvarying float v_border;\n\nconst float radius = 0.5;\nconst vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0);\n\nvoid main(void) {\n vec2 m = gl_PointCoord - vec2(0.5, 0.5);\n float dist = radius - length(m);\n\n float t = 0.0;\n if (dist > v_border)\n t = 1.0;\n else if (dist > 0.0)\n t = dist / v_border;\n\n gl_FragColor = mix(transparent, v_color, t);\n}\n";t.exports=r})()},21432:t=>{(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{default:()=>n});const n="attribute vec2 a_position;\nattribute float a_size;\nattribute vec4 a_color;\n\nuniform float u_ratio;\nuniform float u_scale;\nuniform mat3 u_matrix;\n\nvarying vec4 v_color;\nvarying float v_border;\n\nconst float bias = 255.0 / 254.0;\n\nvoid main() {\n gl_Position = vec4(\n (u_matrix * vec3(a_position, 1)).xy,\n 0,\n 1\n );\n\n // Multiply the point size twice:\n // - x SCALING_RATIO to correct the canvas scaling\n // - x 2 to correct the formulae\n gl_PointSize = a_size * u_ratio * u_scale * 2.0;\n\n v_border = (1.0 / u_ratio) * (0.5 / a_size);\n\n // Extract the color:\n v_color = a_color;\n v_color.a *= bias;\n}\n";t.exports=r})()},83451:(t,e)=>{"use strict";function r(t,e,r){var n="VERTEX"===t?e.VERTEX_SHADER:e.FRAGMENT_SHADER,i=e.createShader(n);if(null===i)throw new Error("loadShader: error while creating the shader");if(e.shaderSource(i,r),e.compileShader(i),!e.getShaderParameter(i,e.COMPILE_STATUS)){var o=e.getShaderInfoLog(i);throw e.deleteShader(i),new Error("loadShader: error while compiling the shader:\n".concat(o,"\n").concat(r))}return i}Object.defineProperty(e,"__esModule",{value:!0}),e.loadProgram=e.loadFragmentShader=e.loadVertexShader=void 0,e.loadVertexShader=function(t,e){return r("VERTEX",t,e)},e.loadFragmentShader=function(t,e){return r("FRAGMENT",t,e)},e.loadProgram=function(t,e){var r,n,i=t.createProgram();if(null===i)throw new Error("loadProgram: error while creating the program.");for(r=0,n=e.length;r<n;r++)t.attachShader(i,e[r]);if(t.linkProgram(i),!t.getProgramParameter(i,t.LINK_STATUS))throw t.deleteProgram(i),new Error("loadProgram: error while linking the program.");return i}},49061:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.resolveSettings=e.validateSettings=e.DEFAULT_EDGE_PROGRAM_CLASSES=e.DEFAULT_NODE_PROGRAM_CLASSES=e.DEFAULT_SETTINGS=void 0;var i=r(88586),o=n(r(12193)),a=n(r(64362)),u=n(r(30284)),s=n(r(90732)),c=n(r(95372)),h=n(r(65696));e.DEFAULT_SETTINGS={hideEdgesOnMove:!1,hideLabelsOnMove:!1,renderLabels:!0,renderEdgeLabels:!1,enableEdgeClickEvents:!1,enableEdgeWheelEvents:!1,enableEdgeHoverEvents:!1,defaultNodeColor:"#999",defaultNodeType:"circle",defaultEdgeColor:"#ccc",defaultEdgeType:"line",labelFont:"Arial",labelSize:14,labelWeight:"normal",labelColor:{color:"#000"},edgeLabelFont:"Arial",edgeLabelSize:14,edgeLabelWeight:"normal",edgeLabelColor:{attribute:"color"},stagePadding:30,labelDensity:1,labelGridCellSize:100,labelRenderedSizeThreshold:6,nodeReducer:null,edgeReducer:null,zIndex:!1,minCameraRatio:null,maxCameraRatio:null,labelRenderer:o.default,hoverRenderer:a.default,edgeLabelRenderer:u.default,allowInvalidContainer:!1,nodeProgramClasses:{},nodeHoverProgramClasses:{},edgeProgramClasses:{}},e.DEFAULT_NODE_PROGRAM_CLASSES={circle:s.default},e.DEFAULT_EDGE_PROGRAM_CLASSES={arrow:h.default,line:c.default},e.validateSettings=function(t){if("number"!=typeof t.labelDensity||t.labelDensity<0)throw new Error("Settings: invalid `labelDensity`. Expecting a positive number.");var e=t.minCameraRatio,r=t.maxCameraRatio;if("number"==typeof e&&"number"==typeof r&&r<e)throw new Error("Settings: invalid camera ratio boundaries. Expecting `maxCameraRatio` to be greater than `minCameraRatio`.")},e.resolveSettings=function(t){var r=(0,i.assign)({},e.DEFAULT_SETTINGS,t);return r.nodeProgramClasses=(0,i.assign)({},e.DEFAULT_NODE_PROGRAM_CLASSES,r.nodeProgramClasses),r.edgeProgramClasses=(0,i.assign)({},e.DEFAULT_EDGE_PROGRAM_CLASSES,r.edgeProgramClasses),r}},38953:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__assign||function(){return o=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},o.apply(this,arguments)},a=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},u=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=u(r(8884)),c=u(r(31250)),h=u(r(73834)),l=u(r(39316)),d=r(30432),f=r(88586),p=r(2306),g=r(49061),v=u(r(40916)),y=r(42237),m=r(38073);function b(t,e,r){if(!r.hasOwnProperty("x")||!r.hasOwnProperty("y"))throw new Error('Sigma: could not find a valid position (x, y) for node "'.concat(e,'". All your nodes must have a number "x" and "y". Maybe your forgot to apply a layout or your "nodeReducer" is not returning the correct data?'));return r.color||(r.color=t.defaultNodeColor),r.label||""===r.label||(r.label=null),void 0!==r.label&&null!==r.label?r.label=""+r.label:r.label=null,r.size||(r.size=2),r.hasOwnProperty("hidden")||(r.hidden=!1),r.hasOwnProperty("highlighted")||(r.highlighted=!1),r.hasOwnProperty("forceLabel")||(r.forceLabel=!1),r.type&&""!==r.type||(r.type=t.defaultNodeType),r.zIndex||(r.zIndex=0),r}function w(t,e,r){return r.color||(r.color=t.defaultEdgeColor),r.label||(r.label=""),r.size||(r.size=.5),r.hasOwnProperty("hidden")||(r.hidden=!1),r.hasOwnProperty("forceLabel")||(r.forceLabel=!1),r.type&&""!==r.type||(r.type=t.defaultEdgeType),r.zIndex||(r.zIndex=0),r}var _=function(t){function e(e,r,n){void 0===n&&(n={});var i=t.call(this)||this;if(i.elements={},i.canvasContexts={},i.webGLContexts={},i.activeListeners={},i.quadtree=new l.default,i.labelGrid=new p.LabelGrid,i.nodeDataCache={},i.edgeDataCache={},i.nodesWithForcedLabels=[],i.edgesWithForcedLabels=[],i.nodeExtent={x:[0,1],y:[0,1]},i.matrix=(0,y.identity)(),i.invMatrix=(0,y.identity)(),i.correctionRatio=1,i.customBBox=null,i.normalizationFunction=(0,f.createNormalizationFunction)({x:[0,1],y:[0,1]}),i.cameraSizeRatio=1,i.width=0,i.height=0,i.pixelRatio=(0,f.getPixelRatio)(),i.displayedLabels=new Set,i.highlightedNodes=new Set,i.hoveredNode=null,i.hoveredEdge=null,i.renderFrame=null,i.renderHighlightedNodesFrame=null,i.needToProcess=!1,i.needToSoftProcess=!1,i.checkEdgesEventsFrame=null,i.nodePrograms={},i.nodeHoverPrograms={},i.edgePrograms={},i.settings=(0,g.resolveSettings)(n),(0,g.validateSettings)(i.settings),(0,f.validateGraph)(e),!(r instanceof HTMLElement))throw new Error("Sigma: container should be an html element.");for(var o in i.graph=e,i.container=r,i.createWebGLContext("edges",{preserveDrawingBuffer:!0}),i.createCanvasContext("edgeLabels"),i.createWebGLContext("nodes"),i.createCanvasContext("labels"),i.createCanvasContext("hovers"),i.createWebGLContext("hoverNodes"),i.createCanvasContext("mouse"),i.webGLContexts){var a=i.webGLContexts[o];a.blendFunc(a.ONE,a.ONE_MINUS_SRC_ALPHA),a.enable(a.BLEND)}for(var u in i.settings.nodeProgramClasses){var s=i.settings.nodeProgramClasses[u];i.nodePrograms[u]=new s(i.webGLContexts.nodes,i);var d=s;u in i.settings.nodeHoverProgramClasses&&(d=i.settings.nodeHoverProgramClasses[u]),i.nodeHoverPrograms[u]=new d(i.webGLContexts.hoverNodes,i)}for(var u in i.settings.edgeProgramClasses){var m=i.settings.edgeProgramClasses[u];i.edgePrograms[u]=new m(i.webGLContexts.edges,i)}return i.resize(),i.camera=new c.default,i.bindCameraHandlers(),i.mouseCaptor=new h.default(i.elements.mouse,i),i.touchCaptor=new v.default(i.elements.mouse,i),i.bindEventHandlers(),i.bindGraphHandlers(),i.handleSettingsUpdate(),i.process(),i.render(),i}return i(e,t),e.prototype.createCanvas=function(t){var e=(0,f.createElement)("canvas",{position:"absolute"},{class:"sigma-".concat(t)});return this.elements[t]=e,this.container.appendChild(e),e},e.prototype.createCanvasContext=function(t){var e=this.createCanvas(t);return this.canvasContexts[t]=e.getContext("2d",{preserveDrawingBuffer:!1,antialias:!1}),this},e.prototype.createWebGLContext=function(t,e){var r,n=this.createCanvas(t),i=o({preserveDrawingBuffer:!1,antialias:!1},e||{});return(r=n.getContext("webgl2",i))||(r=n.getContext("webgl",i)),r||(r=n.getContext("experimental-webgl",i)),this.webGLContexts[t]=r,this},e.prototype.bindCameraHandlers=function(){var t=this;return this.activeListeners.camera=function(){t._scheduleRefresh()},this.camera.on("updated",this.activeListeners.camera),this},e.prototype.mouseIsOnNode=function(t,e,r){var n=t.x,i=t.y,o=e.x,a=e.y;return n>o-r&&n<o+r&&i>a-r&&i<a+r&&Math.sqrt(Math.pow(n-o,2)+Math.pow(i-a,2))<r},e.prototype.getQuadNodes=function(t){var e=this.viewportToFramedGraph(t);return this.quadtree.point(e.x,1-e.y)},e.prototype.getNodeAtPosition=function(t){for(var e=t.x,r=t.y,n=this.getQuadNodes(t),i=1/0,o=null,a=0,u=n.length;a<u;a++){var s=n[a],c=this.nodeDataCache[s],h=this.framedGraphToViewport(c),l=this.scaleSize(c.size);if(!c.hidden&&this.mouseIsOnNode(t,h,l)){var d=Math.sqrt(Math.pow(e-h.x,2)+Math.pow(r-h.y,2));d<i&&(i=d,o=s)}}return o},e.prototype.bindEventHandlers=function(){var t=this;this.activeListeners.handleResize=function(){t.needToSoftProcess=!0,t._scheduleRefresh()},window.addEventListener("resize",this.activeListeners.handleResize),this.activeListeners.handleMove=function(e){var r={event:e,preventSigmaDefault:function(){e.preventSigmaDefault()}},n=t.getNodeAtPosition(e);if(n&&t.hoveredNode!==n&&!t.nodeDataCache[n].hidden)return t.hoveredNode&&t.emit("leaveNode",o(o({},r),{node:t.hoveredNode})),t.hoveredNode=n,t.emit("enterNode",o(o({},r),{node:n})),void t.scheduleHighlightedNodesRender();if(t.hoveredNode){var i=t.nodeDataCache[t.hoveredNode],a=t.framedGraphToViewport(i),u=t.scaleSize(i.size);if(!t.mouseIsOnNode(e,a,u)){var s=t.hoveredNode;return t.hoveredNode=null,t.emit("leaveNode",o(o({},r),{node:s})),void t.scheduleHighlightedNodesRender()}}!0===t.settings.enableEdgeHoverEvents?t.checkEdgeHoverEvents(r):"debounce"===t.settings.enableEdgeHoverEvents&&(t.checkEdgesEventsFrame||(t.checkEdgesEventsFrame=(0,f.requestFrame)((function(){t.checkEdgeHoverEvents(r),t.checkEdgesEventsFrame=null}))))};var e=function(e){return function(r){var n={event:r,preventSigmaDefault:function(){r.preventSigmaDefault()}},i=r.original.isFakeSigmaMouseEvent?t.getNodeAtPosition(r):t.hoveredNode;if(i)return t.emit("".concat(e,"Node"),o(o({},n),{node:i}));if("wheel"===e?t.settings.enableEdgeWheelEvents:t.settings.enableEdgeClickEvents){var a=t.getEdgeAtPoint(r.x,r.y);if(a)return t.emit("".concat(e,"Edge"),o(o({},n),{edge:a}))}return t.emit("".concat(e,"Stage"),n)}};return this.activeListeners.handleClick=e("click"),this.activeListeners.handleRightClick=e("rightClick"),this.activeListeners.handleDoubleClick=e("doubleClick"),this.activeListeners.handleWheel=e("wheel"),this.activeListeners.handleDown=e("down"),this.mouseCaptor.on("mousemove",this.activeListeners.handleMove),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},e.prototype.bindGraphHandlers=function(){var t=this,e=this.graph;return this.activeListeners.graphUpdate=function(){t.needToProcess=!0,t._scheduleRefresh()},this.activeListeners.softGraphUpdate=function(){t.needToSoftProcess=!0,t._scheduleRefresh()},this.activeListeners.dropNodeGraphUpdate=function(e){delete t.nodeDataCache[e.key],t.hoveredNode===e.key&&(t.hoveredNode=null),t.activeListeners.graphUpdate()},this.activeListeners.dropEdgeGraphUpdate=function(e){delete t.edgeDataCache[e.key],t.hoveredEdge===e.key&&(t.hoveredEdge=null),t.activeListeners.graphUpdate()},this.activeListeners.clearEdgesGraphUpdate=function(){t.edgeDataCache={},t.hoveredEdge=null,t.activeListeners.graphUpdate()},this.activeListeners.clearGraphUpdate=function(){t.nodeDataCache={},t.hoveredNode=null,t.activeListeners.clearEdgesGraphUpdate()},e.on("nodeAdded",this.activeListeners.graphUpdate),e.on("nodeDropped",this.activeListeners.dropNodeGraphUpdate),e.on("nodeAttributesUpdated",this.activeListeners.softGraphUpdate),e.on("eachNodeAttributesUpdated",this.activeListeners.graphUpdate),e.on("edgeAdded",this.activeListeners.graphUpdate),e.on("edgeDropped",this.activeListeners.dropEdgeGraphUpdate),e.on("edgeAttributesUpdated",this.activeListeners.softGraphUpdate),e.on("eachEdgeAttributesUpdated",this.activeListeners.graphUpdate),e.on("edgesCleared",this.activeListeners.clearEdgesGraphUpdate),e.on("cleared",this.activeListeners.clearGraphUpdate),this},e.prototype.unbindGraphHandlers=function(){var t=this.graph;t.removeListener("nodeAdded",this.activeListeners.graphUpdate),t.removeListener("nodeDropped",this.activeListeners.dropNodeGraphUpdate),t.removeListener("nodeAttributesUpdated",this.activeListeners.softGraphUpdate),t.removeListener("eachNodeAttributesUpdated",this.activeListeners.graphUpdate),t.removeListener("edgeAdded",this.activeListeners.graphUpdate),t.removeListener("edgeDropped",this.activeListeners.dropEdgeGraphUpdate),t.removeListener("edgeAttributesUpdated",this.activeListeners.softGraphUpdate),t.removeListener("eachEdgeAttributesUpdated",this.activeListeners.graphUpdate),t.removeListener("edgesCleared",this.activeListeners.clearEdgesGraphUpdate),t.removeListener("cleared",this.activeListeners.clearGraphUpdate)},e.prototype.checkEdgeHoverEvents=function(t){var e=this.hoveredNode?null:this.getEdgeAtPoint(t.event.x,t.event.y);return e!==this.hoveredEdge&&(this.hoveredEdge&&this.emit("leaveEdge",o(o({},t),{edge:this.hoveredEdge})),e&&this.emit("enterEdge",o(o({},t),{edge:e})),this.hoveredEdge=e),this},e.prototype.getEdgeAtPoint=function(t,e){var r,n,i=this,o=this.edgeDataCache,u=this.nodeDataCache;if(!(0,m.isPixelColored)(this.webGLContexts.edges,t*this.pixelRatio,e*this.pixelRatio))return null;var s=this.viewportToGraph({x:t,y:e}),c=s.x,h=s.y,l=0;if(this.graph.someEdge((function(t,e,r,n,a,s){var c=a.x,h=a.y,d=s.x,f=s.y;if(o[t].hidden||u[r].hidden||u[n].hidden)return!1;if(c!==d||h!==f){var p=Math.sqrt(Math.pow(d-c,2)+Math.pow(f-h,2)),g=i.graphToViewport({x:c,y:h}),v=g.x,y=g.y,m=i.graphToViewport({x:d,y:f}),b=m.x,w=m.y,_=Math.sqrt(Math.pow(b-v,2)+Math.pow(w-y,2));return l=p/_,!0}})),!l)return null;var d=this.graph.filterEdges((function(t,e,r,n,a,s){return!(o[t].hidden||u[r].hidden||u[n].hidden)&&(!!(0,m.doEdgeCollideWithPoint)(c,h,a.x,a.y,s.x,s.y,o[t].size*l/i.cameraSizeRatio)||void 0)}));if(0===d.length)return null;var f=d[d.length-1],p=-1/0;try{for(var g=a(d),v=g.next();!v.done;v=g.next()){var y=v.value,b=this.graph.getEdgeAttribute(y,"zIndex");b>=p&&(f=y,p=b)}}catch(t){r={error:t}}finally{try{v&&!v.done&&(n=g.return)&&n.call(g)}finally{if(r)throw r.error}}return f},e.prototype.process=function(t){var e=this;void 0===t&&(t=!1);var r=this.graph,n=this.settings,i=this.getDimensions(),o=[1/0,-1/0],a=[1/0,-1/0];this.quadtree.clear(),this.labelGrid.resizeAndClear(i,n.labelGridCellSize),this.highlightedNodes=new Set,this.nodeExtent=(0,f.graphExtent)(r),this.nodesWithForcedLabels=[],this.edgesWithForcedLabels=[];var u=new c.default,s=(0,f.matrixFromCamera)(u.getState(),this.getDimensions(),this.getGraphDimensions(),this.getSetting("stagePadding")||0);this.normalizationFunction=(0,f.createNormalizationFunction)(this.customBBox||this.nodeExtent);for(var h={},l=r.nodes(),d=0,p=l.length;d<p;d++){var g=l[d],v=Object.assign({},r.getNodeAttributes(g));n.nodeReducer&&(v=n.nodeReducer(g,v)),h[(m=b(this.settings,g,v)).type]=(h[m.type]||0)+1,this.nodeDataCache[g]=m,this.normalizationFunction.applyTo(m),m.forceLabel&&this.nodesWithForcedLabels.push(g),this.settings.zIndex&&(m.zIndex<o[0]&&(o[0]=m.zIndex),m.zIndex>o[1]&&(o[1]=m.zIndex))}for(var y in this.nodePrograms){if(!this.nodePrograms.hasOwnProperty(y))throw new Error('Sigma: could not find a suitable program for node type "'.concat(y,'"!'));t||this.nodePrograms[y].allocate(h[y]||0),h[y]=0}for(this.settings.zIndex&&o[0]!==o[1]&&(l=(0,f.zIndexOrdering)(o,(function(t){return e.nodeDataCache[t].zIndex}),l)),d=0,p=l.length;d<p;d++){g=l[d];var m=this.nodeDataCache[g];this.quadtree.add(g,m.x,1-m.y,m.size/this.width),"string"!=typeof m.label||m.hidden||this.labelGrid.add(g,m.size,this.framedGraphToViewport(m,{matrix:s}));var _=this.nodePrograms[m.type];if(!_)throw new Error('Sigma: could not find a suitable program for node type "'.concat(m.type,'"!'));_.process(m,m.hidden,h[m.type]++),m.highlighted&&!m.hidden&&this.highlightedNodes.add(g)}this.labelGrid.organize();var x={},E=r.edges();for(d=0,p=E.length;d<p;d++){var A=E[d];v=Object.assign({},r.getEdgeAttributes(A)),n.edgeReducer&&(v=n.edgeReducer(A,v)),x[(m=w(this.settings,0,v)).type]=(x[m.type]||0)+1,this.edgeDataCache[A]=m,m.forceLabel&&!m.hidden&&this.edgesWithForcedLabels.push(A),this.settings.zIndex&&(m.zIndex<a[0]&&(a[0]=m.zIndex),m.zIndex>a[1]&&(a[1]=m.zIndex))}for(var y in this.edgePrograms){if(!this.edgePrograms.hasOwnProperty(y))throw new Error('Sigma: could not find a suitable program for edge type "'.concat(y,'"!'));t||this.edgePrograms[y].allocate(x[y]||0),x[y]=0}for(this.settings.zIndex&&a[0]!==a[1]&&(E=(0,f.zIndexOrdering)(a,(function(t){return e.edgeDataCache[t].zIndex}),E)),d=0,p=E.length;d<p;d++){A=E[d],m=this.edgeDataCache[A];var L=r.extremities(A),k=this.nodeDataCache[L[0]],C=this.nodeDataCache[L[1]],S=m.hidden||k.hidden||C.hidden;this.edgePrograms[m.type].process(k,C,m,S,x[m.type]++)}for(var y in this.edgePrograms){var M=this.edgePrograms[y];t||"function"!=typeof M.computeIndices||M.computeIndices()}return this},e.prototype.handleSettingsUpdate=function(){return this.camera.minRatio=this.settings.minCameraRatio,this.camera.maxRatio=this.settings.maxCameraRatio,this.camera.setState(this.camera.validateState(this.camera.getState())),this},e.prototype._refresh=function(){return this.needToProcess?this.process():this.needToSoftProcess&&this.process(!0),this.needToProcess=!1,this.needToSoftProcess=!1,this.render(),this},e.prototype._scheduleRefresh=function(){var t=this;return this.renderFrame||(this.renderFrame=(0,f.requestFrame)((function(){t._refresh(),t.renderFrame=null}))),this},e.prototype.renderLabels=function(){if(!this.settings.renderLabels)return this;var t=this.camera.getState(),e=this.labelGrid.getLabelsToDisplay(t.ratio,this.settings.labelDensity);(0,s.default)(e,this.nodesWithForcedLabels),this.displayedLabels=new Set;for(var r=this.canvasContexts.labels,n=0,i=e.length;n<i;n++){var a=e[n],u=this.nodeDataCache[a];if(!this.displayedLabels.has(a)&&!u.hidden){var c=this.framedGraphToViewport(u),h=c.x,l=c.y,d=this.scaleSize(u.size);!u.forceLabel&&d<this.settings.labelRenderedSizeThreshold||h<-150||h>this.width+150||l<-50||l>this.height+50||(this.displayedLabels.add(a),this.settings.labelRenderer(r,o(o({key:a},u),{size:d,x:h,y:l}),this.settings))}}return this},e.prototype.renderEdgeLabels=function(){if(!this.settings.renderEdgeLabels)return this;var t=this.canvasContexts.edgeLabels;t.clearRect(0,0,this.width,this.height);for(var e=(0,p.edgeLabelsToDisplayFromNodes)({graph:this.graph,hoveredNode:this.hoveredNode,displayedNodeLabels:this.displayedLabels,highlightedNodes:this.highlightedNodes}).concat(this.edgesWithForcedLabels),r=new Set,n=0,i=e.length;n<i;n++){var a=e[n],u=this.graph.extremities(a),s=this.nodeDataCache[u[0]],c=this.nodeDataCache[u[1]],h=this.edgeDataCache[a];r.has(a)||h.hidden||s.hidden||c.hidden||(this.settings.edgeLabelRenderer(t,o(o({key:a},h),{size:this.scaleSize(h.size)}),o(o(o({key:u[0]},s),this.framedGraphToViewport(s)),{size:this.scaleSize(s.size)}),o(o(o({key:u[1]},c),this.framedGraphToViewport(c)),{size:this.scaleSize(c.size)}),this.settings),r.add(a))}return this},e.prototype.renderHighlightedNodes=function(){var t=this,e=this.canvasContexts.hovers;e.clearRect(0,0,this.width,this.height);var r=[];this.hoveredNode&&!this.nodeDataCache[this.hoveredNode].hidden&&r.push(this.hoveredNode),this.highlightedNodes.forEach((function(e){e!==t.hoveredNode&&r.push(e)})),r.forEach((function(r){return function(r){var n=t.nodeDataCache[r],i=t.framedGraphToViewport(n),a=i.x,u=i.y,s=t.scaleSize(n.size);t.settings.hoverRenderer(e,o(o({key:r},n),{size:s,x:a,y:u}),t.settings)}(r)}));var n={};for(var i in r.forEach((function(e){var r=t.nodeDataCache[e].type;n[r]=(n[r]||0)+1})),this.nodeHoverPrograms)this.nodeHoverPrograms[i].allocate(n[i]||0),n[i]=0;for(var i in r.forEach((function(e){var r=t.nodeDataCache[e];t.nodeHoverPrograms[r.type].process(r,r.hidden,n[r.type]++)})),this.webGLContexts.hoverNodes.clear(this.webGLContexts.hoverNodes.COLOR_BUFFER_BIT),this.nodeHoverPrograms){var a=this.nodeHoverPrograms[i];a.bind(),a.bufferData(),a.render({matrix:this.matrix,width:this.width,height:this.height,ratio:this.camera.ratio,correctionRatio:this.correctionRatio/this.camera.ratio,scalingRatio:this.pixelRatio})}},e.prototype.scheduleHighlightedNodesRender=function(){var t=this;this.renderHighlightedNodesFrame||this.renderFrame||(this.renderHighlightedNodesFrame=(0,f.requestFrame)((function(){t.renderHighlightedNodesFrame=null,t.renderHighlightedNodes(),t.renderEdgeLabels()})))},e.prototype.render=function(){var t=this;this.emit("beforeRender");var e=function(){return t.emit("afterRender"),t};if(this.renderFrame&&((0,f.cancelFrame)(this.renderFrame),this.renderFrame=null,this.needToProcess=!1,this.needToSoftProcess=!1),this.resize(),this.clear(),this.updateCachedValues(),!this.graph.order)return e();var r=this.mouseCaptor,n=this.camera.isAnimated()||r.isMoving||r.draggedEvents||r.currentWheelDirection,i=this.camera.getState(),o=this.getDimensions(),a=this.getGraphDimensions(),u=this.getSetting("stagePadding")||0;for(var s in this.matrix=(0,f.matrixFromCamera)(i,o,a,u),this.invMatrix=(0,f.matrixFromCamera)(i,o,a,u,!0),this.correctionRatio=(0,f.getMatrixImpact)(this.matrix,i,o),this.nodePrograms)(c=this.nodePrograms[s]).bind(),c.bufferData(),c.render({matrix:this.matrix,width:this.width,height:this.height,ratio:i.ratio,correctionRatio:this.correctionRatio/i.ratio,scalingRatio:this.pixelRatio});if(!this.settings.hideEdgesOnMove||!n)for(var s in this.edgePrograms){var c;(c=this.edgePrograms[s]).bind(),c.bufferData(),c.render({matrix:this.matrix,width:this.width,height:this.height,ratio:i.ratio,correctionRatio:this.correctionRatio/i.ratio,scalingRatio:this.pixelRatio})}return this.settings.hideLabelsOnMove&&n||(this.renderLabels(),this.renderEdgeLabels(),this.renderHighlightedNodes()),e()},e.prototype.updateCachedValues=function(){var t=this.camera.getState().ratio;this.cameraSizeRatio=Math.sqrt(t)},e.prototype.getCamera=function(){return this.camera},e.prototype.getContainer=function(){return this.container},e.prototype.getGraph=function(){return this.graph},e.prototype.setGraph=function(t){t!==this.graph&&(this.unbindGraphHandlers(),this.nodeDataCache={},this.edgeDataCache={},this.displayedLabels.clear(),this.highlightedNodes.clear(),this.hoveredNode=null,this.hoveredEdge=null,this.nodesWithForcedLabels.length=0,this.edgesWithForcedLabels.length=0,null!==this.checkEdgesEventsFrame&&((0,f.cancelFrame)(this.checkEdgesEventsFrame),this.checkEdgesEventsFrame=null),this.graph=t,this.bindGraphHandlers(),this.process(),this.render())},e.prototype.getMouseCaptor=function(){return this.mouseCaptor},e.prototype.getTouchCaptor=function(){return this.touchCaptor},e.prototype.getDimensions=function(){return{width:this.width,height:this.height}},e.prototype.getGraphDimensions=function(){var t=this.customBBox||this.nodeExtent;return{width:t.x[1]-t.x[0]||1,height:t.y[1]-t.y[0]||1}},e.prototype.getNodeDisplayData=function(t){var e=this.nodeDataCache[t];return e?Object.assign({},e):void 0},e.prototype.getEdgeDisplayData=function(t){var e=this.edgeDataCache[t];return e?Object.assign({},e):void 0},e.prototype.getSettings=function(){return o({},this.settings)},e.prototype.getSetting=function(t){return this.settings[t]},e.prototype.setSetting=function(t,e){return this.settings[t]=e,(0,g.validateSettings)(this.settings),this.handleSettingsUpdate(),this.needToProcess=!0,this._scheduleRefresh(),this},e.prototype.updateSetting=function(t,e){return this.settings[t]=e(this.settings[t]),(0,g.validateSettings)(this.settings),this.handleSettingsUpdate(),this.needToProcess=!0,this._scheduleRefresh(),this},e.prototype.resize=function(){var t=this.width,e=this.height;if(this.width=this.container.offsetWidth,this.height=this.container.offsetHeight,this.pixelRatio=(0,f.getPixelRatio)(),0===this.width){if(!this.settings.allowInvalidContainer)throw new Error("Sigma: Container has no width. You can set the allowInvalidContainer setting to true to stop seeing this error.");this.width=1}if(0===this.height){if(!this.settings.allowInvalidContainer)throw new Error("Sigma: Container has no height. You can set the allowInvalidContainer setting to true to stop seeing this error.");this.height=1}if(t===this.width&&e===this.height)return this;for(var r in this.emit("resize"),this.elements){var n=this.elements[r];n.style.width=this.width+"px",n.style.height=this.height+"px"}for(var r in this.canvasContexts)this.elements[r].setAttribute("width",this.width*this.pixelRatio+"px"),this.elements[r].setAttribute("height",this.height*this.pixelRatio+"px"),1!==this.pixelRatio&&this.canvasContexts[r].scale(this.pixelRatio,this.pixelRatio);for(var r in this.webGLContexts)this.elements[r].setAttribute("width",this.width*this.pixelRatio+"px"),this.elements[r].setAttribute("height",this.height*this.pixelRatio+"px"),this.webGLContexts[r].viewport(0,0,this.width*this.pixelRatio,this.height*this.pixelRatio);return this},e.prototype.clear=function(){return this.webGLContexts.nodes.clear(this.webGLContexts.nodes.COLOR_BUFFER_BIT),this.webGLContexts.edges.clear(this.webGLContexts.edges.COLOR_BUFFER_BIT),this.webGLContexts.hoverNodes.clear(this.webGLContexts.hoverNodes.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},e.prototype.refresh=function(){return this.needToProcess=!0,this._refresh(),this},e.prototype.scheduleRefresh=function(){return this.needToProcess=!0,this._scheduleRefresh(),this},e.prototype.getViewportZoomedState=function(t,e){var r=this.camera.getState(),n=r.ratio,i=r.angle,o=r.x,a=r.y,u=e/n,s={x:this.width/2,y:this.height/2},c=this.viewportToFramedGraph(t),h=this.viewportToFramedGraph(s);return{angle:i,x:(c.x-h.x)*(1-u)+o,y:(c.y-h.y)*(1-u)+a,ratio:e}},e.prototype.viewRectangle=function(){var t=0*this.width/8,e=0*this.height/8,r=this.viewportToFramedGraph({x:0-t,y:0-e}),n=this.viewportToFramedGraph({x:this.width+t,y:0-e}),i=this.viewportToFramedGraph({x:0,y:this.height+e});return{x1:r.x,y1:r.y,x2:n.x,y2:n.y,height:n.y-i.y}},e.prototype.framedGraphToViewport=function(t,e){void 0===e&&(e={});var r=!!e.cameraState||!!e.viewportDimensions||!!e.graphDimensions,n=e.matrix?e.matrix:r?(0,f.matrixFromCamera)(e.cameraState||this.camera.getState(),e.viewportDimensions||this.getDimensions(),e.graphDimensions||this.getGraphDimensions(),e.padding||this.getSetting("stagePadding")||0):this.matrix,i=(0,y.multiplyVec2)(n,t);return{x:(1+i.x)*this.width/2,y:(1-i.y)*this.height/2}},e.prototype.viewportToFramedGraph=function(t,e){void 0===e&&(e={});var r=!!e.cameraState||!!e.viewportDimensions||!e.graphDimensions,n=e.matrix?e.matrix:r?(0,f.matrixFromCamera)(e.cameraState||this.camera.getState(),e.viewportDimensions||this.getDimensions(),e.graphDimensions||this.getGraphDimensions(),e.padding||this.getSetting("stagePadding")||0,!0):this.invMatrix,i=(0,y.multiplyVec2)(n,{x:t.x/this.width*2-1,y:1-t.y/this.height*2});return isNaN(i.x)&&(i.x=0),isNaN(i.y)&&(i.y=0),i},e.prototype.viewportToGraph=function(t,e){return void 0===e&&(e={}),this.normalizationFunction.inverse(this.viewportToFramedGraph(t,e))},e.prototype.graphToViewport=function(t,e){return void 0===e&&(e={}),this.framedGraphToViewport(this.normalizationFunction(t),e)},e.prototype.getBBox=function(){return(0,f.graphExtent)(this.graph)},e.prototype.getCustomBBox=function(){return this.customBBox},e.prototype.setCustomBBox=function(t){return this.customBBox=t,this._scheduleRefresh(),this},e.prototype.kill=function(){this.emit("kill"),this.removeAllListeners(),this.camera.removeListener("updated",this.activeListeners.camera),window.removeEventListener("resize",this.activeListeners.handleResize),this.mouseCaptor.kill(),this.touchCaptor.kill(),this.unbindGraphHandlers(),this.quadtree=new l.default,this.nodeDataCache={},this.edgeDataCache={},this.nodesWithForcedLabels=[],this.edgesWithForcedLabels=[],this.highlightedNodes.clear(),this.renderFrame&&((0,f.cancelFrame)(this.renderFrame),this.renderFrame=null),this.renderHighlightedNodesFrame&&((0,f.cancelFrame)(this.renderHighlightedNodesFrame),this.renderHighlightedNodesFrame=null);for(var t=this.container;t.firstChild;)t.removeChild(t.firstChild)},e.prototype.scaleSize=function(t){return t/this.cameraSizeRatio},e.prototype.getCanvases=function(){return o({},this.elements)},e}(d.TypedEventEmitter);e.default=_},30432:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.TypedEventEmitter=void 0;var o=function(t){function e(){var e=t.call(this)||this;return e.rawEmitter=e,e}return i(e,t),e}(r(22699).EventEmitter);e.TypedEventEmitter=o},31181:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.animateNodes=e.ANIMATE_DEFAULTS=void 0;var i=r(88586),o=n(r(2383));e.ANIMATE_DEFAULTS={easing:"quadraticInOut",duration:150},e.animateNodes=function(t,r,n,a){var u=Object.assign({},e.ANIMATE_DEFAULTS,n),s="function"==typeof u.easing?u.easing:o.default[u.easing],c=Date.now(),h={};for(var l in r){var d=r[l];for(var f in h[l]={},d)h[l][f]=t.getNodeAttribute(l,f)}var p=null,g=function(){p=null;var e=(Date.now()-c)/u.duration;if(e>=1){for(var n in r){var o=r[n];for(var l in o)t.setNodeAttribute(n,l,o[l])}"function"==typeof a&&a()}else{for(var n in e=s(e),r){o=r[n];var d=h[n];for(var l in o)t.setNodeAttribute(n,l,o[l]*e+d[l]*(1-e))}p=(0,i.requestFrame)(g)}};return g(),function(){p&&(0,i.cancelFrame)(p)}}},71078:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HTML_COLORS=void 0,e.HTML_COLORS={black:"#000000",silver:"#C0C0C0",gray:"#808080",grey:"#808080",white:"#FFFFFF",maroon:"#800000",red:"#FF0000",purple:"#800080",fuchsia:"#FF00FF",green:"#008000",lime:"#00FF00",olive:"#808000",yellow:"#FFFF00",navy:"#000080",blue:"#0000FF",teal:"#008080",aqua:"#00FFFF",darkblue:"#00008B",mediumblue:"#0000CD",darkgreen:"#006400",darkcyan:"#008B8B",deepskyblue:"#00BFFF",darkturquoise:"#00CED1",mediumspringgreen:"#00FA9A",springgreen:"#00FF7F",cyan:"#00FFFF",midnightblue:"#191970",dodgerblue:"#1E90FF",lightseagreen:"#20B2AA",forestgreen:"#228B22",seagreen:"#2E8B57",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",limegreen:"#32CD32",mediumseagreen:"#3CB371",turquoise:"#40E0D0",royalblue:"#4169E1",steelblue:"#4682B4",darkslateblue:"#483D8B",mediumturquoise:"#48D1CC",indigo:"#4B0082",darkolivegreen:"#556B2F",cadetblue:"#5F9EA0",cornflowerblue:"#6495ED",rebeccapurple:"#663399",mediumaquamarine:"#66CDAA",dimgray:"#696969",dimgrey:"#696969",slateblue:"#6A5ACD",olivedrab:"#6B8E23",slategray:"#708090",slategrey:"#708090",lightslategray:"#778899",lightslategrey:"#778899",mediumslateblue:"#7B68EE",lawngreen:"#7CFC00",chartreuse:"#7FFF00",aquamarine:"#7FFFD4",skyblue:"#87CEEB",lightskyblue:"#87CEFA",blueviolet:"#8A2BE2",darkred:"#8B0000",darkmagenta:"#8B008B",saddlebrown:"#8B4513",darkseagreen:"#8FBC8F",lightgreen:"#90EE90",mediumpurple:"#9370DB",darkviolet:"#9400D3",palegreen:"#98FB98",darkorchid:"#9932CC",yellowgreen:"#9ACD32",sienna:"#A0522D",brown:"#A52A2A",darkgray:"#A9A9A9",darkgrey:"#A9A9A9",lightblue:"#ADD8E6",greenyellow:"#ADFF2F",paleturquoise:"#AFEEEE",lightsteelblue:"#B0C4DE",powderblue:"#B0E0E6",firebrick:"#B22222",darkgoldenrod:"#B8860B",mediumorchid:"#BA55D3",rosybrown:"#BC8F8F",darkkhaki:"#BDB76B",mediumvioletred:"#C71585",indianred:"#CD5C5C",peru:"#CD853F",chocolate:"#D2691E",tan:"#D2B48C",lightgray:"#D3D3D3",lightgrey:"#D3D3D3",thistle:"#D8BFD8",orchid:"#DA70D6",goldenrod:"#DAA520",palevioletred:"#DB7093",crimson:"#DC143C",gainsboro:"#DCDCDC",plum:"#DDA0DD",burlywood:"#DEB887",lightcyan:"#E0FFFF",lavender:"#E6E6FA",darksalmon:"#E9967A",violet:"#EE82EE",palegoldenrod:"#EEE8AA",lightcoral:"#F08080",khaki:"#F0E68C",aliceblue:"#F0F8FF",honeydew:"#F0FFF0",azure:"#F0FFFF",sandybrown:"#F4A460",wheat:"#F5DEB3",beige:"#F5F5DC",whitesmoke:"#F5F5F5",mintcream:"#F5FFFA",ghostwhite:"#F8F8FF",salmon:"#FA8072",antiquewhite:"#FAEBD7",linen:"#FAF0E6",lightgoldenrodyellow:"#FAFAD2",oldlace:"#FDF5E6",magenta:"#FF00FF",deeppink:"#FF1493",orangered:"#FF4500",tomato:"#FF6347",hotpink:"#FF69B4",coral:"#FF7F50",darkorange:"#FF8C00",lightsalmon:"#FFA07A",orange:"#FFA500",lightpink:"#FFB6C1",pink:"#FFC0CB",gold:"#FFD700",peachpuff:"#FFDAB9",navajowhite:"#FFDEAD",moccasin:"#FFE4B5",bisque:"#FFE4C4",mistyrose:"#FFE4E1",blanchedalmond:"#FFEBCD",papayawhip:"#FFEFD5",lavenderblush:"#FFF0F5",seashell:"#FFF5EE",cornsilk:"#FFF8DC",lemonchiffon:"#FFFACD",floralwhite:"#FFFAF0",snow:"#FFFAFA",lightyellow:"#FFFFE0",ivory:"#FFFFF0"}},2383:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.cubicInOut=e.cubicOut=e.cubicIn=e.quadraticInOut=e.quadraticOut=e.quadraticIn=e.linear=void 0,e.linear=function(t){return t},e.quadraticIn=function(t){return t*t},e.quadraticOut=function(t){return t*(2-t)},e.quadraticInOut=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},e.cubicIn=function(t){return t*t*t},e.cubicOut=function(t){return--t*t*t+1},e.cubicInOut=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)};var r={linear:e.linear,quadraticIn:e.quadraticIn,quadraticOut:e.quadraticOut,quadraticInOut:e.quadraticInOut,cubicIn:e.cubicIn,cubicOut:e.cubicOut,cubicInOut:e.cubicInOut};e.default=r},38073:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.doEdgeCollideWithPoint=e.isPixelColored=void 0,e.isPixelColored=function(t,e,r){var n=new Uint8Array(4);return t.readPixels(e,t.drawingBufferHeight-r,1,1,t.RGBA,t.UNSIGNED_BYTE,n),n[3]>0},e.doEdgeCollideWithPoint=function(t,e,r,n,i,o,a){return!(t<r-a&&t<i-a||e<n-a&&e<o-a||t>r+a&&t>i+a||e>n+a&&e>o+a||!(Math.abs((i-r)*(n-e)-(r-t)*(o-n))/Math.sqrt(Math.pow(i-r,2)+Math.pow(o-n,2))<a/2))}},88586:function(t,e,r){"use strict";var n=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.validateGraph=e.canUse32BitsIndices=e.extractPixel=e.getMatrixImpact=e.matrixFromCamera=e.getCorrectionRatio=e.floatColor=e.floatArrayColor=e.parseColor=e.zIndexOrdering=e.createNormalizationFunction=e.graphExtent=e.getPixelRatio=e.createElement=e.cancelFrame=e.requestFrame=e.assignDeep=e.assign=e.isPlainObject=void 0;var o=i(r(31880)),a=r(42237),u=r(71078);function s(t){return"object"==typeof t&&null!==t&&t.constructor===Object}e.isPlainObject=s,e.assign=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];t=t||{};for(var n=0,i=e.length;n<i;n++){var o=e[n];o&&Object.assign(t,o)}return t},e.assignDeep=function t(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];e=e||{};for(var i=0,o=r.length;i<o;i++){var a=r[i];if(a)for(var u in a)s(a[u])?e[u]=t(e[u],a[u]):e[u]=a[u]}return e},e.requestFrame="undefined"!=typeof requestAnimationFrame?function(t){return requestAnimationFrame(t)}:function(t){return setTimeout(t,0)},e.cancelFrame="undefined"!=typeof cancelAnimationFrame?function(t){return cancelAnimationFrame(t)}:function(t){return clearTimeout(t)},e.createElement=function(t,e,r){var n=document.createElement(t);if(e)for(var i in e)n.style[i]=e[i];if(r)for(var i in r)n.setAttribute(i,r[i]);return n},e.getPixelRatio=function(){return void 0!==window.devicePixelRatio?window.devicePixelRatio:1},e.graphExtent=function(t){if(!t.order)return{x:[0,1],y:[0,1]};var e=1/0,r=-1/0,n=1/0,i=-1/0;return t.forEachNode((function(t,o){var a=o.x,u=o.y;a<e&&(e=a),a>r&&(r=a),u<n&&(n=u),u>i&&(i=u)})),{x:[e,r],y:[n,i]}},e.createNormalizationFunction=function(t){var e=n(t.x,2),r=e[0],i=e[1],o=n(t.y,2),a=o[0],u=o[1],s=Math.max(i-r,u-a),c=(i+r)/2,h=(u+a)/2;(0===s||Math.abs(s)===1/0||isNaN(s))&&(s=1),isNaN(c)&&(c=0),isNaN(h)&&(h=0);var l=function(t){return{x:.5+(t.x-c)/s,y:.5+(t.y-h)/s}};return l.applyTo=function(t){t.x=.5+(t.x-c)/s,t.y=.5+(t.y-h)/s},l.inverse=function(t){return{x:c+s*(t.x-.5),y:h+s*(t.y-.5)}},l.ratio=s,l},e.zIndexOrdering=function(t,e,r){return r.sort((function(t,r){var n=e(t)||0,i=e(r)||0;return n<i?-1:n>i?1:0}))};var c=new Int8Array(4),h=new Int32Array(c.buffer,0,1),l=new Float32Array(c.buffer,0,1),d=/^\s*rgba?\s*\(/,f=/^\s*rgba?\s*\(\s*([0-9]*)\s*,\s*([0-9]*)\s*,\s*([0-9]*)(?:\s*,\s*(.*)?)?\)\s*$/;function p(t){var e=0,r=0,n=0,i=1;if("#"===t[0])4===t.length?(e=parseInt(t.charAt(1)+t.charAt(1),16),r=parseInt(t.charAt(2)+t.charAt(2),16),n=parseInt(t.charAt(3)+t.charAt(3),16)):(e=parseInt(t.charAt(1)+t.charAt(2),16),r=parseInt(t.charAt(3)+t.charAt(4),16),n=parseInt(t.charAt(5)+t.charAt(6),16)),9===t.length&&(i=parseInt(t.charAt(7)+t.charAt(8),16)/255);else if(d.test(t)){var o=t.match(f);o&&(e=+o[1],r=+o[2],n=+o[3],o[4]&&(i=+o[4]))}return{r:e,g:r,b:n,a:i}}e.parseColor=p;var g={};for(var v in u.HTML_COLORS)g[v]=y(u.HTML_COLORS[v]),g[u.HTML_COLORS[v]]=g[v];function y(t){if(void 0!==g[t])return g[t];var e=p(t),r=e.r,n=e.g,i=e.b,o=e.a;o=255*o|0,h[0]=4278190079&(o<<24|i<<16|n<<8|r);var a=l[0];return g[t]=a,a}function m(t,e){var r=t.height/t.width,n=e.height/e.width;return r<1&&n>1||r>1&&n<1?1:Math.min(Math.max(n,1/n),Math.max(1/r,r))}e.floatArrayColor=function(t){var e=p(t=u.HTML_COLORS[t]||t),r=e.r,n=e.g,i=e.b,o=e.a;return new Float32Array([r/255,n/255,i/255,o])},e.floatColor=y,e.getCorrectionRatio=m,e.matrixFromCamera=function(t,e,r,n,i){var o=t.angle,u=t.ratio,s=t.x,c=t.y,h=e.width,l=e.height,d=(0,a.identity)(),f=Math.min(h,l)-2*n,p=m(e,r);return i?((0,a.multiply)(d,(0,a.translate)((0,a.identity)(),s,c)),(0,a.multiply)(d,(0,a.scale)((0,a.identity)(),u)),(0,a.multiply)(d,(0,a.rotate)((0,a.identity)(),o)),(0,a.multiply)(d,(0,a.scale)((0,a.identity)(),h/f/2/p,l/f/2/p))):((0,a.multiply)(d,(0,a.scale)((0,a.identity)(),f/h*2*p,f/l*2*p)),(0,a.multiply)(d,(0,a.rotate)((0,a.identity)(),-o)),(0,a.multiply)(d,(0,a.scale)((0,a.identity)(),1/u)),(0,a.multiply)(d,(0,a.translate)((0,a.identity)(),-s,-c))),d},e.getMatrixImpact=function(t,e,r){var n=(0,a.multiplyVec2)(t,{x:Math.cos(e.angle),y:Math.sin(e.angle)},0),i=n.x,o=n.y;return 1/Math.sqrt(Math.pow(i,2)+Math.pow(o,2))/r.width},e.extractPixel=function(t,e,r,n){var i=n||new Uint8Array(4);return t.readPixels(e,r,1,1,t.RGBA,t.UNSIGNED_BYTE,i),i},e.canUse32BitsIndices=function(t){return"undefined"!=typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext||!!t.getExtension("OES_element_index_uint")},e.validateGraph=function(t){if(!(0,o.default)(t))throw new Error("Sigma: invalid graph instance.");t.forEachNode((function(t,e){if(!Number.isFinite(e.x)||!Number.isFinite(e.y))throw new Error("Sigma: Coordinates of node ".concat(t," are invalid. A node must have a numeric 'x' and 'y' attribute."))}))}},42237:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.multiplyVec2=e.multiply=e.translate=e.rotate=e.scale=e.identity=void 0,e.identity=function(){return Float32Array.of(1,0,0,0,1,0,0,0,1)},e.scale=function(t,e,r){return t[0]=e,t[4]="number"==typeof r?r:e,t},e.rotate=function(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=r,t[3]=-r,t[4]=n,t},e.translate=function(t,e,r){return t[6]=e,t[7]=r,t},e.multiply=function(t,e){var r=t[0],n=t[1],i=t[2],o=t[3],a=t[4],u=t[5],s=t[6],c=t[7],h=t[8],l=e[0],d=e[1],f=e[2],p=e[3],g=e[4],v=e[5],y=e[6],m=e[7],b=e[8];return t[0]=l*r+d*o+f*s,t[1]=l*n+d*a+f*c,t[2]=l*i+d*u+f*h,t[3]=p*r+g*o+v*s,t[4]=p*n+g*a+v*c,t[5]=p*i+g*u+v*h,t[6]=y*r+m*o+b*s,t[7]=y*n+m*a+b*c,t[8]=y*i+m*u+b*h,t},e.multiplyVec2=function(t,e,r){void 0===r&&(r=1);var n=t[0],i=t[1],o=t[3],a=t[4],u=t[6],s=t[7],c=e.x,h=e.y;return{x:c*n+h*o+u*r,y:c*i+h*a+s*r}}}}]);
|
|
3
3
|
//# sourceMappingURL=3144.js.map
|