lcars-dash
Version:
LCARS inspired multi-window dashboard
8 lines (7 loc) • 319 kB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.cytoscape=t():e.cytoscape=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=117)}([function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=n(4),a=i?i.navigator:null,o=i?i.document:null,s=r(""),l=r({}),u=r(function(){}),c="undefined"==typeof HTMLElement?"undefined":r(HTMLElement),d=function(e){return e&&e.instanceString&&h.fn(e.instanceString)?e.instanceString():null},h={defined:function(e){return null!=e},string:function(e){return null!=e&&(void 0===e?"undefined":r(e))==s},fn:function(e){return null!=e&&(void 0===e?"undefined":r(e))===u},array:function(e){return Array.isArray?Array.isArray(e):null!=e&&e instanceof Array},plainObject:function(e){return null!=e&&(void 0===e?"undefined":r(e))===l&&!h.array(e)&&e.constructor===Object},object:function(e){return null!=e&&(void 0===e?"undefined":r(e))===l},number:function(e){return null!=e&&(void 0===e?"undefined":r(e))===r(1)&&!isNaN(e)},integer:function(e){return h.number(e)&&Math.floor(e)===e},bool:function(e){return null!=e&&(void 0===e?"undefined":r(e))===r(!0)},htmlElement:function(e){return"undefined"===c?void 0:null!=e&&e instanceof HTMLElement},elementOrCollection:function(e){return h.element(e)||h.collection(e)},element:function(e){return"collection"===d(e)&&e._private.single},collection:function(e){return"collection"===d(e)&&!e._private.single},core:function(e){return"core"===d(e)},style:function(e){return"style"===d(e)},stylesheet:function(e){return"stylesheet"===d(e)},event:function(e){return"event"===d(e)},thread:function(e){return"thread"===d(e)},fabric:function(e){return"fabric"===d(e)},emptyString:function(e){return void 0===e||null===e||!(""!==e&&!e.match(/^\s+$/))},nonemptyString:function(e){return!(!e||!h.string(e)||""===e||e.match(/^\s+$/))},domElement:function(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement},boundingBox:function(e){return h.plainObject(e)&&h.number(e.x1)&&h.number(e.x2)&&h.number(e.y1)&&h.number(e.y2)},promise:function(e){return h.object(e)&&h.fn(e.then)},touch:function(){return i&&("ontouchstart"in i||i.DocumentTouch&&o instanceof DocumentTouch)},gecko:function(){return i&&("undefined"!=typeof InstallTrigger||"MozAppearance"in o.documentElement.style)},webkit:function(){return i&&("undefined"!=typeof webkitURL||"WebkitAppearance"in o.documentElement.style)},chromium:function(){return i&&"undefined"!=typeof chrome},khtml:function(){return a&&a.vendor.match(/kde/i)},khtmlEtc:function(){return h.khtml()||h.webkit()||h.chromium()},ms:function(){return a&&a.userAgent.match(/msie|trident|edge/i)},windows:function(){return a&&a.appVersion.match(/Win/i)},mac:function(){return a&&a.appVersion.match(/Mac/i)},linux:function(){return a&&a.appVersion.match(/Linux/i)},unix:function(){return a&&a.appVersion.match(/X11/i)}};e.exports=h},function(e,t,n){"use strict";var r=n(0),i=n(2),a={MAX_INT:Number.MAX_SAFE_INTEGER||9007199254740991,trueify:function(){return!0},falsify:function(){return!1},zeroify:function(){return 0},noop:function(){},error:function(e){console.error?(console.error.apply(console,arguments),console.trace&&console.trace()):(console.log.apply(console,arguments),console.trace&&console.trace())},clone:function(e){return this.extend({},e)},copy:function(e){return null==e?e:r.array(e)?e.slice():r.plainObject(e)?this.clone(e):e},clonePosition:function(e){return{x:e.x,y:e.y}},uuid:function(e,t){for(t=e="";e++<36;t+=51*e&52?(15^e?8^Math.random()*(20^e?16:4):4).toString(16):"-");return t}};a.makeBoundingBox=i.makeBoundingBox.bind(i),a._staticEmptyObject={},a.staticEmptyObject=function(){return a._staticEmptyObject},a.extend=null!=Object.assign?Object.assign.bind(Object):function(e){for(var t=arguments,n=1;n<t.length;n++){var r=t[n];if(null!=r)for(var i=Object.keys(r),a=0;a<i.length;a++){var o=i[a];e[o]=r[o]}}return e},a.assign=a.extend,a.default=function(e,t){return void 0===e?t:e},a.removeFromArray=function(e,t,n){for(var r=e.length;r>=0&&(e[r]!==t||(e.splice(r,1),n));r--);},a.clearArray=function(e){e.splice(0,e.length)},a.push=function(e,t){for(var n=0;n<t.length;n++){var r=t[n];e.push(r)}},a.getPrefixedProperty=function(e,t,n){return n&&(t=this.prependCamel(n,t)),e[t]},a.setPrefixedProperty=function(e,t,n,r){n&&(t=this.prependCamel(n,t)),e[t]=r},[n(131),n(132),{memoize:n(19)},n(133),n(135),n(136),n(134)].forEach(function(e){a.extend(a,e)}),e.exports=a},function(e,t,n){"use strict";var r={};r.arePositionsSame=function(e,t){return e.x===t.x&&e.y===t.y},r.copyPosition=function(e){return{x:e.x,y:e.y}},r.modelToRenderedPosition=function(e,t,n){return{x:e.x*t+n.x,y:e.y*t+n.y}},r.renderedToModelPosition=function(e,t,n){return{x:(e.x-n.x)/t,y:(e.y-n.y)/t}},r.array2point=function(e){return{x:e[0],y:e[1]}},r.deg2rad=function(e){return Math.PI*e/180},r.getAngleFromDisp=function(e,t){return Math.atan2(t,e)-Math.PI/2},r.log2=Math.log2||function(e){return Math.log(e)/Math.log(2)},r.signum=function(e){return e>0?1:e<0?-1:0},r.dist=function(e,t){return Math.sqrt(r.sqdist(e,t))},r.sqdist=function(e,t){var n=t.x-e.x,r=t.y-e.y;return n*n+r*r},r.qbezierAt=function(e,t,n,r){return(1-r)*(1-r)*e+2*(1-r)*r*t+r*r*n},r.qbezierPtAt=function(e,t,n,i){return{x:r.qbezierAt(e.x,t.x,n.x,i),y:r.qbezierAt(e.y,t.y,n.y,i)}},r.lineAt=function(e,t,n,i){var a={x:t.x-e.x,y:t.y-e.y},o=r.dist(e,t),s={x:a.x/o,y:a.y/o};return n=null==n?0:n,i=null!=i?i:n*o,{x:e.x+s.x*i,y:e.y+s.y*i}},r.lineAtDist=function(e,t,n){return r.lineAt(e,t,void 0,n)},r.triangleAngle=function(e,t,n){var i=r.dist(t,n),a=r.dist(e,n),o=r.dist(e,t);return Math.acos((i*i+a*a-o*o)/(2*i*a))},r.bound=function(e,t,n){return Math.max(e,Math.min(n,t))},r.makeBoundingBox=function(e){if(null==e)return{x1:1/0,y1:1/0,x2:-1/0,y2:-1/0,w:0,h:0};if(null!=e.x1&&null!=e.y1){if(null!=e.x2&&null!=e.y2&&e.x2>=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(null!=e.w&&null!=e.h&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}}},r.updateBoundingBox=function(e,t){e.x1=Math.min(e.x1,t.x1),e.x2=Math.max(e.x2,t.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,t.y1),e.y2=Math.max(e.y2,t.y2),e.h=e.y2-e.y1},r.expandBoundingBoxByPoint=function(e,t,n){e.x1=Math.min(e.x1,t),e.x2=Math.max(e.x2,t),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,n),e.y2=Math.max(e.y2,n),e.h=e.y2-e.y1},r.expandBoundingBox=function(e,t){return e.x1-=t,e.x2+=t,e.y1-=t,e.y2+=t,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},r.boundingBoxesIntersect=function(e,t){return!(e.x1>t.x2)&&(!(t.x1>e.x2)&&(!(e.x2<t.x1)&&(!(t.x2<e.x1)&&(!(e.y2<t.y1)&&(!(t.y2<e.y1)&&(!(e.y1>t.y2)&&!(t.y1>e.y2)))))))},r.inBoundingBox=function(e,t,n){return e.x1<=t&&t<=e.x2&&e.y1<=n&&n<=e.y2},r.pointInBoundingBox=function(e,t){return this.inBoundingBox(e,t.x,t.y)},r.boundingBoxInBoundingBox=function(e,t){return r.inBoundingBox(e,t.x1,t.y1)&&r.inBoundingBox(e,t.x2,t.y2)},r.roundRectangleIntersectLine=function(e,t,n,r,i,a,o){var s=this.getRoundRectangleRadius(i,a),l=i/2,u=a/2,c=void 0,d=n-l+s-o,h=r-u-o,p=n+l-s+o,f=h;if(c=this.finiteLinesIntersect(e,t,n,r,d,h,p,f,!1),c.length>0)return c;var v=n+l+o,g=r-u+s-o,m=v,y=r+u-s+o;if(c=this.finiteLinesIntersect(e,t,n,r,v,g,m,y,!1),c.length>0)return c;var b=n-l+s-o,x=r+u+o,w=n+l-s+o,E=x;if(c=this.finiteLinesIntersect(e,t,n,r,b,x,w,E,!1),c.length>0)return c;var P=n-l-o,C=r-u+s-o,T=P,S=r+u-s+o;if(c=this.finiteLinesIntersect(e,t,n,r,P,C,T,S,!1),c.length>0)return c;var D=void 0,k=n-l+s,_=r-u+s;if(D=this.intersectLineCircle(e,t,n,r,k,_,s+o),D.length>0&&D[0]<=k&&D[1]<=_)return[D[0],D[1]];var M=n+l-s,I=r-u+s;if(D=this.intersectLineCircle(e,t,n,r,M,I,s+o),D.length>0&&D[0]>=M&&D[1]<=I)return[D[0],D[1]];var N=n+l-s,B=r+u-s;if(D=this.intersectLineCircle(e,t,n,r,N,B,s+o),D.length>0&&D[0]>=N&&D[1]>=B)return[D[0],D[1]];var L=n-l+s,z=r+u-s;return D=this.intersectLineCircle(e,t,n,r,L,z,s+o),D.length>0&&D[0]<=L&&D[1]>=z?[D[0],D[1]]:[]},r.inLineVicinity=function(e,t,n,r,i,a,o){var s=o,l=Math.min(n,i),u=Math.max(n,i),c=Math.min(r,a),d=Math.max(r,a);return l-s<=e&&e<=u+s&&c-s<=t&&t<=d+s},r.inBezierVicinity=function(e,t,n,r,i,a,o,s,l){var u={x1:Math.min(n,o,i)-l,x2:Math.max(n,o,i)+l,y1:Math.min(r,s,a)-l,y2:Math.max(r,s,a)+l};return!(e<u.x1||e>u.x2||t<u.y1||t>u.y2)},r.solveQuadratic=function(e,t,n,r){n-=r;var i=t*t-4*e*n;if(i<0)return[];var a=Math.sqrt(i),o=2*e;return[(-t+a)/o,(-t-a)/o]},r.solveCubic=function(e,t,n,r,i){t/=e,n/=e,r/=e;var a=void 0,o=void 0,s=void 0,l=void 0,u=void 0,c=void 0,d=void 0,h=void 0;return o=(3*n-t*t)/9,s=-27*r+t*(9*n-t*t*2),s/=54,a=o*o*o+s*s,i[1]=0,d=t/3,a>0?(u=s+Math.sqrt(a),u=u<0?-Math.pow(-u,1/3):Math.pow(u,1/3),c=s-Math.sqrt(a),c=c<0?-Math.pow(-c,1/3):Math.pow(c,1/3),i[0]=-d+u+c,d+=(u+c)/2,i[4]=i[2]=-d,d=Math.sqrt(3)*(-c+u)/2,i[3]=d,void(i[5]=-d)):(i[5]=i[3]=0,0===a?(h=s<0?-Math.pow(-s,1/3):Math.pow(s,1/3),i[0]=2*h-d,void(i[4]=i[2]=-(h+d))):(o=-o,l=o*o*o,l=Math.acos(s/Math.sqrt(l)),h=2*Math.sqrt(o),i[0]=-d+h*Math.cos(l/3),i[2]=-d+h*Math.cos((l+2*Math.PI)/3),void(i[4]=-d+h*Math.cos((l+4*Math.PI)/3))))},r.sqdistToQuadraticBezier=function(e,t,n,r,i,a,o,s){var l=1*n*n-4*n*i+2*n*o+4*i*i-4*i*o+o*o+r*r-4*r*a+2*r*s+4*a*a-4*a*s+s*s,u=9*n*i-3*n*n-3*n*o-6*i*i+3*i*o+9*r*a-3*r*r-3*r*s-6*a*a+3*a*s,c=3*n*n-6*n*i+n*o-n*e+2*i*i+2*i*e-o*e+3*r*r-6*r*a+r*s-r*t+2*a*a+2*a*t-s*t,d=1*n*i-n*n+n*e-i*e+r*a-r*r+r*t-a*t,h=[];this.solveCubic(l,u,c,d,h);for(var p=[],f=0;f<6;f+=2)Math.abs(h[f+1])<1e-7&&h[f]>=0&&h[f]<=1&&p.push(h[f]);p.push(1),p.push(0);for(var v=-1,g=void 0,m=void 0,y=void 0,b=0;b<p.length;b++)g=Math.pow(1-p[b],2)*n+2*(1-p[b])*p[b]*i+p[b]*p[b]*o,m=Math.pow(1-p[b],2)*r+2*(1-p[b])*p[b]*a+p[b]*p[b]*s,y=Math.pow(g-e,2)+Math.pow(m-t,2),v>=0?y<v&&(v=y):v=y;return v},r.sqdistToFiniteLine=function(e,t,n,r,i,a){var o=[e-n,t-r],s=[i-n,a-r],l=s[0]*s[0]+s[1]*s[1],u=o[0]*o[0]+o[1]*o[1],c=o[0]*s[0]+o[1]*s[1],d=c*c/l;return c<0?u:d>l?(e-i)*(e-i)+(t-a)*(t-a):u-d},r.pointInsidePolygonPoints=function(e,t,n){for(var r=void 0,i=void 0,a=void 0,o=void 0,s=0,l=0;l<n.length/2;l++)if(r=n[2*l],i=n[2*l+1],l+1<n.length/2?(a=n[2*(l+1)],o=n[2*(l+1)+1]):(a=n[2*(l+1-n.length/2)],o=n[2*(l+1-n.length/2)+1]),r==e&&a==e);else{if(!(r>=e&&e>=a||r<=e&&e<=a))continue;(e-r)/(a-r)*(o-i)+i>t&&s++}return s%2!=0},r.pointInsidePolygon=function(e,t,n,i,a,o,s,l,u){var c=new Array(n.length),d=void 0;null!=l[0]?(d=Math.atan(l[1]/l[0]),l[0]<0?d+=Math.PI/2:d=-d-Math.PI/2):d=l;for(var h=Math.cos(-d),p=Math.sin(-d),f=0;f<c.length/2;f++)c[2*f]=o/2*(n[2*f]*h-n[2*f+1]*p),c[2*f+1]=s/2*(n[2*f+1]*h+n[2*f]*p),c[2*f]+=i,c[2*f+1]+=a;var v=void 0;if(u>0){var g=this.expandPolygon(c,-u);v=this.joinLines(g)}else v=c;return r.pointInsidePolygonPoints(e,t,v)},r.joinLines=function(e){for(var t=new Array(e.length/2),n=void 0,r=void 0,i=void 0,a=void 0,o=void 0,s=void 0,l=void 0,u=void 0,c=0;c<e.length/4;c++){n=e[4*c],r=e[4*c+1],i=e[4*c+2],a=e[4*c+3],c<e.length/4-1?(o=e[4*(c+1)],s=e[4*(c+1)+1],l=e[4*(c+1)+2],u=e[4*(c+1)+3]):(o=e[0],s=e[1],l=e[2],u=e[3]);var d=this.finiteLinesIntersect(n,r,i,a,o,s,l,u,!0);t[2*c]=d[0],t[2*c+1]=d[1]}return t},r.expandPolygon=function(e,t){for(var n=new Array(2*e.length),r=void 0,i=void 0,a=void 0,o=void 0,s=0;s<e.length/2;s++){r=e[2*s],i=e[2*s+1],s<e.length/2-1?(a=e[2*(s+1)],o=e[2*(s+1)+1]):(a=e[0],o=e[1]);var l=o-i,u=-(a-r),c=Math.sqrt(l*l+u*u),d=l/c,h=u/c;n[4*s]=r+d*t,n[4*s+1]=i+h*t,n[4*s+2]=a+d*t,n[4*s+3]=o+h*t}return n},r.intersectLineEllipse=function(e,t,n,r,i,a){var o=n-e,s=r-t;o/=i,s/=a;var l=Math.sqrt(o*o+s*s),u=l-1;if(u<0)return[];var c=u/l;return[(n-e)*c+e,(r-t)*c+t]},r.checkInEllipse=function(e,t,n,r,i,a,o){return e-=a,t-=o,e/=r/2+n,t/=i/2+n,e*e+t*t<=1},r.intersectLineCircle=function(e,t,n,r,i,a,o){var s=[n-e,r-t],l=[e-i,t-a],u=s[0]*s[0]+s[1]*s[1],c=2*(l[0]*s[0]+l[1]*s[1]),d=l[0]*l[0]+l[1]*l[1]-o*o,h=c*c-4*u*d;if(h<0)return[];var p=(-c+Math.sqrt(h))/(2*u),f=(-c-Math.sqrt(h))/(2*u),v=Math.min(p,f),g=Math.max(p,f),m=[];if(v>=0&&v<=1&&m.push(v),g>=0&&g<=1&&m.push(g),0===m.length)return[];var y=m[0]*s[0]+e,b=m[0]*s[1]+t;if(m.length>1){if(m[0]==m[1])return[y,b];return[y,b,m[1]*s[0]+e,m[1]*s[1]+t]}return[y,b]},r.findCircleNearPoint=function(e,t,n,r,i){var a=r-e,o=i-t,s=Math.sqrt(a*a+o*o);return[e+a/s*n,t+o/s*n]},r.findMaxSqDistanceToOrigin=function(e){for(var t=1e-6,n=void 0,r=0;r<e.length/2;r++)(n=e[2*r]*e[2*r]+e[2*r+1]*e[2*r+1])>t&&(t=n);return t},r.midOfThree=function(e,t,n){return t<=e&&e<=n||n<=e&&e<=t?e:e<=t&&t<=n||n<=t&&t<=e?t:n},r.finiteLinesIntersect=function(e,t,n,r,i,a,o,s,l){var u=e-i,c=n-e,d=o-i,h=t-a,p=r-t,f=s-a,v=d*h-f*u,g=c*h-p*u,m=f*c-d*p;if(0!==m){var y=v/m,b=g/m;return-.001<=y&&y<=1.001&&-.001<=b&&b<=1.001?[e+y*c,t+y*p]:l?[e+y*c,t+y*p]:[]}return 0===v||0===g?this.midOfThree(e,n,o)===o?[o,s]:this.midOfThree(e,n,i)===i?[i,a]:this.midOfThree(i,o,n)===n?[n,r]:[]:[]},r.polygonIntersectLine=function(e,t,n,i,a,o,s,l){var u=[],c=void 0,d=new Array(n.length),h=!0;5===arguments.length&&(h=!1);var p=void 0;if(h){for(var f=0;f<d.length/2;f++)d[2*f]=n[2*f]*o+i,d[2*f+1]=n[2*f+1]*s+a;if(l>0){var v=r.expandPolygon(d,-l);p=r.joinLines(v)}else p=d}else p=n;for(var g=void 0,m=void 0,y=void 0,b=void 0,x=0;x<p.length/2;x++)g=p[2*x],m=p[2*x+1],x<p.length/2-1?(y=p[2*(x+1)],b=p[2*(x+1)+1]):(y=p[0],b=p[1]),c=this.finiteLinesIntersect(e,t,i,a,g,m,y,b),0!==c.length&&u.push(c[0],c[1]);return u},r.shortenIntersection=function(e,t,n){var r=[e[0]-t[0],e[1]-t[1]],i=Math.sqrt(r[0]*r[0]+r[1]*r[1]),a=(i-n)/i;return a<0&&(a=1e-5),[t[0]+a*r[0],t[1]+a*r[1]]},r.generateUnitNgonPointsFitToSquare=function(e,t){var n=r.generateUnitNgonPoints(e,t);return n=r.fitPolygonToSquare(n)},r.fitPolygonToSquare=function(e){for(var t=void 0,n=void 0,r=e.length/2,i=1/0,a=1/0,o=-1/0,s=-1/0,l=0;l<r;l++)t=e[2*l],n=e[2*l+1],i=Math.min(i,t),o=Math.max(o,t),a=Math.min(a,n),s=Math.max(s,n);for(var u=2/(o-i),c=2/(s-a),d=0;d<r;d++)t=e[2*d]=e[2*d]*u,n=e[2*d+1]=e[2*d+1]*c,i=Math.min(i,t),o=Math.max(o,t),a=Math.min(a,n),s=Math.max(s,n);if(a<-1)for(var h=0;h<r;h++)n=e[2*h+1]=e[2*h+1]+(-1-a);return e},r.generateUnitNgonPoints=function(e,t){var n=1/e*2*Math.PI,r=e%2==0?Math.PI/2+n/2:Math.PI/2;r+=t;for(var i=new Array(2*e),a=void 0,o=0;o<e;o++)a=o*n+r,i[2*o]=Math.cos(a),i[2*o+1]=Math.sin(-a);return i},r.getRoundRectangleRadius=function(e,t){return Math.min(e/4,t/4,8)},r.getCutRectangleCornerLength=function(){return 8},r.bezierPtsToQuadCoeff=function(e,t,n){return[e-2*t+n,2*(t-e),e]},r.getBarrelCurveConstants=function(e,t){return{heightOffset:Math.min(15,.05*t),widthOffset:Math.min(100,.25*e),ctrlPtOffsetPct:.05}},e.exports=r},function(e,t,n){"use strict";var r=n(1),i={};[n(73),n(74),n(75)].forEach(function(e){r.assign(i,e)}),e.exports=i},function(e,t,n){"use strict";e.exports="undefined"==typeof window?null:window},function(e,t,n){"use strict";(function(t){var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function e(t){if(!(this instanceof e))return new e(t);this.id="Thenable/1.0.7",this.state=0,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},"function"==typeof t&&t.call(this,this.fulfill.bind(this),this.reject.bind(this))};r.prototype={fulfill:function(e){return i(this,1,"fulfillValue",e)},reject:function(e){return i(this,2,"rejectReason",e)},then:function(e,t){var n=this,i=new r;return n.onFulfilled.push(s(e,i,"fulfill")),n.onRejected.push(s(t,i,"reject")),a(n),i.proxy}};var i=function(e,t,n,r){return 0===e.state&&(e.state=t,e[n]=r,a(e)),e},a=function(e){1===e.state?o(e,"onFulfilled",e.fulfillValue):2===e.state&&o(e,"onRejected",e.rejectReason)},o=function(e,n,r){if(0!==e[n].length){var i=e[n];e[n]=[];var a=function(){for(var e=0;e<i.length;e++)i[e](r)};"function"==typeof t?t(a):setTimeout(a,0)}},s=function(e,t,n){return function(r){if("function"!=typeof e)t[n].call(t,r);else{var i;try{i=e(r)}catch(e){return void t.reject(e)}l(t,i)}}},l=function e(t,r){if(t===r||t.proxy===r)return void t.reject(new TypeError("cannot resolve promise with itself"));var i;if("object"===(void 0===r?"undefined":n(r))&&null!==r||"function"==typeof r)try{i=r.then}catch(e){return void t.reject(e)}if("function"!=typeof i)t.fulfill(r);else{var a=!1;try{i.call(r,function(n){a||(a=!0,n===r?t.reject(new TypeError("circular thenable chain")):e(t,n))},function(e){a||(a=!0,t.reject(e))})}catch(e){a||t.reject(e)}}};r.all=function(e){return new r(function(t,n){for(var r=new Array(e.length),i=0,a=function(n,a){r[n]=a,++i===e.length&&t(r)},o=0;o<e.length;o++)!function(t){var r=e[t];null!=r&&null!=r.then?r.then(function(e){a(t,e)},function(e){n(e)}):a(t,r)}(o)})},r.resolve=function(e){return new r(function(t,n){t(e)})},r.reject=function(e){return new r(function(t,n){n(e)})},e.exports="undefined"!=typeof Promise?Promise:r}).call(t,n(142).setImmediate)},function(e,t,n){"use strict";var r=n(0),i=n(1),a=n(10),o=function(e){var t=this;if(t._private={selectorText:e,invalid:!0},null==e||r.string(e)&&e.match(/^\s*$/))t.length=0;else if("*"===e||"edge"===e||"node"===e)t[0]=a(),t[0].group="*"===e?e:e+"s",t[0].groupOnly=!0,t[0].length=1,t._private.invalid=!1,t.length=1;else if(r.elementOrCollection(e)){var n=e.collection();t[0]=a(),t[0].collection=n,t[0].length=1,t.length=1}else if(r.fn(e))t[0]=a(),t[0].filter=e,t[0].length=1,t.length=1;else{if(!r.string(e))return void i.error("A selector must be created from a string; found ",e);if(!t.parse(e))return}t._private.invalid=!1},s=o.prototype;s.valid=function(){return!this._private.invalid},s.invalid=function(){return this._private.invalid},s.text=function(){return this._private.selectorText},s.size=function(){return this.length},s.eq=function(e){return this[e]},s.sameText=function(e){return this.text()===e.text()},s.toString=s.selector=function(){if(null!=this._private.toStringCache)return this._private.toStringCache;var e=void 0,t="",n=function(e){return null==e?"":e},i=function(e){return r.string(e)?'"'+e+'"':n(e)},a=function(e){return" "+e+" "};for(e=0;e<this.length;e++){var o=this[e];t+=function t(r){var o="",s=void 0,l=void 0;r.subject===r&&(o+="$");var u=n(r.group);for(o+=u.substring(0,u.length-1),s=0;s<r.data.length;s++){var c=r.data[s];c.value?o+="["+c.field+a(n(c.operator))+i(c.value)+"]":o+="["+n(c.operator)+c.field+"]"}for(s=0;s<r.meta.length;s++){var d=r.meta[s];o+="[["+d.field+a(n(d.operator))+i(d.value)+"]]"}for(s=0;s<r.colonSelectors.length;s++)l=r.colonSelectors[e],o+=l;for(s=0;s<r.ids.length;s++)l="#"+r.ids[e],o+=l;for(s=0;s<r.classes.length;s++)l="."+r.classes[s],o+=l;if(null!=r.source&&null!=r.target&&(o=t(r.source)+" -> "+t(r.target)),null!=r.connectedNodes){var h=r.connectedNodes;o=t(h[0])+" <-> "+t(h[1])}return null!=r.parent&&(o=t(r.parent)+" > "+o),null!=r.ancestor&&(o=t(r.ancestor)+" "+o),null!=r.child&&(o+=" > "+t(r.child)),null!=r.descendant&&(o+=" "+t(r.descendant)),o}(o),this.length>1&&e<this.length-1&&(t+=", ")}return this._private.toStringCache=t,t},[n(121),n(120)].forEach(function(e){return i.assign(s,e)}),e.exports=o},function(e,t,n){"use strict";var r=n(1),i=n(0),a=n(118),o=n(11),s=n(13),l={generate:function(e,t,n){for(var i=null!=n?n:r.uuid();e.hasElementWithId(i);)i=r.uuid();return i}},u=function(e,t,n){if(void 0===e||!i.core(e))return void r.error("A collection must have a reference to the core");var u=new a,c=!1;if(t){if(t.length>0&&i.plainObject(t[0])&&!i.element(t[0])){c=!0;for(var d=[],h=new o,p=0,f=t.length;p<f;p++){var v=t[p];null==v.data&&(v.data={});var g=v.data;if(null==g.id)g.id=l.generate(e,v);else if(e.hasElementWithId(g.id)||h.has(g.id))continue;var m=new s(e,v,!1);d.push(m),h.add(g.id)}t=d}}else t=[];this.length=0;for(var y=0,b=t.length;y<b;y++){var x=t[y];if(null!=x){var w=x._private.data.id;(null==n||n.unique&&!u.has(w))&&(u.set(w,{index:this.length,ele:x}),this[this.length]=x,this.length++)}}this._private={cy:e,map:u},c&&this.restore()},c=s.prototype=u.prototype;c.instanceString=function(){return"collection"},c.spawn=function(e,t,n){return i.core(e)||(n=t,t=e,e=this.cy()),new u(e,t,n)},c.spawnSelf=function(){return this.spawn(this)},c.cy=function(){return this._private.cy},c.renderer=function(){return this._private.cy.renderer()},c.element=function(){return this[0]},c.collection=function(){return i.collection(this)?this:new u(this._private.cy,[this])},c.unique=function(){return new u(this._private.cy,this,{unique:!0})},c.hasElementWithId=function(e){return this._private.map.has(e)},c.getElementById=function(e){var t=this._private.cy,n=this._private.map.get(e);return n?n.ele:new u(t)},c.$id=c.getElementById,c.poolIndex=function(){var e=this._private.cy,t=e._private.elements,n=this._private.data.id;return t._private.map.get(n).index},c.json=function(e){var t=this.element(),n=this.cy();if(null==t&&e)return this;if(null!=t){var a=t._private;if(i.plainObject(e)){n.startBatch(),e.data&&t.data(e.data),e.position&&t.position(e.position);var o=function(n,r,i){var o=e[n];null!=o&&o!==a[n]&&(o?t[r]():t[i]())};return o("removed","remove","restore"),o("selected","select","unselect"),o("selectable","selectify","unselectify"),o("locked","lock","unlock"),o("grabbable","grabify","ungrabify"),null!=e.classes&&t.classes(e.classes),n.endBatch(),this}if(void 0===e){var s={data:r.copy(a.data),position:r.copy(a.position),group:a.group,removed:a.removed,selected:a.selected,selectable:a.selectable,locked:a.locked,grabbable:a.grabbable,classes:null};return s.classes=Array.from(a.classes).join(" "),s}}},c.jsons=function(){for(var e=[],t=0;t<this.length;t++){var n=this[t],r=n.json();e.push(r)}return e},c.clone=function(){for(var e=this.cy(),t=[],n=0;n<this.length;n++){var r=this[n],i=r.json(),a=new s(e,i,!1);t.push(a)}return new u(e,t)},c.copy=c.clone,c.restore=function(e){var t=this,n=t.cy(),o=n._private;void 0===e&&(e=!0);for(var s=[],c=[],d=void 0,h=0,p=t.length;h<p;h++){var f=t[h];f.removed()&&(f.isNode()?s.push(f):c.push(f))}d=s.concat(c);var v=void 0,g=function(){d.splice(v,1),v--};for(v=0;v<d.length;v++){var m=d[v],y=m._private,b=y.data;if(m.clearTraversalCache(),void 0===b.id)b.id=l.generate(n,m);else if(i.number(b.id))b.id=""+b.id;else{if(i.emptyString(b.id)||!i.string(b.id)){r.error("Can not create element with invalid string ID `"+b.id+"`"),g();continue}if(n.hasElementWithId(b.id)){r.error("Can not create second element with ID `"+b.id+"`"),g();continue}}var x=b.id;if(m.isNode()){var w=y.position;null==w.x&&(w.x=0),null==w.y&&(w.y=0)}if(m.isEdge()){for(var E=m,P=["source","target"],C=P.length,T=!1,S=0;S<C;S++){var D=P[S],k=b[D];i.number(k)&&(k=b[D]=""+b[D]),null==k||""===k?(r.error("Can not create edge `"+x+"` with unspecified "+D),T=!0):n.hasElementWithId(k)||(r.error("Can not create edge `"+x+"` with nonexistant "+D+" `"+k+"`"),T=!0)}if(T){g();continue}var _=n.getElementById(b.source),M=n.getElementById(b.target);_._private.edges.push(E),M._private.edges.push(E),E._private.source=_,E._private.target=M}y.map=new a,y.map.set(x,{ele:m,index:0}),y.removed=!1,n.addToPool(m)}for(var I=0;I<s.length;I++){var N=s[I],B=N._private.data;i.number(B.parent)&&(B.parent=""+B.parent);var L=B.parent;if(null!=L){var z=n.getElementById(L);if(z.empty())B.parent=void 0;else{for(var O=!1,A=z;!A.empty();){if(N.same(A)){O=!0,B.parent=void 0;break}A=A.parent()}O||(z[0]._private.children.push(N),N._private.parent=z[0],o.hasCompoundNodes=!0)}}}if(d.length>0){for(var R=new u(n,d),V=0;V<R.length;V++){var q=R[V];q.isNode()||(q.parallelEdges().clearTraversalCache(),q.source().clearTraversalCache(),q.target().clearTraversalCache())}var F=void 0;F=o.hasCompoundNodes?n.collection().merge(R).merge(R.connectedNodes()).merge(R.parent()):R,F.dirtyCompoundBoundsCache().updateStyle(e),e?R.emitAndNotify("add"):R.emit("add")}return t},c.removed=function(){var e=this[0];return e&&e._private.removed},c.inside=function(){var e=this[0];return e&&!e._private.removed},c.remove=function(e){function t(e){for(var t=e._private.edges,n=0;n<t.length;n++)i(t[n])}function n(e){for(var t=e._private.children,n=0;n<t.length;n++)i(t[n])}function i(e){c[e.id()]||(c[e.id()]=!0,e.isNode()?(l.push(e),t(e),n(e)):l.unshift(e))}function a(e,t){var n=e._private.edges;r.removeFromArray(n,t),e.clearTraversalCache()}var o=this,s=[],l=[],c={},d=o._private.cy;void 0===e&&(e=!0);for(var h=0,p=o.length;h<p;h++){i(o[h])}var f=[];f.ids={},o.dirtyCompoundBoundsCache(),d.removeFromPool(l);for(var v=0;v<l.length;v++){var g=l[v];if(g._private.removed=!0,s.push(g),g.isEdge()){var m=g.source()[0],y=g.target()[0];a(m,g),a(y,g),function(e){e.parallelEdges().clearTraversalCache()}(g)}else{var b=g.parent();0!==b.length&&function(e,t){t=t[0],e=e[0];var n=e._private.children,i=e.id();r.removeFromArray(n,t),f.ids[i]||(f.ids[i]=!0,f.push(e))}(b,g)}}var x=d._private.elements;d._private.hasCompoundNodes=!1;for(var w=0;w<x.length;w++){if(x[w].isParent()){d._private.hasCompoundNodes=!0;break}}var E=new u(this.cy(),s);E.size()>0&&(e&&this.cy().notify({type:"remove",eles:E}),E.emit("remove"));for(var P=0;P<f.length;P++){var C=f[P];C.removed()||C.updateStyle()}return new u(d,s)},c.move=function(e){var t=this._private.cy;if(void 0!==e.source||void 0!==e.target){var n=e.source,r=e.target,i=t.hasElementWithId(n),a=t.hasElementWithId(r);if(i||a){var o=this.jsons();this.remove();for(var s=0;s<o.length;s++){var l=o[s],u=this[s];"edges"===l.group&&(i&&(l.data.source=n),a&&(l.data.target=r),l.scratch=u._private.scratch)}return t.add(o)}}else if(void 0!==e.parent){var c=e.parent,d=null===c||t.hasElementWithId(c);if(d){var h=this.jsons(),p=this.descendants(),f=p.union(p.union(this).connectedEdges()).jsons();this.remove();for(var v=0;v<h.length;v++){var g=h[v],m=this[v];"nodes"===g.group&&(g.data.parent=null===c?void 0:c,g.scratch=m._private.scratch)}return t.add(h.concat(f))}}return this},[n(33),n(37),n(38),n(39),n(40),n(41),n(42),n(45),n(48),n(49),n(50),n(7),n(51),n(52),n(53),n(54),n(55)].forEach(function(e){r.extend(c,e)}),e.exports=u},function(e,t,n){"use strict";e.exports=n(137)},function(e,t,n){"use strict";function r(e){i.assign(this,l,e),this.listeners=[]}var i=n(1),a=n(0),o=n(15),s=/(\w+)(\.(?:\w+|\*))?/,l={qualifierCompare:function(e,t){return e===t},eventMatches:function(){return!0},eventFields:function(){return{}},callbackContext:function(e){return e},beforeEmit:function(){},afterEmit:function(){},bubble:function(){return!1},parent:function(){return null},context:void 0},u=r.prototype,c=function(e,t,n,r,o,l,u){a.fn(r)&&(o=r,r=null),u&&(l=null==l?u:i.assign({},l,u));for(var c=n.split(/\s+/),d=0;d<c.length;d++){var h=c[d];if(!a.emptyString(h)){var p=h.match(s);if(p){t(e,h,p[1],p[2]?p[2]:null,r,o,l)}}}},d=function(e,t){return new o(t.type,i.assign(t,e.eventFields(e.context)))},h=function(e,t,n){if(a.event(n))return void t(e,n);if(a.plainObject(n))return void t(e,d(e,n));for(var r=n.split(/\s+/),i=0;i<r.length;i++){var o=r[i];if(!a.emptyString(o)){var l=o.match(s);if(l){var u=l[1],c=l[2]?l[2]:null;t(e,d(e,{type:u,namespace:c,target:e.context}))}}}};u.on=u.addListener=function(e,t,n,r,i){return c(this,function(e,t,n,r,i,o,s){a.fn(o)&&e.listeners.push({event:t,callback:o,type:n,namespace:r,qualifier:i,conf:s})},e,t,n,r,i),this},u.one=function(e,t,n,r){return this.on(e,t,n,r,{one:!0})},u.removeListener=u.off=function(e,t,n,r){for(var i=this,a=this.listeners,o=a.length-1;o>=0;o--)!function(o){var s=a[o];c(i,function(e,t,n,r,i,l){s.type!==n||r&&s.namespace!==r||i&&!e.qualifierCompare(s.qualifier,i)||l&&s.callback!==l||a.splice(o,1)},e,t,n,r)}(o);return this},u.emit=u.trigger=function(e,t,n){var r=this.listeners;return a.array(t)||(t=[t]),h(this,function(e,a){null!=n&&(r=[{event:a.event,type:a.type,namespace:a.namespace,callback:n}]);for(var o=0;o<r.length;o++){var s=r[o];if(s.type===a.type&&(!s.namespace||s.namespace===a.namespace||".*"===s.namespace)&&e.eventMatches(e.context,s,a)){var l=[a];null!=t&&i.push(l,t),e.beforeEmit(e.context,s,a),s.conf&&s.conf.one&&(r.splice(o,1),o--);var u=e.callbackContext(e.context,s,a),c=s.callback.apply(u,l);e.afterEmit(e.context,s,a),!1===c&&(a.stopPropagation(),a.preventDefault())}}e.bubble(e.context)&&!a.isPropagationStopped()&&e.parent(e.context).emit(a,t)},e),this},e.exports=r},function(e,t,n){"use strict";var r=function(){return{classes:[],colonSelectors:[],data:[],group:null,ids:[],meta:[],collection:null,filter:null,parent:null,ancestor:null,subject:null,child:null,descendant:null}};e.exports=r},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(){function e(t){if(r(this,e),this._obj=Object.create(null),null!=t){var n=void 0;n=null!=t.instanceString&&t.instanceString()===this.instanceString()?t.toArray():t;for(var i=0;i<n.length;i++)this.add(n[i])}}return i(e,[{key:"instanceString",value:function(){return"set"}},{key:"add",value:function(e){this._obj[e]=1}},{key:"delete",value:function(e){this._obj[e]=0}},{key:"clear",value:function(){this._obj=Object.create(null)}},{key:"has",value:function(e){return 1===this._obj[e]}},{key:"toArray",value:function(){var e=this;return Object.keys(this._obj).filter(function(t){return e.has(t)})}}]),e}();e.exports="undefined"!==("undefined"==typeof Set?"undefined":a(Set))?Set:o},function(e,t,n){"use strict";var r=n(4),i=n(1),a=n(7),o=n(0),s=n(5),l=n(3),u=function(e){var t=this;e=i.extend({},e);var n=e.container;n&&!o.htmlElement(n)&&o.htmlElement(n[0])&&(n=n[0]);var l=n?n._cyreg:null;(l=l||{})&&l.cy&&(l.cy.destroy(),l={});var u=l.readies=l.readies||[];n&&(n._cyreg=l),l.cy=t;var c=void 0!==r&&void 0!==n&&!e.headless,d=e;d.layout=i.extend({name:c?"grid":"null"},d.layout),d.renderer=i.extend({name:c?"canvas":"null"},d.renderer);var h=function(e,t,n){return void 0!==t?t:void 0!==n?n:e},p=this._private={container:n,ready:!1,options:d,elements:new a(this),listeners:[],aniEles:new a(this),scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:h(!0,d.zoomingEnabled),userZoomingEnabled:h(!0,d.userZoomingEnabled),panningEnabled:h(!0,d.panningEnabled),userPanningEnabled:h(!0,d.userPanningEnabled),boxSelectionEnabled:h(!0,d.boxSelectionEnabled),autolock:h(!1,d.autolock,d.autolockNodes),autoungrabify:h(!1,d.autoungrabify,d.autoungrabifyNodes),autounselectify:h(!1,d.autounselectify),styleEnabled:void 0===d.styleEnabled?c:d.styleEnabled,zoom:o.number(d.zoom)?d.zoom:1,pan:{x:o.plainObject(d.pan)&&o.number(d.pan.x)?d.pan.x:0,y:o.plainObject(d.pan)&&o.number(d.pan.y)?d.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1};this.createEmitter();var f=d.selectionType;p.selectionType=void 0===f||"additive"!==f&&"single"!==f?"single":f,o.number(d.minZoom)&&o.number(d.maxZoom)&&d.minZoom<d.maxZoom?(p.minZoom=d.minZoom,p.maxZoom=d.maxZoom):o.number(d.minZoom)&&void 0===d.maxZoom?p.minZoom=d.minZoom:o.number(d.maxZoom)&&void 0===d.minZoom&&(p.maxZoom=d.maxZoom);t.initRenderer(i.extend({hideEdgesOnViewport:d.hideEdgesOnViewport,textureOnViewport:d.textureOnViewport,wheelSensitivity:o.number(d.wheelSensitivity)&&d.wheelSensitivity>0?d.wheelSensitivity:1,motionBlur:void 0!==d.motionBlur&&d.motionBlur,motionBlurOpacity:void 0===d.motionBlurOpacity?.05:d.motionBlurOpacity,pixelRatio:o.number(d.pixelRatio)&&d.pixelRatio>0?d.pixelRatio:void 0,desktopTapThreshold:void 0===d.desktopTapThreshold?4:d.desktopTapThreshold,touchTapThreshold:void 0===d.touchTapThreshold?8:d.touchTapThreshold},d.renderer));var v=function(e,n,r){t.notifications(!1);var a=t.mutableElements();a.length>0&&a.remove(),null!=e&&(o.plainObject(e)||o.array(e))&&t.add(e),t.one("layoutready",function(e){t.notifications(!0),t.emit(e),t.notify({type:"load",eles:t.mutableElements()}),t.one("load",n),t.emit("load")}).one("layoutstop",function(){t.one("done",r),t.emit("done")});var s=i.extend({},t._private.options.layout);s.eles=t.elements(),t.layout(s).run()};!function(e,t){if(e.some(o.promise))return s.all(e).then(t);t(e)}([d.style,d.elements],function(e){var n=e[0],r=e[1];p.styleEnabled&&t.setStyle(n),v(r,function(){t.startAnimationLoop(),p.ready=!0,o.fn(d.ready)&&t.on("ready",d.ready);for(var e=0;e<u.length;e++){var n=u[e];t.on("ready",n)}l&&(l.readies=[]),t.emit("ready")},d.done)})},c=u.prototype;i.extend(c,{instanceString:function(){return"core"},isReady:function(){return this._private.ready},isDestroyed:function(){return this._private.destroyed},ready:function(e){return this.isReady()?this.emitter().emit("ready",[],e):this.on("ready",e),this},destroy:function(){var e=this;if(!e.isDestroyed())return e.stopAnimationLoop(),e.destroyRenderer(),this.emit("destroy"),e._private.destroyed=!0,e},hasElementWithId:function(e){return this._private.elements.hasElementWithId(e)},getElementById:function(e){return this._private.elements.getElementById(e)},selectionType:function(){return this._private.selectionType},hasCompoundNodes:function(){return this._private.hasCompoundNodes},headless:function(){return"null"===this._private.options.renderer.name},styleEnabled:function(){return this._private.styleEnabled},addToPool:function(e){return this._private.elements.merge(e),this},removeFromPool:function(e){return this._private.elements.unmerge(e),this},container:function(){return this._private.container},options:function(){return i.copy(this._private.options)},json:function(e){var t=this,n=t._private,r=t.mutableElements();if(o.plainObject(e)){if(t.startBatch(),e.elements){var a={},s=function(e,n){for(var r=0;r<e.length;r++){var o=e[r],s=o.data.id,l=t.getElementById(s);a[s]=!0,0!==l.length?l.json(o):n?t.add(i.extend({group:n},o)):t.add(o)}};if(o.array(e.elements))s(e.elements);else for(var l=["nodes","edges"],u=0;u<l.length;u++){var c=l[u],d=e.elements[c];o.array(d)&&s(d,c)}r.stdFilter(function(e){return!a[e.id()]}).remove()}e.style&&t.style(e.style),null!=e.zoom&&e.zoom!==n.zoom&&t.zoom(e.zoom),e.pan&&(e.pan.x===n.pan.x&&e.pan.y===n.pan.y||t.pan(e.pan));for(var h=["minZoom","maxZoom","zoomingEnabled","userZoomingEnabled","panningEnabled","userPanningEnabled","boxSelectionEnabled","autolock","autoungrabify","autounselectify"],p=0;p<h.length;p++){var f=h[p];null!=e[f]&&t[f](e[f])}return t.endBatch(),this}if(void 0===e){var v={};return v.elements={},r.forEach(function(e){var t=e.group();v.elements[t]||(v.elements[t]=[]),v.elements[t].push(e.json())}),this._private.styleEnabled&&(v.style=t.style().json()),v.zoomingEnabled=t._private.zoomingEnabled,v.userZoomingEnabled=t._private.userZoomingEnabled,v.zoom=t._private.zoom,v.minZoom=t._private.minZoom,v.maxZoom=t._private.maxZoom,v.panningEnabled=t._private.panningEnabled,v.userPanningEnabled=t._private.userPanningEnabled,v.pan=i.copy(t._private.pan),v.boxSelectionEnabled=t._private.boxSelectionEnabled,v.renderer=i.copy(t._private.options.renderer),v.hideEdgesOnViewport=t._private.options.hideEdgesOnViewport,v.textureOnViewport=t._private.options.textureOnViewport,v.wheelSensitivity=t._private.options.wheelSensitivity,v.motionBlur=t._private.options.motionBlur,v}},scratch:l.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0}),removeScratch:l.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0})}),c.$id=c.getElementById,[n(56),n(60),n(65),n(66),n(67),n(68),n(69),n(70),n(71),n(72)].forEach(function(e){i.extend(c,e)}),e.exports=u},function(e,t,n){"use strict";var r=n(1),i=n(0),a=function(e,t,n){if(n=!(void 0!==n&&!n),void 0===e||void 0===t||!i.core(e))return void r.error("An element must have a core reference and parameters set");var a=t.group;if(null==a&&(a=t.data&&null!=t.data.source&&null!=t.data.target?"edges":"nodes"),"nodes"!==a&&"edges"!==a)return void r.error("An element must be of type `nodes` or `edges`; you specified `"+a+"`");this.length=1,this[0]=this;var o=this._private={cy:e,single:!0,data:t.data||{},position:t.position||{},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:a,style:{},rstyle:{},styleCxts:[],removed:!0,selected:!!t.selected,selectable:void 0===t.selectable||!!t.selectable,locked:!!t.locked,grabbed:!1,grabbable:void 0===t.grabbable||!!t.grabbable,active:!1,classes:new Set,animation:{current:[],queue:[]},rscratch:{},scratch:t.scratch||{},edges:[],children:[],parent:null,traversalCache:{}};if(t.renderedPosition){var s=t.renderedPosition,l=e.pan(),u=e.zoom();o.position={x:(s.x-l.x)/u,y:(s.y-l.y)/u}}if(i.string(t.classes))for(var c=t.classes.split(/\s+/),d=0,h=c.length;d<h;d++){var p=c[d];p&&""!==p&&o.classes.add(p)}(t.style||t.css)&&e.style().applyBypass(this,t.style||t.css),this.createEmitter(),(void 0===n||n)&&this.restore()};e.exports=a},function(e,t,n){"use strict";var r=n(1),i=function(e,t){function n(e){var t=e.pstyle("z-compound-depth");return"auto"===t.value?o?e.zDepth():0:"bottom"===t.value?-1:"top"===t.value?r.MAX_INT:0}function i(e){return"auto"===e.pstyle("z-index-compare").value&&e.isNode()?1:0}var a=e.cy(),o=a.hasCompoundNodes(),s=n(e)-n(t);if(0!==s)return s;var l=i(e)-i(t);if(0!==l)return l;var u=e.pstyle("z-index").value-t.pstyle("z-index").value;return 0!==u?u:e.poolIndex()-t.poolIndex()};e.exports=i},function(e,t,n){"use strict";function r(){return!1}function i(){return!0}/*!
Event object based on jQuery events, MIT license
https://jquery.org/license/
https://tldrlegal.com/license/mit-license
https://github.com/jquery/jquery/blob/master/src/event.js
*/
var a=function(e,t){this.recycle(e,t)};a.prototype={instanceString:function(){return"event"},recycle:function(e,t){if(this.isImmediatePropagationStopped=this.isPropagationStopped=this.isDefaultPrevented=r,null!=e&&e.preventDefault?(this.type=e.type,this.isDefaultPrevented=e.defaultPrevented?i:r):null!=e&&e.type?t=e:this.type=e,null!=t&&(this.originalEvent=t.originalEvent,this.type=null!=t.type?t.type:this.type,this.cy=t.cy,this.target=t.target,this.position=t.position,this.renderedPosition=t.renderedPosition,this.namespace=t.namespace,this.layout=t.layout),null!=this.cy&&null!=this.position&&null==this.renderedPosition){var n=this.position,a=this.cy.zoom(),o=this.cy.pan();this.renderedPosition={x:n.x*a+o.x,y:n.y*a+o.y}}this.timeStamp=e&&e.timeStamp||Date.now()},preventDefault:function(){this.isDefaultPrevented=i;var e=this.originalEvent;e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){this.isPropagationStopped=i;var e=this.originalEvent;e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=i,this.stopPropagation()},isDefaultPrevented:r,isPropagationStopped:r,isImmediatePropagationStopped:r},e.exports=a},function(e,t,n){"use strict";var r=n(1);e.exports={setupDequeueing:function(e){return function(){var t=this,n=this.renderer;if(!t.dequeueingSetup){t.dequeueingSetup=!0;var i=r.debounce(function(){n.redrawHint("eles",!0),n.redrawHint("drag",!0),n.redraw()},e.deqRedrawThreshold),a=function(a,o){for(var s=r.performanceNow(),l=n.averageRedrawTime,u=n.lastRedrawTime,c=[],d=n.cy.extent(),h=n.getPixelRatio();;){var p=r.performanceNow(),f=p-s,v=p-o;if(u<1e3/60){var g=1e3/60-(a?l:0);if(v>=e.deqFastCost*g)break}else if(a){if(f>=e.deqCost*u||f>=e.deqAvgCost*l)break}else if(v>=e.deqNoDrawCost*(1e3/60))break;var m=e.deq(t,h,d);if(!(m.length>0))break;for(var y=0;y<m.length;y++)c.push(m[y])}c.length>0&&(e.onDeqd(t,c),!a&&e.shouldRedraw(t,c,h,d)&&i())},o=e.priority||r.noop;n.beforeRender(a,o(t))}}}}},function(e,t,n){"use strict";var r=n(1),i=[{selector:":selected",matches:function(e){return e.selected()}},{selector:":unselected",matches:function(e){return!e.selected()}},{selector:":selectable",matches:function(e){return e.selectable()}},{selector:":unselectable",matches:function(e){return!e.selectable()}},{selector:":locked",matches:function(e){return e.locked()}},{selector:":unlocked",matches:function(e){return!e.locked()}},{selector:":visible",matches:function(e){return e.visible()}},{selector:":hidden",matches:function(e){return!e.visible()}},{selector:":transparent",matches:function(e){return e.transparent()}},{selector:":grabbed",matches:function(e){return e.grabbed()}},{selector:":free",matches:function(e){return!e.grabbed()}},{selector:":removed",matches:function(e){return e.removed()}},{selector:":inside",matches:function(e){return!e.removed()}},{selector:":grabbable",matches:function(e){return e.grabbable()}},{selector:":ungrabbable",matches:function(e){return!e.grabbable()}},{selector:":animated",matches:function(e){return e.animated()}},{selector:":unanimated",matches:function(e){return!e.animated()}},{selector:":parent",matches:function(e){return e.isParent()}},{selector:":childless",matches:function(e){return e.isChildless()}},{selector:":child",matches:function(e){return e.isChild()}},{selector:":orphan",matches:function(e){return e.isOrphan()}},{selector:":nonorphan",matches:function(e){return e.isChild()}},{selector:":loop",matches:function(e){return e.isLoop()}},{selector:":simple",matches:function(e){return e.isSimple()}},{selector:":active",matches:function(e){return e.active()}},{selector:":inactive",matches:function(e){return!e.active()}},{selector:":backgrounding",matches:function(e){return e.backgrounding()}},{selector:":nonbackgrounding",matches:function(e){return!e.backgrounding()}}].sort(function(e,t){return r.sort.descending(e.selector,t.selector)}),a=function e(t,n){return(e.lookup=e.lookup||function(){for(var e={},t=void 0,n=0;n<i.length;n++)t=i[n],e[t.selector]=t.matches;return e}())[t](n)},o="("+i.map(function(e){return e.selector}).join("|")+")";e.exports={stateSelectors:i,stateSelectorMatches:a,stateSelectorRegex:o}},function(e,t,n){"use strict";var r=n(0),i=n(1),a=n(6),o=function e(t){return this instanceof e?r.core(t)?(this._private={cy:t,coreStyle:{}},this.length=0,void this.resetToDefault()):void i.error("A style must have a core reference"):new e(t)},s=o.prototype;s.instanceString=function(){return"style"},s.clear=function(){for(var e=0;e<this.length;e++)this[e]=void 0;return this.length=0,this._private.newStyle=!0,this},s.resetToDefault=function(){return this.clear(),this.addDefaultStylesheet(),this},s.core=function(){return this._private.coreStyle},s.selector=function(e){var t="core"===e?null:new a(e),n=this.length++;return this[n]={selector:t,properties:[],mappedProperties:[],index:n},this},s.css=function(){var e=this,t=arguments;switch(t.length){case 1:for(var n=t[0],r=0;r<e.properties.length;r++){var a=e.properties[r],o=n[a.name];void 0===o&&(o=n[i.dash2camel(a.name)]),void 0!==o&&this.cssRule(a.name,o)}break;case 2:this.cssRule(t[0],t[1])}return this},s.style=s.css,s.cssRule=function(e,t){var n=this.parse(e,t);if(n){var r=this.length-1;this[r].properties.push(n),this[r].properties[n.name]=n,n.name.match(/pie-(\d+)-background-size/)&&n.value&&(this._private.hasPie=!0),n.mapped&&this[r].mappedProperties.push(n);!this[r].selector&&(this._private.coreStyle[n.name]=n)}return this},o.fromJson=function(e,t){var n=new o(e);return n.fromJson(t),n},o.fromString=function(e,t){return new o(e).fromString(t)},[n(123),n(124),n(125),n(126),n(127),n(130),n(129),n(128)].forEach(function(e){i.extend(s,e)}),o.types=s.types,o.properties=s.properties,e.exports=o},function(e,t,n){"use strict";e.exports=function(e,t){t||(t=function(){if(1===arguments.length)return arguments[0];if(0===arguments.length)return"undefined";for(var e=[],t=0;t<arguments.length;t++)e.push(arguments[t]);return e.join("$")});var n=function n(){var r=this,i=arguments,a=void 0,o=t.apply(r,i),s=n.cache;return(a=s[o])||(a=s[o]=e.apply(r,i)),a};return n.cache={},n}},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";function r(e,t,n){var r=n,a=function(n){s.error("Can not register `"+t+"` for `"+e+"` since `"+n+"` already exists in the prototype and can not be overridden")};if("core"===e){if(c.prototype[t])return a(t);c.prototype[t]=n}else if("collection"===e){if(u.prototype[t])return a(t);u.prototype[t]=n}else if("layout"===e){for(var o=function(e){this.options=e,n.call(this,e),h.plainObject(this._private)||(this._private={}),this._private.cy=e.cy,this._private.listeners=[],this.createEmitter()},d=o.prototype=Object.create(n.prototype),v=[],g=0;g<v.length;g++){var m=v[g];d[m]=d[m]||function(){return this}}d.start&&!d.run?d.run=function(){return this.start(),this}:!d.start&&d.run&&(d.start=function(){return this.run(),this});var y=n.prototype.stop;d.stop=function(){var e=this.options;if(e&&e.animate){var t=this.animations;if(t)for(var n=0;n<t.length;n++)t[n].stop()}return y?y.call(this):this.emit("layoutstop"),this},d.destroy||(d.destroy=function(){return this}),d.cy=function(){return this._private.cy};var b=function(e){return e._private.cy};s.assign(d,{createEmitter:function(){return this._private.emitter=new p({eventFields:function(e){return{layout:e,cy:b(e),target:e}},bubble:function(){return!0},parent:function(e){return b(e)},context:this}),this},emitter:function(){return this._private.emitter},on:function(e,t){return this.emitter().on(e,t),this},one:function(e,t){return this.emitter().one(e,t),this},once:function(e,t){return this.emitter().one(e,t),this},removeListener:function(e,t){return this.emitter().removeListener(e,t),this},emit:function(e,t){return this.emitter().emit(e,t),this}}),l.eventAliasesOn(d),r=o}else if("renderer"===e&&"null"!==t&&"base"!==t){var x=i("renderer","base"),w=x.prototype,E=n,P=n.prototype,C=function(){x.apply(this,arguments),E.apply(this,arguments)},T=C.prototype;for(var S in w){var D=w[S],k=null!=P[S];if(k)return a(S);T[S]=D}for(var _ in P)T[_]=P[_];w.clientFunctions.forEach(function(e){T[e]=T[e]||function(){s.error("Renderer does not implement `renderer."+e+"()` on its prototype")}}),r=C}return s.setMap({map:f,keys:[e,t],value:r})}function i(e,t){return s.getMap({map:f,keys:[e,t]})}function a(e,t,n,r,i){return s.setMap({map:v,keys:[e,t,n,r],value:i})}function o(e,t,n,r){return s.getMap({map:v,keys:[e,t,n,r]})}var s=n(1),l=n(3),u=n(7),c=n(12),d=n(76),h=n(0),p=n(9),f={},v={},g=function(){return 2===arguments.length?i.apply(null,arguments):3===arguments.length?r.apply(null,arguments):4===arguments.length?o.apply(null,arguments):5===arguments.length?a.apply(null,arguments):void s.error("Invalid extension access syntax")};c.prototype.extension=g,d.forEach(function(e){e.extensions.forEach(function(t){r(e.type,t.name,t.impl)})}),e.exports=g},function(e,t,n){"use strict";var r=n(0),i=n(1),a=n(18),o=function e(){if(!(this instanceof e))return new e;this.length=0},s=o.prototype;s.instanceString=function(){return"stylesheet"},s.selector=function(e){return this[this.length++]={selector:e,properties:[]},this},s.css=function(e,t){var n=this.length-1;if(r.string(e))this[n].properties.push({name:e,value:t});else if(r.plainObject(e))for(var o=e,s=0;s<a.properties.length;s++){var l=a.properties[s],u=o[l.name];if(void 0===u&&(u=o[i.dash2camel(l.name)]),void 0!==u){var c=l.name,d=u;this[n].properties.push({name:c,value:d})}}return this},s.style=s.css,s.generateStyle=function(e){for(var t=new a(e),n=0;n<this.length;n++){var r=this[n],i=r.selector,o=r.properties;t.selector(i);for(var s=0;s<o.length;s++){var l=o[s];t.css(l.name,l.value)}}return t},e.exports=o},function(e,t,n){"use strict";e.exports="3.2.1"},function(e,t,n){"use strict";var r=n(1),i=n(0),a=n(5),o=function(e,t,n){var a=this._private=r.extend({duration:1e3},t,n);a.target=e,a.style=a.style||a.css,a.started=!1,a.playing=!1,a.hooked=!1,a.applying=!1,a.progress=0,a.completes=[],a.frames=[],a.complete&&i.fn(a.complete)&&a.completes.push(a.complete),this.length=1,this[0]=this},s=o.prototype;r.extend(s,{instanceString:function(){return"animation"},hook:function(){var e=this._private;if(!e.hooked){var t=void 0,n=e.target._private.animation;t=e.queue?n.queue:n.current,t.push(this),i.elementOrCollection(e.target)&&e.target.cy().addToAnimationPool(e.target),e.hooked=!0}return this},play:function(){var e=this._private;return 1===e.progress&&(e.progress=0),e.playing=!0,e.started=!1,e.stopped=!1,this.hook(),this},playing:function(){return this._private.playing},apply:function(){var e=this._private;return e.applying=!0,e.started=!1,e.stopped=!1,this.hook(),this},applying:function(){return this._private.applying},pause:function(){var e=this._private;return e.playing=!1,e.started=!1,this},stop:function(){var e=this._private;return e.playing=!1,e.started=!1,e.stopped=!0,this},rewind:function(){return this.progress(0)},fastforward:function(){return this.progress(1)},time:function(e){var t=this._private;return void 0===e?t.progress*t.duration:this.progress(e/t.duration)},progress:function(e){var t=this._private,n=t.playing;return void 0===e?t.progress:(n&&this.pause(),t.progress=e,t.started=!1,n&&this.play(),this)},completed:function(){return 1===this._private.progress},reverse:function(){var e=this._private,t=e.playing;t&&this.pause(),e.progress=1-e.progress,e.started=!1;var n=function(t,n){var r=e[t];null!=r&&(e