chupim-web
Version:
A Web Pipeline Framework to build APIs
8 lines (7 loc) • 316 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()}("undefined"!=typeof self?self: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.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=20)}([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(3),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},copyArray:function(e){return e.slice()},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(21),n(22),{memoize:n(13)},n(23),n(24),n(25),n(27)].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,y=v,m=r+u-s+o;if(c=this.finiteLinesIntersect(e,t,n,r,v,g,y,m,!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,S=P,T=r+u-s+o;if(c=this.finiteLinesIntersect(e,t,n,r,P,C,S,T,!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 z=n-l+s,L=r+u-s;return D=this.intersectLineCircle(e,t,n,r,z,L,s+o),D.length>0&&D[0]<=z&&D[1]>=L?[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,y=void 0,m=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,y=Math.pow(1-p[b],2)*r+2*(1-p[b])*p[b]*a+p[b]*p[b]*s,m=Math.pow(g-e,2)+Math.pow(y-t,2),v>=0?m<v&&(v=m):v=m;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-=i,t-=a,e/=n/2+o,t/=r/2+o,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),y=[];if(v>=0&&v<=1&&y.push(v),g>=0&&g<=1&&y.push(g),0===y.length)return[];var m=y[0]*s[0]+e,b=y[0]*s[1]+t;if(y.length>1){if(y[0]==y[1])return[m,b];return[m,b,y[1]*s[0]+e,y[1]*s[1]+t]}return[m,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,y=f*c-d*p;if(0!==y){var m=v/y,b=g/y;return-.001<=m&&m<=1.001&&-.001<=b&&b<=1.001?[e+m*c,t+m*p]:l?[e+m*c,t+m*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,y=void 0,m=void 0,b=void 0,x=0;x<p.length/2;x++)g=p[2*x],y=p[2*x+1],x<p.length/2-1?(m=p[2*(x+1)],b=p[2*(x+1)+1]):(m=p[0],b=p[1]),c=this.finiteLinesIntersect(e,t,i,a,g,y,m,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";e.exports="undefined"==typeof window?null:window},function(e,t,n){"use strict";var r=n(1),i={};[n(44),n(46),n(47)].forEach(function(e){r.assign(i,e)}),e.exports=i},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=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))};i.prototype={fulfill:function(e){return a(this,1,"fulfillValue",e)},reject:function(e){return a(this,2,"rejectReason",e)},then:function(e,t){var n=this,r=new i;return n.onFulfilled.push(l(e,r,"fulfill")),n.onRejected.push(l(t,r,"reject")),o(n),r.proxy}};var a=function(e,t,n,r){return 0===e.state&&(e.state=t,e[n]=r,o(e)),e},o=function(e){1===e.state?s(e,"onFulfilled",e.fulfillValue):2===e.state&&s(e,"onRejected",e.rejectReason)},s=function(e,t,n){if(0!==e[t].length){var r=e[t];e[t]=[];var i=function(){for(var e=0;e<r.length;e++)r[e](n)};"function"==typeof setImmediate?setImmediate(i):setTimeout(i,0)}},l=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)}u(t,i)}}},u=function e(t,n){if(t===n||t.proxy===n)return void t.reject(new TypeError("cannot resolve promise with itself"));var i;if("object"===(void 0===n?"undefined":r(n))&&null!==n||"function"==typeof n)try{i=n.then}catch(e){return void t.reject(e)}if("function"!=typeof i)t.fulfill(n);else{var a=!1;try{i.call(n,function(r){a||(a=!0,r===n?t.reject(new TypeError("circular thenable chain")):e(t,r))},function(e){a||(a=!0,t.reject(e))})}catch(e){a||t.reject(e)}}};i.all=function(e){return new i(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)})},i.resolve=function(e){return new i(function(t,n){t(e)})},i.reject=function(e){return new i(function(t,n){n(e)})},e.exports="undefined"!=typeof Promise?Promise:i},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(50),n(53)].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(28),o=n(8),s=n(14),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 y=new s(e,v,!1);d.push(y),h.add(g.id)}t=d}}else t=[];this.length=0;for(var m=0,b=t.length;m<b;m++){var x=t[m];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};s.classes="";var l=0;return a.classes.forEach(function(e){return s.classes+=0==l++?e:" "+e}),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 y=d[v],m=y._private,b=m.data;if(y.clearTraversalCache(),void 0===b.id)b.id=l.generate(n,y);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(y.isNode()){var w=m.position;null==w.x&&(w.x=0),null==w.y&&(w.y=0)}if(y.isEdge()){for(var E=y,P=["source","target"],C=P.length,S=!1,T=0;T<C;T++){var D=P[T],k=b[D];i.number(k)&&(k=b[D]=""+b[D]),null==k||""===k?(r.error("Can not create edge `"+x+"` with unspecified "+D),S=!0):n.hasElementWithId(k)||(r.error("Can not create edge `"+x+"` with nonexistant "+D+" `"+k+"`"),S=!0)}if(S){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}m.map=new a,m.map.set(x,{ele:y,index:0}),m.removed=!1,n.addToPool(y)}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 z=B.parent;if(null!=z){var L=n.getElementById(z);if(L.empty())B.parent=void 0;else{for(var A=!1,O=L;!O.empty();){if(N.same(O)){A=!0,B.parent=void 0;break}O=O.parent()}A||(L[0]._private.children.push(N),N._private.parent=L[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){var r=c[e.id()];e.removed()||r||(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 y=g.source()[0],m=g.target()[0];a(y,g),a(m,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],y=this[v];"nodes"===g.group&&(g.data.parent=null===c?void 0:c,g.scratch=y._private.scratch)}return t.add(h.concat(f))}}return this},[n(29),n(43),n(48),n(49),n(54),n(55),n(56),n(57),n(62),n(63),n(64),n(7),n(65),n(66),n(67),n(68),n(69)].forEach(function(e){r.extend(c,e)}),e.exports=u},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.iterator,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)})}},{key:"forEach",value:function(e,t){return this.toArray().forEach(e,t)}},{key:"size",get:function(){return this.toArray().length}}]),e}());e.exports=a},function(e,t,n){"use strict";e.exports=n(32)},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){i.assign(this,l,e),this.listeners=[],this.emitting=0}var i=n(1),a=n(0),o=n(16),s=/^([^.]+)(\.(?:[^.]+))?$/,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){if(!1===t(e,h,p[1],p[2]?p[2]:null,r,o,l))break}}}},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){var a=this;0!==this.emitting&&(this.listeners=i.copyArray(this.listeners));for(var o=this.listeners,s=o.length-1;s>=0;s--)!function(i){var s=o[i];c(a,function(e,t,n,r,a,l){if(s.type===n&&(!r||s.namespace===r)&&(!a||e.qualifierCompare(s.qualifier,a))&&(!l||s.callback===l))return o.splice(i,1),!1},e,t,n,r)}(s);return this},u.emit=u.trigger=function(e,t,n){var r=this.listeners,o=r.length;return this.emitting++,a.array(t)||(t=[t]),h(this,function(e,a){null!=n&&(r=[{event:a.event,type:a.type,namespace:a.namespace,callback:n}],o=r.length);for(var s=0;s<o;s++)!function(n){var o=r[n];if(o.type===a.type&&(!o.namespace||o.namespace===a.namespace||".*"===o.namespace)&&e.eventMatches(e.context,o,a)){var s=[a];null!=t&&i.push(s,t),e.beforeEmit(e.context,o,a),o.conf&&o.conf.one&&(e.listeners=e.listeners.filter(function(e){return e!==o}));var l=e.callbackContext(e.context,o,a),u=o.callback.apply(l,s);e.afterEmit(e.context,o,a),!1===u&&(a.stopPropagation(),a.preventDefault())}}(s);e.bubble(e.context)&&!a.isPropagationStopped()&&e.parent(e.context).emit(a,t)},e),this.emitting--,this},e.exports=r},function(e,t,n){"use strict";var r=n(3),i=n(1),a=n(7),o=n(0),s=n(5),l=n(4),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);p.styleEnabled&&t.setStyle([]),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.style().append(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(70),n(71),n(79),n(80),n(81),n(82),n(83),n(84),n(85),n(94)].forEach(function(e){i.extend(c,e)}),e.exports=u},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,n){"use strict";var r=n(1),i=n(0),a=n(8),o=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 o=t.group;if(null==o&&(o=t.data&&null!=t.data.source&&null!=t.data.target?"edges":"nodes"),"nodes"!==o&&"edges"!==o)return void r.error("An element must be of type `nodes` or `edges`; you specified `"+o+"`");this.length=1,this[0]=this;var s=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:o,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 a,animation:{current:[],queue:[]},rscratch:{},scratch:t.scratch||{},edges:[],children:[],parent:null,traversalCache:{},backgrounding:!1};if(t.renderedPosition){var l=t.renderedPosition,u=e.pan(),c=e.zoom();s.position={x:(l.x-u.x)/c,y:(l.y-u.y)/c}}if(i.string(t.classes))for(var d=t.classes.split(/\s+/),h=0,p=d.length;h<p;h++){var f=d[h];f&&""!==f&&s.classes.add(f)}(t.style||t.css)&&e.style().applyBypass(this,t.style||t.css),this.createEmitter(),(void 0===n||n)&&this.restore()};e.exports=o},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";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),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";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},s.append=function(e){return r.stylesheet(e)?e.appendToStyle(this):r.array(e)?this.appendFromJson(e):r.string(e)&&this.appendFromString(e),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(86),n(87),n(88),n(89),n(90),n(91),n(92),n(93)].forEach(function(e){i.extend(s,e)}),o.types=s.types,o.properties=s.properties,e.exports=o},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 y=e.deq(t,h,d);if(!(y.length>0))break;for(var m=0;m<y.length;m++)c.push(y[m])}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(0),i=n(12),a=n(95),o=n(137),s=function(e){return void 0===e&&(e={}),r.plainObject(e)?new i(e):r.string(e)?a.apply(a,arguments):void 0};s.use=function(e){var t=Array.prototype.slice.call(arguments,1);return t.unshift(s),e.apply(null,t),this},s.version=n(138),s.stylesheet=s.Stylesheet=o,e.exports=s},function(e,t,n){"use strict";var r=n(0);e.exports={hex2tuple:function(e){if((4===e.length||7===e.length)&&"#"===e[0]){var t=4===e.length,n=void 0,r=void 0,i=void 0;return t?(n=parseInt(e[1]+e[1],16),r=parseInt(e[2]+e[2],16),i=parseInt(e[3]+e[3],16)):(n=parseInt(e[1]+e[2],16),r=parseInt(e[3]+e[4],16),i=parseInt(e[5]+e[6],16)),[n,r,i]}},hsl2tuple:function(e){function t(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}var 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=new RegExp("^"+this.regex.hsla+"$").exec(e);if(c){if(r=parseInt(c[1]),r<0?r=(360- -1*r%360)%360:r>360&&(r%=360),r/=360,(i=parseFloat(c[2]))<0||i>100)return;if(i/=100,(a=parseFloat(c[3]))<0||a>100)return;if(a/=100,void 0!==(o=c[4])&&((o=parseFloat(o))<0||o>1))return;if(0===i)s=l=u=Math.round(255*a);else{var d=a<.5?a*(1+i):a+i-a*i,h=2*a-d;s=Math.round(255*t(h,d,r+1/3)),l=Math.round(255*t(h,d,r)),u=Math.round(255*t(h,d,r-1/3))}n=[s,l,u,o]}return n},rgb2tuple:function(e){var t=void 0,n=new RegExp("^"+this.regex.rgba+"$").exec(e);if(n){t=[];for(var r=[],i=1;i<=3;i++){var a=n[i];if("%"===a[a.length-1]&&(r[i]=!0),a=parseFloat(a),r[i]&&(a=a/100*255),a<0||a>255)return;t.push(Math.floor(a))}var o=r[1]||r[2]||r[3],s=r[1]&&r[2]&&r[3];if(o&&!s)return;var l=n[4];if(void 0!==l){if((l=parseFloat(l))<0||l>1)return;t.push(l)}}return t},colorname2tuple:function(e){return this.colors[e.toLowerCase()]},color2tuple:function(e){return(r.array(e)?e:null)||this.colorname2tuple(e)||this.hex2tuple(e)||this.rgb2tuple(e)||this.hsl2tuple(e)},colors:{transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,