sequenceserver 2.0.0.rc8 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of sequenceserver might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/bin/sequenceserver +22 -30
- data/lib/sequenceserver/api_errors.rb +5 -1
- data/lib/sequenceserver/blast/constants.rb +1 -1
- data/lib/sequenceserver/blast/hit.rb +5 -16
- data/lib/sequenceserver/blast/job.rb +9 -18
- data/lib/sequenceserver/blast/report.rb +5 -3
- data/lib/sequenceserver/config.rb +4 -1
- data/lib/sequenceserver/database.rb +69 -9
- data/lib/sequenceserver/job.rb +1 -1
- data/lib/sequenceserver/makeblastdb.rb +40 -45
- data/lib/sequenceserver/routes.rb +4 -0
- data/lib/sequenceserver/version.rb +1 -1
- data/lib/sequenceserver.rb +15 -11
- data/public/config.js +143 -142
- data/public/css/fonts.css +23 -22
- data/public/css/grapher.css +598 -594
- data/public/css/sequenceserver.css +86 -24
- data/public/css/sequenceserver.min.css +2 -2
- data/public/js/alignment_exporter.js +14 -14
- data/public/js/databases_tree.js +215 -0
- data/public/js/download_fasta.js +1 -1
- data/public/js/hit.js +6 -2
- data/public/js/hits_overview.js +1 -1
- data/public/js/length_distribution.js +5 -5
- data/public/js/query.js +4 -7
- data/public/js/report.js +12 -24
- data/public/js/search.js +21 -2
- data/public/js/sidebar.js +4 -4
- data/public/js/svgExporter.js +12 -12
- data/public/js/visualisation_helpers.js +4 -5
- data/public/sequenceserver-report.min.js +11 -11
- data/public/sequenceserver-search.min.js +15 -11
- data/public/vendor/github/vakata/jstree@3.3.8/LICENSE-MIT +22 -0
- data/public/vendor/github/vakata/jstree@3.3.8/README.md +663 -0
- data/public/vendor/github/vakata/jstree@3.3.8/bower.json +33 -0
- data/public/vendor/github/vakata/jstree@3.3.8/component.json +28 -0
- data/public/vendor/github/vakata/jstree@3.3.8/composer.json +46 -0
- data/public/vendor/github/vakata/jstree@3.3.8/demo/README.md +2 -0
- data/public/vendor/github/vakata/jstree@3.3.8/demo/basic/index.html +146 -0
- data/public/vendor/github/vakata/jstree@3.3.8/demo/basic/root.json +1 -0
- data/public/vendor/github/vakata/jstree@3.3.8/dist/jstree.js +8612 -0
- data/public/vendor/github/vakata/jstree@3.3.8/dist/jstree.min.js +6 -0
- data/public/vendor/github/vakata/jstree@3.3.8/dist/themes/default/32px.png +0 -0
- data/public/vendor/github/vakata/jstree@3.3.8/dist/themes/default/40px.png +0 -0
- data/public/vendor/github/vakata/jstree@3.3.8/dist/themes/default/style.css +1102 -0
- data/public/vendor/github/vakata/jstree@3.3.8/dist/themes/default/style.min.css +1 -0
- data/public/vendor/github/vakata/jstree@3.3.8/dist/themes/default/throbber.gif +0 -0
- data/public/vendor/github/vakata/jstree@3.3.8/dist/themes/default-dark/32px.png +0 -0
- data/public/vendor/github/vakata/jstree@3.3.8/dist/themes/default-dark/40px.png +0 -0
- data/public/vendor/github/vakata/jstree@3.3.8/dist/themes/default-dark/style.css +1146 -0
- data/public/vendor/github/vakata/jstree@3.3.8/dist/themes/default-dark/style.min.css +1 -0
- data/public/vendor/github/vakata/jstree@3.3.8/dist/themes/default-dark/throbber.gif +0 -0
- data/public/vendor/github/vakata/jstree@3.3.8/gruntfile.js +242 -0
- data/public/vendor/github/vakata/jstree@3.3.8/jstree.jquery.json +28 -0
- data/public/vendor/github/vakata/jstree@3.3.8/package.json +58 -0
- data/public/vendor/github/vakata/jstree@3.3.8/src/intro.js +14 -0
- data/public/vendor/github/vakata/jstree@3.3.8/src/jstree.changed.js +69 -0
- data/public/vendor/github/vakata/jstree@3.3.8/src/jstree.checkbox.js +976 -0
- data/public/vendor/github/vakata/jstree@3.3.8/src/jstree.conditionalselect.js +38 -0
- data/public/vendor/github/vakata/jstree@3.3.8/src/jstree.contextmenu.js +661 -0
- data/public/vendor/github/vakata/jstree@3.3.8/src/jstree.dnd.js +669 -0
- data/public/vendor/github/vakata/jstree@3.3.8/src/jstree.js +4931 -0
- data/public/vendor/github/vakata/jstree@3.3.8/src/jstree.massload.js +137 -0
- data/public/vendor/github/vakata/jstree@3.3.8/src/jstree.search.js +421 -0
- data/public/vendor/github/vakata/jstree@3.3.8/src/jstree.sort.js +74 -0
- data/public/vendor/github/vakata/jstree@3.3.8/src/jstree.state.js +138 -0
- data/public/vendor/github/vakata/jstree@3.3.8/src/jstree.types.js +372 -0
- data/public/vendor/github/vakata/jstree@3.3.8/src/jstree.unique.js +164 -0
- data/public/vendor/github/vakata/jstree@3.3.8/src/jstree.wholerow.js +122 -0
- data/public/vendor/github/vakata/jstree@3.3.8/src/misc.js +656 -0
- data/public/vendor/github/vakata/jstree@3.3.8/src/outro.js +1 -0
- data/public/vendor/github/vakata/jstree@3.3.8/src/sample.js +93 -0
- data/public/vendor/github/vakata/jstree@3.3.8/src/themes/base.less +93 -0
- data/public/vendor/github/vakata/jstree@3.3.8/src/themes/default/32px.png +0 -0
- data/public/vendor/github/vakata/jstree@3.3.8/src/themes/default/40px.png +0 -0
- data/public/vendor/github/vakata/jstree@3.3.8/src/themes/default/style.css +1102 -0
- data/public/vendor/github/vakata/jstree@3.3.8/src/themes/default/style.less +22 -0
- data/public/vendor/github/vakata/jstree@3.3.8/src/themes/default/throbber.gif +0 -0
- data/public/vendor/github/vakata/jstree@3.3.8/src/themes/default-dark/32px.png +0 -0
- data/public/vendor/github/vakata/jstree@3.3.8/src/themes/default-dark/40px.png +0 -0
- data/public/vendor/github/vakata/jstree@3.3.8/src/themes/default-dark/style.css +1146 -0
- data/public/vendor/github/vakata/jstree@3.3.8/src/themes/default-dark/style.less +50 -0
- data/public/vendor/github/vakata/jstree@3.3.8/src/themes/default-dark/throbber.gif +0 -0
- data/public/vendor/github/vakata/jstree@3.3.8/src/themes/main.less +77 -0
- data/public/vendor/github/vakata/jstree@3.3.8/src/themes/mixins.less +104 -0
- data/public/vendor/github/vakata/jstree@3.3.8/src/themes/responsive.less +67 -0
- data/public/vendor/github/vakata/jstree@3.3.8/src/vakata-jstree.js +38 -0
- data/public/vendor/github/vakata/jstree@3.3.8/test/unit/index.html +16 -0
- data/public/vendor/github/vakata/jstree@3.3.8/test/unit/libs/qunit.css +244 -0
- data/public/vendor/github/vakata/jstree@3.3.8/test/unit/libs/qunit.js +2212 -0
- data/public/vendor/github/vakata/jstree@3.3.8/test/unit/test.js +11 -0
- data/public/vendor/github/vakata/jstree@3.3.8/test/visual/desktop/index.html +44 -0
- data/public/vendor/github/vakata/jstree@3.3.8/test/visual/mobile/index.html +42 -0
- data/public/vendor/github/vakata/jstree@3.3.8/test/visual/screenshots/desktop/desktop.png +0 -0
- data/public/vendor/github/vakata/jstree@3.3.8/test/visual/screenshots/desktop/home.png +0 -0
- data/public/vendor/github/vakata/jstree@3.3.8/test/visual/screenshots/mobile/home.png +0 -0
- data/public/vendor/github/vakata/jstree@3.3.8/test/visual/screenshots/mobile/mobile.png +0 -0
- data/public/vendor/github/vakata/jstree@3.3.8.js +3 -0
- data/public/vendor/system-csp-production.js +3 -3
- data/public/vendor/system-csp-production.js.map +1 -1
- data/public/vendor/system-csp-production.src.js +146 -140
- data/public/vendor/system-polyfills.js.map +1 -1
- data/public/vendor/system-polyfills.src.js +1 -0
- data/public/vendor/system.js +3 -3
- data/public/vendor/system.js.map +1 -1
- data/public/vendor/system.src.js +4771 -2383
- data/views/_options.erb +21 -0
- data/views/layout.erb +17 -18
- metadata +102 -43
- data/bin/chromedriver +0 -0
- data/bin/geckodriver +0 -0
- data/public/shims/form-core.js +0 -3
- data/public/shims/form-validation.js +0 -3
- data/public/shims/plugins/jquery.ui.position.js +0 -13
- data/public/shims/styles/shim.css +0 -1
@@ -1,19 +1,19 @@
|
|
1
1
|
!function(a){function b(a,b,e){return 4===arguments.length?c.apply(this,arguments):void d(a,{declarative:!0,deps:b,declare:e})}function c(a,b,c,e){d(a,{declarative:!1,deps:b,executingRequire:c,execute:e})}function d(a,b){b.name=a,a in o||(o[a]=b),b.normalizedDeps=b.deps}function e(a,b){if(b[a.groupIndex]=b[a.groupIndex]||[],-1==p.call(b[a.groupIndex],a)){b[a.groupIndex].push(a);for(var c=0,d=a.normalizedDeps.length;d>c;c++){var f=a.normalizedDeps[c],g=o[f];if(g&&!g.evaluated){var h=a.groupIndex+(g.declarative!=a.declarative);if(void 0===g.groupIndex||g.groupIndex<h){if(void 0!==g.groupIndex&&(b[g.groupIndex].splice(p.call(b[g.groupIndex],g),1),0==b[g.groupIndex].length))throw new TypeError("Mixed dependency cycle detected");g.groupIndex=h}e(g,b)}}}}function f(a){var b=o[a];b.groupIndex=0;var c=[];e(b,c);for(var d=!!b.declarative==c.length%2,f=c.length-1;f>=0;f--){for(var g=c[f],i=0;i<g.length;i++){var k=g[i];d?h(k):j(k)}d=!d}}function g(a){return s[a]||(s[a]={name:a,dependencies:[],exports:{},importers:[]})}function h(b){if(!b.module){var c=b.module=g(b.name),d=b.module.exports,e=b.declare.call(a,function(a,b){if(c.locked=!0,"object"==typeof a)for(var e in a)d[e]=a[e];else d[a]=b;for(var f=0,g=c.importers.length;g>f;f++){var h=c.importers[f];if(!h.locked)for(var i=0;i<h.dependencies.length;++i)h.dependencies[i]===c&&h.setters[i](d)}return c.locked=!1,b},{id:b.name});c.setters=e.setters,c.execute=e.execute;for(var f=0,i=b.normalizedDeps.length;i>f;f++){var j,k=b.normalizedDeps[f],l=o[k],m=s[k];m?j=m.exports:l&&!l.declarative?j=l.esModule:l?(h(l),m=l.module,j=m.exports):j=n(k),m&&m.importers?(m.importers.push(c),c.dependencies.push(m)):c.dependencies.push(null),c.setters[f]&&c.setters[f](j)}}}function i(a){var b,c=o[a];if(c)c.declarative?m(a,[]):c.evaluated||j(c),b=c.module.exports;else if(b=n(a),!b)throw new Error("Unable to load dependency "+a+".");return(!c||c.declarative)&&b&&b.__useDefault?b.default:b}function j(b){if(!b.module){var c={},d=b.module={exports:c,id:b.name};if(!b.executingRequire)for(var e=0,f=b.normalizedDeps.length;f>e;e++){var g=b.normalizedDeps[e],h=o[g];h&&j(h)}b.evaluated=!0;var l=b.execute.call(a,function(a){for(var c=0,d=b.deps.length;d>c;c++)if(b.deps[c]==a)return i(b.normalizedDeps[c]);throw new TypeError("Module "+a+" not declared as a dependency.")},c,d);void 0!==l&&(d.exports=l),c=d.exports,c&&c.__esModule?b.esModule=c:b.esModule=k(c)}}function k(b){var c={};if(("object"==typeof b||"function"==typeof b)&&b!==a)if(q)for(var d in b)"default"!==d&&l(c,b,d);else{var e=b&&b.hasOwnProperty;for(var d in b)"default"===d||e&&!b.hasOwnProperty(d)||(c[d]=b[d])}return c.default=b,r(c,"__useDefault",{value:!0}),c}function l(a,b,c){try{var d;(d=Object.getOwnPropertyDescriptor(b,c))&&r(a,c,d)}catch(d){return a[c]=b[c],!1}}function m(b,c){var d=o[b];if(d&&!d.evaluated&&d.declarative){c.push(b);for(var e=0,f=d.normalizedDeps.length;f>e;e++){var g=d.normalizedDeps[e];-1==p.call(c,g)&&(o[g]?m(g,c):n(g))}d.evaluated||(d.evaluated=!0,d.module.execute.call(a))}}function n(a){if(u[a])return u[a];if("@node/"==a.substr(0,6))return u[a]=k(t(a.substr(6)));var b=o[a];if(!b)throw"Module "+a+" not present.";return f(a),m(a,[]),o[a]=void 0,b.declarative&&r(b.module.exports,"__esModule",{value:!0}),u[a]=b.declarative?b.module.exports:b.esModule}var o={},p=Array.prototype.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},q=!0;try{Object.getOwnPropertyDescriptor({a:0},"a")}catch(a){q=!1}var r;!function(){try{Object.defineProperty({},"a",{})&&(r=Object.defineProperty)}catch(a){r=function(a,b,c){try{a[b]=c.value||c.get.call(a)}catch(a){}}}}();var s={},t="undefined"!=typeof System&&System._nodeRequire||"undefined"!=typeof require&&"undefined"!=typeof require.resolve&&"undefined"!=typeof process&&process.platform&&require,u={"@empty":{}};return function(a,d,e,f){return function(g){g(function(g){for(var h={_nodeRequire:t,register:b,registerDynamic:c,get:n,set:function(a,b){u[a]=b},newModule:function(a){return a}},i=0;i<d.length;i++)(function(a,b){b&&b.__esModule?u[a]=b:u[a]=k(b)})(d[i],arguments[i]);f(h);var j=n(a[0]);if(a.length>1)for(var i=1;i<a.length;i++)n(a[i]);return e?j.default:j})}}}("undefined"!=typeof self?self:global)(["1"],[],!1,function(c){var e=this.require,f=(this.exports,this.module);!function(a){function b(a,b){for(var c=a.split(".");c.length;)b=b[c.shift()];return b}function d(c){if("string"==typeof c)return b(c,a);if(!(c instanceof Array))throw new Error("Global exports must be a string or array.");for(var d={},e=!0,f=0;f<c.length;f++){var g=b(c[f],a);e&&(d.default=g,e=!1),d[c[f].split(".").pop()]=g}return d}function e(b){if(Object.keys)Object.keys(a).forEach(b);else for(var c in a)i.call(a,c)&&b(c)}function f(b){e(function(c){if(-1==j.call(k,c)){try{var d=a[c]}catch(a){k.push(c)}b(c,d)}})}var g,h=c,i=Object.prototype.hasOwnProperty,j=Array.prototype.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},k=["_g","sessionStorage","localStorage","clipboardData","frames","frameElement","external","mozAnimationStartTime","webkitStorageInfo","webkitIndexedDB","mozInnerScreenY","mozInnerScreenX"];h.set("@@global-helpers",h.newModule({prepareGlobal:function(b,c,e){var h=a.define;a.define=void 0;var i;if(e){i={};for(var j in e)i[j]=a[j],a[j]=e[j]}return c||(g={},f(function(a,b){g[a]=b})),function(){var b;if(c)b=d(c);else{b={};var e,j;f(function(a,c){g[a]!==c&&"undefined"!=typeof c&&(b[a]=c,"undefined"!=typeof e?j||e===c||(j=!0):e=c)}),b=j?b:e}if(i)for(var k in i)a[k]=i[k];return a.define=h,b}}}))}("undefined"!=typeof self?self:global),!function(a){function b(a,b){a=a.replace(h,"");var c=a.match(k),d=(c[1].split(",")[b]||"require").replace(l,""),e=m[d]||(m[d]=new RegExp(i+d+j,"g"));e.lastIndex=0;for(var f,g=[];f=e.exec(a);)g.push(f[2]||f[3]);return g}function d(a,b,c,e){if("object"==typeof a&&!(a instanceof Array))return d.apply(null,Array.prototype.splice.call(arguments,1,arguments.length-1));if("string"==typeof a&&"function"==typeof b&&(a=[a]),!(a instanceof Array)){if("string"==typeof a){var g=f.get(a);return g.__useDefault?g.default:g}throw new TypeError("Invalid require")}for(var h=[],i=0;i<a.length;i++)h.push(f.import(a[i],e));Promise.all(h).then(function(a){b&&b.apply(null,a)},c)}function e(c,e,h){"string"!=typeof c&&(h=e,e=c,c=null),e instanceof Array||(h=e,e=["require","exports","module"].splice(0,h.length)),"function"!=typeof h&&(h=function(a){return function(){return a}}(h)),void 0===e[e.length-1]&&e.pop();var i,j,k;-1!=(i=g.call(e,"require"))&&(e.splice(i,1),c||(e=e.concat(b(h.toString(),i)))),-1!=(j=g.call(e,"exports"))&&e.splice(j,1),-1!=(k=g.call(e,"module"))&&e.splice(k,1);var l={name:c,deps:e,execute:function(b,c,g){for(var l=[],m=0;m<e.length;m++)l.push(b(e[m]));g.uri=g.id,g.config=function(){},-1!=k&&l.splice(k,0,g),-1!=j&&l.splice(j,0,c),-1!=i&&l.splice(i,0,function(a,c,e){return"string"==typeof a&&"function"!=typeof c?b(a):d.call(f,a,c,e,g.id)});var n=h.apply(-1==j?a:c,l);return"undefined"==typeof n&&g&&(n=g.exports),"undefined"!=typeof n?n:void 0}};if(c)n.anonDefine||n.isBundle?n.anonDefine&&n.anonDefine.name&&(n.anonDefine=null):n.anonDefine=l,n.isBundle=!0,f.registerDynamic(l.name,l.deps,!1,l.execute);else{if(n.anonDefine&&!n.anonDefine.name)throw new Error("Multiple anonymous defines in module "+c);n.anonDefine=l}}var f=c,g=Array.prototype.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},h=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm,i="(?:^|[^$_a-zA-Z\\xA0-\\uFFFF.])",j="\\s*\\(\\s*(\"([^\"]+)\"|'([^']+)')\\s*\\)",k=/\(([^\)]*)\)/,l=/^\s+|\s+$/g,m={};e.amd={};var n={isBundle:!1,anonDefine:null};f.amdDefine=e,f.amdRequire=d}("undefined"!=typeof self?self:global),c.registerDynamic("2",["3"],!0,function(a,b,c){var d=(this||self,a("3"));c.exports=function(a){var b=d.getKeys(a),c=d.getSymbols;if(c)for(var e,f=c(a),g=d.isEnum,h=0;f.length>h;)g.call(a,e=f[h++])&&b.push(e);return b}}),c.registerDynamic("4",["5","6","2"],!0,function(a,b,c){var d=(this||self,a("5")),e=a("6"),f=a("2");c.exports=Object.assign||function(a,b){for(var c=d(a),g=arguments.length,h=1;g>h;)for(var i,j=e(arguments[h++]),k=f(j),l=k.length,m=0;l>m;)c[i=k[m++]]=j[i];return c}}),c.registerDynamic("7",["8","4"],!0,function(a,b,c){var d=(this||self,a("8"));d(d.S,"Object",{assign:a("4")})}),c.registerDynamic("9",["7","a"],!0,function(a,b,c){this||self;a("7"),c.exports=a("a").Object.assign}),c.registerDynamic("b",["9"],!0,function(a,b,c){this||self;c.exports={default:a("9"),__esModule:!0}}),c.registerDynamic("c",["b"],!0,function(a,b,c){"use strict";var d=(this||self,a("b").default);b.default=d||function(a){for(var b=1;b<arguments.length;b++){var c=arguments[b];for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(a[d]=c[d])}return a},b.__esModule=!0}),function(){var a=c.amdDefine;!function(b){"function"==typeof a&&a.amd?a("d",["f","e"],b):b(jQuery)}(function(a){return a.effects.effect.drop=function(b,c){var d,e=a(this),f=["position","top","bottom","left","right","opacity","height","width"],g=a.effects.setMode(e,b.mode||"hide"),h="show"===g,i=b.direction||"left",j="up"===i||"down"===i?"top":"left",k="up"===i||"left"===i?"pos":"neg",l={opacity:h?1:0};a.effects.save(e,f),e.show(),a.effects.createWrapper(e),d=b.distance||e["top"===j?"outerHeight":"outerWidth"](!0)/2,h&&e.css("opacity",0).css(j,"pos"===k?-d:d),l[j]=(h?"pos"===k?"+=":"-=":"pos"===k?"-=":"+=")+d,e.animate(l,{queue:!1,duration:b.duration,easing:b.easing,complete:function(){"hide"===g&&e.hide(),a.effects.restore(e,f),a.effects.removeWrapper(e),c()}})}})}(),function(){var a=c.amdDefine;!function(b){"function"==typeof a&&a.amd?a("e",["f"],b):b(jQuery)}(function(a){var b="ui-effects-",c=a;return a.effects={effect:{}},function(a,b){function c(a,b,c){var d=l[b.type]||{};return null==a?c||!b.def?null:b.def:(a=d.floor?~~a:parseFloat(a),isNaN(a)?b.def:d.mod?(a+d.mod)%d.mod:0>a?0:d.max<a?d.max:a)}function d(b){var c=j(),d=c._rgba=[];return b=b.toLowerCase(),o(i,function(a,e){var f,g=e.re.exec(b),h=g&&e.parse(g),i=e.space||"rgba";if(h)return f=c[i](h),c[k[i].cache]=f[k[i].cache],d=c._rgba=f._rgba,!1}),d.length?("0,0,0,0"===d.join()&&a.extend(d,f.transparent),c):f[b]}function e(a,b,c){return c=(c+1)%1,6*c<1?a+(b-a)*c*6:2*c<1?b:3*c<2?a+(b-a)*(2/3-c)*6:a}var f,g="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",h=/^([\-+])=\s*(\d+\.?\d*)/,i=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(a){return[a[1],a[2],a[3],a[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(a){return[2.55*a[1],2.55*a[2],2.55*a[3],a[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(a){return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(a){return[a[1],a[2]/100,a[3]/100,a[4]]}}],j=a.Color=function(b,c,d,e){return new a.Color.fn.parse(b,c,d,e)},k={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},l={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},m=j.support={},n=a("<p>")[0],o=a.each;n.style.cssText="background-color:rgba(1,1,1,.5)",m.rgba=n.style.backgroundColor.indexOf("rgba")>-1,o(k,function(a,b){b.cache="_"+a,b.props.alpha={idx:3,type:"percent",def:1}}),j.fn=a.extend(j.prototype,{parse:function(e,g,h,i){if(e===b)return this._rgba=[null,null,null,null],this;(e.jquery||e.nodeType)&&(e=a(e).css(g),g=b);var l=this,m=a.type(e),n=this._rgba=[];return g!==b&&(e=[e,g,h,i],m="array"),"string"===m?this.parse(d(e)||f._default):"array"===m?(o(k.rgba.props,function(a,b){n[b.idx]=c(e[b.idx],b)}),this):"object"===m?(e instanceof j?o(k,function(a,b){e[b.cache]&&(l[b.cache]=e[b.cache].slice())}):o(k,function(b,d){var f=d.cache;o(d.props,function(a,b){if(!l[f]&&d.to){if("alpha"===a||null==e[a])return;l[f]=d.to(l._rgba)}l[f][b.idx]=c(e[a],b,!0)}),l[f]&&a.inArray(null,l[f].slice(0,3))<0&&(l[f][3]=1,d.from&&(l._rgba=d.from(l[f])))}),this):void 0},is:function(a){var b=j(a),c=!0,d=this;return o(k,function(a,e){var f,g=b[e.cache];return g&&(f=d[e.cache]||e.to&&e.to(d._rgba)||[],o(e.props,function(a,b){if(null!=g[b.idx])return c=g[b.idx]===f[b.idx]})),c}),c},_space:function(){var a=[],b=this;return o(k,function(c,d){b[d.cache]&&a.push(c)}),a.pop()},transition:function(a,b){var d=j(a),e=d._space(),f=k[e],g=0===this.alpha()?j("transparent"):this,h=g[f.cache]||f.to(g._rgba),i=h.slice();return d=d[f.cache],o(f.props,function(a,e){var f=e.idx,g=h[f],j=d[f],k=l[e.type]||{};null!==j&&(null===g?i[f]=j:(k.mod&&(j-g>k.mod/2?g+=k.mod:g-j>k.mod/2&&(g-=k.mod)),i[f]=c((j-g)*b+g,e)))}),this[e](i)},blend:function(b){if(1===this._rgba[3])return this;var c=this._rgba.slice(),d=c.pop(),e=j(b)._rgba;return j(a.map(c,function(a,b){return(1-d)*e[b]+d*a}))},toRgbaString:function(){var b="rgba(",c=a.map(this._rgba,function(a,b){return null==a?b>2?1:0:a});return 1===c[3]&&(c.pop(),b="rgb("),b+c.join()+")"},toHslaString:function(){var b="hsla(",c=a.map(this.hsla(),function(a,b){return null==a&&(a=b>2?1:0),b&&b<3&&(a=Math.round(100*a)+"%"),a});return 1===c[3]&&(c.pop(),b="hsl("),b+c.join()+")"},toHexString:function(b){var c=this._rgba.slice(),d=c.pop();return b&&c.push(~~(255*d)),"#"+a.map(c,function(a){return a=(a||0).toString(16),1===a.length?"0"+a:a}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),j.fn.parse.prototype=j.fn,k.hsla.to=function(a){if(null==a[0]||null==a[1]||null==a[2])return[null,null,null,a[3]];var b,c,d=a[0]/255,e=a[1]/255,f=a[2]/255,g=a[3],h=Math.max(d,e,f),i=Math.min(d,e,f),j=h-i,k=h+i,l=.5*k;return b=i===h?0:d===h?60*(e-f)/j+360:e===h?60*(f-d)/j+120:60*(d-e)/j+240,c=0===j?0:l<=.5?j/k:j/(2-k),[Math.round(b)%360,c,l,null==g?1:g]},k.hsla.from=function(a){if(null==a[0]||null==a[1]||null==a[2])return[null,null,null,a[3]];var b=a[0]/360,c=a[1],d=a[2],f=a[3],g=d<=.5?d*(1+c):d+c-d*c,h=2*d-g;return[Math.round(255*e(h,g,b+1/3)),Math.round(255*e(h,g,b)),Math.round(255*e(h,g,b-1/3)),f]},o(k,function(d,e){var f=e.props,g=e.cache,i=e.to,k=e.from;j.fn[d]=function(d){if(i&&!this[g]&&(this[g]=i(this._rgba)),d===b)return this[g].slice();var e,h=a.type(d),l="array"===h||"object"===h?d:arguments,m=this[g].slice();return o(f,function(a,b){var d=l["object"===h?a:b.idx];null==d&&(d=m[b.idx]),m[b.idx]=c(d,b)}),k?(e=j(k(m)),e[g]=m,e):j(m)},o(f,function(b,c){j.fn[b]||(j.fn[b]=function(e){var f,g=a.type(e),i="alpha"===b?this._hsla?"hsla":"rgba":d,j=this[i](),k=j[c.idx];return"undefined"===g?k:("function"===g&&(e=e.call(this,k),g=a.type(e)),null==e&&c.empty?this:("string"===g&&(f=h.exec(e),f&&(e=k+parseFloat(f[2])*("+"===f[1]?1:-1))),j[c.idx]=e,this[i](j)))})})}),j.hook=function(b){var c=b.split(" ");o(c,function(b,c){a.cssHooks[c]={set:function(b,e){var f,g,h="";if("transparent"!==e&&("string"!==a.type(e)||(f=d(e)))){if(e=j(f||e),!m.rgba&&1!==e._rgba[3]){for(g="backgroundColor"===c?b.parentNode:b;(""===h||"transparent"===h)&&g&&g.style;)try{h=a.css(g,"backgroundColor"),g=g.parentNode}catch(a){}e=e.blend(h&&"transparent"!==h?h:"_default")}e=e.toRgbaString()}try{b.style[c]=e}catch(a){}}},a.fx.step[c]=function(b){b.colorInit||(b.start=j(b.elem,c),b.end=j(b.end),b.colorInit=!0),a.cssHooks[c].set(b.elem,b.start.transition(b.end,b.pos))}})},j.hook(g),a.cssHooks.borderColor={expand:function(a){var b={};return o(["Top","Right","Bottom","Left"],function(c,d){b["border"+d+"Color"]=a}),b}},f=a.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(c),function(){function b(b){var c,d,e=b.ownerDocument.defaultView?b.ownerDocument.defaultView.getComputedStyle(b,null):b.currentStyle,f={};if(e&&e.length&&e[0]&&e[e[0]])for(d=e.length;d--;)c=e[d],"string"==typeof e[c]&&(f[a.camelCase(c)]=e[c]);else for(c in e)"string"==typeof e[c]&&(f[c]=e[c]);return f}function d(b,c){var d,e,g={};for(d in c)e=c[d],b[d]!==e&&(f[d]||!a.fx.step[d]&&isNaN(parseFloat(e))||(g[d]=e));return g}var e=["add","remove","toggle"],f={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};a.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(b,d){a.fx.step[d]=function(a){("none"!==a.end&&!a.setAttr||1===a.pos&&!a.setAttr)&&(c.style(a.elem,d,a.end),a.setAttr=!0)}}),a.fn.addBack||(a.fn.addBack=function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}),a.effects.animateClass=function(c,f,g,h){var i=a.speed(f,g,h);return this.queue(function(){var f,g=a(this),h=g.attr("class")||"",j=i.children?g.find("*").addBack():g;j=j.map(function(){var c=a(this);return{el:c,start:b(this)}}),f=function(){a.each(e,function(a,b){c[b]&&g[b+"Class"](c[b])})},f(),j=j.map(function(){return this.end=b(this.el[0]),this.diff=d(this.start,this.end),this}),g.attr("class",h),j=j.map(function(){var b=this,c=a.Deferred(),d=a.extend({},i,{queue:!1,complete:function(){c.resolve(b)}});return this.el.animate(this.diff,d),c.promise()}),a.when.apply(a,j.get()).done(function(){f(),a.each(arguments,function(){var b=this.el;a.each(this.diff,function(a){b.css(a,"")})}),i.complete.call(g[0])})})},a.fn.extend({addClass:function(b){return function(c,d,e,f){return d?a.effects.animateClass.call(this,{add:c},d,e,f):b.apply(this,arguments)}}(a.fn.addClass),removeClass:function(b){return function(c,d,e,f){return arguments.length>1?a.effects.animateClass.call(this,{remove:c},d,e,f):b.apply(this,arguments)}}(a.fn.removeClass),toggleClass:function(b){return function(c,d,e,f,g){return"boolean"==typeof d||void 0===d?e?a.effects.animateClass.call(this,d?{add:c}:{remove:c},e,f,g):b.apply(this,arguments):a.effects.animateClass.call(this,{toggle:c},d,e,f)}}(a.fn.toggleClass),switchClass:function(b,c,d,e,f){return a.effects.animateClass.call(this,{add:c,remove:b},d,e,f)}})}(),function(){function c(b,c,d,e){return a.isPlainObject(b)&&(c=b,b=b.effect),b={effect:b},null==c&&(c={}),a.isFunction(c)&&(e=c,d=null,c={}),("number"==typeof c||a.fx.speeds[c])&&(e=d,d=c,c={}),a.isFunction(d)&&(e=d,d=null),c&&a.extend(b,c),d=d||c.duration,b.duration=a.fx.off?0:"number"==typeof d?d:d in a.fx.speeds?a.fx.speeds[d]:a.fx.speeds._default,b.complete=e||c.complete,b}function d(b){return!(b&&"number"!=typeof b&&!a.fx.speeds[b])||("string"==typeof b&&!a.effects.effect[b]||(!!a.isFunction(b)||"object"==typeof b&&!b.effect))}a.extend(a.effects,{version:"1.11.4",save:function(a,c){for(var d=0;d<c.length;d++)null!==c[d]&&a.data(b+c[d],a[0].style[c[d]])},restore:function(a,c){var d,e;for(e=0;e<c.length;e++)null!==c[e]&&(d=a.data(b+c[e]),void 0===d&&(d=""),a.css(c[e],d))},setMode:function(a,b){return"toggle"===b&&(b=a.is(":hidden")?"show":"hide"),b},getBaseline:function(a,b){var c,d;switch(a[0]){case"top":c=0;break;case"middle":c=.5;break;case"bottom":c=1;break;default:c=a[0]/b.height}switch(a[1]){case"left":d=0;break;case"center":d=.5;break;case"right":d=1;break;default:d=a[1]/b.width}return{x:d,y:c}},createWrapper:function(b){if(b.parent().is(".ui-effects-wrapper"))return b.parent();var c={width:b.outerWidth(!0),height:b.outerHeight(!0),float:b.css("float")},d=a("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),e={width:b.width(),height:b.height()},f=document.activeElement;try{f.id}catch(a){f=document.body}return b.wrap(d),(b[0]===f||a.contains(b[0],f))&&a(f).focus(),d=b.parent(),"static"===b.css("position")?(d.css({position:"relative"}),b.css({position:"relative"})):(a.extend(c,{position:b.css("position"),zIndex:b.css("z-index")}),a.each(["top","left","bottom","right"],function(a,d){c[d]=b.css(d),isNaN(parseInt(c[d],10))&&(c[d]="auto")}),b.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),b.css(e),d.css(c).show()},removeWrapper:function(b){var c=document.activeElement;return b.parent().is(".ui-effects-wrapper")&&(b.parent().replaceWith(b),(b[0]===c||a.contains(b[0],c))&&a(c).focus()),b},setTransition:function(b,c,d,e){return e=e||{},a.each(c,function(a,c){var f=b.cssUnit(c);f[0]>0&&(e[c]=f[0]*d+f[1])}),e}}),a.fn.extend({effect:function(){function b(b){function c(){a.isFunction(f)&&f.call(e[0]),a.isFunction(b)&&b()}var e=a(this),f=d.complete,h=d.mode;(e.is(":hidden")?"hide"===h:"show"===h)?(e[h](),c()):g.call(e[0],d,c)}var d=c.apply(this,arguments),e=d.mode,f=d.queue,g=a.effects.effect[d.effect];return a.fx.off||!g?e?this[e](d.duration,d.complete):this.each(function(){d.complete&&d.complete.call(this)}):f===!1?this.each(b):this.queue(f||"fx",b)},show:function(a){return function(b){if(d(b))return a.apply(this,arguments);var e=c.apply(this,arguments);return e.mode="show",this.effect.call(this,e)}}(a.fn.show),hide:function(a){return function(b){if(d(b))return a.apply(this,arguments);var e=c.apply(this,arguments);return e.mode="hide",this.effect.call(this,e)}}(a.fn.hide),toggle:function(a){return function(b){if(d(b)||"boolean"==typeof b)return a.apply(this,arguments);var e=c.apply(this,arguments);return e.mode="toggle",this.effect.call(this,e)}}(a.fn.toggle),cssUnit:function(b){var c=this.css(b),d=[];return a.each(["em","px","%","pt"],function(a,b){c.indexOf(b)>0&&(d=[parseFloat(c),b])}),d}})}(),function(){var b={};a.each(["Quad","Cubic","Quart","Quint","Expo"],function(a,c){b[c]=function(b){return Math.pow(b,a+2)}}),a.extend(b,{Sine:function(a){return 1-Math.cos(a*Math.PI/2)},Circ:function(a){return 1-Math.sqrt(1-a*a)},Elastic:function(a){return 0===a||1===a?a:-Math.pow(2,8*(a-1))*Math.sin((80*(a-1)-7.5)*Math.PI/15)},Back:function(a){return a*a*(3*a-2)},Bounce:function(a){for(var b,c=4;a<((b=Math.pow(2,--c))-1)/11;);return 1/Math.pow(4,3-c)-7.5625*Math.pow((3*b-2)/22-a,2)}}),a.each(b,function(b,c){a.easing["easeIn"+b]=c,a.easing["easeOut"+b]=function(a){return 1-c(1-a)},a.easing["easeInOut"+b]=function(a){return a<.5?c(2*a)/2:1-c(a*-2+2)/2}})}(),a.effects})}(),function(){var a=c.amdDefine;!function(b){"function"==typeof a&&a.amd?a("10",["f","e"],b):b(jQuery)}(function(a){return a.effects.effect.bounce=function(b,c){var d,e,f,g=a(this),h=["position","top","bottom","left","right","height","width"],i=a.effects.setMode(g,b.mode||"effect"),j="hide"===i,k="show"===i,l=b.direction||"up",m=b.distance,n=b.times||5,o=2*n+(k||j?1:0),p=b.duration/o,q=b.easing,r="up"===l||"down"===l?"top":"left",s="up"===l||"left"===l,t=g.queue(),u=t.length;for((k||j)&&h.push("opacity"),a.effects.save(g,h),g.show(),a.effects.createWrapper(g),m||(m=g["top"===r?"outerHeight":"outerWidth"]()/3),k&&(f={opacity:1},f[r]=0,g.css("opacity",0).css(r,s?2*-m:2*m).animate(f,p,q)),j&&(m/=Math.pow(2,n-1)),f={},f[r]=0,d=0;d<n;d++)e={},e[r]=(s?"-=":"+=")+m,g.animate(e,p,q).animate(f,p,q),m=j?2*m:m/2;j&&(e={opacity:0},e[r]=(s?"-=":"+=")+m,g.animate(e,p,q)),g.queue(function(){j&&g.hide(),a.effects.restore(g,h),a.effects.removeWrapper(g),c()}),u>1&&t.splice.apply(t,[1,0].concat(t.splice(u,o+1))),g.dequeue()}})}(),c.registerDynamic("11",["f"],!1,function(a,b,d){var e=c.get("@@global-helpers").prepareGlobal(d.id,"$",null);return function(a){"format global";"deps jquery";"exports $";if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){if(a(b.target).is(this))return b.handleObj.handler.apply(this,arguments)}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.5",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.5",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),a(c.target).is('input[type="radio"]')||a(c.target).is('input[type="checkbox"]')||c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.5",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(a>this.$items.length-1||a<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){if(!this.sliding)return this.slide("next")},c.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()});
|
2
2
|
}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.5",d.TRANSITION_DURATION=0,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger("hidden.bs.dropdown",f))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.5",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger("shown.bs.dropdown",h)}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=h,this},a(document).on("click.bs.dropdown.data-api",c).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",f,g.prototype.toggle).on("keydown.bs.dropdown.data-api",f,g.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",g.prototype.keydown)}(jQuery),+function(a){"use strict";function b(b,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},c.DEFAULTS,e.data(),"object"==typeof b&&b);f||e.data("bs.modal",f=new c(this,g)),"string"==typeof b?f[b](d):g.show&&f.show(d)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};c.VERSION="3.3.5",c.TRANSITION_DURATION=300,c.BACKDROP_TRANSITION_DURATION=150,c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},c.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)},c.prototype.show=function(b){var d=this,e=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){d.$element.one("mouseup.dismiss.bs.modal",function(b){a(b.target).is(d.$element)&&(d.ignoreBackdropClick=!0)})}),this.backdrop(function(){var e=a.support.transition&&d.$element.hasClass("fade");d.$element.parent().length||d.$element.appendTo(d.$body),d.$element.show().scrollTop(0),d.adjustDialog(),e&&d.$element[0].offsetWidth,d.$element.addClass("in"),d.enforceFocus();var f=a.Event("shown.bs.modal",{relatedTarget:b});e?d.$dialog.one("bsTransitionEnd",function(){d.$element.trigger("focus").trigger(f)}).emulateTransitionEnd(c.TRANSITION_DURATION):d.$element.trigger("focus").trigger(f)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(c.TRANSITION_DURATION):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},c.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$body.removeClass("modal-open"),a.resetAdjustments(),a.resetScrollbar(),a.$element.trigger("hidden.bs.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var d=this,e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var f=a.support.transition&&e;if(this.$backdrop=a(document.createElement("div")).addClass("modal-backdrop "+e).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;f?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.handleUpdate=function(){this.adjustDialog()},c.prototype.adjustDialog=function(){var a=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth<a,this.scrollbarWidth=this.measureScrollbar()},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevented()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b;!e&&/destroy|hide/.test(b)||(e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",a,b)};c.VERSION="3.3.5",c.TRANSITION_DURATION=150,c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);if(c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),!c.isInStateTrue())return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-m<o.top?"bottom":"right"==h&&k.right+l>o.width?"left":"left"==h&&k.left-l<o.left?"right":h,f.removeClass(n).addClass(h)}var p=this.getCalculatedOffset(h,k,l,m);this.applyPlacement(p,h);var q=function(){var a=e.hoverState;e.$element.trigger("shown.bs."+e.type),e.hoverState=null,"out"==a&&e.leave(e)};a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",q).emulateTransitionEnd(c.TRANSITION_DURATION):q()}},c.prototype.applyPlacement=function(b,c){var d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),b.top+=g,b.left+=h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;"top"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=/top|bottom/.test(c),m=l?2*k.left-e+i:2*k.top-f+j,n=l?"offsetWidth":"offsetHeight";d.offset(b),this.replaceArrow(m,d[0][n],l)},c.prototype.replaceArrow=function(a,b,c){this.arrow().css(c?"left":"top",50*(1-a/b)+"%").css(c?"top":"left","")},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},c.prototype.hide=function(b){function d(){"in"!=e.hoverState&&f.detach(),e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),b&&b()}var e=this,f=a(this.$tip),g=a.Event("hide.bs."+this.type);if(this.$element.trigger(g),!g.isDefaultPrevented())return f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",d).emulateTransitionEnd(c.TRANSITION_DURATION):d(),this.hoverState=null,this},c.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d="BODY"==c.tagName,e=c.getBoundingClientRect();null==e.width&&(e=a.extend({},e,{width:e.right-e.left,height:e.bottom-e.top}));var f=d?{top:0,left:0}:b.offset(),g={scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop()},h=d?{width:a(window).width(),height:a(window).height()}:null;return a.extend({},e,g,h,f)},c.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;!e&&/destroy|hide/.test(b)||(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.5",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.5",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<e[0])return this.activeTarget=null,this.clear();for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(void 0===e[a+1]||b<e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,this.clear();var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.5",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.5",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return e<c&&"top";if("bottom"==this.affixed)return null!=c?!(e+this.unpin<=f.top)&&"bottom":!(e+g<=a-d)&&"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&e<=c?"top":null!=d&&i+j>=a-d&&"bottom"},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery)}(this),e()}),c.registerDynamic("12",["11"],!0,function(a,b,c){this||self;c.exports=a("11")}),c.registerDynamic("13",[],!0,function(a,b,c){"format cjs";this||self;!function(a){var b=function(){window.asyncWebshims||(window.asyncWebshims={cfg:[],ready:[]})},c=function(){window.jQuery&&(a(jQuery),a=function(){return window.webshims})};window.webshims={setOptions:function(){b(),window.asyncWebshims.cfg.push(arguments)},ready:function(){b(),window.asyncWebshims.ready.push(arguments)},activeLang:function(a){b(),window.asyncWebshims.lang=a},polyfill:function(a){b(),window.asyncWebshims.polyfill=a},_curScript:function(){var a,b,c,d,e,f=document.currentScript;if(!f){try{throw new Error("")}catch(a){for(c=(a.sourceURL||a.stack||"").split("\n"),e=/(?:fil|htt|wid|abo|app|res)(.)+/i,b=0;b<c.length;b++)if(d=c[b].match(e)){c=d[0].replace(/[\:\s\(]+[\d\:\)\(\s]+$/,"");break}}for(a=document.scripts||document.getElementsByTagName("script"),b=0;b<a.length&&(!a[b].getAttribute("src")||(f=a[b],"interactive"!=a[b].readyState&&c!=a[b].src));b++);}return f}()},window.webshim=window.webshims,window.webshims.timer=setInterval(c,0),c(),!1}(function(a){"use strict";function b(a){return document.createElement(a)}var c,d,e=window.navigator,f=window.webshims,g="dom-support",h=a.event.special,i=a([]),j=window.asyncWebshims,k={},l=window.Object,m=function(a){return a+"\n//# sourceURL="+this.url},n=function(a){return!(!q.enhanceAuto&&"auto"==a)&&a},o={matchmedia:"matchMedia",xhr2:"filereader",promise:"es6",URL:"url"},p="capture"in b("input");clearInterval(f.timer),k.advancedObjectProperties=k.objectAccessor=k.ES5=!!("create"in l&&"seal"in l),!k.ES5||"toJSON"in Date.prototype||(k.ES5=!1),d=a.support.hrefNormalized===!1?f._curScript.getAttribute("src",4):f._curScript.src,d=d.split("?")[0].slice(0,d.lastIndexOf("/")+1)+"shims/",a.extend(f,{version:"1.15.8",cfg:{enhanceAuto:window.Audio&&(!window.matchMedia||matchMedia("(min-device-width: 721px)").matches),waitReady:!0,loadStyles:!0,wsdoc:document,wspopover:{appendTo:"auto",hideOnBlur:!0},ajax:{crossDomain:!0},loadScript:function(b,c){a.ajax(a.extend({},q.ajax,{url:b,success:c,dataType:"script",cache:!0,global:!1,dataFilter:m}))},basePath:d},support:k,bugs:{},modules:{},features:{},featureList:[],setOptions:function(b,c){"string"==typeof b&&arguments.length>1?q[b]=a.isPlainObject(c)?a.extend(!0,q[b]||{},c):c:"object"==typeof b&&a.extend(!0,q,b)},_getAutoEnhance:n,addPolyfill:function(b,c){c=c||{};var d=c.f||b;r[d]||(r[d]=[],f.featureList.push(d),q[d]={}),r[d].push(b),c.options=a.extend(q[d],c.options),y(b,c),c.methodNames&&a.each(c.methodNames,function(a,b){f.addMethodName(b)})},polyfill:function(){return function(a){return a||(a=f.featureList),"string"==typeof a&&(a=a.split(" ")),f._polyfill(a)}}(),_polyfill:function(b){var d,e,f=[];c.run||(d=-1!==a.inArray("forms-ext",b),c(),e=d&&!v["form-number-date-ui"].test()||!p&&-1!==a.inArray("mediacapture",b),d&&-1==a.inArray("forms",b)&&b.push("forms"),q.loadStyles&&w.loadCSS("styles/shim"+(e?"-ext":"")+".css")),q.waitReady&&(a.readyWait++,t(b,function(){a.ready(!0)})),a.each(b,function(a,b){return b=o[b]||b,r[b]?(b!==r[b][0]&&t(r[b],function(){s(b,!0)}),void(f=f.concat(r[b]))):void s(b,!0)}),x(f),a.each(b,function(a,b){var c=q[b];c&&("mediaelement"==b&&(c.replaceUI=n(c.replaceUI))&&c.plugins.unshift("mediacontrols"),c.plugins&&c.plugins.length&&x(q[b].plugins))})},reTest:function(){var b,c=function(c,d){var e=v[d],f=d+"Ready";!e||e.loaded||(e.test&&a.isFunction(e.test)?e.test([]):e.test)||(h[f]&&delete h[f],r[e.f],b.push(d))};return function(d){"string"==typeof d&&(d=d.split(" ")),b=[],
|
3
|
-
a.each(d,c),x(b)}}(),isReady:function(b,c){if(b+="Ready",c){if(h[b]&&h[b].add)return!0;h[b]=a.extend(h[b]||{},{add:function(a){a.handler.call(this,b)}}),a(document).triggerHandler(b)}return!(!h[b]||!h[b].add)||!1},ready:function(b,c){var d=arguments[2];if("string"==typeof b&&(b=b.split(" ")),d||(b=a.map(a.grep(b,function(a){return!s(a)}),function(a){return a+"Ready"})),!b.length)return void c(a,f,window,document);var e=b.shift(),g=function(){t(b,c,!0)};a(document).one(e,g)},capturingEvents:function(b,c){document.addEventListener&&("string"==typeof b&&(b=[b]),a.each(b,function(b,d){var e=function(b){return b=a.event.fix(b),c&&f.capturingEventPrevented&&f.capturingEventPrevented(b),a.event.dispatch.call(this,b)};h[d]=h[d]||{},h[d].setup||h[d].teardown||a.extend(h[d],{setup:function(){this.addEventListener(d,e,!0)},teardown:function(){this.removeEventListener(d,e,!0)}})}))},register:function(b,c){var d=v[b];if(!d)return void f.error("can't find module: "+b);d.loaded=!0;var e=function(){c(a,f,window,document,void 0,d.options),s(b,!0)};d.d&&d.d.length?t(d.d,e):e()},c:{},loader:{addModule:function(b,c){v[b]=c,c.name=c.name||b,c.c||(c.c=[]),a.each(c.c,function(a,c){f.c[c]||(f.c[c]=[]),f.c[c].push(b)})},loadList:function(){var b=[],c=function(c,d){"string"==typeof d&&(d=[d]),a.merge(b,d),w.loadScript(c,!1,d)},d=function(c,d){if(s(c)||-1!=a.inArray(c,b))return!0;var e,f=v[c];return!f||(e=f.test&&a.isFunction(f.test)?f.test(d):f.test,!!e&&(s(c,!0),!0))},e=function(b,c){if(b.d&&b.d.length){var e=function(b,e){d(e,c)||-1!=a.inArray(e,c)||c.push(e)};a.each(b.d,function(b,c){v[c]?v[c].loaded||e(b,c):r[c]&&(a.each(r[c],e),t(r[c],function(){s(c,!0)}))}),b.noAutoCallback||(b.noAutoCallback=!0)}};return function(g){var h,i,j,k,l=[],m=function(d,e){return k=e,a.each(f.c[e],function(c,d){return-1==a.inArray(d,l)||-1!=a.inArray(d,b)?(k=!1,!1):void 0}),k?(c("combos/"+k,f.c[k]),!1):void 0};for(i=0;i<g.length;i++)h=v[g[i]],h&&!d(h.name,g)&&(h.css&&q.loadStyles&&w.loadCSS(h.css),h.loadInit&&h.loadInit(),e(h,g),h.loaded||l.push(h.name),h.loaded=!0);for(i=0,j=l.length;j>i;i++)k=!1,h=l[i],-1==a.inArray(h,b)&&("noCombo"!=q.debug&&a.each(v[h].c,m),k||c(v[h].src||h,h))}}(),makePath:function(a){return-1!=a.indexOf("//")||0===a.indexOf("/")?a:(-1==a.indexOf(".")&&(a+=".js"),q.addCacheBuster&&(a+=q.addCacheBuster),q.basePath+a)},loadCSS:function(){var b,c={};return function(d){d=this.makePath(d),c[d]||(b=b||a("link, style")[0]||a("script")[0],c[d]=1,a('<link rel="stylesheet" />').insertBefore(b).attr({href:d}))}}(),loadScript:function(){var b={};return function(c,d,e,f){if(f||(c=w.makePath(c)),!b[c]){var g=function(){d&&d(),e&&("string"==typeof e&&(e=e.split(" ")),a.each(e,function(a,b){v[b]&&(v[b].afterLoad&&v[b].afterLoad(),s(v[b].noAutoCallback?b+"FileLoaded":b,!0))}))};b[c]=1,q.loadScript(c,g,a.noop)}}}()}});var q=f.cfg,r=f.features,s=f.isReady,t=f.ready,u=f.addPolyfill,v=f.modules,w=f.loader,x=w.loadList,y=w.addModule,z=f.bugs,A=[],B={warn:1,error:1},C=a.fn,D=b("video");f.addMethodName=function(a){a=a.split(":");var b=a[1];1==a.length?(b=a[0],a=a[0]):a=a[0],C[a]=function(){return this.callProp(b,arguments)}},C.callProp=function(b,c){var d;return c||(c=[]),this.each(function(){var e=a.prop(this,b);if(e&&e.apply){if(d=e.apply(this,c),void 0!==d)return!1}else f.warn(b+" is not a method of "+this)}),void 0!==d?d:this},f.activeLang=function(){"language"in e||(e.language=e.browserLanguage||"");var b=a.attr(document.documentElement,"lang")||e.language;return t("webshimLocalization",function(){f.activeLang(b)}),function(a){if(a)if("string"==typeof a)b=a;else if("object"==typeof a){var c=arguments,d=this;t("webshimLocalization",function(){f.activeLang.apply(d,c)})}return b}}(),f.errorLog=[],a.each(["log","error","warn","info"],function(a,b){f[b]=function(a){(B[b]&&q.debug!==!1||q.debug)&&(f.errorLog.push(a),window.console&&console.log&&console[console[b]?b:"log"](a))}}),function(){a.isDOMReady=a.isReady;var b=function(){a.isDOMReady=!0,s("DOM",!0),setTimeout(function(){s("WINDOWLOAD",!0)},9999)};c=function(){if(!c.run){if(!a.isDOMReady&&q.waitReady){var d=a.ready;a.ready=function(a){return a!==!0&&document.body&&b(),d.apply(this,arguments)},a.ready.promise=d.promise}q.readyEvt?a(document).one(q.readyEvt,b):a(b)}c.run=!0},a(window).on("load",function(){b(),setTimeout(function(){s("WINDOWLOAD",!0)},9)});var d=[],e=function(){1==this.nodeType&&f.triggerDomUpdate(this)};a.extend(f,{addReady:function(a){var b=function(b,c){f.ready("DOM",function(){a(b,c)})};d.push(b),q.wsdoc&&b(q.wsdoc,i)},triggerDomUpdate:function(b){if(!b||!b.nodeType)return void(b&&b.jquery&&b.each(function(){f.triggerDomUpdate(this)}));var c=b.nodeType;if(1==c||9==c){var e=b!==document?a(b):i;a.each(d,function(a,c){c(b,e)})}}}),C.clonePolyfill=C.clone,C.htmlPolyfill=function(b){if(!arguments.length)return a(this.clonePolyfill()).html();var c=C.html.call(this,b);return c===this&&a.isDOMReady&&this.each(e),c},C.jProp=function(){return this.pushStack(a(C.prop.apply(this,arguments)||[]))},a.each(["after","before","append","prepend","replaceWith"],function(b,c){C[c+"Polyfill"]=function(b){return b=a(b),C[c].call(this,b),a.isDOMReady&&b.each(e),this}}),a.each(["insertAfter","insertBefore","appendTo","prependTo","replaceAll"],function(b,c){C[c.replace(/[A-Z]/,function(a){return"Polyfill"+a})]=function(){return C[c].apply(this,arguments),a.isDOMReady&&f.triggerDomUpdate(this),this}}),C.updatePolyfill=function(){return a.isDOMReady&&f.triggerDomUpdate(this),this},a.each(["getNativeElement","getShadowElement","getShadowFocusElement"],function(a,b){C[b]=function(){return this.pushStack(this)}})}(),l.create&&(f.objectCreate=function(b,c,d){var e=l.create(b);return d&&(e.options=a.extend(!0,{},e.options||{},d),d=e.options),e._create&&a.isFunction(e._create)&&e._create(d),e}),y("swfmini",{test:function(){return window.swfobject&&!window.swfmini&&(window.swfmini=window.swfobject),"swfmini"in window},c:[16,7,2,8,1,12,23]}),v.swfmini.test(),y("sizzle",{test:a.expr.filters}),u("es5",{test:!(!k.ES5||!Function.prototype.bind),d:["sizzle"]}),u("dom-extend",{f:g,noAutoCallback:!0,d:["es5"],c:[16,7,2,15,30,3,8,4,9,10,25,31,34]}),b("picture"),u("picture",{test:"picturefill"in window||!!window.HTMLPictureElement||"respimage"in window,d:["matchMedia"],c:[18],loadInit:function(){s("picture",!0)}}),u("matchMedia",{test:!(!window.matchMedia||!matchMedia("all").addListener),c:[18]}),u("sticky",{test:-1!=(a(b("b")).attr("style","position: -webkit-sticky; position: sticky").css("position")||"").indexOf("sticky"),d:["es5","matchMedia"]}),u("es6",{test:!!(Math.imul&&Number.MIN_SAFE_INTEGER&&l.is&&window.Promise&&Promise.all),d:["es5"]}),u("geolocation",{test:"geolocation"in e,options:{destroyWrite:!0},c:[21]}),function(){u("canvas",{src:"excanvas",test:"getContext"in b("canvas"),options:{type:"flash"},noAutoCallback:!0,loadInit:function(){var a=this.options.type;!a||-1===a.indexOf("flash")||v.swfmini.test()&&!swfmini.hasFlashPlayerVersion("9.0.0")||(this.src="flash"==a?"FlashCanvas/flashcanvas":"FlashCanvasPro/flashcanvas")},methodNames:["getContext"],d:[g]})}();var E="getUserMedia"in e;u("usermedia-core",{f:"usermedia",test:E&&window.URL,d:["url",g]}),u("usermedia-shim",{f:"usermedia",test:!!(E||e.webkitGetUserMedia||e.mozGetUserMedia||e.msGetUserMedia),d:["url","mediaelement",g]}),u("mediacapture",{test:p,d:["swfmini","usermedia",g,"filereader","forms","canvas"]}),function(){var c,d,h="form-shim-extend",i="formvalidation",j="form-number-date-api",l=!1,m=!1,o=!1,p={},r=b("progress"),s=b("output"),t=function(){var d,f,g="1(",j=b("input");if(f=a('<fieldset><textarea required="" /></fieldset>')[0],k.inputtypes=p,a.each(["range","date","datetime-local","month","color","number"],function(a,b){j.setAttribute("type",b),p[b]=j.type==b&&(j.value=g)&&j.value!=g}),k.datalist=!!("options"in b("datalist")&&window.HTMLDataListElement),k[i]="checkValidity"in j,k.fieldsetelements="elements"in f,k.fieldsetdisabled="disabled"in f){try{f.querySelector(":invalid")&&(f.disabled=!0,d=!f.querySelector(":invalid")&&f.querySelector(":disabled"))}catch(a){}k.fieldsetdisabled=!!d}if(k[i]&&(m=!(k.fieldsetdisabled&&k.fieldsetelements&&"value"in r&&"value"in s),o=m&&/Android/i.test(e.userAgent),l=window.opera||z.bustedValidity||m||!k.datalist,!l&&p.number)){l=!0;try{j.type="number",j.value="",j.stepUp(),l="1"!=j.value}catch(a){}}return z.bustedValidity=l,c=k[i]&&!l?"form-native-extend":h,t=a.noop,!1},w=function(b){var c=!0;return b._types||(b._types=b.types.split(" ")),a.each(b._types,function(a,b){return b in p&&!p[b]?(c=!1,!1):void 0}),c};f.validationMessages=f.validityMessages={langSrc:"i18n/formcfg-",availableLangs:"ar bg ca cs el es fa fi fr he hi hu it ja lt nl no pl pt pt-BR pt-PT ru sv zh-CN zh-TW".split(" ")},f.formcfg=a.extend({},f.validationMessages),f.inputTypes={},u("form-core",{f:"forms",test:t,d:["es5"],options:{placeholderType:"value",messagePopover:{},list:{popover:{constrainWidth:!0}},iVal:{sel:".ws-validate",handleBubble:"hide",recheckDelay:400}},methodNames:["setCustomValidity","checkValidity","setSelectionRange"],c:[16,7,2,8,1,15,30,3,31]}),d=q.forms,u("form-native-extend",{f:"forms",test:function(b){return t(),!k[i]||l||-1==a.inArray(j,b||[])||v[j].test()},d:["form-core",g,"form-message"],c:[6,5,14,29]}),u(h,{f:"forms",test:function(){return t(),k[i]&&!l},d:["form-core",g,"sizzle"],c:[16,15,28]}),u(h+"2",{f:"forms",test:function(){return t(),k[i]&&!m},d:[h],c:[27]}),u("form-message",{f:"forms",test:function(a){return t(),!(d.customMessages||!k[i]||l||!v[c].test(a))},d:[g],c:[16,7,15,30,3,8,4,14,28]}),u(j,{f:"forms-ext",options:{types:"date time range number"},test:function(){t();var a=!l;return a&&(a=w(this.options)),a},methodNames:["stepUp","stepDown"],d:["forms",g],c:[6,5,17,14,28,29,33]}),y("range-ui",{options:{},noAutoCallback:!0,test:function(){return!!C.rangeUI},d:["es5"],c:[6,5,9,10,17,11]}),u("form-number-date-ui",{f:"forms-ext",test:function(){var a=this.options;return a.replaceUI=n(a.replaceUI),t(),!a.replaceUI&&o&&(a.replaceUI=!0),!a.replaceUI&&w(a)},d:["forms",g,j,"range-ui"],options:{widgets:{calculateWidth:!0,animate:!0}},c:[6,5,9,10,17,11]}),u("form-datalist",{f:"forms",test:function(){return t(),o&&(d.customDatalist=!0),k.datalist&&!d.fD},d:["form-core",g],c:[16,7,6,2,9,15,30,31,28,33]})}();var F="FileReader"in window&&"FormData"in window;return u("filereader-xhr",{f:"filereader",test:F,d:[g,"swfmini"],c:[25,27]}),u("canvas-blob",{f:"filereader",methodNames:["toBlob"],test:!(F&&!b("canvas").toBlob)}),u("details",{test:"open"in b("details"),d:[g],options:{text:"Details"},c:[21,22]}),u("url",{test:function(){var a=!1;try{a=new URL("b","http://a"),a=!(!a.searchParams||"http://a/b"!=a.href)}catch(a){}return a},d:["es5"]}),function(){f.mediaelement={};var c=b("track");if(k.mediaelement="canPlayType"in D,k.texttrackapi="addTextTrack"in D,k.track="kind"in c,b("audio"),!(z.track=!k.texttrackapi))try{z.track=!("oncuechange"in D.addTextTrack("metadata"))}catch(a){}u("mediaelement-core",{f:"mediaelement",noAutoCallback:!0,options:{jme:{},plugins:[],vars:{},params:{},attrs:{},changeSWF:a.noop},methodNames:["play","pause","canPlayType","mediaLoad:load"],d:["swfmini"],c:[16,7,2,8,1,12,13,23]}),u("mediaelement-jaris",{f:"mediaelement",d:["mediaelement-core",g],test:function(){var a=this.options;return!(!k.mediaelement||f.mediaelement.loadSwf)&&(a.preferFlash&&!v.swfmini.test()&&(a.preferFlash=!1),!(a.preferFlash&&swfmini.hasFlashPlayerVersion("11.3")))},c:[21,25]}),u("track",{options:{positionDisplay:!0,override:z.track},test:function(){var a=this.options;return a.override=n(a.override),!a.override&&!z.track},d:["mediaelement",g],methodNames:["addTextTrack"],c:[21,12,13,22,34]}),y("jmebase",{src:"jme/base",c:[98,99,97]}),a.each([["mediacontrols",{c:[98,99],css:"jme/controls.css"}],["playlist",{c:[98,97]}],["alternate-media"]],function(b,c){y(c[0],a.extend({src:"jme/"+c[0],d:["jmebase"]},c[1]))}),y("track-ui",{d:["track",g]})}(),u("feature-dummy",{test:!0,loaded:!0,c:A}),f.$=a,a.webshims=f,a.webshim=webshim,f.callAsync=function(){f.callAsync=a.noop,j&&(j.cfg&&(j.cfg.length||(j.cfg=[[j.cfg]]),a.each(j.cfg,function(a,b){f.setOptions.apply(f,b)})),j.ready&&a.each(j.ready,function(a,b){f.ready.apply(f,b)}),j.lang&&f.activeLang(j.lang),"polyfill"in j&&f.polyfill(j.polyfill)),f.isReady("jquery",!0)},f.callAsync(),f})}),c.registerDynamic("14",["13"],!0,function(a,b,c){this||self;c.exports=a("13")}),c.register("15",["10","12","14","f","d"],function(a){return{setters:[function(a){},function(a){},function(a){},function(a){},function(a){}],execute:function(){!function(a){a.fn.disable=function(){return this.prop("disabled",!0).addClass("disabled")},a.fn.enable=function(){return this.prop("disabled",!1).removeClass("disabled")},a.fn.check=function(){return this.prop("checked",!0)},a.fn.uncheck=function(){return this.prop("checked",!1)},a.fn._tooltip=a.fn.tooltip,a.fn.tooltip=function(b){return this._tooltip("destroy")._tooltip(a.extend({container:"body",placement:"bottom",delay:{show:1e3}},b))},a.modalActive=function(){var b=!1;return a(".modal").each(function(){var c=a(this).data("bs.modal");if(c)return b=c.isShown,!b}),b},a.fn.wiggle=function(){this.finish().effect("bounce",{direction:"left",distance:24,times:4},250)}}(jQuery)}}}),c.register("16",["17","18","19","1a"],function(a){var b,c,d,e;return{setters:[function(a){b=a.default},function(a){c=a.default},function(a){d=a.default},function(a){e=a.default}],execute:function(){a("default",e.createClass({displayName:"sidebar",clearSession:function(){sessionStorage.clear()},downloadFastaOfAll:function(){var a=[];this.props.data.queries.forEach(function(b){return b.hits.forEach(function(b){return a.push(b.id)})});var b=this.props.data.querydb.map(function(a){return a.id});return c(a,b),!1},downloadFastaOfSelected:function(){var a=$(".hit-links :checkbox:checked").map(function(){return this.value}).get(),d=b.map(this.props.data.querydb,b.iteratee("id"));return c(a,d),!1},downloadAlignmentOfAll:function(){var a=0,b=[];this.props.data.queries.forEach(function(c){return c.hits.forEach(function(d){a++,d.hsps.forEach(function(a){a.query_id=c.id,a.hit_id=d.id,b.push(a)})})});var c=new d,e="alignment-"+a+"_hits";return c.export_alignments(b,e),!1},downloadAlignmentOfSelected:function(){var a=$(".hit-links :checkbox:checked").map(function(){return this.value}).get(),c=[],e=new d;return console.log("check "+a.toString()),b.each(this.props.data.queries,b.bind(function(d){b.each(d.hits,function(e){b.indexOf(a,e.id)!=-1&&b.each(e.hsps,function(a){a.hit_id=e.id,a.query_id=d.id,c.push(a)})})},this)),e.export_alignments(c,"alignment-"+a.length+"_hits"),!1},render:function(){return e.createElement("div",{className:"sidebar"},this.topPanelJSX(),this.downloadsPanelJSX())},topPanelJSX:function(){var a=location.pathname.split("/"),b=a.pop(),c=a.join("/");return e.createElement("div",{className:"sidebar-top-panel"},e.createElement("div",{className:"section-header-sidebar"},e.createElement("h4",null,this.summaryString())),e.createElement("div",null,e.createElement("a",{href:c+"/?job_id="+b},e.createElement("i",{className:"fa fa-pencil"})," Edit search"),e.createElement("span",{className:"line"},"|"),e.createElement("a",{href:c+"/",onClick:this.clearSession},e.createElement("i",{className:"fa fa-file-o"})," New search")),this.props.shouldShowIndex&&this.indexJSX())},summaryString:function(){var a=this.props.data.program,b=this.props.data.queries.length,c=this.props.data.querydb.length;return a.toUpperCase()+": "+b+" "+(b>1?"queries":"query")+", "+c+" "+(c>1?"databases":"database")},indexJSX:function(){return e.createElement("ul",{className:"nav hover-reset active-bold"}," ",b.map(this.props.data.queries,function(a){return e.createElement("li",{key:"Side_bar_"+a.id},e.createElement("a",{className:"btn-link nowrap-ellipsis hover-bold",title:"Query= "+a.id+" "+a.title,href:"#Query_"+a.number},"Query= "+a.id))}))},downloadsPanelJSX:function(){return e.createElement("div",{className:"downloads"},e.createElement("div",{className:"section-header-sidebar"},e.createElement("h4",null,"Download FASTA, XML, TSV")),e.createElement("ul",{className:"nav"},!this.props.data.imported_xml&&e.createElement("li",null,e.createElement("a",{href:"#",className:"btn-link download-fasta-of-all",onClick:this.downloadFastaOfAll},"FASTA of all hits")),!this.props.data.imported_xml&&e.createElement("li",null,e.createElement("a",{href:"#",className:"btn-link download-fasta-of-selected disabled",onClick:this.downloadFastaOfSelected},"FASTA of ",e.createElement("span",{className:"text-bold"})," selected hit(s)")),e.createElement("li",null,e.createElement("a",{href:"#",className:"btn-link download-alignment-of-all",onClick:this.downloadAlignmentOfAll},"Alignment of all hits")),e.createElement("li",null,e.createElement("a",{href:"#",className:"btn-link download-alignment-of-selected disabled",onClick:this.downloadAlignmentOfSelected},"Alignment of ",e.createElement("span",{className:"text-bold"})," selected hit(s)")),!this.props.data.imported_xml&&e.createElement("li",null,e.createElement("a",{className:"btn-link download","data-toggle":"tooltip",title:"15 columns: query and subject ID; scientific name, alignment length, mismatches, gaps, identity, start and end coordinates, e value, bitscore, query coverage per subject and per HSP.",href:"download/"+this.props.data.search_id+".std_tsv"},"Standard tabular report")),!this.props.data.imported_xml&&e.createElement("li",null,e.createElement("a",{className:"btn-link download","data-toggle":"tooltip",title:"44 columns: query and subject ID, GI, accessions, and length; alignment details; taxonomy details of subject sequence(s) and query coverage per subject and per HSP.",href:"download/"+this.props.data.search_id+".full_tsv"},"Full tabular report")),!this.props.data.imported_xml&&e.createElement("li",null,e.createElement("a",{className:"btn-link download","data-toggle":"tooltip",title:"Results in XML format.",href:"download/"+this.props.data.search_id+".xml"},"Full XML report"))))}}))}}}),c.registerDynamic("1b",[],!0,function(a,b,c){var e,f=(this||self,[].indexOf||function(a){for(var b=0,c=this.length;b<c;b++)if(b in this&&this[b]===a)return b;return-1});"function"!=typeof Object.assign&&(Object.assign=function(a){"use strict";var b,c,d;if(null===a)throw new TypeError("Cannot convert undefined or null to object");for(a=Object(a),b=1;b<arguments.length;){if(d=arguments[b],null!==d)for(c in d)Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c]);b++}return a}),e=function(a){var b;return b=new e.Core(a)},e.Core=function(a){return this.tracks={heatmaps:{},histograms:{},chords:{},scatters:{},lines:{},stacks:{},highlights:{},texts:{}},this.conf=e.mixConf(a,this.defaultConf),this},e.Core.prototype.removeTracks=function(a){var b,c,d,e,f,g,h,i;g=d3.select(this.conf.container),e=this.tracks;for(i in e)if(f=e[i],"object"==typeof a)for(c=0,d=a.length;c<d;c++)b=a[c],b in f&&(g.select("."+b).remove(),delete f[b]);else if("string"==typeof a)a in f&&(g.select("."+a).remove(),delete f[a]);else if("undefined"==typeof a)for(h in f)g.select("."+h).remove(),delete f[h];return this},e.Core.prototype.layout=function(a,b){return this._layout=new e.Layout(a,b),this},e.log=function(a,b,c,d){var e;e=["Permanent log","Error","Warning","Info"],console.log("CircosJS: ",e[a]+" ["+b+"] ",c,d)},e.mixConf=function(a,b){var c,d,f;d={};for(c in b)f=b[c],c in a?"[object Array]"===Object.prototype.toString.call(f)?d[c]=a[c]:"object"==typeof f&&null!=f?null!=f&&0===Object.keys(f).length?d[c]=a[c]:d[c]=e.mixConf(a[c],f):d[c]=a[c]:d[c]=f;return d},e.Core.prototype.smartBorders=function(){var a,b,c,d,e,f,g,h,i,j,k,l;l=this.conf.defaultTrackWidth,e={in:this._layout.conf.innerRadius,out:this._layout.conf.outerRadius},b=[],g=this.tracks;for(k in g){h=g[k];for(j in h)i=h[j],i.conf.innerRadius&&b.push({in:i.conf.innerRadius,out:i.conf.outerRadius})}for(b=b.sort(function(a,b){return a.out>b.out,a.out<b.out,0}),c=e,d=0,f=b.length;d<f;d++){if(a=b[d],a.out<c.in-l)return{in:c.in-l,out:c.in};c=a}return c.in>l?{in:c.in-l,out:c.in}:{in:b[0].out,out:b[0].out+l}},"undefined"!=typeof c&&null!==c&&(c.exports=e),e.checkParent=function(a,b,c,d){return a in c||(e.log(1,"datum","unknown parent id",{line:b+1,value:a,header:d,layoutSummary:c}),!1)},e.checkNumber=function(a,b){var c,d;for(c in a)if(d=a[c],isNaN(d))return e.log(1,"datum","not a number",{line:b+1,value:d,header:c}),!1;return!0},e.parseSpanValueData=function(a,b){var c,d;return a.length>0?(d=a[0],"parent_id"in d&&"start"in d&&"end"in d&&"value"in d&&(a=a.map(function(a){return[a.parent_id,a.start,a.end,a.value]})),a=a.filter(function(a,c){return e.checkParent(a[0],c,b,"parent")}).filter(function(a,b){return e.checkNumber({start:a[1],end:a[2],value:a[3]},b)}).map(function(a){return(a[1]<0||a[2]>b[a[0]])&&e.log(2,"position","position inconsistency",{datum:a,layoutSummary:b}),{block_id:a[0],start:Math.max(0,parseFloat(a[1])),end:Math.min(b[a[0]],parseFloat(a[2])),value:parseFloat(a[3])||1}}),c=d3.nest().key(function(a){return a.block_id}).entries(a),{data:c,meta:{min:d3.min(a,function(a){return a.value}),max:d3.max(a,function(a){return a.value})}}):{data:[],meta:{min:null,max:null}}},e.parseSpanStringData=function(a,b){var c,d;return d=a[0],"parent_id"in d&&"start"in d&&"end"in d&&"value"in d&&(a=a.map(function(a){return[a.parent_id,a.start,a.end,a.value]})),a=a.filter(function(a,c){return e.checkParent(a[0],c,b,"parent")}).filter(function(a,b){return e.checkNumber({start:a[1],end:a[2]},b)}).map(function(a){var c;return(a[1]<0||a[2]>b[a[0]])&&e.log(2,"position","position inconsistency",{datum:a,layoutSummary:b}),c=null!=a[3]?a[3]:null,{block_id:a[0],start:Math.max(0,parseFloat(a[1])),end:Math.min(b[a[0]],parseFloat(a[2])),value:c}}),c=d3.nest().key(function(a){return a.block_id}).entries(a),{data:c,meta:{min:d3.min(a,function(a){return a.value}),max:d3.max(a,function(a){return a.value})}}},e.parsePositionValueData=function(a,b){var c,d;return d=a[0],"parent_id"in d&&"position"in d&&(a=a.map(function(a){return[a.parent_id,a.position,a.value]})),a=a.filter(function(a,c){return e.checkParent(a[0],c,b,"parent")}).filter(function(a,b){return e.checkNumber({position:a[1],value:a[2]},b)}).map(function(a){return{block_id:a[0],position:Math.min(b[a[0]],parseFloat(a[1])),value:parseFloat(a[2])||1}}),c=d3.nest().key(function(a){return a.block_id}).entries(a),{data:c,meta:{min:d3.min(a,function(a){return a.value}),max:d3.max(a,function(a){return a.value})}}},e.parsePositionTextData=function(a,b){var c,d;return d=a[0],"parent_id"in d&&"position"in d&&(a=a.map(function(a){return[a.parent_id,a.position,a.value]})),a=a.filter(function(a,c){return e.checkParent(a[0],c,b,"parent")}).filter(function(a,b){return e.checkNumber({position:a[1]},b)}).map(function(a){return{block_id:a[0],position:Math.min(b[a[0]],parseFloat(a[1])),value:a[2]}}),c=d3.nest().key(function(a){return a.block_id}).entries(a),{data:c,meta:{min:d3.min(a,function(a){return a.value}),max:d3.max(a,function(a){return a.value})}}},e.parseChordData=function(a,b){var c;return c=a[0],"source_id"in c&&"source_start"in c&&"target_id"in c&&"target_start"in c&&"target_end"in c&&(a=a.map(function(a){var b;return b=[a.source_id,a.source_start,a.source_end,a.target_id,a.target_start,a.target_end],null!=a.value&&b.push(a.value),b})),a=a.filter(function(a,c){return e.checkParent(a[0],c,b,"source_id")}).filter(function(a,c){return e.checkParent(a[3],c,b,"target_id")}).filter(function(a,b){return e.checkNumber({source_start:a[1],source_end:a[2],target_start:a[4],target_end:a[5],value:a[6]||1},b)}).map(function(a){return{source:{id:a[0],start:Math.max(0,parseFloat(a[1])),end:Math.min(b[a[0]],parseFloat(a[2]))},target:{id:a[3],start:Math.max(0,parseFloat(a[4])),end:Math.min(b[a[3]],parseFloat(a[5]))},value:parseFloat(a[6]),hsp:a[7]}}),{data:a,meta:{min:d3.min(a,function(a){return a.value}),max:d3.max(a,function(a){return a.value})}}},e.Layout=function(a,b){var c,d,f,g,h,i,j,k;null==b&&e.log(2,"no layout data",""),this.conf=e.mixConf(a,JSON.parse(JSON.stringify(this.defaultConf))),this.data=b,this.blocks={},this.size=0,g=0,h=this.data;for(f in h)k=h[f],this.blocks[k.id]={label:k.label,len:k.len,color:k.color,offset:g},k.offset=g,g+=k.len;this.size=g,d=this.conf.gap,j=this.size,c=this.data.length,i=this.data;for(f in i)k=i[f],this.blocks[k.id].start=k.offset/j*(2*Math.PI-c*d)+f*d,this.blocks[k.id].end=(k.offset+k.len)/j*(2*Math.PI-c*d)+f*d,k.start=k.offset/j*(2*Math.PI-c*d)+f*d,k.end=(k.offset+k.len)/j*(2*Math.PI-c*d)+f*d;return this.getAngle=function(a,b){var c;return c=this.blocks[a].start/this._size,"deg"===b?360*c:"rad"===b?2*c*Math.PI:null},this.summary=function(){var a,b,c,d,e;for(c={},e=this._data,b=0,d=e.length;b<d;b++)a=e[b],c[a.id]=a.len;return c},this},e.Core.prototype.heatmap=function(a,b,c){var d;return d=new e.Heatmap,d.build(this,b,c),this.tracks.heatmaps[a]=d,this},e.Core.prototype.histogram=function(a,b,c){var d;return d=new e.Histogram,d.build(this,b,c),this.tracks.histograms[a]=d,this},e.Core.prototype.chord=function(a,b,c){var d;return d=new e.Chord,d.build(this,b,c),this.tracks.chords[a]=d,this},e.Core.prototype.scatter=function(a,b,c){var d;return d=new e.Scatter,d.build(this,b,c),this.tracks.scatters[a]=d,this},e.Core.prototype.line=function(a,b,c){var d;return d=new e.Line,d.build(this,b,c),this.tracks.lines[a]=d,this},e.Core.prototype.stack=function(a,b,c){var d;return d=new e.Stack,d.build(this,b,c),this.tracks.stacks[a]=d,this},e.Core.prototype.highlight=function(a,b,c){var d;return d=new e.Highlight,d.build(this,b,c),this.tracks.highlights[a]=d,this},e.Core.prototype.text=function(a,b,c){var d;return d=new e.Text,d.build(this,b,c),this.tracks.texts[a]=d,this},e.Chord=function(){return e.Track.call(this),this.parseData=e.parseChordData,this.applyRules=function(a,b){var c,d,e,f,g;for(a=a||[],f=[],d=0,e=b.length;d<e;d++)c=b[d],f.push(function(){var b,d,e;for(e=[],d=0,b=a.length;d<b;d++)g=a[d],g.condition(c)?e.push(c[g.parameter]=g.value):e.push(void 0);return e}());return f},this.getSource=function(a){return function(a,b){var c,d,e,f;return a=a.source,c=b.blocks[a.id],f=c.start+a.start/c.len*(c.end-c.start),d=c.start+a.end/c.len*(c.end-c.start),e={radius:b.conf.innerRadius,startAngle:f,endAngle:d}}}(this),this.getTarget=function(a){return function(a,b){var c,d,e,f;return a=a.target,c=b.blocks[a.id],f=c.start+a.start/c.len*(c.end-c.start),d=c.start+a.end/c.len*(c.end-c.start),e={radius:b.conf.innerRadius,startAngle:f,endAngle:d}}}(this),this.dimChords=function(a,b,c,d){a.selectAll("path").style("opacity",function(a,b){return d==b?1:0})},this.resetChords=function(a,b){a.selectAll("path").style("opacity",b.opacity)},this.renderChords=function(a,b,c,d,e,f,g,h){var i,j;return j=a.append("g").attr("class",c.colorPalette),i=j.selectAll(".chord").data(d).enter().append("path").attr("class","chord").attr("d",d3.svg.chord().source(function(a){return g(a,e)}).target(function(a){return h(a,e)})).attr("opacity",function(a){return c.opacity}).attr("id",function(a){return a.source.id+"_"+a.target.id}).on("mouseover",function(a){return function(b,d,e){return a.dimChords(j,b,c,d),a.dispatch.mouseover(b,d,e)}}(this)).on("mouseout",function(a){return function(b,d,e){return a.resetChords(j,c),a.dispatch.mouseout(b,d,e)}}(this)),c.usePalette?i.attr("class",function(a){return"q"+f(a.value,c.cmin,c.cmax,c.colorPaletteSize,c.colorPaletteReverse,c.logScale)+"-"+c.colorPaletteSize}):i.attr("fill",function(a){return a.color||c.color}),i},this.render=function(a){return function(b,c,d){var f,g;if(c.select("."+d).remove(),g=c.append("g").attr("class",d).attr("z-index",a.conf.zIndex),f=a.renderChords(g,d,a.conf,a.data,b._layout,a.ratio,a.getSource,a.getTarget),null!=a.conf.tooltipContent)return e.registerTooltip(b,a,f,a.conf)}}(this),this},e.Heatmap=function(){return e.Track.call(this),this.parseData=e.parseSpanValueData,this.renderDatumContainer=function(a){return function(b,c,d,e,f){var g,h;return h=c.append("g").attr("class",f.colorPalette),g=a.renderBlock(h,e,b._layout,f)}}(this),this.renderDatum=function(a,b,c,d){return a.selectAll("tile").data(function(a){return a.values}).enter().append("path").attr("class","tile").attr("opacity",function(a){return a.opacity||b.opacity}).attr("d",d3.svg.arc().innerRadius(b.innerRadius).outerRadius(b.outerRadius).startAngle(function(a,b){return d.theta(a.start,c.blocks[a.block_id])}).endAngle(function(a,b){return d.theta(a.end,c.blocks[a.block_id])})).attr("class",function(a){return"q"+d.ratio(a.value,b.cmin,b.cmax,b.colorPaletteSize,b.colorPaletteReverse,b.logScale)+"-"+b.colorPaletteSize})},this},e.Highlight=function(){return e.Track.call(this),this.parseData=e.parseSpanStringData,this.renderDatumContainer=function(a){return function(b,c,d,e,f){var g;return g=a.renderBlock(c,e,b._layout,f)}}(this),this.renderDatum=function(a,b,c,d){return a.selectAll("tile").data(function(a){return a.values}).enter().append("path").attr("class","tile").attr("d",d3.svg.arc().innerRadius(b.innerRadius).outerRadius(b.outerRadius).startAngle(function(a,b){return d.theta(a.start,c.blocks[a.block_id])}).endAngle(function(a,b){return d.theta(a.end,c.blocks[a.block_id])})).attr("fill",function(a){return a.value||b.color}).attr("opacity",function(a){return a.opacity||b.opacity}).attr("stroke-width",function(a){return a.strokeWidth||b.strokeWidth}).attr("stroke",function(a){return a.strokeColor||b.strokeColor})},this},e.Histogram=function(){return e.Track.call(this),this.parseData=e.parseSpanValueData,this.renderDatumContainer=function(a){return function(b,c,d,e,f){var g,h;return h=c.append("g").attr("class",a.conf.colorPalette),g=a.renderBlock(h,e,b._layout,f)}}(this),this.renderDatum=function(a,b,c,e){var f;return f=a.selectAll(".bin").data(function(a){return a.values}).enter().append("path").attr("class","bin").attr("opacity",function(a){return a.opacity||b.opacity}).attr("d",d3.svg.arc().innerRadius(function(a){var c;return"in"===b.direction?(c=e.ratio(a.value,b.cmin,b.cmax,b.outerRadius-b.innerRadius,!1,b.logscale),b.outerRadius-c):b.innerRadius}).outerRadius(function(a){var c;return"out"===b.direction?(c=e.ratio(a.value,b.cmin,b.cmax,b.outerRadius-b.innerRadius,!1,b.logscale),b.innerRadius+c):b.outerRadius}).startAngle(function(a){return e.theta(a.start,c.blocks[a.block_id])}).endAngle(function(a){return e.theta(a.end,c.blocks[a.block_id])})),b.usePalette?f.attr("class",function(a){return"q"+e.ratio(a.value,b.cmin,b.cmax,b.colorPaletteSize,b.colorPaletteReverse,b.logScale)+"-"+b.colorPaletteSize}):f.attr("fill",d.color||b.color),f},this},e.Line=function(){return e.Track.call(this),this.parseData=e.parsePositionValueData,this.renderDatumContainer=function(a){return function(b,c,d,e,f){var g,h;return h=c.append("g").attr("class",d),g=a.renderBlock(h,e,b._layout,f)}}(this),this.renderDatum=function(a,b,c,d){var e;return e=d3.svg.line().x(function(a){return d.x(a,c,b)}).y(function(a){return d.y(a,c,b)}).interpolate(b.interpolation),a.append("path").datum(function(a){return a.values}).attr("class","line").attr("d",e).attr("opacity",function(a){return a.opacity||b.opacity}).attr("stroke-width",function(a){return a.thickness||b.thickness}).attr("stroke",function(a){return a.color||b.color}).attr("fill",function(a){var c,d;return d=a.fill||b.fill,c=a.fill_color||b.fill_color,d?c:"none"})},this},e.Scatter=function(){return e.Track.call(this),this.parseData=e.parsePositionValueData,this.renderDatumContainer=function(a){return function(b,c,d,e,f){var g,h;return h=c.append("g").attr("class",d),g=a.renderBlock(h,e,b._layout,f)}}(this),this.renderDatum=function(a,b,c,d){var e;return e=a.selectAll(".point").data(function(a){return a.values}).enter().append("path").attr("class","point").attr("opacity",function(a){return a.opacity||b.opacity}).attr("d",d3.svg.symbol().type(b.glyph.shape).size(b.glyph.size)).attr("transform",function(a){return function(a){return"translate("+d.x(a,c,b)+","+d.y(a,c,b)+") rotate("+360*d.theta(a.position,c.blocks[a.block_id])/(2*Math.PI)+")";
|
4
|
-
}}(this)).attr("stroke",function(a){return a.glyph_strokeColor||b.glyph.strokeColor}).attr("stroke-width",function(a){return a.glyph_strokeWidth||b.glyph.strokeWidth}).attr("fill",function(a){var c,d;return d=a.glyph_fill||b.glyph.fill,c=a.glyph_color||b.glyph.color,d?c:"none"})},this},e.Stack=function(){return e.Track.call(this),this.parseData=e.parseSpanValueData,this.build=function(a,b,c,d,e){return this.loadData(c,a),this.conf=this.processConf(b,this.defaultConf,this.meta,a,this),this.buildLayers(this.data,this.conf.margin),this.applyRules(b.rules,this.data)},this.buildLayers=function(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o;for(f in a)for(c=a[f],c.values=c.values.sort(function(a,b){return a.start<b.start?-1:a.start===b.start&&a.end>b.end?-1:a.start===b.start&&a.end===b.end?0:1}),j=[],o=c.values,g=0,k=o.length;g<k;g++){for(d=o[g],n=!1,e=m=0,l=j.length;m<l;e=++m)if(i=j[e],h=i.slice(0).pop(),h.end+b<d.start){i.push(d),d.layer=e,n=!0;break}n||(d.layer=j.length),n||j.push([d])}},this.applyRules=function(a,b){var c,d,e,f,g,h,i;a=a||[],g=[];for(e in b)i=b[e],g.push(function(){var b,e;b=i.layers,e=[];for(d in b)f=b[d],e.push(function(){var b,e,g;for(g=[],b=0,e=f.length;b<e;b++)c=f[b],g.push(function(){var b,e,f;for(f=[],e=0,b=a.length;e<b;e++)h=a[e],h.condition(i.parent,c,d)?f.push(c[h.parameter]=h.value):f.push(void 0);return f}());return g}());return e}());return g},this.datumRadialPosition=function(a){return function(b){var c,d,e;return e=(a.conf.thickness+a.conf.radialMargin)*b.layer,d=e+a.conf.thickness,"out"===a.conf.direction?[a.conf.innerRadius+e,Math.min(a.conf.innerRadius+d,a.conf.outerRadius)]:"in"===a.conf.direction?[Math.max(a.conf.outerRadius-d,a.conf.innerRadius),a.conf.outerRadius-e]:"center"===a.conf.direction?(c=Math.floor((a.conf.outerRadius+a.conf.innerRadius)/2),e=(a.conf.thickness+a.conf.radialMargin)*Math.floor(b.layer/2),d=e+a.conf.thickness,b.layer%2===0?[c+e,c+d]:[c-e-a.conf.radialMargin,c-d-a.conf.radialMargin]):void 0}}(this),this.datumInnerRadius=function(a){return function(b,c,d){return a.datumRadialPosition(b,c,d)[0]}}(this),this.datumOuterRadius=function(a){return function(b,c,d){return a.datumRadialPosition(b,c,d)[1]}}(this),this.renderDatumContainer=function(a){return function(b,c,d,e,f){var g,h;return h=c.append("g").attr("class",f.colorPalette),g=a.renderBlock(h,e,b._layout,f)}}(this),this.renderDatum=function(a,b,c,d){var e;return e=a.selectAll(".tile").data(function(a){return a.values}).enter().append("path").attr("class","tile").attr("d",d3.svg.arc().innerRadius(d.datumInnerRadius).outerRadius(d.datumOuterRadius).startAngle(function(a){return d.theta(a.start,c.blocks[a.block_id])}).endAngle(function(a){return d.theta(a.end,c.blocks[a.block_id])})),e.attr("opacity",function(a){return a.opacity||b.opacity}),e.attr("stroke-width",function(a){return a.strokeWidth||b.strokeWidth}),e.attr("stroke",function(a){return a.strokeColor||b.strokeColor}),e.attr("fill",function(a){return a.color||b.color}),e.attr("class",function(a){var c;if(c=a.usePalette||b.usePalette)return"q"+d.ratio(a.value,b.cmin,b.cmax,b.colorPaletteSize,b.colorPaletteReverse,b.logScale)+"-"+b.colorPaletteSize}),e},this},e.Text=function(){return e.Track.call(this),this.parseData=e.parsePositionTextData,this.renderDatumContainer=function(a){return function(b,c,d,e,f){var g,h;return h=c.append("g").attr("class",d),g=a.renderBlock(h,e,b._layout,f)}}(this),this.renderDatum=function(a,b,c,d){var e,f,g,h;g=a.selectAll("g").data(function(a){return a.values}).enter().append("g").append("text").text(function(a){return a.value}).attr("transform",function(a){var e;return e=360*d.theta(a.position,c.blocks[a.block_id])/(2*Math.PI)-90,"rotate("+e+")translate("+b.innerRadius+",0)"}),f=b.style;for(e in f)h=f[e],g.style(e,h);return g},this},e.Track=function(){return this.build=function(a,b,c){return this.dispatch=d3.dispatch("mouseover","mouseout"),this.loadData(c,a),this.conf=this.processConf(b,this.defaultConf,this.meta,a,this),this.applyRules(b.rules,this.data)},this.loadData=function(a,b){var c,d,e,f,g,h;for(e={},g=b._layout.data,d=0,f=g.length;d<f;d++)c=g[d],e[c.id]=c.len;return h=this.parseData(a,e),this.data=h.data,this.meta=h.meta},this.processConf=function(a,b,c,d,f){var g;return a=e.mixConf(a,Object.assign({},b)),a=f.computeMinMax(a,c),0===a.innerRadius&&0===a.outerRadius&&(g=d.smartBorders(),a.innerRadius=g.in,a.outerRadius=g.out),a},this.applyRules=function(a,b){var c,d,e,f,g,h;a=a||[],f=[];for(e in b)h=b[e],f.push(function(){var b,e;b=h.values,e=[];for(d in b)c=b[d],e.push(function(){var b,e,f;for(f=[],b=0,e=a.length;b<e;b++)g=a[b],g.condition(h.key,c,d)?f.push(c[g.parameter]=g.value):f.push(void 0);return f}());return e}());return f},this.computeMinMax=function(a,b){return a.cmin="smart"===a.min?b.min:a.min,a.cmax="smart"===a.max?b.max:a.max,a},this.ratio=function(a,b,c,d,e,f){var g,h,i;return h=f?2.3:1,b===c||a===b&&!e||a===c&&e?0:a===c||a===b&&e?d-1:(g=(a-b)/(c-b),i=Math.exp(1/h*Math.log(g)),e&&(i=1-i),Math.floor(d*i))},this.render=function(a){return function(b,c,d){var f,g,h,i;return c.select("."+d).remove(),i=c.append("g").attr("class",d).attr("z-index",a.conf.zIndex),f=a.renderDatumContainer(b,i,d,a.data,a.conf),(null!=(g=a.conf.axes)?g.display:void 0)&&a.renderAxes(f,a.conf,b._layout,a.data),h=a.renderDatum(f,a.conf,b._layout,a),null!=a.conf.tooltipContent&&e.registerTooltip(b,a,h,a.conf),h.on("mouseover",function(b,c,d){return a.dispatch.mouseover(b,c,d)}),h.on("mouseout",function(b,c,d){return a.dispatch.mouseout(b,c,d)})}}(this),this.renderBlock=function(a,b,c,d){var e,f;return f=d.outerRadius-d.innerRadius,e=a.selectAll(".block").data(b).enter().append("g").attr("class","block").attr("transform",function(a){return"rotate("+360*c.blocks[a.key].start/(2*Math.PI)+")"}),d.backgrounds&&e.selectAll(".background").data(d.backgrounds).enter().append("path").attr("class","background").attr("fill",function(a){return a.color}).attr("opacity",function(a){return a.opacity||1}).attr("d",d3.svg.arc().innerRadius(function(a){return"in"===d.direction?d.outerRadius-f*a.start:d.innerRadius+f*a.start}).outerRadius(function(a){return"in"===d.direction?d.outerRadius-f*a.end:d.innerRadius+f*a.end}).startAngle(function(a,b,c){return 0}).endAngle(function(a,d,e){return c.blocks[b[e].key].end-c.blocks[b[e].key].start})),e},this.renderAxes=function(a,b,c,d){var e,f,g;return"pixel"===b.axes.minor.spacingType&&(e=function(){var a,c,d,e,f;for(f=[],g=a=c=b.innerRadius,d=b.outerRadius,e=b.axes.minor.spacing;e>0?a<=d:a>=d;g=a+=e)f.push(g);return f}()),f=d3.svg.arc().innerRadius(function(a){return a}).outerRadius(function(a){return a}).startAngle(0).endAngle(function(a,b,e){var f;return f=c.blocks[d[e].key],f.end-f.start}),a.selectAll(".axis").data(e).enter().append("path").attr("opacity",b.opacity).attr("class","axis").attr("d",f).attr("stroke-width",function(a,c){return c%b.axes.major.spacing===0?b.axes.major.thickness:b.axes.minor.thickness}).attr("stroke",function(a,c){return c%b.axes.major.spacing===0?b.axes.major.color:b.axes.minor.color})},this.theta=function(a,b){return a/b.len*(b.end-b.start)},this.x=function(a){return function(b,c,d){var e,f,g;return f=a.ratio(b.value,d.cmin,d.cmax,d.outerRadius-d.innerRadius,!1,d.logscale),g="in"===d.direction?d.outerRadius-f:d.innerRadius+f,e=a.theta(b.position,c.blocks[b.block_id])-Math.PI/2,g*Math.cos(e)}}(this),this.y=function(a){return function(b,c,d){var e,f,g;return f=a.ratio(b.value,d.cmin,d.cmax,d.outerRadius-d.innerRadius,!1,d.logscale),g="in"===d.direction?d.outerRadius-f:d.innerRadius+f,e=a.theta(b.position,c.blocks[b.block_id])-Math.PI/2,g*Math.sin(e)}}(this),this.ratio=function(a,b,c,d,e,f){var g,h,i;return h=f?2.3:1,b===c||a===b&&!e||a===c&&e?0:a===c||a===b&&e?d-1:(g=(a-b)/(c-b),i=Math.exp(1/h*Math.log(g)),e&&(i=1-i),Math.floor(d*i))},this},e.renderLayout=function(a,b,c){var d,f,g,h;if(f=c._layout.conf,b.select(".cs-layout").remove(),h=b.append("g").attr("class","cs-layout").attr("z-index",f.zIndex).on("click",f.onClick),d=h.selectAll("g").data(c._layout.data).enter().append("g").attr("class",function(a){return a.id}).attr("opacity",f.opacity),g=a.svg.arc().innerRadius(f.innerRadius).outerRadius(f.outerRadius).cornerRadius(f.cornerRadius).startAngle(function(a){return a.start}).endAngle(function(a){return a.end}),d.append("path").attr("d",g).attr("fill",function(a){return a.color}).attr("id",function(a){return a.id}),f.labels.display&&e.renderLayoutLabels(f,a,d),f.ticks.display)return e.renderLayoutTicks(f,h,a,c)},e.renderLayoutLabels=function(a,b,c){var d,e,f;return f=a.innerRadius+a.labels.radialOffset,e=b.svg.arc().innerRadius(f).outerRadius(f).startAngle(function(a,b){return a.start}).endAngle(function(a,b){return a.end}),c.append("path").attr("fill","none").attr("stroke","none").attr("d",e).attr("id",function(a){return"arc-label"+a.id}),d=c.append("text").attr("font-size",a.labels.size).attr("text-anchor","middle"),d.append("textPath").attr("startOffset","25%").attr("xlink:href",function(a){return"#arc-label"+a.id}).style("fill",a.labels.color).text(function(a){var b=a.end-a.start;return a.label.slice(0,Math.floor(21*b))+".."})},e.renderLayoutTicks=function(a,b,c,d){var e,f,g;return e=function(b){var d,e;d=(b.end-b.start)/b.len,b.end-b.start>1.57?e=8:b.end-b.start>.785?e=4:b.end-b.start>.3925?e=2:b.end-b.start>0&&(e=0);var f=[],g={angle:0*d+b.start,label:0};f.push(g);var h=c.scale.linear().domain([1,b.len]).range([b.start,b.end]),i=h.ticks(e).length;h.ticks(e).map(function(c,e){var g=(c*d+b.start,b.len*d+b.start,{angle:c*d+b.start,label:c/a.ticks.labelDenominator+a.ticks.labelSuffix});f.push(g)}),f.splice(i,1);var g={angle:b.len*d+b.start-.006,label:b.len/a.ticks.labelDenominator+a.ticks.labelSuffix};return f.push(g),f},f=function(b,c){return a.ticks.labels===!1?null:a.ticks.labelDisplay0===!1&&0===c?null:c%a.ticks.labelSpacing?null:0===c?b/a.ticks.labelDenominator:b/a.ticks.labelDenominator+a.ticks.labelSuffix},g=b.append("g").selectAll("g").data(d._layout.data).enter().append("g").selectAll("g").data(e).enter().append("g").attr("transform",function(b){return"rotate("+(180*b.angle/Math.PI-90)+")translate("+a.outerRadius+",0)"}),g.append("line").attr("x1",0).attr("y1",1).attr("x2",function(b,c){return a.ticks.size.major}).attr("y2",1).style("stroke",a.ticks.color),g.append("text").attr("x",8).attr("dy",".35em").attr("transform",function(a){return a.angle>Math.PI?"rotate(180)translate(-16)":null}).attr("text-anchor",function(a){return a.angle>Math.PI?"end":null}).attr("font-size",a.ticks.labelSize).style("fill",a.ticks.labelColor).text(function(a){return a.label})},e.Core.prototype.render=function(a,b){var c,d,g,h,i,j,k,l,m,n;if("undefined"==typeof a&&(h=!0,a=[]),b){d=this.tracks;for(l in d){k=d[l];for(c in k)j=k[c],i.select("."+c).remove()}}i=d3.select(this.conf.container).attr("width",this.conf.width).attr("height",this.conf.height),n=i.select(".all"),n.empty()&&(n=i.append("g").attr("class","all").attr("transform","translate("+parseInt(this.conf.width/2)+","+parseInt(this.conf.height/2)+")")),g=this.tracks;for(l in g){k=g[l];for(c in k)j=k[c],(h||f.call(a,c)>=0)&&j.render(this,n,c)}return(h||f.call(a,"layout")>=0)&&e.renderLayout(d3,n,this),m=i.selectAll(".all > g").remove(),m[0].sort(function(a,b){return parseInt(a.getAttribute("z-index"))<parseInt(b.getAttribute("z-index"))?-1:parseInt(a.getAttribute("z-index"))>parseInt(b.getAttribute("z-index"))?1:0}),i.select(".all").selectAll("g").data(m[0]).enter().append(function(a){return a}),this},e.Core.prototype.defaultConf={width:700,height:700,container:"circos",defaultTrackWidth:10},e.Layout.prototype.defaultConf={innerRadius:250,outerRadius:300,cornerRadius:5,gap:.04,opacity:1,labels:{position:"center",display:!0,size:14,color:"#000",radialOffset:20},ticks:{display:!0,color:"grey",spacing:1e7,labels:!0,labelSpacing:10,labelSuffix:"Mb",labelDenominator:1e6,labelDisplay0:!0,labelSize:10,labelColor:"#000",labelFont:"default",majorSpacing:5,size:{minor:2,major:5}},onClick:null,onMouseOver:null,zIndex:100},e.axes={display:!1,minor:{spacing:5,spacingType:"pixel",color:"#d3d3d3",thickness:2},major:{spacing:5,color:"#000000",thickness:2}},e.Heatmap.prototype.defaultConf={innerRadius:0,outerRadius:0,min:"smart",max:"smart",colorPalette:"YlGnBu",colorPaletteSize:9,colorPaletteReverse:!1,logScale:!1,rules:[],backgrounds:[],zIndex:1,opacity:1,tooltipContent:null},e.Histogram.prototype.defaultConf={innerRadius:0,outerRadius:0,min:"smart",max:"smart",direction:"out",colorPaletteSize:9,colorPalette:"YlGnBu",usePalette:!0,colorPaletteReverse:!1,color:"#fd6a62",logScale:!1,axes:e.axes,rules:[],backgrounds:[],zIndex:1,opacity:1,tooltipContent:null},e.Chord.prototype.defaultConf={colorPaletteSize:9,colorPalette:"PuBuGn",usePalette:!0,colorPaletteReverse:!1,color:"#fd6a62",opacity:.7,min:"smart",max:"smart",logScale:!1,rules:[],backgrounds:[],zIndex:1,tooltipContent:null},e.Scatter.prototype.defaultConf={innerRadius:0,outerRadius:0,min:"smart",max:"smart",direction:"out",logScale:!1,glyph:{color:"#fd6a62",fill:!0,size:15,shape:"circle",strokeColor:"#d3d3d3",strokeWidth:2},axes:e.axes,rules:[],backgrounds:[],zIndex:1,opacity:1,tooltipContent:null},e.Line.prototype.defaultConf={innerRadius:0,outerRadius:0,min:"smart",max:"smart",direction:"out",logScale:!1,color:"#fd6a62",fill:!0,fill_color:"#d3d3d3",thickness:2,max_gap:1e7,interpolation:"linear",axes:e.axes,rules:[],backgrounds:[],zIndex:1,opacity:1,tooltipContent:null},e.Stack.prototype.defaultConf={innerRadius:0,outerRadius:0,colorPaletteSize:9,colorPalette:"PuBuGn",usePalette:!0,colorPaletteReverse:!1,color:"#fd6a62",min:"smart",max:"smart",direction:"out",logScale:!1,color:"#fd6a62",thickness:10,radialMargin:2,margin:2,strokeWidth:1,strokeColor:"#000000",axes:e.axes,rules:[],backgrounds:[],zIndex:1,opacity:1,tooltipContent:null},e.Highlight.prototype.defaultConf={innerRadius:0,outerRadius:0,defaultColor:"#fd6a62",opacity:.5,rules:[],zIndex:101,strokeColor:"#d3d3d3",strokeWidth:0,tooltipContent:null},e.Text.prototype.defaultConf={innerRadius:0,outerRadius:0,rules:[],backgrounds:[],zIndex:1,style:{},tooltipContent:null},e.registerTooltip=function(a,b,c,d){return b.tip=d3.tip().direction("s").offset([20,0]).html(d.tooltipContent),c.call(b.tip),b.dispatch.on("mouseover",function(a,c,d){return b.tip.attr("class","d3-tip appear").show(a)}),b.dispatch.on("mouseout",function(a,c,d){return b.tip.attr("class","d3-tip").show(a),b.tip.hide()})}}),c.registerDynamic("1c",["1b"],!0,function(a,b,c){this||self;c.exports=a("1b")}),c.register("1d",["17","20","21","22","23","1e","1c","1f"],function(a){var b,c,d,e,f,g,h,i,j,k;return{setters:[function(a){b=a.default},function(a){c=a},function(a){d=a.default},function(a){e=a.default},function(a){f=a.default},function(a){g=a.default},function(a){h=a.default},function(a){i=a.default}],execute:function(){j=function(){function a(b,d){var e=this;f(this,a),this.queries=[],d.queries.forEach(function(a){a.hits.length>0&&e.queries.push(a)}),this.svgContainer=b,this.seq_type=c.get_seq_type(d.program),this.algorithm=d.program,this.initiate()}return e(a,null,[{key:"name",value:function(){return"Queries and their top hits: chord diagram"}},{key:"className",value:function(){return"circos"}},{key:"collapseId",value:function(a){return"circos-collapse"}},{key:"dataName",value:function(a){return"Circos-visualisation"}}]),e(a,[{key:"initiate",value:function(){this.width=this.svgContainer.width(),this.height=600,this.innerRadius=200,this.outerRadius=230,this.query_arr=[],this.hit_arr=[],this.layout_arr=[],this.chords_arr=[],this.hsp_count=50,this.denominator=1,this.spacing=20,this.labelSpacing=10;var a={amino_acid:"aa",nucleic_acid:"bp"};this.construct_layout(),this.iterator_for_edits(),this.hit_arr=b.uniq(this.hit_arr),this.handle_spacing();var c=g.formatPrefix(this.max_length);this.suffix=" "+c.symbol+a[this.seq_type.subject_seq_type],"k"==c.symbol?this.denominator=1e3:"M"==c.symbol?(this.denominator=1e6,this.spacing=1e6,this.labelSpacing=2e5):"g"==c.symbol&&(this.denominator=1e9),g.select(this.svgContainer[0]).insert("svg",":first-child").attr("class","circosContainer"),this.create_instance(this.svgContainer,this.width,this.height),this.chords_arr.length&&this.layout_arr.length?this.instance_render():this.render_error(),this.setupTooltip()}},{key:"iterator_for_edits",value:function(){this.max_length=this.calculate_max_length(),this.hit_arr.length>10&&this.complex_layout_edits()}},{key:"construct_layout",value:function(){var a=0,c=32,d=this.queries.length,e=Math.min(c/2,d),f=(c-e)/e;this.new_layout=[],this.data=b.map(this.queries,b.bind(function(c){if(a<e){var d=c.id,g=c.length,h={len:g,color:"#8dd3c7",label:d,id:"Query_"+this.clean_id(c.id),ori_id:d};this.layout_arr.push(h);b.map(c.hits,b.bind(function(a){if(a.number<f){b.map(a.hsps,b.bind(function(d){if(b.indexOf(this.hit_arr,a.id)==-1){var e=a.id,f=a.length;this.hit_arr.push(a.id);var g={len:f,color:"#80b1d3",label:e,id:"Hit_"+this.clean_id(a.id),ori_id:e};this.layout_arr.push(g)}var h=["Query_"+this.clean_id(c.id),d.qstart,d.qend,"Hit_"+this.clean_id(a.id),d.sstart,d.send,a.number,d];return this.chords_arr.push(h),d},this));return a}},this))}return this.query_arr.push(c.id),c},this))}},{key:"rearrange_new_layout",value:function(){b.each(this.new_layout,b.bind(function(a){var b=a.id.slice(0,3);"Que"==b&&this.layout_arr.push(a)},this)),b.each(this.new_layout,b.bind(function(a){var b=a.id.slice(0,3);"Hit"==b&&this.layout_arr.push(a)},this))}},{key:"complex_layout_edits",value:function(){this.delete_from_layout=[],this.delete_from_chords=[],b.each(this.layout_arr,b.bind(function(a,c){var d=(a.len/this.max_length).toFixed(3);a.label;d<.1&&"Que"!=a.id.slice(0,3)&&(this.delete_from_layout.push(a),this.hit_arr.slice(b.indexOf(this.hit_arr,a.label),1))},this))}},{key:"check_in_chords_arr",value:function(a,c,d){var e=0;b.each(this.chords_arr,b.bind(function(b){"Que"==c&&b[0]!=a&&e++},this)),e==this.chords_arr.length&&(console.log("no record found "+a),this.delete_arr.push(d))}},{key:"find_index_of_hit",value:function(a){var c;return b.each(this.queries,b.bind(function(d){b.each(d.hits,b.bind(function(b){var d="Hit_"+this.clean_id(b.id);a==d&&(c=b.id)},this))},this)),b.indexOf(this.layout_arr,c)}},{key:"edit_labels",value:function(){console.log("label edits"),b.each(this.layout_arr,b.bind(function(a){var b=(a.len/this.max_length).toFixed(3),c=a.label;b<.41?a.label="..":c.length>10?a.label=c.slice(0,2)+"...":a.label=a.ori_id},this))}},{key:"calculate_multipliers",value:function(){var a=0,c=0;b.each(this.query_arr,b.bind(function(c){b.each(this.data,b.bind(function(b){c==b.id&&(a+=b.length)},this))},this)),b.each(this.data,b.bind(function(a){b.each(a.hits,b.bind(function(a){var d=b.indexOf(this.hit_arr,a.id);d>=0&&(c+=a.length)},this))},this));var d=(a+c)/2;console.log("mid sum "+d+" hit_sum "+c+" query_sum "+a),this.query_multiplier=(d/a).toFixed(3),this.hit_multiplier=(d/c).toFixed(3),console.log("query "+this.query_multiplier+" hit "+this.hit_multiplier)}},{key:"handle_spacing",value:function(){this.max_length>16e3?this.spacing=200:this.max_length>12e3?this.spacing=150:this.max_length>8e3?this.spacing=100:this.max_length>4e3?this.spacing=75:this.max_length>1800&&(this.spacing=50)}},{key:"calculate_max_length",value:function(){var a=0;return b.each(this.layout_arr,function(b){a<b.len&&(a=b.len)}),a}},{key:"clean_id",value:function(a){return a.replace(/[^a-zA-Z0-9]/g,"")}},{key:"create_instance",value:function(a,b,c){this.instance=new h({container:".circosContainer",width:b,height:c}),this.chord_layout(),this.instance_layout()}},{key:"chord_layout",value:function(){return this.chords_arr.length>32?this.paletteSize=32:this.paletteSize=this.chords_arr.length,{usePalette:!0,colorPaletteSize:this.paletteSize,colorPalette:"RdYlBu",opacity:.85}}},{key:"instance_layout",value:function(){return{innerRadius:this.innerRadius,outerRadius:this.outerRadius,cornerRadius:1,labels:{display:!0,size:"10px",radialOffset:10},ticks:{display:!0,spacing:this.spacing,labelSpacing:this.labelSpacing,labelDenominator:this.denominator,labelSuffix:this.suffix,labelSize:"10px",majorSpacing:this.labelSpacing,size:{minor:0,major:4}}}}},{key:"instance_render",value:function(){this.instance.layout(this.instance_layout(),this.layout_arr),this.instance.chord("chord1",this.chord_layout(),this.chords_arr),this.instance.render()}},{key:"render_error",value:function(){this.svgContainer.find("svg").remove(),this.svg=g.select(this.svgContainer[0]).insert("svg",":first-child").attr("width",this.svgContainer.width()).attr("height",this.svgContainer.height()).append("g").attr("class","circos-error").attr("transform","translate("+this.svgContainer.width()/2+","+this.svgContainer.height()/2+")").append("text").attr("text-anchor","start").attr("dy","-0.25em").attr("x",-175).style("font-size","14px").text("Circos looks great with less than 16 queries")}},{key:"layoutReset",value:function(){this.layoutHide=[],b.each(this.layout_arr,function(a){$("."+a.id).css("opacity",1)})}},{key:"chordsReset",value:function(){this.chordsHide=[],b.each(this.chords_arr,function(a){var b=a[1]+a[2],c=a[4]+a[5];$("#"+a[0]+"_"+b+"_"+a[3]+"_"+c).show()})}},{key:"chordsCheck",value:function(a,c){b.each(this.chords_arr,b.bind(function(b,d){"Que"==c&&b[0]==a&&(this.chordsHide.push(d),this.layoutHide.push(b[3])),"Hit"==c&&b[3]==a&&(this.chordsHide.push(d),this.layoutHide.push(b[0]))},this))}},{key:"chordsClean",value:function(){b.each(this.chords_arr,b.bind(function(a,c){if(b.indexOf(this.chordsHide,c)==-1){var d=a[1]+a[2],e=a[4]+a[5];$("#"+a[0]+"_"+d+"_"+a[3]+"_"+e).hide()}},this))}},{key:"layoutClean",value:function(){b.each(this.layout_arr,b.bind(function(a,c){b.indexOf(this.layoutHide,a.id)==-1&&$("."+a.id).css("opacity",.1)},this))}},{key:"setupTooltip",value:function(){var a={};$(".circos-distribution").on("click",b.bind(function(b){b.stopPropagation(),this.layoutReset(),this.chordsReset(),a={}},this)),b.each(this.query_arr,b.bind(function(c,d){this.chordsHide=[],this.layoutHide=[],c&&$(".circos .Query_"+this.clean_id(c)).attr("data-toggle","tooltip").attr("title",c).on("click",b.bind(function(b){if(b.stopPropagation(),a[d]!=c){a[d]=c;var e="Query_"+this.clean_id(c);this.layoutHide.push(e),this.chordsCheck(e,"Que"),this.chordsClean(),this.layoutClean()}else a[d]=0,this.layoutReset(),this.chordsReset()},this))},this)),b.each(this.hit_arr,b.bind(function(c,d){this.chordsHide=[],this.layoutHide=[],c&&$(".circos .Hit_"+this.clean_id(c)).attr("data-toggle","tooltip").attr("title",c).on("click",b.bind(function(b){if(b.stopPropagation(),a[d]!=c){a[d]=c;var e="Hit_"+this.clean_id(c);this.layoutHide.push(e),this.chordsCheck(e,"Hit"),this.chordsClean(),this.layoutClean()}else a[d]=0,this.layoutReset(),this.chordsReset()},this))},this));var e=this.algorithm;b.each(this.chords_arr,function(a){$("#"+a[0]+"_"+a[3]).attr("data-toggle","tooltip").attr("title",function(){var b="E value: "+c.prettify_evalue(a[7].evalue)+(", Identities: "+d.inPercentage(a[7].identity,a[7].length));return"blastn"!=e&&(b+="<br>Positives: "+d.inPercentage(a[7].positives,a[7].length)),b+=", Gaps: "+d.inPercentage(a[7].gaps,a[7].length)})}),$('[data-toggle="tooltip"]').tooltip({placement:"top",container:"body",html:"true",delay:0,"white-space":"nowrap"})}},{key:"ratioCalculate",value:function(a,b,c,d,e,f){var g,h,i;return h=f?2.3:1,b===c||a===b&&!e||a===c&&e?0:a===c||a===b&&e?d-1:(g=(a-b)/(c-b),i=Math.exp(1/h*Math.log(g)),e&&(i=1-i),Math.floor(d*i))}},{key:"drawLegend",value:function(){this.ratioHSP=[],b.each(this.chords_arr,b.bind(function(a){var b={number:a[6],evalue:a[7].evalue};this.ratioHSP.push(b)},this));var a=g.min(this.ratioHSP,function(a){return a.number}),c=g.max(this.ratioHSP,function(a){return a.number});console.log("chords_arr "+this.chords_arr.length),console.log("ratioHSP test "+this.ratioHSP.length),console.log("paletteSize "+this.paletteSize),console.log("min "+a+" max "+c),this.legend=g.select(this.svgContainer[0]).insert("svg",":first-child").attr("height",20).attr("width",30*this.ratioHSP.length).attr("transform","translate(10, 10)").append("g").attr("class","RdYlBu").attr("transform","translate(10, 0)");this.legend.selectAll(".bar").data(this.ratioHSP).enter().append("g").attr("class","g").attr("transform",function(a,b){return"translate("+30*b+",0)"}).append("rect").attr("class",b.bind(function(b,d){var e=this.ratioCalculate(b.number,a,c,this.paletteSize,!1,!1);return console.log("calc ratio "+e),"q"+e+"-"+this.paletteSize},this)).attr("data-toggle","tooltip").attr("title",function(a){return a.evalue}).attr("x",1).attr("width",30).attr("height",20),g.scale.linear().domain([0,250]).range([0,100])}}]),a}(),k=i(j),a("default",k)}}}),c.register("24",["17","20","21","22","23","1e","1f"],function(a){var b,c,d,e,f,g,h,i,j;return{setters:[function(a){b=a.default},function(a){c=a},function(a){d=a.default},function(a){e=a.default},function(a){f=a.default},function(a){g=a.default},function(a){h=a.default}],execute:function(){i=function(){function a(b,c){f(this,a),this.svg_container=b,$queryDiv=b.parents(".resultn"),hits=this.extractData(c.query.hits,c.query.number),this.graphIt($queryDiv,b,0,20,null,hits)}return e(a,null,[{key:"name",value:function(){return"Graphical overview of hits"}},{key:"className",value:function(){return"alignment-overview"}},{key:"collapseId",value:function(a){return"alignment_"+a.query.number}},{key:"dataName",value:function(a){return"Alignment-Overview-"+a.query.id}}]),e(a,[{key:"extractData",value:function(a,c){var d=[];return a.map(function(a){var e=[],f=a.hsps;b.each(f,function(b){var d={};d.hspEvalue=b.evalue,d.hspStart=b.qstart,d.hspEnd=b.qend,d.hspFrame=b.sframe,d.hspId="Query_"+c+"_hit_"+a.number+"_hsp_"+b.number,d.hspIdentity=b.identity,d.hspGaps=b.gaps,d.hspPositives=b.positives,d.hspLength=b.length,e.push(d)}),e.hitId=a.id,e.hitDef="Query_"+c+"_hit_"+a.number,e.hitEvalue=a.evalue,d.push(e)}),d}},{key:"setupTooltip",value:function(){this.svg_container.find('[data-toggle="tooltip"]').tooltip({placement:"top",container:"body",html:"true",delay:0,"white-space":"nowrap"})}},{key:"setupClick",value:function(a){$("a",a).click(function(a){a.preventDefault(),a.stopPropagation(),window.location.hash=$(this).attr("href")})}},{key:"graphControls",value:function(a,c,d,e,f){var g,h,i,j,k=20,l=function(){g=f.length,h=a.find(".ghit > g").length},m=function(a,b){b.append($("<button/>").addClass("btn btn-link more").attr("type","button").attr("data-parent-query",a.attr("id")).html("View More ").append($("<i/>").html(" ").addClass("fa fa-angle-double-down")),$("<button/>").addClass("btn btn-link less").attr("type","button").attr("data-parent-query",a.attr("id")).html("View Less ").append($("<i/>").html(" ").addClass("fa fa-angle-double-up"))),i=$(".less",b),j=$(".more",b)},n=function(){l(),g===k||h<k?(i.hide(),j.hide()):h===g?(j.hide(),i.show()):h===k?(i.hide(),j.show()):(i.show(),j.show())};d===!0&&(m(a,c),n()),j.on("click",b.bind(function(b){l(),this.graphIt(a,c,h,k,e,f),n(),this.setupTooltip(),b.stopPropagation()},this)),i.on("click",b.bind(function(b){l();var d=h-k;d>=k?(this.graphIt(a,c,h,-k,e,f),n()):0!==d&&(this.graphIt(a,c,h,k-h,e,f),n()),this.setupTooltip(),b.stopPropagation()},this))}},{key:"drawLegend",value:function(a,b,c,d,e){var f=a.append("g").attr("transform","translate(0,"+(d-1.75*b.margin)+")");f.append("rect").attr("x",7.5*(c-2*b.margin)/10).attr("width",2*(c-4*b.margin)/10).attr("height",b.legend).attr("fill","url(#legend-grad)"),f.append("text").attr("class"," legend-text").attr("transform","translate(0, "+b.legend+")").attr("x",9.5*(c-2*b.margin)/10+b.margin/2).text("Weaker hits"),f.append("text").attr("class"," legend-text").attr("transform","translate(0, "+b.legend+")").attr("x",6.7*(c-2*b.margin)/10-b.margin/2).text("Stronger hits"),a.append("linearGradient").attr("id","legend-grad").selectAll("stop").data([{offset:"0%",color:"#000"},{offset:"45%",color:"#c74f14"},{offset:"100%",color:"#f6bea2"}]).enter().append("stop").attr("offset",function(a){return a.offset}).attr("stop-color",function(a){return a.color})}},{key:"graphIt",value:function(a,b,e,f,h,i){var j={barHeight:4,legend:i.length>1?3:0,margin:20},k=$.extend(j,h),l=i.slice(0,e+f);if(l.length<1)return!1;0!==e&&b.find("svg").remove();var m=a.data().queryLen,n=a.attr("id"),o=b.width(),p=l.length*k.barHeight+2*k.legend+4*k.margin,q={blastn:"nucleic_acid",blastp:"amino_acid",blastx:"nucleic_acid",tblastx:"nucleic_acid",tblastn:"amino_acid"},r=g.select(b[0]).selectAll("svg").data([l]).enter().insert("svg",":first-child").attr("width",o).attr("height",p).append("g").attr("transform","translate("+k.margin/2+", "+1.5*k.margin+")"),s=g.scale.linear().range([0,o-k.margin]);s.domain([1,m]);var t=a.data().algorithm,u=c.tick_formatter(s,q[t]),v=s.ticks(11);v.pop();var w=g.svg.axis().scale(s).orient("top").tickValues(v.concat([1,m])).tickFormat(u),x=r.append("g").attr("transform","translate(0, "+k.margin+")").append("g").attr("class","x axis").call(w);x.selectAll("text").attr("x","25px").attr("y","2px").attr("transform","rotate(-90)");var y=g.scale.ordinal().rangeBands([0,p-3*k.margin-2*k.legend],.3);y.domain(l.map(function(a){return a.hitId}));var z=g.scale.log().domain([g.min([1e-5,g.min(l.map(function(a){if(0!==parseFloat(a.hitEvalue))return a.hitEvalue}))]),g.max(l.map(function(a){return a.hitEvalue}))]).range([0,.8]);r.append("g").attr("class","ghit").attr("transform","translate(0, "+1.65*(k.margin-k.legend)+")").selectAll(".hits").data(l).enter().append("g").each(function(a,b){g.select(this).selectAll(".hsp").data(a).enter().append("a").each(function(e,f){var h=y(a.hitId)+k.barHeight/2,i=g.hsl(20,.82,z(e.hspEvalue));f+1<a.length&&(a[f].hspEnd<=a[f+1].hspStart?g.select(this.parentNode).append("line").attr("x1",s(a[f].hspEnd)).attr("y1",h).attr("x2",s(a[f+1].hspStart)).attr("y2",h).attr("stroke",i):a[f].hspStart>a[f+1].hspEnd&&g.select(this.parentNode).append("line").attr("x1",s(a[f+1].hspEnd)).attr("y1",h).attr("x2",s(a[f].hspStart)).attr("y2",h).attr("stroke",i));var j=a.hitId+"<br>E value: "+c.prettify_evalue(e.hspEvalue)+("<br>Identities: "+d.inPercentage(e.hspIdentity,e.hspLength));"blastn"!=t&&(j+="<br>Positives: "+d.inPercentage(e.hspPositives,e.hspLength)),j+=", Gaps: "+d.inPercentage(e.hspGaps,e.hspLength),g.select(this).attr("xlink:href","#"+n+"_hit_"+(b+1)).append("rect").attr("data-toggle","tooltip").attr("title",j).attr("class","bar").attr("x",function(a){return s(a.hspStart)}).attr("y",y(a.hitId)).attr("width",function(a){return s(a.hspEnd-a.hspStart+1)}).attr("height",k.barHeight).attr("fill",g.rgb(i))})}),l.length>1&&this.drawLegend(r,k,o,p,i),0===e&&this.graphControls(a,b,!0,h,i),this.setupTooltip(),this.setupClick(b)}}]),a}(),j=h(i),a("default",j)}}}),c.register("25",["17","20","22","23","1e","1f"],function(a){var b,c,d,e,f,g,h,i;return{setters:[function(a){b=a.default},function(a){c=a},function(a){d=a.default},function(a){e=a.default},function(a){f=a.default},function(a){g=a.default}],execute:function(){h=function(){function a(b,d){e(this,a),this.query=d.query,this._seq_type=c.get_seq_type(d.algorithm),this.svg_container=b,"blastx"==d.algorithm?this.query_length=this.query.length/3:"tblastn"==d.algorithm?this.query_length=3*this.query.length:this.query_length=this.query.length,this._margin={top:30,right:25,bottom:55,left:12.5},this.initiate(b.width(),b.height())}return d(a,null,[{key:"name",value:function(){return"Length distribution of hits"}},{key:"className",value:function(){return"length-distribution"}},{key:"collapseId",value:function(a){return"length_"+a.query.number}},{key:"dataName",value:function(a){return"length-distribution-"+a.query.id}}]),d(a,[{key:"initiate",value:function(a,b){this._width=a-this._margin.left-this._margin.right,this._height=b-this._margin.top-this._margin.bottom,this.svg=f.select(this.svg_container[0]).insert("svg",":first-child").attr("width",this._width+this._margin.right+this._margin.left).attr("height",this._height+this._margin.top+this._margin.bottom).append("g").attr("transform","translate("+this._margin.left+","+this._margin.top+")"),
|
5
|
-
this.hit_lengths(),this.define_scale_and_bins(),this.update_data(),this.draw()}},{key:"draw",value:function(){this.draw_rectangles(),this.draw_query_line(),this.draw_axes(),this.setupTooltip()}},{key:"define_scale_and_bins",value:function(){this._scale_x=f.scale.linear().domain([0,1.01*f.max([this.query_length,f.max(this._data)])]).nice().range([0,this._width]),this._bins=f.layout.histogram().range(this._scale_x.domain()).bins(this._scale_x.ticks(50))(this._data),this._scale_y=f.scale.linear().domain([0,f.max(this._bins,function(a){return a.length})]).range([this._height,0]).nice()}},{key:"hit_lengths",value:function(){this._data=b.map(this.query.hits,b.iteratee("length"))}},{key:"setupTooltip",value:function(){this.svg_container.find('[data-toggle="tooltip"]').tooltip({placement:"top",container:"body",html:"true",delay:0,"white-space":"nowrap"})}},{key:"setupResponsiveness",value:function(){var a=$(window).width();console.log("cureent "+a);var c=b.debounce(b.bind(function(){a!=$(window).width()&&(console.log("redraw initiated "+this._height),this.draw(),a=$(window).width())},this),125);$(window).resize(c)}},{key:"tick_formatter",value:function(a){var c=this._scale_x.ticks(),d=f.format(".1f"),e=f.formatPrefix(c[c.length-1]),g={amino_acid:"aa",nucleic_acid:"bp"};return function(f){if(0!==f)return b.indexOf(c,f)>=0?"aa"==g[a]?f+" "+g[a]:d(e.scale(f))+" "+e.symbol+g[a]:void 0}}},{key:"update_data",value:function(){var a=this,d=[];this._bins.map(function(e){var f=[];e.reverse();var g=e.length;e.map(function(d,h){var i=e.length-(h+1),j=b.findIndex(a.query.hits,{length:d}),k={value:d,id:a.query.hits[j].id,evalue:a.query.hits[j].evalue,url:"#Query_"+a.query.number+"_hit_"+a.query.hits[j].number,y0:g,y1:g+=i-g,color:c.get_colors_for_evalue(a.query.hits[j].evalue,a.query.hits)};f.push(k)});var h={data:f,x:e.x,dx:e.dx,length:e.length};d.push(h)}),this._update_data=d}},{key:"draw_rectangles",value:function(){var a=this,b=this.svg.selectAll(".bar").data(this._update_data).enter().append("g").attr("class","g").attr("transform",function(b){return"translate("+(a._scale_x(b.x)+a._margin.left)+",0)"});b.selectAll("rect").data(function(a){return a.data}).enter().append("a").attr("xlink:href",function(a){return a.url}).append("rect").attr("class","bar").attr("data-toggle","tooltip").attr("title",function(a){return a.id+" <br>E value: "+c.prettify_evalue(a.evalue)+"<br>Length: "+a.value}).attr("x",1).attr("y",function(b){return a._scale_y(b.y0)}).attr("width",a._scale_x(this._bins[1].x)-a._scale_x(this._bins[0].x)-1).attr("height",function(b){return a._scale_y(b.y1)-a._scale_y(b.y0)}).attr("fill",function(a){return a.color})}},{key:"draw_query_line",value:function(){var a=this.svg.append("g").attr("class","query_line").attr("transform","translate("+(this._margin.left+this._scale_x(this.query_length))+",0)");a.append("rect").attr("x",1).attr("class","bar").attr("width",4).attr("height",this._height).style("fill","#c74f14"),a.append("text").attr("dy","0.75em").attr("y",-10).attr("x",2).attr("text-anchor","start").text("Query").style("fill","#000").attr("transform","rotate(-45)")}},{key:"draw_axes",value:function(){var a,c;c=this._scale_y.ticks().length,a=c>=5?5:c;var d=this.tick_formatter(this._seq_type.subject_seq_type),e=f.svg.axis().scale(this._scale_x).orient("bottom").ticks(50).tickFormat(d),g=f.svg.axis().scale(this._scale_y).orient("left").tickValues(this._scale_y.ticks(a)).outerTickSize(0).tickFormat(function(a){if(Math.floor(a)==a)return a}),h=this._scale_y.ticks();for(var i in h)if(h[i]%1!=0){g.tickValues(f.range(0,f.max(this._bins,function(a){return a.length})+1));break}var j=this,k=this.svg.append("g").attr("class","axis axis--x").attr("transform","translate("+this._margin.left+","+this._height+")").call(e);k.selectAll("line").attr("y2",function(a){var c=j._scale_x.ticks();return b.indexOf(c,a)>=0?7:4}),k.selectAll("text").style("text-anchor","end").attr("x","-8px").attr("y","3px").attr("dy","0").attr("transform","rotate(-90)");this.svg.append("g").attr("class","axis axis--y").attr("transform","translate("+this._margin.left+",0)").call(g)}}]),a}(),i=g(h),a("default",i)}}}),c.register("26",["17","21","24","25","1a"],function(a){var b,c,d,e,f,g;return{setters:[function(a){b=a.default},function(a){c=a.default},function(a){d=a.default},function(a){e=a.default},function(a){f=a.default}],execute:function(){a("default",f.createClass({displayName:"query",domID:function(){return"Query_"+this.props.query.number},queryLength:function(){return this.props.query.length},numhits:function(){return this.props.query.hits.length},render:function(){return f.createElement("div",{className:"resultn",id:this.domID(),"data-query-len":this.props.query.length,"data-algorithm":this.props.program},this.headerJSX(),this.numhits()&&this.hitsListJSX()||this.noHitsJSX())},headerJSX:function(){var a="length: "+this.queryLength().toLocaleString();return this.props.showQueryCrumbs&&(a="query "+this.props.query.number+", "+a),f.createElement("div",{className:"section-header"},f.createElement("h3",null,f.createElement("strong",null,"Query= ",this.props.query.id)," ",this.props.query.title),f.createElement("span",{className:"label label-reset pos-label"},a))},hitsListJSX:function(){return f.createElement("div",{className:"section-content"},f.createElement(d,{key:"GO_"+this.props.query.number,query:this.props.query,program:this.props.program,collapsed:this.props.veryBig}),f.createElement(e,{key:"LD_"+this.props.query.id,query:this.props.query,algorithm:this.props.program,collapsed:"true"}),f.createElement(g,{key:"HT_"+this.props.query.number,query:this.props.query,imported_xml:this.props.imported_xml}))},noHitsJSX:function(){return f.createElement("div",{className:"section-content"},f.createElement("strong",null," ****** No hits found ****** "))},shouldComponentUpdate:function(){return!this.props.query}})),g=f.createClass({displayName:"HitsTable",mixins:[c],render:function(){var a=b.every(this.props.query.hits,function(a){return""!==a.sciname}),c=55;return a&&(c-=15),this.props.imported_xml&&(c+=15),f.createElement("div",{className:"table-hit-overview"},f.createElement("h4",{className:"caption","data-toggle":"collapse","data-target":"#Query_"+this.props.query.number+"HT_"+this.props.query.number},f.createElement("i",{className:"fa fa-minus-square-o"})," ",f.createElement("span",null,"Summary table of hits")),f.createElement("div",{className:"collapsed in",id:"Query_"+this.props.query.number+"HT_"+this.props.query.number},f.createElement("table",{className:"table table-hover table-condensed tabular-view "},f.createElement("thead",null,f.createElement("th",{className:"text-left"},"#"),f.createElement("th",{width:c+"%"},"Similar sequences"),a&&f.createElement("th",{width:"15%",className:"text-left"},"Species"),!this.props.imported_xml&&f.createElement("th",{width:"15%",className:"text-right"},"Query coverage (%)"),f.createElement("th",{width:"10%",className:"text-right"},"Total score"),f.createElement("th",{width:"10%",className:"text-right"},"E value"),f.createElement("th",{width:"10%",className:"text-right","data-toggle":"tooltip","data-placement":"left",title:"Total identity of all hsps / total length of all hsps"},"Identity (%)")),f.createElement("tbody",null,b.map(this.props.query.hits,b.bind(function(b){return f.createElement("tr",{key:b.number},f.createElement("td",{className:"text-left"},b.number+"."),f.createElement("td",{className:"nowrap-ellipsis",title:b.id+" "+b.title,"data-toggle":"tooltip","data-placement":"left"},f.createElement("a",{href:"#Query_"+this.props.query.number+"_hit_"+b.number,className:"btn-link"},b.id," ",b.title)),a&&f.createElement("td",{className:"nowrap-ellipsis",title:b.sciname,"data-toggle":"tooltip","data-placement":"top"},b.sciname),!this.props.imported_xml&&f.createElement("td",{className:"text-right"},b.qcovs),f.createElement("td",{className:"text-right"},b.score),f.createElement("td",{className:"text-right"},this.inExponential(b.hsps[0].evalue)),f.createElement("td",{className:"text-right"},b.identity))},this))))))}})}}}),c.registerDynamic("27",[],!1,function(a,b,d){var e=c.get("@@global-helpers").prepareGlobal(d.id,"d3",null);return function(a){"format global";"exports d3";!function(){function a(a){return a&&(a.ownerDocument||a.document||a).documentElement}function b(a){return a&&(a.ownerDocument&&a.ownerDocument.defaultView||a.document&&a||a.defaultView)}function c(a,b){return a<b?-1:a>b?1:a>=b?0:NaN}function d(a){return null===a?NaN:+a}function e(a){return!isNaN(a)}function g(a){return{left:function(b,c,d,e){for(arguments.length<3&&(d=0),arguments.length<4&&(e=b.length);d<e;){var f=d+e>>>1;a(b[f],c)<0?d=f+1:e=f}return d},right:function(b,c,d,e){for(arguments.length<3&&(d=0),arguments.length<4&&(e=b.length);d<e;){var f=d+e>>>1;a(b[f],c)>0?e=f:d=f+1}return d}}}function h(a){return a.length}function i(a){for(var b=1;a*b%1;)b*=10;return b}function j(a,b){for(var c in b)Object.defineProperty(a.prototype,c,{value:b[c],enumerable:!1})}function k(){this._=Object.create(null)}function l(a){return(a+="")===ng||a[0]===og?og+a:a}function m(a){return(a+="")[0]===og?a.slice(1):a}function n(a){return l(a)in this._}function o(a){return(a=l(a))in this._&&delete this._[a]}function p(){var a=[];for(var b in this._)a.push(m(b));return a}function q(){var a=0;for(var b in this._)++a;return a}function r(){for(var a in this._)return!1;return!0}function s(){this._=Object.create(null)}function t(a){return a}function u(a,b,c){return function(){var d=c.apply(b,arguments);return d===b?a:d}}function v(a,b){if(b in a)return b;b=b.charAt(0).toUpperCase()+b.slice(1);for(var c=0,d=pg.length;c<d;++c){var e=pg[c]+b;if(e in a)return e}}function w(){}function x(){}function y(a){function b(){for(var b,d=c,e=-1,f=d.length;++e<f;)(b=d[e].on)&&b.apply(this,arguments);return a}var c=[],d=new k;return b.on=function(b,e){var f,g=d.get(b);return arguments.length<2?g&&g.on:(g&&(g.on=null,c=c.slice(0,f=c.indexOf(g)).concat(c.slice(f+1)),d.remove(b)),e&&c.push(d.set(b,{on:e})),a)},b}function z(){cg.event.preventDefault()}function A(){for(var a,b=cg.event;a=b.sourceEvent;)b=a;return b}function B(a){for(var b=new x,c=0,d=arguments.length;++c<d;)b[arguments[c]]=y(b);return b.of=function(c,d){return function(e){try{var f=e.sourceEvent=cg.event;e.target=a,cg.event=e,b[e.type].apply(c,d)}finally{cg.event=f}}},b}function C(a){return rg(a,vg),a}function D(a){return"function"==typeof a?a:function(){return sg(a,this)}}function E(a){return"function"==typeof a?a:function(){return tg(a,this)}}function F(a,b){function c(){this.removeAttribute(a)}function d(){this.removeAttributeNS(a.space,a.local)}function e(){this.setAttribute(a,b)}function f(){this.setAttributeNS(a.space,a.local,b)}function g(){var c=b.apply(this,arguments);null==c?this.removeAttribute(a):this.setAttribute(a,c)}function h(){var c=b.apply(this,arguments);null==c?this.removeAttributeNS(a.space,a.local):this.setAttributeNS(a.space,a.local,c)}return a=cg.ns.qualify(a),null==b?a.local?d:c:"function"==typeof b?a.local?h:g:a.local?f:e}function G(a){return a.trim().replace(/\s+/g," ")}function H(a){return new RegExp("(?:^|\\s+)"+cg.requote(a)+"(?:\\s+|$)","g")}function I(a){return(a+"").trim().split(/^|\s+/)}function J(a,b){function c(){for(var c=-1;++c<e;)a[c](this,b)}function d(){for(var c=-1,d=b.apply(this,arguments);++c<e;)a[c](this,d)}a=I(a).map(K);var e=a.length;return"function"==typeof b?d:c}function K(a){var b=H(a);return function(c,d){if(e=c.classList)return d?e.add(a):e.remove(a);var e=c.getAttribute("class")||"";d?(b.lastIndex=0,b.test(e)||c.setAttribute("class",G(e+" "+a))):c.setAttribute("class",G(e.replace(b," ")))}}function L(a,b,c){function d(){this.style.removeProperty(a)}function e(){this.style.setProperty(a,b,c)}function f(){var d=b.apply(this,arguments);null==d?this.style.removeProperty(a):this.style.setProperty(a,d,c)}return null==b?d:"function"==typeof b?f:e}function M(a,b){function c(){delete this[a]}function d(){this[a]=b}function e(){var c=b.apply(this,arguments);null==c?delete this[a]:this[a]=c}return null==b?c:"function"==typeof b?e:d}function N(a){function b(){var b=this.ownerDocument,c=this.namespaceURI;return c?b.createElementNS(c,a):b.createElement(a)}function c(){return this.ownerDocument.createElementNS(a.space,a.local)}return"function"==typeof a?a:(a=cg.ns.qualify(a)).local?c:b}function O(){var a=this.parentNode;a&&a.removeChild(this)}function P(a){return{__data__:a}}function Q(a){return function(){return ug(this,a)}}function R(a){return arguments.length||(a=c),function(b,c){return b&&c?a(b.__data__,c.__data__):!b-!c}}function S(a,b){for(var c=0,d=a.length;c<d;c++)for(var e,f=a[c],g=0,h=f.length;g<h;g++)(e=f[g])&&b(e,g,c);return a}function T(a){return rg(a,xg),a}function U(a){var b,c;return function(d,e,f){var g,h=a[f].update,i=h.length;for(f!=c&&(c=f,b=0),e>=b&&(b=e+1);!(g=h[b])&&++b<i;);return g}}function V(a,b,c){function d(){var b=this[g];b&&(this.removeEventListener(a,b,b.$),delete this[g])}function e(){var e=i(b,eg(arguments));d.call(this),this.addEventListener(a,this[g]=e,e.$=c),e._=b}function f(){var b,c=new RegExp("^__on([^.]+)"+cg.requote(a)+"$");for(var d in this)if(b=d.match(c)){var e=this[d];this.removeEventListener(b[1],e,e.$),delete this[d]}}var g="__on"+a,h=a.indexOf("."),i=W;h>0&&(a=a.slice(0,h));var j=yg.get(a);return j&&(a=j,i=X),h?b?e:d:b?w:f}function W(a,b){return function(c){var d=cg.event;cg.event=c,b[0]=this.__data__;try{a.apply(this,b)}finally{cg.event=d}}}function X(a,b){var c=W(a,b);return function(a){var b=this,d=a.relatedTarget;d&&(d===b||8&d.compareDocumentPosition(b))||c.call(b,a)}}function Y(c){var d=".dragsuppress-"+ ++Ag,e="click"+d,f=cg.select(b(c)).on("touchmove"+d,z).on("dragstart"+d,z).on("selectstart"+d,z);if(null==zg&&(zg=!("onselectstart"in c)&&v(c.style,"userSelect")),zg){var g=a(c).style,h=g[zg];g[zg]="none"}return function(a){if(f.on(d,null),zg&&(g[zg]=h),a){var b=function(){f.on(e,null)};f.on(e,function(){z(),b()},!0),setTimeout(b,0)}}}function Z(a,c){c.changedTouches&&(c=c.changedTouches[0]);var d=a.ownerSVGElement||a;if(d.createSVGPoint){var e=d.createSVGPoint();if(Bg<0){var f=b(a);if(f.scrollX||f.scrollY){d=cg.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var g=d[0][0].getScreenCTM();Bg=!(g.f||g.e),d.remove()}}return Bg?(e.x=c.pageX,e.y=c.pageY):(e.x=c.clientX,e.y=c.clientY),e=e.matrixTransform(a.getScreenCTM().inverse()),[e.x,e.y]}var h=a.getBoundingClientRect();return[c.clientX-h.left-a.clientLeft,c.clientY-h.top-a.clientTop]}function $(){return cg.event.changedTouches[0].identifier}function _(a){return a>0?1:a<0?-1:0}function aa(a,b,c){return(b[0]-a[0])*(c[1]-a[1])-(b[1]-a[1])*(c[0]-a[0])}function ba(a){return a>1?0:a<-1?Eg:Math.acos(a)}function ca(a){return a>1?Hg:a<-1?-Hg:Math.asin(a)}function da(a){return((a=Math.exp(a))-1/a)/2}function ea(a){return((a=Math.exp(a))+1/a)/2}function fa(a){return((a=Math.exp(2*a))-1)/(a+1)}function ga(a){return(a=Math.sin(a/2))*a}function ha(){}function ia(a,b,c){return this instanceof ia?(this.h=+a,this.s=+b,void(this.l=+c)):arguments.length<2?a instanceof ia?new ia(a.h,a.s,a.l):wa(""+a,xa,ia):new ia(a,b,c)}function ja(a,b,c){function d(a){return a>360?a-=360:a<0&&(a+=360),a<60?f+(g-f)*a/60:a<180?g:a<240?f+(g-f)*(240-a)/60:f}function e(a){return Math.round(255*d(a))}var f,g;return a=isNaN(a)?0:(a%=360)<0?a+360:a,b=isNaN(b)?0:b<0?0:b>1?1:b,c=c<0?0:c>1?1:c,g=c<=.5?c*(1+b):c+b-c*b,f=2*c-g,new sa(e(a+120),e(a),e(a-120))}function ka(a,b,c){return this instanceof ka?(this.h=+a,this.c=+b,void(this.l=+c)):arguments.length<2?a instanceof ka?new ka(a.h,a.c,a.l):a instanceof ma?oa(a.l,a.a,a.b):oa((a=ya((a=cg.rgb(a)).r,a.g,a.b)).l,a.a,a.b):new ka(a,b,c)}function la(a,b,c){return isNaN(a)&&(a=0),isNaN(b)&&(b=0),new ma(c,Math.cos(a*=Ig)*b,Math.sin(a)*b)}function ma(a,b,c){return this instanceof ma?(this.l=+a,this.a=+b,void(this.b=+c)):arguments.length<2?a instanceof ma?new ma(a.l,a.a,a.b):a instanceof ka?la(a.h,a.c,a.l):ya((a=sa(a)).r,a.g,a.b):new ma(a,b,c)}function na(a,b,c){var d=(a+16)/116,e=d+b/500,f=d-c/200;return e=pa(e)*Tg,d=pa(d)*Ug,f=pa(f)*Vg,new sa(ra(3.2404542*e-1.5371385*d-.4985314*f),ra(-.969266*e+1.8760108*d+.041556*f),ra(.0556434*e-.2040259*d+1.0572252*f))}function oa(a,b,c){return a>0?new ka(Math.atan2(c,b)*Jg,Math.sqrt(b*b+c*c),a):new ka(NaN,NaN,a)}function pa(a){return a>.206893034?a*a*a:(a-4/29)/7.787037}function qa(a){return a>.008856?Math.pow(a,1/3):7.787037*a+4/29}function ra(a){return Math.round(255*(a<=.00304?12.92*a:1.055*Math.pow(a,1/2.4)-.055))}function sa(a,b,c){return this instanceof sa?(this.r=~~a,this.g=~~b,void(this.b=~~c)):arguments.length<2?a instanceof sa?new sa(a.r,a.g,a.b):wa(""+a,sa,ja):new sa(a,b,c)}function ta(a){return new sa(a>>16,a>>8&255,255&a)}function ua(a){return ta(a)+""}function va(a){return a<16?"0"+Math.max(0,a).toString(16):Math.min(255,a).toString(16)}function wa(a,b,c){var d,e,f,g=0,h=0,i=0;if(d=/([a-z]+)\((.*)\)/.exec(a=a.toLowerCase()))switch(e=d[2].split(","),d[1]){case"hsl":return c(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100);case"rgb":return b(Aa(e[0]),Aa(e[1]),Aa(e[2]))}return(f=Yg.get(a))?b(f.r,f.g,f.b):(null==a||"#"!==a.charAt(0)||isNaN(f=parseInt(a.slice(1),16))||(4===a.length?(g=(3840&f)>>4,g|=g>>4,h=240&f,h|=h>>4,i=15&f,i|=i<<4):7===a.length&&(g=(16711680&f)>>16,h=(65280&f)>>8,i=255&f)),b(g,h,i))}function xa(a,b,c){var d,e,f=Math.min(a/=255,b/=255,c/=255),g=Math.max(a,b,c),h=g-f,i=(g+f)/2;return h?(e=i<.5?h/(g+f):h/(2-g-f),d=a==g?(b-c)/h+(b<c?6:0):b==g?(c-a)/h+2:(a-b)/h+4,d*=60):(d=NaN,e=i>0&&i<1?0:d),new ia(d,e,i)}function ya(a,b,c){a=za(a),b=za(b),c=za(c);var d=qa((.4124564*a+.3575761*b+.1804375*c)/Tg),e=qa((.2126729*a+.7151522*b+.072175*c)/Ug),f=qa((.0193339*a+.119192*b+.9503041*c)/Vg);return ma(116*e-16,500*(d-e),200*(e-f))}function za(a){return(a/=255)<=.04045?a/12.92:Math.pow((a+.055)/1.055,2.4)}function Aa(a){var b=parseFloat(a);return"%"===a.charAt(a.length-1)?Math.round(2.55*b):b}function Ba(a){return"function"==typeof a?a:function(){return a}}function Ca(a){return function(b,c,d){return 2===arguments.length&&"function"==typeof c&&(d=c,c=null),Da(b,c,a,d)}}function Da(a,b,c,d){function e(){var a,b=i.status;if(!b&&Fa(i)||b>=200&&b<300||304===b){try{a=c.call(f,i)}catch(a){return void g.error.call(f,a)}g.load.call(f,a)}else g.error.call(f,i)}var f={},g=cg.dispatch("beforesend","progress","load","error"),h={},i=new XMLHttpRequest,j=null;return!this.XDomainRequest||"withCredentials"in i||!/^(http(s)?:)?\/\//.test(a)||(i=new XDomainRequest),"onload"in i?i.onload=i.onerror=e:i.onreadystatechange=function(){i.readyState>3&&e()},i.onprogress=function(a){var b=cg.event;cg.event=a;try{g.progress.call(f,i)}finally{cg.event=b}},f.header=function(a,b){return a=(a+"").toLowerCase(),arguments.length<2?h[a]:(null==b?delete h[a]:h[a]=b+"",f)},f.mimeType=function(a){return arguments.length?(b=null==a?null:a+"",f):b},f.responseType=function(a){return arguments.length?(j=a,f):j},f.response=function(a){return c=a,f},["get","post"].forEach(function(a){f[a]=function(){return f.send.apply(f,[a].concat(eg(arguments)))}}),f.send=function(c,d,e){if(2===arguments.length&&"function"==typeof d&&(e=d,d=null),i.open(c,a,!0),null==b||"accept"in h||(h.accept=b+",*/*"),i.setRequestHeader)for(var k in h)i.setRequestHeader(k,h[k]);return null!=b&&i.overrideMimeType&&i.overrideMimeType(b),null!=j&&(i.responseType=j),null!=e&&f.on("error",e).on("load",function(a){e(null,a)}),g.beforesend.call(f,i),i.send(null==d?null:d),f},f.abort=function(){return i.abort(),f},cg.rebind(f,g,"on"),null==d?f:f.get(Ea(d))}function Ea(a){return 1===a.length?function(b,c){a(null==b?c:null)}:a}function Fa(a){var b=a.responseType;return b&&"text"!==b?a.response:a.responseText}function Ga(){var a=Ha(),b=Ia()-a;b>24?(isFinite(b)&&(clearTimeout(ah),ah=setTimeout(Ga,b)),_g=0):(_g=1,ch(Ga))}function Ha(){var a=Date.now();for(bh=Zg;bh;)a>=bh.t&&(bh.f=bh.c(a-bh.t)),bh=bh.n;return a}function Ia(){for(var a,b=Zg,c=1/0;b;)b.f?b=a?a.n=b.n:Zg=b.n:(b.t<c&&(c=b.t),b=(a=b).n);return $g=a,c}function Ja(a,b){return b-(a?Math.ceil(Math.log(a)/Math.LN10):1)}function Ka(a,b){var c=Math.pow(10,3*mg(8-b));return{scale:b>8?function(a){return a/c}:function(a){return a*c},symbol:a}}function La(a){var b=a.decimal,c=a.thousands,d=a.grouping,e=a.currency,f=d&&c?function(a,b){for(var e=a.length,f=[],g=0,h=d[0],i=0;e>0&&h>0&&(i+h+1>b&&(h=Math.max(1,b-i)),f.push(a.substring(e-=h,e+h)),!((i+=h+1)>b));)h=d[g=(g+1)%d.length];return f.reverse().join(c)}:t;return function(a){var c=eh.exec(a),d=c[1]||" ",g=c[2]||">",h=c[3]||"-",i=c[4]||"",j=c[5],k=+c[6],l=c[7],m=c[8],n=c[9],o=1,p="",q="",r=!1,s=!0;switch(m&&(m=+m.substring(1)),(j||"0"===d&&"="===g)&&(j=d="0",g="="),n){case"n":l=!0,n="g";break;case"%":o=100,q="%",n="f";break;case"p":o=100,q="%",n="r";break;case"b":case"o":case"x":case"X":"#"===i&&(p="0"+n.toLowerCase());case"c":s=!1;case"d":r=!0,m=0;break;case"s":o=-1,n="r"}"$"===i&&(p=e[0],q=e[1]),"r"!=n||m||(n="g"),null!=m&&("g"==n?m=Math.max(1,Math.min(21,m)):"e"!=n&&"f"!=n||(m=Math.max(0,Math.min(20,m)))),n=fh.get(n)||Ma;var t=j&&l;return function(a){var c=q;if(r&&a%1)return"";var e=a<0||0===a&&1/a<0?(a=-a,"-"):"-"===h?"":h;if(o<0){var i=cg.formatPrefix(a,m);a=i.scale(a),c=i.symbol+q}else a*=o;a=n(a,m);var u,v,w=a.lastIndexOf(".");if(w<0){var x=s?a.lastIndexOf("e"):-1;x<0?(u=a,v=""):(u=a.substring(0,x),v=a.substring(x))}else u=a.substring(0,w),v=b+a.substring(w+1);!j&&l&&(u=f(u,1/0));var y=p.length+u.length+v.length+(t?0:e.length),z=y<k?new Array(y=k-y+1).join(d):"";return t&&(u=f(z+u,z.length?k-v.length:1/0)),e+=p,a=u+v,("<"===g?e+a+z:">"===g?z+e+a:"^"===g?z.substring(0,y>>=1)+e+a+z.substring(y):e+(t?a:z+a))+c}}}function Ma(a){return a+""}function Na(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Oa(a,b,c){function d(b){var c=a(b),d=f(c,1);return b-c<d-b?c:d}function e(c){return b(c=a(new hh(c-1)),1),c}function f(a,c){return b(a=new hh(+a),c),a}function g(a,d,f){var g=e(a),h=[];if(f>1)for(;g<d;)c(g)%f||h.push(new Date(+g)),b(g,1);else for(;g<d;)h.push(new Date(+g)),b(g,1);return h}function h(a,b,c){try{hh=Na;var d=new Na;return d._=a,g(d,b,c)}finally{hh=Date}}a.floor=a,a.round=d,a.ceil=e,a.offset=f,a.range=g;var i=a.utc=Pa(a);return i.floor=i,i.round=Pa(d),i.ceil=Pa(e),i.offset=Pa(f),i.range=h,a}function Pa(a){return function(b,c){try{hh=Na;var d=new Na;return d._=b,a(d,c)._}finally{hh=Date}}}function Qa(a){function b(a){function b(b){for(var c,e,f,g=[],h=-1,i=0;++h<d;)37===a.charCodeAt(h)&&(g.push(a.slice(i,h)),null!=(e=jh[c=a.charAt(++h)])&&(c=a.charAt(++h)),(f=C[c])&&(c=f(b,null==e?"e"===c?" ":"0":e)),g.push(c),i=h+1);return g.push(a.slice(i,h)),g.join("")}var d=a.length;return b.parse=function(b){var d={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},e=c(d,a,b,0);if(e!=b.length)return null;"p"in d&&(d.H=d.H%12+12*d.p);var f=null!=d.Z&&hh!==Na,g=new(f?Na:hh);return"j"in d?g.setFullYear(d.y,0,d.j):"w"in d&&("W"in d||"U"in d)?(g.setFullYear(d.y,0,1),g.setFullYear(d.y,0,"W"in d?(d.w+6)%7+7*d.W-(g.getDay()+5)%7:d.w+7*d.U-(g.getDay()+6)%7)):g.setFullYear(d.y,d.m,d.d),g.setHours(d.H+(d.Z/100|0),d.M+d.Z%100,d.S,d.L),f?g._:g},b.toString=function(){return a},b}function c(a,b,c,d){for(var e,f,g,h=0,i=b.length,j=c.length;h<i;){if(d>=j)return-1;if(e=b.charCodeAt(h++),37===e){if(g=b.charAt(h++),f=D[g in jh?b.charAt(h++):g],!f||(d=f(a,c,d))<0)return-1}else if(e!=c.charCodeAt(d++))return-1}return d}function d(a,b,c){w.lastIndex=0;var d=w.exec(b.slice(c));return d?(a.w=x.get(d[0].toLowerCase()),c+d[0].length):-1}function e(a,b,c){u.lastIndex=0;var d=u.exec(b.slice(c));return d?(a.w=v.get(d[0].toLowerCase()),c+d[0].length):-1}function f(a,b,c){A.lastIndex=0;var d=A.exec(b.slice(c));return d?(a.m=B.get(d[0].toLowerCase()),c+d[0].length):-1}function g(a,b,c){y.lastIndex=0;var d=y.exec(b.slice(c));return d?(a.m=z.get(d[0].toLowerCase()),c+d[0].length):-1}function h(a,b,d){return c(a,C.c.toString(),b,d)}function i(a,b,d){return c(a,C.x.toString(),b,d)}function j(a,b,d){return c(a,C.X.toString(),b,d)}function k(a,b,c){var d=t.get(b.slice(c,c+=2).toLowerCase());return null==d?-1:(a.p=d,c)}var l=a.dateTime,m=a.date,n=a.time,o=a.periods,p=a.days,q=a.shortDays,r=a.months,s=a.shortMonths;b.utc=function(a){function c(a){try{hh=Na;var b=new hh;return b._=a,d(b)}finally{hh=Date}}var d=b(a);return c.parse=function(a){try{hh=Na;var b=d.parse(a);return b&&b._}finally{hh=Date}},c.toString=d.toString,c},b.multi=b.utc.multi=ib;var t=cg.map(),u=Sa(p),v=Ta(p),w=Sa(q),x=Ta(q),y=Sa(r),z=Ta(r),A=Sa(s),B=Ta(s);o.forEach(function(a,b){t.set(a.toLowerCase(),b)});var C={a:function(a){return q[a.getDay()]},A:function(a){return p[a.getDay()]},b:function(a){return s[a.getMonth()]},B:function(a){return r[a.getMonth()]},c:b(l),d:function(a,b){return Ra(a.getDate(),b,2)},e:function(a,b){return Ra(a.getDate(),b,2)},H:function(a,b){return Ra(a.getHours(),b,2)},I:function(a,b){return Ra(a.getHours()%12||12,b,2)},j:function(a,b){return Ra(1+gh.dayOfYear(a),b,3)},L:function(a,b){return Ra(a.getMilliseconds(),b,3)},m:function(a,b){return Ra(a.getMonth()+1,b,2)},M:function(a,b){return Ra(a.getMinutes(),b,2)},p:function(a){return o[+(a.getHours()>=12)]},S:function(a,b){return Ra(a.getSeconds(),b,2)},U:function(a,b){return Ra(gh.sundayOfYear(a),b,2)},w:function(a){return a.getDay()},W:function(a,b){return Ra(gh.mondayOfYear(a),b,2)},x:b(m),X:b(n),y:function(a,b){return Ra(a.getFullYear()%100,b,2)},Y:function(a,b){return Ra(a.getFullYear()%1e4,b,4)},Z:gb,"%":function(){return"%"}},D={a:d,A:e,b:f,B:g,c:h,d:ab,e:ab,H:cb,I:cb,j:bb,L:fb,m:_a,M:db,p:k,S:eb,U:Va,w:Ua,W:Wa,x:i,X:j,y:Ya,Y:Xa,Z:Za,"%":hb};return b}function Ra(a,b,c){var d=a<0?"-":"",e=(d?-a:a)+"",f=e.length;return d+(f<c?new Array(c-f+1).join(b)+e:e)}function Sa(a){return new RegExp("^(?:"+a.map(cg.requote).join("|")+")","i")}function Ta(a){for(var b=new k,c=-1,d=a.length;++c<d;)b.set(a[c].toLowerCase(),c);return b}function Ua(a,b,c){kh.lastIndex=0;var d=kh.exec(b.slice(c,c+1));return d?(a.w=+d[0],c+d[0].length):-1}function Va(a,b,c){kh.lastIndex=0;var d=kh.exec(b.slice(c));return d?(a.U=+d[0],c+d[0].length):-1}function Wa(a,b,c){kh.lastIndex=0;var d=kh.exec(b.slice(c));return d?(a.W=+d[0],c+d[0].length):-1}function Xa(a,b,c){kh.lastIndex=0;var d=kh.exec(b.slice(c,c+4));return d?(a.y=+d[0],c+d[0].length):-1}function Ya(a,b,c){kh.lastIndex=0;var d=kh.exec(b.slice(c,c+2));return d?(a.y=$a(+d[0]),c+d[0].length):-1}function Za(a,b,c){return/^[+-]\d{4}$/.test(b=b.slice(c,c+5))?(a.Z=-b,c+5):-1}function $a(a){return a+(a>68?1900:2e3)}function _a(a,b,c){kh.lastIndex=0;var d=kh.exec(b.slice(c,c+2));return d?(a.m=d[0]-1,c+d[0].length):-1}function ab(a,b,c){kh.lastIndex=0;var d=kh.exec(b.slice(c,c+2));return d?(a.d=+d[0],c+d[0].length):-1}function bb(a,b,c){kh.lastIndex=0;var d=kh.exec(b.slice(c,c+3));return d?(a.j=+d[0],c+d[0].length):-1}function cb(a,b,c){kh.lastIndex=0;var d=kh.exec(b.slice(c,c+2));return d?(a.H=+d[0],c+d[0].length):-1}function db(a,b,c){kh.lastIndex=0;var d=kh.exec(b.slice(c,c+2));return d?(a.M=+d[0],c+d[0].length):-1}function eb(a,b,c){kh.lastIndex=0;var d=kh.exec(b.slice(c,c+2));return d?(a.S=+d[0],c+d[0].length):-1}function fb(a,b,c){kh.lastIndex=0;var d=kh.exec(b.slice(c,c+3));return d?(a.L=+d[0],c+d[0].length):-1}function gb(a){var b=a.getTimezoneOffset(),c=b>0?"-":"+",d=mg(b)/60|0,e=mg(b)%60;return c+Ra(d,"0",2)+Ra(e,"0",2)}function hb(a,b,c){lh.lastIndex=0;var d=lh.exec(b.slice(c,c+1));return d?c+d[0].length:-1}function ib(a){for(var b=a.length,c=-1;++c<b;)a[c][0]=this(a[c][0]);return function(b){for(var c=0,d=a[c];!d[1](b);)d=a[++c];return d[0](b)}}function jb(){}function kb(a,b,c){var d=c.s=a+b,e=d-a,f=d-e;c.t=a-f+(b-e)}function lb(a,b){a&&ph.hasOwnProperty(a.type)&&ph[a.type](a,b)}function mb(a,b,c){var d,e=-1,f=a.length-c;for(b.lineStart();++e<f;)d=a[e],b.point(d[0],d[1],d[2]);b.lineEnd()}function nb(a,b){var c=-1,d=a.length;for(b.polygonStart();++c<d;)mb(a[c],b,1);b.polygonEnd()}function ob(){function a(a,b){a*=Ig,b=b*Ig/2+Eg/4;var c=a-d,g=c>=0?1:-1,h=g*c,i=Math.cos(b),j=Math.sin(b),k=f*j,l=e*i+k*Math.cos(h),m=k*g*Math.sin(h);rh.add(Math.atan2(m,l)),d=a,e=i,f=j}var b,c,d,e,f;sh.point=function(g,h){sh.point=a,d=(b=g)*Ig,e=Math.cos(h=(c=h)*Ig/2+Eg/4),f=Math.sin(h)},sh.lineEnd=function(){a(b,c)}}function pb(a){var b=a[0],c=a[1],d=Math.cos(c);return[d*Math.cos(b),d*Math.sin(b),Math.sin(c)]}function qb(a,b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2]}function rb(a,b){return[a[1]*b[2]-a[2]*b[1],a[2]*b[0]-a[0]*b[2],a[0]*b[1]-a[1]*b[0]]}function sb(a,b){a[0]+=b[0],a[1]+=b[1],a[2]+=b[2]}function tb(a,b){return[a[0]*b,a[1]*b,a[2]*b]}function ub(a){var b=Math.sqrt(a[0]*a[0]+a[1]*a[1]+a[2]*a[2]);a[0]/=b,a[1]/=b,a[2]/=b}function vb(a){return[Math.atan2(a[1],a[0]),ca(a[2])]}function wb(a,b){return mg(a[0]-b[0])<Cg&&mg(a[1]-b[1])<Cg}function xb(a,b){a*=Ig;var c=Math.cos(b*=Ig);yb(c*Math.cos(a),c*Math.sin(a),Math.sin(b))}function yb(a,b,c){++th,vh+=(a-vh)/th,wh+=(b-wh)/th,xh+=(c-xh)/th}function zb(){function a(a,e){a*=Ig;var f=Math.cos(e*=Ig),g=f*Math.cos(a),h=f*Math.sin(a),i=Math.sin(e),j=Math.atan2(Math.sqrt((j=c*i-d*h)*j+(j=d*g-b*i)*j+(j=b*h-c*g)*j),b*g+c*h+d*i);uh+=j,yh+=j*(b+(b=g)),zh+=j*(c+(c=h)),Ah+=j*(d+(d=i)),yb(b,c,d)}var b,c,d;Eh.point=function(e,f){e*=Ig;var g=Math.cos(f*=Ig);b=g*Math.cos(e),c=g*Math.sin(e),d=Math.sin(f),Eh.point=a,yb(b,c,d)}}function Ab(){Eh.point=xb}function Bb(){function a(a,b){a*=Ig;var c=Math.cos(b*=Ig),g=c*Math.cos(a),h=c*Math.sin(a),i=Math.sin(b),j=e*i-f*h,k=f*g-d*i,l=d*h-e*g,m=Math.sqrt(j*j+k*k+l*l),n=d*g+e*h+f*i,o=m&&-ba(n)/m,p=Math.atan2(m,n);Bh+=o*j,Ch+=o*k,Dh+=o*l,uh+=p,yh+=p*(d+(d=g)),zh+=p*(e+(e=h)),Ah+=p*(f+(f=i)),yb(d,e,f)}var b,c,d,e,f;Eh.point=function(g,h){b=g,c=h,Eh.point=a,g*=Ig;var i=Math.cos(h*=Ig);d=i*Math.cos(g),e=i*Math.sin(g),f=Math.sin(h),yb(d,e,f)},Eh.lineEnd=function(){a(b,c),Eh.lineEnd=Ab,Eh.point=xb}}function Cb(a,b){function c(c,d){return c=a(c,d),b(c[0],c[1])}return a.invert&&b.invert&&(c.invert=function(c,d){return c=b.invert(c,d),c&&a.invert(c[0],c[1])}),c}function Db(){return!0}function Eb(a,b,c,d,e){var f=[],g=[];if(a.forEach(function(a){if(!((b=a.length-1)<=0)){var b,c=a[0],d=a[b];if(wb(c,d)){e.lineStart();for(var h=0;h<b;++h)e.point((c=a[h])[0],c[1]);return void e.lineEnd()}var i=new Gb(c,a,null,!0),j=new Gb(c,null,i,!1);i.o=j,f.push(i),g.push(j),i=new Gb(d,a,null,!1),j=new Gb(d,null,i,!0),i.o=j,f.push(i),g.push(j)}}),g.sort(b),Fb(f),Fb(g),f.length){for(var h=0,i=c,j=g.length;h<j;++h)g[h].e=i=!i;for(var k,l,m=f[0];;){for(var n=m,o=!0;n.v;)if((n=n.n)===m)return;k=n.z,e.lineStart();do{if(n.v=n.o.v=!0,n.e){if(o)for(var h=0,j=k.length;h<j;++h)e.point((l=k[h])[0],l[1]);else d(n.x,n.n.x,1,e);n=n.n}else{if(o){k=n.p.z;for(var h=k.length-1;h>=0;--h)e.point((l=k[h])[0],l[1])}else d(n.x,n.p.x,-1,e);n=n.p}n=n.o,k=n.z,o=!o}while(!n.v);e.lineEnd()}}}function Fb(a){if(b=a.length){for(var b,c,d=0,e=a[0];++d<b;)e.n=c=a[d],c.p=e,e=c;e.n=c=a[0],c.p=e}}function Gb(a,b,c,d){this.x=a,this.z=b,this.o=c,this.e=d,this.v=!1,this.n=this.p=null}function Hb(a,b,c,d){return function(e,f){function g(b,c){var d=e(b,c);a(b=d[0],c=d[1])&&f.point(b,c)}function h(a,b){var c=e(a,b);q.point(c[0],c[1])}function i(){s.point=h,q.lineStart()}function j(){s.point=g,q.lineEnd()}function k(a,b){p.push([a,b]);var c=e(a,b);u.point(c[0],c[1])}function l(){u.lineStart(),p=[]}function m(){k(p[0][0],p[0][1]),u.lineEnd();var a,b=u.clean(),c=t.buffer(),d=c.length;if(p.pop(),o.push(p),p=null,d)if(1&b){a=c[0];var e,d=a.length-1,g=-1;if(d>0){for(v||(f.polygonStart(),v=!0),f.lineStart();++g<d;)f.point((e=a[g])[0],e[1]);f.lineEnd()}}else d>1&&2&b&&c.push(c.pop().concat(c.shift())),n.push(c.filter(Ib))}var n,o,p,q=b(f),r=e.invert(d[0],d[1]),s={point:g,lineStart:i,lineEnd:j,polygonStart:function(){s.point=k,s.lineStart=l,s.lineEnd=m,n=[],o=[]},polygonEnd:function(){s.point=g,s.lineStart=i,s.lineEnd=j,n=cg.merge(n);var a=Ob(r,o);n.length?(v||(f.polygonStart(),v=!0),Eb(n,Kb,a,c,f)):a&&(v||(f.polygonStart(),v=!0),f.lineStart(),c(null,null,1,f),f.lineEnd()),v&&(f.polygonEnd(),v=!1),
|
6
|
-
n=o=null},sphere:function(){f.polygonStart(),f.lineStart(),c(null,null,1,f),f.lineEnd(),f.polygonEnd()}},t=Jb(),u=b(t),v=!1;return s}}function Ib(a){return a.length>1}function Jb(){var a,b=[];return{lineStart:function(){b.push(a=[])},point:function(b,c){a.push([b,c])},lineEnd:w,buffer:function(){var c=b;return b=[],a=null,c},rejoin:function(){b.length>1&&b.push(b.pop().concat(b.shift()))}}}function Kb(a,b){return((a=a.x)[0]<0?a[1]-Hg-Cg:Hg-a[1])-((b=b.x)[0]<0?b[1]-Hg-Cg:Hg-b[1])}function Lb(a){var b,c=NaN,d=NaN,e=NaN;return{lineStart:function(){a.lineStart(),b=1},point:function(f,g){var h=f>0?Eg:-Eg,i=mg(f-c);mg(i-Eg)<Cg?(a.point(c,d=(d+g)/2>0?Hg:-Hg),a.point(e,d),a.lineEnd(),a.lineStart(),a.point(h,d),a.point(f,d),b=0):e!==h&&i>=Eg&&(mg(c-e)<Cg&&(c-=e*Cg),mg(f-h)<Cg&&(f-=h*Cg),d=Mb(c,d,f,g),a.point(e,d),a.lineEnd(),a.lineStart(),a.point(h,d),b=0),a.point(c=f,d=g),e=h},lineEnd:function(){a.lineEnd(),c=d=NaN},clean:function(){return 2-b}}}function Mb(a,b,c,d){var e,f,g=Math.sin(a-c);return mg(g)>Cg?Math.atan((Math.sin(b)*(f=Math.cos(d))*Math.sin(c)-Math.sin(d)*(e=Math.cos(b))*Math.sin(a))/(e*f*g)):(b+d)/2}function Nb(a,b,c,d){var e;if(null==a)e=c*Hg,d.point(-Eg,e),d.point(0,e),d.point(Eg,e),d.point(Eg,0),d.point(Eg,-e),d.point(0,-e),d.point(-Eg,-e),d.point(-Eg,0),d.point(-Eg,e);else if(mg(a[0]-b[0])>Cg){var f=a[0]<b[0]?Eg:-Eg;e=c*f/2,d.point(-f,e),d.point(0,e),d.point(f,e)}else d.point(b[0],b[1])}function Ob(a,b){var c=a[0],d=a[1],e=[Math.sin(c),-Math.cos(c),0],f=0,g=0;rh.reset();for(var h=0,i=b.length;h<i;++h){var j=b[h],k=j.length;if(k)for(var l=j[0],m=l[0],n=l[1]/2+Eg/4,o=Math.sin(n),p=Math.cos(n),q=1;;){q===k&&(q=0),a=j[q];var r=a[0],s=a[1]/2+Eg/4,t=Math.sin(s),u=Math.cos(s),v=r-m,w=v>=0?1:-1,x=w*v,y=x>Eg,z=o*t;if(rh.add(Math.atan2(z*w*Math.sin(x),p*u+z*Math.cos(x))),f+=y?v+w*Fg:v,y^m>=c^r>=c){var A=rb(pb(l),pb(a));ub(A);var B=rb(e,A);ub(B);var C=(y^v>=0?-1:1)*ca(B[2]);(d>C||d===C&&(A[0]||A[1]))&&(g+=y^v>=0?1:-1)}if(!q++)break;m=r,o=t,p=u,l=a}}return(f<-Cg||f<Cg&&rh<0)^1&g}function Pb(a){function b(a,b){return Math.cos(a)*Math.cos(b)>f}function c(a){var c,f,i,j,k;return{lineStart:function(){j=i=!1,k=1},point:function(l,m){var n,o=[l,m],p=b(l,m),q=g?p?0:e(l,m):p?e(l+(l<0?Eg:-Eg),m):0;if(!c&&(j=i=p)&&a.lineStart(),p!==i&&(n=d(c,o),(wb(c,n)||wb(o,n))&&(o[0]+=Cg,o[1]+=Cg,p=b(o[0],o[1]))),p!==i)k=0,p?(a.lineStart(),n=d(o,c),a.point(n[0],n[1])):(n=d(c,o),a.point(n[0],n[1]),a.lineEnd()),c=n;else if(h&&c&&g^p){var r;q&f||!(r=d(o,c,!0))||(k=0,g?(a.lineStart(),a.point(r[0][0],r[0][1]),a.point(r[1][0],r[1][1]),a.lineEnd()):(a.point(r[1][0],r[1][1]),a.lineEnd(),a.lineStart(),a.point(r[0][0],r[0][1])))}!p||c&&wb(c,o)||a.point(o[0],o[1]),c=o,i=p,f=q},lineEnd:function(){i&&a.lineEnd(),c=null},clean:function(){return k|(j&&i)<<1}}}function d(a,b,c){var d=pb(a),e=pb(b),g=[1,0,0],h=rb(d,e),i=qb(h,h),j=h[0],k=i-j*j;if(!k)return!c&&a;var l=f*i/k,m=-f*j/k,n=rb(g,h),o=tb(g,l),p=tb(h,m);sb(o,p);var q=n,r=qb(o,q),s=qb(q,q),t=r*r-s*(qb(o,o)-1);if(!(t<0)){var u=Math.sqrt(t),v=tb(q,(-r-u)/s);if(sb(v,o),v=vb(v),!c)return v;var w,x=a[0],y=b[0],z=a[1],A=b[1];y<x&&(w=x,x=y,y=w);var B=y-x,C=mg(B-Eg)<Cg,D=C||B<Cg;if(!C&&A<z&&(w=z,z=A,A=w),D?C?z+A>0^v[1]<(mg(v[0]-x)<Cg?z:A):z<=v[1]&&v[1]<=A:B>Eg^(x<=v[0]&&v[0]<=y)){var E=tb(q,(-r+u)/s);return sb(E,o),[v,vb(E)]}}}function e(b,c){var d=g?a:Eg-a,e=0;return b<-d?e|=1:b>d&&(e|=2),c<-d?e|=4:c>d&&(e|=8),e}var f=Math.cos(a),g=f>0,h=mg(f)>Cg,i=oc(a,6*Ig);return Hb(b,c,i,g?[0,-a]:[-Eg,a-Eg])}function Qb(a,b,c,d){return function(e){var f,g=e.a,h=e.b,i=g.x,j=g.y,k=h.x,l=h.y,m=0,n=1,o=k-i,p=l-j;if(f=a-i,o||!(f>0)){if(f/=o,o<0){if(f<m)return;f<n&&(n=f)}else if(o>0){if(f>n)return;f>m&&(m=f)}if(f=c-i,o||!(f<0)){if(f/=o,o<0){if(f>n)return;f>m&&(m=f)}else if(o>0){if(f<m)return;f<n&&(n=f)}if(f=b-j,p||!(f>0)){if(f/=p,p<0){if(f<m)return;f<n&&(n=f)}else if(p>0){if(f>n)return;f>m&&(m=f)}if(f=d-j,p||!(f<0)){if(f/=p,p<0){if(f>n)return;f>m&&(m=f)}else if(p>0){if(f<m)return;f<n&&(n=f)}return m>0&&(e.a={x:i+m*o,y:j+m*p}),n<1&&(e.b={x:i+n*o,y:j+n*p}),e}}}}}}function Rb(a,b,c,d){function e(d,e){return mg(d[0]-a)<Cg?e>0?0:3:mg(d[0]-c)<Cg?e>0?2:1:mg(d[1]-b)<Cg?e>0?1:0:e>0?3:2}function f(a,b){return g(a.x,b.x)}function g(a,b){var c=e(a,1),d=e(b,1);return c!==d?c-d:0===c?b[1]-a[1]:1===c?a[0]-b[0]:2===c?a[1]-b[1]:b[0]-a[0]}return function(h){function i(a){for(var b=0,c=q.length,d=a[1],e=0;e<c;++e)for(var f,g=1,h=q[e],i=h.length,j=h[0];g<i;++g)f=h[g],j[1]<=d?f[1]>d&&aa(j,f,a)>0&&++b:f[1]<=d&&aa(j,f,a)<0&&--b,j=f;return 0!==b}function j(f,h,i,j){var k=0,l=0;if(null==f||(k=e(f,i))!==(l=e(h,i))||g(f,h)<0^i>0){do j.point(0===k||3===k?a:c,k>1?d:b);while((k=(k+i+4)%4)!==l)}else j.point(h[0],h[1])}function k(e,f){return a<=e&&e<=c&&b<=f&&f<=d}function l(a,b){k(a,b)&&h.point(a,b)}function m(){D.point=o,q&&q.push(r=[]),y=!0,x=!1,v=w=NaN}function n(){p&&(o(s,t),u&&x&&B.rejoin(),p.push(B.buffer())),D.point=l,x&&h.lineEnd()}function o(a,b){a=Math.max(-Gh,Math.min(Gh,a)),b=Math.max(-Gh,Math.min(Gh,b));var c=k(a,b);if(q&&r.push([a,b]),y)s=a,t=b,u=c,y=!1,c&&(h.lineStart(),h.point(a,b));else if(c&&x)h.point(a,b);else{var d={a:{x:v,y:w},b:{x:a,y:b}};C(d)?(x||(h.lineStart(),h.point(d.a.x,d.a.y)),h.point(d.b.x,d.b.y),c||h.lineEnd(),z=!1):c&&(h.lineStart(),h.point(a,b),z=!1)}v=a,w=b,x=c}var p,q,r,s,t,u,v,w,x,y,z,A=h,B=Jb(),C=Qb(a,b,c,d),D={point:l,lineStart:m,lineEnd:n,polygonStart:function(){h=B,p=[],q=[],z=!0},polygonEnd:function(){h=A,p=cg.merge(p);var b=i([a,d]),c=z&&b,e=p.length;(c||e)&&(h.polygonStart(),c&&(h.lineStart(),j(null,null,1,h),h.lineEnd()),e&&Eb(p,f,b,j,h),h.polygonEnd()),p=q=r=null}};return D}}function Sb(a){var b=0,c=Eg/3,d=gc(a),e=d(b,c);return e.parallels=function(a){return arguments.length?d(b=a[0]*Eg/180,c=a[1]*Eg/180):[b/Eg*180,c/Eg*180]},e}function Tb(a,b){function c(a,b){var c=Math.sqrt(f-2*e*Math.sin(b))/e;return[c*Math.sin(a*=e),g-c*Math.cos(a)]}var d=Math.sin(a),e=(d+Math.sin(b))/2,f=1+d*(2*e-d),g=Math.sqrt(f)/e;return c.invert=function(a,b){var c=g-b;return[Math.atan2(a,c)/e,ca((f-(a*a+c*c)*e*e)/(2*e))]},c}function Ub(){function a(a,b){Ih+=e*a-d*b,d=a,e=b}var b,c,d,e;Nh.point=function(f,g){Nh.point=a,b=d=f,c=e=g},Nh.lineEnd=function(){a(b,c)}}function Vb(a,b){a<Jh&&(Jh=a),a>Lh&&(Lh=a),b<Kh&&(Kh=b),b>Mh&&(Mh=b)}function Wb(){function a(a,b){g.push("M",a,",",b,f)}function b(a,b){g.push("M",a,",",b),h.point=c}function c(a,b){g.push("L",a,",",b)}function d(){h.point=a}function e(){g.push("Z")}var f=Xb(4.5),g=[],h={point:a,lineStart:function(){h.point=b},lineEnd:d,polygonStart:function(){h.lineEnd=e},polygonEnd:function(){h.lineEnd=d,h.point=a},pointRadius:function(a){return f=Xb(a),h},result:function(){if(g.length){var a=g.join("");return g=[],a}}};return h}function Xb(a){return"m0,"+a+"a"+a+","+a+" 0 1,1 0,"+-2*a+"a"+a+","+a+" 0 1,1 0,"+2*a+"z"}function Yb(a,b){vh+=a,wh+=b,++xh}function Zb(){function a(a,d){var e=a-b,f=d-c,g=Math.sqrt(e*e+f*f);yh+=g*(b+a)/2,zh+=g*(c+d)/2,Ah+=g,Yb(b=a,c=d)}var b,c;Ph.point=function(d,e){Ph.point=a,Yb(b=d,c=e)}}function $b(){Ph.point=Yb}function _b(){function a(a,b){var c=a-d,f=b-e,g=Math.sqrt(c*c+f*f);yh+=g*(d+a)/2,zh+=g*(e+b)/2,Ah+=g,g=e*a-d*b,Bh+=g*(d+a),Ch+=g*(e+b),Dh+=3*g,Yb(d=a,e=b)}var b,c,d,e;Ph.point=function(f,g){Ph.point=a,Yb(b=d=f,c=e=g)},Ph.lineEnd=function(){a(b,c)}}function ac(a){function b(b,c){a.moveTo(b+g,c),a.arc(b,c,g,0,Fg)}function c(b,c){a.moveTo(b,c),h.point=d}function d(b,c){a.lineTo(b,c)}function e(){h.point=b}function f(){a.closePath()}var g=4.5,h={point:b,lineStart:function(){h.point=c},lineEnd:e,polygonStart:function(){h.lineEnd=f},polygonEnd:function(){h.lineEnd=e,h.point=b},pointRadius:function(a){return g=a,h},result:w};return h}function bc(a){function b(a){return(h?d:c)(a)}function c(b){return ec(b,function(c,d){c=a(c,d),b.point(c[0],c[1])})}function d(b){function c(c,d){c=a(c,d),b.point(c[0],c[1])}function d(){t=NaN,y.point=f,b.lineStart()}function f(c,d){var f=pb([c,d]),g=a(c,d);e(t,u,s,v,w,x,t=g[0],u=g[1],s=c,v=f[0],w=f[1],x=f[2],h,b),b.point(t,u)}function g(){y.point=c,b.lineEnd()}function i(){d(),y.point=j,y.lineEnd=k}function j(a,b){f(l=a,m=b),n=t,o=u,p=v,q=w,r=x,y.point=f}function k(){e(t,u,s,v,w,x,n,o,l,p,q,r,h,b),y.lineEnd=g,g()}var l,m,n,o,p,q,r,s,t,u,v,w,x,y={point:c,lineStart:d,lineEnd:g,polygonStart:function(){b.polygonStart(),y.lineStart=i},polygonEnd:function(){b.polygonEnd(),y.lineStart=d}};return y}function e(b,c,d,h,i,j,k,l,m,n,o,p,q,r){var s=k-b,t=l-c,u=s*s+t*t;if(u>4*f&&q--){var v=h+n,w=i+o,x=j+p,y=Math.sqrt(v*v+w*w+x*x),z=Math.asin(x/=y),A=mg(mg(x)-1)<Cg||mg(d-m)<Cg?(d+m)/2:Math.atan2(w,v),B=a(A,z),C=B[0],D=B[1],E=C-b,F=D-c,G=t*E-s*F;(G*G/u>f||mg((s*E+t*F)/u-.5)>.3||h*n+i*o+j*p<g)&&(e(b,c,d,h,i,j,C,D,A,v/=y,w/=y,x,q,r),r.point(C,D),e(C,D,A,v,w,x,k,l,m,n,o,p,q,r))}}var f=.5,g=Math.cos(30*Ig),h=16;return b.precision=function(a){return arguments.length?(h=(f=a*a)>0&&16,b):Math.sqrt(f)},b}function cc(a){var b=bc(function(b,c){return a([b*Jg,c*Jg])});return function(a){return hc(b(a))}}function dc(a){this.stream=a}function ec(a,b){return{point:b,sphere:function(){a.sphere()},lineStart:function(){a.lineStart()},lineEnd:function(){a.lineEnd()},polygonStart:function(){a.polygonStart()},polygonEnd:function(){a.polygonEnd()}}}function fc(a){return gc(function(){return a})()}function gc(a){function b(a){return a=h(a[0]*Ig,a[1]*Ig),[a[0]*m+i,j-a[1]*m]}function c(a){return a=h.invert((a[0]-i)/m,(j-a[1])/m),a&&[a[0]*Jg,a[1]*Jg]}function d(){h=Cb(g=kc(r,s,u),f);var a=f(p,q);return i=n-a[0]*m,j=o+a[1]*m,e()}function e(){return k&&(k.valid=!1,k=null),b}var f,g,h,i,j,k,l=bc(function(a,b){return a=f(a,b),[a[0]*m+i,j-a[1]*m]}),m=150,n=480,o=250,p=0,q=0,r=0,s=0,u=0,v=Fh,w=t,x=null,y=null;return b.stream=function(a){return k&&(k.valid=!1),k=hc(v(g,l(w(a)))),k.valid=!0,k},b.clipAngle=function(a){return arguments.length?(v=null==a?(x=a,Fh):Pb((x=+a)*Ig),e()):x},b.clipExtent=function(a){return arguments.length?(y=a,w=a?Rb(a[0][0],a[0][1],a[1][0],a[1][1]):t,e()):y},b.scale=function(a){return arguments.length?(m=+a,d()):m},b.translate=function(a){return arguments.length?(n=+a[0],o=+a[1],d()):[n,o]},b.center=function(a){return arguments.length?(p=a[0]%360*Ig,q=a[1]%360*Ig,d()):[p*Jg,q*Jg]},b.rotate=function(a){return arguments.length?(r=a[0]%360*Ig,s=a[1]%360*Ig,u=a.length>2?a[2]%360*Ig:0,d()):[r*Jg,s*Jg,u*Jg]},cg.rebind(b,l,"precision"),function(){return f=a.apply(this,arguments),b.invert=f.invert&&c,d()}}function hc(a){return ec(a,function(b,c){a.point(b*Ig,c*Ig)})}function ic(a,b){return[a,b]}function jc(a,b){return[a>Eg?a-Fg:a<-Eg?a+Fg:a,b]}function kc(a,b,c){return a?b||c?Cb(mc(a),nc(b,c)):mc(a):b||c?nc(b,c):jc}function lc(a){return function(b,c){return b+=a,[b>Eg?b-Fg:b<-Eg?b+Fg:b,c]}}function mc(a){var b=lc(a);return b.invert=lc(-a),b}function nc(a,b){function c(a,b){var c=Math.cos(b),h=Math.cos(a)*c,i=Math.sin(a)*c,j=Math.sin(b),k=j*d+h*e;return[Math.atan2(i*f-k*g,h*d-j*e),ca(k*f+i*g)]}var d=Math.cos(a),e=Math.sin(a),f=Math.cos(b),g=Math.sin(b);return c.invert=function(a,b){var c=Math.cos(b),h=Math.cos(a)*c,i=Math.sin(a)*c,j=Math.sin(b),k=j*f-i*g;return[Math.atan2(i*f+j*g,h*d+k*e),ca(k*d-h*e)]},c}function oc(a,b){var c=Math.cos(a),d=Math.sin(a);return function(e,f,g,h){var i=g*b;null!=e?(e=pc(c,e),f=pc(c,f),(g>0?e<f:e>f)&&(e+=g*Fg)):(e=a+g*Fg,f=a-.5*i);for(var j,k=e;g>0?k>f:k<f;k-=i)h.point((j=vb([c,-d*Math.cos(k),-d*Math.sin(k)]))[0],j[1])}}function pc(a,b){var c=pb(b);c[0]-=a,ub(c);var d=ba(-c[1]);return((-c[2]<0?-d:d)+2*Math.PI-Cg)%(2*Math.PI)}function qc(a,b,c){var d=cg.range(a,b-Cg,c).concat(b);return function(a){return d.map(function(b){return[a,b]})}}function rc(a,b,c){var d=cg.range(a,b-Cg,c).concat(b);return function(a){return d.map(function(b){return[b,a]})}}function sc(a){return a.source}function tc(a){return a.target}function uc(a,b,c,d){var e=Math.cos(b),f=Math.sin(b),g=Math.cos(d),h=Math.sin(d),i=e*Math.cos(a),j=e*Math.sin(a),k=g*Math.cos(c),l=g*Math.sin(c),m=2*Math.asin(Math.sqrt(ga(d-b)+e*g*ga(c-a))),n=1/Math.sin(m),o=m?function(a){var b=Math.sin(a*=m)*n,c=Math.sin(m-a)*n,d=c*i+b*k,e=c*j+b*l,g=c*f+b*h;return[Math.atan2(e,d)*Jg,Math.atan2(g,Math.sqrt(d*d+e*e))*Jg]}:function(){return[a*Jg,b*Jg]};return o.distance=m,o}function vc(){function a(a,e){var f=Math.sin(e*=Ig),g=Math.cos(e),h=mg((a*=Ig)-b),i=Math.cos(h);Qh+=Math.atan2(Math.sqrt((h=g*Math.sin(h))*h+(h=d*f-c*g*i)*h),c*f+d*g*i),b=a,c=f,d=g}var b,c,d;Rh.point=function(e,f){b=e*Ig,c=Math.sin(f*=Ig),d=Math.cos(f),Rh.point=a},Rh.lineEnd=function(){Rh.point=Rh.lineEnd=w}}function wc(a,b){function c(b,c){var d=Math.cos(b),e=Math.cos(c),f=a(d*e);return[f*e*Math.sin(b),f*Math.sin(c)]}return c.invert=function(a,c){var d=Math.sqrt(a*a+c*c),e=b(d),f=Math.sin(e),g=Math.cos(e);return[Math.atan2(a*f,d*g),Math.asin(d&&c*f/d)]},c}function xc(a,b){function c(a,b){g>0?b<-Hg+Cg&&(b=-Hg+Cg):b>Hg-Cg&&(b=Hg-Cg);var c=g/Math.pow(e(b),f);return[c*Math.sin(f*a),g-c*Math.cos(f*a)]}var d=Math.cos(a),e=function(a){return Math.tan(Eg/4+a/2)},f=a===b?Math.sin(a):Math.log(d/Math.cos(b))/Math.log(e(b)/e(a)),g=d*Math.pow(e(a),f)/f;return f?(c.invert=function(a,b){var c=g-b,d=_(f)*Math.sqrt(a*a+c*c);return[Math.atan2(a,c)/f,2*Math.atan(Math.pow(g/d,1/f))-Hg]},c):zc}function yc(a,b){function c(a,b){var c=f-b;return[c*Math.sin(e*a),f-c*Math.cos(e*a)]}var d=Math.cos(a),e=a===b?Math.sin(a):(d-Math.cos(b))/(b-a),f=d/e+a;return mg(e)<Cg?ic:(c.invert=function(a,b){var c=f-b;return[Math.atan2(a,c)/e,f-_(e)*Math.sqrt(a*a+c*c)]},c)}function zc(a,b){return[a,Math.log(Math.tan(Eg/4+b/2))]}function Ac(a){var b,c=fc(a),d=c.scale,e=c.translate,f=c.clipExtent;return c.scale=function(){var a=d.apply(c,arguments);return a===c?b?c.clipExtent(null):c:a},c.translate=function(){var a=e.apply(c,arguments);return a===c?b?c.clipExtent(null):c:a},c.clipExtent=function(a){var g=f.apply(c,arguments);if(g===c){if(b=null==a){var h=Eg*d(),i=e();f([[i[0]-h,i[1]-h],[i[0]+h,i[1]+h]])}}else b&&(g=null);return g},c.clipExtent(null)}function Bc(a,b){return[Math.log(Math.tan(Eg/4+b/2)),-a]}function Cc(a){return a[0]}function Dc(a){return a[1]}function Ec(a){for(var b=a.length,c=[0,1],d=2,e=2;e<b;e++){for(;d>1&&aa(a[c[d-2]],a[c[d-1]],a[e])<=0;)--d;c[d++]=e}return c.slice(0,d)}function Fc(a,b){return a[0]-b[0]||a[1]-b[1]}function Gc(a,b,c){return(c[0]-b[0])*(a[1]-b[1])<(c[1]-b[1])*(a[0]-b[0])}function Hc(a,b,c,d){var e=a[0],f=c[0],g=b[0]-e,h=d[0]-f,i=a[1],j=c[1],k=b[1]-i,l=d[1]-j,m=(h*(i-j)-l*(e-f))/(l*g-h*k);return[e+m*g,i+m*k]}function Ic(a){var b=a[0],c=a[a.length-1];return!(b[0]-c[0]||b[1]-c[1])}function Jc(){cd(this),this.edge=this.site=this.circle=null}function Kc(a){var b=bi.pop()||new Jc;return b.site=a,b}function Lc(a){Vc(a),$h.remove(a),bi.push(a),cd(a)}function Mc(a){var b=a.circle,c=b.x,d=b.cy,e={x:c,y:d},f=a.P,g=a.N,h=[a];Lc(a);for(var i=f;i.circle&&mg(c-i.circle.x)<Cg&&mg(d-i.circle.cy)<Cg;)f=i.P,h.unshift(i),Lc(i),i=f;h.unshift(i),Vc(i);for(var j=g;j.circle&&mg(c-j.circle.x)<Cg&&mg(d-j.circle.cy)<Cg;)g=j.N,h.push(j),Lc(j),j=g;h.push(j),Vc(j);var k,l=h.length;for(k=1;k<l;++k)j=h[k],i=h[k-1],_c(j.edge,i.site,j.site,e);i=h[0],j=h[l-1],j.edge=Zc(i.site,j.site,null,e),Uc(i),Uc(j)}function Nc(a){for(var b,c,d,e,f=a.x,g=a.y,h=$h._;h;)if(d=Oc(h,g)-f,d>Cg)h=h.L;else{if(e=f-Pc(h,g),!(e>Cg)){d>-Cg?(b=h.P,c=h):e>-Cg?(b=h,c=h.N):b=c=h;break}if(!h.R){b=h;break}h=h.R}var i=Kc(a);if($h.insert(b,i),b||c){if(b===c)return Vc(b),c=Kc(b.site),$h.insert(i,c),i.edge=c.edge=Zc(b.site,i.site),Uc(b),void Uc(c);if(!c)return void(i.edge=Zc(b.site,i.site));Vc(b),Vc(c);var j=b.site,k=j.x,l=j.y,m=a.x-k,n=a.y-l,o=c.site,p=o.x-k,q=o.y-l,r=2*(m*q-n*p),s=m*m+n*n,t=p*p+q*q,u={x:(q*s-n*t)/r+k,y:(m*t-p*s)/r+l};_c(c.edge,j,o,u),i.edge=Zc(j,a,null,u),c.edge=Zc(a,o,null,u),Uc(b),Uc(c)}}function Oc(a,b){var c=a.site,d=c.x,e=c.y,f=e-b;if(!f)return d;var g=a.P;if(!g)return-(1/0);c=g.site;var h=c.x,i=c.y,j=i-b;if(!j)return h;var k=h-d,l=1/f-1/j,m=k/j;return l?(-m+Math.sqrt(m*m-2*l*(k*k/(-2*j)-i+j/2+e-f/2)))/l+d:(d+h)/2}function Pc(a,b){var c=a.N;if(c)return Oc(c,b);var d=a.site;return d.y===b?d.x:1/0}function Qc(a){this.site=a,this.edges=[]}function Rc(a){for(var b,c,d,e,f,g,h,i,j,k,l=a[0][0],m=a[1][0],n=a[0][1],o=a[1][1],p=Zh,q=p.length;q--;)if(f=p[q],f&&f.prepare())for(h=f.edges,i=h.length,g=0;g<i;)k=h[g].end(),d=k.x,e=k.y,j=h[++g%i].start(),b=j.x,c=j.y,(mg(d-b)>Cg||mg(e-c)>Cg)&&(h.splice(g,0,new ad($c(f.site,k,mg(d-l)<Cg&&o-e>Cg?{x:l,y:mg(b-l)<Cg?c:o}:mg(e-o)<Cg&&m-d>Cg?{x:mg(c-o)<Cg?b:m,y:o}:mg(d-m)<Cg&&e-n>Cg?{x:m,y:mg(b-m)<Cg?c:n}:mg(e-n)<Cg&&d-l>Cg?{x:mg(c-n)<Cg?b:l,y:n}:null),f.site,null)),++i)}function Sc(a,b){return b.angle-a.angle}function Tc(){cd(this),this.x=this.y=this.arc=this.site=this.cy=null}function Uc(a){var b=a.P,c=a.N;if(b&&c){var d=b.site,e=a.site,f=c.site;if(d!==f){var g=e.x,h=e.y,i=d.x-g,j=d.y-h,k=f.x-g,l=f.y-h,m=2*(i*l-j*k);if(!(m>=-Dg)){var n=i*i+j*j,o=k*k+l*l,p=(l*n-j*o)/m,q=(i*o-k*n)/m,l=q+h,r=ci.pop()||new Tc;r.arc=a,r.site=e,r.x=p+g,r.y=l+Math.sqrt(p*p+q*q),r.cy=l,a.circle=r;for(var s=null,t=ai._;t;)if(r.y<t.y||r.y===t.y&&r.x<=t.x){if(!t.L){s=t.P;break}t=t.L}else{if(!t.R){s=t;break}t=t.R}ai.insert(s,r),s||(_h=r)}}}}function Vc(a){var b=a.circle;b&&(b.P||(_h=b.N),ai.remove(b),ci.push(b),cd(b),a.circle=null)}function Wc(a){for(var b,c=Yh,d=Qb(a[0][0],a[0][1],a[1][0],a[1][1]),e=c.length;e--;)b=c[e],(!Xc(b,a)||!d(b)||mg(b.a.x-b.b.x)<Cg&&mg(b.a.y-b.b.y)<Cg)&&(b.a=b.b=null,c.splice(e,1))}function Xc(a,b){var c=a.b;if(c)return!0;var d,e,f=a.a,g=b[0][0],h=b[1][0],i=b[0][1],j=b[1][1],k=a.l,l=a.r,m=k.x,n=k.y,o=l.x,p=l.y,q=(m+o)/2,r=(n+p)/2;if(p===n){if(q<g||q>=h)return;if(m>o){if(f){if(f.y>=j)return}else f={x:q,y:i};c={x:q,y:j}}else{if(f){if(f.y<i)return}else f={x:q,y:j};c={x:q,y:i}}}else if(d=(m-o)/(p-n),e=r-d*q,d<-1||d>1)if(m>o){if(f){if(f.y>=j)return}else f={x:(i-e)/d,y:i};c={x:(j-e)/d,y:j}}else{if(f){if(f.y<i)return}else f={x:(j-e)/d,y:j};c={x:(i-e)/d,y:i}}else if(n<p){if(f){if(f.x>=h)return}else f={x:g,y:d*g+e};c={x:h,y:d*h+e}}else{if(f){if(f.x<g)return}else f={x:h,y:d*h+e};c={x:g,y:d*g+e}}return a.a=f,a.b=c,!0}function Yc(a,b){this.l=a,this.r=b,this.a=this.b=null}function Zc(a,b,c,d){var e=new Yc(a,b);return Yh.push(e),c&&_c(e,a,b,c),d&&_c(e,b,a,d),Zh[a.i].edges.push(new ad(e,a,b)),Zh[b.i].edges.push(new ad(e,b,a)),e}function $c(a,b,c){var d=new Yc(a,null);return d.a=b,d.b=c,Yh.push(d),d}function _c(a,b,c,d){a.a||a.b?a.l===c?a.b=d:a.a=d:(a.a=d,a.l=b,a.r=c)}function ad(a,b,c){var d=a.a,e=a.b;this.edge=a,this.site=b,this.angle=c?Math.atan2(c.y-b.y,c.x-b.x):a.l===b?Math.atan2(e.x-d.x,d.y-e.y):Math.atan2(d.x-e.x,e.y-d.y)}function bd(){this._=null}function cd(a){a.U=a.C=a.L=a.R=a.P=a.N=null}function dd(a,b){var c=b,d=b.R,e=c.U;e?e.L===c?e.L=d:e.R=d:a._=d,d.U=e,c.U=d,c.R=d.L,c.R&&(c.R.U=c),d.L=c}function ed(a,b){var c=b,d=b.L,e=c.U;e?e.L===c?e.L=d:e.R=d:a._=d,d.U=e,c.U=d,c.L=d.R,c.L&&(c.L.U=c),d.R=c}function fd(a){for(;a.L;)a=a.L;return a}function gd(a,b){var c,d,e,f=a.sort(hd).pop();for(Yh=[],Zh=new Array(a.length),$h=new bd,ai=new bd;;)if(e=_h,f&&(!e||f.y<e.y||f.y===e.y&&f.x<e.x))f.x===c&&f.y===d||(Zh[f.i]=new Qc(f),Nc(f),c=f.x,d=f.y),f=a.pop();else{if(!e)break;Mc(e.arc)}b&&(Wc(b),Rc(b));var g={cells:Zh,edges:Yh};return $h=ai=Yh=Zh=null,g}function hd(a,b){return b.y-a.y||b.x-a.x}function id(a,b,c){return(a.x-c.x)*(b.y-a.y)-(a.x-b.x)*(c.y-a.y)}function jd(a){return a.x}function kd(a){return a.y}function ld(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function md(a,b,c,d,e,f){if(!a(b,c,d,e,f)){var g=.5*(c+e),h=.5*(d+f),i=b.nodes;i[0]&&md(a,i[0],c,d,g,h),i[1]&&md(a,i[1],g,d,e,h),i[2]&&md(a,i[2],c,h,g,f),i[3]&&md(a,i[3],g,h,e,f)}}function nd(a,b,c,d,e,f,g){var h,i=1/0;return function a(j,k,l,m,n){if(!(k>f||l>g||m<d||n<e)){if(o=j.point){var o,p=b-j.x,q=c-j.y,r=p*p+q*q;if(r<i){var s=Math.sqrt(i=r);d=b-s,e=c-s,f=b+s,g=c+s,h=o}}for(var t=j.nodes,u=.5*(k+m),v=.5*(l+n),w=b>=u,x=c>=v,y=x<<1|w,z=y+4;y<z;++y)if(j=t[3&y])switch(3&y){case 0:a(j,k,l,u,v);break;case 1:a(j,u,l,m,v);break;case 2:a(j,k,v,u,n);break;case 3:a(j,u,v,m,n)}}}(a,d,e,f,g),h}function od(a,b){a=cg.rgb(a),b=cg.rgb(b);var c=a.r,d=a.g,e=a.b,f=b.r-c,g=b.g-d,h=b.b-e;return function(a){return"#"+va(Math.round(c+f*a))+va(Math.round(d+g*a))+va(Math.round(e+h*a))}}function pd(a,b){var c,d={},e={};for(c in a)c in b?d[c]=sd(a[c],b[c]):e[c]=a[c];for(c in b)c in a||(e[c]=b[c]);return function(a){for(c in d)e[c]=d[c](a);return e}}function qd(a,b){return a=+a,b=+b,function(c){return a*(1-c)+b*c}}function rd(a,b){var c,d,e,f=ei.lastIndex=fi.lastIndex=0,g=-1,h=[],i=[];for(a+="",b+="";(c=ei.exec(a))&&(d=fi.exec(b));)(e=d.index)>f&&(e=b.slice(f,e),h[g]?h[g]+=e:h[++g]=e),(c=c[0])===(d=d[0])?h[g]?h[g]+=d:h[++g]=d:(h[++g]=null,i.push({i:g,x:qd(c,d)})),f=fi.lastIndex;return f<b.length&&(e=b.slice(f),h[g]?h[g]+=e:h[++g]=e),h.length<2?i[0]?(b=i[0].x,function(a){return b(a)+""}):function(){return b}:(b=i.length,function(a){for(var c,d=0;d<b;++d)h[(c=i[d]).i]=c.x(a);return h.join("")})}function sd(a,b){for(var c,d=cg.interpolators.length;--d>=0&&!(c=cg.interpolators[d](a,b)););return c}function td(a,b){var c,d=[],e=[],f=a.length,g=b.length,h=Math.min(a.length,b.length);for(c=0;c<h;++c)d.push(sd(a[c],b[c]));for(;c<f;++c)e[c]=a[c];for(;c<g;++c)e[c]=b[c];return function(a){for(c=0;c<h;++c)e[c]=d[c](a);return e}}function ud(a){return function(b){return b<=0?0:b>=1?1:a(b)}}function vd(a){return function(b){return 1-a(1-b)}}function wd(a){return function(b){return.5*(b<.5?a(2*b):2-a(2-2*b))}}function xd(a){return a*a}function yd(a){return a*a*a}function zd(a){if(a<=0)return 0;if(a>=1)return 1;var b=a*a,c=b*a;return 4*(a<.5?c:3*(a-b)+c-.75)}function Ad(a){return function(b){return Math.pow(b,a)}}function Bd(a){return 1-Math.cos(a*Hg)}function Cd(a){return Math.pow(2,10*(a-1))}function Dd(a){return 1-Math.sqrt(1-a*a)}function Ed(a,b){var c;return arguments.length<2&&(b=.45),arguments.length?c=b/Fg*Math.asin(1/a):(a=1,c=b/4),function(d){return 1+a*Math.pow(2,-10*d)*Math.sin((d-c)*Fg/b)}}function Fd(a){return a||(a=1.70158),function(b){return b*b*((a+1)*b-a)}}function Gd(a){return a<1/2.75?7.5625*a*a:a<2/2.75?7.5625*(a-=1.5/2.75)*a+.75:a<2.5/2.75?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375}function Hd(a,b){a=cg.hcl(a),b=cg.hcl(b);var c=a.h,d=a.c,e=a.l,f=b.h-c,g=b.c-d,h=b.l-e;return isNaN(g)&&(g=0,d=isNaN(d)?b.c:d),isNaN(f)?(f=0,c=isNaN(c)?b.h:c):f>180?f-=360:f<-180&&(f+=360),function(a){return la(c+f*a,d+g*a,e+h*a)+""}}function Id(a,b){a=cg.hsl(a),b=cg.hsl(b);var c=a.h,d=a.s,e=a.l,f=b.h-c,g=b.s-d,h=b.l-e;return isNaN(g)&&(g=0,d=isNaN(d)?b.s:d),isNaN(f)?(f=0,c=isNaN(c)?b.h:c):f>180?f-=360:f<-180&&(f+=360),function(a){return ja(c+f*a,d+g*a,e+h*a)+""}}function Jd(a,b){a=cg.lab(a),b=cg.lab(b);var c=a.l,d=a.a,e=a.b,f=b.l-c,g=b.a-d,h=b.b-e;return function(a){return na(c+f*a,d+g*a,e+h*a)+""}}function Kd(a,b){return b-=a,function(c){return Math.round(a+b*c)}}function Ld(a){var b=[a.a,a.b],c=[a.c,a.d],d=Nd(b),e=Md(b,c),f=Nd(Od(c,b,-e))||0;b[0]*c[1]<c[0]*b[1]&&(b[0]*=-1,b[1]*=-1,d*=-1,e*=-1),this.rotate=(d?Math.atan2(b[1],b[0]):Math.atan2(-c[0],c[1]))*Jg,this.translate=[a.e,a.f],this.scale=[d,f],this.skew=f?Math.atan2(e,f)*Jg:0}function Md(a,b){return a[0]*b[0]+a[1]*b[1]}function Nd(a){var b=Math.sqrt(Md(a,a));return b&&(a[0]/=b,a[1]/=b),b}function Od(a,b,c){return a[0]+=c*b[0],a[1]+=c*b[1],a}function Pd(a,b){var c,d=[],e=[],f=cg.transform(a),g=cg.transform(b),h=f.translate,i=g.translate,j=f.rotate,k=g.rotate,l=f.skew,m=g.skew,n=f.scale,o=g.scale;return h[0]!=i[0]||h[1]!=i[1]?(d.push("translate(",null,",",null,")"),e.push({i:1,x:qd(h[0],i[0])},{i:3,x:qd(h[1],i[1])})):i[0]||i[1]?d.push("translate("+i+")"):d.push(""),j!=k?(j-k>180?k+=360:k-j>180&&(j+=360),e.push({i:d.push(d.pop()+"rotate(",null,")")-2,x:qd(j,k)})):k&&d.push(d.pop()+"rotate("+k+")"),l!=m?e.push({i:d.push(d.pop()+"skewX(",null,")")-2,x:qd(l,m)}):m&&d.push(d.pop()+"skewX("+m+")"),n[0]!=o[0]||n[1]!=o[1]?(c=d.push(d.pop()+"scale(",null,",",null,")"),e.push({i:c-4,x:qd(n[0],o[0])},{i:c-2,x:qd(n[1],o[1])})):1==o[0]&&1==o[1]||d.push(d.pop()+"scale("+o+")"),c=e.length,function(a){for(var b,f=-1;++f<c;)d[(b=e[f]).i]=b.x(a);return d.join("")}}function Qd(a,b){return b=(b-=a=+a)||1/b,function(c){return(c-a)/b}}function Rd(a,b){return b=(b-=a=+a)||1/b,function(c){return Math.max(0,Math.min(1,(c-a)/b))}}function Sd(a){for(var b=a.source,c=a.target,d=Ud(b,c),e=[b];b!==d;)b=b.parent,e.push(b);for(var f=e.length;c!==d;)e.splice(f,0,c),c=c.parent;return e}function Td(a){for(var b=[],c=a.parent;null!=c;)b.push(a),a=c,c=c.parent;return b.push(a),b}function Ud(a,b){if(a===b)return a;for(var c=Td(a),d=Td(b),e=c.pop(),f=d.pop(),g=null;e===f;)g=e,e=c.pop(),f=d.pop();return g}function Vd(a){a.fixed|=2}function Wd(a){a.fixed&=-7}function Xd(a){a.fixed|=4,a.px=a.x,a.py=a.y}function Yd(a){a.fixed&=-5}function Zd(a,b,c){var d=0,e=0;if(a.charge=0,!a.leaf)for(var f,g=a.nodes,h=g.length,i=-1;++i<h;)f=g[i],null!=f&&(Zd(f,b,c),a.charge+=f.charge,d+=f.charge*f.cx,e+=f.charge*f.cy);if(a.point){a.leaf||(a.point.x+=Math.random()-.5,a.point.y+=Math.random()-.5);var j=b*c[a.point.index];a.charge+=a.pointCharge=j,d+=j*a.point.x,e+=j*a.point.y}a.cx=d/a.charge,a.cy=e/a.charge}function $d(a,b){return cg.rebind(a,b,"sort","children","value"),a.nodes=a,a.links=ee,a}function _d(a,b){for(var c=[a];null!=(a=c.pop());)if(b(a),(e=a.children)&&(d=e.length))for(var d,e;--d>=0;)c.push(e[d])}function ae(a,b){for(var c=[a],d=[];null!=(a=c.pop());)if(d.push(a),(f=a.children)&&(e=f.length))for(var e,f,g=-1;++g<e;)c.push(f[g]);for(;null!=(a=d.pop());)b(a)}function be(a){return a.children}function ce(a){return a.value}function de(a,b){return b.value-a.value}function ee(a){return cg.merge(a.map(function(a){return(a.children||[]).map(function(b){return{source:a,target:b}})}))}function fe(a){return a.x}function ge(a){return a.y}function he(a,b,c){a.y0=b,a.y=c}function ie(a){return cg.range(a.length)}function je(a){for(var b=-1,c=a[0].length,d=[];++b<c;)d[b]=0;return d}function ke(a){for(var b,c=1,d=0,e=a[0][1],f=a.length;c<f;++c)(b=a[c][1])>e&&(d=c,e=b);return d}function le(a){return a.reduce(me,0)}function me(a,b){return a+b[1]}function ne(a,b){return oe(a,Math.ceil(Math.log(b.length)/Math.LN2+1))}function oe(a,b){for(var c=-1,d=+a[0],e=(a[1]-d)/b,f=[];++c<=b;)f[c]=e*c+d;return f}function pe(a){return[cg.min(a),cg.max(a)]}function qe(a,b){return a.value-b.value}function re(a,b){var c=a._pack_next;a._pack_next=b,b._pack_prev=a,b._pack_next=c,c._pack_prev=b}function se(a,b){a._pack_next=b,b._pack_prev=a}function te(a,b){var c=b.x-a.x,d=b.y-a.y,e=a.r+b.r;return.999*e*e>c*c+d*d}function ue(a){function b(a){k=Math.min(a.x-a.r,k),l=Math.max(a.x+a.r,l),m=Math.min(a.y-a.r,m),n=Math.max(a.y+a.r,n)}if((c=a.children)&&(j=c.length)){var c,d,e,f,g,h,i,j,k=1/0,l=-(1/0),m=1/0,n=-(1/0);if(c.forEach(ve),d=c[0],d.x=-d.r,d.y=0,b(d),j>1&&(e=c[1],e.x=e.r,e.y=0,b(e),j>2))for(f=c[2],ye(d,e,f),b(f),re(d,f),d._pack_prev=f,re(f,e),e=d._pack_next,g=3;g<j;g++){ye(d,e,f=c[g]);var o=0,p=1,q=1;for(h=e._pack_next;h!==e;h=h._pack_next,p++)if(te(h,f)){o=1;break}if(1==o)for(i=d._pack_prev;i!==h._pack_prev&&!te(i,f);i=i._pack_prev,q++);o?(p<q||p==q&&e.r<d.r?se(d,e=h):se(d=i,e),g--):(re(d,f),e=f,b(f))}var r=(k+l)/2,s=(m+n)/2,t=0;for(g=0;g<j;g++)f=c[g],f.x-=r,f.y-=s,t=Math.max(t,f.r+Math.sqrt(f.x*f.x+f.y*f.y));a.r=t,c.forEach(we)}}function ve(a){a._pack_next=a._pack_prev=a}function we(a){delete a._pack_next,delete a._pack_prev}function xe(a,b,c,d){var e=a.children;if(a.x=b+=d*a.x,a.y=c+=d*a.y,a.r*=d,e)for(var f=-1,g=e.length;++f<g;)xe(e[f],b,c,d)}function ye(a,b,c){var d=a.r+c.r,e=b.x-a.x,f=b.y-a.y;if(d&&(e||f)){var g=b.r+c.r,h=e*e+f*f;g*=g,d*=d;var i=.5+(d-g)/(2*h),j=Math.sqrt(Math.max(0,2*g*(d+h)-(d-=h)*d-g*g))/(2*h);c.x=a.x+i*e+j*f,c.y=a.y+i*f-j*e}else c.x=a.x+d,c.y=a.y}function ze(a,b){return a.parent==b.parent?1:2}function Ae(a){var b=a.children;return b.length?b[0]:a.t}function Be(a){var b,c=a.children;return(b=c.length)?c[b-1]:a.t}function Ce(a,b,c){var d=c/(b.i-a.i);b.c-=d,b.s+=c,a.c+=d,b.z+=c,b.m+=c}function De(a){for(var b,c=0,d=0,e=a.children,f=e.length;--f>=0;)b=e[f],b.z+=c,b.m+=c,c+=b.s+(d+=b.c)}function Ee(a,b,c){return a.a.parent===b.parent?a.a:c}function Fe(a){return 1+cg.max(a,function(a){return a.y})}function Ge(a){return a.reduce(function(a,b){return a+b.x},0)/a.length}function He(a){var b=a.children;return b&&b.length?He(b[0]):a}function Ie(a){var b,c=a.children;return c&&(b=c.length)?Ie(c[b-1]):a}function Je(a){return{x:a.x,y:a.y,dx:a.dx,dy:a.dy}}function Ke(a,b){var c=a.x+b[3],d=a.y+b[0],e=a.dx-b[1]-b[3],f=a.dy-b[0]-b[2];return e<0&&(c+=e/2,e=0),f<0&&(d+=f/2,f=0),{x:c,y:d,dx:e,dy:f}}function Le(a){var b=a[0],c=a[a.length-1];return b<c?[b,c]:[c,b]}function Me(a){return a.rangeExtent?a.rangeExtent():Le(a.range())}function Ne(a,b,c,d){var e=c(a[0],a[1]),f=d(b[0],b[1]);return function(a){return f(e(a))}}function Oe(a,b){var c,d=0,e=a.length-1,f=a[d],g=a[e];return g<f&&(c=d,d=e,e=c,c=f,f=g,g=c),a[d]=b.floor(f),a[e]=b.ceil(g),a}function Pe(a){return a?{floor:function(b){return Math.floor(b/a)*a},ceil:function(b){return Math.ceil(b/a)*a}}:qi}function Qe(a,b,c,d){var e=[],f=[],g=0,h=Math.min(a.length,b.length)-1;for(a[h]<a[0]&&(a=a.slice().reverse(),b=b.slice().reverse());++g<=h;)e.push(c(a[g-1],a[g])),f.push(d(b[g-1],b[g]));return function(b){var c=cg.bisect(a,b,1,h)-1;return f[c](e[c](b))}}function Re(a,b,c,d){function e(){var e=Math.min(a.length,b.length)>2?Qe:Ne,i=d?Rd:Qd;return g=e(a,b,i,c),h=e(b,a,i,sd),f}function f(a){return g(a)}var g,h;return f.invert=function(a){return h(a)},f.domain=function(b){return arguments.length?(a=b.map(Number),e()):a},f.range=function(a){return arguments.length?(b=a,e()):b},f.rangeRound=function(a){return f.range(a).interpolate(Kd)},f.clamp=function(a){return arguments.length?(d=a,e()):d},f.interpolate=function(a){return arguments.length?(c=a,e()):c},f.ticks=function(b){return Ve(a,b)},f.tickFormat=function(b,c){return We(a,b,c)},f.nice=function(b){return Te(a,b),e()},f.copy=function(){return Re(a,b,c,d)},e()}function Se(a,b){return cg.rebind(a,b,"range","rangeRound","interpolate","clamp")}function Te(a,b){return Oe(a,Pe(Ue(a,b)[2]))}function Ue(a,b){null==b&&(b=10);var c=Le(a),d=c[1]-c[0],e=Math.pow(10,Math.floor(Math.log(d/b)/Math.LN10)),f=b/d*e;return f<=.15?e*=10:f<=.35?e*=5:f<=.75&&(e*=2),c[0]=Math.ceil(c[0]/e)*e,c[1]=Math.floor(c[1]/e)*e+.5*e,c[2]=e,c}function Ve(a,b){return cg.range.apply(cg,Ue(a,b))}function We(a,b,c){var d=Ue(a,b);if(c){var e=eh.exec(c);if(e.shift(),"s"===e[8]){var f=cg.formatPrefix(Math.max(mg(d[0]),mg(d[1])));return e[7]||(e[7]="."+Xe(f.scale(d[2]))),e[8]="f",c=cg.format(e.join("")),function(a){return c(f.scale(a))+f.symbol}}e[7]||(e[7]="."+Ye(e[8],d)),c=e.join("")}else c=",."+Xe(d[2])+"f";return cg.format(c)}function Xe(a){return-Math.floor(Math.log(a)/Math.LN10+.01)}function Ye(a,b){var c=Xe(b[2]);return a in ri?Math.abs(c-Xe(Math.max(mg(b[0]),mg(b[1]))))+ +("e"!==a):c-2*("%"===a)}function Ze(a,b,c,d){function e(a){return(c?Math.log(a<0?0:a):-Math.log(a>0?0:-a))/Math.log(b)}function f(a){return c?Math.pow(b,a):-Math.pow(b,-a)}function g(b){return a(e(b))}return g.invert=function(b){return f(a.invert(b))},g.domain=function(b){return arguments.length?(c=b[0]>=0,a.domain((d=b.map(Number)).map(e)),g):d},g.base=function(c){return arguments.length?(b=+c,a.domain(d.map(e)),g):b},g.nice=function(){var b=Oe(d.map(e),c?Math:ti);return a.domain(b),d=b.map(f),g},g.ticks=function(){var a=Le(d),g=[],h=a[0],i=a[1],j=Math.floor(e(h)),k=Math.ceil(e(i)),l=b%1?2:b;if(isFinite(k-j)){if(c){for(;j<k;j++)for(var m=1;m<l;m++)g.push(f(j)*m);g.push(f(j))}else for(g.push(f(j));j++<k;)for(var m=l-1;m>0;m--)g.push(f(j)*m);for(j=0;g[j]<h;j++);for(k=g.length;g[k-1]>i;k--);g=g.slice(j,k)}return g},g.tickFormat=function(a,b){if(!arguments.length)return si;arguments.length<2?b=si:"function"!=typeof b&&(b=cg.format(b));var d,h=Math.max(.1,a/g.ticks().length),i=c?(d=1e-12,Math.ceil):(d=-1e-12,Math.floor);return function(a){return a/f(i(e(a)+d))<=h?b(a):""}},g.copy=function(){return Ze(a.copy(),b,c,d)},Se(g,a)}function $e(a,b,c){function d(b){return a(e(b))}var e=_e(b),f=_e(1/b);return d.invert=function(b){return f(a.invert(b))},d.domain=function(b){return arguments.length?(a.domain((c=b.map(Number)).map(e)),
|
7
|
-
d):c},d.ticks=function(a){return Ve(c,a)},d.tickFormat=function(a,b){return We(c,a,b)},d.nice=function(a){return d.domain(Te(c,a))},d.exponent=function(g){return arguments.length?(e=_e(b=g),f=_e(1/b),a.domain(c.map(e)),d):b},d.copy=function(){return $e(a.copy(),b,c)},Se(d,a)}function _e(a){return function(b){return b<0?-Math.pow(-b,a):Math.pow(b,a)}}function af(a,b){function c(c){return f[((e.get(c)||("range"===b.t?e.set(c,a.push(c)):NaN))-1)%f.length]}function d(b,c){return cg.range(a.length).map(function(a){return b+c*a})}var e,f,g;return c.domain=function(d){if(!arguments.length)return a;a=[],e=new k;for(var f,g=-1,h=d.length;++g<h;)e.has(f=d[g])||e.set(f,a.push(f));return c[b.t].apply(c,b.a)},c.range=function(a){return arguments.length?(f=a,g=0,b={t:"range",a:arguments},c):f},c.rangePoints=function(e,h){arguments.length<2&&(h=0);var i=e[0],j=e[1],k=a.length<2?(i=(i+j)/2,0):(j-i)/(a.length-1+h);return f=d(i+k*h/2,k),g=0,b={t:"rangePoints",a:arguments},c},c.rangeRoundPoints=function(e,h){arguments.length<2&&(h=0);var i=e[0],j=e[1],k=a.length<2?(i=j=Math.round((i+j)/2),0):(j-i)/(a.length-1+h)|0;return f=d(i+Math.round(k*h/2+(j-i-(a.length-1+h)*k)/2),k),g=0,b={t:"rangeRoundPoints",a:arguments},c},c.rangeBands=function(e,h,i){arguments.length<2&&(h=0),arguments.length<3&&(i=h);var j=e[1]<e[0],k=e[j-0],l=e[1-j],m=(l-k)/(a.length-h+2*i);return f=d(k+m*i,m),j&&f.reverse(),g=m*(1-h),b={t:"rangeBands",a:arguments},c},c.rangeRoundBands=function(e,h,i){arguments.length<2&&(h=0),arguments.length<3&&(i=h);var j=e[1]<e[0],k=e[j-0],l=e[1-j],m=Math.floor((l-k)/(a.length-h+2*i));return f=d(k+Math.round((l-k-(a.length-h)*m)/2),m),j&&f.reverse(),g=Math.round(m*(1-h)),b={t:"rangeRoundBands",a:arguments},c},c.rangeBand=function(){return g},c.rangeExtent=function(){return Le(b.a[0])},c.copy=function(){return af(a,b)},c.domain(a)}function bf(a,b){function f(){var c=0,d=b.length;for(h=[];++c<d;)h[c-1]=cg.quantile(a,c/d);return g}function g(a){if(!isNaN(a=+a))return b[cg.bisect(h,a)]}var h;return g.domain=function(b){return arguments.length?(a=b.map(d).filter(e).sort(c),f()):a},g.range=function(a){return arguments.length?(b=a,f()):b},g.quantiles=function(){return h},g.invertExtent=function(c){return c=b.indexOf(c),c<0?[NaN,NaN]:[c>0?h[c-1]:a[0],c<h.length?h[c]:a[a.length-1]]},g.copy=function(){return bf(a,b)},f()}function cf(a,b,c){function d(b){return c[Math.max(0,Math.min(g,Math.floor(f*(b-a))))]}function e(){return f=c.length/(b-a),g=c.length-1,d}var f,g;return d.domain=function(c){return arguments.length?(a=+c[0],b=+c[c.length-1],e()):[a,b]},d.range=function(a){return arguments.length?(c=a,e()):c},d.invertExtent=function(b){return b=c.indexOf(b),b=b<0?NaN:b/f+a,[b,b+1/f]},d.copy=function(){return cf(a,b,c)},e()}function df(a,b){function c(c){if(c<=c)return b[cg.bisect(a,c)]}return c.domain=function(b){return arguments.length?(a=b,c):a},c.range=function(a){return arguments.length?(b=a,c):b},c.invertExtent=function(c){return c=b.indexOf(c),[a[c-1],a[c]]},c.copy=function(){return df(a,b)},c}function ef(a){function b(a){return+a}return b.invert=b,b.domain=b.range=function(c){return arguments.length?(a=c.map(b),b):a},b.ticks=function(b){return Ve(a,b)},b.tickFormat=function(b,c){return We(a,b,c)},b.copy=function(){return ef(a)},b}function ff(){return 0}function gf(a){return a.innerRadius}function hf(a){return a.outerRadius}function jf(a){return a.startAngle}function kf(a){return a.endAngle}function lf(a){return a&&a.padAngle}function mf(a,b,c,d){return(a-c)*b-(b-d)*a>0?0:1}function nf(a,b,c,d,e){var f=a[0]-b[0],g=a[1]-b[1],h=(e?d:-d)/Math.sqrt(f*f+g*g),i=h*g,j=-h*f,k=a[0]+i,l=a[1]+j,m=b[0]+i,n=b[1]+j,o=(k+m)/2,p=(l+n)/2,q=m-k,r=n-l,s=q*q+r*r,t=c-d,u=k*n-m*l,v=(r<0?-1:1)*Math.sqrt(t*t*s-u*u),w=(u*r-q*v)/s,x=(-u*q-r*v)/s,y=(u*r+q*v)/s,z=(-u*q+r*v)/s,A=w-o,B=x-p,C=y-o,D=z-p;return A*A+B*B>C*C+D*D&&(w=y,x=z),[[w-i,x-j],[w*c/t,x*c/t]]}function of(a){function b(b){function g(){j.push("M",f(a(k),h))}for(var i,j=[],k=[],l=-1,m=b.length,n=Ba(c),o=Ba(d);++l<m;)e.call(this,i=b[l],l)?k.push([+n.call(this,i,l),+o.call(this,i,l)]):k.length&&(g(),k=[]);return k.length&&g(),j.length?j.join(""):null}var c=Cc,d=Dc,e=Db,f=pf,g=f.key,h=.7;return b.x=function(a){return arguments.length?(c=a,b):c},b.y=function(a){return arguments.length?(d=a,b):d},b.defined=function(a){return arguments.length?(e=a,b):e},b.interpolate=function(a){return arguments.length?(g="function"==typeof a?f=a:(f=zi.get(a)||pf).key,b):g},b.tension=function(a){return arguments.length?(h=a,b):h},b}function pf(a){return a.join("L")}function qf(a){return pf(a)+"Z"}function rf(a){for(var b=0,c=a.length,d=a[0],e=[d[0],",",d[1]];++b<c;)e.push("H",(d[0]+(d=a[b])[0])/2,"V",d[1]);return c>1&&e.push("H",d[0]),e.join("")}function sf(a){for(var b=0,c=a.length,d=a[0],e=[d[0],",",d[1]];++b<c;)e.push("V",(d=a[b])[1],"H",d[0]);return e.join("")}function tf(a){for(var b=0,c=a.length,d=a[0],e=[d[0],",",d[1]];++b<c;)e.push("H",(d=a[b])[0],"V",d[1]);return e.join("")}function uf(a,b){return a.length<4?pf(a):a[1]+xf(a.slice(1,-1),yf(a,b))}function vf(a,b){return a.length<3?pf(a):a[0]+xf((a.push(a[0]),a),yf([a[a.length-2]].concat(a,[a[1]]),b))}function wf(a,b){return a.length<3?pf(a):a[0]+xf(a,yf(a,b))}function xf(a,b){if(b.length<1||a.length!=b.length&&a.length!=b.length+2)return pf(a);var c=a.length!=b.length,d="",e=a[0],f=a[1],g=b[0],h=g,i=1;if(c&&(d+="Q"+(f[0]-2*g[0]/3)+","+(f[1]-2*g[1]/3)+","+f[0]+","+f[1],e=a[1],i=2),b.length>1){h=b[1],f=a[i],i++,d+="C"+(e[0]+g[0])+","+(e[1]+g[1])+","+(f[0]-h[0])+","+(f[1]-h[1])+","+f[0]+","+f[1];for(var j=2;j<b.length;j++,i++)f=a[i],h=b[j],d+="S"+(f[0]-h[0])+","+(f[1]-h[1])+","+f[0]+","+f[1]}if(c){var k=a[i];d+="Q"+(f[0]+2*h[0]/3)+","+(f[1]+2*h[1]/3)+","+k[0]+","+k[1]}return d}function yf(a,b){for(var c,d=[],e=(1-b)/2,f=a[0],g=a[1],h=1,i=a.length;++h<i;)c=f,f=g,g=a[h],d.push([e*(g[0]-c[0]),e*(g[1]-c[1])]);return d}function zf(a){if(a.length<3)return pf(a);var b=1,c=a.length,d=a[0],e=d[0],f=d[1],g=[e,e,e,(d=a[1])[0]],h=[f,f,f,d[1]],i=[e,",",f,"L",Df(Ci,g),",",Df(Ci,h)];for(a.push(a[c-1]);++b<=c;)d=a[b],g.shift(),g.push(d[0]),h.shift(),h.push(d[1]),Ef(i,g,h);return a.pop(),i.push("L",d),i.join("")}function Af(a){if(a.length<4)return pf(a);for(var b,c=[],d=-1,e=a.length,f=[0],g=[0];++d<3;)b=a[d],f.push(b[0]),g.push(b[1]);for(c.push(Df(Ci,f)+","+Df(Ci,g)),--d;++d<e;)b=a[d],f.shift(),f.push(b[0]),g.shift(),g.push(b[1]),Ef(c,f,g);return c.join("")}function Bf(a){for(var b,c,d=-1,e=a.length,f=e+4,g=[],h=[];++d<4;)c=a[d%e],g.push(c[0]),h.push(c[1]);for(b=[Df(Ci,g),",",Df(Ci,h)],--d;++d<f;)c=a[d%e],g.shift(),g.push(c[0]),h.shift(),h.push(c[1]),Ef(b,g,h);return b.join("")}function Cf(a,b){var c=a.length-1;if(c)for(var d,e,f=a[0][0],g=a[0][1],h=a[c][0]-f,i=a[c][1]-g,j=-1;++j<=c;)d=a[j],e=j/c,d[0]=b*d[0]+(1-b)*(f+e*h),d[1]=b*d[1]+(1-b)*(g+e*i);return zf(a)}function Df(a,b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2]+a[3]*b[3]}function Ef(a,b,c){a.push("C",Df(Ai,b),",",Df(Ai,c),",",Df(Bi,b),",",Df(Bi,c),",",Df(Ci,b),",",Df(Ci,c))}function Ff(a,b){return(b[1]-a[1])/(b[0]-a[0])}function Gf(a){for(var b=0,c=a.length-1,d=[],e=a[0],f=a[1],g=d[0]=Ff(e,f);++b<c;)d[b]=(g+(g=Ff(e=f,f=a[b+1])))/2;return d[b]=g,d}function Hf(a){for(var b,c,d,e,f=[],g=Gf(a),h=-1,i=a.length-1;++h<i;)b=Ff(a[h],a[h+1]),mg(b)<Cg?g[h]=g[h+1]=0:(c=g[h]/b,d=g[h+1]/b,e=c*c+d*d,e>9&&(e=3*b/Math.sqrt(e),g[h]=e*c,g[h+1]=e*d));for(h=-1;++h<=i;)e=(a[Math.min(i,h+1)][0]-a[Math.max(0,h-1)][0])/(6*(1+g[h]*g[h])),f.push([e||0,g[h]*e||0]);return f}function If(a){return a.length<3?pf(a):a[0]+xf(a,Hf(a))}function Jf(a){for(var b,c,d,e=-1,f=a.length;++e<f;)b=a[e],c=b[0],d=b[1]-Hg,b[0]=c*Math.cos(d),b[1]=c*Math.sin(d);return a}function Kf(a){function b(b){function i(){p.push("M",h(a(r),l),k,j(a(q.reverse()),l),"Z")}for(var m,n,o,p=[],q=[],r=[],s=-1,t=b.length,u=Ba(c),v=Ba(e),w=c===d?function(){return n}:Ba(d),x=e===f?function(){return o}:Ba(f);++s<t;)g.call(this,m=b[s],s)?(q.push([n=+u.call(this,m,s),o=+v.call(this,m,s)]),r.push([+w.call(this,m,s),+x.call(this,m,s)])):q.length&&(i(),q=[],r=[]);return q.length&&i(),p.length?p.join(""):null}var c=Cc,d=Cc,e=0,f=Dc,g=Db,h=pf,i=h.key,j=h,k="L",l=.7;return b.x=function(a){return arguments.length?(c=d=a,b):d},b.x0=function(a){return arguments.length?(c=a,b):c},b.x1=function(a){return arguments.length?(d=a,b):d},b.y=function(a){return arguments.length?(e=f=a,b):f},b.y0=function(a){return arguments.length?(e=a,b):e},b.y1=function(a){return arguments.length?(f=a,b):f},b.defined=function(a){return arguments.length?(g=a,b):g},b.interpolate=function(a){return arguments.length?(i="function"==typeof a?h=a:(h=zi.get(a)||pf).key,j=h.reverse||h,k=h.closed?"M":"L",b):i},b.tension=function(a){return arguments.length?(l=a,b):l},b}function Lf(a){return a.radius}function Mf(a){return[a.x,a.y]}function Nf(a){return function(){var b=a.apply(this,arguments),c=b[0],d=b[1]-Hg;return[c*Math.cos(d),c*Math.sin(d)]}}function Of(){return 64}function Pf(){return"circle"}function Qf(a){var b=Math.sqrt(a/Eg);return"M0,"+b+"A"+b+","+b+" 0 1,1 0,"+-b+"A"+b+","+b+" 0 1,1 0,"+b+"Z"}function Rf(a){return function(){var b,c;(b=this[a])&&(c=b[b.active])&&(--b.count?delete b[b.active]:delete this[a],b.active+=.5,c.event&&c.event.interrupt.call(this,this.__data__,c.index))}}function Sf(a,b,c){return rg(a,Ji),a.namespace=b,a.id=c,a}function Tf(a,b,c,d){var e=a.id,f=a.namespace;return S(a,"function"==typeof c?function(a,g,h){a[f][e].tween.set(b,d(c.call(a,a.__data__,g,h)))}:(c=d(c),function(a){a[f][e].tween.set(b,c)}))}function Uf(a){return null==a&&(a=""),function(){this.textContent=a}}function Vf(a){return null==a?"__transition__":"__transition_"+a+"__"}function Wf(a,b,c,d,e){var f=a[c]||(a[c]={active:0,count:0}),g=f[d];if(!g){var h=e.time;g=f[d]={tween:new k,time:h,delay:e.delay,duration:e.duration,ease:e.ease,index:b},e=null,++f.count,cg.timer(function(e){function i(c){if(f.active>d)return k();var e=f[f.active];e&&(--f.count,delete f[f.active],e.event&&e.event.interrupt.call(a,a.__data__,e.index)),f.active=d,g.event&&g.event.start.call(a,a.__data__,b),g.tween.forEach(function(c,d){(d=d.call(a,a.__data__,b))&&p.push(d)}),m=g.ease,l=g.duration,cg.timer(function(){return o.c=j(c||1)?Db:j,1},0,h)}function j(c){if(f.active!==d)return 1;for(var e=c/l,h=m(e),i=p.length;i>0;)p[--i].call(a,h);return e>=1?(g.event&&g.event.end.call(a,a.__data__,b),k()):void 0}function k(){return--f.count?delete f[d]:delete a[c],1}var l,m,n=g.delay,o=bh,p=[];return o.t=n+h,n<=e?i(e-n):void(o.c=i)},0,h)}}function Xf(a,b,c){a.attr("transform",function(a){var d=b(a);return"translate("+(isFinite(d)?d:c(a))+",0)"})}function Yf(a,b,c){a.attr("transform",function(a){var d=b(a);return"translate(0,"+(isFinite(d)?d:c(a))+")"})}function Zf(a){return a.toISOString()}function $f(a,b,c){function d(b){return a(b)}function e(a,c){var d=a[1]-a[0],e=d/c,f=cg.bisect(Si,e);return f==Si.length?[b.year,Ue(a.map(function(a){return a/31536e6}),c)[2]]:f?b[e/Si[f-1]<Si[f]/e?f-1:f]:[Vi,Ue(a,c)[2]]}return d.invert=function(b){return _f(a.invert(b))},d.domain=function(b){return arguments.length?(a.domain(b),d):a.domain().map(_f)},d.nice=function(a,b){function c(c){return!isNaN(c)&&!a.range(c,_f(+c+1),b).length}var f=d.domain(),g=Le(f),h=null==a?e(g,10):"number"==typeof a&&e(g,a);return h&&(a=h[0],b=h[1]),d.domain(Oe(f,b>1?{floor:function(b){for(;c(b=a.floor(b));)b=_f(b-1);return b},ceil:function(b){for(;c(b=a.ceil(b));)b=_f(+b+1);return b}}:a))},d.ticks=function(a,b){var c=Le(d.domain()),f=null==a?e(c,10):"number"==typeof a?e(c,a):!a.range&&[{range:a},b];return f&&(a=f[0],b=f[1]),a.range(c[0],_f(+c[1]+1),b<1?1:b)},d.tickFormat=function(){return c},d.copy=function(){return $f(a.copy(),b,c)},Se(d,a)}function _f(a){return new Date(a)}function ag(a){return JSON.parse(a.responseText)}function bg(a){var b=fg.createRange();return b.selectNode(fg.body),b.createContextualFragment(a.responseText)}var cg={version:"3.5.6"},dg=[].slice,eg=function(a){return dg.call(a)},fg=this.document;if(fg)try{eg(fg.documentElement.childNodes)[0].nodeType}catch(a){eg=function(a){for(var b=a.length,c=new Array(b);b--;)c[b]=a[b];return c}}if(Date.now||(Date.now=function(){return+new Date}),fg)try{fg.createElement("DIV").style.setProperty("opacity",0,"")}catch(a){var gg=this.Element.prototype,hg=gg.setAttribute,ig=gg.setAttributeNS,jg=this.CSSStyleDeclaration.prototype,kg=jg.setProperty;gg.setAttribute=function(a,b){hg.call(this,a,b+"")},gg.setAttributeNS=function(a,b,c){ig.call(this,a,b,c+"")},jg.setProperty=function(a,b,c){kg.call(this,a,b+"",c)}}cg.ascending=c,cg.descending=function(a,b){return b<a?-1:b>a?1:b>=a?0:NaN},cg.min=function(a,b){var c,d,e=-1,f=a.length;if(1===arguments.length){for(;++e<f;)if(null!=(d=a[e])&&d>=d){c=d;break}for(;++e<f;)null!=(d=a[e])&&c>d&&(c=d)}else{for(;++e<f;)if(null!=(d=b.call(a,a[e],e))&&d>=d){c=d;break}for(;++e<f;)null!=(d=b.call(a,a[e],e))&&c>d&&(c=d)}return c},cg.max=function(a,b){var c,d,e=-1,f=a.length;if(1===arguments.length){for(;++e<f;)if(null!=(d=a[e])&&d>=d){c=d;break}for(;++e<f;)null!=(d=a[e])&&d>c&&(c=d)}else{for(;++e<f;)if(null!=(d=b.call(a,a[e],e))&&d>=d){c=d;break}for(;++e<f;)null!=(d=b.call(a,a[e],e))&&d>c&&(c=d)}return c},cg.extent=function(a,b){var c,d,e,f=-1,g=a.length;if(1===arguments.length){for(;++f<g;)if(null!=(d=a[f])&&d>=d){c=e=d;break}for(;++f<g;)null!=(d=a[f])&&(c>d&&(c=d),e<d&&(e=d))}else{for(;++f<g;)if(null!=(d=b.call(a,a[f],f))&&d>=d){c=e=d;break}for(;++f<g;)null!=(d=b.call(a,a[f],f))&&(c>d&&(c=d),e<d&&(e=d))}return[c,e]},cg.sum=function(a,b){var c,d=0,f=a.length,g=-1;if(1===arguments.length)for(;++g<f;)e(c=+a[g])&&(d+=c);else for(;++g<f;)e(c=+b.call(a,a[g],g))&&(d+=c);return d},cg.mean=function(a,b){var c,f=0,g=a.length,h=-1,i=g;if(1===arguments.length)for(;++h<g;)e(c=d(a[h]))?f+=c:--i;else for(;++h<g;)e(c=d(b.call(a,a[h],h)))?f+=c:--i;if(i)return f/i},cg.quantile=function(a,b){var c=(a.length-1)*b+1,d=Math.floor(c),e=+a[d-1],f=c-d;return f?e+f*(a[d]-e):e},cg.median=function(a,b){var f,g=[],h=a.length,i=-1;if(1===arguments.length)for(;++i<h;)e(f=d(a[i]))&&g.push(f);else for(;++i<h;)e(f=d(b.call(a,a[i],i)))&&g.push(f);if(g.length)return cg.quantile(g.sort(c),.5)},cg.variance=function(a,b){var c,f,g=a.length,h=0,i=0,j=-1,k=0;if(1===arguments.length)for(;++j<g;)e(c=d(a[j]))&&(f=c-h,h+=f/++k,i+=f*(c-h));else for(;++j<g;)e(c=d(b.call(a,a[j],j)))&&(f=c-h,h+=f/++k,i+=f*(c-h));if(k>1)return i/(k-1)},cg.deviation=function(){var a=cg.variance.apply(this,arguments);return a?Math.sqrt(a):a};var lg=g(c);cg.bisectLeft=lg.left,cg.bisect=cg.bisectRight=lg.right,cg.bisector=function(a){return g(1===a.length?function(b,d){return c(a(b),d)}:a)},cg.shuffle=function(a,b,c){(f=arguments.length)<3&&(c=a.length,f<2&&(b=0));for(var d,e,f=c-b;f;)e=Math.random()*f--|0,d=a[f+b],a[f+b]=a[e+b],a[e+b]=d;return a},cg.permute=function(a,b){for(var c=b.length,d=new Array(c);c--;)d[c]=a[b[c]];return d},cg.pairs=function(a){for(var b,c=0,d=a.length-1,e=a[0],f=new Array(d<0?0:d);c<d;)f[c]=[b=e,e=a[++c]];return f},cg.zip=function(){if(!(d=arguments.length))return[];for(var a=-1,b=cg.min(arguments,h),c=new Array(b);++a<b;)for(var d,e=-1,f=c[a]=new Array(d);++e<d;)f[e]=arguments[e][a];return c},cg.transpose=function(a){return cg.zip.apply(cg,a)},cg.keys=function(a){var b=[];for(var c in a)b.push(c);return b},cg.values=function(a){var b=[];for(var c in a)b.push(a[c]);return b},cg.entries=function(a){var b=[];for(var c in a)b.push({key:c,value:a[c]});return b},cg.merge=function(a){for(var b,c,d,e=a.length,f=-1,g=0;++f<e;)g+=a[f].length;for(c=new Array(g);--e>=0;)for(d=a[e],b=d.length;--b>=0;)c[--g]=d[b];return c};var mg=Math.abs;cg.range=function(a,b,c){if(arguments.length<3&&(c=1,arguments.length<2&&(b=a,a=0)),(b-a)/c===1/0)throw new Error("infinite range");var d,e=[],f=i(mg(c)),g=-1;if(a*=f,b*=f,c*=f,c<0)for(;(d=a+c*++g)>b;)e.push(d/f);else for(;(d=a+c*++g)<b;)e.push(d/f);return e},cg.map=function(a,b){var c=new k;if(a instanceof k)a.forEach(function(a,b){c.set(a,b)});else if(Array.isArray(a)){var d,e=-1,f=a.length;if(1===arguments.length)for(;++e<f;)c.set(e,a[e]);else for(;++e<f;)c.set(b.call(a,d=a[e],e),d)}else for(var g in a)c.set(g,a[g]);return c};var ng="__proto__",og="\0";j(k,{has:n,get:function(a){return this._[l(a)]},set:function(a,b){return this._[l(a)]=b},remove:o,keys:p,values:function(){var a=[];for(var b in this._)a.push(this._[b]);return a},entries:function(){var a=[];for(var b in this._)a.push({key:m(b),value:this._[b]});return a},size:q,empty:r,forEach:function(a){for(var b in this._)a.call(this,m(b),this._[b])}}),cg.nest=function(){function a(b,g,h){if(h>=f.length)return d?d.call(e,g):c?g.sort(c):g;for(var i,j,l,m,n=-1,o=g.length,p=f[h++],q=new k;++n<o;)(m=q.get(i=p(j=g[n])))?m.push(j):q.set(i,[j]);return b?(j=b(),l=function(c,d){j.set(c,a(b,d,h))}):(j={},l=function(c,d){j[c]=a(b,d,h)}),q.forEach(l),j}function b(a,c){if(c>=f.length)return a;var d=[],e=g[c++];return a.forEach(function(a,e){d.push({key:a,values:b(e,c)})}),e?d.sort(function(a,b){return e(a.key,b.key)}):d}var c,d,e={},f=[],g=[];return e.map=function(b,c){return a(c,b,0)},e.entries=function(c){return b(a(cg.map,c,0),0)},e.key=function(a){return f.push(a),e},e.sortKeys=function(a){return g[f.length-1]=a,e},e.sortValues=function(a){return c=a,e},e.rollup=function(a){return d=a,e},e},cg.set=function(a){var b=new s;if(a)for(var c=0,d=a.length;c<d;++c)b.add(a[c]);return b},j(s,{has:n,add:function(a){return this._[l(a+="")]=!0,a},remove:o,values:p,size:q,empty:r,forEach:function(a){for(var b in this._)a.call(this,m(b))}}),cg.behavior={},cg.rebind=function(a,b){for(var c,d=1,e=arguments.length;++d<e;)a[c=arguments[d]]=u(a,b,b[c]);return a};var pg=["webkit","ms","moz","Moz","o","O"];cg.dispatch=function(){for(var a=new x,b=-1,c=arguments.length;++b<c;)a[arguments[b]]=y(a);return a},x.prototype.on=function(a,b){var c=a.indexOf("."),d="";if(c>=0&&(d=a.slice(c+1),a=a.slice(0,c)),a)return arguments.length<2?this[a].on(d):this[a].on(d,b);if(2===arguments.length){if(null==b)for(a in this)this.hasOwnProperty(a)&&this[a].on(d,null);return this}},cg.event=null,cg.requote=function(a){return a.replace(qg,"\\$&")};var qg=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,rg={}.__proto__?function(a,b){a.__proto__=b}:function(a,b){for(var c in b)a[c]=b[c]},sg=function(a,b){return b.querySelector(a)},tg=function(a,b){return b.querySelectorAll(a)},ug=function(a,b){var c=a.matches||a[v(a,"matchesSelector")];return(ug=function(a,b){return c.call(a,b)})(a,b)};"function"==typeof Sizzle&&(sg=function(a,b){return Sizzle(a,b)[0]||null},tg=Sizzle,ug=Sizzle.matchesSelector),cg.selection=function(){return cg.select(fg.documentElement)};var vg=cg.selection.prototype=[];vg.select=function(a){var b,c,d,e,f=[];a=D(a);for(var g=-1,h=this.length;++g<h;){f.push(b=[]),b.parentNode=(d=this[g]).parentNode;for(var i=-1,j=d.length;++i<j;)(e=d[i])?(b.push(c=a.call(e,e.__data__,i,g)),c&&"__data__"in e&&(c.__data__=e.__data__)):b.push(null)}return C(f)},vg.selectAll=function(a){var b,c,d=[];a=E(a);for(var e=-1,f=this.length;++e<f;)for(var g=this[e],h=-1,i=g.length;++h<i;)(c=g[h])&&(d.push(b=eg(a.call(c,c.__data__,h,e))),b.parentNode=c);return C(d)};var wg={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};cg.ns={prefix:wg,qualify:function(a){var b=a.indexOf(":"),c=a;return b>=0&&(c=a.slice(0,b),a=a.slice(b+1)),wg.hasOwnProperty(c)?{space:wg[c],local:a}:a}},vg.attr=function(a,b){if(arguments.length<2){if("string"==typeof a){var c=this.node();return a=cg.ns.qualify(a),a.local?c.getAttributeNS(a.space,a.local):c.getAttribute(a)}for(b in a)this.each(F(b,a[b]));return this}return this.each(F(a,b))},vg.classed=function(a,b){if(arguments.length<2){if("string"==typeof a){var c=this.node(),d=(a=I(a)).length,e=-1;if(b=c.classList){for(;++e<d;)if(!b.contains(a[e]))return!1}else for(b=c.getAttribute("class");++e<d;)if(!H(a[e]).test(b))return!1;return!0}for(b in a)this.each(J(b,a[b]));return this}return this.each(J(a,b))},vg.style=function(a,c,d){var e=arguments.length;if(e<3){if("string"!=typeof a){e<2&&(c="");for(d in a)this.each(L(d,a[d],c));return this}if(e<2){var f=this.node();return b(f).getComputedStyle(f,null).getPropertyValue(a)}d=""}return this.each(L(a,c,d))},vg.property=function(a,b){if(arguments.length<2){if("string"==typeof a)return this.node()[a];for(b in a)this.each(M(b,a[b]));return this}return this.each(M(a,b))},vg.text=function(a){return arguments.length?this.each("function"==typeof a?function(){var b=a.apply(this,arguments);this.textContent=null==b?"":b}:null==a?function(){this.textContent=""}:function(){this.textContent=a}):this.node().textContent},vg.html=function(a){return arguments.length?this.each("function"==typeof a?function(){var b=a.apply(this,arguments);this.innerHTML=null==b?"":b}:null==a?function(){this.innerHTML=""}:function(){this.innerHTML=a}):this.node().innerHTML},vg.append=function(a){return a=N(a),this.select(function(){return this.appendChild(a.apply(this,arguments))})},vg.insert=function(a,b){return a=N(a),b=D(b),this.select(function(){return this.insertBefore(a.apply(this,arguments),b.apply(this,arguments)||null)})},vg.remove=function(){return this.each(O)},vg.data=function(a,b){function c(a,c){var d,e,f,g=a.length,l=c.length,m=Math.min(g,l),n=new Array(l),o=new Array(l),p=new Array(g);if(b){var q,r=new k,s=new Array(g);for(d=-1;++d<g;)r.has(q=b.call(e=a[d],e.__data__,d))?p[d]=e:r.set(q,e),s[d]=q;for(d=-1;++d<l;)(e=r.get(q=b.call(c,f=c[d],d)))?e!==!0&&(n[d]=e,e.__data__=f):o[d]=P(f),r.set(q,!0);for(d=-1;++d<g;)r.get(s[d])!==!0&&(p[d]=a[d])}else{for(d=-1;++d<m;)e=a[d],f=c[d],e?(e.__data__=f,n[d]=e):o[d]=P(f);for(;d<l;++d)o[d]=P(c[d]);for(;d<g;++d)p[d]=a[d]}o.update=n,o.parentNode=n.parentNode=p.parentNode=a.parentNode,h.push(o),i.push(n),j.push(p)}var d,e,f=-1,g=this.length;if(!arguments.length){for(a=new Array(g=(d=this[0]).length);++f<g;)(e=d[f])&&(a[f]=e.__data__);return a}var h=T([]),i=C([]),j=C([]);if("function"==typeof a)for(;++f<g;)c(d=this[f],a.call(d,d.parentNode.__data__,f));else for(;++f<g;)c(d=this[f],a);return i.enter=function(){return h},i.exit=function(){return j},i},vg.datum=function(a){return arguments.length?this.property("__data__",a):this.property("__data__")},vg.filter=function(a){var b,c,d,e=[];"function"!=typeof a&&(a=Q(a));for(var f=0,g=this.length;f<g;f++){e.push(b=[]),b.parentNode=(c=this[f]).parentNode;for(var h=0,i=c.length;h<i;h++)(d=c[h])&&a.call(d,d.__data__,h,f)&&b.push(d)}return C(e)},vg.order=function(){for(var a=-1,b=this.length;++a<b;)for(var c,d=this[a],e=d.length-1,f=d[e];--e>=0;)(c=d[e])&&(f&&f!==c.nextSibling&&f.parentNode.insertBefore(c,f),f=c);return this},vg.sort=function(a){a=R.apply(this,arguments);for(var b=-1,c=this.length;++b<c;)this[b].sort(a);return this.order()},vg.each=function(a){return S(this,function(b,c,d){a.call(b,b.__data__,c,d)})},vg.call=function(a){var b=eg(arguments);return a.apply(b[0]=this,b),this},vg.empty=function(){return!this.node()},vg.node=function(){for(var a=0,b=this.length;a<b;a++)for(var c=this[a],d=0,e=c.length;d<e;d++){var f=c[d];if(f)return f}return null},vg.size=function(){var a=0;return S(this,function(){++a}),a};var xg=[];cg.selection.enter=T,cg.selection.enter.prototype=xg,xg.append=vg.append,xg.empty=vg.empty,xg.node=vg.node,xg.call=vg.call,xg.size=vg.size,xg.select=function(a){for(var b,c,d,e,f,g=[],h=-1,i=this.length;++h<i;){d=(e=this[h]).update,g.push(b=[]),b.parentNode=e.parentNode;for(var j=-1,k=e.length;++j<k;)(f=e[j])?(b.push(d[j]=c=a.call(e.parentNode,f.__data__,j,h)),c.__data__=f.__data__):b.push(null)}return C(g)},xg.insert=function(a,b){return arguments.length<2&&(b=U(this)),vg.insert.call(this,a,b)},cg.select=function(b){var c;return"string"==typeof b?(c=[sg(b,fg)],c.parentNode=fg.documentElement):(c=[b],c.parentNode=a(b)),C([c])},cg.selectAll=function(a){var b;return"string"==typeof a?(b=eg(tg(a,fg)),b.parentNode=fg.documentElement):(b=a,b.parentNode=null),C([b])},vg.on=function(a,b,c){var d=arguments.length;if(d<3){if("string"!=typeof a){d<2&&(b=!1);for(c in a)this.each(V(c,a[c],b));return this}if(d<2)return(d=this.node()["__on"+a])&&d._;c=!1}return this.each(V(a,b,c))};var yg=cg.map({mouseenter:"mouseover",mouseleave:"mouseout"});fg&&yg.forEach(function(a){"on"+a in fg&&yg.remove(a)});var zg,Ag=0;cg.mouse=function(a){return Z(a,A())};var Bg=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;cg.touch=function(a,b,c){if(arguments.length<3&&(c=b,b=A().changedTouches),b)for(var d,e=0,f=b.length;e<f;++e)if((d=b[e]).identifier===c)return Z(a,d)},cg.behavior.drag=function(){function a(){this.on("mousedown.drag",f).on("touchstart.drag",g)}function c(a,b,c,f,g){return function(){function h(){var a,c,d=b(m,p);d&&(a=d[0]-t[0],c=d[1]-t[1],o|=a|c,t=d,n({type:"drag",x:d[0]+j[0],y:d[1]+j[1],dx:a,dy:c}))}function i(){b(m,p)&&(r.on(f+q,null).on(g+q,null),s(o&&cg.event.target===l),n({type:"dragend"}))}var j,k=this,l=cg.event.target,m=k.parentNode,n=d.of(k,arguments),o=0,p=a(),q=".drag"+(null==p?"":"-"+p),r=cg.select(c(l)).on(f+q,h).on(g+q,i),s=Y(l),t=b(m,p);e?(j=e.apply(k,arguments),j=[j.x-t[0],j.y-t[1]]):j=[0,0],n({type:"dragstart"})}}var d=B(a,"drag","dragstart","dragend"),e=null,f=c(w,cg.mouse,b,"mousemove","mouseup"),g=c($,cg.touch,t,"touchmove","touchend");return a.origin=function(b){return arguments.length?(e=b,a):e},cg.rebind(a,d,"on")},cg.touches=function(a,b){return arguments.length<2&&(b=A().touches),b?eg(b).map(function(b){var c=Z(a,b);return c.identifier=b.identifier,c}):[]};var Cg=1e-6,Dg=Cg*Cg,Eg=Math.PI,Fg=2*Eg,Gg=Fg-Cg,Hg=Eg/2,Ig=Eg/180,Jg=180/Eg,Kg=Math.SQRT2,Lg=2,Mg=4;cg.interpolateZoom=function(a,b){function c(a){var b=a*s;if(r){var c=ea(p),g=f/(Lg*m)*(c*fa(Kg*b+p)-da(p));return[d+g*j,e+g*k,f*c/ea(Kg*b+p)]}return[d+a*j,e+a*k,f*Math.exp(Kg*b)]}var d=a[0],e=a[1],f=a[2],g=b[0],h=b[1],i=b[2],j=g-d,k=h-e,l=j*j+k*k,m=Math.sqrt(l),n=(i*i-f*f+Mg*l)/(2*f*Lg*m),o=(i*i-f*f-Mg*l)/(2*i*Lg*m),p=Math.log(Math.sqrt(n*n+1)-n),q=Math.log(Math.sqrt(o*o+1)-o),r=q-p,s=(r||Math.log(i/f))/Kg;return c.duration=1e3*s,c},cg.behavior.zoom=function(){function a(a){a.on(F,l).on(Og+".zoom",n).on("dblclick.zoom",o).on(I,m)}function c(a){return[(a[0]-y.x)/y.k,(a[1]-y.y)/y.k]}function d(a){return[a[0]*y.k+y.x,a[1]*y.k+y.y]}function e(a){y.k=Math.max(C[0],Math.min(C[1],a))}function f(a,b){b=d(b),y.x+=a[0]-b[0],y.y+=a[1]-b[1]}function g(b,c,d,g){b.__chart__={x:y.x,y:y.y,k:y.k},e(Math.pow(2,g)),f(q=c,d),b=cg.select(b),D>0&&(b=b.transition().duration(D)),b.call(a.event)}function h(){v&&v.domain(u.range().map(function(a){return(a-y.x)/y.k}).map(u.invert)),x&&x.domain(w.range().map(function(a){return(a-y.y)/y.k}).map(w.invert))}function i(a){E++||a({type:"zoomstart"})}function j(a){h(),a({type:"zoom",scale:y.k,translate:[y.x,y.y]})}function k(a){--E||(a({type:"zoomend"}),q=null)}function l(){function a(){l=1,f(cg.mouse(e),n),j(h)}function d(){m.on(G,null).on(H,null),o(l&&cg.event.target===g),k(h)}var e=this,g=cg.event.target,h=J.of(e,arguments),l=0,m=cg.select(b(e)).on(G,a).on(H,d),n=c(cg.mouse(e)),o=Y(e);Ii.call(e),i(h)}function m(){function a(){var a=cg.touches(o);return n=y.k,a.forEach(function(a){a.identifier in q&&(q[a.identifier]=c(a))}),a}function b(){var b=cg.event.target;cg.select(b).on(u,d).on(v,h),w.push(b);for(var c=cg.event.changedTouches,e=0,f=c.length;e<f;++e)q[c[e].identifier]=null;var i=a(),j=Date.now();if(1===i.length){if(j-t<500){var k=i[0];g(o,k,q[k.identifier],Math.floor(Math.log(y.k)/Math.LN2)+1),z()}t=j}else if(i.length>1){var k=i[0],l=i[1],m=k[0]-l[0],n=k[1]-l[1];r=m*m+n*n}}function d(){var a,b,c,d,g=cg.touches(o);Ii.call(o);for(var h=0,i=g.length;h<i;++h,d=null)if(c=g[h],d=q[c.identifier]){if(b)break;a=c,b=d}if(d){var k=(k=c[0]-a[0])*k+(k=c[1]-a[1])*k,l=r&&Math.sqrt(k/r);a=[(a[0]+c[0])/2,(a[1]+c[1])/2],b=[(b[0]+d[0])/2,(b[1]+d[1])/2],e(l*n)}t=null,f(a,b),j(p)}function h(){if(cg.event.touches.length){for(var b=cg.event.changedTouches,c=0,d=b.length;c<d;++c)delete q[b[c].identifier];for(var e in q)return void a()}cg.selectAll(w).on(s,null),x.on(F,l).on(I,m),A(),k(p)}var n,o=this,p=J.of(o,arguments),q={},r=0,s=".zoom-"+cg.event.changedTouches[0].identifier,u="touchmove"+s,v="touchend"+s,w=[],x=cg.select(o),A=Y(o);b(),i(p),x.on(F,null).on(I,b)}function n(){var a=J.of(this,arguments);s?clearTimeout(s):(Ii.call(this),p=c(q=r||cg.mouse(this)),i(a)),s=setTimeout(function(){s=null,k(a)},50),z(),e(Math.pow(2,.002*Ng())*y.k),f(q,p),j(a)}function o(){var a=cg.mouse(this),b=Math.log(y.k)/Math.LN2;g(this,a,c(a),cg.event.shiftKey?Math.ceil(b)-1:Math.floor(b)+1)}var p,q,r,s,t,u,v,w,x,y={x:0,y:0,k:1},A=[960,500],C=Pg,D=250,E=0,F="mousedown.zoom",G="mousemove.zoom",H="mouseup.zoom",I="touchstart.zoom",J=B(a,"zoomstart","zoom","zoomend");return Og||(Og="onwheel"in fg?(Ng=function(){return-cg.event.deltaY*(cg.event.deltaMode?120:1)},"wheel"):"onmousewheel"in fg?(Ng=function(){return cg.event.wheelDelta},"mousewheel"):(Ng=function(){return-cg.event.detail},"MozMousePixelScroll")),a.event=function(a){a.each(function(){var a=J.of(this,arguments),b=y;Gi?cg.select(this).transition().each("start.zoom",function(){y=this.__chart__||{x:0,y:0,k:1},i(a)}).tween("zoom:zoom",function(){var c=A[0],d=A[1],e=q?q[0]:c/2,f=q?q[1]:d/2,g=cg.interpolateZoom([(e-y.x)/y.k,(f-y.y)/y.k,c/y.k],[(e-b.x)/b.k,(f-b.y)/b.k,c/b.k]);return function(b){var d=g(b),h=c/d[2];this.__chart__=y={x:e-d[0]*h,y:f-d[1]*h,k:h},j(a)}}).each("interrupt.zoom",function(){k(a)}).each("end.zoom",function(){k(a)}):(this.__chart__=y,i(a),j(a),k(a))})},a.translate=function(b){return arguments.length?(y={x:+b[0],y:+b[1],k:y.k},h(),a):[y.x,y.y]},a.scale=function(b){return arguments.length?(y={x:y.x,y:y.y,k:+b},h(),a):y.k},a.scaleExtent=function(b){return arguments.length?(C=null==b?Pg:[+b[0],+b[1]],a):C},a.center=function(b){return arguments.length?(r=b&&[+b[0],+b[1]],a):r},a.size=function(b){return arguments.length?(A=b&&[+b[0],+b[1]],a):A},a.duration=function(b){return arguments.length?(D=+b,a):D},a.x=function(b){return arguments.length?(v=b,u=b.copy(),y={x:0,y:0,k:1},a):v},a.y=function(b){return arguments.length?(x=b,w=b.copy(),y={x:0,y:0,k:1},a):x},cg.rebind(a,J,"on")};var Ng,Og,Pg=[0,1/0];cg.color=ha,ha.prototype.toString=function(){return this.rgb()+""},cg.hsl=ia;var Qg=ia.prototype=new ha;Qg.brighter=function(a){return a=Math.pow(.7,arguments.length?a:1),new ia(this.h,this.s,this.l/a)},Qg.darker=function(a){return a=Math.pow(.7,arguments.length?a:1),new ia(this.h,this.s,a*this.l)},Qg.rgb=function(){return ja(this.h,this.s,this.l)},cg.hcl=ka;var Rg=ka.prototype=new ha;Rg.brighter=function(a){return new ka(this.h,this.c,Math.min(100,this.l+Sg*(arguments.length?a:1)))},Rg.darker=function(a){return new ka(this.h,this.c,Math.max(0,this.l-Sg*(arguments.length?a:1)))},Rg.rgb=function(){return la(this.h,this.c,this.l).rgb()},cg.lab=ma;var Sg=18,Tg=.95047,Ug=1,Vg=1.08883,Wg=ma.prototype=new ha;Wg.brighter=function(a){return new ma(Math.min(100,this.l+Sg*(arguments.length?a:1)),this.a,this.b)},Wg.darker=function(a){return new ma(Math.max(0,this.l-Sg*(arguments.length?a:1)),this.a,this.b)},Wg.rgb=function(){return na(this.l,this.a,this.b)},cg.rgb=sa;var Xg=sa.prototype=new ha;Xg.brighter=function(a){a=Math.pow(.7,arguments.length?a:1);var b=this.r,c=this.g,d=this.b,e=30;return b||c||d?(b&&b<e&&(b=e),c&&c<e&&(c=e),d&&d<e&&(d=e),new sa(Math.min(255,b/a),Math.min(255,c/a),Math.min(255,d/a))):new sa(e,e,e)},Xg.darker=function(a){return a=Math.pow(.7,arguments.length?a:1),new sa(a*this.r,a*this.g,a*this.b)},Xg.hsl=function(){return xa(this.r,this.g,this.b)},Xg.toString=function(){return"#"+va(this.r)+va(this.g)+va(this.b)};var Yg=cg.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,
|
8
|
-
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});Yg.forEach(function(a,b){Yg.set(a,ta(b))}),cg.functor=Ba,cg.xhr=Ca(t),cg.dsv=function(a,b){function c(a,c,f){arguments.length<3&&(f=c,c=null);var g=Da(a,b,null==c?d:e(c),f);return g.row=function(a){return arguments.length?g.response(null==(c=a)?d:e(a)):c},g}function d(a){return c.parse(a.responseText)}function e(a){return function(b){return c.parse(b.responseText,a)}}function f(b){return b.map(g).join(a)}function g(a){return h.test(a)?'"'+a.replace(/\"/g,'""')+'"':a}var h=new RegExp('["'+a+"\n]"),i=a.charCodeAt(0);return c.parse=function(a,b){var d;return c.parseRows(a,function(a,c){if(d)return d(a,c-1);var e=new Function("d","return {"+a.map(function(a,b){return JSON.stringify(a)+": d["+b+"]"}).join(",")+"}");d=b?function(a,c){return b(e(a),c)}:e})},c.parseRows=function(a,b){function c(){if(k>=j)return g;if(e)return e=!1,f;var b=k;if(34===a.charCodeAt(b)){for(var c=b;c++<j;)if(34===a.charCodeAt(c)){if(34!==a.charCodeAt(c+1))break;++c}k=c+2;var d=a.charCodeAt(c+1);return 13===d?(e=!0,10===a.charCodeAt(c+2)&&++k):10===d&&(e=!0),a.slice(b+1,c).replace(/""/g,'"')}for(;k<j;){var d=a.charCodeAt(k++),h=1;if(10===d)e=!0;else if(13===d)e=!0,10===a.charCodeAt(k)&&(++k,++h);else if(d!==i)continue;return a.slice(b,k-h)}return a.slice(b)}for(var d,e,f={},g={},h=[],j=a.length,k=0,l=0;(d=c())!==g;){for(var m=[];d!==f&&d!==g;)m.push(d),d=c();b&&null==(m=b(m,l++))||h.push(m)}return h},c.format=function(b){if(Array.isArray(b[0]))return c.formatRows(b);var d=new s,e=[];return b.forEach(function(a){for(var b in a)d.has(b)||e.push(d.add(b))}),[e.map(g).join(a)].concat(b.map(function(b){return e.map(function(a){return g(b[a])}).join(a)})).join("\n")},c.formatRows=function(a){return a.map(f).join("\n")},c},cg.csv=cg.dsv(",","text/csv"),cg.tsv=cg.dsv("\t","text/tab-separated-values");var Zg,$g,_g,ah,bh,ch=this[v(this,"requestAnimationFrame")]||function(a){setTimeout(a,17)};cg.timer=function(a,b,c){var d=arguments.length;d<2&&(b=0),d<3&&(c=Date.now());var e=c+b,f={c:a,t:e,f:!1,n:null};$g?$g.n=f:Zg=f,$g=f,_g||(ah=clearTimeout(ah),_g=1,ch(Ga))},cg.timer.flush=function(){Ha(),Ia()},cg.round=function(a,b){return b?Math.round(a*(b=Math.pow(10,b)))/b:Math.round(a)};var dh=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map(Ka);cg.formatPrefix=function(a,b){var c=0;return a&&(a<0&&(a*=-1),b&&(a=cg.round(a,Ja(a,b))),c=1+Math.floor(1e-12+Math.log(a)/Math.LN10),c=Math.max(-24,Math.min(24,3*Math.floor((c-1)/3)))),dh[8+c/3]};var eh=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,fh=cg.map({b:function(a){return a.toString(2)},c:function(a){return String.fromCharCode(a)},o:function(a){return a.toString(8)},x:function(a){return a.toString(16)},X:function(a){return a.toString(16).toUpperCase()},g:function(a,b){return a.toPrecision(b)},e:function(a,b){return a.toExponential(b)},f:function(a,b){return a.toFixed(b)},r:function(a,b){return(a=cg.round(a,Ja(a,b))).toFixed(Math.max(0,Math.min(20,Ja(a*(1+1e-15),b))))}}),gh=cg.time={},hh=Date;Na.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(){ih.setUTCDate.apply(this._,arguments)},setDay:function(){ih.setUTCDay.apply(this._,arguments)},setFullYear:function(){ih.setUTCFullYear.apply(this._,arguments)},setHours:function(){ih.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){ih.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){ih.setUTCMinutes.apply(this._,arguments)},setMonth:function(){ih.setUTCMonth.apply(this._,arguments)},setSeconds:function(){ih.setUTCSeconds.apply(this._,arguments)},setTime:function(){ih.setTime.apply(this._,arguments)}};var ih=Date.prototype;gh.year=Oa(function(a){return a=gh.day(a),a.setMonth(0,1),a},function(a,b){a.setFullYear(a.getFullYear()+b)},function(a){return a.getFullYear()}),gh.years=gh.year.range,gh.years.utc=gh.year.utc.range,gh.day=Oa(function(a){var b=new hh(2e3,0);return b.setFullYear(a.getFullYear(),a.getMonth(),a.getDate()),b},function(a,b){a.setDate(a.getDate()+b)},function(a){return a.getDate()-1}),gh.days=gh.day.range,gh.days.utc=gh.day.utc.range,gh.dayOfYear=function(a){var b=gh.year(a);return Math.floor((a-b-6e4*(a.getTimezoneOffset()-b.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(a,b){b=7-b;var c=gh[a]=Oa(function(a){return(a=gh.day(a)).setDate(a.getDate()-(a.getDay()+b)%7),a},function(a,b){a.setDate(a.getDate()+7*Math.floor(b))},function(a){var c=gh.year(a).getDay();return Math.floor((gh.dayOfYear(a)+(c+b)%7)/7)-(c!==b)});gh[a+"s"]=c.range,gh[a+"s"].utc=c.utc.range,gh[a+"OfYear"]=function(a){var c=gh.year(a).getDay();return Math.floor((gh.dayOfYear(a)+(c+b)%7)/7)}}),gh.week=gh.sunday,gh.weeks=gh.sunday.range,gh.weeks.utc=gh.sunday.utc.range,gh.weekOfYear=gh.sundayOfYear;var jh={"-":"",_:" ",0:"0"},kh=/^\s*\d+/,lh=/^%/;cg.locale=function(a){return{numberFormat:La(a),timeFormat:Qa(a)}};var mh=cg.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"]});cg.format=mh.numberFormat,cg.geo={},jb.prototype={s:0,t:0,add:function(a){kb(a,this.t,nh),kb(nh.s,this.s,this),this.s?this.t+=nh.t:this.s=nh.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var nh=new jb;cg.geo.stream=function(a,b){a&&oh.hasOwnProperty(a.type)?oh[a.type](a,b):lb(a,b)};var oh={Feature:function(a,b){lb(a.geometry,b)},FeatureCollection:function(a,b){for(var c=a.features,d=-1,e=c.length;++d<e;)lb(c[d].geometry,b)}},ph={Sphere:function(a,b){b.sphere()},Point:function(a,b){a=a.coordinates,b.point(a[0],a[1],a[2])},MultiPoint:function(a,b){for(var c=a.coordinates,d=-1,e=c.length;++d<e;)a=c[d],b.point(a[0],a[1],a[2])},LineString:function(a,b){mb(a.coordinates,b,0)},MultiLineString:function(a,b){for(var c=a.coordinates,d=-1,e=c.length;++d<e;)mb(c[d],b,0)},Polygon:function(a,b){nb(a.coordinates,b)},MultiPolygon:function(a,b){for(var c=a.coordinates,d=-1,e=c.length;++d<e;)nb(c[d],b)},GeometryCollection:function(a,b){for(var c=a.geometries,d=-1,e=c.length;++d<e;)lb(c[d],b)}};cg.geo.area=function(a){return qh=0,cg.geo.stream(a,sh),qh};var qh,rh=new jb,sh={sphere:function(){qh+=4*Eg},point:w,lineStart:w,lineEnd:w,polygonStart:function(){rh.reset(),sh.lineStart=ob},polygonEnd:function(){var a=2*rh;qh+=a<0?4*Eg+a:a,sh.lineStart=sh.lineEnd=sh.point=w}};cg.geo.bounds=function(){function a(a,b){t.push(u=[k=a,m=a]),b<l&&(l=b),b>n&&(n=b)}function b(b,c){var d=pb([b*Ig,c*Ig]);if(r){var e=rb(r,d),f=[e[1],-e[0],0],g=rb(f,e);ub(g),g=vb(g);var i=b-o,j=i>0?1:-1,p=g[0]*Jg*j,q=mg(i)>180;if(q^(j*o<p&&p<j*b)){var s=g[1]*Jg;s>n&&(n=s)}else if(p=(p+360)%360-180,q^(j*o<p&&p<j*b)){var s=-g[1]*Jg;s<l&&(l=s)}else c<l&&(l=c),c>n&&(n=c);q?b<o?h(k,b)>h(k,m)&&(m=b):h(b,m)>h(k,m)&&(k=b):m>=k?(b<k&&(k=b),b>m&&(m=b)):b>o?h(k,b)>h(k,m)&&(m=b):h(b,m)>h(k,m)&&(k=b)}else a(b,c);r=d,o=b}function c(){v.point=b}function d(){u[0]=k,u[1]=m,v.point=a,r=null}function e(a,c){if(r){var d=a-o;s+=mg(d)>180?d+(d>0?360:-360):d}else p=a,q=c;sh.point(a,c),b(a,c)}function f(){sh.lineStart()}function g(){e(p,q),sh.lineEnd(),mg(s)>Cg&&(k=-(m=180)),u[0]=k,u[1]=m,r=null}function h(a,b){return(b-=a)<0?b+360:b}function i(a,b){return a[0]-b[0]}function j(a,b){return b[0]<=b[1]?b[0]<=a&&a<=b[1]:a<b[0]||b[1]<a}var k,l,m,n,o,p,q,r,s,t,u,v={point:a,lineStart:c,lineEnd:d,polygonStart:function(){v.point=e,v.lineStart=f,v.lineEnd=g,s=0,sh.polygonStart()},polygonEnd:function(){sh.polygonEnd(),v.point=a,v.lineStart=c,v.lineEnd=d,rh<0?(k=-(m=180),l=-(n=90)):s>Cg?n=90:s<-Cg&&(l=-90),u[0]=k,u[1]=m}};return function(a){n=m=-(k=l=1/0),t=[],cg.geo.stream(a,v);var b=t.length;if(b){t.sort(i);for(var c,d=1,e=t[0],f=[e];d<b;++d)c=t[d],j(c[0],e)||j(c[1],e)?(h(e[0],c[1])>h(e[0],e[1])&&(e[1]=c[1]),h(c[0],e[1])>h(e[0],e[1])&&(e[0]=c[0])):f.push(e=c);for(var g,c,o=-(1/0),b=f.length-1,d=0,e=f[b];d<=b;e=c,++d)c=f[d],(g=h(e[1],c[0]))>o&&(o=g,k=c[0],m=e[1])}return t=u=null,k===1/0||l===1/0?[[NaN,NaN],[NaN,NaN]]:[[k,l],[m,n]]}}(),cg.geo.centroid=function(a){th=uh=vh=wh=xh=yh=zh=Ah=Bh=Ch=Dh=0,cg.geo.stream(a,Eh);var b=Bh,c=Ch,d=Dh,e=b*b+c*c+d*d;return e<Dg&&(b=yh,c=zh,d=Ah,uh<Cg&&(b=vh,c=wh,d=xh),e=b*b+c*c+d*d,e<Dg)?[NaN,NaN]:[Math.atan2(c,b)*Jg,ca(d/Math.sqrt(e))*Jg]};var th,uh,vh,wh,xh,yh,zh,Ah,Bh,Ch,Dh,Eh={sphere:w,point:xb,lineStart:zb,lineEnd:Ab,polygonStart:function(){Eh.lineStart=Bb},polygonEnd:function(){Eh.lineStart=zb}},Fh=Hb(Db,Lb,Nb,[-Eg,-Eg/2]),Gh=1e9;cg.geo.clipExtent=function(){var a,b,c,d,e,f,g={stream:function(a){return e&&(e.valid=!1),e=f(a),e.valid=!0,e},extent:function(h){return arguments.length?(f=Rb(a=+h[0][0],b=+h[0][1],c=+h[1][0],d=+h[1][1]),e&&(e.valid=!1,e=null),g):[[a,b],[c,d]]}};return g.extent([[0,0],[960,500]])},(cg.geo.conicEqualArea=function(){return Sb(Tb)}).raw=Tb,cg.geo.albers=function(){return cg.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},cg.geo.albersUsa=function(){function a(a){var f=a[0],g=a[1];return b=null,c(f,g),b||(d(f,g),b)||e(f,g),b}var b,c,d,e,f=cg.geo.albers(),g=cg.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),h=cg.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),i={point:function(a,c){b=[a,c]}};return a.invert=function(a){var b=f.scale(),c=f.translate(),d=(a[0]-c[0])/b,e=(a[1]-c[1])/b;return(e>=.12&&e<.234&&d>=-.425&&d<-.214?g:e>=.166&&e<.234&&d>=-.214&&d<-.115?h:f).invert(a)},a.stream=function(a){var b=f.stream(a),c=g.stream(a),d=h.stream(a);return{point:function(a,e){b.point(a,e),c.point(a,e),d.point(a,e)},sphere:function(){b.sphere(),c.sphere(),d.sphere()},lineStart:function(){b.lineStart(),c.lineStart(),d.lineStart()},lineEnd:function(){b.lineEnd(),c.lineEnd(),d.lineEnd()},polygonStart:function(){b.polygonStart(),c.polygonStart(),d.polygonStart()},polygonEnd:function(){b.polygonEnd(),c.polygonEnd(),d.polygonEnd()}}},a.precision=function(b){return arguments.length?(f.precision(b),g.precision(b),h.precision(b),a):f.precision()},a.scale=function(b){return arguments.length?(f.scale(b),g.scale(.35*b),h.scale(b),a.translate(f.translate())):f.scale()},a.translate=function(b){if(!arguments.length)return f.translate();var j=f.scale(),k=+b[0],l=+b[1];return c=f.translate(b).clipExtent([[k-.455*j,l-.238*j],[k+.455*j,l+.238*j]]).stream(i).point,d=g.translate([k-.307*j,l+.201*j]).clipExtent([[k-.425*j+Cg,l+.12*j+Cg],[k-.214*j-Cg,l+.234*j-Cg]]).stream(i).point,e=h.translate([k-.205*j,l+.212*j]).clipExtent([[k-.214*j+Cg,l+.166*j+Cg],[k-.115*j-Cg,l+.234*j-Cg]]).stream(i).point,a},a.scale(1070)};var Hh,Ih,Jh,Kh,Lh,Mh,Nh={point:w,lineStart:w,lineEnd:w,polygonStart:function(){Ih=0,Nh.lineStart=Ub},polygonEnd:function(){Nh.lineStart=Nh.lineEnd=Nh.point=w,Hh+=mg(Ih/2)}},Oh={point:Vb,lineStart:w,lineEnd:w,polygonStart:w,polygonEnd:w},Ph={point:Yb,lineStart:Zb,lineEnd:$b,polygonStart:function(){Ph.lineStart=_b},polygonEnd:function(){Ph.point=Yb,Ph.lineStart=Zb,Ph.lineEnd=$b}};cg.geo.path=function(){function a(a){return a&&("function"==typeof h&&f.pointRadius(+h.apply(this,arguments)),g&&g.valid||(g=e(f)),cg.geo.stream(a,g)),f.result()}function b(){return g=null,a}var c,d,e,f,g,h=4.5;return a.area=function(a){return Hh=0,cg.geo.stream(a,e(Nh)),Hh},a.centroid=function(a){return vh=wh=xh=yh=zh=Ah=Bh=Ch=Dh=0,cg.geo.stream(a,e(Ph)),Dh?[Bh/Dh,Ch/Dh]:Ah?[yh/Ah,zh/Ah]:xh?[vh/xh,wh/xh]:[NaN,NaN]},a.bounds=function(a){return Lh=Mh=-(Jh=Kh=1/0),cg.geo.stream(a,e(Oh)),[[Jh,Kh],[Lh,Mh]]},a.projection=function(a){return arguments.length?(e=(c=a)?a.stream||cc(a):t,b()):c},a.context=function(a){return arguments.length?(f=null==(d=a)?new Wb:new ac(a),"function"!=typeof h&&f.pointRadius(h),b()):d},a.pointRadius=function(b){return arguments.length?(h="function"==typeof b?b:(f.pointRadius(+b),+b),a):h},a.projection(cg.geo.albersUsa()).context(null)},cg.geo.transform=function(a){return{stream:function(b){var c=new dc(b);for(var d in a)c[d]=a[d];return c}}},dc.prototype={point:function(a,b){this.stream.point(a,b)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},cg.geo.projection=fc,cg.geo.projectionMutator=gc,(cg.geo.equirectangular=function(){return fc(ic)}).raw=ic.invert=ic,cg.geo.rotation=function(a){function b(b){return b=a(b[0]*Ig,b[1]*Ig),b[0]*=Jg,b[1]*=Jg,b}return a=kc(a[0]%360*Ig,a[1]*Ig,a.length>2?a[2]*Ig:0),b.invert=function(b){return b=a.invert(b[0]*Ig,b[1]*Ig),b[0]*=Jg,b[1]*=Jg,b},b},jc.invert=ic,cg.geo.circle=function(){function a(){var a="function"==typeof d?d.apply(this,arguments):d,b=kc(-a[0]*Ig,-a[1]*Ig,0).invert,e=[];return c(null,null,1,{point:function(a,c){e.push(a=b(a,c)),a[0]*=Jg,a[1]*=Jg}}),{type:"Polygon",coordinates:[e]}}var b,c,d=[0,0],e=6;return a.origin=function(b){return arguments.length?(d=b,a):d},a.angle=function(d){return arguments.length?(c=oc((b=+d)*Ig,e*Ig),a):b},a.precision=function(d){return arguments.length?(c=oc(b*Ig,(e=+d)*Ig),a):e},a.angle(90)},cg.geo.distance=function(a,b){var c,d=(b[0]-a[0])*Ig,e=a[1]*Ig,f=b[1]*Ig,g=Math.sin(d),h=Math.cos(d),i=Math.sin(e),j=Math.cos(e),k=Math.sin(f),l=Math.cos(f);return Math.atan2(Math.sqrt((c=l*g)*c+(c=j*k-i*l*h)*c),i*k+j*l*h)},cg.geo.graticule=function(){function a(){return{type:"MultiLineString",coordinates:b()}}function b(){return cg.range(Math.ceil(f/q)*q,e,q).map(m).concat(cg.range(Math.ceil(j/r)*r,i,r).map(n)).concat(cg.range(Math.ceil(d/o)*o,c,o).filter(function(a){return mg(a%q)>Cg}).map(k)).concat(cg.range(Math.ceil(h/p)*p,g,p).filter(function(a){return mg(a%r)>Cg}).map(l))}var c,d,e,f,g,h,i,j,k,l,m,n,o=10,p=o,q=90,r=360,s=2.5;return a.lines=function(){return b().map(function(a){return{type:"LineString",coordinates:a}})},a.outline=function(){return{type:"Polygon",coordinates:[m(f).concat(n(i).slice(1),m(e).reverse().slice(1),n(j).reverse().slice(1))]}},a.extent=function(b){return arguments.length?a.majorExtent(b).minorExtent(b):a.minorExtent()},a.majorExtent=function(b){return arguments.length?(f=+b[0][0],e=+b[1][0],j=+b[0][1],i=+b[1][1],f>e&&(b=f,f=e,e=b),j>i&&(b=j,j=i,i=b),a.precision(s)):[[f,j],[e,i]]},a.minorExtent=function(b){return arguments.length?(d=+b[0][0],c=+b[1][0],h=+b[0][1],g=+b[1][1],d>c&&(b=d,d=c,c=b),h>g&&(b=h,h=g,g=b),a.precision(s)):[[d,h],[c,g]]},a.step=function(b){return arguments.length?a.majorStep(b).minorStep(b):a.minorStep()},a.majorStep=function(b){return arguments.length?(q=+b[0],r=+b[1],a):[q,r]},a.minorStep=function(b){return arguments.length?(o=+b[0],p=+b[1],a):[o,p]},a.precision=function(b){return arguments.length?(s=+b,k=qc(h,g,90),l=rc(d,c,s),m=qc(j,i,90),n=rc(f,e,s),a):s},a.majorExtent([[-180,-90+Cg],[180,90-Cg]]).minorExtent([[-180,-80-Cg],[180,80+Cg]])},cg.geo.greatArc=function(){function a(){return{type:"LineString",coordinates:[b||d.apply(this,arguments),c||e.apply(this,arguments)]}}var b,c,d=sc,e=tc;return a.distance=function(){return cg.geo.distance(b||d.apply(this,arguments),c||e.apply(this,arguments))},a.source=function(c){return arguments.length?(d=c,b="function"==typeof c?null:c,a):d},a.target=function(b){return arguments.length?(e=b,c="function"==typeof b?null:b,a):e},a.precision=function(){return arguments.length?a:0},a},cg.geo.interpolate=function(a,b){return uc(a[0]*Ig,a[1]*Ig,b[0]*Ig,b[1]*Ig)},cg.geo.length=function(a){return Qh=0,cg.geo.stream(a,Rh),Qh};var Qh,Rh={sphere:w,point:w,lineStart:vc,lineEnd:w,polygonStart:w,polygonEnd:w},Sh=wc(function(a){return Math.sqrt(2/(1+a))},function(a){return 2*Math.asin(a/2)});(cg.geo.azimuthalEqualArea=function(){return fc(Sh)}).raw=Sh;var Th=wc(function(a){var b=Math.acos(a);return b&&b/Math.sin(b)},t);(cg.geo.azimuthalEquidistant=function(){return fc(Th)}).raw=Th,(cg.geo.conicConformal=function(){return Sb(xc)}).raw=xc,(cg.geo.conicEquidistant=function(){return Sb(yc)}).raw=yc;var Uh=wc(function(a){return 1/a},Math.atan);(cg.geo.gnomonic=function(){return fc(Uh)}).raw=Uh,zc.invert=function(a,b){return[a,2*Math.atan(Math.exp(b))-Hg]},(cg.geo.mercator=function(){return Ac(zc)}).raw=zc;var Vh=wc(function(){return 1},Math.asin);(cg.geo.orthographic=function(){return fc(Vh)}).raw=Vh;var Wh=wc(function(a){return 1/(1+a)},function(a){return 2*Math.atan(a)});(cg.geo.stereographic=function(){return fc(Wh)}).raw=Wh,Bc.invert=function(a,b){return[-b,2*Math.atan(Math.exp(a))-Hg]},(cg.geo.transverseMercator=function(){var a=Ac(Bc),b=a.center,c=a.rotate;return a.center=function(a){return a?b([-a[1],a[0]]):(a=b(),[a[1],-a[0]])},a.rotate=function(a){return a?c([a[0],a[1],a.length>2?a[2]+90:90]):(a=c(),[a[0],a[1],a[2]-90])},c([0,0,90])}).raw=Bc,cg.geom={},cg.geom.hull=function(a){function b(a){if(a.length<3)return[];var b,e=Ba(c),f=Ba(d),g=a.length,h=[],i=[];for(b=0;b<g;b++)h.push([+e.call(this,a[b],b),+f.call(this,a[b],b),b]);for(h.sort(Fc),b=0;b<g;b++)i.push([h[b][0],-h[b][1]]);var j=Ec(h),k=Ec(i),l=k[0]===j[0],m=k[k.length-1]===j[j.length-1],n=[];for(b=j.length-1;b>=0;--b)n.push(a[h[j[b]][2]]);for(b=+l;b<k.length-m;++b)n.push(a[h[k[b]][2]]);return n}var c=Cc,d=Dc;return arguments.length?b(a):(b.x=function(a){return arguments.length?(c=a,b):c},b.y=function(a){return arguments.length?(d=a,b):d},b)},cg.geom.polygon=function(a){return rg(a,Xh),a};var Xh=cg.geom.polygon.prototype=[];Xh.area=function(){for(var a,b=-1,c=this.length,d=this[c-1],e=0;++b<c;)a=d,d=this[b],e+=a[1]*d[0]-a[0]*d[1];return.5*e},Xh.centroid=function(a){var b,c,d=-1,e=this.length,f=0,g=0,h=this[e-1];for(arguments.length||(a=-1/(6*this.area()));++d<e;)b=h,h=this[d],c=b[0]*h[1]-h[0]*b[1],f+=(b[0]+h[0])*c,g+=(b[1]+h[1])*c;return[f*a,g*a]},Xh.clip=function(a){for(var b,c,d,e,f,g,h=Ic(a),i=-1,j=this.length-Ic(this),k=this[j-1];++i<j;){for(b=a.slice(),a.length=0,e=this[i],f=b[(d=b.length-h)-1],c=-1;++c<d;)g=b[c],Gc(g,k,e)?(Gc(f,k,e)||a.push(Hc(f,g,k,e)),a.push(g)):Gc(f,k,e)&&a.push(Hc(f,g,k,e)),f=g;h&&a.push(a[0]),k=e}return a};var Yh,Zh,$h,_h,ai,bi=[],ci=[];Qc.prototype.prepare=function(){for(var a,b=this.edges,c=b.length;c--;)a=b[c].edge,a.b&&a.a||b.splice(c,1);return b.sort(Sc),b.length},ad.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},bd.prototype={insert:function(a,b){var c,d,e;if(a){if(b.P=a,b.N=a.N,a.N&&(a.N.P=b),a.N=b,a.R){for(a=a.R;a.L;)a=a.L;a.L=b}else a.R=b;c=a}else this._?(a=fd(this._),b.P=null,b.N=a,a.P=a.L=b,c=a):(b.P=b.N=null,this._=b,c=null);for(b.L=b.R=null,b.U=c,b.C=!0,a=b;c&&c.C;)d=c.U,c===d.L?(e=d.R,e&&e.C?(c.C=e.C=!1,d.C=!0,a=d):(a===c.R&&(dd(this,c),a=c,c=a.U),c.C=!1,d.C=!0,ed(this,d))):(e=d.L,e&&e.C?(c.C=e.C=!1,d.C=!0,a=d):(a===c.L&&(ed(this,c),a=c,c=a.U),c.C=!1,d.C=!0,dd(this,d))),c=a.U;this._.C=!1},remove:function(a){a.N&&(a.N.P=a.P),a.P&&(a.P.N=a.N),a.N=a.P=null;var b,c,d,e=a.U,f=a.L,g=a.R;if(c=f?g?fd(g):f:g,e?e.L===a?e.L=c:e.R=c:this._=c,f&&g?(d=c.C,c.C=a.C,c.L=f,f.U=c,c!==g?(e=c.U,c.U=a.U,a=c.R,e.L=a,c.R=g,g.U=c):(c.U=e,e=c,a=c.R)):(d=a.C,a=c),a&&(a.U=e),!d){if(a&&a.C)return void(a.C=!1);do{if(a===this._)break;if(a===e.L){if(b=e.R,b.C&&(b.C=!1,e.C=!0,dd(this,e),b=e.R),b.L&&b.L.C||b.R&&b.R.C){b.R&&b.R.C||(b.L.C=!1,b.C=!0,ed(this,b),b=e.R),b.C=e.C,e.C=b.R.C=!1,dd(this,e),a=this._;break}}else if(b=e.L,b.C&&(b.C=!1,e.C=!0,ed(this,e),b=e.L),b.L&&b.L.C||b.R&&b.R.C){b.L&&b.L.C||(b.R.C=!1,b.C=!0,dd(this,b),b=e.L),b.C=e.C,e.C=b.L.C=!1,ed(this,e),a=this._;break}b.C=!0,a=e,e=e.U}while(!a.C);a&&(a.C=!1)}}},cg.geom.voronoi=function(a){function b(a){var b=new Array(a.length),d=h[0][0],e=h[0][1],f=h[1][0],g=h[1][1];return gd(c(a),h).cells.forEach(function(c,h){var i=c.edges,j=c.site,k=b[h]=i.length?i.map(function(a){var b=a.start();return[b.x,b.y]}):j.x>=d&&j.x<=f&&j.y>=e&&j.y<=g?[[d,g],[f,g],[f,e],[d,e]]:[];k.point=a[h]}),b}function c(a){return a.map(function(a,b){return{x:Math.round(f(a,b)/Cg)*Cg,y:Math.round(g(a,b)/Cg)*Cg,i:b}})}var d=Cc,e=Dc,f=d,g=e,h=di;return a?b(a):(b.links=function(a){return gd(c(a)).edges.filter(function(a){return a.l&&a.r}).map(function(b){return{source:a[b.l.i],target:a[b.r.i]}})},b.triangles=function(a){var b=[];return gd(c(a)).cells.forEach(function(c,d){for(var e,f,g=c.site,h=c.edges.sort(Sc),i=-1,j=h.length,k=h[j-1].edge,l=k.l===g?k.r:k.l;++i<j;)e=k,f=l,k=h[i].edge,l=k.l===g?k.r:k.l,d<f.i&&d<l.i&&id(g,f,l)<0&&b.push([a[d],a[f.i],a[l.i]])}),b},b.x=function(a){return arguments.length?(f=Ba(d=a),b):d},b.y=function(a){return arguments.length?(g=Ba(e=a),b):e},b.clipExtent=function(a){return arguments.length?(h=null==a?di:a,b):h===di?null:h},b.size=function(a){return arguments.length?b.clipExtent(a&&[[0,0],a]):h===di?null:h&&h[1]},b)};var di=[[-1e6,-1e6],[1e6,1e6]];cg.geom.delaunay=function(a){return cg.geom.voronoi().triangles(a)},cg.geom.quadtree=function(a,b,c,d,e){function f(a){function f(a,b,c,d,e,f,g,h){if(!isNaN(c)&&!isNaN(d))if(a.leaf){var i=a.x,k=a.y;if(null!=i)if(mg(i-c)+mg(k-d)<.01)j(a,b,c,d,e,f,g,h);else{var l=a.point;a.x=a.y=a.point=null,j(a,l,i,k,e,f,g,h),j(a,b,c,d,e,f,g,h)}else a.x=c,a.y=d,a.point=b}else j(a,b,c,d,e,f,g,h)}function j(a,b,c,d,e,g,h,i){var j=.5*(e+h),k=.5*(g+i),l=c>=j,m=d>=k,n=m<<1|l;a.leaf=!1,a=a.nodes[n]||(a.nodes[n]=ld()),l?e=j:h=j,m?g=k:i=k,f(a,b,c,d,e,g,h,i)}var k,l,m,n,o,p,q,r,s,t=Ba(h),u=Ba(i);if(null!=b)p=b,q=c,r=d,s=e;else if(r=s=-(p=q=1/0),l=[],m=[],o=a.length,g)for(n=0;n<o;++n)k=a[n],k.x<p&&(p=k.x),k.y<q&&(q=k.y),k.x>r&&(r=k.x),k.y>s&&(s=k.y),l.push(k.x),m.push(k.y);else for(n=0;n<o;++n){var v=+t(k=a[n],n),w=+u(k,n);v<p&&(p=v),w<q&&(q=w),v>r&&(r=v),w>s&&(s=w),l.push(v),m.push(w)}var x=r-p,y=s-q;x>y?s=q+x:r=p+y;var z=ld();if(z.add=function(a){f(z,a,+t(a,++n),+u(a,n),p,q,r,s)},z.visit=function(a){md(a,z,p,q,r,s)},z.find=function(a){return nd(z,a[0],a[1],p,q,r,s)},n=-1,null==b){for(;++n<o;)f(z,a[n],l[n],m[n],p,q,r,s);--n}else a.forEach(z.add);return l=m=a=k=null,z}var g,h=Cc,i=Dc;return(g=arguments.length)?(h=jd,i=kd,3===g&&(e=c,d=b,c=b=0),f(a)):(f.x=function(a){return arguments.length?(h=a,f):h},f.y=function(a){return arguments.length?(i=a,f):i},f.extent=function(a){return arguments.length?(null==a?b=c=d=e=null:(b=+a[0][0],c=+a[0][1],d=+a[1][0],e=+a[1][1]),f):null==b?null:[[b,c],[d,e]]},f.size=function(a){return arguments.length?(null==a?b=c=d=e=null:(b=c=0,d=+a[0],e=+a[1]),f):null==b?null:[d-b,e-c]},f)},cg.interpolateRgb=od,cg.interpolateObject=pd,cg.interpolateNumber=qd,cg.interpolateString=rd;var ei=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,fi=new RegExp(ei.source,"g");cg.interpolate=sd,cg.interpolators=[function(a,b){var c=typeof b;return("string"===c?Yg.has(b.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(b)?od:rd:b instanceof ha?od:Array.isArray(b)?td:"object"===c&&isNaN(b)?pd:qd)(a,b)}],cg.interpolateArray=td;var gi=function(){return t},hi=cg.map({linear:gi,poly:Ad,quad:function(){return xd},cubic:function(){return yd},sin:function(){return Bd},exp:function(){return Cd},circle:function(){return Dd},elastic:Ed,back:Fd,bounce:function(){return Gd}}),ii=cg.map({in:t,out:vd,"in-out":wd,"out-in":function(a){return wd(vd(a))}});cg.ease=function(a){var b=a.indexOf("-"),c=b>=0?a.slice(0,b):a,d=b>=0?a.slice(b+1):"in";return c=hi.get(c)||gi,d=ii.get(d)||t,ud(d(c.apply(null,dg.call(arguments,1))))},cg.interpolateHcl=Hd,cg.interpolateHsl=Id,cg.interpolateLab=Jd,cg.interpolateRound=Kd,cg.transform=function(a){var b=fg.createElementNS(cg.ns.prefix.svg,"g");return(cg.transform=function(a){if(null!=a){b.setAttribute("transform",a);var c=b.transform.baseVal.consolidate()}return new Ld(c?c.matrix:ji)})(a)},Ld.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var ji={a:1,b:0,c:0,d:1,e:0,f:0};cg.interpolateTransform=Pd,cg.layout={},cg.layout.bundle=function(){return function(a){for(var b=[],c=-1,d=a.length;++c<d;)b.push(Sd(a[c]));return b}},cg.layout.chord=function(){function a(){var a,j,l,m,n,o={},p=[],q=cg.range(f),r=[];for(c=[],d=[],a=0,m=-1;++m<f;){for(j=0,n=-1;++n<f;)j+=e[m][n];p.push(j),r.push(cg.range(f)),a+=j}for(g&&q.sort(function(a,b){return g(p[a],p[b])}),h&&r.forEach(function(a,b){a.sort(function(a,c){return h(e[b][a],e[b][c])})}),a=(Fg-k*f)/a,j=0,m=-1;++m<f;){for(l=j,n=-1;++n<f;){var s=q[m],t=r[s][n],u=e[s][t],v=j,w=j+=u*a;o[s+"-"+t]={index:s,subindex:t,startAngle:v,endAngle:w,value:u}}d[s]={index:s,startAngle:l,endAngle:j,value:(j-l)/a},j+=k}for(m=-1;++m<f;)for(n=m-1;++n<f;){var x=o[m+"-"+n],y=o[n+"-"+m];(x.value||y.value)&&c.push(x.value<y.value?{source:y,target:x}:{source:x,target:y})}i&&b()}function b(){c.sort(function(a,b){return i((a.source.value+a.target.value)/2,(b.source.value+b.target.value)/2)})}var c,d,e,f,g,h,i,j={},k=0;return j.matrix=function(a){return arguments.length?(f=(e=a)&&e.length,c=d=null,j):e},j.padding=function(a){return arguments.length?(k=a,c=d=null,j):k},j.sortGroups=function(a){return arguments.length?(g=a,c=d=null,j):g},j.sortSubgroups=function(a){return arguments.length?(h=a,c=null,j):h},j.sortChords=function(a){return arguments.length?(i=a,c&&b(),j):i},j.chords=function(){return c||a(),c},j.groups=function(){return d||a(),d},j},cg.layout.force=function(){function a(a){return function(b,c,d,e){if(b.point!==a){var f=b.cx-a.x,g=b.cy-a.y,h=e-c,i=f*f+g*g;if(h*h/q<i){if(i<o){var j=b.charge/i;a.px-=f*j,a.py-=g*j}return!0}if(b.point&&i&&i<o){var j=b.pointCharge/i;a.px-=f*j,a.py-=g*j}}return!b.charge}}function b(a){a.px=cg.event.x,a.py=cg.event.y,h.resume()}var c,d,e,f,g,h={},i=cg.dispatch("start","tick","end"),j=[1,1],k=.9,l=ki,m=li,n=-30,o=mi,p=.1,q=.64,r=[],s=[];return h.tick=function(){if((d*=.99)<.005)return i.end({type:"end",alpha:d=0}),!0;var b,c,h,l,m,o,q,t,u,v=r.length,w=s.length;for(c=0;c<w;++c)h=s[c],l=h.source,m=h.target,t=m.x-l.x,u=m.y-l.y,(o=t*t+u*u)&&(o=d*f[c]*((o=Math.sqrt(o))-e[c])/o,t*=o,u*=o,m.x-=t*(q=l.weight/(m.weight+l.weight)),m.y-=u*q,l.x+=t*(q=1-q),l.y+=u*q);if((q=d*p)&&(t=j[0]/2,u=j[1]/2,c=-1,q))for(;++c<v;)h=r[c],h.x+=(t-h.x)*q,h.y+=(u-h.y)*q;if(n)for(Zd(b=cg.geom.quadtree(r),d,g),c=-1;++c<v;)(h=r[c]).fixed||b.visit(a(h));for(c=-1;++c<v;)h=r[c],h.fixed?(h.x=h.px,h.y=h.py):(h.x-=(h.px-(h.px=h.x))*k,h.y-=(h.py-(h.py=h.y))*k);i.tick({type:"tick",alpha:d})},h.nodes=function(a){return arguments.length?(r=a,h):r},h.links=function(a){return arguments.length?(s=a,h):s},h.size=function(a){return arguments.length?(j=a,h):j},h.linkDistance=function(a){return arguments.length?(l="function"==typeof a?a:+a,h):l},h.distance=h.linkDistance,h.linkStrength=function(a){return arguments.length?(m="function"==typeof a?a:+a,h):m},h.friction=function(a){return arguments.length?(k=+a,h):k},h.charge=function(a){return arguments.length?(n="function"==typeof a?a:+a,h):n},h.chargeDistance=function(a){return arguments.length?(o=a*a,h):Math.sqrt(o)},h.gravity=function(a){return arguments.length?(p=+a,h):p},h.theta=function(a){return arguments.length?(q=a*a,h):Math.sqrt(q)},h.alpha=function(a){return arguments.length?(a=+a,d?d=a>0?a:0:a>0&&(i.start({type:"start",alpha:d=a}),cg.timer(h.tick)),h):d},h.start=function(){function a(a,d){if(!c){for(c=new Array(i),h=0;h<i;++h)c[h]=[];for(h=0;h<k;++h){var e=s[h];c[e.source.index].push(e.target),c[e.target.index].push(e.source)}}for(var f,g=c[b],h=-1,j=g.length;++h<j;)if(!isNaN(f=g[h][a]))return f;return Math.random()*d}var b,c,d,i=r.length,k=s.length,o=j[0],p=j[1];for(b=0;b<i;++b)(d=r[b]).index=b,d.weight=0;for(b=0;b<k;++b)d=s[b],"number"==typeof d.source&&(d.source=r[d.source]),"number"==typeof d.target&&(d.target=r[d.target]),++d.source.weight,++d.target.weight;for(b=0;b<i;++b)d=r[b],isNaN(d.x)&&(d.x=a("x",o)),isNaN(d.y)&&(d.y=a("y",p)),isNaN(d.px)&&(d.px=d.x),isNaN(d.py)&&(d.py=d.y);if(e=[],"function"==typeof l)for(b=0;b<k;++b)e[b]=+l.call(this,s[b],b);else for(b=0;b<k;++b)e[b]=l;if(f=[],"function"==typeof m)for(b=0;b<k;++b)f[b]=+m.call(this,s[b],b);else for(b=0;b<k;++b)f[b]=m;if(g=[],"function"==typeof n)for(b=0;b<i;++b)g[b]=+n.call(this,r[b],b);else for(b=0;b<i;++b)g[b]=n;return h.resume()},h.resume=function(){return h.alpha(.1)},h.stop=function(){return h.alpha(0)},h.drag=function(){return c||(c=cg.behavior.drag().origin(t).on("dragstart.force",Vd).on("drag.force",b).on("dragend.force",Wd)),arguments.length?void this.on("mouseover.force",Xd).on("mouseout.force",Yd).call(c):c},cg.rebind(h,i,"on")};var ki=20,li=1,mi=1/0;cg.layout.hierarchy=function(){function a(e){var f,g=[e],h=[];for(e.depth=0;null!=(f=g.pop());)if(h.push(f),(j=c.call(a,f,f.depth))&&(i=j.length)){for(var i,j,k;--i>=0;)g.push(k=j[i]),k.parent=f,k.depth=f.depth+1;d&&(f.value=0),f.children=j}else d&&(f.value=+d.call(a,f,f.depth)||0),delete f.children;return ae(e,function(a){var c,e;b&&(c=a.children)&&c.sort(b),d&&(e=a.parent)&&(e.value+=a.value)}),h}var b=de,c=be,d=ce;return a.sort=function(c){return arguments.length?(b=c,a):b},a.children=function(b){return arguments.length?(c=b,a):c},a.value=function(b){return arguments.length?(d=b,a):d},a.revalue=function(b){return d&&(_d(b,function(a){a.children&&(a.value=0)}),ae(b,function(b){var c;b.children||(b.value=+d.call(a,b,b.depth)||0),
|
9
|
-
(c=b.parent)&&(c.value+=b.value)})),b},a},cg.layout.partition=function(){function a(b,c,d,e){var f=b.children;if(b.x=c,b.y=b.depth*e,b.dx=d,b.dy=e,f&&(g=f.length)){var g,h,i,j=-1;for(d=b.value?d/b.value:0;++j<g;)a(h=f[j],c,i=h.value*d,e),c+=i}}function b(a){var c=a.children,d=0;if(c&&(e=c.length))for(var e,f=-1;++f<e;)d=Math.max(d,b(c[f]));return 1+d}function c(c,f){var g=d.call(this,c,f);return a(g[0],0,e[0],e[1]/b(g[0])),g}var d=cg.layout.hierarchy(),e=[1,1];return c.size=function(a){return arguments.length?(e=a,c):e},$d(c,d)},cg.layout.pie=function(){function a(g){var h,i=g.length,j=g.map(function(c,d){return+b.call(a,c,d)}),k=+("function"==typeof d?d.apply(this,arguments):d),l=("function"==typeof e?e.apply(this,arguments):e)-k,m=Math.min(Math.abs(l)/i,+("function"==typeof f?f.apply(this,arguments):f)),n=m*(l<0?-1:1),o=(l-i*n)/cg.sum(j),p=cg.range(i),q=[];return null!=c&&p.sort(c===ni?function(a,b){return j[b]-j[a]}:function(a,b){return c(g[a],g[b])}),p.forEach(function(a){q[a]={data:g[a],value:h=j[a],startAngle:k,endAngle:k+=h*o+n,padAngle:m}}),q}var b=Number,c=ni,d=0,e=Fg,f=0;return a.value=function(c){return arguments.length?(b=c,a):b},a.sort=function(b){return arguments.length?(c=b,a):c},a.startAngle=function(b){return arguments.length?(d=b,a):d},a.endAngle=function(b){return arguments.length?(e=b,a):e},a.padAngle=function(b){return arguments.length?(f=b,a):f},a};var ni={};cg.layout.stack=function(){function a(h,i){if(!(m=h.length))return h;var j=h.map(function(c,d){return b.call(a,c,d)}),k=j.map(function(b){return b.map(function(b,c){return[f.call(a,b,c),g.call(a,b,c)]})}),l=c.call(a,k,i);j=cg.permute(j,l),k=cg.permute(k,l);var m,n,o,p,q=d.call(a,k,i),r=j[0].length;for(o=0;o<r;++o)for(e.call(a,j[0][o],p=q[o],k[0][o][1]),n=1;n<m;++n)e.call(a,j[n][o],p+=k[n-1][o][1],k[n][o][1]);return h}var b=t,c=ie,d=je,e=he,f=fe,g=ge;return a.values=function(c){return arguments.length?(b=c,a):b},a.order=function(b){return arguments.length?(c="function"==typeof b?b:oi.get(b)||ie,a):c},a.offset=function(b){return arguments.length?(d="function"==typeof b?b:pi.get(b)||je,a):d},a.x=function(b){return arguments.length?(f=b,a):f},a.y=function(b){return arguments.length?(g=b,a):g},a.out=function(b){return arguments.length?(e=b,a):e},a};var oi=cg.map({"inside-out":function(a){var b,c,d=a.length,e=a.map(ke),f=a.map(le),g=cg.range(d).sort(function(a,b){return e[a]-e[b]}),h=0,i=0,j=[],k=[];for(b=0;b<d;++b)c=g[b],h<i?(h+=f[c],j.push(c)):(i+=f[c],k.push(c));return k.reverse().concat(j)},reverse:function(a){return cg.range(a.length).reverse()},default:ie}),pi=cg.map({silhouette:function(a){var b,c,d,e=a.length,f=a[0].length,g=[],h=0,i=[];for(c=0;c<f;++c){for(b=0,d=0;b<e;b++)d+=a[b][c][1];d>h&&(h=d),g.push(d)}for(c=0;c<f;++c)i[c]=(h-g[c])/2;return i},wiggle:function(a){var b,c,d,e,f,g,h,i,j,k=a.length,l=a[0],m=l.length,n=[];for(n[0]=i=j=0,c=1;c<m;++c){for(b=0,e=0;b<k;++b)e+=a[b][c][1];for(b=0,f=0,h=l[c][0]-l[c-1][0];b<k;++b){for(d=0,g=(a[b][c][1]-a[b][c-1][1])/(2*h);d<b;++d)g+=(a[d][c][1]-a[d][c-1][1])/h;f+=g*a[b][c][1]}n[c]=i-=e?f/e*h:0,i<j&&(j=i)}for(c=0;c<m;++c)n[c]-=j;return n},expand:function(a){var b,c,d,e=a.length,f=a[0].length,g=1/e,h=[];for(c=0;c<f;++c){for(b=0,d=0;b<e;b++)d+=a[b][c][1];if(d)for(b=0;b<e;b++)a[b][c][1]/=d;else for(b=0;b<e;b++)a[b][c][1]=g}for(c=0;c<f;++c)h[c]=0;return h},zero:je});cg.layout.histogram=function(){function a(a,f){for(var g,h,i=[],j=a.map(c,this),k=d.call(this,j,f),l=e.call(this,k,j,f),f=-1,m=j.length,n=l.length-1,o=b?1:1/m;++f<n;)g=i[f]=[],g.dx=l[f+1]-(g.x=l[f]),g.y=0;if(n>0)for(f=-1;++f<m;)h=j[f],h>=k[0]&&h<=k[1]&&(g=i[cg.bisect(l,h,1,n)-1],g.y+=o,g.push(a[f]));return i}var b=!0,c=Number,d=pe,e=ne;return a.value=function(b){return arguments.length?(c=b,a):c},a.range=function(b){return arguments.length?(d=Ba(b),a):d},a.bins=function(b){return arguments.length?(e="number"==typeof b?function(a){return oe(a,b)}:Ba(b),a):e},a.frequency=function(c){return arguments.length?(b=!!c,a):b},a},cg.layout.pack=function(){function a(a,f){var g=c.call(this,a,f),h=g[0],i=e[0],j=e[1],k=null==b?Math.sqrt:"function"==typeof b?b:function(){return b};if(h.x=h.y=0,ae(h,function(a){a.r=+k(a.value)}),ae(h,ue),d){var l=d*(b?1:Math.max(2*h.r/i,2*h.r/j))/2;ae(h,function(a){a.r+=l}),ae(h,ue),ae(h,function(a){a.r-=l})}return xe(h,i/2,j/2,b?1:1/Math.max(2*h.r/i,2*h.r/j)),g}var b,c=cg.layout.hierarchy().sort(qe),d=0,e=[1,1];return a.size=function(b){return arguments.length?(e=b,a):e},a.radius=function(c){return arguments.length?(b=null==c||"function"==typeof c?c:+c,a):b},a.padding=function(b){return arguments.length?(d=+b,a):d},$d(a,c)},cg.layout.tree=function(){function a(a,e){var k=g.call(this,a,e),l=k[0],m=b(l);if(ae(m,c),m.parent.m=-m.z,_d(m,d),j)_d(l,f);else{var n=l,o=l,p=l;_d(l,function(a){a.x<n.x&&(n=a),a.x>o.x&&(o=a),a.depth>p.depth&&(p=a)});var q=h(n,o)/2-n.x,r=i[0]/(o.x+h(o,n)/2+q),s=i[1]/(p.depth||1);_d(l,function(a){a.x=(a.x+q)*r,a.y=a.depth*s})}return k}function b(a){for(var b,c={A:null,children:[a]},d=[c];null!=(b=d.pop());)for(var e,f=b.children,g=0,h=f.length;g<h;++g)d.push((f[g]=e={_:f[g],parent:b,children:(e=f[g].children)&&e.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:g}).a=e);return c.children[0]}function c(a){var b=a.children,c=a.parent.children,d=a.i?c[a.i-1]:null;if(b.length){De(a);var f=(b[0].z+b[b.length-1].z)/2;d?(a.z=d.z+h(a._,d._),a.m=a.z-f):a.z=f}else d&&(a.z=d.z+h(a._,d._));a.parent.A=e(a,d,a.parent.A||c[0])}function d(a){a._.x=a.z+a.parent.m,a.m+=a.parent.m}function e(a,b,c){if(b){for(var d,e=a,f=a,g=b,i=e.parent.children[0],j=e.m,k=f.m,l=g.m,m=i.m;g=Be(g),e=Ae(e),g&&e;)i=Ae(i),f=Be(f),f.a=a,d=g.z+l-e.z-j+h(g._,e._),d>0&&(Ce(Ee(g,a,c),a,d),j+=d,k+=d),l+=g.m,j+=e.m,m+=i.m,k+=f.m;g&&!Be(f)&&(f.t=g,f.m+=l-k),e&&!Ae(i)&&(i.t=e,i.m+=j-m,c=a)}return c}function f(a){a.x*=i[0],a.y=a.depth*i[1]}var g=cg.layout.hierarchy().sort(null).value(null),h=ze,i=[1,1],j=null;return a.separation=function(b){return arguments.length?(h=b,a):h},a.size=function(b){return arguments.length?(j=null==(i=b)?f:null,a):j?null:i},a.nodeSize=function(b){return arguments.length?(j=null==(i=b)?null:f,a):j?i:null},$d(a,g)},cg.layout.cluster=function(){function a(a,f){var g,h=b.call(this,a,f),i=h[0],j=0;ae(i,function(a){var b=a.children;b&&b.length?(a.x=Ge(b),a.y=Fe(b)):(a.x=g?j+=c(a,g):0,a.y=0,g=a)});var k=He(i),l=Ie(i),m=k.x-c(k,l)/2,n=l.x+c(l,k)/2;return ae(i,e?function(a){a.x=(a.x-i.x)*d[0],a.y=(i.y-a.y)*d[1]}:function(a){a.x=(a.x-m)/(n-m)*d[0],a.y=(1-(i.y?a.y/i.y:1))*d[1]}),h}var b=cg.layout.hierarchy().sort(null).value(null),c=ze,d=[1,1],e=!1;return a.separation=function(b){return arguments.length?(c=b,a):c},a.size=function(b){return arguments.length?(e=null==(d=b),a):e?null:d},a.nodeSize=function(b){return arguments.length?(e=null!=(d=b),a):e?d:null},$d(a,b)},cg.layout.treemap=function(){function a(a,b){for(var c,d,e=-1,f=a.length;++e<f;)d=(c=a[e]).value*(b<0?0:b),c.area=isNaN(d)||d<=0?0:d}function b(c){var f=c.children;if(f&&f.length){var g,h,i,j=l(c),k=[],m=f.slice(),o=1/0,p="slice"===n?j.dx:"dice"===n?j.dy:"slice-dice"===n?1&c.depth?j.dy:j.dx:Math.min(j.dx,j.dy);for(a(m,j.dx*j.dy/c.value),k.area=0;(i=m.length)>0;)k.push(g=m[i-1]),k.area+=g.area,"squarify"!==n||(h=d(k,p))<=o?(m.pop(),o=h):(k.area-=k.pop().area,e(k,p,j,!1),p=Math.min(j.dx,j.dy),k.length=k.area=0,o=1/0);k.length&&(e(k,p,j,!0),k.length=k.area=0),f.forEach(b)}}function c(b){var d=b.children;if(d&&d.length){var f,g=l(b),h=d.slice(),i=[];for(a(h,g.dx*g.dy/b.value),i.area=0;f=h.pop();)i.push(f),i.area+=f.area,null!=f.z&&(e(i,f.z?g.dx:g.dy,g,!h.length),i.length=i.area=0);d.forEach(c)}}function d(a,b){for(var c,d=a.area,e=0,f=1/0,g=-1,h=a.length;++g<h;)(c=a[g].area)&&(c<f&&(f=c),c>e&&(e=c));return d*=d,b*=b,d?Math.max(b*e*o/d,d/(b*f*o)):1/0}function e(a,b,c,d){var e,f=-1,g=a.length,h=c.x,j=c.y,k=b?i(a.area/b):0;if(b==c.dx){for((d||k>c.dy)&&(k=c.dy);++f<g;)e=a[f],e.x=h,e.y=j,e.dy=k,h+=e.dx=Math.min(c.x+c.dx-h,k?i(e.area/k):0);e.z=!0,e.dx+=c.x+c.dx-h,c.y+=k,c.dy-=k}else{for((d||k>c.dx)&&(k=c.dx);++f<g;)e=a[f],e.x=h,e.y=j,e.dx=k,j+=e.dy=Math.min(c.y+c.dy-j,k?i(e.area/k):0);e.z=!1,e.dy+=c.y+c.dy-j,c.x+=k,c.dx-=k}}function f(d){var e=g||h(d),f=e[0];return f.x=0,f.y=0,f.dx=j[0],f.dy=j[1],g&&h.revalue(f),a([f],f.dx*f.dy/f.value),(g?c:b)(f),m&&(g=e),e}var g,h=cg.layout.hierarchy(),i=Math.round,j=[1,1],k=null,l=Je,m=!1,n="squarify",o=.5*(1+Math.sqrt(5));return f.size=function(a){return arguments.length?(j=a,f):j},f.padding=function(a){function b(b){var c=a.call(f,b,b.depth);return null==c?Je(b):Ke(b,"number"==typeof c?[c,c,c,c]:c)}function c(b){return Ke(b,a)}if(!arguments.length)return k;var d;return l=null==(k=a)?Je:"function"==(d=typeof a)?b:"number"===d?(a=[a,a,a,a],c):c,f},f.round=function(a){return arguments.length?(i=a?Math.round:Number,f):i!=Number},f.sticky=function(a){return arguments.length?(m=a,g=null,f):m},f.ratio=function(a){return arguments.length?(o=a,f):o},f.mode=function(a){return arguments.length?(n=a+"",f):n},$d(f,h)},cg.random={normal:function(a,b){var c=arguments.length;return c<2&&(b=1),c<1&&(a=0),function(){var c,d,e;do c=2*Math.random()-1,d=2*Math.random()-1,e=c*c+d*d;while(!e||e>1);return a+b*c*Math.sqrt(-2*Math.log(e)/e)}},logNormal:function(){var a=cg.random.normal.apply(cg,arguments);return function(){return Math.exp(a())}},bates:function(a){var b=cg.random.irwinHall(a);return function(){return b()/a}},irwinHall:function(a){return function(){for(var b=0,c=0;c<a;c++)b+=Math.random();return b}}},cg.scale={};var qi={floor:t,ceil:t};cg.scale.linear=function(){return Re([0,1],[0,1],sd,!1)};var ri={s:1,g:1,p:1,r:1,e:1};cg.scale.log=function(){return Ze(cg.scale.linear().domain([0,1]),10,!0,[1,10])};var si=cg.format(".0e"),ti={floor:function(a){return-Math.ceil(-a)},ceil:function(a){return-Math.floor(-a)}};cg.scale.pow=function(){return $e(cg.scale.linear(),1,[0,1])},cg.scale.sqrt=function(){return cg.scale.pow().exponent(.5)},cg.scale.ordinal=function(){return af([],{t:"range",a:[[]]})},cg.scale.category10=function(){return cg.scale.ordinal().range(ui)},cg.scale.category20=function(){return cg.scale.ordinal().range(vi)},cg.scale.category20b=function(){return cg.scale.ordinal().range(wi)},cg.scale.category20c=function(){return cg.scale.ordinal().range(xi)};var ui=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(ua),vi=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(ua),wi=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(ua),xi=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(ua);cg.scale.quantile=function(){return bf([],[])},cg.scale.quantize=function(){return cf(0,1,[0,1])},cg.scale.threshold=function(){return df([.5],[0,1])},cg.scale.identity=function(){return ef([0,1])},cg.svg={},cg.svg.arc=function(){function a(){var a=Math.max(0,+c.apply(this,arguments)),j=Math.max(0,+d.apply(this,arguments)),k=g.apply(this,arguments)-Hg,l=h.apply(this,arguments)-Hg,m=Math.abs(l-k),n=k>l?0:1;if(j<a&&(o=j,j=a,a=o),m>=Gg)return b(j,n)+(a?b(a,1-n):"")+"Z";var o,p,q,r,s,t,u,v,w,x,y,z,A=0,B=0,C=[];if((r=(+i.apply(this,arguments)||0)/2)&&(q=f===yi?Math.sqrt(a*a+j*j):+f.apply(this,arguments),n||(B*=-1),j&&(B=ca(q/j*Math.sin(r))),a&&(A=ca(q/a*Math.sin(r)))),j){s=j*Math.cos(k+B),t=j*Math.sin(k+B),u=j*Math.cos(l-B),v=j*Math.sin(l-B);var D=Math.abs(l-k-2*B)<=Eg?0:1;if(B&&mf(s,t,u,v)===n^D){var E=(k+l)/2;s=j*Math.cos(E),t=j*Math.sin(E),u=v=null}}else s=t=0;if(a){w=a*Math.cos(l-A),x=a*Math.sin(l-A),y=a*Math.cos(k+A),z=a*Math.sin(k+A);var F=Math.abs(k-l+2*A)<=Eg?0:1;if(A&&mf(w,x,y,z)===1-n^F){var G=(k+l)/2;w=a*Math.cos(G),x=a*Math.sin(G),y=z=null}}else w=x=0;if((o=Math.min(Math.abs(j-a)/2,+e.apply(this,arguments)))>.001){p=a<j^n?0:1;var H=null==y?[w,x]:null==u?[s,t]:Hc([s,t],[y,z],[u,v],[w,x]),I=s-H[0],J=t-H[1],K=u-H[0],L=v-H[1],M=1/Math.sin(Math.acos((I*K+J*L)/(Math.sqrt(I*I+J*J)*Math.sqrt(K*K+L*L)))/2),N=Math.sqrt(H[0]*H[0]+H[1]*H[1]);if(null!=u){var O=Math.min(o,(j-N)/(M+1)),P=nf(null==y?[w,x]:[y,z],[s,t],j,O,n),Q=nf([u,v],[w,x],j,O,n);o===O?C.push("M",P[0],"A",O,",",O," 0 0,",p," ",P[1],"A",j,",",j," 0 ",1-n^mf(P[1][0],P[1][1],Q[1][0],Q[1][1]),",",n," ",Q[1],"A",O,",",O," 0 0,",p," ",Q[0]):C.push("M",P[0],"A",O,",",O," 0 1,",p," ",Q[0])}else C.push("M",s,",",t);if(null!=y){var R=Math.min(o,(a-N)/(M-1)),S=nf([s,t],[y,z],a,-R,n),T=nf([w,x],null==u?[s,t]:[u,v],a,-R,n);o===R?C.push("L",T[0],"A",R,",",R," 0 0,",p," ",T[1],"A",a,",",a," 0 ",n^mf(T[1][0],T[1][1],S[1][0],S[1][1]),",",1-n," ",S[1],"A",R,",",R," 0 0,",p," ",S[0]):C.push("L",T[0],"A",R,",",R," 0 0,",p," ",S[0])}else C.push("L",w,",",x)}else C.push("M",s,",",t),null!=u&&C.push("A",j,",",j," 0 ",D,",",n," ",u,",",v),C.push("L",w,",",x),null!=y&&C.push("A",a,",",a," 0 ",F,",",1-n," ",y,",",z);return C.push("Z"),C.join("")}function b(a,b){return"M0,"+a+"A"+a+","+a+" 0 1,"+b+" 0,"+-a+"A"+a+","+a+" 0 1,"+b+" 0,"+a}var c=gf,d=hf,e=ff,f=yi,g=jf,h=kf,i=lf;return a.innerRadius=function(b){return arguments.length?(c=Ba(b),a):c},a.outerRadius=function(b){return arguments.length?(d=Ba(b),a):d},a.cornerRadius=function(b){return arguments.length?(e=Ba(b),a):e},a.padRadius=function(b){return arguments.length?(f=b==yi?yi:Ba(b),a):f},a.startAngle=function(b){return arguments.length?(g=Ba(b),a):g},a.endAngle=function(b){return arguments.length?(h=Ba(b),a):h},a.padAngle=function(b){return arguments.length?(i=Ba(b),a):i},a.centroid=function(){var a=(+c.apply(this,arguments)+ +d.apply(this,arguments))/2,b=(+g.apply(this,arguments)+ +h.apply(this,arguments))/2-Hg;return[Math.cos(b)*a,Math.sin(b)*a]},a};var yi="auto";cg.svg.line=function(){return of(t)};var zi=cg.map({linear:pf,"linear-closed":qf,step:rf,"step-before":sf,"step-after":tf,basis:zf,"basis-open":Af,"basis-closed":Bf,bundle:Cf,cardinal:wf,"cardinal-open":uf,"cardinal-closed":vf,monotone:If});zi.forEach(function(a,b){b.key=a,b.closed=/-closed$/.test(a)});var Ai=[0,2/3,1/3,0],Bi=[0,1/3,2/3,0],Ci=[0,1/6,2/3,1/6];cg.svg.line.radial=function(){var a=of(Jf);return a.radius=a.x,delete a.x,a.angle=a.y,delete a.y,a},sf.reverse=tf,tf.reverse=sf,cg.svg.area=function(){return Kf(t)},cg.svg.area.radial=function(){var a=Kf(Jf);return a.radius=a.x,delete a.x,a.innerRadius=a.x0,delete a.x0,a.outerRadius=a.x1,delete a.x1,a.angle=a.y,delete a.y,a.startAngle=a.y0,delete a.y0,a.endAngle=a.y1,delete a.y1,a},cg.svg.chord=function(){function a(a,h){var i=b(this,f,a,h),j=b(this,g,a,h);return"M"+i.p0+d(i.r,i.p1,i.a1-i.a0)+(c(i,j)?e(i.r,i.p1,i.r,i.p0):e(i.r,i.p1,j.r,j.p0)+d(j.r,j.p1,j.a1-j.a0)+e(j.r,j.p1,i.r,i.p0))+"Z"}function b(a,b,c,d){var e=b.call(a,c,d),f=h.call(a,e,d),g=i.call(a,e,d)-Hg,k=j.call(a,e,d)-Hg;return{r:f,a0:g,a1:k,p0:[f*Math.cos(g),f*Math.sin(g)],p1:[f*Math.cos(k),f*Math.sin(k)]}}function c(a,b){return a.a0==b.a0&&a.a1==b.a1}function d(a,b,c){return"A"+a+","+a+" 0 "+ +(c>Eg)+",1 "+b}function e(a,b,c,d){return"Q 0,0 "+d}var f=sc,g=tc,h=Lf,i=jf,j=kf;return a.radius=function(b){return arguments.length?(h=Ba(b),a):h},a.source=function(b){return arguments.length?(f=Ba(b),a):f},a.target=function(b){return arguments.length?(g=Ba(b),a):g},a.startAngle=function(b){return arguments.length?(i=Ba(b),a):i},a.endAngle=function(b){return arguments.length?(j=Ba(b),a):j},a},cg.svg.diagonal=function(){function a(a,e){var f=b.call(this,a,e),g=c.call(this,a,e),h=(f.y+g.y)/2,i=[f,{x:f.x,y:h},{x:g.x,y:h},g];return i=i.map(d),"M"+i[0]+"C"+i[1]+" "+i[2]+" "+i[3]}var b=sc,c=tc,d=Mf;return a.source=function(c){return arguments.length?(b=Ba(c),a):b},a.target=function(b){return arguments.length?(c=Ba(b),a):c},a.projection=function(b){return arguments.length?(d=b,a):d},a},cg.svg.diagonal.radial=function(){var a=cg.svg.diagonal(),b=Mf,c=a.projection;return a.projection=function(a){return arguments.length?c(Nf(b=a)):b},a},cg.svg.symbol=function(){function a(a,d){return(Di.get(b.call(this,a,d))||Qf)(c.call(this,a,d))}var b=Pf,c=Of;return a.type=function(c){return arguments.length?(b=Ba(c),a):b},a.size=function(b){return arguments.length?(c=Ba(b),a):c},a};var Di=cg.map({circle:Qf,cross:function(a){var b=Math.sqrt(a/5)/2;return"M"+-3*b+","+-b+"H"+-b+"V"+-3*b+"H"+b+"V"+-b+"H"+3*b+"V"+b+"H"+b+"V"+3*b+"H"+-b+"V"+b+"H"+-3*b+"Z"},diamond:function(a){var b=Math.sqrt(a/(2*Fi)),c=b*Fi;return"M0,"+-b+"L"+c+",0 0,"+b+" "+-c+",0Z"},square:function(a){var b=Math.sqrt(a)/2;return"M"+-b+","+-b+"L"+b+","+-b+" "+b+","+b+" "+-b+","+b+"Z"},"triangle-down":function(a){var b=Math.sqrt(a/Ei),c=b*Ei/2;return"M0,"+c+"L"+b+","+-c+" "+-b+","+-c+"Z"},"triangle-up":function(a){var b=Math.sqrt(a/Ei),c=b*Ei/2;return"M0,"+-c+"L"+b+","+c+" "+-b+","+c+"Z"}});cg.svg.symbolTypes=Di.keys();var Ei=Math.sqrt(3),Fi=Math.tan(30*Ig);vg.transition=function(a){for(var b,c,d=Gi||++Ki,e=Vf(a),f=[],g=Hi||{time:Date.now(),ease:zd,delay:0,duration:250},h=-1,i=this.length;++h<i;){f.push(b=[]);for(var j=this[h],k=-1,l=j.length;++k<l;)(c=j[k])&&Wf(c,k,e,d,g),b.push(c)}return Sf(f,e,d)},vg.interrupt=function(a){return this.each(null==a?Ii:Rf(Vf(a)))};var Gi,Hi,Ii=Rf(Vf()),Ji=[],Ki=0;Ji.call=vg.call,Ji.empty=vg.empty,Ji.node=vg.node,Ji.size=vg.size,cg.transition=function(a,b){return a&&a.transition?Gi?a.transition(b):a:cg.selection().transition(a)},cg.transition.prototype=Ji,Ji.select=function(a){var b,c,d,e=this.id,f=this.namespace,g=[];a=D(a);for(var h=-1,i=this.length;++h<i;){g.push(b=[]);for(var j=this[h],k=-1,l=j.length;++k<l;)(d=j[k])&&(c=a.call(d,d.__data__,k,h))?("__data__"in d&&(c.__data__=d.__data__),Wf(c,k,f,e,d[f][e]),b.push(c)):b.push(null)}return Sf(g,f,e)},Ji.selectAll=function(a){var b,c,d,e,f,g=this.id,h=this.namespace,i=[];a=E(a);for(var j=-1,k=this.length;++j<k;)for(var l=this[j],m=-1,n=l.length;++m<n;)if(d=l[m]){f=d[h][g],c=a.call(d,d.__data__,m,j),i.push(b=[]);for(var o=-1,p=c.length;++o<p;)(e=c[o])&&Wf(e,o,h,g,f),b.push(e)}return Sf(i,h,g)},Ji.filter=function(a){var b,c,d,e=[];"function"!=typeof a&&(a=Q(a));for(var f=0,g=this.length;f<g;f++){e.push(b=[]);for(var c=this[f],h=0,i=c.length;h<i;h++)(d=c[h])&&a.call(d,d.__data__,h,f)&&b.push(d)}return Sf(e,this.namespace,this.id)},Ji.tween=function(a,b){var c=this.id,d=this.namespace;return arguments.length<2?this.node()[d][c].tween.get(a):S(this,null==b?function(b){b[d][c].tween.remove(a)}:function(e){e[d][c].tween.set(a,b)})},Ji.attr=function(a,b){function c(){this.removeAttribute(h)}function d(){this.removeAttributeNS(h.space,h.local)}function e(a){return null==a?c:(a+="",function(){var b,c=this.getAttribute(h);return c!==a&&(b=g(c,a),function(a){this.setAttribute(h,b(a))})})}function f(a){return null==a?d:(a+="",function(){var b,c=this.getAttributeNS(h.space,h.local);return c!==a&&(b=g(c,a),function(a){this.setAttributeNS(h.space,h.local,b(a))})})}if(arguments.length<2){for(b in a)this.attr(b,a[b]);return this}var g="transform"==a?Pd:sd,h=cg.ns.qualify(a);return Tf(this,"attr."+a,b,h.local?f:e)},Ji.attrTween=function(a,b){function c(a,c){var d=b.call(this,a,c,this.getAttribute(e));return d&&function(a){this.setAttribute(e,d(a))}}function d(a,c){var d=b.call(this,a,c,this.getAttributeNS(e.space,e.local));return d&&function(a){this.setAttributeNS(e.space,e.local,d(a))}}var e=cg.ns.qualify(a);return this.tween("attr."+a,e.local?d:c)},Ji.style=function(a,c,d){function e(){this.style.removeProperty(a)}function f(c){return null==c?e:(c+="",function(){var e,f=b(this).getComputedStyle(this,null).getPropertyValue(a);return f!==c&&(e=sd(f,c),function(b){this.style.setProperty(a,e(b),d)})})}var g=arguments.length;if(g<3){if("string"!=typeof a){g<2&&(c="");for(d in a)this.style(d,a[d],c);return this}d=""}return Tf(this,"style."+a,c,f)},Ji.styleTween=function(a,c,d){function e(e,f){var g=c.call(this,e,f,b(this).getComputedStyle(this,null).getPropertyValue(a));return g&&function(b){this.style.setProperty(a,g(b),d)}}return arguments.length<3&&(d=""),this.tween("style."+a,e)},Ji.text=function(a){return Tf(this,"text",a,Uf)},Ji.remove=function(){var a=this.namespace;return this.each("end.transition",function(){var b;this[a].count<2&&(b=this.parentNode)&&b.removeChild(this)})},Ji.ease=function(a){var b=this.id,c=this.namespace;return arguments.length<1?this.node()[c][b].ease:("function"!=typeof a&&(a=cg.ease.apply(cg,arguments)),S(this,function(d){d[c][b].ease=a}))},Ji.delay=function(a){var b=this.id,c=this.namespace;return arguments.length<1?this.node()[c][b].delay:S(this,"function"==typeof a?function(d,e,f){d[c][b].delay=+a.call(d,d.__data__,e,f)}:(a=+a,function(d){d[c][b].delay=a}))},Ji.duration=function(a){var b=this.id,c=this.namespace;return arguments.length<1?this.node()[c][b].duration:S(this,"function"==typeof a?function(d,e,f){d[c][b].duration=Math.max(1,a.call(d,d.__data__,e,f))}:(a=Math.max(1,a),function(d){d[c][b].duration=a}))},Ji.each=function(a,b){var c=this.id,d=this.namespace;if(arguments.length<2){var e=Hi,f=Gi;try{Gi=c,S(this,function(b,e,f){Hi=b[d][c],a.call(b,b.__data__,e,f)})}finally{Hi=e,Gi=f}}else S(this,function(e){var f=e[d][c];(f.event||(f.event=cg.dispatch("start","end","interrupt"))).on(a,b)});return this},Ji.transition=function(){for(var a,b,c,d,e=this.id,f=++Ki,g=this.namespace,h=[],i=0,j=this.length;i<j;i++){h.push(a=[]);for(var b=this[i],k=0,l=b.length;k<l;k++)(c=b[k])&&(d=c[g][e],Wf(c,k,g,f,{time:d.time,ease:d.ease,delay:d.delay+d.duration,duration:d.duration})),a.push(c)}return Sf(h,g,f)},cg.svg.axis=function(){function a(a){a.each(function(){var a,j=cg.select(this),k=this.__chart__||c,l=this.__chart__=c.copy(),m=null==i?l.ticks?l.ticks.apply(l,h):l.domain():i,n=null==b?l.tickFormat?l.tickFormat.apply(l,h):t:b,o=j.selectAll(".tick").data(m,l),p=o.enter().insert("g",".domain").attr("class","tick").style("opacity",Cg),q=cg.transition(o.exit()).style("opacity",Cg).remove(),r=cg.transition(o.order()).style("opacity",1),s=Math.max(e,0)+g,u=Me(l),v=j.selectAll(".domain").data([0]),w=(v.enter().append("path").attr("class","domain"),cg.transition(v));p.append("line"),p.append("text");var x,y,z,A,B=p.select("line"),C=r.select("line"),D=o.select("text").text(n),E=p.select("text"),F=r.select("text"),G="top"===d||"left"===d?-1:1;if("bottom"===d||"top"===d?(a=Xf,x="x",z="y",y="x2",A="y2",D.attr("dy",G<0?"0em":".71em").style("text-anchor","middle"),w.attr("d","M"+u[0]+","+G*f+"V0H"+u[1]+"V"+G*f)):(a=Yf,x="y",z="x",y="y2",A="x2",D.attr("dy",".32em").style("text-anchor",G<0?"end":"start"),w.attr("d","M"+G*f+","+u[0]+"H0V"+u[1]+"H"+G*f)),B.attr(A,G*e),E.attr(z,G*s),C.attr(y,0).attr(A,G*e),F.attr(x,0).attr(z,G*s),l.rangeBand){var H=l,I=H.rangeBand()/2;k=l=function(a){return H(a)+I}}else k.rangeBand?k=l:q.call(a,l,k);p.call(a,k,l),r.call(a,l,l)})}var b,c=cg.scale.linear(),d=Li,e=6,f=6,g=3,h=[10],i=null;return a.scale=function(b){return arguments.length?(c=b,a):c},a.orient=function(b){return arguments.length?(d=b in Mi?b+"":Li,a):d},a.ticks=function(){return arguments.length?(h=arguments,a):h},a.tickValues=function(b){return arguments.length?(i=b,a):i},a.tickFormat=function(c){return arguments.length?(b=c,a):b},a.tickSize=function(b){var c=arguments.length;return c?(e=+b,f=+arguments[c-1],a):e},a.innerTickSize=function(b){return arguments.length?(e=+b,a):e},a.outerTickSize=function(b){return arguments.length?(f=+b,a):f},a.tickPadding=function(b){return arguments.length?(g=+b,a):g},a.tickSubdivide=function(){return arguments.length&&a},a};var Li="bottom",Mi={top:1,right:1,bottom:1,left:1};cg.svg.brush=function(){function a(b){b.each(function(){var b=cg.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",f).on("touchstart.brush",f),g=b.selectAll(".background").data([0]);g.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),b.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var h=b.selectAll(".resize").data(p,t);h.exit().remove(),h.enter().append("g").attr("class",function(a){return"resize "+a}).style("cursor",function(a){return Ni[a]}).append("rect").attr("x",function(a){return/[ew]$/.test(a)?-3:null}).attr("y",function(a){return/^[ns]/.test(a)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),h.style("display",a.empty()?"none":null);var i,l=cg.transition(b),m=cg.transition(g);j&&(i=Me(j),m.attr("x",i[0]).attr("width",i[1]-i[0]),d(l)),k&&(i=Me(k),m.attr("y",i[0]).attr("height",i[1]-i[0]),e(l)),c(l)})}function c(a){a.selectAll(".resize").attr("transform",function(a){return"translate("+l[+/e$/.test(a)]+","+m[+/^s/.test(a)]+")"})}function d(a){a.select(".extent").attr("x",l[0]),a.selectAll(".extent,.n>rect,.s>rect").attr("width",l[1]-l[0])}function e(a){a.select(".extent").attr("y",m[0]),a.selectAll(".extent,.e>rect,.w>rect").attr("height",m[1]-m[0])}function f(){function f(){32==cg.event.keyCode&&(D||(t=null,F[0]-=l[1],F[1]-=m[1],D=2),z())}function p(){32==cg.event.keyCode&&2==D&&(F[0]+=l[1],F[1]+=m[1],D=0,z())}function q(){var a=cg.mouse(v),b=!1;u&&(a[0]+=u[0],a[1]+=u[1]),D||(cg.event.altKey?(t||(t=[(l[0]+l[1])/2,(m[0]+m[1])/2]),F[0]=l[+(a[0]<t[0])],F[1]=m[+(a[1]<t[1])]):t=null),B&&r(a,j,0)&&(d(y),b=!0),C&&r(a,k,1)&&(e(y),b=!0),b&&(c(y),x({type:"brush",mode:D?"move":"resize"}))}function r(a,b,c){var d,e,f=Me(b),i=f[0],j=f[1],k=F[c],p=c?m:l,q=p[1]-p[0];if(D&&(i-=k,j-=q+k),d=(c?o:n)?Math.max(i,Math.min(j,a[c])):a[c],D?e=(d+=k)+q:(t&&(k=Math.max(i,Math.min(j,2*t[c]-d))),k<d?(e=d,d=k):e=k),p[0]!=d||p[1]!=e)return c?h=null:g=null,p[0]=d,p[1]=e,!0}function s(){q(),y.style("pointer-events","all").selectAll(".resize").style("display",a.empty()?"none":null),cg.select("body").style("cursor",null),G.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),E(),x({type:"brushend"})}var t,u,v=this,w=cg.select(cg.event.target),x=i.of(v,arguments),y=cg.select(v),A=w.datum(),B=!/^(n|s)$/.test(A)&&j,C=!/^(e|w)$/.test(A)&&k,D=w.classed("extent"),E=Y(v),F=cg.mouse(v),G=cg.select(b(v)).on("keydown.brush",f).on("keyup.brush",p);if(cg.event.changedTouches?G.on("touchmove.brush",q).on("touchend.brush",s):G.on("mousemove.brush",q).on("mouseup.brush",s),y.interrupt().selectAll("*").interrupt(),D)F[0]=l[0]-F[0],F[1]=m[0]-F[1];else if(A){var H=+/w$/.test(A),I=+/^n/.test(A);u=[l[1-H]-F[0],m[1-I]-F[1]],F[0]=l[H],F[1]=m[I]}else cg.event.altKey&&(t=F.slice());y.style("pointer-events","none").selectAll(".resize").style("display",null),cg.select("body").style("cursor",w.style("cursor")),x({type:"brushstart"}),q()}var g,h,i=B(a,"brushstart","brush","brushend"),j=null,k=null,l=[0,0],m=[0,0],n=!0,o=!0,p=Oi[0];return a.event=function(a){a.each(function(){var a=i.of(this,arguments),b={x:l,y:m,i:g,j:h},c=this.__chart__||b;this.__chart__=b,Gi?cg.select(this).transition().each("start.brush",function(){g=c.i,h=c.j,l=c.x,m=c.y,a({type:"brushstart"})}).tween("brush:brush",function(){var c=td(l,b.x),d=td(m,b.y);return g=h=null,function(e){l=b.x=c(e),m=b.y=d(e),a({type:"brush",mode:"resize"})}}).each("end.brush",function(){g=b.i,h=b.j,a({type:"brush",mode:"resize"}),a({type:"brushend"})}):(a({type:"brushstart"}),a({type:"brush",mode:"resize"}),a({type:"brushend"}))})},a.x=function(b){return arguments.length?(j=b,p=Oi[!j<<1|!k],a):j},a.y=function(b){return arguments.length?(k=b,p=Oi[!j<<1|!k],a):k},a.clamp=function(b){return arguments.length?(j&&k?(n=!!b[0],o=!!b[1]):j?n=!!b:k&&(o=!!b),a):j&&k?[n,o]:j?n:k?o:null},a.extent=function(b){var c,d,e,f,i;return arguments.length?(j&&(c=b[0],d=b[1],k&&(c=c[0],d=d[0]),g=[c,d],j.invert&&(c=j(c),d=j(d)),d<c&&(i=c,c=d,d=i),c==l[0]&&d==l[1]||(l=[c,d])),k&&(e=b[0],f=b[1],j&&(e=e[1],f=f[1]),h=[e,f],k.invert&&(e=k(e),f=k(f)),f<e&&(i=e,e=f,f=i),e==m[0]&&f==m[1]||(m=[e,f])),a):(j&&(g?(c=g[0],d=g[1]):(c=l[0],d=l[1],j.invert&&(c=j.invert(c),d=j.invert(d)),d<c&&(i=c,c=d,d=i))),k&&(h?(e=h[0],f=h[1]):(e=m[0],f=m[1],k.invert&&(e=k.invert(e),f=k.invert(f)),f<e&&(i=e,e=f,f=i))),j&&k?[[c,e],[d,f]]:j?[c,d]:k&&[e,f])},a.clear=function(){return a.empty()||(l=[0,0],m=[0,0],g=h=null),a},a.empty=function(){return!!j&&l[0]==l[1]||!!k&&m[0]==m[1]},cg.rebind(a,i,"on")};var Ni={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Oi=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Pi=gh.format=mh.timeFormat,Qi=Pi.utc,Ri=Qi("%Y-%m-%dT%H:%M:%S.%LZ");Pi.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Zf:Ri,Zf.parse=function(a){var b=new Date(a);return isNaN(b)?null:b},Zf.toString=Ri.toString,gh.second=Oa(function(a){return new hh(1e3*Math.floor(a/1e3))},function(a,b){a.setTime(a.getTime()+1e3*Math.floor(b))},function(a){return a.getSeconds()}),gh.seconds=gh.second.range,gh.seconds.utc=gh.second.utc.range,gh.minute=Oa(function(a){return new hh(6e4*Math.floor(a/6e4))},function(a,b){a.setTime(a.getTime()+6e4*Math.floor(b))},function(a){return a.getMinutes()}),gh.minutes=gh.minute.range,gh.minutes.utc=gh.minute.utc.range,gh.hour=Oa(function(a){var b=a.getTimezoneOffset()/60;return new hh(36e5*(Math.floor(a/36e5-b)+b))},function(a,b){a.setTime(a.getTime()+36e5*Math.floor(b))},function(a){return a.getHours()}),gh.hours=gh.hour.range,gh.hours.utc=gh.hour.utc.range,gh.month=Oa(function(a){return a=gh.day(a),a.setDate(1),a},function(a,b){a.setMonth(a.getMonth()+b)},function(a){return a.getMonth()}),gh.months=gh.month.range,gh.months.utc=gh.month.utc.range;var Si=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Ti=[[gh.second,1],[gh.second,5],[gh.second,15],[gh.second,30],[gh.minute,1],[gh.minute,5],[gh.minute,15],[gh.minute,30],[gh.hour,1],[gh.hour,3],[gh.hour,6],[gh.hour,12],[gh.day,1],[gh.day,2],[gh.week,1],[gh.month,1],[gh.month,3],[gh.year,1]],Ui=Pi.multi([[".%L",function(a){return a.getMilliseconds()}],[":%S",function(a){return a.getSeconds()}],["%I:%M",function(a){return a.getMinutes()}],["%I %p",function(a){return a.getHours()}],["%a %d",function(a){return a.getDay()&&1!=a.getDate()}],["%b %d",function(a){return 1!=a.getDate()}],["%B",function(a){return a.getMonth()}],["%Y",Db]]),Vi={range:function(a,b,c){return cg.range(Math.ceil(a/c)*c,+b,c).map(_f)},floor:t,ceil:t};Ti.year=gh.year,gh.scale=function(){return $f(cg.scale.linear(),Ti,Ui)};var Wi=Ti.map(function(a){return[a[0].utc,a[1]]}),Xi=Qi.multi([[".%L",function(a){return a.getUTCMilliseconds()}],[":%S",function(a){return a.getUTCSeconds()}],["%I:%M",function(a){return a.getUTCMinutes()}],["%I %p",function(a){return a.getUTCHours()}],["%a %d",function(a){return a.getUTCDay()&&1!=a.getUTCDate()}],["%b %d",function(a){return 1!=a.getUTCDate()}],["%B",function(a){return a.getUTCMonth()}],["%Y",Db]]);Wi.year=gh.year.utc,gh.scale.utc=function(){return $f(cg.scale.linear(),Wi,Xi)},cg.text=Ca(function(a){return a.responseText}),cg.json=function(a,b){return Da(a,"application/json",ag,b)},cg.html=function(a,b){return Da(a,"text/html",bg,b)},cg.xml=Ca(function(a){return a.responseXML}),"function"==typeof define&&define.amd?define(cg):"object"==typeof f&&f.exports&&(f.exports=cg),this.d3=cg}()}(this),e()}),c.registerDynamic("1e",["27"],!0,function(a,b,c){this||self;c.exports=a("27")}),c.register("28",["29"],function(a){var b,c,d,e,f,g,h;return{setters:[function(a){b=a}],execute:function(){c=function(a,c){var d=new Blob([e(a)],{type:"text/xml"});c=b.sanitize_filename(c)+".svg",b.download_blob(d,c)},d=function(a,c){if("undefined"!=typeof window.navigator.msSaveOrOpenBlob)return void alert("Exporting PNG images is not supported in Internet Explorer. Please use Chrome or Firefox.");var d=5,f=document.getElementById("png-exporter"),g=$(a);f.height=g.height()*d,f.width=g.width()*d;var h=new Image;h.onload=function(){var a=f.getContext("2d");a.drawImage(h,0,0,f.width,f.height),c=b.sanitize_filename(c)+".png",b.download_url(f.toDataURL("image/png"),c);
|
10
|
-
},h.src="data:image/svg+xml;base64,"+window.btoa(e(a))},e=function(a){a=a.cloneNode(!0),d3.select(a).attr("version","1.1").insert("defs",":first-child").append("style").attr("class","exported-css").attr("type","text/css").node().textContent=f(),a.removeAttribute("xmlns"),a.removeAttribute("xlink"),a.setAttributeNS(d3.ns.prefix.xmlns,"xmlns",d3.ns.prefix.svg),a.setAttributeNS(d3.ns.prefix.xmlns,"xmlns:xlink",d3.ns.prefix.xlink);var b=(new XMLSerializer).serializeToString(a),c='<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">';return c+b},f=function(){for(var a="",b=0;b<document.styleSheets.length;b++)!function b(c){try{if(!c.cssRules)return}catch(a){if("SecurityError"!==a.name)throw a;return}for(var d=0;d<c.cssRules.length;d++){var e=c.cssRules[d];if(e.type===CSSRule.IMPORT_RULE)b(e.styleSheet);else{var f=e.selectorText;f&&f.indexOf("svg")!==-1&&(a+="\n"+e.cssText)}}}(document.styleSheets[b]);return a},g=function(a){return function(){var b=$(this).parents(".grapher").find("svg");return a(b[0],b.attr("data-name")),!1}},h=$("body"),h.on("click",".export-to-svg",g(c)),h.on("click",".export-to-png",g(d))}}}),c.register("1f",["17","22","23","28","2a","2b","1a"],function(a){function b(a){return function(b){function c(a){e(this,c),f(Object.getPrototypeOf(c.prototype),"constructor",this).call(this,a),this.state={collapsed:this.props.collapsed}}return g(c,b),d(c,[{key:"collapseId",value:function(){return a.collapseId(this.props)}},{key:"render",value:function(){var b=a.className()+" grapher";return h.createElement("div",{ref:"grapher",className:b},h.createElement("div",{className:"grapher-header"},h.createElement("h4",{className:"caption","data-toggle":"collapse","data-target":"#"+this.collapseId()},this.state.collapsed?this.plusIcon():this.minusIcon()," ",a.name()),!this.state.collapsed&&this.graphLinksJSX()),this.svgContainerJSX())}},{key:"minusIcon",value:function(){return h.createElement("i",{className:"fa fa-minus-square-o"})}},{key:"plusIcon",value:function(){return h.createElement("i",{className:"fa fa-plus-square-o"})}},{key:"graphLinksJSX",value:function(){return h.createElement("div",{className:"hit-links graph-links"},h.createElement("a",{href:"#",className:"btn-link export-to-svg"},h.createElement("i",{className:"fa fa-download"})," SVG"),h.createElement("span",{className:"line"},"|"),h.createElement("a",{href:"#",className:"btn-link export-to-png"},h.createElement("i",{className:"fa fa-download"})," PNG"))}},{key:"svgContainerJSX",value:function(){var b=a.className()+" svg-container collapse";return this.state.collapsed||(b+=" in"),h.createElement("div",{ref:"svgContainer",id:this.collapseId(),className:b})}},{key:"componentDidMount",value:function(){i[this.collapseId()]=this,this.draw()}},{key:"componentDidUpdate",value:function(){this.draw()}},{key:"svgContainer",value:function(){return $(h.findDOMNode(this.refs.svgContainer))}},{key:"draw",value:function(){this.svgContainer().empty(),this.graph=null,this.state.collapsed||(this.graph=new a(this.svgContainer(),this.props),this.svgContainer().find("svg").attr("data-name",a.dataName(this.props)))}}]),c}(h.Component)}var c,d,e,f,g,h,i;return{setters:[function(a){c=a.default},function(a){d=a.default},function(a){e=a.default},function(a){},function(a){f=a.default},function(a){g=a.default},function(a){h=a.default}],execute:function(){a("default",b),i={},$(window).resize(c.debounce(function(){c.each(i,function(a){a.draw()})},125)),$("body").on("hidden.bs.collapse",".collapse",function(){var a=i[$(this).attr("id")];a&&a.setState({collapsed:!0})}),$("body").on("shown.bs.collapse",".collapse",function(){var a=i[$(this).attr("id")];a&&a.setState({collapsed:!1})})}}}),c.register("2c",["17","20","22","23","2d","1e","1f"],function(a){var b,c,d,e,f,g,h,i,j;return{setters:[function(a){b=a.default},function(a){c=a},function(a){d=a.default},function(a){e=a.default},function(a){f=a.default},function(a){g=a.default},function(a){h=a.default}],execute:function(){i=function(){function a(b,d){e(this,a),this._zoom_scale_by=1.4,this._padding_x=12,this._padding_y=50,this._canvas_height=b.height(),this._canvas_width=b.width(),this._results=c.get_seq_type(d.algorithm),this._query_id=d.query.id,this._subject_id=d.hit.id,this._query_length=d.query.length,this._subject_length=d.hit.length,this._show_numbers=d.showHSPCrumbs,this._hsps=d.hit.hsps,this._maxBitScore=d.query.hits[0].hsps[0].bit_score,this.svgContainer_d3=g.select(b[0]),this._svg={},this._svg.jq=$(this._svg.raw),this._scales=this._create_scales(),this.use_complement_coords=!1,this._axis_ticks=10,this._initiate(),this.bindHoverHandler(b)}return d(a,null,[{key:"name",value:function(){return"Graphical overview of aligning region(s)"}},{key:"className",value:function(){return"kablammo"}},{key:"collapseId",value:function(a){return"kablammo_"+a.query.number+"_"+a.hit.number}},{key:"dataName",value:function(a){return"Kablammo-"+a.query.id+"-"+a.hit.id}}]),d(a,[{key:"bindHoverHandler",value:function(a){a.find("polygon").hover(function(){var a=$(this).parent();a.parent().append(a)})}},{key:"_initiate",value:function(){this._svg.d3=this.svgContainer_d3.insert("svg",":first-child").attr("height",this._canvas_height).attr("width",this._canvas_width),this._svg.raw=this._svg.d3[0][0],this._render_graph()}},{key:"_rotate_axis_labels",value:function(a,b,c,d){a.style("text-anchor",b).attr("x",c).attr("y",d).attr("dx",0).attr("dy",0).attr("transform","rotate(-90)")}},{key:"_create_axis",value:function(a,b,d,e,f,h,i){var j=c.tick_formatter(a,i),k=a.ticks();k.pop();var l=g.svg.axis().ticks(this._axis_ticks).scale(a).tickValues(k.concat(a.domain())).tickFormat(j).orient(b),m=this._svg.d3.append("g").attr("class","axis").attr("transform","translate(0,"+d+")").call(l);return this._rotate_axis_labels(m.selectAll("text"),e,f,h),m}},{key:"_is_domain_within_orig",value:function(a,b){return a[0]<=b[0]&&a[1]>=b[1]}},{key:"_zoom_scale",value:function(a,b,c,d){var e=a.domain()[0],f=a.domain()[1];if(e=c-(c-e)/d,f=c+(f-c)/d,e=Math.round(e),f=Math.round(f),!(f-e<this._axis_ticks)){var g=[e,f];this._is_domain_within_orig(b,g)?a.domain(g):a.domain(b)}}},{key:"_pan_scale",value:function(a,b,c){var d=(a.domain()[1]-a.domain()[0])/(a.range()[1]-a.range()[0]),e=-c*d,f=a.domain(),g=f[0]+e,h=f[1]+e,i=[g,h];this._is_domain_within_orig(b,i)&&a.domain(i)}},{key:"_render_polygons",value:function(){var a=this;this._svg.d3.selectAll("*").remove(),this._polygons=this._svg.d3.selectAll("polygon").data(this._hsps.slice().reverse()).enter().append("g").attr("class","polygon"),this._polygons.append("polygon").attr("class","hit").attr("fill",function(b){return a.determine_colour(b.bit_score/a._maxBitScore)}).attr("points",function(b){var c=[a._scales.query.scale(b.qstart),a._scales.query.scale(b.qend)],d=[a._scales.subject.scale(b.sstart),a._scales.subject.scale(b.send)];a.use_complement_coords||(b.qframe<0&&c.reverse(),b.sframe<0&&d.reverse());var e=[[c[0],a._scales.query.height+1],[d[0],a._scales.subject.height-1],[d[1],a._scales.subject.height-1],[c[1],a._scales.query.height+1]];return e.map(function(a){return a[0]+","+a[1]}).join(" ")}),a._show_numbers&&this._polygons.append("text").attr("x",function(b){var c=[a._scales.query.scale(b.qstart),a._scales.query.scale(b.qend)],d=[a._scales.subject.scale(b.sstart),a._scales.subject.scale(b.send)],e=.5*(c[0]+d[0]),f=.5*(c[1]+d[1]);return.5*(f+e)}).attr("y",function(b){var c=a._scales.query.height,d=a._scales.subject.height,e=(d-c)/2;return c+e+2}).text(function(a){return c.toLetters(a.number)})}},{key:"_overlaps",value:function(a,b,c,d){return Math.min(b,d)>Math.max(a,c)}},{key:"_rects_overlap",value:function(a,b,c){return c=c||0,this._overlaps(a.left-c,a.right+c,b.left,b.right)&&this._overlaps(a.top-c,a.bottom+c,b.top,b.bottom)}},{key:"_render_axes",value:function(){this._create_axis(this._scales.query.scale,"top",this._scales.query.height,"start","9px","2px",this._results.query_seq_type),this._create_axis(this._scales.subject.scale,"bottom",this._scales.subject.height,"end","-11px","3px",this._results.subject_seq_type)}},{key:"_render_graph",value:function(){this._render_polygons(),this._render_axes()}},{key:"_find_nearest_scale",value:function(a){var b=null,c=Number.MAX_VALUE,d=this;return f(this._scales).forEach(function(e){var f=d._scales[e].scale,g=d._scales[e].height,h=Math.abs(g-a[1]);h<c&&(b=f,c=h)}),b}},{key:"_create_scales",value:function(){var a=[this._padding_x,this._canvas_width-this._padding_x],b=[this._padding_x,this._canvas_width-this._padding_x];this.use_complement_coords||(this._hsps[0].qframe<0&&a.reverse(),this._hsps[0].sframe<0&&b.reverse());var c=g.scale.linear().domain([1,this._query_length]).range(a),d=g.scale.linear().domain([1,this._subject_length]).range(b);c.original_domain=c.domain(),d.original_domain=d.domain();var e=this._padding_y,f=this._canvas_height-this._padding_y,h={subject:{height:f,scale:d},query:{height:e,scale:c}};return h}},{key:"_rgba_to_rgb",value:function(a,b){var c=function(a){return a.map(function(a){return a/255})},d=function(a){return a.map(function(a){return Math.round(Math.min(255,255*a))})},e=c(a.slice(0,3));b=c(b);var f=a[3]/255,g=[f*e[0]+(1-f)*b[0],f*e[1]+(1-f)*b[1],f*e[2]+(1-f)*b[2]];return d(g)}},{key:"determine_colour",value:function(a){var b={r:199,g:79,b:20},c={r:255,g:255,b:255},d=.3,e=(1-d)*a+d,f=this._rgba_to_rgb([b.r,b.g,b.b,255*e],[c.r,c.g,c.b]);return"rgb("+f.join(",")+")"}}]),a}(),j=h(i),a("default",j)}}}),c.register("18",[],function(a){function b(a,b){function c(a,b){d.append($("<input>").attr("type","hidden").attr("name",a).val(b))}var d=$("<form/>").attr("method","post").attr("action","get_sequence");c("sequence_ids",a),c("database_ids",b),d.appendTo("body").submit().remove()}return a("default",b),{setters:[],execute:function(){}}}),c.register("29",[],function(a){function b(a,b){var c=d3.select("body").append("a").attr("download",b).style("display","none").attr("href",a);c.node().click(),setTimeout(function(){c.remove()},100)}function c(a,c){return"undefined"!=typeof window.navigator.msSaveOrOpenBlob?void window.navigator.msSaveOrOpenBlob(a,c):void b(window.URL.createObjectURL(a),c)}function d(a){var b=a.replace(/[^a-zA-Z0-9=_\-]/g,"_");return b=b.replace(/_{2,}/g,"_"),b=b.replace(/^_/,"").replace(/_$/,"")}return a("download_url",b),a("download_blob",c),a("sanitize_filename",d),{setters:[],execute:function(){}}}),c.register("19",["17","22","23","29"],function(a){var b,c,d,e,f;return{setters:[function(a){b=a.default},function(a){c=a.default},function(a){d=a.default},function(a){e=a}],execute:function(){f=function(){function a(){d(this,a)}return c(a,[{key:"wrap_string",value:function(a,b){for(var c=0,d="";;){if(d+=a.substring(c,c+b),c+=b,!(c<a.length))break;d+="\n"}return d}},{key:"generate_fasta",value:function(a){var c="";return b.each(a,b.bind(function(a){c+=">"+a.query_id+":"+a.qstart+"-"+a.qend+"\n",c+=a.qseq+"\n",c+=">"+a.query_id+":"+a.qstart+"-"+a.qend+"_alignment_"+a.hit_id+":"+a.sstart+"-"+a.send+"\n",c+=a.midline+"\n",c+=">"+a.hit_id+":"+a.sstart+"-"+a.send+"\n",c+=a.sseq+"\n"},this)),c}},{key:"export_alignments",value:function(a,b){var c=this.generate_fasta(a),d=new Blob([c],{type:"text/fasta"}),f=e.sanitize_filename(b)+".txt";e.download_blob(d,f)}},{key:"export_alignments_of_all",value:function(a,b){}}]),a}(),a("default",f)}}}),c.register("2e",["17","18","19","1a","2c"],function(a){var b,c,d,e,f;return{setters:[function(a){b=a.default},function(a){c=a.default},function(a){d=a.default},function(a){e=a.default},function(a){f=a.default}],execute:function(){a("default",e.createClass({displayName:"hit",accession:function(){return this.props.hit.accession},sequenceID:function(){return this.props.hit.id},hitLength:function(){return this.props.hit.length},domID:function(){return"Query_"+this.props.query.number+"_hit_"+this.props.hit.number},databaseIDs:function(){return b.map(this.props.querydb,b.iteratee("id"))},showSequenceViewer:function(){this.props.showSequenceModal(this.viewSequenceLink())},viewSequenceLink:function(){var a=encodeURIComponent(this.sequenceID()),b=encodeURIComponent(this.databaseIDs());return"get_sequence/?sequence_ids="+a+"&database_ids="+b},downloadFASTA:function(a){var b=[this.sequenceID()];c(b,this.databaseIDs())},downloadAlignment:function(a){var c=b.map(this.props.hit.hsps,b.bind(function(a){return a.query_id=this.props.query.id,a.hit_id=this.props.hit.id,a},this)),e=new d;e.export_alignments(c,this.props.query.id+"_"+this.props.hit.id)},render:function(){return e.createElement("div",{className:"hit",id:this.domID(),"data-hit-def":this.props.hit.id,"data-hit-len":this.props.hit.length,"data-hit-evalue":this.props.hit.evalue},this.headerJSX()," ",this.contentJSX())},shouldComponentUpdate:function(){return!this.props.hit},headerJSX:function(){var a="length: "+this.hitLength().toLocaleString();return this.props.showQueryCrumbs&&this.props.showHitCrumbs?a="hit "+this.props.hit.number+" of query "+this.props.query.number+", "+a:this.props.showQueryCrumbs&&!this.props.showHitCrumbs?a="the only hit of query "+this.props.query.number+", "+a:!this.props.showQueryCrumbs&&this.props.showHitCrumbs&&(a="hit "+this.props.hit.number+", "+a),e.createElement("div",{className:"section-header"},e.createElement("h4",null,e.createElement("i",{className:"fa fa-minus-square-o"})," ",e.createElement("strong",null,this.props.hit.id)," ",this.props.hit.title),e.createElement("span",{className:"label label-reset pos-label"},a))},contentJSX:function(){return e.createElement("div",{className:"section-content","data-parent-hit":this.domID()},this.hitLinks(),e.createElement(f,{key:"kablammo"+this.props.query.id,query:this.props.query,hit:this.props.hit,algorithm:this.props.algorithm,showHSPCrumbs:this.props.hit.hsps.length>1,collapsed:this.props.veryBig}))},hitLinks:function(){var a=this,b=[];return this.props.imported_xml||(b=b.concat([this.viewSequenceButton(),this.downloadFASTAButton()])),b.push(this.downloadAlignmentButton()),e.createElement("div",{className:"hit-links"},e.createElement("label",null,e.createElement("input",{type:"checkbox",id:this.domID()+"_checkbox",value:this.sequenceID(),onChange:function(){this.props.selectHit(this.domID()+"_checkbox")}.bind(this),"data-target":"#"+this.domID()})," Select"),b.map(function(b){return[e.createElement("span",{className:"line"},"|"),a.button(b)]}),this.props.hit.links.map(function(b){return[e.createElement("span",{className:"line"},"|"),a.a(b)]}))},viewSequenceButton:function(){var a=this;return this.hitLength()>1e4?{text:"Sequence",icon:"fa-eye",className:"view-sequence",title:"Sequence too long"}:{text:"Sequence",icon:"fa-eye",className:"view-sequence",onClick:function(){return a.showSequenceViewer()}}},downloadFASTAButton:function(){var a=this;return{text:"FASTA",icon:"fa-download",className:"download-fa",onClick:function(){return a.downloadFASTA()}}},downloadAlignmentButton:function(){var a=this;return{text:"Alignment",icon:"fa-download",className:"download-aln",onClick:function(){return a.downloadAlignment()}}},button:function(a){var b=a.text,c=a.icon,d=a.title,f=a.className,g=a.onClick;return g?e.createElement("button",{className:"btn-link "+f,title:d,onClick:g},e.createElement("i",{className:"fa "+c})," ",b):e.createElement("button",{className:"btn-link view-sequence disabled",title:d,disabled:"true"},e.createElement("i",{className:"fa "+c})," ",b)},a:function(a){if(a.title&&a.url){var b="btn btn-link";return a.class&&(b=b+" "+a.class),e.createElement("a",{href:a.url,className:b,target:"_blank"},a.icon&&e.createElement("i",{className:"fa "+a.icon})," "+a.title+" ")}}}))}}}),c.register("21",["1a"],function(a){var b,c;return{setters:[function(a){b=a.default}],execute:function(){c={format_2_tuple:function(a){return a[0]+" ("+a[a.length-1]+")"},inPercentage:function(a,b){var c=(100*a/b).toFixed(1);return c%1==0?(c=parseInt(c,10),c+"%"):c+"%"},inFraction:function(a,b){return a+"/"+b},inTwoDecimal:function(a){return a.toFixed(2)},inExponential:function(a){if(0===a)return 0;if(a>=1&&a<10)return this.inTwoDecimal(a);var c=a.toExponential(2),d=c.split("e"),e=d[0],f=d[1];return b.createElement("span",null,e,"×10",b.createElement("sup",null,f))}},a("default",c)}}}),c.register("20",["17"],function(a){function b(a,b){var c=d3.scale.log().domain([d3.min([1e-5,d3.min(b.map(function(a){if(0!==parseFloat(a.evalue))return a.evalue}))]),d3.max(b.map(function(a){return a.evalue}))]).range([0,.8]),d=c(a);return d3.hsl(20,.82,d)}function c(a){var b=a%26,d=a/26|0,e=b?String.fromCharCode(96+b):(--d,"z");return d?c(d)+e:e}function d(a,b){for(var c,d,e=a.ticks(),f=d3.formatPrefix(e[e.length-1]),h={amino_acid:"aa",nucleic_acid:"bp"},i=0;;){if(c=d3.format("."+i+"f"),d=a.ticks().map(function(a){return c(f.scale(a))}),d.length===g.uniq(d).length)break;i++}return function(d){return f.symbol&&d!==a.domain()[0]?c(f.scale(d))+" "+f.symbol+h[b]:d+" "+h[b]}}function e(a){var b={blastn:{query_seq_type:"nucleic_acid",subject_seq_type:"nucleic_acid"},blastp:{query_seq_type:"amino_acid",subject_seq_type:"amino_acid"},blastx:{query_seq_type:"nucleic_acid",subject_seq_type:"amino_acid"},tblastx:{query_seq_type:"nucleic_acid",subject_seq_type:"nucleic_acid"},tblastn:{query_seq_type:"amino_acid",subject_seq_type:"nucleic_acid"}};return b[a]}function f(a){var b=a.toString().split("e"),c=b[0],d=b[1];if(d){var e=parseFloat(c).toFixed(2),f="<span>"+e+" × 10<sup>"+d+"</sup></span>";return f}return c%1!=0?parseFloat(c).toFixed(2):c}var g;return a("get_colors_for_evalue",b),a("toLetters",c),a("tick_formatter",d),a("get_seq_type",e),a("prettify_evalue",f),{setters:[function(a){g=a.default}],execute:function(){}}}),c.register("2f",["17","20","21","22","23","2a","2b","1a"],function(a){var b,c,d,e,f,g,h,i,j,k;return{setters:[function(a){b=a.default},function(a){c=a},function(a){d=a.default},function(a){e=a.default},function(a){f=a.default},function(a){g=a.default},function(a){h=a.default},function(a){i=a.default}],execute:function(){j={},k=function(a){function k(a){f(this,k),g(Object.getPrototypeOf(k.prototype),"constructor",this).call(this,a),this.hsp=a.hsp}return h(k,a),e(k,[{key:"domID",value:function(){return"Query_"+this.props.query.number+"_hit_"+this.props.hit.number+"_"+this.props.hsp.number}},{key:"hitDOM_ID",value:function(){return"Query_"+this.props.query.number+"_hit_"+this.props.hit.number}},{key:"render",value:function(){return i.createElement("div",{className:"hsp",id:this.domID(),ref:"hsp","data-parent-hit":this.hitDOM_ID()},i.createElement("pre",{className:"pre-reset hsp-stats"},this.props.showHSPNumbers&&c.toLetters(this.hsp.number)+". ",this.hspStats().map(function(a,b){return i.createElement("span",{key:b},a)})),this.hspLines())}},{key:"componentDidMount",value:function(){j[this.domID()]=this,this.draw()}},{key:"draw",value:function(){var a=this.props.getCharacterWidth(),b=$(i.findDOMNode(this.refs.hsp)).width();this.chars=Math.floor((b-4)/a),this.forceUpdate()}},{key:"shouldComponentUpdate",value:function(){return!this.props.hsp}},{key:"hspStats",value:function(){var a=[];switch(a.push("Score: "+d.inTwoDecimal(this.hsp.bit_score)+" ("+this.hsp.score+"), "),a.push("E value: "),a.push(d.inExponential(this.hsp.evalue)),a.push(", "),a.push(["Identity: "+d.inFraction(this.hsp.identity,this.hsp.length)+" ("+d.inPercentage(this.hsp.identity,this.hsp.length)+"), "]),"blastp"!==this.props.algorithm&&"blastx"!==this.props.algorithm&&"tblastn"!==this.props.algorithm&&"tblastx"!==this.props.algorithm||a.push("Positives: "+d.inFraction(this.hsp.positives,this.hsp.length)+" ("+d.inPercentage(this.hsp.positives,this.hsp.length)+"), "),a.push("Gaps: "+d.inFraction(this.hsp.gaps,this.hsp.length)+" ("+d.inPercentage(this.hsp.gaps,this.hsp.length)+")"),this.props.algorithm){case"tblastx":a.push(", Frame: "+d.inFraction(this.hsp.qframe,this.hsp.sframe));break;case"blastn":a.push(", Strand: "+(this.hsp.qframe>0?"+":"-")+" / "+(this.hsp.sframe>0?"+":"-"));break;case"blastx":a.push(", Query Frame: "+this.hsp.qframe);break;case"tblastn":a.push(", Hit Frame: "+this.hsp.sframe)}return a}},{key:"hspLines",value:function(){for(var a=this.width(),b=this.chars-2*a-10,c=Math.ceil(this.hsp.length/b),d=[],e=this.nqseq(),f=this.nsseq(),g=1;g<=c;g++){var h=b*(g-1),j=h+b,k=e,l=this.hsp.qseq.slice(h,j),m=e+(l.length-l.split("-").length)*this.qframe_unit()*this.qframe_sign();e=m+this.qframe_unit()*this.qframe_sign();var n=this.hsp.midline.slice(h,j),o=f,p=this.hsp.sseq.slice(h,j),q=f+(p.length-p.split("-").length)*this.sframe_unit()*this.sframe_sign();f=q+this.sframe_unit()*this.sframe_sign(),d.push(i.createElement("pre",{key:this.hsp.number+","+g,className:"pre-reset hsp-lines"},i.createElement("span",{className:"hsp-coords"},"Query "+this.formatCoords(k,a)+" "),i.createElement("span",null,l),i.createElement("span",{className:"hsp-coords"}," "+m),i.createElement("br",null),i.createElement("span",{className:"hsp-coords"},this.formatCoords("",a+8)+" "),i.createElement("span",null,n),i.createElement("br",null),i.createElement("span",{className:"hsp-coords"},"Subject "+this.formatCoords(o,a)+" "),i.createElement("span",null,p),i.createElement("span",{className:"hsp-coords"}," "+q),i.createElement("br",null)))}return d}},{key:"width",value:function(){return b.max(b.map([this.hsp.qstart,this.hsp.qend,this.hsp.sstart,this.hsp.send],function(a){return a.toString().length}))}},{key:"nqseq",value:function(){switch(this.props.algorithm){case"blastp":case"blastx":case"tblastn":case"tblastx":return this.hsp.qframe>=0?this.hsp.qstart:this.hsp.qend;case"blastn":return this.hsp.qstart}}},{key:"nsseq",value:function(){switch(this.props.algorithm){case"blastp":case"blastx":case"tblastn":case"tblastx":return this.hsp.sframe>=0?this.hsp.sstart:this.hsp.send;case"blastn":return this.hsp.sstart}}},{key:"qframe_unit",value:function(){switch(this.props.algorithm){case"blastp":case"blastn":case"tblastn":return 1;case"blastx":case"tblastx":return 3}}},{key:"sframe_unit",value:function(){switch(this.props.algorithm){case"blastp":case"blastx":case"blastn":return 1;case"tblastn":return 3;case"tblastx":return 3}}},{key:"qframe_sign",value:function(){return this.hsp.qframe>=0?1:-1}},{key:"sframe_sign",value:function(){return this.hsp.sframe>=0?1:-1}},{key:"formatCoords",value:function(a,b){if(b){var c=b-a.toString().length;return Array(c+1).join(" ").concat([a])}}},{key:"spanCoords",value:function(a){return i.createElement("span",{className:"hsp-coords"},a)}}]),k}(i.Component),a("default",k),$(window).resize(b.debounce(function(){b.each(j,function(a){a.draw()})},100))}}}),c.registerDynamic("5",["30"],!0,function(a,b,c){var d=(this||self,a("30"));c.exports=function(a){return Object(d(a))}}),c.registerDynamic("31",["5","32"],!0,function(a,b,c){var d=(this||self,a("5"));a("32")("keys",function(a){return function(b){return a(d(b))}})}),c.registerDynamic("33",["31","a"],!0,function(a,b,c){this||self;a("31"),c.exports=a("a").Object.keys}),c.registerDynamic("2d",["33"],!0,function(a,b,c){this||self;c.exports={default:a("33"),__esModule:!0}}),c.registerDynamic("34",["35","3"],!0,function(a,b,c){var d=(this||self,{}.toString),e=a("35"),f=a("3").getNames,g="object"==typeof window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],h=function(a){try{return f(a)}catch(a){return g.slice()}};c.exports.get=function(a){return g&&"[object Window]"==d.call(a)?h(a):f(e(a))}}),c.registerDynamic("36",["32","34"],!0,function(a,b,c){this||self;a("32")("getOwnPropertyNames",function(){return a("34").get})}),c.registerDynamic("37",["3","36"],!0,function(a,b,c){var d=(this||self,a("3"));a("36"),c.exports=function(a){return d.getNames(a)}}),c.registerDynamic("38",["37"],!0,function(a,b,c){this||self;c.exports={default:a("37"),__esModule:!0}}),function(){var a=c.amdDefine;!function(a,b){"object"==typeof f&&"object"==typeof f.exports?f.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(b,c){function d(a){var b="length"in a&&a.length,c=aa.type(a);return"function"!==c&&!aa.isWindow(a)&&(!(1!==a.nodeType||!b)||("array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a))}function e(a,b,c){if(aa.isFunction(b))return aa.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return aa.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(ia.test(b))return aa.filter(b,a,c);b=aa.filter(b,a)}return aa.grep(a,function(a){return V.call(b,a)>=0!==c})}function f(a,b){for(;(a=a[b])&&1!==a.nodeType;);return a}function g(a){var b=pa[a]={};return aa.each(a.match(oa)||[],function(a,c){b[c]=!0}),b}function h(){$.removeEventListener("DOMContentLoaded",h,!1),b.removeEventListener("load",h,!1),aa.ready()}function i(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=aa.expando+i.uid++}function j(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(va,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c||"false"!==c&&("null"===c?null:+c+""===c?+c:ua.test(c)?aa.parseJSON(c):c)}catch(a){}ta.set(a,b,c)}else c=void 0;return c}function k(){return!0}function l(){return!1}function m(){try{return $.activeElement}catch(a){}}function n(a,b){return aa.nodeName(a,"table")&&aa.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function o(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function p(a){var b=La.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function q(a,b){for(var c=0,d=a.length;c<d;c++)sa.set(a[c],"globalEval",!b||sa.get(b[c],"globalEval"))}function r(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(sa.hasData(a)&&(f=sa.access(a),g=sa.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;c<d;c++)aa.event.add(b,e,j[e][c])}ta.hasData(a)&&(h=ta.access(a),i=aa.extend({},h),ta.set(b,i))}}function s(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&aa.nodeName(a,b)?aa.merge([a],c):c}function t(a,b){var c=b.nodeName.toLowerCase();"input"===c&&za.test(a.type)?b.checked=a.checked:"input"!==c&&"textarea"!==c||(b.defaultValue=a.defaultValue)}function u(a,c){var d,e=aa(c.createElement(a)).appendTo(c.body),f=b.getDefaultComputedStyle&&(d=b.getDefaultComputedStyle(e[0]))?d.display:aa.css(e[0],"display");return e.detach(),f}function v(a){var b=$,c=Pa[a];return c||(c=u(a,b),"none"!==c&&c||(Oa=(Oa||aa("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=Oa[0].contentDocument,b.write(),b.close(),c=u(a,b),Oa.detach()),Pa[a]=c),c}function w(a,b,c){var d,e,f,g,h=a.style;return c=c||Sa(a),c&&(g=c.getPropertyValue(b)||c[b]),c&&(""!==g||aa.contains(a.ownerDocument,a)||(g=aa.style(a,b)),Ra.test(g)&&Qa.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function x(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}function y(a,b){if(b in a)return b;for(var c=b[0].toUpperCase()+b.slice(1),d=b,e=Ya.length;e--;)if(b=Ya[e]+c,b in a)return b;return d}function z(a,b,c){var d=Ua.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function A(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;f<4;f+=2)"margin"===c&&(g+=aa.css(a,c+xa[f],!0,e)),d?("content"===c&&(g-=aa.css(a,"padding"+xa[f],!0,e)),"margin"!==c&&(g-=aa.css(a,"border"+xa[f]+"Width",!0,e))):(g+=aa.css(a,"padding"+xa[f],!0,e),"padding"!==c&&(g+=aa.css(a,"border"+xa[f]+"Width",!0,e)));return g}function B(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Sa(a),g="border-box"===aa.css(a,"boxSizing",!1,f);if(e<=0||null==e){if(e=w(a,b,f),(e<0||null==e)&&(e=a.style[b]),Ra.test(e))return e;d=g&&(Z.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+A(a,b,c||(g?"border":"content"),d,f)+"px"}function C(a,b){for(var c,d,e,f=[],g=0,h=a.length;g<h;g++)d=a[g],d.style&&(f[g]=sa.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&ya(d)&&(f[g]=sa.access(d,"olddisplay",v(d.nodeName)))):(e=ya(d),"none"===c&&e||sa.set(d,"olddisplay",e?c:aa.css(d,"display"))));for(g=0;g<h;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function D(a,b,c,d,e){return new D.prototype.init(a,b,c,d,e)}function E(){return setTimeout(function(){Za=void 0}),Za=aa.now()}function F(a,b){var c,d=0,e={height:a};for(b=b?1:0;d<4;d+=2-b)c=xa[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function G(a,b,c){for(var d,e=(db[b]||[]).concat(db["*"]),f=0,g=e.length;f<g;f++)if(d=e[f].call(c,b,a))return d}function H(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},n=a.style,o=a.nodeType&&ya(a),p=sa.get(a,"fxshow");c.queue||(h=aa._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,aa.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[n.overflow,n.overflowX,n.overflowY],j=aa.css(a,"display"),k="none"===j?sa.get(a,"olddisplay")||v(a.nodeName):j,"inline"===k&&"none"===aa.css(a,"float")&&(n.display="inline-block")),c.overflow&&(n.overflow="hidden",l.always(function(){n.overflow=c.overflow[0],n.overflowX=c.overflow[1],n.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],_a.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(o?"hide":"show")){if("show"!==e||!p||void 0===p[d])continue;o=!0}m[d]=p&&p[d]||aa.style(a,d)}else j=void 0;if(aa.isEmptyObject(m))"inline"===("none"===j?v(a.nodeName):j)&&(n.display=j);else{p?"hidden"in p&&(o=p.hidden):p=sa.access(a,"fxshow",{}),f&&(p.hidden=!o),o?aa(a).show():l.done(function(){aa(a).hide()}),l.done(function(){var b;sa.remove(a,"fxshow");for(b in m)aa.style(a,b,m[b])});for(d in m)g=G(o?p[d]:0,d,l),d in p||(p[d]=g.start,o&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function I(a,b){var c,d,e,f,g;for(c in a)if(d=aa.camelCase(c),e=b[d],f=a[c],aa.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=aa.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function J(a,b,c){var d,e,f=0,g=cb.length,h=aa.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Za||E(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;g<i;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),f<1&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:aa.extend({},b),opts:aa.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:Za||E(),duration:c.duration,tweens:[],createTween:function(b,c){var d=aa.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;c<d;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(I(k,j.opts.specialEasing);f<g;f++)if(d=cb[f].call(j,a,k,j.opts))return d;return aa.map(k,G,j),aa.isFunction(j.opts.start)&&j.opts.start.call(a,j),aa.fx.timer(aa.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}function K(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(oa)||[];if(aa.isFunction(c))for(;d=f[e++];)"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function L(a,b,c,d){function e(h){var i;return f[h]=!0,aa.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||g||f[j]?g?!(i=j):void 0:(b.dataTypes.unshift(j),e(j),!1)}),i}var f={},g=a===ub;return e(b.dataTypes[0])||!f["*"]&&e("*")}function M(a,b){var c,d,e=aa.ajaxSettings.flatOptions||{};
|
11
|
-
for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&aa.extend(!0,a,d),a}function N(a,b,c){for(var d,e,f,g,h=a.contents,i=a.dataTypes;"*"===i[0];)i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}if(f)return f!==i[0]&&i.unshift(f),c[f]}function O(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];for(f=k.shift();f;)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a.throws)b=g(b);else try{b=g(b)}catch(a){return{state:"parsererror",error:g?a:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}function P(a,b,c,d){var e;if(aa.isArray(b))aa.each(b,function(b,e){c||zb.test(a)?d(a,e):P(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==aa.type(b))d(a,b);else for(e in b)P(a+"["+e+"]",b[e],c,d)}function Q(a){return aa.isWindow(a)?a:9===a.nodeType&&a.defaultView}var R=[],S=R.slice,T=R.concat,U=R.push,V=R.indexOf,W={},X=W.toString,Y=W.hasOwnProperty,Z={},$=b.document,_="2.1.4",aa=function(a,b){return new aa.fn.init(a,b)},ba=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ca=/^-ms-/,da=/-([\da-z])/gi,ea=function(a,b){return b.toUpperCase()};aa.fn=aa.prototype={jquery:_,constructor:aa,selector:"",length:0,toArray:function(){return S.call(this)},get:function(a){return null!=a?a<0?this[a+this.length]:this[a]:S.call(this)},pushStack:function(a){var b=aa.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return aa.each(this,a,b)},map:function(a){return this.pushStack(aa.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(S.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(a<0?b:0);return this.pushStack(c>=0&&c<b?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:U,sort:R.sort,splice:R.splice},aa.extend=aa.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||aa.isFunction(g)||(g={}),h===i&&(g=this,h--);h<i;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(aa.isPlainObject(d)||(e=aa.isArray(d)))?(e?(e=!1,f=c&&aa.isArray(c)?c:[]):f=c&&aa.isPlainObject(c)?c:{},g[b]=aa.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},aa.extend({expando:"jQuery"+(_+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===aa.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!aa.isArray(a)&&a-parseFloat(a)+1>=0},isPlainObject:function(a){return"object"===aa.type(a)&&!a.nodeType&&!aa.isWindow(a)&&!(a.constructor&&!Y.call(a.constructor.prototype,"isPrototypeOf"))},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?W[X.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=aa.trim(a),a&&(1===a.indexOf("use strict")?(b=$.createElement("script"),b.text=a,$.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(ca,"ms-").replace(da,ea)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var e,f=0,g=a.length,h=d(a);if(c){if(h)for(;f<g&&(e=b.apply(a[f],c),e!==!1);f++);else for(f in a)if(e=b.apply(a[f],c),e===!1)break}else if(h)for(;f<g&&(e=b.call(a[f],f,a[f]),e!==!1);f++);else for(f in a)if(e=b.call(a[f],f,a[f]),e===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(ba,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(d(Object(a))?aa.merge(c,"string"==typeof a?[a]:a):U.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:V.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;d<c;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;f<g;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var e,f=0,g=a.length,h=d(a),i=[];if(h)for(;f<g;f++)e=b(a[f],f,c),null!=e&&i.push(e);else for(f in a)e=b(a[f],f,c),null!=e&&i.push(e);return T.apply([],i)},guid:1,proxy:function(a,b){var c,d,e;if("string"==typeof b&&(c=a[b],b=a,a=c),aa.isFunction(a))return d=S.call(arguments,2),e=function(){return a.apply(b||this,d.concat(S.call(arguments)))},e.guid=a.guid=a.guid||aa.guid++,e},now:Date.now,support:Z}),aa.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){W["[object "+b+"]"]=b.toLowerCase()});var fa=function(a){function b(a,b,c,d){var e,f,g,h,i,j,l,n,o,p;if((b?b.ownerDocument||b:O)!==G&&F(b),b=b||G,c=c||[],h=b.nodeType,"string"!=typeof a||!a||1!==h&&9!==h&&11!==h)return c;if(!d&&I){if(11!==h&&(e=sa.exec(a)))if(g=e[1]){if(9===h){if(f=b.getElementById(g),!f||!f.parentNode)return c;if(f.id===g)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(g))&&M(b,f)&&f.id===g)return c.push(f),c}else{if(e[2])return $.apply(c,b.getElementsByTagName(a)),c;if((g=e[3])&&v.getElementsByClassName)return $.apply(c,b.getElementsByClassName(g)),c}if(v.qsa&&(!J||!J.test(a))){if(n=l=N,o=b,p=1!==h&&a,1===h&&"object"!==b.nodeName.toLowerCase()){for(j=z(a),(l=b.getAttribute("id"))?n=l.replace(ua,"\\$&"):b.setAttribute("id",n),n="[id='"+n+"'] ",i=j.length;i--;)j[i]=n+m(j[i]);o=ta.test(a)&&k(b.parentNode)||b,p=j.join(",")}if(p)try{return $.apply(c,o.querySelectorAll(p)),c}catch(a){}finally{l||b.removeAttribute("id")}}}return B(a.replace(ia,"$1"),b,c,d)}function c(){function a(c,d){return b.push(c+" ")>w.cacheLength&&delete a[b.shift()],a[c+" "]=d}var b=[];return a}function d(a){return a[N]=!0,a}function e(a){var b=G.createElement("div");try{return!!a(b)}catch(a){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function f(a,b){for(var c=a.split("|"),d=a.length;d--;)w.attrHandle[c[d]]=b}function g(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||V)-(~a.sourceIndex||V);if(d)return d;if(c)for(;c=c.nextSibling;)if(c===b)return-1;return a?1:-1}function h(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function i(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function j(a){return d(function(b){return b=+b,d(function(c,d){for(var e,f=a([],c.length,b),g=f.length;g--;)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function k(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}function l(){}function m(a){for(var b=0,c=a.length,d="";b<c;b++)d+=a[b].value;return d}function n(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=Q++;return b.first?function(b,c,f){for(;b=b[d];)if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[P,f];if(g){for(;b=b[d];)if((1===b.nodeType||e)&&a(b,c,g))return!0}else for(;b=b[d];)if(1===b.nodeType||e){if(i=b[N]||(b[N]={}),(h=i[d])&&h[0]===P&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function o(a){return a.length>1?function(b,c,d){for(var e=a.length;e--;)if(!a[e](b,c,d))return!1;return!0}:a[0]}function p(a,c,d){for(var e=0,f=c.length;e<f;e++)b(a,c[e],d);return d}function q(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;h<i;h++)(f=a[h])&&(c&&!c(f,d,e)||(g.push(f),j&&b.push(h)));return g}function r(a,b,c,e,f,g){return e&&!e[N]&&(e=r(e)),f&&!f[N]&&(f=r(f,g)),d(function(d,g,h,i){var j,k,l,m=[],n=[],o=g.length,r=d||p(b||"*",h.nodeType?[h]:h,[]),s=!a||!d&&b?r:q(r,m,a,h,i),t=c?f||(d?a:o||e)?[]:g:s;if(c&&c(s,t,h,i),e)for(j=q(t,n),e(j,[],h,i),k=j.length;k--;)(l=j[k])&&(t[n[k]]=!(s[n[k]]=l));if(d){if(f||a){if(f){for(j=[],k=t.length;k--;)(l=t[k])&&j.push(s[k]=l);f(null,t=[],j,i)}for(k=t.length;k--;)(l=t[k])&&(j=f?aa(d,l):m[k])>-1&&(d[j]=!(g[j]=l))}}else t=q(t===g?t.splice(o,t.length):t),f?f(null,g,t,i):$.apply(g,t)})}function s(a){for(var b,c,d,e=a.length,f=w.relative[a[0].type],g=f||w.relative[" "],h=f?1:0,i=n(function(a){return a===b},g,!0),j=n(function(a){return aa(b,a)>-1},g,!0),k=[function(a,c,d){var e=!f&&(d||c!==C)||((b=c).nodeType?i(a,c,d):j(a,c,d));return b=null,e}];h<e;h++)if(c=w.relative[a[h].type])k=[n(o(k),c)];else{if(c=w.filter[a[h].type].apply(null,a[h].matches),c[N]){for(d=++h;d<e&&!w.relative[a[d].type];d++);return r(h>1&&o(k),h>1&&m(a.slice(0,h-1).concat({value:" "===a[h-2].type?"*":""})).replace(ia,"$1"),c,h<d&&s(a.slice(h,d)),d<e&&s(a=a.slice(d)),d<e&&m(a))}k.push(c)}return o(k)}function t(a,c){var e=c.length>0,f=a.length>0,g=function(d,g,h,i,j){var k,l,m,n=0,o="0",p=d&&[],r=[],s=C,t=d||f&&w.find.TAG("*",j),u=P+=null==s?1:Math.random()||.1,v=t.length;for(j&&(C=g!==G&&g);o!==v&&null!=(k=t[o]);o++){if(f&&k){for(l=0;m=a[l++];)if(m(k,g,h)){i.push(k);break}j&&(P=u)}e&&((k=!m&&k)&&n--,d&&p.push(k))}if(n+=o,e&&o!==n){for(l=0;m=c[l++];)m(p,r,g,h);if(d){if(n>0)for(;o--;)p[o]||r[o]||(r[o]=Y.call(i));r=q(r)}$.apply(i,r),j&&!d&&r.length>0&&n+c.length>1&&b.uniqueSort(i)}return j&&(P=u,C=s),p};return e?d(g):g}var u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N="sizzle"+1*new Date,O=a.document,P=0,Q=0,R=c(),S=c(),T=c(),U=function(a,b){return a===b&&(E=!0),0},V=1<<31,W={}.hasOwnProperty,X=[],Y=X.pop,Z=X.push,$=X.push,_=X.slice,aa=function(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1},ba="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ca="[\\x20\\t\\r\\n\\f]",da="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",ea=da.replace("w","w#"),fa="\\["+ca+"*("+da+")(?:"+ca+"*([*^$|!~]?=)"+ca+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+ea+"))|)"+ca+"*\\]",ga=":("+da+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+fa+")*)|.*)\\)|)",ha=new RegExp(ca+"+","g"),ia=new RegExp("^"+ca+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ca+"+$","g"),ja=new RegExp("^"+ca+"*,"+ca+"*"),ka=new RegExp("^"+ca+"*([>+~]|"+ca+")"+ca+"*"),la=new RegExp("="+ca+"*([^\\]'\"]*?)"+ca+"*\\]","g"),ma=new RegExp(ga),na=new RegExp("^"+ea+"$"),oa={ID:new RegExp("^#("+da+")"),CLASS:new RegExp("^\\.("+da+")"),TAG:new RegExp("^("+da.replace("w","w*")+")"),ATTR:new RegExp("^"+fa),PSEUDO:new RegExp("^"+ga),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ca+"*(even|odd|(([+-]|)(\\d*)n|)"+ca+"*(?:([+-]|)"+ca+"*(\\d+)|))"+ca+"*\\)|)","i"),bool:new RegExp("^(?:"+ba+")$","i"),needsContext:new RegExp("^"+ca+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ca+"*((?:-\\d)?\\d*)"+ca+"*\\)|)(?=[^-]|$)","i")},pa=/^(?:input|select|textarea|button)$/i,qa=/^h\d$/i,ra=/^[^{]+\{\s*\[native \w/,sa=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ta=/[+~]/,ua=/'|\\/g,va=new RegExp("\\\\([\\da-f]{1,6}"+ca+"?|("+ca+")|.)","ig"),wa=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:d<0?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},xa=function(){F()};try{$.apply(X=_.call(O.childNodes),O.childNodes),X[O.childNodes.length].nodeType}catch(a){$={apply:X.length?function(a,b){Z.apply(a,_.call(b))}:function(a,b){for(var c=a.length,d=0;a[c++]=b[d++];);a.length=c-1}}}v=b.support={},y=b.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return!!b&&"HTML"!==b.nodeName},F=b.setDocument=function(a){var b,c,d=a?a.ownerDocument||a:O;return d!==G&&9===d.nodeType&&d.documentElement?(G=d,H=d.documentElement,c=d.defaultView,c&&c!==c.top&&(c.addEventListener?c.addEventListener("unload",xa,!1):c.attachEvent&&c.attachEvent("onunload",xa)),I=!y(d),v.attributes=e(function(a){return a.className="i",!a.getAttribute("className")}),v.getElementsByTagName=e(function(a){return a.appendChild(d.createComment("")),!a.getElementsByTagName("*").length}),v.getElementsByClassName=ra.test(d.getElementsByClassName),v.getById=e(function(a){return H.appendChild(a).id=N,!d.getElementsByName||!d.getElementsByName(N).length}),v.getById?(w.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&I){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},w.filter.ID=function(a){var b=a.replace(va,wa);return function(a){return a.getAttribute("id")===b}}):(delete w.find.ID,w.filter.ID=function(a){var b=a.replace(va,wa);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),w.find.TAG=v.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):v.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){for(;c=f[e++];)1===c.nodeType&&d.push(c);return d}return f},w.find.CLASS=v.getElementsByClassName&&function(a,b){if(I)return b.getElementsByClassName(a)},K=[],J=[],(v.qsa=ra.test(d.querySelectorAll))&&(e(function(a){H.appendChild(a).innerHTML="<a id='"+N+"'></a><select id='"+N+"-\f]' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&J.push("[*^$]="+ca+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||J.push("\\["+ca+"*(?:value|"+ba+")"),a.querySelectorAll("[id~="+N+"-]").length||J.push("~="),a.querySelectorAll(":checked").length||J.push(":checked"),a.querySelectorAll("a#"+N+"+*").length||J.push(".#.+[+~]")}),e(function(a){var b=d.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&J.push("name"+ca+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||J.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),J.push(",.*:")})),(v.matchesSelector=ra.test(L=H.matches||H.webkitMatchesSelector||H.mozMatchesSelector||H.oMatchesSelector||H.msMatchesSelector))&&e(function(a){v.disconnectedMatch=L.call(a,"div"),L.call(a,"[s!='']:x"),K.push("!=",ga)}),J=J.length&&new RegExp(J.join("|")),K=K.length&&new RegExp(K.join("|")),b=ra.test(H.compareDocumentPosition),M=b||ra.test(H.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)for(;b=b.parentNode;)if(b===a)return!0;return!1},U=b?function(a,b){if(a===b)return E=!0,0;var c=!a.compareDocumentPosition-!b.compareDocumentPosition;return c?c:(c=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&c||!v.sortDetached&&b.compareDocumentPosition(a)===c?a===d||a.ownerDocument===O&&M(O,a)?-1:b===d||b.ownerDocument===O&&M(O,b)?1:D?aa(D,a)-aa(D,b):0:4&c?-1:1)}:function(a,b){if(a===b)return E=!0,0;var c,e=0,f=a.parentNode,h=b.parentNode,i=[a],j=[b];if(!f||!h)return a===d?-1:b===d?1:f?-1:h?1:D?aa(D,a)-aa(D,b):0;if(f===h)return g(a,b);for(c=a;c=c.parentNode;)i.unshift(c);for(c=b;c=c.parentNode;)j.unshift(c);for(;i[e]===j[e];)e++;return e?g(i[e],j[e]):i[e]===O?-1:j[e]===O?1:0},d):G},b.matches=function(a,c){return b(a,null,null,c)},b.matchesSelector=function(a,c){if((a.ownerDocument||a)!==G&&F(a),c=c.replace(la,"='$1']"),v.matchesSelector&&I&&(!K||!K.test(c))&&(!J||!J.test(c)))try{var d=L.call(a,c);if(d||v.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(a){}return b(c,G,null,[a]).length>0},b.contains=function(a,b){return(a.ownerDocument||a)!==G&&F(a),M(a,b)},b.attr=function(a,b){(a.ownerDocument||a)!==G&&F(a);var c=w.attrHandle[b.toLowerCase()],d=c&&W.call(w.attrHandle,b.toLowerCase())?c(a,b,!I):void 0;return void 0!==d?d:v.attributes||!I?a.getAttribute(b):(d=a.getAttributeNode(b))&&d.specified?d.value:null},b.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},b.uniqueSort=function(a){var b,c=[],d=0,e=0;if(E=!v.detectDuplicates,D=!v.sortStable&&a.slice(0),a.sort(U),E){for(;b=a[e++];)b===a[e]&&(d=c.push(e));for(;d--;)a.splice(c[d],1)}return D=null,a},x=b.getText=function(a){var b,c="",d=0,e=a.nodeType;if(e){if(1===e||9===e||11===e){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=x(a)}else if(3===e||4===e)return a.nodeValue}else for(;b=a[d++];)c+=x(b);return c},w=b.selectors={cacheLength:50,createPseudo:d,match:oa,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(va,wa),a[3]=(a[3]||a[4]||a[5]||"").replace(va,wa),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||b.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&b.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return oa.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&ma.test(c)&&(b=z(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(va,wa).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=R[a+" "];return b||(b=new RegExp("(^|"+ca+")"+a+"("+ca+"|$)"))&&R(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,c,d){return function(e){var f=b.attr(e,a);return null==f?"!="===c:!c||(f+="","="===c?f===d:"!="===c?f!==d:"^="===c?d&&0===f.indexOf(d):"*="===c?d&&f.indexOf(d)>-1:"$="===c?d&&f.slice(-d.length)===d:"~="===c?(" "+f.replace(ha," ")+" ").indexOf(d)>-1:"|="===c&&(f===d||f.slice(0,d.length+1)===d+"-"))}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){for(;p;){for(l=b;l=l[p];)if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){for(k=q[N]||(q[N]={}),j=k[a]||[],n=j[0]===P&&j[1],m=j[0]===P&&j[2],l=n&&q.childNodes[n];l=++n&&l&&l[p]||(m=n=0)||o.pop();)if(1===l.nodeType&&++m&&l===b){k[a]=[P,n,m];break}}else if(s&&(j=(b[N]||(b[N]={}))[a])&&j[0]===P)m=j[1];else for(;(l=++n&&l&&l[p]||(m=n=0)||o.pop())&&((h?l.nodeName.toLowerCase()!==r:1!==l.nodeType)||!++m||(s&&((l[N]||(l[N]={}))[a]=[P,m]),l!==b)););return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,c){var e,f=w.pseudos[a]||w.setFilters[a.toLowerCase()]||b.error("unsupported pseudo: "+a);return f[N]?f(c):f.length>1?(e=[a,a,"",c],w.setFilters.hasOwnProperty(a.toLowerCase())?d(function(a,b){for(var d,e=f(a,c),g=e.length;g--;)d=aa(a,e[g]),a[d]=!(b[d]=e[g])}):function(a){return f(a,0,e)}):f}},pseudos:{not:d(function(a){var b=[],c=[],e=A(a.replace(ia,"$1"));return e[N]?d(function(a,b,c,d){for(var f,g=e(a,null,d,[]),h=a.length;h--;)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,d,f){return b[0]=a,e(b,null,f,c),b[0]=null,!c.pop()}}),has:d(function(a){return function(c){return b(a,c).length>0}}),contains:d(function(a){return a=a.replace(va,wa),function(b){return(b.textContent||b.innerText||x(b)).indexOf(a)>-1}}),lang:d(function(a){return na.test(a||"")||b.error("unsupported lang: "+a),a=a.replace(va,wa).toLowerCase(),function(b){var c;do if(c=I?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===H},focus:function(a){return a===G.activeElement&&(!G.hasFocus||G.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!w.pseudos.empty(a)},header:function(a){return qa.test(a.nodeName)},input:function(a){return pa.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:j(function(){return[0]}),last:j(function(a,b){return[b-1]}),eq:j(function(a,b,c){return[c<0?c+b:c]}),even:j(function(a,b){for(var c=0;c<b;c+=2)a.push(c);return a}),odd:j(function(a,b){for(var c=1;c<b;c+=2)a.push(c);return a}),lt:j(function(a,b,c){for(var d=c<0?c+b:c;--d>=0;)a.push(d);return a}),gt:j(function(a,b,c){for(var d=c<0?c+b:c;++d<b;)a.push(d);return a})}},w.pseudos.nth=w.pseudos.eq;for(u in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})w.pseudos[u]=h(u);for(u in{submit:!0,reset:!0})w.pseudos[u]=i(u);return l.prototype=w.filters=w.pseudos,w.setFilters=new l,z=b.tokenize=function(a,c){var d,e,f,g,h,i,j,k=S[a+" "];if(k)return c?0:k.slice(0);for(h=a,i=[],j=w.preFilter;h;){d&&!(e=ja.exec(h))||(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),d=!1,(e=ka.exec(h))&&(d=e.shift(),f.push({value:d,type:e[0].replace(ia," ")}),h=h.slice(d.length));for(g in w.filter)!(e=oa[g].exec(h))||j[g]&&!(e=j[g](e))||(d=e.shift(),f.push({value:d,type:g,matches:e}),h=h.slice(d.length));if(!d)break}return c?h.length:h?b.error(a):S(a,i).slice(0)},A=b.compile=function(a,b){var c,d=[],e=[],f=T[a+" "];if(!f){for(b||(b=z(a)),c=b.length;c--;)f=s(b[c]),f[N]?d.push(f):e.push(f);f=T(a,t(e,d)),f.selector=a}return f},B=b.select=function(a,b,c,d){var e,f,g,h,i,j="function"==typeof a&&a,l=!d&&z(a=j.selector||a);if(c=c||[],1===l.length){if(f=l[0]=l[0].slice(0),f.length>2&&"ID"===(g=f[0]).type&&v.getById&&9===b.nodeType&&I&&w.relative[f[1].type]){if(b=(w.find.ID(g.matches[0].replace(va,wa),b)||[])[0],!b)return c;j&&(b=b.parentNode),a=a.slice(f.shift().value.length)}for(e=oa.needsContext.test(a)?0:f.length;e--&&(g=f[e],!w.relative[h=g.type]);)if((i=w.find[h])&&(d=i(g.matches[0].replace(va,wa),ta.test(f[0].type)&&k(b.parentNode)||b))){if(f.splice(e,1),a=d.length&&m(f),!a)return $.apply(c,d),c;break}}return(j||A(a,l))(d,b,!I,c,ta.test(a)&&k(b.parentNode)||b),c},v.sortStable=N.split("").sort(U).join("")===N,v.detectDuplicates=!!E,F(),v.sortDetached=e(function(a){return 1&a.compareDocumentPosition(G.createElement("div"))}),e(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||f("type|href|height|width",function(a,b,c){if(!c)return a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),v.attributes&&e(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||f("value",function(a,b,c){if(!c&&"input"===a.nodeName.toLowerCase())return a.defaultValue}),e(function(a){return null==a.getAttribute("disabled")})||f(ba,function(a,b,c){var d;if(!c)return a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),b}(b);aa.find=fa,aa.expr=fa.selectors,aa.expr[":"]=aa.expr.pseudos,aa.unique=fa.uniqueSort,aa.text=fa.getText,aa.isXMLDoc=fa.isXML,aa.contains=fa.contains;var ga=aa.expr.match.needsContext,ha=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,ia=/^.[^:#\[\.,]*$/;aa.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?aa.find.matchesSelector(d,a)?[d]:[]:aa.find.matches(a,aa.grep(b,function(a){return 1===a.nodeType}))},aa.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(aa(a).filter(function(){for(b=0;b<c;b++)if(aa.contains(e[b],this))return!0}));for(b=0;b<c;b++)aa.find(a,e[b],d);return d=this.pushStack(c>1?aa.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(e(this,a||[],!1))},not:function(a){return this.pushStack(e(this,a||[],!0))},is:function(a){return!!e(this,"string"==typeof a&&ga.test(a)?aa(a):a||[],!1).length}});var ja,ka=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,la=aa.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:ka.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||ja).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof aa?b[0]:b,aa.merge(this,aa.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:$,!0)),ha.test(c[1])&&aa.isPlainObject(b))for(c in b)aa.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=$.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=$,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):aa.isFunction(a)?"undefined"!=typeof ja.ready?ja.ready(a):a(aa):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),aa.makeArray(a,this))};la.prototype=aa.fn,ja=aa($);var ma=/^(?:parents|prev(?:Until|All))/,na={children:!0,contents:!0,next:!0,prev:!0};aa.extend({dir:function(a,b,c){for(var d=[],e=void 0!==c;(a=a[b])&&9!==a.nodeType;)if(1===a.nodeType){if(e&&aa(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),aa.fn.extend({has:function(a){var b=aa(a,this),c=b.length;return this.filter(function(){for(var a=0;a<c;a++)if(aa.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=ga.test(a)||"string"!=typeof a?aa(a,b||this.context):0;d<e;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&aa.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?aa.unique(f):f)},index:function(a){return a?"string"==typeof a?V.call(aa(a),this[0]):V.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(aa.unique(aa.merge(this.get(),aa(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}}),aa.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return aa.dir(a,"parentNode")},parentsUntil:function(a,b,c){return aa.dir(a,"parentNode",c)},next:function(a){return f(a,"nextSibling")},prev:function(a){return f(a,"previousSibling")},nextAll:function(a){return aa.dir(a,"nextSibling")},prevAll:function(a){return aa.dir(a,"previousSibling")},nextUntil:function(a,b,c){return aa.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return aa.dir(a,"previousSibling",c)},siblings:function(a){return aa.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return aa.sibling(a.firstChild)},contents:function(a){return a.contentDocument||aa.merge([],a.childNodes)}},function(a,b){aa.fn[a]=function(c,d){var e=aa.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=aa.filter(d,e)),this.length>1&&(na[a]||aa.unique(e),ma.test(a)&&e.reverse()),this.pushStack(e)}});var oa=/\S+/g,pa={};aa.Callbacks=function(a){a="string"==typeof a?pa[a]||g(a):aa.extend({},a);var b,c,d,e,f,h,i=[],j=!a.once&&[],k=function(g){for(b=a.memory&&g,c=!0,h=e||0,e=0,f=i.length,d=!0;i&&h<f;h++)if(i[h].apply(g[0],g[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,i&&(j?j.length&&k(j.shift()):b?i=[]:l.disable())},l={add:function(){if(i){var c=i.length;!function b(c){aa.each(c,function(c,d){var e=aa.type(d);"function"===e?a.unique&&l.has(d)||i.push(d):d&&d.length&&"string"!==e&&b(d)})}(arguments),d?f=i.length:b&&(e=c,k(b))}return this},remove:function(){return i&&aa.each(arguments,function(a,b){for(var c;(c=aa.inArray(b,i,c))>-1;)i.splice(c,1),d&&(c<=f&&f--,c<=h&&h--)}),this},has:function(a){return a?aa.inArray(a,i)>-1:!(!i||!i.length)},empty:function(){return i=[],f=0,this},disable:function(){return i=j=b=void 0,this},disabled:function(){return!i},lock:function(){return j=void 0,b||l.disable(),this},locked:function(){return!j},fireWith:function(a,b){return!i||c&&!j||(b=b||[],b=[a,b.slice?b.slice():b],d?j.push(b):k(b)),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!c}};return l},aa.extend({Deferred:function(a){var b=[["resolve","done",aa.Callbacks("once memory"),"resolved"],["reject","fail",aa.Callbacks("once memory"),"rejected"],["notify","progress",aa.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return aa.Deferred(function(c){aa.each(b,function(b,f){var g=aa.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&aa.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?aa.extend(a,d):d}},e={};return d.pipe=d.then,aa.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b,c,d,e=0,f=S.call(arguments),g=f.length,h=1!==g||a&&aa.isFunction(a.promise)?g:0,i=1===h?a:aa.Deferred(),j=function(a,c,d){return function(e){c[a]=this,d[a]=arguments.length>1?S.call(arguments):e,d===b?i.notifyWith(c,d):--h||i.resolveWith(c,d)}};if(g>1)for(b=new Array(g),c=new Array(g),d=new Array(g);e<g;e++)f[e]&&aa.isFunction(f[e].promise)?f[e].promise().done(j(e,d,f)).fail(i.reject).progress(j(e,c,b)):--h;return h||i.resolveWith(d,f),i.promise()}});var qa;aa.fn.ready=function(a){return aa.ready.promise().done(a),this},aa.extend({isReady:!1,readyWait:1,holdReady:function(a){a?aa.readyWait++:aa.ready(!0)},ready:function(a){(a===!0?--aa.readyWait:aa.isReady)||(aa.isReady=!0,a!==!0&&--aa.readyWait>0||(qa.resolveWith($,[aa]),aa.fn.triggerHandler&&(aa($).triggerHandler("ready"),aa($).off("ready"))))}}),aa.ready.promise=function(a){return qa||(qa=aa.Deferred(),"complete"===$.readyState?setTimeout(aa.ready):($.addEventListener("DOMContentLoaded",h,!1),b.addEventListener("load",h,!1))),qa.promise(a)},aa.ready.promise();var ra=aa.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===aa.type(c)){e=!0;for(h in c)aa.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,aa.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(aa(a),c)})),b))for(;h<i;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};aa.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType},i.uid=1,i.accepts=aa.acceptData,i.prototype={key:function(a){if(!i.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=i.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,aa.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(aa.isEmptyObject(f))aa.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,aa.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{aa.isArray(b)?d=b.concat(b.map(aa.camelCase)):(e=aa.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(oa)||[])),c=d.length;for(;c--;)delete g[d[c]]}},hasData:function(a){return!aa.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var sa=new i,ta=new i,ua=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,va=/([A-Z])/g;aa.extend({
|
12
|
-
hasData:function(a){return ta.hasData(a)||sa.hasData(a)},data:function(a,b,c){return ta.access(a,b,c)},removeData:function(a,b){ta.remove(a,b)},_data:function(a,b,c){return sa.access(a,b,c)},_removeData:function(a,b){sa.remove(a,b)}}),aa.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=ta.get(f),1===f.nodeType&&!sa.get(f,"hasDataAttrs"))){for(c=g.length;c--;)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=aa.camelCase(d.slice(5)),j(f,d,e[d])));sa.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){ta.set(this,a)}):ra(this,function(b){var c,d=aa.camelCase(a);if(f&&void 0===b){if(c=ta.get(f,a),void 0!==c)return c;if(c=ta.get(f,d),void 0!==c)return c;if(c=j(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=ta.get(this,d);ta.set(this,d,b),a.indexOf("-")!==-1&&void 0!==c&&ta.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){ta.remove(this,a)})}}),aa.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=sa.get(a,b),c&&(!d||aa.isArray(c)?d=sa.access(a,b,aa.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=aa.queue(a,b),d=c.length,e=c.shift(),f=aa._queueHooks(a,b),g=function(){aa.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return sa.get(a,c)||sa.access(a,c,{empty:aa.Callbacks("once memory").add(function(){sa.remove(a,[b+"queue",c])})})}}),aa.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?aa.queue(this[0],a):void 0===b?this:this.each(function(){var c=aa.queue(this,a,b);aa._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&aa.dequeue(this,a)})},dequeue:function(a){return this.each(function(){aa.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=aa.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};for("string"!=typeof a&&(b=a,a=void 0),a=a||"fx";g--;)c=sa.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var wa=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,xa=["Top","Right","Bottom","Left"],ya=function(a,b){return a=b||a,"none"===aa.css(a,"display")||!aa.contains(a.ownerDocument,a)},za=/^(?:checkbox|radio)$/i;!function(){var a=$.createDocumentFragment(),b=a.appendChild($.createElement("div")),c=$.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),Z.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",Z.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var Aa="undefined";Z.focusinBubbles="onfocusin"in b;var Ba=/^key/,Ca=/^(?:mouse|pointer|contextmenu)|click/,Da=/^(?:focusinfocus|focusoutblur)$/,Ea=/^([^.]*)(?:\.(.+)|)$/;aa.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=sa.get(a);if(q)for(c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=aa.guid++),(i=q.events)||(i=q.events={}),(g=q.handle)||(g=q.handle=function(b){return typeof aa!==Aa&&aa.event.triggered!==b.type?aa.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(oa)||[""],j=b.length;j--;)h=Ea.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n&&(l=aa.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=aa.event.special[n]||{},k=aa.extend({type:n,origType:p,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&aa.expr.match.needsContext.test(e),namespace:o.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,o,g)!==!1||a.addEventListener&&a.addEventListener(n,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),aa.event.global[n]=!0)},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=sa.hasData(a)&&sa.get(a);if(q&&(i=q.events)){for(b=(b||"").match(oa)||[""],j=b.length;j--;)if(h=Ea.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){for(l=aa.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;f--;)k=m[f],!e&&p!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||aa.removeEvent(a,n,q.handle),delete i[n])}else for(n in i)aa.event.remove(a,n+b[j],c,d,!0);aa.isEmptyObject(i)&&(delete q.handle,sa.remove(a,"events"))}},trigger:function(a,c,d,e){var f,g,h,i,j,k,l,m=[d||$],n=Y.call(a,"type")?a.type:a,o=Y.call(a,"namespace")?a.namespace.split("."):[];if(g=h=d=d||$,3!==d.nodeType&&8!==d.nodeType&&!Da.test(n+aa.event.triggered)&&(n.indexOf(".")>=0&&(o=n.split("."),n=o.shift(),o.sort()),j=n.indexOf(":")<0&&"on"+n,a=a[aa.expando]?a:new aa.Event(n,"object"==typeof a&&a),a.isTrigger=e?2:3,a.namespace=o.join("."),a.namespace_re=a.namespace?new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,a.result=void 0,a.target||(a.target=d),c=null==c?[a]:aa.makeArray(c,[a]),l=aa.event.special[n]||{},e||!l.trigger||l.trigger.apply(d,c)!==!1)){if(!e&&!l.noBubble&&!aa.isWindow(d)){for(i=l.delegateType||n,Da.test(i+n)||(g=g.parentNode);g;g=g.parentNode)m.push(g),h=g;h===(d.ownerDocument||$)&&m.push(h.defaultView||h.parentWindow||b)}for(f=0;(g=m[f++])&&!a.isPropagationStopped();)a.type=f>1?i:l.bindType||n,k=(sa.get(g,"events")||{})[a.type]&&sa.get(g,"handle"),k&&k.apply(g,c),k=j&&g[j],k&&k.apply&&aa.acceptData(g)&&(a.result=k.apply(g,c),a.result===!1&&a.preventDefault());return a.type=n,e||a.isDefaultPrevented()||l._default&&l._default.apply(m.pop(),c)!==!1||!aa.acceptData(d)||j&&aa.isFunction(d[n])&&!aa.isWindow(d)&&(h=d[j],h&&(d[j]=null),aa.event.triggered=n,d[n](),aa.event.triggered=void 0,h&&(d[j]=h)),a.result}},dispatch:function(a){a=aa.event.fix(a);var b,c,d,e,f,g=[],h=S.call(arguments),i=(sa.get(this,"events")||{})[a.type]||[],j=aa.event.special[a.type]||{};if(h[0]=a,a.delegateTarget=this,!j.preDispatch||j.preDispatch.call(this,a)!==!1){for(g=aa.event.handlers.call(this,a,i),b=0;(e=g[b++])&&!a.isPropagationStopped();)for(a.currentTarget=e.elem,c=0;(f=e.handlers[c++])&&!a.isImmediatePropagationStopped();)a.namespace_re&&!a.namespace_re.test(f.namespace)||(a.handleObj=f,a.data=f.data,d=((aa.event.special[f.origType]||{}).handle||f.handler).apply(e.elem,h),void 0!==d&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation()));return j.postDispatch&&j.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;c<h;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?aa(e,this).index(i)>=0:aa.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||$,d=c.documentElement,e=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0),a.pageY=b.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},fix:function(a){if(a[aa.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];for(g||(this.fixHooks[e]=g=Ca.test(e)?this.mouseHooks:Ba.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new aa.Event(f),b=d.length;b--;)c=d[b],a[c]=f[c];return a.target||(a.target=$),3===a.target.nodeType&&(a.target=a.target.parentNode),g.filter?g.filter(a,f):a},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==m()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===m()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&aa.nodeName(this,"input"))return this.click(),!1},_default:function(a){return aa.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=aa.extend(new aa.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?aa.event.trigger(e,null,b):aa.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},aa.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)},aa.Event=function(a,b){return this instanceof aa.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?k:l):this.type=a,b&&aa.extend(this,b),this.timeStamp=a&&a.timeStamp||aa.now(),void(this[aa.expando]=!0)):new aa.Event(a,b)},aa.Event.prototype={isDefaultPrevented:l,isPropagationStopped:l,isImmediatePropagationStopped:l,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=k,a&&a.preventDefault&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=k,a&&a.stopPropagation&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=k,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},aa.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){aa.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return e&&(e===d||aa.contains(d,e))||(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),Z.focusinBubbles||aa.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){aa.event.simulate(b,a.target,aa.event.fix(a),!0)};aa.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=sa.access(d,b);e||d.addEventListener(a,c,!0),sa.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=sa.access(d,b)-1;e?sa.access(d,b,e):(d.removeEventListener(a,c,!0),sa.remove(d,b))}}}),aa.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(g in a)this.on(g,b,c,a[g],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=l;else if(!d)return this;return 1===e&&(f=d,d=function(a){return aa().off(a),f.apply(this,arguments)},d.guid=f.guid||(f.guid=aa.guid++)),this.each(function(){aa.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,aa(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return b!==!1&&"function"!=typeof b||(c=b,b=void 0),c===!1&&(c=l),this.each(function(){aa.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){aa.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];if(c)return aa.event.trigger(a,b,c,!0)}});var Fa=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Ga=/<([\w:]+)/,Ha=/<|&#?\w+;/,Ia=/<(?:script|style|link)/i,Ja=/checked\s*(?:[^=]|=\s*.checked.)/i,Ka=/^$|\/(?:java|ecma)script/i,La=/^true\/(.*)/,Ma=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Na={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Na.optgroup=Na.option,Na.tbody=Na.tfoot=Na.colgroup=Na.caption=Na.thead,Na.th=Na.td,aa.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=aa.contains(a.ownerDocument,a);if(!(Z.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||aa.isXMLDoc(a)))for(g=s(h),f=s(a),d=0,e=f.length;d<e;d++)t(f[d],g[d]);if(b)if(c)for(f=f||s(a),g=g||s(h),d=0,e=f.length;d<e;d++)r(f[d],g[d]);else r(a,h);return g=s(h,"script"),g.length>0&&q(g,!i&&s(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,n=a.length;m<n;m++)if(e=a[m],e||0===e)if("object"===aa.type(e))aa.merge(l,e.nodeType?[e]:e);else if(Ha.test(e)){for(f=f||k.appendChild(b.createElement("div")),g=(Ga.exec(e)||["",""])[1].toLowerCase(),h=Na[g]||Na._default,f.innerHTML=h[1]+e.replace(Fa,"<$1></$2>")+h[2],j=h[0];j--;)f=f.lastChild;aa.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));for(k.textContent="",m=0;e=l[m++];)if((!d||aa.inArray(e,d)===-1)&&(i=aa.contains(e.ownerDocument,e),f=s(k.appendChild(e),"script"),i&&q(f),c))for(j=0;e=f[j++];)Ka.test(e.type||"")&&c.push(e);return k},cleanData:function(a){for(var b,c,d,e,f=aa.event.special,g=0;void 0!==(c=a[g]);g++){if(aa.acceptData(c)&&(e=c[sa.expando],e&&(b=sa.cache[e]))){if(b.events)for(d in b.events)f[d]?aa.event.remove(c,d):aa.removeEvent(c,d,b.handle);sa.cache[e]&&delete sa.cache[e]}delete ta.cache[c[ta.expando]]}}}),aa.fn.extend({text:function(a){return ra(this,function(a){return void 0===a?aa.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=n(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=n(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?aa.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||aa.cleanData(s(c)),c.parentNode&&(b&&aa.contains(c.ownerDocument,c)&&q(s(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(aa.cleanData(s(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null!=a&&a,b=null==b?a:b,this.map(function(){return aa.clone(this,a,b)})},html:function(a){return ra(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!Ia.test(a)&&!Na[(Ga.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Fa,"<$1></$2>");try{for(;c<d;c++)b=this[c]||{},1===b.nodeType&&(aa.cleanData(s(b,!1)),b.innerHTML=a);b=0}catch(a){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,aa.cleanData(s(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=T.apply([],a);var c,d,e,f,g,h,i=0,j=this.length,k=this,l=j-1,m=a[0],n=aa.isFunction(m);if(n||j>1&&"string"==typeof m&&!Z.checkClone&&Ja.test(m))return this.each(function(c){var d=k.eq(c);n&&(a[0]=m.call(this,c,d.html())),d.domManip(a,b)});if(j&&(c=aa.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(e=aa.map(s(c,"script"),o),f=e.length;i<j;i++)g=c,i!==l&&(g=aa.clone(g,!0,!0),f&&aa.merge(e,s(g,"script"))),b.call(this[i],g,i);if(f)for(h=e[e.length-1].ownerDocument,aa.map(e,p),i=0;i<f;i++)g=e[i],Ka.test(g.type||"")&&!sa.access(g,"globalEval")&&aa.contains(h,g)&&(g.src?aa._evalUrl&&aa._evalUrl(g.src):aa.globalEval(g.textContent.replace(Ma,"")))}return this}}),aa.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){aa.fn[a]=function(a){for(var c,d=[],e=aa(a),f=e.length-1,g=0;g<=f;g++)c=g===f?this:this.clone(!0),aa(e[g])[b](c),U.apply(d,c.get());return this.pushStack(d)}});var Oa,Pa={},Qa=/^margin/,Ra=new RegExp("^("+wa+")(?!px)[a-z%]+$","i"),Sa=function(a){return a.ownerDocument.defaultView.opener?a.ownerDocument.defaultView.getComputedStyle(a,null):b.getComputedStyle(a,null)};!function(){function a(){g.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",g.innerHTML="",e.appendChild(f);var a=b.getComputedStyle(g,null);c="1%"!==a.top,d="4px"===a.width,e.removeChild(f)}var c,d,e=$.documentElement,f=$.createElement("div"),g=$.createElement("div");g.style&&(g.style.backgroundClip="content-box",g.cloneNode(!0).style.backgroundClip="",Z.clearCloneStyle="content-box"===g.style.backgroundClip,f.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",f.appendChild(g),b.getComputedStyle&&aa.extend(Z,{pixelPosition:function(){return a(),c},boxSizingReliable:function(){return null==d&&a(),d},reliableMarginRight:function(){var a,c=g.appendChild($.createElement("div"));return c.style.cssText=g.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",g.style.width="1px",e.appendChild(f),a=!parseFloat(b.getComputedStyle(c,null).marginRight),e.removeChild(f),g.removeChild(c),a}}))}(),aa.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Ta=/^(none|table(?!-c[ea]).+)/,Ua=new RegExp("^("+wa+")(.*)$","i"),Va=new RegExp("^([+-])=("+wa+")","i"),Wa={position:"absolute",visibility:"hidden",display:"block"},Xa={letterSpacing:"0",fontWeight:"400"},Ya=["Webkit","O","Moz","ms"];aa.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=w(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=aa.camelCase(b),i=a.style;return b=aa.cssProps[h]||(aa.cssProps[h]=y(i,h)),g=aa.cssHooks[b]||aa.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=Va.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(aa.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||aa.cssNumber[h]||(c+="px"),Z.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=aa.camelCase(b);return b=aa.cssProps[h]||(aa.cssProps[h]=y(a.style,h)),g=aa.cssHooks[b]||aa.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=w(a,b,d)),"normal"===e&&b in Xa&&(e=Xa[b]),""===c||c?(f=parseFloat(e),c===!0||aa.isNumeric(f)?f||0:e):e}}),aa.each(["height","width"],function(a,b){aa.cssHooks[b]={get:function(a,c,d){if(c)return Ta.test(aa.css(a,"display"))&&0===a.offsetWidth?aa.swap(a,Wa,function(){return B(a,b,d)}):B(a,b,d)},set:function(a,c,d){var e=d&&Sa(a);return z(a,c,d?A(a,b,d,"border-box"===aa.css(a,"boxSizing",!1,e),e):0)}}}),aa.cssHooks.marginRight=x(Z.reliableMarginRight,function(a,b){if(b)return aa.swap(a,{display:"inline-block"},w,[a,"marginRight"])}),aa.each({margin:"",padding:"",border:"Width"},function(a,b){aa.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];d<4;d++)e[a+xa[d]+b]=f[d]||f[d-2]||f[0];return e}},Qa.test(a)||(aa.cssHooks[a+b].set=z)}),aa.fn.extend({css:function(a,b){return ra(this,function(a,b,c){var d,e,f={},g=0;if(aa.isArray(b)){for(d=Sa(a),e=b.length;g<e;g++)f[b[g]]=aa.css(a,b[g],!1,d);return f}return void 0!==c?aa.style(a,b,c):aa.css(a,b)},a,b,arguments.length>1)},show:function(){return C(this,!0)},hide:function(){return C(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){ya(this)?aa(this).show():aa(this).hide()})}}),aa.Tween=D,D.prototype={constructor:D,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(aa.cssNumber[c]?"":"px")},cur:function(){var a=D.propHooks[this.prop];return a&&a.get?a.get(this):D.propHooks._default.get(this)},run:function(a){var b,c=D.propHooks[this.prop];return this.options.duration?this.pos=b=aa.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):D.propHooks._default.set(this),this}},D.prototype.init.prototype=D.prototype,D.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=aa.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){aa.fx.step[a.prop]?aa.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[aa.cssProps[a.prop]]||aa.cssHooks[a.prop])?aa.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},D.propHooks.scrollTop=D.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},aa.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},aa.fx=D.prototype.init,aa.fx.step={};var Za,$a,_a=/^(?:toggle|show|hide)$/,ab=new RegExp("^(?:([+-])=|)("+wa+")([a-z%]*)$","i"),bb=/queueHooks$/,cb=[H],db={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=ab.exec(b),f=e&&e[3]||(aa.cssNumber[a]?"":"px"),g=(aa.cssNumber[a]||"px"!==f&&+d)&&ab.exec(aa.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,aa.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};aa.Animation=aa.extend(J,{tweener:function(a,b){aa.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;d<e;d++)c=a[d],db[c]=db[c]||[],db[c].unshift(b)},prefilter:function(a,b){b?cb.unshift(a):cb.push(a)}}),aa.speed=function(a,b,c){var d=a&&"object"==typeof a?aa.extend({},a):{complete:c||!c&&b||aa.isFunction(a)&&a,duration:a,easing:c&&b||b&&!aa.isFunction(b)&&b};return d.duration=aa.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in aa.fx.speeds?aa.fx.speeds[d.duration]:aa.fx.speeds._default,null!=d.queue&&d.queue!==!0||(d.queue="fx"),d.old=d.complete,d.complete=function(){aa.isFunction(d.old)&&d.old.call(this),d.queue&&aa.dequeue(this,d.queue)},d},aa.fn.extend({fadeTo:function(a,b,c,d){return this.filter(ya).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=aa.isEmptyObject(a),f=aa.speed(b,c,d),g=function(){var b=J(this,aa.extend({},a),f);(e||sa.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=aa.timers,g=sa.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&bb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));!b&&c||aa.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=sa.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=aa.timers,g=d?d.length:0;for(c.finish=!0,aa.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;b<g;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),aa.each(["toggle","show","hide"],function(a,b){var c=aa.fn[b];aa.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(F(b,!0),a,d,e)}}),aa.each({slideDown:F("show"),slideUp:F("hide"),slideToggle:F("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){aa.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),aa.timers=[],aa.fx.tick=function(){var a,b=0,c=aa.timers;for(Za=aa.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||aa.fx.stop(),Za=void 0},aa.fx.timer=function(a){aa.timers.push(a),a()?aa.fx.start():aa.timers.pop()},aa.fx.interval=13,aa.fx.start=function(){$a||($a=setInterval(aa.fx.tick,aa.fx.interval))},aa.fx.stop=function(){clearInterval($a),$a=null},aa.fx.speeds={slow:600,fast:200,_default:400},aa.fn.delay=function(a,b){return a=aa.fx?aa.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a=$.createElement("input"),b=$.createElement("select"),c=b.appendChild($.createElement("option"));a.type="checkbox",Z.checkOn=""!==a.value,Z.optSelected=c.selected,b.disabled=!0,Z.optDisabled=!c.disabled,a=$.createElement("input"),a.value="t",a.type="radio",Z.radioValue="t"===a.value}();var eb,fb,gb=aa.expr.attrHandle;aa.fn.extend({attr:function(a,b){return ra(this,aa.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){aa.removeAttr(this,a)})}}),aa.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===Aa?aa.prop(a,b,c):(1===f&&aa.isXMLDoc(a)||(b=b.toLowerCase(),d=aa.attrHooks[b]||(aa.expr.match.bool.test(b)?fb:eb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=aa.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void aa.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(oa);if(f&&1===a.nodeType)for(;c=f[e++];)d=aa.propFix[c]||c,aa.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!Z.radioValue&&"radio"===b&&aa.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),fb={set:function(a,b,c){return b===!1?aa.removeAttr(a,c):a.setAttribute(c,c),c}},aa.each(aa.expr.match.bool.source.match(/\w+/g),function(a,b){var c=gb[b]||aa.find.attr;gb[b]=function(a,b,d){var e,f;return d||(f=gb[b],gb[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,gb[b]=f),e}});var hb=/^(?:input|select|textarea|button)$/i;aa.fn.extend({prop:function(a,b){return ra(this,aa.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[aa.propFix[a]||a]})}}),aa.extend({propFix:{for:"htmlFor",class:"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!aa.isXMLDoc(a),f&&(b=aa.propFix[b]||b,e=aa.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||hb.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),Z.optSelected||(aa.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),aa.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){aa.propFix[this.toLowerCase()]=this});var ib=/[\t\r\n\f]/g;aa.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;if(aa.isFunction(a))return this.each(function(b){aa(this).addClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(oa)||[];i<j;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ib," "):" ")){for(f=0;e=b[f++];)d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=aa.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0===arguments.length||"string"==typeof a&&a,i=0,j=this.length;if(aa.isFunction(a))return this.each(function(b){aa(this).removeClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(oa)||[];i<j;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ib," "):"")){for(f=0;e=b[f++];)for(;d.indexOf(" "+e+" ")>=0;)d=d.replace(" "+e+" "," ");g=a?aa.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):aa.isFunction(a)?this.each(function(c){aa(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if("string"===c)for(var b,d=0,e=aa(this),f=a.match(oa)||[];b=f[d++];)e.hasClass(b)?e.removeClass(b):e.addClass(b);else c!==Aa&&"boolean"!==c||(this.className&&sa.set(this,"__className__",this.className),this.className=this.className||a===!1?"":sa.get(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;c<d;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ib," ").indexOf(b)>=0)return!0;return!1}});var jb=/\r/g;aa.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=aa.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,aa(this).val()):a,null==e?e="":"number"==typeof e?e+="":aa.isArray(e)&&(e=aa.map(e,function(a){return null==a?"":a+""})),b=aa.valHooks[this.type]||aa.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=aa.valHooks[e.type]||aa.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(jb,""):null==c?"":c)}}}),aa.extend({valHooks:{option:{get:function(a){var b=aa.find.attr(a,"value");return null!=b?b:aa.trim(aa.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||e<0,g=f?null:[],h=f?e+1:d.length,i=e<0?h:f?e:0;i<h;i++)if(c=d[i],(c.selected||i===e)&&(Z.optDisabled?!c.disabled:null===c.getAttribute("disabled"))&&(!c.parentNode.disabled||!aa.nodeName(c.parentNode,"optgroup"))){if(b=aa(c).val(),f)return b;g.push(b)}return g},set:function(a,b){for(var c,d,e=a.options,f=aa.makeArray(b),g=e.length;g--;)d=e[g],(d.selected=aa.inArray(d.value,f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),aa.each(["radio","checkbox"],function(){aa.valHooks[this]={set:function(a,b){if(aa.isArray(b))return a.checked=aa.inArray(aa(a).val(),b)>=0}},Z.checkOn||(aa.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),aa.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){aa.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),aa.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var kb=aa.now(),lb=/\?/;aa.parseJSON=function(a){return JSON.parse(a+"")},aa.parseXML=function(a){var b,c;if(!a||"string"!=typeof a)return null;try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(a){b=void 0}return b&&!b.getElementsByTagName("parsererror").length||aa.error("Invalid XML: "+a),b};var mb=/#.*$/,nb=/([?&])_=[^&]*/,ob=/^(.*?):[ \t]*([^\r\n]*)$/gm,pb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,qb=/^(?:GET|HEAD)$/,rb=/^\/\//,sb=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,tb={},ub={},vb="*/".concat("*"),wb=b.location.href,xb=sb.exec(wb.toLowerCase())||[];
|
3
|
+
a.each(d,c),x(b)}}(),isReady:function(b,c){if(b+="Ready",c){if(h[b]&&h[b].add)return!0;h[b]=a.extend(h[b]||{},{add:function(a){a.handler.call(this,b)}}),a(document).triggerHandler(b)}return!(!h[b]||!h[b].add)||!1},ready:function(b,c){var d=arguments[2];if("string"==typeof b&&(b=b.split(" ")),d||(b=a.map(a.grep(b,function(a){return!s(a)}),function(a){return a+"Ready"})),!b.length)return void c(a,f,window,document);var e=b.shift(),g=function(){t(b,c,!0)};a(document).one(e,g)},capturingEvents:function(b,c){document.addEventListener&&("string"==typeof b&&(b=[b]),a.each(b,function(b,d){var e=function(b){return b=a.event.fix(b),c&&f.capturingEventPrevented&&f.capturingEventPrevented(b),a.event.dispatch.call(this,b)};h[d]=h[d]||{},h[d].setup||h[d].teardown||a.extend(h[d],{setup:function(){this.addEventListener(d,e,!0)},teardown:function(){this.removeEventListener(d,e,!0)}})}))},register:function(b,c){var d=v[b];if(!d)return void f.error("can't find module: "+b);d.loaded=!0;var e=function(){c(a,f,window,document,void 0,d.options),s(b,!0)};d.d&&d.d.length?t(d.d,e):e()},c:{},loader:{addModule:function(b,c){v[b]=c,c.name=c.name||b,c.c||(c.c=[]),a.each(c.c,function(a,c){f.c[c]||(f.c[c]=[]),f.c[c].push(b)})},loadList:function(){var b=[],c=function(c,d){"string"==typeof d&&(d=[d]),a.merge(b,d),w.loadScript(c,!1,d)},d=function(c,d){if(s(c)||-1!=a.inArray(c,b))return!0;var e,f=v[c];return!f||(e=f.test&&a.isFunction(f.test)?f.test(d):f.test,!!e&&(s(c,!0),!0))},e=function(b,c){if(b.d&&b.d.length){var e=function(b,e){d(e,c)||-1!=a.inArray(e,c)||c.push(e)};a.each(b.d,function(b,c){v[c]?v[c].loaded||e(b,c):r[c]&&(a.each(r[c],e),t(r[c],function(){s(c,!0)}))}),b.noAutoCallback||(b.noAutoCallback=!0)}};return function(g){var h,i,j,k,l=[],m=function(d,e){return k=e,a.each(f.c[e],function(c,d){return-1==a.inArray(d,l)||-1!=a.inArray(d,b)?(k=!1,!1):void 0}),k?(c("combos/"+k,f.c[k]),!1):void 0};for(i=0;i<g.length;i++)h=v[g[i]],h&&!d(h.name,g)&&(h.css&&q.loadStyles&&w.loadCSS(h.css),h.loadInit&&h.loadInit(),e(h,g),h.loaded||l.push(h.name),h.loaded=!0);for(i=0,j=l.length;j>i;i++)k=!1,h=l[i],-1==a.inArray(h,b)&&("noCombo"!=q.debug&&a.each(v[h].c,m),k||c(v[h].src||h,h))}}(),makePath:function(a){return-1!=a.indexOf("//")||0===a.indexOf("/")?a:(-1==a.indexOf(".")&&(a+=".js"),q.addCacheBuster&&(a+=q.addCacheBuster),q.basePath+a)},loadCSS:function(){var b,c={};return function(d){d=this.makePath(d),c[d]||(b=b||a("link, style")[0]||a("script")[0],c[d]=1,a('<link rel="stylesheet" />').insertBefore(b).attr({href:d}))}}(),loadScript:function(){var b={};return function(c,d,e,f){if(f||(c=w.makePath(c)),!b[c]){var g=function(){d&&d(),e&&("string"==typeof e&&(e=e.split(" ")),a.each(e,function(a,b){v[b]&&(v[b].afterLoad&&v[b].afterLoad(),s(v[b].noAutoCallback?b+"FileLoaded":b,!0))}))};b[c]=1,q.loadScript(c,g,a.noop)}}}()}});var q=f.cfg,r=f.features,s=f.isReady,t=f.ready,u=f.addPolyfill,v=f.modules,w=f.loader,x=w.loadList,y=w.addModule,z=f.bugs,A=[],B={warn:1,error:1},C=a.fn,D=b("video");f.addMethodName=function(a){a=a.split(":");var b=a[1];1==a.length?(b=a[0],a=a[0]):a=a[0],C[a]=function(){return this.callProp(b,arguments)}},C.callProp=function(b,c){var d;return c||(c=[]),this.each(function(){var e=a.prop(this,b);if(e&&e.apply){if(d=e.apply(this,c),void 0!==d)return!1}else f.warn(b+" is not a method of "+this)}),void 0!==d?d:this},f.activeLang=function(){"language"in e||(e.language=e.browserLanguage||"");var b=a.attr(document.documentElement,"lang")||e.language;return t("webshimLocalization",function(){f.activeLang(b)}),function(a){if(a)if("string"==typeof a)b=a;else if("object"==typeof a){var c=arguments,d=this;t("webshimLocalization",function(){f.activeLang.apply(d,c)})}return b}}(),f.errorLog=[],a.each(["log","error","warn","info"],function(a,b){f[b]=function(a){(B[b]&&q.debug!==!1||q.debug)&&(f.errorLog.push(a),window.console&&console.log&&console[console[b]?b:"log"](a))}}),function(){a.isDOMReady=a.isReady;var b=function(){a.isDOMReady=!0,s("DOM",!0),setTimeout(function(){s("WINDOWLOAD",!0)},9999)};c=function(){if(!c.run){if(!a.isDOMReady&&q.waitReady){var d=a.ready;a.ready=function(a){return a!==!0&&document.body&&b(),d.apply(this,arguments)},a.ready.promise=d.promise}q.readyEvt?a(document).one(q.readyEvt,b):a(b)}c.run=!0},a(window).on("load",function(){b(),setTimeout(function(){s("WINDOWLOAD",!0)},9)});var d=[],e=function(){1==this.nodeType&&f.triggerDomUpdate(this)};a.extend(f,{addReady:function(a){var b=function(b,c){f.ready("DOM",function(){a(b,c)})};d.push(b),q.wsdoc&&b(q.wsdoc,i)},triggerDomUpdate:function(b){if(!b||!b.nodeType)return void(b&&b.jquery&&b.each(function(){f.triggerDomUpdate(this)}));var c=b.nodeType;if(1==c||9==c){var e=b!==document?a(b):i;a.each(d,function(a,c){c(b,e)})}}}),C.clonePolyfill=C.clone,C.htmlPolyfill=function(b){if(!arguments.length)return a(this.clonePolyfill()).html();var c=C.html.call(this,b);return c===this&&a.isDOMReady&&this.each(e),c},C.jProp=function(){return this.pushStack(a(C.prop.apply(this,arguments)||[]))},a.each(["after","before","append","prepend","replaceWith"],function(b,c){C[c+"Polyfill"]=function(b){return b=a(b),C[c].call(this,b),a.isDOMReady&&b.each(e),this}}),a.each(["insertAfter","insertBefore","appendTo","prependTo","replaceAll"],function(b,c){C[c.replace(/[A-Z]/,function(a){return"Polyfill"+a})]=function(){return C[c].apply(this,arguments),a.isDOMReady&&f.triggerDomUpdate(this),this}}),C.updatePolyfill=function(){return a.isDOMReady&&f.triggerDomUpdate(this),this},a.each(["getNativeElement","getShadowElement","getShadowFocusElement"],function(a,b){C[b]=function(){return this.pushStack(this)}})}(),l.create&&(f.objectCreate=function(b,c,d){var e=l.create(b);return d&&(e.options=a.extend(!0,{},e.options||{},d),d=e.options),e._create&&a.isFunction(e._create)&&e._create(d),e}),y("swfmini",{test:function(){return window.swfobject&&!window.swfmini&&(window.swfmini=window.swfobject),"swfmini"in window},c:[16,7,2,8,1,12,23]}),v.swfmini.test(),y("sizzle",{test:a.expr.filters}),u("es5",{test:!(!k.ES5||!Function.prototype.bind),d:["sizzle"]}),u("dom-extend",{f:g,noAutoCallback:!0,d:["es5"],c:[16,7,2,15,30,3,8,4,9,10,25,31,34]}),b("picture"),u("picture",{test:"picturefill"in window||!!window.HTMLPictureElement||"respimage"in window,d:["matchMedia"],c:[18],loadInit:function(){s("picture",!0)}}),u("matchMedia",{test:!(!window.matchMedia||!matchMedia("all").addListener),c:[18]}),u("sticky",{test:-1!=(a(b("b")).attr("style","position: -webkit-sticky; position: sticky").css("position")||"").indexOf("sticky"),d:["es5","matchMedia"]}),u("es6",{test:!!(Math.imul&&Number.MIN_SAFE_INTEGER&&l.is&&window.Promise&&Promise.all),d:["es5"]}),u("geolocation",{test:"geolocation"in e,options:{destroyWrite:!0},c:[21]}),function(){u("canvas",{src:"excanvas",test:"getContext"in b("canvas"),options:{type:"flash"},noAutoCallback:!0,loadInit:function(){var a=this.options.type;!a||-1===a.indexOf("flash")||v.swfmini.test()&&!swfmini.hasFlashPlayerVersion("9.0.0")||(this.src="flash"==a?"FlashCanvas/flashcanvas":"FlashCanvasPro/flashcanvas")},methodNames:["getContext"],d:[g]})}();var E="getUserMedia"in e;u("usermedia-core",{f:"usermedia",test:E&&window.URL,d:["url",g]}),u("usermedia-shim",{f:"usermedia",test:!!(E||e.webkitGetUserMedia||e.mozGetUserMedia||e.msGetUserMedia),d:["url","mediaelement",g]}),u("mediacapture",{test:p,d:["swfmini","usermedia",g,"filereader","forms","canvas"]}),function(){var c,d,h="form-shim-extend",i="formvalidation",j="form-number-date-api",l=!1,m=!1,o=!1,p={},r=b("progress"),s=b("output"),t=function(){var d,f,g="1(",j=b("input");if(f=a('<fieldset><textarea required="" /></fieldset>')[0],k.inputtypes=p,a.each(["range","date","datetime-local","month","color","number"],function(a,b){j.setAttribute("type",b),p[b]=j.type==b&&(j.value=g)&&j.value!=g}),k.datalist=!!("options"in b("datalist")&&window.HTMLDataListElement),k[i]="checkValidity"in j,k.fieldsetelements="elements"in f,k.fieldsetdisabled="disabled"in f){try{f.querySelector(":invalid")&&(f.disabled=!0,d=!f.querySelector(":invalid")&&f.querySelector(":disabled"))}catch(a){}k.fieldsetdisabled=!!d}if(k[i]&&(m=!(k.fieldsetdisabled&&k.fieldsetelements&&"value"in r&&"value"in s),o=m&&/Android/i.test(e.userAgent),l=window.opera||z.bustedValidity||m||!k.datalist,!l&&p.number)){l=!0;try{j.type="number",j.value="",j.stepUp(),l="1"!=j.value}catch(a){}}return z.bustedValidity=l,c=k[i]&&!l?"form-native-extend":h,t=a.noop,!1},w=function(b){var c=!0;return b._types||(b._types=b.types.split(" ")),a.each(b._types,function(a,b){return b in p&&!p[b]?(c=!1,!1):void 0}),c};f.validationMessages=f.validityMessages={langSrc:"i18n/formcfg-",availableLangs:"ar bg ca cs el es fa fi fr he hi hu it ja lt nl no pl pt pt-BR pt-PT ru sv zh-CN zh-TW".split(" ")},f.formcfg=a.extend({},f.validationMessages),f.inputTypes={},u("form-core",{f:"forms",test:t,d:["es5"],options:{placeholderType:"value",messagePopover:{},list:{popover:{constrainWidth:!0}},iVal:{sel:".ws-validate",handleBubble:"hide",recheckDelay:400}},methodNames:["setCustomValidity","checkValidity","setSelectionRange"],c:[16,7,2,8,1,15,30,3,31]}),d=q.forms,u("form-native-extend",{f:"forms",test:function(b){return t(),!k[i]||l||-1==a.inArray(j,b||[])||v[j].test()},d:["form-core",g,"form-message"],c:[6,5,14,29]}),u(h,{f:"forms",test:function(){return t(),k[i]&&!l},d:["form-core",g,"sizzle"],c:[16,15,28]}),u(h+"2",{f:"forms",test:function(){return t(),k[i]&&!m},d:[h],c:[27]}),u("form-message",{f:"forms",test:function(a){return t(),!(d.customMessages||!k[i]||l||!v[c].test(a))},d:[g],c:[16,7,15,30,3,8,4,14,28]}),u(j,{f:"forms-ext",options:{types:"date time range number"},test:function(){t();var a=!l;return a&&(a=w(this.options)),a},methodNames:["stepUp","stepDown"],d:["forms",g],c:[6,5,17,14,28,29,33]}),y("range-ui",{options:{},noAutoCallback:!0,test:function(){return!!C.rangeUI},d:["es5"],c:[6,5,9,10,17,11]}),u("form-number-date-ui",{f:"forms-ext",test:function(){var a=this.options;return a.replaceUI=n(a.replaceUI),t(),!a.replaceUI&&o&&(a.replaceUI=!0),!a.replaceUI&&w(a)},d:["forms",g,j,"range-ui"],options:{widgets:{calculateWidth:!0,animate:!0}},c:[6,5,9,10,17,11]}),u("form-datalist",{f:"forms",test:function(){return t(),o&&(d.customDatalist=!0),k.datalist&&!d.fD},d:["form-core",g],c:[16,7,6,2,9,15,30,31,28,33]})}();var F="FileReader"in window&&"FormData"in window;return u("filereader-xhr",{f:"filereader",test:F,d:[g,"swfmini"],c:[25,27]}),u("canvas-blob",{f:"filereader",methodNames:["toBlob"],test:!(F&&!b("canvas").toBlob)}),u("details",{test:"open"in b("details"),d:[g],options:{text:"Details"},c:[21,22]}),u("url",{test:function(){var a=!1;try{a=new URL("b","http://a"),a=!(!a.searchParams||"http://a/b"!=a.href)}catch(a){}return a},d:["es5"]}),function(){f.mediaelement={};var c=b("track");if(k.mediaelement="canPlayType"in D,k.texttrackapi="addTextTrack"in D,k.track="kind"in c,b("audio"),!(z.track=!k.texttrackapi))try{z.track=!("oncuechange"in D.addTextTrack("metadata"))}catch(a){}u("mediaelement-core",{f:"mediaelement",noAutoCallback:!0,options:{jme:{},plugins:[],vars:{},params:{},attrs:{},changeSWF:a.noop},methodNames:["play","pause","canPlayType","mediaLoad:load"],d:["swfmini"],c:[16,7,2,8,1,12,13,23]}),u("mediaelement-jaris",{f:"mediaelement",d:["mediaelement-core",g],test:function(){var a=this.options;return!(!k.mediaelement||f.mediaelement.loadSwf)&&(a.preferFlash&&!v.swfmini.test()&&(a.preferFlash=!1),!(a.preferFlash&&swfmini.hasFlashPlayerVersion("11.3")))},c:[21,25]}),u("track",{options:{positionDisplay:!0,override:z.track},test:function(){var a=this.options;return a.override=n(a.override),!a.override&&!z.track},d:["mediaelement",g],methodNames:["addTextTrack"],c:[21,12,13,22,34]}),y("jmebase",{src:"jme/base",c:[98,99,97]}),a.each([["mediacontrols",{c:[98,99],css:"jme/controls.css"}],["playlist",{c:[98,97]}],["alternate-media"]],function(b,c){y(c[0],a.extend({src:"jme/"+c[0],d:["jmebase"]},c[1]))}),y("track-ui",{d:["track",g]})}(),u("feature-dummy",{test:!0,loaded:!0,c:A}),f.$=a,a.webshims=f,a.webshim=webshim,f.callAsync=function(){f.callAsync=a.noop,j&&(j.cfg&&(j.cfg.length||(j.cfg=[[j.cfg]]),a.each(j.cfg,function(a,b){f.setOptions.apply(f,b)})),j.ready&&a.each(j.ready,function(a,b){f.ready.apply(f,b)}),j.lang&&f.activeLang(j.lang),"polyfill"in j&&f.polyfill(j.polyfill)),f.isReady("jquery",!0)},f.callAsync(),f})}),c.registerDynamic("14",["13"],!0,function(a,b,c){this||self;c.exports=a("13")}),c.register("15",["10","12","14","f","d"],function(a){return{setters:[function(a){},function(a){},function(a){},function(a){},function(a){}],execute:function(){!function(a){a.fn.disable=function(){return this.prop("disabled",!0).addClass("disabled")},a.fn.enable=function(){return this.prop("disabled",!1).removeClass("disabled")},a.fn.check=function(){return this.prop("checked",!0)},a.fn.uncheck=function(){return this.prop("checked",!1)},a.fn._tooltip=a.fn.tooltip,a.fn.tooltip=function(b){return this._tooltip("destroy")._tooltip(a.extend({container:"body",placement:"bottom",delay:{show:1e3}},b))},a.modalActive=function(){var b=!1;return a(".modal").each(function(){var c=a(this).data("bs.modal");if(c)return b=c.isShown,!b}),b},a.fn.wiggle=function(){this.finish().effect("bounce",{direction:"left",distance:24,times:4},250)}}(jQuery)}}}),c.register("16",["17","18","19","1a"],function(a){var b,c,d,e;return{setters:[function(a){b=a.default},function(a){c=a.default},function(a){d=a.default},function(a){e=a.default}],execute:function(){a("default",e.createClass({displayName:"sidebar",clearSession:function(){sessionStorage.clear()},downloadFastaOfAll:function(){var a=[];this.props.data.queries.forEach(function(b){return b.hits.forEach(function(b){return a.push(b.id)})});var b=this.props.data.querydb.map(function(a){return a.id});return c(a,b),!1},downloadFastaOfSelected:function(){var a=$(".hit-links :checkbox:checked").map(function(){return this.value}).get(),d=b.map(this.props.data.querydb,b.iteratee("id"));return c(a,d),!1},downloadAlignmentOfAll:function(){var a=0,b=[];this.props.data.queries.forEach(function(c){return c.hits.forEach(function(d){a++,d.hsps.forEach(function(a){a.query_id=c.id,a.hit_id=d.id,b.push(a)})})});var c=new d,e="alignment-"+a+"_hits";return c.export_alignments(b,e),!1},downloadAlignmentOfSelected:function(){var a=$(".hit-links :checkbox:checked").map(function(){return this.value}).get(),c=[],e=new d;return console.log("check "+a.toString()),b.each(this.props.data.queries,b.bind(function(d){b.each(d.hits,function(e){b.indexOf(a,e.id)!=-1&&b.each(e.hsps,function(a){a.hit_id=e.id,a.query_id=d.id,c.push(a)})})},this)),e.export_alignments(c,"alignment-"+a.length+"_hits"),!1},render:function(){return e.createElement("div",{className:"sidebar"},this.topPanelJSX(),this.downloadsPanelJSX())},topPanelJSX:function(){var a=location.pathname.split("/"),b=a.pop(),c=a.join("/");return e.createElement("div",{className:"sidebar-top-panel"},e.createElement("div",{className:"section-header-sidebar"},e.createElement("h4",null,this.summaryString())),e.createElement("div",null,e.createElement("a",{href:c+"/?job_id="+b},e.createElement("i",{className:"fa fa-pencil"})," Edit search"),e.createElement("span",{className:"line"},"|"),e.createElement("a",{href:c+"/",onClick:this.clearSession},e.createElement("i",{className:"fa fa-file-o"})," New search")),this.props.shouldShowIndex&&this.indexJSX())},summaryString:function(){var a=this.props.data.program,b=this.props.data.queries.length,c=this.props.data.querydb.length;return a.toUpperCase()+": "+b+" "+(b>1?"queries":"query")+", "+c+" "+(c>1?"databases":"database")},indexJSX:function(){return e.createElement("ul",{className:"nav hover-reset active-bold"}," ",b.map(this.props.data.queries,function(a){return e.createElement("li",{key:"Side_bar_"+a.id},e.createElement("a",{className:"btn-link nowrap-ellipsis hover-bold",title:"Query= "+a.id+" "+a.title,href:"#Query_"+a.number},"Query= "+a.id))}))},downloadsPanelJSX:function(){return e.createElement("div",{className:"downloads"},e.createElement("div",{className:"section-header-sidebar"},e.createElement("h4",null,"Download FASTA, XML, TSV")),e.createElement("ul",{className:"nav"},!(this.props.data.imported_xml||this.props.data.non_parse_seqids)&&e.createElement("li",null,e.createElement("a",{href:"#",className:"btn-link download-fasta-of-all "+(!this.props.atLeastOneHit&&"disabled"),onClick:this.downloadFastaOfAll},"FASTA of all hits")),!(this.props.data.imported_xml||this.props.data.non_parse_seqids)&&e.createElement("li",null,e.createElement("a",{href:"#",className:"btn-link download-fasta-of-selected disabled",onClick:this.downloadFastaOfSelected},"FASTA of ",e.createElement("span",{className:"text-bold"})," selected hit(s)")),e.createElement("li",null,e.createElement("a",{href:"#",className:"btn-link download-alignment-of-all "+(!this.props.atLeastOneHit&&"disabled"),onClick:this.downloadAlignmentOfAll},"Alignment of all hits")),e.createElement("li",null,e.createElement("a",{href:"#",className:"btn-link download-alignment-of-selected disabled",onClick:this.downloadAlignmentOfSelected},"Alignment of ",e.createElement("span",{className:"text-bold"})," selected hit(s)")),!this.props.data.imported_xml&&e.createElement("li",null,e.createElement("a",{className:"btn-link download","data-toggle":"tooltip",title:"15 columns: query and subject ID; scientific name, alignment length, mismatches, gaps, identity, start and end coordinates, e value, bitscore, query coverage per subject and per HSP.",href:"download/"+this.props.data.search_id+".std_tsv"},"Standard tabular report")),!this.props.data.imported_xml&&e.createElement("li",null,e.createElement("a",{className:"btn-link download","data-toggle":"tooltip",title:"44 columns: query and subject ID, GI, accessions, and length; alignment details; taxonomy details of subject sequence(s) and query coverage per subject and per HSP.",href:"download/"+this.props.data.search_id+".full_tsv"},"Full tabular report")),!this.props.data.imported_xml&&e.createElement("li",null,e.createElement("a",{className:"btn-link download","data-toggle":"tooltip",title:"Results in XML format.",href:"download/"+this.props.data.search_id+".xml"},"Full XML report"))))}}))}}}),c.registerDynamic("1b",[],!0,function(a,b,c){var e,f=(this||self,[].indexOf||function(a){for(var b=0,c=this.length;b<c;b++)if(b in this&&this[b]===a)return b;return-1});"function"!=typeof Object.assign&&(Object.assign=function(a){"use strict";var b,c,d;if(null===a)throw new TypeError("Cannot convert undefined or null to object");for(a=Object(a),b=1;b<arguments.length;){if(d=arguments[b],null!==d)for(c in d)Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c]);b++}return a}),e=function(a){var b;return b=new e.Core(a)},e.Core=function(a){return this.tracks={heatmaps:{},histograms:{},chords:{},scatters:{},lines:{},stacks:{},highlights:{},texts:{}},this.conf=e.mixConf(a,this.defaultConf),this},e.Core.prototype.removeTracks=function(a){var b,c,d,e,f,g,h,i;g=d3.select(this.conf.container),e=this.tracks;for(i in e)if(f=e[i],"object"==typeof a)for(c=0,d=a.length;c<d;c++)b=a[c],b in f&&(g.select("."+b).remove(),delete f[b]);else if("string"==typeof a)a in f&&(g.select("."+a).remove(),delete f[a]);else if("undefined"==typeof a)for(h in f)g.select("."+h).remove(),delete f[h];return this},e.Core.prototype.layout=function(a,b){return this._layout=new e.Layout(a,b),this},e.log=function(a,b,c,d){var e;e=["Permanent log","Error","Warning","Info"],console.log("CircosJS: ",e[a]+" ["+b+"] ",c,d)},e.mixConf=function(a,b){var c,d,f;d={};for(c in b)f=b[c],c in a?"[object Array]"===Object.prototype.toString.call(f)?d[c]=a[c]:"object"==typeof f&&null!=f?null!=f&&0===Object.keys(f).length?d[c]=a[c]:d[c]=e.mixConf(a[c],f):d[c]=a[c]:d[c]=f;return d},e.Core.prototype.smartBorders=function(){var a,b,c,d,e,f,g,h,i,j,k,l;l=this.conf.defaultTrackWidth,e={in:this._layout.conf.innerRadius,out:this._layout.conf.outerRadius},b=[],g=this.tracks;for(k in g){h=g[k];for(j in h)i=h[j],i.conf.innerRadius&&b.push({in:i.conf.innerRadius,out:i.conf.outerRadius})}for(b=b.sort(function(a,b){return a.out>b.out,a.out<b.out,0}),c=e,d=0,f=b.length;d<f;d++){if(a=b[d],a.out<c.in-l)return{in:c.in-l,out:c.in};c=a}return c.in>l?{in:c.in-l,out:c.in}:{in:b[0].out,out:b[0].out+l}},"undefined"!=typeof c&&null!==c&&(c.exports=e),e.checkParent=function(a,b,c,d){return a in c||(e.log(1,"datum","unknown parent id",{line:b+1,value:a,header:d,layoutSummary:c}),!1)},e.checkNumber=function(a,b){var c,d;for(c in a)if(d=a[c],isNaN(d))return e.log(1,"datum","not a number",{line:b+1,value:d,header:c}),!1;return!0},e.parseSpanValueData=function(a,b){var c,d;return a.length>0?(d=a[0],"parent_id"in d&&"start"in d&&"end"in d&&"value"in d&&(a=a.map(function(a){return[a.parent_id,a.start,a.end,a.value]})),a=a.filter(function(a,c){return e.checkParent(a[0],c,b,"parent")}).filter(function(a,b){return e.checkNumber({start:a[1],end:a[2],value:a[3]},b)}).map(function(a){return(a[1]<0||a[2]>b[a[0]])&&e.log(2,"position","position inconsistency",{datum:a,layoutSummary:b}),{block_id:a[0],start:Math.max(0,parseFloat(a[1])),end:Math.min(b[a[0]],parseFloat(a[2])),value:parseFloat(a[3])||1}}),c=d3.nest().key(function(a){return a.block_id}).entries(a),{data:c,meta:{min:d3.min(a,function(a){return a.value}),max:d3.max(a,function(a){return a.value})}}):{data:[],meta:{min:null,max:null}}},e.parseSpanStringData=function(a,b){var c,d;return d=a[0],"parent_id"in d&&"start"in d&&"end"in d&&"value"in d&&(a=a.map(function(a){return[a.parent_id,a.start,a.end,a.value]})),a=a.filter(function(a,c){return e.checkParent(a[0],c,b,"parent")}).filter(function(a,b){return e.checkNumber({start:a[1],end:a[2]},b)}).map(function(a){var c;return(a[1]<0||a[2]>b[a[0]])&&e.log(2,"position","position inconsistency",{datum:a,layoutSummary:b}),c=null!=a[3]?a[3]:null,{block_id:a[0],start:Math.max(0,parseFloat(a[1])),end:Math.min(b[a[0]],parseFloat(a[2])),value:c}}),c=d3.nest().key(function(a){return a.block_id}).entries(a),{data:c,meta:{min:d3.min(a,function(a){return a.value}),max:d3.max(a,function(a){return a.value})}}},e.parsePositionValueData=function(a,b){var c,d;return d=a[0],"parent_id"in d&&"position"in d&&(a=a.map(function(a){return[a.parent_id,a.position,a.value]})),a=a.filter(function(a,c){return e.checkParent(a[0],c,b,"parent")}).filter(function(a,b){return e.checkNumber({position:a[1],value:a[2]},b)}).map(function(a){return{block_id:a[0],position:Math.min(b[a[0]],parseFloat(a[1])),value:parseFloat(a[2])||1}}),c=d3.nest().key(function(a){return a.block_id}).entries(a),{data:c,meta:{min:d3.min(a,function(a){return a.value}),max:d3.max(a,function(a){return a.value})}}},e.parsePositionTextData=function(a,b){var c,d;return d=a[0],"parent_id"in d&&"position"in d&&(a=a.map(function(a){return[a.parent_id,a.position,a.value]})),a=a.filter(function(a,c){return e.checkParent(a[0],c,b,"parent")}).filter(function(a,b){return e.checkNumber({position:a[1]},b)}).map(function(a){return{block_id:a[0],position:Math.min(b[a[0]],parseFloat(a[1])),value:a[2]}}),c=d3.nest().key(function(a){return a.block_id}).entries(a),{data:c,meta:{min:d3.min(a,function(a){return a.value}),max:d3.max(a,function(a){return a.value})}}},e.parseChordData=function(a,b){var c;return c=a[0],"source_id"in c&&"source_start"in c&&"target_id"in c&&"target_start"in c&&"target_end"in c&&(a=a.map(function(a){var b;return b=[a.source_id,a.source_start,a.source_end,a.target_id,a.target_start,a.target_end],null!=a.value&&b.push(a.value),b})),a=a.filter(function(a,c){return e.checkParent(a[0],c,b,"source_id")}).filter(function(a,c){return e.checkParent(a[3],c,b,"target_id")}).filter(function(a,b){return e.checkNumber({source_start:a[1],source_end:a[2],target_start:a[4],target_end:a[5],value:a[6]||1},b)}).map(function(a){return{source:{id:a[0],start:Math.max(0,parseFloat(a[1])),end:Math.min(b[a[0]],parseFloat(a[2]))},target:{id:a[3],start:Math.max(0,parseFloat(a[4])),end:Math.min(b[a[3]],parseFloat(a[5]))},value:parseFloat(a[6]),hsp:a[7]}}),{data:a,meta:{min:d3.min(a,function(a){return a.value}),max:d3.max(a,function(a){return a.value})}}},e.Layout=function(a,b){var c,d,f,g,h,i,j,k;null==b&&e.log(2,"no layout data",""),this.conf=e.mixConf(a,JSON.parse(JSON.stringify(this.defaultConf))),this.data=b,this.blocks={},this.size=0,g=0,h=this.data;for(f in h)k=h[f],this.blocks[k.id]={label:k.label,len:k.len,color:k.color,offset:g},k.offset=g,g+=k.len;this.size=g,d=this.conf.gap,j=this.size,c=this.data.length,i=this.data;for(f in i)k=i[f],this.blocks[k.id].start=k.offset/j*(2*Math.PI-c*d)+f*d,this.blocks[k.id].end=(k.offset+k.len)/j*(2*Math.PI-c*d)+f*d,k.start=k.offset/j*(2*Math.PI-c*d)+f*d,k.end=(k.offset+k.len)/j*(2*Math.PI-c*d)+f*d;return this.getAngle=function(a,b){var c;return c=this.blocks[a].start/this._size,"deg"===b?360*c:"rad"===b?2*c*Math.PI:null},this.summary=function(){var a,b,c,d,e;for(c={},e=this._data,b=0,d=e.length;b<d;b++)a=e[b],c[a.id]=a.len;return c},this},e.Core.prototype.heatmap=function(a,b,c){var d;return d=new e.Heatmap,d.build(this,b,c),this.tracks.heatmaps[a]=d,this},e.Core.prototype.histogram=function(a,b,c){var d;return d=new e.Histogram,d.build(this,b,c),this.tracks.histograms[a]=d,this},e.Core.prototype.chord=function(a,b,c){var d;return d=new e.Chord,d.build(this,b,c),this.tracks.chords[a]=d,this},e.Core.prototype.scatter=function(a,b,c){var d;return d=new e.Scatter,d.build(this,b,c),this.tracks.scatters[a]=d,this},e.Core.prototype.line=function(a,b,c){var d;return d=new e.Line,d.build(this,b,c),this.tracks.lines[a]=d,this},e.Core.prototype.stack=function(a,b,c){var d;return d=new e.Stack,d.build(this,b,c),this.tracks.stacks[a]=d,this},e.Core.prototype.highlight=function(a,b,c){var d;return d=new e.Highlight,d.build(this,b,c),this.tracks.highlights[a]=d,this},e.Core.prototype.text=function(a,b,c){var d;return d=new e.Text,d.build(this,b,c),this.tracks.texts[a]=d,this},e.Chord=function(){return e.Track.call(this),this.parseData=e.parseChordData,this.applyRules=function(a,b){var c,d,e,f,g;for(a=a||[],f=[],d=0,e=b.length;d<e;d++)c=b[d],f.push(function(){var b,d,e;for(e=[],d=0,b=a.length;d<b;d++)g=a[d],g.condition(c)?e.push(c[g.parameter]=g.value):e.push(void 0);return e}());return f},this.getSource=function(a){return function(a,b){var c,d,e,f;return a=a.source,c=b.blocks[a.id],f=c.start+a.start/c.len*(c.end-c.start),d=c.start+a.end/c.len*(c.end-c.start),e={radius:b.conf.innerRadius,startAngle:f,endAngle:d}}}(this),this.getTarget=function(a){return function(a,b){var c,d,e,f;return a=a.target,c=b.blocks[a.id],f=c.start+a.start/c.len*(c.end-c.start),d=c.start+a.end/c.len*(c.end-c.start),e={radius:b.conf.innerRadius,startAngle:f,endAngle:d}}}(this),this.dimChords=function(a,b,c,d){a.selectAll("path").style("opacity",function(a,b){return d==b?1:0})},this.resetChords=function(a,b){a.selectAll("path").style("opacity",b.opacity)},this.renderChords=function(a,b,c,d,e,f,g,h){var i,j;return j=a.append("g").attr("class",c.colorPalette),i=j.selectAll(".chord").data(d).enter().append("path").attr("class","chord").attr("d",d3.svg.chord().source(function(a){return g(a,e)}).target(function(a){return h(a,e)})).attr("opacity",function(a){return c.opacity}).attr("id",function(a){return a.source.id+"_"+a.target.id}).on("mouseover",function(a){return function(b,d,e){return a.dimChords(j,b,c,d),a.dispatch.mouseover(b,d,e)}}(this)).on("mouseout",function(a){return function(b,d,e){return a.resetChords(j,c),a.dispatch.mouseout(b,d,e)}}(this)),c.usePalette?i.attr("class",function(a){return"q"+f(a.value,c.cmin,c.cmax,c.colorPaletteSize,c.colorPaletteReverse,c.logScale)+"-"+c.colorPaletteSize}):i.attr("fill",function(a){return a.color||c.color}),i},this.render=function(a){return function(b,c,d){var f,g;if(c.select("."+d).remove(),g=c.append("g").attr("class",d).attr("z-index",a.conf.zIndex),f=a.renderChords(g,d,a.conf,a.data,b._layout,a.ratio,a.getSource,a.getTarget),null!=a.conf.tooltipContent)return e.registerTooltip(b,a,f,a.conf)}}(this),this},e.Heatmap=function(){return e.Track.call(this),this.parseData=e.parseSpanValueData,this.renderDatumContainer=function(a){return function(b,c,d,e,f){var g,h;return h=c.append("g").attr("class",f.colorPalette),g=a.renderBlock(h,e,b._layout,f)}}(this),this.renderDatum=function(a,b,c,d){return a.selectAll("tile").data(function(a){return a.values}).enter().append("path").attr("class","tile").attr("opacity",function(a){return a.opacity||b.opacity}).attr("d",d3.svg.arc().innerRadius(b.innerRadius).outerRadius(b.outerRadius).startAngle(function(a,b){return d.theta(a.start,c.blocks[a.block_id])}).endAngle(function(a,b){return d.theta(a.end,c.blocks[a.block_id])})).attr("class",function(a){return"q"+d.ratio(a.value,b.cmin,b.cmax,b.colorPaletteSize,b.colorPaletteReverse,b.logScale)+"-"+b.colorPaletteSize})},this},e.Highlight=function(){return e.Track.call(this),this.parseData=e.parseSpanStringData,this.renderDatumContainer=function(a){return function(b,c,d,e,f){var g;return g=a.renderBlock(c,e,b._layout,f)}}(this),this.renderDatum=function(a,b,c,d){return a.selectAll("tile").data(function(a){return a.values}).enter().append("path").attr("class","tile").attr("d",d3.svg.arc().innerRadius(b.innerRadius).outerRadius(b.outerRadius).startAngle(function(a,b){return d.theta(a.start,c.blocks[a.block_id])}).endAngle(function(a,b){return d.theta(a.end,c.blocks[a.block_id])})).attr("fill",function(a){return a.value||b.color}).attr("opacity",function(a){return a.opacity||b.opacity}).attr("stroke-width",function(a){return a.strokeWidth||b.strokeWidth}).attr("stroke",function(a){return a.strokeColor||b.strokeColor})},this},e.Histogram=function(){return e.Track.call(this),this.parseData=e.parseSpanValueData,this.renderDatumContainer=function(a){return function(b,c,d,e,f){var g,h;return h=c.append("g").attr("class",a.conf.colorPalette),g=a.renderBlock(h,e,b._layout,f)}}(this),this.renderDatum=function(a,b,c,e){var f;return f=a.selectAll(".bin").data(function(a){return a.values}).enter().append("path").attr("class","bin").attr("opacity",function(a){return a.opacity||b.opacity}).attr("d",d3.svg.arc().innerRadius(function(a){var c;return"in"===b.direction?(c=e.ratio(a.value,b.cmin,b.cmax,b.outerRadius-b.innerRadius,!1,b.logscale),b.outerRadius-c):b.innerRadius}).outerRadius(function(a){var c;return"out"===b.direction?(c=e.ratio(a.value,b.cmin,b.cmax,b.outerRadius-b.innerRadius,!1,b.logscale),b.innerRadius+c):b.outerRadius}).startAngle(function(a){return e.theta(a.start,c.blocks[a.block_id])}).endAngle(function(a){return e.theta(a.end,c.blocks[a.block_id])})),b.usePalette?f.attr("class",function(a){return"q"+e.ratio(a.value,b.cmin,b.cmax,b.colorPaletteSize,b.colorPaletteReverse,b.logScale)+"-"+b.colorPaletteSize}):f.attr("fill",d.color||b.color),f},this},e.Line=function(){return e.Track.call(this),this.parseData=e.parsePositionValueData,this.renderDatumContainer=function(a){return function(b,c,d,e,f){var g,h;return h=c.append("g").attr("class",d),g=a.renderBlock(h,e,b._layout,f)}}(this),this.renderDatum=function(a,b,c,d){var e;return e=d3.svg.line().x(function(a){return d.x(a,c,b)}).y(function(a){return d.y(a,c,b)}).interpolate(b.interpolation),a.append("path").datum(function(a){return a.values}).attr("class","line").attr("d",e).attr("opacity",function(a){return a.opacity||b.opacity}).attr("stroke-width",function(a){return a.thickness||b.thickness}).attr("stroke",function(a){return a.color||b.color}).attr("fill",function(a){var c,d;return d=a.fill||b.fill,c=a.fill_color||b.fill_color,d?c:"none"})},this},e.Scatter=function(){return e.Track.call(this),this.parseData=e.parsePositionValueData,this.renderDatumContainer=function(a){return function(b,c,d,e,f){var g,h;return h=c.append("g").attr("class",d),g=a.renderBlock(h,e,b._layout,f)}}(this),this.renderDatum=function(a,b,c,d){var e;return e=a.selectAll(".point").data(function(a){return a.values}).enter().append("path").attr("class","point").attr("opacity",function(a){return a.opacity||b.opacity}).attr("d",d3.svg.symbol().type(b.glyph.shape).size(b.glyph.size)).attr("transform",function(a){
|
4
|
+
return function(a){return"translate("+d.x(a,c,b)+","+d.y(a,c,b)+") rotate("+360*d.theta(a.position,c.blocks[a.block_id])/(2*Math.PI)+")"}}(this)).attr("stroke",function(a){return a.glyph_strokeColor||b.glyph.strokeColor}).attr("stroke-width",function(a){return a.glyph_strokeWidth||b.glyph.strokeWidth}).attr("fill",function(a){var c,d;return d=a.glyph_fill||b.glyph.fill,c=a.glyph_color||b.glyph.color,d?c:"none"})},this},e.Stack=function(){return e.Track.call(this),this.parseData=e.parseSpanValueData,this.build=function(a,b,c,d,e){return this.loadData(c,a),this.conf=this.processConf(b,this.defaultConf,this.meta,a,this),this.buildLayers(this.data,this.conf.margin),this.applyRules(b.rules,this.data)},this.buildLayers=function(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o;for(f in a)for(c=a[f],c.values=c.values.sort(function(a,b){return a.start<b.start?-1:a.start===b.start&&a.end>b.end?-1:a.start===b.start&&a.end===b.end?0:1}),j=[],o=c.values,g=0,k=o.length;g<k;g++){for(d=o[g],n=!1,e=m=0,l=j.length;m<l;e=++m)if(i=j[e],h=i.slice(0).pop(),h.end+b<d.start){i.push(d),d.layer=e,n=!0;break}n||(d.layer=j.length),n||j.push([d])}},this.applyRules=function(a,b){var c,d,e,f,g,h,i;a=a||[],g=[];for(e in b)i=b[e],g.push(function(){var b,e;b=i.layers,e=[];for(d in b)f=b[d],e.push(function(){var b,e,g;for(g=[],b=0,e=f.length;b<e;b++)c=f[b],g.push(function(){var b,e,f;for(f=[],e=0,b=a.length;e<b;e++)h=a[e],h.condition(i.parent,c,d)?f.push(c[h.parameter]=h.value):f.push(void 0);return f}());return g}());return e}());return g},this.datumRadialPosition=function(a){return function(b){var c,d,e;return e=(a.conf.thickness+a.conf.radialMargin)*b.layer,d=e+a.conf.thickness,"out"===a.conf.direction?[a.conf.innerRadius+e,Math.min(a.conf.innerRadius+d,a.conf.outerRadius)]:"in"===a.conf.direction?[Math.max(a.conf.outerRadius-d,a.conf.innerRadius),a.conf.outerRadius-e]:"center"===a.conf.direction?(c=Math.floor((a.conf.outerRadius+a.conf.innerRadius)/2),e=(a.conf.thickness+a.conf.radialMargin)*Math.floor(b.layer/2),d=e+a.conf.thickness,b.layer%2===0?[c+e,c+d]:[c-e-a.conf.radialMargin,c-d-a.conf.radialMargin]):void 0}}(this),this.datumInnerRadius=function(a){return function(b,c,d){return a.datumRadialPosition(b,c,d)[0]}}(this),this.datumOuterRadius=function(a){return function(b,c,d){return a.datumRadialPosition(b,c,d)[1]}}(this),this.renderDatumContainer=function(a){return function(b,c,d,e,f){var g,h;return h=c.append("g").attr("class",f.colorPalette),g=a.renderBlock(h,e,b._layout,f)}}(this),this.renderDatum=function(a,b,c,d){var e;return e=a.selectAll(".tile").data(function(a){return a.values}).enter().append("path").attr("class","tile").attr("d",d3.svg.arc().innerRadius(d.datumInnerRadius).outerRadius(d.datumOuterRadius).startAngle(function(a){return d.theta(a.start,c.blocks[a.block_id])}).endAngle(function(a){return d.theta(a.end,c.blocks[a.block_id])})),e.attr("opacity",function(a){return a.opacity||b.opacity}),e.attr("stroke-width",function(a){return a.strokeWidth||b.strokeWidth}),e.attr("stroke",function(a){return a.strokeColor||b.strokeColor}),e.attr("fill",function(a){return a.color||b.color}),e.attr("class",function(a){var c;if(c=a.usePalette||b.usePalette)return"q"+d.ratio(a.value,b.cmin,b.cmax,b.colorPaletteSize,b.colorPaletteReverse,b.logScale)+"-"+b.colorPaletteSize}),e},this},e.Text=function(){return e.Track.call(this),this.parseData=e.parsePositionTextData,this.renderDatumContainer=function(a){return function(b,c,d,e,f){var g,h;return h=c.append("g").attr("class",d),g=a.renderBlock(h,e,b._layout,f)}}(this),this.renderDatum=function(a,b,c,d){var e,f,g,h;g=a.selectAll("g").data(function(a){return a.values}).enter().append("g").append("text").text(function(a){return a.value}).attr("transform",function(a){var e;return e=360*d.theta(a.position,c.blocks[a.block_id])/(2*Math.PI)-90,"rotate("+e+")translate("+b.innerRadius+",0)"}),f=b.style;for(e in f)h=f[e],g.style(e,h);return g},this},e.Track=function(){return this.build=function(a,b,c){return this.dispatch=d3.dispatch("mouseover","mouseout"),this.loadData(c,a),this.conf=this.processConf(b,this.defaultConf,this.meta,a,this),this.applyRules(b.rules,this.data)},this.loadData=function(a,b){var c,d,e,f,g,h;for(e={},g=b._layout.data,d=0,f=g.length;d<f;d++)c=g[d],e[c.id]=c.len;return h=this.parseData(a,e),this.data=h.data,this.meta=h.meta},this.processConf=function(a,b,c,d,f){var g;return a=e.mixConf(a,Object.assign({},b)),a=f.computeMinMax(a,c),0===a.innerRadius&&0===a.outerRadius&&(g=d.smartBorders(),a.innerRadius=g.in,a.outerRadius=g.out),a},this.applyRules=function(a,b){var c,d,e,f,g,h;a=a||[],f=[];for(e in b)h=b[e],f.push(function(){var b,e;b=h.values,e=[];for(d in b)c=b[d],e.push(function(){var b,e,f;for(f=[],b=0,e=a.length;b<e;b++)g=a[b],g.condition(h.key,c,d)?f.push(c[g.parameter]=g.value):f.push(void 0);return f}());return e}());return f},this.computeMinMax=function(a,b){return a.cmin="smart"===a.min?b.min:a.min,a.cmax="smart"===a.max?b.max:a.max,a},this.ratio=function(a,b,c,d,e,f){var g,h,i;return h=f?2.3:1,b===c||a===b&&!e||a===c&&e?0:a===c||a===b&&e?d-1:(g=(a-b)/(c-b),i=Math.exp(1/h*Math.log(g)),e&&(i=1-i),Math.floor(d*i))},this.render=function(a){return function(b,c,d){var f,g,h,i;return c.select("."+d).remove(),i=c.append("g").attr("class",d).attr("z-index",a.conf.zIndex),f=a.renderDatumContainer(b,i,d,a.data,a.conf),(null!=(g=a.conf.axes)?g.display:void 0)&&a.renderAxes(f,a.conf,b._layout,a.data),h=a.renderDatum(f,a.conf,b._layout,a),null!=a.conf.tooltipContent&&e.registerTooltip(b,a,h,a.conf),h.on("mouseover",function(b,c,d){return a.dispatch.mouseover(b,c,d)}),h.on("mouseout",function(b,c,d){return a.dispatch.mouseout(b,c,d)})}}(this),this.renderBlock=function(a,b,c,d){var e,f;return f=d.outerRadius-d.innerRadius,e=a.selectAll(".block").data(b).enter().append("g").attr("class","block").attr("transform",function(a){return"rotate("+360*c.blocks[a.key].start/(2*Math.PI)+")"}),d.backgrounds&&e.selectAll(".background").data(d.backgrounds).enter().append("path").attr("class","background").attr("fill",function(a){return a.color}).attr("opacity",function(a){return a.opacity||1}).attr("d",d3.svg.arc().innerRadius(function(a){return"in"===d.direction?d.outerRadius-f*a.start:d.innerRadius+f*a.start}).outerRadius(function(a){return"in"===d.direction?d.outerRadius-f*a.end:d.innerRadius+f*a.end}).startAngle(function(a,b,c){return 0}).endAngle(function(a,d,e){return c.blocks[b[e].key].end-c.blocks[b[e].key].start})),e},this.renderAxes=function(a,b,c,d){var e,f,g;return"pixel"===b.axes.minor.spacingType&&(e=function(){var a,c,d,e,f;for(f=[],g=a=c=b.innerRadius,d=b.outerRadius,e=b.axes.minor.spacing;e>0?a<=d:a>=d;g=a+=e)f.push(g);return f}()),f=d3.svg.arc().innerRadius(function(a){return a}).outerRadius(function(a){return a}).startAngle(0).endAngle(function(a,b,e){var f;return f=c.blocks[d[e].key],f.end-f.start}),a.selectAll(".axis").data(e).enter().append("path").attr("opacity",b.opacity).attr("class","axis").attr("d",f).attr("stroke-width",function(a,c){return c%b.axes.major.spacing===0?b.axes.major.thickness:b.axes.minor.thickness}).attr("stroke",function(a,c){return c%b.axes.major.spacing===0?b.axes.major.color:b.axes.minor.color})},this.theta=function(a,b){return a/b.len*(b.end-b.start)},this.x=function(a){return function(b,c,d){var e,f,g;return f=a.ratio(b.value,d.cmin,d.cmax,d.outerRadius-d.innerRadius,!1,d.logscale),g="in"===d.direction?d.outerRadius-f:d.innerRadius+f,e=a.theta(b.position,c.blocks[b.block_id])-Math.PI/2,g*Math.cos(e)}}(this),this.y=function(a){return function(b,c,d){var e,f,g;return f=a.ratio(b.value,d.cmin,d.cmax,d.outerRadius-d.innerRadius,!1,d.logscale),g="in"===d.direction?d.outerRadius-f:d.innerRadius+f,e=a.theta(b.position,c.blocks[b.block_id])-Math.PI/2,g*Math.sin(e)}}(this),this.ratio=function(a,b,c,d,e,f){var g,h,i;return h=f?2.3:1,b===c||a===b&&!e||a===c&&e?0:a===c||a===b&&e?d-1:(g=(a-b)/(c-b),i=Math.exp(1/h*Math.log(g)),e&&(i=1-i),Math.floor(d*i))},this},e.renderLayout=function(a,b,c){var d,f,g,h;if(f=c._layout.conf,b.select(".cs-layout").remove(),h=b.append("g").attr("class","cs-layout").attr("z-index",f.zIndex).on("click",f.onClick),d=h.selectAll("g").data(c._layout.data).enter().append("g").attr("class",function(a){return a.id}).attr("opacity",f.opacity),g=a.svg.arc().innerRadius(f.innerRadius).outerRadius(f.outerRadius).cornerRadius(f.cornerRadius).startAngle(function(a){return a.start}).endAngle(function(a){return a.end}),d.append("path").attr("d",g).attr("fill",function(a){return a.color}).attr("id",function(a){return a.id}),f.labels.display&&e.renderLayoutLabels(f,a,d),f.ticks.display)return e.renderLayoutTicks(f,h,a,c)},e.renderLayoutLabels=function(a,b,c){var d,e,f;return f=a.innerRadius+a.labels.radialOffset,e=b.svg.arc().innerRadius(f).outerRadius(f).startAngle(function(a,b){return a.start}).endAngle(function(a,b){return a.end}),c.append("path").attr("fill","none").attr("stroke","none").attr("d",e).attr("id",function(a){return"arc-label"+a.id}),d=c.append("text").attr("font-size",a.labels.size).attr("text-anchor","middle"),d.append("textPath").attr("startOffset","25%").attr("xlink:href",function(a){return"#arc-label"+a.id}).style("fill",a.labels.color).text(function(a){var b=a.end-a.start;return a.label.slice(0,Math.floor(21*b))+".."})},e.renderLayoutTicks=function(a,b,c,d){var e,f,g;return e=function(b){var d,e;d=(b.end-b.start)/b.len,b.end-b.start>1.57?e=8:b.end-b.start>.785?e=4:b.end-b.start>.3925?e=2:b.end-b.start>0&&(e=0);var f=[],g={angle:0*d+b.start,label:0};f.push(g);var h=c.scale.linear().domain([1,b.len]).range([b.start,b.end]),i=h.ticks(e).length;h.ticks(e).map(function(c,e){var g=(c*d+b.start,b.len*d+b.start,{angle:c*d+b.start,label:c/a.ticks.labelDenominator+a.ticks.labelSuffix});f.push(g)}),f.splice(i,1);var g={angle:b.len*d+b.start-.006,label:b.len/a.ticks.labelDenominator+a.ticks.labelSuffix};return f.push(g),f},f=function(b,c){return a.ticks.labels===!1?null:a.ticks.labelDisplay0===!1&&0===c?null:c%a.ticks.labelSpacing?null:0===c?b/a.ticks.labelDenominator:b/a.ticks.labelDenominator+a.ticks.labelSuffix},g=b.append("g").selectAll("g").data(d._layout.data).enter().append("g").selectAll("g").data(e).enter().append("g").attr("transform",function(b){return"rotate("+(180*b.angle/Math.PI-90)+")translate("+a.outerRadius+",0)"}),g.append("line").attr("x1",0).attr("y1",1).attr("x2",function(b,c){return a.ticks.size.major}).attr("y2",1).style("stroke",a.ticks.color),g.append("text").attr("x",8).attr("dy",".35em").attr("transform",function(a){return a.angle>Math.PI?"rotate(180)translate(-16)":null}).attr("text-anchor",function(a){return a.angle>Math.PI?"end":null}).attr("font-size",a.ticks.labelSize).style("fill",a.ticks.labelColor).text(function(a){return a.label})},e.Core.prototype.render=function(a,b){var c,d,g,h,i,j,k,l,m,n;if("undefined"==typeof a&&(h=!0,a=[]),b){d=this.tracks;for(l in d){k=d[l];for(c in k)j=k[c],i.select("."+c).remove()}}i=d3.select(this.conf.container).attr("width",this.conf.width).attr("height",this.conf.height),n=i.select(".all"),n.empty()&&(n=i.append("g").attr("class","all").attr("transform","translate("+parseInt(this.conf.width/2)+","+parseInt(this.conf.height/2)+")")),g=this.tracks;for(l in g){k=g[l];for(c in k)j=k[c],(h||f.call(a,c)>=0)&&j.render(this,n,c)}return(h||f.call(a,"layout")>=0)&&e.renderLayout(d3,n,this),m=i.selectAll(".all > g").remove(),m[0].sort(function(a,b){return parseInt(a.getAttribute("z-index"))<parseInt(b.getAttribute("z-index"))?-1:parseInt(a.getAttribute("z-index"))>parseInt(b.getAttribute("z-index"))?1:0}),i.select(".all").selectAll("g").data(m[0]).enter().append(function(a){return a}),this},e.Core.prototype.defaultConf={width:700,height:700,container:"circos",defaultTrackWidth:10},e.Layout.prototype.defaultConf={innerRadius:250,outerRadius:300,cornerRadius:5,gap:.04,opacity:1,labels:{position:"center",display:!0,size:14,color:"#000",radialOffset:20},ticks:{display:!0,color:"grey",spacing:1e7,labels:!0,labelSpacing:10,labelSuffix:"Mb",labelDenominator:1e6,labelDisplay0:!0,labelSize:10,labelColor:"#000",labelFont:"default",majorSpacing:5,size:{minor:2,major:5}},onClick:null,onMouseOver:null,zIndex:100},e.axes={display:!1,minor:{spacing:5,spacingType:"pixel",color:"#d3d3d3",thickness:2},major:{spacing:5,color:"#000000",thickness:2}},e.Heatmap.prototype.defaultConf={innerRadius:0,outerRadius:0,min:"smart",max:"smart",colorPalette:"YlGnBu",colorPaletteSize:9,colorPaletteReverse:!1,logScale:!1,rules:[],backgrounds:[],zIndex:1,opacity:1,tooltipContent:null},e.Histogram.prototype.defaultConf={innerRadius:0,outerRadius:0,min:"smart",max:"smart",direction:"out",colorPaletteSize:9,colorPalette:"YlGnBu",usePalette:!0,colorPaletteReverse:!1,color:"#fd6a62",logScale:!1,axes:e.axes,rules:[],backgrounds:[],zIndex:1,opacity:1,tooltipContent:null},e.Chord.prototype.defaultConf={colorPaletteSize:9,colorPalette:"PuBuGn",usePalette:!0,colorPaletteReverse:!1,color:"#fd6a62",opacity:.7,min:"smart",max:"smart",logScale:!1,rules:[],backgrounds:[],zIndex:1,tooltipContent:null},e.Scatter.prototype.defaultConf={innerRadius:0,outerRadius:0,min:"smart",max:"smart",direction:"out",logScale:!1,glyph:{color:"#fd6a62",fill:!0,size:15,shape:"circle",strokeColor:"#d3d3d3",strokeWidth:2},axes:e.axes,rules:[],backgrounds:[],zIndex:1,opacity:1,tooltipContent:null},e.Line.prototype.defaultConf={innerRadius:0,outerRadius:0,min:"smart",max:"smart",direction:"out",logScale:!1,color:"#fd6a62",fill:!0,fill_color:"#d3d3d3",thickness:2,max_gap:1e7,interpolation:"linear",axes:e.axes,rules:[],backgrounds:[],zIndex:1,opacity:1,tooltipContent:null},e.Stack.prototype.defaultConf={innerRadius:0,outerRadius:0,colorPaletteSize:9,colorPalette:"PuBuGn",usePalette:!0,colorPaletteReverse:!1,color:"#fd6a62",min:"smart",max:"smart",direction:"out",logScale:!1,color:"#fd6a62",thickness:10,radialMargin:2,margin:2,strokeWidth:1,strokeColor:"#000000",axes:e.axes,rules:[],backgrounds:[],zIndex:1,opacity:1,tooltipContent:null},e.Highlight.prototype.defaultConf={innerRadius:0,outerRadius:0,defaultColor:"#fd6a62",opacity:.5,rules:[],zIndex:101,strokeColor:"#d3d3d3",strokeWidth:0,tooltipContent:null},e.Text.prototype.defaultConf={innerRadius:0,outerRadius:0,rules:[],backgrounds:[],zIndex:1,style:{},tooltipContent:null},e.registerTooltip=function(a,b,c,d){return b.tip=d3.tip().direction("s").offset([20,0]).html(d.tooltipContent),c.call(b.tip),b.dispatch.on("mouseover",function(a,c,d){return b.tip.attr("class","d3-tip appear").show(a)}),b.dispatch.on("mouseout",function(a,c,d){return b.tip.attr("class","d3-tip").show(a),b.tip.hide()})}}),c.registerDynamic("1c",["1b"],!0,function(a,b,c){this||self;c.exports=a("1b")}),c.register("1d",["17","20","21","22","23","1e","1c","1f"],function(a){var b,c,d,e,f,g,h,i,j,k;return{setters:[function(a){b=a.default},function(a){c=a},function(a){d=a.default},function(a){e=a.default},function(a){f=a.default},function(a){g=a.default},function(a){h=a.default},function(a){i=a.default}],execute:function(){j=function(){function a(b,d){var e=this;f(this,a),this.queries=[],d.queries.forEach(function(a){a.hits.length>0&&e.queries.push(a)}),this.svgContainer=b,this.seq_type=c.get_seq_type(d.program),this.algorithm=d.program,this.initiate()}return e(a,null,[{key:"name",value:function(){return"Queries and their top hits: chord diagram"}},{key:"className",value:function(){return"circos"}},{key:"collapseId",value:function(a){return"circos-collapse"}},{key:"dataName",value:function(a){return"Circos-visualisation"}}]),e(a,[{key:"initiate",value:function(){this.width=this.svgContainer.width(),this.height=600,this.innerRadius=200,this.outerRadius=230,this.query_arr=[],this.hit_arr=[],this.layout_arr=[],this.chords_arr=[],this.hsp_count=50,this.denominator=1,this.spacing=20,this.labelSpacing=10;var a={amino_acid:"aa",nucleic_acid:"bp"};this.construct_layout(),this.iterator_for_edits(),this.hit_arr=b.uniq(this.hit_arr),this.handle_spacing();var c=g.formatPrefix(this.max_length);this.suffix=" "+c.symbol+a[this.seq_type.subject_seq_type],"k"==c.symbol?this.denominator=1e3:"M"==c.symbol?(this.denominator=1e6,this.spacing=1e6,this.labelSpacing=2e5):"g"==c.symbol&&(this.denominator=1e9),g.select(this.svgContainer[0]).insert("svg",":first-child").attr("class","circosContainer"),this.create_instance(this.svgContainer,this.width,this.height),this.chords_arr.length&&this.layout_arr.length?this.instance_render():this.render_error(),this.setupTooltip()}},{key:"iterator_for_edits",value:function(){this.max_length=this.calculate_max_length(),this.hit_arr.length>10&&this.complex_layout_edits()}},{key:"construct_layout",value:function(){var a=0,c=32,d=this.queries.length,e=Math.min(c/2,d),f=(c-e)/e;this.new_layout=[],this.data=b.map(this.queries,b.bind(function(c){if(a<e){var d=c.id,g=c.length,h={len:g,color:"#8dd3c7",label:d,id:"Query_"+this.clean_id(c.id),ori_id:d};this.layout_arr.push(h);b.map(c.hits,b.bind(function(a){if(a.number<f){b.map(a.hsps,b.bind(function(d){if(b.indexOf(this.hit_arr,a.id)==-1){var e=a.id,f=a.length;this.hit_arr.push(a.id);var g={len:f,color:"#80b1d3",label:e,id:"Hit_"+this.clean_id(a.id),ori_id:e};this.layout_arr.push(g)}var h=["Query_"+this.clean_id(c.id),d.qstart,d.qend,"Hit_"+this.clean_id(a.id),d.sstart,d.send,a.number,d];return this.chords_arr.push(h),d},this));return a}},this))}return this.query_arr.push(c.id),c},this))}},{key:"rearrange_new_layout",value:function(){b.each(this.new_layout,b.bind(function(a){var b=a.id.slice(0,3);"Que"==b&&this.layout_arr.push(a)},this)),b.each(this.new_layout,b.bind(function(a){var b=a.id.slice(0,3);"Hit"==b&&this.layout_arr.push(a)},this))}},{key:"complex_layout_edits",value:function(){this.delete_from_layout=[],this.delete_from_chords=[],b.each(this.layout_arr,b.bind(function(a,c){var d=(a.len/this.max_length).toFixed(3);a.label;d<.1&&"Que"!=a.id.slice(0,3)&&(this.delete_from_layout.push(a),this.hit_arr.slice(b.indexOf(this.hit_arr,a.label),1))},this))}},{key:"check_in_chords_arr",value:function(a,c,d){var e=0;b.each(this.chords_arr,b.bind(function(b){"Que"==c&&b[0]!=a&&e++},this)),e==this.chords_arr.length&&(console.log("no record found "+a),this.delete_arr.push(d))}},{key:"find_index_of_hit",value:function(a){var c;return b.each(this.queries,b.bind(function(d){b.each(d.hits,b.bind(function(b){var d="Hit_"+this.clean_id(b.id);a==d&&(c=b.id)},this))},this)),b.indexOf(this.layout_arr,c)}},{key:"edit_labels",value:function(){console.log("label edits"),b.each(this.layout_arr,b.bind(function(a){var b=(a.len/this.max_length).toFixed(3),c=a.label;b<.41?a.label="..":c.length>10?a.label=c.slice(0,2)+"...":a.label=a.ori_id},this))}},{key:"calculate_multipliers",value:function(){var a=0,c=0;b.each(this.query_arr,b.bind(function(c){b.each(this.data,b.bind(function(b){c==b.id&&(a+=b.length)},this))},this)),b.each(this.data,b.bind(function(a){b.each(a.hits,b.bind(function(a){var d=b.indexOf(this.hit_arr,a.id);d>=0&&(c+=a.length)},this))},this));var d=(a+c)/2;console.log("mid sum "+d+" hit_sum "+c+" query_sum "+a),this.query_multiplier=(d/a).toFixed(3),this.hit_multiplier=(d/c).toFixed(3),console.log("query "+this.query_multiplier+" hit "+this.hit_multiplier)}},{key:"handle_spacing",value:function(){this.max_length>16e3?this.spacing=200:this.max_length>12e3?this.spacing=150:this.max_length>8e3?this.spacing=100:this.max_length>4e3?this.spacing=75:this.max_length>1800&&(this.spacing=50)}},{key:"calculate_max_length",value:function(){var a=0;return b.each(this.layout_arr,function(b){a<b.len&&(a=b.len)}),a}},{key:"clean_id",value:function(a){return a.replace(/[^a-zA-Z0-9]/g,"")}},{key:"create_instance",value:function(a,b,c){this.instance=new h({container:".circosContainer",width:b,height:c}),this.chord_layout(),this.instance_layout()}},{key:"chord_layout",value:function(){return this.chords_arr.length>32?this.paletteSize=32:this.paletteSize=this.chords_arr.length,{usePalette:!0,colorPaletteSize:this.paletteSize,colorPalette:"RdYlBu",opacity:.85}}},{key:"instance_layout",value:function(){return{innerRadius:this.innerRadius,outerRadius:this.outerRadius,cornerRadius:1,labels:{display:!0,size:"10px",radialOffset:10},ticks:{display:!0,spacing:this.spacing,labelSpacing:this.labelSpacing,labelDenominator:this.denominator,labelSuffix:this.suffix,labelSize:"10px",majorSpacing:this.labelSpacing,size:{minor:0,major:4}}}}},{key:"instance_render",value:function(){this.instance.layout(this.instance_layout(),this.layout_arr),this.instance.chord("chord1",this.chord_layout(),this.chords_arr),this.instance.render()}},{key:"render_error",value:function(){this.svgContainer.find("svg").remove(),this.svg=g.select(this.svgContainer[0]).insert("svg",":first-child").attr("width",this.svgContainer.width()).attr("height",this.svgContainer.height()).append("g").attr("class","circos-error").attr("transform","translate("+this.svgContainer.width()/2+","+this.svgContainer.height()/2+")").append("text").attr("text-anchor","start").attr("dy","-0.25em").attr("x",-175).style("font-size","14px").text("Circos looks great with less than 16 queries")}},{key:"layoutReset",value:function(){this.layoutHide=[],b.each(this.layout_arr,function(a){$("."+a.id).css("opacity",1)})}},{key:"chordsReset",value:function(){this.chordsHide=[],b.each(this.chords_arr,function(a){var b=a[1]+a[2],c=a[4]+a[5];$("#"+a[0]+"_"+b+"_"+a[3]+"_"+c).show()})}},{key:"chordsCheck",value:function(a,c){b.each(this.chords_arr,b.bind(function(b,d){"Que"==c&&b[0]==a&&(this.chordsHide.push(d),this.layoutHide.push(b[3])),"Hit"==c&&b[3]==a&&(this.chordsHide.push(d),this.layoutHide.push(b[0]))},this))}},{key:"chordsClean",value:function(){b.each(this.chords_arr,b.bind(function(a,c){if(b.indexOf(this.chordsHide,c)==-1){var d=a[1]+a[2],e=a[4]+a[5];$("#"+a[0]+"_"+d+"_"+a[3]+"_"+e).hide()}},this))}},{key:"layoutClean",value:function(){b.each(this.layout_arr,b.bind(function(a,c){b.indexOf(this.layoutHide,a.id)==-1&&$("."+a.id).css("opacity",.1)},this))}},{key:"setupTooltip",value:function(){var a={};$(".circos-distribution").on("click",b.bind(function(b){b.stopPropagation(),this.layoutReset(),this.chordsReset(),a={}},this)),b.each(this.query_arr,b.bind(function(c,d){this.chordsHide=[],this.layoutHide=[],c&&$(".circos .Query_"+this.clean_id(c)).attr("data-toggle","tooltip").attr("title",c).on("click",b.bind(function(b){if(b.stopPropagation(),a[d]!=c){a[d]=c;var e="Query_"+this.clean_id(c);this.layoutHide.push(e),this.chordsCheck(e,"Que"),this.chordsClean(),this.layoutClean()}else a[d]=0,this.layoutReset(),this.chordsReset()},this))},this)),b.each(this.hit_arr,b.bind(function(c,d){this.chordsHide=[],this.layoutHide=[],c&&$(".circos .Hit_"+this.clean_id(c)).attr("data-toggle","tooltip").attr("title",c).on("click",b.bind(function(b){if(b.stopPropagation(),a[d]!=c){a[d]=c;var e="Hit_"+this.clean_id(c);this.layoutHide.push(e),this.chordsCheck(e,"Hit"),this.chordsClean(),this.layoutClean()}else a[d]=0,this.layoutReset(),this.chordsReset()},this))},this));var e=this.algorithm;b.each(this.chords_arr,function(a){$("#"+a[0]+"_"+a[3]).attr("data-toggle","tooltip").attr("title",function(){var b="E value: "+c.prettify_evalue(a[7].evalue)+(", Identities: "+d.inPercentage(a[7].identity,a[7].length));return"blastn"!=e&&(b+="<br>Positives: "+d.inPercentage(a[7].positives,a[7].length)),b+=", Gaps: "+d.inPercentage(a[7].gaps,a[7].length)})}),$('[data-toggle="tooltip"]').tooltip({placement:"top",container:"body",html:"true",delay:0,"white-space":"nowrap"})}},{key:"ratioCalculate",value:function(a,b,c,d,e,f){var g,h,i;return h=f?2.3:1,b===c||a===b&&!e||a===c&&e?0:a===c||a===b&&e?d-1:(g=(a-b)/(c-b),i=Math.exp(1/h*Math.log(g)),e&&(i=1-i),Math.floor(d*i))}},{key:"drawLegend",value:function(){this.ratioHSP=[],b.each(this.chords_arr,b.bind(function(a){var b={number:a[6],evalue:a[7].evalue};this.ratioHSP.push(b)},this));var a=g.min(this.ratioHSP,function(a){return a.number}),c=g.max(this.ratioHSP,function(a){return a.number});console.log("chords_arr "+this.chords_arr.length),console.log("ratioHSP test "+this.ratioHSP.length),console.log("paletteSize "+this.paletteSize),console.log("min "+a+" max "+c),this.legend=g.select(this.svgContainer[0]).insert("svg",":first-child").attr("height",20).attr("width",30*this.ratioHSP.length).attr("transform","translate(10, 10)").append("g").attr("class","RdYlBu").attr("transform","translate(10, 0)");this.legend.selectAll(".bar").data(this.ratioHSP).enter().append("g").attr("class","g").attr("transform",function(a,b){return"translate("+30*b+",0)"}).append("rect").attr("class",b.bind(function(b,d){var e=this.ratioCalculate(b.number,a,c,this.paletteSize,!1,!1);return console.log("calc ratio "+e),"q"+e+"-"+this.paletteSize},this)).attr("data-toggle","tooltip").attr("title",function(a){return a.evalue}).attr("x",1).attr("width",30).attr("height",20),g.scale.linear().domain([0,250]).range([0,100])}}]),a}(),k=i(j),a("default",k)}}}),c.register("24",["17","20","21","22","23","1e","1f"],function(a){var b,c,d,e,f,g,h,i,j;return{setters:[function(a){b=a.default},function(a){c=a},function(a){d=a.default},function(a){e=a.default},function(a){f=a.default},function(a){g=a.default},function(a){h=a.default}],execute:function(){i=function(){function a(b,c){f(this,a),this.svg_container=b,$queryDiv=b.parents(".resultn"),hits=this.extractData(c.query.hits,c.query.number),this.graphIt($queryDiv,b,0,20,null,hits)}return e(a,null,[{key:"name",value:function(){return"Graphical overview of hits"}},{key:"className",value:function(){return"alignment-overview"}},{key:"collapseId",value:function(a){return"alignment_"+a.query.number}},{key:"dataName",value:function(a){return"Alignment-Overview-"+a.query.id}}]),e(a,[{key:"extractData",value:function(a,c){var d=[];return a.map(function(a){var e=[],f=a.hsps;b.each(f,function(b){var d={};d.hspEvalue=b.evalue,d.hspStart=b.qstart,d.hspEnd=b.qend,d.hspFrame=b.sframe,d.hspId="Query_"+c+"_hit_"+a.number+"_hsp_"+b.number,d.hspIdentity=b.identity,d.hspGaps=b.gaps,d.hspPositives=b.positives,d.hspLength=b.length,e.push(d)}),e.hitId=a.id,e.hitDef="Query_"+c+"_hit_"+a.number,e.hitEvalue=a.hsps[0].evalue,d.push(e)}),d}},{key:"setupTooltip",value:function(){this.svg_container.find('[data-toggle="tooltip"]').tooltip({placement:"top",container:"body",html:"true",delay:0,"white-space":"nowrap"})}},{key:"setupClick",value:function(a){$("a",a).click(function(a){a.preventDefault(),a.stopPropagation(),window.location.hash=$(this).attr("href")})}},{key:"graphControls",value:function(a,c,d,e,f){var g,h,i,j,k=20,l=function(){g=f.length,h=a.find(".ghit > g").length},m=function(a,b){b.append($("<button/>").addClass("btn btn-link more").attr("type","button").attr("data-parent-query",a.attr("id")).html("View More ").append($("<i/>").html(" ").addClass("fa fa-angle-double-down")),$("<button/>").addClass("btn btn-link less").attr("type","button").attr("data-parent-query",a.attr("id")).html("View Less ").append($("<i/>").html(" ").addClass("fa fa-angle-double-up"))),i=$(".less",b),j=$(".more",b)},n=function(){l(),g===k||h<k?(i.hide(),j.hide()):h===g?(j.hide(),i.show()):h===k?(i.hide(),j.show()):(i.show(),j.show())};d===!0&&(m(a,c),n()),j.on("click",b.bind(function(b){l(),this.graphIt(a,c,h,k,e,f),n(),this.setupTooltip(),b.stopPropagation()},this)),i.on("click",b.bind(function(b){l();var d=h-k;d>=k?(this.graphIt(a,c,h,-k,e,f),n()):0!==d&&(this.graphIt(a,c,h,k-h,e,f),n()),this.setupTooltip(),b.stopPropagation()},this))}},{key:"drawLegend",value:function(a,b,c,d,e){var f=a.append("g").attr("transform","translate(0,"+(d-1.75*b.margin)+")");f.append("rect").attr("x",7.5*(c-2*b.margin)/10).attr("width",2*(c-4*b.margin)/10).attr("height",b.legend).attr("fill","url(#legend-grad)"),f.append("text").attr("class"," legend-text").attr("transform","translate(0, "+b.legend+")").attr("x",9.5*(c-2*b.margin)/10+b.margin/2).text("Weaker hits"),f.append("text").attr("class"," legend-text").attr("transform","translate(0, "+b.legend+")").attr("x",6.7*(c-2*b.margin)/10-b.margin/2).text("Stronger hits"),a.append("linearGradient").attr("id","legend-grad").selectAll("stop").data([{offset:"0%",color:"#000"},{offset:"45%",color:"#c74f14"},{offset:"100%",color:"#f6bea2"}]).enter().append("stop").attr("offset",function(a){return a.offset}).attr("stop-color",function(a){return a.color})}},{key:"graphIt",value:function(a,b,e,f,h,i){var j={barHeight:4,legend:i.length>1?3:0,margin:20},k=$.extend(j,h),l=i.slice(0,e+f);if(l.length<1)return!1;0!==e&&b.find("svg").remove();var m=a.data().queryLen,n=a.attr("id"),o=b.width(),p=l.length*k.barHeight+2*k.legend+4*k.margin,q={blastn:"nucleic_acid",blastp:"amino_acid",blastx:"nucleic_acid",tblastx:"nucleic_acid",tblastn:"amino_acid"},r=g.select(b[0]).selectAll("svg").data([l]).enter().insert("svg",":first-child").attr("width",o).attr("height",p).append("g").attr("transform","translate("+k.margin/2+", "+1.5*k.margin+")"),s=g.scale.linear().range([0,o-k.margin]);s.domain([1,m]);var t=a.data().algorithm,u=c.tick_formatter(s,q[t]),v=s.ticks(11);v.pop();var w=g.svg.axis().scale(s).orient("top").tickValues(v.concat([1,m])).tickFormat(u),x=r.append("g").attr("transform","translate(0, "+k.margin+")").append("g").attr("class","x axis").call(w);x.selectAll("text").attr("x","25px").attr("y","2px").attr("transform","rotate(-90)");var y=g.scale.ordinal().rangeBands([0,p-3*k.margin-2*k.legend],.3);y.domain(l.map(function(a){return a.hitId}));var z=g.scale.log().domain([g.min([1e-5,g.min(l.map(function(a){if(0!==parseFloat(a.hitEvalue))return a.hitEvalue}))]),g.max(l.map(function(a){return a.hitEvalue}))]).range([0,.8]);r.append("g").attr("class","ghit").attr("transform","translate(0, "+1.65*(k.margin-k.legend)+")").selectAll(".hits").data(l).enter().append("g").each(function(a,b){g.select(this).selectAll(".hsp").data(a).enter().append("a").each(function(e,f){var h=y(a.hitId)+k.barHeight/2,i=g.hsl(20,.82,z(e.hspEvalue));f+1<a.length&&(a[f].hspEnd<=a[f+1].hspStart?g.select(this.parentNode).append("line").attr("x1",s(a[f].hspEnd)).attr("y1",h).attr("x2",s(a[f+1].hspStart)).attr("y2",h).attr("stroke",i):a[f].hspStart>a[f+1].hspEnd&&g.select(this.parentNode).append("line").attr("x1",s(a[f+1].hspEnd)).attr("y1",h).attr("x2",s(a[f].hspStart)).attr("y2",h).attr("stroke",i));var j=a.hitId+"<br>E value: "+c.prettify_evalue(e.hspEvalue)+("<br>Identities: "+d.inPercentage(e.hspIdentity,e.hspLength));"blastn"!=t&&(j+="<br>Positives: "+d.inPercentage(e.hspPositives,e.hspLength)),j+=", Gaps: "+d.inPercentage(e.hspGaps,e.hspLength),g.select(this).attr("xlink:href","#"+n+"_hit_"+(b+1)).append("rect").attr("data-toggle","tooltip").attr("title",j).attr("class","bar").attr("x",function(a){return s(a.hspStart)}).attr("y",y(a.hitId)).attr("width",function(a){return s(a.hspEnd-a.hspStart+1)}).attr("height",k.barHeight).attr("fill",g.rgb(i))})}),l.length>1&&this.drawLegend(r,k,o,p,i),0===e&&this.graphControls(a,b,!0,h,i),this.setupTooltip(),this.setupClick(b)}}]),a}(),j=h(i),a("default",j)}}}),c.register("25",["17","20","22","23","1e","1f"],function(a){var b,c,d,e,f,g,h,i;return{setters:[function(a){b=a.default},function(a){c=a},function(a){d=a.default},function(a){e=a.default},function(a){f=a.default},function(a){g=a.default}],execute:function(){h=function(){function a(b,d){e(this,a),this.query=d.query,this._seq_type=c.get_seq_type(d.algorithm),this.svg_container=b,"blastx"==d.algorithm?this.query_length=this.query.length/3:"tblastn"==d.algorithm?this.query_length=3*this.query.length:this.query_length=this.query.length,this._margin={top:30,right:25,bottom:55,left:12.5},this.initiate(b.width(),b.height())}return d(a,null,[{key:"name",value:function(){return"Length distribution of matching sequences"}},{key:"className",value:function(){return"length-distribution"}},{key:"collapseId",value:function(a){return"length_"+a.query.number}},{key:"dataName",value:function(a){return"length-distribution-"+a.query.id}}]),d(a,[{key:"initiate",value:function(a,b){this._width=a-this._margin.left-this._margin.right,this._height=b-this._margin.top-this._margin.bottom,this.svg=f.select(this.svg_container[0]).insert("svg",":first-child").attr("width",this._width+this._margin.right+this._margin.left).attr("height",this._height+this._margin.top+this._margin.bottom).append("g").attr("transform","translate("+this._margin.left+","+this._margin.top+")"),
|
5
|
+
this.hit_lengths(),this.define_scale_and_bins(),this.update_data(),this.draw()}},{key:"draw",value:function(){this.draw_rectangles(),this.draw_query_line(),this.draw_axes(),this.setupTooltip()}},{key:"define_scale_and_bins",value:function(){this._scale_x=f.scale.linear().domain([0,1.01*f.max([this.query_length,f.max(this._data)])]).nice().range([0,this._width]),this._bins=f.layout.histogram().range(this._scale_x.domain()).bins(this._scale_x.ticks(50))(this._data),this._scale_y=f.scale.linear().domain([0,f.max(this._bins,function(a){return a.length})]).range([this._height,0]).nice()}},{key:"hit_lengths",value:function(){this._data=b.map(this.query.hits,b.iteratee("length"))}},{key:"setupTooltip",value:function(){this.svg_container.find('[data-toggle="tooltip"]').tooltip({placement:"top",container:"body",html:"true",delay:0,"white-space":"nowrap"})}},{key:"setupResponsiveness",value:function(){var a=$(window).width();console.log("cureent "+a);var c=b.debounce(b.bind(function(){a!=$(window).width()&&(console.log("redraw initiated "+this._height),this.draw(),a=$(window).width())},this),125);$(window).resize(c)}},{key:"tick_formatter",value:function(a){var c=this._scale_x.ticks(),d=f.format(".1f"),e=f.formatPrefix(c[c.length-1]),g={amino_acid:"aa",nucleic_acid:"bp"};return function(f){if(0!==f)return b.indexOf(c,f)>=0?"aa"==g[a]?f+" "+g[a]:d(e.scale(f))+" "+e.symbol+g[a]:void 0}}},{key:"update_data",value:function(){var a=this,d=[];this._bins.map(function(e){var f=[];e.reverse();var g=e.length;e.map(function(d,h){var i=e.length-(h+1),j=b.findIndex(a.query.hits,{length:d}),k=a.query.hits[j].hsps[0].evalue,l={value:d,id:a.query.hits[j].id,evalue:k,url:"#Query_"+a.query.number+"_hit_"+a.query.hits[j].number,y0:g,y1:g+=i-g,color:c.get_colors_for_evalue(k,a.query.hits)};f.push(l)});var h={data:f,x:e.x,dx:e.dx,length:e.length};d.push(h)}),this._update_data=d}},{key:"draw_rectangles",value:function(){var a=this,b=this.svg.selectAll(".bar").data(this._update_data).enter().append("g").attr("class","g").attr("transform",function(b){return"translate("+(a._scale_x(b.x)+a._margin.left)+",0)"});b.selectAll("rect").data(function(a){return a.data}).enter().append("a").attr("xlink:href",function(a){return a.url}).append("rect").attr("class","bar").attr("data-toggle","tooltip").attr("title",function(a){return a.id+" <br>E value: "+c.prettify_evalue(a.evalue)+"<br>Length: "+a.value}).attr("x",1).attr("y",function(b){return a._scale_y(b.y0)}).attr("width",a._scale_x(this._bins[1].x)-a._scale_x(this._bins[0].x)-1).attr("height",function(b){return a._scale_y(b.y1)-a._scale_y(b.y0)}).attr("fill",function(a){return a.color})}},{key:"draw_query_line",value:function(){var a=this.svg.append("g").attr("class","query_line").attr("transform","translate("+(this._margin.left+this._scale_x(this.query_length))+",0)");a.append("rect").attr("x",1).attr("class","bar").attr("width",4).attr("height",this._height).style("fill","#c74f14"),a.append("text").attr("dy","0.75em").attr("y",-10).attr("x",2).attr("text-anchor","start").text("Query").style("fill","#000").attr("transform","rotate(-45)")}},{key:"draw_axes",value:function(){var a,c;c=this._scale_y.ticks().length,a=c>=5?5:c;var d=this.tick_formatter(this._seq_type.subject_seq_type),e=f.svg.axis().scale(this._scale_x).orient("bottom").ticks(50).tickFormat(d),g=f.svg.axis().scale(this._scale_y).orient("left").tickValues(this._scale_y.ticks(a)).outerTickSize(0).tickFormat(function(a){if(Math.floor(a)==a)return a}),h=this._scale_y.ticks();for(var i in h)if(h[i]%1!=0){g.tickValues(f.range(0,f.max(this._bins,function(a){return a.length})+1));break}var j=this,k=this.svg.append("g").attr("class","axis axis--x").attr("transform","translate("+this._margin.left+","+this._height+")").call(e);k.selectAll("line").attr("y2",function(a){var c=j._scale_x.ticks();return b.indexOf(c,a)>=0?7:4}),k.selectAll("text").style("text-anchor","end").attr("x","-8px").attr("y","3px").attr("dy","0").attr("transform","rotate(-90)");this.svg.append("g").attr("class","axis axis--y").attr("transform","translate("+this._margin.left+",0)").call(g)}}]),a}(),i=g(h),a("default",i)}}}),c.register("26",["17","21","24","25","1a"],function(a){var b,c,d,e,f,g;return{setters:[function(a){b=a.default},function(a){c=a.default},function(a){d=a.default},function(a){e=a.default},function(a){f=a.default}],execute:function(){a("default",f.createClass({displayName:"query",domID:function(){return"Query_"+this.props.query.number},queryLength:function(){return this.props.query.length},numhits:function(){return this.props.query.hits.length},render:function(){return f.createElement("div",{className:"resultn",id:this.domID(),"data-query-len":this.props.query.length,"data-algorithm":this.props.program},this.headerJSX(),this.numhits()&&this.hitsListJSX()||this.noHitsJSX())},headerJSX:function(){var a="length: "+this.queryLength().toLocaleString();return this.props.showQueryCrumbs&&(a="query "+this.props.query.number+", "+a),f.createElement("div",{className:"section-header"},f.createElement("h3",null,f.createElement("strong",null,"Query= ",this.props.query.id)," ",this.props.query.title),f.createElement("span",{className:"label label-reset pos-label"},a))},hitsListJSX:function(){return f.createElement("div",{className:"section-content"},f.createElement(d,{key:"GO_"+this.props.query.number,query:this.props.query,program:this.props.program,collapsed:this.props.veryBig}),f.createElement(e,{key:"LD_"+this.props.query.id,query:this.props.query,algorithm:this.props.program,collapsed:"true"}),f.createElement(g,{key:"HT_"+this.props.query.number,query:this.props.query,imported_xml:this.props.imported_xml}))},noHitsJSX:function(){return f.createElement("div",{className:"section-content"},f.createElement("strong",null," ****** No hits found ****** "))},shouldComponentUpdate:function(){return!this.props.query}})),g=f.createClass({displayName:"HitsTable",mixins:[c],render:function(){var a=b.every(this.props.query.hits,function(a){return""!==a.sciname}),c=55;return a&&(c-=15),this.props.imported_xml&&(c+=15),f.createElement("div",{className:"table-hit-overview"},f.createElement("h4",{className:"caption","data-toggle":"collapse","data-target":"#Query_"+this.props.query.number+"HT_"+this.props.query.number},f.createElement("i",{className:"fa fa-minus-square-o"})," ",f.createElement("span",null,"Sequences producing significant alignments")),f.createElement("div",{className:"collapsed in",id:"Query_"+this.props.query.number+"HT_"+this.props.query.number},f.createElement("table",{className:"table table-hover table-condensed tabular-view "},f.createElement("thead",null,f.createElement("th",{className:"text-left"},"#"),f.createElement("th",{width:c+"%"},"Similar sequences"),a&&f.createElement("th",{width:"15%",className:"text-left"},"Species"),!this.props.imported_xml&&f.createElement("th",{width:"15%",className:"text-right"},"Query coverage (%)"),f.createElement("th",{width:"10%",className:"text-right"},"Total score"),f.createElement("th",{width:"10%",className:"text-right"},"E value"),f.createElement("th",{width:"10%",className:"text-right"},"Identity (%)")),f.createElement("tbody",null,b.map(this.props.query.hits,b.bind(function(b){return f.createElement("tr",{key:b.number},f.createElement("td",{className:"text-left"},b.number+"."),f.createElement("td",{className:"nowrap-ellipsis",title:b.id+" "+b.title,"data-toggle":"tooltip","data-placement":"left"},f.createElement("a",{href:"#Query_"+this.props.query.number+"_hit_"+b.number,className:"btn-link"},b.id," ",b.title)),a&&f.createElement("td",{className:"nowrap-ellipsis",title:b.sciname,"data-toggle":"tooltip","data-placement":"top"},b.sciname),!this.props.imported_xml&&f.createElement("td",{className:"text-right"},b.qcovs),f.createElement("td",{className:"text-right"},b.total_score),f.createElement("td",{className:"text-right"},this.inExponential(b.hsps[0].evalue)),f.createElement("td",{className:"text-right"},this.inPercentage(b.hsps[0].identity,b.hsps[0].length)))},this))))))}})}}}),c.registerDynamic("27",[],!1,function(a,b,d){var e=c.get("@@global-helpers").prepareGlobal(d.id,"d3",null);return function(a){"format global";"exports d3";!function(){function a(a){return a&&(a.ownerDocument||a.document||a).documentElement}function b(a){return a&&(a.ownerDocument&&a.ownerDocument.defaultView||a.document&&a||a.defaultView)}function c(a,b){return a<b?-1:a>b?1:a>=b?0:NaN}function d(a){return null===a?NaN:+a}function e(a){return!isNaN(a)}function g(a){return{left:function(b,c,d,e){for(arguments.length<3&&(d=0),arguments.length<4&&(e=b.length);d<e;){var f=d+e>>>1;a(b[f],c)<0?d=f+1:e=f}return d},right:function(b,c,d,e){for(arguments.length<3&&(d=0),arguments.length<4&&(e=b.length);d<e;){var f=d+e>>>1;a(b[f],c)>0?e=f:d=f+1}return d}}}function h(a){return a.length}function i(a){for(var b=1;a*b%1;)b*=10;return b}function j(a,b){for(var c in b)Object.defineProperty(a.prototype,c,{value:b[c],enumerable:!1})}function k(){this._=Object.create(null)}function l(a){return(a+="")===ng||a[0]===og?og+a:a}function m(a){return(a+="")[0]===og?a.slice(1):a}function n(a){return l(a)in this._}function o(a){return(a=l(a))in this._&&delete this._[a]}function p(){var a=[];for(var b in this._)a.push(m(b));return a}function q(){var a=0;for(var b in this._)++a;return a}function r(){for(var a in this._)return!1;return!0}function s(){this._=Object.create(null)}function t(a){return a}function u(a,b,c){return function(){var d=c.apply(b,arguments);return d===b?a:d}}function v(a,b){if(b in a)return b;b=b.charAt(0).toUpperCase()+b.slice(1);for(var c=0,d=pg.length;c<d;++c){var e=pg[c]+b;if(e in a)return e}}function w(){}function x(){}function y(a){function b(){for(var b,d=c,e=-1,f=d.length;++e<f;)(b=d[e].on)&&b.apply(this,arguments);return a}var c=[],d=new k;return b.on=function(b,e){var f,g=d.get(b);return arguments.length<2?g&&g.on:(g&&(g.on=null,c=c.slice(0,f=c.indexOf(g)).concat(c.slice(f+1)),d.remove(b)),e&&c.push(d.set(b,{on:e})),a)},b}function z(){cg.event.preventDefault()}function A(){for(var a,b=cg.event;a=b.sourceEvent;)b=a;return b}function B(a){for(var b=new x,c=0,d=arguments.length;++c<d;)b[arguments[c]]=y(b);return b.of=function(c,d){return function(e){try{var f=e.sourceEvent=cg.event;e.target=a,cg.event=e,b[e.type].apply(c,d)}finally{cg.event=f}}},b}function C(a){return rg(a,vg),a}function D(a){return"function"==typeof a?a:function(){return sg(a,this)}}function E(a){return"function"==typeof a?a:function(){return tg(a,this)}}function F(a,b){function c(){this.removeAttribute(a)}function d(){this.removeAttributeNS(a.space,a.local)}function e(){this.setAttribute(a,b)}function f(){this.setAttributeNS(a.space,a.local,b)}function g(){var c=b.apply(this,arguments);null==c?this.removeAttribute(a):this.setAttribute(a,c)}function h(){var c=b.apply(this,arguments);null==c?this.removeAttributeNS(a.space,a.local):this.setAttributeNS(a.space,a.local,c)}return a=cg.ns.qualify(a),null==b?a.local?d:c:"function"==typeof b?a.local?h:g:a.local?f:e}function G(a){return a.trim().replace(/\s+/g," ")}function H(a){return new RegExp("(?:^|\\s+)"+cg.requote(a)+"(?:\\s+|$)","g")}function I(a){return(a+"").trim().split(/^|\s+/)}function J(a,b){function c(){for(var c=-1;++c<e;)a[c](this,b)}function d(){for(var c=-1,d=b.apply(this,arguments);++c<e;)a[c](this,d)}a=I(a).map(K);var e=a.length;return"function"==typeof b?d:c}function K(a){var b=H(a);return function(c,d){if(e=c.classList)return d?e.add(a):e.remove(a);var e=c.getAttribute("class")||"";d?(b.lastIndex=0,b.test(e)||c.setAttribute("class",G(e+" "+a))):c.setAttribute("class",G(e.replace(b," ")))}}function L(a,b,c){function d(){this.style.removeProperty(a)}function e(){this.style.setProperty(a,b,c)}function f(){var d=b.apply(this,arguments);null==d?this.style.removeProperty(a):this.style.setProperty(a,d,c)}return null==b?d:"function"==typeof b?f:e}function M(a,b){function c(){delete this[a]}function d(){this[a]=b}function e(){var c=b.apply(this,arguments);null==c?delete this[a]:this[a]=c}return null==b?c:"function"==typeof b?e:d}function N(a){function b(){var b=this.ownerDocument,c=this.namespaceURI;return c?b.createElementNS(c,a):b.createElement(a)}function c(){return this.ownerDocument.createElementNS(a.space,a.local)}return"function"==typeof a?a:(a=cg.ns.qualify(a)).local?c:b}function O(){var a=this.parentNode;a&&a.removeChild(this)}function P(a){return{__data__:a}}function Q(a){return function(){return ug(this,a)}}function R(a){return arguments.length||(a=c),function(b,c){return b&&c?a(b.__data__,c.__data__):!b-!c}}function S(a,b){for(var c=0,d=a.length;c<d;c++)for(var e,f=a[c],g=0,h=f.length;g<h;g++)(e=f[g])&&b(e,g,c);return a}function T(a){return rg(a,xg),a}function U(a){var b,c;return function(d,e,f){var g,h=a[f].update,i=h.length;for(f!=c&&(c=f,b=0),e>=b&&(b=e+1);!(g=h[b])&&++b<i;);return g}}function V(a,b,c){function d(){var b=this[g];b&&(this.removeEventListener(a,b,b.$),delete this[g])}function e(){var e=i(b,eg(arguments));d.call(this),this.addEventListener(a,this[g]=e,e.$=c),e._=b}function f(){var b,c=new RegExp("^__on([^.]+)"+cg.requote(a)+"$");for(var d in this)if(b=d.match(c)){var e=this[d];this.removeEventListener(b[1],e,e.$),delete this[d]}}var g="__on"+a,h=a.indexOf("."),i=W;h>0&&(a=a.slice(0,h));var j=yg.get(a);return j&&(a=j,i=X),h?b?e:d:b?w:f}function W(a,b){return function(c){var d=cg.event;cg.event=c,b[0]=this.__data__;try{a.apply(this,b)}finally{cg.event=d}}}function X(a,b){var c=W(a,b);return function(a){var b=this,d=a.relatedTarget;d&&(d===b||8&d.compareDocumentPosition(b))||c.call(b,a)}}function Y(c){var d=".dragsuppress-"+ ++Ag,e="click"+d,f=cg.select(b(c)).on("touchmove"+d,z).on("dragstart"+d,z).on("selectstart"+d,z);if(null==zg&&(zg=!("onselectstart"in c)&&v(c.style,"userSelect")),zg){var g=a(c).style,h=g[zg];g[zg]="none"}return function(a){if(f.on(d,null),zg&&(g[zg]=h),a){var b=function(){f.on(e,null)};f.on(e,function(){z(),b()},!0),setTimeout(b,0)}}}function Z(a,c){c.changedTouches&&(c=c.changedTouches[0]);var d=a.ownerSVGElement||a;if(d.createSVGPoint){var e=d.createSVGPoint();if(Bg<0){var f=b(a);if(f.scrollX||f.scrollY){d=cg.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var g=d[0][0].getScreenCTM();Bg=!(g.f||g.e),d.remove()}}return Bg?(e.x=c.pageX,e.y=c.pageY):(e.x=c.clientX,e.y=c.clientY),e=e.matrixTransform(a.getScreenCTM().inverse()),[e.x,e.y]}var h=a.getBoundingClientRect();return[c.clientX-h.left-a.clientLeft,c.clientY-h.top-a.clientTop]}function $(){return cg.event.changedTouches[0].identifier}function _(a){return a>0?1:a<0?-1:0}function aa(a,b,c){return(b[0]-a[0])*(c[1]-a[1])-(b[1]-a[1])*(c[0]-a[0])}function ba(a){return a>1?0:a<-1?Eg:Math.acos(a)}function ca(a){return a>1?Hg:a<-1?-Hg:Math.asin(a)}function da(a){return((a=Math.exp(a))-1/a)/2}function ea(a){return((a=Math.exp(a))+1/a)/2}function fa(a){return((a=Math.exp(2*a))-1)/(a+1)}function ga(a){return(a=Math.sin(a/2))*a}function ha(){}function ia(a,b,c){return this instanceof ia?(this.h=+a,this.s=+b,void(this.l=+c)):arguments.length<2?a instanceof ia?new ia(a.h,a.s,a.l):wa(""+a,xa,ia):new ia(a,b,c)}function ja(a,b,c){function d(a){return a>360?a-=360:a<0&&(a+=360),a<60?f+(g-f)*a/60:a<180?g:a<240?f+(g-f)*(240-a)/60:f}function e(a){return Math.round(255*d(a))}var f,g;return a=isNaN(a)?0:(a%=360)<0?a+360:a,b=isNaN(b)?0:b<0?0:b>1?1:b,c=c<0?0:c>1?1:c,g=c<=.5?c*(1+b):c+b-c*b,f=2*c-g,new sa(e(a+120),e(a),e(a-120))}function ka(a,b,c){return this instanceof ka?(this.h=+a,this.c=+b,void(this.l=+c)):arguments.length<2?a instanceof ka?new ka(a.h,a.c,a.l):a instanceof ma?oa(a.l,a.a,a.b):oa((a=ya((a=cg.rgb(a)).r,a.g,a.b)).l,a.a,a.b):new ka(a,b,c)}function la(a,b,c){return isNaN(a)&&(a=0),isNaN(b)&&(b=0),new ma(c,Math.cos(a*=Ig)*b,Math.sin(a)*b)}function ma(a,b,c){return this instanceof ma?(this.l=+a,this.a=+b,void(this.b=+c)):arguments.length<2?a instanceof ma?new ma(a.l,a.a,a.b):a instanceof ka?la(a.h,a.c,a.l):ya((a=sa(a)).r,a.g,a.b):new ma(a,b,c)}function na(a,b,c){var d=(a+16)/116,e=d+b/500,f=d-c/200;return e=pa(e)*Tg,d=pa(d)*Ug,f=pa(f)*Vg,new sa(ra(3.2404542*e-1.5371385*d-.4985314*f),ra(-.969266*e+1.8760108*d+.041556*f),ra(.0556434*e-.2040259*d+1.0572252*f))}function oa(a,b,c){return a>0?new ka(Math.atan2(c,b)*Jg,Math.sqrt(b*b+c*c),a):new ka(NaN,NaN,a)}function pa(a){return a>.206893034?a*a*a:(a-4/29)/7.787037}function qa(a){return a>.008856?Math.pow(a,1/3):7.787037*a+4/29}function ra(a){return Math.round(255*(a<=.00304?12.92*a:1.055*Math.pow(a,1/2.4)-.055))}function sa(a,b,c){return this instanceof sa?(this.r=~~a,this.g=~~b,void(this.b=~~c)):arguments.length<2?a instanceof sa?new sa(a.r,a.g,a.b):wa(""+a,sa,ja):new sa(a,b,c)}function ta(a){return new sa(a>>16,a>>8&255,255&a)}function ua(a){return ta(a)+""}function va(a){return a<16?"0"+Math.max(0,a).toString(16):Math.min(255,a).toString(16)}function wa(a,b,c){var d,e,f,g=0,h=0,i=0;if(d=/([a-z]+)\((.*)\)/.exec(a=a.toLowerCase()))switch(e=d[2].split(","),d[1]){case"hsl":return c(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100);case"rgb":return b(Aa(e[0]),Aa(e[1]),Aa(e[2]))}return(f=Yg.get(a))?b(f.r,f.g,f.b):(null==a||"#"!==a.charAt(0)||isNaN(f=parseInt(a.slice(1),16))||(4===a.length?(g=(3840&f)>>4,g|=g>>4,h=240&f,h|=h>>4,i=15&f,i|=i<<4):7===a.length&&(g=(16711680&f)>>16,h=(65280&f)>>8,i=255&f)),b(g,h,i))}function xa(a,b,c){var d,e,f=Math.min(a/=255,b/=255,c/=255),g=Math.max(a,b,c),h=g-f,i=(g+f)/2;return h?(e=i<.5?h/(g+f):h/(2-g-f),d=a==g?(b-c)/h+(b<c?6:0):b==g?(c-a)/h+2:(a-b)/h+4,d*=60):(d=NaN,e=i>0&&i<1?0:d),new ia(d,e,i)}function ya(a,b,c){a=za(a),b=za(b),c=za(c);var d=qa((.4124564*a+.3575761*b+.1804375*c)/Tg),e=qa((.2126729*a+.7151522*b+.072175*c)/Ug),f=qa((.0193339*a+.119192*b+.9503041*c)/Vg);return ma(116*e-16,500*(d-e),200*(e-f))}function za(a){return(a/=255)<=.04045?a/12.92:Math.pow((a+.055)/1.055,2.4)}function Aa(a){var b=parseFloat(a);return"%"===a.charAt(a.length-1)?Math.round(2.55*b):b}function Ba(a){return"function"==typeof a?a:function(){return a}}function Ca(a){return function(b,c,d){return 2===arguments.length&&"function"==typeof c&&(d=c,c=null),Da(b,c,a,d)}}function Da(a,b,c,d){function e(){var a,b=i.status;if(!b&&Fa(i)||b>=200&&b<300||304===b){try{a=c.call(f,i)}catch(a){return void g.error.call(f,a)}g.load.call(f,a)}else g.error.call(f,i)}var f={},g=cg.dispatch("beforesend","progress","load","error"),h={},i=new XMLHttpRequest,j=null;return!this.XDomainRequest||"withCredentials"in i||!/^(http(s)?:)?\/\//.test(a)||(i=new XDomainRequest),"onload"in i?i.onload=i.onerror=e:i.onreadystatechange=function(){i.readyState>3&&e()},i.onprogress=function(a){var b=cg.event;cg.event=a;try{g.progress.call(f,i)}finally{cg.event=b}},f.header=function(a,b){return a=(a+"").toLowerCase(),arguments.length<2?h[a]:(null==b?delete h[a]:h[a]=b+"",f)},f.mimeType=function(a){return arguments.length?(b=null==a?null:a+"",f):b},f.responseType=function(a){return arguments.length?(j=a,f):j},f.response=function(a){return c=a,f},["get","post"].forEach(function(a){f[a]=function(){return f.send.apply(f,[a].concat(eg(arguments)))}}),f.send=function(c,d,e){if(2===arguments.length&&"function"==typeof d&&(e=d,d=null),i.open(c,a,!0),null==b||"accept"in h||(h.accept=b+",*/*"),i.setRequestHeader)for(var k in h)i.setRequestHeader(k,h[k]);return null!=b&&i.overrideMimeType&&i.overrideMimeType(b),null!=j&&(i.responseType=j),null!=e&&f.on("error",e).on("load",function(a){e(null,a)}),g.beforesend.call(f,i),i.send(null==d?null:d),f},f.abort=function(){return i.abort(),f},cg.rebind(f,g,"on"),null==d?f:f.get(Ea(d))}function Ea(a){return 1===a.length?function(b,c){a(null==b?c:null)}:a}function Fa(a){var b=a.responseType;return b&&"text"!==b?a.response:a.responseText}function Ga(){var a=Ha(),b=Ia()-a;b>24?(isFinite(b)&&(clearTimeout(ah),ah=setTimeout(Ga,b)),_g=0):(_g=1,ch(Ga))}function Ha(){var a=Date.now();for(bh=Zg;bh;)a>=bh.t&&(bh.f=bh.c(a-bh.t)),bh=bh.n;return a}function Ia(){for(var a,b=Zg,c=1/0;b;)b.f?b=a?a.n=b.n:Zg=b.n:(b.t<c&&(c=b.t),b=(a=b).n);return $g=a,c}function Ja(a,b){return b-(a?Math.ceil(Math.log(a)/Math.LN10):1)}function Ka(a,b){var c=Math.pow(10,3*mg(8-b));return{scale:b>8?function(a){return a/c}:function(a){return a*c},symbol:a}}function La(a){var b=a.decimal,c=a.thousands,d=a.grouping,e=a.currency,f=d&&c?function(a,b){for(var e=a.length,f=[],g=0,h=d[0],i=0;e>0&&h>0&&(i+h+1>b&&(h=Math.max(1,b-i)),f.push(a.substring(e-=h,e+h)),!((i+=h+1)>b));)h=d[g=(g+1)%d.length];return f.reverse().join(c)}:t;return function(a){var c=eh.exec(a),d=c[1]||" ",g=c[2]||">",h=c[3]||"-",i=c[4]||"",j=c[5],k=+c[6],l=c[7],m=c[8],n=c[9],o=1,p="",q="",r=!1,s=!0;switch(m&&(m=+m.substring(1)),(j||"0"===d&&"="===g)&&(j=d="0",g="="),n){case"n":l=!0,n="g";break;case"%":o=100,q="%",n="f";break;case"p":o=100,q="%",n="r";break;case"b":case"o":case"x":case"X":"#"===i&&(p="0"+n.toLowerCase());case"c":s=!1;case"d":r=!0,m=0;break;case"s":o=-1,n="r"}"$"===i&&(p=e[0],q=e[1]),"r"!=n||m||(n="g"),null!=m&&("g"==n?m=Math.max(1,Math.min(21,m)):"e"!=n&&"f"!=n||(m=Math.max(0,Math.min(20,m)))),n=fh.get(n)||Ma;var t=j&&l;return function(a){var c=q;if(r&&a%1)return"";var e=a<0||0===a&&1/a<0?(a=-a,"-"):"-"===h?"":h;if(o<0){var i=cg.formatPrefix(a,m);a=i.scale(a),c=i.symbol+q}else a*=o;a=n(a,m);var u,v,w=a.lastIndexOf(".");if(w<0){var x=s?a.lastIndexOf("e"):-1;x<0?(u=a,v=""):(u=a.substring(0,x),v=a.substring(x))}else u=a.substring(0,w),v=b+a.substring(w+1);!j&&l&&(u=f(u,1/0));var y=p.length+u.length+v.length+(t?0:e.length),z=y<k?new Array(y=k-y+1).join(d):"";return t&&(u=f(z+u,z.length?k-v.length:1/0)),e+=p,a=u+v,("<"===g?e+a+z:">"===g?z+e+a:"^"===g?z.substring(0,y>>=1)+e+a+z.substring(y):e+(t?a:z+a))+c}}}function Ma(a){return a+""}function Na(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Oa(a,b,c){function d(b){var c=a(b),d=f(c,1);return b-c<d-b?c:d}function e(c){return b(c=a(new hh(c-1)),1),c}function f(a,c){return b(a=new hh(+a),c),a}function g(a,d,f){var g=e(a),h=[];if(f>1)for(;g<d;)c(g)%f||h.push(new Date(+g)),b(g,1);else for(;g<d;)h.push(new Date(+g)),b(g,1);return h}function h(a,b,c){try{hh=Na;var d=new Na;return d._=a,g(d,b,c)}finally{hh=Date}}a.floor=a,a.round=d,a.ceil=e,a.offset=f,a.range=g;var i=a.utc=Pa(a);return i.floor=i,i.round=Pa(d),i.ceil=Pa(e),i.offset=Pa(f),i.range=h,a}function Pa(a){return function(b,c){try{hh=Na;var d=new Na;return d._=b,a(d,c)._}finally{hh=Date}}}function Qa(a){function b(a){function b(b){for(var c,e,f,g=[],h=-1,i=0;++h<d;)37===a.charCodeAt(h)&&(g.push(a.slice(i,h)),null!=(e=jh[c=a.charAt(++h)])&&(c=a.charAt(++h)),(f=C[c])&&(c=f(b,null==e?"e"===c?" ":"0":e)),g.push(c),i=h+1);return g.push(a.slice(i,h)),g.join("")}var d=a.length;return b.parse=function(b){var d={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},e=c(d,a,b,0);if(e!=b.length)return null;"p"in d&&(d.H=d.H%12+12*d.p);var f=null!=d.Z&&hh!==Na,g=new(f?Na:hh);return"j"in d?g.setFullYear(d.y,0,d.j):"w"in d&&("W"in d||"U"in d)?(g.setFullYear(d.y,0,1),g.setFullYear(d.y,0,"W"in d?(d.w+6)%7+7*d.W-(g.getDay()+5)%7:d.w+7*d.U-(g.getDay()+6)%7)):g.setFullYear(d.y,d.m,d.d),g.setHours(d.H+(d.Z/100|0),d.M+d.Z%100,d.S,d.L),f?g._:g},b.toString=function(){return a},b}function c(a,b,c,d){for(var e,f,g,h=0,i=b.length,j=c.length;h<i;){if(d>=j)return-1;if(e=b.charCodeAt(h++),37===e){if(g=b.charAt(h++),f=D[g in jh?b.charAt(h++):g],!f||(d=f(a,c,d))<0)return-1}else if(e!=c.charCodeAt(d++))return-1}return d}function d(a,b,c){w.lastIndex=0;var d=w.exec(b.slice(c));return d?(a.w=x.get(d[0].toLowerCase()),c+d[0].length):-1}function e(a,b,c){u.lastIndex=0;var d=u.exec(b.slice(c));return d?(a.w=v.get(d[0].toLowerCase()),c+d[0].length):-1}function f(a,b,c){A.lastIndex=0;var d=A.exec(b.slice(c));return d?(a.m=B.get(d[0].toLowerCase()),c+d[0].length):-1}function g(a,b,c){y.lastIndex=0;var d=y.exec(b.slice(c));return d?(a.m=z.get(d[0].toLowerCase()),c+d[0].length):-1}function h(a,b,d){return c(a,C.c.toString(),b,d)}function i(a,b,d){return c(a,C.x.toString(),b,d)}function j(a,b,d){return c(a,C.X.toString(),b,d)}function k(a,b,c){var d=t.get(b.slice(c,c+=2).toLowerCase());return null==d?-1:(a.p=d,c)}var l=a.dateTime,m=a.date,n=a.time,o=a.periods,p=a.days,q=a.shortDays,r=a.months,s=a.shortMonths;b.utc=function(a){function c(a){try{hh=Na;var b=new hh;return b._=a,d(b)}finally{hh=Date}}var d=b(a);return c.parse=function(a){try{hh=Na;var b=d.parse(a);return b&&b._}finally{hh=Date}},c.toString=d.toString,c},b.multi=b.utc.multi=ib;var t=cg.map(),u=Sa(p),v=Ta(p),w=Sa(q),x=Ta(q),y=Sa(r),z=Ta(r),A=Sa(s),B=Ta(s);o.forEach(function(a,b){t.set(a.toLowerCase(),b)});var C={a:function(a){return q[a.getDay()]},A:function(a){return p[a.getDay()]},b:function(a){return s[a.getMonth()]},B:function(a){return r[a.getMonth()]},c:b(l),d:function(a,b){return Ra(a.getDate(),b,2)},e:function(a,b){return Ra(a.getDate(),b,2)},H:function(a,b){return Ra(a.getHours(),b,2)},I:function(a,b){return Ra(a.getHours()%12||12,b,2)},j:function(a,b){return Ra(1+gh.dayOfYear(a),b,3)},L:function(a,b){return Ra(a.getMilliseconds(),b,3)},m:function(a,b){return Ra(a.getMonth()+1,b,2)},M:function(a,b){return Ra(a.getMinutes(),b,2)},p:function(a){return o[+(a.getHours()>=12)]},S:function(a,b){return Ra(a.getSeconds(),b,2)},U:function(a,b){return Ra(gh.sundayOfYear(a),b,2)},w:function(a){return a.getDay()},W:function(a,b){return Ra(gh.mondayOfYear(a),b,2)},x:b(m),X:b(n),y:function(a,b){return Ra(a.getFullYear()%100,b,2)},Y:function(a,b){return Ra(a.getFullYear()%1e4,b,4)},Z:gb,"%":function(){return"%"}},D={a:d,A:e,b:f,B:g,c:h,d:ab,e:ab,H:cb,I:cb,j:bb,L:fb,m:_a,M:db,p:k,S:eb,U:Va,w:Ua,W:Wa,x:i,X:j,y:Ya,Y:Xa,Z:Za,"%":hb};return b}function Ra(a,b,c){var d=a<0?"-":"",e=(d?-a:a)+"",f=e.length;return d+(f<c?new Array(c-f+1).join(b)+e:e)}function Sa(a){return new RegExp("^(?:"+a.map(cg.requote).join("|")+")","i")}function Ta(a){for(var b=new k,c=-1,d=a.length;++c<d;)b.set(a[c].toLowerCase(),c);return b}function Ua(a,b,c){kh.lastIndex=0;var d=kh.exec(b.slice(c,c+1));return d?(a.w=+d[0],c+d[0].length):-1}function Va(a,b,c){kh.lastIndex=0;var d=kh.exec(b.slice(c));return d?(a.U=+d[0],c+d[0].length):-1}function Wa(a,b,c){kh.lastIndex=0;var d=kh.exec(b.slice(c));return d?(a.W=+d[0],c+d[0].length):-1}function Xa(a,b,c){kh.lastIndex=0;var d=kh.exec(b.slice(c,c+4));return d?(a.y=+d[0],c+d[0].length):-1}function Ya(a,b,c){kh.lastIndex=0;var d=kh.exec(b.slice(c,c+2));return d?(a.y=$a(+d[0]),c+d[0].length):-1}function Za(a,b,c){return/^[+-]\d{4}$/.test(b=b.slice(c,c+5))?(a.Z=-b,c+5):-1}function $a(a){return a+(a>68?1900:2e3)}function _a(a,b,c){kh.lastIndex=0;var d=kh.exec(b.slice(c,c+2));return d?(a.m=d[0]-1,c+d[0].length):-1}function ab(a,b,c){kh.lastIndex=0;var d=kh.exec(b.slice(c,c+2));return d?(a.d=+d[0],c+d[0].length):-1}function bb(a,b,c){kh.lastIndex=0;var d=kh.exec(b.slice(c,c+3));return d?(a.j=+d[0],c+d[0].length):-1}function cb(a,b,c){kh.lastIndex=0;var d=kh.exec(b.slice(c,c+2));return d?(a.H=+d[0],c+d[0].length):-1}function db(a,b,c){kh.lastIndex=0;var d=kh.exec(b.slice(c,c+2));return d?(a.M=+d[0],c+d[0].length):-1}function eb(a,b,c){kh.lastIndex=0;var d=kh.exec(b.slice(c,c+2));return d?(a.S=+d[0],c+d[0].length):-1}function fb(a,b,c){kh.lastIndex=0;var d=kh.exec(b.slice(c,c+3));return d?(a.L=+d[0],c+d[0].length):-1}function gb(a){var b=a.getTimezoneOffset(),c=b>0?"-":"+",d=mg(b)/60|0,e=mg(b)%60;return c+Ra(d,"0",2)+Ra(e,"0",2)}function hb(a,b,c){lh.lastIndex=0;var d=lh.exec(b.slice(c,c+1));return d?c+d[0].length:-1}function ib(a){for(var b=a.length,c=-1;++c<b;)a[c][0]=this(a[c][0]);return function(b){for(var c=0,d=a[c];!d[1](b);)d=a[++c];return d[0](b)}}function jb(){}function kb(a,b,c){var d=c.s=a+b,e=d-a,f=d-e;c.t=a-f+(b-e)}function lb(a,b){a&&ph.hasOwnProperty(a.type)&&ph[a.type](a,b)}function mb(a,b,c){var d,e=-1,f=a.length-c;for(b.lineStart();++e<f;)d=a[e],b.point(d[0],d[1],d[2]);b.lineEnd()}function nb(a,b){var c=-1,d=a.length;for(b.polygonStart();++c<d;)mb(a[c],b,1);b.polygonEnd()}function ob(){function a(a,b){a*=Ig,b=b*Ig/2+Eg/4;var c=a-d,g=c>=0?1:-1,h=g*c,i=Math.cos(b),j=Math.sin(b),k=f*j,l=e*i+k*Math.cos(h),m=k*g*Math.sin(h);rh.add(Math.atan2(m,l)),d=a,e=i,f=j}var b,c,d,e,f;sh.point=function(g,h){sh.point=a,d=(b=g)*Ig,e=Math.cos(h=(c=h)*Ig/2+Eg/4),f=Math.sin(h)},sh.lineEnd=function(){a(b,c)}}function pb(a){var b=a[0],c=a[1],d=Math.cos(c);return[d*Math.cos(b),d*Math.sin(b),Math.sin(c)]}function qb(a,b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2]}function rb(a,b){return[a[1]*b[2]-a[2]*b[1],a[2]*b[0]-a[0]*b[2],a[0]*b[1]-a[1]*b[0]]}function sb(a,b){a[0]+=b[0],a[1]+=b[1],a[2]+=b[2]}function tb(a,b){return[a[0]*b,a[1]*b,a[2]*b]}function ub(a){var b=Math.sqrt(a[0]*a[0]+a[1]*a[1]+a[2]*a[2]);a[0]/=b,a[1]/=b,a[2]/=b}function vb(a){return[Math.atan2(a[1],a[0]),ca(a[2])]}function wb(a,b){return mg(a[0]-b[0])<Cg&&mg(a[1]-b[1])<Cg}function xb(a,b){a*=Ig;var c=Math.cos(b*=Ig);yb(c*Math.cos(a),c*Math.sin(a),Math.sin(b))}function yb(a,b,c){++th,vh+=(a-vh)/th,wh+=(b-wh)/th,xh+=(c-xh)/th}function zb(){function a(a,e){a*=Ig;var f=Math.cos(e*=Ig),g=f*Math.cos(a),h=f*Math.sin(a),i=Math.sin(e),j=Math.atan2(Math.sqrt((j=c*i-d*h)*j+(j=d*g-b*i)*j+(j=b*h-c*g)*j),b*g+c*h+d*i);uh+=j,yh+=j*(b+(b=g)),zh+=j*(c+(c=h)),Ah+=j*(d+(d=i)),yb(b,c,d)}var b,c,d;Eh.point=function(e,f){e*=Ig;var g=Math.cos(f*=Ig);b=g*Math.cos(e),c=g*Math.sin(e),d=Math.sin(f),Eh.point=a,yb(b,c,d)}}function Ab(){Eh.point=xb}function Bb(){function a(a,b){a*=Ig;var c=Math.cos(b*=Ig),g=c*Math.cos(a),h=c*Math.sin(a),i=Math.sin(b),j=e*i-f*h,k=f*g-d*i,l=d*h-e*g,m=Math.sqrt(j*j+k*k+l*l),n=d*g+e*h+f*i,o=m&&-ba(n)/m,p=Math.atan2(m,n);Bh+=o*j,Ch+=o*k,Dh+=o*l,uh+=p,yh+=p*(d+(d=g)),zh+=p*(e+(e=h)),Ah+=p*(f+(f=i)),yb(d,e,f)}var b,c,d,e,f;Eh.point=function(g,h){b=g,c=h,Eh.point=a,g*=Ig;var i=Math.cos(h*=Ig);d=i*Math.cos(g),e=i*Math.sin(g),f=Math.sin(h),yb(d,e,f)},Eh.lineEnd=function(){a(b,c),Eh.lineEnd=Ab,Eh.point=xb}}function Cb(a,b){function c(c,d){return c=a(c,d),b(c[0],c[1])}return a.invert&&b.invert&&(c.invert=function(c,d){return c=b.invert(c,d),c&&a.invert(c[0],c[1])}),c}function Db(){return!0}function Eb(a,b,c,d,e){var f=[],g=[];if(a.forEach(function(a){if(!((b=a.length-1)<=0)){var b,c=a[0],d=a[b];if(wb(c,d)){e.lineStart();for(var h=0;h<b;++h)e.point((c=a[h])[0],c[1]);return void e.lineEnd()}var i=new Gb(c,a,null,!0),j=new Gb(c,null,i,!1);i.o=j,f.push(i),g.push(j),i=new Gb(d,a,null,!1),j=new Gb(d,null,i,!0),i.o=j,f.push(i),g.push(j)}}),g.sort(b),Fb(f),Fb(g),f.length){for(var h=0,i=c,j=g.length;h<j;++h)g[h].e=i=!i;for(var k,l,m=f[0];;){for(var n=m,o=!0;n.v;)if((n=n.n)===m)return;k=n.z,e.lineStart();do{if(n.v=n.o.v=!0,n.e){if(o)for(var h=0,j=k.length;h<j;++h)e.point((l=k[h])[0],l[1]);else d(n.x,n.n.x,1,e);n=n.n}else{if(o){k=n.p.z;for(var h=k.length-1;h>=0;--h)e.point((l=k[h])[0],l[1])}else d(n.x,n.p.x,-1,e);n=n.p}n=n.o,k=n.z,o=!o}while(!n.v);e.lineEnd()}}}function Fb(a){if(b=a.length){for(var b,c,d=0,e=a[0];++d<b;)e.n=c=a[d],c.p=e,e=c;e.n=c=a[0],c.p=e}}function Gb(a,b,c,d){this.x=a,this.z=b,this.o=c,this.e=d,this.v=!1,this.n=this.p=null}function Hb(a,b,c,d){return function(e,f){function g(b,c){var d=e(b,c);a(b=d[0],c=d[1])&&f.point(b,c)}function h(a,b){var c=e(a,b);q.point(c[0],c[1])}function i(){s.point=h,q.lineStart()}function j(){s.point=g,q.lineEnd()}function k(a,b){p.push([a,b]);var c=e(a,b);u.point(c[0],c[1])}function l(){u.lineStart(),p=[]}function m(){k(p[0][0],p[0][1]),u.lineEnd();var a,b=u.clean(),c=t.buffer(),d=c.length;if(p.pop(),o.push(p),p=null,d)if(1&b){a=c[0];var e,d=a.length-1,g=-1;if(d>0){for(v||(f.polygonStart(),v=!0),f.lineStart();++g<d;)f.point((e=a[g])[0],e[1]);f.lineEnd()}}else d>1&&2&b&&c.push(c.pop().concat(c.shift())),n.push(c.filter(Ib))}var n,o,p,q=b(f),r=e.invert(d[0],d[1]),s={point:g,lineStart:i,lineEnd:j,polygonStart:function(){s.point=k,s.lineStart=l,s.lineEnd=m,n=[],o=[]},polygonEnd:function(){s.point=g,s.lineStart=i,s.lineEnd=j,n=cg.merge(n);var a=Ob(r,o);n.length?(v||(f.polygonStart(),v=!0),Eb(n,Kb,a,c,f)):a&&(v||(f.polygonStart(),v=!0),f.lineStart(),c(null,null,1,f),f.lineEnd()),v&&(f.polygonEnd(),v=!1),n=o=null},sphere:function(){f.polygonStart(),f.lineStart(),
|
6
|
+
c(null,null,1,f),f.lineEnd(),f.polygonEnd()}},t=Jb(),u=b(t),v=!1;return s}}function Ib(a){return a.length>1}function Jb(){var a,b=[];return{lineStart:function(){b.push(a=[])},point:function(b,c){a.push([b,c])},lineEnd:w,buffer:function(){var c=b;return b=[],a=null,c},rejoin:function(){b.length>1&&b.push(b.pop().concat(b.shift()))}}}function Kb(a,b){return((a=a.x)[0]<0?a[1]-Hg-Cg:Hg-a[1])-((b=b.x)[0]<0?b[1]-Hg-Cg:Hg-b[1])}function Lb(a){var b,c=NaN,d=NaN,e=NaN;return{lineStart:function(){a.lineStart(),b=1},point:function(f,g){var h=f>0?Eg:-Eg,i=mg(f-c);mg(i-Eg)<Cg?(a.point(c,d=(d+g)/2>0?Hg:-Hg),a.point(e,d),a.lineEnd(),a.lineStart(),a.point(h,d),a.point(f,d),b=0):e!==h&&i>=Eg&&(mg(c-e)<Cg&&(c-=e*Cg),mg(f-h)<Cg&&(f-=h*Cg),d=Mb(c,d,f,g),a.point(e,d),a.lineEnd(),a.lineStart(),a.point(h,d),b=0),a.point(c=f,d=g),e=h},lineEnd:function(){a.lineEnd(),c=d=NaN},clean:function(){return 2-b}}}function Mb(a,b,c,d){var e,f,g=Math.sin(a-c);return mg(g)>Cg?Math.atan((Math.sin(b)*(f=Math.cos(d))*Math.sin(c)-Math.sin(d)*(e=Math.cos(b))*Math.sin(a))/(e*f*g)):(b+d)/2}function Nb(a,b,c,d){var e;if(null==a)e=c*Hg,d.point(-Eg,e),d.point(0,e),d.point(Eg,e),d.point(Eg,0),d.point(Eg,-e),d.point(0,-e),d.point(-Eg,-e),d.point(-Eg,0),d.point(-Eg,e);else if(mg(a[0]-b[0])>Cg){var f=a[0]<b[0]?Eg:-Eg;e=c*f/2,d.point(-f,e),d.point(0,e),d.point(f,e)}else d.point(b[0],b[1])}function Ob(a,b){var c=a[0],d=a[1],e=[Math.sin(c),-Math.cos(c),0],f=0,g=0;rh.reset();for(var h=0,i=b.length;h<i;++h){var j=b[h],k=j.length;if(k)for(var l=j[0],m=l[0],n=l[1]/2+Eg/4,o=Math.sin(n),p=Math.cos(n),q=1;;){q===k&&(q=0),a=j[q];var r=a[0],s=a[1]/2+Eg/4,t=Math.sin(s),u=Math.cos(s),v=r-m,w=v>=0?1:-1,x=w*v,y=x>Eg,z=o*t;if(rh.add(Math.atan2(z*w*Math.sin(x),p*u+z*Math.cos(x))),f+=y?v+w*Fg:v,y^m>=c^r>=c){var A=rb(pb(l),pb(a));ub(A);var B=rb(e,A);ub(B);var C=(y^v>=0?-1:1)*ca(B[2]);(d>C||d===C&&(A[0]||A[1]))&&(g+=y^v>=0?1:-1)}if(!q++)break;m=r,o=t,p=u,l=a}}return(f<-Cg||f<Cg&&rh<0)^1&g}function Pb(a){function b(a,b){return Math.cos(a)*Math.cos(b)>f}function c(a){var c,f,i,j,k;return{lineStart:function(){j=i=!1,k=1},point:function(l,m){var n,o=[l,m],p=b(l,m),q=g?p?0:e(l,m):p?e(l+(l<0?Eg:-Eg),m):0;if(!c&&(j=i=p)&&a.lineStart(),p!==i&&(n=d(c,o),(wb(c,n)||wb(o,n))&&(o[0]+=Cg,o[1]+=Cg,p=b(o[0],o[1]))),p!==i)k=0,p?(a.lineStart(),n=d(o,c),a.point(n[0],n[1])):(n=d(c,o),a.point(n[0],n[1]),a.lineEnd()),c=n;else if(h&&c&&g^p){var r;q&f||!(r=d(o,c,!0))||(k=0,g?(a.lineStart(),a.point(r[0][0],r[0][1]),a.point(r[1][0],r[1][1]),a.lineEnd()):(a.point(r[1][0],r[1][1]),a.lineEnd(),a.lineStart(),a.point(r[0][0],r[0][1])))}!p||c&&wb(c,o)||a.point(o[0],o[1]),c=o,i=p,f=q},lineEnd:function(){i&&a.lineEnd(),c=null},clean:function(){return k|(j&&i)<<1}}}function d(a,b,c){var d=pb(a),e=pb(b),g=[1,0,0],h=rb(d,e),i=qb(h,h),j=h[0],k=i-j*j;if(!k)return!c&&a;var l=f*i/k,m=-f*j/k,n=rb(g,h),o=tb(g,l),p=tb(h,m);sb(o,p);var q=n,r=qb(o,q),s=qb(q,q),t=r*r-s*(qb(o,o)-1);if(!(t<0)){var u=Math.sqrt(t),v=tb(q,(-r-u)/s);if(sb(v,o),v=vb(v),!c)return v;var w,x=a[0],y=b[0],z=a[1],A=b[1];y<x&&(w=x,x=y,y=w);var B=y-x,C=mg(B-Eg)<Cg,D=C||B<Cg;if(!C&&A<z&&(w=z,z=A,A=w),D?C?z+A>0^v[1]<(mg(v[0]-x)<Cg?z:A):z<=v[1]&&v[1]<=A:B>Eg^(x<=v[0]&&v[0]<=y)){var E=tb(q,(-r+u)/s);return sb(E,o),[v,vb(E)]}}}function e(b,c){var d=g?a:Eg-a,e=0;return b<-d?e|=1:b>d&&(e|=2),c<-d?e|=4:c>d&&(e|=8),e}var f=Math.cos(a),g=f>0,h=mg(f)>Cg,i=oc(a,6*Ig);return Hb(b,c,i,g?[0,-a]:[-Eg,a-Eg])}function Qb(a,b,c,d){return function(e){var f,g=e.a,h=e.b,i=g.x,j=g.y,k=h.x,l=h.y,m=0,n=1,o=k-i,p=l-j;if(f=a-i,o||!(f>0)){if(f/=o,o<0){if(f<m)return;f<n&&(n=f)}else if(o>0){if(f>n)return;f>m&&(m=f)}if(f=c-i,o||!(f<0)){if(f/=o,o<0){if(f>n)return;f>m&&(m=f)}else if(o>0){if(f<m)return;f<n&&(n=f)}if(f=b-j,p||!(f>0)){if(f/=p,p<0){if(f<m)return;f<n&&(n=f)}else if(p>0){if(f>n)return;f>m&&(m=f)}if(f=d-j,p||!(f<0)){if(f/=p,p<0){if(f>n)return;f>m&&(m=f)}else if(p>0){if(f<m)return;f<n&&(n=f)}return m>0&&(e.a={x:i+m*o,y:j+m*p}),n<1&&(e.b={x:i+n*o,y:j+n*p}),e}}}}}}function Rb(a,b,c,d){function e(d,e){return mg(d[0]-a)<Cg?e>0?0:3:mg(d[0]-c)<Cg?e>0?2:1:mg(d[1]-b)<Cg?e>0?1:0:e>0?3:2}function f(a,b){return g(a.x,b.x)}function g(a,b){var c=e(a,1),d=e(b,1);return c!==d?c-d:0===c?b[1]-a[1]:1===c?a[0]-b[0]:2===c?a[1]-b[1]:b[0]-a[0]}return function(h){function i(a){for(var b=0,c=q.length,d=a[1],e=0;e<c;++e)for(var f,g=1,h=q[e],i=h.length,j=h[0];g<i;++g)f=h[g],j[1]<=d?f[1]>d&&aa(j,f,a)>0&&++b:f[1]<=d&&aa(j,f,a)<0&&--b,j=f;return 0!==b}function j(f,h,i,j){var k=0,l=0;if(null==f||(k=e(f,i))!==(l=e(h,i))||g(f,h)<0^i>0){do j.point(0===k||3===k?a:c,k>1?d:b);while((k=(k+i+4)%4)!==l)}else j.point(h[0],h[1])}function k(e,f){return a<=e&&e<=c&&b<=f&&f<=d}function l(a,b){k(a,b)&&h.point(a,b)}function m(){D.point=o,q&&q.push(r=[]),y=!0,x=!1,v=w=NaN}function n(){p&&(o(s,t),u&&x&&B.rejoin(),p.push(B.buffer())),D.point=l,x&&h.lineEnd()}function o(a,b){a=Math.max(-Gh,Math.min(Gh,a)),b=Math.max(-Gh,Math.min(Gh,b));var c=k(a,b);if(q&&r.push([a,b]),y)s=a,t=b,u=c,y=!1,c&&(h.lineStart(),h.point(a,b));else if(c&&x)h.point(a,b);else{var d={a:{x:v,y:w},b:{x:a,y:b}};C(d)?(x||(h.lineStart(),h.point(d.a.x,d.a.y)),h.point(d.b.x,d.b.y),c||h.lineEnd(),z=!1):c&&(h.lineStart(),h.point(a,b),z=!1)}v=a,w=b,x=c}var p,q,r,s,t,u,v,w,x,y,z,A=h,B=Jb(),C=Qb(a,b,c,d),D={point:l,lineStart:m,lineEnd:n,polygonStart:function(){h=B,p=[],q=[],z=!0},polygonEnd:function(){h=A,p=cg.merge(p);var b=i([a,d]),c=z&&b,e=p.length;(c||e)&&(h.polygonStart(),c&&(h.lineStart(),j(null,null,1,h),h.lineEnd()),e&&Eb(p,f,b,j,h),h.polygonEnd()),p=q=r=null}};return D}}function Sb(a){var b=0,c=Eg/3,d=gc(a),e=d(b,c);return e.parallels=function(a){return arguments.length?d(b=a[0]*Eg/180,c=a[1]*Eg/180):[b/Eg*180,c/Eg*180]},e}function Tb(a,b){function c(a,b){var c=Math.sqrt(f-2*e*Math.sin(b))/e;return[c*Math.sin(a*=e),g-c*Math.cos(a)]}var d=Math.sin(a),e=(d+Math.sin(b))/2,f=1+d*(2*e-d),g=Math.sqrt(f)/e;return c.invert=function(a,b){var c=g-b;return[Math.atan2(a,c)/e,ca((f-(a*a+c*c)*e*e)/(2*e))]},c}function Ub(){function a(a,b){Ih+=e*a-d*b,d=a,e=b}var b,c,d,e;Nh.point=function(f,g){Nh.point=a,b=d=f,c=e=g},Nh.lineEnd=function(){a(b,c)}}function Vb(a,b){a<Jh&&(Jh=a),a>Lh&&(Lh=a),b<Kh&&(Kh=b),b>Mh&&(Mh=b)}function Wb(){function a(a,b){g.push("M",a,",",b,f)}function b(a,b){g.push("M",a,",",b),h.point=c}function c(a,b){g.push("L",a,",",b)}function d(){h.point=a}function e(){g.push("Z")}var f=Xb(4.5),g=[],h={point:a,lineStart:function(){h.point=b},lineEnd:d,polygonStart:function(){h.lineEnd=e},polygonEnd:function(){h.lineEnd=d,h.point=a},pointRadius:function(a){return f=Xb(a),h},result:function(){if(g.length){var a=g.join("");return g=[],a}}};return h}function Xb(a){return"m0,"+a+"a"+a+","+a+" 0 1,1 0,"+-2*a+"a"+a+","+a+" 0 1,1 0,"+2*a+"z"}function Yb(a,b){vh+=a,wh+=b,++xh}function Zb(){function a(a,d){var e=a-b,f=d-c,g=Math.sqrt(e*e+f*f);yh+=g*(b+a)/2,zh+=g*(c+d)/2,Ah+=g,Yb(b=a,c=d)}var b,c;Ph.point=function(d,e){Ph.point=a,Yb(b=d,c=e)}}function $b(){Ph.point=Yb}function _b(){function a(a,b){var c=a-d,f=b-e,g=Math.sqrt(c*c+f*f);yh+=g*(d+a)/2,zh+=g*(e+b)/2,Ah+=g,g=e*a-d*b,Bh+=g*(d+a),Ch+=g*(e+b),Dh+=3*g,Yb(d=a,e=b)}var b,c,d,e;Ph.point=function(f,g){Ph.point=a,Yb(b=d=f,c=e=g)},Ph.lineEnd=function(){a(b,c)}}function ac(a){function b(b,c){a.moveTo(b+g,c),a.arc(b,c,g,0,Fg)}function c(b,c){a.moveTo(b,c),h.point=d}function d(b,c){a.lineTo(b,c)}function e(){h.point=b}function f(){a.closePath()}var g=4.5,h={point:b,lineStart:function(){h.point=c},lineEnd:e,polygonStart:function(){h.lineEnd=f},polygonEnd:function(){h.lineEnd=e,h.point=b},pointRadius:function(a){return g=a,h},result:w};return h}function bc(a){function b(a){return(h?d:c)(a)}function c(b){return ec(b,function(c,d){c=a(c,d),b.point(c[0],c[1])})}function d(b){function c(c,d){c=a(c,d),b.point(c[0],c[1])}function d(){t=NaN,y.point=f,b.lineStart()}function f(c,d){var f=pb([c,d]),g=a(c,d);e(t,u,s,v,w,x,t=g[0],u=g[1],s=c,v=f[0],w=f[1],x=f[2],h,b),b.point(t,u)}function g(){y.point=c,b.lineEnd()}function i(){d(),y.point=j,y.lineEnd=k}function j(a,b){f(l=a,m=b),n=t,o=u,p=v,q=w,r=x,y.point=f}function k(){e(t,u,s,v,w,x,n,o,l,p,q,r,h,b),y.lineEnd=g,g()}var l,m,n,o,p,q,r,s,t,u,v,w,x,y={point:c,lineStart:d,lineEnd:g,polygonStart:function(){b.polygonStart(),y.lineStart=i},polygonEnd:function(){b.polygonEnd(),y.lineStart=d}};return y}function e(b,c,d,h,i,j,k,l,m,n,o,p,q,r){var s=k-b,t=l-c,u=s*s+t*t;if(u>4*f&&q--){var v=h+n,w=i+o,x=j+p,y=Math.sqrt(v*v+w*w+x*x),z=Math.asin(x/=y),A=mg(mg(x)-1)<Cg||mg(d-m)<Cg?(d+m)/2:Math.atan2(w,v),B=a(A,z),C=B[0],D=B[1],E=C-b,F=D-c,G=t*E-s*F;(G*G/u>f||mg((s*E+t*F)/u-.5)>.3||h*n+i*o+j*p<g)&&(e(b,c,d,h,i,j,C,D,A,v/=y,w/=y,x,q,r),r.point(C,D),e(C,D,A,v,w,x,k,l,m,n,o,p,q,r))}}var f=.5,g=Math.cos(30*Ig),h=16;return b.precision=function(a){return arguments.length?(h=(f=a*a)>0&&16,b):Math.sqrt(f)},b}function cc(a){var b=bc(function(b,c){return a([b*Jg,c*Jg])});return function(a){return hc(b(a))}}function dc(a){this.stream=a}function ec(a,b){return{point:b,sphere:function(){a.sphere()},lineStart:function(){a.lineStart()},lineEnd:function(){a.lineEnd()},polygonStart:function(){a.polygonStart()},polygonEnd:function(){a.polygonEnd()}}}function fc(a){return gc(function(){return a})()}function gc(a){function b(a){return a=h(a[0]*Ig,a[1]*Ig),[a[0]*m+i,j-a[1]*m]}function c(a){return a=h.invert((a[0]-i)/m,(j-a[1])/m),a&&[a[0]*Jg,a[1]*Jg]}function d(){h=Cb(g=kc(r,s,u),f);var a=f(p,q);return i=n-a[0]*m,j=o+a[1]*m,e()}function e(){return k&&(k.valid=!1,k=null),b}var f,g,h,i,j,k,l=bc(function(a,b){return a=f(a,b),[a[0]*m+i,j-a[1]*m]}),m=150,n=480,o=250,p=0,q=0,r=0,s=0,u=0,v=Fh,w=t,x=null,y=null;return b.stream=function(a){return k&&(k.valid=!1),k=hc(v(g,l(w(a)))),k.valid=!0,k},b.clipAngle=function(a){return arguments.length?(v=null==a?(x=a,Fh):Pb((x=+a)*Ig),e()):x},b.clipExtent=function(a){return arguments.length?(y=a,w=a?Rb(a[0][0],a[0][1],a[1][0],a[1][1]):t,e()):y},b.scale=function(a){return arguments.length?(m=+a,d()):m},b.translate=function(a){return arguments.length?(n=+a[0],o=+a[1],d()):[n,o]},b.center=function(a){return arguments.length?(p=a[0]%360*Ig,q=a[1]%360*Ig,d()):[p*Jg,q*Jg]},b.rotate=function(a){return arguments.length?(r=a[0]%360*Ig,s=a[1]%360*Ig,u=a.length>2?a[2]%360*Ig:0,d()):[r*Jg,s*Jg,u*Jg]},cg.rebind(b,l,"precision"),function(){return f=a.apply(this,arguments),b.invert=f.invert&&c,d()}}function hc(a){return ec(a,function(b,c){a.point(b*Ig,c*Ig)})}function ic(a,b){return[a,b]}function jc(a,b){return[a>Eg?a-Fg:a<-Eg?a+Fg:a,b]}function kc(a,b,c){return a?b||c?Cb(mc(a),nc(b,c)):mc(a):b||c?nc(b,c):jc}function lc(a){return function(b,c){return b+=a,[b>Eg?b-Fg:b<-Eg?b+Fg:b,c]}}function mc(a){var b=lc(a);return b.invert=lc(-a),b}function nc(a,b){function c(a,b){var c=Math.cos(b),h=Math.cos(a)*c,i=Math.sin(a)*c,j=Math.sin(b),k=j*d+h*e;return[Math.atan2(i*f-k*g,h*d-j*e),ca(k*f+i*g)]}var d=Math.cos(a),e=Math.sin(a),f=Math.cos(b),g=Math.sin(b);return c.invert=function(a,b){var c=Math.cos(b),h=Math.cos(a)*c,i=Math.sin(a)*c,j=Math.sin(b),k=j*f-i*g;return[Math.atan2(i*f+j*g,h*d+k*e),ca(k*d-h*e)]},c}function oc(a,b){var c=Math.cos(a),d=Math.sin(a);return function(e,f,g,h){var i=g*b;null!=e?(e=pc(c,e),f=pc(c,f),(g>0?e<f:e>f)&&(e+=g*Fg)):(e=a+g*Fg,f=a-.5*i);for(var j,k=e;g>0?k>f:k<f;k-=i)h.point((j=vb([c,-d*Math.cos(k),-d*Math.sin(k)]))[0],j[1])}}function pc(a,b){var c=pb(b);c[0]-=a,ub(c);var d=ba(-c[1]);return((-c[2]<0?-d:d)+2*Math.PI-Cg)%(2*Math.PI)}function qc(a,b,c){var d=cg.range(a,b-Cg,c).concat(b);return function(a){return d.map(function(b){return[a,b]})}}function rc(a,b,c){var d=cg.range(a,b-Cg,c).concat(b);return function(a){return d.map(function(b){return[b,a]})}}function sc(a){return a.source}function tc(a){return a.target}function uc(a,b,c,d){var e=Math.cos(b),f=Math.sin(b),g=Math.cos(d),h=Math.sin(d),i=e*Math.cos(a),j=e*Math.sin(a),k=g*Math.cos(c),l=g*Math.sin(c),m=2*Math.asin(Math.sqrt(ga(d-b)+e*g*ga(c-a))),n=1/Math.sin(m),o=m?function(a){var b=Math.sin(a*=m)*n,c=Math.sin(m-a)*n,d=c*i+b*k,e=c*j+b*l,g=c*f+b*h;return[Math.atan2(e,d)*Jg,Math.atan2(g,Math.sqrt(d*d+e*e))*Jg]}:function(){return[a*Jg,b*Jg]};return o.distance=m,o}function vc(){function a(a,e){var f=Math.sin(e*=Ig),g=Math.cos(e),h=mg((a*=Ig)-b),i=Math.cos(h);Qh+=Math.atan2(Math.sqrt((h=g*Math.sin(h))*h+(h=d*f-c*g*i)*h),c*f+d*g*i),b=a,c=f,d=g}var b,c,d;Rh.point=function(e,f){b=e*Ig,c=Math.sin(f*=Ig),d=Math.cos(f),Rh.point=a},Rh.lineEnd=function(){Rh.point=Rh.lineEnd=w}}function wc(a,b){function c(b,c){var d=Math.cos(b),e=Math.cos(c),f=a(d*e);return[f*e*Math.sin(b),f*Math.sin(c)]}return c.invert=function(a,c){var d=Math.sqrt(a*a+c*c),e=b(d),f=Math.sin(e),g=Math.cos(e);return[Math.atan2(a*f,d*g),Math.asin(d&&c*f/d)]},c}function xc(a,b){function c(a,b){g>0?b<-Hg+Cg&&(b=-Hg+Cg):b>Hg-Cg&&(b=Hg-Cg);var c=g/Math.pow(e(b),f);return[c*Math.sin(f*a),g-c*Math.cos(f*a)]}var d=Math.cos(a),e=function(a){return Math.tan(Eg/4+a/2)},f=a===b?Math.sin(a):Math.log(d/Math.cos(b))/Math.log(e(b)/e(a)),g=d*Math.pow(e(a),f)/f;return f?(c.invert=function(a,b){var c=g-b,d=_(f)*Math.sqrt(a*a+c*c);return[Math.atan2(a,c)/f,2*Math.atan(Math.pow(g/d,1/f))-Hg]},c):zc}function yc(a,b){function c(a,b){var c=f-b;return[c*Math.sin(e*a),f-c*Math.cos(e*a)]}var d=Math.cos(a),e=a===b?Math.sin(a):(d-Math.cos(b))/(b-a),f=d/e+a;return mg(e)<Cg?ic:(c.invert=function(a,b){var c=f-b;return[Math.atan2(a,c)/e,f-_(e)*Math.sqrt(a*a+c*c)]},c)}function zc(a,b){return[a,Math.log(Math.tan(Eg/4+b/2))]}function Ac(a){var b,c=fc(a),d=c.scale,e=c.translate,f=c.clipExtent;return c.scale=function(){var a=d.apply(c,arguments);return a===c?b?c.clipExtent(null):c:a},c.translate=function(){var a=e.apply(c,arguments);return a===c?b?c.clipExtent(null):c:a},c.clipExtent=function(a){var g=f.apply(c,arguments);if(g===c){if(b=null==a){var h=Eg*d(),i=e();f([[i[0]-h,i[1]-h],[i[0]+h,i[1]+h]])}}else b&&(g=null);return g},c.clipExtent(null)}function Bc(a,b){return[Math.log(Math.tan(Eg/4+b/2)),-a]}function Cc(a){return a[0]}function Dc(a){return a[1]}function Ec(a){for(var b=a.length,c=[0,1],d=2,e=2;e<b;e++){for(;d>1&&aa(a[c[d-2]],a[c[d-1]],a[e])<=0;)--d;c[d++]=e}return c.slice(0,d)}function Fc(a,b){return a[0]-b[0]||a[1]-b[1]}function Gc(a,b,c){return(c[0]-b[0])*(a[1]-b[1])<(c[1]-b[1])*(a[0]-b[0])}function Hc(a,b,c,d){var e=a[0],f=c[0],g=b[0]-e,h=d[0]-f,i=a[1],j=c[1],k=b[1]-i,l=d[1]-j,m=(h*(i-j)-l*(e-f))/(l*g-h*k);return[e+m*g,i+m*k]}function Ic(a){var b=a[0],c=a[a.length-1];return!(b[0]-c[0]||b[1]-c[1])}function Jc(){cd(this),this.edge=this.site=this.circle=null}function Kc(a){var b=bi.pop()||new Jc;return b.site=a,b}function Lc(a){Vc(a),$h.remove(a),bi.push(a),cd(a)}function Mc(a){var b=a.circle,c=b.x,d=b.cy,e={x:c,y:d},f=a.P,g=a.N,h=[a];Lc(a);for(var i=f;i.circle&&mg(c-i.circle.x)<Cg&&mg(d-i.circle.cy)<Cg;)f=i.P,h.unshift(i),Lc(i),i=f;h.unshift(i),Vc(i);for(var j=g;j.circle&&mg(c-j.circle.x)<Cg&&mg(d-j.circle.cy)<Cg;)g=j.N,h.push(j),Lc(j),j=g;h.push(j),Vc(j);var k,l=h.length;for(k=1;k<l;++k)j=h[k],i=h[k-1],_c(j.edge,i.site,j.site,e);i=h[0],j=h[l-1],j.edge=Zc(i.site,j.site,null,e),Uc(i),Uc(j)}function Nc(a){for(var b,c,d,e,f=a.x,g=a.y,h=$h._;h;)if(d=Oc(h,g)-f,d>Cg)h=h.L;else{if(e=f-Pc(h,g),!(e>Cg)){d>-Cg?(b=h.P,c=h):e>-Cg?(b=h,c=h.N):b=c=h;break}if(!h.R){b=h;break}h=h.R}var i=Kc(a);if($h.insert(b,i),b||c){if(b===c)return Vc(b),c=Kc(b.site),$h.insert(i,c),i.edge=c.edge=Zc(b.site,i.site),Uc(b),void Uc(c);if(!c)return void(i.edge=Zc(b.site,i.site));Vc(b),Vc(c);var j=b.site,k=j.x,l=j.y,m=a.x-k,n=a.y-l,o=c.site,p=o.x-k,q=o.y-l,r=2*(m*q-n*p),s=m*m+n*n,t=p*p+q*q,u={x:(q*s-n*t)/r+k,y:(m*t-p*s)/r+l};_c(c.edge,j,o,u),i.edge=Zc(j,a,null,u),c.edge=Zc(a,o,null,u),Uc(b),Uc(c)}}function Oc(a,b){var c=a.site,d=c.x,e=c.y,f=e-b;if(!f)return d;var g=a.P;if(!g)return-(1/0);c=g.site;var h=c.x,i=c.y,j=i-b;if(!j)return h;var k=h-d,l=1/f-1/j,m=k/j;return l?(-m+Math.sqrt(m*m-2*l*(k*k/(-2*j)-i+j/2+e-f/2)))/l+d:(d+h)/2}function Pc(a,b){var c=a.N;if(c)return Oc(c,b);var d=a.site;return d.y===b?d.x:1/0}function Qc(a){this.site=a,this.edges=[]}function Rc(a){for(var b,c,d,e,f,g,h,i,j,k,l=a[0][0],m=a[1][0],n=a[0][1],o=a[1][1],p=Zh,q=p.length;q--;)if(f=p[q],f&&f.prepare())for(h=f.edges,i=h.length,g=0;g<i;)k=h[g].end(),d=k.x,e=k.y,j=h[++g%i].start(),b=j.x,c=j.y,(mg(d-b)>Cg||mg(e-c)>Cg)&&(h.splice(g,0,new ad($c(f.site,k,mg(d-l)<Cg&&o-e>Cg?{x:l,y:mg(b-l)<Cg?c:o}:mg(e-o)<Cg&&m-d>Cg?{x:mg(c-o)<Cg?b:m,y:o}:mg(d-m)<Cg&&e-n>Cg?{x:m,y:mg(b-m)<Cg?c:n}:mg(e-n)<Cg&&d-l>Cg?{x:mg(c-n)<Cg?b:l,y:n}:null),f.site,null)),++i)}function Sc(a,b){return b.angle-a.angle}function Tc(){cd(this),this.x=this.y=this.arc=this.site=this.cy=null}function Uc(a){var b=a.P,c=a.N;if(b&&c){var d=b.site,e=a.site,f=c.site;if(d!==f){var g=e.x,h=e.y,i=d.x-g,j=d.y-h,k=f.x-g,l=f.y-h,m=2*(i*l-j*k);if(!(m>=-Dg)){var n=i*i+j*j,o=k*k+l*l,p=(l*n-j*o)/m,q=(i*o-k*n)/m,l=q+h,r=ci.pop()||new Tc;r.arc=a,r.site=e,r.x=p+g,r.y=l+Math.sqrt(p*p+q*q),r.cy=l,a.circle=r;for(var s=null,t=ai._;t;)if(r.y<t.y||r.y===t.y&&r.x<=t.x){if(!t.L){s=t.P;break}t=t.L}else{if(!t.R){s=t;break}t=t.R}ai.insert(s,r),s||(_h=r)}}}}function Vc(a){var b=a.circle;b&&(b.P||(_h=b.N),ai.remove(b),ci.push(b),cd(b),a.circle=null)}function Wc(a){for(var b,c=Yh,d=Qb(a[0][0],a[0][1],a[1][0],a[1][1]),e=c.length;e--;)b=c[e],(!Xc(b,a)||!d(b)||mg(b.a.x-b.b.x)<Cg&&mg(b.a.y-b.b.y)<Cg)&&(b.a=b.b=null,c.splice(e,1))}function Xc(a,b){var c=a.b;if(c)return!0;var d,e,f=a.a,g=b[0][0],h=b[1][0],i=b[0][1],j=b[1][1],k=a.l,l=a.r,m=k.x,n=k.y,o=l.x,p=l.y,q=(m+o)/2,r=(n+p)/2;if(p===n){if(q<g||q>=h)return;if(m>o){if(f){if(f.y>=j)return}else f={x:q,y:i};c={x:q,y:j}}else{if(f){if(f.y<i)return}else f={x:q,y:j};c={x:q,y:i}}}else if(d=(m-o)/(p-n),e=r-d*q,d<-1||d>1)if(m>o){if(f){if(f.y>=j)return}else f={x:(i-e)/d,y:i};c={x:(j-e)/d,y:j}}else{if(f){if(f.y<i)return}else f={x:(j-e)/d,y:j};c={x:(i-e)/d,y:i}}else if(n<p){if(f){if(f.x>=h)return}else f={x:g,y:d*g+e};c={x:h,y:d*h+e}}else{if(f){if(f.x<g)return}else f={x:h,y:d*h+e};c={x:g,y:d*g+e}}return a.a=f,a.b=c,!0}function Yc(a,b){this.l=a,this.r=b,this.a=this.b=null}function Zc(a,b,c,d){var e=new Yc(a,b);return Yh.push(e),c&&_c(e,a,b,c),d&&_c(e,b,a,d),Zh[a.i].edges.push(new ad(e,a,b)),Zh[b.i].edges.push(new ad(e,b,a)),e}function $c(a,b,c){var d=new Yc(a,null);return d.a=b,d.b=c,Yh.push(d),d}function _c(a,b,c,d){a.a||a.b?a.l===c?a.b=d:a.a=d:(a.a=d,a.l=b,a.r=c)}function ad(a,b,c){var d=a.a,e=a.b;this.edge=a,this.site=b,this.angle=c?Math.atan2(c.y-b.y,c.x-b.x):a.l===b?Math.atan2(e.x-d.x,d.y-e.y):Math.atan2(d.x-e.x,e.y-d.y)}function bd(){this._=null}function cd(a){a.U=a.C=a.L=a.R=a.P=a.N=null}function dd(a,b){var c=b,d=b.R,e=c.U;e?e.L===c?e.L=d:e.R=d:a._=d,d.U=e,c.U=d,c.R=d.L,c.R&&(c.R.U=c),d.L=c}function ed(a,b){var c=b,d=b.L,e=c.U;e?e.L===c?e.L=d:e.R=d:a._=d,d.U=e,c.U=d,c.L=d.R,c.L&&(c.L.U=c),d.R=c}function fd(a){for(;a.L;)a=a.L;return a}function gd(a,b){var c,d,e,f=a.sort(hd).pop();for(Yh=[],Zh=new Array(a.length),$h=new bd,ai=new bd;;)if(e=_h,f&&(!e||f.y<e.y||f.y===e.y&&f.x<e.x))f.x===c&&f.y===d||(Zh[f.i]=new Qc(f),Nc(f),c=f.x,d=f.y),f=a.pop();else{if(!e)break;Mc(e.arc)}b&&(Wc(b),Rc(b));var g={cells:Zh,edges:Yh};return $h=ai=Yh=Zh=null,g}function hd(a,b){return b.y-a.y||b.x-a.x}function id(a,b,c){return(a.x-c.x)*(b.y-a.y)-(a.x-b.x)*(c.y-a.y)}function jd(a){return a.x}function kd(a){return a.y}function ld(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function md(a,b,c,d,e,f){if(!a(b,c,d,e,f)){var g=.5*(c+e),h=.5*(d+f),i=b.nodes;i[0]&&md(a,i[0],c,d,g,h),i[1]&&md(a,i[1],g,d,e,h),i[2]&&md(a,i[2],c,h,g,f),i[3]&&md(a,i[3],g,h,e,f)}}function nd(a,b,c,d,e,f,g){var h,i=1/0;return function a(j,k,l,m,n){if(!(k>f||l>g||m<d||n<e)){if(o=j.point){var o,p=b-j.x,q=c-j.y,r=p*p+q*q;if(r<i){var s=Math.sqrt(i=r);d=b-s,e=c-s,f=b+s,g=c+s,h=o}}for(var t=j.nodes,u=.5*(k+m),v=.5*(l+n),w=b>=u,x=c>=v,y=x<<1|w,z=y+4;y<z;++y)if(j=t[3&y])switch(3&y){case 0:a(j,k,l,u,v);break;case 1:a(j,u,l,m,v);break;case 2:a(j,k,v,u,n);break;case 3:a(j,u,v,m,n)}}}(a,d,e,f,g),h}function od(a,b){a=cg.rgb(a),b=cg.rgb(b);var c=a.r,d=a.g,e=a.b,f=b.r-c,g=b.g-d,h=b.b-e;return function(a){return"#"+va(Math.round(c+f*a))+va(Math.round(d+g*a))+va(Math.round(e+h*a))}}function pd(a,b){var c,d={},e={};for(c in a)c in b?d[c]=sd(a[c],b[c]):e[c]=a[c];for(c in b)c in a||(e[c]=b[c]);return function(a){for(c in d)e[c]=d[c](a);return e}}function qd(a,b){return a=+a,b=+b,function(c){return a*(1-c)+b*c}}function rd(a,b){var c,d,e,f=ei.lastIndex=fi.lastIndex=0,g=-1,h=[],i=[];for(a+="",b+="";(c=ei.exec(a))&&(d=fi.exec(b));)(e=d.index)>f&&(e=b.slice(f,e),h[g]?h[g]+=e:h[++g]=e),(c=c[0])===(d=d[0])?h[g]?h[g]+=d:h[++g]=d:(h[++g]=null,i.push({i:g,x:qd(c,d)})),f=fi.lastIndex;return f<b.length&&(e=b.slice(f),h[g]?h[g]+=e:h[++g]=e),h.length<2?i[0]?(b=i[0].x,function(a){return b(a)+""}):function(){return b}:(b=i.length,function(a){for(var c,d=0;d<b;++d)h[(c=i[d]).i]=c.x(a);return h.join("")})}function sd(a,b){for(var c,d=cg.interpolators.length;--d>=0&&!(c=cg.interpolators[d](a,b)););return c}function td(a,b){var c,d=[],e=[],f=a.length,g=b.length,h=Math.min(a.length,b.length);for(c=0;c<h;++c)d.push(sd(a[c],b[c]));for(;c<f;++c)e[c]=a[c];for(;c<g;++c)e[c]=b[c];return function(a){for(c=0;c<h;++c)e[c]=d[c](a);return e}}function ud(a){return function(b){return b<=0?0:b>=1?1:a(b)}}function vd(a){return function(b){return 1-a(1-b)}}function wd(a){return function(b){return.5*(b<.5?a(2*b):2-a(2-2*b))}}function xd(a){return a*a}function yd(a){return a*a*a}function zd(a){if(a<=0)return 0;if(a>=1)return 1;var b=a*a,c=b*a;return 4*(a<.5?c:3*(a-b)+c-.75)}function Ad(a){return function(b){return Math.pow(b,a)}}function Bd(a){return 1-Math.cos(a*Hg)}function Cd(a){return Math.pow(2,10*(a-1))}function Dd(a){return 1-Math.sqrt(1-a*a)}function Ed(a,b){var c;return arguments.length<2&&(b=.45),arguments.length?c=b/Fg*Math.asin(1/a):(a=1,c=b/4),function(d){return 1+a*Math.pow(2,-10*d)*Math.sin((d-c)*Fg/b)}}function Fd(a){return a||(a=1.70158),function(b){return b*b*((a+1)*b-a)}}function Gd(a){return a<1/2.75?7.5625*a*a:a<2/2.75?7.5625*(a-=1.5/2.75)*a+.75:a<2.5/2.75?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375}function Hd(a,b){a=cg.hcl(a),b=cg.hcl(b);var c=a.h,d=a.c,e=a.l,f=b.h-c,g=b.c-d,h=b.l-e;return isNaN(g)&&(g=0,d=isNaN(d)?b.c:d),isNaN(f)?(f=0,c=isNaN(c)?b.h:c):f>180?f-=360:f<-180&&(f+=360),function(a){return la(c+f*a,d+g*a,e+h*a)+""}}function Id(a,b){a=cg.hsl(a),b=cg.hsl(b);var c=a.h,d=a.s,e=a.l,f=b.h-c,g=b.s-d,h=b.l-e;return isNaN(g)&&(g=0,d=isNaN(d)?b.s:d),isNaN(f)?(f=0,c=isNaN(c)?b.h:c):f>180?f-=360:f<-180&&(f+=360),function(a){return ja(c+f*a,d+g*a,e+h*a)+""}}function Jd(a,b){a=cg.lab(a),b=cg.lab(b);var c=a.l,d=a.a,e=a.b,f=b.l-c,g=b.a-d,h=b.b-e;return function(a){return na(c+f*a,d+g*a,e+h*a)+""}}function Kd(a,b){return b-=a,function(c){return Math.round(a+b*c)}}function Ld(a){var b=[a.a,a.b],c=[a.c,a.d],d=Nd(b),e=Md(b,c),f=Nd(Od(c,b,-e))||0;b[0]*c[1]<c[0]*b[1]&&(b[0]*=-1,b[1]*=-1,d*=-1,e*=-1),this.rotate=(d?Math.atan2(b[1],b[0]):Math.atan2(-c[0],c[1]))*Jg,this.translate=[a.e,a.f],this.scale=[d,f],this.skew=f?Math.atan2(e,f)*Jg:0}function Md(a,b){return a[0]*b[0]+a[1]*b[1]}function Nd(a){var b=Math.sqrt(Md(a,a));return b&&(a[0]/=b,a[1]/=b),b}function Od(a,b,c){return a[0]+=c*b[0],a[1]+=c*b[1],a}function Pd(a,b){var c,d=[],e=[],f=cg.transform(a),g=cg.transform(b),h=f.translate,i=g.translate,j=f.rotate,k=g.rotate,l=f.skew,m=g.skew,n=f.scale,o=g.scale;return h[0]!=i[0]||h[1]!=i[1]?(d.push("translate(",null,",",null,")"),e.push({i:1,x:qd(h[0],i[0])},{i:3,x:qd(h[1],i[1])})):i[0]||i[1]?d.push("translate("+i+")"):d.push(""),j!=k?(j-k>180?k+=360:k-j>180&&(j+=360),e.push({i:d.push(d.pop()+"rotate(",null,")")-2,x:qd(j,k)})):k&&d.push(d.pop()+"rotate("+k+")"),l!=m?e.push({i:d.push(d.pop()+"skewX(",null,")")-2,x:qd(l,m)}):m&&d.push(d.pop()+"skewX("+m+")"),n[0]!=o[0]||n[1]!=o[1]?(c=d.push(d.pop()+"scale(",null,",",null,")"),e.push({i:c-4,x:qd(n[0],o[0])},{i:c-2,x:qd(n[1],o[1])})):1==o[0]&&1==o[1]||d.push(d.pop()+"scale("+o+")"),c=e.length,function(a){for(var b,f=-1;++f<c;)d[(b=e[f]).i]=b.x(a);return d.join("")}}function Qd(a,b){return b=(b-=a=+a)||1/b,function(c){return(c-a)/b}}function Rd(a,b){return b=(b-=a=+a)||1/b,function(c){return Math.max(0,Math.min(1,(c-a)/b))}}function Sd(a){for(var b=a.source,c=a.target,d=Ud(b,c),e=[b];b!==d;)b=b.parent,e.push(b);for(var f=e.length;c!==d;)e.splice(f,0,c),c=c.parent;return e}function Td(a){for(var b=[],c=a.parent;null!=c;)b.push(a),a=c,c=c.parent;return b.push(a),b}function Ud(a,b){if(a===b)return a;for(var c=Td(a),d=Td(b),e=c.pop(),f=d.pop(),g=null;e===f;)g=e,e=c.pop(),f=d.pop();return g}function Vd(a){a.fixed|=2}function Wd(a){a.fixed&=-7}function Xd(a){a.fixed|=4,a.px=a.x,a.py=a.y}function Yd(a){a.fixed&=-5}function Zd(a,b,c){var d=0,e=0;if(a.charge=0,!a.leaf)for(var f,g=a.nodes,h=g.length,i=-1;++i<h;)f=g[i],null!=f&&(Zd(f,b,c),a.charge+=f.charge,d+=f.charge*f.cx,e+=f.charge*f.cy);if(a.point){a.leaf||(a.point.x+=Math.random()-.5,a.point.y+=Math.random()-.5);var j=b*c[a.point.index];a.charge+=a.pointCharge=j,d+=j*a.point.x,e+=j*a.point.y}a.cx=d/a.charge,a.cy=e/a.charge}function $d(a,b){return cg.rebind(a,b,"sort","children","value"),a.nodes=a,a.links=ee,a}function _d(a,b){for(var c=[a];null!=(a=c.pop());)if(b(a),(e=a.children)&&(d=e.length))for(var d,e;--d>=0;)c.push(e[d])}function ae(a,b){for(var c=[a],d=[];null!=(a=c.pop());)if(d.push(a),(f=a.children)&&(e=f.length))for(var e,f,g=-1;++g<e;)c.push(f[g]);for(;null!=(a=d.pop());)b(a)}function be(a){return a.children}function ce(a){return a.value}function de(a,b){return b.value-a.value}function ee(a){return cg.merge(a.map(function(a){return(a.children||[]).map(function(b){return{source:a,target:b}})}))}function fe(a){return a.x}function ge(a){return a.y}function he(a,b,c){a.y0=b,a.y=c}function ie(a){return cg.range(a.length)}function je(a){for(var b=-1,c=a[0].length,d=[];++b<c;)d[b]=0;return d}function ke(a){for(var b,c=1,d=0,e=a[0][1],f=a.length;c<f;++c)(b=a[c][1])>e&&(d=c,e=b);return d}function le(a){return a.reduce(me,0)}function me(a,b){return a+b[1]}function ne(a,b){return oe(a,Math.ceil(Math.log(b.length)/Math.LN2+1))}function oe(a,b){for(var c=-1,d=+a[0],e=(a[1]-d)/b,f=[];++c<=b;)f[c]=e*c+d;return f}function pe(a){return[cg.min(a),cg.max(a)]}function qe(a,b){return a.value-b.value}function re(a,b){var c=a._pack_next;a._pack_next=b,b._pack_prev=a,b._pack_next=c,c._pack_prev=b}function se(a,b){a._pack_next=b,b._pack_prev=a}function te(a,b){var c=b.x-a.x,d=b.y-a.y,e=a.r+b.r;return.999*e*e>c*c+d*d}function ue(a){function b(a){k=Math.min(a.x-a.r,k),l=Math.max(a.x+a.r,l),m=Math.min(a.y-a.r,m),n=Math.max(a.y+a.r,n)}if((c=a.children)&&(j=c.length)){var c,d,e,f,g,h,i,j,k=1/0,l=-(1/0),m=1/0,n=-(1/0);if(c.forEach(ve),d=c[0],d.x=-d.r,d.y=0,b(d),j>1&&(e=c[1],e.x=e.r,e.y=0,b(e),j>2))for(f=c[2],ye(d,e,f),b(f),re(d,f),d._pack_prev=f,re(f,e),e=d._pack_next,g=3;g<j;g++){ye(d,e,f=c[g]);var o=0,p=1,q=1;for(h=e._pack_next;h!==e;h=h._pack_next,p++)if(te(h,f)){o=1;break}if(1==o)for(i=d._pack_prev;i!==h._pack_prev&&!te(i,f);i=i._pack_prev,q++);o?(p<q||p==q&&e.r<d.r?se(d,e=h):se(d=i,e),g--):(re(d,f),e=f,b(f))}var r=(k+l)/2,s=(m+n)/2,t=0;for(g=0;g<j;g++)f=c[g],f.x-=r,f.y-=s,t=Math.max(t,f.r+Math.sqrt(f.x*f.x+f.y*f.y));a.r=t,c.forEach(we)}}function ve(a){a._pack_next=a._pack_prev=a}function we(a){delete a._pack_next,delete a._pack_prev}function xe(a,b,c,d){var e=a.children;if(a.x=b+=d*a.x,a.y=c+=d*a.y,a.r*=d,e)for(var f=-1,g=e.length;++f<g;)xe(e[f],b,c,d)}function ye(a,b,c){var d=a.r+c.r,e=b.x-a.x,f=b.y-a.y;if(d&&(e||f)){var g=b.r+c.r,h=e*e+f*f;g*=g,d*=d;var i=.5+(d-g)/(2*h),j=Math.sqrt(Math.max(0,2*g*(d+h)-(d-=h)*d-g*g))/(2*h);c.x=a.x+i*e+j*f,c.y=a.y+i*f-j*e}else c.x=a.x+d,c.y=a.y}function ze(a,b){return a.parent==b.parent?1:2}function Ae(a){var b=a.children;return b.length?b[0]:a.t}function Be(a){var b,c=a.children;return(b=c.length)?c[b-1]:a.t}function Ce(a,b,c){var d=c/(b.i-a.i);b.c-=d,b.s+=c,a.c+=d,b.z+=c,b.m+=c}function De(a){for(var b,c=0,d=0,e=a.children,f=e.length;--f>=0;)b=e[f],b.z+=c,b.m+=c,c+=b.s+(d+=b.c)}function Ee(a,b,c){return a.a.parent===b.parent?a.a:c}function Fe(a){return 1+cg.max(a,function(a){return a.y})}function Ge(a){return a.reduce(function(a,b){return a+b.x},0)/a.length}function He(a){var b=a.children;return b&&b.length?He(b[0]):a}function Ie(a){var b,c=a.children;return c&&(b=c.length)?Ie(c[b-1]):a}function Je(a){return{x:a.x,y:a.y,dx:a.dx,dy:a.dy}}function Ke(a,b){var c=a.x+b[3],d=a.y+b[0],e=a.dx-b[1]-b[3],f=a.dy-b[0]-b[2];return e<0&&(c+=e/2,e=0),f<0&&(d+=f/2,f=0),{x:c,y:d,dx:e,dy:f}}function Le(a){var b=a[0],c=a[a.length-1];return b<c?[b,c]:[c,b]}function Me(a){return a.rangeExtent?a.rangeExtent():Le(a.range())}function Ne(a,b,c,d){var e=c(a[0],a[1]),f=d(b[0],b[1]);return function(a){return f(e(a))}}function Oe(a,b){var c,d=0,e=a.length-1,f=a[d],g=a[e];return g<f&&(c=d,d=e,e=c,c=f,f=g,g=c),a[d]=b.floor(f),a[e]=b.ceil(g),a}function Pe(a){return a?{floor:function(b){return Math.floor(b/a)*a},ceil:function(b){return Math.ceil(b/a)*a}}:qi}function Qe(a,b,c,d){var e=[],f=[],g=0,h=Math.min(a.length,b.length)-1;for(a[h]<a[0]&&(a=a.slice().reverse(),b=b.slice().reverse());++g<=h;)e.push(c(a[g-1],a[g])),f.push(d(b[g-1],b[g]));return function(b){var c=cg.bisect(a,b,1,h)-1;return f[c](e[c](b))}}function Re(a,b,c,d){function e(){var e=Math.min(a.length,b.length)>2?Qe:Ne,i=d?Rd:Qd;return g=e(a,b,i,c),h=e(b,a,i,sd),f}function f(a){return g(a)}var g,h;return f.invert=function(a){return h(a)},f.domain=function(b){return arguments.length?(a=b.map(Number),e()):a},f.range=function(a){return arguments.length?(b=a,e()):b},f.rangeRound=function(a){return f.range(a).interpolate(Kd)},f.clamp=function(a){return arguments.length?(d=a,e()):d},f.interpolate=function(a){return arguments.length?(c=a,e()):c},f.ticks=function(b){return Ve(a,b)},f.tickFormat=function(b,c){return We(a,b,c)},f.nice=function(b){return Te(a,b),e()},f.copy=function(){return Re(a,b,c,d)},e()}function Se(a,b){return cg.rebind(a,b,"range","rangeRound","interpolate","clamp")}function Te(a,b){return Oe(a,Pe(Ue(a,b)[2]))}function Ue(a,b){null==b&&(b=10);var c=Le(a),d=c[1]-c[0],e=Math.pow(10,Math.floor(Math.log(d/b)/Math.LN10)),f=b/d*e;return f<=.15?e*=10:f<=.35?e*=5:f<=.75&&(e*=2),c[0]=Math.ceil(c[0]/e)*e,c[1]=Math.floor(c[1]/e)*e+.5*e,c[2]=e,c}function Ve(a,b){return cg.range.apply(cg,Ue(a,b))}function We(a,b,c){var d=Ue(a,b);if(c){var e=eh.exec(c);if(e.shift(),"s"===e[8]){var f=cg.formatPrefix(Math.max(mg(d[0]),mg(d[1])));return e[7]||(e[7]="."+Xe(f.scale(d[2]))),e[8]="f",c=cg.format(e.join("")),function(a){return c(f.scale(a))+f.symbol}}e[7]||(e[7]="."+Ye(e[8],d)),c=e.join("")}else c=",."+Xe(d[2])+"f";return cg.format(c)}function Xe(a){return-Math.floor(Math.log(a)/Math.LN10+.01)}function Ye(a,b){var c=Xe(b[2]);return a in ri?Math.abs(c-Xe(Math.max(mg(b[0]),mg(b[1]))))+ +("e"!==a):c-2*("%"===a)}function Ze(a,b,c,d){function e(a){return(c?Math.log(a<0?0:a):-Math.log(a>0?0:-a))/Math.log(b)}function f(a){return c?Math.pow(b,a):-Math.pow(b,-a)}function g(b){return a(e(b))}return g.invert=function(b){return f(a.invert(b))},g.domain=function(b){return arguments.length?(c=b[0]>=0,a.domain((d=b.map(Number)).map(e)),g):d},g.base=function(c){return arguments.length?(b=+c,a.domain(d.map(e)),g):b},g.nice=function(){var b=Oe(d.map(e),c?Math:ti);return a.domain(b),d=b.map(f),g},g.ticks=function(){var a=Le(d),g=[],h=a[0],i=a[1],j=Math.floor(e(h)),k=Math.ceil(e(i)),l=b%1?2:b;if(isFinite(k-j)){if(c){for(;j<k;j++)for(var m=1;m<l;m++)g.push(f(j)*m);g.push(f(j))}else for(g.push(f(j));j++<k;)for(var m=l-1;m>0;m--)g.push(f(j)*m);for(j=0;g[j]<h;j++);for(k=g.length;g[k-1]>i;k--);g=g.slice(j,k)}return g},g.tickFormat=function(a,b){if(!arguments.length)return si;arguments.length<2?b=si:"function"!=typeof b&&(b=cg.format(b));var d,h=Math.max(.1,a/g.ticks().length),i=c?(d=1e-12,Math.ceil):(d=-1e-12,Math.floor);return function(a){return a/f(i(e(a)+d))<=h?b(a):""}},g.copy=function(){return Ze(a.copy(),b,c,d)},Se(g,a)}function $e(a,b,c){function d(b){return a(e(b))}var e=_e(b),f=_e(1/b);return d.invert=function(b){return f(a.invert(b))},d.domain=function(b){return arguments.length?(a.domain((c=b.map(Number)).map(e)),d):c},d.ticks=function(a){return Ve(c,a)},
|
7
|
+
d.tickFormat=function(a,b){return We(c,a,b)},d.nice=function(a){return d.domain(Te(c,a))},d.exponent=function(g){return arguments.length?(e=_e(b=g),f=_e(1/b),a.domain(c.map(e)),d):b},d.copy=function(){return $e(a.copy(),b,c)},Se(d,a)}function _e(a){return function(b){return b<0?-Math.pow(-b,a):Math.pow(b,a)}}function af(a,b){function c(c){return f[((e.get(c)||("range"===b.t?e.set(c,a.push(c)):NaN))-1)%f.length]}function d(b,c){return cg.range(a.length).map(function(a){return b+c*a})}var e,f,g;return c.domain=function(d){if(!arguments.length)return a;a=[],e=new k;for(var f,g=-1,h=d.length;++g<h;)e.has(f=d[g])||e.set(f,a.push(f));return c[b.t].apply(c,b.a)},c.range=function(a){return arguments.length?(f=a,g=0,b={t:"range",a:arguments},c):f},c.rangePoints=function(e,h){arguments.length<2&&(h=0);var i=e[0],j=e[1],k=a.length<2?(i=(i+j)/2,0):(j-i)/(a.length-1+h);return f=d(i+k*h/2,k),g=0,b={t:"rangePoints",a:arguments},c},c.rangeRoundPoints=function(e,h){arguments.length<2&&(h=0);var i=e[0],j=e[1],k=a.length<2?(i=j=Math.round((i+j)/2),0):(j-i)/(a.length-1+h)|0;return f=d(i+Math.round(k*h/2+(j-i-(a.length-1+h)*k)/2),k),g=0,b={t:"rangeRoundPoints",a:arguments},c},c.rangeBands=function(e,h,i){arguments.length<2&&(h=0),arguments.length<3&&(i=h);var j=e[1]<e[0],k=e[j-0],l=e[1-j],m=(l-k)/(a.length-h+2*i);return f=d(k+m*i,m),j&&f.reverse(),g=m*(1-h),b={t:"rangeBands",a:arguments},c},c.rangeRoundBands=function(e,h,i){arguments.length<2&&(h=0),arguments.length<3&&(i=h);var j=e[1]<e[0],k=e[j-0],l=e[1-j],m=Math.floor((l-k)/(a.length-h+2*i));return f=d(k+Math.round((l-k-(a.length-h)*m)/2),m),j&&f.reverse(),g=Math.round(m*(1-h)),b={t:"rangeRoundBands",a:arguments},c},c.rangeBand=function(){return g},c.rangeExtent=function(){return Le(b.a[0])},c.copy=function(){return af(a,b)},c.domain(a)}function bf(a,b){function f(){var c=0,d=b.length;for(h=[];++c<d;)h[c-1]=cg.quantile(a,c/d);return g}function g(a){if(!isNaN(a=+a))return b[cg.bisect(h,a)]}var h;return g.domain=function(b){return arguments.length?(a=b.map(d).filter(e).sort(c),f()):a},g.range=function(a){return arguments.length?(b=a,f()):b},g.quantiles=function(){return h},g.invertExtent=function(c){return c=b.indexOf(c),c<0?[NaN,NaN]:[c>0?h[c-1]:a[0],c<h.length?h[c]:a[a.length-1]]},g.copy=function(){return bf(a,b)},f()}function cf(a,b,c){function d(b){return c[Math.max(0,Math.min(g,Math.floor(f*(b-a))))]}function e(){return f=c.length/(b-a),g=c.length-1,d}var f,g;return d.domain=function(c){return arguments.length?(a=+c[0],b=+c[c.length-1],e()):[a,b]},d.range=function(a){return arguments.length?(c=a,e()):c},d.invertExtent=function(b){return b=c.indexOf(b),b=b<0?NaN:b/f+a,[b,b+1/f]},d.copy=function(){return cf(a,b,c)},e()}function df(a,b){function c(c){if(c<=c)return b[cg.bisect(a,c)]}return c.domain=function(b){return arguments.length?(a=b,c):a},c.range=function(a){return arguments.length?(b=a,c):b},c.invertExtent=function(c){return c=b.indexOf(c),[a[c-1],a[c]]},c.copy=function(){return df(a,b)},c}function ef(a){function b(a){return+a}return b.invert=b,b.domain=b.range=function(c){return arguments.length?(a=c.map(b),b):a},b.ticks=function(b){return Ve(a,b)},b.tickFormat=function(b,c){return We(a,b,c)},b.copy=function(){return ef(a)},b}function ff(){return 0}function gf(a){return a.innerRadius}function hf(a){return a.outerRadius}function jf(a){return a.startAngle}function kf(a){return a.endAngle}function lf(a){return a&&a.padAngle}function mf(a,b,c,d){return(a-c)*b-(b-d)*a>0?0:1}function nf(a,b,c,d,e){var f=a[0]-b[0],g=a[1]-b[1],h=(e?d:-d)/Math.sqrt(f*f+g*g),i=h*g,j=-h*f,k=a[0]+i,l=a[1]+j,m=b[0]+i,n=b[1]+j,o=(k+m)/2,p=(l+n)/2,q=m-k,r=n-l,s=q*q+r*r,t=c-d,u=k*n-m*l,v=(r<0?-1:1)*Math.sqrt(t*t*s-u*u),w=(u*r-q*v)/s,x=(-u*q-r*v)/s,y=(u*r+q*v)/s,z=(-u*q+r*v)/s,A=w-o,B=x-p,C=y-o,D=z-p;return A*A+B*B>C*C+D*D&&(w=y,x=z),[[w-i,x-j],[w*c/t,x*c/t]]}function of(a){function b(b){function g(){j.push("M",f(a(k),h))}for(var i,j=[],k=[],l=-1,m=b.length,n=Ba(c),o=Ba(d);++l<m;)e.call(this,i=b[l],l)?k.push([+n.call(this,i,l),+o.call(this,i,l)]):k.length&&(g(),k=[]);return k.length&&g(),j.length?j.join(""):null}var c=Cc,d=Dc,e=Db,f=pf,g=f.key,h=.7;return b.x=function(a){return arguments.length?(c=a,b):c},b.y=function(a){return arguments.length?(d=a,b):d},b.defined=function(a){return arguments.length?(e=a,b):e},b.interpolate=function(a){return arguments.length?(g="function"==typeof a?f=a:(f=zi.get(a)||pf).key,b):g},b.tension=function(a){return arguments.length?(h=a,b):h},b}function pf(a){return a.join("L")}function qf(a){return pf(a)+"Z"}function rf(a){for(var b=0,c=a.length,d=a[0],e=[d[0],",",d[1]];++b<c;)e.push("H",(d[0]+(d=a[b])[0])/2,"V",d[1]);return c>1&&e.push("H",d[0]),e.join("")}function sf(a){for(var b=0,c=a.length,d=a[0],e=[d[0],",",d[1]];++b<c;)e.push("V",(d=a[b])[1],"H",d[0]);return e.join("")}function tf(a){for(var b=0,c=a.length,d=a[0],e=[d[0],",",d[1]];++b<c;)e.push("H",(d=a[b])[0],"V",d[1]);return e.join("")}function uf(a,b){return a.length<4?pf(a):a[1]+xf(a.slice(1,-1),yf(a,b))}function vf(a,b){return a.length<3?pf(a):a[0]+xf((a.push(a[0]),a),yf([a[a.length-2]].concat(a,[a[1]]),b))}function wf(a,b){return a.length<3?pf(a):a[0]+xf(a,yf(a,b))}function xf(a,b){if(b.length<1||a.length!=b.length&&a.length!=b.length+2)return pf(a);var c=a.length!=b.length,d="",e=a[0],f=a[1],g=b[0],h=g,i=1;if(c&&(d+="Q"+(f[0]-2*g[0]/3)+","+(f[1]-2*g[1]/3)+","+f[0]+","+f[1],e=a[1],i=2),b.length>1){h=b[1],f=a[i],i++,d+="C"+(e[0]+g[0])+","+(e[1]+g[1])+","+(f[0]-h[0])+","+(f[1]-h[1])+","+f[0]+","+f[1];for(var j=2;j<b.length;j++,i++)f=a[i],h=b[j],d+="S"+(f[0]-h[0])+","+(f[1]-h[1])+","+f[0]+","+f[1]}if(c){var k=a[i];d+="Q"+(f[0]+2*h[0]/3)+","+(f[1]+2*h[1]/3)+","+k[0]+","+k[1]}return d}function yf(a,b){for(var c,d=[],e=(1-b)/2,f=a[0],g=a[1],h=1,i=a.length;++h<i;)c=f,f=g,g=a[h],d.push([e*(g[0]-c[0]),e*(g[1]-c[1])]);return d}function zf(a){if(a.length<3)return pf(a);var b=1,c=a.length,d=a[0],e=d[0],f=d[1],g=[e,e,e,(d=a[1])[0]],h=[f,f,f,d[1]],i=[e,",",f,"L",Df(Ci,g),",",Df(Ci,h)];for(a.push(a[c-1]);++b<=c;)d=a[b],g.shift(),g.push(d[0]),h.shift(),h.push(d[1]),Ef(i,g,h);return a.pop(),i.push("L",d),i.join("")}function Af(a){if(a.length<4)return pf(a);for(var b,c=[],d=-1,e=a.length,f=[0],g=[0];++d<3;)b=a[d],f.push(b[0]),g.push(b[1]);for(c.push(Df(Ci,f)+","+Df(Ci,g)),--d;++d<e;)b=a[d],f.shift(),f.push(b[0]),g.shift(),g.push(b[1]),Ef(c,f,g);return c.join("")}function Bf(a){for(var b,c,d=-1,e=a.length,f=e+4,g=[],h=[];++d<4;)c=a[d%e],g.push(c[0]),h.push(c[1]);for(b=[Df(Ci,g),",",Df(Ci,h)],--d;++d<f;)c=a[d%e],g.shift(),g.push(c[0]),h.shift(),h.push(c[1]),Ef(b,g,h);return b.join("")}function Cf(a,b){var c=a.length-1;if(c)for(var d,e,f=a[0][0],g=a[0][1],h=a[c][0]-f,i=a[c][1]-g,j=-1;++j<=c;)d=a[j],e=j/c,d[0]=b*d[0]+(1-b)*(f+e*h),d[1]=b*d[1]+(1-b)*(g+e*i);return zf(a)}function Df(a,b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2]+a[3]*b[3]}function Ef(a,b,c){a.push("C",Df(Ai,b),",",Df(Ai,c),",",Df(Bi,b),",",Df(Bi,c),",",Df(Ci,b),",",Df(Ci,c))}function Ff(a,b){return(b[1]-a[1])/(b[0]-a[0])}function Gf(a){for(var b=0,c=a.length-1,d=[],e=a[0],f=a[1],g=d[0]=Ff(e,f);++b<c;)d[b]=(g+(g=Ff(e=f,f=a[b+1])))/2;return d[b]=g,d}function Hf(a){for(var b,c,d,e,f=[],g=Gf(a),h=-1,i=a.length-1;++h<i;)b=Ff(a[h],a[h+1]),mg(b)<Cg?g[h]=g[h+1]=0:(c=g[h]/b,d=g[h+1]/b,e=c*c+d*d,e>9&&(e=3*b/Math.sqrt(e),g[h]=e*c,g[h+1]=e*d));for(h=-1;++h<=i;)e=(a[Math.min(i,h+1)][0]-a[Math.max(0,h-1)][0])/(6*(1+g[h]*g[h])),f.push([e||0,g[h]*e||0]);return f}function If(a){return a.length<3?pf(a):a[0]+xf(a,Hf(a))}function Jf(a){for(var b,c,d,e=-1,f=a.length;++e<f;)b=a[e],c=b[0],d=b[1]-Hg,b[0]=c*Math.cos(d),b[1]=c*Math.sin(d);return a}function Kf(a){function b(b){function i(){p.push("M",h(a(r),l),k,j(a(q.reverse()),l),"Z")}for(var m,n,o,p=[],q=[],r=[],s=-1,t=b.length,u=Ba(c),v=Ba(e),w=c===d?function(){return n}:Ba(d),x=e===f?function(){return o}:Ba(f);++s<t;)g.call(this,m=b[s],s)?(q.push([n=+u.call(this,m,s),o=+v.call(this,m,s)]),r.push([+w.call(this,m,s),+x.call(this,m,s)])):q.length&&(i(),q=[],r=[]);return q.length&&i(),p.length?p.join(""):null}var c=Cc,d=Cc,e=0,f=Dc,g=Db,h=pf,i=h.key,j=h,k="L",l=.7;return b.x=function(a){return arguments.length?(c=d=a,b):d},b.x0=function(a){return arguments.length?(c=a,b):c},b.x1=function(a){return arguments.length?(d=a,b):d},b.y=function(a){return arguments.length?(e=f=a,b):f},b.y0=function(a){return arguments.length?(e=a,b):e},b.y1=function(a){return arguments.length?(f=a,b):f},b.defined=function(a){return arguments.length?(g=a,b):g},b.interpolate=function(a){return arguments.length?(i="function"==typeof a?h=a:(h=zi.get(a)||pf).key,j=h.reverse||h,k=h.closed?"M":"L",b):i},b.tension=function(a){return arguments.length?(l=a,b):l},b}function Lf(a){return a.radius}function Mf(a){return[a.x,a.y]}function Nf(a){return function(){var b=a.apply(this,arguments),c=b[0],d=b[1]-Hg;return[c*Math.cos(d),c*Math.sin(d)]}}function Of(){return 64}function Pf(){return"circle"}function Qf(a){var b=Math.sqrt(a/Eg);return"M0,"+b+"A"+b+","+b+" 0 1,1 0,"+-b+"A"+b+","+b+" 0 1,1 0,"+b+"Z"}function Rf(a){return function(){var b,c;(b=this[a])&&(c=b[b.active])&&(--b.count?delete b[b.active]:delete this[a],b.active+=.5,c.event&&c.event.interrupt.call(this,this.__data__,c.index))}}function Sf(a,b,c){return rg(a,Ji),a.namespace=b,a.id=c,a}function Tf(a,b,c,d){var e=a.id,f=a.namespace;return S(a,"function"==typeof c?function(a,g,h){a[f][e].tween.set(b,d(c.call(a,a.__data__,g,h)))}:(c=d(c),function(a){a[f][e].tween.set(b,c)}))}function Uf(a){return null==a&&(a=""),function(){this.textContent=a}}function Vf(a){return null==a?"__transition__":"__transition_"+a+"__"}function Wf(a,b,c,d,e){var f=a[c]||(a[c]={active:0,count:0}),g=f[d];if(!g){var h=e.time;g=f[d]={tween:new k,time:h,delay:e.delay,duration:e.duration,ease:e.ease,index:b},e=null,++f.count,cg.timer(function(e){function i(c){if(f.active>d)return k();var e=f[f.active];e&&(--f.count,delete f[f.active],e.event&&e.event.interrupt.call(a,a.__data__,e.index)),f.active=d,g.event&&g.event.start.call(a,a.__data__,b),g.tween.forEach(function(c,d){(d=d.call(a,a.__data__,b))&&p.push(d)}),m=g.ease,l=g.duration,cg.timer(function(){return o.c=j(c||1)?Db:j,1},0,h)}function j(c){if(f.active!==d)return 1;for(var e=c/l,h=m(e),i=p.length;i>0;)p[--i].call(a,h);return e>=1?(g.event&&g.event.end.call(a,a.__data__,b),k()):void 0}function k(){return--f.count?delete f[d]:delete a[c],1}var l,m,n=g.delay,o=bh,p=[];return o.t=n+h,n<=e?i(e-n):void(o.c=i)},0,h)}}function Xf(a,b,c){a.attr("transform",function(a){var d=b(a);return"translate("+(isFinite(d)?d:c(a))+",0)"})}function Yf(a,b,c){a.attr("transform",function(a){var d=b(a);return"translate(0,"+(isFinite(d)?d:c(a))+")"})}function Zf(a){return a.toISOString()}function $f(a,b,c){function d(b){return a(b)}function e(a,c){var d=a[1]-a[0],e=d/c,f=cg.bisect(Si,e);return f==Si.length?[b.year,Ue(a.map(function(a){return a/31536e6}),c)[2]]:f?b[e/Si[f-1]<Si[f]/e?f-1:f]:[Vi,Ue(a,c)[2]]}return d.invert=function(b){return _f(a.invert(b))},d.domain=function(b){return arguments.length?(a.domain(b),d):a.domain().map(_f)},d.nice=function(a,b){function c(c){return!isNaN(c)&&!a.range(c,_f(+c+1),b).length}var f=d.domain(),g=Le(f),h=null==a?e(g,10):"number"==typeof a&&e(g,a);return h&&(a=h[0],b=h[1]),d.domain(Oe(f,b>1?{floor:function(b){for(;c(b=a.floor(b));)b=_f(b-1);return b},ceil:function(b){for(;c(b=a.ceil(b));)b=_f(+b+1);return b}}:a))},d.ticks=function(a,b){var c=Le(d.domain()),f=null==a?e(c,10):"number"==typeof a?e(c,a):!a.range&&[{range:a},b];return f&&(a=f[0],b=f[1]),a.range(c[0],_f(+c[1]+1),b<1?1:b)},d.tickFormat=function(){return c},d.copy=function(){return $f(a.copy(),b,c)},Se(d,a)}function _f(a){return new Date(a)}function ag(a){return JSON.parse(a.responseText)}function bg(a){var b=fg.createRange();return b.selectNode(fg.body),b.createContextualFragment(a.responseText)}var cg={version:"3.5.6"},dg=[].slice,eg=function(a){return dg.call(a)},fg=this.document;if(fg)try{eg(fg.documentElement.childNodes)[0].nodeType}catch(a){eg=function(a){for(var b=a.length,c=new Array(b);b--;)c[b]=a[b];return c}}if(Date.now||(Date.now=function(){return+new Date}),fg)try{fg.createElement("DIV").style.setProperty("opacity",0,"")}catch(a){var gg=this.Element.prototype,hg=gg.setAttribute,ig=gg.setAttributeNS,jg=this.CSSStyleDeclaration.prototype,kg=jg.setProperty;gg.setAttribute=function(a,b){hg.call(this,a,b+"")},gg.setAttributeNS=function(a,b,c){ig.call(this,a,b,c+"")},jg.setProperty=function(a,b,c){kg.call(this,a,b+"",c)}}cg.ascending=c,cg.descending=function(a,b){return b<a?-1:b>a?1:b>=a?0:NaN},cg.min=function(a,b){var c,d,e=-1,f=a.length;if(1===arguments.length){for(;++e<f;)if(null!=(d=a[e])&&d>=d){c=d;break}for(;++e<f;)null!=(d=a[e])&&c>d&&(c=d)}else{for(;++e<f;)if(null!=(d=b.call(a,a[e],e))&&d>=d){c=d;break}for(;++e<f;)null!=(d=b.call(a,a[e],e))&&c>d&&(c=d)}return c},cg.max=function(a,b){var c,d,e=-1,f=a.length;if(1===arguments.length){for(;++e<f;)if(null!=(d=a[e])&&d>=d){c=d;break}for(;++e<f;)null!=(d=a[e])&&d>c&&(c=d)}else{for(;++e<f;)if(null!=(d=b.call(a,a[e],e))&&d>=d){c=d;break}for(;++e<f;)null!=(d=b.call(a,a[e],e))&&d>c&&(c=d)}return c},cg.extent=function(a,b){var c,d,e,f=-1,g=a.length;if(1===arguments.length){for(;++f<g;)if(null!=(d=a[f])&&d>=d){c=e=d;break}for(;++f<g;)null!=(d=a[f])&&(c>d&&(c=d),e<d&&(e=d))}else{for(;++f<g;)if(null!=(d=b.call(a,a[f],f))&&d>=d){c=e=d;break}for(;++f<g;)null!=(d=b.call(a,a[f],f))&&(c>d&&(c=d),e<d&&(e=d))}return[c,e]},cg.sum=function(a,b){var c,d=0,f=a.length,g=-1;if(1===arguments.length)for(;++g<f;)e(c=+a[g])&&(d+=c);else for(;++g<f;)e(c=+b.call(a,a[g],g))&&(d+=c);return d},cg.mean=function(a,b){var c,f=0,g=a.length,h=-1,i=g;if(1===arguments.length)for(;++h<g;)e(c=d(a[h]))?f+=c:--i;else for(;++h<g;)e(c=d(b.call(a,a[h],h)))?f+=c:--i;if(i)return f/i},cg.quantile=function(a,b){var c=(a.length-1)*b+1,d=Math.floor(c),e=+a[d-1],f=c-d;return f?e+f*(a[d]-e):e},cg.median=function(a,b){var f,g=[],h=a.length,i=-1;if(1===arguments.length)for(;++i<h;)e(f=d(a[i]))&&g.push(f);else for(;++i<h;)e(f=d(b.call(a,a[i],i)))&&g.push(f);if(g.length)return cg.quantile(g.sort(c),.5)},cg.variance=function(a,b){var c,f,g=a.length,h=0,i=0,j=-1,k=0;if(1===arguments.length)for(;++j<g;)e(c=d(a[j]))&&(f=c-h,h+=f/++k,i+=f*(c-h));else for(;++j<g;)e(c=d(b.call(a,a[j],j)))&&(f=c-h,h+=f/++k,i+=f*(c-h));if(k>1)return i/(k-1)},cg.deviation=function(){var a=cg.variance.apply(this,arguments);return a?Math.sqrt(a):a};var lg=g(c);cg.bisectLeft=lg.left,cg.bisect=cg.bisectRight=lg.right,cg.bisector=function(a){return g(1===a.length?function(b,d){return c(a(b),d)}:a)},cg.shuffle=function(a,b,c){(f=arguments.length)<3&&(c=a.length,f<2&&(b=0));for(var d,e,f=c-b;f;)e=Math.random()*f--|0,d=a[f+b],a[f+b]=a[e+b],a[e+b]=d;return a},cg.permute=function(a,b){for(var c=b.length,d=new Array(c);c--;)d[c]=a[b[c]];return d},cg.pairs=function(a){for(var b,c=0,d=a.length-1,e=a[0],f=new Array(d<0?0:d);c<d;)f[c]=[b=e,e=a[++c]];return f},cg.zip=function(){if(!(d=arguments.length))return[];for(var a=-1,b=cg.min(arguments,h),c=new Array(b);++a<b;)for(var d,e=-1,f=c[a]=new Array(d);++e<d;)f[e]=arguments[e][a];return c},cg.transpose=function(a){return cg.zip.apply(cg,a)},cg.keys=function(a){var b=[];for(var c in a)b.push(c);return b},cg.values=function(a){var b=[];for(var c in a)b.push(a[c]);return b},cg.entries=function(a){var b=[];for(var c in a)b.push({key:c,value:a[c]});return b},cg.merge=function(a){for(var b,c,d,e=a.length,f=-1,g=0;++f<e;)g+=a[f].length;for(c=new Array(g);--e>=0;)for(d=a[e],b=d.length;--b>=0;)c[--g]=d[b];return c};var mg=Math.abs;cg.range=function(a,b,c){if(arguments.length<3&&(c=1,arguments.length<2&&(b=a,a=0)),(b-a)/c===1/0)throw new Error("infinite range");var d,e=[],f=i(mg(c)),g=-1;if(a*=f,b*=f,c*=f,c<0)for(;(d=a+c*++g)>b;)e.push(d/f);else for(;(d=a+c*++g)<b;)e.push(d/f);return e},cg.map=function(a,b){var c=new k;if(a instanceof k)a.forEach(function(a,b){c.set(a,b)});else if(Array.isArray(a)){var d,e=-1,f=a.length;if(1===arguments.length)for(;++e<f;)c.set(e,a[e]);else for(;++e<f;)c.set(b.call(a,d=a[e],e),d)}else for(var g in a)c.set(g,a[g]);return c};var ng="__proto__",og="\0";j(k,{has:n,get:function(a){return this._[l(a)]},set:function(a,b){return this._[l(a)]=b},remove:o,keys:p,values:function(){var a=[];for(var b in this._)a.push(this._[b]);return a},entries:function(){var a=[];for(var b in this._)a.push({key:m(b),value:this._[b]});return a},size:q,empty:r,forEach:function(a){for(var b in this._)a.call(this,m(b),this._[b])}}),cg.nest=function(){function a(b,g,h){if(h>=f.length)return d?d.call(e,g):c?g.sort(c):g;for(var i,j,l,m,n=-1,o=g.length,p=f[h++],q=new k;++n<o;)(m=q.get(i=p(j=g[n])))?m.push(j):q.set(i,[j]);return b?(j=b(),l=function(c,d){j.set(c,a(b,d,h))}):(j={},l=function(c,d){j[c]=a(b,d,h)}),q.forEach(l),j}function b(a,c){if(c>=f.length)return a;var d=[],e=g[c++];return a.forEach(function(a,e){d.push({key:a,values:b(e,c)})}),e?d.sort(function(a,b){return e(a.key,b.key)}):d}var c,d,e={},f=[],g=[];return e.map=function(b,c){return a(c,b,0)},e.entries=function(c){return b(a(cg.map,c,0),0)},e.key=function(a){return f.push(a),e},e.sortKeys=function(a){return g[f.length-1]=a,e},e.sortValues=function(a){return c=a,e},e.rollup=function(a){return d=a,e},e},cg.set=function(a){var b=new s;if(a)for(var c=0,d=a.length;c<d;++c)b.add(a[c]);return b},j(s,{has:n,add:function(a){return this._[l(a+="")]=!0,a},remove:o,values:p,size:q,empty:r,forEach:function(a){for(var b in this._)a.call(this,m(b))}}),cg.behavior={},cg.rebind=function(a,b){for(var c,d=1,e=arguments.length;++d<e;)a[c=arguments[d]]=u(a,b,b[c]);return a};var pg=["webkit","ms","moz","Moz","o","O"];cg.dispatch=function(){for(var a=new x,b=-1,c=arguments.length;++b<c;)a[arguments[b]]=y(a);return a},x.prototype.on=function(a,b){var c=a.indexOf("."),d="";if(c>=0&&(d=a.slice(c+1),a=a.slice(0,c)),a)return arguments.length<2?this[a].on(d):this[a].on(d,b);if(2===arguments.length){if(null==b)for(a in this)this.hasOwnProperty(a)&&this[a].on(d,null);return this}},cg.event=null,cg.requote=function(a){return a.replace(qg,"\\$&")};var qg=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,rg={}.__proto__?function(a,b){a.__proto__=b}:function(a,b){for(var c in b)a[c]=b[c]},sg=function(a,b){return b.querySelector(a)},tg=function(a,b){return b.querySelectorAll(a)},ug=function(a,b){var c=a.matches||a[v(a,"matchesSelector")];return(ug=function(a,b){return c.call(a,b)})(a,b)};"function"==typeof Sizzle&&(sg=function(a,b){return Sizzle(a,b)[0]||null},tg=Sizzle,ug=Sizzle.matchesSelector),cg.selection=function(){return cg.select(fg.documentElement)};var vg=cg.selection.prototype=[];vg.select=function(a){var b,c,d,e,f=[];a=D(a);for(var g=-1,h=this.length;++g<h;){f.push(b=[]),b.parentNode=(d=this[g]).parentNode;for(var i=-1,j=d.length;++i<j;)(e=d[i])?(b.push(c=a.call(e,e.__data__,i,g)),c&&"__data__"in e&&(c.__data__=e.__data__)):b.push(null)}return C(f)},vg.selectAll=function(a){var b,c,d=[];a=E(a);for(var e=-1,f=this.length;++e<f;)for(var g=this[e],h=-1,i=g.length;++h<i;)(c=g[h])&&(d.push(b=eg(a.call(c,c.__data__,h,e))),b.parentNode=c);return C(d)};var wg={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};cg.ns={prefix:wg,qualify:function(a){var b=a.indexOf(":"),c=a;return b>=0&&(c=a.slice(0,b),a=a.slice(b+1)),wg.hasOwnProperty(c)?{space:wg[c],local:a}:a}},vg.attr=function(a,b){if(arguments.length<2){if("string"==typeof a){var c=this.node();return a=cg.ns.qualify(a),a.local?c.getAttributeNS(a.space,a.local):c.getAttribute(a)}for(b in a)this.each(F(b,a[b]));return this}return this.each(F(a,b))},vg.classed=function(a,b){if(arguments.length<2){if("string"==typeof a){var c=this.node(),d=(a=I(a)).length,e=-1;if(b=c.classList){for(;++e<d;)if(!b.contains(a[e]))return!1}else for(b=c.getAttribute("class");++e<d;)if(!H(a[e]).test(b))return!1;return!0}for(b in a)this.each(J(b,a[b]));return this}return this.each(J(a,b))},vg.style=function(a,c,d){var e=arguments.length;if(e<3){if("string"!=typeof a){e<2&&(c="");for(d in a)this.each(L(d,a[d],c));return this}if(e<2){var f=this.node();return b(f).getComputedStyle(f,null).getPropertyValue(a)}d=""}return this.each(L(a,c,d))},vg.property=function(a,b){if(arguments.length<2){if("string"==typeof a)return this.node()[a];for(b in a)this.each(M(b,a[b]));return this}return this.each(M(a,b))},vg.text=function(a){return arguments.length?this.each("function"==typeof a?function(){var b=a.apply(this,arguments);this.textContent=null==b?"":b}:null==a?function(){this.textContent=""}:function(){this.textContent=a}):this.node().textContent},vg.html=function(a){return arguments.length?this.each("function"==typeof a?function(){var b=a.apply(this,arguments);this.innerHTML=null==b?"":b}:null==a?function(){this.innerHTML=""}:function(){this.innerHTML=a}):this.node().innerHTML},vg.append=function(a){return a=N(a),this.select(function(){return this.appendChild(a.apply(this,arguments))})},vg.insert=function(a,b){return a=N(a),b=D(b),this.select(function(){return this.insertBefore(a.apply(this,arguments),b.apply(this,arguments)||null)})},vg.remove=function(){return this.each(O)},vg.data=function(a,b){function c(a,c){var d,e,f,g=a.length,l=c.length,m=Math.min(g,l),n=new Array(l),o=new Array(l),p=new Array(g);if(b){var q,r=new k,s=new Array(g);for(d=-1;++d<g;)r.has(q=b.call(e=a[d],e.__data__,d))?p[d]=e:r.set(q,e),s[d]=q;for(d=-1;++d<l;)(e=r.get(q=b.call(c,f=c[d],d)))?e!==!0&&(n[d]=e,e.__data__=f):o[d]=P(f),r.set(q,!0);for(d=-1;++d<g;)r.get(s[d])!==!0&&(p[d]=a[d])}else{for(d=-1;++d<m;)e=a[d],f=c[d],e?(e.__data__=f,n[d]=e):o[d]=P(f);for(;d<l;++d)o[d]=P(c[d]);for(;d<g;++d)p[d]=a[d]}o.update=n,o.parentNode=n.parentNode=p.parentNode=a.parentNode,h.push(o),i.push(n),j.push(p)}var d,e,f=-1,g=this.length;if(!arguments.length){for(a=new Array(g=(d=this[0]).length);++f<g;)(e=d[f])&&(a[f]=e.__data__);return a}var h=T([]),i=C([]),j=C([]);if("function"==typeof a)for(;++f<g;)c(d=this[f],a.call(d,d.parentNode.__data__,f));else for(;++f<g;)c(d=this[f],a);return i.enter=function(){return h},i.exit=function(){return j},i},vg.datum=function(a){return arguments.length?this.property("__data__",a):this.property("__data__")},vg.filter=function(a){var b,c,d,e=[];"function"!=typeof a&&(a=Q(a));for(var f=0,g=this.length;f<g;f++){e.push(b=[]),b.parentNode=(c=this[f]).parentNode;for(var h=0,i=c.length;h<i;h++)(d=c[h])&&a.call(d,d.__data__,h,f)&&b.push(d)}return C(e)},vg.order=function(){for(var a=-1,b=this.length;++a<b;)for(var c,d=this[a],e=d.length-1,f=d[e];--e>=0;)(c=d[e])&&(f&&f!==c.nextSibling&&f.parentNode.insertBefore(c,f),f=c);return this},vg.sort=function(a){a=R.apply(this,arguments);for(var b=-1,c=this.length;++b<c;)this[b].sort(a);return this.order()},vg.each=function(a){return S(this,function(b,c,d){a.call(b,b.__data__,c,d)})},vg.call=function(a){var b=eg(arguments);return a.apply(b[0]=this,b),this},vg.empty=function(){return!this.node()},vg.node=function(){for(var a=0,b=this.length;a<b;a++)for(var c=this[a],d=0,e=c.length;d<e;d++){var f=c[d];if(f)return f}return null},vg.size=function(){var a=0;return S(this,function(){++a}),a};var xg=[];cg.selection.enter=T,cg.selection.enter.prototype=xg,xg.append=vg.append,xg.empty=vg.empty,xg.node=vg.node,xg.call=vg.call,xg.size=vg.size,xg.select=function(a){for(var b,c,d,e,f,g=[],h=-1,i=this.length;++h<i;){d=(e=this[h]).update,g.push(b=[]),b.parentNode=e.parentNode;for(var j=-1,k=e.length;++j<k;)(f=e[j])?(b.push(d[j]=c=a.call(e.parentNode,f.__data__,j,h)),c.__data__=f.__data__):b.push(null)}return C(g)},xg.insert=function(a,b){return arguments.length<2&&(b=U(this)),vg.insert.call(this,a,b)},cg.select=function(b){var c;return"string"==typeof b?(c=[sg(b,fg)],c.parentNode=fg.documentElement):(c=[b],c.parentNode=a(b)),C([c])},cg.selectAll=function(a){var b;return"string"==typeof a?(b=eg(tg(a,fg)),b.parentNode=fg.documentElement):(b=a,b.parentNode=null),C([b])},vg.on=function(a,b,c){var d=arguments.length;if(d<3){if("string"!=typeof a){d<2&&(b=!1);for(c in a)this.each(V(c,a[c],b));return this}if(d<2)return(d=this.node()["__on"+a])&&d._;c=!1}return this.each(V(a,b,c))};var yg=cg.map({mouseenter:"mouseover",mouseleave:"mouseout"});fg&&yg.forEach(function(a){"on"+a in fg&&yg.remove(a)});var zg,Ag=0;cg.mouse=function(a){return Z(a,A())};var Bg=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;cg.touch=function(a,b,c){if(arguments.length<3&&(c=b,b=A().changedTouches),b)for(var d,e=0,f=b.length;e<f;++e)if((d=b[e]).identifier===c)return Z(a,d)},cg.behavior.drag=function(){function a(){this.on("mousedown.drag",f).on("touchstart.drag",g)}function c(a,b,c,f,g){return function(){function h(){var a,c,d=b(m,p);d&&(a=d[0]-t[0],c=d[1]-t[1],o|=a|c,t=d,n({type:"drag",x:d[0]+j[0],y:d[1]+j[1],dx:a,dy:c}))}function i(){b(m,p)&&(r.on(f+q,null).on(g+q,null),s(o&&cg.event.target===l),n({type:"dragend"}))}var j,k=this,l=cg.event.target,m=k.parentNode,n=d.of(k,arguments),o=0,p=a(),q=".drag"+(null==p?"":"-"+p),r=cg.select(c(l)).on(f+q,h).on(g+q,i),s=Y(l),t=b(m,p);e?(j=e.apply(k,arguments),j=[j.x-t[0],j.y-t[1]]):j=[0,0],n({type:"dragstart"})}}var d=B(a,"drag","dragstart","dragend"),e=null,f=c(w,cg.mouse,b,"mousemove","mouseup"),g=c($,cg.touch,t,"touchmove","touchend");return a.origin=function(b){return arguments.length?(e=b,a):e},cg.rebind(a,d,"on")},cg.touches=function(a,b){return arguments.length<2&&(b=A().touches),b?eg(b).map(function(b){var c=Z(a,b);return c.identifier=b.identifier,c}):[]};var Cg=1e-6,Dg=Cg*Cg,Eg=Math.PI,Fg=2*Eg,Gg=Fg-Cg,Hg=Eg/2,Ig=Eg/180,Jg=180/Eg,Kg=Math.SQRT2,Lg=2,Mg=4;cg.interpolateZoom=function(a,b){function c(a){var b=a*s;if(r){var c=ea(p),g=f/(Lg*m)*(c*fa(Kg*b+p)-da(p));return[d+g*j,e+g*k,f*c/ea(Kg*b+p)]}return[d+a*j,e+a*k,f*Math.exp(Kg*b)]}var d=a[0],e=a[1],f=a[2],g=b[0],h=b[1],i=b[2],j=g-d,k=h-e,l=j*j+k*k,m=Math.sqrt(l),n=(i*i-f*f+Mg*l)/(2*f*Lg*m),o=(i*i-f*f-Mg*l)/(2*i*Lg*m),p=Math.log(Math.sqrt(n*n+1)-n),q=Math.log(Math.sqrt(o*o+1)-o),r=q-p,s=(r||Math.log(i/f))/Kg;return c.duration=1e3*s,c},cg.behavior.zoom=function(){function a(a){a.on(F,l).on(Og+".zoom",n).on("dblclick.zoom",o).on(I,m)}function c(a){return[(a[0]-y.x)/y.k,(a[1]-y.y)/y.k]}function d(a){return[a[0]*y.k+y.x,a[1]*y.k+y.y]}function e(a){y.k=Math.max(C[0],Math.min(C[1],a))}function f(a,b){b=d(b),y.x+=a[0]-b[0],y.y+=a[1]-b[1]}function g(b,c,d,g){b.__chart__={x:y.x,y:y.y,k:y.k},e(Math.pow(2,g)),f(q=c,d),b=cg.select(b),D>0&&(b=b.transition().duration(D)),b.call(a.event)}function h(){v&&v.domain(u.range().map(function(a){return(a-y.x)/y.k}).map(u.invert)),x&&x.domain(w.range().map(function(a){return(a-y.y)/y.k}).map(w.invert))}function i(a){E++||a({type:"zoomstart"})}function j(a){h(),a({type:"zoom",scale:y.k,translate:[y.x,y.y]})}function k(a){--E||(a({type:"zoomend"}),q=null)}function l(){function a(){l=1,f(cg.mouse(e),n),j(h)}function d(){m.on(G,null).on(H,null),o(l&&cg.event.target===g),k(h)}var e=this,g=cg.event.target,h=J.of(e,arguments),l=0,m=cg.select(b(e)).on(G,a).on(H,d),n=c(cg.mouse(e)),o=Y(e);Ii.call(e),i(h)}function m(){function a(){var a=cg.touches(o);return n=y.k,a.forEach(function(a){a.identifier in q&&(q[a.identifier]=c(a))}),a}function b(){var b=cg.event.target;cg.select(b).on(u,d).on(v,h),w.push(b);for(var c=cg.event.changedTouches,e=0,f=c.length;e<f;++e)q[c[e].identifier]=null;var i=a(),j=Date.now();if(1===i.length){if(j-t<500){var k=i[0];g(o,k,q[k.identifier],Math.floor(Math.log(y.k)/Math.LN2)+1),z()}t=j}else if(i.length>1){var k=i[0],l=i[1],m=k[0]-l[0],n=k[1]-l[1];r=m*m+n*n}}function d(){var a,b,c,d,g=cg.touches(o);Ii.call(o);for(var h=0,i=g.length;h<i;++h,d=null)if(c=g[h],d=q[c.identifier]){if(b)break;a=c,b=d}if(d){var k=(k=c[0]-a[0])*k+(k=c[1]-a[1])*k,l=r&&Math.sqrt(k/r);a=[(a[0]+c[0])/2,(a[1]+c[1])/2],b=[(b[0]+d[0])/2,(b[1]+d[1])/2],e(l*n)}t=null,f(a,b),j(p)}function h(){if(cg.event.touches.length){for(var b=cg.event.changedTouches,c=0,d=b.length;c<d;++c)delete q[b[c].identifier];for(var e in q)return void a()}cg.selectAll(w).on(s,null),x.on(F,l).on(I,m),A(),k(p)}var n,o=this,p=J.of(o,arguments),q={},r=0,s=".zoom-"+cg.event.changedTouches[0].identifier,u="touchmove"+s,v="touchend"+s,w=[],x=cg.select(o),A=Y(o);b(),i(p),x.on(F,null).on(I,b)}function n(){var a=J.of(this,arguments);s?clearTimeout(s):(Ii.call(this),p=c(q=r||cg.mouse(this)),i(a)),s=setTimeout(function(){s=null,k(a)},50),z(),e(Math.pow(2,.002*Ng())*y.k),f(q,p),j(a)}function o(){var a=cg.mouse(this),b=Math.log(y.k)/Math.LN2;g(this,a,c(a),cg.event.shiftKey?Math.ceil(b)-1:Math.floor(b)+1)}var p,q,r,s,t,u,v,w,x,y={x:0,y:0,k:1},A=[960,500],C=Pg,D=250,E=0,F="mousedown.zoom",G="mousemove.zoom",H="mouseup.zoom",I="touchstart.zoom",J=B(a,"zoomstart","zoom","zoomend");return Og||(Og="onwheel"in fg?(Ng=function(){return-cg.event.deltaY*(cg.event.deltaMode?120:1)},"wheel"):"onmousewheel"in fg?(Ng=function(){return cg.event.wheelDelta},"mousewheel"):(Ng=function(){return-cg.event.detail},"MozMousePixelScroll")),a.event=function(a){a.each(function(){var a=J.of(this,arguments),b=y;Gi?cg.select(this).transition().each("start.zoom",function(){y=this.__chart__||{x:0,y:0,k:1},i(a)}).tween("zoom:zoom",function(){var c=A[0],d=A[1],e=q?q[0]:c/2,f=q?q[1]:d/2,g=cg.interpolateZoom([(e-y.x)/y.k,(f-y.y)/y.k,c/y.k],[(e-b.x)/b.k,(f-b.y)/b.k,c/b.k]);return function(b){var d=g(b),h=c/d[2];this.__chart__=y={x:e-d[0]*h,y:f-d[1]*h,k:h},j(a)}}).each("interrupt.zoom",function(){k(a)}).each("end.zoom",function(){k(a)}):(this.__chart__=y,i(a),j(a),k(a))})},a.translate=function(b){return arguments.length?(y={x:+b[0],y:+b[1],k:y.k},h(),a):[y.x,y.y]},a.scale=function(b){return arguments.length?(y={x:y.x,y:y.y,k:+b},h(),a):y.k},a.scaleExtent=function(b){return arguments.length?(C=null==b?Pg:[+b[0],+b[1]],a):C},a.center=function(b){return arguments.length?(r=b&&[+b[0],+b[1]],a):r},a.size=function(b){return arguments.length?(A=b&&[+b[0],+b[1]],a):A},a.duration=function(b){return arguments.length?(D=+b,a):D},a.x=function(b){return arguments.length?(v=b,u=b.copy(),y={x:0,y:0,k:1},a):v},a.y=function(b){return arguments.length?(x=b,w=b.copy(),y={x:0,y:0,k:1},a):x},cg.rebind(a,J,"on")};var Ng,Og,Pg=[0,1/0];cg.color=ha,ha.prototype.toString=function(){return this.rgb()+""},cg.hsl=ia;var Qg=ia.prototype=new ha;Qg.brighter=function(a){return a=Math.pow(.7,arguments.length?a:1),new ia(this.h,this.s,this.l/a)},Qg.darker=function(a){return a=Math.pow(.7,arguments.length?a:1),new ia(this.h,this.s,a*this.l)},Qg.rgb=function(){return ja(this.h,this.s,this.l)},cg.hcl=ka;var Rg=ka.prototype=new ha;Rg.brighter=function(a){return new ka(this.h,this.c,Math.min(100,this.l+Sg*(arguments.length?a:1)))},Rg.darker=function(a){return new ka(this.h,this.c,Math.max(0,this.l-Sg*(arguments.length?a:1)))},Rg.rgb=function(){return la(this.h,this.c,this.l).rgb()},cg.lab=ma;var Sg=18,Tg=.95047,Ug=1,Vg=1.08883,Wg=ma.prototype=new ha;Wg.brighter=function(a){return new ma(Math.min(100,this.l+Sg*(arguments.length?a:1)),this.a,this.b)},Wg.darker=function(a){return new ma(Math.max(0,this.l-Sg*(arguments.length?a:1)),this.a,this.b)},Wg.rgb=function(){return na(this.l,this.a,this.b)},cg.rgb=sa;var Xg=sa.prototype=new ha;Xg.brighter=function(a){a=Math.pow(.7,arguments.length?a:1);var b=this.r,c=this.g,d=this.b,e=30;return b||c||d?(b&&b<e&&(b=e),c&&c<e&&(c=e),d&&d<e&&(d=e),new sa(Math.min(255,b/a),Math.min(255,c/a),Math.min(255,d/a))):new sa(e,e,e)},Xg.darker=function(a){return a=Math.pow(.7,arguments.length?a:1),new sa(a*this.r,a*this.g,a*this.b)},Xg.hsl=function(){return xa(this.r,this.g,this.b)},Xg.toString=function(){return"#"+va(this.r)+va(this.g)+va(this.b)};var Yg=cg.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,
|
8
|
+
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});Yg.forEach(function(a,b){Yg.set(a,ta(b))}),cg.functor=Ba,cg.xhr=Ca(t),cg.dsv=function(a,b){function c(a,c,f){arguments.length<3&&(f=c,c=null);var g=Da(a,b,null==c?d:e(c),f);return g.row=function(a){return arguments.length?g.response(null==(c=a)?d:e(a)):c},g}function d(a){return c.parse(a.responseText)}function e(a){return function(b){return c.parse(b.responseText,a)}}function f(b){return b.map(g).join(a)}function g(a){return h.test(a)?'"'+a.replace(/\"/g,'""')+'"':a}var h=new RegExp('["'+a+"\n]"),i=a.charCodeAt(0);return c.parse=function(a,b){var d;return c.parseRows(a,function(a,c){if(d)return d(a,c-1);var e=new Function("d","return {"+a.map(function(a,b){return JSON.stringify(a)+": d["+b+"]"}).join(",")+"}");d=b?function(a,c){return b(e(a),c)}:e})},c.parseRows=function(a,b){function c(){if(k>=j)return g;if(e)return e=!1,f;var b=k;if(34===a.charCodeAt(b)){for(var c=b;c++<j;)if(34===a.charCodeAt(c)){if(34!==a.charCodeAt(c+1))break;++c}k=c+2;var d=a.charCodeAt(c+1);return 13===d?(e=!0,10===a.charCodeAt(c+2)&&++k):10===d&&(e=!0),a.slice(b+1,c).replace(/""/g,'"')}for(;k<j;){var d=a.charCodeAt(k++),h=1;if(10===d)e=!0;else if(13===d)e=!0,10===a.charCodeAt(k)&&(++k,++h);else if(d!==i)continue;return a.slice(b,k-h)}return a.slice(b)}for(var d,e,f={},g={},h=[],j=a.length,k=0,l=0;(d=c())!==g;){for(var m=[];d!==f&&d!==g;)m.push(d),d=c();b&&null==(m=b(m,l++))||h.push(m)}return h},c.format=function(b){if(Array.isArray(b[0]))return c.formatRows(b);var d=new s,e=[];return b.forEach(function(a){for(var b in a)d.has(b)||e.push(d.add(b))}),[e.map(g).join(a)].concat(b.map(function(b){return e.map(function(a){return g(b[a])}).join(a)})).join("\n")},c.formatRows=function(a){return a.map(f).join("\n")},c},cg.csv=cg.dsv(",","text/csv"),cg.tsv=cg.dsv("\t","text/tab-separated-values");var Zg,$g,_g,ah,bh,ch=this[v(this,"requestAnimationFrame")]||function(a){setTimeout(a,17)};cg.timer=function(a,b,c){var d=arguments.length;d<2&&(b=0),d<3&&(c=Date.now());var e=c+b,f={c:a,t:e,f:!1,n:null};$g?$g.n=f:Zg=f,$g=f,_g||(ah=clearTimeout(ah),_g=1,ch(Ga))},cg.timer.flush=function(){Ha(),Ia()},cg.round=function(a,b){return b?Math.round(a*(b=Math.pow(10,b)))/b:Math.round(a)};var dh=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map(Ka);cg.formatPrefix=function(a,b){var c=0;return a&&(a<0&&(a*=-1),b&&(a=cg.round(a,Ja(a,b))),c=1+Math.floor(1e-12+Math.log(a)/Math.LN10),c=Math.max(-24,Math.min(24,3*Math.floor((c-1)/3)))),dh[8+c/3]};var eh=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,fh=cg.map({b:function(a){return a.toString(2)},c:function(a){return String.fromCharCode(a)},o:function(a){return a.toString(8)},x:function(a){return a.toString(16)},X:function(a){return a.toString(16).toUpperCase()},g:function(a,b){return a.toPrecision(b)},e:function(a,b){return a.toExponential(b)},f:function(a,b){return a.toFixed(b)},r:function(a,b){return(a=cg.round(a,Ja(a,b))).toFixed(Math.max(0,Math.min(20,Ja(a*(1+1e-15),b))))}}),gh=cg.time={},hh=Date;Na.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(){ih.setUTCDate.apply(this._,arguments)},setDay:function(){ih.setUTCDay.apply(this._,arguments)},setFullYear:function(){ih.setUTCFullYear.apply(this._,arguments)},setHours:function(){ih.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){ih.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){ih.setUTCMinutes.apply(this._,arguments)},setMonth:function(){ih.setUTCMonth.apply(this._,arguments)},setSeconds:function(){ih.setUTCSeconds.apply(this._,arguments)},setTime:function(){ih.setTime.apply(this._,arguments)}};var ih=Date.prototype;gh.year=Oa(function(a){return a=gh.day(a),a.setMonth(0,1),a},function(a,b){a.setFullYear(a.getFullYear()+b)},function(a){return a.getFullYear()}),gh.years=gh.year.range,gh.years.utc=gh.year.utc.range,gh.day=Oa(function(a){var b=new hh(2e3,0);return b.setFullYear(a.getFullYear(),a.getMonth(),a.getDate()),b},function(a,b){a.setDate(a.getDate()+b)},function(a){return a.getDate()-1}),gh.days=gh.day.range,gh.days.utc=gh.day.utc.range,gh.dayOfYear=function(a){var b=gh.year(a);return Math.floor((a-b-6e4*(a.getTimezoneOffset()-b.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(a,b){b=7-b;var c=gh[a]=Oa(function(a){return(a=gh.day(a)).setDate(a.getDate()-(a.getDay()+b)%7),a},function(a,b){a.setDate(a.getDate()+7*Math.floor(b))},function(a){var c=gh.year(a).getDay();return Math.floor((gh.dayOfYear(a)+(c+b)%7)/7)-(c!==b)});gh[a+"s"]=c.range,gh[a+"s"].utc=c.utc.range,gh[a+"OfYear"]=function(a){var c=gh.year(a).getDay();return Math.floor((gh.dayOfYear(a)+(c+b)%7)/7)}}),gh.week=gh.sunday,gh.weeks=gh.sunday.range,gh.weeks.utc=gh.sunday.utc.range,gh.weekOfYear=gh.sundayOfYear;var jh={"-":"",_:" ",0:"0"},kh=/^\s*\d+/,lh=/^%/;cg.locale=function(a){return{numberFormat:La(a),timeFormat:Qa(a)}};var mh=cg.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"]});cg.format=mh.numberFormat,cg.geo={},jb.prototype={s:0,t:0,add:function(a){kb(a,this.t,nh),kb(nh.s,this.s,this),this.s?this.t+=nh.t:this.s=nh.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var nh=new jb;cg.geo.stream=function(a,b){a&&oh.hasOwnProperty(a.type)?oh[a.type](a,b):lb(a,b)};var oh={Feature:function(a,b){lb(a.geometry,b)},FeatureCollection:function(a,b){for(var c=a.features,d=-1,e=c.length;++d<e;)lb(c[d].geometry,b)}},ph={Sphere:function(a,b){b.sphere()},Point:function(a,b){a=a.coordinates,b.point(a[0],a[1],a[2])},MultiPoint:function(a,b){for(var c=a.coordinates,d=-1,e=c.length;++d<e;)a=c[d],b.point(a[0],a[1],a[2])},LineString:function(a,b){mb(a.coordinates,b,0)},MultiLineString:function(a,b){for(var c=a.coordinates,d=-1,e=c.length;++d<e;)mb(c[d],b,0)},Polygon:function(a,b){nb(a.coordinates,b)},MultiPolygon:function(a,b){for(var c=a.coordinates,d=-1,e=c.length;++d<e;)nb(c[d],b)},GeometryCollection:function(a,b){for(var c=a.geometries,d=-1,e=c.length;++d<e;)lb(c[d],b)}};cg.geo.area=function(a){return qh=0,cg.geo.stream(a,sh),qh};var qh,rh=new jb,sh={sphere:function(){qh+=4*Eg},point:w,lineStart:w,lineEnd:w,polygonStart:function(){rh.reset(),sh.lineStart=ob},polygonEnd:function(){var a=2*rh;qh+=a<0?4*Eg+a:a,sh.lineStart=sh.lineEnd=sh.point=w}};cg.geo.bounds=function(){function a(a,b){t.push(u=[k=a,m=a]),b<l&&(l=b),b>n&&(n=b)}function b(b,c){var d=pb([b*Ig,c*Ig]);if(r){var e=rb(r,d),f=[e[1],-e[0],0],g=rb(f,e);ub(g),g=vb(g);var i=b-o,j=i>0?1:-1,p=g[0]*Jg*j,q=mg(i)>180;if(q^(j*o<p&&p<j*b)){var s=g[1]*Jg;s>n&&(n=s)}else if(p=(p+360)%360-180,q^(j*o<p&&p<j*b)){var s=-g[1]*Jg;s<l&&(l=s)}else c<l&&(l=c),c>n&&(n=c);q?b<o?h(k,b)>h(k,m)&&(m=b):h(b,m)>h(k,m)&&(k=b):m>=k?(b<k&&(k=b),b>m&&(m=b)):b>o?h(k,b)>h(k,m)&&(m=b):h(b,m)>h(k,m)&&(k=b)}else a(b,c);r=d,o=b}function c(){v.point=b}function d(){u[0]=k,u[1]=m,v.point=a,r=null}function e(a,c){if(r){var d=a-o;s+=mg(d)>180?d+(d>0?360:-360):d}else p=a,q=c;sh.point(a,c),b(a,c)}function f(){sh.lineStart()}function g(){e(p,q),sh.lineEnd(),mg(s)>Cg&&(k=-(m=180)),u[0]=k,u[1]=m,r=null}function h(a,b){return(b-=a)<0?b+360:b}function i(a,b){return a[0]-b[0]}function j(a,b){return b[0]<=b[1]?b[0]<=a&&a<=b[1]:a<b[0]||b[1]<a}var k,l,m,n,o,p,q,r,s,t,u,v={point:a,lineStart:c,lineEnd:d,polygonStart:function(){v.point=e,v.lineStart=f,v.lineEnd=g,s=0,sh.polygonStart()},polygonEnd:function(){sh.polygonEnd(),v.point=a,v.lineStart=c,v.lineEnd=d,rh<0?(k=-(m=180),l=-(n=90)):s>Cg?n=90:s<-Cg&&(l=-90),u[0]=k,u[1]=m}};return function(a){n=m=-(k=l=1/0),t=[],cg.geo.stream(a,v);var b=t.length;if(b){t.sort(i);for(var c,d=1,e=t[0],f=[e];d<b;++d)c=t[d],j(c[0],e)||j(c[1],e)?(h(e[0],c[1])>h(e[0],e[1])&&(e[1]=c[1]),h(c[0],e[1])>h(e[0],e[1])&&(e[0]=c[0])):f.push(e=c);for(var g,c,o=-(1/0),b=f.length-1,d=0,e=f[b];d<=b;e=c,++d)c=f[d],(g=h(e[1],c[0]))>o&&(o=g,k=c[0],m=e[1])}return t=u=null,k===1/0||l===1/0?[[NaN,NaN],[NaN,NaN]]:[[k,l],[m,n]]}}(),cg.geo.centroid=function(a){th=uh=vh=wh=xh=yh=zh=Ah=Bh=Ch=Dh=0,cg.geo.stream(a,Eh);var b=Bh,c=Ch,d=Dh,e=b*b+c*c+d*d;return e<Dg&&(b=yh,c=zh,d=Ah,uh<Cg&&(b=vh,c=wh,d=xh),e=b*b+c*c+d*d,e<Dg)?[NaN,NaN]:[Math.atan2(c,b)*Jg,ca(d/Math.sqrt(e))*Jg]};var th,uh,vh,wh,xh,yh,zh,Ah,Bh,Ch,Dh,Eh={sphere:w,point:xb,lineStart:zb,lineEnd:Ab,polygonStart:function(){Eh.lineStart=Bb},polygonEnd:function(){Eh.lineStart=zb}},Fh=Hb(Db,Lb,Nb,[-Eg,-Eg/2]),Gh=1e9;cg.geo.clipExtent=function(){var a,b,c,d,e,f,g={stream:function(a){return e&&(e.valid=!1),e=f(a),e.valid=!0,e},extent:function(h){return arguments.length?(f=Rb(a=+h[0][0],b=+h[0][1],c=+h[1][0],d=+h[1][1]),e&&(e.valid=!1,e=null),g):[[a,b],[c,d]]}};return g.extent([[0,0],[960,500]])},(cg.geo.conicEqualArea=function(){return Sb(Tb)}).raw=Tb,cg.geo.albers=function(){return cg.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},cg.geo.albersUsa=function(){function a(a){var f=a[0],g=a[1];return b=null,c(f,g),b||(d(f,g),b)||e(f,g),b}var b,c,d,e,f=cg.geo.albers(),g=cg.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),h=cg.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),i={point:function(a,c){b=[a,c]}};return a.invert=function(a){var b=f.scale(),c=f.translate(),d=(a[0]-c[0])/b,e=(a[1]-c[1])/b;return(e>=.12&&e<.234&&d>=-.425&&d<-.214?g:e>=.166&&e<.234&&d>=-.214&&d<-.115?h:f).invert(a)},a.stream=function(a){var b=f.stream(a),c=g.stream(a),d=h.stream(a);return{point:function(a,e){b.point(a,e),c.point(a,e),d.point(a,e)},sphere:function(){b.sphere(),c.sphere(),d.sphere()},lineStart:function(){b.lineStart(),c.lineStart(),d.lineStart()},lineEnd:function(){b.lineEnd(),c.lineEnd(),d.lineEnd()},polygonStart:function(){b.polygonStart(),c.polygonStart(),d.polygonStart()},polygonEnd:function(){b.polygonEnd(),c.polygonEnd(),d.polygonEnd()}}},a.precision=function(b){return arguments.length?(f.precision(b),g.precision(b),h.precision(b),a):f.precision()},a.scale=function(b){return arguments.length?(f.scale(b),g.scale(.35*b),h.scale(b),a.translate(f.translate())):f.scale()},a.translate=function(b){if(!arguments.length)return f.translate();var j=f.scale(),k=+b[0],l=+b[1];return c=f.translate(b).clipExtent([[k-.455*j,l-.238*j],[k+.455*j,l+.238*j]]).stream(i).point,d=g.translate([k-.307*j,l+.201*j]).clipExtent([[k-.425*j+Cg,l+.12*j+Cg],[k-.214*j-Cg,l+.234*j-Cg]]).stream(i).point,e=h.translate([k-.205*j,l+.212*j]).clipExtent([[k-.214*j+Cg,l+.166*j+Cg],[k-.115*j-Cg,l+.234*j-Cg]]).stream(i).point,a},a.scale(1070)};var Hh,Ih,Jh,Kh,Lh,Mh,Nh={point:w,lineStart:w,lineEnd:w,polygonStart:function(){Ih=0,Nh.lineStart=Ub},polygonEnd:function(){Nh.lineStart=Nh.lineEnd=Nh.point=w,Hh+=mg(Ih/2)}},Oh={point:Vb,lineStart:w,lineEnd:w,polygonStart:w,polygonEnd:w},Ph={point:Yb,lineStart:Zb,lineEnd:$b,polygonStart:function(){Ph.lineStart=_b},polygonEnd:function(){Ph.point=Yb,Ph.lineStart=Zb,Ph.lineEnd=$b}};cg.geo.path=function(){function a(a){return a&&("function"==typeof h&&f.pointRadius(+h.apply(this,arguments)),g&&g.valid||(g=e(f)),cg.geo.stream(a,g)),f.result()}function b(){return g=null,a}var c,d,e,f,g,h=4.5;return a.area=function(a){return Hh=0,cg.geo.stream(a,e(Nh)),Hh},a.centroid=function(a){return vh=wh=xh=yh=zh=Ah=Bh=Ch=Dh=0,cg.geo.stream(a,e(Ph)),Dh?[Bh/Dh,Ch/Dh]:Ah?[yh/Ah,zh/Ah]:xh?[vh/xh,wh/xh]:[NaN,NaN]},a.bounds=function(a){return Lh=Mh=-(Jh=Kh=1/0),cg.geo.stream(a,e(Oh)),[[Jh,Kh],[Lh,Mh]]},a.projection=function(a){return arguments.length?(e=(c=a)?a.stream||cc(a):t,b()):c},a.context=function(a){return arguments.length?(f=null==(d=a)?new Wb:new ac(a),"function"!=typeof h&&f.pointRadius(h),b()):d},a.pointRadius=function(b){return arguments.length?(h="function"==typeof b?b:(f.pointRadius(+b),+b),a):h},a.projection(cg.geo.albersUsa()).context(null)},cg.geo.transform=function(a){return{stream:function(b){var c=new dc(b);for(var d in a)c[d]=a[d];return c}}},dc.prototype={point:function(a,b){this.stream.point(a,b)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},cg.geo.projection=fc,cg.geo.projectionMutator=gc,(cg.geo.equirectangular=function(){return fc(ic)}).raw=ic.invert=ic,cg.geo.rotation=function(a){function b(b){return b=a(b[0]*Ig,b[1]*Ig),b[0]*=Jg,b[1]*=Jg,b}return a=kc(a[0]%360*Ig,a[1]*Ig,a.length>2?a[2]*Ig:0),b.invert=function(b){return b=a.invert(b[0]*Ig,b[1]*Ig),b[0]*=Jg,b[1]*=Jg,b},b},jc.invert=ic,cg.geo.circle=function(){function a(){var a="function"==typeof d?d.apply(this,arguments):d,b=kc(-a[0]*Ig,-a[1]*Ig,0).invert,e=[];return c(null,null,1,{point:function(a,c){e.push(a=b(a,c)),a[0]*=Jg,a[1]*=Jg}}),{type:"Polygon",coordinates:[e]}}var b,c,d=[0,0],e=6;return a.origin=function(b){return arguments.length?(d=b,a):d},a.angle=function(d){return arguments.length?(c=oc((b=+d)*Ig,e*Ig),a):b},a.precision=function(d){return arguments.length?(c=oc(b*Ig,(e=+d)*Ig),a):e},a.angle(90)},cg.geo.distance=function(a,b){var c,d=(b[0]-a[0])*Ig,e=a[1]*Ig,f=b[1]*Ig,g=Math.sin(d),h=Math.cos(d),i=Math.sin(e),j=Math.cos(e),k=Math.sin(f),l=Math.cos(f);return Math.atan2(Math.sqrt((c=l*g)*c+(c=j*k-i*l*h)*c),i*k+j*l*h)},cg.geo.graticule=function(){function a(){return{type:"MultiLineString",coordinates:b()}}function b(){return cg.range(Math.ceil(f/q)*q,e,q).map(m).concat(cg.range(Math.ceil(j/r)*r,i,r).map(n)).concat(cg.range(Math.ceil(d/o)*o,c,o).filter(function(a){return mg(a%q)>Cg}).map(k)).concat(cg.range(Math.ceil(h/p)*p,g,p).filter(function(a){return mg(a%r)>Cg}).map(l))}var c,d,e,f,g,h,i,j,k,l,m,n,o=10,p=o,q=90,r=360,s=2.5;return a.lines=function(){return b().map(function(a){return{type:"LineString",coordinates:a}})},a.outline=function(){return{type:"Polygon",coordinates:[m(f).concat(n(i).slice(1),m(e).reverse().slice(1),n(j).reverse().slice(1))]}},a.extent=function(b){return arguments.length?a.majorExtent(b).minorExtent(b):a.minorExtent()},a.majorExtent=function(b){return arguments.length?(f=+b[0][0],e=+b[1][0],j=+b[0][1],i=+b[1][1],f>e&&(b=f,f=e,e=b),j>i&&(b=j,j=i,i=b),a.precision(s)):[[f,j],[e,i]]},a.minorExtent=function(b){return arguments.length?(d=+b[0][0],c=+b[1][0],h=+b[0][1],g=+b[1][1],d>c&&(b=d,d=c,c=b),h>g&&(b=h,h=g,g=b),a.precision(s)):[[d,h],[c,g]]},a.step=function(b){return arguments.length?a.majorStep(b).minorStep(b):a.minorStep()},a.majorStep=function(b){return arguments.length?(q=+b[0],r=+b[1],a):[q,r]},a.minorStep=function(b){return arguments.length?(o=+b[0],p=+b[1],a):[o,p]},a.precision=function(b){return arguments.length?(s=+b,k=qc(h,g,90),l=rc(d,c,s),m=qc(j,i,90),n=rc(f,e,s),a):s},a.majorExtent([[-180,-90+Cg],[180,90-Cg]]).minorExtent([[-180,-80-Cg],[180,80+Cg]])},cg.geo.greatArc=function(){function a(){return{type:"LineString",coordinates:[b||d.apply(this,arguments),c||e.apply(this,arguments)]}}var b,c,d=sc,e=tc;return a.distance=function(){return cg.geo.distance(b||d.apply(this,arguments),c||e.apply(this,arguments))},a.source=function(c){return arguments.length?(d=c,b="function"==typeof c?null:c,a):d},a.target=function(b){return arguments.length?(e=b,c="function"==typeof b?null:b,a):e},a.precision=function(){return arguments.length?a:0},a},cg.geo.interpolate=function(a,b){return uc(a[0]*Ig,a[1]*Ig,b[0]*Ig,b[1]*Ig)},cg.geo.length=function(a){return Qh=0,cg.geo.stream(a,Rh),Qh};var Qh,Rh={sphere:w,point:w,lineStart:vc,lineEnd:w,polygonStart:w,polygonEnd:w},Sh=wc(function(a){return Math.sqrt(2/(1+a))},function(a){return 2*Math.asin(a/2)});(cg.geo.azimuthalEqualArea=function(){return fc(Sh)}).raw=Sh;var Th=wc(function(a){var b=Math.acos(a);return b&&b/Math.sin(b)},t);(cg.geo.azimuthalEquidistant=function(){return fc(Th)}).raw=Th,(cg.geo.conicConformal=function(){return Sb(xc)}).raw=xc,(cg.geo.conicEquidistant=function(){return Sb(yc)}).raw=yc;var Uh=wc(function(a){return 1/a},Math.atan);(cg.geo.gnomonic=function(){return fc(Uh)}).raw=Uh,zc.invert=function(a,b){return[a,2*Math.atan(Math.exp(b))-Hg]},(cg.geo.mercator=function(){return Ac(zc)}).raw=zc;var Vh=wc(function(){return 1},Math.asin);(cg.geo.orthographic=function(){return fc(Vh)}).raw=Vh;var Wh=wc(function(a){return 1/(1+a)},function(a){return 2*Math.atan(a)});(cg.geo.stereographic=function(){return fc(Wh)}).raw=Wh,Bc.invert=function(a,b){return[-b,2*Math.atan(Math.exp(a))-Hg]},(cg.geo.transverseMercator=function(){var a=Ac(Bc),b=a.center,c=a.rotate;return a.center=function(a){return a?b([-a[1],a[0]]):(a=b(),[a[1],-a[0]])},a.rotate=function(a){return a?c([a[0],a[1],a.length>2?a[2]+90:90]):(a=c(),[a[0],a[1],a[2]-90])},c([0,0,90])}).raw=Bc,cg.geom={},cg.geom.hull=function(a){function b(a){if(a.length<3)return[];var b,e=Ba(c),f=Ba(d),g=a.length,h=[],i=[];for(b=0;b<g;b++)h.push([+e.call(this,a[b],b),+f.call(this,a[b],b),b]);for(h.sort(Fc),b=0;b<g;b++)i.push([h[b][0],-h[b][1]]);var j=Ec(h),k=Ec(i),l=k[0]===j[0],m=k[k.length-1]===j[j.length-1],n=[];for(b=j.length-1;b>=0;--b)n.push(a[h[j[b]][2]]);for(b=+l;b<k.length-m;++b)n.push(a[h[k[b]][2]]);return n}var c=Cc,d=Dc;return arguments.length?b(a):(b.x=function(a){return arguments.length?(c=a,b):c},b.y=function(a){return arguments.length?(d=a,b):d},b)},cg.geom.polygon=function(a){return rg(a,Xh),a};var Xh=cg.geom.polygon.prototype=[];Xh.area=function(){for(var a,b=-1,c=this.length,d=this[c-1],e=0;++b<c;)a=d,d=this[b],e+=a[1]*d[0]-a[0]*d[1];return.5*e},Xh.centroid=function(a){var b,c,d=-1,e=this.length,f=0,g=0,h=this[e-1];for(arguments.length||(a=-1/(6*this.area()));++d<e;)b=h,h=this[d],c=b[0]*h[1]-h[0]*b[1],f+=(b[0]+h[0])*c,g+=(b[1]+h[1])*c;return[f*a,g*a]},Xh.clip=function(a){for(var b,c,d,e,f,g,h=Ic(a),i=-1,j=this.length-Ic(this),k=this[j-1];++i<j;){for(b=a.slice(),a.length=0,e=this[i],f=b[(d=b.length-h)-1],c=-1;++c<d;)g=b[c],Gc(g,k,e)?(Gc(f,k,e)||a.push(Hc(f,g,k,e)),a.push(g)):Gc(f,k,e)&&a.push(Hc(f,g,k,e)),f=g;h&&a.push(a[0]),k=e}return a};var Yh,Zh,$h,_h,ai,bi=[],ci=[];Qc.prototype.prepare=function(){for(var a,b=this.edges,c=b.length;c--;)a=b[c].edge,a.b&&a.a||b.splice(c,1);return b.sort(Sc),b.length},ad.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},bd.prototype={insert:function(a,b){var c,d,e;if(a){if(b.P=a,b.N=a.N,a.N&&(a.N.P=b),a.N=b,a.R){for(a=a.R;a.L;)a=a.L;a.L=b}else a.R=b;c=a}else this._?(a=fd(this._),b.P=null,b.N=a,a.P=a.L=b,c=a):(b.P=b.N=null,this._=b,c=null);for(b.L=b.R=null,b.U=c,b.C=!0,a=b;c&&c.C;)d=c.U,c===d.L?(e=d.R,e&&e.C?(c.C=e.C=!1,d.C=!0,a=d):(a===c.R&&(dd(this,c),a=c,c=a.U),c.C=!1,d.C=!0,ed(this,d))):(e=d.L,e&&e.C?(c.C=e.C=!1,d.C=!0,a=d):(a===c.L&&(ed(this,c),a=c,c=a.U),c.C=!1,d.C=!0,dd(this,d))),c=a.U;this._.C=!1},remove:function(a){a.N&&(a.N.P=a.P),a.P&&(a.P.N=a.N),a.N=a.P=null;var b,c,d,e=a.U,f=a.L,g=a.R;if(c=f?g?fd(g):f:g,e?e.L===a?e.L=c:e.R=c:this._=c,f&&g?(d=c.C,c.C=a.C,c.L=f,f.U=c,c!==g?(e=c.U,c.U=a.U,a=c.R,e.L=a,c.R=g,g.U=c):(c.U=e,e=c,a=c.R)):(d=a.C,a=c),a&&(a.U=e),!d){if(a&&a.C)return void(a.C=!1);do{if(a===this._)break;if(a===e.L){if(b=e.R,b.C&&(b.C=!1,e.C=!0,dd(this,e),b=e.R),b.L&&b.L.C||b.R&&b.R.C){b.R&&b.R.C||(b.L.C=!1,b.C=!0,ed(this,b),b=e.R),b.C=e.C,e.C=b.R.C=!1,dd(this,e),a=this._;break}}else if(b=e.L,b.C&&(b.C=!1,e.C=!0,ed(this,e),b=e.L),b.L&&b.L.C||b.R&&b.R.C){b.L&&b.L.C||(b.R.C=!1,b.C=!0,dd(this,b),b=e.L),b.C=e.C,e.C=b.L.C=!1,ed(this,e),a=this._;break}b.C=!0,a=e,e=e.U}while(!a.C);a&&(a.C=!1)}}},cg.geom.voronoi=function(a){function b(a){var b=new Array(a.length),d=h[0][0],e=h[0][1],f=h[1][0],g=h[1][1];return gd(c(a),h).cells.forEach(function(c,h){var i=c.edges,j=c.site,k=b[h]=i.length?i.map(function(a){var b=a.start();return[b.x,b.y]}):j.x>=d&&j.x<=f&&j.y>=e&&j.y<=g?[[d,g],[f,g],[f,e],[d,e]]:[];k.point=a[h]}),b}function c(a){return a.map(function(a,b){return{x:Math.round(f(a,b)/Cg)*Cg,y:Math.round(g(a,b)/Cg)*Cg,i:b}})}var d=Cc,e=Dc,f=d,g=e,h=di;return a?b(a):(b.links=function(a){return gd(c(a)).edges.filter(function(a){return a.l&&a.r}).map(function(b){return{source:a[b.l.i],target:a[b.r.i]}})},b.triangles=function(a){var b=[];return gd(c(a)).cells.forEach(function(c,d){for(var e,f,g=c.site,h=c.edges.sort(Sc),i=-1,j=h.length,k=h[j-1].edge,l=k.l===g?k.r:k.l;++i<j;)e=k,f=l,k=h[i].edge,l=k.l===g?k.r:k.l,d<f.i&&d<l.i&&id(g,f,l)<0&&b.push([a[d],a[f.i],a[l.i]])}),b},b.x=function(a){return arguments.length?(f=Ba(d=a),b):d},b.y=function(a){return arguments.length?(g=Ba(e=a),b):e},b.clipExtent=function(a){return arguments.length?(h=null==a?di:a,b):h===di?null:h},b.size=function(a){return arguments.length?b.clipExtent(a&&[[0,0],a]):h===di?null:h&&h[1]},b)};var di=[[-1e6,-1e6],[1e6,1e6]];cg.geom.delaunay=function(a){return cg.geom.voronoi().triangles(a)},cg.geom.quadtree=function(a,b,c,d,e){function f(a){function f(a,b,c,d,e,f,g,h){if(!isNaN(c)&&!isNaN(d))if(a.leaf){var i=a.x,k=a.y;if(null!=i)if(mg(i-c)+mg(k-d)<.01)j(a,b,c,d,e,f,g,h);else{var l=a.point;a.x=a.y=a.point=null,j(a,l,i,k,e,f,g,h),j(a,b,c,d,e,f,g,h)}else a.x=c,a.y=d,a.point=b}else j(a,b,c,d,e,f,g,h)}function j(a,b,c,d,e,g,h,i){var j=.5*(e+h),k=.5*(g+i),l=c>=j,m=d>=k,n=m<<1|l;a.leaf=!1,a=a.nodes[n]||(a.nodes[n]=ld()),l?e=j:h=j,m?g=k:i=k,f(a,b,c,d,e,g,h,i)}var k,l,m,n,o,p,q,r,s,t=Ba(h),u=Ba(i);if(null!=b)p=b,q=c,r=d,s=e;else if(r=s=-(p=q=1/0),l=[],m=[],o=a.length,g)for(n=0;n<o;++n)k=a[n],k.x<p&&(p=k.x),k.y<q&&(q=k.y),k.x>r&&(r=k.x),k.y>s&&(s=k.y),l.push(k.x),m.push(k.y);else for(n=0;n<o;++n){var v=+t(k=a[n],n),w=+u(k,n);v<p&&(p=v),w<q&&(q=w),v>r&&(r=v),w>s&&(s=w),l.push(v),m.push(w)}var x=r-p,y=s-q;x>y?s=q+x:r=p+y;var z=ld();if(z.add=function(a){f(z,a,+t(a,++n),+u(a,n),p,q,r,s)},z.visit=function(a){md(a,z,p,q,r,s)},z.find=function(a){return nd(z,a[0],a[1],p,q,r,s)},n=-1,null==b){for(;++n<o;)f(z,a[n],l[n],m[n],p,q,r,s);--n}else a.forEach(z.add);return l=m=a=k=null,z}var g,h=Cc,i=Dc;return(g=arguments.length)?(h=jd,i=kd,3===g&&(e=c,d=b,c=b=0),f(a)):(f.x=function(a){return arguments.length?(h=a,f):h},f.y=function(a){return arguments.length?(i=a,f):i},f.extent=function(a){return arguments.length?(null==a?b=c=d=e=null:(b=+a[0][0],c=+a[0][1],d=+a[1][0],e=+a[1][1]),f):null==b?null:[[b,c],[d,e]]},f.size=function(a){return arguments.length?(null==a?b=c=d=e=null:(b=c=0,d=+a[0],e=+a[1]),f):null==b?null:[d-b,e-c]},f)},cg.interpolateRgb=od,cg.interpolateObject=pd,cg.interpolateNumber=qd,cg.interpolateString=rd;var ei=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,fi=new RegExp(ei.source,"g");cg.interpolate=sd,cg.interpolators=[function(a,b){var c=typeof b;return("string"===c?Yg.has(b.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(b)?od:rd:b instanceof ha?od:Array.isArray(b)?td:"object"===c&&isNaN(b)?pd:qd)(a,b)}],cg.interpolateArray=td;var gi=function(){return t},hi=cg.map({linear:gi,poly:Ad,quad:function(){return xd},cubic:function(){return yd},sin:function(){return Bd},exp:function(){return Cd},circle:function(){return Dd},elastic:Ed,back:Fd,bounce:function(){return Gd}}),ii=cg.map({in:t,out:vd,"in-out":wd,"out-in":function(a){return wd(vd(a))}});cg.ease=function(a){var b=a.indexOf("-"),c=b>=0?a.slice(0,b):a,d=b>=0?a.slice(b+1):"in";return c=hi.get(c)||gi,d=ii.get(d)||t,ud(d(c.apply(null,dg.call(arguments,1))))},cg.interpolateHcl=Hd,cg.interpolateHsl=Id,cg.interpolateLab=Jd,cg.interpolateRound=Kd,cg.transform=function(a){var b=fg.createElementNS(cg.ns.prefix.svg,"g");return(cg.transform=function(a){if(null!=a){b.setAttribute("transform",a);var c=b.transform.baseVal.consolidate()}return new Ld(c?c.matrix:ji)})(a)},Ld.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var ji={a:1,b:0,c:0,d:1,e:0,f:0};cg.interpolateTransform=Pd,cg.layout={},cg.layout.bundle=function(){return function(a){for(var b=[],c=-1,d=a.length;++c<d;)b.push(Sd(a[c]));return b}},cg.layout.chord=function(){function a(){var a,j,l,m,n,o={},p=[],q=cg.range(f),r=[];for(c=[],d=[],a=0,m=-1;++m<f;){for(j=0,n=-1;++n<f;)j+=e[m][n];p.push(j),r.push(cg.range(f)),a+=j}for(g&&q.sort(function(a,b){return g(p[a],p[b])}),h&&r.forEach(function(a,b){a.sort(function(a,c){return h(e[b][a],e[b][c])})}),a=(Fg-k*f)/a,j=0,m=-1;++m<f;){for(l=j,n=-1;++n<f;){var s=q[m],t=r[s][n],u=e[s][t],v=j,w=j+=u*a;o[s+"-"+t]={index:s,subindex:t,startAngle:v,endAngle:w,value:u}}d[s]={index:s,startAngle:l,endAngle:j,value:(j-l)/a},j+=k}for(m=-1;++m<f;)for(n=m-1;++n<f;){var x=o[m+"-"+n],y=o[n+"-"+m];(x.value||y.value)&&c.push(x.value<y.value?{source:y,target:x}:{source:x,target:y})}i&&b()}function b(){c.sort(function(a,b){return i((a.source.value+a.target.value)/2,(b.source.value+b.target.value)/2)})}var c,d,e,f,g,h,i,j={},k=0;return j.matrix=function(a){return arguments.length?(f=(e=a)&&e.length,c=d=null,j):e},j.padding=function(a){return arguments.length?(k=a,c=d=null,j):k},j.sortGroups=function(a){return arguments.length?(g=a,c=d=null,j):g},j.sortSubgroups=function(a){return arguments.length?(h=a,c=null,j):h},j.sortChords=function(a){return arguments.length?(i=a,c&&b(),j):i},j.chords=function(){return c||a(),c},j.groups=function(){return d||a(),d},j},cg.layout.force=function(){function a(a){return function(b,c,d,e){if(b.point!==a){var f=b.cx-a.x,g=b.cy-a.y,h=e-c,i=f*f+g*g;if(h*h/q<i){if(i<o){var j=b.charge/i;a.px-=f*j,a.py-=g*j}return!0}if(b.point&&i&&i<o){var j=b.pointCharge/i;a.px-=f*j,a.py-=g*j}}return!b.charge}}function b(a){a.px=cg.event.x,a.py=cg.event.y,h.resume()}var c,d,e,f,g,h={},i=cg.dispatch("start","tick","end"),j=[1,1],k=.9,l=ki,m=li,n=-30,o=mi,p=.1,q=.64,r=[],s=[];return h.tick=function(){if((d*=.99)<.005)return i.end({type:"end",alpha:d=0}),!0;var b,c,h,l,m,o,q,t,u,v=r.length,w=s.length;for(c=0;c<w;++c)h=s[c],l=h.source,m=h.target,t=m.x-l.x,u=m.y-l.y,(o=t*t+u*u)&&(o=d*f[c]*((o=Math.sqrt(o))-e[c])/o,t*=o,u*=o,m.x-=t*(q=l.weight/(m.weight+l.weight)),m.y-=u*q,l.x+=t*(q=1-q),l.y+=u*q);if((q=d*p)&&(t=j[0]/2,u=j[1]/2,c=-1,q))for(;++c<v;)h=r[c],h.x+=(t-h.x)*q,h.y+=(u-h.y)*q;if(n)for(Zd(b=cg.geom.quadtree(r),d,g),c=-1;++c<v;)(h=r[c]).fixed||b.visit(a(h));for(c=-1;++c<v;)h=r[c],h.fixed?(h.x=h.px,h.y=h.py):(h.x-=(h.px-(h.px=h.x))*k,h.y-=(h.py-(h.py=h.y))*k);i.tick({type:"tick",alpha:d})},h.nodes=function(a){return arguments.length?(r=a,h):r},h.links=function(a){return arguments.length?(s=a,h):s},h.size=function(a){return arguments.length?(j=a,h):j},h.linkDistance=function(a){return arguments.length?(l="function"==typeof a?a:+a,h):l},h.distance=h.linkDistance,h.linkStrength=function(a){return arguments.length?(m="function"==typeof a?a:+a,h):m},h.friction=function(a){return arguments.length?(k=+a,h):k},h.charge=function(a){return arguments.length?(n="function"==typeof a?a:+a,h):n},h.chargeDistance=function(a){return arguments.length?(o=a*a,h):Math.sqrt(o)},h.gravity=function(a){return arguments.length?(p=+a,h):p},h.theta=function(a){return arguments.length?(q=a*a,h):Math.sqrt(q)},h.alpha=function(a){return arguments.length?(a=+a,d?d=a>0?a:0:a>0&&(i.start({type:"start",alpha:d=a}),cg.timer(h.tick)),h):d},h.start=function(){function a(a,d){if(!c){for(c=new Array(i),h=0;h<i;++h)c[h]=[];for(h=0;h<k;++h){var e=s[h];c[e.source.index].push(e.target),c[e.target.index].push(e.source)}}for(var f,g=c[b],h=-1,j=g.length;++h<j;)if(!isNaN(f=g[h][a]))return f;return Math.random()*d}var b,c,d,i=r.length,k=s.length,o=j[0],p=j[1];for(b=0;b<i;++b)(d=r[b]).index=b,d.weight=0;for(b=0;b<k;++b)d=s[b],"number"==typeof d.source&&(d.source=r[d.source]),"number"==typeof d.target&&(d.target=r[d.target]),++d.source.weight,++d.target.weight;for(b=0;b<i;++b)d=r[b],isNaN(d.x)&&(d.x=a("x",o)),isNaN(d.y)&&(d.y=a("y",p)),isNaN(d.px)&&(d.px=d.x),isNaN(d.py)&&(d.py=d.y);if(e=[],"function"==typeof l)for(b=0;b<k;++b)e[b]=+l.call(this,s[b],b);else for(b=0;b<k;++b)e[b]=l;if(f=[],"function"==typeof m)for(b=0;b<k;++b)f[b]=+m.call(this,s[b],b);else for(b=0;b<k;++b)f[b]=m;if(g=[],"function"==typeof n)for(b=0;b<i;++b)g[b]=+n.call(this,r[b],b);else for(b=0;b<i;++b)g[b]=n;return h.resume()},h.resume=function(){return h.alpha(.1)},h.stop=function(){return h.alpha(0)},h.drag=function(){return c||(c=cg.behavior.drag().origin(t).on("dragstart.force",Vd).on("drag.force",b).on("dragend.force",Wd)),arguments.length?void this.on("mouseover.force",Xd).on("mouseout.force",Yd).call(c):c},cg.rebind(h,i,"on")};var ki=20,li=1,mi=1/0;cg.layout.hierarchy=function(){function a(e){var f,g=[e],h=[];for(e.depth=0;null!=(f=g.pop());)if(h.push(f),(j=c.call(a,f,f.depth))&&(i=j.length)){for(var i,j,k;--i>=0;)g.push(k=j[i]),k.parent=f,k.depth=f.depth+1;d&&(f.value=0),f.children=j}else d&&(f.value=+d.call(a,f,f.depth)||0),delete f.children;return ae(e,function(a){var c,e;b&&(c=a.children)&&c.sort(b),d&&(e=a.parent)&&(e.value+=a.value)}),h}var b=de,c=be,d=ce;return a.sort=function(c){return arguments.length?(b=c,a):b},a.children=function(b){return arguments.length?(c=b,a):c},a.value=function(b){return arguments.length?(d=b,a):d},a.revalue=function(b){return d&&(_d(b,function(a){a.children&&(a.value=0)}),ae(b,function(b){var c;b.children||(b.value=+d.call(a,b,b.depth)||0),(c=b.parent)&&(c.value+=b.value)})),
|
9
|
+
b},a},cg.layout.partition=function(){function a(b,c,d,e){var f=b.children;if(b.x=c,b.y=b.depth*e,b.dx=d,b.dy=e,f&&(g=f.length)){var g,h,i,j=-1;for(d=b.value?d/b.value:0;++j<g;)a(h=f[j],c,i=h.value*d,e),c+=i}}function b(a){var c=a.children,d=0;if(c&&(e=c.length))for(var e,f=-1;++f<e;)d=Math.max(d,b(c[f]));return 1+d}function c(c,f){var g=d.call(this,c,f);return a(g[0],0,e[0],e[1]/b(g[0])),g}var d=cg.layout.hierarchy(),e=[1,1];return c.size=function(a){return arguments.length?(e=a,c):e},$d(c,d)},cg.layout.pie=function(){function a(g){var h,i=g.length,j=g.map(function(c,d){return+b.call(a,c,d)}),k=+("function"==typeof d?d.apply(this,arguments):d),l=("function"==typeof e?e.apply(this,arguments):e)-k,m=Math.min(Math.abs(l)/i,+("function"==typeof f?f.apply(this,arguments):f)),n=m*(l<0?-1:1),o=(l-i*n)/cg.sum(j),p=cg.range(i),q=[];return null!=c&&p.sort(c===ni?function(a,b){return j[b]-j[a]}:function(a,b){return c(g[a],g[b])}),p.forEach(function(a){q[a]={data:g[a],value:h=j[a],startAngle:k,endAngle:k+=h*o+n,padAngle:m}}),q}var b=Number,c=ni,d=0,e=Fg,f=0;return a.value=function(c){return arguments.length?(b=c,a):b},a.sort=function(b){return arguments.length?(c=b,a):c},a.startAngle=function(b){return arguments.length?(d=b,a):d},a.endAngle=function(b){return arguments.length?(e=b,a):e},a.padAngle=function(b){return arguments.length?(f=b,a):f},a};var ni={};cg.layout.stack=function(){function a(h,i){if(!(m=h.length))return h;var j=h.map(function(c,d){return b.call(a,c,d)}),k=j.map(function(b){return b.map(function(b,c){return[f.call(a,b,c),g.call(a,b,c)]})}),l=c.call(a,k,i);j=cg.permute(j,l),k=cg.permute(k,l);var m,n,o,p,q=d.call(a,k,i),r=j[0].length;for(o=0;o<r;++o)for(e.call(a,j[0][o],p=q[o],k[0][o][1]),n=1;n<m;++n)e.call(a,j[n][o],p+=k[n-1][o][1],k[n][o][1]);return h}var b=t,c=ie,d=je,e=he,f=fe,g=ge;return a.values=function(c){return arguments.length?(b=c,a):b},a.order=function(b){return arguments.length?(c="function"==typeof b?b:oi.get(b)||ie,a):c},a.offset=function(b){return arguments.length?(d="function"==typeof b?b:pi.get(b)||je,a):d},a.x=function(b){return arguments.length?(f=b,a):f},a.y=function(b){return arguments.length?(g=b,a):g},a.out=function(b){return arguments.length?(e=b,a):e},a};var oi=cg.map({"inside-out":function(a){var b,c,d=a.length,e=a.map(ke),f=a.map(le),g=cg.range(d).sort(function(a,b){return e[a]-e[b]}),h=0,i=0,j=[],k=[];for(b=0;b<d;++b)c=g[b],h<i?(h+=f[c],j.push(c)):(i+=f[c],k.push(c));return k.reverse().concat(j)},reverse:function(a){return cg.range(a.length).reverse()},default:ie}),pi=cg.map({silhouette:function(a){var b,c,d,e=a.length,f=a[0].length,g=[],h=0,i=[];for(c=0;c<f;++c){for(b=0,d=0;b<e;b++)d+=a[b][c][1];d>h&&(h=d),g.push(d)}for(c=0;c<f;++c)i[c]=(h-g[c])/2;return i},wiggle:function(a){var b,c,d,e,f,g,h,i,j,k=a.length,l=a[0],m=l.length,n=[];for(n[0]=i=j=0,c=1;c<m;++c){for(b=0,e=0;b<k;++b)e+=a[b][c][1];for(b=0,f=0,h=l[c][0]-l[c-1][0];b<k;++b){for(d=0,g=(a[b][c][1]-a[b][c-1][1])/(2*h);d<b;++d)g+=(a[d][c][1]-a[d][c-1][1])/h;f+=g*a[b][c][1]}n[c]=i-=e?f/e*h:0,i<j&&(j=i)}for(c=0;c<m;++c)n[c]-=j;return n},expand:function(a){var b,c,d,e=a.length,f=a[0].length,g=1/e,h=[];for(c=0;c<f;++c){for(b=0,d=0;b<e;b++)d+=a[b][c][1];if(d)for(b=0;b<e;b++)a[b][c][1]/=d;else for(b=0;b<e;b++)a[b][c][1]=g}for(c=0;c<f;++c)h[c]=0;return h},zero:je});cg.layout.histogram=function(){function a(a,f){for(var g,h,i=[],j=a.map(c,this),k=d.call(this,j,f),l=e.call(this,k,j,f),f=-1,m=j.length,n=l.length-1,o=b?1:1/m;++f<n;)g=i[f]=[],g.dx=l[f+1]-(g.x=l[f]),g.y=0;if(n>0)for(f=-1;++f<m;)h=j[f],h>=k[0]&&h<=k[1]&&(g=i[cg.bisect(l,h,1,n)-1],g.y+=o,g.push(a[f]));return i}var b=!0,c=Number,d=pe,e=ne;return a.value=function(b){return arguments.length?(c=b,a):c},a.range=function(b){return arguments.length?(d=Ba(b),a):d},a.bins=function(b){return arguments.length?(e="number"==typeof b?function(a){return oe(a,b)}:Ba(b),a):e},a.frequency=function(c){return arguments.length?(b=!!c,a):b},a},cg.layout.pack=function(){function a(a,f){var g=c.call(this,a,f),h=g[0],i=e[0],j=e[1],k=null==b?Math.sqrt:"function"==typeof b?b:function(){return b};if(h.x=h.y=0,ae(h,function(a){a.r=+k(a.value)}),ae(h,ue),d){var l=d*(b?1:Math.max(2*h.r/i,2*h.r/j))/2;ae(h,function(a){a.r+=l}),ae(h,ue),ae(h,function(a){a.r-=l})}return xe(h,i/2,j/2,b?1:1/Math.max(2*h.r/i,2*h.r/j)),g}var b,c=cg.layout.hierarchy().sort(qe),d=0,e=[1,1];return a.size=function(b){return arguments.length?(e=b,a):e},a.radius=function(c){return arguments.length?(b=null==c||"function"==typeof c?c:+c,a):b},a.padding=function(b){return arguments.length?(d=+b,a):d},$d(a,c)},cg.layout.tree=function(){function a(a,e){var k=g.call(this,a,e),l=k[0],m=b(l);if(ae(m,c),m.parent.m=-m.z,_d(m,d),j)_d(l,f);else{var n=l,o=l,p=l;_d(l,function(a){a.x<n.x&&(n=a),a.x>o.x&&(o=a),a.depth>p.depth&&(p=a)});var q=h(n,o)/2-n.x,r=i[0]/(o.x+h(o,n)/2+q),s=i[1]/(p.depth||1);_d(l,function(a){a.x=(a.x+q)*r,a.y=a.depth*s})}return k}function b(a){for(var b,c={A:null,children:[a]},d=[c];null!=(b=d.pop());)for(var e,f=b.children,g=0,h=f.length;g<h;++g)d.push((f[g]=e={_:f[g],parent:b,children:(e=f[g].children)&&e.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:g}).a=e);return c.children[0]}function c(a){var b=a.children,c=a.parent.children,d=a.i?c[a.i-1]:null;if(b.length){De(a);var f=(b[0].z+b[b.length-1].z)/2;d?(a.z=d.z+h(a._,d._),a.m=a.z-f):a.z=f}else d&&(a.z=d.z+h(a._,d._));a.parent.A=e(a,d,a.parent.A||c[0])}function d(a){a._.x=a.z+a.parent.m,a.m+=a.parent.m}function e(a,b,c){if(b){for(var d,e=a,f=a,g=b,i=e.parent.children[0],j=e.m,k=f.m,l=g.m,m=i.m;g=Be(g),e=Ae(e),g&&e;)i=Ae(i),f=Be(f),f.a=a,d=g.z+l-e.z-j+h(g._,e._),d>0&&(Ce(Ee(g,a,c),a,d),j+=d,k+=d),l+=g.m,j+=e.m,m+=i.m,k+=f.m;g&&!Be(f)&&(f.t=g,f.m+=l-k),e&&!Ae(i)&&(i.t=e,i.m+=j-m,c=a)}return c}function f(a){a.x*=i[0],a.y=a.depth*i[1]}var g=cg.layout.hierarchy().sort(null).value(null),h=ze,i=[1,1],j=null;return a.separation=function(b){return arguments.length?(h=b,a):h},a.size=function(b){return arguments.length?(j=null==(i=b)?f:null,a):j?null:i},a.nodeSize=function(b){return arguments.length?(j=null==(i=b)?null:f,a):j?i:null},$d(a,g)},cg.layout.cluster=function(){function a(a,f){var g,h=b.call(this,a,f),i=h[0],j=0;ae(i,function(a){var b=a.children;b&&b.length?(a.x=Ge(b),a.y=Fe(b)):(a.x=g?j+=c(a,g):0,a.y=0,g=a)});var k=He(i),l=Ie(i),m=k.x-c(k,l)/2,n=l.x+c(l,k)/2;return ae(i,e?function(a){a.x=(a.x-i.x)*d[0],a.y=(i.y-a.y)*d[1]}:function(a){a.x=(a.x-m)/(n-m)*d[0],a.y=(1-(i.y?a.y/i.y:1))*d[1]}),h}var b=cg.layout.hierarchy().sort(null).value(null),c=ze,d=[1,1],e=!1;return a.separation=function(b){return arguments.length?(c=b,a):c},a.size=function(b){return arguments.length?(e=null==(d=b),a):e?null:d},a.nodeSize=function(b){return arguments.length?(e=null!=(d=b),a):e?d:null},$d(a,b)},cg.layout.treemap=function(){function a(a,b){for(var c,d,e=-1,f=a.length;++e<f;)d=(c=a[e]).value*(b<0?0:b),c.area=isNaN(d)||d<=0?0:d}function b(c){var f=c.children;if(f&&f.length){var g,h,i,j=l(c),k=[],m=f.slice(),o=1/0,p="slice"===n?j.dx:"dice"===n?j.dy:"slice-dice"===n?1&c.depth?j.dy:j.dx:Math.min(j.dx,j.dy);for(a(m,j.dx*j.dy/c.value),k.area=0;(i=m.length)>0;)k.push(g=m[i-1]),k.area+=g.area,"squarify"!==n||(h=d(k,p))<=o?(m.pop(),o=h):(k.area-=k.pop().area,e(k,p,j,!1),p=Math.min(j.dx,j.dy),k.length=k.area=0,o=1/0);k.length&&(e(k,p,j,!0),k.length=k.area=0),f.forEach(b)}}function c(b){var d=b.children;if(d&&d.length){var f,g=l(b),h=d.slice(),i=[];for(a(h,g.dx*g.dy/b.value),i.area=0;f=h.pop();)i.push(f),i.area+=f.area,null!=f.z&&(e(i,f.z?g.dx:g.dy,g,!h.length),i.length=i.area=0);d.forEach(c)}}function d(a,b){for(var c,d=a.area,e=0,f=1/0,g=-1,h=a.length;++g<h;)(c=a[g].area)&&(c<f&&(f=c),c>e&&(e=c));return d*=d,b*=b,d?Math.max(b*e*o/d,d/(b*f*o)):1/0}function e(a,b,c,d){var e,f=-1,g=a.length,h=c.x,j=c.y,k=b?i(a.area/b):0;if(b==c.dx){for((d||k>c.dy)&&(k=c.dy);++f<g;)e=a[f],e.x=h,e.y=j,e.dy=k,h+=e.dx=Math.min(c.x+c.dx-h,k?i(e.area/k):0);e.z=!0,e.dx+=c.x+c.dx-h,c.y+=k,c.dy-=k}else{for((d||k>c.dx)&&(k=c.dx);++f<g;)e=a[f],e.x=h,e.y=j,e.dx=k,j+=e.dy=Math.min(c.y+c.dy-j,k?i(e.area/k):0);e.z=!1,e.dy+=c.y+c.dy-j,c.x+=k,c.dx-=k}}function f(d){var e=g||h(d),f=e[0];return f.x=0,f.y=0,f.dx=j[0],f.dy=j[1],g&&h.revalue(f),a([f],f.dx*f.dy/f.value),(g?c:b)(f),m&&(g=e),e}var g,h=cg.layout.hierarchy(),i=Math.round,j=[1,1],k=null,l=Je,m=!1,n="squarify",o=.5*(1+Math.sqrt(5));return f.size=function(a){return arguments.length?(j=a,f):j},f.padding=function(a){function b(b){var c=a.call(f,b,b.depth);return null==c?Je(b):Ke(b,"number"==typeof c?[c,c,c,c]:c)}function c(b){return Ke(b,a)}if(!arguments.length)return k;var d;return l=null==(k=a)?Je:"function"==(d=typeof a)?b:"number"===d?(a=[a,a,a,a],c):c,f},f.round=function(a){return arguments.length?(i=a?Math.round:Number,f):i!=Number},f.sticky=function(a){return arguments.length?(m=a,g=null,f):m},f.ratio=function(a){return arguments.length?(o=a,f):o},f.mode=function(a){return arguments.length?(n=a+"",f):n},$d(f,h)},cg.random={normal:function(a,b){var c=arguments.length;return c<2&&(b=1),c<1&&(a=0),function(){var c,d,e;do c=2*Math.random()-1,d=2*Math.random()-1,e=c*c+d*d;while(!e||e>1);return a+b*c*Math.sqrt(-2*Math.log(e)/e)}},logNormal:function(){var a=cg.random.normal.apply(cg,arguments);return function(){return Math.exp(a())}},bates:function(a){var b=cg.random.irwinHall(a);return function(){return b()/a}},irwinHall:function(a){return function(){for(var b=0,c=0;c<a;c++)b+=Math.random();return b}}},cg.scale={};var qi={floor:t,ceil:t};cg.scale.linear=function(){return Re([0,1],[0,1],sd,!1)};var ri={s:1,g:1,p:1,r:1,e:1};cg.scale.log=function(){return Ze(cg.scale.linear().domain([0,1]),10,!0,[1,10])};var si=cg.format(".0e"),ti={floor:function(a){return-Math.ceil(-a)},ceil:function(a){return-Math.floor(-a)}};cg.scale.pow=function(){return $e(cg.scale.linear(),1,[0,1])},cg.scale.sqrt=function(){return cg.scale.pow().exponent(.5)},cg.scale.ordinal=function(){return af([],{t:"range",a:[[]]})},cg.scale.category10=function(){return cg.scale.ordinal().range(ui)},cg.scale.category20=function(){return cg.scale.ordinal().range(vi)},cg.scale.category20b=function(){return cg.scale.ordinal().range(wi)},cg.scale.category20c=function(){return cg.scale.ordinal().range(xi)};var ui=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(ua),vi=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(ua),wi=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(ua),xi=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(ua);cg.scale.quantile=function(){return bf([],[])},cg.scale.quantize=function(){return cf(0,1,[0,1])},cg.scale.threshold=function(){return df([.5],[0,1])},cg.scale.identity=function(){return ef([0,1])},cg.svg={},cg.svg.arc=function(){function a(){var a=Math.max(0,+c.apply(this,arguments)),j=Math.max(0,+d.apply(this,arguments)),k=g.apply(this,arguments)-Hg,l=h.apply(this,arguments)-Hg,m=Math.abs(l-k),n=k>l?0:1;if(j<a&&(o=j,j=a,a=o),m>=Gg)return b(j,n)+(a?b(a,1-n):"")+"Z";var o,p,q,r,s,t,u,v,w,x,y,z,A=0,B=0,C=[];if((r=(+i.apply(this,arguments)||0)/2)&&(q=f===yi?Math.sqrt(a*a+j*j):+f.apply(this,arguments),n||(B*=-1),j&&(B=ca(q/j*Math.sin(r))),a&&(A=ca(q/a*Math.sin(r)))),j){s=j*Math.cos(k+B),t=j*Math.sin(k+B),u=j*Math.cos(l-B),v=j*Math.sin(l-B);var D=Math.abs(l-k-2*B)<=Eg?0:1;if(B&&mf(s,t,u,v)===n^D){var E=(k+l)/2;s=j*Math.cos(E),t=j*Math.sin(E),u=v=null}}else s=t=0;if(a){w=a*Math.cos(l-A),x=a*Math.sin(l-A),y=a*Math.cos(k+A),z=a*Math.sin(k+A);var F=Math.abs(k-l+2*A)<=Eg?0:1;if(A&&mf(w,x,y,z)===1-n^F){var G=(k+l)/2;w=a*Math.cos(G),x=a*Math.sin(G),y=z=null}}else w=x=0;if((o=Math.min(Math.abs(j-a)/2,+e.apply(this,arguments)))>.001){p=a<j^n?0:1;var H=null==y?[w,x]:null==u?[s,t]:Hc([s,t],[y,z],[u,v],[w,x]),I=s-H[0],J=t-H[1],K=u-H[0],L=v-H[1],M=1/Math.sin(Math.acos((I*K+J*L)/(Math.sqrt(I*I+J*J)*Math.sqrt(K*K+L*L)))/2),N=Math.sqrt(H[0]*H[0]+H[1]*H[1]);if(null!=u){var O=Math.min(o,(j-N)/(M+1)),P=nf(null==y?[w,x]:[y,z],[s,t],j,O,n),Q=nf([u,v],[w,x],j,O,n);o===O?C.push("M",P[0],"A",O,",",O," 0 0,",p," ",P[1],"A",j,",",j," 0 ",1-n^mf(P[1][0],P[1][1],Q[1][0],Q[1][1]),",",n," ",Q[1],"A",O,",",O," 0 0,",p," ",Q[0]):C.push("M",P[0],"A",O,",",O," 0 1,",p," ",Q[0])}else C.push("M",s,",",t);if(null!=y){var R=Math.min(o,(a-N)/(M-1)),S=nf([s,t],[y,z],a,-R,n),T=nf([w,x],null==u?[s,t]:[u,v],a,-R,n);o===R?C.push("L",T[0],"A",R,",",R," 0 0,",p," ",T[1],"A",a,",",a," 0 ",n^mf(T[1][0],T[1][1],S[1][0],S[1][1]),",",1-n," ",S[1],"A",R,",",R," 0 0,",p," ",S[0]):C.push("L",T[0],"A",R,",",R," 0 0,",p," ",S[0])}else C.push("L",w,",",x)}else C.push("M",s,",",t),null!=u&&C.push("A",j,",",j," 0 ",D,",",n," ",u,",",v),C.push("L",w,",",x),null!=y&&C.push("A",a,",",a," 0 ",F,",",1-n," ",y,",",z);return C.push("Z"),C.join("")}function b(a,b){return"M0,"+a+"A"+a+","+a+" 0 1,"+b+" 0,"+-a+"A"+a+","+a+" 0 1,"+b+" 0,"+a}var c=gf,d=hf,e=ff,f=yi,g=jf,h=kf,i=lf;return a.innerRadius=function(b){return arguments.length?(c=Ba(b),a):c},a.outerRadius=function(b){return arguments.length?(d=Ba(b),a):d},a.cornerRadius=function(b){return arguments.length?(e=Ba(b),a):e},a.padRadius=function(b){return arguments.length?(f=b==yi?yi:Ba(b),a):f},a.startAngle=function(b){return arguments.length?(g=Ba(b),a):g},a.endAngle=function(b){return arguments.length?(h=Ba(b),a):h},a.padAngle=function(b){return arguments.length?(i=Ba(b),a):i},a.centroid=function(){var a=(+c.apply(this,arguments)+ +d.apply(this,arguments))/2,b=(+g.apply(this,arguments)+ +h.apply(this,arguments))/2-Hg;return[Math.cos(b)*a,Math.sin(b)*a]},a};var yi="auto";cg.svg.line=function(){return of(t)};var zi=cg.map({linear:pf,"linear-closed":qf,step:rf,"step-before":sf,"step-after":tf,basis:zf,"basis-open":Af,"basis-closed":Bf,bundle:Cf,cardinal:wf,"cardinal-open":uf,"cardinal-closed":vf,monotone:If});zi.forEach(function(a,b){b.key=a,b.closed=/-closed$/.test(a)});var Ai=[0,2/3,1/3,0],Bi=[0,1/3,2/3,0],Ci=[0,1/6,2/3,1/6];cg.svg.line.radial=function(){var a=of(Jf);return a.radius=a.x,delete a.x,a.angle=a.y,delete a.y,a},sf.reverse=tf,tf.reverse=sf,cg.svg.area=function(){return Kf(t)},cg.svg.area.radial=function(){var a=Kf(Jf);return a.radius=a.x,delete a.x,a.innerRadius=a.x0,delete a.x0,a.outerRadius=a.x1,delete a.x1,a.angle=a.y,delete a.y,a.startAngle=a.y0,delete a.y0,a.endAngle=a.y1,delete a.y1,a},cg.svg.chord=function(){function a(a,h){var i=b(this,f,a,h),j=b(this,g,a,h);return"M"+i.p0+d(i.r,i.p1,i.a1-i.a0)+(c(i,j)?e(i.r,i.p1,i.r,i.p0):e(i.r,i.p1,j.r,j.p0)+d(j.r,j.p1,j.a1-j.a0)+e(j.r,j.p1,i.r,i.p0))+"Z"}function b(a,b,c,d){var e=b.call(a,c,d),f=h.call(a,e,d),g=i.call(a,e,d)-Hg,k=j.call(a,e,d)-Hg;return{r:f,a0:g,a1:k,p0:[f*Math.cos(g),f*Math.sin(g)],p1:[f*Math.cos(k),f*Math.sin(k)]}}function c(a,b){return a.a0==b.a0&&a.a1==b.a1}function d(a,b,c){return"A"+a+","+a+" 0 "+ +(c>Eg)+",1 "+b}function e(a,b,c,d){return"Q 0,0 "+d}var f=sc,g=tc,h=Lf,i=jf,j=kf;return a.radius=function(b){return arguments.length?(h=Ba(b),a):h},a.source=function(b){return arguments.length?(f=Ba(b),a):f},a.target=function(b){return arguments.length?(g=Ba(b),a):g},a.startAngle=function(b){return arguments.length?(i=Ba(b),a):i},a.endAngle=function(b){return arguments.length?(j=Ba(b),a):j},a},cg.svg.diagonal=function(){function a(a,e){var f=b.call(this,a,e),g=c.call(this,a,e),h=(f.y+g.y)/2,i=[f,{x:f.x,y:h},{x:g.x,y:h},g];return i=i.map(d),"M"+i[0]+"C"+i[1]+" "+i[2]+" "+i[3]}var b=sc,c=tc,d=Mf;return a.source=function(c){return arguments.length?(b=Ba(c),a):b},a.target=function(b){return arguments.length?(c=Ba(b),a):c},a.projection=function(b){return arguments.length?(d=b,a):d},a},cg.svg.diagonal.radial=function(){var a=cg.svg.diagonal(),b=Mf,c=a.projection;return a.projection=function(a){return arguments.length?c(Nf(b=a)):b},a},cg.svg.symbol=function(){function a(a,d){return(Di.get(b.call(this,a,d))||Qf)(c.call(this,a,d))}var b=Pf,c=Of;return a.type=function(c){return arguments.length?(b=Ba(c),a):b},a.size=function(b){return arguments.length?(c=Ba(b),a):c},a};var Di=cg.map({circle:Qf,cross:function(a){var b=Math.sqrt(a/5)/2;return"M"+-3*b+","+-b+"H"+-b+"V"+-3*b+"H"+b+"V"+-b+"H"+3*b+"V"+b+"H"+b+"V"+3*b+"H"+-b+"V"+b+"H"+-3*b+"Z"},diamond:function(a){var b=Math.sqrt(a/(2*Fi)),c=b*Fi;return"M0,"+-b+"L"+c+",0 0,"+b+" "+-c+",0Z"},square:function(a){var b=Math.sqrt(a)/2;return"M"+-b+","+-b+"L"+b+","+-b+" "+b+","+b+" "+-b+","+b+"Z"},"triangle-down":function(a){var b=Math.sqrt(a/Ei),c=b*Ei/2;return"M0,"+c+"L"+b+","+-c+" "+-b+","+-c+"Z"},"triangle-up":function(a){var b=Math.sqrt(a/Ei),c=b*Ei/2;return"M0,"+-c+"L"+b+","+c+" "+-b+","+c+"Z"}});cg.svg.symbolTypes=Di.keys();var Ei=Math.sqrt(3),Fi=Math.tan(30*Ig);vg.transition=function(a){for(var b,c,d=Gi||++Ki,e=Vf(a),f=[],g=Hi||{time:Date.now(),ease:zd,delay:0,duration:250},h=-1,i=this.length;++h<i;){f.push(b=[]);for(var j=this[h],k=-1,l=j.length;++k<l;)(c=j[k])&&Wf(c,k,e,d,g),b.push(c)}return Sf(f,e,d)},vg.interrupt=function(a){return this.each(null==a?Ii:Rf(Vf(a)))};var Gi,Hi,Ii=Rf(Vf()),Ji=[],Ki=0;Ji.call=vg.call,Ji.empty=vg.empty,Ji.node=vg.node,Ji.size=vg.size,cg.transition=function(a,b){return a&&a.transition?Gi?a.transition(b):a:cg.selection().transition(a)},cg.transition.prototype=Ji,Ji.select=function(a){var b,c,d,e=this.id,f=this.namespace,g=[];a=D(a);for(var h=-1,i=this.length;++h<i;){g.push(b=[]);for(var j=this[h],k=-1,l=j.length;++k<l;)(d=j[k])&&(c=a.call(d,d.__data__,k,h))?("__data__"in d&&(c.__data__=d.__data__),Wf(c,k,f,e,d[f][e]),b.push(c)):b.push(null)}return Sf(g,f,e)},Ji.selectAll=function(a){var b,c,d,e,f,g=this.id,h=this.namespace,i=[];a=E(a);for(var j=-1,k=this.length;++j<k;)for(var l=this[j],m=-1,n=l.length;++m<n;)if(d=l[m]){f=d[h][g],c=a.call(d,d.__data__,m,j),i.push(b=[]);for(var o=-1,p=c.length;++o<p;)(e=c[o])&&Wf(e,o,h,g,f),b.push(e)}return Sf(i,h,g)},Ji.filter=function(a){var b,c,d,e=[];"function"!=typeof a&&(a=Q(a));for(var f=0,g=this.length;f<g;f++){e.push(b=[]);for(var c=this[f],h=0,i=c.length;h<i;h++)(d=c[h])&&a.call(d,d.__data__,h,f)&&b.push(d)}return Sf(e,this.namespace,this.id)},Ji.tween=function(a,b){var c=this.id,d=this.namespace;return arguments.length<2?this.node()[d][c].tween.get(a):S(this,null==b?function(b){b[d][c].tween.remove(a)}:function(e){e[d][c].tween.set(a,b)})},Ji.attr=function(a,b){function c(){this.removeAttribute(h)}function d(){this.removeAttributeNS(h.space,h.local)}function e(a){return null==a?c:(a+="",function(){var b,c=this.getAttribute(h);return c!==a&&(b=g(c,a),function(a){this.setAttribute(h,b(a))})})}function f(a){return null==a?d:(a+="",function(){var b,c=this.getAttributeNS(h.space,h.local);return c!==a&&(b=g(c,a),function(a){this.setAttributeNS(h.space,h.local,b(a))})})}if(arguments.length<2){for(b in a)this.attr(b,a[b]);return this}var g="transform"==a?Pd:sd,h=cg.ns.qualify(a);return Tf(this,"attr."+a,b,h.local?f:e)},Ji.attrTween=function(a,b){function c(a,c){var d=b.call(this,a,c,this.getAttribute(e));return d&&function(a){this.setAttribute(e,d(a))}}function d(a,c){var d=b.call(this,a,c,this.getAttributeNS(e.space,e.local));return d&&function(a){this.setAttributeNS(e.space,e.local,d(a))}}var e=cg.ns.qualify(a);return this.tween("attr."+a,e.local?d:c)},Ji.style=function(a,c,d){function e(){this.style.removeProperty(a)}function f(c){return null==c?e:(c+="",function(){var e,f=b(this).getComputedStyle(this,null).getPropertyValue(a);return f!==c&&(e=sd(f,c),function(b){this.style.setProperty(a,e(b),d)})})}var g=arguments.length;if(g<3){if("string"!=typeof a){g<2&&(c="");for(d in a)this.style(d,a[d],c);return this}d=""}return Tf(this,"style."+a,c,f)},Ji.styleTween=function(a,c,d){function e(e,f){var g=c.call(this,e,f,b(this).getComputedStyle(this,null).getPropertyValue(a));return g&&function(b){this.style.setProperty(a,g(b),d)}}return arguments.length<3&&(d=""),this.tween("style."+a,e)},Ji.text=function(a){return Tf(this,"text",a,Uf)},Ji.remove=function(){var a=this.namespace;return this.each("end.transition",function(){var b;this[a].count<2&&(b=this.parentNode)&&b.removeChild(this)})},Ji.ease=function(a){var b=this.id,c=this.namespace;return arguments.length<1?this.node()[c][b].ease:("function"!=typeof a&&(a=cg.ease.apply(cg,arguments)),S(this,function(d){d[c][b].ease=a}))},Ji.delay=function(a){var b=this.id,c=this.namespace;return arguments.length<1?this.node()[c][b].delay:S(this,"function"==typeof a?function(d,e,f){d[c][b].delay=+a.call(d,d.__data__,e,f)}:(a=+a,function(d){d[c][b].delay=a}))},Ji.duration=function(a){var b=this.id,c=this.namespace;return arguments.length<1?this.node()[c][b].duration:S(this,"function"==typeof a?function(d,e,f){d[c][b].duration=Math.max(1,a.call(d,d.__data__,e,f))}:(a=Math.max(1,a),function(d){d[c][b].duration=a}))},Ji.each=function(a,b){var c=this.id,d=this.namespace;if(arguments.length<2){var e=Hi,f=Gi;try{Gi=c,S(this,function(b,e,f){Hi=b[d][c],a.call(b,b.__data__,e,f)})}finally{Hi=e,Gi=f}}else S(this,function(e){var f=e[d][c];(f.event||(f.event=cg.dispatch("start","end","interrupt"))).on(a,b)});return this},Ji.transition=function(){for(var a,b,c,d,e=this.id,f=++Ki,g=this.namespace,h=[],i=0,j=this.length;i<j;i++){h.push(a=[]);for(var b=this[i],k=0,l=b.length;k<l;k++)(c=b[k])&&(d=c[g][e],Wf(c,k,g,f,{time:d.time,ease:d.ease,delay:d.delay+d.duration,duration:d.duration})),a.push(c)}return Sf(h,g,f)},cg.svg.axis=function(){function a(a){a.each(function(){var a,j=cg.select(this),k=this.__chart__||c,l=this.__chart__=c.copy(),m=null==i?l.ticks?l.ticks.apply(l,h):l.domain():i,n=null==b?l.tickFormat?l.tickFormat.apply(l,h):t:b,o=j.selectAll(".tick").data(m,l),p=o.enter().insert("g",".domain").attr("class","tick").style("opacity",Cg),q=cg.transition(o.exit()).style("opacity",Cg).remove(),r=cg.transition(o.order()).style("opacity",1),s=Math.max(e,0)+g,u=Me(l),v=j.selectAll(".domain").data([0]),w=(v.enter().append("path").attr("class","domain"),cg.transition(v));p.append("line"),p.append("text");var x,y,z,A,B=p.select("line"),C=r.select("line"),D=o.select("text").text(n),E=p.select("text"),F=r.select("text"),G="top"===d||"left"===d?-1:1;if("bottom"===d||"top"===d?(a=Xf,x="x",z="y",y="x2",A="y2",D.attr("dy",G<0?"0em":".71em").style("text-anchor","middle"),w.attr("d","M"+u[0]+","+G*f+"V0H"+u[1]+"V"+G*f)):(a=Yf,x="y",z="x",y="y2",A="x2",D.attr("dy",".32em").style("text-anchor",G<0?"end":"start"),w.attr("d","M"+G*f+","+u[0]+"H0V"+u[1]+"H"+G*f)),B.attr(A,G*e),E.attr(z,G*s),C.attr(y,0).attr(A,G*e),F.attr(x,0).attr(z,G*s),l.rangeBand){var H=l,I=H.rangeBand()/2;k=l=function(a){return H(a)+I}}else k.rangeBand?k=l:q.call(a,l,k);p.call(a,k,l),r.call(a,l,l)})}var b,c=cg.scale.linear(),d=Li,e=6,f=6,g=3,h=[10],i=null;return a.scale=function(b){return arguments.length?(c=b,a):c},a.orient=function(b){return arguments.length?(d=b in Mi?b+"":Li,a):d},a.ticks=function(){return arguments.length?(h=arguments,a):h},a.tickValues=function(b){return arguments.length?(i=b,a):i},a.tickFormat=function(c){return arguments.length?(b=c,a):b},a.tickSize=function(b){var c=arguments.length;return c?(e=+b,f=+arguments[c-1],a):e},a.innerTickSize=function(b){return arguments.length?(e=+b,a):e},a.outerTickSize=function(b){return arguments.length?(f=+b,a):f},a.tickPadding=function(b){return arguments.length?(g=+b,a):g},a.tickSubdivide=function(){return arguments.length&&a},a};var Li="bottom",Mi={top:1,right:1,bottom:1,left:1};cg.svg.brush=function(){function a(b){b.each(function(){var b=cg.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",f).on("touchstart.brush",f),g=b.selectAll(".background").data([0]);g.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),b.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var h=b.selectAll(".resize").data(p,t);h.exit().remove(),h.enter().append("g").attr("class",function(a){return"resize "+a}).style("cursor",function(a){return Ni[a]}).append("rect").attr("x",function(a){return/[ew]$/.test(a)?-3:null}).attr("y",function(a){return/^[ns]/.test(a)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),h.style("display",a.empty()?"none":null);var i,l=cg.transition(b),m=cg.transition(g);j&&(i=Me(j),m.attr("x",i[0]).attr("width",i[1]-i[0]),d(l)),k&&(i=Me(k),m.attr("y",i[0]).attr("height",i[1]-i[0]),e(l)),c(l)})}function c(a){a.selectAll(".resize").attr("transform",function(a){return"translate("+l[+/e$/.test(a)]+","+m[+/^s/.test(a)]+")"})}function d(a){a.select(".extent").attr("x",l[0]),a.selectAll(".extent,.n>rect,.s>rect").attr("width",l[1]-l[0])}function e(a){a.select(".extent").attr("y",m[0]),a.selectAll(".extent,.e>rect,.w>rect").attr("height",m[1]-m[0])}function f(){function f(){32==cg.event.keyCode&&(D||(t=null,F[0]-=l[1],F[1]-=m[1],D=2),z())}function p(){32==cg.event.keyCode&&2==D&&(F[0]+=l[1],F[1]+=m[1],D=0,z())}function q(){var a=cg.mouse(v),b=!1;u&&(a[0]+=u[0],a[1]+=u[1]),D||(cg.event.altKey?(t||(t=[(l[0]+l[1])/2,(m[0]+m[1])/2]),F[0]=l[+(a[0]<t[0])],F[1]=m[+(a[1]<t[1])]):t=null),B&&r(a,j,0)&&(d(y),b=!0),C&&r(a,k,1)&&(e(y),b=!0),b&&(c(y),x({type:"brush",mode:D?"move":"resize"}))}function r(a,b,c){var d,e,f=Me(b),i=f[0],j=f[1],k=F[c],p=c?m:l,q=p[1]-p[0];if(D&&(i-=k,j-=q+k),d=(c?o:n)?Math.max(i,Math.min(j,a[c])):a[c],D?e=(d+=k)+q:(t&&(k=Math.max(i,Math.min(j,2*t[c]-d))),k<d?(e=d,d=k):e=k),p[0]!=d||p[1]!=e)return c?h=null:g=null,p[0]=d,p[1]=e,!0}function s(){q(),y.style("pointer-events","all").selectAll(".resize").style("display",a.empty()?"none":null),cg.select("body").style("cursor",null),G.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),E(),x({type:"brushend"})}var t,u,v=this,w=cg.select(cg.event.target),x=i.of(v,arguments),y=cg.select(v),A=w.datum(),B=!/^(n|s)$/.test(A)&&j,C=!/^(e|w)$/.test(A)&&k,D=w.classed("extent"),E=Y(v),F=cg.mouse(v),G=cg.select(b(v)).on("keydown.brush",f).on("keyup.brush",p);if(cg.event.changedTouches?G.on("touchmove.brush",q).on("touchend.brush",s):G.on("mousemove.brush",q).on("mouseup.brush",s),y.interrupt().selectAll("*").interrupt(),D)F[0]=l[0]-F[0],F[1]=m[0]-F[1];else if(A){var H=+/w$/.test(A),I=+/^n/.test(A);u=[l[1-H]-F[0],m[1-I]-F[1]],F[0]=l[H],F[1]=m[I]}else cg.event.altKey&&(t=F.slice());y.style("pointer-events","none").selectAll(".resize").style("display",null),cg.select("body").style("cursor",w.style("cursor")),x({type:"brushstart"}),q()}var g,h,i=B(a,"brushstart","brush","brushend"),j=null,k=null,l=[0,0],m=[0,0],n=!0,o=!0,p=Oi[0];return a.event=function(a){a.each(function(){var a=i.of(this,arguments),b={x:l,y:m,i:g,j:h},c=this.__chart__||b;this.__chart__=b,Gi?cg.select(this).transition().each("start.brush",function(){g=c.i,h=c.j,l=c.x,m=c.y,a({type:"brushstart"})}).tween("brush:brush",function(){var c=td(l,b.x),d=td(m,b.y);return g=h=null,function(e){l=b.x=c(e),m=b.y=d(e),a({type:"brush",mode:"resize"})}}).each("end.brush",function(){g=b.i,h=b.j,a({type:"brush",mode:"resize"}),a({type:"brushend"})}):(a({type:"brushstart"}),a({type:"brush",mode:"resize"}),a({type:"brushend"}))})},a.x=function(b){return arguments.length?(j=b,p=Oi[!j<<1|!k],a):j},a.y=function(b){return arguments.length?(k=b,p=Oi[!j<<1|!k],a):k},a.clamp=function(b){return arguments.length?(j&&k?(n=!!b[0],o=!!b[1]):j?n=!!b:k&&(o=!!b),a):j&&k?[n,o]:j?n:k?o:null},a.extent=function(b){var c,d,e,f,i;return arguments.length?(j&&(c=b[0],d=b[1],k&&(c=c[0],d=d[0]),g=[c,d],j.invert&&(c=j(c),d=j(d)),d<c&&(i=c,c=d,d=i),c==l[0]&&d==l[1]||(l=[c,d])),k&&(e=b[0],f=b[1],j&&(e=e[1],f=f[1]),h=[e,f],k.invert&&(e=k(e),f=k(f)),f<e&&(i=e,e=f,f=i),e==m[0]&&f==m[1]||(m=[e,f])),a):(j&&(g?(c=g[0],d=g[1]):(c=l[0],d=l[1],j.invert&&(c=j.invert(c),d=j.invert(d)),d<c&&(i=c,c=d,d=i))),k&&(h?(e=h[0],f=h[1]):(e=m[0],f=m[1],k.invert&&(e=k.invert(e),f=k.invert(f)),f<e&&(i=e,e=f,f=i))),j&&k?[[c,e],[d,f]]:j?[c,d]:k&&[e,f])},a.clear=function(){return a.empty()||(l=[0,0],m=[0,0],g=h=null),a},a.empty=function(){return!!j&&l[0]==l[1]||!!k&&m[0]==m[1]},cg.rebind(a,i,"on")};var Ni={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Oi=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Pi=gh.format=mh.timeFormat,Qi=Pi.utc,Ri=Qi("%Y-%m-%dT%H:%M:%S.%LZ");Pi.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Zf:Ri,Zf.parse=function(a){var b=new Date(a);return isNaN(b)?null:b},Zf.toString=Ri.toString,gh.second=Oa(function(a){return new hh(1e3*Math.floor(a/1e3))},function(a,b){a.setTime(a.getTime()+1e3*Math.floor(b))},function(a){return a.getSeconds()}),gh.seconds=gh.second.range,gh.seconds.utc=gh.second.utc.range,gh.minute=Oa(function(a){return new hh(6e4*Math.floor(a/6e4))},function(a,b){a.setTime(a.getTime()+6e4*Math.floor(b))},function(a){return a.getMinutes()}),gh.minutes=gh.minute.range,gh.minutes.utc=gh.minute.utc.range,gh.hour=Oa(function(a){var b=a.getTimezoneOffset()/60;return new hh(36e5*(Math.floor(a/36e5-b)+b))},function(a,b){a.setTime(a.getTime()+36e5*Math.floor(b))},function(a){return a.getHours()}),gh.hours=gh.hour.range,gh.hours.utc=gh.hour.utc.range,gh.month=Oa(function(a){return a=gh.day(a),a.setDate(1),a},function(a,b){a.setMonth(a.getMonth()+b)},function(a){return a.getMonth()}),gh.months=gh.month.range,gh.months.utc=gh.month.utc.range;var Si=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Ti=[[gh.second,1],[gh.second,5],[gh.second,15],[gh.second,30],[gh.minute,1],[gh.minute,5],[gh.minute,15],[gh.minute,30],[gh.hour,1],[gh.hour,3],[gh.hour,6],[gh.hour,12],[gh.day,1],[gh.day,2],[gh.week,1],[gh.month,1],[gh.month,3],[gh.year,1]],Ui=Pi.multi([[".%L",function(a){return a.getMilliseconds()}],[":%S",function(a){return a.getSeconds()}],["%I:%M",function(a){return a.getMinutes()}],["%I %p",function(a){return a.getHours()}],["%a %d",function(a){return a.getDay()&&1!=a.getDate()}],["%b %d",function(a){return 1!=a.getDate()}],["%B",function(a){return a.getMonth()}],["%Y",Db]]),Vi={range:function(a,b,c){return cg.range(Math.ceil(a/c)*c,+b,c).map(_f)},floor:t,ceil:t};Ti.year=gh.year,gh.scale=function(){return $f(cg.scale.linear(),Ti,Ui)};var Wi=Ti.map(function(a){return[a[0].utc,a[1]]}),Xi=Qi.multi([[".%L",function(a){return a.getUTCMilliseconds()}],[":%S",function(a){return a.getUTCSeconds()}],["%I:%M",function(a){return a.getUTCMinutes()}],["%I %p",function(a){return a.getUTCHours()}],["%a %d",function(a){return a.getUTCDay()&&1!=a.getUTCDate()}],["%b %d",function(a){return 1!=a.getUTCDate()}],["%B",function(a){return a.getUTCMonth()}],["%Y",Db]]);Wi.year=gh.year.utc,gh.scale.utc=function(){return $f(cg.scale.linear(),Wi,Xi)},cg.text=Ca(function(a){return a.responseText}),cg.json=function(a,b){return Da(a,"application/json",ag,b)},cg.html=function(a,b){return Da(a,"text/html",bg,b)},cg.xml=Ca(function(a){return a.responseXML}),"function"==typeof define&&define.amd?define(cg):"object"==typeof f&&f.exports&&(f.exports=cg),this.d3=cg}()}(this),e()}),c.registerDynamic("1e",["27"],!0,function(a,b,c){this||self;c.exports=a("27")}),c.register("28",["29"],function(a){var b,c,d,e,f,g,h;return{setters:[function(a){b=a}],execute:function(){c=function(a,c){var d=new Blob([e(a)],{type:"text/xml"});c=b.sanitize_filename(c)+".svg",b.download_blob(d,c)},d=function(a,c){if("undefined"!=typeof window.navigator.msSaveOrOpenBlob)return void alert("Exporting PNG images is not supported in Internet Explorer. Please use Chrome or Firefox.");var d=5,f=document.getElementById("png-exporter"),g=$(a);f.height=g.height()*d,f.width=g.width()*d;var h=new Image;h.onload=function(){var a=f.getContext("2d");a.drawImage(h,0,0,f.width,f.height),c=b.sanitize_filename(c)+".png",b.download_url(f.toDataURL("image/png"),c);
|
10
|
+
},h.src="data:image/svg+xml;base64,"+window.btoa(e(a))},e=function(a){a=a.cloneNode(!0),d3.select(a).attr("version","1.1").insert("defs",":first-child").append("style").attr("class","exported-css").attr("type","text/css").node().textContent=f(),a.removeAttribute("xmlns"),a.removeAttribute("xlink"),a.setAttributeNS(d3.ns.prefix.xmlns,"xmlns",d3.ns.prefix.svg),a.setAttributeNS(d3.ns.prefix.xmlns,"xmlns:xlink",d3.ns.prefix.xlink);var b=(new XMLSerializer).serializeToString(a),c='<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">';return c+b},f=function(){for(var a="",b=0;b<document.styleSheets.length;b++)!function b(c){try{if(!c.cssRules)return}catch(a){if("SecurityError"!==a.name)throw a;return}for(var d=0;d<c.cssRules.length;d++){var e=c.cssRules[d];if(e.type===CSSRule.IMPORT_RULE)b(e.styleSheet);else{var f=e.selectorText;f&&f.indexOf("svg")!==-1&&(a+="\n"+e.cssText)}}}(document.styleSheets[b]);return a},g=function(a){return function(){var b=$(this).parents(".grapher").find("svg");return a(b[0],b.attr("data-name")),!1}},h=$("body"),h.on("click",".export-to-svg",g(c)),h.on("click",".export-to-png",g(d))}}}),c.register("1f",["17","22","23","28","2a","2b","1a"],function(a){function b(a){return function(b){function c(a){e(this,c),f(Object.getPrototypeOf(c.prototype),"constructor",this).call(this,a),this.state={collapsed:this.props.collapsed}}return g(c,b),d(c,[{key:"collapseId",value:function(){return a.collapseId(this.props)}},{key:"render",value:function(){var b=a.className()+" grapher";return h.createElement("div",{ref:"grapher",className:b},h.createElement("div",{className:"grapher-header"},h.createElement("h4",{className:"caption","data-toggle":"collapse","data-target":"#"+this.collapseId()},this.state.collapsed?this.plusIcon():this.minusIcon()," ",a.name()),!this.state.collapsed&&this.graphLinksJSX()),this.svgContainerJSX())}},{key:"minusIcon",value:function(){return h.createElement("i",{className:"fa fa-minus-square-o"})}},{key:"plusIcon",value:function(){return h.createElement("i",{className:"fa fa-plus-square-o"})}},{key:"graphLinksJSX",value:function(){return h.createElement("div",{className:"hit-links graph-links"},h.createElement("a",{href:"#",className:"btn-link export-to-svg"},h.createElement("i",{className:"fa fa-download"})," SVG"),h.createElement("span",{className:"line"},"|"),h.createElement("a",{href:"#",className:"btn-link export-to-png"},h.createElement("i",{className:"fa fa-download"})," PNG"))}},{key:"svgContainerJSX",value:function(){var b=a.className()+" svg-container collapse";return this.state.collapsed||(b+=" in"),h.createElement("div",{ref:"svgContainer",id:this.collapseId(),className:b})}},{key:"componentDidMount",value:function(){i[this.collapseId()]=this,this.draw()}},{key:"componentDidUpdate",value:function(){this.draw()}},{key:"svgContainer",value:function(){return $(h.findDOMNode(this.refs.svgContainer))}},{key:"draw",value:function(){this.svgContainer().empty(),this.graph=null,this.state.collapsed||(this.graph=new a(this.svgContainer(),this.props),this.svgContainer().find("svg").attr("data-name",a.dataName(this.props)))}}]),c}(h.Component)}var c,d,e,f,g,h,i;return{setters:[function(a){c=a.default},function(a){d=a.default},function(a){e=a.default},function(a){},function(a){f=a.default},function(a){g=a.default},function(a){h=a.default}],execute:function(){a("default",b),i={},$(window).resize(c.debounce(function(){c.each(i,function(a){a.draw()})},125)),$("body").on("hidden.bs.collapse",".collapse",function(){var a=i[$(this).attr("id")];a&&a.setState({collapsed:!0})}),$("body").on("shown.bs.collapse",".collapse",function(){var a=i[$(this).attr("id")];a&&a.setState({collapsed:!1})})}}}),c.register("2c",["17","20","22","23","2d","1e","1f"],function(a){var b,c,d,e,f,g,h,i,j;return{setters:[function(a){b=a.default},function(a){c=a},function(a){d=a.default},function(a){e=a.default},function(a){f=a.default},function(a){g=a.default},function(a){h=a.default}],execute:function(){i=function(){function a(b,d){e(this,a),this._zoom_scale_by=1.4,this._padding_x=12,this._padding_y=50,this._canvas_height=b.height(),this._canvas_width=b.width(),this._results=c.get_seq_type(d.algorithm),this._query_id=d.query.id,this._subject_id=d.hit.id,this._query_length=d.query.length,this._subject_length=d.hit.length,this._show_numbers=d.showHSPCrumbs,this._hsps=d.hit.hsps,this._maxBitScore=d.query.hits[0].hsps[0].bit_score,this.svgContainer_d3=g.select(b[0]),this._svg={},this._svg.jq=$(this._svg.raw),this._scales=this._create_scales(),this.use_complement_coords=!1,this._axis_ticks=10,this._initiate(),this.bindHoverHandler(b)}return d(a,null,[{key:"name",value:function(){return"Graphical overview of aligning region(s)"}},{key:"className",value:function(){return"kablammo"}},{key:"collapseId",value:function(a){return"kablammo_"+a.query.number+"_"+a.hit.number}},{key:"dataName",value:function(a){return"Kablammo-"+a.query.id+"-"+a.hit.id}}]),d(a,[{key:"bindHoverHandler",value:function(a){a.find("polygon").hover(function(){var a=$(this).parent();a.parent().append(a)})}},{key:"_initiate",value:function(){this._svg.d3=this.svgContainer_d3.insert("svg",":first-child").attr("height",this._canvas_height).attr("width",this._canvas_width),this._svg.raw=this._svg.d3[0][0],this._render_graph()}},{key:"_rotate_axis_labels",value:function(a,b,c,d){a.style("text-anchor",b).attr("x",c).attr("y",d).attr("dx",0).attr("dy",0).attr("transform","rotate(-90)")}},{key:"_create_axis",value:function(a,b,d,e,f,h,i){var j=c.tick_formatter(a,i),k=a.ticks();k.pop();var l=g.svg.axis().ticks(this._axis_ticks).scale(a).tickValues(k.concat(a.domain())).tickFormat(j).orient(b),m=this._svg.d3.append("g").attr("class","axis").attr("transform","translate(0,"+d+")").call(l);return this._rotate_axis_labels(m.selectAll("text"),e,f,h),m}},{key:"_is_domain_within_orig",value:function(a,b){return a[0]<=b[0]&&a[1]>=b[1]}},{key:"_zoom_scale",value:function(a,b,c,d){var e=a.domain()[0],f=a.domain()[1];if(e=c-(c-e)/d,f=c+(f-c)/d,e=Math.round(e),f=Math.round(f),!(f-e<this._axis_ticks)){var g=[e,f];this._is_domain_within_orig(b,g)?a.domain(g):a.domain(b)}}},{key:"_pan_scale",value:function(a,b,c){var d=(a.domain()[1]-a.domain()[0])/(a.range()[1]-a.range()[0]),e=-c*d,f=a.domain(),g=f[0]+e,h=f[1]+e,i=[g,h];this._is_domain_within_orig(b,i)&&a.domain(i)}},{key:"_render_polygons",value:function(){var a=this;this._svg.d3.selectAll("*").remove(),this._polygons=this._svg.d3.selectAll("polygon").data(this._hsps.slice().reverse()).enter().append("g").attr("class","polygon"),this._polygons.append("polygon").attr("class","hit").attr("fill",function(b){return a.determine_colour(b.bit_score/a._maxBitScore)}).attr("points",function(b){var c=[a._scales.query.scale(b.qstart),a._scales.query.scale(b.qend)],d=[a._scales.subject.scale(b.sstart),a._scales.subject.scale(b.send)];a.use_complement_coords||(b.qframe<0&&c.reverse(),b.sframe<0&&d.reverse());var e=[[c[0],a._scales.query.height+1],[d[0],a._scales.subject.height-1],[d[1],a._scales.subject.height-1],[c[1],a._scales.query.height+1]];return e.map(function(a){return a[0]+","+a[1]}).join(" ")}),a._show_numbers&&this._polygons.append("text").attr("x",function(b){var c=[a._scales.query.scale(b.qstart),a._scales.query.scale(b.qend)],d=[a._scales.subject.scale(b.sstart),a._scales.subject.scale(b.send)],e=.5*(c[0]+d[0]),f=.5*(c[1]+d[1]);return.5*(f+e)}).attr("y",function(b){var c=a._scales.query.height,d=a._scales.subject.height,e=(d-c)/2;return c+e+2}).text(function(a){return c.toLetters(a.number)})}},{key:"_overlaps",value:function(a,b,c,d){return Math.min(b,d)>Math.max(a,c)}},{key:"_rects_overlap",value:function(a,b,c){return c=c||0,this._overlaps(a.left-c,a.right+c,b.left,b.right)&&this._overlaps(a.top-c,a.bottom+c,b.top,b.bottom)}},{key:"_render_axes",value:function(){this._create_axis(this._scales.query.scale,"top",this._scales.query.height,"start","9px","2px",this._results.query_seq_type),this._create_axis(this._scales.subject.scale,"bottom",this._scales.subject.height,"end","-11px","3px",this._results.subject_seq_type)}},{key:"_render_graph",value:function(){this._render_polygons(),this._render_axes()}},{key:"_find_nearest_scale",value:function(a){var b=null,c=Number.MAX_VALUE,d=this;return f(this._scales).forEach(function(e){var f=d._scales[e].scale,g=d._scales[e].height,h=Math.abs(g-a[1]);h<c&&(b=f,c=h)}),b}},{key:"_create_scales",value:function(){var a=[this._padding_x,this._canvas_width-this._padding_x],b=[this._padding_x,this._canvas_width-this._padding_x];this.use_complement_coords||(this._hsps[0].qframe<0&&a.reverse(),this._hsps[0].sframe<0&&b.reverse());var c=g.scale.linear().domain([1,this._query_length]).range(a),d=g.scale.linear().domain([1,this._subject_length]).range(b);c.original_domain=c.domain(),d.original_domain=d.domain();var e=this._padding_y,f=this._canvas_height-this._padding_y,h={subject:{height:f,scale:d},query:{height:e,scale:c}};return h}},{key:"_rgba_to_rgb",value:function(a,b){var c=function(a){return a.map(function(a){return a/255})},d=function(a){return a.map(function(a){return Math.round(Math.min(255,255*a))})},e=c(a.slice(0,3));b=c(b);var f=a[3]/255,g=[f*e[0]+(1-f)*b[0],f*e[1]+(1-f)*b[1],f*e[2]+(1-f)*b[2]];return d(g)}},{key:"determine_colour",value:function(a){var b={r:199,g:79,b:20},c={r:255,g:255,b:255},d=.3,e=(1-d)*a+d,f=this._rgba_to_rgb([b.r,b.g,b.b,255*e],[c.r,c.g,c.b]);return"rgb("+f.join(",")+")"}}]),a}(),j=h(i),a("default",j)}}}),c.register("18",[],function(a){function b(a,b){function c(a,b){d.append($("<input>").attr("type","hidden").attr("name",a).val(b))}var d=$("<form/>").attr("method","post").attr("action","get_sequence");c("sequence_ids",a),c("database_ids",b),d.appendTo("body").submit().remove()}return a("default",b),{setters:[],execute:function(){}}}),c.register("29",[],function(a){function b(a,b){var c=d3.select("body").append("a").attr("download",b).style("display","none").attr("href",a);c.node().click(),setTimeout(function(){c.remove()},100)}function c(a,c){return"undefined"!=typeof window.navigator.msSaveOrOpenBlob?void window.navigator.msSaveOrOpenBlob(a,c):void b(window.URL.createObjectURL(a),c)}function d(a){var b=a.replace(/[^a-zA-Z0-9=_\-]/g,"_");return b=b.replace(/_{2,}/g,"_"),b=b.replace(/^_/,"").replace(/_$/,"")}return a("download_url",b),a("download_blob",c),a("sanitize_filename",d),{setters:[],execute:function(){}}}),c.register("19",["17","22","23","29"],function(a){var b,c,d,e,f;return{setters:[function(a){b=a.default},function(a){c=a.default},function(a){d=a.default},function(a){e=a}],execute:function(){f=function(){function a(){d(this,a)}return c(a,[{key:"wrap_string",value:function(a,b){for(var c=0,d="";;){if(d+=a.substring(c,c+b),c+=b,!(c<a.length))break;d+="\n"}return d}},{key:"generate_fasta",value:function(a){var c="";return b.each(a,b.bind(function(a){c+=">"+a.query_id+":"+a.qstart+"-"+a.qend+"\n",c+=a.qseq+"\n",c+=">"+a.query_id+":"+a.qstart+"-"+a.qend+"_alignment_"+a.hit_id+":"+a.sstart+"-"+a.send+"\n",c+=a.midline+"\n",c+=">"+a.hit_id+":"+a.sstart+"-"+a.send+"\n",c+=a.sseq+"\n"},this)),c}},{key:"export_alignments",value:function(a,b){var c=this.generate_fasta(a),d=new Blob([c],{type:"text/fasta"}),f=e.sanitize_filename(b)+".txt";e.download_blob(d,f)}},{key:"export_alignments_of_all",value:function(a,b){}}]),a}(),a("default",f)}}}),c.register("2e",["17","18","19","1a","2c"],function(a){var b,c,d,e,f;return{setters:[function(a){b=a.default},function(a){c=a.default},function(a){d=a.default},function(a){e=a.default},function(a){f=a.default}],execute:function(){a("default",e.createClass({displayName:"hit",accession:function(){return this.props.hit.accession},sequenceID:function(){return this.props.hit.id},hitLength:function(){return this.props.hit.length},numHSPs:function(){return this.props.hit.hsps.length},domID:function(){return"Query_"+this.props.query.number+"_hit_"+this.props.hit.number},databaseIDs:function(){return b.map(this.props.querydb,b.iteratee("id"))},showSequenceViewer:function(){this.props.showSequenceModal(this.viewSequenceLink())},viewSequenceLink:function(){var a=encodeURIComponent(this.sequenceID()),b=encodeURIComponent(this.databaseIDs());return"get_sequence/?sequence_ids="+a+"&database_ids="+b},downloadFASTA:function(a){var b=[this.sequenceID()];c(b,this.databaseIDs())},downloadAlignment:function(a){var c=b.map(this.props.hit.hsps,b.bind(function(a){return a.query_id=this.props.query.id,a.hit_id=this.props.hit.id,a},this)),e=new d;e.export_alignments(c,this.props.query.id+"_"+this.props.hit.id)},render:function(){return e.createElement("div",{className:"hit",id:this.domID(),"data-hit-def":this.props.hit.id,"data-hit-len":this.props.hit.length,"data-hit-evalue":this.props.hit.evalue},this.headerJSX()," ",this.contentJSX())},shouldComponentUpdate:function(){return!this.props.hit},headerJSX:function(){var a="length: "+this.hitLength().toLocaleString();return this.props.showQueryCrumbs&&this.props.showHitCrumbs?a="hit "+this.props.hit.number+" of query "+this.props.query.number+", "+a:this.props.showQueryCrumbs&&!this.props.showHitCrumbs?a="the only hit of query "+this.props.query.number+", "+a:!this.props.showQueryCrumbs&&this.props.showHitCrumbs&&(a="hit "+this.props.hit.number+", "+a),e.createElement("div",{className:"section-header"},e.createElement("h4",null,e.createElement("i",{className:"fa fa-minus-square-o"})," ",e.createElement("strong",null,this.props.hit.id)," ",this.props.hit.title),e.createElement("span",{className:"label label-reset pos-label"},a))},contentJSX:function(){return e.createElement("div",{className:"section-content","data-parent-hit":this.domID()},this.hitLinks(),e.createElement(f,{key:"kablammo"+this.props.query.id,query:this.props.query,hit:this.props.hit,algorithm:this.props.algorithm,showHSPCrumbs:this.numHSPs()>1&&this.numHSPs()<27,collapsed:this.props.veryBig}))},hitLinks:function(){var a=this,b=[];return this.props.imported_xml||this.props.non_parse_seqids||(b=b.concat([this.viewSequenceButton(),this.downloadFASTAButton()])),b.push(this.downloadAlignmentButton()),e.createElement("div",{className:"hit-links"},e.createElement("label",null,e.createElement("input",{type:"checkbox",id:this.domID()+"_checkbox",value:this.sequenceID(),onChange:function(){this.props.selectHit(this.domID()+"_checkbox")}.bind(this),"data-target":"#"+this.domID()})," Select"),b.map(function(b){return[e.createElement("span",{className:"line"},"|"),a.button(b)]}),this.props.hit.links.map(function(b){return[e.createElement("span",{className:"line"},"|"),a.a(b)]}))},viewSequenceButton:function(){var a=this;return this.hitLength()>1e4?{text:"Sequence",icon:"fa-eye",className:"view-sequence",title:"Sequence too long"}:{text:"Sequence",icon:"fa-eye",className:"view-sequence",onClick:function(){return a.showSequenceViewer()}}},downloadFASTAButton:function(){var a=this;return{text:"FASTA",icon:"fa-download",className:"download-fa",onClick:function(){return a.downloadFASTA()}}},downloadAlignmentButton:function(){var a=this;return{text:"Alignment",icon:"fa-download",className:"download-aln",onClick:function(){return a.downloadAlignment()}}},button:function(a){var b=a.text,c=a.icon,d=a.title,f=a.className,g=a.onClick;return g?e.createElement("button",{className:"btn-link "+f,title:d,onClick:g},e.createElement("i",{className:"fa "+c})," ",b):e.createElement("button",{className:"btn-link view-sequence disabled",title:d,disabled:"true"},e.createElement("i",{className:"fa "+c})," ",b)},a:function(a){if(a.title&&a.url){var b="btn btn-link";return a.class&&(b=b+" "+a.class),e.createElement("a",{href:a.url,className:b,target:"_blank"},a.icon&&e.createElement("i",{className:"fa "+a.icon})," "+a.title+" ")}}}))}}}),c.register("21",["1a"],function(a){var b,c;return{setters:[function(a){b=a.default}],execute:function(){c={format_2_tuple:function(a){return a[0]+" ("+a[a.length-1]+")"},inPercentage:function(a,b){var c=(100*a/b).toFixed(1);return c%1==0?(c=parseInt(c,10),c+"%"):c+"%"},inFraction:function(a,b){return a+"/"+b},inTwoDecimal:function(a){return a.toFixed(2)},inExponential:function(a){if(0===a)return 0;if(a>=1&&a<10)return this.inTwoDecimal(a);var c=a.toExponential(2),d=c.split("e"),e=d[0],f=d[1];return b.createElement("span",null,e,"×10",b.createElement("sup",null,f))}},a("default",c)}}}),c.register("20",["17"],function(a){function b(a,b){var c=d3.scale.log().domain([d3.min([1e-5,d3.min(b.map(function(a){if(0!==parseFloat(a.evalue))return a.evalue}))]),d3.max(b.map(function(a){return a.evalue}))]).range([0,.8]),d=c(a);return d3.hsl(20,.82,d)}function c(a){var b=a%26,d=a/26|0,e=b?String.fromCharCode(96+b):(--d,"z");return d?c(d)+e:e}function d(a,b){var c,d,e=a.ticks(),f=d3.formatPrefix(e[e.length-1]),h={amino_acid:"aa",nucleic_acid:"bp"},i=0;do c=d3.format("."+i+"f"),d=a.ticks().map(function(a){return c(f.scale(a))}),i++;while(d.length!==g.uniq(d).length);return function(d){return f.symbol&&d!==a.domain()[0]?c(f.scale(d))+" "+f.symbol+h[b]:d+" "+h[b]}}function e(a){var b={blastn:{query_seq_type:"nucleic_acid",subject_seq_type:"nucleic_acid"},blastp:{query_seq_type:"amino_acid",subject_seq_type:"amino_acid"},blastx:{query_seq_type:"nucleic_acid",subject_seq_type:"amino_acid"},tblastx:{query_seq_type:"nucleic_acid",subject_seq_type:"nucleic_acid"},tblastn:{query_seq_type:"amino_acid",subject_seq_type:"nucleic_acid"}};return b[a]}function f(a){var b=a.toString().split("e"),c=b[0],d=b[1];if(d){var e=parseFloat(c).toFixed(2),f="<span>"+e+" × 10<sup>"+d+"</sup></span>";return f}return c%1!=0?parseFloat(c).toFixed(2):c}var g;return a("get_colors_for_evalue",b),a("toLetters",c),a("tick_formatter",d),a("get_seq_type",e),a("prettify_evalue",f),{setters:[function(a){g=a.default}],execute:function(){}}}),c.register("2f",["17","20","21","22","23","2a","2b","1a"],function(a){var b,c,d,e,f,g,h,i,j,k;return{setters:[function(a){b=a.default},function(a){c=a},function(a){d=a.default},function(a){e=a.default},function(a){f=a.default},function(a){g=a.default},function(a){h=a.default},function(a){i=a.default}],execute:function(){j={},k=function(a){function k(a){f(this,k),g(Object.getPrototypeOf(k.prototype),"constructor",this).call(this,a),this.hsp=a.hsp}return h(k,a),e(k,[{key:"domID",value:function(){return"Query_"+this.props.query.number+"_hit_"+this.props.hit.number+"_"+this.props.hsp.number}},{key:"hitDOM_ID",value:function(){return"Query_"+this.props.query.number+"_hit_"+this.props.hit.number}},{key:"render",value:function(){return i.createElement("div",{className:"hsp",id:this.domID(),ref:"hsp","data-parent-hit":this.hitDOM_ID()},i.createElement("pre",{className:"pre-reset hsp-stats"},this.props.showHSPNumbers&&c.toLetters(this.hsp.number)+". ",this.hspStats().map(function(a,b){return i.createElement("span",{key:b},a)})),this.hspLines())}},{key:"componentDidMount",value:function(){j[this.domID()]=this,this.draw()}},{key:"draw",value:function(){var a=this.props.getCharacterWidth(),b=$(i.findDOMNode(this.refs.hsp)).width();this.chars=Math.floor((b-4)/a),this.forceUpdate()}},{key:"shouldComponentUpdate",value:function(){return!this.props.hsp}},{key:"hspStats",value:function(){var a=[];switch(a.push("Score: "+d.inTwoDecimal(this.hsp.bit_score)+" ("+this.hsp.score+"), "),a.push("E value: "),a.push(d.inExponential(this.hsp.evalue)),a.push(", "),a.push(["Identity: "+d.inFraction(this.hsp.identity,this.hsp.length)+" ("+d.inPercentage(this.hsp.identity,this.hsp.length)+"), "]),"blastp"!==this.props.algorithm&&"blastx"!==this.props.algorithm&&"tblastn"!==this.props.algorithm&&"tblastx"!==this.props.algorithm||a.push("Positives: "+d.inFraction(this.hsp.positives,this.hsp.length)+" ("+d.inPercentage(this.hsp.positives,this.hsp.length)+"), "),a.push("Gaps: "+d.inFraction(this.hsp.gaps,this.hsp.length)+" ("+d.inPercentage(this.hsp.gaps,this.hsp.length)+")"),this.props.algorithm){case"tblastx":a.push(", Frame: "+d.inFraction(this.hsp.qframe,this.hsp.sframe));break;case"blastn":a.push(", Strand: "+(this.hsp.qframe>0?"+":"-")+" / "+(this.hsp.sframe>0?"+":"-"));break;case"blastx":a.push(", Query Frame: "+this.hsp.qframe);break;case"tblastn":a.push(", Hit Frame: "+this.hsp.sframe)}return a}},{key:"hspLines",value:function(){for(var a=this.width(),b=this.chars-2*a-10,c=Math.ceil(this.hsp.length/b),d=[],e=this.nqseq(),f=this.nsseq(),g=1;g<=c;g++){var h=b*(g-1),j=h+b,k=e,l=this.hsp.qseq.slice(h,j),m=e+(l.length-l.split("-").length)*this.qframe_unit()*this.qframe_sign();e=m+this.qframe_unit()*this.qframe_sign();var n=this.hsp.midline.slice(h,j),o=f,p=this.hsp.sseq.slice(h,j),q=f+(p.length-p.split("-").length)*this.sframe_unit()*this.sframe_sign();f=q+this.sframe_unit()*this.sframe_sign(),d.push(i.createElement("pre",{key:this.hsp.number+","+g,className:"pre-reset hsp-lines"},i.createElement("span",{className:"hsp-coords"},"Query "+this.formatCoords(k,a)+" "),i.createElement("span",null,l),i.createElement("span",{className:"hsp-coords"}," "+m),i.createElement("br",null),i.createElement("span",{className:"hsp-coords"},this.formatCoords("",a+8)+" "),i.createElement("span",null,n),i.createElement("br",null),i.createElement("span",{className:"hsp-coords"},"Subject "+this.formatCoords(o,a)+" "),i.createElement("span",null,p),i.createElement("span",{className:"hsp-coords"}," "+q),i.createElement("br",null)))}return d}},{key:"width",value:function(){return b.max(b.map([this.hsp.qstart,this.hsp.qend,this.hsp.sstart,this.hsp.send],function(a){return a.toString().length}))}},{key:"nqseq",value:function(){switch(this.props.algorithm){case"blastp":case"blastx":case"tblastn":case"tblastx":return this.hsp.qframe>=0?this.hsp.qstart:this.hsp.qend;case"blastn":return this.hsp.qstart}}},{key:"nsseq",value:function(){switch(this.props.algorithm){case"blastp":case"blastx":case"tblastn":case"tblastx":return this.hsp.sframe>=0?this.hsp.sstart:this.hsp.send;case"blastn":return this.hsp.sstart}}},{key:"qframe_unit",value:function(){switch(this.props.algorithm){case"blastp":case"blastn":case"tblastn":return 1;case"blastx":case"tblastx":return 3}}},{key:"sframe_unit",value:function(){switch(this.props.algorithm){case"blastp":case"blastx":case"blastn":return 1;case"tblastn":return 3;case"tblastx":return 3}}},{key:"qframe_sign",value:function(){return this.hsp.qframe>=0?1:-1}},{key:"sframe_sign",value:function(){return this.hsp.sframe>=0?1:-1}},{key:"formatCoords",value:function(a,b){if(b){var c=b-a.toString().length;return Array(c+1).join(" ").concat([a])}}},{key:"spanCoords",value:function(a){return i.createElement("span",{className:"hsp-coords"},a)}}]),k}(i.Component),a("default",k),$(window).resize(b.debounce(function(){b.each(j,function(a){a.draw()})},100))}}}),c.registerDynamic("5",["30"],!0,function(a,b,c){var d=(this||self,a("30"));c.exports=function(a){return Object(d(a))}}),c.registerDynamic("31",["5","32"],!0,function(a,b,c){var d=(this||self,a("5"));a("32")("keys",function(a){return function(b){return a(d(b))}})}),c.registerDynamic("33",["31","a"],!0,function(a,b,c){this||self;a("31"),c.exports=a("a").Object.keys}),c.registerDynamic("2d",["33"],!0,function(a,b,c){this||self;c.exports={default:a("33"),__esModule:!0}}),c.registerDynamic("34",["35","3"],!0,function(a,b,c){var d=(this||self,{}.toString),e=a("35"),f=a("3").getNames,g="object"==typeof window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],h=function(a){try{return f(a)}catch(a){return g.slice()}};c.exports.get=function(a){return g&&"[object Window]"==d.call(a)?h(a):f(e(a))}}),c.registerDynamic("36",["32","34"],!0,function(a,b,c){this||self;a("32")("getOwnPropertyNames",function(){return a("34").get})}),c.registerDynamic("37",["3","36"],!0,function(a,b,c){var d=(this||self,a("3"));a("36"),c.exports=function(a){return d.getNames(a)}}),c.registerDynamic("38",["37"],!0,function(a,b,c){this||self;c.exports={default:a("37"),__esModule:!0}}),function(){var a=c.amdDefine;!function(a,b){"object"==typeof f&&"object"==typeof f.exports?f.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(b,c){function d(a){var b="length"in a&&a.length,c=aa.type(a);return"function"!==c&&!aa.isWindow(a)&&(!(1!==a.nodeType||!b)||("array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a))}function e(a,b,c){if(aa.isFunction(b))return aa.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return aa.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(ia.test(b))return aa.filter(b,a,c);b=aa.filter(b,a)}return aa.grep(a,function(a){return V.call(b,a)>=0!==c})}function f(a,b){for(;(a=a[b])&&1!==a.nodeType;);return a}function g(a){var b=pa[a]={};return aa.each(a.match(oa)||[],function(a,c){b[c]=!0}),b}function h(){$.removeEventListener("DOMContentLoaded",h,!1),b.removeEventListener("load",h,!1),aa.ready()}function i(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=aa.expando+i.uid++}function j(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(va,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c||"false"!==c&&("null"===c?null:+c+""===c?+c:ua.test(c)?aa.parseJSON(c):c)}catch(a){}ta.set(a,b,c)}else c=void 0;return c}function k(){return!0}function l(){return!1}function m(){try{return $.activeElement}catch(a){}}function n(a,b){return aa.nodeName(a,"table")&&aa.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function o(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function p(a){var b=La.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function q(a,b){for(var c=0,d=a.length;c<d;c++)sa.set(a[c],"globalEval",!b||sa.get(b[c],"globalEval"))}function r(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(sa.hasData(a)&&(f=sa.access(a),g=sa.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;c<d;c++)aa.event.add(b,e,j[e][c])}ta.hasData(a)&&(h=ta.access(a),i=aa.extend({},h),ta.set(b,i))}}function s(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&aa.nodeName(a,b)?aa.merge([a],c):c}function t(a,b){var c=b.nodeName.toLowerCase();"input"===c&&za.test(a.type)?b.checked=a.checked:"input"!==c&&"textarea"!==c||(b.defaultValue=a.defaultValue)}function u(a,c){var d,e=aa(c.createElement(a)).appendTo(c.body),f=b.getDefaultComputedStyle&&(d=b.getDefaultComputedStyle(e[0]))?d.display:aa.css(e[0],"display");return e.detach(),f}function v(a){var b=$,c=Pa[a];return c||(c=u(a,b),"none"!==c&&c||(Oa=(Oa||aa("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=Oa[0].contentDocument,b.write(),b.close(),c=u(a,b),Oa.detach()),Pa[a]=c),c}function w(a,b,c){var d,e,f,g,h=a.style;return c=c||Sa(a),c&&(g=c.getPropertyValue(b)||c[b]),c&&(""!==g||aa.contains(a.ownerDocument,a)||(g=aa.style(a,b)),Ra.test(g)&&Qa.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function x(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}function y(a,b){if(b in a)return b;for(var c=b[0].toUpperCase()+b.slice(1),d=b,e=Ya.length;e--;)if(b=Ya[e]+c,b in a)return b;return d}function z(a,b,c){var d=Ua.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function A(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;f<4;f+=2)"margin"===c&&(g+=aa.css(a,c+xa[f],!0,e)),d?("content"===c&&(g-=aa.css(a,"padding"+xa[f],!0,e)),"margin"!==c&&(g-=aa.css(a,"border"+xa[f]+"Width",!0,e))):(g+=aa.css(a,"padding"+xa[f],!0,e),"padding"!==c&&(g+=aa.css(a,"border"+xa[f]+"Width",!0,e)));return g}function B(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Sa(a),g="border-box"===aa.css(a,"boxSizing",!1,f);if(e<=0||null==e){if(e=w(a,b,f),(e<0||null==e)&&(e=a.style[b]),Ra.test(e))return e;d=g&&(Z.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+A(a,b,c||(g?"border":"content"),d,f)+"px"}function C(a,b){for(var c,d,e,f=[],g=0,h=a.length;g<h;g++)d=a[g],d.style&&(f[g]=sa.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&ya(d)&&(f[g]=sa.access(d,"olddisplay",v(d.nodeName)))):(e=ya(d),"none"===c&&e||sa.set(d,"olddisplay",e?c:aa.css(d,"display"))));for(g=0;g<h;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function D(a,b,c,d,e){return new D.prototype.init(a,b,c,d,e)}function E(){return setTimeout(function(){Za=void 0}),Za=aa.now()}function F(a,b){var c,d=0,e={height:a};for(b=b?1:0;d<4;d+=2-b)c=xa[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function G(a,b,c){for(var d,e=(db[b]||[]).concat(db["*"]),f=0,g=e.length;f<g;f++)if(d=e[f].call(c,b,a))return d}function H(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},n=a.style,o=a.nodeType&&ya(a),p=sa.get(a,"fxshow");c.queue||(h=aa._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,aa.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[n.overflow,n.overflowX,n.overflowY],j=aa.css(a,"display"),k="none"===j?sa.get(a,"olddisplay")||v(a.nodeName):j,"inline"===k&&"none"===aa.css(a,"float")&&(n.display="inline-block")),c.overflow&&(n.overflow="hidden",l.always(function(){n.overflow=c.overflow[0],n.overflowX=c.overflow[1],n.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],_a.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(o?"hide":"show")){if("show"!==e||!p||void 0===p[d])continue;o=!0}m[d]=p&&p[d]||aa.style(a,d)}else j=void 0;if(aa.isEmptyObject(m))"inline"===("none"===j?v(a.nodeName):j)&&(n.display=j);else{p?"hidden"in p&&(o=p.hidden):p=sa.access(a,"fxshow",{}),f&&(p.hidden=!o),o?aa(a).show():l.done(function(){aa(a).hide()}),l.done(function(){var b;sa.remove(a,"fxshow");for(b in m)aa.style(a,b,m[b])});for(d in m)g=G(o?p[d]:0,d,l),d in p||(p[d]=g.start,o&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function I(a,b){var c,d,e,f,g;for(c in a)if(d=aa.camelCase(c),e=b[d],f=a[c],aa.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=aa.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function J(a,b,c){var d,e,f=0,g=cb.length,h=aa.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Za||E(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;g<i;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),f<1&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:aa.extend({},b),opts:aa.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:Za||E(),duration:c.duration,tweens:[],createTween:function(b,c){var d=aa.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;c<d;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(I(k,j.opts.specialEasing);f<g;f++)if(d=cb[f].call(j,a,k,j.opts))return d;return aa.map(k,G,j),aa.isFunction(j.opts.start)&&j.opts.start.call(a,j),aa.fx.timer(aa.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}function K(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(oa)||[];if(aa.isFunction(c))for(;d=f[e++];)"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function L(a,b,c,d){function e(h){var i;return f[h]=!0,aa.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||g||f[j]?g?!(i=j):void 0:(b.dataTypes.unshift(j),e(j),!1)}),i}var f={},g=a===ub;
|
11
|
+
return e(b.dataTypes[0])||!f["*"]&&e("*")}function M(a,b){var c,d,e=aa.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&aa.extend(!0,a,d),a}function N(a,b,c){for(var d,e,f,g,h=a.contents,i=a.dataTypes;"*"===i[0];)i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}if(f)return f!==i[0]&&i.unshift(f),c[f]}function O(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];for(f=k.shift();f;)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a.throws)b=g(b);else try{b=g(b)}catch(a){return{state:"parsererror",error:g?a:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}function P(a,b,c,d){var e;if(aa.isArray(b))aa.each(b,function(b,e){c||zb.test(a)?d(a,e):P(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==aa.type(b))d(a,b);else for(e in b)P(a+"["+e+"]",b[e],c,d)}function Q(a){return aa.isWindow(a)?a:9===a.nodeType&&a.defaultView}var R=[],S=R.slice,T=R.concat,U=R.push,V=R.indexOf,W={},X=W.toString,Y=W.hasOwnProperty,Z={},$=b.document,_="2.1.4",aa=function(a,b){return new aa.fn.init(a,b)},ba=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ca=/^-ms-/,da=/-([\da-z])/gi,ea=function(a,b){return b.toUpperCase()};aa.fn=aa.prototype={jquery:_,constructor:aa,selector:"",length:0,toArray:function(){return S.call(this)},get:function(a){return null!=a?a<0?this[a+this.length]:this[a]:S.call(this)},pushStack:function(a){var b=aa.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return aa.each(this,a,b)},map:function(a){return this.pushStack(aa.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(S.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(a<0?b:0);return this.pushStack(c>=0&&c<b?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:U,sort:R.sort,splice:R.splice},aa.extend=aa.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||aa.isFunction(g)||(g={}),h===i&&(g=this,h--);h<i;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(aa.isPlainObject(d)||(e=aa.isArray(d)))?(e?(e=!1,f=c&&aa.isArray(c)?c:[]):f=c&&aa.isPlainObject(c)?c:{},g[b]=aa.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},aa.extend({expando:"jQuery"+(_+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===aa.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!aa.isArray(a)&&a-parseFloat(a)+1>=0},isPlainObject:function(a){return"object"===aa.type(a)&&!a.nodeType&&!aa.isWindow(a)&&!(a.constructor&&!Y.call(a.constructor.prototype,"isPrototypeOf"))},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?W[X.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=aa.trim(a),a&&(1===a.indexOf("use strict")?(b=$.createElement("script"),b.text=a,$.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(ca,"ms-").replace(da,ea)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var e,f=0,g=a.length,h=d(a);if(c){if(h)for(;f<g&&(e=b.apply(a[f],c),e!==!1);f++);else for(f in a)if(e=b.apply(a[f],c),e===!1)break}else if(h)for(;f<g&&(e=b.call(a[f],f,a[f]),e!==!1);f++);else for(f in a)if(e=b.call(a[f],f,a[f]),e===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(ba,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(d(Object(a))?aa.merge(c,"string"==typeof a?[a]:a):U.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:V.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;d<c;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;f<g;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var e,f=0,g=a.length,h=d(a),i=[];if(h)for(;f<g;f++)e=b(a[f],f,c),null!=e&&i.push(e);else for(f in a)e=b(a[f],f,c),null!=e&&i.push(e);return T.apply([],i)},guid:1,proxy:function(a,b){var c,d,e;if("string"==typeof b&&(c=a[b],b=a,a=c),aa.isFunction(a))return d=S.call(arguments,2),e=function(){return a.apply(b||this,d.concat(S.call(arguments)))},e.guid=a.guid=a.guid||aa.guid++,e},now:Date.now,support:Z}),aa.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){W["[object "+b+"]"]=b.toLowerCase()});var fa=function(a){function b(a,b,c,d){var e,f,g,h,i,j,l,n,o,p;if((b?b.ownerDocument||b:O)!==G&&F(b),b=b||G,c=c||[],h=b.nodeType,"string"!=typeof a||!a||1!==h&&9!==h&&11!==h)return c;if(!d&&I){if(11!==h&&(e=sa.exec(a)))if(g=e[1]){if(9===h){if(f=b.getElementById(g),!f||!f.parentNode)return c;if(f.id===g)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(g))&&M(b,f)&&f.id===g)return c.push(f),c}else{if(e[2])return $.apply(c,b.getElementsByTagName(a)),c;if((g=e[3])&&v.getElementsByClassName)return $.apply(c,b.getElementsByClassName(g)),c}if(v.qsa&&(!J||!J.test(a))){if(n=l=N,o=b,p=1!==h&&a,1===h&&"object"!==b.nodeName.toLowerCase()){for(j=z(a),(l=b.getAttribute("id"))?n=l.replace(ua,"\\$&"):b.setAttribute("id",n),n="[id='"+n+"'] ",i=j.length;i--;)j[i]=n+m(j[i]);o=ta.test(a)&&k(b.parentNode)||b,p=j.join(",")}if(p)try{return $.apply(c,o.querySelectorAll(p)),c}catch(a){}finally{l||b.removeAttribute("id")}}}return B(a.replace(ia,"$1"),b,c,d)}function c(){function a(c,d){return b.push(c+" ")>w.cacheLength&&delete a[b.shift()],a[c+" "]=d}var b=[];return a}function d(a){return a[N]=!0,a}function e(a){var b=G.createElement("div");try{return!!a(b)}catch(a){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function f(a,b){for(var c=a.split("|"),d=a.length;d--;)w.attrHandle[c[d]]=b}function g(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||V)-(~a.sourceIndex||V);if(d)return d;if(c)for(;c=c.nextSibling;)if(c===b)return-1;return a?1:-1}function h(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function i(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function j(a){return d(function(b){return b=+b,d(function(c,d){for(var e,f=a([],c.length,b),g=f.length;g--;)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function k(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}function l(){}function m(a){for(var b=0,c=a.length,d="";b<c;b++)d+=a[b].value;return d}function n(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=Q++;return b.first?function(b,c,f){for(;b=b[d];)if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[P,f];if(g){for(;b=b[d];)if((1===b.nodeType||e)&&a(b,c,g))return!0}else for(;b=b[d];)if(1===b.nodeType||e){if(i=b[N]||(b[N]={}),(h=i[d])&&h[0]===P&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function o(a){return a.length>1?function(b,c,d){for(var e=a.length;e--;)if(!a[e](b,c,d))return!1;return!0}:a[0]}function p(a,c,d){for(var e=0,f=c.length;e<f;e++)b(a,c[e],d);return d}function q(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;h<i;h++)(f=a[h])&&(c&&!c(f,d,e)||(g.push(f),j&&b.push(h)));return g}function r(a,b,c,e,f,g){return e&&!e[N]&&(e=r(e)),f&&!f[N]&&(f=r(f,g)),d(function(d,g,h,i){var j,k,l,m=[],n=[],o=g.length,r=d||p(b||"*",h.nodeType?[h]:h,[]),s=!a||!d&&b?r:q(r,m,a,h,i),t=c?f||(d?a:o||e)?[]:g:s;if(c&&c(s,t,h,i),e)for(j=q(t,n),e(j,[],h,i),k=j.length;k--;)(l=j[k])&&(t[n[k]]=!(s[n[k]]=l));if(d){if(f||a){if(f){for(j=[],k=t.length;k--;)(l=t[k])&&j.push(s[k]=l);f(null,t=[],j,i)}for(k=t.length;k--;)(l=t[k])&&(j=f?aa(d,l):m[k])>-1&&(d[j]=!(g[j]=l))}}else t=q(t===g?t.splice(o,t.length):t),f?f(null,g,t,i):$.apply(g,t)})}function s(a){for(var b,c,d,e=a.length,f=w.relative[a[0].type],g=f||w.relative[" "],h=f?1:0,i=n(function(a){return a===b},g,!0),j=n(function(a){return aa(b,a)>-1},g,!0),k=[function(a,c,d){var e=!f&&(d||c!==C)||((b=c).nodeType?i(a,c,d):j(a,c,d));return b=null,e}];h<e;h++)if(c=w.relative[a[h].type])k=[n(o(k),c)];else{if(c=w.filter[a[h].type].apply(null,a[h].matches),c[N]){for(d=++h;d<e&&!w.relative[a[d].type];d++);return r(h>1&&o(k),h>1&&m(a.slice(0,h-1).concat({value:" "===a[h-2].type?"*":""})).replace(ia,"$1"),c,h<d&&s(a.slice(h,d)),d<e&&s(a=a.slice(d)),d<e&&m(a))}k.push(c)}return o(k)}function t(a,c){var e=c.length>0,f=a.length>0,g=function(d,g,h,i,j){var k,l,m,n=0,o="0",p=d&&[],r=[],s=C,t=d||f&&w.find.TAG("*",j),u=P+=null==s?1:Math.random()||.1,v=t.length;for(j&&(C=g!==G&&g);o!==v&&null!=(k=t[o]);o++){if(f&&k){for(l=0;m=a[l++];)if(m(k,g,h)){i.push(k);break}j&&(P=u)}e&&((k=!m&&k)&&n--,d&&p.push(k))}if(n+=o,e&&o!==n){for(l=0;m=c[l++];)m(p,r,g,h);if(d){if(n>0)for(;o--;)p[o]||r[o]||(r[o]=Y.call(i));r=q(r)}$.apply(i,r),j&&!d&&r.length>0&&n+c.length>1&&b.uniqueSort(i)}return j&&(P=u,C=s),p};return e?d(g):g}var u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N="sizzle"+1*new Date,O=a.document,P=0,Q=0,R=c(),S=c(),T=c(),U=function(a,b){return a===b&&(E=!0),0},V=1<<31,W={}.hasOwnProperty,X=[],Y=X.pop,Z=X.push,$=X.push,_=X.slice,aa=function(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1},ba="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ca="[\\x20\\t\\r\\n\\f]",da="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",ea=da.replace("w","w#"),fa="\\["+ca+"*("+da+")(?:"+ca+"*([*^$|!~]?=)"+ca+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+ea+"))|)"+ca+"*\\]",ga=":("+da+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+fa+")*)|.*)\\)|)",ha=new RegExp(ca+"+","g"),ia=new RegExp("^"+ca+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ca+"+$","g"),ja=new RegExp("^"+ca+"*,"+ca+"*"),ka=new RegExp("^"+ca+"*([>+~]|"+ca+")"+ca+"*"),la=new RegExp("="+ca+"*([^\\]'\"]*?)"+ca+"*\\]","g"),ma=new RegExp(ga),na=new RegExp("^"+ea+"$"),oa={ID:new RegExp("^#("+da+")"),CLASS:new RegExp("^\\.("+da+")"),TAG:new RegExp("^("+da.replace("w","w*")+")"),ATTR:new RegExp("^"+fa),PSEUDO:new RegExp("^"+ga),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ca+"*(even|odd|(([+-]|)(\\d*)n|)"+ca+"*(?:([+-]|)"+ca+"*(\\d+)|))"+ca+"*\\)|)","i"),bool:new RegExp("^(?:"+ba+")$","i"),needsContext:new RegExp("^"+ca+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ca+"*((?:-\\d)?\\d*)"+ca+"*\\)|)(?=[^-]|$)","i")},pa=/^(?:input|select|textarea|button)$/i,qa=/^h\d$/i,ra=/^[^{]+\{\s*\[native \w/,sa=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ta=/[+~]/,ua=/'|\\/g,va=new RegExp("\\\\([\\da-f]{1,6}"+ca+"?|("+ca+")|.)","ig"),wa=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:d<0?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},xa=function(){F()};try{$.apply(X=_.call(O.childNodes),O.childNodes),X[O.childNodes.length].nodeType}catch(a){$={apply:X.length?function(a,b){Z.apply(a,_.call(b))}:function(a,b){for(var c=a.length,d=0;a[c++]=b[d++];);a.length=c-1}}}v=b.support={},y=b.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return!!b&&"HTML"!==b.nodeName},F=b.setDocument=function(a){var b,c,d=a?a.ownerDocument||a:O;return d!==G&&9===d.nodeType&&d.documentElement?(G=d,H=d.documentElement,c=d.defaultView,c&&c!==c.top&&(c.addEventListener?c.addEventListener("unload",xa,!1):c.attachEvent&&c.attachEvent("onunload",xa)),I=!y(d),v.attributes=e(function(a){return a.className="i",!a.getAttribute("className")}),v.getElementsByTagName=e(function(a){return a.appendChild(d.createComment("")),!a.getElementsByTagName("*").length}),v.getElementsByClassName=ra.test(d.getElementsByClassName),v.getById=e(function(a){return H.appendChild(a).id=N,!d.getElementsByName||!d.getElementsByName(N).length}),v.getById?(w.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&I){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},w.filter.ID=function(a){var b=a.replace(va,wa);return function(a){return a.getAttribute("id")===b}}):(delete w.find.ID,w.filter.ID=function(a){var b=a.replace(va,wa);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),w.find.TAG=v.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):v.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){for(;c=f[e++];)1===c.nodeType&&d.push(c);return d}return f},w.find.CLASS=v.getElementsByClassName&&function(a,b){if(I)return b.getElementsByClassName(a)},K=[],J=[],(v.qsa=ra.test(d.querySelectorAll))&&(e(function(a){H.appendChild(a).innerHTML="<a id='"+N+"'></a><select id='"+N+"-\f]' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&J.push("[*^$]="+ca+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||J.push("\\["+ca+"*(?:value|"+ba+")"),a.querySelectorAll("[id~="+N+"-]").length||J.push("~="),a.querySelectorAll(":checked").length||J.push(":checked"),a.querySelectorAll("a#"+N+"+*").length||J.push(".#.+[+~]")}),e(function(a){var b=d.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&J.push("name"+ca+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||J.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),J.push(",.*:")})),(v.matchesSelector=ra.test(L=H.matches||H.webkitMatchesSelector||H.mozMatchesSelector||H.oMatchesSelector||H.msMatchesSelector))&&e(function(a){v.disconnectedMatch=L.call(a,"div"),L.call(a,"[s!='']:x"),K.push("!=",ga)}),J=J.length&&new RegExp(J.join("|")),K=K.length&&new RegExp(K.join("|")),b=ra.test(H.compareDocumentPosition),M=b||ra.test(H.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)for(;b=b.parentNode;)if(b===a)return!0;return!1},U=b?function(a,b){if(a===b)return E=!0,0;var c=!a.compareDocumentPosition-!b.compareDocumentPosition;return c?c:(c=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&c||!v.sortDetached&&b.compareDocumentPosition(a)===c?a===d||a.ownerDocument===O&&M(O,a)?-1:b===d||b.ownerDocument===O&&M(O,b)?1:D?aa(D,a)-aa(D,b):0:4&c?-1:1)}:function(a,b){if(a===b)return E=!0,0;var c,e=0,f=a.parentNode,h=b.parentNode,i=[a],j=[b];if(!f||!h)return a===d?-1:b===d?1:f?-1:h?1:D?aa(D,a)-aa(D,b):0;if(f===h)return g(a,b);for(c=a;c=c.parentNode;)i.unshift(c);for(c=b;c=c.parentNode;)j.unshift(c);for(;i[e]===j[e];)e++;return e?g(i[e],j[e]):i[e]===O?-1:j[e]===O?1:0},d):G},b.matches=function(a,c){return b(a,null,null,c)},b.matchesSelector=function(a,c){if((a.ownerDocument||a)!==G&&F(a),c=c.replace(la,"='$1']"),v.matchesSelector&&I&&(!K||!K.test(c))&&(!J||!J.test(c)))try{var d=L.call(a,c);if(d||v.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(a){}return b(c,G,null,[a]).length>0},b.contains=function(a,b){return(a.ownerDocument||a)!==G&&F(a),M(a,b)},b.attr=function(a,b){(a.ownerDocument||a)!==G&&F(a);var c=w.attrHandle[b.toLowerCase()],d=c&&W.call(w.attrHandle,b.toLowerCase())?c(a,b,!I):void 0;return void 0!==d?d:v.attributes||!I?a.getAttribute(b):(d=a.getAttributeNode(b))&&d.specified?d.value:null},b.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},b.uniqueSort=function(a){var b,c=[],d=0,e=0;if(E=!v.detectDuplicates,D=!v.sortStable&&a.slice(0),a.sort(U),E){for(;b=a[e++];)b===a[e]&&(d=c.push(e));for(;d--;)a.splice(c[d],1)}return D=null,a},x=b.getText=function(a){var b,c="",d=0,e=a.nodeType;if(e){if(1===e||9===e||11===e){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=x(a)}else if(3===e||4===e)return a.nodeValue}else for(;b=a[d++];)c+=x(b);return c},w=b.selectors={cacheLength:50,createPseudo:d,match:oa,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(va,wa),a[3]=(a[3]||a[4]||a[5]||"").replace(va,wa),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||b.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&b.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return oa.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&ma.test(c)&&(b=z(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(va,wa).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=R[a+" "];return b||(b=new RegExp("(^|"+ca+")"+a+"("+ca+"|$)"))&&R(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,c,d){return function(e){var f=b.attr(e,a);return null==f?"!="===c:!c||(f+="","="===c?f===d:"!="===c?f!==d:"^="===c?d&&0===f.indexOf(d):"*="===c?d&&f.indexOf(d)>-1:"$="===c?d&&f.slice(-d.length)===d:"~="===c?(" "+f.replace(ha," ")+" ").indexOf(d)>-1:"|="===c&&(f===d||f.slice(0,d.length+1)===d+"-"))}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){for(;p;){for(l=b;l=l[p];)if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){for(k=q[N]||(q[N]={}),j=k[a]||[],n=j[0]===P&&j[1],m=j[0]===P&&j[2],l=n&&q.childNodes[n];l=++n&&l&&l[p]||(m=n=0)||o.pop();)if(1===l.nodeType&&++m&&l===b){k[a]=[P,n,m];break}}else if(s&&(j=(b[N]||(b[N]={}))[a])&&j[0]===P)m=j[1];else for(;(l=++n&&l&&l[p]||(m=n=0)||o.pop())&&((h?l.nodeName.toLowerCase()!==r:1!==l.nodeType)||!++m||(s&&((l[N]||(l[N]={}))[a]=[P,m]),l!==b)););return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,c){var e,f=w.pseudos[a]||w.setFilters[a.toLowerCase()]||b.error("unsupported pseudo: "+a);return f[N]?f(c):f.length>1?(e=[a,a,"",c],w.setFilters.hasOwnProperty(a.toLowerCase())?d(function(a,b){for(var d,e=f(a,c),g=e.length;g--;)d=aa(a,e[g]),a[d]=!(b[d]=e[g])}):function(a){return f(a,0,e)}):f}},pseudos:{not:d(function(a){var b=[],c=[],e=A(a.replace(ia,"$1"));return e[N]?d(function(a,b,c,d){for(var f,g=e(a,null,d,[]),h=a.length;h--;)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,d,f){return b[0]=a,e(b,null,f,c),b[0]=null,!c.pop()}}),has:d(function(a){return function(c){return b(a,c).length>0}}),contains:d(function(a){return a=a.replace(va,wa),function(b){return(b.textContent||b.innerText||x(b)).indexOf(a)>-1}}),lang:d(function(a){return na.test(a||"")||b.error("unsupported lang: "+a),a=a.replace(va,wa).toLowerCase(),function(b){var c;do if(c=I?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===H},focus:function(a){return a===G.activeElement&&(!G.hasFocus||G.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!w.pseudos.empty(a)},header:function(a){return qa.test(a.nodeName)},input:function(a){return pa.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:j(function(){return[0]}),last:j(function(a,b){return[b-1]}),eq:j(function(a,b,c){return[c<0?c+b:c]}),even:j(function(a,b){for(var c=0;c<b;c+=2)a.push(c);return a}),odd:j(function(a,b){for(var c=1;c<b;c+=2)a.push(c);return a}),lt:j(function(a,b,c){for(var d=c<0?c+b:c;--d>=0;)a.push(d);return a}),gt:j(function(a,b,c){for(var d=c<0?c+b:c;++d<b;)a.push(d);return a})}},w.pseudos.nth=w.pseudos.eq;for(u in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})w.pseudos[u]=h(u);for(u in{submit:!0,reset:!0})w.pseudos[u]=i(u);return l.prototype=w.filters=w.pseudos,w.setFilters=new l,z=b.tokenize=function(a,c){var d,e,f,g,h,i,j,k=S[a+" "];if(k)return c?0:k.slice(0);for(h=a,i=[],j=w.preFilter;h;){d&&!(e=ja.exec(h))||(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),d=!1,(e=ka.exec(h))&&(d=e.shift(),f.push({value:d,type:e[0].replace(ia," ")}),h=h.slice(d.length));for(g in w.filter)!(e=oa[g].exec(h))||j[g]&&!(e=j[g](e))||(d=e.shift(),f.push({value:d,type:g,matches:e}),h=h.slice(d.length));if(!d)break}return c?h.length:h?b.error(a):S(a,i).slice(0)},A=b.compile=function(a,b){var c,d=[],e=[],f=T[a+" "];if(!f){for(b||(b=z(a)),c=b.length;c--;)f=s(b[c]),f[N]?d.push(f):e.push(f);f=T(a,t(e,d)),f.selector=a}return f},B=b.select=function(a,b,c,d){var e,f,g,h,i,j="function"==typeof a&&a,l=!d&&z(a=j.selector||a);if(c=c||[],1===l.length){if(f=l[0]=l[0].slice(0),f.length>2&&"ID"===(g=f[0]).type&&v.getById&&9===b.nodeType&&I&&w.relative[f[1].type]){if(b=(w.find.ID(g.matches[0].replace(va,wa),b)||[])[0],!b)return c;j&&(b=b.parentNode),a=a.slice(f.shift().value.length)}for(e=oa.needsContext.test(a)?0:f.length;e--&&(g=f[e],!w.relative[h=g.type]);)if((i=w.find[h])&&(d=i(g.matches[0].replace(va,wa),ta.test(f[0].type)&&k(b.parentNode)||b))){if(f.splice(e,1),a=d.length&&m(f),!a)return $.apply(c,d),c;break}}return(j||A(a,l))(d,b,!I,c,ta.test(a)&&k(b.parentNode)||b),c},v.sortStable=N.split("").sort(U).join("")===N,v.detectDuplicates=!!E,F(),v.sortDetached=e(function(a){return 1&a.compareDocumentPosition(G.createElement("div"))}),e(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||f("type|href|height|width",function(a,b,c){if(!c)return a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),v.attributes&&e(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||f("value",function(a,b,c){if(!c&&"input"===a.nodeName.toLowerCase())return a.defaultValue}),e(function(a){return null==a.getAttribute("disabled")})||f(ba,function(a,b,c){var d;if(!c)return a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),b}(b);aa.find=fa,aa.expr=fa.selectors,aa.expr[":"]=aa.expr.pseudos,aa.unique=fa.uniqueSort,aa.text=fa.getText,aa.isXMLDoc=fa.isXML,aa.contains=fa.contains;var ga=aa.expr.match.needsContext,ha=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,ia=/^.[^:#\[\.,]*$/;aa.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?aa.find.matchesSelector(d,a)?[d]:[]:aa.find.matches(a,aa.grep(b,function(a){return 1===a.nodeType}))},aa.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(aa(a).filter(function(){for(b=0;b<c;b++)if(aa.contains(e[b],this))return!0}));for(b=0;b<c;b++)aa.find(a,e[b],d);return d=this.pushStack(c>1?aa.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(e(this,a||[],!1))},not:function(a){return this.pushStack(e(this,a||[],!0))},is:function(a){return!!e(this,"string"==typeof a&&ga.test(a)?aa(a):a||[],!1).length}});var ja,ka=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,la=aa.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:ka.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||ja).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof aa?b[0]:b,aa.merge(this,aa.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:$,!0)),ha.test(c[1])&&aa.isPlainObject(b))for(c in b)aa.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=$.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=$,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):aa.isFunction(a)?"undefined"!=typeof ja.ready?ja.ready(a):a(aa):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),aa.makeArray(a,this))};la.prototype=aa.fn,ja=aa($);var ma=/^(?:parents|prev(?:Until|All))/,na={children:!0,contents:!0,next:!0,prev:!0};aa.extend({dir:function(a,b,c){for(var d=[],e=void 0!==c;(a=a[b])&&9!==a.nodeType;)if(1===a.nodeType){if(e&&aa(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),aa.fn.extend({has:function(a){var b=aa(a,this),c=b.length;return this.filter(function(){for(var a=0;a<c;a++)if(aa.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=ga.test(a)||"string"!=typeof a?aa(a,b||this.context):0;d<e;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&aa.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?aa.unique(f):f)},index:function(a){return a?"string"==typeof a?V.call(aa(a),this[0]):V.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(aa.unique(aa.merge(this.get(),aa(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}}),aa.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return aa.dir(a,"parentNode")},parentsUntil:function(a,b,c){return aa.dir(a,"parentNode",c)},next:function(a){return f(a,"nextSibling")},prev:function(a){return f(a,"previousSibling")},nextAll:function(a){return aa.dir(a,"nextSibling")},prevAll:function(a){return aa.dir(a,"previousSibling")},nextUntil:function(a,b,c){return aa.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return aa.dir(a,"previousSibling",c)},siblings:function(a){return aa.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return aa.sibling(a.firstChild)},contents:function(a){return a.contentDocument||aa.merge([],a.childNodes)}},function(a,b){aa.fn[a]=function(c,d){var e=aa.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=aa.filter(d,e)),this.length>1&&(na[a]||aa.unique(e),ma.test(a)&&e.reverse()),this.pushStack(e)}});var oa=/\S+/g,pa={};aa.Callbacks=function(a){a="string"==typeof a?pa[a]||g(a):aa.extend({},a);var b,c,d,e,f,h,i=[],j=!a.once&&[],k=function(g){for(b=a.memory&&g,c=!0,h=e||0,e=0,f=i.length,d=!0;i&&h<f;h++)if(i[h].apply(g[0],g[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,i&&(j?j.length&&k(j.shift()):b?i=[]:l.disable())},l={add:function(){if(i){var c=i.length;!function b(c){aa.each(c,function(c,d){var e=aa.type(d);"function"===e?a.unique&&l.has(d)||i.push(d):d&&d.length&&"string"!==e&&b(d)})}(arguments),d?f=i.length:b&&(e=c,k(b))}return this},remove:function(){return i&&aa.each(arguments,function(a,b){for(var c;(c=aa.inArray(b,i,c))>-1;)i.splice(c,1),d&&(c<=f&&f--,c<=h&&h--)}),this},has:function(a){return a?aa.inArray(a,i)>-1:!(!i||!i.length)},empty:function(){return i=[],f=0,this},disable:function(){return i=j=b=void 0,this},disabled:function(){return!i},lock:function(){return j=void 0,b||l.disable(),this},locked:function(){return!j},fireWith:function(a,b){return!i||c&&!j||(b=b||[],b=[a,b.slice?b.slice():b],d?j.push(b):k(b)),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!c}};return l},aa.extend({Deferred:function(a){var b=[["resolve","done",aa.Callbacks("once memory"),"resolved"],["reject","fail",aa.Callbacks("once memory"),"rejected"],["notify","progress",aa.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return aa.Deferred(function(c){aa.each(b,function(b,f){var g=aa.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&aa.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?aa.extend(a,d):d}},e={};return d.pipe=d.then,aa.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b,c,d,e=0,f=S.call(arguments),g=f.length,h=1!==g||a&&aa.isFunction(a.promise)?g:0,i=1===h?a:aa.Deferred(),j=function(a,c,d){return function(e){c[a]=this,d[a]=arguments.length>1?S.call(arguments):e,d===b?i.notifyWith(c,d):--h||i.resolveWith(c,d)}};if(g>1)for(b=new Array(g),c=new Array(g),d=new Array(g);e<g;e++)f[e]&&aa.isFunction(f[e].promise)?f[e].promise().done(j(e,d,f)).fail(i.reject).progress(j(e,c,b)):--h;return h||i.resolveWith(d,f),i.promise()}});var qa;aa.fn.ready=function(a){return aa.ready.promise().done(a),this},aa.extend({isReady:!1,readyWait:1,holdReady:function(a){a?aa.readyWait++:aa.ready(!0)},ready:function(a){(a===!0?--aa.readyWait:aa.isReady)||(aa.isReady=!0,a!==!0&&--aa.readyWait>0||(qa.resolveWith($,[aa]),aa.fn.triggerHandler&&(aa($).triggerHandler("ready"),aa($).off("ready"))))}}),aa.ready.promise=function(a){return qa||(qa=aa.Deferred(),"complete"===$.readyState?setTimeout(aa.ready):($.addEventListener("DOMContentLoaded",h,!1),b.addEventListener("load",h,!1))),qa.promise(a)},aa.ready.promise();var ra=aa.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===aa.type(c)){e=!0;for(h in c)aa.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,aa.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(aa(a),c)})),b))for(;h<i;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};aa.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType},i.uid=1,i.accepts=aa.acceptData,i.prototype={key:function(a){if(!i.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=i.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,aa.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(aa.isEmptyObject(f))aa.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,aa.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{aa.isArray(b)?d=b.concat(b.map(aa.camelCase)):(e=aa.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(oa)||[])),c=d.length;for(;c--;)delete g[d[c]]}},hasData:function(a){return!aa.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]];
|
12
|
+
}};var sa=new i,ta=new i,ua=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,va=/([A-Z])/g;aa.extend({hasData:function(a){return ta.hasData(a)||sa.hasData(a)},data:function(a,b,c){return ta.access(a,b,c)},removeData:function(a,b){ta.remove(a,b)},_data:function(a,b,c){return sa.access(a,b,c)},_removeData:function(a,b){sa.remove(a,b)}}),aa.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=ta.get(f),1===f.nodeType&&!sa.get(f,"hasDataAttrs"))){for(c=g.length;c--;)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=aa.camelCase(d.slice(5)),j(f,d,e[d])));sa.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){ta.set(this,a)}):ra(this,function(b){var c,d=aa.camelCase(a);if(f&&void 0===b){if(c=ta.get(f,a),void 0!==c)return c;if(c=ta.get(f,d),void 0!==c)return c;if(c=j(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=ta.get(this,d);ta.set(this,d,b),a.indexOf("-")!==-1&&void 0!==c&&ta.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){ta.remove(this,a)})}}),aa.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=sa.get(a,b),c&&(!d||aa.isArray(c)?d=sa.access(a,b,aa.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=aa.queue(a,b),d=c.length,e=c.shift(),f=aa._queueHooks(a,b),g=function(){aa.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return sa.get(a,c)||sa.access(a,c,{empty:aa.Callbacks("once memory").add(function(){sa.remove(a,[b+"queue",c])})})}}),aa.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?aa.queue(this[0],a):void 0===b?this:this.each(function(){var c=aa.queue(this,a,b);aa._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&aa.dequeue(this,a)})},dequeue:function(a){return this.each(function(){aa.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=aa.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};for("string"!=typeof a&&(b=a,a=void 0),a=a||"fx";g--;)c=sa.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var wa=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,xa=["Top","Right","Bottom","Left"],ya=function(a,b){return a=b||a,"none"===aa.css(a,"display")||!aa.contains(a.ownerDocument,a)},za=/^(?:checkbox|radio)$/i;!function(){var a=$.createDocumentFragment(),b=a.appendChild($.createElement("div")),c=$.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),Z.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",Z.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var Aa="undefined";Z.focusinBubbles="onfocusin"in b;var Ba=/^key/,Ca=/^(?:mouse|pointer|contextmenu)|click/,Da=/^(?:focusinfocus|focusoutblur)$/,Ea=/^([^.]*)(?:\.(.+)|)$/;aa.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=sa.get(a);if(q)for(c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=aa.guid++),(i=q.events)||(i=q.events={}),(g=q.handle)||(g=q.handle=function(b){return typeof aa!==Aa&&aa.event.triggered!==b.type?aa.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(oa)||[""],j=b.length;j--;)h=Ea.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n&&(l=aa.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=aa.event.special[n]||{},k=aa.extend({type:n,origType:p,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&aa.expr.match.needsContext.test(e),namespace:o.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,o,g)!==!1||a.addEventListener&&a.addEventListener(n,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),aa.event.global[n]=!0)},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=sa.hasData(a)&&sa.get(a);if(q&&(i=q.events)){for(b=(b||"").match(oa)||[""],j=b.length;j--;)if(h=Ea.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){for(l=aa.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;f--;)k=m[f],!e&&p!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||aa.removeEvent(a,n,q.handle),delete i[n])}else for(n in i)aa.event.remove(a,n+b[j],c,d,!0);aa.isEmptyObject(i)&&(delete q.handle,sa.remove(a,"events"))}},trigger:function(a,c,d,e){var f,g,h,i,j,k,l,m=[d||$],n=Y.call(a,"type")?a.type:a,o=Y.call(a,"namespace")?a.namespace.split("."):[];if(g=h=d=d||$,3!==d.nodeType&&8!==d.nodeType&&!Da.test(n+aa.event.triggered)&&(n.indexOf(".")>=0&&(o=n.split("."),n=o.shift(),o.sort()),j=n.indexOf(":")<0&&"on"+n,a=a[aa.expando]?a:new aa.Event(n,"object"==typeof a&&a),a.isTrigger=e?2:3,a.namespace=o.join("."),a.namespace_re=a.namespace?new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,a.result=void 0,a.target||(a.target=d),c=null==c?[a]:aa.makeArray(c,[a]),l=aa.event.special[n]||{},e||!l.trigger||l.trigger.apply(d,c)!==!1)){if(!e&&!l.noBubble&&!aa.isWindow(d)){for(i=l.delegateType||n,Da.test(i+n)||(g=g.parentNode);g;g=g.parentNode)m.push(g),h=g;h===(d.ownerDocument||$)&&m.push(h.defaultView||h.parentWindow||b)}for(f=0;(g=m[f++])&&!a.isPropagationStopped();)a.type=f>1?i:l.bindType||n,k=(sa.get(g,"events")||{})[a.type]&&sa.get(g,"handle"),k&&k.apply(g,c),k=j&&g[j],k&&k.apply&&aa.acceptData(g)&&(a.result=k.apply(g,c),a.result===!1&&a.preventDefault());return a.type=n,e||a.isDefaultPrevented()||l._default&&l._default.apply(m.pop(),c)!==!1||!aa.acceptData(d)||j&&aa.isFunction(d[n])&&!aa.isWindow(d)&&(h=d[j],h&&(d[j]=null),aa.event.triggered=n,d[n](),aa.event.triggered=void 0,h&&(d[j]=h)),a.result}},dispatch:function(a){a=aa.event.fix(a);var b,c,d,e,f,g=[],h=S.call(arguments),i=(sa.get(this,"events")||{})[a.type]||[],j=aa.event.special[a.type]||{};if(h[0]=a,a.delegateTarget=this,!j.preDispatch||j.preDispatch.call(this,a)!==!1){for(g=aa.event.handlers.call(this,a,i),b=0;(e=g[b++])&&!a.isPropagationStopped();)for(a.currentTarget=e.elem,c=0;(f=e.handlers[c++])&&!a.isImmediatePropagationStopped();)a.namespace_re&&!a.namespace_re.test(f.namespace)||(a.handleObj=f,a.data=f.data,d=((aa.event.special[f.origType]||{}).handle||f.handler).apply(e.elem,h),void 0!==d&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation()));return j.postDispatch&&j.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;c<h;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?aa(e,this).index(i)>=0:aa.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||$,d=c.documentElement,e=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0),a.pageY=b.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},fix:function(a){if(a[aa.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];for(g||(this.fixHooks[e]=g=Ca.test(e)?this.mouseHooks:Ba.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new aa.Event(f),b=d.length;b--;)c=d[b],a[c]=f[c];return a.target||(a.target=$),3===a.target.nodeType&&(a.target=a.target.parentNode),g.filter?g.filter(a,f):a},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==m()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===m()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&aa.nodeName(this,"input"))return this.click(),!1},_default:function(a){return aa.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=aa.extend(new aa.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?aa.event.trigger(e,null,b):aa.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},aa.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)},aa.Event=function(a,b){return this instanceof aa.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?k:l):this.type=a,b&&aa.extend(this,b),this.timeStamp=a&&a.timeStamp||aa.now(),void(this[aa.expando]=!0)):new aa.Event(a,b)},aa.Event.prototype={isDefaultPrevented:l,isPropagationStopped:l,isImmediatePropagationStopped:l,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=k,a&&a.preventDefault&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=k,a&&a.stopPropagation&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=k,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},aa.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){aa.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return e&&(e===d||aa.contains(d,e))||(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),Z.focusinBubbles||aa.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){aa.event.simulate(b,a.target,aa.event.fix(a),!0)};aa.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=sa.access(d,b);e||d.addEventListener(a,c,!0),sa.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=sa.access(d,b)-1;e?sa.access(d,b,e):(d.removeEventListener(a,c,!0),sa.remove(d,b))}}}),aa.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(g in a)this.on(g,b,c,a[g],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=l;else if(!d)return this;return 1===e&&(f=d,d=function(a){return aa().off(a),f.apply(this,arguments)},d.guid=f.guid||(f.guid=aa.guid++)),this.each(function(){aa.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,aa(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return b!==!1&&"function"!=typeof b||(c=b,b=void 0),c===!1&&(c=l),this.each(function(){aa.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){aa.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];if(c)return aa.event.trigger(a,b,c,!0)}});var Fa=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Ga=/<([\w:]+)/,Ha=/<|&#?\w+;/,Ia=/<(?:script|style|link)/i,Ja=/checked\s*(?:[^=]|=\s*.checked.)/i,Ka=/^$|\/(?:java|ecma)script/i,La=/^true\/(.*)/,Ma=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Na={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Na.optgroup=Na.option,Na.tbody=Na.tfoot=Na.colgroup=Na.caption=Na.thead,Na.th=Na.td,aa.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=aa.contains(a.ownerDocument,a);if(!(Z.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||aa.isXMLDoc(a)))for(g=s(h),f=s(a),d=0,e=f.length;d<e;d++)t(f[d],g[d]);if(b)if(c)for(f=f||s(a),g=g||s(h),d=0,e=f.length;d<e;d++)r(f[d],g[d]);else r(a,h);return g=s(h,"script"),g.length>0&&q(g,!i&&s(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,n=a.length;m<n;m++)if(e=a[m],e||0===e)if("object"===aa.type(e))aa.merge(l,e.nodeType?[e]:e);else if(Ha.test(e)){for(f=f||k.appendChild(b.createElement("div")),g=(Ga.exec(e)||["",""])[1].toLowerCase(),h=Na[g]||Na._default,f.innerHTML=h[1]+e.replace(Fa,"<$1></$2>")+h[2],j=h[0];j--;)f=f.lastChild;aa.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));for(k.textContent="",m=0;e=l[m++];)if((!d||aa.inArray(e,d)===-1)&&(i=aa.contains(e.ownerDocument,e),f=s(k.appendChild(e),"script"),i&&q(f),c))for(j=0;e=f[j++];)Ka.test(e.type||"")&&c.push(e);return k},cleanData:function(a){for(var b,c,d,e,f=aa.event.special,g=0;void 0!==(c=a[g]);g++){if(aa.acceptData(c)&&(e=c[sa.expando],e&&(b=sa.cache[e]))){if(b.events)for(d in b.events)f[d]?aa.event.remove(c,d):aa.removeEvent(c,d,b.handle);sa.cache[e]&&delete sa.cache[e]}delete ta.cache[c[ta.expando]]}}}),aa.fn.extend({text:function(a){return ra(this,function(a){return void 0===a?aa.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=n(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=n(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?aa.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||aa.cleanData(s(c)),c.parentNode&&(b&&aa.contains(c.ownerDocument,c)&&q(s(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(aa.cleanData(s(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null!=a&&a,b=null==b?a:b,this.map(function(){return aa.clone(this,a,b)})},html:function(a){return ra(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!Ia.test(a)&&!Na[(Ga.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Fa,"<$1></$2>");try{for(;c<d;c++)b=this[c]||{},1===b.nodeType&&(aa.cleanData(s(b,!1)),b.innerHTML=a);b=0}catch(a){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,aa.cleanData(s(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=T.apply([],a);var c,d,e,f,g,h,i=0,j=this.length,k=this,l=j-1,m=a[0],n=aa.isFunction(m);if(n||j>1&&"string"==typeof m&&!Z.checkClone&&Ja.test(m))return this.each(function(c){var d=k.eq(c);n&&(a[0]=m.call(this,c,d.html())),d.domManip(a,b)});if(j&&(c=aa.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(e=aa.map(s(c,"script"),o),f=e.length;i<j;i++)g=c,i!==l&&(g=aa.clone(g,!0,!0),f&&aa.merge(e,s(g,"script"))),b.call(this[i],g,i);if(f)for(h=e[e.length-1].ownerDocument,aa.map(e,p),i=0;i<f;i++)g=e[i],Ka.test(g.type||"")&&!sa.access(g,"globalEval")&&aa.contains(h,g)&&(g.src?aa._evalUrl&&aa._evalUrl(g.src):aa.globalEval(g.textContent.replace(Ma,"")))}return this}}),aa.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){aa.fn[a]=function(a){for(var c,d=[],e=aa(a),f=e.length-1,g=0;g<=f;g++)c=g===f?this:this.clone(!0),aa(e[g])[b](c),U.apply(d,c.get());return this.pushStack(d)}});var Oa,Pa={},Qa=/^margin/,Ra=new RegExp("^("+wa+")(?!px)[a-z%]+$","i"),Sa=function(a){return a.ownerDocument.defaultView.opener?a.ownerDocument.defaultView.getComputedStyle(a,null):b.getComputedStyle(a,null)};!function(){function a(){g.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",g.innerHTML="",e.appendChild(f);var a=b.getComputedStyle(g,null);c="1%"!==a.top,d="4px"===a.width,e.removeChild(f)}var c,d,e=$.documentElement,f=$.createElement("div"),g=$.createElement("div");g.style&&(g.style.backgroundClip="content-box",g.cloneNode(!0).style.backgroundClip="",Z.clearCloneStyle="content-box"===g.style.backgroundClip,f.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",f.appendChild(g),b.getComputedStyle&&aa.extend(Z,{pixelPosition:function(){return a(),c},boxSizingReliable:function(){return null==d&&a(),d},reliableMarginRight:function(){var a,c=g.appendChild($.createElement("div"));return c.style.cssText=g.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",g.style.width="1px",e.appendChild(f),a=!parseFloat(b.getComputedStyle(c,null).marginRight),e.removeChild(f),g.removeChild(c),a}}))}(),aa.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Ta=/^(none|table(?!-c[ea]).+)/,Ua=new RegExp("^("+wa+")(.*)$","i"),Va=new RegExp("^([+-])=("+wa+")","i"),Wa={position:"absolute",visibility:"hidden",display:"block"},Xa={letterSpacing:"0",fontWeight:"400"},Ya=["Webkit","O","Moz","ms"];aa.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=w(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=aa.camelCase(b),i=a.style;return b=aa.cssProps[h]||(aa.cssProps[h]=y(i,h)),g=aa.cssHooks[b]||aa.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=Va.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(aa.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||aa.cssNumber[h]||(c+="px"),Z.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=aa.camelCase(b);return b=aa.cssProps[h]||(aa.cssProps[h]=y(a.style,h)),g=aa.cssHooks[b]||aa.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=w(a,b,d)),"normal"===e&&b in Xa&&(e=Xa[b]),""===c||c?(f=parseFloat(e),c===!0||aa.isNumeric(f)?f||0:e):e}}),aa.each(["height","width"],function(a,b){aa.cssHooks[b]={get:function(a,c,d){if(c)return Ta.test(aa.css(a,"display"))&&0===a.offsetWidth?aa.swap(a,Wa,function(){return B(a,b,d)}):B(a,b,d)},set:function(a,c,d){var e=d&&Sa(a);return z(a,c,d?A(a,b,d,"border-box"===aa.css(a,"boxSizing",!1,e),e):0)}}}),aa.cssHooks.marginRight=x(Z.reliableMarginRight,function(a,b){if(b)return aa.swap(a,{display:"inline-block"},w,[a,"marginRight"])}),aa.each({margin:"",padding:"",border:"Width"},function(a,b){aa.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];d<4;d++)e[a+xa[d]+b]=f[d]||f[d-2]||f[0];return e}},Qa.test(a)||(aa.cssHooks[a+b].set=z)}),aa.fn.extend({css:function(a,b){return ra(this,function(a,b,c){var d,e,f={},g=0;if(aa.isArray(b)){for(d=Sa(a),e=b.length;g<e;g++)f[b[g]]=aa.css(a,b[g],!1,d);return f}return void 0!==c?aa.style(a,b,c):aa.css(a,b)},a,b,arguments.length>1)},show:function(){return C(this,!0)},hide:function(){return C(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){ya(this)?aa(this).show():aa(this).hide()})}}),aa.Tween=D,D.prototype={constructor:D,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(aa.cssNumber[c]?"":"px")},cur:function(){var a=D.propHooks[this.prop];return a&&a.get?a.get(this):D.propHooks._default.get(this)},run:function(a){var b,c=D.propHooks[this.prop];return this.options.duration?this.pos=b=aa.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):D.propHooks._default.set(this),this}},D.prototype.init.prototype=D.prototype,D.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=aa.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){aa.fx.step[a.prop]?aa.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[aa.cssProps[a.prop]]||aa.cssHooks[a.prop])?aa.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},D.propHooks.scrollTop=D.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},aa.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},aa.fx=D.prototype.init,aa.fx.step={};var Za,$a,_a=/^(?:toggle|show|hide)$/,ab=new RegExp("^(?:([+-])=|)("+wa+")([a-z%]*)$","i"),bb=/queueHooks$/,cb=[H],db={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=ab.exec(b),f=e&&e[3]||(aa.cssNumber[a]?"":"px"),g=(aa.cssNumber[a]||"px"!==f&&+d)&&ab.exec(aa.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,aa.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};aa.Animation=aa.extend(J,{tweener:function(a,b){aa.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;d<e;d++)c=a[d],db[c]=db[c]||[],db[c].unshift(b)},prefilter:function(a,b){b?cb.unshift(a):cb.push(a)}}),aa.speed=function(a,b,c){var d=a&&"object"==typeof a?aa.extend({},a):{complete:c||!c&&b||aa.isFunction(a)&&a,duration:a,easing:c&&b||b&&!aa.isFunction(b)&&b};return d.duration=aa.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in aa.fx.speeds?aa.fx.speeds[d.duration]:aa.fx.speeds._default,null!=d.queue&&d.queue!==!0||(d.queue="fx"),d.old=d.complete,d.complete=function(){aa.isFunction(d.old)&&d.old.call(this),d.queue&&aa.dequeue(this,d.queue)},d},aa.fn.extend({fadeTo:function(a,b,c,d){return this.filter(ya).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=aa.isEmptyObject(a),f=aa.speed(b,c,d),g=function(){var b=J(this,aa.extend({},a),f);(e||sa.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=aa.timers,g=sa.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&bb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));!b&&c||aa.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=sa.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=aa.timers,g=d?d.length:0;for(c.finish=!0,aa.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;b<g;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),aa.each(["toggle","show","hide"],function(a,b){var c=aa.fn[b];aa.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(F(b,!0),a,d,e)}}),aa.each({slideDown:F("show"),slideUp:F("hide"),slideToggle:F("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){aa.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),aa.timers=[],aa.fx.tick=function(){var a,b=0,c=aa.timers;for(Za=aa.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||aa.fx.stop(),Za=void 0},aa.fx.timer=function(a){aa.timers.push(a),a()?aa.fx.start():aa.timers.pop()},aa.fx.interval=13,aa.fx.start=function(){$a||($a=setInterval(aa.fx.tick,aa.fx.interval))},aa.fx.stop=function(){clearInterval($a),$a=null},aa.fx.speeds={slow:600,fast:200,_default:400},aa.fn.delay=function(a,b){return a=aa.fx?aa.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a=$.createElement("input"),b=$.createElement("select"),c=b.appendChild($.createElement("option"));a.type="checkbox",Z.checkOn=""!==a.value,Z.optSelected=c.selected,b.disabled=!0,Z.optDisabled=!c.disabled,a=$.createElement("input"),a.value="t",a.type="radio",Z.radioValue="t"===a.value}();var eb,fb,gb=aa.expr.attrHandle;aa.fn.extend({attr:function(a,b){return ra(this,aa.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){aa.removeAttr(this,a)})}}),aa.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===Aa?aa.prop(a,b,c):(1===f&&aa.isXMLDoc(a)||(b=b.toLowerCase(),d=aa.attrHooks[b]||(aa.expr.match.bool.test(b)?fb:eb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=aa.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void aa.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(oa);if(f&&1===a.nodeType)for(;c=f[e++];)d=aa.propFix[c]||c,aa.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!Z.radioValue&&"radio"===b&&aa.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),fb={set:function(a,b,c){return b===!1?aa.removeAttr(a,c):a.setAttribute(c,c),c}},aa.each(aa.expr.match.bool.source.match(/\w+/g),function(a,b){var c=gb[b]||aa.find.attr;gb[b]=function(a,b,d){var e,f;return d||(f=gb[b],gb[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,gb[b]=f),e}});var hb=/^(?:input|select|textarea|button)$/i;aa.fn.extend({prop:function(a,b){return ra(this,aa.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[aa.propFix[a]||a]})}}),aa.extend({propFix:{for:"htmlFor",class:"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!aa.isXMLDoc(a),f&&(b=aa.propFix[b]||b,e=aa.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||hb.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),Z.optSelected||(aa.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),aa.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){aa.propFix[this.toLowerCase()]=this});var ib=/[\t\r\n\f]/g;aa.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;if(aa.isFunction(a))return this.each(function(b){aa(this).addClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(oa)||[];i<j;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ib," "):" ")){for(f=0;e=b[f++];)d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=aa.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0===arguments.length||"string"==typeof a&&a,i=0,j=this.length;if(aa.isFunction(a))return this.each(function(b){aa(this).removeClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(oa)||[];i<j;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ib," "):"")){for(f=0;e=b[f++];)for(;d.indexOf(" "+e+" ")>=0;)d=d.replace(" "+e+" "," ");g=a?aa.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):aa.isFunction(a)?this.each(function(c){aa(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if("string"===c)for(var b,d=0,e=aa(this),f=a.match(oa)||[];b=f[d++];)e.hasClass(b)?e.removeClass(b):e.addClass(b);else c!==Aa&&"boolean"!==c||(this.className&&sa.set(this,"__className__",this.className),this.className=this.className||a===!1?"":sa.get(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;c<d;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ib," ").indexOf(b)>=0)return!0;return!1}});var jb=/\r/g;aa.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=aa.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,aa(this).val()):a,null==e?e="":"number"==typeof e?e+="":aa.isArray(e)&&(e=aa.map(e,function(a){return null==a?"":a+""})),b=aa.valHooks[this.type]||aa.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=aa.valHooks[e.type]||aa.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(jb,""):null==c?"":c)}}}),aa.extend({valHooks:{option:{get:function(a){var b=aa.find.attr(a,"value");return null!=b?b:aa.trim(aa.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||e<0,g=f?null:[],h=f?e+1:d.length,i=e<0?h:f?e:0;i<h;i++)if(c=d[i],(c.selected||i===e)&&(Z.optDisabled?!c.disabled:null===c.getAttribute("disabled"))&&(!c.parentNode.disabled||!aa.nodeName(c.parentNode,"optgroup"))){if(b=aa(c).val(),f)return b;g.push(b)}return g},set:function(a,b){for(var c,d,e=a.options,f=aa.makeArray(b),g=e.length;g--;)d=e[g],(d.selected=aa.inArray(d.value,f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),aa.each(["radio","checkbox"],function(){aa.valHooks[this]={set:function(a,b){if(aa.isArray(b))return a.checked=aa.inArray(aa(a).val(),b)>=0}},Z.checkOn||(aa.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),aa.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){aa.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),aa.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var kb=aa.now(),lb=/\?/;aa.parseJSON=function(a){return JSON.parse(a+"")},aa.parseXML=function(a){var b,c;if(!a||"string"!=typeof a)return null;try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(a){b=void 0}return b&&!b.getElementsByTagName("parsererror").length||aa.error("Invalid XML: "+a),b};var mb=/#.*$/,nb=/([?&])_=[^&]*/,ob=/^(.*?):[ \t]*([^\r\n]*)$/gm,pb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,qb=/^(?:GET|HEAD)$/,rb=/^\/\//,sb=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,tb={},ub={},vb="*/".concat("*"),wb=b.location.href,xb=sb.exec(wb.toLowerCase())||[];
|
13
13
|
aa.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:wb,type:"GET",isLocal:pb.test(xb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":vb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":aa.parseJSON,"text xml":aa.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?M(M(a,aa.ajaxSettings),b):M(aa.ajaxSettings,a)},ajaxPrefilter:K(tb),ajaxTransport:K(ub),ajax:function(a,b){function c(a,b,c,g){var i,k,r,s,u,w=b;2!==t&&(t=2,h&&clearTimeout(h),d=void 0,f=g||"",v.readyState=a>0?4:0,i=a>=200&&a<300||304===a,c&&(s=N(l,v,c)),s=O(l,s,v,i),i?(l.ifModified&&(u=v.getResponseHeader("Last-Modified"),u&&(aa.lastModified[e]=u),u=v.getResponseHeader("etag"),u&&(aa.etag[e]=u)),204===a||"HEAD"===l.type?w="nocontent":304===a?w="notmodified":(w=s.state,k=s.data,r=s.error,i=!r)):(r=w,!a&&w||(w="error",a<0&&(a=0))),v.status=a,v.statusText=(b||w)+"",i?o.resolveWith(m,[k,w,v]):o.rejectWith(m,[v,w,r]),v.statusCode(q),q=void 0,j&&n.trigger(i?"ajaxSuccess":"ajaxError",[v,l,i?k:r]),p.fireWith(m,[v,w]),j&&(n.trigger("ajaxComplete",[v,l]),--aa.active||aa.event.trigger("ajaxStop")))}"object"==typeof a&&(b=a,a=void 0),b=b||{};var d,e,f,g,h,i,j,k,l=aa.ajaxSetup({},b),m=l.context||l,n=l.context&&(m.nodeType||m.jquery)?aa(m):aa.event,o=aa.Deferred(),p=aa.Callbacks("once memory"),q=l.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!g)for(g={};b=ob.exec(f);)g[b[1].toLowerCase()]=b[2];b=g[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(l.mimeType=a),this},statusCode:function(a){var b;if(a)if(t<2)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return d&&d.abort(b),c(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,l.url=((a||l.url||wb)+"").replace(mb,"").replace(rb,xb[1]+"//"),l.type=b.method||b.type||l.method||l.type,l.dataTypes=aa.trim(l.dataType||"*").toLowerCase().match(oa)||[""],null==l.crossDomain&&(i=sb.exec(l.url.toLowerCase()),l.crossDomain=!(!i||i[1]===xb[1]&&i[2]===xb[2]&&(i[3]||("http:"===i[1]?"80":"443"))===(xb[3]||("http:"===xb[1]?"80":"443")))),l.data&&l.processData&&"string"!=typeof l.data&&(l.data=aa.param(l.data,l.traditional)),L(tb,l,b,v),2===t)return v;j=aa.event&&l.global,j&&0===aa.active++&&aa.event.trigger("ajaxStart"),l.type=l.type.toUpperCase(),l.hasContent=!qb.test(l.type),e=l.url,l.hasContent||(l.data&&(e=l.url+=(lb.test(e)?"&":"?")+l.data,delete l.data),l.cache===!1&&(l.url=nb.test(e)?e.replace(nb,"$1_="+kb++):e+(lb.test(e)?"&":"?")+"_="+kb++)),l.ifModified&&(aa.lastModified[e]&&v.setRequestHeader("If-Modified-Since",aa.lastModified[e]),aa.etag[e]&&v.setRequestHeader("If-None-Match",aa.etag[e])),(l.data&&l.hasContent&&l.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",l.contentType),v.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+("*"!==l.dataTypes[0]?", "+vb+"; q=0.01":""):l.accepts["*"]);for(k in l.headers)v.setRequestHeader(k,l.headers[k]);if(l.beforeSend&&(l.beforeSend.call(m,v,l)===!1||2===t))return v.abort();u="abort";for(k in{success:1,error:1,complete:1})v[k](l[k]);if(d=L(ub,l,b,v)){v.readyState=1,j&&n.trigger("ajaxSend",[v,l]),l.async&&l.timeout>0&&(h=setTimeout(function(){v.abort("timeout")},l.timeout));try{t=1,d.send(r,c)}catch(a){if(!(t<2))throw a;c(-1,a)}}else c(-1,"No Transport");return v},getJSON:function(a,b,c){return aa.get(a,b,c,"json")},getScript:function(a,b){return aa.get(a,void 0,b,"script")}}),aa.each(["get","post"],function(a,b){aa[b]=function(a,c,d,e){return aa.isFunction(c)&&(e=e||d,d=c,c=void 0),aa.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),aa._evalUrl=function(a){return aa.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})},aa.fn.extend({wrapAll:function(a){var b;return aa.isFunction(a)?this.each(function(b){aa(this).wrapAll(a.call(this,b))}):(this[0]&&(b=aa(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){for(var a=this;a.firstElementChild;)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return aa.isFunction(a)?this.each(function(b){aa(this).wrapInner(a.call(this,b))}):this.each(function(){var b=aa(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=aa.isFunction(a);return this.each(function(c){aa(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){aa.nodeName(this,"body")||aa(this).replaceWith(this.childNodes)}).end()}}),aa.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0},aa.expr.filters.visible=function(a){return!aa.expr.filters.hidden(a)};var yb=/%20/g,zb=/\[\]$/,Ab=/\r?\n/g,Bb=/^(?:submit|button|image|reset|file)$/i,Cb=/^(?:input|select|textarea|keygen)/i;aa.param=function(a,b){var c,d=[],e=function(a,b){b=aa.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=aa.ajaxSettings&&aa.ajaxSettings.traditional),aa.isArray(a)||a.jquery&&!aa.isPlainObject(a))aa.each(a,function(){e(this.name,this.value)});else for(c in a)P(c,a[c],b,e);return d.join("&").replace(yb,"+")},aa.fn.extend({serialize:function(){return aa.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=aa.prop(this,"elements");return a?aa.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!aa(this).is(":disabled")&&Cb.test(this.nodeName)&&!Bb.test(a)&&(this.checked||!za.test(a))}).map(function(a,b){var c=aa(this).val();return null==c?null:aa.isArray(c)?aa.map(c,function(a){return{name:b.name,value:a.replace(Ab,"\r\n")}}):{name:b.name,value:c.replace(Ab,"\r\n")}}).get()}}),aa.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Db=0,Eb={},Fb={0:200,1223:204},Gb=aa.ajaxSettings.xhr();b.attachEvent&&b.attachEvent("onunload",function(){for(var a in Eb)Eb[a]()}),Z.cors=!!Gb&&"withCredentials"in Gb,Z.ajax=Gb=!!Gb,aa.ajaxTransport(function(a){var b;if(Z.cors||Gb&&!a.crossDomain)return{send:function(c,d){var e,f=a.xhr(),g=++Db;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)f.setRequestHeader(e,c[e]);b=function(a){return function(){b&&(delete Eb[g],b=f.onload=f.onerror=null,"abort"===a?f.abort():"error"===a?d(f.status,f.statusText):d(Fb[f.status]||f.status,f.statusText,"string"==typeof f.responseText?{text:f.responseText}:void 0,f.getAllResponseHeaders()))}},f.onload=b(),f.onerror=b("error"),b=Eb[g]=b("abort");try{f.send(a.hasContent&&a.data||null)}catch(a){if(b)throw a}},abort:function(){b&&b()}}}),aa.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return aa.globalEval(a),a}}}),aa.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),aa.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=aa("<script>").prop({async:!0,charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&e("error"===a.type?404:200,a.type)}),$.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Hb=[],Ib=/(=)\?(?=&|$)|\?\?/;aa.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Hb.pop()||aa.expando+"_"+kb++;return this[a]=!0,a}}),aa.ajaxPrefilter("json jsonp",function(a,c,d){var e,f,g,h=a.jsonp!==!1&&(Ib.test(a.url)?"url":"string"==typeof a.data&&!(a.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ib.test(a.data)&&"data");if(h||"jsonp"===a.dataTypes[0])return e=a.jsonpCallback=aa.isFunction(a.jsonpCallback)?a.jsonpCallback():a.jsonpCallback,h?a[h]=a[h].replace(Ib,"$1"+e):a.jsonp!==!1&&(a.url+=(lb.test(a.url)?"&":"?")+a.jsonp+"="+e),a.converters["script json"]=function(){return g||aa.error(e+" was not called"),g[0]},a.dataTypes[0]="json",f=b[e],b[e]=function(){g=arguments},d.always(function(){b[e]=f,a[e]&&(a.jsonpCallback=c.jsonpCallback,Hb.push(e)),g&&aa.isFunction(f)&&f(g[0]),g=f=void 0}),"script"}),aa.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||$;var d=ha.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=aa.buildFragment([a],b,e),e&&e.length&&aa(e).remove(),aa.merge([],d.childNodes))};var Jb=aa.fn.load;aa.fn.load=function(a,b,c){if("string"!=typeof a&&Jb)return Jb.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=aa.trim(a.slice(h)),a=a.slice(0,h)),aa.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&aa.ajax({url:a,type:e,dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?aa("<div>").append(aa.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,f||[a.responseText,b,a])}),this},aa.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){aa.fn[b]=function(a){return this.on(b,a)}}),aa.expr.filters.animated=function(a){return aa.grep(aa.timers,function(b){return a===b.elem}).length};var Kb=b.document.documentElement;aa.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=aa.css(a,"position"),l=aa(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=aa.css(a,"top"),i=aa.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),aa.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},aa.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){aa.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,aa.contains(b,d)?(typeof d.getBoundingClientRect!==Aa&&(e=d.getBoundingClientRect()),c=Q(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===aa.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),aa.nodeName(a[0],"html")||(d=a.offset()),d.top+=aa.css(a[0],"borderTopWidth",!0),d.left+=aa.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-aa.css(c,"marginTop",!0),left:b.left-d.left-aa.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||Kb;a&&!aa.nodeName(a,"html")&&"static"===aa.css(a,"position");)a=a.offsetParent;return a||Kb})}}),aa.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d="pageYOffset"===c;aa.fn[a]=function(e){return ra(this,function(a,e,f){var g=Q(a);return void 0===f?g?g[c]:a[e]:void(g?g.scrollTo(d?b.pageXOffset:f,d?f:b.pageYOffset):a[e]=f)},a,e,arguments.length,null)}}),aa.each(["top","left"],function(a,b){aa.cssHooks[b]=x(Z.pixelPosition,function(a,c){if(c)return c=w(a,b),Ra.test(c)?aa(a).position()[b]+"px":c})}),aa.each({Height:"height",Width:"width"},function(a,b){aa.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){aa.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return ra(this,function(b,c,d){var e;return aa.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?aa.css(b,c,g):aa.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),aa.fn.size=function(){return this.length},aa.fn.andSelf=aa.fn.addBack,"function"==typeof a&&a.amd&&a("39",[],function(){return aa})&&a("jquery",["39"],function(a){return a});var Lb=b.jQuery,Mb=b.$;return aa.noConflict=function(a){return b.$===aa&&(b.$=Mb),a&&b.jQuery===aa&&(b.jQuery=Lb),aa},typeof c===Aa&&(b.jQuery=b.$=aa),aa})}(),function(){var a=c.amdDefine;a("f",["39"],function(a){return a})}(),c.register("3a",["38","2d","3b","3c","f"],function(c){var d,f,g,h,j;return{setters:[function(a){d=a.default},function(a){f=a.default},function(a){g=a.default},function(a){h=a.default},function(a){j=a.default}],execute:function(){e=function a(b,c,d){function f(h,i){if(!c[h]){if(!b[h]){var j="function"==typeof e&&e;if(!i&&j)return j(h,!0);if(g)return g(h,!0);var k=new Error("Cannot find module '"+h+"'");throw k.code="MODULE_NOT_FOUND",k}var l=c[h]={exports:{}};b[h][0].call(l.exports,function(a){var c=b[h][1][a];return f(c?c:a)},l,l.exports,a,b,c,d)}return c[h].exports}for(var g="function"==typeof e&&e,h=0;h<d.length;h++)f(d[h]);return f}({1:[function(c,d,e){j.browser=c("jquery-browser-plugin");var f=c("js-class"),g="onSelectionChange",h="onSelectionChanged",k="onAnnotationClicked";Sequence=f({constructor:function(a){var b=this;this.opt=jQuery.extend(this.opt,a),this._container=jQuery(this.opt.target),0==this._container.length&&(this._container=jQuery("#"+this.opt.target)),0==this._container.length&&console.log("empty target container"),this.opt.target=this._container[0].id,this._container.ready(function(){b._initialize()})},opt:{sequence:"",id:"",target:"",format:"FASTA",selection:{start:0,end:0},columns:{size:35,spacedEach:10},highlights:[],annotations:[],sequenceUrl:"http://www.ebi.ac.uk/das-srv/uniprot/das/uniprot/sequence",selectionColor:"Yellow",selectionFontColor:"black",highlightFontColor:"red",highlightBackgroundColor:"white",fontColor:"inherit",backgroundColor:"inherit",width:void 0,height:void 0,formatSelectorVisible:!0},eventTypes:["onSelectionChanged","onSelectionChange","onAnnotationClicked"],getId:function(){return this.opt.id},_headerDiv:null,_contentDiv:null,_initialize:function(){void 0!==this.opt.width&&this._container.width(this.opt.width),void 0!==this.opt.height&&this._container.height(this.opt.height),this._buildFormatSelector(),this._contentDiv=jQuery("<div/>").appendTo(this._container),this._highlights=this.opt.highlights,this._annotations=this.opt.annotations;var a="sequenceTip"+this.opt.target;jQuery('<div id="'+a+'"></div>').css({position:"absolute","z-index":"999999",color:"#fff","font-size":"12px",width:"auto",display:"none"}).addClass("tooltip").appendTo("body").hide(),this.opt._tooltip=document.getElementById(a),this.opt.sequence?this._redraw():this.opt.id?this._requestSequence(this.opt.id):this.clearSequence("No sequence available","../biojs/css/images/warning_icon.png")},setSequence:function(a,b){a.match(/^([A-N,R-Z][0-9][A-Z][A-Z, 0-9][A-Z, 0-9][0-9])|([O,P,Q][0-9][A-Z, 0-9][A-Z, 0-9][A-Z, 0-9][0-9])(\.\d+)?$/i)?this._requestSequence(arguments[0]):(this.opt.sequence=a,this.opt.id=b,this._highlights=[],this._highlightsCount=0,this.opt.selection={start:0,end:0},this._annotations=[],this._contentDiv.children().remove(),this._redraw())},_requestSequence:function(a){var b=this;console.log("Requesting sequence for: "+a),jQuery.ajax({url:b.opt.sequenceUrl,dataType:"xml",data:{segment:a},success:function(a){try{var c=jQuery(a).find("SEQUENCE:first");b.setSequence(c.text(),c.attr("id"),c.attr("label"))}catch(a){console.log("Error decoding response data: "+a.message),b.clearSequence("No sequence available","../biojs/css/images/warning_icon.png")}},error:function(a,c,d){console.log("Error decoding response data: "+c),b.clearSequence("Error requesting the sequence to the server "+this.url,"../biojs/css/images/warning_icon.png")}})},clearSequence:function(a,b){var c=void 0;this.opt.sequence="",this.opt.id="",this._highlights=[],this._highlightsCount=0,this.opt.selection={start:0,end:0},this._annotations=[],this._contentDiv.children().remove(),this._headerDiv.hide(),void 0!==a&&(c=jQuery("<div>"+a+"</div>").appendTo(this._contentDiv).addClass("message"),void 0!==b&&c.css({background:'transparent url("'+b+'") no-repeat center left',"padding-left":"20px"}))},setSelection:function(a,b){if(a>b){var c=b;b=a,a=c}a==this.opt.selection.start&&b==this.opt.selection.end||(this._setSelection(a,b),this.trigger(h,{start:a,end:b}))},_buildFormatSelector:function(){var a=this;this._headerDiv=jQuery("<div></div>").appendTo(this._container),this._headerDiv.append("Format: "),this._formatSelector=jQuery('<select> <option value="FASTA">FASTA</option><option value="CODATA">CODATA</option><option value="PRIDE">PRIDE</option><option value="RAW">RAW</option></select>').appendTo(a._headerDiv),this._formatSelector.change(function(b){a.opt.format=jQuery(this).val(),a._redraw()}),this._formatSelector.val(a.opt.format),this.formatSelectorVisible(this.opt.formatSelectorVisible)},addHighlight:function(a){var b="-1",c="",d="",e={};return a instanceof Object&&a.start<=a.end&&(c="string"==typeof a.color?a.color:this.opt.highlightFontColor,d="string"==typeof a.background?a.background:this.opt.highlightBackgroundColor,b="string"==typeof a.id?a.id:new Number(this._highlightsCount++).toString(),e={start:a.start,end:a.end,color:c,background:d,id:b},this._highlights.push(e),this._applyHighlight(e),this._restoreSelection(a.start,a.end)),b},_applyHighlight:function(a){for(var b=this._contentDiv.find(".sequence"),c=a.start-1;c<a.end;c++)zindex=jQuery(b[c]).css("z-index"),"auto"==zindex?(z=1,o=1):(z=0,o=.5),jQuery(b[c]).css({color:a.color,"background-color":a.background,"z-index":z,opacity:o}).addClass("highlighted")},_applyHighlights:function(a){for(var b in a)this._applyHighlight(a[b])},_restoreHighlights:function(c,d){var e=this._highlights;this._applyHighlight({start:c,end:d,color:this.opt.fontColor,background:this.opt.backgroundColor});for(var f in e)e[f].start>d||e[f].end<c||(a=e[f].start<c?c:e[f].start,b=e[f].end>d?d:e[f].end,this._applyHighlight({start:a,end:b,color:e[f].color,background:e[f].background}))},_restoreSelection:function(c,d){var e=this.opt.selection;c>e.end||d<e.start||(a=c<e.start?e.start:c,b=d>e.end?e.end:d,this._applyHighlight({start:a,end:b,color:this.opt.selectionFontColor,background:this.opt.selectionColor}))},removeHighlight:function(a){var b=this._highlights;for(i in b)if(b[i].id==a){start=b[i].start,end=b[i].end,b.splice(i,1),this._restoreHighlights(start,end),this._restoreSelection(start,end);break}},removeAllHighlights:function(){this._highlights=[],this._restoreHighlights(1,this.opt.sequence.length),this._restoreSelection(1,this.opt.sequence.length)},setFormat:function(a){this.opt.format!=a.toUpperCase()&&(this.opt.format=a.toUpperCase(),this._redraw());var b=this;this._headerDiv.find("option").each(function(){jQuery(this).val()==b.opt.format.toUpperCase()&&jQuery(this).attr("selected","selected")})},setNumCols:function(a){this.opt.columns.size=a,this._redraw()},formatSelectorVisible:function(a){a?this._headerDiv.show():this._headerDiv.hide()},showFormatSelector:function(){this._headerDiv.show()},hideFormatSelector:function(){this._headerDiv.hide()},hide:function(){this._headerDiv.hide(),this._contentDiv.hide()},show:function(){this._headerDiv.show(),this._contentDiv.show()},_setSelection:function(a,b){var c=this.opt.selection,d={};c.start==a?c.end<b?(d.start=c.end,d.end=b):this._restoreHighlights(b+1,c.end):c.end==b?c.start>a?(d.start=a,d.end=c.start):this._restoreHighlights(c.start,a-1):(this._restoreHighlights(c.start,c.end),d.start=a,d.end=b),c.start=a,c.end=b},_repaintSelection:function(){var a=this.opt.selection;this._setSelection(0,0),this._setSelection(a.start,a.end)},_redraw:function(){this._contentDiv.children().remove(),"RAW"==this.opt.format?this._drawRaw():"CODATA"==this.opt.format?this._drawCodata():"FASTA"==this.opt.format?this._drawFasta():(this.opt.format="PRIDE",this._drawPride()),this._applyHighlights(this._highlights),this._repaintSelection(),this._addSpanEvents()},_drawFasta:function(){var a=this.opt.sequence.toUpperCase().split(""),b=jQuery("<pre></pre>").appendTo(this._contentDiv),c=">"+this.opt.id+" "+a.length+" bp<br/>",d=this.opt.columns.size;this.opt.sequence.length<this.opt.columns.size&&(d=this.opt.sequence.length);var e={numCols:d,numColsForSpace:0};c+=this._drawSequence(a,e),b.html(c),this._drawAnnotations(e)},_drawCodata:function(){var a=this.opt.sequence.toUpperCase().split("");if(void 0!==this.opt.formatOptions&&void 0!==this.opt.formatOptions.title&&0!=this.opt.formatOptions.title){var b=j("<pre/>").addClass("header").appendTo(this._contentDiv);b.html("ENTRY "+this.opt.id+"<br/>SEQUENCE<br/>")}var c=this.opt.columns.size;this.opt.sequence.length<this.opt.columns.size&&(c=this.opt.sequence.length);var d={numLeft:!0,numLeftSize:7,numLeftPad:" ",numTop:!0,numTopEach:5,numCols:c,numColsForSpace:0,spaceBetweenChars:!0};if(this._drawSequence(a,d),void 0!==this.opt.formatOptions&&void 0!==this.opt.formatOptions.footer&&0!=this.opt.formatOptions.footer){var e=j("<pre/>").addClass("footer").appendTo(this._contentDiv);e.html("<br/>///")}this._drawAnnotations(d)},_drawAnnotations:function(a){var b=this,c=this.opt.sequence.toLowerCase().split(""),d=this._annotations,e="",f="",g="";a.numLeft&&(e+=this._formatIndex(" ",a.numLeftSize+2," "));for(var h=0;h<c.length;h+=a.numCols){f="";for(var i in d)d[i].id=this.getId()+"_"+i,g=this._getHTMLRowAnnot(h+1,d[i],a),g.length>0&&(f+="<br/>",f+=e,f+=g,f+="<br/>");var j=a.numCols,l=c.length-h;l<j&&(j=l),a.numRight?jQuery(f).insertAfter("div#"+b.opt.target+" div pre span#numRight_"+this.getId()+"_"+(h+j)):jQuery(f).insertAfter("div#"+b.opt.target+" div pre span#"+this.getId()+"_"+(h+j))}jQuery(this._contentDiv).find(".annotation").each(function(){b._addToolTip(this,function(){return b._getAnnotationString(jQuery(this).attr("id"))}),jQuery(this).mouseover(function(a){jQuery(".annotation."+jQuery(a.target).attr("id")).each(function(){jQuery(this).css("background-color",jQuery(this).attr("color"))})}).mouseout(function(){jQuery(".annotation").css("background-color","transparent")}).click(function(a){for(var c=void 0,d=jQuery(a.target).attr("id"),e=0;e<b._annotations.length;e++)b._annotations[e].id!=d||(c=b._annotations[e].name);b.trigger(k,{name:c})})})},_getAnnotationString:function(a){var b=this._annotations[a.substr(a.indexOf("_")+1)];return b.name+"<br/>"+(b.html?b.html:"")},_getHTMLRowAnnot:function(a,b,c){for(var d="border-left:1px solid; border-bottom:1px solid; border-color:",e="border-bottom:1px solid; border-color:",f="border-bottom:1px solid; border-right:1px solid; border-color:",g="border-left:1px solid; border-right:1px solid; border-bottom:1px solid; border-color:",h=[],i=a+c.numCols,j=c.spaceBetweenChars?" ":"",k=b.color,l=b.id,m=a;m<i;m++)for(var n in b.regions)region=b.regions[n],spaceAfter="",spaceAfter+=m%c.numColsForSpace==0?" ":"",spaceAfter+=j,color=region.color?region.color:k,data='class="annotation '+l+'" id="'+l+'" color="'+color+'" pos="'+m+'"',m==region.start&&m==region.end?(h[m]='<span style="'+g+color+'" '+data+"> ",h[m]+=spaceAfter,h[m]+="</span>"):m==region.start?(h[m]='<span style="'+d+color+'" '+data+"> ",h[m]+=spaceAfter,h[m]+="</span>"):m==region.end?(h[m]='<span style="'+f+color+' " '+data+"> ",h[m]+="</span>"):m>region.start&&m<region.end?(h[m]='<span style="'+e+color+'" '+data+"> ",h[m]+=spaceAfter,h[m]+="</span>"):h[m]||(h[m]=" ",h[m]+=spaceAfter);var o=h.join("");return o.indexOf("span")==-1?"":o},_drawRaw:function(){var a=this.opt.sequence.toLowerCase().split(""),b=jQuery("<pre></pre>").appendTo(this._contentDiv),c=this.opt.columns.size;this.opt.sequence.length<this.opt.columns.size&&(c=this.opt.sequence.length);var d={numCols:c};b.html(this._drawSequence(a,d)),this._drawAnnotations(d)},_drawPride:function(){var a=this.opt.sequence.toUpperCase().split(""),b=this.opt.columns.size;this.opt.sequence.length<this.opt.columns.size&&(b=this.opt.sequence.length),opt={numLeft:!0,numLeftSize:5,numLeftPad:" ",numRight:!1,numRightSize:5,numRightPad:"",numCols:b,numColsForSpace:this.opt.columns.spacedEach},this._drawSequence(a,opt),this._drawAnnotations(opt)},_drawSequence:function(a,b){var c="",d="",e="\n",f="";if(b.numTop){d+='<span class="numTop pos-marker">';var g=b.spaceBetweenChars?2*b.numTopEach:b.numTopEach;b.numLeft&&(d+=this._formatIndex(" ",b.numLeftSize," ")),d+=this._formatIndex(" ",g," ");for(var h=b.numTopEach;h<b.numCols;h+=b.numTopEach)d+=this._formatIndex(h,g," ",!0);d+="</span>"}b.numLeft&&(c+='<span id="numLeft_'+this.getId()+'_0"',c+='class="pos-marker">',c+=this._formatIndex(1,b.numLeftSize,b.numLeftPad),c+=" ",c+="</span>",c+="\n");for(var i=1,k=1;k<=a.length;k++)if(k%b.numCols==0){f+='<span class="sequence" id="'+this.getId()+"_"+k+'">'+a[k-1]+"</span>",b.numRight&&(e+='<span id="numRight_'+this.getId()+"_"+k+'"',e+='class="pos-marker">',e+=" ",e+=this._formatIndex(k,b.numRightSize,b.numRightPad),e+="</span>",e+="\n"),f+="<br/>";var l=a.length-k;b.numLeft&&l>0&&(c+='<span id="numLeft_'+this.getId()+"_"+k+'"',c+='class="pos-marker">',c+=this._formatIndex(k+1,b.numLeftSize,b.numLeftPad),c+=" ",c+="</span>",c+="\n"),i=1}else f+='<span class="sequence" id="'+this.getId()+"_"+k+'"',f+=i%b.numColsForSpace==0?' style="letter-spacing: 1em;"':"",f+=b.spaceBetweenChars?' style="letter-spacing: 1em;"':"",f+='">'+a[k-1],f+="</span>",i++;f+="<br/>",jQuery.browser.msie&&(f="<pre>"+f+"</pre>");return b.numTop&&j("<pre/>").html(d).addClass("indT").css({color:"#aaa"}).appendTo(this._contentDiv),b.numLeft&&j("<pre/>").html(c).addClass("indL").css({color:"#aaa",display:"inline-block"}).appendTo(this._contentDiv),j("<pre/>").html(f).addClass("seqF").css({display:"inline-block"}).appendTo(this._contentDiv),b.numRight&&j("<pre/>").html(e).addClass("indR").css({color:"#aaa",display:"inline-block"}).appendTo(this._contentDiv),f},_formatIndex:function(a,b,c,d){var e=a.toString(),f="",g=b-e.length;if(g>0){for(;g-- >0;)f+="<span>"+c+"</span>";e=d?a+f:f+a}return e},_addSpanEvents:function(){var a,b,c=this,d=!1;c._contentDiv.find(".sequence").each(function(){jQuery(this).mousedown(function(){var e=jQuery(this).attr("id");b=parseInt(e.substr(e.indexOf("_")+1)),a=b,c._setSelection(a,b),d=!0,c.trigger(g,{start:c.opt.selection.start,end:c.opt.selection.end})}).mouseover(function(){var e=jQuery(this).attr("id");b=parseInt(e.substr(e.indexOf("_")+1)),d&&(b>a?c._setSelection(a,b):c._setSelection(b,a),c.trigger(g,{start:c.opt.selection.start,end:c.opt.selection.end}))}).mouseup(function(){d=!1,c.trigger(h,{start:c.opt.selection.start,end:c.opt.selection.end})}),c._addToolTip.call(c,this,function(){return d?"["+c.opt.selection.start+", "+c.opt.selection.end+"]":b})}).css("cursor","pointer")},_addToolTip:function(a,b){var c=this.opt._tooltip;jQuery(a).mouseover(function(d){var e=jQuery(d.target).offset();jQuery(c).is(":visible")||jQuery(c).css({"background-color":"#000",padding:"3px 10px 3px 10px",top:e.top+jQuery(d.target).height()+"px",left:e.left+jQuery(d.target).width()+"px"}).animate({opacity:"0.85"},10).html(b.call(a)).show()}).mouseout(function(){jQuery(c).hide()})},addAnnotation:function(a){this._annotations.push(a),this._redraw()},removeAnnotation:function(a){for(var b=0;b<this._annotations.length;b++)if(a!=this._annotations[b].name){this._annotations.splice(b,1),this._redraw();break}},removeAllAnnotations:function(){this._annotations=[],this._redraw()}}),c("biojs-events").mixin(Sequence.prototype),d.exports=Sequence},{"biojs-events":2,"jquery-browser-plugin":20,"js-class":22}],2:[function(a,b,c){var d=a("backbone-events-standalone");d.onAll=function(a,b){return this.on("all",a,b),this},d.oldMixin=d.mixin,d.mixin=function(a){d.oldMixin(a);for(var b=["onAll"],c=0;c<b.length;c++){var e=b[c];a[e]=this[e]}return a},b.exports=d},{"backbone-events-standalone":4}],3:[function(a,b,c){!function(){function a(){return{keys:f||function(a){if("object"!=typeof a&&"function"!=typeof a||null===a)throw new TypeError("keys() called on a non-object");var b,c=[];for(b in a)a.hasOwnProperty(b)&&(c[c.length]=b);return c},uniqueId:function(a){var b=++k+"";return a?a+b:b},has:function(a,b){return i.call(a,b)},each:function(a,b,c){if(null!=a)if(h&&a.forEach===h)a.forEach(b,c);else if(a.length===+a.length){for(var d=0,e=a.length;d<e;d++)if(b.call(c,a[d],d,a)===g)return}else for(var f in a)if(this.has(a,f)&&b.call(c,a[f],f,a)===g)return},once:function(a){var b,c=!1;return function(){return c?b:(c=!0,b=a.apply(this,arguments),a=null,b)}}}}var d,e=this,g={},h=Array.prototype.forEach,i=Object.prototype.hasOwnProperty,j=Array.prototype.slice,k=0,l=a();d={on:function(a,b,c){if(!n(this,"on",a,[b,c])||!b)return this;this._events||(this._events={});var d=this._events[a]||(this._events[a]=[]);return d.push({callback:b,context:c,ctx:c||this}),this},once:function a(b,c,d){if(!n(this,"once",b,[c,d])||!c)return this;var e=this,a=l.once(function(){e.off(b,a),c.apply(this,arguments)});return a._callback=c,this.on(b,a,d)},off:function(a,b,c){var d,e,f,g,h,i,j,k;if(!this._events||!n(this,"off",a,[b,c]))return this;if(!a&&!b&&!c)return this._events={},this;for(g=a?[a]:l.keys(this._events),h=0,i=g.length;h<i;h++)if(a=g[h],f=this._events[a]){if(this._events[a]=d=[],b||c)for(j=0,k=f.length;j<k;j++)e=f[j],(b&&b!==e.callback&&b!==e.callback._callback||c&&c!==e.context)&&d.push(e);d.length||delete this._events[a]}return this},trigger:function(a){if(!this._events)return this;var b=j.call(arguments,1);if(!n(this,"trigger",a,b))return this;var c=this._events[a],d=this._events.all;return c&&o(c,b),d&&o(d,arguments),this},stopListening:function(a,b,c){var d=this._listeners;if(!d)return this;var e=!b&&!c;"object"==typeof b&&(c=this),a&&((d={})[a._listenerId]=a);for(var f in d)d[f].off(b,c,this),e&&delete this._listeners[f];return this}};var m=/\s+/,n=function(a,b,c,d){if(!c)return!0;if("object"==typeof c){for(var e in c)a[b].apply(a,[e,c[e]].concat(d));return!1}if(m.test(c)){for(var f=c.split(m),g=0,h=f.length;g<h;g++)a[b].apply(a,[f[g]].concat(d));return!1}return!0},o=function(a,b){var c,d=-1,e=a.length,f=b[0],g=b[1],h=b[2];switch(b.length){case 0:for(;++d<e;)(c=a[d]).callback.call(c.ctx);return;case 1:for(;++d<e;)(c=a[d]).callback.call(c.ctx,f);return;case 2:for(;++d<e;)(c=a[d]).callback.call(c.ctx,f,g);return;case 3:for(;++d<e;)(c=a[d]).callback.call(c.ctx,f,g,h);return;default:for(;++d<e;)(c=a[d]).callback.apply(c.ctx,b)}},p={listenTo:"on",listenToOnce:"once"};l.each(p,function(a,b){d[b]=function(b,c,d){var e=this._listeners||(this._listeners={}),f=b._listenerId||(b._listenerId=l.uniqueId("l"));return e[f]=b,"object"==typeof c&&(d=this),b[a](c,d,this),this}}),d.bind=d.on,d.unbind=d.off,d.mixin=function(a){var b=["on","once","off","trigger","stopListening","listenTo","listenToOnce","bind","unbind"];return l.each(b,function(b){a[b]=this[b]},this),a},"function"==typeof define?define(function(){return d}):"undefined"!=typeof c?("undefined"!=typeof b&&b.exports&&(c=b.exports=d),c.BackboneEvents=d):e.BackboneEvents=d}(this)},{}],4:[function(a,b,c){b.exports=a("./backbone-events-standalone")},{"./backbone-events-standalone":3}],5:[function(a,b,c){var d,e;e=a("nets"),b.exports=d=function(){function a(){}return a.read=function(a,b){var c;return c=function(a){return function(c,d,e){return a._onRetrieval(e,b)}}(this),e(a,c)},a._onRetrieval=function(a,b){var c;return c=this.parse(a),b(c)},a}()},{nets:12}],6:[function(a,b,c){var d,e,f,g,h={}.hasOwnProperty,i=function(a,b){function c(){this.constructor=a}for(var d in b)h.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};g=a("./strings"),e=a("./generic_reader"),f=a("biojs-model").seq,b.exports=d=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}return i(b,a),b.parse=function(a){var b,c,d,e,h,i,j,k,l,m;for(k=[],"[object Array]"!==Object.prototype.toString.call(a)&&(a=a.split("\n")),
|
14
14
|
l=0,m=a.length;l<m;l++)if(j=a[l],">"===j[0]||";"===j[0]){if(i=j.slice(1),b=new f("",i,k.length),k.push(b),g.contains("|",j)){for(e=i.split("|"),h=1;h<e.length;)c=e[h],d=e[h+1],b.meta[c]=d,h+=2;b.name=e[e.length-1]}}else b.seq+=j;return k},b}(e)},{"./generic_reader":5,"./strings":7,"biojs-model":10}],7:[function(a,b,c){var d;d={contains:function(a,b){return"".indexOf.call(a,b,0)!==-1}},b.exports=d},{}],8:[function(a,b,c){var d;d={},d.splitNChars=function(a,b){var c,d,e,f;for(d=[],c=e=0,f=a.length-1;b>0?e<=f:e>=f;c=e+=b)d.push(a.substr(c,b));return d},b.exports=d},{}],9:[function(a,b,c){var d,e;e=a("./utils"),b.exports=d=function(){function a(){}return a.export=function(a,b){var c,d,f,g;for(d="",f=0,g=a.length;f<g;f++)c=a[f],null!=b&&(c=b(c)),d+=">"+c.name+"\n",d+=e.splitNChars(c.seq,80).join("\n"),d+="\n";return d},a}()},{"./utils":8}],10:[function(a,b,c){b.exports.seq=a("./seq")},{"./seq":11}],11:[function(a,b,c){b.exports=function(a,b,c){this.seq=a,this.name=b,this.id=c,this.meta={}}},{}],12:[function(a,b,c){function d(a,b,c){e(a,b,c)}var e=a("request");b.exports=d},{request:13}],13:[function(a,b,c){function d(a,b){function c(){4===p.readyState&&x()}function d(){var a=null;if(p.response?a=p.response:"text"!==p.responseType&&p.responseType||(a=p.responseText||p.responseXML),w)try{a=JSON.parse(a)}catch(a){}return a}function f(){return 1223===p.status?204:p.status}function l(a,b){var c=null;if(0===a||a>=400&&a<600){var d="string"==typeof b&&b||i[String(a).charAt(0)];c=new Error(d),c.statusCode=a}return c}function m(){var a=f(),c=d(),e=l(a,c),g={body:c,statusCode:a,statusText:p.statusText,raw:p};p.getAllResponseHeaders?g.headers=h(p.getAllResponseHeaders()):g.headers={},b(e,g,g.body)}function n(){var a=f(),c=l(a);p.status=p.statusCode=a,p.body=d(),p.headers=h(p.getAllResponseHeaders()),b(c,p,p.body)}function o(a){b(a,p)}"string"==typeof a&&(a={uri:a}),a=a||{},b=g(b);var p=a.xhr||null;p||(p=a.cors||a.useXDR?new k:new j);var q,r=p.url=a.uri||a.url,s=p.method=a.method||"GET",t=a.body||a.data,u=p.headers=a.headers||{},v=!!a.sync,w=!1,x=a.response?m:n;if("json"in a&&(w=!0,u.Accept="application/json","GET"!==s&&"HEAD"!==s&&(u["Content-Type"]="application/json",t=JSON.stringify(a.json))),p.onreadystatechange=c,p.onload=x,p.onerror=o,p.onprogress=function(){},p.ontimeout=e,p.open(s,r,!v),(a.withCredentials||a.cors&&a.withCredentials!==!1)&&(p.withCredentials=!0),v||(p.timeout="timeout"in a?a.timeout:5e3),p.setRequestHeader)for(q in u)u.hasOwnProperty(q)&&p.setRequestHeader(q,u[q]);else if(a.headers)throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in a&&(p.responseType=a.responseType),"beforeSend"in a&&"function"==typeof a.beforeSend&&a.beforeSend(p),p.send(t),p}function e(){}var f=a("global/window"),g=a("once"),h=a("parse-headers"),i={0:"Internal XMLHttpRequest Error",4:"4xx Client Error",5:"5xx Server Error"},j=f.XMLHttpRequest||e,k="withCredentials"in new j?j:f.XDomainRequest;b.exports=d},{"global/window":14,once:15,"parse-headers":19}],14:[function(a,b,c){(function(a){"undefined"!=typeof window?b.exports=window:"undefined"!=typeof a?b.exports=a:"undefined"!=typeof self?b.exports=self:b.exports={}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],15:[function(a,b,c){function d(a){var b=!1;return function(){if(!b)return b=!0,a.apply(this,arguments)}}b.exports=d,d.proto=d(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return d(this)},configurable:!0})})},{}],16:[function(a,b,c){function d(a,b,c){if(!h(b))throw new TypeError("iterator must be a function");arguments.length<3&&(c=this),"[object Array]"===i.call(a)?e(a,b,c):"string"==typeof a?f(a,b,c):g(a,b,c)}function e(a,b,c){for(var d=0,e=a.length;d<e;d++)j.call(a,d)&&b.call(c,a[d],d,a)}function f(a,b,c){for(var d=0,e=a.length;d<e;d++)b.call(c,a.charAt(d),d,a)}function g(a,b,c){for(var d in a)j.call(a,d)&&b.call(c,a[d],d,a)}var h=a("is-function");b.exports=d;var i=Object.prototype.toString,j=Object.prototype.hasOwnProperty},{"is-function":17}],17:[function(a,b,c){function d(a){var b=e.call(a);return"[object Function]"===b||"function"==typeof a&&"[object RegExp]"!==b||"undefined"!=typeof window&&(a===window.setTimeout||a===window.alert||a===window.confirm||a===window.prompt)}b.exports=d;var e=Object.prototype.toString},{}],18:[function(a,b,c){function d(a){return a.replace(/^\s*|\s*$/g,"")}c=b.exports=d,c.left=function(a){return a.replace(/^\s*/,"")},c.right=function(a){return a.replace(/\s*$/,"")}},{}],19:[function(a,b,c){var d=a("trim"),e=a("for-each"),f=function(a){return"[object Array]"===Object.prototype.toString.call(a)};b.exports=function(a){if(!a)return{};var b={};return e(d(a).split("\n"),function(a){var c=a.indexOf(":"),e=d(a.slice(0,c)).toLowerCase(),g=d(a.slice(c+1));"undefined"==typeof b[e]?b[e]=g:f(b[e])?b[e].push(g):b[e]=[b[e],g]}),b}},{"for-each":16,trim:18}],20:[function(a,b,c){b.exports=a("./jquery.browser")},{"./jquery.browser":21}],21:[function(a,b,c){var d,e,f=function(a){a=a.toLowerCase();var b=/(opr)[\/]([\w.]+)/.exec(a)||/(chrome)[ \/]([\w.]+)/.exec(a)||/(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[],c=/(ipad)/.exec(a)||/(iphone)/.exec(a)||/(android)/.exec(a)||/(windows phone)/.exec(a)||/(win)/.exec(a)||/(mac)/.exec(a)||/(linux)/.exec(a)||/(cros)/i.exec(a)||[];return{browser:b[3]||b[1]||"",version:b[2]||"0",platform:c[0]||""}};if(d=f(window.navigator.userAgent),e={},e.uaMatch=f,d.browser&&(e[d.browser]=!0,e.version=d.version,e.versionNumber=parseInt(d.version)),d.platform&&(e[d.platform]=!0),(e.android||e.ipad||e.iphone||e["windows phone"])&&(e.mobile=!0),(e.cros||e.mac||e.linux||e.win)&&(e.desktop=!0),(e.chrome||e.opr||e.safari)&&(e.webkit=!0),e.rv){var g="msie";d.browser=g,e[g]=!0}if(e.opr){var h="opera";d.browser=h,e[h]=!0}if(e.safari&&e.android){var i="android";d.browser=i,e[i]=!0}e.name=d.browser,e.platform=d.platform,b.exports=e},{}],22:[function(a,b,c){(function(a){function c(a,b,c){for(;b&&b!==Object.prototype&&(d(b).forEach(function(c){if(".class"!=c&&!a.hasOwnProperty(c)){var d=g(b,c);h(a,c,d)}}),!c);)b=b.__proto__;return a}function e(a,b){for(;a;){if(a.type.prototype===b.prototype)return!0;for(var c in a.implements){var d=a.implements[c],f=d[".class.meta"];if(f){if(e(f,b))return!0}else for(var g=d.prototype;g;g=g.__proto__)if(g===b.prototype)return!0}a=a.base?a.base[".class.meta"]:void 0}return!1}var f=function a(b,c,d){"function"!=typeof b&&(d=c,c=b,b=Object),c||(c={}),d||(d={});var e={name:d.name,base:b,implements:[]},f=a.clone(c);d.implements&&(Array.isArray(d.implements)?d.implements:[d.implements]).forEach(function(b){"function"==typeof b&&b.prototype&&(e.implements.push(b),a.extend(f,b.prototype))}),f.__proto__=b.prototype;var g=function(){"function"==typeof this.constructor&&this.constructor.apply(this,arguments)};return e.type=g,g.prototype=f,Object.defineProperty(g,".class.meta",{value:e,enumerable:!1,configurable:!1,writable:!1}),Object.defineProperty(f,".class",{value:g,enumerable:!1,configurable:!1,writable:!1}),d.statics&&a.extend(g,d.statics),g};f.extend=c,f.clone=function(a){return c({},a)};var i=f({constructor:function(a){this.object=a},typeOf:function(a){if(this.object instanceof a)return!0;var b=f.typeInfo(this.object);return b&&e(b,a)}});i.prototype.a=i.prototype.typeOf,i.prototype.an=i.prototype.typeOf,f.is=function(a){return new i(a)},f.typeInfo=function(a){var b=a.__proto__[".class"];return b?b[".class.meta"]:void 0},f.VERSION=[0,0,2],b?b.exports=f:a.Class=f}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],"biojs-io-fasta":[function(a,b,c){b.exports.parse=a("./parser"),b.exports.writer=a("./writer")},{"./parser":6,"./writer":9}],"biojs-vis-sequence":[function(a,b,c){b.exports=a("./lib/index")},{"./lib/index":1}]},{},["biojs-vis-sequence"])}}}),c.registerDynamic("3d",[],!0,function(a,b,c){"format cjs";this||self;(function(){function a(a){function b(b,c,d,e,f,g){for(;f>=0&&f<g;f+=a){var h=e?e[f]:f;d=c(d,b[h],h,b)}return d}return function(c,d,e,f){d=v(d,f,4);var g=!C(c)&&u.keys(c),h=(g||c).length,i=a>0?0:h-1;return arguments.length<3&&(e=c[g?g[i]:i],i+=a),b(c,d,e,g,i,h)}}function d(a){return function(b,c,d){c=w(c,d);for(var e=B(b),f=a>0?0:e-1;f>=0&&f<e;f+=a)if(c(b[f],f,b))return f;return-1}}function e(a,b,c){return function(d,e,f){var g=0,h=B(d);if("number"==typeof f)a>0?g=f>=0?f:Math.max(f+h,g):h=f>=0?Math.min(f+1,h):f+h+1;else if(c&&f&&h)return f=c(d,e),d[f]===e?f:-1;if(e!==e)return f=b(m.call(d,g,h),u.isNaN),f>=0?f+g:-1;for(f=a>0?g:h-1;f>=0&&f<h;f+=a)if(d[f]===e)return f;return-1}}function f(a,b){var c=H.length,d=a.constructor,e=u.isFunction(d)&&d.prototype||j,f="constructor";for(u.has(a,f)&&!u.contains(b,f)&&b.push(f);c--;)f=H[c],f in a&&a[f]!==e[f]&&!u.contains(b,f)&&b.push(f)}var g=this,h=g._,i=Array.prototype,j=Object.prototype,k=Function.prototype,l=i.push,m=i.slice,n=j.toString,o=j.hasOwnProperty,p=Array.isArray,q=Object.keys,r=k.bind,s=Object.create,t=function(){},u=function(a){return a instanceof u?a:this instanceof u?void(this._wrapped=a):new u(a)};"undefined"!=typeof b?("undefined"!=typeof c&&c.exports&&(b=c.exports=u),b._=u):g._=u,u.VERSION="1.8.3";var v=function(a,b,c){if(void 0===b)return a;switch(null==c?3:c){case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)};case 4:return function(c,d,e,f){return a.call(b,c,d,e,f)}}return function(){return a.apply(b,arguments)}},w=function(a,b,c){return null==a?u.identity:u.isFunction(a)?v(a,b,c):u.isObject(a)?u.matcher(a):u.property(a)};u.iteratee=function(a,b){return w(a,b,1/0)};var x=function(a,b){return function(c){var d=arguments.length;if(d<2||null==c)return c;for(var e=1;e<d;e++)for(var f=arguments[e],g=a(f),h=g.length,i=0;i<h;i++){var j=g[i];b&&void 0!==c[j]||(c[j]=f[j])}return c}},y=function(a){if(!u.isObject(a))return{};if(s)return s(a);t.prototype=a;var b=new t;return t.prototype=null,b},z=function(a){return function(b){return null==b?void 0:b[a]}},A=Math.pow(2,53)-1,B=z("length"),C=function(a){var b=B(a);return"number"==typeof b&&b>=0&&b<=A};u.each=u.forEach=function(a,b,c){b=v(b,c);var d,e;if(C(a))for(d=0,e=a.length;d<e;d++)b(a[d],d,a);else{var f=u.keys(a);for(d=0,e=f.length;d<e;d++)b(a[f[d]],f[d],a)}return a},u.map=u.collect=function(a,b,c){b=w(b,c);for(var d=!C(a)&&u.keys(a),e=(d||a).length,f=Array(e),g=0;g<e;g++){var h=d?d[g]:g;f[g]=b(a[h],h,a)}return f},u.reduce=u.foldl=u.inject=a(1),u.reduceRight=u.foldr=a(-1),u.find=u.detect=function(a,b,c){var d;if(d=C(a)?u.findIndex(a,b,c):u.findKey(a,b,c),void 0!==d&&d!==-1)return a[d]},u.filter=u.select=function(a,b,c){var d=[];return b=w(b,c),u.each(a,function(a,c,e){b(a,c,e)&&d.push(a)}),d},u.reject=function(a,b,c){return u.filter(a,u.negate(w(b)),c)},u.every=u.all=function(a,b,c){b=w(b,c);for(var d=!C(a)&&u.keys(a),e=(d||a).length,f=0;f<e;f++){var g=d?d[f]:f;if(!b(a[g],g,a))return!1}return!0},u.some=u.any=function(a,b,c){b=w(b,c);for(var d=!C(a)&&u.keys(a),e=(d||a).length,f=0;f<e;f++){var g=d?d[f]:f;if(b(a[g],g,a))return!0}return!1},u.contains=u.includes=u.include=function(a,b,c,d){return C(a)||(a=u.values(a)),("number"!=typeof c||d)&&(c=0),u.indexOf(a,b,c)>=0},u.invoke=function(a,b){var c=m.call(arguments,2),d=u.isFunction(b);return u.map(a,function(a){var e=d?b:a[b];return null==e?e:e.apply(a,c)})},u.pluck=function(a,b){return u.map(a,u.property(b))},u.where=function(a,b){return u.filter(a,u.matcher(b))},u.findWhere=function(a,b){return u.find(a,u.matcher(b))},u.max=function(a,b,c){var d,e,f=-(1/0),g=-(1/0);if(null==b&&null!=a){a=C(a)?a:u.values(a);for(var h=0,i=a.length;h<i;h++)d=a[h],d>f&&(f=d)}else b=w(b,c),u.each(a,function(a,c,d){e=b(a,c,d),(e>g||e===-(1/0)&&f===-(1/0))&&(f=a,g=e)});return f},u.min=function(a,b,c){var d,e,f=1/0,g=1/0;if(null==b&&null!=a){a=C(a)?a:u.values(a);for(var h=0,i=a.length;h<i;h++)d=a[h],d<f&&(f=d)}else b=w(b,c),u.each(a,function(a,c,d){e=b(a,c,d),(e<g||e===1/0&&f===1/0)&&(f=a,g=e)});return f},u.shuffle=function(a){for(var b,c=C(a)?a:u.values(a),d=c.length,e=Array(d),f=0;f<d;f++)b=u.random(0,f),b!==f&&(e[f]=e[b]),e[b]=c[f];return e},u.sample=function(a,b,c){return null==b||c?(C(a)||(a=u.values(a)),a[u.random(a.length-1)]):u.shuffle(a).slice(0,Math.max(0,b))},u.sortBy=function(a,b,c){return b=w(b,c),u.pluck(u.map(a,function(a,c,d){return{value:a,index:c,criteria:b(a,c,d)}}).sort(function(a,b){var c=a.criteria,d=b.criteria;if(c!==d){if(c>d||void 0===c)return 1;if(c<d||void 0===d)return-1}return a.index-b.index}),"value")};var D=function(a){return function(b,c,d){var e={};return c=w(c,d),u.each(b,function(d,f){var g=c(d,f,b);a(e,d,g)}),e}};u.groupBy=D(function(a,b,c){u.has(a,c)?a[c].push(b):a[c]=[b]}),u.indexBy=D(function(a,b,c){a[c]=b}),u.countBy=D(function(a,b,c){u.has(a,c)?a[c]++:a[c]=1}),u.toArray=function(a){return a?u.isArray(a)?m.call(a):C(a)?u.map(a,u.identity):u.values(a):[]},u.size=function(a){return null==a?0:C(a)?a.length:u.keys(a).length},u.partition=function(a,b,c){b=w(b,c);var d=[],e=[];return u.each(a,function(a,c,f){(b(a,c,f)?d:e).push(a)}),[d,e]},u.first=u.head=u.take=function(a,b,c){if(null!=a)return null==b||c?a[0]:u.initial(a,a.length-b)},u.initial=function(a,b,c){return m.call(a,0,Math.max(0,a.length-(null==b||c?1:b)))},u.last=function(a,b,c){if(null!=a)return null==b||c?a[a.length-1]:u.rest(a,Math.max(0,a.length-b))},u.rest=u.tail=u.drop=function(a,b,c){return m.call(a,null==b||c?1:b)},u.compact=function(a){return u.filter(a,u.identity)};var E=function(a,b,c,d){for(var e=[],f=0,g=d||0,h=B(a);g<h;g++){var i=a[g];if(C(i)&&(u.isArray(i)||u.isArguments(i))){b||(i=E(i,b,c));var j=0,k=i.length;for(e.length+=k;j<k;)e[f++]=i[j++]}else c||(e[f++]=i)}return e};u.flatten=function(a,b){return E(a,b,!1)},u.without=function(a){return u.difference(a,m.call(arguments,1))},u.uniq=u.unique=function(a,b,c,d){u.isBoolean(b)||(d=c,c=b,b=!1),null!=c&&(c=w(c,d));for(var e=[],f=[],g=0,h=B(a);g<h;g++){var i=a[g],j=c?c(i,g,a):i;b?(g&&f===j||e.push(i),f=j):c?u.contains(f,j)||(f.push(j),e.push(i)):u.contains(e,i)||e.push(i)}return e},u.union=function(){return u.uniq(E(arguments,!0,!0))},u.intersection=function(a){for(var b=[],c=arguments.length,d=0,e=B(a);d<e;d++){var f=a[d];if(!u.contains(b,f)){for(var g=1;g<c&&u.contains(arguments[g],f);g++);g===c&&b.push(f)}}return b},u.difference=function(a){var b=E(arguments,!0,!0,1);return u.filter(a,function(a){return!u.contains(b,a)})},u.zip=function(){return u.unzip(arguments)},u.unzip=function(a){for(var b=a&&u.max(a,B).length||0,c=Array(b),d=0;d<b;d++)c[d]=u.pluck(a,d);return c},u.object=function(a,b){for(var c={},d=0,e=B(a);d<e;d++)b?c[a[d]]=b[d]:c[a[d][0]]=a[d][1];return c},u.findIndex=d(1),u.findLastIndex=d(-1),u.sortedIndex=function(a,b,c,d){c=w(c,d,1);for(var e=c(b),f=0,g=B(a);f<g;){var h=Math.floor((f+g)/2);c(a[h])<e?f=h+1:g=h}return f},u.indexOf=e(1,u.findIndex,u.sortedIndex),u.lastIndexOf=e(-1,u.findLastIndex),u.range=function(a,b,c){null==b&&(b=a||0,a=0),c=c||1;for(var d=Math.max(Math.ceil((b-a)/c),0),e=Array(d),f=0;f<d;f++,a+=c)e[f]=a;return e};var F=function(a,b,c,d,e){if(!(d instanceof b))return a.apply(c,e);var f=y(a.prototype),g=a.apply(f,e);return u.isObject(g)?g:f};u.bind=function(a,b){if(r&&a.bind===r)return r.apply(a,m.call(arguments,1));if(!u.isFunction(a))throw new TypeError("Bind must be called on a function");var c=m.call(arguments,2),d=function(){return F(a,d,b,this,c.concat(m.call(arguments)))};return d},u.partial=function(a){var b=m.call(arguments,1),c=function(){for(var d=0,e=b.length,f=Array(e),g=0;g<e;g++)f[g]=b[g]===u?arguments[d++]:b[g];for(;d<arguments.length;)f.push(arguments[d++]);return F(a,c,this,this,f)};return c},u.bindAll=function(a){var b,c,d=arguments.length;if(d<=1)throw new Error("bindAll must be passed function names");for(b=1;b<d;b++)c=arguments[b],a[c]=u.bind(a[c],a);return a},u.memoize=function(a,b){var c=function(d){var e=c.cache,f=""+(b?b.apply(this,arguments):d);return u.has(e,f)||(e[f]=a.apply(this,arguments)),e[f]};return c.cache={},c},u.delay=function(a,b){var c=m.call(arguments,2);return setTimeout(function(){return a.apply(null,c)},b)},u.defer=u.partial(u.delay,u,1),u.throttle=function(a,b,c){var d,e,f,g=null,h=0;c||(c={});var i=function(){h=c.leading===!1?0:u.now(),g=null,f=a.apply(d,e),g||(d=e=null)};return function(){var j=u.now();h||c.leading!==!1||(h=j);var k=b-(j-h);return d=this,e=arguments,k<=0||k>b?(g&&(clearTimeout(g),g=null),h=j,f=a.apply(d,e),g||(d=e=null)):g||c.trailing===!1||(g=setTimeout(i,k)),f}},u.debounce=function(a,b,c){var d,e,f,g,h,i=function(){var j=u.now()-g;j<b&&j>=0?d=setTimeout(i,b-j):(d=null,c||(h=a.apply(f,e),d||(f=e=null)))};return function(){f=this,e=arguments,g=u.now();var j=c&&!d;return d||(d=setTimeout(i,b)),j&&(h=a.apply(f,e),f=e=null),h}},u.wrap=function(a,b){return u.partial(b,a)},u.negate=function(a){return function(){return!a.apply(this,arguments)}},u.compose=function(){var a=arguments,b=a.length-1;return function(){for(var c=b,d=a[b].apply(this,arguments);c--;)d=a[c].call(this,d);return d}},u.after=function(a,b){return function(){if(--a<1)return b.apply(this,arguments)}},u.before=function(a,b){var c;return function(){return--a>0&&(c=b.apply(this,arguments)),a<=1&&(b=null),c}},u.once=u.partial(u.before,2);var G=!{toString:null}.propertyIsEnumerable("toString"),H=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];u.keys=function(a){if(!u.isObject(a))return[];if(q)return q(a);var b=[];for(var c in a)u.has(a,c)&&b.push(c);return G&&f(a,b),b},u.allKeys=function(a){if(!u.isObject(a))return[];var b=[];for(var c in a)b.push(c);return G&&f(a,b),b},u.values=function(a){for(var b=u.keys(a),c=b.length,d=Array(c),e=0;e<c;e++)d[e]=a[b[e]];return d},u.mapObject=function(a,b,c){b=w(b,c);for(var d,e=u.keys(a),f=e.length,g={},h=0;h<f;h++)d=e[h],g[d]=b(a[d],d,a);return g},u.pairs=function(a){for(var b=u.keys(a),c=b.length,d=Array(c),e=0;e<c;e++)d[e]=[b[e],a[b[e]]];return d},u.invert=function(a){for(var b={},c=u.keys(a),d=0,e=c.length;d<e;d++)b[a[c[d]]]=c[d];return b},u.functions=u.methods=function(a){var b=[];for(var c in a)u.isFunction(a[c])&&b.push(c);return b.sort()},u.extend=x(u.allKeys),u.extendOwn=u.assign=x(u.keys),u.findKey=function(a,b,c){b=w(b,c);for(var d,e=u.keys(a),f=0,g=e.length;f<g;f++)if(d=e[f],b(a[d],d,a))return d},u.pick=function(a,b,c){var d,e,f={},g=a;if(null==g)return f;u.isFunction(b)?(e=u.allKeys(g),d=v(b,c)):(e=E(arguments,!1,!1,1),d=function(a,b,c){return b in c},g=Object(g));for(var h=0,i=e.length;h<i;h++){var j=e[h],k=g[j];d(k,j,g)&&(f[j]=k)}return f},u.omit=function(a,b,c){if(u.isFunction(b))b=u.negate(b);else{var d=u.map(E(arguments,!1,!1,1),String);b=function(a,b){return!u.contains(d,b)}}return u.pick(a,b,c)},u.defaults=x(u.allKeys,!0),u.create=function(a,b){var c=y(a);return b&&u.extendOwn(c,b),c},u.clone=function(a){return u.isObject(a)?u.isArray(a)?a.slice():u.extend({},a):a},u.tap=function(a,b){return b(a),a},u.isMatch=function(a,b){var c=u.keys(b),d=c.length;if(null==a)return!d;for(var e=Object(a),f=0;f<d;f++){var g=c[f];if(b[g]!==e[g]||!(g in e))return!1}return!0};var I=function(a,b,c,d){if(a===b)return 0!==a||1/a===1/b;if(null==a||null==b)return a===b;a instanceof u&&(a=a._wrapped),b instanceof u&&(b=b._wrapped);var e=n.call(a);if(e!==n.call(b))return!1;switch(e){case"[object RegExp]":case"[object String]":return""+a==""+b;case"[object Number]":return+a!==+a?+b!==+b:0===+a?1/+a===1/b:+a===+b;case"[object Date]":case"[object Boolean]":return+a===+b}var f="[object Array]"===e;if(!f){if("object"!=typeof a||"object"!=typeof b)return!1;var g=a.constructor,h=b.constructor;if(g!==h&&!(u.isFunction(g)&&g instanceof g&&u.isFunction(h)&&h instanceof h)&&"constructor"in a&&"constructor"in b)return!1}c=c||[],d=d||[];for(var i=c.length;i--;)if(c[i]===a)return d[i]===b;if(c.push(a),d.push(b),f){if(i=a.length,i!==b.length)return!1;for(;i--;)if(!I(a[i],b[i],c,d))return!1}else{var j,k=u.keys(a);if(i=k.length,u.keys(b).length!==i)return!1;for(;i--;)if(j=k[i],!u.has(b,j)||!I(a[j],b[j],c,d))return!1}return c.pop(),d.pop(),!0};u.isEqual=function(a,b){return I(a,b)},u.isEmpty=function(a){return null==a||(C(a)&&(u.isArray(a)||u.isString(a)||u.isArguments(a))?0===a.length:0===u.keys(a).length)},u.isElement=function(a){return!(!a||1!==a.nodeType)},u.isArray=p||function(a){return"[object Array]"===n.call(a)},u.isObject=function(a){var b=typeof a;return"function"===b||"object"===b&&!!a},u.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(a){u["is"+a]=function(b){return n.call(b)==="[object "+a+"]"}}),u.isArguments(arguments)||(u.isArguments=function(a){return u.has(a,"callee")}),"function"!=typeof/./&&"object"!=typeof Int8Array&&(u.isFunction=function(a){return"function"==typeof a||!1}),u.isFinite=function(a){return isFinite(a)&&!isNaN(parseFloat(a))},u.isNaN=function(a){return u.isNumber(a)&&a!==+a},u.isBoolean=function(a){return a===!0||a===!1||"[object Boolean]"===n.call(a)},u.isNull=function(a){return null===a},u.isUndefined=function(a){return void 0===a},u.has=function(a,b){return null!=a&&o.call(a,b)},u.noConflict=function(){return g._=h,this},u.identity=function(a){return a},u.constant=function(a){return function(){return a}},u.noop=function(){},u.property=z,u.propertyOf=function(a){return null==a?function(){}:function(b){return a[b]}},u.matcher=u.matches=function(a){return a=u.extendOwn({},a),function(b){return u.isMatch(b,a)}},u.times=function(a,b,c){var d=Array(Math.max(0,a));b=v(b,c,1);for(var e=0;e<a;e++)d[e]=b(e);return d},u.random=function(a,b){return null==b&&(b=a,a=0),a+Math.floor(Math.random()*(b-a+1))},u.now=Date.now||function(){return(new Date).getTime()};var J={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},K=u.invert(J),L=function(a){var b=function(b){return a[b]},c="(?:"+u.keys(a).join("|")+")",d=RegExp(c),e=RegExp(c,"g");return function(a){return a=null==a?"":""+a,d.test(a)?a.replace(e,b):a}};u.escape=L(J),u.unescape=L(K),u.result=function(a,b,c){var d=null==a?void 0:a[b];return void 0===d&&(d=c),u.isFunction(d)?d.call(a):d};var M=0;u.uniqueId=function(a){var b=++M+"";return a?a+b:b},u.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var N=/(.)^/,O={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},P=/\\|'|\r|\n|\u2028|\u2029/g,Q=function(a){return"\\"+O[a]};u.template=function(a,b,c){!b&&c&&(b=c),b=u.defaults({},b,u.templateSettings);var d=RegExp([(b.escape||N).source,(b.interpolate||N).source,(b.evaluate||N).source].join("|")+"|$","g"),e=0,f="__p+='";a.replace(d,function(b,c,d,g,h){return f+=a.slice(e,h).replace(P,Q),e=h+b.length,c?f+="'+\n((__t=("+c+"))==null?'':_.escape(__t))+\n'":d?f+="'+\n((__t=("+d+"))==null?'':__t)+\n'":g&&(f+="';\n"+g+"\n__p+='"),b}),f+="';\n",b.variable||(f="with(obj||{}){\n"+f+"}\n"),f="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+f+"return __p;\n";try{var g=new Function(b.variable||"obj","_",f)}catch(a){throw a.source=f,a}var h=function(a){return g.call(this,a,u)},i=b.variable||"obj";return h.source="function("+i+"){\n"+f+"}",h},u.chain=function(a){var b=u(a);return b._chain=!0,b};var R=function(a,b){return a._chain?u(b).chain():b};u.mixin=function(a){u.each(u.functions(a),function(b){var c=u[b]=a[b];u.prototype[b]=function(){var a=[this._wrapped];return l.apply(a,arguments),R(this,c.apply(u,a))}})},u.mixin(u),u.each(["pop","push","reverse","shift","sort","splice","unshift"],function(a){var b=i[a];u.prototype[a]=function(){var c=this._wrapped;return b.apply(c,arguments),"shift"!==a&&"splice"!==a||0!==c.length||delete c[0],R(this,c)}}),u.each(["concat","join","slice"],function(a){var b=i[a];u.prototype[a]=function(){return R(this,b.apply(this._wrapped,arguments))}}),u.prototype.value=function(){return this._wrapped},u.prototype.valueOf=u.prototype.toJSON=u.prototype.value,u.prototype.toString=function(){return""+this._wrapped}}).call(this)}),c.registerDynamic("17",["3d"],!0,function(a,b,c){this||self;c.exports=a("3d")}),c.register("3e",["17","22","23","2a","2b","3a","1a"],function(a){var b,c,d,e,f,g,h,i;return{setters:[function(a){b=a.default},function(a){c=a.default},function(a){d=a.default},function(a){e=a.default},function(a){f=a.default},function(a){},function(a){g=a.default}],execute:function(){h=function(a){function h(a){d(this,h),e(Object.getPrototypeOf(h.prototype),"constructor",this).call(this,a),this.state={error_msgs:[],sequences:[],requestCompleted:!1}}return f(h,a),c(h,[{key:"render",value:function(){return g.createElement("div",{className:"modal sequence-viewer",ref:"modal",tabIndex:"-1"},g.createElement("div",{className:"modal-dialog"},g.createElement("div",{className:"modal-content"},g.createElement("div",{className:"modal-header"},g.createElement("h3",null,"View sequence")),this.state.requestCompleted&&this.resultsJSX()||this.loadingJSX())))}},{key:"modal",value:function(){return $(g.findDOMNode(this.refs.modal))}},{key:"show",value:function(a){var b=this;this.setState({requestCompleted:!1},function(){b.modal().modal("show"),b.loadJSON(a)})}},{key:"hide",value:function(){this.modal().modal("hide")}},{key:"loadJSON",value:function(a){var c=this;$.getJSON(a).done(b.bind(function(a){this.setState({sequences:a.sequences,error_msgs:a.error_msgs,requestCompleted:!0})},this)).fail(function(a,b,d){c.hide(),c.props.showErrorModal(a.responseJSON)})}},{key:"resultsJSX",value:function(){return g.createElement("div",{className:"modal-body"},b.map(this.state.error_msgs,b.bind(function(a){return g.createElement("div",{className:"fastan"},g.createElement("div",{className:"section-header"},g.createElement("h4",null,a[0])),g.createElement("div",{className:"section-content"},g.createElement("pre",{className:"pre-reset"},a[1])))},this)),b.map(this.state.sequences,b.bind(function(a){return g.createElement(i,{sequence:a})},this)))}},{key:"loadingJSX",value:function(){return g.createElement("div",{className:"modal-body text-center"},g.createElement("i",{className:"fa fa-spinner fa-3x fa-spin"}))}}]),h}(g.Component),a("default",h),i=function(a){function b(){d(this,b),e(Object.getPrototypeOf(b.prototype),"constructor",this).apply(this,arguments)}return f(b,a),c(b,[{key:"render",value:function(){return this.widgetID=this.widgetClass+"-"+(new Date).getUTCMilliseconds(),g.createElement("div",{className:"fastan"},g.createElement("div",{className:"section-header"},g.createElement("h4",null,this.props.sequence.id,g.createElement("small",null," ",this.props.sequence.title))),g.createElement("div",{className:"section-content"},g.createElement("div",{className:this.widgetClass,id:this.widgetID})))}},{key:"componentDidMount",value:function(){var a=new Sequence({sequence:this.props.sequence.value,target:this.widgetID,format:"PRIDE",columns:{size:40,spacedEach:0},formatOptions:{title:!1,footer:!1}});a.hideFormatSelector()}}],[{key:"widgetClass",value:function(){return"biojs-vis-sequence"}}]),b}(g.Component)}}}),c.registerDynamic("3f",[],!0,function(a,b,c){var d=(this||self,{}.toString);c.exports=function(a){return d.call(a).slice(8,-1)}}),c.registerDynamic("6",["3f"],!0,function(a,b,c){var d=(this||self,a("3f"));c.exports=0 in Object("z")?Object:function(a){return"String"==d(a)?a.split(""):Object(a)}}),c.registerDynamic("30",[],!0,function(a,b,c){this||self;c.exports=function(a){if(void 0==a)throw TypeError("Can't call method on "+a);return a}}),c.registerDynamic("35",["6","30"],!0,function(a,b,c){var d=(this||self,a("6")),e=a("30");c.exports=function(a){return d(e(a))}}),c.registerDynamic("40",[],!0,function(a,b,c){this||self;c.exports=function(a){try{return!!a()}catch(a){return!0}}}),c.registerDynamic("32",["8","a","40"],!0,function(a,b,c){this||self;c.exports=function(b,c){var d=a("8"),e=(a("a").Object||{})[b]||Object[b],f={};f[b]=c(e),d(d.S+d.F*a("40")(function(){e(1)}),"Object",f)}}),c.registerDynamic("41",["35","32"],!0,function(a,b,c){var d=(this||self,a("35"));a("32")("getOwnPropertyDescriptor",function(a){return function(b,c){return a(d(b),c)}})}),c.registerDynamic("42",["3","41"],!0,function(a,b,c){var d=(this||self,a("3"));a("41"),c.exports=function(a,b){return d.getDesc(a,b)}}),c.registerDynamic("3b",["42"],!0,function(a,b,c){this||self;c.exports={default:a("42"),__esModule:!0}}),c.registerDynamic("2a",["3b"],!0,function(a,b,c){"use strict";var d=(this||self,a("3b").default);b.default=function(a,b,c){for(var e=!0;e;){var f=a,g=b,h=c;i=k=j=void 0,e=!1,null===f&&(f=Function.prototype);var i=d(f,g);if(void 0!==i){if("value"in i)return i.value;var j=i.get;if(void 0===j)return;return j.call(h)}var k=Object.getPrototypeOf(f);if(null===k)return;a=k,b=g,c=h,e=!0}},b.__esModule=!0}),c.registerDynamic("43",["3"],!0,function(a,b,c){var d=(this||self,a("3"));c.exports=function(a,b){return d.create(a,b)}}),c.registerDynamic("44",["43"],!0,function(a,b,c){this||self;c.exports={default:a("43"),__esModule:!0}}),c.registerDynamic("45",[],!0,function(a,b,c){var d=this||self,e="undefined",d=c.exports=typeof window!=e&&window.Math==Math?window:typeof self!=e&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=d)}),c.registerDynamic("8",["45","a"],!0,function(a,b,c){var d=this||self,d=a("45"),e=a("a"),f="prototype",g=function(a,b){return function(){return a.apply(b,arguments)}},h=function(a,b,c){var i,j,k,l,m=a&h.G,n=a&h.P,o=m?d:a&h.S?d[b]:(d[b]||{})[f],p=m?e:e[b]||(e[b]={});m&&(c=b);for(i in c)j=!(a&h.F)&&o&&i in o,j&&i in p||(k=j?o[i]:c[i],m&&"function"!=typeof o[i]?l=c[i]:a&h.B&&j?l=g(k,d):a&h.W&&o[i]==k?!function(a){l=function(b){return this instanceof a?new a(b):a(b)},l[f]=a[f]}(k):l=n&&"function"==typeof k?g(Function.call,k):k,p[i]=l,n&&((p[f]||(p[f]={}))[i]=k))};h.F=1,h.G=2,h.S=4,h.P=8,h.B=16,h.W=32,c.exports=h}),c.registerDynamic("46",[],!0,function(a,b,c){this||self;c.exports=function(a){return null!==a&&("object"==typeof a||"function"==typeof a)}}),c.registerDynamic("47",["46"],!0,function(a,b,c){var d=(this||self,a("46"));c.exports=function(a){if(!d(a))throw TypeError(a+" is not an object!");return a}}),c.registerDynamic("48",[],!0,function(a,b,c){this||self;c.exports=function(a){if("function"!=typeof a)throw TypeError(a+" is not a function!");return a}}),c.registerDynamic("49",["48"],!0,function(a,b,c){var d=(this||self,a("48"));c.exports=function(a,b,c){if(d(a),void 0===b)return a;switch(c){case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}}}),c.registerDynamic("4a",["3","46","47","49"],!0,function(a,b,c){var d=(this||self,a("3").getDesc),e=a("46"),f=a("47"),g=function(a,b){if(f(a),!e(b)&&null!==b)throw TypeError(b+": can't set as prototype!")};c.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(b,c){try{c=a("49")(Function.call,d(Object.prototype,"__proto__").set,2),c({},[])}catch(a){b=!0}return function(a,d){return g(a,d),b?a.__proto__=d:c(a,d),a}}():void 0),check:g}}),c.registerDynamic("4b",["8","4a"],!0,function(a,b,c){var d=(this||self,a("8"));d(d.S,"Object",{setPrototypeOf:a("4a").set})}),c.registerDynamic("a",[],!0,function(a,b,c){var d=(this||self,c.exports={});"number"==typeof __e&&(__e=d)}),c.registerDynamic("4c",["4b","a"],!0,function(a,b,c){this||self;a("4b"),c.exports=a("a").Object.setPrototypeOf}),c.registerDynamic("4d",["4c"],!0,function(a,b,c){this||self;c.exports={default:a("4c"),__esModule:!0}}),c.registerDynamic("2b",["44","4d"],!0,function(a,b,c){"use strict";var d=(this||self,a("44").default),e=a("4d").default;b.default=function(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);
|
15
15
|
a.prototype=d(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(e?e(a,b):a.__proto__=b)},b.__esModule=!0}),c.registerDynamic("3",[],!0,function(a,b,c){var d=(this||self,Object);c.exports={create:d.create,getProto:d.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:d.getOwnPropertyDescriptor,setDesc:d.defineProperty,setDescs:d.defineProperties,getKeys:d.keys,getNames:d.getOwnPropertyNames,getSymbols:d.getOwnPropertySymbols,each:[].forEach}}),c.registerDynamic("4e",["3"],!0,function(a,b,c){var d=(this||self,a("3"));c.exports=function(a,b,c){return d.setDesc(a,b,c)}}),c.registerDynamic("3c",["4e"],!0,function(a,b,c){this||self;c.exports={default:a("4e"),__esModule:!0}}),c.registerDynamic("22",["3c"],!0,function(a,b,c){"use strict";var d=(this||self,a("3c").default);b.default=function(){function a(a,b){for(var c=0;c<b.length;c++){var e=b[c];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),d(a,e.key,e)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),b.__esModule=!0}),c.registerDynamic("23",[],!0,function(a,b,c){"use strict";this||self;b.default=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},b.__esModule=!0}),c.registerDynamic("4f",["50","51","52","53","54"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a,b){this.forEachFunction=a,this.forEachContext=b}function e(a,b,c,d){var e=a;e.forEachFunction.call(e.forEachContext,b,d)}function f(a,b,c){if(null==a)return a;var f=d.getPooled(b,c);n(a,e,f),d.release(f)}function g(a,b,c){this.mapResult=a,this.mapFunction=b,this.mapContext=c}function h(a,b,c,d){var e=a,f=e.mapResult,g=!f.hasOwnProperty(c);if(g){var h=e.mapFunction.call(e.mapContext,b,d);f[c]=h}}function i(a,b,c){if(null==a)return a;var d={},e=g.getPooled(d,b,c);return n(a,h,e),g.release(e),m.create(d)}function j(a,b,c,d){return null}function k(a,b){return n(a,j,null)}var l=a("50"),m=a("51"),n=a("52"),o=(a("53"),l.twoArgumentPooler),p=l.threeArgumentPooler;l.addPoolingTo(d,o),l.addPoolingTo(g,p);var q={forEach:f,map:i,count:k};c.exports=q}(a("54"))}),c.registerDynamic("55",[],!0,function(a,b,c){"use strict";function d(a,b,c){if(!a)return null;var d={};for(var f in a)e.call(a,f)&&(d[f]=b.call(c,a[f],f,a));return d}var e=(this||self,Object.prototype.hasOwnProperty);c.exports=d}),c.registerDynamic("56",["57","58","55","54"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a){return e.createFactory(a)}var e=a("57"),f=(a("58"),a("55")),g=f({a:"a",abbr:"abbr",address:"address",area:"area",article:"article",aside:"aside",audio:"audio",b:"b",base:"base",bdi:"bdi",bdo:"bdo",big:"big",blockquote:"blockquote",body:"body",br:"br",button:"button",canvas:"canvas",caption:"caption",cite:"cite",code:"code",col:"col",colgroup:"colgroup",data:"data",datalist:"datalist",dd:"dd",del:"del",details:"details",dfn:"dfn",dialog:"dialog",div:"div",dl:"dl",dt:"dt",em:"em",embed:"embed",fieldset:"fieldset",figcaption:"figcaption",figure:"figure",footer:"footer",form:"form",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",head:"head",header:"header",hr:"hr",html:"html",i:"i",iframe:"iframe",img:"img",input:"input",ins:"ins",kbd:"kbd",keygen:"keygen",label:"label",legend:"legend",li:"li",link:"link",main:"main",map:"map",mark:"mark",menu:"menu",menuitem:"menuitem",meta:"meta",meter:"meter",nav:"nav",noscript:"noscript",object:"object",ol:"ol",optgroup:"optgroup",option:"option",output:"output",p:"p",param:"param",picture:"picture",pre:"pre",progress:"progress",q:"q",rp:"rp",rt:"rt",ruby:"ruby",s:"s",samp:"samp",script:"script",section:"section",select:"select",small:"small",source:"source",span:"span",strong:"strong",style:"style",sub:"sub",summary:"summary",sup:"sup",table:"table",tbody:"tbody",td:"td",textarea:"textarea",tfoot:"tfoot",th:"th",thead:"thead",time:"time",title:"title",tr:"tr",track:"track",u:"u",ul:"ul",var:"var",video:"video",wbr:"wbr",circle:"circle",clipPath:"clipPath",defs:"defs",ellipse:"ellipse",g:"g",line:"line",linearGradient:"linearGradient",mask:"mask",path:"path",pattern:"pattern",polygon:"polygon",polyline:"polyline",radialGradient:"radialGradient",rect:"rect",stop:"stop",svg:"svg",text:"text",tspan:"tspan"},d);c.exports=g}(a("54"))}),c.registerDynamic("59",["50","5a","5b"],!0,function(a,b,c){"use strict";function d(a){this._root=a,this._startText=this.getText(),this._fallbackText=null}var e=(this||self,a("50")),f=a("5a"),g=a("5b");f(d.prototype,{getText:function(){return"value"in this._root?this._root.value:this._root[g()]},getData:function(){if(this._fallbackText)return this._fallbackText;var a,b,c=this._startText,d=c.length,e=this.getText(),f=e.length;for(a=0;a<d&&c[a]===e[a];a++);var g=d-a;for(b=1;b<=g&&c[d-b]===e[f-b];b++);var h=b>1?1-b:void 0;return this._fallbackText=e.slice(a,h),this._fallbackText}}),e.addPoolingTo(d),c.exports=d}),c.registerDynamic("5c",["5d"],!0,function(a,b,c){"use strict";function d(a,b,c){e.call(this,a,b,c)}var e=(this||self,a("5d")),f={data:null};e.augmentClass(d,f),c.exports=d}),c.registerDynamic("5e",["5d"],!0,function(a,b,c){"use strict";function d(a,b,c){e.call(this,a,b,c)}var e=(this||self,a("5d")),f={data:null};e.augmentClass(d,f),c.exports=d}),c.registerDynamic("5f",["60","61","62","59","5c","5e","63"],!0,function(a,b,c){"use strict";function d(){var a=window.opera;return"object"==typeof a&&"function"==typeof a.version&&parseInt(a.version(),10)<=12}function e(a){return(a.ctrlKey||a.altKey||a.metaKey)&&!(a.ctrlKey&&a.altKey)}function f(a){switch(a){case C.topCompositionStart:return D.compositionStart;case C.topCompositionEnd:return D.compositionEnd;case C.topCompositionUpdate:return D.compositionUpdate}}function g(a,b){return a===C.topKeyDown&&b.keyCode===v}function h(a,b){switch(a){case C.topKeyUp:return u.indexOf(b.keyCode)!==-1;case C.topKeyDown:return b.keyCode!==v;case C.topKeyPress:case C.topMouseDown:case C.topBlur:return!0;default:return!1}}function i(a){var b=a.detail;return"object"==typeof b&&"data"in b?b.data:null}function j(a,b,c,d){var e,j;if(w?e=f(a):F?h(a,d)&&(e=D.compositionEnd):g(a,d)&&(e=D.compositionStart),!e)return null;z&&(F||e!==D.compositionStart?e===D.compositionEnd&&F&&(j=F.getData()):F=q.getPooled(b));var k=r.getPooled(e,c,d);if(j)k.data=j;else{var l=i(d);null!==l&&(k.data=l)}return o.accumulateTwoPhaseDispatches(k),k}function k(a,b){switch(a){case C.topCompositionEnd:return i(b);case C.topKeyPress:var c=b.which;return c!==A?null:(E=!0,B);case C.topTextInput:var d=b.data;return d===B&&E?null:d;default:return null}}function l(a,b){if(F){if(a===C.topCompositionEnd||h(a,b)){var c=F.getData();return q.release(F),F=null,c}return null}switch(a){case C.topPaste:return null;case C.topKeyPress:return b.which&&!e(b)?String.fromCharCode(b.which):null;case C.topCompositionEnd:return z?null:b.data;default:return null}}function m(a,b,c,d){var e;if(e=y?k(a,d):l(a,d),!e)return null;var f=s.getPooled(D.beforeInput,c,d);return f.data=e,o.accumulateTwoPhaseDispatches(f),f}var n=(this||self,a("60")),o=a("61"),p=a("62"),q=a("59"),r=a("5c"),s=a("5e"),t=a("63"),u=[9,13,27,32],v=229,w=p.canUseDOM&&"CompositionEvent"in window,x=null;p.canUseDOM&&"documentMode"in document&&(x=document.documentMode);var y=p.canUseDOM&&"TextEvent"in window&&!x&&!d(),z=p.canUseDOM&&(!w||x&&x>8&&x<=11),A=32,B=String.fromCharCode(A),C=n.topLevelTypes,D={beforeInput:{phasedRegistrationNames:{bubbled:t({onBeforeInput:null}),captured:t({onBeforeInputCapture:null})},dependencies:[C.topCompositionEnd,C.topKeyPress,C.topTextInput,C.topPaste]},compositionEnd:{phasedRegistrationNames:{bubbled:t({onCompositionEnd:null}),captured:t({onCompositionEndCapture:null})},dependencies:[C.topBlur,C.topCompositionEnd,C.topKeyDown,C.topKeyPress,C.topKeyUp,C.topMouseDown]},compositionStart:{phasedRegistrationNames:{bubbled:t({onCompositionStart:null}),captured:t({onCompositionStartCapture:null})},dependencies:[C.topBlur,C.topCompositionStart,C.topKeyDown,C.topKeyPress,C.topKeyUp,C.topMouseDown]},compositionUpdate:{phasedRegistrationNames:{bubbled:t({onCompositionUpdate:null}),captured:t({onCompositionUpdateCapture:null})},dependencies:[C.topBlur,C.topCompositionUpdate,C.topKeyDown,C.topKeyPress,C.topKeyUp,C.topMouseDown]}},E=!1,F=null,G={eventTypes:D,extractEvents:function(a,b,c,d){return[j(a,b,c,d),m(a,b,c,d)]}};c.exports=G}),c.registerDynamic("64",["60","65","61","62","66","5d","67","68","63","54"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a){return"SELECT"===a.nodeName||"INPUT"===a.nodeName&&"file"===a.type}function e(a){var b=x.getPooled(C.change,E,a);u.accumulateTwoPhaseDispatches(b),w.batchedUpdates(f,b)}function f(a){t.enqueueEvents(a),t.processEventQueue()}function g(a,b){D=a,E=b,D.attachEvent("onchange",e)}function h(){D&&(D.detachEvent("onchange",e),D=null,E=null)}function i(a,b,c){if(a===B.topChange)return c}function j(a,b,c){a===B.topFocus?(h(),g(b,c)):a===B.topBlur&&h()}function k(a,b){D=a,E=b,F=a.value,G=Object.getOwnPropertyDescriptor(a.constructor.prototype,"value"),Object.defineProperty(D,"value",J),D.attachEvent("onpropertychange",m)}function l(){D&&(delete D.value,D.detachEvent("onpropertychange",m),D=null,E=null,F=null,G=null)}function m(a){if("value"===a.propertyName){var b=a.srcElement.value;b!==F&&(F=b,e(a))}}function n(a,b,c){if(a===B.topInput)return c}function o(a,b,c){a===B.topFocus?(l(),k(b,c)):a===B.topBlur&&l()}function p(a,b,c){if((a===B.topSelectionChange||a===B.topKeyUp||a===B.topKeyDown)&&D&&D.value!==F)return F=D.value,E}function q(a){return"INPUT"===a.nodeName&&("checkbox"===a.type||"radio"===a.type)}function r(a,b,c){if(a===B.topClick)return c}var s=a("60"),t=a("65"),u=a("61"),v=a("62"),w=a("66"),x=a("5d"),y=a("67"),z=a("68"),A=a("63"),B=s.topLevelTypes,C={change:{phasedRegistrationNames:{bubbled:A({onChange:null}),captured:A({onChangeCapture:null})},dependencies:[B.topBlur,B.topChange,B.topClick,B.topFocus,B.topInput,B.topKeyDown,B.topKeyUp,B.topSelectionChange]}},D=null,E=null,F=null,G=null,H=!1;v.canUseDOM&&(H=y("change")&&(!("documentMode"in document)||document.documentMode>8));var I=!1;v.canUseDOM&&(I=y("input")&&(!("documentMode"in document)||document.documentMode>9));var J={get:function(){return G.get.call(this)},set:function(a){F=""+a,G.set.call(this,a)}},K={eventTypes:C,extractEvents:function(a,b,c,e){var f,g;if(d(b)?H?f=i:g=j:z(b)?I?f=n:(f=p,g=o):q(b)&&(f=r),f){var h=f(a,b,c);if(h){var k=x.getPooled(C.change,h,e);return u.accumulateTwoPhaseDispatches(k),k}}g&&g(a,b,c)}};c.exports=K}(a("54"))}),c.registerDynamic("69",[],!0,function(a,b,c){"use strict";var d=(this||self,0),e={createReactRootIndex:function(){return d++}};c.exports=e}),c.registerDynamic("6a",["63"],!0,function(a,b,c){"use strict";var d=(this||self,a("63")),e=[d({ResponderEventPlugin:null}),d({SimpleEventPlugin:null}),d({TapEventPlugin:null}),d({EnterLeaveEventPlugin:null}),d({ChangeEventPlugin:null}),d({SelectEventPlugin:null}),d({BeforeInputEventPlugin:null}),d({AnalyticsEventPlugin:null}),d({MobileSafariClickEventPlugin:null})];c.exports=e}),c.registerDynamic("6b",["60","61","6c","6d","63"],!0,function(a,b,c){"use strict";var d=(this||self,a("60")),e=a("61"),f=a("6c"),g=a("6d"),h=a("63"),i=d.topLevelTypes,j=g.getFirstReactDOM,k={mouseEnter:{registrationName:h({onMouseEnter:null}),dependencies:[i.topMouseOut,i.topMouseOver]},mouseLeave:{registrationName:h({onMouseLeave:null}),dependencies:[i.topMouseOut,i.topMouseOver]}},l=[null,null],m={eventTypes:k,extractEvents:function(a,b,c,d){if(a===i.topMouseOver&&(d.relatedTarget||d.fromElement))return null;if(a!==i.topMouseOut&&a!==i.topMouseOver)return null;var h;if(b.window===b)h=b;else{var m=b.ownerDocument;h=m?m.defaultView||m.parentWindow:window}var n,o;if(a===i.topMouseOut?(n=b,o=j(d.relatedTarget||d.toElement)||h):(n=h,o=b),n===o)return null;var p=n?g.getID(n):"",q=o?g.getID(o):"",r=f.getPooled(k.mouseLeave,p,d);r.type="mouseleave",r.target=n,r.relatedTarget=o;var s=f.getPooled(k.mouseEnter,q,d);return s.type="mouseenter",s.target=o,s.relatedTarget=n,e.accumulateEnterLeaveDispatches(r,s,p,q),l[0]=r,l[1]=s,l}};c.exports=m}),c.registerDynamic("6e",["6f","62"],!0,function(a,b,c){"use strict";var d,e=(this||self,a("6f")),f=a("62"),g=e.injection.MUST_USE_ATTRIBUTE,h=e.injection.MUST_USE_PROPERTY,i=e.injection.HAS_BOOLEAN_VALUE,j=e.injection.HAS_SIDE_EFFECTS,k=e.injection.HAS_NUMERIC_VALUE,l=e.injection.HAS_POSITIVE_NUMERIC_VALUE,m=e.injection.HAS_OVERLOADED_BOOLEAN_VALUE;if(f.canUseDOM){var n=document.implementation;d=n&&n.hasFeature&&n.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")}var o={isCustomAttribute:RegExp.prototype.test.bind(/^(data|aria)-[a-z_][a-z\d_.\-]*$/),Properties:{accept:null,acceptCharset:null,accessKey:null,action:null,allowFullScreen:g|i,allowTransparency:g,alt:null,async:i,autoComplete:null,autoPlay:i,cellPadding:null,cellSpacing:null,charSet:g,checked:h|i,classID:g,className:d?g:h,cols:g|l,colSpan:null,content:null,contentEditable:null,contextMenu:g,controls:h|i,coords:null,crossOrigin:null,data:null,dateTime:g,defer:i,dir:null,disabled:g|i,download:m,draggable:null,encType:null,form:g,formAction:g,formEncType:g,formMethod:g,formNoValidate:i,formTarget:g,frameBorder:g,headers:null,height:g,hidden:g|i,high:null,href:null,hrefLang:null,htmlFor:null,httpEquiv:null,icon:null,id:h,label:null,lang:null,list:g,loop:h|i,low:null,manifest:g,marginHeight:null,marginWidth:null,max:null,maxLength:g,media:g,mediaGroup:null,method:null,min:null,multiple:h|i,muted:h|i,name:null,noValidate:i,open:i,optimum:null,pattern:null,placeholder:null,poster:null,preload:null,radioGroup:null,readOnly:h|i,rel:null,required:i,role:g,rows:g|l,rowSpan:null,sandbox:null,scope:null,scoped:i,scrolling:null,seamless:g|i,selected:h|i,shape:null,size:g|l,sizes:g,span:l,spellCheck:null,src:null,srcDoc:h,srcSet:g,start:k,step:null,style:null,tabIndex:null,target:null,title:null,type:null,useMap:null,value:h|j,width:g,wmode:g,autoCapitalize:null,autoCorrect:null,itemProp:g,itemScope:g|i,itemType:g,itemID:g,itemRef:g,property:null,unselectable:g},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{autoCapitalize:"autocapitalize",autoComplete:"autocomplete",autoCorrect:"autocorrect",autoFocus:"autofocus",autoPlay:"autoplay",encType:"encoding",hrefLang:"hreflang",radioGroup:"radiogroup",spellCheck:"spellcheck",srcDoc:"srcdoc",srcSet:"srcset"}};c.exports=o}),c.registerDynamic("70",["60","71"],!0,function(a,b,c){"use strict";var d=(this||self,a("60")),e=a("71"),f=d.topLevelTypes,g={eventTypes:null,extractEvents:function(a,b,c,d){if(a===f.topTouchStart){var g=d.target;g&&!g.onclick&&(g.onclick=e)}}};c.exports=g}),c.registerDynamic("72",["66","73","5a","71"],!0,function(a,b,c){"use strict";function d(){this.reinitializeTransaction()}var e=(this||self,a("66")),f=a("73"),g=a("5a"),h=a("71"),i={initialize:h,close:function(){m.isBatchingUpdates=!1}},j={initialize:h,close:e.flushBatchedUpdates.bind(e)},k=[j,i];g(d.prototype,f.Mixin,{getTransactionWrappers:function(){return k}});var l=new d,m={isBatchingUpdates:!1,batchedUpdates:function(a,b,c,d,e){var f=m.isBatchingUpdates;m.isBatchingUpdates=!0,f?a(b,c,d,e):l.perform(a,null,b,c,d,e)}};c.exports=m}),c.registerDynamic("74",["75","76","77","57","78"],!0,function(a,b,c){"use strict";var d=(this||self,a("75")),e=a("76"),f=a("77"),g=a("57"),h=a("78"),i=g.createFactory("button"),j=h({onClick:!0,onDoubleClick:!0,onMouseDown:!0,onMouseMove:!0,onMouseUp:!0,onClickCapture:!0,onDoubleClickCapture:!0,onMouseDownCapture:!0,onMouseMoveCapture:!0,onMouseUpCapture:!0}),k=f.createClass({displayName:"ReactDOMButton",tagName:"BUTTON",mixins:[d,e],render:function(){var a={};for(var b in this.props)!this.props.hasOwnProperty(b)||this.props.disabled&&j[b]||(a[b]=this.props[b]);return i(a,this.props.children)}});c.exports=k}),c.registerDynamic("79",["60","7a","76","77","57"],!0,function(a,b,c){"use strict";var d=(this||self,a("60")),e=a("7a"),f=a("76"),g=a("77"),h=a("57"),i=h.createFactory("form"),j=g.createClass({displayName:"ReactDOMForm",tagName:"FORM",mixins:[f,e],render:function(){return i(this.props)},componentDidMount:function(){this.trapBubbledEvent(d.topLevelTypes.topReset,"reset"),this.trapBubbledEvent(d.topLevelTypes.topSubmit,"submit")}});c.exports=j}),c.registerDynamic("7b",["60","7a","76","77","57"],!0,function(a,b,c){"use strict";var d=(this||self,a("60")),e=a("7a"),f=a("76"),g=a("77"),h=a("57"),i=h.createFactory("img"),j=g.createClass({displayName:"ReactDOMImg",tagName:"IMG",mixins:[f,e],render:function(){return i(this.props)},componentDidMount:function(){this.trapBubbledEvent(d.topLevelTypes.topLoad,"load"),this.trapBubbledEvent(d.topLevelTypes.topError,"error")}});c.exports=j}),c.registerDynamic("7a",["7c","7d","7e","7f","54"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a){a.remove()}var e=a("7c"),f=a("7d"),g=a("7e"),h=a("7f"),i={trapBubbledEvent:function(a,b){h(this.isMounted());var c=this.getDOMNode();h(c);var d=e.trapBubbledEvent(a,b,c);this._localEventListeners=f(this._localEventListeners,d)},componentWillUnmount:function(){this._localEventListeners&&g(this._localEventListeners,d)}};c.exports=i}(a("54"))}),c.registerDynamic("80",["60","7a","76","77","57"],!0,function(a,b,c){"use strict";var d=(this||self,a("60")),e=a("7a"),f=a("76"),g=a("77"),h=a("57"),i=h.createFactory("iframe"),j=g.createClass({displayName:"ReactDOMIframe",tagName:"IFRAME",mixins:[f,e],render:function(){return i(this.props)},componentDidMount:function(){this.trapBubbledEvent(d.topLevelTypes.topLoad,"load")}});c.exports=j}),c.registerDynamic("81",["75","82","83","76","77","57","6d","66","5a","7f","54"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(){this.isMounted()&&this.forceUpdate()}var e=a("75"),f=a("82"),g=a("83"),h=a("76"),i=a("77"),j=a("57"),k=a("6d"),l=a("66"),m=a("5a"),n=a("7f"),o=j.createFactory("input"),p={},q=i.createClass({displayName:"ReactDOMInput",tagName:"INPUT",mixins:[e,g.Mixin,h],getInitialState:function(){var a=this.props.defaultValue;return{initialChecked:this.props.defaultChecked||!1,initialValue:null!=a?a:null}},render:function(){var a=m({},this.props);a.defaultChecked=null,a.defaultValue=null;var b=g.getValue(this);a.value=null!=b?b:this.state.initialValue;var c=g.getChecked(this);return a.checked=null!=c?c:this.state.initialChecked,a.onChange=this._handleChange,o(a,this.props.children)},componentDidMount:function(){var a=k.getID(this.getDOMNode());p[a]=this},componentWillUnmount:function(){var a=this.getDOMNode(),b=k.getID(a);delete p[b]},componentDidUpdate:function(a,b,c){var d=this.getDOMNode();null!=this.props.checked&&f.setValueForProperty(d,"checked",this.props.checked||!1);var e=g.getValue(this);null!=e&&f.setValueForProperty(d,"value",""+e)},_handleChange:function(a){var b,c=g.getOnChange(this);c&&(b=c.call(this,a)),l.asap(d,this);var e=this.props.name;if("radio"===this.props.type&&null!=e){for(var f=this.getDOMNode(),h=f;h.parentNode;)h=h.parentNode;for(var i=h.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),j=0,m=i.length;j<m;j++){var o=i[j];if(o!==f&&o.form===f.form){var q=k.getID(o);n(q);var r=p[q];n(r),l.asap(d,r)}}}return b}});c.exports=q}(a("54"))}),c.registerDynamic("84",["76","77","57","53","54"],!0,function(a,b,c){this||self;!function(b){"use strict";var d=a("76"),e=a("77"),f=a("57"),g=(a("53"),f.createFactory("option")),h=e.createClass({displayName:"ReactDOMOption",tagName:"OPTION",mixins:[d],componentWillMount:function(){},render:function(){return g(this.props,this.props.children)}});c.exports=h}(a("54"))}),c.registerDynamic("85",["75","83","76","77","57","66","5a"],!0,function(a,b,c){"use strict";function d(){if(this._pendingUpdate){this._pendingUpdate=!1;var a=h.getValue(this);null!=a&&this.isMounted()&&f(this,a)}}function e(a,b,c){if(null==a[b])return null;if(a.multiple){if(!Array.isArray(a[b]))return new Error("The `"+b+"` prop supplied to <select> must be an array if `multiple` is true.")}else if(Array.isArray(a[b]))return new Error("The `"+b+"` prop supplied to <select> must be a scalar value if `multiple` is false.")}function f(a,b){var c,d,e,f=a.getDOMNode().options;if(a.props.multiple){for(c={},d=0,e=b.length;d<e;d++)c[""+b[d]]=!0;for(d=0,e=f.length;d<e;d++){var g=c.hasOwnProperty(f[d].value);f[d].selected!==g&&(f[d].selected=g)}}else{for(c=""+b,d=0,e=f.length;d<e;d++)if(f[d].value===c)return void(f[d].selected=!0);f.length&&(f[0].selected=!0)}}var g=(this||self,a("75")),h=a("83"),i=a("76"),j=a("77"),k=a("57"),l=a("66"),m=a("5a"),n=k.createFactory("select"),o=j.createClass({displayName:"ReactDOMSelect",tagName:"SELECT",mixins:[g,h.Mixin,i],propTypes:{defaultValue:e,value:e},render:function(){var a=m({},this.props);return a.onChange=this._handleChange,a.value=null,n(a,this.props.children)},componentWillMount:function(){this._pendingUpdate=!1},componentDidMount:function(){var a=h.getValue(this);null!=a?f(this,a):null!=this.props.defaultValue&&f(this,this.props.defaultValue)},componentDidUpdate:function(a){var b=h.getValue(this);null!=b?(this._pendingUpdate=!1,f(this,b)):!a.multiple!=!this.props.multiple&&(null!=this.props.defaultValue?f(this,this.props.defaultValue):f(this,this.props.multiple?[]:""))},_handleChange:function(a){var b,c=h.getOnChange(this);return c&&(b=c.call(this,a)),this._pendingUpdate=!0,l.asap(d,this),b}});c.exports=o}),c.registerDynamic("75",["86"],!0,function(a,b,c){"use strict";var d=(this||self,a("86")),e={componentDidMount:function(){this.props.autoFocus&&d(this.getDOMNode())}};c.exports=e}),c.registerDynamic("83",["87","7f","54"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a){j(null==a.props.checkedLink||null==a.props.valueLink)}function e(a){d(a),j(null==a.props.value&&null==a.props.onChange)}function f(a){d(a),j(null==a.props.checked&&null==a.props.onChange)}function g(a){this.props.valueLink.requestChange(a.target.value)}function h(a){this.props.checkedLink.requestChange(a.target.checked)}var i=a("87"),j=a("7f"),k={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0},l={Mixin:{propTypes:{value:function(a,b,c){return!a[b]||k[a.type]||a.onChange||a.readOnly||a.disabled?null:new Error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")},checked:function(a,b,c){return!a[b]||a.onChange||a.readOnly||a.disabled?null:new Error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")},onChange:i.func}},getValue:function(a){return a.props.valueLink?(e(a),a.props.valueLink.value):a.props.value},getChecked:function(a){return a.props.checkedLink?(f(a),a.props.checkedLink.value):a.props.checked},getOnChange:function(a){return a.props.valueLink?(e(a),g):a.props.checkedLink?(f(a),h):a.props.onChange}};c.exports=l}(a("54"))}),c.registerDynamic("76",["88"],!0,function(a,b,c){"use strict";var d=(this||self,a("88")),e={getDOMNode:function(){return d(this)}};c.exports=e}),c.registerDynamic("89",["75","82","83","76","77","57","66","5a","7f","53","54"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(){this.isMounted()&&this.forceUpdate()}var e=a("75"),f=a("82"),g=a("83"),h=a("76"),i=a("77"),j=a("57"),k=a("66"),l=a("5a"),m=a("7f"),n=(a("53"),j.createFactory("textarea")),o=i.createClass({displayName:"ReactDOMTextarea",tagName:"TEXTAREA",mixins:[e,g.Mixin,h],getInitialState:function(){var a=this.props.defaultValue,b=this.props.children;null!=b&&(m(null==a),Array.isArray(b)&&(m(b.length<=1),b=b[0]),a=""+b),null==a&&(a="");var c=g.getValue(this);return{initialValue:""+(null!=c?c:a)}},render:function(){var a=l({},this.props);return m(null==a.dangerouslySetInnerHTML),a.defaultValue=null,a.value=null,a.onChange=this._handleChange,n(a,this.state.initialValue)},componentDidUpdate:function(a,b,c){var d=g.getValue(this);if(null!=d){var e=this.getDOMNode();f.setValueForProperty(e,"value",""+d)}},_handleChange:function(a){var b,c=g.getOnChange(this);return c&&(b=c.call(this,a)),k.asap(d,this),b}});c.exports=o}(a("54"))}),c.registerDynamic("8a",["82","8b","8c","5a","8d"],!0,function(a,b,c){"use strict";var d=(this||self,a("82")),e=a("8b"),f=a("8c"),g=a("5a"),h=a("8d"),i=function(a){};g(i.prototype,{construct:function(a){this._currentElement=a,this._stringText=""+a,this._rootNodeID=null,this._mountIndex=0},mountComponent:function(a,b,c){this._rootNodeID=a;var e=h(this._stringText);return b.renderToStaticMarkup?e:"<span "+d.createMarkupForID(a)+">"+e+"</span>"},receiveComponent:function(a,b){if(a!==this._currentElement){this._currentElement=a;var c=""+a;c!==this._stringText&&(this._stringText=c,f.BackendIDOperations.updateTextContentByID(this._rootNodeID,c))}},unmountComponent:function(){e.unmountIDFromEnvironment(this._rootNodeID)}}),c.exports=i}),c.registerDynamic("8e",["71","54"],!0,function(a,b,c){this||self;!function(b){var d=a("71"),e={listen:function(a,b,c){return a.addEventListener?(a.addEventListener(b,c,!1),{remove:function(){a.removeEventListener(b,c,!1)}}):a.attachEvent?(a.attachEvent("on"+b,c),{remove:function(){a.detachEvent("on"+b,c)}}):void 0},capture:function(a,b,c){return a.addEventListener?(a.addEventListener(b,c,!0),{remove:function(){a.removeEventListener(b,c,!0)}}):{remove:d}},registerDefault:function(){}};c.exports=e}(a("54"))}),c.registerDynamic("8f",[],!0,function(a,b,c){"use strict";function d(a){return a===window?{x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop}:{x:a.scrollLeft,y:a.scrollTop}}this||self;c.exports=d}),c.registerDynamic("90",["8e","62","50","91","6d","66","5a","92","8f","54"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a){var b=l.getID(a),c=k.getReactRootIDFromNodeID(b),d=l.findReactContainerForID(c),e=l.getFirstReactDOM(d);return e}function e(a,b){this.topLevelType=a,this.nativeEvent=b,this.ancestors=[]}function f(a){for(var b=l.getFirstReactDOM(o(a.nativeEvent))||window,c=b;c;)a.ancestors.push(c),c=d(c);for(var e=0,f=a.ancestors.length;e<f;e++){b=a.ancestors[e];var g=l.getID(b)||"";q._handleTopLevel(a.topLevelType,b,g,a.nativeEvent)}}function g(a){var b=p(window);a(b)}var h=a("8e"),i=a("62"),j=a("50"),k=a("91"),l=a("6d"),m=a("66"),n=a("5a"),o=a("92"),p=a("8f");n(e.prototype,{destructor:function(){this.topLevelType=null,this.nativeEvent=null,this.ancestors.length=0}}),j.addPoolingTo(e,j.twoArgumentPooler);var q={_enabled:!0,_handleTopLevel:null,WINDOW_HANDLE:i.canUseDOM?window:null,setHandleTopLevel:function(a){q._handleTopLevel=a},setEnabled:function(a){q._enabled=!!a},isEnabled:function(){return q._enabled},trapBubbledEvent:function(a,b,c){var d=c;return d?h.listen(d,b,q.dispatchEvent.bind(null,a)):null},trapCapturedEvent:function(a,b,c){var d=c;return d?h.capture(d,b,q.dispatchEvent.bind(null,a)):null},monitorScrollValue:function(a){var b=g.bind(null,a);h.listen(window,"scroll",b)},dispatchEvent:function(a,b){if(q._enabled){var c=e.getPooled(a,b);try{m.batchedUpdates(f,c)}finally{e.release(c)}}}};c.exports=q}(a("54"))}),c.registerDynamic("93",[],!0,function(a,b,c){function d(a){return a.replace(e,function(a,b){return b.toUpperCase()})}var e=(this||self,/-(.)/g);c.exports=d}),c.registerDynamic("94",["93"],!0,function(a,b,c){"use strict";function d(a){return e(a.replace(f,"ms-"))}var e=(this||self,a("93")),f=/^-ms-/;c.exports=d}),c.registerDynamic("95",[],!0,function(a,b,c){"use strict";function d(a,b){return a+b.charAt(0).toUpperCase()+b.substring(1)}var e=(this||self,{boxFlex:!0,boxFlexGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,strokeDashoffset:!0,strokeOpacity:!0,strokeWidth:!0}),f=["Webkit","ms","Moz","O"];Object.keys(e).forEach(function(a){f.forEach(function(b){e[d(b,a)]=e[a]})});var g={background:{backgroundImage:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundColor:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0}},h={isUnitlessNumber:e,shorthandPropertyExpansions:g};c.exports=h}),c.registerDynamic("96",["95"],!0,function(a,b,c){"use strict";function d(a,b){var c=null==b||"boolean"==typeof b||""===b;if(c)return"";var d=isNaN(b);return d||0===b||f.hasOwnProperty(a)&&f[a]?""+b:("string"==typeof b&&(b=b.trim()),b+"px")}var e=(this||self,a("95")),f=e.isUnitlessNumber;c.exports=d}),c.registerDynamic("97",[],!0,function(a,b,c){function d(a){return a.replace(e,"-$1").toLowerCase()}var e=(this||self,/([A-Z])/g);c.exports=d}),c.registerDynamic("98",["97"],!0,function(a,b,c){"use strict";function d(a){return e(a).replace(f,"-ms-")}var e=(this||self,a("97")),f=/^ms-/;c.exports=d}),c.registerDynamic("99",[],!0,function(a,b,c){"use strict";function d(a){var b={};return function(c){return b.hasOwnProperty(c)||(b[c]=a.call(this,c)),b[c]}}this||self;c.exports=d}),c.registerDynamic("9a",["95","62","94","96","98","99","53","54"],!0,function(a,b,c){this||self;!function(b){"use strict";var d=a("95"),e=a("62"),f=(a("94"),a("96")),g=a("98"),h=a("99"),i=(a("53"),h(function(a){return g(a)})),j="cssFloat";e.canUseDOM&&void 0===document.documentElement.style.cssFloat&&(j="styleFloat");var k={createMarkupForStyles:function(a){var b="";for(var c in a)if(a.hasOwnProperty(c)){var d=a[c];null!=d&&(b+=i(c)+":",b+=f(c,d)+";")}return b||null},setValueForStyles:function(a,b){var c=a.style;for(var e in b)if(b.hasOwnProperty(e)){var g=f(e,b[e]);if("float"===e&&(e=j),g)c[e]=g;else{var h=d.shorthandPropertyExpansions[e];if(h)for(var i in h)c[i]="";else c[e]=""}}}};c.exports=k}(a("54"))}),c.registerDynamic("9b",["7f","54"],!0,function(a,b,c){this||self;!function(b){function d(a){var b=a.length;if(e(!Array.isArray(a)&&("object"==typeof a||"function"==typeof a)),e("number"==typeof b),e(0===b||b-1 in a),a.hasOwnProperty)try{return Array.prototype.slice.call(a)}catch(a){}for(var c=Array(b),d=0;d<b;d++)c[d]=a[d];return c}var e=a("7f");c.exports=d}(a("54"))}),c.registerDynamic("9c",["9b"],!0,function(a,b,c){function d(a){return!!a&&("object"==typeof a||"function"==typeof a)&&"length"in a&&!("setInterval"in a)&&"number"!=typeof a.nodeType&&(Array.isArray(a)||"callee"in a||"item"in a)}function e(a){return d(a)?Array.isArray(a)?a.slice():f(a):[a]}var f=(this||self,a("9b"));c.exports=e}),c.registerDynamic("9d",["62","9c","9e","7f","54"],!0,function(a,b,c){this||self;!function(b){function d(a){var b=a.match(k);return b&&b[1].toLowerCase()}function e(a,b){var c=j;i(!!j);var e=d(a),f=e&&h(e);if(f){c.innerHTML=f[1]+a+f[2];for(var k=f[0];k--;)c=c.lastChild}else c.innerHTML=a;var l=c.getElementsByTagName("script");l.length&&(i(b),g(l).forEach(b));for(var m=g(c.childNodes);c.lastChild;)c.removeChild(c.lastChild);return m}var f=a("62"),g=a("9c"),h=a("9e"),i=a("7f"),j=f.canUseDOM?document.createElement("div"):null,k=/^\s*<(\w+)/;c.exports=e}(a("54"))}),c.registerDynamic("9e",["62","7f","54"],!0,function(a,b,c){this||self;!function(b){function d(a){return f(!!g),m.hasOwnProperty(a)||(a="*"),h.hasOwnProperty(a)||("*"===a?g.innerHTML="<link />":g.innerHTML="<"+a+"></"+a+">",h[a]=!g.firstChild),h[a]?m[a]:null}var e=a("62"),f=a("7f"),g=e.canUseDOM?document.createElement("div"):null,h={circle:!0,clipPath:!0,defs:!0,ellipse:!0,g:!0,line:!0,linearGradient:!0,path:!0,polygon:!0,polyline:!0,radialGradient:!0,rect:!0,stop:!0,text:!0},i=[1,'<select multiple="true">',"</select>"],j=[1,"<table>","</table>"],k=[3,"<table><tbody><tr>","</tr></tbody></table>"],l=[1,"<svg>","</svg>"],m={
|
16
16
|
"*":[1,"?<div>","</div>"],area:[1,"<map>","</map>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],legend:[1,"<fieldset>","</fieldset>"],param:[1,"<object>","</object>"],tr:[2,"<table><tbody>","</tbody></table>"],optgroup:i,option:i,caption:j,colgroup:j,tbody:j,tfoot:j,thead:j,td:k,th:k,circle:l,clipPath:l,defs:l,ellipse:l,g:l,line:l,linearGradient:l,path:l,polygon:l,polyline:l,radialGradient:l,rect:l,stop:l,text:l};c.exports=d}(a("54"))}),c.registerDynamic("9f",["62","9d","71","9e","7f","54"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a){return a.substring(1,a.indexOf(" "))}var e=a("62"),f=a("9d"),g=a("71"),h=a("9e"),i=a("7f"),j=/^(<[^ \/>]+)/,k="data-danger-index",l={dangerouslyRenderMarkup:function(a){i(e.canUseDOM);for(var b,c={},l=0;l<a.length;l++)i(a[l]),b=d(a[l]),b=h(b)?b:"*",c[b]=c[b]||[],c[b][l]=a[l];var m=[],n=0;for(b in c)if(c.hasOwnProperty(b)){var o,p=c[b];for(o in p)if(p.hasOwnProperty(o)){var q=p[o];p[o]=q.replace(j,"$1 "+k+'="'+o+'" ')}for(var r=f(p.join(""),g),s=0;s<r.length;++s){var t=r[s];t.hasAttribute&&t.hasAttribute(k)&&(o=+t.getAttribute(k),t.removeAttribute(k),i(!m.hasOwnProperty(o)),m[o]=t,n+=1)}}return i(n===m.length),i(m.length===a.length),m},dangerouslyReplaceNodeWithMarkup:function(a,b){i(e.canUseDOM),i(b),i("html"!==a.tagName.toLowerCase());var c=f(b,g)[0];a.parentNode.replaceChild(c,a)}};c.exports=l}(a("54"))}),c.registerDynamic("a0",["62","8d","a1"],!0,function(a,b,c){"use strict";var d=(this||self,a("62")),e=a("8d"),f=a("a1"),g=function(a,b){a.textContent=b};d.canUseDOM&&("textContent"in document.documentElement||(g=function(a,b){f(a,e(b))})),c.exports=g}),c.registerDynamic("a2",["9f","a3","a0","7f","54"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a,b,c){a.insertBefore(b,a.childNodes[c]||null)}var e=a("9f"),f=a("a3"),g=a("a0"),h=a("7f"),i={dangerouslyReplaceNodeWithMarkup:e.dangerouslyReplaceNodeWithMarkup,updateTextContent:g,processUpdates:function(a,b){for(var c,i=null,j=null,k=0;k<a.length;k++)if(c=a[k],c.type===f.MOVE_EXISTING||c.type===f.REMOVE_NODE){var l=c.fromIndex,m=c.parentNode.childNodes[l],n=c.parentID;h(m),i=i||{},i[n]=i[n]||[],i[n][l]=m,j=j||[],j.push(m)}var o=e.dangerouslyRenderMarkup(b);if(j)for(var p=0;p<j.length;p++)j[p].parentNode.removeChild(j[p]);for(var q=0;q<a.length;q++)switch(c=a[q],c.type){case f.INSERT_MARKUP:d(c.parentNode,o[c.markupIndex],c.toIndex);break;case f.MOVE_EXISTING:d(c.parentNode,i[c.parentID][c.fromIndex],c.toIndex);break;case f.TEXT_CONTENT:g(c.parentNode,c.textContent);break;case f.REMOVE_NODE:}}};c.exports=i}(a("54"))}),c.registerDynamic("a4",["8d"],!0,function(a,b,c){"use strict";function d(a){return'"'+e(a)+'"'}var e=(this||self,a("8d"));c.exports=d}),c.registerDynamic("82",["6f","a4","53","54"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a,b){return null==b||e.hasBooleanValue[a]&&!b||e.hasNumericValue[a]&&isNaN(b)||e.hasPositiveNumericValue[a]&&b<1||e.hasOverloadedBooleanValue[a]&&b===!1}var e=a("6f"),f=a("a4"),g=(a("53"),{createMarkupForID:function(a){return e.ID_ATTRIBUTE_NAME+"="+f(a)},createMarkupForProperty:function(a,b){if(e.isStandardName.hasOwnProperty(a)&&e.isStandardName[a]){if(d(a,b))return"";var c=e.getAttributeName[a];return e.hasBooleanValue[a]||e.hasOverloadedBooleanValue[a]&&b===!0?c:c+"="+f(b)}return e.isCustomAttribute(a)?null==b?"":a+"="+f(b):null},setValueForProperty:function(a,b,c){if(e.isStandardName.hasOwnProperty(b)&&e.isStandardName[b]){var f=e.getMutationMethod[b];if(f)f(a,c);else if(d(b,c))this.deleteValueForProperty(a,b);else if(e.mustUseAttribute[b])a.setAttribute(e.getAttributeName[b],""+c);else{var g=e.getPropertyName[b];e.hasSideEffects[b]&&""+a[g]==""+c||(a[g]=c)}}else e.isCustomAttribute(b)&&(null==c?a.removeAttribute(b):a.setAttribute(b,""+c))},deleteValueForProperty:function(a,b){if(e.isStandardName.hasOwnProperty(b)&&e.isStandardName[b]){var c=e.getMutationMethod[b];if(c)c(a,void 0);else if(e.mustUseAttribute[b])a.removeAttribute(e.getAttributeName[b]);else{var d=e.getPropertyName[b],f=e.getDefaultValueForProperty(a.nodeName,d);e.hasSideEffects[b]&&""+a[d]===f||(a[d]=f)}}else e.isCustomAttribute(b)&&a.removeAttribute(b)}});c.exports=g}(a("54"))}),c.registerDynamic("a5",["9a","a2","82","6d","a6","7f","a1","54"],!0,function(a,b,c){this||self;!function(b){"use strict";var d=a("9a"),e=a("a2"),f=a("82"),g=a("6d"),h=a("a6"),i=a("7f"),j=a("a1"),k={dangerouslySetInnerHTML:"`dangerouslySetInnerHTML` must be set using `updateInnerHTMLByID()`.",style:"`style` must be set using `updateStylesByID()`."},l={updatePropertyByID:function(a,b,c){var d=g.getNode(a);i(!k.hasOwnProperty(b)),null!=c?f.setValueForProperty(d,b,c):f.deleteValueForProperty(d,b)},deletePropertyByID:function(a,b,c){var d=g.getNode(a);i(!k.hasOwnProperty(b)),f.deleteValueForProperty(d,b,c)},updateStylesByID:function(a,b){var c=g.getNode(a);d.setValueForStyles(c,b)},updateInnerHTMLByID:function(a,b){var c=g.getNode(a);j(c,b)},updateTextContentByID:function(a,b){var c=g.getNode(a);e.updateTextContent(c,b)},dangerouslyReplaceNodeWithMarkupByID:function(a,b){var c=g.getNode(a);e.dangerouslyReplaceNodeWithMarkup(c,b)},dangerouslyProcessChildrenUpdates:function(a,b){for(var c=0;c<a.length;c++)a[c].parentNode=g.getNode(a[c].parentID);e.processUpdates(a,b)}};h.measureMethods(l,"ReactDOMIDOperations",{updatePropertyByID:"updatePropertyByID",deletePropertyByID:"deletePropertyByID",updateStylesByID:"updateStylesByID",updateInnerHTMLByID:"updateInnerHTMLByID",updateTextContentByID:"updateTextContentByID",dangerouslyReplaceNodeWithMarkupByID:"dangerouslyReplaceNodeWithMarkupByID",dangerouslyProcessChildrenUpdates:"dangerouslyProcessChildrenUpdates"}),c.exports=l}(a("54"))}),c.registerDynamic("8b",["a5","6d","54"],!0,function(a,b,c){this||self;!function(b){"use strict";var d=a("a5"),e=a("6d"),f={processChildrenUpdates:d.dangerouslyProcessChildrenUpdates,replaceNodeWithMarkupByID:d.dangerouslyReplaceNodeWithMarkupByID,unmountIDFromEnvironment:function(a){e.purgeID(a)}};c.exports=f}(a("54"))}),c.registerDynamic("a3",["78"],!0,function(a,b,c){"use strict";var d=(this||self,a("78")),e=d({INSERT_MARKUP:null,MOVE_EXISTING:null,REMOVE_NODE:null,TEXT_CONTENT:null});c.exports=e}),c.registerDynamic("52",["57","51","91","a7","7f","53","54"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a){return q[a]}function e(a,b){return a&&null!=a.key?g(a.key):b.toString(36)}function f(a){return(""+a).replace(r,d)}function g(a){return"$"+f(a)}function h(a,b,c,d,f){var i=typeof a;if("undefined"!==i&&"boolean"!==i||(a=null),null===a||"string"===i||"number"===i||j.isValidElement(a))return d(f,a,""===b?o+e(a,0):b,c),1;var l,q,r,s=0;if(Array.isArray(a))for(var t=0;t<a.length;t++)l=a[t],q=(""!==b?b+p:o)+e(l,t),r=c+s,s+=h(l,q,r,d,f);else{var u=m(a);if(u){var v,w=u.call(a);if(u!==a.entries)for(var x=0;!(v=w.next()).done;)l=v.value,q=(""!==b?b+p:o)+e(l,x++),r=c+s,s+=h(l,q,r,d,f);else for(;!(v=w.next()).done;){var y=v.value;y&&(l=y[1],q=(""!==b?b+p:o)+g(y[0])+p+e(l,0),r=c+s,s+=h(l,q,r,d,f))}}else if("object"===i){n(1!==a.nodeType);var z=k.extract(a);for(var A in z)z.hasOwnProperty(A)&&(l=z[A],q=(""!==b?b+p:o)+g(A)+p+e(l,0),r=c+s,s+=h(l,q,r,d,f))}}return s}function i(a,b,c){return null==a?0:h(a,"",0,b,c)}var j=a("57"),k=a("51"),l=a("91"),m=a("a7"),n=a("7f"),o=(a("53"),l.SEPARATOR),p=":",q={"=":"=0",".":"=1",":":"=2"},r=/[=.:]/g;c.exports=i}(a("54"))}),c.registerDynamic("a8",["52","53","54"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a,b,c){var d=a,e=!d.hasOwnProperty(c);e&&null!=b&&(d[c]=b)}function e(a){if(null==a)return a;var b={};return f(a,d,b),b}var f=a("52");a("53");c.exports=e}(a("54"))}),c.registerDynamic("a9",["aa","a8","ab","ac"],!0,function(a,b,c){"use strict";var d=(this||self,a("aa")),e=a("a8"),f=a("ab"),g=a("ac"),h={instantiateChildren:function(a,b,c){var d=e(a);for(var g in d)if(d.hasOwnProperty(g)){var h=d[g],i=f(h,null);d[g]=i}return d},updateChildren:function(a,b,c,h){var i=e(b);if(!i&&!a)return null;var j;for(j in i)if(i.hasOwnProperty(j)){var k=a&&a[j],l=k&&k._currentElement,m=i[j];if(g(l,m))d.receiveComponent(k,m,c,h),i[j]=k;else{k&&d.unmountComponent(k,j);var n=f(m,null);i[j]=n}}for(j in a)!a.hasOwnProperty(j)||i&&i.hasOwnProperty(j)||d.unmountComponent(a[j]);return i},unmountChildren:function(a){for(var b in a){var c=a[b];d.unmountComponent(c)}}};c.exports=h}),c.registerDynamic("ad",["ae","a3","aa","a9","54"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a,b,c){o.push({parentID:a,parentNode:null,type:k.INSERT_MARKUP,markupIndex:p.push(b)-1,textContent:null,fromIndex:null,toIndex:c})}function e(a,b,c){o.push({parentID:a,parentNode:null,type:k.MOVE_EXISTING,markupIndex:null,textContent:null,fromIndex:b,toIndex:c})}function f(a,b){o.push({parentID:a,parentNode:null,type:k.REMOVE_NODE,markupIndex:null,textContent:null,fromIndex:b,toIndex:null})}function g(a,b){o.push({parentID:a,parentNode:null,type:k.TEXT_CONTENT,markupIndex:null,textContent:b,fromIndex:null,toIndex:null})}function h(){o.length&&(j.processChildrenUpdates(o,p),i())}function i(){o.length=0,p.length=0}var j=a("ae"),k=a("a3"),l=a("aa"),m=a("a9"),n=0,o=[],p=[],q={Mixin:{mountChildren:function(a,b,c){var d=m.instantiateChildren(a,b,c);this._renderedChildren=d;var e=[],f=0;for(var g in d)if(d.hasOwnProperty(g)){var h=d[g],i=this._rootNodeID+g,j=l.mountComponent(h,i,b,c);h._mountIndex=f,e.push(j),f++}return e},updateTextContent:function(a){n++;var b=!0;try{var c=this._renderedChildren;m.unmountChildren(c);for(var d in c)c.hasOwnProperty(d)&&this._unmountChildByName(c[d],d);this.setTextContent(a),b=!1}finally{n--,n||(b?i():h())}},updateChildren:function(a,b,c){n++;var d=!0;try{this._updateChildren(a,b,c),d=!1}finally{n--,n||(d?i():h())}},_updateChildren:function(a,b,c){var d=this._renderedChildren,e=m.updateChildren(d,a,b,c);if(this._renderedChildren=e,e||d){var f,g=0,h=0;for(f in e)if(e.hasOwnProperty(f)){var i=d&&d[f],j=e[f];i===j?(this.moveChild(i,h,g),g=Math.max(i._mountIndex,g),i._mountIndex=h):(i&&(g=Math.max(i._mountIndex,g),this._unmountChildByName(i,f)),this._mountChildByNameAtIndex(j,f,h,b,c)),h++}for(f in d)!d.hasOwnProperty(f)||e&&e.hasOwnProperty(f)||this._unmountChildByName(d[f],f)}},unmountChildren:function(){var a=this._renderedChildren;m.unmountChildren(a),this._renderedChildren=null},moveChild:function(a,b,c){a._mountIndex<c&&e(this._rootNodeID,a._mountIndex,b)},createChild:function(a,b){d(this._rootNodeID,b,a._mountIndex)},removeChild:function(a){f(this._rootNodeID,a._mountIndex)},setTextContent:function(a){g(this._rootNodeID,a)},_mountChildByNameAtIndex:function(a,b,c,d,e){var f=this._rootNodeID+b,g=l.mountComponent(a,f,d,e);a._mountIndex=c,this.createChild(a,g)},_unmountChildByName:function(a,b){this.removeChild(a),a._mountIndex=null}}};c.exports=q}(a("54"))}),c.registerDynamic("8d",[],!0,function(a,b,c){"use strict";function d(a){return f[a]}function e(a){return(""+a).replace(g,d)}var f=(this||self,{"&":"&",">":">","<":"<",'"':""","'":"'"}),g=/[&><"']/g;c.exports=e}),c.registerDynamic("8c",["9a","6f","82","7c","8b","6d","ad","a6","5a","8d","7f","67","63","53","54"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a){a&&(null!=a.dangerouslySetInnerHTML&&(r(null==a.children),r("object"==typeof a.dangerouslySetInnerHTML&&"__html"in a.dangerouslySetInnerHTML)),r(null==a.style||"object"==typeof a.style))}function e(a,b,c,d){var e=m.findReactContainerForID(a);if(e){var f=e.nodeType===y?e.ownerDocument:e;u(b,f)}d.getPutListenerQueue().enqueuePutListener(a,b,c)}function f(a){D.call(C,a)||(r(B.test(a)),C[a]=!0)}function g(a){f(a),this._tag=a,this._renderedChildren=null,this._previousStyleCopy=null,this._rootNodeID=null}var h=a("9a"),i=a("6f"),j=a("82"),k=a("7c"),l=a("8b"),m=a("6d"),n=a("ad"),o=a("a6"),p=a("5a"),q=a("8d"),r=a("7f"),s=(a("67"),a("63")),t=(a("53"),k.deleteListener),u=k.listenTo,v=k.registrationNameModules,w={string:!0,number:!0},x=s({style:null}),y=1,z=null,A={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},B=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,C={},D={}.hasOwnProperty;g.displayName="ReactDOMComponent",g.Mixin={construct:function(a){this._currentElement=a},mountComponent:function(a,b,c){this._rootNodeID=a,d(this._currentElement.props);var e=A[this._tag]?"":"</"+this._tag+">";return this._createOpenTagMarkupAndPutListeners(b)+this._createContentMarkup(b,c)+e},_createOpenTagMarkupAndPutListeners:function(a){var b=this._currentElement.props,c="<"+this._tag;for(var d in b)if(b.hasOwnProperty(d)){var f=b[d];if(null!=f)if(v.hasOwnProperty(d))e(this._rootNodeID,d,f,a);else{d===x&&(f&&(f=this._previousStyleCopy=p({},b.style)),f=h.createMarkupForStyles(f));var g=j.createMarkupForProperty(d,f);g&&(c+=" "+g)}}if(a.renderToStaticMarkup)return c+">";var i=j.createMarkupForID(this._rootNodeID);return c+" "+i+">"},_createContentMarkup:function(a,b){var c="";"listing"!==this._tag&&"pre"!==this._tag&&"textarea"!==this._tag||(c="\n");var d=this._currentElement.props,e=d.dangerouslySetInnerHTML;if(null!=e){if(null!=e.__html)return c+e.__html}else{var f=w[typeof d.children]?d.children:null,g=null!=f?null:d.children;if(null!=f)return c+q(f);if(null!=g){var h=this.mountChildren(g,a,b);return c+h.join("")}}return c},receiveComponent:function(a,b,c){var d=this._currentElement;this._currentElement=a,this.updateComponent(b,d,a,c)},updateComponent:function(a,b,c,e){d(this._currentElement.props),this._updateDOMProperties(b.props,a),this._updateDOMChildren(b.props,a,e)},_updateDOMProperties:function(a,b){var c,d,f,g=this._currentElement.props;for(c in a)if(!g.hasOwnProperty(c)&&a.hasOwnProperty(c))if(c===x){var h=this._previousStyleCopy;for(d in h)h.hasOwnProperty(d)&&(f=f||{},f[d]="");this._previousStyleCopy=null}else v.hasOwnProperty(c)?t(this._rootNodeID,c):(i.isStandardName[c]||i.isCustomAttribute(c))&&z.deletePropertyByID(this._rootNodeID,c);for(c in g){var j=g[c],k=c===x?this._previousStyleCopy:a[c];if(g.hasOwnProperty(c)&&j!==k)if(c===x)if(j?j=this._previousStyleCopy=p({},j):this._previousStyleCopy=null,k){for(d in k)!k.hasOwnProperty(d)||j&&j.hasOwnProperty(d)||(f=f||{},f[d]="");for(d in j)j.hasOwnProperty(d)&&k[d]!==j[d]&&(f=f||{},f[d]=j[d])}else f=j;else v.hasOwnProperty(c)?e(this._rootNodeID,c,j,b):(i.isStandardName[c]||i.isCustomAttribute(c))&&z.updatePropertyByID(this._rootNodeID,c,j)}f&&z.updateStylesByID(this._rootNodeID,f)},_updateDOMChildren:function(a,b,c){var d=this._currentElement.props,e=w[typeof a.children]?a.children:null,f=w[typeof d.children]?d.children:null,g=a.dangerouslySetInnerHTML&&a.dangerouslySetInnerHTML.__html,h=d.dangerouslySetInnerHTML&&d.dangerouslySetInnerHTML.__html,i=null!=e?null:a.children,j=null!=f?null:d.children,k=null!=e||null!=g,l=null!=f||null!=h;null!=i&&null==j?this.updateChildren(null,b,c):k&&!l&&this.updateTextContent(""),null!=f?e!==f&&this.updateTextContent(""+f):null!=h?g!==h&&z.updateInnerHTMLByID(this._rootNodeID,h):null!=j&&this.updateChildren(j,b,c)},unmountComponent:function(){this.unmountChildren(),k.deleteAllListeners(this._rootNodeID),l.unmountIDFromEnvironment(this._rootNodeID),this._rootNodeID=null}},o.measureMethods(g,"ReactDOMComponent",{mountComponent:"mountComponent",updateComponent:"updateComponent"}),p(g.prototype,g.Mixin,n.Mixin),g.injection={injectIDOperations:function(a){g.BackendIDOperations=z=a}},c.exports=g}(a("54"))}),c.registerDynamic("af",["6f","65","ae","77","b0","7c","b1","8c","a6","b2","66"],!0,function(a,b,c){"use strict";var d=(this||self,a("6f")),e=a("65"),f=a("ae"),g=a("77"),h=a("b0"),i=a("7c"),j=a("b1"),k=a("8c"),l=a("a6"),m=a("b2"),n=a("66"),o={Component:f.injection,Class:g.injection,DOMComponent:k.injection,DOMProperty:d.injection,EmptyComponent:h.injection,EventPluginHub:e.injection,EventEmitter:i.injection,NativeComponent:j.injection,Perf:l.injection,RootIndex:m.injection,Updates:n.injection};c.exports=o}),c.registerDynamic("b3",["b4","50","7c","b5","b6","73","5a"],!0,function(a,b,c){"use strict";function d(){this.reinitializeTransaction(),this.renderToStaticMarkup=!1,this.reactMountReady=e.getPooled(null),this.putListenerQueue=i.getPooled()}var e=(this||self,a("b4")),f=a("50"),g=a("7c"),h=a("b5"),i=a("b6"),j=a("73"),k=a("5a"),l={initialize:h.getSelectionInformation,close:h.restoreSelection},m={initialize:function(){var a=g.isEnabled();return g.setEnabled(!1),a},close:function(a){g.setEnabled(a)}},n={initialize:function(){this.reactMountReady.reset()},close:function(){this.reactMountReady.notifyAll()}},o={initialize:function(){this.putListenerQueue.reset()},close:function(){this.putListenerQueue.putListeners()}},p=[o,l,m,n],q={getTransactionWrappers:function(){return p},getReactMountReady:function(){return this.reactMountReady},getPutListenerQueue:function(){return this.putListenerQueue},destructor:function(){e.release(this.reactMountReady),this.reactMountReady=null,i.release(this.putListenerQueue),this.putListenerQueue=null}};k(d.prototype,j.Mixin,q),f.addPoolingTo(d),c.exports=d}),c.registerDynamic("b7",[],!0,function(a,b,c){"use strict";function d(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function e(a){for(;a;){if(a.nextSibling)return a.nextSibling;a=a.parentNode}}function f(a,b){for(var c=d(a),f=0,g=0;c;){if(3===c.nodeType){if(g=f+c.textContent.length,f<=b&&g>=b)return{node:c,offset:b-f};f=g}c=d(e(c))}}this||self;c.exports=f}),c.registerDynamic("5b",["62"],!0,function(a,b,c){"use strict";function d(){return!f&&e.canUseDOM&&(f="textContent"in document.documentElement?"textContent":"innerText"),f}var e=(this||self,a("62")),f=null;c.exports=d}),c.registerDynamic("b8",["62","b7","5b"],!0,function(a,b,c){"use strict";function d(a,b,c,d){return a===c&&b===d}function e(a){var b=document.selection,c=b.createRange(),d=c.text.length,e=c.duplicate();e.moveToElementText(a),e.setEndPoint("EndToStart",c);var f=e.text.length,g=f+d;return{start:f,end:g}}function f(a){var b=window.getSelection&&window.getSelection();if(!b||0===b.rangeCount)return null;var c=b.anchorNode,e=b.anchorOffset,f=b.focusNode,g=b.focusOffset,h=b.getRangeAt(0),i=d(b.anchorNode,b.anchorOffset,b.focusNode,b.focusOffset),j=i?0:h.toString().length,k=h.cloneRange();k.selectNodeContents(a),k.setEnd(h.startContainer,h.startOffset);var l=d(k.startContainer,k.startOffset,k.endContainer,k.endOffset),m=l?0:k.toString().length,n=m+j,o=document.createRange();o.setStart(c,e),o.setEnd(f,g);var p=o.collapsed;return{start:p?n:m,end:p?m:n}}function g(a,b){var c,d,e=document.selection.createRange().duplicate();"undefined"==typeof b.end?(c=b.start,d=c):b.start>b.end?(c=b.end,d=b.start):(c=b.start,d=b.end),e.moveToElementText(a),e.moveStart("character",c),e.setEndPoint("EndToStart",e),e.moveEnd("character",d-c),e.select()}function h(a,b){if(window.getSelection){var c=window.getSelection(),d=a[k()].length,e=Math.min(b.start,d),f="undefined"==typeof b.end?e:Math.min(b.end,d);if(!c.extend&&e>f){var g=f;f=e,e=g}var h=j(a,e),i=j(a,f);if(h&&i){var l=document.createRange();l.setStart(h.node,h.offset),c.removeAllRanges(),e>f?(c.addRange(l),c.extend(i.node,i.offset)):(l.setEnd(i.node,i.offset),c.addRange(l))}}}var i=(this||self,a("62")),j=a("b7"),k=a("5b"),l=i.canUseDOM&&"selection"in document&&!("getSelection"in window),m={getOffsets:l?e:f,setOffsets:l?g:h};c.exports=m}),c.registerDynamic("86",[],!0,function(a,b,c){"use strict";function d(a){try{a.focus()}catch(a){}}this||self;c.exports=d}),c.registerDynamic("b5",["b8","b9","86","ba"],!0,function(a,b,c){"use strict";function d(a){return f(document.documentElement,a)}var e=(this||self,a("b8")),f=a("b9"),g=a("86"),h=a("ba"),i={hasSelectionCapabilities:function(a){return a&&("INPUT"===a.nodeName&&"text"===a.type||"TEXTAREA"===a.nodeName||"true"===a.contentEditable)},getSelectionInformation:function(){var a=h();return{focusedElem:a,selectionRange:i.hasSelectionCapabilities(a)?i.getSelection(a):null}},restoreSelection:function(a){var b=h(),c=a.focusedElem,e=a.selectionRange;b!==c&&d(c)&&(i.hasSelectionCapabilities(c)&&i.setSelection(c,e),g(c))},getSelection:function(a){var b;if("selectionStart"in a)b={start:a.selectionStart,end:a.selectionEnd};else if(document.selection&&"INPUT"===a.nodeName){var c=document.selection.createRange();c.parentElement()===a&&(b={start:-c.moveStart("character",-a.value.length),end:-c.moveEnd("character",-a.value.length)})}else b=e.getOffsets(a);return b||{start:0,end:0}},setSelection:function(a,b){var c=b.start,d=b.end;if("undefined"==typeof d&&(d=c),"selectionStart"in a)a.selectionStart=c,a.selectionEnd=Math.min(d,a.value.length);else if(document.selection&&"INPUT"===a.nodeName){var f=a.createTextRange();f.collapse(!0),f.moveStart("character",c),f.moveEnd("character",d-c),f.select()}else e.setOffsets(a,b)}};c.exports=i}),c.registerDynamic("ba",[],!0,function(a,b,c){function d(){try{return document.activeElement||document.body}catch(a){return document.body}}this||self;c.exports=d}),c.registerDynamic("68",[],!0,function(a,b,c){"use strict";function d(a){return a&&("INPUT"===a.nodeName&&e[a.type]||"TEXTAREA"===a.nodeName)}var e=(this||self,{color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0});c.exports=d}),c.registerDynamic("bb",[],!0,function(a,b,c){"use strict";function d(a,b){if(a===b)return!0;var c;for(c in a)if(a.hasOwnProperty(c)&&(!b.hasOwnProperty(c)||a[c]!==b[c]))return!1;for(c in b)if(b.hasOwnProperty(c)&&!a.hasOwnProperty(c))return!1;return!0}this||self;c.exports=d}),c.registerDynamic("bc",["60","61","b5","5d","ba","68","63","bb"],!0,function(a,b,c){"use strict";function d(a){if("selectionStart"in a&&h.hasSelectionCapabilities(a))return{start:a.selectionStart,end:a.selectionEnd};if(window.getSelection){var b=window.getSelection();return{anchorNode:b.anchorNode,anchorOffset:b.anchorOffset,focusNode:b.focusNode,focusOffset:b.focusOffset}}if(document.selection){var c=document.selection.createRange();return{parentElement:c.parentElement(),text:c.text,top:c.boundingTop,left:c.boundingLeft}}}function e(a){if(s||null==p||p!==j())return null;var b=d(p);if(!r||!m(r,b)){r=b;var c=i.getPooled(o.select,q,a);return c.type="select",c.target=p,g.accumulateTwoPhaseDispatches(c),c}}var f=(this||self,a("60")),g=a("61"),h=a("b5"),i=a("5d"),j=a("ba"),k=a("68"),l=a("63"),m=a("bb"),n=f.topLevelTypes,o={select:{phasedRegistrationNames:{bubbled:l({onSelect:null}),captured:l({onSelectCapture:null})},dependencies:[n.topBlur,n.topContextMenu,n.topFocus,n.topKeyDown,n.topMouseDown,n.topMouseUp,n.topSelectionChange]}},p=null,q=null,r=null,s=!1,t={eventTypes:o,extractEvents:function(a,b,c,d){switch(a){case n.topFocus:(k(b)||"true"===b.contentEditable)&&(p=b,q=c,r=null);break;case n.topBlur:p=null,q=null,r=null;break;case n.topMouseDown:s=!0;break;case n.topContextMenu:case n.topMouseUp:return s=!1,e(d);case n.topSelectionChange:case n.topKeyDown:case n.topKeyUp:return e(d)}}};c.exports=t}),c.registerDynamic("bd",[],!0,function(a,b,c){"use strict";var d=(this||self,Math.pow(2,53)),e={createReactRootIndex:function(){return Math.ceil(Math.random()*d)}};c.exports=e}),c.registerDynamic("61",["60","65","7d","7e","54"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a,b,c){var d=b.dispatchConfig.phasedRegistrationNames[c];return q(a,d)}function e(a,b,c){var e=b?p.bubbled:p.captured,f=d(a,c,e);f&&(c._dispatchListeners=n(c._dispatchListeners,f),c._dispatchIDs=n(c._dispatchIDs,a))}function f(a){a&&a.dispatchConfig.phasedRegistrationNames&&m.injection.getInstanceHandle().traverseTwoPhase(a.dispatchMarker,e,a)}function g(a,b,c){if(c&&c.dispatchConfig.registrationName){var d=c.dispatchConfig.registrationName,e=q(a,d);e&&(c._dispatchListeners=n(c._dispatchListeners,e),c._dispatchIDs=n(c._dispatchIDs,a))}}function h(a){a&&a.dispatchConfig.registrationName&&g(a.dispatchMarker,null,a)}function i(a){o(a,f)}function j(a,b,c,d){m.injection.getInstanceHandle().traverseEnterLeave(c,d,g,a,b)}function k(a){o(a,h)}var l=a("60"),m=a("65"),n=a("7d"),o=a("7e"),p=l.PropagationPhases,q=m.getListener,r={accumulateTwoPhaseDispatches:i,accumulateDirectDispatches:k,accumulateEnterLeaveDispatches:j};c.exports=r}(a("54"))}),c.registerDynamic("be",["5d"],!0,function(a,b,c){"use strict";function d(a,b,c){e.call(this,a,b,c)}var e=(this||self,a("5d")),f={clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}};e.augmentClass(d,f),c.exports=d}),c.registerDynamic("bf",["c0"],!0,function(a,b,c){"use strict";function d(a,b,c){e.call(this,a,b,c)}var e=(this||self,a("c0")),f={relatedTarget:null};e.augmentClass(d,f),c.exports=d}),c.registerDynamic("c1",["c2"],!0,function(a,b,c){"use strict";function d(a){if(a.key){var b=f[a.key]||a.key;if("Unidentified"!==b)return b}if("keypress"===a.type){var c=e(a);return 13===c?"Enter":String.fromCharCode(c)}return"keydown"===a.type||"keyup"===a.type?g[a.keyCode]||"Unidentified":""}var e=(this||self,a("c2")),f={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},g={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};c.exports=d}),c.registerDynamic("c3",["c0","c2","c1","c4"],!0,function(a,b,c){"use strict";function d(a,b,c){e.call(this,a,b,c)}var e=(this||self,a("c0")),f=a("c2"),g=a("c1"),h=a("c4"),i={key:g,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:h,charCode:function(a){return"keypress"===a.type?f(a):0},keyCode:function(a){return"keydown"===a.type||"keyup"===a.type?a.keyCode:0},which:function(a){return"keypress"===a.type?f(a):"keydown"===a.type||"keyup"===a.type?a.keyCode:0}};e.augmentClass(d,i),c.exports=d}),c.registerDynamic("c5",["6c"],!0,function(a,b,c){"use strict";function d(a,b,c){e.call(this,a,b,c)}var e=(this||self,a("6c")),f={dataTransfer:null};e.augmentClass(d,f),c.exports=d}),c.registerDynamic("c6",["c0","c4"],!0,function(a,b,c){"use strict";function d(a,b,c){e.call(this,a,b,c)}var e=(this||self,a("c0")),f=a("c4"),g={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:f};e.augmentClass(d,g),c.exports=d}),c.registerDynamic("5d",["50","5a","71","92"],!0,function(a,b,c){"use strict";function d(a,b,c){this.dispatchConfig=a,this.dispatchMarker=b,this.nativeEvent=c;var d=this.constructor.Interface;for(var e in d)if(d.hasOwnProperty(e)){var f=d[e];f?this[e]=f(c):this[e]=c[e]}var h=null!=c.defaultPrevented?c.defaultPrevented:c.returnValue===!1;h?this.isDefaultPrevented=g.thatReturnsTrue:this.isDefaultPrevented=g.thatReturnsFalse,this.isPropagationStopped=g.thatReturnsFalse}var e=(this||self,a("50")),f=a("5a"),g=a("71"),h=a("92"),i={type:null,target:h,currentTarget:g.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};f(d.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a.preventDefault?a.preventDefault():a.returnValue=!1,this.isDefaultPrevented=g.thatReturnsTrue},stopPropagation:function(){var a=this.nativeEvent;a.stopPropagation?a.stopPropagation():a.cancelBubble=!0,this.isPropagationStopped=g.thatReturnsTrue},persist:function(){this.isPersistent=g.thatReturnsTrue},isPersistent:g.thatReturnsFalse,destructor:function(){var a=this.constructor.Interface;for(var b in a)this[b]=null;this.dispatchConfig=null,this.dispatchMarker=null,this.nativeEvent=null}}),d.Interface=i,d.augmentClass=function(a,b){var c=this,d=Object.create(c.prototype);f(d,a.prototype),a.prototype=d,a.prototype.constructor=a,a.Interface=f({},c.Interface,b),a.augmentClass=c.augmentClass,e.addPoolingTo(a,e.threeArgumentPooler)},e.addPoolingTo(d,e.threeArgumentPooler),c.exports=d}),c.registerDynamic("92",[],!0,function(a,b,c){"use strict";function d(a){var b=a.target||a.srcElement||window;return 3===b.nodeType?b.parentNode:b}this||self;c.exports=d}),c.registerDynamic("c0",["5d","92"],!0,function(a,b,c){"use strict";function d(a,b,c){e.call(this,a,b,c)}var e=(this||self,a("5d")),f=a("92"),g={view:function(a){if(a.view)return a.view;var b=f(a);if(null!=b&&b.window===b)return b;var c=b.ownerDocument;return c?c.defaultView||c.parentWindow:window},detail:function(a){return a.detail||0}};e.augmentClass(d,g),c.exports=d}),c.registerDynamic("c4",[],!0,function(a,b,c){"use strict";function d(a){var b=this,c=b.nativeEvent;if(c.getModifierState)return c.getModifierState(a);var d=f[a];return!!d&&!!c[d]}function e(a){return d}var f=(this||self,{Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"});c.exports=e}),c.registerDynamic("6c",["c0","c7","c4"],!0,function(a,b,c){"use strict";function d(a,b,c){e.call(this,a,b,c)}var e=(this||self,a("c0")),f=a("c7"),g=a("c4"),h={screenX:null,screenY:null,clientX:null,clientY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:g,button:function(a){var b=a.button;return"which"in a?b:2===b?2:4===b?1:0},buttons:null,relatedTarget:function(a){return a.relatedTarget||(a.fromElement===a.srcElement?a.toElement:a.fromElement)},pageX:function(a){return"pageX"in a?a.pageX:a.clientX+f.currentScrollLeft},pageY:function(a){return"pageY"in a?a.pageY:a.clientY+f.currentScrollTop}};e.augmentClass(d,h),c.exports=d}),c.registerDynamic("c8",["6c"],!0,function(a,b,c){"use strict";function d(a,b,c){e.call(this,a,b,c)}var e=(this||self,a("6c")),f={deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:null,deltaMode:null};e.augmentClass(d,f),c.exports=d}),c.registerDynamic("c2",[],!0,function(a,b,c){"use strict";function d(a){var b,c=a.keyCode;return"charCode"in a?(b=a.charCode,0===b&&13===c&&(b=13)):b=c,b>=32||13===b?b:0}this||self;c.exports=d}),c.registerDynamic("c9",["60","ca","61","be","5d","bf","c3","6c","c5","c6","c0","c8","c2","7f","63","53","54"],!0,function(a,b,c){this||self;!function(b){"use strict";var d=a("60"),e=a("ca"),f=a("61"),g=a("be"),h=a("5d"),i=a("bf"),j=a("c3"),k=a("6c"),l=a("c5"),m=a("c6"),n=a("c0"),o=a("c8"),p=a("c2"),q=a("7f"),r=a("63"),s=(a("53"),d.topLevelTypes),t={blur:{phasedRegistrationNames:{bubbled:r({onBlur:!0}),captured:r({onBlurCapture:!0})}},click:{phasedRegistrationNames:{bubbled:r({onClick:!0}),captured:r({onClickCapture:!0})}},contextMenu:{phasedRegistrationNames:{bubbled:r({onContextMenu:!0}),captured:r({onContextMenuCapture:!0})}},copy:{phasedRegistrationNames:{bubbled:r({onCopy:!0}),captured:r({onCopyCapture:!0})}},cut:{phasedRegistrationNames:{bubbled:r({onCut:!0}),captured:r({onCutCapture:!0})}},doubleClick:{phasedRegistrationNames:{bubbled:r({onDoubleClick:!0}),captured:r({onDoubleClickCapture:!0})}},drag:{phasedRegistrationNames:{bubbled:r({onDrag:!0}),captured:r({onDragCapture:!0})}},dragEnd:{phasedRegistrationNames:{bubbled:r({onDragEnd:!0}),captured:r({onDragEndCapture:!0})}},dragEnter:{phasedRegistrationNames:{bubbled:r({onDragEnter:!0}),captured:r({onDragEnterCapture:!0})}},dragExit:{phasedRegistrationNames:{bubbled:r({onDragExit:!0}),captured:r({onDragExitCapture:!0})}},dragLeave:{phasedRegistrationNames:{bubbled:r({onDragLeave:!0}),captured:r({onDragLeaveCapture:!0})}},dragOver:{phasedRegistrationNames:{bubbled:r({onDragOver:!0}),captured:r({onDragOverCapture:!0})}},dragStart:{phasedRegistrationNames:{bubbled:r({onDragStart:!0}),captured:r({onDragStartCapture:!0})}},drop:{phasedRegistrationNames:{bubbled:r({onDrop:!0}),captured:r({onDropCapture:!0})}},focus:{
|
17
17
|
phasedRegistrationNames:{bubbled:r({onFocus:!0}),captured:r({onFocusCapture:!0})}},input:{phasedRegistrationNames:{bubbled:r({onInput:!0}),captured:r({onInputCapture:!0})}},keyDown:{phasedRegistrationNames:{bubbled:r({onKeyDown:!0}),captured:r({onKeyDownCapture:!0})}},keyPress:{phasedRegistrationNames:{bubbled:r({onKeyPress:!0}),captured:r({onKeyPressCapture:!0})}},keyUp:{phasedRegistrationNames:{bubbled:r({onKeyUp:!0}),captured:r({onKeyUpCapture:!0})}},load:{phasedRegistrationNames:{bubbled:r({onLoad:!0}),captured:r({onLoadCapture:!0})}},error:{phasedRegistrationNames:{bubbled:r({onError:!0}),captured:r({onErrorCapture:!0})}},mouseDown:{phasedRegistrationNames:{bubbled:r({onMouseDown:!0}),captured:r({onMouseDownCapture:!0})}},mouseMove:{phasedRegistrationNames:{bubbled:r({onMouseMove:!0}),captured:r({onMouseMoveCapture:!0})}},mouseOut:{phasedRegistrationNames:{bubbled:r({onMouseOut:!0}),captured:r({onMouseOutCapture:!0})}},mouseOver:{phasedRegistrationNames:{bubbled:r({onMouseOver:!0}),captured:r({onMouseOverCapture:!0})}},mouseUp:{phasedRegistrationNames:{bubbled:r({onMouseUp:!0}),captured:r({onMouseUpCapture:!0})}},paste:{phasedRegistrationNames:{bubbled:r({onPaste:!0}),captured:r({onPasteCapture:!0})}},reset:{phasedRegistrationNames:{bubbled:r({onReset:!0}),captured:r({onResetCapture:!0})}},scroll:{phasedRegistrationNames:{bubbled:r({onScroll:!0}),captured:r({onScrollCapture:!0})}},submit:{phasedRegistrationNames:{bubbled:r({onSubmit:!0}),captured:r({onSubmitCapture:!0})}},touchCancel:{phasedRegistrationNames:{bubbled:r({onTouchCancel:!0}),captured:r({onTouchCancelCapture:!0})}},touchEnd:{phasedRegistrationNames:{bubbled:r({onTouchEnd:!0}),captured:r({onTouchEndCapture:!0})}},touchMove:{phasedRegistrationNames:{bubbled:r({onTouchMove:!0}),captured:r({onTouchMoveCapture:!0})}},touchStart:{phasedRegistrationNames:{bubbled:r({onTouchStart:!0}),captured:r({onTouchStartCapture:!0})}},wheel:{phasedRegistrationNames:{bubbled:r({onWheel:!0}),captured:r({onWheelCapture:!0})}}},u={topBlur:t.blur,topClick:t.click,topContextMenu:t.contextMenu,topCopy:t.copy,topCut:t.cut,topDoubleClick:t.doubleClick,topDrag:t.drag,topDragEnd:t.dragEnd,topDragEnter:t.dragEnter,topDragExit:t.dragExit,topDragLeave:t.dragLeave,topDragOver:t.dragOver,topDragStart:t.dragStart,topDrop:t.drop,topError:t.error,topFocus:t.focus,topInput:t.input,topKeyDown:t.keyDown,topKeyPress:t.keyPress,topKeyUp:t.keyUp,topLoad:t.load,topMouseDown:t.mouseDown,topMouseMove:t.mouseMove,topMouseOut:t.mouseOut,topMouseOver:t.mouseOver,topMouseUp:t.mouseUp,topPaste:t.paste,topReset:t.reset,topScroll:t.scroll,topSubmit:t.submit,topTouchCancel:t.touchCancel,topTouchEnd:t.touchEnd,topTouchMove:t.touchMove,topTouchStart:t.touchStart,topWheel:t.wheel};for(var v in u)u[v].dependencies=[v];var w={eventTypes:t,executeDispatch:function(a,b,c){var d=e.executeDispatch(a,b,c);d===!1&&(a.stopPropagation(),a.preventDefault())},extractEvents:function(a,b,c,d){var e=u[a];if(!e)return null;var r;switch(a){case s.topInput:case s.topLoad:case s.topError:case s.topReset:case s.topSubmit:r=h;break;case s.topKeyPress:if(0===p(d))return null;case s.topKeyDown:case s.topKeyUp:r=j;break;case s.topBlur:case s.topFocus:r=i;break;case s.topClick:if(2===d.button)return null;case s.topContextMenu:case s.topDoubleClick:case s.topMouseDown:case s.topMouseMove:case s.topMouseOut:case s.topMouseOver:case s.topMouseUp:r=k;break;case s.topDrag:case s.topDragEnd:case s.topDragEnter:case s.topDragExit:case s.topDragLeave:case s.topDragOver:case s.topDragStart:case s.topDrop:r=l;break;case s.topTouchCancel:case s.topTouchEnd:case s.topTouchMove:case s.topTouchStart:r=m;break;case s.topScroll:r=n;break;case s.topWheel:r=o;break;case s.topCopy:case s.topCut:case s.topPaste:r=g}q(r);var t=r.getPooled(e,c,d);return f.accumulateTwoPhaseDispatches(t),t}};c.exports=w}(a("54"))}),c.registerDynamic("cb",["6f"],!0,function(a,b,c){"use strict";var d=(this||self,a("6f")),e=d.injection.MUST_USE_ATTRIBUTE,f={Properties:{clipPath:e,cx:e,cy:e,d:e,dx:e,dy:e,fill:e,fillOpacity:e,fontFamily:e,fontSize:e,fx:e,fy:e,gradientTransform:e,gradientUnits:e,markerEnd:e,markerMid:e,markerStart:e,offset:e,opacity:e,patternContentUnits:e,patternUnits:e,points:e,preserveAspectRatio:e,r:e,rx:e,ry:e,spreadMethod:e,stopColor:e,stopOpacity:e,stroke:e,strokeDasharray:e,strokeLinecap:e,strokeOpacity:e,strokeWidth:e,textAnchor:e,transform:e,version:e,viewBox:e,x1:e,x2:e,x:e,y1:e,y2:e,y:e},DOMAttributeNames:{clipPath:"clip-path",fillOpacity:"fill-opacity",fontFamily:"font-family",fontSize:"font-size",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",patternContentUnits:"patternContentUnits",patternUnits:"patternUnits",preserveAspectRatio:"preserveAspectRatio",spreadMethod:"spreadMethod",stopColor:"stop-color",stopOpacity:"stop-opacity",strokeDasharray:"stroke-dasharray",strokeLinecap:"stroke-linecap",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",textAnchor:"text-anchor",viewBox:"viewBox"}};c.exports=f}),c.registerDynamic("cc",["cd","7f","53","54"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a,b){this.props=a,this.context=b}var e=a("cd"),f=a("7f");a("53");d.prototype.setState=function(a,b){f("object"==typeof a||"function"==typeof a||null==a),e.enqueueSetState(this,a),b&&e.enqueueCallback(this,b)},d.prototype.forceUpdate=function(a){e.enqueueForceUpdate(this),a&&e.enqueueCallback(this,a)};c.exports=d}(a("54"))}),c.registerDynamic("ce",[],!0,function(a,b,c){"use strict";var d=(this||self,{guard:function(a,b){return a}});c.exports=d}),c.registerDynamic("63",[],!0,function(a,b,c){var d=(this||self,function(a){var b;for(b in a)if(a.hasOwnProperty(b))return b;return null});c.exports=d}),c.registerDynamic("77",["cc","cf","57","ce","d0","d1","d2","d3","cd","5a","7f","78","63","53","54"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a,b){var c=y.hasOwnProperty(b)?y[b]:null;A.hasOwnProperty(b)&&s(c===w.OVERRIDE_BASE),a.hasOwnProperty(b)&&s(c===w.DEFINE_MANY||c===w.DEFINE_MANY_MERGED)}function e(a,b){if(b){s("function"!=typeof b),s(!m.isValidElement(b));var c=a.prototype;b.hasOwnProperty(v)&&z.mixins(a,b.mixins);for(var e in b)if(b.hasOwnProperty(e)&&e!==v){var f=b[e];if(d(c,e),z.hasOwnProperty(e))z[e](a,f);else{var g=y.hasOwnProperty(e),j=c.hasOwnProperty(e),k=f&&f.__reactDontBind,l="function"==typeof f,n=l&&!g&&!j&&!k;if(n)c.__reactAutoBindMap||(c.__reactAutoBindMap={}),c.__reactAutoBindMap[e]=f,c[e]=f;else if(j){var o=y[e];s(g&&(o===w.DEFINE_MANY_MERGED||o===w.DEFINE_MANY)),o===w.DEFINE_MANY_MERGED?c[e]=h(c[e],f):o===w.DEFINE_MANY&&(c[e]=i(c[e],f))}else c[e]=f}}}}function f(a,b){if(b)for(var c in b){var d=b[c];if(b.hasOwnProperty(c)){var e=c in z;s(!e);var f=c in a;s(!f),a[c]=d}}}function g(a,b){s(a&&b&&"object"==typeof a&&"object"==typeof b);for(var c in b)b.hasOwnProperty(c)&&(s(void 0===a[c]),a[c]=b[c]);return a}function h(a,b){return function(){var c=a.apply(this,arguments),d=b.apply(this,arguments);if(null==c)return d;if(null==d)return c;var e={};return g(e,c),g(e,d),e}}function i(a,b){return function(){a.apply(this,arguments),b.apply(this,arguments)}}function j(a,b){var c=b.bind(a);return c}function k(a){for(var b in a.__reactAutoBindMap)if(a.__reactAutoBindMap.hasOwnProperty(b)){var c=a.__reactAutoBindMap[b];a[b]=j(a,n.guard(c,a.constructor.displayName+"."+b))}}var l=a("cc"),m=(a("cf"),a("57")),n=a("ce"),o=a("d0"),p=a("d1"),q=(a("d2"),a("d3"),a("cd")),r=a("5a"),s=a("7f"),t=a("78"),u=a("63"),v=(a("53"),u({mixins:null})),w=t({DEFINE_ONCE:null,DEFINE_MANY:null,OVERRIDE_BASE:null,DEFINE_MANY_MERGED:null}),x=[],y={mixins:w.DEFINE_MANY,statics:w.DEFINE_MANY,propTypes:w.DEFINE_MANY,contextTypes:w.DEFINE_MANY,childContextTypes:w.DEFINE_MANY,getDefaultProps:w.DEFINE_MANY_MERGED,getInitialState:w.DEFINE_MANY_MERGED,getChildContext:w.DEFINE_MANY_MERGED,render:w.DEFINE_ONCE,componentWillMount:w.DEFINE_MANY,componentDidMount:w.DEFINE_MANY,componentWillReceiveProps:w.DEFINE_MANY,shouldComponentUpdate:w.DEFINE_ONCE,componentWillUpdate:w.DEFINE_MANY,componentDidUpdate:w.DEFINE_MANY,componentWillUnmount:w.DEFINE_MANY,updateComponent:w.OVERRIDE_BASE},z={displayName:function(a,b){a.displayName=b},mixins:function(a,b){if(b)for(var c=0;c<b.length;c++)e(a,b[c])},childContextTypes:function(a,b){a.childContextTypes=r({},a.childContextTypes,b)},contextTypes:function(a,b){a.contextTypes=r({},a.contextTypes,b)},getDefaultProps:function(a,b){a.getDefaultProps?a.getDefaultProps=h(a.getDefaultProps,b):a.getDefaultProps=b},propTypes:function(a,b){a.propTypes=r({},a.propTypes,b)},statics:function(a,b){f(a,b)}},A={replaceState:function(a,b){q.enqueueReplaceState(this,a),b&&q.enqueueCallback(this,b)},isMounted:function(){var a=o.get(this);return a&&a!==p.currentlyMountingInstance},setProps:function(a,b){q.enqueueSetProps(this,a),b&&q.enqueueCallback(this,b)},replaceProps:function(a,b){q.enqueueReplaceProps(this,a),b&&q.enqueueCallback(this,b)}},B=function(){};r(B.prototype,l.prototype,A);var C={createClass:function(a){var b=function(a,b){this.__reactAutoBindMap&&k(this),this.props=a,this.context=b,this.state=null;var c=this.getInitialState?this.getInitialState():null;s("object"==typeof c&&!Array.isArray(c)),this.state=c};b.prototype=new B,b.prototype.constructor=b,x.forEach(e.bind(null,b)),e(b,a),b.getDefaultProps&&(b.defaultProps=b.getDefaultProps()),s(b.prototype.render);for(var c in y)b.prototype[c]||(b.prototype[c]=null);return b.type=b,b},injection:{injectMixin:function(a){x.push(a)}}};c.exports=C}(a("54"))}),c.registerDynamic("d4",["77","57","7f","54"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a){var b=f.createFactory(a),c=e.createClass({tagName:a.toUpperCase(),displayName:"ReactFullPageComponent"+a,componentWillUnmount:function(){g(!1)},render:function(){return b(this.props)}});return c}var e=a("77"),f=a("57"),g=a("7f");c.exports=d}(a("54"))}),c.registerDynamic("d5",["5a"],!0,function(a,b,c){function d(a){for(var b=0,c=0;c<a.length;c++){var d=a[c];b+=d.totalTime}return b}function e(a){for(var b=[],c=0;c<a.length;c++){var d,e=a[c];for(d in e.writes)e.writes[d].forEach(function(a){b.push({id:d,type:k[a.type]||a.type,args:a.args})})}return b}function f(a){for(var b,c={},d=0;d<a.length;d++){var e=a[d],f=i({},e.exclusive,e.inclusive);for(var g in f)b=e.displayNames[g].current,c[b]=c[b]||{componentName:b,inclusive:0,exclusive:0,render:0,count:0},e.render[g]&&(c[b].render+=e.render[g]),e.exclusive[g]&&(c[b].exclusive+=e.exclusive[g]),e.inclusive[g]&&(c[b].inclusive+=e.inclusive[g]),e.counts[g]&&(c[b].count+=e.counts[g])}var h=[];for(b in c)c[b].exclusive>=j&&h.push(c[b]);return h.sort(function(a,b){return b.exclusive-a.exclusive}),h}function g(a,b){for(var c,d={},e=0;e<a.length;e++){var f,g=a[e],k=i({},g.exclusive,g.inclusive);b&&(f=h(g));for(var l in k)if(!b||f[l]){var m=g.displayNames[l];c=m.owner+" > "+m.current,d[c]=d[c]||{componentName:c,time:0,count:0},g.inclusive[l]&&(d[c].time+=g.inclusive[l]),g.counts[l]&&(d[c].count+=g.counts[l])}}var n=[];for(c in d)d[c].time>=j&&n.push(d[c]);return n.sort(function(a,b){return b.time-a.time}),n}function h(a){var b={},c=Object.keys(a.writes),d=i({},a.exclusive,a.inclusive);for(var e in d){for(var f=!1,g=0;g<c.length;g++)if(0===c[g].indexOf(e)){f=!0;break}!f&&a.counts[e]>0&&(b[e]=!0)}return b}var i=(this||self,a("5a")),j=1.2,k={_mountImageIntoNode:"set innerHTML",INSERT_MARKUP:"set innerHTML",MOVE_EXISTING:"move",REMOVE_NODE:"remove",TEXT_CONTENT:"set textContent",updatePropertyByID:"update attribute",deletePropertyByID:"delete attribute",updateStylesByID:"update styles",updateInnerHTMLByID:"set innerHTML",dangerouslyReplaceNodeWithMarkupByID:"replace"},l={getExclusiveSummary:f,getInclusiveSummary:g,getDOMSummary:e,getTotalTime:d};c.exports=l}),c.registerDynamic("d6",["62"],!0,function(a,b,c){"use strict";var d,e=(this||self,a("62"));e.canUseDOM&&(d=window.performance||window.msPerformance||window.webkitPerformance),c.exports=d||{}}),c.registerDynamic("d7",["d6"],!0,function(a,b,c){var d=(this||self,a("d6"));d&&d.now||(d=Date);var e=d.now.bind(d);c.exports=e}),c.registerDynamic("d8",["6f","d5","6d","a6","d7"],!0,function(a,b,c){"use strict";function d(a){return Math.floor(100*a)/100}function e(a,b,c){a[b]=(a[b]||0)+c}var f=(this||self,a("6f")),g=a("d5"),h=a("6d"),i=a("a6"),j=a("d7"),k={_allMeasurements:[],_mountStack:[0],_injected:!1,start:function(){k._injected||i.injection.injectMeasure(k.measure),k._allMeasurements.length=0,i.enableMeasure=!0},stop:function(){i.enableMeasure=!1},getLastMeasurements:function(){return k._allMeasurements},printExclusive:function(a){a=a||k._allMeasurements;var b=g.getExclusiveSummary(a);console.table(b.map(function(a){return{"Component class name":a.componentName,"Total inclusive time (ms)":d(a.inclusive),"Exclusive mount time (ms)":d(a.exclusive),"Exclusive render time (ms)":d(a.render),"Mount time per instance (ms)":d(a.exclusive/a.count),"Render time per instance (ms)":d(a.render/a.count),Instances:a.count}}))},printInclusive:function(a){a=a||k._allMeasurements;var b=g.getInclusiveSummary(a);console.table(b.map(function(a){return{"Owner > component":a.componentName,"Inclusive time (ms)":d(a.time),Instances:a.count}})),console.log("Total time:",g.getTotalTime(a).toFixed(2)+" ms")},getMeasurementsSummaryMap:function(a){var b=g.getInclusiveSummary(a,!0);return b.map(function(a){return{"Owner > component":a.componentName,"Wasted time (ms)":a.time,Instances:a.count}})},printWasted:function(a){a=a||k._allMeasurements,console.table(k.getMeasurementsSummaryMap(a)),console.log("Total time:",g.getTotalTime(a).toFixed(2)+" ms")},printDOM:function(a){a=a||k._allMeasurements;var b=g.getDOMSummary(a);console.table(b.map(function(a){var b={};return b[f.ID_ATTRIBUTE_NAME]=a.id,b.type=a.type,b.args=JSON.stringify(a.args),b})),console.log("Total time:",g.getTotalTime(a).toFixed(2)+" ms")},_recordWrite:function(a,b,c,d){var e=k._allMeasurements[k._allMeasurements.length-1].writes;e[a]=e[a]||[],e[a].push({type:b,time:c,args:d})},measure:function(a,b,c){return function(){for(var d=[],f=0,g=arguments.length;f<g;f++)d.push(arguments[f]);var i,l,m;if("_renderNewRootComponent"===b||"flushBatchedUpdates"===b)return k._allMeasurements.push({exclusive:{},inclusive:{},render:{},counts:{},writes:{},displayNames:{},totalTime:0}),m=j(),l=c.apply(this,d),k._allMeasurements[k._allMeasurements.length-1].totalTime=j()-m,l;if("_mountImageIntoNode"===b||"ReactDOMIDOperations"===a){if(m=j(),l=c.apply(this,d),i=j()-m,"_mountImageIntoNode"===b){var n=h.getID(d[1]);k._recordWrite(n,b,i,d[0])}else"dangerouslyProcessChildrenUpdates"===b?d[0].forEach(function(a){var b={};null!==a.fromIndex&&(b.fromIndex=a.fromIndex),null!==a.toIndex&&(b.toIndex=a.toIndex),null!==a.textContent&&(b.textContent=a.textContent),null!==a.markupIndex&&(b.markup=d[1][a.markupIndex]),k._recordWrite(a.parentID,a.type,i,b)}):k._recordWrite(d[0],b,i,Array.prototype.slice.call(d,1));return l}if("ReactCompositeComponent"!==a||"mountComponent"!==b&&"updateComponent"!==b&&"_renderValidatedComponent"!==b)return c.apply(this,d);if("string"==typeof this._currentElement.type)return c.apply(this,d);var o="mountComponent"===b?d[0]:this._rootNodeID,p="_renderValidatedComponent"===b,q="mountComponent"===b,r=k._mountStack,s=k._allMeasurements[k._allMeasurements.length-1];if(p?e(s.counts,o,1):q&&r.push(0),m=j(),l=c.apply(this,d),i=j()-m,p)e(s.render,o,i);else if(q){var t=r.pop();r[r.length-1]+=i,e(s.exclusive,o,i-t),e(s.inclusive,o,i)}else e(s.inclusive,o,i);return s.displayNames[o]={current:this.getName(),owner:this._currentElement._owner?this._currentElement._owner.getName():"<root>"},l}}};c.exports=k}),c.registerDynamic("d9",["5f","64","69","6a","6b","62","6e","70","76","77","8b","72","8c","74","79","7b","a5","80","81","84","85","89","8a","57","90","af","91","6d","b3","bc","bd","c9","cb","d4","d8","54"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a){return o.createClass({tagName:a.toUpperCase(),render:function(){return new C(a,null,null,null,null,this.props)}})}function e(){E.EventEmitter.injectReactEventListener(D),E.EventPluginHub.injectEventPluginOrder(i),E.EventPluginHub.injectInstanceHandle(F),E.EventPluginHub.injectMount(G),E.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:K,EnterLeaveEventPlugin:j,ChangeEventPlugin:g,MobileSafariClickEventPlugin:m,SelectEventPlugin:I,BeforeInputEventPlugin:f}),E.NativeComponent.injectGenericComponentClass(r),E.NativeComponent.injectTextComponentClass(B),E.NativeComponent.injectAutoWrapper(d),E.Class.injectMixin(n),E.NativeComponent.injectComponentClasses({button:s,form:t,iframe:w,img:u,input:x,option:y,select:z,textarea:A,html:M("html"),head:M("head"),body:M("body")}),E.DOMProperty.injectDOMPropertyConfig(l),E.DOMProperty.injectDOMPropertyConfig(L),E.EmptyComponent.injectEmptyComponent("noscript"),E.Updates.injectReconcileTransaction(H),E.Updates.injectBatchingStrategy(q),E.RootIndex.injectCreateReactRootIndex(k.canUseDOM?h.createReactRootIndex:J.createReactRootIndex),E.Component.injectEnvironment(p),E.DOMComponent.injectIDOperations(v)}var f=a("5f"),g=a("64"),h=a("69"),i=a("6a"),j=a("6b"),k=a("62"),l=a("6e"),m=a("70"),n=a("76"),o=a("77"),p=a("8b"),q=a("72"),r=a("8c"),s=a("74"),t=a("79"),u=a("7b"),v=a("a5"),w=a("80"),x=a("81"),y=a("84"),z=a("85"),A=a("89"),B=a("8a"),C=a("57"),D=a("90"),E=a("af"),F=a("91"),G=a("6d"),H=a("b3"),I=a("bc"),J=a("bd"),K=a("c9"),L=a("cb"),M=a("d4");c.exports={inject:e}}(a("54"))}),c.registerDynamic("87",["57","51","d3","71"],!0,function(a,b,c){"use strict";function d(a){function b(b,c,d,e,f){if(e=e||v,null==c[d]){var g=t[f];return b?new Error("Required "+g+" `"+d+"` was not specified in "+("`"+e+"`.")):null}return a(c,d,e,f)}var c=b.bind(null,!1);return c.isRequired=b.bind(null,!0),c}function e(a){function b(b,c,d,e){var f=b[c],g=p(f);if(g!==a){var h=t[e],i=q(f);return new Error("Invalid "+h+" `"+c+"` of type `"+i+"` "+("supplied to `"+d+"`, expected `"+a+"`."))}return null}return d(b)}function f(){return d(u.thatReturns(null))}function g(a){function b(b,c,d,e){var f=b[c];if(!Array.isArray(f)){var g=t[e],h=p(f);return new Error("Invalid "+g+" `"+c+"` of type "+("`"+h+"` supplied to `"+d+"`, expected an array."))}for(var i=0;i<f.length;i++){var j=a(f,i,d,e);if(j instanceof Error)return j}return null}return d(b)}function h(){function a(a,b,c,d){if(!r.isValidElement(a[b])){var e=t[d];return new Error("Invalid "+e+" `"+b+"` supplied to "+("`"+c+"`, expected a ReactElement."))}return null}return d(a)}function i(a){function b(b,c,d,e){if(!(b[c]instanceof a)){var f=t[e],g=a.name||v;return new Error("Invalid "+f+" `"+c+"` supplied to "+("`"+d+"`, expected instance of `"+g+"`."))}return null}return d(b)}function j(a){function b(b,c,d,e){for(var f=b[c],g=0;g<a.length;g++)if(f===a[g])return null;var h=t[e],i=JSON.stringify(a);return new Error("Invalid "+h+" `"+c+"` of value `"+f+"` "+("supplied to `"+d+"`, expected one of "+i+"."))}return d(b)}function k(a){function b(b,c,d,e){var f=b[c],g=p(f);if("object"!==g){var h=t[e];return new Error("Invalid "+h+" `"+c+"` of type "+("`"+g+"` supplied to `"+d+"`, expected an object."))}for(var i in f)if(f.hasOwnProperty(i)){var j=a(f,i,d,e);if(j instanceof Error)return j}return null}return d(b)}function l(a){function b(b,c,d,e){for(var f=0;f<a.length;f++){var g=a[f];if(null==g(b,c,d,e))return null}var h=t[e];return new Error("Invalid "+h+" `"+c+"` supplied to "+("`"+d+"`."))}return d(b)}function m(){function a(a,b,c,d){if(!o(a[b])){var e=t[d];return new Error("Invalid "+e+" `"+b+"` supplied to "+("`"+c+"`, expected a ReactNode."))}return null}return d(a)}function n(a){function b(b,c,d,e){var f=b[c],g=p(f);if("object"!==g){var h=t[e];return new Error("Invalid "+h+" `"+c+"` of type `"+g+"` "+("supplied to `"+d+"`, expected `object`."))}for(var i in a){var j=a[i];if(j){var k=j(f,i,d,e);if(k)return k}}return null}return d(b)}function o(a){switch(typeof a){case"number":case"string":case"undefined":return!0;case"boolean":return!a;case"object":if(Array.isArray(a))return a.every(o);if(null===a||r.isValidElement(a))return!0;a=s.extractIfFragment(a);for(var b in a)if(!o(a[b]))return!1;return!0;default:return!1}}function p(a){var b=typeof a;return Array.isArray(a)?"array":a instanceof RegExp?"object":b}function q(a){var b=p(a);if("object"===b){if(a instanceof Date)return"date";if(a instanceof RegExp)return"regexp"}return b}var r=(this||self,a("57")),s=a("51"),t=a("d3"),u=a("71"),v="<<anonymous>>",w=h(),x=m(),y={array:e("array"),bool:e("boolean"),func:e("function"),number:e("number"),object:e("object"),string:e("string"),any:f(),arrayOf:g,element:w,instanceOf:i,node:x,objectOf:k,oneOf:j,oneOfType:l,shape:n};c.exports=y}),c.registerDynamic("b6",["50","7c","5a"],!0,function(a,b,c){"use strict";function d(){this.listenersToPut=[]}var e=(this||self,a("50")),f=a("7c"),g=a("5a");g(d.prototype,{enqueuePutListener:function(a,b,c){this.listenersToPut.push({rootNodeID:a,propKey:b,propValue:c})},putListeners:function(){for(var a=0;a<this.listenersToPut.length;a++){var b=this.listenersToPut[a];f.putListener(b.rootNodeID,b.propKey,b.propValue)}},reset:function(){this.listenersToPut.length=0},destructor:function(){this.reset()}}),e.addPoolingTo(d),c.exports=d}),c.registerDynamic("da",["50","b4","b6","73","5a","71"],!0,function(a,b,c){"use strict";function d(a){this.reinitializeTransaction(),this.renderToStaticMarkup=a,this.reactMountReady=f.getPooled(null),this.putListenerQueue=g.getPooled()}var e=(this||self,a("50")),f=a("b4"),g=a("b6"),h=a("73"),i=a("5a"),j=a("71"),k={initialize:function(){this.reactMountReady.reset()},close:j},l={initialize:function(){this.putListenerQueue.reset()},close:j},m=[l,k],n={getTransactionWrappers:function(){return m},getReactMountReady:function(){return this.reactMountReady},getPutListenerQueue:function(){return this.putListenerQueue},destructor:function(){f.release(this.reactMountReady),this.reactMountReady=null,g.release(this.putListenerQueue),this.putListenerQueue=null}};i(d.prototype,h.Mixin,n),e.addPoolingTo(d),c.exports=d}),c.registerDynamic("db",["57","91","dc","da","dd","ab","7f","54"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a){l(f.isValidElement(a));var b;try{var c=g.createReactRootID();return b=i.getPooled(!1),b.perform(function(){var d=k(a,null),e=d.mountComponent(c,b,j);return h.addChecksumToMarkup(e)},null)}finally{i.release(b)}}function e(a){l(f.isValidElement(a));var b;try{var c=g.createReactRootID();return b=i.getPooled(!0),b.perform(function(){var d=k(a,null);return d.mountComponent(c,b,j)},null)}finally{i.release(b)}}var f=a("57"),g=a("91"),h=a("dc"),i=a("da"),j=a("dd"),k=a("ab"),l=a("7f");c.exports={renderToString:d,renderToStaticMarkup:e}}(a("54"))}),c.registerDynamic("6f",["7f","54"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a,b){return(a&b)===b}var e=a("7f"),f={MUST_USE_ATTRIBUTE:1,MUST_USE_PROPERTY:2,HAS_SIDE_EFFECTS:4,HAS_BOOLEAN_VALUE:8,HAS_NUMERIC_VALUE:16,HAS_POSITIVE_NUMERIC_VALUE:48,HAS_OVERLOADED_BOOLEAN_VALUE:64,injectDOMPropertyConfig:function(a){var b=a.Properties||{},c=a.DOMAttributeNames||{},g=a.DOMPropertyNames||{},i=a.DOMMutationMethods||{};a.isCustomAttribute&&h._isCustomAttributeFunctions.push(a.isCustomAttribute);for(var j in b){e(!h.isStandardName.hasOwnProperty(j)),h.isStandardName[j]=!0;var k=j.toLowerCase();if(h.getPossibleStandardName[k]=j,c.hasOwnProperty(j)){var l=c[j];h.getPossibleStandardName[l]=j,h.getAttributeName[j]=l}else h.getAttributeName[j]=k;h.getPropertyName[j]=g.hasOwnProperty(j)?g[j]:j,i.hasOwnProperty(j)?h.getMutationMethod[j]=i[j]:h.getMutationMethod[j]=null;var m=b[j];h.mustUseAttribute[j]=d(m,f.MUST_USE_ATTRIBUTE),h.mustUseProperty[j]=d(m,f.MUST_USE_PROPERTY),h.hasSideEffects[j]=d(m,f.HAS_SIDE_EFFECTS),h.hasBooleanValue[j]=d(m,f.HAS_BOOLEAN_VALUE),h.hasNumericValue[j]=d(m,f.HAS_NUMERIC_VALUE),h.hasPositiveNumericValue[j]=d(m,f.HAS_POSITIVE_NUMERIC_VALUE),h.hasOverloadedBooleanValue[j]=d(m,f.HAS_OVERLOADED_BOOLEAN_VALUE),e(!h.mustUseAttribute[j]||!h.mustUseProperty[j]),e(h.mustUseProperty[j]||!h.hasSideEffects[j]),e(!!h.hasBooleanValue[j]+!!h.hasNumericValue[j]+!!h.hasOverloadedBooleanValue[j]<=1)}}},g={},h={ID_ATTRIBUTE_NAME:"data-reactid",isStandardName:{},getPossibleStandardName:{},getAttributeName:{},getPropertyName:{},getMutationMethod:{},mustUseAttribute:{},mustUseProperty:{},hasSideEffects:{},hasBooleanValue:{},hasNumericValue:{},hasPositiveNumericValue:{},hasOverloadedBooleanValue:{},_isCustomAttributeFunctions:[],isCustomAttribute:function(a){for(var b=0;b<h._isCustomAttributeFunctions.length;b++){var c=h._isCustomAttributeFunctions[b];if(c(a))return!0}return!1},getDefaultValueForProperty:function(a,b){var c,d=g[a];return d||(g[a]=d={}),b in d||(c=document.createElement(a),d[b]=c[b]),d[b]},injection:f};c.exports=h}(a("54"))}),c.registerDynamic("de",["7f","54"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(){if(h)for(var a in i){var b=i[a],c=h.indexOf(a);if(g(c>-1),!j.plugins[c]){g(b.extractEvents),j.plugins[c]=b;var d=b.eventTypes;for(var f in d)g(e(d[f],b,f))}}}function e(a,b,c){g(!j.eventNameDispatchConfigs.hasOwnProperty(c)),j.eventNameDispatchConfigs[c]=a;var d=a.phasedRegistrationNames;if(d){for(var e in d)if(d.hasOwnProperty(e)){var h=d[e];f(h,b,c)}return!0}return!!a.registrationName&&(f(a.registrationName,b,c),!0)}function f(a,b,c){g(!j.registrationNameModules[a]),j.registrationNameModules[a]=b,j.registrationNameDependencies[a]=b.eventTypes[c].dependencies}var g=a("7f"),h=null,i={},j={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},injectEventPluginOrder:function(a){g(!h),h=Array.prototype.slice.call(a),d()},injectEventPluginsByName:function(a){var b=!1;for(var c in a)if(a.hasOwnProperty(c)){var e=a[c];i.hasOwnProperty(c)&&i[c]===e||(g(!i[c]),i[c]=e,b=!0)}b&&d()},getPluginModuleForEvent:function(a){var b=a.dispatchConfig;if(b.registrationName)return j.registrationNameModules[b.registrationName]||null;for(var c in b.phasedRegistrationNames)if(b.phasedRegistrationNames.hasOwnProperty(c)){var d=j.registrationNameModules[b.phasedRegistrationNames[c]];if(d)return d}return null},_resetEventPlugins:function(){h=null;for(var a in i)i.hasOwnProperty(a)&&delete i[a];j.plugins.length=0;var b=j.eventNameDispatchConfigs;for(var c in b)b.hasOwnProperty(c)&&delete b[c];var d=j.registrationNameModules;for(var e in d)d.hasOwnProperty(e)&&delete d[e]}};c.exports=j}(a("54"))}),c.registerDynamic("60",["78"],!0,function(a,b,c){"use strict";var d=(this||self,a("78")),e=d({bubbled:null,captured:null}),f=d({topBlur:null,topChange:null,topClick:null,topCompositionEnd:null,topCompositionStart:null,topCompositionUpdate:null,topContextMenu:null,topCopy:null,topCut:null,topDoubleClick:null,topDrag:null,topDragEnd:null,topDragEnter:null,topDragExit:null,topDragLeave:null,topDragOver:null,topDragStart:null,topDrop:null,topError:null,topFocus:null,topInput:null,topKeyDown:null,topKeyPress:null,topKeyUp:null,topLoad:null,topMouseDown:null,topMouseMove:null,topMouseOut:null,topMouseOver:null,topMouseUp:null,topPaste:null,topReset:null,topScroll:null,topSelectionChange:null,topSubmit:null,topTextInput:null,topTouchCancel:null,topTouchEnd:null,topTouchMove:null,topTouchStart:null,topWheel:null}),g={topLevelTypes:f,PropagationPhases:e};c.exports=g}),c.registerDynamic("ca",["60","7f","54"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a){return a===q.topMouseUp||a===q.topTouchEnd||a===q.topTouchCancel}function e(a){return a===q.topMouseMove||a===q.topTouchMove}function f(a){return a===q.topMouseDown||a===q.topTouchStart}function g(a,b){var c=a._dispatchListeners,d=a._dispatchIDs;if(Array.isArray(c))for(var e=0;e<c.length&&!a.isPropagationStopped();e++)b(a,c[e],d[e]);else c&&b(a,c,d)}function h(a,b,c){a.currentTarget=p.Mount.getNode(c);var d=b(a,c);return a.currentTarget=null,d}function i(a,b){g(a,b),a._dispatchListeners=null,a._dispatchIDs=null}function j(a){var b=a._dispatchListeners,c=a._dispatchIDs;if(Array.isArray(b)){for(var d=0;d<b.length&&!a.isPropagationStopped();d++)if(b[d](a,c[d]))return c[d]}else if(b&&b(a,c))return c;return null}function k(a){var b=j(a);return a._dispatchIDs=null,a._dispatchListeners=null,b}function l(a){var b=a._dispatchListeners,c=a._dispatchIDs;o(!Array.isArray(b));var d=b?b(a,c):null;return a._dispatchListeners=null,a._dispatchIDs=null,d}function m(a){return!!a._dispatchListeners}var n=a("60"),o=a("7f"),p={Mount:null,injectMount:function(a){p.Mount=a}},q=n.topLevelTypes,r={isEndish:d,isMoveish:e,isStartish:f,executeDirectDispatch:l,executeDispatch:h,executeDispatchesInOrder:i,executeDispatchesInOrderStopAtTrue:k,hasDispatches:m,injection:p,useTouchEvents:!1};c.exports=r}(a("54"))}),c.registerDynamic("7d",["7f","54"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a,b){if(e(null!=b),null==a)return b;var c=Array.isArray(a),d=Array.isArray(b);return c&&d?(a.push.apply(a,b),a):c?(a.push(b),a):d?[a].concat(b):[a,b]}var e=a("7f");c.exports=d}(a("54"))}),c.registerDynamic("7e",[],!0,function(a,b,c){"use strict";var d=(this||self,function(a,b,c){Array.isArray(a)?a.forEach(b,c):a&&b.call(c,a)});c.exports=d}),c.registerDynamic("65",["de","ca","7d","7e","7f","54"],!0,function(a,b,c){this||self;!function(b){"use strict";var d=a("de"),e=a("ca"),f=a("7d"),g=a("7e"),h=a("7f"),i={},j=null,k=function(a){if(a){var b=e.executeDispatch,c=d.getPluginModuleForEvent(a);c&&c.executeDispatch&&(b=c.executeDispatch),e.executeDispatchesInOrder(a,b),a.isPersistent()||a.constructor.release(a)}},l=null,m={injection:{injectMount:e.injection.injectMount,injectInstanceHandle:function(a){l=a},getInstanceHandle:function(){return l},injectEventPluginOrder:d.injectEventPluginOrder,injectEventPluginsByName:d.injectEventPluginsByName},eventNameDispatchConfigs:d.eventNameDispatchConfigs,registrationNameModules:d.registrationNameModules,putListener:function(a,b,c){h(!c||"function"==typeof c);var d=i[b]||(i[b]={});d[a]=c},getListener:function(a,b){var c=i[b];return c&&c[a]},deleteListener:function(a,b){var c=i[b];c&&delete c[a]},deleteAllListeners:function(a){for(var b in i)delete i[b][a]},extractEvents:function(a,b,c,e){for(var g,h=d.plugins,i=0,j=h.length;i<j;i++){var k=h[i];if(k){var l=k.extractEvents(a,b,c,e);l&&(g=f(g,l))}}return g},enqueueEvents:function(a){a&&(j=f(j,a))},processEventQueue:function(){var a=j;j=null,g(a,k),h(!j)},__purge:function(){i={}},__getListenerBank:function(){return i}};c.exports=m}(a("54"))}),c.registerDynamic("df",["65"],!0,function(a,b,c){"use strict";function d(a){e.enqueueEvents(a),e.processEventQueue()}var e=(this||self,a("65")),f={handleTopLevel:function(a,b,c,f){var g=e.extractEvents(a,b,c,f);d(g)}};c.exports=f}),c.registerDynamic("c7",[],!0,function(a,b,c){"use strict";var d=(this||self,{currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(a){d.currentScrollLeft=a.x,d.currentScrollTop=a.y}});c.exports=d}),c.registerDynamic("67",["62"],!0,function(a,b,c){"use strict";function d(a,b){if(!f.canUseDOM||b&&!("addEventListener"in document))return!1;var c="on"+a,d=c in document;if(!d){var g=document.createElement("div");g.setAttribute(c,"return;"),d="function"==typeof g[c]}return!d&&e&&"wheel"===a&&(d=document.implementation.hasFeature("Events.wheel","3.0")),d}var e,f=(this||self,a("62"));f.canUseDOM&&(e=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),c.exports=d}),c.registerDynamic("7c",["60","65","de","df","c7","5a","67","54"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a){return Object.prototype.hasOwnProperty.call(a,p)||(a[p]=n++,l[a[p]]={}),l[a[p]]}var e=a("60"),f=a("65"),g=a("de"),h=a("df"),i=a("c7"),j=a("5a"),k=a("67"),l={},m=!1,n=0,o={topBlur:"blur",topChange:"change",topClick:"click",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",
|
18
18
|
topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topScroll:"scroll",topSelectionChange:"selectionchange",topTextInput:"textInput",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topWheel:"wheel"},p="_reactListenersID"+String(Math.random()).slice(2),q=j({},h,{ReactEventListener:null,injection:{injectReactEventListener:function(a){a.setHandleTopLevel(q.handleTopLevel),q.ReactEventListener=a}},setEnabled:function(a){q.ReactEventListener&&q.ReactEventListener.setEnabled(a)},isEnabled:function(){return!(!q.ReactEventListener||!q.ReactEventListener.isEnabled())},listenTo:function(a,b){for(var c=b,f=d(c),h=g.registrationNameDependencies[a],i=e.topLevelTypes,j=0,l=h.length;j<l;j++){var m=h[j];f.hasOwnProperty(m)&&f[m]||(m===i.topWheel?k("wheel")?q.ReactEventListener.trapBubbledEvent(i.topWheel,"wheel",c):k("mousewheel")?q.ReactEventListener.trapBubbledEvent(i.topWheel,"mousewheel",c):q.ReactEventListener.trapBubbledEvent(i.topWheel,"DOMMouseScroll",c):m===i.topScroll?k("scroll",!0)?q.ReactEventListener.trapCapturedEvent(i.topScroll,"scroll",c):q.ReactEventListener.trapBubbledEvent(i.topScroll,"scroll",q.ReactEventListener.WINDOW_HANDLE):m===i.topFocus||m===i.topBlur?(k("focus",!0)?(q.ReactEventListener.trapCapturedEvent(i.topFocus,"focus",c),q.ReactEventListener.trapCapturedEvent(i.topBlur,"blur",c)):k("focusin")&&(q.ReactEventListener.trapBubbledEvent(i.topFocus,"focusin",c),q.ReactEventListener.trapBubbledEvent(i.topBlur,"focusout",c)),f[i.topBlur]=!0,f[i.topFocus]=!0):o.hasOwnProperty(m)&&q.ReactEventListener.trapBubbledEvent(m,o[m],c),f[m]=!0)}},trapBubbledEvent:function(a,b,c){return q.ReactEventListener.trapBubbledEvent(a,b,c)},trapCapturedEvent:function(a,b,c){return q.ReactEventListener.trapCapturedEvent(a,b,c)},ensureScrollValueMonitoring:function(){if(!m){var a=i.refreshScrollValues;q.ReactEventListener.monitorScrollValue(a),m=!0}},eventNameDispatchConfigs:f.eventNameDispatchConfigs,registrationNameModules:f.registrationNameModules,putListener:f.putListener,getListener:f.getListener,deleteListener:f.deleteListener,deleteAllListeners:f.deleteAllListeners});c.exports=q}(a("54"))}),c.registerDynamic("b2",[],!0,function(a,b,c){"use strict";var d=(this||self,{injectCreateReactRootIndex:function(a){e.createReactRootIndex=a}}),e={createReactRootIndex:null,injection:d};c.exports=e}),c.registerDynamic("91",["b2","7f","54"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a){return n+a.toString(36)}function e(a,b){return a.charAt(b)===n||b===a.length}function f(a){return""===a||a.charAt(0)===n&&a.charAt(a.length-1)!==n}function g(a,b){return 0===b.indexOf(a)&&e(b,a.length)}function h(a){return a?a.substr(0,a.lastIndexOf(n)):""}function i(a,b){if(m(f(a)&&f(b)),m(g(a,b)),a===b)return a;var c,d=a.length+o;for(c=d;c<b.length&&!e(b,c);c++);return b.substr(0,c)}function j(a,b){var c=Math.min(a.length,b.length);if(0===c)return"";for(var d=0,g=0;g<=c;g++)if(e(a,g)&&e(b,g))d=g;else if(a.charAt(g)!==b.charAt(g))break;var h=a.substr(0,d);return m(f(h)),h}function k(a,b,c,d,e,f){a=a||"",b=b||"",m(a!==b);var j=g(b,a);m(j||g(a,b));for(var k=0,l=j?h:i,n=a;;n=l(n,b)){var o;if(e&&n===a||f&&n===b||(o=c(n,j,d)),o===!1||n===b)break;m(k++<p)}}var l=a("b2"),m=a("7f"),n=".",o=n.length,p=100,q={createReactRootID:function(){return d(l.createReactRootIndex())},createReactID:function(a,b){return a+b},getReactRootIDFromNodeID:function(a){if(a&&a.charAt(0)===n&&a.length>1){var b=a.indexOf(n,1);return b>-1?a.substr(0,b):a}return null},traverseEnterLeave:function(a,b,c,d,e){var f=j(a,b);f!==a&&k(a,f,c,d,!1,!0),f!==b&&k(f,b,c,e,!0,!1)},traverseTwoPhase:function(a,b,c){a&&(k("",a,b,c,!0,!1),k(a,"",b,c,!1,!0))},traverseAncestors:function(a,b,c){k("",a,b,c,!0,!1)},_getFirstCommonAncestorID:j,_getNextDescendantID:i,isAncestorIDOf:g,SEPARATOR:n};c.exports=q}(a("54"))}),c.registerDynamic("e0",[],!0,function(a,b,c){"use strict";function d(a){for(var b=1,c=0,d=0;d<a.length;d++)b=(b+a.charCodeAt(d))%e,c=(c+b)%e;return b|c<<16}var e=(this||self,65521);c.exports=d}),c.registerDynamic("dc",["e0"],!0,function(a,b,c){"use strict";var d=(this||self,a("e0")),e={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(a){var b=d(a);return a.replace(">"," "+e.CHECKSUM_ATTR_NAME+'="'+b+'">')},canReuseMarkup:function(a,b){var c=b.getAttribute(e.CHECKSUM_ATTR_NAME);c=c&&parseInt(c,10);var f=d(a);return f===c}};c.exports=e}),c.registerDynamic("cd",["d1","cf","57","d0","66","5a","7f","53","54"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a){a!==f.currentlyMountingInstance&&j.enqueueUpdate(a)}function e(a,b){l(null==g.current);var c=i.get(a);return c?c===f.currentlyUnmountingInstance?null:c:null}var f=a("d1"),g=a("cf"),h=a("57"),i=a("d0"),j=a("66"),k=a("5a"),l=a("7f"),m=(a("53"),{enqueueCallback:function(a,b){l("function"==typeof b);var c=e(a);return c&&c!==f.currentlyMountingInstance?(c._pendingCallbacks?c._pendingCallbacks.push(b):c._pendingCallbacks=[b],void d(c)):null},enqueueCallbackInternal:function(a,b){l("function"==typeof b),a._pendingCallbacks?a._pendingCallbacks.push(b):a._pendingCallbacks=[b],d(a)},enqueueForceUpdate:function(a){var b=e(a,"forceUpdate");b&&(b._pendingForceUpdate=!0,d(b))},enqueueReplaceState:function(a,b){var c=e(a,"replaceState");c&&(c._pendingStateQueue=[b],c._pendingReplaceState=!0,d(c))},enqueueSetState:function(a,b){var c=e(a,"setState");if(c){var f=c._pendingStateQueue||(c._pendingStateQueue=[]);f.push(b),d(c)}},enqueueSetProps:function(a,b){var c=e(a,"setProps");if(c){l(c._isTopLevel);var f=c._pendingElement||c._currentElement,g=k({},f.props,b);c._pendingElement=h.cloneAndReplaceProps(f,g),d(c)}},enqueueReplaceProps:function(a,b){var c=e(a,"replaceProps");if(c){l(c._isTopLevel);var f=c._pendingElement||c._currentElement;c._pendingElement=h.cloneAndReplaceProps(f,b),d(c)}},enqueueElementInternal:function(a,b){a._pendingElement=b,d(a)}});c.exports=m}(a("54"))}),c.registerDynamic("e1",["e2"],!0,function(a,b,c){function d(a){return e(a)&&3==a.nodeType}var e=(this||self,a("e2"));c.exports=d}),c.registerDynamic("b9",["e1"],!0,function(a,b,c){function d(a,b){return!(!a||!b)&&(a===b||!e(a)&&(e(b)?d(a,b.parentNode):a.contains?a.contains(b):!!a.compareDocumentPosition&&!!(16&a.compareDocumentPosition(b))))}var e=(this||self,a("e1"));c.exports=d}),c.registerDynamic("e3",[],!0,function(a,b,c){"use strict";function d(a){return a?a.nodeType===e?a.documentElement:a.firstChild:null}var e=(this||self,9);c.exports=d}),c.registerDynamic("ae",["7f","54"],!0,function(a,b,c){this||self;!function(b){"use strict";var d=a("7f"),e=!1,f={unmountIDFromEnvironment:null,replaceNodeWithMarkupByID:null,processChildrenUpdates:null,injection:{injectEnvironment:function(a){d(!e),f.unmountIDFromEnvironment=a.unmountIDFromEnvironment,f.replaceNodeWithMarkupByID=a.replaceNodeWithMarkupByID,f.processChildrenUpdates=a.processChildrenUpdates,e=!0}}};c.exports=f}(a("54"))}),c.registerDynamic("d1",["54"],!0,function(a,b,c){this||self;!function(a){"use strict";var b={currentlyMountingInstance:null,currentlyUnmountingInstance:null};c.exports=b}(a("54"))}),c.registerDynamic("b4",["50","5a","7f","54"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(){this._callbacks=null,this._contexts=null}var e=a("50"),f=a("5a"),g=a("7f");f(d.prototype,{enqueue:function(a,b){this._callbacks=this._callbacks||[],this._contexts=this._contexts||[],this._callbacks.push(a),this._contexts.push(b)},notifyAll:function(){var a=this._callbacks,b=this._contexts;if(a){g(a.length===b.length),this._callbacks=null,this._contexts=null;for(var c=0,d=a.length;c<d;c++)a[c].call(b[c]);a.length=0,b.length=0}},reset:function(){this._callbacks=null,this._contexts=null},destructor:function(){this.reset()}}),e.addPoolingTo(d),c.exports=d}(a("54"))}),c.registerDynamic("50",["7f","54"],!0,function(a,b,c){this||self;!function(b){"use strict";var d=a("7f"),e=function(a){var b=this;if(b.instancePool.length){var c=b.instancePool.pop();return b.call(c,a),c}return new b(a)},f=function(a,b){var c=this;if(c.instancePool.length){var d=c.instancePool.pop();return c.call(d,a,b),d}return new c(a,b)},g=function(a,b,c){var d=this;if(d.instancePool.length){var e=d.instancePool.pop();return d.call(e,a,b,c),e}return new d(a,b,c)},h=function(a,b,c,d,e){var f=this;if(f.instancePool.length){var g=f.instancePool.pop();return f.call(g,a,b,c,d,e),g}return new f(a,b,c,d,e)},i=function(a){var b=this;d(a instanceof b),a.destructor&&a.destructor(),b.instancePool.length<b.poolSize&&b.instancePool.push(a)},j=10,k=e,l=function(a,b){var c=a;return c.instancePool=[],c.getPooled=b||k,c.poolSize||(c.poolSize=j),c.release=i,c},m={addPoolingTo:l,oneArgumentPooler:e,twoArgumentPooler:f,threeArgumentPooler:g,fiveArgumentPooler:h};c.exports=m}(a("54"))}),c.registerDynamic("a6",["54"],!0,function(a,b,c){this||self;!function(a){"use strict";function b(a,b,c){return c}var d={enableMeasure:!1,storedMeasure:b,measureMethods:function(a,b,c){},measure:function(a,b,c){return c},injection:{injectMeasure:function(a){d.storedMeasure=a}}};c.exports=d}(a("54"))});c.registerDynamic("e4",["7f","54"],!0,function(a,b,c){this||self;!function(b){"use strict";var d=a("7f"),e={isValidOwner:function(a){return!(!a||"function"!=typeof a.attachRef||"function"!=typeof a.detachRef)},addComponentAsRefTo:function(a,b,c){d(e.isValidOwner(c)),c.attachRef(b,a)},removeComponentAsRefFrom:function(a,b,c){d(e.isValidOwner(c)),c.getPublicInstance().refs[b]===a.getPublicInstance()&&c.detachRef(b)}};c.exports=e}(a("54"))});c.registerDynamic("e5",["e4","54"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a,b,c){"function"==typeof a?a(b.getPublicInstance()):f.addComponentAsRefTo(b,a,c)}function e(a,b,c){"function"==typeof a?a(null):f.removeComponentAsRefFrom(b,a,c)}var f=a("e4"),g={};g.attachRefs=function(a,b){var c=b.ref;null!=c&&d(c,a,b._owner)},g.shouldUpdateRefs=function(a,b){return b._owner!==a._owner||b.ref!==a.ref},g.detachRefs=function(a,b){var c=b.ref;null!=c&&e(c,a,b._owner)},c.exports=g}(a("54"))}),c.registerDynamic("51",["57","53","54"],!0,function(a,b,c){this||self;!function(b){"use strict";var d=(a("57"),a("53"),{create:function(a){return a},extract:function(a){return a},extractIfFragment:function(a){return a}});c.exports=d}(a("54"))}),c.registerDynamic("78",["7f","54"],!0,function(a,b,c){this||self;!function(b){"use strict";var d=a("7f"),e=function(a){var b,c={};d(a instanceof Object&&!Array.isArray(a));for(b in a)a.hasOwnProperty(b)&&(c[b]=b);return c};c.exports=e}(a("54"))}),c.registerDynamic("d2",["78"],!0,function(a,b,c){"use strict";var d=(this||self,a("78")),e=d({prop:null,context:null,childContext:null});c.exports=e}),c.registerDynamic("d3",["54"],!0,function(a,b,c){this||self;!function(a){"use strict";var b={};c.exports=b}(a("54"))}),c.registerDynamic("a7",[],!0,function(a,b,c){"use strict";function d(a){var b=a&&(e&&a[e]||a[f]);if("function"==typeof b)return b}var e=(this||self,"function"==typeof Symbol&&Symbol.iterator),f="@@iterator";c.exports=d}),c.registerDynamic("58",["57","51","d2","d3","cf","b1","a7","7f","53","54"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(){if(s.current){var a=s.current.getName();if(a)return" Check the render method of `"+a+"`."}return""}function e(a){var b=a&&a.getPublicInstance();if(b){var c=b.constructor;if(c)return c.displayName||c.name||void 0}}function f(){var a=s.current;return a&&e(a)||void 0}function g(a,b){a._store.validated||null!=a.key||(a._store.validated=!0,i('Each child in an array or iterator should have a unique "key" prop.',a,b))}function h(a,b,c){y.test(a)&&i("Child objects should have non-numeric keys so ordering is preserved.",b,c)}function i(a,b,c){var d=f(),g="string"==typeof c?c:c.displayName||c.name,h=d||g,i=w[a]||(w[a]={});if(!i.hasOwnProperty(h)){i[h]=!0;var j="";if(b&&b._owner&&b._owner!==s.current){var k=e(b._owner);j=" It was passed a child from "+k+"."}}}function j(a,b){if(Array.isArray(a))for(var c=0;c<a.length;c++){var d=a[c];p.isValidElement(d)&&g(d,b)}else if(p.isValidElement(a))a._store.validated=!0;else if(a){var e=u(a);if(e){if(e!==a.entries)for(var f,i=e.call(a);!(f=i.next()).done;)p.isValidElement(f.value)&&g(f.value,b)}else if("object"==typeof a){var j=q.extractIfFragment(a);for(var k in j)j.hasOwnProperty(k)&&h(k,j[k],b)}}}function k(a,b,c,e){for(var f in b)if(b.hasOwnProperty(f)){var g;try{v("function"==typeof b[f]),g=b[f](c,f,a,e)}catch(a){g=a}if(g instanceof Error&&!(g.message in x)){x[g.message]=!0;d(this)}}}function l(a,b){var c=b.type,d="string"==typeof c?c:c.displayName,e=b._owner?b._owner.getPublicInstance().constructor.displayName:null,f=a+"|"+d+"|"+e;if(!z.hasOwnProperty(f)){z[f]=!0;var g="";d&&(g=" <"+d+" />");var h="";e&&(h=" The element was created by "+e+".")}}function m(a,b){return a!==a?b!==b:0===a&&0===b?1/a===1/b:a===b}function n(a){if(a._store){var b=a._store.originalProps,c=a.props;for(var d in c)c.hasOwnProperty(d)&&(b.hasOwnProperty(d)&&m(b[d],c[d])||(l(d,a),b[d]=c[d]))}}function o(a){if(null!=a.type){var b=t.getComponentClassForElement(a),c=b.displayName||b.name;b.propTypes&&k(c,b.propTypes,a.props,r.prop),"function"==typeof b.getDefaultProps}}var p=a("57"),q=a("51"),r=a("d2"),s=(a("d3"),a("cf")),t=a("b1"),u=a("a7"),v=a("7f"),w=(a("53"),{}),x={},y=/^\d+$/,z={},A={checkAndWarnForMutatedProps:n,createElement:function(a,b,c){var d=p.createElement.apply(this,arguments);if(null==d)return d;for(var e=2;e<arguments.length;e++)j(arguments[e],a);return o(d),d},createFactory:function(a){var b=A.createElement.bind(null,a);return b.type=a,b},cloneElement:function(a,b,c){for(var d=p.cloneElement.apply(this,arguments),e=2;e<arguments.length;e++)j(arguments[e],d.type);return o(d),d}};c.exports=A}(a("54"))}),c.registerDynamic("aa",["e5","58","54"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(){e.attachRefs(this,this._currentElement)}var e=a("e5"),f=(a("58"),{mountComponent:function(a,b,c,e){var f=a.mountComponent(b,c,e);return c.getReactMountReady().enqueue(d,a),f},unmountComponent:function(a){e.detachRefs(a,a._currentElement),a.unmountComponent()},receiveComponent:function(a,b,c,f){var g=a._currentElement;if(b!==g||null==b._owner){var h=e.shouldUpdateRefs(g,b);h&&e.detachRefs(a,g),a.receiveComponent(b,c,f),h&&c.getReactMountReady().enqueue(d,a)}},performUpdateIfNecessary:function(a,b){a.performUpdateIfNecessary(b)}});c.exports=f}(a("54"))}),c.registerDynamic("73",["7f","54"],!0,function(a,b,c){this||self;!function(b){"use strict";var d=a("7f"),e={reinitializeTransaction:function(){this.transactionWrappers=this.getTransactionWrappers(),this.wrapperInitData?this.wrapperInitData.length=0:this.wrapperInitData=[],this._isInTransaction=!1},_isInTransaction:!1,getTransactionWrappers:null,isInTransaction:function(){return!!this._isInTransaction},perform:function(a,b,c,e,f,g,h,i){d(!this.isInTransaction());var j,k;try{this._isInTransaction=!0,j=!0,this.initializeAll(0),k=a.call(b,c,e,f,g,h,i),j=!1}finally{try{if(j)try{this.closeAll(0)}catch(a){}else this.closeAll(0)}finally{this._isInTransaction=!1}}return k},initializeAll:function(a){for(var b=this.transactionWrappers,c=a;c<b.length;c++){var d=b[c];try{this.wrapperInitData[c]=f.OBSERVED_ERROR,this.wrapperInitData[c]=d.initialize?d.initialize.call(this):null}finally{if(this.wrapperInitData[c]===f.OBSERVED_ERROR)try{this.initializeAll(c+1)}catch(a){}}}},closeAll:function(a){d(this.isInTransaction());for(var b=this.transactionWrappers,c=a;c<b.length;c++){var e,g=b[c],h=this.wrapperInitData[c];try{e=!0,h!==f.OBSERVED_ERROR&&g.close&&g.close.call(this,h),e=!1}finally{if(e)try{this.closeAll(c+1)}catch(a){}}}this.wrapperInitData.length=0}},f={Mixin:e,OBSERVED_ERROR:{}};c.exports=f}(a("54"))}),c.registerDynamic("66",["b4","50","cf","a6","aa","73","5a","7f","53","54"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(){q(A.ReactReconcileTransaction&&u)}function e(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=k.getPooled(),this.reconcileTransaction=A.ReactReconcileTransaction.getPooled()}function f(a,b,c,e,f){d(),u.batchedUpdates(a,b,c,e,f)}function g(a,b){return a._mountOrder-b._mountOrder}function h(a){var b=a.dirtyComponentsLength;q(b===r.length),r.sort(g);for(var c=0;c<b;c++){var d=r[c],e=d._pendingCallbacks;if(d._pendingCallbacks=null,n.performUpdateIfNecessary(d,a.reconcileTransaction),e)for(var f=0;f<e.length;f++)a.callbackQueue.enqueue(e[f],d.getPublicInstance())}}function i(a){return d(),u.isBatchingUpdates?void r.push(a):void u.batchedUpdates(i,a)}function j(a,b){q(u.isBatchingUpdates),s.enqueue(a,b),t=!0}var k=a("b4"),l=a("50"),m=(a("cf"),a("a6")),n=a("aa"),o=a("73"),p=a("5a"),q=a("7f"),r=(a("53"),[]),s=k.getPooled(),t=!1,u=null,v={initialize:function(){this.dirtyComponentsLength=r.length},close:function(){this.dirtyComponentsLength!==r.length?(r.splice(0,this.dirtyComponentsLength),y()):r.length=0}},w={initialize:function(){this.callbackQueue.reset()},close:function(){this.callbackQueue.notifyAll()}},x=[v,w];p(e.prototype,o.Mixin,{getTransactionWrappers:function(){return x},destructor:function(){this.dirtyComponentsLength=null,k.release(this.callbackQueue),this.callbackQueue=null,A.ReactReconcileTransaction.release(this.reconcileTransaction),this.reconcileTransaction=null},perform:function(a,b,c){return o.Mixin.perform.call(this,this.reconcileTransaction.perform,this.reconcileTransaction,a,b,c)}}),l.addPoolingTo(e);var y=function(){for(;r.length||t;){if(r.length){var a=e.getPooled();a.perform(h,null,a),e.release(a)}if(t){t=!1;var b=s;s=k.getPooled(),b.notifyAll(),k.release(b)}}};y=m.measure("ReactUpdates","flushBatchedUpdates",y);var z={injectReconcileTransaction:function(a){q(a),A.ReactReconcileTransaction=a},injectBatchingStrategy:function(a){q(a),q("function"==typeof a.batchedUpdates),q("boolean"==typeof a.isBatchingUpdates),u=a}},A={ReactReconcileTransaction:null,batchedUpdates:f,enqueueUpdate:i,flushBatchedUpdates:y,injection:z,asap:j};c.exports=A}(a("54"))}),c.registerDynamic("e6",["ae","e7","cf","57","58","d0","d1","b1","a6","d2","d3","aa","66","5a","dd","7f","ac","53","54"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a){var b=a._currentElement._owner||null;if(b){var c=b.getName();if(c)return" Check the render method of `"+c+"`."}return""}var e=a("ae"),f=a("e7"),g=a("cf"),h=a("57"),i=(a("58"),a("d0")),j=a("d1"),k=a("b1"),l=a("a6"),m=a("d2"),n=(a("d3"),a("aa")),o=a("66"),p=a("5a"),q=a("dd"),r=a("7f"),s=a("ac"),t=(a("53"),1),u={construct:function(a){this._currentElement=a,this._rootNodeID=null,this._instance=null,this._pendingElement=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._renderedComponent=null,this._context=null,this._mountOrder=0,this._isTopLevel=!1,this._pendingCallbacks=null},mountComponent:function(a,b,c){this._context=c,this._mountOrder=t++,this._rootNodeID=a;var d=this._processProps(this._currentElement.props),e=this._processContext(this._currentElement._context),f=k.getComponentClassForElement(this._currentElement),g=new f(d,e);g.props=d,g.context=e,g.refs=q,this._instance=g,i.set(g,this);var h=g.state;void 0===h&&(g.state=h=null),r("object"==typeof h&&!Array.isArray(h)),this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1;var l,m,o=j.currentlyMountingInstance;j.currentlyMountingInstance=this;try{g.componentWillMount&&(g.componentWillMount(),this._pendingStateQueue&&(g.state=this._processPendingState(g.props,g.context))),l=this._getValidatedChildContext(c),m=this._renderValidatedComponent(l)}finally{j.currentlyMountingInstance=o}this._renderedComponent=this._instantiateReactComponent(m,this._currentElement.type);var p=n.mountComponent(this._renderedComponent,a,b,this._mergeChildContext(c,l));return g.componentDidMount&&b.getReactMountReady().enqueue(g.componentDidMount,g),p},unmountComponent:function(){var a=this._instance;if(a.componentWillUnmount){var b=j.currentlyUnmountingInstance;j.currentlyUnmountingInstance=this;try{a.componentWillUnmount()}finally{j.currentlyUnmountingInstance=b}}n.unmountComponent(this._renderedComponent),this._renderedComponent=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._pendingCallbacks=null,this._pendingElement=null,this._context=null,this._rootNodeID=null,i.remove(a)},_setPropsInternal:function(a,b){var c=this._pendingElement||this._currentElement;this._pendingElement=h.cloneAndReplaceProps(c,p({},c.props,a)),o.enqueueUpdate(this,b)},_maskContext:function(a){var b=null;if("string"==typeof this._currentElement.type)return q;var c=this._currentElement.type.contextTypes;if(!c)return q;b={};for(var d in c)b[d]=a[d];return b},_processContext:function(a){var b=this._maskContext(a);return b},_getValidatedChildContext:function(a){var b=this._instance,c=b.getChildContext&&b.getChildContext();if(c){r("object"==typeof b.constructor.childContextTypes);for(var d in c)r(d in b.constructor.childContextTypes);return c}return null},_mergeChildContext:function(a,b){return b?p({},a,b):a},_processProps:function(a){return a},_checkPropTypes:function(a,b,c){var e=this.getName();for(var f in a)if(a.hasOwnProperty(f)){var g;try{r("function"==typeof a[f]),g=a[f](b,f,e,c)}catch(a){g=a}if(g instanceof Error){d(this);c===m.prop}}},receiveComponent:function(a,b,c){var d=this._currentElement,e=this._context;this._pendingElement=null,this.updateComponent(b,d,a,e,c)},performUpdateIfNecessary:function(a){null!=this._pendingElement&&n.receiveComponent(this,this._pendingElement||this._currentElement,a,this._context),(null!==this._pendingStateQueue||this._pendingForceUpdate)&&this.updateComponent(a,this._currentElement,this._currentElement,this._context,this._context)},_warnIfContextsDiffer:function(a,b){a=this._maskContext(a),b=this._maskContext(b);for(var c=Object.keys(b).sort(),d=(this.getName()||"ReactCompositeComponent",0);d<c.length;d++){c[d]}},updateComponent:function(a,b,c,d,e){var f=this._instance,g=f.context,h=f.props;b!==c&&(g=this._processContext(c._context),h=this._processProps(c.props),f.componentWillReceiveProps&&f.componentWillReceiveProps(h,g));var i=this._processPendingState(h,g),j=this._pendingForceUpdate||!f.shouldComponentUpdate||f.shouldComponentUpdate(h,i,g);j?(this._pendingForceUpdate=!1,this._performComponentUpdate(c,h,i,g,a,e)):(this._currentElement=c,this._context=e,f.props=h,f.state=i,f.context=g)},_processPendingState:function(a,b){var c=this._instance,d=this._pendingStateQueue,e=this._pendingReplaceState;if(this._pendingReplaceState=!1,this._pendingStateQueue=null,!d)return c.state;if(e&&1===d.length)return d[0];for(var f=p({},e?d[0]:c.state),g=e?1:0;g<d.length;g++){var h=d[g];p(f,"function"==typeof h?h.call(c,f,a,b):h)}return f},_performComponentUpdate:function(a,b,c,d,e,f){var g=this._instance,h=g.props,i=g.state,j=g.context;g.componentWillUpdate&&g.componentWillUpdate(b,c,d),this._currentElement=a,this._context=f,g.props=b,g.state=c,g.context=d,this._updateRenderedComponent(e,f),g.componentDidUpdate&&e.getReactMountReady().enqueue(g.componentDidUpdate.bind(g,h,i,j),g)},_updateRenderedComponent:function(a,b){var c=this._renderedComponent,d=c._currentElement,e=this._getValidatedChildContext(),f=this._renderValidatedComponent(e);if(s(d,f))n.receiveComponent(c,f,a,this._mergeChildContext(b,e));else{var g=this._rootNodeID,h=c._rootNodeID;n.unmountComponent(c),this._renderedComponent=this._instantiateReactComponent(f,this._currentElement.type);var i=n.mountComponent(this._renderedComponent,g,a,this._mergeChildContext(b,e));this._replaceNodeWithMarkupByID(h,i)}},_replaceNodeWithMarkupByID:function(a,b){e.replaceNodeWithMarkupByID(a,b)},_renderValidatedComponentWithoutOwnerOrContext:function(){var a=this._instance,b=a.render();return b},_renderValidatedComponent:function(a){var b,c=f.current;f.current=this._mergeChildContext(this._currentElement._context,a),g.current=this;try{b=this._renderValidatedComponentWithoutOwnerOrContext()}finally{f.current=c,g.current=null}return r(null===b||b===!1||h.isValidElement(b)),b},attachRef:function(a,b){var c=this.getPublicInstance(),d=c.refs===q?c.refs={}:c.refs;d[a]=b.getPublicInstance()},detachRef:function(a){var b=this.getPublicInstance().refs;delete b[a]},getName:function(){var a=this._currentElement.type,b=this._instance&&this._instance.constructor;return a.displayName||b&&b.displayName||a.name||b&&b.name||null},getPublicInstance:function(){return this._instance},_instantiateReactComponent:null};l.measureMethods(u,"ReactCompositeComponent",{mountComponent:"mountComponent",updateComponent:"updateComponent",_renderValidatedComponent:"_renderValidatedComponent"});var v={Mixin:u};c.exports=v}(a("54"))}),c.registerDynamic("d0",[],!0,function(a,b,c){"use strict";var d=(this||self,{remove:function(a){a._reactInternalInstance=void 0},get:function(a){return a._reactInternalInstance},has:function(a){return void 0!==a._reactInternalInstance},set:function(a,b){a._reactInternalInstance=b}});c.exports=d}),c.registerDynamic("b0",["57","d0","7f","54"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a){k[a]=!0}function e(a){delete k[a]}function f(a){return!!k[a]}var g,h=a("57"),i=a("d0"),j=a("7f"),k={},l={injectEmptyComponent:function(a){g=h.createFactory(a)}},m=function(){};m.prototype.componentDidMount=function(){var a=i.get(this);a&&d(a._rootNodeID)},m.prototype.componentWillUnmount=function(){var a=i.get(this);a&&e(a._rootNodeID)},m.prototype.render=function(){return j(g),g()};var n=h.createElement(m),o={emptyElement:n,injection:l,isNullComponentID:f};c.exports=o}(a("54"))}),c.registerDynamic("b1",["5a","7f","54"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a){if("function"==typeof a.type)return a.type;var b=a.type,c=l[b];return null==c&&(l[b]=c=j(b)),c}function e(a){return i(k),new k(a.type,a.props)}function f(a){return new m(a)}function g(a){return a instanceof m}var h=a("5a"),i=a("7f"),j=null,k=null,l={},m=null,n={injectGenericComponentClass:function(a){k=a},injectTextComponentClass:function(a){m=a},injectComponentClasses:function(a){h(l,a)},injectAutoWrapper:function(a){j=a}},o={getComponentClassForElement:d,createInternalComponent:e,createInstanceForText:f,isTextComponent:g,injection:n};c.exports=o}(a("54"))}),c.registerDynamic("ab",["e6","b0","b1","5a","7f","53","54"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a){return"function"==typeof a&&"undefined"!=typeof a.prototype&&"function"==typeof a.prototype.mountComponent&&"function"==typeof a.prototype.receiveComponent}function e(a,b){var c;if(null!==a&&a!==!1||(a=g.emptyElement),"object"==typeof a){var e=a;c=b===e.type&&"string"==typeof e.type?h.createInternalComponent(e):d(e.type)?new e.type(e):new k}else"string"==typeof a||"number"==typeof a?c=h.createInstanceForText(a):j(!1);return c.construct(a),c._mountIndex=0,c._mountImage=null,c}var f=a("e6"),g=a("b0"),h=a("b1"),i=a("5a"),j=a("7f"),k=(a("53"),function(){});i(k.prototype,f.Mixin,{_instantiateReactComponent:e}),c.exports=e}(a("54"))}),c.registerDynamic("a1",["62","54"],!0,function(a,b,c){this||self;!function(b){"use strict";var d=a("62"),e=/^[ \r\n\t\f]/,f=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,g=function(a,b){a.innerHTML=b};if("undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction&&(g=function(a,b){MSApp.execUnsafeLocalFunction(function(){a.innerHTML=b})}),d.canUseDOM){var h=document.createElement("div");h.innerHTML=" ",""===h.innerHTML&&(g=function(a,b){if(a.parentNode&&a.parentNode.replaceChild(a,a),e.test(b)||"<"===b[0]&&f.test(b)){a.innerHTML="\ufeff"+b;var c=a.firstChild;1===c.data.length?a.removeChild(c):c.deleteData(0,1)}else a.innerHTML=b})}c.exports=g}(a("54"))}),c.registerDynamic("ac",["53","54"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a,b){if(null!=a&&null!=b){var c=typeof a,d=typeof b;if("string"===c||"number"===c)return"string"===d||"number"===d;if("object"===d&&a.type===b.type&&a.key===b.key){var e=a._owner===b._owner;return e}}return!1}a("53");c.exports=d}(a("54"))}),c.registerDynamic("6d",["6f","7c","cf","57","58","b0","91","d0","dc","a6","aa","cd","66","dd","b9","e3","ab","7f","a1","ac","53","54"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a,b){for(var c=Math.min(a.length,b.length),d=0;d<c;d++)if(a.charAt(d)!==b.charAt(d))return d;return a.length===b.length?-1:c}function e(a){var b=D(a);return b&&R.getID(b)}function f(a){var b=g(a);if(b)if(K.hasOwnProperty(b)){var c=K[b];c!==a&&(F(!k(c,b)),K[b]=a)}else K[b]=a;return b}function g(a){return a&&a.getAttribute&&a.getAttribute(J)||""}function h(a,b){var c=g(a);c!==b&&delete K[c],a.setAttribute(J,b),K[b]=a}function i(a){return K.hasOwnProperty(a)&&k(K[a],a)||(K[a]=R.findReactNodeByID(a)),K[a]}function j(a){var b=v.get(a)._rootNodeID;return t.isNullComponentID(b)?null:(K.hasOwnProperty(b)&&k(K[b],b)||(K[b]=R.findReactNodeByID(b)),K[b])}function k(a,b){if(a){F(g(a)===b);var c=R.findReactContainerForID(b);if(c&&C(c,a))return!0}return!1}function l(a){delete K[a]}function m(a){var b=K[a];return!(!b||!k(b,a))&&void(Q=b)}function n(a){Q=null,u.traverseAncestors(a,m);var b=Q;return Q=null,b}function o(a,b,c,d,e){var f=y.mountComponent(a,b,d,B);a._isTopLevel=!0,R._mountImageIntoNode(f,c,e)}function p(a,b,c,d){var e=A.ReactReconcileTransaction.getPooled();e.perform(o,null,a,b,c,e,d),A.ReactReconcileTransaction.release(e)}var q=a("6f"),r=a("7c"),s=(a("cf"),a("57")),t=(a("58"),a("b0")),u=a("91"),v=a("d0"),w=a("dc"),x=a("a6"),y=a("aa"),z=a("cd"),A=a("66"),B=a("dd"),C=a("b9"),D=a("e3"),E=a("ab"),F=a("7f"),G=a("a1"),H=a("ac"),I=(a("53"),u.SEPARATOR),J=q.ID_ATTRIBUTE_NAME,K={},L=1,M=9,N={},O={},P=[],Q=null,R={_instancesByReactRootID:N,scrollMonitor:function(a,b){b()},_updateRootComponent:function(a,b,c,d){return R.scrollMonitor(c,function(){z.enqueueElementInternal(a,b),d&&z.enqueueCallbackInternal(a,d)}),a},_registerComponent:function(a,b){F(b&&(b.nodeType===L||b.nodeType===M)),r.ensureScrollValueMonitoring();var c=R.registerContainer(b);return N[c]=a,c},_renderNewRootComponent:function(a,b,c){var d=E(a,null),e=R._registerComponent(d,b);return A.batchedUpdates(p,d,e,b,c),d},render:function(a,b,c){F(s.isValidElement(a));var d=N[e(b)];if(d){var f=d._currentElement;if(H(f,a))return R._updateRootComponent(d,a,b,c).getPublicInstance();R.unmountComponentAtNode(b)}var g=D(b),h=g&&R.isRenderedByReact(g),i=h&&!d,j=R._renderNewRootComponent(a,b,i).getPublicInstance();return c&&c.call(j),j},constructAndRenderComponent:function(a,b,c){var d=s.createElement(a,b);return R.render(d,c)},constructAndRenderComponentByID:function(a,b,c){var d=document.getElementById(c);return F(d),R.constructAndRenderComponent(a,b,d)},registerContainer:function(a){var b=e(a);return b&&(b=u.getReactRootIDFromNodeID(b)),b||(b=u.createReactRootID()),O[b]=a,b},unmountComponentAtNode:function(a){F(a&&(a.nodeType===L||a.nodeType===M));var b=e(a),c=N[b];return!!c&&(R.unmountComponentFromNode(c,a),delete N[b],delete O[b],!0)},unmountComponentFromNode:function(a,b){for(y.unmountComponent(a),b.nodeType===M&&(b=b.documentElement);b.lastChild;)b.removeChild(b.lastChild)},findReactContainerForID:function(a){var b=u.getReactRootIDFromNodeID(a),c=O[b];return c},findReactNodeByID:function(a){var b=R.findReactContainerForID(a);return R.findComponentRoot(b,a)},isRenderedByReact:function(a){if(1!==a.nodeType)return!1;var b=R.getID(a);return!!b&&b.charAt(0)===I},getFirstReactDOM:function(a){for(var b=a;b&&b.parentNode!==b;){if(R.isRenderedByReact(b))return b;b=b.parentNode}return null},findComponentRoot:function(a,b){var c=P,d=0,e=n(b)||a;for(c[0]=e.firstChild,
|
19
|
-
c.length=1;d<c.length;){for(var f,g=c[d++];g;){var h=R.getID(g);h?b===h?f=g:u.isAncestorIDOf(h,b)&&(c.length=d=0,c.push(g.firstChild)):c.push(g.firstChild),g=g.nextSibling}if(f)return c.length=0,f}c.length=0,F(!1)},_mountImageIntoNode:function(a,b,c){if(F(b&&(b.nodeType===L||b.nodeType===M)),c){var e=D(b);if(w.canReuseMarkup(a,e))return;var f=e.getAttribute(w.CHECKSUM_ATTR_NAME);e.removeAttribute(w.CHECKSUM_ATTR_NAME);var g=e.outerHTML;e.setAttribute(w.CHECKSUM_ATTR_NAME,f);var h=d(a,g);" (client) "+a.substring(h-20,h+20)+"\n (server) "+g.substring(h-20,h+20);F(b.nodeType!==M)}F(b.nodeType!==M),G(b,a)},getReactRootID:e,getID:f,setID:h,getNode:i,getNodeFromInstance:j,purgeID:l};x.measureMethods(R,"ReactMount",{_renderNewRootComponent:"_renderNewRootComponent",_mountImageIntoNode:"_mountImageIntoNode"}),c.exports=R}(a("54"))}),c.registerDynamic("e2",[],!0,function(a,b,c){function d(a){return!(!a||!("function"==typeof Node?a instanceof Node:"object"==typeof a&&"number"==typeof a.nodeType&&"string"==typeof a.nodeName))}this||self;c.exports=d}),c.registerDynamic("88",["cf","d0","6d","7f","e2","53","54"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a){return null==a?null:h(a)?a:e.has(a)?f.getNodeFromInstance(a):(g(null==a.render||"function"!=typeof a.render),void g(!1))}var e=(a("cf"),a("d0")),f=a("6d"),g=a("7f"),h=a("e2");a("53");c.exports=d}(a("54"))}),c.registerDynamic("dd",["54"],!0,function(a,b,c){this||self;!function(a){"use strict";var b={};c.exports=b}(a("54"))}),c.registerDynamic("e7",["5a","dd","53","54"],!0,function(a,b,c){this||self;!function(b){"use strict";var d=a("5a"),e=a("dd"),f=(a("53"),{current:e,withContext:function(a,b){var c,e=f.current;f.current=d({},e,a);try{c=b()}finally{f.current=e}return c}});c.exports=f}(a("54"))}),c.registerDynamic("cf",[],!0,function(a,b,c){"use strict";var d=(this||self,{current:null});c.exports=d}),c.registerDynamic("5a",[],!0,function(a,b,c){"use strict";function d(a,b){if(null==a)throw new TypeError("Object.assign target cannot be null or undefined");for(var c=Object(a),d=Object.prototype.hasOwnProperty,e=1;e<arguments.length;e++){var f=arguments[e];if(null!=f){var g=Object(f);for(var h in g)d.call(g,h)&&(c[h]=g[h])}}return c}this||self;c.exports=d}),c.registerDynamic("71",[],!0,function(a,b,c){function d(a){return function(){return a}}function e(){}this||self;e.thatReturns=d,e.thatReturnsFalse=d(!1),e.thatReturnsTrue=d(!0),e.thatReturnsNull=d(null),e.thatReturnsThis=function(){return this},e.thatReturnsArgument=function(a){return a},c.exports=e}),c.registerDynamic("53",["71","54"],!0,function(a,b,c){this||self;!function(b){"use strict";var d=a("71"),e=d;c.exports=e}(a("54"))}),c.registerDynamic("57",["e7","cf","5a","53","54"],!0,function(a,b,c){this||self;!function(b){"use strict";var d=a("e7"),e=a("cf"),f=a("5a"),g=(a("53"),{key:!0,ref:!0}),h=function(a,b,c,d,e,f){this.type=a,this.key=b,this.ref=c,this._owner=d,this._context=e,this.props=f};h.prototype={_isReactElement:!0},h.createElement=function(a,b,c){var f,i={},j=null,k=null;if(null!=b){k=void 0===b.ref?null:b.ref,j=void 0===b.key?null:""+b.key;for(f in b)b.hasOwnProperty(f)&&!g.hasOwnProperty(f)&&(i[f]=b[f])}var l=arguments.length-2;if(1===l)i.children=c;else if(l>1){for(var m=Array(l),n=0;n<l;n++)m[n]=arguments[n+2];i.children=m}if(a&&a.defaultProps){var o=a.defaultProps;for(f in o)"undefined"==typeof i[f]&&(i[f]=o[f])}return new h(a,j,k,e.current,d.current,i)},h.createFactory=function(a){var b=h.createElement.bind(null,a);return b.type=a,b},h.cloneAndReplaceProps=function(a,b){var c=new h(a.type,a.key,a.ref,a._owner,a._context,b);return c},h.cloneElement=function(a,b,c){var d,i=f({},a.props),j=a.key,k=a.ref,l=a._owner;if(null!=b){void 0!==b.ref&&(k=b.ref,l=e.current),void 0!==b.key&&(j=""+b.key);for(d in b)b.hasOwnProperty(d)&&!g.hasOwnProperty(d)&&(i[d]=b[d])}var m=arguments.length-2;if(1===m)i.children=c;else if(m>1){for(var n=Array(m),o=0;o<m;o++)n[o]=arguments[o+2];i.children=n}return new h(a.type,j,k,l,a._context,i)},h.isValidElement=function(a){var b=!(!a||!a._isReactElement);return b},c.exports=h}(a("54"))}),c.registerDynamic("7f",["54"],!0,function(a,b,c){this||self;!function(a){"use strict";var b=function(a,b,c,d,e,f,g,h){if(!a){var i;if(void 0===b)i=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var j=[c,d,e,f,g,h],k=0;i=new Error("Invariant Violation: "+b.replace(/%s/g,function(){return j[k++]}))}throw i.framesToPop=1,i}};c.exports=b}(a("54"))}),c.registerDynamic("e8",["57","7f","54"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a){return f(e.isValidElement(a)),a}var e=a("57"),f=a("7f");c.exports=d}(a("54"))}),c.registerDynamic("62",[],!0,function(a,b,c){"use strict";var d=(this||self,!("undefined"==typeof window||!window.document||!window.document.createElement)),e={canUseDOM:d,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:d&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:d&&!!window.screen,isInWorker:!d};c.exports=e}),c.registerDynamic("e9",[],!0,function(a,b,c){function d(){if(!h){h=!0;for(var a,b=g.length;b;){a=g,g=[];for(var c=-1;++c<b;)a[c]();b=g.length}h=!1}}function e(){}var f=(this||self,c.exports={}),g=[],h=!1;f.nextTick=function(a){g.push(a),h||setTimeout(d,0)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=e,f.addListener=e,f.once=e,f.off=e,f.removeListener=e,f.removeAllListeners=e,f.emit=e,f.binding=function(a){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(a){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}}),c.registerDynamic("ea",["e9"],!0,function(a,b,c){this||self;c.exports=a("e9")}),c.registerDynamic("eb",["ea"],!0,function(a,b,d){this||self;d.exports=c._nodeRequire?process:a("ea")}),c.registerDynamic("54",["eb"],!0,function(a,b,c){this||self;c.exports=a("eb")}),c.registerDynamic("ec",["ca","4f","cc","77","e7","cf","57","58","56","8a","d9","91","6d","a6","87","aa","db","5a","88","e8","62","54"],!0,function(a,b,c){this||self;!function(b){"use strict";var d=a("ca"),e=a("4f"),f=a("cc"),g=a("77"),h=a("e7"),i=a("cf"),j=a("57"),k=(a("58"),a("56")),l=a("8a"),m=a("d9"),n=a("91"),o=a("6d"),p=a("a6"),q=a("87"),r=a("aa"),s=a("db"),t=a("5a"),u=a("88"),v=a("e8");m.inject();var w=j.createElement,x=j.createFactory,y=j.cloneElement,z=p.measure("React","render",o.render),A={Children:{map:e.map,forEach:e.forEach,count:e.count,only:v},Component:f,DOM:k,PropTypes:q,initializeTouchEvents:function(a){d.useTouchEvents=a},createClass:g.createClass,createElement:w,cloneElement:y,createFactory:x,createMixin:function(a){return a},constructAndRenderComponent:o.constructAndRenderComponent,constructAndRenderComponentByID:o.constructAndRenderComponentByID,findDOMNode:u,render:z,renderToString:s.renderToString,renderToStaticMarkup:s.renderToStaticMarkup,unmountComponentAtNode:o.unmountComponentAtNode,isValidElement:j.isValidElement,withContext:h.withContext,__spread:t};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({CurrentOwner:i,InstanceHandles:n,Mount:o,Reconciler:r,TextComponent:l});A.version="0.13.3",c.exports=A}(a("54"))}),c.registerDynamic("ed",["ec"],!0,function(a,b,c){this||self;c.exports=a("ec")}),c.registerDynamic("1a",["ed"],!0,function(a,b,c){this||self;c.exports=a("ed")}),c.register("ee",["22","23","2a","2b","1a"],function(a){var b,c,d,e,f,g;return{setters:[function(a){b=a.default},function(a){c=a.default},function(a){d=a.default},function(a){e=a.default},function(a){f=a.default}],execute:function(){g=function(a){function g(a){c(this,g),d(Object.getPrototypeOf(g.prototype),"constructor",this).call(this,a),this.state={errorData:{}}}return e(g,a),b(g,[{key:"render",value:function(){return f.createElement("div",{id:"error",ref:"modal",className:"modal fade","data-keyboard":"false","data-backdrop":"static"},f.createElement("div",{className:"modal-dialog modal-lg"},f.createElement("div",{className:"modal-content"},f.createElement("div",{className:"modal-header"},f.createElement("h3",null,this.state.errorData.title)),f.createElement("div",{className:"modal-body"},f.createElement("p",{dangerouslySetInnerHTML:{__html:this.state.errorData.message}}),this.state.errorData.more_info&&f.createElement("pre",{className:"pre-scrollable"},this.state.errorData.more_info)))))}},{key:"modal",value:function(){return $(f.findDOMNode(this.refs.modal))}},{key:"show",value:function(a,b){var c=this;this.setState({errorData:a}),setTimeout(function(){c.modal().modal("show")},b||0)}}]),g}(f.Component),a("default",g)}}}),c.register("1",["15","16","17","26","c","1a","1d","2e","2f","3e","ee"],function(a){var b,c,d,e,f,g,h,i,j,k,l,m;return{setters:[function(a){},function(a){b=a.default},function(a){c=a.default},function(a){d=a.default},function(a){e=a.default},function(a){f=a.default},function(a){g=a.default},function(a){h=a.default},function(a){i=a.default},function(a){j=a.default},function(a){k=a.default}],execute:function(){l=f.createClass({displayName:"Page",render:function(){var a=this;return f.createElement("div",null,f.createElement("div",{className:"container"},f.createElement(m,{showSequenceModal:function(b){return a.showSequenceModal(b)},getCharacterWidth:function(){return a.getCharacterWidth()},showErrorModal:function(){for(var b=arguments.length,c=Array(b),d=0;d<b;d++)c[d]=arguments[d];return a.showErrorModal.apply(a,c)}})),f.createElement("pre",{className:"pre-reset hsp-lines",ref:"hspChars",hidden:!0},"ABCDEFGHIJKLMNOPQRSTUVWXYZ +-"),f.createElement("canvas",{id:"png-exporter",hidden:!0}),f.createElement(j,{ref:"sequenceModal",showErrorModal:function(){for(var b=arguments.length,c=Array(b),d=0;d<b;d++)c[d]=arguments[d];return a.showErrorModal.apply(a,c)}}),f.createElement(k,{ref:"errorModal"}))},componentDidMount:function(){var a=location.pathname.split("/").pop();sessionStorage.setItem("job_id",a)},showSequenceModal:function(a){this.refs.sequenceModal.show(a)},showErrorModal:function(a,b){this.refs.errorModal.show(a,b)},getCharacterWidth:function(){if(!this.characterWidth){var a=$(f.findDOMNode(this.refs.hspChars));this.characterWidth=a.width()/29}return this.characterWidth}}),m=f.createClass({displayName:"Report",getInitialState:function(){return this.fetchResults(),this.numUpdates=0,this.nextQuery=0,this.nextHit=0,this.nextHSP=0,this.maxHSPs=3,{search_id:"",seqserv_version:"",program:"",program_version:"",submitted_at:"",queries:[],results:[],querydb:[],params:[],stats:[]}},fetchResults:function(){function a(){$.getJSON(location.pathname+".json").complete(function(d){switch(d.status){case 202:var e;e=1===b.length?b[0]:b.shift(),setTimeout(a,e);break;case 200:c.setStateFromJSON(d.responseJSON);break;case 404:case 400:case 500:c.props.showErrorModal(d.responseJSON)}})}var b=[200,400,800,1200,2e3,3e3,5e3],c=this;a()},setStateFromJSON:function(a){this.lastTimeStamp=Date.now(),this.setState(a)},render:function(){return this.isResultAvailable()?this.resultsJSX():this.loadingJSX()},componentDidMount:function(){this.preventCollapseOnSelection(),this.toggleTable()},componentDidUpdate:function(){var a=this;console.log((Date.now()-this.lastTimeStamp)/1e3),0==this.nextQuery&&0==this.nextHit&&0==this.nextHSP&&this.affixSidebar(),this.nextQuery<this.state.queries.length?setTimeout(function(){return a.updateState()},25):this.componentFinishedUpdating()},updateState:function(){for(var a=[],b=0;this.nextQuery<this.state.queries.length;){var c=this.state.queries[this.nextQuery];for(0==this.nextHit&&0==this.nextHSP&&a.push(f.createElement(d,{key:"Query_"+c.number,query:c,program:this.state.program,querydb:this.state.querydb,showQueryCrumbs:this.state.queries.length>1,imported_xml:this.state.imported_xml,veryBig:this.state.veryBig}));this.nextHit<c.hits.length;){var g=c.hits[this.nextHit];for(0==this.nextHSP&&a.push(f.createElement(h,e({key:"Query_"+c.number+"_Hit_"+g.number,query:c,hit:g,algorithm:this.state.program,querydb:this.state.querydb,selectHit:this.selectHit,imported_xml:this.state.imported_xml,showQueryCrumbs:this.state.queries.length>1,showHitCrumbs:c.hits.length>1,veryBig:this.state.veryBig},this.props)));this.nextHSP<g.hsps.length;){var j=g.hsps[this.nextHSP++];if(a.push(f.createElement(i,e({key:"Query_"+c.number+"_Hit_"+g.number+"_HSP_"+j.number,query:c,hit:g,hsp:j,algorithm:this.state.program,showHSPNumbers:g.hsps.length>1},this.props))),b++,b==this.maxHSPs)break}if(this.nextHSP==g.hsps.length&&(this.nextHit=this.nextHit+1,this.nextHSP=0),b==this.maxHSPs)break}if(this.nextHit==c.hits.length&&(this.nextQuery=this.nextQuery+1,this.nextHit=0),b==this.maxHSPs)break}this.numUpdates++,this.lastTimeStamp=Date.now(),this.setState({results:this.state.results.concat(a),veryBig:this.numUpdates>=250})},componentFinishedUpdating:function(){this.shouldShowIndex()&&this.setupScrollSpy()},loadingJSX:function(){return f.createElement("div",{className:"row"},f.createElement("div",{className:"col-md-6 col-md-offset-3 text-center"},f.createElement("h1",null,f.createElement("i",{className:"fa fa-cog fa-spin"})," BLAST-ing"),f.createElement("p",null,f.createElement("br",null),"This can take some time depending on the size of your query and database(s). The page will update automatically when BLAST is done.",f.createElement("br",null),f.createElement("br",null),"You can bookmark the page and come back to it later or share the link with someone.")))},resultsJSX:function(){return f.createElement("div",{className:"row"},this.shouldShowSidebar()&&f.createElement("div",{className:"col-md-3 hidden-sm hidden-xs"},f.createElement(b,{data:this.state,shouldShowIndex:this.shouldShowIndex()})),f.createElement("div",{className:this.shouldShowSidebar()?"col-md-9":"col-md-12"},this.overviewJSX(),this.circosJSX(),this.state.results))},overviewJSX:function(){return f.createElement("div",{className:"overview"},f.createElement("p",null,f.createElement("strong",null,"SequenceServer ",this.state.seqserv_version)," using ",f.createElement("strong",null,this.state.program_version),this.state.submitted_at&&", query submitted on "+this.state.submitted_at),f.createElement("p",null,f.createElement("strong",null," Databases: "),this.state.querydb.map(function(a){return a.title}).join(", ")," (",this.state.stats.nsequences," sequences, ",this.state.stats.ncharacters," characters)"),f.createElement("p",null,f.createElement("strong",null,"Parameters: ")," ",c.map(this.state.params,function(a,b){return b+" "+a}).join(", ")),f.createElement("p",null,"Please cite: ",f.createElement("a",{href:"https://doi.org/10.1093/molbev/msz185"},"https://doi.org/10.1093/molbev/msz185")))},circosJSX:function(){return this.atLeastTwoHits()?f.createElement(g,{queries:this.state.queries,program:this.state.program,collapsed:"true"}):f.createElement("span",null)},isResultAvailable:function(){return this.state.queries.length>=1},atLeastOneHit:function(){return this.state.queries.some(function(a){return a.hits.length>0})},atLeastTwoHits:function(){var a=0;return this.state.queries.some(function(b){return a+=b.hits.length,a>1})},shouldShowSidebar:function(){return!(1==this.state.queries.length&&0==this.state.queries[0].hits.length)},shouldShowIndex:function(){var a=this.state.queries.length;return a>=2&&a<=12},preventCollapseOnSelection:function(){$("body").on("mousedown",".hit > .section-header > h4",function(a){var b=$(this);b.on("mouseup mousemove",function a(c){if("mouseup"===c.type){var d=b.parents(".hit").attr("id");$("div[data-parent-hit="+d+"]").toggle(),b.find("i").toggleClass("fa-minus-square-o fa-plus-square-o")}else b.attr("data-toggle","");b.off("mouseup mousemove",a)})})},toggleTable:function(){$("body").on("mousedown",".resultn > .section-content > .table-hit-overview > .caption",function(a){var b=$(this);b.on("mouseup mousemove",function a(c){b.find("i").toggleClass("fa-minus-square-o fa-plus-square-o"),b.off("mouseup mousemove",a)})})},affixSidebar:function(){var a=$(".sidebar"),b=a.offset();b&&a.affix({offset:{top:b.top}})},setupScrollSpy:function(){$("body").scrollspy({target:".sidebar"})},selectHit:function(a){var b=$("#"+a),c=$(".hit-links :checkbox:checked").length;if(b&&b.val()){var d=$(b.data("target"));if(b.is(":checked")?(d.addClass("glow"),d.next(".hsp").addClass("glow"),$(".download-fasta-of-selected").enable(),$(".download-alignment-of-selected").enable()):(d.removeClass("glow"),d.next(".hsp").removeClass("glow")),c>=1){var e=$(".download-fasta-of-selected"),f=$(".download-alignment-of-selected");e.find(".text-bold").html(c),f.find(".text-bold").html(c)}if(0==c){var e=$(".download-fasta-of-selected"),f=$(".download-alignment-of-selected");e.addClass("disabled").find(".text-bold").html(""),f.addClass("disabled").find(".text-bold").html("")}}}}),f.render(f.createElement(l,null),document.getElementById("view"))}}})})(function(a){a()});
|
19
|
+
c.length=1;d<c.length;){for(var f,g=c[d++];g;){var h=R.getID(g);h?b===h?f=g:u.isAncestorIDOf(h,b)&&(c.length=d=0,c.push(g.firstChild)):c.push(g.firstChild),g=g.nextSibling}if(f)return c.length=0,f}c.length=0,F(!1)},_mountImageIntoNode:function(a,b,c){if(F(b&&(b.nodeType===L||b.nodeType===M)),c){var e=D(b);if(w.canReuseMarkup(a,e))return;var f=e.getAttribute(w.CHECKSUM_ATTR_NAME);e.removeAttribute(w.CHECKSUM_ATTR_NAME);var g=e.outerHTML;e.setAttribute(w.CHECKSUM_ATTR_NAME,f);var h=d(a,g);" (client) "+a.substring(h-20,h+20)+"\n (server) "+g.substring(h-20,h+20);F(b.nodeType!==M)}F(b.nodeType!==M),G(b,a)},getReactRootID:e,getID:f,setID:h,getNode:i,getNodeFromInstance:j,purgeID:l};x.measureMethods(R,"ReactMount",{_renderNewRootComponent:"_renderNewRootComponent",_mountImageIntoNode:"_mountImageIntoNode"}),c.exports=R}(a("54"))}),c.registerDynamic("e2",[],!0,function(a,b,c){function d(a){return!(!a||!("function"==typeof Node?a instanceof Node:"object"==typeof a&&"number"==typeof a.nodeType&&"string"==typeof a.nodeName))}this||self;c.exports=d}),c.registerDynamic("88",["cf","d0","6d","7f","e2","53","54"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a){return null==a?null:h(a)?a:e.has(a)?f.getNodeFromInstance(a):(g(null==a.render||"function"!=typeof a.render),void g(!1))}var e=(a("cf"),a("d0")),f=a("6d"),g=a("7f"),h=a("e2");a("53");c.exports=d}(a("54"))}),c.registerDynamic("dd",["54"],!0,function(a,b,c){this||self;!function(a){"use strict";var b={};c.exports=b}(a("54"))}),c.registerDynamic("e7",["5a","dd","53","54"],!0,function(a,b,c){this||self;!function(b){"use strict";var d=a("5a"),e=a("dd"),f=(a("53"),{current:e,withContext:function(a,b){var c,e=f.current;f.current=d({},e,a);try{c=b()}finally{f.current=e}return c}});c.exports=f}(a("54"))}),c.registerDynamic("cf",[],!0,function(a,b,c){"use strict";var d=(this||self,{current:null});c.exports=d}),c.registerDynamic("5a",[],!0,function(a,b,c){"use strict";function d(a,b){if(null==a)throw new TypeError("Object.assign target cannot be null or undefined");for(var c=Object(a),d=Object.prototype.hasOwnProperty,e=1;e<arguments.length;e++){var f=arguments[e];if(null!=f){var g=Object(f);for(var h in g)d.call(g,h)&&(c[h]=g[h])}}return c}this||self;c.exports=d}),c.registerDynamic("71",[],!0,function(a,b,c){function d(a){return function(){return a}}function e(){}this||self;e.thatReturns=d,e.thatReturnsFalse=d(!1),e.thatReturnsTrue=d(!0),e.thatReturnsNull=d(null),e.thatReturnsThis=function(){return this},e.thatReturnsArgument=function(a){return a},c.exports=e}),c.registerDynamic("53",["71","54"],!0,function(a,b,c){this||self;!function(b){"use strict";var d=a("71"),e=d;c.exports=e}(a("54"))}),c.registerDynamic("57",["e7","cf","5a","53","54"],!0,function(a,b,c){this||self;!function(b){"use strict";var d=a("e7"),e=a("cf"),f=a("5a"),g=(a("53"),{key:!0,ref:!0}),h=function(a,b,c,d,e,f){this.type=a,this.key=b,this.ref=c,this._owner=d,this._context=e,this.props=f};h.prototype={_isReactElement:!0},h.createElement=function(a,b,c){var f,i={},j=null,k=null;if(null!=b){k=void 0===b.ref?null:b.ref,j=void 0===b.key?null:""+b.key;for(f in b)b.hasOwnProperty(f)&&!g.hasOwnProperty(f)&&(i[f]=b[f])}var l=arguments.length-2;if(1===l)i.children=c;else if(l>1){for(var m=Array(l),n=0;n<l;n++)m[n]=arguments[n+2];i.children=m}if(a&&a.defaultProps){var o=a.defaultProps;for(f in o)"undefined"==typeof i[f]&&(i[f]=o[f])}return new h(a,j,k,e.current,d.current,i)},h.createFactory=function(a){var b=h.createElement.bind(null,a);return b.type=a,b},h.cloneAndReplaceProps=function(a,b){var c=new h(a.type,a.key,a.ref,a._owner,a._context,b);return c},h.cloneElement=function(a,b,c){var d,i=f({},a.props),j=a.key,k=a.ref,l=a._owner;if(null!=b){void 0!==b.ref&&(k=b.ref,l=e.current),void 0!==b.key&&(j=""+b.key);for(d in b)b.hasOwnProperty(d)&&!g.hasOwnProperty(d)&&(i[d]=b[d])}var m=arguments.length-2;if(1===m)i.children=c;else if(m>1){for(var n=Array(m),o=0;o<m;o++)n[o]=arguments[o+2];i.children=n}return new h(a.type,j,k,l,a._context,i)},h.isValidElement=function(a){var b=!(!a||!a._isReactElement);return b},c.exports=h}(a("54"))}),c.registerDynamic("7f",["54"],!0,function(a,b,c){this||self;!function(a){"use strict";var b=function(a,b,c,d,e,f,g,h){if(!a){var i;if(void 0===b)i=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var j=[c,d,e,f,g,h],k=0;i=new Error("Invariant Violation: "+b.replace(/%s/g,function(){return j[k++]}))}throw i.framesToPop=1,i}};c.exports=b}(a("54"))}),c.registerDynamic("e8",["57","7f","54"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a){return f(e.isValidElement(a)),a}var e=a("57"),f=a("7f");c.exports=d}(a("54"))}),c.registerDynamic("62",[],!0,function(a,b,c){"use strict";var d=(this||self,!("undefined"==typeof window||!window.document||!window.document.createElement)),e={canUseDOM:d,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:d&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:d&&!!window.screen,isInWorker:!d};c.exports=e}),c.registerDynamic("e9",[],!0,function(a,b,c){function d(){if(!h){h=!0;for(var a,b=g.length;b;){a=g,g=[];for(var c=-1;++c<b;)a[c]();b=g.length}h=!1}}function e(){}var f=(this||self,c.exports={}),g=[],h=!1;f.nextTick=function(a){g.push(a),h||setTimeout(d,0)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=e,f.addListener=e,f.once=e,f.off=e,f.removeListener=e,f.removeAllListeners=e,f.emit=e,f.binding=function(a){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(a){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}}),c.registerDynamic("ea",["e9"],!0,function(a,b,c){this||self;c.exports=a("e9")}),c.registerDynamic("eb",["ea"],!0,function(a,b,d){this||self;d.exports=c._nodeRequire?process:a("ea")}),c.registerDynamic("54",["eb"],!0,function(a,b,c){this||self;c.exports=a("eb")}),c.registerDynamic("ec",["ca","4f","cc","77","e7","cf","57","58","56","8a","d9","91","6d","a6","87","aa","db","5a","88","e8","62","54"],!0,function(a,b,c){this||self;!function(b){"use strict";var d=a("ca"),e=a("4f"),f=a("cc"),g=a("77"),h=a("e7"),i=a("cf"),j=a("57"),k=(a("58"),a("56")),l=a("8a"),m=a("d9"),n=a("91"),o=a("6d"),p=a("a6"),q=a("87"),r=a("aa"),s=a("db"),t=a("5a"),u=a("88"),v=a("e8");m.inject();var w=j.createElement,x=j.createFactory,y=j.cloneElement,z=p.measure("React","render",o.render),A={Children:{map:e.map,forEach:e.forEach,count:e.count,only:v},Component:f,DOM:k,PropTypes:q,initializeTouchEvents:function(a){d.useTouchEvents=a},createClass:g.createClass,createElement:w,cloneElement:y,createFactory:x,createMixin:function(a){return a},constructAndRenderComponent:o.constructAndRenderComponent,constructAndRenderComponentByID:o.constructAndRenderComponentByID,findDOMNode:u,render:z,renderToString:s.renderToString,renderToStaticMarkup:s.renderToStaticMarkup,unmountComponentAtNode:o.unmountComponentAtNode,isValidElement:j.isValidElement,withContext:h.withContext,__spread:t};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({CurrentOwner:i,InstanceHandles:n,Mount:o,Reconciler:r,TextComponent:l});A.version="0.13.3",c.exports=A}(a("54"))}),c.registerDynamic("ed",["ec"],!0,function(a,b,c){this||self;c.exports=a("ec")}),c.registerDynamic("1a",["ed"],!0,function(a,b,c){this||self;c.exports=a("ed")}),c.register("ee",["22","23","2a","2b","1a"],function(a){var b,c,d,e,f,g;return{setters:[function(a){b=a.default},function(a){c=a.default},function(a){d=a.default},function(a){e=a.default},function(a){f=a.default}],execute:function(){g=function(a){function g(a){c(this,g),d(Object.getPrototypeOf(g.prototype),"constructor",this).call(this,a),this.state={errorData:{}}}return e(g,a),b(g,[{key:"render",value:function(){return f.createElement("div",{id:"error",ref:"modal",className:"modal fade","data-keyboard":"false","data-backdrop":"static"},f.createElement("div",{className:"modal-dialog modal-lg"},f.createElement("div",{className:"modal-content"},f.createElement("div",{className:"modal-header"},f.createElement("h3",null,this.state.errorData.title)),f.createElement("div",{className:"modal-body"},f.createElement("p",{dangerouslySetInnerHTML:{__html:this.state.errorData.message}}),this.state.errorData.more_info&&f.createElement("pre",{className:"pre-scrollable"},this.state.errorData.more_info)))))}},{key:"modal",value:function(){return $(f.findDOMNode(this.refs.modal))}},{key:"show",value:function(a,b){var c=this;this.setState({errorData:a}),setTimeout(function(){c.modal().modal("show")},b||0)}}]),g}(f.Component),a("default",g)}}}),c.register("1",["15","16","17","26","c","1a","1d","2e","2f","3e","ee"],function(a){var b,c,d,e,f,g,h,i,j,k,l,m;return{setters:[function(a){},function(a){b=a.default},function(a){c=a.default},function(a){d=a.default},function(a){e=a.default},function(a){f=a.default},function(a){g=a.default},function(a){h=a.default},function(a){i=a.default},function(a){j=a.default},function(a){k=a.default}],execute:function(){l=f.createClass({displayName:"Page",render:function(){var a=this;return f.createElement("div",null,f.createElement("div",{className:"container"},f.createElement(m,{showSequenceModal:function(b){return a.showSequenceModal(b)},getCharacterWidth:function(){return a.getCharacterWidth()},showErrorModal:function(){for(var b=arguments.length,c=Array(b),d=0;d<b;d++)c[d]=arguments[d];return a.showErrorModal.apply(a,c)}})),f.createElement("pre",{className:"pre-reset hsp-lines",ref:"hspChars",hidden:!0},"ABCDEFGHIJKLMNOPQRSTUVWXYZ +-"),f.createElement("canvas",{id:"png-exporter",hidden:!0}),f.createElement(j,{ref:"sequenceModal",showErrorModal:function(){for(var b=arguments.length,c=Array(b),d=0;d<b;d++)c[d]=arguments[d];return a.showErrorModal.apply(a,c)}}),f.createElement(k,{ref:"errorModal"}))},componentDidMount:function(){var a=location.pathname.split("/").pop();sessionStorage.setItem("job_id",a)},showSequenceModal:function(a){this.refs.sequenceModal.show(a)},showErrorModal:function(a,b){this.refs.errorModal.show(a,b)},getCharacterWidth:function(){if(!this.characterWidth){var a=$(f.findDOMNode(this.refs.hspChars));this.characterWidth=a.width()/29}return this.characterWidth}}),m=f.createClass({displayName:"Report",getInitialState:function(){return this.fetchResults(),this.numUpdates=0,this.nextQuery=0,this.nextHit=0,this.nextHSP=0,this.maxHSPs=3,{search_id:"",seqserv_version:"",program:"",program_version:"",submitted_at:"",queries:[],results:[],querydb:[],params:[],stats:[]}},fetchResults:function(){function a(){$.getJSON(location.pathname+".json").complete(function(d){switch(d.status){case 202:var e;e=1===b.length?b[0]:b.shift(),setTimeout(a,e);break;case 200:c.setStateFromJSON(d.responseJSON);break;case 404:case 400:case 500:c.props.showErrorModal(d.responseJSON)}})}var b=[200,400,800,1200,2e3,3e3,5e3],c=this;a()},setStateFromJSON:function(a){this.lastTimeStamp=Date.now(),this.setState(a)},render:function(){return this.isResultAvailable()?this.resultsJSX():this.loadingJSX()},componentDidMount:function(){this.preventCollapseOnSelection(),this.toggleTable()},componentDidUpdate:function(){var a=this;console.log((Date.now()-this.lastTimeStamp)/1e3),0==this.nextQuery&&0==this.nextHit&&0==this.nextHSP&&this.affixSidebar(),this.nextQuery<this.state.queries.length?setTimeout(function(){return a.updateState()},25):this.componentFinishedUpdating()},updateState:function(){for(var a=[],b=0;this.nextQuery<this.state.queries.length;){var c=this.state.queries[this.nextQuery];for(0==this.nextHit&&0==this.nextHSP&&a.push(f.createElement(d,{key:"Query_"+c.number,query:c,program:this.state.program,querydb:this.state.querydb,showQueryCrumbs:this.state.queries.length>1,non_parse_seqids:this.state.non_parse_seqids,imported_xml:this.state.imported_xml,veryBig:this.state.veryBig}));this.nextHit<c.hits.length;){var g=c.hits[this.nextHit];for(0==this.nextHSP&&a.push(f.createElement(h,e({key:"Query_"+c.number+"_Hit_"+g.number,query:c,hit:g,algorithm:this.state.program,querydb:this.state.querydb,selectHit:this.selectHit,imported_xml:this.state.imported_xml,non_parse_seqids:this.state.non_parse_seqids,showQueryCrumbs:this.state.queries.length>1,showHitCrumbs:c.hits.length>1,veryBig:this.state.veryBig},this.props)));this.nextHSP<g.hsps.length;){var j=g.hsps[this.nextHSP++];if(a.push(f.createElement(i,e({key:"Query_"+c.number+"_Hit_"+g.number+"_HSP_"+j.number,query:c,hit:g,hsp:j,algorithm:this.state.program,showHSPNumbers:g.hsps.length>1},this.props))),b++,b==this.maxHSPs)break}if(this.nextHSP==g.hsps.length&&(this.nextHit=this.nextHit+1,this.nextHSP=0),b==this.maxHSPs)break}if(this.nextHit==c.hits.length&&(this.nextQuery=this.nextQuery+1,this.nextHit=0),b==this.maxHSPs)break}this.numUpdates++,this.lastTimeStamp=Date.now(),this.setState({results:this.state.results.concat(a),veryBig:this.numUpdates>=250})},componentFinishedUpdating:function(){this.shouldShowIndex()&&this.setupScrollSpy()},loadingJSX:function(){return f.createElement("div",{className:"row"},f.createElement("div",{className:"col-md-6 col-md-offset-3 text-center"},f.createElement("h1",null,f.createElement("i",{className:"fa fa-cog fa-spin"})," BLAST-ing"),f.createElement("p",null,f.createElement("br",null),"This can take some time depending on the size of your query and database(s). The page will update automatically when BLAST is done.",f.createElement("br",null),f.createElement("br",null),"You can bookmark the page and come back to it later or share the link with someone.")))},resultsJSX:function(){return f.createElement("div",{className:"row"},f.createElement("div",{className:"col-md-3 hidden-sm hidden-xs"},f.createElement(b,{data:this.state,atLeastOneHit:this.atLeastOneHit(),shouldShowIndex:this.shouldShowIndex()})),f.createElement("div",{className:"col-md-9"},this.overviewJSX(),this.circosJSX(),this.state.results))},overviewJSX:function(){return f.createElement("div",{className:"overview"},f.createElement("p",null,f.createElement("strong",null,"SequenceServer ",this.state.seqserv_version)," using ",f.createElement("strong",null,this.state.program_version),this.state.submitted_at&&", query submitted on "+this.state.submitted_at),f.createElement("p",null,f.createElement("strong",null," Databases: "),this.state.querydb.map(function(a){return a.title}).join(", ")," (",this.state.stats.nsequences," sequences, ",this.state.stats.ncharacters," characters)"),f.createElement("p",null,f.createElement("strong",null,"Parameters: ")," ",c.map(this.state.params,function(a,b){return b+" "+a}).join(", ")),f.createElement("p",null,"Please cite: ",f.createElement("a",{href:"https://doi.org/10.1093/molbev/msz185"},"https://doi.org/10.1093/molbev/msz185")))},circosJSX:function(){return this.atLeastTwoHits()?f.createElement(g,{queries:this.state.queries,program:this.state.program,collapsed:"true"}):f.createElement("span",null)},isResultAvailable:function(){return this.state.queries.length>=1},atLeastOneHit:function(){return this.state.queries.some(function(a){return a.hits.length>0})},atLeastTwoHits:function(){var a=0;return this.state.queries.some(function(b){return a+=b.hits.length,a>1})},shouldShowIndex:function(){var a=this.state.queries.length;return a>=2&&a<=12},preventCollapseOnSelection:function(){$("body").on("mousedown",".hit > .section-header > h4",function(a){var b=$(this);b.on("mouseup mousemove",function a(c){if("mouseup"===c.type){var d=b.parents(".hit").attr("id");$("div[data-parent-hit="+d+"]").toggle(),b.find("i").toggleClass("fa-minus-square-o fa-plus-square-o")}else b.attr("data-toggle","");b.off("mouseup mousemove",a)})})},toggleTable:function(){$("body").on("mousedown",".resultn > .section-content > .table-hit-overview > .caption",function(a){var b=$(this);b.on("mouseup mousemove",function a(c){b.find("i").toggleClass("fa-minus-square-o fa-plus-square-o"),b.off("mouseup mousemove",a)})})},affixSidebar:function(){var a=$(".sidebar"),b=a.offset();b&&a.affix({offset:{top:b.top}})},setupScrollSpy:function(){$("body").scrollspy({target:".sidebar"})},selectHit:function(a){var b=$("#"+a),c=$(".hit-links :checkbox:checked").length;if(b&&b.val()){var d=$(b.data("target"));b.is(":checked")?(d.addClass("glow"),d.next(".hsp").addClass("glow"),$(".download-fasta-of-selected").enable(),$(".download-alignment-of-selected").enable()):(d.removeClass("glow"),d.next(".hsp").removeClass("glow"));var e=$(".download-fasta-of-selected"),f=$(".download-alignment-of-selected");c>=1&&(e.find(".text-bold").html(c),f.find(".text-bold").html(c)),0==c&&(e.addClass("disabled").find(".text-bold").html(""),f.addClass("disabled").find(".text-bold").html(""))}}}),f.render(f.createElement(l,null),document.getElementById("view"))}}})})(function(a){a()});
|