50 lines
666 KiB
JavaScript
50 lines
666 KiB
JavaScript
|
|
/**
|
||
|
|
* vis-network
|
||
|
|
* https://visjs.github.io/vis-network/
|
||
|
|
*
|
||
|
|
* A dynamic, browser-based visualization library.
|
||
|
|
*
|
||
|
|
* @version 9.1.2
|
||
|
|
* @date 2022-03-28T20:13:51.046Z
|
||
|
|
*
|
||
|
|
* @copyright (c) 2011-2017 Almende B.V, http://almende.com
|
||
|
|
* @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs
|
||
|
|
*
|
||
|
|
* @license
|
||
|
|
* vis.js is dual licensed under both
|
||
|
|
*
|
||
|
|
* 1. The Apache 2.0 License
|
||
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||
|
|
*
|
||
|
|
* and
|
||
|
|
*
|
||
|
|
* 2. The MIT License
|
||
|
|
* http://opensource.org/licenses/MIT
|
||
|
|
*
|
||
|
|
* vis.js may be distributed under either license.
|
||
|
|
*/
|
||
|
|
!function(g,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((g="undefined"!=typeof globalThis?globalThis:g||self).vis=g.vis||{})}(this,(function(g){var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},A=function(g){return g&&g.Math==Math&&g},e=A("object"==typeof globalThis&&globalThis)||A("object"==typeof window&&window)||A("object"==typeof self&&self)||A("object"==typeof t&&t)||function(){return this}()||Function("return this")(),C=function(g){try{return!!g()}catch(g){return!0}},I=!C((function(){var g=function(){}.bind();return"function"!=typeof g||g.hasOwnProperty("prototype")})),i=I,o=Function.prototype,n=o.apply,r=o.call,s="object"==typeof Reflect&&Reflect.apply||(i?r.bind(n):function(){return r.apply(n,arguments)}),a=I,d=Function.prototype,h=d.bind,l=d.call,c=a&&h.bind(l,l),u=a?function(g){return g&&c(g)}:function(g){return g&&function(){return l.apply(g,arguments)}},p=function(g){return"function"==typeof g},f={},v=!C((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),y=I,m=Function.prototype.call,b=y?m.bind(m):function(){return m.apply(m,arguments)},w={},k={}.propertyIsEnumerable,x=Object.getOwnPropertyDescriptor,E=x&&!k.call({1:2},1);w.f=E?function(g){var t=x(this,g);return!!t&&t.enumerable}:k;var O,T,D=function(g,t){return{enumerable:!(1&g),configurable:!(2&g),writable:!(4&g),value:t}},N=u,R=N({}.toString),P=N("".slice),M=function(g){return P(R(g),8,-1)},B=u,z=C,Z=M,S=e.Object,F=B("".split),G=z((function(){return!S("z").propertyIsEnumerable(0)}))?function(g){return"String"==Z(g)?F(g,""):S(g)}:S,L=e.TypeError,j=function(g){if(null==g)throw L("Can't call method on "+g);return g},V=G,Y=j,W=function(g){return V(Y(g))},Q=p,_=function(g){return"object"==typeof g?null!==g:Q(g)},U={},H=U,K=e,X=p,J=function(g){return X(g)?g:void 0},q=function(g,t){return arguments.length<2?J(H[g])||J(K[g]):H[g]&&H[g][t]||K[g]&&K[g][t]},$=u({}.isPrototypeOf),gg=q("navigator","userAgent")||"",tg=e,Ag=gg,eg=tg.process,Cg=tg.Deno,Ig=eg&&eg.versions||Cg&&Cg.version,ig=Ig&&Ig.v8;ig&&(T=(O=ig.split("."))[0]>0&&O[0]<4?1:+(O[0]+O[1])),!T&&Ag&&(!(O=Ag.match(/Edge\/(\d+)/))||O[1]>=74)&&(O=Ag.match(/Chrome\/(\d+)/))&&(T=+O[1]);var og=T,ng=og,rg=C,sg=!!Object.getOwnPropertySymbols&&!rg((function(){var g=Symbol();return!String(g)||!(Object(g)instanceof Symbol)||!Symbol.sham&&ng&&ng<41})),ag=sg&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,dg=q,hg=p,lg=$,cg=ag,ug=e.Object,pg=cg?function(g){return"symbol"==typeof g}:function(g){var t=dg("Symbol");return hg(t)&&lg(t.prototype,ug(g))},fg=e.String,vg=function(g){try{return fg(g)}catch(g){return"Object"}},yg=p,mg=vg,bg=e.TypeError,wg=function(g){if(yg(g))return g;throw bg(mg(g)+" is not a function")},kg=wg,xg=function(g,t){var A=g[t];return null==A?void 0:kg(A)},Eg=b,Og=p,Tg=_,Dg=e.TypeError,Ng={exports:{}},Rg=e,Pg=Object.defineProperty,Mg=function(g,t){try{Pg(Rg,g,{value:t,configurable:!0,writable:!0})}catch(A){Rg[g]=t}return t},Bg="__core-js_shared__",zg=e[Bg]||Mg(Bg,{}),Zg=zg;(Ng.exports=function(g,t){return Zg[g]||(Zg[g]=void 0!==t?t:{})})("versions",[]).push({version:"3.21.1",mode:"pure",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.21.1/LICENSE",source:"https://github.com/zloirock/core-js"});var Sg=j,Fg=e.Object,Gg=function(g){return Fg(Sg(g))},Lg=Gg,jg=u({}.hasOwnProperty),Vg=Object.hasOwn||function(g,t){return jg(Lg(g),t)},Yg=u,Wg=0,Qg=Math.random(),_g=Yg(1..toString),Ug=function(g){return"Symbol("+(void 0===g?"":g)+")_"+_g(++Wg+Qg,36)},Hg=e,Kg=Ng.exports,Xg=Vg,Jg=Ug,qg=sg,$g=ag,gt=Kg("wks"),tt=Hg.Symbol,At=tt&&tt.for,et=$g?tt:tt&&tt.withoutSetter||Jg,Ct=function(g){if(!Xg(gt,g)||!qg&&"string"!=typeof gt[g]){var t="Symbol."+g;qg&&Xg(tt,g)?gt[g]=tt[g]:gt[g]=$g&&At?At(t):et(t)}return gt[g]},It=b,it=_,ot=pg,nt=xg,rt=function(g,t){var A,e;if("string"===t&&Og(A=g.toString)&&!Tg(e=Eg(A,g)))return e;if(Og(A=g.valueOf)&&!Tg(e=Eg(A,g)))retu
|
||
|
|
/*! Hammer.JS - v2.0.17-rc - 2019-12-16
|
||
|
|
* http://naver.github.io/egjs
|
||
|
|
*
|
||
|
|
* Forked By Naver egjs
|
||
|
|
* Copyright (c) hammerjs
|
||
|
|
* Licensed under the MIT license */
|
||
|
|
function Pc(){return Pc=Object.assign||function(g){for(var t=1;t<arguments.length;t++){var A=arguments[t];for(var e in A)Object.prototype.hasOwnProperty.call(A,e)&&(g[e]=A[e])}return g},Pc.apply(this,arguments)}function Mc(g,t){g.prototype=Object.create(t.prototype),g.prototype.constructor=g,g.__proto__=t}function Bc(g){if(void 0===g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g}xc="function"!=typeof Object.assign?function(g){if(null==g)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(g),A=1;A<arguments.length;A++){var e=arguments[A];if(null!=e)for(var C in e)e.hasOwnProperty(C)&&(t[C]=e[C])}return t}:Object.assign;var zc,Zc=xc,Sc=["","webkit","Moz","MS","ms","o"],Fc="undefined"==typeof document?{style:{}}:document.createElement("div"),Gc=Math.round,Lc=Math.abs,jc=Date.now;function Vc(g,t){for(var A,e,C=t[0].toUpperCase()+t.slice(1),I=0;I<Sc.length;){if((e=(A=Sc[I])?A+C:t)in g)return e;I++}}zc="undefined"==typeof window?{}:window;var Yc=Vc(Fc.style,"touchAction"),Wc=void 0!==Yc;var Qc="compute",_c="auto",Uc="manipulation",Hc="none",Kc="pan-x",Xc="pan-y",Jc=function(){if(!Wc)return!1;var g={},t=zc.CSS&&zc.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(A){return g[A]=!t||zc.CSS.supports("touch-action",A)})),g}(),qc="ontouchstart"in zc,$c=void 0!==Vc(zc,"PointerEvent"),gu=qc&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),tu="touch",Au="mouse",eu=16,Cu=24,Iu=["x","y"],iu=["clientX","clientY"];function ou(g,t,A){var e;if(g)if(g.forEach)g.forEach(t,A);else if(void 0!==g.length)for(e=0;e<g.length;)t.call(A,g[e],e,g),e++;else for(e in g)g.hasOwnProperty(e)&&t.call(A,g[e],e,g)}function nu(g,t){return"function"==typeof g?g.apply(t&&t[0]||void 0,t):g}function ru(g,t){return g.indexOf(t)>-1}var su=function(){function g(g,t){this.manager=g,this.set(t)}var t=g.prototype;return t.set=function(g){g===Qc&&(g=this.compute()),Wc&&this.manager.element.style&&Jc[g]&&(this.manager.element.style[Yc]=g),this.actions=g.toLowerCase().trim()},t.update=function(){this.set(this.manager.options.touchAction)},t.compute=function(){var g=[];return ou(this.manager.recognizers,(function(t){nu(t.options.enable,[t])&&(g=g.concat(t.getTouchAction()))})),function(g){if(ru(g,Hc))return Hc;var t=ru(g,Kc),A=ru(g,Xc);return t&&A?Hc:t||A?t?Kc:Xc:ru(g,Uc)?Uc:_c}(g.join(" "))},t.preventDefaults=function(g){var t=g.srcEvent,A=g.offsetDirection;if(this.manager.session.prevented)t.preventDefault();else{var e=this.actions,C=ru(e,Hc)&&!Jc.none,I=ru(e,Xc)&&!Jc["pan-y"],i=ru(e,Kc)&&!Jc["pan-x"];if(C){var o=1===g.pointers.length,n=g.distance<2,r=g.deltaTime<250;if(o&&n&&r)return}if(!i||!I)return C||I&&6&A||i&&A&Cu?this.preventSrc(t):void 0}},t.preventSrc=function(g){this.manager.session.prevented=!0,g.preventDefault()},g}();function au(g,t){for(;g;){if(g===t)return!0;g=g.parentNode}return!1}function du(g){var t=g.length;if(1===t)return{x:Gc(g[0].clientX),y:Gc(g[0].clientY)};for(var A=0,e=0,C=0;C<t;)A+=g[C].clientX,e+=g[C].clientY,C++;return{x:Gc(A/t),y:Gc(e/t)}}function hu(g){for(var t=[],A=0;A<g.pointers.length;)t[A]={clientX:Gc(g.pointers[A].clientX),clientY:Gc(g.pointers[A].clientY)},A++;return{timeStamp:jc(),pointers:t,center:du(t),deltaX:g.deltaX,deltaY:g.deltaY}}function lu(g,t,A){A||(A=Iu);var e=t[A[0]]-g[A[0]],C=t[A[1]]-g[A[1]];return Math.sqrt(e*e+C*C)}function cu(g,t,A){A||(A=Iu);var e=t[A[0]]-g[A[0]],C=t[A[1]]-g[A[1]];return 180*Math.atan2(C,e)/Math.PI}function uu(g,t){return g===t?1:Lc(g)>=Lc(t)?g<0?2:4:t<0?8:eu}function pu(g,t,A){return{x:t/g||0,y:A/g||0}}function fu(g,t){var A=g.session,e=t.pointers,C=e.length;A.firstInput||(A.firstInput=hu(t)),C>1&&!A.firstMultiple?A.firstMultiple=hu(t):1===C&&(A.firstMultiple=!1);var I=A.firstInput,i=A.firstMultiple,o=i?i.center:I.center,n=t.center=du(e);t.timeStamp=jc(),t.deltaTime=t.timeStamp-I.timeStamp,t.angle=cu(o,n),t.distance=lu(o,n),function(g,t){var A=t.center,e=g.offsetDelta||{},C=g.prevDelta||{},I=g.prevInput||{};1!==t.eventType&&4!==I.eventType||(C=g.prevDelta=
|
||
|
|
/*! *****************************************************************************
|
||
|
|
Copyright (c) Microsoft Corporation.
|
||
|
|
|
||
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
||
|
|
purpose with or without fee is hereby granted.
|
||
|
|
|
||
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||
|
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||
|
|
PERFORMANCE OF THIS SOFTWARE.
|
||
|
|
***************************************************************************** */
|
||
|
|
function rO(g,t,A,e){if("a"===A&&!e)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?g!==t||!e:!t.has(g))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===A?e:"a"===A?e.call(g):e?e.value:t.get(g)}function sO(g,t,A,e,C){if("m"===e)throw new TypeError("Private method is not writable");if("a"===e&&!C)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?g!==t||!C:!t.has(g))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===e?C.call(g,A):C?C.value=A:t.set(g,A),A}function aO(g,t){var A=void 0!==td&&An(g)||g["@@iterator"];if(!A){if(sd(g)||(A=function(g,t){var A;if(!g)return;if("string"==typeof g)return dO(g,t);var e=nd(A=Object.prototype.toString.call(g)).call(A,8,-1);"Object"===e&&g.constructor&&(e=g.constructor.name);if("Map"===e||"Set"===e)return Fo(g);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return dO(g,t)}(g))||t&&g&&"number"==typeof g.length){A&&(g=A);var e=0,C=function(){};return{s:C,n:function(){return e>=g.length?{done:!0}:{done:!1,value:g[e++]}},e:function(g){throw g},f:C}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var I,i=!0,o=!1;return{s:function(){A=A.call(g)},n:function(){var g=A.next();return i=g.done,g},e:function(g){o=!0,I=g},f:function(){try{i||null==A.return||A.return()}finally{if(o)throw I}}}}function dO(g,t){(null==t||t>g.length)&&(t=g.length);for(var A=0,e=new Array(t);A<t;A++)e[A]=g[A];return e}function hO(g,t){var A,e=new Jm,C=aO(t);try{for(C.s();!(A=C.n()).done;){var I=A.value;g.has(I)||e.add(I)}}catch(g){C.e(g)}finally{C.f()}return e}var lO=function(){function g(){Us(this,g),eO.set(this,new Jm),CO.set(this,new Jm)}return Xs(g,[{key:"size",get:function(){return rO(this,CO,"f").size}},{key:"add",value:function(){for(var g=arguments.length,t=new Array(g),A=0;A<g;A++)t[A]=arguments[A];for(var e=0,C=t;e<C.length;e++){var I=C[e];rO(this,CO,"f").add(I)}}},{key:"delete",value:function(){for(var g=arguments.length,t=new Array(g),A=0;A<g;A++)t[A]=arguments[A];for(var e=0,C=t;e<C.length;e++){var I=C[e];rO(this,CO,"f").delete(I)}}},{key:"clear",value:function(){rO(this,CO,"f").clear()}},{key:"getSelection",value:function(){return gd(rO(this,CO,"f"))}},{key:"getChanges",value:function(){return{added:gd(hO(rO(this,eO,"f"),rO(this,CO,"f"))),deleted:gd(hO(rO(this,CO,"f"),rO(this,eO,"f"))),previous:gd(new Jm(rO(this,eO,"f"))),current:gd(new Jm(rO(this,CO,"f")))}}},{key:"commit",value:function(){var g=this.getChanges();sO(this,eO,rO(this,CO,"f"),"f"),sO(this,CO,new Jm(rO(this,eO,"f")),"f");var t,A=aO(g.added);try{for(A.s();!(t=A.n()).done;){t.value.select()}}catch(g){A.e(g)}finally{A.f()}var e,C=aO(g.deleted);try{for(C.s();!(e=C.n()).done;){e.value.unselect()}}catch(g){C.e(g)}finally{C.f()}return g}}]),g}();eO=new nO,CO=new nO;var cO=function(){function g(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){};Us(this,g),IO.set(this,new lO),iO.set(this,new lO),oO.set(this,void 0),sO(this,oO,t,"f")}return Xs(g,[{key:"sizeNodes",get:function(){return rO(this,IO,"f").size}},{key:"sizeEdges",get:function(){return rO(this,iO,"f").size}},{key:"getNodes",value:function(){return rO(this,IO,"f").getSelection()}},{key:"getEdges",value:function(){return rO(this,iO,"f").getSelection()}},{key:"addNodes",value:function(){var g;(g=rO(this,IO,"f")).add.apply(g,arguments)}},{key:"addEdges",value:function(){var g;(g=rO(this,iO,"f")).add.apply(g,arguments)}},{key:"deleteNodes",value:function(g){rO(this,IO,"f").delete(g)}},{key:"deleteEdges",value:function(g){rO(this,iO,"f").delete(g)}},{key:"clear",value:function(){rO(this,IO,"f").clear(),rO(this,iO,"f").clear()}},{key:"commit",value:function(){for(var g,t,A={nodes:rO(this,IO,"f").commit(),edges:rO(this,iO,"f").commit()},e=arguments.length,C=new Array(e),I=0;I<e;I++)C[I]=arguments[I];return(g=rO(this,oO,"f")).call.apply(g,od(t=[this
|
||
|
|
//# sourceMappingURL=vis-network.min.js.map
|