Difference between revisions of "Team:William and Mary/Model"

Line 1: Line 1:
 
{{William_and_Mary}}
 
{{William_and_Mary}}
 +
 
<html>
 
<html>
 
+
    <head><meta charset="utf-8" /></head>
 
+
    <body>
 
+
       
<div class="clear"></div>
+
            <script type="text/javascript">!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Plotly=t()}}(function(){return function a(o,s,l){function u(r,t){if(!s[r]){if(!o[r]){var e="function"==typeof require&&require;if(!t&&e)return e(r,!0);if(c)return c(r,!0);var n=new Error("Cannot find module '"+r+"'");throw n.code="MODULE_NOT_FOUND",n}var i=s[r]={exports:{}};o[r][0].call(i.exports,function(t){var e=o[r][1][t];return u(e||t)},i,i.exports,a,o,s,l)}return s[r].exports}for(var c="function"==typeof require&&require,t=0;t<l.length;t++)u(l[t]);return u}({1:[function(t,e,r){"use strict";e.exports=function(h,t){h=h||document.body,t=t||{};var e=[.01,1/0];"distanceLimits"in t&&(e[0]=t.distanceLimits[0],e[1]=t.distanceLimits[1]);"zoomMin"in t&&(e[0]=t.zoomMin);"zoomMax"in t&&(e[1]=t.zoomMax);var p=n({center:t.center||[0,0,0],up:t.up||[0,1,0],eye:t.eye||[0,0,10],mode:t.mode||"orbit",distanceLimits:e}),s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],d=0,l=h.clientWidth,u=h.clientHeight,m={view:p,element:h,delay:t.delay||16,rotateSpeed:t.rotateSpeed||1,zoomSpeed:t.zoomSpeed||1,translateSpeed:t.translateSpeed||1,flipX:!!t.flipX,flipY:!!t.flipY,modes:p.modes,tick:function(){var t=x(),e=this.delay;p.idle(t-e),p.flush(t-(100+2*e));var r=t-2*e;p.recalcMatrix(r);for(var n=!0,i=p.computedMatrix,a=0;a<16;++a)n=n&&s[a]===i[a],s[a]=i[a];var o=h.clientWidth===l&&h.clientHeight===u;return l=h.clientWidth,u=h.clientHeight,n?!o:(d=Math.exp(p.computedRadius[0]),!0)},lookAt:function(t,e,r){p.lookAt(p.lastT(),t,e,r)},rotate:function(t,e,r){p.rotate(p.lastT(),t,e,r)},pan:function(t,e,r){p.pan(p.lastT(),t,e,r)},translate:function(t,e,r){p.translate(p.lastT(),t,e,r)}};Object.defineProperties(m,{matrix:{get:function(){return p.computedMatrix},set:function(t){return p.setMatrix(p.lastT(),t),p.computedMatrix},enumerable:!0},mode:{get:function(){return p.getMode()},set:function(t){return p.setMode(t),p.getMode()},enumerable:!0},center:{get:function(){return p.computedCenter},set:function(t){return p.lookAt(p.lastT(),t),p.computedCenter},enumerable:!0},eye:{get:function(){return p.computedEye},set:function(t){return p.lookAt(p.lastT(),null,t),p.computedEye},enumerable:!0},up:{get:function(){return p.computedUp},set:function(t){return p.lookAt(p.lastT(),null,null,t),p.computedUp},enumerable:!0},distance:{get:function(){return d},set:function(t){return p.setDistance(p.lastT(),t),t},enumerable:!0},distanceLimits:{get:function(){return p.getDistanceLimits(e)},set:function(t){return p.setDistanceLimits(t),t},enumerable:!0}}),h.addEventListener("contextmenu",function(t){return t.preventDefault(),!1});var g=0,v=0,y={shift:!1,control:!1,alt:!1,meta:!1};function r(t,e,r,n){var i=1/h.clientHeight,a=i*(e-g),o=i*(r-v),s=m.flipX?1:-1,l=m.flipY?1:-1,u=Math.PI*m.rotateSpeed,c=x();if(1&t)n.shift?p.rotate(c,0,0,-a*u):p.rotate(c,s*u*a,-l*u*o,0);else if(2&t)p.pan(c,-m.translateSpeed*a*d,m.translateSpeed*o*d,0);else if(4&t){var f=m.zoomSpeed*o/window.innerHeight*(c-p.lastT())*50;p.pan(c,0,0,d*(Math.exp(f)-1))}g=e,v=r,y=n}return i(h,r),h.addEventListener("touchstart",function(t){var e=o(t.changedTouches[0],h);r(0,e[0],e[1],y),r(1,e[0],e[1],y),t.preventDefault()},!!c&&{passive:!1}),h.addEventListener("touchmove",function(t){var e=o(t.changedTouches[0],h);r(1,e[0],e[1],y),t.preventDefault()},!!c&&{passive:!1}),h.addEventListener("touchend",function(t){o(t.changedTouches[0],h),r(0,g,v,y),t.preventDefault()},!!c&&{passive:!1}),a(h,function(t,e,r){var n=m.flipX?1:-1,i=m.flipY?1:-1,a=x();if(Math.abs(t)>Math.abs(e))p.rotate(a,0,0,-t*n*Math.PI*m.rotateSpeed/window.innerWidth);else{var o=m.zoomSpeed*i*e/window.innerHeight*(a-p.lastT())/100;p.pan(a,0,0,d*(Math.exp(o)-1))}},!0),m};var x=t("right-now"),n=t("3d-view"),i=t("mouse-change"),a=t("mouse-wheel"),o=t("mouse-event-offset"),c=t("has-passive-events")},{"3d-view":2,"has-passive-events":409,"mouse-change":607,"mouse-event-offset":608,"mouse-wheel":610,"right-now":1321}],2:[function(t,e,r){"use strict";e.exports=function(t){var e=(t=t||{}).eye||[0,0,1],r=t.center||[0,0,0],n=t.up||[0,1,0],i=t.distanceLimits||[0,1/0],a=t.mode||"turntable",o=u(),s=c(),l=f();return o.setDistanceLimits(i[0],i[1]),o.lookAt(0,e,r,n),s.setDistanceLimits(i[0],i[1]),s.lookAt(0,e,r,n),l.setDistanceLimits(i[0],i[1]),l.lookAt(0,e,r,n),new h({turntable:o,orbit:s,matrix:l},a)};var u=t("turntable-camera-controller"),c=t("orbit-camera-controller"),f=t("matrix-camera-controller");function h(e,t){this._controllerNames=Object.keys(e),this._controllerList=this._controllerNames.map(function(t){return e[t]}),this._mode=t,this._active=e[t],this._active||(this._mode="turntable",this._active=e.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var a=h.prototype;[["flush",1],["idle",1],["lookAt",4],["rotate",4],["pan",4],["translate",4],["setMatrix",2],["setDistanceLimits",2],["setDistance",2]].forEach(function(t){for(var e=t[0],r=[],n=0;n<t[1];++n)r.push("a"+n);var i="var cc=this._controllerList;for(var i=0;i<cc.length;++i){cc[i]."+t[0]+"("+r.join()+")}";a[e]=Function.apply(null,r.concat(i))}),a.recalcMatrix=function(t){this._active.recalcMatrix(t)},a.getDistance=function(t){return this._active.getDistance(t)},a.getDistanceLimits=function(t){return this._active.getDistanceLimits(t)},a.lastT=function(){return this._active.lastT()},a.setMode=function(t){if(t!==this._mode){var e=this._controllerNames.indexOf(t);if(!(e<0)){var r=this._active,n=this._controllerList[e],i=Math.max(r.lastT(),n.lastT());r.recalcMatrix(i),n.setMatrix(i,r.computedMatrix),this._active=n,this._mode=t,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}}},a.getMode=function(){return this._mode}},{"matrix-camera-controller":605,"orbit-camera-controller":628,"turntable-camera-controller":1358}],3:[function(t,e,r){var n,i;n=this,i=function(t,d,m,g){"use strict";t.sankey=function(){var e={},a=24,l=8,u=[1,1],c=[],f=[];function r(){function e(t,e){return t.source.y-e.source.y||t.originalIndex-e.originalIndex}function r(t,e){return t.target.y-e.target.y||t.originalIndex-e.originalIndex}c.forEach(function(t){t.sourceLinks.sort(r),t.targetLinks.sort(e)}),c.forEach(function(t){var e=0,r=0;t.sourceLinks.forEach(function(t){t.sy=e,e+=t.dy}),t.targetLinks.forEach(function(t){t.ty=r,r+=t.dy})})}function h(t){return t.y+t.dy/2}function p(t){return t.value}return e.nodeWidth=function(t){return arguments.length?(a=+t,e):a},e.nodePadding=function(t){return arguments.length?(l=+t,e):l},e.nodes=function(t){return arguments.length?(c=t,e):c},e.links=function(t){return arguments.length?(f=t,e):f},e.size=function(t){return arguments.length?(u=t,e):u},e.layout=function(t){return c.forEach(function(t){t.sourceLinks=[],t.targetLinks=[]}),f.forEach(function(t,e){var r=t.source,n=t.target;"number"==typeof r&&(r=t.source=c[t.source]),"number"==typeof n&&(n=t.target=c[t.target]),t.originalIndex=e,r.sourceLinks.push(t),n.targetLinks.push(t)}),c.forEach(function(t){t.value=Math.max(d.sum(t.sourceLinks,p),d.sum(t.targetLinks,p))}),function(){for(var e,r,n,t=c,i=0;t.length;)e=[],t.forEach(function(t){t.x=i,t.dx=a,t.sourceLinks.forEach(function(t){e.indexOf(t.target)<0&&e.push(t.target)})}),t=e,++i;n=i,c.forEach(function(t){t.sourceLinks.length||(t.x=n-1)}),r=(u[0]-a)/(i-1),c.forEach(function(t){t.x*=r})}(),function(t){var r,e=m.nest().key(function(t){return t.x}).sortKeys(d.ascending).entries(c).map(function(t){return t.values});r=d.min(e,function(t){return(u[1]-(t.length-1)*l)/d.sum(t,p)}),e.forEach(function(t){t.forEach(function(t,e){t.y=e,t.dy=t.value*r})}),f.forEach(function(t){t.dy=t.value*r}),o();for(var n=1;0<t;--t)a(n*=.99),o(),i(n),o();function i(r){function n(t){return h(t.source)*t.value}e.forEach(function(t){t.forEach(function(t){if(t.targetLinks.length){var e=d.sum(t.targetLinks,n)/d.sum(t.targetLinks,p);t.y+=(e-h(t))*r}})})}function a(r){function n(t){return h(t.target)*t.value}e.slice().reverse().forEach(function(t){t.forEach(function(t){if(t.sourceLinks.length){var e=d.sum(t.sourceLinks,n)/d.sum(t.sourceLinks,p);t.y+=(e-h(t))*r}})})}function o(){e.forEach(function(t){var e,r,n,i=0,a=t.length;for(t.sort(s),n=0;n<a;++n)e=t[n],0<(r=i-e.y)&&(e.y+=r),i=e.y+e.dy+l;if(0<(r=i-l-u[1]))for(i=e.y-=r,n=a-2;0<=n;--n)e=t[n],0<(r=e.y+e.dy+l-i)&&(e.y-=r),i=e.y})}function s(t,e){return t.y-e.y}}(t),r(),e},e.relayout=function(){return r(),e},e.link=function(){var c=.5;function e(t){var e=t.source.x+t.source.dx,r=t.target.x,n=g.interpolateNumber(e,r),i=n(c),a=n(1-c),o=t.source.y+t.sy,s=o+t.dy,l=t.target.y+t.ty,u=l+t.dy;return"M"+e+","+o+"C"+i+","+o+" "+a+","+l+" "+r+","+l+"L"+r+","+u+"C"+a+","+u+" "+i+","+s+" "+e+","+s+"Z"}return e.curvature=function(t){return arguments.length?(c=+t,e):c},e},e},Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof r&&"undefined"!=typeof e?i(r,t("d3-array"),t("d3-collection"),t("d3-interpolate")):i(n.d3=n.d3||{},n.d3,n.d3,n.d3)},{"d3-array":98,"d3-collection":99,"d3-interpolate":103}],4:[function(t,e,r){"use strict";var n="undefined"==typeof WeakMap?t("weak-map"):WeakMap,i=t("gl-buffer"),a=t("gl-vao"),o=new n;e.exports=function(t){var e=o.get(t),r=e&&(e._triangleBuffer.handle||e._triangleBuffer.buffer);if(!r||!t.isBuffer(r)){var n=i(t,new Float32Array([-1,-1,-1,4,4,-1]));(e=a(t,[{buffer:n,type:t.FLOAT,size:2}]))._triangleBuffer=n,o.set(t,e)}e.bind(),t.drawArrays(t.TRIANGLES,0,3),e.unbind()}},{"gl-buffer":192,"gl-vao":366,"weak-map":1372}],5:[function(t,e,r){e.exports=function(t){var i=0,a=0,o=0,s=0;return t.map(function(t){var e=(t=t.slice())[0],r=e.toUpperCase();if(e!=r)switch(t[0]=r,e){case"a":t[6]+=o,t[7]+=s;break;case"v":t[1]+=s;break;case"h":t[1]+=o;break;default:for(var n=1;n<t.length;)t[n++]+=o,t[n++]+=s}switch(r){case"Z":o=i,s=a;break;case"H":o=t[1];break;case"V":s=t[1];break;case"M":o=i=t[1],s=a=t[2];break;default:o=t[t.length-2],s=t[t.length-1]}return t})}},{}],6:[function(t,e,r){var l=t("pad-left");e.exports=function(t,a,o){a="number"==typeof a?a:1,o=o||": ";var e=t.split(/\r?\n/),s=String(e.length+a-1).length;return e.map(function(t,e){var r=e+a,n=String(r).length,i=l(r,s-n);return i+o+t}).join("\n")}},{"pad-left":629}],7:[function(t,e,r){"use strict";e.exports=function(t){var e=t.length;if(0===e)return[];if(1===e)return[0];for(var r=t[0].length,n=[t[0]],i=[0],a=1;a<e;++a)if(n.push(t[a]),o(n,r)){if(i.push(a),i.length===r+1)return i}else n.pop();return i};var s=t("robust-orientation");function o(t,e){for(var r=new Array(e+1),n=0;n<t.length;++n)r[n]=t[n];for(n=0;n<=t.length;++n){for(var i=t.length;i<=e;++i){for(var a=new Array(e),o=0;o<e;++o)a[o]=Math.pow(i+1-n,o);r[i]=a}if(s.apply(void 0,r))return!0}return!1}},{"robust-orientation":1327}],8:[function(t,e,r){"use strict";e.exports=function(n,i){return a(i).filter(function(t){for(var e=new Array(t.length),r=0;r<t.length;++r)e[r]=i[t[r]];return o(e)*n<1})};var a=t("delaunay-triangulate"),o=t("circumradius")},{circumradius:56,"delaunay-triangulate":109}],9:[function(t,e,r){e.exports=function(t,e){return i(n(t,e))};var n=t("alpha-complex"),i=t("simplicial-complex-boundary")},{"alpha-complex":8,"simplicial-complex-boundary":1333}],10:[function(t,e,r){"use strict";e.exports=function(t,e){if(!t||null==t.length)throw Error("Argument should be an array");e=null==e?1:Math.floor(e);for(var r=Array(2*e),n=0;n<e;n++){for(var i=-1/0,a=1/0,o=n,s=t.length;o<s;o+=e)t[o]>i&&(i=t[o]),t[o]<a&&(a=t[o]);r[n]=a,r[e+n]=i}return r}},{}],11:[function(t,e,r){"use strict";var u=t("array-bounds");e.exports=function(t,e,r){if(!t||null==t.length)throw Error("Argument should be an array");null==e&&(e=1);null==r&&(r=u(t,e));for(var n=0;n<e;n++){var i=r[e+n],a=r[n],o=n,s=t.length;if(i===1/0&&a===-1/0)for(o=n;o<s;o+=e)t[o]=t[o]===i?1:t[o]===a?0:.5;else if(i===1/0)for(o=n;o<s;o+=e)t[o]=t[o]===i?1:0;else if(a===-1/0)for(o=n;o<s;o+=e)t[o]=t[o]===a?0:1;else{var l=i-a;for(o=n;o<s;o+=e)t[o]=0===l?.5:(t[o]-a)/l}}return t}},{"array-bounds":10}],12:[function(t,e,r){e.exports=function(t,e){var r="number"==typeof t,n="number"==typeof e;r&&!n?(e=t,t=0):r||n||(e=t=0);var i=(e|=0)-(t|=0);if(i<0)throw new Error("array length must be positive");for(var a=new Array(i),o=0,s=t;o<i;o++,s++)a[o]=s;return a}},{}],13:[function(_,w,t){(function(e){"use strict";function a(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,a=Math.min(r,n);i<a;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0}function o(t){return e.Buffer&&"function"==typeof e.Buffer.isBuffer?e.Buffer.isBuffer(t):!(null==t||!t._isBuffer)}var c=_("util/"),n=Object.prototype.hasOwnProperty,f=Array.prototype.slice,r="foo"===function(){}.name;function s(t){return Object.prototype.toString.call(t)}function l(t){return!o(t)&&("function"==typeof e.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):!!t&&(t instanceof DataView||!!(t.buffer&&t.buffer instanceof ArrayBuffer))))}var u=w.exports=t,i=/\s*function\s+([^\(\s]*)\s*/;function h(t){if(c.isFunction(t)){if(r)return t.name;var e=t.toString().match(i);return e&&e[1]}}function p(t,e){return"string"==typeof t?t.length<e?t:t.slice(0,e):t}function d(t){if(r||!c.isFunction(t))return c.inspect(t);var e=h(t);return"[Function"+(e?": "+e:"")+"]"}function m(t,e,r,n,i){throw new u.AssertionError({message:r,actual:t,expected:e,operator:n,stackStartFunction:i})}function t(t,e){t||m(t,!0,e,"==",u.ok)}function g(t,e,r,n){if(t===e)return!0;if(o(t)&&o(e))return 0===a(t,e);if(c.isDate(t)&&c.isDate(e))return t.getTime()===e.getTime();if(c.isRegExp(t)&&c.isRegExp(e))return t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase;if(null!==t&&"object"==typeof t||null!==e&&"object"==typeof e){if(l(t)&&l(e)&&s(t)===s(e)&&!(t instanceof Float32Array||t instanceof Float64Array))return 0===a(new Uint8Array(t.buffer),new Uint8Array(e.buffer));if(o(t)!==o(e))return!1;var i=(n=n||{actual:[],expected:[]}).actual.indexOf(t);return-1!==i&&i===n.expected.indexOf(e)||(n.actual.push(t),n.expected.push(e),function(t,e,r,n){if(null==t||null==e)return!1;if(c.isPrimitive(t)||c.isPrimitive(e))return t===e;if(r&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var i=v(t),a=v(e);if(i&&!a||!i&&a)return!1;if(i)return t=f.call(t),e=f.call(e),g(t,e,r);var o,s,l=b(t),u=b(e);if(l.length!==u.length)return!1;for(l.sort(),u.sort(),s=l.length-1;0<=s;s--)if(l[s]!==u[s])return!1;for(s=l.length-1;0<=s;s--)if(o=l[s],!g(t[o],e[o],r,n))return!1;return!0}(t,e,r,n))}return r?t===e:t==e}function v(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function y(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function x(t,e,r,n){var i;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=function(t){var e;try{t()}catch(t){e=t}return e}(e),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!i&&m(i,r,"Missing expected exception"+n);var a="string"==typeof n,o=!t&&i&&!r;if((!t&&c.isError(i)&&a&&y(i,r)||o)&&m(i,r,"Got unwanted exception"+n),t&&i&&r&&!y(i,r)||!t&&i)throw i}u.AssertionError=function(t){var e;this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=p(d((e=this).actual),128)+" "+e.operator+" "+p(d(e.expected),128),this.generatedMessage=!0);var r=t.stackStartFunction||m;if(Error.captureStackTrace)Error.captureStackTrace(this,r);else{var n=new Error;if(n.stack){var i=n.stack,a=h(r),o=i.indexOf("\n"+a);if(0<=o){var s=i.indexOf("\n",o+1);i=i.substring(s+1)}this.stack=i}}},c.inherits(u.AssertionError,Error),u.fail=m,u.ok=t,u.equal=function(t,e,r){t!=e&&m(t,e,r,"==",u.equal)},u.notEqual=function(t,e,r){t==e&&m(t,e,r,"!=",u.notEqual)},u.deepEqual=function(t,e,r){g(t,e,!1)||m(t,e,r,"deepEqual",u.deepEqual)},u.deepStrictEqual=function(t,e,r){g(t,e,!0)||m(t,e,r,"deepStrictEqual",u.deepStrictEqual)},u.notDeepEqual=function(t,e,r){g(t,e,!1)&&m(t,e,r,"notDeepEqual",u.notDeepEqual)},u.notDeepStrictEqual=function t(e,r,n){g(e,r,!0)&&m(e,r,n,"notDeepStrictEqual",t)},u.strictEqual=function(t,e,r){t!==e&&m(t,e,r,"===",u.strictEqual)},u.notStrictEqual=function(t,e,r){t===e&&m(t,e,r,"!==",u.notStrictEqual)},u.throws=function(t,e,r){x(!0,t,e,r)},u.doesNotThrow=function(t,e,r){x(!1,t,e,r)},u.ifError=function(t){if(t)throw t};var b=Object.keys||function(t){var e=[];for(var r in t)n.call(t,r)&&e.push(r);return e}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"util/":1369}],14:[function(t,e,r){e.exports=function(t){return atob(t)}},{}],15:[function(t,e,r){"use strict";e.exports=function(t,e){for(var r=e.length,n=new Array(r+1),i=0;i<r;++i){for(var a=new Array(r+1),o=0;o<=r;++o)a[o]=t[o][i];n[i]=a}n[r]=new Array(r+1);for(var i=0;i<=r;++i)n[r][i]=1;for(var s=new Array(r+1),i=0;i<r;++i)s[i]=e[i];s[r]=1;var l=f(n,s),u=h(l[r+1]);0===u&&(u=1);for(var c=new Array(r+1),i=0;i<=r;++i)c[i]=h(l[i])/u;return c};var f=t("robust-linear-solve");function h(t){for(var e=0,r=0;r<t.length;++r)e+=t[r];return e}},{"robust-linear-solve":1326}],16:[function(t,e,r){"use strict";r.byteLength=function(t){return 3*t.length/4-f(t)},r.toByteArray=function(t){var e,r,n,i,a,o=t.length;i=f(t),a=new c(3*o/4-i),r=0<i?o-4:o;var s=0;for(e=0;e<r;e+=4)n=u[t.charCodeAt(e)]<<18|u[t.charCodeAt(e+1)]<<12|u[t.charCodeAt(e+2)]<<6|u[t.charCodeAt(e+3)],a[s++]=n>>16&255,a[s++]=n>>8&255,a[s++]=255&n;2===i?(n=u[t.charCodeAt(e)]<<2|u[t.charCodeAt(e+1)]>>4,a[s++]=255&n):1===i&&(n=u[t.charCodeAt(e)]<<10|u[t.charCodeAt(e+1)]<<4|u[t.charCodeAt(e+2)]>>2,a[s++]=n>>8&255,a[s++]=255&n);return a},r.fromByteArray=function(t){for(var e,r=t.length,n=r%3,i="",a=[],o=0,s=r-n;o<s;o+=16383)a.push(h(t,o,s<o+16383?s:o+16383));1===n?(e=t[r-1],i+=l[e>>2],i+=l[e<<4&63],i+="=="):2===n&&(e=(t[r-2]<<8)+t[r-1],i+=l[e>>10],i+=l[e>>4&63],i+=l[e<<2&63],i+="=");return a.push(i),a.join("")};for(var l=[],u=[],c="undefined"!=typeof Uint8Array?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,a=n.length;i<a;++i)l[i]=n[i],u[n.charCodeAt(i)]=i;function f(t){var e=t.length;if(0<e%4)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function h(t,e,r){for(var n,i,a=[],o=e;o<r;o+=3)n=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(255&t[o+2]),a.push(l[(i=n)>>18&63]+l[i>>12&63]+l[i>>6&63]+l[63&i]);return a.join("")}u["-".charCodeAt(0)]=62,u["_".charCodeAt(0)]=63},{}],17:[function(t,e,r){"use strict";var n=t("./lib/rationalize");e.exports=function(t,e){return n(t[0].mul(e[1]).add(e[0].mul(t[1])),t[1].mul(e[1]))}},{"./lib/rationalize":27}],18:[function(t,e,r){"use strict";e.exports=function(t,e){return t[0].mul(e[1]).cmp(e[0].mul(t[1]))}},{}],19:[function(t,e,r){"use strict";var n=t("./lib/rationalize");e.exports=function(t,e){return n(t[0].mul(e[1]),t[1].mul(e[0]))}},{"./lib/rationalize":27}],20:[function(t,e,r){"use strict";var o=t("./is-rat"),s=t("./lib/is-bn"),l=t("./lib/num-to-bn"),u=t("./lib/str-to-bn"),c=t("./lib/rationalize"),f=t("./div");e.exports=function t(e,r){if(o(e))return r?f(e,t(r)):[e[0].clone(),e[1].clone()];var n=0;var i,a;if(s(e))i=e.clone();else if("string"==typeof e)i=u(e);else{if(0===e)return[l(0),l(1)];if(e===Math.floor(e))i=l(e);else{for(;e!==Math.floor(e);)e*=Math.pow(2,256),n-=256;i=l(e)}}if(o(r))i.mul(r[1]),a=r[0].clone();else if(s(r))a=r.clone();else if("string"==typeof r)a=u(r);else if(r)if(r===Math.floor(r))a=l(r);else{for(;r!==Math.floor(r);)r*=Math.pow(2,256),n+=256;a=l(r)}else a=l(1);0<n?i=i.ushln(n):n<0&&(a=a.ushln(-n));return c(i,a)}},{"./div":19,"./is-rat":21,"./lib/is-bn":25,"./lib/num-to-bn":26,"./lib/rationalize":27,"./lib/str-to-bn":28}],21:[function(t,e,r){"use strict";var n=t("./lib/is-bn");e.exports=function(t){return Array.isArray(t)&&2===t.length&&n(t[0])&&n(t[1])}},{"./lib/is-bn":25}],22:[function(t,e,r){"use strict";var n=t("bn.js");e.exports=function(t){return t.cmp(new n(0))}},{"bn.js":36}],23:[function(t,e,r){"use strict";var o=t("./bn-sign");e.exports=function(t){var e=t.length,r=t.words,n=0;if(1===e)n=r[0];else if(2===e)n=r[0]+67108864*r[1];else for(var i=0;i<e;i++){var a=r[i];n+=a*Math.pow(67108864,i)}return o(t)*n}},{"./bn-sign":22}],24:[function(t,e,r){"use strict";var n=t("double-bits"),i=t("bit-twiddle").countTrailingZeros;e.exports=function(t){var e=i(n.lo(t));if(e<32)return e;var r=i(n.hi(t));if(20<r)return 52;return r+32}},{"bit-twiddle":34,"double-bits":111}],25:[function(t,e,r){"use strict";t("bn.js");e.exports=function(t){return t&&"object"==typeof t&&Boolean(t.words)}},{"bn.js":36}],26:[function(t,e,r){"use strict";var n=t("bn.js"),i=t("double-bits");e.exports=function(t){var e=i.exponent(t);return e<52?new n(t):new n(t*Math.pow(2,52-e)).ushln(e-52)}},{"bn.js":36,"double-bits":111}],27:[function(t,e,r){"use strict";var a=t("./num-to-bn"),o=t("./bn-sign");e.exports=function(t,e){var r=o(t),n=o(e);if(0===r)return[a(0),a(1)];if(0===n)return[a(0),a(0)];n<0&&(t=t.neg(),e=e.neg());var i=t.gcd(e);if(i.cmpn(1))return[t.div(i),e.div(i)];return[t,e]}},{"./bn-sign":22,"./num-to-bn":26}],28:[function(t,e,r){"use strict";var n=t("bn.js");e.exports=function(t){return new n(t)}},{"bn.js":36}],29:[function(t,e,r){"use strict";var n=t("./lib/rationalize");e.exports=function(t,e){return n(t[0].mul(e[0]),t[1].mul(e[1]))}},{"./lib/rationalize":27}],30:[function(t,e,r){"use strict";var n=t("./lib/bn-sign");e.exports=function(t){return n(t[0])*n(t[1])}},{"./lib/bn-sign":22}],31:[function(t,e,r){"use strict";var n=t("./lib/rationalize");e.exports=function(t,e){return n(t[0].mul(e[1]).sub(t[1].mul(e[0])),t[1].mul(e[1]))}},{"./lib/rationalize":27}],32:[function(t,e,r){"use strict";var f=t("./lib/bn-to-num"),h=t("./lib/ctz");e.exports=function(t){var e=t[0],r=t[1];if(0===e.cmpn(0))return 0;var n=e.abs().divmod(r.abs()),i=n.div,a=f(i),o=n.mod,s=e.negative!==r.negative?-1:1;if(0===o.cmpn(0))return s*a;{if(a){var l=h(a)+4,u=f(o.ushln(l).divRound(r));return s*(a+u*Math.pow(2,-l))}var c=r.bitLength()-o.bitLength()+53,u=f(o.ushln(c).divRound(r));return c<1023?s*u*Math.pow(2,-c):(u*=Math.pow(2,-1023),s*u*Math.pow(2,1023-c))}}},{"./lib/bn-to-num":23,"./lib/ctz":24}],33:[function(t,e,r){"use strict";function i(t,e,r,n,i,a){var o=["function ",t,"(a,l,h,",n.join(","),"){",a?"":"var i=",r?"l-1":"h+1",";while(l<=h){var m=(l+h)>>>1,x=a",i?".get(m)":"[m]"];return a?e.indexOf("c")<0?o.push(";if(x===y){return m}else if(x<=y){"):o.push(";var p=c(x,y);if(p===0){return m}else if(p<=0){"):o.push(";if(",e,"){i=m;"),r?o.push("l=m+1}else{h=m-1}"):o.push("h=m-1}else{l=m+1}"),o.push("}"),a?o.push("return -1};"):o.push("return i};"),o.join("")}function n(t,e,r,n){return new Function([i("A","x"+t+"y",e,["y"],!1,n),i("B","x"+t+"y",e,["y"],!0,n),i("P","c(x,y)"+t+"0",e,["y","c"],!1,n),i("Q","c(x,y)"+t+"0",e,["y","c"],!0,n),"function dispatchBsearch",r,"(a,y,c,l,h){if(a.shape){if(typeof(c)==='function'){return Q(a,(l===undefined)?0:l|0,(h===undefined)?a.shape[0]-1:h|0,y,c)}else{return B(a,(c===undefined)?0:c|0,(l===undefined)?a.shape[0]-1:l|0,y)}}else{if(typeof(c)==='function'){return P(a,(l===undefined)?0:l|0,(h===undefined)?a.length-1:h|0,y,c)}else{return A(a,(c===undefined)?0:c|0,(l===undefined)?a.length-1:l|0,y)}}}return dispatchBsearch",r].join(""))()}e.exports={ge:n(">=",!1,"GE"),gt:n(">",!1,"GT"),lt:n("<",!0,"LT"),le:n("<=",!0,"LE"),eq:n("-",!0,"EQ",!0)}},{}],34:[function(t,e,r){"use strict";"use restrict";function n(t){var e=32;return(t&=-t)&&e--,65535&t&&(e-=16),16711935&t&&(e-=8),252645135&t&&(e-=4),858993459&t&&(e-=2),1431655765&t&&(e-=1),e}r.INT_BITS=32,r.INT_MAX=2147483647,r.INT_MIN=-1<<31,r.sign=function(t){return(0<t)-(t<0)},r.abs=function(t){var e=t>>31;return(t^e)-e},r.min=function(t,e){return e^(t^e)&-(t<e)},r.max=function(t,e){return t^(t^e)&-(t<e)},r.isPow2=function(t){return!(t&t-1||!t)},r.log2=function(t){var e,r;return e=(65535<t)<<4,e|=r=(255<(t>>>=e))<<3,e|=r=(15<(t>>>=r))<<2,(e|=r=(3<(t>>>=r))<<1)|(t>>>=r)>>1},r.log10=function(t){return 1e9<=t?9:1e8<=t?8:1e7<=t?7:1e6<=t?6:1e5<=t?5:1e4<=t?4:1e3<=t?3:100<=t?2:10<=t?1:0},r.popCount=function(t){return 16843009*((t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135)>>>24},r.countTrailingZeros=n,r.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)+1},r.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},r.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,27030>>>(t&=15)&1};var i=new Array(256);!function(t){for(var e=0;e<256;++e){var r=e,n=e,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;t[e]=n<<i&255}}(i),r.reverse=function(t){return i[255&t]<<24|i[t>>>8&255]<<16|i[t>>>16&255]<<8|i[t>>>24&255]},r.interleave2=function(t,e){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))<<1},r.deinterleave2=function(t,e){return(t=65535&((t=16711935&((t=252645135&((t=858993459&((t=t>>>e&1431655765)|t>>>1))|t>>>2))|t>>>4))|t>>>16))<<16>>16},r.interleave3=function(t,e,r){return t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2),(t|=(e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},r.deinterleave3=function(t,e){return(t=1023&((t=4278190335&((t=251719695&((t=3272356035&((t=t>>>e&1227133513)|t>>>2))|t>>>4))|t>>>8))|t>>>16))<<22>>22},r.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>n(t)+1}},{}],35:[function(t,e,r){"use strict";var A=t("clamp");e.exports=function(t,e){e||(e={});var r,n,i,a,o,s,l,u,c,f,h,p=null==e.cutoff?.25:e.cutoff,d=null==e.radius?8:e.radius,m=e.channel||0;if(ArrayBuffer.isView(t)||Array.isArray(t)){if(!e.width||!e.height)throw Error("For raw data width and height should be provided by options");r=e.width,n=e.height,a=t,s=e.stride?e.stride:Math.floor(t.length/r/n)}else window.HTMLCanvasElement&&t instanceof window.HTMLCanvasElement?(l=(u=t).getContext("2d"),r=u.width,n=u.height,c=l.getImageData(0,0,r,n),a=c.data,s=4):window.CanvasRenderingContext2D&&t instanceof window.CanvasRenderingContext2D?(u=t.canvas,l=t,r=u.width,n=u.height,c=l.getImageData(0,0,r,n),a=c.data,s=4):window.ImageData&&t instanceof window.ImageData&&(r=(c=t).width,n=t.height,a=c.data,s=4);if(i=Math.max(r,n),window.Uint8ClampedArray&&a instanceof window.Uint8ClampedArray||window.Uint8Array&&a instanceof window.Uint8Array)for(o=a,a=Array(r*n),f=0,h=o.length;f<h;f++)a[f]=o[f*s+m]/255;else if(1!==s)throw Error("Raw data can have only 1 value per pixel");var g=Array(r*n),v=Array(r*n),y=Array(i),x=Array(i),b=Array(i+1),_=Array(i);for(f=0,h=r*n;f<h;f++){var w=a[f];g[f]=1===w?0:0===w?k:Math.pow(Math.max(0,.5-w),2),v[f]=1===w?k:0===w?0:Math.pow(Math.max(0,w-.5),2)}T(g,r,n,y,x,_,b),T(v,r,n,y,x,_,b);var M=window.Float32Array?new Float32Array(r*n):new Array(r*n);for(f=0,h=r*n;f<h;f++)M[f]=A(1-((g[f]-v[f])/d+p),0,1);return M};var k=1e20;function T(t,e,r,n,i,a,o){for(var s=0;s<e;s++){for(var l=0;l<r;l++)n[l]=t[l*e+s];for(u(n,i,a,o,r),l=0;l<r;l++)t[l*e+s]=i[l]}for(l=0;l<r;l++){for(s=0;s<e;s++)n[s]=t[l*e+s];for(u(n,i,a,o,e),s=0;s<e;s++)t[l*e+s]=Math.sqrt(i[s])}}function u(t,e,r,n,i){n[r[0]=0]=-k,n[1]=+k;for(var a=1,o=0;a<i;a++){for(var s=(t[a]+a*a-(t[r[o]]+r[o]*r[o]))/(2*a-2*r[o]);s<=n[o];)o--,s=(t[a]+a*a-(t[r[o]]+r[o]*r[o]))/(2*a-2*r[o]);r[++o]=a,n[o]=s,n[o+1]=+k}for(o=a=0;a<i;a++){for(;n[o+1]<a;)o++;e[a]=(a-r[o])*(a-r[o])+t[r[o]]}}},{clamp:57}],36:[function(M,t,e){!function(t,e){"use strict";function g(t,e){if(!t)throw new Error(e||"Assertion failed")}function r(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function v(t,e,r){if(v.isBN(t))return t;this.negative=0,this.words=null,this.length=0,(this.red=null)!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var n;"object"==typeof t?t.exports=v:e.BN=v,(v.BN=v).wordSize=26;try{n=M("buffer").Buffer}catch(t){}function o(t,e,r){for(var n=0,i=Math.min(t.length,r),a=e;a<i;a++){var o=t.charCodeAt(a)-48;n<<=4,n|=49<=o&&o<=54?o-49+10:17<=o&&o<=22?o-17+10:15&o}return n}function f(t,e,r,n){for(var i=0,a=Math.min(t.length,r),o=e;o<a;o++){var s=t.charCodeAt(o)-48;i*=n,i+=49<=s?s-49+10:17<=s?s-17+10:s}return i}v.isBN=function(t){return t instanceof v||null!==t&&"object"==typeof t&&t.constructor.wordSize===v.wordSize&&Array.isArray(t.words)},v.max=function(t,e){return 0<t.cmp(e)?t:e},v.min=function(t,e){return t.cmp(e)<0?t:e},v.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),g(e===(0|e)&&2<=e&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&n++,16===e?this._parseHex(t,n):this._parseBase(t,e,n),"-"===t[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),e,r)},v.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(g(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},v.prototype._initArray=function(t,e,r){if(g("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,a,o=0;if("be"===r)for(n=t.length-1,i=0;0<=n;n-=3)a=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[i]|=a<<o&67108863,this.words[i+1]=a>>>26-o&67108863,26<=(o+=24)&&(o-=26,i++);else if("le"===r)for(i=n=0;n<t.length;n+=3)a=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[i]|=a<<o&67108863,this.words[i+1]=a>>>26-o&67108863,26<=(o+=24)&&(o-=26,i++);return this.strip()},v.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,i,a=0;for(r=t.length-6,n=0;e<=r;r-=6)i=o(t,r,r+6),this.words[n]|=i<<a&67108863,this.words[n+1]|=i>>>26-a&4194303,26<=(a+=24)&&(a-=26,n++);r+6!==e&&(i=o(t,e,r+6),this.words[n]|=i<<a&67108863,this.words[n+1]|=i>>>26-a&4194303),this.strip()},v.prototype._parseBase=function(t,e,r){this.words=[0];for(var n=0,i=this.length=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var a=t.length-r,o=a%n,s=Math.min(a,a-o)+r,l=0,u=r;u<s;u+=n)l=f(t,u,u+n,e),this.imuln(i),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==o){var c=1;for(l=f(t,u,t.length,e),u=0;u<o;u++)c*=e;this.imuln(c),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}},v.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},v.prototype.clone=function(){var t=new v(null);return this.copy(t),t},v.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},v.prototype.strip=function(){for(;1<this.length&&0===this.words[this.length-1];)this.length--;return this._normSign()},v.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},v.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],p=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function i(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;n=(r.length=n)-1|0;var i=0|t.words[0],a=0|e.words[0],o=i*a,s=67108863&o,l=o/67108864|0;r.words[0]=s;for(var u=1;u<n;u++){for(var c=l>>>26,f=67108863&l,h=Math.min(u,e.length-1),p=Math.max(0,u-t.length+1);p<=h;p++){var d=u-p|0;c+=(o=(i=0|t.words[d])*(a=0|e.words[p])+f)/67108864|0,f=67108863&o}r.words[u]=0|f,l=0|c}return 0!==l?r.words[u]=0|l:r.length--,r.strip()}v.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,i=0,a=0;a<this.length;a++){var o=this.words[a],s=(16777215&(o<<n|i)).toString(16);r=0!==(i=o>>>24-n&16777215)||a!==this.length-1?h[6-s.length]+s+r:s+r,26<=(n+=2)&&(n-=26,a--)}for(0!==i&&(r=i.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&2<=t&&t<=36){var l=p[t],u=d[t];r="";var c=this.clone();for(c.negative=0;!c.isZero();){var f=c.modn(u).toString(t);r=(c=c.idivn(u)).isZero()?f+r:h[l-f.length]+f+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}g(!1,"Base should be between 2 and 36")},v.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:2<this.length&&g(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},v.prototype.toJSON=function(){return this.toString(16)},v.prototype.toBuffer=function(t,e){return g("undefined"!=typeof n),this.toArrayLike(n,t,e)},v.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},v.prototype.toArrayLike=function(t,e,r){var n=this.byteLength(),i=r||Math.max(1,n);g(n<=i,"byte array longer than desired length"),g(0<i,"Requested array length <= 0"),this.strip();var a,o,s="le"===e,l=new t(i),u=this.clone();if(s){for(o=0;!u.isZero();o++)a=u.andln(255),u.iushrn(8),l[o]=a;for(;o<i;o++)l[o]=0}else{for(o=0;o<i-n;o++)l[o]=0;for(o=0;!u.isZero();o++)a=u.andln(255),u.iushrn(8),l[i-o-1]=a}return l},v.prototype._countBits=Math.clz32?function(t){return 32-Math.clz32(t)}:function(t){var e=t,r=0;return 4096<=e&&(r+=13,e>>>=13),64<=e&&(r+=7,e>>>=7),8<=e&&(r+=4,e>>>=4),2<=e&&(r+=2,e>>>=2),r+e},v.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},v.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},v.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},v.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},v.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},v.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},v.prototype.isNeg=function(){return 0!==this.negative},v.prototype.neg=function(){return this.clone().ineg()},v.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},v.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},v.prototype.ior=function(t){return g(0==(this.negative|t.negative)),this.iuor(t)},v.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},v.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},v.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},v.prototype.iand=function(t){return g(0==(this.negative|t.negative)),this.iuand(t)},v.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},v.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},v.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this.strip()},v.prototype.ixor=function(t){return g(0==(this.negative|t.negative)),this.iuxor(t)},v.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},v.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},v.prototype.inotn=function(t){g("number"==typeof t&&0<=t);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),0<r&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return 0<r&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},v.prototype.notn=function(t){return this.clone().inotn(t)},v.prototype.setn=function(t,e){g("number"==typeof t&&0<=t);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},v.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,a=0;a<n.length;a++)e=(0|r.words[a])+(0|n.words[a])+i,this.words[a]=67108863&e,i=e>>>26;for(;0!==i&&a<r.length;a++)e=(0|r.words[a])+i,this.words[a]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this},v.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},v.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;0<i?(r=this,n=t):(r=t,n=this);for(var a=0,o=0;o<n.length;o++)a=(e=(0|r.words[o])-(0|n.words[o])+a)>>26,this.words[o]=67108863&e;for(;0!==a&&o<r.length;o++)a=(e=(0|r.words[o])+a)>>26,this.words[o]=67108863&e;if(0===a&&o<r.length&&r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this.length=Math.max(this.length,o),r!==this&&(this.negative=1),this.strip()},v.prototype.sub=function(t){return this.clone().isub(t)};var a=function(t,e,r){var n,i,a,o=t.words,s=e.words,l=r.words,u=0,c=0|o[0],f=8191&c,h=c>>>13,p=0|o[1],d=8191&p,m=p>>>13,g=0|o[2],v=8191&g,y=g>>>13,x=0|o[3],b=8191&x,_=x>>>13,w=0|o[4],M=8191&w,A=w>>>13,k=0|o[5],T=8191&k,E=k>>>13,S=0|o[6],C=8191&S,L=S>>>13,z=0|o[7],O=8191&z,P=z>>>13,I=0|o[8],D=8191&I,N=I>>>13,R=0|o[9],B=8191&R,F=R>>>13,j=0|s[0],U=8191&j,V=j>>>13,q=0|s[1],H=8191&q,G=q>>>13,W=0|s[2],Y=8191&W,Z=W>>>13,X=0|s[3],$=8191&X,J=X>>>13,K=0|s[4],Q=8191&K,tt=K>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],at=8191&it,ot=it>>>13,st=0|s[7],lt=8191&st,ut=st>>>13,ct=0|s[8],ft=8191&ct,ht=ct>>>13,pt=0|s[9],dt=8191&pt,mt=pt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(u+(n=Math.imul(f,U))|0)+((8191&(i=(i=Math.imul(f,V))+Math.imul(h,U)|0))<<13)|0;u=((a=Math.imul(h,V))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(d,U),i=(i=Math.imul(d,V))+Math.imul(m,U)|0,a=Math.imul(m,V);var vt=(u+(n=n+Math.imul(f,H)|0)|0)+((8191&(i=(i=i+Math.imul(f,G)|0)+Math.imul(h,H)|0))<<13)|0;u=((a=a+Math.imul(h,G)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(v,U),i=(i=Math.imul(v,V))+Math.imul(y,U)|0,a=Math.imul(y,V),n=n+Math.imul(d,H)|0,i=(i=i+Math.imul(d,G)|0)+Math.imul(m,H)|0,a=a+Math.imul(m,G)|0;var yt=(u+(n=n+Math.imul(f,Y)|0)|0)+((8191&(i=(i=i+Math.imul(f,Z)|0)+Math.imul(h,Y)|0))<<13)|0;u=((a=a+Math.imul(h,Z)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(b,U),i=(i=Math.imul(b,V))+Math.imul(_,U)|0,a=Math.imul(_,V),n=n+Math.imul(v,H)|0,i=(i=i+Math.imul(v,G)|0)+Math.imul(y,H)|0,a=a+Math.imul(y,G)|0,n=n+Math.imul(d,Y)|0,i=(i=i+Math.imul(d,Z)|0)+Math.imul(m,Y)|0,a=a+Math.imul(m,Z)|0;var xt=(u+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,J)|0)+Math.imul(h,$)|0))<<13)|0;u=((a=a+Math.imul(h,J)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(M,U),i=(i=Math.imul(M,V))+Math.imul(A,U)|0,a=Math.imul(A,V),n=n+Math.imul(b,H)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(_,H)|0,a=a+Math.imul(_,G)|0,n=n+Math.imul(v,Y)|0,i=(i=i+Math.imul(v,Z)|0)+Math.imul(y,Y)|0,a=a+Math.imul(y,Z)|0,n=n+Math.imul(d,$)|0,i=(i=i+Math.imul(d,J)|0)+Math.imul(m,$)|0,a=a+Math.imul(m,J)|0;var bt=(u+(n=n+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,tt)|0)+Math.imul(h,Q)|0))<<13)|0;u=((a=a+Math.imul(h,tt)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(T,U),i=(i=Math.imul(T,V))+Math.imul(E,U)|0,a=Math.imul(E,V),n=n+Math.imul(M,H)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(A,H)|0,a=a+Math.imul(A,G)|0,n=n+Math.imul(b,Y)|0,i=(i=i+Math.imul(b,Z)|0)+Math.imul(_,Y)|0,a=a+Math.imul(_,Z)|0,n=n+Math.imul(v,$)|0,i=(i=i+Math.imul(v,J)|0)+Math.imul(y,$)|0,a=a+Math.imul(y,J)|0,n=n+Math.imul(d,Q)|0,i=(i=i+Math.imul(d,tt)|0)+Math.imul(m,Q)|0,a=a+Math.imul(m,tt)|0;var _t=(u+(n=n+Math.imul(f,rt)|0)|0)+((8191&(i=(i=i+Math.imul(f,nt)|0)+Math.imul(h,rt)|0))<<13)|0;u=((a=a+Math.imul(h,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(C,U),i=(i=Math.imul(C,V))+Math.imul(L,U)|0,a=Math.imul(L,V),n=n+Math.imul(T,H)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(E,H)|0,a=a+Math.imul(E,G)|0,n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(A,Y)|0,a=a+Math.imul(A,Z)|0,n=n+Math.imul(b,$)|0,i=(i=i+Math.imul(b,J)|0)+Math.imul(_,$)|0,a=a+Math.imul(_,J)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(y,Q)|0,a=a+Math.imul(y,tt)|0,n=n+Math.imul(d,rt)|0,i=(i=i+Math.imul(d,nt)|0)+Math.imul(m,rt)|0,a=a+Math.imul(m,nt)|0;var wt=(u+(n=n+Math.imul(f,at)|0)|0)+((8191&(i=(i=i+Math.imul(f,ot)|0)+Math.imul(h,at)|0))<<13)|0;u=((a=a+Math.imul(h,ot)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(O,U),i=(i=Math.imul(O,V))+Math.imul(P,U)|0,a=Math.imul(P,V),n=n+Math.imul(C,H)|0,i=(i=i+Math.imul(C,G)|0)+Math.imul(L,H)|0,a=a+Math.imul(L,G)|0,n=n+Math.imul(T,Y)|0,i=(i=i+Math.imul(T,Z)|0)+Math.imul(E,Y)|0,a=a+Math.imul(E,Z)|0,n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,J)|0)+Math.imul(A,$)|0,a=a+Math.imul(A,J)|0,n=n+Math.imul(b,Q)|0,i=(i=i+Math.imul(b,tt)|0)+Math.imul(_,Q)|0,a=a+Math.imul(_,tt)|0,n=n+Math.imul(v,rt)|0,i=(i=i+Math.imul(v,nt)|0)+Math.imul(y,rt)|0,a=a+Math.imul(y,nt)|0,n=n+Math.imul(d,at)|0,i=(i=i+Math.imul(d,ot)|0)+Math.imul(m,at)|0,a=a+Math.imul(m,ot)|0;var Mt=(u+(n=n+Math.imul(f,lt)|0)|0)+((8191&(i=(i=i+Math.imul(f,ut)|0)+Math.imul(h,lt)|0))<<13)|0;u=((a=a+Math.imul(h,ut)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(D,U),i=(i=Math.imul(D,V))+Math.imul(N,U)|0,a=Math.imul(N,V),n=n+Math.imul(O,H)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(P,H)|0,a=a+Math.imul(P,G)|0,n=n+Math.imul(C,Y)|0,i=(i=i+Math.imul(C,Z)|0)+Math.imul(L,Y)|0,a=a+Math.imul(L,Z)|0,n=n+Math.imul(T,$)|0,i=(i=i+Math.imul(T,J)|0)+Math.imul(E,$)|0,a=a+Math.imul(E,J)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(A,Q)|0,a=a+Math.imul(A,tt)|0,n=n+Math.imul(b,rt)|0,i=(i=i+Math.imul(b,nt)|0)+Math.imul(_,rt)|0,a=a+Math.imul(_,nt)|0,n=n+Math.imul(v,at)|0,i=(i=i+Math.imul(v,ot)|0)+Math.imul(y,at)|0,a=a+Math.imul(y,ot)|0,n=n+Math.imul(d,lt)|0,i=(i=i+Math.imul(d,ut)|0)+Math.imul(m,lt)|0,a=a+Math.imul(m,ut)|0;var At=(u+(n=n+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,ht)|0)+Math.imul(h,ft)|0))<<13)|0;u=((a=a+Math.imul(h,ht)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(B,U),i=(i=Math.imul(B,V))+Math.imul(F,U)|0,a=Math.imul(F,V),n=n+Math.imul(D,H)|0,i=(i=i+Math.imul(D,G)|0)+Math.imul(N,H)|0,a=a+Math.imul(N,G)|0,n=n+Math.imul(O,Y)|0,i=(i=i+Math.imul(O,Z)|0)+Math.imul(P,Y)|0,a=a+Math.imul(P,Z)|0,n=n+Math.imul(C,$)|0,i=(i=i+Math.imul(C,J)|0)+Math.imul(L,$)|0,a=a+Math.imul(L,J)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(E,Q)|0,a=a+Math.imul(E,tt)|0,n=n+Math.imul(M,rt)|0,i=(i=i+Math.imul(M,nt)|0)+Math.imul(A,rt)|0,a=a+Math.imul(A,nt)|0,n=n+Math.imul(b,at)|0,i=(i=i+Math.imul(b,ot)|0)+Math.imul(_,at)|0,a=a+Math.imul(_,ot)|0,n=n+Math.imul(v,lt)|0,i=(i=i+Math.imul(v,ut)|0)+Math.imul(y,lt)|0,a=a+Math.imul(y,ut)|0,n=n+Math.imul(d,ft)|0,i=(i=i+Math.imul(d,ht)|0)+Math.imul(m,ft)|0,a=a+Math.imul(m,ht)|0;var kt=(u+(n=n+Math.imul(f,dt)|0)|0)+((8191&(i=(i=i+Math.imul(f,mt)|0)+Math.imul(h,dt)|0))<<13)|0;u=((a=a+Math.imul(h,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(B,H),i=(i=Math.imul(B,G))+Math.imul(F,H)|0,a=Math.imul(F,G),n=n+Math.imul(D,Y)|0,i=(i=i+Math.imul(D,Z)|0)+Math.imul(N,Y)|0,a=a+Math.imul(N,Z)|0,n=n+Math.imul(O,$)|0,i=(i=i+Math.imul(O,J)|0)+Math.imul(P,$)|0,a=a+Math.imul(P,J)|0,n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(L,Q)|0,a=a+Math.imul(L,tt)|0,n=n+Math.imul(T,rt)|0,i=(i=i+Math.imul(T,nt)|0)+Math.imul(E,rt)|0,a=a+Math.imul(E,nt)|0,n=n+Math.imul(M,at)|0,i=(i=i+Math.imul(M,ot)|0)+Math.imul(A,at)|0,a=a+Math.imul(A,ot)|0,n=n+Math.imul(b,lt)|0,i=(i=i+Math.imul(b,ut)|0)+Math.imul(_,lt)|0,a=a+Math.imul(_,ut)|0,n=n+Math.imul(v,ft)|0,i=(i=i+Math.imul(v,ht)|0)+Math.imul(y,ft)|0,a=a+Math.imul(y,ht)|0;var Tt=(u+(n=n+Math.imul(d,dt)|0)|0)+((8191&(i=(i=i+Math.imul(d,mt)|0)+Math.imul(m,dt)|0))<<13)|0;u=((a=a+Math.imul(m,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(B,Y),i=(i=Math.imul(B,Z))+Math.imul(F,Y)|0,a=Math.imul(F,Z),n=n+Math.imul(D,$)|0,i=(i=i+Math.imul(D,J)|0)+Math.imul(N,$)|0,a=a+Math.imul(N,J)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(P,Q)|0,a=a+Math.imul(P,tt)|0,n=n+Math.imul(C,rt)|0,i=(i=i+Math.imul(C,nt)|0)+Math.imul(L,rt)|0,a=a+Math.imul(L,nt)|0,n=n+Math.imul(T,at)|0,i=(i=i+Math.imul(T,ot)|0)+Math.imul(E,at)|0,a=a+Math.imul(E,ot)|0,n=n+Math.imul(M,lt)|0,i=(i=i+Math.imul(M,ut)|0)+Math.imul(A,lt)|0,a=a+Math.imul(A,ut)|0,n=n+Math.imul(b,ft)|0,i=(i=i+Math.imul(b,ht)|0)+Math.imul(_,ft)|0,a=a+Math.imul(_,ht)|0;var Et=(u+(n=n+Math.imul(v,dt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(y,dt)|0))<<13)|0;u=((a=a+Math.imul(y,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(B,$),i=(i=Math.imul(B,J))+Math.imul(F,$)|0,a=Math.imul(F,J),n=n+Math.imul(D,Q)|0,i=(i=i+Math.imul(D,tt)|0)+Math.imul(N,Q)|0,a=a+Math.imul(N,tt)|0,n=n+Math.imul(O,rt)|0,i=(i=i+Math.imul(O,nt)|0)+Math.imul(P,rt)|0,a=a+Math.imul(P,nt)|0,n=n+Math.imul(C,at)|0,i=(i=i+Math.imul(C,ot)|0)+Math.imul(L,at)|0,a=a+Math.imul(L,ot)|0,n=n+Math.imul(T,lt)|0,i=(i=i+Math.imul(T,ut)|0)+Math.imul(E,lt)|0,a=a+Math.imul(E,ut)|0,n=n+Math.imul(M,ft)|0,i=(i=i+Math.imul(M,ht)|0)+Math.imul(A,ft)|0,a=a+Math.imul(A,ht)|0;var St=(u+(n=n+Math.imul(b,dt)|0)|0)+((8191&(i=(i=i+Math.imul(b,mt)|0)+Math.imul(_,dt)|0))<<13)|0;u=((a=a+Math.imul(_,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(B,Q),i=(i=Math.imul(B,tt))+Math.imul(F,Q)|0,a=Math.imul(F,tt),n=n+Math.imul(D,rt)|0,i=(i=i+Math.imul(D,nt)|0)+Math.imul(N,rt)|0,a=a+Math.imul(N,nt)|0,n=n+Math.imul(O,at)|0,i=(i=i+Math.imul(O,ot)|0)+Math.imul(P,at)|0,a=a+Math.imul(P,ot)|0,n=n+Math.imul(C,lt)|0,i=(i=i+Math.imul(C,ut)|0)+Math.imul(L,lt)|0,a=a+Math.imul(L,ut)|0,n=n+Math.imul(T,ft)|0,i=(i=i+Math.imul(T,ht)|0)+Math.imul(E,ft)|0,a=a+Math.imul(E,ht)|0;var Ct=(u+(n=n+Math.imul(M,dt)|0)|0)+((8191&(i=(i=i+Math.imul(M,mt)|0)+Math.imul(A,dt)|0))<<13)|0;u=((a=a+Math.imul(A,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(B,rt),i=(i=Math.imul(B,nt))+Math.imul(F,rt)|0,a=Math.imul(F,nt),n=n+Math.imul(D,at)|0,i=(i=i+Math.imul(D,ot)|0)+Math.imul(N,at)|0,a=a+Math.imul(N,ot)|0,n=n+Math.imul(O,lt)|0,i=(i=i+Math.imul(O,ut)|0)+Math.imul(P,lt)|0,a=a+Math.imul(P,ut)|0,n=n+Math.imul(C,ft)|0,i=(i=i+Math.imul(C,ht)|0)+Math.imul(L,ft)|0,a=a+Math.imul(L,ht)|0;var Lt=(u+(n=n+Math.imul(T,dt)|0)|0)+((8191&(i=(i=i+Math.imul(T,mt)|0)+Math.imul(E,dt)|0))<<13)|0;u=((a=a+Math.imul(E,mt)|0)+(i>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,n=Math.imul(B,at),i=(i=Math.imul(B,ot))+Math.imul(F,at)|0,a=Math.imul(F,ot),n=n+Math.imul(D,lt)|0,i=(i=i+Math.imul(D,ut)|0)+Math.imul(N,lt)|0,a=a+Math.imul(N,ut)|0,n=n+Math.imul(O,ft)|0,i=(i=i+Math.imul(O,ht)|0)+Math.imul(P,ft)|0,a=a+Math.imul(P,ht)|0;var zt=(u+(n=n+Math.imul(C,dt)|0)|0)+((8191&(i=(i=i+Math.imul(C,mt)|0)+Math.imul(L,dt)|0))<<13)|0;u=((a=a+Math.imul(L,mt)|0)+(i>>>13)|0)+(zt>>>26)|0,zt&=67108863,n=Math.imul(B,lt),i=(i=Math.imul(B,ut))+Math.imul(F,lt)|0,a=Math.imul(F,ut),n=n+Math.imul(D,ft)|0,i=(i=i+Math.imul(D,ht)|0)+Math.imul(N,ft)|0,a=a+Math.imul(N,ht)|0;var Ot=(u+(n=n+Math.imul(O,dt)|0)|0)+((8191&(i=(i=i+Math.imul(O,mt)|0)+Math.imul(P,dt)|0))<<13)|0;u=((a=a+Math.imul(P,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(B,ft),i=(i=Math.imul(B,ht))+Math.imul(F,ft)|0,a=Math.imul(F,ht);var Pt=(u+(n=n+Math.imul(D,dt)|0)|0)+((8191&(i=(i=i+Math.imul(D,mt)|0)+Math.imul(N,dt)|0))<<13)|0;u=((a=a+Math.imul(N,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863;var It=(u+(n=Math.imul(B,dt))|0)+((8191&(i=(i=Math.imul(B,mt))+Math.imul(F,dt)|0))<<13)|0;return u=((a=Math.imul(F,mt))+(i>>>13)|0)+(It>>>26)|0,It&=67108863,l[0]=gt,l[1]=vt,l[2]=yt,l[3]=xt,l[4]=bt,l[5]=_t,l[6]=wt,l[7]=Mt,l[8]=At,l[9]=kt,l[10]=Tt,l[11]=Et,l[12]=St,l[13]=Ct,l[14]=Lt,l[15]=zt,l[16]=Ot,l[17]=Pt,l[18]=It,0!==u&&(l[19]=u,r.length++),r};function s(t,e,r){return(new l).mulp(t,e,r)}function l(t,e){this.x=t,this.y=e}Math.imul||(a=i),v.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?a(this,t,e):r<63?i(this,t,e):r<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,a=0;a<r.length-1;a++){var o=i;i=0;for(var s=67108863&n,l=Math.min(a,e.length-1),u=Math.max(0,a-t.length+1);u<=l;u++){var c=a-u,f=(0|t.words[c])*(0|e.words[u]),h=67108863&f;s=67108863&(h=h+s|0),i+=(o=(o=o+(f/67108864|0)|0)+(h>>>26)|0)>>>26,o&=67108863}r.words[a]=s,n=o,o=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}(this,t,e):s(this,t,e)},l.prototype.makeRBT=function(t){for(var e=new Array(t),r=v.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},l.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},l.prototype.permute=function(t,e,r,n,i,a){for(var o=0;o<a;o++)n[o]=e[t[o]],i[o]=r[t[o]]},l.prototype.transform=function(t,e,r,n,i,a){this.permute(a,t,e,r,n,i);for(var o=1;o<i;o<<=1)for(var s=o<<1,l=Math.cos(2*Math.PI/s),u=Math.sin(2*Math.PI/s),c=0;c<i;c+=s)for(var f=l,h=u,p=0;p<o;p++){var d=r[c+p],m=n[c+p],g=r[c+p+o],v=n[c+p+o],y=f*g-h*v;v=f*v+h*g,g=y,r[c+p]=d+g,n[c+p]=m+v,r[c+p+o]=d-g,n[c+p+o]=m-v,p!==s&&(y=l*f-u*h,h=l*h+u*f,f=y)}},l.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},l.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},l.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},l.prototype.convert13b=function(t,e,r,n){for(var i=0,a=0;a<e;a++)i+=0|t[a],r[2*a]=8191&i,i>>>=13,r[2*a+1]=8191&i,i>>>=13;for(a=2*e;a<n;++a)r[a]=0;g(0===i),g(0==(-8192&i))},l.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},l.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),a=this.stub(n),o=new Array(n),s=new Array(n),l=new Array(n),u=new Array(n),c=new Array(n),f=new Array(n),h=r.words;h.length=n,this.convert13b(t.words,t.length,o,n),this.convert13b(e.words,e.length,u,n),this.transform(o,a,s,l,n,i),this.transform(u,a,c,f,n,i);for(var p=0;p<n;p++){var d=s[p]*c[p]-l[p]*f[p];l[p]=s[p]*f[p]+l[p]*c[p],s[p]=d}return this.conjugate(s,l,n),this.transform(s,l,h,a,n,i),this.conjugate(h,a,n),this.normalize13b(h,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},v.prototype.mul=function(t){var e=new v(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},v.prototype.mulf=function(t){var e=new v(null);return e.words=new Array(this.length+t.length),s(this,t,e)},v.prototype.imul=function(t){return this.clone().mulTo(t,this)},v.prototype.imuln=function(t){g("number"==typeof t),g(t<67108864);for(var e=0,r=0;r<this.length;r++){var n=(0|this.words[r])*t,i=(67108863&n)+(67108863&e);e>>=26,e+=n/67108864|0,e+=i>>>26,this.words[r]=67108863&i}return 0!==e&&(this.words[r]=e,this.length++),this},v.prototype.muln=function(t){return this.clone().imuln(t)},v.prototype.sqr=function(){return this.mul(this)},v.prototype.isqr=function(){return this.imul(this.clone())},v.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,i=r%26;e[r]=(t.words[n]&1<<i)>>>i}return e}(t);if(0===e.length)return new v(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},v.prototype.iushln=function(t){g("number"==typeof t&&0<=t);var e,r=t%26,n=(t-r)/26,i=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(e=0;e<this.length;e++){var o=this.words[e]&i,s=(0|this.words[e])-o<<r;this.words[e]=s|a,a=o>>>26-r}a&&(this.words[e]=a,this.length++)}if(0!==n){for(e=this.length-1;0<=e;e--)this.words[e+n]=this.words[e];for(e=0;e<n;e++)this.words[e]=0;this.length+=n}return this.strip()},v.prototype.ishln=function(t){return g(0===this.negative),this.iushln(t)},v.prototype.iushrn=function(t,e,r){var n;g("number"==typeof t&&0<=t),n=e?(e-e%26)/26:0;var i=t%26,a=Math.min((t-i)/26,this.length),o=67108863^67108863>>>i<<i,s=r;if(n-=a,n=Math.max(0,n),s){for(var l=0;l<a;l++)s.words[l]=this.words[l];s.length=a}if(0===a);else if(this.length>a)for(this.length-=a,l=0;l<this.length;l++)this.words[l]=this.words[l+a];else this.words[0]=0,this.length=1;var u=0;for(l=this.length-1;0<=l&&(0!==u||n<=l);l--){var c=0|this.words[l];this.words[l]=u<<26-i|c>>>i,u=c&o}return s&&0!==u&&(s.words[s.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},v.prototype.ishrn=function(t,e,r){return g(0===this.negative),this.iushrn(t,e,r)},v.prototype.shln=function(t){return this.clone().ishln(t)},v.prototype.ushln=function(t){return this.clone().iushln(t)},v.prototype.shrn=function(t){return this.clone().ishrn(t)},v.prototype.ushrn=function(t){return this.clone().iushrn(t)},v.prototype.testn=function(t){g("number"==typeof t&&0<=t);var e=t%26,r=(t-e)/26,n=1<<e;return!(this.length<=r)&&!!(this.words[r]&n)},v.prototype.imaskn=function(t){g("number"==typeof t&&0<=t);var e=t%26,r=(t-e)/26;if(g(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this.strip()},v.prototype.maskn=function(t){return this.clone().imaskn(t)},v.prototype.iaddn=function(t){return g("number"==typeof t),g(t<67108864),t<0?this.isubn(-t):0!==this.negative?(1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0):(this.negative=0,this.isubn(t),this.negative=1),this):this._iaddn(t)},v.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&67108864<=this.words[e];e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},v.prototype.isubn=function(t){if(g("number"==typeof t),g(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},v.prototype.addn=function(t){return this.clone().iaddn(t)},v.prototype.subn=function(t){return this.clone().isubn(t)},v.prototype.iabs=function(){return this.negative=0,this},v.prototype.abs=function(){return this.clone().iabs()},v.prototype._ishlnsubmul=function(t,e,r){var n,i,a=t.length+r;this._expand(a);var o=0;for(n=0;n<t.length;n++){i=(0|this.words[n+r])+o;var s=(0|t.words[n])*e;o=((i-=67108863&s)>>26)-(s/67108864|0),this.words[n+r]=67108863&i}for(;n<this.length-r;n++)o=(i=(0|this.words[n+r])+o)>>26,this.words[n+r]=67108863&i;if(0===o)return this.strip();for(g(-1===o),n=o=0;n<this.length;n++)o=(i=-(0|this.words[n])+o)>>26,this.words[n]=67108863&i;return this.negative=1,this.strip()},v.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var o,s=n.length-i.length;if("mod"!==e){(o=new v(null)).length=s+1,o.words=new Array(o.length);for(var l=0;l<o.length;l++)o.words[l]=0}var u=n.clone()._ishlnsubmul(i,1,s);0===u.negative&&(n=u,o&&(o.words[s]=1));for(var c=s-1;0<=c;c--){var f=67108864*(0|n.words[i.length+c])+(0|n.words[i.length+c-1]);for(f=Math.min(f/a|0,67108863),n._ishlnsubmul(i,f,c);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,c),n.isZero()||(n.negative^=1);o&&(o.words[c]=f)}return o&&o.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:o||null,mod:n}},v.prototype.divmod=function(t,e,r){return g(!t.isZero()),this.isZero()?{div:new v(0),mod:new v(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(n=a.div.neg()),"div"!==e&&(i=a.mod.neg(),r&&0!==i.negative&&i.iadd(t)),{div:n,mod:i}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(n=a.div.neg()),{div:n,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(i=a.mod.neg(),r&&0!==i.negative&&i.isub(t)),{div:a.div,mod:i}):t.length>this.length||this.cmp(t)<0?{div:new v(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new v(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new v(this.modn(t.words[0]))}:this._wordDiv(t,e);var n,i,a},v.prototype.div=function(t){return this.divmod(t,"div",!1).div},v.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},v.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},v.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},v.prototype.modn=function(t){g(t<=67108863);for(var e=(1<<26)%t,r=0,n=this.length-1;0<=n;n--)r=(e*r+(0|this.words[n]))%t;return r},v.prototype.idivn=function(t){g(t<=67108863);for(var e=0,r=this.length-1;0<=r;r--){var n=(0|this.words[r])+67108864*e;this.words[r]=n/t|0,e=n%t}return this.strip()},v.prototype.divn=function(t){return this.clone().idivn(t)},v.prototype.egcd=function(t){g(0===t.negative),g(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n=new v(1),i=new v(0),a=new v(0),o=new v(1),s=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++s;for(var l=r.clone(),u=e.clone();!e.isZero();){for(var c=0,f=1;0==(e.words[0]&f)&&c<26;++c,f<<=1);if(0<c)for(e.iushrn(c);0<c--;)(n.isOdd()||i.isOdd())&&(n.iadd(l),i.isub(u)),n.iushrn(1),i.iushrn(1);for(var h=0,p=1;0==(r.words[0]&p)&&h<26;++h,p<<=1);if(0<h)for(r.iushrn(h);0<h--;)(a.isOdd()||o.isOdd())&&(a.iadd(l),o.isub(u)),a.iushrn(1),o.iushrn(1);0<=e.cmp(r)?(e.isub(r),n.isub(a),i.isub(o)):(r.isub(e),a.isub(n),o.isub(i))}return{a:a,b:o,gcd:r.iushln(s)}},v.prototype._invmp=function(t){g(0===t.negative),g(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n,i=new v(1),a=new v(0),o=r.clone();0<e.cmpn(1)&&0<r.cmpn(1);){for(var s=0,l=1;0==(e.words[0]&l)&&s<26;++s,l<<=1);if(0<s)for(e.iushrn(s);0<s--;)i.isOdd()&&i.iadd(o),i.iushrn(1);for(var u=0,c=1;0==(r.words[0]&c)&&u<26;++u,c<<=1);if(0<u)for(r.iushrn(u);0<u--;)a.isOdd()&&a.iadd(o),a.iushrn(1);0<=e.cmp(r)?(e.isub(r),i.isub(a)):(r.isub(e),a.isub(i))}return(n=0===e.cmpn(1)?i:a).cmpn(0)<0&&n.iadd(t),n},v.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0;for(var n=r.negative=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var a=e;e=r,r=a}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},v.prototype.invm=function(t){return this.egcd(t).a.umod(t)},v.prototype.isEven=function(){return 0==(1&this.words[0])},v.prototype.isOdd=function(){return 1==(1&this.words[0])},v.prototype.andln=function(t){return this.words[0]&t},v.prototype.bincn=function(t){g("number"==typeof t);var e=t%26,r=(t-e)/26,n=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var i=n,a=r;0!==i&&a<this.length;a++){var o=0|this.words[a];i=(o+=i)>>>26,o&=67108863,this.words[a]=o}return 0!==i&&(this.words[a]=i,this.length++),this},v.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},v.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),1<this.length)e=1;else{r&&(t=-t),g(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},v.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},v.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;0<=r;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:i<n&&(e=1);break}}return e},v.prototype.gtn=function(t){return 1===this.cmpn(t)},v.prototype.gt=function(t){return 1===this.cmp(t)},v.prototype.gten=function(t){return 0<=this.cmpn(t)},v.prototype.gte=function(t){return 0<=this.cmp(t)},v.prototype.ltn=function(t){return-1===this.cmpn(t)},v.prototype.lt=function(t){return-1===this.cmp(t)},v.prototype.lten=function(t){return this.cmpn(t)<=0},v.prototype.lte=function(t){return this.cmp(t)<=0},v.prototype.eqn=function(t){return 0===this.cmpn(t)},v.prototype.eq=function(t){return 0===this.cmp(t)},v.red=function(t){return new _(t)},v.prototype.toRed=function(t){return g(!this.red,"Already a number in reduction context"),g(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},v.prototype.fromRed=function(){return g(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},v.prototype._forceRed=function(t){return this.red=t,this},v.prototype.forceRed=function(t){return g(!this.red,"Already a number in reduction context"),this._forceRed(t)},v.prototype.redAdd=function(t){return g(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},v.prototype.redIAdd=function(t){return g(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},v.prototype.redSub=function(t){return g(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},v.prototype.redISub=function(t){return g(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},v.prototype.redShl=function(t){return g(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},v.prototype.redMul=function(t){return g(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},v.prototype.redIMul=function(t){return g(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},v.prototype.redSqr=function(){return g(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},v.prototype.redISqr=function(){return g(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},v.prototype.redSqrt=function(){return g(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},v.prototype.redInvm=function(){return g(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},v.prototype.redNeg=function(){return g(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},v.prototype.redPow=function(t){return g(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var u={k256:null,p224:null,p192:null,p25519:null};function c(t,e){this.name=t,this.p=new v(e,16),this.n=this.p.bitLength(),this.k=new v(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function m(){c.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){c.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function x(){c.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function b(){c.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(t){if("string"==typeof t){var e=v._prime(t);this.m=e.p,this.prime=e}else g(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function w(t){_.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new v(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}c.prototype._tmp=function(){var t=new v(null);return t.words=new Array(Math.ceil(this.n/13)),t},c.prototype.ireduce=function(t){for(var e,r=t;this.split(r,this.tmp),(e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength())>this.n;);var n=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):0<n?r.isub(this.p):r.strip(),r},c.prototype.split=function(t,e){t.iushrn(this.n,0,e)},c.prototype.imulK=function(t){return t.imul(this.k)},r(m,c),m.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var i=t.words[9];for(e.words[e.length++]=4194303&i,n=10;n<t.length;n++){var a=0|t.words[n];t.words[n-10]=(4194303&a)<<4|i>>>22,i=a}i>>>=22,0===(t.words[n-10]=i)&&10<t.length?t.length-=10:t.length-=9},m.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},r(y,c),r(x,c),r(b,c),b.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},v._prime=function(t){if(u[t])return u[t];var e;if("k256"===t)e=new m;else if("p224"===t)e=new y;else if("p192"===t)e=new x;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new b}return u[t]=e},_.prototype._verify1=function(t){g(0===t.negative,"red works only with positives"),g(t.red,"red works only with red numbers")},_.prototype._verify2=function(t,e){g(0==(t.negative|e.negative),"red works only with positives"),g(t.red&&t.red===e.red,"red works only with red numbers")},_.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},_.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},_.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return 0<=r.cmp(this.m)&&r.isub(this.m),r._forceRed(this)},_.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return 0<=r.cmp(this.m)&&r.isub(this.m),r},_.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},_.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},_.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},_.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},_.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},_.prototype.isqr=function(t){return this.imul(t,t.clone())},_.prototype.sqr=function(t){return this.mul(t,t)},_.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(g(e%2==1),3===e){var r=this.m.add(new v(1)).iushrn(2);return this.pow(t,r)}for(var n=this.m.subn(1),i=0;!n.isZero()&&0===n.andln(1);)i++,n.iushrn(1);g(!n.isZero());var a=new v(1).toRed(this),o=a.redNeg(),s=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new v(2*l*l).toRed(this);0!==this.pow(l,s).cmp(o);)l.redIAdd(o);for(var u=this.pow(l,n),c=this.pow(t,n.addn(1).iushrn(1)),f=this.pow(t,n),h=i;0!==f.cmp(a);){for(var p=f,d=0;0!==p.cmp(a);d++)p=p.redSqr();g(d<h);var m=this.pow(u,new v(1).iushln(h-d-1));c=c.redMul(m),u=m.redSqr(),f=f.redMul(u),h=d}return c},_.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},_.prototype.pow=function(t,e){if(e.isZero())return new v(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new v(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],a=0,o=0,s=e.bitLength()%26;for(0===s&&(s=26),n=e.length-1;0<=n;n--){for(var l=e.words[n],u=s-1;0<=u;u--){var c=l>>u&1;i!==r[0]&&(i=this.sqr(i)),0!==c||0!==a?(a<<=1,a|=c,(4===++o||0===n&&0===u)&&(i=this.mul(i,r[a]),a=o=0)):o=0}s=26}return i},_.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},_.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},v.mont=function(t){return new w(t)},r(w,_),w.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},w.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},w.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return 0<=i.cmp(this.m)?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},w.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new v(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return 0<=i.cmp(this.m)?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},w.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}("undefined"==typeof t||t,this)},{buffer:45}],37:[function(t,e,r){"use strict";e.exports=function(t){var e,r,n,i=t.length,a=0;for(e=0;e<i;++e)a+=t[e].length;var o=new Array(a),s=0;for(e=0;e<i;++e){var l=t[e],u=l.length;for(r=0;r<u;++r){var c=o[s++]=new Array(u-1),f=0;for(n=0;n<u;++n)n!==r&&(c[f++]=l[n]);if(1&r){var h=c[1];c[1]=c[0],c[0]=h}}}return o}},{}],38:[function(t,e,r){"use strict";e.exports=function(t,e,r){switch(arguments.length){case 1:return i=[],a(n=t,n,o,!0),i;case 2:return"function"==typeof e?a(t,t,e,!0):(a(t,e,o,!(i=[])),i);case 3:return a(t,e,r,!1);default:throw new Error("box-intersect: Invalid arguments")}var n};var i,h=t("typedarray-pool"),p=t("./lib/sweep"),d=t("./lib/intersect");function c(t,e){for(var r=0;r<t;++r)if(!(e[r]<=e[r+t]))return!0;return!1}function m(t,e,r,n){for(var i=0,a=0,o=0,s=t.length;o<s;++o){var l=t[o];if(!c(e,l)){for(var u=0;u<2*e;++u)r[i++]=l[u];n[a++]=o}}return a}function a(t,e,r,n){var i=t.length,a=e.length;if(!(i<=0||a<=0)){var o=t[0].length>>>1;if(!(o<=0)){var s,l=h.mallocDouble(2*o*i),u=h.mallocInt32(i);if(0<(i=m(t,o,l,u))){if(1===o&&n)p.init(i),s=p.sweepComplete(o,r,0,i,l,u,0,i,l,u);else{var c=h.mallocDouble(2*o*a),f=h.mallocInt32(a);0<(a=m(e,o,c,f))&&(p.init(i+a),s=1===o?p.sweepBipartite(o,r,0,i,l,u,0,a,c,f):d(o,r,n,i,l,u,a,c,f),h.free(c),h.free(f))}h.free(l),h.free(u)}return s}}}function o(t,e){i.push([t,e])}},{"./lib/intersect":40,"./lib/sweep":44,"typedarray-pool":1362}],39:[function(t,e,r){"use strict";var p="d",d="ax",m="vv",i="fp",g="es",v="rs",y="re",x="rb",b="ri",_="rp",w="bs",M="be",A="bb",k="bi",T="bp",E="rv",S="Q",C=[p,d,m,v,y,x,b,w,M,A,k];function n(c){var t="bruteForce"+(c?"Full":"Partial"),f=[],e=C.slice();c||e.splice(3,0,i);var h=["function "+t+"("+e.join()+"){"];function r(t,e){var r,n,i,a,o,s,l,u=(o=["function ",a="bruteForce"+((r=t)?"Red":"Blue")+((n=e)?"Flip":"")+((i=c)?"Full":""),"(",C.join(),"){","var ",g,"=2*",p,";"],s="for(var i="+v+","+_+"="+g+"*"+v+";i<"+y+";++i,"+_+"+="+g+"){var x0="+x+"["+d+"+"+_+"],x1="+x+"["+d+"+"+_+"+"+p+"],xi="+b+"[i];",l="for(var j="+w+","+T+"="+g+"*"+w+";j<"+M+";++j,"+T+"+="+g+"){var y0="+A+"["+d+"+"+T+"],"+(i?"y1="+A+"["+d+"+"+T+"+"+p+"],":"")+"yi="+k+"[j];",r?o.push(s,S,":",l):o.push(l,S,":",s),i?o.push("if(y1<x0||x1<y0)continue;"):n?o.push("if(y0<=x0||x1<y0)continue;"):o.push("if(y0<x0||x1<y0)continue;"),o.push("for(var k="+d+"+1;k<"+p+";++k){var r0="+x+"[k+"+_+"],r1="+x+"[k+"+p+"+"+_+"],b0="+A+"[k+"+T+"],b1="+A+"[k+"+p+"+"+T+"];if(r1<b0||b1<r0)continue "+S+";}var "+E+"="+m+"("),n?o.push("yi,xi"):o.push("xi,yi"),o.push(");if("+E+"!==void 0)return "+E+";}}}"),{name:a,code:o.join("")});f.push(u.code),h.push("return "+u.name+"("+C.join()+");")}h.push("if("+y+"-"+v+">"+M+"-"+w+"){"),c?(r(!0,!1),h.push("}else{"),r(!1,!1)):(h.push("if("+i+"){"),r(!0,!0),h.push("}else{"),r(!0,!1),h.push("}}else{if("+i+"){"),r(!1,!0),h.push("}else{"),r(!1,!1),h.push("}")),h.push("}}return "+t);var n=f.join("")+h.join("");return new Function(n)()}r.partial=n(!1),r.full=n(!0)},{}],40:[function(t,e,r){"use strict";e.exports=function(t,e,r,n,i,a,o,s,l){!function(t,e){var r=8*R.log2(e+1)*(t+1)|0,n=R.nextPow2(J*r);Q.length<n&&(N.free(Q),Q=N.mallocInt32(n));var i=R.nextPow2(K*r);tt<i&&(N.free(tt),tt=N.mallocDouble(i))}(t,n+o);var u,c=0,f=2*t;et(c++,0,0,n,0,o,r?16:0,-1/0,1/0),r||et(c++,0,0,o,0,n,1,-1/0,1/0);for(;0<c;){var h=(c-=1)*J,p=Q[h],d=Q[h+1],m=Q[h+2],g=Q[h+3],v=Q[h+4],y=Q[h+5],x=c*K,b=tt[x],_=tt[x+1],w=1&y,M=!!(16&y),A=i,k=a,T=s,E=l;if(w&&(A=s,k=l,T=i,E=a),!(2&y&&(m=Y(t,p,d,m,A,k,_))<=d||4&y&&(d=Z(t,p,d,m,A,k,b),m<=d))){var S=m-d,C=v-g;if(M){if(t*S*(S+C)<H){if(void 0!==(u=j.scanComplete(t,p,e,d,m,A,k,g,v,T,E)))return u;continue}}else{if(t*Math.min(S,C)<V){if(void 0!==(u=B(t,p,e,w,d,m,A,k,g,v,T,E)))return u;continue}if(t*S*C<q){if(void 0!==(u=j.scanBipartite(t,p,e,w,d,m,A,k,g,v,T,E)))return u;continue}}var L=G(t,p,d,m,A,k,b,_);if(d<L)if(t*(L-d)<V){if(void 0!==(u=F(t,p+1,e,d,L,A,k,g,v,T,E)))return u}else if(p===t-2){if(void 0!==(u=w?j.sweepBipartite(t,e,g,v,T,E,d,L,A,k):j.sweepBipartite(t,e,d,L,A,k,g,v,T,E)))return u}else et(c++,p+1,d,L,g,v,w,-1/0,1/0),et(c++,p+1,g,v,d,L,1^w,-1/0,1/0);if(L<m){var z=U(t,p,g,v,T,E),O=T[f*z+p],P=W(t,p,z,v,T,E,O);if(P<v&&et(c++,p,L,m,P,v,(4|w)+(M?16:0),O,_),g<z&&et(c++,p,L,m,g,z,(2|w)+(M?16:0),b,O),z+1===P){if(void 0!==(u=M?nt(t,p,e,L,m,A,k,z,T,E[z]):rt(t,p,e,w,L,m,A,k,z,T,E[z])))return u}else if(z<P){var I;if(M){if(I=X(t,p,L,m,A,k,O),L<I){var D=W(t,p,L,I,A,k,O);if(p===t-2){if(L<D&&void 0!==(u=j.sweepComplete(t,e,L,D,A,k,z,P,T,E)))return u;if(D<I&&void 0!==(u=j.sweepBipartite(t,e,D,I,A,k,z,P,T,E)))return u}else L<D&&et(c++,p+1,L,D,z,P,16,-1/0,1/0),D<I&&(et(c++,p+1,D,I,z,P,0,-1/0,1/0),et(c++,p+1,z,P,D,I,1,-1/0,1/0))}}else I=w?$(t,p,L,m,A,k,O):X(t,p,L,m,A,k,O),L<I&&(p===t-2?u=w?j.sweepBipartite(t,e,z,P,T,E,L,I,A,k):j.sweepBipartite(t,e,L,I,A,k,z,P,T,E):(et(c++,p+1,L,I,z,P,w,-1/0,1/0),et(c++,p+1,z,P,L,I,1^w,-1/0,1/0)))}}}}};var N=t("typedarray-pool"),R=t("bit-twiddle"),n=t("./brute"),B=n.partial,F=n.full,j=t("./sweep"),U=t("./median"),i=t("./partition"),V=128,q=1<<22,H=1<<22,G=i("!(lo>=p0)&&!(p1>=hi)",["p0","p1"]),W=i("lo===p0",["p0"]),Y=i("lo<p0",["p0"]),Z=i("hi<=p0",["p0"]),X=i("lo<=p0&&p0<=hi",["p0"]),$=i("lo<p0&&p0<=hi",["p0"]),J=6,K=2,Q=N.mallocInt32(1024),tt=N.mallocDouble(1024);function et(t,e,r,n,i,a,o,s,l){var u=J*t;Q[u]=e,Q[u+1]=r,Q[u+2]=n,Q[u+3]=i,Q[u+4]=a,Q[u+5]=o;var c=K*t;tt[c]=s,tt[c+1]=l}function rt(t,e,r,n,i,a,o,s,l,u,c){var f=2*t,h=l*f,p=u[h+e];t:for(var d=i,m=i*f;d<a;++d,m+=f){var g=o[m+e],v=o[m+e+t];if(!(p<g||v<p)&&(!n||p!==g)){for(var y,x=s[d],b=e+1;b<t;++b){g=o[m+b],v=o[m+b+t];var _=u[h+b],w=u[h+b+t];if(v<_||w<g)continue t}if(void 0!==(y=n?r(c,x):r(x,c)))return y}}}function nt(t,e,r,n,i,a,o,s,l,u){var c=2*t,f=s*c,h=l[f+e];t:for(var p=n,d=n*c;p<i;++p,d+=c){var m=o[p];if(m!==u){var g=a[d+e],v=a[d+e+t];if(!(h<g||v<h)){for(var y=e+1;y<t;++y){g=a[d+y],v=a[d+y+t];var x=l[f+y],b=l[f+y+t];if(v<x||b<g)continue t}var _=r(m,u);if(void 0!==_)return _}}}}},{"./brute":39,"./median":41,"./partition":42,"./sweep":44,"bit-twiddle":34,"typedarray-pool":1362}],41:[function(t,e,r){"use strict";e.exports=function(t,e,r,n,i,a){if(n<=r+1)return r;var o=r,s=n,l=n+r>>>1,u=2*t,c=l,f=i[u*l+e];for(;o<s;){if(s-o<k){T(t,e,o,s,i,a),f=i[u*l+e];break}var h=s-o,p=Math.random()*h+o|0,d=i[u*p+e],m=Math.random()*h+o|0,g=i[u*m+e],v=Math.random()*h+o|0,y=i[u*v+e];d<=g?g<=y?(c=m,f=g):y<=d?(c=p,f=d):(c=v,f=y):y<=g?(c=m,f=g):d<=y?(c=p,f=d):(c=v,f=y);for(var x=u*(s-1),b=u*c,_=0;_<u;++_,++x,++b){var w=i[x];i[x]=i[b],i[b]=w}var M=a[s-1];a[s-1]=a[c],a[c]=M,c=A(t,e,o,s-1,i,a,f);for(var x=u*(s-1),b=u*c,_=0;_<u;++_,++x,++b){var w=i[x];i[x]=i[b],i[b]=w}var M=a[s-1];if(a[s-1]=a[c],a[c]=M,l<c){for(s=c-1;o<s&&i[u*(s-1)+e]===f;)s-=1;s+=1}else{if(!(c<l))break;for(o=c+1;o<s&&i[u*o+e]===f;)o+=1}}return A(t,e,r,l,i,a,i[u*l+e])};var A=t("./partition")("lo<p0",["p0"]),k=8;function T(t,e,r,n,i,a){for(var o=2*t,s=o*(r+1)+e,l=r+1;l<n;++l,s+=o)for(var u=i[s],c=l,f=o*(l-1);r<c&&i[f+e]>u;--c,f-=o){for(var h=f,p=f+o,d=0;d<o;++d,++h,++p){var m=i[h];i[h]=i[p],i[p]=m}var g=a[c];a[c]=a[c-1],a[c-1]=g}}},{"./partition":42}],42:[function(t,e,r){"use strict";e.exports=function(t,e){var r="abcdef".split("").concat(e),n=[];0<=t.indexOf("lo")&&n.push("lo=e[k+n]");0<=t.indexOf("hi")&&n.push("hi=e[k+o]");return r.push(i.replace("_",n.join()).replace("$",t)),Function.apply(void 0,r)};var i="for(var j=2*a,k=j*c,l=k,m=c,n=b,o=a+b,p=c;d>p;++p,k+=j){var _;if($)if(m===p)m+=1,l+=j;else{for(var s=0;j>s;++s){var t=e[k+s];e[k+s]=e[l],e[l++]=t}var u=f[p];f[p]=f[m],f[m++]=u}}return m"},{}],43:[function(t,e,r){"use strict";e.exports=function(t,e){e<=4*P?I(0,e-1,t):function t(e,r,n){var i=(r-e+1)/6|0,a=e+i,o=r-i,s=e+r>>1,l=s-i,u=s+i,c=a,f=l,h=s,p=u,d=o,m=e+1,g=r-1,v=0;F(c,f,n)&&(v=c,c=f,f=v);F(p,d,n)&&(v=p,p=d,d=v);F(c,h,n)&&(v=c,c=h,h=v);F(f,h,n)&&(v=f,f=h,h=v);F(c,p,n)&&(v=c,c=p,p=v);F(h,p,n)&&(v=h,h=p,p=v);F(f,d,n)&&(v=f,f=d,d=v);F(f,h,n)&&(v=f,f=h,h=v);F(p,d,n)&&(v=p,p=d,d=v);var y=n[2*f];var x=n[2*f+1];var b=n[2*p];var _=n[2*p+1];var w=2*c;var M=2*h;var A=2*d;var k=2*a;var T=2*s;var E=2*o;for(var S=0;S<2;++S){var C=n[w+S],L=n[M+S],z=n[A+S];n[k+S]=C,n[T+S]=L,n[E+S]=z}N(l,e,n);N(u,r,n);for(var O=m;O<=g;++O)if(j(O,y,x,n))O!==m&&D(O,m,n),++m;else if(!j(O,b,_,n))for(;;){if(j(g,b,_,n)){j(g,y,x,n)?(R(O,m,g,n),++m):D(O,g,n),--g;break}if(--g<O)break}B(e,m-1,y,x,n);B(r,g+1,b,_,n);m-2-e<=P?I(e,m-2,n):t(e,m-2,n);r-(g+2)<=P?I(g+2,r,n):t(g+2,r,n);g-m<=P?I(m,g,n):t(m,g,n)}(0,e-1,t)};var P=32;function I(t,e,r){for(var n=2*(t+1),i=t+1;i<=e;++i){for(var a=r[n++],o=r[n++],s=i,l=n-2;s-- >t;){var u=r[l-2],c=r[l-1];if(u<a)break;if(u===a&&c<o)break;r[l]=u,r[l+1]=c,l-=2}r[l]=a,r[l+1]=o}}function D(t,e,r){e*=2;var n=r[t*=2],i=r[t+1];r[t]=r[e],r[t+1]=r[e+1],r[e]=n,r[e+1]=i}function N(t,e,r){e*=2,r[t*=2]=r[e],r[t+1]=r[e+1]}function R(t,e,r,n){e*=2,r*=2;var i=n[t*=2],a=n[t+1];n[t]=n[e],n[t+1]=n[e+1],n[e]=n[r],n[e+1]=n[r+1],n[r]=i,n[r+1]=a}function B(t,e,r,n,i){e*=2,i[t*=2]=i[e],i[e]=r,i[t+1]=i[e+1],i[e+1]=n}function F(t,e,r){e*=2;var n=r[t*=2],i=r[e];return!(n<i)&&(n!==i||r[t+1]>r[e+1])}function j(t,e,r,n){var i=n[t*=2];return i<e||i===e&&n[t+1]<r}},{}],44:[function(t,e,r){"use strict";e.exports={init:function(t){var e=i.nextPow2(t);B.length<e&&(n.free(B),B=n.mallocInt32(e));F.length<e&&(n.free(F),F=n.mallocInt32(e));E.length<e&&(n.free(E),E=n.mallocInt32(e));S.length<e&&(n.free(S),S=n.mallocInt32(e));C.length<e&&(n.free(C),C=n.mallocInt32(e));L.length<e&&(n.free(L),L=n.mallocInt32(e));var r=8*e;j.length<r&&(n.free(j),j=n.mallocDouble(r))},sweepBipartite:function(t,e,r,n,i,a,o,s,l,u){for(var c=0,f=2*t,h=t-1,p=f-1,d=r;d<n;++d){var m=a[d],g=f*d;j[c++]=i[g+h],j[c++]=-(m+1),j[c++]=i[g+p],j[c++]=m}for(var d=o;d<s;++d){var m=u[d]+R,v=f*d;j[c++]=l[v+h],j[c++]=-m,j[c++]=l[v+p],j[c++]=m}var y=c>>>1;N(j,y);for(var x=0,b=0,d=0;d<y;++d){var _=0|j[2*d+1];if(R<=_)U(E,S,b--,_=_-R|0);else if(0<=_)U(B,F,x--,_);else if(_<=-R){_=-_-R|0;for(var w=0;w<x;++w){var M=e(B[w],_);if(void 0!==M)return M}V(E,S,b++,_)}else{_=-_-1|0;for(var w=0;w<b;++w){var M=e(_,E[w]);if(void 0!==M)return M}V(B,F,x++,_)}}},sweepComplete:function(t,e,r,n,i,a,o,s,l,u){for(var c=0,f=2*t,h=t-1,p=f-1,d=r;d<n;++d){var m=a[d]+1<<1,g=f*d;j[c++]=i[g+h],j[c++]=-m,j[c++]=i[g+p],j[c++]=m}for(var d=o;d<s;++d){var m=u[d]+1<<1,v=f*d;j[c++]=l[v+h],j[c++]=1|-m,j[c++]=l[v+p],j[c++]=1|m}var y=c>>>1;N(j,y);for(var x=0,b=0,_=0,d=0;d<y;++d){var w=0|j[2*d+1],M=1&w;if(d<y-1&&w>>1==j[2*d+3]>>1&&(M=2,d+=1),w<0){for(var A=-(w>>1)-1,k=0;k<_;++k){var T=e(C[k],A);if(void 0!==T)return T}if(0!==M)for(var k=0;k<x;++k){var T=e(B[k],A);if(void 0!==T)return T}if(1!==M)for(var k=0;k<b;++k){var T=e(E[k],A);if(void 0!==T)return T}0===M?V(B,F,x++,A):1===M?V(E,S,b++,A):2===M&&V(C,L,_++,A)}else{var A=(w>>1)-1;0===M?U(B,F,x--,A):1===M?U(E,S,b--,A):2===M&&U(C,L,_--,A)}}},scanBipartite:function(t,e,r,n,i,a,o,s,l,u,c,f){var h=0,p=2*t,d=e,m=e+t,g=1,v=1;n?v=R:g=R;for(var y=i;y<a;++y){var x=y+g,b=p*y;j[h++]=o[b+d],j[h++]=-x,j[h++]=o[b+m],j[h++]=x}for(var y=l;y<u;++y){var x=y+v,_=p*y;j[h++]=c[_+d],j[h++]=-x}var w=h>>>1;N(j,w);for(var M=0,y=0;y<w;++y){var A=0|j[2*y+1];if(A<0){var x=-A,k=!1;if(R<=x?(k=!n,x-=R):(k=!!n,x-=1),k)V(B,F,M++,x);else{var T=f[x],E=p*x,S=c[E+e+1],C=c[E+e+1+t];t:for(var L=0;L<M;++L){var z=B[L],O=p*z;if(!(C<o[O+e+1]||o[O+e+1+t]<S)){for(var P=e+2;P<t;++P)if(c[E+P+t]<o[O+P]||o[O+P+t]<c[E+P])continue t;var I,D=s[z];if(void 0!==(I=n?r(T,D):r(D,T)))return I}}}}else U(B,F,M--,A-g)}},scanComplete:function(t,e,r,n,i,a,o,s,l,u,c){for(var f=0,h=2*t,p=e,d=e+t,m=n;m<i;++m){var g=m+R,v=h*m;j[f++]=a[v+p],j[f++]=-g,j[f++]=a[v+d],j[f++]=g}for(var m=s;m<l;++m){var g=m+1,y=h*m;j[f++]=u[y+p],j[f++]=-g}var x=f>>>1;N(j,x);for(var b=0,m=0;m<x;++m){var _=0|j[2*m+1];if(_<0){var g=-_;if(R<=g)B[b++]=g-R;else{var w=c[g-=1],M=h*g,A=u[M+e+1],k=u[M+e+1+t];t:for(var T=0;T<b;++T){var E=B[T],S=o[E];if(S===w)break;var C=h*E;if(!(k<a[C+e+1]||a[C+e+1+t]<A)){for(var L=e+2;L<t;++L)if(u[M+L+t]<a[C+L]||a[C+L+t]<u[M+L])continue t;var z=r(S,w);if(void 0!==z)return z}}}}else{for(var g=_-R,T=b-1;0<=T;--T)if(B[T]===g){for(var L=T+1;L<b;++L)B[L-1]=B[L];break}--b}}}};var n=t("typedarray-pool"),i=t("bit-twiddle"),N=t("./sort"),R=1<<28,a=1024,B=n.mallocInt32(a),F=n.mallocInt32(a),E=n.mallocInt32(a),S=n.mallocInt32(a),C=n.mallocInt32(a),L=n.mallocInt32(a),j=n.mallocDouble(8192);function U(t,e,r,n){var i=e[n],a=t[r-1];e[t[i]=a]=i}function V(t,e,r,n){e[t[r]=n]=r}},{"./sort":43,"bit-twiddle":34,"typedarray-pool":1362}],45:[function(t,e,r){},{}],46:[function(e,t,B){(function(t){"use strict";var n=e("base64-js"),a=e("ieee754"),o=e("isarray");function r(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(r()<e)throw new RangeError("Invalid typed array length");return f.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=f.prototype:(null===t&&(t=new f(e)),t.length=e),t}function f(t,e,r){if(!(f.TYPED_ARRAY_SUPPORT||this instanceof f))return new f(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return u(this,t)}return i(this,t,e,r)}function i(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);f.TYPED_ARRAY_SUPPORT?(t=e).__proto__=f.prototype:t=c(t,e);return t}(t,e,r,n):"string"==typeof e?function(t,e,r){"string"==typeof r&&""!==r||(r="utf8");if(!f.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|p(e,r),i=(t=s(t,n)).write(e,r);i!==n&&(t=t.slice(0,i));return t}(t,e,r):function(t,e){if(f.isBuffer(e)){var r=0|h(e.length);return 0===(t=s(t,r)).length||e.copy(t,0,0,r),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(n=e.length)!=n?s(t,0):c(t,e);if("Buffer"===e.type&&o(e.data))return c(t,e.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function u(t,e){if(l(e),t=s(t,e<0?0:0|h(e)),!f.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function c(t,e){var r=e.length<0?0:0|h(e.length);t=s(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function h(t){if(t>=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|t}function p(t,e){if(f.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return D(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return N(t).length;default:if(n)return D(t).length;e=(""+e).toLowerCase(),n=!0}}function d(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function m(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):2147483647<r?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=f.from(e,n)),f.isBuffer(e))return 0===e.length?-1:g(t,e,r,n,i);if("number"==typeof e)return e&=255,f.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):g(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function g(t,e,r,n,i){var a,o=1,s=t.length,l=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s/=o=2,l/=2,r/=2}function u(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(i){var c=-1;for(a=r;a<s;a++)if(u(t,a)===u(e,-1===c?0:a-c)){if(-1===c&&(c=a),a-c+1===l)return c*o}else-1!==c&&(a-=a-c),c=-1}else for(s<r+l&&(r=s-l),a=r;0<=a;a--){for(var f=!0,h=0;h<l;h++)if(u(t,a+h)!==u(e,h)){f=!1;break}if(f)return a}return-1}function v(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?i<(n=Number(n))&&(n=i):n=i;var a=e.length;if(a%2!=0)throw new TypeError("Invalid hex string");a/2<n&&(n=a/2);for(var o=0;o<n;++o){var s=parseInt(e.substr(2*o,2),16);if(isNaN(s))return o;t[r+o]=s}return o}function y(t,e,r,n){return R(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function x(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function b(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var a,o,s,l,u=t[i],c=null,f=239<u?4:223<u?3:191<u?2:1;if(i+f<=r)switch(f){case 1:u<128&&(c=u);break;case 2:128==(192&(a=t[i+1]))&&127<(l=(31&u)<<6|63&a)&&(c=l);break;case 3:a=t[i+1],o=t[i+2],128==(192&a)&&128==(192&o)&&2047<(l=(15&u)<<12|(63&a)<<6|63&o)&&(l<55296||57343<l)&&(c=l);break;case 4:a=t[i+1],o=t[i+2],s=t[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&65535<(l=(15&u)<<18|(63&a)<<12|(63&o)<<6|63&s)&&l<1114112&&(c=l)}null===c?(c=65533,f=1):65535<c&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=f}return function(t){var e=t.length;if(e<=_)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=_));return r}(n)}B.Buffer=f,B.SlowBuffer=function(t){+t!=t&&(t=0);return f.alloc(+t)},B.INSPECT_MAX_BYTES=50,f.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),B.kMaxLength=r(),f.poolSize=8192,f._augment=function(t){return t.__proto__=f.prototype,t},f.from=function(t,e,r){return i(null,t,e,r)},f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&f[Symbol.species]===f&&Object.defineProperty(f,Symbol.species,{value:null,configurable:!0})),f.alloc=function(t,e,r){return n=null,a=e,o=r,l(i=t),i<=0?s(n,i):void 0!==a?"string"==typeof o?s(n,i).fill(a,o):s(n,i).fill(a):s(n,i);var n,i,a,o},f.allocUnsafe=function(t){return u(null,t)},f.allocUnsafeSlow=function(t){return u(null,t)},f.isBuffer=function(t){return!(null==t||!t._isBuffer)},f.compare=function(t,e){if(!f.isBuffer(t)||!f.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,i=0,a=Math.min(r,n);i<a;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},f.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},f.concat=function(t,e){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return f.alloc(0);var r;if(void 0===e)for(r=e=0;r<t.length;++r)e+=t[r].length;var n=f.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var a=t[r];if(!f.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,i),i+=a.length}return n},f.byteLength=p,f.prototype._isBuffer=!0,f.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)d(this,e,e+1);return this},f.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)d(this,e,e+3),d(this,e+1,e+2);return this},f.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)d(this,e,e+7),d(this,e+1,e+6),d(this,e+2,e+5),d(this,e+3,e+4);return this},f.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?b(this,0,t):function(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return A(this,e,r);case"utf8":case"utf-8":return b(this,e,r);case"ascii":return w(this,e,r);case"latin1":case"binary":return M(this,e,r);case"base64":return x(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}.apply(this,arguments)},f.prototype.equals=function(t){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===f.compare(this,t)},f.prototype.inspect=function(){var t="",e=B.INSPECT_MAX_BYTES;return 0<this.length&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),"<Buffer "+t+">"},f.prototype.compare=function(t,e,r,n,i){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(i<=n&&r<=e)return 0;if(i<=n)return-1;if(r<=e)return 1;if(this===t)return 0;for(var a=(i>>>=0)-(n>>>=0),o=(r>>>=0)-(e>>>=0),s=Math.min(a,o),l=this.slice(n,i),u=t.slice(e,r),c=0;c<s;++c)if(l[c]!==u[c]){a=l[c],o=u[c];break}return a<o?-1:o<a?1:0},f.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},f.prototype.indexOf=function(t,e,r){return m(this,t,e,r,!0)},f.prototype.lastIndexOf=function(t,e,r){return m(this,t,e,r,!1)},f.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||i<r)&&(r=i),0<t.length&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a,o,s,l,u,c,f,h,p,d=!1;;)switch(n){case"hex":return v(this,t,e,r);case"utf8":case"utf-8":return h=e,p=r,R(D(t,(f=this).length-h),f,h,p);case"ascii":return y(this,t,e,r);case"latin1":case"binary":return y(this,t,e,r);case"base64":return l=this,u=e,c=r,R(N(t),l,u,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return o=e,s=r,R(function(t,e){for(var r,n,i,a=[],o=0;o<t.length&&!((e-=2)<0);++o)r=t.charCodeAt(o),n=r>>8,i=r%256,a.push(i),a.push(n);return a}(t,(a=this).length-o),a,o,s);default:if(d)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),d=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var _=4096;function w(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function M(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function A(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||n<r)&&(r=n);for(var i="",a=e;a<r;++a)i+=I(t[a]);return i}function k(t,e,r){for(var n=t.slice(e,r),i="",a=0;a<n.length;a+=2)i+=String.fromCharCode(n[a]+256*n[a+1]);return i}function T(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(r<t+e)throw new RangeError("Trying to access beyond buffer length")}function E(t,e,r,n,i,a){if(!f.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(i<e||e<a)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function S(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,a=Math.min(t.length-r,2);i<a;++i)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function C(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,a=Math.min(t.length-r,4);i<a;++i)t[r+i]=e>>>8*(n?i:3-i)&255}function L(t,e,r,n,i,a){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function z(t,e,r,n,i){return i||L(t,0,r,4),a.write(t,e,r,n,23,4),r+4}function O(t,e,r,n,i){return i||L(t,0,r,8),a.write(t,e,r,n,52,8),r+8}f.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):n<t&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):n<e&&(e=n),e<t&&(e=t),f.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=f.prototype;else{var i=e-t;r=new f(i,void 0);for(var a=0;a<i;++a)r[a]=this[a+t]}return r},f.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||T(t,e,this.length);for(var n=this[t],i=1,a=0;++a<e&&(i*=256);)n+=this[t+a]*i;return n},f.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||T(t,e,this.length);for(var n=this[t+--e],i=1;0<e&&(i*=256);)n+=this[t+--e]*i;return n},f.prototype.readUInt8=function(t,e){return e||T(t,1,this.length),this[t]},f.prototype.readUInt16LE=function(t,e){return e||T(t,2,this.length),this[t]|this[t+1]<<8},f.prototype.readUInt16BE=function(t,e){return e||T(t,2,this.length),this[t]<<8|this[t+1]},f.prototype.readUInt32LE=function(t,e){return e||T(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},f.prototype.readUInt32BE=function(t,e){return e||T(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},f.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||T(t,e,this.length);for(var n=this[t],i=1,a=0;++a<e&&(i*=256);)n+=this[t+a]*i;return(i*=128)<=n&&(n-=Math.pow(2,8*e)),n},f.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||T(t,e,this.length);for(var n=e,i=1,a=this[t+--n];0<n&&(i*=256);)a+=this[t+--n]*i;return(i*=128)<=a&&(a-=Math.pow(2,8*e)),a},f.prototype.readInt8=function(t,e){return e||T(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},f.prototype.readInt16LE=function(t,e){e||T(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},f.prototype.readInt16BE=function(t,e){e||T(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},f.prototype.readInt32LE=function(t,e){return e||T(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},f.prototype.readInt32BE=function(t,e){return e||T(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},f.prototype.readFloatLE=function(t,e){return e||T(t,4,this.length),a.read(this,t,!0,23,4)},f.prototype.readFloatBE=function(t,e){return e||T(t,4,this.length),a.read(this,t,!1,23,4)},f.prototype.readDoubleLE=function(t,e){return e||T(t,8,this.length),a.read(this,t,!0,52,8)},f.prototype.readDoubleBE=function(t,e){return e||T(t,8,this.length),a.read(this,t,!1,52,8)},f.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||E(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[e]=255&t;++a<r&&(i*=256);)this[e+a]=t/i&255;return e+r},f.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||E(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,a=1;for(this[e+i]=255&t;0<=--i&&(a*=256);)this[e+i]=t/a&255;return e+r},f.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||E(this,t,e,1,255,0),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},f.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||E(this,t,e,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):S(this,t,e,!0),e+2},f.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||E(this,t,e,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):S(this,t,e,!1),e+2},f.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||E(this,t,e,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):C(this,t,e,!0),e+4},f.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||E(this,t,e,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):C(this,t,e,!1),e+4},f.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);E(this,t,e,r,i-1,-i)}var a=0,o=1,s=0;for(this[e]=255&t;++a<r&&(o*=256);)t<0&&0===s&&0!==this[e+a-1]&&(s=1),this[e+a]=(t/o>>0)-s&255;return e+r},f.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);E(this,t,e,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[e+a]=255&t;0<=--a&&(o*=256);)t<0&&0===s&&0!==this[e+a+1]&&(s=1),this[e+a]=(t/o>>0)-s&255;return e+r},f.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||E(this,t,e,1,127,-128),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},f.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||E(this,t,e,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):S(this,t,e,!0),e+2},f.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||E(this,t,e,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):S(this,t,e,!1),e+2},f.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||E(this,t,e,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):C(this,t,e,!0),e+4},f.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||E(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):C(this,t,e,!1),e+4},f.prototype.writeFloatLE=function(t,e,r){return z(this,t,e,!0,r)},f.prototype.writeFloatBE=function(t,e,r){return z(this,t,e,!1,r)},f.prototype.writeDoubleLE=function(t,e,r){return O(this,t,e,!0,r)},f.prototype.writeDoubleBE=function(t,e,r){return O(this,t,e,!1,r)},f.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),0<n&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i,a=n-r;if(this===t&&r<e&&e<n)for(i=a-1;0<=i;--i)t[i+e]=this[i+r];else if(a<1e3||!f.TYPED_ARRAY_SUPPORT)for(i=0;i<a;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+a),e);return a},f.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!f.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var a;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(a=e;a<r;++a)this[a]=t;else{var o=f.isBuffer(t)?t:D(new f(t,n).toString()),s=o.length;for(a=0;a<r-e;++a)this[a+e]=o[a%s]}return this};var P=/[^+\/0-9A-Za-z-_]/g;function I(t){return t<16?"0"+t.toString(16):t.toString(16)}function D(t,e){var r;e=e||1/0;for(var n=t.length,i=null,a=[],o=0;o<n;++o){if(55295<(r=t.charCodeAt(o))&&r<57344){if(!i){if(56319<r){-1<(e-=3)&&a.push(239,191,189);continue}if(o+1===n){-1<(e-=3)&&a.push(239,191,189);continue}i=r;continue}if(r<56320){-1<(e-=3)&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&-1<(e-=3)&&a.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;a.push(r)}else if(r<2048){if((e-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function N(t){return n.toByteArray(function(t){var e;if((t=(e=t,e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")).replace(P,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function R(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"base64-js":16,ieee754:410,isarray:47}],47:[function(t,e,r){var n={}.toString;e.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},{}],48:[function(t,e,r){"use strict";var f=t("./lib/monotone"),h=t("./lib/triangulation"),p=t("./lib/delaunay"),d=t("./lib/filter");function m(t){return[Math.min(t[0],t[1]),Math.max(t[0],t[1])]}function g(t,e){return t[0]-e[0]||t[1]-e[1]}function v(t,e,r){return e in t?t[e]:r}e.exports=function(t,e,r){Array.isArray(e)?(r=r||{},e=e||[]):(r=e||{},e=[]);var n=!!v(r,"delaunay",!0),i=!!v(r,"interior",!0),a=!!v(r,"exterior",!0),o=!!v(r,"infinity",!1);if(!i&&!a||0===t.length)return[];var s=f(t,e);{if(n||i!==a||o){for(var l=h(t.length,e.map(m).sort(g)),u=0;u<s.length;++u){var c=s[u];l.addTriangle(c[0],c[1],c[2])}return n&&p(t,l),a?i?o?d(l,0,o):l.cells():d(l,1,o):d(l,-1)}return s}}},{"./lib/delaunay":49,"./lib/filter":50,"./lib/monotone":51,"./lib/triangulation":52}],49:[function(t,e,r){"use strict";var m=t("robust-in-sphere")[4];t("binary-search-bounds");function g(t,e,r,n,i,a){var o=e.opposite(n,i);if(!(o<0)){if(i<n){var s=n;n=i,i=s,s=a,a=o,o=s}e.isConstraint(n,i)||m(t[n],t[i],t[a],t[o])<0&&r.push(n,i)}}e.exports=function(t,e){for(var r=[],n=t.length,i=e.stars,a=0;a<n;++a)for(var o=i[a],s=1;s<o.length;s+=2){var l=o[s];if(!(l<a)&&!e.isConstraint(a,l)){for(var u=o[s-1],c=-1,f=1;f<o.length;f+=2)if(o[f-1]===l){c=o[f];break}c<0||m(t[a],t[l],t[u],t[c])<0&&r.push(a,l)}}for(;0<r.length;){for(var l=r.pop(),a=r.pop(),u=-1,c=-1,o=i[a],h=1;h<o.length;h+=2){var p=o[h-1],d=o[h];p===l?c=d:d===l&&(u=p)}u<0||c<0||(0<=m(t[a],t[l],t[u],t[c])||(e.flip(a,l),g(t,e,r,u,a,c),g(t,e,r,a,c,u),g(t,e,r,c,l,u),g(t,e,r,l,u,c)))}}},{"binary-search-bounds":53,"robust-in-sphere":1325}],50:[function(t,e,r){"use strict";var o,s=t("binary-search-bounds");function x(t,e,r,n,i,a,o){this.cells=t,this.neighbor=e,this.flags=n,this.constraint=r,this.active=i,this.next=a,this.boundary=o}function b(t,e){return t[0]-e[0]||t[1]-e[1]||t[2]-e[2]}e.exports=function(t,e,r){var n=function(t,e){for(var r=t.cells(),n=r.length,i=0;i<n;++i){var a=r[i],o=a[0],s=a[1],l=a[2];s<l?s<o&&(a[0]=s,a[1]=l,a[2]=o):l<o&&(a[0]=l,a[1]=o,a[2]=s)}r.sort(b);for(var u=new Array(n),i=0;i<u.length;++i)u[i]=0;var c=[],f=[],h=new Array(3*n),p=new Array(3*n),d=null;e&&(d=[]);for(var m=new x(r,h,p,u,c,f,d),i=0;i<n;++i)for(var a=r[i],g=0;g<3;++g){var o=a[g],s=a[(g+1)%3],v=h[3*i+g]=m.locate(s,o,t.opposite(s,o)),y=p[3*i+g]=t.isConstraint(o,s);v<0&&(y?f.push(i):(c.push(i),u[i]=1),e&&d.push([s,o,-1]))}return m}(t,r);if(0===e)return r?n.cells.concat(n.boundary):n.cells;var i=1,a=n.active,o=n.next,s=n.flags,l=n.cells,u=n.constraint,c=n.neighbor;for(;0<a.length||0<o.length;){for(;0<a.length;){var f=a.pop();if(s[f]!==-i){s[f]=i;l[f];for(var h=0;h<3;++h){var p=c[3*f+h];0<=p&&0===s[p]&&(u[3*f+h]?o.push(p):(a.push(p),s[p]=i))}}}var d=o;o=a,a=d,o.length=0,i=-i}var m=function(t,e,r){for(var n=0,i=0;i<t.length;++i)e[i]===r&&(t[n++]=t[i]);return t.length=n,t}(l,s,e);if(r)return m.concat(n.boundary);return m},x.prototype.locate=(o=[0,0,0],function(t,e,r){var n=t,i=e,a=r;return e<r?e<t&&(n=e,i=r,a=t):r<t&&(n=r,i=t,a=e),n<0?-1:(o[0]=n,o[1]=i,o[2]=a,s.eq(this.cells,o,b))})},{"binary-search-bounds":53}],51:[function(t,e,r){"use strict";var h=t("binary-search-bounds"),p=t("robust-orientation")[3],m=0,g=1,v=2;function y(t,e,r,n,i){this.a=t,this.b=e,this.idx=r,this.lowerIds=n,this.upperIds=i}function x(t,e,r,n){this.a=t,this.b=e,this.type=r,this.idx=n}function b(t,e){var r=t.a[0]-e.a[0]||t.a[1]-e.a[1]||t.type-e.type;return r||(t.type!==m&&(r=p(t.a,t.b,e.b))?r:t.idx-e.idx)}function d(t,e){return p(t.a,t.b,e)}function _(t,e,r,n,i){for(var a=h.lt(e,n,d),o=h.gt(e,n,d),s=a;s<o;++s){for(var l=e[s],u=l.lowerIds,c=u.length;1<c&&0<p(r[u[c-2]],r[u[c-1]],n);)t.push([u[c-1],u[c-2],i]),c-=1;u.length=c,u.push(i);var f=l.upperIds;for(c=f.length;1<c&&p(r[f[c-2]],r[f[c-1]],n)<0;)t.push([f[c-2],f[c-1],i]),c-=1;f.length=c,f.push(i)}}function s(t,e){var r;return(r=t.a[0]<e.a[0]?p(t.a,t.b,e.a):p(e.b,e.a,t.a))?r:(r=e.b[0]<t.b[0]?p(t.a,t.b,e.b):p(e.b,e.a,t.b))||t.idx-e.idx}function w(t,e,r){var n=h.le(t,r,s),i=t[n],a=i.upperIds,o=a[a.length-1];i.upperIds=[o],t.splice(n+1,0,new y(r.a,r.b,r.idx,[o],a))}function M(t,e,r){var n=r.a;r.a=r.b,r.b=n;var i=h.eq(t,r,s),a=t[i];t[i-1].upperIds=a.upperIds,t.splice(i,1)}e.exports=function(t,e){for(var r=t.length,n=e.length,i=[],a=0;a<r;++a)i.push(new x(t[a],null,m,a));for(var a=0;a<n;++a){var o=e[a],s=t[o[0]],l=t[o[1]];s[0]<l[0]?i.push(new x(s,l,v,a),new x(l,s,g,a)):s[0]>l[0]&&i.push(new x(l,s,v,a),new x(s,l,g,a))}i.sort(b);for(var u=i[0].a[0]-(1+Math.abs(i[0].a[0]))*Math.pow(2,-52),c=[new y([u,1],[u,0],-1,[],[],[],[])],f=[],a=0,h=i.length;a<h;++a){var p=i[a],d=p.type;d===m?_(f,c,t,p.a,p.idx):d===v?w(c,t,p):M(c,t,p)}return f}},{"binary-search-bounds":53,"robust-orientation":1327}],52:[function(t,e,r){"use strict";var i=t("binary-search-bounds");function a(t,e){this.stars=t,this.edges=e}e.exports=function(t,e){for(var r=new Array(t),n=0;n<t;++n)r[n]=[];return new a(r,e)};var n=a.prototype;function o(t,e,r){for(var n=1,i=t.length;n<i;n+=2)if(t[n-1]===e&&t[n]===r)return t[n-1]=t[i-2],t[n]=t[i-1],void(t.length=i-2)}n.isConstraint=function(){var r=[0,0];function n(t,e){return t[0]-e[0]||t[1]-e[1]}return function(t,e){return r[0]=Math.min(t,e),r[1]=Math.max(t,e),0<=i.eq(this.edges,r,n)}}(),n.removeTriangle=function(t,e,r){var n=this.stars;o(n[t],e,r),o(n[e],r,t),o(n[r],t,e)},n.addTriangle=function(t,e,r){var n=this.stars;n[t].push(e,r),n[e].push(r,t),n[r].push(t,e)},n.opposite=function(t,e){for(var r=this.stars[e],n=1,i=r.length;n<i;n+=2)if(r[n]===t)return r[n-1];return-1},n.flip=function(t,e){var r=this.opposite(t,e),n=this.opposite(e,t);this.removeTriangle(t,e,r),this.removeTriangle(e,t,n),this.addTriangle(t,n,r),this.addTriangle(e,r,n)},n.edges=function(){for(var t=this.stars,e=[],r=0,n=t.length;r<n;++r)for(var i=t[r],a=0,o=i.length;a<o;a+=2)e.push([i[a],i[a+1]]);return e},n.cells=function(){for(var t=this.stars,e=[],r=0,n=t.length;r<n;++r)for(var i=t[r],a=0,o=i.length;a<o;a+=2){var s=i[a],l=i[a+1];r<Math.min(s,l)&&e.push([r,s,l])}return e}},{"binary-search-bounds":53}],53:[function(t,e,r){"use strict";function i(t,e,r,n,i){var a=["function ",t,"(a,l,h,",n.join(","),"){",i?"":"var i=",r?"l-1":"h+1",";while(l<=h){var m=(l+h)>>>1,x=a[m]"];return i?e.indexOf("c")<0?a.push(";if(x===y){return m}else if(x<=y){"):a.push(";var p=c(x,y);if(p===0){return m}else if(p<=0){"):a.push(";if(",e,"){i=m;"),r?a.push("l=m+1}else{h=m-1}"):a.push("h=m-1}else{l=m+1}"),a.push("}"),i?a.push("return -1};"):a.push("return i};"),a.join("")}function n(t,e,r,n){return new Function([i("A","x"+t+"y",e,["y"],n),i("P","c(x,y)"+t+"0",e,["y","c"],n),"function dispatchBsearch",r,"(a,y,c,l,h){if(typeof(c)==='function'){return P(a,(l===void 0)?0:l|0,(h===void 0)?a.length-1:h|0,y,c)}else{return A(a,(c===void 0)?0:c|0,(l===void 0)?a.length-1:l|0,y)}}return dispatchBsearch",r].join(""))()}e.exports={ge:n(">=",!1,"GE"),gt:n(">",!1,"GT"),lt:n("<",!0,"LT"),le:n("<=",!0,"LE"),eq:n("-",!0,"EQ",!0)}},{}],54:[function(t,e,r){"use strict";e.exports=function(t){for(var e=1,r=1;r<t.length;++r)for(var n=0;n<r;++n)if(t[r]<t[n])e=-e;else if(t[n]===t[r])return 0;return e}},{}],55:[function(t,e,r){"use strict";var f=t("dup"),h=t("robust-linear-solve");function p(t,e){for(var r=0,n=t.length,i=0;i<n;++i)r+=t[i]*e[i];return r}function o(t){var e=t.length;if(0===e)return[];t[0].length;for(var r=f([t.length+1,t.length+1],1),n=f([t.length+1],1),i=r[e][e]=0;i<e;++i){for(var a=0;a<=i;++a)r[a][i]=r[i][a]=2*p(t[i],t[a]);n[i]=p(t[i],t[i])}var o=h(r,n),s=0,l=o[e+1];for(i=0;i<l.length;++i)s+=l[i];var u=new Array(e);for(i=0;i<e;++i){l=o[i];var c=0;for(a=0;a<l.length;++a)c+=l[a];u[i]=c/s}return u}function n(t){if(0===t.length)return[];for(var e=t[0].length,r=f([e]),n=o(t),i=0;i<t.length;++i)for(var a=0;a<e;++a)r[a]+=t[i][a]*n[i];return r}n.barycenetric=o,e.exports=n},{dup:115,"robust-linear-solve":1326}],56:[function(t,e,r){e.exports=function(t){for(var e=o(t),r=0,n=0;n<t.length;++n)for(var i=t[n],a=0;a<e.length;++a)r+=Math.pow(i[a]-e[a],2);return Math.sqrt(r/t.length)};var o=t("circumcenter")},{circumcenter:55}],57:[function(t,e,r){e.exports=function(t,e,r){return e<r?t<e?e:r<t?r:t:t<r?r:e<t?e:t}},{}],58:[function(t,e,r){"use strict";e.exports=function(t,e,r){var n;if(r){n=e;for(var i=new Array(e.length),a=0;a<e.length;++a){var o=e[a];i[a]=[o[0],o[1],r[a]]}e=i}var s=(l=t,u=e,c=!!r,f=b(l,[],x(l)),_(u,f,c),!!f);var l,u,c,f;for(;h(t,e,!!r);)s=!0;if(r&&s){n.length=0;for(var a=r.length=0;a<e.length;++a){var o=e[a];n.push([o[0],o[1]]),r.push(o[2])}}return s};var d=t("union-find"),m=t("box-intersect"),g=t("robust-segment-intersect"),A=t("big-rat"),k=t("big-rat/cmp"),T=t("big-rat/to-float"),E=t("rat-vec"),v=t("nextafter"),S=t("./lib/rat-seg-intersect");function y(t){var e=T(t);return[v(e,-1/0),v(e,1/0)]}function x(t){for(var e=new Array(t.length),r=0;r<t.length;++r){var n=t[r];e[r]=[v(n[0],-1/0),v(n[1],-1/0),v(n[0],1/0),v(n[1],1/0)]}return e}function b(t,e,r){for(var n=e.length,i=new d(n),a=[],o=0;o<e.length;++o){var s=e[o],l=y(s[0]),u=y(s[1]);a.push([v(l[0],-1/0),v(u[0],-1/0),v(l[1],1/0),v(u[1],1/0)])}m(a,function(t,e){i.link(t,e)});var c=!0,f=new Array(n);for(o=0;o<n;++o){(p=i.find(o))!==o&&(c=!1,t[p]=[Math.min(t[o][0],t[p][0]),Math.min(t[o][1],t[p][1])])}if(c)return null;var h=0;for(o=0;o<n;++o){var p;(p=i.find(o))===o?(f[o]=h,t[h++]=t[o]):f[o]=-1}t.length=h;for(o=0;o<n;++o)f[o]<0&&(f[o]=f[i.find(o)]);return f}function c(t,e){return t[0]-e[0]||t[1]-e[1]}function f(t,e){var r=t[0]-e[0]||t[1]-e[1];return r||(t[2]<e[2]?-1:t[2]>e[2]?1:0)}function _(t,e,r){if(0!==t.length){if(e)for(var n=0;n<t.length;++n){var i=e[(o=t[n])[0]],a=e[o[1]];o[0]=Math.min(i,a),o[1]=Math.max(i,a)}else for(n=0;n<t.length;++n){var o;i=(o=t[n])[0],a=o[1];o[0]=Math.min(i,a),o[1]=Math.max(i,a)}r?t.sort(f):t.sort(c);var s=1;for(n=1;n<t.length;++n){var l=t[n-1],u=t[n];(u[0]!==l[0]||u[1]!==l[1]||r&&u[2]!==l[2])&&(t[s++]=u)}t.length=s}}function h(t,e,r){var l,u,c,o,s,f,n=function(t,e){for(var r=new Array(e.length),n=0;n<e.length;++n){var i=e[n],a=t[i[0]],o=t[i[1]];r[n]=[v(Math.min(a[0],o[0]),-1/0),v(Math.min(a[1],o[1]),-1/0),v(Math.max(a[0],o[0]),1/0),v(Math.max(a[1],o[1]),1/0)]}return r}(t,e),i=(l=t,u=e,c=[],m(n,function(t,e){var r=u[t],n=u[e];if(r[0]!==n[0]&&r[0]!==n[1]&&r[1]!==n[0]&&r[1]!==n[1]){var i=l[r[0]],a=l[r[1]],o=l[n[0]],s=l[n[1]];g(i,a,o,s)&&c.push([t,e])}}),c),a=x(t),h=(o=t,s=e,f=[],m(n,a,function(t,e){var r=s[t];if(r[0]!==e&&r[1]!==e){var n=o[e],i=o[r[0]],a=o[r[1]];g(i,a,n,n)&&f.push([t,e])}}),f),p=b(t,function(t,e,r,n,i){var a,o,s=t.map(function(t){return[A(t[0]),A(t[1])]});for(a=0;a<r.length;++a){var l=r[a];o=l[0];var u=l[1],c=e[o],f=e[u],h=S(E(t[c[0]]),E(t[c[1]]),E(t[f[0]]),E(t[f[1]]));if(h){var p=t.length;t.push([T(h[0]),T(h[1])]),s.push(h),n.push([o,p],[u,p])}}for(n.sort(function(t,e){if(t[0]!==e[0])return t[0]-e[0];var r=s[t[1]],n=s[e[1]];return k(r[0],n[0])||k(r[1],n[1])}),a=n.length-1;0<=a;--a){var d=e[o=(w=n[a])[0]],m=d[0],g=d[1],v=t[m],y=t[g];if((v[0]-y[0]||v[1]-y[1])<0){var x=m;m=g,g=x}d[0]=m;var b,_=d[1]=w[1];for(i&&(b=d[2]);0<a&&n[a-1][0]===o;){var w,M=(w=n[--a])[1];i?e.push([_,M,b]):e.push([_,M]),_=M}i?e.push([_,g,b]):e.push([_,g])}return s}(t,e,i,h,r));return _(e,p,r),!!p||(0<i.length||0<h.length)}},{"./lib/rat-seg-intersect":59,"big-rat":20,"big-rat/cmp":18,"big-rat/to-float":32,"box-intersect":38,nextafter:623,"rat-vec":1303,"robust-segment-intersect":1330,"union-find":1363}],59:[function(t,e,r){"use strict";e.exports=function(t,e,r,n){var i=p(e,t),a=p(n,r),o=g(i,a);if(0===h(o))return null;var s=p(t,r),l=g(a,s),u=f(l,o),c=m(i,u);return d(t,c)};var n=t("big-rat/mul"),f=t("big-rat/div"),i=t("big-rat/sub"),h=t("big-rat/sign"),p=t("rat-vec/sub"),d=t("rat-vec/add"),m=t("rat-vec/muls");function g(t,e){return i(n(t[0],e[1]),n(t[1],e[0]))}},{"big-rat/div":19,"big-rat/mul":29,"big-rat/sign":30,"big-rat/sub":31,"rat-vec/add":1302,"rat-vec/muls":1304,"rat-vec/sub":1305}],60:[function(t,e,r){"use strict";var o=t("clamp");function n(t,e){null==e&&(e=!0);var r=t[0],n=t[1],i=t[2],a=t[3];return null==a&&(a=e?1:255),e&&(r*=255,n*=255,i*=255,a*=255),16777216*(r=255&o(r,0,255))+((n=255&o(n,0,255))<<16)+((i=255&o(i,0,255))<<8)+(a=255&o(a,0,255))}e.exports=n,e.exports.to=n,e.exports.from=function(t,e){var r=(t=+t)>>>24,n=(16711680&t)>>>16,i=(65280&t)>>>8,a=255&t;return!1===e?[r,n,i,a]:[r/255,n/255,i/255,a/255]}},{clamp:57}],61:[function(t,e,r){"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},{}],62:[function(t,e,r){"use strict";var a=t("color-rgba"),o=t("clamp"),s=t("dtype");e.exports=function(t,e){"float"!==e&&e||(e="array"),"uint"===e&&(e="uint8"),"uint_clamped"===e&&(e="uint8_clamped");var r=s(e),n=new r(4);if(t instanceof r)return Array.isArray(t)?t.slice():(n.set(t),n);var i="uint8"!==e&&"uint8_clamped"!==e;return t instanceof Uint8Array||t instanceof Uint8ClampedArray?(n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=null!=t[3]?t[3]:255,i&&(n[0]/=255,n[1]/=255,n[2]/=255,n[3]/=255)):(t.length&&"string"!=typeof t||((t=a(t))[0]/=255,t[1]/=255,t[2]/=255),i?(n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=null!=t[3]?t[3]:1):(n[0]=o(Math.round(255*t[0]),0,255),n[1]=o(Math.round(255*t[1]),0,255),n[2]=o(Math.round(255*t[2]),0,255),n[3]=null==t[3]?255:o(Math.floor(255*t[3]),0,255))),n}},{clamp:57,"color-rgba":63,dtype:114}],63:[function(t,e,r){"use strict";var n=t("color-parse"),i=t("color-space/hsl"),a=t("clamp");e.exports=function(t){var e;if("string"!=typeof t)throw Error("Argument should be a string");var r=n(t);return r.space?((e=Array(3))[0]=a(r.values[0],0,255),e[1]=a(r.values[1],0,255),e[2]=a(r.values[2],0,255),"h"===r.space[0]&&(e=i.rgb(e)),e.push(a(r.alpha,0,1)),e):[]}},{clamp:57,"color-parse":64,"color-space/hsl":67}],64:[function(t,e,r){(function(c){"use strict";var f=t("color-name"),h=t("is-plain-obj"),p=t("defined");e.exports=function(t){var e,r,n=[],i=1;if("string"==typeof t)if(f[t])n=f[t].slice(),r="rgb";else if("transparent"===t)r="rgb",n=[i=0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(t)){var a=t.slice(1),o=a.length,s=o<=4;i=1,s?(n=[parseInt(a[0]+a[0],16),parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16)],4===o&&(i=parseInt(a[3]+a[3],16)/255)):(n=[parseInt(a[0]+a[1],16),parseInt(a[2]+a[3],16),parseInt(a[4]+a[5],16)],8===o&&(i=parseInt(a[6]+a[7],16)/255)),n[0]||(n[0]=0),n[1]||(n[1]=0),n[2]||(n[2]=0),r="rgb"}else if(e=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(t)){var l=e[1],a=l.replace(/a$/,""),o="cmyk"===(r=a)?4:"gray"===a?1:3;n=e[2].trim().split(/\s*,\s*/).map(function(t,e){if(/%$/.test(t))return e===o?parseFloat(t)/100:"rgb"===a?255*parseFloat(t)/100:parseFloat(t);if("h"===a[e]){if(/deg$/.test(t))return parseFloat(t);if(void 0!==d[t])return d[t]}return parseFloat(t)}),l===a&&n.push(1),i=void 0===n[o]?1:n[o],n=n.slice(0,o)}else 10<t.length&&/[0-9](?:\s|\/)/.test(t)&&(n=t.match(/([0-9]+)/g).map(function(t){return parseFloat(t)}),r=t.match(/([a-z])/gi).join("").toLowerCase());else if("number"==typeof t)r="rgb",n=[t>>>16,(65280&t)>>>8,255&t];else if(h(t)){var u=p(t.r,t.red,t.R,null);null!==u?(r="rgb",n=[u,p(t.g,t.green,t.G),p(t.b,t.blue,t.B)]):(r="hsl",n=[p(t.h,t.hue,t.H),p(t.s,t.saturation,t.S),p(t.l,t.lightness,t.L,t.b,t.brightness)]),i=p(t.a,t.alpha,t.opacity,1),null!=t.opacity&&(i/=100)}else(Array.isArray(t)||c.ArrayBuffer&&ArrayBuffer.isView&&ArrayBuffer.isView(t))&&(n=[t[0],t[1],t[2]],r="rgb",i=4===t.length?t[3]:1);return{space:r,values:n,alpha:i}};var d={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"color-name":61,defined:108,"is-plain-obj":420}],65:[function(t,e,r){"use strict";var n=t("color-parse"),i=t("color-space/hsl"),a=t("clamp");e.exports=function(t){var e,r=n(t);return r.space?((e=Array(3))[0]=a(r.values[0],0,255),e[1]=a(r.values[1],0,255),e[2]=a(r.values[2],0,255),"h"===r.space[0]&&(e=i.rgb(e)),e.push(a(r.alpha,0,1)),e):[]}},{clamp:57,"color-parse":66,"color-space/hsl":67}],66:[function(t,e,r){(function(c){"use strict";var f=t("color-name"),h=t("is-plain-obj"),p=t("defined");e.exports=function(t){var e,r,n=[],i=1;if("string"==typeof t)if(f[t])n=f[t].slice(),r="rgb";else if("transparent"===t)r="rgb",n=[i=0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(t)){var a=t.slice(1),o=a.length,s=o<=4;i=1,s?(n=[parseInt(a[0]+a[0],16),parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16)],4===o&&(i=parseInt(a[3]+a[3],16)/255)):(n=[parseInt(a[0]+a[1],16),parseInt(a[2]+a[3],16),parseInt(a[4]+a[5],16)],8===o&&(i=parseInt(a[6]+a[7],16)/255)),n[0]||(n[0]=0),n[1]||(n[1]=0),n[2]||(n[2]=0),r="rgb"}else if(e=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(t)){var l=e[1],a=l.replace(/a$/,""),o="cmyk"===(r=a)?4:"gray"===a?1:3;n=e[2].trim().split(/\s*,\s*/).map(function(t,e){if(/%$/.test(t))return e===o?parseFloat(t)/100:"rgb"===a?255*parseFloat(t)/100:parseFloat(t);if("h"===a[e]){if(/deg$/.test(t))return parseFloat(t);if(void 0!==d[t])return d[t]}return parseFloat(t)}),l===a&&n.push(1),i=void 0===n[o]?1:n[o],n=n.slice(0,o)}else 10<t.length&&/[0-9](?:\s|\/)/.test(t)&&(n=t.match(/([0-9]+)/g).map(function(t){return parseFloat(t)}),r=t.match(/([a-z])/gi).join("").toLowerCase());else if(isNaN(t))if(h(t)){var u=p(t.r,t.red,t.R,null);null!==u?(r="rgb",n=[u,p(t.g,t.green,t.G),p(t.b,t.blue,t.B)]):(r="hsl",n=[p(t.h,t.hue,t.H),p(t.s,t.saturation,t.S),p(t.l,t.lightness,t.L,t.b,t.brightness)]),i=p(t.a,t.alpha,t.opacity,1),null!=t.opacity&&(i/=100)}else(Array.isArray(t)||c.ArrayBuffer&&ArrayBuffer.isView&&ArrayBuffer.isView(t))&&(n=[t[0],t[1],t[2]],r="rgb",i=4===t.length?t[3]:1);else r="rgb",n=[t>>>16,(65280&t)>>>8,255&t];return{space:r,values:n,alpha:i}};var d={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"color-name":61,defined:108,"is-plain-obj":420}],67:[function(t,e,r){"use strict";var n=t("./rgb");e.exports={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(t){var e,r,n,i,a,o=t[0]/360,s=t[1]/100,l=t[2]/100;if(0===s)return[a=255*l,a,a];e=2*l-(r=l<.5?l*(1+s):l+s-l*s),i=[0,0,0];for(var u=0;u<3;u++)(n=o+1/3*-(u-1))<0?n++:1<n&&n--,a=6*n<1?e+6*(r-e)*n:2*n<1?r:3*n<2?e+(r-e)*(2/3-n)*6:e,i[u]=255*a;return i}},n.hsl=function(t){var e,r,n=t[0]/255,i=t[1]/255,a=t[2]/255,o=Math.min(n,i,a),s=Math.max(n,i,a),l=s-o;return s===o?e=0:n===s?e=(i-a)/l:i===s?e=2+(a-n)/l:a===s&&(e=4+(n-i)/l),(e=Math.min(60*e,360))<0&&(e+=360),r=(o+s)/2,[e,100*(s===o?0:r<=.5?l/(s+o):l/(2-s-o)),100*r]}},{"./rgb":68}],68:[function(t,e,r){"use strict";e.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}},{}],69:[function(t,e,r){e.exports={jet:[{index:0,rgb:[0,0,131]},{index:.125,rgb:[0,60,170]},{index:.375,rgb:[5,255,255]},{index:.625,rgb:[255,255,0]},{index:.875,rgb:[250,0,0]},{index:1,rgb:[128,0,0]}],hsv:[{index:0,rgb:[255,0,0]},{index:.169,rgb:[253,255,2]},{index:.173,rgb:[247,255,2]},{index:.337,rgb:[0,252,4]},{index:.341,rgb:[0,252,10]},{index:.506,rgb:[1,249,255]},{index:.671,rgb:[2,0,253]},{index:.675,rgb:[8,0,253]},{index:.839,rgb:[255,0,251]},{index:.843,rgb:[255,0,245]},{index:1,rgb:[255,0,6]}],hot:[{index:0,rgb:[0,0,0]},{index:.3,rgb:[230,0,0]},{index:.6,rgb:[255,210,0]},{index:1,rgb:[255,255,255]}],cool:[{index:0,rgb:[0,255,255]},{index:1,rgb:[255,0,255]}],spring:[{index:0,rgb:[255,0,255]},{index:1,rgb:[255,255,0]}],summer:[{index:0,rgb:[0,128,102]},{index:1,rgb:[255,255,102]}],autumn:[{index:0,rgb:[255,0,0]},{index:1,rgb:[255,255,0]}],winter:[{index:0,rgb:[0,0,255]},{index:1,rgb:[0,255,128]}],bone:[{index:0,rgb:[0,0,0]},{index:.376,rgb:[84,84,116]},{index:.753,rgb:[169,200,200]},{index:1,rgb:[255,255,255]}],copper:[{index:0,rgb:[0,0,0]},{index:.804,rgb:[255,160,102]},{index:1,rgb:[255,199,127]}],greys:[{index:0,rgb:[0,0,0]},{index:1,rgb:[255,255,255]}],yignbu:[{index:0,rgb:[8,29,88]},{index:.125,rgb:[37,52,148]},{index:.25,rgb:[34,94,168]},{index:.375,rgb:[29,145,192]},{index:.5,rgb:[65,182,196]},{index:.625,rgb:[127,205,187]},{index:.75,rgb:[199,233,180]},{index:.875,rgb:[237,248,217]},{index:1,rgb:[255,255,217]}],greens:[{index:0,rgb:[0,68,27]},{index:.125,rgb:[0,109,44]},{index:.25,rgb:[35,139,69]},{index:.375,rgb:[65,171,93]},{index:.5,rgb:[116,196,118]},{index:.625,rgb:[161,217,155]},{index:.75,rgb:[199,233,192]},{index:.875,rgb:[229,245,224]},{index:1,rgb:[247,252,245]}],yiorrd:[{index:0,rgb:[128,0,38]},{index:.125,rgb:[189,0,38]},{index:.25,rgb:[227,26,28]},{index:.375,rgb:[252,78,42]},{index:.5,rgb:[253,141,60]},{index:.625,rgb:[254,178,76]},{index:.75,rgb:[254,217,118]},{index:.875,rgb:[255,237,160]},{index:1,rgb:[255,255,204]}],bluered:[{index:0,rgb:[0,0,255]},{index:1,rgb:[255,0,0]}],rdbu:[{index:0,rgb:[5,10,172]},{index:.35,rgb:[106,137,247]},{index:.5,rgb:[190,190,190]},{index:.6,rgb:[220,170,132]},{index:.7,rgb:[230,145,90]},{index:1,rgb:[178,10,28]}],picnic:[{index:0,rgb:[0,0,255]},{index:.1,rgb:[51,153,255]},{index:.2,rgb:[102,204,255]},{index:.3,rgb:[153,204,255]},{index:.4,rgb:[204,204,255]},{index:.5,rgb:[255,255,255]},{index:.6,rgb:[255,204,255]},{index:.7,rgb:[255,153,255]},{index:.8,rgb:[255,102,204]},{index:.9,rgb:[255,102,102]},{index:1,rgb:[255,0,0]}],rainbow:[{index:0,rgb:[150,0,90]},{index:.125,rgb:[0,0,200]},{index:.25,rgb:[0,25,255]},{index:.375,rgb:[0,152,255]},{index:.5,rgb:[44,255,150]},{index:.625,rgb:[151,255,0]},{index:.75,rgb:[255,234,0]},{index:.875,rgb:[255,111,0]},{index:1,rgb:[255,0,0]}],portland:[{index:0,rgb:[12,51,131]},{index:.25,rgb:[10,136,186]},{index:.5,rgb:[242,211,56]},{index:.75,rgb:[242,143,56]},{index:1,rgb:[217,30,30]}],blackbody:[{index:0,rgb:[0,0,0]},{index:.2,rgb:[230,0,0]},{index:.4,rgb:[230,210,0]},{index:.7,rgb:[255,255,255]},{index:1,rgb:[160,200,255]}],earth:[{index:0,rgb:[0,0,130]},{index:.1,rgb:[0,180,180]},{index:.2,rgb:[40,210,40]},{index:.4,rgb:[230,230,50]},{index:.6,rgb:[120,70,20]},{index:1,rgb:[255,255,255]}],electric:[{index:0,rgb:[0,0,0]},{index:.15,rgb:[30,0,100]},{index:.4,rgb:[120,0,100]},{index:.6,rgb:[160,90,0]},{index:.8,rgb:[230,200,0]},{index:1,rgb:[255,250,220]}],alpha:[{index:0,rgb:[255,255,255,0]},{index:1,rgb:[255,255,255,1]}],viridis:[{index:0,rgb:[68,1,84]},{index:.13,rgb:[71,44,122]},{index:.25,rgb:[59,81,139]},{index:.38,rgb:[44,113,142]},{index:.5,rgb:[33,144,141]},{index:.63,rgb:[39,173,129]},{index:.75,rgb:[92,200,99]},{index:.88,rgb:[170,220,50]},{index:1,rgb:[253,231,37]}],inferno:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[31,12,72]},{index:.25,rgb:[85,15,109]},{index:.38,rgb:[136,34,106]},{index:.5,rgb:[186,54,85]},{index:.63,rgb:[227,89,51]},{index:.75,rgb:[249,140,10]},{index:.88,rgb:[249,201,50]},{index:1,rgb:[252,255,164]}],magma:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[28,16,68]},{index:.25,rgb:[79,18,123]},{index:.38,rgb:[129,37,129]},{index:.5,rgb:[181,54,122]},{index:.63,rgb:[229,80,100]},{index:.75,rgb:[251,135,97]},{index:.88,rgb:[254,194,135]},{index:1,rgb:[252,253,191]}],plasma:[{index:0,rgb:[13,8,135]},{index:.13,rgb:[75,3,161]},{index:.25,rgb:[125,3,168]},{index:.38,rgb:[168,34,150]},{index:.5,rgb:[203,70,121]},{index:.63,rgb:[229,107,93]},{index:.75,rgb:[248,148,65]},{index:.88,rgb:[253,195,40]},{index:1,rgb:[240,249,33]}],warm:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[172,0,187]},{index:.25,rgb:[219,0,170]},{index:.38,rgb:[255,0,130]},{index:.5,rgb:[255,63,74]},{index:.63,rgb:[255,123,0]},{index:.75,rgb:[234,176,0]},{index:.88,rgb:[190,228,0]},{index:1,rgb:[147,255,0]}],cool:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[116,0,218]},{index:.25,rgb:[98,74,237]},{index:.38,rgb:[68,146,231]},{index:.5,rgb:[0,204,197]},{index:.63,rgb:[0,247,146]},{index:.75,rgb:[0,255,88]},{index:.88,rgb:[40,255,8]},{index:1,rgb:[147,255,0]}],"rainbow-soft":[{index:0,rgb:[125,0,179]},{index:.1,rgb:[199,0,180]},{index:.2,rgb:[255,0,121]},{index:.3,rgb:[255,108,0]},{index:.4,rgb:[222,194,0]},{index:.5,rgb:[150,255,0]},{index:.6,rgb:[0,255,55]},{index:.7,rgb:[0,246,150]},{index:.8,rgb:[50,167,222]},{index:.9,rgb:[103,51,235]},{index:1,rgb:[124,0,186]}],bathymetry:[{index:0,rgb:[40,26,44]},{index:.13,rgb:[59,49,90]},{index:.25,rgb:[64,76,139]},{index:.38,rgb:[63,110,151]},{index:.5,rgb:[72,142,158]},{index:.63,rgb:[85,174,163]},{index:.75,rgb:[120,206,163]},{index:.88,rgb:[187,230,172]},{index:1,rgb:[253,254,204]}],cdom:[{index:0,rgb:[47,15,62]},{index:.13,rgb:[87,23,86]},{index:.25,rgb:[130,28,99]},{index:.38,rgb:[171,41,96]},{index:.5,rgb:[206,67,86]},{index:.63,rgb:[230,106,84]},{index:.75,rgb:[242,149,103]},{index:.88,rgb:[249,193,135]},{index:1,rgb:[254,237,176]}],chlorophyll:[{index:0,rgb:[18,36,20]},{index:.13,rgb:[25,63,41]},{index:.25,rgb:[24,91,59]},{index:.38,rgb:[13,119,72]},{index:.5,rgb:[18,148,80]},{index:.63,rgb:[80,173,89]},{index:.75,rgb:[132,196,122]},{index:.88,rgb:[175,221,162]},{index:1,rgb:[215,249,208]}],density:[{index:0,rgb:[54,14,36]},{index:.13,rgb:[89,23,80]},{index:.25,rgb:[110,45,132]},{index:.38,rgb:[120,77,178]},{index:.5,rgb:[120,113,213]},{index:.63,rgb:[115,151,228]},{index:.75,rgb:[134,185,227]},{index:.88,rgb:[177,214,227]},{index:1,rgb:[230,241,241]}],"freesurface-blue":[{index:0,rgb:[30,4,110]},{index:.13,rgb:[47,14,176]},{index:.25,rgb:[41,45,236]},{index:.38,rgb:[25,99,212]},{index:.5,rgb:[68,131,200]},{index:.63,rgb:[114,156,197]},{index:.75,rgb:[157,181,203]},{index:.88,rgb:[200,208,216]},{index:1,rgb:[241,237,236]}],"freesurface-red":[{index:0,rgb:[60,9,18]},{index:.13,rgb:[100,17,27]},{index:.25,rgb:[142,20,29]},{index:.38,rgb:[177,43,27]},{index:.5,rgb:[192,87,63]},{index:.63,rgb:[205,125,105]},{index:.75,rgb:[216,162,148]},{index:.88,rgb:[227,199,193]},{index:1,rgb:[241,237,236]}],oxygen:[{index:0,rgb:[64,5,5]},{index:.13,rgb:[106,6,15]},{index:.25,rgb:[144,26,7]},{index:.38,rgb:[168,64,3]},{index:.5,rgb:[188,100,4]},{index:.63,rgb:[206,136,11]},{index:.75,rgb:[220,174,25]},{index:.88,rgb:[231,215,44]},{index:1,rgb:[248,254,105]}],par:[{index:0,rgb:[51,20,24]},{index:.13,rgb:[90,32,35]},{index:.25,rgb:[129,44,34]},{index:.38,rgb:[159,68,25]},{index:.5,rgb:[182,99,19]},{index:.63,rgb:[199,134,22]},{index:.75,rgb:[212,171,35]},{index:.88,rgb:[221,210,54]},{index:1,rgb:[225,253,75]}],phase:[{index:0,rgb:[145,105,18]},{index:.13,rgb:[184,71,38]},{index:.25,rgb:[186,58,115]},{index:.38,rgb:[160,71,185]},{index:.5,rgb:[110,97,218]},{index:.63,rgb:[50,123,164]},{index:.75,rgb:[31,131,110]},{index:.88,rgb:[77,129,34]},{index:1,rgb:[145,105,18]}],salinity:[{index:0,rgb:[42,24,108]},{index:.13,rgb:[33,50,162]},{index:.25,rgb:[15,90,145]},{index:.38,rgb:[40,118,137]},{index:.5,rgb:[59,146,135]},{index:.63,rgb:[79,175,126]},{index:.75,rgb:[120,203,104]},{index:.88,rgb:[193,221,100]},{index:1,rgb:[253,239,154]}],temperature:[{index:0,rgb:[4,35,51]},{index:.13,rgb:[23,51,122]},{index:.25,rgb:[85,59,157]},{index:.38,rgb:[129,79,143]},{index:.5,rgb:[175,95,130]},{index:.63,rgb:[222,112,101]},{index:.75,rgb:[249,146,66]},{index:.88,rgb:[249,196,65]},{index:1,rgb:[232,250,91]}],turbidity:[{index:0,rgb:[34,31,27]},{index:.13,rgb:[65,50,41]},{index:.25,rgb:[98,69,52]},{index:.38,rgb:[131,89,57]},{index:.5,rgb:[161,112,59]},{index:.63,rgb:[185,140,66]},{index:.75,rgb:[202,174,88]},{index:.88,rgb:[216,209,126]},{index:1,rgb:[233,246,171]}],"velocity-blue":[{index:0,rgb:[17,32,64]},{index:.13,rgb:[35,52,116]},{index:.25,rgb:[29,81,156]},{index:.38,rgb:[31,113,162]},{index:.5,rgb:[50,144,169]},{index:.63,rgb:[87,173,176]},{index:.75,rgb:[149,196,189]},{index:.88,rgb:[203,221,211]},{index:1,rgb:[254,251,230]}],"velocity-green":[{index:0,rgb:[23,35,19]},{index:.13,rgb:[24,64,38]},{index:.25,rgb:[11,95,45]},{index:.38,rgb:[39,123,35]},{index:.5,rgb:[95,146,12]},{index:.63,rgb:[152,165,18]},{index:.75,rgb:[201,186,69]},{index:.88,rgb:[233,216,137]},{index:1,rgb:[255,253,205]}],cubehelix:[{index:0,rgb:[0,0,0]},{index:.07,rgb:[22,5,59]},{index:.13,rgb:[60,4,105]},{index:.2,rgb:[109,1,135]},{index:.27,rgb:[161,0,147]},{index:.33,rgb:[210,2,142]},{index:.4,rgb:[251,11,123]},{index:.47,rgb:[255,29,97]},{index:.53,rgb:[255,54,69]},{index:.6,rgb:[255,85,46]},{index:.67,rgb:[255,120,34]},{index:.73,rgb:[255,157,37]},{index:.8,rgb:[241,191,57]},{index:.87,rgb:[224,220,93]},{index:.93,rgb:[218,241,142]},{index:1,rgb:[227,253,198]}]}},{}],70:[function(t,e,r){"use strict";var m=t("./colorScale"),g=t("lerp");function v(t){return[t[0]/255,t[1]/255,t[2]/255,t[3]]}function y(t){for(var e,r="#",n=0;n<3;++n)r+=("00"+(e=(e=t[n]).toString(16))).substr(e.length);return r}function x(t){return"rgba("+t.join(",")+")"}e.exports=function(t){var e,r,n,i,a,o,s,l,u,c;t||(t={});l=(t.nshades||72)-1,s=t.format||"hex",(o=t.colormap)||(o="jet");if("string"==typeof o){if(o=o.toLowerCase(),!m[o])throw Error(o+" not a supported colorscale");a=m[o]}else{if(!Array.isArray(o))throw Error("unsupported colormap option",o);a=o.slice()}if(a.length>l)throw new Error(o+" map requires nshades to be at least size "+a.length);u=Array.isArray(t.alpha)?2!==t.alpha.length?[1,1]:t.alpha.slice():"number"==typeof t.alpha?[t.alpha,t.alpha]:[1,1];e=a.map(function(t){return Math.round(t.index*l)}),u[0]=Math.min(Math.max(u[0],0),1),u[1]=Math.min(Math.max(u[1],0),1);var f=a.map(function(t,e){var r=a[e].index,n=a[e].rgb.slice();return 4===n.length&&0<=n[3]&&n[3]<=1||(n[3]=u[0]+(u[1]-u[0])*r),n}),h=[];for(c=0;c<e.length-1;++c){i=e[c+1]-e[c],r=f[c],n=f[c+1];for(var p=0;p<i;p++){var d=p/i;h.push([Math.round(g(r[0],n[0],d)),Math.round(g(r[1],n[1],d)),Math.round(g(r[2],n[2],d)),g(r[3],n[3],d)])}}h.push(a[a.length-1].rgb.concat(u[1])),"hex"===s?h=h.map(y):"rgbaString"===s?h=h.map(x):"float"===s&&(h=h.map(v));return h}},{"./colorScale":69,lerp:422}],71:[function(t,e,r){"use strict";e.exports=function(t,e,r,n){var i=f(e,r,n);if(0===i){var a=h(f(t,e,r)),o=h(f(t,e,n));if(a===o){if(0===a){var s=p(t,e,r),l=p(t,e,n);return s===l?0:s?1:-1}return 0}return 0===o?0<a?-1:p(t,e,n)?-1:1:0===a?0<o?1:p(t,e,r)?1:-1:h(o-a)}var u=f(t,e,r);{if(0<u)return 0<i&&0<f(t,e,n)?1:-1;if(u<0)return 0<i||0<f(t,e,n)?1:-1;var c=f(t,e,n);return 0<c?1:p(t,e,r)?1:-1}};var f=t("robust-orientation"),h=t("signum"),l=t("two-sum"),u=t("robust-product"),c=t("robust-sum");function p(t,e,r){var n=l(t[0],-e[0]),i=l(t[1],-e[1]),a=l(r[0],-e[0]),o=l(r[1],-e[1]),s=c(u(n,a),u(i,o));return 0<=s[s.length-1]}},{"robust-orientation":1327,"robust-product":1328,"robust-sum":1332,signum:72,"two-sum":1360}],72:[function(t,e,r){"use strict";e.exports=function(t){return t<0?-1:0<t?1:0}},{}],73:[function(t,e,r){e.exports=function(t,e){var r=t.length,n=t.length-e.length;if(n)return n;switch(r){case 0:return 0;case 1:return t[0]-e[0];case 2:return t[0]+t[1]-e[0]-e[1]||x(t[0],t[1])-x(e[0],e[1]);case 3:var i=t[0]+t[1],a=e[0]+e[1];if(n=i+t[2]-(a+e[2]))return n;var o=x(t[0],t[1]),s=x(e[0],e[1]);return x(o,t[2])-x(s,e[2])||x(o+t[2],i)-x(s+e[2],a);case 4:var l=t[0],u=t[1],c=t[2],f=t[3],h=e[0],p=e[1],d=e[2],m=e[3];return l+u+c+f-(h+p+d+m)||x(l,u,c,f)-x(h,p,d,m,h)||x(l+u,l+c,l+f,u+c,u+f,c+f)-x(h+p,h+d,h+m,p+d,p+m,d+m)||x(l+u+c,l+u+f,l+c+f,u+c+f)-x(h+p+d,h+p+m,h+d+m,p+d+m);default:for(var g=t.slice().sort(b),v=e.slice().sort(b),y=0;y<r;++y)if(n=g[y]-v[y])return n;return 0}};var x=Math.min;function b(t,e){return t-e}},{}],74:[function(t,e,r){"use strict";var n=t("compare-cell"),i=t("cell-orientation");e.exports=function(t,e){return n(t,e)||i(t)-i(e)}},{"cell-orientation":54,"compare-cell":73}],75:[function(t,e,r){!function(t){"use strict";var s={re:0,im:0},n=function(t){return.5*(Math.exp(t)+Math.exp(-t))},i=function(t){return.5*(Math.exp(t)-Math.exp(-t))},l=function(){throw SyntaxError("Invalid Param")};function u(t,e){var r=Math.abs(t),n=Math.abs(e);return 0===t?Math.log(n):0===e?Math.log(r):r<3e3&&n<3e3?.5*Math.log(t*t+e*e):Math.log(t/Math.cos(Math.atan2(e,t)))}var o=function(t,e){if(null==t)s.re=s.im=0;else if(void 0!==e)s.re=t,s.im=e;else switch(typeof t){case"object":"im"in t&&"re"in t?(s.re=t.re,s.im=t.im):"abs"in t&&"arg"in t?(s.re=t.abs*Math.cos(t.arg),s.im=t.abs*Math.sin(t.arg)):"r"in t&&"phi"in t?(s.re=t.r*Math.cos(t.phi),s.im=t.r*Math.sin(t.phi)):2===t.length?(s.re=t[0],s.im=t[1]):l();break;case"string":s.im=s.re=0;var r=t.match(/\d+\.?\d*e[+-]?\d+|\d+\.?\d*|\.\d+|./g),n=1,i=0;null===r&&l();for(var a=0;a<r.length;a++){var o=r[a];" "===o||"\t"===o||"\n"===o||("+"===o?n++:"-"===o?i++:("i"===o||"I"===o?(n+i===0&&l()," "===r[a+1]||isNaN(r[a+1])?s.im+=parseFloat((i%2?"-":"")+"1"):(s.im+=parseFloat((i%2?"-":"")+r[a+1]),a++)):((n+i===0||isNaN(o))&&l(),"i"===r[a+1]||"I"===r[a+1]?(s.im+=parseFloat((i%2?"-":"")+o),a++):s.re+=parseFloat((i%2?"-":"")+o)),n=i=0))}0<n+i&&l();break;case"number":s.im=0,s.re=t;break;default:l()}isNaN(s.re)||isNaN(s.im)};function c(t,e){if(!(this instanceof c))return new c(t,e);o(t,e),this.re=s.re,this.im=s.im}c.prototype={re:0,im:0,sign:function(){var t=this.abs();return new c(this.re/t,this.im/t)},add:function(t,e){return o(t,e),new c(this.re+s.re,this.im+s.im)},sub:function(t,e){return o(t,e),new c(this.re-s.re,this.im-s.im)},mul:function(t,e){return o(t,e),0===s.im&&0===this.im?new c(this.re*s.re,0):new c(this.re*s.re-this.im*s.im,this.re*s.im+this.im*s.re)},div:function(t,e){o(t,e),t=this.re,e=this.im;var r,n,i=s.re,a=s.im;return 0===a?0===i?new c(0!==t?t/0:0,0!==e?e/0:0):new c(t/i,e/i):Math.abs(i)<Math.abs(a)?new c((t*(n=i/a)+e)/(r=i*n+a),(e*n-t)/r):new c((t+e*(n=a/i))/(r=a*n+i),(e-t*n)/r)},pow:function(t,e){if(o(t,e),t=this.re,e=this.im,0===t&&0===e)return c.ZERO;if(0===s.im){if(0===e&&0<=t)return new c(Math.pow(t,s.re),0);if(0===t)switch((s.re%4+4)%4){case 0:return new c(Math.pow(e,s.re),0);case 1:return new c(0,Math.pow(e,s.re));case 2:return new c(-Math.pow(e,s.re),0);case 3:return new c(0,-Math.pow(e,s.re))}}var r=Math.atan2(e,t),n=u(t,e);return t=Math.exp(s.re*n-s.im*r),e=s.im*n+s.re*r,new c(t*Math.cos(e),t*Math.sin(e))},sqrt:function(){var t,e,r=this.re,n=this.im,i=this.abs();if(0<=r){if(0===n)return new c(Math.sqrt(r),0);t=.5*Math.sqrt(2*(i+r))}else t=Math.abs(n)/Math.sqrt(2*(i-r));return e=r<=0?.5*Math.sqrt(2*(i-r)):Math.abs(n)/Math.sqrt(2*(i+r)),new c(t,n<0?-e:e)},exp:function(){var t=Math.exp(this.re);return this.im,new c(t*Math.cos(this.im),t*Math.sin(this.im))},log:function(){var t=this.re,e=this.im;return new c(u(t,e),Math.atan2(e,t))},abs:function(){return t=this.re,e=this.im,r=Math.abs(t),n=Math.abs(e),r<3e3&&n<3e3?Math.sqrt(r*r+n*n):(r<n?(r=n,n=t/e):n=e/t,r*Math.sqrt(1+n*n));var t,e,r,n},arg:function(){return Math.atan2(this.im,this.re)},sin:function(){var t=this.re,e=this.im;return new c(Math.sin(t)*n(e),Math.cos(t)*i(e))},cos:function(){var t=this.re,e=this.im;return new c(Math.cos(t)*n(e),-Math.sin(t)*i(e))},tan:function(){var t=2*this.re,e=2*this.im,r=Math.cos(t)+n(e);return new c(Math.sin(t)/r,i(e)/r)},cot:function(){var t=2*this.re,e=2*this.im,r=Math.cos(t)-n(e);return new c(-Math.sin(t)/r,i(e)/r)},sec:function(){var t=this.re,e=this.im,r=.5*n(2*e)+.5*Math.cos(2*t);return new c(Math.cos(t)*n(e)/r,Math.sin(t)*i(e)/r)},csc:function(){var t=this.re,e=this.im,r=.5*n(2*e)-.5*Math.cos(2*t);return new c(Math.sin(t)*n(e)/r,-Math.cos(t)*i(e)/r)},asin:function(){var t=this.re,e=this.im,r=new c(e*e-t*t+1,-2*t*e).sqrt(),n=new c(r.re-e,r.im+t).log();return new c(n.im,-n.re)},acos:function(){var t=this.re,e=this.im,r=new c(e*e-t*t+1,-2*t*e).sqrt(),n=new c(r.re-e,r.im+t).log();return new c(Math.PI/2-n.im,n.re)},atan:function(){var t=this.re,e=this.im;if(0===t){if(1===e)return new c(0,1/0);if(-1===e)return new c(0,-1/0)}var r=t*t+(1-e)*(1-e),n=new c((1-e*e-t*t)/r,-2*t/r).log();return new c(-.5*n.im,.5*n.re)},acot:function(){var t=this.re,e=this.im;if(0===e)return new c(Math.atan2(1,t),0);var r=t*t+e*e;return 0!==r?new c(t/r,-e/r).atan():new c(0!==t?t/0:0,0!==e?-e/0:0).atan()},asec:function(){var t=this.re,e=this.im;if(0===t&&0===e)return new c(0,1/0);var r=t*t+e*e;return 0!==r?new c(t/r,-e/r).acos():new c(0!==t?t/0:0,0!==e?-e/0:0).acos()},acsc:function(){var t=this.re,e=this.im;if(0===t&&0===e)return new c(Math.PI/2,1/0);var r=t*t+e*e;return 0!==r?new c(t/r,-e/r).asin():new c(0!==t?t/0:0,0!==e?-e/0:0).asin()},sinh:function(){var t=this.re,e=this.im;return new c(i(t)*Math.cos(e),n(t)*Math.sin(e))},cosh:function(){var t=this.re,e=this.im;return new c(n(t)*Math.cos(e),i(t)*Math.sin(e))},tanh:function(){var t=2*this.re,e=2*this.im,r=n(t)+Math.cos(e);return new c(i(t)/r,Math.sin(e)/r)},coth:function(){var t=2*this.re,e=2*this.im,r=n(t)-Math.cos(e);return new c(i(t)/r,-Math.sin(e)/r)},csch:function(){var t=this.re,e=this.im,r=Math.cos(2*e)-n(2*t);return new c(-2*i(t)*Math.cos(e)/r,2*n(t)*Math.sin(e)/r)},sech:function(){var t=this.re,e=this.im,r=Math.cos(2*e)+n(2*t);return new c(2*n(t)*Math.cos(e)/r,-2*i(t)*Math.sin(e)/r)},asinh:function(){var t=this.im;this.im=-this.re,this.re=t;var e=this.asin();return this.re=-this.im,this.im=t,t=e.re,e.re=-e.im,e.im=t,e},acosh:function(){var t,e=this.acos();return e.im<=0?(t=e.re,e.re=-e.im,e.im=t):(t=e.im,e.im=-e.re,e.re=t),e},atanh:function(){var t=this.re,e=this.im,r=1<t&&0===e,n=1-t,i=1+t,a=n*n+e*e,o=0!==a?new c((i*n-e*e)/a,(e*n+i*e)/a):new c(-1!==t?t/0:0,0!==e?e/0:0),s=o.re;return o.re=u(o.re,o.im)/2,o.im=Math.atan2(o.im,s)/2,r&&(o.im=-o.im),o},acoth:function(){var t=this.re,e=this.im;if(0===t&&0===e)return new c(0,Math.PI/2);var r=t*t+e*e;return 0!==r?new c(t/r,-e/r).atanh():new c(0!==t?t/0:0,0!==e?-e/0:0).atanh()},acsch:function(){var t=this.re,e=this.im;if(0===e)return new c(0!==t?Math.log(t+Math.sqrt(t*t+1)):1/0,0);var r=t*t+e*e;return 0!==r?new c(t/r,-e/r).asinh():new c(0!==t?t/0:0,0!==e?-e/0:0).asinh()},asech:function(){var t=this.re,e=this.im;if(0===t&&0===e)return new c(1/0,0);var r=t*t+e*e;return 0!==r?new c(t/r,-e/r).acosh():new c(0!==t?t/0:0,0!==e?-e/0:0).acosh()},inverse:function(){var t=this.re,e=this.im,r=t*t+e*e;return new c(0!==t?t/r:0,0!==e?-e/r:0)},conjugate:function(){return new c(this.re,-this.im)},neg:function(){return new c(-this.re,-this.im)},ceil:function(t){return t=Math.pow(10,t||0),new c(Math.ceil(this.re*t)/t,Math.ceil(this.im*t)/t)},floor:function(t){return t=Math.pow(10,t||0),new c(Math.floor(this.re*t)/t,Math.floor(this.im*t)/t)},round:function(t){return t=Math.pow(10,t||0),new c(Math.round(this.re*t)/t,Math.round(this.im*t)/t)},equals:function(t,e){return o(t,e),Math.abs(s.re-this.re)<=c.EPSILON&&Math.abs(s.im-this.im)<=c.EPSILON},clone:function(){return new c(this.re,this.im)},toString:function(){var t=this.re,e=this.im,r="";return isNaN(t)||isNaN(e)?"NaN":(0!==t&&(r+=t),0!==e&&(0!==t?r+=e<0?" - ":" + ":e<0&&(r+="-"),1!==(e=Math.abs(e))&&(r+=e),r+="i"),r||"0")},toVector:function(){return[this.re,this.im]},valueOf:function(){return 0===this.im?this.re:null},isNaN:function(){return isNaN(this.re)||isNaN(this.im)},isFinite:function(){return isFinite(this.re)&&isFinite(this.im)}},c.ZERO=new c(0,0),c.ONE=new c(1,0),c.I=new c(0,1),c.PI=new c(Math.PI,0),c.E=new c(Math.E,0),c.EPSILON=1e-16,"object"==typeof r?e.exports=c:t.Complex=c}(this)},{}],76:[function(t,e,r){"use strict";var n=t("./lib/ch1d"),i=t("./lib/ch2d"),a=t("./lib/chnd");e.exports=function(t){var e=t.length;{if(0===e)return[];if(1===e)return[[0]]}var r=t[0].length;{if(0===r)return[];if(1===r)return n(t);if(2===r)return i(t)}return a(t,r)}},{"./lib/ch1d":77,"./lib/ch2d":78,"./lib/chnd":79}],77:[function(t,e,r){"use strict";e.exports=function(t){for(var e=0,r=0,n=1;n<t.length;++n)t[n][0]<t[e][0]&&(e=n),t[n][0]>t[r][0]&&(r=n);return e<r?[[e],[r]]:r<e?[[r],[e]]:[[e]]}},{}],78:[function(t,e,r){"use strict";e.exports=function(t){var e=s(t),r=e.length;if(r<=2)return[];for(var n=new Array(r),i=e[r-1],a=0;a<r;++a){var o=e[a];n[a]=[i,o],i=o}return n};var s=t("monotone-convex-hull-2d")},{"monotone-convex-hull-2d":606}],79:[function(t,e,r){"use strict";e.exports=function(e,r){try{return o(e,!0)}catch(t){var n=s(e);if(n.length<=r)return[];var i=function(t,e){for(var r=t.length,n=new Array(r),i=0;i<e.length;++i)n[i]=t[e[i]];for(var a=e.length,i=0;i<r;++i)e.indexOf(i)<0&&(n[a++]=t[i]);return n}(e,n),a=o(i,!0);return function(t,e){for(var r=t.length,n=e.length,i=0;i<r;++i)for(var a=t[i],o=0;o<a.length;++o){var s=a[o];if(s<n)a[o]=e[s];else{s-=n;for(var l=0;l<n;++l)s>=e[l]&&(s+=1);a[o]=s}}return t}(a,n)}};var o=t("incremental-convex-hull"),s=t("affine-hull")},{"affine-hull":7,"incremental-convex-hull":411}],80:[function(t,e,r){e.exports={AFG:"afghan",ALA:"\\b\\wland",ALB:"albania",DZA:"algeria",ASM:"^(?=.*americ).*samoa",AND:"andorra",AGO:"angola",AIA:"anguill?a",ATA:"antarctica",ATG:"antigua",ARG:"argentin",ARM:"armenia",ABW:"^(?!.*bonaire).*\\baruba",AUS:"australia",AUT:"^(?!.*hungary).*austria|\\baustri.*\\bemp",AZE:"azerbaijan",BHS:"bahamas",BHR:"bahrain",BGD:"bangladesh|^(?=.*east).*paki?stan",BRB:"barbados",BLR:"belarus|byelo",BEL:"^(?!.*luxem).*belgium",BLZ:"belize|^(?=.*british).*honduras",BEN:"benin|dahome",BMU:"bermuda",BTN:"bhutan",BOL:"bolivia",BES:"^(?=.*bonaire).*eustatius|^(?=.*carib).*netherlands|\\bbes.?islands",BIH:"herzegovina|bosnia",BWA:"botswana|bechuana",BVT:"bouvet",BRA:"brazil",IOT:"british.?indian.?ocean",BRN:"brunei",BGR:"bulgaria",BFA:"burkina|\\bfaso|upper.?volta",BDI:"burundi",CPV:"verde",KHM:"cambodia|kampuchea|khmer",CMR:"cameroon",CAN:"canada",CYM:"cayman",CAF:"\\bcentral.african.republic",TCD:"\\bchad",CHL:"\\bchile",CHN:"^(?!.*\\bmac)(?!.*\\bhong)(?!.*\\btai)(?!.*\\brep).*china|^(?=.*peo)(?=.*rep).*china",CXR:"christmas",CCK:"\\bcocos|keeling",COL:"colombia",COM:"comoro",COG:"^(?!.*\\bdem)(?!.*\\bd[\\.]?r)(?!.*kinshasa)(?!.*zaire)(?!.*belg)(?!.*l.opoldville)(?!.*free).*\\bcongo",COK:"\\bcook",CRI:"costa.?rica",CIV:"ivoire|ivory",HRV:"croatia",CUB:"\\bcuba",CUW:"^(?!.*bonaire).*\\bcura(c|\xe7)ao",CYP:"cyprus",CSK:"czechoslovakia",CZE:"^(?=.*rep).*czech|czechia|bohemia",COD:"\\bdem.*congo|congo.*\\bdem|congo.*\\bd[\\.]?r|\\bd[\\.]?r.*congo|belgian.?congo|congo.?free.?state|kinshasa|zaire|l.opoldville|drc|droc|rdc",DNK:"denmark",DJI:"djibouti",DMA:"dominica(?!n)",DOM:"dominican.rep",ECU:"ecuador",EGY:"egypt",SLV:"el.?salvador",GNQ:"guine.*eq|eq.*guine|^(?=.*span).*guinea",ERI:"eritrea",EST:"estonia",ETH:"ethiopia|abyssinia",FLK:"falkland|malvinas",FRO:"faroe|faeroe",FJI:"fiji",FIN:"finland",FRA:"^(?!.*\\bdep)(?!.*martinique).*france|french.?republic|\\bgaul",GUF:"^(?=.*french).*guiana",PYF:"french.?polynesia|tahiti",ATF:"french.?southern",GAB:"gabon",GMB:"gambia",GEO:"^(?!.*south).*georgia",DDR:"german.?democratic.?republic|democratic.?republic.*germany|east.germany",DEU:"^(?!.*east).*germany|^(?=.*\\bfed.*\\brep).*german",GHA:"ghana|gold.?coast",GIB:"gibraltar",GRC:"greece|hellenic|hellas",GRL:"greenland",GRD:"grenada",GLP:"guadeloupe",GUM:"\\bguam",GTM:"guatemala",GGY:"guernsey",GIN:"^(?!.*eq)(?!.*span)(?!.*bissau)(?!.*portu)(?!.*new).*guinea",GNB:"bissau|^(?=.*portu).*guinea",GUY:"guyana|british.?guiana",HTI:"haiti",HMD:"heard.*mcdonald",VAT:"holy.?see|vatican|papal.?st",HND:"^(?!.*brit).*honduras",HKG:"hong.?kong",HUN:"^(?!.*austr).*hungary",ISL:"iceland",IND:"india(?!.*ocea)",IDN:"indonesia",IRN:"\\biran|persia",IRQ:"\\biraq|mesopotamia",IRL:"(^ireland)|(^republic.*ireland)",IMN:"^(?=.*isle).*\\bman",ISR:"israel",ITA:"italy",JAM:"jamaica",JPN:"japan",JEY:"jersey",JOR:"jordan",KAZ:"kazak",KEN:"kenya|british.?east.?africa|east.?africa.?prot",KIR:"kiribati",PRK:"^(?=.*democrat|people|north|d.*p.*.r).*\\bkorea|dprk|korea.*(d.*p.*r)",KWT:"kuwait",KGZ:"kyrgyz|kirghiz",LAO:"\\blaos?\\b",LVA:"latvia",LBN:"lebanon",LSO:"lesotho|basuto",LBR:"liberia",LBY:"libya",LIE:"liechtenstein",LTU:"lithuania",LUX:"^(?!.*belg).*luxem",MAC:"maca(o|u)",MDG:"madagascar|malagasy",MWI:"malawi|nyasa",MYS:"malaysia",MDV:"maldive",MLI:"\\bmali\\b",MLT:"\\bmalta",MHL:"marshall",MTQ:"martinique",MRT:"mauritania",MUS:"mauritius",MYT:"\\bmayotte",MEX:"\\bmexic",FSM:"fed.*micronesia|micronesia.*fed",MCO:"monaco",MNG:"mongolia",MNE:"^(?!.*serbia).*montenegro",MSR:"montserrat",MAR:"morocco|\\bmaroc",MOZ:"mozambique",MMR:"myanmar|burma",NAM:"namibia",NRU:"nauru",NPL:"nepal",NLD:"^(?!.*\\bant)(?!.*\\bcarib).*netherlands",ANT:"^(?=.*\\bant).*(nether|dutch)",NCL:"new.?caledonia",NZL:"new.?zealand",NIC:"nicaragua",NER:"\\bniger(?!ia)",NGA:"nigeria",NIU:"niue",NFK:"norfolk",MNP:"mariana",NOR:"norway",OMN:"\\boman|trucial",PAK:"^(?!.*east).*paki?stan",PLW:"palau",PSE:"palestin|\\bgaza|west.?bank",PAN:"panama",PNG:"papua|new.?guinea",PRY:"paraguay",PER:"peru",PHL:"philippines",PCN:"pitcairn",POL:"poland",PRT:"portugal",PRI:"puerto.?rico",QAT:"qatar",KOR:"^(?!.*d.*p.*r)(?!.*democrat)(?!.*people)(?!.*north).*\\bkorea(?!.*d.*p.*r)",MDA:"moldov|b(a|e)ssarabia",REU:"r(e|\xe9)union",ROU:"r(o|u|ou)mania",RUS:"\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics",RWA:"rwanda",BLM:"barth(e|\xe9)lemy",SHN:"helena",KNA:"kitts|\\bnevis",LCA:"\\blucia",MAF:"^(?=.*collectivity).*martin|^(?=.*france).*martin(?!ique)|^(?=.*french).*martin(?!ique)",SPM:"miquelon",VCT:"vincent",WSM:"^(?!.*amer).*samoa",SMR:"san.?marino",STP:"\\bs(a|\xe3)o.?tom(e|\xe9)",SAU:"\\bsa\\w*.?arabia",SEN:"senegal",SRB:"^(?!.*monte).*serbia",SYC:"seychell",SLE:"sierra",SGP:"singapore",SXM:"^(?!.*martin)(?!.*saba).*maarten",SVK:"^(?!.*cze).*slovak",SVN:"slovenia",SLB:"solomon",SOM:"somali",ZAF:"south.africa|s\\\\..?africa",SGS:"south.?georgia|sandwich",SSD:"\\bs\\w*.?sudan",ESP:"spain",LKA:"sri.?lanka|ceylon",SDN:"^(?!.*\\bs(?!u)).*sudan",SUR:"surinam|dutch.?guiana",SJM:"svalbard",SWZ:"swaziland",SWE:"sweden",CHE:"switz|swiss",SYR:"syria",TWN:"taiwan|taipei|formosa|^(?!.*peo)(?=.*rep).*china",TJK:"tajik",THA:"thailand|\\bsiam",MKD:"macedonia|fyrom",TLS:"^(?=.*leste).*timor|^(?=.*east).*timor",TGO:"togo",TKL:"tokelau",TON:"tonga",TTO:"trinidad|tobago",TUN:"tunisia",TUR:"turkey",TKM:"turkmen",TCA:"turks",TUV:"tuvalu",UGA:"uganda",UKR:"ukrain",ARE:"emirates|^u\\.?a\\.?e\\.?$|united.?arab.?em",GBR:"united.?kingdom|britain|^u\\.?k\\.?$",TZA:"tanzania",USA:"united.?states\\b(?!.*islands)|\\bu\\.?s\\.?a\\.?\\b|^\\s*u\\.?s\\.?\\b(?!.*islands)",UMI:"minor.?outlying.?is",URY:"uruguay",UZB:"uzbek",VUT:"vanuatu|new.?hebrides",VEN:"venezuela",VNM:"^(?!.*republic).*viet.?nam|^(?=.*socialist).*viet.?nam",VGB:"^(?=.*\\bu\\.?\\s?k).*virgin|^(?=.*brit).*virgin|^(?=.*kingdom).*virgin",VIR:"^(?=.*\\bu\\.?\\s?s).*virgin|^(?=.*states).*virgin",WLF:"futuna|wallis",ESH:"western.sahara",YEM:"^(?!.*arab)(?!.*north)(?!.*sana)(?!.*peo)(?!.*dem)(?!.*south)(?!.*aden)(?!.*\\bp\\.?d\\.?r).*yemen",YMD:"^(?=.*peo).*yemen|^(?!.*rep)(?=.*dem).*yemen|^(?=.*south).*yemen|^(?=.*aden).*yemen|^(?=.*\\bp\\.?d\\.?r).*yemen",YUG:"yugoslavia",ZMB:"zambia|northern.?rhodesia",EAZ:"zanzibar",ZWE:"zimbabwe|^(?!.*northern).*rhodesia"}},{}],81:[function(t,e,r){e.exports=["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]},{}],82:[function(t,e,r){e.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]},{}],83:[function(t,e,r){e.exports=["normal","italic","oblique"]},{}],84:[function(t,e,r){e.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]},{}],85:[function(t,e,r){"use strict";e.exports={parse:t("./parse"),stringify:t("./stringify")}},{"./parse":87,"./stringify":88}],86:[function(t,e,r){"use strict";var n=t("css-font-size-keywords");e.exports={isSize:function(t){return/^[\d\.]/.test(t)||-1!==t.indexOf("/")||-1!==n.indexOf(t)}}},{"css-font-size-keywords":81}],87:[function(t,e,r){"use strict";var a=t("unquote"),o=t("css-global-keywords"),s=t("css-system-font-keywords"),l=t("css-font-weight-keywords"),u=t("css-font-style-keywords"),c=t("css-font-stretch-keywords"),f=t("string-split-by"),h=t("./lib/util").isSize,p=(e.exports=n).cache={};function n(t){if("string"!=typeof t)throw new Error("Font argument must be a string.");if(p[t])return p[t];if(""===t)throw new Error("Cannot parse an empty string.");if(-1!==s.indexOf(t))return p[t]={system:t};for(var e,r={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},n=f(t,/\s+/);e=n.shift();){if(-1!==o.indexOf(e))return["style","variant","weight","stretch"].forEach(function(t){r[t]=e}),p[t]=r;if(-1===u.indexOf(e))if("normal"!==e&&"small-caps"!==e)if(-1===c.indexOf(e)){if(-1===l.indexOf(e)){if(h(e)){var i=f(e,"/");if(r.size=i[0],null!=i[1]?r.lineHeight=d(i[1]):"/"===n[0]&&(n.shift(),r.lineHeight=d(n.shift())),!n.length)throw new Error("Missing required font-family.");return r.family=f(n.join(" "),/\s*,\s*/).map(a),p[t]=r}throw new Error("Unknown or unsupported font token: "+e)}r.weight=e}else r.stretch=e;else r.variant=e;else r.style=e}throw new Error("Missing required font-size.")}function d(t){var e=parseFloat(t);return e.toString()===t?e:t}},{"./lib/util":86,"css-font-stretch-keywords":82,"css-font-style-keywords":83,"css-font-weight-keywords":84,"css-global-keywords":89,"css-system-font-keywords":90,"string-split-by":1344,unquote:1365}],88:[function(t,e,r){"use strict";var n=t("pick-by-alias"),i=t("./lib/util").isSize,a=m(t("css-global-keywords")),o=m(t("css-system-font-keywords")),s=m(t("css-font-weight-keywords")),l=m(t("css-font-style-keywords")),u=m(t("css-font-stretch-keywords")),c={normal:1,"small-caps":1},f={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},h="1rem",p="serif";function d(t,e){if(t&&!e[t]&&!a[t])throw Error("Unknown keyword `"+t+"`");return t}function m(t){for(var e={},r=0;r<t.length;r++)e[t[r]]=1;return e}e.exports=function(t){if((t=n(t,{style:"style fontstyle fontStyle font-style slope distinction",variant:"variant font-variant fontVariant fontvariant var capitalization",weight:"weight w font-weight fontWeight fontweight",stretch:"stretch font-stretch fontStretch fontstretch width",size:"size s font-size fontSize fontsize height em emSize",lineHeight:"lh line-height lineHeight lineheight leading",family:"font family fontFamily font-family fontfamily type typeface face",system:"system reserved default global"})).system)return t.system&&d(t.system,o),t.system;if(d(t.style,l),d(t.variant,c),d(t.weight,s),d(t.stretch,u),null==t.size&&(t.size=h),"number"==typeof t.size&&(t.size+="px"),!i)throw Error("Bad size value `"+t.size+"`");t.family||(t.family=p),Array.isArray(t.family)&&(t.family.length||(t.family=[p]),t.family=t.family.map(function(t){return f[t]?t:'"'+t+'"'}).join(", "));var e=[];return e.push(t.style),t.variant!==t.style&&e.push(t.variant),t.weight!==t.variant&&t.weight!==t.style&&e.push(t.weight),t.stretch!==t.weight&&t.stretch!==t.variant&&t.stretch!==t.style&&e.push(t.stretch),e.push(t.size+(null==t.lineHeight||"normal"===t.lineHeight||t.lineHeight+""=="1"?"":"/"+t.lineHeight)),e.push(t.family),e.filter(Boolean).join(" ")}},{"./lib/util":86,"css-font-stretch-keywords":82,"css-font-style-keywords":83,"css-font-weight-keywords":84,"css-global-keywords":89,"css-system-font-keywords":90,"pick-by-alias":637}],89:[function(t,e,r){e.exports=["inherit","initial","unset"]},{}],90:[function(t,e,r){e.exports=["caption","icon","menu","message-box","small-caption","status-bar"]},{}],91:[function(t,e,r){"use strict";e.exports=function(t,e,r,n,i,a){var o=i-1,s=i*i,l=o*o,u=(1+2*i)*l,c=i*l,f=s*(3-2*i),h=s*o;if(t.length){a||(a=new Array(t.length));for(var p=t.length-1;0<=p;--p)a[p]=u*t[p]+c*e[p]+f*r[p]+h*n[p];return a}return u*t+c*e+f*r+h*n},e.exports.derivative=function(t,e,r,n,i,a){var o=6*i*i-6*i,s=3*i*i-4*i+1,l=-6*i*i+6*i,u=3*i*i-2*i;if(t.length){a||(a=new Array(t.length));for(var c=t.length-1;0<=c;--c)a[c]=o*t[c]+s*e[c]+l*r[c]+u*n[c];return a}return o*t+s*e+l*r[c]+u*n}},{}],92:[function(t,e,r){"use strict";var a=t("./lib/thunk.js");e.exports=function(t){var e=new function(){this.argTypes=[],this.shimArgs=[],this.arrayArgs=[],this.arrayBlockIndices=[],this.scalarArgs=[],this.offsetArgs=[],this.offsetArgIndex=[],this.indexArgs=[],this.shapeArgs=[],this.funcName="",this.pre=null,this.body=null,this.post=null,this.debug=!1};e.pre=t.pre,e.body=t.body,e.post=t.post;var r=t.args.slice(0);e.argTypes=r;for(var n=0;n<r.length;++n){var i=r[n];if("array"===i||"object"==typeof i&&i.blockIndices){if(e.argTypes[n]="array",e.arrayArgs.push(n),e.arrayBlockIndices.push(i.blockIndices?i.blockIndices:0),e.shimArgs.push("array"+n),n<e.pre.args.length&&0<e.pre.args[n].count)throw new Error("cwise: pre() block may not reference array args");if(n<e.post.args.length&&0<e.post.args[n].count)throw new Error("cwise: post() block may not reference array args")}else if("scalar"===i)e.scalarArgs.push(n),e.shimArgs.push("scalar"+n);else if("index"===i){if(e.indexArgs.push(n),n<e.pre.args.length&&0<e.pre.args[n].count)throw new Error("cwise: pre() block may not reference array index");if(n<e.body.args.length&&e.body.args[n].lvalue)throw new Error("cwise: body() block may not write to array index");if(n<e.post.args.length&&0<e.post.args[n].count)throw new Error("cwise: post() block may not reference array index")}else if("shape"===i){if(e.shapeArgs.push(n),n<e.pre.args.length&&e.pre.args[n].lvalue)throw new Error("cwise: pre() block may not write to array shape");if(n<e.body.args.length&&e.body.args[n].lvalue)throw new Error("cwise: body() block may not write to array shape");if(n<e.post.args.length&&e.post.args[n].lvalue)throw new Error("cwise: post() block may not write to array shape")}else{if("object"!=typeof i||!i.offset)throw new Error("cwise: Unknown argument type "+r[n]);e.argTypes[n]="offset",e.offsetArgs.push({array:i.array,offset:i.offset}),e.offsetArgIndex.push(n)}}if(e.arrayArgs.length<=0)throw new Error("cwise: No array arguments specified");if(e.pre.args.length>r.length)throw new Error("cwise: Too many arguments in pre() block");if(e.body.args.length>r.length)throw new Error("cwise: Too many arguments in body() block");if(e.post.args.length>r.length)throw new Error("cwise: Too many arguments in post() block");return e.debug=!!t.printCode||!!t.debug,e.funcName=t.funcName||"cwise",e.blockSize=t.blockSize||64,a(e)}},{"./lib/thunk.js":94}],93:[function(t,e,r){"use strict";var M=t("uniq");function A(t,e,r){var n,i,a=t.length,o=e.arrayArgs.length,s=0<e.indexArgs.length,l=[],u=[],c=0,f=0;for(n=0;n<a;++n)u.push(["i",n,"=0"].join(""));for(i=0;i<o;++i)for(n=0;n<a;++n)f=c,c=t[n],0===n?u.push(["d",i,"s",n,"=t",i,"p",c].join("")):u.push(["d",i,"s",n,"=(t",i,"p",c,"-s",f,"*t",i,"p",f,")"].join(""));for(0<u.length&&l.push("var "+u.join(",")),n=a-1;0<=n;--n)c=t[n],l.push(["for(i",n,"=0;i",n,"<s",c,";++i",n,"){"].join(""));for(l.push(r),n=0;n<a;++n){for(f=c,c=t[n],i=0;i<o;++i)l.push(["p",i,"+=d",i,"s",n].join(""));s&&(0<n&&l.push(["index[",f,"]-=s",f].join("")),l.push(["++index[",c,"]"].join(""))),l.push("}")}return l.join("\n")}function k(t,e,r){for(var n=t.body,i=[],a=[],o=0;o<t.args.length;++o){var s=t.args[o];if(!(s.count<=0)){var l=new RegExp(s.name,"g"),u="",c=e.arrayArgs.indexOf(o);switch(e.argTypes[o]){case"offset":var f=e.offsetArgIndex.indexOf(o);c=e.offsetArgs[f].array,u="+q"+f;case"array":u="p"+c+u;var h="l"+o,p="a"+c;if(0===e.arrayBlockIndices[c])1===s.count?"generic"===r[c]?s.lvalue?(i.push(["var ",h,"=",p,".get(",u,")"].join("")),n=n.replace(l,h),a.push([p,".set(",u,",",h,")"].join(""))):n=n.replace(l,[p,".get(",u,")"].join("")):n=n.replace(l,[p,"[",u,"]"].join("")):"generic"===r[c]?(i.push(["var ",h,"=",p,".get(",u,")"].join("")),n=n.replace(l,h),s.lvalue&&a.push([p,".set(",u,",",h,")"].join(""))):(i.push(["var ",h,"=",p,"[",u,"]"].join("")),n=n.replace(l,h),s.lvalue&&a.push([p,"[",u,"]=",h].join("")));else{for(var d=[s.name],m=[u],g=0;g<Math.abs(e.arrayBlockIndices[c]);g++)d.push("\\s*\\[([^\\]]+)\\]"),m.push("$"+(g+1)+"*t"+c+"b"+g);if(l=new RegExp(d.join(""),"g"),u=m.join("+"),"generic"===r[c])throw new Error("cwise: Generic arrays not supported in combination with blocks!");n=n.replace(l,[p,"[",u,"]"].join(""))}break;case"scalar":n=n.replace(l,"Y"+e.scalarArgs.indexOf(o));break;case"index":n=n.replace(l,"index");break;case"shape":n=n.replace(l,"shape")}}}return[i.join("\n"),n,a.join("\n")].join("\n").trim()}e.exports=function(t,e){for(var r=e[1].length-Math.abs(t.arrayBlockIndices[0])|0,n=new Array(t.arrayArgs.length),i=new Array(t.arrayArgs.length),a=0;a<t.arrayArgs.length;++a)i[a]=e[2*a],n[a]=e[2*a+1];var o=[],s=[],l=[],u=[],c=[];for(a=0;a<t.arrayArgs.length;++a){t.arrayBlockIndices[a]<0?(l.push(0),u.push(r),o.push(r),s.push(r+t.arrayBlockIndices[a])):(l.push(t.arrayBlockIndices[a]),u.push(t.arrayBlockIndices[a]+r),o.push(0),s.push(t.arrayBlockIndices[a]));for(var f=[],h=0;h<n[a].length;h++)l[a]<=n[a][h]&&n[a][h]<u[a]&&f.push(n[a][h]-l[a]);c.push(f)}var p=["SS"],d=["'use strict'"],m=[];for(h=0;h<r;++h)m.push(["s",h,"=SS[",h,"]"].join(""));for(a=0;a<t.arrayArgs.length;++a){for(p.push("a"+a),p.push("t"+a),p.push("p"+a),h=0;h<r;++h)m.push(["t",a,"p",h,"=t",a,"[",l[a]+h,"]"].join(""));for(h=0;h<Math.abs(t.arrayBlockIndices[a]);++h)m.push(["t",a,"b",h,"=t",a,"[",o[a]+h,"]"].join(""))}for(a=0;a<t.scalarArgs.length;++a)p.push("Y"+a);if(0<t.shapeArgs.length&&m.push("shape=SS.slice(0)"),0<t.indexArgs.length){var g=new Array(r);for(a=0;a<r;++a)g[a]="0";m.push(["index=[",g.join(","),"]"].join(""))}for(a=0;a<t.offsetArgs.length;++a){var v=t.offsetArgs[a],y=[];for(h=0;h<v.offset.length;++h)0!==v.offset[h]&&(1===v.offset[h]?y.push(["t",v.array,"p",h].join("")):y.push([v.offset[h],"*t",v.array,"p",h].join("")));0===y.length?m.push("q"+a+"=0"):m.push(["q",a,"=",y.join("+")].join(""))}var x=M([].concat(t.pre.thisVars).concat(t.body.thisVars).concat(t.post.thisVars));for(0<(m=m.concat(x)).length&&d.push("var "+m.join(",")),a=0;a<t.arrayArgs.length;++a)d.push("p"+a+"|=0");3<t.pre.body.length&&d.push(k(t.pre,t,i));var b=k(t.body,t,i),_=function(t){for(var e=0,r=t[0].length;e<r;){for(var n=1;n<t.length;++n)if(t[n][e]!==t[0][e])return e;++e}return e}(c);_<r?d.push(function(t,e,r,n){for(var i=e.length,a=r.arrayArgs.length,o=r.blockSize,s=0<r.indexArgs.length,l=[],u=0;u<a;++u)l.push(["var offset",u,"=p",u].join(""));for(u=t;u<i;++u)l.push(["for(var j"+u+"=SS[",e[u],"]|0;j",u,">0;){"].join("")),l.push(["if(j",u,"<",o,"){"].join("")),l.push(["s",e[u],"=j",u].join("")),l.push(["j",u,"=0"].join("")),l.push(["}else{s",e[u],"=",o].join("")),l.push(["j",u,"-=",o,"}"].join("")),s&&l.push(["index[",e[u],"]=j",u].join(""));for(u=0;u<a;++u){for(var c=["offset"+u],f=t;f<i;++f)c.push(["j",f,"*t",u,"p",e[f]].join(""));l.push(["p",u,"=(",c.join("+"),")"].join(""))}for(l.push(A(e,r,n)),u=t;u<i;++u)l.push("}");return l.join("\n")}(_,c[0],t,b)):d.push(A(c[0],t,b)),3<t.post.body.length&&d.push(k(t.post,t,i)),t.debug&&console.log("-----Generated cwise routine for ",e,":\n"+d.join("\n")+"\n----------");var w=[t.funcName||"unnamed","_cwise_loop_",n[0].join("s"),"m",_,function(t){for(var e=new Array(t.length),r=!0,n=0;n<t.length;++n){var i=t[n],a=i.match(/\d+/);a=a?a[0]:"",0===i.charAt(0)?e[n]="u"+i.charAt(1)+a:e[n]=i.charAt(0)+a,0<n&&(r=r&&e[n]===e[n-1])}return r?e[0]:e.join("")}(i)].join("");return new Function(["function ",w,"(",p.join(","),"){",d.join("\n"),"} return ",w].join(""))()}},{uniq:1364}],94:[function(t,e,r){"use strict";var f=t("./compile.js");e.exports=function(t){var e=["'use strict'","var CACHED={}"],r=[],n=t.funcName+"_cwise_thunk";e.push(["return function ",n,"(",t.shimArgs.join(","),"){"].join(""));for(var i=[],a=[],o=[["array",t.arrayArgs[0],".shape.slice(",Math.max(0,t.arrayBlockIndices[0]),t.arrayBlockIndices[0]<0?","+t.arrayBlockIndices[0]+")":")"].join("")],s=[],l=[],u=0;u<t.arrayArgs.length;++u){var c=t.arrayArgs[u];r.push(["t",c,"=array",c,".dtype,","r",c,"=array",c,".order"].join("")),i.push("t"+c),i.push("r"+c),a.push("t"+c),a.push("r"+c+".join()"),o.push("array"+c+".data"),o.push("array"+c+".stride"),o.push("array"+c+".offset|0"),0<u&&(s.push("array"+t.arrayArgs[0]+".shape.length===array"+c+".shape.length+"+(Math.abs(t.arrayBlockIndices[0])-Math.abs(t.arrayBlockIndices[u]))),l.push("array"+t.arrayArgs[0]+".shape[shapeIndex+"+Math.max(0,t.arrayBlockIndices[0])+"]===array"+c+".shape[shapeIndex+"+Math.max(0,t.arrayBlockIndices[u])+"]"))}for(1<t.arrayArgs.length&&(e.push("if (!("+s.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same dimensionality!')"),e.push("for(var shapeIndex=array"+t.arrayArgs[0]+".shape.length-"+Math.abs(t.arrayBlockIndices[0])+"; shapeIndex--\x3e0;) {"),e.push("if (!("+l.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same shape!')"),e.push("}")),u=0;u<t.scalarArgs.length;++u)o.push("scalar"+t.scalarArgs[u]);return r.push(["type=[",a.join(","),"].join()"].join("")),r.push("proc=CACHED[type]"),e.push("var "+r.join(",")),e.push(["if(!proc){","CACHED[type]=proc=compile([",i.join(","),"])}","return proc(",o.join(","),")}"].join("")),t.debug&&console.log("-----Generated thunk:\n"+e.join("\n")+"\n----------"),new Function("compile",e.join("\n"))(f.bind(void 0,t))}},{"./compile.js":93}],95:[function(t,e,r){e.exports=t("cwise-compiler")},{"cwise-compiler":92}],96:[function(t,e,r){"use strict";var n,a=t("es5-ext/object/copy"),i=t("es5-ext/object/normalize-options"),o=t("es5-ext/object/valid-callable"),s=t("es5-ext/object/map"),l=t("es5-ext/object/valid-callable"),u=t("es5-ext/object/valid-value"),c=Function.prototype.bind,f=Object.defineProperty,h=Object.prototype.hasOwnProperty;n=function(t,e,r){var n,i=u(e)&&l(e.value);return delete(n=a(e)).writable,delete n.value,n.get=function(){return!r.overwriteDefinition&&h.call(this,t)?i:(e.value=c.call(i,r.resolveContext?r.resolveContext(this):this),f(this,t,e),this[t])},n},e.exports=function(t){var r=i(arguments[1]);return null!=r.resolveContext&&o(r.resolveContext),s(t,function(t,e){return n(e,t,r)})}},{"es5-ext/object/copy":134,"es5-ext/object/map":143,"es5-ext/object/normalize-options":144,"es5-ext/object/valid-callable":148,"es5-ext/object/valid-value":150}],97:[function(t,e,r){"use strict";var s=t("es5-ext/object/assign"),l=t("es5-ext/object/normalize-options"),u=t("es5-ext/object/is-callable"),c=t("es5-ext/string/#/contains");(e.exports=function(t,e){var r,n,i,a,o;return arguments.length<2||"string"!=typeof t?(a=e,e=t,t=null):a=arguments[2],null==t?(r=i=!0,n=!1):(r=c.call(t,"c"),n=c.call(t,"e"),i=c.call(t,"w")),o={value:e,configurable:r,enumerable:n,writable:i},a?s(l(a),o):o}).gs=function(t,e,r){var n,i,a,o;return"string"!=typeof t?(a=r,r=e,e=t,t=null):a=arguments[3],null==e?e=void 0:u(e)?null==r?r=void 0:u(r)||(a=r,r=void 0):(a=e,e=r=void 0),null==t?i=!(n=!0):(n=c.call(t,"c"),i=c.call(t,"e")),o={get:e,set:r,configurable:n,enumerable:i},a?s(l(a),o):o}},{"es5-ext/object/assign":131,"es5-ext/object/is-callable":137,"es5-ext/object/normalize-options":144,"es5-ext/string/#/contains":151}],98:[function(t,e,r){var n;n=this,function(t){"use strict";var s=function(t,e){return t<e?-1:e<t?1:e<=t?0:NaN},e=function(a){var r;return 1===a.length&&(r=a,a=function(t,e){return s(r(t),e)}),{left:function(t,e,r,n){for(null==r&&(r=0),null==n&&(n=t.length);r<n;){var i=r+n>>>1;a(t[i],e)<0?r=i+1:n=i}return r},right:function(t,e,r,n){for(null==r&&(r=0),null==n&&(n=t.length);r<n;){var i=r+n>>>1;0<a(t[i],e)?n=i:r=i+1}return r}}};var r=e(s),m=r.right,n=r.left;function c(t,e){return[t,e]}var u=function(t){return null===t?NaN:+t},i=function(t,e){var r,n,i=t.length,a=0,o=-1,s=0,l=0;if(null==e)for(;++o<i;)isNaN(r=u(t[o]))||(l+=(n=r-s)*(r-(s+=n/++a)));else for(;++o<i;)isNaN(r=u(e(t[o],o,t)))||(l+=(n=r-s)*(r-(s+=n/++a)));if(1<a)return l/(a-1)},a=function(t,e){var r=i(t,e);return r?Math.sqrt(r):r},o=function(t,e){var r,n,i,a=t.length,o=-1;if(null==e){for(;++o<a;)if(null!=(r=t[o])&&r<=r)for(n=i=r;++o<a;)null!=(r=t[o])&&(r<n&&(n=r),i<r&&(i=r))}else for(;++o<a;)if(null!=(r=e(t[o],o,t))&&r<=r)for(n=i=r;++o<a;)null!=(r=e(t[o],o,t))&&(r<n&&(n=r),i<r&&(i=r));return[n,i]},l=Array.prototype,f=l.slice,h=l.map,g=function(t){return function(){return t}},v=function(t){return t},y=function(t,e,r){t=+t,e=+e,r=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+r;for(var n=-1,i=0|Math.max(0,Math.ceil((e-t)/r)),a=new Array(i);++n<i;)a[n]=t+n*r;return a},p=Math.sqrt(50),d=Math.sqrt(10),x=Math.sqrt(2);function b(t,e,r){var n=(e-t)/Math.max(0,r),i=Math.floor(Math.log(n)/Math.LN10),a=n/Math.pow(10,i);return 0<=i?(p<=a?10:d<=a?5:x<=a?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(p<=a?10:d<=a?5:x<=a?2:1)}function _(t,e,r){var n=Math.abs(e-t)/Math.max(0,r),i=Math.pow(10,Math.floor(Math.log(n)/Math.LN10)),a=n/i;return p<=a?i*=10:d<=a?i*=5:x<=a&&(i*=2),e<t?-i:i}var w=function(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1},M=function(t,e,r){if(null==r&&(r=u),n=t.length){if((e=+e)<=0||n<2)return+r(t[0],0,t);if(1<=e)return+r(t[n-1],n-1,t);var n,i=(n-1)*e,a=Math.floor(i),o=+r(t[a],a,t);return o+(+r(t[a+1],a+1,t)-o)*(i-a)}},A=function(t,e){var r,n,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(r=t[a])&&r<=r)for(n=r;++a<i;)null!=(r=t[a])&&r<n&&(n=r)}else for(;++a<i;)if(null!=(r=e(t[a],a,t))&&r<=r)for(n=r;++a<i;)null!=(r=e(t[a],a,t))&&r<n&&(n=r);return n},k=function(t){if(!(i=t.length))return[];for(var e=-1,r=A(t,T),n=new Array(r);++e<r;)for(var i,a=-1,o=n[e]=new Array(i);++a<i;)o[a]=t[a][e];return n};function T(t){return t.length}t.bisect=m,t.bisectRight=m,t.bisectLeft=n,t.ascending=s,t.bisector=e,t.cross=function(t,e,r){var n,i,a,o,s=t.length,l=e.length,u=new Array(s*l);for(null==r&&(r=c),n=a=0;n<s;++n)for(o=t[n],i=0;i<l;++i,++a)u[a]=r(o,e[i]);return u},t.descending=function(t,e){return e<t?-1:t<e?1:t<=e?0:NaN},t.deviation=a,t.extent=o,t.histogram=function(){var h=v,p=o,d=w;function e(t){var e,r,n=t.length,i=new Array(n);for(e=0;e<n;++e)i[e]=h(t[e],e,t);var a=p(i),o=a[0],s=a[1],l=d(i,o,s);Array.isArray(l)||(l=_(o,s,l),l=y(Math.ceil(o/l)*l,Math.floor(s/l)*l,l));for(var u=l.length;l[0]<=o;)l.shift(),--u;for(;l[u-1]>s;)l.pop(),--u;var c,f=new Array(u+1);for(e=0;e<=u;++e)(c=f[e]=[]).x0=0<e?l[e-1]:o,c.x1=e<u?l[e]:s;for(e=0;e<n;++e)o<=(r=i[e])&&r<=s&&f[m(l,r,0,u)].push(t[e]);return f}return e.value=function(t){return arguments.length?(h="function"==typeof t?t:g(t),e):h},e.domain=function(t){return arguments.length?(p="function"==typeof t?t:g([t[0],t[1]]),e):p},e.thresholds=function(t){return arguments.length?(d="function"==typeof t?t:Array.isArray(t)?g(f.call(t)):g(t),e):d},e},t.thresholdFreedmanDiaconis=function(t,e,r){return t=h.call(t,u).sort(s),Math.ceil((r-e)/(2*(M(t,.75)-M(t,.25))*Math.pow(t.length,-1/3)))},t.thresholdScott=function(t,e,r){return Math.ceil((r-e)/(3.5*a(t)*Math.pow(t.length,-1/3)))},t.thresholdSturges=w,t.max=function(t,e){var r,n,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(r=t[a])&&r<=r)for(n=r;++a<i;)null!=(r=t[a])&&n<r&&(n=r)}else for(;++a<i;)if(null!=(r=e(t[a],a,t))&&r<=r)for(n=r;++a<i;)null!=(r=e(t[a],a,t))&&n<r&&(n=r);return n},t.mean=function(t,e){var r,n=t.length,i=n,a=-1,o=0;if(null==e)for(;++a<n;)isNaN(r=u(t[a]))?--i:o+=r;else for(;++a<n;)isNaN(r=u(e(t[a],a,t)))?--i:o+=r;if(i)return o/i},t.median=function(t,e){var r,n=t.length,i=-1,a=[];if(null==e)for(;++i<n;)isNaN(r=u(t[i]))||a.push(r);else for(;++i<n;)isNaN(r=u(e(t[i],i,t)))||a.push(r);return M(a.sort(s),.5)},t.merge=function(t){for(var e,r,n,i=t.length,a=-1,o=0;++a<i;)o+=t[a].length;for(r=new Array(o);0<=--i;)for(e=(n=t[i]).length;0<=--e;)r[--o]=n[e];return r},t.min=A,t.pairs=function(t,e){null==e&&(e=c);for(var r=0,n=t.length-1,i=t[0],a=new Array(n<0?0:n);r<n;)a[r]=e(i,i=t[++r]);return a},t.permute=function(t,e){for(var r=e.length,n=new Array(r);r--;)n[r]=t[e[r]];return n},t.quantile=M,t.range=y,t.scan=function(t,e){if(r=t.length){var r,n,i=0,a=0,o=t[a];for(null==e&&(e=s);++i<r;)(e(n=t[i],o)<0||0!==e(o,o))&&(o=n,a=i);return 0===e(o,o)?a:void 0}},t.shuffle=function(t,e,r){for(var n,i,a=(null==r?t.length:r)-(e=null==e?0:+e);a;)i=Math.random()*a--|0,n=t[a+e],t[a+e]=t[i+e],t[i+e]=n;return t},t.sum=function(t,e){var r,n=t.length,i=-1,a=0;if(null==e)for(;++i<n;)(r=+t[i])&&(a+=r);else for(;++i<n;)(r=+e(t[i],i,t))&&(a+=r);return a},t.ticks=function(t,e,r){var n,i,a,o,s=-1;if(r=+r,(t=+t)==(e=+e)&&0<r)return[t];if((n=e<t)&&(i=t,t=e,e=i),0===(o=b(t,e,r))||!isFinite(o))return[];if(0<o)for(t=Math.ceil(t/o),e=Math.floor(e/o),a=new Array(i=Math.ceil(e-t+1));++s<i;)a[s]=(t+s)*o;else for(t=Math.floor(t*o),e=Math.ceil(e*o),a=new Array(i=Math.ceil(t-e+1));++s<i;)a[s]=(t-s)/o;return n&&a.reverse(),a},t.tickIncrement=b,t.tickStep=_,t.transpose=k,t.variance=i,t.zip=function(){return k(arguments)},Object.defineProperty(t,"__esModule",{value:!0})}("object"==typeof r&&"undefined"!=typeof e?r:n.d3=n.d3||{})},{}],99:[function(t,e,r){var n;n=this,function(t){"use strict";function s(){}function g(t,e){var r=new s;if(t instanceof s)t.each(function(t,e){r.set(e,t)});else if(Array.isArray(t)){var n,i=-1,a=t.length;if(null==e)for(;++i<a;)r.set(i,t[i]);else for(;++i<a;)r.set(e(n=t[i],i,t),n)}else if(t)for(var o in t)r.set(o,t[o]);return r}s.prototype=g.prototype={constructor:s,has:function(t){return"$"+t in this},get:function(t){return this["$"+t]},set:function(t,e){return this["$"+t]=e,this},remove:function(t){var e="$"+t;return e in this&&delete this[e]},clear:function(){for(var t in this)"$"===t[0]&&delete this[t]},keys:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)"$"===e[0]&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)"$"===e[0]&&++t;return t},empty:function(){for(var t in this)if("$"===t[0])return!1;return!0},each:function(t){for(var e in this)"$"===e[0]&&t(this[e],e.slice(1),this)}};function r(){return{}}function n(t,e,r){t[e]=r}function i(){return g()}function a(t,e,r){t.set(e,r)}function o(){}var e=g.prototype;function l(t,e){var r=new o;if(t instanceof o)t.each(function(t){r.add(t)});else if(t){var n=-1,i=t.length;if(null==e)for(;++n<i;)r.add(t[n]);else for(;++n<i;)r.add(e(t[n],n,t))}return r}o.prototype=l.prototype={constructor:o,has:e.has,add:function(t){return this["$"+(t+="")]=t,this},remove:e.remove,clear:e.clear,values:e.keys,size:e.size,empty:e.empty,each:e.each};t.nest=function(){var h,p,e,d=[],o=[];function m(t,r,n,i){if(r>=d.length)return null!=h&&t.sort(h),null!=p?p(t):t;for(var e,a,o,s=-1,l=t.length,u=d[r++],c=g(),f=n();++s<l;)(o=c.get(e=u(a=t[s])+""))?o.push(a):c.set(e,[a]);return c.each(function(t,e){i(f,e,m(t,r,n,i))}),f}return e={object:function(t){return m(t,0,r,n)},map:function(t){return m(t,0,i,a)},entries:function(t){return function r(t,n){if(++n>d.length)return t;var i,a=o[n-1];return null!=p&&n>=d.length?i=t.entries():(i=[],t.each(function(t,e){i.push({key:e,values:r(t,n)})})),null!=a?i.sort(function(t,e){return a(t.key,e.key)}):i}(m(t,0,i,a),0)},key:function(t){return d.push(t),e},sortKeys:function(t){return o[d.length-1]=t,e},sortValues:function(t){return h=t,e},rollup:function(t){return p=t,e}}},t.set=l,t.map=g,t.keys=function(t){var e=[];for(var r in t)e.push(r);return e},t.values=function(t){var e=[];for(var r in t)e.push(t[r]);return e},t.entries=function(t){var e=[];for(var r in t)e.push({key:r,value:t[r]});return e},Object.defineProperty(t,"__esModule",{value:!0})}("object"==typeof r&&"undefined"!=typeof e?r:n.d3=n.d3||{})},{}],100:[function(t,e,r){var n;n=this,function(t){"use strict";var e=function(t,e,r){t.prototype=e.prototype=r,r.constructor=t};function r(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}function u(){}var n="\\s*([+-]?\\d+)\\s*",i="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",a="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",o=/^#([0-9a-f]{3})$/,s=/^#([0-9a-f]{6})$/,l=new RegExp("^rgb\\("+[n,n,n]+"\\)$"),c=new RegExp("^rgb\\("+[a,a,a]+"\\)$"),f=new RegExp("^rgba\\("+[n,n,n,i]+"\\)$"),h=new RegExp("^rgba\\("+[a,a,a,i]+"\\)$"),p=new RegExp("^hsl\\("+[i,a,a]+"\\)$"),d=new RegExp("^hsla\\("+[i,a,a,i]+"\\)$"),m={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function g(t){var e;return t=(t+"").trim().toLowerCase(),(e=o.exec(t))?new _((e=parseInt(e[1],16))>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):(e=s.exec(t))?v(parseInt(e[1],16)):(e=l.exec(t))?new _(e[1],e[2],e[3],1):(e=c.exec(t))?new _(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=f.exec(t))?y(e[1],e[2],e[3],e[4]):(e=h.exec(t))?y(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=p.exec(t))?w(e[1],e[2]/100,e[3]/100,1):(e=d.exec(t))?w(e[1],e[2]/100,e[3]/100,e[4]):m.hasOwnProperty(t)?v(m[t]):"transparent"===t?new _(NaN,NaN,NaN,0):null}function v(t){return new _(t>>16&255,t>>8&255,255&t,1)}function y(t,e,r,n){return n<=0&&(t=e=r=NaN),new _(t,e,r,n)}function x(t){return t instanceof u||(t=g(t)),t?new _((t=t.rgb()).r,t.g,t.b,t.opacity):new _}function b(t,e,r,n){return 1===arguments.length?x(t):new _(t,e,r,null==n?1:n)}function _(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}function w(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||1<=r?t=e=NaN:e<=0&&(t=NaN),new A(t,e,r,n)}function M(t,e,r,n){return 1===arguments.length?function(t){if(t instanceof A)return new A(t.h,t.s,t.l,t.opacity);if(t instanceof u||(t=g(t)),!t)return new A;if(t instanceof A)return t;var e=(t=t.rgb()).r/255,r=t.g/255,n=t.b/255,i=Math.min(e,r,n),a=Math.max(e,r,n),o=NaN,s=a-i,l=(a+i)/2;return s?(o=e===a?(r-n)/s+6*(r<n):r===a?(n-e)/s+2:(e-r)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=0<l&&l<1?0:o,new A(o,s,l,t.opacity)}(t):new A(t,e,r,null==n?1:n)}function A(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}function k(t,e,r){return 255*(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)}e(u,g,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+""}}),e(_,b,r(u,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new _(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new _(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},toString:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}})),e(A,M,r(u,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new A(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new A(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,i=2*r-n;return new _(k(240<=t?t-240:t+120,i,n),k(t,i,n),k(t<120?t+240:t-120,i,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var T=Math.PI/180,E=180/Math.PI,S=.95047,C=1,L=1.08883,z=4/29,O=6/29,P=3*O*O,I=O*O*O;function D(t){if(t instanceof R)return new R(t.l,t.a,t.b,t.opacity);if(t instanceof q){var e=t.h*T;return new R(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}t instanceof _||(t=x(t));var r=U(t.r),n=U(t.g),i=U(t.b),a=B((.4124564*r+.3575761*n+.1804375*i)/S),o=B((.2126729*r+.7151522*n+.072175*i)/C);return new R(116*o-16,500*(a-o),200*(o-B((.0193339*r+.119192*n+.9503041*i)/L)),t.opacity)}function N(t,e,r,n){return 1===arguments.length?D(t):new R(t,e,r,null==n?1:n)}function R(t,e,r,n){this.l=+t,this.a=+e,this.b=+r,this.opacity=+n}function B(t){return I<t?Math.pow(t,1/3):t/P+z}function F(t){return O<t?t*t*t:P*(t-z)}function j(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function U(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function V(t,e,r,n){return 1===arguments.length?function(t){if(t instanceof q)return new q(t.h,t.c,t.l,t.opacity);t instanceof R||(t=D(t));var e=Math.atan2(t.b,t.a)*E;return new q(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}(t):new q(t,e,r,null==n?1:n)}function q(t,e,r,n){this.h=+t,this.c=+e,this.l=+r,this.opacity=+n}e(R,N,r(u,{brighter:function(t){return new R(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new R(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,r=isNaN(this.b)?t:t-this.b/200;return t=C*F(t),new _(j(3.2404542*(e=S*F(e))-1.5371385*t-.4985314*(r=L*F(r))),j(-.969266*e+1.8760108*t+.041556*r),j(.0556434*e-.2040259*t+1.0572252*r),this.opacity)}})),e(q,V,r(u,{brighter:function(t){return new q(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new q(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return D(this).rgb()}}));var H=-.29227,G=-.90649,W=1.97294,Y=W*G,Z=1.78277*W,X=1.78277*H- -.14861*G;function $(t,e,r,n){return 1===arguments.length?function(t){if(t instanceof J)return new J(t.h,t.s,t.l,t.opacity);t instanceof _||(t=x(t));var e=t.r/255,r=t.g/255,n=t.b/255,i=(X*n+Y*e-Z*r)/(X+Y-Z),a=n-i,o=(W*(r-i)-H*a)/G,s=Math.sqrt(o*o+a*a)/(W*i*(1-i)),l=s?Math.atan2(o,a)*E-120:NaN;return new J(l<0?l+360:l,s,i,t.opacity)}(t):new J(t,e,r,null==n?1:n)}function J(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}e(J,$,r(u,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new J(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new J(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*T,e=+this.l,r=isNaN(this.s)?0:this.s*e*(1-e),n=Math.cos(t),i=Math.sin(t);return new _(255*(e+r*(-.14861*n+1.78277*i)),255*(e+r*(H*n+G*i)),255*(e+r*(W*n)),this.opacity)}})),t.color=g,t.rgb=b,t.hsl=M,t.lab=N,t.hcl=V,t.cubehelix=$,Object.defineProperty(t,"__esModule",{value:!0})}("object"==typeof r&&"undefined"!=typeof e?r:n.d3=n.d3||{})},{}],101:[function(t,e,r){var n;n=this,function(t){"use strict";var a={value:function(){}};function e(){for(var t,e=0,r=arguments.length,n={};e<r;++e){if(!(t=arguments[e]+"")||t in n)throw new Error("illegal type: "+t);n[t]=[]}return new i(n)}function i(t){this._=t}function l(t,e){for(var r,n=0,i=t.length;n<i;++n)if((r=t[n]).name===e)return r.value}function u(t,e,r){for(var n=0,i=t.length;n<i;++n)if(t[n].name===e){t[n]=a,t=t.slice(0,n).concat(t.slice(n+1));break}return null!=r&&t.push({name:e,value:r}),t}i.prototype=e.prototype={constructor:i,on:function(t,e){var r,n,i=this._,a=(n=i,(t+"").trim().split(/^|\s+/).map(function(t){var e="",r=t.indexOf(".");if(0<=r&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})),o=-1,s=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<s;)if(r=(t=a[o]).type)i[r]=u(i[r],t.name,e);else if(null==e)for(r in i)i[r]=u(i[r],t.name,null);return this}for(;++o<s;)if((r=(t=a[o]).type)&&(r=l(i[r],t.name)))return r},copy:function(){var t={},e=this._;for(var r in e)t[r]=e[r].slice();return new i(t)},call:function(t,e){if(0<(r=arguments.length-2))for(var r,n,i=new Array(r),a=0;a<r;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,r=(n=this._[t]).length;a<r;++a)n[a].value.apply(e,i)},apply:function(t,e,r){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var n=this._[t],i=0,a=n.length;i<a;++i)n[i].value.apply(e,r)}},t.dispatch=e,Object.defineProperty(t,"__esModule",{value:!0})}("object"==typeof r&&"undefined"!=typeof e?r:n.d3=n.d3||{})},{}],102:[function(t,e,r){var n,i;n=this,i=function(t,v,g,d,m){"use strict";var y=function(t){return function(){return t}},x=function(){return 1e-6*(Math.random()-.5)};function u(t){return t.x+t.vx}function c(t){return t.y+t.vy}function b(t){return t.index}function _(t,e){var r=t.get(e);if(!r)throw new Error("missing: "+e);return r}function s(t){return t.x}function w(t){return t.y}var M=10,A=Math.PI*(3-Math.sqrt(5));t.forceCenter=function(a,o){var s;function e(){var t,e,r=s.length,n=0,i=0;for(t=0;t<r;++t)n+=(e=s[t]).x,i+=e.y;for(n=n/r-a,i=i/r-o,t=0;t<r;++t)(e=s[t]).x-=n,e.y-=i}return null==a&&(a=0),null==o&&(o=0),e.initialize=function(t){s=t},e.x=function(t){return arguments.length?(a=+t,e):a},e.y=function(t){return arguments.length?(o=+t,e):o},e},t.forceCollide=function(n){var a,o,g=1,s=1;function e(){for(var t,e,f,h,p,d,m,r=a.length,n=0;n<s;++n)for(e=v.quadtree(a,u,c).visitAfter(l),t=0;t<r;++t)f=a[t],d=o[f.index],m=d*d,h=f.x+f.vx,p=f.y+f.vy,e.visit(i);function i(t,e,r,n,i){var a=t.data,o=t.r,s=d+o;if(!a)return h+s<e||n<h-s||p+s<r||i<p-s;if(a.index>f.index){var l=h-a.x-a.vx,u=p-a.y-a.vy,c=l*l+u*u;c<s*s&&(0===l&&(c+=(l=x())*l),0===u&&(c+=(u=x())*u),c=(s-(c=Math.sqrt(c)))/c*g,f.vx+=(l*=c)*(s=(o*=o)/(m+o)),f.vy+=(u*=c)*s,a.vx-=l*(s=1-s),a.vy-=u*s)}}}function l(t){if(t.data)return t.r=o[t.data.index];for(var e=t.r=0;e<4;++e)t[e]&&t[e].r>t.r&&(t.r=t[e].r)}function r(){if(a){var t,e,r=a.length;for(o=new Array(r),t=0;t<r;++t)e=a[t],o[e.index]=+n(e,t,a)}}return"function"!=typeof n&&(n=y(null==n?1:+n)),e.initialize=function(t){a=t,r()},e.iterations=function(t){return arguments.length?(s=+t,e):s},e.strength=function(t){return arguments.length?(g=+t,e):g},e.radius=function(t){return arguments.length?(n="function"==typeof t?t:y(+t),r(),e):n},e},t.forceLink=function(f){var h,p,a,o,d,s=b,r=function(t){return 1/Math.min(o[t.source.index],o[t.target.index])},n=y(30),m=1;function e(t){for(var e=0,r=f.length;e<m;++e)for(var n,i,a,o,s,l,u,c=0;c<r;++c)i=(n=f[c]).source,o=(a=n.target).x+a.vx-i.x-i.vx||x(),s=a.y+a.vy-i.y-i.vy||x(),o*=l=((l=Math.sqrt(o*o+s*s))-p[c])/l*t*h[c],s*=l,a.vx-=o*(u=d[c]),a.vy-=s*u,i.vx+=o*(u=1-u),i.vy+=s*u}function i(){if(a){var t,e,r=a.length,n=f.length,i=g.map(a,s);for(t=0,o=new Array(r);t<n;++t)(e=f[t]).index=t,"object"!=typeof e.source&&(e.source=_(i,e.source)),"object"!=typeof e.target&&(e.target=_(i,e.target)),o[e.source.index]=(o[e.source.index]||0)+1,o[e.target.index]=(o[e.target.index]||0)+1;for(t=0,d=new Array(n);t<n;++t)e=f[t],d[t]=o[e.source.index]/(o[e.source.index]+o[e.target.index]);h=new Array(n),l(),p=new Array(n),u()}}function l(){if(a)for(var t=0,e=f.length;t<e;++t)h[t]=+r(f[t],t,f)}function u(){if(a)for(var t=0,e=f.length;t<e;++t)p[t]=+n(f[t],t,f)}return null==f&&(f=[]),e.initialize=function(t){a=t,i()},e.links=function(t){return arguments.length?(f=t,i(),e):f},e.id=function(t){return arguments.length?(s=t,e):s},e.iterations=function(t){return arguments.length?(m=+t,e):m},e.strength=function(t){return arguments.length?(r="function"==typeof t?t:y(+t),l(),e):r},e.distance=function(t){return arguments.length?(n="function"==typeof t?t:y(+t),u(),e):n},e},t.forceManyBody=function(){var i,l,u,c,n=y(-30),f=1,h=1/0,p=.81;function e(t){var e,r=i.length,n=v.quadtree(i,s,w).visitAfter(a);for(u=t,e=0;e<r;++e)l=i[e],n.visit(o)}function r(){if(i){var t,e,r=i.length;for(c=new Array(r),t=0;t<r;++t)e=i[t],c[e.index]=+n(e,t,i)}}function a(t){var e,r,n,i,a,o=0,s=0;if(t.length){for(n=i=a=0;a<4;++a)(e=t[a])&&(r=Math.abs(e.value))&&(o+=e.value,s+=r,n+=r*e.x,i+=r*e.y);t.x=n/s,t.y=i/s}else for((e=t).x=e.data.x,e.y=e.data.y;o+=c[e.data.index],e=e.next;);t.value=o}function o(t,e,r,n){if(!t.value)return!0;var i=t.x-l.x,a=t.y-l.y,o=n-e,s=i*i+a*a;if(o*o/p<s)return s<h&&(0===i&&(s+=(i=x())*i),0===a&&(s+=(a=x())*a),s<f&&(s=Math.sqrt(f*s)),l.vx+=i*t.value*u/s,l.vy+=a*t.value*u/s),!0;if(!(t.length||h<=s))for((t.data!==l||t.next)&&(0===i&&(s+=(i=x())*i),0===a&&(s+=(a=x())*a),s<f&&(s=Math.sqrt(f*s)));t.data!==l&&(o=c[t.data.index]*u/s,l.vx+=i*o,l.vy+=a*o),t=t.next;);}return e.initialize=function(t){i=t,r()},e.strength=function(t){return arguments.length?(n="function"==typeof t?t:y(+t),r(),e):n},e.distanceMin=function(t){return arguments.length?(f=t*t,e):Math.sqrt(f)},e.distanceMax=function(t){return arguments.length?(h=t*t,e):Math.sqrt(h)},e.theta=function(t){return arguments.length?(p=t*t,e):Math.sqrt(p)},e},t.forceRadial=function(r,l,u){var c,f,h,n=y(.1);function e(t){for(var e=0,r=c.length;e<r;++e){var n=c[e],i=n.x-l||1e-6,a=n.y-u||1e-6,o=Math.sqrt(i*i+a*a),s=(h[e]-o)*f[e]*t/o;n.vx+=i*s,n.vy+=a*s}}function i(){if(c){var t,e=c.length;for(f=new Array(e),h=new Array(e),t=0;t<e;++t)h[t]=+r(c[t],t,c),f[t]=isNaN(h[t])?0:+n(c[t],t,c)}}return"function"!=typeof r&&(r=y(+r)),null==l&&(l=0),null==u&&(u=0),e.initialize=function(t){c=t,i()},e.strength=function(t){return arguments.length?(n="function"==typeof t?t:y(+t),i(),e):n},e.radius=function(t){return arguments.length?(r="function"==typeof t?t:y(+t),i(),e):r},e.x=function(t){return arguments.length?(l=+t,e):l},e.y=function(t){return arguments.length?(u=+t,e):u},e},t.forceSimulation=function(c){var r,n=1,e=.001,i=1-Math.pow(e,1/300),a=0,o=.6,s=g.map(),t=m.timer(u),l=d.dispatch("tick","end");function u(){f(),l.call("tick",r),n<e&&(t.stop(),l.call("end",r))}function f(){var t,e,r=c.length;for(n+=(a-n)*i,s.each(function(t){t(n)}),t=0;t<r;++t)null==(e=c[t]).fx?e.x+=e.vx*=o:(e.x=e.fx,e.vx=0),null==e.fy?e.y+=e.vy*=o:(e.y=e.fy,e.vy=0)}function h(){for(var t,e=0,r=c.length;e<r;++e){if((t=c[e]).index=e,isNaN(t.x)||isNaN(t.y)){var n=M*Math.sqrt(e),i=e*A;t.x=n*Math.cos(i),t.y=n*Math.sin(i)}(isNaN(t.vx)||isNaN(t.vy))&&(t.vx=t.vy=0)}}function p(t){return t.initialize&&t.initialize(c),t}return null==c&&(c=[]),h(),r={tick:f,restart:function(){return t.restart(u),r},stop:function(){return t.stop(),r},nodes:function(t){return arguments.length?(c=t,h(),s.each(p),r):c},alpha:function(t){return arguments.length?(n=+t,r):n},alphaMin:function(t){return arguments.length?(e=+t,r):e},alphaDecay:function(t){return arguments.length?(i=+t,r):+i},alphaTarget:function(t){return arguments.length?(a=+t,r):a},velocityDecay:function(t){return arguments.length?(o=1-t,r):1-o},force:function(t,e){return 1<arguments.length?(null==e?s.remove(t):s.set(t,p(e)),r):s.get(t)},find:function(t,e,r){var n,i,a,o,s,l=0,u=c.length;for(null==r?r=1/0:r*=r,l=0;l<u;++l)(a=(n=t-(o=c[l]).x)*n+(i=e-o.y)*i)<r&&(s=o,r=a);return s},on:function(t,e){return 1<arguments.length?(l.on(t,e),r):l.on(t)}}},t.forceX=function(r){var i,a,o,n=y(.1);function e(t){for(var e,r=0,n=i.length;r<n;++r)(e=i[r]).vx+=(o[r]-e.x)*a[r]*t}function s(){if(i){var t,e=i.length;for(a=new Array(e),o=new Array(e),t=0;t<e;++t)a[t]=isNaN(o[t]=+r(i[t],t,i))?0:+n(i[t],t,i)}}return"function"!=typeof r&&(r=y(null==r?0:+r)),e.initialize=function(t){i=t,s()},e.strength=function(t){return arguments.length?(n="function"==typeof t?t:y(+t),s(),e):n},e.x=function(t){return arguments.length?(r="function"==typeof t?t:y(+t),s(),e):r},e},t.forceY=function(r){var i,a,o,n=y(.1);function e(t){for(var e,r=0,n=i.length;r<n;++r)(e=i[r]).vy+=(o[r]-e.y)*a[r]*t}function s(){if(i){var t,e=i.length;for(a=new Array(e),o=new Array(e),t=0;t<e;++t)a[t]=isNaN(o[t]=+r(i[t],t,i))?0:+n(i[t],t,i)}}return"function"!=typeof r&&(r=y(null==r?0:+r)),e.initialize=function(t){i=t,s()},e.strength=function(t){return arguments.length?(n="function"==typeof t?t:y(+t),s(),e):n},e.y=function(t){return arguments.length?(r="function"==typeof t?t:y(+t),s(),e):r},e},Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof r&&"undefined"!=typeof e?i(r,t("d3-quadtree"),t("d3-collection"),t("d3-dispatch"),t("d3-timer")):i(n.d3=n.d3||{},n.d3,n.d3,n.d3,n.d3)},{"d3-collection":99,"d3-dispatch":101,"d3-quadtree":104,"d3-timer":105}],103:[function(t,e,r){var n,i;n=this,i=function(t,l){"use strict";function u(t,e,r,n,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*r+(1+3*t+3*a-3*o)*n+o*i)/6}var e=function(o){var s=o.length-1;return function(t){var e=t<=0?t=0:1<=t?s-(t=1):Math.floor(t*s),r=o[e],n=o[e+1],i=0<e?o[e-1]:2*r-n,a=e<s-1?o[e+2]:2*n-r;return u((t-e/s)*s,i,r,n,a)}},r=function(o){var s=o.length;return function(t){var e=Math.floor(((t%=1)<0?++t:t)*s),r=o[(e+s-1)%s],n=o[e%s],i=o[(e+1)%s],a=o[(e+2)%s];return u((t-e/s)*s,r,n,i,a)}},o=function(t){return function(){return t}};function n(e,r){return function(t){return e+t*r}}function i(t,e){var r=e-t;return r?n(t,180<r||r<-180?r-360*Math.round(r/360):r):o(isNaN(t)?e:t)}function a(a){return 1==(a=+a)?c:function(t,e){return e-t?(r=t,n=e,i=a,r=Math.pow(r,i),n=Math.pow(n,i)-r,i=1/i,function(t){return Math.pow(r+t*n,i)}):o(isNaN(t)?e:t);var r,n,i}}function c(t,e){var r=e-t;return r?n(t,r):o(isNaN(t)?e:t)}var s=function t(e){var o=a(e);function r(e,t){var r=o((e=l.rgb(e)).r,(t=l.rgb(t)).r),n=o(e.g,t.g),i=o(e.b,t.b),a=c(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=n(t),e.b=i(t),e.opacity=a(t),e+""}}return r.gamma=t,r}(1);function f(s){return function(t){var e,r,n=t.length,i=new Array(n),a=new Array(n),o=new Array(n);for(e=0;e<n;++e)r=l.rgb(t[e]),i[e]=r.r||0,a[e]=r.g||0,o[e]=r.b||0;return i=s(i),a=s(a),o=s(o),r.opacity=1,function(t){return r.r=i(t),r.g=a(t),r.b=o(t),r+""}}}var h=f(e),p=f(r),d=function(t,e){var r,n=e?e.length:0,i=t?Math.min(n,t.length):0,a=new Array(i),o=new Array(n);for(r=0;r<i;++r)a[r]=k(t[r],e[r]);for(;r<n;++r)o[r]=e[r];return function(t){for(r=0;r<i;++r)o[r]=a[r](t);return o}},m=function(e,r){var n=new Date;return r-=e=+e,function(t){return n.setTime(e+r*t),n}},v=function(e,r){return r-=e=+e,function(t){return e+r*t}},g=function(t,e){var r,n={},i={};for(r in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)r in t?n[r]=k(t[r],e[r]):i[r]=e[r];return function(t){for(r in n)i[r]=n[r](t);return i}},y=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,x=new RegExp(y.source,"g");var b,_,w,M,A=function(t,n){var e,r,i,a,o,s=y.lastIndex=x.lastIndex=0,l=-1,u=[],c=[];for(t+="",n+="";(e=y.exec(t))&&(r=x.exec(n));)(i=r.index)>s&&(i=n.slice(s,i),u[l]?u[l]+=i:u[++l]=i),(e=e[0])===(r=r[0])?u[l]?u[l]+=r:u[++l]=r:(u[++l]=null,c.push({i:l,x:v(e,r)})),s=x.lastIndex;return s<n.length&&(i=n.slice(s),u[l]?u[l]+=i:u[++l]=i),u.length<2?c[0]?(o=c[0].x,function(t){return o(t)+""}):(a=n,function(){return a}):(n=c.length,function(t){for(var e,r=0;r<n;++r)u[(e=c[r]).i]=e.x(t);return u.join("")})},k=function(t,e){var r,n=typeof e;return null==e||"boolean"===n?o(e):("number"===n?v:"string"===n?(r=l.color(e))?(e=r,s):A:e instanceof l.color?s:e instanceof Date?m:Array.isArray(e)?d:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?g:v)(t,e)},T=180/Math.PI,E={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},S=function(t,e,r,n,i,a){var o,s,l;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(l=t*r+e*n)&&(r-=t*l,n-=e*l),(s=Math.sqrt(r*r+n*n))&&(r/=s,n/=s,l/=s),t*n<e*r&&(t=-t,e=-e,l=-l,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*T,skewX:Math.atan(l)*T,scaleX:o,scaleY:s}};function C(h,p,d,m){function g(t){return t.length?t.pop()+" ":""}return function(t,e){var r,n,i,a,o,s,l,u,c=[],f=[];return t=h(t),e=h(e),function(t,e,r,n,i,a){if(t!==r||e!==n){var o=i.push("translate(",null,p,null,d);a.push({i:o-4,x:v(t,r)},{i:o-2,x:v(e,n)})}else(r||n)&&i.push("translate("+r+p+n+d)}(t.translateX,t.translateY,e.translateX,e.translateY,c,f),r=t.rotate,n=e.rotate,i=c,a=f,r!==n?(180<r-n?n+=360:180<n-r&&(r+=360),a.push({i:i.push(g(i)+"rotate(",null,m)-2,x:v(r,n)})):n&&i.push(g(i)+"rotate("+n+m),o=t.skewX,s=e.skewX,l=c,u=f,o!==s?u.push({i:l.push(g(l)+"skewX(",null,m)-2,x:v(o,s)}):s&&l.push(g(l)+"skewX("+s+m),function(t,e,r,n,i,a){if(t!==r||e!==n){var o=i.push(g(i)+"scale(",null,",",null,")");a.push({i:o-4,x:v(t,r)},{i:o-2,x:v(e,n)})}else 1===r&&1===n||i.push(g(i)+"scale("+r+","+n+")")}(t.scaleX,t.scaleY,e.scaleX,e.scaleY,c,f),t=e=null,function(t){for(var e,r=-1,n=f.length;++r<n;)c[(e=f[r]).i]=e.x(t);return c.join("")}}}var L=C(function(t){return"none"===t?E:(b||(b=document.createElement("DIV"),_=document.documentElement,w=document.defaultView),b.style.transform=t,t=w.getComputedStyle(_.appendChild(b),null).getPropertyValue("transform"),_.removeChild(b),t=t.slice(7,-1).split(","),S(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))},"px, ","px)","deg)"),z=C(function(t){return null==t?E:(M||(M=document.createElementNS("http://www.w3.org/2000/svg","g")),M.setAttribute("transform",t),(t=M.transform.baseVal.consolidate())?(t=t.matrix,S(t.a,t.b,t.c,t.d,t.e,t.f)):E)},", ",")",")"),O=Math.SQRT2;function P(t){return((t=Math.exp(t))+1/t)/2}function I(o){return function(e,t){var r=o((e=l.hsl(e)).h,(t=l.hsl(t)).h),n=c(e.s,t.s),i=c(e.l,t.l),a=c(e.opacity,t.opacity);return function(t){return e.h=r(t),e.s=n(t),e.l=i(t),e.opacity=a(t),e+""}}}var D=I(i),N=I(c);function R(o){return function(e,t){var r=o((e=l.hcl(e)).h,(t=l.hcl(t)).h),n=c(e.c,t.c),i=c(e.l,t.l),a=c(e.opacity,t.opacity);return function(t){return e.h=r(t),e.c=n(t),e.l=i(t),e.opacity=a(t),e+""}}}var B=R(i),F=R(c);function j(s){return function t(o){function e(e,t){var r=s((e=l.cubehelix(e)).h,(t=l.cubehelix(t)).h),n=c(e.s,t.s),i=c(e.l,t.l),a=c(e.opacity,t.opacity);return function(t){return e.h=r(t),e.s=n(t),e.l=i(Math.pow(t,o)),e.opacity=a(t),e+""}}return o=+o,e.gamma=t,e}(1)}var U=j(i),V=j(c);t.interpolate=k,t.interpolateArray=d,t.interpolateBasis=e,t.interpolateBasisClosed=r,t.interpolateDate=m,t.interpolateNumber=v,t.interpolateObject=g,t.interpolateRound=function(e,r){return r-=e=+e,function(t){return Math.round(e+r*t)}},t.interpolateString=A,t.interpolateTransformCss=L,t.interpolateTransformSvg=z,t.interpolateZoom=function(t,e){var r,o,s=t[0],l=t[1],u=t[2],n=e[0],i=e[1],a=e[2],c=n-s,f=i-l,h=c*c+f*f;if(h<1e-12)o=Math.log(a/u)/O,r=function(t){return[s+t*c,l+t*f,u*Math.exp(O*t*o)]};else{var p=Math.sqrt(h),d=(a*a-u*u+4*h)/(2*u*2*p),m=(a*a-u*u-4*h)/(2*a*2*p),g=Math.log(Math.sqrt(d*d+1)-d),v=Math.log(Math.sqrt(m*m+1)-m);o=(v-g)/O,r=function(t){var e,r,n=t*o,i=P(g),a=u/(2*p)*(i*(r=O*n+g,((r=Math.exp(2*r))-1)/(r+1))-(e=g,((e=Math.exp(e))-1/e)/2));return[s+a*c,l+a*f,u*i/P(O*n+g)]}}return r.duration=1e3*o,r},t.interpolateRgb=s,t.interpolateRgbBasis=h,t.interpolateRgbBasisClosed=p,t.interpolateHsl=D,t.interpolateHslLong=N,t.interpolateLab=function(e,t){var r=c((e=l.lab(e)).l,(t=l.lab(t)).l),n=c(e.a,t.a),i=c(e.b,t.b),a=c(e.opacity,t.opacity);return function(t){return e.l=r(t),e.a=n(t),e.b=i(t),e.opacity=a(t),e+""}},t.interpolateHcl=B,t.interpolateHclLong=F,t.interpolateCubehelix=U,t.interpolateCubehelixLong=V,t.quantize=function(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t(n/(e-1));return r},Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof r&&"undefined"!=typeof e?i(r,t("d3-color")):i(n.d3=n.d3||{},n.d3)},{"d3-color":100}],104:[function(t,e,r){var n;n=this,function(t){"use strict";function h(t,e,r,n){if(isNaN(e)||isNaN(r))return t;var i,a,o,s,l,u,c,f,h,p=t._root,d={data:n},m=t._x0,g=t._y0,v=t._x1,y=t._y1;if(!p)return t._root=d,t;for(;p.length;)if((u=e>=(a=(m+v)/2))?m=a:v=a,(c=r>=(o=(g+y)/2))?g=o:y=o,!(p=(i=p)[f=c<<1|u]))return i[f]=d,t;if(s=+t._x.call(null,p.data),l=+t._y.call(null,p.data),e===s&&r===l)return d.next=p,i?i[f]=d:t._root=d,t;for(;i=i?i[f]=new Array(4):t._root=new Array(4),(u=e>=(a=(m+v)/2))?m=a:v=a,(c=r>=(o=(g+y)/2))?g=o:y=o,(f=c<<1|u)==(h=(o<=l)<<1|a<=s););return i[h]=p,i[f]=d,t}var w=function(t,e,r,n,i){this.node=t,this.x0=e,this.y0=r,this.x1=n,this.y1=i};function i(t){return t[0]}function a(t){return t[1]}function e(t,e,r){var n=new o(null==e?i:e,null==r?a:r,NaN,NaN,NaN,NaN);return null==t?n:n.addAll(t)}function o(t,e,r,n,i,a){this._x=t,this._y=e,this._x0=r,this._y0=n,this._x1=i,this._y1=a,this._root=void 0}function s(t){for(var e={data:t.data},r=e;t=t.next;)r=r.next={data:t.data};return e}var r=e.prototype=o.prototype;r.copy=function(){var t,e,r=new o(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root;if(!n)return r;if(!n.length)return r._root=s(n),r;for(t=[{source:n,target:r._root=new Array(4)}];n=t.pop();)for(var i=0;i<4;++i)(e=n.source[i])&&(e.length?t.push({source:e,target:n.target[i]=new Array(4)}):n.target[i]=s(e));return r},r.add=function(t){var e=+this._x.call(null,t),r=+this._y.call(null,t);return h(this.cover(e,r),e,r,t)},r.addAll=function(t){var e,r,n,i,a=t.length,o=new Array(a),s=new Array(a),l=1/0,u=1/0,c=-1/0,f=-1/0;for(r=0;r<a;++r)isNaN(n=+this._x.call(null,e=t[r]))||isNaN(i=+this._y.call(null,e))||((o[r]=n)<l&&(l=n),c<n&&(c=n),(s[r]=i)<u&&(u=i),f<i&&(f=i));for(c<l&&(l=this._x0,c=this._x1),f<u&&(u=this._y0,f=this._y1),this.cover(l,u).cover(c,f),r=0;r<a;++r)h(this,o[r],s[r],t[r]);return this},r.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var r=this._x0,n=this._y0,i=this._x1,a=this._y1;if(isNaN(r))i=(r=Math.floor(t))+1,a=(n=Math.floor(e))+1;else{if(!(t<r||i<t||e<n||a<e))return this;var o,s,l=i-r,u=this._root;switch(s=(e<(n+a)/2)<<1|t<(r+i)/2){case 0:for(;(o=new Array(4))[s]=u,u=o,a=n+(l*=2),(i=r+l)<t||a<e;);break;case 1:for(;(o=new Array(4))[s]=u,u=o,a=n+(l*=2),t<(r=i-l)||a<e;);break;case 2:for(;(o=new Array(4))[s]=u,u=o,n=a-(l*=2),(i=r+l)<t||e<n;);break;case 3:for(;(o=new Array(4))[s]=u,u=o,n=a-(l*=2),t<(r=i-l)||e<n;);}this._root&&this._root.length&&(this._root=u)}return this._x0=r,this._y0=n,this._x1=i,this._y1=a,this},r.data=function(){var e=[];return this.visit(function(t){if(!t.length)for(;e.push(t.data),t=t.next;);}),e},r.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},r.find=function(t,e,r){var n,i,a,o,s,l,u,c=this._x0,f=this._y0,h=this._x1,p=this._y1,d=[],m=this._root;for(m&&d.push(new w(m,c,f,h,p)),null==r?r=1/0:(c=t-r,f=e-r,h=t+r,p=e+r,r*=r);l=d.pop();)if(!(!(m=l.node)||(i=l.x0)>h||(a=l.y0)>p||(o=l.x1)<c||(s=l.y1)<f))if(m.length){var g=(i+o)/2,v=(a+s)/2;d.push(new w(m[3],g,v,o,s),new w(m[2],i,v,g,s),new w(m[1],g,a,o,v),new w(m[0],i,a,g,v)),(u=(v<=e)<<1|g<=t)&&(l=d[d.length-1],d[d.length-1]=d[d.length-1-u],d[d.length-1-u]=l)}else{var y=t-+this._x.call(null,m.data),x=e-+this._y.call(null,m.data),b=y*y+x*x;if(b<r){var _=Math.sqrt(r=b);c=t-_,f=e-_,h=t+_,p=e+_,n=m.data}}return n},r.remove=function(t){if(isNaN(a=+this._x.call(null,t))||isNaN(o=+this._y.call(null,t)))return this;var e,r,n,i,a,o,s,l,u,c,f,h,p=this._root,d=this._x0,m=this._y0,g=this._x1,v=this._y1;if(!p)return this;if(p.length)for(;;){if((u=a>=(s=(d+g)/2))?d=s:g=s,(c=o>=(l=(m+v)/2))?m=l:v=l,!(p=(e=p)[f=c<<1|u]))return this;if(!p.length)break;(e[f+1&3]||e[f+2&3]||e[f+3&3])&&(r=e,h=f)}for(;p.data!==t;)if(!(p=(n=p).next))return this;return(i=p.next)&&delete p.next,n?i?n.next=i:delete n.next:e?(i?e[f]=i:delete e[f],(p=e[0]||e[1]||e[2]||e[3])&&p===(e[3]||e[2]||e[1]||e[0])&&!p.length&&(r?r[h]=p:this._root=p)):this._root=i,this},r.removeAll=function(t){for(var e=0,r=t.length;e<r;++e)this.remove(t[e]);return this},r.root=function(){return this._root},r.size=function(){var e=0;return this.visit(function(t){if(!t.length)for(;++e,t=t.next;);}),e},r.visit=function(t){var e,r,n,i,a,o,s=[],l=this._root;for(l&&s.push(new w(l,this._x0,this._y0,this._x1,this._y1));e=s.pop();)if(!t(l=e.node,n=e.x0,i=e.y0,a=e.x1,o=e.y1)&&l.length){var u=(n+a)/2,c=(i+o)/2;(r=l[3])&&s.push(new w(r,u,c,a,o)),(r=l[2])&&s.push(new w(r,n,c,u,o)),(r=l[1])&&s.push(new w(r,u,i,a,c)),(r=l[0])&&s.push(new w(r,n,i,u,c))}return this},r.visitAfter=function(t){var e,r=[],n=[];for(this._root&&r.push(new w(this._root,this._x0,this._y0,this._x1,this._y1));e=r.pop();){var i=e.node;if(i.length){var a,o=e.x0,s=e.y0,l=e.x1,u=e.y1,c=(o+l)/2,f=(s+u)/2;(a=i[0])&&r.push(new w(a,o,s,c,f)),(a=i[1])&&r.push(new w(a,c,s,l,f)),(a=i[2])&&r.push(new w(a,o,f,c,u)),(a=i[3])&&r.push(new w(a,c,f,l,u))}n.push(e)}for(;e=n.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},r.x=function(t){return arguments.length?(this._x=t,this):this._x},r.y=function(t){return arguments.length?(this._y=t,this):this._y},t.quadtree=e,Object.defineProperty(t,"__esModule",{value:!0})}("object"==typeof r&&"undefined"!=typeof e?r:n.d3=n.d3||{})},{}],105:[function(t,e,r){var n;n=this,function(t){"use strict";var i,a,r=0,e=0,n=0,o=1e3,s=0,l=0,u=0,c="object"==typeof performance&&performance.now?performance:Date,f="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function h(){return l||(f(p),l=c.now()+u)}function p(){l=0}function d(){this._call=this._time=this._next=null}function m(t,e,r){var n=new d;return n.restart(t,e,r),n}function g(){h(),++r;for(var t,e=i;e;)0<=(t=l-e._time)&&e._call.call(null,t),e=e._next;--r}function v(){l=(s=c.now())+u,r=e=0;try{g()}finally{r=0,function(){var t,e,r=i,n=1/0;for(;r;)r._call?(n>r._time&&(n=r._time),r=(t=r)._next):(e=r._next,r._next=null,r=t?t._next=e:i=e);a=t,x(n)}(),l=0}}function y(){var t=c.now(),e=t-s;o<e&&(u-=e,s=t)}function x(t){r||(e&&(e=clearTimeout(e)),24<t-l?(t<1/0&&(e=setTimeout(v,t-c.now()-u)),n&&(n=clearInterval(n))):(n||(s=c.now(),n=setInterval(y,o)),r=1,f(v)))}d.prototype=m.prototype={constructor:d,restart:function(t,e,r){if("function"!=typeof t)throw new TypeError("callback is not a function");r=(null==r?h():+r)+(null==e?0:+e),this._next||a===this||(a?a._next=this:i=this,a=this),this._call=t,this._time=r,x()},stop:function(){this._call&&(this._call=null,this._time=1/0,x())}};t.now=h,t.timer=m,t.timerFlush=g,t.timeout=function(e,r,t){var n=new d;return r=null==r?0:+r,n.restart(function(t){n.stop(),e(t+r)},r,t),n},t.interval=function(r,n,i){var a=new d,o=n;return null==n?a.restart(r,n,i):(n=+n,i=null==i?h():+i,a.restart(function t(e){e+=o,a.restart(t,o+=n,i),r(e)},n,i)),a},Object.defineProperty(t,"__esModule",{value:!0})}("object"==typeof r&&"undefined"!=typeof e?r:n.d3=n.d3||{})},{}],106:[function(t,Ns,e){!function(){var I={version:"3.5.17"},a=[].slice,h=function(t){return a.call(t)},x=this.document;function s(t){return t&&(t.ownerDocument||t.document||t).documentElement}function D(t){return t&&(t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView)}if(x)try{h(x.documentElement.childNodes)[0].nodeType}catch(t){h=function(t){for(var e=t.length,r=new Array(e);e--;)r[e]=t[e];return r}}if(Date.now||(Date.now=function(){return+new Date}),x)try{x.createElement("DIV").style.setProperty("opacity",0,"")}catch(t){var e=this.Element.prototype,r=e.setAttribute,n=e.setAttributeNS,i=this.CSSStyleDeclaration.prototype,o=i.setProperty;e.setAttribute=function(t,e){r.call(this,t,e+"")},e.setAttributeNS=function(t,e,r){n.call(this,t,e,r+"")},i.setProperty=function(t,e,r){o.call(this,t,e+"",r)}}function l(t,e){return t<e?-1:e<t?1:e<=t?0:NaN}function u(t){return null===t?NaN:+t}function c(t){return!isNaN(t)}function t(a){return{left:function(t,e,r,n){for(arguments.length<3&&(r=0),arguments.length<4&&(n=t.length);r<n;){var i=r+n>>>1;a(t[i],e)<0?r=i+1:n=i}return r},right:function(t,e,r,n){for(arguments.length<3&&(r=0),arguments.length<4&&(n=t.length);r<n;){var i=r+n>>>1;0<a(t[i],e)?n=i:r=i+1}return r}}}I.ascending=l,I.descending=function(t,e){return e<t?-1:t<e?1:t<=e?0:NaN},I.min=function(t,e){var r,n,i=-1,a=t.length;if(1===arguments.length){for(;++i<a;)if(null!=(n=t[i])&&n<=n){r=n;break}for(;++i<a;)null!=(n=t[i])&&n<r&&(r=n)}else{for(;++i<a;)if(null!=(n=e.call(t,t[i],i))&&n<=n){r=n;break}for(;++i<a;)null!=(n=e.call(t,t[i],i))&&n<r&&(r=n)}return r},I.max=function(t,e){var r,n,i=-1,a=t.length;if(1===arguments.length){for(;++i<a;)if(null!=(n=t[i])&&n<=n){r=n;break}for(;++i<a;)null!=(n=t[i])&&r<n&&(r=n)}else{for(;++i<a;)if(null!=(n=e.call(t,t[i],i))&&n<=n){r=n;break}for(;++i<a;)null!=(n=e.call(t,t[i],i))&&r<n&&(r=n)}return r},I.extent=function(t,e){var r,n,i,a=-1,o=t.length;if(1===arguments.length){for(;++a<o;)if(null!=(n=t[a])&&n<=n){r=i=n;break}for(;++a<o;)null!=(n=t[a])&&(n<r&&(r=n),i<n&&(i=n))}else{for(;++a<o;)if(null!=(n=e.call(t,t[a],a))&&n<=n){r=i=n;break}for(;++a<o;)null!=(n=e.call(t,t[a],a))&&(n<r&&(r=n),i<n&&(i=n))}return[r,i]},I.sum=function(t,e){var r,n=0,i=t.length,a=-1;if(1===arguments.length)for(;++a<i;)c(r=+t[a])&&(n+=r);else for(;++a<i;)c(r=+e.call(t,t[a],a))&&(n+=r);return n},I.mean=function(t,e){var r,n=0,i=t.length,a=-1,o=i;if(1===arguments.length)for(;++a<i;)c(r=u(t[a]))?n+=r:--o;else for(;++a<i;)c(r=u(e.call(t,t[a],a)))?n+=r:--o;if(o)return n/o},I.quantile=function(t,e){var r=(t.length-1)*e+1,n=Math.floor(r),i=+t[n-1],a=r-n;return a?i+a*(t[n]-i):i},I.median=function(t,e){var r,n=[],i=t.length,a=-1;if(1===arguments.length)for(;++a<i;)c(r=u(t[a]))&&n.push(r);else for(;++a<i;)c(r=u(e.call(t,t[a],a)))&&n.push(r);if(n.length)return I.quantile(n.sort(l),.5)},I.variance=function(t,e){var r,n,i=t.length,a=0,o=0,s=-1,l=0;if(1===arguments.length)for(;++s<i;)c(r=u(t[s]))&&(o+=(n=r-a)*(r-(a+=n/++l)));else for(;++s<i;)c(r=u(e.call(t,t[s],s)))&&(o+=(n=r-a)*(r-(a+=n/++l)));if(1<l)return o/(l-1)},I.deviation=function(){var t=I.variance.apply(this,arguments);return t?Math.sqrt(t):t};var f=t(l);function p(t){return t.length}I.bisectLeft=f.left,I.bisect=I.bisectRight=f.right,I.bisector=function(r){return t(1===r.length?function(t,e){return l(r(t),e)}:r)},I.shuffle=function(t,e,r){(a=arguments.length)<3&&(r=t.length,a<2&&(e=0));for(var n,i,a=r-e;a;)i=Math.random()*a--|0,n=t[a+e],t[a+e]=t[i+e],t[i+e]=n;return t},I.permute=function(t,e){for(var r=e.length,n=new Array(r);r--;)n[r]=t[e[r]];return n},I.pairs=function(t){for(var e=0,r=t.length-1,n=t[0],i=new Array(r<0?0:r);e<r;)i[e]=[n,n=t[++e]];return i},I.transpose=function(t){if(!(i=t.length))return[];for(var e=-1,r=I.min(t,p),n=new Array(r);++e<r;)for(var i,a=-1,o=n[e]=new Array(i);++a<i;)o[a]=t[a][e];return n},I.zip=function(){return I.transpose(arguments)},I.keys=function(t){var e=[];for(var r in t)e.push(r);return e},I.values=function(t){var e=[];for(var r in t)e.push(t[r]);return e},I.entries=function(t){var e=[];for(var r in t)e.push({key:r,value:t[r]});return e},I.merge=function(t){for(var e,r,n,i=t.length,a=-1,o=0;++a<i;)o+=t[a].length;for(r=new Array(o);0<=--i;)for(e=(n=t[i]).length;0<=--e;)r[--o]=n[e];return r};var P=Math.abs;function d(t,e){for(var r in e)Object.defineProperty(t.prototype,r,{value:e[r],enumerable:!1})}function y(){this._=Object.create(null)}I.range=function(t,e,r){if(arguments.length<3&&(r=1,arguments.length<2&&(e=t,t=0)),(e-t)/r==1/0)throw new Error("infinite range");var n,i=[],a=function(t){var e=1;for(;t*e%1;)e*=10;return e}(P(r)),o=-1;if(t*=a,e*=a,(r*=a)<0)for(;(n=t+r*++o)>e;)i.push(n/a);else for(;(n=t+r*++o)<e;)i.push(n/a);return i},I.map=function(t,e){var r=new y;if(t instanceof y)t.forEach(function(t,e){r.set(t,e)});else if(Array.isArray(t)){var n,i=-1,a=t.length;if(1===arguments.length)for(;++i<a;)r.set(i,t[i]);else for(;++i<a;)r.set(e.call(t,n=t[i],i),n)}else for(var o in t)r.set(o,t[o]);return r};var m="__proto__",g="\0";function v(t){return(t+="")===m||t[0]===g?g+t:t}function b(t){return(t+="")[0]===g?t.slice(1):t}function _(t){return v(t)in this._}function w(t){return(t=v(t))in this._&&delete this._[t]}function M(){var t=[];for(var e in this._)t.push(b(e));return t}function A(){var t=0;for(var e in this._)++t;return t}function k(){for(var t in this._)return!1;return!0}function T(){this._=Object.create(null)}function N(t){return t}function E(e,r,n){return function(){var t=n.apply(r,arguments);return t===r?e:t}}function S(t,e){if(e in t)return e;e=e.charAt(0).toUpperCase()+e.slice(1);for(var r=0,n=C.length;r<n;++r){var i=C[r]+e;if(i in t)return i}}d(y,{has:_,get:function(t){return this._[v(t)]},set:function(t,e){return this._[v(t)]=e},remove:w,keys:M,values:function(){var t=[];for(var e in this._)t.push(this._[e]);return t},entries:function(){var t=[];for(var e in this._)t.push({key:b(e),value:this._[e]});return t},size:A,empty:k,forEach:function(t){for(var e in this._)t.call(this,b(e),this._[e])}}),I.nest=function(){var f,h,p={},d=[],e=[];function m(r,t,n){if(n>=d.length)return h?h.call(p,t):f?t.sort(f):t;for(var e,i,a,o,s=-1,l=t.length,u=d[n++],c=new y;++s<l;)(o=c.get(e=u(i=t[s])))?o.push(i):c.set(e,[i]);return r?(i=r(),a=function(t,e){i.set(t,m(r,e,n))}):(i={},a=function(t,e){i[t]=m(r,e,n)}),c.forEach(a),i}return p.map=function(t,e){return m(e,t,0)},p.entries=function(t){return function r(t,n){if(n>=d.length)return t;var i=[],a=e[n++];return t.forEach(function(t,e){i.push({key:t,values:r(e,n)})}),a?i.sort(function(t,e){return a(t.key,e.key)}):i}(m(I.map,t,0),0)},p.key=function(t){return d.push(t),p},p.sortKeys=function(t){return e[d.length-1]=t,p},p.sortValues=function(t){return f=t,p},p.rollup=function(t){return h=t,p},p},I.set=function(t){var e=new T;if(t)for(var r=0,n=t.length;r<n;++r)e.add(t[r]);return e},d(T,{has:_,add:function(t){return this._[v(t+="")]=!0,t},remove:w,values:M,size:A,empty:k,forEach:function(t){for(var e in this._)t.call(this,b(e))}}),I.behavior={},I.rebind=function(t,e){for(var r,n=1,i=arguments.length;++n<i;)t[r=arguments[n]]=E(t,e,e[r]);return t};var C=["webkit","ms","moz","Moz","o","O"];function L(){}function z(){}function O(i){var a=[],o=new y;function t(){for(var t,e=a,r=-1,n=e.length;++r<n;)(t=e[r].on)&&t.apply(this,arguments);return i}return t.on=function(t,e){var r,n=o.get(t);return arguments.length<2?n&&n.on:(n&&(n.on=null,a=a.slice(0,r=a.indexOf(n)).concat(a.slice(r+1)),o.remove(t)),e&&a.push(o.set(t,{on:e})),i)},t}function R(){I.event.preventDefault()}function B(){for(var t,e=I.event;t=e.sourceEvent;)e=t;return e}function F(i){for(var a=new z,t=0,e=arguments.length;++t<e;)a[arguments[t]]=O(a);return a.of=function(r,n){return function(t){try{var e=t.sourceEvent=I.event;t.target=i,I.event=t,a[t.type].apply(r,n)}finally{I.event=e}}},a}I.dispatch=function(){for(var t=new z,e=-1,r=arguments.length;++e<r;)t[arguments[e]]=O(t);return t},z.prototype.on=function(t,e){var r=t.indexOf("."),n="";if(0<=r&&(n=t.slice(r+1),t=t.slice(0,r)),t)return arguments.length<2?this[t].on(n):this[t].on(n,e);if(2===arguments.length){if(null==e)for(t in this)this.hasOwnProperty(t)&&this[t].on(n,null);return this}},I.event=null,I.requote=function(t){return t.replace(j,"\\$&")};var j=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,U={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)t[r]=e[r]};function V(t){return U(t,W),t}var q=function(t,e){return e.querySelector(t)},H=function(t,e){return e.querySelectorAll(t)},G=function(t,e){var r=t.matches||t[S(t,"matchesSelector")];return(G=function(t,e){return r.call(t,e)})(t,e)};"function"==typeof Sizzle&&(q=function(t,e){return Sizzle(t,e)[0]||null},H=Sizzle,G=Sizzle.matchesSelector),I.selection=function(){return I.select(x.documentElement)};var W=I.selection.prototype=[];function Y(t){return"function"==typeof t?t:function(){return q(t,this)}}function Z(t){return"function"==typeof t?t:function(){return H(t,this)}}W.select=function(t){var e,r,n,i,a=[];t=Y(t);for(var o=-1,s=this.length;++o<s;){a.push(e=[]),e.parentNode=(n=this[o]).parentNode;for(var l=-1,u=n.length;++l<u;)(i=n[l])?(e.push(r=t.call(i,i.__data__,l,o)),r&&"__data__"in i&&(r.__data__=i.__data__)):e.push(null)}return V(a)},W.selectAll=function(t){var e,r,n=[];t=Z(t);for(var i=-1,a=this.length;++i<a;)for(var o=this[i],s=-1,l=o.length;++s<l;)(r=o[s])&&(n.push(e=h(t.call(r,r.__data__,s,i))),e.parentNode=r);return V(n)};var X="http://www.w3.org/1999/xhtml",$={svg:"http://www.w3.org/2000/svg",xhtml:X,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function J(e,r){return e=I.ns.qualify(e),null==r?e.local?function(){this.removeAttributeNS(e.space,e.local)}:function(){this.removeAttribute(e)}:"function"==typeof r?e.local?function(){var t=r.apply(this,arguments);null==t?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,t)}:function(){var t=r.apply(this,arguments);null==t?this.removeAttribute(e):this.setAttribute(e,t)}:e.local?function(){this.setAttributeNS(e.space,e.local,r)}:function(){this.setAttribute(e,r)}}function K(t){return t.trim().replace(/\s+/g," ")}function Q(t){return new RegExp("(?:^|\\s+)"+I.requote(t)+"(?:\\s+|$)","g")}function tt(t){return(t+"").trim().split(/^|\s+/)}function et(r,n){var i=(r=tt(r).map(rt)).length;return"function"==typeof n?function(){for(var t=-1,e=n.apply(this,arguments);++t<i;)r[t](this,e)}:function(){for(var t=-1;++t<i;)r[t](this,n)}}function rt(n){var i=Q(n);return function(t,e){if(r=t.classList)return e?r.add(n):r.remove(n);var r=t.getAttribute("class")||"";e?(i.lastIndex=0,i.test(r)||t.setAttribute("class",K(r+" "+n))):t.setAttribute("class",K(r.replace(i," ")))}}function nt(e,r,n){return null==r?function(){this.style.removeProperty(e)}:"function"==typeof r?function(){var t=r.apply(this,arguments);null==t?this.style.removeProperty(e):this.style.setProperty(e,t,n)}:function(){this.style.setProperty(e,r,n)}}function it(e,r){return null==r?function(){delete this[e]}:"function"==typeof r?function(){var t=r.apply(this,arguments);null==t?delete this[e]:this[e]=t}:function(){this[e]=r}}function at(r){return"function"==typeof r?r:(r=I.ns.qualify(r)).local?function(){return this.ownerDocument.createElementNS(r.space,r.local)}:function(){var t=this.ownerDocument,e=this.namespaceURI;return e===X&&t.documentElement.namespaceURI===X?t.createElement(r):t.createElementNS(e,r)}}function ot(){var t=this.parentNode;t&&t.removeChild(this)}function st(t){return{__data__:t}}function lt(t){return function(){return G(this,t)}}function ut(t,e){for(var r=0,n=t.length;r<n;r++)for(var i,a=t[r],o=0,s=a.length;o<s;o++)(i=a[o])&&e(i,o,r);return t}function ct(t){return U(t,ft),t}I.ns={prefix:$,qualify:function(t){var e=t.indexOf(":"),r=t;return 0<=e&&"xmlns"!==(r=t.slice(0,e))&&(t=t.slice(e+1)),$.hasOwnProperty(r)?{space:$[r],local:t}:t}},W.attr=function(t,e){if(arguments.length<2){if("string"==typeof t){var r=this.node();return(t=I.ns.qualify(t)).local?r.getAttributeNS(t.space,t.local):r.getAttribute(t)}for(e in t)this.each(J(e,t[e]));return this}return this.each(J(t,e))},W.classed=function(t,e){if(arguments.length<2){if("string"==typeof t){var r=this.node(),n=(t=tt(t)).length,i=-1;if(e=r.classList){for(;++i<n;)if(!e.contains(t[i]))return!1}else for(e=r.getAttribute("class");++i<n;)if(!Q(t[i]).test(e))return!1;return!0}for(e in t)this.each(et(e,t[e]));return this}return this.each(et(t,e))},W.style=function(t,e,r){var n=arguments.length;if(n<3){if("string"!=typeof t){for(r in n<2&&(e=""),t)this.each(nt(r,t[r],e));return this}if(n<2){var i=this.node();return D(i).getComputedStyle(i,null).getPropertyValue(t)}r=""}return this.each(nt(t,e,r))},W.property=function(t,e){if(arguments.length<2){if("string"==typeof t)return this.node()[t];for(e in t)this.each(it(e,t[e]));return this}return this.each(it(t,e))},W.text=function(e){return arguments.length?this.each("function"==typeof e?function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}:null==e?function(){this.textContent=""}:function(){this.textContent=e}):this.node().textContent},W.html=function(e){return arguments.length?this.each("function"==typeof e?function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}:null==e?function(){this.innerHTML=""}:function(){this.innerHTML=e}):this.node().innerHTML},W.append=function(t){return t=at(t),this.select(function(){return this.appendChild(t.apply(this,arguments))})},W.insert=function(t,e){return t=at(t),e=Y(e),this.select(function(){return this.insertBefore(t.apply(this,arguments),e.apply(this,arguments)||null)})},W.remove=function(){return this.each(ot)},W.data=function(t,d){var e,r,n=-1,i=this.length;if(!arguments.length){for(t=new Array(i=(e=this[0]).length);++n<i;)(r=e[n])&&(t[n]=r.__data__);return t}function a(t,e){var r,n,i,a=t.length,o=e.length,s=Math.min(a,o),l=new Array(o),u=new Array(o),c=new Array(a);if(d){var f,h=new y,p=new Array(a);for(r=-1;++r<a;)(n=t[r])&&(h.has(f=d.call(n,n.__data__,r))?c[r]=n:h.set(f,n),p[r]=f);for(r=-1;++r<o;)(n=h.get(f=d.call(e,i=e[r],r)))?!0!==n&&((l[r]=n).__data__=i):u[r]=st(i),h.set(f,!0);for(r=-1;++r<a;)r in p&&!0!==h.get(p[r])&&(c[r]=t[r])}else{for(r=-1;++r<s;)n=t[r],i=e[r],n?(n.__data__=i,l[r]=n):u[r]=st(i);for(;r<o;++r)u[r]=st(e[r]);for(;r<a;++r)c[r]=t[r]}u.update=l,u.parentNode=l.parentNode=c.parentNode=t.parentNode,m.push(u),g.push(l),v.push(c)}var m=ct([]),g=V([]),v=V([]);if("function"==typeof t)for(;++n<i;)a(e=this[n],t.call(e,e.parentNode.__data__,n));else for(;++n<i;)a(e=this[n],t);return g.enter=function(){return m},g.exit=function(){return v},g},W.datum=function(t){return arguments.length?this.property("__data__",t):this.property("__data__")},W.filter=function(t){var e,r,n,i=[];"function"!=typeof t&&(t=lt(t));for(var a=0,o=this.length;a<o;a++){i.push(e=[]),e.parentNode=(r=this[a]).parentNode;for(var s=0,l=r.length;s<l;s++)(n=r[s])&&t.call(n,n.__data__,s,a)&&e.push(n)}return V(i)},W.order=function(){for(var t=-1,e=this.length;++t<e;)for(var r,n=this[t],i=n.length-1,a=n[i];0<=--i;)(r=n[i])&&(a&&a!==r.nextSibling&&a.parentNode.insertBefore(r,a),a=r);return this},W.sort=function(t){t=function(r){arguments.length||(r=l);return function(t,e){return t&&e?r(t.__data__,e.__data__):!t-!e}}.apply(this,arguments);for(var e=-1,r=this.length;++e<r;)this[e].sort(t);return this.order()},W.each=function(n){return ut(this,function(t,e,r){n.call(t,t.__data__,e,r)})},W.call=function(t){var e=h(arguments);return t.apply(e[0]=this,e),this},W.empty=function(){return!this.node()},W.node=function(){for(var t=0,e=this.length;t<e;t++)for(var r=this[t],n=0,i=r.length;n<i;n++){var a=r[n];if(a)return a}return null},W.size=function(){var t=0;return ut(this,function(){++t}),t};var ft=[];function ht(i,e,r){var n="__on"+i,t=i.indexOf("."),a=dt;0<t&&(i=i.slice(0,t));var o=pt.get(i);function s(){var t=this[n];t&&(this.removeEventListener(i,t,t.$),delete this[n])}return o&&(i=o,a=mt),t?e?function(){var t=a(e,h(arguments));s.call(this),this.addEventListener(i,this[n]=t,t.$=r),t._=e}:s:e?L:function(){var t,e=new RegExp("^__on([^.]+)"+I.requote(i)+"$");for(var r in this)if(t=r.match(e)){var n=this[r];this.removeEventListener(t[1],n,n.$),delete this[r]}}}I.selection.enter=ct,(I.selection.enter.prototype=ft).append=W.append,ft.empty=W.empty,ft.node=W.node,ft.call=W.call,ft.size=W.size,ft.select=function(t){for(var e,r,n,i,a,o=[],s=-1,l=this.length;++s<l;){n=(i=this[s]).update,o.push(e=[]),e.parentNode=i.parentNode;for(var u=-1,c=i.length;++u<c;)(a=i[u])?(e.push(n[u]=r=t.call(i.parentNode,a.__data__,u,s)),r.__data__=a.__data__):e.push(null)}return V(o)},ft.insert=function(t,e){var o,s,l;return arguments.length<2&&(o=this,e=function(t,e,r){var n,i=o[r].update,a=i.length;for(r!=l&&(l=r,s=0),s<=e&&(s=e+1);!(n=i[s])&&++s<a;);return n}),W.insert.call(this,t,e)},I.select=function(t){var e;return"string"==typeof t?(e=[q(t,x)]).parentNode=x.documentElement:(e=[t]).parentNode=s(t),V([e])},I.selectAll=function(t){var e;return"string"==typeof t?(e=h(H(t,x))).parentNode=x.documentElement:(e=h(t)).parentNode=null,V([e])},W.on=function(t,e,r){var n=arguments.length;if(n<3){if("string"!=typeof t){for(r in n<2&&(e=!1),t)this.each(ht(r,t[r],e));return this}if(n<2)return(n=this.node()["__on"+t])&&n._;r=!1}return this.each(ht(t,e,r))};var pt=I.map({mouseenter:"mouseover",mouseleave:"mouseout"});function dt(r,n){return function(t){var e=I.event;I.event=t,n[0]=this.__data__;try{r.apply(this,n)}finally{I.event=e}}}function mt(t,e){var r=dt(t,e);return function(t){var e=t.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||r.call(this,t)}}x&&pt.forEach(function(t){"on"+t in x&&pt.remove(t)});var gt,vt=0;function yt(t){var r=".dragsuppress-"+ ++vt,n="click"+r,i=I.select(D(t)).on("touchmove"+r,R).on("dragstart"+r,R).on("selectstart"+r,R);if(null==gt&&(gt=!("onselectstart"in t)&&S(t.style,"userSelect")),gt){var a=s(t).style,o=a[gt];a[gt]="none"}return function(t){if(i.on(r,null),gt&&(a[gt]=o),t){var e=function(){i.on(n,null)};i.on(n,function(){R(),e()},!0),setTimeout(e,0)}}}I.mouse=function(t){return bt(t,B())};var xt=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function bt(t,e){e.changedTouches&&(e=e.changedTouches[0]);var r=t.ownerSVGElement||t;if(r.createSVGPoint){var n=r.createSVGPoint();if(xt<0){var i=D(t);if(i.scrollX||i.scrollY){var a=(r=I.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important"))[0][0].getScreenCTM();xt=!(a.f||a.e),r.remove()}}return xt?(n.x=e.pageX,n.y=e.pageY):(n.x=e.clientX,n.y=e.clientY),[(n=n.matrixTransform(t.getScreenCTM().inverse())).x,n.y]}var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}function _t(){return I.event.changedTouches[0].identifier}I.touch=function(t,e,r){if(arguments.length<3&&(r=e,e=B().changedTouches),e)for(var n,i=0,a=e.length;i<a;++i)if((n=e[i]).identifier===r)return bt(t,n)},I.behavior.drag=function(){var m=F(r,"drag","dragstart","dragend"),g=null,t=n(L,I.mouse,D,"mousemove","mouseup"),e=n(_t,I.touch,N,"touchmove","touchend");function r(){this.on("mousedown.drag",t).on("touchstart.drag",e)}function n(c,f,h,p,d){return function(){var n,t=I.event.target.correspondingElement||I.event.target,i=this.parentNode,a=m.of(this,arguments),o=0,s=c(),e=".drag"+(null==s?"":"-"+s),r=I.select(h(t)).on(p+e,function(){var t,e,r=f(i,s);if(!r)return;t=r[0]-u[0],e=r[1]-u[1],o|=t|e,a({type:"drag",x:(u=r)[0]+n[0],y:r[1]+n[1],dx:t,dy:e})}).on(d+e,function(){if(!f(i,s))return;r.on(p+e,null).on(d+e,null),l(o),a({type:"dragend"})}),l=yt(t),u=f(i,s);n=g?[(n=g.apply(this,arguments)).x-u[0],n.y-u[1]]:[0,0],a({type:"dragstart"})}}return r.origin=function(t){return arguments.length?(g=t,r):g},I.rebind(r,m,"on")},I.touches=function(r,t){return arguments.length<2&&(t=B().touches),t?h(t).map(function(t){var e=bt(r,t);return e.identifier=t.identifier,e}):[]};var wt=1e-6,Mt=wt*wt,At=Math.PI,kt=2*At,Tt=kt-wt,Et=At/2,St=At/180,Ct=180/At;function Lt(t){return 0<t?1:t<0?-1:0}function zt(t,e,r){return(e[0]-t[0])*(r[1]-t[1])-(e[1]-t[1])*(r[0]-t[0])}function Ot(t){return 1<t?0:t<-1?At:Math.acos(t)}function Pt(t){return 1<t?Et:t<-1?-Et:Math.asin(t)}function It(t){return((t=Math.exp(t))+1/t)/2}function Dt(t){return(t=Math.sin(t/2))*t}var Nt=Math.SQRT2;I.interpolateZoom=function(t,e){var r,o,s=t[0],l=t[1],u=t[2],n=e[0],i=e[1],a=e[2],c=n-s,f=i-l,h=c*c+f*f;if(h<Mt)o=Math.log(a/u)/Nt,r=function(t){return[s+t*c,l+t*f,u*Math.exp(Nt*t*o)]};else{var p=Math.sqrt(h),d=(a*a-u*u+4*h)/(2*u*2*p),m=(a*a-u*u-4*h)/(2*a*2*p),g=Math.log(Math.sqrt(d*d+1)-d),v=Math.log(Math.sqrt(m*m+1)-m);o=(v-g)/Nt,r=function(t){var e,r,n=t*o,i=It(g),a=u/(2*p)*(i*(r=Nt*n+g,((r=Math.exp(2*r))-1)/(r+1))-(e=g,((e=Math.exp(e))-1/e)/2));return[s+a*c,l+a*f,u*i/It(Nt*n+g)]}}return r.duration=1e3*o,r},I.behavior.zoom=function(){var e,l,r,n,b,i,a,o,s,_={x:0,y:0,k:1},u=[960,500],c=Ft,f=250,h=0,w="mousedown.zoom",p="mousemove.zoom",d="mouseup.zoom",M="touchstart.zoom",A=F(m,"zoomstart","zoom","zoomend");function m(t){t.on(w,O).on(Bt+".zoom",v).on("dblclick.zoom",y).on(M,P)}function k(t){return[(t[0]-_.x)/_.k,(t[1]-_.y)/_.k]}function T(t){_.k=Math.max(c[0],Math.min(c[1],t))}function E(t,e){var r;e=[(r=e)[0]*_.k+_.x,r[1]*_.k+_.y],_.x+=t[0]-e[0],_.y+=t[1]-e[1]}function S(t,e,r,n){t.__chart__={x:_.x,y:_.y,k:_.k},T(Math.pow(2,n)),E(l=e,r),t=I.select(t),0<f&&(t=t.transition().duration(f)),t.call(m.event)}function g(){a&&a.domain(i.range().map(function(t){return(t-_.x)/_.k}).map(i.invert)),s&&s.domain(o.range().map(function(t){return(t-_.y)/_.k}).map(o.invert))}function C(t){h++||t({type:"zoomstart"})}function L(t){g(),t({type:"zoom",scale:_.k,translate:[_.x,_.y]})}function z(t){--h||(t({type:"zoomend"}),l=null)}function O(){var t=this,e=A.of(t,arguments),r=0,n=I.select(D(t)).on(p,function(){r=1,E(I.mouse(t),i),L(e)}).on(d,function(){n.on(p,null).on(d,null),a(r),z(e)}),i=k(I.mouse(t)),a=yt(t);as.call(t),C(e)}function P(){var u,c=this,f=A.of(c,arguments),h={},p=0,i=".zoom-"+I.event.changedTouches[0].identifier,d="touchmove"+i,m="touchend"+i,g=[],a=I.select(c),o=yt(c);function v(){var t=I.touches(c);return u=_.k,t.forEach(function(t){t.identifier in h&&(h[t.identifier]=k(t))}),t}function t(){var t=I.event.target;I.select(t).on(d,y).on(m,x),g.push(t);for(var e=I.event.changedTouches,r=0,n=e.length;r<n;++r)h[e[r].identifier]=null;var i=v(),a=Date.now();if(1===i.length){if(a-b<500){var o=i[0];S(c,o,h[o.identifier],Math.floor(Math.log(_.k)/Math.LN2)+1),R()}b=a}else if(1<i.length){o=i[0];var s=i[1],l=o[0]-s[0],u=o[1]-s[1];p=l*l+u*u}}function y(){var t,e,r,n,i=I.touches(c);as.call(c);for(var a=0,o=i.length;a<o;++a,n=null)if(r=i[a],n=h[r.identifier]){if(e)break;t=r,e=n}if(n){var s=(s=r[0]-t[0])*s+(s=r[1]-t[1])*s,l=p&&Math.sqrt(s/p);t=[(t[0]+r[0])/2,(t[1]+r[1])/2],e=[(e[0]+n[0])/2,(e[1]+n[1])/2],T(l*u)}b=null,E(t,e),L(f)}function x(){if(I.event.touches.length){for(var t=I.event.changedTouches,e=0,r=t.length;e<r;++e)delete h[t[e].identifier];for(var n in h)return void v()}I.selectAll(g).on(i,null),a.on(w,O).on(M,P),o(),z(f)}t(),C(f),a.on(w,null).on(M,t)}function v(){var t=A.of(this,arguments);n?clearTimeout(n):(as.call(this),e=k(l=r||I.mouse(this)),C(t)),n=setTimeout(function(){n=null,z(t)},50),R(),T(Math.pow(2,.002*Rt())*_.k),E(l,e),L(t)}function y(){var t=I.mouse(this),e=Math.log(_.k)/Math.LN2;S(this,t,k(t),I.event.shiftKey?Math.ceil(e)-1:Math.floor(e)+1)}return Bt||(Bt="onwheel"in x?(Rt=function(){return-I.event.deltaY*(I.event.deltaMode?120:1)},"wheel"):"onmousewheel"in x?(Rt=function(){return I.event.wheelDelta},"mousewheel"):(Rt=function(){return-I.event.detail},"MozMousePixelScroll")),m.event=function(t){t.each(function(){var s=A.of(this,arguments),e=_;ls?I.select(this).transition().each("start.zoom",function(){_=this.__chart__||{x:0,y:0,k:1},C(s)}).tween("zoom:zoom",function(){var n=u[0],t=u[1],i=l?l[0]:n/2,a=l?l[1]:t/2,o=I.interpolateZoom([(i-_.x)/_.k,(a-_.y)/_.k,n/_.k],[(i-e.x)/e.k,(a-e.y)/e.k,n/e.k]);return function(t){var e=o(t),r=n/e[2];this.__chart__=_={x:i-e[0]*r,y:a-e[1]*r,k:r},L(s)}}).each("interrupt.zoom",function(){z(s)}).each("end.zoom",function(){z(s)}):(this.__chart__=_,C(s),L(s),z(s))})},m.translate=function(t){return arguments.length?(_={x:+t[0],y:+t[1],k:_.k},g(),m):[_.x,_.y]},m.scale=function(t){return arguments.length?(_={x:_.x,y:_.y,k:null},T(+t),g(),m):_.k},m.scaleExtent=function(t){return arguments.length?(c=null==t?Ft:[+t[0],+t[1]],m):c},m.center=function(t){return arguments.length?(r=t&&[+t[0],+t[1]],m):r},m.size=function(t){return arguments.length?(u=t&&[+t[0],+t[1]],m):u},m.duration=function(t){return arguments.length?(f=+t,m):f},m.x=function(t){return arguments.length?(i=(a=t).copy(),_={x:0,y:0,k:1},m):a},m.y=function(t){return arguments.length?(o=(s=t).copy(),_={x:0,y:0,k:1},m):s},I.rebind(m,A,"on")};var Rt,Bt,Ft=[0,1/0];function jt(){}function Ut(t,e,r){return this instanceof Ut?(this.h=+t,this.s=+e,void(this.l=+r)):arguments.length<2?t instanceof Ut?new Ut(t.h,t.s,t.l):ue(""+t,ce,Ut):new Ut(t,e,r)}(I.color=jt).prototype.toString=function(){return this.rgb()+""};var Vt=(I.hsl=Ut).prototype=new jt;function qt(t,e,r){var n,i;function a(t){return Math.round(255*(360<(e=t)?e-=360:e<0&&(e+=360),e<60?n+(i-n)*e/60:e<180?i:e<240?n+(i-n)*(240-e)/60:n));var e}return t=isNaN(t)?0:(t%=360)<0?t+360:t,e=isNaN(e)?0:e<0?0:1<e?1:e,n=2*(r=r<0?0:1<r?1:r)-(i=r<=.5?r*(1+e):r+e-r*e),new ie(a(t+120),a(t),a(t-120))}function Ht(t,e,r){return this instanceof Ht?(this.h=+t,this.c=+e,void(this.l=+r)):arguments.length<2?t instanceof Ht?new Ht(t.h,t.c,t.l):te(t instanceof Yt?t.l:(t=fe((t=I.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new Ht(t,e,r)}Vt.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),new Ut(this.h,this.s,this.l/t)},Vt.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new Ut(this.h,this.s,t*this.l)},Vt.rgb=function(){return qt(this.h,this.s,this.l)};var Gt=(I.hcl=Ht).prototype=new jt;function Wt(t,e,r){return isNaN(t)&&(t=0),isNaN(e)&&(e=0),new Yt(r,Math.cos(t*=St)*e,Math.sin(t)*e)}function Yt(t,e,r){return this instanceof Yt?(this.l=+t,this.a=+e,void(this.b=+r)):arguments.length<2?t instanceof Yt?new Yt(t.l,t.a,t.b):t instanceof Ht?Wt(t.h,t.c,t.l):fe((t=ie(t)).r,t.g,t.b):new Yt(t,e,r)}Gt.brighter=function(t){return new Ht(this.h,this.c,Math.min(100,this.l+Zt*(arguments.length?t:1)))},Gt.darker=function(t){return new Ht(this.h,this.c,Math.max(0,this.l-Zt*(arguments.length?t:1)))},Gt.rgb=function(){return Wt(this.h,this.c,this.l).rgb()},I.lab=Yt;var Zt=18,Xt=.95047,$t=1,Jt=1.08883,Kt=Yt.prototype=new jt;function Qt(t,e,r){var n=(t+16)/116,i=n+e/500,a=n-r/200;return new ie(ne(3.2404542*(i=ee(i)*Xt)-1.5371385*(n=ee(n)*$t)-.4985314*(a=ee(a)*Jt)),ne(-.969266*i+1.8760108*n+.041556*a),ne(.0556434*i-.2040259*n+1.0572252*a))}function te(t,e,r){return 0<t?new Ht(Math.atan2(r,e)*Ct,Math.sqrt(e*e+r*r),t):new Ht(NaN,NaN,t)}function ee(t){return.206893034<t?t*t*t:(t-4/29)/7.787037}function re(t){return.008856<t?Math.pow(t,1/3):7.787037*t+4/29}function ne(t){return Math.round(255*(t<=.00304?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function ie(t,e,r){return this instanceof ie?(this.r=~~t,this.g=~~e,void(this.b=~~r)):arguments.length<2?t instanceof ie?new ie(t.r,t.g,t.b):ue(""+t,ie,qt):new ie(t,e,r)}function ae(t){return new ie(t>>16,t>>8&255,255&t)}function oe(t){return ae(t)+""}Kt.brighter=function(t){return new Yt(Math.min(100,this.l+Zt*(arguments.length?t:1)),this.a,this.b)},Kt.darker=function(t){return new Yt(Math.max(0,this.l-Zt*(arguments.length?t:1)),this.a,this.b)},Kt.rgb=function(){return Qt(this.l,this.a,this.b)};var se=(I.rgb=ie).prototype=new jt;function le(t){return t<16?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function ue(t,e,r){var n,i,a,o=0,s=0,l=0;if(n=/([a-z]+)\((.*)\)/.exec(t=t.toLowerCase()))switch(i=n[2].split(","),n[1]){case"hsl":return r(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return e(pe(i[0]),pe(i[1]),pe(i[2]))}return(a=de.get(t))?e(a.r,a.g,a.b):(null==t||"#"!==t.charAt(0)||isNaN(a=parseInt(t.slice(1),16))||(4===t.length?(o=(3840&a)>>4,o|=o>>4,s=240&a,s|=s>>4,l=15&a,l|=l<<4):7===t.length&&(o=(16711680&a)>>16,s=(65280&a)>>8,l=255&a)),e(o,s,l))}function ce(t,e,r){var n,i,a=Math.min(t/=255,e/=255,r/=255),o=Math.max(t,e,r),s=o-a,l=(o+a)/2;return s?(i=l<.5?s/(o+a):s/(2-o-a),n=t==o?(e-r)/s+(e<r?6:0):e==o?(r-t)/s+2:(t-e)/s+4,n*=60):(n=NaN,i=0<l&&l<1?0:n),new Ut(n,i,l)}function fe(t,e,r){var n=re((.4124564*(t=he(t))+.3575761*(e=he(e))+.1804375*(r=he(r)))/Xt),i=re((.2126729*t+.7151522*e+.072175*r)/$t);return Yt(116*i-16,500*(n-i),200*(i-re((.0193339*t+.119192*e+.9503041*r)/Jt)))}function he(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function pe(t){var e=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*e):e}se.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var e=this.r,r=this.g,n=this.b;return e||r||n?(e&&e<30&&(e=30),r&&r<30&&(r=30),n&&n<30&&(n=30),new ie(Math.min(255,e/t),Math.min(255,r/t),Math.min(255,n/t))):new ie(30,30,30)},se.darker=function(t){return new ie((t=Math.pow(.7,arguments.length?t:1))*this.r,t*this.g,t*this.b)},se.hsl=function(){return ce(this.r,this.g,this.b)},se.toString=function(){return"#"+le(this.r)+le(this.g)+le(this.b)};var de=I.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});function me(t){return"function"==typeof t?t:function(){return t}}function ge(n){return function(t,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=null),ve(t,e,n,r)}}function ve(i,a,o,t){var r,s={},l=I.dispatch("beforesend","progress","load","error"),u={},c=new XMLHttpRequest,f=null;function e(){var t,e,r,n=c.status;if(!n&&((r=(e=c).responseType)&&"text"!==r?e.response:e.responseText)||200<=n&&n<300||304===n){try{t=o.call(s,c)}catch(t){return void l.error.call(s,t)}l.load.call(s,t)}else l.error.call(s,c)}return!this.XDomainRequest||"withCredentials"in c||!/^(http(s)?:)?\/\//.test(i)||(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=e:c.onreadystatechange=function(){3<c.readyState&&e()},c.onprogress=function(t){var e=I.event;I.event=t;try{l.progress.call(s,c)}finally{I.event=e}},s.header=function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?u[t]:(null==e?delete u[t]:u[t]=e+"",s)},s.mimeType=function(t){return arguments.length?(a=null==t?null:t+"",s):a},s.responseType=function(t){return arguments.length?(f=t,s):f},s.response=function(t){return o=t,s},["get","post"].forEach(function(t){s[t]=function(){return s.send.apply(s,[t].concat(h(arguments)))}}),s.send=function(t,e,r){if(2===arguments.length&&"function"==typeof e&&(r=e,e=null),c.open(t,i,!0),null==a||"accept"in u||(u.accept=a+",*/*"),c.setRequestHeader)for(var n in u)c.setRequestHeader(n,u[n]);return null!=a&&c.overrideMimeType&&c.overrideMimeType(a),null!=f&&(c.responseType=f),null!=r&&s.on("error",r).on("load",function(t){r(null,t)}),l.beforesend.call(s,c),c.send(null==e?null:e),s},s.abort=function(){return c.abort(),s},I.rebind(s,l,"on"),null==t?s:s.get(1===(r=t).length?function(t,e){r(null==t?e:null)}:r)}de.forEach(function(t,e){de.set(t,ae(e))}),I.functor=me,I.xhr=ge(N),I.dsv=function(i,a){var e=new RegExp('["'+i+"\n]"),h=i.charCodeAt(0);function o(t,e,r){arguments.length<3&&(r=e,e=null);var n=ve(t,a,null==e?s:l(e),r);return n.row=function(t){return arguments.length?n.response(null==(e=t)?s:l(t)):e},n}function s(t){return o.parse(t.responseText)}function l(e){return function(t){return o.parse(t.responseText,e)}}function r(t){return t.map(u).join(i)}function u(t){return e.test(t)?'"'+t.replace(/\"/g,'""')+'"':t}return o.parse=function(t,n){var i;return o.parseRows(t,function(t,e){if(i)return i(t,e-1);var r=new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+"]"}).join(",")+"}");i=n?function(t,e){return n(r(t),e)}:r})},o.parseRows=function(i,t){var e,a,o={},s={},r=[],l=i.length,u=0,n=0;function c(){if(l<=u)return s;if(a)return a=!1,o;var t=u;if(34===i.charCodeAt(t)){for(var e=t;e++<l;)if(34===i.charCodeAt(e)){if(34!==i.charCodeAt(e+1))break;++e}return u=e+2,13===(r=i.charCodeAt(e+1))?(a=!0,10===i.charCodeAt(e+2)&&++u):10===r&&(a=!0),i.slice(t+1,e).replace(/""/g,'"')}for(;u<l;){var r,n=1;if(10===(r=i.charCodeAt(u++)))a=!0;else if(13===r)a=!0,10===i.charCodeAt(u)&&(++u,++n);else if(r!==h)continue;return i.slice(t,u-n)}return i.slice(t)}for(;(e=c())!==s;){for(var f=[];e!==o&&e!==s;)f.push(e),e=c();t&&null==(f=t(f,n++))||r.push(f)}return r},o.format=function(t){if(Array.isArray(t[0]))return o.formatRows(t);var r=new T,n=[];return t.forEach(function(t){for(var e in t)r.has(e)||n.push(r.add(e))}),[n.map(u).join(i)].concat(t.map(function(e){return n.map(function(t){return u(e[t])}).join(i)})).join("\n")},o.formatRows=function(t){return t.map(r).join("\n")},o},I.csv=I.dsv(",","text/csv"),I.tsv=I.dsv("\t","text/tab-separated-values");var ye,xe,be,_e,we=this[S(this,"requestAnimationFrame")]||function(t){setTimeout(t,17)};function Me(t,e,r){var n=arguments.length;n<2&&(e=0),n<3&&(r=Date.now());var i={c:t,t:r+e,n:null};return xe?xe.n=i:ye=i,xe=i,be||(_e=clearTimeout(_e),be=1,we(Ae)),i}function Ae(){var t=ke(),e=Te()-t;24<e?(isFinite(e)&&(clearTimeout(_e),_e=setTimeout(Ae,e)),be=0):(be=1,we(Ae))}function ke(){for(var t=Date.now(),e=ye;e;)t>=e.t&&e.c(t-e.t)&&(e.c=null),e=e.n;return t}function Te(){for(var t,e=ye,r=1/0;e;)e.c?(e.t<r&&(r=e.t),e=(t=e).n):e=t?t.n=e.n:ye=e.n;return xe=t,r}function Ee(t,e){return e-(t?Math.ceil(Math.log(t)/Math.LN10):1)}I.timer=function(){Me.apply(this,arguments)},I.timer.flush=function(){ke(),Te()},I.round=function(t,e){return e?Math.round(t*(e=Math.pow(10,e)))/e:Math.round(t)};var Se=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"].map(function(t,e){var r=Math.pow(10,3*P(8-e));return{scale:8<e?function(t){return t/r}:function(t){return t*r},symbol:t}});I.formatPrefix=function(t,e){var r=0;return(t=+t)&&(t<0&&(t*=-1),e&&(t=I.round(t,Ee(t,e))),r=1+Math.floor(1e-12+Math.log(t)/Math.LN10),r=Math.max(-24,Math.min(24,3*Math.floor((r-1)/3)))),Se[8+r/3]};var Ce=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,Le=I.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,e){return t.toPrecision(e)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},r:function(t,e){return(t=I.round(t,Ee(t,e))).toFixed(Math.max(0,Math.min(20,Ee(t*(1+1e-15),e))))}});function ze(t){return t+""}var Oe=I.time={},Pe=Date;function Ie(){this._=new Date(1<arguments.length?Date.UTC.apply(this,arguments):arguments[0])}Ie.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(){De.setUTCDate.apply(this._,arguments)},setDay:function(){De.setUTCDay.apply(this._,arguments)},setFullYear:function(){De.setUTCFullYear.apply(this._,arguments)},setHours:function(){De.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){De.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){De.setUTCMinutes.apply(this._,arguments)},setMonth:function(){De.setUTCMonth.apply(this._,arguments)},setSeconds:function(){De.setUTCSeconds.apply(this._,arguments)},setTime:function(){De.setTime.apply(this._,arguments)}};var De=Date.prototype;function Ne(n,a,o){function t(t){var e=n(t),r=i(e,1);return t-e<r-t?e:r}function s(t){return a(t=n(new Pe(t-1)),1),t}function i(t,e){return a(t=new Pe(+t),e),t}function l(t,e,r){var n=s(t),i=[];if(1<r)for(;n<e;)o(n)%r||i.push(new Date(+n)),a(n,1);else for(;n<e;)i.push(new Date(+n)),a(n,1);return i}(n.floor=n).round=t,n.ceil=s,n.offset=i,n.range=l;var e=n.utc=Re(n);return(e.floor=e).round=Re(t),e.ceil=Re(s),e.offset=Re(i),e.range=function(t,e,r){try{var n=new(Pe=Ie);return n._=t,l(n,e,r)}finally{Pe=Date}},n}function Re(n){return function(t,e){try{var r=new(Pe=Ie);return r._=t,n(r,e)._}finally{Pe=Date}}}Oe.year=Ne(function(t){return(t=Oe.day(t)).setMonth(0,1),t},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t){return t.getFullYear()}),Oe.years=Oe.year.range,Oe.years.utc=Oe.year.utc.range,Oe.day=Ne(function(t){var e=new Pe(2e3,0);return e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),e},function(t,e){t.setDate(t.getDate()+e)},function(t){return t.getDate()-1}),Oe.days=Oe.day.range,Oe.days.utc=Oe.day.utc.range,Oe.dayOfYear=function(t){var e=Oe.year(t);return Math.floor((t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(t,r){r=7-r;var e=Oe[t]=Ne(function(t){return(t=Oe.day(t)).setDate(t.getDate()-(t.getDay()+r)%7),t},function(t,e){t.setDate(t.getDate()+7*Math.floor(e))},function(t){var e=Oe.year(t).getDay();return Math.floor((Oe.dayOfYear(t)+(e+r)%7)/7)-(e!==r)});Oe[t+"s"]=e.range,Oe[t+"s"].utc=e.utc.range,Oe[t+"OfYear"]=function(t){var e=Oe.year(t).getDay();return Math.floor((Oe.dayOfYear(t)+(e+r)%7)/7)}}),Oe.week=Oe.sunday,Oe.weeks=Oe.sunday.range,Oe.weeks.utc=Oe.sunday.utc.range,Oe.weekOfYear=Oe.sundayOfYear;var Be={"-":"",_:" ",0:"0"},Fe=/^\s*\d+/,je=/^%/;function Ue(t,e,r){var n=t<0?"-":"",i=(n?-t:t)+"",a=i.length;return n+(a<r?new Array(r-a+1).join(e)+i:i)}function Ve(t){return new RegExp("^(?:"+t.map(I.requote).join("|")+")","i")}function qe(t){for(var e=new y,r=-1,n=t.length;++r<n;)e.set(t[r].toLowerCase(),r);return e}function He(t,e,r){Fe.lastIndex=0;var n=Fe.exec(e.slice(r,r+1));return n?(t.w=+n[0],r+n[0].length):-1}function Ge(t,e,r){Fe.lastIndex=0;var n=Fe.exec(e.slice(r));return n?(t.U=+n[0],r+n[0].length):-1}function We(t,e,r){Fe.lastIndex=0;var n=Fe.exec(e.slice(r));return n?(t.W=+n[0],r+n[0].length):-1}function Ye(t,e,r){Fe.lastIndex=0;var n=Fe.exec(e.slice(r,r+4));return n?(t.y=+n[0],r+n[0].length):-1}function Ze(t,e,r){Fe.lastIndex=0;var n,i=Fe.exec(e.slice(r,r+2));return i?(t.y=(n=+i[0])+(68<n?1900:2e3),r+i[0].length):-1}function Xe(t,e,r){return/^[+-]\d{4}$/.test(e=e.slice(r,r+5))?(t.Z=-e,r+5):-1}function $e(t,e,r){Fe.lastIndex=0;var n=Fe.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function Je(t,e,r){Fe.lastIndex=0;var n=Fe.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function Ke(t,e,r){Fe.lastIndex=0;var n=Fe.exec(e.slice(r,r+3));return n?(t.j=+n[0],r+n[0].length):-1}function Qe(t,e,r){Fe.lastIndex=0;var n=Fe.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function tr(t,e,r){Fe.lastIndex=0;var n=Fe.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function er(t,e,r){Fe.lastIndex=0;var n=Fe.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function rr(t,e,r){Fe.lastIndex=0;var n=Fe.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function nr(t){var e=t.getTimezoneOffset(),r=0<e?"-":"+",n=P(e)/60|0,i=P(e)%60;return r+Ue(n,"0",2)+Ue(i,"0",2)}function ir(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function ar(n){for(var t=n.length,e=-1;++e<t;)n[e][0]=this(n[e][0]);return function(t){for(var e=0,r=n[e];!r[1](t);)r=n[++e];return r[0](t)}}I.locale=function(t){return{numberFormat:(e=t,A=e.decimal,s=e.thousands,l=e.grouping,n=e.currency,k=l&&s?function(t,e){for(var r=t.length,n=[],i=0,a=l[0],o=0;0<r&&0<a&&(e<o+a+1&&(a=Math.max(1,e-o)),n.push(t.substring(r-=a,r+a)),!((o+=a+1)>e));)a=l[i=(i+1)%l.length];return n.reverse().join(s)}:N,function(t){var e=Ce.exec(t),c=e[1]||" ",f=e[2]||">",h=e[3]||"-",r=e[4]||"",p=e[5],d=+e[6],m=e[7],g=e[8],v=e[9],y=1,x="",b="",_=!1,w=!0;switch(g&&(g=+g.substring(1)),(p||"0"===c&&"="===f)&&(p=c="0",f="="),v){case"n":m=!0,v="g";break;case"%":y=100,b="%",v="f";break;case"p":y=100,b="%",v="r";break;case"b":case"o":case"x":case"X":"#"===r&&(x="0"+v.toLowerCase());case"c":w=!1;case"d":_=!0,g=0;break;case"s":y=-1,v="r"}"$"===r&&(x=n[0],b=n[1]),"r"!=v||g||(v="g"),null!=g&&("g"==v?g=Math.max(1,Math.min(21,g)):"e"!=v&&"f"!=v||(g=Math.max(0,Math.min(20,g)))),v=Le.get(v)||ze;var M=p&&m;return function(t){var e=b;if(_&&t%1)return"";var r=t<0||0===t&&1/t<0?(t=-t,"-"):"-"===h?"":h;if(y<0){var n=I.formatPrefix(t,g);t=n.scale(t),e=n.symbol+b}else t*=y;var i,a,o=(t=v(t,g)).lastIndexOf(".");if(o<0){var s=w?t.lastIndexOf("e"):-1;s<0?(i=t,a=""):(i=t.substring(0,s),a=t.substring(s))}else i=t.substring(0,o),a=A+t.substring(o+1);!p&&m&&(i=k(i,1/0));var l=x.length+i.length+a.length+(M?0:r.length),u=l<d?new Array(l=d-l+1).join(c):"";return M&&(i=k(u+i,u.length?d-a.length:1/0)),r+=x,t=i+a,("<"===f?r+t+u:">"===f?u+r+t:"^"===f?u.substring(0,l>>=1)+r+t+u.substring(l):r+(M?t:u+t))+e}}),timeFormat:function(t){var e=t.dateTime,r=t.date,n=t.time,i=t.periods,a=t.days,o=t.shortDays,s=t.months,l=t.shortMonths;function u(s){var l=s.length;function t(t){for(var e,r,n,i=[],a=-1,o=0;++a<l;)37===s.charCodeAt(a)&&(i.push(s.slice(o,a)),null!=(r=Be[e=s.charAt(++a)])&&(e=s.charAt(++a)),(n=b[e])&&(e=n(t,null==r?"e"===e?" ":"0":r)),i.push(e),o=a+1);return i.push(s.slice(o,a)),i.join("")}return t.parse=function(t){var e={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null};if(c(e,s,t,0)!=t.length)return null;"p"in e&&(e.H=e.H%12+12*e.p);var r=null!=e.Z&&Pe!==Ie,n=new(r?Ie:Pe);return"j"in e?n.setFullYear(e.y,0,e.j):"W"in e||"U"in e?("w"in e||(e.w="W"in e?1:0),n.setFullYear(e.y,0,1),n.setFullYear(e.y,0,"W"in e?(e.w+6)%7+7*e.W-(n.getDay()+5)%7:e.w+7*e.U-(n.getDay()+6)%7)):n.setFullYear(e.y,e.m,e.d),n.setHours(e.H+(e.Z/100|0),e.M+e.Z%100,e.S,e.L),r?n._:n},t.toString=function(){return s},t}function c(t,e,r,n){for(var i,a,o,s=0,l=e.length,u=r.length;s<l;){if(u<=n)return-1;if(37===(i=e.charCodeAt(s++))){if(o=e.charAt(s++),!(a=_[o in Be?e.charAt(s++):o])||(n=a(t,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}u.multi=(u.utc=function(t){var r=u(t);function e(t){try{var e=new(Pe=Ie);return e._=t,r(e)}finally{Pe=Date}}return e.parse=function(t){try{Pe=Ie;var e=r.parse(t);return e&&e._}finally{Pe=Date}},e.toString=r.toString,e}).multi=ar;var f=I.map(),h=Ve(a),p=qe(a),d=Ve(o),m=qe(o),g=Ve(s),v=qe(s),y=Ve(l),x=qe(l);i.forEach(function(t,e){f.set(t.toLowerCase(),e)});var b={a:function(t){return o[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return l[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:u(e),d:function(t,e){return Ue(t.getDate(),e,2)},e:function(t,e){return Ue(t.getDate(),e,2)},H:function(t,e){return Ue(t.getHours(),e,2)},I:function(t,e){return Ue(t.getHours()%12||12,e,2)},j:function(t,e){return Ue(1+Oe.dayOfYear(t),e,3)},L:function(t,e){return Ue(t.getMilliseconds(),e,3)},m:function(t,e){return Ue(t.getMonth()+1,e,2)},M:function(t,e){return Ue(t.getMinutes(),e,2)},p:function(t){return i[+(12<=t.getHours())]},S:function(t,e){return Ue(t.getSeconds(),e,2)},U:function(t,e){return Ue(Oe.sundayOfYear(t),e,2)},w:function(t){return t.getDay()},W:function(t,e){return Ue(Oe.mondayOfYear(t),e,2)},x:u(r),X:u(n),y:function(t,e){return Ue(t.getFullYear()%100,e,2)},Y:function(t,e){return Ue(t.getFullYear()%1e4,e,4)},Z:nr,"%":function(){return"%"}},_={a:function(t,e,r){d.lastIndex=0;var n=d.exec(e.slice(r));return n?(t.w=m.get(n[0].toLowerCase()),r+n[0].length):-1},A:function(t,e,r){h.lastIndex=0;var n=h.exec(e.slice(r));return n?(t.w=p.get(n[0].toLowerCase()),r+n[0].length):-1},b:function(t,e,r){y.lastIndex=0;var n=y.exec(e.slice(r));return n?(t.m=x.get(n[0].toLowerCase()),r+n[0].length):-1},B:function(t,e,r){g.lastIndex=0;var n=g.exec(e.slice(r));return n?(t.m=v.get(n[0].toLowerCase()),r+n[0].length):-1},c:function(t,e,r){return c(t,b.c.toString(),e,r)},d:Je,e:Je,H:Qe,I:Qe,j:Ke,L:rr,m:$e,M:tr,p:function(t,e,r){var n=f.get(e.slice(r,r+=2).toLowerCase());return null==n?-1:(t.p=n,r)},S:er,U:Ge,w:He,W:We,x:function(t,e,r){return c(t,b.x.toString(),e,r)},X:function(t,e,r){return c(t,b.X.toString(),e,r)},y:Ze,Y:Ye,Z:Xe,"%":ir};return u}(t)};var e,A,s,l,n,k};var or=I.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function sr(){}I.format=or.numberFormat,I.geo={},sr.prototype={s:0,t:0,add:function(t){ur(t,this.t,lr),ur(lr.s,this.s,this),this.s?this.t+=lr.t:this.s=lr.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var lr=new sr;function ur(t,e,r){var n=r.s=t+e,i=n-t,a=n-i;r.t=t-a+(e-i)}function cr(t,e){t&&hr.hasOwnProperty(t.type)&&hr[t.type](t,e)}I.geo.stream=function(t,e){t&&fr.hasOwnProperty(t.type)?fr[t.type](t,e):cr(t,e)};var fr={Feature:function(t,e){cr(t.geometry,e)},FeatureCollection:function(t,e){for(var r=t.features,n=-1,i=r.length;++n<i;)cr(r[n].geometry,e)}},hr={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var r=t.coordinates,n=-1,i=r.length;++n<i;)t=r[n],e.point(t[0],t[1],t[2])},LineString:function(t,e){pr(t.coordinates,e,0)},MultiLineString:function(t,e){for(var r=t.coordinates,n=-1,i=r.length;++n<i;)pr(r[n],e,0)},Polygon:function(t,e){dr(t.coordinates,e)},MultiPolygon:function(t,e){for(var r=t.coordinates,n=-1,i=r.length;++n<i;)dr(r[n],e)},GeometryCollection:function(t,e){for(var r=t.geometries,n=-1,i=r.length;++n<i;)cr(r[n],e)}};function pr(t,e,r){var n,i=-1,a=t.length-r;for(e.lineStart();++i<a;)n=t[i],e.point(n[0],n[1],n[2]);e.lineEnd()}function dr(t,e){var r=-1,n=t.length;for(e.polygonStart();++r<n;)pr(t[r],e,1);e.polygonEnd()}I.geo.area=function(t){return mr=0,I.geo.stream(t,Sr),mr};var mr,gr,vr,yr,xr,br,_r,wr,Mr,Ar,kr,Tr,Er=new sr,Sr={sphere:function(){mr+=4*At},point:L,lineStart:L,lineEnd:L,polygonStart:function(){Er.reset(),Sr.lineStart=Cr},polygonEnd:function(){var t=2*Er;mr+=t<0?4*At+t:t,Sr.lineStart=Sr.lineEnd=Sr.point=L}};function Cr(){var r,n,c,f,h;function i(t,e){e=e*St/2+At/4;var r=(t*=St)-c,n=0<=r?1:-1,i=n*r,a=Math.cos(e),o=Math.sin(e),s=h*o,l=f*a+s*Math.cos(i),u=s*n*Math.sin(i);Er.add(Math.atan2(u,l)),c=t,f=a,h=o}Sr.point=function(t,e){Sr.point=i,c=(r=t)*St,f=Math.cos(e=(n=e)*St/2+At/4),h=Math.sin(e)},Sr.lineEnd=function(){i(r,n)}}function Lr(t){var e=t[0],r=t[1],n=Math.cos(r);return[n*Math.cos(e),n*Math.sin(e),Math.sin(r)]}function zr(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Or(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function Pr(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function Ir(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function Dr(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function Nr(t){return[Math.atan2(t[1],t[0]),Pt(t[2])]}function Rr(t,e){return P(t[0]-e[0])<wt&&P(t[1]-e[1])<wt}I.geo.bounds=function(){var c,f,h,p,d,n,i,m,a,l,u,g={point:v,lineStart:t,lineEnd:e,polygonStart:function(){g.point=r,g.lineStart=s,g.lineEnd=y,a=0,Sr.polygonStart()},polygonEnd:function(){Sr.polygonEnd(),g.point=v,g.lineStart=t,g.lineEnd=e,Er<0?(c=-(h=180),f=-(p=90)):wt<a?p=90:a<-wt&&(f=-90),u[0]=c,u[1]=h}};function v(t,e){l.push(u=[c=t,h=t]),e<f&&(f=e),p<e&&(p=e)}function o(t,e){var r=Lr([t*St,e*St]);if(m){var n=Or(m,r),i=Or([n[1],-n[0],0],n);Dr(i),i=Nr(i);var a=t-d,o=0<a?1:-1,s=i[0]*Ct*o,l=180<P(a);if(l^(o*d<s&&s<o*t)){var u=i[1]*Ct;p<u&&(p=u)}else if(l^(o*d<(s=(s+360)%360-180)&&s<o*t)){(u=-i[1]*Ct)<f&&(f=u)}else e<f&&(f=e),p<e&&(p=e);l?t<d?x(c,t)>x(c,h)&&(h=t):x(t,h)>x(c,h)&&(c=t):c<=h?(t<c&&(c=t),h<t&&(h=t)):d<t?x(c,t)>x(c,h)&&(h=t):x(t,h)>x(c,h)&&(c=t)}else v(t,e);m=r,d=t}function t(){g.point=o}function e(){u[0]=c,u[1]=h,g.point=v,m=null}function r(t,e){if(m){var r=t-d;a+=180<P(r)?r+(0<r?360:-360):r}else n=t,i=e;Sr.point(t,e),o(t,e)}function s(){Sr.lineStart()}function y(){r(n,i),Sr.lineEnd(),P(a)>wt&&(c=-(h=180)),u[0]=c,u[1]=h,m=null}function x(t,e){return(e-=t)<0?e+360:e}function b(t,e){return t[0]-e[0]}function _(t,e){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:t<e[0]||e[1]<t}return function(t){if(p=h=-(c=f=1/0),l=[],I.geo.stream(t,g),i=l.length){l.sort(b);for(var e=1,r=[s=l[0]];e<i;++e)_((a=l[e])[0],s)||_(a[1],s)?(x(s[0],a[1])>x(s[0],s[1])&&(s[1]=a[1]),x(a[0],s[1])>x(s[0],s[1])&&(s[0]=a[0])):r.push(s=a);for(var n,i,a,o=-1/0,s=(e=0,r[i=r.length-1]);e<=i;s=a,++e)a=r[e],(n=x(s[1],a[0]))>o&&(o=n,c=a[0],h=s[1])}return l=u=null,c===1/0||f===1/0?[[NaN,NaN],[NaN,NaN]]:[[c,f],[h,p]]}}(),I.geo.centroid=function(t){gr=vr=yr=xr=br=_r=wr=Mr=Ar=kr=Tr=0,I.geo.stream(t,Br);var e=Ar,r=kr,n=Tr,i=e*e+r*r+n*n;return i<Mt&&(e=_r,r=wr,n=Mr,vr<wt&&(e=yr,r=xr,n=br),(i=e*e+r*r+n*n)<Mt)?[NaN,NaN]:[Math.atan2(r,e)*Ct,Pt(n/Math.sqrt(i))*Ct]};var Br={sphere:L,point:Fr,lineStart:Ur,lineEnd:Vr,polygonStart:function(){Br.lineStart=qr},polygonEnd:function(){Br.lineStart=Ur}};function Fr(t,e){t*=St;var r=Math.cos(e*=St);jr(r*Math.cos(t),r*Math.sin(t),Math.sin(e))}function jr(t,e,r){yr+=(t-yr)/++gr,xr+=(e-xr)/gr,br+=(r-br)/gr}function Ur(){var s,l,u;function n(t,e){t*=St;var r=Math.cos(e*=St),n=r*Math.cos(t
 
+
Displaying 3DVariance.html.
 
+
<div class="column full_size">
+
<h1> Modeling</h1>
+
 
+
<p>Mathematical models and computer simulations provide a great way to describe the function and operation of BioBrick Parts and Devices. Synthetic Biology is an engineering discipline, and part of engineering is simulation and modeling to determine the behavior of your design before you build it. Designing and simulating can be iterated many times in a computer before moving to the lab. This award is for teams who build a model of their system and use it to inform system design or simulate expected behavior in conjunction with experiments in the wetlab.</p>
+
 
+
</div>
+
<div class="clear"></div>
+
 
+
<div class="column full_size">
+
<h3> Gold Medal Criterion #3</h3>
+
<p>
+
Convince the judges that your project's design and/or implementation is based on insight you have gained from modeling. This could be either a new model you develop or the implementation of a model from a previous team. You must thoroughly document your model's contribution to your project on your team's wiki, including assumptions, relevant data, model results, and a clear explanation of your model that anyone can understand.
+
<br><br>
+
The model should impact your project design in a meaningful way. Modeling may include, but is not limited to, deterministic, exploratory, molecular dynamic, and stochastic models. Teams may also explore the physical modeling of a single component within a system or utilize mathematical modeling for predicting function of a more complex device.
+
</p>
+
 
+
<p>
+
Please see the <a href="https://2018.igem.org/Judging/Medals"> 2018
+
Medals Page</a> for more information.
+
</p>
+
</div>
+
 
+
<div class="column two_thirds_size">
+
<h3>Best Model Special Prize</h3>
+
 
+
<p>
+
To compete for the <a href="https://2018.igem.org/Judging/Awards">Best Model prize</a>, please describe your work on this page  and also fill out the description on the <a href="https://2018.igem.org/Judging/Judging_Form">judging form</a>. Please note you can compete for both the gold medal criterion #3 and the best model prize with this page.
+
<br><br>
+
You must also delete the message box on the top of this page to be eligible for the Best Model Prize.
+
</p>
+
 
+
</div>
+
 
+
 
+
<div class="column third_size">
+
<div class="highlight decoration_A_full">
+
<h3> Inspiration </h3>
+
<p>
+
Here are a few examples from previous teams:
+
</p>
+
<ul>
+
<li><a href="https://2016.igem.org/Team:Manchester/Model">2016 Manchester</a></li>
+
<li><a href="https://2016.igem.org/Team:TU_Delft/Model">2016 TU Delft</li>
+
<li><a href="https://2014.igem.org/Team:ETH_Zurich/modeling/overview">2014 ETH Zurich</a></li>
+
<li><a href="https://2014.igem.org/Team:Waterloo/Math_Book">2014 Waterloo</a></li>
+
</ul>
+
</div>
+
</div>
+
 
+
 
</html>
 
</html>

Revision as of 00:49, 13 October 2018