From 0376e41baf1ca9910851e1afd92120ab523cc97c Mon Sep 17 00:00:00 2001 From: Hammad Khan Date: Thu, 29 Jul 2021 17:42:17 -0400 Subject: [PATCH 01/13] Initial addition of variantmap component --- dash_bio/__init__.py | 1 + dash_bio/bundle.js | 2 +- dash_bio/bundle.js.map | 2 +- dash_bio/component_factory/_variant.py | 352 +++++++ inst/deps/bundle.js | 2 +- inst/deps/bundle.js.map | 2 +- tests/dashbio_demos/dash-variant-map/Procfile | 1 + tests/dashbio_demos/dash-variant-map/app.py | 856 ++++++++++++++++++ .../assets/GitHub-Mark-64px.png | Bin 0 -> 2625 bytes .../assets/GitHub-Mark-Light-64px.png | Bin 0 -> 2330 bytes .../dash-variant-map/assets/base.css | 422 +++++++++ .../assets/dash-variant-map.css | 85 ++ .../dash-variant-map/assets/default.css | 415 +++++++++ .../dash-variant-map/assets/demo-image.png | Bin 0 -> 10849 bytes .../assets/general-app-page.css | 248 +++++ .../assets/plotly-dash-bio-logo.png | Bin 0 -> 5043 bytes .../dash-variant-map/data/sample_data.h5 | Bin 0 -> 27383779 bytes .../dash-variant-map/layout_helper.py | 112 +++ .../dash-variant-map/requirements.txt | 16 + tests/integration/test_variant_map.py | 29 + tests/requirements.txt | 1 + 21 files changed, 2542 insertions(+), 4 deletions(-) create mode 100644 dash_bio/component_factory/_variant.py create mode 100644 tests/dashbio_demos/dash-variant-map/Procfile create mode 100644 tests/dashbio_demos/dash-variant-map/app.py create mode 100644 tests/dashbio_demos/dash-variant-map/assets/GitHub-Mark-64px.png create mode 100644 tests/dashbio_demos/dash-variant-map/assets/GitHub-Mark-Light-64px.png create mode 100644 tests/dashbio_demos/dash-variant-map/assets/base.css create mode 100644 tests/dashbio_demos/dash-variant-map/assets/dash-variant-map.css create mode 100755 tests/dashbio_demos/dash-variant-map/assets/default.css create mode 100644 tests/dashbio_demos/dash-variant-map/assets/demo-image.png create mode 100644 tests/dashbio_demos/dash-variant-map/assets/general-app-page.css create mode 100644 tests/dashbio_demos/dash-variant-map/assets/plotly-dash-bio-logo.png create mode 100644 tests/dashbio_demos/dash-variant-map/data/sample_data.h5 create mode 100644 tests/dashbio_demos/dash-variant-map/layout_helper.py create mode 100644 tests/dashbio_demos/dash-variant-map/requirements.txt create mode 100644 tests/integration/test_variant_map.py diff --git a/dash_bio/__init__.py b/dash_bio/__init__.py index ba9a89942..75f9cce79 100644 --- a/dash_bio/__init__.py +++ b/dash_bio/__init__.py @@ -9,6 +9,7 @@ from .component_factory._manhattan import ManhattanPlot from .component_factory._volcano import VolcanoPlot from .component_factory._clustergram import Clustergram +from .component_factory._variant import VariantMap if not hasattr(_dash, '__plotly_dash') and not hasattr(_dash, 'development'): print('Dash was not successfully imported. ' diff --git a/dash_bio/bundle.js b/dash_bio/bundle.js index c938cebe9..c4a6fea1c 100644 --- a/dash_bio/bundle.js +++ b/dash_bio/bundle.js @@ -1,2 +1,2 @@ -window.dash_bio=function(t){function n(n){for(var e,o,a=n[0],i=n[1],u=0,s=[];u0&&(o=1/Math.sqrt(o),t[0]=n[0]*o,t[1]=n[1]*o),t},u.dot=function(t,n){return t[0]*n[0]+t[1]*n[1]},u.cross=function(t,n,e){var r=n[0]*e[1]-n[1]*e[0];return t[0]=t[1]=0,t[2]=r,t},u.lerp=function(t,n,e,r){var o=n[0],a=n[1];return t[0]=o+r*(e[0]-o),t[1]=a+r*(e[1]-a),t},u.random=function(t,n){n=n||1;var e=2*r()*Math.PI;return t[0]=Math.cos(e)*n,t[1]=Math.sin(e)*n,t},u.transformMat2=function(t,n,e){var r=n[0],o=n[1];return t[0]=e[0]*r+e[2]*o,t[1]=e[1]*r+e[3]*o,t},u.transformMat2d=function(t,n,e){var r=n[0],o=n[1];return t[0]=e[0]*r+e[2]*o+e[4],t[1]=e[1]*r+e[3]*o+e[5],t},u.transformMat3=function(t,n,e){var r=n[0],o=n[1];return t[0]=e[0]*r+e[3]*o+e[6],t[1]=e[1]*r+e[4]*o+e[7],t},u.transformMat4=function(t,n,e){var r=n[0],o=n[1];return t[0]=e[0]*r+e[4]*o+e[12],t[1]=e[1]*r+e[5]*o+e[13],t},u.forEach=(i=u.create(),function(t,n,e,r,o,a){var u,s;for(n||(n=2),e||(e=0),s=r?Math.min(r*n+e,t.length):t.length,u=e;u0&&(a=1/Math.sqrt(a),t[0]=n[0]*a,t[1]=n[1]*a,t[2]=n[2]*a),t},s.dot=function(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]},s.cross=function(t,n,e){var r=n[0],o=n[1],a=n[2],i=e[0],u=e[1],s=e[2];return t[0]=o*s-a*u,t[1]=a*i-r*s,t[2]=r*u-o*i,t},s.lerp=function(t,n,e,r){var o=n[0],a=n[1],i=n[2];return t[0]=o+r*(e[0]-o),t[1]=a+r*(e[1]-a),t[2]=i+r*(e[2]-i),t},s.random=function(t,n){n=n||1;var e=2*r()*Math.PI,o=2*r()-1,a=Math.sqrt(1-o*o)*n;return t[0]=Math.cos(e)*a,t[1]=Math.sin(e)*a,t[2]=o*n,t},s.transformMat4=function(t,n,e){var r=n[0],o=n[1],a=n[2],i=e[3]*r+e[7]*o+e[11]*a+e[15];return i=i||1,t[0]=(e[0]*r+e[4]*o+e[8]*a+e[12])/i,t[1]=(e[1]*r+e[5]*o+e[9]*a+e[13])/i,t[2]=(e[2]*r+e[6]*o+e[10]*a+e[14])/i,t},s.transformMat3=function(t,n,e){var r=n[0],o=n[1],a=n[2];return t[0]=r*e[0]+o*e[3]+a*e[6],t[1]=r*e[1]+o*e[4]+a*e[7],t[2]=r*e[2]+o*e[5]+a*e[8],t},s.transformQuat=function(t,n,e){var r=n[0],o=n[1],a=n[2],i=e[0],u=e[1],s=e[2],l=e[3],c=l*r+u*a-s*o,f=l*o+s*r-i*a,h=l*a+i*o-u*r,p=-i*r-u*o-s*a;return t[0]=c*l+p*-i+f*-s-h*-u,t[1]=f*l+p*-u+h*-i-c*-s,t[2]=h*l+p*-s+c*-u-f*-i,t},s.rotateX=function(t,n,e,r){var o=[],a=[];return o[0]=n[0]-e[0],o[1]=n[1]-e[1],o[2]=n[2]-e[2],a[0]=o[0],a[1]=o[1]*Math.cos(r)-o[2]*Math.sin(r),a[2]=o[1]*Math.sin(r)+o[2]*Math.cos(r),t[0]=a[0]+e[0],t[1]=a[1]+e[1],t[2]=a[2]+e[2],t},s.rotateY=function(t,n,e,r){var o=[],a=[];return o[0]=n[0]-e[0],o[1]=n[1]-e[1],o[2]=n[2]-e[2],a[0]=o[2]*Math.sin(r)+o[0]*Math.cos(r),a[1]=o[1],a[2]=o[2]*Math.cos(r)-o[0]*Math.sin(r),t[0]=a[0]+e[0],t[1]=a[1]+e[1],t[2]=a[2]+e[2],t},s.rotateZ=function(t,n,e,r){var o=[],a=[];return o[0]=n[0]-e[0],o[1]=n[1]-e[1],o[2]=n[2]-e[2],a[0]=o[0]*Math.cos(r)-o[1]*Math.sin(r),a[1]=o[0]*Math.sin(r)+o[1]*Math.cos(r),a[2]=o[2],t[0]=a[0]+e[0],t[1]=a[1]+e[1],t[2]=a[2]+e[2],t},s.forEach=function(){var t=s.create();return function(n,e,r,o,a,i){var u,s;for(e||(e=3),r||(r=0),s=o?Math.min(o*e+r,n.length):n.length,u=r;u1?0:Math.acos(o)},s.str=function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},void 0!==t&&(t.vec3=s);var l={create:function(){var t=new e(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t},clone:function(t){var n=new e(4);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n},fromValues:function(t,n,r,o){var a=new e(4);return a[0]=t,a[1]=n,a[2]=r,a[3]=o,a},copy:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t},set:function(t,n,e,r,o){return t[0]=n,t[1]=e,t[2]=r,t[3]=o,t},add:function(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t[3]=n[3]+e[3],t},subtract:function(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t[3]=n[3]-e[3],t}};l.sub=l.subtract,l.multiply=function(t,n,e){return t[0]=n[0]*e[0],t[1]=n[1]*e[1],t[2]=n[2]*e[2],t[3]=n[3]*e[3],t},l.mul=l.multiply,l.divide=function(t,n,e){return t[0]=n[0]/e[0],t[1]=n[1]/e[1],t[2]=n[2]/e[2],t[3]=n[3]/e[3],t},l.div=l.divide,l.min=function(t,n,e){return t[0]=Math.min(n[0],e[0]),t[1]=Math.min(n[1],e[1]),t[2]=Math.min(n[2],e[2]),t[3]=Math.min(n[3],e[3]),t},l.max=function(t,n,e){return t[0]=Math.max(n[0],e[0]),t[1]=Math.max(n[1],e[1]),t[2]=Math.max(n[2],e[2]),t[3]=Math.max(n[3],e[3]),t},l.scale=function(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t[3]=n[3]*e,t},l.scaleAndAdd=function(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t[3]=n[3]+e[3]*r,t},l.distance=function(t,n){var e=n[0]-t[0],r=n[1]-t[1],o=n[2]-t[2],a=n[3]-t[3];return Math.sqrt(e*e+r*r+o*o+a*a)},l.dist=l.distance,l.squaredDistance=function(t,n){var e=n[0]-t[0],r=n[1]-t[1],o=n[2]-t[2],a=n[3]-t[3];return e*e+r*r+o*o+a*a},l.sqrDist=l.squaredDistance,l.length=function(t){var n=t[0],e=t[1],r=t[2],o=t[3];return Math.sqrt(n*n+e*e+r*r+o*o)},l.len=l.length,l.squaredLength=function(t){var n=t[0],e=t[1],r=t[2],o=t[3];return n*n+e*e+r*r+o*o},l.sqrLen=l.squaredLength,l.negate=function(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=-n[3],t},l.inverse=function(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t[3]=1/n[3],t},l.normalize=function(t,n){var e=n[0],r=n[1],o=n[2],a=n[3],i=e*e+r*r+o*o+a*a;return i>0&&(i=1/Math.sqrt(i),t[0]=n[0]*i,t[1]=n[1]*i,t[2]=n[2]*i,t[3]=n[3]*i),t},l.dot=function(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]+t[3]*n[3]},l.lerp=function(t,n,e,r){var o=n[0],a=n[1],i=n[2],u=n[3];return t[0]=o+r*(e[0]-o),t[1]=a+r*(e[1]-a),t[2]=i+r*(e[2]-i),t[3]=u+r*(e[3]-u),t},l.random=function(t,n){return n=n||1,t[0]=r(),t[1]=r(),t[2]=r(),t[3]=r(),l.normalize(t,t),l.scale(t,t,n),t},l.transformMat4=function(t,n,e){var r=n[0],o=n[1],a=n[2],i=n[3];return t[0]=e[0]*r+e[4]*o+e[8]*a+e[12]*i,t[1]=e[1]*r+e[5]*o+e[9]*a+e[13]*i,t[2]=e[2]*r+e[6]*o+e[10]*a+e[14]*i,t[3]=e[3]*r+e[7]*o+e[11]*a+e[15]*i,t},l.transformQuat=function(t,n,e){var r=n[0],o=n[1],a=n[2],i=e[0],u=e[1],s=e[2],l=e[3],c=l*r+u*a-s*o,f=l*o+s*r-i*a,h=l*a+i*o-u*r,p=-i*r-u*o-s*a;return t[0]=c*l+p*-i+f*-s-h*-u,t[1]=f*l+p*-u+h*-i-c*-s,t[2]=h*l+p*-s+c*-u-f*-i,t},l.forEach=function(){var t=l.create();return function(n,e,r,o,a,i){var u,s;for(e||(e=4),r||(r=0),s=o?Math.min(o*e+r,n.length):n.length,u=r;u.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):(s.cross(d,n,e),t[0]=d[0],t[1]=d[1],t[2]=d[2],t[3]=1+r,y.normalize(t,t))}),y.setAxes=(v=h.create(),function(t,n,e,r){return v[0]=e[0],v[3]=e[1],v[6]=e[2],v[1]=r[0],v[4]=r[1],v[7]=r[2],v[2]=-n[0],v[5]=-n[1],v[8]=-n[2],y.normalize(t,y.fromMat3(t,v))}),y.clone=l.clone,y.fromValues=l.fromValues,y.copy=l.copy,y.set=l.set,y.identity=function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},y.setAxisAngle=function(t,n,e){e*=.5;var r=Math.sin(e);return t[0]=r*n[0],t[1]=r*n[1],t[2]=r*n[2],t[3]=Math.cos(e),t},y.add=l.add,y.multiply=function(t,n,e){var r=n[0],o=n[1],a=n[2],i=n[3],u=e[0],s=e[1],l=e[2],c=e[3];return t[0]=r*c+i*u+o*l-a*s,t[1]=o*c+i*s+a*u-r*l,t[2]=a*c+i*l+r*s-o*u,t[3]=i*c-r*u-o*s-a*l,t},y.mul=y.multiply,y.scale=l.scale,y.rotateX=function(t,n,e){e*=.5;var r=n[0],o=n[1],a=n[2],i=n[3],u=Math.sin(e),s=Math.cos(e);return t[0]=r*s+i*u,t[1]=o*s+a*u,t[2]=a*s-o*u,t[3]=i*s-r*u,t},y.rotateY=function(t,n,e){e*=.5;var r=n[0],o=n[1],a=n[2],i=n[3],u=Math.sin(e),s=Math.cos(e);return t[0]=r*s-a*u,t[1]=o*s+i*u,t[2]=a*s+r*u,t[3]=i*s-o*u,t},y.rotateZ=function(t,n,e){e*=.5;var r=n[0],o=n[1],a=n[2],i=n[3],u=Math.sin(e),s=Math.cos(e);return t[0]=r*s+o*u,t[1]=o*s-r*u,t[2]=a*s+i*u,t[3]=i*s-a*u,t},y.calculateW=function(t,n){var e=n[0],r=n[1],o=n[2];return t[0]=e,t[1]=r,t[2]=o,t[3]=Math.sqrt(Math.abs(1-e*e-r*r-o*o)),t},y.dot=l.dot,y.lerp=l.lerp,y.slerp=function(t,n,e,r){var o,a,i,u,s,l=n[0],c=n[1],f=n[2],h=n[3],p=e[0],d=e[1],m=e[2],g=e[3];return(a=l*p+c*d+f*m+h*g)<0&&(a=-a,p=-p,d=-d,m=-m,g=-g),1-a>1e-6?(o=Math.acos(a),i=Math.sin(o),u=Math.sin((1-r)*o)/i,s=Math.sin(r*o)/i):(u=1-r,s=r),t[0]=u*l+s*p,t[1]=u*c+s*d,t[2]=u*f+s*m,t[3]=u*h+s*g,t},y.invert=function(t,n){var e=n[0],r=n[1],o=n[2],a=n[3],i=e*e+r*r+o*o+a*a,u=i?1/i:0;return t[0]=-e*u,t[1]=-r*u,t[2]=-o*u,t[3]=a*u,t},y.conjugate=function(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=n[3],t},y.length=l.length,y.len=y.length,y.squaredLength=l.squaredLength,y.sqrLen=y.squaredLength,y.normalize=l.normalize,y.fromMat3=function(t,n){var e,r=n[0]+n[4]+n[8];if(r>0)e=Math.sqrt(r+1),t[3]=.5*e,e=.5/e,t[0]=(n[5]-n[7])*e,t[1]=(n[6]-n[2])*e,t[2]=(n[1]-n[3])*e;else{var o=0;n[4]>n[0]&&(o=1),n[8]>n[3*o+o]&&(o=2);var a=(o+1)%3,i=(o+2)%3;e=Math.sqrt(n[3*o+o]-n[3*a+a]-n[3*i+i]+1),t[o]=.5*e,e=.5/e,t[3]=(n[3*a+i]-n[3*i+a])*e,t[a]=(n[3*a+o]+n[3*o+a])*e,t[i]=(n[3*i+o]+n[3*o+i])*e}return t},y.str=function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},void 0!==t&&(t.quat=y)}(e.exports)}()},function(t,n,e){"use strict";var r=e(7),o=e(6),a=e(25);function i(t,n,e){return Math.min(n,Math.max(t,e))}t.exports.new=function(){return{aspect:1,zoom:.125,translation:{x:0,y:0},atomScale:.6,relativeAtomScale:1,bondScale:.5,rotation:r.mat4.create(),ao:.75,aoRes:256,brightness:.5,outline:0,spf:32,bonds:!1,bondThreshold:1.2,bondShade:.5,atomShade:.5,resolution:768,dofStrength:0,dofPosition:.5,fxaa:1}},t.exports.center=function(t,n){for(var e=-1/0,a=1/0,i=-1/0,u=1/0,s=0;s=0;)n=s[e],Object(o.a)(n,t)&&!c(r,n)&&(r[r.length]=n),e-=1;return r})):Object(r.a)((function(t){return Object(t)!==t?[]:Object.keys(t)}));n.a=f},function(t,n,e){"use strict";var r=e(3),o=Object(r.a)((function(t){return null===t?"Null":void 0===t?"Undefined":Object.prototype.toString.call(t).slice(8,-1)}));n.a=o},function(t,n,e){"use strict";e.d(n,"a",(function(){return a}));var r=e(3),o=e(4);function a(t){return function n(e,a){switch(arguments.length){case 0:return n;case 1:return Object(o.a)(e)?n:Object(r.a)((function(n){return t(e,n)}));default:return Object(o.a)(e)&&Object(o.a)(a)?n:Object(o.a)(e)?Object(r.a)((function(n){return t(n,a)})):Object(o.a)(a)?Object(r.a)((function(n){return t(e,n)})):t(e,a)}}}},function(t,n,e){"use strict";e.d(n,"a",(function(){return m})),e.d(n,"c",(function(){return g})),e.d(n,"b",(function(){return v}));var r=e(0),o=e.n(r),a=e(1),i=e.n(a),u=e(2);function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function c(t,n){for(var e=0;en&&(n=u,t.farAtom=r)}return t.farAtom});t.exports.getRadius=function(t){var n=u(t),e=a.MAX_ATOM_RADIUS,r=2.5*Math.sqrt(e*e+e*e+e*e);return Math.sqrt(n.x*n.x+n.y*n.y+n.z*n.z)+r}},function(t,n,e){var o;o=function(){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}return e.m=t,e.c=n,e.p="",e(0)}([function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.rnaPlot=n.RNAGraph=void 0;var o=e(1);Object.defineProperty(n,"RNAGraph",{enumerable:!0,get:function(){return o.RNAGraph}});var a=e(3);Object.defineProperty(n,"rnaPlot",{enumerable:!0,get:function(){return a.rnaPlot}}),n.FornaContainer=function(t,n){var e=this;if(e.options={displayAllLinks:!1,labelInterval:10,applyForce:!0,chargeDistance:110,friction:.35,middleCharge:-30,otherCharge:-30,linkDistanceMultiplier:15,initialSize:null,layout:"standard-polygonal",allowPanningAndZooming:!0,transitionDuration:500,resizeSvgOnResize:!0},arguments.length>1)for(var a in n)e.options.hasOwnProperty(a)&&(e.options[a]=n[a]);null!==e.options.initialSize?(e.options.svgW=e.options.initialSize[0],e.options.svgH=e.options.initialSize[1]):(e.options.svgW=800,e.options.svgH=800),l.default.scale.category20();var u=null,s=null,p=l.default.scale.linear().domain([0,e.options.svgW]).range([0,e.options.svgW]),d=l.default.scale.linear().domain([0,e.options.svgH]).range([0,e.options.svgH]),m=e.graph={nodes:[],links:[]};function g(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function v(t){var n=t,e=t.prevNode;if(null!==e&&t.linked){var r=[-(n.x-e.x),-(n.y-e.y)],o=[-(r=[r[0]/g(r),r[1]/g(r)])[1],r[0]],a=[t.radius*r[0],t.radius*r[1]],i="M"+(a[0]+6*(r[0]+o[0])/2)+","+(a[1]+6*(r[1]+o[1])/2)+"L"+a[0]+","+a[1]+"L"+(a[0]+6*(r[0]-o[0])/2)+","+(a[1]+6*(r[1]-o[1])/2);l.default.select(this).attr("d",i)}}function y(t){return"basepair"==t.linkType||"backbone"==t.linkType||"pseudoknot"==t.linkType||"label_link"==t.linkType||"external"==t.linkType||"chain_chain"==t.linkType}function b(t,n,e){if(t.hasOwnProperty(n.num)){var r=parseFloat(t[n.num]);return isNaN(r)?t[n.num]:e(r)}return"white"}function x(){}function M(){u&&(mpos=l.default.mouse(A.node()),N.attr("x1",u.x).attr("y1",u.y).attr("x2",mpos[0]).attr("y2",mpos[1]))}function w(){u&&N.attr("class","drag_line_hidden"),O()}e.linkStrengths={pseudoknot:0,proteinChain:0,chainChain:0,intermolecule:10,external:0,other:10},e.displayParameters={displayBackground:"true",displayNumbering:"true",displayNodeOutline:"true",displayNodeLabel:"true",displayLinks:"true",displayPseudoknotLinks:"true",displayProteinLinks:"true"},e.colorScheme="structure",e.customColors={},e.animation=e.options.applyForce,e.deaf=!1,e.rnas={},e.extraLinks=[],Array.prototype.equals=function(t){if(!t)return!1;if(this.length!=t.length)return!1;for(var n=0,e=this.length;n0?l.default.max(e.graph.nodes.map((function(t){return t.x}))):0,o=l.default.min(t.nodes.map((function(t){return t.x}))),t.nodes.forEach((function(t){t.x+=r-o+20,t.px+=r-o}))),t.nodes.forEach((function(n){n.rna=t})),e.rnas[t.uid]=t,e.recalculateGraph(),e.update(),e.centerView(),t},e.transitionRNA=function(t,n){var r=e.options.transitionDuration,o={uids:e.graph.nodes.filter((function(t){return"nucleotide"==t.nodeType})).map((function(t){return t.uid}))},a=e.createInitialLayout(t,o),i=T.selectAll("g.gnode").data(a.nodes,Y);0===(r=e.options.transitionDuration)?i.attr("transform",(function(t){return"translate("+[t.x,t.y]+")"})):i.transition().attr("transform",(function(t){return"translate("+[t.x,t.y]+")"})).duration(r);var u=E.selectAll("line.link").data(a.links.filter(y),X),s=e.createNewNodes(i.enter()).attr("transform",(function(t){return void 0!==t.x&&void 0!==t.y?"translate("+[0,0]+")":""}));0===r?i.exit().remove():i.exit().transition().attr("transform",(function(t){return void 0!==t.x&&void 0!==t.y?"translate("+[0,0]+")":""})),i.select("path").each(v),e.graph.nodes=i.data(),e.updateStyle(),e.centerView(r),u.exit().remove(),0===r?(u.attr("x1",(function(t){return t.source.x})).attr("y1",(function(t){return t.source.y})).attr("x2",(function(t){return t.target.x})).attr("y2",(function(t){return t.target.y})),e.createNewLinks(u.enter()),e.graph.links=u.data(),e.updateStyle()):u.transition().attr("x1",(function(t){return t.source.x})).attr("y1",(function(t){return t.source.y})).attr("x2",(function(t){return t.target.x})).attr("y2",(function(t){return t.target.y})).duration(r).call((function(t,n){0===t.size()&&setTimeout(n,r);var e=0;t.each((function(){++e})).each("end",(function(){--e||n.apply(this,arguments)}))}),(function(){e.createNewLinks(u.enter()),e.graph.links=u.data(),e.updateStyle(),void 0!==n&&n()})),0===r?s.attr("transform",(function(t){return void 0!==t.x&&void 0!==t.y?"translate("+[t.x,t.y]+")":""})):s.transition().attr("transform",(function(t){return void 0!==t.x&&void 0!==t.y?"translate("+[t.x,t.y]+")":""}))},e.recalculateGraph=function(){for(var t in e.graph.nodes=[],e.graph.links=[],e.rnas)e.graph.nodes=e.graph.nodes.concat(e.rnas[t].nodes),e.graph.links=e.graph.links.concat(e.rnas[t].links);for(var n={},r=0;r0?(maxX=l.default.max(e.graph.nodes.map((function(t){return t.x}))),maxY=l.default.max(e.graph.nodes.map((function(t){return t.y})))):(maxX=0,maxY=0),t.nodes.forEach((function(t){t.rna.uid in e.rnas||(e.rnas[t.rna.uid]=t.rna),t.x+=maxX,t.px+=maxX})),r=new o.RNAGraph("",""),r.nodes=t.nodes,r.links=t.links,e.recalculateGraph(),e.update(),e.centerView()},e.addCustomColors=function(t){e.customColors=t},e.addCustomColorsText=function(t){var n=new f.ColorScheme(t);e.customColors=n.colorsJson,e.changeColorScheme("custom")},e.clearNodes=function(){e.graph.nodes=[],e.graph.links=[],e.rnas={},e.extraLinks=[],e.update()},e.toJSON=function(){var t={rnas:e.rnas,extraLinks:e.extraLinks};return JSON.stringify(t,(function(t,n){return"rna"==t?void 0:n}),"\t")},e.fromJSON=function(t){var n,a;try{var i=JSON.parse(t);n=i.rnas,a=i.extraLinks}catch(t){throw t}for(var u in n)"rna"==n[u].type?(r=new o.RNAGraph,r.seq=n[u].seq,r.dotbracket=n[u].dotbracket,r.circular=n[u].circular,r.pairtable=n[u].pairtable,r.uid=n[u].uid,r.structName=n[u].structName,r.nodes=n[u].nodes,r.links=n[u].links,r.rnaLength=n[u].rnaLength,r.elements=n[u].elements,r.nucsToNodes=n[u].nucsToNodes,r.pseudoknotPairs=n[u].pseudoknotPairs):(r=new ProteinGraph,r.size=n[u].size,r.nodes=n[u].nodes,r.uid=n[u].uid),e.addRNAJSON(r,!1);a.forEach((function(t){e.extraLinks.push(t)})),e.recalculateGraph(),e.update()},e.setSize=function(){if(null==e.options.initialSize){var n=l.default.select(t).node().offsetHeight,r=l.default.select(t).node().offsetWidth;e.options.svgW=r,e.options.svgH=n,p.range([0,r]).domain([0,r]),d.range([0,n]).domain([0,n]),e.zoomer.x(p).y(d),e.brusher.x(p).y(d),e.centerView(),e.options.resizeSvgOnResize&&_.attr("width",r).attr("height",n)}},e.setOutlineColor=function(t){T.selectAll("g.gnode").select("[node_type=nucleotide]").style("fill",t)},e.changeColorScheme=function(t){T.selectAll("[node_type=protein]").classed("protein",!0).attr("r",(function(t){return t.radius})),T.selectAll("g.gnode"),T.selectAll("g.gnode").selectAll("circle");var n=T.selectAll("g.gnode").select("[node_type=nucleotide]");if(e.colorScheme=t,"sequence"==t){var r=l.default.scale.ordinal().range(["#dbdb8d","#98df8a","#ff9896","#aec7e8","#aec7e8"]).domain(["A","C","G","U","T"]);n.style("fill",(function(t){return r(t.name)}))}else"structure"==t?(r=l.default.scale.category10().domain(["s","m","i","e","t","h","x"]).range(["lightgreen","#ff9896","#dbdb8d","lightsalmon","lightcyan","lightblue","transparent"]),n.style("fill",(function(t){return r(t.elemType)}))):"positions"==t?n.style("fill",(function(t){return l.default.scale.linear().range(["#98df8a","#dbdb8d","#ff9896"]).interpolate(l.default.interpolateLab).domain([1,1+(t.rna.rnaLength-1)/2,t.rna.rnaLength])(t.num)})):"custom"==t&&(void 0!==e.customColors&&"domain"in e.customColors&&"range"in e.customColors&&(r=l.default.scale.linear().interpolate(l.default.interpolateLab).domain(e.customColors.domain).range(e.customColors.range)),n.style("fill",(function(t){return void 0!==e.customColors&&e.customColors.hasOwnProperty("colorValues")?e.customColors.colorValues.hasOwnProperty(t.structName)&&e.customColors.colorValues[t.structName].hasOwnProperty(t.num)?b(e.customColors.colorValues[t.structName],t,r):e.customColors.colorValues.hasOwnProperty("")?b(e.customColors.colorValues[""],t,r):"white":"white"})))},window.addEventListener("resize",e.setSize,!1),e.zoomer=l.default.behavior.zoom().scaleExtent([.1,10]).x(p).y(d).on("zoomstart",R).on("zoom",P),l.default.select(t).select("svg").remove();var _=l.default.select(t).classed("forna-container",!0).attr("tabindex",1).on("keydown.brush",B).on("keyup.brush",I).each((function(){this.focus()})).append("svg:svg").attr("width",e.options.svgW).attr("height",e.options.svgH).attr("id","plotting-area");e.options.svg=_;var k=_.append("svg:g").on("mousemove",M).on("mousedown",x).on("mouseup",w);e.options.allowPanningAndZooming&&k.call(e.zoomer);var S=k.append("g").datum((function(){return{selected:!1,previouslySelected:!1}})).attr("class","brush"),A=k.append("svg:g"),E=A.append("svg:g"),T=A.append("svg:g");function R(){var t=T.selectAll("g.gnode").selectAll(".outline_node");t.each((function(t){t.selected=!1,t.previouslySelected=!1})),t.classed("selected",!1)}function P(){A.attr("transform","translate("+l.default.event.translate+") scale("+l.default.event.scale+")")}e.brusher=l.default.svg.brush().x(p).y(d).on("brushstart",(function(t){T.selectAll("g.gnode").selectAll(".outline_node").each((function(t){t.previouslySelected=L&&t.selected}))})).on("brush",(function(){var t=T.selectAll("g.gnode").selectAll(".outline_node"),n=l.default.event.target.extent();t.classed("selected",(function(t){return t.selected=e.options.applyForce&&t.previouslySelected^(n[0][0]<=t.x&&t.xr||sa||l-1){if(t.source.rna==t.target.rna){var n=t.source.rna;n.addPseudoknots(),n.pairtable[t.source.num]=0,n.pairtable[t.target.num]=0,V(n)}else extraLinkIndex=e.extraLinks.indexOf(t),e.extraLinks.splice(extraLinkIndex,1);e.recalculateGraph()}e.update()},G=function(t){C&&(t.linkType in{backbone:!0,fake:!0,fake_fake:!0,label_link:!0}||H(t))};e.addLink=function(t){t.source.rna==t.target.rna?(r=t.source.rna,r.pairtable[t.source.num]=t.target.num,r.pairtable[t.target.num]=t.source.num,V(r)):(t.linkType="intermolecule",e.extraLinks.push(t)),e.recalculateGraph(),e.update()};var W=function(t){l.default.event.defaultPrevented||(L||T.selectAll("g.gnode").selectAll(".outline_node").classed("selected",(function(t){return t.selected=e.options.applyForce&&(t.previouslySelected=!1)})),l.default.select(this).select("circle").classed("selected",t.selected=e.options.applyForce&&!t.previouslySelected))},Z=function(t){if(u){if((s=t)==u)return void O();var n={source:u,target:s,linkType:"basepair",value:1,uid:generateUUID()};for(i=0;i0&&"*"==u.dotbracket[u.dotbracket.length-1]&&(u.dotbracket=u.dotbracket.slice(0,u.dotbracket.length-1),u.circular=!0),u.uid=a(),u.elements=[],u.pseudoknotPairs=[],u.nucsToNodes={},u.addUids=function(t){for(var n=u.nodes.filter((function(t){return"nucleotide"==t.nodeType})),e=0;e=0;)n.push(e),t=t.substring(0,e)+"oo"+t.substring(e+1,t.length);return{targetString:t,breaks:n}};var s=u.removeBreaks(u.dotbracket);u.dotbracket=s.targetString,u.dotBracketBreaks=s.breaks,s=u.removeBreaks(u.seq),u.seq=s.targetString,u.seqBreaks=s.breaks,u.calculateStartNumberArray=function(){u.startNumberArray=[];for(var t=0;t=0&&(e=!0);e?u.elements[n][2].map((function(t){0!=t&&(u.nodes[t-1].elemType="e")})):u.elements[n][2].map((function(t){0!=t&&(u.nodes[t-1].elemType=u.elements[n][0])}))}return u},u.getPositions=function(t){for(var n=[],e=u.nodes.filter((function(n){return n.nodeType==t})),r=0;r=4})),e=0;eu.dotbracket.length)){u.links.push({source:u.nodes[t[f]-1],target:u.nodes[u.nodes.length-1],linkType:"fake",value:e,uid:a()}),t.length>4&&u.links.push({source:u.nodes[t[f]-1],target:u.nodes[t[(f+Math.floor(t.length/2))%t.length]-1],linkType:"fake",value:2*e,uid:a()});var h=3.14159*(t.length-2)/t.length,p=2*Math.cos(1.570795-h/2);u.links.push({source:u.nodes[t[f]-1],target:u.nodes[t[(f+2)%t.length]-1],linkType:"fake",value:p});var d=u.nodes[t[f]-1];"x"in d&&(s+=d.x,l+=d.y,c+=1)}return c>0&&(i.x=s/c,i.y=l/c,i.px=i.x,i.py=i.y),u},u.connectFakeNodes=function(){for(var t={},n=u.nodes.filter((function(t){return"middle"==t.nodeType})),e=new Set,r=1;r<=u.nodes.length;r++)t[r]=[];for(r=0;r=0||u.dotBracketBreaks.indexOf(e-2)>=0)&&(i=""),u.nodes.push({name:i,num:e+u.startNumberArray[e-1]-1,radius:5,rna:u,nodeType:"nucleotide",structName:u.structName,elemType:n[e],uid:a(),linked:!1})}for(e=0;e1&&-1===u.dotBracketBreaks.indexOf(e-1)&&-1==u.dotBracketBreaks.indexOf(e-2)&&-1==u.dotBracketBreaks.indexOf(e-3)&&(u.links.push({source:u.nodes[e-2],target:u.nodes[e-1],linkType:"backbone",value:1,uid:a()}),u.nodes[e-1].linked=!0);for(e=0;er)return[];for(;0===t[e];e++)i.push(e);for(;0===t[r];r--)s.push(r);if(e>r){if(i.push(e),0===n)return[["e",n,i.sort(o)]];for(var l=!1,c=[],f=[],h=0;h=0&&(l=!0);return[["h",n,i.sort(o)]]}if(t[e]!=r){var p=i;for(h=e,p.push(h);h<=r;){for(a=a.concat(u.ptToElements(t,n,h,t[h])),p.push(t[h]),h=t[h]+1;0===t[h]&&h<=r;h++)p.push(h);p.push(h)}return p.pop(),(p=p.concat(s)).length>0&&(0===n?a.push(["e",n,p.sort(o)]):a.push(["m",n,p.sort(o)])),a}t[e]===r&&(i.push(e),s.push(r),i.concat(s).length>4&&(0===n?a.push(["e",n,i.concat(s).sort(o)]):a.push(["i",n,i.concat(s).sort(o)])));for(var d=[];t[e]===r&&e0)){eloop=externalLoop[0],nucs=eloop[2].sort(o),prev=nucs[0],hloop=!0,numGreater=0;for(var t=1;t1&&(numGreater+=1),prev=nucs[t];1==numGreater?eloop[0]="h":2==numGreater?eloop[0]="i":eloop[0]="m"}return u},u.reassignLinkUids=function(){for(var t=0;t1&&(u.pseudoknotPairs=u.pseudoknotPairs.concat(r.rnaUtilities.removePseudoknotsFromPairtable(u.pairtable))),u},u.addPseudoknots=function(){for(var t=u.pairtable,n=u.pseudoknotPairs,e=0;e0&&u.recalculateElements()}void 0===String.prototype.trim&&(String.prototype.trim=function(){return String(this).replace(/^\s+|\s+$/g,"")})},function(t,n,e){t.exports=function(t){function n(r){if(e[r])return e[r].exports;var o=e[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}var e={};return n.m=t,n.c=e,n.p="",n(0)}([function(t,n,e){t.exports=e(1)},function(t,n){"use strict";function e(){var t=this;t.bracketLeft="([{abcdefghijklmnopqrstuvwxyz".split(""),t.inverseBrackets=function(t){for(var n={},e=0;e=r;r++){e[r]=new Array(n+1);for(var o=r;n>=o;o++)e[r][o]=0}var a=0;for(r=n-0-1;r>0;r--)for(o=r+0+1;n>=o;o++){a=e[r][o-1];for(var i=o-0-1;i>=r;i--)t[i]===o&&(a=Math.max(a,(i>r?e[r][i-1]:0)+1+(o-i-1>0?e[i+1][o-1]:0)));e[r][o]=a}return a=e[1][n],e},t.backtrackMaximumMatching=function(n,e){var r=Array.apply(null,Array(n.length)).map((function(){return 0}));return t.mmBt(n,r,e,1,n.length-1),r},t.mmBt=function(n,e,r,o,a){var i=n[o][a];if(!(0>a-o-1)){if(n[o][a-1]==i)return void t.mmBt(n,e,r,o,a-1);for(var u=a-0-1;u>=o;u--)if(r[a]===u&&(u>o?n[o][u-1]:0)+(a-u-1>0?n[u+1][a-1]:0)+1==i)return e[u]=a,e[a]=u,u>o&&t.mmBt(n,e,r,o,u-1),void t.mmBt(n,e,r,u+1,a-1);console.log("FAILED!!!"+o+","+a+": backtracking failed!")}},t.dotbracketToPairtable=function(n){var e=Array.apply(null,new Array(n.length+1)).map(Number.prototype.valueOf,0);e[0]=n.length;for(var r={},o=0;o0)throw"Unmatched base at position "+r[c][0];return e},t.insertIntoStack=function(t,n,e){for(var r=0;t[r].length>0&&t[r][t[r].length-1]r?t.bracketLeft[t.insertIntoStack(e,r,n[r])]:t.bracketRight[t.deleteFromStack(e,r)]}return a},t.findUnmatched=function(n,e,r){for(var o=[],a=[],i=e,u=r,s=e;r>=s;s++)0!==n[s]&&(n[s]r)&&a.push([s,n[s]]);for(s=i;u>=s;s++){for(;0===n[s]&&u>=s;)s++;for(r=n[s];n[s]===r;)s++,r--;o=o.concat(t.findUnmatched(n,s,r))}return a.length>0&&o.push(a),o},t.removePseudoknotsFromPairtable=function(n){for(var e=t.maximumMatching(n),r=t.backtrackMaximumMatching(e,n),o=[],a=1;aa)return[];for(;0===n[o];o++)s.push(o);for(;0===n[a];a--)l.push(a);if(o>a){if(s.push(o),0===e)return[["e",e,s.sort(r)]];for(var c=!1,f=[],h=[],p=0;p=0&&(c=!0);return[["h",e,s.sort(r)]]}if(n[o]!=a){var d=s;for(p=o,d.push(p);a>=p;){for(u=u.concat(t.ptToElements(n,e,p,n[p],i)),d.push(n[p]),p=n[p]+1;0===n[p]&&a>=p;p++)d.push(p);d.push(p)}return d.pop(),(d=d.concat(l)).length>0&&(0===e?u.push(["e",e,d.sort(r)]):u.push(["m",e,d.sort(r)])),u}if(n[o]===a){s.push(o),l.push(a);var m=s.concat(l);m.length>4&&(0===e?u.push(["e",e,s.concat(l).sort(r)]):u.push(["i",e,s.concat(l).sort(r)]))}for(var g=[];n[o]===a&&a>o;)g.push(o),g.push(a),o+=1,a-=1,e+=1;return s=[o-1],l=[a+1],u.push(["s",e,g.sort(r)]),u.concat(t.ptToElements(n,e,o,a,i))}}Object.defineProperty(n,"__esModule",{value:!0}),n.arraysEqual=function(t,n){if(t===n)return!0;if(null===t||null===n)return!1;if(t.length!=n.length)return!1;for(var e=0;e=u;u++)e.push(u);else console.log("Malformed range (too many dashes):",t)}return e},n.parseColorText=function(t){for(var e=t.split("\n"),r="",o=1,a={colorValues:{"":{}},range:["white","steelblue"]},i=[],u=0;u"!=e[u][0])for(var s=e[u].trim().split(/[\s]+/),l=0;lt&&(r=t),t>o&&(o=t));for(a in n.colorsJson.colorValues[e])"number"==typeof(t=n.colorsJson.colorValues[e][a])&&(n.colorsJson.colorValues[e][a]=(t-r)/(o-r))}return n},n.parseColorText(n.colorsText),n};var r=function(t,n){return t-n};n.rnaUtilities=new e}])},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.rnaPlot=function(){var t,n,e={width:400,height:400,nucleotideRadius:5,rnaEdgePadding:0,labelInterval:0,showNucleotideLabels:!0,startNucleotideNumber:1,bundleExternalLinks:!1};function a(a){a.each((function(a){var i=new r.RNAGraph(a.sequence,a.structure,a.name).recalculateElements().elementsToJson().addName(a.name);a.rnaGraph=i;for(var u=(new o.NAView).naview_xy_coordinates(i.pairtable),s=[],l=0;l2&&void 0!==arguments[2]?arguments[2]:"",i=d3.extent(r),u=d3.extent(o),s=30;""!=a&&(u[1]+=s),i[0]-=e.nucleotideRadius+e.rnaEdgePadding,u[0]-=e.nucleotideRadius+e.rnaEdgePadding,i[1]+=e.nucleotideRadius+e.rnaEdgePadding,u[1]+=e.nucleotideRadius+e.rnaEdgePadding;var l,c=i[1]-i[0],f=u[1]-u[0],h=c-e.width,p=f-e.height;function d(t,n,e){var r=(t.range()[1]-t.range()[0])/(t.domain()[1]-t.domain()[0]),o=(n[1]-n[0])*r,a=(e[1]-e[0]-o)/2;return{scaleFactor:r,scale:d3.scale.linear().domain(n).range([e[0]+a,e[1]-a])}}return h>p?(l=d(t=d3.scale.linear().domain(i).range([0,e.width]),u,[0,e.height]),n=l.scale):(l=d(n=d3.scale.linear().domain(u).range([0,e.height]),i,[0,e.width]),t=l.scale),t.range()[0],t.domain()[0],n.range()[0],n.domain()[0],"translate("+-(t.domain()[0]*l.scaleFactor-t.range()[0])+","+-(n.domain()[0]*l.scaleFactor-n.range()[0])+")scale("+l.scaleFactor+")"}(i.nodes.map((function(t){return t.x})),i.nodes.map((function(t){return t.y}))),f=d3.select(this).append("g").attr("transform",c),h=i.nodes.filter((function(t){return"nucleotide"==t.nodeType})),p=i.nodes.filter((function(t){return"label"==t.nodeType})),d=i.links;!function(t,n){n=n.filter((function(t){return null!==t.source&&null!==t.target})),t.selectAll(".rna-link").data(n).enter().append("svg:line").attr("x1",(function(t){return t.source.x})).attr("x2",(function(t){return t.target.x})).attr("y1",(function(t){return t.source.y})).attr("y2",(function(t){return t.target.y})).attr("link-type",(function(t){return t.linkType})).attr("extra-link-type",(function(t){return t.extraLinkType})).classed("rna-link",!0)}(f,d),function(t,n){var r=t.selectAll(".rna-base").data(n).enter().append("svg:g").attr("transform",(function(t){return"translate("+t.x+","+t.y+")"}));r.append("svg:circle").attr("r",e.nucleotideRadius).classed("rna-base",!0),e.showNucleotideLabels&&r.append("svg:text").text((function(t){return t.name})).attr("text-anchor","middle").attr("dominant-baseline","central").classed("nucleotide-label",!0).append("svg:title").text((function(t){return t.struct_name+":"+t.num}))}(f,h),function(t,n){t.selectAll(".rnaLabel").data(n).enter().append("svg:g").attr("transform",(function(t){return"translate("+t.x+","+t.y+")"})).append("svg:text").text((function(t){return t.name})).attr("text-anchor","middle").attr("font-weight","bold").attr("dominant-baseline","central").classed("number-label",!0)}(f,p),function(r,o){r.append("svg:text").attr("transform","translate("+t.invert(e.width/2)+","+n.invert(e.height)+")").attr("dy",-10).classed("rna-name",!0).text(o)}(f,a.name),e.bundleExternalLinks&&function(t,n){var e={},r=[];n=n.filter((function(t){return"correct"==t.linkType||"incorrect"==t.linkType||"extra"==t.linkType})),t.selectAll("[link-type=extra]").remove();for(var o=0;oh);if(g=v-2,v>=2&&(i[d+1+g]+=f,i[m-1-g]+=f,i[d]+=f,i[m]+=f,v>2))for(;g>=1;g--)i[d+g]=Math.PI,i[m-g]=Math.PI;s[++c]=v,h<=p&&t(h,p,r)}else n++,w++,k++;for(M=Math.PI*(w-2)/w,S[++_]=e,y=o<0?0:o,b=1;b<=_;b++){for(x=S[b]-y,g=0;g<=x;g++)i[y+g]+=M;if(b>_)break;y=S[++b]}u[++l]=k})(0,e+1,t),u[l]-=2,r=0,o[0]=100,a[0]=100;var h=[];for(h.push([o[0],a[0]]),n=1;n=0&&(1==++n?e=r:e>r&&(e=r));return t.setMark(!1),e+1}s.prototype.naview_xy_coordinates=function(t){var n,e=[],r=[];if(0===t.length||0===t[0])return 0;this.nbase=t[0],this.bases=[];for(var o=0;on&&e++;0==e&&(this.bases[1].setMate(this.nbase),this.bases[this.nbase].setMate(1))},s.prototype.find_regions=function(){var t,n=null,e=null;t=this.nbase+1;var r=[];for(n=0;nthis.nbase&&(n=0)}while(n!=t);return i},s.prototype.find_central_loop=function(){var t=new u.Loop,n=null,e=null,r=null;for(l.bind(this)(),n=0,e=-1,r=0;rn?(e=t.getDepth(),n=t.getNconnection(),this.root=t):t.getDepth()>e&&t.getNconnection()==n&&(e=t.getDepth(),this.root=t)},s.prototype.traverse_loop=function(t,n){var e,r,o,a,i,u,s,l,c,f,h,p,d,m,g,v,y,b,x,M,w,_,k,S,A,E,T,R,P,N,O,C,L,U,D,j,z,q,F,B,I,X,Y,V,H,G,W,Z,J,$,K,Q,tt,nt,et,rt,ot,at,it,ut,st,lt,ct,ft,ht,pt,dt,mt,gt,vt=0;u=2*Math.PI/(this.nbase+1),b=null,N=-1;var yt=0;for(k=0;null!=(v=t.getConnection(yt));yt++,k++)e=-Math.sin(u*v.getStart()),r=Math.cos(u*v.getStart()),o=-Math.sin(u*v.getEnd()),a=Math.cos(u*v.getEnd())-r,i=e-o,s=Math.sqrt(a*a+i*i),v.setXrad(a/s),v.setYrad(i/s),v.setAngle(Math.atan2(i,a)),v.getAngle()<0&&v.setAngle(v.getAngle()+2*Math.PI),null!=n&&n.getRegion()==v.getRegion()&&(b=v,N=k);t:for(;;){this.determine_radius(t,this.lencut),l=t.getRadius()/this.RADIUS_REDUCTION_FACTOR,null==n?c=f=0:(h=(this.bases[b.getStart()].getX()+this.bases[b.getEnd()].getX())/2,p=(this.bases[b.getStart()].getY()+this.bases[b.getEnd()].getY())/2,c=h-l*b.getXrad(),f=p-l*b.getYrad()),T=-1==N?0:N,v=t.getConnection(T),E=0,O=!1;do{if((w=T-1)<0&&(w=t.getNconnection()-1),x=t.getConnection(w),this.connected_connection(x,v)?(T=w,v=x):O=!0,++E>t.getNconnection()){for(A=-1,k=0;k=t.getNconnection()&&(w=0),v=t.getConnection(k),(ht=(y=t.getConnection(w)).getAngle()-v.getAngle())<0&&(ht+=2*Math.PI),ht>A&&(A=ht,vt=k);R=vt,(T=vt+1)>=t.getNconnection()&&(T=0),(v=t.getConnection(R)).setBroken(!0),O=!0}}while(!O);for(C=!1,G=T;!C;){for(E=0,O=!1,R=T,L=!1;!O;)if(v=t.getConnection(R),R==N&&(L=!0),(w=R+1)>=t.getNconnection()&&(w=0),y=t.getConnection(w),this.connected_connection(v,y)){if(++E>=t.getNconnection())break;R=w}else O=!0;for(k=W=Z=P=this.find_ic_middle(T,R,n,b,t),O=!1,$=0;!O;)(k=$<0?W:0==$?P:Z)>=0&&(v=t.getConnection(k),null!=n&&b==v||(0==$?(d=v.getAngle()-Math.asin(.5/l),m=v.getAngle()+Math.asin(.5/l),this.bases[v.getStart()].setX(c+l*Math.cos(d)),this.bases[v.getStart()].setY(f+l*Math.sin(d)),this.bases[v.getEnd()].setX(c+l*Math.cos(m)),this.bases[v.getEnd()].setY(f+l*Math.sin(m))):$<0?((w=k+1)>=t.getNconnection()&&(w=0),v=t.getConnection(k),y=t.getConnection(w),et=v.getXrad(),rt=v.getYrad(),ht=(v.getAngle()+y.getAngle())/2,v.getAngle()>y.getAngle()&&(ht-=Math.PI),it=Math.cos(ht),lt=Math.sin(ht),ct=-it,(S=y.getAngle()-v.getAngle())<0&&(S+=2*Math.PI),ft=v.isExtruded()?S<=Math.PI/2?2:1.5:1,this.bases[v.getEnd()].setX(this.bases[y.getStart()].getX()+ft*lt),this.bases[v.getEnd()].setY(this.bases[y.getStart()].getY()+ft*ct),this.bases[v.getStart()].setX(this.bases[v.getEnd()].getX()+rt),this.bases[v.getStart()].setY(this.bases[v.getEnd()].getY()-et)):((w=k-1)<0&&(w=t.getNconnection()-1),v=t.getConnection(w),ot=(y=t.getConnection(k)).getXrad(),at=y.getYrad(),ht=(v.getAngle()+y.getAngle())/2,v.getAngle()>y.getAngle()&&(ht-=Math.PI),it=Math.cos(ht),lt=-Math.sin(ht),ct=it,(S=y.getAngle()-v.getAngle())<0&&(S+=2*Math.PI),ft=v.isExtruded()?S<=Math.PI/2?2:1.5:1,this.bases[y.getStart()].setX(this.bases[v.getEnd()].getX()+ft*lt),this.bases[y.getStart()].setY(this.bases[v.getEnd()].getY()+ft*ct),this.bases[y.getEnd()].setX(this.bases[y.getStart()].getX()-at),this.bases[y.getEnd()].setY(this.bases[y.getStart()].getY()+ot)))),$<0?(Z==R?Z=-1:Z>=0&&++Z>=t.getNconnection()&&(Z=0),$=1):(W==T?W=-1:W>=0&&--W<0&&(W=t.getNconnection()-1),$=-1),O=-1==W&&-1==Z;if((J=R+1)>=t.getNconnection()&&(J=0),R!=T&&(T!=G||J!=G))if(v=t.getConnection(T),y=t.getConnection(R),Q=this.bases[y.getEnd()].getX()-this.bases[v.getStart()].getX(),tt=this.bases[y.getEnd()].getY()-this.bases[v.getStart()].getY(),D=this.bases[v.getStart()].getX()+Q/2,j=this.bases[v.getStart()].getY()+tt/2,F=Q/(nt=Math.sqrt(Q*Q+tt*tt)),B=tt/nt,I=c-D,X=f-j,z=(Y=(I/=nt=Math.sqrt(Q*Q+tt*tt))*F+(X/=nt)*B)*F-I,q=Y*B-X,z/=nt=Math.sqrt(z*z+q*q),q/=nt,Q=this.bases[v.getStart()].getX()-c,tt=this.bases[v.getStart()].getY()-f,(ht=Math.atan2(tt,Q))<0&&(ht+=2*Math.PI),Q=this.bases[y.getEnd()].getX()-c,tt=this.bases[y.getEnd()].getY()-f,(pt=Math.atan2(tt,Q))<0&&(pt+=2*Math.PI),ptMath.PI?-1:1)*l*z,H=f+U*l*q,L)c-=V-D,f-=H-j;else for(k=T;M=(v=t.getConnection(k)).getStart(),this.bases[M].setX(this.bases[M].getX()+V-D),this.bases[M].setY(this.bases[M].getY()+H-j),M=v.getEnd(),this.bases[M].setX(this.bases[M].getX()+V-D),this.bases[M].setY(this.bases[M].getY()+H-j),k!=R;)++k>=t.getNconnection()&&(k=0);C=(T=J)==G}for(k=0;k=t.getNconnection()&&(w=0),y=t.getConnection(w),Q=this.bases[v.getEnd()].getX()-c,tt=this.bases[v.getEnd()].getY()-f,st=Math.sqrt(Q*Q+tt*tt),(ht=Math.atan2(tt,Q))<0&&(ht+=2*Math.PI),Q=this.bases[y.getStart()].getX()-c,tt=this.bases[y.getStart()].getY()-f,ut=Math.sqrt(Q*Q+tt*tt),(pt=Math.atan2(tt,Q))<0&&(pt+=2*Math.PI),ptMath.PI)if(v.isExtruded())console.log("Warning from traverse_loop. Loop "+t.getNumber()+" has crossed regions\n");else if(y.getStart()-v.getEnd()!=1){v.setExtruded(!0);continue t}if(v.isExtruded())this.construct_extruded_segment(v,y);else for((_=y.getStart()-v.getEnd())<0&&(_+=this.nbase+1),u=K/_,w=1;w<_;w++)(M=v.getEnd()+w)>this.nbase&&(M-=this.nbase+1),nt=st+(ut-st)*((g=ht+w*u)-ht)/K,this.bases[M].setX(c+nt*Math.cos(g)),this.bases[M].setY(f+nt*Math.sin(g))}break}for(k=0;k=t.getNconnection()&&(w=0),v=t.getConnection(k),y=t.getConnection(w),_+=2,dt+=this.bases[v.getStart()].getX()+this.bases[v.getEnd()].getX(),mt+=this.bases[v.getStart()].getY()+this.bases[v.getEnd()].getY(),!v.isExtruded())for(w=v.getEnd()+1;w!=y.getStart();w++)w>this.nbase&&(w-=this.nbase+1),_++,dt+=this.bases[w].getX(),mt+=this.bases[w].getY();t.setX(dt/_),t.setY(mt/_)},s.prototype.determine_radius=function(t,n){var e,r,a,i,u,s,l,c,f,h,p,d=0,m=new o.Connection,g=new o.Connection;do{for(e=1e10,u=0,i=0,c=0;c=t.getNconnection()&&(f=0),g=t.getConnection(f),h=m.getEnd(),(p=g.getStart())1&&(e=l,d=c);(s=i/u)<.7071068&&(s=.7071068),e*s0?s=t.getRadius():t.setRadius(s)},s.prototype.find_ic_middle=function(t,n,e,r,o){var a,i,u,s,l;for(a=0,i=-1,u=t,l=!1;!l;)a++>2*o.getNconnection()&&console.log("Infinite loop in 'find_ic_middle'"),null!=e&&o.getConnection(u)==r&&(i=u),l=u==n,++u>=o.getNconnection()&&(u=0);if(-1==i){for(s=1,u=t;s<(a+1)/2;s++)++u>=o.getNconnection()&&(u=0);i=u}return i},s.prototype.construct_extruded_segment=function(t,n){var e,r,o,a,i,u,s,l,c,f,h,p,d,m,g,v,y,b;if(e=t.getAngle(),(o=r=n.getAngle())=1.5&&h<=Math.PI/2&&((v=d+1)>this.nbase&&(v-=this.nbase+1),(y=m-1)<0&&(y+=this.nbase+1),this.bases[v].setX(this.bases[d].getX()+.5*i),this.bases[v].setY(this.bases[d].getY()+.5*u),this.bases[y].setX(this.bases[m].getX()-.5*i),this.bases[y].setY(this.bases[m].getY()-.5*u),d=v,m=y);do{b=!1,this.construct_circle_segment(d,m),(v=d+1)>this.nbase&&(v-=this.nbase+1),i=this.bases[v].getX()-this.bases[d].getX(),u=this.bases[v].getY()-this.bases[d].getY(),(s=Math.atan2(u,i))<0&&(s+=2*Math.PI),(p=s-e)<0&&(p+=2*Math.PI),p>Math.PI&&(b=!0),(y=m-1)<0&&(y+=this.nbase+1),i=this.bases[y].getX()-this.bases[m].getX(),u=this.bases[y].getY()-this.bases[m].getY(),(l=Math.atan2(u,i))<0&&(l+=2*Math.PI),(p=r-l)<0&&(p+=2*Math.PI),p>Math.PI&&(b=!0),b&&(c=this.minf2(a,e+.5),this.bases[v].setX(this.bases[d].getX()+Math.cos(c)),this.bases[v].setY(this.bases[d].getY()+Math.sin(c)),d=v,c=this.maxf2(a,o-.5),this.bases[y].setX(this.bases[m].getX()+Math.cos(c)),this.bases[y].setY(this.bases[m].getY()+Math.sin(c)),m=y,g-=2)}while(b&&g>1)}},s.prototype.construct_circle_segment=function(t,n){var e,r,o,a,i,u,s,l,c,f,h,p,d,m,g;if(e=this.bases[n].getX()-this.bases[t].getX(),r=this.bases[n].getY()-this.bases[t].getY(),o=Math.sqrt(e*e+r*r),(d=n-t)<0&&(d+=this.nbase+1),o>=d)for(e/=o,r/=o,m=1;mthis.nbase&&(g-=this.nbase+1),this.bases[g].setX(this.bases[t].getX()+e*m/d),this.bases[g].setY(this.bases[t].getY()+r*m/d);else for(this.find_center_for_arc(d-1,o),e/=o,r/=o,a=this.bases[t].getX()+e*o/2,i=this.bases[t].getY()+r*o/2,u=r,s=-e,l=a+this._h*u,c=i+this._h*s,f=this.bases[t].getX()-l,h=this.bases[t].getY()-c,o=Math.sqrt(f*f+h*h),p=Math.atan2(h,f),m=1;mthis.nbase&&(g-=this.nbase+1),this.bases[g].setX(l+o*Math.cos(p+m*this.angleinc)),this.bases[g].setY(c+o*Math.sin(p+m*this.angleinc))},s.prototype.find_center_for_arc=function(t,n){var e,r,o,a,i,u,s,l;o=-(r=(t+1)/Math.PI)-n/(t+1.000001-n),n<1&&(o=0),l=0;do{e=(r+o)/2,i=1-.5/((a=Math.sqrt(e*e+n*n/4))*a),Math.abs(i)>1&&console.log("Unexpected large magnitude discriminant = "+i+" "+a),(s=(u=Math.acos(i))*(t+1)+2*Math.acos(e/a)-2*Math.PI)>0?o=e:r=e}while(Math.abs(s)>1e-4&&++l=this.MAXITER&&(noIterationFailureYet&&(console.log("Iteration failed in find_center_for_arc"),noIterationFailureYet=!1),e=0,u=0),this._h=e,this.angleinc=u},s.prototype.generate_region=function(t){var n,e,r,o,a,i;for(i=t.getRegion(),n=0,t.getStart()==i.getStart1()?(e=i.getStart1(),r=i.getEnd1()):(e=i.getStart2(),r=i.getEnd2()),(this.bases[t.getStart()].getX()>this.ANUM-100||this.bases[t.getEnd()].getX()>this.ANUM-100)&&console.log("Bad region passed to generate_region. Coordinates not defined."),o=e+1;o<=r;o++)n++,this.bases[o].setX(this.bases[t.getStart()].getX()+this.HELIX_FACTOR*n*t.getXrad()),this.bases[o].setY(this.bases[t.getStart()].getY()+this.HELIX_FACTOR*n*t.getYrad()),a=this.bases[o].getMate(),this.bases[a].setX(this.bases[t.getEnd()].getX()+this.HELIX_FACTOR*n*t.getXrad()),this.bases[a].setY(this.bases[t.getEnd()].getY()+this.HELIX_FACTOR*n*t.getYrad())},s.prototype.minf2=function(t,n){return tn?t:n},s.prototype.connected_connection=function(t,n){return!!t.isExtruded()||t.getEnd()+1==n.getStart()}},function(t,n){"use strict";function e(){this.radius=null,this.loopnumber=null,this.next=null,this.prev=null}Object.defineProperty(n,"__esModule",{value:!0}),n.Radloop=e,e.prototype.getRadius=function(){return this.radius},e.prototype.setRadius=function(t){this.radius=t},e.prototype.getLoopnumber=function(){return this.loopnumber},e.prototype.setLoopnumber=function(t){this.loopnumber=t},e.prototype.getNext=function(){return this.next},e.prototype.setNext=function(t){this.next=t},e.prototype.getPrev=function(){return this.prev},e.prototype.setPrev=function(t){this.prev=t}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Connection=a;var r=e(8),o=e(9);function a(){this.loop=new r.Loop,this.region=new o.Region,this.start=null,this.end=null,this.xrad=null,this.yrad=null,this.angle=null,this.extruded=null,this.broken=null,this._isNull=!1}a.prototype.isNull=function(){return this._isNull},a.prototype.setNull=function(t){this._isNull=t},a.prototype.getLoop=function(){return this.loop},a.prototype.setLoop=function(t){this.loop=t},a.prototype.getRegion=function(){return this.region},a.prototype.setRegion=function(t){this.region=t},a.prototype.getStart=function(){return this.start},a.prototype.setStart=function(t){this.start=t},a.prototype.getEnd=function(){return this.end},a.prototype.setEnd=function(t){this.end=t},a.prototype.getXrad=function(){return this.xrad},a.prototype.setXrad=function(t){this.xrad=t},a.prototype.getYrad=function(){return this.yrad},a.prototype.setYrad=function(t){this.yrad=t},a.prototype.getAngle=function(){return this.angle},a.prototype.setAngle=function(t){this.angle=t},a.prototype.isExtruded=function(){return this.extruded},a.prototype.setExtruded=function(t){this.extruded=t},a.prototype.isBroken=function(){return this.broken},a.prototype.setBroken=function(t){this.broken=t}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Loop=o;var r=e(7);function o(){this.nconnection=null,this.connections=[],this._connections=[],this.number=null,this.depth=null,this.mark=null,this.x=null,this.y=null,this.radius=null}o.prototype.getNconnection=function(){return this.nconnection},o.prototype.setNconnection=function(t){this.nconnection=t},o.prototype.setConnection=function(t,n){null!=n?this._connections[t]=n:(this._connections[t]||(this._connections[t]=new r.Connection),this._connections[t].setNull(!0))},o.prototype.getConnection=function(t){var n=e(7);this._connections[t]||(this._connections[t]=new n);var r=this._connections[t];return r.isNull()?null:r},o.prototype.addConnection=function(t,n){this._connections.push(n)},o.prototype.getNumber=function(){return this.number},o.prototype.setNumber=function(t){this.number=t},o.prototype.getDepth=function(){return this.depth},o.prototype.setDepth=function(t){this.depth=t},o.prototype.isMark=function(){return this.mark},o.prototype.setMark=function(t){this.mark=t},o.prototype.getX=function(){return this.x},o.prototype.setX=function(t){this.x=t},o.prototype.getY=function(){return this.y},o.prototype.setY=function(t){this.y=t},o.prototype.getRadius=function(){return this.radius},o.prototype.setRadius=function(t){this.radius=t}},function(t,n){"use strict";function e(){this._start1=null,this._end1=null,this._start2=null,this._end2=null}Object.defineProperty(n,"__esModule",{value:!0}),n.Region=e,e.prototype.getStart1=function(){return this._start1},e.prototype.setStart1=function(t){this._start1=t},e.prototype.getEnd1=function(){return this._end1},e.prototype.setEnd1=function(t){this._end1=t},e.prototype.getStart2=function(){return this._start2},e.prototype.setStart2=function(t){this._start2=t},e.prototype.getEnd2=function(){return this._end2},e.prototype.setEnd2=function(t){this._end2=t}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Base=o;var r=e(9);function o(){this.mate=null,this.x=null,this.y=null,this.extracted=null,this.region=new r.Region}o.prototype.getMate=function(){return this.mate},o.prototype.setMate=function(t){this.mate=t},o.prototype.getX=function(){return this.x},o.prototype.setX=function(t){this.x=t},o.prototype.getY=function(){return this.y},o.prototype.setY=function(t){this.y=t},o.prototype.isExtracted=function(){return this.extracted},o.prototype.setExtracted=function(t){this.extracted=t},o.prototype.getRegion=function(){return this.region},o.prototype.setRegion=function(t){this.region=t}},function(t,n,e){var r=e(12);"string"==typeof r&&(r=[[t.id,r,""]]),e(14)(r,{}),r.locals&&(t.exports=r.locals)},function(t,n,e){(t.exports=e(13)()).push([t.id,'.forna-container .structure-background-rect {\r\n stroke: black;\r\n stroke-width: 5;\r\n fill: transparent;\r\n}\r\n\r\n.forna-container circle.rna-base {\r\n stroke: #ccc;\r\n stroke-width: 1px;\r\n opacity: 1;\r\n fill: white;\r\n}\r\n\r\n.forna-container circle.rna-base.label {\r\n stroke: transparent;\r\n stroke-width: 0;\r\n fill: white;\r\n}\r\n\r\n.forna-container line.link {\r\n stroke: #999;\r\n stroke-opacity: 0.8;\r\n stroke-width: 2;\r\n}\r\n\r\n.forna-container line.rna-link {\r\n stroke: #999;\r\n stroke-opacity: 0.8;\r\n stroke-width: 2;\r\n}\r\n\r\n.forna-container .overlay {\r\n fill: transparent;\r\n}\r\n\r\n.forna-container .rna-name {\r\n text-anchor: middle;\r\n dy: -10;\r\n font-family: Tahoma, Geneva, sans-serif;\r\n font-size: 8pt;\r\n}\r\n\r\n.forna-container line.rna-link[link-type="backbone"] {\r\n stroke: transparent;\r\n}\r\n\r\n.forna-container line.rna-link[link-type="basepair"] {\r\n stroke: transparent;\r\n}\r\n\r\n.forna-container line.rna-link[link-type="fake"] {\r\n stroke: transparent;\r\n}\r\n\r\n.forna-container line.rna-link[link-type="extra"] {\r\n stroke: grey;\r\n}\r\n\r\n.forna-container line.rna-link[extra-link-type="correct"] {\r\n stroke: green;\r\n}\r\n\r\n.forna-container line.rna-link[extra-link-type="incorrect"] {\r\n stroke: green;\r\n}\r\n\r\n\r\n.forna-container path {\r\n stroke-width: 2;\r\n}\r\n\r\n.forna-container path[extra-link-type="correct"] {\r\n stroke: green;\r\n}\r\n\r\n.forna-container path[extra-link-type="incorrect"] {\r\n stroke: red;\r\n}\r\n\r\n\r\n.forna-container line.basepair {\r\n stroke: red;\r\n}\r\n\r\n.forna-container line.intermolecule {\r\n stroke: blue;\r\n}\r\n\r\n.forna-container line.chain_chain {\r\n stroke-dasharray: 3,3;\r\n}\r\n\r\n.forna-container line.fake {\r\n stroke: green;\r\n}\r\n\r\n.forna-container .transparent {\r\n fill: transparent;\r\n stroke-width: 0;\r\n stroke-opacity: 0;\r\n opacity: 0;\r\n}\r\n\r\n.forna-container .d3-tip {\r\n line-height: 1;\r\n font-weight: bold;\r\n padding: 6px;\r\n background: rgba(0, 0, 0, 0.6);\r\n color: #fff;\r\n border-radius: 4px;\r\n pointer-events: none;\r\n}\r\n\r\n.forna-container text.nucleotide-label {\r\n font-size: 5.5pt;\r\n font-weight: bold;\r\n font-family: Tahoma, Geneva, sans-serif;\r\n color: rgb(100,100,100);\r\n pointer-events: none;\r\n}\r\n\r\n.forna-container text.number-label {\r\n font-size: 5.5pt;\r\n font-weight: bold;\r\n font-family: Tahoma, Geneva, sans-serif;\r\n color: rgb(100,100,100);\r\n pointer-events: none;\r\n}\r\n\r\n.forna-container text {\r\n pointer-events: none;\r\n}\r\n\r\n.forna-container g.gnode {\r\n\r\n}\r\n\r\n.forna-container .brush .extent {\r\n fill-opacity: .1;\r\n stroke: #fff;\r\n shape-rendering: crispEdges;\r\n}\r\n\r\n.forna-container .noselect {\r\n -webkit-touch-callout: none;\r\n -webkit-user-select: none;\r\n -khtml-user-select: none;\r\n -moz-user-select: none;\r\n -ms-user-select: none;\r\n user-select: none;\r\n}\r\n',""])},function(t,n){t.exports=function(){var t=[];return t.toString=function(){for(var t=[],n=0;n=0&&l.splice(n,1)}function d(t){var n=document.createElement("style");return n.type="text/css",h(t,n),n}function m(t,n){var e,r,o;if(n.singleton){var a=s++;e=u||(u=d(n)),r=y.bind(null,e,a,!1),o=y.bind(null,e,a,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(e=function(t){var n=document.createElement("link");return n.rel="stylesheet",h(t,n),n}(n),r=x.bind(null,e),o=function(){p(e),e.href&&URL.revokeObjectURL(e.href)}):(e=d(n),r=b.bind(null,e),o=function(){p(e)});return r(t),function(n){if(n){if(n.css===t.css&&n.media===t.media&&n.sourceMap===t.sourceMap)return;r(t=n)}else o()}}t.exports=function(t,n){void 0===(n=n||{}).singleton&&(n.singleton=a()),void 0===n.insertAt&&(n.insertAt="bottom");var e=f(t);return c(e,n),function(t){for(var o=[],a=0;an?1:t>=n?0:NaN}function v(t){return null===t?NaN:+t}function y(t){return!isNaN(t)}function b(t){return{left:function(n,e,r,o){for(arguments.length<3&&(r=0),arguments.length<4&&(o=n.length);r>>1;t(n[a],e)<0?r=a+1:o=a}return r},right:function(n,e,r,o){for(arguments.length<3&&(r=0),arguments.length<4&&(o=n.length);r>>1;t(n[a],e)>0?o=a:r=a+1}return r}}}a.ascending=g,a.descending=function(t,n){return nt?1:n>=t?0:NaN},a.min=function(t,n){var e,r,o=-1,a=t.length;if(1===arguments.length){for(;++o=r){e=r;break}for(;++or&&(e=r)}else{for(;++o=r){e=r;break}for(;++or&&(e=r)}return e},a.max=function(t,n){var e,r,o=-1,a=t.length;if(1===arguments.length){for(;++o=r){e=r;break}for(;++oe&&(e=r)}else{for(;++o=r){e=r;break}for(;++oe&&(e=r)}return e},a.extent=function(t,n){var e,r,o,a=-1,i=t.length;if(1===arguments.length){for(;++a=r){e=o=r;break}for(;++ar&&(e=r),o=r){e=o=r;break}for(;++ar&&(e=r),o1)return i/(s-1)},a.deviation=function(){var t=a.variance.apply(this,arguments);return t?Math.sqrt(t):t};var x=b(g);function M(t){return t.length}a.bisectLeft=x.left,a.bisect=a.bisectRight=x.right,a.bisector=function(t){return b(1===t.length?function(n,e){return g(t(n),e)}:t)},a.shuffle=function(t,n,e){(a=arguments.length)<3&&(e=t.length,a<2&&(n=0));for(var r,o,a=e-n;a;)o=Math.random()*a--|0,r=t[a+n],t[a+n]=t[o+n],t[o+n]=r;return t},a.permute=function(t,n){for(var e=n.length,r=new Array(e);e--;)r[e]=t[n[e]];return r},a.pairs=function(t){for(var n=0,e=t.length-1,r=t[0],o=new Array(e<0?0:e);n=0;)for(n=(r=t[o]).length;--n>=0;)e[--i]=r[n];return e};var w=Math.abs;function _(t){for(var n=1;t*n%1;)n*=10;return n}function k(t,n){for(var e in n)Object.defineProperty(t.prototype,e,{value:n[e],enumerable:!1})}function S(){this._=Object.create(null)}function A(t){return"__proto__"==(t+="")||"\0"===t[0]?"\0"+t:t}function E(t){return"\0"===(t+="")[0]?t.slice(1):t}function T(t){return A(t)in this._}function R(t){return(t=A(t))in this._&&delete this._[t]}function P(){var t=[];for(var n in this._)t.push(E(n));return t}function N(){var t=0;for(var n in this._)++t;return t}function O(){for(var t in this._)return!1;return!0}function C(){this._=Object.create(null)}function L(t){return t}function U(t,n,e){return function(){var r=e.apply(n,arguments);return r===n?t:r}}function D(t,n){if(n in t)return n;n=n.charAt(0).toUpperCase()+n.slice(1);for(var e=0,r=j.length;en;)o.push(r/a);else for(;(r=t+e*++i)=r.length)return n?n.call(e,a):t?a.sort(t):a;for(var s,l,c,f,h=-1,p=a.length,d=r[u++],m=new S;++h=r.length)return n;var a=[],i=o[e++];return n.forEach((function(n,r){a.push({key:n,values:t(r,e)})})),i?a.sort((function(t,n){return i(t.key,n.key)})):a}(i(a.map,t,0),0)},e.key=function(t){return r.push(t),e},e.sortKeys=function(t){return o[r.length-1]=t,e},e.sortValues=function(n){return t=n,e},e.rollup=function(t){return n=t,e},e},a.set=function(t){var n=new C;if(t)for(var e=0,r=t.length;e=0&&(r=t.slice(e+1),t=t.slice(0,e)),t)return arguments.length<2?this[t].on(r):this[t].on(r,n);if(2===arguments.length){if(null==n)for(t in this)this.hasOwnProperty(t)&&this[t].on(r,null);return this}},a.event=null,a.requote=function(t){return t.replace(Y,"\\$&")};var Y=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,V={}.__proto__?function(t,n){t.__proto__=n}:function(t,n){for(var e in n)t[e]=n[e]};function H(t){return V(t,J),t}var G=function(t,n){return n.querySelector(t)},W=function(t,n){return n.querySelectorAll(t)},Z=function(t,n){var e=t.matches||t[D(t,"matchesSelector")];return(Z=function(t,n){return e.call(t,n)})(t,n)};"function"==typeof Sizzle&&(G=function(t,n){return Sizzle(t,n)[0]||null},W=Sizzle,Z=Sizzle.matchesSelector),a.selection=function(){return a.select(s.documentElement)};var J=a.selection.prototype=[];function $(t){return"function"==typeof t?t:function(){return G(t,this)}}function K(t){return"function"==typeof t?t:function(){return W(t,this)}}J.select=function(t){var n,e,r,o,a=[];t=$(t);for(var i=-1,u=this.length;++i=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),tt.hasOwnProperty(e)?{space:tt[e],local:t}:t}},J.attr=function(t,n){if(arguments.length<2){if("string"==typeof t){var e=this.node();return(t=a.ns.qualify(t)).local?e.getAttributeNS(t.space,t.local):e.getAttribute(t)}for(n in t)this.each(nt(n,t[n]));return this}return this.each(nt(t,n))},J.classed=function(t,n){if(arguments.length<2){if("string"==typeof t){var e=this.node(),r=(t=ot(t)).length,o=-1;if(n=e.classList){for(;++o=0;)(e=r[o])&&(a&&a!==e.nextSibling&&a.parentNode.insertBefore(e,a),a=e);return this},J.sort=function(t){t=pt.apply(this,arguments);for(var n=-1,e=this.length;++n=n&&(n=o+1);!(i=u[n])&&++n0&&(t=t.slice(0,o));var s=bt.get(t);function l(){var n=this[r];n&&(this.removeEventListener(t,n,n.$),delete this[r])}return s&&(t=s,i=Mt),o?n?function(){var o=i(n,u(arguments));l.call(this),this.addEventListener(t,this[r]=o,o.$=e),o._=n}:l:n?z:function(){var n,e=new RegExp("^__on([^.]+)"+a.requote(t)+"$");for(var r in this)if(n=r.match(e)){var o=this[r];this.removeEventListener(n[1],o,o.$),delete this[r]}}}a.selection.enter=mt,a.selection.enter.prototype=gt,gt.append=J.append,gt.empty=J.empty,gt.node=J.node,gt.call=J.call,gt.size=J.size,gt.select=function(t){for(var n,e,r,o,a,i=[],u=-1,s=this.length;++u0?1:t<0?-1:0}function jt(t,n,e){return(n[0]-t[0])*(e[1]-t[1])-(n[1]-t[1])*(e[0]-t[0])}function zt(t){return t>1?0:t<-1?Pt:Math.acos(t)}function qt(t){return t>1?Ct:t<-1?-Ct:Math.asin(t)}function Ft(t){return((t=Math.exp(t))+1/t)/2}function Bt(t){return(t=Math.sin(t/2))*t}var It=Math.SQRT2;a.interpolateZoom=function(t,n){var e,r,o=t[0],a=t[1],i=t[2],u=n[0],s=n[1],l=n[2],c=u-o,f=s-a,h=c*c+f*f;if(h0&&(t=t.transition().duration(m)),t.call(w.event)}function E(){u&&u.domain(i.range().map((function(t){return(t-h.x)/h.k})).map(i.invert)),f&&f.domain(l.range().map((function(t){return(t-h.y)/h.k})).map(l.invert))}function T(t){g++||t({type:"zoomstart"})}function R(t){E(),t({type:"zoom",scale:h.k,translate:[h.x,h.y]})}function P(t){--g||(t({type:"zoomend"}),n=null)}function N(){var t=this,n=M.of(t,arguments),e=0,r=a.select(c(t)).on(y,u).on(b,s),o=_(a.mouse(t)),i=kt(t);function u(){e=1,S(a.mouse(t),o),R(n)}function s(){r.on(y,null).on(b,null),i(e),P(n)}Mu.call(t),T(n)}function O(){var t,n=this,e=M.of(n,arguments),r={},i=0,u=".zoom-"+a.event.changedTouches[0].identifier,s="touchmove"+u,l="touchend"+u,c=[],f=a.select(n),p=kt(n);function d(){var e=a.touches(n);return t=h.k,e.forEach((function(t){t.identifier in r&&(r[t.identifier]=_(t))})),e}function m(){var t=a.event.target;a.select(t).on(s,g).on(l,y),c.push(t);for(var e=a.event.changedTouches,u=0,f=e.length;u1){v=p[0];var b=p[1],x=v[0]-b[0],M=v[1]-b[1];i=x*x+M*M}}function g(){var u,s,l,c,f=a.touches(n);Mu.call(n);for(var h=0,p=f.length;h360?t-=360:t<0&&(t+=360),t<60?r+(o-r)*t/60:t<180?o:t<240?r+(o-r)*(240-t)/60:r}(t))}return t=isNaN(t)?0:(t%=360)<0?t+360:t,n=isNaN(n)?0:n<0?0:n>1?1:n,r=2*(e=e<0?0:e>1?1:e)-(o=e<=.5?e*(1+n):e+n-e*n),new sn(a(t+120),a(t),a(t-120))}function Jt(t,n,e){return this instanceof Jt?(this.h=+t,this.c=+n,void(this.l=+e)):arguments.length<2?t instanceof Jt?new Jt(t.h,t.c,t.l):rn(t instanceof Qt?t.l:(t=mn((t=a.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new Jt(t,n,e)}Wt.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),new Gt(this.h,this.s,this.l/t)},Wt.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new Gt(this.h,this.s,t*this.l)},Wt.rgb=function(){return Zt(this.h,this.s,this.l)},a.hcl=Jt;var $t=Jt.prototype=new Ht;function Kt(t,n,e){return isNaN(t)&&(t=0),isNaN(n)&&(n=0),new Qt(e,Math.cos(t*=Lt)*n,Math.sin(t)*n)}function Qt(t,n,e){return this instanceof Qt?(this.l=+t,this.a=+n,void(this.b=+e)):arguments.length<2?t instanceof Qt?new Qt(t.l,t.a,t.b):t instanceof Jt?Kt(t.h,t.c,t.l):mn((t=sn(t)).r,t.g,t.b):new Qt(t,n,e)}$t.brighter=function(t){return new Jt(this.h,this.c,Math.min(100,this.l+tn*(arguments.length?t:1)))},$t.darker=function(t){return new Jt(this.h,this.c,Math.max(0,this.l-tn*(arguments.length?t:1)))},$t.rgb=function(){return Kt(this.h,this.c,this.l).rgb()},a.lab=Qt;var tn=18,nn=Qt.prototype=new Ht;function en(t,n,e){var r=(t+16)/116,o=r+n/500,a=r-e/200;return new sn(un(3.2404542*(o=.95047*on(o))-1.5371385*(r=1*on(r))-.4985314*(a=1.08883*on(a))),un(-.969266*o+1.8760108*r+.041556*a),un(.0556434*o-.2040259*r+1.0572252*a))}function rn(t,n,e){return t>0?new Jt(Math.atan2(e,n)*Ut,Math.sqrt(n*n+e*e),t):new Jt(NaN,NaN,t)}function on(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function an(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function un(t){return Math.round(255*(t<=.00304?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function sn(t,n,e){return this instanceof sn?(this.r=~~t,this.g=~~n,void(this.b=~~e)):arguments.length<2?t instanceof sn?new sn(t.r,t.g,t.b):pn(""+t,sn,Zt):new sn(t,n,e)}function ln(t){return new sn(t>>16,t>>8&255,255&t)}function cn(t){return ln(t)+""}nn.brighter=function(t){return new Qt(Math.min(100,this.l+tn*(arguments.length?t:1)),this.a,this.b)},nn.darker=function(t){return new Qt(Math.max(0,this.l-tn*(arguments.length?t:1)),this.a,this.b)},nn.rgb=function(){return en(this.l,this.a,this.b)},a.rgb=sn;var fn=sn.prototype=new Ht;function hn(t){return t<16?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function pn(t,n,e){var r,o,a,i=0,u=0,s=0;if(r=/([a-z]+)\((.*)\)/.exec(t=t.toLowerCase()))switch(o=r[2].split(","),r[1]){case"hsl":return e(parseFloat(o[0]),parseFloat(o[1])/100,parseFloat(o[2])/100);case"rgb":return n(vn(o[0]),vn(o[1]),vn(o[2]))}return(a=yn.get(t))?n(a.r,a.g,a.b):(null==t||"#"!==t.charAt(0)||isNaN(a=parseInt(t.slice(1),16))||(4===t.length?(i=(3840&a)>>4,i|=i>>4,u=240&a,u|=u>>4,s=15&a,s|=s<<4):7===t.length&&(i=(16711680&a)>>16,u=(65280&a)>>8,s=255&a)),n(i,u,s))}function dn(t,n,e){var r,o,a=Math.min(t/=255,n/=255,e/=255),i=Math.max(t,n,e),u=i-a,s=(i+a)/2;return u?(o=s<.5?u/(i+a):u/(2-i-a),r=t==i?(n-e)/u+(n0&&s<1?0:r),new Gt(r,o,s)}function mn(t,n,e){var r=an((.4124564*(t=gn(t))+.3575761*(n=gn(n))+.1804375*(e=gn(e)))/.95047),o=an((.2126729*t+.7151522*n+.072175*e)/1);return Qt(116*o-16,500*(r-o),200*(o-an((.0193339*t+.119192*n+.9503041*e)/1.08883)))}function gn(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function vn(t){var n=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*n):n}fn.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var n=this.r,e=this.g,r=this.b,o=30;return n||e||r?(n&&n=200&&n<300||304===n){try{t=e.call(o,l)}catch(t){return void i.error.call(o,t)}i.load.call(o,t)}else i.error.call(o,l)}return!this.XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\/\//.test(t)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=f:l.onreadystatechange=function(){l.readyState>3&&f()},l.onprogress=function(t){var n=a.event;a.event=t;try{i.progress.call(o,l)}finally{a.event=n}},o.header=function(t,n){return t=(t+"").toLowerCase(),arguments.length<2?s[t]:(null==n?delete s[t]:s[t]=n+"",o)},o.mimeType=function(t){return arguments.length?(n=null==t?null:t+"",o):n},o.responseType=function(t){return arguments.length?(c=t,o):c},o.response=function(t){return e=t,o},["get","post"].forEach((function(t){o[t]=function(){return o.send.apply(o,[t].concat(u(arguments)))}})),o.send=function(e,r,a){if(2===arguments.length&&"function"==typeof r&&(a=r,r=null),l.open(e,t,!0),null==n||"accept"in s||(s.accept=n+",*/*"),l.setRequestHeader)for(var u in s)l.setRequestHeader(u,s[u]);return null!=n&&l.overrideMimeType&&l.overrideMimeType(n),null!=c&&(l.responseType=c),null!=a&&o.on("error",a).on("load",(function(t){a(null,t)})),i.beforesend.call(o,l),l.send(null==r?null:r),o},o.abort=function(){return l.abort(),o},a.rebind(o,i,"on"),null==r?o:o.get(function(t){return 1===t.length?function(n,e){t(null==n?e:null)}:t}(r))}yn.forEach((function(t,n){yn.set(t,ln(n))})),a.functor=bn,a.xhr=xn(L),a.dsv=function(t,n){var e=new RegExp('["'+t+"\n]"),r=t.charCodeAt(0);function o(t,e,r){arguments.length<3&&(r=e,e=null);var o=Mn(t,n,null==e?a:i(e),r);return o.row=function(t){return arguments.length?o.response(null==(e=t)?a:i(t)):e},o}function a(t){return o.parse(t.responseText)}function i(t){return function(n){return o.parse(n.responseText,t)}}function u(n){return n.map(s).join(t)}function s(t){return e.test(t)?'"'+t.replace(/\"/g,'""')+'"':t}return o.parse=function(t,n){var e;return o.parseRows(t,(function(t,r){if(e)return e(t,r-1);var o=new Function("d","return {"+t.map((function(t,n){return JSON.stringify(t)+": d["+n+"]"})).join(",")+"}");e=n?function(t,e){return n(o(t),e)}:o}))},o.parseRows=function(t,n){var e,o,a={},i={},u=[],s=t.length,l=0,c=0;function f(){if(l>=s)return i;if(o)return o=!1,a;var n=l;if(34===t.charCodeAt(n)){for(var e=n;e++24?(isFinite(n)&&(clearTimeout(Sn),Sn=setTimeout(Tn,n)),kn=0):(kn=1,An(Tn))}function Rn(){for(var t=Date.now(),n=wn;n;)t>=n.t&&n.c(t-n.t)&&(n.c=null),n=n.n;return t}function Pn(){for(var t,n=wn,e=1/0;n;)n.c?(n.t8?function(t){return t/e}:function(t){return t*e},symbol:t}}));function Cn(t){var n=t.decimal,e=t.thousands,r=t.grouping,o=t.currency,i=r&&e?function(t,n){for(var o=t.length,a=[],i=0,u=r[0],s=0;o>0&&u>0&&(s+u+1>n&&(u=Math.max(1,n-s)),a.push(t.substring(o-=u,o+u)),!((s+=u+1)>n));)u=r[i=(i+1)%r.length];return a.reverse().join(e)}:L;return function(t){var e=Ln.exec(t),r=e[1]||" ",u=e[2]||">",s=e[3]||"-",l=e[4]||"",c=e[5],f=+e[6],h=e[7],p=e[8],d=e[9],m=1,g="",v="",y=!1,b=!0;switch(p&&(p=+p.substring(1)),(c||"0"===r&&"="===u)&&(c=r="0",u="="),d){case"n":h=!0,d="g";break;case"%":m=100,v="%",d="f";break;case"p":m=100,v="%",d="r";break;case"b":case"o":case"x":case"X":"#"===l&&(g="0"+d.toLowerCase());case"c":b=!1;case"d":y=!0,p=0;break;case"s":m=-1,d="r"}"$"===l&&(g=o[0],v=o[1]),"r"!=d||p||(d="g"),null!=p&&("g"==d?p=Math.max(1,Math.min(21,p)):"e"!=d&&"f"!=d||(p=Math.max(0,Math.min(20,p)))),d=Un.get(d)||Dn;var x=c&&h;return function(t){var e=v;if(y&&t%1)return"";var o=t<0||0===t&&1/t<0?(t=-t,"-"):"-"===s?"":s;if(m<0){var l=a.formatPrefix(t,p);t=l.scale(t),e=l.symbol+v}else t*=m;var M,w,_=(t=d(t,p)).lastIndexOf(".");if(_<0){var k=b?t.lastIndexOf("e"):-1;k<0?(M=t,w=""):(M=t.substring(0,k),w=t.substring(k))}else M=t.substring(0,_),w=n+t.substring(_+1);!c&&h&&(M=i(M,1/0));var S=g.length+M.length+w.length+(x?0:o.length),A=S"===u?A+o+t:"^"===u?A.substring(0,S>>=1)+o+t+A.substring(S):o+(x?t:A+t))+e}}}a.formatPrefix=function(t,n){var e=0;return(t=+t)&&(t<0&&(t*=-1),n&&(t=a.round(t,Nn(t,n))),e=1+Math.floor(1e-12+Math.log(t)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((e-1)/3)))),On[8+e/3]};var Ln=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,Un=a.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,n){return t.toPrecision(n)},e:function(t,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},r:function(t,n){return(t=a.round(t,Nn(t,n))).toFixed(Math.max(0,Math.min(20,Nn(t*(1+1e-15),n))))}});function Dn(t){return t+""}var jn=a.time={},zn=Date;function qn(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}qn.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){Fn.setUTCDate.apply(this._,arguments)},setDay:function(){Fn.setUTCDay.apply(this._,arguments)},setFullYear:function(){Fn.setUTCFullYear.apply(this._,arguments)},setHours:function(){Fn.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){Fn.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){Fn.setUTCMinutes.apply(this._,arguments)},setMonth:function(){Fn.setUTCMonth.apply(this._,arguments)},setSeconds:function(){Fn.setUTCSeconds.apply(this._,arguments)},setTime:function(){Fn.setTime.apply(this._,arguments)}};var Fn=Date.prototype;function Bn(t,n,e){function r(n){var e=t(n),r=a(e,1);return n-e1)for(;i=l)return-1;if(37===(o=n.charCodeAt(u++))){if(i=n.charAt(u++),!(a=w[i in Yn?n.charAt(u++):i])||(r=a(t,e,r))<0)return-1}else if(o!=e.charCodeAt(r++))return-1}return r}c.utc=function(t){var n=c(t);function e(t){try{var e=new(zn=qn);return e._=t,n(e)}finally{zn=Date}}return e.parse=function(t){try{zn=qn;var e=n.parse(t);return e&&e._}finally{zn=Date}},e.toString=n.toString,e},c.multi=c.utc.multi=fe;var h=a.map(),p=Wn(i),d=Zn(i),m=Wn(u),g=Zn(u),v=Wn(s),y=Zn(s),b=Wn(l),x=Zn(l);o.forEach((function(t,n){h.set(t.toLowerCase(),n)}));var M={a:function(t){return u[t.getDay()]},A:function(t){return i[t.getDay()]},b:function(t){return l[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:c(n),d:function(t,n){return Gn(t.getDate(),n,2)},e:function(t,n){return Gn(t.getDate(),n,2)},H:function(t,n){return Gn(t.getHours(),n,2)},I:function(t,n){return Gn(t.getHours()%12||12,n,2)},j:function(t,n){return Gn(1+jn.dayOfYear(t),n,3)},L:function(t,n){return Gn(t.getMilliseconds(),n,3)},m:function(t,n){return Gn(t.getMonth()+1,n,2)},M:function(t,n){return Gn(t.getMinutes(),n,2)},p:function(t){return o[+(t.getHours()>=12)]},S:function(t,n){return Gn(t.getSeconds(),n,2)},U:function(t,n){return Gn(jn.sundayOfYear(t),n,2)},w:function(t){return t.getDay()},W:function(t,n){return Gn(jn.mondayOfYear(t),n,2)},x:c(e),X:c(r),y:function(t,n){return Gn(t.getFullYear()%100,n,2)},Y:function(t,n){return Gn(t.getFullYear()%1e4,n,4)},Z:le,"%":function(){return"%"}},w={a:function(t,n,e){m.lastIndex=0;var r=m.exec(n.slice(e));return r?(t.w=g.get(r[0].toLowerCase()),e+r[0].length):-1},A:function(t,n,e){p.lastIndex=0;var r=p.exec(n.slice(e));return r?(t.w=d.get(r[0].toLowerCase()),e+r[0].length):-1},b:function(t,n,e){b.lastIndex=0;var r=b.exec(n.slice(e));return r?(t.m=x.get(r[0].toLowerCase()),e+r[0].length):-1},B:function(t,n,e){v.lastIndex=0;var r=v.exec(n.slice(e));return r?(t.m=y.get(r[0].toLowerCase()),e+r[0].length):-1},c:function(t,n,e){return f(t,M.c.toString(),n,e)},d:re,e:re,H:ae,I:ae,j:oe,L:se,m:ee,M:ie,p:function(t,n,e){var r=h.get(n.slice(e,e+=2).toLowerCase());return null==r?-1:(t.p=r,e)},S:ue,U:$n,w:Jn,W:Kn,x:function(t,n,e){return f(t,M.x.toString(),n,e)},X:function(t,n,e){return f(t,M.X.toString(),n,e)},y:te,Y:Qn,Z:ne,"%":ce};return c}jn.year=Bn((function(t){return(t=jn.day(t)).setMonth(0,1),t}),(function(t,n){t.setFullYear(t.getFullYear()+n)}),(function(t){return t.getFullYear()})),jn.years=jn.year.range,jn.years.utc=jn.year.utc.range,jn.day=Bn((function(t){var n=new zn(2e3,0);return n.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),n}),(function(t,n){t.setDate(t.getDate()+n)}),(function(t){return t.getDate()-1})),jn.days=jn.day.range,jn.days.utc=jn.day.utc.range,jn.dayOfYear=function(t){var n=jn.year(t);return Math.floor((t-n-6e4*(t.getTimezoneOffset()-n.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach((function(t,n){n=7-n;var e=jn[t]=Bn((function(t){return(t=jn.day(t)).setDate(t.getDate()-(t.getDay()+n)%7),t}),(function(t,n){t.setDate(t.getDate()+7*Math.floor(n))}),(function(t){var e=jn.year(t).getDay();return Math.floor((jn.dayOfYear(t)+(e+n)%7)/7)-(e!==n)}));jn[t+"s"]=e.range,jn[t+"s"].utc=e.utc.range,jn[t+"OfYear"]=function(t){var e=jn.year(t).getDay();return Math.floor((jn.dayOfYear(t)+(e+n)%7)/7)}})),jn.week=jn.sunday,jn.weeks=jn.sunday.range,jn.weeks.utc=jn.sunday.utc.range,jn.weekOfYear=jn.sundayOfYear;var Yn={"-":"",_:" ",0:"0"},Vn=/^\s*\d+/,Hn=/^%/;function Gn(t,n,e){var r=t<0?"-":"",o=(r?-t:t)+"",a=o.length;return r+(a68?1900:2e3),e+o[0].length):-1}function ne(t,n,e){return/^[+-]\d{4}$/.test(n=n.slice(e,e+5))?(t.Z=-n,e+5):-1}function ee(t,n,e){Vn.lastIndex=0;var r=Vn.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function re(t,n,e){Vn.lastIndex=0;var r=Vn.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function oe(t,n,e){Vn.lastIndex=0;var r=Vn.exec(n.slice(e,e+3));return r?(t.j=+r[0],e+r[0].length):-1}function ae(t,n,e){Vn.lastIndex=0;var r=Vn.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function ie(t,n,e){Vn.lastIndex=0;var r=Vn.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function ue(t,n,e){Vn.lastIndex=0;var r=Vn.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function se(t,n,e){Vn.lastIndex=0;var r=Vn.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function le(t){var n=t.getTimezoneOffset(),e=n>0?"-":"+",r=w(n)/60|0,o=w(n)%60;return e+Gn(r,"0",2)+Gn(o,"0",2)}function ce(t,n,e){Hn.lastIndex=0;var r=Hn.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function fe(t){for(var n=t.length,e=-1;++e=0?1:-1,u=i*a,s=Math.cos(n),l=Math.sin(n),c=o*l,f=r*s+c*Math.cos(u),h=c*i*Math.sin(u);Ce.add(Math.atan2(h,f)),e=t,r=s,o=l}Le.point=function(i,u){Le.point=a,e=(t=i)*Lt,r=Math.cos(u=(n=u)*Lt/2+Pt/4),o=Math.sin(u)},Le.lineEnd=function(){a(t,n)}}function De(t){var n=t[0],e=t[1],r=Math.cos(e);return[r*Math.cos(n),r*Math.sin(n),Math.sin(e)]}function je(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function ze(t,n){return[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]]}function qe(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function Fe(t,n){return[t[0]*n,t[1]*n,t[2]*n]}function Be(t){var n=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}function Ie(t){return[Math.atan2(t[1],t[0]),qt(t[2])]}function Xe(t,n){return w(t[0]-n[0])Tt?r=90:l<-Tt&&(n=-90),f[0]=t,f[1]=e}};function p(o,a){c.push(f=[t=o,e=o]),ar&&(r=a)}function d(a,i){var u=De([a*Lt,i*Lt]);if(s){var l=ze(s,u),c=ze([l[1],-l[0],0],l);Be(c),c=Ie(c);var f=a-o,h=f>0?1:-1,d=c[0]*Ut*h,m=w(f)>180;if(m^(h*or&&(r=g);else if(m^(h*o<(d=(d+360)%360-180)&&dr&&(r=i);m?ax(t,e)&&(e=a):x(a,e)>x(t,e)&&(t=a):e>=t?(ae&&(e=a)):a>o?x(t,a)>x(t,e)&&(e=a):x(a,e)>x(t,e)&&(t=a)}else p(a,i);s=u,o=a}function m(){h.point=d}function g(){f[0]=t,f[1]=e,h.point=p,s=null}function v(t,n){if(s){var e=t-o;l+=w(e)>180?e+(e>0?360:-360):e}else i=t,u=n;Le.point(t,n),d(t,n)}function y(){Le.lineStart()}function b(){v(i,u),Le.lineEnd(),w(l)>Tt&&(t=-(e=180)),f[0]=t,f[1]=e,s=null}function x(t,n){return(n-=t)<0?n+360:n}function M(t,n){return t[0]-n[0]}function _(t,n){return n[0]<=n[1]?n[0]<=t&&t<=n[1]:tx(m[0],m[1])&&(m[1]=p[1]),x(p[0],m[1])>x(m[0],m[1])&&(m[0]=p[0])):u.push(m=p);for(var s,l,p,d=-1/0,m=(i=0,u[l=u.length-1]);i<=l;m=p,++i)p=u[i],(s=x(m[1],p[0]))>d&&(d=s,t=p[0],e=m[1])}return c=f=null,t===1/0||n===1/0?[[NaN,NaN],[NaN,NaN]]:[[t,n],[e,r]]}}(),a.geo.centroid=function(t){we=_e=ke=Se=Ae=Ee=Te=Re=Pe=Ne=Oe=0,a.geo.stream(t,Ye);var n=Pe,e=Ne,r=Oe,o=n*n+e*e+r*r;return o=0;--u)o.point((f=c[u])[0],f[1]);else r(p.x,p.p.x,-1,o);p=p.p}c=(p=p.o).z,d=!d}while(!p.v);o.lineEnd()}}}function Qe(t){if(n=t.length){for(var n,e,r=0,o=t[0];++r=0?1:-1,_=w*M,k=_>Pt,S=d*b;if(Ce.add(Math.atan2(S*w*Math.sin(_),m*x+S*Math.cos(_))),a+=k?M+w*Nt:M,k^h>=e^v>=e){var A=ze(De(f),De(t));Be(A);var E=ze(o,A);Be(E);var T=(k^M>=0?-1:1)*qt(E[2]);(r>T||r===T&&(A[0]||A[1]))&&(i+=k^M>=0?1:-1)}if(!g++)break;h=v,d=b,m=x,f=t}}return(a<-Tt||a0){for(b||(i.polygonStart(),b=!0),i.lineStart();++a1&&2&n&&e.push(e.pop().concat(e.shift())),u.push(e.filter(er))}return c}}function er(t){return t.length>1}function rr(){var t,n=[];return{lineStart:function(){n.push(t=[])},point:function(n,e){t.push([n,e])},lineEnd:z,buffer:function(){var e=n;return n=[],t=null,e},rejoin:function(){n.length>1&&n.push(n.pop().concat(n.shift()))}}}function or(t,n){return((t=t.x)[0]<0?t[1]-Ct-Tt:Ct-t[1])-((n=n.x)[0]<0?n[1]-Ct-Tt:Ct-n[1])}var ar=nr($e,(function(t){var n,e=NaN,r=NaN,o=NaN;return{lineStart:function(){t.lineStart(),n=1},point:function(a,i){var u=a>0?Pt:-Pt,s=w(a-e);w(s-Pt)0?Ct:-Ct),t.point(o,r),t.lineEnd(),t.lineStart(),t.point(u,r),t.point(a,r),n=0):o!==u&&s>=Pt&&(w(e-o)Tt?Math.atan((Math.sin(n)*(a=Math.cos(r))*Math.sin(e)-Math.sin(r)*(o=Math.cos(n))*Math.sin(t))/(o*a*i)):(n+r)/2}(e,r,a,i),t.point(o,r),t.lineEnd(),t.lineStart(),t.point(u,r),n=0),t.point(e=a,r=i),o=u},lineEnd:function(){t.lineEnd(),e=r=NaN},clean:function(){return 2-n}}}),(function(t,n,e,r){var o;if(null==t)o=e*Ct,r.point(-Pt,o),r.point(0,o),r.point(Pt,o),r.point(Pt,0),r.point(Pt,-o),r.point(0,-o),r.point(-Pt,-o),r.point(-Pt,0),r.point(-Pt,o);else if(w(t[0]-n[0])>Tt){var a=t[0]0,r=w(n)>Tt;return nr(o,(function(t){var n,u,s,l,c;return{lineStart:function(){l=s=!1,c=1},point:function(f,h){var p,d=[f,h],m=o(f,h),g=e?m?0:i(f,h):m?i(f+(f<0?Pt:-Pt),h):0;if(!n&&(l=s=m)&&t.lineStart(),m!==s&&(p=a(n,d),(Xe(n,p)||Xe(d,p))&&(d[0]+=Tt,d[1]+=Tt,m=o(d[0],d[1]))),m!==s)c=0,m?(t.lineStart(),p=a(d,n),t.point(p[0],p[1])):(p=a(n,d),t.point(p[0],p[1]),t.lineEnd()),n=p;else if(r&&n&&e^m){var v;g&u||!(v=a(d,n,!0))||(c=0,e?(t.lineStart(),t.point(v[0][0],v[0][1]),t.point(v[1][0],v[1][1]),t.lineEnd()):(t.point(v[1][0],v[1][1]),t.lineEnd(),t.lineStart(),t.point(v[0][0],v[0][1])))}!m||n&&Xe(n,d)||t.point(d[0],d[1]),n=d,s=m,u=g},lineEnd:function(){s&&t.lineEnd(),n=null},clean:function(){return c|(l&&s)<<1}}}),Ir(t,6*Lt),e?[0,-t]:[-Pt,t-Pt]);function o(t,e){return Math.cos(t)*Math.cos(e)>n}function a(t,e,r){var o=[1,0,0],a=ze(De(t),De(e)),i=je(a,a),u=a[0],s=i-u*u;if(!s)return!r&&t;var l=n*i/s,c=-n*u/s,f=ze(o,a),h=Fe(o,l);qe(h,Fe(a,c));var p=f,d=je(h,p),m=je(p,p),g=d*d-m*(je(h,h)-1);if(!(g<0)){var v=Math.sqrt(g),y=Fe(p,(-d-v)/m);if(qe(y,h),y=Ie(y),!r)return y;var b,x=t[0],M=e[0],_=t[1],k=e[1];M0^y[1]<(w(y[0]-x)Pt^(x<=y[0]&&y[0]<=M)){var E=Fe(p,(-d+v)/m);return qe(E,h),[y,Ie(E)]}}}function i(n,r){var o=e?t:Pt-t,a=0;return n<-o?a|=1:n>o&&(a|=2),r<-o?a|=4:r>o&&(a|=8),a}}function ur(t,n,e,r){return function(o){var a,i=o.a,u=o.b,s=i.x,l=i.y,c=0,f=1,h=u.x-s,p=u.y-l;if(a=t-s,h||!(a>0)){if(a/=h,h<0){if(a0){if(a>f)return;a>c&&(c=a)}if(a=e-s,h||!(a<0)){if(a/=h,h<0){if(a>f)return;a>c&&(c=a)}else if(h>0){if(a0)){if(a/=p,p<0){if(a0){if(a>f)return;a>c&&(c=a)}if(a=r-l,p||!(a<0)){if(a/=p,p<0){if(a>f)return;a>c&&(c=a)}else if(p>0){if(a0&&(o.a={x:s+c*h,y:l+c*p}),f<1&&(o.b={x:s+f*h,y:l+f*p}),o}}}}}}function sr(t,n,e,r){return function(s){var l,c,f,h,p,d,m,g,v,y,b,x=s,M=rr(),w=ur(t,n,e,r),_={point:A,lineStart:function(){_.point=E,c&&c.push(f=[]),y=!0,v=!1,m=g=NaN},lineEnd:function(){l&&(E(h,p),d&&v&&M.rejoin(),l.push(M.buffer())),_.point=A,v&&s.lineEnd()},polygonStart:function(){s=M,l=[],c=[],b=!0},polygonEnd:function(){s=x,l=a.merge(l);var n=function(t){for(var n=0,e=c.length,r=t[1],o=0;or&&jt(l,a,t)>0&&++n:a[1]<=r&&jt(l,a,t)<0&&--n,l=a;return 0!==n}([t,r]),e=b&&n,o=l.length;(e||o)&&(s.polygonStart(),e&&(s.lineStart(),k(null,null,1,s),s.lineEnd()),o&&Ke(l,i,n,k,s),s.polygonEnd()),l=c=f=null}};function k(a,i,s,l){var c=0,f=0;if(null==a||(c=o(a,s))!==(f=o(i,s))||u(a,i)<0^s>0)do{l.point(0===c||3===c?t:e,c>1?r:n)}while((c=(c+s+4)%4)!==f);else l.point(i[0],i[1])}function S(o,a){return t<=o&&o<=e&&n<=a&&a<=r}function A(t,n){S(t,n)&&s.point(t,n)}function E(t,n){var e=S(t=Math.max(-1e9,Math.min(1e9,t)),n=Math.max(-1e9,Math.min(1e9,n)));if(c&&f.push([t,n]),y)h=t,p=n,d=e,y=!1,e&&(s.lineStart(),s.point(t,n));else if(e&&v)s.point(t,n);else{var r={a:{x:m,y:g},b:{x:t,y:n}};w(r)?(v||(s.lineStart(),s.point(r.a.x,r.a.y)),s.point(r.b.x,r.b.y),e||s.lineEnd(),b=!1):e&&(s.lineStart(),s.point(t,n),b=!1)}m=t,g=n,v=e}return _};function o(r,o){return w(r[0]-t)0?0:3:w(r[0]-e)0?2:1:w(r[1]-n)0?1:0:o>0?3:2}function i(t,n){return u(t.x,n.x)}function u(t,n){var e=o(t,1),r=o(n,1);return e!==r?e-r:0===e?n[1]-t[1]:1===e?t[0]-n[0]:2===e?t[1]-n[1]:n[0]-t[0]}}function lr(t){var n=0,e=Pt/3,r=Lr(t),o=r(n,e);return o.parallels=function(t){return arguments.length?r(n=t[0]*Pt/180,e=t[1]*Pt/180):[n/Pt*180,e/Pt*180]},o}function cr(t,n){var e=Math.sin(t),r=(e+Math.sin(n))/2,o=1+e*(2*r-e),a=Math.sqrt(o)/r;function i(t,n){var e=Math.sqrt(o-2*r*Math.sin(n))/r;return[e*Math.sin(t*=r),a-e*Math.cos(t)]}return i.invert=function(t,n){var e=a-n;return[Math.atan2(t,e)/r,qt((o-(t*t+e*e)*r*r)/(2*r))]},i}a.geo.clipExtent=function(){var t,n,e,r,o,a,i={stream:function(t){return o&&(o.valid=!1),(o=a(t)).valid=!0,o},extent:function(u){return arguments.length?(a=sr(t=+u[0][0],n=+u[0][1],e=+u[1][0],r=+u[1][1]),o&&(o.valid=!1,o=null),i):[[t,n],[e,r]]}};return i.extent([[0,0],[960,500]])},(a.geo.conicEqualArea=function(){return lr(cr)}).raw=cr,a.geo.albers=function(){return a.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},a.geo.albersUsa=function(){var t,n,e,r,o=a.geo.albers(),i=a.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),u=a.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s={point:function(n,e){t=[n,e]}};function l(o){var a=o[0],i=o[1];return t=null,n(a,i),t||(e(a,i),t)||r(a,i),t}return l.invert=function(t){var n=o.scale(),e=o.translate(),r=(t[0]-e[0])/n,a=(t[1]-e[1])/n;return(a>=.12&&a<.234&&r>=-.425&&r<-.214?i:a>=.166&&a<.234&&r>=-.214&&r<-.115?u:o).invert(t)},l.stream=function(t){var n=o.stream(t),e=i.stream(t),r=u.stream(t);return{point:function(t,o){n.point(t,o),e.point(t,o),r.point(t,o)},sphere:function(){n.sphere(),e.sphere(),r.sphere()},lineStart:function(){n.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){n.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){n.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){n.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},l.precision=function(t){return arguments.length?(o.precision(t),i.precision(t),u.precision(t),l):o.precision()},l.scale=function(t){return arguments.length?(o.scale(t),i.scale(.35*t),u.scale(t),l.translate(o.translate())):o.scale()},l.translate=function(t){if(!arguments.length)return o.translate();var a=o.scale(),c=+t[0],f=+t[1];return n=o.translate(t).clipExtent([[c-.455*a,f-.238*a],[c+.455*a,f+.238*a]]).stream(s).point,e=i.translate([c-.307*a,f+.201*a]).clipExtent([[c-.425*a+Tt,f+.12*a+Tt],[c-.214*a-Tt,f+.234*a-Tt]]).stream(s).point,r=u.translate([c-.205*a,f+.212*a]).clipExtent([[c-.214*a+Tt,f+.166*a+Tt],[c-.115*a-Tt,f+.234*a-Tt]]).stream(s).point,l},l.scale(1070)};var fr,hr,pr,dr,mr,gr,vr={point:z,lineStart:z,lineEnd:z,polygonStart:function(){hr=0,vr.lineStart=yr},polygonEnd:function(){vr.lineStart=vr.lineEnd=vr.point=z,fr+=w(hr/2)}};function yr(){var t,n,e,r;function o(t,n){hr+=r*t-e*n,e=t,r=n}vr.point=function(a,i){vr.point=o,t=e=a,n=r=i},vr.lineEnd=function(){o(t,n)}}var br={point:function(t,n){tmr&&(mr=t),ngr&&(gr=n)},lineStart:z,lineEnd:z,polygonStart:z,polygonEnd:z};function xr(){var t=Mr(4.5),n=[],e={point:r,lineStart:function(){e.point=o},lineEnd:i,polygonStart:function(){e.lineEnd=u},polygonEnd:function(){e.lineEnd=i,e.point=r},pointRadius:function(n){return t=Mr(n),e},result:function(){if(n.length){var t=n.join("");return n=[],t}}};function r(e,r){n.push("M",e,",",r,t)}function o(t,r){n.push("M",t,",",r),e.point=a}function a(t,e){n.push("L",t,",",e)}function i(){e.point=r}function u(){n.push("Z")}return e}function Mr(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}var wr,_r={point:kr,lineStart:Sr,lineEnd:Ar,polygonStart:function(){_r.lineStart=Er},polygonEnd:function(){_r.point=kr,_r.lineStart=Sr,_r.lineEnd=Ar}};function kr(t,n){ke+=t,Se+=n,++Ae}function Sr(){var t,n;function e(e,r){var o=e-t,a=r-n,i=Math.sqrt(o*o+a*a);Ee+=i*(t+e)/2,Te+=i*(n+r)/2,Re+=i,kr(t=e,n=r)}_r.point=function(r,o){_r.point=e,kr(t=r,n=o)}}function Ar(){_r.point=kr}function Er(){var t,n,e,r;function o(t,n){var o=t-e,a=n-r,i=Math.sqrt(o*o+a*a);Ee+=i*(e+t)/2,Te+=i*(r+n)/2,Re+=i,Pe+=(i=r*t-e*n)*(e+t),Ne+=i*(r+n),Oe+=3*i,kr(e=t,r=n)}_r.point=function(a,i){_r.point=o,kr(t=e=a,n=r=i)},_r.lineEnd=function(){o(t,n)}}function Tr(t){var n=4.5,e={point:r,lineStart:function(){e.point=o},lineEnd:i,polygonStart:function(){e.lineEnd=u},polygonEnd:function(){e.lineEnd=i,e.point=r},pointRadius:function(t){return n=t,e},result:z};function r(e,r){t.moveTo(e+n,r),t.arc(e,r,n,0,Nt)}function o(n,r){t.moveTo(n,r),e.point=a}function a(n,e){t.lineTo(n,e)}function i(){e.point=r}function u(){t.closePath()}return e}function Rr(t){var n=.5,e=Math.cos(30*Lt),r=16;function o(t){return(r?i:a)(t)}function a(n){return Or(n,(function(e,r){e=t(e,r),n.point(e[0],e[1])}))}function i(n){var e,o,a,i,s,l,c,f,h,p,d,m,g={point:v,lineStart:y,lineEnd:x,polygonStart:function(){n.polygonStart(),g.lineStart=M},polygonEnd:function(){n.polygonEnd(),g.lineStart=y}};function v(e,r){e=t(e,r),n.point(e[0],e[1])}function y(){f=NaN,g.point=b,n.lineStart()}function b(e,o){var a=De([e,o]),i=t(e,o);u(f,h,c,p,d,m,f=i[0],h=i[1],c=e,p=a[0],d=a[1],m=a[2],r,n),n.point(f,h)}function x(){g.point=v,n.lineEnd()}function M(){y(),g.point=w,g.lineEnd=_}function w(t,n){b(e=t,n),o=f,a=h,i=p,s=d,l=m,g.point=b}function _(){u(f,h,c,p,d,m,o,a,e,i,s,l,r,n),g.lineEnd=x,x()}return g}function u(r,o,a,i,s,l,c,f,h,p,d,m,g,v){var y=c-r,b=f-o,x=y*y+b*b;if(x>4*n&&g--){var M=i+p,_=s+d,k=l+m,S=Math.sqrt(M*M+_*_+k*k),A=Math.asin(k/=S),E=w(w(k)-1)n||w((y*N+b*O)/x-.5)>.3||i*p+s*d+l*m0&&16,o):Math.sqrt(n)},o}function Pr(t){var n=Rr((function(n,e){return t([n*Ut,e*Ut])}));return function(t){return Ur(n(t))}}function Nr(t){this.stream=t}function Or(t,n){return{point:n,sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function Cr(t){return Lr((function(){return t}))()}function Lr(t){var n,e,r,o,i,u,s=Rr((function(t,e){return[(t=n(t,e))[0]*l+o,i-t[1]*l]})),l=150,c=480,f=250,h=0,p=0,d=0,m=0,g=0,v=ar,y=L,b=null,x=null;function M(t){return[(t=r(t[0]*Lt,t[1]*Lt))[0]*l+o,i-t[1]*l]}function w(t){return(t=r.invert((t[0]-o)/l,(i-t[1])/l))&&[t[0]*Ut,t[1]*Ut]}function _(){r=Je(e=zr(d,m,g),n);var t=n(h,p);return o=c-t[0]*l,i=f+t[1]*l,k()}function k(){return u&&(u.valid=!1,u=null),M}return M.stream=function(t){return u&&(u.valid=!1),(u=Ur(v(e,s(y(t))))).valid=!0,u},M.clipAngle=function(t){return arguments.length?(v=null==t?(b=t,ar):ir((b=+t)*Lt),k()):b},M.clipExtent=function(t){return arguments.length?(x=t,y=t?sr(t[0][0],t[0][1],t[1][0],t[1][1]):L,k()):x},M.scale=function(t){return arguments.length?(l=+t,_()):l},M.translate=function(t){return arguments.length?(c=+t[0],f=+t[1],_()):[c,f]},M.center=function(t){return arguments.length?(h=t[0]%360*Lt,p=t[1]%360*Lt,_()):[h*Ut,p*Ut]},M.rotate=function(t){return arguments.length?(d=t[0]%360*Lt,m=t[1]%360*Lt,g=t.length>2?t[2]%360*Lt:0,_()):[d*Ut,m*Ut,g*Ut]},a.rebind(M,s,"precision"),function(){return n=t.apply(this,arguments),M.invert=n.invert&&w,_()}}function Ur(t){return Or(t,(function(n,e){t.point(n*Lt,e*Lt)}))}function Dr(t,n){return[t,n]}function jr(t,n){return[t>Pt?t-Nt:t<-Pt?t+Nt:t,n]}function zr(t,n,e){return t?n||e?Je(Fr(t),Br(n,e)):Fr(t):n||e?Br(n,e):jr}function qr(t){return function(n,e){return[(n+=t)>Pt?n-Nt:n<-Pt?n+Nt:n,e]}}function Fr(t){var n=qr(t);return n.invert=qr(-t),n}function Br(t,n){var e=Math.cos(t),r=Math.sin(t),o=Math.cos(n),a=Math.sin(n);function i(t,n){var i=Math.cos(n),u=Math.cos(t)*i,s=Math.sin(t)*i,l=Math.sin(n),c=l*e+u*r;return[Math.atan2(s*o-c*a,u*e-l*r),qt(c*o+s*a)]}return i.invert=function(t,n){var i=Math.cos(n),u=Math.cos(t)*i,s=Math.sin(t)*i,l=Math.sin(n),c=l*o-s*a;return[Math.atan2(s*o+l*a,u*e+c*r),qt(c*e-u*r)]},i}function Ir(t,n){var e=Math.cos(t),r=Math.sin(t);return function(o,a,i,u){var s=i*n;null!=o?(o=Xr(e,o),a=Xr(e,a),(i>0?oa)&&(o+=i*Nt)):(o=t+i*Nt,a=t-.5*s);for(var l,c=o;i>0?c>a:c2?t[2]*Lt:0),n.invert=function(n){return(n=t.invert(n[0]*Lt,n[1]*Lt))[0]*=Ut,n[1]*=Ut,n},n},jr.invert=Dr,a.geo.circle=function(){var t,n,e=[0,0],r=6;function o(){var t="function"==typeof e?e.apply(this,arguments):e,r=zr(-t[0]*Lt,-t[1]*Lt,0).invert,o=[];return n(null,null,1,{point:function(t,n){o.push(t=r(t,n)),t[0]*=Ut,t[1]*=Ut}}),{type:"Polygon",coordinates:[o]}}return o.origin=function(t){return arguments.length?(e=t,o):e},o.angle=function(e){return arguments.length?(n=Ir((t=+e)*Lt,r*Lt),o):t},o.precision=function(e){return arguments.length?(n=Ir(t*Lt,(r=+e)*Lt),o):r},o.angle(90)},a.geo.distance=function(t,n){var e,r=(n[0]-t[0])*Lt,o=t[1]*Lt,a=n[1]*Lt,i=Math.sin(r),u=Math.cos(r),s=Math.sin(o),l=Math.cos(o),c=Math.sin(a),f=Math.cos(a);return Math.atan2(Math.sqrt((e=f*i)*e+(e=l*c-s*f*u)*e),s*c+l*f*u)},a.geo.graticule=function(){var t,n,e,r,o,i,u,s,l,c,f,h,p=10,d=p,m=90,g=360,v=2.5;function y(){return{type:"MultiLineString",coordinates:b()}}function b(){return a.range(Math.ceil(r/m)*m,e,m).map(f).concat(a.range(Math.ceil(s/g)*g,u,g).map(h)).concat(a.range(Math.ceil(n/p)*p,t,p).filter((function(t){return w(t%m)>Tt})).map(l)).concat(a.range(Math.ceil(i/d)*d,o,d).filter((function(t){return w(t%g)>Tt})).map(c))}return y.lines=function(){return b().map((function(t){return{type:"LineString",coordinates:t}}))},y.outline=function(){return{type:"Polygon",coordinates:[f(r).concat(h(u).slice(1),f(e).reverse().slice(1),h(s).reverse().slice(1))]}},y.extent=function(t){return arguments.length?y.majorExtent(t).minorExtent(t):y.minorExtent()},y.majorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],s=+t[0][1],u=+t[1][1],r>e&&(t=r,r=e,e=t),s>u&&(t=s,s=u,u=t),y.precision(v)):[[r,s],[e,u]]},y.minorExtent=function(e){return arguments.length?(n=+e[0][0],t=+e[1][0],i=+e[0][1],o=+e[1][1],n>t&&(e=n,n=t,t=e),i>o&&(e=i,i=o,o=e),y.precision(v)):[[n,i],[t,o]]},y.step=function(t){return arguments.length?y.majorStep(t).minorStep(t):y.minorStep()},y.majorStep=function(t){return arguments.length?(m=+t[0],g=+t[1],y):[m,g]},y.minorStep=function(t){return arguments.length?(p=+t[0],d=+t[1],y):[p,d]},y.precision=function(a){return arguments.length?(v=+a,l=Yr(i,o,90),c=Vr(n,t,v),f=Yr(s,u,90),h=Vr(r,e,v),y):v},y.majorExtent([[-180,-90+Tt],[180,90-Tt]]).minorExtent([[-180,-80-Tt],[180,80+Tt]])},a.geo.greatArc=function(){var t,n,e=Hr,r=Gr;function o(){return{type:"LineString",coordinates:[t||e.apply(this,arguments),n||r.apply(this,arguments)]}}return o.distance=function(){return a.geo.distance(t||e.apply(this,arguments),n||r.apply(this,arguments))},o.source=function(n){return arguments.length?(e=n,t="function"==typeof n?null:n,o):e},o.target=function(t){return arguments.length?(r=t,n="function"==typeof t?null:t,o):r},o.precision=function(){return arguments.length?o:0},o},a.geo.interpolate=function(t,n){return e=t[0]*Lt,r=t[1]*Lt,o=n[0]*Lt,a=n[1]*Lt,i=Math.cos(r),u=Math.sin(r),s=Math.cos(a),l=Math.sin(a),c=i*Math.cos(e),f=i*Math.sin(e),h=s*Math.cos(o),p=s*Math.sin(o),d=2*Math.asin(Math.sqrt(Bt(a-r)+i*s*Bt(o-e))),m=1/Math.sin(d),(g=d?function(t){var n=Math.sin(t*=d)*m,e=Math.sin(d-t)*m,r=e*c+n*h,o=e*f+n*p,a=e*u+n*l;return[Math.atan2(o,r)*Ut,Math.atan2(a,Math.sqrt(r*r+o*o))*Ut]}:function(){return[e*Ut,r*Ut]}).distance=d,g;var e,r,o,a,i,u,s,l,c,f,h,p,d,m,g},a.geo.length=function(t){return wr=0,a.geo.stream(t,Wr),wr};var Wr={sphere:z,point:z,lineStart:function(){var t,n,e;function r(r,o){var a=Math.sin(o*=Lt),i=Math.cos(o),u=w((r*=Lt)-t),s=Math.cos(u);wr+=Math.atan2(Math.sqrt((u=i*Math.sin(u))*u+(u=e*a-n*i*s)*u),n*a+e*i*s),t=r,n=a,e=i}Wr.point=function(o,a){t=o*Lt,n=Math.sin(a*=Lt),e=Math.cos(a),Wr.point=r},Wr.lineEnd=function(){Wr.point=Wr.lineEnd=z}},lineEnd:z,polygonStart:z,polygonEnd:z};function Zr(t,n){function e(n,e){var r=Math.cos(n),o=Math.cos(e),a=t(r*o);return[a*o*Math.sin(n),a*Math.sin(e)]}return e.invert=function(t,e){var r=Math.sqrt(t*t+e*e),o=n(r),a=Math.sin(o),i=Math.cos(o);return[Math.atan2(t*a,r*i),Math.asin(r&&e*a/r)]},e}var Jr=Zr((function(t){return Math.sqrt(2/(1+t))}),(function(t){return 2*Math.asin(t/2)}));(a.geo.azimuthalEqualArea=function(){return Cr(Jr)}).raw=Jr;var $r=Zr((function(t){var n=Math.acos(t);return n&&n/Math.sin(n)}),L);function Kr(t,n){var e=Math.cos(t),r=function(t){return Math.tan(Pt/4+t/2)},o=t===n?Math.sin(t):Math.log(e/Math.cos(n))/Math.log(r(n)/r(t)),a=e*Math.pow(r(t),o)/o;if(!o)return no;function i(t,n){a>0?n<-Ct+Tt&&(n=-Ct+Tt):n>Ct-Tt&&(n=Ct-Tt);var e=a/Math.pow(r(n),o);return[e*Math.sin(o*t),a-e*Math.cos(o*t)]}return i.invert=function(t,n){var e=a-n,r=Dt(o)*Math.sqrt(t*t+e*e);return[Math.atan2(t,e)/o,2*Math.atan(Math.pow(a/r,1/o))-Ct]},i}function Qr(t,n){var e=Math.cos(t),r=t===n?Math.sin(t):(e-Math.cos(n))/(n-t),o=e/r+t;if(w(r)1&&jt(t[e[r-2]],t[e[r-1]],t[o])<=0;)--r;e[r++]=o}return e.slice(0,r)}function lo(t,n){return t[0]-n[0]||t[1]-n[1]}(a.geo.stereographic=function(){return Cr(oo)}).raw=oo,ao.invert=function(t,n){return[-n,2*Math.atan(Math.exp(t))-Ct]},(a.geo.transverseMercator=function(){var t=eo(ao),n=t.center,e=t.rotate;return t.center=function(t){return t?n([-t[1],t[0]]):[(t=n())[1],-t[0]]},t.rotate=function(t){return t?e([t[0],t[1],t.length>2?t[2]+90:90]):[(t=e())[0],t[1],t[2]-90]},e([0,0,90])}).raw=ao,a.geom={},a.geom.hull=function(t){var n=io,e=uo;if(arguments.length)return r(t);function r(t){if(t.length<3)return[];var r,o=bn(n),a=bn(e),i=t.length,u=[],s=[];for(r=0;r=0;--r)p.push(t[u[l[r]][2]]);for(r=+f;rTt)u=u.L;else{if(!((o=a-To(u,i))>Tt)){r>-Tt?(n=u.P,e=u):o>-Tt?(n=u,e=u.N):n=e=u;break}if(!u.R){n=u;break}u=u.R}var s=_o(t);if(vo.insert(n,s),n||e){if(n===e)return Co(n),e=_o(n.site),vo.insert(s,e),s.edge=e.edge=Do(n.site,s.site),Oo(n),void Oo(e);if(e){Co(n),Co(e);var l=n.site,c=l.x,f=l.y,h=t.x-c,p=t.y-f,d=e.site,m=d.x-c,g=d.y-f,v=2*(h*g-p*m),y=h*h+p*p,b=m*m+g*g,x={x:(g*y-p*b)/v+c,y:(h*b-m*y)/v+f};jo(e.edge,l,d,x),s.edge=Do(l,t,null,x),e.edge=Do(t,d,null,x),Oo(n),Oo(e)}else s.edge=Do(n.site,s.site)}}function Eo(t,n){var e=t.site,r=e.x,o=e.y,a=o-n;if(!a)return r;var i=t.P;if(!i)return-1/0;var u=(e=i.site).x,s=e.y,l=s-n;if(!l)return u;var c=u-r,f=1/a-1/l,h=c/l;return f?(-h+Math.sqrt(h*h-2*f*(c*c/(-2*l)-s+l/2+o-a/2)))/f+r:(r+u)/2}function To(t,n){var e=t.N;if(e)return Eo(e,n);var r=t.site;return r.y===n?r.x:1/0}function Ro(t){this.site=t,this.edges=[]}function Po(t,n){return n.angle-t.angle}function No(){Fo(this),this.x=this.y=this.arc=this.site=this.cy=null}function Oo(t){var n=t.P,e=t.N;if(n&&e){var r=n.site,o=t.site,a=e.site;if(r!==a){var i=o.x,u=o.y,s=r.x-i,l=r.y-u,c=a.x-i,f=2*(s*(g=a.y-u)-l*c);if(!(f>=-Rt)){var h=s*s+l*l,p=c*c+g*g,d=(g*h-l*p)/f,m=(s*p-c*h)/f,g=m+u,v=Mo.pop()||new No;v.arc=t,v.site=o,v.x=d+i,v.y=g+Math.sqrt(d*d+m*m),v.cy=g,t.circle=v;for(var y=null,b=bo._;b;)if(v.y=u)return;if(h>d){if(a){if(a.y>=l)return}else a={x:g,y:s};e={x:g,y:l}}else{if(a){if(a.y1)if(h>d){if(a){if(a.y>=l)return}else a={x:(s-o)/r,y:s};e={x:(l-o)/r,y:l}}else{if(a){if(a.y=u)return}else a={x:i,y:r*i+o};e={x:u,y:r*u+o}}else{if(a){if(a.xTt||w(o-e)>Tt)&&(u.splice(i,0,new zo((v=a.site,y=c,b=w(r-f)Tt?{x:f,y:w(n-f)Tt?{x:w(e-d)Tt?{x:h,y:w(n-h)Tt?{x:w(e-p)=e&&l.x<=o&&l.y>=r&&l.y<=i?[[e,i],[o,i],[o,r],[e,r]]:[]).point=t[u]})),n}function u(t){return t.map((function(t,n){return{x:Math.round(r(t,n)/Tt)*Tt,y:Math.round(o(t,n)/Tt)*Tt,i:n}}))}return i.links=function(t){return Yo(u(t)).edges.filter((function(t){return t.l&&t.r})).map((function(n){return{source:t[n.l.i],target:t[n.r.i]}}))},i.triangles=function(t){var n=[];return Yo(u(t)).cells.forEach((function(e,r){for(var o,a=e.site,i=e.edges.sort(Po),u=-1,s=i.length,l=i[s-1].edge,c=l.l===a?l.r:l.l;++ua||f>i||h=M)<<1|n>=x,_=w+4;w<_;++w)if(l=b[3&w])switch(3&w){case 0:t(l,c,f,x,M);break;case 1:t(l,x,f,h,M);break;case 2:t(l,c,M,x,p);break;case 3:t(l,x,M,h,p)}}}(t,r,o,a,i),u}function Ko(t,n){t=a.rgb(t),n=a.rgb(n);var e=t.r,r=t.g,o=t.b,i=n.r-e,u=n.g-r,s=n.b-o;return function(t){return"#"+hn(Math.round(e+i*t))+hn(Math.round(r+u*t))+hn(Math.round(o+s*t))}}function Qo(t,n){var e,r={},o={};for(e in t)e in n?r[e]=oa(t[e],n[e]):o[e]=t[e];for(e in n)e in t||(o[e]=n[e]);return function(t){for(e in r)o[e]=r[e](t);return o}}function ta(t,n){return t=+t,n=+n,function(e){return t*(1-e)+n*e}}function na(t,n){var e,r,o,a=ea.lastIndex=ra.lastIndex=0,i=-1,u=[],s=[];for(t+="",n+="";(e=ea.exec(t))&&(r=ra.exec(n));)(o=r.index)>a&&(o=n.slice(a,o),u[i]?u[i]+=o:u[++i]=o),(e=e[0])===(r=r[0])?u[i]?u[i]+=r:u[++i]=r:(u[++i]=null,s.push({i:i,x:ta(e,r)})),a=ra.lastIndex;return am&&(m=s.x),s.y>g&&(g=s.y),l.push(s.x),c.push(s.y);else for(f=0;fm&&(m=b),x>g&&(g=x),l.push(b),c.push(x)}var M=m-p,_=g-d;function k(t,n,e,r,o,a,i,u){if(!isNaN(e)&&!isNaN(r))if(t.leaf){var s=t.x,l=t.y;if(null!=s)if(w(s-e)+w(l-r)<.01)S(t,n,e,r,o,a,i,u);else{var c=t.point;t.x=t.y=t.point=null,S(t,c,s,l,o,a,i,u),S(t,n,e,r,o,a,i,u)}else t.x=e,t.y=r,t.point=n}else S(t,n,e,r,o,a,i,u)}function S(t,n,e,r,o,a,i,u){var s=.5*(o+i),l=.5*(a+u),c=e>=s,f=r>=l,h=f<<1|c;t.leaf=!1,c?o=s:i=s,f?a=l:u=l,k(t=t.nodes[h]||(t.nodes[h]={leaf:!0,nodes:[],point:null,x:null,y:null}),n,e,r,o,a,i,u)}M>_?g=d+M:m=p+_;var A={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(t){k(A,t,+v(t,++f),+y(t,f),p,d,m,g)},visit:function(t){Jo(t,A,p,d,m,g)},find:function(t){return $o(A,t[0],t[1],p,d,m,g)}};if(f=-1,null==n){for(;++f=0&&!(e=a.interpolators[r](t,n)););return e}function aa(t,n){var e,r=[],o=[],a=t.length,i=n.length,u=Math.min(t.length,n.length);for(e=0;e=1?1:t(n)}}function ca(t){return function(n){return 1-t(1-n)}}function fa(t){return function(n){return.5*(n<.5?t(2*n):2-t(2-2*n))}}function ha(t){return t*t}function pa(t){return t*t*t}function da(t){if(t<=0)return 0;if(t>=1)return 1;var n=t*t,e=n*t;return 4*(t<.5?e:3*(t-n)+e-.75)}function ma(t){return 1-Math.cos(t*Ct)}function ga(t){return Math.pow(2,10*(t-1))}function va(t){return 1-Math.sqrt(1-t*t)}function ya(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function ba(t,n){return n-=t,function(e){return Math.round(t+n*e)}}function xa(t){var n=[t.a,t.b],e=[t.c,t.d],r=wa(n),o=Ma(n,e),a=wa(function(t,n,e){return t[0]+=e*n[0],t[1]+=e*n[1],t}(e,n,-o))||0;n[0]*e[1]=0?t.slice(0,n):t,r=n>=0?t.slice(n+1):"in";return e=ua.get(e)||ia,la((r=sa.get(r)||L)(e.apply(null,i.call(arguments,1))))},a.interpolateHcl=function(t,n){t=a.hcl(t),n=a.hcl(n);var e=t.h,r=t.c,o=t.l,i=n.h-e,u=n.c-r,s=n.l-o;return isNaN(u)&&(u=0,r=isNaN(r)?n.c:r),isNaN(i)?(i=0,e=isNaN(e)?n.h:e):i>180?i-=360:i<-180&&(i+=360),function(t){return Kt(e+i*t,r+u*t,o+s*t)+""}},a.interpolateHsl=function(t,n){t=a.hsl(t),n=a.hsl(n);var e=t.h,r=t.s,o=t.l,i=n.h-e,u=n.s-r,s=n.l-o;return isNaN(u)&&(u=0,r=isNaN(r)?n.s:r),isNaN(i)?(i=0,e=isNaN(e)?n.h:e):i>180?i-=360:i<-180&&(i+=360),function(t){return Zt(e+i*t,r+u*t,o+s*t)+""}},a.interpolateLab=function(t,n){t=a.lab(t),n=a.lab(n);var e=t.l,r=t.a,o=t.b,i=n.l-e,u=n.a-r,s=n.b-o;return function(t){return en(e+i*t,r+u*t,o+s*t)+""}},a.interpolateRound=ba,a.transform=function(t){var n=s.createElementNS(a.ns.prefix.svg,"g");return(a.transform=function(t){if(null!=t){n.setAttribute("transform",t);var e=n.transform.baseVal.consolidate()}return new xa(e?e.matrix:_a)})(t)},xa.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var _a={a:1,b:0,c:0,d:1,e:0,f:0};function ka(t){return t.length?t.pop()+",":""}function Sa(t,n){var e=[],r=[];return t=a.transform(t),n=a.transform(n),function(t,n,e,r){if(t[0]!==n[0]||t[1]!==n[1]){var o=e.push("translate(",null,",",null,")");r.push({i:o-4,x:ta(t[0],n[0])},{i:o-2,x:ta(t[1],n[1])})}else(n[0]||n[1])&&e.push("translate("+n+")")}(t.translate,n.translate,e,r),function(t,n,e,r){t!==n?(t-n>180?n+=360:n-t>180&&(t+=360),r.push({i:e.push(ka(e)+"rotate(",null,")")-2,x:ta(t,n)})):n&&e.push(ka(e)+"rotate("+n+")")}(t.rotate,n.rotate,e,r),function(t,n,e,r){t!==n?r.push({i:e.push(ka(e)+"skewX(",null,")")-2,x:ta(t,n)}):n&&e.push(ka(e)+"skewX("+n+")")}(t.skew,n.skew,e,r),function(t,n,e,r){if(t[0]!==n[0]||t[1]!==n[1]){var o=e.push(ka(e)+"scale(",null,",",null,")");r.push({i:o-4,x:ta(t[0],n[0])},{i:o-2,x:ta(t[1],n[1])})}else 1===n[0]&&1===n[1]||e.push(ka(e)+"scale("+n+")")}(t.scale,n.scale,e,r),t=n=null,function(t){for(var n,o=-1,a=r.length;++o0?e=n:(t.c=null,t.t=NaN,t=null,s.end({type:"end",alpha:e=0})):n>0&&(s.start({type:"start",alpha:e=n}),t=En(u.tick)),u):e},u.start=function(){var t,n,e,a=v.length,s=y.length,c=l[0],d=l[1];for(t=0;t=0;)e.push(o[r])}function qa(t,n){for(var e=[t],r=[];null!=(t=e.pop());)if(r.push(t),(a=t.children)&&(o=a.length))for(var o,a,i=-1;++i=0;)i.push(c=l[s]),c.parent=a,c.depth=a.depth+1;e&&(a.value=0),a.children=l}else e&&(a.value=+e.call(r,a,a.depth)||0),delete a.children;return qa(o,(function(n){var r,o;t&&(r=n.children)&&r.sort(t),e&&(o=n.parent)&&(o.value+=n.value)})),u}return r.sort=function(n){return arguments.length?(t=n,r):t},r.children=function(t){return arguments.length?(n=t,r):n},r.value=function(t){return arguments.length?(e=t,r):e},r.revalue=function(t){return e&&(za(t,(function(t){t.children&&(t.value=0)})),qa(t,(function(t){var n;t.children||(t.value=+e.call(r,t,t.depth)||0),(n=t.parent)&&(n.value+=t.value)}))),t},r},a.layout.partition=function(){var t=a.layout.hierarchy(),n=[1,1];function e(e,r){var o=t.call(this,e,r);return function t(n,e,r,o){var a=n.children;if(n.x=e,n.y=n.depth*o,n.dx=r,n.dy=o,a&&(i=a.length)){var i,u,s,l=-1;for(r=n.value?r/n.value:0;++lu&&(u=r),i.push(r)}for(e=0;eo&&(r=e,o=n);return r}function Qa(t){return t.reduce(ti,0)}function ti(t,n){return t+n[1]}function ni(t,n){return ei(t,Math.ceil(Math.log(n.length)/Math.LN2+1))}function ei(t,n){for(var e=-1,r=+t[0],o=(t[1]-r)/n,a=[];++e<=n;)a[e]=o*e+r;return a}function ri(t){return[a.min(t),a.max(t)]}function oi(t,n){return t.value-n.value}function ai(t,n){var e=t._pack_next;t._pack_next=n,n._pack_prev=t,n._pack_next=e,e._pack_prev=n}function ii(t,n){t._pack_next=n,n._pack_prev=t}function ui(t,n){var e=n.x-t.x,r=n.y-t.y,o=t.r+n.r;return.999*o*o>e*e+r*r}function si(t){if((n=t.children)&&(s=n.length)){var n,e,r,o,a,i,u,s,l=1/0,c=-1/0,f=1/0,h=-1/0;if(n.forEach(li),(e=n[0]).x=-e.r,e.y=0,b(e),s>1&&((r=n[1]).x=r.r,r.y=0,b(r),s>2))for(fi(e,r,o=n[2]),b(o),ai(e,o),e._pack_prev=o,ai(o,r),r=e._pack_next,a=3;a0)for(i=-1;++i=f[0]&&s<=f[1]&&((u=l[a.bisect(h,s,1,d)-1]).y+=m,u.push(o[i]));return l}return o.value=function(t){return arguments.length?(n=t,o):n},o.range=function(t){return arguments.length?(e=bn(t),o):e},o.bins=function(t){return arguments.length?(r="number"==typeof t?function(n){return ei(n,t)}:bn(t),o):r},o.frequency=function(n){return arguments.length?(t=!!n,o):t},o},a.layout.pack=function(){var t,n=a.layout.hierarchy().sort(oi),e=0,r=[1,1];function o(o,a){var i=n.call(this,o,a),u=i[0],s=r[0],l=r[1],c=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(u.x=u.y=0,qa(u,(function(t){t.r=+c(t.value)})),qa(u,si),e){var f=e*(t?1:Math.max(2*u.r/s,2*u.r/l))/2;qa(u,(function(t){t.r+=f})),qa(u,si),qa(u,(function(t){t.r-=f}))}return function t(n,e,r,o){var a=n.children;if(n.x=e+=o*n.x,n.y=r+=o*n.y,n.r*=o,a)for(var i=-1,u=a.length;++ip.x&&(p=t),t.depth>d.depth&&(d=t)}));var m=n(h,p)/2-h.x,g=e[0]/(p.x+n(p,h)/2+m),v=e[1]/(d.depth||1);za(c,(function(t){t.x=(t.x+m)*g,t.y=t.depth*v}))}return l}function i(t){var e=t.children,r=t.parent.children,o=t.i?r[t.i-1]:null;if(e.length){!function(t){for(var n,e=0,r=0,o=t.children,a=o.length;--a>=0;)(n=o[a]).z+=e,n.m+=e,e+=n.s+(r+=n.c)}(t);var a=(e[0].z+e[e.length-1].z)/2;o?(t.z=o.z+n(t._,o._),t.m=t.z-a):t.z=a}else o&&(t.z=o.z+n(t._,o._));t.parent.A=function(t,e,r){if(e){for(var o,a=t,i=t,u=e,s=a.parent.children[0],l=a.m,c=i.m,f=u.m,h=s.m;u=di(u),a=pi(a),u&&a;)s=pi(s),(i=di(i)).a=t,(o=u.z+f-a.z-l+n(u._,a._))>0&&(mi(gi(u,t,r),t,o),l+=o,c+=o),f+=u.m,l+=a.m,h+=s.m,c+=i.m;u&&!di(i)&&(i.t=u,i.m+=f-c),a&&!pi(s)&&(s.t=a,s.m+=l-h,r=t)}return r}(t,o,t.parent.A||r[0])}function u(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(t){t.x*=e[0],t.y=t.depth*e[1]}return o.separation=function(t){return arguments.length?(n=t,o):n},o.size=function(t){return arguments.length?(r=null==(e=t)?s:null,o):r?null:e},o.nodeSize=function(t){return arguments.length?(r=null==(e=t)?null:s,o):r?e:null},ja(o,t)},a.layout.cluster=function(){var t=a.layout.hierarchy().sort(null).value(null),n=hi,e=[1,1],r=!1;function o(o,i){var u,s=t.call(this,o,i),l=s[0],c=0;qa(l,(function(t){var e=t.children;e&&e.length?(t.x=function(t){return t.reduce((function(t,n){return t+n.x}),0)/t.length}(e),t.y=function(t){return 1+a.max(t,(function(t){return t.y}))}(e)):(t.x=u?c+=n(t,u):0,t.y=0,u=t)}));var f=function t(n){var e=n.children;return e&&e.length?t(e[0]):n}(l),h=function t(n){var e,r=n.children;return r&&(e=r.length)?t(r[e-1]):n}(l),p=f.x-n(f,h)/2,d=h.x+n(h,f)/2;return qa(l,r?function(t){t.x=(t.x-l.x)*e[0],t.y=(l.y-t.y)*e[1]}:function(t){t.x=(t.x-p)/(d-p)*e[0],t.y=(1-(l.y?t.y/l.y:1))*e[1]}),s}return o.separation=function(t){return arguments.length?(n=t,o):n},o.size=function(t){return arguments.length?(r=null==(e=t),o):r?null:e},o.nodeSize=function(t){return arguments.length?(r=null!=(e=t),o):r?e:null},ja(o,t)},a.layout.treemap=function(){var t,n=a.layout.hierarchy(),e=Math.round,r=[1,1],o=null,i=vi,u=!1,s="squarify",l=.5*(1+Math.sqrt(5));function c(t,n){for(var e,r,o=-1,a=t.length;++o0;)u.push(e=l[o-1]),u.area+=e.area,"squarify"!==s||(r=p(u,m))<=h?(l.pop(),h=r):(u.area-=u.pop().area,d(u,m,a,!1),m=Math.min(a.dx,a.dy),u.length=u.area=0,h=1/0);u.length&&(d(u,m,a,!0),u.length=u.area=0),n.forEach(f)}}function h(t){var n=t.children;if(n&&n.length){var e,r=i(t),o=n.slice(),a=[];for(c(o,r.dx*r.dy/t.value),a.area=0;e=o.pop();)a.push(e),a.area+=e.area,null!=e.z&&(d(a,e.z?r.dx:r.dy,r,!o.length),a.length=a.area=0);n.forEach(h)}}function p(t,n){for(var e,r=t.area,o=0,a=1/0,i=-1,u=t.length;++io&&(o=e));return n*=n,(r*=r)?Math.max(n*o*l/r,r/(n*a*l)):1/0}function d(t,n,r,o){var a,i=-1,u=t.length,s=r.x,l=r.y,c=n?e(t.area/n):0;if(n==r.dx){for((o||c>r.dy)&&(c=r.dy);++ir.dx)&&(c=r.dx);++i1);return t+n*e*Math.sqrt(-2*Math.log(o)/o)}},logNormal:function(){var t=a.random.normal.apply(a,arguments);return function(){return Math.exp(t())}},bates:function(t){var n=a.random.irwinHall(t);return function(){return n()/t}},irwinHall:function(t){return function(){for(var n=0,e=0;e2?Si:Mi,u=o?Ea:Aa;return a=t(n,e,u,r),i=t(e,n,u,oa),s}function s(t){return a(t)}return s.invert=function(t){return i(t)},s.domain=function(t){return arguments.length?(n=t.map(Number),u()):n},s.range=function(t){return arguments.length?(e=t,u()):e},s.rangeRound=function(t){return s.range(t).interpolate(ba)},s.clamp=function(t){return arguments.length?(o=t,u()):o},s.interpolate=function(t){return arguments.length?(r=t,u()):r},s.ticks=function(t){return Ri(n,t)},s.tickFormat=function(t,e){return Pi(n,t,e)},s.nice=function(t){return Ei(n,t),u()},s.copy=function(){return t(n,e,r,o)},u()}([0,1],[0,1],oa,!1)};var Ni={s:1,g:1,p:1,r:1,e:1};function Oi(t){return-Math.floor(Math.log(t)/Math.LN10+.01)}a.scale.log=function(){return function t(n,e,r,o){function i(t){return(r?Math.log(t<0?0:t):-Math.log(t>0?0:-t))/Math.log(e)}function u(t){return r?Math.pow(e,t):-Math.pow(e,-t)}function s(t){return n(i(t))}return s.invert=function(t){return u(n.invert(t))},s.domain=function(t){return arguments.length?(r=t[0]>=0,n.domain((o=t.map(Number)).map(i)),s):o},s.base=function(t){return arguments.length?(e=+t,n.domain(o.map(i)),s):e},s.nice=function(){var t=wi(o.map(i),r?Math:Li);return n.domain(t),o=t.map(u),s},s.ticks=function(){var t=bi(o),n=[],a=t[0],s=t[1],l=Math.floor(i(a)),c=Math.ceil(i(s)),f=e%1?2:e;if(isFinite(c-l)){if(r){for(;l0;h--)n.push(u(l)*h);for(l=0;n[l]s;c--);n=n.slice(l,c)}return n},s.tickFormat=function(t,n){if(!arguments.length)return Ci;arguments.length<2?n=Ci:"function"!=typeof n&&(n=a.format(n));var r=Math.max(1,e*t/s.ticks().length);return function(t){var o=t/u(Math.round(i(t)));return o*e0?r[t-1]:n[0],tf?0:1;if(l=Ot)return s(l,p)+(u?s(u,1-p):"")+"Z";var d,m,g,v,y,b,x,M,w,_,k,S,A=0,E=0,T=[];if((v=(+i.apply(this,arguments)||0)/2)&&(g=r===Bi?Math.sqrt(u*u+l*l):+r.apply(this,arguments),p||(E*=-1),l&&(E=qt(g/l*Math.sin(v))),u&&(A=qt(g/u*Math.sin(v)))),l){y=l*Math.cos(c+E),b=l*Math.sin(c+E),x=l*Math.cos(f-E),M=l*Math.sin(f-E);var R=Math.abs(f-c-2*E)<=Pt?0:1;if(E&&Gi(y,b,x,M)===p^R){var P=(c+f)/2;y=l*Math.cos(P),b=l*Math.sin(P),x=M=null}}else y=b=0;if(u){w=u*Math.cos(f-A),_=u*Math.sin(f-A),k=u*Math.cos(c+A),S=u*Math.sin(c+A);var N=Math.abs(c-f+2*A)<=Pt?0:1;if(A&&Gi(w,_,k,S)===1-p^N){var O=(c+f)/2;w=u*Math.cos(O),_=u*Math.sin(O),k=S=null}}else w=_=0;if(h>Tt&&(d=Math.min(Math.abs(l-u)/2,+e.apply(this,arguments)))>.001){m=u0?0:1}function Wi(t,n,e,r,o){var a=t[0]-n[0],i=t[1]-n[1],u=(o?r:-r)/Math.sqrt(a*a+i*i),s=u*i,l=-u*a,c=t[0]+s,f=t[1]+l,h=n[0]+s,p=n[1]+l,d=(c+h)/2,m=(f+p)/2,g=h-c,v=p-f,y=g*g+v*v,b=e-r,x=c*p-h*f,M=(v<0?-1:1)*Math.sqrt(Math.max(0,b*b*y-x*x)),w=(x*v-g*M)/y,_=(-x*g-v*M)/y,k=(x*v+g*M)/y,S=(-x*g+v*M)/y,A=w-d,E=_-m,T=k-d,R=S-m;return A*A+E*E>T*T+R*R&&(w=k,_=S),[[w-s,_-l],[w*e/b,_*e/b]]}function Zi(t){var n=io,e=uo,r=$e,o=$i,a=o.key,i=.7;function u(a){var u,s=[],l=[],c=-1,f=a.length,h=bn(n),p=bn(e);function d(){s.push("M",o(t(l),i))}for(;++c1&&o.push("H",r[0]),o.join("")},"step-before":Qi,"step-after":tu,basis:ru,"basis-open":function(t){if(t.length<4)return $i(t);for(var n,e=[],r=-1,o=t.length,a=[0],i=[0];++r<3;)n=t[r],a.push(n[0]),i.push(n[1]);for(e.push(ou(uu,a)+","+ou(uu,i)),--r;++r9&&(o=3*n/Math.sqrt(o),i[u]=o*e,i[u+1]=o*r));for(u=-1;++u<=s;)o=(t[Math.min(s,u+1)][0]-t[Math.max(0,u-1)][0])/(6*(1+i[u]*i[u])),a.push([o||0,i[u]*o||0]);return a}(t))}});function $i(t){return t.length>1?t.join("L"):t+"Z"}function Ki(t){return t.join("L")+"Z"}function Qi(t){for(var n=0,e=t.length,r=t[0],o=[r[0],",",r[1]];++n1){u=n[1],a=t[s],s++,r+="C"+(o[0]+i[0])+","+(o[1]+i[1])+","+(a[0]-u[0])+","+(a[1]-u[1])+","+a[0]+","+a[1];for(var l=2;lPt)+",1 "+n}function s(t,n,e,r){return"Q 0,0 "+r}return a.radius=function(t){return arguments.length?(e=bn(t),a):e},a.source=function(n){return arguments.length?(t=bn(n),a):t},a.target=function(t){return arguments.length?(n=bn(t),a):n},a.startAngle=function(t){return arguments.length?(r=bn(t),a):r},a.endAngle=function(t){return arguments.length?(o=bn(t),a):o},a},a.svg.diagonal=function(){var t=Hr,n=Gr,e=pu;function r(r,o){var a=t.call(this,r,o),i=n.call(this,r,o),u=(a.y+i.y)/2,s=[a,{x:a.x,y:u},{x:i.x,y:u},i];return"M"+(s=s.map(e))[0]+"C"+s[1]+" "+s[2]+" "+s[3]}return r.source=function(n){return arguments.length?(t=bn(n),r):t},r.target=function(t){return arguments.length?(n=bn(t),r):n},r.projection=function(t){return arguments.length?(e=t,r):e},r},a.svg.diagonal.radial=function(){var t=a.svg.diagonal(),n=pu,e=t.projection;return t.projection=function(t){return arguments.length?e(du(n=t)):n},t},a.svg.symbol=function(){var t=gu,n=mu;function e(e,r){return(yu.get(t.call(this,e,r))||vu)(n.call(this,e,r))}return e.type=function(n){return arguments.length?(t=bn(n),e):t},e.size=function(t){return arguments.length?(n=bn(t),e):n},e};var yu=a.map({circle:vu,cross:function(t){var n=Math.sqrt(t/5)/2;return"M"+-3*n+","+-n+"H"+-n+"V"+-3*n+"H"+n+"V"+-n+"H"+3*n+"V"+n+"H"+n+"V"+3*n+"H"+-n+"V"+n+"H"+-3*n+"Z"},diamond:function(t){var n=Math.sqrt(t/(2*xu)),e=n*xu;return"M0,"+-n+"L"+e+",0 0,"+n+" "+-e+",0Z"},square:function(t){var n=Math.sqrt(t)/2;return"M"+-n+","+-n+"L"+n+","+-n+" "+n+","+n+" "+-n+","+n+"Z"},"triangle-down":function(t){var n=Math.sqrt(t/bu),e=n*bu/2;return"M0,"+e+"L"+n+","+-e+" "+-n+","+-e+"Z"},"triangle-up":function(t){var n=Math.sqrt(t/bu),e=n*bu/2;return"M0,"+-e+"L"+n+","+e+" "+-n+","+e+"Z"}});a.svg.symbolTypes=yu.keys();var bu=Math.sqrt(3),xu=Math.tan(30*Lt);J.transition=function(t){for(var n,e,r=ku||++Eu,o=Pu(t),a=[],i=Su||{time:Date.now(),ease:da,delay:0,duration:250},u=-1,s=this.length;++u0;)l[--h].call(t,i);if(a>=1)return f.event&&f.event.end.call(t,t.__data__,n),--c.count?delete c[r]:delete t[e],1}f||(a=o.time,i=En((function(t){var n=f.delay;if(i.t=n+a,n<=t)return h(t-n);i.c=h}),0,a),f=c[r]={tween:new S,time:a,timer:i,delay:o.delay,duration:o.duration,ease:o.ease,index:n},o=null,++c.count)}Au.call=J.call,Au.empty=J.empty,Au.node=J.node,Au.size=J.size,a.transition=function(t,n){return t&&t.transition?ku?t.transition(n):t:a.selection().transition(t)},a.transition.prototype=Au,Au.select=function(t){var n,e,r,o=this.id,a=this.namespace,i=[];t=$(t);for(var u=-1,s=this.length;++urect,.s>rect").attr("width",i[1]-i[0])}function m(t){t.select(".extent").attr("y",u[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",u[1]-u[0])}function g(){var f,g,v=this,y=a.select(a.event.target),b=e.of(v,arguments),x=a.select(v),M=y.datum(),w=!/^(n|s)$/.test(M)&&r,_=!/^(e|w)$/.test(M)&&o,k=y.classed("extent"),S=kt(v),A=a.mouse(v),E=a.select(c(v)).on("keydown.brush",P).on("keyup.brush",N);if(a.event.changedTouches?E.on("touchmove.brush",O).on("touchend.brush",L):E.on("mousemove.brush",O).on("mouseup.brush",L),x.interrupt().selectAll("*").interrupt(),k)A[0]=i[0]-A[0],A[1]=u[0]-A[1];else if(M){var T=+/w$/.test(M),R=+/^n/.test(M);g=[i[1-T]-A[0],u[1-R]-A[1]],A[0]=i[T],A[1]=u[R]}else a.event.altKey&&(f=A.slice());function P(){32==a.event.keyCode&&(k||(f=null,A[0]-=i[1],A[1]-=u[1],k=2),B())}function N(){32==a.event.keyCode&&2==k&&(A[0]+=i[1],A[1]+=u[1],k=0,B())}function O(){var t=a.mouse(v),n=!1;g&&(t[0]+=g[0],t[1]+=g[1]),k||(a.event.altKey?(f||(f=[(i[0]+i[1])/2,(u[0]+u[1])/2]),A[0]=i[+(t[0]1?{floor:function(n){for(;u(n=t.floor(n));)n=Xu(n-1);return n},ceil:function(n){for(;u(n=t.ceil(n));)n=Xu(+n+1);return n}}:t))},r.ticks=function(t,n){var e=bi(r.domain()),a=null==t?o(e,10):"number"==typeof t?o(e,t):!t.range&&[{range:t},n];return a&&(t=a[0],n=a[1]),t.range(e[0],Xu(+e[1]+1),n<1?1:n)},r.tickFormat=function(){return e},r.copy=function(){return Iu(t.copy(),n,e)},Ai(r,t)}function Xu(t){return new Date(t)}zu.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Bu:Fu,Bu.parse=function(t){var n=new Date(t);return isNaN(n)?null:n},Bu.toString=Fu.toString,jn.second=Bn((function(t){return new zn(1e3*Math.floor(t/1e3))}),(function(t,n){t.setTime(t.getTime()+1e3*Math.floor(n))}),(function(t){return t.getSeconds()})),jn.seconds=jn.second.range,jn.seconds.utc=jn.second.utc.range,jn.minute=Bn((function(t){return new zn(6e4*Math.floor(t/6e4))}),(function(t,n){t.setTime(t.getTime()+6e4*Math.floor(n))}),(function(t){return t.getMinutes()})),jn.minutes=jn.minute.range,jn.minutes.utc=jn.minute.utc.range,jn.hour=Bn((function(t){var n=t.getTimezoneOffset()/60;return new zn(36e5*(Math.floor(t/36e5-n)+n))}),(function(t,n){t.setTime(t.getTime()+36e5*Math.floor(n))}),(function(t){return t.getHours()})),jn.hours=jn.hour.range,jn.hours.utc=jn.hour.utc.range,jn.month=Bn((function(t){return(t=jn.day(t)).setDate(1),t}),(function(t,n){t.setMonth(t.getMonth()+n)}),(function(t){return t.getMonth()})),jn.months=jn.month.range,jn.months.utc=jn.month.utc.range;var Yu=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Vu=[[jn.second,1],[jn.second,5],[jn.second,15],[jn.second,30],[jn.minute,1],[jn.minute,5],[jn.minute,15],[jn.minute,30],[jn.hour,1],[jn.hour,3],[jn.hour,6],[jn.hour,12],[jn.day,1],[jn.day,2],[jn.week,1],[jn.month,1],[jn.month,3],[jn.year,1]],Hu=zu.multi([[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["%I:%M",function(t){return t.getMinutes()}],["%I %p",function(t){return t.getHours()}],["%a %d",function(t){return t.getDay()&&1!=t.getDate()}],["%b %d",function(t){return 1!=t.getDate()}],["%B",function(t){return t.getMonth()}],["%Y",$e]]),Gu={range:function(t,n,e){return a.range(Math.ceil(t/e)*e,+n,e).map(Xu)},floor:L,ceil:L};Vu.year=jn.year,jn.scale=function(){return Iu(a.scale.linear(),Vu,Hu)};var Wu=Vu.map((function(t){return[t[0].utc,t[1]]})),Zu=qu.multi([[".%L",function(t){return t.getUTCMilliseconds()}],[":%S",function(t){return t.getUTCSeconds()}],["%I:%M",function(t){return t.getUTCMinutes()}],["%I %p",function(t){return t.getUTCHours()}],["%a %d",function(t){return t.getUTCDay()&&1!=t.getUTCDate()}],["%b %d",function(t){return 1!=t.getUTCDate()}],["%B",function(t){return t.getUTCMonth()}],["%Y",$e]]);function Ju(t){return JSON.parse(t.responseText)}function $u(t){var n=s.createRange();return n.selectNode(s.body),n.createContextualFragment(t.responseText)}Wu.year=jn.year.utc,jn.scale.utc=function(){return Iu(a.scale.linear(),Wu,Zu)},a.text=xn((function(t){return t.responseText})),a.json=function(t,n){return Mn(t,"application/json",Ju,n)},a.html=function(t,n){return Mn(t,"text/html",$u,n)},a.xml=xn((function(t){return t.responseXML})),this.d3=a,void 0===(o="function"==typeof(r=a)?r.call(n,e,n,t):r)||(t.exports=o)}()}])},t.exports=o()},function(t,n,e){"use strict";var r=e(29);function o(){}t.exports=function(){function t(t,n,e,o,a,i){if(i!==r){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function n(){return t}t.isRequired=t;var e={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:n,element:t,instanceOf:n,node:t,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n};return e.checkPropTypes=o,e.PropTypes=e,e}},function(t,n,e){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,n,e){"use strict";var r=e(7),o=e(31),a=e(32),i=e(6),u=e(8),s=e(26),l=e(33);function c(t,n){return n=n.split("// __split__"),new o.Program(t,n[0],n[1])}t.exports=function(t,n,e){var f,h,p,d,m,g,v,y,b,x,M,w,_,k,S,A,E,T,R,P,N,O,C,L,U,D,j,z=this,q=null,F=null,B=null,I=null,X=null,Y=null,V=0,H=!1,G=!1;function W(t){p.viewport(0,0,e,e);var o=u.clone(t);o.zoom=1/f,o.translation.x=0,o.translation.y=0;for(var a=r.mat4.create(),i=0;i<3;i++){var s=r.vec3.random(r.vec3.create(),1);r.mat4.rotate(a,a,10*Math.random(),s)}o.rotation=r.mat4.multiply(r.mat4.create(),a,o.rotation),E.bind(),p.clear(p.COLOR_BUFFER_BIT|p.DEPTH_BUFFER_BIT);var l=u.getRect(o),c=r.mat4.create();r.mat4.ortho(c,l.left,l.right,l.bottom,l.top,0,f);var h=r.mat4.create();r.mat4.lookAt(h,[0,0,0],[0,0,-1],[0,1,0]);var d=r.mat4.create();r.mat4.translate(d,d,[0,0,-f/2]),r.mat4.multiply(d,d,o.rotation),N.setUniform("uProjection","Matrix4fv",!1,c),N.setUniform("uView","Matrix4fv",!1,h),N.setUniform("uModel","Matrix4fv",!1,d),N.setUniform("uBottomLeft","2fv",[l.left,l.bottom]),N.setUniform("uTopRight","2fv",[l.right,l.top]),N.setUniform("uAtomScale","1f",2.5*o.atomScale),N.setUniform("uRelativeAtomScale","1f",t.relativeAtomScale),N.setUniform("uRes","1f",e),N.setUniform("uDepth","1f",f),N.setUniform("uMode","1i",0),N.setUniform("uAtomShade","1f",t.atomShade),q.render(),t.bonds&&null!=F&&(O.setUniform("uProjection","Matrix4fv",!1,c),O.setUniform("uView","Matrix4fv",!1,h),O.setUniform("uModel","Matrix4fv",!1,d),O.setUniform("uRotation","Matrix4fv",!1,o.rotation),O.setUniform("uDepth","1f",f),O.setUniform("uBottomLeft","2fv",[l.left,l.bottom]),O.setUniform("uTopRight","2fv",[l.right,l.top]),O.setUniform("uRes","1f",e),O.setUniform("uBondRadius","1f",2.5*u.getBondRadius(t)),O.setUniform("uBondShade","1f",t.bondShade),O.setUniform("uAtomScale","1f",2.5*t.atomScale),O.setUniform("uRelativeAtomScale","1f",t.relativeAtomScale),O.setUniform("uMode","1i",0),F.render()),p.viewport(0,0,n,n);var y=u.getRect(t),x=u.getRect(o),M=r.mat4.invert(r.mat4.create(),a);T.bind(),p.clear(p.COLOR_BUFFER_BIT|p.DEPTH_BUFFER_BIT),C.setUniform("uSceneDepth","1i",g.index),C.setUniform("uSceneNormal","1i",m.index),C.setUniform("uRandRotDepth","1i",v.index),C.setUniform("uAccumulator","1i",b.index),C.setUniform("uSceneBottomLeft","2fv",[y.left,y.bottom]),C.setUniform("uSceneTopRight","2fv",[y.right,y.top]),C.setUniform("uRotBottomLeft","2fv",[x.left,x.bottom]),C.setUniform("uRotTopRight","2fv",[x.right,x.top]),C.setUniform("uRes","1f",n),C.setUniform("uDepth","1f",f),C.setUniform("uRot","Matrix4fv",!1,a),C.setUniform("uInvRot","Matrix4fv",!1,M),C.setUniform("uSampleCount","1i",V),B.render(),b.activate(),b.bind(),p.copyTexImage2D(p.TEXTURE_2D,0,p.RGBA,0,0,n,n,0)}z.getAOProgress=function(){return V/1024},z.initialize=function(){t.width=t.height=n,(p=t.getContext("webgl")).enable(p.DEPTH_TEST),p.enable(p.CULL_FACE),p.clearColor(0,0,0,0),p.clearDepth(1),p.viewport(0,0,n,n),window.gl=p,o.getExtensions(p,["EXT_frag_depth","WEBGL_depth_texture"]),z.createTextures(),N=c(p,l.shaders.atom),O=c(p,l.shaders.bond),j=c(p,l.shaders["textured-quad"]),C=c(p,l.shaders.accumulator),L=c(p,l.shaders.ao),U=c(p,l.shaders.fxaa),D=c(p,l.shaders.dof);var e=[-1,-1,0,1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,1,0],r=o.buildAttribs(p,{aPosition:3});r.aPosition.buffer.set(new Float32Array(e));var a=e.length/9;new o.Renderable(p,j,r,a),B=new o.Renderable(p,C,r,a),I=new o.Renderable(p,L,r,a),Y=new o.Renderable(p,U,r,a),X=new o.Renderable(p,D,r,a),0},z.createTextures=function(){y=new o.Texture(p,0,null,e,e),v=new o.Texture(p,1,null,e,e,{internalFormat:p.DEPTH_COMPONENT,format:p.DEPTH_COMPONENT,type:p.UNSIGNED_SHORT}),E=new o.Framebuffer(p,[y],v),d=new o.Texture(p,2,null,n,n),m=new o.Texture(p,3,null,n,n),g=new o.Texture(p,4,null,n,n,{internalFormat:p.DEPTH_COMPONENT,format:p.DEPTH_COMPONENT,type:p.UNSIGNED_SHORT}),S=new o.Framebuffer(p,[d],g),A=new o.Framebuffer(p,[m],g),b=new o.Texture(p,5,null,n,n),x=new o.Texture(p,6,null,n,n),T=new o.Framebuffer(p,[x]),k=new o.Texture(p,7,null,n,n),P=new o.Framebuffer(p,[k]),M=new o.Texture(p,8,null,n,n),w=new o.Texture(p,9,null,n,n),R=new o.Framebuffer(p,[w]),_=new o.Texture(p,10,null,n,n),new o.Framebuffer(p,[_])},z.setResolution=function(r,o){e=o,n=r,t.width=t.height=n,p.viewport(0,0,n,n),z.createTextures()},z.setSystem=function(t,n){function e(t){for(var n=[],e=0;e<36;e++)n.push.apply(n,t);return n}h=t;for(var r=o.buildAttribs(p,{aImposter:3,aPosition:3,aRadius:1,aColor:3}),u=[],s=[],l=[],c=[],f=0;f0)){r=o.buildAttribs(p,{aImposter:3,aPosA:3,aPosB:3,aRadA:1,aRadB:1,aColA:3,aColB:3}),u=[];var v=[],y=[],b=[],x=[],M=[],w=[];for(f=0;fn.bondThreshold)break;u.push.apply(u,a.position),v.push.apply(v,e([_.posA.x,_.posA.y,_.posA.z])),y.push.apply(y,e([_.posB.x,_.posB.y,_.posB.z])),b.push.apply(b,e([_.radA])),x.push.apply(x,e([_.radB])),M.push.apply(M,e([_.colA.r,_.colA.g,_.colA.b])),w.push.apply(w,e([_.colB.r,_.colB.g,_.colB.b]))}r.aImposter.buffer.set(new Float32Array(u)),r.aPosA.buffer.set(new Float32Array(v)),r.aPosB.buffer.set(new Float32Array(y)),r.aRadA.buffer.set(new Float32Array(b)),r.aRadB.buffer.set(new Float32Array(x)),r.aColA.buffer.set(new Float32Array(M)),r.aColB.buffer.set(new Float32Array(w));g=u.length/9;F=new o.Renderable(p,O,r,g)}},z.reset=function(){V=0,H=!1,G=!1,b.reset(),x.reset()},z.render=function(t){if(void 0!==h&&null!=q){if(f=2*s.getRadius(h),H)if(G)for(var e=0;e1024);e++)W(t),V++;else!function(t){G=!0,p.viewport(0,0,n,n),A.bind(),p.clear(p.COLOR_BUFFER_BIT|p.DEPTH_BUFFER_BIT);var e=u.getRect(t),o=r.mat4.create();r.mat4.ortho(o,e.left,e.right,e.bottom,e.top,0,f);var a=r.mat4.create();r.mat4.lookAt(a,[0,0,0],[0,0,-1],[0,1,0]);var i=r.mat4.create();r.mat4.translate(i,i,[0,0,-f/2]),r.mat4.multiply(i,i,t.rotation),N.setUniform("uProjection","Matrix4fv",!1,o),N.setUniform("uView","Matrix4fv",!1,a),N.setUniform("uModel","Matrix4fv",!1,i),N.setUniform("uBottomLeft","2fv",[e.left,e.bottom]),N.setUniform("uTopRight","2fv",[e.right,e.top]),N.setUniform("uAtomScale","1f",2.5*t.atomScale),N.setUniform("uRelativeAtomScale","1f",t.relativeAtomScale),N.setUniform("uRes","1f",n),N.setUniform("uDepth","1f",f),N.setUniform("uMode","1i",1),N.setUniform("uAtomShade","1f",t.atomShade),q.render(),t.bonds&&null!=F&&(A.bind(),O.setUniform("uProjection","Matrix4fv",!1,o),O.setUniform("uView","Matrix4fv",!1,a),O.setUniform("uModel","Matrix4fv",!1,i),O.setUniform("uRotation","Matrix4fv",!1,t.rotation),O.setUniform("uDepth","1f",f),O.setUniform("uBottomLeft","2fv",[e.left,e.bottom]),O.setUniform("uTopRight","2fv",[e.right,e.top]),O.setUniform("uRes","1f",n),O.setUniform("uBondRadius","1f",2.5*u.getBondRadius(t)),O.setUniform("uBondShade","1f",t.bondShade),O.setUniform("uAtomScale","1f",2.5*t.atomScale),O.setUniform("uRelativeAtomScale","1f",t.relativeAtomScale),O.setUniform("uMode","1i",1),F.render())}(t);else!function(t){H=!0,p.viewport(0,0,n,n),S.bind(),p.clear(p.COLOR_BUFFER_BIT|p.DEPTH_BUFFER_BIT);var e=u.getRect(t),o=r.mat4.create();r.mat4.ortho(o,e.left,e.right,e.bottom,e.top,0,f);var a=r.mat4.create();r.mat4.lookAt(a,[0,0,0],[0,0,-1],[0,1,0]);var i=r.mat4.create();r.mat4.translate(i,i,[0,0,-f/2]),r.mat4.multiply(i,i,t.rotation),N.setUniform("uProjection","Matrix4fv",!1,o),N.setUniform("uView","Matrix4fv",!1,a),N.setUniform("uModel","Matrix4fv",!1,i),N.setUniform("uBottomLeft","2fv",[e.left,e.bottom]),N.setUniform("uTopRight","2fv",[e.right,e.top]),N.setUniform("uAtomScale","1f",2.5*t.atomScale),N.setUniform("uRelativeAtomScale","1f",t.relativeAtomScale),N.setUniform("uRes","1f",n),N.setUniform("uDepth","1f",f),N.setUniform("uMode","1i",0),N.setUniform("uAtomShade","1f",t.atomShade),q.render(),t.bonds&&null!=F&&(S.bind(),O.setUniform("uProjection","Matrix4fv",!1,o),O.setUniform("uView","Matrix4fv",!1,a),O.setUniform("uModel","Matrix4fv",!1,i),O.setUniform("uRotation","Matrix4fv",!1,t.rotation),O.setUniform("uDepth","1f",f),O.setUniform("uBottomLeft","2fv",[e.left,e.bottom]),O.setUniform("uTopRight","2fv",[e.right,e.top]),O.setUniform("uRes","1f",n),O.setUniform("uBondRadius","1f",2.5*u.getBondRadius(t)),O.setUniform("uBondShade","1f",t.bondShade),O.setUniform("uAtomScale","1f",2.5*t.atomScale),O.setUniform("uRelativeAtomScale","1f",t.relativeAtomScale),O.setUniform("uMode","1i",0),F.render())}(t);!function(t){p.viewport(0,0,n,n),t.fxaa>0||t.dofStrength>0?P.bind():p.bindFramebuffer(p.FRAMEBUFFER,null);if(p.clear(p.COLOR_BUFFER_BIT|p.DEPTH_BUFFER_BIT),L.setUniform("uSceneColor","1i",d.index),L.setUniform("uSceneDepth","1i",g.index),L.setUniform("uAccumulatorOut","1i",x.index),L.setUniform("uRes","1f",n),L.setUniform("uAO","1f",2*t.ao),L.setUniform("uBrightness","1f",2*t.brightness),L.setUniform("uOutlineStrength","1f",t.outline),I.render(),t.fxaa>0){t.dofStrength>0?R.bind():p.bindFramebuffer(p.FRAMEBUFFER,null);for(var e=0;e0&&(p.bindFramebuffer(p.FRAMEBUFFER,null),p.clear(p.COLOR_BUFFER_BIT|p.DEPTH_BUFFER_BIT),t.fxaa>0?D.setUniform("uColor","1i",M.index):D.setUniform("uColor","1i",k.index),D.setUniform("uDepth","1i",g.index),D.setUniform("uDOFPosition","1f",t.dofPosition),D.setUniform("uDOFStrength","1f",t.dofStrength),D.setUniform("uRes","1f",n),X.render())}(t)}},z.initialize()}},function(t,n){function e(t){var n=this;n.initialize=function(){n.buffer=t.createBuffer()},n.bind=function(){t.bindBuffer(t.ARRAY_BUFFER,n.buffer)},n.set=function(e){n.bind(),t.bufferData(t.ARRAY_BUFFER,e,t.STATIC_DRAW)},n.initialize()}t.exports.buildAttribs=function(t,n){var r={};for(var o in n)r[o]={buffer:new e(t),size:n[o]};return r},t.exports.getExtensions=function(t,n){for(var e={},r=0;r1){for(var a=[],i=0;i 0.0) {\n float depth = texture2D(uSceneDepth, p).r;\n float r = 1.0/511.0;\n float d0 = abs(texture2D(uSceneDepth, p + vec2(-r, 0)).r - depth);\n float d1 = abs(texture2D(uSceneDepth, p + vec2( r, 0)).r - depth);\n float d2 = abs(texture2D(uSceneDepth, p + vec2( 0, -r)).r - depth);\n float d3 = abs(texture2D(uSceneDepth, p + vec2( 0, r)).r - depth);\n float d = max(d0, d1);\n d = max(d, d2);\n d = max(d, d3);\n sceneColor.rgb *= pow(1.0 - d, uOutlineStrength * 32.0);\n sceneColor.a = max(step(0.003, d), sceneColor.a);\n }\n vec4 dAccum = texture2D(uAccumulatorOut, p);\n float shade = max(0.0, 1.0 - (dAccum.r + dAccum.g + dAccum.b + dAccum.a) * 0.25 * uAO);\n shade = pow(shade, 2.0);\n gl_FragColor = vec4(uBrightness * sceneColor.rgb * shade, sceneColor.a);\n}\n",atom:"#version 100\nprecision highp float;\n\nattribute vec3 aImposter;\nattribute vec3 aPosition;\nattribute float aRadius;\nattribute vec3 aColor;\n\nuniform mat4 uView;\nuniform mat4 uProjection;\nuniform mat4 uModel;\nuniform float uAtomScale;\nuniform float uRelativeAtomScale;\nuniform float uAtomShade;\n\nvarying vec3 vColor;\nvarying vec3 vPosition;\nvarying float vRadius;\n\nvoid main() {\n vRadius = uAtomScale * (1.0 + (aRadius - 1.0) * uRelativeAtomScale);\n gl_Position = uProjection * uView * uModel * vec4(vRadius * aImposter + aPosition, 1.0);\n vColor = mix(aColor, vec3(1,1,1), uAtomShade);\n vPosition = vec3(uModel * vec4(aPosition, 1));\n}\n\n\n// __split__\n\n\n#version 100\n#extension GL_EXT_frag_depth: enable\nprecision highp float;\n\nuniform vec2 uBottomLeft;\nuniform vec2 uTopRight;\nuniform float uRes;\nuniform float uDepth;\nuniform int uMode;\n\nvarying vec3 vPosition;\nvarying float vRadius;\nvarying vec3 vColor;\n\nvec2 res = vec2(uRes, uRes);\n\nfloat raySphereIntersect(vec3 r0, vec3 rd) {\n float a = dot(rd, rd);\n vec3 s0_r0 = r0 - vPosition;\n float b = 2.0 * dot(rd, s0_r0);\n float c = dot(s0_r0, s0_r0) - (vRadius * vRadius);\n float disc = b*b - 4.0*a*c;\n if (disc <= 0.0) {\n return -1.0;\n }\n return (-b - sqrt(disc))/(2.0*a);\n}\n\nvoid main() {\n vec3 r0 = vec3(uBottomLeft + (gl_FragCoord.xy/res) * (uTopRight - uBottomLeft), 0.0);\n vec3 rd = vec3(0, 0, -1);\n float t = raySphereIntersect(r0, rd);\n if (t < 0.0) {\n discard;\n }\n vec3 coord = r0 + rd * t;\n vec3 normal = normalize(coord - vPosition);\n if (uMode == 0) {\n gl_FragColor = vec4(vColor, 1);\n } else if (uMode == 1) {\n gl_FragColor = vec4(normal * 0.5 + 0.5, 1.0);\n }\n gl_FragDepthEXT = -coord.z/uDepth;\n}\n",blur:"#version 100\nprecision highp float;\n\nattribute vec3 aPosition;\n\nvoid main() {\n gl_Position = vec4(aPosition, 1);\n}\n\n\n// __split__\n\n\n#version 100\nprecision highp float;\n\nuniform sampler2D uTexture;\nuniform float uRes;\nuniform int leftRight;\n\nvoid main() {\n vec2 dir;\n if (leftRight == 1) {\n dir = vec2(1,0)/uRes;\n } else {\n dir = vec2(0,1)/uRes;\n }\n const int range = 16;\n vec4 sample = vec4(0,0,0,0);\n for (int i = -range; i <= range; i++) {\n vec2 p = gl_FragCoord.xy/uRes + dir * float(i);\n sample += texture2D(uTexture, p);\n }\n sample /= float(range) * 2.0 + 1.0;\n gl_FragColor = sample;\n}\n",bond:"#version 100\nprecision highp float;\n\nattribute vec3 aImposter;\nattribute vec3 aPosA;\nattribute vec3 aPosB;\nattribute float aRadA;\nattribute float aRadB;\nattribute vec3 aColA;\nattribute vec3 aColB;\n\nuniform mat4 uView;\nuniform mat4 uProjection;\nuniform mat4 uModel;\nuniform mat4 uRotation;\nuniform float uBondRadius;\nuniform float uAtomScale;\nuniform float uRelativeAtomScale;\n\nvarying vec3 vNormal;\nvarying vec3 vPosA, vPosB;\nvarying float vRadA, vRadB;\nvarying vec3 vColA, vColB;\nvarying float vRadius;\n\nmat3 alignVector(vec3 a, vec3 b) {\n vec3 v = cross(a, b);\n float s = length(v);\n float c = dot(a, b);\n mat3 I = mat3(\n 1, 0, 0,\n 0, 1, 0,\n 0, 0, 1\n );\n mat3 vx = mat3(\n 0, v.z, -v.y,\n -v.z, 0, v.x,\n v.y, -v.x, 0\n );\n return I + vx + vx * vx * ((1.0 - c) / (s * s));\n}\n\nvoid main() {\n vRadius = uBondRadius;\n vec3 pos = vec3(aImposter);\n // Scale the box in x and z to be bond-radius.\n pos = pos * vec3(vRadius, 1, vRadius);\n // Shift the origin-centered cube so that the bottom is at the origin.\n pos = pos + vec3(0, 1, 0);\n // Stretch the box in y so that it is the length of the bond.\n pos = pos * vec3(1, length(aPosA - aPosB) * 0.5, 1);\n // Find the rotation that aligns vec3(0, 1, 0) with vec3(uPosB - uPosA) and apply it.\n vec3 a = normalize(vec3(-0.000001, 1.000001, 0.000001));\n vec3 b = normalize(aPosB - aPosA);\n mat3 R = alignVector(a, b);\n pos = R * pos;\n // Shift the cube so that the bottom is centered at the middle of atom A.\n pos = pos + aPosA;\n\n vec4 position = uModel * vec4(pos, 1);\n gl_Position = uProjection * uView * position;\n vPosA = aPosA;\n vPosB = aPosB;\n vRadA = uAtomScale * (1.0 + (aRadA - 1.0) * uRelativeAtomScale);\n vRadB = uAtomScale * (1.0 + (aRadB - 1.0) * uRelativeAtomScale);\n vColA = aColA;\n vColB = aColB;\n}\n\n\n// __split__\n\n\n#version 100\n#extension GL_EXT_frag_depth: enable\nprecision highp float;\n\nuniform mat4 uRotation;\nuniform vec2 uBottomLeft;\nuniform vec2 uTopRight;\nuniform float uDepth;\nuniform float uRes;\nuniform float uBondShade;\nuniform int uMode;\n\nvarying vec3 vPosA, vPosB;\nvarying float vRadA, vRadB;\nvarying vec3 vColA, vColB;\nvarying float vRadius;\n\nmat3 alignVector(vec3 a, vec3 b) {\n vec3 v = cross(a, b);\n float s = length(v);\n float c = dot(a, b);\n mat3 I = mat3(\n 1, 0, 0,\n 0, 1, 0,\n 0, 0, 1\n );\n mat3 vx = mat3(\n 0, v.z, -v.y,\n -v.z, 0, v.x,\n v.y, -v.x, 0\n );\n return I + vx + vx * vx * ((1.0 - c) / (s * s));\n}\n\nvoid main() {\n\n vec2 res = vec2(uRes, uRes);\n vec3 r0 = vec3(uBottomLeft + (gl_FragCoord.xy/res) * (uTopRight - uBottomLeft), uDepth/2.0);\n vec3 rd = vec3(0, 0, -1);\n\n vec3 i = normalize(vPosB - vPosA);\n i = vec3(uRotation * vec4(i, 0));\n vec3 j = normalize(vec3(-0.000001, 1.000001, 0.000001));\n mat3 R = alignVector(i, j);\n\n vec3 r0p = r0 - vec3(uRotation * vec4(vPosA, 0));\n r0p = R * r0p;\n vec3 rdp = R * rd;\n\n float a = dot(rdp.xz, rdp.xz);\n float b = 2.0 * dot(rdp.xz, r0p.xz);\n float c = dot(r0p.xz, r0p.xz) - vRadius*vRadius;\n float disc = b*b - 4.0*a*c;\n if (disc <= 0.0) {\n discard;\n }\n float t = (-b - sqrt(disc))/(2.0*a);\n if (t < 0.0) {\n discard;\n }\n\n vec3 coord = r0p + rdp * t;\n if (coord.y < 0.0 || coord.y > length(vPosA - vPosB)) {\n discard;\n }\n\n vec3 color;\n if (coord.y < vRadA + 0.5 * (length(vPosA - vPosB) - (vRadA + vRadB))) {\n color = vColA;\n } else {\n color = vColB;\n }\n\n color = mix(color, vec3(1,1,1), uBondShade);\n\n R = alignVector(j, i);\n vec3 normal = normalize(R * vec3(coord.x, 0, coord.z));\n\n coord = r0 + rd * t;\n if (uMode == 0) {\n gl_FragColor = vec4(color, 1);\n } else if (uMode == 1) {\n gl_FragColor = vec4(normal * 0.5 + 0.5, 1.0);\n }\n gl_FragDepthEXT = -(coord.z - uDepth/2.0)/uDepth;\n}\n",dof:"#version 100\nprecision highp float;\n\nattribute vec3 aPosition;\n\nvoid main() {\n gl_Position = vec4(aPosition, 1);\n}\n\n\n// __split__\n\n\n#version 100\nprecision highp float;\n\nuniform sampler2D uColor;\nuniform sampler2D uDepth;\nuniform float uRes;\nuniform float uDOFPosition;\nuniform float uDOFStrength;\nuniform int leftRight;\n\nvoid main() {\n\n vec2 samples[64];\n samples[0] = vec2(0.857612, 0.019885);\n samples[1] = vec2(0.563809, -0.028071);\n samples[2] = vec2(0.825599, -0.346856);\n samples[3] = vec2(0.126584, -0.380959);\n samples[4] = vec2(0.782948, 0.594322);\n samples[5] = vec2(0.292148, -0.543265);\n samples[6] = vec2(0.130700, 0.330220);\n samples[7] = vec2(0.236088, 0.159604);\n samples[8] = vec2(-0.305259, 0.810505);\n samples[9] = vec2(0.269616, 0.923026);\n samples[10] = vec2(0.484486, 0.371845);\n samples[11] = vec2(-0.638057, 0.080447);\n samples[12] = vec2(0.199629, 0.667280);\n samples[13] = vec2(-0.861043, -0.370583);\n samples[14] = vec2(-0.040652, -0.996174);\n samples[15] = vec2(0.330458, -0.282111);\n samples[16] = vec2(0.647795, -0.214354);\n samples[17] = vec2(0.030422, -0.189908);\n samples[18] = vec2(0.177430, -0.721124);\n samples[19] = vec2(-0.461163, -0.327434);\n samples[20] = vec2(-0.410012, -0.734504);\n samples[21] = vec2(-0.616334, -0.626069);\n samples[22] = vec2(0.590759, -0.726479);\n samples[23] = vec2(-0.590794, 0.805365);\n samples[24] = vec2(-0.924561, -0.163739);\n samples[25] = vec2(-0.323028, 0.526960);\n samples[26] = vec2(0.642128, 0.752577);\n samples[27] = vec2(0.173625, -0.952386);\n samples[28] = vec2(0.759014, 0.330311);\n samples[29] = vec2(-0.360526, -0.032013);\n samples[30] = vec2(-0.035320, 0.968156);\n samples[31] = vec2(0.585478, -0.431068);\n samples[32] = vec2(-0.244766, -0.906947);\n samples[33] = vec2(-0.853096, 0.184615);\n samples[34] = vec2(-0.089061, 0.104648);\n samples[35] = vec2(-0.437613, 0.285308);\n samples[36] = vec2(-0.654098, 0.379841);\n samples[37] = vec2(-0.128663, 0.456572);\n samples[38] = vec2(0.015980, -0.568170);\n samples[39] = vec2(-0.043966, -0.771940);\n samples[40] = vec2(0.346512, -0.071238);\n samples[41] = vec2(-0.207921, -0.209121);\n samples[42] = vec2(-0.624075, -0.189224);\n samples[43] = vec2(-0.120618, 0.689339);\n samples[44] = vec2(-0.664679, -0.410200);\n samples[45] = vec2(0.371945, -0.880573);\n samples[46] = vec2(-0.743251, 0.629998);\n samples[47] = vec2(-0.191926, -0.413946);\n samples[48] = vec2(0.449574, 0.833373);\n samples[49] = vec2(0.299587, 0.449113);\n samples[50] = vec2(-0.900432, 0.399319);\n samples[51] = vec2(0.762613, -0.544796);\n samples[52] = vec2(0.606462, 0.174233);\n samples[53] = vec2(0.962185, -0.167019);\n samples[54] = vec2(0.960990, 0.249552);\n samples[55] = vec2(0.570397, 0.559146);\n samples[56] = vec2(-0.537514, 0.555019);\n samples[57] = vec2(0.108491, -0.003232);\n samples[58] = vec2(-0.237693, -0.615428);\n samples[59] = vec2(-0.217313, 0.261084);\n samples[60] = vec2(-0.998966, 0.025692);\n samples[61] = vec2(-0.418554, -0.527508);\n samples[62] = vec2(-0.822629, -0.567797);\n samples[63] = vec2(0.061945, 0.522105);\n\n float invRes = 1.0/uRes;\n vec2 coord = gl_FragCoord.xy * invRes;\n\n float strength = uDOFStrength * uRes/768.0;\n\n float depth = texture2D(uDepth, coord).r;\n float range = uDOFPosition - depth;\n float scale = abs(range);\n\n vec4 sample = texture2D(uColor, coord);\n float count = 1.0;\n for(int i = 0; i < 64; i++) {\n vec2 p = samples[i];\n p = coord + scale * 64.0 * strength * p * invRes;\n float d = texture2D(uDepth, p).r;\n float r = uDOFPosition - d;\n float s = abs(r);\n sample += texture2D(uColor, p) * s;\n count += s;\n }\n\n gl_FragColor = sample/count;\n}",fxaa:"#version 100\nprecision highp float;\n\nattribute vec3 aPosition;\n\nvoid main() {\n gl_Position = vec4(aPosition, 1);\n}\n\n\n// __split__\n\n\n#version 100\nprecision highp float;\n\nuniform sampler2D uTexture;\nuniform float uRes;\n\nvoid main() {\n float FXAA_SPAN_MAX = 8.0;\n float FXAA_REDUCE_MUL = 1.0/8.0;\n float FXAA_REDUCE_MIN = 1.0/128.0;\n\n vec2 texCoords = gl_FragCoord.xy/uRes;\n\n vec4 rgbNW = texture2D(uTexture, texCoords + (vec2(-1.0, -1.0) / uRes));\n vec4 rgbNE = texture2D(uTexture, texCoords + (vec2(1.0, -1.0) / uRes));\n vec4 rgbSW = texture2D(uTexture, texCoords + (vec2(-1.0, 1.0) / uRes));\n vec4 rgbSE = texture2D(uTexture, texCoords + (vec2(1.0, 1.0) / uRes));\n vec4 rgbM = texture2D(uTexture, texCoords);\n\n vec4 luma = vec4(0.299, 0.587, 0.114, 1.0);\n float lumaNW = dot(rgbNW, luma);\n float lumaNE = dot(rgbNE, luma);\n float lumaSW = dot(rgbSW, luma);\n float lumaSE = dot(rgbSE, luma);\n float lumaM = dot(rgbM, luma);\n\n float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE)));\n float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE)));\n\n vec2 dir;\n dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));\n dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE));\n\n float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) * (0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN);\n\n float rcpDirMin = 1.0/(min(abs(dir.x), abs(dir.y)) + dirReduce);\n\n dir = min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX), max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX), dir * rcpDirMin)) / uRes;\n\n vec4 rgbA = (1.0/2.0) * \n (texture2D(uTexture, texCoords.xy + dir * (1.0/3.0 - 0.5)) + \n texture2D(uTexture, texCoords.xy + dir * (2.0/3.0 - 0.5)));\n vec4 rgbB = rgbA * (1.0/2.0) + (1.0/4.0) * \n (texture2D(uTexture, texCoords.xy + dir * (0.0/3.0 - 0.5)) +\n texture2D(uTexture, texCoords.xy + dir * (3.0/3.0 - 0.5)));\n float lumaB = dot(rgbB, luma);\n\n if((lumaB < lumaMin) || (lumaB > lumaMax)){\n gl_FragColor = rgbA;\n } else {\n gl_FragColor = rgbB;\n }\n\n}","textured-quad":"#version 100\nprecision highp float;\n\nattribute vec3 aPosition;\n\nvoid main() {\n gl_Position = vec4(aPosition, 1);\n}\n\n\n// __split__\n\n\n#version 100\nprecision highp float;\n\nuniform sampler2D uTexture;\nuniform float uRes;\n\nvoid main() {\n gl_FragColor = texture2D(uTexture, gl_FragCoord.xy/uRes);\n}\n"};t.exports={shaders:r}},function(t,n,e){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=e(8);t.exports=function(t){if(arguments.length>1)throw"Error: The Speck Interactions module has changed!";if(0===arguments.length||"object"!==r(t))throw"Error: Arguments not provided to interactions";var n=void 0===t.scrollZoom||t.scrollZoom,e=t.container,a=t.getRotation,i=t.setRotation,u=t.getTranslation,s=t.setTranslation,l=t.getZoom,c=t.setZoom,f=t.refreshView,h={buttonDown:!1,shiftDown:!1,lastX:0,lastY:0};function p(t){0===t.button&&(h={buttonDown:!0,shiftDown:h.shiftDown,lastX:t.clientX,lastY:t.clientY})}function d(t){if(0===t.button){if(!h.buttonDown)return;h.buttonDown=!1}}function m(t){h.shiftDown=t.shiftKey}function g(t){if(h.buttonDown&&0!==t.buttons){t.preventDefault();var n=t.clientX-h.lastX,e=t.clientY-h.lastY;if(0!==n||0!==e){if(h.lastX=t.clientX,h.lastY=t.clientY,h.shiftDown){var r=u(),c=.001/l();s({x:r.x-n*c,y:r.y+e*c})}else{var p={rotation:new Float32Array(a())};o.rotate(p,n,e),i(p.rotation)}f()}}}function v(t){t.preventDefault(),c(l()*(t.deltaY<0?1/.9:.9)),f()}function y(){e.removeEventListener("mousedown",p),window.removeEventListener("mouseup",d),window.removeEventListener("keydown",m),window.removeEventListener("keyup",m),window.removeEventListener("mousemove",g),e.removeEventListener("wheel",v)}return e.addEventListener("mousedown",p),window.addEventListener("mouseup",d),window.addEventListener("keydown",m),window.addEventListener("keyup",m),window.addEventListener("mousemove",g),n&&e.addEventListener("wheel",v),y}},function(t,n){t.exports={default:{atomScale:.6,relativeAtomScale:1,bondScale:.5,ao:.75,aoRes:256,brightness:.5,outline:0,spf:32,bonds:!1,bondThreshold:1.2,bondShade:.5,atomShade:.5,dofStrength:0,dofPosition:.5,fxaa:1},stickball:{atomScale:.24,relativeAtomScale:.64,bondScale:.5,bonds:!0,bondThreshold:1.2},toon:{ao:0,spf:0,brightness:.5,outline:1},licorice:{atomScale:.1,relativeAtomScale:0,bondScale:1,bonds:!0,bondThreshold:1.2}}},function(t,n,e){"use strict";e.r(n);var r=e(12),o=e(13),a=e(1),i=e.n(a),u=e(0),s=e.n(u),l=e(27),c=e(50);function f(t){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function h(t,n){for(var e=0;e=0;){if(e[p]===t)return r[p]===n;p-=1}switch(h){case"Map":return t.size===n.size&&c(t.entries(),n.entries(),e.concat([t]),r.concat([n]));case"Set":return t.size===n.size&&c(t.values(),n.values(),e.concat([t]),r.concat([n]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var d=Object(s.a)(t);if(d.length!==Object(s.a)(n).length)return!1;var m=e.concat([t]),g=r.concat([n]);for(p=d.length-1;p>=0;){var v=d[p];if(!Object(i.a)(v,n)||!f(n[v],t[v],m,g))return!1;p-=1}return!0}var h=Object(r.a)((function(t,n){return f(t,n,[],[])}));n.a=h}]); +window.dash_bio=function(t){function n(n){for(var e,o,a=n[0],i=n[1],u=0,s=[];u0&&(o=1/Math.sqrt(o),t[0]=n[0]*o,t[1]=n[1]*o),t},u.dot=function(t,n){return t[0]*n[0]+t[1]*n[1]},u.cross=function(t,n,e){var r=n[0]*e[1]-n[1]*e[0];return t[0]=t[1]=0,t[2]=r,t},u.lerp=function(t,n,e,r){var o=n[0],a=n[1];return t[0]=o+r*(e[0]-o),t[1]=a+r*(e[1]-a),t},u.random=function(t,n){n=n||1;var e=2*r()*Math.PI;return t[0]=Math.cos(e)*n,t[1]=Math.sin(e)*n,t},u.transformMat2=function(t,n,e){var r=n[0],o=n[1];return t[0]=e[0]*r+e[2]*o,t[1]=e[1]*r+e[3]*o,t},u.transformMat2d=function(t,n,e){var r=n[0],o=n[1];return t[0]=e[0]*r+e[2]*o+e[4],t[1]=e[1]*r+e[3]*o+e[5],t},u.transformMat3=function(t,n,e){var r=n[0],o=n[1];return t[0]=e[0]*r+e[3]*o+e[6],t[1]=e[1]*r+e[4]*o+e[7],t},u.transformMat4=function(t,n,e){var r=n[0],o=n[1];return t[0]=e[0]*r+e[4]*o+e[12],t[1]=e[1]*r+e[5]*o+e[13],t},u.forEach=(i=u.create(),function(t,n,e,r,o,a){var u,s;for(n||(n=2),e||(e=0),s=r?Math.min(r*n+e,t.length):t.length,u=e;u0&&(a=1/Math.sqrt(a),t[0]=n[0]*a,t[1]=n[1]*a,t[2]=n[2]*a),t},s.dot=function(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]},s.cross=function(t,n,e){var r=n[0],o=n[1],a=n[2],i=e[0],u=e[1],s=e[2];return t[0]=o*s-a*u,t[1]=a*i-r*s,t[2]=r*u-o*i,t},s.lerp=function(t,n,e,r){var o=n[0],a=n[1],i=n[2];return t[0]=o+r*(e[0]-o),t[1]=a+r*(e[1]-a),t[2]=i+r*(e[2]-i),t},s.random=function(t,n){n=n||1;var e=2*r()*Math.PI,o=2*r()-1,a=Math.sqrt(1-o*o)*n;return t[0]=Math.cos(e)*a,t[1]=Math.sin(e)*a,t[2]=o*n,t},s.transformMat4=function(t,n,e){var r=n[0],o=n[1],a=n[2],i=e[3]*r+e[7]*o+e[11]*a+e[15];return i=i||1,t[0]=(e[0]*r+e[4]*o+e[8]*a+e[12])/i,t[1]=(e[1]*r+e[5]*o+e[9]*a+e[13])/i,t[2]=(e[2]*r+e[6]*o+e[10]*a+e[14])/i,t},s.transformMat3=function(t,n,e){var r=n[0],o=n[1],a=n[2];return t[0]=r*e[0]+o*e[3]+a*e[6],t[1]=r*e[1]+o*e[4]+a*e[7],t[2]=r*e[2]+o*e[5]+a*e[8],t},s.transformQuat=function(t,n,e){var r=n[0],o=n[1],a=n[2],i=e[0],u=e[1],s=e[2],l=e[3],c=l*r+u*a-s*o,f=l*o+s*r-i*a,h=l*a+i*o-u*r,p=-i*r-u*o-s*a;return t[0]=c*l+p*-i+f*-s-h*-u,t[1]=f*l+p*-u+h*-i-c*-s,t[2]=h*l+p*-s+c*-u-f*-i,t},s.rotateX=function(t,n,e,r){var o=[],a=[];return o[0]=n[0]-e[0],o[1]=n[1]-e[1],o[2]=n[2]-e[2],a[0]=o[0],a[1]=o[1]*Math.cos(r)-o[2]*Math.sin(r),a[2]=o[1]*Math.sin(r)+o[2]*Math.cos(r),t[0]=a[0]+e[0],t[1]=a[1]+e[1],t[2]=a[2]+e[2],t},s.rotateY=function(t,n,e,r){var o=[],a=[];return o[0]=n[0]-e[0],o[1]=n[1]-e[1],o[2]=n[2]-e[2],a[0]=o[2]*Math.sin(r)+o[0]*Math.cos(r),a[1]=o[1],a[2]=o[2]*Math.cos(r)-o[0]*Math.sin(r),t[0]=a[0]+e[0],t[1]=a[1]+e[1],t[2]=a[2]+e[2],t},s.rotateZ=function(t,n,e,r){var o=[],a=[];return o[0]=n[0]-e[0],o[1]=n[1]-e[1],o[2]=n[2]-e[2],a[0]=o[0]*Math.cos(r)-o[1]*Math.sin(r),a[1]=o[0]*Math.sin(r)+o[1]*Math.cos(r),a[2]=o[2],t[0]=a[0]+e[0],t[1]=a[1]+e[1],t[2]=a[2]+e[2],t},s.forEach=function(){var t=s.create();return function(n,e,r,o,a,i){var u,s;for(e||(e=3),r||(r=0),s=o?Math.min(o*e+r,n.length):n.length,u=r;u1?0:Math.acos(o)},s.str=function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},void 0!==t&&(t.vec3=s);var l={create:function(){var t=new e(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t},clone:function(t){var n=new e(4);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n},fromValues:function(t,n,r,o){var a=new e(4);return a[0]=t,a[1]=n,a[2]=r,a[3]=o,a},copy:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t},set:function(t,n,e,r,o){return t[0]=n,t[1]=e,t[2]=r,t[3]=o,t},add:function(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t[3]=n[3]+e[3],t},subtract:function(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t[3]=n[3]-e[3],t}};l.sub=l.subtract,l.multiply=function(t,n,e){return t[0]=n[0]*e[0],t[1]=n[1]*e[1],t[2]=n[2]*e[2],t[3]=n[3]*e[3],t},l.mul=l.multiply,l.divide=function(t,n,e){return t[0]=n[0]/e[0],t[1]=n[1]/e[1],t[2]=n[2]/e[2],t[3]=n[3]/e[3],t},l.div=l.divide,l.min=function(t,n,e){return t[0]=Math.min(n[0],e[0]),t[1]=Math.min(n[1],e[1]),t[2]=Math.min(n[2],e[2]),t[3]=Math.min(n[3],e[3]),t},l.max=function(t,n,e){return t[0]=Math.max(n[0],e[0]),t[1]=Math.max(n[1],e[1]),t[2]=Math.max(n[2],e[2]),t[3]=Math.max(n[3],e[3]),t},l.scale=function(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t[3]=n[3]*e,t},l.scaleAndAdd=function(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t[3]=n[3]+e[3]*r,t},l.distance=function(t,n){var e=n[0]-t[0],r=n[1]-t[1],o=n[2]-t[2],a=n[3]-t[3];return Math.sqrt(e*e+r*r+o*o+a*a)},l.dist=l.distance,l.squaredDistance=function(t,n){var e=n[0]-t[0],r=n[1]-t[1],o=n[2]-t[2],a=n[3]-t[3];return e*e+r*r+o*o+a*a},l.sqrDist=l.squaredDistance,l.length=function(t){var n=t[0],e=t[1],r=t[2],o=t[3];return Math.sqrt(n*n+e*e+r*r+o*o)},l.len=l.length,l.squaredLength=function(t){var n=t[0],e=t[1],r=t[2],o=t[3];return n*n+e*e+r*r+o*o},l.sqrLen=l.squaredLength,l.negate=function(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=-n[3],t},l.inverse=function(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t[3]=1/n[3],t},l.normalize=function(t,n){var e=n[0],r=n[1],o=n[2],a=n[3],i=e*e+r*r+o*o+a*a;return i>0&&(i=1/Math.sqrt(i),t[0]=n[0]*i,t[1]=n[1]*i,t[2]=n[2]*i,t[3]=n[3]*i),t},l.dot=function(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]+t[3]*n[3]},l.lerp=function(t,n,e,r){var o=n[0],a=n[1],i=n[2],u=n[3];return t[0]=o+r*(e[0]-o),t[1]=a+r*(e[1]-a),t[2]=i+r*(e[2]-i),t[3]=u+r*(e[3]-u),t},l.random=function(t,n){return n=n||1,t[0]=r(),t[1]=r(),t[2]=r(),t[3]=r(),l.normalize(t,t),l.scale(t,t,n),t},l.transformMat4=function(t,n,e){var r=n[0],o=n[1],a=n[2],i=n[3];return t[0]=e[0]*r+e[4]*o+e[8]*a+e[12]*i,t[1]=e[1]*r+e[5]*o+e[9]*a+e[13]*i,t[2]=e[2]*r+e[6]*o+e[10]*a+e[14]*i,t[3]=e[3]*r+e[7]*o+e[11]*a+e[15]*i,t},l.transformQuat=function(t,n,e){var r=n[0],o=n[1],a=n[2],i=e[0],u=e[1],s=e[2],l=e[3],c=l*r+u*a-s*o,f=l*o+s*r-i*a,h=l*a+i*o-u*r,p=-i*r-u*o-s*a;return t[0]=c*l+p*-i+f*-s-h*-u,t[1]=f*l+p*-u+h*-i-c*-s,t[2]=h*l+p*-s+c*-u-f*-i,t},l.forEach=function(){var t=l.create();return function(n,e,r,o,a,i){var u,s;for(e||(e=4),r||(r=0),s=o?Math.min(o*e+r,n.length):n.length,u=r;u.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):(s.cross(d,n,e),t[0]=d[0],t[1]=d[1],t[2]=d[2],t[3]=1+r,y.normalize(t,t))}),y.setAxes=(v=h.create(),function(t,n,e,r){return v[0]=e[0],v[3]=e[1],v[6]=e[2],v[1]=r[0],v[4]=r[1],v[7]=r[2],v[2]=-n[0],v[5]=-n[1],v[8]=-n[2],y.normalize(t,y.fromMat3(t,v))}),y.clone=l.clone,y.fromValues=l.fromValues,y.copy=l.copy,y.set=l.set,y.identity=function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},y.setAxisAngle=function(t,n,e){e*=.5;var r=Math.sin(e);return t[0]=r*n[0],t[1]=r*n[1],t[2]=r*n[2],t[3]=Math.cos(e),t},y.add=l.add,y.multiply=function(t,n,e){var r=n[0],o=n[1],a=n[2],i=n[3],u=e[0],s=e[1],l=e[2],c=e[3];return t[0]=r*c+i*u+o*l-a*s,t[1]=o*c+i*s+a*u-r*l,t[2]=a*c+i*l+r*s-o*u,t[3]=i*c-r*u-o*s-a*l,t},y.mul=y.multiply,y.scale=l.scale,y.rotateX=function(t,n,e){e*=.5;var r=n[0],o=n[1],a=n[2],i=n[3],u=Math.sin(e),s=Math.cos(e);return t[0]=r*s+i*u,t[1]=o*s+a*u,t[2]=a*s-o*u,t[3]=i*s-r*u,t},y.rotateY=function(t,n,e){e*=.5;var r=n[0],o=n[1],a=n[2],i=n[3],u=Math.sin(e),s=Math.cos(e);return t[0]=r*s-a*u,t[1]=o*s+i*u,t[2]=a*s+r*u,t[3]=i*s-o*u,t},y.rotateZ=function(t,n,e){e*=.5;var r=n[0],o=n[1],a=n[2],i=n[3],u=Math.sin(e),s=Math.cos(e);return t[0]=r*s+o*u,t[1]=o*s-r*u,t[2]=a*s+i*u,t[3]=i*s-a*u,t},y.calculateW=function(t,n){var e=n[0],r=n[1],o=n[2];return t[0]=e,t[1]=r,t[2]=o,t[3]=Math.sqrt(Math.abs(1-e*e-r*r-o*o)),t},y.dot=l.dot,y.lerp=l.lerp,y.slerp=function(t,n,e,r){var o,a,i,u,s,l=n[0],c=n[1],f=n[2],h=n[3],p=e[0],d=e[1],m=e[2],g=e[3];return(a=l*p+c*d+f*m+h*g)<0&&(a=-a,p=-p,d=-d,m=-m,g=-g),1-a>1e-6?(o=Math.acos(a),i=Math.sin(o),u=Math.sin((1-r)*o)/i,s=Math.sin(r*o)/i):(u=1-r,s=r),t[0]=u*l+s*p,t[1]=u*c+s*d,t[2]=u*f+s*m,t[3]=u*h+s*g,t},y.invert=function(t,n){var e=n[0],r=n[1],o=n[2],a=n[3],i=e*e+r*r+o*o+a*a,u=i?1/i:0;return t[0]=-e*u,t[1]=-r*u,t[2]=-o*u,t[3]=a*u,t},y.conjugate=function(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=n[3],t},y.length=l.length,y.len=y.length,y.squaredLength=l.squaredLength,y.sqrLen=y.squaredLength,y.normalize=l.normalize,y.fromMat3=function(t,n){var e,r=n[0]+n[4]+n[8];if(r>0)e=Math.sqrt(r+1),t[3]=.5*e,e=.5/e,t[0]=(n[5]-n[7])*e,t[1]=(n[6]-n[2])*e,t[2]=(n[1]-n[3])*e;else{var o=0;n[4]>n[0]&&(o=1),n[8]>n[3*o+o]&&(o=2);var a=(o+1)%3,i=(o+2)%3;e=Math.sqrt(n[3*o+o]-n[3*a+a]-n[3*i+i]+1),t[o]=.5*e,e=.5/e,t[3]=(n[3*a+i]-n[3*i+a])*e,t[a]=(n[3*a+o]+n[3*o+a])*e,t[i]=(n[3*i+o]+n[3*o+i])*e}return t},y.str=function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},void 0!==t&&(t.quat=y)}(e.exports)}()},function(t,n,e){"use strict";var r=e(7),o=e(6),a=e(25);function i(t,n,e){return Math.min(n,Math.max(t,e))}t.exports.new=function(){return{aspect:1,zoom:.125,translation:{x:0,y:0},atomScale:.6,relativeAtomScale:1,bondScale:.5,rotation:r.mat4.create(),ao:.75,aoRes:256,brightness:.5,outline:0,spf:32,bonds:!1,bondThreshold:1.2,bondShade:.5,atomShade:.5,resolution:768,dofStrength:0,dofPosition:.5,fxaa:1}},t.exports.center=function(t,n){for(var e=-1/0,a=1/0,i=-1/0,u=1/0,s=0;s=0;)n=s[e],Object(o.a)(n,t)&&!c(r,n)&&(r[r.length]=n),e-=1;return r})):Object(r.a)((function(t){return Object(t)!==t?[]:Object.keys(t)}));n.a=f},function(t,n,e){"use strict";var r=e(3),o=Object(r.a)((function(t){return null===t?"Null":void 0===t?"Undefined":Object.prototype.toString.call(t).slice(8,-1)}));n.a=o},function(t,n,e){"use strict";e.d(n,"a",(function(){return a}));var r=e(3),o=e(4);function a(t){return function n(e,a){switch(arguments.length){case 0:return n;case 1:return Object(o.a)(e)?n:Object(r.a)((function(n){return t(e,n)}));default:return Object(o.a)(e)&&Object(o.a)(a)?n:Object(o.a)(e)?Object(r.a)((function(n){return t(n,a)})):Object(o.a)(a)?Object(r.a)((function(n){return t(e,n)})):t(e,a)}}}},function(t,n,e){"use strict";e.d(n,"a",(function(){return m})),e.d(n,"c",(function(){return g})),e.d(n,"b",(function(){return v}));var r=e(0),o=e.n(r),a=e(1),i=e.n(a),u=e(2);function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function c(t,n){for(var e=0;en&&(n=u,t.farAtom=r)}return t.farAtom});t.exports.getRadius=function(t){var n=u(t),e=a.MAX_ATOM_RADIUS,r=2.5*Math.sqrt(e*e+e*e+e*e);return Math.sqrt(n.x*n.x+n.y*n.y+n.z*n.z)+r}},function(t,n,e){var o;o=function(){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}return e.m=t,e.c=n,e.p="",e(0)}([function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.rnaPlot=n.RNAGraph=void 0;var o=e(1);Object.defineProperty(n,"RNAGraph",{enumerable:!0,get:function(){return o.RNAGraph}});var a=e(3);Object.defineProperty(n,"rnaPlot",{enumerable:!0,get:function(){return a.rnaPlot}}),n.FornaContainer=function(t,n){var e=this;if(e.options={displayAllLinks:!1,labelInterval:10,applyForce:!0,chargeDistance:110,friction:.35,middleCharge:-30,otherCharge:-30,linkDistanceMultiplier:15,initialSize:null,layout:"standard-polygonal",allowPanningAndZooming:!0,transitionDuration:500,resizeSvgOnResize:!0},arguments.length>1)for(var a in n)e.options.hasOwnProperty(a)&&(e.options[a]=n[a]);null!==e.options.initialSize?(e.options.svgW=e.options.initialSize[0],e.options.svgH=e.options.initialSize[1]):(e.options.svgW=800,e.options.svgH=800),l.default.scale.category20();var u=null,s=null,p=l.default.scale.linear().domain([0,e.options.svgW]).range([0,e.options.svgW]),d=l.default.scale.linear().domain([0,e.options.svgH]).range([0,e.options.svgH]),m=e.graph={nodes:[],links:[]};function g(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function v(t){var n=t,e=t.prevNode;if(null!==e&&t.linked){var r=[-(n.x-e.x),-(n.y-e.y)],o=[-(r=[r[0]/g(r),r[1]/g(r)])[1],r[0]],a=[t.radius*r[0],t.radius*r[1]],i="M"+(a[0]+6*(r[0]+o[0])/2)+","+(a[1]+6*(r[1]+o[1])/2)+"L"+a[0]+","+a[1]+"L"+(a[0]+6*(r[0]-o[0])/2)+","+(a[1]+6*(r[1]-o[1])/2);l.default.select(this).attr("d",i)}}function y(t){return"basepair"==t.linkType||"backbone"==t.linkType||"pseudoknot"==t.linkType||"label_link"==t.linkType||"external"==t.linkType||"chain_chain"==t.linkType}function b(t,n,e){if(t.hasOwnProperty(n.num)){var r=parseFloat(t[n.num]);return isNaN(r)?t[n.num]:e(r)}return"white"}function x(){}function M(){u&&(mpos=l.default.mouse(A.node()),N.attr("x1",u.x).attr("y1",u.y).attr("x2",mpos[0]).attr("y2",mpos[1]))}function w(){u&&N.attr("class","drag_line_hidden"),O()}e.linkStrengths={pseudoknot:0,proteinChain:0,chainChain:0,intermolecule:10,external:0,other:10},e.displayParameters={displayBackground:"true",displayNumbering:"true",displayNodeOutline:"true",displayNodeLabel:"true",displayLinks:"true",displayPseudoknotLinks:"true",displayProteinLinks:"true"},e.colorScheme="structure",e.customColors={},e.animation=e.options.applyForce,e.deaf=!1,e.rnas={},e.extraLinks=[],Array.prototype.equals=function(t){if(!t)return!1;if(this.length!=t.length)return!1;for(var n=0,e=this.length;n0?l.default.max(e.graph.nodes.map((function(t){return t.x}))):0,o=l.default.min(t.nodes.map((function(t){return t.x}))),t.nodes.forEach((function(t){t.x+=r-o+20,t.px+=r-o}))),t.nodes.forEach((function(n){n.rna=t})),e.rnas[t.uid]=t,e.recalculateGraph(),e.update(),e.centerView(),t},e.transitionRNA=function(t,n){var r=e.options.transitionDuration,o={uids:e.graph.nodes.filter((function(t){return"nucleotide"==t.nodeType})).map((function(t){return t.uid}))},a=e.createInitialLayout(t,o),i=T.selectAll("g.gnode").data(a.nodes,Y);0===(r=e.options.transitionDuration)?i.attr("transform",(function(t){return"translate("+[t.x,t.y]+")"})):i.transition().attr("transform",(function(t){return"translate("+[t.x,t.y]+")"})).duration(r);var u=E.selectAll("line.link").data(a.links.filter(y),X),s=e.createNewNodes(i.enter()).attr("transform",(function(t){return void 0!==t.x&&void 0!==t.y?"translate("+[0,0]+")":""}));0===r?i.exit().remove():i.exit().transition().attr("transform",(function(t){return void 0!==t.x&&void 0!==t.y?"translate("+[0,0]+")":""})),i.select("path").each(v),e.graph.nodes=i.data(),e.updateStyle(),e.centerView(r),u.exit().remove(),0===r?(u.attr("x1",(function(t){return t.source.x})).attr("y1",(function(t){return t.source.y})).attr("x2",(function(t){return t.target.x})).attr("y2",(function(t){return t.target.y})),e.createNewLinks(u.enter()),e.graph.links=u.data(),e.updateStyle()):u.transition().attr("x1",(function(t){return t.source.x})).attr("y1",(function(t){return t.source.y})).attr("x2",(function(t){return t.target.x})).attr("y2",(function(t){return t.target.y})).duration(r).call((function(t,n){0===t.size()&&setTimeout(n,r);var e=0;t.each((function(){++e})).each("end",(function(){--e||n.apply(this,arguments)}))}),(function(){e.createNewLinks(u.enter()),e.graph.links=u.data(),e.updateStyle(),void 0!==n&&n()})),0===r?s.attr("transform",(function(t){return void 0!==t.x&&void 0!==t.y?"translate("+[t.x,t.y]+")":""})):s.transition().attr("transform",(function(t){return void 0!==t.x&&void 0!==t.y?"translate("+[t.x,t.y]+")":""}))},e.recalculateGraph=function(){for(var t in e.graph.nodes=[],e.graph.links=[],e.rnas)e.graph.nodes=e.graph.nodes.concat(e.rnas[t].nodes),e.graph.links=e.graph.links.concat(e.rnas[t].links);for(var n={},r=0;r0?(maxX=l.default.max(e.graph.nodes.map((function(t){return t.x}))),maxY=l.default.max(e.graph.nodes.map((function(t){return t.y})))):(maxX=0,maxY=0),t.nodes.forEach((function(t){t.rna.uid in e.rnas||(e.rnas[t.rna.uid]=t.rna),t.x+=maxX,t.px+=maxX})),r=new o.RNAGraph("",""),r.nodes=t.nodes,r.links=t.links,e.recalculateGraph(),e.update(),e.centerView()},e.addCustomColors=function(t){e.customColors=t},e.addCustomColorsText=function(t){var n=new f.ColorScheme(t);e.customColors=n.colorsJson,e.changeColorScheme("custom")},e.clearNodes=function(){e.graph.nodes=[],e.graph.links=[],e.rnas={},e.extraLinks=[],e.update()},e.toJSON=function(){var t={rnas:e.rnas,extraLinks:e.extraLinks};return JSON.stringify(t,(function(t,n){return"rna"==t?void 0:n}),"\t")},e.fromJSON=function(t){var n,a;try{var i=JSON.parse(t);n=i.rnas,a=i.extraLinks}catch(t){throw t}for(var u in n)"rna"==n[u].type?(r=new o.RNAGraph,r.seq=n[u].seq,r.dotbracket=n[u].dotbracket,r.circular=n[u].circular,r.pairtable=n[u].pairtable,r.uid=n[u].uid,r.structName=n[u].structName,r.nodes=n[u].nodes,r.links=n[u].links,r.rnaLength=n[u].rnaLength,r.elements=n[u].elements,r.nucsToNodes=n[u].nucsToNodes,r.pseudoknotPairs=n[u].pseudoknotPairs):(r=new ProteinGraph,r.size=n[u].size,r.nodes=n[u].nodes,r.uid=n[u].uid),e.addRNAJSON(r,!1);a.forEach((function(t){e.extraLinks.push(t)})),e.recalculateGraph(),e.update()},e.setSize=function(){if(null==e.options.initialSize){var n=l.default.select(t).node().offsetHeight,r=l.default.select(t).node().offsetWidth;e.options.svgW=r,e.options.svgH=n,p.range([0,r]).domain([0,r]),d.range([0,n]).domain([0,n]),e.zoomer.x(p).y(d),e.brusher.x(p).y(d),e.centerView(),e.options.resizeSvgOnResize&&_.attr("width",r).attr("height",n)}},e.setOutlineColor=function(t){T.selectAll("g.gnode").select("[node_type=nucleotide]").style("fill",t)},e.changeColorScheme=function(t){T.selectAll("[node_type=protein]").classed("protein",!0).attr("r",(function(t){return t.radius})),T.selectAll("g.gnode"),T.selectAll("g.gnode").selectAll("circle");var n=T.selectAll("g.gnode").select("[node_type=nucleotide]");if(e.colorScheme=t,"sequence"==t){var r=l.default.scale.ordinal().range(["#dbdb8d","#98df8a","#ff9896","#aec7e8","#aec7e8"]).domain(["A","C","G","U","T"]);n.style("fill",(function(t){return r(t.name)}))}else"structure"==t?(r=l.default.scale.category10().domain(["s","m","i","e","t","h","x"]).range(["lightgreen","#ff9896","#dbdb8d","lightsalmon","lightcyan","lightblue","transparent"]),n.style("fill",(function(t){return r(t.elemType)}))):"positions"==t?n.style("fill",(function(t){return l.default.scale.linear().range(["#98df8a","#dbdb8d","#ff9896"]).interpolate(l.default.interpolateLab).domain([1,1+(t.rna.rnaLength-1)/2,t.rna.rnaLength])(t.num)})):"custom"==t&&(void 0!==e.customColors&&"domain"in e.customColors&&"range"in e.customColors&&(r=l.default.scale.linear().interpolate(l.default.interpolateLab).domain(e.customColors.domain).range(e.customColors.range)),n.style("fill",(function(t){return void 0!==e.customColors&&e.customColors.hasOwnProperty("colorValues")?e.customColors.colorValues.hasOwnProperty(t.structName)&&e.customColors.colorValues[t.structName].hasOwnProperty(t.num)?b(e.customColors.colorValues[t.structName],t,r):e.customColors.colorValues.hasOwnProperty("")?b(e.customColors.colorValues[""],t,r):"white":"white"})))},window.addEventListener("resize",e.setSize,!1),e.zoomer=l.default.behavior.zoom().scaleExtent([.1,10]).x(p).y(d).on("zoomstart",R).on("zoom",P),l.default.select(t).select("svg").remove();var _=l.default.select(t).classed("forna-container",!0).attr("tabindex",1).on("keydown.brush",B).on("keyup.brush",I).each((function(){this.focus()})).append("svg:svg").attr("width",e.options.svgW).attr("height",e.options.svgH).attr("id","plotting-area");e.options.svg=_;var k=_.append("svg:g").on("mousemove",M).on("mousedown",x).on("mouseup",w);e.options.allowPanningAndZooming&&k.call(e.zoomer);var S=k.append("g").datum((function(){return{selected:!1,previouslySelected:!1}})).attr("class","brush"),A=k.append("svg:g"),E=A.append("svg:g"),T=A.append("svg:g");function R(){var t=T.selectAll("g.gnode").selectAll(".outline_node");t.each((function(t){t.selected=!1,t.previouslySelected=!1})),t.classed("selected",!1)}function P(){A.attr("transform","translate("+l.default.event.translate+") scale("+l.default.event.scale+")")}e.brusher=l.default.svg.brush().x(p).y(d).on("brushstart",(function(t){T.selectAll("g.gnode").selectAll(".outline_node").each((function(t){t.previouslySelected=L&&t.selected}))})).on("brush",(function(){var t=T.selectAll("g.gnode").selectAll(".outline_node"),n=l.default.event.target.extent();t.classed("selected",(function(t){return t.selected=e.options.applyForce&&t.previouslySelected^(n[0][0]<=t.x&&t.xr||sa||l-1){if(t.source.rna==t.target.rna){var n=t.source.rna;n.addPseudoknots(),n.pairtable[t.source.num]=0,n.pairtable[t.target.num]=0,V(n)}else extraLinkIndex=e.extraLinks.indexOf(t),e.extraLinks.splice(extraLinkIndex,1);e.recalculateGraph()}e.update()},G=function(t){C&&(t.linkType in{backbone:!0,fake:!0,fake_fake:!0,label_link:!0}||H(t))};e.addLink=function(t){t.source.rna==t.target.rna?(r=t.source.rna,r.pairtable[t.source.num]=t.target.num,r.pairtable[t.target.num]=t.source.num,V(r)):(t.linkType="intermolecule",e.extraLinks.push(t)),e.recalculateGraph(),e.update()};var W=function(t){l.default.event.defaultPrevented||(L||T.selectAll("g.gnode").selectAll(".outline_node").classed("selected",(function(t){return t.selected=e.options.applyForce&&(t.previouslySelected=!1)})),l.default.select(this).select("circle").classed("selected",t.selected=e.options.applyForce&&!t.previouslySelected))},Z=function(t){if(u){if((s=t)==u)return void O();var n={source:u,target:s,linkType:"basepair",value:1,uid:generateUUID()};for(i=0;i0&&"*"==u.dotbracket[u.dotbracket.length-1]&&(u.dotbracket=u.dotbracket.slice(0,u.dotbracket.length-1),u.circular=!0),u.uid=a(),u.elements=[],u.pseudoknotPairs=[],u.nucsToNodes={},u.addUids=function(t){for(var n=u.nodes.filter((function(t){return"nucleotide"==t.nodeType})),e=0;e=0;)n.push(e),t=t.substring(0,e)+"oo"+t.substring(e+1,t.length);return{targetString:t,breaks:n}};var s=u.removeBreaks(u.dotbracket);u.dotbracket=s.targetString,u.dotBracketBreaks=s.breaks,s=u.removeBreaks(u.seq),u.seq=s.targetString,u.seqBreaks=s.breaks,u.calculateStartNumberArray=function(){u.startNumberArray=[];for(var t=0;t=0&&(e=!0);e?u.elements[n][2].map((function(t){0!=t&&(u.nodes[t-1].elemType="e")})):u.elements[n][2].map((function(t){0!=t&&(u.nodes[t-1].elemType=u.elements[n][0])}))}return u},u.getPositions=function(t){for(var n=[],e=u.nodes.filter((function(n){return n.nodeType==t})),r=0;r=4})),e=0;eu.dotbracket.length)){u.links.push({source:u.nodes[t[f]-1],target:u.nodes[u.nodes.length-1],linkType:"fake",value:e,uid:a()}),t.length>4&&u.links.push({source:u.nodes[t[f]-1],target:u.nodes[t[(f+Math.floor(t.length/2))%t.length]-1],linkType:"fake",value:2*e,uid:a()});var h=3.14159*(t.length-2)/t.length,p=2*Math.cos(1.570795-h/2);u.links.push({source:u.nodes[t[f]-1],target:u.nodes[t[(f+2)%t.length]-1],linkType:"fake",value:p});var d=u.nodes[t[f]-1];"x"in d&&(s+=d.x,l+=d.y,c+=1)}return c>0&&(i.x=s/c,i.y=l/c,i.px=i.x,i.py=i.y),u},u.connectFakeNodes=function(){for(var t={},n=u.nodes.filter((function(t){return"middle"==t.nodeType})),e=new Set,r=1;r<=u.nodes.length;r++)t[r]=[];for(r=0;r=0||u.dotBracketBreaks.indexOf(e-2)>=0)&&(i=""),u.nodes.push({name:i,num:e+u.startNumberArray[e-1]-1,radius:5,rna:u,nodeType:"nucleotide",structName:u.structName,elemType:n[e],uid:a(),linked:!1})}for(e=0;e1&&-1===u.dotBracketBreaks.indexOf(e-1)&&-1==u.dotBracketBreaks.indexOf(e-2)&&-1==u.dotBracketBreaks.indexOf(e-3)&&(u.links.push({source:u.nodes[e-2],target:u.nodes[e-1],linkType:"backbone",value:1,uid:a()}),u.nodes[e-1].linked=!0);for(e=0;er)return[];for(;0===t[e];e++)i.push(e);for(;0===t[r];r--)s.push(r);if(e>r){if(i.push(e),0===n)return[["e",n,i.sort(o)]];for(var l=!1,c=[],f=[],h=0;h=0&&(l=!0);return[["h",n,i.sort(o)]]}if(t[e]!=r){var p=i;for(h=e,p.push(h);h<=r;){for(a=a.concat(u.ptToElements(t,n,h,t[h])),p.push(t[h]),h=t[h]+1;0===t[h]&&h<=r;h++)p.push(h);p.push(h)}return p.pop(),(p=p.concat(s)).length>0&&(0===n?a.push(["e",n,p.sort(o)]):a.push(["m",n,p.sort(o)])),a}t[e]===r&&(i.push(e),s.push(r),i.concat(s).length>4&&(0===n?a.push(["e",n,i.concat(s).sort(o)]):a.push(["i",n,i.concat(s).sort(o)])));for(var d=[];t[e]===r&&e0)){eloop=externalLoop[0],nucs=eloop[2].sort(o),prev=nucs[0],hloop=!0,numGreater=0;for(var t=1;t1&&(numGreater+=1),prev=nucs[t];1==numGreater?eloop[0]="h":2==numGreater?eloop[0]="i":eloop[0]="m"}return u},u.reassignLinkUids=function(){for(var t=0;t1&&(u.pseudoknotPairs=u.pseudoknotPairs.concat(r.rnaUtilities.removePseudoknotsFromPairtable(u.pairtable))),u},u.addPseudoknots=function(){for(var t=u.pairtable,n=u.pseudoknotPairs,e=0;e0&&u.recalculateElements()}void 0===String.prototype.trim&&(String.prototype.trim=function(){return String(this).replace(/^\s+|\s+$/g,"")})},function(t,n,e){t.exports=function(t){function n(r){if(e[r])return e[r].exports;var o=e[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}var e={};return n.m=t,n.c=e,n.p="",n(0)}([function(t,n,e){t.exports=e(1)},function(t,n){"use strict";function e(){var t=this;t.bracketLeft="([{abcdefghijklmnopqrstuvwxyz".split(""),t.inverseBrackets=function(t){for(var n={},e=0;e=r;r++){e[r]=new Array(n+1);for(var o=r;n>=o;o++)e[r][o]=0}var a=0;for(r=n-0-1;r>0;r--)for(o=r+0+1;n>=o;o++){a=e[r][o-1];for(var i=o-0-1;i>=r;i--)t[i]===o&&(a=Math.max(a,(i>r?e[r][i-1]:0)+1+(o-i-1>0?e[i+1][o-1]:0)));e[r][o]=a}return a=e[1][n],e},t.backtrackMaximumMatching=function(n,e){var r=Array.apply(null,Array(n.length)).map((function(){return 0}));return t.mmBt(n,r,e,1,n.length-1),r},t.mmBt=function(n,e,r,o,a){var i=n[o][a];if(!(0>a-o-1)){if(n[o][a-1]==i)return void t.mmBt(n,e,r,o,a-1);for(var u=a-0-1;u>=o;u--)if(r[a]===u&&(u>o?n[o][u-1]:0)+(a-u-1>0?n[u+1][a-1]:0)+1==i)return e[u]=a,e[a]=u,u>o&&t.mmBt(n,e,r,o,u-1),void t.mmBt(n,e,r,u+1,a-1);console.log("FAILED!!!"+o+","+a+": backtracking failed!")}},t.dotbracketToPairtable=function(n){var e=Array.apply(null,new Array(n.length+1)).map(Number.prototype.valueOf,0);e[0]=n.length;for(var r={},o=0;o0)throw"Unmatched base at position "+r[c][0];return e},t.insertIntoStack=function(t,n,e){for(var r=0;t[r].length>0&&t[r][t[r].length-1]r?t.bracketLeft[t.insertIntoStack(e,r,n[r])]:t.bracketRight[t.deleteFromStack(e,r)]}return a},t.findUnmatched=function(n,e,r){for(var o=[],a=[],i=e,u=r,s=e;r>=s;s++)0!==n[s]&&(n[s]r)&&a.push([s,n[s]]);for(s=i;u>=s;s++){for(;0===n[s]&&u>=s;)s++;for(r=n[s];n[s]===r;)s++,r--;o=o.concat(t.findUnmatched(n,s,r))}return a.length>0&&o.push(a),o},t.removePseudoknotsFromPairtable=function(n){for(var e=t.maximumMatching(n),r=t.backtrackMaximumMatching(e,n),o=[],a=1;aa)return[];for(;0===n[o];o++)s.push(o);for(;0===n[a];a--)l.push(a);if(o>a){if(s.push(o),0===e)return[["e",e,s.sort(r)]];for(var c=!1,f=[],h=[],p=0;p=0&&(c=!0);return[["h",e,s.sort(r)]]}if(n[o]!=a){var d=s;for(p=o,d.push(p);a>=p;){for(u=u.concat(t.ptToElements(n,e,p,n[p],i)),d.push(n[p]),p=n[p]+1;0===n[p]&&a>=p;p++)d.push(p);d.push(p)}return d.pop(),(d=d.concat(l)).length>0&&(0===e?u.push(["e",e,d.sort(r)]):u.push(["m",e,d.sort(r)])),u}if(n[o]===a){s.push(o),l.push(a);var m=s.concat(l);m.length>4&&(0===e?u.push(["e",e,s.concat(l).sort(r)]):u.push(["i",e,s.concat(l).sort(r)]))}for(var g=[];n[o]===a&&a>o;)g.push(o),g.push(a),o+=1,a-=1,e+=1;return s=[o-1],l=[a+1],u.push(["s",e,g.sort(r)]),u.concat(t.ptToElements(n,e,o,a,i))}}Object.defineProperty(n,"__esModule",{value:!0}),n.arraysEqual=function(t,n){if(t===n)return!0;if(null===t||null===n)return!1;if(t.length!=n.length)return!1;for(var e=0;e=u;u++)e.push(u);else console.log("Malformed range (too many dashes):",t)}return e},n.parseColorText=function(t){for(var e=t.split("\n"),r="",o=1,a={colorValues:{"":{}},range:["white","steelblue"]},i=[],u=0;u"!=e[u][0])for(var s=e[u].trim().split(/[\s]+/),l=0;lt&&(r=t),t>o&&(o=t));for(a in n.colorsJson.colorValues[e])"number"==typeof(t=n.colorsJson.colorValues[e][a])&&(n.colorsJson.colorValues[e][a]=(t-r)/(o-r))}return n},n.parseColorText(n.colorsText),n};var r=function(t,n){return t-n};n.rnaUtilities=new e}])},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.rnaPlot=function(){var t,n,e={width:400,height:400,nucleotideRadius:5,rnaEdgePadding:0,labelInterval:0,showNucleotideLabels:!0,startNucleotideNumber:1,bundleExternalLinks:!1};function a(a){a.each((function(a){var i=new r.RNAGraph(a.sequence,a.structure,a.name).recalculateElements().elementsToJson().addName(a.name);a.rnaGraph=i;for(var u=(new o.NAView).naview_xy_coordinates(i.pairtable),s=[],l=0;l2&&void 0!==arguments[2]?arguments[2]:"",i=d3.extent(r),u=d3.extent(o),s=30;""!=a&&(u[1]+=s),i[0]-=e.nucleotideRadius+e.rnaEdgePadding,u[0]-=e.nucleotideRadius+e.rnaEdgePadding,i[1]+=e.nucleotideRadius+e.rnaEdgePadding,u[1]+=e.nucleotideRadius+e.rnaEdgePadding;var l,c=i[1]-i[0],f=u[1]-u[0],h=c-e.width,p=f-e.height;function d(t,n,e){var r=(t.range()[1]-t.range()[0])/(t.domain()[1]-t.domain()[0]),o=(n[1]-n[0])*r,a=(e[1]-e[0]-o)/2;return{scaleFactor:r,scale:d3.scale.linear().domain(n).range([e[0]+a,e[1]-a])}}return h>p?(l=d(t=d3.scale.linear().domain(i).range([0,e.width]),u,[0,e.height]),n=l.scale):(l=d(n=d3.scale.linear().domain(u).range([0,e.height]),i,[0,e.width]),t=l.scale),t.range()[0],t.domain()[0],n.range()[0],n.domain()[0],"translate("+-(t.domain()[0]*l.scaleFactor-t.range()[0])+","+-(n.domain()[0]*l.scaleFactor-n.range()[0])+")scale("+l.scaleFactor+")"}(i.nodes.map((function(t){return t.x})),i.nodes.map((function(t){return t.y}))),f=d3.select(this).append("g").attr("transform",c),h=i.nodes.filter((function(t){return"nucleotide"==t.nodeType})),p=i.nodes.filter((function(t){return"label"==t.nodeType})),d=i.links;!function(t,n){n=n.filter((function(t){return null!==t.source&&null!==t.target})),t.selectAll(".rna-link").data(n).enter().append("svg:line").attr("x1",(function(t){return t.source.x})).attr("x2",(function(t){return t.target.x})).attr("y1",(function(t){return t.source.y})).attr("y2",(function(t){return t.target.y})).attr("link-type",(function(t){return t.linkType})).attr("extra-link-type",(function(t){return t.extraLinkType})).classed("rna-link",!0)}(f,d),function(t,n){var r=t.selectAll(".rna-base").data(n).enter().append("svg:g").attr("transform",(function(t){return"translate("+t.x+","+t.y+")"}));r.append("svg:circle").attr("r",e.nucleotideRadius).classed("rna-base",!0),e.showNucleotideLabels&&r.append("svg:text").text((function(t){return t.name})).attr("text-anchor","middle").attr("dominant-baseline","central").classed("nucleotide-label",!0).append("svg:title").text((function(t){return t.struct_name+":"+t.num}))}(f,h),function(t,n){t.selectAll(".rnaLabel").data(n).enter().append("svg:g").attr("transform",(function(t){return"translate("+t.x+","+t.y+")"})).append("svg:text").text((function(t){return t.name})).attr("text-anchor","middle").attr("font-weight","bold").attr("dominant-baseline","central").classed("number-label",!0)}(f,p),function(r,o){r.append("svg:text").attr("transform","translate("+t.invert(e.width/2)+","+n.invert(e.height)+")").attr("dy",-10).classed("rna-name",!0).text(o)}(f,a.name),e.bundleExternalLinks&&function(t,n){var e={},r=[];n=n.filter((function(t){return"correct"==t.linkType||"incorrect"==t.linkType||"extra"==t.linkType})),t.selectAll("[link-type=extra]").remove();for(var o=0;oh);if(g=v-2,v>=2&&(i[d+1+g]+=f,i[m-1-g]+=f,i[d]+=f,i[m]+=f,v>2))for(;g>=1;g--)i[d+g]=Math.PI,i[m-g]=Math.PI;s[++c]=v,h<=p&&t(h,p,r)}else n++,w++,k++;for(M=Math.PI*(w-2)/w,S[++_]=e,y=o<0?0:o,b=1;b<=_;b++){for(x=S[b]-y,g=0;g<=x;g++)i[y+g]+=M;if(b>_)break;y=S[++b]}u[++l]=k})(0,e+1,t),u[l]-=2,r=0,o[0]=100,a[0]=100;var h=[];for(h.push([o[0],a[0]]),n=1;n=0&&(1==++n?e=r:e>r&&(e=r));return t.setMark(!1),e+1}s.prototype.naview_xy_coordinates=function(t){var n,e=[],r=[];if(0===t.length||0===t[0])return 0;this.nbase=t[0],this.bases=[];for(var o=0;on&&e++;0==e&&(this.bases[1].setMate(this.nbase),this.bases[this.nbase].setMate(1))},s.prototype.find_regions=function(){var t,n=null,e=null;t=this.nbase+1;var r=[];for(n=0;nthis.nbase&&(n=0)}while(n!=t);return i},s.prototype.find_central_loop=function(){var t=new u.Loop,n=null,e=null,r=null;for(l.bind(this)(),n=0,e=-1,r=0;rn?(e=t.getDepth(),n=t.getNconnection(),this.root=t):t.getDepth()>e&&t.getNconnection()==n&&(e=t.getDepth(),this.root=t)},s.prototype.traverse_loop=function(t,n){var e,r,o,a,i,u,s,l,c,f,h,p,d,m,g,v,y,b,x,M,w,_,k,S,A,E,T,R,P,N,O,C,L,U,D,j,z,q,F,B,I,X,Y,V,H,G,W,Z,J,$,K,Q,tt,nt,et,rt,ot,at,it,ut,st,lt,ct,ft,ht,pt,dt,mt,gt,vt=0;u=2*Math.PI/(this.nbase+1),b=null,N=-1;var yt=0;for(k=0;null!=(v=t.getConnection(yt));yt++,k++)e=-Math.sin(u*v.getStart()),r=Math.cos(u*v.getStart()),o=-Math.sin(u*v.getEnd()),a=Math.cos(u*v.getEnd())-r,i=e-o,s=Math.sqrt(a*a+i*i),v.setXrad(a/s),v.setYrad(i/s),v.setAngle(Math.atan2(i,a)),v.getAngle()<0&&v.setAngle(v.getAngle()+2*Math.PI),null!=n&&n.getRegion()==v.getRegion()&&(b=v,N=k);t:for(;;){this.determine_radius(t,this.lencut),l=t.getRadius()/this.RADIUS_REDUCTION_FACTOR,null==n?c=f=0:(h=(this.bases[b.getStart()].getX()+this.bases[b.getEnd()].getX())/2,p=(this.bases[b.getStart()].getY()+this.bases[b.getEnd()].getY())/2,c=h-l*b.getXrad(),f=p-l*b.getYrad()),T=-1==N?0:N,v=t.getConnection(T),E=0,O=!1;do{if((w=T-1)<0&&(w=t.getNconnection()-1),x=t.getConnection(w),this.connected_connection(x,v)?(T=w,v=x):O=!0,++E>t.getNconnection()){for(A=-1,k=0;k=t.getNconnection()&&(w=0),v=t.getConnection(k),(ht=(y=t.getConnection(w)).getAngle()-v.getAngle())<0&&(ht+=2*Math.PI),ht>A&&(A=ht,vt=k);R=vt,(T=vt+1)>=t.getNconnection()&&(T=0),(v=t.getConnection(R)).setBroken(!0),O=!0}}while(!O);for(C=!1,G=T;!C;){for(E=0,O=!1,R=T,L=!1;!O;)if(v=t.getConnection(R),R==N&&(L=!0),(w=R+1)>=t.getNconnection()&&(w=0),y=t.getConnection(w),this.connected_connection(v,y)){if(++E>=t.getNconnection())break;R=w}else O=!0;for(k=W=Z=P=this.find_ic_middle(T,R,n,b,t),O=!1,$=0;!O;)(k=$<0?W:0==$?P:Z)>=0&&(v=t.getConnection(k),null!=n&&b==v||(0==$?(d=v.getAngle()-Math.asin(.5/l),m=v.getAngle()+Math.asin(.5/l),this.bases[v.getStart()].setX(c+l*Math.cos(d)),this.bases[v.getStart()].setY(f+l*Math.sin(d)),this.bases[v.getEnd()].setX(c+l*Math.cos(m)),this.bases[v.getEnd()].setY(f+l*Math.sin(m))):$<0?((w=k+1)>=t.getNconnection()&&(w=0),v=t.getConnection(k),y=t.getConnection(w),et=v.getXrad(),rt=v.getYrad(),ht=(v.getAngle()+y.getAngle())/2,v.getAngle()>y.getAngle()&&(ht-=Math.PI),it=Math.cos(ht),lt=Math.sin(ht),ct=-it,(S=y.getAngle()-v.getAngle())<0&&(S+=2*Math.PI),ft=v.isExtruded()?S<=Math.PI/2?2:1.5:1,this.bases[v.getEnd()].setX(this.bases[y.getStart()].getX()+ft*lt),this.bases[v.getEnd()].setY(this.bases[y.getStart()].getY()+ft*ct),this.bases[v.getStart()].setX(this.bases[v.getEnd()].getX()+rt),this.bases[v.getStart()].setY(this.bases[v.getEnd()].getY()-et)):((w=k-1)<0&&(w=t.getNconnection()-1),v=t.getConnection(w),ot=(y=t.getConnection(k)).getXrad(),at=y.getYrad(),ht=(v.getAngle()+y.getAngle())/2,v.getAngle()>y.getAngle()&&(ht-=Math.PI),it=Math.cos(ht),lt=-Math.sin(ht),ct=it,(S=y.getAngle()-v.getAngle())<0&&(S+=2*Math.PI),ft=v.isExtruded()?S<=Math.PI/2?2:1.5:1,this.bases[y.getStart()].setX(this.bases[v.getEnd()].getX()+ft*lt),this.bases[y.getStart()].setY(this.bases[v.getEnd()].getY()+ft*ct),this.bases[y.getEnd()].setX(this.bases[y.getStart()].getX()-at),this.bases[y.getEnd()].setY(this.bases[y.getStart()].getY()+ot)))),$<0?(Z==R?Z=-1:Z>=0&&++Z>=t.getNconnection()&&(Z=0),$=1):(W==T?W=-1:W>=0&&--W<0&&(W=t.getNconnection()-1),$=-1),O=-1==W&&-1==Z;if((J=R+1)>=t.getNconnection()&&(J=0),R!=T&&(T!=G||J!=G))if(v=t.getConnection(T),y=t.getConnection(R),Q=this.bases[y.getEnd()].getX()-this.bases[v.getStart()].getX(),tt=this.bases[y.getEnd()].getY()-this.bases[v.getStart()].getY(),D=this.bases[v.getStart()].getX()+Q/2,j=this.bases[v.getStart()].getY()+tt/2,F=Q/(nt=Math.sqrt(Q*Q+tt*tt)),B=tt/nt,I=c-D,X=f-j,z=(Y=(I/=nt=Math.sqrt(Q*Q+tt*tt))*F+(X/=nt)*B)*F-I,q=Y*B-X,z/=nt=Math.sqrt(z*z+q*q),q/=nt,Q=this.bases[v.getStart()].getX()-c,tt=this.bases[v.getStart()].getY()-f,(ht=Math.atan2(tt,Q))<0&&(ht+=2*Math.PI),Q=this.bases[y.getEnd()].getX()-c,tt=this.bases[y.getEnd()].getY()-f,(pt=Math.atan2(tt,Q))<0&&(pt+=2*Math.PI),ptMath.PI?-1:1)*l*z,H=f+U*l*q,L)c-=V-D,f-=H-j;else for(k=T;M=(v=t.getConnection(k)).getStart(),this.bases[M].setX(this.bases[M].getX()+V-D),this.bases[M].setY(this.bases[M].getY()+H-j),M=v.getEnd(),this.bases[M].setX(this.bases[M].getX()+V-D),this.bases[M].setY(this.bases[M].getY()+H-j),k!=R;)++k>=t.getNconnection()&&(k=0);C=(T=J)==G}for(k=0;k=t.getNconnection()&&(w=0),y=t.getConnection(w),Q=this.bases[v.getEnd()].getX()-c,tt=this.bases[v.getEnd()].getY()-f,st=Math.sqrt(Q*Q+tt*tt),(ht=Math.atan2(tt,Q))<0&&(ht+=2*Math.PI),Q=this.bases[y.getStart()].getX()-c,tt=this.bases[y.getStart()].getY()-f,ut=Math.sqrt(Q*Q+tt*tt),(pt=Math.atan2(tt,Q))<0&&(pt+=2*Math.PI),ptMath.PI)if(v.isExtruded())console.log("Warning from traverse_loop. Loop "+t.getNumber()+" has crossed regions\n");else if(y.getStart()-v.getEnd()!=1){v.setExtruded(!0);continue t}if(v.isExtruded())this.construct_extruded_segment(v,y);else for((_=y.getStart()-v.getEnd())<0&&(_+=this.nbase+1),u=K/_,w=1;w<_;w++)(M=v.getEnd()+w)>this.nbase&&(M-=this.nbase+1),nt=st+(ut-st)*((g=ht+w*u)-ht)/K,this.bases[M].setX(c+nt*Math.cos(g)),this.bases[M].setY(f+nt*Math.sin(g))}break}for(k=0;k=t.getNconnection()&&(w=0),v=t.getConnection(k),y=t.getConnection(w),_+=2,dt+=this.bases[v.getStart()].getX()+this.bases[v.getEnd()].getX(),mt+=this.bases[v.getStart()].getY()+this.bases[v.getEnd()].getY(),!v.isExtruded())for(w=v.getEnd()+1;w!=y.getStart();w++)w>this.nbase&&(w-=this.nbase+1),_++,dt+=this.bases[w].getX(),mt+=this.bases[w].getY();t.setX(dt/_),t.setY(mt/_)},s.prototype.determine_radius=function(t,n){var e,r,a,i,u,s,l,c,f,h,p,d=0,m=new o.Connection,g=new o.Connection;do{for(e=1e10,u=0,i=0,c=0;c=t.getNconnection()&&(f=0),g=t.getConnection(f),h=m.getEnd(),(p=g.getStart())1&&(e=l,d=c);(s=i/u)<.7071068&&(s=.7071068),e*s0?s=t.getRadius():t.setRadius(s)},s.prototype.find_ic_middle=function(t,n,e,r,o){var a,i,u,s,l;for(a=0,i=-1,u=t,l=!1;!l;)a++>2*o.getNconnection()&&console.log("Infinite loop in 'find_ic_middle'"),null!=e&&o.getConnection(u)==r&&(i=u),l=u==n,++u>=o.getNconnection()&&(u=0);if(-1==i){for(s=1,u=t;s<(a+1)/2;s++)++u>=o.getNconnection()&&(u=0);i=u}return i},s.prototype.construct_extruded_segment=function(t,n){var e,r,o,a,i,u,s,l,c,f,h,p,d,m,g,v,y,b;if(e=t.getAngle(),(o=r=n.getAngle())=1.5&&h<=Math.PI/2&&((v=d+1)>this.nbase&&(v-=this.nbase+1),(y=m-1)<0&&(y+=this.nbase+1),this.bases[v].setX(this.bases[d].getX()+.5*i),this.bases[v].setY(this.bases[d].getY()+.5*u),this.bases[y].setX(this.bases[m].getX()-.5*i),this.bases[y].setY(this.bases[m].getY()-.5*u),d=v,m=y);do{b=!1,this.construct_circle_segment(d,m),(v=d+1)>this.nbase&&(v-=this.nbase+1),i=this.bases[v].getX()-this.bases[d].getX(),u=this.bases[v].getY()-this.bases[d].getY(),(s=Math.atan2(u,i))<0&&(s+=2*Math.PI),(p=s-e)<0&&(p+=2*Math.PI),p>Math.PI&&(b=!0),(y=m-1)<0&&(y+=this.nbase+1),i=this.bases[y].getX()-this.bases[m].getX(),u=this.bases[y].getY()-this.bases[m].getY(),(l=Math.atan2(u,i))<0&&(l+=2*Math.PI),(p=r-l)<0&&(p+=2*Math.PI),p>Math.PI&&(b=!0),b&&(c=this.minf2(a,e+.5),this.bases[v].setX(this.bases[d].getX()+Math.cos(c)),this.bases[v].setY(this.bases[d].getY()+Math.sin(c)),d=v,c=this.maxf2(a,o-.5),this.bases[y].setX(this.bases[m].getX()+Math.cos(c)),this.bases[y].setY(this.bases[m].getY()+Math.sin(c)),m=y,g-=2)}while(b&&g>1)}},s.prototype.construct_circle_segment=function(t,n){var e,r,o,a,i,u,s,l,c,f,h,p,d,m,g;if(e=this.bases[n].getX()-this.bases[t].getX(),r=this.bases[n].getY()-this.bases[t].getY(),o=Math.sqrt(e*e+r*r),(d=n-t)<0&&(d+=this.nbase+1),o>=d)for(e/=o,r/=o,m=1;mthis.nbase&&(g-=this.nbase+1),this.bases[g].setX(this.bases[t].getX()+e*m/d),this.bases[g].setY(this.bases[t].getY()+r*m/d);else for(this.find_center_for_arc(d-1,o),e/=o,r/=o,a=this.bases[t].getX()+e*o/2,i=this.bases[t].getY()+r*o/2,u=r,s=-e,l=a+this._h*u,c=i+this._h*s,f=this.bases[t].getX()-l,h=this.bases[t].getY()-c,o=Math.sqrt(f*f+h*h),p=Math.atan2(h,f),m=1;mthis.nbase&&(g-=this.nbase+1),this.bases[g].setX(l+o*Math.cos(p+m*this.angleinc)),this.bases[g].setY(c+o*Math.sin(p+m*this.angleinc))},s.prototype.find_center_for_arc=function(t,n){var e,r,o,a,i,u,s,l;o=-(r=(t+1)/Math.PI)-n/(t+1.000001-n),n<1&&(o=0),l=0;do{e=(r+o)/2,i=1-.5/((a=Math.sqrt(e*e+n*n/4))*a),Math.abs(i)>1&&console.log("Unexpected large magnitude discriminant = "+i+" "+a),(s=(u=Math.acos(i))*(t+1)+2*Math.acos(e/a)-2*Math.PI)>0?o=e:r=e}while(Math.abs(s)>1e-4&&++l=this.MAXITER&&(noIterationFailureYet&&(console.log("Iteration failed in find_center_for_arc"),noIterationFailureYet=!1),e=0,u=0),this._h=e,this.angleinc=u},s.prototype.generate_region=function(t){var n,e,r,o,a,i;for(i=t.getRegion(),n=0,t.getStart()==i.getStart1()?(e=i.getStart1(),r=i.getEnd1()):(e=i.getStart2(),r=i.getEnd2()),(this.bases[t.getStart()].getX()>this.ANUM-100||this.bases[t.getEnd()].getX()>this.ANUM-100)&&console.log("Bad region passed to generate_region. Coordinates not defined."),o=e+1;o<=r;o++)n++,this.bases[o].setX(this.bases[t.getStart()].getX()+this.HELIX_FACTOR*n*t.getXrad()),this.bases[o].setY(this.bases[t.getStart()].getY()+this.HELIX_FACTOR*n*t.getYrad()),a=this.bases[o].getMate(),this.bases[a].setX(this.bases[t.getEnd()].getX()+this.HELIX_FACTOR*n*t.getXrad()),this.bases[a].setY(this.bases[t.getEnd()].getY()+this.HELIX_FACTOR*n*t.getYrad())},s.prototype.minf2=function(t,n){return tn?t:n},s.prototype.connected_connection=function(t,n){return!!t.isExtruded()||t.getEnd()+1==n.getStart()}},function(t,n){"use strict";function e(){this.radius=null,this.loopnumber=null,this.next=null,this.prev=null}Object.defineProperty(n,"__esModule",{value:!0}),n.Radloop=e,e.prototype.getRadius=function(){return this.radius},e.prototype.setRadius=function(t){this.radius=t},e.prototype.getLoopnumber=function(){return this.loopnumber},e.prototype.setLoopnumber=function(t){this.loopnumber=t},e.prototype.getNext=function(){return this.next},e.prototype.setNext=function(t){this.next=t},e.prototype.getPrev=function(){return this.prev},e.prototype.setPrev=function(t){this.prev=t}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Connection=a;var r=e(8),o=e(9);function a(){this.loop=new r.Loop,this.region=new o.Region,this.start=null,this.end=null,this.xrad=null,this.yrad=null,this.angle=null,this.extruded=null,this.broken=null,this._isNull=!1}a.prototype.isNull=function(){return this._isNull},a.prototype.setNull=function(t){this._isNull=t},a.prototype.getLoop=function(){return this.loop},a.prototype.setLoop=function(t){this.loop=t},a.prototype.getRegion=function(){return this.region},a.prototype.setRegion=function(t){this.region=t},a.prototype.getStart=function(){return this.start},a.prototype.setStart=function(t){this.start=t},a.prototype.getEnd=function(){return this.end},a.prototype.setEnd=function(t){this.end=t},a.prototype.getXrad=function(){return this.xrad},a.prototype.setXrad=function(t){this.xrad=t},a.prototype.getYrad=function(){return this.yrad},a.prototype.setYrad=function(t){this.yrad=t},a.prototype.getAngle=function(){return this.angle},a.prototype.setAngle=function(t){this.angle=t},a.prototype.isExtruded=function(){return this.extruded},a.prototype.setExtruded=function(t){this.extruded=t},a.prototype.isBroken=function(){return this.broken},a.prototype.setBroken=function(t){this.broken=t}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Loop=o;var r=e(7);function o(){this.nconnection=null,this.connections=[],this._connections=[],this.number=null,this.depth=null,this.mark=null,this.x=null,this.y=null,this.radius=null}o.prototype.getNconnection=function(){return this.nconnection},o.prototype.setNconnection=function(t){this.nconnection=t},o.prototype.setConnection=function(t,n){null!=n?this._connections[t]=n:(this._connections[t]||(this._connections[t]=new r.Connection),this._connections[t].setNull(!0))},o.prototype.getConnection=function(t){var n=e(7);this._connections[t]||(this._connections[t]=new n);var r=this._connections[t];return r.isNull()?null:r},o.prototype.addConnection=function(t,n){this._connections.push(n)},o.prototype.getNumber=function(){return this.number},o.prototype.setNumber=function(t){this.number=t},o.prototype.getDepth=function(){return this.depth},o.prototype.setDepth=function(t){this.depth=t},o.prototype.isMark=function(){return this.mark},o.prototype.setMark=function(t){this.mark=t},o.prototype.getX=function(){return this.x},o.prototype.setX=function(t){this.x=t},o.prototype.getY=function(){return this.y},o.prototype.setY=function(t){this.y=t},o.prototype.getRadius=function(){return this.radius},o.prototype.setRadius=function(t){this.radius=t}},function(t,n){"use strict";function e(){this._start1=null,this._end1=null,this._start2=null,this._end2=null}Object.defineProperty(n,"__esModule",{value:!0}),n.Region=e,e.prototype.getStart1=function(){return this._start1},e.prototype.setStart1=function(t){this._start1=t},e.prototype.getEnd1=function(){return this._end1},e.prototype.setEnd1=function(t){this._end1=t},e.prototype.getStart2=function(){return this._start2},e.prototype.setStart2=function(t){this._start2=t},e.prototype.getEnd2=function(){return this._end2},e.prototype.setEnd2=function(t){this._end2=t}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Base=o;var r=e(9);function o(){this.mate=null,this.x=null,this.y=null,this.extracted=null,this.region=new r.Region}o.prototype.getMate=function(){return this.mate},o.prototype.setMate=function(t){this.mate=t},o.prototype.getX=function(){return this.x},o.prototype.setX=function(t){this.x=t},o.prototype.getY=function(){return this.y},o.prototype.setY=function(t){this.y=t},o.prototype.isExtracted=function(){return this.extracted},o.prototype.setExtracted=function(t){this.extracted=t},o.prototype.getRegion=function(){return this.region},o.prototype.setRegion=function(t){this.region=t}},function(t,n,e){var r=e(12);"string"==typeof r&&(r=[[t.id,r,""]]),e(14)(r,{}),r.locals&&(t.exports=r.locals)},function(t,n,e){(t.exports=e(13)()).push([t.id,'.forna-container .structure-background-rect {\r\n stroke: black;\r\n stroke-width: 5;\r\n fill: transparent;\r\n}\r\n\r\n.forna-container circle.rna-base {\r\n stroke: #ccc;\r\n stroke-width: 1px;\r\n opacity: 1;\r\n fill: white;\r\n}\r\n\r\n.forna-container circle.rna-base.label {\r\n stroke: transparent;\r\n stroke-width: 0;\r\n fill: white;\r\n}\r\n\r\n.forna-container line.link {\r\n stroke: #999;\r\n stroke-opacity: 0.8;\r\n stroke-width: 2;\r\n}\r\n\r\n.forna-container line.rna-link {\r\n stroke: #999;\r\n stroke-opacity: 0.8;\r\n stroke-width: 2;\r\n}\r\n\r\n.forna-container .overlay {\r\n fill: transparent;\r\n}\r\n\r\n.forna-container .rna-name {\r\n text-anchor: middle;\r\n dy: -10;\r\n font-family: Tahoma, Geneva, sans-serif;\r\n font-size: 8pt;\r\n}\r\n\r\n.forna-container line.rna-link[link-type="backbone"] {\r\n stroke: transparent;\r\n}\r\n\r\n.forna-container line.rna-link[link-type="basepair"] {\r\n stroke: transparent;\r\n}\r\n\r\n.forna-container line.rna-link[link-type="fake"] {\r\n stroke: transparent;\r\n}\r\n\r\n.forna-container line.rna-link[link-type="extra"] {\r\n stroke: grey;\r\n}\r\n\r\n.forna-container line.rna-link[extra-link-type="correct"] {\r\n stroke: green;\r\n}\r\n\r\n.forna-container line.rna-link[extra-link-type="incorrect"] {\r\n stroke: green;\r\n}\r\n\r\n\r\n.forna-container path {\r\n stroke-width: 2;\r\n}\r\n\r\n.forna-container path[extra-link-type="correct"] {\r\n stroke: green;\r\n}\r\n\r\n.forna-container path[extra-link-type="incorrect"] {\r\n stroke: red;\r\n}\r\n\r\n\r\n.forna-container line.basepair {\r\n stroke: red;\r\n}\r\n\r\n.forna-container line.intermolecule {\r\n stroke: blue;\r\n}\r\n\r\n.forna-container line.chain_chain {\r\n stroke-dasharray: 3,3;\r\n}\r\n\r\n.forna-container line.fake {\r\n stroke: green;\r\n}\r\n\r\n.forna-container .transparent {\r\n fill: transparent;\r\n stroke-width: 0;\r\n stroke-opacity: 0;\r\n opacity: 0;\r\n}\r\n\r\n.forna-container .d3-tip {\r\n line-height: 1;\r\n font-weight: bold;\r\n padding: 6px;\r\n background: rgba(0, 0, 0, 0.6);\r\n color: #fff;\r\n border-radius: 4px;\r\n pointer-events: none;\r\n}\r\n\r\n.forna-container text.nucleotide-label {\r\n font-size: 5.5pt;\r\n font-weight: bold;\r\n font-family: Tahoma, Geneva, sans-serif;\r\n color: rgb(100,100,100);\r\n pointer-events: none;\r\n}\r\n\r\n.forna-container text.number-label {\r\n font-size: 5.5pt;\r\n font-weight: bold;\r\n font-family: Tahoma, Geneva, sans-serif;\r\n color: rgb(100,100,100);\r\n pointer-events: none;\r\n}\r\n\r\n.forna-container text {\r\n pointer-events: none;\r\n}\r\n\r\n.forna-container g.gnode {\r\n\r\n}\r\n\r\n.forna-container .brush .extent {\r\n fill-opacity: .1;\r\n stroke: #fff;\r\n shape-rendering: crispEdges;\r\n}\r\n\r\n.forna-container .noselect {\r\n -webkit-touch-callout: none;\r\n -webkit-user-select: none;\r\n -khtml-user-select: none;\r\n -moz-user-select: none;\r\n -ms-user-select: none;\r\n user-select: none;\r\n}\r\n',""])},function(t,n){t.exports=function(){var t=[];return t.toString=function(){for(var t=[],n=0;n=0&&l.splice(n,1)}function d(t){var n=document.createElement("style");return n.type="text/css",h(t,n),n}function m(t,n){var e,r,o;if(n.singleton){var a=s++;e=u||(u=d(n)),r=y.bind(null,e,a,!1),o=y.bind(null,e,a,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(e=function(t){var n=document.createElement("link");return n.rel="stylesheet",h(t,n),n}(n),r=x.bind(null,e),o=function(){p(e),e.href&&URL.revokeObjectURL(e.href)}):(e=d(n),r=b.bind(null,e),o=function(){p(e)});return r(t),function(n){if(n){if(n.css===t.css&&n.media===t.media&&n.sourceMap===t.sourceMap)return;r(t=n)}else o()}}t.exports=function(t,n){void 0===(n=n||{}).singleton&&(n.singleton=a()),void 0===n.insertAt&&(n.insertAt="bottom");var e=f(t);return c(e,n),function(t){for(var o=[],a=0;an?1:t>=n?0:NaN}function v(t){return null===t?NaN:+t}function y(t){return!isNaN(t)}function b(t){return{left:function(n,e,r,o){for(arguments.length<3&&(r=0),arguments.length<4&&(o=n.length);r>>1;t(n[a],e)<0?r=a+1:o=a}return r},right:function(n,e,r,o){for(arguments.length<3&&(r=0),arguments.length<4&&(o=n.length);r>>1;t(n[a],e)>0?o=a:r=a+1}return r}}}a.ascending=g,a.descending=function(t,n){return nt?1:n>=t?0:NaN},a.min=function(t,n){var e,r,o=-1,a=t.length;if(1===arguments.length){for(;++o=r){e=r;break}for(;++or&&(e=r)}else{for(;++o=r){e=r;break}for(;++or&&(e=r)}return e},a.max=function(t,n){var e,r,o=-1,a=t.length;if(1===arguments.length){for(;++o=r){e=r;break}for(;++oe&&(e=r)}else{for(;++o=r){e=r;break}for(;++oe&&(e=r)}return e},a.extent=function(t,n){var e,r,o,a=-1,i=t.length;if(1===arguments.length){for(;++a=r){e=o=r;break}for(;++ar&&(e=r),o=r){e=o=r;break}for(;++ar&&(e=r),o1)return i/(s-1)},a.deviation=function(){var t=a.variance.apply(this,arguments);return t?Math.sqrt(t):t};var x=b(g);function M(t){return t.length}a.bisectLeft=x.left,a.bisect=a.bisectRight=x.right,a.bisector=function(t){return b(1===t.length?function(n,e){return g(t(n),e)}:t)},a.shuffle=function(t,n,e){(a=arguments.length)<3&&(e=t.length,a<2&&(n=0));for(var r,o,a=e-n;a;)o=Math.random()*a--|0,r=t[a+n],t[a+n]=t[o+n],t[o+n]=r;return t},a.permute=function(t,n){for(var e=n.length,r=new Array(e);e--;)r[e]=t[n[e]];return r},a.pairs=function(t){for(var n=0,e=t.length-1,r=t[0],o=new Array(e<0?0:e);n=0;)for(n=(r=t[o]).length;--n>=0;)e[--i]=r[n];return e};var w=Math.abs;function _(t){for(var n=1;t*n%1;)n*=10;return n}function k(t,n){for(var e in n)Object.defineProperty(t.prototype,e,{value:n[e],enumerable:!1})}function S(){this._=Object.create(null)}function A(t){return"__proto__"==(t+="")||"\0"===t[0]?"\0"+t:t}function E(t){return"\0"===(t+="")[0]?t.slice(1):t}function T(t){return A(t)in this._}function R(t){return(t=A(t))in this._&&delete this._[t]}function P(){var t=[];for(var n in this._)t.push(E(n));return t}function N(){var t=0;for(var n in this._)++t;return t}function O(){for(var t in this._)return!1;return!0}function C(){this._=Object.create(null)}function L(t){return t}function U(t,n,e){return function(){var r=e.apply(n,arguments);return r===n?t:r}}function D(t,n){if(n in t)return n;n=n.charAt(0).toUpperCase()+n.slice(1);for(var e=0,r=j.length;en;)o.push(r/a);else for(;(r=t+e*++i)=r.length)return n?n.call(e,a):t?a.sort(t):a;for(var s,l,c,f,h=-1,p=a.length,d=r[u++],m=new S;++h=r.length)return n;var a=[],i=o[e++];return n.forEach((function(n,r){a.push({key:n,values:t(r,e)})})),i?a.sort((function(t,n){return i(t.key,n.key)})):a}(i(a.map,t,0),0)},e.key=function(t){return r.push(t),e},e.sortKeys=function(t){return o[r.length-1]=t,e},e.sortValues=function(n){return t=n,e},e.rollup=function(t){return n=t,e},e},a.set=function(t){var n=new C;if(t)for(var e=0,r=t.length;e=0&&(r=t.slice(e+1),t=t.slice(0,e)),t)return arguments.length<2?this[t].on(r):this[t].on(r,n);if(2===arguments.length){if(null==n)for(t in this)this.hasOwnProperty(t)&&this[t].on(r,null);return this}},a.event=null,a.requote=function(t){return t.replace(Y,"\\$&")};var Y=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,V={}.__proto__?function(t,n){t.__proto__=n}:function(t,n){for(var e in n)t[e]=n[e]};function H(t){return V(t,J),t}var G=function(t,n){return n.querySelector(t)},W=function(t,n){return n.querySelectorAll(t)},Z=function(t,n){var e=t.matches||t[D(t,"matchesSelector")];return(Z=function(t,n){return e.call(t,n)})(t,n)};"function"==typeof Sizzle&&(G=function(t,n){return Sizzle(t,n)[0]||null},W=Sizzle,Z=Sizzle.matchesSelector),a.selection=function(){return a.select(s.documentElement)};var J=a.selection.prototype=[];function $(t){return"function"==typeof t?t:function(){return G(t,this)}}function K(t){return"function"==typeof t?t:function(){return W(t,this)}}J.select=function(t){var n,e,r,o,a=[];t=$(t);for(var i=-1,u=this.length;++i=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),tt.hasOwnProperty(e)?{space:tt[e],local:t}:t}},J.attr=function(t,n){if(arguments.length<2){if("string"==typeof t){var e=this.node();return(t=a.ns.qualify(t)).local?e.getAttributeNS(t.space,t.local):e.getAttribute(t)}for(n in t)this.each(nt(n,t[n]));return this}return this.each(nt(t,n))},J.classed=function(t,n){if(arguments.length<2){if("string"==typeof t){var e=this.node(),r=(t=ot(t)).length,o=-1;if(n=e.classList){for(;++o=0;)(e=r[o])&&(a&&a!==e.nextSibling&&a.parentNode.insertBefore(e,a),a=e);return this},J.sort=function(t){t=pt.apply(this,arguments);for(var n=-1,e=this.length;++n=n&&(n=o+1);!(i=u[n])&&++n0&&(t=t.slice(0,o));var s=bt.get(t);function l(){var n=this[r];n&&(this.removeEventListener(t,n,n.$),delete this[r])}return s&&(t=s,i=Mt),o?n?function(){var o=i(n,u(arguments));l.call(this),this.addEventListener(t,this[r]=o,o.$=e),o._=n}:l:n?z:function(){var n,e=new RegExp("^__on([^.]+)"+a.requote(t)+"$");for(var r in this)if(n=r.match(e)){var o=this[r];this.removeEventListener(n[1],o,o.$),delete this[r]}}}a.selection.enter=mt,a.selection.enter.prototype=gt,gt.append=J.append,gt.empty=J.empty,gt.node=J.node,gt.call=J.call,gt.size=J.size,gt.select=function(t){for(var n,e,r,o,a,i=[],u=-1,s=this.length;++u0?1:t<0?-1:0}function jt(t,n,e){return(n[0]-t[0])*(e[1]-t[1])-(n[1]-t[1])*(e[0]-t[0])}function zt(t){return t>1?0:t<-1?Pt:Math.acos(t)}function qt(t){return t>1?Ct:t<-1?-Ct:Math.asin(t)}function Ft(t){return((t=Math.exp(t))+1/t)/2}function Bt(t){return(t=Math.sin(t/2))*t}var It=Math.SQRT2;a.interpolateZoom=function(t,n){var e,r,o=t[0],a=t[1],i=t[2],u=n[0],s=n[1],l=n[2],c=u-o,f=s-a,h=c*c+f*f;if(h0&&(t=t.transition().duration(m)),t.call(w.event)}function E(){u&&u.domain(i.range().map((function(t){return(t-h.x)/h.k})).map(i.invert)),f&&f.domain(l.range().map((function(t){return(t-h.y)/h.k})).map(l.invert))}function T(t){g++||t({type:"zoomstart"})}function R(t){E(),t({type:"zoom",scale:h.k,translate:[h.x,h.y]})}function P(t){--g||(t({type:"zoomend"}),n=null)}function N(){var t=this,n=M.of(t,arguments),e=0,r=a.select(c(t)).on(y,u).on(b,s),o=_(a.mouse(t)),i=kt(t);function u(){e=1,S(a.mouse(t),o),R(n)}function s(){r.on(y,null).on(b,null),i(e),P(n)}Mu.call(t),T(n)}function O(){var t,n=this,e=M.of(n,arguments),r={},i=0,u=".zoom-"+a.event.changedTouches[0].identifier,s="touchmove"+u,l="touchend"+u,c=[],f=a.select(n),p=kt(n);function d(){var e=a.touches(n);return t=h.k,e.forEach((function(t){t.identifier in r&&(r[t.identifier]=_(t))})),e}function m(){var t=a.event.target;a.select(t).on(s,g).on(l,y),c.push(t);for(var e=a.event.changedTouches,u=0,f=e.length;u1){v=p[0];var b=p[1],x=v[0]-b[0],M=v[1]-b[1];i=x*x+M*M}}function g(){var u,s,l,c,f=a.touches(n);Mu.call(n);for(var h=0,p=f.length;h360?t-=360:t<0&&(t+=360),t<60?r+(o-r)*t/60:t<180?o:t<240?r+(o-r)*(240-t)/60:r}(t))}return t=isNaN(t)?0:(t%=360)<0?t+360:t,n=isNaN(n)?0:n<0?0:n>1?1:n,r=2*(e=e<0?0:e>1?1:e)-(o=e<=.5?e*(1+n):e+n-e*n),new sn(a(t+120),a(t),a(t-120))}function Jt(t,n,e){return this instanceof Jt?(this.h=+t,this.c=+n,void(this.l=+e)):arguments.length<2?t instanceof Jt?new Jt(t.h,t.c,t.l):rn(t instanceof Qt?t.l:(t=mn((t=a.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new Jt(t,n,e)}Wt.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),new Gt(this.h,this.s,this.l/t)},Wt.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new Gt(this.h,this.s,t*this.l)},Wt.rgb=function(){return Zt(this.h,this.s,this.l)},a.hcl=Jt;var $t=Jt.prototype=new Ht;function Kt(t,n,e){return isNaN(t)&&(t=0),isNaN(n)&&(n=0),new Qt(e,Math.cos(t*=Lt)*n,Math.sin(t)*n)}function Qt(t,n,e){return this instanceof Qt?(this.l=+t,this.a=+n,void(this.b=+e)):arguments.length<2?t instanceof Qt?new Qt(t.l,t.a,t.b):t instanceof Jt?Kt(t.h,t.c,t.l):mn((t=sn(t)).r,t.g,t.b):new Qt(t,n,e)}$t.brighter=function(t){return new Jt(this.h,this.c,Math.min(100,this.l+tn*(arguments.length?t:1)))},$t.darker=function(t){return new Jt(this.h,this.c,Math.max(0,this.l-tn*(arguments.length?t:1)))},$t.rgb=function(){return Kt(this.h,this.c,this.l).rgb()},a.lab=Qt;var tn=18,nn=Qt.prototype=new Ht;function en(t,n,e){var r=(t+16)/116,o=r+n/500,a=r-e/200;return new sn(un(3.2404542*(o=.95047*on(o))-1.5371385*(r=1*on(r))-.4985314*(a=1.08883*on(a))),un(-.969266*o+1.8760108*r+.041556*a),un(.0556434*o-.2040259*r+1.0572252*a))}function rn(t,n,e){return t>0?new Jt(Math.atan2(e,n)*Ut,Math.sqrt(n*n+e*e),t):new Jt(NaN,NaN,t)}function on(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function an(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function un(t){return Math.round(255*(t<=.00304?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function sn(t,n,e){return this instanceof sn?(this.r=~~t,this.g=~~n,void(this.b=~~e)):arguments.length<2?t instanceof sn?new sn(t.r,t.g,t.b):pn(""+t,sn,Zt):new sn(t,n,e)}function ln(t){return new sn(t>>16,t>>8&255,255&t)}function cn(t){return ln(t)+""}nn.brighter=function(t){return new Qt(Math.min(100,this.l+tn*(arguments.length?t:1)),this.a,this.b)},nn.darker=function(t){return new Qt(Math.max(0,this.l-tn*(arguments.length?t:1)),this.a,this.b)},nn.rgb=function(){return en(this.l,this.a,this.b)},a.rgb=sn;var fn=sn.prototype=new Ht;function hn(t){return t<16?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function pn(t,n,e){var r,o,a,i=0,u=0,s=0;if(r=/([a-z]+)\((.*)\)/.exec(t=t.toLowerCase()))switch(o=r[2].split(","),r[1]){case"hsl":return e(parseFloat(o[0]),parseFloat(o[1])/100,parseFloat(o[2])/100);case"rgb":return n(vn(o[0]),vn(o[1]),vn(o[2]))}return(a=yn.get(t))?n(a.r,a.g,a.b):(null==t||"#"!==t.charAt(0)||isNaN(a=parseInt(t.slice(1),16))||(4===t.length?(i=(3840&a)>>4,i|=i>>4,u=240&a,u|=u>>4,s=15&a,s|=s<<4):7===t.length&&(i=(16711680&a)>>16,u=(65280&a)>>8,s=255&a)),n(i,u,s))}function dn(t,n,e){var r,o,a=Math.min(t/=255,n/=255,e/=255),i=Math.max(t,n,e),u=i-a,s=(i+a)/2;return u?(o=s<.5?u/(i+a):u/(2-i-a),r=t==i?(n-e)/u+(n0&&s<1?0:r),new Gt(r,o,s)}function mn(t,n,e){var r=an((.4124564*(t=gn(t))+.3575761*(n=gn(n))+.1804375*(e=gn(e)))/.95047),o=an((.2126729*t+.7151522*n+.072175*e)/1);return Qt(116*o-16,500*(r-o),200*(o-an((.0193339*t+.119192*n+.9503041*e)/1.08883)))}function gn(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function vn(t){var n=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*n):n}fn.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var n=this.r,e=this.g,r=this.b,o=30;return n||e||r?(n&&n=200&&n<300||304===n){try{t=e.call(o,l)}catch(t){return void i.error.call(o,t)}i.load.call(o,t)}else i.error.call(o,l)}return!this.XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\/\//.test(t)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=f:l.onreadystatechange=function(){l.readyState>3&&f()},l.onprogress=function(t){var n=a.event;a.event=t;try{i.progress.call(o,l)}finally{a.event=n}},o.header=function(t,n){return t=(t+"").toLowerCase(),arguments.length<2?s[t]:(null==n?delete s[t]:s[t]=n+"",o)},o.mimeType=function(t){return arguments.length?(n=null==t?null:t+"",o):n},o.responseType=function(t){return arguments.length?(c=t,o):c},o.response=function(t){return e=t,o},["get","post"].forEach((function(t){o[t]=function(){return o.send.apply(o,[t].concat(u(arguments)))}})),o.send=function(e,r,a){if(2===arguments.length&&"function"==typeof r&&(a=r,r=null),l.open(e,t,!0),null==n||"accept"in s||(s.accept=n+",*/*"),l.setRequestHeader)for(var u in s)l.setRequestHeader(u,s[u]);return null!=n&&l.overrideMimeType&&l.overrideMimeType(n),null!=c&&(l.responseType=c),null!=a&&o.on("error",a).on("load",(function(t){a(null,t)})),i.beforesend.call(o,l),l.send(null==r?null:r),o},o.abort=function(){return l.abort(),o},a.rebind(o,i,"on"),null==r?o:o.get(function(t){return 1===t.length?function(n,e){t(null==n?e:null)}:t}(r))}yn.forEach((function(t,n){yn.set(t,ln(n))})),a.functor=bn,a.xhr=xn(L),a.dsv=function(t,n){var e=new RegExp('["'+t+"\n]"),r=t.charCodeAt(0);function o(t,e,r){arguments.length<3&&(r=e,e=null);var o=Mn(t,n,null==e?a:i(e),r);return o.row=function(t){return arguments.length?o.response(null==(e=t)?a:i(t)):e},o}function a(t){return o.parse(t.responseText)}function i(t){return function(n){return o.parse(n.responseText,t)}}function u(n){return n.map(s).join(t)}function s(t){return e.test(t)?'"'+t.replace(/\"/g,'""')+'"':t}return o.parse=function(t,n){var e;return o.parseRows(t,(function(t,r){if(e)return e(t,r-1);var o=new Function("d","return {"+t.map((function(t,n){return JSON.stringify(t)+": d["+n+"]"})).join(",")+"}");e=n?function(t,e){return n(o(t),e)}:o}))},o.parseRows=function(t,n){var e,o,a={},i={},u=[],s=t.length,l=0,c=0;function f(){if(l>=s)return i;if(o)return o=!1,a;var n=l;if(34===t.charCodeAt(n)){for(var e=n;e++24?(isFinite(n)&&(clearTimeout(Sn),Sn=setTimeout(Tn,n)),kn=0):(kn=1,An(Tn))}function Rn(){for(var t=Date.now(),n=wn;n;)t>=n.t&&n.c(t-n.t)&&(n.c=null),n=n.n;return t}function Pn(){for(var t,n=wn,e=1/0;n;)n.c?(n.t8?function(t){return t/e}:function(t){return t*e},symbol:t}}));function Cn(t){var n=t.decimal,e=t.thousands,r=t.grouping,o=t.currency,i=r&&e?function(t,n){for(var o=t.length,a=[],i=0,u=r[0],s=0;o>0&&u>0&&(s+u+1>n&&(u=Math.max(1,n-s)),a.push(t.substring(o-=u,o+u)),!((s+=u+1)>n));)u=r[i=(i+1)%r.length];return a.reverse().join(e)}:L;return function(t){var e=Ln.exec(t),r=e[1]||" ",u=e[2]||">",s=e[3]||"-",l=e[4]||"",c=e[5],f=+e[6],h=e[7],p=e[8],d=e[9],m=1,g="",v="",y=!1,b=!0;switch(p&&(p=+p.substring(1)),(c||"0"===r&&"="===u)&&(c=r="0",u="="),d){case"n":h=!0,d="g";break;case"%":m=100,v="%",d="f";break;case"p":m=100,v="%",d="r";break;case"b":case"o":case"x":case"X":"#"===l&&(g="0"+d.toLowerCase());case"c":b=!1;case"d":y=!0,p=0;break;case"s":m=-1,d="r"}"$"===l&&(g=o[0],v=o[1]),"r"!=d||p||(d="g"),null!=p&&("g"==d?p=Math.max(1,Math.min(21,p)):"e"!=d&&"f"!=d||(p=Math.max(0,Math.min(20,p)))),d=Un.get(d)||Dn;var x=c&&h;return function(t){var e=v;if(y&&t%1)return"";var o=t<0||0===t&&1/t<0?(t=-t,"-"):"-"===s?"":s;if(m<0){var l=a.formatPrefix(t,p);t=l.scale(t),e=l.symbol+v}else t*=m;var M,w,_=(t=d(t,p)).lastIndexOf(".");if(_<0){var k=b?t.lastIndexOf("e"):-1;k<0?(M=t,w=""):(M=t.substring(0,k),w=t.substring(k))}else M=t.substring(0,_),w=n+t.substring(_+1);!c&&h&&(M=i(M,1/0));var S=g.length+M.length+w.length+(x?0:o.length),A=S"===u?A+o+t:"^"===u?A.substring(0,S>>=1)+o+t+A.substring(S):o+(x?t:A+t))+e}}}a.formatPrefix=function(t,n){var e=0;return(t=+t)&&(t<0&&(t*=-1),n&&(t=a.round(t,Nn(t,n))),e=1+Math.floor(1e-12+Math.log(t)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((e-1)/3)))),On[8+e/3]};var Ln=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,Un=a.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,n){return t.toPrecision(n)},e:function(t,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},r:function(t,n){return(t=a.round(t,Nn(t,n))).toFixed(Math.max(0,Math.min(20,Nn(t*(1+1e-15),n))))}});function Dn(t){return t+""}var jn=a.time={},zn=Date;function qn(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}qn.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){Fn.setUTCDate.apply(this._,arguments)},setDay:function(){Fn.setUTCDay.apply(this._,arguments)},setFullYear:function(){Fn.setUTCFullYear.apply(this._,arguments)},setHours:function(){Fn.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){Fn.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){Fn.setUTCMinutes.apply(this._,arguments)},setMonth:function(){Fn.setUTCMonth.apply(this._,arguments)},setSeconds:function(){Fn.setUTCSeconds.apply(this._,arguments)},setTime:function(){Fn.setTime.apply(this._,arguments)}};var Fn=Date.prototype;function Bn(t,n,e){function r(n){var e=t(n),r=a(e,1);return n-e1)for(;i=l)return-1;if(37===(o=n.charCodeAt(u++))){if(i=n.charAt(u++),!(a=w[i in Yn?n.charAt(u++):i])||(r=a(t,e,r))<0)return-1}else if(o!=e.charCodeAt(r++))return-1}return r}c.utc=function(t){var n=c(t);function e(t){try{var e=new(zn=qn);return e._=t,n(e)}finally{zn=Date}}return e.parse=function(t){try{zn=qn;var e=n.parse(t);return e&&e._}finally{zn=Date}},e.toString=n.toString,e},c.multi=c.utc.multi=fe;var h=a.map(),p=Wn(i),d=Zn(i),m=Wn(u),g=Zn(u),v=Wn(s),y=Zn(s),b=Wn(l),x=Zn(l);o.forEach((function(t,n){h.set(t.toLowerCase(),n)}));var M={a:function(t){return u[t.getDay()]},A:function(t){return i[t.getDay()]},b:function(t){return l[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:c(n),d:function(t,n){return Gn(t.getDate(),n,2)},e:function(t,n){return Gn(t.getDate(),n,2)},H:function(t,n){return Gn(t.getHours(),n,2)},I:function(t,n){return Gn(t.getHours()%12||12,n,2)},j:function(t,n){return Gn(1+jn.dayOfYear(t),n,3)},L:function(t,n){return Gn(t.getMilliseconds(),n,3)},m:function(t,n){return Gn(t.getMonth()+1,n,2)},M:function(t,n){return Gn(t.getMinutes(),n,2)},p:function(t){return o[+(t.getHours()>=12)]},S:function(t,n){return Gn(t.getSeconds(),n,2)},U:function(t,n){return Gn(jn.sundayOfYear(t),n,2)},w:function(t){return t.getDay()},W:function(t,n){return Gn(jn.mondayOfYear(t),n,2)},x:c(e),X:c(r),y:function(t,n){return Gn(t.getFullYear()%100,n,2)},Y:function(t,n){return Gn(t.getFullYear()%1e4,n,4)},Z:le,"%":function(){return"%"}},w={a:function(t,n,e){m.lastIndex=0;var r=m.exec(n.slice(e));return r?(t.w=g.get(r[0].toLowerCase()),e+r[0].length):-1},A:function(t,n,e){p.lastIndex=0;var r=p.exec(n.slice(e));return r?(t.w=d.get(r[0].toLowerCase()),e+r[0].length):-1},b:function(t,n,e){b.lastIndex=0;var r=b.exec(n.slice(e));return r?(t.m=x.get(r[0].toLowerCase()),e+r[0].length):-1},B:function(t,n,e){v.lastIndex=0;var r=v.exec(n.slice(e));return r?(t.m=y.get(r[0].toLowerCase()),e+r[0].length):-1},c:function(t,n,e){return f(t,M.c.toString(),n,e)},d:re,e:re,H:ae,I:ae,j:oe,L:se,m:ee,M:ie,p:function(t,n,e){var r=h.get(n.slice(e,e+=2).toLowerCase());return null==r?-1:(t.p=r,e)},S:ue,U:$n,w:Jn,W:Kn,x:function(t,n,e){return f(t,M.x.toString(),n,e)},X:function(t,n,e){return f(t,M.X.toString(),n,e)},y:te,Y:Qn,Z:ne,"%":ce};return c}jn.year=Bn((function(t){return(t=jn.day(t)).setMonth(0,1),t}),(function(t,n){t.setFullYear(t.getFullYear()+n)}),(function(t){return t.getFullYear()})),jn.years=jn.year.range,jn.years.utc=jn.year.utc.range,jn.day=Bn((function(t){var n=new zn(2e3,0);return n.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),n}),(function(t,n){t.setDate(t.getDate()+n)}),(function(t){return t.getDate()-1})),jn.days=jn.day.range,jn.days.utc=jn.day.utc.range,jn.dayOfYear=function(t){var n=jn.year(t);return Math.floor((t-n-6e4*(t.getTimezoneOffset()-n.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach((function(t,n){n=7-n;var e=jn[t]=Bn((function(t){return(t=jn.day(t)).setDate(t.getDate()-(t.getDay()+n)%7),t}),(function(t,n){t.setDate(t.getDate()+7*Math.floor(n))}),(function(t){var e=jn.year(t).getDay();return Math.floor((jn.dayOfYear(t)+(e+n)%7)/7)-(e!==n)}));jn[t+"s"]=e.range,jn[t+"s"].utc=e.utc.range,jn[t+"OfYear"]=function(t){var e=jn.year(t).getDay();return Math.floor((jn.dayOfYear(t)+(e+n)%7)/7)}})),jn.week=jn.sunday,jn.weeks=jn.sunday.range,jn.weeks.utc=jn.sunday.utc.range,jn.weekOfYear=jn.sundayOfYear;var Yn={"-":"",_:" ",0:"0"},Vn=/^\s*\d+/,Hn=/^%/;function Gn(t,n,e){var r=t<0?"-":"",o=(r?-t:t)+"",a=o.length;return r+(a68?1900:2e3),e+o[0].length):-1}function ne(t,n,e){return/^[+-]\d{4}$/.test(n=n.slice(e,e+5))?(t.Z=-n,e+5):-1}function ee(t,n,e){Vn.lastIndex=0;var r=Vn.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function re(t,n,e){Vn.lastIndex=0;var r=Vn.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function oe(t,n,e){Vn.lastIndex=0;var r=Vn.exec(n.slice(e,e+3));return r?(t.j=+r[0],e+r[0].length):-1}function ae(t,n,e){Vn.lastIndex=0;var r=Vn.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function ie(t,n,e){Vn.lastIndex=0;var r=Vn.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function ue(t,n,e){Vn.lastIndex=0;var r=Vn.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function se(t,n,e){Vn.lastIndex=0;var r=Vn.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function le(t){var n=t.getTimezoneOffset(),e=n>0?"-":"+",r=w(n)/60|0,o=w(n)%60;return e+Gn(r,"0",2)+Gn(o,"0",2)}function ce(t,n,e){Hn.lastIndex=0;var r=Hn.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function fe(t){for(var n=t.length,e=-1;++e=0?1:-1,u=i*a,s=Math.cos(n),l=Math.sin(n),c=o*l,f=r*s+c*Math.cos(u),h=c*i*Math.sin(u);Ce.add(Math.atan2(h,f)),e=t,r=s,o=l}Le.point=function(i,u){Le.point=a,e=(t=i)*Lt,r=Math.cos(u=(n=u)*Lt/2+Pt/4),o=Math.sin(u)},Le.lineEnd=function(){a(t,n)}}function De(t){var n=t[0],e=t[1],r=Math.cos(e);return[r*Math.cos(n),r*Math.sin(n),Math.sin(e)]}function je(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function ze(t,n){return[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]]}function qe(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function Fe(t,n){return[t[0]*n,t[1]*n,t[2]*n]}function Be(t){var n=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}function Ie(t){return[Math.atan2(t[1],t[0]),qt(t[2])]}function Xe(t,n){return w(t[0]-n[0])Tt?r=90:l<-Tt&&(n=-90),f[0]=t,f[1]=e}};function p(o,a){c.push(f=[t=o,e=o]),ar&&(r=a)}function d(a,i){var u=De([a*Lt,i*Lt]);if(s){var l=ze(s,u),c=ze([l[1],-l[0],0],l);Be(c),c=Ie(c);var f=a-o,h=f>0?1:-1,d=c[0]*Ut*h,m=w(f)>180;if(m^(h*or&&(r=g);else if(m^(h*o<(d=(d+360)%360-180)&&dr&&(r=i);m?ax(t,e)&&(e=a):x(a,e)>x(t,e)&&(t=a):e>=t?(ae&&(e=a)):a>o?x(t,a)>x(t,e)&&(e=a):x(a,e)>x(t,e)&&(t=a)}else p(a,i);s=u,o=a}function m(){h.point=d}function g(){f[0]=t,f[1]=e,h.point=p,s=null}function v(t,n){if(s){var e=t-o;l+=w(e)>180?e+(e>0?360:-360):e}else i=t,u=n;Le.point(t,n),d(t,n)}function y(){Le.lineStart()}function b(){v(i,u),Le.lineEnd(),w(l)>Tt&&(t=-(e=180)),f[0]=t,f[1]=e,s=null}function x(t,n){return(n-=t)<0?n+360:n}function M(t,n){return t[0]-n[0]}function _(t,n){return n[0]<=n[1]?n[0]<=t&&t<=n[1]:tx(m[0],m[1])&&(m[1]=p[1]),x(p[0],m[1])>x(m[0],m[1])&&(m[0]=p[0])):u.push(m=p);for(var s,l,p,d=-1/0,m=(i=0,u[l=u.length-1]);i<=l;m=p,++i)p=u[i],(s=x(m[1],p[0]))>d&&(d=s,t=p[0],e=m[1])}return c=f=null,t===1/0||n===1/0?[[NaN,NaN],[NaN,NaN]]:[[t,n],[e,r]]}}(),a.geo.centroid=function(t){we=_e=ke=Se=Ae=Ee=Te=Re=Pe=Ne=Oe=0,a.geo.stream(t,Ye);var n=Pe,e=Ne,r=Oe,o=n*n+e*e+r*r;return o=0;--u)o.point((f=c[u])[0],f[1]);else r(p.x,p.p.x,-1,o);p=p.p}c=(p=p.o).z,d=!d}while(!p.v);o.lineEnd()}}}function Qe(t){if(n=t.length){for(var n,e,r=0,o=t[0];++r=0?1:-1,_=w*M,k=_>Pt,S=d*b;if(Ce.add(Math.atan2(S*w*Math.sin(_),m*x+S*Math.cos(_))),a+=k?M+w*Nt:M,k^h>=e^v>=e){var A=ze(De(f),De(t));Be(A);var E=ze(o,A);Be(E);var T=(k^M>=0?-1:1)*qt(E[2]);(r>T||r===T&&(A[0]||A[1]))&&(i+=k^M>=0?1:-1)}if(!g++)break;h=v,d=b,m=x,f=t}}return(a<-Tt||a0){for(b||(i.polygonStart(),b=!0),i.lineStart();++a1&&2&n&&e.push(e.pop().concat(e.shift())),u.push(e.filter(er))}return c}}function er(t){return t.length>1}function rr(){var t,n=[];return{lineStart:function(){n.push(t=[])},point:function(n,e){t.push([n,e])},lineEnd:z,buffer:function(){var e=n;return n=[],t=null,e},rejoin:function(){n.length>1&&n.push(n.pop().concat(n.shift()))}}}function or(t,n){return((t=t.x)[0]<0?t[1]-Ct-Tt:Ct-t[1])-((n=n.x)[0]<0?n[1]-Ct-Tt:Ct-n[1])}var ar=nr($e,(function(t){var n,e=NaN,r=NaN,o=NaN;return{lineStart:function(){t.lineStart(),n=1},point:function(a,i){var u=a>0?Pt:-Pt,s=w(a-e);w(s-Pt)0?Ct:-Ct),t.point(o,r),t.lineEnd(),t.lineStart(),t.point(u,r),t.point(a,r),n=0):o!==u&&s>=Pt&&(w(e-o)Tt?Math.atan((Math.sin(n)*(a=Math.cos(r))*Math.sin(e)-Math.sin(r)*(o=Math.cos(n))*Math.sin(t))/(o*a*i)):(n+r)/2}(e,r,a,i),t.point(o,r),t.lineEnd(),t.lineStart(),t.point(u,r),n=0),t.point(e=a,r=i),o=u},lineEnd:function(){t.lineEnd(),e=r=NaN},clean:function(){return 2-n}}}),(function(t,n,e,r){var o;if(null==t)o=e*Ct,r.point(-Pt,o),r.point(0,o),r.point(Pt,o),r.point(Pt,0),r.point(Pt,-o),r.point(0,-o),r.point(-Pt,-o),r.point(-Pt,0),r.point(-Pt,o);else if(w(t[0]-n[0])>Tt){var a=t[0]0,r=w(n)>Tt;return nr(o,(function(t){var n,u,s,l,c;return{lineStart:function(){l=s=!1,c=1},point:function(f,h){var p,d=[f,h],m=o(f,h),g=e?m?0:i(f,h):m?i(f+(f<0?Pt:-Pt),h):0;if(!n&&(l=s=m)&&t.lineStart(),m!==s&&(p=a(n,d),(Xe(n,p)||Xe(d,p))&&(d[0]+=Tt,d[1]+=Tt,m=o(d[0],d[1]))),m!==s)c=0,m?(t.lineStart(),p=a(d,n),t.point(p[0],p[1])):(p=a(n,d),t.point(p[0],p[1]),t.lineEnd()),n=p;else if(r&&n&&e^m){var v;g&u||!(v=a(d,n,!0))||(c=0,e?(t.lineStart(),t.point(v[0][0],v[0][1]),t.point(v[1][0],v[1][1]),t.lineEnd()):(t.point(v[1][0],v[1][1]),t.lineEnd(),t.lineStart(),t.point(v[0][0],v[0][1])))}!m||n&&Xe(n,d)||t.point(d[0],d[1]),n=d,s=m,u=g},lineEnd:function(){s&&t.lineEnd(),n=null},clean:function(){return c|(l&&s)<<1}}}),Ir(t,6*Lt),e?[0,-t]:[-Pt,t-Pt]);function o(t,e){return Math.cos(t)*Math.cos(e)>n}function a(t,e,r){var o=[1,0,0],a=ze(De(t),De(e)),i=je(a,a),u=a[0],s=i-u*u;if(!s)return!r&&t;var l=n*i/s,c=-n*u/s,f=ze(o,a),h=Fe(o,l);qe(h,Fe(a,c));var p=f,d=je(h,p),m=je(p,p),g=d*d-m*(je(h,h)-1);if(!(g<0)){var v=Math.sqrt(g),y=Fe(p,(-d-v)/m);if(qe(y,h),y=Ie(y),!r)return y;var b,x=t[0],M=e[0],_=t[1],k=e[1];M0^y[1]<(w(y[0]-x)Pt^(x<=y[0]&&y[0]<=M)){var E=Fe(p,(-d+v)/m);return qe(E,h),[y,Ie(E)]}}}function i(n,r){var o=e?t:Pt-t,a=0;return n<-o?a|=1:n>o&&(a|=2),r<-o?a|=4:r>o&&(a|=8),a}}function ur(t,n,e,r){return function(o){var a,i=o.a,u=o.b,s=i.x,l=i.y,c=0,f=1,h=u.x-s,p=u.y-l;if(a=t-s,h||!(a>0)){if(a/=h,h<0){if(a0){if(a>f)return;a>c&&(c=a)}if(a=e-s,h||!(a<0)){if(a/=h,h<0){if(a>f)return;a>c&&(c=a)}else if(h>0){if(a0)){if(a/=p,p<0){if(a0){if(a>f)return;a>c&&(c=a)}if(a=r-l,p||!(a<0)){if(a/=p,p<0){if(a>f)return;a>c&&(c=a)}else if(p>0){if(a0&&(o.a={x:s+c*h,y:l+c*p}),f<1&&(o.b={x:s+f*h,y:l+f*p}),o}}}}}}function sr(t,n,e,r){return function(s){var l,c,f,h,p,d,m,g,v,y,b,x=s,M=rr(),w=ur(t,n,e,r),_={point:A,lineStart:function(){_.point=E,c&&c.push(f=[]),y=!0,v=!1,m=g=NaN},lineEnd:function(){l&&(E(h,p),d&&v&&M.rejoin(),l.push(M.buffer())),_.point=A,v&&s.lineEnd()},polygonStart:function(){s=M,l=[],c=[],b=!0},polygonEnd:function(){s=x,l=a.merge(l);var n=function(t){for(var n=0,e=c.length,r=t[1],o=0;or&&jt(l,a,t)>0&&++n:a[1]<=r&&jt(l,a,t)<0&&--n,l=a;return 0!==n}([t,r]),e=b&&n,o=l.length;(e||o)&&(s.polygonStart(),e&&(s.lineStart(),k(null,null,1,s),s.lineEnd()),o&&Ke(l,i,n,k,s),s.polygonEnd()),l=c=f=null}};function k(a,i,s,l){var c=0,f=0;if(null==a||(c=o(a,s))!==(f=o(i,s))||u(a,i)<0^s>0)do{l.point(0===c||3===c?t:e,c>1?r:n)}while((c=(c+s+4)%4)!==f);else l.point(i[0],i[1])}function S(o,a){return t<=o&&o<=e&&n<=a&&a<=r}function A(t,n){S(t,n)&&s.point(t,n)}function E(t,n){var e=S(t=Math.max(-1e9,Math.min(1e9,t)),n=Math.max(-1e9,Math.min(1e9,n)));if(c&&f.push([t,n]),y)h=t,p=n,d=e,y=!1,e&&(s.lineStart(),s.point(t,n));else if(e&&v)s.point(t,n);else{var r={a:{x:m,y:g},b:{x:t,y:n}};w(r)?(v||(s.lineStart(),s.point(r.a.x,r.a.y)),s.point(r.b.x,r.b.y),e||s.lineEnd(),b=!1):e&&(s.lineStart(),s.point(t,n),b=!1)}m=t,g=n,v=e}return _};function o(r,o){return w(r[0]-t)0?0:3:w(r[0]-e)0?2:1:w(r[1]-n)0?1:0:o>0?3:2}function i(t,n){return u(t.x,n.x)}function u(t,n){var e=o(t,1),r=o(n,1);return e!==r?e-r:0===e?n[1]-t[1]:1===e?t[0]-n[0]:2===e?t[1]-n[1]:n[0]-t[0]}}function lr(t){var n=0,e=Pt/3,r=Lr(t),o=r(n,e);return o.parallels=function(t){return arguments.length?r(n=t[0]*Pt/180,e=t[1]*Pt/180):[n/Pt*180,e/Pt*180]},o}function cr(t,n){var e=Math.sin(t),r=(e+Math.sin(n))/2,o=1+e*(2*r-e),a=Math.sqrt(o)/r;function i(t,n){var e=Math.sqrt(o-2*r*Math.sin(n))/r;return[e*Math.sin(t*=r),a-e*Math.cos(t)]}return i.invert=function(t,n){var e=a-n;return[Math.atan2(t,e)/r,qt((o-(t*t+e*e)*r*r)/(2*r))]},i}a.geo.clipExtent=function(){var t,n,e,r,o,a,i={stream:function(t){return o&&(o.valid=!1),(o=a(t)).valid=!0,o},extent:function(u){return arguments.length?(a=sr(t=+u[0][0],n=+u[0][1],e=+u[1][0],r=+u[1][1]),o&&(o.valid=!1,o=null),i):[[t,n],[e,r]]}};return i.extent([[0,0],[960,500]])},(a.geo.conicEqualArea=function(){return lr(cr)}).raw=cr,a.geo.albers=function(){return a.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},a.geo.albersUsa=function(){var t,n,e,r,o=a.geo.albers(),i=a.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),u=a.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s={point:function(n,e){t=[n,e]}};function l(o){var a=o[0],i=o[1];return t=null,n(a,i),t||(e(a,i),t)||r(a,i),t}return l.invert=function(t){var n=o.scale(),e=o.translate(),r=(t[0]-e[0])/n,a=(t[1]-e[1])/n;return(a>=.12&&a<.234&&r>=-.425&&r<-.214?i:a>=.166&&a<.234&&r>=-.214&&r<-.115?u:o).invert(t)},l.stream=function(t){var n=o.stream(t),e=i.stream(t),r=u.stream(t);return{point:function(t,o){n.point(t,o),e.point(t,o),r.point(t,o)},sphere:function(){n.sphere(),e.sphere(),r.sphere()},lineStart:function(){n.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){n.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){n.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){n.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},l.precision=function(t){return arguments.length?(o.precision(t),i.precision(t),u.precision(t),l):o.precision()},l.scale=function(t){return arguments.length?(o.scale(t),i.scale(.35*t),u.scale(t),l.translate(o.translate())):o.scale()},l.translate=function(t){if(!arguments.length)return o.translate();var a=o.scale(),c=+t[0],f=+t[1];return n=o.translate(t).clipExtent([[c-.455*a,f-.238*a],[c+.455*a,f+.238*a]]).stream(s).point,e=i.translate([c-.307*a,f+.201*a]).clipExtent([[c-.425*a+Tt,f+.12*a+Tt],[c-.214*a-Tt,f+.234*a-Tt]]).stream(s).point,r=u.translate([c-.205*a,f+.212*a]).clipExtent([[c-.214*a+Tt,f+.166*a+Tt],[c-.115*a-Tt,f+.234*a-Tt]]).stream(s).point,l},l.scale(1070)};var fr,hr,pr,dr,mr,gr,vr={point:z,lineStart:z,lineEnd:z,polygonStart:function(){hr=0,vr.lineStart=yr},polygonEnd:function(){vr.lineStart=vr.lineEnd=vr.point=z,fr+=w(hr/2)}};function yr(){var t,n,e,r;function o(t,n){hr+=r*t-e*n,e=t,r=n}vr.point=function(a,i){vr.point=o,t=e=a,n=r=i},vr.lineEnd=function(){o(t,n)}}var br={point:function(t,n){tmr&&(mr=t),ngr&&(gr=n)},lineStart:z,lineEnd:z,polygonStart:z,polygonEnd:z};function xr(){var t=Mr(4.5),n=[],e={point:r,lineStart:function(){e.point=o},lineEnd:i,polygonStart:function(){e.lineEnd=u},polygonEnd:function(){e.lineEnd=i,e.point=r},pointRadius:function(n){return t=Mr(n),e},result:function(){if(n.length){var t=n.join("");return n=[],t}}};function r(e,r){n.push("M",e,",",r,t)}function o(t,r){n.push("M",t,",",r),e.point=a}function a(t,e){n.push("L",t,",",e)}function i(){e.point=r}function u(){n.push("Z")}return e}function Mr(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}var wr,_r={point:kr,lineStart:Sr,lineEnd:Ar,polygonStart:function(){_r.lineStart=Er},polygonEnd:function(){_r.point=kr,_r.lineStart=Sr,_r.lineEnd=Ar}};function kr(t,n){ke+=t,Se+=n,++Ae}function Sr(){var t,n;function e(e,r){var o=e-t,a=r-n,i=Math.sqrt(o*o+a*a);Ee+=i*(t+e)/2,Te+=i*(n+r)/2,Re+=i,kr(t=e,n=r)}_r.point=function(r,o){_r.point=e,kr(t=r,n=o)}}function Ar(){_r.point=kr}function Er(){var t,n,e,r;function o(t,n){var o=t-e,a=n-r,i=Math.sqrt(o*o+a*a);Ee+=i*(e+t)/2,Te+=i*(r+n)/2,Re+=i,Pe+=(i=r*t-e*n)*(e+t),Ne+=i*(r+n),Oe+=3*i,kr(e=t,r=n)}_r.point=function(a,i){_r.point=o,kr(t=e=a,n=r=i)},_r.lineEnd=function(){o(t,n)}}function Tr(t){var n=4.5,e={point:r,lineStart:function(){e.point=o},lineEnd:i,polygonStart:function(){e.lineEnd=u},polygonEnd:function(){e.lineEnd=i,e.point=r},pointRadius:function(t){return n=t,e},result:z};function r(e,r){t.moveTo(e+n,r),t.arc(e,r,n,0,Nt)}function o(n,r){t.moveTo(n,r),e.point=a}function a(n,e){t.lineTo(n,e)}function i(){e.point=r}function u(){t.closePath()}return e}function Rr(t){var n=.5,e=Math.cos(30*Lt),r=16;function o(t){return(r?i:a)(t)}function a(n){return Or(n,(function(e,r){e=t(e,r),n.point(e[0],e[1])}))}function i(n){var e,o,a,i,s,l,c,f,h,p,d,m,g={point:v,lineStart:y,lineEnd:x,polygonStart:function(){n.polygonStart(),g.lineStart=M},polygonEnd:function(){n.polygonEnd(),g.lineStart=y}};function v(e,r){e=t(e,r),n.point(e[0],e[1])}function y(){f=NaN,g.point=b,n.lineStart()}function b(e,o){var a=De([e,o]),i=t(e,o);u(f,h,c,p,d,m,f=i[0],h=i[1],c=e,p=a[0],d=a[1],m=a[2],r,n),n.point(f,h)}function x(){g.point=v,n.lineEnd()}function M(){y(),g.point=w,g.lineEnd=_}function w(t,n){b(e=t,n),o=f,a=h,i=p,s=d,l=m,g.point=b}function _(){u(f,h,c,p,d,m,o,a,e,i,s,l,r,n),g.lineEnd=x,x()}return g}function u(r,o,a,i,s,l,c,f,h,p,d,m,g,v){var y=c-r,b=f-o,x=y*y+b*b;if(x>4*n&&g--){var M=i+p,_=s+d,k=l+m,S=Math.sqrt(M*M+_*_+k*k),A=Math.asin(k/=S),E=w(w(k)-1)n||w((y*N+b*O)/x-.5)>.3||i*p+s*d+l*m0&&16,o):Math.sqrt(n)},o}function Pr(t){var n=Rr((function(n,e){return t([n*Ut,e*Ut])}));return function(t){return Ur(n(t))}}function Nr(t){this.stream=t}function Or(t,n){return{point:n,sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function Cr(t){return Lr((function(){return t}))()}function Lr(t){var n,e,r,o,i,u,s=Rr((function(t,e){return[(t=n(t,e))[0]*l+o,i-t[1]*l]})),l=150,c=480,f=250,h=0,p=0,d=0,m=0,g=0,v=ar,y=L,b=null,x=null;function M(t){return[(t=r(t[0]*Lt,t[1]*Lt))[0]*l+o,i-t[1]*l]}function w(t){return(t=r.invert((t[0]-o)/l,(i-t[1])/l))&&[t[0]*Ut,t[1]*Ut]}function _(){r=Je(e=zr(d,m,g),n);var t=n(h,p);return o=c-t[0]*l,i=f+t[1]*l,k()}function k(){return u&&(u.valid=!1,u=null),M}return M.stream=function(t){return u&&(u.valid=!1),(u=Ur(v(e,s(y(t))))).valid=!0,u},M.clipAngle=function(t){return arguments.length?(v=null==t?(b=t,ar):ir((b=+t)*Lt),k()):b},M.clipExtent=function(t){return arguments.length?(x=t,y=t?sr(t[0][0],t[0][1],t[1][0],t[1][1]):L,k()):x},M.scale=function(t){return arguments.length?(l=+t,_()):l},M.translate=function(t){return arguments.length?(c=+t[0],f=+t[1],_()):[c,f]},M.center=function(t){return arguments.length?(h=t[0]%360*Lt,p=t[1]%360*Lt,_()):[h*Ut,p*Ut]},M.rotate=function(t){return arguments.length?(d=t[0]%360*Lt,m=t[1]%360*Lt,g=t.length>2?t[2]%360*Lt:0,_()):[d*Ut,m*Ut,g*Ut]},a.rebind(M,s,"precision"),function(){return n=t.apply(this,arguments),M.invert=n.invert&&w,_()}}function Ur(t){return Or(t,(function(n,e){t.point(n*Lt,e*Lt)}))}function Dr(t,n){return[t,n]}function jr(t,n){return[t>Pt?t-Nt:t<-Pt?t+Nt:t,n]}function zr(t,n,e){return t?n||e?Je(Fr(t),Br(n,e)):Fr(t):n||e?Br(n,e):jr}function qr(t){return function(n,e){return[(n+=t)>Pt?n-Nt:n<-Pt?n+Nt:n,e]}}function Fr(t){var n=qr(t);return n.invert=qr(-t),n}function Br(t,n){var e=Math.cos(t),r=Math.sin(t),o=Math.cos(n),a=Math.sin(n);function i(t,n){var i=Math.cos(n),u=Math.cos(t)*i,s=Math.sin(t)*i,l=Math.sin(n),c=l*e+u*r;return[Math.atan2(s*o-c*a,u*e-l*r),qt(c*o+s*a)]}return i.invert=function(t,n){var i=Math.cos(n),u=Math.cos(t)*i,s=Math.sin(t)*i,l=Math.sin(n),c=l*o-s*a;return[Math.atan2(s*o+l*a,u*e+c*r),qt(c*e-u*r)]},i}function Ir(t,n){var e=Math.cos(t),r=Math.sin(t);return function(o,a,i,u){var s=i*n;null!=o?(o=Xr(e,o),a=Xr(e,a),(i>0?oa)&&(o+=i*Nt)):(o=t+i*Nt,a=t-.5*s);for(var l,c=o;i>0?c>a:c2?t[2]*Lt:0),n.invert=function(n){return(n=t.invert(n[0]*Lt,n[1]*Lt))[0]*=Ut,n[1]*=Ut,n},n},jr.invert=Dr,a.geo.circle=function(){var t,n,e=[0,0],r=6;function o(){var t="function"==typeof e?e.apply(this,arguments):e,r=zr(-t[0]*Lt,-t[1]*Lt,0).invert,o=[];return n(null,null,1,{point:function(t,n){o.push(t=r(t,n)),t[0]*=Ut,t[1]*=Ut}}),{type:"Polygon",coordinates:[o]}}return o.origin=function(t){return arguments.length?(e=t,o):e},o.angle=function(e){return arguments.length?(n=Ir((t=+e)*Lt,r*Lt),o):t},o.precision=function(e){return arguments.length?(n=Ir(t*Lt,(r=+e)*Lt),o):r},o.angle(90)},a.geo.distance=function(t,n){var e,r=(n[0]-t[0])*Lt,o=t[1]*Lt,a=n[1]*Lt,i=Math.sin(r),u=Math.cos(r),s=Math.sin(o),l=Math.cos(o),c=Math.sin(a),f=Math.cos(a);return Math.atan2(Math.sqrt((e=f*i)*e+(e=l*c-s*f*u)*e),s*c+l*f*u)},a.geo.graticule=function(){var t,n,e,r,o,i,u,s,l,c,f,h,p=10,d=p,m=90,g=360,v=2.5;function y(){return{type:"MultiLineString",coordinates:b()}}function b(){return a.range(Math.ceil(r/m)*m,e,m).map(f).concat(a.range(Math.ceil(s/g)*g,u,g).map(h)).concat(a.range(Math.ceil(n/p)*p,t,p).filter((function(t){return w(t%m)>Tt})).map(l)).concat(a.range(Math.ceil(i/d)*d,o,d).filter((function(t){return w(t%g)>Tt})).map(c))}return y.lines=function(){return b().map((function(t){return{type:"LineString",coordinates:t}}))},y.outline=function(){return{type:"Polygon",coordinates:[f(r).concat(h(u).slice(1),f(e).reverse().slice(1),h(s).reverse().slice(1))]}},y.extent=function(t){return arguments.length?y.majorExtent(t).minorExtent(t):y.minorExtent()},y.majorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],s=+t[0][1],u=+t[1][1],r>e&&(t=r,r=e,e=t),s>u&&(t=s,s=u,u=t),y.precision(v)):[[r,s],[e,u]]},y.minorExtent=function(e){return arguments.length?(n=+e[0][0],t=+e[1][0],i=+e[0][1],o=+e[1][1],n>t&&(e=n,n=t,t=e),i>o&&(e=i,i=o,o=e),y.precision(v)):[[n,i],[t,o]]},y.step=function(t){return arguments.length?y.majorStep(t).minorStep(t):y.minorStep()},y.majorStep=function(t){return arguments.length?(m=+t[0],g=+t[1],y):[m,g]},y.minorStep=function(t){return arguments.length?(p=+t[0],d=+t[1],y):[p,d]},y.precision=function(a){return arguments.length?(v=+a,l=Yr(i,o,90),c=Vr(n,t,v),f=Yr(s,u,90),h=Vr(r,e,v),y):v},y.majorExtent([[-180,-90+Tt],[180,90-Tt]]).minorExtent([[-180,-80-Tt],[180,80+Tt]])},a.geo.greatArc=function(){var t,n,e=Hr,r=Gr;function o(){return{type:"LineString",coordinates:[t||e.apply(this,arguments),n||r.apply(this,arguments)]}}return o.distance=function(){return a.geo.distance(t||e.apply(this,arguments),n||r.apply(this,arguments))},o.source=function(n){return arguments.length?(e=n,t="function"==typeof n?null:n,o):e},o.target=function(t){return arguments.length?(r=t,n="function"==typeof t?null:t,o):r},o.precision=function(){return arguments.length?o:0},o},a.geo.interpolate=function(t,n){return e=t[0]*Lt,r=t[1]*Lt,o=n[0]*Lt,a=n[1]*Lt,i=Math.cos(r),u=Math.sin(r),s=Math.cos(a),l=Math.sin(a),c=i*Math.cos(e),f=i*Math.sin(e),h=s*Math.cos(o),p=s*Math.sin(o),d=2*Math.asin(Math.sqrt(Bt(a-r)+i*s*Bt(o-e))),m=1/Math.sin(d),(g=d?function(t){var n=Math.sin(t*=d)*m,e=Math.sin(d-t)*m,r=e*c+n*h,o=e*f+n*p,a=e*u+n*l;return[Math.atan2(o,r)*Ut,Math.atan2(a,Math.sqrt(r*r+o*o))*Ut]}:function(){return[e*Ut,r*Ut]}).distance=d,g;var e,r,o,a,i,u,s,l,c,f,h,p,d,m,g},a.geo.length=function(t){return wr=0,a.geo.stream(t,Wr),wr};var Wr={sphere:z,point:z,lineStart:function(){var t,n,e;function r(r,o){var a=Math.sin(o*=Lt),i=Math.cos(o),u=w((r*=Lt)-t),s=Math.cos(u);wr+=Math.atan2(Math.sqrt((u=i*Math.sin(u))*u+(u=e*a-n*i*s)*u),n*a+e*i*s),t=r,n=a,e=i}Wr.point=function(o,a){t=o*Lt,n=Math.sin(a*=Lt),e=Math.cos(a),Wr.point=r},Wr.lineEnd=function(){Wr.point=Wr.lineEnd=z}},lineEnd:z,polygonStart:z,polygonEnd:z};function Zr(t,n){function e(n,e){var r=Math.cos(n),o=Math.cos(e),a=t(r*o);return[a*o*Math.sin(n),a*Math.sin(e)]}return e.invert=function(t,e){var r=Math.sqrt(t*t+e*e),o=n(r),a=Math.sin(o),i=Math.cos(o);return[Math.atan2(t*a,r*i),Math.asin(r&&e*a/r)]},e}var Jr=Zr((function(t){return Math.sqrt(2/(1+t))}),(function(t){return 2*Math.asin(t/2)}));(a.geo.azimuthalEqualArea=function(){return Cr(Jr)}).raw=Jr;var $r=Zr((function(t){var n=Math.acos(t);return n&&n/Math.sin(n)}),L);function Kr(t,n){var e=Math.cos(t),r=function(t){return Math.tan(Pt/4+t/2)},o=t===n?Math.sin(t):Math.log(e/Math.cos(n))/Math.log(r(n)/r(t)),a=e*Math.pow(r(t),o)/o;if(!o)return no;function i(t,n){a>0?n<-Ct+Tt&&(n=-Ct+Tt):n>Ct-Tt&&(n=Ct-Tt);var e=a/Math.pow(r(n),o);return[e*Math.sin(o*t),a-e*Math.cos(o*t)]}return i.invert=function(t,n){var e=a-n,r=Dt(o)*Math.sqrt(t*t+e*e);return[Math.atan2(t,e)/o,2*Math.atan(Math.pow(a/r,1/o))-Ct]},i}function Qr(t,n){var e=Math.cos(t),r=t===n?Math.sin(t):(e-Math.cos(n))/(n-t),o=e/r+t;if(w(r)1&&jt(t[e[r-2]],t[e[r-1]],t[o])<=0;)--r;e[r++]=o}return e.slice(0,r)}function lo(t,n){return t[0]-n[0]||t[1]-n[1]}(a.geo.stereographic=function(){return Cr(oo)}).raw=oo,ao.invert=function(t,n){return[-n,2*Math.atan(Math.exp(t))-Ct]},(a.geo.transverseMercator=function(){var t=eo(ao),n=t.center,e=t.rotate;return t.center=function(t){return t?n([-t[1],t[0]]):[(t=n())[1],-t[0]]},t.rotate=function(t){return t?e([t[0],t[1],t.length>2?t[2]+90:90]):[(t=e())[0],t[1],t[2]-90]},e([0,0,90])}).raw=ao,a.geom={},a.geom.hull=function(t){var n=io,e=uo;if(arguments.length)return r(t);function r(t){if(t.length<3)return[];var r,o=bn(n),a=bn(e),i=t.length,u=[],s=[];for(r=0;r=0;--r)p.push(t[u[l[r]][2]]);for(r=+f;rTt)u=u.L;else{if(!((o=a-To(u,i))>Tt)){r>-Tt?(n=u.P,e=u):o>-Tt?(n=u,e=u.N):n=e=u;break}if(!u.R){n=u;break}u=u.R}var s=_o(t);if(vo.insert(n,s),n||e){if(n===e)return Co(n),e=_o(n.site),vo.insert(s,e),s.edge=e.edge=Do(n.site,s.site),Oo(n),void Oo(e);if(e){Co(n),Co(e);var l=n.site,c=l.x,f=l.y,h=t.x-c,p=t.y-f,d=e.site,m=d.x-c,g=d.y-f,v=2*(h*g-p*m),y=h*h+p*p,b=m*m+g*g,x={x:(g*y-p*b)/v+c,y:(h*b-m*y)/v+f};jo(e.edge,l,d,x),s.edge=Do(l,t,null,x),e.edge=Do(t,d,null,x),Oo(n),Oo(e)}else s.edge=Do(n.site,s.site)}}function Eo(t,n){var e=t.site,r=e.x,o=e.y,a=o-n;if(!a)return r;var i=t.P;if(!i)return-1/0;var u=(e=i.site).x,s=e.y,l=s-n;if(!l)return u;var c=u-r,f=1/a-1/l,h=c/l;return f?(-h+Math.sqrt(h*h-2*f*(c*c/(-2*l)-s+l/2+o-a/2)))/f+r:(r+u)/2}function To(t,n){var e=t.N;if(e)return Eo(e,n);var r=t.site;return r.y===n?r.x:1/0}function Ro(t){this.site=t,this.edges=[]}function Po(t,n){return n.angle-t.angle}function No(){Fo(this),this.x=this.y=this.arc=this.site=this.cy=null}function Oo(t){var n=t.P,e=t.N;if(n&&e){var r=n.site,o=t.site,a=e.site;if(r!==a){var i=o.x,u=o.y,s=r.x-i,l=r.y-u,c=a.x-i,f=2*(s*(g=a.y-u)-l*c);if(!(f>=-Rt)){var h=s*s+l*l,p=c*c+g*g,d=(g*h-l*p)/f,m=(s*p-c*h)/f,g=m+u,v=Mo.pop()||new No;v.arc=t,v.site=o,v.x=d+i,v.y=g+Math.sqrt(d*d+m*m),v.cy=g,t.circle=v;for(var y=null,b=bo._;b;)if(v.y=u)return;if(h>d){if(a){if(a.y>=l)return}else a={x:g,y:s};e={x:g,y:l}}else{if(a){if(a.y1)if(h>d){if(a){if(a.y>=l)return}else a={x:(s-o)/r,y:s};e={x:(l-o)/r,y:l}}else{if(a){if(a.y=u)return}else a={x:i,y:r*i+o};e={x:u,y:r*u+o}}else{if(a){if(a.xTt||w(o-e)>Tt)&&(u.splice(i,0,new zo((v=a.site,y=c,b=w(r-f)Tt?{x:f,y:w(n-f)Tt?{x:w(e-d)Tt?{x:h,y:w(n-h)Tt?{x:w(e-p)=e&&l.x<=o&&l.y>=r&&l.y<=i?[[e,i],[o,i],[o,r],[e,r]]:[]).point=t[u]})),n}function u(t){return t.map((function(t,n){return{x:Math.round(r(t,n)/Tt)*Tt,y:Math.round(o(t,n)/Tt)*Tt,i:n}}))}return i.links=function(t){return Yo(u(t)).edges.filter((function(t){return t.l&&t.r})).map((function(n){return{source:t[n.l.i],target:t[n.r.i]}}))},i.triangles=function(t){var n=[];return Yo(u(t)).cells.forEach((function(e,r){for(var o,a=e.site,i=e.edges.sort(Po),u=-1,s=i.length,l=i[s-1].edge,c=l.l===a?l.r:l.l;++ua||f>i||h=M)<<1|n>=x,_=w+4;w<_;++w)if(l=b[3&w])switch(3&w){case 0:t(l,c,f,x,M);break;case 1:t(l,x,f,h,M);break;case 2:t(l,c,M,x,p);break;case 3:t(l,x,M,h,p)}}}(t,r,o,a,i),u}function Ko(t,n){t=a.rgb(t),n=a.rgb(n);var e=t.r,r=t.g,o=t.b,i=n.r-e,u=n.g-r,s=n.b-o;return function(t){return"#"+hn(Math.round(e+i*t))+hn(Math.round(r+u*t))+hn(Math.round(o+s*t))}}function Qo(t,n){var e,r={},o={};for(e in t)e in n?r[e]=oa(t[e],n[e]):o[e]=t[e];for(e in n)e in t||(o[e]=n[e]);return function(t){for(e in r)o[e]=r[e](t);return o}}function ta(t,n){return t=+t,n=+n,function(e){return t*(1-e)+n*e}}function na(t,n){var e,r,o,a=ea.lastIndex=ra.lastIndex=0,i=-1,u=[],s=[];for(t+="",n+="";(e=ea.exec(t))&&(r=ra.exec(n));)(o=r.index)>a&&(o=n.slice(a,o),u[i]?u[i]+=o:u[++i]=o),(e=e[0])===(r=r[0])?u[i]?u[i]+=r:u[++i]=r:(u[++i]=null,s.push({i:i,x:ta(e,r)})),a=ra.lastIndex;return am&&(m=s.x),s.y>g&&(g=s.y),l.push(s.x),c.push(s.y);else for(f=0;fm&&(m=b),x>g&&(g=x),l.push(b),c.push(x)}var M=m-p,_=g-d;function k(t,n,e,r,o,a,i,u){if(!isNaN(e)&&!isNaN(r))if(t.leaf){var s=t.x,l=t.y;if(null!=s)if(w(s-e)+w(l-r)<.01)S(t,n,e,r,o,a,i,u);else{var c=t.point;t.x=t.y=t.point=null,S(t,c,s,l,o,a,i,u),S(t,n,e,r,o,a,i,u)}else t.x=e,t.y=r,t.point=n}else S(t,n,e,r,o,a,i,u)}function S(t,n,e,r,o,a,i,u){var s=.5*(o+i),l=.5*(a+u),c=e>=s,f=r>=l,h=f<<1|c;t.leaf=!1,c?o=s:i=s,f?a=l:u=l,k(t=t.nodes[h]||(t.nodes[h]={leaf:!0,nodes:[],point:null,x:null,y:null}),n,e,r,o,a,i,u)}M>_?g=d+M:m=p+_;var A={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(t){k(A,t,+v(t,++f),+y(t,f),p,d,m,g)},visit:function(t){Jo(t,A,p,d,m,g)},find:function(t){return $o(A,t[0],t[1],p,d,m,g)}};if(f=-1,null==n){for(;++f=0&&!(e=a.interpolators[r](t,n)););return e}function aa(t,n){var e,r=[],o=[],a=t.length,i=n.length,u=Math.min(t.length,n.length);for(e=0;e=1?1:t(n)}}function ca(t){return function(n){return 1-t(1-n)}}function fa(t){return function(n){return.5*(n<.5?t(2*n):2-t(2-2*n))}}function ha(t){return t*t}function pa(t){return t*t*t}function da(t){if(t<=0)return 0;if(t>=1)return 1;var n=t*t,e=n*t;return 4*(t<.5?e:3*(t-n)+e-.75)}function ma(t){return 1-Math.cos(t*Ct)}function ga(t){return Math.pow(2,10*(t-1))}function va(t){return 1-Math.sqrt(1-t*t)}function ya(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function ba(t,n){return n-=t,function(e){return Math.round(t+n*e)}}function xa(t){var n=[t.a,t.b],e=[t.c,t.d],r=wa(n),o=Ma(n,e),a=wa(function(t,n,e){return t[0]+=e*n[0],t[1]+=e*n[1],t}(e,n,-o))||0;n[0]*e[1]=0?t.slice(0,n):t,r=n>=0?t.slice(n+1):"in";return e=ua.get(e)||ia,la((r=sa.get(r)||L)(e.apply(null,i.call(arguments,1))))},a.interpolateHcl=function(t,n){t=a.hcl(t),n=a.hcl(n);var e=t.h,r=t.c,o=t.l,i=n.h-e,u=n.c-r,s=n.l-o;return isNaN(u)&&(u=0,r=isNaN(r)?n.c:r),isNaN(i)?(i=0,e=isNaN(e)?n.h:e):i>180?i-=360:i<-180&&(i+=360),function(t){return Kt(e+i*t,r+u*t,o+s*t)+""}},a.interpolateHsl=function(t,n){t=a.hsl(t),n=a.hsl(n);var e=t.h,r=t.s,o=t.l,i=n.h-e,u=n.s-r,s=n.l-o;return isNaN(u)&&(u=0,r=isNaN(r)?n.s:r),isNaN(i)?(i=0,e=isNaN(e)?n.h:e):i>180?i-=360:i<-180&&(i+=360),function(t){return Zt(e+i*t,r+u*t,o+s*t)+""}},a.interpolateLab=function(t,n){t=a.lab(t),n=a.lab(n);var e=t.l,r=t.a,o=t.b,i=n.l-e,u=n.a-r,s=n.b-o;return function(t){return en(e+i*t,r+u*t,o+s*t)+""}},a.interpolateRound=ba,a.transform=function(t){var n=s.createElementNS(a.ns.prefix.svg,"g");return(a.transform=function(t){if(null!=t){n.setAttribute("transform",t);var e=n.transform.baseVal.consolidate()}return new xa(e?e.matrix:_a)})(t)},xa.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var _a={a:1,b:0,c:0,d:1,e:0,f:0};function ka(t){return t.length?t.pop()+",":""}function Sa(t,n){var e=[],r=[];return t=a.transform(t),n=a.transform(n),function(t,n,e,r){if(t[0]!==n[0]||t[1]!==n[1]){var o=e.push("translate(",null,",",null,")");r.push({i:o-4,x:ta(t[0],n[0])},{i:o-2,x:ta(t[1],n[1])})}else(n[0]||n[1])&&e.push("translate("+n+")")}(t.translate,n.translate,e,r),function(t,n,e,r){t!==n?(t-n>180?n+=360:n-t>180&&(t+=360),r.push({i:e.push(ka(e)+"rotate(",null,")")-2,x:ta(t,n)})):n&&e.push(ka(e)+"rotate("+n+")")}(t.rotate,n.rotate,e,r),function(t,n,e,r){t!==n?r.push({i:e.push(ka(e)+"skewX(",null,")")-2,x:ta(t,n)}):n&&e.push(ka(e)+"skewX("+n+")")}(t.skew,n.skew,e,r),function(t,n,e,r){if(t[0]!==n[0]||t[1]!==n[1]){var o=e.push(ka(e)+"scale(",null,",",null,")");r.push({i:o-4,x:ta(t[0],n[0])},{i:o-2,x:ta(t[1],n[1])})}else 1===n[0]&&1===n[1]||e.push(ka(e)+"scale("+n+")")}(t.scale,n.scale,e,r),t=n=null,function(t){for(var n,o=-1,a=r.length;++o0?e=n:(t.c=null,t.t=NaN,t=null,s.end({type:"end",alpha:e=0})):n>0&&(s.start({type:"start",alpha:e=n}),t=En(u.tick)),u):e},u.start=function(){var t,n,e,a=v.length,s=y.length,c=l[0],d=l[1];for(t=0;t=0;)e.push(o[r])}function qa(t,n){for(var e=[t],r=[];null!=(t=e.pop());)if(r.push(t),(a=t.children)&&(o=a.length))for(var o,a,i=-1;++i=0;)i.push(c=l[s]),c.parent=a,c.depth=a.depth+1;e&&(a.value=0),a.children=l}else e&&(a.value=+e.call(r,a,a.depth)||0),delete a.children;return qa(o,(function(n){var r,o;t&&(r=n.children)&&r.sort(t),e&&(o=n.parent)&&(o.value+=n.value)})),u}return r.sort=function(n){return arguments.length?(t=n,r):t},r.children=function(t){return arguments.length?(n=t,r):n},r.value=function(t){return arguments.length?(e=t,r):e},r.revalue=function(t){return e&&(za(t,(function(t){t.children&&(t.value=0)})),qa(t,(function(t){var n;t.children||(t.value=+e.call(r,t,t.depth)||0),(n=t.parent)&&(n.value+=t.value)}))),t},r},a.layout.partition=function(){var t=a.layout.hierarchy(),n=[1,1];function e(e,r){var o=t.call(this,e,r);return function t(n,e,r,o){var a=n.children;if(n.x=e,n.y=n.depth*o,n.dx=r,n.dy=o,a&&(i=a.length)){var i,u,s,l=-1;for(r=n.value?r/n.value:0;++lu&&(u=r),i.push(r)}for(e=0;eo&&(r=e,o=n);return r}function Qa(t){return t.reduce(ti,0)}function ti(t,n){return t+n[1]}function ni(t,n){return ei(t,Math.ceil(Math.log(n.length)/Math.LN2+1))}function ei(t,n){for(var e=-1,r=+t[0],o=(t[1]-r)/n,a=[];++e<=n;)a[e]=o*e+r;return a}function ri(t){return[a.min(t),a.max(t)]}function oi(t,n){return t.value-n.value}function ai(t,n){var e=t._pack_next;t._pack_next=n,n._pack_prev=t,n._pack_next=e,e._pack_prev=n}function ii(t,n){t._pack_next=n,n._pack_prev=t}function ui(t,n){var e=n.x-t.x,r=n.y-t.y,o=t.r+n.r;return.999*o*o>e*e+r*r}function si(t){if((n=t.children)&&(s=n.length)){var n,e,r,o,a,i,u,s,l=1/0,c=-1/0,f=1/0,h=-1/0;if(n.forEach(li),(e=n[0]).x=-e.r,e.y=0,b(e),s>1&&((r=n[1]).x=r.r,r.y=0,b(r),s>2))for(fi(e,r,o=n[2]),b(o),ai(e,o),e._pack_prev=o,ai(o,r),r=e._pack_next,a=3;a0)for(i=-1;++i=f[0]&&s<=f[1]&&((u=l[a.bisect(h,s,1,d)-1]).y+=m,u.push(o[i]));return l}return o.value=function(t){return arguments.length?(n=t,o):n},o.range=function(t){return arguments.length?(e=bn(t),o):e},o.bins=function(t){return arguments.length?(r="number"==typeof t?function(n){return ei(n,t)}:bn(t),o):r},o.frequency=function(n){return arguments.length?(t=!!n,o):t},o},a.layout.pack=function(){var t,n=a.layout.hierarchy().sort(oi),e=0,r=[1,1];function o(o,a){var i=n.call(this,o,a),u=i[0],s=r[0],l=r[1],c=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(u.x=u.y=0,qa(u,(function(t){t.r=+c(t.value)})),qa(u,si),e){var f=e*(t?1:Math.max(2*u.r/s,2*u.r/l))/2;qa(u,(function(t){t.r+=f})),qa(u,si),qa(u,(function(t){t.r-=f}))}return function t(n,e,r,o){var a=n.children;if(n.x=e+=o*n.x,n.y=r+=o*n.y,n.r*=o,a)for(var i=-1,u=a.length;++ip.x&&(p=t),t.depth>d.depth&&(d=t)}));var m=n(h,p)/2-h.x,g=e[0]/(p.x+n(p,h)/2+m),v=e[1]/(d.depth||1);za(c,(function(t){t.x=(t.x+m)*g,t.y=t.depth*v}))}return l}function i(t){var e=t.children,r=t.parent.children,o=t.i?r[t.i-1]:null;if(e.length){!function(t){for(var n,e=0,r=0,o=t.children,a=o.length;--a>=0;)(n=o[a]).z+=e,n.m+=e,e+=n.s+(r+=n.c)}(t);var a=(e[0].z+e[e.length-1].z)/2;o?(t.z=o.z+n(t._,o._),t.m=t.z-a):t.z=a}else o&&(t.z=o.z+n(t._,o._));t.parent.A=function(t,e,r){if(e){for(var o,a=t,i=t,u=e,s=a.parent.children[0],l=a.m,c=i.m,f=u.m,h=s.m;u=di(u),a=pi(a),u&&a;)s=pi(s),(i=di(i)).a=t,(o=u.z+f-a.z-l+n(u._,a._))>0&&(mi(gi(u,t,r),t,o),l+=o,c+=o),f+=u.m,l+=a.m,h+=s.m,c+=i.m;u&&!di(i)&&(i.t=u,i.m+=f-c),a&&!pi(s)&&(s.t=a,s.m+=l-h,r=t)}return r}(t,o,t.parent.A||r[0])}function u(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(t){t.x*=e[0],t.y=t.depth*e[1]}return o.separation=function(t){return arguments.length?(n=t,o):n},o.size=function(t){return arguments.length?(r=null==(e=t)?s:null,o):r?null:e},o.nodeSize=function(t){return arguments.length?(r=null==(e=t)?null:s,o):r?e:null},ja(o,t)},a.layout.cluster=function(){var t=a.layout.hierarchy().sort(null).value(null),n=hi,e=[1,1],r=!1;function o(o,i){var u,s=t.call(this,o,i),l=s[0],c=0;qa(l,(function(t){var e=t.children;e&&e.length?(t.x=function(t){return t.reduce((function(t,n){return t+n.x}),0)/t.length}(e),t.y=function(t){return 1+a.max(t,(function(t){return t.y}))}(e)):(t.x=u?c+=n(t,u):0,t.y=0,u=t)}));var f=function t(n){var e=n.children;return e&&e.length?t(e[0]):n}(l),h=function t(n){var e,r=n.children;return r&&(e=r.length)?t(r[e-1]):n}(l),p=f.x-n(f,h)/2,d=h.x+n(h,f)/2;return qa(l,r?function(t){t.x=(t.x-l.x)*e[0],t.y=(l.y-t.y)*e[1]}:function(t){t.x=(t.x-p)/(d-p)*e[0],t.y=(1-(l.y?t.y/l.y:1))*e[1]}),s}return o.separation=function(t){return arguments.length?(n=t,o):n},o.size=function(t){return arguments.length?(r=null==(e=t),o):r?null:e},o.nodeSize=function(t){return arguments.length?(r=null!=(e=t),o):r?e:null},ja(o,t)},a.layout.treemap=function(){var t,n=a.layout.hierarchy(),e=Math.round,r=[1,1],o=null,i=vi,u=!1,s="squarify",l=.5*(1+Math.sqrt(5));function c(t,n){for(var e,r,o=-1,a=t.length;++o0;)u.push(e=l[o-1]),u.area+=e.area,"squarify"!==s||(r=p(u,m))<=h?(l.pop(),h=r):(u.area-=u.pop().area,d(u,m,a,!1),m=Math.min(a.dx,a.dy),u.length=u.area=0,h=1/0);u.length&&(d(u,m,a,!0),u.length=u.area=0),n.forEach(f)}}function h(t){var n=t.children;if(n&&n.length){var e,r=i(t),o=n.slice(),a=[];for(c(o,r.dx*r.dy/t.value),a.area=0;e=o.pop();)a.push(e),a.area+=e.area,null!=e.z&&(d(a,e.z?r.dx:r.dy,r,!o.length),a.length=a.area=0);n.forEach(h)}}function p(t,n){for(var e,r=t.area,o=0,a=1/0,i=-1,u=t.length;++io&&(o=e));return n*=n,(r*=r)?Math.max(n*o*l/r,r/(n*a*l)):1/0}function d(t,n,r,o){var a,i=-1,u=t.length,s=r.x,l=r.y,c=n?e(t.area/n):0;if(n==r.dx){for((o||c>r.dy)&&(c=r.dy);++ir.dx)&&(c=r.dx);++i1);return t+n*e*Math.sqrt(-2*Math.log(o)/o)}},logNormal:function(){var t=a.random.normal.apply(a,arguments);return function(){return Math.exp(t())}},bates:function(t){var n=a.random.irwinHall(t);return function(){return n()/t}},irwinHall:function(t){return function(){for(var n=0,e=0;e2?Si:Mi,u=o?Ea:Aa;return a=t(n,e,u,r),i=t(e,n,u,oa),s}function s(t){return a(t)}return s.invert=function(t){return i(t)},s.domain=function(t){return arguments.length?(n=t.map(Number),u()):n},s.range=function(t){return arguments.length?(e=t,u()):e},s.rangeRound=function(t){return s.range(t).interpolate(ba)},s.clamp=function(t){return arguments.length?(o=t,u()):o},s.interpolate=function(t){return arguments.length?(r=t,u()):r},s.ticks=function(t){return Ri(n,t)},s.tickFormat=function(t,e){return Pi(n,t,e)},s.nice=function(t){return Ei(n,t),u()},s.copy=function(){return t(n,e,r,o)},u()}([0,1],[0,1],oa,!1)};var Ni={s:1,g:1,p:1,r:1,e:1};function Oi(t){return-Math.floor(Math.log(t)/Math.LN10+.01)}a.scale.log=function(){return function t(n,e,r,o){function i(t){return(r?Math.log(t<0?0:t):-Math.log(t>0?0:-t))/Math.log(e)}function u(t){return r?Math.pow(e,t):-Math.pow(e,-t)}function s(t){return n(i(t))}return s.invert=function(t){return u(n.invert(t))},s.domain=function(t){return arguments.length?(r=t[0]>=0,n.domain((o=t.map(Number)).map(i)),s):o},s.base=function(t){return arguments.length?(e=+t,n.domain(o.map(i)),s):e},s.nice=function(){var t=wi(o.map(i),r?Math:Li);return n.domain(t),o=t.map(u),s},s.ticks=function(){var t=bi(o),n=[],a=t[0],s=t[1],l=Math.floor(i(a)),c=Math.ceil(i(s)),f=e%1?2:e;if(isFinite(c-l)){if(r){for(;l0;h--)n.push(u(l)*h);for(l=0;n[l]s;c--);n=n.slice(l,c)}return n},s.tickFormat=function(t,n){if(!arguments.length)return Ci;arguments.length<2?n=Ci:"function"!=typeof n&&(n=a.format(n));var r=Math.max(1,e*t/s.ticks().length);return function(t){var o=t/u(Math.round(i(t)));return o*e0?r[t-1]:n[0],tf?0:1;if(l=Ot)return s(l,p)+(u?s(u,1-p):"")+"Z";var d,m,g,v,y,b,x,M,w,_,k,S,A=0,E=0,T=[];if((v=(+i.apply(this,arguments)||0)/2)&&(g=r===Bi?Math.sqrt(u*u+l*l):+r.apply(this,arguments),p||(E*=-1),l&&(E=qt(g/l*Math.sin(v))),u&&(A=qt(g/u*Math.sin(v)))),l){y=l*Math.cos(c+E),b=l*Math.sin(c+E),x=l*Math.cos(f-E),M=l*Math.sin(f-E);var R=Math.abs(f-c-2*E)<=Pt?0:1;if(E&&Gi(y,b,x,M)===p^R){var P=(c+f)/2;y=l*Math.cos(P),b=l*Math.sin(P),x=M=null}}else y=b=0;if(u){w=u*Math.cos(f-A),_=u*Math.sin(f-A),k=u*Math.cos(c+A),S=u*Math.sin(c+A);var N=Math.abs(c-f+2*A)<=Pt?0:1;if(A&&Gi(w,_,k,S)===1-p^N){var O=(c+f)/2;w=u*Math.cos(O),_=u*Math.sin(O),k=S=null}}else w=_=0;if(h>Tt&&(d=Math.min(Math.abs(l-u)/2,+e.apply(this,arguments)))>.001){m=u0?0:1}function Wi(t,n,e,r,o){var a=t[0]-n[0],i=t[1]-n[1],u=(o?r:-r)/Math.sqrt(a*a+i*i),s=u*i,l=-u*a,c=t[0]+s,f=t[1]+l,h=n[0]+s,p=n[1]+l,d=(c+h)/2,m=(f+p)/2,g=h-c,v=p-f,y=g*g+v*v,b=e-r,x=c*p-h*f,M=(v<0?-1:1)*Math.sqrt(Math.max(0,b*b*y-x*x)),w=(x*v-g*M)/y,_=(-x*g-v*M)/y,k=(x*v+g*M)/y,S=(-x*g+v*M)/y,A=w-d,E=_-m,T=k-d,R=S-m;return A*A+E*E>T*T+R*R&&(w=k,_=S),[[w-s,_-l],[w*e/b,_*e/b]]}function Zi(t){var n=io,e=uo,r=$e,o=$i,a=o.key,i=.7;function u(a){var u,s=[],l=[],c=-1,f=a.length,h=bn(n),p=bn(e);function d(){s.push("M",o(t(l),i))}for(;++c1&&o.push("H",r[0]),o.join("")},"step-before":Qi,"step-after":tu,basis:ru,"basis-open":function(t){if(t.length<4)return $i(t);for(var n,e=[],r=-1,o=t.length,a=[0],i=[0];++r<3;)n=t[r],a.push(n[0]),i.push(n[1]);for(e.push(ou(uu,a)+","+ou(uu,i)),--r;++r9&&(o=3*n/Math.sqrt(o),i[u]=o*e,i[u+1]=o*r));for(u=-1;++u<=s;)o=(t[Math.min(s,u+1)][0]-t[Math.max(0,u-1)][0])/(6*(1+i[u]*i[u])),a.push([o||0,i[u]*o||0]);return a}(t))}});function $i(t){return t.length>1?t.join("L"):t+"Z"}function Ki(t){return t.join("L")+"Z"}function Qi(t){for(var n=0,e=t.length,r=t[0],o=[r[0],",",r[1]];++n1){u=n[1],a=t[s],s++,r+="C"+(o[0]+i[0])+","+(o[1]+i[1])+","+(a[0]-u[0])+","+(a[1]-u[1])+","+a[0]+","+a[1];for(var l=2;lPt)+",1 "+n}function s(t,n,e,r){return"Q 0,0 "+r}return a.radius=function(t){return arguments.length?(e=bn(t),a):e},a.source=function(n){return arguments.length?(t=bn(n),a):t},a.target=function(t){return arguments.length?(n=bn(t),a):n},a.startAngle=function(t){return arguments.length?(r=bn(t),a):r},a.endAngle=function(t){return arguments.length?(o=bn(t),a):o},a},a.svg.diagonal=function(){var t=Hr,n=Gr,e=pu;function r(r,o){var a=t.call(this,r,o),i=n.call(this,r,o),u=(a.y+i.y)/2,s=[a,{x:a.x,y:u},{x:i.x,y:u},i];return"M"+(s=s.map(e))[0]+"C"+s[1]+" "+s[2]+" "+s[3]}return r.source=function(n){return arguments.length?(t=bn(n),r):t},r.target=function(t){return arguments.length?(n=bn(t),r):n},r.projection=function(t){return arguments.length?(e=t,r):e},r},a.svg.diagonal.radial=function(){var t=a.svg.diagonal(),n=pu,e=t.projection;return t.projection=function(t){return arguments.length?e(du(n=t)):n},t},a.svg.symbol=function(){var t=gu,n=mu;function e(e,r){return(yu.get(t.call(this,e,r))||vu)(n.call(this,e,r))}return e.type=function(n){return arguments.length?(t=bn(n),e):t},e.size=function(t){return arguments.length?(n=bn(t),e):n},e};var yu=a.map({circle:vu,cross:function(t){var n=Math.sqrt(t/5)/2;return"M"+-3*n+","+-n+"H"+-n+"V"+-3*n+"H"+n+"V"+-n+"H"+3*n+"V"+n+"H"+n+"V"+3*n+"H"+-n+"V"+n+"H"+-3*n+"Z"},diamond:function(t){var n=Math.sqrt(t/(2*xu)),e=n*xu;return"M0,"+-n+"L"+e+",0 0,"+n+" "+-e+",0Z"},square:function(t){var n=Math.sqrt(t)/2;return"M"+-n+","+-n+"L"+n+","+-n+" "+n+","+n+" "+-n+","+n+"Z"},"triangle-down":function(t){var n=Math.sqrt(t/bu),e=n*bu/2;return"M0,"+e+"L"+n+","+-e+" "+-n+","+-e+"Z"},"triangle-up":function(t){var n=Math.sqrt(t/bu),e=n*bu/2;return"M0,"+-e+"L"+n+","+e+" "+-n+","+e+"Z"}});a.svg.symbolTypes=yu.keys();var bu=Math.sqrt(3),xu=Math.tan(30*Lt);J.transition=function(t){for(var n,e,r=ku||++Eu,o=Pu(t),a=[],i=Su||{time:Date.now(),ease:da,delay:0,duration:250},u=-1,s=this.length;++u0;)l[--h].call(t,i);if(a>=1)return f.event&&f.event.end.call(t,t.__data__,n),--c.count?delete c[r]:delete t[e],1}f||(a=o.time,i=En((function(t){var n=f.delay;if(i.t=n+a,n<=t)return h(t-n);i.c=h}),0,a),f=c[r]={tween:new S,time:a,timer:i,delay:o.delay,duration:o.duration,ease:o.ease,index:n},o=null,++c.count)}Au.call=J.call,Au.empty=J.empty,Au.node=J.node,Au.size=J.size,a.transition=function(t,n){return t&&t.transition?ku?t.transition(n):t:a.selection().transition(t)},a.transition.prototype=Au,Au.select=function(t){var n,e,r,o=this.id,a=this.namespace,i=[];t=$(t);for(var u=-1,s=this.length;++urect,.s>rect").attr("width",i[1]-i[0])}function m(t){t.select(".extent").attr("y",u[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",u[1]-u[0])}function g(){var f,g,v=this,y=a.select(a.event.target),b=e.of(v,arguments),x=a.select(v),M=y.datum(),w=!/^(n|s)$/.test(M)&&r,_=!/^(e|w)$/.test(M)&&o,k=y.classed("extent"),S=kt(v),A=a.mouse(v),E=a.select(c(v)).on("keydown.brush",P).on("keyup.brush",N);if(a.event.changedTouches?E.on("touchmove.brush",O).on("touchend.brush",L):E.on("mousemove.brush",O).on("mouseup.brush",L),x.interrupt().selectAll("*").interrupt(),k)A[0]=i[0]-A[0],A[1]=u[0]-A[1];else if(M){var T=+/w$/.test(M),R=+/^n/.test(M);g=[i[1-T]-A[0],u[1-R]-A[1]],A[0]=i[T],A[1]=u[R]}else a.event.altKey&&(f=A.slice());function P(){32==a.event.keyCode&&(k||(f=null,A[0]-=i[1],A[1]-=u[1],k=2),B())}function N(){32==a.event.keyCode&&2==k&&(A[0]+=i[1],A[1]+=u[1],k=0,B())}function O(){var t=a.mouse(v),n=!1;g&&(t[0]+=g[0],t[1]+=g[1]),k||(a.event.altKey?(f||(f=[(i[0]+i[1])/2,(u[0]+u[1])/2]),A[0]=i[+(t[0]1?{floor:function(n){for(;u(n=t.floor(n));)n=Xu(n-1);return n},ceil:function(n){for(;u(n=t.ceil(n));)n=Xu(+n+1);return n}}:t))},r.ticks=function(t,n){var e=bi(r.domain()),a=null==t?o(e,10):"number"==typeof t?o(e,t):!t.range&&[{range:t},n];return a&&(t=a[0],n=a[1]),t.range(e[0],Xu(+e[1]+1),n<1?1:n)},r.tickFormat=function(){return e},r.copy=function(){return Iu(t.copy(),n,e)},Ai(r,t)}function Xu(t){return new Date(t)}zu.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Bu:Fu,Bu.parse=function(t){var n=new Date(t);return isNaN(n)?null:n},Bu.toString=Fu.toString,jn.second=Bn((function(t){return new zn(1e3*Math.floor(t/1e3))}),(function(t,n){t.setTime(t.getTime()+1e3*Math.floor(n))}),(function(t){return t.getSeconds()})),jn.seconds=jn.second.range,jn.seconds.utc=jn.second.utc.range,jn.minute=Bn((function(t){return new zn(6e4*Math.floor(t/6e4))}),(function(t,n){t.setTime(t.getTime()+6e4*Math.floor(n))}),(function(t){return t.getMinutes()})),jn.minutes=jn.minute.range,jn.minutes.utc=jn.minute.utc.range,jn.hour=Bn((function(t){var n=t.getTimezoneOffset()/60;return new zn(36e5*(Math.floor(t/36e5-n)+n))}),(function(t,n){t.setTime(t.getTime()+36e5*Math.floor(n))}),(function(t){return t.getHours()})),jn.hours=jn.hour.range,jn.hours.utc=jn.hour.utc.range,jn.month=Bn((function(t){return(t=jn.day(t)).setDate(1),t}),(function(t,n){t.setMonth(t.getMonth()+n)}),(function(t){return t.getMonth()})),jn.months=jn.month.range,jn.months.utc=jn.month.utc.range;var Yu=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Vu=[[jn.second,1],[jn.second,5],[jn.second,15],[jn.second,30],[jn.minute,1],[jn.minute,5],[jn.minute,15],[jn.minute,30],[jn.hour,1],[jn.hour,3],[jn.hour,6],[jn.hour,12],[jn.day,1],[jn.day,2],[jn.week,1],[jn.month,1],[jn.month,3],[jn.year,1]],Hu=zu.multi([[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["%I:%M",function(t){return t.getMinutes()}],["%I %p",function(t){return t.getHours()}],["%a %d",function(t){return t.getDay()&&1!=t.getDate()}],["%b %d",function(t){return 1!=t.getDate()}],["%B",function(t){return t.getMonth()}],["%Y",$e]]),Gu={range:function(t,n,e){return a.range(Math.ceil(t/e)*e,+n,e).map(Xu)},floor:L,ceil:L};Vu.year=jn.year,jn.scale=function(){return Iu(a.scale.linear(),Vu,Hu)};var Wu=Vu.map((function(t){return[t[0].utc,t[1]]})),Zu=qu.multi([[".%L",function(t){return t.getUTCMilliseconds()}],[":%S",function(t){return t.getUTCSeconds()}],["%I:%M",function(t){return t.getUTCMinutes()}],["%I %p",function(t){return t.getUTCHours()}],["%a %d",function(t){return t.getUTCDay()&&1!=t.getUTCDate()}],["%b %d",function(t){return 1!=t.getUTCDate()}],["%B",function(t){return t.getUTCMonth()}],["%Y",$e]]);function Ju(t){return JSON.parse(t.responseText)}function $u(t){var n=s.createRange();return n.selectNode(s.body),n.createContextualFragment(t.responseText)}Wu.year=jn.year.utc,jn.scale.utc=function(){return Iu(a.scale.linear(),Wu,Zu)},a.text=xn((function(t){return t.responseText})),a.json=function(t,n){return Mn(t,"application/json",Ju,n)},a.html=function(t,n){return Mn(t,"text/html",$u,n)},a.xml=xn((function(t){return t.responseXML})),this.d3=a,void 0===(o="function"==typeof(r=a)?r.call(n,e,n,t):r)||(t.exports=o)}()}])},t.exports=o()},function(t,n,e){"use strict";var r=e(29);function o(){}t.exports=function(){function t(t,n,e,o,a,i){if(i!==r){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function n(){return t}t.isRequired=t;var e={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:n,element:t,instanceOf:n,node:t,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n};return e.checkPropTypes=o,e.PropTypes=e,e}},function(t,n,e){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,n,e){"use strict";var r=e(7),o=e(31),a=e(32),i=e(6),u=e(8),s=e(26),l=e(33);function c(t,n){return n=n.split("// __split__"),new o.Program(t,n[0],n[1])}t.exports=function(t,n,e){var f,h,p,d,m,g,v,y,b,x,M,w,_,k,S,A,E,T,R,P,N,O,C,L,U,D,j,z=this,q=null,F=null,B=null,I=null,X=null,Y=null,V=0,H=!1,G=!1;function W(t){p.viewport(0,0,e,e);var o=u.clone(t);o.zoom=1/f,o.translation.x=0,o.translation.y=0;for(var a=r.mat4.create(),i=0;i<3;i++){var s=r.vec3.random(r.vec3.create(),1);r.mat4.rotate(a,a,10*Math.random(),s)}o.rotation=r.mat4.multiply(r.mat4.create(),a,o.rotation),E.bind(),p.clear(p.COLOR_BUFFER_BIT|p.DEPTH_BUFFER_BIT);var l=u.getRect(o),c=r.mat4.create();r.mat4.ortho(c,l.left,l.right,l.bottom,l.top,0,f);var h=r.mat4.create();r.mat4.lookAt(h,[0,0,0],[0,0,-1],[0,1,0]);var d=r.mat4.create();r.mat4.translate(d,d,[0,0,-f/2]),r.mat4.multiply(d,d,o.rotation),N.setUniform("uProjection","Matrix4fv",!1,c),N.setUniform("uView","Matrix4fv",!1,h),N.setUniform("uModel","Matrix4fv",!1,d),N.setUniform("uBottomLeft","2fv",[l.left,l.bottom]),N.setUniform("uTopRight","2fv",[l.right,l.top]),N.setUniform("uAtomScale","1f",2.5*o.atomScale),N.setUniform("uRelativeAtomScale","1f",t.relativeAtomScale),N.setUniform("uRes","1f",e),N.setUniform("uDepth","1f",f),N.setUniform("uMode","1i",0),N.setUniform("uAtomShade","1f",t.atomShade),q.render(),t.bonds&&null!=F&&(O.setUniform("uProjection","Matrix4fv",!1,c),O.setUniform("uView","Matrix4fv",!1,h),O.setUniform("uModel","Matrix4fv",!1,d),O.setUniform("uRotation","Matrix4fv",!1,o.rotation),O.setUniform("uDepth","1f",f),O.setUniform("uBottomLeft","2fv",[l.left,l.bottom]),O.setUniform("uTopRight","2fv",[l.right,l.top]),O.setUniform("uRes","1f",e),O.setUniform("uBondRadius","1f",2.5*u.getBondRadius(t)),O.setUniform("uBondShade","1f",t.bondShade),O.setUniform("uAtomScale","1f",2.5*t.atomScale),O.setUniform("uRelativeAtomScale","1f",t.relativeAtomScale),O.setUniform("uMode","1i",0),F.render()),p.viewport(0,0,n,n);var y=u.getRect(t),x=u.getRect(o),M=r.mat4.invert(r.mat4.create(),a);T.bind(),p.clear(p.COLOR_BUFFER_BIT|p.DEPTH_BUFFER_BIT),C.setUniform("uSceneDepth","1i",g.index),C.setUniform("uSceneNormal","1i",m.index),C.setUniform("uRandRotDepth","1i",v.index),C.setUniform("uAccumulator","1i",b.index),C.setUniform("uSceneBottomLeft","2fv",[y.left,y.bottom]),C.setUniform("uSceneTopRight","2fv",[y.right,y.top]),C.setUniform("uRotBottomLeft","2fv",[x.left,x.bottom]),C.setUniform("uRotTopRight","2fv",[x.right,x.top]),C.setUniform("uRes","1f",n),C.setUniform("uDepth","1f",f),C.setUniform("uRot","Matrix4fv",!1,a),C.setUniform("uInvRot","Matrix4fv",!1,M),C.setUniform("uSampleCount","1i",V),B.render(),b.activate(),b.bind(),p.copyTexImage2D(p.TEXTURE_2D,0,p.RGBA,0,0,n,n,0)}z.getAOProgress=function(){return V/1024},z.initialize=function(){t.width=t.height=n,(p=t.getContext("webgl")).enable(p.DEPTH_TEST),p.enable(p.CULL_FACE),p.clearColor(0,0,0,0),p.clearDepth(1),p.viewport(0,0,n,n),window.gl=p,o.getExtensions(p,["EXT_frag_depth","WEBGL_depth_texture"]),z.createTextures(),N=c(p,l.shaders.atom),O=c(p,l.shaders.bond),j=c(p,l.shaders["textured-quad"]),C=c(p,l.shaders.accumulator),L=c(p,l.shaders.ao),U=c(p,l.shaders.fxaa),D=c(p,l.shaders.dof);var e=[-1,-1,0,1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,1,0],r=o.buildAttribs(p,{aPosition:3});r.aPosition.buffer.set(new Float32Array(e));var a=e.length/9;new o.Renderable(p,j,r,a),B=new o.Renderable(p,C,r,a),I=new o.Renderable(p,L,r,a),Y=new o.Renderable(p,U,r,a),X=new o.Renderable(p,D,r,a),0},z.createTextures=function(){y=new o.Texture(p,0,null,e,e),v=new o.Texture(p,1,null,e,e,{internalFormat:p.DEPTH_COMPONENT,format:p.DEPTH_COMPONENT,type:p.UNSIGNED_SHORT}),E=new o.Framebuffer(p,[y],v),d=new o.Texture(p,2,null,n,n),m=new o.Texture(p,3,null,n,n),g=new o.Texture(p,4,null,n,n,{internalFormat:p.DEPTH_COMPONENT,format:p.DEPTH_COMPONENT,type:p.UNSIGNED_SHORT}),S=new o.Framebuffer(p,[d],g),A=new o.Framebuffer(p,[m],g),b=new o.Texture(p,5,null,n,n),x=new o.Texture(p,6,null,n,n),T=new o.Framebuffer(p,[x]),k=new o.Texture(p,7,null,n,n),P=new o.Framebuffer(p,[k]),M=new o.Texture(p,8,null,n,n),w=new o.Texture(p,9,null,n,n),R=new o.Framebuffer(p,[w]),_=new o.Texture(p,10,null,n,n),new o.Framebuffer(p,[_])},z.setResolution=function(r,o){e=o,n=r,t.width=t.height=n,p.viewport(0,0,n,n),z.createTextures()},z.setSystem=function(t,n){function e(t){for(var n=[],e=0;e<36;e++)n.push.apply(n,t);return n}h=t;for(var r=o.buildAttribs(p,{aImposter:3,aPosition:3,aRadius:1,aColor:3}),u=[],s=[],l=[],c=[],f=0;f0)){r=o.buildAttribs(p,{aImposter:3,aPosA:3,aPosB:3,aRadA:1,aRadB:1,aColA:3,aColB:3}),u=[];var v=[],y=[],b=[],x=[],M=[],w=[];for(f=0;fn.bondThreshold)break;u.push.apply(u,a.position),v.push.apply(v,e([_.posA.x,_.posA.y,_.posA.z])),y.push.apply(y,e([_.posB.x,_.posB.y,_.posB.z])),b.push.apply(b,e([_.radA])),x.push.apply(x,e([_.radB])),M.push.apply(M,e([_.colA.r,_.colA.g,_.colA.b])),w.push.apply(w,e([_.colB.r,_.colB.g,_.colB.b]))}r.aImposter.buffer.set(new Float32Array(u)),r.aPosA.buffer.set(new Float32Array(v)),r.aPosB.buffer.set(new Float32Array(y)),r.aRadA.buffer.set(new Float32Array(b)),r.aRadB.buffer.set(new Float32Array(x)),r.aColA.buffer.set(new Float32Array(M)),r.aColB.buffer.set(new Float32Array(w));g=u.length/9;F=new o.Renderable(p,O,r,g)}},z.reset=function(){V=0,H=!1,G=!1,b.reset(),x.reset()},z.render=function(t){if(void 0!==h&&null!=q){if(f=2*s.getRadius(h),H)if(G)for(var e=0;e1024);e++)W(t),V++;else!function(t){G=!0,p.viewport(0,0,n,n),A.bind(),p.clear(p.COLOR_BUFFER_BIT|p.DEPTH_BUFFER_BIT);var e=u.getRect(t),o=r.mat4.create();r.mat4.ortho(o,e.left,e.right,e.bottom,e.top,0,f);var a=r.mat4.create();r.mat4.lookAt(a,[0,0,0],[0,0,-1],[0,1,0]);var i=r.mat4.create();r.mat4.translate(i,i,[0,0,-f/2]),r.mat4.multiply(i,i,t.rotation),N.setUniform("uProjection","Matrix4fv",!1,o),N.setUniform("uView","Matrix4fv",!1,a),N.setUniform("uModel","Matrix4fv",!1,i),N.setUniform("uBottomLeft","2fv",[e.left,e.bottom]),N.setUniform("uTopRight","2fv",[e.right,e.top]),N.setUniform("uAtomScale","1f",2.5*t.atomScale),N.setUniform("uRelativeAtomScale","1f",t.relativeAtomScale),N.setUniform("uRes","1f",n),N.setUniform("uDepth","1f",f),N.setUniform("uMode","1i",1),N.setUniform("uAtomShade","1f",t.atomShade),q.render(),t.bonds&&null!=F&&(A.bind(),O.setUniform("uProjection","Matrix4fv",!1,o),O.setUniform("uView","Matrix4fv",!1,a),O.setUniform("uModel","Matrix4fv",!1,i),O.setUniform("uRotation","Matrix4fv",!1,t.rotation),O.setUniform("uDepth","1f",f),O.setUniform("uBottomLeft","2fv",[e.left,e.bottom]),O.setUniform("uTopRight","2fv",[e.right,e.top]),O.setUniform("uRes","1f",n),O.setUniform("uBondRadius","1f",2.5*u.getBondRadius(t)),O.setUniform("uBondShade","1f",t.bondShade),O.setUniform("uAtomScale","1f",2.5*t.atomScale),O.setUniform("uRelativeAtomScale","1f",t.relativeAtomScale),O.setUniform("uMode","1i",1),F.render())}(t);else!function(t){H=!0,p.viewport(0,0,n,n),S.bind(),p.clear(p.COLOR_BUFFER_BIT|p.DEPTH_BUFFER_BIT);var e=u.getRect(t),o=r.mat4.create();r.mat4.ortho(o,e.left,e.right,e.bottom,e.top,0,f);var a=r.mat4.create();r.mat4.lookAt(a,[0,0,0],[0,0,-1],[0,1,0]);var i=r.mat4.create();r.mat4.translate(i,i,[0,0,-f/2]),r.mat4.multiply(i,i,t.rotation),N.setUniform("uProjection","Matrix4fv",!1,o),N.setUniform("uView","Matrix4fv",!1,a),N.setUniform("uModel","Matrix4fv",!1,i),N.setUniform("uBottomLeft","2fv",[e.left,e.bottom]),N.setUniform("uTopRight","2fv",[e.right,e.top]),N.setUniform("uAtomScale","1f",2.5*t.atomScale),N.setUniform("uRelativeAtomScale","1f",t.relativeAtomScale),N.setUniform("uRes","1f",n),N.setUniform("uDepth","1f",f),N.setUniform("uMode","1i",0),N.setUniform("uAtomShade","1f",t.atomShade),q.render(),t.bonds&&null!=F&&(S.bind(),O.setUniform("uProjection","Matrix4fv",!1,o),O.setUniform("uView","Matrix4fv",!1,a),O.setUniform("uModel","Matrix4fv",!1,i),O.setUniform("uRotation","Matrix4fv",!1,t.rotation),O.setUniform("uDepth","1f",f),O.setUniform("uBottomLeft","2fv",[e.left,e.bottom]),O.setUniform("uTopRight","2fv",[e.right,e.top]),O.setUniform("uRes","1f",n),O.setUniform("uBondRadius","1f",2.5*u.getBondRadius(t)),O.setUniform("uBondShade","1f",t.bondShade),O.setUniform("uAtomScale","1f",2.5*t.atomScale),O.setUniform("uRelativeAtomScale","1f",t.relativeAtomScale),O.setUniform("uMode","1i",0),F.render())}(t);!function(t){p.viewport(0,0,n,n),t.fxaa>0||t.dofStrength>0?P.bind():p.bindFramebuffer(p.FRAMEBUFFER,null);if(p.clear(p.COLOR_BUFFER_BIT|p.DEPTH_BUFFER_BIT),L.setUniform("uSceneColor","1i",d.index),L.setUniform("uSceneDepth","1i",g.index),L.setUniform("uAccumulatorOut","1i",x.index),L.setUniform("uRes","1f",n),L.setUniform("uAO","1f",2*t.ao),L.setUniform("uBrightness","1f",2*t.brightness),L.setUniform("uOutlineStrength","1f",t.outline),I.render(),t.fxaa>0){t.dofStrength>0?R.bind():p.bindFramebuffer(p.FRAMEBUFFER,null);for(var e=0;e0&&(p.bindFramebuffer(p.FRAMEBUFFER,null),p.clear(p.COLOR_BUFFER_BIT|p.DEPTH_BUFFER_BIT),t.fxaa>0?D.setUniform("uColor","1i",M.index):D.setUniform("uColor","1i",k.index),D.setUniform("uDepth","1i",g.index),D.setUniform("uDOFPosition","1f",t.dofPosition),D.setUniform("uDOFStrength","1f",t.dofStrength),D.setUniform("uRes","1f",n),X.render())}(t)}},z.initialize()}},function(t,n){function e(t){var n=this;n.initialize=function(){n.buffer=t.createBuffer()},n.bind=function(){t.bindBuffer(t.ARRAY_BUFFER,n.buffer)},n.set=function(e){n.bind(),t.bufferData(t.ARRAY_BUFFER,e,t.STATIC_DRAW)},n.initialize()}t.exports.buildAttribs=function(t,n){var r={};for(var o in n)r[o]={buffer:new e(t),size:n[o]};return r},t.exports.getExtensions=function(t,n){for(var e={},r=0;r1){for(var a=[],i=0;i 0.0) {\n float depth = texture2D(uSceneDepth, p).r;\n float r = 1.0/511.0;\n float d0 = abs(texture2D(uSceneDepth, p + vec2(-r, 0)).r - depth);\n float d1 = abs(texture2D(uSceneDepth, p + vec2( r, 0)).r - depth);\n float d2 = abs(texture2D(uSceneDepth, p + vec2( 0, -r)).r - depth);\n float d3 = abs(texture2D(uSceneDepth, p + vec2( 0, r)).r - depth);\n float d = max(d0, d1);\n d = max(d, d2);\n d = max(d, d3);\n sceneColor.rgb *= pow(1.0 - d, uOutlineStrength * 32.0);\n sceneColor.a = max(step(0.003, d), sceneColor.a);\n }\n vec4 dAccum = texture2D(uAccumulatorOut, p);\n float shade = max(0.0, 1.0 - (dAccum.r + dAccum.g + dAccum.b + dAccum.a) * 0.25 * uAO);\n shade = pow(shade, 2.0);\n gl_FragColor = vec4(uBrightness * sceneColor.rgb * shade, sceneColor.a);\n}\n",atom:"#version 100\nprecision highp float;\n\nattribute vec3 aImposter;\nattribute vec3 aPosition;\nattribute float aRadius;\nattribute vec3 aColor;\n\nuniform mat4 uView;\nuniform mat4 uProjection;\nuniform mat4 uModel;\nuniform float uAtomScale;\nuniform float uRelativeAtomScale;\nuniform float uAtomShade;\n\nvarying vec3 vColor;\nvarying vec3 vPosition;\nvarying float vRadius;\n\nvoid main() {\n vRadius = uAtomScale * (1.0 + (aRadius - 1.0) * uRelativeAtomScale);\n gl_Position = uProjection * uView * uModel * vec4(vRadius * aImposter + aPosition, 1.0);\n vColor = mix(aColor, vec3(1,1,1), uAtomShade);\n vPosition = vec3(uModel * vec4(aPosition, 1));\n}\n\n\n// __split__\n\n\n#version 100\n#extension GL_EXT_frag_depth: enable\nprecision highp float;\n\nuniform vec2 uBottomLeft;\nuniform vec2 uTopRight;\nuniform float uRes;\nuniform float uDepth;\nuniform int uMode;\n\nvarying vec3 vPosition;\nvarying float vRadius;\nvarying vec3 vColor;\n\nvec2 res = vec2(uRes, uRes);\n\nfloat raySphereIntersect(vec3 r0, vec3 rd) {\n float a = dot(rd, rd);\n vec3 s0_r0 = r0 - vPosition;\n float b = 2.0 * dot(rd, s0_r0);\n float c = dot(s0_r0, s0_r0) - (vRadius * vRadius);\n float disc = b*b - 4.0*a*c;\n if (disc <= 0.0) {\n return -1.0;\n }\n return (-b - sqrt(disc))/(2.0*a);\n}\n\nvoid main() {\n vec3 r0 = vec3(uBottomLeft + (gl_FragCoord.xy/res) * (uTopRight - uBottomLeft), 0.0);\n vec3 rd = vec3(0, 0, -1);\n float t = raySphereIntersect(r0, rd);\n if (t < 0.0) {\n discard;\n }\n vec3 coord = r0 + rd * t;\n vec3 normal = normalize(coord - vPosition);\n if (uMode == 0) {\n gl_FragColor = vec4(vColor, 1);\n } else if (uMode == 1) {\n gl_FragColor = vec4(normal * 0.5 + 0.5, 1.0);\n }\n gl_FragDepthEXT = -coord.z/uDepth;\n}\n",blur:"#version 100\nprecision highp float;\n\nattribute vec3 aPosition;\n\nvoid main() {\n gl_Position = vec4(aPosition, 1);\n}\n\n\n// __split__\n\n\n#version 100\nprecision highp float;\n\nuniform sampler2D uTexture;\nuniform float uRes;\nuniform int leftRight;\n\nvoid main() {\n vec2 dir;\n if (leftRight == 1) {\n dir = vec2(1,0)/uRes;\n } else {\n dir = vec2(0,1)/uRes;\n }\n const int range = 16;\n vec4 sample = vec4(0,0,0,0);\n for (int i = -range; i <= range; i++) {\n vec2 p = gl_FragCoord.xy/uRes + dir * float(i);\n sample += texture2D(uTexture, p);\n }\n sample /= float(range) * 2.0 + 1.0;\n gl_FragColor = sample;\n}\n",bond:"#version 100\nprecision highp float;\n\nattribute vec3 aImposter;\nattribute vec3 aPosA;\nattribute vec3 aPosB;\nattribute float aRadA;\nattribute float aRadB;\nattribute vec3 aColA;\nattribute vec3 aColB;\n\nuniform mat4 uView;\nuniform mat4 uProjection;\nuniform mat4 uModel;\nuniform mat4 uRotation;\nuniform float uBondRadius;\nuniform float uAtomScale;\nuniform float uRelativeAtomScale;\n\nvarying vec3 vNormal;\nvarying vec3 vPosA, vPosB;\nvarying float vRadA, vRadB;\nvarying vec3 vColA, vColB;\nvarying float vRadius;\n\nmat3 alignVector(vec3 a, vec3 b) {\n vec3 v = cross(a, b);\n float s = length(v);\n float c = dot(a, b);\n mat3 I = mat3(\n 1, 0, 0,\n 0, 1, 0,\n 0, 0, 1\n );\n mat3 vx = mat3(\n 0, v.z, -v.y,\n -v.z, 0, v.x,\n v.y, -v.x, 0\n );\n return I + vx + vx * vx * ((1.0 - c) / (s * s));\n}\n\nvoid main() {\n vRadius = uBondRadius;\n vec3 pos = vec3(aImposter);\n // Scale the box in x and z to be bond-radius.\n pos = pos * vec3(vRadius, 1, vRadius);\n // Shift the origin-centered cube so that the bottom is at the origin.\n pos = pos + vec3(0, 1, 0);\n // Stretch the box in y so that it is the length of the bond.\n pos = pos * vec3(1, length(aPosA - aPosB) * 0.5, 1);\n // Find the rotation that aligns vec3(0, 1, 0) with vec3(uPosB - uPosA) and apply it.\n vec3 a = normalize(vec3(-0.000001, 1.000001, 0.000001));\n vec3 b = normalize(aPosB - aPosA);\n mat3 R = alignVector(a, b);\n pos = R * pos;\n // Shift the cube so that the bottom is centered at the middle of atom A.\n pos = pos + aPosA;\n\n vec4 position = uModel * vec4(pos, 1);\n gl_Position = uProjection * uView * position;\n vPosA = aPosA;\n vPosB = aPosB;\n vRadA = uAtomScale * (1.0 + (aRadA - 1.0) * uRelativeAtomScale);\n vRadB = uAtomScale * (1.0 + (aRadB - 1.0) * uRelativeAtomScale);\n vColA = aColA;\n vColB = aColB;\n}\n\n\n// __split__\n\n\n#version 100\n#extension GL_EXT_frag_depth: enable\nprecision highp float;\n\nuniform mat4 uRotation;\nuniform vec2 uBottomLeft;\nuniform vec2 uTopRight;\nuniform float uDepth;\nuniform float uRes;\nuniform float uBondShade;\nuniform int uMode;\n\nvarying vec3 vPosA, vPosB;\nvarying float vRadA, vRadB;\nvarying vec3 vColA, vColB;\nvarying float vRadius;\n\nmat3 alignVector(vec3 a, vec3 b) {\n vec3 v = cross(a, b);\n float s = length(v);\n float c = dot(a, b);\n mat3 I = mat3(\n 1, 0, 0,\n 0, 1, 0,\n 0, 0, 1\n );\n mat3 vx = mat3(\n 0, v.z, -v.y,\n -v.z, 0, v.x,\n v.y, -v.x, 0\n );\n return I + vx + vx * vx * ((1.0 - c) / (s * s));\n}\n\nvoid main() {\n\n vec2 res = vec2(uRes, uRes);\n vec3 r0 = vec3(uBottomLeft + (gl_FragCoord.xy/res) * (uTopRight - uBottomLeft), uDepth/2.0);\n vec3 rd = vec3(0, 0, -1);\n\n vec3 i = normalize(vPosB - vPosA);\n i = vec3(uRotation * vec4(i, 0));\n vec3 j = normalize(vec3(-0.000001, 1.000001, 0.000001));\n mat3 R = alignVector(i, j);\n\n vec3 r0p = r0 - vec3(uRotation * vec4(vPosA, 0));\n r0p = R * r0p;\n vec3 rdp = R * rd;\n\n float a = dot(rdp.xz, rdp.xz);\n float b = 2.0 * dot(rdp.xz, r0p.xz);\n float c = dot(r0p.xz, r0p.xz) - vRadius*vRadius;\n float disc = b*b - 4.0*a*c;\n if (disc <= 0.0) {\n discard;\n }\n float t = (-b - sqrt(disc))/(2.0*a);\n if (t < 0.0) {\n discard;\n }\n\n vec3 coord = r0p + rdp * t;\n if (coord.y < 0.0 || coord.y > length(vPosA - vPosB)) {\n discard;\n }\n\n vec3 color;\n if (coord.y < vRadA + 0.5 * (length(vPosA - vPosB) - (vRadA + vRadB))) {\n color = vColA;\n } else {\n color = vColB;\n }\n\n color = mix(color, vec3(1,1,1), uBondShade);\n\n R = alignVector(j, i);\n vec3 normal = normalize(R * vec3(coord.x, 0, coord.z));\n\n coord = r0 + rd * t;\n if (uMode == 0) {\n gl_FragColor = vec4(color, 1);\n } else if (uMode == 1) {\n gl_FragColor = vec4(normal * 0.5 + 0.5, 1.0);\n }\n gl_FragDepthEXT = -(coord.z - uDepth/2.0)/uDepth;\n}\n",dof:"#version 100\nprecision highp float;\n\nattribute vec3 aPosition;\n\nvoid main() {\n gl_Position = vec4(aPosition, 1);\n}\n\n\n// __split__\n\n\n#version 100\nprecision highp float;\n\nuniform sampler2D uColor;\nuniform sampler2D uDepth;\nuniform float uRes;\nuniform float uDOFPosition;\nuniform float uDOFStrength;\nuniform int leftRight;\n\nvoid main() {\n\n vec2 samples[64];\n samples[0] = vec2(0.857612, 0.019885);\n samples[1] = vec2(0.563809, -0.028071);\n samples[2] = vec2(0.825599, -0.346856);\n samples[3] = vec2(0.126584, -0.380959);\n samples[4] = vec2(0.782948, 0.594322);\n samples[5] = vec2(0.292148, -0.543265);\n samples[6] = vec2(0.130700, 0.330220);\n samples[7] = vec2(0.236088, 0.159604);\n samples[8] = vec2(-0.305259, 0.810505);\n samples[9] = vec2(0.269616, 0.923026);\n samples[10] = vec2(0.484486, 0.371845);\n samples[11] = vec2(-0.638057, 0.080447);\n samples[12] = vec2(0.199629, 0.667280);\n samples[13] = vec2(-0.861043, -0.370583);\n samples[14] = vec2(-0.040652, -0.996174);\n samples[15] = vec2(0.330458, -0.282111);\n samples[16] = vec2(0.647795, -0.214354);\n samples[17] = vec2(0.030422, -0.189908);\n samples[18] = vec2(0.177430, -0.721124);\n samples[19] = vec2(-0.461163, -0.327434);\n samples[20] = vec2(-0.410012, -0.734504);\n samples[21] = vec2(-0.616334, -0.626069);\n samples[22] = vec2(0.590759, -0.726479);\n samples[23] = vec2(-0.590794, 0.805365);\n samples[24] = vec2(-0.924561, -0.163739);\n samples[25] = vec2(-0.323028, 0.526960);\n samples[26] = vec2(0.642128, 0.752577);\n samples[27] = vec2(0.173625, -0.952386);\n samples[28] = vec2(0.759014, 0.330311);\n samples[29] = vec2(-0.360526, -0.032013);\n samples[30] = vec2(-0.035320, 0.968156);\n samples[31] = vec2(0.585478, -0.431068);\n samples[32] = vec2(-0.244766, -0.906947);\n samples[33] = vec2(-0.853096, 0.184615);\n samples[34] = vec2(-0.089061, 0.104648);\n samples[35] = vec2(-0.437613, 0.285308);\n samples[36] = vec2(-0.654098, 0.379841);\n samples[37] = vec2(-0.128663, 0.456572);\n samples[38] = vec2(0.015980, -0.568170);\n samples[39] = vec2(-0.043966, -0.771940);\n samples[40] = vec2(0.346512, -0.071238);\n samples[41] = vec2(-0.207921, -0.209121);\n samples[42] = vec2(-0.624075, -0.189224);\n samples[43] = vec2(-0.120618, 0.689339);\n samples[44] = vec2(-0.664679, -0.410200);\n samples[45] = vec2(0.371945, -0.880573);\n samples[46] = vec2(-0.743251, 0.629998);\n samples[47] = vec2(-0.191926, -0.413946);\n samples[48] = vec2(0.449574, 0.833373);\n samples[49] = vec2(0.299587, 0.449113);\n samples[50] = vec2(-0.900432, 0.399319);\n samples[51] = vec2(0.762613, -0.544796);\n samples[52] = vec2(0.606462, 0.174233);\n samples[53] = vec2(0.962185, -0.167019);\n samples[54] = vec2(0.960990, 0.249552);\n samples[55] = vec2(0.570397, 0.559146);\n samples[56] = vec2(-0.537514, 0.555019);\n samples[57] = vec2(0.108491, -0.003232);\n samples[58] = vec2(-0.237693, -0.615428);\n samples[59] = vec2(-0.217313, 0.261084);\n samples[60] = vec2(-0.998966, 0.025692);\n samples[61] = vec2(-0.418554, -0.527508);\n samples[62] = vec2(-0.822629, -0.567797);\n samples[63] = vec2(0.061945, 0.522105);\n\n float invRes = 1.0/uRes;\n vec2 coord = gl_FragCoord.xy * invRes;\n\n float strength = uDOFStrength * uRes/768.0;\n\n float depth = texture2D(uDepth, coord).r;\n float range = uDOFPosition - depth;\n float scale = abs(range);\n\n vec4 sample = texture2D(uColor, coord);\n float count = 1.0;\n for(int i = 0; i < 64; i++) {\n vec2 p = samples[i];\n p = coord + scale * 64.0 * strength * p * invRes;\n float d = texture2D(uDepth, p).r;\n float r = uDOFPosition - d;\n float s = abs(r);\n sample += texture2D(uColor, p) * s;\n count += s;\n }\n\n gl_FragColor = sample/count;\n}",fxaa:"#version 100\nprecision highp float;\n\nattribute vec3 aPosition;\n\nvoid main() {\n gl_Position = vec4(aPosition, 1);\n}\n\n\n// __split__\n\n\n#version 100\nprecision highp float;\n\nuniform sampler2D uTexture;\nuniform float uRes;\n\nvoid main() {\n float FXAA_SPAN_MAX = 8.0;\n float FXAA_REDUCE_MUL = 1.0/8.0;\n float FXAA_REDUCE_MIN = 1.0/128.0;\n\n vec2 texCoords = gl_FragCoord.xy/uRes;\n\n vec4 rgbNW = texture2D(uTexture, texCoords + (vec2(-1.0, -1.0) / uRes));\n vec4 rgbNE = texture2D(uTexture, texCoords + (vec2(1.0, -1.0) / uRes));\n vec4 rgbSW = texture2D(uTexture, texCoords + (vec2(-1.0, 1.0) / uRes));\n vec4 rgbSE = texture2D(uTexture, texCoords + (vec2(1.0, 1.0) / uRes));\n vec4 rgbM = texture2D(uTexture, texCoords);\n\n vec4 luma = vec4(0.299, 0.587, 0.114, 1.0);\n float lumaNW = dot(rgbNW, luma);\n float lumaNE = dot(rgbNE, luma);\n float lumaSW = dot(rgbSW, luma);\n float lumaSE = dot(rgbSE, luma);\n float lumaM = dot(rgbM, luma);\n\n float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE)));\n float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE)));\n\n vec2 dir;\n dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));\n dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE));\n\n float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) * (0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN);\n\n float rcpDirMin = 1.0/(min(abs(dir.x), abs(dir.y)) + dirReduce);\n\n dir = min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX), max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX), dir * rcpDirMin)) / uRes;\n\n vec4 rgbA = (1.0/2.0) * \n (texture2D(uTexture, texCoords.xy + dir * (1.0/3.0 - 0.5)) + \n texture2D(uTexture, texCoords.xy + dir * (2.0/3.0 - 0.5)));\n vec4 rgbB = rgbA * (1.0/2.0) + (1.0/4.0) * \n (texture2D(uTexture, texCoords.xy + dir * (0.0/3.0 - 0.5)) +\n texture2D(uTexture, texCoords.xy + dir * (3.0/3.0 - 0.5)));\n float lumaB = dot(rgbB, luma);\n\n if((lumaB < lumaMin) || (lumaB > lumaMax)){\n gl_FragColor = rgbA;\n } else {\n gl_FragColor = rgbB;\n }\n\n}","textured-quad":"#version 100\nprecision highp float;\n\nattribute vec3 aPosition;\n\nvoid main() {\n gl_Position = vec4(aPosition, 1);\n}\n\n\n// __split__\n\n\n#version 100\nprecision highp float;\n\nuniform sampler2D uTexture;\nuniform float uRes;\n\nvoid main() {\n gl_FragColor = texture2D(uTexture, gl_FragCoord.xy/uRes);\n}\n"};t.exports={shaders:r}},function(t,n,e){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=e(8);t.exports=function(t){if(arguments.length>1)throw"Error: The Speck Interactions module has changed!";if(0===arguments.length||"object"!==r(t))throw"Error: Arguments not provided to interactions";var n=void 0===t.scrollZoom||t.scrollZoom,e=t.container,a=t.getRotation,i=t.setRotation,u=t.getTranslation,s=t.setTranslation,l=t.getZoom,c=t.setZoom,f=t.refreshView,h={buttonDown:!1,shiftDown:!1,lastX:0,lastY:0};function p(t){0===t.button&&(h={buttonDown:!0,shiftDown:h.shiftDown,lastX:t.clientX,lastY:t.clientY})}function d(t){if(0===t.button){if(!h.buttonDown)return;h.buttonDown=!1}}function m(t){h.shiftDown=t.shiftKey}function g(t){if(h.buttonDown&&0!==t.buttons){t.preventDefault();var n=t.clientX-h.lastX,e=t.clientY-h.lastY;if(0!==n||0!==e){if(h.lastX=t.clientX,h.lastY=t.clientY,h.shiftDown){var r=u(),c=.001/l();s({x:r.x-n*c,y:r.y+e*c})}else{var p={rotation:new Float32Array(a())};o.rotate(p,n,e),i(p.rotation)}f()}}}function v(t){t.preventDefault(),c(l()*(t.deltaY<0?1/.9:.9)),f()}function y(){e.removeEventListener("mousedown",p),window.removeEventListener("mouseup",d),window.removeEventListener("keydown",m),window.removeEventListener("keyup",m),window.removeEventListener("mousemove",g),e.removeEventListener("wheel",v)}return e.addEventListener("mousedown",p),window.addEventListener("mouseup",d),window.addEventListener("keydown",m),window.addEventListener("keyup",m),window.addEventListener("mousemove",g),n&&e.addEventListener("wheel",v),y}},function(t,n){t.exports={default:{atomScale:.6,relativeAtomScale:1,bondScale:.5,ao:.75,aoRes:256,brightness:.5,outline:0,spf:32,bonds:!1,bondThreshold:1.2,bondShade:.5,atomShade:.5,dofStrength:0,dofPosition:.5,fxaa:1},stickball:{atomScale:.24,relativeAtomScale:.64,bondScale:.5,bonds:!0,bondThreshold:1.2},toon:{ao:0,spf:0,brightness:.5,outline:1},licorice:{atomScale:.1,relativeAtomScale:0,bondScale:1,bonds:!0,bondThreshold:1.2}}},function(t,n,e){"use strict";e.r(n);var r=e(12),o=e(13),a=e(1),i=e.n(a),u=e(0),s=e.n(u),l=e(27),c=e(50);function f(t){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function h(t,n){for(var e=0;e=0;){if(e[p]===t)return r[p]===n;p-=1}switch(h){case"Map":return t.size===n.size&&c(t.entries(),n.entries(),e.concat([t]),r.concat([n]));case"Set":return t.size===n.size&&c(t.values(),n.values(),e.concat([t]),r.concat([n]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var d=Object(s.a)(t);if(d.length!==Object(s.a)(n).length)return!1;var m=e.concat([t]),g=r.concat([n]);for(p=d.length-1;p>=0;){var v=d[p];if(!Object(i.a)(v,n)||!f(n[v],t[v],m,g))return!1;p-=1}return!0}var h=Object(r.a)((function(t,n){return f(t,n,[],[])}));n.a=h}]); //# sourceMappingURL=bundle.js.map \ No newline at end of file diff --git a/dash_bio/bundle.js.map b/dash_bio/bundle.js.map index 22bfcb26b..d5649094d 100644 --- a/dash_bio/bundle.js.map +++ b/dash_bio/bundle.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/prop-types/index.js","webpack:///external \"React\"","webpack:///./src/lib/LazyLoader.js","webpack:///./node_modules/ramda/es/internal/_curry1.js","webpack:///./node_modules/ramda/es/internal/_isPlaceholder.js","webpack:///./node_modules/ramda/es/internal/_has.js","webpack:///./node_modules/speck/src/elements.js","webpack:///./node_modules/speck/src/gl-matrix.js","webpack:///./node_modules/speck/src/view.js","webpack:///./node_modules/ramda/es/internal/_isArguments.js","webpack:///./node_modules/ramda/es/keys.js","webpack:///./node_modules/ramda/es/type.js","webpack:///./node_modules/ramda/es/internal/_curry2.js","webpack:///./src/lib/components/AlignmentChart.react.js","webpack:///./src/lib/components/Circos.react.js","webpack:///./src/lib/components/Ideogram.react.js","webpack:///./src/lib/components/Igv.react.js","webpack:///./src/lib/components/Pileup.react.js","webpack:///./src/lib/components/Molecule2dViewer.react.js","webpack:///./src/lib/components/Molecule3dViewer.js","webpack:///./src/lib/components/NeedlePlot.react.js","webpack:///./src/lib/components/NglMoleculeViewer.react.js","webpack:///./src/lib/components/OncoPrint.react.js","webpack:///./src/lib/components/SequenceViewer.react.js","webpack:///./src/lib/components/Speck.react.js","webpack:///./node_modules/speck/build/index.js","webpack:///./node_modules/speck/src/const.js","webpack:///./node_modules/speck/src/system.js","webpack:///./node_modules/fornac/dist/scripts/fornac.js","webpack:///./node_modules/prop-types/factoryWithThrowingShims.js","webpack:///./node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack:///./node_modules/speck/src/renderer.js","webpack:///./node_modules/speck/src/webgl.js","webpack:///./node_modules/speck/src/cube.js","webpack:///./node_modules/speck/src/shaders.js","webpack:///./node_modules/speck/src/interactions.js","webpack:///./node_modules/speck/src/presets.js","webpack:///./src/lib/components/FornaContainer.react.js","webpack:///./src/lib/index.js","webpack:///external \"ReactDOM\"","webpack:///./node_modules/ramda/es/internal/_arrayFromIterator.js","webpack:///./node_modules/ramda/es/internal/_includesWith.js","webpack:///./node_modules/ramda/es/internal/_objectIs.js","webpack:///./node_modules/ramda/es/internal/_equals.js","webpack:///./node_modules/ramda/es/internal/_functionName.js","webpack:///./node_modules/ramda/es/equals.js"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","installedModules","13","jsonpScriptSrc","__webpack_require__","p","exports","module","l","e","promises","installedChunkData","promise","Promise","resolve","reject","onScriptComplete","script","document","createElement","charset","timeout","nc","setAttribute","src","error","Error","event","onerror","onload","clearTimeout","chunk","errorType","type","realSrc","target","message","name","request","undefined","setTimeout","head","appendChild","all","m","c","d","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","oe","err","console","url","getCurrentScript","currentScript","doc_scripts","getElementsByTagName","scripts","filter","s","async","text","textContent","slice","split","join","__jsonpScriptSrc__","isLocal","test","isLocalScript","srcFragments","fileFragments","splice","jsonpArray","window","oldJsonpFunction","alignmentChart","circos","ideogram","igv","pileup","molecule2dViewer","molecule3dViewer","nglmoleculeViewer","needlePlot","oncoPrint","sequenceViewer","speck","_curry1","fn","f1","a","arguments","apply","this","_isPlaceholder","_has","prop","obj","_global","shim","GLMAT_EPSILON","GLMAT_ARRAY_TYPE","Float32Array","Array","GLMAT_RANDOM","Math","random","glMatrix","degree","PI","toRadian","vec","vec2","out","clone","fromValues","x","y","copy","set","add","b","subtract","sub","multiply","mul","divide","div","min","max","scale","scaleAndAdd","distance","sqrt","dist","squaredDistance","sqrDist","len","squaredLength","sqrLen","negate","inverse","normalize","dot","cross","z","lerp","ax","ay","cos","sin","transformMat2","transformMat2d","transformMat3","transformMat4","forEach","stride","offset","count","arg","str","vec3","az","bx","by","bz","zScale","w","transformQuat","q","qx","qy","qz","qw","ix","iy","iz","iw","rotateX","rotateY","rotateZ","angle","tempA","tempB","cosine","acos","vec4","aw","mat2","a1","a0","a2","a3","det","b0","b1","b2","b3","rotate","rad","v","v0","v1","frob","pow","LDU","L","D","U","mat2d","aa","ab","ac","ad","atx","aty","a4","a5","b4","b5","translate","mat3","a01","a02","a12","a00","a10","a11","a20","a21","a22","b01","b11","b21","b00","b02","b10","b12","b20","b22","fromMat2d","fromQuat","x2","y2","z2","xx","yx","yy","zx","zy","zz","wx","wy","wz","normalFromMat4","a03","a13","a23","a30","a31","a32","a33","b03","b04","b05","b06","b07","b08","b09","mat4","axis","abs","fromRotationTranslation","xy","xz","yz","frustum","left","right","bottom","top","near","far","rl","tb","nf","perspective","fovy","aspect","f","tan","ortho","lr","bt","lookAt","eye","center","up","x0","x1","y0","y1","z0","z1","eyex","eyey","eyez","upx","upy","upz","centerx","centery","centerz","identity","tmpvec3","xUnitVec3","yUnitVec3","matr","quat","rotationTo","setAxisAngle","setAxes","view","fromMat3","bw","calculateW","slerp","omega","cosom","sinom","scale0","scale1","invert","invDot","conjugate","fRoot","fTrace","j","k","glm","require","elements","consts","clamp","zoom","translation","atomScale","relativeAtomScale","bondScale","rotation","ao","aoRes","brightness","outline","spf","bonds","bondThreshold","bondShade","atomShade","resolution","dofStrength","dofPosition","fxaa","system","maxX","Infinity","minX","maxY","minY","atoms","symbol","radius","cx","cy","override","deserialize","serialize","JSON","stringify","parse","dx","dy","getRect","width","height","getBondRadius","MIN_ATOM_RADIUS","toString","hasEnumBug","propertyIsEnumerable","nonEnumerableProps","hasArgsEnumBug","contains","list","item","idx","keys","nIdx","ks","checkArgsLength","val","_curry2","f2","_b","_a","RealAlignmentChart","lazy","LazyLoader","AlignmentChart","fallback","props","Component","propTypes","id","PropTypes","string","setProps","func","eventDatum","extension","colorscale","oneOfType","opacity","number","textcolor","textsize","showlabel","bool","showid","showconservation","conservationcolor","conservationcolorscale","array","conservationopacity","conservationmethod","oneOf","correctgap","showgap","gapcolor","gapcolorscale","gapopacity","groupbars","showconsensus","tilewidth","tileheight","overview","numtiles","scrollskip","tickstart","ticksteps","defaultProps","RealCircos","Circos","config","size","tracks","enableDownloadSVG","enableZoomPan","style","selectEvent","layout","arrayOf","shape","isRequired","color","label","tooltipContent","source","sourceID","targetEnd","targetID","RealIdeogram","Ideogram","organism","dataDir","annotationsColor","annotationsLayout","barWidth","chrHeight","chrMargin","chrWidth","ploidy","rotatable","showBandLabels","showChromosomeLabels","showAnnotTooltip","showFullyBanded","showNonNuclearChromosomes","className","annotations","chr","start","stop","annotationsPath","annotationsData","annotationTracks","annotationHeight","histogramScaling","assembly","brush","brushData","end","extent","container","chromosomes","localOrganism","homology","chrOne","chrTwo","fullChromosomeLabels","filterable","orientation","ploidyDesc","ancestors","rangeSet","rotated","sex","RealIgv","Igv","genome","reference","locus","minimumBases","RealPileup","Pileup","range","exact","contig","viz","vizOptions","sourceOptions","RealMolecule2dViewer","Molecule2dViewer","modelData","nodes","links","selectedAtomIds","atom","bond","strength","RealMolecule3dViewer","Molecule3dViewer","selectionType","backgroundColor","backgroundOpacity","factor","animationDuration","fixedPath","zoomTo","sel","styles","visualization_type","atomLabelsShown","labels","orbital","cube_file","iso_val","positiveVolumetricColor","negativeVolumetricColor","chain","resi","shapes","onRenderNewData","onChangeSelection","RealNeedlePlot","NeedlePlot","mutationData","mutationGroups","domains","margin","xlabel","ylabel","rangeSlider","needleStyle","stemColor","stemThickness","stemConstHeight","headSize","headColor","headSymbol","domainStyle","domainColor","displayMinorDomains","textangle","clickData","RealNglMoleculeViewer","NglMoleculeViewer","filename","ext","selectedValue","aaRange","chosen","chosenAtoms","chosenResidues","input","uploaded","resetView","stageParameters","quality","cameraType","imageParameters","antialias","transparent","trim","defaultFilename","downloadImage","molStyles","representations","chosenAtomsColor","chosenAtomsRadius","molSpacingXaxis","sideByside","pdbString","residues","RealOncoPrint","OncoPrint","padding","backgroundcolor","showlegend","showoverview","RealSequenceViewer","SequenceViewer","sequence","showLineNumbers","wrapAminoAcids","charsPerLine","toolbar","search","title","sequenceMaxHeight","badge","selection","coverage","propName","componentName","bgcolor","tooltip","underscore","onclick","legend","coverageClicked","mouseSelection","subpartSelected","RealSpeck","Speck","speckView","scrollZoom","presetView","speckRenderer","speckSystem","speckInteractions","speckPresetViews","MAX_ATOM_RADIUS","getCentroid","farAtom","calculateBonds","sorted","sort","ea","eb","posA","posB","radA","radB","colA","g","colB","cutoff","addAtom","xsum","ysum","zsum","getFarAtom","maxd","rd","getRadius","factory","loaded","rnaPlot","RNAGraph","_rnagraph","_rnaplot","FornaContainer","element","passedOptions","self","options","option","initialSize","svgW","svgH","_d2","default","category20","mousedownNode","mouseupNode","xScale","linear","domain","yScale","graph","magnitude","positionAnyNode","endPoint","startPoint","prevNode","linked","u","arrowTip","path","select","attr","realLinkFilter","linkType","changeColors","moleculeColors","num","parseFloat","isNaN","mousedown","mousemove","mpos","mouse","vis","node","dragLine","mouseup","resetMouseVars","linkStrengths","displayParameters","colorScheme","customColors","animation","applyForce","deaf","rnas","extraLinks","equals","createInitialLayout","structure","labelInterval","rg","circularizeExternal","rnaJson","recalculateElements","positions","naview","_naview","NAView","naViewPositions","naview_xy_coordinates","pairtable","_i","nbase","_simplernaplot","simpleXyCoordinates","elementsToJson","addUids","uids","addPositions","addLabels","reinforceStems","reinforceLoops","connectFakeNodes","reassignLinkUids","breakNodesToFakeNodes","addRNA","newLinks","addExternalLinks","concat","addRNAJSON","avoidOthers","externalLinks","newLink","uid","generateUUID","nucs","log","rnaGraph","map","px","rna","recalculateGraph","update","centerView","transitionRNA","newStructure","nextFunction","duration","transitionDuration","nodeType","newRNAJson","gnodes","visNodes","selectAll","nodeKey","transition","visLinks","linkKey","newNodes","createNewNodes","enter","exit","remove","each","updateStyle","createNewLinks","callback","uidsToNodes","link","fakeLinks","linkIndex","indexOf","addNodes","json","entry","addCustomColors","addCustomColorsText","customColorsText","cs","_rnautils","ColorScheme","colorsJson","changeColorScheme","clearNodes","toJSON","fromJSON","jsonString","seq","dotbracket","circular","structName","rnaLength","nucsToNodes","pseudoknotPairs","ProteinGraph","setSize","offsetHeight","offsetWidth","zoomer","brusher","resizeSvgOnResize","svg","setOutlineColor","newColorScheme","classed","ordinal","category10","elemType","interpolate","interpolateLab","colorValues","addEventListener","behavior","scaleExtent","on","zoomstart","redraw","keydown","keyup","focus","append","svgGraph","allowPanningAndZooming","datum","selected","previouslySelected","ctrlKeydown","clear","getBoundingBoxTransform","molWidth","molHeight","widthRatio","heightRatio","minRatio","newMolWidth","newMolHeight","bbTransform","force","charge","middleCharge","otherCharge","friction","linkDistance","linkDistanceMultiplier","linkStrength","other","gravity","chargeDistance","shiftKeydown","selectedNodes","mouseDownNode","dragstarted","sourceEvent","stopPropagation","d1","fixed","dragged","py","resumeForce","preventDefault","dragended","collide","nx1","nx2","ny1","ny2","quad","point","resume","drag","keyCode","updateRnaGraph","nucleotidePositions","getPositions","labelPositions","getUids","addPseudoknots","updateLinkUids","removeLink","index","extraLinkIndex","linkClick","addLink","nodeMouseclick","defaultPrevented","nodeMouseup","nodeMousedown","startAnimation","stopAnimation","setFriction","setCharge","setGravity","setPseudoknotStrength","pseudoknot","displayBackground","displayNumbering","displayNodeOutline","displayNodeLabel","displayLinks","displayPseudoknotLinks","displayProteinLinks","displayAllLinks","linksEnter","linkLines","gnodesEnter","ease","labelAndProteinNodes","nucleotideNodes","allLinks","xlink","realNodes","displayFakeLinks","geom","quadtree","visit","_d","moleculesToJson","moleculesJson","graphs","molecules","molecule","ss","header","numberSort","Date","getTime","replace","floor","startNumber","computePairtable","rnaUtilities","dotbracketToPairtable","removeBreaks","targetString","breaks","breakIndex","substring","ret","dotBracketBreaks","seqBreaks","calculateStartNumberArray","startNumberArray","arraysEqual","labelNodes","broken","pt","relevantElements","allNucs","addFakeNode","filterNucs","newNode1","newNode2","fakeNodeUid","newNode","newX","newY","coordsCounted","ia","fromNode","fakeNodes","Set","thisNode","thisNuc","has","addExtraLinks","getNodeFromNucleotides","from","to","elemTypes","nodeName","nextNode","ptToElements","level","u5","u3","external","pop","prevVec","nextVec","combinedVec","vecLength","normedVec","offsetVec","removePseudoknots","externalLoop","eloop","prev","hloop","numGreater","removePseudoknotsFromPairtable","addName","String","bracketLeft","bracketRight","inverseBrackets","maximumMatching","backtrackMaximumMatching","mmBt","Number","valueOf","insertIntoStack","deleteFromStack","pairtableToDotbracket","findUnmatched","h","RNAUtilities","colorsText","parseRange","parseInt","parseColorText","normalizeColors","MAX_VALUE","MIN_VALUE","chart","startNucleotideNumber","fillViewportTransform","xValues","yValues","molName","xExtent","d3","yExtent","NAME_OFFSET","nucleotideRadius","rnaEdgePadding","xRange","yRange","xExtra","yExtra","createOtherScale","firstScale","newDomain","newRange","scaleFactor","newWidth","newMargin","createTransformToFillViewport","gTransform","extraLinkType","createLinks","gs","showNucleotideLabels","struct_name","createNucleotides","createLabels","createName","bundleExternalLinks","nodesDict","linksList","results","ForceEdgeBundling","edges","compatibility_threshold","step_size","fbundling","d3line","line","edge_subpoint_data","makeExternalLinksBundle","_","pair_table","alpha","loop_size","stack_size","lp","stk","PIHALF","loop","i_old","partner","start_k","start_l","fill","ladder","begin","diff","polygon","bubble","remember","poss","_radloop","_connection","_region","_base","_loop","ANUM","MAXITER","bases","nregion","loop_count","root","Loop","loops","regions","rlphead","Radloop","lencut","RADIUS_REDUCTION_FACTOR","angleinc","_h","HELIX_FACTOR","BACKBONE_DISTANCE","determine_depths","setMark","setDepth","depth","getNconnection","isMark","getConnection","getLoop","Base","Region","read_in_bases","find_regions","construct_loop","find_central_loop","traverse_loop","getX","getY","npairs","setMate","setExtracted","setX","setY","nb1","mate","mark","getMate","setStart1","setEnd2","setRegion","setEnd1","setStart2","ibase","retloop","cp","Connection","rp","rlp","setNconnection","setNumber","setRadius","getNext","getLoopnumber","getRegion","getStart1","isExtracted","getEnd1","getStart2","getEnd2","setConnection","setLoop","setStart","setEnd","setExtruded","setBroken","maxconn","maxdepth","getDepth","anchor_connection","xs","ys","xe","xn","yn","xc","yc","xo","yo","astart","aend","cpnext","acp","cpprev","ic","da","maxang","icstart","icend","icmiddle","icroot","done","done_all_connections","rooted","sign","midx","midy","nrx","nry","mx","my","vx","vy","dotmv","nmidx","nmidy","icstart1","icup","icdown","icnext","direction","dan","rr","cpx","cpy","cpnextx","cpnexty","cnx","rcn","rc","lnx","lny","acn","sx","sy","dcp","imaxloop","indice","getStart","getEnd","setXrad","setYrad","setAngle","atan2","getAngle","set_radius","determine_radius","getXrad","getYrad","connected_connection","find_ic_middle","asin","isExtruded","getNumber","construct_extruded_segment","generate_region","mindit","ci","dt","sumn","sumd","dit","imindit","aend1","aend2","aave","dac","nstart","nend","collision","construct_circle_segment","minf2","maxf2","find_center_for_arc","hhi","hlow","disc","theta","iter","noIterationFailureYet","loopnumber","next","setLoopnumber","setNext","getPrev","setPrev","region","xrad","yrad","extruded","_isNull","isNull","setNull","isBroken","nconnection","connections","_connections","addConnection","_start1","_end1","_start2","_end2","start1","end1","start2","end2","extracted","content","locals","result","mediaQuery","alreadyImportedModules","stylesInDom","memoize","memo","isOldIE","navigator","userAgent","toLowerCase","getHeadElement","singletonElement","singletonCounter","styleElementsInsertedAtTop","addStylesToDom","domStyle","refs","parts","addStyle","listToStyles","newStyles","part","css","media","sourceMap","insertStyleElement","styleElement","lastStyleElementInsertedAtTop","insertAt","nextSibling","insertBefore","firstChild","removeStyleElement","parentNode","removeChild","createStyleElement","singleton","styleIndex","applyToSingletonTag","URL","createObjectURL","revokeObjectURL","Blob","btoa","linkElement","rel","createLinkElement","updateLink","href","applyToTag","newObj","newList","mayRemove","textStore","replaceText","replacement","Boolean","styleSheet","cssText","cssNode","createTextNode","childNodes","unescape","encodeURIComponent","blob","oldSrc","__WEBPACK_AMD_DEFINE_FACTORY__","__WEBPACK_AMD_DEFINE_RESULT__","version","d3_arraySlice","d3_array","d3_document","d3_documentElement","ownerDocument","documentElement","d3_window","defaultView","now","setProperty","d3_element_prototype","Element","d3_element_setAttribute","d3_element_setAttributeNS","setAttributeNS","d3_style_prototype","CSSStyleDeclaration","d3_style_setProperty","space","local","priority","d3_ascending","NaN","d3_number","d3_numeric","d3_bisector","compare","lo","hi","mid","ascending","descending","sum","mean","quantile","values","H","median","numbers","variance","deviation","d3_bisect","d3_transposeLength","bisectLeft","bisect","bisectRight","bisector","shuffle","i0","i1","permute","indexes","permutes","pairs","p1","transpose","matrix","row","zip","entries","merge","arrays","merged","d3_range_integerScale","d3_class","ctor","properties","d3_Map","d3_map_escape","d3_map_unescape","d3_map_has","d3_map_remove","d3_map_keys","d3_map_size","d3_map_empty","d3_Set","d3_identity","d3_rebind","method","d3_vendorSymbol","charAt","toUpperCase","d3_vendorPrefixes","prefixName","step","isArray","empty","nest","sortValues","rollup","sortKeys","mapType","keyValue","setter","valuesByKey","sortKey","keyMap","order","rebind","d3_noop","d3_dispatch","d3_dispatch_event","dispatch","listeners","listenerByName","listener","d3_eventPreventDefault","d3_eventSource","d3_eventDispatch","of","thiz","argumentz","e1","e0","requote","d3_requote_re","d3_subclass","__proto__","d3_selection","groups","d3_selectionPrototype","d3_select","querySelector","d3_selectAll","querySelectorAll","d3_selectMatches","d3_selectMatcher","matches","Sizzle","matchesSelector","d3_selection_selector","selector","d3_selection_selectorAll","subgroup","subnode","group","subgroups","__data__","d3_nsXhtml","d3_nsPrefix","xhtml","xml","xmlns","d3_selection_attr","qualify","removeAttributeNS","removeAttribute","d3_collapse","d3_selection_classedRe","RegExp","d3_selection_classes","d3_selection_classed","d3_selection_classedName","re","classList","getAttribute","lastIndex","d3_selection_style","removeProperty","d3_selection_property","d3_selection_creator","createElementNS","namespace","namespaceURI","d3_selectionRemove","parent","d3_selection_dataNode","d3_selection_filter","d3_selection_sortComparator","comparator","d3_selection_each","d3_selection_enter","d3_selection_enterPrototype","prefix","getAttributeNS","getComputedStyle","getPropertyValue","html","innerHTML","insert","before","groupData","nodeData","n0","updateNodes","enterNodes","exitNodes","nodeByKeyValue","keyValues","args","d3_selection_enterInsertBefore","j0","d3_selection_on","capture","wrap","d3_selection_onListener","d3_selection_onFilters","onRemove","removeEventListener","$","d3_selection_onFilter","match","upgroup","mouseenter","mouseleave","related","relatedTarget","compareDocumentPosition","d3_event_dragSelect","d3_event_dragId","d3_event_dragSuppress","click","suppressClick","off","d3_mousePoint","d3_mouse_bug44083","changedTouches","ownerSVGElement","createSVGPoint","scrollX","scrollY","ctm","position","border","getScreenCTM","pageX","pageY","clientX","clientY","matrixTransform","rect","getBoundingClientRect","clientLeft","clientTop","d3_behavior_dragTouchId","identifier","touch","touches","origin","dragstart","touchstart","subject","move","dragOffset","that","correspondingElement","dragId","dragName","dragSubject","moved","ended","dragRestore","position0","position1","ε","ε2","π","τ","τε","halfπ","d3_radians","d3_degrees","d3_sgn","d3_cross2d","d3_acos","d3_asin","d3_cosh","exp","d3_haversin","ρ","SQRT2","interpolateZoom","p0","S","ux0","uy0","w0","ux1","uy1","w1","d2","r0","r1","coshr0","d3_sinh","translate0","center0","mousewheelTimer","touchtime","d3_behavior_zoomInfinity","zooming","mousedowned","d3_behavior_zoomWheel","mousewheeled","dblclicked","touchstarted","location","scaleTo","translateTo","__chart__","rescale","zoomstarted","zoomed","zoomended","location0","d3_selection_interrupt","locations0","distance0","zoomName","touchmove","touchend","targets","relocate","started","changed","LN2","l0","l1","distance1","d3_behavior_zoomDelta","shiftKey","ceil","deltaY","deltaMode","wheelDelta","detail","view1","d3_transitionInheritId","tween","d3_color","d3_hsl","d3_rgb_parse","d3_rgb_hsl","rgb","hsl","d3_hslPrototype","d3_hsl_rgb","m1","m2","vv","round","d3_rgb","d3_hcl","d3_lab_hcl","d3_lab","d3_rgb_lab","brighter","darker","hcl","d3_hclPrototype","d3_hcl_lab","d3_lab_K","lab","d3_labPrototype","d3_lab_rgb","d3_xyz_rgb","d3_lab_xyz","d3_xyz_lab","d3_rgbNumber","d3_rgbString","d3_rgbPrototype","d3_rgb_hex","format","exec","d3_rgb_parseNumber","d3_rgb_names","d3_rgb_xyz","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","d3_functor","d3_xhrType","response","mimeType","d3_xhr","xhr","headers","XMLHttpRequest","responseType","respond","status","responseText","d3_xhrHasResponse","load","XDomainRequest","onreadystatechange","readyState","onprogress","progress","send","open","setRequestHeader","overrideMimeType","beforesend","abort","d3_xhr_fixCallback","functor","dsv","delimiter","reFormat","delimiterCode","charCodeAt","typedResponse","formatRow","formatValue","parseRows","Function","eol","EOL","EOF","rows","N","I","token","formatRows","fieldSet","fields","field","csv","tsv","d3_timer_queueHead","d3_timer_queueTail","d3_timer_interval","d3_timer_timeout","d3_timer_frame","d3_timer","delay","then","time","timer","d3_timer_step","d3_timer_mark","d3_timer_sweep","isFinite","t0","t1","d3_format_precision","LN10","flush","d3_formatPrefixes","d3_locale_numberFormat","locale","locale_decimal","decimal","locale_thousands","thousands","locale_grouping","grouping","locale_currency","currency","formatGroup","reverse","specifier","d3_format_re","align","zfill","comma","precision","suffix","integer","exponent","d3_format_types","d3_format_typeDefault","zcomma","fullSuffix","negative","unit","formatPrefix","after","lastIndexOf","fromCharCode","X","toPrecision","toExponential","toFixed","d3_time","d3_date","d3_date_utc","UTC","getDate","getUTCDate","getDay","getUTCDay","getFullYear","getUTCFullYear","getHours","getUTCHours","getMilliseconds","getUTCMilliseconds","getMinutes","getUTCMinutes","getMonth","getUTCMonth","getSeconds","getUTCSeconds","getTimezoneOffset","setDate","d3_time_prototype","setUTCDate","setDay","setUTCDay","setFullYear","setUTCFullYear","setHours","setUTCHours","setMilliseconds","setUTCMilliseconds","setMinutes","setUTCMinutes","setMonth","setUTCMonth","setSeconds","setUTCSeconds","setTime","d3_time_interval","date","d0","times","utc","d3_time_interval_utc","d3_locale_timeFormat","locale_dateTime","dateTime","locale_date","locale_time","locale_periods","periods","locale_days","days","locale_shortDays","shortDays","locale_months","months","locale_shortMonths","shortMonths","d3_time_format","template","d3_time_formatPads","d3_time_formats","M","Z","d3_time_parse","localZ","W","d3_time_parsers","multi","d3_time_formatMulti","d3_time_periodLookup","d3_time_dayRe","d3_time_formatRe","d3_time_dayLookup","d3_time_formatLookup","d3_time_dayAbbrevRe","d3_time_dayAbbrevLookup","d3_time_monthRe","d3_time_monthLookup","d3_time_monthAbbrevRe","d3_time_monthAbbrevLookup","A","B","d3_time_formatPad","dayOfYear","sundayOfYear","mondayOfYear","Y","d3_time_zone","d3_time_parseDay","d3_time_parseHour24","d3_time_parseDayOfYear","d3_time_parseMilliseconds","d3_time_parseMonthNumber","d3_time_parseMinutes","d3_time_parseSeconds","d3_time_parseWeekNumberSunday","d3_time_parseWeekdayNumber","d3_time_parseWeekNumberMonday","d3_time_parseYear","d3_time_parseFullYear","d3_time_parseZone","d3_time_parseLiteralPercent","year","day","years","interval","week","sunday","weeks","weekOfYear","d3_time_numberRe","d3_time_percentRe","names","zs","zh","zm","formats","numberFormat","timeFormat","d3_locale_enUS","d3_adder","geo","d3_adderSum","d3_adderTemp","reset","bv","av","d3_geo_streamGeometry","geometry","d3_geo_streamGeometryType","stream","d3_geo_streamObjectType","Feature","feature","FeatureCollection","features","Sphere","sphere","Point","coordinates","MultiPoint","LineString","d3_geo_streamLine","MultiLineString","Polygon","d3_geo_streamPolygon","MultiPolygon","GeometryCollection","geometries","closed","coordinate","lineStart","lineEnd","polygonStart","polygonEnd","area","d3_geo_areaSum","d3_geo_area","d3_geo_centroidW0","d3_geo_centroidW1","d3_geo_centroidX0","d3_geo_centroidY0","d3_geo_centroidZ0","d3_geo_centroidX1","d3_geo_centroidY1","d3_geo_centroidZ1","d3_geo_centroidX2","d3_geo_centroidY2","d3_geo_centroidZ2","d3_geo_areaRingSum","d3_geo_areaRingStart","λ00","φ00","λ0","cosφ0","sinφ0","nextPoint","λ","φ","dλ","sdλ","adλ","cosφ","sinφ","d3_geo_cartesian","spherical","d3_geo_cartesianDot","d3_geo_cartesianCross","d3_geo_cartesianAdd","d3_geo_cartesianScale","vector","d3_geo_cartesianNormalize","d3_geo_spherical","cartesian","d3_geo_sphericalEqual","bounds","φ0","λ1","φ1","λ_","λ__","φ__","dλSum","ranges","bound","ringPoint","ringStart","ringEnd","linePoint","normal","inflection","λi","antimeridian","φi","compareRanges","withinRange","best","centroid","d3_geo_centroid","d3_geo_centroidPoint","d3_geo_centroidLineStart","d3_geo_centroidLineEnd","d3_geo_centroidRingStart","d3_geo_centroidPointXYZ","cz","d3_geo_compose","compose","d3_true","d3_geo_clipPolygon","segments","clipStartInside","clip","segment","d3_geo_clipPolygonIntersection","d3_geo_clipPolygonLinkCircular","points","current","isSubject","d3_geo_clip","pointVisible","clipLine","clipStart","rotatedClipStart","pointRing","meridian","parallel","meridianNormal","polarAngle","winding","ring","point0","arc","intersection","φarc","d3_geo_pointInPolygon","polygonStarted","d3_geo_clipSort","pointLine","buffer","d3_geo_clipBufferListener","ringListener","clean","ringSegments","d3_geo_clipSegmentLength1","lines","rejoin","d3_geo_clipAntimeridian","sλ0","sλ1","cosφ1","sinλ0_λ1","atan","d3_geo_clipAntimeridianIntersect","d3_geo_clipCircle","cr","smallRadius","notHemisphere","visible","c0","v00","point2","point1","code","intersect","d3_geo_circleInterpolate","two","n1","n2","n2n2","n1n2","determinant","c1","c2","n1xn2","uu","t2","δλ","polar","q1","d3_geom_clipLine","d3_geo_clipExtent","x__","y__","v__","x_","y_","v_","first","listener_","bufferListener","wn","insidePolygon","inside","corner","comparePoints","ca","cb","d3_geo_conic","projectAt","d3_geo_projectionMutator","parallels","d3_geo_conicEqualArea","C","ρ0","forward","ρ0_y","clipExtent","output","valid","conicEqualArea","raw","albers","albersUsa","lower48Point","alaskaPoint","hawaiiPoint","lower48","alaska","hawaii","pointStream","lower48Stream","alaskaStream","hawaiiStream","d3_geo_pathAreaSum","d3_geo_pathAreaPolygon","d3_geo_pathBoundsX0","d3_geo_pathBoundsY0","d3_geo_pathBoundsX1","d3_geo_pathBoundsY1","d3_geo_pathArea","d3_geo_pathAreaRingStart","x00","y00","d3_geo_pathBounds","d3_geo_pathBuffer","pointCircle","d3_geo_pathBufferCircle","pointLineStart","lineEndPolygon","pointRadius","d3_geo_lengthSum","d3_geo_pathCentroid","d3_geo_pathCentroidPoint","d3_geo_pathCentroidLineStart","d3_geo_pathCentroidLineEnd","d3_geo_pathCentroidRingStart","d3_geo_pathContext","context","moveTo","lineTo","closePath","d3_geo_resample","project","δ2","cosMinDistance","maxDepth","resample","resampleRecursive","resampleNone","d3_geo_transformPoint","c00","resampleLineTo","φ2","λ2","dx2","dy2","dz","d3_geo_pathProjectStream","d3_geo_projectionRadians","d3_geo_transform","d3_geo_projection","projectRotate","δx","δy","projectResample","δφ","δγ","preclip","postclip","clipAngle","projection","d3_geo_rotation","invalidate","d3_geo_equirectangular","d3_geo_identityRotation","d3_geo_rotationλ","d3_geo_rotationφγ","d3_geo_forwardRotationλ","cosδφ","sinδφ","cosδγ","sinδγ","sr","d3_geo_circleAngle","d3_geo_graticuleX","d3_geo_graticuleY","d3_source","d3_target","projectStream","contextStream","cacheStream","transform","methods","projectionMutator","equirectangular","circle","Δλ","sinΔλ","cosΔλ","sinφ1","graticule","X1","X0","Y1","Y0","DX","DY","majorExtent","minorExtent","majorStep","minorStep","greatArc","source_","target_","cy0","sy0","cy1","sy1","kx0","ky0","kx1","ky1","d3_geo_length","d3_geo_azimuthal","azimuthal","cosλ","sinc","cosc","d3_geo_azimuthalEqualArea","cosλcosφ","azimuthalEqualArea","d3_geo_azimuthalEquidistant","d3_geo_conicConformal","F","d3_geo_mercator","d3_geo_conicEquidistant","G","azimuthalEquidistant","conicConformal","conicEquidistant","d3_geo_gnomonic","d3_geo_mercatorProjection","clipAuto","gnomonic","mercator","d3_geo_orthographic","orthographic","d3_geo_stereographic","d3_geo_transverseMercator","d3_geom_pointX","d3_geom_pointY","d3_geom_hullUpper","hull","hs","d3_geom_hullOrder","stereographic","transverseMercator","vertices","fx","fy","flippedPoints","upper","lower","skipLeft","skipRight","d3_geom_polygonPrototype","d3_geom_polygonInside","d3_geom_polygonIntersect","x3","x21","x43","y3","y21","y43","ua","d3_geom_polygonClosed","d3_geom_voronoiEdges","d3_geom_voronoiCells","d3_geom_voronoiBeaches","d3_geom_voronoiFirstCircle","d3_geom_voronoiCircles","d3_geom_voronoiBeachPool","d3_geom_voronoiCirclePool","d3_geom_voronoiBeach","d3_geom_voronoiRedBlackNode","edge","site","d3_geom_voronoiCreateBeach","beach","d3_geom_voronoiDetachBeach","d3_geom_voronoiDetachCircle","d3_geom_voronoiRemoveBeach","vertex","previous","P","disappearing","lArc","unshift","rArc","iArc","nArcs","d3_geom_voronoiSetEdgeEnd","d3_geom_voronoiCreateEdge","d3_geom_voronoiAttachCircle","d3_geom_voronoiAddBeach","dxl","dxr","directrix","d3_geom_voronoiLeftBreakPoint","d3_geom_voronoiRightBreakPoint","R","newArc","lSite","rSite","hb","hc","rfocx","rfocy","pby2","lfocx","lfocy","plby2","hl","aby2","d3_geom_voronoiCell","d3_geom_voronoiHalfEdgeOrder","d3_geom_voronoiCircle","cSite","ha","d3_geom_voronoiConnectEdge","vb","fm","fb","va","lx","ly","rx","ry","d3_geom_voronoiEdge","d3_geom_voronoiHalfEdge","d3_geom_voronoiRedBlackTree","d3_geom_voronoiRedBlackRotateLeft","tree","d3_geom_voronoiRedBlackRotateRight","d3_geom_voronoiRedBlackFirst","d3_geom_voronoi","sites","bbox","d3_geom_voronoiVertexOrder","d3_geom_voronoiClipEdges","cell","iHalfEdge","halfEdges","nHalfEdges","cells","iCell","prepare","d3_geom_voronoiCloseCells","diagram","grandpa","uncle","sibling","voronoi","d3_geom_voronoiClipExtent","polygons","triangles","s0","s1","d3_geom_voronoiTriangleArea","d3_geom_quadtreeCompatX","d3_geom_quadtreeCompatY","d3_geom_quadtreeVisit","children","d3_geom_quadtreeFind","closestPoint","minDistance2","find","distance2","xm","ym","d3_interpolateRgb","ar","ag","br","bg","bb","d3_interpolateObject","d3_interpolate","d3_interpolateNumber","d3_interpolateString","am","bm","bs","bi","d3_interpolate_numberA","d3_interpolate_numberB","delaunay","compat","x1_","y1_","x2_","y2_","leaf","nx","ny","insertChild","nPoint","below","interpolateRgb","interpolateObject","interpolateNumber","interpolateString","interpolators","d3_interpolateArray","na","nb","interpolateArray","d3_ease_default","d3_ease","poly","d3_ease_quad","cubic","d3_ease_cubic","d3_ease_sin","d3_ease_exp","d3_ease_circle","elastic","back","bounce","d3_ease_bounce","d3_ease_mode","d3_ease_reverse","d3_ease_reflect","d3_ease_clamp","d3_ease_cubicInOut","t3","d3_interpolateRound","d3_transform","kx","d3_transformNormalize","kz","d3_transformDot","ky","d3_transformCombine","skew","interpolateHcl","ah","al","bh","bc","bl","interpolateHsl","as","ba","interpolateRound","baseVal","consolidate","d3_transformIdentity","d3_interpolateTransformPop","d3_interpolateTransform","ta","d3_interpolateTranslate","ra","rb","d3_interpolateRotate","wa","wb","d3_interpolateSkew","ka","kb","d3_interpolateScale","d3_uninterpolateNumber","d3_uninterpolateClamp","d3_layout_bundlePath","lca","aNodes","d3_layout_bundleAncestors","bNodes","aNode","bNode","sharedNode","d3_layout_bundleLeastCommonAncestor","d3_layout_forceDragstart","d3_layout_forceDragend","d3_layout_forceMouseover","d3_layout_forceMouseout","interpolateTransform","bundle","paths","chord","chords","sortGroups","sortSubgroups","sortChords","relayout","groupSums","groupIndex","subgroupIndex","di","dj","subindex","startAngle","endAngle","resort","distances","strengths","charges","d3_layout_forceLinkDistance","d3_layout_forceLinkStrength","chargeDistance2","d3_layout_forceChargeDistance2","theta2","repulse","dw","dn","pointCharge","dragmove","tick","weight","d3_layout_forceAccumulate","neighbors","dimension","candidates","d3_layout_hierarchyRebind","hierarchy","d3_layout_hierarchyLinks","d3_layout_hierarchyVisitBefore","d3_layout_hierarchyVisitAfter","nodes2","d3_layout_hierarchyChildren","d3_layout_hierarchyValue","d3_layout_hierarchySort","child","stack","childs","revalue","partition","pie","d3_layout_pieSortByValue","padAngle","pa","arcs","d3_layout_stackX","d3_layout_stackY","d3_layout_stackOut","d3_layout_stackOrderDefault","d3_layout_stackOffsetZero","series","orders","offsets","d3_layout_stackOrders","d3_layout_stackOffsets","d3_layout_stackMaxIndex","sums","d3_layout_stackReduceSum","tops","bottoms","silhouette","wiggle","s2","s3","o0","expand","zero","reduce","d3_layout_stackSum","d3_layout_histogramBinSturges","d3_layout_histogramBinFixed","d3_layout_histogramRange","d3_layout_packSort","d3_layout_packInsert","_pack_next","_pack_prev","d3_layout_packSplice","d3_layout_packIntersects","dr","d3_layout_packSiblings","xMin","xMax","yMin","yMax","d3_layout_packLink","d3_layout_packPlace","isect","d3_layout_packUnlink","db","dc","d3_layout_treeSeparation","d3_layout_treeLeft","d3_layout_treeRight","d3_layout_treeMove","wm","wp","change","d3_layout_treeAncestor","vim","ancestor","d3_layout_treemapPadNull","d3_layout_treemapPad","d3_scaleExtent","d3_scaleRange","rangeExtent","d3_scale_bilinear","uninterpolate","d3_scale_nice","nice","d3_scale_niceStep","d3_scale_niceIdentity","histogram","frequency","valuer","ranger","binner","bin","bins","thresholds","pack","d3_layout_packTransform","separation","nodeSize","root0","root1","node1","queue","wrapTree","firstWalk","secondWalk","sizeNode","tx","siblings","d3_layout_treeShift","midpoint","vip","vop","vom","sip","sop","sim","som","apportion","cluster","previousNode","d3_layout_clusterX","d3_layout_clusterY","d3_layout_clusterLeft","d3_layout_clusterRight","treemap","stickies","pad","sticky","ratio","squarify","score","remaining","worst","stickify","rmax","rmin","padFunction","padConstant","µ","σ","logNormal","bates","irwinHall","d3_scale_polylinear","d3_scale_linearRebind","d3_scale_linearNice","d3_scale_linearTickRange","span","d3_scale_linearTicks","d3_scale_linearTickFormat","d3_scale_linearPrecision","d3_scale_linearFormatSignificant","d3_scale_linearFormatPrecision","d3_scale_linear","rangeRound","ticks","tickFormat","d3_scale_log","base","positive","niced","d3_scale_logNiceNegative","d3_scale_logFormat","d3_scale_powPow","d3_scale_pow","powp","powb","d3_scale_ordinal","rangeBand","steps","xi","rangePoints","rangeRoundPoints","rangeBands","outerPadding","rangeRoundBands","d3_category10","d3_category20","category20b","d3_category20b","category20c","d3_category20c","d3_zero","d3_scale_quantile","quantiles","invertExtent","quantize","d3_scale_quantize","threshold","d3_scale_threshold","d3_scale_identity","innerRadius","d3_svg_arcInnerRadius","outerRadius","d3_svg_arcOuterRadius","cornerRadius","padRadius","d3_svg_arcAuto","d3_svg_arcStartAngle","d3_svg_arcEndAngle","d3_svg_arcPadAngle","cw","circleSegment","ap","d3_svg_arcSweep","h1","h0","rc1","rc0","oc","kc","lc","t30","d3_svg_arcCornerTangents","t12","t03","t21","x01","y01","ox","oy","cx0","cx1","dx0","dy0","dx1","dy1","d3_svg_line","defined","d3_svg_lineLinear","interpolateKey","tension","d3_svg_lineInterpolators","d3_svg_lineLinearClosed","d3_svg_lineStepBefore","d3_svg_lineStepAfter","basis","d3_svg_lineBasis","pi","d3_svg_lineDot4","d3_svg_lineBasisBezier3","d3_svg_lineBasisBezier","cardinal","d3_svg_lineHermite","d3_svg_lineCardinalTangents","monotone","tangents","d3_svg_lineSlope","d3_svg_lineFiniteDifferences","d3_svg_lineMonotoneTangents","p2","d3_svg_lineBasisBezier1","d3_svg_lineBasisBezier2","d3_svg_lineRadial","d3_svg_area","interpolateReverse","points0","points1","fx0","fy0","fx1","fy1","d3_svg_chordRadius","d3_svg_diagonalProjection","d3_svg_diagonalRadialProjection","d3_svg_symbolSize","d3_svg_symbolType","d3_svg_symbolCircle","radial","curve","diagonal","p3","projection_","d3_svg_symbols","diamond","d3_svg_symbolTan30","square","d3_svg_symbolSqrt3","symbolTypes","d3_transitionId","d3_transitionNamespace","d3_transitionInherit","d3_transitionNode","d3_transition","interrupt","d3_selection_interruptNS","lock","activeId","active","d3_transitionPrototype","d3_transition_tween","d3_transition_text","inherit","tweens","elapsed","cancelId","cancel","subnodes","nameNS","attrNull","attrNullNS","attrTween","attrTweenNS","styleNull","styleString","styleTween","inheritId","id0","id1","tickFormat_","orient","d3_svg_axisDefaultOrient","innerTickSize","outerTickSize","tickPadding","tickArguments_","tickValues","tickTransform","tickEnter","tickExit","tickUpdate","tickSpacing","pathUpdate","lineEnter","lineUpdate","textEnter","textUpdate","d3_svg_axisX","d3_svg_axisY","d3_svg_axisOrients","tickSize","tickSubdivide","xExtentDomain","yExtentDomain","xClamp","yClamp","resizes","d3_svg_brushResizes","brushstart","background","resize","d3_svg_brushCursor","gUpdate","backgroundUpdate","redrawX","redrawY","eventTarget","event_","resizing","resizingX","resizingY","dragging","brushmove","brushend","ex","ey","altKey","move1","extent1","extent0","yi","nw","ne","se","sw","d3_time_formatUtc","d3_time_formatIso","d3_time_formatIsoNative","toISOString","d3_time_scale","tickMethod","d3_time_scaleSteps","d3_time_scaleMilliseconds","d3_time_scaleDate","skip","skipped","iso","second","seconds","minute","minutes","hour","timezone","hours","month","d3_time_scaleLocalMethods","d3_time_scaleLocalFormat","d3_time_scaleUtcMethods","d3_time_scaleUtcFormat","d3_json","d3_html","createRange","selectNode","body","createContextualFragment","responseXML","ReactPropTypesSecret","emptyFunction","propFullName","secret","getShim","ReactPropTypes","any","instanceOf","objectOf","checkPropTypes","webgl","cube","View","System","shaders","loadProgram","gl","Program","canvas","aoResolution","tSceneColor","tSceneNormal","tSceneDepth","tRandRotDepth","tRandRotColor","tAccumulator","tAccumulatorOut","tFXAA","tFXAAOut","tDOF","tAO","fbSceneColor","fbSceneNormal","fbRandRot","fbAccumulator","fbFXAA","fbAO","progAtoms","progBonds","progAccumulator","progAO","progFXAA","progDOF","progDisplayQuad","rAtoms","rBonds","rAccumulator","rAO","rDOF","rFXAA","sampleCount","colorRendered","normalRendered","sample","viewport","rot","COLOR_BUFFER_BIT","DEPTH_BUFFER_BIT","viewMat","model","setUniform","render","sceneRect","rotRect","invRot","activate","copyTexImage2D","TEXTURE_2D","RGBA","getAOProgress","initialize","getContext","enable","DEPTH_TEST","CULL_FACE","clearColor","clearDepth","getExtensions","createTextures","attribs","buildAttribs","aPosition","Renderable","Texture","internalFormat","DEPTH_COMPONENT","UNSIGNED_SHORT","Framebuffer","setResolution","res","setSystem","newSystem","make36","arr","aImposter","aRadius","aColor","imposter","aPosA","aPosB","aRadA","aRadB","aColA","aColB","posa","posb","rada","radb","cola","colb","bindFramebuffer","FRAMEBUFFER","display","GLBuffer","createBuffer","bindBuffer","ARRAY_BUFFER","bufferData","STATIC_DRAW","extArray","getExtension","createFramebuffer","drawBuffers","drawBuffersWEBGL","framebufferTexture2D","texture","COLOR_ATTACHMENT0","DEPTH_ATTACHMENT","mag","NEAREST","wraps","CLAMP_TO_EDGE","wrapt","UNSIGNED_BYTE","createTexture","texParameteri","TEXTURE_MAG_FILTER","TEXTURE_MIN_FILTER","TEXTURE_WRAP_S","TEXTURE_WRAP_T","texImage2D","bindTexture","activeTexture","TEXTURE0","program","buffers","primitiveCount","use","enableVertexAttribArray","vertexAttribPointer","FLOAT","drawArrays","TRIANGLES","disableVertexAttribArray","attributes","InstancedRenderable","instancedExt","vertexAttribDivisorANGLE","divisor","drawArraysInstancedANGLE","vertexSource","fragmentSource","compileProgram","gatherAttribs","uniforms","gatherUniforms","useProgram","vertexShader","compileShader","VERTEX_SHADER","fragmentShader","FRAGMENT_SHADER","createProgram","attachShader","linkProgram","getProgramParameter","LINK_STATUS","getProgramInfoLog","shader","createShader","shaderSource","getShaderParameter","COMPILE_STATUS","getShaderInfoLog","lineno","warn","typeString","nUniforms","ACTIVE_UNIFORMS","uniform","getActiveUniform","getUniformLocation","nAttribs","ACTIVE_ATTRIBUTES","attrib","getActiveAttrib","getAttribLocation","getRotation","setRotation","getTranslation","setTranslation","getZoom","setZoom","refreshView","interactions","buttonDown","shiftDown","lastX","lastY","mousedownFn","button","mouseupFn","keychangeFn","mousemoveFn","buttons","inverseZoom","viewDummyObj","wheelFn","removeAllEventListeners","stickball","toon","licorice","renderNewSequences","containerRef","React","createRef","nodeFillColor","_fornaContainer","PreFornaContainer","sequences","unpackedOptions","assign","nextProps","ref","_arrayFromIterator","_includesWith","pred","_uniqContentEquals","aIterator","bIterator","stackA","stackB","eq","_equals","aItem","typeA","constructor","global","ignoreCase","multiline","unicode","keysA","extendedStackA","extendedStackB"],"mappings":"4BACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GAKAK,EAAI,EAAGC,EAAW,GACpCD,EAAIF,EAASI,OAAQF,IACzBH,EAAUC,EAASE,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBV,IAAYU,EAAgBV,IACpFI,EAASO,KAAKD,EAAgBV,GAAS,IAExCU,EAAgBV,GAAW,EAE5B,IAAID,KAAYG,EACZI,OAAOC,UAAUC,eAAeC,KAAKP,EAAaH,KACpDa,EAAQb,GAAYG,EAAYH,IAKlC,IAFGc,GAAqBA,EAAoBf,GAEtCM,EAASC,QACdD,EAASU,OAATV,GAOF,IAAIW,EAAmB,GAKnBL,EAAkB,CACrBM,GAAI,GAML,SAASC,EAAejB,GACvB,OAAOkB,EAAoBC,EAAI,IAAM,CAAC,EAAI,kBAAkB,EAAI,kBAAkB,EAAI,eAAe,EAAI,iBAAiB,EAAI,YAAY,EAAI,wBAAwB,EAAI,wBAAwB,EAAI,eAAe,EAAI,0BAA0B,EAAI,aAAa,GAAK,eAAe,GAAK,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AI,OAEZ","file":"bundle.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t};\n\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t13: 0\n \t};\n\n\n\n \t// script path function\n \tfunction jsonpScriptSrc(chunkId) {\n \t\treturn __webpack_require__.p + \"\" + ({\"0\":\"async-alignment\",\"1\":\"dash_bio-shared\",\"2\":\"async-circos\",\"3\":\"async-ideogram\",\"4\":\"async-igv\",\"5\":\"async-moleculeviewer2\",\"6\":\"async-moleculeviewer3\",\"7\":\"async-needle\",\"8\":\"async-nglmoleculeviewer\",\"9\":\"async-onco\",\"10\":\"async-pileup\",\"11\":\"async-sequence\",\"12\":\"async-speck\"}[chunkId]||chunkId) + \".js\"\n \t}\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n \t// This file contains only the entry chunk.\n \t// The chunk loading function for additional chunks\n \t__webpack_require__.e = function requireEnsure(chunkId) {\n \t\tvar promises = [];\n\n\n \t\t// JSONP chunk loading for javascript\n\n \t\tvar installedChunkData = installedChunks[chunkId];\n \t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n \t\t\t// a Promise means \"currently loading\".\n \t\t\tif(installedChunkData) {\n \t\t\t\tpromises.push(installedChunkData[2]);\n \t\t\t} else {\n \t\t\t\t// setup Promise in chunk cache\n \t\t\t\tvar promise = new Promise(function(resolve, reject) {\n \t\t\t\t\tinstalledChunkData = installedChunks[chunkId] = [resolve, reject];\n \t\t\t\t});\n \t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n \t\t\t\t// start chunk loading\n \t\t\t\tvar script = document.createElement('script');\n \t\t\t\tvar onScriptComplete;\n\n \t\t\t\tscript.charset = 'utf-8';\n \t\t\t\tscript.timeout = 120;\n \t\t\t\tif (__webpack_require__.nc) {\n \t\t\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n \t\t\t\t}\n \t\t\t\tscript.src = jsonpScriptSrc(chunkId);\n\n \t\t\t\t// create error before stack unwound to get useful stacktrace later\n \t\t\t\tvar error = new Error();\n \t\t\t\tonScriptComplete = function (event) {\n \t\t\t\t\t// avoid mem leaks in IE.\n \t\t\t\t\tscript.onerror = script.onload = null;\n \t\t\t\t\tclearTimeout(timeout);\n \t\t\t\t\tvar chunk = installedChunks[chunkId];\n \t\t\t\t\tif(chunk !== 0) {\n \t\t\t\t\t\tif(chunk) {\n \t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n \t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n \t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n \t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n \t\t\t\t\t\t\terror.type = errorType;\n \t\t\t\t\t\t\terror.request = realSrc;\n \t\t\t\t\t\t\tchunk[1](error);\n \t\t\t\t\t\t}\n \t\t\t\t\t\tinstalledChunks[chunkId] = undefined;\n \t\t\t\t\t}\n \t\t\t\t};\n \t\t\t\tvar timeout = setTimeout(function(){\n \t\t\t\t\tonScriptComplete({ type: 'timeout', target: script });\n \t\t\t\t}, 120000);\n \t\t\t\tscript.onerror = script.onload = onScriptComplete;\n \t\t\t\tdocument.head.appendChild(script);\n \t\t\t}\n \t\t}\n \t\treturn Promise.all(promises);\n \t};\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n \tvar getCurrentScript = function() {\n \t var script = document.currentScript;\n \t if (!script) {\n \t /* Shim for IE11 and below */\n \t /* Do not take into account async scripts and inline scripts */\n\n \t var doc_scripts = document.getElementsByTagName('script');\n \t var scripts = [];\n\n \t for (var i = 0; i < doc_scripts.length; i++) {\n \t scripts.push(doc_scripts[i]);\n \t }\n\n \t scripts = scripts.filter(function(s) { return !s.async && !s.text && !s.textContent; });\n \t script = scripts.slice(-1)[0];\n \t }\n\n \t return script;\n \t};\n\n \tvar isLocalScript = function(script) {\n \t return /\\/_dash-component-suites\\//.test(script.src);\n \t};\n\n \tObject.defineProperty(__webpack_require__, 'p', {\n \t get: (function () {\n \t var script = getCurrentScript();\n\n \t var url = script.src.split('/').slice(0, -1).join('/') + '/';\n\n \t return function() {\n \t return url;\n \t };\n \t })()\n \t});\n\n \tif (typeof jsonpScriptSrc !== 'undefined') {\n \t var __jsonpScriptSrc__ = jsonpScriptSrc;\n \t jsonpScriptSrc = function(chunkId) {\n \t var script = getCurrentScript();\n \t var isLocal = isLocalScript(script);\n\n \t var src = __jsonpScriptSrc__(chunkId);\n\n \t if(!isLocal) {\n \t return src;\n \t }\n\n \t var srcFragments = src.split('/');\n \t var fileFragments = srcFragments.slice(-1)[0].split('.');\n\n \t fileFragments.splice(1, 0, \"v0_7_1m1627344160\");\n \t srcFragments.splice(-1, 1, fileFragments.join('.'))\n\n \t return srcFragments.join('/');\n \t };\n \t}\n\n\n \tvar jsonpArray = window[\"webpackJsonpdash_bio\"] = window[\"webpackJsonpdash_bio\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 36);\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&\n Symbol.for &&\n Symbol.for('react.element')) ||\n 0xeac7;\n\n var isValidElement = function(object) {\n return typeof object === 'object' &&\n object !== null &&\n object.$$typeof === REACT_ELEMENT_TYPE;\n };\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","(function() { module.exports = window[\"React\"]; }());","/* eslint-disable no-inline-comments */\nexport default {\n alignmentChart: () =>\n import(\n /* webpackChunkName: \"alignment\" */ './fragments/AlignmentChart.react'\n ),\n circos: () =>\n import(/* webpackChunkName: \"circos\" */ './fragments/Circos.react'),\n ideogram: () =>\n import(/* webpackChunkName: \"ideogram\" */ './fragments/Ideogram.react'),\n igv: () => import(/* webpackChunkName: \"igv\" */ './fragments/Igv.react'),\n pileup: () =>\n import(/* webpackChunkName: \"pileup\" */ './fragments/Pileup.react'),\n molecule2dViewer: () =>\n import(\n /* webpackChunkName: \"moleculeviewer2\" */ './fragments/Molecule2dViewer.react'\n ),\n molecule3dViewer: () =>\n import(\n /* webpackChunkName: \"moleculeviewer3\" */ './fragments/Molecule3dViewer'\n ),\n nglmoleculeViewer: () =>\n import(\n /* webpackChunkName: \"nglmoleculeviewer\" */ './fragments/NglMoleculeViewer.react'\n ),\n needlePlot: () =>\n import(/* webpackChunkName: \"needle\" */ './fragments/NeedlePlot.react'),\n oncoPrint: () =>\n import(/* webpackChunkName: \"onco\" */ './fragments/OncoPrint.react'),\n sequenceViewer: () =>\n import(\n /* webpackChunkName: \"sequence\" */ './fragments/SequenceViewer.react'\n ),\n speck: () =>\n import(/* webpackChunkName: \"speck\" */ './fragments/Speck.react'),\n};\n","import _isPlaceholder from './_isPlaceholder.js';\n\n/**\n * Optimized internal one-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\nexport default function _curry1(fn) {\n return function f1(a) {\n if (arguments.length === 0 || _isPlaceholder(a)) {\n return f1;\n } else {\n return fn.apply(this, arguments);\n }\n };\n}","export default function _isPlaceholder(a) {\n return a != null && typeof a === 'object' && a['@@functional/placeholder'] === true;\n}","export default function _has(prop, obj) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}","module.exports = {};\nmodule.exports[ 0] = module.exports[ 'Xx'] = {'symbol': 'Xx', 'name': 'unknown', 'mass': 1.00000000, 'radius': 1.0000, 'color': [1.000, 0.078, 0.576], 'number': 0};\nmodule.exports[ 1] = module.exports[ 'H'] = {'symbol': 'H', 'name': 'hydrogen', 'mass': 1.00794000, 'radius': 0.3100, 'color': [1.000, 1.000, 1.000], 'number': 1};\nmodule.exports[ 2] = module.exports[ 'He'] = {'symbol': 'He', 'name': 'helium', 'mass': 4.00260200, 'radius': 0.2800, 'color': [0.851, 1.000, 1.000], 'number': 2};\nmodule.exports[ 3] = module.exports[ 'Li'] = {'symbol': 'Li', 'name': 'lithium', 'mass': 6.94100000, 'radius': 1.2800, 'color': [0.800, 0.502, 1.000], 'number': 3};\nmodule.exports[ 4] = module.exports[ 'Be'] = {'symbol': 'Be', 'name': 'beryllium', 'mass': 9.01218200, 'radius': 0.9600, 'color': [0.761, 1.000, 0.000], 'number': 4};\nmodule.exports[ 5] = module.exports[ 'B'] = {'symbol': 'B', 'name': 'boron', 'mass': 10.81100000, 'radius': 0.8400, 'color': [1.000, 0.710, 0.710], 'number': 5};\nmodule.exports[ 6] = module.exports[ 'C'] = {'symbol': 'C', 'name': 'carbon', 'mass': 12.01070000, 'radius': 0.7300, 'color': [0.565, 0.565, 0.565], 'number': 6};\nmodule.exports[ 7] = module.exports[ 'N'] = {'symbol': 'N', 'name': 'nitrogen', 'mass': 14.00670000, 'radius': 0.7100, 'color': [0.188, 0.314, 0.973], 'number': 7};\nmodule.exports[ 8] = module.exports[ 'O'] = {'symbol': 'O', 'name': 'oxygen', 'mass': 15.99940000, 'radius': 0.6600, 'color': [1.000, 0.051, 0.051], 'number': 8};\nmodule.exports[ 9] = module.exports[ 'F'] = {'symbol': 'F', 'name': 'fluorine', 'mass': 18.99840320, 'radius': 0.5700, 'color': [0.565, 0.878, 0.314], 'number': 9};\nmodule.exports[ 10] = module.exports[ 'Ne'] = {'symbol': 'Ne', 'name': 'neon', 'mass': 20.17970000, 'radius': 0.5800, 'color': [0.702, 0.890, 0.961], 'number': 10};\nmodule.exports[ 11] = module.exports[ 'Na'] = {'symbol': 'Na', 'name': 'sodium', 'mass': 22.98976928, 'radius': 1.6600, 'color': [0.671, 0.361, 0.949], 'number': 11};\nmodule.exports[ 12] = module.exports[ 'Mg'] = {'symbol': 'Mg', 'name': 'magnesium', 'mass': 24.30500000, 'radius': 1.4100, 'color': [0.541, 1.000, 0.000], 'number': 12};\nmodule.exports[ 13] = module.exports[ 'Al'] = {'symbol': 'Al', 'name': 'aluminum', 'mass': 26.98153860, 'radius': 1.2100, 'color': [0.749, 0.651, 0.651], 'number': 13};\nmodule.exports[ 14] = module.exports[ 'Si'] = {'symbol': 'Si', 'name': 'silicon', 'mass': 28.08550000, 'radius': 1.1100, 'color': [0.941, 0.784, 0.627], 'number': 14};\nmodule.exports[ 15] = module.exports[ 'P'] = {'symbol': 'P', 'name': 'phosphorus', 'mass': 30.97376200, 'radius': 1.0700, 'color': [1.000, 0.502, 0.000], 'number': 15};\nmodule.exports[ 16] = module.exports[ 'S'] = {'symbol': 'S', 'name': 'sulfur', 'mass': 32.06500000, 'radius': 1.0500, 'color': [1.000, 1.000, 0.188], 'number': 16};\nmodule.exports[ 17] = module.exports[ 'Cl'] = {'symbol': 'Cl', 'name': 'chlorine', 'mass': 35.45300000, 'radius': 1.0200, 'color': [0.122, 0.941, 0.122], 'number': 17};\nmodule.exports[ 18] = module.exports[ 'Ar'] = {'symbol': 'Ar', 'name': 'argon', 'mass': 39.94800000, 'radius': 1.0600, 'color': [0.502, 0.820, 0.890], 'number': 18};\nmodule.exports[ 19] = module.exports[ 'K'] = {'symbol': 'K', 'name': 'potassium', 'mass': 39.09830000, 'radius': 2.0300, 'color': [0.561, 0.251, 0.831], 'number': 19};\nmodule.exports[ 20] = module.exports[ 'Ca'] = {'symbol': 'Ca', 'name': 'calcium', 'mass': 40.07800000, 'radius': 1.7600, 'color': [0.239, 1.000, 0.000], 'number': 20};\nmodule.exports[ 21] = module.exports[ 'Sc'] = {'symbol': 'Sc', 'name': 'scandium', 'mass': 44.95591200, 'radius': 1.7000, 'color': [0.902, 0.902, 0.902], 'number': 21};\nmodule.exports[ 22] = module.exports[ 'Ti'] = {'symbol': 'Ti', 'name': 'titanium', 'mass': 47.86700000, 'radius': 1.6000, 'color': [0.749, 0.761, 0.780], 'number': 22};\nmodule.exports[ 23] = module.exports[ 'V'] = {'symbol': 'V', 'name': 'vanadium', 'mass': 50.94150000, 'radius': 1.5300, 'color': [0.651, 0.651, 0.671], 'number': 23};\nmodule.exports[ 24] = module.exports[ 'Cr'] = {'symbol': 'Cr', 'name': 'chromium', 'mass': 51.99610000, 'radius': 1.3900, 'color': [0.541, 0.600, 0.780], 'number': 24};\nmodule.exports[ 25] = module.exports[ 'Mn'] = {'symbol': 'Mn', 'name': 'manganese', 'mass': 54.93804500, 'radius': 1.3900, 'color': [0.611, 0.478, 0.780], 'number': 25};\nmodule.exports[ 26] = module.exports[ 'Fe'] = {'symbol': 'Fe', 'name': 'iron', 'mass': 55.84500000, 'radius': 1.3200, 'color': [0.878, 0.400, 0.200], 'number': 26};\nmodule.exports[ 27] = module.exports[ 'Co'] = {'symbol': 'Co', 'name': 'cobalt', 'mass': 58.69340000, 'radius': 1.2600, 'color': [0.941, 0.565, 0.627], 'number': 27};\nmodule.exports[ 28] = module.exports[ 'Ni'] = {'symbol': 'Ni', 'name': 'nickel', 'mass': 58.93319500, 'radius': 1.2400, 'color': [0.314, 0.816, 0.314], 'number': 28};\nmodule.exports[ 29] = module.exports[ 'Cu'] = {'symbol': 'Cu', 'name': 'copper', 'mass': 63.54600000, 'radius': 1.3200, 'color': [0.784, 0.502, 0.200], 'number': 29};\nmodule.exports[ 30] = module.exports[ 'Zn'] = {'symbol': 'Zn', 'name': 'zinc', 'mass': 65.38000000, 'radius': 1.2200, 'color': [0.490, 0.502, 0.690], 'number': 30};\nmodule.exports[ 31] = module.exports[ 'Ga'] = {'symbol': 'Ga', 'name': 'gallium', 'mass': 69.72300000, 'radius': 1.2200, 'color': [0.761, 0.561, 0.561], 'number': 31};\nmodule.exports[ 32] = module.exports[ 'Ge'] = {'symbol': 'Ge', 'name': 'germanium', 'mass': 72.64000000, 'radius': 1.2000, 'color': [0.400, 0.561, 0.561], 'number': 32};\nmodule.exports[ 33] = module.exports[ 'As'] = {'symbol': 'As', 'name': 'arsenic', 'mass': 74.92160000, 'radius': 1.1900, 'color': [0.741, 0.502, 0.890], 'number': 33};\nmodule.exports[ 34] = module.exports[ 'Se'] = {'symbol': 'Se', 'name': 'selenium', 'mass': 78.96000000, 'radius': 1.2000, 'color': [1.000, 0.631, 0.000], 'number': 34};\nmodule.exports[ 35] = module.exports[ 'Br'] = {'symbol': 'Br', 'name': 'bromine', 'mass': 79.90400000, 'radius': 1.2000, 'color': [0.651, 0.161, 0.161], 'number': 35};\nmodule.exports[ 36] = module.exports[ 'Kr'] = {'symbol': 'Kr', 'name': 'krypton', 'mass': 83.79800000, 'radius': 1.1600, 'color': [0.361, 0.722, 0.820], 'number': 36};\nmodule.exports[ 37] = module.exports[ 'Rb'] = {'symbol': 'Rb', 'name': 'rubidium', 'mass': 85.46780000, 'radius': 2.2000, 'color': [0.439, 0.180, 0.690], 'number': 37};\nmodule.exports[ 38] = module.exports[ 'Sr'] = {'symbol': 'Sr', 'name': 'strontium', 'mass': 87.62000000, 'radius': 1.9500, 'color': [0.000, 1.000, 0.000], 'number': 38};\nmodule.exports[ 39] = module.exports[ 'Y'] = {'symbol': 'Y', 'name': 'yttrium', 'mass': 88.90585000, 'radius': 1.9000, 'color': [0.580, 1.000, 1.000], 'number': 39};\nmodule.exports[ 40] = module.exports[ 'Zr'] = {'symbol': 'Zr', 'name': 'zirconium', 'mass': 91.22400000, 'radius': 1.7500, 'color': [0.580, 0.878, 0.878], 'number': 40};\nmodule.exports[ 41] = module.exports[ 'Nb'] = {'symbol': 'Nb', 'name': 'niobium', 'mass': 92.90638000, 'radius': 1.6400, 'color': [0.451, 0.761, 0.788], 'number': 41};\nmodule.exports[ 42] = module.exports[ 'Mo'] = {'symbol': 'Mo', 'name': 'molybdenum', 'mass': 95.96000000, 'radius': 1.5400, 'color': [0.329, 0.710, 0.710], 'number': 42};\nmodule.exports[ 43] = module.exports[ 'Tc'] = {'symbol': 'Tc', 'name': 'technetium', 'mass': 98.00000000, 'radius': 1.4700, 'color': [0.231, 0.620, 0.620], 'number': 43};\nmodule.exports[ 44] = module.exports[ 'Ru'] = {'symbol': 'Ru', 'name': 'ruthenium', 'mass': 101.07000000, 'radius': 1.4600, 'color': [0.141, 0.561, 0.561], 'number': 44};\nmodule.exports[ 45] = module.exports[ 'Rh'] = {'symbol': 'Rh', 'name': 'rhodium', 'mass': 102.90550000, 'radius': 1.4200, 'color': [0.039, 0.490, 0.549], 'number': 45};\nmodule.exports[ 46] = module.exports[ 'Pd'] = {'symbol': 'Pd', 'name': 'palladium', 'mass': 106.42000000, 'radius': 1.3900, 'color': [0.000, 0.412, 0.522], 'number': 46};\nmodule.exports[ 47] = module.exports[ 'Ag'] = {'symbol': 'Ag', 'name': 'silver', 'mass': 107.86820000, 'radius': 1.4500, 'color': [0.753, 0.753, 0.753], 'number': 47};\nmodule.exports[ 48] = module.exports[ 'Cd'] = {'symbol': 'Cd', 'name': 'cadmium', 'mass': 112.41100000, 'radius': 1.4400, 'color': [1.000, 0.851, 0.561], 'number': 48};\nmodule.exports[ 49] = module.exports[ 'In'] = {'symbol': 'In', 'name': 'indium', 'mass': 114.81800000, 'radius': 1.4200, 'color': [0.651, 0.459, 0.451], 'number': 49};\nmodule.exports[ 50] = module.exports[ 'Sn'] = {'symbol': 'Sn', 'name': 'tin', 'mass': 118.71000000, 'radius': 1.3900, 'color': [0.400, 0.502, 0.502], 'number': 50};\nmodule.exports[ 51] = module.exports[ 'Sb'] = {'symbol': 'Sb', 'name': 'antimony', 'mass': 121.76000000, 'radius': 1.3900, 'color': [0.620, 0.388, 0.710], 'number': 51};\nmodule.exports[ 52] = module.exports[ 'Te'] = {'symbol': 'Te', 'name': 'tellurium', 'mass': 127.60000000, 'radius': 1.3800, 'color': [0.831, 0.478, 0.000], 'number': 52};\nmodule.exports[ 53] = module.exports[ 'I'] = {'symbol': 'I', 'name': 'iodine', 'mass': 126.90470000, 'radius': 1.3900, 'color': [0.580, 0.000, 0.580], 'number': 53};\nmodule.exports[ 54] = module.exports[ 'Xe'] = {'symbol': 'Xe', 'name': 'xenon', 'mass': 131.29300000, 'radius': 1.4000, 'color': [0.259, 0.620, 0.690], 'number': 54};\nmodule.exports[ 55] = module.exports[ 'Cs'] = {'symbol': 'Cs', 'name': 'cesium', 'mass': 132.90545190, 'radius': 2.4400, 'color': [0.341, 0.090, 0.561], 'number': 55};\nmodule.exports[ 56] = module.exports[ 'Ba'] = {'symbol': 'Ba', 'name': 'barium', 'mass': 137.32700000, 'radius': 2.1500, 'color': [0.000, 0.788, 0.000], 'number': 56};\nmodule.exports[ 57] = module.exports[ 'La'] = {'symbol': 'La', 'name': 'lanthanum', 'mass': 138.90547000, 'radius': 2.0700, 'color': [0.439, 0.831, 1.000], 'number': 57};\nmodule.exports[ 58] = module.exports[ 'Ce'] = {'symbol': 'Ce', 'name': 'cerium', 'mass': 140.11600000, 'radius': 2.0400, 'color': [1.000, 1.000, 0.780], 'number': 58};\nmodule.exports[ 59] = module.exports[ 'Pr'] = {'symbol': 'Pr', 'name': 'praseodymium', 'mass': 140.90765000, 'radius': 2.0300, 'color': [0.851, 1.000, 0.780], 'number': 59};\nmodule.exports[ 60] = module.exports[ 'Nd'] = {'symbol': 'Nd', 'name': 'neodymium', 'mass': 144.24200000, 'radius': 2.0100, 'color': [0.780, 1.000, 0.780], 'number': 60};\nmodule.exports[ 61] = module.exports[ 'Pm'] = {'symbol': 'Pm', 'name': 'promethium', 'mass': 145.00000000, 'radius': 1.9900, 'color': [0.639, 1.000, 0.780], 'number': 61};\nmodule.exports[ 62] = module.exports[ 'Sm'] = {'symbol': 'Sm', 'name': 'samarium', 'mass': 150.36000000, 'radius': 1.9800, 'color': [0.561, 1.000, 0.780], 'number': 62};\nmodule.exports[ 63] = module.exports[ 'Eu'] = {'symbol': 'Eu', 'name': 'europium', 'mass': 151.96400000, 'radius': 1.9800, 'color': [0.380, 1.000, 0.780], 'number': 63};\nmodule.exports[ 64] = module.exports[ 'Gd'] = {'symbol': 'Gd', 'name': 'gadolinium', 'mass': 157.25000000, 'radius': 1.9600, 'color': [0.271, 1.000, 0.780], 'number': 64};\nmodule.exports[ 65] = module.exports[ 'Tb'] = {'symbol': 'Tb', 'name': 'terbium', 'mass': 158.92535000, 'radius': 1.9400, 'color': [0.189, 1.000, 0.780], 'number': 65};\nmodule.exports[ 66] = module.exports[ 'Dy'] = {'symbol': 'Dy', 'name': 'dysprosium', 'mass': 162.50000000, 'radius': 1.9200, 'color': [0.122, 1.000, 0.780], 'number': 66};\nmodule.exports[ 67] = module.exports[ 'Ho'] = {'symbol': 'Ho', 'name': 'holmium', 'mass': 164.93032000, 'radius': 1.9200, 'color': [0.000, 1.000, 0.612], 'number': 67};\nmodule.exports[ 68] = module.exports[ 'Er'] = {'symbol': 'Er', 'name': 'erbium', 'mass': 167.25900000, 'radius': 1.8900, 'color': [0.000, 0.902, 0.459], 'number': 68};\nmodule.exports[ 69] = module.exports[ 'Tm'] = {'symbol': 'Tm', 'name': 'thulium', 'mass': 168.93421000, 'radius': 1.9000, 'color': [0.000, 0.831, 0.322], 'number': 69};\nmodule.exports[ 70] = module.exports[ 'Yb'] = {'symbol': 'Yb', 'name': 'ytterbium', 'mass': 173.05400000, 'radius': 1.8700, 'color': [0.000, 0.749, 0.220], 'number': 70};\nmodule.exports[ 71] = module.exports[ 'Lu'] = {'symbol': 'Lu', 'name': 'lutetium', 'mass': 174.96680000, 'radius': 1.8700, 'color': [0.000, 0.671, 0.141], 'number': 71};\nmodule.exports[ 72] = module.exports[ 'Hf'] = {'symbol': 'Hf', 'name': 'hafnium', 'mass': 178.49000000, 'radius': 1.7500, 'color': [0.302, 0.761, 1.000], 'number': 72};\nmodule.exports[ 73] = module.exports[ 'Ta'] = {'symbol': 'Ta', 'name': 'tantalum', 'mass': 180.94788000, 'radius': 1.7000, 'color': [0.302, 0.651, 1.000], 'number': 73};\nmodule.exports[ 74] = module.exports[ 'W'] = {'symbol': 'W', 'name': 'tungsten', 'mass': 183.84000000, 'radius': 1.6200, 'color': [0.129, 0.580, 0.839], 'number': 74};\nmodule.exports[ 75] = module.exports[ 'Re'] = {'symbol': 'Re', 'name': 'rhenium', 'mass': 186.20700000, 'radius': 1.5100, 'color': [0.149, 0.490, 0.671], 'number': 75};\nmodule.exports[ 76] = module.exports[ 'Os'] = {'symbol': 'Os', 'name': 'osmium', 'mass': 190.23000000, 'radius': 1.4400, 'color': [0.149, 0.400, 0.588], 'number': 76};\nmodule.exports[ 77] = module.exports[ 'Ir'] = {'symbol': 'Ir', 'name': 'iridium', 'mass': 192.21700000, 'radius': 1.4100, 'color': [0.090, 0.329, 0.529], 'number': 77};\nmodule.exports[ 78] = module.exports[ 'Pt'] = {'symbol': 'Pt', 'name': 'platinum', 'mass': 195.08400000, 'radius': 1.3600, 'color': [0.816, 0.816, 0.878], 'number': 78};\nmodule.exports[ 79] = module.exports[ 'Au'] = {'symbol': 'Au', 'name': 'gold', 'mass': 196.96656900, 'radius': 1.3600, 'color': [1.000, 0.820, 0.137], 'number': 79};\nmodule.exports[ 80] = module.exports[ 'Hg'] = {'symbol': 'Hg', 'name': 'mercury', 'mass': 200.59000000, 'radius': 1.3200, 'color': [0.722, 0.722, 0.816], 'number': 80};\nmodule.exports[ 81] = module.exports[ 'Tl'] = {'symbol': 'Tl', 'name': 'thallium', 'mass': 204.38330000, 'radius': 1.4500, 'color': [0.651, 0.329, 0.302], 'number': 81};\nmodule.exports[ 82] = module.exports[ 'Pb'] = {'symbol': 'Pb', 'name': 'lead', 'mass': 207.20000000, 'radius': 1.4600, 'color': [0.341, 0.349, 0.380], 'number': 82};\nmodule.exports[ 83] = module.exports[ 'Bi'] = {'symbol': 'Bi', 'name': 'bismuth', 'mass': 208.98040000, 'radius': 1.4800, 'color': [0.620, 0.310, 0.710], 'number': 83};\nmodule.exports[ 84] = module.exports[ 'Po'] = {'symbol': 'Po', 'name': 'polonium', 'mass': 210.00000000, 'radius': 1.4000, 'color': [0.671, 0.361, 0.000], 'number': 84};\nmodule.exports[ 85] = module.exports[ 'At'] = {'symbol': 'At', 'name': 'astatine', 'mass': 210.00000000, 'radius': 1.5000, 'color': [0.459, 0.310, 0.271], 'number': 85};\nmodule.exports[ 86] = module.exports[ 'Rn'] = {'symbol': 'Rn', 'name': 'radon', 'mass': 220.00000000, 'radius': 1.5000, 'color': [0.259, 0.510, 0.588], 'number': 86};\nmodule.exports[ 87] = module.exports[ 'Fr'] = {'symbol': 'Fr', 'name': 'francium', 'mass': 223.00000000, 'radius': 2.6000, 'color': [0.259, 0.000, 0.400], 'number': 87};\nmodule.exports[ 88] = module.exports[ 'Ra'] = {'symbol': 'Ra', 'name': 'radium', 'mass': 226.00000000, 'radius': 2.2100, 'color': [0.000, 0.490, 0.000], 'number': 88};\nmodule.exports[ 89] = module.exports[ 'Ac'] = {'symbol': 'Ac', 'name': 'actinium', 'mass': 227.00000000, 'radius': 2.1500, 'color': [0.439, 0.671, 0.980], 'number': 89};\nmodule.exports[ 90] = module.exports[ 'Th'] = {'symbol': 'Th', 'name': 'thorium', 'mass': 231.03588000, 'radius': 2.0600, 'color': [0.000, 0.729, 1.000], 'number': 90};\nmodule.exports[ 91] = module.exports[ 'Pa'] = {'symbol': 'Pa', 'name': 'protactinium', 'mass': 232.03806000, 'radius': 2.0000, 'color': [0.000, 0.631, 1.000], 'number': 91};\nmodule.exports[ 92] = module.exports[ 'U'] = {'symbol': 'U', 'name': 'uranium', 'mass': 237.00000000, 'radius': 1.9600, 'color': [0.000, 0.561, 1.000], 'number': 92};\nmodule.exports[ 93] = module.exports[ 'Np'] = {'symbol': 'Np', 'name': 'neptunium', 'mass': 238.02891000, 'radius': 1.9000, 'color': [0.000, 0.502, 1.000], 'number': 93};\nmodule.exports[ 94] = module.exports[ 'Pu'] = {'symbol': 'Pu', 'name': 'plutonium', 'mass': 243.00000000, 'radius': 1.8700, 'color': [0.000, 0.420, 1.000], 'number': 94};\nmodule.exports[ 95] = module.exports[ 'Am'] = {'symbol': 'Am', 'name': 'americium', 'mass': 244.00000000, 'radius': 1.8000, 'color': [0.329, 0.361, 0.949], 'number': 95};\nmodule.exports[ 96] = module.exports[ 'Cm'] = {'symbol': 'Cm', 'name': 'curium', 'mass': 247.00000000, 'radius': 1.6900, 'color': [0.471, 0.361, 0.890], 'number': 96};\nmodule.exports[ 97] = module.exports[ 'Bk'] = {'symbol': 'Bk', 'name': 'berkelium', 'mass': 247.00000000, 'radius': 1.6600, 'color': [0.541, 0.310, 0.890], 'number': 97};\nmodule.exports[ 98] = module.exports[ 'Cf'] = {'symbol': 'Cf', 'name': 'californium', 'mass': 251.00000000, 'radius': 1.6800, 'color': [0.631, 0.212, 0.831], 'number': 98};\nmodule.exports[ 99] = module.exports[ 'Es'] = {'symbol': 'Es', 'name': 'einsteinium', 'mass': 252.00000000, 'radius': 1.6500, 'color': [0.702, 0.122, 0.831], 'number': 99};\nmodule.exports[100] = module.exports[ 'Fm'] = {'symbol': 'Fm', 'name': 'fermium', 'mass': 257.00000000, 'radius': 1.6700, 'color': [0.702, 0.122, 0.729], 'number': 100};\nmodule.exports[101] = module.exports[ 'Md'] = {'symbol': 'Md', 'name': 'mendelevium', 'mass': 258.00000000, 'radius': 1.7300, 'color': [0.702, 0.051, 0.651], 'number': 101};\nmodule.exports[102] = module.exports[ 'No'] = {'symbol': 'No', 'name': 'nobelium', 'mass': 259.00000000, 'radius': 1.7600, 'color': [0.741, 0.051, 0.529], 'number': 102};\nmodule.exports[103] = module.exports[ 'Lr'] = {'symbol': 'Lr', 'name': 'lawrencium', 'mass': 262.00000000, 'radius': 1.6100, 'color': [0.780, 0.000, 0.400], 'number': 103};\nmodule.exports[104] = module.exports[ 'Rf'] = {'symbol': 'Rf', 'name': 'rutherfordium', 'mass': 261.00000000, 'radius': 1.5700, 'color': [0.800, 0.000, 0.349], 'number': 104};\nmodule.exports[105] = module.exports[ 'Db'] = {'symbol': 'Db', 'name': 'dubnium', 'mass': 262.00000000, 'radius': 1.4900, 'color': [0.820, 0.000, 0.310], 'number': 105};\nmodule.exports[106] = module.exports[ 'Sg'] = {'symbol': 'Sg', 'name': 'seaborgium', 'mass': 266.00000000, 'radius': 1.4300, 'color': [0.851, 0.000, 0.271], 'number': 106};\nmodule.exports[107] = module.exports[ 'Bh'] = {'symbol': 'Bh', 'name': 'bohrium', 'mass': 264.00000000, 'radius': 1.4100, 'color': [0.878, 0.000, 0.220], 'number': 107};\nmodule.exports[108] = module.exports[ 'Hs'] = {'symbol': 'Hs', 'name': 'hassium', 'mass': 277.00000000, 'radius': 1.3400, 'color': [0.902, 0.000, 0.180], 'number': 108};\nmodule.exports[109] = module.exports[ 'Mt'] = {'symbol': 'Mt', 'name': 'meitnerium', 'mass': 268.00000000, 'radius': 1.2900, 'color': [0.922, 0.000, 0.149], 'number': 109};\nmodule.exports[110] = module.exports[ 'Ds'] = {'symbol': 'Ds', 'name': 'Ds', 'mass': 271.00000000, 'radius': 1.2800, 'color': [0.922, 0.000, 0.149], 'number': 110};\nmodule.exports[111] = module.exports['Uuu'] = {'symbol': 'Uuu', 'name': 'Uuu', 'mass': 272.00000000, 'radius': 1.2100, 'color': [0.922, 0.000, 0.149], 'number': 111};\nmodule.exports[112] = module.exports['Uub'] = {'symbol': 'Uub', 'name': 'Uub', 'mass': 285.00000000, 'radius': 1.2200, 'color': [0.922, 0.000, 0.149], 'number': 112};\nmodule.exports[113] = module.exports['Uut'] = {'symbol': 'Uut', 'name': 'Uut', 'mass': 284.00000000, 'radius': 1.3600, 'color': [0.922, 0.000, 0.149], 'number': 113};\nmodule.exports[114] = module.exports['Uuq'] = {'symbol': 'Uuq', 'name': 'Uuq', 'mass': 289.00000000, 'radius': 1.4300, 'color': [0.922, 0.000, 0.149], 'number': 114};\nmodule.exports[115] = module.exports['Uup'] = {'symbol': 'Uup', 'name': 'Uup', 'mass': 288.00000000, 'radius': 1.6200, 'color': [0.922, 0.000, 0.149], 'number': 115};\nmodule.exports[116] = module.exports['Uuh'] = {'symbol': 'Uuh', 'name': 'Uuh', 'mass': 292.00000000, 'radius': 1.7500, 'color': [0.922, 0.000, 0.149], 'number': 116};\nmodule.exports[117] = module.exports['Uus'] = {'symbol': 'Uus', 'name': 'Uus', 'mass': 294.00000000, 'radius': 1.6500, 'color': [0.922, 0.000, 0.149], 'number': 117};\nmodule.exports[118] = module.exports['Uuo'] = {'symbol': 'Uuo', 'name': 'Uuo', 'mass': 296.00000000, 'radius': 1.5700, 'color': [0.922, 0.000, 0.149], 'number': 118};\n","/**\n * @fileoverview gl-matrix - High performance matrix and vector operations\n * @author Brandon Jones\n * @author Colin MacKenzie IV\n * @version 2.2.2\n */\n\n/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation\n and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\n\n(function(_global) {\n \"use strict\";\n\n var shim = {};\n if (typeof(exports) === 'undefined') {\n if(typeof define == 'function' && typeof define.amd == 'object' && define.amd) {\n shim.exports = {};\n define(function() {\n return shim.exports;\n });\n } else {\n // gl-matrix lives in a browser, define its namespaces in global\n shim.exports = typeof(window) !== 'undefined' ? window : _global;\n }\n }\n else {\n // gl-matrix lives in commonjs, define its namespaces in exports\n shim.exports = exports;\n }\n\n (function(exports) {\n /* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation \n and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\n\nif(!GLMAT_EPSILON) {\n var GLMAT_EPSILON = 0.000001;\n}\n\nif(!GLMAT_ARRAY_TYPE) {\n var GLMAT_ARRAY_TYPE = (typeof Float32Array !== 'undefined') ? Float32Array : Array;\n}\n\nif(!GLMAT_RANDOM) {\n var GLMAT_RANDOM = Math.random;\n}\n\n/**\n * @class Common utilities\n * @name glMatrix\n */\nvar glMatrix = {};\n\n/**\n * Sets the type of array used when creating new vectors and matrices\n *\n * @param {Type} type Array type, such as Float32Array or Array\n */\nglMatrix.setMatrixArrayType = function(type) {\n GLMAT_ARRAY_TYPE = type;\n}\n\nif(typeof(exports) !== 'undefined') {\n exports.glMatrix = glMatrix;\n}\n\nvar degree = Math.PI / 180;\n\n/**\n* Convert Degree To Radian\n*\n* @param {Number} Angle in Degrees\n*/\nglMatrix.toRadian = function(a){\n return a * degree;\n}\n;\n/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation \n and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\n/**\n * @class 2 Dimensional Vector\n * @name vec2\n */\n\nvar vec2 = {};\n\n/**\n * Creates a new, empty vec2\n *\n * @returns {vec2} a new 2D vector\n */\nvec2.create = function() {\n var out = new GLMAT_ARRAY_TYPE(2);\n out[0] = 0;\n out[1] = 0;\n return out;\n};\n\n/**\n * Creates a new vec2 initialized with values from an existing vector\n *\n * @param {vec2} a vector to clone\n * @returns {vec2} a new 2D vector\n */\nvec2.clone = function(a) {\n var out = new GLMAT_ARRAY_TYPE(2);\n out[0] = a[0];\n out[1] = a[1];\n return out;\n};\n\n/**\n * Creates a new vec2 initialized with the given values\n *\n * @param {Number} x X component\n * @param {Number} y Y component\n * @returns {vec2} a new 2D vector\n */\nvec2.fromValues = function(x, y) {\n var out = new GLMAT_ARRAY_TYPE(2);\n out[0] = x;\n out[1] = y;\n return out;\n};\n\n/**\n * Copy the values from one vec2 to another\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the source vector\n * @returns {vec2} out\n */\nvec2.copy = function(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n return out;\n};\n\n/**\n * Set the components of a vec2 to the given values\n *\n * @param {vec2} out the receiving vector\n * @param {Number} x X component\n * @param {Number} y Y component\n * @returns {vec2} out\n */\nvec2.set = function(out, x, y) {\n out[0] = x;\n out[1] = y;\n return out;\n};\n\n/**\n * Adds two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {vec2} out\n */\nvec2.add = function(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n return out;\n};\n\n/**\n * Subtracts vector b from vector a\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {vec2} out\n */\nvec2.subtract = function(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n return out;\n};\n\n/**\n * Alias for {@link vec2.subtract}\n * @function\n */\nvec2.sub = vec2.subtract;\n\n/**\n * Multiplies two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {vec2} out\n */\nvec2.multiply = function(out, a, b) {\n out[0] = a[0] * b[0];\n out[1] = a[1] * b[1];\n return out;\n};\n\n/**\n * Alias for {@link vec2.multiply}\n * @function\n */\nvec2.mul = vec2.multiply;\n\n/**\n * Divides two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {vec2} out\n */\nvec2.divide = function(out, a, b) {\n out[0] = a[0] / b[0];\n out[1] = a[1] / b[1];\n return out;\n};\n\n/**\n * Alias for {@link vec2.divide}\n * @function\n */\nvec2.div = vec2.divide;\n\n/**\n * Returns the minimum of two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {vec2} out\n */\nvec2.min = function(out, a, b) {\n out[0] = Math.min(a[0], b[0]);\n out[1] = Math.min(a[1], b[1]);\n return out;\n};\n\n/**\n * Returns the maximum of two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {vec2} out\n */\nvec2.max = function(out, a, b) {\n out[0] = Math.max(a[0], b[0]);\n out[1] = Math.max(a[1], b[1]);\n return out;\n};\n\n/**\n * Scales a vec2 by a scalar number\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the vector to scale\n * @param {Number} b amount to scale the vector by\n * @returns {vec2} out\n */\nvec2.scale = function(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n return out;\n};\n\n/**\n * Adds two vec2's after scaling the second operand by a scalar value\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @param {Number} scale the amount to scale b by before adding\n * @returns {vec2} out\n */\nvec2.scaleAndAdd = function(out, a, b, scale) {\n out[0] = a[0] + (b[0] * scale);\n out[1] = a[1] + (b[1] * scale);\n return out;\n};\n\n/**\n * Calculates the euclidian distance between two vec2's\n *\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {Number} distance between a and b\n */\nvec2.distance = function(a, b) {\n var x = b[0] - a[0],\n y = b[1] - a[1];\n return Math.sqrt(x*x + y*y);\n};\n\n/**\n * Alias for {@link vec2.distance}\n * @function\n */\nvec2.dist = vec2.distance;\n\n/**\n * Calculates the squared euclidian distance between two vec2's\n *\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {Number} squared distance between a and b\n */\nvec2.squaredDistance = function(a, b) {\n var x = b[0] - a[0],\n y = b[1] - a[1];\n return x*x + y*y;\n};\n\n/**\n * Alias for {@link vec2.squaredDistance}\n * @function\n */\nvec2.sqrDist = vec2.squaredDistance;\n\n/**\n * Calculates the length of a vec2\n *\n * @param {vec2} a vector to calculate length of\n * @returns {Number} length of a\n */\nvec2.length = function (a) {\n var x = a[0],\n y = a[1];\n return Math.sqrt(x*x + y*y);\n};\n\n/**\n * Alias for {@link vec2.length}\n * @function\n */\nvec2.len = vec2.length;\n\n/**\n * Calculates the squared length of a vec2\n *\n * @param {vec2} a vector to calculate squared length of\n * @returns {Number} squared length of a\n */\nvec2.squaredLength = function (a) {\n var x = a[0],\n y = a[1];\n return x*x + y*y;\n};\n\n/**\n * Alias for {@link vec2.squaredLength}\n * @function\n */\nvec2.sqrLen = vec2.squaredLength;\n\n/**\n * Negates the components of a vec2\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a vector to negate\n * @returns {vec2} out\n */\nvec2.negate = function(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n return out;\n};\n\n/**\n * Returns the inverse of the components of a vec2\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a vector to invert\n * @returns {vec2} out\n */\nvec2.inverse = function(out, a) {\n out[0] = 1.0 / a[0];\n out[1] = 1.0 / a[1];\n return out;\n};\n\n/**\n * Normalize a vec2\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a vector to normalize\n * @returns {vec2} out\n */\nvec2.normalize = function(out, a) {\n var x = a[0],\n y = a[1];\n var len = x*x + y*y;\n if (len > 0) {\n //TODO: evaluate use of glm_invsqrt here?\n len = 1 / Math.sqrt(len);\n out[0] = a[0] * len;\n out[1] = a[1] * len;\n }\n return out;\n};\n\n/**\n * Calculates the dot product of two vec2's\n *\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {Number} dot product of a and b\n */\nvec2.dot = function (a, b) {\n return a[0] * b[0] + a[1] * b[1];\n};\n\n/**\n * Computes the cross product of two vec2's\n * Note that the cross product must by definition produce a 3D vector\n *\n * @param {vec3} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {vec3} out\n */\nvec2.cross = function(out, a, b) {\n var z = a[0] * b[1] - a[1] * b[0];\n out[0] = out[1] = 0;\n out[2] = z;\n return out;\n};\n\n/**\n * Performs a linear interpolation between two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @param {Number} t interpolation amount between the two inputs\n * @returns {vec2} out\n */\nvec2.lerp = function (out, a, b, t) {\n var ax = a[0],\n ay = a[1];\n out[0] = ax + t * (b[0] - ax);\n out[1] = ay + t * (b[1] - ay);\n return out;\n};\n\n/**\n * Generates a random vector with the given scale\n *\n * @param {vec2} out the receiving vector\n * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned\n * @returns {vec2} out\n */\nvec2.random = function (out, scale) {\n scale = scale || 1.0;\n var r = GLMAT_RANDOM() * 2.0 * Math.PI;\n out[0] = Math.cos(r) * scale;\n out[1] = Math.sin(r) * scale;\n return out;\n};\n\n/**\n * Transforms the vec2 with a mat2\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the vector to transform\n * @param {mat2} m matrix to transform with\n * @returns {vec2} out\n */\nvec2.transformMat2 = function(out, a, m) {\n var x = a[0],\n y = a[1];\n out[0] = m[0] * x + m[2] * y;\n out[1] = m[1] * x + m[3] * y;\n return out;\n};\n\n/**\n * Transforms the vec2 with a mat2d\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the vector to transform\n * @param {mat2d} m matrix to transform with\n * @returns {vec2} out\n */\nvec2.transformMat2d = function(out, a, m) {\n var x = a[0],\n y = a[1];\n out[0] = m[0] * x + m[2] * y + m[4];\n out[1] = m[1] * x + m[3] * y + m[5];\n return out;\n};\n\n/**\n * Transforms the vec2 with a mat3\n * 3rd vector component is implicitly '1'\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the vector to transform\n * @param {mat3} m matrix to transform with\n * @returns {vec2} out\n */\nvec2.transformMat3 = function(out, a, m) {\n var x = a[0],\n y = a[1];\n out[0] = m[0] * x + m[3] * y + m[6];\n out[1] = m[1] * x + m[4] * y + m[7];\n return out;\n};\n\n/**\n * Transforms the vec2 with a mat4\n * 3rd vector component is implicitly '0'\n * 4th vector component is implicitly '1'\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the vector to transform\n * @param {mat4} m matrix to transform with\n * @returns {vec2} out\n */\nvec2.transformMat4 = function(out, a, m) {\n var x = a[0], \n y = a[1];\n out[0] = m[0] * x + m[4] * y + m[12];\n out[1] = m[1] * x + m[5] * y + m[13];\n return out;\n};\n\n/**\n * Perform some operation over an array of vec2s.\n *\n * @param {Array} a the array of vectors to iterate over\n * @param {Number} stride Number of elements between the start of each vec2. If 0 assumes tightly packed\n * @param {Number} offset Number of elements to skip at the beginning of the array\n * @param {Number} count Number of vec2s to iterate over. If 0 iterates over entire array\n * @param {Function} fn Function to call for each vector in the array\n * @param {Object} [arg] additional argument to pass to fn\n * @returns {Array} a\n * @function\n */\nvec2.forEach = (function() {\n var vec = vec2.create();\n\n return function(a, stride, offset, count, fn, arg) {\n var i, l;\n if(!stride) {\n stride = 2;\n }\n\n if(!offset) {\n offset = 0;\n }\n \n if(count) {\n l = Math.min((count * stride) + offset, a.length);\n } else {\n l = a.length;\n }\n\n for(i = offset; i < l; i += stride) {\n vec[0] = a[i]; vec[1] = a[i+1];\n fn(vec, vec, arg);\n a[i] = vec[0]; a[i+1] = vec[1];\n }\n \n return a;\n };\n})();\n\n/**\n * Returns a string representation of a vector\n *\n * @param {vec2} vec vector to represent as a string\n * @returns {String} string representation of the vector\n */\nvec2.str = function (a) {\n return 'vec2(' + a[0] + ', ' + a[1] + ')';\n};\n\nif(typeof(exports) !== 'undefined') {\n exports.vec2 = vec2;\n}\n;\n/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation \n and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\n/**\n * @class 3 Dimensional Vector\n * @name vec3\n */\n\nvar vec3 = {};\n\n/**\n * Creates a new, empty vec3\n *\n * @returns {vec3} a new 3D vector\n */\nvec3.create = function() {\n var out = new GLMAT_ARRAY_TYPE(3);\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n return out;\n};\n\n/**\n * Creates a new vec3 initialized with values from an existing vector\n *\n * @param {vec3} a vector to clone\n * @returns {vec3} a new 3D vector\n */\nvec3.clone = function(a) {\n var out = new GLMAT_ARRAY_TYPE(3);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n return out;\n};\n\n/**\n * Creates a new vec3 initialized with the given values\n *\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @returns {vec3} a new 3D vector\n */\nvec3.fromValues = function(x, y, z) {\n var out = new GLMAT_ARRAY_TYPE(3);\n out[0] = x;\n out[1] = y;\n out[2] = z;\n return out;\n};\n\n/**\n * Copy the values from one vec3 to another\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the source vector\n * @returns {vec3} out\n */\nvec3.copy = function(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n return out;\n};\n\n/**\n * Set the components of a vec3 to the given values\n *\n * @param {vec3} out the receiving vector\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @returns {vec3} out\n */\nvec3.set = function(out, x, y, z) {\n out[0] = x;\n out[1] = y;\n out[2] = z;\n return out;\n};\n\n/**\n * Adds two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {vec3} out\n */\nvec3.add = function(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n return out;\n};\n\n/**\n * Subtracts vector b from vector a\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {vec3} out\n */\nvec3.subtract = function(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n return out;\n};\n\n/**\n * Alias for {@link vec3.subtract}\n * @function\n */\nvec3.sub = vec3.subtract;\n\n/**\n * Multiplies two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {vec3} out\n */\nvec3.multiply = function(out, a, b) {\n out[0] = a[0] * b[0];\n out[1] = a[1] * b[1];\n out[2] = a[2] * b[2];\n return out;\n};\n\n/**\n * Alias for {@link vec3.multiply}\n * @function\n */\nvec3.mul = vec3.multiply;\n\n/**\n * Divides two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {vec3} out\n */\nvec3.divide = function(out, a, b) {\n out[0] = a[0] / b[0];\n out[1] = a[1] / b[1];\n out[2] = a[2] / b[2];\n return out;\n};\n\n/**\n * Alias for {@link vec3.divide}\n * @function\n */\nvec3.div = vec3.divide;\n\n/**\n * Returns the minimum of two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {vec3} out\n */\nvec3.min = function(out, a, b) {\n out[0] = Math.min(a[0], b[0]);\n out[1] = Math.min(a[1], b[1]);\n out[2] = Math.min(a[2], b[2]);\n return out;\n};\n\n/**\n * Returns the maximum of two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {vec3} out\n */\nvec3.max = function(out, a, b) {\n out[0] = Math.max(a[0], b[0]);\n out[1] = Math.max(a[1], b[1]);\n out[2] = Math.max(a[2], b[2]);\n return out;\n};\n\n/**\n * Scales a vec3 by a scalar number\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the vector to scale\n * @param {Number} b amount to scale the vector by\n * @returns {vec3} out\n */\nvec3.scale = function(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n return out;\n};\n\n/**\n * Adds two vec3's after scaling the second operand by a scalar value\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @param {Number} scale the amount to scale b by before adding\n * @returns {vec3} out\n */\nvec3.scaleAndAdd = function(out, a, b, scale) {\n out[0] = a[0] + (b[0] * scale);\n out[1] = a[1] + (b[1] * scale);\n out[2] = a[2] + (b[2] * scale);\n return out;\n};\n\n/**\n * Calculates the euclidian distance between two vec3's\n *\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {Number} distance between a and b\n */\nvec3.distance = function(a, b) {\n var x = b[0] - a[0],\n y = b[1] - a[1],\n z = b[2] - a[2];\n return Math.sqrt(x*x + y*y + z*z);\n};\n\n/**\n * Alias for {@link vec3.distance}\n * @function\n */\nvec3.dist = vec3.distance;\n\n/**\n * Calculates the squared euclidian distance between two vec3's\n *\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {Number} squared distance between a and b\n */\nvec3.squaredDistance = function(a, b) {\n var x = b[0] - a[0],\n y = b[1] - a[1],\n z = b[2] - a[2];\n return x*x + y*y + z*z;\n};\n\n/**\n * Alias for {@link vec3.squaredDistance}\n * @function\n */\nvec3.sqrDist = vec3.squaredDistance;\n\n/**\n * Calculates the length of a vec3\n *\n * @param {vec3} a vector to calculate length of\n * @returns {Number} length of a\n */\nvec3.length = function (a) {\n var x = a[0],\n y = a[1],\n z = a[2];\n return Math.sqrt(x*x + y*y + z*z);\n};\n\n/**\n * Alias for {@link vec3.length}\n * @function\n */\nvec3.len = vec3.length;\n\n/**\n * Calculates the squared length of a vec3\n *\n * @param {vec3} a vector to calculate squared length of\n * @returns {Number} squared length of a\n */\nvec3.squaredLength = function (a) {\n var x = a[0],\n y = a[1],\n z = a[2];\n return x*x + y*y + z*z;\n};\n\n/**\n * Alias for {@link vec3.squaredLength}\n * @function\n */\nvec3.sqrLen = vec3.squaredLength;\n\n/**\n * Negates the components of a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a vector to negate\n * @returns {vec3} out\n */\nvec3.negate = function(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n return out;\n};\n\n/**\n * Returns the inverse of the components of a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a vector to invert\n * @returns {vec3} out\n */\nvec3.inverse = function(out, a) {\n out[0] = 1.0 / a[0];\n out[1] = 1.0 / a[1];\n out[2] = 1.0 / a[2];\n return out;\n};\n\n/**\n * Normalize a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a vector to normalize\n * @returns {vec3} out\n */\nvec3.normalize = function(out, a) {\n var x = a[0],\n y = a[1],\n z = a[2];\n var len = x*x + y*y + z*z;\n if (len > 0) {\n //TODO: evaluate use of glm_invsqrt here?\n len = 1 / Math.sqrt(len);\n out[0] = a[0] * len;\n out[1] = a[1] * len;\n out[2] = a[2] * len;\n }\n return out;\n};\n\n/**\n * Calculates the dot product of two vec3's\n *\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {Number} dot product of a and b\n */\nvec3.dot = function (a, b) {\n return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];\n};\n\n/**\n * Computes the cross product of two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {vec3} out\n */\nvec3.cross = function(out, a, b) {\n var ax = a[0], ay = a[1], az = a[2],\n bx = b[0], by = b[1], bz = b[2];\n\n out[0] = ay * bz - az * by;\n out[1] = az * bx - ax * bz;\n out[2] = ax * by - ay * bx;\n return out;\n};\n\n/**\n * Performs a linear interpolation between two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @param {Number} t interpolation amount between the two inputs\n * @returns {vec3} out\n */\nvec3.lerp = function (out, a, b, t) {\n var ax = a[0],\n ay = a[1],\n az = a[2];\n out[0] = ax + t * (b[0] - ax);\n out[1] = ay + t * (b[1] - ay);\n out[2] = az + t * (b[2] - az);\n return out;\n};\n\n/**\n * Generates a random vector with the given scale\n *\n * @param {vec3} out the receiving vector\n * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned\n * @returns {vec3} out\n */\nvec3.random = function (out, scale) {\n scale = scale || 1.0;\n\n var r = GLMAT_RANDOM() * 2.0 * Math.PI;\n var z = (GLMAT_RANDOM() * 2.0) - 1.0;\n var zScale = Math.sqrt(1.0-z*z) * scale;\n\n out[0] = Math.cos(r) * zScale;\n out[1] = Math.sin(r) * zScale;\n out[2] = z * scale;\n return out;\n};\n\n/**\n * Transforms the vec3 with a mat4.\n * 4th vector component is implicitly '1'\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the vector to transform\n * @param {mat4} m matrix to transform with\n * @returns {vec3} out\n */\nvec3.transformMat4 = function(out, a, m) {\n var x = a[0], y = a[1], z = a[2],\n w = m[3] * x + m[7] * y + m[11] * z + m[15];\n w = w || 1.0;\n out[0] = (m[0] * x + m[4] * y + m[8] * z + m[12]) / w;\n out[1] = (m[1] * x + m[5] * y + m[9] * z + m[13]) / w;\n out[2] = (m[2] * x + m[6] * y + m[10] * z + m[14]) / w;\n return out;\n};\n\n/**\n * Transforms the vec3 with a mat3.\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the vector to transform\n * @param {mat4} m the 3x3 matrix to transform with\n * @returns {vec3} out\n */\nvec3.transformMat3 = function(out, a, m) {\n var x = a[0], y = a[1], z = a[2];\n out[0] = x * m[0] + y * m[3] + z * m[6];\n out[1] = x * m[1] + y * m[4] + z * m[7];\n out[2] = x * m[2] + y * m[5] + z * m[8];\n return out;\n};\n\n/**\n * Transforms the vec3 with a quat\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the vector to transform\n * @param {quat} q quaternion to transform with\n * @returns {vec3} out\n */\nvec3.transformQuat = function(out, a, q) {\n // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations\n\n var x = a[0], y = a[1], z = a[2],\n qx = q[0], qy = q[1], qz = q[2], qw = q[3],\n\n // calculate quat * vec\n ix = qw * x + qy * z - qz * y,\n iy = qw * y + qz * x - qx * z,\n iz = qw * z + qx * y - qy * x,\n iw = -qx * x - qy * y - qz * z;\n\n // calculate result * inverse quat\n out[0] = ix * qw + iw * -qx + iy * -qz - iz * -qy;\n out[1] = iy * qw + iw * -qy + iz * -qx - ix * -qz;\n out[2] = iz * qw + iw * -qz + ix * -qy - iy * -qx;\n return out;\n};\n\n/**\n * Rotate a 3D vector around the x-axis\n * @param {vec3} out The receiving vec3\n * @param {vec3} a The vec3 point to rotate\n * @param {vec3} b The origin of the rotation\n * @param {Number} c The angle of rotation\n * @returns {vec3} out\n */\nvec3.rotateX = function(out, a, b, c){\n var p = [], r=[];\n\t //Translate point to the origin\n\t p[0] = a[0] - b[0];\n\t p[1] = a[1] - b[1];\n \tp[2] = a[2] - b[2];\n\n\t //perform rotation\n\t r[0] = p[0];\n\t r[1] = p[1]*Math.cos(c) - p[2]*Math.sin(c);\n\t r[2] = p[1]*Math.sin(c) + p[2]*Math.cos(c);\n\n\t //translate to correct position\n\t out[0] = r[0] + b[0];\n\t out[1] = r[1] + b[1];\n\t out[2] = r[2] + b[2];\n\n \treturn out;\n};\n\n/**\n * Rotate a 3D vector around the y-axis\n * @param {vec3} out The receiving vec3\n * @param {vec3} a The vec3 point to rotate\n * @param {vec3} b The origin of the rotation\n * @param {Number} c The angle of rotation\n * @returns {vec3} out\n */\nvec3.rotateY = function(out, a, b, c){\n \tvar p = [], r=[];\n \t//Translate point to the origin\n \tp[0] = a[0] - b[0];\n \tp[1] = a[1] - b[1];\n \tp[2] = a[2] - b[2];\n \n \t//perform rotation\n \tr[0] = p[2]*Math.sin(c) + p[0]*Math.cos(c);\n \tr[1] = p[1];\n \tr[2] = p[2]*Math.cos(c) - p[0]*Math.sin(c);\n \n \t//translate to correct position\n \tout[0] = r[0] + b[0];\n \tout[1] = r[1] + b[1];\n \tout[2] = r[2] + b[2];\n \n \treturn out;\n};\n\n/**\n * Rotate a 3D vector around the z-axis\n * @param {vec3} out The receiving vec3\n * @param {vec3} a The vec3 point to rotate\n * @param {vec3} b The origin of the rotation\n * @param {Number} c The angle of rotation\n * @returns {vec3} out\n */\nvec3.rotateZ = function(out, a, b, c){\n \tvar p = [], r=[];\n \t//Translate point to the origin\n \tp[0] = a[0] - b[0];\n \tp[1] = a[1] - b[1];\n \tp[2] = a[2] - b[2];\n \n \t//perform rotation\n \tr[0] = p[0]*Math.cos(c) - p[1]*Math.sin(c);\n \tr[1] = p[0]*Math.sin(c) + p[1]*Math.cos(c);\n \tr[2] = p[2];\n \n \t//translate to correct position\n \tout[0] = r[0] + b[0];\n \tout[1] = r[1] + b[1];\n \tout[2] = r[2] + b[2];\n \n \treturn out;\n};\n\n/**\n * Perform some operation over an array of vec3s.\n *\n * @param {Array} a the array of vectors to iterate over\n * @param {Number} stride Number of elements between the start of each vec3. If 0 assumes tightly packed\n * @param {Number} offset Number of elements to skip at the beginning of the array\n * @param {Number} count Number of vec3s to iterate over. If 0 iterates over entire array\n * @param {Function} fn Function to call for each vector in the array\n * @param {Object} [arg] additional argument to pass to fn\n * @returns {Array} a\n * @function\n */\nvec3.forEach = (function() {\n var vec = vec3.create();\n\n return function(a, stride, offset, count, fn, arg) {\n var i, l;\n if(!stride) {\n stride = 3;\n }\n\n if(!offset) {\n offset = 0;\n }\n \n if(count) {\n l = Math.min((count * stride) + offset, a.length);\n } else {\n l = a.length;\n }\n\n for(i = offset; i < l; i += stride) {\n vec[0] = a[i]; vec[1] = a[i+1]; vec[2] = a[i+2];\n fn(vec, vec, arg);\n a[i] = vec[0]; a[i+1] = vec[1]; a[i+2] = vec[2];\n }\n \n return a;\n };\n})();\n\n/**\n * Get the angle between two 3D vectors\n * @param {vec3} a The first operand\n * @param {vec3} b The second operand\n * @returns {Number} The angle in radians\n */\nvec3.angle = function(a, b) {\n \n var tempA = vec3.fromValues(a[0], a[1], a[2]);\n var tempB = vec3.fromValues(b[0], b[1], b[2]);\n \n vec3.normalize(tempA, tempA);\n vec3.normalize(tempB, tempB);\n \n var cosine = vec3.dot(tempA, tempB);\n\n if(cosine > 1.0){\n return 0;\n } else {\n return Math.acos(cosine);\n } \n};\n\n/**\n * Returns a string representation of a vector\n *\n * @param {vec3} vec vector to represent as a string\n * @returns {String} string representation of the vector\n */\nvec3.str = function (a) {\n return 'vec3(' + a[0] + ', ' + a[1] + ', ' + a[2] + ')';\n};\n\nif(typeof(exports) !== 'undefined') {\n exports.vec3 = vec3;\n}\n;\n/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation \n and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\n/**\n * @class 4 Dimensional Vector\n * @name vec4\n */\n\nvar vec4 = {};\n\n/**\n * Creates a new, empty vec4\n *\n * @returns {vec4} a new 4D vector\n */\nvec4.create = function() {\n var out = new GLMAT_ARRAY_TYPE(4);\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n return out;\n};\n\n/**\n * Creates a new vec4 initialized with values from an existing vector\n *\n * @param {vec4} a vector to clone\n * @returns {vec4} a new 4D vector\n */\nvec4.clone = function(a) {\n var out = new GLMAT_ARRAY_TYPE(4);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n};\n\n/**\n * Creates a new vec4 initialized with the given values\n *\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @param {Number} w W component\n * @returns {vec4} a new 4D vector\n */\nvec4.fromValues = function(x, y, z, w) {\n var out = new GLMAT_ARRAY_TYPE(4);\n out[0] = x;\n out[1] = y;\n out[2] = z;\n out[3] = w;\n return out;\n};\n\n/**\n * Copy the values from one vec4 to another\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the source vector\n * @returns {vec4} out\n */\nvec4.copy = function(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n};\n\n/**\n * Set the components of a vec4 to the given values\n *\n * @param {vec4} out the receiving vector\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @param {Number} w W component\n * @returns {vec4} out\n */\nvec4.set = function(out, x, y, z, w) {\n out[0] = x;\n out[1] = y;\n out[2] = z;\n out[3] = w;\n return out;\n};\n\n/**\n * Adds two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {vec4} out\n */\nvec4.add = function(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n return out;\n};\n\n/**\n * Subtracts vector b from vector a\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {vec4} out\n */\nvec4.subtract = function(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n return out;\n};\n\n/**\n * Alias for {@link vec4.subtract}\n * @function\n */\nvec4.sub = vec4.subtract;\n\n/**\n * Multiplies two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {vec4} out\n */\nvec4.multiply = function(out, a, b) {\n out[0] = a[0] * b[0];\n out[1] = a[1] * b[1];\n out[2] = a[2] * b[2];\n out[3] = a[3] * b[3];\n return out;\n};\n\n/**\n * Alias for {@link vec4.multiply}\n * @function\n */\nvec4.mul = vec4.multiply;\n\n/**\n * Divides two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {vec4} out\n */\nvec4.divide = function(out, a, b) {\n out[0] = a[0] / b[0];\n out[1] = a[1] / b[1];\n out[2] = a[2] / b[2];\n out[3] = a[3] / b[3];\n return out;\n};\n\n/**\n * Alias for {@link vec4.divide}\n * @function\n */\nvec4.div = vec4.divide;\n\n/**\n * Returns the minimum of two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {vec4} out\n */\nvec4.min = function(out, a, b) {\n out[0] = Math.min(a[0], b[0]);\n out[1] = Math.min(a[1], b[1]);\n out[2] = Math.min(a[2], b[2]);\n out[3] = Math.min(a[3], b[3]);\n return out;\n};\n\n/**\n * Returns the maximum of two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {vec4} out\n */\nvec4.max = function(out, a, b) {\n out[0] = Math.max(a[0], b[0]);\n out[1] = Math.max(a[1], b[1]);\n out[2] = Math.max(a[2], b[2]);\n out[3] = Math.max(a[3], b[3]);\n return out;\n};\n\n/**\n * Scales a vec4 by a scalar number\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the vector to scale\n * @param {Number} b amount to scale the vector by\n * @returns {vec4} out\n */\nvec4.scale = function(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n return out;\n};\n\n/**\n * Adds two vec4's after scaling the second operand by a scalar value\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @param {Number} scale the amount to scale b by before adding\n * @returns {vec4} out\n */\nvec4.scaleAndAdd = function(out, a, b, scale) {\n out[0] = a[0] + (b[0] * scale);\n out[1] = a[1] + (b[1] * scale);\n out[2] = a[2] + (b[2] * scale);\n out[3] = a[3] + (b[3] * scale);\n return out;\n};\n\n/**\n * Calculates the euclidian distance between two vec4's\n *\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {Number} distance between a and b\n */\nvec4.distance = function(a, b) {\n var x = b[0] - a[0],\n y = b[1] - a[1],\n z = b[2] - a[2],\n w = b[3] - a[3];\n return Math.sqrt(x*x + y*y + z*z + w*w);\n};\n\n/**\n * Alias for {@link vec4.distance}\n * @function\n */\nvec4.dist = vec4.distance;\n\n/**\n * Calculates the squared euclidian distance between two vec4's\n *\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {Number} squared distance between a and b\n */\nvec4.squaredDistance = function(a, b) {\n var x = b[0] - a[0],\n y = b[1] - a[1],\n z = b[2] - a[2],\n w = b[3] - a[3];\n return x*x + y*y + z*z + w*w;\n};\n\n/**\n * Alias for {@link vec4.squaredDistance}\n * @function\n */\nvec4.sqrDist = vec4.squaredDistance;\n\n/**\n * Calculates the length of a vec4\n *\n * @param {vec4} a vector to calculate length of\n * @returns {Number} length of a\n */\nvec4.length = function (a) {\n var x = a[0],\n y = a[1],\n z = a[2],\n w = a[3];\n return Math.sqrt(x*x + y*y + z*z + w*w);\n};\n\n/**\n * Alias for {@link vec4.length}\n * @function\n */\nvec4.len = vec4.length;\n\n/**\n * Calculates the squared length of a vec4\n *\n * @param {vec4} a vector to calculate squared length of\n * @returns {Number} squared length of a\n */\nvec4.squaredLength = function (a) {\n var x = a[0],\n y = a[1],\n z = a[2],\n w = a[3];\n return x*x + y*y + z*z + w*w;\n};\n\n/**\n * Alias for {@link vec4.squaredLength}\n * @function\n */\nvec4.sqrLen = vec4.squaredLength;\n\n/**\n * Negates the components of a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a vector to negate\n * @returns {vec4} out\n */\nvec4.negate = function(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n out[3] = -a[3];\n return out;\n};\n\n/**\n * Returns the inverse of the components of a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a vector to invert\n * @returns {vec4} out\n */\nvec4.inverse = function(out, a) {\n out[0] = 1.0 / a[0];\n out[1] = 1.0 / a[1];\n out[2] = 1.0 / a[2];\n out[3] = 1.0 / a[3];\n return out;\n};\n\n/**\n * Normalize a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a vector to normalize\n * @returns {vec4} out\n */\nvec4.normalize = function(out, a) {\n var x = a[0],\n y = a[1],\n z = a[2],\n w = a[3];\n var len = x*x + y*y + z*z + w*w;\n if (len > 0) {\n len = 1 / Math.sqrt(len);\n out[0] = a[0] * len;\n out[1] = a[1] * len;\n out[2] = a[2] * len;\n out[3] = a[3] * len;\n }\n return out;\n};\n\n/**\n * Calculates the dot product of two vec4's\n *\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {Number} dot product of a and b\n */\nvec4.dot = function (a, b) {\n return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3];\n};\n\n/**\n * Performs a linear interpolation between two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @param {Number} t interpolation amount between the two inputs\n * @returns {vec4} out\n */\nvec4.lerp = function (out, a, b, t) {\n var ax = a[0],\n ay = a[1],\n az = a[2],\n aw = a[3];\n out[0] = ax + t * (b[0] - ax);\n out[1] = ay + t * (b[1] - ay);\n out[2] = az + t * (b[2] - az);\n out[3] = aw + t * (b[3] - aw);\n return out;\n};\n\n/**\n * Generates a random vector with the given scale\n *\n * @param {vec4} out the receiving vector\n * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned\n * @returns {vec4} out\n */\nvec4.random = function (out, scale) {\n scale = scale || 1.0;\n\n //TODO: This is a pretty awful way of doing this. Find something better.\n out[0] = GLMAT_RANDOM();\n out[1] = GLMAT_RANDOM();\n out[2] = GLMAT_RANDOM();\n out[3] = GLMAT_RANDOM();\n vec4.normalize(out, out);\n vec4.scale(out, out, scale);\n return out;\n};\n\n/**\n * Transforms the vec4 with a mat4.\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the vector to transform\n * @param {mat4} m matrix to transform with\n * @returns {vec4} out\n */\nvec4.transformMat4 = function(out, a, m) {\n var x = a[0], y = a[1], z = a[2], w = a[3];\n out[0] = m[0] * x + m[4] * y + m[8] * z + m[12] * w;\n out[1] = m[1] * x + m[5] * y + m[9] * z + m[13] * w;\n out[2] = m[2] * x + m[6] * y + m[10] * z + m[14] * w;\n out[3] = m[3] * x + m[7] * y + m[11] * z + m[15] * w;\n return out;\n};\n\n/**\n * Transforms the vec4 with a quat\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the vector to transform\n * @param {quat} q quaternion to transform with\n * @returns {vec4} out\n */\nvec4.transformQuat = function(out, a, q) {\n var x = a[0], y = a[1], z = a[2],\n qx = q[0], qy = q[1], qz = q[2], qw = q[3],\n\n // calculate quat * vec\n ix = qw * x + qy * z - qz * y,\n iy = qw * y + qz * x - qx * z,\n iz = qw * z + qx * y - qy * x,\n iw = -qx * x - qy * y - qz * z;\n\n // calculate result * inverse quat\n out[0] = ix * qw + iw * -qx + iy * -qz - iz * -qy;\n out[1] = iy * qw + iw * -qy + iz * -qx - ix * -qz;\n out[2] = iz * qw + iw * -qz + ix * -qy - iy * -qx;\n return out;\n};\n\n/**\n * Perform some operation over an array of vec4s.\n *\n * @param {Array} a the array of vectors to iterate over\n * @param {Number} stride Number of elements between the start of each vec4. If 0 assumes tightly packed\n * @param {Number} offset Number of elements to skip at the beginning of the array\n * @param {Number} count Number of vec4s to iterate over. If 0 iterates over entire array\n * @param {Function} fn Function to call for each vector in the array\n * @param {Object} [arg] additional argument to pass to fn\n * @returns {Array} a\n * @function\n */\nvec4.forEach = (function() {\n var vec = vec4.create();\n\n return function(a, stride, offset, count, fn, arg) {\n var i, l;\n if(!stride) {\n stride = 4;\n }\n\n if(!offset) {\n offset = 0;\n }\n \n if(count) {\n l = Math.min((count * stride) + offset, a.length);\n } else {\n l = a.length;\n }\n\n for(i = offset; i < l; i += stride) {\n vec[0] = a[i]; vec[1] = a[i+1]; vec[2] = a[i+2]; vec[3] = a[i+3];\n fn(vec, vec, arg);\n a[i] = vec[0]; a[i+1] = vec[1]; a[i+2] = vec[2]; a[i+3] = vec[3];\n }\n \n return a;\n };\n})();\n\n/**\n * Returns a string representation of a vector\n *\n * @param {vec4} vec vector to represent as a string\n * @returns {String} string representation of the vector\n */\nvec4.str = function (a) {\n return 'vec4(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ')';\n};\n\nif(typeof(exports) !== 'undefined') {\n exports.vec4 = vec4;\n}\n;\n/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation \n and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\n/**\n * @class 2x2 Matrix\n * @name mat2\n */\n\nvar mat2 = {};\n\n/**\n * Creates a new identity mat2\n *\n * @returns {mat2} a new 2x2 matrix\n */\nmat2.create = function() {\n var out = new GLMAT_ARRAY_TYPE(4);\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n return out;\n};\n\n/**\n * Creates a new mat2 initialized with values from an existing matrix\n *\n * @param {mat2} a matrix to clone\n * @returns {mat2} a new 2x2 matrix\n */\nmat2.clone = function(a) {\n var out = new GLMAT_ARRAY_TYPE(4);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n};\n\n/**\n * Copy the values from one mat2 to another\n *\n * @param {mat2} out the receiving matrix\n * @param {mat2} a the source matrix\n * @returns {mat2} out\n */\nmat2.copy = function(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n};\n\n/**\n * Set a mat2 to the identity matrix\n *\n * @param {mat2} out the receiving matrix\n * @returns {mat2} out\n */\nmat2.identity = function(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n return out;\n};\n\n/**\n * Transpose the values of a mat2\n *\n * @param {mat2} out the receiving matrix\n * @param {mat2} a the source matrix\n * @returns {mat2} out\n */\nmat2.transpose = function(out, a) {\n // If we are transposing ourselves we can skip a few steps but have to cache some values\n if (out === a) {\n var a1 = a[1];\n out[1] = a[2];\n out[2] = a1;\n } else {\n out[0] = a[0];\n out[1] = a[2];\n out[2] = a[1];\n out[3] = a[3];\n }\n \n return out;\n};\n\n/**\n * Inverts a mat2\n *\n * @param {mat2} out the receiving matrix\n * @param {mat2} a the source matrix\n * @returns {mat2} out\n */\nmat2.invert = function(out, a) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3],\n\n // Calculate the determinant\n det = a0 * a3 - a2 * a1;\n\n if (!det) {\n return null;\n }\n det = 1.0 / det;\n \n out[0] = a3 * det;\n out[1] = -a1 * det;\n out[2] = -a2 * det;\n out[3] = a0 * det;\n\n return out;\n};\n\n/**\n * Calculates the adjugate of a mat2\n *\n * @param {mat2} out the receiving matrix\n * @param {mat2} a the source matrix\n * @returns {mat2} out\n */\nmat2.adjoint = function(out, a) {\n // Caching this value is nessecary if out == a\n var a0 = a[0];\n out[0] = a[3];\n out[1] = -a[1];\n out[2] = -a[2];\n out[3] = a0;\n\n return out;\n};\n\n/**\n * Calculates the determinant of a mat2\n *\n * @param {mat2} a the source matrix\n * @returns {Number} determinant of a\n */\nmat2.determinant = function (a) {\n return a[0] * a[3] - a[2] * a[1];\n};\n\n/**\n * Multiplies two mat2's\n *\n * @param {mat2} out the receiving matrix\n * @param {mat2} a the first operand\n * @param {mat2} b the second operand\n * @returns {mat2} out\n */\nmat2.multiply = function (out, a, b) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3];\n var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3];\n out[0] = a0 * b0 + a2 * b1;\n out[1] = a1 * b0 + a3 * b1;\n out[2] = a0 * b2 + a2 * b3;\n out[3] = a1 * b2 + a3 * b3;\n return out;\n};\n\n/**\n * Alias for {@link mat2.multiply}\n * @function\n */\nmat2.mul = mat2.multiply;\n\n/**\n * Rotates a mat2 by the given angle\n *\n * @param {mat2} out the receiving matrix\n * @param {mat2} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat2} out\n */\nmat2.rotate = function (out, a, rad) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3],\n s = Math.sin(rad),\n c = Math.cos(rad);\n out[0] = a0 * c + a2 * s;\n out[1] = a1 * c + a3 * s;\n out[2] = a0 * -s + a2 * c;\n out[3] = a1 * -s + a3 * c;\n return out;\n};\n\n/**\n * Scales the mat2 by the dimensions in the given vec2\n *\n * @param {mat2} out the receiving matrix\n * @param {mat2} a the matrix to rotate\n * @param {vec2} v the vec2 to scale the matrix by\n * @returns {mat2} out\n **/\nmat2.scale = function(out, a, v) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3],\n v0 = v[0], v1 = v[1];\n out[0] = a0 * v0;\n out[1] = a1 * v0;\n out[2] = a2 * v1;\n out[3] = a3 * v1;\n return out;\n};\n\n/**\n * Returns a string representation of a mat2\n *\n * @param {mat2} mat matrix to represent as a string\n * @returns {String} string representation of the matrix\n */\nmat2.str = function (a) {\n return 'mat2(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ')';\n};\n\n/**\n * Returns Frobenius norm of a mat2\n *\n * @param {mat2} a the matrix to calculate Frobenius norm of\n * @returns {Number} Frobenius norm\n */\nmat2.frob = function (a) {\n return(Math.sqrt(Math.pow(a[0], 2) + Math.pow(a[1], 2) + Math.pow(a[2], 2) + Math.pow(a[3], 2)))\n};\n\n/**\n * Returns L, D and U matrices (Lower triangular, Diagonal and Upper triangular) by factorizing the input matrix\n * @param {mat2} L the lower triangular matrix \n * @param {mat2} D the diagonal matrix \n * @param {mat2} U the upper triangular matrix \n * @param {mat2} a the input matrix to factorize\n */\n\nmat2.LDU = function (L, D, U, a) { \n L[2] = a[2]/a[0]; \n U[0] = a[0]; \n U[1] = a[1]; \n U[3] = a[3] - L[2] * U[1]; \n return [L, D, U]; \n}; \n\nif(typeof(exports) !== 'undefined') {\n exports.mat2 = mat2;\n}\n;\n/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation \n and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\n/**\n * @class 2x3 Matrix\n * @name mat2d\n * \n * @description \n * A mat2d contains six elements defined as:\n *
\n * [a, c, tx,\n *  b, d, ty]\n * 
\n * This is a short form for the 3x3 matrix:\n *
\n * [a, c, tx,\n *  b, d, ty,\n *  0, 0, 1]\n * 
\n * The last row is ignored so the array is shorter and operations are faster.\n */\n\nvar mat2d = {};\n\n/**\n * Creates a new identity mat2d\n *\n * @returns {mat2d} a new 2x3 matrix\n */\nmat2d.create = function() {\n var out = new GLMAT_ARRAY_TYPE(6);\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n out[4] = 0;\n out[5] = 0;\n return out;\n};\n\n/**\n * Creates a new mat2d initialized with values from an existing matrix\n *\n * @param {mat2d} a matrix to clone\n * @returns {mat2d} a new 2x3 matrix\n */\nmat2d.clone = function(a) {\n var out = new GLMAT_ARRAY_TYPE(6);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n return out;\n};\n\n/**\n * Copy the values from one mat2d to another\n *\n * @param {mat2d} out the receiving matrix\n * @param {mat2d} a the source matrix\n * @returns {mat2d} out\n */\nmat2d.copy = function(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n return out;\n};\n\n/**\n * Set a mat2d to the identity matrix\n *\n * @param {mat2d} out the receiving matrix\n * @returns {mat2d} out\n */\nmat2d.identity = function(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n out[4] = 0;\n out[5] = 0;\n return out;\n};\n\n/**\n * Inverts a mat2d\n *\n * @param {mat2d} out the receiving matrix\n * @param {mat2d} a the source matrix\n * @returns {mat2d} out\n */\nmat2d.invert = function(out, a) {\n var aa = a[0], ab = a[1], ac = a[2], ad = a[3],\n atx = a[4], aty = a[5];\n\n var det = aa * ad - ab * ac;\n if(!det){\n return null;\n }\n det = 1.0 / det;\n\n out[0] = ad * det;\n out[1] = -ab * det;\n out[2] = -ac * det;\n out[3] = aa * det;\n out[4] = (ac * aty - ad * atx) * det;\n out[5] = (ab * atx - aa * aty) * det;\n return out;\n};\n\n/**\n * Calculates the determinant of a mat2d\n *\n * @param {mat2d} a the source matrix\n * @returns {Number} determinant of a\n */\nmat2d.determinant = function (a) {\n return a[0] * a[3] - a[1] * a[2];\n};\n\n/**\n * Multiplies two mat2d's\n *\n * @param {mat2d} out the receiving matrix\n * @param {mat2d} a the first operand\n * @param {mat2d} b the second operand\n * @returns {mat2d} out\n */\nmat2d.multiply = function (out, a, b) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5],\n b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3], b4 = b[4], b5 = b[5];\n out[0] = a0 * b0 + a2 * b1;\n out[1] = a1 * b0 + a3 * b1;\n out[2] = a0 * b2 + a2 * b3;\n out[3] = a1 * b2 + a3 * b3;\n out[4] = a0 * b4 + a2 * b5 + a4;\n out[5] = a1 * b4 + a3 * b5 + a5;\n return out;\n};\n\n/**\n * Alias for {@link mat2d.multiply}\n * @function\n */\nmat2d.mul = mat2d.multiply;\n\n\n/**\n * Rotates a mat2d by the given angle\n *\n * @param {mat2d} out the receiving matrix\n * @param {mat2d} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat2d} out\n */\nmat2d.rotate = function (out, a, rad) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5],\n s = Math.sin(rad),\n c = Math.cos(rad);\n out[0] = a0 * c + a2 * s;\n out[1] = a1 * c + a3 * s;\n out[2] = a0 * -s + a2 * c;\n out[3] = a1 * -s + a3 * c;\n out[4] = a4;\n out[5] = a5;\n return out;\n};\n\n/**\n * Scales the mat2d by the dimensions in the given vec2\n *\n * @param {mat2d} out the receiving matrix\n * @param {mat2d} a the matrix to translate\n * @param {vec2} v the vec2 to scale the matrix by\n * @returns {mat2d} out\n **/\nmat2d.scale = function(out, a, v) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5],\n v0 = v[0], v1 = v[1];\n out[0] = a0 * v0;\n out[1] = a1 * v0;\n out[2] = a2 * v1;\n out[3] = a3 * v1;\n out[4] = a4;\n out[5] = a5;\n return out;\n};\n\n/**\n * Translates the mat2d by the dimensions in the given vec2\n *\n * @param {mat2d} out the receiving matrix\n * @param {mat2d} a the matrix to translate\n * @param {vec2} v the vec2 to translate the matrix by\n * @returns {mat2d} out\n **/\nmat2d.translate = function(out, a, v) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5],\n v0 = v[0], v1 = v[1];\n out[0] = a0;\n out[1] = a1;\n out[2] = a2;\n out[3] = a3;\n out[4] = a0 * v0 + a2 * v1 + a4;\n out[5] = a1 * v0 + a3 * v1 + a5;\n return out;\n};\n\n/**\n * Returns a string representation of a mat2d\n *\n * @param {mat2d} a matrix to represent as a string\n * @returns {String} string representation of the matrix\n */\nmat2d.str = function (a) {\n return 'mat2d(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + \n a[3] + ', ' + a[4] + ', ' + a[5] + ')';\n};\n\n/**\n * Returns Frobenius norm of a mat2d\n *\n * @param {mat2d} a the matrix to calculate Frobenius norm of\n * @returns {Number} Frobenius norm\n */\nmat2d.frob = function (a) { \n return(Math.sqrt(Math.pow(a[0], 2) + Math.pow(a[1], 2) + Math.pow(a[2], 2) + Math.pow(a[3], 2) + Math.pow(a[4], 2) + Math.pow(a[5], 2) + 1))\n}; \n\nif(typeof(exports) !== 'undefined') {\n exports.mat2d = mat2d;\n}\n;\n/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation \n and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\n/**\n * @class 3x3 Matrix\n * @name mat3\n */\n\nvar mat3 = {};\n\n/**\n * Creates a new identity mat3\n *\n * @returns {mat3} a new 3x3 matrix\n */\nmat3.create = function() {\n var out = new GLMAT_ARRAY_TYPE(9);\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 1;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 1;\n return out;\n};\n\n/**\n * Copies the upper-left 3x3 values into the given mat3.\n *\n * @param {mat3} out the receiving 3x3 matrix\n * @param {mat4} a the source 4x4 matrix\n * @returns {mat3} out\n */\nmat3.fromMat4 = function(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[4];\n out[4] = a[5];\n out[5] = a[6];\n out[6] = a[8];\n out[7] = a[9];\n out[8] = a[10];\n return out;\n};\n\n/**\n * Creates a new mat3 initialized with values from an existing matrix\n *\n * @param {mat3} a matrix to clone\n * @returns {mat3} a new 3x3 matrix\n */\nmat3.clone = function(a) {\n var out = new GLMAT_ARRAY_TYPE(9);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n return out;\n};\n\n/**\n * Copy the values from one mat3 to another\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the source matrix\n * @returns {mat3} out\n */\nmat3.copy = function(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n return out;\n};\n\n/**\n * Set a mat3 to the identity matrix\n *\n * @param {mat3} out the receiving matrix\n * @returns {mat3} out\n */\nmat3.identity = function(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 1;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 1;\n return out;\n};\n\n/**\n * Transpose the values of a mat3\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the source matrix\n * @returns {mat3} out\n */\nmat3.transpose = function(out, a) {\n // If we are transposing ourselves we can skip a few steps but have to cache some values\n if (out === a) {\n var a01 = a[1], a02 = a[2], a12 = a[5];\n out[1] = a[3];\n out[2] = a[6];\n out[3] = a01;\n out[5] = a[7];\n out[6] = a02;\n out[7] = a12;\n } else {\n out[0] = a[0];\n out[1] = a[3];\n out[2] = a[6];\n out[3] = a[1];\n out[4] = a[4];\n out[5] = a[7];\n out[6] = a[2];\n out[7] = a[5];\n out[8] = a[8];\n }\n \n return out;\n};\n\n/**\n * Inverts a mat3\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the source matrix\n * @returns {mat3} out\n */\nmat3.invert = function(out, a) {\n var a00 = a[0], a01 = a[1], a02 = a[2],\n a10 = a[3], a11 = a[4], a12 = a[5],\n a20 = a[6], a21 = a[7], a22 = a[8],\n\n b01 = a22 * a11 - a12 * a21,\n b11 = -a22 * a10 + a12 * a20,\n b21 = a21 * a10 - a11 * a20,\n\n // Calculate the determinant\n det = a00 * b01 + a01 * b11 + a02 * b21;\n\n if (!det) { \n return null; \n }\n det = 1.0 / det;\n\n out[0] = b01 * det;\n out[1] = (-a22 * a01 + a02 * a21) * det;\n out[2] = (a12 * a01 - a02 * a11) * det;\n out[3] = b11 * det;\n out[4] = (a22 * a00 - a02 * a20) * det;\n out[5] = (-a12 * a00 + a02 * a10) * det;\n out[6] = b21 * det;\n out[7] = (-a21 * a00 + a01 * a20) * det;\n out[8] = (a11 * a00 - a01 * a10) * det;\n return out;\n};\n\n/**\n * Calculates the adjugate of a mat3\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the source matrix\n * @returns {mat3} out\n */\nmat3.adjoint = function(out, a) {\n var a00 = a[0], a01 = a[1], a02 = a[2],\n a10 = a[3], a11 = a[4], a12 = a[5],\n a20 = a[6], a21 = a[7], a22 = a[8];\n\n out[0] = (a11 * a22 - a12 * a21);\n out[1] = (a02 * a21 - a01 * a22);\n out[2] = (a01 * a12 - a02 * a11);\n out[3] = (a12 * a20 - a10 * a22);\n out[4] = (a00 * a22 - a02 * a20);\n out[5] = (a02 * a10 - a00 * a12);\n out[6] = (a10 * a21 - a11 * a20);\n out[7] = (a01 * a20 - a00 * a21);\n out[8] = (a00 * a11 - a01 * a10);\n return out;\n};\n\n/**\n * Calculates the determinant of a mat3\n *\n * @param {mat3} a the source matrix\n * @returns {Number} determinant of a\n */\nmat3.determinant = function (a) {\n var a00 = a[0], a01 = a[1], a02 = a[2],\n a10 = a[3], a11 = a[4], a12 = a[5],\n a20 = a[6], a21 = a[7], a22 = a[8];\n\n return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20);\n};\n\n/**\n * Multiplies two mat3's\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the first operand\n * @param {mat3} b the second operand\n * @returns {mat3} out\n */\nmat3.multiply = function (out, a, b) {\n var a00 = a[0], a01 = a[1], a02 = a[2],\n a10 = a[3], a11 = a[4], a12 = a[5],\n a20 = a[6], a21 = a[7], a22 = a[8],\n\n b00 = b[0], b01 = b[1], b02 = b[2],\n b10 = b[3], b11 = b[4], b12 = b[5],\n b20 = b[6], b21 = b[7], b22 = b[8];\n\n out[0] = b00 * a00 + b01 * a10 + b02 * a20;\n out[1] = b00 * a01 + b01 * a11 + b02 * a21;\n out[2] = b00 * a02 + b01 * a12 + b02 * a22;\n\n out[3] = b10 * a00 + b11 * a10 + b12 * a20;\n out[4] = b10 * a01 + b11 * a11 + b12 * a21;\n out[5] = b10 * a02 + b11 * a12 + b12 * a22;\n\n out[6] = b20 * a00 + b21 * a10 + b22 * a20;\n out[7] = b20 * a01 + b21 * a11 + b22 * a21;\n out[8] = b20 * a02 + b21 * a12 + b22 * a22;\n return out;\n};\n\n/**\n * Alias for {@link mat3.multiply}\n * @function\n */\nmat3.mul = mat3.multiply;\n\n/**\n * Translate a mat3 by the given vector\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the matrix to translate\n * @param {vec2} v vector to translate by\n * @returns {mat3} out\n */\nmat3.translate = function(out, a, v) {\n var a00 = a[0], a01 = a[1], a02 = a[2],\n a10 = a[3], a11 = a[4], a12 = a[5],\n a20 = a[6], a21 = a[7], a22 = a[8],\n x = v[0], y = v[1];\n\n out[0] = a00;\n out[1] = a01;\n out[2] = a02;\n\n out[3] = a10;\n out[4] = a11;\n out[5] = a12;\n\n out[6] = x * a00 + y * a10 + a20;\n out[7] = x * a01 + y * a11 + a21;\n out[8] = x * a02 + y * a12 + a22;\n return out;\n};\n\n/**\n * Rotates a mat3 by the given angle\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat3} out\n */\nmat3.rotate = function (out, a, rad) {\n var a00 = a[0], a01 = a[1], a02 = a[2],\n a10 = a[3], a11 = a[4], a12 = a[5],\n a20 = a[6], a21 = a[7], a22 = a[8],\n\n s = Math.sin(rad),\n c = Math.cos(rad);\n\n out[0] = c * a00 + s * a10;\n out[1] = c * a01 + s * a11;\n out[2] = c * a02 + s * a12;\n\n out[3] = c * a10 - s * a00;\n out[4] = c * a11 - s * a01;\n out[5] = c * a12 - s * a02;\n\n out[6] = a20;\n out[7] = a21;\n out[8] = a22;\n return out;\n};\n\n/**\n * Scales the mat3 by the dimensions in the given vec2\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the matrix to rotate\n * @param {vec2} v the vec2 to scale the matrix by\n * @returns {mat3} out\n **/\nmat3.scale = function(out, a, v) {\n var x = v[0], y = v[1];\n\n out[0] = x * a[0];\n out[1] = x * a[1];\n out[2] = x * a[2];\n\n out[3] = y * a[3];\n out[4] = y * a[4];\n out[5] = y * a[5];\n\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n return out;\n};\n\n/**\n * Copies the values from a mat2d into a mat3\n *\n * @param {mat3} out the receiving matrix\n * @param {mat2d} a the matrix to copy\n * @returns {mat3} out\n **/\nmat3.fromMat2d = function(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = 0;\n\n out[3] = a[2];\n out[4] = a[3];\n out[5] = 0;\n\n out[6] = a[4];\n out[7] = a[5];\n out[8] = 1;\n return out;\n};\n\n/**\n* Calculates a 3x3 matrix from the given quaternion\n*\n* @param {mat3} out mat3 receiving operation result\n* @param {quat} q Quaternion to create matrix from\n*\n* @returns {mat3} out\n*/\nmat3.fromQuat = function (out, q) {\n var x = q[0], y = q[1], z = q[2], w = q[3],\n x2 = x + x,\n y2 = y + y,\n z2 = z + z,\n\n xx = x * x2,\n yx = y * x2,\n yy = y * y2,\n zx = z * x2,\n zy = z * y2,\n zz = z * z2,\n wx = w * x2,\n wy = w * y2,\n wz = w * z2;\n\n out[0] = 1 - yy - zz;\n out[3] = yx - wz;\n out[6] = zx + wy;\n\n out[1] = yx + wz;\n out[4] = 1 - xx - zz;\n out[7] = zy - wx;\n\n out[2] = zx - wy;\n out[5] = zy + wx;\n out[8] = 1 - xx - yy;\n\n return out;\n};\n\n/**\n* Calculates a 3x3 normal matrix (transpose inverse) from the 4x4 matrix\n*\n* @param {mat3} out mat3 receiving operation result\n* @param {mat4} a Mat4 to derive the normal matrix from\n*\n* @returns {mat3} out\n*/\nmat3.normalFromMat4 = function (out, a) {\n var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3],\n a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],\n a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11],\n a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15],\n\n b00 = a00 * a11 - a01 * a10,\n b01 = a00 * a12 - a02 * a10,\n b02 = a00 * a13 - a03 * a10,\n b03 = a01 * a12 - a02 * a11,\n b04 = a01 * a13 - a03 * a11,\n b05 = a02 * a13 - a03 * a12,\n b06 = a20 * a31 - a21 * a30,\n b07 = a20 * a32 - a22 * a30,\n b08 = a20 * a33 - a23 * a30,\n b09 = a21 * a32 - a22 * a31,\n b10 = a21 * a33 - a23 * a31,\n b11 = a22 * a33 - a23 * a32,\n\n // Calculate the determinant\n det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n if (!det) { \n return null; \n }\n det = 1.0 / det;\n\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n\n out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n\n out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n\n return out;\n};\n\n/**\n * Returns a string representation of a mat3\n *\n * @param {mat3} mat matrix to represent as a string\n * @returns {String} string representation of the matrix\n */\nmat3.str = function (a) {\n return 'mat3(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + \n a[3] + ', ' + a[4] + ', ' + a[5] + ', ' + \n a[6] + ', ' + a[7] + ', ' + a[8] + ')';\n};\n\n/**\n * Returns Frobenius norm of a mat3\n *\n * @param {mat3} a the matrix to calculate Frobenius norm of\n * @returns {Number} Frobenius norm\n */\nmat3.frob = function (a) {\n return(Math.sqrt(Math.pow(a[0], 2) + Math.pow(a[1], 2) + Math.pow(a[2], 2) + Math.pow(a[3], 2) + Math.pow(a[4], 2) + Math.pow(a[5], 2) + Math.pow(a[6], 2) + Math.pow(a[7], 2) + Math.pow(a[8], 2)))\n};\n\n\nif(typeof(exports) !== 'undefined') {\n exports.mat3 = mat3;\n}\n;\n/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation \n and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\n/**\n * @class 4x4 Matrix\n * @name mat4\n */\n\nvar mat4 = {};\n\n/**\n * Creates a new identity mat4\n *\n * @returns {mat4} a new 4x4 matrix\n */\nmat4.create = function() {\n var out = new GLMAT_ARRAY_TYPE(16);\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n};\n\n/**\n * Creates a new mat4 initialized with values from an existing matrix\n *\n * @param {mat4} a matrix to clone\n * @returns {mat4} a new 4x4 matrix\n */\nmat4.clone = function(a) {\n var out = new GLMAT_ARRAY_TYPE(16);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n};\n\n/**\n * Copy the values from one mat4 to another\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the source matrix\n * @returns {mat4} out\n */\nmat4.copy = function(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n};\n\n/**\n * Set a mat4 to the identity matrix\n *\n * @param {mat4} out the receiving matrix\n * @returns {mat4} out\n */\nmat4.identity = function(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n};\n\n/**\n * Transpose the values of a mat4\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the source matrix\n * @returns {mat4} out\n */\nmat4.transpose = function(out, a) {\n // If we are transposing ourselves we can skip a few steps but have to cache some values\n if (out === a) {\n var a01 = a[1], a02 = a[2], a03 = a[3],\n a12 = a[6], a13 = a[7],\n a23 = a[11];\n\n out[1] = a[4];\n out[2] = a[8];\n out[3] = a[12];\n out[4] = a01;\n out[6] = a[9];\n out[7] = a[13];\n out[8] = a02;\n out[9] = a12;\n out[11] = a[14];\n out[12] = a03;\n out[13] = a13;\n out[14] = a23;\n } else {\n out[0] = a[0];\n out[1] = a[4];\n out[2] = a[8];\n out[3] = a[12];\n out[4] = a[1];\n out[5] = a[5];\n out[6] = a[9];\n out[7] = a[13];\n out[8] = a[2];\n out[9] = a[6];\n out[10] = a[10];\n out[11] = a[14];\n out[12] = a[3];\n out[13] = a[7];\n out[14] = a[11];\n out[15] = a[15];\n }\n \n return out;\n};\n\n/**\n * Inverts a mat4\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the source matrix\n * @returns {mat4} out\n */\nmat4.invert = function(out, a) {\n var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3],\n a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],\n a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11],\n a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15],\n\n b00 = a00 * a11 - a01 * a10,\n b01 = a00 * a12 - a02 * a10,\n b02 = a00 * a13 - a03 * a10,\n b03 = a01 * a12 - a02 * a11,\n b04 = a01 * a13 - a03 * a11,\n b05 = a02 * a13 - a03 * a12,\n b06 = a20 * a31 - a21 * a30,\n b07 = a20 * a32 - a22 * a30,\n b08 = a20 * a33 - a23 * a30,\n b09 = a21 * a32 - a22 * a31,\n b10 = a21 * a33 - a23 * a31,\n b11 = a22 * a33 - a23 * a32,\n\n // Calculate the determinant\n det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n if (!det) { \n return null; \n }\n det = 1.0 / det;\n\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n out[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n out[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n out[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det;\n out[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n out[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n out[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n out[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det;\n out[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n out[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n out[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n out[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det;\n out[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det;\n out[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det;\n out[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det;\n out[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det;\n\n return out;\n};\n\n/**\n * Calculates the adjugate of a mat4\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the source matrix\n * @returns {mat4} out\n */\nmat4.adjoint = function(out, a) {\n var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3],\n a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],\n a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11],\n a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15];\n\n out[0] = (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22));\n out[1] = -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22));\n out[2] = (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12));\n out[3] = -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12));\n out[4] = -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22));\n out[5] = (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22));\n out[6] = -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12));\n out[7] = (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12));\n out[8] = (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21));\n out[9] = -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21));\n out[10] = (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11));\n out[11] = -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11));\n out[12] = -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21));\n out[13] = (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21));\n out[14] = -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11));\n out[15] = (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11));\n return out;\n};\n\n/**\n * Calculates the determinant of a mat4\n *\n * @param {mat4} a the source matrix\n * @returns {Number} determinant of a\n */\nmat4.determinant = function (a) {\n var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3],\n a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],\n a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11],\n a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15],\n\n b00 = a00 * a11 - a01 * a10,\n b01 = a00 * a12 - a02 * a10,\n b02 = a00 * a13 - a03 * a10,\n b03 = a01 * a12 - a02 * a11,\n b04 = a01 * a13 - a03 * a11,\n b05 = a02 * a13 - a03 * a12,\n b06 = a20 * a31 - a21 * a30,\n b07 = a20 * a32 - a22 * a30,\n b08 = a20 * a33 - a23 * a30,\n b09 = a21 * a32 - a22 * a31,\n b10 = a21 * a33 - a23 * a31,\n b11 = a22 * a33 - a23 * a32;\n\n // Calculate the determinant\n return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n};\n\n/**\n * Multiplies two mat4's\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the first operand\n * @param {mat4} b the second operand\n * @returns {mat4} out\n */\nmat4.multiply = function (out, a, b) {\n var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3],\n a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],\n a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11],\n a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15];\n\n // Cache only the current line of the second matrix\n var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3]; \n out[0] = b0*a00 + b1*a10 + b2*a20 + b3*a30;\n out[1] = b0*a01 + b1*a11 + b2*a21 + b3*a31;\n out[2] = b0*a02 + b1*a12 + b2*a22 + b3*a32;\n out[3] = b0*a03 + b1*a13 + b2*a23 + b3*a33;\n\n b0 = b[4]; b1 = b[5]; b2 = b[6]; b3 = b[7];\n out[4] = b0*a00 + b1*a10 + b2*a20 + b3*a30;\n out[5] = b0*a01 + b1*a11 + b2*a21 + b3*a31;\n out[6] = b0*a02 + b1*a12 + b2*a22 + b3*a32;\n out[7] = b0*a03 + b1*a13 + b2*a23 + b3*a33;\n\n b0 = b[8]; b1 = b[9]; b2 = b[10]; b3 = b[11];\n out[8] = b0*a00 + b1*a10 + b2*a20 + b3*a30;\n out[9] = b0*a01 + b1*a11 + b2*a21 + b3*a31;\n out[10] = b0*a02 + b1*a12 + b2*a22 + b3*a32;\n out[11] = b0*a03 + b1*a13 + b2*a23 + b3*a33;\n\n b0 = b[12]; b1 = b[13]; b2 = b[14]; b3 = b[15];\n out[12] = b0*a00 + b1*a10 + b2*a20 + b3*a30;\n out[13] = b0*a01 + b1*a11 + b2*a21 + b3*a31;\n out[14] = b0*a02 + b1*a12 + b2*a22 + b3*a32;\n out[15] = b0*a03 + b1*a13 + b2*a23 + b3*a33;\n return out;\n};\n\n/**\n * Alias for {@link mat4.multiply}\n * @function\n */\nmat4.mul = mat4.multiply;\n\n/**\n * Translate a mat4 by the given vector\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the matrix to translate\n * @param {vec3} v vector to translate by\n * @returns {mat4} out\n */\nmat4.translate = function (out, a, v) {\n var x = v[0], y = v[1], z = v[2],\n a00, a01, a02, a03,\n a10, a11, a12, a13,\n a20, a21, a22, a23;\n\n if (a === out) {\n out[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\n out[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\n out[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\n out[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\n } else {\n a00 = a[0]; a01 = a[1]; a02 = a[2]; a03 = a[3];\n a10 = a[4]; a11 = a[5]; a12 = a[6]; a13 = a[7];\n a20 = a[8]; a21 = a[9]; a22 = a[10]; a23 = a[11];\n\n out[0] = a00; out[1] = a01; out[2] = a02; out[3] = a03;\n out[4] = a10; out[5] = a11; out[6] = a12; out[7] = a13;\n out[8] = a20; out[9] = a21; out[10] = a22; out[11] = a23;\n\n out[12] = a00 * x + a10 * y + a20 * z + a[12];\n out[13] = a01 * x + a11 * y + a21 * z + a[13];\n out[14] = a02 * x + a12 * y + a22 * z + a[14];\n out[15] = a03 * x + a13 * y + a23 * z + a[15];\n }\n\n return out;\n};\n\n/**\n * Scales the mat4 by the dimensions in the given vec3\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the matrix to scale\n * @param {vec3} v the vec3 to scale the matrix by\n * @returns {mat4} out\n **/\nmat4.scale = function(out, a, v) {\n var x = v[0], y = v[1], z = v[2];\n\n out[0] = a[0] * x;\n out[1] = a[1] * x;\n out[2] = a[2] * x;\n out[3] = a[3] * x;\n out[4] = a[4] * y;\n out[5] = a[5] * y;\n out[6] = a[6] * y;\n out[7] = a[7] * y;\n out[8] = a[8] * z;\n out[9] = a[9] * z;\n out[10] = a[10] * z;\n out[11] = a[11] * z;\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n};\n\n/**\n * Rotates a mat4 by the given angle\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @param {vec3} axis the axis to rotate around\n * @returns {mat4} out\n */\nmat4.rotate = function (out, a, rad, axis) {\n var x = axis[0], y = axis[1], z = axis[2],\n len = Math.sqrt(x * x + y * y + z * z),\n s, c, t,\n a00, a01, a02, a03,\n a10, a11, a12, a13,\n a20, a21, a22, a23,\n b00, b01, b02,\n b10, b11, b12,\n b20, b21, b22;\n\n if (Math.abs(len) < GLMAT_EPSILON) { return null; }\n \n len = 1 / len;\n x *= len;\n y *= len;\n z *= len;\n\n s = Math.sin(rad);\n c = Math.cos(rad);\n t = 1 - c;\n\n a00 = a[0]; a01 = a[1]; a02 = a[2]; a03 = a[3];\n a10 = a[4]; a11 = a[5]; a12 = a[6]; a13 = a[7];\n a20 = a[8]; a21 = a[9]; a22 = a[10]; a23 = a[11];\n\n // Construct the elements of the rotation matrix\n b00 = x * x * t + c; b01 = y * x * t + z * s; b02 = z * x * t - y * s;\n b10 = x * y * t - z * s; b11 = y * y * t + c; b12 = z * y * t + x * s;\n b20 = x * z * t + y * s; b21 = y * z * t - x * s; b22 = z * z * t + c;\n\n // Perform rotation-specific matrix multiplication\n out[0] = a00 * b00 + a10 * b01 + a20 * b02;\n out[1] = a01 * b00 + a11 * b01 + a21 * b02;\n out[2] = a02 * b00 + a12 * b01 + a22 * b02;\n out[3] = a03 * b00 + a13 * b01 + a23 * b02;\n out[4] = a00 * b10 + a10 * b11 + a20 * b12;\n out[5] = a01 * b10 + a11 * b11 + a21 * b12;\n out[6] = a02 * b10 + a12 * b11 + a22 * b12;\n out[7] = a03 * b10 + a13 * b11 + a23 * b12;\n out[8] = a00 * b20 + a10 * b21 + a20 * b22;\n out[9] = a01 * b20 + a11 * b21 + a21 * b22;\n out[10] = a02 * b20 + a12 * b21 + a22 * b22;\n out[11] = a03 * b20 + a13 * b21 + a23 * b22;\n\n if (a !== out) { // If the source and destination differ, copy the unchanged last row\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n }\n return out;\n};\n\n/**\n * Rotates a matrix by the given angle around the X axis\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\nmat4.rotateX = function (out, a, rad) {\n var s = Math.sin(rad),\n c = Math.cos(rad),\n a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7],\n a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n\n if (a !== out) { // If the source and destination differ, copy the unchanged rows\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n }\n\n // Perform axis-specific matrix multiplication\n out[4] = a10 * c + a20 * s;\n out[5] = a11 * c + a21 * s;\n out[6] = a12 * c + a22 * s;\n out[7] = a13 * c + a23 * s;\n out[8] = a20 * c - a10 * s;\n out[9] = a21 * c - a11 * s;\n out[10] = a22 * c - a12 * s;\n out[11] = a23 * c - a13 * s;\n return out;\n};\n\n/**\n * Rotates a matrix by the given angle around the Y axis\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\nmat4.rotateY = function (out, a, rad) {\n var s = Math.sin(rad),\n c = Math.cos(rad),\n a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3],\n a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n\n if (a !== out) { // If the source and destination differ, copy the unchanged rows\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n }\n\n // Perform axis-specific matrix multiplication\n out[0] = a00 * c - a20 * s;\n out[1] = a01 * c - a21 * s;\n out[2] = a02 * c - a22 * s;\n out[3] = a03 * c - a23 * s;\n out[8] = a00 * s + a20 * c;\n out[9] = a01 * s + a21 * c;\n out[10] = a02 * s + a22 * c;\n out[11] = a03 * s + a23 * c;\n return out;\n};\n\n/**\n * Rotates a matrix by the given angle around the Z axis\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\nmat4.rotateZ = function (out, a, rad) {\n var s = Math.sin(rad),\n c = Math.cos(rad),\n a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3],\n a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n\n if (a !== out) { // If the source and destination differ, copy the unchanged last row\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n }\n\n // Perform axis-specific matrix multiplication\n out[0] = a00 * c + a10 * s;\n out[1] = a01 * c + a11 * s;\n out[2] = a02 * c + a12 * s;\n out[3] = a03 * c + a13 * s;\n out[4] = a10 * c - a00 * s;\n out[5] = a11 * c - a01 * s;\n out[6] = a12 * c - a02 * s;\n out[7] = a13 * c - a03 * s;\n return out;\n};\n\n/**\n * Creates a matrix from a quaternion rotation and vector translation\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.translate(dest, vec);\n * var quatMat = mat4.create();\n * quat4.toMat4(quat, quatMat);\n * mat4.multiply(dest, quatMat);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {quat4} q Rotation quaternion\n * @param {vec3} v Translation vector\n * @returns {mat4} out\n */\nmat4.fromRotationTranslation = function (out, q, v) {\n // Quaternion math\n var x = q[0], y = q[1], z = q[2], w = q[3],\n x2 = x + x,\n y2 = y + y,\n z2 = z + z,\n\n xx = x * x2,\n xy = x * y2,\n xz = x * z2,\n yy = y * y2,\n yz = y * z2,\n zz = z * z2,\n wx = w * x2,\n wy = w * y2,\n wz = w * z2;\n\n out[0] = 1 - (yy + zz);\n out[1] = xy + wz;\n out[2] = xz - wy;\n out[3] = 0;\n out[4] = xy - wz;\n out[5] = 1 - (xx + zz);\n out[6] = yz + wx;\n out[7] = 0;\n out[8] = xz + wy;\n out[9] = yz - wx;\n out[10] = 1 - (xx + yy);\n out[11] = 0;\n out[12] = v[0];\n out[13] = v[1];\n out[14] = v[2];\n out[15] = 1;\n \n return out;\n};\n\nmat4.fromQuat = function (out, q) {\n var x = q[0], y = q[1], z = q[2], w = q[3],\n x2 = x + x,\n y2 = y + y,\n z2 = z + z,\n\n xx = x * x2,\n yx = y * x2,\n yy = y * y2,\n zx = z * x2,\n zy = z * y2,\n zz = z * z2,\n wx = w * x2,\n wy = w * y2,\n wz = w * z2;\n\n out[0] = 1 - yy - zz;\n out[1] = yx + wz;\n out[2] = zx - wy;\n out[3] = 0;\n\n out[4] = yx - wz;\n out[5] = 1 - xx - zz;\n out[6] = zy + wx;\n out[7] = 0;\n\n out[8] = zx + wy;\n out[9] = zy - wx;\n out[10] = 1 - xx - yy;\n out[11] = 0;\n\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n\n return out;\n};\n\n/**\n * Generates a frustum matrix with the given bounds\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {Number} left Left bound of the frustum\n * @param {Number} right Right bound of the frustum\n * @param {Number} bottom Bottom bound of the frustum\n * @param {Number} top Top bound of the frustum\n * @param {Number} near Near bound of the frustum\n * @param {Number} far Far bound of the frustum\n * @returns {mat4} out\n */\nmat4.frustum = function (out, left, right, bottom, top, near, far) {\n var rl = 1 / (right - left),\n tb = 1 / (top - bottom),\n nf = 1 / (near - far);\n out[0] = (near * 2) * rl;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = (near * 2) * tb;\n out[6] = 0;\n out[7] = 0;\n out[8] = (right + left) * rl;\n out[9] = (top + bottom) * tb;\n out[10] = (far + near) * nf;\n out[11] = -1;\n out[12] = 0;\n out[13] = 0;\n out[14] = (far * near * 2) * nf;\n out[15] = 0;\n return out;\n};\n\n/**\n * Generates a perspective projection matrix with the given bounds\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {number} fovy Vertical field of view in radians\n * @param {number} aspect Aspect ratio. typically viewport width/height\n * @param {number} near Near bound of the frustum\n * @param {number} far Far bound of the frustum\n * @returns {mat4} out\n */\nmat4.perspective = function (out, fovy, aspect, near, far) {\n var f = 1.0 / Math.tan(fovy / 2),\n nf = 1 / (near - far);\n out[0] = f / aspect;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = f;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = (far + near) * nf;\n out[11] = -1;\n out[12] = 0;\n out[13] = 0;\n out[14] = (2 * far * near) * nf;\n out[15] = 0;\n return out;\n};\n\n/**\n * Generates a orthogonal projection matrix with the given bounds\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {number} left Left bound of the frustum\n * @param {number} right Right bound of the frustum\n * @param {number} bottom Bottom bound of the frustum\n * @param {number} top Top bound of the frustum\n * @param {number} near Near bound of the frustum\n * @param {number} far Far bound of the frustum\n * @returns {mat4} out\n */\nmat4.ortho = function (out, left, right, bottom, top, near, far) {\n var lr = 1 / (left - right),\n bt = 1 / (bottom - top),\n nf = 1 / (near - far);\n out[0] = -2 * lr;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = -2 * bt;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 2 * nf;\n out[11] = 0;\n out[12] = (left + right) * lr;\n out[13] = (top + bottom) * bt;\n out[14] = (far + near) * nf;\n out[15] = 1;\n return out;\n};\n\n/**\n * Generates a look-at matrix with the given eye position, focal point, and up axis\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {vec3} eye Position of the viewer\n * @param {vec3} center Point the viewer is looking at\n * @param {vec3} up vec3 pointing up\n * @returns {mat4} out\n */\nmat4.lookAt = function (out, eye, center, up) {\n var x0, x1, x2, y0, y1, y2, z0, z1, z2, len,\n eyex = eye[0],\n eyey = eye[1],\n eyez = eye[2],\n upx = up[0],\n upy = up[1],\n upz = up[2],\n centerx = center[0],\n centery = center[1],\n centerz = center[2];\n\n if (Math.abs(eyex - centerx) < GLMAT_EPSILON &&\n Math.abs(eyey - centery) < GLMAT_EPSILON &&\n Math.abs(eyez - centerz) < GLMAT_EPSILON) {\n return mat4.identity(out);\n }\n\n z0 = eyex - centerx;\n z1 = eyey - centery;\n z2 = eyez - centerz;\n\n len = 1 / Math.sqrt(z0 * z0 + z1 * z1 + z2 * z2);\n z0 *= len;\n z1 *= len;\n z2 *= len;\n\n x0 = upy * z2 - upz * z1;\n x1 = upz * z0 - upx * z2;\n x2 = upx * z1 - upy * z0;\n len = Math.sqrt(x0 * x0 + x1 * x1 + x2 * x2);\n if (!len) {\n x0 = 0;\n x1 = 0;\n x2 = 0;\n } else {\n len = 1 / len;\n x0 *= len;\n x1 *= len;\n x2 *= len;\n }\n\n y0 = z1 * x2 - z2 * x1;\n y1 = z2 * x0 - z0 * x2;\n y2 = z0 * x1 - z1 * x0;\n\n len = Math.sqrt(y0 * y0 + y1 * y1 + y2 * y2);\n if (!len) {\n y0 = 0;\n y1 = 0;\n y2 = 0;\n } else {\n len = 1 / len;\n y0 *= len;\n y1 *= len;\n y2 *= len;\n }\n\n out[0] = x0;\n out[1] = y0;\n out[2] = z0;\n out[3] = 0;\n out[4] = x1;\n out[5] = y1;\n out[6] = z1;\n out[7] = 0;\n out[8] = x2;\n out[9] = y2;\n out[10] = z2;\n out[11] = 0;\n out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez);\n out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez);\n out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez);\n out[15] = 1;\n\n return out;\n};\n\n/**\n * Returns a string representation of a mat4\n *\n * @param {mat4} mat matrix to represent as a string\n * @returns {String} string representation of the matrix\n */\nmat4.str = function (a) {\n return 'mat4(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ', ' +\n a[4] + ', ' + a[5] + ', ' + a[6] + ', ' + a[7] + ', ' +\n a[8] + ', ' + a[9] + ', ' + a[10] + ', ' + a[11] + ', ' + \n a[12] + ', ' + a[13] + ', ' + a[14] + ', ' + a[15] + ')';\n};\n\n/**\n * Returns Frobenius norm of a mat4\n *\n * @param {mat4} a the matrix to calculate Frobenius norm of\n * @returns {Number} Frobenius norm\n */\nmat4.frob = function (a) {\n return(Math.sqrt(Math.pow(a[0], 2) + Math.pow(a[1], 2) + Math.pow(a[2], 2) + Math.pow(a[3], 2) + Math.pow(a[4], 2) + Math.pow(a[5], 2) + Math.pow(a[6], 2) + Math.pow(a[7], 2) + Math.pow(a[8], 2) + Math.pow(a[9], 2) + Math.pow(a[10], 2) + Math.pow(a[11], 2) + Math.pow(a[12], 2) + Math.pow(a[13], 2) + Math.pow(a[14], 2) + Math.pow(a[15], 2) ))\n};\n\n\nif(typeof(exports) !== 'undefined') {\n exports.mat4 = mat4;\n}\n;\n/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation \n and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\n/**\n * @class Quaternion\n * @name quat\n */\n\nvar quat = {};\n\n/**\n * Creates a new identity quat\n *\n * @returns {quat} a new quaternion\n */\nquat.create = function() {\n var out = new GLMAT_ARRAY_TYPE(4);\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n return out;\n};\n\n/**\n * Sets a quaternion to represent the shortest rotation from one\n * vector to another.\n *\n * Both vectors are assumed to be unit length.\n *\n * @param {quat} out the receiving quaternion.\n * @param {vec3} a the initial vector\n * @param {vec3} b the destination vector\n * @returns {quat} out\n */\nquat.rotationTo = (function() {\n var tmpvec3 = vec3.create();\n var xUnitVec3 = vec3.fromValues(1,0,0);\n var yUnitVec3 = vec3.fromValues(0,1,0);\n\n return function(out, a, b) {\n var dot = vec3.dot(a, b);\n if (dot < -0.999999) {\n vec3.cross(tmpvec3, xUnitVec3, a);\n if (vec3.length(tmpvec3) < 0.000001)\n vec3.cross(tmpvec3, yUnitVec3, a);\n vec3.normalize(tmpvec3, tmpvec3);\n quat.setAxisAngle(out, tmpvec3, Math.PI);\n return out;\n } else if (dot > 0.999999) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n return out;\n } else {\n vec3.cross(tmpvec3, a, b);\n out[0] = tmpvec3[0];\n out[1] = tmpvec3[1];\n out[2] = tmpvec3[2];\n out[3] = 1 + dot;\n return quat.normalize(out, out);\n }\n };\n})();\n\n/**\n * Sets the specified quaternion with values corresponding to the given\n * axes. Each axis is a vec3 and is expected to be unit length and\n * perpendicular to all other specified axes.\n *\n * @param {vec3} view the vector representing the viewing direction\n * @param {vec3} right the vector representing the local \"right\" direction\n * @param {vec3} up the vector representing the local \"up\" direction\n * @returns {quat} out\n */\nquat.setAxes = (function() {\n var matr = mat3.create();\n\n return function(out, view, right, up) {\n matr[0] = right[0];\n matr[3] = right[1];\n matr[6] = right[2];\n\n matr[1] = up[0];\n matr[4] = up[1];\n matr[7] = up[2];\n\n matr[2] = -view[0];\n matr[5] = -view[1];\n matr[8] = -view[2];\n\n return quat.normalize(out, quat.fromMat3(out, matr));\n };\n})();\n\n/**\n * Creates a new quat initialized with values from an existing quaternion\n *\n * @param {quat} a quaternion to clone\n * @returns {quat} a new quaternion\n * @function\n */\nquat.clone = vec4.clone;\n\n/**\n * Creates a new quat initialized with the given values\n *\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @param {Number} w W component\n * @returns {quat} a new quaternion\n * @function\n */\nquat.fromValues = vec4.fromValues;\n\n/**\n * Copy the values from one quat to another\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a the source quaternion\n * @returns {quat} out\n * @function\n */\nquat.copy = vec4.copy;\n\n/**\n * Set the components of a quat to the given values\n *\n * @param {quat} out the receiving quaternion\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @param {Number} w W component\n * @returns {quat} out\n * @function\n */\nquat.set = vec4.set;\n\n/**\n * Set a quat to the identity quaternion\n *\n * @param {quat} out the receiving quaternion\n * @returns {quat} out\n */\nquat.identity = function(out) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n return out;\n};\n\n/**\n * Sets a quat from the given angle and rotation axis,\n * then returns it.\n *\n * @param {quat} out the receiving quaternion\n * @param {vec3} axis the axis around which to rotate\n * @param {Number} rad the angle in radians\n * @returns {quat} out\n **/\nquat.setAxisAngle = function(out, axis, rad) {\n rad = rad * 0.5;\n var s = Math.sin(rad);\n out[0] = s * axis[0];\n out[1] = s * axis[1];\n out[2] = s * axis[2];\n out[3] = Math.cos(rad);\n return out;\n};\n\n/**\n * Adds two quat's\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a the first operand\n * @param {quat} b the second operand\n * @returns {quat} out\n * @function\n */\nquat.add = vec4.add;\n\n/**\n * Multiplies two quat's\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a the first operand\n * @param {quat} b the second operand\n * @returns {quat} out\n */\nquat.multiply = function(out, a, b) {\n var ax = a[0], ay = a[1], az = a[2], aw = a[3],\n bx = b[0], by = b[1], bz = b[2], bw = b[3];\n\n out[0] = ax * bw + aw * bx + ay * bz - az * by;\n out[1] = ay * bw + aw * by + az * bx - ax * bz;\n out[2] = az * bw + aw * bz + ax * by - ay * bx;\n out[3] = aw * bw - ax * bx - ay * by - az * bz;\n return out;\n};\n\n/**\n * Alias for {@link quat.multiply}\n * @function\n */\nquat.mul = quat.multiply;\n\n/**\n * Scales a quat by a scalar number\n *\n * @param {quat} out the receiving vector\n * @param {quat} a the vector to scale\n * @param {Number} b amount to scale the vector by\n * @returns {quat} out\n * @function\n */\nquat.scale = vec4.scale;\n\n/**\n * Rotates a quaternion by the given angle about the X axis\n *\n * @param {quat} out quat receiving operation result\n * @param {quat} a quat to rotate\n * @param {number} rad angle (in radians) to rotate\n * @returns {quat} out\n */\nquat.rotateX = function (out, a, rad) {\n rad *= 0.5; \n\n var ax = a[0], ay = a[1], az = a[2], aw = a[3],\n bx = Math.sin(rad), bw = Math.cos(rad);\n\n out[0] = ax * bw + aw * bx;\n out[1] = ay * bw + az * bx;\n out[2] = az * bw - ay * bx;\n out[3] = aw * bw - ax * bx;\n return out;\n};\n\n/**\n * Rotates a quaternion by the given angle about the Y axis\n *\n * @param {quat} out quat receiving operation result\n * @param {quat} a quat to rotate\n * @param {number} rad angle (in radians) to rotate\n * @returns {quat} out\n */\nquat.rotateY = function (out, a, rad) {\n rad *= 0.5; \n\n var ax = a[0], ay = a[1], az = a[2], aw = a[3],\n by = Math.sin(rad), bw = Math.cos(rad);\n\n out[0] = ax * bw - az * by;\n out[1] = ay * bw + aw * by;\n out[2] = az * bw + ax * by;\n out[3] = aw * bw - ay * by;\n return out;\n};\n\n/**\n * Rotates a quaternion by the given angle about the Z axis\n *\n * @param {quat} out quat receiving operation result\n * @param {quat} a quat to rotate\n * @param {number} rad angle (in radians) to rotate\n * @returns {quat} out\n */\nquat.rotateZ = function (out, a, rad) {\n rad *= 0.5; \n\n var ax = a[0], ay = a[1], az = a[2], aw = a[3],\n bz = Math.sin(rad), bw = Math.cos(rad);\n\n out[0] = ax * bw + ay * bz;\n out[1] = ay * bw - ax * bz;\n out[2] = az * bw + aw * bz;\n out[3] = aw * bw - az * bz;\n return out;\n};\n\n/**\n * Calculates the W component of a quat from the X, Y, and Z components.\n * Assumes that quaternion is 1 unit in length.\n * Any existing W component will be ignored.\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a quat to calculate W component of\n * @returns {quat} out\n */\nquat.calculateW = function (out, a) {\n var x = a[0], y = a[1], z = a[2];\n\n out[0] = x;\n out[1] = y;\n out[2] = z;\n out[3] = Math.sqrt(Math.abs(1.0 - x * x - y * y - z * z));\n return out;\n};\n\n/**\n * Calculates the dot product of two quat's\n *\n * @param {quat} a the first operand\n * @param {quat} b the second operand\n * @returns {Number} dot product of a and b\n * @function\n */\nquat.dot = vec4.dot;\n\n/**\n * Performs a linear interpolation between two quat's\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a the first operand\n * @param {quat} b the second operand\n * @param {Number} t interpolation amount between the two inputs\n * @returns {quat} out\n * @function\n */\nquat.lerp = vec4.lerp;\n\n/**\n * Performs a spherical linear interpolation between two quat\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a the first operand\n * @param {quat} b the second operand\n * @param {Number} t interpolation amount between the two inputs\n * @returns {quat} out\n */\nquat.slerp = function (out, a, b, t) {\n // benchmarks:\n // http://jsperf.com/quaternion-slerp-implementations\n\n var ax = a[0], ay = a[1], az = a[2], aw = a[3],\n bx = b[0], by = b[1], bz = b[2], bw = b[3];\n\n var omega, cosom, sinom, scale0, scale1;\n\n // calc cosine\n cosom = ax * bx + ay * by + az * bz + aw * bw;\n // adjust signs (if necessary)\n if ( cosom < 0.0 ) {\n cosom = -cosom;\n bx = - bx;\n by = - by;\n bz = - bz;\n bw = - bw;\n }\n // calculate coefficients\n if ( (1.0 - cosom) > 0.000001 ) {\n // standard case (slerp)\n omega = Math.acos(cosom);\n sinom = Math.sin(omega);\n scale0 = Math.sin((1.0 - t) * omega) / sinom;\n scale1 = Math.sin(t * omega) / sinom;\n } else { \n // \"from\" and \"to\" quaternions are very close \n // ... so we can do a linear interpolation\n scale0 = 1.0 - t;\n scale1 = t;\n }\n // calculate final values\n out[0] = scale0 * ax + scale1 * bx;\n out[1] = scale0 * ay + scale1 * by;\n out[2] = scale0 * az + scale1 * bz;\n out[3] = scale0 * aw + scale1 * bw;\n \n return out;\n};\n\n/**\n * Calculates the inverse of a quat\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a quat to calculate inverse of\n * @returns {quat} out\n */\nquat.invert = function(out, a) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3],\n dot = a0*a0 + a1*a1 + a2*a2 + a3*a3,\n invDot = dot ? 1.0/dot : 0;\n \n // TODO: Would be faster to return [0,0,0,0] immediately if dot == 0\n\n out[0] = -a0*invDot;\n out[1] = -a1*invDot;\n out[2] = -a2*invDot;\n out[3] = a3*invDot;\n return out;\n};\n\n/**\n * Calculates the conjugate of a quat\n * If the quaternion is normalized, this function is faster than quat.inverse and produces the same result.\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a quat to calculate conjugate of\n * @returns {quat} out\n */\nquat.conjugate = function (out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n out[3] = a[3];\n return out;\n};\n\n/**\n * Calculates the length of a quat\n *\n * @param {quat} a vector to calculate length of\n * @returns {Number} length of a\n * @function\n */\nquat.length = vec4.length;\n\n/**\n * Alias for {@link quat.length}\n * @function\n */\nquat.len = quat.length;\n\n/**\n * Calculates the squared length of a quat\n *\n * @param {quat} a vector to calculate squared length of\n * @returns {Number} squared length of a\n * @function\n */\nquat.squaredLength = vec4.squaredLength;\n\n/**\n * Alias for {@link quat.squaredLength}\n * @function\n */\nquat.sqrLen = quat.squaredLength;\n\n/**\n * Normalize a quat\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a quaternion to normalize\n * @returns {quat} out\n * @function\n */\nquat.normalize = vec4.normalize;\n\n/**\n * Creates a quaternion from the given 3x3 rotation matrix.\n *\n * NOTE: The resultant quaternion is not normalized, so you should be sure\n * to renormalize the quaternion yourself where necessary.\n *\n * @param {quat} out the receiving quaternion\n * @param {mat3} m rotation matrix\n * @returns {quat} out\n * @function\n */\nquat.fromMat3 = function(out, m) {\n // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes\n // article \"Quaternion Calculus and Fast Animation\".\n var fTrace = m[0] + m[4] + m[8];\n var fRoot;\n\n if ( fTrace > 0.0 ) {\n // |w| > 1/2, may as well choose w > 1/2\n fRoot = Math.sqrt(fTrace + 1.0); // 2w\n out[3] = 0.5 * fRoot;\n fRoot = 0.5/fRoot; // 1/(4w)\n out[0] = (m[5]-m[7])*fRoot;\n out[1] = (m[6]-m[2])*fRoot;\n out[2] = (m[1]-m[3])*fRoot;\n } else {\n // |w| <= 1/2\n var i = 0;\n if ( m[4] > m[0] )\n i = 1;\n if ( m[8] > m[i*3+i] )\n i = 2;\n var j = (i+1)%3;\n var k = (i+2)%3;\n \n fRoot = Math.sqrt(m[i*3+i]-m[j*3+j]-m[k*3+k] + 1.0);\n out[i] = 0.5 * fRoot;\n fRoot = 0.5 / fRoot;\n out[3] = (m[j*3+k] - m[k*3+j]) * fRoot;\n out[j] = (m[j*3+i] + m[i*3+j]) * fRoot;\n out[k] = (m[k*3+i] + m[i*3+k]) * fRoot;\n }\n \n return out;\n};\n\n/**\n * Returns a string representation of a quatenion\n *\n * @param {quat} vec vector to represent as a string\n * @returns {String} string representation of the vector\n */\nquat.str = function (a) {\n return 'quat(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ')';\n};\n\nif(typeof(exports) !== 'undefined') {\n exports.quat = quat;\n}\n;\n\n\n\n\n\n\n\n\n\n\n\n\n\n })(shim.exports);\n})(this);\n","\"use strict\";\n\n\nvar glm = require(\"./gl-matrix\");\nvar elements = require(\"./elements\");\nvar consts = require(\"./const\");\n\nfunction clamp(min, max, value) {\n return Math.min(max, Math.max(min, value));\n}\n\n\nvar newView = module.exports.new = function() {\n return {\n aspect: 1.0,\n zoom: 0.125,\n translation: {\n x: 0.0,\n y: 0.0\n },\n atomScale: 0.6,\n relativeAtomScale: 1.0,\n bondScale: 0.5,\n rotation: glm.mat4.create(),\n ao: 0.75,\n aoRes: 256,\n brightness: 0.5,\n outline: 0.0,\n spf: 32,\n bonds: false,\n bondThreshold: 1.2,\n bondShade: 0.5,\n atomShade: 0.5,\n resolution: 768,\n dofStrength: 0.0,\n dofPosition: 0.5,\n fxaa: 1\n };\n};\n\n\nvar center = module.exports.center = function(v, system) {\n var maxX = -Infinity;\n var minX = Infinity;\n var maxY = -Infinity;\n var minY = Infinity;\n for(var i = 0; i < system.atoms.length; i++) {\n var a = system.atoms[i];\n var r = elements[a.symbol].radius;\n r = 2.5 * v.atomScale * (1 + (r - 1) * v.relativeAtomScale);\n var p = glm.vec4.fromValues(a.x, a.y, a.z, 0);\n glm.vec4.transformMat4(p, p, v.rotation);\n maxX = Math.max(maxX, p[0] + r);\n minX = Math.min(minX, p[0] - r);\n maxY = Math.max(maxY, p[1] + r);\n minY = Math.min(minY, p[1] - r);\n }\n var cx = minX + (maxX - minX) / 2.0;\n var cy = minY + (maxY - minY) / 2.0;\n v.translation.x = cx;\n v.translation.y = cy;\n var scale = Math.max(maxX - minX, maxY - minY);\n v.zoom = 1/(scale * 1.01);\n};\n\n\nvar override = module.exports.override = function(v, data) {\n for (var key in data) {\n v[key] = data[key];\n }\n resolve(v);\n};\n\n\nvar clone = module.exports.clone = function(v) {\n return deserialize(serialize(v));\n};\n\n\nvar serialize = module.exports.serialize = function(v) {\n return JSON.stringify(v);\n};\n\n\nvar deserialize = module.exports.deserialize = function(v) {\n v = JSON.parse(v);\n v.rotation = glm.mat4.clone(v.rotation);\n return v;\n};\n\n\nvar resolve = module.exports.resolve = function(v) {\n v.dofStrength = clamp(0, 1, v.dofStrength);\n v.dofPosition = clamp(0, 1, v.dofPosition);\n v.zoom = clamp(0.001, 2.0, v.zoom);\n v.atomScale = clamp(0, 1, v.atomScale);\n v.relativeAtomScale = clamp(0, 1, v.relativeAtomScale);\n v.bondScale = clamp(0, 1, v.bondScale);\n v.bondShade = clamp(0, 1, v.bondShade);\n v.atomShade = clamp(0, 1, v.atomShade);\n v.ao = clamp(0, 1, v.ao);\n v.brightness = clamp(0, 1, v.brightness);\n v.outline = clamp(0, 1, v.outline);\n};\n\n\nvar translate = module.exports.translate = function(v, dx, dy) {\n v.translation.x -= dx/(v.resolution * v.zoom);\n v.translation.y += dy/(v.resolution * v.zoom);\n resolve(v);\n};\n\n\nvar rotate = module.exports.rotate = function(v, dx, dy) {\n var m = glm.mat4.create();\n glm.mat4.rotateY(m, m, dx * 0.005);\n glm.mat4.rotateX(m, m, dy * 0.005);\n glm.mat4.multiply(v.rotation, m, v.rotation);\n const ao = v.ao; \n v.ao = 0; \n resolve(v);\n v.ao = ao;\n};\n\n\nvar getRect = module.exports.getRect = function(v) {\n var width = 1.0/v.zoom;\n var height = width/v.aspect;\n var bottom = -height/2 + v.translation.y;\n var top = height/2 + v.translation.y;\n var left = -width/2 + v.translation.x;\n var right = width/2 + v.translation.x;\n return {\n bottom: bottom,\n top: top,\n left: left,\n right: right\n };\n};\n\n\nvar getBondRadius = module.exports.getBondRadius = function(v) {\n return v.bondScale * v.atomScale * \n (1 + (consts.MIN_ATOM_RADIUS - 1) * v.relativeAtomScale);\n};\n\n\n","import _has from './_has.js';\n\nvar toString = Object.prototype.toString;\nvar _isArguments = /*#__PURE__*/function () {\n return toString.call(arguments) === '[object Arguments]' ? function _isArguments(x) {\n return toString.call(x) === '[object Arguments]';\n } : function _isArguments(x) {\n return _has('callee', x);\n };\n}();\n\nexport default _isArguments;","import _curry1 from './internal/_curry1.js';\nimport _has from './internal/_has.js';\nimport _isArguments from './internal/_isArguments.js';\n\n// cover IE < 9 keys issues\nvar hasEnumBug = ! /*#__PURE__*/{ toString: null }.propertyIsEnumerable('toString');\nvar nonEnumerableProps = ['constructor', 'valueOf', 'isPrototypeOf', 'toString', 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];\n// Safari bug\nvar hasArgsEnumBug = /*#__PURE__*/function () {\n 'use strict';\n\n return arguments.propertyIsEnumerable('length');\n}();\n\nvar contains = function contains(list, item) {\n var idx = 0;\n while (idx < list.length) {\n if (list[idx] === item) {\n return true;\n }\n idx += 1;\n }\n return false;\n};\n\n/**\n * Returns a list containing the names of all the enumerable own properties of\n * the supplied object.\n * Note that the order of the output array is not guaranteed to be consistent\n * across different JS platforms.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig {k: v} -> [k]\n * @param {Object} obj The object to extract properties from\n * @return {Array} An array of the object's own properties.\n * @see R.keysIn, R.values\n * @example\n *\n * R.keys({a: 1, b: 2, c: 3}); //=> ['a', 'b', 'c']\n */\nvar keys = typeof Object.keys === 'function' && !hasArgsEnumBug ? /*#__PURE__*/_curry1(function keys(obj) {\n return Object(obj) !== obj ? [] : Object.keys(obj);\n}) : /*#__PURE__*/_curry1(function keys(obj) {\n if (Object(obj) !== obj) {\n return [];\n }\n var prop, nIdx;\n var ks = [];\n var checkArgsLength = hasArgsEnumBug && _isArguments(obj);\n for (prop in obj) {\n if (_has(prop, obj) && (!checkArgsLength || prop !== 'length')) {\n ks[ks.length] = prop;\n }\n }\n if (hasEnumBug) {\n nIdx = nonEnumerableProps.length - 1;\n while (nIdx >= 0) {\n prop = nonEnumerableProps[nIdx];\n if (_has(prop, obj) && !contains(ks, prop)) {\n ks[ks.length] = prop;\n }\n nIdx -= 1;\n }\n }\n return ks;\n});\nexport default keys;","import _curry1 from './internal/_curry1.js';\n\n/**\n * Gives a single-word string description of the (native) type of a value,\n * returning such answers as 'Object', 'Number', 'Array', or 'Null'. Does not\n * attempt to distinguish user Object types any further, reporting them all as\n * 'Object'.\n *\n * @func\n * @memberOf R\n * @since v0.8.0\n * @category Type\n * @sig (* -> {*}) -> String\n * @param {*} val The value to test\n * @return {String}\n * @example\n *\n * R.type({}); //=> \"Object\"\n * R.type(1); //=> \"Number\"\n * R.type(false); //=> \"Boolean\"\n * R.type('s'); //=> \"String\"\n * R.type(null); //=> \"Null\"\n * R.type([]); //=> \"Array\"\n * R.type(/[A-z]/); //=> \"RegExp\"\n * R.type(() => {}); //=> \"Function\"\n * R.type(undefined); //=> \"Undefined\"\n */\nvar type = /*#__PURE__*/_curry1(function type(val) {\n return val === null ? 'Null' : val === undefined ? 'Undefined' : Object.prototype.toString.call(val).slice(8, -1);\n});\nexport default type;","import _curry1 from './_curry1.js';\nimport _isPlaceholder from './_isPlaceholder.js';\n\n/**\n * Optimized internal two-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\nexport default function _curry2(fn) {\n return function f2(a, b) {\n switch (arguments.length) {\n case 0:\n return f2;\n case 1:\n return _isPlaceholder(a) ? f2 : _curry1(function (_b) {\n return fn(a, _b);\n });\n default:\n return _isPlaceholder(a) && _isPlaceholder(b) ? f2 : _isPlaceholder(a) ? _curry1(function (_a) {\n return fn(_a, b);\n }) : _isPlaceholder(b) ? _curry1(function (_b) {\n return fn(a, _b);\n }) : fn(a, b);\n }\n };\n}","import PropTypes from 'prop-types';\nimport React, {Component, lazy, Suspense} from 'react';\nimport LazyLoader from '../LazyLoader';\n\nconst RealAlignmentChart = lazy(LazyLoader.alignmentChart);\n\n/**\n * The Alignment Chart (MSA) component is used to align multiple genomic\n * or proteomic sequences from a FASTA or Clustal file. Among its\n * extensive set of features, the multiple sequence alignment chart\n * can display multiple subplots showing gap and conservation info,\n * alongside industry standard colorscale support and consensus sequence.\n * No matter what size your alignment is, Alignment Chart is able to display\n * your genes or proteins snappily thanks to the underlying WebGL architecture\n * powering the component. You can quickly scroll through your long sequence\n * with a slider or a heatmap overview.\n * Read more about the component here:\n * https://github.com/plotly/react-alignment-viewer\n */\nexport default class AlignmentChart extends Component {\n render() {\n return (\n \n \n \n );\n }\n}\n\nAlignmentChart.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n id: PropTypes.string,\n\n /**\n * Dash-assigned callback that should be called whenever any of the\n * properties change.\n */\n setProps: PropTypes.func,\n\n /**\n * A Dash prop that returns data on clicking, hovering or resizing the viewer.\n */\n eventDatum: PropTypes.string,\n\n /**\n * Input data, either in FASTA or Clustal format.\n */\n data: PropTypes.string,\n\n /**\n *Format type of the input data, either in FASTA or Clustal.\n */\n extension: PropTypes.string,\n\n /**\n * Colorscale in 'buried', 'cinema', 'clustal', 'clustal2', 'helix', 'hydrophobicity'\n * 'lesk', 'mae', 'nucleotide', 'purine', 'strand', 'taylor', 'turn', 'zappo',\n * or your own colorscale as a {'nucleotide': COLOR} dict.\n * Note that this is NOT a standard plotly colorscale.\n */\n colorscale: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n\n /**\n * Opacity of the main plot as a value between 0 and 1.\n */\n opacity: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Color of the nucleotide labels, in common name, hex, rgb or rgba format.\n * If left blank, handled by the colorscale automatically.\n */\n textcolor: PropTypes.string,\n\n /**\n * Size of the nucleotide labels, as a number.\n */\n textsize: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Toggles displaying sequence labels at left of alignment\n */\n showlabel: PropTypes.bool,\n\n /**\n * Toggles displaying sequence IDs at left of alignment.\n */\n showid: PropTypes.bool,\n\n /**\n * Enables the display of conservation secondary barplot where the most conserved\n * nucleotides or amino acids get greater bars.\n */\n showconservation: PropTypes.bool,\n\n /**\n * Color of the conservation secondary barplot, in common name, hex, rgb or rgba format.\n */\n conservationcolor: PropTypes.string,\n\n /**\n * Colorscale of the conservation barplot, in Plotly colorscales (e.g. 'Viridis')\n * or as custom Plotly colorscale under a list format.\n * Note that this conservationcolorscale argument\n * does NOT follow the same format as the colorscale argument.\n */\n conservationcolorscale: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.array,\n ]),\n\n /**\n * Opacity of the conservation secondary barplot as a value between 0 and 1.\n */\n conservationopacity: PropTypes.oneOfType([\n PropTypes.number,\n PropTypes.string,\n ]),\n\n /**\n * Whether to use most conserved ratio (MLE) 'conservation'\n * or normalized entropy 'entropy' to determine conservation,\n * which is a value between 0 and 1 where 1 is most conserved.\n */\n conservationmethod: PropTypes.oneOf(['conservation', 'entropy']),\n\n /**\n * Whether to normalize the conservation barchart\n * By multiplying it elementwise with the gap barchart, as to\n * lower the conservation values across sequences regions with many gaps.\n */\n correctgap: PropTypes.bool,\n\n /**\n * Enables the display of gap secondary barplot where the sequence regions\n * with the fewest gaps get the greatest bars.\n */\n showgap: PropTypes.bool,\n\n /**\n * Color of the gap secondary barplot, in common name, hex, rgb or rgba format.\n */\n gapcolor: PropTypes.string,\n\n /**\n * Colorscale of the gap barplot, in Plotly colorscales (e.g. 'Viridis')\n * or as custom Plotly colorscale under a list format.\n * Note that this conservationcolorscale argument\n * does NOT follow the same format as the colorscale argument.\n */\n gapcolorscale: PropTypes.oneOfType([PropTypes.string, PropTypes.array]),\n\n /**\n * Opacity of the gap secondary barplot as a value between 0 and 1.\n */\n gapopacity: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * If both conservation and gap are enabled,\n * toggles whether to group bars or to stack them as separate subplots.\n * No effect if not both gap and conservation are shown.\n */\n groupbars: PropTypes.bool,\n\n /**\n * Displays toggling the consensus sequence, where each nucleotide in the\n * consensus sequence is the argmax of its distribution at a set nucleotide.\n */\n showconsensus: PropTypes.bool,\n\n /**\n * Sets how many pixels each nucleotide/amino acid on the Alignment Chart\n * takes up horizontally. The total number of tiles (numtiles) seen\n * horizontally is automatically determined by rounding\n * the Viewer width divided by the tile width.\n * the Viewwer width divided by the tile witdth.\n */\n tilewidth: PropTypes.number,\n\n /**\n * Sets how many pixels each nucleotide/amino acid on the Alignment Chart\n * takes up vertically.\n * If enabled, set height dynamically.\n */\n tileheight: PropTypes.number,\n\n /**\n * Toggles whether the overview should be a heatmap, a slider, or none.\n */\n overview: PropTypes.oneOf(['heatmap', 'slider', 'none']),\n\n /**\n * Sets how many tiles to display across horitontally. If enabled,\n * overrides tilewidth and sets the amount of tiles directly based off\n * that value.\n */\n numtiles: PropTypes.number,\n\n /**\n * If overview is set to 'scroll', determines how many tiles to skip\n * with each slider movement.\n * Has no effect if scroll is not enabled (such as with overview or none).\n */\n scrollskip: PropTypes.number,\n\n /**\n * Determines where to start annotating the first tile.\n * If let blank will be automatically determined by Plotly.\n * Equivalent to Plotly's tick0 property.\n * Does not function if overview mode 'slider' is applied. (Current bug)\n */\n tickstart: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Determines at what interval to keep annotating the tiles.\n * If left blank will be automatially determined by Plotly.\n * Equivalent to Plotly's dtick property.\n * Does not function if overview mode 'slider' is applied. (Current bug)\n */\n ticksteps: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Width of the Viewer.\n * Property takes precedence over tileswidth and numtiles\n * if either of them is set.\n */\n width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Width of the Viewer.\n * Property takes precedence over tilesheight if both\n * are set.\n */\n height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n};\n\nAlignmentChart.defaultProps = {\n // Data\n extension: 'fasta',\n colorscale: 'clustal2',\n opacity: null,\n textcolor: null,\n textsize: 10,\n showlabel: true,\n showid: true,\n showconservation: true,\n conservationcolor: null,\n conservationcolorscale: 'Viridis',\n conservationopacity: null,\n conservationmethod: 'entropy',\n correctgap: true,\n showgap: true,\n gapcolor: 'grey',\n gapcolorscale: null,\n gapopacity: null,\n groupbars: false,\n showconsensus: true,\n // Layout\n tilewidth: 16,\n tileheight: 16,\n numtiles: null,\n overview: 'heatmap',\n scrollskip: 10,\n tickstart: null,\n ticksteps: null,\n // Other\n width: null,\n height: 900,\n};\n\nexport const propTypes = AlignmentChart.propTypes;\nexport const defaultProps = AlignmentChart.defaultProps;\n","import PropTypes from 'prop-types';\nimport React, {Component, lazy, Suspense} from 'react';\nimport LazyLoader from '../LazyLoader';\n\nconst RealCircos = lazy(LazyLoader.circos);\n\n/**\n * Dash Circos is a library used to analyze and interpret\n * data using a circular layout, based on the popular\n * 'Circos' graph. This Dash Bio component is a useful tool\n * for showcasing relationships bewtween data/datasets in a\n * beautiful way. Please checkout the Dash Bio repository\n * on github to learn more about this API.\n */\nexport default class Circos extends Component {\n render() {\n return (\n \n \n \n );\n }\n}\n\nCircos.defaultProps = {\n config: {},\n size: 800,\n tracks: [],\n};\n\nCircos.propTypes = {\n /**\n * Allow for an SVG snapshot of the Circos graph to be downloaded.\n **/\n enableDownloadSVG: PropTypes.bool,\n\n /**\n * Allow for zooming and panning the Circos graph.\n **/\n enableZoomPan: PropTypes.bool,\n\n /**\n * The ID of the component to be used in Dash callbacks\n */\n id: PropTypes.string,\n\n /**\n * The CSS styling of the div wrapping the component\n */\n style: PropTypes.object,\n\n /**\n * A Dash prop that returns data on clicking or hovering of the tracks.\n * Depending on what is specified for prop \"selectEvent\".\n */\n eventDatum: PropTypes.object,\n\n /**\n * A dictionary used to choose whether tracks should return\n * data on click, hover, or both, with the dash prop \"eventDatum\".\n * The keys of the dictionary represent the index of the list\n * specified for \"tracks\".\n * Ex:\n * selectEvent={\n \"0\": \"hover\",\n \"1\": \"click\",\n \"2\": \"both\"\n },\n */\n selectEvent: PropTypes.object,\n\n /**\n * Dash provided setProps.\n */\n setProps: PropTypes.func,\n\n /**\n * The overall layout of the Circos graph, provided\n * as a list of dictionaries.\n */\n layout: PropTypes.arrayOf(\n PropTypes.shape({\n /**\n * The length of the block.\n */\n len: PropTypes.number.isRequired,\n\n /**\n * The color of the block.\n */\n color: PropTypes.string.isRequired,\n\n /**\n * The labels of the block.\n */\n label: PropTypes.string.isRequired,\n\n /**\n * The id of the block, where it will recieve\n * data from the specified \"track\" id.\n */\n id: PropTypes.string.isRequired,\n })\n ).isRequired,\n\n /**\n * Configuration of overall layout of the graph.\n */\n config: PropTypes.object,\n\n /**\n * The overall size of the SVG container holding the\n * graph. Set on initilization and unchangeable thereafter.\n */\n size: PropTypes.number,\n\n /**\n * Tracks that specify specific layouts.\n * For a complete list of tracks and usage,\n * please check the docs.\n */\n tracks: PropTypes.arrayOf(\n PropTypes.shape({\n /**\n * The id of a specific piece of track data.\n */\n id: PropTypes.string,\n\n /**\n * The data that makes up the track. It can\n * be a Json object.\n */\n data: PropTypes.array.isRequired,\n\n /**\n * The layout of the tracks, where the user\n * can configure innerRadius, outterRadius, ticks,\n * labels, and more.\n */\n config: PropTypes.object,\n\n /**\n * Specify the type of track this is.\n * Please check the docs for a list of tracks you can use,\n * and ensure the name is typed in all capitals.\n **/\n type: PropTypes.oneOf([\n 'CHORDS',\n 'HEATMAP',\n 'HIGHLIGHT',\n 'HISTOGRAM',\n 'LINE',\n 'SCATTER',\n 'STACK',\n 'TEXT',\n ]),\n\n /**\n * Specify what data for tooltipContent is\n * displayed.\n * The entry for the \"name\" key, is any of the keys used in the data loaded into tracks.\n * Ex: \"tooltipContent\": {\"name\": \"block_id\"},\n * To display all data in the dataset use \"all\" as the entry for the key \"name\".\n * Ex: \"tooltipContent\": {\"name\": \"all\"}\n * Ex: This will return (source) + ' > ' + (target) + ': ' + (targetEnd)'.\n * \"tooltipContent\": {\n \"source\": \"block_id\",\n \"target\": \"position\",\n \"targetEnd\": \"value\"\n },\n * Ex: This will return (source)(sourceID) + ' > ' + (target)(targetID) + ': ' (target)(targetEnd)'.\n * \"tooltipContent\": {\n \"source\": \"source\",\n \"sourceID\": \"id\",\n \"target\": \"target\",\n \"targetID\": \"id\",\n \"targetEnd\": \"end\"\n }\n **/\n tooltipContent: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.shape({\n name: PropTypes.string.isRequired,\n }),\n PropTypes.shape({\n source: PropTypes.string.isRequired,\n sourceID: PropTypes.string,\n target: PropTypes.string.isRequired,\n targetEnd: PropTypes.string.isRequired,\n targetID: PropTypes.string,\n }),\n ]),\n /**\n * Specify which dictonary key to grab color values from, in the passed in dataset.\n * This can be a string or an object.\n * If using a string, you can specify hex,\n * RGB, and colors from d3 scale chromatic (Ex: RdYlBu).\n * The key \"name\" is required for this dictionary,\n * where the input for \"name\" points to some list of\n * dictionaries color values.\n * Ex: \"color\": {\"name\": \"some key that refers to color in a data set\"}\n *\n **/\n color: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.shape({\n name: PropTypes.string.isRequired,\n }),\n ]),\n })\n ),\n};\n\nexport const propTypes = Circos.propTypes;\nexport const defaultProps = Circos.defaultProps;\n","import PropTypes from 'prop-types';\nimport React, {Component, lazy, Suspense} from 'react';\nimport LazyLoader from '../LazyLoader';\n\nconst RealIdeogram = lazy(LazyLoader.ideogram);\n\n/**\n * The Ideogram component is used to draw and animate genome-wide\n * datasets for organisms such as human, mouse, and any other\n * eukaryote. The Ideogram component can be used to compare\n * homologous features between chromosomes, and depict\n * haploid, diploid, aneuploid genomes. It can also display\n * annotations on genomic data using histograms and overlays.\n *\n * Reference: https://eweitz.github.io/ideogram/\n * Component's props: https://github.com/eweitz/ideogram/blob/master/api.md\n */\n\nexport default class Ideogram extends Component {\n render() {\n return (\n \n \n \n );\n }\n}\n\nIdeogram.defaultProps = {\n organism: 'human',\n dataDir: 'https://unpkg.com/ideogram@1.5.0/dist/data/bands/native/',\n annotationsColor: '#F00',\n annotationsLayout: 'tracks',\n barWidth: 3,\n chrHeight: 400,\n chrMargin: 10,\n chrWidth: 10,\n ploidy: 1,\n rotatable: true,\n showBandLabels: false,\n showChromosomeLabels: true,\n showAnnotTooltip: true,\n showFullyBanded: true,\n showNonNuclearChromosomes: false,\n};\n\nIdeogram.propTypes = {\n /**\n * The ID used to identify this component in Dash callbacks and used to identify Ideogram\n * instances.\n */\n id: PropTypes.string.isRequired,\n\n /**\n * The component's inline styles\n */\n style: PropTypes.object,\n\n /**\n * Dash specific prop type connecting event handlers to front end.\n */\n setProps: PropTypes.func,\n\n /**\n * The CSS class of the component wrapper\n */\n className: PropTypes.string,\n\n /**\n * Layout of ideogram annotations.\n * One of \"tracks\", \"histogram\", or \"overlay\".\n *\n * \"tracks\": display annotations in tracks beside each chromosome.\n *\n * \"histogram\": display annotations in a histogram. Clusters annotations by location. Each\n * cluster/bin is shown as a bar, the height of which represents the number of annotations on\n * genomic range.\n *\n * \"overlay\": display annotations directly over chromosomes.\n */\n annotationsLayout: PropTypes.oneOf(['tracks', 'histogram', 'overlay']),\n\n /**\n * A list of annotation objects. Annotation objects can also have a name, color, shape, and\n * track index. At the moment there is more keys specified and the docs need updating.\n */\n annotations: PropTypes.arrayOf(\n PropTypes.shape({\n name: PropTypes.string,\n chr: PropTypes.string,\n start: PropTypes.number,\n stop: PropTypes.number,\n })\n ),\n\n /**\n * An absolute or relative URL directing to a JSON file containing annotation objects (JSON).\n */\n annotationsPath: PropTypes.string,\n\n /**\n * Use this prop in a dash callback to return annotationData when hovered.\n * It is read-only, i.e., it cannot be used with dash.dependencies.Output but only with\n * dash.dependencies.Input\n */\n annotationsData: PropTypes.string,\n\n /**\n * A list of objects with metadata for each track, e.g., id, display name, color, shape.\n */\n annotationTracks: PropTypes.arrayOf(PropTypes.object),\n\n /**\n * Not used if annotationsLayout is set to \"overlay\".\n * The height of histogram bars or the size of annotations tracks symbols\n */\n annotationHeight: PropTypes.number,\n\n /**\n * Color of annotations.\n */\n annotationsColor: PropTypes.string,\n\n /**\n * Scaling of histogram bars height\n * Only used if annotationsLayout is set to \"histogram\".\n * One of \"absolute\" or \"relative\".\n *\n * \"absolute\": sets bar height relative to tallest bar in all chromosomes.\n * \"relative\": sets bar height relative to tallest bar in each chromosome.\n */\n histogramScaling: PropTypes.oneOf(['absolute', 'relative']),\n\n /**\n * Pixel width of histogram bars.\n * Only used if annotationsLayout is set to \"histogram\".\n **/\n barWidth: PropTypes.number,\n\n /**\n * Whether to show a tooltip upon mousing over an annotation.\n */\n showAnnotTooltip: PropTypes.bool,\n\n /**\n * Default: latest RefSeq assembly for specified organism.\n * The genome assembly to display.\n * Takes assembly name (e.g., \"GRCh37\"),\n * RefSeq accession (e.g., \"GCF_000306695.2\"),\n * or GenBank accession (e.g., \"GCA_000005005.5\")\n */\n assembly: PropTypes.string,\n\n /**\n * Genomic coordinate range (e.g., \"chr1:104325484-119977655\") for a brush on a\n * chromosome. Useful when ideogram consists of one chromosome and you want to be\n * able to focus on a region within that chromosome,\n * and create an interactive sliding window to other regions\n */\n\n brush: PropTypes.string,\n\n /**\n * A dash callback that is activated when the 'brush' prop is used.\n * It will return an dictionary like so:\n * {'start': , 'end': , 'extent': }\n * where start is the left most edge, end is right most edge, and extent is the total width of\n * the brush.\n * It is read-only, i.e., it cannot be used with dash.dependencies.Output but only with\n * dash.dependencies.Input\n */\n brushData: PropTypes.shape({\n start: PropTypes.string,\n end: PropTypes.string,\n extent: PropTypes.string,\n }),\n\n /**\n * CSS styling and the id of the container holding the Ideogram in\n * react-ideogram.js, this is where all the d3 magic happens.\n */\n container: PropTypes.string,\n\n /**\n * The pixel height of the tallest chromosome in the ideogram\n */\n chrHeight: PropTypes.number,\n\n /**\n * The pixel space of margin between each chromosome.\n */\n chrMargin: PropTypes.number,\n\n /**\n * The pixel width of each chromosome.\n */\n chrWidth: PropTypes.number,\n\n /**\n * A list of the names of chromosomes to display. Useful for depicting a subset of the\n * chromosomes in the genome, e.g., a single chromosome.\n *\n * If Homology (between two different species):\n * Ex: chromosomes={\n * 'human': ['1'],\n * 'mouse': ['4']\n * }\n *\n * General case to specify specific chromosomes:\n * Ex: chromosomes=['1', '2']\n */\n chromosomes: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.string),\n PropTypes.object,\n ]),\n\n /**\n * Absolute or relative URL of the directory containing data needed to draw banded chromosomes.\n * You will need to set up your own database to grab data from a custom database.\n */\n dataDir: PropTypes.string,\n\n /**\n * Organism(s) to show chromosomes for. Supply organism's name as a string (e.g., \"human\") or\n * organism's NCBI Taxonomy ID (taxid, e.g., 9606) to display chromosomes from a single\n * organism, or an array of organisms' names or taxids to display chromosomes from multiple\n * species.\n */\n organism: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n\n /**\n * Provide local JSON organism into this prop from a local user JSON file.\n * DataDir must not be initialized.\n */\n localOrganism: PropTypes.object,\n\n /**\n * Used to compare two chromosomes.\n * The keys \"chrOne\" and \"chrTwo\" represent one chromosome each. Organism is the taxID or name.\n * Start is an array, containing start one and start two, in this order. Stop is an array,\n * containing stop one, and stop two, in this order.\n * Ex: homology={\n * \"chrOne\": {\n * organism\": \"9606\",\n * \"start\": [50000, 155701383],\n * \"stop\": [900000, 156030895]\n * },\n * \"chrTwo\": {\n * organism\": \"10090\",\n * \"start\": [10001, 50000000],\n * \"stop\": [2781479, 57217415]\n * }\n * }\n */\n homology: PropTypes.shape({\n chrOne: PropTypes.shape({\n organism: PropTypes.string.isRequired,\n start: PropTypes.arrayOf(PropTypes.number.isRequired),\n stop: PropTypes.arrayOf(PropTypes.number.isRequired),\n }),\n chrTwo: PropTypes.shape({\n organism: PropTypes.string.isRequired,\n start: PropTypes.arrayOf(PropTypes.number.isRequired),\n stop: PropTypes.arrayOf(PropTypes.number.isRequired),\n }),\n }),\n\n /**\n * Use perspective: 'comparative' to enable annotations between two chromosomes,\n * either within the same organism or different organisms. Used for homology.\n */\n perspective: PropTypes.oneOf(['comparative']),\n\n /**\n * Whether to include abbreviation species name in chromosome label. Used for homology.\n */\n fullChromosomeLabels: PropTypes.bool,\n\n /**\n * The resolution of cytogenetic bands to show for each chromosome.\n * The quantity refers to an approximate value in bands per haploid set (bphs).\n * One of 450, 550, or 850.\n */\n resolution: PropTypes.number,\n\n /**\n * Whether annotations should be filterable or not.\n */\n filterable: PropTypes.bool,\n\n /**\n * The orientation of chromosomes on the page.\n */\n orientation: PropTypes.oneOf(['vertical', 'horizontal']),\n\n /**\n * The ploidy - number of chromosomes to depict for each chromosome set.\n */\n ploidy: PropTypes.number,\n\n /**\n * Description of ploidy in each chromosome set in terms of ancestry composition.\n */\n ploidyDesc: PropTypes.arrayOf(PropTypes.object),\n\n /**\n * A map associating ancestor labels to colors. Used to color\n * chromosomes from different ancestors in polyploid genomes.\n */\n ancestors: PropTypes.object,\n\n /**\n * List of objects describing segments of recombination among chromosomes in a chromosome set.\n */\n rangeSet: PropTypes.arrayOf(PropTypes.object),\n\n /**\n * Whether chromosomes are rotatable on click.\n */\n rotatable: PropTypes.bool,\n\n /**\n * Dash callback that returns true if rotated, and false if not.\n *\n */\n rotated: PropTypes.bool,\n\n /**\n * Useful for omitting chromosome Y in female animals.\n * Currently only supported for organisms that use XY sex-determination.\n */\n sex: PropTypes.oneOf(['male', 'female']),\n\n /**\n * Whether to show chromosome labels, e.g., 1, 2, 3, X, Y.\n */\n showChromosomeLabels: PropTypes.bool,\n\n /**\n * Whether to show cytogenetic band labels, e.g., 1q21.\n **/\n showBandLabels: PropTypes.bool,\n\n /**\n * Whether to show fully banded chromosomes for genomes that have sufficient data. Useful for\n * showing simpler chromosomes of cytogenetically well-characterized organisms, e.g., human,\n * beside chromosomes of less studied organisms, e.g., chimpanzee.\n */\n showFullyBanded: PropTypes.bool,\n\n /**\n * Whether to show non-nuclear chromosomes,\n * e.g., for mitochondrial (MT) and chloroplast (CP) DNA.\n */\n showNonNuclearChromosomes: PropTypes.bool,\n\n /**\n * Callback function to invoke after chromosome has rotated. (React)\n * onDidRotate: PropTypes.func,\n */\n\n /**\n * Dash event callback for hovering over data.\n * onMouseOver: PropTypes.func,\n */\n\n /**\n * Callback function to invoke when brush moves.\n * onBrushMove: PropTypes.func,\n */\n\n /**\n * Callback function to invoke when annotations are drawn. (React)\n * onDrawAnnots: PropTypes.func,\n */\n\n /**\n * Callback function to invoke when chromosomes are loaded,\n * i.e., rendered on the page. (React)\n * onLoad: PropTypes.func,\n */\n\n /**\n * Useful for putting ideogram into a small container,\n * or when dealing with genomes that have many chromosomes.\n * Note: Not fully working, needs to be fixed by developer.\n * rows: PropTypes.number,\n */\n\n /**\n * This is a work in progess and will hopefully be fixed in future releases.\n * https://eweitz.github.io/ideogram/annotations-heatmap\n * heatmaps: PropTypes.arrayOf(PropTypes.object),\n */\n};\n\nexport const defaultProps = Ideogram.defaultProps;\nexport const propTypes = Ideogram.propTypes;\n","import React, {Component, lazy, Suspense} from 'react';\nimport LazyLoader from '../LazyLoader';\nimport PropTypes from 'prop-types';\n\nconst RealIgv = lazy(LazyLoader.igv);\n/**\n * The Igv component is an interactive genome visualization component\n * developed by the Integrative Genomics Viewer (IGV) team. It uses an\n * example integration of igv.js and React (https://www.npmjs.com/package/igv).\n */\nexport default class Igv extends Component {\n render() {\n return (\n \n \n \n );\n }\n}\n\nIgv.defaultProps = {};\n\nIgv.propTypes = {\n /**\n * The ID of this component, used to identify dash components in callbacks.\n * The ID needs to be unique across all of the components in an app.\n */\n id: PropTypes.string,\n\n /**\n * Dash-assigned callback that should be called to report property changes\n * to Dash, to make them available for callbacks.\n */\n setProps: PropTypes.func,\n\n /**\n * Generic style overrides on the plot div\n */\n style: PropTypes.object,\n\n /**\n * className of the component div.\n */\n className: PropTypes.string,\n\n /**\n String identifier defining genome (e.g. \"hg19\"). See https://github.com/igvteam/igv.js/wiki/Reference-Genome\n for details and list of supported identifiers. Note: One (but only one) of\n either genome or reference properties must be set. If both are set,\n the genome property will be ignored.\n */\n\n genome: PropTypes.string,\n\n /**\n Object defining reference genome. see https://github.com/igvteam/igv.js/wiki/Reference-Genome\n Note: One (but only one) of either genome or reference properties must be set. If both are set,\n the genome property will be ignored.\n */\n reference: PropTypes.object,\n\n /**\n Initial genomic location(s). Either a string or an array of strings.\n If an array a viewport is created for each location.\n */\n locus: PropTypes.string,\n\n /**\n * Minimum window size in base pairs when zooming in\n */\n minimumBases: PropTypes.number,\n\n /**\n Array of configuration objects defining tracks initially displayed when app launches.\n see https://github.com/igvteam/igv.js/wiki/Tracks-2.0\n */\n tracks: PropTypes.array,\n};\n\nexport const defaultProps = Igv.defaultProps;\nexport const propTypes = Igv.propTypes;\n","import React, {Component, lazy, Suspense} from 'react';\nimport LazyLoader from '../LazyLoader';\nimport PropTypes from 'prop-types';\n\nconst RealPileup = lazy(LazyLoader.pileup);\n/**\n * The Pileup component is a genome visualization component\n * developed by the the Hammerlab. It uses an\n * example integration of pileup.js and React (https://www.npmjs.com/package/pileup).\n */\nexport default class Pileup extends Component {\n render() {\n return (\n \n \n \n );\n }\n}\n\nPileup.defaultProps = {};\n\nPileup.propTypes = {\n /**\n * The ID of this component, used to identify dash components in callbacks.\n * The ID needs to be unique across all of the components in an app.\n */\n id: PropTypes.string,\n\n /**\n * Dash-assigned callback that should be called to report property changes\n * to Dash, to make them available for callbacks.\n */\n setProps: PropTypes.func,\n\n /**\n * Generic style overrides on the plot div\n */\n style: PropTypes.object,\n\n /**\n * className of the component div.\n */\n className: PropTypes.string,\n\n /**\n Object defining genomic location.\n Of the format: {contig: 'chr17', start: 7512384, stop: 7512544}\n */\n range: PropTypes.exact({\n /**\n * Name of contig to display. (ie. chr17)\n */\n contig: PropTypes.string,\n\n /**\n * Start location to display\n */\n start: PropTypes.number,\n\n /**\n * Stop location to display\n */\n stop: PropTypes.number,\n }),\n\n /**\n Object defining genomic reference.\n */\n reference: PropTypes.exact({\n /**\n * Label to display by reference\n */\n label: PropTypes.string,\n\n /**\n * Url of 2bit file.\n https://genome.ucsc.edu/goldenPath/help/twoBit.html\n */\n url: PropTypes.string,\n }),\n\n /**\n Array of configuration objects defining tracks initially displayed when app launches.\n See https://github.com/hammerlab/pileup.js#usage\n */\n tracks: PropTypes.arrayOf(\n PropTypes.exact({\n /**\n * Name of visualization. Must be one of\n (coverage, genome, genes, features, idiogram, location, scale,\n variants, genotypes, or pileup). For more info on visualization\n types supported by pileup.js see https://github.com/akmorrow13/pileup.js/blob/master/src/main/pileup.js.\n\n */\n\n viz: PropTypes.oneOf([\n 'coverage',\n 'genome',\n 'genes',\n 'features',\n 'idiogram',\n 'location',\n 'scale',\n 'variants',\n 'genotypes',\n 'pileup',\n ]),\n\n /**\n * Options that define viz details.\n Options depend on the viz type selected.\n */\n vizOptions: PropTypes.Object,\n\n /**\n * Label to display by track\n */\n label: PropTypes.string,\n\n /**\n * Data source to visualize. Must be one of\n (bam, vcf, alignmentJson, variantJson, featureJson, idiogramJson, cytoBand,\n vcf, twoBit, bigBed, GAReadAlignment, GAVariant, GAFeature, GAGene). For more info on\n data source types supported by pileup.js see https://github.com/hammerlab/pileup.js/blob/master/src/main/pileup.js\n */\n source: PropTypes.oneOf([\n 'bam',\n 'alignmentJson',\n 'variantJson',\n 'featureJson',\n 'idiogramJson',\n 'cytoBand',\n 'vcf',\n 'twoBit',\n 'bigBed',\n 'GAReadAlignment',\n 'GAVariant',\n 'GAFeature',\n 'GAGene',\n ]),\n\n /**\n * Options that define data source.\n Options depend on the source selected.\n */\n sourceOptions: PropTypes.Object,\n })\n ),\n};\n\nexport const defaultProps = Pileup.defaultProps;\nexport const propTypes = Pileup.propTypes;\n","import PropTypes from 'prop-types';\nimport React, {Component, lazy, Suspense} from 'react';\nimport LazyLoader from '../LazyLoader';\n\nconst RealMolecule2dViewer = lazy(LazyLoader.molecule2dViewer);\n\n/**\n * The Molecule2dViewer component is used to render structural\n * formulae of molecules.\n * Read more about the component here:\n * https://github.com/Autodesk/molecule-2d-for-react\n */\nexport default class Molecule2dViewer extends Component {\n render() {\n return (\n \n \n \n );\n }\n}\n\nMolecule2dViewer.defaultProps = {\n width: 500,\n height: 500,\n modelData: {\n nodes: [],\n links: [],\n },\n};\n\nMolecule2dViewer.propTypes = {\n /**\n * The ID used to identify this component in callbacks.\n */\n id: PropTypes.string,\n\n /**\n * Dash-assigned callback that should be called whenever properties change.\n */\n setProps: PropTypes.func,\n\n /**\n * The selected atom IDs.\n */\n selectedAtomIds: PropTypes.arrayOf(PropTypes.number),\n\n /**\n * The width of the SVG element.\n */\n width: PropTypes.number,\n\n /**\n * The height of the SVG element.\n */\n height: PropTypes.number,\n\n /**\n * Description of the molecule to display.\n */\n modelData: PropTypes.shape({\n nodes: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.number,\n atom: PropTypes.string,\n })\n ),\n links: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.number,\n source: PropTypes.number | PropTypes.shape,\n target: PropTypes.number | PropTypes.shape,\n bond: PropTypes.number,\n strength: PropTypes.number,\n distance: PropTypes.number,\n })\n ),\n }),\n};\n\nexport const defaultProps = Molecule2dViewer.defaultProps;\nexport const propTypes = Molecule2dViewer.propTypes;\n","import PropTypes from 'prop-types';\nimport React, {Component, lazy, Suspense} from 'react';\nimport LazyLoader from '../LazyLoader';\n\nconst RealMolecule3dViewer = lazy(LazyLoader.molecule3dViewer);\n\n/**\n * The Molecule3dViewer component is used to render schematic diagrams\n * of biomolecules. It can display ribbon-structure diagrams, or\n * render atoms in the molecule as sticks or spheres.\n * Read more about the component here:\n * https://github.com/Autodesk/molecule-3d-for-react\n */\nexport default class Molecule3dViewer extends Component {\n render() {\n return (\n \n \n \n );\n }\n}\n\nMolecule3dViewer.defaultProps = {\n selectionType: 'atom',\n backgroundColor: '#FFFFFF',\n backgroundOpacity: 0,\n zoom: {\n factor: 0.8,\n animationDuration: 0,\n fixedPath: false,\n },\n zoomTo: {\n sel: {},\n animationDuration: 0,\n fixedPath: false,\n },\n};\n\nMolecule3dViewer.propTypes = {\n /**\n * The ID used to identify this component in callbacks\n */\n id: PropTypes.string,\n\n /**\n * Dash-assigned callback that should be called whenever properties change\n */\n setProps: PropTypes.func,\n\n /**\n * The selection type - may be atom, residue or chain\n */\n selectionType: PropTypes.oneOf(['atom', 'residue', 'chain']),\n\n /**\n * Property to change the background color of the molecule viewer\n */\n backgroundColor: PropTypes.string,\n\n /**\n * Property to change the background opacity - ranges from 0 to 1\n */\n backgroundOpacity: PropTypes.number,\n\n /**\n * Property that can be used to change the representation of\n * the molecule. Options include sticks, cartoon and sphere\n */\n styles: PropTypes.arrayOf(\n PropTypes.shape({\n color: PropTypes.string,\n visualization_type: PropTypes.oneOf(['cartoon', 'sphere', 'stick']),\n })\n ),\n\n /**\n * The data that will be used to display the molecule in 3D\n * The data will be in JSON format\n * and should have two main dictionaries - atoms, bonds\n */\n modelData: PropTypes.shape({\n atoms: PropTypes.array,\n bonds: PropTypes.array,\n }),\n\n /**\n * Property to either show or hide labels\n */\n atomLabelsShown: PropTypes.bool,\n\n /**\n * Property that stores a list of all selected atoms\n */\n selectedAtomIds: PropTypes.array,\n\n /**\n * Labels corresponding to the atoms of the molecule.\n * Each label has a `text` field, a string containing the label content,\n * and can have many other styling fields as described in\n * https://3dmol.csb.pitt.edu/doc/types.html#LabelSpec\n */\n labels: PropTypes.arrayOf(PropTypes.object),\n\n /**\n * Add an isosurface from volumetric data provided in the `cube_file`\n */\n orbital: PropTypes.exact({\n /**\n * The filepath containing raw volumetric data for vertex coloring\n */\n cube_file: PropTypes.string,\n /**\n * The isovalue to draw the surface at\n */\n iso_val: PropTypes.number,\n /**\n * Transparency of the surface, between 0 and 1\n */\n opacity: PropTypes.number,\n /**\n * Color for the positive value of the isosurface orbital\n */\n positiveVolumetricColor: PropTypes.string,\n /**\n * Color for the negative value of the isosurface orbital\n */\n negativeVolumetricColor: PropTypes.string,\n }),\n\n /**\n * Zoom the current view by a constant factor, with optional parameters\n * to modify the duration and motion of the zoom animation.\n */\n zoom: PropTypes.exact({\n /**\n * Magnification factor. Values greater than 1 will zoom,\n * in, less than one will zoom out. Default 2.\n */\n factor: PropTypes.number,\n /**\n * An optional parameter that denotes the duration of a\n * zoom animation, in milliseconds.\n */\n animationDuration: PropTypes.number,\n /**\n * If true, animation is constrained to requested motion,\n * overriding updates that happen during the animation.\n */\n fixedPath: PropTypes.bool,\n }),\n\n /**\n * Zoom to center of atom selection.\n */\n zoomTo: PropTypes.exact({\n /**\n * Selection specification specifying model and atom properties\n * to select. Default: all atoms in viewer.\n */\n sel: PropTypes.exact({\n /**\n * Chain that the residue is located on.\n */\n chain: PropTypes.string,\n /**\n * The index value used to identify the residue;\n * residues are numbered sequentially starting from 1.\n */\n resi: PropTypes.number,\n }),\n /**\n * An optional parameter that denotes the duration of a zoom animation\n * , in milliseconds.\n */\n animationDuration: PropTypes.number,\n /**\n * If true, animation is constrained to requested motion,\n * overriding updates that happen during the animation.\n */\n fixedPath: PropTypes.bool,\n }),\n\n /**\n * Add a predefined renderable shape objects to the molecule.\n * Valid shape types are Arrow, Sphere, and Cylinder.\n */\n shapes: PropTypes.arrayOf(PropTypes.object),\n\n /**\n * Callback to re-render molecule viewer\n * when modelData is changed\n */\n onRenderNewData: PropTypes.func,\n\n /**\n * Callback to change append selectedAtomIds\n * when a selection is made\n */\n onChangeSelection: PropTypes.func,\n};\n\nexport const defaultProps = Molecule3dViewer.defaultProps;\nexport const propTypes = Molecule3dViewer.propTypes;\n","import PropTypes from 'prop-types';\nimport React, {Component, lazy, Suspense} from 'react';\nimport LazyLoader from '../LazyLoader';\n\nconst RealNeedlePlot = lazy(LazyLoader.needlePlot);\n\n/**\n * The Needle Plot component is used to visualize large datasets\n * containing categorical or numerical data. The lines and markers in\n * the plot correspond to bars in a histogram.\n **/\nexport default class NeedlePlot extends Component {\n render() {\n return (\n \n \n \n );\n }\n}\n\nNeedlePlot.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n id: PropTypes.string,\n\n /**\n * The data that are displayed on the plot\n */\n mutationData: PropTypes.shape({\n /*\n coordinate of mutations on the protein sequence\n */\n x: PropTypes.oneOfType([PropTypes.string, PropTypes.array]),\n /* value (could be the sample count), this property is not necessarily\n relevant, should match x in size\n */\n y: PropTypes.oneOfType([PropTypes.string, PropTypes.array]),\n /*\n type of mutations, should match x in size\n */\n mutationGroups: PropTypes.arrayOf(PropTypes.string),\n /*\n protein domains coordinates on the protein sequence\n */\n domains: PropTypes.array,\n }),\n\n /**\n * Margins of the plot\n */\n margin: PropTypes.object,\n\n /**\n * Title of the x-axis.\n **/\n xlabel: PropTypes.string,\n\n /**\n * Title of the y-axis.\n **/\n ylabel: PropTypes.string,\n\n /**\n * If true, enables a rangeslider for the x-axis.\n **/\n rangeSlider: PropTypes.bool,\n\n /**\n * Options for the needle marking single site mutations\n */\n needleStyle: PropTypes.shape({\n // Color of the stems of the needles\n stemColor: PropTypes.string,\n // Thickness of the stems of the needles\n stemThickness: PropTypes.number,\n // Decides whether all stems have same height or not\n stemConstHeight: PropTypes.bool,\n // Size of the heads of the needlehead\n headSize: PropTypes.number,\n // Color of the heads of the needlehead\n headColor: PropTypes.oneOfType([\n /* different color for different mutations, must be larger or\n\t equal to the size of the mutationGroup prop\n\t */\n PropTypes.array,\n // same color for all needles\n PropTypes.string,\n ]),\n // Style of the heads of the needlehead\n headSymbol: PropTypes.oneOfType([\n /* different marker for different mutations, must be larger or\n\t equal to the size of the mutationGroup prop\n\t */\n PropTypes.array,\n // same marker for all needles\n PropTypes.string,\n ]),\n }),\n\n /**\n * Options for the protein domain coloring\n */\n domainStyle: PropTypes.shape({\n // Color of the protein domains\n domainColor: PropTypes.array,\n /**\n * The prop x sometimes contains smaller domains (e.g. multi-site\n mutations), if true, these are displayed\n */\n displayMinorDomains: PropTypes.bool,\n\n /**\n * Sets the angle at which the domain annotation\n * text is drawn with respect to the horizontal.\n */\n textangle: PropTypes.number,\n }),\n\n /**\n * An array of the points on the graph that have been clicked with Plotly.js clickEvents.\n */\n clickData: PropTypes.array,\n\n /**\n * Dash-assigned callback that should be called whenever any of the\n * properties change\n */\n setProps: PropTypes.func,\n};\n\nNeedlePlot.defaultProps = {\n mutationData: {\n x: [],\n y: [],\n domains: [],\n mutationGroups: [],\n },\n rangeSlider: false,\n needleStyle: {\n stemColor: '#444',\n stemThickness: 0.5,\n stemConstHeight: false,\n headSize: 5,\n headColor: [\n '#e41a1c',\n '#377eb8',\n '#4daf4a',\n '#984ea3',\n '#ff7f00',\n '#ffff33',\n '#a65628',\n '#f781bf',\n '#999999',\n '#e41a1c',\n '#377eb8',\n '#4daf4a',\n '#984ea3',\n '#ff7f00',\n '#ffff33',\n '#a65628',\n '#f781bf',\n '#999999',\n '#e41a1c',\n ],\n headSymbol: 'circle',\n },\n domainStyle: {\n displayMinorDomains: false,\n domainColor: [\n '#8dd3c7',\n '#ffffb3',\n '#bebada',\n '#fb8072',\n '#80b1d3',\n '#fdb462',\n '#b3de69',\n '#fccde5',\n '#d9d9d9',\n '#bc80bd',\n '#ccebc5',\n '#ffed6f',\n '#8dd3c7',\n '#ffffb3',\n '#bebada',\n '#fb8072',\n '#80b1d3',\n '#fdb462',\n '#b3de69',\n ],\n textangle: 0,\n },\n margin: {t: 100, l: 40, r: 0, b: 40},\n};\n\nexport const defaultProps = NeedlePlot.defaultProps;\nexport const propTypes = NeedlePlot.propTypes;\n","import React, {Component, lazy, Suspense} from 'react';\nimport LazyLoader from '../LazyLoader';\nimport PropTypes from 'prop-types';\n\nconst RealNglMoleculeViewer = lazy(LazyLoader.nglmoleculeViewer);\n/**\n * The NglMoleculeViewer is used to render schematic diagrams\n * of biomolecules in ribbon-structure representations.\n * Read more about the component here:\n * https://github.com/IvoLeist/dash_ngl\n * Read more about the used WebGL protein viewer here:\n * https://github.com/arose/ngl\n */\nexport default class NglMoleculeViewer extends Component {\n render() {\n return (\n \n \n \n );\n }\n}\n\nconst defaultHeight = '600px';\n\nconst defaultWidth = '600px';\n\nconst defaultStageParameters = {\n quality: 'medium',\n backgroundColor: 'white',\n cameraType: 'perspective',\n};\n\nconst defaultImageParameters = {\n antialias: true,\n transparent: true,\n trim: true,\n defaultFilename: 'dash-bio_ngl_output',\n};\n\nconst defaultData = [\n {\n filename: 'placeholder',\n ext: '',\n selectedValue: 'placeholder',\n chain: 'ALL',\n aaRange: 'ALL',\n chosen: {\n chosenAtoms: '',\n chosenResidues: '',\n },\n color: 'red',\n config: {\n input: '',\n type: 'text/plain',\n },\n uploaded: false,\n resetView: false,\n },\n];\n\nNglMoleculeViewer.defaultProps = {\n data: defaultData,\n width: defaultWidth,\n height: defaultHeight,\n stageParameters: defaultStageParameters,\n imageParameters: defaultImageParameters,\n downloadImage: false,\n molStyles: {\n representations: ['cartoon', 'axes+box'],\n chosenAtomsColor: '#ffffff',\n chosenAtomsRadius: 1,\n molSpacingXaxis: 100,\n sideByside: false,\n },\n};\n\nNglMoleculeViewer.propTypes = {\n /**\n * The ID of this component, used to identify dash components in callbacks.\n * The ID needs to be unique across all of the components in an app.\n */\n id: PropTypes.string,\n\n /**\n * Dash-assigned callback that should be called whenever properties change.\n */\n setProps: PropTypes.func,\n\n /**\n * The width (in px or as a number) of the container\n * in which the molecules will be displayed.\n */\n width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n\n /**\n * The height (in px or as a number) of the container\n * in which the molecules will be displayed.\n */\n height: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n\n /**\n * Parameters (in JSON format) for the stage object of ngl.\n * Currently implemented are render quality, background color and camera type\n * quality: auto, low, medium, high (default: auto)\n * backgroundColor: white / black (default: white)\n * cameraType: perspective / orthographic (default: perspective)\n */\n stageParameters: PropTypes.exact({\n quality: PropTypes.string,\n backgroundColor: PropTypes.string,\n cameraType: PropTypes.string,\n }),\n\n /**\n * Parameters (in JSON format) for exporting the image\n */\n imageParameters: PropTypes.exact({\n antialias: PropTypes.bool,\n transparent: PropTypes.bool,\n trim: PropTypes.bool,\n defaultFilename: PropTypes.string,\n }),\n\n /**\n * flag if download image was selected\n */\n downloadImage: PropTypes.bool,\n\n /**\n * Variable which defines how many molecules should be shown and/or which chain\n * The following format needs to be used:\n * pdbID1.chain:start-end@atom1,atom2_pdbID2.chain:start-end\n * . indicates that only one chain should be shown\n * : indicates that a specific amino acids range should be shown (e.g. 1-50)\n * @ indicates that chosen atoms should be highlighted (e.g. @50,100,150)\n * _ indicates that more than one protein should be shown\n */\n pdbString: PropTypes.string,\n\n /**\n * The data (in JSON format) that will be used to display the molecule\n * filename: name of the used pdb/cif file\n * ext: file extensions (pdb or cif)\n * selectedValue: pdbString\n * chain: ALL if the whole molecule shoud be displayed, e.g. A for showing only chain A\n * aaRange: ALL if the whole molecule should be displayed, e.g. 1:50 for showing only 50 atoms\n * color: chain color\n * chosen.atoms: string of the chosen Atoms, e.g. 50,100,150\n * --> chosen eatoms changed to colored 'ball'\n * chosen.residues: string of the chosen residues, e.g. 50,100,150\n * --> C alpha of chosen residue changed to colored 'ball'\n * config.input: content of the pdb file\n * config.type: format of config.input\n * uploaded: bool if file from local storage (false) or uploaded by user (true)\n * resetView: bool if the selection did not change but the view should be resettet (true)\n */\n data: PropTypes.arrayOf(\n PropTypes.exact({\n filename: PropTypes.string.isRequired,\n ext: PropTypes.string,\n selectedValue: PropTypes.string.isRequired,\n chain: PropTypes.string.isRequired,\n aaRange: PropTypes.string.isRequired,\n color: PropTypes.string.isRequired,\n chosen: PropTypes.exact({\n residues: PropTypes.string.isRequired,\n atoms: PropTypes.string.isRequired,\n }),\n config: PropTypes.exact({\n input: PropTypes.string.isRequired,\n type: PropTypes.string.isRequired,\n }),\n uploaded: PropTypes.bool.isRequired,\n resetView: PropTypes.bool.isRequired,\n })\n ),\n /**\n * The data (in JSON format) that will be used to style the displayed molecule\n * representations: one or multiple selected molecule representation\n * - Possible molecule styles:\n * 'backbone,'ball+stick','cartoon', 'hyperball','licorice','line',\n * 'ribbon',''rope','spacefill','surface','trace','tube'\n * - Possible additional representations:\n * 'axes','axes+box','helixorient','unitcell'\n * chosenAtomsColor: color of the 'ball+stick' representation of the chosen atoms\n * chosenAtomsRadius: radius of the 'ball+stick' representation of the chosen atoms\n * molSpacingXaxis: distance on the xAxis between each molecule\n */\n molStyles: PropTypes.exact({\n representations: PropTypes.arrayOf(PropTypes.string),\n chosenAtomsColor: PropTypes.string.isRequired,\n chosenAtomsRadius: PropTypes.number.isRequired,\n molSpacingXaxis: PropTypes.number.isRequired,\n sideByside: PropTypes.bool.isRequired,\n }),\n};\n\nexport const defaultProps = NglMoleculeViewer.defaultProps;\nexport const propTypes = NglMoleculeViewer.propTypes;\n","import PropTypes from 'prop-types';\nimport React, {Component, lazy, Suspense} from 'react';\nimport LazyLoader from '../LazyLoader';\n\nconst RealOncoPrint = lazy(LazyLoader.oncoPrint);\n\n/**\n * The OncoPrint component is used to view multiple genetic alteration events\n * through an interactive and zoomable heatmap. It is a React/Dash port of the\n * popular oncoPrint() function from the BioConductor R package.\n * Under the hood, the rendering is done using Plotly.js built upon D3.\n * Plotly's interactivity allows the user to bind clicks and hovers to genetic\n * events, allowing the user to create complex bioinformatic apps or workflows\n * that rely on crossfiltering.\n * Read more about the component here:\n * https://github.com/plotly/react-oncoprint\n */\nexport default class OncoPrint extends Component {\n render() {\n return (\n \n \n \n );\n }\n}\n\nOncoPrint.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique to the component.\n */\n id: PropTypes.string,\n\n /**\n * Dash-assigned callback that should be called whenever any of the\n * properties change.\n */\n setProps: PropTypes.func,\n\n /**\n * A Dash prop that returns data on clicking, hovering or resizing the viewer.\n */\n eventDatum: PropTypes.object,\n\n /**\n * Input data, in CBioPortal format where each list entry is a dict\n * consisting of 'sample', 'gene', 'alteration', and 'type'\n */\n data: PropTypes.array,\n\n // TODO: Add remove empty columns prop\n\n /**\n * Adjusts the padding (as a proportion of whitespace) between two tracks.\n * Value is a ratio between 0 and 1.\n * Defaults to 0.05 (i.e., 5 percent). If set to 0, plot will look like a heatmap.\n */\n padding: PropTypes.number,\n\n /**\n * If not null, will override the default OncoPrint colorscale.\n * Default OncoPrint colorscale same as CBioPortal implementation.\n * Make your own colrscale as a {'mutation': COLOR} dict.\n * Supported mutation keys are ['MISSENSE, 'INFRAME', 'FUSION',\n * 'AMP', 'GAIN', 'HETLOSS', 'HMODEL', 'UP', 'DOWN']\n * Note that this is NOT a standard plotly colorscale.\n */\n colorscale: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),\n\n /**\n * Default color for the tracks, in common name, hex, rgb or rgba format.\n * If left blank, will default to a light grey rgb(190, 190, 190).\n */\n backgroundcolor: PropTypes.string,\n\n /**\n *.Toogles whether or not to show a legend on the right side of the plot,\n * with mutation information.\n */\n range: PropTypes.array,\n\n /**\n *.Toogles whether or not to show a legend on the right side of the plot,\n * with mutation information.\n */\n showlegend: PropTypes.bool,\n\n /**\n *.Toogles whether or not to show a heatmap overview of the tracks.\n */\n showoverview: PropTypes.bool,\n\n /**\n * Width of the OncoPrint.\n * Will disable auto-resizing of plots if set.\n */\n width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Height of the OncoPrint.\n * Will disable auto-resizing of plots if set.\n */\n height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n};\n\nOncoPrint.defaultProps = {\n // Layout\n padding: 0.05,\n colorscale: null,\n backgroundcolor: 'rgb(190, 190, 190)',\n range: [null, null],\n showlegend: true,\n showoverview: true,\n width: null,\n height: 500,\n};\n\nexport const defaultProps = OncoPrint.defaultProps;\nexport const propTypes = OncoPrint.propTypes;\n","import PropTypes from 'prop-types';\nimport React, {Component, lazy, Suspense} from 'react';\nimport LazyLoader from '../LazyLoader';\n\nconst RealSequenceViewer = lazy(LazyLoader.sequenceViewer);\n\n/**\n * The sequence viewer component is used to display sequences\n * that represent proteins, strands of genomic information, and\n * more. It can apply a coverage to the sequence supplied (with\n * clickable coverage sections that can display specific information,\n * and an optional legend to describe the color codes used),\n * search through the sequence for specific regex, capture\n * mouse selection events of subparts of the sequence, display a\n * count of the number of nucleotides or amino acids in the\n * sequence,\n * Read more about the component here:\n * https://github.com/FlyBase/react-sequence-viewer\n */\nexport default class SequenceViewer extends Component {\n render() {\n return (\n \n \n \n );\n }\n}\n\nSequenceViewer.defaultProps = {\n sequence: '-',\n showLineNumbers: true,\n wrapAminoAcids: true,\n charsPerLine: 40,\n toolbar: false,\n search: true,\n title: '',\n sequenceMaxHeight: '400px',\n badge: true,\n selection: [],\n coverage: [],\n};\n\n/* eslint-disable consistent-return, no-unused-vars */\n\nSequenceViewer.propTypes = {\n /**\n * The ID used to identify this component in Dash callbacks.\n */\n id: PropTypes.string,\n\n /**\n * The amino acid sequence that will be displayed.\n */\n\n sequence: PropTypes.string,\n\n /**\n * The option of whether or not to display line numbers.\n */\n showLineNumbers: PropTypes.bool,\n\n /**\n * The option of whether or not to display the list of amino acids\n * as broken up into separate lines of a fixed length set by\n * charsPerLine.\n */\n wrapAminoAcids: PropTypes.bool,\n\n /**\n * The number of amino acids that will display per line.\n */\n charsPerLine: PropTypes.number,\n\n /**\n * The option of whether or not to display a toolbar at the top\n * that allows the user to choose the number of letters per line.\n */\n toolbar: PropTypes.bool,\n\n /**\n * The option of whether or not to include a search bar in\n * the header. This supports regex.\n */\n search: PropTypes.bool,\n\n /**\n * A string that displays at the top of the component.\n */\n title: PropTypes.string,\n\n /**\n * The maximum height of the sequence.\n */\n sequenceMaxHeight: PropTypes.string,\n\n /**\n * The option of whether or not to display a badge showing the\n * amino acid count at the top of the component beside the title.\n */\n badge: PropTypes.bool,\n\n /**\n * A highlighted section of the sequence; the color of the highlight\n * can also be defined. Takes a list of format [min, max, color] where\n * min is a number that represents the starting index of the selection,\n * max is a number that represents the stopping index of the selection,\n * and color is a string that defines the highlight color.\n * Cannot be used at the same time as coverage.\n */\n selection: function(props, propName, componentName) {\n if (\n props[propName] !== undefined &&\n ((typeof props[propName][0] !== 'undefined' &&\n typeof props[propName][0] !== 'number') ||\n (typeof props[propName][1] !== 'undefined' &&\n typeof props[propName][1] !== 'number') ||\n (typeof props[propName][2] !== 'undefined' &&\n typeof props[propName][2] !== 'string'))\n ) {\n return new Error(\n 'Invalid prop value. Selection should be an array with type [number, number, string].'\n );\n }\n },\n\n /**\n * A coverage of the entire sequence; each section of the sequence\n * can have its own text color, background color, tooltip (on hover),\n * and an optional underscore. The props start and end represent the\n * beginning and terminating indices of the section in question.\n * Cannot be used at the same time as selection.\n */\n coverage: PropTypes.arrayOf(\n PropTypes.shape({\n start: PropTypes.number,\n end: PropTypes.number,\n color: PropTypes.string,\n bgcolor: PropTypes.string,\n tooltip: PropTypes.string,\n underscore: PropTypes.bool,\n onclick: PropTypes.func,\n })\n ),\n\n /**\n * A legend corresponding to the color codes above (optionally displayed).\n */\n legend: PropTypes.arrayOf(\n PropTypes.shape({\n name: PropTypes.string,\n color: PropTypes.string,\n underscore: PropTypes.bool,\n })\n ),\n\n /**\n * Contains the index of the section that was clicked last in\n * the coverage list supplied.\n */\n\n coverageClicked: PropTypes.number,\n\n /**\n * Contains information about the subsequence selected\n * by the mouse. Start and end refer to the initial and\n * final indices, respectively, of the subsequence, and\n * \"selection\" contains the string that is selected.\n */\n mouseSelection: PropTypes.shape({\n start: PropTypes.number,\n end: PropTypes.number,\n selection: PropTypes.string,\n }),\n\n /**\n * A list of the subparts selected using the\n * \"search\" function or the \"selection\" property.\n */\n subpartSelected: PropTypes.arrayOf(\n PropTypes.shape({\n start: PropTypes.number,\n end: PropTypes.number,\n sequence: PropTypes.string,\n })\n ),\n\n /**\n * Dash-assigned callback that should be called whenever any of the\n * properties change.\n */\n setProps: PropTypes.func,\n};\n\nexport const defaultProps = SequenceViewer.defaultProps;\nexport const propTypes = SequenceViewer.propTypes;\n","import PropTypes from 'prop-types';\nimport React, {Component, lazy, Suspense} from 'react';\nimport LazyLoader from '../LazyLoader';\n\nimport {speckView} from 'speck';\n\nconst RealSpeck = lazy(LazyLoader.speck);\n\n/**\n * The Speck component is a WebGL-based 3D molecule renderer.\n * Read more about the component here:\n * https://github.com/wwwtyro/speck\n **/\nexport default class Speck extends Component {\n render() {\n return (\n \n \n \n );\n }\n}\n\nSpeck.defaultProps = {\n view: speckView.new(),\n data: [],\n};\n\nSpeck.propTypes = {\n /**\n * The ID used to identify this component in Dash callbacks.\n */\n\n id: PropTypes.string,\n\n /**\n * The xyz file data; a list of atoms such that each atom\n * has a dictionary defining the x, y, and z coordinates\n * along with the atom's symbol.\n */\n\n data: PropTypes.arrayOf(\n PropTypes.shape({\n symbol: PropTypes.string,\n x: PropTypes.number,\n y: PropTypes.number,\n z: PropTypes.number,\n })\n ),\n\n /**\n * The option of whether or not to allow scrolling to control\n * the zoom.\n */\n\n scrollZoom: PropTypes.bool,\n\n /**\n * An object that determines and controls various parameters\n * related to how the molecule is displayed.\n */\n view: PropTypes.shape({\n aspect: PropTypes.number,\n zoom: PropTypes.number,\n translation: PropTypes.shape({\n x: PropTypes.number,\n y: PropTypes.number,\n }),\n atomScale: PropTypes.number,\n relativeAtomScale: PropTypes.number,\n bondScale: PropTypes.number,\n rotation: PropTypes.shape({}),\n ao: PropTypes.number,\n aoRes: PropTypes.number,\n brightness: PropTypes.number,\n outline: PropTypes.number,\n spf: PropTypes.number,\n bonds: PropTypes.bool,\n bondThreshold: PropTypes.number,\n bondShade: PropTypes.number,\n atomShade: PropTypes.number,\n resolution: PropTypes.number,\n dofStrength: PropTypes.number,\n dofPosition: PropTypes.number,\n fxaa: PropTypes.number,\n }),\n\n /**\n * One of several pre-loaded views: default, stick-ball, toon,\n * and licorice\n */\n presetView: PropTypes.oneOf(['default', 'stickball', 'toon', 'licorice']),\n\n /**\n * Dash-assigned callback that should be called whenever any of the\n * properties change.\n */\n\n setProps: PropTypes.func,\n};\n\nexport const defaultProps = Speck.defaultProps;\nexport const propTypes = Speck.propTypes;\n","const speckRenderer = require('../src/renderer.js');\nconst speckSystem = require('../src/system.js');\nconst speckView = require('../src/view.js');\nconst speckInteractions = require('../src/interactions.js');\nconst speckPresetViews = require('../src/presets.js');\n\nmodule.exports = {\n speckRenderer,\n speckSystem,\n speckView,\n speckInteractions,\n speckPresetViews\n}\n","\"use strict\";\n\nvar elements = require(\"./elements\");\n\nvar MIN_ATOM_RADIUS = Infinity;\nvar MAX_ATOM_RADIUS = -Infinity;\nfor (var i = 0; i <= 118; i++) {\n MIN_ATOM_RADIUS = Math.min(MIN_ATOM_RADIUS, elements[i].radius);\n MAX_ATOM_RADIUS = Math.max(MAX_ATOM_RADIUS, elements[i].radius);\n}\n\nmodule.exports.MIN_ATOM_RADIUS = MIN_ATOM_RADIUS;\nmodule.exports.MAX_ATOM_RADIUS = MAX_ATOM_RADIUS;","\"use strict\";\n\nvar glm = require(\"./gl-matrix\")\n\nvar elements = require(\"./elements\");\nvar consts = require(\"./const\");\n\nvar newSystem = module.exports.new = function() {\n return {\n atoms: [],\n farAtom: undefined,\n bonds: []\n }\n};\n\n\nvar calculateBonds = module.exports.calculateBonds = function(s) {\n var bonds = [];\n var sorted = s.atoms.slice();\n sorted.sort(function(a, b) {\n return a.z - b.z;\n });\n for (var i = 0; i < sorted.length; i++) {\n var a = sorted[i];\n var j = i + 1;\n while(j < sorted.length && sorted[j].z < sorted[i].z + 2.5 * 2 * consts.MAX_ATOM_RADIUS) {\n var b = sorted[j];\n var l = glm.vec3.fromValues(a.x, a.y, a.z);\n var m = glm.vec3.fromValues(b.x, b.y, b.z);\n var d = glm.vec3.distance(l, m);\n var ea = elements[a.symbol];\n var eb = elements[b.symbol];\n if (d < 2.5*(ea.radius+eb.radius)) {\n bonds.push({\n posA: {\n x: a.x,\n y: a.y,\n z: a.z\n },\n posB: {\n x: b.x,\n y: b.y,\n z: b.z\n },\n radA: ea.radius,\n radB: eb.radius,\n colA: {\n r: ea.color[0],\n g: ea.color[1],\n b: ea.color[2]\n },\n colB: {\n r: eb.color[0],\n g: eb.color[1],\n b: eb.color[2]\n },\n cutoff: d/(ea.radius+eb.radius)\n });\n }\n j++;\n }\n }\n bonds.sort(function(a, b) {\n return a.cutoff - b.cutoff;\n });\n s.bonds = bonds;\n}\n\n\nvar addAtom = module.exports.addAtom = function(s, symbol, x, y, z) {\n s.atoms.push({\n symbol: symbol,\n x: x,\n y: y,\n z: z,\n });\n};\n\nvar getCentroid = module.exports.getCentroid = function(s) {\n var xsum = 0;\n var ysum = 0;\n var zsum = 0;\n for (var i = 0; i < s.atoms.length; i++) {\n xsum += s.atoms[i].x;\n ysum += s.atoms[i].y;\n zsum += s.atoms[i].z;\n }\n return {\n x: xsum/s.atoms.length,\n y: ysum/s.atoms.length,\n z: zsum/s.atoms.length\n };\n};\n\nvar center = module.exports.center = function(s) {\n var shift = getCentroid(s);\n for (var i = 0; i < s.atoms.length; i++) {\n var atom = s.atoms[i];\n atom.x -= shift.x;\n atom.y -= shift.y;\n atom.z -= shift.z;\n }\n}\n\nvar getFarAtom = module.exports.getFarAtom = function(s) {\n if (s.farAtom !== undefined) {\n return s.farAtom;\n }\n s.farAtom = s.atoms[0];\n var maxd = 0.0;\n for (var i = 0; i < s.atoms.length; i++) {\n var atom = s.atoms[i];\n var r = elements[atom.symbol].radius;\n var rd = Math.sqrt(r*r + r*r + r*r) * 2.5;\n var d = Math.sqrt(atom.x*atom.x + atom.y*atom.y + atom.z*atom.z) + rd;\n if (d > maxd) {\n maxd = d;\n s.farAtom = atom;\n }\n }\n return s.farAtom;\n}\n\nvar getRadius = module.exports.getRadius = function(s) {\n var atom = getFarAtom(s);\n var r = consts.MAX_ATOM_RADIUS;\n var rd = Math.sqrt(r*r + r*r + r*r) * 2.5;\n return Math.sqrt(atom.x*atom.x + atom.y*atom.y + atom.z*atom.z) + rd;\n}\n","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"fornac\"] = factory();\n\telse\n\t\troot[\"fornac\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n\n\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.rnaPlot = exports.RNAGraph = undefined;\n\n\tvar _rnagraph = __webpack_require__(1);\n\n\tObject.defineProperty(exports, 'RNAGraph', {\n\t enumerable: true,\n\t get: function get() {\n\t return _rnagraph.RNAGraph;\n\t }\n\t});\n\n\tvar _rnaplot = __webpack_require__(3);\n\n\tObject.defineProperty(exports, 'rnaPlot', {\n\t enumerable: true,\n\t get: function get() {\n\t return _rnaplot.rnaPlot;\n\t }\n\t});\n\texports.FornaContainer = FornaContainer;\n\n\t__webpack_require__(15);\n\n\tvar _d = __webpack_require__(17);\n\n\tvar _d2 = _interopRequireDefault(_d);\n\n\tvar _simplernaplot = __webpack_require__(4);\n\n\tvar _rnautils = __webpack_require__(2);\n\n\tvar _naview = __webpack_require__(5);\n\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n\tfunction FornaContainer(element, passedOptions) {\n\t var self = this;\n\n\t self.options = {\n\t 'displayAllLinks': false,\n\t 'labelInterval': 10,\n\t 'applyForce': true,\n\t 'chargeDistance': 110,\n\t 'friction': 0.35,\n\t 'middleCharge': -30,\n\t 'otherCharge': -30,\n\t 'linkDistanceMultiplier': 15,\n\t 'initialSize': null,\n\t 'layout': 'standard-polygonal',\n\t 'allowPanningAndZooming': true,\n\t 'transitionDuration': 500,\n\t 'resizeSvgOnResize': true //change the size of the svg when resizing the container\n\t //sometimes its beneficial to turn this off, especially when\n\t //performance is an issue\n\t };\n\n\t if (arguments.length > 1) {\n\t for (var option in passedOptions) {\n\t if (self.options.hasOwnProperty(option)) self.options[option] = passedOptions[option];\n\t }\n\t }\n\n\t if (self.options.initialSize !== null) {\n\t self.options.svgW = self.options.initialSize[0];\n\t self.options.svgH = self.options.initialSize[1];\n\t } else {\n\t self.options.svgW = 800;\n\t self.options.svgH = 800;\n\t }\n\n\t var fill = _d2.default.scale.category20();\n\n\t // mouse event vars\n\t var mousedownLink = null,\n\t mousedownNode = null,\n\t mouseupNode = null;\n\n\t var xScale = _d2.default.scale.linear().domain([0, self.options.svgW]).range([0, self.options.svgW]);\n\t var yScale = _d2.default.scale.linear().domain([0, self.options.svgH]).range([0, self.options.svgH]);\n\n\t var graph = self.graph = {\n\t 'nodes': [],\n\t 'links': []\n\t };\n\n\t self.linkStrengths = {\n\t 'pseudoknot': 0.00,\n\t 'proteinChain': 0.00,\n\t 'chainChain': 0.00,\n\t 'intermolecule': 10.00,\n\t 'external': 0.00,\n\t 'other': 10.00\n\t };\n\n\t self.displayParameters = {\n\t 'displayBackground': 'true',\n\t 'displayNumbering': 'true',\n\t 'displayNodeOutline': 'true',\n\t 'displayNodeLabel': 'true',\n\t 'displayLinks': 'true',\n\t 'displayPseudoknotLinks': 'true',\n\t 'displayProteinLinks': 'true'\n\t };\n\n\t self.colorScheme = 'structure';\n\t self.customColors = {};\n\t self.animation = self.options.applyForce;\n\t // don't listen to events because a model window is open somewhere\n\t self.deaf = false;\n\t self.rnas = {};\n\t self.extraLinks = []; //store links between different RNAs\n\n\t Array.prototype.equals = function (array) {\n\t // if the other array is a falsy value, return\n\t if (!array) return false;\n\n\t // compare lengths - can save a lot of time\n\t if (this.length != array.length) return false;\n\n\t for (var i = 0, l = this.length; i < l; i++) {\n\t // Check if we have nested arrays\n\t if (this[i] instanceof Array && array[i] instanceof Array) {\n\t // recurse into the nested arrays\n\t if (!this[i].equals(array[i])) return false;\n\t } else if (this[i] != array[i]) {\n\t // Warning - two different object instances will never be equal: {x:20} != {x:20}\n\t return false;\n\t }\n\t }\n\t return true;\n\t };\n\n\t self.createInitialLayout = function (structure, passedOptions) {\n\t // the default options\n\t var options = {\n\t 'sequence': '',\n\t 'name': 'empty',\n\t 'positions': [],\n\t 'labelInterval': self.options.labelInterval,\n\t 'avoidOthers': true,\n\t 'uids': [],\n\t 'circularizeExternal': true\n\t };\n\n\t if (arguments.length == 2) {\n\t for (var option in passedOptions) {\n\t if (options.hasOwnProperty(option)) options[option] = passedOptions[option];\n\t }\n\t }\n\n\t var rg = new _rnagraph.RNAGraph(options.sequence, structure, options.name);\n\t rg.circularizeExternal = options.circularizeExternal;\n\n\t var rnaJson = rg.recalculateElements();\n\n\t if (options.positions.length === 0) {\n\t // no provided positions means we need to calculate an initial layout\n\n\t if (self.options.layout == 'naview') {\n\t var naview = new _naview.NAView();\n\n\t var naViewPositions = naview.naview_xy_coordinates(rg.pairtable);\n\t options.positions = [];\n\t for (var _i = 0; _i < naViewPositions.nbase; _i++) {\n\t options.positions.push([naViewPositions.x[_i], naViewPositions.y[_i]]);\n\t }\n\t } else {\n\t options.positions = (0, _simplernaplot.simpleXyCoordinates)(rnaJson.pairtable);\n\t }\n\t }\n\n\t rnaJson = rnaJson.elementsToJson().addUids(options.uids).addPositions('nucleotide', options.positions).addLabels(1, options.labelInterval).reinforceStems().reinforceLoops().connectFakeNodes().reassignLinkUids().breakNodesToFakeNodes();\n\n\t return rnaJson;\n\t };\n\n\t self.addRNA = function (structure, passedOptions) {\n\t var rnaJson = self.createInitialLayout(structure, passedOptions);\n\n\t /*\n\t * Code to display the JSONs representing the structure\n\t *\n\t rnaJson.nodes[0].rna = null;\n\t rnaJson.nodes[0].nextNode = null;\n\t rnaJson.links[0].source = null;\n\t rnaJson.links[0].target = null;\n\t console.log(rnaJson.nodes[0]);\n\t console.log(rnaJson.links[0]);\n\t console.log(JSON.stringify(rnaJson.nodes[0],null,2));\n\t console.log(JSON.stringify(rnaJson.links[0],null,2));\n\t */\n\n\t if (arguments.length === 1) passedOptions = {};\n\n\t if ('extraLinks' in passedOptions) {\n\t // presumably the passed in links are within the passed molecule\n\t var newLinks = self.addExternalLinks(rnaJson, passedOptions.extraLinks);\n\n\t self.extraLinks = self.extraLinks.concat(newLinks);\n\t }\n\n\t if ('avoidOthers' in passedOptions) self.addRNAJSON(rnaJson, passedOptions.avoidOthers);else self.addRNAJSON(rnaJson, true);\n\n\t return rnaJson;\n\t };\n\n\t self.addExternalLinks = function (rnaJson, externalLinks) {\n\t var newLinks = [];\n\n\t for (var i = 0; i < externalLinks.length; i++) {\n\t var newLink = { linkType: 'external', value: 1, uid: generateUUID(),\n\t source: null, target: null };\n\t // check if the source node is an array\n\t if (Object.prototype.toString.call(externalLinks[i][0]) === '[object Array]') {\n\t for (var j = 0; j < rnaJson.nodes.length; j++) {\n\t if ('nucs' in rnaJson.nodes[j]) {\n\t if (rnaJson.nodes[j].nucs.equals(externalLinks[i][0])) {\n\t newLink.source = rnaJson.nodes[j];\n\t break;\n\t }\n\t }\n\t }\n\t } else {\n\t for (var j = 0; j < rnaJson.nodes.length; j++) {\n\t if (rnaJson.nodes[j].num == externalLinks[i][0]) {\n\t newLink.source = rnaJson.nodes[j];\n\t }\n\t }\n\t }\n\n\t // check if the target node is an array\n\t if (Object.prototype.toString.call(externalLinks[i][1]) === '[object Array]') {\n\t for (var j = 0; j < rnaJson.nodes.length; j++) {\n\t if ('nucs' in rnaJson.nodes[j]) {\n\t if (rnaJson.nodes[j].nucs.equals(externalLinks[i][1])) {\n\t newLink.target = rnaJson.nodes[j];\n\t }\n\t }\n\t }\n\t } else {\n\t for (var j = 0; j < rnaJson.nodes.length; j++) {\n\t if (rnaJson.nodes[j].num == externalLinks[i][1]) {\n\t newLink.target = rnaJson.nodes[j];\n\t }\n\t }\n\t }\n\n\t if (newLink.source == null || newLink.target == null) {\n\t console.log('ERROR: source or target of new link not found:', newLink, externalLinks[i]);\n\t continue;\n\t }\n\n\t newLinks.push(newLink);\n\t }\n\n\t return newLinks;\n\t };\n\n\t self.addRNAJSON = function (rnaGraph, avoidOthers) {\n\t // Add an RNAGraph, which contains nodes and links as part of the\n\t // structure\n\t // Each RNA will have uid to identify it\n\t // when it is modified, it is replaced in the global list of RNAs\n\t //\n\t var maxX, minX;\n\n\t if (avoidOthers) {\n\t if (self.graph.nodes.length > 0) maxX = _d2.default.max(self.graph.nodes.map(function (d) {\n\t return d.x;\n\t }));else maxX = 0;\n\n\t minX = _d2.default.min(rnaGraph.nodes.map(function (d) {\n\t return d.x;\n\t }));\n\n\t rnaGraph.nodes.forEach(function (node) {\n\t node.x += maxX - minX + 20;\n\t node.px += maxX - minX;\n\t });\n\t }\n\n\t rnaGraph.nodes.forEach(function (node) {\n\t node.rna = rnaGraph;\n\t });\n\n\t self.rnas[rnaGraph.uid] = rnaGraph;\n\t self.recalculateGraph();\n\n\t self.update();\n\t self.centerView();\n\n\t return rnaGraph;\n\t };\n\n\t function magnitude(x) {\n\t return Math.sqrt(x[0] * x[0] + x[1] * x[1]);\n\t }\n\n\t function positionAnyNode(d) {\n\t var endPoint = d;\n\t var startPoint = d.prevNode;\n\t var lengthMult = 6;\n\n\t if (startPoint === null) return;\n\n\t // does this node have a link pointing to it?\n\t if (!d.linked) return;\n\n\t // point back toward the previous node\n\t var u = [-(endPoint.x - startPoint.x), -(endPoint.y - startPoint.y)];\n\t u = [u[0] / magnitude(u), u[1] / magnitude(u)];\n\t var v = [-u[1], u[0]];\n\n\t var arrowTip = [d.radius * u[0], d.radius * u[1]];\n\n\t var path = 'M' + (arrowTip[0] + lengthMult * (u[0] + v[0]) / 2) + ',' + (arrowTip[1] + lengthMult * (u[1] + v[1]) / 2) + 'L' + arrowTip[0] + ',' + arrowTip[1] + 'L' + (arrowTip[0] + lengthMult * (u[0] - v[0]) / 2) + ',' + (arrowTip[1] + lengthMult * (u[1] - v[1]) / 2);\n\n\t _d2.default.select(this).attr('d', path);\n\t }\n\n\t function realLinkFilter(d) {\n\t return d.linkType == 'basepair' || d.linkType == 'backbone' || d.linkType == 'pseudoknot' || d.linkType == 'label_link' || d.linkType == 'external' || d.linkType == 'chain_chain';\n\t }\n\n\t self.transitionRNA = function (newStructure, nextFunction) {\n\t //transition from an RNA which is already displayed to a new structure\n\t var duration = self.options.transitionDuration;\n\n\t var uids = self.graph.nodes.filter(function (d) {\n\t return d.nodeType == 'nucleotide';\n\t }).map(function (d) {\n\t return d.uid;\n\t });\n\n\t var options = { 'uids': uids };\n\t var newRNAJson = self.createInitialLayout(newStructure, options);\n\n\t var gnodes = visNodes.selectAll('g.gnode').data(newRNAJson.nodes, nodeKey);\n\t var duration = self.options.transitionDuration;\n\n\t if (duration === 0) gnodes.attr('transform', function (d) {\n\t return 'translate(' + [d.x, d.y] + ')';\n\t });else {\n\t gnodes.transition().attr('transform', function (d) {\n\t return 'translate(' + [d.x, d.y] + ')';\n\t }).duration(duration);\n\t }\n\n\t var links = visLinks.selectAll('line.link').data(newRNAJson.links.filter(realLinkFilter), linkKey);\n\t var newNodes = self.createNewNodes(gnodes.enter()).attr('transform', function (d) {\n\t if (typeof d.x != 'undefined' && typeof d.y != 'undefined') return 'translate(' + [0, 0] + ')';else return '';\n\t });\n\n\t if (duration === 0) gnodes.exit().remove();else gnodes.exit().transition().attr('transform', function (d) {\n\t if (typeof d.x != 'undefined' && typeof d.y != 'undefined') return 'translate(' + [0, 0] + ')';else return '';\n\t });\n\n\t gnodes.select('path').each(positionAnyNode);\n\n\t self.graph.nodes = gnodes.data();\n\t self.updateStyle();\n\t self.centerView(duration);\n\n\t function endall(transition, callback) {\n\t if (transition.size() === 0) {\n\t setTimeout(callback, duration);\n\t }\n\t var n = 0;\n\t transition.each(function () {\n\t ++n;\n\t }).each('end', function () {\n\t if (! --n) callback.apply(this, arguments);\n\t });\n\t }\n\n\t function addNewLinks() {\n\t var newLinks = self.createNewLinks(links.enter());\n\t self.graph.links = links.data();\n\n\t self.updateStyle();\n\n\t if (typeof nextFunction != 'undefined') nextFunction();\n\t }\n\n\t links.exit().remove();\n\n\t if (duration === 0) {\n\t links.attr('x1', function (d) {\n\t return d.source.x;\n\t }).attr('y1', function (d) {\n\t return d.source.y;\n\t }).attr('x2', function (d) {\n\t return d.target.x;\n\t }).attr('y2', function (d) {\n\t return d.target.y;\n\t });\n\n\t var newLinks = self.createNewLinks(links.enter());\n\t self.graph.links = links.data();\n\n\t self.updateStyle();\n\t } else {\n\t links.transition().attr('x1', function (d) {\n\t return d.source.x;\n\t }).attr('y1', function (d) {\n\t return d.source.y;\n\t }).attr('x2', function (d) {\n\t return d.target.x;\n\t }).attr('y2', function (d) {\n\t return d.target.y;\n\t }).duration(duration).call(endall, addNewLinks);\n\t }\n\n\t if (duration === 0) {\n\t newNodes.attr('transform', function (d) {\n\t if (typeof d.x != 'undefined' && typeof d.y != 'undefined') return 'translate(' + [d.x, d.y] + ')';else return '';\n\t });\n\t } else {\n\t newNodes.transition().attr('transform', function (d) {\n\t if (typeof d.x != 'undefined' && typeof d.y != 'undefined') return 'translate(' + [d.x, d.y] + ')';else return '';\n\t });\n\t }\n\t };\n\n\t self.recalculateGraph = function () {\n\t // Condense all of the individual RNAs into one\n\t // collection of nodes and links\n\t self.graph.nodes = [];\n\t self.graph.links = [];\n\t for (var uid in self.rnas) {\n\t self.graph.nodes = self.graph.nodes.concat(self.rnas[uid].nodes);\n\t self.graph.links = self.graph.links.concat(self.rnas[uid].links);\n\t }\n\n\t // Create a lookup table so that we can access each node\n\t // based on its uid. This will be used to create the links\n\t // between different RNAs\n\t var uidsToNodes = {};\n\n\t for (var i = 0; i < self.graph.nodes.length; i++) {\n\t uidsToNodes[self.graph.nodes[i].uid] = self.graph.nodes[i];\n\t }self.graph.links.forEach(function (link) {\n\t link.source = uidsToNodes[link.source.uid];\n\t link.target = uidsToNodes[link.target.uid];\n\t });\n\n\t for (i = 0; i < self.extraLinks.length; i++) {\n\t // the actual node objects may have changed, so we hae to recreate\n\t // the extra links based on the uids\n\n\t if (!(self.extraLinks[i].target.uid in uidsToNodes)) {\n\t console.log('not there:', self.extraLinks[i]);\n\t }\n\n\t self.extraLinks[i].source = uidsToNodes[self.extraLinks[i].source.uid];\n\t self.extraLinks[i].target = uidsToNodes[self.extraLinks[i].target.uid];\n\n\t if (self.extraLinks[i].linkType == 'intermolecule') {\n\t //remove links to middle nodes\n\t fakeLinks = self.graph.links.filter(function (d) {\n\t return (d.source == self.extraLinks[i].source || d.source == self.extraLinks[i].target || d.target == self.extraLinks[i].source || d.target == self.extraLinks[i].source) && d.linkType == 'fake';\n\t });\n\n\t for (var j = 0; j < fakeLinks.length; j++) {\n\t var linkIndex = self.graph.links.indexOf(fakeLinks[j]);\n\t self.graph.links.splice(linkIndex, 1);\n\t }\n\t }\n\n\t graph.links.push(self.extraLinks[i]);\n\t }\n\t };\n\n\t self.addNodes = function addNodes(json) {\n\t // add a new set of nodes from a json file\n\n\t // Resolve the sources and targets of the links so that they\n\t // are not just indeces into an array\n\t json.links.forEach(function (entry) {\n\t if (typeof entry.source == 'number') entry.source = json.nodes[entry.source];\n\t if (typeof entry.target == 'number') entry.target = json.nodes[entry.target];\n\t });\n\n\t // Get the maximum x and y values of the current graph\n\t // so that we don't place a new structure on top of the\n\t // old one\n\t if (self.graph.nodes.length > 0) {\n\t maxX = _d2.default.max(self.graph.nodes.map(function (d) {\n\t return d.x;\n\t }));\n\t maxY = _d2.default.max(self.graph.nodes.map(function (d) {\n\t return d.y;\n\t }));\n\t } else {\n\t maxX = 0;\n\t maxY = 0;\n\t }\n\n\t json.nodes.forEach(function (entry) {\n\t if (!(entry.rna.uid in self.rnas)) {\n\t self.rnas[entry.rna.uid] = entry.rna;\n\t }\n\n\t entry.x += maxX;\n\t //entry.y += maxY;\n\n\t entry.px += maxX;\n\t //entry.py += maxY;\n\t });\n\n\t r = new _rnagraph.RNAGraph('', '');\n\t r.nodes = json.nodes;\n\t r.links = json.links;\n\n\t //self.addRNA(r);\n\t self.recalculateGraph();\n\n\t self.update();\n\t self.centerView();\n\t };\n\n\t self.addCustomColors = function addCustomColors(json) {\n\t // Add a json file containing the custom colors\n\t self.customColors = json;\n\t };\n\n\t self.addCustomColorsText = function (customColorsText) {\n\t var cs = new _rnautils.ColorScheme(customColorsText);\n\t self.customColors = cs.colorsJson;\n\t self.changeColorScheme('custom');\n\t };\n\n\t self.clearNodes = function clearNodes() {\n\t self.graph.nodes = [];\n\t self.graph.links = [];\n\n\t self.rnas = {};\n\t self.extraLinks = [];\n\n\t self.update();\n\t };\n\n\t self.toJSON = function toJSON() {\n\t var data = { 'rnas': self.rnas, 'extraLinks': self.extraLinks };\n\t var dataString = JSON.stringify(data, function (key, value) {\n\t //remove circular references\n\t if (key == 'rna') {\n\t return;\n\t } else {\n\t return value;\n\t }\n\t }, '\\t');\n\t return dataString;\n\t };\n\n\t self.fromJSON = function (jsonString) {\n\t var rnas, extraLinks;\n\n\t try {\n\t var data = JSON.parse(jsonString);\n\t rnas = data.rnas;\n\t extraLinks = data.extraLinks;\n\t } catch (err) {\n\t throw err;\n\t }\n\n\t for (var uid in rnas) {\n\t if (rnas[uid].type == 'rna') {\n\t r = new _rnagraph.RNAGraph();\n\n\t r.seq = rnas[uid].seq;\n\t r.dotbracket = rnas[uid].dotbracket;\n\t r.circular = rnas[uid].circular;\n\t r.pairtable = rnas[uid].pairtable;\n\t r.uid = rnas[uid].uid;\n\t r.structName = rnas[uid].structName;\n\t r.nodes = rnas[uid].nodes;\n\t r.links = rnas[uid].links;\n\t r.rnaLength = rnas[uid].rnaLength;\n\t r.elements = rnas[uid].elements;\n\t r.nucsToNodes = rnas[uid].nucsToNodes;\n\t r.pseudoknotPairs = rnas[uid].pseudoknotPairs;\n\t } else {\n\t r = new ProteinGraph();\n\t r.size = rnas[uid].size;\n\t r.nodes = rnas[uid].nodes;\n\t r.uid = rnas[uid].uid;\n\t }\n\n\t self.addRNAJSON(r, false);\n\t }\n\n\t extraLinks.forEach(function (link) {\n\t self.extraLinks.push(link);\n\t });\n\n\t self.recalculateGraph();\n\t self.update();\n\t };\n\n\t self.setSize = function () {\n\t if (self.options.initialSize != null) return;\n\n\t var svgH = _d2.default.select(element).node().offsetHeight;\n\t var svgW = _d2.default.select(element).node().offsetWidth;\n\n\t self.options.svgW = svgW;\n\t self.options.svgH = svgH;\n\n\t //Set the output range of the scales\n\t xScale.range([0, svgW]).domain([0, svgW]);\n\t yScale.range([0, svgH]).domain([0, svgH]);\n\n\t //re-attach the scales to the zoom behaviour\n\t self.zoomer.x(xScale).y(yScale);\n\n\t self.brusher.x(xScale).y(yScale);\n\n\t self.centerView();\n\n\t if (!self.options.resizeSvgOnResize) {\n\t return;\n\t }\n\n\t //resize the background\n\t /*\n\t rect.attr('width', svgW)\n\t .attr('height', svgH);\n\t */\n\n\t svg.attr('width', svgW).attr('height', svgH);\n\t };\n\n\t function changeColors(moleculeColors, d, scale) {\n\t if (moleculeColors.hasOwnProperty(d.num)) {\n\t var val = parseFloat(moleculeColors[d.num]);\n\n\t if (isNaN(val)) {\n\t // passed in color is not a scalar, so\n\t // treat it as a color\n\t return moleculeColors[d.num];\n\t } else {\n\t // the user passed in a float, let's use a colormap\n\t // to convert it to a color\n\t return scale(val);\n\t }\n\t } else {\n\t return 'white';\n\t }\n\t }\n\n\t self.setOutlineColor = function (color) {\n\t var nodes = visNodes.selectAll('g.gnode').select('[node_type=nucleotide]');\n\t nodes.style('fill', color);\n\t };\n\n\t self.changeColorScheme = function (newColorScheme) {\n\t var proteinNodes = visNodes.selectAll('[node_type=protein]');\n\n\t proteinNodes.classed('protein', true).attr('r', function (d) {\n\t return d.radius;\n\t });\n\n\t var gnodes = visNodes.selectAll('g.gnode');\n\t var circles = visNodes.selectAll('g.gnode').selectAll('circle');\n\t var nodes = visNodes.selectAll('g.gnode').select('[node_type=nucleotide]');\n\t self.colorScheme = newColorScheme;\n\n\t if (newColorScheme == 'sequence') {\n\t var scale = _d2.default.scale.ordinal().range(['#dbdb8d', '#98df8a', '#ff9896', '#aec7e8', '#aec7e8']).domain(['A', 'C', 'G', 'U', 'T']);\n\t nodes.style('fill', function (d) {\n\t return scale(d.name);\n\t });\n\t } else if (newColorScheme == 'structure') {\n\t var scale = _d2.default.scale.category10().domain(['s', 'm', 'i', 'e', 't', 'h', 'x']).range(['lightgreen', '#ff9896', '#dbdb8d', 'lightsalmon', 'lightcyan', 'lightblue', 'transparent']);\n\n\t nodes.style('fill', function (d) {\n\t return scale(d.elemType);\n\t });\n\t } else if (newColorScheme == 'positions') {\n\t nodes.style('fill', function (d) {\n\t var scale = _d2.default.scale.linear().range(['#98df8a', '#dbdb8d', '#ff9896']).interpolate(_d2.default.interpolateLab).domain([1, 1 + (d.rna.rnaLength - 1) / 2, d.rna.rnaLength]);\n\n\t return scale(d.num);\n\t });\n\t } else if (newColorScheme == 'custom') {\n\t // scale to be used in case the user passes scalar\n\t // values rather than color names\n\t if (typeof self.customColors != 'undefined' && 'domain' in self.customColors && 'range' in self.customColors) {\n\t var scale = _d2.default.scale.linear().interpolate(_d2.default.interpolateLab).domain(self.customColors.domain).range(self.customColors.range);\n\t }\n\n\t nodes.style('fill', function (d) {\n\t if (typeof self.customColors == 'undefined' || !self.customColors.hasOwnProperty('colorValues')) {\n\t return 'white';\n\t }\n\n\t if (self.customColors.colorValues.hasOwnProperty(d.structName) && self.customColors.colorValues[d.structName].hasOwnProperty(d.num)) {\n\t // if a molecule name is specified, it supercedes the default colors\n\t // (for which no molecule name has been specified)\n\t var moleculeColors = self.customColors.colorValues[d.structName];\n\t return changeColors(moleculeColors, d, scale);\n\t } else if (self.customColors.colorValues.hasOwnProperty('')) {\n\t var _moleculeColors = self.customColors.colorValues[''];\n\t return changeColors(_moleculeColors, d, scale);\n\t }\n\n\t return 'white';\n\t });\n\t }\n\t };\n\n\t function mousedown() {}\n\n\t function mousemove() {\n\t if (!mousedownNode) return;\n\n\t mpos = _d2.default.mouse(vis.node());\n\t // update drag line\n\t dragLine.attr('x1', mousedownNode.x).attr('y1', mousedownNode.y).attr('x2', mpos[0]).attr('y2', mpos[1]);\n\t }\n\n\t function mouseup() {\n\t if (mousedownNode) {\n\t dragLine.attr('class', 'drag_line_hidden');\n\t }\n\n\t // clear mouse event vars\n\t resetMouseVars();\n\t //update()\n\t }\n\t //adapt size to window changes:\n\t window.addEventListener('resize', self.setSize, false);\n\n\t self.zoomer = _d2.default.behavior.zoom().scaleExtent([0.1, 10]).x(xScale).y(yScale).on('zoomstart', zoomstart).on('zoom', redraw);\n\n\t _d2.default.select(element).select('svg').remove();\n\n\t var svg = _d2.default.select(element).classed('forna-container', true).attr('tabindex', 1).on('keydown.brush', keydown).on('keyup.brush', keyup).each(function () {\n\t this.focus();\n\t }).append('svg:svg').attr('width', self.options.svgW).attr('height', self.options.svgH).attr('id', 'plotting-area');\n\n\t self.options.svg = svg;\n\n\t var svgGraph = svg.append('svg:g').on('mousemove', mousemove).on('mousedown', mousedown).on('mouseup', mouseup);\n\n\t if (self.options.allowPanningAndZooming) svgGraph.call(self.zoomer);\n\n\t /*\n\t var rect = svgGraph.append('svg:rect')\n\t .attr('width', self.options.svgW)\n\t .attr('height', self.options.svgH)\n\t .attr('fill', 'white')\n\t //.attr('stroke', 'grey')\n\t //.attr('stroke-width', 1)\n\t //.attr('pointer-events', 'all')\n\t .attr('id', 'zrect');\n\t */\n\n\t var brush = svgGraph.append('g').datum(function () {\n\t return { selected: false, previouslySelected: false };\n\t }).attr('class', 'brush');\n\n\t var vis = svgGraph.append('svg:g');\n\t var visLinks = vis.append('svg:g');\n\t var visNodes = vis.append('svg:g');\n\n\t self.brusher = _d2.default.svg.brush().x(xScale).y(yScale).on('brushstart', function (d) {\n\t var gnodes = visNodes.selectAll('g.gnode').selectAll('.outline_node');\n\t gnodes.each(function (d) {\n\t d.previouslySelected = ctrlKeydown && d.selected;\n\t });\n\t }).on('brush', function () {\n\t var gnodes = visNodes.selectAll('g.gnode').selectAll('.outline_node');\n\t var extent = _d2.default.event.target.extent();\n\n\t gnodes.classed('selected', function (d) {\n\t return d.selected = self.options.applyForce && d.previouslySelected ^ (extent[0][0] <= d.x && d.x < extent[1][0] && extent[0][1] <= d.y && d.y < extent[1][1]);\n\t });\n\t }).on('brushend', function () {\n\t _d2.default.event.target.clear();\n\t _d2.default.select(this).call(_d2.default.event.target);\n\t });\n\n\t brush.call(self.brusher).on('mousedown.brush', null).on('touchstart.brush', null).on('touchmove.brush', null).on('touchend.brush', null);\n\t brush.select('.background').style('cursor', 'auto');\n\n\t function zoomstart() {\n\t var node = visNodes.selectAll('g.gnode').selectAll('.outline_node');\n\t node.each(function (d) {\n\t d.selected = false;\n\t d.previouslySelected = false;\n\t });\n\t node.classed('selected', false);\n\t }\n\n\t function redraw() {\n\t vis.attr('transform', 'translate(' + _d2.default.event.translate + ')' + ' scale(' + _d2.default.event.scale + ')');\n\t }\n\n\t self.getBoundingBoxTransform = function () {\n\t // Center the view on the molecule(s) and scale it so that everything\n\t // fits in the window\n\n\t //no molecules, nothing to do\n\t if (self.graph.nodes.length === 0) return { 'translate': [0, 0], 'scale': 1 };\n\n\t // Get the bounding box\n\t var minX = _d2.default.min(self.graph.nodes.map(function (d) {\n\t return d.x;\n\t }));\n\t var minY = _d2.default.min(self.graph.nodes.map(function (d) {\n\t return d.y;\n\t }));\n\n\t var maxX = _d2.default.max(self.graph.nodes.map(function (d) {\n\t return d.x;\n\t }));\n\t var maxY = _d2.default.max(self.graph.nodes.map(function (d) {\n\t return d.y;\n\t }));\n\n\t // The width and the height of the molecule\n\t var molWidth = maxX - minX;\n\t var molHeight = maxY - minY;\n\n\t // how much larger the drawing area is than the width and the height\n\t var widthRatio = self.options.svgW / (molWidth + 1);\n\t var heightRatio = self.options.svgH / (molHeight + 1);\n\n\t // we need to fit it in both directions, so we scale according to\n\t // the direction in which we need to shrink the most\n\t var minRatio = Math.min(widthRatio, heightRatio) * 0.8;\n\n\t // the new dimensions of the molecule\n\t var newMolWidth = molWidth * minRatio;\n\t var newMolHeight = molHeight * minRatio;\n\n\t // translate so that it's in the center of the window\n\t var xTrans = -minX * minRatio + (self.options.svgW - newMolWidth) / 2;\n\t var yTrans = -minY * minRatio + (self.options.svgH - newMolHeight) / 2;\n\n\t return { 'translate': [xTrans, yTrans], 'scale': minRatio };\n\t };\n\n\t self.centerView = function (duration) {\n\t if (arguments.length === 0) duration = 0;\n\n\t var bbTransform = self.getBoundingBoxTransform();\n\n\t if (bbTransform === null) return;\n\n\t // do the actual moving\n\t vis.transition().attr('transform', 'translate(' + bbTransform.translate + ')' + ' scale(' + bbTransform.scale + ')').duration(duration);\n\n\t // tell the zoomer what we did so that next we zoom, it uses the\n\t // transformation we entered here\n\t self.zoomer.translate(bbTransform.translate);\n\t self.zoomer.scale(bbTransform.scale);\n\t };\n\n\t self.force = _d2.default.layout.force().charge(function (d) {\n\t if (d.nodeType == 'middle') {\n\t return self.options.middleCharge;\n\t } else return self.options.otherCharge;\n\t }).friction(self.options.friction).linkDistance(function (d) {\n\t return self.options.linkDistanceMultiplier * d.value;\n\t }).linkStrength(function (d) {\n\t if (d.linkType in self.linkStrengths) {\n\t return self.linkStrengths[d.linkType];\n\t } else {\n\t return self.linkStrengths.other;\n\t }\n\t }).gravity(0.000).nodes(self.graph.nodes).links(self.graph.links).chargeDistance(self.options.chargeDistance).size([self.options.svgW, self.options.svgH]);\n\n\t // line displayed when dragging new nodes\n\t var dragLine = vis.append('line').attr('class', 'drag_line').attr('x1', 0).attr('y1', 0).attr('x2', 0).attr('y2', 0);\n\n\t function resetMouseVars() {\n\t mousedownNode = null;\n\t mouseupNode = null;\n\t mousedownLink = null;\n\t }\n\n\t var shiftKeydown = false;\n\t var ctrlKeydown = false;\n\n\t function selectedNodes(mouseDownNode) {\n\t var gnodes = visNodes.selectAll('g.gnode');\n\n\t if (ctrlKeydown) {\n\t return gnodes.filter(function (d) {\n\t return d.selected;\n\t });\n\n\t //return d3.selectAll('[struct_name=' + mouseDownNode.struct_name + ']');\n\t } else {\n\t return gnodes.filter(function (d) {\n\t return d.selected;\n\t });\n\t //return d3.select(this);\n\t }\n\t }\n\n\t function dragstarted(d) {\n\t _d2.default.event.sourceEvent.stopPropagation();\n\n\t if (!d.selected && !ctrlKeydown) {\n\t // if this node isn't selected, then we have to unselect every other node\n\t var node = visNodes.selectAll('g.gnode').selectAll('.outline_node');\n\t node.classed('selected', function (p) {\n\t return p.selected = self.options.applyForce && (p.previouslySelected = false);\n\t });\n\t }\n\n\t _d2.default.select(this).select('.outline_node').classed('selected', function (p) {\n\t d.previouslySelected = d.selected;return d.selected = self.options.applyForce && true;\n\t });\n\n\t var toDrag = selectedNodes(d);\n\t toDrag.each(function (d1) {\n\t d1.fixed |= 2;\n\t });\n\n\t //d3.event.sourceEvent.stopPropagation();\n\t //d3.select(self).classed('dragging', true);\n\t //\n\t }\n\n\t function dragged(d) {\n\n\t var toDrag = selectedNodes(d);\n\n\t toDrag.each(function (d1) {\n\t d1.x += _d2.default.event.dx;\n\t d1.y += _d2.default.event.dy;\n\n\t d1.px += _d2.default.event.dx;\n\t d1.py += _d2.default.event.dy;\n\t });\n\n\t self.resumeForce();\n\t _d2.default.event.sourceEvent.preventDefault();\n\t }\n\n\t self.resumeForce = function () {\n\t if (self.animation) self.force.resume();\n\t };\n\n\t function dragended(d) {\n\t var toDrag = selectedNodes(d);\n\n\t toDrag.each(function (d1) {\n\t d1.fixed &= ~6;\n\t });\n\t }\n\n\t function collide(node) {\n\t var r = node.radius + 16,\n\t nx1 = node.x - r,\n\t nx2 = node.x + r,\n\t ny1 = node.y - r,\n\t ny2 = node.y + r;\n\t return function (quad, x1, y1, x2, y2) {\n\t if (quad.point && quad.point !== node) {\n\t var x = node.x - quad.point.x,\n\t y = node.y - quad.point.y,\n\t l = Math.sqrt(x * x + y * y),\n\t r = node.radius + quad.point.radius;\n\t if (l < r) {\n\t l = (l - r) / l * 0.1;\n\t node.x -= x *= l;\n\t node.y -= y *= l;\n\t quad.point.x += x;\n\t quad.point.y += y;\n\t }\n\t }\n\t return x1 > nx2 || x2 < nx1 || y1 > ny2 || y2 < ny1;\n\t };\n\t }\n\n\t var drag = _d2.default.behavior.drag()\n\t //.origin(function(d) { return d; })\n\t .on('dragstart', dragstarted).on('drag', dragged).on('dragend', dragended);\n\n\t function keydown() {\n\t if (self.deaf)\n\t // lalalalal, not listening\n\t return;\n\n\t if (shiftKeydown) return;\n\n\t switch (_d2.default.event.keyCode) {\n\t case 16:\n\t shiftKeydown = true;\n\t break;\n\t case 17:\n\t ctrlKeydown = true;\n\t break;\n\t case 67:\n\t //c\n\t self.centerView();\n\t break;\n\t }\n\n\t if (shiftKeydown || ctrlKeydown) {\n\t svgGraph.call(self.zoomer).on('mousedown.zoom', null).on('touchstart.zoom', null).on('touchmove.zoom', null).on('touchend.zoom', null);\n\n\t //svgGraph.on('zoom', null);\n\t vis.selectAll('g.gnode').on('mousedown.drag', null);\n\t }\n\n\t if (ctrlKeydown) {\n\t brush.select('.background').style('cursor', 'crosshair');\n\t brush.call(self.brusher);\n\t }\n\t }\n\n\t function keyup() {\n\t shiftKeydown = false;\n\t ctrlKeydown = false;\n\n\t brush.call(self.brusher).on('mousedown.brush', null).on('touchstart.brush', null).on('touchmove.brush', null).on('touchend.brush', null);\n\n\t brush.select('.background').style('cursor', 'auto');\n\t svgGraph.call(self.zoomer);\n\n\t vis.selectAll('g.gnode').call(drag);\n\t }\n\n\t _d2.default.select(element).on('keydown', keydown).on('keyup', keyup).on('contextmenu', function () {\n\t _d2.default.event.preventDefault();\n\t });\n\n\t var linkKey = function linkKey(d) {\n\t return d.uid;\n\t };\n\n\t var nodeKey = function nodeKey(d) {\n\t var key = d.uid;\n\t return key;\n\t };\n\n\t var updateRnaGraph = function updateRnaGraph(r) {\n\t var nucleotidePositions = r.getPositions('nucleotide');\n\t var labelPositions = r.getPositions('label');\n\n\t var uids = r.getUids();\n\n\t r.recalculateElements().elementsToJson().addPseudoknots().addPositions('nucleotide', nucleotidePositions).addUids(uids).addLabels(1, self.options.labelInterval).addPositions('label', labelPositions).reinforceStems().reinforceLoops().updateLinkUids();\n\t };\n\n\t var removeLink = function removeLink(d) {\n\t // remove a link between two nodes\n\t index = self.graph.links.indexOf(d);\n\n\t if (index > -1) {\n\t //remove a link\n\t //graph.links.splice(index, 1);\n\n\t // there should be two cases\n\t // 1. The link is within a single molecule\n\n\t if (d.source.rna == d.target.rna) {\n\t var r = d.source.rna;\n\n\t r.addPseudoknots();\n\t r.pairtable[d.source.num] = 0;\n\t r.pairtable[d.target.num] = 0;\n\n\t updateRnaGraph(r);\n\t } else {\n\t // 2. The link is between two different molecules\n\t extraLinkIndex = self.extraLinks.indexOf(d);\n\n\t self.extraLinks.splice(extraLinkIndex, 1);\n\t }\n\n\t self.recalculateGraph();\n\t }\n\n\t self.update();\n\t };\n\n\t var linkClick = function linkClick(d) {\n\t if (!shiftKeydown) {\n\t return;\n\t }\n\n\t var invalidLinks = { 'backbone': true,\n\t 'fake': true,\n\t 'fake_fake': true,\n\t 'label_link': true };\n\n\t if (d.linkType in invalidLinks) return;\n\n\t removeLink(d);\n\t };\n\n\t self.addLink = function (newLink) {\n\t // this means we have a new json, which means we have\n\t // to recalculate the structure and change the colors\n\t // appropriately\n\t //\n\t if (newLink.source.rna == newLink.target.rna) {\n\t r = newLink.source.rna;\n\n\t r.pairtable[newLink.source.num] = newLink.target.num;\n\t r.pairtable[newLink.target.num] = newLink.source.num;\n\n\t updateRnaGraph(r);\n\t } else {\n\t //Add an extra link\n\t newLink.linkType = 'intermolecule';\n\t self.extraLinks.push(newLink);\n\t }\n\t self.recalculateGraph();\n\t self.update();\n\t };\n\n\t var nodeMouseclick = function nodeMouseclick(d) {\n\t if (_d2.default.event.defaultPrevented) return;\n\n\t if (!ctrlKeydown) {\n\t //if the shift key isn't down, unselect everything\n\t var node = visNodes.selectAll('g.gnode').selectAll('.outline_node');\n\t node.classed('selected', function (p) {\n\t return p.selected = self.options.applyForce && (p.previouslySelected = false);\n\t });\n\t }\n\n\t // always select this node\n\t _d2.default.select(this).select('circle').classed('selected', d.selected = self.options.applyForce && !d.previouslySelected);\n\t };\n\n\t var nodeMouseup = function nodeMouseup(d) {\n\t if (mousedownNode) {\n\t mouseupNode = d;\n\n\t if (mouseupNode == mousedownNode) {\n\t resetMouseVars();return;\n\t }\n\t var newLink = { source: mousedownNode, target: mouseupNode, linkType: 'basepair', value: 1, uid: generateUUID() };\n\n\t for (i = 0; i < self.graph.links.length; i++) {\n\t if (self.graph.links[i].source == mousedownNode || self.graph.links[i].target == mousedownNode || self.graph.links[i].source == mouseupNode || self.graph.links[i].target == mouseupNode) {\n\n\t if (self.graph.links[i].linkType == 'basepair' || self.graph.links[i].linkType == 'pseudoknot') {\n\t return;\n\t }\n\t }\n\n\t if (self.graph.links[i].source == mouseupNode && self.graph.links[i].target == mousedownNode || self.graph.links[i].source == mousedownNode && self.graph.links[i].target == mouseupNode) {\n\t if (self.graph.links[i].linkType == 'backbone') {\n\t return;\n\t }\n\t }\n\t }\n\n\t if (mouseupNode.nodeType == 'middle' || mousedownNode.nodeType == 'middle' || mouseupNode.nodeType == 'label' || mousedownNode.nodeType == 'label') return;\n\n\t self.addLink(newLink);\n\t }\n\t };\n\n\t var nodeMousedown = function nodeMousedown(d) {\n\t if (!d.selected && !ctrlKeydown) {\n\t // if this node isn't selected, then we have to unselect every other node\n\t var node = visNodes.selectAll('g.gnode').selectAll('.outline_node');\n\t node.classed('selected', function (p) {\n\t return p.selected = p.previouslySelected = false;\n\t });\n\t }\n\n\t _d2.default.select(this).classed('selected', function (p) {\n\t d.previouslySelected = d.selected;return d.selected = self.options.applyForce && true;\n\t });\n\n\t if (!shiftKeydown) {\n\t return;\n\t }\n\n\t mousedownNode = d;\n\n\t dragLine.attr('class', 'drag_line').attr('x1', mousedownNode.x).attr('y1', mousedownNode.y).attr('x2', mousedownNode.x).attr('y2', mousedownNode.y);\n\n\t //gnodes.attr('pointer-events', 'none');\n\t };\n\n\t self.startAnimation = function () {\n\t self.animation = true;\n\t vis.selectAll('g.gnode').call(drag);\n\t self.force.start();\n\t };\n\n\t self.stopAnimation = function () {\n\t self.animation = false;\n\t vis.selectAll('g.gnode').on('mousedown.drag', null);\n\t self.force.stop();\n\t };\n\n\t self.setFriction = function (value) {\n\t self.force.friction(value);\n\t self.resumeForce();\n\t };\n\n\t self.setCharge = function (value) {\n\t self.force.charge(value);\n\t self.resumeForce();\n\t };\n\n\t self.setGravity = function (value) {\n\t self.force.gravity(value);\n\t self.resumeForce();\n\t };\n\n\t self.setPseudoknotStrength = function (value) {\n\t self.linkStrengths.pseudoknot = value;\n\t self.update();\n\t };\n\n\t self.displayBackground = function (value) {\n\t self.displayParameters.displayBackground = value;\n\t self.updateStyle();\n\t };\n\n\t self.displayNumbering = function (value) {\n\t self.displayParameters.displayNumbering = value;\n\t self.updateStyle();\n\t };\n\n\t self.displayNodeOutline = function (value) {\n\t self.displayParameters.displayNodeOutline = value;\n\t self.updateStyle();\n\t };\n\n\t self.displayNodeLabel = function (value) {\n\t self.displayParameters.displayNodeLabel = value;\n\t self.updateStyle();\n\t };\n\n\t self.displayLinks = function (value) {\n\t self.displayParameters.displayLinks = value;\n\t self.updateStyle();\n\t };\n\n\t self.displayPseudoknotLinks = function (value) {\n\t self.displayParameters.displayPseudoknotLinks = value;\n\t self.updateStyle();\n\t };\n\n\t self.displayProteinLinks = function (value) {\n\t self.displayParameters.displayProteinLinks = value;\n\t self.updateStyle();\n\t };\n\n\t self.updateStyle = function () {\n\t // Background\n\t //rect.classed('transparent', !self.displayParameters.displayBackground);\n\t // Numbering\n\t visNodes.selectAll('[node_type=label]').classed('transparent', !self.displayParameters.displayNumbering);\n\t visNodes.selectAll('[label_type=label]').classed('transparent', !self.displayParameters.displayNumbering);\n\t visLinks.selectAll('[linkType=label_link]').classed('transparent', !self.displayParameters.displayNumbering);\n\t // Node Outline\n\t svg.selectAll('circle').classed('hidden_outline', !self.displayParameters.displayNodeOutline);\n\t // Node Labels\n\t visNodes.selectAll('[label_type=nucleotide]').classed('transparent', !self.displayParameters.displayNodeLabel);\n\t // Links\n\t svg.selectAll('[link_type=real],[link_type=basepair],[link_type=backbone],[link_type=pseudoknot],[link_type=protein_chain],[link_type=chain_chain],[link_type=external]').classed('transparent', !self.displayParameters.displayLinks);\n\t // Pseudoknot Links\n\t svg.selectAll('[link_type=pseudoknot]').classed('transparent', !self.displayParameters.displayPseudoknotLinks);\n\t // Protein Links\n\t svg.selectAll('[link_type=protein_chain]').classed('transparent', !self.displayParameters.displayProteinLinks);\n\t // Fake Links\n\t visLinks.selectAll('[link_type=fake]').classed('transparent', !self.options.displayAllLinks);\n\t visLinks.selectAll('[link_type=fake_fake]').classed('transparent', !self.options.displayAllLinks);\n\t };\n\n\t function nudge(dx, dy) {\n\t node.filter(function (d) {\n\t return d.selected;\n\t }).attr('cx', function (d) {\n\t return d.x += dx;\n\t }).attr('cy', function (d) {\n\t return d.y += dy;\n\t });\n\n\t link.filter(function (d) {\n\t return d.source.selected;\n\t }).attr('x1', function (d) {\n\t return d.source.x;\n\t }).attr('y1', function (d) {\n\t return d.source.y;\n\t });\n\n\t link.filter(function (d) {\n\t return d.target.selected;\n\t }).attr('x2', function (d) {\n\t return d.target.x;\n\t }).attr('y2', function (d) {\n\t return d.target.y;\n\t });\n\n\t _d2.default.event.preventDefault();\n\t }\n\n\t self.createNewLinks = function (linksEnter) {\n\t var linkLines = linksEnter.append('svg:line');\n\n\t linkLines.append('svg:title').text(linkKey);\n\n\t linkLines.classed('link', true).attr('x1', function (d) {\n\t return d.source.x;\n\t }).attr('y1', function (d) {\n\t return d.source.y;\n\t }).attr('x2', function (d) {\n\t return d.target.x;\n\t }).attr('y2', function (d) {\n\t return d.target.y;\n\t }).attr('link_type', function (d) {\n\t return d.linkType;\n\t }).attr('class', function (d) {\n\t return _d2.default.select(this).attr('class') + ' ' + d.linkType;\n\t }).attr('pointer-events', function (d) {\n\t if (d.linkType == 'fake') return 'none';else return 'all';\n\t });\n\n\t /* We don't need to update the positions of the stabilizing links */\n\t /*\n\t basepairLinks = visLinks.selectAll('[link_type=basepair]');\n\t basepairLinks.classed('basepair', true);\n\t fakeLinks = visLinks.selectAll('[link_type=fake]')\n\t fakeLinks.classed('fake', true);\n\t intermolecule_links = vis_links.selectAll('[link_type=intermolecule]');\n\t intermolecule_links.classed('intermolecule', true);\n\t plink = vis_links.selectAll('[link_type=protein_chain],[link_type=chain_chain]');\n\t plink.classed('chain_chain', true);\n\t */\n\n\t return linkLines;\n\t };\n\n\t self.createNewNodes = function (gnodesEnter) {\n\t gnodesEnter = gnodesEnter.append('g').classed('noselect', true).classed('gnode', true).attr('struct_name', function (d) {\n\t return d.structName;\n\t }).attr('transform', function (d) {\n\t if (typeof d.x != 'undefined' && typeof d.y != 'undefined') return 'translate(' + [d.x, d.y] + ')';else return '';\n\t }).each(function (d) {\n\t d.selected = d.previouslySelected = false;\n\t });\n\n\t gnodesEnter.call(drag).on('mousedown', nodeMousedown).on('mousedrag', function (d) {}).on('mouseup', nodeMouseup).attr('num', function (d) {\n\t return 'n' + d.num;\n\t }).attr('rnum', function (d) {\n\t return 'n' + (d.rna.rnaLength - d.num + 1);\n\t }).on('click', nodeMouseclick).transition().duration(750).ease('elastic');\n\n\t // create nodes behind the circles which will serve to highlight them\n\t var labelAndProteinNodes = gnodesEnter.filter(function (d) {\n\t return d.nodeType == 'label' || d.nodeType == 'protein';\n\t });\n\n\t var nucleotideNodes = gnodesEnter.filter(function (d) {\n\t return d.nodeType == 'nucleotide';\n\t });\n\n\t labelAndProteinNodes.append('svg:circle').attr('class', 'outline_node').attr('r', function (d) {\n\t return d.radius + 1;\n\t });\n\n\t nucleotideNodes.append('svg:circle').attr('class', 'outline_node').attr('r', function (d) {\n\t return d.radius + 1;\n\t });\n\n\t labelAndProteinNodes.append('svg:circle').attr('class', 'node').classed('label', function (d) {\n\t return d.nodeType == 'label';\n\t }).attr('r', function (d) {\n\t if (d.nodeType == 'middle') return 0;else {\n\t return d.radius;\n\t }\n\t }).attr('node_type', function (d) {\n\t return d.nodeType;\n\t }).attr('node_num', function (d) {\n\t return d.num;\n\t });\n\n\t nucleotideNodes.append('svg:circle').attr('class', 'node').attr('node_type', function (d) {\n\t return d.nodeType;\n\t }).attr('node_num', function (d) {\n\t return d.num;\n\t }).attr('r', function (d) {\n\t return d.radius;\n\t }).append('svg:title').text(function (d) {\n\t if (d.nodeType == 'nucleotide') {\n\t return d.structName + ':' + d.num;\n\t } else {\n\t return '';\n\t }\n\t });\n\n\t nucleotideNodes.append('svg:path').attr('class', 'node').attr('node_type', function (d) {\n\t return d.nodeType;\n\t }).attr('node_num', function (d) {\n\t return d.num;\n\t }).append('svg:title').text(function (d) {\n\t if (d.nodeType == 'nucleotide') {\n\t return d.structName + ':' + d.num;\n\t } else {\n\t return '';\n\t }\n\t });\n\n\t var labelsEnter = gnodesEnter.append('text').text(function (d) {\n\t return d.name;\n\t }).attr('text-anchor', 'middle').attr('font-size', 8.0).attr('font-weight', 'bold').attr('y', 2.5).attr('class', 'node-label').attr('label_type', function (d) {\n\t return d.nodeType;\n\t });\n\n\t /*\n\t labelsEnter.text(function(d) {\n\t return d.num;\n\t });\n\t */\n\n\t labelsEnter.append('svg:title').text(function (d) {\n\t if (d.nodeType == 'nucleotide') {\n\t return d.structName + ':' + d.num;\n\t } else {\n\t return '';\n\t }\n\t });\n\n\t return gnodesEnter;\n\t };\n\n\t var nodeTooltip = function nodeTooltip(d) {\n\t nodeTooltips = {};\n\n\t nodeTooltips.nucleotide = d.num;\n\t nodeTooltips.label = '';\n\t nodeTooltips.pseudo = '';\n\t nodeTooltips.middle = '';\n\t nodeTooltips.protein = d.structName;\n\n\t return nodeTooltips[d.nodeType];\n\t };\n\n\t self.update = function () {\n\t self.force.nodes(self.graph.nodes).links(self.graph.links);\n\n\t if (self.animation) {\n\t self.force.start();\n\t }\n\n\t var allLinks = visLinks.selectAll('line.link').data(self.graph.links.filter(realLinkFilter), linkKey);\n\n\t allLinks.attr('class', '').classed('link', true).attr('link_type', function (d) {\n\t return d.linkType;\n\t }).attr('class', function (d) {\n\t return _d2.default.select(this).attr('class') + ' ' + d.linkType;\n\t });\n\n\t var linksEnter = allLinks.enter();\n\t self.createNewLinks(linksEnter);\n\n\t allLinks.exit().remove();\n\n\t var domain = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];\n\t var colors = _d2.default.scale.category10().domain(domain);\n\n\t var gnodes = visNodes.selectAll('g.gnode').data(self.graph.nodes, nodeKey);\n\t //.attr('pointer-events', 'all');\n\n\t var gnodesEnter = gnodes.enter();\n\n\t self.createNewNodes(gnodesEnter);\n\t gnodes.exit().remove();\n\n\t //fake_nodes = self.graph.nodes.filter(function(d) { return d.nodeType == 'middle'; });\n\t //fakeNodes = self.graph.nodes.filter(function(d) { return true; });\n\t var realNodes = self.graph.nodes.filter(function (d) {\n\t return d.nodeType == 'nucleotide' || d.nodeType == 'label';\n\t });\n\n\t var xlink;\n\t if (self.displayFakeLinks) xlink = allLinks;else xlink = visLinks.selectAll('[link_type=real],[link_type=pseudoknot],[link_type=protein_chain],[link_type=chain_chain],[link_type=label_link],[link_type=backbone],[link_type=basepair],[link_type=intermolecule],[link_type=external]');\n\n\t var position;\n\n\t gnodes.selectAll('path').each(positionAnyNode);\n\n\t xlink.on('click', linkClick);\n\n\t self.force.on('tick', function () {\n\t var q = _d2.default.geom.quadtree(realNodes);\n\t var i = 0;\n\t var n = realNodes.length;\n\n\t while (++i < n) {\n\t q.visit(collide(realNodes[i]));\n\t }xlink.attr('x1', function (d) {\n\t return d.source.x;\n\t }).attr('y1', function (d) {\n\t return d.source.y;\n\t }).attr('x2', function (d) {\n\t return d.target.x;\n\t }).attr('y2', function (d) {\n\t return d.target.y;\n\t });\n\n\t // Translate the groups\n\t gnodes.attr('transform', function (d) {\n\t return 'translate(' + [d.x, d.y] + ')';\n\t });\n\n\t gnodes.select('path').each(positionAnyNode);\n\t });\n\n\t self.changeColorScheme(self.colorScheme);\n\n\t if (self.animation) {\n\t self.force.start();\n\t }\n\n\t self.updateStyle();\n\t };\n\n\t self.setSize();\n\t}\n\n\t/************************* END FORNAF **********************************/\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.ProteinGraph = ProteinGraph;\n\texports.RNAGraph = RNAGraph;\n\texports.moleculesToJson = moleculesToJson;\n\n\tvar _rnautils = __webpack_require__(2);\n\n\tvar numberSort = function numberSort(a, b) {\n\t return a - b;\n\t};\n\n\tfunction generateUUID() {\n\t /* Stack Overflow: \n\t * http://stackoverflow.com/a/8809472/899470 \n\t */\n\t var d = new Date().getTime();\n\t var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n\t var r = (d + Math.random() * 16) % 16 | 0;\n\t d = Math.floor(d / 16);\n\t return (c == 'x' ? r : r & 0x3 | 0x8).toString(16);\n\t });\n\n\t return uuid;\n\t}\n\n\tfunction isNormalInteger(str) {\n\t //http://stackoverflow.com/a/10834843/899470\n\t return (/^\\+?(0|[1-9]\\d*)$/.test(str)\n\t );\n\t}\n\n\tif (typeof String.prototype.trim === 'undefined') {\n\t String.prototype.trim = function () {\n\t return String(this).replace(/^\\s+|\\s+$/g, '');\n\t };\n\t}\n\n\tfunction ProteinGraph(structName, size, uid) {\n\t var self = this;\n\n\t self.type = 'protein';\n\t self.size = size;\n\t self.nodes = [{ 'name': 'P',\n\t 'num': 1,\n\t 'radius': 3 * Math.sqrt(size),\n\t 'rna': self,\n\t 'nodeType': 'protein',\n\t 'structName': structName,\n\t 'elemType': 'p',\n\t 'size': size,\n\t 'uid': generateUUID() }];\n\n\t self.links = [];\n\t self.uid = generateUUID();\n\n\t self.addUids = function (uids) {\n\t for (var i = 0; i < uids.length; i++) {\n\t self.nodes[i].uid = uids[i];\n\t }return self;\n\t };\n\n\t self.getUids = function () {\n\t /* Get the positions of each node so that they\n\t * can be passed to elementsToJson later\n\t */\n\t uids = [];\n\t for (var i = 0; i < self.dotbracket.length; i++) {\n\t uids.push(self.nodes[i].uid);\n\t }return uids;\n\t };\n\t}\n\n\tfunction RNAGraph(seq, dotbracket, structName, startNumber) {\n\t var self = this;\n\n\t self.type = 'rna';\n\t self.circularizeExternal = false;\n\n\t if (arguments.length === 0) {\n\t self.seq = '';\n\t self.dotbracket = '';\n\t self.structName = '';\n\t } else {\n\t self.seq = seq;\n\t self.dotbracket = dotbracket; //i.e. ..((..))..\n\t self.structName = structName;\n\t }\n\n\t if (arguments.length < 4) {\n\t startNumber = 1;\n\t }\n\n\t self.circular = false;\n\n\t if (self.dotbracket.length > 0 && self.dotbracket[self.dotbracket.length - 1] == '*') {\n\t //circular RNA\n\t self.dotbracket = self.dotbracket.slice(0, self.dotbracket.length - 1);\n\t self.circular = true;\n\t }\n\n\t self.uid = generateUUID();\n\n\t self.elements = []; //store the elements and the \n\t //nucleotides they contain\n\t self.pseudoknotPairs = [];\n\t self.nucsToNodes = {};\n\n\t self.addUids = function (uids) {\n\t var nucleotideNodes = self.nodes.filter(function (d) {\n\t return d.nodeType == 'nucleotide';\n\t });\n\n\t for (var i = 0; i < uids.length && i < nucleotideNodes.length; i++) {\n\t nucleotideNodes[i].uid = uids[i];\n\t }return self;\n\t };\n\n\t self.computePairtable = function () {\n\t self.pairtable = _rnautils.rnaUtilities.dotbracketToPairtable(self.dotbracket);\n\t };\n\n\t self.removeBreaks = function (targetString) {\n\t // Remove all chain breaks (denoted with a '&', which indicate\n\t // that the input represents more than one strand)\n\t var breaks = [];\n\t var breakIndex = -1;\n\n\t while ((breakIndex = targetString.indexOf('&')) >= 0) {\n\t breaks.push(breakIndex);\n\t targetString = targetString.substring(0, breakIndex) + 'oo' + targetString.substring(breakIndex + 1, targetString.length);\n\t }\n\n\t return { targetString: targetString, breaks: breaks };\n\t };\n\n\t var ret = self.removeBreaks(self.dotbracket);\n\t self.dotbracket = ret.targetString;\n\t self.dotBracketBreaks = ret.breaks;\n\n\t ret = self.removeBreaks(self.seq);\n\t self.seq = ret.targetString;\n\t self.seqBreaks = ret.breaks;\n\n\t self.calculateStartNumberArray = function () {\n\t self.startNumberArray = [];\n\t var breaks = 0;\n\n\t for (var i = 0; i < self.dotbracket.length; i++) {\n\t self.startNumberArray.push(startNumber);\n\n\t if (self.dotbracket[i] == 'o') {\n\t startNumber = -i;\n\t }\n\t }\n\t };\n\n\t self.calculateStartNumberArray();\n\n\t self.rnaLength = self.dotbracket.length;\n\n\t if (!(0, _rnautils.arraysEqual)(self.dotBracketBreaks, self.seqBreaks)) {\n\t console.log('WARNING: Sequence and structure breaks not equal');\n\t console.log('WARNING: Using the breaks in the structure');\n\t }\n\n\t self.computePairtable();\n\n\t self.addPositions = function (nodeType, positions) {\n\t var labelNodes = self.nodes.filter(function (d) {\n\t return d.nodeType == nodeType;\n\t });\n\n\t for (var i = 0; i < labelNodes.length; i++) {\n\t labelNodes[i].x = positions[i][0];\n\t labelNodes[i].px = positions[i][0];\n\t labelNodes[i].y = positions[i][1];\n\t labelNodes[i].py = positions[i][1];\n\t }\n\n\t return self;\n\t };\n\n\t self.breakNodesToFakeNodes = function () {\n\t // convert all the nodes following breaks to fake nodes\n\t var labelNodes = self.nodes.filter(function (d) {\n\t return d.nodeType == 'nucleotide';\n\t });\n\n\t // if a node was an artifical break node, convert it to a middle\n\t for (var i = 0; i < labelNodes.length; i++) {\n\t if (self.dotbracket[i] == 'o') labelNodes[i].nodeType = 'middle';\n\t }\n\n\t for (var i = 0; i < self.elements.length; i++) {\n\t var broken = false;\n\n\t // change the elemType of the other nodes in the element containing\n\t // the break\n\t for (var j = 0; j < self.elements[i][2].length; j++) {\n\t if (self.dotBracketBreaks.indexOf(self.elements[i][2][j]) >= 0) broken = true;\n\t }\n\n\t if (broken) {\n\t self.elements[i][2].map(function (x) {\n\t if (x == 0) return;\n\t self.nodes[x - 1].elemType = 'e';\n\t });\n\t } else {\n\t self.elements[i][2].map(function (x) {\n\t if (x == 0) return;\n\t self.nodes[x - 1].elemType = self.elements[i][0];\n\t });\n\t }\n\t }\n\t return self;\n\t };\n\n\t self.getPositions = function (nodeType) {\n\t var positions = [];\n\t var nucleotideNodes = self.nodes.filter(function (d) {\n\t return d.nodeType == nodeType;\n\t });\n\n\t for (var i = 0; i < nucleotideNodes.length; i++) {\n\t positions.push([nucleotideNodes[i].x, nucleotideNodes[i].y]);\n\t }return positions;\n\t };\n\n\t self.getUids = function () {\n\t /* Get the positions of each node so that they\n\t * can be passed to elementsToJson later\n\t */\n\t var uids = [];\n\t for (var i = 0; i < self.dotbracket.length; i++) {\n\t uids.push(self.nodes[i].uid);\n\t }return uids;\n\t };\n\n\t self.reinforceStems = function () {\n\t var pt = self.pairtable;\n\t var relevantElements = self.elements.filter(function (d) {\n\t return d[0] == 's' && d[2].length >= 4;\n\t });\n\n\t for (var i = 0; i < relevantElements.length; i++) {\n\t var allNucs = relevantElements[i][2];\n\t var nucs = allNucs.slice(0, allNucs.length / 2);\n\n\t for (var j = 0; j < nucs.length - 1; j++) {\n\t self.addFakeNode([nucs[j], nucs[j + 1], pt[nucs[j + 1]], pt[nucs[j]]]);\n\t }\n\t }\n\n\t return self;\n\t };\n\n\t self.reinforceLoops = function () {\n\t /* \n\t * Add a set of fake nodes to enforce the structure\n\t */\n\t var filterNucs = function filterNucs(d) {\n\t return d !== 0 && d <= self.dotbracket.length;\n\t };\n\n\t for (var i = 0; i < self.elements.length; i++) {\n\t if (self.elements[i][0] == 's' || !self.circularizeExternal && self.elements[i][0] == 'e') continue;\n\n\t var nucs = self.elements[i][2].filter(filterNucs);\n\n\t if (self.elements[i][0] == 'e') {\n\t var newNode1 = { 'name': '',\n\t 'num': -3,\n\t //'radius': 18 * radius -6,\n\t 'radius': 0,\n\t 'rna': self,\n\t 'nodeType': 'middle',\n\t 'elemType': 'f',\n\t 'nucs': [],\n\t 'x': self.nodes[self.rnaLength - 1].x,\n\t 'y': self.nodes[self.rnaLength - 1].y,\n\t 'px': self.nodes[self.rnaLength - 1].px,\n\t 'py': self.nodes[self.rnaLength - 1].py,\n\t 'uid': generateUUID() };\n\t var newNode2 = { 'name': '',\n\t 'num': -2,\n\t //'radius': 18 * radius -6,\n\t 'radius': 0,\n\t 'rna': self,\n\t 'nodeType': 'middle',\n\t 'elemType': 'f',\n\t 'nucs': [],\n\t 'x': self.nodes[0].x,\n\t 'y': self.nodes[0].y,\n\t 'px': self.nodes[0].px,\n\t 'py': self.nodes[0].py,\n\t 'uid': generateUUID() };\n\n\t nucs.push(self.nodes.length + 1);\n\t nucs.push(self.nodes.length + 2);\n\t self.nodes.push(newNode1);\n\t self.nodes.push(newNode2);\n\t }\n\n\t self.addFakeNode(nucs);\n\t }\n\n\t return self;\n\t };\n\n\t self.updateLinkUids = function () {\n\t for (var i = 0; i < self.links.length; i++) {\n\t self.links[i].uid = self.links[i].source.uid + self.links[i].target.uid;\n\t }\n\n\t return self;\n\t };\n\n\t self.addFakeNode = function (nucs) {\n\t var linkLength = 18; //make sure this is consistent with the value in force.js\n\t var nodeWidth = 6;\n\t var angle = 3.1415 * 2 / (2 * nucs.length);\n\t var radius = linkLength / (2 * Math.tan(angle));\n\n\t var fakeNodeUid = '';\n\n\t for (var i = 0; i < nucs.length; i++) {\n\t fakeNodeUid += self.nodes[nucs[i] - 1].uid;\n\t }var newNode = { 'name': '',\n\t 'num': -1,\n\t //'radius': 18 * radius -6,\n\t 'radius': radius,\n\t 'rna': self,\n\t 'nodeType': 'middle',\n\t 'elemType': 'f',\n\t 'nucs': nucs,\n\t 'uid': fakeNodeUid };\n\t self.nodes.push(newNode);\n\n\t var newX = 0;\n\t var newY = 0;\n\t var coordsCounted = 0;\n\n\t angle = (nucs.length - 2) * 3.14159 / (2 * nucs.length);\n\t radius = 0.5 / Math.cos(angle);\n\n\t for (var j = 0; j < nucs.length; j++) {\n\t if (nucs[j] === 0 || nucs[j] > self.dotbracket.length) continue;\n\n\t //link to the center node\n\t self.links.push({ 'source': self.nodes[nucs[j] - 1],\n\t 'target': self.nodes[self.nodes.length - 1],\n\t 'linkType': 'fake',\n\t 'value': radius,\n\t 'uid': generateUUID() });\n\n\t if (nucs.length > 4) {\n\t //link across the loop\n\t self.links.push({ 'source': self.nodes[nucs[j] - 1],\n\t 'target': self.nodes[nucs[(j + Math.floor(nucs.length / 2)) % nucs.length] - 1],\n\t 'linkType': 'fake',\n\t 'value': radius * 2,\n\t 'uid': generateUUID() });\n\t }\n\n\t var ia = (nucs.length - 2) * 3.14159 / nucs.length;\n\t var c = 2 * Math.cos(3.14159 / 2 - ia / 2);\n\t //link to over-neighbor\n\t self.links.push({ 'source': self.nodes[nucs[j] - 1],\n\t 'target': self.nodes[nucs[(j + 2) % nucs.length] - 1],\n\t 'linkType': 'fake',\n\t 'value': c });\n\n\t // calculate the mean of the coordinats in this loop\n\t // and place the fake node there\n\t var fromNode = self.nodes[nucs[j] - 1];\n\t if ('x' in fromNode) {\n\t newX += fromNode.x;\n\t newY += fromNode.y;\n\n\t coordsCounted += 1;\n\t }\n\t }\n\n\t if (coordsCounted > 0) {\n\t // the nucleotides had set positions so we can calculate the position\n\t // of the fake node\n\t newNode.x = newX / coordsCounted;\n\t newNode.y = newY / coordsCounted;\n\t newNode.px = newNode.x;\n\t newNode.py = newNode.y;\n\t }\n\n\t return self;\n\t };\n\n\t self.connectFakeNodes = function () {\n\t var linkLength = 18;\n\n\t // We want to be able to connect all of the fake nodes\n\t // and create a structure consisting of just them\n\t var filterOutNonFakeNodes = function filterOutNonFakeNodes(d) {\n\t return d.nodeType == 'middle';\n\t };\n\n\t var nucsToNodes = {};\n\t var fakeNodes = self.nodes.filter(filterOutNonFakeNodes);\n\t var linked = new Set();\n\n\t // initialize the nucleotides to nodes\n\t for (var i = 1; i <= self.nodes.length; i++) {\n\t nucsToNodes[i] = [];\n\t }for (var i = 0; i < fakeNodes.length; i++) {\n\t var thisNode = fakeNodes[i];\n\n\t // each fake node represents a certain set of nucleotides (thisNode.nucs)\n\t for (var j = 0; j < thisNode.nucs.length; j++) {\n\t var thisNuc = thisNode.nucs[j];\n\n\t // check to see if this nucleotide has been seen in another fake node\n\t // if it has, then we add a link between the two nodes\n\t for (var k = 0; k < nucsToNodes[thisNuc].length; k++) {\n\t if (linked.has(JSON.stringify([nucsToNodes[thisNuc][k].uid, thisNode.uid].sort()))) continue; //already linked\n\n\t var distance = nucsToNodes[thisNuc][k].radius + thisNode.radius;\n\n\t self.links.push({ 'source': nucsToNodes[thisNuc][k],\n\t 'target': thisNode,\n\t 'value': distance / linkLength,\n\t 'linkType': 'fake_fake' });\n\n\t // note that we've already seen this link\n\t linked.add(JSON.stringify([nucsToNodes[thisNuc][k].uid, thisNode.uid].sort()));\n\t }\n\n\t nucsToNodes[thisNuc].push(thisNode);\n\t }\n\t }\n\n\t return self;\n\t };\n\n\t self.addExtraLinks = function (extraLinks) {\n\t if (typeof extraLinks == 'undefined') return self;\n\n\t for (var i = 0; i < extraLinks.length; i++) {\n\t var source = self.getNodeFromNucleotides(extraLinks[i].from);\n\t var target = self.getNodeFromNucleotides(extraLinks[i].to);\n\n\t var newLink = { 'source': source, 'target': target, 'linkType': 'extra',\n\t 'extraLinkType': extraLinks[i].linkType, 'uid': generateUUID() };\n\n\t self.links.push(newLink);\n\t }\n\n\t return self;\n\t };\n\n\t self.elementsToJson = function () {\n\t /* Convert a set of secondary structure elements to a json\n\t * representation of the graph that can be used with d3's\n\t * force-directed layout to generate a visualization of \n\t * the structure.\n\t */\n\t var pt = self.pairtable;\n\t var elements = self.elements;\n\n\t self.nodes = [];\n\t self.links = [];\n\n\t //create a reverse lookup so we can find out the type\n\t //of element that a node is part of\n\t var elemTypes = {};\n\n\t //sort so that we count stems last\n\t self.elements.sort();\n\n\t for (var i = 0; i < self.elements.length; i++) {\n\t var nucs = self.elements[i][2];\n\t for (var j = 0; j < nucs.length; j++) {\n\t elemTypes[nucs[j]] = self.elements[i][0];\n\t }\n\t }\n\n\t for (var i = 1; i <= pt[0]; i++) {\n\t var nodeName = self.seq[i - 1];\n\n\t if (self.dotBracketBreaks.indexOf(i - 1) >= 0 || self.dotBracketBreaks.indexOf(i - 2) >= 0) {\n\t nodeName = '';\n\t }\n\n\t //create a node for each nucleotide\n\t self.nodes.push({ 'name': nodeName,\n\t 'num': i + self.startNumberArray[i - 1] - 1,\n\t 'radius': 5,\n\t 'rna': self,\n\t 'nodeType': 'nucleotide',\n\t 'structName': self.structName,\n\t 'elemType': elemTypes[i],\n\t 'uid': generateUUID(),\n\t 'linked': false });\n\t }\n\n\t for (var i = 0; i < self.nodes.length; i++) {\n\t if (i === 0) self.nodes[i].prevNode = null;else {\n\t self.nodes[i].prevNode = self.nodes[i - 1];\n\t }\n\n\t if (i == self.nodes.length - 1) self.nodes[i].nextNode = null;else {\n\t self.nodes[i].nextNode = self.nodes[i + 1];\n\t }\n\t }\n\n\t for (var i = 1; i <= pt[0]; i++) {\n\n\t if (pt[i] !== 0) {\n\t // base-pair links\n\t self.links.push({ 'source': self.nodes[i - 1],\n\t 'target': self.nodes[pt[i] - 1],\n\t 'linkType': 'basepair',\n\t 'value': 1,\n\t 'uid': generateUUID() });\n\t }\n\n\t if (i > 1) {\n\t // backbone links\n\t if (self.dotBracketBreaks.indexOf(i - 1) === -1 && self.dotBracketBreaks.indexOf(i - 2) == -1 && self.dotBracketBreaks.indexOf(i - 3) == -1) {\n\t // there is no break in the strands here\n\t // we can add a backbone link\n\t self.links.push({ 'source': self.nodes[i - 2],\n\t 'target': self.nodes[i - 1],\n\t 'linkType': 'backbone',\n\t 'value': 1,\n\t 'uid': generateUUID() });\n\t self.nodes[i - 1].linked = true;\n\t }\n\t }\n\t }\n\n\t //add the pseudoknot links\n\t for (var i = 0; i < self.pseudoknotPairs.length; i++) {\n\t self.links.push({ 'source': self.nodes[self.pseudoknotPairs[i][0] - 1],\n\t 'target': self.nodes[self.pseudoknotPairs[i][1] - 1],\n\t 'linkType': 'pseudoknot',\n\t 'value': 1,\n\t 'uid': generateUUID() });\n\t }\n\n\t if (self.circular) {\n\t self.links.push({ 'source': self.nodes[0],\n\t 'target': self.nodes[self.rnaLength - 1],\n\t 'linkType': 'backbone',\n\t 'value': 1,\n\t 'uid': generateUUID() });\n\t }\n\n\t return self;\n\t };\n\n\t self.ptToElements = function (pt, level, i, j) {\n\t /* Convert a pair table to a list of secondary structure \n\t * elements:\n\t *\n\t * [['s',1,[2,3]]\n\t *\n\t * The 's' indicates that an element can be a stem. It can also be\n\t * an interior loop ('i'), a hairpin loop ('h') or a multiloop ('m')\n\t *\n\t * The second number (1 in this case) indicates the depth or\n\t * how many base pairs have to be broken to get to this element.\n\t *\n\t * Finally, there is the list of nucleotides which are part of\n\t * of this element.\n\t */\n\t var elements = [];\n\t var u5 = [i - 1];\n\t var u3 = [j + 1];\n\n\t if (i > j) return [];\n\n\t //iterate over the unpaired regions on either side\n\t //this is either 5' and 3' unpaired if level == 0\n\t //or an interior loop or a multiloop\n\t for (; pt[i] === 0; i++) {\n\t u5.push(i);\n\t }\n\t for (; pt[j] === 0; j--) {\n\t u3.push(j);\n\t }\n\n\t if (i > j) {\n\t //hairpin loop or one large unpaired molecule\n\t u5.push(i);\n\t if (level === 0) return [['e', level, u5.sort(numberSort)]];else {\n\t // check to see if we have chain breaks due\n\t // to multiple strands in the input\n\t var external = false;\n\t var left = [];\n\t var right = [];\n\t for (var k = 0; k < u5.length; k++) {\n\t if (external) right.push(u5[k]);else left.push(u5[k]);\n\n\t if (self.dotBracketBreaks.indexOf(u5[k]) >= 0) external = true;\n\t }\n\n\t if (external) {\n\t return [['h', level, u5.sort(numberSort)]];\n\t } else\n\t // if not, this is a simple hairpin loop\n\t return [['h', level, u5.sort(numberSort)]];\n\t }\n\t }\n\n\t if (pt[i] != j) {\n\t //multiloop\n\t var m = u5;\n\t var k = i;\n\n\t // the nucleotide before and the starting nucleotide\n\t m.push(k);\n\t while (k <= j) {\n\t // recurse into a stem\n\t elements = elements.concat(self.ptToElements(pt, level, k, pt[k]));\n\n\t // add the nucleotides between stems\n\t m.push(pt[k]);\n\t k = pt[k] + 1;\n\t for (; pt[k] === 0 && k <= j; k++) {\n\t m.push(k);\n\t }\n\t m.push(k);\n\t }\n\t m.pop();\n\t m = m.concat(u3);\n\n\t if (m.length > 0) {\n\t if (level === 0) elements.push(['e', level, m.sort(numberSort)]);else elements.push(['m', level, m.sort(numberSort)]);\n\t }\n\n\t return elements;\n\t }\n\n\t if (pt[i] === j) {\n\t //interior loop\n\t u5.push(i);\n\t u3.push(j);\n\n\t var combined = u5.concat(u3);\n\t if (combined.length > 4) {\n\t if (level === 0) elements.push(['e', level, u5.concat(u3).sort(numberSort)]);else elements.push(['i', level, u5.concat(u3).sort(numberSort)]);\n\t }\n\t }\n\n\t var s = [];\n\t //go through the stem\n\t while (pt[i] === j && i < j) {\n\t //one stem\n\t s.push(i);\n\t s.push(j);\n\n\t i += 1;\n\t j -= 1;\n\n\t level += 1;\n\t }\n\n\t u5 = [i - 1];\n\t u3 = [j + 1];\n\t elements.push(['s', level, s.sort(numberSort)]);\n\n\t return elements.concat(self.ptToElements(pt, level, i, j));\n\t };\n\n\t self.addLabels = function (startNumber, labelInterval) {\n\t if (arguments.length === 0) {\n\t startNumber = 1;\n\t labelInterval = 10;\n\t }\n\n\t if (arguments.length === 1) labelInterval = 10;\n\n\t if (labelInterval === 0) return self;\n\n\t if (labelInterval <= 0) console.log('The label interval entered in invalid:', labelInterval);\n\n\t for (var i = 1; i <= self.pairtable[0]; i++) {\n\t // add labels\n\t if (i % labelInterval === 0) {\n\t //create a node for each label\n\t var newX, newY;\n\n\t var thisNode = self.nodes[i - 1];\n\t var prevNode, nextNode;\n\t var prevVec, nextVec;\n\n\t if (self.rnaLength == 1) {\n\t nextVec = [thisNode.x - 15, thisNode.y];\n\t prevVec = [thisNode.x - 15, thisNode.y];\n\t } else {\n\t // if we're labelling the first node, then label it in relation to the last\n\t if (i == 1) prevNode = self.nodes[self.rnaLength - 1];else prevNode = self.nodes[i - 2];\n\n\t // if we're labelling the last node, then label it in relation to the first\n\t if (i == self.rnaLength) nextNode = self.nodes[0];else nextNode = self.nodes[i];\n\n\t // this nucleotide and its neighbors are paired\n\t if (self.pairtable[nextNode.num] !== 0 && self.pairtable[prevNode.num] !== 0 && self.pairtable[thisNode.num] !== 0) {\n\t prevNode = nextNode = self.nodes[self.pairtable[thisNode.num] - 1];\n\t }\n\n\t // this node is paired but at least one of its neighbors is unpaired\n\t // place the label in the direction of the two neighbors\n\t if (self.pairtable[thisNode.num] !== 0 && (self.pairtable[nextNode.num] === 0 || self.pairtable[prevNode.num] === 0)) {\n\t nextVec = [thisNode.x - nextNode.x, thisNode.y - nextNode.y];\n\t prevVec = [thisNode.x - prevNode.x, thisNode.y - prevNode.y];\n\t } else {\n\t nextVec = [nextNode.x - thisNode.x, nextNode.y - thisNode.y];\n\t prevVec = [prevNode.x - thisNode.x, prevNode.y - thisNode.y];\n\t }\n\t }\n\n\t var combinedVec = [nextVec[0] + prevVec[0], nextVec[1] + prevVec[1]];\n\t var vecLength = Math.sqrt(combinedVec[0] * combinedVec[0] + combinedVec[1] * combinedVec[1]);\n\t var normedVec = [combinedVec[0] / vecLength, combinedVec[1] / vecLength];\n\t var offsetVec = [-15 * normedVec[0], -15 * normedVec[1]];\n\n\t var newX = self.nodes[i - 1].x + offsetVec[0];\n\t var newY = self.nodes[i - 1].y + offsetVec[1];\n\n\t var newNode = { 'name': i + self.startNumberArray[i - 1] - 1,\n\t 'num': -1,\n\t 'radius': 6,\n\t 'rna': self,\n\t 'nodeType': 'label',\n\t 'structName': self.structName,\n\t 'elemType': 'l',\n\t 'x': newX,\n\t 'y': newY,\n\t 'px': newX,\n\t 'py': newY,\n\t 'uid': generateUUID() };\n\t var newLink = { 'source': self.nodes[i - 1],\n\t 'target': newNode,\n\t 'value': 1,\n\t 'linkType': 'label_link',\n\t 'uid': generateUUID() };\n\n\t self.nodes.push(newNode);\n\t self.links.push(newLink);\n\t }\n\t }\n\n\t return self;\n\t };\n\n\t self.recalculateElements = function () {\n\t self.removePseudoknots();\n\t self.elements = self.ptToElements(self.pairtable, 0, 1, self.dotbracket.length);\n\n\t if (self.circular) {\n\t //check to see if the external loop is a hairpin or a multiloop\n\t externalLoop = self.elements.filter(function (d) {\n\t if (d[0] == 'e') return true;\n\t });\n\n\t if (externalLoop.length > 0) {\n\t eloop = externalLoop[0];\n\t nucs = eloop[2].sort(numberSort);\n\n\t prev = nucs[0];\n\t hloop = true;\n\t numGreater = 0;\n\t for (var i = 1; i < nucs.length; i++) {\n\t if (nucs[i] - prev > 1) {\n\t numGreater += 1;\n\t }\n\t prev = nucs[i];\n\t }\n\n\t if (numGreater == 1) {\n\t eloop[0] = 'h';\n\t } else if (numGreater == 2) {\n\t eloop[0] = 'i';\n\t } else {\n\t eloop[0] = 'm';\n\t }\n\t }\n\t }\n\n\t return self;\n\t };\n\n\t self.reassignLinkUids = function () {\n\t // reassign uids to the links, corresponding to the uids of the two nodes\n\t // they connect\n\t var i;\n\n\t for (var i = 0; i < self.links.length; i++) {\n\t self.links[i].uid = self.links[i].source.uid + self.links[i].target.uid;\n\t }\n\n\t return self;\n\t };\n\n\t self.removePseudoknots = function () {\n\t if (self.pairtable.length > 1) self.pseudoknotPairs = self.pseudoknotPairs.concat(_rnautils.rnaUtilities.removePseudoknotsFromPairtable(self.pairtable));\n\n\t return self;\n\t };\n\n\t self.addPseudoknots = function () {\n\t /* Add all of the pseudoknot pairs which are stored outside\n\t * of the pairtable back to the pairtable\n\t */\n\t var pt = self.pairtable;\n\t var pseudoknotPairs = self.pseudoknotPairs;\n\n\t for (var i = 0; i < pseudoknotPairs.length; i++) {\n\t pt[pseudoknotPairs[i][0]] = pseudoknotPairs[i][1];\n\t pt[pseudoknotPairs[i][1]] = pseudoknotPairs[i][0];\n\t }\n\n\t self.pseudoknotPairs = [];\n\t return self;\n\t };\n\n\t self.addName = function (name) {\n\t if (typeof name == 'undefined') {\n\t self.name = '';\n\t return self;\n\t } else {\n\t self.name = name;\n\t return self;\n\t }\n\t };\n\n\t if (self.rnaLength > 0) self.recalculateElements();\n\t}\n\n\tfunction moleculesToJson(moleculesJson) {\n\t /* Convert a list of RNA and protein molecules to a list of RNAGraph\n\t * ProteinGraph and extraLinks structure */\n\n\t var nodes = {}; //index the nodes by uid\n\t var graphs = [];\n\t var extraLinks = [];\n\n\t // Create the graphs for each molecule\n\t for (var i = 0; i < moleculesJson.molecules.length; i++) {\n\t var molecule = moleculesJson.molecules[i];\n\t var rg;\n\n\t if (molecule.type == 'rna') {\n\t rg = new RNAGraph(molecule.seq, molecule.ss, molecule.header);\n\t rg.circularizeExternal = true;\n\t rg.elementsToJson().addPositions('nucleotide', molecule.positions).addLabels().reinforceStems().reinforceLoops();\n\t } else if (molecule.type == 'protein') {\n\t rg = new ProteinGraph(molecule.header, molecule.size);\n\t }\n\n\t rg.addUids(molecule.uids);\n\n\t for (var j = 0; j < rg.nodes.length; j++) {\n\t nodes[rg.nodes[j].uid] = rg.nodes[j];\n\t }\n\n\t graphs.push(rg);\n\t }\n\n\t //Add the extra links\n\t for (var i = 0; i < moleculesJson.extraLinks.length; i++) {\n\t link = moleculesJson.extraLinks[i];\n\n\t link.source = nodes[link.source];\n\t link.target = nodes[link.target];\n\t link.uid = generateUUID();\n\n\t extraLinks.push(link);\n\t }\n\n\t return { 'graphs': graphs, 'extraLinks': extraLinks };\n\t};\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t!function(r,t){ true?module.exports=t():\"function\"==typeof define&&define.amd?define([],t):\"object\"==typeof exports?exports.rnautils=t():r.rnautils=t()}(this,function(){return function(r){function t(n){if(e[n])return e[n].exports;var o=e[n]={exports:{},id:n,loaded:!1};return r[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var e={};return t.m=r,t.c=e,t.p=\"\",t(0)}([function(r,t,e){r.exports=e(1)},function(r,t){\"use strict\";function e(r,t){if(r===t)return!0;if(null===r||null===t)return!1;if(r.length!=t.length)return!1;for(var e=0;eabcdefghijklmnopqrstuvwxyz\".split(\"\"),r.inverseBrackets=function(r){for(var t={},e=0;e=o;o++){n[o]=new Array(t+1);for(var a=o;t>=a;a++)n[o][a]=0}for(var s=0,o=t-e-1;o>0;o--)for(var a=o+e+1;t>=a;a++){s=n[o][a-1];for(var i=a-e-1;i>=o;i--)r[i]===a&&(s=Math.max(s,(i>o?n[o][i-1]:0)+1+(a-i-1>0?n[i+1][a-1]:0)));n[o][a]=s}return s=n[1][t],n},r.backtrackMaximumMatching=function(t,e){var n=Array.apply(null,Array(t.length)).map(function(){return 0});return r.mmBt(t,n,e,1,t.length-1),n},r.mmBt=function(t,e,n,o,a){var s=t[o][a],i=0;if(!(i>a-o-1)){if(t[o][a-1]==s)return void r.mmBt(t,e,n,o,a-1);for(var l=a-i-1;l>=o;l--)if(n[a]===l){var u=l>o?t[o][l-1]:0,c=a-l-1>0?t[l+1][a-1]:0;if(u+c+1==s)return e[l]=a,e[a]=l,l>o&&r.mmBt(t,e,n,o,l-1),void r.mmBt(t,e,n,l+1,a-1)}console.log(\"FAILED!!!\"+o+\",\"+a+\": backtracking failed!\")}},r.dotbracketToPairtable=function(t){var e=Array.apply(null,new Array(t.length+1)).map(Number.prototype.valueOf,0);e[0]=t.length;for(var n={},o=0;o0)throw\"Unmatched base at position \"+n[c][0];return e},r.insertIntoStack=function(r,t,e){for(var n=0;r[n].length>0&&r[n][r[n].length-1]n?r.bracketLeft[r.insertIntoStack(e,n,t[n])]:r.bracketRight[r.deleteFromStack(e,n)]}return a},r.findUnmatched=function(t,e,n){for(var o,a=[],s=[],i=e,l=n,o=e;n>=o;o++)0!==t[o]&&(t[o]n)&&s.push([o,t[o]]);for(var o=i;l>=o;o++){for(;0===t[o]&&l>=o;)o++;for(n=t[o];t[o]===n;)o++,n--;a=a.concat(r.findUnmatched(t,o,n))}return s.length>0&&a.push(s),a},r.removePseudoknotsFromPairtable=function(t){for(var e=r.maximumMatching(t),n=r.backtrackMaximumMatching(e,t),o=[],a=1;ao)return[];for(;0===t[n];n++)l.push(n);for(;0===t[o];o--)u.push(o);if(n>o){if(l.push(n),0===e)return[[\"e\",e,l.sort(a)]];for(var c=!1,f=[],p=[],h=0;h=0&&(c=!0);return c?[[\"h\",e,l.sort(a)]]:[[\"h\",e,l.sort(a)]]}if(t[n]!=o){var m=l,h=n;for(m.push(h);o>=h;){for(i=i.concat(r.ptToElements(t,e,h,t[h],s)),m.push(t[h]),h=t[h]+1;0===t[h]&&o>=h;h++)m.push(h);m.push(h)}return m.pop(),m=m.concat(u),m.length>0&&(0===e?i.push([\"e\",e,m.sort(a)]):i.push([\"m\",e,m.sort(a)])),i}if(t[n]===o){l.push(n),u.push(o);var v=l.concat(u);v.length>4&&(0===e?i.push([\"e\",e,l.concat(u).sort(a)]):i.push([\"i\",e,l.concat(u).sort(a)]))}for(var g=[];t[n]===o&&o>n;)g.push(n),g.push(o),n+=1,o-=1,e+=1;return l=[n-1],u=[o+1],i.push([\"s\",e,g.sort(a)]),i.concat(r.ptToElements(t,e,n,o,s))}}function o(r){var t=this;return t.colorsText=r,t.parseRange=function(r){for(var t=r.split(\",\"),e=[],n=0;n=i;i++)e.push(i);else console.log(\"Malformed range (too many dashes):\",r)}return e},t.parseColorText=function(r){for(var e=r.split(\"\\n\"),n=\"\",o=1,a={colorValues:{\"\":{}},range:[\"white\",\"steelblue\"]},s=[],i=0;i\"!=e[i][0])for(var l=e[i].trim().split(/[\\s]+/),u=0;ur&&(n=r),r>o&&(o=r));for(a in t.colorsJson.colorValues[e])r=t.colorsJson.colorValues[e][a],\"number\"==typeof r&&(t.colorsJson.colorValues[e][a]=(r-n)/(o-n))}return t},t.parseColorText(t.colorsText),t}Object.defineProperty(t,\"__esModule\",{value:!0}),t.arraysEqual=e,t.RNAUtilities=n,t.ColorScheme=o;var a=function(r,t){return r-t};t.rnaUtilities=new n}])});\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.rnaPlot = rnaPlot;\n\n\tvar _simplernaplot = __webpack_require__(4);\n\n\tvar _rnagraph = __webpack_require__(1);\n\n\tvar _naview = __webpack_require__(5);\n\n\tvar _rnautils = __webpack_require__(2);\n\n\t__webpack_require__(11);\n\n\tfunction isNormalInteger(str) {\n\t //http://stackoverflow.com/a/10834843/899470\n\t return (/^\\+?(0|[1-9]\\d*)$/.test(str)\n\t );\n\t}\n\n\tif (typeof String.prototype.trim === 'undefined') {\n\t String.prototype.trim = function () {\n\t return String(this).replace(/^\\s+|\\s+$/g, '');\n\t };\n\t}\n\n\tfunction rnaPlot() {\n\t var options = {\n\t 'width': 400,\n\t 'height': 400,\n\t 'nucleotideRadius': 5,\n\t 'rnaEdgePadding': 0, // how far the leftmost, rightmost, topmost and bottomost\n\t // nucleotides are from the edge of the plot\n\t 'labelInterval': 0,\n\t 'showNucleotideLabels': true,\n\t 'startNucleotideNumber': 1,\n\t 'bundleExternalLinks': false\n\t };\n\n\t var xScale, yScale;\n\n\t function createTransformToFillViewport(xValues, yValues) {\n\t var molName = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n\n\t // create transform that will scale the x and y values so that\n\t // they fill the available viewport\n\n\t // find out leftmost, rightmost, topmost, bottommost positions of each\n\t // nucleotide so that we can create a scale\n\t var xExtent = d3.extent(xValues);\n\t var yExtent = d3.extent(yValues);\n\n\t var NAME_OFFSET = 30;\n\t if (molName != '') yExtent[1] += NAME_OFFSET;\n\n\t // add the radius of the nucleotides\n\t xExtent[0] -= options.nucleotideRadius + options.rnaEdgePadding;\n\t yExtent[0] -= options.nucleotideRadius + options.rnaEdgePadding;\n\n\t xExtent[1] += options.nucleotideRadius + options.rnaEdgePadding;\n\t yExtent[1] += options.nucleotideRadius + options.rnaEdgePadding;\n\n\t // find out how wide and height the molecule\n\t var xRange = xExtent[1] - xExtent[0];\n\t var yRange = yExtent[1] - yExtent[0];\n\n\t // how much wider / taller is it than the available viewport\n\t var xExtra = xRange - options.width;\n\t var yExtra = yRange - options.height;\n\n\t // once we have a scale for one dimension, we can create the scale for the other\n\t // keeping the same expansion / shrinking ratio\n\t function createOtherScale(firstScale, newDomain, newRange) {\n\t var scaleFactor = (firstScale.range()[1] - firstScale.range()[0]) / (firstScale.domain()[1] - firstScale.domain()[0]);\n\t var newWidth = (newDomain[1] - newDomain[0]) * scaleFactor;\n\t var newMargin = (newRange[1] - newRange[0] - newWidth) / 2;\n\n\t return { 'scaleFactor': scaleFactor,\n\t 'scale': d3.scale.linear().domain(newDomain).range([newRange[0] + newMargin, newRange[1] - newMargin]) };\n\t }\n\n\t var ret;\n\n\t if (xExtra > yExtra) {\n\t // we have to shrink more in the x-dimension than the y\n\t xScale = d3.scale.linear().domain(xExtent).range([0, options.width]);\n\n\t ret = createOtherScale(xScale, yExtent, [0, options.height]);\n\t yScale = ret.scale;\n\t } else {\n\t // we have to shrink more in the x-dimension than the y\n\t yScale = d3.scale.linear().domain(yExtent).range([0, options.height]);\n\n\t ret = createOtherScale(yScale, xExtent, [0, options.width]);\n\t xScale = ret.scale;\n\t }\n\n\t var xOffset = xScale.range()[0] - xScale.domain()[0];\n\t var yOffset = yScale.range()[0] - yScale.domain()[0];\n\n\t return 'translate(' + -(xScale.domain()[0] * ret.scaleFactor - xScale.range()[0]) + ',' + -(yScale.domain()[0] * ret.scaleFactor - yScale.range()[0]) + ')' + 'scale(' + ret.scaleFactor + ')';\n\t }\n\n\t function createNucleotides(selection, nucleotideNodes) {\n\t // create groupings for each nucleotide and label\n\t var gs = selection.selectAll('.rna-base').data(nucleotideNodes).enter().append('svg:g').attr('transform', function (d) {\n\t return 'translate(' + d.x + ',' + d.y + ')';\n\t });\n\n\t var circles = gs.append('svg:circle').attr('r', options.nucleotideRadius).classed('rna-base', true);\n\n\t if (options.showNucleotideLabels) {\n\t var nucleotideLabels = gs.append('svg:text').text(function (d) {\n\t return d.name;\n\t }).attr('text-anchor', 'middle').attr('dominant-baseline', 'central').classed('nucleotide-label', true).append('svg:title').text(function (d) {\n\t return d.struct_name + ':' + d.num;\n\t });\n\t }\n\t }\n\n\t function createLabels(selection, labelNodes) {\n\t // create groupings for each nucleotide and label\n\n\t var gs = selection.selectAll('.rnaLabel').data(labelNodes).enter().append('svg:g').attr('transform', function (d) {\n\t return 'translate(' + d.x + ',' + d.y + ')';\n\t });\n\n\t var numberLabels = gs.append('svg:text').text(function (d) {\n\t return d.name;\n\t }).attr('text-anchor', 'middle').attr('font-weight', 'bold').attr('dominant-baseline', 'central').classed('number-label', true);\n\t }\n\n\t function createName(selection, name) {\n\t selection.append('svg:text').attr('transform', 'translate(' + xScale.invert(options.width / 2) + ',' + yScale.invert(options.height) + ')').attr('dy', -10).classed('rna-name', true).text(name);\n\t }\n\n\t function makeExternalLinksBundle(selection, links) {\n\t var nodesDict = {};\n\t var linksList = [];\n\t links = links.filter(function (d) {\n\t return d.linkType == 'correct' || d.linkType == 'incorrect' || d.linkType == 'extra';\n\t });\n\n\t selection.selectAll('[link-type=extra]').remove();\n\n\t for (var i = 0; i < links.length; i++) {\n\t if (links[i].source === null || links[i].target === null) continue;\n\n\t nodesDict[links[i].source.uid] = links[i].source;\n\t nodesDict[links[i].target.uid] = links[i].target;\n\n\t linksList.push({ 'source': links[i].source.uid, 'target': links[i].target.uid, 'linkType': links[i].linkType, 'extraLinkType': links[i].extraLinkType });\n\t }\n\n\t var fbundling = d3.ForceEdgeBundling().nodes(nodesDict).edges(linksList).compatibility_threshold(0.8).step_size(0.2);\n\t var results = fbundling();\n\n\t var d3line = d3.svg.line().x(function (d) {\n\t return d.x;\n\t }).y(function (d) {\n\t return d.y;\n\t }).interpolate('linear');\n\n\t for (var i = 0; i < results.length; i++) {\n\t var edge_subpoint_data = results[i];\n\t // for each of the arrays in the results\n\t // draw a line between the subdivions points for that edge\n\n\t selection.append('path').attr('d', d3line(edge_subpoint_data)).style('fill', 'none').attr('link-type', function (d) {\n\t return linksList[i].linkType;\n\t }).attr('extra-link-type', function (d) {\n\t return linksList[i].extraLinkType;\n\t }).style('stroke-opacity', 0.4); //use opacity as blending\n\t }\n\t }\n\n\t function createLinks(selection, links) {\n\t links = links.filter(function (d) {\n\t return d.source !== null && d.target !== null;\n\t });\n\t var gs = selection.selectAll('.rna-link').data(links).enter().append('svg:line').attr('x1', function (d) {\n\t return d.source.x;\n\t }).attr('x2', function (d) {\n\t return d.target.x;\n\t }).attr('y1', function (d) {\n\t return d.source.y;\n\t }).attr('y2', function (d) {\n\t return d.target.y;\n\t }).attr('link-type', function (d) {\n\t return d.linkType;\n\t }).attr('extra-link-type', function (d) {\n\t return d.extraLinkType;\n\t }).classed('rna-link', true);\n\t }\n\n\t function chart(selection) {\n\t selection.each(function (data) {\n\t // data should be a dictionary containing at least a structure\n\t // and possibly a sequence\n\t var rg = new _rnagraph.RNAGraph(data.sequence, data.structure, data.name).recalculateElements().elementsToJson().addName(data.name);\n\n\t data.rnaGraph = rg;\n\t // calculate the position of each nucleotide\n\t // the positions of the labels will be calculated in\n\t // the addLabels function\n\t //var positions = simpleXyCoordinates(rg.pairtable);\n\t var naview = new _naview.NAView();\n\n\t var naViewPositions = naview.naview_xy_coordinates(rg.pairtable);\n\t var positions = [];\n\t for (var i = 0; i < naViewPositions.nbase; i++) {\n\t positions.push([naViewPositions.x[i], naViewPositions.y[i]]);\n\t }\n\t rg.addPositions('nucleotide', positions).reinforceStems().reinforceLoops().addExtraLinks(data.extraLinks).addLabels(options.startNucleotideNumber, options.labelInterval);\n\n\t // create a transform that will fit the molecule to the\n\t // size of the viewport (canvas, svg, whatever)\n\t var fillViewportTransform = createTransformToFillViewport(rg.nodes.map(function (d) {\n\t return d.x;\n\t }), rg.nodes.map(function (d) {\n\t return d.y;\n\t }));\n\n\t var gTransform = d3.select(this).append('g').attr('transform', fillViewportTransform);\n\n\t var nucleotideNodes = rg.nodes.filter(function (d) {\n\t return d.nodeType == 'nucleotide';\n\t });\n\n\t var labelNodes = rg.nodes.filter(function (d) {\n\t return d.nodeType == 'label';\n\t });\n\n\t var links = rg.links;\n\n\t createLinks(gTransform, links);\n\t createNucleotides(gTransform, nucleotideNodes);\n\t createLabels(gTransform, labelNodes);\n\t createName(gTransform, data.name);\n\n\t if (options.bundleExternalLinks) {\n\t makeExternalLinksBundle(gTransform, links);\n\t }\n\t });\n\t }\n\n\t chart.width = function (_) {\n\t if (!arguments.length) return options.width;\n\t options.width = _;\n\t return chart;\n\t };\n\n\t chart.height = function (_) {\n\t if (!arguments.length) return options.height;\n\t options.height = _;\n\t return chart;\n\t };\n\n\t chart.showNucleotideLabels = function (_) {\n\t if (!arguments.length) return options.showNucleotideLabels;\n\t options.showNucleotideLabels = _;\n\t return chart;\n\t };\n\n\t chart.rnaEdgePadding = function (_) {\n\t if (!arguments.length) return options.rnaEdgePadding;\n\t options.rnaEdgePadding = _;\n\t return chart;\n\t };\n\n\t chart.nucleotideRadius = function (_) {\n\t if (!arguments.length) return options.nucleotideRadius;\n\t options.nucleotideRadius = _;\n\t return chart;\n\t };\n\n\t chart.labelInterval = function (_) {\n\t if (!arguments.length) return options.labelInterval;\n\t options.labelInterval = _;\n\t return chart;\n\t };\n\n\t chart.showNucleotideLabels = function (_) {\n\t if (!arguments.length) return options.showNucleotideLabels;\n\t options.showNucleotideLabels = _;\n\t return chart;\n\t };\n\n\t chart.startNucleotideNumber = function (_) {\n\t if (!arguments.length) return options.startNucleotideNumber;\n\t options.startNucleotideNumber = _;\n\t return chart;\n\t };\n\n\t chart.bundleExternalLinks = function (_) {\n\t if (!arguments.length) return options.bundleExternalLinks;\n\t options.bundleExternalLinks = _;\n\t return chart;\n\t };\n\n\t return chart;\n\t}\n\tvar number_sort = function number_sort(a, b) {\n\t return a - b;\n\t};\n\n\tfunction RNAUtilities() {\n\t var self = this;\n\n\t // the brackets to use when constructing dotbracket strings\n\t // with pseudoknots\n\t self.bracket_left = '([{ 0; i--) {\n\n\t for (var j = i + TURN + 1; j <= n; j++) {\n\t maximum = mm[i][j - 1];\n\n\t for (var l = j - TURN - 1; l >= i; l--) {\n\t if (pt[l] === j) {\n\n\t // we have a base pair here\n\t maximum = Math.max(maximum, (l > i ? mm[i][l - 1] : 0) + 1 + (j - l - 1 > 0 ? mm[l + 1][j - 1] : 0));\n\t }\n\t }\n\n\t mm[i][j] = maximum;\n\t }\n\t }maximum = mm[1][n];\n\n\t return mm;\n\t };\n\n\t self.backtrackMaximumMatching = function (mm, old_pt) {\n\t var pt = Array.apply(null, Array(mm.length)).map(function () {\n\t return 0;\n\t });\n\t //create an array containing zeros\n\n\t self.mm_bt(mm, pt, old_pt, 1, mm.length - 1);\n\t return pt;\n\t };\n\n\t self.mm_bt = function (mm, pt, old_pt, i, j) {\n\t // Create a pairtable from the backtracking\n\t var maximum = mm[i][j];\n\t var TURN = 0;\n\n\t if (j - i - 1 < TURN) return; /* no more pairs */\n\n\t if (mm[i][j - 1] == maximum) {\n\t /* j is unpaired */\n\t self.mm_bt(mm, pt, old_pt, i, j - 1);\n\t return;\n\t }\n\n\t for (var q = j - TURN - 1; q >= i; q--) {\n\t /* j is paired with some q */\n\t if (old_pt[j] !== q) continue;\n\n\t var left_part = q > i ? mm[i][q - 1] : 0;\n\t var enclosed_part = j - q - 1 > 0 ? mm[q + 1][j - 1] : 0;\n\n\t if (left_part + enclosed_part + 1 == maximum) {\n\t // there's a base pair between j and q\n\t pt[q] = j;\n\t pt[j] = q;\n\n\t if (i < q) self.mm_bt(mm, pt, old_pt, i, q - 1);\n\n\t self.mm_bt(mm, pt, old_pt, q + 1, j - 1);\n\t return;\n\t }\n\t }\n\n\t //alert(i + ',' + j + ': backtracking failed!');\n\t console.log('FAILED!!!' + i + ',' + j + ': backtracking failed!');\n\t };\n\n\t self.dotbracketToPairtable = function (dotbracket) {\n\t // create an array and initialize it to 0\n\t pt = Array.apply(null, new Array(dotbracket.length + 1)).map(Number.prototype.valueOf, 0);\n\n\t // the first element is always the length of the RNA molecule\n\t pt[0] = dotbracket.length;\n\n\t // store the pairing partners for each symbol\n\t stack = {};\n\t for (i = 0; i < self.bracket_left.length; i++) {\n\t stack[i] = [];\n\t }\n\n\t // lookup the index of each symbol in the bracket array\n\t inverse_bracket_left = self.inverse_brackets(self.bracket_left);\n\t inverse_bracket_right = self.inverse_brackets(self.bracket_right);\n\n\t for (i = 0; i < dotbracket.length; i++) {\n\t a = dotbracket[i];\n\t ni = i + 1;\n\n\t if (a == '.') {\n\t // unpaired\n\t pt[ni] = 0;\n\t } else {\n\t if (a in inverse_bracket_left) {\n\t // open pair?\n\t stack[inverse_bracket_left[a]].push(ni);\n\t } else if (a in inverse_bracket_right) {\n\t // close pair?\n\t j = stack[inverse_bracket_right[a]].pop();\n\n\t pt[ni] = j;\n\t pt[j] = ni;\n\t } else {\n\t throw 'Unknown symbol in dotbracket string';\n\t }\n\t }\n\t }\n\n\t for (key in stack) {\n\t if (stack[key].length > 0) {\n\t throw 'Unmatched base at position ' + stack[key][0];\n\t }\n\t }\n\n\t return pt;\n\t };\n\n\t self.insert_into_stack = function (stack, i, j) {\n\t var k = 0;\n\t while (stack[k].length > 0 && stack[k][stack[k].length - 1] < j) {\n\t k += 1;\n\t }\n\n\t stack[k].push(j);\n\t return k;\n\t };\n\n\t self.delete_from_stack = function (stack, j) {\n\t var k = 0;\n\t while (stack[k].length === 0 || stack[k][stack[k].length - 1] != j) {\n\t k += 1;\n\t }\n\t stack[k].pop();\n\t return k;\n\t };\n\n\t self.pairtableToDotbracket = function (pt) {\n\t // store the pairing partners for each symbol\n\t stack = {};\n\t for (i = 0; i < pt[0]; i++) {\n\t stack[i] = [];\n\t }\n\n\t seen = {};\n\t res = '';\n\t for (i = 1; i < pt[0] + 1; i++) {\n\t if (pt[i] !== 0 && pt[i] in seen) {\n\t throw 'Invalid pairtable contains duplicate entries';\n\t }\n\t seen[pt[i]] = true;\n\n\t if (pt[i] === 0) {\n\t res += '.';\n\t } else {\n\t if (pt[i] > i) {\n\t res += self.bracket_left[self.insert_into_stack(stack, i, pt[i])];\n\t } else {\n\t res += self.bracket_right[self.delete_from_stack(stack, i)];\n\t }\n\t }\n\t }\n\n\t return res;\n\t };\n\n\t self.find_unmatched = function (pt, from, to) {\n\t /*\n\t * Find unmatched nucleotides in this molecule.\n\t */\n\t var to_remove = [];\n\t var unmatched = [];\n\n\t var orig_from = from;\n\t var orig_to = to;\n\n\t for (var i = from; i <= to; i++) {\n\t if (pt[i] !== 0 && (pt[i] < from || pt[i] > to)) unmatched.push([i, pt[i]]);\n\t }for (i = orig_from; i <= orig_to; i++) {\n\t while (pt[i] === 0 && i <= orig_to) {\n\t i++;\n\t }to = pt[i];\n\n\t while (pt[i] === to) {\n\t i++;\n\t to--;\n\t }\n\n\t to_remove = to_remove.concat(self.find_unmatched(pt, i, to));\n\t }\n\n\t if (unmatched.length > 0) to_remove.push(unmatched);\n\n\t return to_remove;\n\t };\n\n\t self.removePseudoknotsFromPairtable = function (pt) {\n\t /* Remove the pseudoknots from this structure in such a fashion\n\t * that the least amount of base-pairs need to be broken\n\t *\n\t * The pairtable is manipulated in place and a list of tuples\n\t * indicating the broken base pairs is returned.\n\t */\n\n\t var mm = self.maximumMatching(pt);\n\t var new_pt = self.backtrackMaximumMatching(mm, pt);\n\t var removed = [];\n\n\t for (var i = 1; i < pt.length; i++) {\n\t if (pt[i] < i) continue;\n\n\t if (new_pt[i] != pt[i]) {\n\t removed.push([i, pt[i]]);\n\t pt[pt[i]] = 0;\n\t pt[i] = 0;\n\t }\n\t }\n\n\t return removed;\n\t };\n\t}\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports) {\n\n\t\"use strict\";\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.simpleXyCoordinates = simpleXyCoordinates;\n\tfunction simpleXyCoordinates(pair_table) {\n\t var INIT_ANGLE = 0.; /* initial bending angle */\n\t var INIT_X = 100.; /* coordinate of first digit */\n\t var INIT_Y = 100.; /* see above */\n\t var RADIUS = 15.;\n\n\t var x = [],\n\t y = [];\n\n\t var i, len;\n\t var alpha;\n\n\t len = pair_table[0];\n\t var angle = Array.apply(null, new Array(len + 5)).map(Number.prototype.valueOf, 0);\n\t var loop_size = Array.apply(null, new Array(16 + Math.floor(len / 5))).map(Number.prototype.valueOf, 0);\n\t var stack_size = Array.apply(null, new Array(16 + Math.floor(len / 5))).map(Number.prototype.valueOf, 0);\n\n\t var lp = 0;\n\t var stk = 0;\n\t var PIHALF = Math.PI / 2;\n\n\t var loop = function loop(i, j, pair_table)\n\t /* i, j are the positions AFTER the last pair of a stack; i.e\n\t i-1 and j+1 are paired. */\n\t {\n\t var count = 2; /* counts the VERTICES of a loop polygon; that's\n\t NOT necessarily the number of unpaired bases!\n\t Upon entry the loop has already 2 vertices, namely\n\t the pair i-1/j+1. */\n\n\t var r = 0,\n\t bubble = 0; /* bubble counts the unpaired digits in loops */\n\n\t var i_old, partner, k, l, start_k, start_l, fill, ladder;\n\t var begin, v, diff;\n\t var polygon;\n\n\t var remember = Array.apply(null, new Array(3 + Math.floor((j - i) / 5) * 2)).map(Number.prototype.valueOf, 0);\n\n\t i_old = i - 1, j++; /* j has now been set to the partner of the\n\t previous pair for correct while-loop\n\t termination. */\n\t while (i != j) {\n\t partner = pair_table[i];\n\t if (!partner || i == 0) i++, count++, bubble++;else {\n\t count += 2;\n\t k = i, l = partner; /* beginning of stack */\n\t remember[++r] = k;\n\t remember[++r] = l;\n\t i = partner + 1; /* next i for the current loop */\n\n\t start_k = k, start_l = l;\n\t ladder = 0;\n\t do {\n\t k++, l--, ladder++; /* go along the stack region */\n\t } while (pair_table[k] == l && pair_table[k] > k);\n\n\t fill = ladder - 2;\n\t if (ladder >= 2) {\n\t angle[start_k + 1 + fill] += PIHALF; /* Loop entries and */\n\t angle[start_l - 1 - fill] += PIHALF; /* exits get an */\n\t angle[start_k] += PIHALF; /* additional PI/2. */\n\t angle[start_l] += PIHALF; /* Why ? (exercise) */\n\t if (ladder > 2) {\n\t for (; fill >= 1; fill--) {\n\t angle[start_k + fill] = Math.PI; /* fill in the angles */\n\t angle[start_l - fill] = Math.PI; /* for the backbone */\n\t }\n\t }\n\t }\n\t stack_size[++stk] = ladder;\n\t if (k <= l) loop(k, l, pair_table);\n\t }\n\t }\n\n\t polygon = Math.PI * (count - 2) / count; /* bending angle in loop polygon */\n\t remember[++r] = j;\n\t begin = i_old < 0 ? 0 : i_old;\n\t for (v = 1; v <= r; v++) {\n\t diff = remember[v] - begin;\n\t for (fill = 0; fill <= diff; fill++) {\n\t angle[begin + fill] += polygon;\n\t }if (v > r) break;\n\t begin = remember[++v];\n\t }\n\t loop_size[++lp] = bubble;\n\t };\n\n\t loop(0, len + 1, pair_table);\n\t loop_size[lp] -= 2; /* correct for cheating with function loop */\n\n\t alpha = INIT_ANGLE;\n\t x[0] = INIT_X;\n\t y[0] = INIT_Y;\n\n\t var poss = [];\n\n\t poss.push([x[0], y[0]]);\n\t for (i = 1; i < len; i++) {\n\t x[i] = x[i - 1] + RADIUS * Math.cos(alpha);\n\t y[i] = y[i - 1] + RADIUS * Math.sin(alpha);\n\n\t poss.push([x[i], y[i]]);\n\t alpha += Math.PI - angle[i + 1];\n\t }\n\n\t return poss;\n\t}\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.NAView = NAView;\n\n\tvar _radloop = __webpack_require__(6);\n\n\tvar _connection = __webpack_require__(7);\n\n\tvar _region = __webpack_require__(9);\n\n\tvar _base = __webpack_require__(10);\n\n\tvar _loop = __webpack_require__(8);\n\n\tfunction NAView() {\n\t this.ANUM = 9999.0;\n\t this.MAXITER = 500;\n\n\t this.bases = [];\n\t this.nbase = null;\n\t this.nregion = null;\n\t this.loop_count = null;\n\n\t this.root = new _loop.Loop();\n\t this.loops = [];\n\n\t this.regions = [];\n\n\t this.rlphead = new _radloop.Radloop();\n\n\t this.lencut = 0.8;\n\t this.RADIUS_REDUCTION_FACTOR = 1.4;\n\n\t // show algorithm step by step\n\t this.angleinc = null;\n\n\t this._h = null;\n\n\t // private boolean noIterationFailureYet = true;\n\n\t this.HELIX_FACTOR = 0.6;\n\t this.BACKBONE_DISTANCE = 27;\n\t}\n\n\tNAView.prototype.naview_xy_coordinates = function (pair_table) {\n\t var x = [];\n\t var y = [];\n\t if (pair_table.length === 0 || pair_table[0] === 0) {\n\t return 0;\n\t }\n\t var i;\n\t this.nbase = pair_table[0];\n\t this.bases = [];\n\t for (var index = 0; index < this.nbase + 1; index++) {\n\t this.bases.push(new _base.Base());\n\t }\n\t this.regions = [];\n\t for (var index = 0; index < this.nbase + 1; index++) {\n\t this.regions.push(new _region.Region());\n\t }\n\t this.read_in_bases(pair_table);\n\t this.rlphead = null;\n\t this.find_regions();\n\t this.loop_count = 0;\n\t this.loops = [];\n\t for (var index = 0; index < this.nbase + 1; index++) {\n\t this.loops.push(new _loop.Loop());\n\t }\n\t this.construct_loop(0);\n\t this.find_central_loop();\n\t this.traverse_loop(this.root, null);\n\n\t for (i = 0; i < this.nbase; i++) {\n\t x.push(100 + this.BACKBONE_DISTANCE * this.bases[i + 1].getX());\n\t y.push(100 + this.BACKBONE_DISTANCE * this.bases[i + 1].getY());\n\t }\n\n\t return {\n\t nbase: this.nbase,\n\t x: x,\n\t y: y\n\t };\n\t};\n\n\tNAView.prototype.read_in_bases = function read_in_bases(pair_table) {\n\t var i = null;\n\t var npairs = null;\n\n\t // Set up an origin.\n\t this.bases.push(new _base.Base());\n\t this.bases[0].setMate(0);\n\t this.bases[0].setExtracted(false);\n\t this.bases[0].setX(this.ANUM);\n\t this.bases[0].setY(this.ANUM);\n\n\t for (npairs = 0, i = 1; i <= this.nbase; i++) {\n\t this.bases.push(new _base.Base());\n\t this.bases[i].setExtracted(false);\n\t this.bases[i].setX(this.ANUM);\n\t this.bases[i].setY(this.ANUM);\n\t this.bases[i].setMate(pair_table[i]);\n\t if (pair_table[i] > i) npairs++;\n\t }\n\t // must have at least 1 pair to avoid segfault\n\t if (npairs == 0) {\n\t this.bases[1].setMate(this.nbase);\n\t this.bases[this.nbase].setMate(1);\n\t }\n\t};\n\n\tNAView.prototype.find_regions = function find_regions() {\n\t var i = null;\n\t var mate = null;\n\t var nb1 = null;\n\n\t nb1 = this.nbase + 1;\n\t var mark = [];\n\t for (i = 0; i < nb1; i++) {\n\t mark.push(false);\n\t }\n\t this.nregion = 0;\n\t for (i = 0; i <= this.nbase; i++) {\n\t if ((mate = this.bases[i].getMate()) != 0 && !mark[i]) {\n\t this.regions[this.nregion].setStart1(i);\n\t this.regions[this.nregion].setEnd2(mate);\n\t mark[i] = true;\n\t mark[mate] = true;\n\t this.bases[i].setRegion(this.regions[this.nregion]);\n\t this.bases[mate].setRegion(this.regions[this.nregion]);\n\t for (i++, mate--; i < mate && this.bases[i].getMate() == mate; i++, mate--) {\n\t mark[mate] = true;\n\t mark[i] = true;\n\t this.bases[i].setRegion(this.regions[this.nregion]);\n\t this.bases[mate].setRegion(this.regions[this.nregion]);\n\t }\n\t this.regions[this.nregion].setEnd1(--i);\n\t this.regions[this.nregion].setStart2(mate + 1);\n\n\t this.nregion++;\n\t }\n\t }\n\t};\n\n\tNAView.prototype.construct_loop = function construct_loop(ibase) {\n\t var i = null;\n\t var mate = null;\n\t var retloop = new _loop.Loop();\n\t var lp = new _loop.Loop();\n\t var cp = new _connection.Connection();\n\t var rp = new _region.Region();\n\t var rlp = new _radloop.Radloop();\n\t retloop = this.loops[this.loop_count++];\n\t retloop.setNconnection(0);\n\t retloop.setDepth(0);\n\t retloop.setNumber(this.loop_count);\n\t retloop.setRadius(0.0);\n\n\t for (rlp = this.rlphead; rlp != null; rlp = rlp.getNext()) {\n\t if (rlp.getLoopnumber() == this.loop_count) retloop.setRadius(rlp.getRadius());\n\t }i = ibase;\n\t do {\n\t if ((mate = this.bases[i].getMate()) != 0) {\n\t rp = this.bases[i].getRegion();\n\t if (!this.bases[rp.getStart1()].isExtracted()) {\n\t if (i == rp.getStart1()) {\n\t this.bases[rp.getStart1()].setExtracted(true);\n\t this.bases[rp.getEnd1()].setExtracted(true);\n\t this.bases[rp.getStart2()].setExtracted(true);\n\t this.bases[rp.getEnd2()].setExtracted(true);\n\t lp = this.construct_loop(rp.getEnd1() < this.nbase ? rp.getEnd1() + 1 : 0);\n\t } else if (i == rp.getStart2()) {\n\t this.bases[rp.getStart2()].setExtracted(true);\n\t this.bases[rp.getEnd2()].setExtracted(true);\n\t this.bases[rp.getStart1()].setExtracted(true);\n\t this.bases[rp.getEnd1()].setExtracted(true);\n\t lp = this.construct_loop(rp.getEnd2() < this.nbase ? rp.getEnd2() + 1 : 0);\n\t } else {\n\t console.log(\"Something went terribly wrong ....\");\n\t }\n\t retloop.setNconnection(retloop.getNconnection() + 1);\n\t cp = new _connection.Connection();\n\t retloop.setConnection(retloop.getNconnection() - 1, cp);\n\t retloop.setConnection(retloop.getNconnection(), null);\n\t cp.setLoop(lp);\n\t cp.setRegion(rp);\n\t if (i == rp.getStart1()) {\n\t cp.setStart(rp.getStart1());\n\t cp.setEnd(rp.getEnd2());\n\t } else {\n\t cp.setStart(rp.getStart2());\n\t cp.setEnd(rp.getEnd1());\n\t }\n\t cp.setExtruded(false);\n\t cp.setBroken(false);\n\t lp.setNconnection(lp.getNconnection() + 1);\n\t cp = new _connection.Connection();\n\t lp.setConnection(lp.getNconnection() - 1, cp);\n\t lp.setConnection(lp.getNconnection(), null);\n\t cp.setLoop(retloop);\n\t cp.setRegion(rp);\n\t if (i == rp.getStart1()) {\n\t cp.setStart(rp.getStart2());\n\t cp.setEnd(rp.getEnd1());\n\t } else {\n\t cp.setStart(rp.getStart1());\n\t cp.setEnd(rp.getEnd2());\n\t }\n\t cp.setExtruded(false);\n\t cp.setBroken(false);\n\t }\n\t i = mate;\n\t }\n\t if (++i > this.nbase) i = 0;\n\t } while (i != ibase);\n\t return retloop;\n\t};\n\n\tNAView.prototype.find_central_loop = function find_central_loop() {\n\t var lp = new _loop.Loop();\n\t var maxconn = null;\n\t var maxdepth = null;\n\t var i = null;\n\n\t determine_depths.bind(this)();\n\t maxconn = 0;\n\t maxdepth = -1;\n\t for (i = 0; i < this.loop_count; i++) {\n\t lp = this.loops[i];\n\t if (lp.getNconnection() > maxconn) {\n\t maxdepth = lp.getDepth();\n\t maxconn = lp.getNconnection();\n\t this.root = lp;\n\t } else if (lp.getDepth() > maxdepth && lp.getNconnection() == maxconn) {\n\t maxdepth = lp.getDepth();\n\t this.root = lp;\n\t }\n\t }\n\t};\n\n\tfunction determine_depths() {\n\t var lp = new _loop.Loop();\n\t var i = null;\n\t var j = null;\n\n\t for (i = 0; i < this.loop_count; i++) {\n\t lp = this.loops[i];\n\t for (j = 0; j < this.loop_count; j++) {\n\t this.loops[j].setMark(false);\n\t }\n\t lp.setDepth(depth(lp));\n\t }\n\t}\n\n\tfunction depth(lp) {\n\t var count = null;\n\t var ret = null;\n\t var d = null;\n\n\t if (lp.getNconnection() <= 1) {\n\t return 0;\n\t }\n\t if (lp.isMark()) {\n\t return -1;\n\t }\n\t lp.setMark(true);\n\t count = 0;\n\t ret = 0;\n\t for (var i = 0; lp.getConnection(i) != null; i++) {\n\t d = depth(lp.getConnection(i).getLoop());\n\t if (d >= 0) {\n\t if (++count == 1) {\n\t ret = d;\n\t } else if (ret > d) {\n\t ret = d;\n\t }\n\t }\n\t }\n\t lp.setMark(false);\n\t return ret + 1;\n\t}\n\n\tNAView.prototype.traverse_loop = function traverse_loop(lp, anchor_connection) {\n\t var xs, ys, xe, ye, xn, yn, angleinc, r;\n\t var radius, xc, yc, xo, yo, astart, aend, a;\n\t var cp, cpnext, acp, cpprev;\n\t var i, j, n, ic;\n\t var da, maxang;\n\t var count, icstart, icend, icmiddle, icroot;\n\t var done, done_all_connections, rooted;\n\t var sign;\n\t var midx, midy, nrx, nry, mx, my, vx, vy, dotmv, nmidx, nmidy;\n\t var icstart1, icup, icdown, icnext, direction;\n\t var dan, dx, dy, rr;\n\t var cpx, cpy, cpnextx, cpnexty, cnx, cny, rcn, rc, lnx, lny, rl, ac, acn, sx, sy, dcp;\n\t var imaxloop = 0;\n\n\t angleinc = 2 * Math.PI / (this.nbase + 1);\n\t acp = null;\n\t icroot = -1;\n\t var indice = 0;\n\n\t for (ic = 0; (cp = lp.getConnection(indice)) != null; indice++, ic++) {\n\t xs = -Math.sin(angleinc * cp.getStart());\n\t ys = Math.cos(angleinc * cp.getStart());\n\t xe = -Math.sin(angleinc * cp.getEnd());\n\t ye = Math.cos(angleinc * cp.getEnd());\n\t xn = ye - ys;\n\t yn = xs - xe;\n\t r = Math.sqrt(xn * xn + yn * yn);\n\t cp.setXrad(xn / r);\n\t cp.setYrad(yn / r);\n\t cp.setAngle(Math.atan2(yn, xn));\n\t if (cp.getAngle() < 0.0) {\n\t cp.setAngle(cp.getAngle() + 2 * Math.PI);\n\t }\n\t if (anchor_connection != null && anchor_connection.getRegion() == cp.getRegion()) {\n\t acp = cp;\n\t icroot = ic;\n\t }\n\t }\n\t set_radius: while (true) {\n\t this.determine_radius(lp, this.lencut);\n\t radius = lp.getRadius() / this.RADIUS_REDUCTION_FACTOR;\n\t if (anchor_connection == null) {\n\t xc = yc = 0.0;\n\t } else {\n\t xo = (this.bases[acp.getStart()].getX() + this.bases[acp.getEnd()].getX()) / 2.0;\n\t yo = (this.bases[acp.getStart()].getY() + this.bases[acp.getEnd()].getY()) / 2.0;\n\t xc = xo - radius * acp.getXrad();\n\t yc = yo - radius * acp.getYrad();\n\t }\n\n\t // The construction of the connectors will proceed in blocks of\n\t // connected connectors, where a connected connector pairs means two\n\t // connectors that are forced out of the drawn circle because they\n\t // are too close together in angle.\n\n\t // First, find the start of a block of connected connectors\n\n\t if (icroot == -1) {\n\t icstart = 0;\n\t } else {\n\t icstart = icroot;\n\t }\n\t cp = lp.getConnection(icstart);\n\t count = 0;\n\t done = false;\n\t do {\n\t j = icstart - 1;\n\t if (j < 0) {\n\t j = lp.getNconnection() - 1;\n\t }\n\t cpprev = lp.getConnection(j);\n\t if (!this.connected_connection(cpprev, cp)) {\n\t done = true;\n\t } else {\n\t icstart = j;\n\t cp = cpprev;\n\t }\n\t if (++count > lp.getNconnection()) {\n\t // Here everything is connected. Break on maximum angular\n\t // separation between connections.\n\t maxang = -1.0;\n\t for (ic = 0; ic < lp.getNconnection(); ic++) {\n\t j = ic + 1;\n\t if (j >= lp.getNconnection()) {\n\t j = 0;\n\t }\n\t cp = lp.getConnection(ic);\n\t cpnext = lp.getConnection(j);\n\t ac = cpnext.getAngle() - cp.getAngle();\n\t if (ac < 0.0) {\n\t ac += 2 * Math.PI;\n\t }\n\t if (ac > maxang) {\n\t maxang = ac;\n\t imaxloop = ic;\n\t }\n\t }\n\t icend = imaxloop;\n\t icstart = imaxloop + 1;\n\t if (icstart >= lp.getNconnection()) {\n\t icstart = 0;\n\t }\n\t cp = lp.getConnection(icend);\n\t cp.setBroken(true);\n\t done = true;\n\t }\n\t } while (!done);\n\t done_all_connections = false;\n\t icstart1 = icstart;\n\t while (!done_all_connections) {\n\t count = 0;\n\t done = false;\n\t icend = icstart;\n\t rooted = false;\n\t while (!done) {\n\t cp = lp.getConnection(icend);\n\t if (icend == icroot) {\n\t rooted = true;\n\t }\n\t j = icend + 1;\n\t if (j >= lp.getNconnection()) {\n\t j = 0;\n\t }\n\t cpnext = lp.getConnection(j);\n\t if (this.connected_connection(cp, cpnext)) {\n\t if (++count >= lp.getNconnection()) {\n\t break;\n\t }\n\t icend = j;\n\t } else {\n\t done = true;\n\t }\n\t }\n\t icmiddle = this.find_ic_middle(icstart, icend, anchor_connection, acp, lp);\n\t ic = icup = icdown = icmiddle;\n\t done = false;\n\t direction = 0;\n\t while (!done) {\n\t if (direction < 0) {\n\t ic = icup;\n\t } else if (direction == 0) {\n\t ic = icmiddle;\n\t } else {\n\t ic = icdown;\n\t }\n\t if (ic >= 0) {\n\t cp = lp.getConnection(ic);\n\t if (anchor_connection == null || acp != cp) {\n\t if (direction == 0) {\n\t astart = cp.getAngle() - Math.asin(1.0 / 2.0 / radius);\n\t aend = cp.getAngle() + Math.asin(1.0 / 2.0 / radius);\n\t this.bases[cp.getStart()].setX(xc + radius * Math.cos(astart));\n\t this.bases[cp.getStart()].setY(yc + radius * Math.sin(astart));\n\t this.bases[cp.getEnd()].setX(xc + radius * Math.cos(aend));\n\t this.bases[cp.getEnd()].setY(yc + radius * Math.sin(aend));\n\t } else if (direction < 0) {\n\t j = ic + 1;\n\t if (j >= lp.getNconnection()) {\n\t j = 0;\n\t }\n\t cp = lp.getConnection(ic);\n\t cpnext = lp.getConnection(j);\n\t cpx = cp.getXrad();\n\t cpy = cp.getYrad();\n\t ac = (cp.getAngle() + cpnext.getAngle()) / 2.0;\n\t if (cp.getAngle() > cpnext.getAngle()) {\n\t ac -= Math.PI;\n\t }\n\t cnx = Math.cos(ac);\n\t cny = Math.sin(ac);\n\t lnx = cny;\n\t lny = -cnx;\n\t da = cpnext.getAngle() - cp.getAngle();\n\t if (da < 0.0) {\n\t da += 2 * Math.PI;\n\t }\n\t if (cp.isExtruded()) {\n\t if (da <= Math.PI / 2) {\n\t rl = 2.0;\n\t } else {\n\t rl = 1.5;\n\t }\n\t } else {\n\t rl = 1.0;\n\t }\n\t this.bases[cp.getEnd()].setX(this.bases[cpnext.getStart()].getX() + rl * lnx);\n\t this.bases[cp.getEnd()].setY(this.bases[cpnext.getStart()].getY() + rl * lny);\n\t this.bases[cp.getStart()].setX(this.bases[cp.getEnd()].getX() + cpy);\n\t this.bases[cp.getStart()].setY(this.bases[cp.getEnd()].getY() - cpx);\n\t } else {\n\t j = ic - 1;\n\t if (j < 0) {\n\t j = lp.getNconnection() - 1;\n\t }\n\t cp = lp.getConnection(j);\n\t cpnext = lp.getConnection(ic);\n\t cpnextx = cpnext.getXrad();\n\t cpnexty = cpnext.getYrad();\n\t ac = (cp.getAngle() + cpnext.getAngle()) / 2.0;\n\t if (cp.getAngle() > cpnext.getAngle()) {\n\t ac -= Math.PI;\n\t }\n\t cnx = Math.cos(ac);\n\t cny = Math.sin(ac);\n\t lnx = -cny;\n\t lny = cnx;\n\t da = cpnext.getAngle() - cp.getAngle();\n\t if (da < 0.0) {\n\t da += 2 * Math.PI;\n\t }\n\t if (cp.isExtruded()) {\n\t if (da <= Math.PI / 2) {\n\t rl = 2.0;\n\t } else {\n\t rl = 1.5;\n\t }\n\t } else {\n\t rl = 1.0;\n\t }\n\t this.bases[cpnext.getStart()].setX(this.bases[cp.getEnd()].getX() + rl * lnx);\n\t this.bases[cpnext.getStart()].setY(this.bases[cp.getEnd()].getY() + rl * lny);\n\t this.bases[cpnext.getEnd()].setX(this.bases[cpnext.getStart()].getX() - cpnexty);\n\t this.bases[cpnext.getEnd()].setY(this.bases[cpnext.getStart()].getY() + cpnextx);\n\t }\n\t }\n\t }\n\t if (direction < 0) {\n\t if (icdown == icend) {\n\t icdown = -1;\n\t } else if (icdown >= 0) {\n\t if (++icdown >= lp.getNconnection()) {\n\t icdown = 0;\n\t }\n\t }\n\t direction = 1;\n\t } else {\n\t if (icup == icstart) {\n\t icup = -1;\n\t } else if (icup >= 0) {\n\t if (--icup < 0) {\n\t icup = lp.getNconnection() - 1;\n\t }\n\t }\n\t direction = -1;\n\t }\n\t done = icup == -1 && icdown == -1;\n\t }\n\t icnext = icend + 1;\n\t if (icnext >= lp.getNconnection()) {\n\t icnext = 0;\n\t }\n\t if (icend != icstart && !(icstart == icstart1 && icnext == icstart1)) {\n\n\t // Move the bases just constructed (or the radius) so that\n\t // the bisector of the end points is radius distance away\n\t // from the loop center.\n\n\t cp = lp.getConnection(icstart);\n\t cpnext = lp.getConnection(icend);\n\t dx = this.bases[cpnext.getEnd()].getX() - this.bases[cp.getStart()].getX();\n\t dy = this.bases[cpnext.getEnd()].getY() - this.bases[cp.getStart()].getY();\n\t midx = this.bases[cp.getStart()].getX() + dx / 2.0;\n\t midy = this.bases[cp.getStart()].getY() + dy / 2.0;\n\t rr = Math.sqrt(dx * dx + dy * dy);\n\t mx = dx / rr;\n\t my = dy / rr;\n\t vx = xc - midx;\n\t vy = yc - midy;\n\t rr = Math.sqrt(dx * dx + dy * dy);\n\t vx /= rr;\n\t vy /= rr;\n\t dotmv = vx * mx + vy * my;\n\t nrx = dotmv * mx - vx;\n\t nry = dotmv * my - vy;\n\t rr = Math.sqrt(nrx * nrx + nry * nry);\n\t nrx /= rr;\n\t nry /= rr;\n\n\t // Determine which side of the bisector the center should\n\t // be.\n\n\t dx = this.bases[cp.getStart()].getX() - xc;\n\t dy = this.bases[cp.getStart()].getY() - yc;\n\t ac = Math.atan2(dy, dx);\n\t if (ac < 0.0) {\n\t ac += 2 * Math.PI;\n\t }\n\t dx = this.bases[cpnext.getEnd()].getX() - xc;\n\t dy = this.bases[cpnext.getEnd()].getY() - yc;\n\t acn = Math.atan2(dy, dx);\n\t if (acn < 0.0) {\n\t acn += 2 * Math.PI;\n\t }\n\t if (acn < ac) {\n\t acn += 2 * Math.PI;\n\t }\n\t if (acn - ac > Math.PI) {\n\t sign = -1;\n\t } else {\n\t sign = 1;\n\t }\n\t nmidx = xc + sign * radius * nrx;\n\t nmidy = yc + sign * radius * nry;\n\t if (rooted) {\n\t xc -= nmidx - midx;\n\t yc -= nmidy - midy;\n\t } else {\n\t for (ic = icstart;;) {\n\t cp = lp.getConnection(ic);\n\t i = cp.getStart();\n\t this.bases[i].setX(this.bases[i].getX() + nmidx - midx);\n\t this.bases[i].setY(this.bases[i].getY() + nmidy - midy);\n\t i = cp.getEnd();\n\t this.bases[i].setX(this.bases[i].getX() + nmidx - midx);\n\t this.bases[i].setY(this.bases[i].getY() + nmidy - midy);\n\t if (ic == icend) {\n\t break;\n\t }\n\t if (++ic >= lp.getNconnection()) {\n\t ic = 0;\n\t }\n\t }\n\t }\n\t }\n\t icstart = icnext;\n\t done_all_connections = icstart == icstart1;\n\t }\n\t for (ic = 0; ic < lp.getNconnection(); ic++) {\n\t cp = lp.getConnection(ic);\n\t j = ic + 1;\n\t if (j >= lp.getNconnection()) {\n\t j = 0;\n\t }\n\t cpnext = lp.getConnection(j);\n\t dx = this.bases[cp.getEnd()].getX() - xc;\n\t dy = this.bases[cp.getEnd()].getY() - yc;\n\t rc = Math.sqrt(dx * dx + dy * dy);\n\t ac = Math.atan2(dy, dx);\n\t if (ac < 0.0) {\n\t ac += 2 * Math.PI;\n\t }\n\t dx = this.bases[cpnext.getStart()].getX() - xc;\n\t dy = this.bases[cpnext.getStart()].getY() - yc;\n\t rcn = Math.sqrt(dx * dx + dy * dy);\n\t acn = Math.atan2(dy, dx);\n\t if (acn < 0.0) {\n\t acn += 2 * Math.PI;\n\t }\n\t if (acn < ac) {\n\t acn += 2 * Math.PI;\n\t }\n\t dan = acn - ac;\n\t dcp = cpnext.getAngle() - cp.getAngle();\n\t if (dcp <= 0.0) {\n\t dcp += 2 * Math.PI;\n\t }\n\t if (Math.abs(dan - dcp) > Math.PI) {\n\t if (cp.isExtruded()) {\n\t console.log(\"Warning from traverse_loop. Loop \" + lp.getNumber() + \" has crossed regions\\n\");\n\t } else if (cpnext.getStart() - cp.getEnd() != 1) {\n\t cp.setExtruded(true);\n\t continue set_radius; // remplacement du goto\n\t }\n\t }\n\t if (cp.isExtruded()) {\n\t this.construct_extruded_segment(cp, cpnext);\n\t } else {\n\t n = cpnext.getStart() - cp.getEnd();\n\t if (n < 0) {\n\t n += this.nbase + 1;\n\t }\n\t angleinc = dan / n;\n\t for (j = 1; j < n; j++) {\n\t i = cp.getEnd() + j;\n\t if (i > this.nbase) {\n\t i -= this.nbase + 1;\n\t }\n\t a = ac + j * angleinc;\n\t rr = rc + (rcn - rc) * (a - ac) / dan;\n\t this.bases[i].setX(xc + rr * Math.cos(a));\n\t this.bases[i].setY(yc + rr * Math.sin(a));\n\t }\n\t }\n\t }\n\t break;\n\t }\n\t for (ic = 0; ic < lp.getNconnection(); ic++) {\n\t if (icroot != ic) {\n\t cp = lp.getConnection(ic);\n\t //IM HERE\n\t this.generate_region(cp);\n\t this.traverse_loop(cp.getLoop(), cp);\n\t }\n\t }\n\t n = 0;\n\t sx = 0.0;\n\t sy = 0.0;\n\t for (ic = 0; ic < lp.getNconnection(); ic++) {\n\t j = ic + 1;\n\t if (j >= lp.getNconnection()) {\n\t j = 0;\n\t }\n\t cp = lp.getConnection(ic);\n\t cpnext = lp.getConnection(j);\n\t n += 2;\n\t sx += this.bases[cp.getStart()].getX() + this.bases[cp.getEnd()].getX();\n\t sy += this.bases[cp.getStart()].getY() + this.bases[cp.getEnd()].getY();\n\t if (!cp.isExtruded()) {\n\t for (j = cp.getEnd() + 1; j != cpnext.getStart(); j++) {\n\t if (j > this.nbase) {\n\t j -= this.nbase + 1;\n\t }\n\t n++;\n\t sx += this.bases[j].getX();\n\t sy += this.bases[j].getY();\n\t }\n\t }\n\t }\n\t lp.setX(sx / n);\n\t lp.setY(sy / n);\n\t};\n\n\tNAView.prototype.determine_radius = function determine_radius(lp, lencut) {\n\t var mindit, ci, dt, sumn, sumd, radius, dit;\n\t var i,\n\t j,\n\t end,\n\t start,\n\t imindit = 0;\n\t var cp = new _connection.Connection(),\n\t cpnext = new _connection.Connection();\n\t var rt2_2 = 0.7071068;\n\n\t do {\n\t mindit = 1.0e10;\n\t for (sumd = 0.0, sumn = 0.0, i = 0; i < lp.getNconnection(); i++) {\n\t cp = lp.getConnection(i);\n\t j = i + 1;\n\t if (j >= lp.getNconnection()) {\n\t j = 0;\n\t }\n\t cpnext = lp.getConnection(j);\n\t end = cp.getEnd();\n\t start = cpnext.getStart();\n\t if (start < end) {\n\t start += this.nbase + 1;\n\t }\n\t dt = cpnext.getAngle() - cp.getAngle();\n\t if (dt <= 0.0) {\n\t dt += 2 * Math.PI;\n\t }\n\t if (!cp.isExtruded()) {\n\t ci = start - end;\n\t } else {\n\t if (dt <= Math.PI / 2) {\n\t ci = 2.0;\n\t } else {\n\t ci = 1.5;\n\t }\n\t }\n\t sumn += dt * (1.0 / ci + 1.0);\n\t sumd += dt * dt / ci;\n\t dit = dt / ci;\n\t if (dit < mindit && !cp.isExtruded() && ci > 1.0) {\n\t mindit = dit;\n\t imindit = i;\n\t }\n\t }\n\t radius = sumn / sumd;\n\t if (radius < rt2_2) {\n\t radius = rt2_2;\n\t }\n\t if (mindit * radius < lencut) {\n\t lp.getConnection(imindit).setExtruded(true);\n\t }\n\t } while (mindit * radius < lencut);\n\t if (lp.getRadius() > 0.0) {\n\t radius = lp.getRadius();\n\t } else {\n\t lp.setRadius(radius);\n\t }\n\t};\n\n\tNAView.prototype.find_ic_middle = function find_ic_middle(icstart, icend, anchor_connection, acp, lp) {\n\t var count, ret, ic, i;\n\t var done;\n\n\t count = 0;\n\t ret = -1;\n\t ic = icstart;\n\t done = false;\n\t while (!done) {\n\t if (count++ > lp.getNconnection() * 2) {\n\t console.log(\"Infinite loop in 'find_ic_middle'\");\n\t }\n\t if (anchor_connection != null && lp.getConnection(ic) == acp) {\n\t ret = ic;\n\t }\n\t done = ic == icend;\n\t if (++ic >= lp.getNconnection()) {\n\t ic = 0;\n\t }\n\t }\n\t if (ret == -1) {\n\t for (i = 1, ic = icstart; i < (count + 1) / 2; i++) {\n\t if (++ic >= lp.getNconnection()) ic = 0;\n\t }\n\t ret = ic;\n\t }\n\t return ret;\n\t};\n\n\tNAView.prototype.construct_extruded_segment = function construct_extruded_segment(cp, cpnext) {\n\t var astart, aend1, aend2, aave, dx, dy, a1, a2, ac, rr, da, dac;\n\t var start, end, n, nstart, nend;\n\t var collision;\n\n\t astart = cp.getAngle();\n\t aend2 = aend1 = cpnext.getAngle();\n\t if (aend2 < astart) {\n\t aend2 += 2 * Math.PI;\n\t }\n\t aave = (astart + aend2) / 2.0;\n\t start = cp.getEnd();\n\t end = cpnext.getStart();\n\t n = end - start;\n\t if (n < 0) {\n\t n += this.nbase + 1;\n\t }\n\t da = cpnext.getAngle() - cp.getAngle();\n\t if (da < 0.0) {\n\t da += 2 * Math.PI;\n\t }\n\t if (n == 2) {\n\t this.construct_circle_segment(start, end);\n\t } else {\n\t dx = this.bases[end].getX() - this.bases[start].getX();\n\t dy = this.bases[end].getY() - this.bases[start].getY();\n\t rr = Math.sqrt(dx * dx + dy * dy);\n\t dx /= rr;\n\t dy /= rr;\n\t if (rr >= 1.5 && da <= Math.PI / 2) {\n\t nstart = start + 1;\n\t if (nstart > this.nbase) {\n\t nstart -= this.nbase + 1;\n\t }\n\t nend = end - 1;\n\t if (nend < 0) {\n\t nend += this.nbase + 1;\n\t }\n\t this.bases[nstart].setX(this.bases[start].getX() + 0.5 * dx);\n\t this.bases[nstart].setY(this.bases[start].getY() + 0.5 * dy);\n\t this.bases[nend].setX(this.bases[end].getX() - 0.5 * dx);\n\t this.bases[nend].setY(this.bases[end].getY() - 0.5 * dy);\n\t start = nstart;\n\t end = nend;\n\t }\n\t do {\n\t collision = false;\n\t this.construct_circle_segment(start, end);\n\t nstart = start + 1;\n\t if (nstart > this.nbase) {\n\t nstart -= this.nbase + 1;\n\t }\n\t dx = this.bases[nstart].getX() - this.bases[start].getX();\n\t dy = this.bases[nstart].getY() - this.bases[start].getY();\n\t a1 = Math.atan2(dy, dx);\n\t if (a1 < 0.0) {\n\t a1 += 2 * Math.PI;\n\t }\n\t dac = a1 - astart;\n\t if (dac < 0.0) {\n\t dac += 2 * Math.PI;\n\t }\n\t if (dac > Math.PI) {\n\t collision = true;\n\t }\n\t nend = end - 1;\n\t if (nend < 0) {\n\t nend += this.nbase + 1;\n\t }\n\t dx = this.bases[nend].getX() - this.bases[end].getX();\n\t dy = this.bases[nend].getY() - this.bases[end].getY();\n\t a2 = Math.atan2(dy, dx);\n\t if (a2 < 0.0) {\n\t a2 += 2 * Math.PI;\n\t }\n\t dac = aend1 - a2;\n\t if (dac < 0.0) {\n\t dac += 2 * Math.PI;\n\t }\n\t if (dac > Math.PI) {\n\t collision = true;\n\t }\n\t if (collision) {\n\t ac = this.minf2(aave, astart + 0.5);\n\t this.bases[nstart].setX(this.bases[start].getX() + Math.cos(ac));\n\t this.bases[nstart].setY(this.bases[start].getY() + Math.sin(ac));\n\t start = nstart;\n\t ac = this.maxf2(aave, aend2 - 0.5);\n\t this.bases[nend].setX(this.bases[end].getX() + Math.cos(ac));\n\t this.bases[nend].setY(this.bases[end].getY() + Math.sin(ac));\n\t end = nend;\n\t n -= 2;\n\t }\n\t } while (collision && n > 1);\n\t }\n\t};\n\n\tNAView.prototype.construct_circle_segment = function construct_circle_segment(start, end) {\n\t var dx, dy, rr, midx, midy, xn, yn, nrx, nry, mx, my, a;\n\t var l, j, i;\n\n\t dx = this.bases[end].getX() - this.bases[start].getX();\n\t dy = this.bases[end].getY() - this.bases[start].getY();\n\t rr = Math.sqrt(dx * dx + dy * dy);\n\t l = end - start;\n\t if (l < 0) {\n\t l += this.nbase + 1;\n\t }\n\t if (rr >= l) {\n\t dx /= rr;\n\t dy /= rr;\n\t for (j = 1; j < l; j++) {\n\t i = start + j;\n\t if (i > this.nbase) {\n\t i -= this.nbase + 1;\n\t }\n\t this.bases[i].setX(this.bases[start].getX() + dx * j / l);\n\t this.bases[i].setY(this.bases[start].getY() + dy * j / l);\n\t }\n\t } else {\n\t this.find_center_for_arc(l - 1, rr);\n\t dx /= rr;\n\t dy /= rr;\n\t midx = this.bases[start].getX() + dx * rr / 2.0;\n\t midy = this.bases[start].getY() + dy * rr / 2.0;\n\t xn = dy;\n\t yn = -dx;\n\t nrx = midx + this._h * xn;\n\t nry = midy + this._h * yn;\n\t mx = this.bases[start].getX() - nrx;\n\t my = this.bases[start].getY() - nry;\n\t rr = Math.sqrt(mx * mx + my * my);\n\t a = Math.atan2(my, mx);\n\t for (j = 1; j < l; j++) {\n\t i = start + j;\n\t if (i > this.nbase) {\n\t i -= this.nbase + 1;\n\t }\n\t this.bases[i].setX(nrx + rr * Math.cos(a + j * this.angleinc));\n\t this.bases[i].setY(nry + rr * Math.sin(a + j * this.angleinc));\n\t }\n\t }\n\t};\n\n\tNAView.prototype.find_center_for_arc = function find_center_for_arc(n, b) {\n\t var h, hhi, hlow, r, disc, theta, e, phi;\n\t var iter;\n\n\t hhi = (n + 1.0) / Math.PI;\n\t // changed to prevent div by zero if (ih)\n\t hlow = -hhi - b / (n + 1.000001 - b);\n\t if (b < 1) {\n\t // otherwise we might fail below (ih)\n\t hlow = 0;\n\t }\n\t iter = 0;\n\t do {\n\t h = (hhi + hlow) / 2.0;\n\t r = Math.sqrt(h * h + b * b / 4.0);\n\t disc = 1.0 - 0.5 / (r * r);\n\t if (Math.abs(disc) > 1.0) {\n\t console.log(\"Unexpected large magnitude discriminant = \" + disc + \" \" + r);\n\t }\n\t theta = Math.acos(disc);\n\t phi = Math.acos(h / r);\n\t e = theta * (n + 1) + 2 * phi - 2 * Math.PI;\n\t if (e > 0.0) {\n\t hlow = h;\n\t } else {\n\t hhi = h;\n\t }\n\t } while (Math.abs(e) > 0.0001 && ++iter < this.MAXITER);\n\t if (iter >= this.MAXITER) {\n\t if (noIterationFailureYet) {\n\t console.log(\"Iteration failed in find_center_for_arc\");\n\t noIterationFailureYet = false;\n\t }\n\t h = 0.0;\n\t theta = 0.0;\n\t }\n\t this._h = h;\n\t this.angleinc = theta;\n\t};\n\n\tNAView.prototype.generate_region = function generate_region(cp) {\n\t var l, start, end, i, mate;\n\t var rp;\n\n\t rp = cp.getRegion();\n\t l = 0;\n\t if (cp.getStart() == rp.getStart1()) {\n\t start = rp.getStart1();\n\t end = rp.getEnd1();\n\t } else {\n\t start = rp.getStart2();\n\t end = rp.getEnd2();\n\t }\n\t if (this.bases[cp.getStart()].getX() > this.ANUM - 100.0 || this.bases[cp.getEnd()].getX() > this.ANUM - 100.0) {\n\t console.log(\"Bad region passed to generate_region. Coordinates not defined.\");\n\t }\n\t for (i = start + 1; i <= end; i++) {\n\t l++;\n\t this.bases[i].setX(this.bases[cp.getStart()].getX() + this.HELIX_FACTOR * l * cp.getXrad());\n\t this.bases[i].setY(this.bases[cp.getStart()].getY() + this.HELIX_FACTOR * l * cp.getYrad());\n\t mate = this.bases[i].getMate();\n\t this.bases[mate].setX(this.bases[cp.getEnd()].getX() + this.HELIX_FACTOR * l * cp.getXrad());\n\t this.bases[mate].setY(this.bases[cp.getEnd()].getY() + this.HELIX_FACTOR * l * cp.getYrad());\n\t }\n\t};\n\n\tNAView.prototype.minf2 = function minf2(x1, x2) {\n\t return x1 < x2 ? x1 : x2;\n\t};\n\n\tNAView.prototype.maxf2 = function maxf2(x1, x2) {\n\t return x1 > x2 ? x1 : x2;\n\t};\n\n\tNAView.prototype.connected_connection = function connected_connection(cp, cpnext) {\n\t if (cp.isExtruded()) {\n\t return true;\n\t } else if (cp.getEnd() + 1 == cpnext.getStart()) {\n\t return true;\n\t } else {\n\t return false;\n\t }\n\t};\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports) {\n\n\t\"use strict\";\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t\tvalue: true\n\t});\n\texports.Radloop = Radloop;\n\tfunction Radloop() {\n\t\tthis.radius = null;\n\t\tthis.loopnumber = null;\n\t\tthis.next = null;\n\t\tthis.prev = null;\n\t}\n\n\tRadloop.prototype.getRadius = function () {\n\t\treturn this.radius;\n\t};\n\n\tRadloop.prototype.setRadius = function (radius) {\n\t\tthis.radius = radius;\n\t};\n\n\tRadloop.prototype.getLoopnumber = function () {\n\t\treturn this.loopnumber;\n\t};\n\n\tRadloop.prototype.setLoopnumber = function (loopnumber) {\n\t\tthis.loopnumber = loopnumber;\n\t};\n\n\tRadloop.prototype.getNext = function () {\n\t\treturn this.next;\n\t};\n\n\tRadloop.prototype.setNext = function (next) {\n\t\tthis.next = next;\n\t};\n\n\tRadloop.prototype.getPrev = function () {\n\t\treturn this.prev;\n\t};\n\n\tRadloop.prototype.setPrev = function (prev) {\n\t\tthis.prev = prev;\n\t};\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t\tvalue: true\n\t});\n\texports.Connection = Connection;\n\n\tvar _loop = __webpack_require__(8);\n\n\tvar _region = __webpack_require__(9);\n\n\tfunction Connection() {\n\t\tthis.loop = new _loop.Loop();\n\t\tthis.region = new _region.Region();\n\t\t// Start and end form the 1st base pair of the region.\n\t\tthis.start = null;\n\t\tthis.end = null;\n\t\tthis.xrad = null;\n\t\tthis.yrad = null;\n\t\tthis.angle = null;\n\t\t// True if segment between this connection and the\n\t\t// next must be extruded out of the circle\n\t\tthis.extruded = null;\n\t\t// True if the extruded segment must be drawn long.\n\t\tthis.broken = null;\n\n\t\tthis._isNull = false;\n\t}\n\n\tConnection.prototype.isNull = function () {\n\t\treturn this._isNull;\n\t};\n\n\tConnection.prototype.setNull = function (isNull) {\n\t\tthis._isNull = isNull;\n\t};\n\n\tConnection.prototype.getLoop = function () {\n\t\treturn this.loop;\n\t};\n\n\tConnection.prototype.setLoop = function (loop) {\n\t\tthis.loop = loop;\n\t};\n\n\tConnection.prototype.getRegion = function () {\n\t\treturn this.region;\n\t};\n\n\tConnection.prototype.setRegion = function (region) {\n\t\tthis.region = region;\n\t};\n\n\tConnection.prototype.getStart = function () {\n\t\treturn this.start;\n\t};\n\n\tConnection.prototype.setStart = function (start) {\n\t\tthis.start = start;\n\t};\n\n\tConnection.prototype.getEnd = function () {\n\t\treturn this.end;\n\t};\n\n\tConnection.prototype.setEnd = function (end) {\n\t\tthis.end = end;\n\t};\n\n\tConnection.prototype.getXrad = function () {\n\t\treturn this.xrad;\n\t};\n\n\tConnection.prototype.setXrad = function (xrad) {\n\t\tthis.xrad = xrad;\n\t};\n\n\tConnection.prototype.getYrad = function () {\n\t\treturn this.yrad;\n\t};\n\n\tConnection.prototype.setYrad = function (yrad) {\n\t\tthis.yrad = yrad;\n\t};\n\n\tConnection.prototype.getAngle = function () {\n\t\treturn this.angle;\n\t};\n\n\tConnection.prototype.setAngle = function (angle) {\n\t\tthis.angle = angle;\n\t};\n\n\tConnection.prototype.isExtruded = function () {\n\t\treturn this.extruded;\n\t};\n\n\tConnection.prototype.setExtruded = function (extruded) {\n\t\tthis.extruded = extruded;\n\t};\n\n\tConnection.prototype.isBroken = function () {\n\t\treturn this.broken;\n\t};\n\n\tConnection.prototype.setBroken = function (broken) {\n\t\tthis.broken = broken;\n\t};\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t\tvalue: true\n\t});\n\texports.Loop = Loop;\n\n\tvar _connection = __webpack_require__(7);\n\n\tfunction Loop() {\n\t\tthis.nconnection = null;\n\t\tthis.connections = [];\n\t\tthis._connections = [];\n\t\tthis.number = null;\n\t\tthis.depth = null;\n\t\tthis.mark = null;\n\t\tthis.x = null;\n\t\tthis.y = null;\n\t\tthis.radius = null;\n\t}\n\n\tLoop.prototype.getNconnection = function () {\n\t\treturn this.nconnection;\n\t};\n\n\tLoop.prototype.setNconnection = function (nconnection) {\n\t\tthis.nconnection = nconnection;\n\t};\n\n\tLoop.prototype.setConnection = function (i, c) {\n\t\tif (c != null) {\n\t\t\tthis._connections[i] = c;\n\t\t} else {\n\t\t\tif (!this._connections[i]) {\n\t\t\t\tthis._connections[i] = new _connection.Connection();\n\t\t\t}\n\t\t\tthis._connections[i].setNull(true);\n\t\t}\n\t};\n\n\tLoop.prototype.getConnection = function (i) {\n\t\tvar Connection = __webpack_require__(7);\n\t\tif (!this._connections[i]) {\n\t\t\tthis._connections[i] = new Connection();\n\t\t}\n\t\tvar c = this._connections[i];\n\t\tif (c.isNull()) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\treturn c;\n\t\t}\n\t};\n\n\tLoop.prototype.addConnection = function (i, c) {\n\t\tthis._connections.push(c);\n\t};\n\n\tLoop.prototype.getNumber = function () {\n\t\treturn this.number;\n\t};\n\n\tLoop.prototype.setNumber = function (number) {\n\t\tthis.number = number;\n\t};\n\n\tLoop.prototype.getDepth = function () {\n\t\treturn this.depth;\n\t};\n\n\tLoop.prototype.setDepth = function (depth) {\n\t\tthis.depth = depth;\n\t};\n\n\tLoop.prototype.isMark = function () {\n\t\treturn this.mark;\n\t};\n\n\tLoop.prototype.setMark = function (mark) {\n\t\tthis.mark = mark;\n\t};\n\n\tLoop.prototype.getX = function () {\n\t\treturn this.x;\n\t};\n\n\tLoop.prototype.setX = function (x) {\n\t\tthis.x = x;\n\t};\n\n\tLoop.prototype.getY = function () {\n\t\treturn this.y;\n\t};\n\n\tLoop.prototype.setY = function (y) {\n\t\tthis.y = y;\n\t};\n\n\tLoop.prototype.getRadius = function () {\n\t\treturn this.radius;\n\t};\n\n\tLoop.prototype.setRadius = function (radius) {\n\t\tthis.radius = radius;\n\t};\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports) {\n\n\t\"use strict\";\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t\tvalue: true\n\t});\n\texports.Region = Region;\n\tfunction Region() {\n\t\tthis._start1 = null;\n\t\tthis._end1 = null;\n\t\tthis._start2 = null;\n\t\tthis._end2 = null;\n\t}\n\n\tRegion.prototype.getStart1 = function () {\n\t\treturn this._start1;\n\t};\n\n\tRegion.prototype.setStart1 = function (start1) {\n\t\tthis._start1 = start1;\n\t};\n\n\tRegion.prototype.getEnd1 = function () {\n\t\treturn this._end1;\n\t};\n\n\tRegion.prototype.setEnd1 = function (end1) {\n\t\tthis._end1 = end1;\n\t};\n\n\tRegion.prototype.getStart2 = function () {\n\t\treturn this._start2;\n\t};\n\n\tRegion.prototype.setStart2 = function (start2) {\n\t\tthis._start2 = start2;\n\t};\n\n\tRegion.prototype.getEnd2 = function () {\n\t\treturn this._end2;\n\t};\n\n\tRegion.prototype.setEnd2 = function (end2) {\n\t\tthis._end2 = end2;\n\t};\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t\tvalue: true\n\t});\n\texports.Base = Base;\n\n\tvar _region = __webpack_require__(9);\n\n\tfunction Base() {\n\t\tthis.mate = null;\n\t\tthis.x = null;\n\t\tthis.y = null;\n\t\tthis.extracted = null;\n\t\tthis.region = new _region.Region();\n\t}\n\n\tBase.prototype.getMate = function () {\n\t\treturn this.mate;\n\t};\n\n\tBase.prototype.setMate = function (mate) {\n\t\tthis.mate = mate;\n\t};\n\n\tBase.prototype.getX = function () {\n\t\treturn this.x;\n\t};\n\n\tBase.prototype.setX = function (x) {\n\t\tthis.x = x;\n\t};\n\n\tBase.prototype.getY = function () {\n\t\treturn this.y;\n\t};\n\n\tBase.prototype.setY = function (y) {\n\t\tthis.y = y;\n\t};\n\n\tBase.prototype.isExtracted = function () {\n\t\treturn this.extracted;\n\t};\n\n\tBase.prototype.setExtracted = function (extracted) {\n\t\tthis.extracted = extracted;\n\t};\n\n\tBase.prototype.getRegion = function () {\n\t\treturn this.region;\n\t};\n\n\tBase.prototype.setRegion = function (region) {\n\t\tthis.region = region;\n\t};\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t// style-loader: Adds some css to the DOM by adding a